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
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c2e3e29450951f7817fa320c3125f8a88f35010
733
py
Python
codes/MIGraph/Encoders/CompoundEncoder.py
KentaroKutsukake/Integrating-multiple-materials-science-projects
a6f09583718fc00431a3ce67d5fc6f026646f91c
[ "MIT" ]
5
2020-07-31T01:35:49.000Z
2021-07-30T13:05:48.000Z
codes/MIGraph/Encoders/CompoundEncoder.py
KentaroKutsukake/Integrating-multiple-materials-science-projects
a6f09583718fc00431a3ce67d5fc6f026646f91c
[ "MIT" ]
null
null
null
codes/MIGraph/Encoders/CompoundEncoder.py
KentaroKutsukake/Integrating-multiple-materials-science-projects
a6f09583718fc00431a3ce67d5fc6f026646f91c
[ "MIT" ]
2
2020-10-21T19:17:06.000Z
2021-05-17T10:38:41.000Z
""" Compound encoder this class returns vector information of a target smiles """ import numpy as np from Config import Config CF=Config() categoryEmbed=CF.categoryEmbed #compound encoder class class CompEncoder: def __init__(self,CompDat,num): """ CompDat: CompDatabase class num: =CF.I...
20.942857
56
0.608458
import numpy as np from Config import Config CF=Config() categoryEmbed=CF.categoryEmbed class CompEncoder: def __init__(self,CompDat,num): self.CompDat=CompDat self.num=num def getEVector(self,string): num=self.num res=self.CompDat.getCompDesc(string) ...
true
true
1c2e3e3aee69136d4d47437ed81e6f8478aef8ce
670
py
Python
tests/python/test_cuda_internals.py
gaoxinge/taichi
86d403f071b8505858763d4712b37cd71b89db91
[ "MIT" ]
1
2020-11-10T07:17:01.000Z
2020-11-10T07:17:01.000Z
tests/python/test_cuda_internals.py
gaoxinge/taichi
86d403f071b8505858763d4712b37cd71b89db91
[ "MIT" ]
1
2020-08-24T05:18:43.000Z
2020-08-24T05:18:43.000Z
tests/python/test_cuda_internals.py
gaoxinge/taichi
86d403f071b8505858763d4712b37cd71b89db91
[ "MIT" ]
null
null
null
from taichi.lang import impl import taichi as ti from tests import test_utils # TODO: these are not really tests... @test_utils.test(arch=ti.cuda) def test_do_nothing(): @ti.kernel def test(): for i in range(10): impl.call_internal("do_nothing") test() @test_utils.test(arch=ti.cud...
17.631579
54
0.602985
from taichi.lang import impl import taichi as ti from tests import test_utils @test_utils.test(arch=ti.cuda) def test_do_nothing(): @ti.kernel def test(): for i in range(10): impl.call_internal("do_nothing") test() @test_utils.test(arch=ti.cuda) def test_active_mask(): @ti.ke...
true
true
1c2e3e50d1e8a86414fb26a4710c822625cf9f44
4,769
py
Python
bwt.py
broestls/pycuda-bw-test
0ac9a377363bb99bc1b9e5dd42bbdd0bd6d697c3
[ "MIT" ]
null
null
null
bwt.py
broestls/pycuda-bw-test
0ac9a377363bb99bc1b9e5dd42bbdd0bd6d697c3
[ "MIT" ]
null
null
null
bwt.py
broestls/pycuda-bw-test
0ac9a377363bb99bc1b9e5dd42bbdd0bd6d697c3
[ "MIT" ]
null
null
null
import numpy as np import pycuda.driver as cuda from pycuda.compiler import SourceModule from pycuda.tools import make_default_context, clear_context_caches import glob import sys import os from datetime import datetime import ctypes import atexit import argparse import subprocess import psutil import itertools from...
43.354545
280
0.695743
import numpy as np import pycuda.driver as cuda from pycuda.compiler import SourceModule from pycuda.tools import make_default_context, clear_context_caches import glob import sys import os from datetime import datetime import ctypes import atexit import argparse import subprocess import psutil import itertools from...
true
true
1c2e3f6cda81575e2f211c0c19990a5adcb75fb9
2,608
py
Python
src/third_party/wiredtiger/test/suite/test_upgrade.py
hgGeorg/mongo
b5bea92504b2612f433b55e7b901f9ae276d11ec
[ "Apache-2.0" ]
1
2020-01-01T06:16:58.000Z
2020-01-01T06:16:58.000Z
src/third_party/wiredtiger/test/suite/test_upgrade.py
Man1029/CMONGO
c40380caa14e05509f46993aa8b8da966b09b0b5
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/third_party/wiredtiger/test/suite/test_upgrade.py
Man1029/CMONGO
c40380caa14e05509f46993aa8b8da966b09b0b5
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Public Domain 2014-2016 MongoDB, Inc. # Public Domain 2008-2014 WiredTiger, Inc. # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either in source code form or as a compil...
36.222222
73
0.705521
import os, time import wiredtiger, wttest from helper import complex_populate, simple_populate from wtscenario import make_scenarios class test_upgrade(wttest.WiredTigerTestCase): name = 'test_upgrade' scenarios = make_scenarios([ ('file', dict(uri='file:')), ('ta...
true
true
1c2e3fb6bad79b1aacdb5023df3f230ddeafaff8
863
py
Python
tests/conftest.py
radarlabs/radar-python
5b9a61bda3e405565eb16d76b120cc27f7a2a7b3
[ "MIT" ]
8
2020-03-16T18:14:49.000Z
2021-01-26T20:27:54.000Z
tests/conftest.py
radarlabs/radar-python
5b9a61bda3e405565eb16d76b120cc27f7a2a7b3
[ "MIT" ]
1
2020-03-21T19:54:49.000Z
2020-03-21T19:54:49.000Z
tests/conftest.py
radarlabs/radar-python
5b9a61bda3e405565eb16d76b120cc27f7a2a7b3
[ "MIT" ]
3
2020-07-02T00:31:26.000Z
2020-08-26T08:20:35.000Z
import os import json import pytest from radar import RadarClient MOCK_DATA_PATH = "tests/mock_data/{file_name}" class TestHelpers: def load_mock_data(file_name): json_path = MOCK_DATA_PATH.format(file_name=file_name) with open(json_path) as f: return json.load(f) @pytest.fixture(...
20.547619
72
0.73117
import os import json import pytest from radar import RadarClient MOCK_DATA_PATH = "tests/mock_data/{file_name}" class TestHelpers: def load_mock_data(file_name): json_path = MOCK_DATA_PATH.format(file_name=file_name) with open(json_path) as f: return json.load(f) @pytest.fixture(...
true
true
1c2e403be24638bc95e9583ee92456a7ed4bf692
487
py
Python
src/CELERY/wsgi.py
terean-dspd/django-celery-celerybeat-ubuntu-deamon-example
162a8d50ba03146137225d029f6102efcf53aaf2
[ "MIT" ]
1
2018-02-03T18:24:48.000Z
2018-02-03T18:24:48.000Z
src/CELERY/wsgi.py
terean-dspd/django-celery-celerybeat-ubuntu-deamon-example
162a8d50ba03146137225d029f6102efcf53aaf2
[ "MIT" ]
null
null
null
src/CELERY/wsgi.py
terean-dspd/django-celery-celerybeat-ubuntu-deamon-example
162a8d50ba03146137225d029f6102efcf53aaf2
[ "MIT" ]
null
null
null
""" WSGI config for CELERY project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/ """ import os import sys path = '/home/dennis/myproject/src' if path not in sys.path: sys.path.app...
23.190476
78
0.770021
import os import sys path = '/home/dennis/myproject/src' if path not in sys.path: sys.path.append(path) from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "CELERY.settings") application = get_wsgi_application()
true
true
1c2e405d8358df0c72f1ce7fb8b607ea11f4d86b
747
py
Python
src/profiles/migrations/0008_document.py
MisaelMvM/bookAnalytics-ACC-Project
954eb47f19c5fd83abbc46a6224dc588dbd20887
[ "MIT" ]
null
null
null
src/profiles/migrations/0008_document.py
MisaelMvM/bookAnalytics-ACC-Project
954eb47f19c5fd83abbc46a6224dc588dbd20887
[ "MIT" ]
null
null
null
src/profiles/migrations/0008_document.py
MisaelMvM/bookAnalytics-ACC-Project
954eb47f19c5fd83abbc46a6224dc588dbd20887
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-05-14 20:33 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('profiles', '0007_auto_20170513_2020'), ] operations = [ migrations.CreateMo...
29.88
114
0.603748
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('profiles', '0007_auto_20170513_2020'), ] operations = [ migrations.CreateModel( name='Document', fields=[ ...
true
true
1c2e40e328bf407c26f76e9787a116626dbf5a00
932
py
Python
docs/build/html/xas/xas_ft-5.py
marcoalsina/araucaria
78039106ae27d3fdef9265503c33f33992199d8e
[ "BSD-2-Clause" ]
8
2021-07-11T22:54:21.000Z
2022-02-16T20:22:25.000Z
docs/build/html/xas/xas_ft-5.py
marcoalsina/araucaria
78039106ae27d3fdef9265503c33f33992199d8e
[ "BSD-2-Clause" ]
null
null
null
docs/build/html/xas/xas_ft-5.py
marcoalsina/araucaria
78039106ae27d3fdef9265503c33f33992199d8e
[ "BSD-2-Clause" ]
null
null
null
from numpy import arange, sin, pi from scipy.fftpack import fftfreq from araucaria.xas import ftwindow, xftf_kwin, xftr_kwin nfft = 2048 # number of points for FFT ks = 0.05 # delta k (angstrom^-1) f1 = 0.5 # freq1 (angstrom) k = arange(0, 10, ks) wink = ftwindow(k, x_range=(0,10), dx1=0.5, win='sine') chi ...
33.285714
63
0.680258
from numpy import arange, sin, pi from scipy.fftpack import fftfreq from araucaria.xas import ftwindow, xftf_kwin, xftr_kwin nfft = 2048 ks = 0.05 f1 = 0.5 k = arange(0, 10, ks) wink = ftwindow(k, x_range=(0,10), dx1=0.5, win='sine') chi = 0.5*sin(2*pi*k*f1) chir = xftf_kwin(wink*chi, nfft=nfft, kstep=ks...
true
true
1c2e40f354a326634308047ef393dea19c9186a2
7,291
py
Python
kolibri/core/analytics/measurements.py
priyanka-choubey/kolibri
4070dc158634ab47c6e127768f0aed7548c0a182
[ "MIT" ]
2
2021-05-13T10:20:46.000Z
2021-11-15T12:31:03.000Z
kolibri/core/analytics/measurements.py
priyanka-choubey/kolibri
4070dc158634ab47c6e127768f0aed7548c0a182
[ "MIT" ]
3
2021-03-10T08:57:45.000Z
2021-09-02T07:03:34.000Z
kolibri/core/analytics/measurements.py
priyanka-choubey/kolibri
4070dc158634ab47c6e127768f0aed7548c0a182
[ "MIT" ]
1
2019-12-04T12:26:16.000Z
2019-12-04T12:26:16.000Z
import time from collections import namedtuple from datetime import timedelta import requests from django.contrib.sessions.models import Session from django.db import connection from django.db.models import Count from django.db.models import Sum from django.db.utils import OperationalError from django.utils import tim...
34.885167
113
0.645728
import time from collections import namedtuple from datetime import timedelta import requests from django.contrib.sessions.models import Session from django.db import connection from django.db.models import Count from django.db.models import Sum from django.db.utils import OperationalError from django.utils import tim...
true
true
1c2e4108dea4f61e84c54e7da24a415af6455d96
15,581
py
Python
model/metric.py
bhadreshpsavani/TAPER-EHR
ab938749756fcaaef52a7002a074421f483e3562
[ "MIT" ]
12
2020-04-10T02:24:20.000Z
2021-11-09T22:52:24.000Z
model/metric.py
bhadreshpsavani/TAPER-EHR
ab938749756fcaaef52a7002a074421f483e3562
[ "MIT" ]
7
2020-05-03T10:03:29.000Z
2022-02-09T23:38:21.000Z
model/metric.py
bhadreshpsavani/TAPER-EHR
ab938749756fcaaef52a7002a074421f483e3562
[ "MIT" ]
10
2020-06-14T09:37:35.000Z
2022-02-04T22:21:16.000Z
import torch from sklearn.metrics import roc_auc_score, average_precision_score, roc_curve, auc, roc_curve, precision_recall_curve def roc_auc(output,target): # temporary place holders.. # these will be run at the end of the epoch once all probabilities are obtained.. # refer to pr_auc_1 #output = out...
30.611002
117
0.546627
import torch from sklearn.metrics import roc_auc_score, average_precision_score, roc_curve, auc, roc_curve, precision_recall_curve def roc_auc(output,target): return 1.0 def pr_auc(output, target): return 1.0 def roc_auc_1(ou...
true
true
1c2e41dd856bb7d1bb94896fc537c0a340c99cdb
1,800
py
Python
marrow/mailer/transport/ses.py
digiturtle/mailer
3b718f415a4a955ba0fdb7e7ae135c0ab1f9d900
[ "MIT" ]
1
2019-02-13T12:40:30.000Z
2019-02-13T12:40:30.000Z
marrow/mailer/transport/ses.py
digiturtle/mailer
3b718f415a4a955ba0fdb7e7ae135c0ab1f9d900
[ "MIT" ]
1
2021-03-24T13:02:56.000Z
2021-03-24T16:27:14.000Z
marrow/mailer/transport/ses.py
LexMachinaInc/mailer
5b144797a412f4816ecc25f237a6ebc0737f6897
[ "MIT" ]
1
2018-03-29T19:11:45.000Z
2018-03-29T19:11:45.000Z
# encoding: utf-8 try: import boto.ses from boto.ses import SESConnection except ImportError: raise ImportError("You must install the boto package to deliver mail via Amazon SES.") __all__ = ['AmazonTransport'] log = __import__('logging').getLogger(__name__) class AmazonTransport(object): # pragma:...
34.615385
106
0.628333
try: import boto.ses from boto.ses import SESConnection except ImportError: raise ImportError("You must install the boto package to deliver mail via Amazon SES.") __all__ = ['AmazonTransport'] log = __import__('logging').getLogger(__name__) class AmazonTransport(object): __slots__ = ('ephemer...
true
true
1c2e425b2fdcf310e1a53834ab48adeaac7c57cc
388
py
Python
datamodel_code_generator/model/pydantic/dataclass.py
adaamz/datamodel-code-generator
3b34573f35f8d420e4668a85047c757fd1da7754
[ "MIT" ]
891
2019-07-23T04:23:32.000Z
2022-03-31T13:36:33.000Z
datamodel_code_generator/model/pydantic/dataclass.py
adaamz/datamodel-code-generator
3b34573f35f8d420e4668a85047c757fd1da7754
[ "MIT" ]
663
2019-07-23T09:50:26.000Z
2022-03-29T01:56:55.000Z
datamodel_code_generator/model/pydantic/dataclass.py
adaamz/datamodel-code-generator
3b34573f35f8d420e4668a85047c757fd1da7754
[ "MIT" ]
108
2019-07-23T08:50:37.000Z
2022-03-09T10:50:22.000Z
from typing import ClassVar, Tuple from datamodel_code_generator.imports import Import from datamodel_code_generator.model import DataModel from datamodel_code_generator.model.pydantic.imports import IMPORT_DATACLASS class DataClass(DataModel): TEMPLATE_FILE_PATH: ClassVar[str] = 'pydantic/dataclass.jinja2' ...
35.272727
76
0.822165
from typing import ClassVar, Tuple from datamodel_code_generator.imports import Import from datamodel_code_generator.model import DataModel from datamodel_code_generator.model.pydantic.imports import IMPORT_DATACLASS class DataClass(DataModel): TEMPLATE_FILE_PATH: ClassVar[str] = 'pydantic/dataclass.jinja2' ...
true
true
1c2e4387f8d476e9d7aadd89fb94f15969de13b9
769
py
Python
supreme/lib/klt/setup.py
KirillDZR/supreme
c296722599363bd0cbcce6877bd9de9b066cb74b
[ "BSD-3-Clause" ]
95
2015-01-17T09:48:20.000Z
2021-11-07T16:02:38.000Z
supreme/lib/klt/setup.py
KirillDZR/supreme
c296722599363bd0cbcce6877bd9de9b066cb74b
[ "BSD-3-Clause" ]
4
2015-10-23T15:13:34.000Z
2019-09-23T22:47:10.000Z
supreme/lib/klt/setup.py
KirillDZR/supreme
c296722599363bd0cbcce6877bd9de9b066cb74b
[ "BSD-3-Clause" ]
34
2015-02-22T20:54:40.000Z
2022-02-27T13:39:32.000Z
from supreme._build import CExtension def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs config = Configuration('klt', parent_package, top_path) config.ext_modules.append(CExtension('libklt_', ...
40.473684
79
0.50065
from supreme._build import CExtension def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs config = Configuration('klt', parent_package, top_path) config.ext_modules.append(CExtension('libklt_', ...
true
true
1c2e4421cbf7299f4b6ac2145e779f62caffe157
939
py
Python
data/test/python/1c2e4421cbf7299f4b6ac2145e779f62caffe157SecurityService.py
harshp8l/deep-learning-lang-detection
2a54293181c1c2b1a2b840ddee4d4d80177efb33
[ "MIT" ]
84
2017-10-25T15:49:21.000Z
2021-11-28T21:25:54.000Z
data/test/python/1c2e4421cbf7299f4b6ac2145e779f62caffe157SecurityService.py
vassalos/deep-learning-lang-detection
cbb00b3e81bed3a64553f9c6aa6138b2511e544e
[ "MIT" ]
5
2018-03-29T11:50:46.000Z
2021-04-26T13:33:18.000Z
data/test/python/1c2e4421cbf7299f4b6ac2145e779f62caffe157SecurityService.py
vassalos/deep-learning-lang-detection
cbb00b3e81bed3a64553f9c6aa6138b2511e544e
[ "MIT" ]
24
2017-11-22T08:31:00.000Z
2022-03-27T01:22:31.000Z
# _*_ coding:utf-8 _*_ from web.broker.Brokers import Broker __author__ = 'Administrator' class SecurityService(object): def __init__(self): pass '''杀毒''' def antivirus(self, hostKey, path): broker = Broker.getBroker(hostKey) return broker.antivirus(path) '''取消ip限制''' ...
20.413043
42
0.610224
from web.broker.Brokers import Broker __author__ = 'Administrator' class SecurityService(object): def __init__(self): pass def antivirus(self, hostKey, path): broker = Broker.getBroker(hostKey) return broker.antivirus(path) def ipOpen(self, hostKey, ip): broker = Brok...
true
true
1c2e4429e2fc1fc28a8adeeca84d861f861b453c
8,192
py
Python
sudoku.py
bryanlimy/samurai-sudoku-solver
2b3e1f0dfe2c1cf352df375633ca70981d7968bf
[ "MIT" ]
7
2017-07-23T13:19:31.000Z
2021-11-14T11:08:27.000Z
sudoku.py
bryanlimy/samurai-sudoku-solver
2b3e1f0dfe2c1cf352df375633ca70981d7968bf
[ "MIT" ]
null
null
null
sudoku.py
bryanlimy/samurai-sudoku-solver
2b3e1f0dfe2c1cf352df375633ca70981d7968bf
[ "MIT" ]
2
2019-03-14T21:07:55.000Z
2021-09-18T14:47:52.000Z
## Solve Every Sudoku Puzzle ## See http://norvig.com/sudoku.html ## Throughout this program we have: ## r is a row, e.g. 'A' ## c is a column, e.g. '3' ## s is a square, e.g. 'A3' ## d is a digit, e.g. '9' ## u is a unit, e.g. ['A1','B1','C1','D1','E1','F1','G1','H1','I1'] ## grid is a gr...
41.165829
150
0.561768
ss(rs, cs) for rs in ('ABC','DEF','GHI') for cs in ('123','456','789')]) units = dict((s, [u for u in unitlist if s in u]) for s in squares) peers = dict((s, set(sum(units[s],[]))-set([s])) for s in squares) ################ Unit Tests ################ def test(): assert len(squ...
true
true
1c2e447c8ebd033d153d63b0073ddd1fecc39a3c
52,937
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/operations/_p2_svpn_gateways_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
2
2021-03-24T06:26:11.000Z
2021-04-18T15:55:59.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/operations/_p2_svpn_gateways_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
4
2019-04-17T17:57:49.000Z
2020-04-24T21:11:22.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/operations/_p2_svpn_gateways_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
50.272555
248
0.66768
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport impor...
true
true
1c2e44acca47cb034eaa829d2aea0746a82c253c
271
py
Python
tz_detect/utils.py
dkirkham/django-tz-detect
ec3c66a967e2518adf070bfd42a9076471f1bc2a
[ "MIT" ]
null
null
null
tz_detect/utils.py
dkirkham/django-tz-detect
ec3c66a967e2518adf070bfd42a9076471f1bc2a
[ "MIT" ]
null
null
null
tz_detect/utils.py
dkirkham/django-tz-detect
ec3c66a967e2518adf070bfd42a9076471f1bc2a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- def convert_header_name(django_header): """Converts header name from django settings to real header name. For example: 'HTTP_CUSTOM_CSRF' -> 'custom-csrf' """ return django_header.lower().replace('_', '-').split('http-')[-1]
27.1
69
0.645756
def convert_header_name(django_header): return django_header.lower().replace('_', '-').split('http-')[-1]
true
true
1c2e44c4a90f8779ad9a447ea28d87f5a7458299
3,107
py
Python
cannabis/protocols/timelord_protocol.py
CannabisChain/cannabis-blockchain
6a1dc045cdcca45d0ffdcbdebe805c49f04b3faf
[ "Apache-2.0" ]
12
2021-07-24T14:50:56.000Z
2022-02-09T04:28:28.000Z
cannabis/protocols/timelord_protocol.py
CannabisChain/cannabis-blockchain
6a1dc045cdcca45d0ffdcbdebe805c49f04b3faf
[ "Apache-2.0" ]
27
2021-07-23T15:16:41.000Z
2022-03-22T10:11:23.000Z
cannabis/protocols/timelord_protocol.py
CannabisChain/cannabis-blockchain
6a1dc045cdcca45d0ffdcbdebe805c49f04b3faf
[ "Apache-2.0" ]
7
2021-07-23T15:48:54.000Z
2022-01-20T20:03:51.000Z
from dataclasses import dataclass from typing import List, Optional, Tuple from cannabis.types.blockchain_format.foliage import Foliage from cannabis.types.blockchain_format.reward_chain_block import RewardChainBlock, RewardChainBlockUnfinished from cannabis.types.blockchain_format.sized_bytes import bytes32 from cann...
33.771739
120
0.801738
from dataclasses import dataclass from typing import List, Optional, Tuple from cannabis.types.blockchain_format.foliage import Foliage from cannabis.types.blockchain_format.reward_chain_block import RewardChainBlock, RewardChainBlockUnfinished from cannabis.types.blockchain_format.sized_bytes import bytes32 from cann...
true
true
1c2e460373f0cb1f36cd06f1a55dcf13a8557ea3
4,052
py
Python
src/batch_runner/net_eval_batch.py
haleqiu/TLIO
d4fea31517fb8db662dc14c388a792217b172e64
[ "BSD-3-Clause" ]
127
2020-06-15T18:16:09.000Z
2022-03-28T08:57:18.000Z
src/batch_runner/net_eval_batch.py
ori-drs/tlio
259247bea2e10bf47922071d235b7f80d7685e61
[ "BSD-3-Clause" ]
12
2020-10-01T14:38:04.000Z
2022-03-14T10:11:11.000Z
src/batch_runner/net_eval_batch.py
ori-drs/tlio
259247bea2e10bf47922071d235b7f80d7685e61
[ "BSD-3-Clause" ]
38
2020-06-15T18:46:41.000Z
2022-03-06T09:33:58.000Z
import argparse import json import os import os.path as osp import subprocess as sp from pathlib import Path from utils.logging import logging homedir = Path.home() if __name__ == "__main__": parser = argparse.ArgumentParser() # ----------------------- io params ----------------------- io_groups = parser...
28.942857
84
0.439289
import argparse import json import os import os.path as osp import subprocess as sp from pathlib import Path from utils.logging import logging homedir = Path.home() if __name__ == "__main__": parser = argparse.ArgumentParser() io_groups = parser.add_argument_group("io") io_groups.add_argument( ...
true
true
1c2e467cd4fc6eaf6552db91bf2a99fe684155dc
2,670
py
Python
bingo/Base/MuPlusLambdaEA.py
tylertownsend/bingo
0aeebe03df71a632f833c56ceb9c697dddbe78fc
[ "Apache-2.0" ]
null
null
null
bingo/Base/MuPlusLambdaEA.py
tylertownsend/bingo
0aeebe03df71a632f833c56ceb9c697dddbe78fc
[ "Apache-2.0" ]
null
null
null
bingo/Base/MuPlusLambdaEA.py
tylertownsend/bingo
0aeebe03df71a632f833c56ceb9c697dddbe78fc
[ "Apache-2.0" ]
null
null
null
"""The "Mu + Lambda" This module defines the basis of the "mu plus lambda" evolutionary algorithm in bingo analyses. The next generation is evaluated and selected from both the parent and offspring populations. """ from .EvolutionaryAlgorithm import EvolutionaryAlgorithm from .VarOr import VarOr class MuPlusLambda(E...
37.605634
74
0.623596
from .EvolutionaryAlgorithm import EvolutionaryAlgorithm from .VarOr import VarOr class MuPlusLambda(EvolutionaryAlgorithm): def __init__(self, evaluation, selection, crossover, mutation, crossover_probability, mutation_probability, number_offspring): super().__init__(var...
true
true
1c2e4716e42cad5bc4c78a3108ee05cc872214b3
21,852
py
Python
neurox/interpretation/utils.py
davidarps/NeuroX
591cabce7a317d2a1ff2b07e6a3b277250815454
[ "BSD-3-Clause" ]
null
null
null
neurox/interpretation/utils.py
davidarps/NeuroX
591cabce7a317d2a1ff2b07e6a3b277250815454
[ "BSD-3-Clause" ]
null
null
null
neurox/interpretation/utils.py
davidarps/NeuroX
591cabce7a317d2a1ff2b07e6a3b277250815454
[ "BSD-3-Clause" ]
null
null
null
import math import numpy as np from imblearn.under_sampling import RandomUnderSampler def isnotebook(): """ Utility function to detect if the code being run is within a jupyter notebook. Useful to change progress indicators for example. Returns ------- isnotebook : bool True if the fu...
34.9632
141
0.610608
import math import numpy as np from imblearn.under_sampling import RandomUnderSampler def isnotebook(): try: shell = get_ipython().__class__.__name__ if shell == "ZMQInteractiveShell": return True elif shell == "TerminalInteractiveShell": return False el...
true
true
1c2e478bdfe0ea24a0b1714571dfbbe8815e468a
6,584
py
Python
share/common/utils/restcall.py
onap/multicloud-openstack
d0e41eb1b1a1cb79365836da728908ed26253db4
[ "CC-BY-4.0" ]
4
2018-10-24T15:20:14.000Z
2020-03-09T06:29:11.000Z
share/common/utils/restcall.py
onap/multicloud-openstack
d0e41eb1b1a1cb79365836da728908ed26253db4
[ "CC-BY-4.0" ]
null
null
null
share/common/utils/restcall.py
onap/multicloud-openstack
d0e41eb1b1a1cb79365836da728908ed26253db4
[ "CC-BY-4.0" ]
2
2020-08-03T13:45:44.000Z
2021-09-15T21:10:26.000Z
# Copyright (c) 2017-2018 Wind River Systems, 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...
36.782123
94
0.609356
import six import base64 import codecs import json import traceback import sys import logging from six.moves import urllib import httplib2 import uuid from rest_framework import status from django.conf import settings from common.utils import aai_cache rest_no_auth, rest_oneway_auth, rest_bothway_auth =...
true
true
1c2e47c00a8520777c086214fe06e3a52f73817f
21,859
py
Python
readtwice/models/trivia_qa/preprocess_lib.py
shaun95/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
1
2022-03-13T21:48:52.000Z
2022-03-13T21:48:52.000Z
readtwice/models/trivia_qa/preprocess_lib.py
shaun95/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
null
null
null
readtwice/models/trivia_qa/preprocess_lib.py
shaun95/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
1
2022-03-30T07:20:29.000Z
2022-03-30T07:20:29.000Z
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
38.964349
87
0.679308
import json import os import re import string from typing import Any, Iterator, List, Optional, Set, Text, Tuple import apache_beam as beam from apache_beam import metrics import dataclasses import nltk import tensorflow.compat.v1 as tf from readtwice.data_utils import beam_utils from readtwice.data_ut...
true
true
1c2e47c636c1783dcf57665f6534a758cd499e93
520
py
Python
Dependencies/gyp-master/test/win/gyptest-midl-includedirs.py
knight666/exlibris
b21b46e0c84e5c4f81f8048022cda88e7bb3dca2
[ "MIT" ]
null
null
null
Dependencies/gyp-master/test/win/gyptest-midl-includedirs.py
knight666/exlibris
b21b46e0c84e5c4f81f8048022cda88e7bb3dca2
[ "MIT" ]
null
null
null
Dependencies/gyp-master/test/win/gyptest-midl-includedirs.py
knight666/exlibris
b21b46e0c84e5c4f81f8048022cda88e7bb3dca2
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2014 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verify that 'midl_include_dirs' is handled. """ import TestGyp import sys if sys.platform == 'win32': test = TestGyp...
23.636364
73
0.682692
import TestGyp import sys if sys.platform == 'win32': test = TestGyp.TestGyp(formats=['msvs', 'ninja']) CHDIR = 'idl-includedirs' test.run_gyp('idl-includedirs.gyp', chdir=CHDIR) test.build('idl-includedirs.gyp', test.ALL, chdir=CHDIR) test.pass_test()
true
true
1c2e490b3e72e07c39bc7fa5d700e8208b53f383
6,264
py
Python
server.py
itssathya/techathon-product-development
4c0a4e79e194837628996a6b00cc1d97c7442fb3
[ "MIT" ]
null
null
null
server.py
itssathya/techathon-product-development
4c0a4e79e194837628996a6b00cc1d97c7442fb3
[ "MIT" ]
null
null
null
server.py
itssathya/techathon-product-development
4c0a4e79e194837628996a6b00cc1d97c7442fb3
[ "MIT" ]
null
null
null
from flask import Flask, render_template,request,redirect,url_for,flash,session,g from dbCode import loginVerify,addUser,studentPopulateClasses,ownerPopulateClasses,retrieveClassData,addClass,joinClassroom,allUsers,deleteUserDB,findClass from examDB import createTestDB,createAssignmentDB app = Flask(__name__) app.secr...
35.794286
155
0.64288
from flask import Flask, render_template,request,redirect,url_for,flash,session,g from dbCode import loginVerify,addUser,studentPopulateClasses,ownerPopulateClasses,retrieveClassData,addClass,joinClassroom,allUsers,deleteUserDB,findClass from examDB import createTestDB,createAssignmentDB app = Flask(__name__) app.secr...
true
true
1c2e4918ba1a3933f30f85a9410175d9db93dd40
16,898
py
Python
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/tests/test_nrt.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
8
2019-10-07T16:33:47.000Z
2020-12-07T03:59:58.000Z
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/tests/test_nrt.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
1
2017-12-21T23:31:59.000Z
2017-12-29T16:56:05.000Z
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/tests/test_nrt.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
5
2020-08-27T20:44:18.000Z
2021-08-21T22:54:11.000Z
from __future__ import absolute_import, division, print_function import math import os import sys import re import numpy as np from numba import unittest_support as unittest from numba import njit from numba.compiler import compile_isolated, Flags, types from numba.runtime import rtsys from numba.runtime import nrto...
35.351464
909
0.59439
from __future__ import absolute_import, division, print_function import math import os import sys import re import numpy as np from numba import unittest_support as unittest from numba import njit from numba.compiler import compile_isolated, Flags, types from numba.runtime import rtsys from numba.runtime import nrto...
true
true
1c2e4c0a10f3cb8b077049e6c82ff994b4f0e5e5
15,130
py
Python
rliable/library.py
DennisSoemers/rliable
9f4c97d59196b70518f1ee3ba6d4f03a302c3241
[ "Apache-2.0" ]
361
2021-08-20T00:45:20.000Z
2022-03-31T15:59:54.000Z
rliable/library.py
DennisSoemers/rliable
9f4c97d59196b70518f1ee3ba6d4f03a302c3241
[ "Apache-2.0" ]
7
2021-09-04T00:37:39.000Z
2022-01-31T19:21:45.000Z
rliable/library.py
DennisSoemers/rliable
9f4c97d59196b70518f1ee3ba6d4f03a302c3241
[ "Apache-2.0" ]
22
2021-08-31T22:09:22.000Z
2022-03-10T01:21:36.000Z
# coding=utf-8 # Copyright 2021 The Rliable Authors. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
42.619718
80
0.706345
from typing import Callable, Dict, List, Optional, Tuple, Union, Mapping from absl import logging import arch.bootstrap as arch_bs import numpy as np from numpy import random Float = Union[float, np.float32, np.float64] args_shapes = {key: val.shape for key, val in self._kwargs.items()} self._args_...
true
true
1c2e4c6f4061b20735d75dc5ba9f1d42d8f45267
3,535
py
Python
zvt/tag/tags/cycle_tag.py
KtineXu/zvt
3c1fdbb1c579225a59567ff211001f3c2c16a915
[ "MIT" ]
null
null
null
zvt/tag/tags/cycle_tag.py
KtineXu/zvt
3c1fdbb1c579225a59567ff211001f3c2c16a915
[ "MIT" ]
null
null
null
zvt/tag/tags/cycle_tag.py
KtineXu/zvt
3c1fdbb1c579225a59567ff211001f3c2c16a915
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from enum import Enum from zvt.domain import Stock, BlockStock, Block from zvt.tag.dataset.stock_tags import StockTags from zvt.tag.tag import StockTagger class CycleTag(Enum): # 强周期 strong_cycle = 'strong_cycle' # 弱周期 weak_cycle = 'weak_cycle' # 非周期,受周期影响不大,比如消费,医药 no...
44.746835
116
0.584724
from enum import Enum from zvt.domain import Stock, BlockStock, Block from zvt.tag.dataset.stock_tags import StockTags from zvt.tag.tag import StockTagger class CycleTag(Enum): strong_cycle = 'strong_cycle' weak_cycle = 'weak_cycle' non_cycle = 'non_cycle' cycle_map_industry = { ...
true
true
1c2e4c7dbc3b5f88af53b55c65475ce89c3a4685
11,268
py
Python
venv/Lib/site-packages/gevent/lock.py
asanka9/Quession-Discussion-App-Socket.Io-NLP
95a49a8afa572dc3908a0bade45e424c3751f191
[ "Apache-2.0" ]
6
2020-08-04T13:12:42.000Z
2020-08-16T13:26:19.000Z
venv/Lib/site-packages/gevent/lock.py
asanka9/Quession-Discussion-App-Socket.Io-NLP
95a49a8afa572dc3908a0bade45e424c3751f191
[ "Apache-2.0" ]
null
null
null
venv/Lib/site-packages/gevent/lock.py
asanka9/Quession-Discussion-App-Socket.Io-NLP
95a49a8afa572dc3908a0bade45e424c3751f191
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2009-2012 Denis Bilenko. See LICENSE for details. """ Locking primitives. These include semaphores with arbitrary bounds (:class:`Semaphore` and its safer subclass :class:`BoundedSemaphore`) and a semaphore with infinite bounds (:class:`DummySemaphore`), along with a reentrant lock (:class:`RLock`) wit...
29.888594
100
0.631434
from __future__ import absolute_import from gevent.hub import getcurrent from gevent._compat import PURE_PYTHON from gevent._compat import PY2 from gevent import monkey from gevent._semaphore import Semaphore from gevent._semaphore import BoundedSemaphore __all__ = [ 'Semaphore', 'BoundedSemaphore', '...
true
true
1c2e4db653cb665625fad9379f5532990b041c03
65,422
py
Python
watertap3/watertap3/wt_units/ion_exchange.py
NREL/WaterTAP3
74b83dbd189784ccfddac4bc5d27002190473619
[ "BSD-3-Clause" ]
null
null
null
watertap3/watertap3/wt_units/ion_exchange.py
NREL/WaterTAP3
74b83dbd189784ccfddac4bc5d27002190473619
[ "BSD-3-Clause" ]
34
2021-06-25T17:54:12.000Z
2021-06-25T17:54:27.000Z
watertap3/watertap3/wt_units/ion_exchange.py
NREL/WaterTAP3
74b83dbd189784ccfddac4bc5d27002190473619
[ "BSD-3-Clause" ]
4
2021-06-25T18:32:31.000Z
2022-03-24T20:24:18.000Z
import pandas as pd from pyomo.environ import * from pyomo.environ import units as pyunits from pyomo.repn.plugins.baron_writer import NonNegativeReals from watertap3.utils import financials from watertap3.wt_units.wt_unit import WT3UnitProcess ## REFERENCE: ADD REFERENCE HERE module_name = 'ion_exchange' basis_year...
49.300678
248
0.493978
import pandas as pd from pyomo.environ import * from pyomo.environ import units as pyunits from pyomo.repn.plugins.baron_writer import NonNegativeReals from watertap3.utils import financials from watertap3.wt_units.wt_unit import WT3UnitProcess basis_year = 2016 tpec_or_tic = 'TIC' class UnitProcess(WT3UnitProcess...
true
true
1c2e4e8ccd6bde2732204fcd388857bed85a4f35
1,147
py
Python
tests/test_film.py
kiniadit/swapit-wrapper
46ba13683f77b53575b3f10398288791ad863426
[ "MIT" ]
null
null
null
tests/test_film.py
kiniadit/swapit-wrapper
46ba13683f77b53575b3f10398288791ad863426
[ "MIT" ]
null
null
null
tests/test_film.py
kiniadit/swapit-wrapper
46ba13683f77b53575b3f10398288791ad863426
[ "MIT" ]
null
null
null
import responses from swapi_wrapper import Film, make_url @responses.activate def test_film_get(film_data): responses.add(responses.GET, film_data['url'], json=film_data) assert Film.resource_url == 'https://swapi.co/api/films/' film = Film.get(1) assert isinstance(film, Film) assert film.title...
26.674419
79
0.718396
import responses from swapi_wrapper import Film, make_url @responses.activate def test_film_get(film_data): responses.add(responses.GET, film_data['url'], json=film_data) assert Film.resource_url == 'https://swapi.co/api/films/' film = Film.get(1) assert isinstance(film, Film) assert film.title...
true
true
1c2e4f25610415e051c3646eb03b6dfb4efe06d5
235
py
Python
atividade2/RetornarVerticesAdjacentes.py
mateus2810/atividadesIa
0ffc816c962889fb9e0b9635692d616e46a0d0c5
[ "Apache-2.0" ]
null
null
null
atividade2/RetornarVerticesAdjacentes.py
mateus2810/atividadesIa
0ffc816c962889fb9e0b9635692d616e46a0d0c5
[ "Apache-2.0" ]
null
null
null
atividade2/RetornarVerticesAdjacentes.py
mateus2810/atividadesIa
0ffc816c962889fb9e0b9635692d616e46a0d0c5
[ "Apache-2.0" ]
null
null
null
#Questão 7 - Retornar os vertes adjacentes import numpy as np matrixIa = [[0,5,0,0,15,2], [5,0,0,9,22,4], [0,0,0,13,1,0], [9,0,12,0,0,6], [15,22,1,0,0,0], [2,4,0,6,0,0]] #Mostrar os vertes adjacentes ] print(np.matrix(matrixIa))
26.111111
107
0.617021
import numpy as np matrixIa = [[0,5,0,0,15,2], [5,0,0,9,22,4], [0,0,0,13,1,0], [9,0,12,0,0,6], [15,22,1,0,0,0], [2,4,0,6,0,0]] print(np.matrix(matrixIa))
true
true
1c2e5066f3b9c3767bdcfbe8c26f9f81315452be
372
py
Python
app/core/migrations/0002_user_is_staff.py
EdgarGGamartgo/recipe-app-api
e1749710b61bd1478527cc6d0415f335b914eb70
[ "MIT" ]
null
null
null
app/core/migrations/0002_user_is_staff.py
EdgarGGamartgo/recipe-app-api
e1749710b61bd1478527cc6d0415f335b914eb70
[ "MIT" ]
null
null
null
app/core/migrations/0002_user_is_staff.py
EdgarGGamartgo/recipe-app-api
e1749710b61bd1478527cc6d0415f335b914eb70
[ "MIT" ]
null
null
null
# Generated by Django 3.0.8 on 2020-07-28 02:04 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migrations.AddField( model_name='user', name='is_staff', field=...
19.578947
52
0.583333
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migrations.AddField( model_name='user', name='is_staff', field=models.BooleanField(default=True), ), ...
true
true
1c2e50d3f6208bc987f1ae48612865cc8e89d195
5,112
py
Python
pelayanan/views.py
diaksizz/Adisatya
1b20e523aede6ab3e8effb1ca63adf72016a6839
[ "MIT" ]
null
null
null
pelayanan/views.py
diaksizz/Adisatya
1b20e523aede6ab3e8effb1ca63adf72016a6839
[ "MIT" ]
7
2021-03-30T14:04:35.000Z
2022-01-13T03:07:50.000Z
pelayanan/views.py
diaksizz/Adisatya
1b20e523aede6ab3e8effb1ca63adf72016a6839
[ "MIT" ]
null
null
null
from django.shortcuts import render, redirect from django.http import HttpResponse from django.contrib import messages from django.contrib.auth.decorators import login_required from aitc_service.views import * from aitc_service.forms import * from .forms import * from .models import * from .filters import PelayananFi...
35.748252
124
0.676839
from django.shortcuts import render, redirect from django.http import HttpResponse from django.contrib import messages from django.contrib.auth.decorators import login_required from aitc_service.views import * from aitc_service.forms import * from .forms import * from .models import * from .filters import PelayananFi...
true
true
1c2e511591999b44847ebd94d2fabef97267fc38
1,510
py
Python
local/lib/python3.6/site-packages/pgadmin4/pgadmin/browser/server_groups/servers/pgagent/tests/tests_pgagent_get.py
sahilsdei/django_ecommerce
edc2513e41aca178d1ccae14ebaa6c7b1d709e73
[ "MIT" ]
null
null
null
local/lib/python3.6/site-packages/pgadmin4/pgadmin/browser/server_groups/servers/pgagent/tests/tests_pgagent_get.py
sahilsdei/django_ecommerce
edc2513e41aca178d1ccae14ebaa6c7b1d709e73
[ "MIT" ]
null
null
null
local/lib/python3.6/site-packages/pgadmin4/pgadmin/browser/server_groups/servers/pgagent/tests/tests_pgagent_get.py
sahilsdei/django_ecommerce
edc2513e41aca178d1ccae14ebaa6c7b1d709e73
[ "MIT" ]
null
null
null
########################################################################## # # pgAdmin 4 - PostgreSQL Tools # # Copyright (C) 2013 - 2018, The pgAdmin Development Team # This software is released under the PostgreSQL Licence # ########################################################################## import uuid from ...
32.826087
74
0.576159
true
true
1c2e513ed9092fe958702b468646efc642b43f91
183
py
Python
tests/datasets/test_ncbi.py
iwasakishuto/Keras-Imitation
8ac0cd7c8912d49d13b19a0182ad534c0781fbfe
[ "MIT" ]
4
2020-04-25T08:50:36.000Z
2020-04-26T04:49:16.000Z
tests/datasets/test_ncbi.py
iwasakishuto/Keras-Imitation
8ac0cd7c8912d49d13b19a0182ad534c0781fbfe
[ "MIT" ]
null
null
null
tests/datasets/test_ncbi.py
iwasakishuto/Keras-Imitation
8ac0cd7c8912d49d13b19a0182ad534c0781fbfe
[ "MIT" ]
null
null
null
# coding: utf-8 from kerasy.datasets import ncbi def test_get_seq(): # SARS coronavirus, complete genome sequence = ncbi.getSeq("NC_004718") assert sequence is not None
20.333333
39
0.721311
from kerasy.datasets import ncbi def test_get_seq(): sequence = ncbi.getSeq("NC_004718") assert sequence is not None
true
true
1c2e51d9a46484396d7bb44c506394b105fd35ba
433
py
Python
examples/nodes.py
hamersaw/stippy
ad341eab764c4a4162e90afba2e80bdb25e8e25d
[ "MIT" ]
null
null
null
examples/nodes.py
hamersaw/stippy
ad341eab764c4a4162e90afba2e80bdb25e8e25d
[ "MIT" ]
null
null
null
examples/nodes.py
hamersaw/stippy
ad341eab764c4a4162e90afba2e80bdb25e8e25d
[ "MIT" ]
null
null
null
#!/bin/python3 import os import sys # import realative 'stippy' python project script_dir = os.path.dirname(os.path.realpath(__file__)) sys.path.append(script_dir + '/../') import stippy if __name__ == '__main__': host_addr = '127.0.0.1:15606' # print nodes print('-----NODES-----') nodes = stippy.lis...
24.055556
70
0.646651
import os import sys script_dir = os.path.dirname(os.path.realpath(__file__)) sys.path.append(script_dir + '/../') import stippy if __name__ == '__main__': host_addr = '127.0.0.1:15606' print('-----NODES-----') nodes = stippy.list_nodes(host_addr) for node in nodes: print(str(node.id) ...
true
true
1c2e52342ca11109dc41f59d2289fc2c9c8ac5bb
18,480
py
Python
dimod/utilities.py
wbernoudy/dimod
c39677b4a743574dc795bc140dce703abd61087b
[ "Apache-2.0" ]
null
null
null
dimod/utilities.py
wbernoudy/dimod
c39677b4a743574dc795bc140dce703abd61087b
[ "Apache-2.0" ]
null
null
null
dimod/utilities.py
wbernoudy/dimod
c39677b4a743574dc795bc140dce703abd61087b
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 D-Wave Systems 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...
32.824156
106
0.613582
import copy import os import itertools from functools import reduce import numpy as np __all__ = ['ising_energy', 'qubo_energy', 'ising_to_qubo', 'qubo_to_ising', 'child_structure_dfs', 'get_include', ] def ising_energy(sample, h, J, o...
true
true
1c2e52715e112ad281fe0514e66107bb8805dd44
6,571
py
Python
third_party/a2c_ppo_acktr/algo/ppo.py
jyf588/SimGAN
23283d7b5629f1653567b2437bb28aac1cc17169
[ "Apache-2.0" ]
30
2021-06-16T23:28:58.000Z
2022-03-23T17:20:58.000Z
third_party/a2c_ppo_acktr/algo/ppo.py
jyf588/SimGAN
23283d7b5629f1653567b2437bb28aac1cc17169
[ "Apache-2.0" ]
1
2021-06-25T09:21:29.000Z
2021-08-11T23:14:14.000Z
third_party/a2c_ppo_acktr/algo/ppo.py
jyf588/SimGAN
23283d7b5629f1653567b2437bb28aac1cc17169
[ "Apache-2.0" ]
8
2021-06-19T12:51:50.000Z
2021-12-23T08:31:10.000Z
# MIT License # # Copyright (c) 2017 Ilya Kostrikov # # 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...
41.588608
110
0.575559
import torch import torch.nn as nn import torch.optim as optim from my_pybullet_envs.utils import mirror_obsact_batch class PPO(): def __init__(self, actor_critic, clip_param, ppo_epoch, num_mini_batch, valu...
true
true
1c2e52deeec86ee00757fa67e77d28c322c9ffd1
3,829
py
Python
scripts/simulate.py
kblondal/RMG-Py
ee14e35321c1dc3cd1900c6d2ebb27931d1bb542
[ "MIT" ]
1
2020-03-17T13:16:51.000Z
2020-03-17T13:16:51.000Z
scripts/simulate.py
kblondal/RMG-Py
ee14e35321c1dc3cd1900c6d2ebb27931d1bb542
[ "MIT" ]
null
null
null
scripts/simulate.py
kblondal/RMG-Py
ee14e35321c1dc3cd1900c6d2ebb27931d1bb542
[ "MIT" ]
1
2018-10-03T19:36:40.000Z
2018-10-03T19:36:40.000Z
#!/usr/bin/env python3 ############################################################################### # # # RMG - Reaction Mechanism Generator # # ...
50.381579
115
0.532254
true
true
1c2e5356a51e4433e91dfeaa4e7b0fc62446dccd
400
py
Python
projeto_cliente/cliente/migrations/0003_auto_20210615_2006.py
LeandroMelloo/curso_completo_api_rest_django_framework
c56771a2103ac755e68984b2b1b78f591c1d4b5a
[ "Apache-2.0" ]
null
null
null
projeto_cliente/cliente/migrations/0003_auto_20210615_2006.py
LeandroMelloo/curso_completo_api_rest_django_framework
c56771a2103ac755e68984b2b1b78f591c1d4b5a
[ "Apache-2.0" ]
null
null
null
projeto_cliente/cliente/migrations/0003_auto_20210615_2006.py
LeandroMelloo/curso_completo_api_rest_django_framework
c56771a2103ac755e68984b2b1b78f591c1d4b5a
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.0.8 on 2021-06-15 23:06 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cliente', '0002_auto_20210615_1759'), ] operations = [ migrations.AlterField( model_name='cliente', name='email', ...
21.052632
64
0.605
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cliente', '0002_auto_20210615_1759'), ] operations = [ migrations.AlterField( model_name='cliente', name='email', field=models.EmailField(max_length=30...
true
true
1c2e53c1762cf1429f24b1c0b740c323994335fd
342
py
Python
backend/models/profiles.py
jimbunny/AdminSystem
d9a42e2d8608cb0d9bc88f4c1945da48fb8cc925
[ "MIT" ]
null
null
null
backend/models/profiles.py
jimbunny/AdminSystem
d9a42e2d8608cb0d9bc88f4c1945da48fb8cc925
[ "MIT" ]
null
null
null
backend/models/profiles.py
jimbunny/AdminSystem
d9a42e2d8608cb0d9bc88f4c1945da48fb8cc925
[ "MIT" ]
1
2021-09-20T10:53:40.000Z
2021-09-20T10:53:40.000Z
#!/usr/bin/env python #-*- coding:utf-8 -*- # author:jingtongyu # datetime:2020/6/7 10:14 下午 # software: PyCharm from . import db from .base import BaseModel class ProfilesModel(db.Model, BaseModel): """ 示例模型类 """ __tablename__ = 'profiles' nickname = db.Column(db.String(32)) signature = db.C...
18
41
0.654971
from . import db from .base import BaseModel class ProfilesModel(db.Model, BaseModel): __tablename__ = 'profiles' nickname = db.Column(db.String(32)) signature = db.Column(db.String(32))
true
true
1c2e54a1a5dfb8670a48456dadbf819fd0df054a
4,909
py
Python
tests/components/homematicip_cloud/test_config_flow.py
dauden1184/home-assistant
f4c6d389b77d0efa86644e76604eaea5d21abdb5
[ "Apache-2.0" ]
7
2018-08-03T10:15:36.000Z
2019-03-25T13:31:55.000Z
tests/components/homematicip_cloud/test_config_flow.py
dauden1184/home-assistant
f4c6d389b77d0efa86644e76604eaea5d21abdb5
[ "Apache-2.0" ]
6
2021-02-08T20:25:50.000Z
2022-03-11T23:27:53.000Z
tests/components/homematicip_cloud/test_config_flow.py
dauden1184/home-assistant
f4c6d389b77d0efa86644e76604eaea5d21abdb5
[ "Apache-2.0" ]
3
2018-09-14T07:34:09.000Z
2018-09-29T12:57:10.000Z
"""Tests for HomematicIP Cloud config flow.""" from unittest.mock import patch from homeassistant.components.homematicip_cloud import hap as hmipc from homeassistant.components.homematicip_cloud import config_flow, const from tests.common import MockConfigEntry, mock_coro async def test_flow_works(hass): """Tes...
32.509934
73
0.652475
from unittest.mock import patch from homeassistant.components.homematicip_cloud import hap as hmipc from homeassistant.components.homematicip_cloud import config_flow, const from tests.common import MockConfigEntry, mock_coro async def test_flow_works(hass): config = { const.HMIPC_HAPID: 'ABC123', ...
true
true
1c2e563df760ccb6ee133e043950867149d7c623
335
py
Python
NyaaPy/__init__.py
jennisu/NyaaPy
98bdda06c9e104da93ba4882b54eae22864a3844
[ "MIT" ]
null
null
null
NyaaPy/__init__.py
jennisu/NyaaPy
98bdda06c9e104da93ba4882b54eae22864a3844
[ "MIT" ]
null
null
null
NyaaPy/__init__.py
jennisu/NyaaPy
98bdda06c9e104da93ba4882b54eae22864a3844
[ "MIT" ]
null
null
null
# Info about the module __version__ = '0.6.0' __author__ = 'Juanjo Salvador' __email__ = 'juanjosalvador@netc.eu' __url__ = 'http://juanjosalvador.me' __copyright__ = '2017 Juanjo Salvador' __license__ = 'MIT license' from NyaaPy.nyaa import Nyaa from NyaaPy.pantsu import Pantsu from NyaaPy.sukebei import SukebeiNyaa,...
27.916667
53
0.785075
__version__ = '0.6.0' __author__ = 'Juanjo Salvador' __email__ = 'juanjosalvador@netc.eu' __url__ = 'http://juanjosalvador.me' __copyright__ = '2017 Juanjo Salvador' __license__ = 'MIT license' from NyaaPy.nyaa import Nyaa from NyaaPy.pantsu import Pantsu from NyaaPy.sukebei import SukebeiNyaa, SukebeiPantsu
true
true
1c2e57e31ee9856cdbed3b2440d6bec2260be61a
42,956
py
Python
zerver/tests/test_home.py
rohanj-02/zulip
fc0488fdb1b83bffea4a300656d7bb7f5e6ab581
[ "Apache-2.0" ]
null
null
null
zerver/tests/test_home.py
rohanj-02/zulip
fc0488fdb1b83bffea4a300656d7bb7f5e6ab581
[ "Apache-2.0" ]
null
null
null
zerver/tests/test_home.py
rohanj-02/zulip
fc0488fdb1b83bffea4a300656d7bb7f5e6ab581
[ "Apache-2.0" ]
null
null
null
import calendar import urllib from datetime import timedelta from typing import Any from unittest.mock import patch import orjson from django.conf import settings from django.http import HttpResponse from django.utils.timezone import now as timezone_now from corporate.models import Customer, CustomerPlan from zerver....
38.803975
100
0.634184
import calendar import urllib from datetime import timedelta from typing import Any from unittest.mock import patch import orjson from django.conf import settings from django.http import HttpResponse from django.utils.timezone import now as timezone_now from corporate.models import Customer, CustomerPlan from zerver....
true
true
1c2e57eb478b88cc278197b05dd422c8b7eec2cb
2,421
py
Python
src/ZPublisher/interfaces.py
tseaver/Zope-RFA
08634f39b0f8b56403a2a9daaa6ee4479ef0c625
[ "ZPL-2.1" ]
2
2015-12-21T10:34:56.000Z
2017-09-24T11:07:58.000Z
src/ZPublisher/interfaces.py
MatthewWilkes/Zope
740f934fc9409ae0062e8f0cd6dcfd8b2df00376
[ "ZPL-2.1" ]
null
null
null
src/ZPublisher/interfaces.py
MatthewWilkes/Zope
740f934fc9409ae0062e8f0cd6dcfd8b2df00376
[ "ZPL-2.1" ]
null
null
null
from zope.interface import Interface, Attribute ############################################################################# # Publication events # These are events notified in 'ZPublisher.Publish.publish'. class IPubEvent(Interface): '''Base class for publication events. Publication events are notified in...
33.164384
83
0.701776
from zope.interface import Interface, Attribute
true
true
1c2e5941f1479ba49f53eb4c158724816054820e
3,858
py
Python
linkedin_jobs_scraper/utils/chrome_driver.py
magahet/py-linkedin-jobs-scraper
f0d69053455e68bd8a74ab2d79ab2c27b5e3f7d4
[ "MIT" ]
85
2020-10-21T04:09:23.000Z
2022-03-23T00:29:33.000Z
linkedin_jobs_scraper/utils/chrome_driver.py
magahet/py-linkedin-jobs-scraper
f0d69053455e68bd8a74ab2d79ab2c27b5e3f7d4
[ "MIT" ]
24
2020-11-18T10:10:32.000Z
2022-03-19T17:30:25.000Z
linkedin_jobs_scraper/utils/chrome_driver.py
magahet/py-linkedin-jobs-scraper
f0d69053455e68bd8a74ab2d79ab2c27b5e3f7d4
[ "MIT" ]
23
2020-11-18T09:31:13.000Z
2022-03-25T03:50:52.000Z
import urllib3 import json from selenium import webdriver from selenium.webdriver.common.proxy import Proxy, ProxyType from selenium.webdriver.chrome.options import Options from linkedin_jobs_scraper.utils.logger import debug def get_default_driver_options(width=1472, height=828, headless=True) -> Options: """ ...
32.420168
111
0.708657
import urllib3 import json from selenium import webdriver from selenium.webdriver.common.proxy import Proxy, ProxyType from selenium.webdriver.chrome.options import Options from linkedin_jobs_scraper.utils.logger import debug def get_default_driver_options(width=1472, height=828, headless=True) -> Options: chrom...
true
true
1c2e59e65ce3964676a548c7c0827f760fd7b88b
1,176
py
Python
clean.py
braedynl/DasCrazy
02a3e41631929eaf402116d25299ec252f6fee2f
[ "MIT" ]
1
2021-07-26T05:46:17.000Z
2021-07-26T05:46:17.000Z
clean.py
braedynl/DasCrazy
02a3e41631929eaf402116d25299ec252f6fee2f
[ "MIT" ]
null
null
null
clean.py
braedynl/DasCrazy
02a3e41631929eaf402116d25299ec252f6fee2f
[ "MIT" ]
null
null
null
import pandas as pd from util import load def main(raw_filename: str, clean_filename: str) -> None: raw_data = load(raw_filename) clean_data = pd.DataFrame(columns=raw_data.columns) # First chat message to signal a "das crazy" moment indicator_row = None for _, row in raw_data.iterrows(): ...
31.783784
87
0.610544
import pandas as pd from util import load def main(raw_filename: str, clean_filename: str) -> None: raw_data = load(raw_filename) clean_data = pd.DataFrame(columns=raw_data.columns) indicator_row = None for _, row in raw_data.iterrows(): message = row["message"].lower() if "c...
true
true
1c2e5aa505ad967025a5ad570c9e300b8bc1dfaf
5,096
py
Python
xarray/tests/test_coding.py
jhamman/xarray-test-docs
c54123772817875678ec7ad769e6d4d6612aeb92
[ "Apache-2.0" ]
2,257
2016-01-06T01:52:47.000Z
2022-03-30T10:36:31.000Z
xarray/tests/test_coding.py
jhamman/xarray-test-docs
c54123772817875678ec7ad769e6d4d6612aeb92
[ "Apache-2.0" ]
4,934
2016-01-05T00:06:37.000Z
2022-03-31T23:57:36.000Z
xarray/tests/test_coding.py
jhamman/xarray-test-docs
c54123772817875678ec7ad769e6d4d6612aeb92
[ "Apache-2.0" ]
925
2016-01-07T12:18:45.000Z
2022-03-28T07:42:09.000Z
from contextlib import suppress import numpy as np import pandas as pd import pytest import xarray as xr from xarray.coding import variables from xarray.conventions import decode_cf_variable, encode_cf_variable from . import assert_allclose, assert_equal, assert_identical, requires_dask with suppress(ImportError): ...
34.432432
84
0.701334
from contextlib import suppress import numpy as np import pandas as pd import pytest import xarray as xr from xarray.coding import variables from xarray.conventions import decode_cf_variable, encode_cf_variable from . import assert_allclose, assert_equal, assert_identical, requires_dask with suppress(ImportError): ...
true
true
1c2e5aafe3ab159eff123db0b0e741b4a314b731
1,966
py
Python
internal/notes/builtin-SAVE/packages/r-rmpfr/package.py
HPCToolkit/hpctest
5ff4455582bf39e75530a31badcf6142081b386b
[ "BSD-3-Clause" ]
1
2019-01-17T20:07:19.000Z
2019-01-17T20:07:19.000Z
internal/notes/builtin-SAVE/packages/r-rmpfr/package.py
HPCToolkit/hpctest
5ff4455582bf39e75530a31badcf6142081b386b
[ "BSD-3-Clause" ]
null
null
null
internal/notes/builtin-SAVE/packages/r-rmpfr/package.py
HPCToolkit/hpctest
5ff4455582bf39e75530a31badcf6142081b386b
[ "BSD-3-Clause" ]
2
2019-08-06T18:13:57.000Z
2021-11-05T18:19:49.000Z
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
45.72093
78
0.677518
true
true
1c2e5af9ef58185b398507efc2256af2097a2184
587
py
Python
card_utils/games/poker/__init__.py
cdrappi/card_utils
dd12d3be22774cf35d7a6ce6b5f05ff6ee527929
[ "MIT" ]
null
null
null
card_utils/games/poker/__init__.py
cdrappi/card_utils
dd12d3be22774cf35d7a6ce6b5f05ff6ee527929
[ "MIT" ]
null
null
null
card_utils/games/poker/__init__.py
cdrappi/card_utils
dd12d3be22774cf35d7a6ce6b5f05ff6ee527929
[ "MIT" ]
null
null
null
""" poker specific constants """ broadway_ranks = {'T', 'J', 'Q', 'K', 'A'} STRAIGHT_FLUSH = 'straight flush' QUADS = 'four of a kind' FULL_HOUSE = 'full house' FLUSH = 'flush' STRAIGHT = 'straight' THREE_OF_A_KIND = 'three of a kind' TWO_PAIR = 'two pair' ONE_PAIR = 'one pair' HIGH_CARD = 'high card' hand_order = {...
18.935484
50
0.643952
broadway_ranks = {'T', 'J', 'Q', 'K', 'A'} STRAIGHT_FLUSH = 'straight flush' QUADS = 'four of a kind' FULL_HOUSE = 'full house' FLUSH = 'flush' STRAIGHT = 'straight' THREE_OF_A_KIND = 'three of a kind' TWO_PAIR = 'two pair' ONE_PAIR = 'one pair' HIGH_CARD = 'high card' hand_order = { HIGH_CARD: 0, ONE_PAIR: ...
true
true
1c2e5b04acf80c8fcbf410c24c15edcad6285238
20,265
py
Python
dashboard/dashboard/common/utils.py
ncalexan/catapult
d21a98f0ee0bc0394eb93922d0b274fd6ac281d5
[ "BSD-3-Clause" ]
null
null
null
dashboard/dashboard/common/utils.py
ncalexan/catapult
d21a98f0ee0bc0394eb93922d0b274fd6ac281d5
[ "BSD-3-Clause" ]
null
null
null
dashboard/dashboard/common/utils.py
ncalexan/catapult
d21a98f0ee0bc0394eb93922d0b274fd6ac281d5
[ "BSD-3-Clause" ]
1
2019-04-21T23:48:15.000Z
2019-04-21T23:48:15.000Z
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """General functions which are useful throughout this project.""" import json import logging import os import re import time import urllib from apiclient i...
30.986239
80
0.702048
import json import logging import os import re import time import urllib from apiclient import discovery from apiclient import errors from google.appengine.api import app_identity from google.appengine.api import memcache from google.appengine.api import oauth from google.appengine.api import urlfetch from google...
true
true
1c2e5da54ed921047d2d2dc98db94232bc973fcc
1,992
py
Python
packages/Python/lldbsuite/test/commands/expression/import-std-module/stack/TestStack.py
xiaobai/swift-lldb
9238527ce430e6837108a16d2a91b147551fb83c
[ "Apache-2.0" ]
765
2015-12-03T16:44:59.000Z
2022-03-07T12:41:10.000Z
packages/Python/lldbsuite/test/commands/expression/import-std-module/stack/TestStack.py
xiaobai/swift-lldb
9238527ce430e6837108a16d2a91b147551fb83c
[ "Apache-2.0" ]
1,815
2015-12-11T23:56:05.000Z
2020-01-10T19:28:43.000Z
packages/Python/lldbsuite/test/commands/expression/import-std-module/stack/TestStack.py
xiaobai/swift-lldb
9238527ce430e6837108a16d2a91b147551fb83c
[ "Apache-2.0" ]
284
2015-12-03T16:47:25.000Z
2022-03-12T05:39:48.000Z
""" Tests std::stack functionality. """ from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TestStack(TestBase): mydir = TestBase.compute_mydir(__file__) # FIXME: This should work on more setups, so remove these # skipIf's in the future...
39.84
80
0.611446
from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TestStack(TestBase): mydir = TestBase.compute_mydir(__file__) @add_test_categories(["libc++"]) @skipIf(compiler=no_match("clang")) @skipIf(oslist=no_match(["linux"])) ...
true
true
1c2e5dc72d3bbd38b07704a9269c71b9217a32ae
8,929
py
Python
RE/grb2fig.py
reic/groupLearning-Python-100-Days
91746e6ee3acf2dbf0e9d324f6c6ce3cb91ed131
[ "MIT" ]
4
2020-05-21T06:50:52.000Z
2020-09-07T05:39:24.000Z
RE/grb2fig.py
reic/groupLearning-Python-100-Days
91746e6ee3acf2dbf0e9d324f6c6ce3cb91ed131
[ "MIT" ]
1
2020-05-24T07:26:56.000Z
2020-05-25T00:06:02.000Z
RE/grb2fig.py
reic/groupLearning-Python-100-Days
91746e6ee3acf2dbf0e9d324f6c6ce3cb91ed131
[ "MIT" ]
1
2020-11-05T13:03:42.000Z
2020-11-05T13:03:42.000Z
import pandas as pd import os import numpy as np import matplotlib.pyplot as plt import concurrent.futures def grb_aggr(files, grb_xlsFileName): dft = [] for file in files: dft.append(pd.read_excel(file)) df = pd.concat(dft, ignore_index=True) # 輸出合併檔 df.to_excel(grb_xlsFileName, index=Fal...
37.834746
202
0.586628
import pandas as pd import os import numpy as np import matplotlib.pyplot as plt import concurrent.futures def grb_aggr(files, grb_xlsFileName): dft = [] for file in files: dft.append(pd.read_excel(file)) df = pd.concat(dft, ignore_index=True) df.to_excel(grb_xlsFileName, index=False) ...
true
true
1c2e5de7d7bc7f5f29dee40434b610461ea5fa0b
8,903
py
Python
ludwig/serve.py
majacQ/ludwig
237d832b85d224ef6d1ea53eface5479449caba3
[ "Apache-2.0" ]
null
null
null
ludwig/serve.py
majacQ/ludwig
237d832b85d224ef6d1ea53eface5479449caba3
[ "Apache-2.0" ]
null
null
null
ludwig/serve.py
majacQ/ludwig
237d832b85d224ef6d1ea53eface5479449caba3
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/env python # coding=utf-8 # Copyright (c) 2019 Uber Technologies, 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 # # Unles...
31.129371
101
0.599124
import argparse import json import logging import os import sys import tempfile import pandas as pd from imageio import imread from ludwig.api import LudwigModel from ludwig.constants import COLUMN, AUDIO from ludwig.contrib import contrib_command, contrib_import from ludwig.globals import LUDWIG_VERS...
true
true
1c2e5e21c0f2b7137d89603c9202cf6fefca9953
1,837
py
Python
server/main/management/commands/fix_permissions.py
coll-gate/collgate
8c2ff1c59adda2bf318040f588c05263317a2812
[ "MIT" ]
2
2017-07-04T16:19:09.000Z
2019-08-16T04:54:47.000Z
server/main/management/commands/fix_permissions.py
coll-gate/collgate
8c2ff1c59adda2bf318040f588c05263317a2812
[ "MIT" ]
null
null
null
server/main/management/commands/fix_permissions.py
coll-gate/collgate
8c2ff1c59adda2bf318040f588c05263317a2812
[ "MIT" ]
1
2018-04-13T08:28:09.000Z
2018-04-13T08:28:09.000Z
# -*- coding: utf-8; -*- # # @file fix_permissions.py # @brief # @author Frédéric SCHERMA (INRA UMR1095) # @date 2016-09-01 # @copyright Copyright (c) 2016 INRA/CIRAD # @license MIT (see LICENSE file) # @details """Add permissions for proxy model. This is needed because of the bug https://code.djangoproject.com/tick...
35.326923
79
0.684812
from __future__ import unicode_literals, absolute_import, division import sys from django.contrib.auth.management import _get_all_permissions from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from django.core.management.base import BaseCommand from...
true
true
1c2e5e917fc2f3c6f9a285d882f2ed99ff462e22
7,277
py
Python
scripts_dql/script17.py
lbaiao/sys-simulator-2
94f00d43309fe7b56dac5099bd4024695ba317b6
[ "MIT" ]
1
2020-06-14T13:50:28.000Z
2020-06-14T13:50:28.000Z
scripts_dql/script17.py
lbaiao/sys-simulator-2
94f00d43309fe7b56dac5099bd4024695ba317b6
[ "MIT" ]
null
null
null
scripts_dql/script17.py
lbaiao/sys-simulator-2
94f00d43309fe7b56dac5099bd4024695ba317b6
[ "MIT" ]
null
null
null
# Same as script 15, but there are only 5 actions options, hence the DQN has a smaller output layer. import sys import os lucas_path = os.environ['LUCAS_PATH'] sys.path.insert(1, lucas_path) from general import general as gen from devices.devices import node, base_station, mobile_user, d2d_user, d2d_node_type from p...
39.983516
149
0.682699
import sys import os lucas_path = os.environ['LUCAS_PATH'] sys.path.insert(1, lucas_path) from general import general as gen from devices.devices import node, base_station, mobile_user, d2d_user, d2d_node_type from pathloss import pathloss from plots.plots import plot_positions, plot_spectral_effs from q_learning.e...
true
true
1c2e5eaa434e78501ffc85e65c2a4f21a98ed90f
2,009
py
Python
tests/test_pyvmomi_tasks.py
NavyaPalle/vlab_inf_common
2a220e5543c168f364adf3ab2677bcfd52e5beb3
[ "Apache-2.0" ]
1
2019-04-10T16:17:27.000Z
2019-04-10T16:17:27.000Z
tests/test_pyvmomi_tasks.py
NavyaPalle/vlab_inf_common
2a220e5543c168f364adf3ab2677bcfd52e5beb3
[ "Apache-2.0" ]
3
2019-03-28T17:39:36.000Z
2019-05-22T17:08:35.000Z
tests/test_pyvmomi_tasks.py
NavyaPalle/vlab_inf_common
2a220e5543c168f364adf3ab2677bcfd52e5beb3
[ "Apache-2.0" ]
1
2020-08-27T11:48:33.000Z
2020-08-27T11:48:33.000Z
# -*- coding: UTF-8 -*- """Unittests for the vlab_inf_common.vmware.tasks module""" import unittest from unittest.mock import patch, MagicMock import vlab_inf_common.vmware.tasks as task_lib class TestConsumeTask(unittest.TestCase): """A set of test cases for the ``consume_task`` function""" @patch.object(ta...
33.483333
99
0.658537
import unittest from unittest.mock import patch, MagicMock import vlab_inf_common.vmware.tasks as task_lib class TestConsumeTask(unittest.TestCase): @patch.object(task_lib, 'time') def test_happy_path(self, fake_time): fake_task = MagicMock() fake_task.info.error = None fake_task.inf...
true
true
1c2e5f1a6f2675d5bde9f8ba22a467e54251eb41
1,279
py
Python
Module02/Guess_the_Primer.py
biomed-bioinformatics-bootcamp/bmes-t580-2019-coursework-Nathan-Ona
e09f761f837ba7c6c2bfa223a9ed9e987b6260be
[ "MIT" ]
null
null
null
Module02/Guess_the_Primer.py
biomed-bioinformatics-bootcamp/bmes-t580-2019-coursework-Nathan-Ona
e09f761f837ba7c6c2bfa223a9ed9e987b6260be
[ "MIT" ]
null
null
null
Module02/Guess_the_Primer.py
biomed-bioinformatics-bootcamp/bmes-t580-2019-coursework-Nathan-Ona
e09f761f837ba7c6c2bfa223a9ed9e987b6260be
[ "MIT" ]
null
null
null
# imports the random module that allows for the generation of random values import random # Creates divider for program print('---------------------------') print(' GUESS THE PRIMER! ') print('---------------------------') print() # Generates random DNA sequence DNA_goal = random.choice('ACGT') DNA_goal += rand...
38.757576
104
0.659109
import random print('---------------------------') print(' GUESS THE PRIMER! ') print('---------------------------') print() DNA_goal = random.choice('ACGT') DNA_goal += random.choice('ACGT') DNA_goal += random.choice('ACGT') DNA_goal += random.choice('ACGT') DNA_goal += random.choice('ACGT') X = 2 user_nam...
true
true
1c2e5ff93c9e3a3ea5ad94041810c30dd27d4bfd
686
py
Python
src/healthcare/azext_healthcare/_client_factory.py
feiskyer/azure-cli-extensions
a5e1d20c15031ef11c0e388993ea4e86603b33bb
[ "MIT" ]
null
null
null
src/healthcare/azext_healthcare/_client_factory.py
feiskyer/azure-cli-extensions
a5e1d20c15031ef11c0e388993ea4e86603b33bb
[ "MIT" ]
null
null
null
src/healthcare/azext_healthcare/_client_factory.py
feiskyer/azure-cli-extensions
a5e1d20c15031ef11c0e388993ea4e86603b33bb
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
45.733333
94
0.587464
def cf_healthcare(cli_ctx, *_): from azure.cli.core.commands.client_factory import get_mgmt_service_client from .vendored_sdks.healthcareapis import HealthcareApisManagementClient return get_mgmt_service_client(cli_ctx, HealthcareApisManagementClient) def cf_services(cli_ctx, *_): return cf_heal...
true
true
1c2e60291d6a6365d4e7b03e7f1fb39162c03e54
8,957
py
Python
odoo/addons/base/tests/test_search.py
jjiege/odoo
fd5b8ad387c1881f349d125cbd56433f4d49398f
[ "MIT" ]
null
null
null
odoo/addons/base/tests/test_search.py
jjiege/odoo
fd5b8ad387c1881f349d125cbd56433f4d49398f
[ "MIT" ]
null
null
null
odoo/addons/base/tests/test_search.py
jjiege/odoo
fd5b8ad387c1881f349d125cbd56433f4d49398f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests.common import TransactionCase class test_search(TransactionCase): def test_00_search_order(self): # Create 6 partners with a given name, and a given creation order to # ensure the o...
59.317881
168
0.620074
from odoo.tests.common import TransactionCase class test_search(TransactionCase): def test_00_search_order(self): Partner = self.env['res.partner'] c = Partner.create({'name': 'test_search_order_C'}) d = Partner.create({'name': 'test_search_order_D'...
true
true
1c2e603e05c399fbbfce0c3827f887ed09dab251
2,178
py
Python
dp/188.py
fimh/dsa-py
383c9e9a36304a63668449043b1217aede93dd1e
[ "MIT" ]
1
2019-12-17T09:23:51.000Z
2019-12-17T09:23:51.000Z
dp/188.py
fimh/dsa-py
383c9e9a36304a63668449043b1217aede93dd1e
[ "MIT" ]
null
null
null
dp/188.py
fimh/dsa-py
383c9e9a36304a63668449043b1217aede93dd1e
[ "MIT" ]
null
null
null
""" Question: Best Time to Buy and Sell Stock IV Difficulty: Hard Link: https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv/ Ref: https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-iv/ You are given an integer array prices where prices[i] is the price of a given stock on the i...
29.835616
165
0.566575
from typing import List class Solution: def maxProfit(self, k: int, prices: List[int]) -> int: if len(prices) <= 1: return 0 times = k dp = [[[0 for _ in range(2)] for _ in range(times + 1)] for _ in range(len(prices))] for k in range(times + 1): dp[0][k]...
true
true
1c2e603f21f291adba5b57dfc58e8f9764fba114
11,169
py
Python
Sklearn_scipy_numpy/source/sklearn/feature_extraction/tests/test_image.py
Con-Mi/lambda-packs
b23a8464abdd88050b83310e1d0e99c54dac28ab
[ "MIT" ]
1
2019-06-27T12:09:44.000Z
2019-06-27T12:09:44.000Z
Sklearn_scipy_numpy/source/sklearn/feature_extraction/tests/test_image.py
Con-Mi/lambda-packs
b23a8464abdd88050b83310e1d0e99c54dac28ab
[ "MIT" ]
null
null
null
Sklearn_scipy_numpy/source/sklearn/feature_extraction/tests/test_image.py
Con-Mi/lambda-packs
b23a8464abdd88050b83310e1d0e99c54dac28ab
[ "MIT" ]
null
null
null
# Authors: Emmanuelle Gouillart <emmanuelle.gouillart@normalesup.org> # Gael Varoquaux <gael.varoquaux@normalesup.org> # License: BSD 3 clause import numpy as np import scipy as sp from scipy import ndimage from scipy import misc from nose.tools import assert_equal, assert_true from numpy.testing import asse...
35.683706
79
0.64491
import numpy as np import scipy as sp from scipy import ndimage from scipy import misc from nose.tools import assert_equal, assert_true from numpy.testing import assert_raises from sklearn.feature_extraction.image import ( img_to_graph, grid_to_graph, extract_patches_2d, reconstruct_from_patches_2d, Patch...
true
true
1c2e603f860b366c183495d66f427a52370e54a5
8,379
py
Python
pippin/snana_fit.py
skuhl99/Pippin
3cbf4feed71a380eecd57a42b972f9723ae1abd1
[ "MIT" ]
null
null
null
pippin/snana_fit.py
skuhl99/Pippin
3cbf4feed71a380eecd57a42b972f9723ae1abd1
[ "MIT" ]
null
null
null
pippin/snana_fit.py
skuhl99/Pippin
3cbf4feed71a380eecd57a42b972f9723ae1abd1
[ "MIT" ]
null
null
null
import inspect import os import logging import shutil import subprocess import time import pandas as pd from pippin.base import ConfigBasedExecutable from pippin.config import chown_dir, mkdirs from pippin.dataprep import DataPrep from pippin.snana_sim import SNANASimulation from pippin.task import Task class SNANAL...
45.538043
159
0.622151
import inspect import os import logging import shutil import subprocess import time import pandas as pd from pippin.base import ConfigBasedExecutable from pippin.config import chown_dir, mkdirs from pippin.dataprep import DataPrep from pippin.snana_sim import SNANASimulation from pippin.task import Task class SNANAL...
true
true
1c2e60cc093706b62834ad86a94e249ff1421971
1,095
py
Python
raythena/utils/logging.py
dougbenjamin/ray
6f01cb1af4eb2fdd3c32fb3ebf21bb6405c4b540
[ "Apache-2.0" ]
3
2019-10-08T22:56:35.000Z
2021-07-21T23:31:48.000Z
raythena/utils/logging.py
dougbenjamin/ray
6f01cb1af4eb2fdd3c32fb3ebf21bb6405c4b540
[ "Apache-2.0" ]
4
2020-07-07T12:30:08.000Z
2020-09-25T14:18:38.000Z
raythena/utils/logging.py
dougbenjamin/ray
6f01cb1af4eb2fdd3c32fb3ebf21bb6405c4b540
[ "Apache-2.0" ]
5
2020-07-06T12:10:36.000Z
2022-03-09T22:25:25.000Z
import logging import os import sys from raythena.utils.config import Config def configure_logger(config: Config, file_logging: bool = True) -> None: """ Configure the logging format and handlers. Args: config: application config file_logging: if True, write logs to 'config.logging.logfi...
27.375
91
0.632877
import logging import os import sys from raythena.utils.config import Config def configure_logger(config: Config, file_logging: bool = True) -> None: if config.logging['level'].lower() == 'debug': log_level = logging.DEBUG else: log_level = config.logging['level'].upper() handlers = list...
true
true
1c2e6185f1083da1c3e89b821714bfff2b3c1517
28,916
py
Python
scipy/special/tests/test_data.py
HumHongeKamyaab/scipy
ce61e02e912d15ea28b37ea036334b9ba266ebb5
[ "BSD-3-Clause" ]
null
null
null
scipy/special/tests/test_data.py
HumHongeKamyaab/scipy
ce61e02e912d15ea28b37ea036334b9ba266ebb5
[ "BSD-3-Clause" ]
null
null
null
scipy/special/tests/test_data.py
HumHongeKamyaab/scipy
ce61e02e912d15ea28b37ea036334b9ba266ebb5
[ "BSD-3-Clause" ]
null
null
null
import os import numpy as np from numpy import arccosh, arcsinh, arctanh from numpy.testing import suppress_warnings import pytest from scipy.special import ( lpn, lpmn, lpmv, lqn, lqmn, sph_harm, eval_legendre, eval_hermite, eval_laguerre, eval_genlaguerre, binom, cbrt, expm1, log1p, zeta, jn, jv, jvp, y...
46.118022
135
0.664857
import os import numpy as np from numpy import arccosh, arcsinh, arctanh from numpy.testing import suppress_warnings import pytest from scipy.special import ( lpn, lpmn, lpmv, lqn, lqmn, sph_harm, eval_legendre, eval_hermite, eval_laguerre, eval_genlaguerre, binom, cbrt, expm1, log1p, zeta, jn, jv, jvp, y...
true
true
1c2e62b0fc97c13f9605dc60ea7eadd17f276dde
483
py
Python
prep_ons_nuts_gva.py
aeturrell/uk-economy-app
915272d9843f5bf4ad6ace1d5353e7ae58a7b6be
[ "MIT" ]
null
null
null
prep_ons_nuts_gva.py
aeturrell/uk-economy-app
915272d9843f5bf4ad6ace1d5353e7ae58a7b6be
[ "MIT" ]
null
null
null
prep_ons_nuts_gva.py
aeturrell/uk-economy-app
915272d9843f5bf4ad6ace1d5353e7ae58a7b6be
[ "MIT" ]
null
null
null
import pandas as pd import os fname = "regionalgrossvalueaddedbalancedbyindustryallnutslevelregions.xlsx" df = pd.read_excel(os.path.join('scratch', fname), sheet_name='Table1b', skiprows=0) df.columns = df.iloc[0, :] df = df.iloc[1:, :] df = df[df['SIC07 code'] == 'Total'] df = ...
32.2
75
0.610766
import pandas as pd import os fname = "regionalgrossvalueaddedbalancedbyindustryallnutslevelregions.xlsx" df = pd.read_excel(os.path.join('scratch', fname), sheet_name='Table1b', skiprows=0) df.columns = df.iloc[0, :] df = df.iloc[1:, :] df = df[df['SIC07 code'] == 'Total'] df = ...
true
true
1c2e649ff99586fff51de52322950e772745dde5
3,165
py
Python
tests/operators/vector/test_smooth_l1_loss_grad_001.py
laekov/akg
5316b8cb2340bbf71bdc724dc9d81513a67b3104
[ "Apache-2.0" ]
1
2020-08-31T02:43:43.000Z
2020-08-31T02:43:43.000Z
tests/operators/vector/test_smooth_l1_loss_grad_001.py
laekov/akg
5316b8cb2340bbf71bdc724dc9d81513a67b3104
[ "Apache-2.0" ]
null
null
null
tests/operators/vector/test_smooth_l1_loss_grad_001.py
laekov/akg
5316b8cb2340bbf71bdc724dc9d81513a67b3104
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
34.032258
114
0.612006
import datetime import os from base import TestBase import pytest from test_run.smooth_l1_loss_grad_run import smooth_l1_loss_grad_run
true
true
1c2e6507af08539c77c856e95f6d4852bc06d2f2
9,590
py
Python
tests/test_integration.py
repo-helper/formate
45e4b4fe29af144db714ea90c92cf6e7035ae301
[ "MIT" ]
1
2022-03-19T07:39:58.000Z
2022-03-19T07:39:58.000Z
tests/test_integration.py
repo-helper/formate
45e4b4fe29af144db714ea90c92cf6e7035ae301
[ "MIT" ]
14
2021-01-25T23:10:04.000Z
2021-06-29T19:55:38.000Z
tests/test_integration.py
repo-helper/formate
45e4b4fe29af144db714ea90c92cf6e7035ae301
[ "MIT" ]
null
null
null
# stdlib import re from typing import Union, no_type_check # 3rd party import click import pytest from _pytest.capture import CaptureResult from coincidence.regressions import AdvancedDataRegressionFixture, AdvancedFileRegressionFixture from coincidence.selectors import max_version, min_version, not_pypy, only_pypy fr...
25.710456
96
0.727216
import re from typing import Union, no_type_check import click import pytest from _pytest.capture import CaptureResult from coincidence.regressions import AdvancedDataRegressionFixture, AdvancedFileRegressionFixture from coincidence.selectors import max_version, min_version, not_pypy, only_pypy from consolekit.termi...
true
true
1c2e65d33801a4fa744793960df341bf946c28ad
32
py
Python
{{cookiecutter.package_name}}/{{cookiecutter.package_name}}/__init__.py
simongarisch/cookiecutter_streamlit
2ef3dafdbc5505b601a0f8aee8fcbf8d0cdbf537
[ "MIT" ]
5
2020-08-26T03:43:24.000Z
2021-11-08T10:45:27.000Z
{{cookiecutter.package_name}}/{{cookiecutter.package_name}}/__init__.py
simongarisch/cookiecutter_streamlit
2ef3dafdbc5505b601a0f8aee8fcbf8d0cdbf537
[ "MIT" ]
1
2020-08-26T03:42:37.000Z
2020-08-26T03:42:37.000Z
{{cookiecutter.package_name}}/{{cookiecutter.package_name}}/__init__.py
simongarisch/cookiecutter_streamlit
2ef3dafdbc5505b601a0f8aee8fcbf8d0cdbf537
[ "MIT" ]
null
null
null
from . import app # noqa: F401
16
31
0.65625
from . import app
true
true
1c2e67114bdb46bf67592b33e2fdbd16e1e9438f
5,933
py
Python
tensorflow/python/ops/math_grad_test.py
connectthefuture/tensorflow
93812423fcd5878aa2c1d0b68dc0496980c8519d
[ "Apache-2.0" ]
1
2016-12-12T09:46:14.000Z
2016-12-12T09:46:14.000Z
tensorflow/python/ops/math_grad_test.py
connectthefuture/tensorflow
93812423fcd5878aa2c1d0b68dc0496980c8519d
[ "Apache-2.0" ]
null
null
null
tensorflow/python/ops/math_grad_test.py
connectthefuture/tensorflow
93812423fcd5878aa2c1d0b68dc0496980c8519d
[ "Apache-2.0" ]
1
2019-11-04T11:58:30.000Z
2019-11-04T11:58:30.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.777778
80
0.629698
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf class SquaredDifferenceOpTest(tf.test.TestCase): def _testGrad(self, left_shape, right_shape): if len(left_shape) > len(right_shape): ou...
true
true
1c2e67b756b49f212be2f8f1f244e49bdf436db0
10,309
py
Python
rllib/algorithms/maml/maml.py
Gekho457/ray
bed660b085fa9949bca71160addfc0a69931c64b
[ "Apache-2.0" ]
null
null
null
rllib/algorithms/maml/maml.py
Gekho457/ray
bed660b085fa9949bca71160addfc0a69931c64b
[ "Apache-2.0" ]
null
null
null
rllib/algorithms/maml/maml.py
Gekho457/ray
bed660b085fa9949bca71160addfc0a69931c64b
[ "Apache-2.0" ]
null
null
null
import logging import numpy as np from typing import Type from ray.rllib.utils.sgd import standardized from ray.rllib.agents import with_common_config from ray.rllib.agents.trainer import Trainer from ray.rllib.evaluation.metrics import get_learner_stats from ray.rllib.evaluation.worker_set import WorkerSet from ray.r...
36.299296
88
0.652052
import logging import numpy as np from typing import Type from ray.rllib.utils.sgd import standardized from ray.rllib.agents import with_common_config from ray.rllib.agents.trainer import Trainer from ray.rllib.evaluation.metrics import get_learner_stats from ray.rllib.evaluation.worker_set import WorkerSet from ray.r...
true
true
1c2e67d0008f1ba063945db94e9b653a9657eba1
1,805
py
Python
pelenet/experiments/nestcomparison.py
sagacitysite/pelene
e8d4112264acb44954c52053b4e3f9d63b46bdd6
[ "MIT" ]
10
2021-02-09T16:42:37.000Z
2022-01-10T07:37:00.000Z
pelenet/experiments/nestcomparison.py
sagacitysite/pelene
e8d4112264acb44954c52053b4e3f9d63b46bdd6
[ "MIT" ]
null
null
null
pelenet/experiments/nestcomparison.py
sagacitysite/pelene
e8d4112264acb44954c52053b4e3f9d63b46bdd6
[ "MIT" ]
3
2021-02-10T18:12:31.000Z
2021-09-13T07:40:01.000Z
# Loihi modules import nxsdk.api.n2a as nx # Official modules import numpy as np import logging from copy import deepcopy import os # Pelenet modules from ..system import System from ..system.datalog import Datalog from ..parameters import Parameters from ..utils import Utils from ..plots import Plot from .readout im...
29.590164
114
0.623823
import nxsdk.api.n2a as nx import numpy as np import logging from copy import deepcopy import os from ..system import System from ..system.datalog import Datalog from ..parameters import Parameters from ..utils import Utils from ..plots import Plot from .readout import ReadoutExperiment from ..network import Reser...
true
true
1c2e69214588e0c2a8ef0926fa72d22d8951e59d
39,094
py
Python
cmake/tribits/ci_support/cdash_analyze_and_report.py
jschueller/seacas
14c34ae08b757cba43a3a03ec0f129c8a168a9d3
[ "Python-2.0", "Zlib", "BSD-2-Clause", "MIT", "NetCDF", "BSL-1.0", "X11", "BSD-3-Clause" ]
82
2016-02-04T18:38:25.000Z
2022-03-29T03:01:49.000Z
cmake/tribits/ci_support/cdash_analyze_and_report.py
jschueller/seacas
14c34ae08b757cba43a3a03ec0f129c8a168a9d3
[ "Python-2.0", "Zlib", "BSD-2-Clause", "MIT", "NetCDF", "BSL-1.0", "X11", "BSD-3-Clause" ]
206
2015-11-20T01:57:47.000Z
2022-03-31T21:12:04.000Z
cmake/tribits/ci_support/cdash_analyze_and_report.py
jschueller/seacas
14c34ae08b757cba43a3a03ec0f129c8a168a9d3
[ "Python-2.0", "Zlib", "BSD-2-Clause", "MIT", "NetCDF", "BSL-1.0", "X11", "BSD-3-Clause" ]
68
2016-01-13T22:46:51.000Z
2022-03-31T06:25:05.000Z
#!/usr/bin/env python # @HEADER # ************************************************************************ # # TriBITS: Tribal Build, Integrate, and Test System # Copyright 2013 Sandia Corporation # # Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, # the U.S. Govern...
39.211635
119
0.709521
import sys import pprint import datetime from FindGeneralScriptSupport import * from GeneralScriptSupport import * import CDashQueryAnalyzeReport as CDQAR import cdash_build_testing_date as CBTD from gitdist import addOptionParserChoiceOption usageHelp = r"""cdash_analyze...
true
true
1c2e6992c079c51b2cb74c6f2314e9a5c7023d15
2,904
py
Python
linkedin-automation/index.py
tusharnankani/Social-Scheduler
24975ed280047946359ee29052ab315e701aa6c1
[ "MIT" ]
16
2020-08-10T11:35:30.000Z
2022-02-15T20:38:19.000Z
linkedin-automation/index.py
tusharnankani/Social-Scheduler
24975ed280047946359ee29052ab315e701aa6c1
[ "MIT" ]
73
2020-08-01T23:27:13.000Z
2020-11-03T05:21:22.000Z
linkedin-automation/index.py
tusharnankani/Social-Scheduler
24975ed280047946359ee29052ab315e701aa6c1
[ "MIT" ]
50
2020-08-10T14:14:51.000Z
2021-12-18T08:33:39.000Z
import os,random,sys,time #from urllib.parse import urlparse from selenium import webdriver from bs4 import BeautifulSoup import requests browser = webdriver.Chrome('./driver/chromedriver.exe') browser.get('https://www.linkedin.com/uas/login') file=open('./config.txt') lines=file.readlines() username=lines[0] passwo...
33
103
0.681474
import os,random,sys,time from selenium import webdriver from bs4 import BeautifulSoup import requests browser = webdriver.Chrome('./driver/chromedriver.exe') browser.get('https://www.linkedin.com/uas/login') file=open('./config.txt') lines=file.readlines() username=lines[0] password=lines[1] elementID = browser....
true
true
1c2e6a7ca5d9a4aed44dd6bb4ca4cb9a9faf31d0
204
py
Python
Source_Code/Python/testing6.py
fenglwh/instruments
7886158d1ed97fe6bfe372a55f4fca107e834311
[ "MIT" ]
null
null
null
Source_Code/Python/testing6.py
fenglwh/instruments
7886158d1ed97fe6bfe372a55f4fca107e834311
[ "MIT" ]
3
2018-09-21T00:57:21.000Z
2018-09-21T01:49:40.000Z
Source_Code/Python/testing6.py
fenglwh/instruments
7886158d1ed97fe6bfe372a55f4fca107e834311
[ "MIT" ]
null
null
null
import visa rs=visa.ResourceManager() instrument=rs.open_resource("GPIB::20::INSTR") print('init ok') instrument.write('CONF:WLAN:SIGN1:CONN:CCODe:CCC?') print(instrument.read()) instrument.write('*GTL')
25.5
51
0.759804
import visa rs=visa.ResourceManager() instrument=rs.open_resource("GPIB::20::INSTR") print('init ok') instrument.write('CONF:WLAN:SIGN1:CONN:CCODe:CCC?') print(instrument.read()) instrument.write('*GTL')
true
true
1c2e6d289f4ec58a738045f39a1e1dabf66fac88
1,614
py
Python
tests/test_hashcrypto.py
janbrohl/hashcrypto
ba32a7f43992e25a4b199f7f427fc48f3f237353
[ "BSD-3-Clause" ]
1
2017-03-19T09:13:00.000Z
2017-03-19T09:13:00.000Z
tests/test_hashcrypto.py
janbrohl/hashcrypto
ba32a7f43992e25a4b199f7f427fc48f3f237353
[ "BSD-3-Clause" ]
1
2018-05-12T10:36:53.000Z
2018-05-12T10:36:53.000Z
tests/test_hashcrypto.py
janbrohl/hashcrypto
ba32a7f43992e25a4b199f7f427fc48f3f237353
[ "BSD-3-Clause" ]
null
null
null
from __future__ import print_function, unicode_literals import unittest import hashcrypto import io def notrandom(n,start=0): return bytearray(0xff&i for i in range(start,start+n)) class TestCipherModes(unittest.TestCase): def setUp(self): self.inbytes=notrandom(1000) self.key=notrandom(20) ...
28.821429
62
0.687113
from __future__ import print_function, unicode_literals import unittest import hashcrypto import io def notrandom(n,start=0): return bytearray(0xff&i for i in range(start,start+n)) class TestCipherModes(unittest.TestCase): def setUp(self): self.inbytes=notrandom(1000) self.key=notrandom(20) ...
true
true
1c2e6df6c8dac011078fe392b64fca0a921b7ab0
2,515
py
Python
src/ukw_tools/extern/video_annotations.py
Maddonix/ukw_tools
faaef987d06b232a32745fb497ed705f73f07aa3
[ "MIT" ]
null
null
null
src/ukw_tools/extern/video_annotations.py
Maddonix/ukw_tools
faaef987d06b232a32745fb497ed705f73f07aa3
[ "MIT" ]
null
null
null
src/ukw_tools/extern/video_annotations.py
Maddonix/ukw_tools
faaef987d06b232a32745fb497ed705f73f07aa3
[ "MIT" ]
null
null
null
from bson import ObjectId from ..classes.video_segmentation import VideoSegmentation def convert_extern_annotation(annotation): # video_segmentation = {} annotation_by_label = {} label_annotation_index = {} dates = [_.date for _ in annotation] max_date = max(dates) # create a dict with all lab...
35.928571
93
0.675149
from bson import ObjectId from ..classes.video_segmentation import VideoSegmentation def convert_extern_annotation(annotation): annotation_by_label = {} label_annotation_index = {} dates = [_.date for _ in annotation] max_date = max(dates) for i, _annotation in enumerate(annotation): ...
true
true
1c2e6e24b71793733105f5765e661a2c5fcb9aa6
4,102
py
Python
azure/mgmt/storage/v2015_06_15/operations/usage_operations.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
1
2022-01-25T22:52:58.000Z
2022-01-25T22:52:58.000Z
azure/mgmt/storage/v2015_06_15/operations/usage_operations.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
azure/mgmt/storage/v2015_06_15/operations/usage_operations.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
39.825243
144
0.626524
import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from .. import models class UsageOperations(object): def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer ...
true
true
1c2e6e50911c13e2d434c53394dcaf827b8110e0
1,145
py
Python
constant/DaemonConstant.py
handsomezhou/PyDemo
47bf4a87caba6307ffad557bf7abcbd978604469
[ "Apache-2.0" ]
null
null
null
constant/DaemonConstant.py
handsomezhou/PyDemo
47bf4a87caba6307ffad557bf7abcbd978604469
[ "Apache-2.0" ]
null
null
null
constant/DaemonConstant.py
handsomezhou/PyDemo
47bf4a87caba6307ffad557bf7abcbd978604469
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # @Time : 2021/5/25 # @Author : handsomezhou from util import TimeUtil PY_DEMO_DAEMON_CHECK_INTERVAL_TIME_SEC = int(15) PY_DEMO_CHECK_INTERVAL_TIME_SEC = int(20) #PyDemo心跳时间更新最小间隔时间秒 PY_DEMO_HEARTBEAT_TIME_UPDATE_MIN_INTERVAL_TIME_SEC=int(30) #PyDemo心跳时间更新最小间隔时间毫秒 PY_DEMO_HEARTBEAT_TIME_UPDAT...
38.166667
133
0.908297
from util import TimeUtil PY_DEMO_DAEMON_CHECK_INTERVAL_TIME_SEC = int(15) PY_DEMO_CHECK_INTERVAL_TIME_SEC = int(20) PY_DEMO_HEARTBEAT_TIME_UPDATE_MIN_INTERVAL_TIME_SEC=int(30) PY_DEMO_HEARTBEAT_TIME_UPDATE_MIN_INTERVAL_TIME_MS=TimeUtil.sec2ms(PY_DEMO_HEARTBEAT_TIME_UPDATE_MIN_INTERVAL_TIME_SEC) PY_DEMO_HEARTB...
true
true
1c2e6ebb189720cacb8e35400a05b9d29c27f0fd
2,925
py
Python
bin/fix_requests/fix_request_4208.py
PRIMAVERA-H2020/pre-proc
0c47636cbe32a13a9544f3e5ce9f4c778dc55078
[ "BSD-3-Clause" ]
null
null
null
bin/fix_requests/fix_request_4208.py
PRIMAVERA-H2020/pre-proc
0c47636cbe32a13a9544f3e5ce9f4c778dc55078
[ "BSD-3-Clause" ]
null
null
null
bin/fix_requests/fix_request_4208.py
PRIMAVERA-H2020/pre-proc
0c47636cbe32a13a9544f3e5ce9f4c778dc55078
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python """ fix_request_4208.py EC-Earth-Consortium.*.highresSST-present.r1i1p1f1.6hrPlev.wap4 Set the cell_methods "area: time: mean" """ import argparse import logging.config import sys import django django.setup() from pre_proc_app.models import DataRequest, FileFix __version__ = '0.1.0b1' DEFAU...
25.884956
80
0.571282
import argparse import logging.config import sys import django django.setup() from pre_proc_app.models import DataRequest, FileFix __version__ = '0.1.0b1' DEFAULT_LOG_LEVEL = logging.WARNING DEFAULT_LOG_FORMAT = '%(levelname)s: %(message)s' logger = logging.getLogger(__name__) def parse_args(): parser = ar...
true
true
1c2e6f90232b3e315ce68699f89badcb1998a267
4,622
py
Python
wagtail/admin/menu.py
wlcrs/wagtail
8afbc6c3eccef9eb0f09ed56c54cd36779451882
[ "BSD-3-Clause" ]
3
2019-05-14T13:43:08.000Z
2021-11-09T11:27:18.000Z
wagtail/admin/menu.py
wlcrs/wagtail
8afbc6c3eccef9eb0f09ed56c54cd36779451882
[ "BSD-3-Clause" ]
4
2021-03-19T00:33:36.000Z
2022-03-11T23:47:17.000Z
wagtail/admin/menu.py
wlcrs/wagtail
8afbc6c3eccef9eb0f09ed56c54cd36779451882
[ "BSD-3-Clause" ]
1
2021-08-13T15:38:43.000Z
2021-08-13T15:38:43.000Z
from django.forms import Media, MediaDefiningClass from django.forms.utils import flatatt from django.template.loader import render_to_string from django.templatetags.static import static from django.utils.safestring import mark_safe from django.utils.text import slugify from wagtail.core import hooks class MenuItem...
36.109375
107
0.676763
from django.forms import Media, MediaDefiningClass from django.forms.utils import flatatt from django.template.loader import render_to_string from django.templatetags.static import static from django.utils.safestring import mark_safe from django.utils.text import slugify from wagtail.core import hooks class MenuItem...
true
true
1c2e6fcef6dc4f8cf45a1ffb8f2bd2bb9f47c2d7
1,157
py
Python
dashlib/mnb_makevote.py
chaeplin/dash-mnb
edf965f590de57c4b3ed5136dc46961f2673e41c
[ "MIT" ]
18
2017-02-20T19:38:52.000Z
2021-03-24T23:39:47.000Z
dashlib/mnb_makevote.py
chaeplin/dash-mnb
edf965f590de57c4b3ed5136dc46961f2673e41c
[ "MIT" ]
3
2017-03-10T15:32:34.000Z
2017-12-12T10:58:14.000Z
dashlib/mnb_makevote.py
chaeplin/dash-mnb
edf965f590de57c4b3ed5136dc46961f2673e41c
[ "MIT" ]
5
2017-03-10T22:37:06.000Z
2020-10-22T20:35:26.000Z
import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), '.')) import time import random from dash_utils import * from mnb_misc import * from mnb_signing import * def make_vote( alias, proposal_hash, vote, mnconfig): print('%s : %s : %s ' % (alias, vote, prop...
21.830189
61
0.575627
import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), '.')) import time import random from dash_utils import * from mnb_misc import * from mnb_signing import * def make_vote( alias, proposal_hash, vote, mnconfig): print('%s : %s : %s ' % (alias, vote, prop...
true
true
1c2e711a531de4bb38415cef5b318c047f0e40ef
539
py
Python
cc_vary_header/records/mappings/__init__.py
equadon/cookiecutter-instance-vary-header
6a774f6eceb5bdef07245433eae6702f4306d1ba
[ "MIT" ]
null
null
null
cc_vary_header/records/mappings/__init__.py
equadon/cookiecutter-instance-vary-header
6a774f6eceb5bdef07245433eae6702f4306d1ba
[ "MIT" ]
null
null
null
cc_vary_header/records/mappings/__init__.py
equadon/cookiecutter-instance-vary-header
6a774f6eceb5bdef07245433eae6702f4306d1ba
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2019 CERN. # # CC Vary Header is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Mappings. Mappings define how records and their fields will be indexed in Elasticsearch. The provided record-v1...
31.705882
78
0.764378
from __future__ import absolute_import, print_function
true
true
1c2e717c8a47d6c7d51f81414765e9b73312c608
940
py
Python
boa_test/example/demo/IteratorTest.py
mixbee/neo-boa
da7366c26c7b8e60afb9ac27439a1da37b0be355
[ "MIT" ]
4
2018-08-22T03:30:34.000Z
2019-04-16T10:54:08.000Z
boa_test/example/demo/IteratorTest.py
mixbee/neo-boa
da7366c26c7b8e60afb9ac27439a1da37b0be355
[ "MIT" ]
3
2018-09-03T09:19:26.000Z
2019-01-24T00:06:29.000Z
boa_test/example/demo/IteratorTest.py
mixbee/neo-boa
da7366c26c7b8e60afb9ac27439a1da37b0be355
[ "MIT" ]
12
2018-07-19T06:36:44.000Z
2019-05-13T05:45:58.000Z
from boa.interop.Neo.Iterator import * def Main(testNum): items = { 'a': 1, 'c': 4, 'f': 13 } vals = IterCreate(items) if testNum == 1: while IterNext(vals): print("next!") print("ok done") return True if testNum == 2: cou...
15.932203
38
0.446809
from boa.interop.Neo.Iterator import * def Main(testNum): items = { 'a': 1, 'c': 4, 'f': 13 } vals = IterCreate(items) if testNum == 1: while IterNext(vals): print("next!") print("ok done") return True if testNum == 2: cou...
true
true
1c2e74341ab2c5299f6ccdc750677bace94844cc
874
py
Python
InvenTree/stock/migrations/0057_stock_location_item_owner.py
carlos-riquelme/InvenTree
724dd2a9c82e4c10e14bd6aba8f48553b183fef9
[ "MIT" ]
656
2017-03-29T22:06:14.000Z
2022-03-30T11:23:52.000Z
InvenTree/stock/migrations/0057_stock_location_item_owner.py
carlos-riquelme/InvenTree
724dd2a9c82e4c10e14bd6aba8f48553b183fef9
[ "MIT" ]
1,545
2017-04-10T23:26:04.000Z
2022-03-31T18:32:10.000Z
InvenTree/stock/migrations/0057_stock_location_item_owner.py
fablabbcn/InvenTree
1d7ea7716cc96c6ffd151c822b01cd1fb5dcfecd
[ "MIT" ]
196
2017-03-28T03:06:21.000Z
2022-03-28T11:53:29.000Z
# Generated by Django 3.0.7 on 2021-01-11 21:54 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('users', '0005_owner_model'), ('stock', '0056_stockitem_expiry_date'), ] operations = [ migrations.A...
33.615385
181
0.648741
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('users', '0005_owner_model'), ('stock', '0056_stockitem_expiry_date'), ] operations = [ migrations.AddField( model_name='stockitem', ...
true
true
1c2e79341d86580e2a9ea356f0068245887be687
7,871
py
Python
tf2_gnn/data/jsonl_graph_dataset.py
dahburj/tf2-gnn
ac6247c44957b35a478de4bbe13c0c96e82f0ba1
[ "MIT" ]
null
null
null
tf2_gnn/data/jsonl_graph_dataset.py
dahburj/tf2-gnn
ac6247c44957b35a478de4bbe13c0c96e82f0ba1
[ "MIT" ]
null
null
null
tf2_gnn/data/jsonl_graph_dataset.py
dahburj/tf2-gnn
ac6247c44957b35a478de4bbe13c0c96e82f0ba1
[ "MIT" ]
1
2021-04-22T12:46:26.000Z
2021-04-22T12:46:26.000Z
"""General dataset class for datasets stored as JSONLines files.""" import logging from typing import Any, Dict, Iterator, List, Optional, Tuple, Set import numpy as np from dpu_utils.utils import RichPath from .graph_dataset import DataFold, GraphDataset, GraphSampleType, GraphSample logger = logging.getLogger(__na...
44.721591
99
0.650362
import logging from typing import Any, Dict, Iterator, List, Optional, Tuple, Set import numpy as np from dpu_utils.utils import RichPath from .graph_dataset import DataFold, GraphDataset, GraphSampleType, GraphSample logger = logging.getLogger(__name__) class JsonLGraphDataset(GraphDataset[GraphSampleType]): ...
true
true
1c2e797e399706d5a8b5cbb79669143ef784f79c
1,117
py
Python
setup.py
ragnarok22/ptb-django-cookiecutter
4a06df669052ec24fcca47c01c50bc20fc0a8561
[ "BSD-3-Clause" ]
18
2021-06-23T07:41:26.000Z
2022-02-04T07:56:39.000Z
setup.py
ragnarok22/ptb-django-cookiecutter
4a06df669052ec24fcca47c01c50bc20fc0a8561
[ "BSD-3-Clause" ]
5
2021-07-11T03:24:58.000Z
2021-11-01T20:17:38.000Z
setup.py
ragnarok22/ptb-django-cookiecutter
4a06df669052ec24fcca47c01c50bc20fc0a8561
[ "BSD-3-Clause" ]
7
2021-08-10T20:36:03.000Z
2021-12-13T18:35:57.000Z
# !/usr/bin/env python from distutils.core import setup setup( name='ptb-django-cookiecutter', packages=[], version='0.1.1', description='A simple cookiecutter to create Python Telegram bot, wrapped with Django.', author='Carlos Lugones', license='MIT', author_email='contact@lugodev.com', ...
36.032258
92
0.617726
from distutils.core import setup setup( name='ptb-django-cookiecutter', packages=[], version='0.1.1', description='A simple cookiecutter to create Python Telegram bot, wrapped with Django.', author='Carlos Lugones', license='MIT', author_email='contact@lugodev.com', url='https://github...
true
true
1c2e79ee0b9008d2c20846f2ec4ec284300d3e86
539
py
Python
website2.0/website/urls.py
mrava87/EAGE_Hackatoon_2017
68fbe6922f191e6b15827e47b37f931eaaca3104
[ "MIT" ]
13
2017-06-17T17:49:40.000Z
2021-07-30T17:20:24.000Z
website2.0/website/urls.py
mrava87/EAGE_Hackatoon_2017
68fbe6922f191e6b15827e47b37f931eaaca3104
[ "MIT" ]
1
2017-05-31T16:43:37.000Z
2017-06-01T10:53:48.000Z
website2.0/website/urls.py
mrava87/EAGE_Hackatoon_2017
68fbe6922f191e6b15827e47b37f931eaaca3104
[ "MIT" ]
3
2017-05-31T16:37:59.000Z
2017-10-04T16:19:13.000Z
from django.conf.urls import patterns, include, url from django.contrib import admin from django.conf import settings urlpatterns = patterns('', # Examples: # url(r'^$', 'website.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^$', include('mainapp.urls')), url(r'^upload-',...
28.368421
52
0.627087
from django.conf.urls import patterns, include, url from django.contrib import admin from django.conf import settings urlpatterns = patterns('', url(r'^$', include('mainapp.urls')), url(r'^upload-', include('mainapp.urls')), url(r'^admin/', include(admin.site.urls)), ) urlpatterns += patter...
true
true
1c2e7a1c8137d6dc414e3592f39f7bf82cd596df
3,409
py
Python
settings.py
TheLortex/rust-mcts
10d0700cef7df7059b7cbacc609d173580203fa9
[ "MIT" ]
3
2020-10-24T03:25:16.000Z
2021-06-30T05:36:58.000Z
settings.py
TheLortex/rust-mcts
10d0700cef7df7059b7cbacc609d173580203fa9
[ "MIT" ]
null
null
null
settings.py
TheLortex/rust-mcts
10d0700cef7df7059b7cbacc609d173580203fa9
[ "MIT" ]
1
2021-03-27T09:13:31.000Z
2021-03-27T09:13:31.000Z
def dir_name(config, method): if config.game.kind == "Breakthrough": return "{}-breakthrough-{}".format(method, config.game.size) elif config.game.kind == "Gym": return "{}-gym-{}".format(method, config.game.name) else: print("Unknown game in config file.") exit(-1) def get...
30.711712
119
0.592549
def dir_name(config, method): if config.game.kind == "Breakthrough": return "{}-breakthrough-{}".format(method, config.game.size) elif config.game.kind == "Gym": return "{}-gym-{}".format(method, config.game.name) else: print("Unknown game in config file.") exit(-1) def get...
true
true
1c2e7aa04b523bbaa95397b7ab53e8cdc6334804
3,722
py
Python
timm/scheduler/scheduler_factory.py
RobbieEarle/pytorch-image-models
a43fafef8ca62a6347832d71ade045ae86b8a96f
[ "Apache-2.0" ]
null
null
null
timm/scheduler/scheduler_factory.py
RobbieEarle/pytorch-image-models
a43fafef8ca62a6347832d71ade045ae86b8a96f
[ "Apache-2.0" ]
null
null
null
timm/scheduler/scheduler_factory.py
RobbieEarle/pytorch-image-models
a43fafef8ca62a6347832d71ade045ae86b8a96f
[ "Apache-2.0" ]
1
2021-01-07T15:04:35.000Z
2021-01-07T15:04:35.000Z
""" Scheduler Factory Hacked together by / Copyright 2020 Ross Wightman """ from .cosine_lr import CosineLRScheduler from .tanh_lr import TanhLRScheduler from .step_lr import StepLRScheduler from .plateau_lr import PlateauLRScheduler from torch.optim.lr_scheduler import OneCycleLR import math def create_scheduler(arg...
37.59596
104
0.585975
from .cosine_lr import CosineLRScheduler from .tanh_lr import TanhLRScheduler from .step_lr import StepLRScheduler from .plateau_lr import PlateauLRScheduler from torch.optim.lr_scheduler import OneCycleLR import math def create_scheduler(args, optimizer, dataset_train): num_epochs = args.epochs if getattr(a...
true
true
1c2e7ba7d4fe1255704b12f9560527ef0aa657fb
2,139
py
Python
aesara/compile/compilelock.py
hs2361/aesara
16f98e4fd69db92e0c2cde9dd97a0d005235deea
[ "BSD-3-Clause" ]
null
null
null
aesara/compile/compilelock.py
hs2361/aesara
16f98e4fd69db92e0c2cde9dd97a0d005235deea
[ "BSD-3-Clause" ]
null
null
null
aesara/compile/compilelock.py
hs2361/aesara
16f98e4fd69db92e0c2cde9dd97a0d005235deea
[ "BSD-3-Clause" ]
null
null
null
""" Locking mechanism to ensure no two compilations occur simultaneously in the same compilation directory (which can cause crashes). """ import os import threading import typing from contextlib import contextmanager import filelock from aesara.configdefaults import config __all__ = [ "force_unlock", "lock_...
25.771084
89
0.654511
import os import threading import typing from contextlib import contextmanager import filelock from aesara.configdefaults import config __all__ = [ "force_unlock", "lock_ctx", ] class ThreadFileLocks(threading.local): def __init__(self): self._locks = {} local_mem = ThreadFileLocks() def f...
true
true
1c2e7e382fe94223338339592e2ee6790d0d70e6
3,486
py
Python
homeassistant/components/camera/verisure.py
adolfoeliazat/voidhomecontrol
6d733253811c553912e46e24debec818b28b0688
[ "Apache-2.0" ]
1
2020-08-14T15:01:33.000Z
2020-08-14T15:01:33.000Z
homeassistant/components/camera/verisure.py
adolfoeliazat/voidhomecontrol
6d733253811c553912e46e24debec818b28b0688
[ "Apache-2.0" ]
null
null
null
homeassistant/components/camera/verisure.py
adolfoeliazat/voidhomecontrol
6d733253811c553912e46e24debec818b28b0688
[ "Apache-2.0" ]
1
2020-08-26T20:54:14.000Z
2020-08-26T20:54:14.000Z
""" Camera that loads a picture from a local file. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/camera.verisure/ """ import errno import logging import os from homeassistant.components.camera import Camera from homeassistant.const import EVENT_HOMEASS...
35.212121
74
0.64257
import errno import logging import os from homeassistant.components.camera import Camera from homeassistant.const import EVENT_HOMEASSISTANT_STOP from homeassistant.components.verisure import HUB as hub from homeassistant.components.verisure import CONF_SMARTCAM _LOGGER = logging.getLogger(__name__) def setup_platf...
true
true
1c2e7e3bd7241c6969ca5f5b6f23ddc6d82a0548
201
py
Python
matplotlib/plot()/plot1.py
programmer1017/python
3dce528be121ced032157c9d800b4770989889bf
[ "MIT" ]
null
null
null
matplotlib/plot()/plot1.py
programmer1017/python
3dce528be121ced032157c9d800b4770989889bf
[ "MIT" ]
null
null
null
matplotlib/plot()/plot1.py
programmer1017/python
3dce528be121ced032157c9d800b4770989889bf
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt plt.plot([2, 3, 5, 10]) # plot: 점을 찍는다 .[2, 3, 4, 10]은 y좌표로 간주된다. # 또한 여기서 x좌표는 따로 지정하지 않았기 때문에 자동으로 각각 [0, 1, 2, 3]으로 간주되어 그래프가 그려진다. plt.show() # show: 창에 그래프를 띄운다.
22.333333
68
0.631841
import matplotlib.pyplot as plt plt.plot([2, 3, 5, 10]) plt.show()
true
true
1c2e7eccd1f9668a71a63ddb467c7d69dbc9acc0
2,447
py
Python
src/git_portfolio/use_cases/git_use_case.py
admdev8/git-portfolio
4269923bac2d31c9058b76bb6facfdadd4045603
[ "MIT" ]
1
2020-10-19T13:11:32.000Z
2020-10-19T13:11:32.000Z
src/git_portfolio/use_cases/git_use_case.py
admdev8/git-portfolio
4269923bac2d31c9058b76bb6facfdadd4045603
[ "MIT" ]
179
2020-12-15T06:37:58.000Z
2022-03-31T08:06:51.000Z
src/git_portfolio/use_cases/git_use_case.py
admdev8/git-portfolio
4269923bac2d31c9058b76bb6facfdadd4045603
[ "MIT" ]
null
null
null
"""Local git use case.""" import os import pathlib import subprocess # noqa: S404 from typing import List from typing import Tuple from typing import Union import git_portfolio.response_objects as res class GitUseCase: """Execution of git use case.""" def __init__(self) -> None: """Constructor.""" ...
33.986111
87
0.541479
import os import pathlib import subprocess from typing import List from typing import Tuple from typing import Union import git_portfolio.response_objects as res class GitUseCase: def __init__(self) -> None: self.err_output = self._check_git_install() @staticmethod def _check_git_install() ->...
true
true
1c2e7fe6679d6cec764138b6a3d8661cf7766095
2,645
py
Python
UVa Online Judge/v3/397.py
mjenrungrot/algorithm
e0e8174eb133ba20931c2c7f5c67732e4cb2b703
[ "MIT" ]
1
2021-12-08T08:58:43.000Z
2021-12-08T08:58:43.000Z
UVa Online Judge/v3/397.py
mjenrungrot/algorithm
e0e8174eb133ba20931c2c7f5c67732e4cb2b703
[ "MIT" ]
null
null
null
UVa Online Judge/v3/397.py
mjenrungrot/algorithm
e0e8174eb133ba20931c2c7f5c67732e4cb2b703
[ "MIT" ]
null
null
null
# ============================================================================= # Author: Teerapat Jenrungrot - https://github.com/mjenrungrot/ # FileName: 397.py # Description: UVa Online Judge - 397 # ============================================================================= def parse_numb...
23.201754
79
0.404537
def parse_number(x, offset): output = "" curr = offset while curr < len(x): if x[curr] == " ": curr += 1 continue if len(output) == 0 and x[curr] in "-+": output += x[curr] curr += 1 elif x[curr].isdigit(): output +...
true
true
1c2e81898fee54dc6d2391d56188977c7058f6de
873
py
Python
String/AlgoExpert/Medium/10_minimum-characters-for-words.py
sounak95/100_days_of_code
50fbf088ce6ab2137aa216a30e3b3f828b278a22
[ "Apache-2.0" ]
null
null
null
String/AlgoExpert/Medium/10_minimum-characters-for-words.py
sounak95/100_days_of_code
50fbf088ce6ab2137aa216a30e3b3f828b278a22
[ "Apache-2.0" ]
null
null
null
String/AlgoExpert/Medium/10_minimum-characters-for-words.py
sounak95/100_days_of_code
50fbf088ce6ab2137aa216a30e3b3f828b278a22
[ "Apache-2.0" ]
null
null
null
def countCharFreq(string): charFreq={} for ch in string: if ch in charFreq: charFreq[ch]+=1 else: charFreq[ch]=1 return charFreq def updateMaxFreq(charFreq, maxCharFreq): for ch in charFreq: if ch in maxCharFreq: maxCharFreq[ch]= max(charF...
20.302326
79
0.60252
def countCharFreq(string): charFreq={} for ch in string: if ch in charFreq: charFreq[ch]+=1 else: charFreq[ch]=1 return charFreq def updateMaxFreq(charFreq, maxCharFreq): for ch in charFreq: if ch in maxCharFreq: maxCharFreq[ch]= max(charF...
true
true
1c2e829f76a0ecd0a9354921fb8cf2b2cf7783c3
447
py
Python
tools/python/boutiques/tests/test_pprint.py
jerdra/boutiques
f6ee252fd1332ec686dc76dc12e52a0d69c685c3
[ "MIT" ]
null
null
null
tools/python/boutiques/tests/test_pprint.py
jerdra/boutiques
f6ee252fd1332ec686dc76dc12e52a0d69c685c3
[ "MIT" ]
null
null
null
tools/python/boutiques/tests/test_pprint.py
jerdra/boutiques
f6ee252fd1332ec686dc76dc12e52a0d69c685c3
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import os.path as op from unittest import TestCase from boutiques import __file__ as bfile from six import string_types import boutiques as bosh class TestPPrint(TestCase): def test_doesntcrash(self): fil = op.join(op.split(bfile)[0], 'schema/example...
24.833333
63
0.711409
import os import os.path as op from unittest import TestCase from boutiques import __file__ as bfile from six import string_types import boutiques as bosh class TestPPrint(TestCase): def test_doesntcrash(self): fil = op.join(op.split(bfile)[0], 'schema/examples/test_pretty_print.j...
true
true
1c2e8320ab12fd5dfaf27f520054c3b13732220f
919
py
Python
funcional.py
ludimila/LearnFunctionalPython
80275371d1c6cee5a17ab98e1c36242ffeb4644c
[ "MIT" ]
null
null
null
funcional.py
ludimila/LearnFunctionalPython
80275371d1c6cee5a17ab98e1c36242ffeb4644c
[ "MIT" ]
null
null
null
funcional.py
ludimila/LearnFunctionalPython
80275371d1c6cee5a17ab98e1c36242ffeb4644c
[ "MIT" ]
null
null
null
#open #filter tirar linhas em branco - filter #map #map remove new lines #lower #map remove punctuation from functools import partial from string import punctuation from re import sub from collections import Counter #from multprocessing.dummy import Pool def pipe(*funcs): def inner(arg): result = arg ...
20.886364
78
0.681175
from functools import partial from string import punctuation from re import sub from collections import Counter def pipe(*funcs): def inner(arg): result = arg for func in funcs: result = func(result) return result return inner remove_blank_lines = partial(filte...
true
true
1c2e8380043de9ea543efb9b099a5d397f7be960
4,030
py
Python
onnx/backend/test/case/node/bitshift.py
How-Wang/onnx
c940fa3fea84948e46603cab2f86467291443beb
[ "Apache-2.0" ]
1
2022-02-04T07:45:14.000Z
2022-02-04T07:45:14.000Z
onnx/backend/test/case/node/bitshift.py
How-Wang/onnx
c940fa3fea84948e46603cab2f86467291443beb
[ "Apache-2.0" ]
null
null
null
onnx/backend/test/case/node/bitshift.py
How-Wang/onnx
c940fa3fea84948e46603cab2f86467291443beb
[ "Apache-2.0" ]
null
null
null
# SPDX-License-Identifier: Apache-2.0 from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np # type: ignore import onnx from ..base import Base from . import expect class BitShift(Base): @staticme...
29.632353
50
0.507196
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np import onnx from ..base import Base from . import expect class BitShift(Base): @staticmethod def export_right_unit8() -> None: ...
true
true