hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 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
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c185b78b3aab8312dbe2036e6d0294308757b80
508
py
Python
server/src/tests/samples/dataclass6.py
willydouhard/pyright
2d0dff4f9e6bc2c634c3737354f4c1a1fd486185
[ "MIT" ]
null
null
null
server/src/tests/samples/dataclass6.py
willydouhard/pyright
2d0dff4f9e6bc2c634c3737354f4c1a1fd486185
[ "MIT" ]
null
null
null
server/src/tests/samples/dataclass6.py
willydouhard/pyright
2d0dff4f9e6bc2c634c3737354f4c1a1fd486185
[ "MIT" ]
null
null
null
# This sample tests the type checker's handling of # synthesized __init__ and __new__ methods for # dataclass classes and their subclasses. from dataclasses import dataclass @dataclass class A: x: int @dataclass(init) class B(A): y: int def __init__(self, a: A, y: int): self.__dict__ = a.__dict_...
18.814815
71
0.698819
# synthesized __init__ and __new__ methods for # dataclass classes and their subclasses. from dataclasses import dataclass @dataclass class A: x: int @dataclass(init) class B(A): y: int def __init__(self, a: A, y: int): self.__dict__ = a.__dict__ a = A(3) b = B(a, 5) # This should generate an...
true
true
1c185ce1b4ae5d77e6664604f5a22fac615707bb
9,958
py
Python
config/settings/common.py
thepiyushshukla/django_tester
c1d8e8b7a7e9727cd61a6ac94bea88e3df9c72b6
[ "BSD-3-Clause" ]
null
null
null
config/settings/common.py
thepiyushshukla/django_tester
c1d8e8b7a7e9727cd61a6ac94bea88e3df9c72b6
[ "BSD-3-Clause" ]
null
null
null
config/settings/common.py
thepiyushshukla/django_tester
c1d8e8b7a7e9727cd61a6ac94bea88e3df9c72b6
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Django settings for Reddit Clone 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, unicod...
35.187279
114
0.599418
from __future__ import absolute_import, unicode_literals import environ ROOT_DIR = environ.Path(__file__) - 3 APPS_DIR = ROOT_DIR.path('reddit') env = environ.Env() DJANGO_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'djan...
true
true
1c185d79295146788dd219c715535df6d84b37e7
2,449
py
Python
dibb/fitness_evaluator.py
giuse/dibbo
20f9ae4ddeb7f41e307c0f0e8dd8cd44d9f3b3a4
[ "MIT" ]
null
null
null
dibb/fitness_evaluator.py
giuse/dibbo
20f9ae4ddeb7f41e307c0f0e8dd8cd44d9f3b3a4
[ "MIT" ]
null
null
null
dibb/fitness_evaluator.py
giuse/dibbo
20f9ae4ddeb7f41e307c0f0e8dd8cd44d9f3b3a4
[ "MIT" ]
null
null
null
import platform, inspect import numpy as np import ray @ray.remote class FitnessEvaluator: """ Runs one fitness evaluation on one individual. Note: an "individual" is in principle only a partial genotype, corresponding to the block of a BlockWorker. The full genotype to pass to the fitness...
36.014706
82
0.633728
import platform, inspect import numpy as np import ray @ray.remote class FitnessEvaluator: def __init__(self, block_id, dibb_id): self.block_id = block_id self.dibb_id = dibb_id def reset(self, fit_fn, rseed, hooks): self.hooks = hooks if fit_fn is not None: ...
true
true
1c185da15973b3457eabb1951c3df70f74e027dd
8,949
py
Python
tests/play/play_scorer_test.py
phoughton/cribbage_scorer
9319bd815f73de5973cf8811edbc656d96472113
[ "Unlicense" ]
1
2020-04-06T15:24:05.000Z
2020-04-06T15:24:05.000Z
tests/play/play_scorer_test.py
phoughton/cribbage_scorer
9319bd815f73de5973cf8811edbc656d96472113
[ "Unlicense" ]
4
2021-08-30T17:53:09.000Z
2021-09-17T09:11:09.000Z
tests/play/play_scorer_test.py
phoughton/cribbage_scorer
9319bd815f73de5973cf8811edbc656d96472113
[ "Unlicense" ]
null
null
null
import pytest from cribbage_scorer import cribbage_scorer @pytest.mark.parametrize("hand, players, expected_count, expected_score, description", [ ([(1, "S"), (2, "S")], ["Abi", "Bob"], 3, 0, "Simple ace and 2."), ([(4, "S")], ["Abi", "Bob"], 4, 0, "simple 1 card, 4"), ([(1, "H"), (10, "S")], ...
58.875
129
0.554922
import pytest from cribbage_scorer import cribbage_scorer @pytest.mark.parametrize("hand, players, expected_count, expected_score, description", [ ([(1, "S"), (2, "S")], ["Abi", "Bob"], 3, 0, "Simple ace and 2."), ([(4, "S")], ["Abi", "Bob"], 4, 0, "simple 1 card, 4"), ([(1, "H"), (10, "S")], ...
true
true
1c185da35b1febd5c30ed3ecb8b4a5afe0ffe2b0
2,980
py
Python
test/functional/feature_logging.py
mkscoin/mkscoin
a4436857087a727a5d1b03f8380764b04d954f04
[ "MIT" ]
null
null
null
test/functional/feature_logging.py
mkscoin/mkscoin
a4436857087a727a5d1b03f8380764b04d954f04
[ "MIT" ]
null
null
null
test/functional/feature_logging.py
mkscoin/mkscoin
a4436857087a727a5d1b03f8380764b04d954f04
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2017-2018 The mkscoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test debug logging.""" import os from test_framework.test_framework import mkscoinTestFramework from ...
39.210526
131
0.669463
import os from test_framework.test_framework import mkscoinTestFramework from test_framework.test_node import ErrorMatch class LoggingTest(mkscoinTestFramework): def set_test_params(self): self.num_nodes = 1 self.setup_clean_chain = True def relative_log_path(self, name): return os....
true
true
1c185e3de857fda84ec234e9450842317d511955
6,181
py
Python
threshold.py
sai-krishna-ghanta/Lane_detection_CV
0b02afe2a484c98568aca1b7cdc29d2b7e90dc0f
[ "MIT" ]
1
2021-12-21T17:57:28.000Z
2021-12-21T17:57:28.000Z
threshold.py
sai-krishna-ghanta/Lane_detection_CV
0b02afe2a484c98568aca1b7cdc29d2b7e90dc0f
[ "MIT" ]
null
null
null
threshold.py
sai-krishna-ghanta/Lane_detection_CV
0b02afe2a484c98568aca1b7cdc29d2b7e90dc0f
[ "MIT" ]
null
null
null
import numpy as np import cv2 def abs_sobel_thresh(img, orient='x', thresh=(20, 100)): """ #--------------------- # This function applies Sobel x or y, and then # takes an absolute value and applies a threshold. # """ # Take the derivative in x or y given orient = 'x' or 'y' if orient...
34.724719
133
0.632584
import numpy as np import cv2 def abs_sobel_thresh(img, orient='x', thresh=(20, 100)): if orient == 'x': abs_sobel = np.absolute(cv2.Sobel(img, cv2.CV_64F, 1, 0)) if orient == 'y': abs_sobel = np.absolute(cv2.Sobel(img, cv2.CV_64F, 0, 1)) scaled_sobel = np.uint8(255*abs_sobel/np.ma...
true
true
1c185f11c9860d19f8bc443440ee9dbb84ea2c77
604
py
Python
_pandoc/boldify-my-name.py
drammock/dan.mccloy.info
19192ac3d4f9f6c78a3f5bd38be15489fe73e4b7
[ "Unlicense" ]
1
2016-01-28T07:49:05.000Z
2016-01-28T07:49:05.000Z
_pandoc/boldify-my-name.py
drammock/dan.mccloy.info
19192ac3d4f9f6c78a3f5bd38be15489fe73e4b7
[ "Unlicense" ]
null
null
null
_pandoc/boldify-my-name.py
drammock/dan.mccloy.info
19192ac3d4f9f6c78a3f5bd38be15489fe73e4b7
[ "Unlicense" ]
1
2016-01-28T07:49:46.000Z
2016-01-28T07:49:46.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys infile = sys.argv[1] outfile = sys.argv[2] with open(infile, 'r') as f, open(outfile, 'w') as g: for line in f: # make my name bold line = line.replace('{McCloy} D. R.', '{\\bfseries {McCloy} D. R.}') line = line.replace('{McCloy} D.R.', '{\\bfseries {...
31.789474
70
0.59106
import sys infile = sys.argv[1] outfile = sys.argv[2] with open(infile, 'r') as f, open(outfile, 'w') as g: for line in f: line = line.replace('{McCloy} D. R.', '{\\bfseries {McCloy} D. R.}') line = line.replace('{McCloy} D.R.', '{\\bfseries {McCloy} D.R.}') line = line.replace('{McCloy} D.', '{\\bfseries {...
true
true
1c185f168056a0fa52003c4d0d1d2349ddceb18b
3,473
py
Python
python/ambassador/ir/irtracing.py
imranismail/ambassador
0468c4f1daf2aeb254a5af3217d2d7f3ebf4cb90
[ "Apache-2.0" ]
null
null
null
python/ambassador/ir/irtracing.py
imranismail/ambassador
0468c4f1daf2aeb254a5af3217d2d7f3ebf4cb90
[ "Apache-2.0" ]
null
null
null
python/ambassador/ir/irtracing.py
imranismail/ambassador
0468c4f1daf2aeb254a5af3217d2d7f3ebf4cb90
[ "Apache-2.0" ]
null
null
null
from typing import Optional, TYPE_CHECKING from .ircluster import IRCluster from .irresource import IRResource from ..config import Config from ..utils import RichStatus if TYPE_CHECKING: from .ir import IR class IRTracing(IRResource): cluster: Optional[IRCluster] service: str driver: str driver...
31.008929
114
0.584509
from typing import Optional, TYPE_CHECKING from .ircluster import IRCluster from .irresource import IRResource from ..config import Config from ..utils import RichStatus if TYPE_CHECKING: from .ir import IR class IRTracing(IRResource): cluster: Optional[IRCluster] service: str driver: str driver...
true
true
1c185f4933330e1fdaa0f69a2d83232ee7e48310
3,573
py
Python
huaweicloud-sdk-apig/huaweicloudsdkapig/v2/model/check_app_v2_request.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
64
2020-06-12T07:05:07.000Z
2022-03-30T03:32:50.000Z
huaweicloud-sdk-apig/huaweicloudsdkapig/v2/model/check_app_v2_request.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
11
2020-07-06T07:56:54.000Z
2022-01-11T11:14:40.000Z
huaweicloud-sdk-apig/huaweicloudsdkapig/v2/model/check_app_v2_request.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
24
2020-06-08T11:42:13.000Z
2022-03-04T06:44:08.000Z
# coding: utf-8 import re import six from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class CheckAppV2Request: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key ...
25.521429
79
0.551637
import re import six from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class CheckAppV2Request: sensitive_list = [] openapi_types = { 'instance_id': 'str', 'app_id': 'str' } attribute_map = { 'instance_id': 'instance_id', 'app_id': 'app...
true
true
1c185f6010e20a8ed0edc991d3bdac4e6497221d
1,523
py
Python
scona/datasets/NSPN_WhitakerVertes_PNAS2016/__init__.py
leytes/scona
7946a50bfdb32eeaaefa10dc8f7a80e2b8547366
[ "MIT" ]
30
2018-10-10T09:04:46.000Z
2022-03-12T23:28:10.000Z
scona/datasets/NSPN_WhitakerVertes_PNAS2016/__init__.py
leytes/scona
7946a50bfdb32eeaaefa10dc8f7a80e2b8547366
[ "MIT" ]
68
2017-05-10T09:53:50.000Z
2018-09-03T13:39:43.000Z
scona/datasets/NSPN_WhitakerVertes_PNAS2016/__init__.py
leytes/scona
7946a50bfdb32eeaaefa10dc8f7a80e2b8547366
[ "MIT" ]
18
2019-02-08T22:47:48.000Z
2022-03-04T06:01:58.000Z
#! /usr/bin/env python from os.path import dirname, abspath from scona.scripts.useful_functions import read_in_data """NSPN Whitaker, Vertes et al, 2016""" TITLE = """Cortical Thickness Measures""" SOURCE = """ Adolescent consolidation of human connectome hubs Kirstie J. Whitaker, Petra E. Vértes, Rafael ...
28.203704
339
0.719632
from os.path import dirname, abspath from scona.scripts.useful_functions import read_in_data TITLE = """Cortical Thickness Measures""" SOURCE = """ Adolescent consolidation of human connectome hubs Kirstie J. Whitaker, Petra E. Vértes, Rafael Romero-Garcia, František Váša, Michael Moutoussis, Gita Prabhu,...
true
true
1c186139e6787ff17ade36b65f3fb18b538694c6
1,267
py
Python
python3/test/test_schema_proxy.py
zhudanfei/json-schema-dsl
26323e8440a404610998a67912ecefb243bf788c
[ "MIT" ]
null
null
null
python3/test/test_schema_proxy.py
zhudanfei/json-schema-dsl
26323e8440a404610998a67912ecefb243bf788c
[ "MIT" ]
null
null
null
python3/test/test_schema_proxy.py
zhudanfei/json-schema-dsl
26323e8440a404610998a67912ecefb243bf788c
[ "MIT" ]
null
null
null
import unittest from src.json_schema_dsl import * from src import schema_proxy schema1 = JsonObject( JsonField('node', JsonString), JsonField('user', JsonArray(JsonString)), JsonField('tag', JsonObject( JsonField('name', JsonString), JsonField('level', JsonInteger), JsonField('cas...
26.395833
73
0.581689
import unittest from src.json_schema_dsl import * from src import schema_proxy schema1 = JsonObject( JsonField('node', JsonString), JsonField('user', JsonArray(JsonString)), JsonField('tag', JsonObject( JsonField('name', JsonString), JsonField('level', JsonInteger), JsonField('cas...
true
true
1c18621a2eb77d3197712a03287f05a30d07f293
374
py
Python
geokey/users/migrations/0005_auto_20150825_0933.py
chabies/config_socialauth_geokey
cbb3248847f6ad2d6c95752976f5161557b1db2e
[ "Apache-2.0" ]
null
null
null
geokey/users/migrations/0005_auto_20150825_0933.py
chabies/config_socialauth_geokey
cbb3248847f6ad2d6c95752976f5161557b1db2e
[ "Apache-2.0" ]
null
null
null
geokey/users/migrations/0005_auto_20150825_0933.py
chabies/config_socialauth_geokey
cbb3248847f6ad2d6c95752976f5161557b1db2e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('users', '0002_auto_20150824_1603'), ('oauth2_provider', '0002_08_updates'), ] operations = [ migrations.RunSQL('DROP...
22
78
0.676471
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('users', '0002_auto_20150824_1603'), ('oauth2_provider', '0002_08_updates'), ] operations = [ migrations.RunSQL('DROP TABLE IF EXISTS oauth2_...
true
true
1c18624770b41d7010f69c656d5d8194b33992c5
1,143
py
Python
expand_rect.py
yangzhaonan18/trafficSignDetect
a84bfe4d0b74593b1671361d2aef547785ea4958
[ "MIT" ]
4
2021-04-08T09:00:32.000Z
2021-12-01T18:13:22.000Z
expand_rect.py
yangzhaonan18/trafficSignDetect
a84bfe4d0b74593b1671361d2aef547785ea4958
[ "MIT" ]
null
null
null
expand_rect.py
yangzhaonan18/trafficSignDetect
a84bfe4d0b74593b1671361d2aef547785ea4958
[ "MIT" ]
1
2020-04-10T08:37:17.000Z
2020-04-10T08:37:17.000Z
# -*- coding=utf-8 -*- # py37 import numpy as np def expand_yellow(list): list = np.array(list) print(list.shape) unite_list = [] for i in range(len(list)): if list[i][2] > 10 and list[i][3] > 10: if list[i][2] < list[i][3]: # 黄色区域的宽度 小于 高度的时候,将不变看成是 黄色施工标志进行尺寸的调整 ...
31.75
80
0.480315
import numpy as np def expand_yellow(list): list = np.array(list) print(list.shape) unite_list = [] for i in range(len(list)): if list[i][2] > 10 and list[i][3] > 10: if list[i][2] < list[i][3]: list[i][0] = int(list[i][0] - list[i][2] * 0.2) ...
true
true
1c18629ed7326182e43d6cd2daaec936c39a1787
1,526
py
Python
packages/amuse-distributed/setup.py
cgroeneveld/amuse
9684fd22ce8293b837d2c78f56948e3ec3d04032
[ "Apache-2.0" ]
null
null
null
packages/amuse-distributed/setup.py
cgroeneveld/amuse
9684fd22ce8293b837d2c78f56948e3ec3d04032
[ "Apache-2.0" ]
null
null
null
packages/amuse-distributed/setup.py
cgroeneveld/amuse
9684fd22ce8293b837d2c78f56948e3ec3d04032
[ "Apache-2.0" ]
null
null
null
import sys import os from support.version import version, main_version from support.classifiers import classifiers from setuptools import setup import support support.use("system") from support.setup_codes import setup_commands name = 'amuse-distributed' author = 'The AMUSE team' author_email = 'info@amusecode.org' ...
25.016393
87
0.741153
import sys import os from support.version import version, main_version from support.classifiers import classifiers from setuptools import setup import support support.use("system") from support.setup_codes import setup_commands name = 'amuse-distributed' author = 'The AMUSE team' author_email = 'info@amusecode.org' ...
true
true
1c18633a9042e2eb8f09edfb439e791331d4c433
30,225
py
Python
Utils/CharUtilsLib.py
lcremer/Maya_Rigging
8fe07e5f8d021a6828608bca4bf74e04f023b1cd
[ "Unlicense" ]
null
null
null
Utils/CharUtilsLib.py
lcremer/Maya_Rigging
8fe07e5f8d021a6828608bca4bf74e04f023b1cd
[ "Unlicense" ]
null
null
null
Utils/CharUtilsLib.py
lcremer/Maya_Rigging
8fe07e5f8d021a6828608bca4bf74e04f023b1cd
[ "Unlicense" ]
null
null
null
import pymel.core as pc import re import copy import math import List as List from Maya_UtilLib import Units from String import * from Transform import * from CurveUtilLib import * # TODO: clean this up def dupId(n, prePost, id): newDup = [] sel = [] shortName = [] dagPath = '' fullChain = [] ...
34.781358
117
0.572969
import pymel.core as pc import re import copy import math import List as List from Maya_UtilLib import Units from String import * from Transform import * from CurveUtilLib import * def dupId(n, prePost, id): newDup = [] sel = [] shortName = [] dagPath = '' fullChain = [] size = 0 i...
false
true
1c186625eeebefa4851b1458fc959529fa2be248
1,652
py
Python
env_example.py
tekk/Hambone
41c4b384f90defb63e4158a137c23f344f645044
[ "MIT" ]
1
2020-08-17T03:37:12.000Z
2020-08-17T03:37:12.000Z
env_example.py
tekk/Hambone
41c4b384f90defb63e4158a137c23f344f645044
[ "MIT" ]
null
null
null
env_example.py
tekk/Hambone
41c4b384f90defb63e4158a137c23f344f645044
[ "MIT" ]
null
null
null
################################################### # FILE: env.py # # AUTHOR: NotPike # # Function: Envirement class, vars go here. # ################################################### import logging import pyaudio class ENV: def __init_...
33.714286
107
0.507869
import logging import pyaudio class ENV: def __init__(self): self.CALLSIGN = "HACKER" self.GPIO = 17 self.DEV = False self.TX = True self.RX = True self.LOGGING_LEVEL = logging.INFO self.LOGGING_FILE = 'log/event.log' self.WAVE_OU...
true
true
1c18664fac4efe815de217e211495b733ca3f827
447
py
Python
termWidth.py
CraigDawson/gbin
5eb3e3cc37c9a1f00e51e21f7670d75c9f24dd25
[ "MIT" ]
null
null
null
termWidth.py
CraigDawson/gbin
5eb3e3cc37c9a1f00e51e21f7670d75c9f24dd25
[ "MIT" ]
null
null
null
termWidth.py
CraigDawson/gbin
5eb3e3cc37c9a1f00e51e21f7670d75c9f24dd25
[ "MIT" ]
null
null
null
#!/usr/bin/python from __future__ import print_function import os rows, columns = os.popen('stty size', 'r').read().split() print('Terminal size: {}, {}'.format(rows, columns)) cols = int(columns) // 10 print('cols={}'.format(cols)) pad = ' ' * 9 for n in range(1, cols + 1): print('{}{}'.format(pad, n % 10), end=...
23.526316
57
0.599553
from __future__ import print_function import os rows, columns = os.popen('stty size', 'r').read().split() print('Terminal size: {}, {}'.format(rows, columns)) cols = int(columns) // 10 print('cols={}'.format(cols)) pad = ' ' * 9 for n in range(1, cols + 1): print('{}{}'.format(pad, n % 10), end='') print('') prin...
true
true
1c18668abcd3c3f6341936e2d0c6f7c589b64527
3,570
py
Python
rnacentral_pipeline/databases/ncbi/gene/helpers.py
RNAcentral/rnacentral-import-pipeline
238e573440c72581a051b16c15f56fcd25bece74
[ "Apache-2.0" ]
1
2018-08-09T14:41:16.000Z
2018-08-09T14:41:16.000Z
rnacentral_pipeline/databases/ncbi/gene/helpers.py
RNAcentral/rnacentral-import-pipeline
238e573440c72581a051b16c15f56fcd25bece74
[ "Apache-2.0" ]
60
2015-02-04T16:43:53.000Z
2022-01-27T10:28:43.000Z
rnacentral_pipeline/databases/ncbi/gene/helpers.py
RNAcentral/rnacentral-import-pipeline
238e573440c72581a051b16c15f56fcd25bece74
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Copyright [2009-2018] EMBL-European Bioinformatics Institute 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...
21.12426
72
0.658824
import csv import operator as op import collections as coll from Bio import SeqIO from Bio import Entrez from rnacentral_pipeline.databases.helpers import embl from rnacentral_pipeline.databases.helpers import phylogeny as phy from rnacentral_pipeline.databases.helpers import publications as pub ALLOWED_RNA = { ...
true
true
1c1866aead57f7727ae40b6b2657a421b3b77570
14,383
py
Python
lib/rucio/core/lifetime_exception.py
nimishbongale/rucio
21c93bd7d02dbc70bc3127ad77fb1a1981b83058
[ "Apache-2.0" ]
null
null
null
lib/rucio/core/lifetime_exception.py
nimishbongale/rucio
21c93bd7d02dbc70bc3127ad77fb1a1981b83058
[ "Apache-2.0" ]
null
null
null
lib/rucio/core/lifetime_exception.py
nimishbongale/rucio
21c93bd7d02dbc70bc3127ad77fb1a1981b83058
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright European Organization for Nuclear Research (CERN) since 2012 # # 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-...
43.062874
190
0.608427
from __future__ import division from re import match from datetime import datetime, timedelta from six import string_types from six.moves.configparser import NoSectionError from sqlalchemy import or_ from sqlalchemy.exc import IntegrityError from sqlalchemy.orm.exc import NoResultFound from rucio.common.config impo...
true
true
1c1867b1adfbf6fcefc89288dae951a4fb2e5332
130
py
Python
sortingview/backend/extensions/unitstable/__init__.py
garrettmflynn/sortingview
0bb3df40d5d031ec651c4821f928787bbee71fbb
[ "Apache-2.0" ]
2
2021-11-19T04:51:42.000Z
2022-03-12T23:36:19.000Z
sortingview/backend/extensions/unitstable/__init__.py
magland/sortingview
0b1be9d55048cd4b8a0b6b6733bd7d35cb440aa7
[ "Apache-2.0" ]
172
2021-05-10T17:39:15.000Z
2022-03-18T21:46:15.000Z
sortingview/backend/extensions/unitstable/__init__.py
garrettmflynn/sortingview
0bb3df40d5d031ec651c4821f928787bbee71fbb
[ "Apache-2.0" ]
2
2021-08-29T20:13:57.000Z
2022-03-12T23:36:34.000Z
from .isi_violations import * from .peak_channels import * from .unit_snrs import * from .units import * from .unitstable import *
26
29
0.776923
from .isi_violations import * from .peak_channels import * from .unit_snrs import * from .units import * from .unitstable import *
true
true
1c1868b70aadc51b4c81381745a16b73aaeef2fa
44,477
py
Python
superset/db_engine_specs/presto.py
ECQQ/superset-ecqq
d0614695439b13d92ae3d5d1e6d68f23891f9498
[ "Apache-2.0" ]
4
2021-10-05T00:55:28.000Z
2021-12-21T10:56:14.000Z
superset/db_engine_specs/presto.py
ECQQ/superset-ecqq
d0614695439b13d92ae3d5d1e6d68f23891f9498
[ "Apache-2.0" ]
20
2021-05-05T12:45:53.000Z
2022-03-09T01:49:53.000Z
superset/db_engine_specs/presto.py
cloudnativecube/superset
53bed682f79b3894e0c0b67908c8765bbf71e2ec
[ "Apache-2.0" ]
1
2021-05-05T12:21:58.000Z
2021-05-05T12:21:58.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
40.729853
126
0.566922
import dataclasses import logging import re import textwrap import time from collections import defaultdict, deque from contextlib import closing from datetime import datetime from distutils.version import StrictVersion from typing import Any, cast, Dict, List, Optional, Tuple, TYPE_CHECKING, Union from urllib import p...
true
true
1c186941b75289873e66da2c35d8b4ffac68ee67
1,363
py
Python
app/admin/github.py
BeanWei/Mr.Bean
f9bd589a42165fc233b72f51973840dcd67e37fd
[ "MIT" ]
null
null
null
app/admin/github.py
BeanWei/Mr.Bean
f9bd589a42165fc233b72f51973840dcd67e37fd
[ "MIT" ]
null
null
null
app/admin/github.py
BeanWei/Mr.Bean
f9bd589a42165fc233b72f51973840dcd67e37fd
[ "MIT" ]
null
null
null
from flask import url_for, session, redirect, request, flash, current_app from flask_oauthlib.client import OAuth from app.admin import bp import os oauth = OAuth(current_app) github = oauth.remote_app( 'github', consumer_key = os.environ.get('Client_ID'), consumer_secret = os.environ.get('Client_secret')...
28.395833
81
0.676449
from flask import url_for, session, redirect, request, flash, current_app from flask_oauthlib.client import OAuth from app.admin import bp import os oauth = OAuth(current_app) github = oauth.remote_app( 'github', consumer_key = os.environ.get('Client_ID'), consumer_secret = os.environ.get('Client_secret')...
true
true
1c1869d2e0d250918a89bcc40b467220bacbf8ee
146
py
Python
cogs/utils/my_errors.py
msingstad/ProgBott
3ae6daf3aebef87f58a00c1c3fad7abeabcf182d
[ "MIT" ]
4
2020-03-27T21:20:46.000Z
2020-07-19T20:53:16.000Z
cogs/utils/my_errors.py
msingstad/ProgBott
3ae6daf3aebef87f58a00c1c3fad7abeabcf182d
[ "MIT" ]
9
2020-07-09T23:26:14.000Z
2021-04-11T15:31:10.000Z
cogs/utils/my_errors.py
msingstad/ProgBott
3ae6daf3aebef87f58a00c1c3fad7abeabcf182d
[ "MIT" ]
10
2020-03-27T16:39:03.000Z
2021-01-20T17:37:39.000Z
# Discord Packages from discord.ext.commands.errors import CommandError class NoDM(CommandError): pass class NoToken(Exception): pass
13.272727
52
0.760274
from discord.ext.commands.errors import CommandError class NoDM(CommandError): pass class NoToken(Exception): pass
true
true
1c1869ede4c0c8ae1ceff1fe94aa4069b24a7211
685
py
Python
Analytics/initdb.py
thanosbnt/SharingCitiesDashboard
5d123691d1f25d0b85e20e4e8293266bf23c9f8a
[ "Apache-2.0" ]
4
2018-11-21T14:42:18.000Z
2020-05-11T10:52:59.000Z
Analytics/initdb.py
thanosbnt/SharingCitiesDashboard
5d123691d1f25d0b85e20e4e8293266bf23c9f8a
[ "Apache-2.0" ]
60
2018-11-21T15:11:59.000Z
2019-12-02T10:46:44.000Z
Analytics/initdb.py
thanosbnt/SharingCitiesDashboard
5d123691d1f25d0b85e20e4e8293266bf23c9f8a
[ "Apache-2.0" ]
7
2018-11-21T14:42:44.000Z
2019-11-28T16:24:14.000Z
import os import sys sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) from Analytics.app import create_app import sqlalchemy """ Initialise the Database """ app = create_app() db_uri = '%s://%s:%s@%s/' % ( app.config["'db_psql_base_uri"], app.config['db_username'], app.config[...
28.541667
79
0.693431
import os import sys sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) from Analytics.app import create_app import sqlalchemy app = create_app() db_uri = '%s://%s:%s@%s/' % ( app.config["'db_psql_base_uri"], app.config['db_username'], app.config['db_password'], app.config['db_h...
true
true
1c186ac127675be8c0ef8448300d46c53a4e4ab6
1,565
py
Python
law/urls.py
nmota/public-contracts
b809df82147e5e4fa746416c0f9d51db2c6db05a
[ "BSD-3-Clause" ]
25
2015-03-05T00:15:11.000Z
2021-04-04T18:50:43.000Z
law/urls.py
nmota/public-contracts
b809df82147e5e4fa746416c0f9d51db2c6db05a
[ "BSD-3-Clause" ]
36
2015-03-21T17:04:54.000Z
2017-07-06T10:35:51.000Z
law/urls.py
nmota/public-contracts
b809df82147e5e4fa746416c0f9d51db2c6db05a
[ "BSD-3-Clause" ]
7
2015-03-24T16:18:02.000Z
2019-05-29T11:51:01.000Z
from django.conf.urls import patterns, url from django.utils.translation import ugettext_lazy as _ from . import views, views_data, feed urlpatterns = patterns( '', url(r'^%s/%s$' % (_('law'), _('home')), views.home, name='law_home'), url(r'^%s/%s$' % (_('law'), _('analysis')), views.analysis_list, name='...
40.128205
91
0.561022
from django.conf.urls import patterns, url from django.utils.translation import ugettext_lazy as _ from . import views, views_data, feed urlpatterns = patterns( '', url(r'^%s/%s$' % (_('law'), _('home')), views.home, name='law_home'), url(r'^%s/%s$' % (_('law'), _('analysis')), views.analysis_list, name='...
true
true
1c186d4c3793be74cbc21b882eef53de0507d7ef
23,695
py
Python
python/src/cloudstorage/cloudstorage_api.py
Weiyue-Z/appengine-gcs-client
6c95edd8f2c9a27b9daf800f0080296942ab0436
[ "Apache-2.0" ]
790
2015-01-03T02:13:39.000Z
2020-05-10T19:53:57.000Z
lib/cloudstorage/cloudstorage_api.py
jesman/schemaorg
6649c41e56a9724eaeed25dedf67736258f922bf
[ "Apache-2.0" ]
1,361
2015-01-08T23:09:40.000Z
2020-04-14T00:03:04.000Z
lib/cloudstorage/cloudstorage_api.py
jesman/schemaorg
6649c41e56a9724eaeed25dedf67736258f922bf
[ "Apache-2.0" ]
155
2015-01-08T22:59:31.000Z
2020-04-08T08:01:53.000Z
# Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
35.155786
80
0.668031
from __future__ import with_statement __all__ = ['copy2', 'delete', 'listbucket', 'open', 'stat', 'compose', 'get_location', 'get_storage_class', ] import logging import StringIO import urllib import os import itertools impor...
true
true
1c186da6781e2d384b71e3016f79acf360f5311a
17,565
py
Python
core/utils.py
opensourceai/yolov3-tensorflow-cn
2e41fb40cd2a2c8f60152cf51be6b657b9aadb1a
[ "MIT" ]
46
2019-09-26T11:57:27.000Z
2021-10-17T08:59:04.000Z
core/utils.py
zzl2001/yolov3-tensorflow-cn
2e41fb40cd2a2c8f60152cf51be6b657b9aadb1a
[ "MIT" ]
3
2019-10-10T02:44:27.000Z
2020-09-09T03:07:55.000Z
core/utils.py
zzl2001/yolov3-tensorflow-cn
2e41fb40cd2a2c8f60152cf51be6b657b9aadb1a
[ "MIT" ]
16
2019-11-20T08:19:37.000Z
2020-10-10T02:13:20.000Z
import colorsys import numpy as np import tensorflow as tf from collections import Counter from PIL import ImageFont, ImageDraw # Discard all boxes with low scores and high IOU 丢弃所有低分和高IOU的盒子,和自身iou高的boxe def gpu_nms(boxes, scores, num_classes, max_boxes=50, score_thresh=0.3, iou_thresh=0.5): """ /*----------...
39.829932
113
0.60222
import colorsys import numpy as np import tensorflow as tf from collections import Counter from PIL import ImageFont, ImageDraw def gpu_nms(boxes, scores, num_classes, max_boxes=50, score_thresh=0.3, iou_thresh=0.5): boxes_list, label_list, score_list = [], [], [] max_boxes = tf.constant(max_boxes, dtype='in...
true
true
1c186eee9d35c6c9bb7b790cdc63b9b8bcea5c73
20,357
py
Python
dspn/Object-Detection-Metrics-State/lib/Evaluator.py
rishabh1694/dspn-mod
94794bc64785a63d5a957214ae29b830c2a4bc3a
[ "MIT" ]
102
2019-06-23T21:32:17.000Z
2022-02-22T14:13:33.000Z
dspn/Object-Detection-Metrics-State/lib/Evaluator.py
rishabh1694/dspn-mod
94794bc64785a63d5a957214ae29b830c2a4bc3a
[ "MIT" ]
7
2019-10-11T11:53:47.000Z
2020-11-05T21:39:15.000Z
dspn/Object-Detection-Metrics-State/lib/Evaluator.py
rishabh1694/dspn-mod
94794bc64785a63d5a957214ae29b830c2a4bc3a
[ "MIT" ]
21
2019-08-05T20:20:41.000Z
2021-04-22T08:56:24.000Z
########################################################################################### # # # Evaluator class: Implements the most popular metrics for object detection # # ...
44.642544
103
0.512649
import os import sys from collections import Counter, defaultdict import matplotlib.pyplot as plt import numpy as np from BoundingBox import * from BoundingBoxes import * from utils import * class Evaluator: def GetPascalVOCMetrics( self, boundingboxes, IOUThreshold=0.5, method=...
true
true
1c186fd66c30a1e92595146eb04f91a0916cc438
418
py
Python
publications/models.py
greenelab/tribe
7e499b03a56f8d5ae22b540dbccb071edd84d79c
[ "BSD-3-Clause" ]
4
2020-07-24T01:06:09.000Z
2021-11-08T11:18:24.000Z
publications/models.py
greenelab/tribe
7e499b03a56f8d5ae22b540dbccb071edd84d79c
[ "BSD-3-Clause" ]
49
2017-08-01T18:59:58.000Z
2022-02-12T01:54:53.000Z
publications/models.py
greenelab/tribe
7e499b03a56f8d5ae22b540dbccb071edd84d79c
[ "BSD-3-Clause" ]
3
2017-08-01T21:12:05.000Z
2017-10-02T20:37:07.000Z
from django.db import models class Publication(models.Model): pmid = models.IntegerField(null=True, unique=True, db_index=True) title = models.TextField() authors = models.TextField() date = models.DateField() journal = models.TextField() volume = models.TextField(blank=True, null=True) pa...
32.153846
69
0.712919
from django.db import models class Publication(models.Model): pmid = models.IntegerField(null=True, unique=True, db_index=True) title = models.TextField() authors = models.TextField() date = models.DateField() journal = models.TextField() volume = models.TextField(blank=True, null=True) pa...
true
true
1c186fdace0be9bda3ef942b74e7182ca4d8354d
12,166
py
Python
bokeh/util/compiler.py
areaweb/bokeh
9d131e45d626a912e85aee5b2647139c194dc893
[ "BSD-3-Clause" ]
1
2020-02-06T05:27:53.000Z
2020-02-06T05:27:53.000Z
bokeh/util/compiler.py
areaweb/bokeh
9d131e45d626a912e85aee5b2647139c194dc893
[ "BSD-3-Clause" ]
null
null
null
bokeh/util/compiler.py
areaweb/bokeh
9d131e45d626a912e85aee5b2647139c194dc893
[ "BSD-3-Clause" ]
null
null
null
''' Provide functions and classes to help with various JS and CSS compilation. ''' from __future__ import absolute_import import logging logger = logging.getLogger(__name__) import io import re import os import sys import six import json import hashlib from os.path import dirname, join, abspath, exists, isabs from s...
28.227378
111
0.600608
from __future__ import absolute_import import logging logger = logging.getLogger(__name__) import io import re import os import sys import six import json import hashlib from os.path import dirname, join, abspath, exists, isabs from subprocess import Popen, PIPE from ..model import Model from ..settings import setti...
true
true
1c18705768b104ce71c0528933ba350cb70cbb88
696
py
Python
enaml/layout/linear_symbolic.py
rogererens/enaml
06cd917dfa4f8b924e871a8c6360ce3ef2e45971
[ "BSD-3-Clause-Clear" ]
null
null
null
enaml/layout/linear_symbolic.py
rogererens/enaml
06cd917dfa4f8b924e871a8c6360ce3ef2e45971
[ "BSD-3-Clause-Clear" ]
1
2019-08-22T14:38:24.000Z
2019-08-22T14:38:24.000Z
enaml/layout/linear_symbolic.py
rogererens/enaml
06cd917dfa4f8b924e871a8c6360ce3ef2e45971
[ "BSD-3-Clause-Clear" ]
null
null
null
#------------------------------------------------------------------------------ # Copyright (c) 2013, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------------------------------------------...
29
79
0.604885
from abc import ABCMeta from enaml.compat import with_metaclass import kiwisolver as kiwi class LinearSymbolic(with_metaclass(ABCMeta, object)): LinearSymbolic.register(kiwi.Variable) LinearSymbolic.register(kiwi.Term) LinearSymbolic.register(kiwi.Expression)
true
true
1c18714b3d53d45bfb3e0c81b71c598fc8267d8b
16,710
py
Python
41.py
pyweeker/red7
793b53fd4c508e88f2265938f4b65b3a37639211
[ "MIT" ]
null
null
null
41.py
pyweeker/red7
793b53fd4c508e88f2265938f4b65b3a37639211
[ "MIT" ]
null
null
null
41.py
pyweeker/red7
793b53fd4c508e88f2265938f4b65b3a37639211
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 # -*- coding: utf-8 -*- from math import * import os from random import shuffle from termcolor import colored import random import itertools import operator import more_itertools as mit #-------------------------------------------------------------- CST #PLAYERS_NB = 2 PLAYERS_NB = 4 ...
18.712206
202
0.614363
from math import * import os from random import shuffle from termcolor import colored import random import itertools import operator import more_itertools as mit PLAYERS_NB = 4 DISTRIBSIZE = 8 MOD7dict = {0: "red", 6: "grey", 5: "yellow", 4: "green", 3: "blue", 2: "cyan", 1: "magenta"} def color_code(ca...
true
true
1c18717869e4d8b90e870fc00817ff4c5d0f433c
72
py
Python
api/shows/schemas/__init__.py
mmvo91/series-tracker
747f124c3996ce47fe8465fcfc23d199c1f9c888
[ "MIT" ]
1
2020-11-20T22:07:37.000Z
2020-11-20T22:07:37.000Z
api/shows/schemas/__init__.py
mmvo91/series-tracker
747f124c3996ce47fe8465fcfc23d199c1f9c888
[ "MIT" ]
2
2021-04-30T08:45:54.000Z
2021-04-30T08:49:24.000Z
api/shows/schemas/__init__.py
mmvo91/series-tracker
747f124c3996ce47fe8465fcfc23d199c1f9c888
[ "MIT" ]
null
null
null
from .show import * from .subscription import * from .universe import *
18
27
0.75
from .show import * from .subscription import * from .universe import *
true
true
1c187259d8d5747f30681046fa67c059d81b60b6
29,901
py
Python
itanium_demangler/__init__.py
CraftSpider/python-itanium_demangler
a733a9496565631e820e372985ca9551a5077c75
[ "0BSD" ]
20
2018-10-09T19:52:55.000Z
2022-03-13T07:01:29.000Z
itanium_demangler/__init__.py
CraftSpider/python-itanium_demangler
a733a9496565631e820e372985ca9551a5077c75
[ "0BSD" ]
11
2019-11-13T15:20:50.000Z
2020-04-14T15:35:53.000Z
itanium_demangler/__init__.py
CraftSpider/python-itanium_demangler
a733a9496565631e820e372985ca9551a5077c75
[ "0BSD" ]
4
2019-11-13T12:53:25.000Z
2021-08-21T14:25:49.000Z
# encoding:utf-8 name = "itanium_demangler" """ This module implements a C++ Itanium ABI demangler. The demangler provides a single entry point, `demangle`, and returns either `None` or an abstract syntax tree. All nodes have, at least, a `kind` field. Name nodes: * `name`: `node.value` (`str`) holds an unqualif...
33.112957
98
0.542089
name = "itanium_demangler" import re from collections import namedtuple class _Cursor: def __init__(self, raw, pos=0): self._raw = raw self._pos = pos self._substs = {} def at_end(self): return self._pos == len(self._raw) def accept(self, delim): if self._raw[se...
true
true
1c18736ace75635c9db9e3bd93dba6e4baa7d550
1,858
py
Python
showyourwork/workflow/scripts/pdf.py
showyourwork/showyourwork
c7661528e9d5bbc143630d400008fbb891787f4b
[ "MIT" ]
null
null
null
showyourwork/workflow/scripts/pdf.py
showyourwork/showyourwork
c7661528e9d5bbc143630d400008fbb891787f4b
[ "MIT" ]
null
null
null
showyourwork/workflow/scripts/pdf.py
showyourwork/showyourwork
c7661528e9d5bbc143630d400008fbb891787f4b
[ "MIT" ]
null
null
null
""" Compiles the article manuscript into a PDF. """ from showyourwork import paths from showyourwork.tex import compile_tex import sys import shutil from pathlib import Path from jinja2 import Environment, BaseLoader if __name__ == "__main__": # Snakemake config (available automagically) config = snakemake....
26.927536
77
0.606028
from showyourwork import paths from showyourwork.tex import compile_tex import sys import shutil from pathlib import Path from jinja2 import Environment, BaseLoader if __name__ == "__main__": config = snakemake.config TEMPLATE = r""" ((* if github_actions *)) \OnGithubActionstrue ((* el...
true
true
1c18756f821aa448b0036dc0a7f81c924ad6e3b4
5,369
py
Python
serveradmin/resources/views.py
lamaral/serveradmin
d7444eef49b419dba89f9bf8a4883a82f0f143ac
[ "MIT" ]
null
null
null
serveradmin/resources/views.py
lamaral/serveradmin
d7444eef49b419dba89f9bf8a4883a82f0f143ac
[ "MIT" ]
null
null
null
serveradmin/resources/views.py
lamaral/serveradmin
d7444eef49b419dba89f9bf8a4883a82f0f143ac
[ "MIT" ]
null
null
null
"""Serveradmin - Graphite Integration Copyright (c) 2019 InnoGames GmbH """ from collections import OrderedDict from django.conf import settings from django.contrib.auth.decorators import login_required from django.core.exceptions import ValidationError from django.urls import reverse from django.http import HttpRes...
34.863636
77
0.626374
from collections import OrderedDict from django.conf import settings from django.contrib.auth.decorators import login_required from django.core.exceptions import ValidationError from django.urls import reverse from django.http import HttpResponseBadRequest from django.template.response import TemplateResponse from dj...
true
true
1c1877697c6f5e99275a8bb1d1a56b6386e22eeb
562
py
Python
py-websockets/app.py
oliviawall/tutorial-code
b994e9a5285a4497c549cbf33cb4f4d4c4813f54
[ "MIT" ]
231
2020-03-11T16:27:44.000Z
2022-03-29T17:35:45.000Z
py-websockets/app.py
oliviawall/tutorial-code
b994e9a5285a4497c549cbf33cb4f4d4c4813f54
[ "MIT" ]
10
2020-04-27T11:42:18.000Z
2022-02-05T16:33:05.000Z
py-websockets/app.py
oliviawall/tutorial-code
b994e9a5285a4497c549cbf33cb4f4d4c4813f54
[ "MIT" ]
356
2020-05-07T09:14:25.000Z
2022-03-31T12:16:24.000Z
import asyncio import websockets connected = set() async def server(websocket, path): # Register. connected.add(websocket) try: async for message in websocket: for conn in connected: if conn != websocket: await conn.send(f'Got a new MSG FOR YOU: {mes...
24.434783
72
0.651246
import asyncio import websockets connected = set() async def server(websocket, path): connected.add(websocket) try: async for message in websocket: for conn in connected: if conn != websocket: await conn.send(f'Got a new MSG FOR YOU: {message}') ...
true
true
1c187787286178473d960d13d15d8f895300c57f
2,802
py
Python
tests/formats/gate.py
arianpasquali/ternip
09c5f5eb864a36ea229b96951f8590418038e8a1
[ "Apache-2.0" ]
null
null
null
tests/formats/gate.py
arianpasquali/ternip
09c5f5eb864a36ea229b96951f8590418038e8a1
[ "Apache-2.0" ]
null
null
null
tests/formats/gate.py
arianpasquali/ternip
09c5f5eb864a36ea229b96951f8590418038e8a1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import unittest from ternip.formats.gate import GateDocument from ternip.timex import Timex class GateDocumentTest(unittest.TestCase): def test_get_sents(self): t = GateDocument("""This POS B 20101010 is POS I a POS I sentence POS I . . I And POS B a POS I second POS I sentence ...
27.203883
309
0.552106
import unittest from ternip.formats.gate import GateDocument from ternip.timex import Timex class GateDocumentTest(unittest.TestCase): def test_get_sents(self): t = GateDocument("""This POS B 20101010 is POS I a POS I sentence POS I . . I And POS B a POS I second POS I sentence POS I . POS I Outside ...
true
true
1c1877e90a61a80851cd3a3dbdd7e120338b799c
40,678
py
Python
spotipy/client.py
cato976/spotipy
bacb3cbe8e5e430d05f66ffee1a4bf415bc02dea
[ "MIT" ]
null
null
null
spotipy/client.py
cato976/spotipy
bacb3cbe8e5e430d05f66ffee1a4bf415bc02dea
[ "MIT" ]
null
null
null
spotipy/client.py
cato976/spotipy
bacb3cbe8e5e430d05f66ffee1a4bf415bc02dea
[ "MIT" ]
null
null
null
# coding: utf-8 from __future__ import print_function import sys import requests import json import time import six """ A simple and thin Python library for the Spotify Web API """ class SpotifyException(Exception): def __init__(self, http_status, code, msg, headers=None): self.http_status = http_stat...
38.267168
154
0.557058
from __future__ import print_function import sys import requests import json import time import six class SpotifyException(Exception): def __init__(self, http_status, code, msg, headers=None): self.http_status = http_status self.code = code self.msg = msg if hea...
true
true
1c1878517bcaa200cd9d20e8e0a590cd7c902b42
953
py
Python
zaifbot/exchange/candle_sticks.py
fcce-proj/zaifbot
480892463019b94bc286767818c02a6cd2b0d29f
[ "MIT" ]
47
2017-05-10T12:24:35.000Z
2020-09-10T10:41:47.000Z
zaifbot/exchange/candle_sticks.py
fcce-proj/zaifbot
480892463019b94bc286767818c02a6cd2b0d29f
[ "MIT" ]
114
2017-04-17T05:36:33.000Z
2020-01-31T00:22:29.000Z
zaifbot/exchange/candle_sticks.py
fcce-proj/zaifbot
480892463019b94bc286767818c02a6cd2b0d29f
[ "MIT" ]
14
2017-06-11T06:14:16.000Z
2020-07-31T21:01:53.000Z
from zaifbot.db.dao.candle_sticks import CandleSticksDao from zaifbot.exchange.period import Period from zaifbot.exchange.currency_pairs import CurrencyPair from zaifbot.utils.utils import int_epoch_time class CandleSticks: MAX_COUNT = 1500 def __init__(self, currency_pair, period): self._currency_pa...
38.12
78
0.752361
from zaifbot.db.dao.candle_sticks import CandleSticksDao from zaifbot.exchange.period import Period from zaifbot.exchange.currency_pairs import CurrencyPair from zaifbot.utils.utils import int_epoch_time class CandleSticks: MAX_COUNT = 1500 def __init__(self, currency_pair, period): self._currency_pa...
true
true
1c1879da8be3d7a63f02c7d4e71364290ce0780a
1,103
py
Python
app.py
thelonster/Dog-Breed-Detector
d7be07063c9391755fb678aef26948e721abda3c
[ "MIT" ]
null
null
null
app.py
thelonster/Dog-Breed-Detector
d7be07063c9391755fb678aef26948e721abda3c
[ "MIT" ]
null
null
null
app.py
thelonster/Dog-Breed-Detector
d7be07063c9391755fb678aef26948e721abda3c
[ "MIT" ]
null
null
null
from flask import Flask, render_template, request from flask_uploads import UploadSet, configure_uploads, IMAGES import os app = Flask(__name__) photos = UploadSet('photos', IMAGES) app.config['UPLOADED_PHOTOS_DEST'] = 'static/img' configure_uploads(app, photos) @app.route('/', methods=['GET', 'POST']) def upload(...
33.424242
128
0.665458
from flask import Flask, render_template, request from flask_uploads import UploadSet, configure_uploads, IMAGES import os app = Flask(__name__) photos = UploadSet('photos', IMAGES) app.config['UPLOADED_PHOTOS_DEST'] = 'static/img' configure_uploads(app, photos) @app.route('/', methods=['GET', 'POST']) def upload(...
true
true
1c187a1bbfbbd24ed0c3fbceac7e2349d824978c
6,029
py
Python
catalyst/core/callbacks/optimizer.py
YaLTeR/catalyst
4b875b50b3c63ac2dac1f19399af0c016dfb4e2f
[ "Apache-2.0" ]
null
null
null
catalyst/core/callbacks/optimizer.py
YaLTeR/catalyst
4b875b50b3c63ac2dac1f19399af0c016dfb4e2f
[ "Apache-2.0" ]
null
null
null
catalyst/core/callbacks/optimizer.py
YaLTeR/catalyst
4b875b50b3c63ac2dac1f19399af0c016dfb4e2f
[ "Apache-2.0" ]
null
null
null
from typing import Callable, Dict, List import logging import warnings from catalyst.core import ( Callback, CallbackNode, CallbackOrder, registry, State, utils, ) from catalyst.tools.typing import Optimizer logger = logging.getLogger(__name__) class OptimizerCallback(Callback): """Optim...
33.126374
97
0.588655
from typing import Callable, Dict, List import logging import warnings from catalyst.core import ( Callback, CallbackNode, CallbackOrder, registry, State, utils, ) from catalyst.tools.typing import Optimizer logger = logging.getLogger(__name__) class OptimizerCallback(Callback): def __i...
true
true
1c187a8188332cb574b7e5fa163041c92a55fbce
3,979
py
Python
tests/models/test_amp.py
cmpute/pytorch-lightning
695e0514f8e60a88f49786c33311f223be2e7357
[ "Apache-2.0" ]
1
2020-09-18T04:30:37.000Z
2020-09-18T04:30:37.000Z
tests/models/test_amp.py
cmpute/pytorch-lightning
695e0514f8e60a88f49786c33311f223be2e7357
[ "Apache-2.0" ]
null
null
null
tests/models/test_amp.py
cmpute/pytorch-lightning
695e0514f8e60a88f49786c33311f223be2e7357
[ "Apache-2.0" ]
null
null
null
import os import pytest import torch import tests.base.develop_pipelines as tpipes import tests.base.develop_utils as tutils from pytorch_lightning import Trainer from pytorch_lightning.utilities.exceptions import MisconfigurationException from tests.base import EvalModelTemplate @pytest.mark.spawn @pytest.mark.par...
28.625899
92
0.688113
import os import pytest import torch import tests.base.develop_pipelines as tpipes import tests.base.develop_utils as tutils from pytorch_lightning import Trainer from pytorch_lightning.utilities.exceptions import MisconfigurationException from tests.base import EvalModelTemplate @pytest.mark.spawn @pytest.mark.par...
true
true
1c187ce118de3777b500fa704b770c92e92c3654
489,739
py
Python
src/gam/__init__.py
GAM-team/GAM
b45ad5dcafc217690afc3c2e7086c1895f036172
[ "Apache-2.0" ]
102
2022-01-15T22:08:37.000Z
2022-03-31T16:02:20.000Z
src/gam/__init__.py
GAM-team/GAM
b45ad5dcafc217690afc3c2e7086c1895f036172
[ "Apache-2.0" ]
29
2022-01-14T20:16:51.000Z
2022-03-25T15:56:33.000Z
src/gam/__init__.py
GAM-team/GAM
b45ad5dcafc217690afc3c2e7086c1895f036172
[ "Apache-2.0" ]
30
2022-01-14T22:18:10.000Z
2022-03-31T17:31:40.000Z
"""Main behavioral methods and argument routing for GAM.""" import base64 import configparser import csv import datetime from email import message_from_string try: from importlib.metadata import version as lib_version except ImportError: from importlib_metadata import version as lib_version import io import j...
39.809706
210
0.525249
import base64 import configparser import csv import datetime from email import message_from_string try: from importlib.metadata import version as lib_version except ImportError: from importlib_metadata import version as lib_version import io import json import mimetypes import os import platform from pathlib ...
true
true
1c187d79fd50ccfc3cdb25ca7c6022c48e3cb183
63,338
py
Python
sympy/ntheory/factor_.py
krishna-akula/sympy
54037d7ae760fec6f30721facb3dece912da12fa
[ "BSD-3-Clause" ]
null
null
null
sympy/ntheory/factor_.py
krishna-akula/sympy
54037d7ae760fec6f30721facb3dece912da12fa
[ "BSD-3-Clause" ]
null
null
null
sympy/ntheory/factor_.py
krishna-akula/sympy
54037d7ae760fec6f30721facb3dece912da12fa
[ "BSD-3-Clause" ]
null
null
null
""" Integer factorization """ from __future__ import print_function, division import random import math from sympy.core import sympify from sympy.core.compatibility import as_int, SYMPY_INTS, range, string_types from sympy.core.evalf import bitcount from sympy.core.expr import Expr from sympy.core.function import Fun...
28.275893
100
0.535903
from __future__ import print_function, division import random import math from sympy.core import sympify from sympy.core.compatibility import as_int, SYMPY_INTS, range, string_types from sympy.core.evalf import bitcount from sympy.core.expr import Expr from sympy.core.function import Function from sympy.core.logic im...
true
true
1c187e4e752c608921ac83f716a885527b204ffa
858
py
Python
tests/test_pyxutils.py
tflynn/pyxutils
5aeb2a9f679dcc8098491debff4e47b3d6c45331
[ "MIT" ]
null
null
null
tests/test_pyxutils.py
tflynn/pyxutils
5aeb2a9f679dcc8098491debff4e47b3d6c45331
[ "MIT" ]
null
null
null
tests/test_pyxutils.py
tflynn/pyxutils
5aeb2a9f679dcc8098491debff4e47b3d6c45331
[ "MIT" ]
null
null
null
import os from os import path import unittest from pyxutils import paths class Testpyxutils(unittest.TestCase): def test_001_guess_package(self): current_package = paths.guess_package() self.assertEqual(current_package, 'tests') def test_002_package_dir(self): # Cheat a little sin...
30.642857
88
0.699301
import os from os import path import unittest from pyxutils import paths class Testpyxutils(unittest.TestCase): def test_001_guess_package(self): current_package = paths.guess_package() self.assertEqual(current_package, 'tests') def test_002_package_dir(self): current_dir ...
true
true
1c187ed47e2634766bbc6faba62694e192975852
396
gyp
Python
third_party/polymer/v1_0/components-chromium/app-layout/app-toolbar/compiled_resources2.gyp
xzhan96/chromium.src
1bd0cf3997f947746c0fc5406a2466e7b5f6159e
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2019-01-28T08:09:58.000Z
2021-11-15T15:32:10.000Z
third_party/polymer/v1_0/components-chromium/app-layout/app-toolbar/compiled_resources2.gyp
emilio/chromium.src
1bd0cf3997f947746c0fc5406a2466e7b5f6159e
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
third_party/polymer/v1_0/components-chromium/app-layout/app-toolbar/compiled_resources2.gyp
emilio/chromium.src
1bd0cf3997f947746c0fc5406a2466e7b5f6159e
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
6
2020-09-23T08:56:12.000Z
2021-11-18T03:40:49.000Z
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # # NOTE: Created with generate_compiled_resources_gyp.py, please do not edit. { 'targets': [ { 'target_name': 'app-toolbar-extracted', 'inc...
28.285714
76
0.666667
{ 'targets': [ { 'target_name': 'app-toolbar-extracted', 'includes': ['../../../../../closure_compiler/compile_js2.gypi'], }, ], }
true
true
1c187f06d42de5edc9416265dd000ee274843226
664
py
Python
manage.py
karthicksakkaravarti/Acoounts
4918553d820e7d8101241d8152c9d357be50f55d
[ "MIT" ]
2
2021-09-09T14:26:48.000Z
2021-09-30T12:12:35.000Z
manage.py
javitocor/Django-Auth-Template
b253c49e50c2dac423301d1798316a7c9dd4ca7a
[ "MIT" ]
null
null
null
manage.py
javitocor/Django-Auth-Template
b253c49e50c2dac423301d1798316a7c9dd4ca7a
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'accounts.settings') try: from django.core.management import execute_from_command_line except Imp...
28.869565
73
0.679217
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'accounts.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true
1c1880ae1d72352dcce14d8e30d5ea0f71f12dc3
1,306
py
Python
isolation/indexes/GlobalLockIndex.py
robertclaus/python-database-concurrency-control
7544da10d3567a49b046599176e17763c310b252
[ "Apache-2.0" ]
null
null
null
isolation/indexes/GlobalLockIndex.py
robertclaus/python-database-concurrency-control
7544da10d3567a49b046599176e17763c310b252
[ "Apache-2.0" ]
null
null
null
isolation/indexes/GlobalLockIndex.py
robertclaus/python-database-concurrency-control
7544da10d3567a49b046599176e17763c310b252
[ "Apache-2.0" ]
null
null
null
from collections import deque class GlobalLockIndex: def __init__(self): self.locking_queries = deque() self.column_reference = {} self.equality_index = {} self.readonly = True def set_scheduled_columns(self, column_reference): self.column_reference = column_reference ...
30.372093
105
0.667688
from collections import deque class GlobalLockIndex: def __init__(self): self.locking_queries = deque() self.column_reference = {} self.equality_index = {} self.readonly = True def set_scheduled_columns(self, column_reference): self.column_reference = column_reference ...
true
true
1c18818fedad99f4b7099b6214b0129254f0508a
2,435
py
Python
data/p4VQE/R1/benchmark/startQiskit_QC21.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p4VQE/R1/benchmark/startQiskit_QC21.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p4VQE/R1/benchmark/startQiskit_QC21.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=3 # total number=8 import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ import networkx as nx from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collection...
26.758242
118
0.631622
import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ import networkx as nx from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collections import Counter from qiskit.test....
true
true
1c18828a936b220f96a40cfe843d312b9a4f4c6d
180
py
Python
src/plaso/containers/__init__.py
nesfit/pyspark-plaso
4e0680a1a79a5aebfbc7ae983da30841bf984d95
[ "Apache-2.0" ]
2
2020-02-09T01:11:08.000Z
2021-09-17T04:16:31.000Z
src/plaso/containers/__init__.py
nesfit/pyspark-plaso
4e0680a1a79a5aebfbc7ae983da30841bf984d95
[ "Apache-2.0" ]
null
null
null
src/plaso/containers/__init__.py
nesfit/pyspark-plaso
4e0680a1a79a5aebfbc7ae983da30841bf984d95
[ "Apache-2.0" ]
1
2021-03-17T09:47:01.000Z
2021-03-17T09:47:01.000Z
# -*- coding: utf-8 -*- """This file imports Python modules that register attribute container types.""" from plaso.containers import events from plaso.containers import artifacts
30
79
0.766667
from plaso.containers import events from plaso.containers import artifacts
true
true
1c188333d6028b7c79cbfcb3b38e99bc5373d71c
1,577
py
Python
tsm/gen_wts.py
siposcsaba89/tensorrtx
aad17004e0f2420babf3ea245ee2bab03e05baad
[ "MIT" ]
3,964
2019-11-26T04:45:54.000Z
2022-03-31T17:06:46.000Z
tsm/gen_wts.py
siposcsaba89/tensorrtx
aad17004e0f2420babf3ea245ee2bab03e05baad
[ "MIT" ]
864
2020-03-09T03:52:24.000Z
2022-03-31T11:20:48.000Z
tsm/gen_wts.py
siposcsaba89/tensorrtx
aad17004e0f2420babf3ea245ee2bab03e05baad
[ "MIT" ]
1,189
2019-11-29T07:38:08.000Z
2022-03-31T18:29:28.000Z
import argparse import struct import torch import numpy as np def write_one_weight(writer, name, weight): assert isinstance(weight, np.ndarray) values = weight.reshape(-1) writer.write('{} {}'.format(name, len(values))) for value in values: writer.write(' ') # float to bytes to hex_st...
33.553191
79
0.594166
import argparse import struct import torch import numpy as np def write_one_weight(writer, name, weight): assert isinstance(weight, np.ndarray) values = weight.reshape(-1) writer.write('{} {}'.format(name, len(values))) for value in values: writer.write(' ') writer.write(struc...
true
true
1c1884b83ed17d1d3f2244c75441cd6ce7f9fd8d
2,852
py
Python
pbp/callbacks/misc.py
ArnaudPannatier/pytorch-boilerplate
1e90e359fc9247ae08e416c51d46ef7a9b8fb56f
[ "MIT" ]
2
2021-06-29T20:57:46.000Z
2021-06-29T23:35:18.000Z
pbp/callbacks/misc.py
ArnaudPannatier/pytorch-boilerplate
1e90e359fc9247ae08e416c51d46ef7a9b8fb56f
[ "MIT" ]
null
null
null
pbp/callbacks/misc.py
ArnaudPannatier/pytorch-boilerplate
1e90e359fc9247ae08e416c51d46ef7a9b8fb56f
[ "MIT" ]
1
2021-04-16T07:01:52.000Z
2021-04-16T07:01:52.000Z
import json import os from os import path from subprocess import run import sys from .base import Callback class LogArguments(Callback): """LogArguments logs the experiment arguments and git hash if available in order to have reproducible runs.""" def on_train_start(self, experiment): arguments =...
30.021053
79
0.603787
import json import os from os import path from subprocess import run import sys from .base import Callback class LogArguments(Callback): def on_train_start(self, experiment): arguments = dict(experiment.arguments.items()) arguments["git_hash"] = self._get_git_hash() arguments["git_dirty"]...
true
true
1c1884d32c7147bc8965e9d0bb3b24688ec77d21
1,370
py
Python
ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/configelement/stack/fipElpSwAccFcf_template.py
Vibaswan/ixnetwork_restpy
239fedc7050890746cbabd71ea1e91c68d9e5cad
[ "MIT" ]
null
null
null
ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/configelement/stack/fipElpSwAccFcf_template.py
Vibaswan/ixnetwork_restpy
239fedc7050890746cbabd71ea1e91c68d9e5cad
[ "MIT" ]
null
null
null
ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/configelement/stack/fipElpSwAccFcf_template.py
Vibaswan/ixnetwork_restpy
239fedc7050890746cbabd71ea1e91c68d9e5cad
[ "MIT" ]
null
null
null
from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files class FIP_ELP_SW_ACC_FCF(Base): __slots__ = () _SDM_NAME = 'fipElpSwAccFcf' _SDM_ATT_MAP = { 'Version': 'fipElpSwAccFcf.header.fipVersion', 'Reserved': 'fipElpSwAccFcf.header.fipReserved', 'FIP Operatio...
34.25
90
0.714599
from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files class FIP_ELP_SW_ACC_FCF(Base): __slots__ = () _SDM_NAME = 'fipElpSwAccFcf' _SDM_ATT_MAP = { 'Version': 'fipElpSwAccFcf.header.fipVersion', 'Reserved': 'fipElpSwAccFcf.header.fipReserved', 'FIP Operatio...
true
true
1c1884e2ef1ce53504f0e8dce2e926415e2e3a68
7,962
py
Python
plugins/seo_amp.py
WaylonWalker/waylonwalker.com
68aafc93e68a6dfcf0ece154fc2b5bae06642147
[ "MIT" ]
4
2021-05-23T14:28:53.000Z
2022-02-22T02:04:48.000Z
plugins/seo_amp.py
WaylonWalker/waylonwalker.com
68aafc93e68a6dfcf0ece154fc2b5bae06642147
[ "MIT" ]
4
2021-05-04T14:03:22.000Z
2022-03-09T17:57:38.000Z
plugins/seo_amp.py
WaylonWalker/waylonwalker.com
68aafc93e68a6dfcf0ece154fc2b5bae06642147
[ "MIT" ]
6
2021-05-22T20:49:27.000Z
2022-01-17T22:32:16.000Z
"""manifest plugin""" from typing import TYPE_CHECKING, List from bs4 import BeautifulSoup from markata import Markata, __version__ from markata.hookspec import hook_impl if TYPE_CHECKING: import frontmatter from bs4.element import Tag from urllib import request as ulreq from PIL import ImageFile def gets...
30.860465
97
0.489324
from typing import TYPE_CHECKING, List from bs4 import BeautifulSoup from markata import Markata, __version__ from markata.hookspec import hook_impl if TYPE_CHECKING: import frontmatter from bs4.element import Tag from urllib import request as ulreq from PIL import ImageFile def getsizes(uri, default_heig...
true
true
1c1885e0b5cc19248ea04970e6aaa8e29ec39420
2,971
py
Python
packages/python/plotly/plotly/validators/parcats/_dimensions.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/parcats/_dimensions.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/parcats/_dimensions.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
import _plotly_utils.basevalidators class DimensionsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): def __init__(self, plotly_name="dimensions", parent_name="parcats", **kwargs): super(DimensionsValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_...
44.343284
82
0.5621
import _plotly_utils.basevalidators class DimensionsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): def __init__(self, plotly_name="dimensions", parent_name="parcats", **kwargs): super(DimensionsValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_...
true
true
1c18861ff0d781dc8819e25dad289754d131f489
41,586
py
Python
vendor/github.com/influxdata/influxdb/build.py
bsdavidson/trimetric
6501577a8925aa65f499a461917b2f085b58c4c0
[ "MIT" ]
12
2016-09-16T18:51:45.000Z
2021-12-04T22:06:58.000Z
vendor/github.com/influxdata/influxdb/build.py
bsdavidson/trimetric
6501577a8925aa65f499a461917b2f085b58c4c0
[ "MIT" ]
2
2020-12-01T22:17:16.000Z
2021-09-03T22:30:54.000Z
vendor/github.com/influxdata/influxdb/build.py
bsdavidson/trimetric
6501577a8925aa65f499a461917b2f085b58c4c0
[ "MIT" ]
3
2018-03-12T02:49:29.000Z
2022-02-16T07:40:50.000Z
#!/usr/bin/python2.7 -u import sys import os import subprocess import time from datetime import datetime import shutil import tempfile import hashlib import re import logging import argparse ################ #### InfluxDB Variables ################ # Packaging variables PACKAGE_NAME = "influxdb" INSTALL_ROOT_DIR = "...
41.921371
135
0.534555
import sys import os import subprocess import time from datetime import datetime import shutil import tempfile import hashlib import re import logging import argparse PACKAGE_NAME = "influxdb" INSTALL_ROOT_DIR = "/usr/bin" LOG_DIR = "/var/log/influxdb" DATA_DIR = "/var/lib/influxdb" SCRIPT_DIR = "/usr/lib/influxdb/s...
true
true
1c1886efdbf686349e9e5bd9cc559cba69da684e
14,932
py
Python
lib/coinchooser.py
lindong58/wochain-electrum
df7dae1c584eb12213e3ef58e62052ffee4fcd73
[ "MIT" ]
null
null
null
lib/coinchooser.py
lindong58/wochain-electrum
df7dae1c584eb12213e3ef58e62052ffee4fcd73
[ "MIT" ]
null
null
null
lib/coinchooser.py
lindong58/wochain-electrum
df7dae1c584eb12213e3ef58e62052ffee4fcd73
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2015 kyuupichan@gmail # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including withou...
38.885417
83
0.626842
from collections import defaultdict, namedtuple from math import floor, log10 from .bitcoin import sha256, COIN, TYPE_ADDRESS from .transaction import Transaction from .util import NotEnoughFunds, PrintError, profiler class PRNG: def __init__(self, seed): self.sha = sha256(seed) self.pool = bytea...
true
true
1c1886faff6333ee6d691e3ba16bb559ce53c361
501
py
Python
python/labs/make-a-short-story/mystory.py
aa1215/cssi_2018
0f18fefb1e681f1abe8b3b22277d8f441d8e973a
[ "Apache-2.0" ]
null
null
null
python/labs/make-a-short-story/mystory.py
aa1215/cssi_2018
0f18fefb1e681f1abe8b3b22277d8f441d8e973a
[ "Apache-2.0" ]
null
null
null
python/labs/make-a-short-story/mystory.py
aa1215/cssi_2018
0f18fefb1e681f1abe8b3b22277d8f441d8e973a
[ "Apache-2.0" ]
null
null
null
noun1 = input("Give me a singular noun: ") adjective1 = input("Give me an adjective: ") noun2 = input("Give me a singular noun: ") verb1 = input("Give me a singular verb: ") print('The ' + noun1 + ' jumped over a ' + adjective1 + ' ' + noun2 + '.' + ' Then the ' + noun2 + ' decided to stop being so ' + adjective1 + '...
50.1
185
0.642715
noun1 = input("Give me a singular noun: ") adjective1 = input("Give me an adjective: ") noun2 = input("Give me a singular noun: ") verb1 = input("Give me a singular verb: ") print('The ' + noun1 + ' jumped over a ' + adjective1 + ' ' + noun2 + '.' + ' Then the ' + noun2 + ' decided to stop being so ' + adjective1 + '...
true
true
1c18883754a4a228c66df5a10a59c11b602347d7
2,705
py
Python
scenarios/link-unfurling/bots/link_unfurling_bot.py
Shiftersky/botbuilder-python
e00ea990d5cb5b05d545d87c51249dfa8f183581
[ "MIT" ]
1
2020-02-19T15:50:10.000Z
2020-02-19T15:50:10.000Z
scenarios/link-unfurling/bots/link_unfurling_bot.py
Fortune-Adekogbe/botbuilder-python
4e48c874c32a2a7fe7f27a7a1f825e2aa39466c4
[ "MIT" ]
null
null
null
scenarios/link-unfurling/bots/link_unfurling_bot.py
Fortune-Adekogbe/botbuilder-python
4e48c874c32a2a7fe7f27a7a1f825e2aa39466c4
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from botbuilder.core import CardFactory, MessageFactory, TurnContext from botbuilder.schema import ChannelAccount, ThumbnailCard, CardImage, HeroCard, Attachment from botbuilder.schema.teams import AppBasedLinkQuery, Messagin...
47.45614
162
0.604067
from botbuilder.core import CardFactory, MessageFactory, TurnContext from botbuilder.schema import ChannelAccount, ThumbnailCard, CardImage, HeroCard, Attachment from botbuilder.schema.teams import AppBasedLinkQuery, MessagingExtensionAttachment, MessagingExtensionQuery, MessagingExtensionResult, MessagingExtensionRes...
true
true
1c188880cf100844f46a7c16b32b05afb4667cf2
226
py
Python
setup.py
nikitamundra94/Enterprise_Data_Science
c9108f04a7d3a9d3faacc3f5e2600e708b869629
[ "FTL" ]
null
null
null
setup.py
nikitamundra94/Enterprise_Data_Science
c9108f04a7d3a9d3faacc3f5e2600e708b869629
[ "FTL" ]
null
null
null
setup.py
nikitamundra94/Enterprise_Data_Science
c9108f04a7d3a9d3faacc3f5e2600e708b869629
[ "FTL" ]
null
null
null
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='Exploring covid cases across different countries', author='nikita', license='', )
20.545455
67
0.681416
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='Exploring covid cases across different countries', author='nikita', license='', )
true
true
1c188887b2f9d563b0c6cd40c08d8675f977a738
23,404
py
Python
selfdrive/car/hyundai/carstate.py
lth1436/openpilot_079
912c10b783544da44d770e20e18db47949cc4b80
[ "MIT" ]
null
null
null
selfdrive/car/hyundai/carstate.py
lth1436/openpilot_079
912c10b783544da44d770e20e18db47949cc4b80
[ "MIT" ]
null
null
null
selfdrive/car/hyundai/carstate.py
lth1436/openpilot_079
912c10b783544da44d770e20e18db47949cc4b80
[ "MIT" ]
null
null
null
from cereal import car from selfdrive.car.hyundai.values import DBC, STEER_THRESHOLD, FEATURES, CAR from selfdrive.car.interfaces import CarStateBase from opendbc.can.parser import CANParser from selfdrive.config import Conversions as CV from selfdrive.car.hyundai.spdcontroller import SpdController from selfdrive.car....
34.983558
141
0.573577
from cereal import car from selfdrive.car.hyundai.values import DBC, STEER_THRESHOLD, FEATURES, CAR from selfdrive.car.interfaces import CarStateBase from opendbc.can.parser import CANParser from selfdrive.config import Conversions as CV from selfdrive.car.hyundai.spdcontroller import SpdController from selfdrive.car....
true
true
1c18895bac1c7854f57760b29459b73d7dae269a
6,127
py
Python
pgSession.py
UniversalDevicesInc/udi-poly-airscape
215bbb8aead5d2a3b3be217d7af6d1e8df31499c
[ "MIT" ]
null
null
null
pgSession.py
UniversalDevicesInc/udi-poly-airscape
215bbb8aead5d2a3b3be217d7af6d1e8df31499c
[ "MIT" ]
8
2019-04-22T18:25:56.000Z
2021-07-02T21:02:43.000Z
pgSession.py
UniversalDevicesInc/udi-poly-airscape
215bbb8aead5d2a3b3be217d7af6d1e8df31499c
[ "MIT" ]
1
2019-10-23T01:37:18.000Z
2019-10-23T01:37:18.000Z
""" Work on makeing this a generic session handler for all Polyglot's """ import requests,json,re,xmltodict,unicodedata def remove_control_characters(s): res = "".join(ch for ch in s if unicodedata.category(ch)[0]!="C") return re.sub(r"\\", "", res) class pgSession(): def __init__(self,paren...
41.965753
116
0.537131
import requests,json,re,xmltodict,unicodedata def remove_control_characters(s): res = "".join(ch for ch in s if unicodedata.category(ch)[0]!="C") return re.sub(r"\\", "", res) class pgSession(): def __init__(self,parent,l_name,logger,host,port=None,debug_level=-1): self.parent = parent...
true
true
1c18899bbf06eddf6c323685bb416b47c04e6dcb
16,693
py
Python
phono3py/phonon3/interaction.py
mitwood/phono3py
9f072df30c134cc78a3ca9bd7cd096225745532f
[ "BSD-3-Clause" ]
null
null
null
phono3py/phonon3/interaction.py
mitwood/phono3py
9f072df30c134cc78a3ca9bd7cd096225745532f
[ "BSD-3-Clause" ]
null
null
null
phono3py/phonon3/interaction.py
mitwood/phono3py
9f072df30c134cc78a3ca9bd7cd096225745532f
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from phonopy.harmonic.dynamical_matrix import get_dynamical_matrix from phonopy.units import VaspToTHz, Hbar, EV, Angstrom, THz, AMU from phono3py.phonon.solver import set_phonon_c, set_phonon_py from phono3py.phonon3.real_to_reciprocal import RealToReciprocal from phono3py.phonon3.reciprocal_to_norm...
38.199085
118
0.548913
import numpy as np from phonopy.harmonic.dynamical_matrix import get_dynamical_matrix from phonopy.units import VaspToTHz, Hbar, EV, Angstrom, THz, AMU from phono3py.phonon.solver import set_phonon_c, set_phonon_py from phono3py.phonon3.real_to_reciprocal import RealToReciprocal from phono3py.phonon3.reciprocal_to_norm...
true
true
1c1889da1134f4120c88fdedd3ca0f58abf4c5f2
4,220
py
Python
qiskit/optimization/problems/quadratic_constraint.py
hushaohan/aqua
8512bc6ce246a8b3cca1e5edb1703b6885aa7c5d
[ "Apache-2.0" ]
1
2020-08-01T21:07:54.000Z
2020-08-01T21:07:54.000Z
qiskit/optimization/problems/quadratic_constraint.py
hushaohan/aqua
8512bc6ce246a8b3cca1e5edb1703b6885aa7c5d
[ "Apache-2.0" ]
null
null
null
qiskit/optimization/problems/quadratic_constraint.py
hushaohan/aqua
8512bc6ce246a8b3cca1e5edb1703b6885aa7c5d
[ "Apache-2.0" ]
1
2022-01-25T07:09:10.000Z
2022-01-25T07:09:10.000Z
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2019, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
38.715596
98
0.648815
from typing import Union, List, Dict, Tuple, Any from numpy import ndarray from scipy.sparse import spmatrix from .constraint import Constraint, ConstraintSense from .linear_expression import LinearExpression from .quadratic_expression import QuadraticExpression class QuadraticConstraint(Constraint): Se...
true
true
1c188a380e59b936d42af6562f701cdc5826b991
5,606
py
Python
lib/kb_uploadmethods/Utils/ImportExpressionMatrixUtil.py
sean-mccorkle/kb_uploadmethods
c2ccc69233496f008d861d6b6c4af8556439b16c
[ "MIT" ]
3
2020-01-13T19:31:02.000Z
2020-07-22T18:58:01.000Z
lib/kb_uploadmethods/Utils/ImportExpressionMatrixUtil.py
sean-mccorkle/kb_uploadmethods
c2ccc69233496f008d861d6b6c4af8556439b16c
[ "MIT" ]
69
2017-01-23T23:52:15.000Z
2022-02-07T23:22:25.000Z
lib/kb_uploadmethods/Utils/ImportExpressionMatrixUtil.py
sean-mccorkle/kb_uploadmethods
c2ccc69233496f008d861d6b6c4af8556439b16c
[ "MIT" ]
24
2017-01-23T19:28:10.000Z
2021-07-07T14:22:03.000Z
import time import json import uuid from installed_clients.KBaseFeatureValuesClient import KBaseFeatureValues from installed_clients.DataFileUtilClient import DataFileUtil from installed_clients.KBaseReportClient import KBaseReport from kb_uploadmethods.Utils.UploaderUtil import UploaderUtil def log(message, prefix_...
41.835821
102
0.654656
import time import json import uuid from installed_clients.KBaseFeatureValuesClient import KBaseFeatureValues from installed_clients.DataFileUtilClient import DataFileUtil from installed_clients.KBaseReportClient import KBaseReport from kb_uploadmethods.Utils.UploaderUtil import UploaderUtil def log(message, prefix_...
true
true
1c188a3b26aeee6f38e4d7cc597e5084c217a661
25,165
py
Python
tests/system_tests_link_route_credit.py
bartoval/skupper-router
b62f8376f2e2d4fb78a92bd8916b43b857ab48cc
[ "Apache-2.0" ]
null
null
null
tests/system_tests_link_route_credit.py
bartoval/skupper-router
b62f8376f2e2d4fb78a92bd8916b43b857ab48cc
[ "Apache-2.0" ]
null
null
null
tests/system_tests_link_route_credit.py
bartoval/skupper-router
b62f8376f2e2d4fb78a92bd8916b43b857ab48cc
[ "Apache-2.0" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
42.580372
115
0.56058
from proton import Message from proton.handlers import MessagingHandler from proton.reactor import Container from system_test import TestCase, Qdrouterd, main_module, TIMEOUT, TestTimeout, PollTimeout, unittest class AddrTimer: def __init__(self, parent): self.parent = parent def on_timer_task(self...
true
true
1c188affa6d245c31c04dfd2a0c1be422731e648
16,344
py
Python
carousel_updater.py
andrewryandev/carousel-updater
a2669d87d3974f6655d87258e63ef985364e2d66
[ "Apache-2.0" ]
null
null
null
carousel_updater.py
andrewryandev/carousel-updater
a2669d87d3974f6655d87258e63ef985364e2d66
[ "Apache-2.0" ]
null
null
null
carousel_updater.py
andrewryandev/carousel-updater
a2669d87d3974f6655d87258e63ef985364e2d66
[ "Apache-2.0" ]
null
null
null
import tkinter as tk from tkinter import Button, Entry, Label, ttk, StringVar, messagebox from tkinter import filedialog as fd from PIL import Image, ImageTk import os from jinja2 import Environment, FileSystemLoader import shutil import paramiko from scp import SCPClient import configparser import time impo...
33.355102
171
0.628793
import tkinter as tk from tkinter import Button, Entry, Label, ttk, StringVar, messagebox from tkinter import filedialog as fd from PIL import Image, ImageTk import os from jinja2 import Environment, FileSystemLoader import shutil import paramiko from scp import SCPClient import configparser import time impo...
true
true
1c188b2afd6b50cdd3ca5edb76f54d30c25610be
4,605
py
Python
main.py
robintwhite/scholar-scrape
c5862c2233e0564d83e142f475b0cb6466b7eb5e
[ "MIT" ]
null
null
null
main.py
robintwhite/scholar-scrape
c5862c2233e0564d83e142f475b0cb6466b7eb5e
[ "MIT" ]
null
null
null
main.py
robintwhite/scholar-scrape
c5862c2233e0564d83e142f475b0cb6466b7eb5e
[ "MIT" ]
null
null
null
# %% Imports import numpy as np import pandas as pd from scholarly import scholarly from utils import scholar import os import time import random import requests, bs4 from tqdm import tqdm # %% Get search terms from file search_terms = [] with open("search_terms.txt") as f: lines = f.readlines() for line in ...
30.7
118
0.662975
import numpy as np import pandas as pd from scholarly import scholarly from utils import scholar import os import time import random import requests, bs4 from tqdm import tqdm search_terms = [] with open("search_terms.txt") as f: lines = f.readlines() for line in lines: search_terms.append(line.strip...
true
true
1c188bac5c01f7254ff4e97c33259356c8d9bc3e
1,144
py
Python
dashboard/dashboard/pinpoint/handlers/commits.py
Martijnve23/catapult
5c63b19d221af6a12889e8727acc85d93892cab7
[ "BSD-3-Clause" ]
1
2021-07-04T03:26:43.000Z
2021-07-04T03:26:43.000Z
dashboard/dashboard/pinpoint/handlers/commits.py
Martijnve23/catapult
5c63b19d221af6a12889e8727acc85d93892cab7
[ "BSD-3-Clause" ]
null
null
null
dashboard/dashboard/pinpoint/handlers/commits.py
Martijnve23/catapult
5c63b19d221af6a12889e8727acc85d93892cab7
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import print_function from __future__ import division from __future__ import absolute_import from dashboard.api import api_request_handler f...
30.918919
74
0.699301
from __future__ import print_function from __future__ import division from __future__ import absolute_import from dashboard.api import api_request_handler from dashboard.pinpoint.models import change from dashboard.services import request class Commits(api_request_handler.ApiRequestHandler): def _CheckUser(self)...
true
true
1c188c7f5f5382ba9015fa9f140c63fb13fa334c
25,188
py
Python
Latest/venv/Lib/site-packages/envisage/ui/single_project/project.py
adamcvj/SatelliteTracker
49a8f26804422fdad6f330a5548e9f283d84a55d
[ "Apache-2.0" ]
1
2022-01-09T20:04:31.000Z
2022-01-09T20:04:31.000Z
Latest/venv/Lib/site-packages/envisage/ui/single_project/project.py
adamcvj/SatelliteTracker
49a8f26804422fdad6f330a5548e9f283d84a55d
[ "Apache-2.0" ]
1
2022-02-15T12:01:57.000Z
2022-03-24T19:48:47.000Z
Latest/venv/Lib/site-packages/envisage/ui/single_project/project.py
adamcvj/SatelliteTracker
49a8f26804422fdad6f330a5548e9f283d84a55d
[ "Apache-2.0" ]
null
null
null
# (C) Copyright 2007-2019 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in LICENSE.txt and may be redistributed only # under the conditions described in the aforementioned license. The license # is also available online a...
33.011796
86
0.606956
import logging import os import re import unicodedata from traits.etsconfig.api import ETSConfig import apptools.sweet_pickle from apptools.io.api import File from traits.api import Any, Bool, Dict, Directory, HasTraits, \ Instance, Property, Str from traitsui.api import Group, View from envisage.api import Appl...
true
true
1c188cf864262da6db664f7141e2ec56f94d57d9
7,809
py
Python
deployment/AWSDevTools/Linux/scripts/aws/dev_tools.py
jyanyuk/Blink.fm
6a4adbd202fc20913f0f5212d47f743768368a3c
[ "MIT" ]
1
2015-10-13T05:42:53.000Z
2015-10-13T05:42:53.000Z
deployment/AWSDevTools/Linux/scripts/aws/dev_tools.py
jyanyuk/Blink.fm
6a4adbd202fc20913f0f5212d47f743768368a3c
[ "MIT" ]
null
null
null
deployment/AWSDevTools/Linux/scripts/aws/dev_tools.py
jyanyuk/Blink.fm
6a4adbd202fc20913f0f5212d47f743768368a3c
[ "MIT" ]
null
null
null
from subprocess import call from subprocess import check_call from subprocess import check_output from subprocess import CalledProcessError import boto import boto.beanstalk from boto.s3 import * from boto.beanstalk.exception import * import time import sys import os import tempfile import shutil from elastic_beanstal...
39.439394
190
0.753105
from subprocess import call from subprocess import check_call from subprocess import check_output from subprocess import CalledProcessError import boto import boto.beanstalk from boto.s3 import * from boto.beanstalk.exception import * import time import sys import os import tempfile import shutil from elastic_beanstal...
false
true
1c188d05c3a9891aea8a874c5cea308afa703f96
5,768
py
Python
tests/regressiontests/m2m_through_regress/tests.py
aptivate/django-old
33b2a85150658fc7c2207ac2f5fd6f89739773e4
[ "BSD-3-Clause" ]
3
2017-02-20T20:21:11.000Z
2017-02-20T20:23:36.000Z
tests/regressiontests/m2m_through_regress/tests.py
jimmysong/django
af7af762e2a76debf9540b04ef29b5385ff70716
[ "BSD-3-Clause" ]
1
2019-02-03T08:41:30.000Z
2019-02-03T08:41:30.000Z
tests/regressiontests/m2m_through_regress/tests.py
jimmysong/django
af7af762e2a76debf9540b04ef29b5385ff70716
[ "BSD-3-Clause" ]
1
2020-07-15T05:01:00.000Z
2020-07-15T05:01:00.000Z
from __future__ import absolute_import try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.core import management from django.contrib.auth.models import User from django.test import TestCase from .models import (Person, Group, Membership, UserMembership, Car, Dri...
38.198675
356
0.618932
from __future__ import absolute_import try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.core import management from django.contrib.auth.models import User from django.test import TestCase from .models import (Person, Group, Membership, UserMembership, Car, Dri...
true
true
1c188d1df9cae9bde8aa75f8d209e0148bcc16a8
1,878
py
Python
pattern_compress.py
Tdrj2716/Reversi
ac1c8912c55b3b324806acffbcb9950652c4388a
[ "MIT" ]
11
2021-05-21T08:37:39.000Z
2022-02-24T04:35:26.000Z
pattern_compress.py
Tdrj2716/Reversi
ac1c8912c55b3b324806acffbcb9950652c4388a
[ "MIT" ]
null
null
null
pattern_compress.py
Tdrj2716/Reversi
ac1c8912c55b3b324806acffbcb9950652c4388a
[ "MIT" ]
3
2021-08-15T13:24:52.000Z
2021-08-19T11:19:30.000Z
char_s = 35 char_e = 91 num_s = 93 num_e = 126 ln = char_e - char_s pattern_all = 85293 vals = [] with open('param_pattern.txt', 'r') as f: for _ in range(pattern_all): vals.append(float(f.readline())) vals_variation = sorted(list(set(vals))) around = [0 for _ in range(1000)] err = 0.0 step = 0.0001 whil...
26.083333
84
0.552183
char_s = 35 char_e = 91 num_s = 93 num_e = 126 ln = char_e - char_s pattern_all = 85293 vals = [] with open('param_pattern.txt', 'r') as f: for _ in range(pattern_all): vals.append(float(f.readline())) vals_variation = sorted(list(set(vals))) around = [0 for _ in range(1000)] err = 0.0 step = 0.0001 whil...
true
true
1c188d1dfbaa9fd6bf134050815da53be30e2a87
372
py
Python
Machine Learning Fundamentals with Python Datacamp/Unsupervised Learning in Python/Visualization with hierarchical clustering and t-SNE/hierarchies of stocks.py
dibyanshushekhardey/Machine-Learning
42047bc418096086a0c133dcd04c94f88342472b
[ "MIT" ]
null
null
null
Machine Learning Fundamentals with Python Datacamp/Unsupervised Learning in Python/Visualization with hierarchical clustering and t-SNE/hierarchies of stocks.py
dibyanshushekhardey/Machine-Learning
42047bc418096086a0c133dcd04c94f88342472b
[ "MIT" ]
null
null
null
Machine Learning Fundamentals with Python Datacamp/Unsupervised Learning in Python/Visualization with hierarchical clustering and t-SNE/hierarchies of stocks.py
dibyanshushekhardey/Machine-Learning
42047bc418096086a0c133dcd04c94f88342472b
[ "MIT" ]
null
null
null
# Import normalize from sklearn.preprocessing import normalize # Normalize the movements: normalized_movements normalized_movements = normalize(movements) # Calculate the linkage: mergings mergings = linkage(normalized_movements, method='complete') # Plot the dendrogram dendrogram(mergings, labels=companies, ...
23.25
59
0.795699
from sklearn.preprocessing import normalize normalized_movements = normalize(movements) mergings = linkage(normalized_movements, method='complete') dendrogram(mergings, labels=companies, leaf_rotation=90, leaf_font_size=6) plt.show()
true
true
1c188e525d919a3d0c8ed62a97064932a7b7fbe2
327
py
Python
flask/app/search_engine.py
NNeru/Ted_Vocal_Scrapy
7c0c77c64df71723c7025b80b6e538684798a5f3
[ "MIT" ]
null
null
null
flask/app/search_engine.py
NNeru/Ted_Vocal_Scrapy
7c0c77c64df71723c7025b80b6e538684798a5f3
[ "MIT" ]
null
null
null
flask/app/search_engine.py
NNeru/Ted_Vocal_Scrapy
7c0c77c64df71723c7025b80b6e538684798a5f3
[ "MIT" ]
1
2021-01-04T18:36:31.000Z
2021-01-04T18:36:31.000Z
from elasticsearch import Elasticsearch import json from app import db class initialize_es(){ es= Elasticsearch() with open('mapping.json','r') as f: mapping = json.load(f) es.indices.create(index='search', body=mapping) data=db.find({}) es.index(index='search', doc_type='_doc', body=d...
18.166667
56
0.666667
from elasticsearch import Elasticsearch import json from app import db class initialize_es(){ es= Elasticsearch() with open('mapping.json','r') as f: mapping = json.load(f) es.indices.create(index='search', body=mapping) data=db.find({}) es.index(index='search', doc_type='_doc', body=d...
false
true
1c188e6a52abd032f26a1287b9aa769613d143e3
32,740
py
Python
tccli/services/chdfs/chdfs_client.py
zyh911/tencentcloud-cli
dfc5dbd660d4c60d265921c4edc630091478fc41
[ "Apache-2.0" ]
null
null
null
tccli/services/chdfs/chdfs_client.py
zyh911/tencentcloud-cli
dfc5dbd660d4c60d265921c4edc630091478fc41
[ "Apache-2.0" ]
null
null
null
tccli/services/chdfs/chdfs_client.py
zyh911/tencentcloud-cli
dfc5dbd660d4c60d265921c4edc630091478fc41
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import os import json import tccli.options_define as OptionsDefine import tccli.format_output as FormatOutput from tccli.nice_command import NiceCommand import tccli.error_msg as ErrorMsg import tccli.help_template as HelpTemplate from tccli import __version__ from tccli.utils import Utils from ...
39.829684
105
0.69328
import os import json import tccli.options_define as OptionsDefine import tccli.format_output as FormatOutput from tccli.nice_command import NiceCommand import tccli.error_msg as ErrorMsg import tccli.help_template as HelpTemplate from tccli import __version__ from tccli.utils import Utils from tccli.configure import C...
true
true
1c188eb9dc2184e5019eec69802e5d223d161d9d
8,572
py
Python
docs/conf.py
rollerworks/search
f53f922b6a3a3280d79c0f4c228c7329fe576f88
[ "MIT" ]
105
2015-12-10T16:32:42.000Z
2022-01-21T15:59:03.000Z
docs/conf.py
rollerworks/search
f53f922b6a3a3280d79c0f4c228c7329fe576f88
[ "MIT" ]
120
2015-12-05T13:52:36.000Z
2021-08-13T09:50:14.000Z
docs/conf.py
rollerworks/search
f53f922b6a3a3280d79c0f4c228c7329fe576f88
[ "MIT" ]
14
2016-03-11T05:37:44.000Z
2019-08-19T12:14:10.000Z
# -*- coding: utf-8 -*- # # RollerworksSearch documentation build configuration file, created by # sphinx-quickstart on Thu Aug 02 16:57:26 2012. # # 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 fil...
32.225564
146
0.722935
import sys, os sys.path.append(os.path.abspath('_theme/_exts')) from sphinx.highlighting import lexers from pygments.lexers.web import PhpLexer extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sensio.sphinx.refinclude', 'sensio.sphinx.configurationblock', 'sensio.sphinx.phpcode'] source_suffix = '.rst...
true
true
1c188ec187eebb8e59e48201982a037190137505
16,005
py
Python
main.py
TechrAudit/telegramairdropbot
9b99cef33fd4dabc13fa004e30b325381283a878
[ "MIT" ]
null
null
null
main.py
TechrAudit/telegramairdropbot
9b99cef33fd4dabc13fa004e30b325381283a878
[ "MIT" ]
null
null
null
main.py
TechrAudit/telegramairdropbot
9b99cef33fd4dabc13fa004e30b325381283a878
[ "MIT" ]
null
null
null
# --------------------------------------------- # # Plugin Name : TelegramAirdropBot # # Author Name : fabston # # File Name : main.py # # --------------------------------------------- # import re import ssl from io import BytesIO from time import...
36.375
171
0.555951
import re import ssl from io import BytesIO from time import gmtime, strftime import pymysql import telebot from aiohttp import web from telebot import types from telebot.types import InlineKeyboardButton, InlineKeyboardMarkup import config WEBHOOK_HOST = config.host WEBHOOK_PORT = 8443 WEBHOOK_LIST...
true
true
1c188ed91f32756c00c55a98a830b66fc8839329
1,296
py
Python
server/src/weaverbird/pipeline/steps/rollup.py
JeremyJacquemont/weaverbird
e04ab6f9c8381986ab71078e5199ece7a875e743
[ "BSD-3-Clause" ]
54
2019-11-20T15:07:39.000Z
2022-03-24T22:13:51.000Z
server/src/weaverbird/pipeline/steps/rollup.py
JeremyJacquemont/weaverbird
e04ab6f9c8381986ab71078e5199ece7a875e743
[ "BSD-3-Clause" ]
786
2019-10-20T11:48:37.000Z
2022-03-23T08:58:18.000Z
server/src/weaverbird/pipeline/steps/rollup.py
JeremyJacquemont/weaverbird
e04ab6f9c8381986ab71078e5199ece7a875e743
[ "BSD-3-Clause" ]
10
2019-11-21T10:16:16.000Z
2022-03-21T10:34:06.000Z
from typing import List, Optional, Sequence, Union from pydantic import Field from weaverbird.pipeline.steps.utils.base import BaseStep from weaverbird.pipeline.steps.utils.render_variables import StepWithVariablesMixin from weaverbird.pipeline.types import ColumnName, TemplatedVariable from .aggregate import Aggreg...
41.806452
83
0.782407
from typing import List, Optional, Sequence, Union from pydantic import Field from weaverbird.pipeline.steps.utils.base import BaseStep from weaverbird.pipeline.steps.utils.render_variables import StepWithVariablesMixin from weaverbird.pipeline.types import ColumnName, TemplatedVariable from .aggregate import Aggreg...
true
true
1c188f828a4d764e5ac4bd21763a08832997f666
1,963
py
Python
PopulateDatapack.py
edgecdec/TobaccoAwarenessMC
2fce9181ae3bb8b65dd4dcbfb4f3363e42e3dd90
[ "MIT" ]
null
null
null
PopulateDatapack.py
edgecdec/TobaccoAwarenessMC
2fce9181ae3bb8b65dd4dcbfb4f3363e42e3dd90
[ "MIT" ]
null
null
null
PopulateDatapack.py
edgecdec/TobaccoAwarenessMC
2fce9181ae3bb8b65dd4dcbfb4f3363e42e3dd90
[ "MIT" ]
null
null
null
from Team import Team from CreateHelmetsFunction import createHelmetsFunction import csv import os import zipfile basePath = 'APICAT/data/apicat/functions/team_setup/' callPath = 'apicat:team_setup/' def zipDir(path, ziph): # ziph is zipfile handle for root, dirs, files in os.walk(path): for file in f...
33.844828
133
0.676006
from Team import Team from CreateHelmetsFunction import createHelmetsFunction import csv import os import zipfile basePath = 'APICAT/data/apicat/functions/team_setup/' callPath = 'apicat:team_setup/' def zipDir(path, ziph): for root, dirs, files in os.walk(path): for file in files: ziph.wr...
true
true
1c188f88a1225b8dee39a3aae5fd8c5ac95f5a64
525
py
Python
tests/test_callable_instance.py
Gariagi/python-statemachine
7dddc714752ef56dd9e54fe246c0050f40c0ad2d
[ "MIT" ]
264
2017-03-22T14:43:57.000Z
2022-03-22T13:22:30.000Z
tests/test_callable_instance.py
Gariagi/python-statemachine
7dddc714752ef56dd9e54fe246c0050f40c0ad2d
[ "MIT" ]
239
2017-03-22T14:25:13.000Z
2021-08-02T21:07:05.000Z
tests/test_callable_instance.py
Gariagi/python-statemachine
7dddc714752ef56dd9e54fe246c0050f40c0ad2d
[ "MIT" ]
40
2017-07-24T17:31:46.000Z
2022-03-24T20:38:22.000Z
# coding: utf-8 from __future__ import absolute_import, unicode_literals import mock from statemachine.statemachine import CallableInstance def test_callable_should_override_kwargs(): target = mock.MagicMock(wil_be_overrided=1, will_be_proxied=2, z='text') proxy = CallableInstance(target, func=target.a_func...
26.25
76
0.754286
from __future__ import absolute_import, unicode_literals import mock from statemachine.statemachine import CallableInstance def test_callable_should_override_kwargs(): target = mock.MagicMock(wil_be_overrided=1, will_be_proxied=2, z='text') proxy = CallableInstance(target, func=target.a_func, wil_be_overrid...
true
true
1c188fc1f46ff98971f30e4053396f3c9cbbebde
12,050
py
Python
ops/in_situ.py
lukebfunk/OpticalPooledScreens
0f6a46c0f66d038d737e92f22adafb54a175005e
[ "MIT" ]
null
null
null
ops/in_situ.py
lukebfunk/OpticalPooledScreens
0f6a46c0f66d038d737e92f22adafb54a175005e
[ "MIT" ]
null
null
null
ops/in_situ.py
lukebfunk/OpticalPooledScreens
0f6a46c0f66d038d737e92f22adafb54a175005e
[ "MIT" ]
1
2020-11-10T20:35:17.000Z
2020-11-10T20:35:17.000Z
import numpy as np import pandas as pd from ops.constants import * import ops.utils def extract_base_intensity(maxed, peaks, cells, threshold_peaks): # reads outside of cells get label 0 read_mask = (peaks > threshold_peaks) values = maxed[:, :, read_mask].transpose([2, 0, 1]) labels = cells[read_mas...
34.428571
134
0.616266
import numpy as np import pandas as pd from ops.constants import * import ops.utils def extract_base_intensity(maxed, peaks, cells, threshold_peaks): read_mask = (peaks > threshold_peaks) values = maxed[:, :, read_mask].transpose([2, 0, 1]) labels = cells[read_mask] positions = np.array(np.where(...
true
true
1c189119d2426a3f3d262c7c80eb1613f097c99f
545
gyp
Python
node_modules/sqlite3/node_modules/node-pre-gyp/test/app3/binding.gyp
xhhjin/heroku-ghost
a66889e26babfb1fef4a23ab97cabcaebfcb46e9
[ "MIT" ]
null
null
null
node_modules/sqlite3/node_modules/node-pre-gyp/test/app3/binding.gyp
xhhjin/heroku-ghost
a66889e26babfb1fef4a23ab97cabcaebfcb46e9
[ "MIT" ]
null
null
null
node_modules/sqlite3/node_modules/node-pre-gyp/test/app3/binding.gyp
xhhjin/heroku-ghost
a66889e26babfb1fef4a23ab97cabcaebfcb46e9
[ "MIT" ]
null
null
null
{ 'variables': { "module_name":"app3", "module_path":"./lib/" }, "targets": [ { "target_name": "<(module_name)", "sources": [ "app3.cc" ], "dependencies": [ "deps/mylib.gyp:mylib" ] }, { "target_name": "action_after_build", "type":...
20.185185
61
0.418349
{ 'variables': { "module_name":"app3", "module_path":"./lib/" }, "targets": [ { "target_name": "<(module_name)", "sources": [ "app3.cc" ], "dependencies": [ "deps/mylib.gyp:mylib" ] }, { "target_name": "action_after_build", "type":...
true
true
1c1891527e386593cb41eb11a098c95aad7c5e0a
468
py
Python
data/scripts/templates/object/mobile/shared_dressed_criminal_assassin_human_female_01.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/mobile/shared_dressed_criminal_assassin_human_female_01.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/mobile/shared_dressed_criminal_assassin_human_female_01.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 = Creature() result.template = "object/mobile/shared_dressed_criminal_assassin_human_female_01.iff" result.attribut...
27.529412
87
0.74359
from swgpy.object import * def create(kernel): result = Creature() result.template = "object/mobile/shared_dressed_criminal_assassin_human_female_01.iff" result.attribute_template_id = 9 result.stfName("npc_name","human_base_female") return result
true
true
1c1891fb87db074d2b5e434b9d283c1ee340b92a
1,499
py
Python
tardigrade.py
Siddharthgolecha/Tardigrade-Masquerade
bdd5539de95920cfdce86c72e96e292edb0f0263
[ "MIT" ]
null
null
null
tardigrade.py
Siddharthgolecha/Tardigrade-Masquerade
bdd5539de95920cfdce86c72e96e292edb0f0263
[ "MIT" ]
null
null
null
tardigrade.py
Siddharthgolecha/Tardigrade-Masquerade
bdd5539de95920cfdce86c72e96e292edb0f0263
[ "MIT" ]
null
null
null
import sys import pennylane as qml from pennylane import numpy as np def second_renyi_entropy(rho): """Computes the second Renyi entropy of a given density matrix.""" rho_diag_2 = np.diagonal(rho) ** 2.0 return -np.real(np.log(np.sum(rho_diag_2))) def compute_entanglement(theta): """Computes the sec...
27.759259
91
0.66511
import sys import pennylane as qml from pennylane import numpy as np def second_renyi_entropy(rho): rho_diag_2 = np.diagonal(rho) ** 2.0 return -np.real(np.log(np.sum(rho_diag_2))) def compute_entanglement(theta): dev = qml.device("default.qubit", wires=3) @qml.qnode(dev) def ABT_compute(theta...
true
true
1c18934036fa98758fcdf8610d86083b1bb1fce9
344
py
Python
listings/urls.py
antoCancel/realestate
b7ec296123033d50dbf2212ab98d023317b9bb73
[ "MIT" ]
null
null
null
listings/urls.py
antoCancel/realestate
b7ec296123033d50dbf2212ab98d023317b9bb73
[ "MIT" ]
null
null
null
listings/urls.py
antoCancel/realestate
b7ec296123033d50dbf2212ab98d023317b9bb73
[ "MIT" ]
null
null
null
from django.urls import path from . import views urlpatterns = [ path('', views.index, name='listings'), #this url will then be /lisitings path('<int:listing_id>', views.listing, name='listing'), #see how we have made a path parameter 'path' here! path('search', views.search, name='search'), #this url wil...
34.4
112
0.69186
from django.urls import path from . import views urlpatterns = [ path('', views.index, name='listings'), path('<int:listing_id>', views.listing, name='listing'), path('search', views.search, name='search'), ]
true
true
1c18939a5d7be05a33dea5b439eba124b7f1f7b6
21,930
py
Python
src/azure-cli/azure/cli/command_modules/keyvault/_validators.py
GaneshaThirumurthi/azure-cli
72850c4a1ca0f2d36ad6dce319bd22e59ad387e1
[ "MIT" ]
1
2020-08-10T23:50:16.000Z
2020-08-10T23:50:16.000Z
src/azure-cli/azure/cli/command_modules/keyvault/_validators.py
GaneshaThirumurthi/azure-cli
72850c4a1ca0f2d36ad6dce319bd22e59ad387e1
[ "MIT" ]
2
2020-09-12T04:31:23.000Z
2020-09-14T06:31:04.000Z
src/azure-cli/azure/cli/command_modules/keyvault/_validators.py
mjain2/azure-cli
1ef59bace4dfad9cba137f49c8974aca4b0fff90
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
38.006932
120
0.653306
import argparse import base64 import binascii from datetime import datetime import re import sys from enum import Enum from knack.deprecation import Deprecated from knack.util import CLIError from azure.cli.core.commands.client_factory import get_mgmt_service_client from azure.cli.core.commands.validators import val...
true
true
1c1895717aec592be120c250b74a97740aaf2d31
539
py
Python
tests/test_state.py
xiaoxianma/bitccl
26d59b8a369a5ef8786d56d1f1d06fddf7c91d64
[ "MIT" ]
1
2020-08-02T15:16:05.000Z
2020-08-02T15:16:05.000Z
tests/test_state.py
xiaoxianma/bitccl
26d59b8a369a5ef8786d56d1f1d06fddf7c91d64
[ "MIT" ]
2
2020-07-31T10:54:04.000Z
2020-08-14T11:44:44.000Z
tests/test_state.py
xiaoxianma/bitccl
26d59b8a369a5ef8786d56d1f1d06fddf7c91d64
[ "MIT" ]
1
2020-07-26T17:14:50.000Z
2020-07-26T17:14:50.000Z
from bitccl import run from bitccl.state import config, event_listeners def test_config_singleton(): assert config.get() == {} config.set({"test": 1}) assert config.get() == config.get() == {"test": 1} # consistent assert config.get().test == 1 config.set({}) assert config.get() == {} def t...
28.368421
78
0.675325
from bitccl import run from bitccl.state import config, event_listeners def test_config_singleton(): assert config.get() == {} config.set({"test": 1}) assert config.get() == config.get() == {"test": 1} assert config.get().test == 1 config.set({}) assert config.get() == {} def test_empty_eve...
true
true
1c18961c053cc7721ec4aea8fdb201c63d48eec8
10,408
py
Python
addons/service.py
enterspeed/kurisu
48163391d1861fe92125f59dad63884d5e767ab2
[ "MIT" ]
10
2017-06-10T21:22:21.000Z
2021-01-22T13:45:31.000Z
addons/service.py
enterspeed/kurisu
48163391d1861fe92125f59dad63884d5e767ab2
[ "MIT" ]
1
2018-06-08T18:18:17.000Z
2018-06-08T21:12:23.000Z
addons/service.py
enterspeed/makisekurisu
48163391d1861fe92125f59dad63884d5e767ab2
[ "MIT" ]
3
2017-06-10T21:22:22.000Z
2021-01-29T00:23:10.000Z
import sqlite3 import json import os, sys from addons import utils from addons.checks import checks from discord.ext import commands from discord import utils as discord class Service: """ Service commands (owner only) """ # Construct def __init__(self, bot): self.bot = bot print(...
35.401361
113
0.572252
import sqlite3 import json import os, sys from addons import utils from addons.checks import checks from discord.ext import commands from discord import utils as discord class Service: def __init__(self, bot): self.bot = bot print('Addon "{}" loaded'.format(self.__class__.__name__)) ...
true
true
1c18962561f0fb59998fa5350464ae68f008bd81
2,137
py
Python
setup.py
hpeyerl/etherrain
65e7387fcedaa3ffd47d59106dcfd768b62e6c2e
[ "MIT" ]
null
null
null
setup.py
hpeyerl/etherrain
65e7387fcedaa3ffd47d59106dcfd768b62e6c2e
[ "MIT" ]
null
null
null
setup.py
hpeyerl/etherrain
65e7387fcedaa3ffd47d59106dcfd768b62e6c2e
[ "MIT" ]
null
null
null
import codecs import os import re from setuptools import setup, find_packages ################################################################### NAME = "etherrain" PACKAGES = find_packages(where="src") META_PATH = os.path.join("src", "etherrain", "__init__.py") KEYWORDS = ['irrigation', 'watering'] CLASSIFIERS = [ ...
27.753247
77
0.569958
import codecs import os import re from setuptools import setup, find_packages NAME = "etherrain" PACKAGES = find_packages(where="src") META_PATH = os.path.join("src", "etherrain", "__init__.py") KEYWORDS = ['irrigation', 'watering'] CLASSIFIERS = [ "Intended Audience :: Developers", "Programming Lang...
true
true
1c1896b83856ed0429bc121dc68616712c07a5fc
55,737
py
Python
tests/test_decorators.py
GhostofGoes/hug
b211357f615cd01d9f03a5e6a20246dfbc1d4dd5
[ "MIT" ]
null
null
null
tests/test_decorators.py
GhostofGoes/hug
b211357f615cd01d9f03a5e6a20246dfbc1d4dd5
[ "MIT" ]
null
null
null
tests/test_decorators.py
GhostofGoes/hug
b211357f615cd01d9f03a5e6a20246dfbc1d4dd5
[ "MIT" ]
null
null
null
"""tests/test_decorators.py. Tests the decorators that power hugs core functionality Copyright (C) 2016 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction...
32.980473
185
0.66028
import json import os import sys from collections import namedtuple from unittest import mock import falcon import pytest import requests from falcon.testing import StartResponseMock, create_environ from marshmallow import Schema, fields import hug from hug._async import coroutine from hug.exceptions import InvalidTy...
true
true
1c1896bd163dcd1d9887df22dccd85fa10795847
832
py
Python
class_inheritance/inheritance/inheritance.py
M1NH42/py
792616d08013b46011db8ed6b56e40b7d9859ae2
[ "MIT" ]
null
null
null
class_inheritance/inheritance/inheritance.py
M1NH42/py
792616d08013b46011db8ed6b56e40b7d9859ae2
[ "MIT" ]
null
null
null
class_inheritance/inheritance/inheritance.py
M1NH42/py
792616d08013b46011db8ed6b56e40b7d9859ae2
[ "MIT" ]
null
null
null
# Intro : Inheritance in python 3 # current year CURRENT_YEAR = 2020 # base class class Person: # constructor def __init__(self, name, year_born): self.name= name self.year_born = year_born # def methods def get_age(self): return CURRENT_YEAR - self.year_born # def _...
20.292683
56
0.657452
CURRENT_YEAR = 2020 class Person: def __init__(self, name, year_born): self.name= name self.year_born = year_born def get_age(self): return CURRENT_YEAR - self.year_born class Student (Person): def __init__(self): Person.__init__(self, n...
true
true
1c1896ea8aca6bff270097b6d12ca343fd2217cf
12,211
py
Python
lib/galaxy/model/custom_types.py
rhpvorderman/galaxy
178015f8eff0b0c7a59c0d6756658f6428222837
[ "CC-BY-3.0" ]
1,085
2015-02-18T16:14:38.000Z
2022-03-30T23:52:07.000Z
lib/galaxy/model/custom_types.py
rhpvorderman/galaxy
178015f8eff0b0c7a59c0d6756658f6428222837
[ "CC-BY-3.0" ]
11,253
2015-02-18T17:47:32.000Z
2022-03-31T21:47:03.000Z
lib/galaxy/model/custom_types.py
rhpvorderman/galaxy
178015f8eff0b0c7a59c0d6756658f6428222837
[ "CC-BY-3.0" ]
1,000
2015-02-18T16:18:10.000Z
2022-03-29T08:22:56.000Z
import binascii import copy import json import logging import uuid from collections import deque from itertools import chain from sys import getsizeof import numpy import sqlalchemy from sqlalchemy.ext.mutable import Mutable from sqlalchemy.inspection import inspect from sqlalchemy.types import ( CHAR, LargeBi...
30.5275
113
0.618541
import binascii import copy import json import logging import uuid from collections import deque from itertools import chain from sys import getsizeof import numpy import sqlalchemy from sqlalchemy.ext.mutable import Mutable from sqlalchemy.inspection import inspect from sqlalchemy.types import ( CHAR, LargeBi...
true
true
1c189808d2e86dee9fd92e339388585ad64b5dab
1,902
py
Python
tensor2tensor/models/video/nfg_conv3d_test.py
fciannel/tensor2tensor
44f669058390bec03024baa04c1a33e91cc0909d
[ "Apache-2.0" ]
1
2020-12-18T17:38:36.000Z
2020-12-18T17:38:36.000Z
tensor2tensor/models/video/nfg_conv3d_test.py
fciannel/tensor2tensor
44f669058390bec03024baa04c1a33e91cc0909d
[ "Apache-2.0" ]
null
null
null
tensor2tensor/models/video/nfg_conv3d_test.py
fciannel/tensor2tensor
44f669058390bec03024baa04c1a33e91cc0909d
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018 The Tensor2Tensor Authors. # # 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...
38.816327
76
0.716088
from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl.testing import parameterized from tensor2tensor.models.video import nfg_test_utils import tensorflow as tf conv3d_net_hparams = ( ("conv3d_net", 2, 2, "conv3d_net", "conditional", -1, 3), (...
true
true
1c1899022d2679acc77c4d8a719a3c1edb795149
1,625
py
Python
isanet/optimizer/utils.py
alessandrocuda/ISANet
e33a5a408554c900a7d282baa500bd8023a2cd2f
[ "MIT" ]
4
2020-02-12T21:18:41.000Z
2022-02-14T14:52:33.000Z
isanet/optimizer/utils.py
alessandrocuda/ISANet
e33a5a408554c900a7d282baa500bd8023a2cd2f
[ "MIT" ]
null
null
null
isanet/optimizer/utils.py
alessandrocuda/ISANet
e33a5a408554c900a7d282baa500bd8023a2cd2f
[ "MIT" ]
4
2020-03-17T09:06:57.000Z
2021-01-26T14:37:36.000Z
import numpy as np def l_norm(l_v): """Computes the norm of a list of numpy array. Parameters ---------- l_v : array-like Returns ------- float The norm of l_v. """ return np.sqrt(np.sum([np.sum(np.square(l_v[i])) for i in range(0, len(l_v))])) def l_scalar_product(l_v, l...
22.260274
84
0.577846
import numpy as np def l_norm(l_v): return np.sqrt(np.sum([np.sum(np.square(l_v[i])) for i in range(0, len(l_v))])) def l_scalar_product(l_v, l_w): return np.sum([np.sum(np.multiply(l_v[i], l_w[i])) for i in range(0, len(l_v))]) def make_vector(l_v): row_vector = [l_v[l].flatten() for l in range(len(l_...
true
true
1c1899ab58939e9425f34853fc83da2860626d4c
8,746
py
Python
mysite/conftest.py
cjlee112/socraticqs2
2e7dd9d2ec687f68ca8ca341cf5f1b3b8809c820
[ "Apache-2.0" ]
8
2015-06-02T15:34:44.000Z
2019-03-21T12:27:30.000Z
mysite/conftest.py
cjlee112/socraticqs2
2e7dd9d2ec687f68ca8ca341cf5f1b3b8809c820
[ "Apache-2.0" ]
761
2015-01-07T05:13:08.000Z
2022-02-10T10:23:37.000Z
mysite/conftest.py
cjlee112/socraticqs2
2e7dd9d2ec687f68ca8ca341cf5f1b3b8809c820
[ "Apache-2.0" ]
12
2015-01-28T20:09:36.000Z
2018-03-20T13:32:11.000Z
import json from io import BytesIO import random from collections import namedtuple import pytest from django.contrib.auth.models import User from django.core.management import call_command from django.core.files.uploadedfile import InMemoryUploadedFile from chat.models import Chat, Message, UnitError, EnrollUnitCode...
27.589905
115
0.616853
import json from io import BytesIO import random from collections import namedtuple import pytest from django.contrib.auth.models import User from django.core.management import call_command from django.core.files.uploadedfile import InMemoryUploadedFile from chat.models import Chat, Message, UnitError, EnrollUnitCode...
true
true
1c189b8ed33be5bc642a74350a23ca68aa454352
8,916
py
Python
kubernetes_asyncio/client/models/v1_quobyte_volume_source.py
tomplus/kubernetes-asyncio
11c3eb4d50ae822545572aa7b8c15f7153f65a1c
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1_quobyte_volume_source.py
tomplus/kubernetes-asyncio
11c3eb4d50ae822545572aa7b8c15f7153f65a1c
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1_quobyte_volume_source.py
tomplus/kubernetes-asyncio
11c3eb4d50ae822545572aa7b8c15f7153f65a1c
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.23.6 Generated by: https://openapi-generator.tech """ try: from inspect import getfullargspec except Im...
32.304348
220
0.615186
try: from inspect import getfullargspec except ImportError: from inspect import getargspec as getfullargspec import pprint import re import six from kubernetes_asyncio.client.configuration import Configuration class V1QuobyteVolumeSource(object): openapi_types = { 'group': 'str', 're...
true
true
1c189bc512d0ba9c72d67b47d60caf7e53f36287
597
py
Python
clang-tools-extra/include-cleaner/test/lit.cfg.py
ornata/llvm-project
494913b8b4e4bce0b3525e5569d8e486e82b9a52
[ "Apache-2.0" ]
null
null
null
clang-tools-extra/include-cleaner/test/lit.cfg.py
ornata/llvm-project
494913b8b4e4bce0b3525e5569d8e486e82b9a52
[ "Apache-2.0" ]
null
null
null
clang-tools-extra/include-cleaner/test/lit.cfg.py
ornata/llvm-project
494913b8b4e4bce0b3525e5569d8e486e82b9a52
[ "Apache-2.0" ]
null
null
null
import lit.llvm lit.llvm.initialize(lit_config, config) lit.llvm.llvm_config.use_default_substitutions() config.name = 'ClangIncludeCleaner' config.suffixes = ['.test', '.c', '.cpp'] config.excludes = ['Inputs'] config.test_format = lit.formats.ShTest(not lit.llvm.llvm_config.use_lit_shell) config.test_source_root = ...
35.117647
79
0.758794
import lit.llvm lit.llvm.initialize(lit_config, config) lit.llvm.llvm_config.use_default_substitutions() config.name = 'ClangIncludeCleaner' config.suffixes = ['.test', '.c', '.cpp'] config.excludes = ['Inputs'] config.test_format = lit.formats.ShTest(not lit.llvm.llvm_config.use_lit_shell) config.test_source_root = ...
true
true
1c189d5eabf0c386477f881421201f7911049a0a
5,026
py
Python
report/reporte_compras.py
odoouhy/l10n_gt_extra
283cb6f1db4c8b81ff60c87cc7ab4bfe7ad400de
[ "MIT" ]
null
null
null
report/reporte_compras.py
odoouhy/l10n_gt_extra
283cb6f1db4c8b81ff60c87cc7ab4bfe7ad400de
[ "MIT" ]
null
null
null
report/reporte_compras.py
odoouhy/l10n_gt_extra
283cb6f1db4c8b81ff60c87cc7ab4bfe7ad400de
[ "MIT" ]
null
null
null
# -*- encoding: utf-8 -*- from odoo import api, models import logging class ReporteCompras(models.AbstractModel): _name = 'report.l10n_gt_extra.reporte_compras' def lineas(self, datos): totales = {} totales['num_facturas'] = 0 totales['compra'] = {'exento':0,'neto':0,'iva':0,'total':...
37.507463
151
0.476721
from odoo import api, models import logging class ReporteCompras(models.AbstractModel): _name = 'report.l10n_gt_extra.reporte_compras' def lineas(self, datos): totales = {} totales['num_facturas'] = 0 totales['compra'] = {'exento':0,'neto':0,'iva':0,'total':0} totales['servic...
true
true