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
f75a549b50040e8caaa5c19170893124dbb3371f
3,836
py
Python
voltaware_connect.py
nakata5321/frontier_feeder
3653ccce3b00850f28048417e8a80d2050f320e6
[ "Apache-2.0" ]
null
null
null
voltaware_connect.py
nakata5321/frontier_feeder
3653ccce3b00850f28048417e8a80d2050f320e6
[ "Apache-2.0" ]
null
null
null
voltaware_connect.py
nakata5321/frontier_feeder
3653ccce3b00850f28048417e8a80d2050f320e6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 from config import read_config import typing as tp import threading import logging import json import time import pika import robonomicsinterface as RI def callback(ch, method, properties, body) -> None: """ get data from sensors and save it to dictionary """ data = body.decod...
31.966667
112
0.633994
from config import read_config import typing as tp import threading import logging import json import time import pika import robonomicsinterface as RI def callback(ch, method, properties, body) -> None: data = body.decode("utf-8") data_js = json.loads(data) data_js["event"].pop("timestampDeltaSecs", No...
true
true
f75a56fe2ad4c6f1e52c4f8ad4a1d1ffdcb129f8
675
py
Python
plugins/maya/publish/avalon_scene_ready.py
davidlatwe/reveries-config
4a282dd64a32a9b87bd1a070759b6425ff785d68
[ "MIT" ]
3
2020-04-01T10:51:17.000Z
2021-08-05T18:35:23.000Z
plugins/maya/publish/avalon_scene_ready.py
davidlatwe/reveries-config
4a282dd64a32a9b87bd1a070759b6425ff785d68
[ "MIT" ]
null
null
null
plugins/maya/publish/avalon_scene_ready.py
davidlatwe/reveries-config
4a282dd64a32a9b87bd1a070759b6425ff785d68
[ "MIT" ]
1
2020-07-05T12:06:30.000Z
2020-07-05T12:06:30.000Z
import pyblish.api class AvalonSceneReady(pyblish.api.ContextPlugin): """標記場景為預備狀態 場景在被標記為預備狀態之後,如果有任何物件或數值的更動,狀態就會失效 """ """Define current scene in ready state Collecte current undo count for later validation. """ order = pyblish.api.CollectorOrder + 0.49999 label = "進入預備狀態" ...
20.454545
54
0.653333
import pyblish.api class AvalonSceneReady(pyblish.api.ContextPlugin): order = pyblish.api.CollectorOrder + 0.49999 label = "進入預備狀態" hosts = ["maya"] def process(self, context): from maya import cmds from reveries.maya import capsule cmds.undoInfo(state=True) ...
true
true
f75a581c77119c99d7e1c7f7d97eeccf5efc39ae
342
py
Python
scripts/twice.py
ueshou/mypkg
69d5f3b6c2949f9cf3b7f4914c8a5132aaaff66b
[ "BSD-3-Clause" ]
null
null
null
scripts/twice.py
ueshou/mypkg
69d5f3b6c2949f9cf3b7f4914c8a5132aaaff66b
[ "BSD-3-Clause" ]
null
null
null
scripts/twice.py
ueshou/mypkg
69d5f3b6c2949f9cf3b7f4914c8a5132aaaff66b
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 import rospy from std_msgs.msg import Int32 n = 0 def cb(message): global n n = message.data*2 rospy.init_node('twice') sub = rospy.Subscriber('count_up', Int32, cb) pub = rospy.Publisher('twice', Int32, queue_size=1) rate = rospy.Rate(10) while not rospy.is_shutdown(): pub.publis...
18
51
0.690058
import rospy from std_msgs.msg import Int32 n = 0 def cb(message): global n n = message.data*2 rospy.init_node('twice') sub = rospy.Subscriber('count_up', Int32, cb) pub = rospy.Publisher('twice', Int32, queue_size=1) rate = rospy.Rate(10) while not rospy.is_shutdown(): pub.publish(n) rate.sleep()
true
true
f75a588422e126f5a97e14ee6326181ada44c78e
4,536
py
Python
python/Tests/TestLinkStates.py
ugirumurera/ta_solver
c3bd83633aca4db785a4d0dc554f924bb26754e1
[ "BSD-3-Clause-LBNL" ]
null
null
null
python/Tests/TestLinkStates.py
ugirumurera/ta_solver
c3bd83633aca4db785a4d0dc554f924bb26754e1
[ "BSD-3-Clause-LBNL" ]
null
null
null
python/Tests/TestLinkStates.py
ugirumurera/ta_solver
c3bd83633aca4db785a4d0dc554f924bb26754e1
[ "BSD-3-Clause-LBNL" ]
null
null
null
import unittest import numpy as np import os import inspect from Java_Connection import Java_Connection from Model_Manager.Link_Model_Manager import Link_Model_Manager_class from Data_Types.Demand_Assignment_Class import Demand_Assignment_class from Traffic_States.Static_Traffic_State import Static_Traffic_State_class ...
43.615385
121
0.715168
import unittest import numpy as np import os import inspect from Java_Connection import Java_Connection from Model_Manager.Link_Model_Manager import Link_Model_Manager_class from Data_Types.Demand_Assignment_Class import Demand_Assignment_class from Traffic_States.Static_Traffic_State import Static_Traffic_State_class ...
false
true
f75a58edfe94692fd64f2ab050a957b9a6b40da9
2,150
py
Python
scripts/parametric_1d.py
kumiori/stability-bifurcation
9a82bf40742a9b16122b7a476ad8aec65fe22539
[ "MIT" ]
1
2020-08-10T22:38:26.000Z
2020-08-10T22:38:26.000Z
scripts/parametric_1d.py
kumiori/stability-bifurcation
9a82bf40742a9b16122b7a476ad8aec65fe22539
[ "MIT" ]
2
2020-08-13T16:33:51.000Z
2020-09-01T21:05:34.000Z
scripts/parametric_1d.py
kumiori/stability-bifurcation
9a82bf40742a9b16122b7a476ad8aec65fe22539
[ "MIT" ]
1
2020-10-25T22:28:11.000Z
2020-10-25T22:28:11.000Z
from traction_1d import * import numpy as np from utils import ColorPrint # ell_list = np.linspace(.1, .5, 20) # ell_min = 0.1 #ell_max = 2. ell_list = np.logspace(np.log10(.15), np.log10(1.5), 20) def t_stab(ell, q=2): coeff_stab = 2.*np.pi*q/(q+1)**(3./2.)*np.sqrt(2) if 1/ell > coeff_stab: return 1. else: re...
29.452055
97
0.652093
from traction_1d import * import numpy as np from utils import ColorPrint ell_list = np.logspace(np.log10(.15), np.log10(1.5), 20) def t_stab(ell, q=2): coeff_stab = 2.*np.pi*q/(q+1)**(3./2.)*np.sqrt(2) if 1/ell > coeff_stab: return 1. else: return coeff_stab*ell/1. def t_bif(ell, q=2): coeff_bif = 2.*np.p...
true
true
f75a59d32874f0d762392d0e25abf10e91a977a5
4,058
py
Python
qa/rpc-tests/merkle_blocks.py
chavezcoin-project/chavezcoin-D
a3166a059bd9651d30313e2504d8b40c9a391e6a
[ "MIT" ]
null
null
null
qa/rpc-tests/merkle_blocks.py
chavezcoin-project/chavezcoin-D
a3166a059bd9651d30313e2504d8b40c9a391e6a
[ "MIT" ]
null
null
null
qa/rpc-tests/merkle_blocks.py
chavezcoin-project/chavezcoin-D
a3166a059bd9651d30313e2504d8b40c9a391e6a
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test merkleblock fetch/validation # from test_framework.test_framework import BitcoinTestFramework f...
45.595506
120
0.672006
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * class MerkleBlockTest(BitcoinTestFramework): def setup_chain(self): print("Initializing test directory "+self.options.tmpdir) initialize_chain_clean(self.options.tmpdir, 4) def setup_network(sel...
false
true
f75a59d64adf3a56a196451b052446179fd3e003
1,064
py
Python
auth-api/migrations/versions/5659632c7b2a_create_account_loginsource_column_for_.py
karthik-aot/sbc-auth
f24028040fda67d4f10ae9b608b8832c15d2a8ad
[ "Apache-2.0" ]
11
2019-09-26T06:58:25.000Z
2022-01-26T06:19:39.000Z
auth-api/migrations/versions/5659632c7b2a_create_account_loginsource_column_for_.py
karthik-aot/sbc-auth
f24028040fda67d4f10ae9b608b8832c15d2a8ad
[ "Apache-2.0" ]
1,622
2019-05-07T21:08:38.000Z
2022-03-28T17:07:15.000Z
auth-api/migrations/versions/5659632c7b2a_create_account_loginsource_column_for_.py
karthik-aot/sbc-auth
f24028040fda67d4f10ae9b608b8832c15d2a8ad
[ "Apache-2.0" ]
98
2019-03-01T21:36:15.000Z
2021-12-01T22:11:25.000Z
"""create account loginsource column for user table Revision ID: 5659632c7b2a Revises: ea64b4d55bfb Create Date: 2020-07-20 07:33:13.584759 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '5659632c7b2a' down_revision = 'ea64b4d55bfb' branch_labels = None depend...
31.294118
90
0.690789
import sqlalchemy as sa from alembic import op revision = '5659632c7b2a' down_revision = 'ea64b4d55bfb' branch_labels = None depends_on = None def upgrade(): op.add_column('user', sa.Column('login_source', sa.String(length=20), nullable=True)) op.execute('update "user" set login_source=\'IDIR\' where us...
true
true
f75a5a69ddd70cde102e3df4c927d8fe1cd4e7a9
373
py
Python
RecoEgamma/EgammaIsolationAlgos/python/gamIsoDepositHcalFromHits_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
RecoEgamma/EgammaIsolationAlgos/python/gamIsoDepositHcalFromHits_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
RecoEgamma/EgammaIsolationAlgos/python/gamIsoDepositHcalFromHits_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms from RecoEgamma.EgammaIsolationAlgos.gamHcalExtractorBlocks_cff import * gamIsoDepositHcalFromHits = cms.EDProducer("CandIsoDepositProducer", src = cms.InputTag("photons"), trackType = cms.string('candidate'), MultipleDepositsFlag = cms.bool(False), ExtractorPS...
26.642857
72
0.785523
import FWCore.ParameterSet.Config as cms from RecoEgamma.EgammaIsolationAlgos.gamHcalExtractorBlocks_cff import * gamIsoDepositHcalFromHits = cms.EDProducer("CandIsoDepositProducer", src = cms.InputTag("photons"), trackType = cms.string('candidate'), MultipleDepositsFlag = cms.bool(False), ExtractorPS...
true
true
f75a5adbe9cd0a4d1eed8d129c255f38d4d06b64
17,955
py
Python
homeassistant/components/amcrest/camera.py
petewill/home-assistant
5859dba4344f05fb8774aa1207e47ac28f627a67
[ "Apache-2.0" ]
3
2020-01-21T18:09:09.000Z
2022-01-17T08:06:03.000Z
homeassistant/components/amcrest/camera.py
petewill/home-assistant
5859dba4344f05fb8774aa1207e47ac28f627a67
[ "Apache-2.0" ]
39
2016-12-16T12:40:34.000Z
2017-02-13T17:53:42.000Z
homeassistant/components/amcrest/camera.py
petewill/home-assistant
5859dba4344f05fb8774aa1207e47ac28f627a67
[ "Apache-2.0" ]
4
2019-10-15T21:03:53.000Z
2020-05-27T19:53:20.000Z
"""Support for Amcrest IP cameras.""" import asyncio from datetime import timedelta import logging from urllib3.exceptions import HTTPError from amcrest import AmcrestError import voluptuous as vol from homeassistant.components.camera import ( Camera, CAMERA_SERVICE_SCHEMA, SUPPORT_ON_OFF, SUPPORT_STR...
34.796512
87
0.622055
import asyncio from datetime import timedelta import logging from urllib3.exceptions import HTTPError from amcrest import AmcrestError import voluptuous as vol from homeassistant.components.camera import ( Camera, CAMERA_SERVICE_SCHEMA, SUPPORT_ON_OFF, SUPPORT_STREAM, ) from homeassistant.components.f...
true
true
f75a5b489b2fed396b65f4ac4140c8868ccd09d1
2,129
py
Python
teacher/migrations/0001_initial.py
Shaurov05/Project-allocation-system
cb5669c53a35efb5b8a28dc1c864301d08b62d29
[ "MIT" ]
null
null
null
teacher/migrations/0001_initial.py
Shaurov05/Project-allocation-system
cb5669c53a35efb5b8a28dc1c864301d08b62d29
[ "MIT" ]
null
null
null
teacher/migrations/0001_initial.py
Shaurov05/Project-allocation-system
cb5669c53a35efb5b8a28dc1c864301d08b62d29
[ "MIT" ]
null
null
null
# Generated by Django 3.1.3 on 2021-02-17 19:13 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('department', '0001_initial'), migrations.swappable_dependency(s...
53.225
274
0.646783
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('department', '0001_initial'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations ...
true
true
f75a5c07c589fee4e19c707e5e72e003f1d28594
3,868
py
Python
barn_hunt/migrations/0001_initial.py
Blake-Latchford/dogs
28911b32a08455e6da8c25278e8e16557a053de0
[ "MIT" ]
null
null
null
barn_hunt/migrations/0001_initial.py
Blake-Latchford/dogs
28911b32a08455e6da8c25278e8e16557a053de0
[ "MIT" ]
null
null
null
barn_hunt/migrations/0001_initial.py
Blake-Latchford/dogs
28911b32a08455e6da8c25278e8e16557a053de0
[ "MIT" ]
null
null
null
# Generated by Django 2.0.3 on 2018-03-27 23:36 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Address', fields=[ ...
42.977778
135
0.570062
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Address', fields=[ ('id', models.AutoField(auto_created=Tr...
true
true
f75a5cdf49bdadff151e7feeabbe10793916827f
410
py
Python
decaptcha/migrations/0002_auto_20181125_1723.py
youngershen/django-easy-captcha
bfcd13bbafface7048139e0bc49358e6628439df
[ "MIT" ]
3
2019-03-02T03:48:35.000Z
2021-11-09T11:06:25.000Z
decaptcha/migrations/0002_auto_20181125_1723.py
youngershen/django-easy-captcha
bfcd13bbafface7048139e0bc49358e6628439df
[ "MIT" ]
null
null
null
decaptcha/migrations/0002_auto_20181125_1723.py
youngershen/django-easy-captcha
bfcd13bbafface7048139e0bc49358e6628439df
[ "MIT" ]
null
null
null
# Generated by Django 2.1.3 on 2018-11-25 09:23 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('decaptcha', '0001_initial'), ] operations = [ migrations.AlterField( model_name='captcharecord', name='hashkey', ...
21.578947
75
0.609756
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('decaptcha', '0001_initial'), ] operations = [ migrations.AlterField( model_name='captcharecord', name='hashkey', field=models.CharField(max_length=255, ...
true
true
f75a5d4d249d3caaac010fd951b5b2fa23e27224
1,132
py
Python
examples/random_flower/sketch_random_flower.py
hishamsajid/vsketch
1b35b794972097b8fb5af94ea6e93f3e8c69448c
[ "MIT" ]
221
2020-08-07T14:30:58.000Z
2022-03-28T17:52:48.000Z
examples/random_flower/sketch_random_flower.py
hishamsajid/vsketch
1b35b794972097b8fb5af94ea6e93f3e8c69448c
[ "MIT" ]
171
2020-08-08T12:59:10.000Z
2022-03-28T00:37:40.000Z
examples/random_flower/sketch_random_flower.py
hishamsajid/vsketch
1b35b794972097b8fb5af94ea6e93f3e8c69448c
[ "MIT" ]
28
2020-08-06T20:10:04.000Z
2022-03-12T15:38:24.000Z
import math import numpy as np import vsketch class RandomFlowerSketch(vsketch.SketchClass): num_line = vsketch.Param(200, 1) point_per_line = vsketch.Param(100, 1) rdir_range = vsketch.Param(math.pi / 6) def draw(self, vsk: vsketch.Vsketch) -> None: vsk.size("a4", landscape=True) v...
28.3
95
0.60689
import math import numpy as np import vsketch class RandomFlowerSketch(vsketch.SketchClass): num_line = vsketch.Param(200, 1) point_per_line = vsketch.Param(100, 1) rdir_range = vsketch.Param(math.pi / 6) def draw(self, vsk: vsketch.Vsketch) -> None: vsk.size("a4", landscape=True) v...
true
true
f75a5d7f24da24f2207a398e0cf03a6225608e55
1,988
py
Python
setup.py
subhankarc/service-fabrik-backup-restore
33c859eb7b8c96b4f61f3415b50db8ec5b1f7beb
[ "Apache-2.0" ]
2
2021-03-01T00:38:47.000Z
2021-12-15T04:25:41.000Z
setup.py
subhankarc/service-fabrik-backup-restore
33c859eb7b8c96b4f61f3415b50db8ec5b1f7beb
[ "Apache-2.0" ]
57
2017-12-04T16:46:41.000Z
2022-03-24T11:43:31.000Z
setup.py
subhankarc/service-fabrik-backup-restore
33c859eb7b8c96b4f61f3415b50db8ec5b1f7beb
[ "Apache-2.0" ]
16
2017-12-04T16:45:23.000Z
2019-09-17T11:42:19.000Z
#!/usr/bin/env python3 import sys from setuptools.command.test import test as TestCommand try: from setuptools import setup except ImportError: from distutils.core import setup settings = dict() with open('requirements.txt') as file_requirements: requirements = file_requirements.read().splitlines() wit...
29.235294
117
0.673541
import sys from setuptools.command.test import test as TestCommand try: from setuptools import setup except ImportError: from distutils.core import setup settings = dict() with open('requirements.txt') as file_requirements: requirements = file_requirements.read().splitlines() with open('requirements-de...
true
true
f75a5e2e9033fd66de476167cf225583bfbcfc8b
1,485
py
Python
bowl_config.py
mpsampat/kaggle-ds-bowl-2018-baseline
c769ba7b4db4d1f38f7190db9a11bf812b2b983a
[ "MIT" ]
null
null
null
bowl_config.py
mpsampat/kaggle-ds-bowl-2018-baseline
c769ba7b4db4d1f38f7190db9a11bf812b2b983a
[ "MIT" ]
null
null
null
bowl_config.py
mpsampat/kaggle-ds-bowl-2018-baseline
c769ba7b4db4d1f38f7190db9a11bf812b2b983a
[ "MIT" ]
null
null
null
from config import Config import numpy as np class BowlConfig(Config): """Configuration for training on the toy shapes dataset. Derives from the base Config class and overrides values specific to the toy shapes dataset. """ # Give the configuration a recognizable name NAME = "bowl" # Train ...
31.595745
77
0.701684
from config import Config import numpy as np class BowlConfig(Config): NAME = "bowl" GPU_COUNT = 1 IMAGES_PER_GPU = 1 LEARNING_RATE = 0.00005 NUM_CLASSES = 1 + 1 IMAGE_MIN_DIM = 256 IMAGE_MAX_DIM = 256 RPN_ANCHOR_SCALES = (8, 16, 32, 64) TRAIN...
true
true
f75a5ff6bc6ce503cbb1a73528101fcb211f93db
15,636
py
Python
argo/workflows/dsl/_cronworkflow.py
bostadynamics/argo-python-dsl
81b13682a1eb33d2e14b5a403c16a25a9c63fa85
[ "Apache-2.0" ]
98
2020-03-19T16:15:40.000Z
2022-03-25T13:16:37.000Z
argo/workflows/dsl/_cronworkflow.py
bostadynamics/argo-python-dsl
81b13682a1eb33d2e14b5a403c16a25a9c63fa85
[ "Apache-2.0" ]
27
2020-04-25T12:17:10.000Z
2021-05-12T21:37:17.000Z
argo/workflows/dsl/_cronworkflow.py
bostadynamics/argo-python-dsl
81b13682a1eb33d2e14b5a403c16a25a9c63fa85
[ "Apache-2.0" ]
22
2020-04-25T12:14:42.000Z
2022-01-28T01:26:42.000Z
import inspect import json import logging import requests import yaml from abc import ABCMeta from inflection import camelize from inflection import dasherize from inflection import underscore from pathlib import Path from typing import Any from typing import Dict from typing import List from typing import Optional f...
32.987342
93
0.591264
import inspect import json import logging import requests import yaml from abc import ABCMeta from inflection import camelize from inflection import dasherize from inflection import underscore from pathlib import Path from typing import Any from typing import Dict from typing import List from typing import Optional f...
true
true
f75a6059b342ee775461392918dabfa6c0d2db52
9,718
py
Python
kolibri/core/analytics/pskolibri/_pswindows.py
techZM/kolibri
617e4c382e446b16a968e8add7f1766f8cd7c54a
[ "MIT" ]
null
null
null
kolibri/core/analytics/pskolibri/_pswindows.py
techZM/kolibri
617e4c382e446b16a968e8add7f1766f8cd7c54a
[ "MIT" ]
null
null
null
kolibri/core/analytics/pskolibri/_pswindows.py
techZM/kolibri
617e4c382e446b16a968e8add7f1766f8cd7c54a
[ "MIT" ]
1
2021-07-26T11:38:29.000Z
2021-07-26T11:38:29.000Z
"""Windows platform implementation.""" from __future__ import absolute_import from __future__ import division import ctypes import errno import functools import subprocess from collections import namedtuple from ctypes import windll from ctypes import wintypes from kolibri.core.analytics.pskolibri.common import Acces...
31.75817
104
0.644371
from __future__ import absolute_import from __future__ import division import ctypes import errno import functools import subprocess from collections import namedtuple from ctypes import windll from ctypes import wintypes from kolibri.core.analytics.pskolibri.common import AccessDenied from kolibri.core.analytics.psk...
true
true
f75a60f1a2fe0eed85c4f87e6c7ec5642e5cfb8e
378
py
Python
backup/ya_disk.py
frosthamster/Music-manager
c9dbe8c8830960456fa37e1618a36cdf705453d8
[ "Unlicense" ]
null
null
null
backup/ya_disk.py
frosthamster/Music-manager
c9dbe8c8830960456fa37e1618a36cdf705453d8
[ "Unlicense" ]
null
null
null
backup/ya_disk.py
frosthamster/Music-manager
c9dbe8c8830960456fa37e1618a36cdf705453d8
[ "Unlicense" ]
null
null
null
from YaDiskClient.YaDiskClient import YaDisk, YaDiskException from .chunk_partitioner import ChunkPartitioner class YaDiskWithProgress(YaDisk): def upload(self, file, path): resp = self._sendRequest("PUT", path, data=ChunkPartitioner(file, 'Uploading library')) if resp.status_code != 201: ...
37.8
95
0.743386
from YaDiskClient.YaDiskClient import YaDisk, YaDiskException from .chunk_partitioner import ChunkPartitioner class YaDiskWithProgress(YaDisk): def upload(self, file, path): resp = self._sendRequest("PUT", path, data=ChunkPartitioner(file, 'Uploading library')) if resp.status_code != 201: ...
true
true
f75a6126c8ba5d6bbb28b0f1ac614796e4eb485b
222
py
Python
paypalhttp/serializers/json_serializer.py
cameronmoten/paypalhttp_python
72609783230663b8e34c6f0384837db7b166c8f4
[ "MIT" ]
5
2020-04-25T01:07:23.000Z
2021-10-21T21:39:00.000Z
paypalhttp/serializers/json_serializer.py
cameronmoten/paypalhttp_python
72609783230663b8e34c6f0384837db7b166c8f4
[ "MIT" ]
5
2018-01-31T18:05:35.000Z
2019-03-15T11:01:46.000Z
paypalhttp/serializers/json_serializer.py
cameronmoten/paypalhttp_python
72609783230663b8e34c6f0384837db7b166c8f4
[ "MIT" ]
13
2020-03-03T02:35:50.000Z
2022-03-17T18:12:49.000Z
import json class Json: def encode(self, request): return json.dumps(request.body) def decode(self, data): return json.loads(data) def content_type(self): return "application/json"
15.857143
39
0.635135
import json class Json: def encode(self, request): return json.dumps(request.body) def decode(self, data): return json.loads(data) def content_type(self): return "application/json"
true
true
f75a61469a73fe75322c257091d1008591d195ee
4,737
py
Python
sparse_dot_mkl/tests/test_gram_matrix.py
flatironinstitute/sparse_dot
d04a277016ec4af4e507131a3751daca028edc1d
[ "MIT" ]
45
2020-02-06T14:12:27.000Z
2022-03-23T21:01:43.000Z
sparse_dot_mkl/tests/test_gram_matrix.py
flatironinstitute/sparse_dot
d04a277016ec4af4e507131a3751daca028edc1d
[ "MIT" ]
15
2020-04-25T14:53:59.000Z
2022-01-06T18:25:20.000Z
sparse_dot_mkl/tests/test_gram_matrix.py
flatironinstitute/sparse_dot
d04a277016ec4af4e507131a3751daca028edc1d
[ "MIT" ]
7
2020-05-18T15:56:02.000Z
2021-09-23T01:14:44.000Z
import unittest import numpy as np import numpy.testing as npt from sparse_dot_mkl import gram_matrix_mkl from sparse_dot_mkl.tests.test_mkl import MATRIX_1 class TestGramMatrix(unittest.TestCase): @classmethod def setUpClass(cls): gram_ut = np.dot(MATRIX_1.A.T, MATRIX_1.A) gram_ut[np.tril_in...
44.271028
120
0.651678
import unittest import numpy as np import numpy.testing as npt from sparse_dot_mkl import gram_matrix_mkl from sparse_dot_mkl.tests.test_mkl import MATRIX_1 class TestGramMatrix(unittest.TestCase): @classmethod def setUpClass(cls): gram_ut = np.dot(MATRIX_1.A.T, MATRIX_1.A) gram_ut[np.tril_in...
true
true
f75a61995b4ae30d0fcab9ff9337eb6e8b7580f7
143
py
Python
asking/types.py
cariad/asking
482947f70e90928314b90c2db14a86908714125a
[ "MIT" ]
null
null
null
asking/types.py
cariad/asking
482947f70e90928314b90c2db14a86908714125a
[ "MIT" ]
4
2021-11-28T08:40:52.000Z
2021-11-30T14:43:58.000Z
asking/types.py
cariad/asking
482947f70e90928314b90c2db14a86908714125a
[ "MIT" ]
null
null
null
from typing import Any, Dict, List AnyDict = Dict[Any, Any] StageKey = str StageType = List[Dict[str, Any]] ScriptDict = Dict[str, StageType]
20.428571
34
0.727273
from typing import Any, Dict, List AnyDict = Dict[Any, Any] StageKey = str StageType = List[Dict[str, Any]] ScriptDict = Dict[str, StageType]
true
true
f75a62c125232999538b725e9933524baab1aa4d
199
py
Python
atcoder/abc042A_iroha_and_haiku.py
uninhm/kyopro
bf6ed9cbf6a5e46cde0291f7aa9d91a8ddf1f5a3
[ "BSD-3-Clause" ]
31
2020-05-13T01:07:55.000Z
2021-07-13T07:53:26.000Z
atcoder/abc042A_iroha_and_haiku.py
uninhm/kyopro
bf6ed9cbf6a5e46cde0291f7aa9d91a8ddf1f5a3
[ "BSD-3-Clause" ]
10
2020-05-20T07:22:09.000Z
2021-07-19T03:52:13.000Z
atcoder/abc042A_iroha_and_haiku.py
uninhm/kyopro
bf6ed9cbf6a5e46cde0291f7aa9d91a8ddf1f5a3
[ "BSD-3-Clause" ]
14
2020-05-11T05:58:36.000Z
2021-12-07T03:20:43.000Z
# Vicfred # https://atcoder.jp/contests/abc042/tasks/abc042_a # implementation, sorting ins = list(map(int, input().split())) ins.sort() if ins == [5, 5, 7]: print("YES") else: print("NO")
16.583333
51
0.633166
ins = list(map(int, input().split())) ins.sort() if ins == [5, 5, 7]: print("YES") else: print("NO")
true
true
f75a6323aac216f0759da009a039f45e77b5f248
99
py
Python
server/src/app.py
vabalcar/police-lineups
9c4a17d58e973d6db6e442bd9d5f4313ad4d51b7
[ "MIT" ]
null
null
null
server/src/app.py
vabalcar/police-lineups
9c4a17d58e973d6db6e442bd9d5f4313ad4d51b7
[ "MIT" ]
2
2021-09-24T11:43:58.000Z
2021-09-24T12:00:21.000Z
server/src/app.py
vabalcar/police-lineups
9c4a17d58e973d6db6e442bd9d5f4313ad4d51b7
[ "MIT" ]
null
null
null
#!/usr/bin/env python3.10 from police_lineups.singletons import Server app = Server().current.app
19.8
44
0.777778
from police_lineups.singletons import Server app = Server().current.app
true
true
f75a63448dd01dec5a5198920bf78168f0c811f0
9,865
py
Python
docs/conf.py
rileyhales/tethys
740698a95767d88612b9ce9c562ca614a5385a62
[ "BSD-2-Clause" ]
null
null
null
docs/conf.py
rileyhales/tethys
740698a95767d88612b9ce9c562ca614a5385a62
[ "BSD-2-Clause" ]
null
null
null
docs/conf.py
rileyhales/tethys
740698a95767d88612b9ce9c562ca614a5385a62
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Tethys Platform documentation build configuration file, created by # sphinx-quickstart on Sat Oct 18 17:30:09 2014. # # 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...
35.872727
114
0.696706
import sys import os from unittest import mock import pbr.version import pbr.git from django.conf import settings import django MOCK_MODULES = [ 'bokeh', 'bokeh.core.templates', 'bokeh.document', 'bokeh.embed', 'bokeh.embed.elements', 'bokeh.embed.util', 'bokeh.resources', 'bokeh.server.django', 'bokeh.serv...
true
true
f75a63a6e8a650f728311431049ab1412a7b9624
701
py
Python
Raspberry pi code.py
khalido394/Co-Pilot
17a5440720f2f3d3a97ef6698977640a20aec0f1
[ "MIT" ]
null
null
null
Raspberry pi code.py
khalido394/Co-Pilot
17a5440720f2f3d3a97ef6698977640a20aec0f1
[ "MIT" ]
null
null
null
Raspberry pi code.py
khalido394/Co-Pilot
17a5440720f2f3d3a97ef6698977640a20aec0f1
[ "MIT" ]
null
null
null
import requests import re import time ## while 1: # Waiting for the request url = "http://quotidian-twins.000webhostapp.com/rasp.php" payload = {'hall': '205'} r=requests.post(url, data=payload) #a = r.text.split("\n") a=r.text a = re.findall(r"[\w']+", a) #print (a) print(r.text) if...
24.172414
68
0.522111
import requests import re import time while 1: url = "http://quotidian-twins.000webhostapp.com/rasp.php" payload = {'hall': '205'} r=requests.post(url, data=payload) a=r.text a = re.findall(r"[\w']+", a) #print (a) print(r.text) if (a[0] == "notvalid"): time.sleep(10) els...
true
true
f75a63eea4836a6208d9994b4bee7897b938eb29
8,273
py
Python
test/test_task.py
ntamas/aio-net-events
a4fd2882f151008fb4351643fb5c1e0fe8fa0f5b
[ "MIT" ]
1
2020-04-08T21:32:58.000Z
2020-04-08T21:32:58.000Z
test/test_task.py
ntamas/aio-net-events
a4fd2882f151008fb4351643fb5c1e0fe8fa0f5b
[ "MIT" ]
1
2020-03-24T16:45:54.000Z
2020-03-24T16:45:54.000Z
test/test_task.py
ntamas/aio-net-events
a4fd2882f151008fb4351643fb5c1e0fe8fa0f5b
[ "MIT" ]
null
null
null
from aio_net_events import NetworkEventDetector from aio_net_events.backends.base import NetworkEventDetectorBackend from anyio import CancelScope, create_task_group, sleep from collections import defaultdict from pytest import fixture, mark from typing import Dict, List, Optional class MockBackend(NetworkEventDetect...
29.130282
82
0.549982
from aio_net_events import NetworkEventDetector from aio_net_events.backends.base import NetworkEventDetectorBackend from anyio import CancelScope, create_task_group, sleep from collections import defaultdict from pytest import fixture, mark from typing import Dict, List, Optional class MockBackend(NetworkEventDetect...
true
true
f75a6488e7e8d5b343c21eb03cfce048a2aff02b
1,885
py
Python
lab3/main.py
Winterpuma/bmstu_MR
95224902046f5322219b99badbb3682fd08e25c5
[ "MIT" ]
9
2020-12-19T15:08:34.000Z
2022-01-06T21:32:28.000Z
lab3/main.py
Winterpuma/bmstu_MR
95224902046f5322219b99badbb3682fd08e25c5
[ "MIT" ]
null
null
null
lab3/main.py
Winterpuma/bmstu_MR
95224902046f5322219b99badbb3682fd08e25c5
[ "MIT" ]
2
2021-12-12T20:24:31.000Z
2022-01-05T07:32:05.000Z
from math import fabs import random import graph import solve_linalg import stabilization PRECISION = 5 def generate_matrix(size): return [ [round(random.random(), PRECISION) if i != j else 0.0 for j in range(size)] for i in range(size) ] def output(title, caption, data): print(title) ...
26.928571
112
0.615915
from math import fabs import random import graph import solve_linalg import stabilization PRECISION = 5 def generate_matrix(size): return [ [round(random.random(), PRECISION) if i != j else 0.0 for j in range(size)] for i in range(size) ] def output(title, caption, data): print(title) ...
true
true
f75a64ced0e19d8c3733bf74bf003e861f1b99cf
3,403
py
Python
validation/certs/scripts/chains/crl_has_expired/generate.py
Werxis/usable-cert-validation
d166af6accbd1054f1ecd9db7a70600ca9c1bf8e
[ "MIT" ]
null
null
null
validation/certs/scripts/chains/crl_has_expired/generate.py
Werxis/usable-cert-validation
d166af6accbd1054f1ecd9db7a70600ca9c1bf8e
[ "MIT" ]
null
null
null
validation/certs/scripts/chains/crl_has_expired/generate.py
Werxis/usable-cert-validation
d166af6accbd1054f1ecd9db7a70600ca9c1bf8e
[ "MIT" ]
null
null
null
import asn1tools from utils import x509 from utils import io from utils import misc from utils import crypto VALID_ASN_FILE = 'valid.asn' EXPORTED_KEY_NAME = 'key.pem' EXPORTED_CHAIN_NAME = 'chain.pem' EXPORTED_CRL_NAME = 'crl.der' def main(): args = misc.parse_arguments() # Compile the ASN.1 specification ...
38.235955
125
0.615339
import asn1tools from utils import x509 from utils import io from utils import misc from utils import crypto VALID_ASN_FILE = 'valid.asn' EXPORTED_KEY_NAME = 'key.pem' EXPORTED_CHAIN_NAME = 'chain.pem' EXPORTED_CRL_NAME = 'crl.der' def main(): args = misc.parse_arguments() asn = asn1tools.compile_files(...
true
true
f75a653242e5332dbbd32741d48b7d41dc41da36
3,649
py
Python
application/pages/awesome_panel_express_tests/test_perspective.py
slamer59/awesome-panel
91c30bd6d6859eadf9c65b1e143952f7e64d5290
[ "Apache-2.0" ]
null
null
null
application/pages/awesome_panel_express_tests/test_perspective.py
slamer59/awesome-panel
91c30bd6d6859eadf9c65b1e143952f7e64d5290
[ "Apache-2.0" ]
null
null
null
application/pages/awesome_panel_express_tests/test_perspective.py
slamer59/awesome-panel
91c30bd6d6859eadf9c65b1e143952f7e64d5290
[ "Apache-2.0" ]
null
null
null
""" # Perspective Viewer [Perspective](https://github.com/finos/perspective#readme) is an interactive visualization component for large, real-time datasets. It comes with the `perspective-viewer` web component. It enables analysts and traders at large banks like J.P.Morgan to understand their data. But it is a...
30.408333
100
0.664292
import pathlib import pandas as pd import panel as pn from awesome_panel.express.components import PerspectiveViewer DARK_BACKGROUND = "rgb(42, 44, 47)" DARK_COLOR = "white" PERSPECTIVE_LOGO = "https://perspective.finos.org/img/logo.png" PANEL_LOGO = "https://panel.holoviz.org/_static/logo_horizontal.png" ...
true
true
f75a65473ea74650e90363e9bf223a973b260310
2,152
py
Python
examples/adwords/v201809/basic_operations/remove_keyword.py
ale180192/googleads-python-lib
783a2d40a49956fb16ed73280708f6f9e322aa09
[ "Apache-2.0" ]
601
2015-01-07T09:53:49.000Z
2022-03-31T17:18:11.000Z
examples/adwords/v201809/basic_operations/remove_keyword.py
ale180192/googleads-python-lib
783a2d40a49956fb16ed73280708f6f9e322aa09
[ "Apache-2.0" ]
443
2015-01-07T12:16:57.000Z
2022-03-14T14:46:56.000Z
examples/adwords/v201809/basic_operations/remove_keyword.py
ale180192/googleads-python-lib
783a2d40a49956fb16ed73280708f6f9e322aa09
[ "Apache-2.0" ]
1,135
2015-01-07T15:51:55.000Z
2022-03-31T17:18:13.000Z
#!/usr/bin/env python # # Copyright 2016 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 requir...
31.647059
77
0.69842
from googleads import adwords AD_GROUP_ID = 'INSERT_AD_GROUP_ID_HERE' CRITERION_ID = 'INSERT_CRITERION_ID_HERE' def main(client, ad_group_id, criterion_id): ad_group_criterion_service = client.GetService( 'AdGroupCriterionService', version='v201809') operations = [ { 'operator': 'RE...
true
true
f75a65bb969a5d124120eb2191a5d209b99748cb
6,924
py
Python
nnvm/tvm/topi/python/topi/broadcast.py
CynthiaProtector/helo
ad9e22363a92389b3fa519ecae9061c6ead28b05
[ "Apache-2.0" ]
22
2019-02-20T12:42:20.000Z
2021-12-25T06:09:46.000Z
src/nnvm/tvm/topi/python/topi/broadcast.py
tashby/turicreate
7f07ce795833d0c56c72b3a1fb9339bed6d178d1
[ "BSD-3-Clause" ]
4
2019-04-01T07:36:04.000Z
2022-03-24T03:11:26.000Z
src/nnvm/tvm/topi/python/topi/broadcast.py
tashby/turicreate
7f07ce795833d0c56c72b3a1fb9339bed6d178d1
[ "BSD-3-Clause" ]
7
2019-03-20T16:04:37.000Z
2021-04-28T18:40:11.000Z
# pylint: disable=no-member,consider-using-enumerate """Broadcast operators""" from __future__ import absolute_import as _abs import tvm from .import tag from .util import get_const_tuple, equal_const_int def _get_bcast_info(original_shape, target_shape): """Get the broadcasting info. bcast_info = _get_bcast_...
28.261224
99
0.594887
from __future__ import absolute_import as _abs import tvm from .import tag from .util import get_const_tuple, equal_const_int def _get_bcast_info(original_shape, target_shape): assert len(target_shape) >= len(original_shape) bcast_info = [-1 for _ in range(len(target_shape))] original_shape = [original_sha...
true
true
f75a671a1678270e679c272f321169ec7e480473
969
py
Python
tests/Python/OWASP_a1/cwe_78/unsafe/cwe_78__I_readline__F_no_filtering__S_ls__1-11.1_File1.py
usnistgov/VTSG
f4477a78ec19f7e9757da0321cb5a69428e358cf
[ "MIT" ]
null
null
null
tests/Python/OWASP_a1/cwe_78/unsafe/cwe_78__I_readline__F_no_filtering__S_ls__1-11.1_File1.py
usnistgov/VTSG
f4477a78ec19f7e9757da0321cb5a69428e358cf
[ "MIT" ]
1
2022-01-31T22:22:55.000Z
2022-01-31T22:22:55.000Z
tests/Python/OWASP_a1/cwe_78/unsafe/cwe_78__I_readline__F_no_filtering__S_ls__1-11.1_File1.py
usnistgov/VTSG
f4477a78ec19f7e9757da0321cb5a69428e358cf
[ "MIT" ]
null
null
null
''' input: direct user input in string no filtering sink: run ls in a dir ''' ''' Created by Paul E. Black and William Mentzer 2020 This software was developed at the National Institute of Standards and Technology by employees of the Federal Government in the course of their official duties. Pursuant to title 17 Sect...
21.065217
81
0.665635
''' input: direct user input in string no filtering sink: run ls in a dir ''' ''' Created by Paul E. Black and William Mentzer 2020 This software was developed at the National Institute of Standards and Technology by employees of the Federal Government in the course of their official duties. Pursuant to title 17 Sect...
false
true
f75a673f8fb47a3dab1fc24a59ef55f716b2b2f3
957
py
Python
tests/test_svr.py
OscarPellicer/probreg
8f1dd23dd86371b8040abad580332ff36967c078
[ "MIT" ]
479
2019-03-06T16:24:01.000Z
2022-03-31T08:38:54.000Z
tests/test_svr.py
OscarPellicer/probreg
8f1dd23dd86371b8040abad580332ff36967c078
[ "MIT" ]
86
2019-05-15T19:10:53.000Z
2022-03-26T06:14:54.000Z
tests/test_svr.py
OscarPellicer/probreg
8f1dd23dd86371b8040abad580332ff36967c078
[ "MIT" ]
101
2019-03-21T08:52:58.000Z
2022-03-01T19:13:39.000Z
import unittest import numpy as np import transforms3d as t3d import open3d as o3 from probreg import l2dist_regs from probreg import transformation as tf class SVRTest(unittest.TestCase): def setUp(self): pcd = o3.io.read_point_cloud('data/horse.ply') pcd = pcd.voxel_down_sample(voxel_size=0.01) ...
38.28
97
0.671891
import unittest import numpy as np import transforms3d as t3d import open3d as o3 from probreg import l2dist_regs from probreg import transformation as tf class SVRTest(unittest.TestCase): def setUp(self): pcd = o3.io.read_point_cloud('data/horse.ply') pcd = pcd.voxel_down_sample(voxel_size=0.01) ...
true
true
f75a683e6039e90968a6de2ecaf223a6d2e7ac83
877
py
Python
src/aggregation_manager/trimmed_mean.py
anishacharya/BGMD
03dee098217d2b9a209fea5759e2e0a2237390a5
[ "MIT" ]
5
2022-01-21T06:21:51.000Z
2022-02-11T23:00:57.000Z
src/aggregation_manager/trimmed_mean.py
anishacharya/BGMD
03dee098217d2b9a209fea5759e2e0a2237390a5
[ "MIT" ]
null
null
null
src/aggregation_manager/trimmed_mean.py
anishacharya/BGMD
03dee098217d2b9a209fea5759e2e0a2237390a5
[ "MIT" ]
null
null
null
# Copyright (c) Anish Acharya. # Licensed under the MIT License import numpy as np from .base_gar import GAR from scipy import stats from typing import List """ Computes Trimmed mean estimates Cite: Yin, Chen, Ramchandran, Bartlett : Byzantine-Robust Distributed Learning: Towards Optimal Statistical Rates """ class ...
35.08
114
0.712657
import numpy as np from .base_gar import GAR from scipy import stats from typing import List class TrimmedMean(GAR): def __init__(self, aggregation_config): GAR.__init__(self, aggregation_config=aggregation_config) self.trimmed_mean_config = aggregation_config.get('trimmed_mean_config', {}) ...
true
true
f75a69386b33106305dedf3e56241696bafdf347
22,696
py
Python
mne/io/nirx/tests/test_nirx.py
guiomar/mne-python
2d19800a07904cfe69c1ba290c3eaf712625c6ab
[ "BSD-3-Clause" ]
2
2020-05-11T13:34:36.000Z
2020-05-28T19:43:21.000Z
mne/io/nirx/tests/test_nirx.py
guiomar/mne-python
2d19800a07904cfe69c1ba290c3eaf712625c6ab
[ "BSD-3-Clause" ]
8
2018-03-03T19:59:16.000Z
2020-10-14T11:00:33.000Z
mne/io/nirx/tests/test_nirx.py
guiomar/mne-python
2d19800a07904cfe69c1ba290c3eaf712625c6ab
[ "BSD-3-Clause" ]
4
2017-08-14T18:03:22.000Z
2021-03-04T06:55:29.000Z
# -*- coding: utf-8 -*- # Authors: Robert Luke <mail@robertluke.net> # Eric Larson <larson.eric.d@gmail.com> # simplified BSD-3 license import os.path as op import shutil import os import datetime as dt import numpy as np import pytest from numpy.testing import assert_allclose, assert_array_equal ...
39.198618
81
0.628128
import os.path as op import shutil import os import datetime as dt import numpy as np import pytest from numpy.testing import assert_allclose, assert_array_equal from mne import pick_types from mne.datasets.testing import data_path, requires_testing_data from mne.io import read_raw_nirx, read_raw_snirf from mne.util...
true
true
f75a69c09c19389a7bece458ff137830c7dbce9a
11,362
py
Python
mmcls/models/utils/attention.py
Miles-Ma/mmclassification
b54acfd5c431bf3a15a964c9d3d9a271c197ac18
[ "Apache-2.0" ]
2
2021-05-21T04:56:52.000Z
2021-06-21T04:26:13.000Z
mmcls/models/utils/attention.py
Miles-Ma/mmclassification
b54acfd5c431bf3a15a964c9d3d9a271c197ac18
[ "Apache-2.0" ]
null
null
null
mmcls/models/utils/attention.py
Miles-Ma/mmclassification
b54acfd5c431bf3a15a964c9d3d9a271c197ac18
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F from mmcv.cnn.bricks.transformer import build_dropout from mmcv.cnn.utils.weight_init import trunc_normal_ from mmcv.runner.base_module import BaseModule from ..builder import ATTENTION from .helpers import to_2tuple class WindowMSA(BaseModule): ...
39.17931
79
0.563897
import torch import torch.nn as nn import torch.nn.functional as F from mmcv.cnn.bricks.transformer import build_dropout from mmcv.cnn.utils.weight_init import trunc_normal_ from mmcv.runner.base_module import BaseModule from ..builder import ATTENTION from .helpers import to_2tuple class WindowMSA(BaseModule): ...
true
true
f75a6a100006acda531342ddfd09ac6cd7892636
912
py
Python
tests/test_utils.py
relevitt/SoCo
aeffc02d11dbfc60e4589c473a3a528abaceea0a
[ "MIT" ]
1,149
2015-01-02T02:08:34.000Z
2022-03-30T13:58:04.000Z
tests/test_utils.py
relevitt/SoCo
aeffc02d11dbfc60e4589c473a3a528abaceea0a
[ "MIT" ]
630
2015-01-01T10:44:22.000Z
2022-03-17T00:25:55.000Z
tests/test_utils.py
relevitt/SoCo
aeffc02d11dbfc60e4589c473a3a528abaceea0a
[ "MIT" ]
249
2015-01-07T20:11:10.000Z
2022-03-14T05:54:20.000Z
"""Tests for the utils module.""" from soco.utils import deprecated # Deprecation decorator def test_deprecation(recwarn): @deprecated("0.7") def dummy(args): """My docs.""" pass @deprecated("0.8", "better_function", "0.12") def dummy2(args): """My docs.""" pass ...
23.384615
72
0.571272
from soco.utils import deprecated def test_deprecation(recwarn): @deprecated("0.7") def dummy(args): pass @deprecated("0.8", "better_function", "0.12") def dummy2(args): pass assert dummy.__doc__ == "My docs.\n\n .. deprecated:: 0.7\n" assert ( dummy2.__doc__ == ...
true
true
f75a6a214f259d0738b801d1b433c0e7ab61f285
2,661
py
Python
data_preprocess.py
xpo0a/SpeechEnhancement
2efd67c24289541e43d3943cc1a3f8989c0afeb4
[ "MIT" ]
1
2021-02-02T22:41:37.000Z
2021-02-02T22:41:37.000Z
data_preprocess.py
xpo0a/SpeechEnhancement
2efd67c24289541e43d3943cc1a3f8989c0afeb4
[ "MIT" ]
null
null
null
data_preprocess.py
xpo0a/SpeechEnhancement
2efd67c24289541e43d3943cc1a3f8989c0afeb4
[ "MIT" ]
null
null
null
import os import yaml import librosa import numpy as np from tqdm import tqdm def slice_signal(file, window_size, stride, sample_rate): wav, sr = librosa.load(file, sr=None) if sr != sample_rate: wav = librosa.resample(wav, sr, sample_rate) wav = wav / np.max(np.abs(wav)) if np.max(wav) >...
35.013158
99
0.659902
import os import yaml import librosa import numpy as np from tqdm import tqdm def slice_signal(file, window_size, stride, sample_rate): wav, sr = librosa.load(file, sr=None) if sr != sample_rate: wav = librosa.resample(wav, sr, sample_rate) wav = wav / np.max(np.abs(wav)) if np.max(wav) >...
true
true
f75a6a9a24f1245c8d8ef2a74b28cb614d1f8318
2,297
py
Python
oauth_samples/python/oauth.py
Doist/twist-integration-examples
0e5c4044efaca1b339143babdf2b7b047a4c614c
[ "MIT" ]
2
2018-08-10T07:11:01.000Z
2018-11-04T10:00:32.000Z
oauth_samples/python/oauth.py
Doist/twist-integration-examples
0e5c4044efaca1b339143babdf2b7b047a4c614c
[ "MIT" ]
16
2018-09-04T14:05:57.000Z
2022-02-11T22:48:29.000Z
oauth_samples/python/oauth.py
Doist/twist-integration-examples
0e5c4044efaca1b339143babdf2b7b047a4c614c
[ "MIT" ]
5
2017-12-05T08:02:44.000Z
2020-03-20T12:08:01.000Z
__author__ = "scott" import requests import json import uuid import os AUTHORIZE_URL = "https://twist.com/oauth/authorize" TOKEN_URL = "https://twist.com/oauth/access_token" # callback url specified when the application was defined # e.g. http://dev.twist.test:4567/v3/ CALLBACK_URI = "<<enter the callback url for yo...
31.040541
76
0.746626
__author__ = "scott" import requests import json import uuid import os AUTHORIZE_URL = "https://twist.com/oauth/authorize" TOKEN_URL = "https://twist.com/oauth/access_token" CALLBACK_URI = "<<enter the callback url for your application>>" API_URL = "<<enter the url of the api endpoint you wish to access>>" SCOPES ...
true
true
f75a6ae463f32e4d7511e109856749e5028de35e
37,201
py
Python
pypy/jit/codegen/llvm/rgenop.py
camillobruni/pygirl
ddbd442d53061d6ff4af831c1eab153bcc771b5a
[ "MIT" ]
12
2016-01-06T07:10:28.000Z
2021-05-13T23:02:02.000Z
pypy/jit/codegen/llvm/rgenop.py
camillobruni/pygirl
ddbd442d53061d6ff4af831c1eab153bcc771b5a
[ "MIT" ]
null
null
null
pypy/jit/codegen/llvm/rgenop.py
camillobruni/pygirl
ddbd442d53061d6ff4af831c1eab153bcc771b5a
[ "MIT" ]
2
2016-07-29T07:09:50.000Z
2016-10-16T08:50:26.000Z
import py, os from pypy.rlib.objectmodel import specialize from pypy.rpython.lltypesystem import lltype, llmemory from pypy.rlib.rarithmetic import intmask, r_uint from pypy.jit.codegen.model import AbstractRGenOp, GenLabel, GenBuilder from pypy.jit.codegen.model import GenVar, GenConst, CodeGenSwitch from pypy.jit.cod...
38.791449
100
0.613908
import py, os from pypy.rlib.objectmodel import specialize from pypy.rpython.lltypesystem import lltype, llmemory from pypy.rlib.rarithmetic import intmask, r_uint from pypy.jit.codegen.model import AbstractRGenOp, GenLabel, GenBuilder from pypy.jit.codegen.model import GenVar, GenConst, CodeGenSwitch from pypy.jit.cod...
false
true
f75a6b4c4a3e18d4bee72cbb0ca0cceef8e8089c
2,486
py
Python
hood/models.py
hkawinzi/my-neighborhood
7c53dc14d7d030d09a9824eec4f5b3a0bd132f97
[ "Unlicense" ]
null
null
null
hood/models.py
hkawinzi/my-neighborhood
7c53dc14d7d030d09a9824eec4f5b3a0bd132f97
[ "Unlicense" ]
null
null
null
hood/models.py
hkawinzi/my-neighborhood
7c53dc14d7d030d09a9824eec4f5b3a0bd132f97
[ "Unlicense" ]
null
null
null
from django.db import models from django.contrib.auth.models import User # Create your models here. class User(models.Model): name = models.CharField(max_length=30) user_id = models.IntegerField() hood_id = models.IntegerField(blank=True, null=True) email = models.EmailField() date = models.DateFi...
29.951807
107
0.703942
from django.db import models from django.contrib.auth.models import User class User(models.Model): name = models.CharField(max_length=30) user_id = models.IntegerField() hood_id = models.IntegerField(blank=True, null=True) email = models.EmailField() date = models.DateField() location = models...
true
true
f75a6ce5796e6c0324a4ddc56a25ea9bf4de9428
2,571
py
Python
src/models/resnext.py
kbrodt/clog-loss
0831b3a01b079609a71490bb921633110927206c
[ "MIT" ]
1
2020-08-06T04:19:29.000Z
2020-08-06T04:19:29.000Z
src/models/resnext.py
kbrodt/clog-loss-alzheimers-research
0831b3a01b079609a71490bb921633110927206c
[ "MIT" ]
null
null
null
src/models/resnext.py
kbrodt/clog-loss-alzheimers-research
0831b3a01b079609a71490bb921633110927206c
[ "MIT" ]
null
null
null
import math from functools import partial from functools import partialmethod import torch import torch.nn as nn import torch.nn.functional as F from .resnet import conv1x1x1, Bottleneck, ResNet def partialclass(cls, *args, **kwargs): class PartialClass(cls): __init__ = partialmethod(cls.__init__, *arg...
30.975904
74
0.559315
import math from functools import partial from functools import partialmethod import torch import torch.nn as nn import torch.nn.functional as F from .resnet import conv1x1x1, Bottleneck, ResNet def partialclass(cls, *args, **kwargs): class PartialClass(cls): __init__ = partialmethod(cls.__init__, *arg...
true
true
f75a6da33b1dc60cc301b4bcd0cd7c47296914f1
4,957
py
Python
FormDeDupev2.py
radioboyQ/MapitFastAPI
6b52194a90e67ec4920e71f48bcc092d777a896c
[ "MIT" ]
null
null
null
FormDeDupev2.py
radioboyQ/MapitFastAPI
6b52194a90e67ec4920e71f48bcc092d777a896c
[ "MIT" ]
null
null
null
FormDeDupev2.py
radioboyQ/MapitFastAPI
6b52194a90e67ec4920e71f48bcc092d777a896c
[ "MIT" ]
null
null
null
from csv import DictReader from datetime import datetime import logging from pathlib import Path import pickle from pprint import pprint import sys from time import sleep import click import requests from rich.console import Console from rich.logging import RichHandler from rich.prompt import Confirm, Prompt from rich...
34.664336
125
0.650595
from csv import DictReader from datetime import datetime import logging from pathlib import Path import pickle from pprint import pprint import sys from time import sleep import click import requests from rich.console import Console from rich.logging import RichHandler from rich.prompt import Confirm, Prompt from rich...
true
true
f75a6dd5d5b154d8c5517e83cd84dc881ad8e9ac
5,022
py
Python
ytplayer_pkg/server.py
danglephd/youtubePlayer
664ae9f3c291f599e874afd1bff9e352a68b0c44
[ "MIT" ]
null
null
null
ytplayer_pkg/server.py
danglephd/youtubePlayer
664ae9f3c291f599e874afd1bff9e352a68b0c44
[ "MIT" ]
null
null
null
ytplayer_pkg/server.py
danglephd/youtubePlayer
664ae9f3c291f599e874afd1bff9e352a68b0c44
[ "MIT" ]
null
null
null
# import pafy # https://github.com/mps-youtube/pafy # import vlc # import urllib # import json # from slackeventsapi import SlackEventAdapter # from slack import WebClient # from slack_webhook import Slack # from ytplayer_pkg.youtube_lib import YouTubePlayer, YouTubeVideo # from urllib.parse import urlencode # import ...
36.656934
94
0.553763
# SLACK_VERIFICATION_TOKEN = os.environ["SLACK_VERIFICATION_TOKEN"] # # Create a SlackClient for your bot to use for Web API requests # SLACK_BOT_TOKEN = os.environ["SLACK_BOT_TOKEN"] # SLACK_SIGNING_SECRET = os.environ["SLACK_SIGNING_SECRET"] # slack_client = WebClient(SLACK_BOT_TOKEN) # # -------------------------...
true
true
f75a6e7143c0ba4d1769a0d75afaf15dde176d81
1,422
py
Python
backend/api/models/comment.py
CMPUT404-wi21-project/CMPUT404-project-socialdistribution
b88ca3608e16a1bae72cd7c8cfc212db74d1b2c0
[ "W3C-20150513" ]
1
2021-04-08T22:02:44.000Z
2021-04-08T22:02:44.000Z
backend/api/models/comment.py
CMPUT404-wi21-project/CMPUT404-project-socialdistribution
b88ca3608e16a1bae72cd7c8cfc212db74d1b2c0
[ "W3C-20150513" ]
79
2021-02-06T22:55:52.000Z
2021-04-15T20:24:56.000Z
backend/api/models/comment.py
CMPUT404-wi21-project/CMPUT404-project-socialdistribution
b88ca3608e16a1bae72cd7c8cfc212db74d1b2c0
[ "W3C-20150513" ]
4
2021-02-14T15:13:15.000Z
2021-04-17T06:21:11.000Z
from django.db import models import uuid # Related Model from api.models.post import Post from api.models.author import Author # List of tuples containing the content-types that are handled by this model ContentTypes = [ ('text/markdown' , 'text/markdown'), ('text/plain' , 'text/plain'), ('appl...
33.857143
119
0.696906
from django.db import models import uuid from api.models.post import Post from api.models.author import Author ContentTypes = [ ('text/markdown' , 'text/markdown'), ('text/plain' , 'text/plain'), ('application/base64', 'application/base64'), ('image/png;base64' , 'image/png;base64'), (...
true
true
f75a6f0270fe02b009c9df6f9d37f8d8bc17fe74
8,296
py
Python
venv/lib/python3.6/site-packages/pygments/lexers/typoscript.py
yuxuan1995liu/darkflowyolo_detection
a7807e9b85833e3f877d46bb60e8fa7d0596a10b
[ "MIT" ]
11
2019-03-26T17:35:20.000Z
2019-05-14T17:03:15.000Z
team_members/Tzahi/src/Tester/python_to_use/Python37/Lib/site-packages/pygments/lexers/typoscript.py
or2261/Tracer
f92e06e0c2c7fc36f43e8862a800148cb98198e2
[ "MIT" ]
10
2019-05-22T13:55:30.000Z
2021-09-08T00:59:46.000Z
team_members/Tzahi/src/Tester/python_to_use/Python37/Lib/site-packages/pygments/lexers/typoscript.py
or2261/Tracer
f92e06e0c2c7fc36f43e8862a800148cb98198e2
[ "MIT" ]
13
2019-03-26T17:37:17.000Z
2019-07-30T18:33:03.000Z
# -*- coding: utf-8 -*- """ pygments.lexers.typoscript ~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for TypoScript `TypoScriptLexer` A TypoScript lexer. `TypoScriptCssDataLexer` Lexer that highlights markers, constants and registers within css. `TypoScriptHtmlDataLexer` Lexer th...
37.201794
88
0.490959
import re from pygments.lexer import RegexLexer, include, bygroups, using from pygments.token import Text, Comment, Name, String, Number, \ Operator, Punctuation __all__ = ['TypoScriptLexer', 'TypoScriptCssDataLexer', 'TypoScriptHtmlDataLexer'] class TypoScriptCssDataLexer(RegexLexer): name = 'TypoScriptC...
true
true
f75a6fd3b3f5c4584295baa64c1bb74d96fbf282
2,749
py
Python
freelancefinder/users/forms.py
ScorpionResponse/freelancefinder
7882aa8ed42afe689e594a3e10c9fc6369f70bf5
[ "BSD-3-Clause" ]
2
2017-03-18T04:28:58.000Z
2017-04-25T10:01:28.000Z
freelancefinder/users/forms.py
ScorpionResponse/freelancefinder
7882aa8ed42afe689e594a3e10c9fc6369f70bf5
[ "BSD-3-Clause" ]
20
2017-03-18T04:29:33.000Z
2017-06-13T22:37:42.000Z
freelancefinder/users/forms.py
ScorpionResponse/freelancefinder
7882aa8ed42afe689e594a3e10c9fc6369f70bf5
[ "BSD-3-Clause" ]
1
2019-01-14T19:02:06.000Z
2019-01-14T19:02:06.000Z
"""Forms for users.""" import logging from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, Layout, Fieldset, ButtonHolder, HTML from django_select2.forms import Select2Widget from taggit.forms import TagField from taggit_labels.widgets import LabelWidget from django import forms from ....
31.238636
115
0.585668
import logging from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, Layout, Fieldset, ButtonHolder, HTML from django_select2.forms import Select2Widget from taggit.forms import TagField from taggit_labels.widgets import LabelWidget from django import forms from .models import Profile f...
true
true
f75a7122287d62d5252384389488c8e278b1dfca
2,044
py
Python
tests/serializer/test_serializer_json.py
islavov/tchannel-python
ca3da9b4e0367d2e00078b158ab9e0bb4f328619
[ "MIT" ]
98
2015-07-10T23:42:11.000Z
2021-11-08T11:21:02.000Z
tests/serializer/test_serializer_json.py
islavov/tchannel-python
ca3da9b4e0367d2e00078b158ab9e0bb4f328619
[ "MIT" ]
445
2015-07-10T23:58:02.000Z
2021-08-24T14:58:39.000Z
tests/serializer/test_serializer_json.py
islavov/tchannel-python
ca3da9b4e0367d2e00078b158ab9e0bb4f328619
[ "MIT" ]
43
2015-07-22T19:14:57.000Z
2021-09-14T12:12:38.000Z
# Copyright (c) 2016 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publ...
32.444444
79
0.710861
from __future__ import absolute_import import pytest from tchannel.serializer.json import JsonSerializer @pytest.mark.parametrize('v1', [ ({}), ({'a': 'd'}), ]) def test_header(v1): serializer = JsonSerializer() assert v1 == serializer.deserialize_header( serializer.serialize_header(v1) ...
true
true
f75a7197149d38d61c4a5910f50633c1d0514f98
1,503
py
Python
Python/Tests/refreshdb.py
Cellule/PTVS
a5b78ed55377335f9ca2839c19d21e24de8cdb94
[ "Apache-2.0" ]
1
2020-05-12T19:54:18.000Z
2020-05-12T19:54:18.000Z
Python/Tests/refreshdb.py
alepao821/PTVS
721237b07d4c97c1895c8efc7fb1837b1abfcb16
[ "Apache-2.0" ]
null
null
null
Python/Tests/refreshdb.py
alepao821/PTVS
721237b07d4c97c1895c8efc7fb1837b1abfcb16
[ "Apache-2.0" ]
1
2018-11-13T19:57:35.000Z
2018-11-13T19:57:35.000Z
#! C:\IronPython27\ipy.exe import clr import sys import threading from Microsoft.Win32 import Registry for vsver in ["14.0", "12.0", "11.0", "10.0"]: key = Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\PythonTools\\" + vsver) if not key: continue value = key.GetValue("InstallDir") key....
29.470588
102
0.72322
import clr import sys import threading from Microsoft.Win32 import Registry for vsver in ["14.0", "12.0", "11.0", "10.0"]: key = Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\PythonTools\\" + vsver) if not key: continue value = key.GetValue("InstallDir") key.Close() if value: ...
false
true
f75a719d775f50a43227b99c90a0c749f8cd0ae3
615
py
Python
tests/test_unit.py
lmdsp/sentry-native
bac5d366593e68f240b4446c3bf1ab1d1556a7bd
[ "MIT" ]
213
2019-09-01T14:58:08.000Z
2022-03-28T11:38:12.000Z
tests/test_unit.py
lmdsp/sentry-native
bac5d366593e68f240b4446c3bf1ab1d1556a7bd
[ "MIT" ]
419
2019-08-29T13:38:44.000Z
2022-03-31T14:38:29.000Z
tests/test_unit.py
lmdsp/sentry-native
bac5d366593e68f240b4446c3bf1ab1d1556a7bd
[ "MIT" ]
113
2019-09-30T20:41:26.000Z
2022-03-31T08:36:18.000Z
import os import pytest from . import run from .conditions import has_http def test_unit(cmake, unittest): cwd = cmake( ["sentry_test_unit"], {"SENTRY_BACKEND": "none", "SENTRY_TRANSPORT": "none"} ) env = dict(os.environ) run(cwd, "sentry_test_unit", ["--no-summary", unittest], check=True, env...
30.75
84
0.682927
import os import pytest from . import run from .conditions import has_http def test_unit(cmake, unittest): cwd = cmake( ["sentry_test_unit"], {"SENTRY_BACKEND": "none", "SENTRY_TRANSPORT": "none"} ) env = dict(os.environ) run(cwd, "sentry_test_unit", ["--no-summary", unittest], check=True, env...
true
true
f75a7219e9db706feac857d6e1c4d917ab32974f
687
py
Python
tarefas-poo/lista-02/processa-numeros/view/paineis/painel_sem_repeticoes.py
victoriaduarte/POO_UFSC
0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a
[ "MIT" ]
null
null
null
tarefas-poo/lista-02/processa-numeros/view/paineis/painel_sem_repeticoes.py
victoriaduarte/POO_UFSC
0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a
[ "MIT" ]
null
null
null
tarefas-poo/lista-02/processa-numeros/view/paineis/painel_sem_repeticoes.py
victoriaduarte/POO_UFSC
0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a
[ "MIT" ]
null
null
null
# -------------------------- # UFSC - CTC - INE - INE5603 # Exercício Processa Números # -------------------------- # Classe responsável por verificar se lista não possui números repetidos. from view.paineis.painel_abstrato import PainelAbstrato from model.processa_numeros import sem_repeticoes class PainelSemRepetic...
32.714286
76
0.636099
from view.paineis.painel_abstrato import PainelAbstrato from model.processa_numeros import sem_repeticoes class PainelSemRepeticoes(PainelAbstrato): def __init__(self): super().__init__('Sem Repetições') def interaja(self): numeros = self._leiaints() if sem_repeticoes(numeros): ...
true
true
f75a724304aef9bfd7f3ecff2aaaa905058a3e13
4,533
py
Python
airflow/kubernetes/kubernetes_request_factory/pod_request_factory.py
Ryan-Miao/airflow
a2aca8714fac014ed7da97229d7877f1bc6e5a59
[ "Apache-2.0" ]
3
2019-10-03T21:38:59.000Z
2019-10-04T00:39:03.000Z
airflow/kubernetes/kubernetes_request_factory/pod_request_factory.py
Ryan-Miao/airflow
a2aca8714fac014ed7da97229d7877f1bc6e5a59
[ "Apache-2.0" ]
4
2020-07-07T20:16:19.000Z
2021-09-29T17:27:38.000Z
airflow/kubernetes/kubernetes_request_factory/pod_request_factory.py
upjohnc/airflow-upjohn-k8s
caadbc1618d73e054de99138b0892cea3a9327c4
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
5
2017-06-19T19:55:47.000Z
2020-10-10T00:49:20.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...
31.699301
90
0.668211
from typing import Dict import yaml from airflow.kubernetes.pod import Pod from airflow.kubernetes.kubernetes_request_factory.kubernetes_request_factory \ import KubernetesRequestFactory class SimplePodRequestFactory(KubernetesRequestFactory): _yaml = """apiVersion: v1 kind: Pod metadata: name: name spec:...
true
true
f75a72add157e7bf14dc4bda863495e83c235f3a
239
py
Python
moto/apigateway/__init__.py
argos83/moto
d3df810065c9c453d40fcc971f9be6b7b2846061
[ "Apache-2.0" ]
1
2021-03-06T22:01:41.000Z
2021-03-06T22:01:41.000Z
moto/apigateway/__init__.py
marciogh/moto
d3df810065c9c453d40fcc971f9be6b7b2846061
[ "Apache-2.0" ]
null
null
null
moto/apigateway/__init__.py
marciogh/moto
d3df810065c9c453d40fcc971f9be6b7b2846061
[ "Apache-2.0" ]
1
2017-10-19T00:53:28.000Z
2017-10-19T00:53:28.000Z
from __future__ import unicode_literals from .models import apigateway_backends from ..core.models import MockAWS, base_decorator apigateway_backend = apigateway_backends['us-east-1'] mock_apigateway = base_decorator(apigateway_backends)
34.142857
53
0.853556
from __future__ import unicode_literals from .models import apigateway_backends from ..core.models import MockAWS, base_decorator apigateway_backend = apigateway_backends['us-east-1'] mock_apigateway = base_decorator(apigateway_backends)
true
true
f75a72e0690a08e7b676a3a8a7ab77412daa6f64
1,741
py
Python
python/samples/sampler.py
NVIDIA/cuQuantum
0f00494d4639d760228ac002e83e6d2d3dd97eca
[ "BSD-3-Clause" ]
52
2021-12-04T20:39:12.000Z
2022-03-29T11:52:55.000Z
python/samples/sampler.py
NVIDIA/cuQuantum
0f00494d4639d760228ac002e83e6d2d3dd97eca
[ "BSD-3-Clause" ]
3
2022-02-01T22:46:50.000Z
2022-03-24T01:52:29.000Z
python/samples/sampler.py
NVIDIA/cuQuantum
0f00494d4639d760228ac002e83e6d2d3dd97eca
[ "BSD-3-Clause" ]
18
2021-12-20T17:52:07.000Z
2022-03-29T02:27:58.000Z
# Copyright (c) 2021-2022, NVIDIA CORPORATION & AFFILIATES # # SPDX-License-Identifier: BSD-3-Clause import numpy as np import cupy as cp import cuquantum from cuquantum import custatevec as cusv nIndexBits = 3 nSvSize = (1 << nIndexBits) nMaxShots = 5 nShots = 5 bitStringLen = 2; bitOrdering = np.asarr...
28.540984
88
0.695577
import numpy as np import cupy as cp import cuquantum from cuquantum import custatevec as cusv nIndexBits = 3 nSvSize = (1 << nIndexBits) nMaxShots = 5 nShots = 5 bitStringLen = 2; bitOrdering = np.asarray([0, 1], dtype=np.int32) bitStrings = np.empty((nShots,), dtype=np.int64) bitStrings_expected = np...
true
true
f75a73f0d4e13de5e8234b77a110c4a3109e3f42
3,048
py
Python
pit/app.py
K4lium/Snakepit
c11f3fb7f78b886dad09421bc84a97ee14b9bf0b
[ "MIT" ]
7
2016-09-09T08:09:24.000Z
2018-03-28T11:51:56.000Z
pit/app.py
Kalium/Snakepit
c11f3fb7f78b886dad09421bc84a97ee14b9bf0b
[ "MIT" ]
2
2016-11-13T01:43:29.000Z
2017-08-16T07:51:51.000Z
pit/app.py
K4lium/Snakepit
c11f3fb7f78b886dad09421bc84a97ee14b9bf0b
[ "MIT" ]
8
2016-09-09T08:09:37.000Z
2018-08-15T20:58:14.000Z
""" This is the Centralized pit application. Pit owns blobs for analysis, the results of the analysis, the rules used to score analysis, and serves it all up on demand. """ import os from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate import flask_restless_swagger from fl...
34.247191
78
0.67815
import os from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate import flask_restless_swagger from flask_restless_swagger import SwagAPIManager as APIManager from sqlalchemy.dialects.postgresql import JSON from flask_cors import CORS app = Flask(__name__) cors = CORS(app) d...
true
true
f75a745e3dbe92cc7f73502cfe2b51a4869a7223
1,806
py
Python
chia/wallet/sign_coin_solutions.py
leonmende/chia-blockchain
add5b3bbc9ec247e926b01e6b3afe64ba0544bdc
[ "Apache-2.0" ]
1
2021-04-15T09:43:32.000Z
2021-04-15T09:43:32.000Z
chia/wallet/sign_coin_solutions.py
Mateus-dang/chia-blockchain
2d2693496591b0b786461d16929b99a980d2528f
[ "Apache-2.0" ]
null
null
null
chia/wallet/sign_coin_solutions.py
Mateus-dang/chia-blockchain
2d2693496591b0b786461d16929b99a980d2528f
[ "Apache-2.0" ]
null
null
null
from typing import Callable, List, Optional import blspy from blspy import AugSchemeMPL, PrivateKey from chia.types.coin_solution import CoinSolution from chia.types.spend_bundle import SpendBundle from chia.util.condition_tools import conditions_dict_for_solution, pkm_pairs_for_conditions_dict async def sign_coin_...
40.133333
118
0.70155
from typing import Callable, List, Optional import blspy from blspy import AugSchemeMPL, PrivateKey from chia.types.coin_solution import CoinSolution from chia.types.spend_bundle import SpendBundle from chia.util.condition_tools import conditions_dict_for_solution, pkm_pairs_for_conditions_dict async def sign_coin_...
true
true
f75a74d2258d5cd907aa008a9ca5a0ab1466953e
613
py
Python
pysmartnode/components/machine/i2c.py
dasTholo/pysmartnode
90b0ae05e307433c4a904017902ffadd13835cef
[ "MIT" ]
null
null
null
pysmartnode/components/machine/i2c.py
dasTholo/pysmartnode
90b0ae05e307433c4a904017902ffadd13835cef
[ "MIT" ]
null
null
null
pysmartnode/components/machine/i2c.py
dasTholo/pysmartnode
90b0ae05e307433c4a904017902ffadd13835cef
[ "MIT" ]
null
null
null
# Author: Kevin Köck # Copyright Kevin Köck 2017-2019 Released under the MIT license # Created on 2017-10-28 COMPONENT_NAME = "I2C" """ example config: { package: .machine.i2c component: I2C constructor_args: { SCL: D4 SDA: 4 #FREQ: 100000 #optional, defaults to 100000 } } ...
16.567568
63
0.641109
COMPONENT_NAME = "I2C" __updated__ = "2018-08-18" __version__ = "0.4" import gc def I2C(SCL, SDA, FREQ=100000): from machine import I2C from pysmartnode.components.machine.pin import Pin i2c = I2C(scl=Pin(SCL), sda=Pin(SDA), freq=FREQ) gc.collect() return i2c
true
true
f75a759bcf2e4ef84b0086b5def590b1f09c6b89
443
py
Python
app/core/migrations/0006_recipe_image.py
karanverma7/recipe-app-api
8edac4ba29df89c1288f15d1e738de53bc78cf93
[ "MIT" ]
null
null
null
app/core/migrations/0006_recipe_image.py
karanverma7/recipe-app-api
8edac4ba29df89c1288f15d1e738de53bc78cf93
[ "MIT" ]
null
null
null
app/core/migrations/0006_recipe_image.py
karanverma7/recipe-app-api
8edac4ba29df89c1288f15d1e738de53bc78cf93
[ "MIT" ]
null
null
null
# Generated by Django 2.1.15 on 2020-06-03 16:28 import core.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0005_auto_20200531_1556'), ] operations = [ migrations.AddField( model_name='recipe', na...
22.15
93
0.632054
import core.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0005_auto_20200531_1556'), ] operations = [ migrations.AddField( model_name='recipe', name='image', field=models.ImageField(n...
true
true
f75a77b145a35d388e39c6ea10654d372d778b49
2,910
py
Python
rrtv_httprunner/ext/locust/__init__.py
chenfanghang/httprunner
519489255c3c148eb4ce027e3dc4699d3dece29b
[ "Apache-2.0" ]
1
2022-01-10T04:32:54.000Z
2022-01-10T04:32:54.000Z
rrtv_httprunner/ext/locust/__init__.py
chenfanghang/httprunner
519489255c3c148eb4ce027e3dc4699d3dece29b
[ "Apache-2.0" ]
null
null
null
rrtv_httprunner/ext/locust/__init__.py
chenfanghang/httprunner
519489255c3c148eb4ce027e3dc4699d3dece29b
[ "Apache-2.0" ]
1
2021-03-29T01:34:18.000Z
2021-03-29T01:34:18.000Z
import sys if "locust" in sys.argv[0]: try: # monkey patch all at beginning to avoid RecursionError when running locust. # `from gevent import monkey; monkey.patch_all()` will be triggered when importing locust from locust import main as locust_main print("NOTICE: gevent monkey pat...
25.086207
97
0.648797
import sys if "locust" in sys.argv[0]: try: from locust import main as locust_main print("NOTICE: gevent monkey patches have been applied !!!") except ImportError: msg = """ Locust is not installed, install first and try again. install with pip: $ pip install locust """...
true
true
f75a77cf9d9c0d160d5e67a71c082139499d6512
8,242
py
Python
examples/twisted_service.py
bwind/pika
c00648bf40635c8e8032814f30d2488df44961ec
[ "BSD-3-Clause" ]
1
2019-08-28T10:10:56.000Z
2019-08-28T10:10:56.000Z
examples/twisted_service.py
deslum/pika
d8af8a573b3535e02540c2e5a14c7b34e276adc0
[ "BSD-3-Clause" ]
null
null
null
examples/twisted_service.py
deslum/pika
d8af8a573b3535e02540c2e5a14c7b34e276adc0
[ "BSD-3-Clause" ]
null
null
null
""" # -*- coding:utf-8 -*- # based on: # - txamqp-helpers by Dan Siemon <dan@coverfire.com> (March 2010) # http://git.coverfire.com/?p=txamqp-twistd.git;a=tree # - Post by Brian Chandler # https://groups.google.com/forum/#!topic/pika-python/o_deVmGondk # - Pika Documentation # https://pika.readthedocs.io/en...
37.634703
132
0.683329
import logging import sys import pika from pika import spec from pika.adapters import twisted_connection from twisted.internet import protocol from twisted.application import internet from twisted.application import service from twisted.internet.defer import inlineCallbacks from twisted.internet import ssl, defer, t...
true
true
f75a77df8d55d6b791b08105e745381a61962be6
2,022
py
Python
Ar_Script/ar_203_测试_邮件附件发送.py
archerckk/PyTest
610dd89df8d70c096f4670ca11ed2f0ca3196ca5
[ "MIT" ]
null
null
null
Ar_Script/ar_203_测试_邮件附件发送.py
archerckk/PyTest
610dd89df8d70c096f4670ca11ed2f0ca3196ca5
[ "MIT" ]
1
2020-01-19T01:19:57.000Z
2020-01-19T01:19:57.000Z
Ar_Script/ar_203_测试_邮件附件发送.py
archerckk/PyTest
610dd89df8d70c096f4670ca11ed2f0ca3196ca5
[ "MIT" ]
null
null
null
from email.header import Header from email import encoders from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from email.mime.image import MIMEImage import smtplib import pdfkit import subprocess import os import time from selenium import webdriver import logging as log log.basicConfi...
19.823529
78
0.744807
from email.header import Header from email import encoders from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from email.mime.image import MIMEImage import smtplib import pdfkit import subprocess import os import time from selenium import webdriver import logging as log log.basicConfi...
true
true
f75a789b0a99323e76b1438162fec6de85a5bc08
19,053
py
Python
detectron/core/test_engine.py
JeromeMutgeert/Detectron-DA-Faster-RCNN
86e4fb06bf3e934c12eb0913ef4210ad61114386
[ "Apache-2.0" ]
null
null
null
detectron/core/test_engine.py
JeromeMutgeert/Detectron-DA-Faster-RCNN
86e4fb06bf3e934c12eb0913ef4210ad61114386
[ "Apache-2.0" ]
null
null
null
detectron/core/test_engine.py
JeromeMutgeert/Detectron-DA-Faster-RCNN
86e4fb06bf3e934c12eb0913ef4210ad61114386
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2017-present, Facebook, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
38.568826
137
0.623734
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from collections import defaultdict import cv2 import datetime import logging import numpy as np import os from caffe2.python import workspace from detectron.core.con...
true
true
f75a78cb5f0ae7e3e90fcf4b2aee9c6a4fdde268
2,311
py
Python
reactivex/operators/_slice.py
christiansandberg/RxPY
036027d2858ea6c9d45839c863bd791e5bb50c36
[ "MIT" ]
null
null
null
reactivex/operators/_slice.py
christiansandberg/RxPY
036027d2858ea6c9d45839c863bd791e5bb50c36
[ "MIT" ]
null
null
null
reactivex/operators/_slice.py
christiansandberg/RxPY
036027d2858ea6c9d45839c863bd791e5bb50c36
[ "MIT" ]
null
null
null
from sys import maxsize from typing import Any, Callable, List, Optional, TypeVar from reactivex import Observable from reactivex import operators as ops _T = TypeVar("_T") # pylint: disable=redefined-builtin def slice_( start: Optional[int] = None, stop: Optional[int] = None, step: Optional[int] = None ) -> Ca...
30.407895
87
0.591952
from sys import maxsize from typing import Any, Callable, List, Optional, TypeVar from reactivex import Observable from reactivex import operators as ops _T = TypeVar("_T") def slice_( start: Optional[int] = None, stop: Optional[int] = None, step: Optional[int] = None ) -> Callable[[Observable[_T]], Observable[...
true
true
f75a799d501681866dc76d2dce9e3d68f8dc26e7
151
py
Python
alicebot/plugins/aichat/config.py
Erisu0014/yuniBot
b6d6a35abb63a2de57375dee6a1cd6258b3a7a95
[ "Apache-2.0" ]
null
null
null
alicebot/plugins/aichat/config.py
Erisu0014/yuniBot
b6d6a35abb63a2de57375dee6a1cd6258b3a7a95
[ "Apache-2.0" ]
null
null
null
alicebot/plugins/aichat/config.py
Erisu0014/yuniBot
b6d6a35abb63a2de57375dee6a1cd6258b3a7a95
[ "Apache-2.0" ]
1
2022-02-11T12:46:43.000Z
2022-02-11T12:46:43.000Z
from pydantic import BaseSettings class Config(BaseSettings): tuling_url: str tuling_apikey: str class Config: extra = "ignore"
15.1
33
0.688742
from pydantic import BaseSettings class Config(BaseSettings): tuling_url: str tuling_apikey: str class Config: extra = "ignore"
true
true
f75a79bfa42405747df9e6f4f4ab743014e303b9
7,736
py
Python
python/paddle/fluid/tests/unittests/test_protobuf_descs.py
jerrywgz/Paddle
85c4912755b783dd7554a9d6b9dae4a7e40371bc
[ "Apache-2.0" ]
1
2018-08-03T03:33:52.000Z
2018-08-03T03:33:52.000Z
python/paddle/fluid/tests/unittests/test_protobuf_descs.py
jerrywgz/Paddle
85c4912755b783dd7554a9d6b9dae4a7e40371bc
[ "Apache-2.0" ]
3
2017-07-15T14:20:08.000Z
2019-05-06T03:16:54.000Z
python/paddle/fluid/tests/unittests/test_protobuf_descs.py
jerrywgz/Paddle
85c4912755b783dd7554a9d6b9dae4a7e40371bc
[ "Apache-2.0" ]
1
2018-07-20T07:13:31.000Z
2018-07-20T07:13:31.000Z
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
35.981395
74
0.638314
import unittest import paddle.fluid.core as core from paddle.fluid.framework import Program class TestOpDesc(unittest.TestCase): def test_op_desc(self): program_desc = core.ProgramDesc() self.assertIsNotNone(program_desc) block = program_desc.block(0) self.assertIsNotNone(block) ...
true
true
f75a7a19a48f2fc163e54f935abe195b8b2392e4
866
py
Python
zoo/test_habitat.py
josephkane/zoo-testing
5e5e8424bd8fdcbc96e12e82818ea47b7b559564
[ "MIT" ]
null
null
null
zoo/test_habitat.py
josephkane/zoo-testing
5e5e8424bd8fdcbc96e12e82818ea47b7b559564
[ "MIT" ]
null
null
null
zoo/test_habitat.py
josephkane/zoo-testing
5e5e8424bd8fdcbc96e12e82818ea47b7b559564
[ "MIT" ]
null
null
null
import unittest from zoo import * class TestHabitat(unittest.TestCase): def test_name_empty_string_by_default(self): habitat = Habitat() self.assertEqual(habitat.name, '') def test_members_empty_set_by_default(self): habitat = Habitat() self.assertIsInstance(habitat.members, set) def test_add_animal_to_h...
25.470588
45
0.750577
import unittest from zoo import * class TestHabitat(unittest.TestCase): def test_name_empty_string_by_default(self): habitat = Habitat() self.assertEqual(habitat.name, '') def test_members_empty_set_by_default(self): habitat = Habitat() self.assertIsInstance(habitat.members, set) def test_add_animal_to_h...
true
true
f75a7b91d15fa451a7606b478ba80da6d9d56c6a
2,702
py
Python
scripts/PSRA_combineSrcLossTable.py
DamonU2/model-factory
494f8b65afcd80fbedca3224e4c29a2e10cd484f
[ "MIT" ]
2
2021-05-28T20:43:03.000Z
2021-12-20T19:46:46.000Z
scripts/PSRA_combineSrcLossTable.py
OpenDRR/model-factory
2d9c77e8bd6ea3dd23b55bbb927bca2be33f97b5
[ "MIT" ]
63
2020-01-09T18:24:31.000Z
2022-03-28T21:49:28.000Z
scripts/PSRA_combineSrcLossTable.py
DamonU2/model-factory
494f8b65afcd80fbedca3224e4c29a2e10cd484f
[ "MIT" ]
8
2020-07-31T21:24:13.000Z
2021-06-21T17:52:11.000Z
#!/usr/bin/env python import pandas as pd import numpy as np import csv import glob import os import re import sys import argparse import configparser import logging ''' python script to merge source loss tables for Provinces and territories where PSRA runs have een split up by economic region or sub regions can be ...
33.358025
108
0.629534
import pandas as pd import numpy as np import csv import glob import os import re import sys import argparse import configparser import logging def main(): args = parse_args() os.chdir(args.srcLossDir) for retrofit in 'b0', 'r2': erFileList = glob.glob('*src_loss_table_{}.csv'.format(retrofit))...
true
true
f75a7bec73fcd89af9b564ff03e3ed6b0e42442a
1,914
py
Python
examples/dfp/v201505/custom_field_service/get_all_custom_fields.py
wbrp/googleads-python-lib
c0f8ce6c4acfe88ce8f913a4f0e0e92b548e1022
[ "Apache-2.0" ]
1
2020-05-23T11:32:32.000Z
2020-05-23T11:32:32.000Z
examples/dfp/v201505/custom_field_service/get_all_custom_fields.py
cmm08/googleads-python-lib
97743df32eff92cf00cb8beaddcda42dfa0a37f4
[ "Apache-2.0" ]
null
null
null
examples/dfp/v201505/custom_field_service/get_all_custom_fields.py
cmm08/googleads-python-lib
97743df32eff92cf00cb8beaddcda42dfa0a37f4
[ "Apache-2.0" ]
2
2018-04-20T02:16:33.000Z
2020-11-12T20:58:54.000Z
#!/usr/bin/python # # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
31.9
77
0.73093
"""This example gets all custom fields. To create custom fields, run create_custom_fields.py. The LoadFromStorage method is pulling credentials and properties from a "googleads.yaml" file. By default, it looks for this file in your home directory. For more information, see the "Caching authentication information" se...
false
true
f75a7d6c221afb66510c31a43b7cf9cbcfd6109e
1,323
py
Python
gpt2_model/generate_gpt2_embeddings.py
bclarkson-code/search-query-classification
8928faad459ef97934a6dbcf38a9347da5662415
[ "MIT" ]
null
null
null
gpt2_model/generate_gpt2_embeddings.py
bclarkson-code/search-query-classification
8928faad459ef97934a6dbcf38a9347da5662415
[ "MIT" ]
null
null
null
gpt2_model/generate_gpt2_embeddings.py
bclarkson-code/search-query-classification
8928faad459ef97934a6dbcf38a9347da5662415
[ "MIT" ]
null
null
null
import pickle import torch from tqdm.auto import tqdm from gpt2_predictor import GPT2Predictor, GPT2TestSearchQueryDataModule if __name__ == '__main__': encoding = { 'Arts': 0, 'Business': 11, 'Computers': 10, 'Games': 12, 'Health': 9, 'Home': 6, 'News': 14, ...
24.054545
71
0.5548
import pickle import torch from tqdm.auto import tqdm from gpt2_predictor import GPT2Predictor, GPT2TestSearchQueryDataModule if __name__ == '__main__': encoding = { 'Arts': 0, 'Business': 11, 'Computers': 10, 'Games': 12, 'Health': 9, 'Home': 6, 'News': 14, ...
true
true
f75a7ef53b1be01e3fc6733b7905f3a4e64aca2e
1,811
py
Python
setup.py
syslabcom/yafowil.plone
2379128f56f408fe396d0e09b23268e49909a8e0
[ "BSD-3-Clause" ]
null
null
null
setup.py
syslabcom/yafowil.plone
2379128f56f408fe396d0e09b23268e49909a8e0
[ "BSD-3-Clause" ]
null
null
null
setup.py
syslabcom/yafowil.plone
2379128f56f408fe396d0e09b23268e49909a8e0
[ "BSD-3-Clause" ]
null
null
null
from setuptools import find_packages from setuptools import setup import os version = '2.4.2.dev0' longdesc = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() longdesc += open(os.path.join(os.path.dirname(__file__), 'CHANGES.rst')).read() longdesc += open(os.path.join(os.path.dirname(__file__), 'LIC...
29.688525
79
0.623965
from setuptools import find_packages from setuptools import setup import os version = '2.4.2.dev0' longdesc = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() longdesc += open(os.path.join(os.path.dirname(__file__), 'CHANGES.rst')).read() longdesc += open(os.path.join(os.path.dirname(__file__), 'LIC...
true
true
f75a7fca5636f20deee3013f51fe47b90d40a096
6,565
py
Python
leads/tests.py
ShahriyarR/Django-CRM
c948b3423ff73a674f3a0ffebc0ff425af2151b5
[ "MIT" ]
null
null
null
leads/tests.py
ShahriyarR/Django-CRM
c948b3423ff73a674f3a0ffebc0ff425af2151b5
[ "MIT" ]
null
null
null
leads/tests.py
ShahriyarR/Django-CRM
c948b3423ff73a674f3a0ffebc0ff425af2151b5
[ "MIT" ]
null
null
null
from django.test import TestCase, Client from leads.models import Lead from common.models import Address, User from accounts.models import Account class TestLeadModel(object): def setUp(self): self.client = Client() self.user = User.objects.create(username='uday', email='u@mp.com', role="ADMIN") ...
45.590278
116
0.497334
from django.test import TestCase, Client from leads.models import Lead from common.models import Address, User from accounts.models import Account class TestLeadModel(object): def setUp(self): self.client = Client() self.user = User.objects.create(username='uday', email='u@mp.com', role="ADMIN") ...
true
true
f75a802bfca246143e3466a74746f158322d2e39
33,589
py
Python
stac_fastapi/sqlalchemy/tests/resources/test_item.py
tesselo/stac-fastapi
526501be27640edb924a4bced3e570405fe955a7
[ "MIT" ]
null
null
null
stac_fastapi/sqlalchemy/tests/resources/test_item.py
tesselo/stac-fastapi
526501be27640edb924a4bced3e570405fe955a7
[ "MIT" ]
null
null
null
stac_fastapi/sqlalchemy/tests/resources/test_item.py
tesselo/stac-fastapi
526501be27640edb924a4bced3e570405fe955a7
[ "MIT" ]
null
null
null
import json import os import time import uuid from copy import deepcopy from datetime import datetime, timedelta, timezone from random import randint from urllib.parse import parse_qs, urlparse, urlsplit import pystac from pydantic.datetime_parse import parse_datetime from pystac.utils import datetime_to_str from shap...
35.543915
112
0.663074
import json import os import time import uuid from copy import deepcopy from datetime import datetime, timedelta, timezone from random import randint from urllib.parse import parse_qs, urlparse, urlsplit import pystac from pydantic.datetime_parse import parse_datetime from pystac.utils import datetime_to_str from shap...
true
true
f75a80720c74dc6fea81e2c29899f2daa196c002
579
py
Python
tests/nnapi/specs/V1_2/sqrt_4D_float_nnfw.mod.py
bogus-sudo/ONE-1
7052a817eff661ec2854ed2e7ee0de5e8ba82b55
[ "Apache-2.0" ]
255
2020-05-22T07:45:29.000Z
2022-03-29T23:58:22.000Z
tests/nnapi/specs/V1_2/sqrt_4D_float_nnfw.mod.py
bogus-sudo/ONE-1
7052a817eff661ec2854ed2e7ee0de5e8ba82b55
[ "Apache-2.0" ]
5,102
2020-05-22T07:48:33.000Z
2022-03-31T23:43:39.000Z
tests/nnapi/specs/V1_2/sqrt_4D_float_nnfw.mod.py
bogus-sudo/ONE-1
7052a817eff661ec2854ed2e7ee0de5e8ba82b55
[ "Apache-2.0" ]
120
2020-05-22T07:51:08.000Z
2022-02-16T19:08:05.000Z
# model model = Model() i1 = Input("op1", "TENSOR_FLOAT32", "{2, 2, 2, 2}") i2 = Output("op2", "TENSOR_FLOAT32", "{2, 2, 2, 2}") model = model.Operation("SQRT", i1).To(i2) # Example 1. Input in operand 0, input0 = {i1: # input 0 [36, 90, 43, 36, 2, 22, 19, 10, 9, 80, 40, 90, 15, 56, 18, 12]} output0 = {i2: ...
38.6
101
0.599309
model = Model() i1 = Input("op1", "TENSOR_FLOAT32", "{2, 2, 2, 2}") i2 = Output("op2", "TENSOR_FLOAT32", "{2, 2, 2, 2}") model = model.Operation("SQRT", i1).To(i2) input0 = {i1: [36, 90, 43, 36, 2, 22, 19, 10, 9, 80, 40, 90, 15, 56, 18, 12]} output0 = {i2: [6.0, 9.48683298, 6.55743852, 6.0, 1.414...
true
true
f75a8145fce3d1087eee76c15f30f2aa7ea996ce
18,634
py
Python
scripts/qcls_dev.py
pizzathief/PyFluxPro
c075c0040b4a9d6c9ab75ca1cef158f1307f8396
[ "BSD-3-Clause" ]
null
null
null
scripts/qcls_dev.py
pizzathief/PyFluxPro
c075c0040b4a9d6c9ab75ca1cef158f1307f8396
[ "BSD-3-Clause" ]
null
null
null
scripts/qcls_dev.py
pizzathief/PyFluxPro
c075c0040b4a9d6c9ab75ca1cef158f1307f8396
[ "BSD-3-Clause" ]
1
2021-05-04T17:55:08.000Z
2021-05-04T17:55:08.000Z
import sys import logging import ast import constants as c import copy import numpy import os import qcck import qcgf import qcio import qcrp import qcts import qcutils import time import xlrd import meteorologicalfunctions as mf log = logging.getLogger('qc.ls') def l1qc(cf): # --- this is a separate actor in a s...
43.234339
108
0.694966
import sys import logging import ast import constants as c import copy import numpy import os import qcck import qcgf import qcio import qcrp import qcts import qcutils import time import xlrd import meteorologicalfunctions as mf log = logging.getLogger('qc.ls') def l1qc(cf): ds1 = l1qc_read_files(cf) ...
true
true
f75a81b73d07e26db4adb8f39c5306bfb0e799a3
951
py
Python
scalpels/cli/actions/report.py
pyKun/scalpels
9ba7210dd2546c68b03aea69433f794c102b8c52
[ "Apache-2.0" ]
null
null
null
scalpels/cli/actions/report.py
pyKun/scalpels
9ba7210dd2546c68b03aea69433f794c102b8c52
[ "Apache-2.0" ]
3
2015-09-17T03:21:47.000Z
2015-09-17T03:23:31.000Z
scalpels/cli/actions/report.py
pyKun/os-perf-tools
9ba7210dd2546c68b03aea69433f794c102b8c52
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python #-*- coding:utf-8 -*- # Author: Kun Huang <academicgareth@gmail.com> from scalpels.db import api as db_api LOWEST=8 def get_last_task(): last_task = db_api.task_get_last() return last_task def run(config): uuid = config.get("uuid") last = config.get("last") if last and uui...
25.702703
62
0.613039
from scalpels.db import api as db_api LOWEST=8 def get_last_task(): last_task = db_api.task_get_last() return last_task def run(config): uuid = config.get("uuid") last = config.get("last") if last and uuid: raise ValueError("can't assign last and uuid togther") elif not last and not...
false
true
f75a828615b200ca0d4d4a02ebd46b6051f229a2
110,025
py
Python
sdks/python/apache_beam/transforms/core.py
y1chi/beam
96b308323d65b6867cae18692703e3ced4d03a73
[ "Apache-2.0" ]
null
null
null
sdks/python/apache_beam/transforms/core.py
y1chi/beam
96b308323d65b6867cae18692703e3ced4d03a73
[ "Apache-2.0" ]
null
null
null
sdks/python/apache_beam/transforms/core.py
y1chi/beam
96b308323d65b6867cae18692703e3ced4d03a73
[ "Apache-2.0" ]
1
2021-04-03T06:33:50.000Z
2021-04-03T06:33:50.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 us...
36.408008
174
0.706612
from __future__ import absolute_import import copy import inspect import logging import random import sys import types import typing from builtins import map from builtins import object from builtins import range from past.builtins import unicode from apache_beam import coders from apache_beam import pvalue from ...
true
true
f75a82f0aecd1035059ede7291aa872cfe720a70
2,686
py
Python
rdr_service/tools/ehr_upload_for_organization.py
all-of-us/raw-data-repository
d28ad957557587b03ff9c63d55dd55e0508f91d8
[ "BSD-3-Clause" ]
39
2017-10-13T19:16:27.000Z
2021-09-24T16:58:21.000Z
rdr_service/tools/ehr_upload_for_organization.py
all-of-us/raw-data-repository
d28ad957557587b03ff9c63d55dd55e0508f91d8
[ "BSD-3-Clause" ]
312
2017-09-08T15:42:13.000Z
2022-03-23T18:21:40.000Z
rdr_service/tools/ehr_upload_for_organization.py
all-of-us/raw-data-repository
d28ad957557587b03ff9c63d55dd55e0508f91d8
[ "BSD-3-Clause" ]
19
2017-09-15T13:58:00.000Z
2022-02-07T18:33:20.000Z
""" Copies all files under Participant/:id from ptc-uploads-all-of-us-rdr-prod to awardee bucket with a site subdirectory. i.e. gs://aouxxx/Participant/hpo-site-xxx/P:id include a "no-site-pairing" subdirectory for thos participants not paired. Input: csv file with 'pmi_id' and 'paired_site' headers. Input: awardee bu...
31.97619
109
0.648176
import csv import logging import shlex import subprocess from rdr_service.main_util import configure_logging, get_parser SOURCE_BUCKET = "ptc-uploads-all-of-us-rdr-prod" def read_csv(input_file): participant = {} with open(input_file) as csv_file: reader = csv.DictReader(csv_file) try: ...
true
true
f75a83e5e43fab5684c1f30253d285a5a6834176
7,533
py
Python
costar_models/python/costar_models/conditional_image_costar.py
cpaxton/costar_plan
be5c12f9d0e9d7078e6a5c283d3be059e7f3d040
[ "Apache-2.0" ]
66
2018-10-31T04:58:53.000Z
2022-03-17T02:32:25.000Z
costar_models/python/costar_models/conditional_image_costar.py
cpaxton/costar_plan
be5c12f9d0e9d7078e6a5c283d3be059e7f3d040
[ "Apache-2.0" ]
8
2018-10-23T21:19:25.000Z
2018-12-03T02:08:41.000Z
costar_models/python/costar_models/conditional_image_costar.py
cpaxton/costar_plan
be5c12f9d0e9d7078e6a5c283d3be059e7f3d040
[ "Apache-2.0" ]
25
2018-10-19T00:54:17.000Z
2021-10-10T08:28:15.000Z
from __future__ import print_function import keras.backend as K import keras.losses as losses import keras.optimizers as optimizers import numpy as np from keras.callbacks import ModelCheckpoint from keras.layers.advanced_activations import LeakyReLU from keras.layers import Input, RepeatVector, Reshape from keras.la...
39.647368
100
0.585291
from __future__ import print_function import keras.backend as K import keras.losses as losses import keras.optimizers as optimizers import numpy as np from keras.callbacks import ModelCheckpoint from keras.layers.advanced_activations import LeakyReLU from keras.layers import Input, RepeatVector, Reshape from keras.la...
true
true
f75a845f657e28e18e3d47de4087c6b907e825c8
339
py
Python
src/MakeBigFile.py
iambillmccann/HackerRank
a5ea918bd57050dfc1e7dcecf70597371846a30a
[ "Apache-2.0" ]
null
null
null
src/MakeBigFile.py
iambillmccann/HackerRank
a5ea918bd57050dfc1e7dcecf70597371846a30a
[ "Apache-2.0" ]
null
null
null
src/MakeBigFile.py
iambillmccann/HackerRank
a5ea918bd57050dfc1e7dcecf70597371846a30a
[ "Apache-2.0" ]
null
null
null
import random import csv FILE_NAME = "./data/bigtestfile.data" COLUMNS = 1000 ROWS = 1000000 if __name__ == "__main__": with open(FILE_NAME, "w") as file: write = csv.writer(file) for row in range(ROWS): data = [ random.randint(0, 1000) for numbers in range(COLUMNS) ] wr...
22.6
78
0.622419
import random import csv FILE_NAME = "./data/bigtestfile.data" COLUMNS = 1000 ROWS = 1000000 if __name__ == "__main__": with open(FILE_NAME, "w") as file: write = csv.writer(file) for row in range(ROWS): data = [ random.randint(0, 1000) for numbers in range(COLUMNS) ] wr...
true
true
f75a846bb3c9ad42290b9e3b6667b98fd5dbbe0f
2,218
py
Python
DownloadYoutubeList.py
kuuhakuDev/DownloadYoutubeList
b0b3b58baec38fdf53d5c95a98f654da220aff0e
[ "MIT" ]
null
null
null
DownloadYoutubeList.py
kuuhakuDev/DownloadYoutubeList
b0b3b58baec38fdf53d5c95a98f654da220aff0e
[ "MIT" ]
null
null
null
DownloadYoutubeList.py
kuuhakuDev/DownloadYoutubeList
b0b3b58baec38fdf53d5c95a98f654da220aff0e
[ "MIT" ]
null
null
null
#!/bin/python # -*- coding: utf-8 -*- # # [kuuhakuDev] # [DownloadYoutubeList] #Descargar lista de reproduccion en youtube # # #Usted puede copiar, editar, distribuir y hacer lo que quiera #con el codigo presente... # #Leer licencia import urllib2 import argparse import commands import os href = "pl-video-title...
28.805195
127
0.695221
import urllib2 import argparse import commands import os href = "pl-video-title-link yt-uix-tile-link yt-uix-sessionlink spf-link " fichero = "youtube.txt" parse = argparse.ArgumentParser() parse.add_argument("-u", "--url", help="Introduce la lista de reproduccion a descargar") parse.add_argument("-w", "--write", ...
false
true
f75a867708ece431d3ea8cc74d4ad9cdd51e457e
1,023
py
Python
setup.py
Man-who-sold-the-world/gdelt-doc-api
9e2a5922aba7a56718fc6886e926e351e73597b4
[ "MIT" ]
null
null
null
setup.py
Man-who-sold-the-world/gdelt-doc-api
9e2a5922aba7a56718fc6886e926e351e73597b4
[ "MIT" ]
null
null
null
setup.py
Man-who-sold-the-world/gdelt-doc-api
9e2a5922aba7a56718fc6886e926e351e73597b4
[ "MIT" ]
null
null
null
import setuptools with open("requirements.txt", "r") as f: requirements = [line.replace("\n", "") for line in f.readlines()] with open("README.md", "r") as fh: long_description = fh.read() with open("gdeltdoc/__init__.py", "r") as g: version = "1.0.0" for line in g.readlines(): if "__version_...
31.96875
92
0.632454
import setuptools with open("requirements.txt", "r") as f: requirements = [line.replace("\n", "") for line in f.readlines()] with open("README.md", "r") as fh: long_description = fh.read() with open("gdeltdoc/__init__.py", "r") as g: version = "1.0.0" for line in g.readlines(): if "__version_...
true
true
f75a86bfa7ded681e8d8044a2ee830227dedf8aa
27,580
py
Python
openfacstrack/apps/track/migrations/0001_initial.py
ficolo/OpenFacsTrack
27e05610d82f0e33cf2d10facb191fc3e68d60fe
[ "Apache-2.0" ]
null
null
null
openfacstrack/apps/track/migrations/0001_initial.py
ficolo/OpenFacsTrack
27e05610d82f0e33cf2d10facb191fc3e68d60fe
[ "Apache-2.0" ]
11
2020-04-09T11:01:23.000Z
2021-11-18T17:27:23.000Z
openfacstrack/apps/track/migrations/0001_initial.py
ficolo/OpenFacsTrack
27e05610d82f0e33cf2d10facb191fc3e68d60fe
[ "Apache-2.0" ]
3
2020-04-07T14:47:45.000Z
2020-04-09T11:30:47.000Z
# Generated by Django 3.0.3 on 2020-05-13 20:30 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import openfacstrack.apps.core.models import openfacstrack.apps.track.models class Migration(migrations.Migration): initial = True dependencies = [ ...
36.82243
87
0.382705
from django.conf import settings from django.db import migrations, models import django.db.models.deletion import openfacstrack.apps.core.models import openfacstrack.apps.track.models class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUT...
true
true
f75a8782274302406f5b1f04ef1ec038afeeb2fd
1,378
py
Python
apps/search/src/search/management/commands/search_setup.py
xiaobing007/hue
cd68e9be3c96209d8dc8a4e08ec6b8265ec3becf
[ "Apache-2.0" ]
null
null
null
apps/search/src/search/management/commands/search_setup.py
xiaobing007/hue
cd68e9be3c96209d8dc8a4e08ec6b8265ec3becf
[ "Apache-2.0" ]
null
null
null
apps/search/src/search/management/commands/search_setup.py
xiaobing007/hue
cd68e9be3c96209d8dc8a4e08ec6b8265ec3becf
[ "Apache-2.0" ]
1
2019-07-23T12:36:09.000Z
2019-07-23T12:36:09.000Z
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
36.263158
110
0.778665
import logging from django.core import management from django.core.management.base import NoArgsCommand from desktop.models import Document, Document2, SAMPLE_USER_OWNERS from useradmin.models import install_sample_user LOG = logging.getLogger(__name__) class Command(NoArgsCommand): def handle_noargs(self, **o...
true
true
f75a87e5db8e171b22ec1caace21c4a7ad02c56a
2,653
py
Python
beakerx/beakerx/tabledisplay/tableitems.py
acq/beakerx
584023ce0fdb052713855d8a9455e6d7422e53da
[ "Apache-2.0" ]
null
null
null
beakerx/beakerx/tabledisplay/tableitems.py
acq/beakerx
584023ce0fdb052713855d8a9455e6d7422e53da
[ "Apache-2.0" ]
null
null
null
beakerx/beakerx/tabledisplay/tableitems.py
acq/beakerx
584023ce0fdb052713855d8a9455e6d7422e53da
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 TWO SIGMA OPEN SOURCE, LLC # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
24.33945
115
0.695439
from enum import Enum from dateutil.parser import parse class TableDisplayAlignmentProvider(Enum): CENTER_ALIGNMENT = "C" LEFT_ALIGNMENT = "L" RIGHT_ALIGNMENT = "R" class TimeUnit(Enum): NANOSECONDS = 1 MICROSECONDS = 2 MILLISECONDS = 3 SECONDS = 4 MINUTES = 5 DAYS = 6 HOURS...
true
true
f75a887a13d508ec871e8378a6b8fe33093f0210
1,607
py
Python
scav-hunt/gohunt.py
scottshepard/MScA-Robotics-Capstone
29762ef87274fcd4d86a69918edc44f2a9f99ed5
[ "MIT" ]
3
2019-11-16T20:38:10.000Z
2020-04-11T01:24:36.000Z
scav-hunt/gohunt.py
scottshepard/MScA-Robotics-Capstone
29762ef87274fcd4d86a69918edc44f2a9f99ed5
[ "MIT" ]
1
2019-12-05T01:57:28.000Z
2019-12-05T01:57:28.000Z
scav-hunt/gohunt.py
MScA-Robotics/capstone-project-3
29762ef87274fcd4d86a69918edc44f2a9f99ed5
[ "MIT" ]
2
2020-05-17T19:56:12.000Z
2020-06-23T02:09:30.000Z
import sys sys.path.append('/home/pi/Dexter/GoPiGo3/Software/Python') import scavbot import config from coneutils import calibrate boundaries_dict = calibrate.load_boundaries('coneutils/boundaries.json') image_model_dir = '/home/pi/Desktop/code/capstone_project/capstone-project-3/scav-hunt/custom_model_edgeTPU/' cone...
28.192982
113
0.784692
import sys sys.path.append('/home/pi/Dexter/GoPiGo3/Software/Python') import scavbot import config from coneutils import calibrate boundaries_dict = calibrate.load_boundaries('coneutils/boundaries.json') image_model_dir = '/home/pi/Desktop/code/capstone_project/capstone-project-3/scav-hunt/custom_model_edgeTPU/' cone...
true
true
f75a88b447251f50b75480969182426df2781145
906
py
Python
courses/migrations/0003_auto_20190414_1910.py
Zoki92/E-learning-portal
f91cca47b7657f4c631ed7bc4fb743c115b766a7
[ "MIT" ]
null
null
null
courses/migrations/0003_auto_20190414_1910.py
Zoki92/E-learning-portal
f91cca47b7657f4c631ed7bc4fb743c115b766a7
[ "MIT" ]
null
null
null
courses/migrations/0003_auto_20190414_1910.py
Zoki92/E-learning-portal
f91cca47b7657f4c631ed7bc4fb743c115b766a7
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2019-04-14 18:10 import courses.fields from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('courses', '0002_content_file_image_text_video'), ] operations = [ migrations.AlterModelOptions( name='content', ...
25.885714
67
0.562914
import courses.fields from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('courses', '0002_content_file_image_text_video'), ] operations = [ migrations.AlterModelOptions( name='content', options={'ordering': ['order']}, ...
true
true
f75a894a8201fe6b6cfd0b142f3a334473c5325f
6,142
py
Python
library/lib_study/23_datatypes_enum.py
gottaegbert/penter
8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d
[ "MIT" ]
13
2020-01-04T07:37:38.000Z
2021-08-31T05:19:58.000Z
library/lib_study/23_datatypes_enum.py
gottaegbert/penter
8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d
[ "MIT" ]
3
2020-06-05T22:42:53.000Z
2020-08-24T07:18:54.000Z
library/lib_study/23_datatypes_enum.py
gottaegbert/penter
8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d
[ "MIT" ]
9
2020-10-19T04:53:06.000Z
2021-08-31T05:20:01.000Z
print("------------class enum.Enum") from enum import Enum, unique, auto class Color(Enum): RED = 1 GREEN = 2 BLUE = 3 print(type(Color.RED)) print(isinstance(Color.GREEN, Color)) # True print(repr(Color.RED)) print(Color.RED) print(Color.RED.name) print(Color.RED.value) print(Color.RED == 1) # False ...
20.405316
100
0.61055
print("------------class enum.Enum") from enum import Enum, unique, auto class Color(Enum): RED = 1 GREEN = 2 BLUE = 3 print(type(Color.RED)) print(isinstance(Color.GREEN, Color)) print(repr(Color.RED)) print(Color.RED) print(Color.RED.name) print(Color.RED.value) print(Color.RED == 1) print(Color(1))...
true
true
f75a89c5ae3a736ace5f2e605e5f2b1e328df024
4,617
py
Python
izorm/query.py
Avderevo/IZORM
13a2e3477720d6287730da670e8717db58f8540f
[ "MIT" ]
null
null
null
izorm/query.py
Avderevo/IZORM
13a2e3477720d6287730da670e8717db58f8540f
[ "MIT" ]
null
null
null
izorm/query.py
Avderevo/IZORM
13a2e3477720d6287730da670e8717db58f8540f
[ "MIT" ]
null
null
null
from dbconfig import connection from exception import QueryFieldException, EmptyArgsException import sqlines from sqlite3 import OperationalError import logging logging.basicConfig(format=u' %(message)s', level=logging.INFO) class Query: ''' The query class for querying our database. All methods of the c...
35.244275
100
0.601256
from dbconfig import connection from exception import QueryFieldException, EmptyArgsException import sqlines from sqlite3 import OperationalError import logging logging.basicConfig(format=u' %(message)s', level=logging.INFO) class Query: def __init__(self, orm_class=None, *args, **kwargs): self.orm_cla...
true
true
f75a8b0120f4179448732a566d165d7971aaf42b
3,973
py
Python
utils/gen_duration_from_textgrid.py
Jackwaterveg/Parakeet
e75a07076ba5766206a6cd1fb2e5f82b0ba3842c
[ "Apache-2.0" ]
7
2020-11-03T10:05:20.000Z
2022-03-29T06:37:17.000Z
utils/gen_duration_from_textgrid.py
Jackwaterveg/Parakeet
e75a07076ba5766206a6cd1fb2e5f82b0ba3842c
[ "Apache-2.0" ]
null
null
null
utils/gen_duration_from_textgrid.py
Jackwaterveg/Parakeet
e75a07076ba5766206a6cd1fb2e5f82b0ba3842c
[ "Apache-2.0" ]
1
2022-02-12T08:35:35.000Z
2022-02-12T08:35:35.000Z
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
36.787037
98
0.632771
import argparse import os from pathlib import Path import librosa import numpy as np from praatio import tgio def readtg(tg_path, sample_rate=24000, n_shift=300): alignment = tgio.openTextgrid(tg_path, readRaw=True) phones = [] ends = [] for interval in alignment.tierDict["phones"].entryList: ...
true
true
f75a8c2da2e9f576b045299b35a0290e7bc7edd6
503
py
Python
tools/c7n_kube/c7n_kube/resources/apps/daemonset.py
al3pht/cloud-custodian
ce6613d1b716f336384c5e308eee300389e6bf50
[ "Apache-2.0" ]
2,415
2018-12-04T00:37:58.000Z
2022-03-31T12:28:56.000Z
tools/c7n_kube/c7n_kube/resources/apps/daemonset.py
al3pht/cloud-custodian
ce6613d1b716f336384c5e308eee300389e6bf50
[ "Apache-2.0" ]
3,272
2018-12-03T23:58:17.000Z
2022-03-31T21:15:32.000Z
tools/c7n_kube/c7n_kube/resources/apps/daemonset.py
lfranchini31/cloud-custodian
1830fe4b9a59ff6afb675985c9ea531571616a76
[ "Apache-2.0" ]
773
2018-12-06T09:43:23.000Z
2022-03-30T20:44:43.000Z
# Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 # from c7n_kube.query import QueryResourceManager, TypeInfo from c7n_kube.provider import resources @resources.register('daemon-set') class DaemonSet(QueryResourceManager): class resource_type(TypeInfo): group = 'Apps' ...
31.4375
73
0.735586
from c7n_kube.query import QueryResourceManager, TypeInfo from c7n_kube.provider import resources @resources.register('daemon-set') class DaemonSet(QueryResourceManager): class resource_type(TypeInfo): group = 'Apps' version = 'V1' patch = 'patch_namespaced_daemon_set' delete = 'de...
true
true
f75a8ca9a8c71f062933697832c461e0b00b95af
19,096
py
Python
backend/tests/accounts/test_serializers.py
pennlabs/core
85451485c973ff71cd9da7627912c4f9ac9f5c6b
[ "MIT" ]
19
2018-11-04T15:44:41.000Z
2021-03-13T21:16:56.000Z
backend/tests/accounts/test_serializers.py
pennlabs/core
85451485c973ff71cd9da7627912c4f9ac9f5c6b
[ "MIT" ]
84
2018-10-14T14:33:33.000Z
2022-02-17T22:47:53.000Z
backend/tests/accounts/test_serializers.py
pennlabs/labs
85451485c973ff71cd9da7627912c4f9ac9f5c6b
[ "MIT" ]
2
2019-09-03T16:58:34.000Z
2021-04-17T12:26:00.000Z
import datetime import pytz from django.contrib.auth import get_user_model from django.test import TestCase from django.utils import timezone from rest_framework import serializers from accounts.models import Email, Major, PhoneNumber, School, User from accounts.serializers import ( EmailSerializer, MajorSeri...
34.783242
88
0.604053
import datetime import pytz from django.contrib.auth import get_user_model from django.test import TestCase from django.utils import timezone from rest_framework import serializers from accounts.models import Email, Major, PhoneNumber, School, User from accounts.serializers import ( EmailSerializer, MajorSeri...
true
true
f75a8d5bfa5b5f74af833e12027456d0e38986b9
9,048
py
Python
EventFilter/CSCRawToDigi/test/dump_digi_post-ls1.py
SWuchterl/cmssw
769b4a7ef81796579af7d626da6039dfa0347b8e
[ "Apache-2.0" ]
6
2017-09-08T14:12:56.000Z
2022-03-09T23:57:01.000Z
EventFilter/CSCRawToDigi/test/dump_digi_post-ls1.py
SWuchterl/cmssw
769b4a7ef81796579af7d626da6039dfa0347b8e
[ "Apache-2.0" ]
545
2017-09-19T17:10:19.000Z
2022-03-07T16:55:27.000Z
EventFilter/CSCRawToDigi/test/dump_digi_post-ls1.py
SWuchterl/cmssw
769b4a7ef81796579af7d626da6039dfa0347b8e
[ "Apache-2.0" ]
14
2017-10-04T09:47:21.000Z
2019-10-23T18:04:45.000Z
from __future__ import print_function import FWCore.ParameterSet.Config as cms process = cms.Process("ViewDigi") # Dump of different types of digis produced # by CSC RawToDigi chane process.load("SimGeneral.MixingModule.mixNoPU_cfi") process.load("Geometry.MuonCommonData.muonIdealGeometryXML_cfi") process.load("Geo...
48.12766
138
0.759173
from __future__ import print_function import FWCore.ParameterSet.Config as cms process = cms.Process("ViewDigi") process.load("SimGeneral.MixingModule.mixNoPU_cfi") process.load("Geometry.MuonCommonData.muonIdealGeometryXML_cfi") process.load("Geometry.CSCGeometry.cscGeometry_cfi") process.load("Configuration/Standa...
true
true
f75a8d6ec01ae6883de70c23fd76f9ba8b3a73c3
4,124
py
Python
sdk/python/lib/pulumi/runtime/stack.py
Dominik-K/pulumi
3621c01f4becf75e24bf937bbda69ff8aaf6b5f7
[ "Apache-2.0" ]
null
null
null
sdk/python/lib/pulumi/runtime/stack.py
Dominik-K/pulumi
3621c01f4becf75e24bf937bbda69ff8aaf6b5f7
[ "Apache-2.0" ]
null
null
null
sdk/python/lib/pulumi/runtime/stack.py
Dominik-K/pulumi
3621c01f4becf75e24bf937bbda69ff8aaf6b5f7
[ "Apache-2.0" ]
1
2020-09-02T06:12:36.000Z
2020-09-02T06:12:36.000Z
# Copyright 2016-2018, Pulumi Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
40.038835
112
0.683802
import asyncio from typing import Callable, Any, Dict from ..resource import ComponentResource from .settings import get_project, get_stack, get_root_resource, set_root_resource from .rpc_manager import RPC_MANAGER from .. import log async def run_in_stack(func: Callable): try: Stack(func) ...
true
true
f75a8e29cc7a0b76e4c38451f2b53b16f1faa210
10,476
py
Python
test/functional/listtransactions.py
DanielLuci/testcoin
c749274fe783e530ba9a5588c7f06e23a27cd7a7
[ "MIT" ]
31
2018-01-01T19:22:42.000Z
2022-02-05T22:55:39.000Z
test/functional/listtransactions.py
DanielLuci/testcoin
c749274fe783e530ba9a5588c7f06e23a27cd7a7
[ "MIT" ]
12
2018-03-06T01:03:51.000Z
2019-05-29T14:34:04.000Z
test/functional/listtransactions.py
DanielLuci/testcoin
c749274fe783e530ba9a5588c7f06e23a27cd7a7
[ "MIT" ]
60
2017-12-29T06:25:11.000Z
2022-02-17T16:37:29.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the listtransactions API.""" from test_framework.test_framework import BitcoinTestFramework from ...
50.365385
113
0.600897
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from test_framework.mininode import CTransaction, COIN from io import BytesIO def txFromHex(hexstring): tx = CTransaction() f = BytesIO(hex_str_to_bytes(hexstring)) tx.deserialize(f) return tx class ListT...
true
true
f75a8eeee75ea1699ebb7a4b03d96e4aaaf6a327
12,415
py
Python
pirc522/rfid.py
MattiaRacca/pi-rc522
50e2ce967a3aa970dae567e4154937d05d9db45e
[ "MIT" ]
null
null
null
pirc522/rfid.py
MattiaRacca/pi-rc522
50e2ce967a3aa970dae567e4154937d05d9db45e
[ "MIT" ]
null
null
null
pirc522/rfid.py
MattiaRacca/pi-rc522
50e2ce967a3aa970dae567e4154937d05d9db45e
[ "MIT" ]
null
null
null
import threading import time RASPBERRY = object() BEAGLEBONE = object() board = RASPBERRY try: # Try with Raspberry PI imports first import spidev import RPi.GPIO as GPIO SPIClass = spidev.SpiDev def_pin_rst = 22 def_pin_irq = 18 def_pin_mode = GPIO.BOARD except ImportError: # If they f...
27.106987
109
0.542892
import threading import time RASPBERRY = object() BEAGLEBONE = object() board = RASPBERRY try: import spidev import RPi.GPIO as GPIO SPIClass = spidev.SpiDev def_pin_rst = 22 def_pin_irq = 18 def_pin_mode = GPIO.BOARD except ImportError: import Adafruit_BBIO.SPI as SPI import Ad...
true
true
f75a8f15a2d6f1757ab56ae4193a871332a37482
1,232
py
Python
reanalyzeClusters.py
tkragholm/RNAEditor
e66a53234e727e61dcfc13f696d99431a56b1e4f
[ "Unlicense" ]
null
null
null
reanalyzeClusters.py
tkragholm/RNAEditor
e66a53234e727e61dcfc13f696d99431a56b1e4f
[ "Unlicense" ]
null
null
null
reanalyzeClusters.py
tkragholm/RNAEditor
e66a53234e727e61dcfc13f696d99431a56b1e4f
[ "Unlicense" ]
null
null
null
#!/usr/bin/python """ This script takes several vcf files with editing sites and determines editing islands Created on 24.09.17 @author: david """ import argparse from Genome import Genome from VariantSet import VariantSet parser = argparse.ArgumentParser(description='reanalyze editing islands.') parser.add_argumen...
38.5
111
0.706981
import argparse from Genome import Genome from VariantSet import VariantSet parser = argparse.ArgumentParser(description='reanalyze editing islands.') parser.add_argument("-f", "--files", metavar="N", type=str, nargs="+", help="list of editing site files (vcf)", required=True) parser.add_argument...
true
true
f75a8fb7439230937bbd64267501fbf530795ede
43,952
py
Python
allennlp/models/coreference_resolution/coref.py
ufukhurriyetoglu/allennlp
3f431799776dbf2a42091ba114fc3b6f38b268c8
[ "Apache-2.0" ]
null
null
null
allennlp/models/coreference_resolution/coref.py
ufukhurriyetoglu/allennlp
3f431799776dbf2a42091ba114fc3b6f38b268c8
[ "Apache-2.0" ]
null
null
null
allennlp/models/coreference_resolution/coref.py
ufukhurriyetoglu/allennlp
3f431799776dbf2a42091ba114fc3b6f38b268c8
[ "Apache-2.0" ]
1
2019-01-24T03:52:51.000Z
2019-01-24T03:52:51.000Z
import logging import math from typing import Any, Dict, List, Optional, Tuple import torch import torch.nn.functional as F from torch.autograd import Variable from overrides import overrides from allennlp.common import Params from allennlp.data import Vocabulary from allennlp.models.model import Model from allennlp....
55.146801
132
0.642678
import logging import math from typing import Any, Dict, List, Optional, Tuple import torch import torch.nn.functional as F from torch.autograd import Variable from overrides import overrides from allennlp.common import Params from allennlp.data import Vocabulary from allennlp.models.model import Model from allennlp....
true
true
f75a8ff1847d1fb3c6b2120fb176e8cd00827551
35
py
Python
osbot_gsuite/__init__.py
pbx-gs/gsbot-gsuite
21cd88d8aa92d8a2df4c02cf603da56174922766
[ "Apache-2.0" ]
3
2019-10-30T14:45:19.000Z
2021-10-02T04:24:51.000Z
osbot_gsuite/__init__.py
pbx-gs/gsbot-gsuite
21cd88d8aa92d8a2df4c02cf603da56174922766
[ "Apache-2.0" ]
1
2019-04-30T12:39:14.000Z
2019-04-30T12:39:14.000Z
osbot_gsuite/__init__.py
pbx-gs/OSBot-gsuite
21cd88d8aa92d8a2df4c02cf603da56174922766
[ "Apache-2.0" ]
null
null
null
version_osbot_gsuite = "v0.32 (GW)"
35
35
0.742857
version_osbot_gsuite = "v0.32 (GW)"
true
true
f75a911ae7e9cb6c8e2bf8666eec406567bdd8c8
994
py
Python
oled_class.py
kaixindelele/ssd1306OLED--MicroPython-ESP32----GB2312-
1d10c812378d49040065bca4257f06c04037ff66
[ "MIT" ]
30
2021-06-23T13:29:19.000Z
2022-03-28T09:50:24.000Z
oled_class.py
kaixindelele/ssd1306OLED--MicroPython-ESP32----GB2312-
1d10c812378d49040065bca4257f06c04037ff66
[ "MIT" ]
4
2021-08-04T07:25:09.000Z
2022-03-02T07:34:50.000Z
oled_class.py
kaixindelele/ssd1306OLED--MicroPython-ESP32----GB2312-
1d10c812378d49040065bca4257f06c04037ff66
[ "MIT" ]
3
2021-11-11T05:03:55.000Z
2022-01-27T01:37:49.000Z
''' 实验名称:【我的学习系统】之OLED中文显示(I2C总线) 版本:v1.0 日期:2021.6.5 作者:kaixindelele ''' from machine import SoftI2C,Pin #从machine模块导入I2C、Pin子模块 from ssd1306 import SSD1306_I2C #从ssd1306模块中导入SSD1306_I2C子模块 class OLED_Show: def __init__(self, sda_pin=18, scl_pin=23): # 初始化I2C,设定好端口 self.i2c =...
24.243902
64
0.593561
from machine import SoftI2C,Pin from ssd1306 import SSD1306_I2C class OLED_Show: def __init__(self, sda_pin=18, scl_pin=23): self.i2c = SoftI2C(sda=Pin(sda_pin), scl=Pin(scl_pin)) self.oled = SSD1306_I2C(128, 64, self.i2c, addr=0x3c) self.oled.f...
true
true
f75a9148d14a71fa32f5506b22c9ce33e3e2dfdf
5,388
py
Python
ax/storage/sqa_store/utils.py
Balandat/Ax
6c7556165291a5329744b5075d5f95d2dec18938
[ "MIT" ]
null
null
null
ax/storage/sqa_store/utils.py
Balandat/Ax
6c7556165291a5329744b5075d5f95d2dec18938
[ "MIT" ]
null
null
null
ax/storage/sqa_store/utils.py
Balandat/Ax
6c7556165291a5329744b5075d5f95d2dec18938
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import warnings from typing import Any, List, Optional from ax.core.experiment import Experiment from ax.core.search_s...
37.943662
87
0.577394
import warnings from typing import Any, List, Optional from ax.core.experiment import Experiment from ax.core.search_space import SearchSpace from ax.exceptions.storage import SQADecodeError from ax.utils.common.base import Base, SortableBase def is_foreign_key_field(field: str) -> bool: return len(field) > 3 a...
true
true