hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f71afbd2d238f05fc62377a102459dbebc72d784
2,830
py
Python
rdmo/core/management/commands/make_theme.py
m6121/rdmo
db3990c7525138c6ce9634fc3e5b6b8ee9b915c8
[ "Apache-2.0" ]
77
2016-08-09T11:40:20.000Z
2022-03-06T11:03:26.000Z
rdmo/core/management/commands/make_theme.py
m6121/rdmo
db3990c7525138c6ce9634fc3e5b6b8ee9b915c8
[ "Apache-2.0" ]
377
2016-07-01T13:59:36.000Z
2022-03-30T13:53:19.000Z
rdmo/core/management/commands/make_theme.py
m6121/rdmo
db3990c7525138c6ce9634fc3e5b6b8ee9b915c8
[ "Apache-2.0" ]
47
2016-06-23T11:32:19.000Z
2022-03-01T11:34:37.000Z
from shutil import copyfile from pathlib import Path from django.apps import apps from django.conf import settings from django.core.management.base import BaseCommand class Command(BaseCommand): def setup(self, options): self.theme_name = options['name'] self.theme_path = Path(options['name']) ...
37.733333
127
0.608834
from shutil import copyfile from pathlib import Path from django.apps import apps from django.conf import settings from django.core.management.base import BaseCommand class Command(BaseCommand): def setup(self, options): self.theme_name = options['name'] self.theme_path = Path(options['name']) ...
true
true
f71afbdf559edc30ab16fc96de12394ee0fbf228
1,115
py
Python
boards/tests/test_view_boards.py
pydjdev78/abc-for-app
a7b9852f1e51f2e901fe00092931a1e8a2bca913
[ "MIT" ]
4
2018-12-25T13:56:18.000Z
2019-12-22T16:04:50.000Z
boards/tests/test_view_boards.py
bvermeulen/Django
e4ef21c2f1fb7d026207c25bd443252c6df354bf
[ "MIT" ]
15
2019-12-10T06:22:19.000Z
2022-03-11T23:46:49.000Z
boards/tests/test_view_boards.py
pydjdev78/abc-for-app
a7b9852f1e51f2e901fe00092931a1e8a2bca913
[ "MIT" ]
2
2021-02-16T18:52:19.000Z
2021-03-30T16:40:46.000Z
from django.contrib.auth.models import User from django.urls import reverse, resolve from django.test import TestCase from ..views import BoardListView from ..models import Board class BoardsTests(TestCase): def setUp(self): username = 'joe' password = '123' _ = User.objects.create_user(us...
38.448276
86
0.69148
from django.contrib.auth.models import User from django.urls import reverse, resolve from django.test import TestCase from ..views import BoardListView from ..models import Board class BoardsTests(TestCase): def setUp(self): username = 'joe' password = '123' _ = User.objects.create_user(us...
true
true
f71afc8fa1cfc528ee34eb6345a7ce015abf36d4
10,281
py
Python
test/test_praat.py
hadware/pympi
f7ee43dff7e809395bd097849d2e7bc6e602096b
[ "MIT" ]
1
2019-11-09T20:33:14.000Z
2019-11-09T20:33:14.000Z
test/test_praat.py
git-em/pympi
ad5e52b15979b09ea43df5e25dcf1c5b280e99fb
[ "MIT" ]
null
null
null
test/test_praat.py
git-em/pympi
ad5e52b15979b09ea43df5e25dcf1c5b280e99fb
[ "MIT" ]
null
null
null
#!/bin/env python # -*- coding: utf-8 -*- import unittest import tempfile import os from pympi.Praat import TextGrid class PraatTest(unittest.TestCase): def setUp(self): self.tg = TextGrid(xmax=20) self.maxdiff = None # Test all the Praat.TextGrid functions def test_sort_tiers(self): ...
37.797794
77
0.563661
import unittest import tempfile import os from pympi.Praat import TextGrid class PraatTest(unittest.TestCase): def setUp(self): self.tg = TextGrid(xmax=20) self.maxdiff = None def test_sort_tiers(self): self.tg.add_tier('t2') self.tg.add_tier('t1') self.tg.add_tier...
true
true
f71afce939f7d6088496f8152b5131beafd2e97c
27,561
py
Python
cbre/cbre_net.py
jameszhou-gl/CBRE
53c952e0afc74518fc4223f0f20881336df20f95
[ "Apache-2.0" ]
null
null
null
cbre/cbre_net.py
jameszhou-gl/CBRE
53c952e0afc74518fc4223f0f20881336df20f95
[ "Apache-2.0" ]
null
null
null
cbre/cbre_net.py
jameszhou-gl/CBRE
53c952e0afc74518fc4223f0f20881336df20f95
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf import numpy as np from cbre.util import * class CBRENet(object): """ cbre_net implements the cycly-balanced representation learning for counterfactual inference The network is implemented as a tensorflow graph. The class constructor creates an object containing relevant TF no...
48.43761
128
0.532274
import tensorflow as tf import numpy as np from cbre.util import * class CBRENet(object): def __init__(self, x, t, y_, p_t, z_norm, flags, r_alpha, r_lambda, r_beta, do_in, do_out, data_x_dim): self.variables = {} self.wd_loss = 0 if flags.nonlin.lower() == 'elu': se...
true
true
f71afe637d8afd637eaa9306cb3f27585ad52570
887
py
Python
setup.py
debdutgoswami/sorting-visualizer
e39e805acf22339b8ee06f8c8cd483e9c03ba3a4
[ "MIT" ]
3
2020-01-07T15:47:32.000Z
2020-09-13T14:05:32.000Z
setup.py
debdutgoswami/sorting-visualizer
e39e805acf22339b8ee06f8c8cd483e9c03ba3a4
[ "MIT" ]
3
2020-10-04T18:03:36.000Z
2020-10-08T07:13:40.000Z
setup.py
debdutgoswami/sorting-visualizer
e39e805acf22339b8ee06f8c8cd483e9c03ba3a4
[ "MIT" ]
3
2020-10-04T18:15:54.000Z
2021-01-20T19:43:49.000Z
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="sorting_visualizer", version="1.0", author="Debdut Goswami", author_email="debdutgoswami@gmail.com", description="A package to visualize various sorting algorithms.", long_description=...
32.851852
93
0.67531
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="sorting_visualizer", version="1.0", author="Debdut Goswami", author_email="debdutgoswami@gmail.com", description="A package to visualize various sorting algorithms.", long_description=...
true
true
f71affe80caeb8141a00993c2bdfd94c37876974
383
py
Python
scripts/get_repos.py
Ais105/course_project
a4ea3991756be2d12ae3fef9db6956f9d09c0c07
[ "MIT" ]
null
null
null
scripts/get_repos.py
Ais105/course_project
a4ea3991756be2d12ae3fef9db6956f9d09c0c07
[ "MIT" ]
null
null
null
scripts/get_repos.py
Ais105/course_project
a4ea3991756be2d12ae3fef9db6956f9d09c0c07
[ "MIT" ]
1
2020-02-18T20:56:57.000Z
2020-02-18T20:56:57.000Z
import os from github_client.client import GitHubClient from utils.painter import paint if __name__ == '__main__': user = os.environ['user_name'] password = os.environ['user_password'] client = GitHubClient(user, password) client.connect() repositories = client.get_repositories() user = client....
29.461538
51
0.718016
import os from github_client.client import GitHubClient from utils.painter import paint if __name__ == '__main__': user = os.environ['user_name'] password = os.environ['user_password'] client = GitHubClient(user, password) client.connect() repositories = client.get_repositories() user = client....
true
true
f71b00645a1360df4f8b7496608b98342bb43f7f
8,243
py
Python
gym_acnportal/gym_acnsim/envs/tests/test_action_spaces.py
caltech-netlab/gym-acnportal
cacd2e4aa9159a3bf7f0b8e3db2dbb0832d76e46
[ "BSD-3-Clause" ]
null
null
null
gym_acnportal/gym_acnsim/envs/tests/test_action_spaces.py
caltech-netlab/gym-acnportal
cacd2e4aa9159a3bf7f0b8e3db2dbb0832d76e46
[ "BSD-3-Clause" ]
3
2021-04-28T14:43:32.000Z
2021-04-28T14:58:04.000Z
gym_acnportal/gym_acnsim/envs/tests/test_action_spaces.py
sunash/gym-acnportal
cacd2e4aa9159a3bf7f0b8e3db2dbb0832d76e46
[ "BSD-3-Clause" ]
1
2020-05-12T19:13:51.000Z
2020-05-12T19:13:51.000Z
# coding=utf-8 """ Tests for SimAction and action space functions. """ import unittest from typing import Callable, Dict, List, Any from unittest.mock import create_autospec import numpy as np from gym import Space from ..action_spaces import ( SimAction, single_charging_schedule, zero_centered_single_cha...
37.298643
86
0.626592
import unittest from typing import Callable, Dict, List, Any from unittest.mock import create_autospec import numpy as np from gym import Space from ..action_spaces import ( SimAction, single_charging_schedule, zero_centered_single_charging_schedule, ) from ...interfaces import GymTrainedInterface clas...
true
true
f71b01275c21a9328c6c1e5ce44454451a5dbe4c
8,256
py
Python
docs/conf.py
cic79/django-1.6-fine-uploader
14ed9ca3e01ed9680760368da7c277aedb8dfde2
[ "MIT" ]
36
2017-02-10T18:39:03.000Z
2022-03-23T19:52:38.000Z
docs/conf.py
cic79/django-1.6-fine-uploader
14ed9ca3e01ed9680760368da7c277aedb8dfde2
[ "MIT" ]
9
2017-02-11T20:33:31.000Z
2019-04-12T19:02:19.000Z
docs/conf.py
cic79/django-1.6-fine-uploader
14ed9ca3e01ed9680760368da7c277aedb8dfde2
[ "MIT" ]
19
2017-03-19T23:54:05.000Z
2020-09-02T14:42:57.000Z
# -*- coding: utf-8 -*- # # complexity documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # ...
32.376471
82
0.721294
import sys, os cwd = os.getcwd() parent = os.path.dirname(cwd) sys.path.append(parent) import django_fine_uploader extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'django_fine_uploade...
true
true
f71b01c4adc02f98e92a5b0a74684be8020686f2
397
py
Python
diploma/urls.py
taras-ua/diplomawork
c7540d5c674194ec0da965be18bd3becaf69d5f3
[ "Apache-2.0" ]
1
2015-05-08T09:07:06.000Z
2015-05-08T09:07:06.000Z
diploma/urls.py
taras-ua/diplomawork
c7540d5c674194ec0da965be18bd3becaf69d5f3
[ "Apache-2.0" ]
null
null
null
diploma/urls.py
taras-ua/diplomawork
c7540d5c674194ec0da965be18bd3becaf69d5f3
[ "Apache-2.0" ]
null
null
null
from django.conf import settings from django.conf.urls import patterns, url # from django.contrib import admin urlpatterns = patterns('', url(r'^$', 'app.views.home', name='home'), url(r'^graph/$', 'app.views.graph', name='graph'), url(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root'...
36.090909
104
0.662469
from django.conf import settings from django.conf.urls import patterns, url urlpatterns = patterns('', url(r'^$', 'app.views.home', name='home'), url(r'^graph/$', 'app.views.graph', name='graph'), url(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}), )
true
true
f71b01e05fff8dd74f109eed0f8a0d197aea5341
2,498
py
Python
datasets/readers/ccpd.py
ckxy/part-of-hitogata
76402d48a336fcd964d0e64bb01d959e8f07f296
[ "MIT" ]
null
null
null
datasets/readers/ccpd.py
ckxy/part-of-hitogata
76402d48a336fcd964d0e64bb01d959e8f07f296
[ "MIT" ]
null
null
null
datasets/readers/ccpd.py
ckxy/part-of-hitogata
76402d48a336fcd964d0e64bb01d959e8f07f296
[ "MIT" ]
null
null
null
import os import numpy as np from addict import Dict from PIL import Image from .reader import Reader from .builder import READER __all__ = ['CCPD2019FolderReader'] @READER.register_module() class CCPD2019FolderReader(Reader): def __init__(self, root, **kwargs): super(CCPD2019FolderReader, self).__init_...
36.202899
134
0.502002
import os import numpy as np from addict import Dict from PIL import Image from .reader import Reader from .builder import READER __all__ = ['CCPD2019FolderReader'] @READER.register_module() class CCPD2019FolderReader(Reader): def __init__(self, root, **kwargs): super(CCPD2019FolderReader, self).__init_...
true
true
f71b0315edb287f8456c42472f645c6b7bd59cdc
383
py
Python
app/src/asgi.py
swelanauguste/kingship
d5c302b22383eb769d22f41e69e0c48e638aec92
[ "MIT" ]
5
2022-02-04T19:23:26.000Z
2022-02-26T10:15:25.000Z
src/asgi.py
AnvarKhan/django-rest-api
b2f60bbd7ebcf0977dc13ceffd9a3a4f631a03ee
[ "Apache-2.0" ]
1
2022-01-15T16:22:30.000Z
2022-01-15T16:22:30.000Z
src/asgi.py
AnvarKhan/django-rest-api
b2f60bbd7ebcf0977dc13ceffd9a3a4f631a03ee
[ "Apache-2.0" ]
1
2022-03-31T15:02:47.000Z
2022-03-31T15:02:47.000Z
""" ASGI config for src project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/4.0/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_...
22.529412
78
0.780679
import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'src.settings') application = get_asgi_application()
true
true
f71b0388863894e2666b6a38ce7c0c7eb1c0da2c
462
py
Python
codemate/exceptions.py
DavidMeu/codemate
fcdc7591c8a1cd5922ddab1a3ec7a0dae37576c3
[ "MIT" ]
null
null
null
codemate/exceptions.py
DavidMeu/codemate
fcdc7591c8a1cd5922ddab1a3ec7a0dae37576c3
[ "MIT" ]
null
null
null
codemate/exceptions.py
DavidMeu/codemate
fcdc7591c8a1cd5922ddab1a3ec7a0dae37576c3
[ "MIT" ]
null
null
null
import black class GenerationError(Exception): """Represents an exception while generating the Python syntax""" class PythonSyntaxError(GenerationError): """Represents an exception in the python syntax""" class InputError(GenerationError, black.InvalidInput): """Raised when the generated Python code i...
25.666667
69
0.757576
import black class GenerationError(Exception): class PythonSyntaxError(GenerationError): class InputError(GenerationError, black.InvalidInput): class SaveFileError(GenerationError, OSError):
true
true
f71b0396126fe3f7506f8a4954c971dd92305753
7,390
py
Python
rlkit/samplers/data_collector/path_collector.py
YeeCY/PASF
95e548d365ea5da482c56408539d9a1514ef246b
[ "MIT" ]
4
2021-12-23T20:55:52.000Z
2022-03-14T04:57:02.000Z
rlkit/samplers/data_collector/path_collector.py
YeeCY/PASF
95e548d365ea5da482c56408539d9a1514ef246b
[ "MIT" ]
null
null
null
rlkit/samplers/data_collector/path_collector.py
YeeCY/PASF
95e548d365ea5da482c56408539d9a1514ef246b
[ "MIT" ]
1
2022-01-14T01:32:04.000Z
2022-01-14T01:32:04.000Z
from collections import deque, OrderedDict from functools import partial import numpy as np from rlkit.core.eval_util import create_stats_ordered_dict from rlkit.samplers.data_collector.base import PathCollector from rlkit.samplers.rollout_functions import rollout class ActionAgent(): def __init__(self): ...
31.446809
85
0.600406
from collections import deque, OrderedDict from functools import partial import numpy as np from rlkit.core.eval_util import create_stats_ordered_dict from rlkit.samplers.data_collector.base import PathCollector from rlkit.samplers.rollout_functions import rollout class ActionAgent(): def __init__(self): ...
true
true
f71b041f1c1924df958e173865289e1f39ee38d2
1,367
py
Python
azure/mgmt/network/v2017_06_01/models/effective_network_security_group_list_result.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
azure/mgmt/network/v2017_06_01/models/effective_network_security_group_list_result.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
azure/mgmt/network/v2017_06_01/models/effective_network_security_group_list_result.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
# 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. # C...
34.175
80
0.597659
from msrest.serialization import Model class EffectiveNetworkSecurityGroupListResult(Model): _validation = { 'next_link': {'readonly': True}, } _attribute_map = { 'value': {'key': 'value', 'type': '[EffectiveNetworkSecurityGroup]'}, 'next_link': {'key': 'ne...
true
true
f71b05b697f301dc72ecb335f3b5caf31b92323a
1,766
py
Python
plaidrl/exploration_strategies/ou_strategy.py
charliec443/plaid-rl
2e8fbf389af9efecd41361df80e40e0bf932056d
[ "MIT" ]
null
null
null
plaidrl/exploration_strategies/ou_strategy.py
charliec443/plaid-rl
2e8fbf389af9efecd41361df80e40e0bf932056d
[ "MIT" ]
null
null
null
plaidrl/exploration_strategies/ou_strategy.py
charliec443/plaid-rl
2e8fbf389af9efecd41361df80e40e0bf932056d
[ "MIT" ]
null
null
null
import numpy as np import numpy.random as nr from plaidrl.exploration_strategies.base import RawExplorationStrategy class OUStrategy(RawExplorationStrategy): """ This strategy implements the Ornstein-Uhlenbeck process, which adds time-correlated noise to the actions taken by the deterministic policy. ...
30.448276
81
0.624575
import numpy as np import numpy.random as nr from plaidrl.exploration_strategies.base import RawExplorationStrategy class OUStrategy(RawExplorationStrategy): def __init__( self, action_space, mu=0, theta=0.15, max_sigma=0.3, min_sigma=None, decay_period=10...
true
true
f71b05f85e4726833080015f2927cdaf291362a9
5,561
py
Python
backend/api/tests/expected_data.py
INSRapperswil/nornir-web
458e6b24bc373197044b4b7b5da74f16f93a9459
[ "MIT" ]
2
2021-06-01T08:33:04.000Z
2021-08-20T04:22:39.000Z
backend/api/tests/expected_data.py
INSRapperswil/nornir-web
458e6b24bc373197044b4b7b5da74f16f93a9459
[ "MIT" ]
null
null
null
backend/api/tests/expected_data.py
INSRapperswil/nornir-web
458e6b24bc373197044b4b7b5da74f16f93a9459
[ "MIT" ]
null
null
null
expected_inventory_list = { 'count': 2, 'results': [{'detail': 'http://testserver/api/inventories/1/', 'groups_file': 'web_nornir/nornir_config/example_config/groups.yaml', 'hosts_file': 'web_nornir/nornir_config/example_config/hosts.yaml', 'id': 1, ...
41.81203
87
0.420428
expected_inventory_list = { 'count': 2, 'results': [{'detail': 'http://testserver/api/inventories/1/', 'groups_file': 'web_nornir/nornir_config/example_config/groups.yaml', 'hosts_file': 'web_nornir/nornir_config/example_config/hosts.yaml', 'id': 1, ...
true
true
f71b0609c2bed09adba0e74d664508aaf13cf106
506
py
Python
data/scripts/templates/object/tangible/item/quest/force_sensitive/shared_fs_craft_puzzle_decryption_chip.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/tangible/item/quest/force_sensitive/shared_fs_craft_puzzle_decryption_chip.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/tangible/item/quest/force_sensitive/shared_fs_craft_puzzle_decryption_chip.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/item/quest/force_sensitive/shared_fs_craft_puzzle_decryption_chip.if...
29.764706
106
0.754941
true
true
f71b0616df00ef53eb05436aa01e9020ee471bc6
7,155
py
Python
examples/python-guide/advanced_example.py
sdwivedi/LightGBM
f5ec54fbaca8bd5f72cdecbf755216c6278aafe3
[ "MIT" ]
3
2020-04-01T15:31:10.000Z
2020-04-13T12:30:37.000Z
examples/python-guide/advanced_example.py
sdwivedi/LightGBM
f5ec54fbaca8bd5f72cdecbf755216c6278aafe3
[ "MIT" ]
1
2020-09-01T03:42:10.000Z
2020-09-01T03:42:10.000Z
examples/python-guide/advanced_example.py
sdwivedi/LightGBM
f5ec54fbaca8bd5f72cdecbf755216c6278aafe3
[ "MIT" ]
7
2021-04-20T09:27:54.000Z
2022-03-07T11:41:38.000Z
# coding: utf-8 import json import lightgbm as lgb import pandas as pd import numpy as np from sklearn.metrics import mean_squared_error try: import cPickle as pickle except BaseException: import pickle print('Loading data...') # load or create your dataset df_train = pd.read_csv('../binary_classification/bin...
32.821101
103
0.665409
import json import lightgbm as lgb import pandas as pd import numpy as np from sklearn.metrics import mean_squared_error try: import cPickle as pickle except BaseException: import pickle print('Loading data...') df_train = pd.read_csv('../binary_classification/binary.train', header=None, sep='\t') df_test =...
true
true
f71b069e135a883bde77ccb48cb42ece31feb8eb
5,298
py
Python
zerver/management/commands/backup.py
TylerPham2000/zulip
2e7aaba0dde5517b4a55cb0bd782f009be45e3ba
[ "Apache-2.0" ]
3
2019-02-03T20:46:55.000Z
2019-03-04T15:44:28.000Z
zerver/management/commands/backup.py
TylerPham2000/zulip
2e7aaba0dde5517b4a55cb0bd782f009be45e3ba
[ "Apache-2.0" ]
10
2018-11-26T23:16:45.000Z
2019-02-18T23:17:03.000Z
zerver/management/commands/backup.py
TylerPham2000/zulip
2e7aaba0dde5517b4a55cb0bd782f009be45e3ba
[ "Apache-2.0" ]
2
2021-07-02T14:15:24.000Z
2021-08-16T12:31:49.000Z
import os import re import tempfile from argparse import ArgumentParser, RawTextHelpFormatter from typing import Any from django.conf import settings from django.db import connection from django.utils.timezone import now as timezone_now from scripts.lib.zulip_tools import TIMESTAMP_FORMAT, parse_os_release, run from ...
38.391304
94
0.495281
import os import re import tempfile from argparse import ArgumentParser, RawTextHelpFormatter from typing import Any from django.conf import settings from django.db import connection from django.utils.timezone import now as timezone_now from scripts.lib.zulip_tools import TIMESTAMP_FORMAT, parse_os_release, run from ...
true
true
f71b06a727f087f2bc7415f3706874d40d893939
92
py
Python
arvestust/serializers/mixins/__init__.py
lehvitus/arvestust
2d508317b744eaf12a643a398ff95723893a046a
[ "BSD-3-Clause" ]
1
2021-09-17T23:45:27.000Z
2021-09-17T23:45:27.000Z
arvestust/serializers/mixins/__init__.py
lehvitus/arvestust
2d508317b744eaf12a643a398ff95723893a046a
[ "BSD-3-Clause" ]
3
2020-07-25T05:40:54.000Z
2020-08-11T04:01:19.000Z
arvestust/serializers/mixins/__init__.py
lehvitus/arvestust
2d508317b744eaf12a643a398ff95723893a046a
[ "BSD-3-Clause" ]
null
null
null
# arvestust:serializers:mixins from .arvestust_record import ArvestustRecordSerializerMixin
30.666667
60
0.891304
from .arvestust_record import ArvestustRecordSerializerMixin
true
true
f71b08cb676579ac4fac189d7b267ecde83114fa
784
py
Python
secret.py
nora0706/gcp_site
1be5df86f239112e485cb6a089abf14622fd6b55
[ "MIT" ]
null
null
null
secret.py
nora0706/gcp_site
1be5df86f239112e485cb6a089abf14622fd6b55
[ "MIT" ]
null
null
null
secret.py
nora0706/gcp_site
1be5df86f239112e485cb6a089abf14622fd6b55
[ "MIT" ]
null
null
null
import os from google.cloud import secretmanager class Secret: def __init__(self): # Create the Secret Manager client. self.client = secretmanager.SecretManagerServiceClient() self.project_id = os.getenv('GOOGLE_CLOUD_PROJECT') def get_secret(self, secret_id): # Build the pare...
34.086957
80
0.678571
import os from google.cloud import secretmanager class Secret: def __init__(self): self.client = secretmanager.SecretManagerServiceClient() self.project_id = os.getenv('GOOGLE_CLOUD_PROJECT') def get_secret(self, secret_id): name = f"projects/{self.project_id}/secret...
true
true
f71b08ee83709fcec57f27b82915c939fb73d449
1,341
py
Python
tag_generator.py
TREYWANGCQU/blog.reaticle.com
6caa7cdecdb527c8dec0002d0e431632b9823376
[ "CC0-1.0" ]
1
2021-07-24T16:54:05.000Z
2021-07-24T16:54:05.000Z
tag_generator.py
TREYWANGCQU/treywangcqu.github.io
6caa7cdecdb527c8dec0002d0e431632b9823376
[ "CC0-1.0" ]
null
null
null
tag_generator.py
TREYWANGCQU/treywangcqu.github.io
6caa7cdecdb527c8dec0002d0e431632b9823376
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python ''' tag_generator.py Copyright 2017 Long Qian Contact: lqian8@jhu.edu This script creates tags for your Jekyll blog hosted by Github page. No plugins required. ''' import glob import os post_dir = '_posts/' tag_dir = 'tag/' filenames = glob.glob(post_dir + '*md') total_tags = [] for filename ...
23.946429
109
0.56525
import glob import os post_dir = '_posts/' tag_dir = 'tag/' filenames = glob.glob(post_dir + '*md') total_tags = [] for filename in filenames: f = open(filename, 'r', encoding='utf8') crawl = False for line in f: if crawl: current_tags = line.strip().split() ...
true
true
f71b09215d4861e1ba4d13dd94a6b1b30cfd4265
950
py
Python
checkenv.py
SmaleZ/vcl_diayn
b2c47a681675b405d2011bc4a43c3914f3af4ecc
[ "MIT" ]
null
null
null
checkenv.py
SmaleZ/vcl_diayn
b2c47a681675b405d2011bc4a43c3914f3af4ecc
[ "MIT" ]
null
null
null
checkenv.py
SmaleZ/vcl_diayn
b2c47a681675b405d2011bc4a43c3914f3af4ecc
[ "MIT" ]
null
null
null
from env_wrapper import DIAYN_Skill_Wrapper from stable_baselines3 import SAC from stable_baselines3.common.env_checker import check_env import malmoenv import gym from pathlib import Path xml = Path('/home/zilizhang/DIAYN/mobchase_single_agent.xml').read_text() env = malmoenv.make() env.init(xml, 9000) total_timeste...
27.142857
73
0.709474
from env_wrapper import DIAYN_Skill_Wrapper from stable_baselines3 import SAC from stable_baselines3.common.env_checker import check_env import malmoenv import gym from pathlib import Path xml = Path('/home/zilizhang/DIAYN/mobchase_single_agent.xml').read_text() env = malmoenv.make() env.init(xml, 9000) total_timeste...
true
true
f71b0955c31f832ac1f4829e34136ad342dd11b3
11,350
py
Python
hoomd/md/charge.py
PetersResearchGroup/PCND
584768cc683a6df0152ead69b567d05b781aab2b
[ "BSD-3-Clause" ]
null
null
null
hoomd/md/charge.py
PetersResearchGroup/PCND
584768cc683a6df0152ead69b567d05b781aab2b
[ "BSD-3-Clause" ]
null
null
null
hoomd/md/charge.py
PetersResearchGroup/PCND
584768cc683a6df0152ead69b567d05b781aab2b
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2009-2017 The Regents of the University of Michigan # This file is part of the HOOMD-blue project, released under the BSD 3-Clause License. # Maintainer: joaander / All Developers are free to add commands for new features R""" Electrostatic potentials. Charged interactions are usually long ranged, an...
40.974729
134
0.628458
from hoomd.md import force; from hoomd import _hoomd from hoomd.md import _md from hoomd.md import pair; from hoomd.md import nlist as nl import hoomd; import math; import sys; from math import sqrt class pppm(force._force): def __init__(self, group, nlist): hoomd.util.print_status_line(); ...
true
true
f71b09b86f70b649fd3f792fbe2c687f37f5e62d
3,101
py
Python
predict.py
afonchikk/Audio-Classification
6acc7015ec847a64338f6300dca608a0752ba554
[ "MIT" ]
null
null
null
predict.py
afonchikk/Audio-Classification
6acc7015ec847a64338f6300dca608a0752ba554
[ "MIT" ]
null
null
null
predict.py
afonchikk/Audio-Classification
6acc7015ec847a64338f6300dca608a0752ba554
[ "MIT" ]
null
null
null
from tensorflow.keras.models import load_model from clean import downsample_mono, envelope from kapre.time_frequency import STFT, Magnitude, ApplyFilterbank, MagnitudeToDecibel from sklearn.preprocessing import LabelEncoder import numpy as np from glob import glob import argparse import os import pandas as pd from tqdm...
42.479452
90
0.609158
from tensorflow.keras.models import load_model from clean import downsample_mono, envelope from kapre.time_frequency import STFT, Magnitude, ApplyFilterbank, MagnitudeToDecibel from sklearn.preprocessing import LabelEncoder import numpy as np from glob import glob import argparse import os import pandas as pd from tqdm...
true
true
f71b09c92a4cd91f0806d99eac65622c1baec8ea
9,692
py
Python
simglucose/controller/PaperController.py
electr0de/APControllerProjectGit
141ac08e716d6ac8cebe7b144b744744024d8939
[ "MIT" ]
null
null
null
simglucose/controller/PaperController.py
electr0de/APControllerProjectGit
141ac08e716d6ac8cebe7b144b744744024d8939
[ "MIT" ]
null
null
null
simglucose/controller/PaperController.py
electr0de/APControllerProjectGit
141ac08e716d6ac8cebe7b144b744744024d8939
[ "MIT" ]
null
null
null
from functools import partial from pprint import pprint import matplotlib.pyplot as plt # import test2 from simglucose.controller.base import Controller #from datetime import datetime, timedelta, time import numpy as np import math percent_value = 0.05 sign = lambda x: math.copysign(1, x) normalize_f = lambda x: (x...
35.501832
119
0.596574
from functools import partial from pprint import pprint import matplotlib.pyplot as plt from simglucose.controller.base import Controller import numpy as np import math percent_value = 0.05 sign = lambda x: math.copysign(1, x) normalize_f = lambda x: (x - 39) / (600 - 39) class PaperRLController(Controller): ...
true
true
f71b09cc7eff04c4f945a4c71943c706e084229f
43,925
py
Python
benchmarks/ltl_maxplus/f3/maxplus_20_83.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
3
2021-04-23T23:29:26.000Z
2022-03-23T10:00:30.000Z
benchmarks/ltl_maxplus/f3/maxplus_20_83.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
null
null
null
benchmarks/ltl_maxplus/f3/maxplus_20_83.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
1
2021-11-17T22:02:56.000Z
2021-11-17T22:02:56.000Z
from collections import Iterable from mathsat import msat_term, msat_env from mathsat import msat_make_true, msat_make_false from mathsat import msat_make_constant, msat_declare_function from mathsat import msat_get_rational_type from mathsat import msat_make_and as _msat_make_and from mathsat import msat_make_or as _...
54.02829
305
0.507388
from collections import Iterable from mathsat import msat_term, msat_env from mathsat import msat_make_true, msat_make_false from mathsat import msat_make_constant, msat_declare_function from mathsat import msat_get_rational_type from mathsat import msat_make_and as _msat_make_and from mathsat import msat_make_or as _...
true
true
f71b0aee44ad99983b9dca55c4966839e2bc48a0
724
py
Python
cogs/meme.py
toxic3918/fiirrd-bot
3005fe4941a24cd5c5e496c67ce90323ccba8d08
[ "MIT" ]
null
null
null
cogs/meme.py
toxic3918/fiirrd-bot
3005fe4941a24cd5c5e496c67ce90323ccba8d08
[ "MIT" ]
null
null
null
cogs/meme.py
toxic3918/fiirrd-bot
3005fe4941a24cd5c5e496c67ce90323ccba8d08
[ "MIT" ]
null
null
null
import discord from discord.ext import commands import aiohttp import random class Meme(commands.Cog): def __init__(self, client): self.client = client @commands.command() async def meme(self, ctx): async with aiohttp.ClientSession() as cs: async with cs.get("https://www.red...
27.846154
100
0.614641
import discord from discord.ext import commands import aiohttp import random class Meme(commands.Cog): def __init__(self, client): self.client = client @commands.command() async def meme(self, ctx): async with aiohttp.ClientSession() as cs: async with cs.get("https://www.red...
true
true
f71b0d762d4dc64602e981f1eb7b945440962f2b
512
py
Python
Client/setup.py
KostasPakas17/RSPET
de4356e40d803a7c224e2c919cac6a2d6c0a330f
[ "MIT" ]
289
2016-03-15T21:48:09.000Z
2022-03-16T23:04:11.000Z
Client/setup.py
crypticterminal/RSPET
de4356e40d803a7c224e2c919cac6a2d6c0a330f
[ "MIT" ]
39
2016-04-30T10:14:29.000Z
2017-10-23T21:08:10.000Z
Client/setup.py
crypticterminal/RSPET
de4356e40d803a7c224e2c919cac6a2d6c0a330f
[ "MIT" ]
115
2016-03-15T20:25:57.000Z
2021-11-08T23:49:31.000Z
''' Written for DigitalOcean's Hacktoberfest! Requires cx_Freeze and must be built on Windows :( Unfortunately, neither cx_Freeze nor py2exe support cross platform compilation thus, this particular solution was set into motion ''' import sys from cx_Freeze import setup, Executable setup( name = "...
28.444444
79
0.701172
import sys from cx_Freeze import setup, Executable setup( name = "RSPET Test", version = "0.1", description = "A Test Executable", executables = [Executable("rspet_client.py", base = "Win32GUI")])
true
true
f71b0e90747b4d9d2219b1202a357213e814bbef
6,923
py
Python
heron/tools/cli/src/python/execute.py
pjfanning/incubator-heron
7db7c24733bd7e66ecfe704ea65f864d1fff4adc
[ "Apache-2.0" ]
3,348
2016-05-25T16:04:31.000Z
2018-03-28T17:46:14.000Z
heron/tools/cli/src/python/execute.py
pjfanning/incubator-heron
7db7c24733bd7e66ecfe704ea65f864d1fff4adc
[ "Apache-2.0" ]
1,542
2016-05-25T16:46:44.000Z
2018-03-29T17:30:23.000Z
heron/tools/cli/src/python/execute.py
pjfanning/incubator-heron
7db7c24733bd7e66ecfe704ea65f864d1fff4adc
[ "Apache-2.0" ]
702
2016-05-25T16:07:43.000Z
2018-03-27T06:31:07.000Z
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- # 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 Apach...
38.675978
99
0.707497
import contextlib import os import subprocess import shlex import tarfile import tempfile import traceback from heron.common.src.python.utils.log import Log from heron.tools.cli.src.python.result import SimpleResult, ProcessResult, Status from heron.common.src.python import pex_loader from heron...
true
true
f71b0f0cae9bc62f10f26544cdf87a9d56fde71e
85,110
py
Python
src/full_node/full_node.py
akubera/chia-blockchain
91f038e2193755e2a6ca22e2160e2c8f547c23fe
[ "Apache-2.0" ]
null
null
null
src/full_node/full_node.py
akubera/chia-blockchain
91f038e2193755e2a6ca22e2160e2c8f547c23fe
[ "Apache-2.0" ]
null
null
null
src/full_node/full_node.py
akubera/chia-blockchain
91f038e2193755e2a6ca22e2160e2c8f547c23fe
[ "Apache-2.0" ]
null
null
null
import asyncio import dataclasses import logging import random import time import traceback from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union import aiosqlite from blspy import AugSchemeMPL import src.server.ws_connection as ws # lgtm [py/import-and-import-from] from ...
49.367749
120
0.625814
import asyncio import dataclasses import logging import random import time import traceback from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union import aiosqlite from blspy import AugSchemeMPL import src.server.ws_connection as ws from src.consensus.block_creation impor...
true
true
f71b10389f6b985a22b63f8c11ff239efa2dcf22
767
py
Python
venv/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/__about__.py
realxwx/leetcode-solve
3a7d7d8e92a5fd5fecc347d141a1c532b92e763e
[ "Apache-2.0" ]
null
null
null
venv/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/__about__.py
realxwx/leetcode-solve
3a7d7d8e92a5fd5fecc347d141a1c532b92e763e
[ "Apache-2.0" ]
null
null
null
venv/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/__about__.py
realxwx/leetcode-solve
3a7d7d8e92a5fd5fecc347d141a1c532b92e763e
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 # Author: xiaoweixiang # This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function __all__ = [ "__title__"...
30.68
79
0.744459
from __future__ import absolute_import, division, print_function __all__ = [ "__title__", "__summary__", "__uri__", "__version__", "__author__", "__email__", "__license__", "__copyright__", ] __title__ = "packaging" __summary__ = "Core utilities for Python packages" __uri__ = "https://github.com/pypa/pa...
true
true
f71b11050a7b8a94c7408d4babb5e1fedbe1941d
4,418
py
Python
models/rdn.py
0Miquel/LIIF-temporal
b992cb87cb9bdeba6d4c9bc3960b36ba52a1ba75
[ "BSD-3-Clause" ]
1
2021-08-09T22:43:22.000Z
2021-08-09T22:43:22.000Z
models/rdn.py
0Miquel/LIIF-temporal
b992cb87cb9bdeba6d4c9bc3960b36ba52a1ba75
[ "BSD-3-Clause" ]
null
null
null
models/rdn.py
0Miquel/LIIF-temporal
b992cb87cb9bdeba6d4c9bc3960b36ba52a1ba75
[ "BSD-3-Clause" ]
null
null
null
# Residual Dense Network for Image Super-Resolution # https://arxiv.org/abs/1802.08797 # modified from: https://github.com/thstkdgus35/EDSR-PyTorch from argparse import Namespace import torch import torch.nn as nn from models import register class RDB_Conv(nn.Module): def __init__(self, inChannels...
32.725926
92
0.51675
from argparse import Namespace import torch import torch.nn as nn from models import register class RDB_Conv(nn.Module): def __init__(self, inChannels, growRate, kSize=3): super(RDB_Conv, self).__init__() Cin = inChannels G = growRate self.conv = nn.Sequential(...
true
true
f71b1176d7d60f57abf30cc89fa766a5c19610b3
588
py
Python
oauth2/socialapp.py
DemocracyLab/DemocracyLab-CivicTechExchange
eec4715373679259318ff6c384c815acebf0831f
[ "MIT" ]
64
2017-09-30T16:23:43.000Z
2022-03-30T23:26:50.000Z
oauth2/socialapp.py
DemocracyLab/DemocracyLab-CivicTechExchange
eec4715373679259318ff6c384c815acebf0831f
[ "MIT" ]
339
2017-10-26T06:59:14.000Z
2022-03-10T22:34:29.000Z
oauth2/socialapp.py
DemocracyLab/DemocracyLab-CivicTechExchange
eec4715373679259318ff6c384c815acebf0831f
[ "MIT" ]
58
2017-09-16T17:25:10.000Z
2022-03-04T18:14:02.000Z
""" Decouples SocialApp client credentials from the database """ from django.conf import settings class SocialAppMixin: class Meta: abstract = True # Get credentials to be used by OAuth2Client def get_app(self, request): app = settings.SOCIAL_APPS.get(self.id) from allauth.social...
25.565217
58
0.605442
from django.conf import settings class SocialAppMixin: class Meta: abstract = True def get_app(self, request): app = settings.SOCIAL_APPS.get(self.id) from allauth.socialaccount.models import SocialApp return SocialApp( id=app.get('id'), name='Soci...
true
true
f71b12227f1c54ad2eb63c792a779e62f95046dc
1,353
py
Python
ingredients/schema.py
gtg7784/Graphene-Django
77fbbe54ea940f566da561edc492823ae7cc7643
[ "MIT" ]
1
2021-10-14T01:23:31.000Z
2021-10-14T01:23:31.000Z
ingredients/schema.py
gtg7784/Graphene-Django
77fbbe54ea940f566da561edc492823ae7cc7643
[ "MIT" ]
1
2021-09-22T19:41:41.000Z
2021-09-22T19:41:41.000Z
ingredients/schema.py
gtg7784/Graphene-Django
77fbbe54ea940f566da561edc492823ae7cc7643
[ "MIT" ]
null
null
null
import graphene from graphene_django.types import DjangoObjectType from .models import Category, Ingredient class CategoryType(DjangoObjectType): class Meta: model = Category class IngredientType(DjangoObjectType): class Meta: model = Ingredient class Query(object): category = graphene.Fi...
27.612245
90
0.659276
import graphene from graphene_django.types import DjangoObjectType from .models import Category, Ingredient class CategoryType(DjangoObjectType): class Meta: model = Category class IngredientType(DjangoObjectType): class Meta: model = Ingredient class Query(object): category = graphene.Fi...
true
true
f71b132f36f52a58f2c573303fc3826c3fffb90a
6,341
py
Python
holidays/countries/south_africa.py
Drill-D/python-holidays
f669856d9a441324d66ee3477c4d69a04e0a00ce
[ "MIT" ]
48
2016-11-22T09:18:50.000Z
2018-01-14T14:06:49.000Z
holidays/countries/south_africa.py
Drill-D/python-holidays
f669856d9a441324d66ee3477c4d69a04e0a00ce
[ "MIT" ]
59
2016-12-03T15:52:36.000Z
2018-01-16T09:37:15.000Z
holidays/countries/south_africa.py
Drill-D/python-holidays
f669856d9a441324d66ee3477c4d69a04e0a00ce
[ "MIT" ]
51
2016-11-25T14:53:55.000Z
2018-01-16T09:58:56.000Z
# -*- coding: utf-8 -*- # python-holidays # --------------- # A fast, efficient Python library for generating country, province and state # specific sets of holidays on the fly. It aims to make determining whether a # specific date is a holiday as fast and flexible as possible. # # Authors: dr-prodigy <maurizio....
33.026042
78
0.543763
from datetime import date, datetime from dateutil.easter import easter from dateutil.relativedelta import relativedelta as rd from holidays.constants import FRI, SUN from holidays.constants import ( JAN, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC, ) from ...
true
true
f71b157abd84e0fcedf83134af5ef10acd81bdb3
1,972
py
Python
tests/test_settings.py
Gilnaa/Hydra
4d24863819bdcdd7c757e2dfb8a8996b009521b6
[ "MIT" ]
5
2019-07-11T09:24:29.000Z
2020-10-07T08:11:29.000Z
tests/test_settings.py
Gilnaa/Hydras
4d24863819bdcdd7c757e2dfb8a8996b009521b6
[ "MIT" ]
3
2019-11-05T11:33:30.000Z
2020-08-20T12:15:29.000Z
tests/test_settings.py
Gilnaa/Hydra
4d24863819bdcdd7c757e2dfb8a8996b009521b6
[ "MIT" ]
2
2018-12-17T12:56:53.000Z
2018-12-24T14:09:50.000Z
#!/usr/bin/env python from .utils import * # This struct's endianness is of the "target" class TargetStruct(Struct): a = u16(0xAABB) # while this struct's endianness is always big. class SpecificStruct(Struct): a = u16_be(0xAABB) class SettingsTests(HydrasTestCase): def test_priority(self): s...
40.244898
116
0.712475
from .utils import * class TargetStruct(Struct): a = u16(0xAABB) # while this struct's endianness is always big. class SpecificStruct(Struct): a = u16_be(0xAABB) class SettingsTests(HydrasTestCase): def test_priority(self): s = SpecificStruct() h = TargetStruct() H...
true
true
f71b1592752b5eb648bd828db7dbdcaf6507e648
2,687
py
Python
legocollector/inventory/migrations/0001_initial.py
ericziethen/legocollector
06aa984a5998979e7aa9c59e94a38633d653de55
[ "MIT" ]
1
2020-12-21T22:23:09.000Z
2020-12-21T22:23:09.000Z
legocollector/inventory/migrations/0001_initial.py
ericziethen/legocollector
06aa984a5998979e7aa9c59e94a38633d653de55
[ "MIT" ]
150
2019-08-28T20:20:01.000Z
2020-07-12T07:09:05.000Z
legocollector/inventory/migrations/0001_initial.py
ericziethen/legocollector
06aa984a5998979e7aa9c59e94a38633d653de55
[ "MIT" ]
null
null
null
# Generated by Django 2.2.4 on 2019-09-01 00:56 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
44.783333
166
0.596576
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( ...
true
true
f71b1688f1e13f2ccad8ec2d54fddf589eeb3e82
831
py
Python
src/encoded/tests/test_schema_annotation.py
procha2/encoded
e9f122362b71f3b8641023b8d2d5ad531d3484b7
[ "MIT" ]
102
2015-05-20T01:17:43.000Z
2022-03-07T06:03:55.000Z
src/encoded/tests/test_schema_annotation.py
procha2/encoded
e9f122362b71f3b8641023b8d2d5ad531d3484b7
[ "MIT" ]
901
2015-01-07T23:11:57.000Z
2022-03-18T13:56:12.000Z
src/encoded/tests/test_schema_annotation.py
procha2/encoded
e9f122362b71f3b8641023b8d2d5ad531d3484b7
[ "MIT" ]
65
2015-02-06T23:00:26.000Z
2022-01-22T07:58:44.000Z
import pytest def test_annotation_with_subtype( testapp, submitter_testapp, annotation_dhs, annotation_ccre_2, annotation_dataset ): testapp.patch_json( annotation_dhs['@id'], {'annotation_subtype': 'all'}, status=200) # annotation_subtype can only be submitted with...
29.678571
73
0.649819
import pytest def test_annotation_with_subtype( testapp, submitter_testapp, annotation_dhs, annotation_ccre_2, annotation_dataset ): testapp.patch_json( annotation_dhs['@id'], {'annotation_subtype': 'all'}, status=200) res = testapp.post_json('/annotation', ann...
true
true
f71b16a8b249c28b8c45d7997b87d3e69e8d654b
592
py
Python
server/shserver/Token.py
AsherYang/ThreeLine
351dc8bfd1c0a536ffbf36ce8b1af953cc71f93a
[ "Apache-2.0" ]
1
2017-05-02T10:02:28.000Z
2017-05-02T10:02:28.000Z
server/shserver/Token.py
AsherYang/ThreeLine
351dc8bfd1c0a536ffbf36ce8b1af953cc71f93a
[ "Apache-2.0" ]
null
null
null
server/shserver/Token.py
AsherYang/ThreeLine
351dc8bfd1c0a536ffbf36ce8b1af953cc71f93a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python #-*- coding:utf-8 -*- """ Author: AsherYang Email: 1181830457@qq.com Date: 2017/7/24 """ class Token(): @property def access_token(self): return self.access_token @property def access_token(self, value): self.access_token = value @property def expire_in(...
16.444444
34
0.621622
class Token(): @property def access_token(self): return self.access_token @property def access_token(self, value): self.access_token = value @property def expire_in(self): return self.expire_in @property def expire_in(self, value): self.expire_in =...
true
true
f71b16c4ec2d0b67810f480a086abbd14c87ad42
3,454
py
Python
tempest/api/image/v2/test_images_metadefs_namespaces.py
mail2nsrajesh/tempest
1a3b3dc50b418d3a15839830d7d1ff88c8c76cff
[ "Apache-2.0" ]
1
2020-01-14T03:20:44.000Z
2020-01-14T03:20:44.000Z
tempest/api/image/v2/test_images_metadefs_namespaces.py
mail2nsrajesh/tempest
1a3b3dc50b418d3a15839830d7d1ff88c8c76cff
[ "Apache-2.0" ]
1
2019-08-08T10:36:44.000Z
2019-08-09T05:58:23.000Z
tempest/api/image/v2/test_images_metadefs_namespaces.py
mail2nsrajesh/tempest
1a3b3dc50b418d3a15839830d7d1ff88c8c76cff
[ "Apache-2.0" ]
5
2016-06-24T20:03:52.000Z
2020-02-05T10:14:54.000Z
# Copyright 2015 Red Hat, 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...
44.857143
78
0.689925
from tempest.api.image import base from tempest.lib.common.utils import data_utils from tempest.lib.common.utils import test_utils from tempest.lib import decorators from tempest.lib import exceptions as lib_exc class MetadataNamespacesTest(base.BaseV2ImageTest): @decorators.idempotent_id('319b765...
true
true
f71b16cbd42077bfe153963de61a031de29f4b72
49,097
py
Python
teuthology/task/kernel.py
sunilangadi2/teuthology
d19730ce070d52d0dd5e71443f02a8d1b7912493
[ "MIT" ]
null
null
null
teuthology/task/kernel.py
sunilangadi2/teuthology
d19730ce070d52d0dd5e71443f02a8d1b7912493
[ "MIT" ]
null
null
null
teuthology/task/kernel.py
sunilangadi2/teuthology
d19730ce070d52d0dd5e71443f02a8d1b7912493
[ "MIT" ]
null
null
null
""" Kernel installation task """ import logging import os import re import shlex from io import StringIO from teuthology.util.compat import urljoin from teuthology import misc as teuthology from teuthology.parallel import parallel from teuthology.config import config as teuth_config from teuthology.orchestra import ...
36.915038
109
0.547508
import logging import os import re import shlex from io import StringIO from teuthology.util.compat import urljoin from teuthology import misc as teuthology from teuthology.parallel import parallel from teuthology.config import config as teuth_config from teuthology.orchestra import run from teuthology.exceptions im...
true
true
f71b18b542139a4c825daebbad8c706309282806
5,588
py
Python
tianshou/policy/modelfree/discrete_sac.py
danagi/tianshou
b364f1a26f1b8528b01a445a488160ce2d910a1c
[ "MIT" ]
1
2020-08-25T07:55:52.000Z
2020-08-25T07:55:52.000Z
tianshou/policy/modelfree/discrete_sac.py
q-learning-trader/tianshou
c97aa4065ee8464bd5897bb86f1f81abd8e2cff9
[ "MIT" ]
null
null
null
tianshou/policy/modelfree/discrete_sac.py
q-learning-trader/tianshou
c97aa4065ee8464bd5897bb86f1f81abd8e2cff9
[ "MIT" ]
1
2020-04-25T13:05:21.000Z
2020-04-25T13:05:21.000Z
import torch import numpy as np from torch.distributions import Categorical from typing import Any, Dict, Tuple, Union, Optional from tianshou.policy import SACPolicy from tianshou.data import Batch, ReplayBuffer, to_torch class DiscreteSACPolicy(SACPolicy): """Implementation of SAC for Discrete Action Settings....
37.503356
79
0.607552
import torch import numpy as np from torch.distributions import Categorical from typing import Any, Dict, Tuple, Union, Optional from tianshou.policy import SACPolicy from tianshou.data import Batch, ReplayBuffer, to_torch class DiscreteSACPolicy(SACPolicy): def __init__( self, actor: torch.nn.M...
true
true
f71b19a1735a916e1c2e81907fdea6d406f03d8f
6,275
py
Python
cis-audit.py
flokoe/cis-benchmarks-audit
85d923cbff9ffe6cede964c3bd2f3ea513944c8d
[ "MIT" ]
null
null
null
cis-audit.py
flokoe/cis-benchmarks-audit
85d923cbff9ffe6cede964c3bd2f3ea513944c8d
[ "MIT" ]
null
null
null
cis-audit.py
flokoe/cis-benchmarks-audit
85d923cbff9ffe6cede964c3bd2f3ea513944c8d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This script runs tests on the system to check for compliance against different CIS Benchmarks. No changes are made to system files by this script. Audit only. License: MIT """ from argparse import ArgumentParser from datetime import datetime from time import sleep imp...
38.734568
282
0.637131
from argparse import ArgumentParser from datetime import datetime from time import sleep import json, subprocess, pathlib __author__ = 'Florian Köhler' __version__ = '0.1.0' __license__ = 'MIT' def parse_cli(): parser = ArgumentParser(description='This script runs tests on the system to check for compliance a...
true
true
f71b1ab7a5127da844d3de34669b1e4ea7ec03cf
4,069
py
Python
tests/components/smartthings/test_lock.py
pcaston/core
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
[ "Apache-2.0" ]
1
2021-07-08T20:09:55.000Z
2021-07-08T20:09:55.000Z
tests/components/smartthings/test_lock.py
pcaston/core
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
[ "Apache-2.0" ]
47
2021-02-21T23:43:07.000Z
2022-03-31T06:07:10.000Z
tests/components/smartthings/test_lock.py
OpenPeerPower/core
f673dfac9f2d0c48fa30af37b0a99df9dd6640ee
[ "Apache-2.0" ]
null
null
null
""" Test for the SmartThings lock platform. The only mocking required is of the underlying SmartThings API object so real HTTP calls are not initiated during testing. """ from pysmartthings import Attribute, Capability from pysmartthings.device import Status from openpeerpower.components.lock import DOMAIN as LOCK_DO...
36.330357
88
0.706562
from pysmartthings import Attribute, Capability from pysmartthings.device import Status from openpeerpower.components.lock import DOMAIN as LOCK_DOMAIN from openpeerpower.components.smartthings.const import DOMAIN, SIGNAL_SMARTTHINGS_UPDATE from openpeerpower.config_entries import ConfigEntryState from openpeerpower.c...
true
true
f71b1af96cc4062163b2c26f68ca4f8e5e16759c
21,877
py
Python
scripts/linters/general_purpose_linter.py
ParitoshKabra/oppia
a8945a5ff28fcbe4eaca1e22d99ed4d3e82f2dca
[ "Apache-2.0" ]
2
2022-02-24T14:06:42.000Z
2022-02-24T14:11:05.000Z
scripts/linters/general_purpose_linter.py
ParitoshKabra/oppia
a8945a5ff28fcbe4eaca1e22d99ed4d3e82f2dca
[ "Apache-2.0" ]
null
null
null
scripts/linters/general_purpose_linter.py
ParitoshKabra/oppia
a8945a5ff28fcbe4eaca1e22d99ed4d3e82f2dca
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2020 The Oppia 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 requi...
37.589347
80
0.581341
from __future__ import annotations import os import re from . import js_ts_linter from . import warranted_angular_security_bypasses from .. import build from .. import common from .. import concurrent_task_utils EXCLUDED_PATHS = ( 'third_party/*', 'build/*', '.git/*', '*.pyc', 'CHANGELOG', ...
true
true
f71b1b5dacb5a5c7e4853d46d9e70c5797445611
1,049
py
Python
prxgt/domain/attribute.py
praxigento/teq_test_db_schema_attrs
20ec030dc095c644d22631491e066697203d983d
[ "MIT" ]
null
null
null
prxgt/domain/attribute.py
praxigento/teq_test_db_schema_attrs
20ec030dc095c644d22631491e066697203d983d
[ "MIT" ]
null
null
null
prxgt/domain/attribute.py
praxigento/teq_test_db_schema_attrs
20ec030dc095c644d22631491e066697203d983d
[ "MIT" ]
null
null
null
__author__ = 'Alex Gusev <alex@flancer64.com>' import prxgt.const as const from prxgt.domain.meta.attribute import Attribute as AttributeBase class Attribute(AttributeBase): """ Attribute model contains data. """ def __init__(self, name=None, type_=None, value=None): super(Attribute, self).__...
26.225
75
0.578646
__author__ = 'Alex Gusev <alex@flancer64.com>' import prxgt.const as const from prxgt.domain.meta.attribute import Attribute as AttributeBase class Attribute(AttributeBase): def __init__(self, name=None, type_=None, value=None): super(Attribute, self).__init__(name, type_) self._value = value ...
true
true
f71b1c721a28949ee40ddf327761ea6fcd2fe45b
11,435
py
Python
config/settings/common.py
devermaslinfy/rejot
8c07a42a73be8422f16874684be3b46ab70b5c18
[ "BSD-3-Clause" ]
1
2020-07-23T16:21:44.000Z
2020-07-23T16:21:44.000Z
config/settings/common.py
devermaslinfy/rejot
8c07a42a73be8422f16874684be3b46ab70b5c18
[ "BSD-3-Clause" ]
7
2020-02-12T01:21:01.000Z
2022-03-11T23:25:57.000Z
config/settings/common.py
devermaslinfy/rejot
8c07a42a73be8422f16874684be3b46ab70b5c18
[ "BSD-3-Clause" ]
1
2019-07-27T10:00:01.000Z
2019-07-27T10:00:01.000Z
# -*- coding: utf-8 -*- """ Django settings for roojet project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ from __future__ import absolute_import, unicode_lite...
33.338192
98
0.61784
from __future__ import absolute_import, unicode_literals import environ from decimal import Decimal ROOT_DIR = environ.Path(__file__) - 3 APPS_DIR = ROOT_DIR.path('roojet') env = environ.Env() environ.Env.read_env(ROOT_DIR()+'/.env') DJANGO_APPS = ( 'django.contrib.auth', 'django.contrib.contentty...
true
true
f71b1dc503a1e22e10ad5b8a916812053338361e
3,578
py
Python
appStore/tests.py
Rubensrvsc/Store
ab3a3aea6518b76d9d5de9c1b9e90236def8954d
[ "MIT" ]
null
null
null
appStore/tests.py
Rubensrvsc/Store
ab3a3aea6518b76d9d5de9c1b9e90236def8954d
[ "MIT" ]
null
null
null
appStore/tests.py
Rubensrvsc/Store
ab3a3aea6518b76d9d5de9c1b9e90236def8954d
[ "MIT" ]
null
null
null
from django.test import TestCase from rest_framework.test import APIRequestFactory, APIClient from .models import * from rest_framework import status # Create your tests here. class ProductCategoryTest(TestCase): @classmethod def setUpTestData(cls): ProductCategory.objects.create(name_product_category...
31.663717
81
0.630799
from django.test import TestCase from rest_framework.test import APIRequestFactory, APIClient from .models import * from rest_framework import status class ProductCategoryTest(TestCase): @classmethod def setUpTestData(cls): ProductCategory.objects.create(name_product_category="Infantil") Prod...
true
true
f71b1e2fd58d30c28062d37e9f1ae54392548686
6,411
py
Python
src/datadog_api_client/v1/model/synthetics_trigger_ci_tests_response.py
DataDog/datadog-api-client-python
de2fc57dbde9acf4b8c8eef94ac29911227a62a2
[ "Apache-2.0" ]
32
2021-01-07T15:09:56.000Z
2022-01-30T05:49:23.000Z
src/datadog_api_client/v1/model/synthetics_trigger_ci_tests_response.py
DataDog/datadog-api-client-python
de2fc57dbde9acf4b8c8eef94ac29911227a62a2
[ "Apache-2.0" ]
228
2020-09-03T14:03:54.000Z
2022-03-31T20:16:12.000Z
src/datadog_api_client/v1/model/synthetics_trigger_ci_tests_response.py
DataDog/datadog-api-client-python
de2fc57dbde9acf4b8c8eef94ac29911227a62a2
[ "Apache-2.0" ]
12
2020-09-15T21:36:03.000Z
2022-03-31T17:13:17.000Z
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2019-Present Datadog, Inc. from datadog_api_client.v1.model_utils import ( # noqa: F401 ApiTypeError, Mo...
43.910959
117
0.61644
from datadog_api_client.v1.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, ) def lazy_import(): from datadog_api_client.v1...
true
true
f71b1e406ddf2cb9954d1454378cd13f4b53e7f4
1,801
py
Python
nodes/wind.py
JavierRefuerzo/WeatherFlow
5ea3669edfd7449797cef3184689d6c540383cde
[ "MIT" ]
4
2018-08-26T02:40:09.000Z
2020-06-21T22:59:04.000Z
nodes/wind.py
JavierRefuerzo/WeatherFlow
5ea3669edfd7449797cef3184689d6c540383cde
[ "MIT" ]
9
2018-04-20T15:37:46.000Z
2020-07-15T20:22:31.000Z
nodes/wind.py
JavierRefuerzo/WeatherFlow
5ea3669edfd7449797cef3184689d6c540383cde
[ "MIT" ]
2
2018-09-16T23:13:39.000Z
2021-12-20T16:35:20.000Z
#!/usr/bin/env python3 """ Polyglot v2 node server for WeatherFlow Weather Station data. Copyright (c) 2018,2019 Robert Paauwe """ import polyinterface import sys import time import datetime import urllib3 import json import socket import math import threading LOGGER = polyinterface.LOGGER class WindNode(polyinterfac...
29.52459
79
0.513048
import polyinterface import sys import time import datetime import urllib3 import json import socket import math import threading LOGGER = polyinterface.LOGGER class WindNode(polyinterface.Node): id = 'wind' hint = [1,11,4,0] units = 'metric' drivers = [ {'driver': 'ST', 'value': 0, 'uom'...
true
true
f71b1e9aa887b542b88ff076fa75931ec6dc85c7
2,532
py
Python
cohesity_management_sdk/models/smb_active_file_path.py
nick6655/management-sdk-python
88e792cb83e5c24a22af495b220c145d0c45841d
[ "Apache-2.0" ]
18
2019-09-24T17:35:53.000Z
2022-03-25T08:08:47.000Z
cohesity_management_sdk/models/smb_active_file_path.py
nick6655/management-sdk-python
88e792cb83e5c24a22af495b220c145d0c45841d
[ "Apache-2.0" ]
18
2019-03-29T19:32:29.000Z
2022-01-03T23:16:45.000Z
cohesity_management_sdk/models/smb_active_file_path.py
nick6655/management-sdk-python
88e792cb83e5c24a22af495b220c145d0c45841d
[ "Apache-2.0" ]
16
2019-02-27T06:54:12.000Z
2021-11-16T18:10:24.000Z
# -*- coding: utf-8 -*- # Copyright 2021 Cohesity Inc. import cohesity_management_sdk.models.smb_active_session class SmbActiveFilePath(object): """Implementation of the 'SmbActiveFilePath' model. Specifies a file path in an SMB view that has active sessions and opens. Attributes: active_sessio...
32.461538
133
0.625197
import cohesity_management_sdk.models.smb_active_session class SmbActiveFilePath(object): _names = { "active_sessions":'activeSessions', "file_path":'filePath', "view_id":'viewId', "view_name":'viewName' } def __init__(self, active_sessions=None, ...
true
true
f71b206d98b3712aa33781c5090859c94fbf8680
373
py
Python
source/Objects/XTRA_Solvers_Class.py
afarahi/XTRA
6550b216264abaa3ed705835aca0981f2934e069
[ "MIT" ]
2
2018-11-01T12:38:56.000Z
2019-10-22T07:02:54.000Z
source/Objects/XTRA_Solvers_Class.py
afarahi/XTRA
6550b216264abaa3ed705835aca0981f2934e069
[ "MIT" ]
null
null
null
source/Objects/XTRA_Solvers_Class.py
afarahi/XTRA
6550b216264abaa3ed705835aca0981f2934e069
[ "MIT" ]
null
null
null
class Solvers_Class(): def __init__(self): pass def ProperDistanceTabulate(self, Input_Param, z_max): from Distance_Solver import Proper_Distance_Tabulate Proper_Distance_Tabulate(Input_Param, z_max) def LxTxSolver(self, Halos): from LxTx_Solver import LxTx_Solver ...
23.3125
60
0.691689
class Solvers_Class(): def __init__(self): pass def ProperDistanceTabulate(self, Input_Param, z_max): from Distance_Solver import Proper_Distance_Tabulate Proper_Distance_Tabulate(Input_Param, z_max) def LxTxSolver(self, Halos): from LxTx_Solver import LxTx_Solver ...
true
true
f71b20c6a58525d0ad6e5a5b0ad92dbbdf9f5849
1,599
py
Python
user/tests.py
Vr3n/django_react_cart_system
f6d2572b640f711ff9c7020641051e3f92c3dd59
[ "MIT" ]
null
null
null
user/tests.py
Vr3n/django_react_cart_system
f6d2572b640f711ff9c7020641051e3f92c3dd59
[ "MIT" ]
3
2021-06-18T15:13:46.000Z
2021-06-18T18:24:43.000Z
user/tests.py
Vr3n/django_react_cart_system
f6d2572b640f711ff9c7020641051e3f92c3dd59
[ "MIT" ]
null
null
null
from django.contrib.auth import get_user_model from django.test import TestCase # Create your tests here. class UserManagersTests(TestCase): def test_create_user(self): User = get_user_model() user = User.objects.create_user( email="normal@user.com", password="testing@123") s...
34.76087
70
0.642276
from django.contrib.auth import get_user_model from django.test import TestCase class UserManagersTests(TestCase): def test_create_user(self): User = get_user_model() user = User.objects.create_user( email="normal@user.com", password="testing@123") self.assertEqual(user.emai...
true
true
f71b21a5dd538deb30896fbf0e23be55c42a7ec4
22
py
Python
tsu/__init__.py
KiraDank/tsu
7a2c6508daf6d797e8371acf3b473d0f92cb11c3
[ "MIT" ]
251
2019-08-18T17:19:19.000Z
2022-03-31T20:38:20.000Z
tsu/__init__.py
KiraDank/tsu
7a2c6508daf6d797e8371acf3b473d0f92cb11c3
[ "MIT" ]
37
2019-09-05T08:03:00.000Z
2022-01-27T12:49:50.000Z
tsu/__init__.py
KiraDank/tsu
7a2c6508daf6d797e8371acf3b473d0f92cb11c3
[ "MIT" ]
20
2019-09-01T15:29:56.000Z
2022-01-27T03:03:18.000Z
__version__ = '3.1.2'
11
21
0.636364
__version__ = '3.1.2'
true
true
f71b21c32e28c3f04700fe8235f89c2fac3de98b
3,420
py
Python
ays_api/app.py
Jumpscale/g8cockpit
5e9ede183f77fec4adff9cd038567173b68677f0
[ "Apache-2.0" ]
null
null
null
ays_api/app.py
Jumpscale/g8cockpit
5e9ede183f77fec4adff9cd038567173b68677f0
[ "Apache-2.0" ]
332
2016-05-24T10:51:45.000Z
2021-09-08T12:28:50.000Z
ays_api/app.py
Jumpscale/g8cockpit
5e9ede183f77fec4adff9cd038567173b68677f0
[ "Apache-2.0" ]
1
2016-08-02T07:52:49.000Z
2016-08-02T07:52:49.000Z
from flask import Flask, send_from_directory, make_response, request, send_file, jsonify import werkzeug.exceptions from jose import jwt, exceptions import wtforms_json from .ays import ays_api from .oauth import oauth_api from .webhooks import webhooks_api from .cockpit import cockpit_api from JumpScale import j app...
28.264463
108
0.625146
from flask import Flask, send_from_directory, make_response, request, send_file, jsonify import werkzeug.exceptions from jose import jwt, exceptions import wtforms_json from .ays import ays_api from .oauth import oauth_api from .webhooks import webhooks_api from .cockpit import cockpit_api from JumpScale import j app...
true
true
f71b21ee28dbbf48f0569576807de49f2234149c
3,475
py
Python
include/Node.py
Yperidis/DAGFLOW
84ea30eea480e095dc8e24f80ca84a733170a365
[ "MIT" ]
null
null
null
include/Node.py
Yperidis/DAGFLOW
84ea30eea480e095dc8e24f80ca84a733170a365
[ "MIT" ]
null
null
null
include/Node.py
Yperidis/DAGFLOW
84ea30eea480e095dc8e24f80ca84a733170a365
[ "MIT" ]
null
null
null
import random import networkx as nx class Node: def __init__(self, ID=None, message=None, highercmnd=None, lev=None, parent=None, childNo=None, children_list=None, cmndlineup=None, cmndnodes=None, ancestor_list=None, descendant_list=None): self.ID = ID # an...
39.942529
122
0.606906
import random import networkx as nx class Node: def __init__(self, ID=None, message=None, highercmnd=None, lev=None, parent=None, childNo=None, children_list=None, cmndlineup=None, cmndnodes=None, ancestor_list=None, descendant_list=None): self.ID = ID ...
true
true
f71b22fcc5f5f5eba2d54b6f00ae8b7fb89c6a76
2,334
py
Python
cltk/utils/frequency.py
Akash-Pardasani/cltk
2a430e9407452b06f44847202ebce8446007d96b
[ "MIT" ]
null
null
null
cltk/utils/frequency.py
Akash-Pardasani/cltk
2a430e9407452b06f44847202ebce8446007d96b
[ "MIT" ]
null
null
null
cltk/utils/frequency.py
Akash-Pardasani/cltk
2a430e9407452b06f44847202ebce8446007d96b
[ "MIT" ]
1
2019-06-16T06:41:47.000Z
2019-06-16T06:41:47.000Z
"""This module's main class reads a text corpus and assembles a list of n most common words.""" __author__ = 'Kyle P. Johnson <kyle@kyle-p-johnson.com>' __license__ = 'MIT License. See LICENSE.' from cltk.corpus.utils.formatter import assemble_tlg_author_filepaths from cltk.corpus.utils.formatter import assemble_phi...
39.559322
97
0.670094
__author__ = 'Kyle P. Johnson <kyle@kyle-p-johnson.com>' __license__ = 'MIT License. See LICENSE.' from cltk.corpus.utils.formatter import assemble_tlg_author_filepaths from cltk.corpus.utils.formatter import assemble_phi5_author_filepaths from cltk.corpus.utils.formatter import tlg_plaintext_cleanup from cltk.corpu...
true
true
f71b22feb4672df4c2b53105a50c79c3c5c48548
3,225
py
Python
Midterm/server.py
eebbk-zhou/Web-Design-1
98703942dbb58e15c38a07de551a78398e2a7ab1
[ "Unlicense" ]
null
null
null
Midterm/server.py
eebbk-zhou/Web-Design-1
98703942dbb58e15c38a07de551a78398e2a7ab1
[ "Unlicense" ]
null
null
null
Midterm/server.py
eebbk-zhou/Web-Design-1
98703942dbb58e15c38a07de551a78398e2a7ab1
[ "Unlicense" ]
null
null
null
from bottle import route, get, post from bottle import run, debug from bottle import request, response, redirect, template from bottle import static_file import dataset import json from bottle import default_app #http://localhost:8090 @route("/") def get_midterm(): todo_list_db = dataset.connect('sqlite:///to...
26.434426
84
0.622636
from bottle import route, get, post from bottle import run, debug from bottle import request, response, redirect, template from bottle import static_file import dataset import json from bottle import default_app @route("/") def get_midterm(): todo_list_db = dataset.connect('sqlite:///todo_list.db') todo_...
true
true
f71b23bfc71f48b0e7ac2b5989a80a9a6d09b17b
4,803
py
Python
CA/ca.py
PIR3-Internet/server
181962e392be47a39848f3a88703163a140b3d3a
[ "MIT" ]
null
null
null
CA/ca.py
PIR3-Internet/server
181962e392be47a39848f3a88703163a140b3d3a
[ "MIT" ]
null
null
null
CA/ca.py
PIR3-Internet/server
181962e392be47a39848f3a88703163a140b3d3a
[ "MIT" ]
null
null
null
import ssl import socket import OpenSSL import sqlite3 import signal from functools import wraps from numpy.core.numeric import count_nonzero import requests from multiprocessing import Process, Value TIMEOUT = Value('i', 5) cMax = Value('i', 2) ca_num = Value('i', 0) class TimeoutException(Exception): pass def ...
29.466258
128
0.564022
import ssl import socket import OpenSSL import sqlite3 import signal from functools import wraps from numpy.core.numeric import count_nonzero import requests from multiprocessing import Process, Value TIMEOUT = Value('i', 5) cMax = Value('i', 2) ca_num = Value('i', 0) class TimeoutException(Exception): pass def ...
true
true
f71b2498aa5fdb11b49d58a54f14653f45df1cb1
10,087
py
Python
docs/sphinx/conf.py
sdss/lvmscraper
5b169487963fd06000c0a593993bb3c2c9418951
[ "BSD-3-Clause" ]
null
null
null
docs/sphinx/conf.py
sdss/lvmscraper
5b169487963fd06000c0a593993bb3c2c9418951
[ "BSD-3-Clause" ]
null
null
null
docs/sphinx/conf.py
sdss/lvmscraper
5b169487963fd06000c0a593993bb3c2c9418951
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. # type: igno...
30.847095
84
0.652027
import os from pkg_resources import parse_version try: from cluplus import __version__ except ModuleNotFoundError: from sdsstools import get_package_version __version__ = get_package_version(__file__, 'sdss-cluplus') or 'dev' on_rtd = os.environ.get('READTHEDOCS') == 'True' sphinx_templa...
true
true
f71b252375625601941b43c73fbf023daa436c67
304
py
Python
src/pygame_setup.py
sheepy0125/some-platformer-game
5b623c7ffeb7d1e0ba8bf1d75bc37b1798f31379
[ "MIT" ]
null
null
null
src/pygame_setup.py
sheepy0125/some-platformer-game
5b623c7ffeb7d1e0ba8bf1d75bc37b1798f31379
[ "MIT" ]
null
null
null
src/pygame_setup.py
sheepy0125/some-platformer-game
5b623c7ffeb7d1e0ba8bf1d75bc37b1798f31379
[ "MIT" ]
null
null
null
""" Pygame setup for Some Platformer Game Created by sheepy0125 08/10/2021 """ import pygame SCREEN_SIZE = (500, 500) SCROLL_OFFSET = (SCREEN_SIZE[0] // 2, SCREEN_SIZE[1] // 2) screen = pygame.display.set_mode(SCREEN_SIZE) pygame.display.set_caption("Some Platformer Game") clock = pygame.time.Clock()
21.714286
58
0.746711
import pygame SCREEN_SIZE = (500, 500) SCROLL_OFFSET = (SCREEN_SIZE[0] // 2, SCREEN_SIZE[1] // 2) screen = pygame.display.set_mode(SCREEN_SIZE) pygame.display.set_caption("Some Platformer Game") clock = pygame.time.Clock()
true
true
f71b256176da366107fb45bcef939ee05c453375
13,883
py
Python
nexmo/__init__.py
cook-health/messaging
1a827b97d9af6e56d55c362b29dd79a6cb373f88
[ "MIT" ]
null
null
null
nexmo/__init__.py
cook-health/messaging
1a827b97d9af6e56d55c362b29dd79a6cb373f88
[ "MIT" ]
2
2018-03-14T10:42:37.000Z
2018-03-14T11:01:31.000Z
nexmo/__init__.py
Seliniux777/Nexmo-nexmo-python
d1d60e8068b1cb23f12507a6ec1cd500285890b5
[ "MIT" ]
1
2020-10-18T09:41:15.000Z
2020-10-18T09:41:15.000Z
from platform import python_version import hashlib import hmac import jwt import os import requests import sys import time from uuid import uuid4 import warnings if sys.version_info[0] == 3: string_types = (str, bytes) else: string_types = (unicode, str) __version__ = '2.0.0' class Error(Exception): pa...
38.457064
120
0.666859
from platform import python_version import hashlib import hmac import jwt import os import requests import sys import time from uuid import uuid4 import warnings if sys.version_info[0] == 3: string_types = (str, bytes) else: string_types = (unicode, str) __version__ = '2.0.0' class Error(Exception): pa...
true
true
f71b26b2f58e18b2342f9b9601e14fbabdb77fb3
2,930
py
Python
src/python/pants/util/process_handler.py
revl/pants
8ad83e4ca80c095d44efceafd8b41e575da39c65
[ "Apache-2.0" ]
1
2021-05-05T18:58:28.000Z
2021-05-05T18:58:28.000Z
src/python/pants/util/process_handler.py
revl/pants
8ad83e4ca80c095d44efceafd8b41e575da39c65
[ "Apache-2.0" ]
null
null
null
src/python/pants/util/process_handler.py
revl/pants
8ad83e4ca80c095d44efceafd8b41e575da39c65
[ "Apache-2.0" ]
3
2020-06-30T08:28:13.000Z
2021-07-28T09:35:57.000Z
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import io import multiprocessing import subprocess import sys from abc import ABC, abstractmethod from typing import Optional class ProcessHandler(ABC): """An abstraction of process ...
29.897959
100
0.650853
import io import multiprocessing import subprocess import sys from abc import ABC, abstractmethod from typing import Optional class ProcessHandler(ABC): @abstractmethod def wait(self, timeout: Optional[float] = None) -> int: @abstractmethod def kill(self) -> None: pass @abstractmetho...
true
true
f71b2735ba192a6cc12f568c018d29bbdfde9f83
3,035
py
Python
code/evaluate_DSTC2.py
avinashsai/GCN-SeA
26968d8a71269581f7400293064314b5a18b5748
[ "Apache-2.0" ]
12
2019-09-06T03:48:36.000Z
2021-04-12T08:36:45.000Z
code/evaluate_DSTC2.py
avinashsai/GCN-SeA
26968d8a71269581f7400293064314b5a18b5748
[ "Apache-2.0" ]
null
null
null
code/evaluate_DSTC2.py
avinashsai/GCN-SeA
26968d8a71269581f7400293064314b5a18b5748
[ "Apache-2.0" ]
9
2019-06-30T07:23:01.000Z
2020-10-16T10:05:37.000Z
from metrics import bleu, rouge import argparse def get_args(): ''' Parse input arguments: preds_path: The directory in which labels and predictions files are dumped after inference config_id: The config id mentioned in the labels and predictions filenames ''' parser = argparse.Argument...
28.632075
235
0.559143
from metrics import bleu, rouge import argparse def get_args(): parser = argparse.ArgumentParser() parser.add_argument("--preds_path") parser.add_argument("--kb_path") parser.add_argument("--config_id") args = parser.parse_args() return args def read_results(path,num): with open(path+"/lab...
true
true
f71b27f6c3b0d480c4f0a1707e1a22e41cb11bbd
7,941
py
Python
venv/lib/python3.8/site-packages/django/middleware/cache.py
Joshua-Barawa/My-Photos
adcaea48149c6b31e9559b045709d538d0b749bc
[ "PostgreSQL", "Unlicense" ]
1
2022-03-16T14:43:26.000Z
2022-03-16T14:43:26.000Z
venv/lib/python3.8/site-packages/django/middleware/cache.py
Joshua-Barawa/My-Photos
adcaea48149c6b31e9559b045709d538d0b749bc
[ "PostgreSQL", "Unlicense" ]
null
null
null
venv/lib/python3.8/site-packages/django/middleware/cache.py
Joshua-Barawa/My-Photos
adcaea48149c6b31e9559b045709d538d0b749bc
[ "PostgreSQL", "Unlicense" ]
4
2022-03-12T10:17:00.000Z
2022-03-26T08:40:43.000Z
""" Cache middleware. If enabled, each Django-powered page will be cached based on URL. The canonical way to enable cache middleware is to set ``UpdateCacheMiddleware`` as your first piece of middleware, and ``FetchFromCacheMiddleware`` as the last:: MIDDLEWARE = [ 'django.middleware.cache.UpdateCacheMiddl...
38.362319
86
0.673467
from django.conf import settings from django.core.cache import DEFAULT_CACHE_ALIAS, caches from django.utils.cache import ( get_cache_key, get_max_age, has_vary_header, learn_cache_key, patch_response_headers, ) from django.utils.deprecation import MiddlewareMixin class UpdateCacheMiddleware(Midd...
true
true
f71b286c1207f4d6dae4a96c65379f266e26d4b1
7,686
py
Python
newrelic/hooks/framework_grpc.py
odidev/newrelic-python-agent
e6c4ddc158ab694dd7ff6bd75e54077d736674f1
[ "Apache-2.0" ]
null
null
null
newrelic/hooks/framework_grpc.py
odidev/newrelic-python-agent
e6c4ddc158ab694dd7ff6bd75e54077d736674f1
[ "Apache-2.0" ]
null
null
null
newrelic/hooks/framework_grpc.py
odidev/newrelic-python-agent
e6c4ddc158ab694dd7ff6bd75e54077d736674f1
[ "Apache-2.0" ]
null
null
null
# Copyright 2010 New Relic, Inc. # # 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 agreed to in writ...
33.710526
76
0.683971
import random import time from newrelic.api.external_trace import ExternalTrace from newrelic.api.web_transaction import WebTransactionWrapper from newrelic.api.transaction import current_transaction from newrelic.api.time_trace import record_exception from newrelic.common.object_wrapper import wrap_func...
true
true
f71b28ebefb77cb9a3e1c49a1442eb967f6d40ea
2,038
py
Python
pytorch_lightning/plugins/training_type/sharded_spawn.py
peblair/pytorch-lightning
e676ff96b16224331297dbd0e5ecd5cf364965b8
[ "Apache-2.0" ]
1
2021-02-12T04:15:31.000Z
2021-02-12T04:15:31.000Z
pytorch_lightning/plugins/training_type/sharded_spawn.py
peblair/pytorch-lightning
e676ff96b16224331297dbd0e5ecd5cf364965b8
[ "Apache-2.0" ]
null
null
null
pytorch_lightning/plugins/training_type/sharded_spawn.py
peblair/pytorch-lightning
e676ff96b16224331297dbd0e5ecd5cf364965b8
[ "Apache-2.0" ]
null
null
null
from typing import Optional from pytorch_lightning.core.optimizer import is_lightning_optimizer from pytorch_lightning.plugins.training_type.ddp_spawn import DDPSpawnPlugin from pytorch_lightning.utilities import _FAIRSCALE_AVAILABLE, rank_zero_only if _FAIRSCALE_AVAILABLE: from fairscale.optim import OSS fr...
37.054545
108
0.707066
from typing import Optional from pytorch_lightning.core.optimizer import is_lightning_optimizer from pytorch_lightning.plugins.training_type.ddp_spawn import DDPSpawnPlugin from pytorch_lightning.utilities import _FAIRSCALE_AVAILABLE, rank_zero_only if _FAIRSCALE_AVAILABLE: from fairscale.optim import OSS fr...
true
true
f71b296b1a35ac64d40aa0c9ca07717a2e1e1b1b
17,693
py
Python
models/pages.py
tobiassernhede/multi_user_blog
c657c5dacdab7b04cf226f75a085e8ac5a1d54a2
[ "MIT" ]
null
null
null
models/pages.py
tobiassernhede/multi_user_blog
c657c5dacdab7b04cf226f75a085e8ac5a1d54a2
[ "MIT" ]
null
null
null
models/pages.py
tobiassernhede/multi_user_blog
c657c5dacdab7b04cf226f75a085e8ac5a1d54a2
[ "MIT" ]
null
null
null
# Split up the pages functionality in separate file to make the code # easier to read import os import re import webapp2 import jinja2 import json from google.appengine.ext import ndb from google.appengine.api import images # Importing local .py files from models.users import User, users_key, make_secure_val, check_...
33.50947
92
0.562652
import os import re import webapp2 import jinja2 import json from google.appengine.ext import ndb from google.appengine.api import images from models.users import User, users_key, make_secure_val, check_secure_val from models.posts import Post, blog_key from models.comments import Comment, comment_key from models...
true
true
f71b2aad75e30594e61025ad33be2a2c17932235
2,792
py
Python
reinvent_models/link_invent/networks/encoder_decoder.py
GT4SD/-reinvent_models
e1cf00d1b24fe5f39354e34829adc25460da84e2
[ "MIT" ]
null
null
null
reinvent_models/link_invent/networks/encoder_decoder.py
GT4SD/-reinvent_models
e1cf00d1b24fe5f39354e34829adc25460da84e2
[ "MIT" ]
1
2022-03-07T12:18:00.000Z
2022-03-07T12:18:00.000Z
reinvent_models/link_invent/networks/encoder_decoder.py
GT4SD/reinvent_models
e1cf00d1b24fe5f39354e34829adc25460da84e2
[ "MIT" ]
null
null
null
""" Implementation of a network using an Encoder-Decoder architecture. """ import torch.nn as tnn from torch import Tensor from reinvent_models.link_invent.networks.decoder import Decoder from reinvent_models.link_invent.networks.encoder import Encoder class EncoderDecoder(tnn.Module): """ An e...
42.30303
115
0.666189
import torch.nn as tnn from torch import Tensor from reinvent_models.link_invent.networks.decoder import Decoder from reinvent_models.link_invent.networks.encoder import Encoder class EncoderDecoder(tnn.Module): def __init__(self, encoder_params: dict, decoder_params: dict): super(EncoderDec...
true
true
f71b2accb33c9e4fb30a401746d3041c3b953b26
11,528
py
Python
second/mayank_scripts/infer_ros_melodic_pretained_same_frame.py
mayanks888/second.pytorch
02d37885a543ee46516648dcab7db8f5d677a179
[ "MIT" ]
null
null
null
second/mayank_scripts/infer_ros_melodic_pretained_same_frame.py
mayanks888/second.pytorch
02d37885a543ee46516648dcab7db8f5d677a179
[ "MIT" ]
null
null
null
second/mayank_scripts/infer_ros_melodic_pretained_same_frame.py
mayanks888/second.pytorch
02d37885a543ee46516648dcab7db8f5d677a179
[ "MIT" ]
null
null
null
#!/usr/bin/env python # ROS node libs import time import numpy as np import rospy import torch # from geometry_msgs.msg import Quaternion, Pose, Point, Vector3 from pyquaternion import Quaternion from google.protobuf import text_format from sensor_msgs.msg import PointCloud2 from std_msgs.msg import Header, ColorRGBA...
45.207843
128
0.567661
import time import numpy as np import rospy import torch from pyquaternion import Quaternion from google.protobuf import text_format from sensor_msgs.msg import PointCloud2 from std_msgs.msg import Header, ColorRGBA from visualization_msgs.msg import Marker, MarkerArray from second.protos import pipeline_pb2 fr...
true
true
f71b2b5262d128663739d9f88003925845a959b1
27,166
py
Python
colour/corresponding/datasets/breneman1987.py
MaxSchambach/colour
3f3685d616fda4be58cec20bc1e16194805d7e2d
[ "BSD-3-Clause" ]
null
null
null
colour/corresponding/datasets/breneman1987.py
MaxSchambach/colour
3f3685d616fda4be58cec20bc1e16194805d7e2d
[ "BSD-3-Clause" ]
null
null
null
colour/corresponding/datasets/breneman1987.py
MaxSchambach/colour
3f3685d616fda4be58cec20bc1e16194805d7e2d
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Breneman Corresponding Chromaticities Dataset ============================================= Defines *Breneman (1987)* results for corresponding chromaticities experiments. See Also -------- `Corresponding Chromaticities Prediction Jupyter Notebook <http://nbviewer.jupyter.org/github/colour...
32.035377
79
0.536406
from __future__ import division, unicode_literals import numpy as np from collections import namedtuple from colour.utilities.documentation import DocstringDict __author__ = 'Colour Developers' __copyright__ = 'Copyright (C) 2013-2019 - Colour Developers' __license__ = 'New BSD License - https://opensource.org/li...
true
true
f71b2b58505f1a73cc43c49801a8cae13c3f8a26
43
py
Python
src/Application/PythonScriptModule/proto/state_2.py
antont/tundra
5c9b0a3957071f08ab425dff701cdbb34f9e1868
[ "Apache-2.0" ]
1
2018-04-02T15:38:10.000Z
2018-04-02T15:38:10.000Z
src/Application/PythonScriptModule/proto/state_2.py
antont/tundra
5c9b0a3957071f08ab425dff701cdbb34f9e1868
[ "Apache-2.0" ]
null
null
null
src/Application/PythonScriptModule/proto/state_2.py
antont/tundra
5c9b0a3957071f08ab425dff701cdbb34f9e1868
[ "Apache-2.0" ]
1
2021-09-04T12:37:34.000Z
2021-09-04T12:37:34.000Z
import state def change(): state.x = 2
10.75
15
0.627907
import state def change(): state.x = 2
true
true
f71b2c8b5ead15b27ff28d5dc1c80528e9c46c18
2,755
py
Python
profiler/torchmodules/torchlogger/activation_gradient_logger.py
NestLakerJasonLIN/pipedream
f50827f2e28cbdbd82a4ea686c0498272b1460d6
[ "MIT" ]
273
2019-08-31T14:12:11.000Z
2022-03-05T13:34:25.000Z
profiler/torchmodules/torchlogger/activation_gradient_logger.py
albertsh10/pipedream
cad624f79a71f44ba79099f0c38321347b13e5c2
[ "MIT" ]
67
2019-09-19T15:36:59.000Z
2022-01-13T09:11:54.000Z
profiler/torchmodules/torchlogger/activation_gradient_logger.py
albertsh10/pipedream
cad624f79a71f44ba79099f0c38321347b13e5c2
[ "MIT" ]
100
2019-09-16T20:59:14.000Z
2022-03-23T12:56:56.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import os import pickle import torch class ActivationAndGradientLogger: def __init__(self, directory): self.directory = directory try: os.mkdir(self.directory) except: pass self.iterat...
34.873418
103
0.591652
import os import pickle import torch class ActivationAndGradientLogger: def __init__(self, directory): self.directory = directory try: os.mkdir(self.directory) except: pass self.iteration = 0 self.forward_counter = 0 self.backward_counter ...
true
true
f71b2c90cb12b8290d45257d9a8169e55982187d
4,207
py
Python
twine/commands/check.py
chadwhawkins/twine
bd1d8b0f3ffdae9b91672d075d58cf635aa0e0f6
[ "Apache-2.0" ]
null
null
null
twine/commands/check.py
chadwhawkins/twine
bd1d8b0f3ffdae9b91672d075d58cf635aa0e0f6
[ "Apache-2.0" ]
null
null
null
twine/commands/check.py
chadwhawkins/twine
bd1d8b0f3ffdae9b91672d075d58cf635aa0e0f6
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Dustin Ingram # # 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 agreed to in writing, so...
32.114504
78
0.659853
from __future__ import absolute_import, division, print_function from __future__ import unicode_literals import argparse import cgi import re import sys try: from StringIO import StringIO except ImportError: from _io import StringIO import readme_renderer.markdown import readme_renderer.rst impo...
true
true
f71b2d261e9d06c923fdc731f3a69eb747347726
11,627
py
Python
bioactive_lab.py
PriyamvadaKumar/AWS_BioActive_Classification
b6a4413618586712ca4dc196f2dfaa3ceca804fb
[ "MIT" ]
1
2021-06-04T02:46:37.000Z
2021-06-04T02:46:37.000Z
bioactive_lab.py
PriyamvadaKumar/AWS_BioActive_classification
b6a4413618586712ca4dc196f2dfaa3ceca804fb
[ "MIT" ]
null
null
null
bioactive_lab.py
PriyamvadaKumar/AWS_BioActive_classification
b6a4413618586712ca4dc196f2dfaa3ceca804fb
[ "MIT" ]
null
null
null
import os, sys dirpath = os.getcwd() sys.path.insert(0, dirpath + '/goal_tether_functions') sys.path.insert(0, dirpath + '/predictive_modelers') sys.path.insert(0, dirpath + '/predictive_modelers/assessment_resources') sys.path.insert(0, dirpath + '/active_learners') sys.path.insert(0, dirpath + '/data_acquisition') sy...
32.387187
113
0.637224
import os, sys dirpath = os.getcwd() sys.path.insert(0, dirpath + '/goal_tether_functions') sys.path.insert(0, dirpath + '/predictive_modelers') sys.path.insert(0, dirpath + '/predictive_modelers/assessment_resources') sys.path.insert(0, dirpath + '/active_learners') sys.path.insert(0, dirpath + '/data_acquisition') sy...
true
true
f71b2dd96ed4ebc42bacf10ebdd08e56bd022192
1,747
py
Python
s3-bucket-cleaner/clean_s3_bucket.py
artsy/opstools
889b08c6b741dfeac0c32b0a4d96d0f9f3bbc0e7
[ "MIT" ]
null
null
null
s3-bucket-cleaner/clean_s3_bucket.py
artsy/opstools
889b08c6b741dfeac0c32b0a4d96d0f9f3bbc0e7
[ "MIT" ]
null
null
null
s3-bucket-cleaner/clean_s3_bucket.py
artsy/opstools
889b08c6b741dfeac0c32b0a4d96d0f9f3bbc0e7
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Sourced from https://gist.github.com/seventhskye/0cc7b2804252975d36dca047ab7729e9 with some modifications import os import boto3 def main(): client = boto3.client('s3') Bucket = os.environ.get('S3_BUCKET') Prefix = os.environ.get('S3_PREFIX', '') # leave blank to delete the entire conte...
28.639344
107
0.627934
import os import boto3 def main(): client = boto3.client('s3') Bucket = os.environ.get('S3_BUCKET') Prefix = os.environ.get('S3_PREFIX', '') IsTruncated = True MaxKeys = 1000 KeyMarker = None if Bucket is None: print("Environment variable S3_BUCKET must be set!") return while IsTruncated...
true
true
f71b2e2da61209cbca5bf4e3278259b97ab94ddd
135
py
Python
scripts/migrate_piwik/settings/local-dist.py
DanielSBrown/osf.io
98dda2ac237377197acacce78274bc0a4ce8f303
[ "Apache-2.0" ]
null
null
null
scripts/migrate_piwik/settings/local-dist.py
DanielSBrown/osf.io
98dda2ac237377197acacce78274bc0a4ce8f303
[ "Apache-2.0" ]
null
null
null
scripts/migrate_piwik/settings/local-dist.py
DanielSBrown/osf.io
98dda2ac237377197acacce78274bc0a4ce8f303
[ "Apache-2.0" ]
null
null
null
PIWIK_DB_HOST = 'localhost' PIWIK_DB_PORT = 3336 PIWIK_DB_USER = 'root' PIWIK_DB_PASSWORD = 'changeme' PIWIK_DB_NAME = 'piwik_staging'
22.5
31
0.792593
PIWIK_DB_HOST = 'localhost' PIWIK_DB_PORT = 3336 PIWIK_DB_USER = 'root' PIWIK_DB_PASSWORD = 'changeme' PIWIK_DB_NAME = 'piwik_staging'
true
true
f71b2e305d3d87fbaf19ce272d3f1ec378c3ef49
1,017
py
Python
tenants/monkey/db/migrations/recorder.py
bugkiwi/django-tenants-mysql
bc008bde01f5dbbd0e85bcacfa48db2ee8347e50
[ "MIT" ]
2
2017-08-01T10:29:00.000Z
2022-03-05T12:51:43.000Z
tenants/monkey/db/migrations/recorder.py
bugkiwi/django-tenants-mysql
bc008bde01f5dbbd0e85bcacfa48db2ee8347e50
[ "MIT" ]
1
2018-08-07T13:40:38.000Z
2018-08-07T13:40:38.000Z
tenants/monkey/db/migrations/recorder.py
bugkiwi/django-tenants-mysql
bc008bde01f5dbbd0e85bcacfa48db2ee8347e50
[ "MIT" ]
2
2019-11-27T09:34:44.000Z
2022-03-05T12:59:12.000Z
#!/usr/bin/env python #coding:utf-8 __author__ = 'gkiwi' from django.db.utils import DatabaseError from django.db.migrations.exceptions import MigrationSchemaMissing __all__ = ['MigrationRecorder'] class MigrationRecorder(object): def ensure_schema(self): """ Ensures the table exists and has th...
31.78125
99
0.665683
__author__ = 'gkiwi' from django.db.utils import DatabaseError from django.db.migrations.exceptions import MigrationSchemaMissing __all__ = ['MigrationRecorder'] class MigrationRecorder(object): def ensure_schema(self): # in the codebase. # gkiwi #TOPATCH from django.db impor...
true
true
f71b2e92c0252192242ac618201c720c01142e52
46,863
py
Python
pyAudioAnalysis/audioSegmentation.py
polewczakp/pyAudioAnalysis
7dc2d8e18da1ca2f2485a402bb7399b43bbb2b24
[ "Apache-2.0" ]
null
null
null
pyAudioAnalysis/audioSegmentation.py
polewczakp/pyAudioAnalysis
7dc2d8e18da1ca2f2485a402bb7399b43bbb2b24
[ "Apache-2.0" ]
null
null
null
pyAudioAnalysis/audioSegmentation.py
polewczakp/pyAudioAnalysis
7dc2d8e18da1ca2f2485a402bb7399b43bbb2b24
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function import os import csv import glob import scipy import sklearn import numpy as np import hmmlearn.hmm import sklearn.cluster import pickle as cpickle import matplotlib.pyplot as plt from scipy.spatial import distance import sklearn.discriminant_analysis from pyAudioAnalysis import au...
39.714407
83
0.598959
from __future__ import print_function import os import csv import glob import scipy import sklearn import numpy as np import hmmlearn.hmm import sklearn.cluster import pickle as cpickle import matplotlib.pyplot as plt from scipy.spatial import distance import sklearn.discriminant_analysis from pyAudioAnalysis import au...
true
true
f71b2ed9253b60e916abe7efa50cc6715f2d213c
2,044
py
Python
test/crawler/testICrawler.py
AutoDash/AutoDash
3924795a04159f80ea3b65b2172747babd15f35f
[ "Apache-2.0" ]
3
2020-02-12T01:24:46.000Z
2020-02-13T00:50:46.000Z
test/crawler/testICrawler.py
AutoDash/AutoDash
3924795a04159f80ea3b65b2172747babd15f35f
[ "Apache-2.0" ]
32
2020-02-20T10:20:56.000Z
2022-02-10T01:42:46.000Z
test/crawler/testICrawler.py
AutoDash/AutoDash
3924795a04159f80ea3b65b2172747babd15f35f
[ "Apache-2.0" ]
1
2020-02-22T02:47:19.000Z
2020-02-22T02:47:19.000Z
#!/usr/bin/env python3 import unittest from src.crawler.iCrawler import iCrawler, UndefinedDatabaseException from src.data.MetaDataItem import MetaDataItem from test.mock.MockDataAccessor import MockDataAccessor class MockCrawler(iCrawler): def __init__(self): super().__init__() def next_downloadabl...
29.623188
86
0.675147
import unittest from src.crawler.iCrawler import iCrawler, UndefinedDatabaseException from src.data.MetaDataItem import MetaDataItem from test.mock.MockDataAccessor import MockDataAccessor class MockCrawler(iCrawler): def __init__(self): super().__init__() def next_downloadable(self): retur...
true
true
f71b2f0c6d371df241e52fd406f5828a49387ea4
4,395
py
Python
prepare.py
binmahone/Raven
40b7e24f14a72af978341c311250f15795be1eb0
[ "Apache-2.0" ]
1
2021-12-23T02:45:06.000Z
2021-12-23T02:45:06.000Z
prepare.py
Mukvin/Raven
40b7e24f14a72af978341c311250f15795be1eb0
[ "Apache-2.0" ]
null
null
null
prepare.py
Mukvin/Raven
40b7e24f14a72af978341c311250f15795be1eb0
[ "Apache-2.0" ]
2
2021-09-16T10:18:01.000Z
2021-09-17T08:40:47.000Z
import time import boto3 from lib.Logger import Logger from lib.popen import subprocess_popen def prepare(): # 0. Initialize boto3 clients emr = boto3.client('emr') ec2 = boto3.client('ec2') # 1. Create an EMR cluster on AWS logger.info("Creating the EMR cluster...") with open("./cloud/cluste...
46.755319
119
0.513311
import time import boto3 from lib.Logger import Logger from lib.popen import subprocess_popen def prepare(): emr = boto3.client('emr') ec2 = boto3.client('ec2') logger.info("Creating the EMR cluster...") with open("./cloud/cluster.sh", 'r') as f: cmd = f.read() res = subproc...
true
true
f71b2fb9a2d9df9315262d217475ffce3958a2f8
9,376
py
Python
src/snowflake/connector/auth_okta.py
groodt/snowflake-connector-python
26d0a36cb9a65a728e745f077bd11ab536d386f8
[ "Apache-2.0" ]
3
2021-03-05T22:01:00.000Z
2021-04-02T17:48:33.000Z
src/snowflake/connector/auth_okta.py
groodt/snowflake-connector-python
26d0a36cb9a65a728e745f077bd11ab536d386f8
[ "Apache-2.0" ]
26
2021-06-01T09:43:42.000Z
2022-03-16T15:11:52.000Z
src/snowflake/connector/auth_okta.py
groodt/snowflake-connector-python
26d0a36cb9a65a728e745f077bd11ab536d386f8
[ "Apache-2.0" ]
1
2021-03-05T22:08:46.000Z
2021-03-05T22:08:46.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2012-2020 Snowflake Computing Inc. All right reserved. # import json import logging from .auth import Auth from .auth_by_plugin import AuthByPlugin from .compat import unescape, urlencode, urlsplit from .constants import HTTP_HEADER_ACCEPT, HTTP_HEADER_C...
39.561181
117
0.611455
import json import logging from .auth import Auth from .auth_by_plugin import AuthByPlugin from .compat import unescape, urlencode, urlsplit from .constants import HTTP_HEADER_ACCEPT, HTTP_HEADER_CONTENT_TYPE, HTTP_HEADER_SERVICE_NAME, HTTP_HEADER_USER_AGENT from .errorcode import ER_IDP_CONNECTION_ERROR, ER_INC...
true
true
f71b2fcfe4e1bf00db7f8c9aa8bc9eac22fc3f1c
2,248
py
Python
mobile/db/prompts.py
TRIP-Lab/itinerum-mobile-api
a3b31b411d9d46434c54be1d21415024dec86ae7
[ "MIT" ]
4
2019-02-04T15:34:49.000Z
2021-04-30T17:33:05.000Z
mobile/db/prompts.py
TRIP-Lab/itinerum-mobile-api
a3b31b411d9d46434c54be1d21415024dec86ae7
[ "MIT" ]
1
2021-03-19T22:26:11.000Z
2021-03-19T22:26:11.000Z
mobile/db/prompts.py
TRIP-Lab/itinerum-mobile-api
a3b31b411d9d46434c54be1d21415024dec86ae7
[ "MIT" ]
5
2018-03-13T20:24:55.000Z
2021-01-18T14:44:35.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Kyle Fitzsimmons, 2017 from datetime import datetime import pytz from models import db, PromptResponse class MobilePromptsActions: def get(self, prompts_uuids): prompts_filters = PromptResponse.prompt_uuid.in_(prompts_uuids) return db.session.query...
36.852459
71
0.589858
from datetime import datetime import pytz from models import db, PromptResponse class MobilePromptsActions: def get(self, prompts_uuids): prompts_filters = PromptResponse.prompt_uuid.in_(prompts_uuids) return db.session.query(PromptResponse).filter(prompts_filters) def create_...
true
true
f71b2fd793a7e41ee094ac47d7408dbb3c13f221
804
py
Python
garf_data.py
doesnotsitproperly/garfbot
04e2a8409bd171ca29b6cdb5e864fe2fa1c13b6d
[ "Unlicense" ]
null
null
null
garf_data.py
doesnotsitproperly/garfbot
04e2a8409bd171ca29b6cdb5e864fe2fa1c13b6d
[ "Unlicense" ]
null
null
null
garf_data.py
doesnotsitproperly/garfbot
04e2a8409bd171ca29b6cdb5e864fe2fa1c13b6d
[ "Unlicense" ]
null
null
null
import json, os class GarfData: file = os.path.join(os.getcwd(), "garf_data.json") token: str path_to_ffmpeg: str jokes: list trigger_words: list def __init__(self): with open(self.file, "r") as f: json_dict = json.loads(f.read()) self.token = json_dict["token"] ...
27.724138
67
0.584577
import json, os class GarfData: file = os.path.join(os.getcwd(), "garf_data.json") token: str path_to_ffmpeg: str jokes: list trigger_words: list def __init__(self): with open(self.file, "r") as f: json_dict = json.loads(f.read()) self.token = json_dict["token"] ...
true
true
f71b2fde98fb40c654242c9096ab88064334974c
33,682
py
Python
models/adaptation_model_stage1.py
BwCai/DCAA-UDA
359c2122060aebfbe4384c918768c261fe2dc9c7
[ "Apache-2.0" ]
2
2022-01-28T10:35:53.000Z
2022-03-09T14:38:59.000Z
models/adaptation_model_stage1.py
BwCai/DCAA-UDA
359c2122060aebfbe4384c918768c261fe2dc9c7
[ "Apache-2.0" ]
1
2022-03-07T10:48:11.000Z
2022-03-07T10:48:11.000Z
models/adaptation_model_stage1.py
BwCai/DCAA-UDA
359c2122060aebfbe4384c918768c261fe2dc9c7
[ "Apache-2.0" ]
null
null
null
from models.base_model import BaseModel import torch.nn as nn import torch.nn.functional as F import os, sys import torch import numpy as np import itertools from torch.autograd import Variable from optimizers import get_optimizer from schedulers import get_scheduler from models.sync_batchnorm import SynchronizedBatch...
43.293059
173
0.598064
from models.base_model import BaseModel import torch.nn as nn import torch.nn.functional as F import os, sys import torch import numpy as np import itertools from torch.autograd import Variable from optimizers import get_optimizer from schedulers import get_scheduler from models.sync_batchnorm import SynchronizedBatch...
true
true
f71b30ea10a42f00072f8fb902d4bdeca0fdac2c
4,663
py
Python
pose_sync_pytorch/generate_basic.py
lilly9117/Cross-Cutting
d534e8b5d4bf071883b7cb5f1832bba74b9a52d0
[ "Apache-2.0" ]
null
null
null
pose_sync_pytorch/generate_basic.py
lilly9117/Cross-Cutting
d534e8b5d4bf071883b7cb5f1832bba74b9a52d0
[ "Apache-2.0" ]
null
null
null
pose_sync_pytorch/generate_basic.py
lilly9117/Cross-Cutting
d534e8b5d4bf071883b7cb5f1832bba74b9a52d0
[ "Apache-2.0" ]
null
null
null
import os from moviepy.editor import VideoFileClip, concatenate_videoclips import random import numpy as np import time # from video_facial_landmarks_minmax import calculate_distance from video_pose_landmarks import calculate_pose_distance TEST = True TEST_TIME = 20 INIT_NUM = float("Inf") WINDOW_TIME = 10 PADDED_TIME...
36.716535
118
0.619558
import os from moviepy.editor import VideoFileClip, concatenate_videoclips import random import numpy as np import time from video_pose_landmarks import calculate_pose_distance TEST = True TEST_TIME = 20 INIT_NUM = float("Inf") WINDOW_TIME = 10 PADDED_TIME = 4 def pose_distance(reference_clip, clip): m...
true
true
f71b30f5180889ca3dd9df9574f878409863dfe6
1,003
py
Python
Tests/test_TimeAverager.py
chipgarner/yourair
22415389256cfa283e817970d6c79c187cbded4c
[ "MIT" ]
null
null
null
Tests/test_TimeAverager.py
chipgarner/yourair
22415389256cfa283e817970d6c79c187cbded4c
[ "MIT" ]
null
null
null
Tests/test_TimeAverager.py
chipgarner/yourair
22415389256cfa283e817970d6c79c187cbded4c
[ "MIT" ]
null
null
null
import Averager as Avg class Average: def __init__(self): self.answer = 0 self.delta_time = 0 def average(self, avg, delta_t): print("Average: " + str(avg) + " Timespan: " + str(delta_t)) self.answer = avg self.delta_time = delta_t def test_averager(): avg = Aver...
20.469388
68
0.639083
import Averager as Avg class Average: def __init__(self): self.answer = 0 self.delta_time = 0 def average(self, avg, delta_t): print("Average: " + str(avg) + " Timespan: " + str(delta_t)) self.answer = avg self.delta_time = delta_t def test_averager(): avg = Aver...
true
true
f71b315d6312d73a4f7581bd22785f23c8cb7785
5,935
py
Python
sprokit/tests/bindings/python/sprokit/pipeline/test-scheduler_registry.py
dstoup/kwiver
a3a36317b446baf0feb6274235ab1ac6b4329ead
[ "BSD-3-Clause" ]
1
2017-07-31T07:07:32.000Z
2017-07-31T07:07:32.000Z
sprokit/tests/bindings/python/sprokit/pipeline/test-scheduler_registry.py
dstoup/kwiver
a3a36317b446baf0feb6274235ab1ac6b4329ead
[ "BSD-3-Clause" ]
3
2021-03-19T15:39:43.000Z
2021-09-08T02:47:15.000Z
sprokit/tests/bindings/python/sprokit/pipeline/test-scheduler_registry.py
acidburn0zzz/kwiver
6e4205f1c46df04759c57c040f01cc804b27e00d
[ "BSD-3-Clause" ]
null
null
null
#!@PYTHON_EXECUTABLE@ #ckwg +28 # Copyright 2011-2013 by Kitware, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice,...
29.824121
85
0.694356
def test_import(): try: from sprokit.pipeline import config import sprokit.pipeline.scheduler_factory except: test_error("Failed to import the scheduler_factory module") def test_create(): from sprokit.pipeline import config from sprokit.pipeline ...
true
true
f71b32a53e1eb2f384ead41803a3f5892542c5b5
6,308
py
Python
dbms/tests/queries/0_stateless/helpers/uexpect.py
sunadm/ClickHouse
55903fbe23ef6dff8fc7ec25ae68e04919bc9b7f
[ "Apache-2.0" ]
8
2019-06-04T02:50:13.000Z
2022-02-10T06:46:51.000Z
dbms/tests/queries/0_stateless/helpers/uexpect.py
sunadm/ClickHouse
55903fbe23ef6dff8fc7ec25ae68e04919bc9b7f
[ "Apache-2.0" ]
16
2021-06-07T21:32:30.000Z
2022-03-31T21:08:29.000Z
dbms/tests/queries/0_stateless/helpers/uexpect.py
sunadm/ClickHouse
55903fbe23ef6dff8fc7ec25ae68e04919bc9b7f
[ "Apache-2.0" ]
3
2020-02-24T12:57:54.000Z
2021-10-04T13:29:00.000Z
# Copyright (c) 2019 Vitaliy Zakaznikov # # 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 agreed to i...
30.47343
102
0.566265
import os import pty import time import sys import re from threading import Thread, Event from subprocess import Popen from Queue import Queue, Empty class TimeoutError(Exception): def __init__(self, timeout): self.timeout = timeout def __str__(self): return 'Timeout %.3fs' % flo...
true
true
f71b32db7390644ae31d4b98d84b70883c847091
1,777
py
Python
generate/uk.py
mczub/because-moe
d57164399832e32f505a081d7196e0f3828a6e35
[ "Unlicense", "MIT" ]
78
2015-09-09T00:48:19.000Z
2022-02-25T14:18:46.000Z
generate/uk.py
mczub/because-moe
d57164399832e32f505a081d7196e0f3828a6e35
[ "Unlicense", "MIT" ]
15
2015-09-09T03:56:29.000Z
2020-01-03T07:18:50.000Z
generate/uk.py
mczub/because-moe
d57164399832e32f505a081d7196e0f3828a6e35
[ "Unlicense", "MIT" ]
22
2015-09-09T03:05:37.000Z
2021-07-24T07:35:59.000Z
import sys sys.path.append("site-packages") import json import string from unidecode import unidecode from urllib import parse from azure.storage.blob import BlockBlobService from datetime import datetime import animesources indexedShows = {} shows = [] with open('title-map.json') as titlemap_file: titlemap = json.l...
34.843137
106
0.758582
import sys sys.path.append("site-packages") import json import string from unidecode import unidecode from urllib import parse from azure.storage.blob import BlockBlobService from datetime import datetime import animesources indexedShows = {} shows = [] with open('title-map.json') as titlemap_file: titlemap = json.l...
true
true
f71b33566c8e0a884e4d1704ac06c8583ef46398
7,939
py
Python
tests/test_storage.py
gregdan3/limits
f2c693b9009afe27c9ecbb94492455ad470127f1
[ "MIT" ]
null
null
null
tests/test_storage.py
gregdan3/limits
f2c693b9009afe27c9ecbb94492455ad470127f1
[ "MIT" ]
null
null
null
tests/test_storage.py
gregdan3/limits
f2c693b9009afe27c9ecbb94492455ad470127f1
[ "MIT" ]
null
null
null
import time import pytest from limits.errors import ConfigurationError from limits.storage import ( MemcachedStorage, MemoryStorage, MongoDBStorage, RedisClusterStorage, RedisSentinelStorage, RedisStorage, Storage, storage_from_string, ) from limits.strategies import MovingWindowRateLi...
32.272358
84
0.493513
import time import pytest from limits.errors import ConfigurationError from limits.storage import ( MemcachedStorage, MemoryStorage, MongoDBStorage, RedisClusterStorage, RedisSentinelStorage, RedisStorage, Storage, storage_from_string, ) from limits.strategies import MovingWindowRateLi...
true
true
f71b336c74bf785c71596fc3f4e1c0603495a240
37,268
py
Python
desktop/libs/indexer/src/indexer/indexers/sql_tests.py
taklwu/hue
db661408f8fd206557b3d98670cf5edc4d52f869
[ "Apache-2.0" ]
1
2020-06-22T10:20:52.000Z
2020-06-22T10:20:52.000Z
desktop/libs/indexer/src/indexer/indexers/sql_tests.py
taklwu/hue
db661408f8fd206557b3d98670cf5edc4d52f869
[ "Apache-2.0" ]
null
null
null
desktop/libs/indexer/src/indexer/indexers/sql_tests.py
taklwu/hue
db661408f8fd206557b3d98670cf5edc4d52f869
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (...
165.635556
7,415
0.674305
from builtins import object import json from mock import patch, Mock, MagicMock from nose.tools import assert_equal, assert_true from desktop.lib.django_test_util import make_logged_in_client from useradmin.models import User from indexer.indexers.sql import SQLIndexer class MockRequest(object): ...
true
true
f71b3428812e3f4af3ba5ec76b4fec00628e68ec
1,009
py
Python
web/tex_cnn_rest.py
wbj0110/cnn-text-classification-tf-chinese
42e47d34c300e9d571231e43c189ee292b595559
[ "Apache-2.0" ]
null
null
null
web/tex_cnn_rest.py
wbj0110/cnn-text-classification-tf-chinese
42e47d34c300e9d571231e43c189ee292b595559
[ "Apache-2.0" ]
null
null
null
web/tex_cnn_rest.py
wbj0110/cnn-text-classification-tf-chinese
42e47d34c300e9d571231e43c189ee292b595559
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/env python from tornado import httpserver from tornado import gen from tornado.ioloop import IOLoop import tornado.web import json import single_eval as sev class IndexHandler(tornado.web.RequestHandler): def get(self): self.write("Hello,This is TextCNN") class ClassifyHandler(tornado....
25.871795
100
0.667988
from tornado import httpserver from tornado import gen from tornado.ioloop import IOLoop import tornado.web import json import single_eval as sev class IndexHandler(tornado.web.RequestHandler): def get(self): self.write("Hello,This is TextCNN") class ClassifyHandler(tornado.web.RequestHandler): ...
true
true
f71b345986d63817e8ebf1e91022534a55821bb0
1,010
py
Python
setup.py
jiad-dev/flask-req-parser
f46a6c002381d7b74e9c80c6b3ae536dcda908f9
[ "BSD-2-Clause" ]
2
2020-10-17T04:46:08.000Z
2020-10-17T04:46:10.000Z
setup.py
jiad-dev/flask-req-parser
f46a6c002381d7b74e9c80c6b3ae536dcda908f9
[ "BSD-2-Clause" ]
null
null
null
setup.py
jiad-dev/flask-req-parser
f46a6c002381d7b74e9c80c6b3ae536dcda908f9
[ "BSD-2-Clause" ]
2
2020-10-07T03:33:19.000Z
2020-10-07T04:07:16.000Z
from setuptools import setup setup( name='flask_req_parser', version='0.1.4', url='https://github.com/Rhyanz46/flask-req-parser', license='BSD', author='Arian Saputra', author_email='rianariansaputra@gmail.com', description='Simple Request parser for flask', long_description=__doc__, ...
30.606061
70
0.643564
from setuptools import setup setup( name='flask_req_parser', version='0.1.4', url='https://github.com/Rhyanz46/flask-req-parser', license='BSD', author='Arian Saputra', author_email='rianariansaputra@gmail.com', description='Simple Request parser for flask', long_description=__doc__, ...
true
true
f71b36d9600e32803a5a8daae7b744b0672e4fd7
24,960
py
Python
src/data/database.py
aFoxPod/torrent-bot
29ffaea5edab81bfa3aa0d944a96a766d06770e5
[ "MIT" ]
null
null
null
src/data/database.py
aFoxPod/torrent-bot
29ffaea5edab81bfa3aa0d944a96a766d06770e5
[ "MIT" ]
null
null
null
src/data/database.py
aFoxPod/torrent-bot
29ffaea5edab81bfa3aa0d944a96a766d06770e5
[ "MIT" ]
null
null
null
import sqlite3 class TorrentState: SEARCHING = "SEARCHING" # Still being searched DOWNLOADING = "DOWNLOADING" # Currently being downloading SEEDING = "SEEDING" # Currently uploading COMPLETED = "COMPLETED" # Removed from seeding DELETING = "DELETING" # Torrent marked for deletion PAUSED =...
33.28
124
0.575561
import sqlite3 class TorrentState: SEARCHING = "SEARCHING" DOWNLOADING = "DOWNLOADING" SEEDING = "SEEDING" COMPLETED = "COMPLETED" DELETING = "DELETING" PAUSED = "PAUSED" @staticmethod def get_states() -> list: return [ TorrentState.SEARCHING, ...
true
true
f71b389bb26a910057e54795c0cf91314386c30f
11,436
py
Python
sparseConv/multitask/semseg/models/res16unet.py
ShengyuH/Scene-Recognition-in-3D
8fb869e1f8e8ff48c6f1082bb75f60a562875fc5
[ "MIT" ]
48
2020-03-02T23:05:59.000Z
2022-02-22T11:23:17.000Z
sparseConv/multitask/semseg/models/res16unet.py
HenrryBryant/Scene-Recognition-in-3D
8fb869e1f8e8ff48c6f1082bb75f60a562875fc5
[ "MIT" ]
5
2020-10-29T14:19:04.000Z
2022-01-25T05:33:59.000Z
sparseConv/multitask/semseg/models/res16unet.py
HenrryBryant/Scene-Recognition-in-3D
8fb869e1f8e8ff48c6f1082bb75f60a562875fc5
[ "MIT" ]
7
2020-06-18T05:23:01.000Z
2021-05-13T01:26:32.000Z
from models.resnet import ResNetBase, get_norm from models.modules.common import ConvType, NormType, conv, conv_tr from models.modules.resnet_block import BasicBlock, Bottleneck, BasicBlockIN, BottleneckIN, BasicBlockLN from MinkowskiEngine import MinkowskiReLU import MinkowskiEngine.MinkowskiOps as me class Res16UN...
26.411085
104
0.669902
from models.resnet import ResNetBase, get_norm from models.modules.common import ConvType, NormType, conv, conv_tr from models.modules.resnet_block import BasicBlock, Bottleneck, BasicBlockIN, BottleneckIN, BasicBlockLN from MinkowskiEngine import MinkowskiReLU import MinkowskiEngine.MinkowskiOps as me class Res16UN...
true
true
f71b38a82f278340c42a84945a9e9d87c7755673
5,609
py
Python
pinyinsplit.py
throput/pinyinsplit
e500da5b4b37e4d7762790825e1efd1e6e0f4765
[ "MIT" ]
5
2018-11-12T19:33:37.000Z
2021-05-26T05:03:48.000Z
pinyinsplit.py
throput/pinyinsplit
e500da5b4b37e4d7762790825e1efd1e6e0f4765
[ "MIT" ]
null
null
null
pinyinsplit.py
throput/pinyinsplit
e500da5b4b37e4d7762790825e1efd1e6e0f4765
[ "MIT" ]
1
2021-08-10T07:15:18.000Z
2021-08-10T07:15:18.000Z
from pygtrie import CharTrie import copy """ Split a Chinese Pinyin phrase into a list of possible permutations of Pinyin words.This is the "example" module. For example, >>> from pinyinsplit import PinyinSplit >>> pys = PinyinSplit() >>> pys.split('XiangGangDaXue') [['Xiang', 'Gang', 'Da', 'Xue'], ['Xiang', 'Gang',...
50.080357
192
0.456409
from pygtrie import CharTrie import copy class PinyinSplit: pylist = [ 'a', 'ai', 'an', 'ang', 'ao', 'ba', 'bai', 'ban', 'bang', 'bao', 'bei', 'ben', 'beng', 'bi', 'bian', 'biang', 'biao', 'bie', 'bin', 'bing', 'bo', 'bu', 'ca', 'cai', 'can', 'cang', 'cao', 'ce', 'cen', 'ceng', ...
true
true
f71b38de84f34b526f5b92cf304f242735c04cdf
2,862
py
Python
scripts/siege.py
clouserw/olympia
1d5755b08a526372ec66e6bc64ab636018181969
[ "BSD-3-Clause" ]
1
2015-12-01T03:53:51.000Z
2015-12-01T03:53:51.000Z
scripts/siege.py
clouserw/olympia
1d5755b08a526372ec66e6bc64ab636018181969
[ "BSD-3-Clause" ]
6
2021-02-02T23:08:48.000Z
2021-09-08T02:47:17.000Z
scripts/siege.py
clouserw/olympia
1d5755b08a526372ec66e6bc64ab636018181969
[ "BSD-3-Clause" ]
1
2021-03-13T00:33:12.000Z
2021-03-13T00:33:12.000Z
""" A script for generating siege files with a bunch of URL variations. """ import re import sys part_re = re.compile(r'\{([-\w]+)\}') AMO_LANGUAGES = ( 'af', 'ar', 'ca', 'cs', 'da', 'de', 'el', 'en-US', 'es', 'eu', 'fa', 'fi', 'fr', 'ga-IE', 'he', 'hu', 'id', 'it', 'ja', 'ko', 'mn', 'nl', 'pl', 'pt-BR', ...
29.204082
78
0.571279
""" A script for generating siege files with a bunch of URL variations. """ import re import sys part_re = re.compile(r'\{([-\w]+)\}') AMO_LANGUAGES = ( 'af', 'ar', 'ca', 'cs', 'da', 'de', 'el', 'en-US', 'es', 'eu', 'fa', 'fi', 'fr', 'ga-IE', 'he', 'hu', 'id', 'it', 'ja', 'ko', 'mn', 'nl', 'pl', 'pt-BR', ...
false
true
f71b39087446ecc9cc6e057576d78b80e52404ee
340
py
Python
src/chenv/__init__.py
jonathan-shemer/chenv
e2b86b7a53031a35def1be21ece87a05d74d2919
[ "MIT" ]
3
2020-10-15T07:46:48.000Z
2021-09-06T20:49:05.000Z
src/chenv/__init__.py
jonathan-shemer/chenv
e2b86b7a53031a35def1be21ece87a05d74d2919
[ "MIT" ]
5
2021-01-27T11:47:12.000Z
2021-08-30T08:49:37.000Z
src/chenv/__init__.py
jonathan-shemer/chenv
e2b86b7a53031a35def1be21ece87a05d74d2919
[ "MIT" ]
1
2022-03-15T09:29:19.000Z
2022-03-15T09:29:19.000Z
"""chenv.""" try: from importlib.metadata import version, PackageNotFoundError # type: ignore except ImportError: # pragma: no cover from importlib_metadata import version, PackageNotFoundError # type: ignore try: __version__ = version(__name__) except PackageNotFoundError: # pragma: no cover __ve...
28.333333
80
0.744118
try: from importlib.metadata import version, PackageNotFoundError except ImportError: from importlib_metadata import version, PackageNotFoundError try: __version__ = version(__name__) except PackageNotFoundError: __version__ = "unknown"
true
true