code stringlengths 10 805k | def_use_chains listlengths 0 667 |
|---|---|
import json
from unittest import TestCase
from time import sleep
from cs3api4lab.tests.share_test_base import ShareTestBase
from traitlets.config import LoggingConfigurable
import urllib.parse
class TestLocks(ShareTestBase, TestCase):
einstein_id = '4c510ada-c86b-4815-8820-42cdf82c3d51'
einstein_idp = 'cernbo... | [
[
[
7,
11
],
[
1518,
1522
],
[
2826,
2830
]
],
[
[
34,
42
],
[
226,
234
]
],
[
[
60,
65
],
[
6379,
6384
]
],
[
[
111,
124
],
[
211,
... |
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from pathlib import Path
from typing import Any, Dict
import torchvision.transforms as pth_transforms
from classy_vision.dataset.transforms im... | [
[
[
197,
201
],
[
7692,
7696
]
],
[
[
221,
224
],
[
6992,
6995
]
],
[
[
226,
230
],
[
6982,
6986
]
],
[
[
239,
279
],
[
7636,
7650
]
],
[
... |
import _plotly_utils.basevalidators
class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name='categoryarraysrc',
parent_name='layout.scene.zaxis',
**kwargs
):
super(CategoryarraysrcValidator, self).__init__(
... | [
[
[
7,
35
],
[
70,
83
]
],
[
[
44,
69
],
[
267,
292
]
]
] |
import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()
requires = [
'elasticsearch',
'pyramid',
'pyramid_chame... | [
[
[
7,
9
],
[
63,
65
],
[
79,
81
],
[
116,
118
],
[
188,
190
]
],
[
[
34,
39
],
[
409,
414
]
],
[
[
41,
54
],
[
978,
991
]
],
... |
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | [
[
[
735,
750
]
],
[
[
774,
782
]
],
[
[
806,
820
]
],
[
[
829,
840
],
[
11806,
11817
]
],
[
[
848,
853
],
[
9028,
9033
],
[
9054,
9059
],
... |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | [
[
[
481,
485
],
[
2736,
2740
]
],
[
[
514,
531
]
],
[
[
548,
554
],
[
999,
1005
],
[
3479,
3485
],
[
3629,
3635
],
[
3336,
3342
]
],
[
[
... |
"""
DataFrame
---------
An efficient 2D container for potentially mixed-type time series or other
labeled data series.
Similar to its R counterpart, data.frame, except providing automatic data
alignment and a host of useful data manipulation methods having to do with the
labeling information
"""
from __future__ import... | [
[
[
321,
329
]
],
[
[
410,
419
],
[
80111,
80120
]
],
[
[
427,
438
],
[
10342,
10353
],
[
182171,
182182
]
],
[
[
446,
455
],
[
30804,
30813
],
... |
import geopandas
import shapely.geometry
gdf = geopandas.GeoDataFrame(geometry=[shapely.geometry.Point(x, x) for x in [5,4,3,2]])
gdf.index.name = 'id'
gdf.to_file("test.geojson", index=True, driver='GeoJSON')
gdf.to_file("test.geojson1", driver='GeoJSON') | [
[
[
7,
16
],
[
47,
56
]
],
[
[
24,
40
],
[
80,
87
]
],
[
[
41,
44
],
[
130,
133
],
[
152,
155
],
[
210,
213
]
]
] |
r"""
Semimonomial transformation group
The semimonomial transformation group of degree `n` over a ring `R` is
the semidirect product of the monomial transformation group of degree `n`
(also known as the complete monomial group over the group of units
`R^{\times}` of `R`) and the group of ring automorphisms.
The multi... | [
[
[
1572,
1579
],
[
8543,
8550
],
[
10976,
10983
]
],
[
[
1611,
1622
],
[
1933,
1944
]
],
[
[
1672,
1692
],
[
1946,
1966
]
],
[
[
1728,
1734
],
... |
import numpy as np
class StaticFns:
@staticmethod
def termination_fn(obs, act, next_obs):
done = np.array([False]).repeat(len(obs))
done = done[:,None]
return done
| [
[
[
7,
18
],
[
116,
118
]
],
[
[
26,
35
]
]
] |
"""Base class for directed graphs."""
# Copyright (C) 2004-2015 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
from copy import deepcopy
import networkx_mod as nx
from networkx_mod.classes.graph import Graph... | [
[
[
241,
249
],
[
38890,
38898
],
[
40783,
40791
],
[
41017,
41025
],
[
41168,
41176
],
[
41204,
41212
],
[
41886,
41894
],
[
41986,
41994
],
[
42... |
import logging
import logging.config
import os
from celery.utils.log import get_task_logger
from dotenv import load_dotenv
from flask import Flask
from flask_login import LoginManager
from config import config, Config
from .AfricasTalkingGateway import gateway
from .database import db, redis
dotenv_path = os.path.jo... | [
[
[
7,
14
]
],
[
[
22,
36
],
[
1739,
1746
],
[
1787,
1794
]
],
[
[
44,
46
],
[
310,
312
],
[
323,
325
],
[
336,
338
],
[
1811,
1813
... |
from botocore.exceptions import CapacityNotAvailableError
from botocore.retries import bucket
from tests import unittest
class FakeClock(bucket.Clock):
def __init__(self, timestamp_sequences):
self.timestamp_sequences = timestamp_sequences
self.sleep_call_amounts = []
def sleep(self, amount):... | [
[
[
32,
57
],
[
2528,
2553
]
],
[
[
87,
93
],
[
139,
145
],
[
683,
689
]
],
[
[
112,
120
],
[
468,
476
]
],
[
[
129,
138
],
[
569,
... |
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | [
[
[
607,
615
],
[
5057,
5065
]
],
[
[
635,
643
],
[
2017,
2025
],
[
8992,
9000
]
],
[
[
645,
649
]
],
[
[
651,
659
],
[
2150,
2158
],
[
... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Letter-color Consistency test
O.Colizoli 2020
Each letter of the alphabet in random order x 2
Color wheel opens at a randomized color on each trial (but does not turn)
Python 2..7
"""
# data saved in ~/LogFiles/sub-XXX
# Import necessary modules
import random
import n... | [
[
[
305,
311
],
[
4525,
4531
],
[
4070,
4076
],
[
4093,
4099
],
[
4116,
4122
]
],
[
[
319,
330
],
[
4504,
4506
],
[
4863,
4865
]
],
[
[
33... |
import pytest
from list_utils import *
from oracle import ColumnRecommendation, ColumnClassification
def test_find_one():
needle = 1
none = [0, 0, 5, 's']
beginning = [1, None, 9, 6, 0, 0]
end = ['x', '0', 1]
several = [0, 0, 3, 4, 1, 3, 2, 1, 3, 4]
assert find_one(none, needle) == False
... | [
[
[
7,
13
]
],
[
[
38,
39
],
[
285,
293
],
[
328,
336
],
[
367,
375
],
[
400,
408
],
[
458,
464
],
[
509,
515
],
[
560,
566
],
[... |
import logging
import azure.functions as func
import json
import os
from azure.cosmosdb.table.tableservice import TableService
from azure.cosmosdb.table.models import Entity
def main(req: func.HttpRequest) -> func.HttpResponse:
logging.info('Python HTTP trigger function processed a request.')
# Connect to Azu... | [
[
[
7,
14
],
[
233,
240
]
],
[
[
22,
45
],
[
210,
214
],
[
189,
193
],
[
943,
947
],
[
1065,
1069
]
],
[
[
53,
57
]
],
[
[
65,
6... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Nov 8 15:25:03 2018
@author: bathmann
"""
from .TreeDynamicTimeStepping import TreeDynamicTimeStepping
from .TreeDynamicTimeLoop import TreeDynamicTimeLoop
from .SimpleTimeLoop.SimpleLoop import Loop
| [
[
[
148,
171
]
],
[
[
205,
224
]
],
[
[
264,
268
]
]
] |
'''
File: detect_forest_change.py
Author: Min Feng
Version: 0.1
Create: 2018-04-20 15:42:37
Description: detect forest changes from foest probility layers and tree cover layers
'''
import logging
def _load_tcc(f_tcc, msk):
from gio import geo_raster_ex as gx
from gio import config
import nump... | [
[
[
197,
204
],
[
1781,
1788
],
[
2009,
2016
],
[
2574,
2581
]
],
[
[
212,
221
],
[
2442,
2451
]
],
[
[
696,
701
],
[
4824,
4829
]
],
[
[
... |
import datetime
import logging
import traceback
from dis_snek.models import ComponentContext
from dis_snek.models import InteractionContext
from ElevatorBot.misc.formating import embed_message
def get_now_with_tz() -> datetime.datetime:
"""Returns the current datetime (timezone aware)"""
return datetime.da... | [
[
[
7,
15
],
[
222,
230
],
[
309,
317
],
[
334,
342
],
[
408,
416
],
[
386,
394
]
],
[
[
23,
30
],
[
996,
1003
]
],
[
[
38,
47
]... |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | [
[
[
176,
184
]
],
[
[
192,
198
]
],
[
[
206,
220
],
[
476,
482
],
[
1992,
1998
],
[
2307,
2313
],
[
2490,
2496
],
[
2648,
2654
],
[
2879,
... |
#!/usr/bin/env python
"""
C.11.5 Index and Glossary (p211)
"""
import string, os
from plasTeX.Tokenizer import Token, EscapeSequence
from plasTeX import Command, Environment
from plasTeX.Logging import getLogger
from Sectioning import SectionUtils
try:
from pyuca import Collator
collator = Collator(os.path.... | [
[
[
73,
79
],
[
1982,
1988
]
],
[
[
81,
83
],
[
312,
314
],
[
325,
327
]
],
[
[
114,
119
],
[
7986,
7991
],
[
8002,
8007
],
[
8019,
... |
# -*- coding: utf-8 -*-
# Copyright (c) 2020, Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can be
# found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
def delete_disconnected_nodes(gd):
# delete all nodes with no inputs a... | [
[
[
250,
275
]
]
] |
import numpy as np
def _main():
# Inputs
n = 3
x = np.arange(20, dtype=np.float64)
# Slow average/std
avg = np.zeros(len(x) - n + 1)
std = np.zeros(len(x) - n + 1)
for i in range(len(avg)):
avg[i] = np.mean(x[i:i+n])
std[i] = np.std(x[i:i+n])
print('AVG')
print('\... | [
[
[
7,
18
],
[
65,
67
],
[
85,
87
],
[
131,
133
],
[
166,
168
],
[
238,
240
],
[
273,
275
],
[
440,
442
],
[
474,
476
],
[
495... |
import torch
from torch import nn
from torch.nn import CrossEntropyLoss, MSELoss
from transformers.file_utils import add_start_docstrings, add_start_docstrings_to_model_forward
from transformers.modeling_bert import (
BERT_INPUTS_DOCSTRING,
BERT_START_DOCSTRING,
BertEmbeddings,
BertLayer,
... | [
[
[
7,
12
],
[
455,
460
],
[
477,
482
],
[
529,
534
],
[
594,
599
],
[
8273,
8278
],
[
8394,
8399
],
[
8499,
8504
],
[
8530,
8535
],
... |
# *** WARNING: this file was generated by the Kulado Kubernetes codegen tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import kulado
import kulado.runtime
import warnings
from ... import tables, version
class ClusterRoleBindingList(kulado.CustomResource):
"""
Clus... | [
[
[
171,
177
]
],
[
[
185,
199
],
[
280,
286
],
[
1088,
1094
],
[
1565,
1571
]
],
[
[
207,
215
],
[
538,
546
],
[
696,
704
]
],
[
[
23... |
import logging
from .base import ApplicationWrapper
from ..configuration.utils import coerce_config
from ..support.converters import asbool
log = logging.getLogger(__name__)
class IdentityApplicationWrapper(ApplicationWrapper):
"""Provides user identity when authentication is enabled.
The repoze.who provide... | [
[
[
7,
14
],
[
147,
154
]
],
[
[
33,
51
],
[
210,
228
]
],
[
[
86,
99
],
[
1179,
1192
]
],
[
[
133,
139
],
[
1240,
1246
],
[
1282,
... |
#!/usr/bin/env python3
# This file is Copyright (c) 2018-2019 Rohit Singh <rohit@rohitksingh.in>
# This file is Copyright (c) 2019 Florent Kermarrec <florent@enjoy-digital.fr>
# License: BSD
import sys
from migen import *
from litex.build.generic_platform import *
from litex.soc.integration.soc_core import *
from l... | [
[
[
200,
203
],
[
7632,
7635
]
],
[
[
223,
224
]
],
[
[
267,
268
]
],
[
[
312,
313
]
],
[
[
358,
359
]
],
[
[
402,
403
]
],
[
[
438,
439... |
# coding: utf-8
import pytest
from edipy import fields, validators, exceptions
@pytest.mark.parametrize('fixed_type, data', [
(fields.Integer(1, validators=[validators.Range(1, 5)]), '1'),
(fields.Integer(1, validators=[validators.MaxValue(3)]), '2'),
(fields.Integer(1, validators=[validators.MinValue(1... | [
[
[
24,
30
],
[
84,
90
],
[
673,
679
],
[
986,
992
],
[
1303,
1309
],
[
1620,
1626
],
[
2180,
2186
],
[
616,
622
],
[
908,
914
],
[
... |
"""
tulflow.harvest
~~~~~~~~~~~~~~~
This module contains objects to harvest data from one given location to another.
"""
import hashlib
import io
import logging
import pandas
import sickle
from lxml import etree
from sickle import Sickle
from sickle.models import xml_to_dict
from sickle.oaiexceptions import NoRecordsMa... | [
[
[
128,
135
],
[
9705,
9712
]
],
[
[
143,
145
],
[
8474,
8476
]
],
[
[
153,
160
],
[
1183,
1190
],
[
1898,
1905
],
[
1975,
1982
],
[
2060... |
import turtle
STARTING_POSITIONS = [(0, 0), (-20, 0), (-40, 0)]
MOVE_DISTANCE = 20
UP = 90
DOWN = 270
RIGHT = 0
LEFT = 180
class Snake:
"""Initializes length and segments of snake."""
def __init__(self):
self.length = 3
self.segments = []
self.create_snake()
se... | [
[
[
7,
13
],
[
592,
598
]
],
[
[
17,
35
],
[
469,
487
]
],
[
[
68,
81
],
[
1360,
1373
]
],
[
[
88,
90
],
[
1471,
1473
],
[
1533,
... |
# -*- coding: utf-8 -*-
"""This module contains all functions and classes for the MLTree. The MLTree buils a tree-like
structure of the objects in a given repository. This allows the user to access objects in a
comfortable way allowing for autocompletion (i.e. in Jupyter notebooks).
To use it one can simply call the :... | [
[
[
1558,
1565
],
[
1938,
1945
]
],
[
[
1584,
1588
],
[
13341,
13345
],
[
13426,
13430
]
],
[
[
1610,
1618
],
[
4348,
4356
]
],
[
[
1651,
1663
]... |
count = input('How many people will be in the dinner group? ')
count = int(count)
if count > 8:
print('You\'ll have to wait for a table.')
else:
print('The table is ready.')
| [
[
[
1,
6
],
[
76,
81
]
],
[
[
64,
69
],
[
87,
92
]
]
] |
#!/usr/bin/env python
from distutils.core import setup
from glob import glob
from setuptools import find_packages
setup(name='Fibonacci',
version='1.0',
description='Python Distribution Utilities',
author='Kevin Chen',
packages=find_packages('src'),
package_dir={'': 'src'},
py_mo... | [
[
[
51,
56
],
[
118,
123
]
],
[
[
74,
78
],
[
367,
371
]
],
[
[
103,
116
],
[
256,
269
]
]
] |
# Copyright 2013 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | [
[
[
683,
685
],
[
1974,
1976
],
[
3683,
3685
]
],
[
[
706,
718
],
[
1135,
1147
]
],
[
[
740,
754
],
[
959,
966
]
],
[
[
778,
786
],
[
... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Bottle is a fast and simple micro-framework for small web applications. It
offers request dispatching (Routes) with url parameter support, templates,
a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and
template engines - all in a single file an... | [
[
[
536,
550
]
],
[
[
552,
562
]
],
[
[
583,
594
],
[
142911,
142922
],
[
119702,
119713
]
],
[
[
608,
619
]
],
[
[
855,
867
],
[
886,
898
]... |
"""basic ding-dong bot for the wechaty plugin"""
from typing import Union
from wechaty import Message, Contact, Room, FileBox
from wechaty.plugin import WechatyPlugin
class DingDongPlugin(WechatyPlugin):
"""basic ding-dong plugin"""
@property
def name(self):
"""name of the plugin"""
retur... | [
[
[
68,
73
],
[
558,
563
]
],
[
[
95,
102
],
[
371,
378
]
],
[
[
104,
111
],
[
587,
594
]
],
[
[
113,
117
],
[
581,
585
]
],
[
[
1... |
"""
_WorkQueueTestCase_
Unit tests for the WMBS File class.
"""
from __future__ import print_function
import time
import unittest
from WMCore.Agent.HeartbeatAPI import HeartbeatAPI
from WMQuality.TestInit import TestInit
class HeartbeatTest(unittest.TestCase):
def setUp(self):
"""
_setUp_
... | [
[
[
89,
103
]
],
[
[
112,
116
],
[
4889,
4893
]
],
[
[
124,
132
],
[
247,
255
],
[
5072,
5080
]
],
[
[
172,
184
],
[
1088,
1100
],
[
1... |
# Generated by Django 2.2.10 on 2020-03-20 13:00
import wagtail.core.blocks
import wagtail.core.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("budgetportal", "0053_custompage"),
]
operations = [
migrations.AddField(
model_na... | [
[
[
57,
76
]
],
[
[
84,
103
],
[
380,
387
],
[
512,
519
],
[
703,
710
],
[
1170,
1177
],
[
1248,
1255
],
[
1395,
1402
]
],
[
[
126,
... |
import torch
from torch import nn
from torchvision.models.vgg import vgg16
class GeneratorLoss_NEW(nn.Module):
def __init__(self):
super(GeneratorLoss_NEW, self).__init__()
vgg = vgg16(pretrained=True)
# loss_network = nn.Sequential(*list(vgg.features)[:31]).eval()
loss_network = n... | [
[
[
7,
12
],
[
2051,
2056
],
[
735,
740
],
[
1702,
1707
],
[
1777,
1782
],
[
2244,
2249
],
[
2277,
2282
],
[
2327,
2332
]
],
[
[
31,
33
... |
# -*- coding: utf-8 -*- #
# Copyright 2021 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | [
[
[
708,
723
]
],
[
[
747,
755
]
],
[
[
779,
795
]
],
[
[
846,
850
],
[
3324,
3328
]
],
[
[
887,
891
],
[
1595,
1599
],
[
1539,
1543
],
... |
from kivy.graphics import Color
from .navigation import Navigation
class Colors:
WHITE = Color(1, 1, 1, 1)
BLACK = Color(0, 0, 0, 1)
GREY = Color(.8, .8, .8, 1)
RED = Color(1, 0, 0, 1)
GREEN = Color(0, 1, 0, 1)
BLUE = Color(0, 0, 1, 1)
@staticmethod
def lerp(value, *args):
... | [
[
[
26,
31
],
[
95,
100
],
[
125,
130
],
[
155,
160
],
[
187,
192
],
[
217,
222
],
[
246,
251
],
[
975,
980
]
],
[
[
57,
67
]
],
... |
from core.plugins.openstack import (
OpenstackChecksBase,
)
FEATURES = {'neutron': {'main': [
'availability_zone'],
'openvswitch-agent': [
'l2_population',
'firewall_driver'],
'l3-age... | [
[
[
41,
60
],
[
1310,
1329
]
],
[
[
65,
73
],
[
1602,
1610
],
[
1638,
1646
],
[
1854,
1862
]
],
[
[
946,
954
],
[
2097,
2105
],
[
2178,
... |
from rest_framework import serializers
from wallet.models import UserWallet, PaymentMethod, DriverWallet
class UserWalletSerializer(serializers.ModelSerializer):
class Meta:
model = UserWallet
fields = "__all__"
class DriverWalletSerializer(serializers.ModelSerializer):
class Meta:
m... | [
[
[
27,
38
],
[
134,
145
],
[
265,
276
],
[
399,
410
]
],
[
[
65,
75
],
[
196,
206
]
],
[
[
77,
90
],
[
461,
474
]
],
[
[
92,
10... |
from typing import List, Callable
from autumn.curve import scale_up_function
def get_importation_rate_func_as_birth_rates(
importation_times: List[float],
importation_n_cases: List[float],
detect_prop_func,
starting_pops: list,
):
"""
When imported cases are explicitly simulated as part of the... | [
[
[
19,
23
],
[
148,
152
],
[
186,
190
]
],
[
[
25,
33
]
],
[
[
59,
76
],
[
724,
741
]
],
[
[
83,
123
]
],
[
[
1026,
1050
]
]
] |
class Mahasiswa:
def __init__(self, nama, nilai):
self.nama = nama
self.nilai = nilai
def hitung_nilai(self):
return sum(self.nilai)/len(self.nilai)
mahasiswa = Mahasiswa("Fazlur", (90,70,70,70))
print("Nama :", mahasiswa.nama)
print("Total Nilai :", mahasiswa.hitung_nilai()) | [
[
[
6,
15
],
[
199,
208
]
],
[
[
187,
196
],
[
251,
260
],
[
291,
300
]
]
] |
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without... | [
[
[
1169,
1171
],
[
1921,
1923
]
],
[
[
1179,
1186
],
[
2321,
2328
]
],
[
[
1194,
1208
],
[
2434,
2443
],
[
2659,
2668
],
[
4108,
4117
],
[
... |
"""
Contains classes related to Roblox group data and parsing.
"""
from typing import Optional, Tuple
from .bases.basegroup import BaseGroup
from .partials.partialuser import PartialUser
from .shout import Shout
from .utilities.shared import ClientSharedObject
class Group(BaseGroup):
"""
Represents a Join... | [
[
[
89,
97
],
[
1476,
1484
],
[
2059,
2067
],
[
2076,
2084
],
[
2566,
2574
],
[
2614,
2622
]
],
[
[
99,
104
],
[
2053,
2058
]
],
[
[
135,
... |
# noqa
from typing import Any, BinaryIO
class CustomSerializer:
"""Custom serializer implementation to test the injection of different serialization strategies to an input."""
@property
def extension(self) -> str: # noqa
return "ext"
def serialize(self, value: Any, writer: BinaryIO): # noq... | [
[
[
26,
29
],
[
290,
293
],
[
406,
409
]
],
[
[
31,
39
],
[
303,
311
],
[
393,
401
]
],
[
[
48,
64
]
]
] |
import io
import os
import re
import struct
from xml.etree import ElementTree
_UNIT_KM = -3
_UNIT_100M = -2
_UNIT_10M = -1
_UNIT_1M = 0
_UNIT_10CM = 1
_UNIT_CM = 2
_UNIT_MM = 3
_UNIT_0_1MM = 4
_UNIT_0_01MM = 5
_UNIT_UM = 6
_UNIT_INCH = 6
_TIFF_TYPE_SIZES = {
1: 1,
2: 1,
3: 2,
4: 4,
5: 8,
6: 1,
7: 1,
8... | [
[
[
7,
9
],
[
2012,
2014
]
],
[
[
17,
19
],
[
8706,
8708
]
],
[
[
27,
29
],
[
1130,
1132
],
[
7483,
7485
],
[
7555,
7557
]
],
[
[
37,
... |
def digest_target(target):
from .element import digest_element
return digest_element(target)
| [
[
[
5,
18
]
]
] |
# Copyright 2017 The TensorFlow Authors and modified by Emilien Garreau. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.... | [
[
[
1614,
1630
],
[
4718,
4720
],
[
2290,
2292
],
[
2324,
2326
],
[
2365,
2367
],
[
2410,
2412
],
[
2421,
2423
],
[
2475,
2477
],
[
2498,
25... |
# -*- coding: utf-8 -*-
import os
import re
import json
import os.path
import unittest
reg_cmnt = re.compile(r"/\*.*?\*/", re.DOTALL)
class Config:
"Работа с конфигурационным файлом"
def __init__(self, main_path=None, user_path=None):
if main_path is None:
self._main_path = "config.json... | [
[
[
32,
34
]
],
[
[
42,
44
],
[
100,
102
],
[
125,
127
]
],
[
[
52,
56
],
[
864,
868
],
[
4890,
4894
],
[
5469,
5473
]
],
[
[
64,
... |
import pytest
import copy
from pathlib import Path
import sys
sys.path.append(str(Path(__file__).absolute().parent.parent))
from swimmer_abm.model import Model
def test_init():
model = Model(nswimmers=3)
assert len(model.swimmers) == 3
def test_step():
model = Model(nswimmers=1)
swimmer = copy.dee... | [
[
[
7,
13
]
],
[
[
21,
25
],
[
312,
316
]
],
[
[
46,
50
],
[
82,
86
]
],
[
[
58,
61
],
[
62,
65
]
],
[
[
154,
159
],
[
190,
... |
#!/usr/bin/python3
class Evaluator:
def __init__(self, lexer):
self.__lexer = lexer
def evaluate(self, line):
return int(next(self.__lexer.tokenize(line)).raw_value)
class REPL:
def __init__(self, read, print, evaluate):
self.__read = read
self.__eval = evaluate
sel... | [
[
[
26,
35
],
[
660,
669
]
],
[
[
198,
202
],
[
641,
645
]
],
[
[
631,
636
],
[
670,
675
]
]
] |
import os
from time import sleep
import pytest
from tlz import frequencies
from distributed import get_task_stream
from distributed.client import wait
from distributed.diagnostics.task_stream import TaskStreamPlugin
from distributed.metrics import time
from distributed.utils_test import div, gen_cluster, inc, slowinc... | [
[
[
7,
9
],
[
4136,
4138
]
],
[
[
27,
32
],
[
3460,
3465
]
],
[
[
41,
47
],
[
3769,
3775
],
[
4073,
4079
]
],
[
[
64,
75
],
[
843,
... |
"""This module implements the dataset item entity"""
# Copyright (C) 2021-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
import abc
import copy
import itertools
import logging
from threading import Lock
from typing import List, Optional, Sequence
import numpy as np
from ote_sdk.entities.annotation i... | [
[
[
146,
149
],
[
852,
855
]
],
[
[
157,
161
],
[
9623,
9627
],
[
14324,
14328
],
[
14525,
14529
]
],
[
[
169,
178
],
[
12420,
12429
]
],
[
... |
from sys import argv, exit
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QApplication, QMainWindow, QWidget
class MainWindow(QMainWindow):
def __init__(self, parent=None):
super(MainWindow, self).__init__(parent)
self.setCentralWidget(CustomWidget(self))
self.show()
class Cus... | [
[
[
16,
20
],
[
656,
660
]
],
[
[
22,
26
],
[
688,
692
]
],
[
[
53,
55
],
[
456,
458
]
],
[
[
84,
96
],
[
643,
655
]
],
[
[
98,
... |
# Copyright 2011 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | [
[
[
698,
703
],
[
7123,
7128
],
[
7137,
7142
]
],
[
[
711,
718
],
[
969,
976
],
[
5126,
5133
]
],
[
[
726,
741
],
[
11008,
11023
]
],
[
[
... |
# -*- coding:utf-8; -*-
class SolutionV1:
def combinationSum(self, candidates, target):
# 1. 定义保存结果的组合
result = set()
# 2. 定义递归函数,i表示递归层数,但是具体含义还不知道
def helper(nums, candidates, target):
# 4. 编写递归模板
# 1) 定义递归终止条件
# 应该是从candidate选出来的数的sum=target就... | [
[
[
32,
42
]
],
[
[
1045,
1053
]
]
] |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import six
from datetime import datetime
from django.utils import timezone
from sentry.models import Commit, CommitAuthor, Integration, PullRequest, Repository
from sentry.testutils import APITestCase
from uuid import uuid4
from .testutils import (
P... | [
[
[
47,
62
]
],
[
[
71,
74
],
[
1231,
1234
],
[
1870,
1873
],
[
2809,
2812
],
[
3739,
3742
],
[
5600,
5603
],
[
8679,
8682
],
[
12384,
1... |
"""
Calls the Turbomole executable.
"""
import os
import re
from decimal import Decimal
from pathlib import Path
from typing import Any, Dict, Optional, Tuple
from qcelemental.models import AtomicResult, Provenance, BasisSet
from qcelemental.util import safe_version, which
from ...exceptions import InputError
from ..... | [
[
[
47,
49
],
[
5070,
5072
]
],
[
[
57,
59
],
[
1700,
1702
],
[
2655,
2657
]
],
[
[
80,
87
],
[
10121,
10128
]
],
[
[
108,
112
],
[
15... |
from datetime import datetime
from functools import partial
from typing import Callable, List, Union
from symbiotic.schedule import Schedule
class Action(object):
def __init__(self, callback: Callable, *args, **kwargs):
self._callback: partial = partial(callback, *args, **kwargs)
self._schedule:... | [
[
[
21,
29
],
[
386,
394
],
[
886,
894
]
],
[
[
52,
59
],
[
262,
269
],
[
252,
259
]
],
[
[
79,
87
],
[
200,
208
],
[
1400,
1408
... |
import os
import json
def combine_schema(borough_name):
borough_name = borough_name.lower()
neighborhood_data = ""
with open('../scraped_data/borough_schema/' + borough_name + ".json", 'r', encoding='utf-8') as json_file:
data = json.load(json_file)
for zipCodes in range(len(data[borough_n... | [
[
[
7,
9
],
[
953,
955
]
],
[
[
17,
21
],
[
251,
255
],
[
492,
496
],
[
822,
826
]
],
[
[
28,
42
],
[
1352,
1366
]
],
[
[
925,
9... |
"""Implementations of metrics for 3D semantic segmentation."""
import tensorflow as tf
def average_volume_difference():
raise NotImplementedError()
def dice(y_true, y_pred, axis=(1, 2, 3, 4)):
"""Calculate Dice similarity between labels and predictions.
Dice similarity is in [0, 1], where 1 is perfect... | [
[
[
71,
87
],
[
1367,
1369
],
[
1409,
1411
],
[
1449,
1451
],
[
1496,
1498
],
[
1554,
1556
],
[
1589,
1591
],
[
2200,
2202
],
[
2242,
2244
... |
# Copyright 2016 Bridgewater Associates
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | [
[
[
842,
871
],
[
1043,
1072
]
],
[
[
921,
928
],
[
1406,
1413
]
],
[
[
937,
941
],
[
1185,
1189
]
],
[
[
959,
967
],
[
1121,
1129
]
],
[
... |
import numpy as np
from sklearn import metrics
import math
from keras.preprocessing import sequence
from keras.preprocessing.text import Tokenizer
from typing import *
# fastai utility
def listify(o):
if o is None: return []
if isinstance(o, list): return o
if isinstance(o, str): return [o]
if isinstan... | [
[
[
7,
18
],
[
1054,
1056
],
[
1766,
1768
],
[
1787,
1789
]
],
[
[
39,
46
]
],
[
[
54,
58
],
[
2017,
2021
]
],
[
[
91,
99
],
[
854,
... |
import pyaf.Bench.TS_datasets as tsds
import pyaf.tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "Lag1Trend", cycle_length = 30, transform = "RelativeDifference", sigma = 0.0, exog_count = 20, ar_order = 12); | [
[
[
7,
37
]
],
[
[
45,
100
],
[
105,
108
]
]
] |
import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['BoxCox'] , ['ConstantTrend'] , ['Seasonal_DayOfMonth'] , ['MLP'] ); | [
[
[
7,
75
],
[
78,
85
]
]
] |
from PIL import Image
import numpy as np
import colorsys
import os, sys
import argparse
import matplotlib.pyplot as plt
rgb_to_hsv = np.vectorize(colorsys.rgb_to_hsv)
hsv_to_rgb = np.vectorize(colorsys.hsv_to_rgb)
def crop(image, box=None):
if box:
imageBox = box
else:
imageBox = image.getbb... | [
[
[
16,
21
],
[
1130,
1135
],
[
754,
759
]
],
[
[
29,
40
],
[
136,
138
],
[
183,
185
],
[
428,
430
],
[
437,
439
],
[
481,
483
],
... |
# This is a simple application for alert system
from tkinter import *
from tkinter import messagebox
root = Tk()
root.geometry("200x200")
def message():
messagebox.showwarning("Alert Box", "Stop virus found")
but = Button(root, text="ok", command=Message)
but.place(x=100, y=100)
root.mainloop() | [
[
[
69,
70
],
[
110,
112
],
[
221,
227
],
[
253,
260
]
],
[
[
91,
101
],
[
159,
169
]
],
[
[
103,
107
],
[
115,
119
],
[
228,
232
... |
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
[
[
749,
764
]
],
[
[
788,
796
]
],
[
[
820,
834
]
],
[
[
861,
874
],
[
1387,
1400
],
[
2656,
2669
],
[
3334,
3347
],
[
5191,
5204
],
[
... |
"""WSGI File that enables Apache/GUnicorn to run Django"""
# pylint: disable=C0103
import os
import sys
from django.core.wsgi import get_wsgi_application
sys.path.insert(0, os.path.abspath(os.path.join(os.path.abspath(os.pardir), os.pardir)))
sys.path.insert(0, os.path.abspath(os.path.join(os.path.abspath(os.path.di... | [
[
[
92,
94
],
[
176,
178
],
[
192,
194
],
[
205,
207
],
[
221,
223
],
[
233,
235
],
[
265,
267
],
[
281,
283
],
[
294,
296
],
[
... |
from concurrent import futures
import time
import grpc
import app.helloworld_pb2 as helloworld_pb2
import app.helloworld_pb2_grpc as helloworld_pb2_grpc
_ONE_DAY_IN_SECONDS = 60 * 60 * 24
class Greeter(helloworld_pb2_grpc.GreeterServicer):
def Greet(self, request, context):
print('Saying `hello` to %s... | [
[
[
23,
30
],
[
465,
472
]
],
[
[
38,
42
],
[
685,
689
]
],
[
[
51,
55
],
[
453,
457
]
],
[
[
64,
100
],
[
353,
367
]
],
[
[
108,
... |
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
[
[
615,
617
],
[
2155,
2157
],
[
2190,
2192
]
],
[
[
625,
628
],
[
1982,
1985
]
],
[
[
636,
643
],
[
799,
806
],
[
1606,
1613
],
[
1814,
... |
from django.core.validators import RegexValidator
from django.db import models
from django.utils.translation import gettext_lazy as _
from taggit.managers import TaggableManager
from server.connective_tags.models import ConnectiveTaggedItem
from server.schools.models import School
from server.utils.db_utils import get... | [
[
[
35,
49
],
[
5496,
5510
],
[
7046,
7060
]
],
[
[
72,
78
],
[
417,
423
],
[
828,
834
],
[
920,
926
],
[
977,
983
],
[
1036,
1042
]... |
#!/usr/bin/env python
#
# Copyright 2015-2016 Flavio Garcia
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | [
[
[
630,
645
]
],
[
[
647,
655
]
],
[
[
657,
671
]
],
[
[
697,
711
]
],
[
[
721,
729
],
[
930,
938
]
],
[
[
750,
760
],
[
1064,
1074
],
... |
from tqdm import tqdm
import pandas as pd
from __init__ import FILE
df = pd.read_csv(FILE)
smiles = list(df["Smiles"])
with open("_chemprop.csv", "w") as f:
f.write("smiles\n")
for smi in smiles:
f.write("{0}\n".format(smi))
| [
[
[
17,
21
]
],
[
[
29,
41
],
[
74,
76
]
],
[
[
63,
67
],
[
86,
90
]
],
[
[
69,
71
],
[
106,
108
]
],
[
[
92,
98
],
[
198,
2... |
# coding=utf-8
import copy
import functools
from typing import List
import torch
import torch.distributed._shard.sharding_spec as shard_spec
from .api import (
_register_sharded_op,
Shard,
ShardedTensor,
ShardedTensorMetadata,
TensorProperties,
)
from .metadata import ShardMetadata # noqa: F401
... | [
[
[
23,
27
]
],
[
[
35,
44
],
[
16558,
16567
]
],
[
[
64,
68
],
[
11927,
11931
]
],
[
[
77,
82
],
[
471,
476
],
[
569,
574
],
[
2792,
... |
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import itertools
import logging
import math
import operator
import os
import queue
import time
from threading import Thread
import numpy as n... | [
[
[
185,
194
],
[
2054,
2063
],
[
2830,
2839
],
[
17276,
17285
],
[
17449,
17458
],
[
17466,
17475
],
[
19568,
19577
]
],
[
[
202,
209
],
[
38... |
#!/usr/bin/env python3
from parse_topology_for_hydrogens import parse_top_for_h
def gen_h_ndx(orig_ndx, topology, out_name='h_prot.ndx'):
ndx_ind = list()
with open(orig_ndx, 'r') as f:
line = f.readline()
while '[ Protein ]' not in line:
line = f.readline()
line = f.readl... | [
[
[
64,
79
],
[
584,
599
]
],
[
[
86,
95
]
]
] |
from suds.client import Client
from suds import WebFault
from model.project import Project
class SoapHelper:
def __init__(self, app):
self.app = app
def can_login(self, username, password):
client = Client("http://localhost:8080/mantisbt-1.2.20/api/soap/mantisconnect.php?wsdl")
try:
... | [
[
[
24,
30
],
[
226,
232
],
[
546,
552
]
],
[
[
48,
56
],
[
414,
422
]
],
[
[
83,
90
],
[
869,
876
]
],
[
[
98,
108
]
]
] |
def sol():
a, b = 0, 1
for i in range(int(input())):
a, b = b, a + b
print(a)
if __name__ == "__main__":
sol()
| [
[
[
4,
7
],
[
131,
134
]
]
] |
import json
import platform
import requests
import six
import sys
from .version import __version__
class SlackRequest(object):
def __init__(
self,
proxies=None
):
# HTTP configs
self.custom_user_agent = None
self.proxies = proxies
# Construct the user-... | [
[
[
7,
11
],
[
3496,
3500
]
],
[
[
19,
27
],
[
696,
704
],
[
715,
723
]
],
[
[
35,
43
],
[
4781,
4789
]
],
[
[
51,
54
],
[
3395,
... |
#
# Copyright (c) 2020 Project CHIP Authors
# Copyright (c) 2020 Google LLC.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apa... | [
[
[
792,
807
]
],
[
[
831,
845
]
],
[
[
853,
856
],
[
6098,
6101
]
],
[
[
864,
866
],
[
11180,
11182
],
[
11196,
11198
],
[
11428,
11430
],
... |
import gym
import keras as k
from keras.models import Sequential
from keras.layers import Conv2D, Activation, MaxPooling2D, Flatten, Dense, Dropout
from keras.optimizers import Adam
import numpy as np
from datetime import datetime
from matplotlib import pyplot as PLT
import time
import csv
import os
# You can adjust t... | [
[
[
7,
10
],
[
810,
813
]
],
[
[
18,
28
]
],
[
[
54,
64
],
[
4026,
4036
]
],
[
[
90,
96
],
[
4147,
4153
],
[
4339,
4345
]
],
[
[
9... |
import torch.nn as nn
import torch.nn.functional as F
from ssd.layers import L2Norm
from ssd.modeling import registry
from ssd.utils.model_zoo import load_state_dict_from_url
model_urls = {
'vgg': 'https://s3.amazonaws.com/amdegroot-models/vgg16_reducedfc.pth',
}
# borrowed from https://github.com/amdegroot/ssd... | [
[
[
7,
21
],
[
3247,
3249
],
[
482,
484
],
[
567,
569
],
[
657,
659
],
[
771,
773
],
[
790,
792
],
[
866,
868
],
[
929,
931
],
[
... |
from __future__ import unicode_literals
import frappe
def set_default_address(doc,method):
if doc.is_primary_address:
for row in doc.links:
if row.link_doctype=="Customer":
cust = frappe.get_doc("Customer",row.link_name)
cust.default_address=doc.name
cust.save()
def set_default_contact(doc,method):
... | [
[
[
23,
39
]
],
[
[
47,
53
],
[
191,
197
],
[
419,
425
]
],
[
[
59,
78
]
],
[
[
287,
306
]
]
] |
class MenuItem(object):
TEXT_NAME = 'name'
TEXT_URL = 'url_name'
TEXT_SUBMENU = 'submenu'
def __init__(self, name, url=None, *args):
super(MenuItem, self).__init__()
self.name = name
self.url = url
self.url_args = args
self.sub_menu = []
def add_sub_menu_ite... | [
[
[
6,
14
],
[
164,
172
]
],
[
[
755,
758
]
]
] |
import os
import time
import traceback
# import functools
def getobj(s):
return open(s, "r", encoding='utf-8').read()
def getobjs(s):
objs = []
fs = os.listdir(s)
for f in fs:
absf = os.path.join(s, f)
if os.path.isfile(absf) and os.path.splitext(f)[1] == '.py':
objs.append(absf)
elif ... | [
[
[
7,
9
],
[
168,
170
],
[
207,
209
],
[
232,
234
],
[
257,
259
],
[
320,
322
],
[
554,
556
],
[
570,
572
],
[
586,
588
],
[
... |
import os
import tensorflow as tf
import numpy as np
import pandas as pd
from sklearn.utils import check_random_state
from skbio.stats.composition import clr_inv as softmax
from biom import Table
from patsy import dmatrix
def random_multinomial_model(num_samples, num_features,
reps=1,
... | [
[
[
7,
9
],
[
5904,
5906
]
],
[
[
17,
33
],
[
6057,
6059
],
[
6092,
6094
]
],
[
[
41,
52
],
[
1756,
1758
],
[
1767,
1769
],
[
1860,
... |
# This file is part of spot_motion_monitor.
#
# Developed for LSST System Integration, Test and Commissioning.
#
# See the LICENSE file at the top-level directory of this distribution
# for details of code ownership.
#
# Use of this source code is governed by a 3-clause BSD-style
# license that can be found in the LICE... | [
[
[
338,
349
],
[
1676,
1678
]
],
[
[
357,
363
],
[
1709,
1715
],
[
2124,
2130
]
],
[
[
420,
434
],
[
1178,
1192
],
[
2004,
2018
]
],
[
[
... |
# Copyright (C) 2016-Today: Odoo Community Association (OCA)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import _, api, fields, models
from odoo.tools import html_sanitize
class OdooModule(models.Model):
_inherit = "a... | [
[
[
209,
210
],
[
4632,
4633
]
],
[
[
212,
215
],
[
2884,
2887
],
[
3325,
3328
],
[
3866,
3869
],
[
4688,
4691
],
[
4966,
4969
],
[
5148,
... |
import sys
import math
import os
import torch
import torchvision
import numpy as np
from pkg_resources import resource_stream
def interpolate1d(x, values, tangents):
'''
Returns:
Returns the interpolated or extrapolated values for each query point,
depending on whether or not the query lies w... | [
[
[
7,
10
]
],
[
[
18,
22
]
],
[
[
30,
32
],
[
1980,
1982
],
[
2020,
2022
]
],
[
[
41,
46
],
[
369,
374
],
[
399,
404
],
[
434,
... |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | [
[
[
900,
902
],
[
3063,
3065
]
],
[
[
910,
913
],
[
2450,
2453
],
[
2581,
2584
],
[
3362,
3365
],
[
6076,
6079
],
[
6137,
6140
],
[
7219,
... |
"""Tests for py. for S2201"""
import csv
import json
import os
import tempfile
import sys
import unittest
_CODEDIR = os.path.dirname(os.path.realpath(__file__))
sys.path.insert(1, os.path.join(_CODEDIR, '.'))
from .process import *
_FEATURES = os.path.join(_CODEDIR, 'features.json')
_STAT_VAR_LIST = os.path.join(_C... | [
[
[
38,
41
],
[
2229,
2232
]
],
[
[
49,
53
],
[
583,
587
],
[
1753,
1757
],
[
2713,
2717
]
],
[
[
61,
63
],
[
119,
121
],
[
135,
137... |
from utils.utils import validate_parameters
get_news_query_schema = {
"from": {
"type": "integer",
'coerce': int,
"min": 0,
"max": 10000,
"required": False,
"default": 0
},
"limit": {
"type": "integer",
'coerce': int,
"min": 0,
... | [
[
[
24,
43
],
[
560,
579
]
],
[
[
45,
66
],
[
601,
622
]
],
[
[
475,
491
]
]
] |
import hp
from pathlib import Path
import numpy as np
from tqdm import tqdm
import librosa
import torch
import librosa.filters
import numpy as np
import scipy
from random import randint
from os import makedirs
def load_wav(path, sample_rate):
return librosa.core.load(path, sr=sample_rate)[0]
def save_wav(wav, p... | [
[
[
7,
9
],
[
763,
765
],
[
795,
797
]
],
[
[
30,
34
]
],
[
[
42,
53
]
],
[
[
71,
75
],
[
1139,
1143
]
],
[
[
83,
90
]
],
[
[
... |
# Copyright Contributors to the Open Shading Language project.
# SPDX-License-Identifier: BSD-3-Clause
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
#!/usr/bin/python
outputs = [ "out.exr" ]
command = testrender("-r 320 240 -aa 4 material-layer.xml out.exr")
| [
[
[
190,
197
]
],
[
[
214,
221
]
]
] |
### $Id: admin.py,v 1.5 2017/12/18 09:12:51 muntaza Exp $
from django.contrib import admin
from umum.models import Provinsi, Kabupaten, LokasiBidang, SKPD, SUBSKPD, KodeBarang, HakTanah, SatuanBarang, KeadaanBarang, SKPenghapusan, MutasiBerkurang, JenisPemanfaatan, AsalUsul, Tahun, GolonganBarang, Tanah, KontrakTanah,... | [
[
[
86,
91
],
[
7093,
7098
],
[
7142,
7147
],
[
7209,
7214
],
[
7272,
7277
],
[
7331,
7336
],
[
12234,
12239
],
[
12301,
12306
],
[
12374,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.