hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f700405ef3096905f3ac4c83f8ec59ec74c727e1
1,339
py
Python
bugbounty/settings_utils.py
18F/tts-bug-bounty-dashboard
a9be81ff3eaf25db3192b64b5580764db9555dec
[ "CC0-1.0" ]
7
2017-07-15T13:48:00.000Z
2021-04-16T23:55:43.000Z
bugbounty/settings_utils.py
18F/tts-bug-bounty-dashboard
a9be81ff3eaf25db3192b64b5580764db9555dec
[ "CC0-1.0" ]
35
2017-06-19T16:15:20.000Z
2019-05-21T15:37:15.000Z
bugbounty/settings_utils.py
18F/tts-bug-bounty-dashboard
a9be81ff3eaf25db3192b64b5580764db9555dec
[ "CC0-1.0" ]
3
2017-07-14T02:37:40.000Z
2017-07-22T18:22:43.000Z
import os import json Environ = os._Environ def is_on_cloudfoundry(env: Environ=os.environ) -> bool: return 'VCAP_SERVICES' in env def load_cups_from_vcap_services(name: str, env: Environ=os.environ) -> None: ''' Detects if VCAP_SERVICES exists in the environment; if so, parses it and imports all t...
31.139535
78
0.65422
import os import json Environ = os._Environ def is_on_cloudfoundry(env: Environ=os.environ) -> bool: return 'VCAP_SERVICES' in env def load_cups_from_vcap_services(name: str, env: Environ=os.environ) -> None: if not is_on_cloudfoundry(env): return vcap = json.loads(env['VCAP_SERVICES']) ...
true
true
f70043a615333f2ac090006c4d192287d490deb1
2,723
py
Python
tvml/mongostats.py
pazlvbanke/tvmlopen
740afdb4982768cbcde7c7d5c8f3d09dbae81111
[ "MIT" ]
null
null
null
tvml/mongostats.py
pazlvbanke/tvmlopen
740afdb4982768cbcde7c7d5c8f3d09dbae81111
[ "MIT" ]
4
2020-03-20T10:55:56.000Z
2020-03-20T12:12:45.000Z
tvml/mongostats.py
pazlvbanke/tvmlopen
740afdb4982768cbcde7c7d5c8f3d09dbae81111
[ "MIT" ]
1
2020-03-20T10:21:55.000Z
2020-03-20T10:21:55.000Z
from pymongo import MongoClient from pymongo import ReadPreference from datetime import datetime, timedelta class Mongo(MongoClient): def __init__(self, username, password, host, db='tags', collection='tweets_pipeline_v2'): uri = f"mongodb://{username}:{password}@{host}/{db}" super(Mongo, self)._...
36.306667
93
0.607051
from pymongo import MongoClient from pymongo import ReadPreference from datetime import datetime, timedelta class Mongo(MongoClient): def __init__(self, username, password, host, db='tags', collection='tweets_pipeline_v2'): uri = f"mongodb://{username}:{password}@{host}/{db}" super(Mongo, self)._...
true
true
f70044103ae2198905b5fb0cb3bb0f501d542759
984
py
Python
examples/_test_all.py
likianta/lk-lambdex
e9b5f96ea94c4b0fe25fd8adc7195e7366d26a6e
[ "MIT" ]
null
null
null
examples/_test_all.py
likianta/lk-lambdex
e9b5f96ea94c4b0fe25fd8adc7195e7366d26a6e
[ "MIT" ]
null
null
null
examples/_test_all.py
likianta/lk-lambdex
e9b5f96ea94c4b0fe25fd8adc7195e7366d26a6e
[ "MIT" ]
null
null
null
from lk_logger import lk from examples import t01_simple_examples as t01 from examples import t02_referencing as t02 from examples import t03_fibonacci as t03 from examples import t04_catch_exceptions as t04 from examples import t05_qt_button_click_event as t05 from examples import t06_lambdex_kwargs as t06 """ Rules...
30.75
58
0.539634
from lk_logger import lk from examples import t01_simple_examples as t01 from examples import t02_referencing as t02 from examples import t03_fibonacci as t03 from examples import t04_catch_exceptions as t04 from examples import t05_qt_button_click_event as t05 from examples import t06_lambdex_kwargs as t06 if __nam...
true
true
f700452101a3e4977fe2100fac23e05462b4fec1
2,279
py
Python
Machine Learning A-Z Template Folder/Part 2 - Regression/Section 5 - Multiple Linear Regression/data_preprocessing_template.py
ManjunathaPatkar/Machine-Learning
f1c6ec1a9f802f6e88ed67c0da6c1e9373790537
[ "MIT" ]
null
null
null
Machine Learning A-Z Template Folder/Part 2 - Regression/Section 5 - Multiple Linear Regression/data_preprocessing_template.py
ManjunathaPatkar/Machine-Learning
f1c6ec1a9f802f6e88ed67c0da6c1e9373790537
[ "MIT" ]
null
null
null
Machine Learning A-Z Template Folder/Part 2 - Regression/Section 5 - Multiple Linear Regression/data_preprocessing_template.py
ManjunathaPatkar/Machine-Learning
f1c6ec1a9f802f6e88ed67c0da6c1e9373790537
[ "MIT" ]
null
null
null
# Data Preprocessing Template # Importing the libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd # Importing the dataset dataset = pd.read_csv('50_Startups.csv') X = dataset.iloc[:, :-1].values y = dataset.iloc[:, 4].values #encoding independent variable state #from sklearn.preprocessin...
24.244681
92
0.746819
import numpy as np import matplotlib.pyplot as plt import pandas as pd dataset = pd.read_csv('50_Startups.csv') X = dataset.iloc[:, :-1].values y = dataset.iloc[:, 4].values from sklearn.preprocessing import LabelEncoder,OneHotEncoder from sklearn.compose import ColumnTransformer ct = ColumnTransformer([(...
true
true
f70045418bc49a61f9a7a48205189a79ca91e491
85,068
py
Python
tools/ci_build/build.py
marijnfs/onnxruntime
6e1eb4b0efca9644c5f8979fbded9416fdd722dc
[ "MIT" ]
1
2019-01-15T18:10:37.000Z
2019-01-15T18:10:37.000Z
tools/ci_build/build.py
marijnfs/onnxruntime
6e1eb4b0efca9644c5f8979fbded9416fdd722dc
[ "MIT" ]
null
null
null
tools/ci_build/build.py
marijnfs/onnxruntime
6e1eb4b0efca9644c5f8979fbded9416fdd722dc
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import argparse import glob import multiprocessing import os import re import shutil import subprocess import sys import hashlib from logger import log class BaseError(Exception): """Base class fo...
43.557604
119
0.613627
import argparse import glob import multiprocessing import os import re import shutil import subprocess import sys import hashlib from logger import log class BaseError(Exception): pass class BuildError(BaseError): def __init__(self, *messages): super().__init__("\n".join(messages)) class Usag...
true
true
f70045804ab2dc1175a34896e20405f1777bd9de
3,755
py
Python
acme/agents/jax/dqn/config.py
nrocketmann/acme-intrinsic
ce90aa15ec785a8618a2505410ab6b9f1f9b5a32
[ "Apache-2.0" ]
null
null
null
acme/agents/jax/dqn/config.py
nrocketmann/acme-intrinsic
ce90aa15ec785a8618a2505410ab6b9f1f9b5a32
[ "Apache-2.0" ]
null
null
null
acme/agents/jax/dqn/config.py
nrocketmann/acme-intrinsic
ce90aa15ec785a8618a2505410ab6b9f1f9b5a32
[ "Apache-2.0" ]
null
null
null
# python3 # Copyright 2018 DeepMind Technologies Limited. 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 re...
42.191011
78
0.747537
import dataclasses from acme.adders import reverb as adders_reverb import numpy as np @dataclasses.dataclass class DQNConfig: epsilon: float = 0.05 seed: int = 1 learning_rate: float = 1e-3 adam_eps: float = 1e-8 discount: float = 0.99 n_step: int = 5 target_update_pe...
true
true
f7004704fef6b4c992ee9e18c045004750d66571
587
py
Python
core/learnable_priors/normal_prior.py
insilicomedicine/TRIP
5e7b9da298aa47a71c71e1144ff1d8e538dbccaa
[ "MIT" ]
25
2019-10-29T02:06:03.000Z
2021-04-12T03:14:21.000Z
core/learnable_priors/normal_prior.py
insilicomedicine/TRIP
5e7b9da298aa47a71c71e1144ff1d8e538dbccaa
[ "MIT" ]
1
2020-12-23T01:51:18.000Z
2020-12-23T01:51:18.000Z
core/learnable_priors/normal_prior.py
insilicomedicine/TRIP
5e7b9da298aa47a71c71e1144ff1d8e538dbccaa
[ "MIT" ]
4
2020-01-05T17:32:54.000Z
2020-11-18T05:24:37.000Z
import torch from torch import nn from torch.distributions import MultivariateNormal class Normal(nn.Module): def __init__(self, num_vars=100): super(Normal, self).__init__() self.num_vars = num_vars self.means = nn.Parameter(torch.zeros(num_vars)) self.std = nn.Parameter(torch.ey...
27.952381
56
0.684838
import torch from torch import nn from torch.distributions import MultivariateNormal class Normal(nn.Module): def __init__(self, num_vars=100): super(Normal, self).__init__() self.num_vars = num_vars self.means = nn.Parameter(torch.zeros(num_vars)) self.std = nn.Parameter(torch.ey...
true
true
f70047cdafe4dcd083f47814ee7d17be097fee36
2,338
py
Python
algorithms/quicksort.py
not-sponsored/Guide-to-Data-Structures-and-Algorithms-Exercises
a905298c594a826e558cd1c94876b632db5d4d11
[ "Fair" ]
null
null
null
algorithms/quicksort.py
not-sponsored/Guide-to-Data-Structures-and-Algorithms-Exercises
a905298c594a826e558cd1c94876b632db5d4d11
[ "Fair" ]
null
null
null
algorithms/quicksort.py
not-sponsored/Guide-to-Data-Structures-and-Algorithms-Exercises
a905298c594a826e558cd1c94876b632db5d4d11
[ "Fair" ]
null
null
null
import sys class SortableArray(): def __init__(self, arr): self.arr = arr def partition(self, left, right): # choose right most as pivot pivot_index = right # get pivot value for compares pivot = self.arr[pivot_index] right -= 1 print(f'left orig: {left} right orig: {right}') while True: # move...
28.168675
79
0.671514
import sys class SortableArray(): def __init__(self, arr): self.arr = arr def partition(self, left, right): pivot_index = right pivot = self.arr[pivot_index] right -= 1 print(f'left orig: {left} right orig: {right}') while True: while self.arr[left] < pivot: print(f'left: {left}') ...
true
true
f70049a506cae229d8102cddf51c76a5b5acadbc
18,069
py
Python
dit/math/ops.py
Ejjaffe/dit
c9d206f03d1de5a0a298b1d0ea9d79ea5e789ee1
[ "BSD-3-Clause" ]
1
2020-03-13T10:30:11.000Z
2020-03-13T10:30:11.000Z
dit/math/ops.py
Ejjaffe/dit
c9d206f03d1de5a0a298b1d0ea9d79ea5e789ee1
[ "BSD-3-Clause" ]
null
null
null
dit/math/ops.py
Ejjaffe/dit
c9d206f03d1de5a0a298b1d0ea9d79ea5e789ee1
[ "BSD-3-Clause" ]
null
null
null
""" Classes to contextualize math operations in log vs linear space. """ from types import MethodType import numpy as np from ..exceptions import InvalidBase __all__ = ( 'get_ops', 'LinearOperations', 'LogOperations', ) # For 2.x, these are ascii strings. For 3.x these are unicode strings. acceptable...
24.05992
82
0.517295
from types import MethodType import numpy as np from ..exceptions import InvalidBase __all__ = ( 'get_ops', 'LinearOperations', 'LogOperations', ) acceptable_base_strings = {'linear', 'e'} def get_ops(base): if base in cache: ops = cache[base] else: # This assumes that ...
true
true
f70049a62ff8108e599465f06904de5438b65282
19,426
py
Python
release/scripts/modules/bl_i18n_utils/utils_spell_check.py
lordloki/upbge
18d0f5419cc1338ecf739362afef56bd96b42cfb
[ "Naumen", "Condor-1.1", "MS-PL" ]
1
2022-01-11T10:02:21.000Z
2022-01-11T10:02:21.000Z
release/scripts/modules/bl_i18n_utils/utils_spell_check.py
lordloki/upbge
18d0f5419cc1338ecf739362afef56bd96b42cfb
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
release/scripts/modules/bl_i18n_utils/utils_spell_check.py
lordloki/upbge
18d0f5419cc1338ecf739362afef56bd96b42cfb
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
23.20908
103
0.438279
"derivate", "deterministically", "doesn", "duplications", "effector", "equi", # equi-angular, etc. "fader", "globbing", "hasn", # hasn't "hetero", "hoc", "incompressible", "indices", "instantiation", "i...
true
true
f7004a6a9da6e184c08cdd829e3bc4d6ac4c80b7
12,774
py
Python
scripts/sphere/register.py
NingAnMe/voxelmorph
3a1a4c2f456af2dba5552efc1b08c68af38e54dc
[ "Apache-2.0" ]
null
null
null
scripts/sphere/register.py
NingAnMe/voxelmorph
3a1a4c2f456af2dba5552efc1b08c68af38e54dc
[ "Apache-2.0" ]
null
null
null
scripts/sphere/register.py
NingAnMe/voxelmorph
3a1a4c2f456af2dba5552efc1b08c68af38e54dc
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ Example script to register two volumes with VoxelMorph models. Please make sure to use trained models appropriately. Let's say we have a model trained to register a scan (moving) to an atlas (fixed). To register a scan to the atlas and save the warp field, run: register.py --moving mov...
35.287293
120
0.702129
import os import argparse import matplotlib.pyplot as plt import numpy as np import nibabel as nib import torch from scipy.interpolate import RegularGridInterpolator from astropy.coordinates import cartesian_to_spherical, spherical_to_cartesian os.environ['VXM_BACKEND'] = 'sphere' import voxelmorph as vxm impor...
true
true
f7004b5c8eda4fe476b1e7d12428eec65275cd45
13,707
py
Python
src/pymor/reductors/residual.py
meretp/pymor
0965a5c3d0725466103efae5190493fceb2bf441
[ "Unlicense" ]
182
2015-01-06T16:12:45.000Z
2022-03-22T09:24:45.000Z
src/pymor/reductors/residual.py
meretp/pymor
0965a5c3d0725466103efae5190493fceb2bf441
[ "Unlicense" ]
1,305
2015-01-06T15:02:31.000Z
2022-03-29T14:58:28.000Z
src/pymor/reductors/residual.py
HenKlei/pymor
01876cd39e04bec6d4299f36b59663cd08beafd3
[ "Unlicense" ]
68
2015-01-06T11:13:20.000Z
2022-03-21T18:07:42.000Z
# This file is part of the pyMOR project (https://www.pymor.org). # Copyright 2013-2021 pyMOR developers and contributors. All rights reserved. # License: BSD 2-Clause License (https://opensource.org/licenses/BSD-2-Clause) import numpy as np from pymor.algorithms.image import estimate_image_hierarchical from pymor.al...
43.376582
120
0.625885
import numpy as np from pymor.algorithms.image import estimate_image_hierarchical from pymor.algorithms.projection import project, project_to_subbasis from pymor.core.base import BasicObject from pymor.core.exceptions import ImageCollectionError from pymor.operators.constructions import ZeroOperator from pymor.ope...
true
true
f7004c81dd586096d66ee40abfa3ddd193a494db
7,828
py
Python
rain_api_core/egress_util.py
asfadmin/rain-api-core
99985d4a346ab06449a42ed6b5b91f36d2bc760a
[ "Apache-2.0" ]
1
2020-05-06T22:01:22.000Z
2020-05-06T22:01:22.000Z
rain_api_core/egress_util.py
asfadmin/rain-api-core
99985d4a346ab06449a42ed6b5b91f36d2bc760a
[ "Apache-2.0" ]
87
2019-09-16T20:45:59.000Z
2022-03-31T21:18:44.000Z
rain_api_core/egress_util.py
asfadmin/rain-api-core
99985d4a346ab06449a42ed6b5b91f36d2bc760a
[ "Apache-2.0" ]
2
2020-05-06T22:01:29.000Z
2021-03-23T18:22:52.000Z
import logging import hmac from hashlib import sha256 import os import urllib from datetime import datetime log = logging.getLogger(__name__) # This warning is stupid # pylint: disable=logging-fstring-interpolation def prepend_bucketname(name): prefix = os.getenv('BUCKETNAME_PREFIX', "gsfc-ngap-{}-".format(os.g...
37.454545
122
0.649974
import logging import hmac from hashlib import sha256 import os import urllib from datetime import datetime log = logging.getLogger(__name__) def prepend_bucketname(name): prefix = os.getenv('BUCKETNAME_PREFIX', "gsfc-ngap-{}-".format(os.getenv('MATURITY', 'DEV')[0:1].lower())) return "{}{}".format(prefix...
true
true
f7004e07d39bc89734abdba71f14d69e5287529e
871
py
Python
app/main/views.py
stephane-evrard/IP4_News
866855710cbdc51f02d0d10b09971121affeafe9
[ "Unlicense" ]
null
null
null
app/main/views.py
stephane-evrard/IP4_News
866855710cbdc51f02d0d10b09971121affeafe9
[ "Unlicense" ]
null
null
null
app/main/views.py
stephane-evrard/IP4_News
866855710cbdc51f02d0d10b09971121affeafe9
[ "Unlicense" ]
null
null
null
from flask import render_template,request,redirect,url_for from . import main from ..requests import get_sources,get_articles from ..models import Sources #views @main.route('/') def index(): ''' view root page function that returns the index the page and its data ''' sources = get_sources('business') sports_sour...
31.107143
188
0.762342
from flask import render_template,request,redirect,url_for from . import main from ..requests import get_sources,get_articles from ..models import Sources @main.route('/') def index(): sources = get_sources('business') sports_sources = get_sources('sports') technology_sources = get_sources('technology') entertain...
true
true
f7004e17940f340a8654a088ad8c1a3611a4bb3f
3,415
py
Python
polyaxon_schemas/ml/layers/wrappers.py
granularai/polyaxon-schemas
017ae74701f21f12f0b25e75379681ea5d8baa9e
[ "MIT" ]
null
null
null
polyaxon_schemas/ml/layers/wrappers.py
granularai/polyaxon-schemas
017ae74701f21f12f0b25e75379681ea5d8baa9e
[ "MIT" ]
null
null
null
polyaxon_schemas/ml/layers/wrappers.py
granularai/polyaxon-schemas
017ae74701f21f12f0b25e75379681ea5d8baa9e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from marshmallow import fields from polyaxon_schemas.ml.layers.base import BaseLayerConfig, BaseLayerSchema class WrapperSchema(BaseLayerSchema): layer = fields.Nested('LayerSchema') @staticmethod def schema_config...
25.296296
88
0.652709
from __future__ import absolute_import, division, print_function from marshmallow import fields from polyaxon_schemas.ml.layers.base import BaseLayerConfig, BaseLayerSchema class WrapperSchema(BaseLayerSchema): layer = fields.Nested('LayerSchema') @staticmethod def schema_config(): return Wrap...
true
true
f7004f189ed755c741a1e9adf7075481f0a47ecb
719
py
Python
conftest.py
DedMazzai/feedback-form
37d0b18a97af43469050be4a8351198521e7f445
[ "Apache-2.0" ]
null
null
null
conftest.py
DedMazzai/feedback-form
37d0b18a97af43469050be4a8351198521e7f445
[ "Apache-2.0" ]
null
null
null
conftest.py
DedMazzai/feedback-form
37d0b18a97af43469050be4a8351198521e7f445
[ "Apache-2.0" ]
null
null
null
import pytest from pages.aplication import Application def pytest_addoption(parser): parser.addoption('--browser_name', action='store', default="chrome", help="Choose browser: chrome or firefox") parser.addoption('--base_url', action='store', default='https://prodoctorov.ru/new/rate/doctor/12/' ...
34.238095
114
0.713491
import pytest from pages.aplication import Application def pytest_addoption(parser): parser.addoption('--browser_name', action='store', default="chrome", help="Choose browser: chrome or firefox") parser.addoption('--base_url', action='store', default='https://prodoctorov.ru/new/rate/doctor/12/' ...
true
true
f7004f7c1cf7e6495b7823fbbf31d91eda9a6100
2,036
py
Python
src/optimModels/utils/constantes.py
BioSystemsUM/optimModels
41e8ec5e99a66052fc8b547b60f979d2a2fd669d
[ "Apache-2.0" ]
1
2020-01-09T08:58:05.000Z
2020-01-09T08:58:05.000Z
src/optimModels/utils/constantes.py
BioSystemsUM/optimModels
41e8ec5e99a66052fc8b547b60f979d2a2fd669d
[ "Apache-2.0" ]
null
null
null
src/optimModels/utils/constantes.py
BioSystemsUM/optimModels
41e8ec5e99a66052fc8b547b60f979d2a2fd669d
[ "Apache-2.0" ]
2
2020-01-16T16:15:28.000Z
2020-01-21T16:31:20.000Z
class optimType: REACTION_KO = 1 REACTION_UO = 2 GENE_KO = 3 GENE_UO = 4 MEDIUM = 5 MEDIUM_LEVELS = 6 MEDIUM_REACTION_KO = 7 MEDIUM_REACTION_UO = 8 COMPOSITION = 9 PROTEIN_KO = 10 PROTEIN_UO = 11 types = {1:"Reaction Knockouts",2:"Reaction Under/Over expression", 3:"Gene...
27.146667
111
0.59332
class optimType: REACTION_KO = 1 REACTION_UO = 2 GENE_KO = 3 GENE_UO = 4 MEDIUM = 5 MEDIUM_LEVELS = 6 MEDIUM_REACTION_KO = 7 MEDIUM_REACTION_UO = 8 COMPOSITION = 9 PROTEIN_KO = 10 PROTEIN_UO = 11 types = {1:"Reaction Knockouts",2:"Reaction Under/Over expression", 3:"Gene...
true
true
f70050160877a22962c4c5bcea97ccc0f2832657
997
py
Python
backend/app/app/schemas/dataroom.py
saschajullmann/sedotra
aaa38f6d533daa725a7037a8c446da978ffafa7d
[ "MIT" ]
null
null
null
backend/app/app/schemas/dataroom.py
saschajullmann/sedotra
aaa38f6d533daa725a7037a8c446da978ffafa7d
[ "MIT" ]
null
null
null
backend/app/app/schemas/dataroom.py
saschajullmann/sedotra
aaa38f6d533daa725a7037a8c446da978ffafa7d
[ "MIT" ]
null
null
null
from enum import Enum from typing import Optional from uuid import UUID from pydantic import BaseModel from app.models import User, Organization class DataRoomBase(BaseModel): name: Optional[str] = None description: Optional[str] = None class DataRoomCreateRequest(DataRoomBase): name: str class Data...
17.189655
44
0.716148
from enum import Enum from typing import Optional from uuid import UUID from pydantic import BaseModel from app.models import User, Organization class DataRoomBase(BaseModel): name: Optional[str] = None description: Optional[str] = None class DataRoomCreateRequest(DataRoomBase): name: str class Data...
true
true
f70052f70cc24783258d4832724f32f148a9ec92
1,470
py
Python
xhs_wechat_noteid_script.py
HhhuYu/xhs_simple_crawler
7612d3a7eff7d4b2ded8bbb54bf05f201c607e22
[ "MIT" ]
70
2019-04-12T09:17:53.000Z
2020-12-13T07:33:48.000Z
xhs_wechat_noteid_script.py
redoubtei/xhs_simple_crawler
7612d3a7eff7d4b2ded8bbb54bf05f201c607e22
[ "MIT" ]
1
2019-04-18T15:39:16.000Z
2019-05-17T04:09:36.000Z
xhs_wechat_noteid_script.py
redoubtei/xhs_simple_crawler
7612d3a7eff7d4b2ded8bbb54bf05f201c607e22
[ "MIT" ]
23
2019-05-14T09:36:00.000Z
2020-11-30T11:32:36.000Z
import json import pymongo from config import * def response(flow): global collection client = pymongo.MongoClient(MONGO_URL) db = client[WECHAT_XHS_MONGO_DB] collection = db[WECHAT_XHS_NOTE_MONGO_COLLECTION] url1 = 'https://www.xiaohongshu.com/sapi/wx_mp_api/sns/v1/search/notes?' ...
27.735849
77
0.512925
import json import pymongo from config import * def response(flow): global collection client = pymongo.MongoClient(MONGO_URL) db = client[WECHAT_XHS_MONGO_DB] collection = db[WECHAT_XHS_NOTE_MONGO_COLLECTION] url1 = 'https://www.xiaohongshu.com/sapi/wx_mp_api/sns/v1/search/notes?' ...
true
true
f7005399cea08f14e2a5c830358e28def1a4179c
2,362
py
Python
TradingAlgorythm.py
b00v1ne/TrBot11
01d156f6c01cfb167aa3a38186402d4c7c4ff818
[ "MIT" ]
null
null
null
TradingAlgorythm.py
b00v1ne/TrBot11
01d156f6c01cfb167aa3a38186402d4c7c4ff818
[ "MIT" ]
null
null
null
TradingAlgorythm.py
b00v1ne/TrBot11
01d156f6c01cfb167aa3a38186402d4c7c4ff818
[ "MIT" ]
null
null
null
import json from datetime import datetime, timedelta from bittrex.bittrex import Bittrex def TradingAlorythm(command, market, amount, coinname, step, stoploss, key, secret): TestTrading = Bittrex(key, secret) period = timedelta(seconds=20) next_tick = datetime.now() + period seconds = 20 firstCycl...
38.721311
84
0.506351
import json from datetime import datetime, timedelta from bittrex.bittrex import Bittrex def TradingAlorythm(command, market, amount, coinname, step, stoploss, key, secret): TestTrading = Bittrex(key, secret) period = timedelta(seconds=20) next_tick = datetime.now() + period seconds = 20 firstCycl...
true
true
f70053d83788a2e90b07b78a54f2c2a35ef9b934
2,044
py
Python
flash.py
segrids/arduino_due
f375020b81459eae9b325aa3646ff84efc2853e8
[ "MIT" ]
3
2021-08-20T16:03:37.000Z
2022-03-23T20:23:30.000Z
flash.py
segrids/testbench
f375020b81459eae9b325aa3646ff84efc2853e8
[ "MIT" ]
null
null
null
flash.py
segrids/testbench
f375020b81459eae9b325aa3646ff84efc2853e8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """flash.py Usage: flash.py [<image>] [options] flash.py (-h | --help) Options: -h --help Show this screen. --target=<target> Select the target device [default: SAM3x8e]. --erase Erase the target before flashing. --port=<p> Target device port [default: t...
30.507463
91
0.572407
from sys import exit, stdout import time from docopt import docopt from py.uart import Serial from py import * if __name__ == '__main__': args = docopt(__doc__) target = args['--target'] image = args['<image>'] port = '/dev/' + args['--port'] plane = int(args['--plane']) bootloader = args['-...
true
true
f700541898a7e9b3e0e2a00fccab8f254ebb8886
28,007
py
Python
tests/functional/test_managesf.py
earlren1014/RedHat-Software-Factory
dd50eba4e353945886ebceb5dd608179d608b956
[ "Apache-2.0" ]
null
null
null
tests/functional/test_managesf.py
earlren1014/RedHat-Software-Factory
dd50eba4e353945886ebceb5dd608179d608b956
[ "Apache-2.0" ]
null
null
null
tests/functional/test_managesf.py
earlren1014/RedHat-Software-Factory
dd50eba4e353945886ebceb5dd608179d608b956
[ "Apache-2.0" ]
null
null
null
#!/bin/env python # # Copyright (C) 2014 eNovance SAS <licensing@enovance.com> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
46.523256
79
0.602956
import os import config import shutil import requests from utils import Base from utils import ManageSfUtils from utils import GerritGitUtils from utils import create_random_str from utils import set_private_key from utils import is_present, skipIfServiceMissing, skipIfServicePresent from utils import...
false
true
f70054db99d6dc4c33a51f803f6de4a176c6c5f4
6,215
py
Python
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_private_link_resources_operations.py
dubiety/azure-sdk-for-python
62ffa839f5d753594cf0fe63668f454a9d87a346
[ "MIT" ]
1
2022-02-01T18:50:12.000Z
2022-02-01T18:50:12.000Z
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_private_link_resources_operations.py
ellhe-blaster/azure-sdk-for-python
82193ba5e81cc5e5e5a5239bba58abe62e86f469
[ "MIT" ]
null
null
null
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_04_01/operations/_private_link_resources_operations.py
ellhe-blaster/azure-sdk-for-python
82193ba5e81cc5e5e5a5239bba58abe62e86f469
[ "MIT" ]
null
null
null
# pylint: disable=too-many-lines # 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) AutoRe...
42.862069
229
0.696219
from typing import Any, Callable, Dict, Optional, TypeVar from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport impo...
true
true
f70054faef3359df19102559f92b4e27574b584c
451
py
Python
improve_django_v3/menu/migrations/0006_auto_20170930_1108.py
squadran2003/improve-a-django-project
89cff9f0b0e6534036e45565a17ae807b0e0a8b5
[ "MIT" ]
null
null
null
improve_django_v3/menu/migrations/0006_auto_20170930_1108.py
squadran2003/improve-a-django-project
89cff9f0b0e6534036e45565a17ae807b0e0a8b5
[ "MIT" ]
null
null
null
improve_django_v3/menu/migrations/0006_auto_20170930_1108.py
squadran2003/improve-a-django-project
89cff9f0b0e6534036e45565a17ae807b0e0a8b5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.9 on 2017-09-30 18:08 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('menu', '0005_auto_20170930_1059'), ] operations = [ migrations.AlterField( ...
21.47619
51
0.616408
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('menu', '0005_auto_20170930_1059'), ] operations = [ migrations.AlterField( model_name='item', name='description', ...
true
true
f700558e81a49cf9663da27bc6a4e2869c418a2f
704
py
Python
radio/apps.py
MaxwellDPS/trunk-player
19f116e64249823f3a12b35ed55252db60b1cf78
[ "MIT" ]
null
null
null
radio/apps.py
MaxwellDPS/trunk-player
19f116e64249823f3a12b35ed55252db60b1cf78
[ "MIT" ]
7
2021-06-10T23:24:05.000Z
2022-03-03T21:48:12.000Z
radio/apps.py
MaxwellDPS/trunk-player
19f116e64249823f3a12b35ed55252db60b1cf78
[ "MIT" ]
1
2022-03-26T07:04:21.000Z
2022-03-26T07:04:21.000Z
from importlib import import_module from django.db.models.signals import post_migrate from django.apps import AppConfig def default_data_setup(sender, **kwargs): from django.contrib.auth.models import User try: anon = User.objects.get(username='ANONYMOUS_USER') except User.DoesNotExist: pr...
27.076923
87
0.697443
from importlib import import_module from django.db.models.signals import post_migrate from django.apps import AppConfig def default_data_setup(sender, **kwargs): from django.contrib.auth.models import User try: anon = User.objects.get(username='ANONYMOUS_USER') except User.DoesNotExist: pr...
true
true
f7005624326db8bd844029d49a4f69d03cd93970
3,257
py
Python
settings/ngrams.py
GU-DataLab/topic-modeling-textPrep
8138040308f33785cc5baa5f5982c2543e26ae0f
[ "MIT" ]
1
2022-03-19T11:33:49.000Z
2022-03-19T11:33:49.000Z
settings/ngrams.py
GU-DataLab/topic-modeling-textPrep
8138040308f33785cc5baa5f5982c2543e26ae0f
[ "MIT" ]
null
null
null
settings/ngrams.py
GU-DataLab/topic-modeling-textPrep
8138040308f33785cc5baa5f5982c2543e26ae0f
[ "MIT" ]
null
null
null
from nltk.util import ngrams from nltk.corpus import stopwords from collections import Counter from .common import get_pp_pipeline def or_list(booleans): return True in booleans def get_ngrams(D): ''' Returns all ngrams (aka a token containing a dollar sign ($)) from a set of topics or documents :par...
32.57
101
0.661652
from nltk.util import ngrams from nltk.corpus import stopwords from collections import Counter from .common import get_pp_pipeline def or_list(booleans): return True in booleans def get_ngrams(D): ngrams = set() for d in D: for w in d: if '$' in w: ngrams.add(w) re...
true
true
f700567345c8f7d640f885f9ec02c826d22cb2ad
9,755
py
Python
core/src/autogluon/core/task/base/base_task.py
zhiqiangdon/autogluon
71ee7ef0f05d8f0aad112d8c1719174aa33194d9
[ "Apache-2.0" ]
4,462
2019-12-09T17:41:07.000Z
2022-03-31T22:00:41.000Z
core/src/autogluon/core/task/base/base_task.py
zhiqiangdon/autogluon
71ee7ef0f05d8f0aad112d8c1719174aa33194d9
[ "Apache-2.0" ]
1,408
2019-12-09T17:48:59.000Z
2022-03-31T20:24:12.000Z
core/src/autogluon/core/task/base/base_task.py
zhiqiangdon/autogluon
71ee7ef0f05d8f0aad112d8c1719174aa33194d9
[ "Apache-2.0" ]
623
2019-12-10T02:04:18.000Z
2022-03-20T17:11:01.000Z
import collections import copy import logging import time from abc import abstractmethod from ...scheduler import HyperbandScheduler, RLScheduler, FIFOScheduler from ...scheduler.seq_scheduler import LocalSequentialScheduler from ...utils import in_ipynb, try_import_mxnet from ...utils.utils import setup_compute __al...
35.089928
153
0.679036
import collections import copy import logging import time from abc import abstractmethod from ...scheduler import HyperbandScheduler, RLScheduler, FIFOScheduler from ...scheduler.seq_scheduler import LocalSequentialScheduler from ...utils import in_ipynb, try_import_mxnet from ...utils.utils import setup_compute __al...
true
true
f700577848be1d3db591bde11b9367926ef378b4
57,165
py
Python
CPAC/utils/create_fsl_model.py
chrisfoulon/C-PAC
2746a90c39cea586aede98343c5927252bb8e81a
[ "BSD-3-Clause" ]
1
2021-08-02T23:23:39.000Z
2021-08-02T23:23:39.000Z
CPAC/utils/create_fsl_model.py
chrisfoulon/C-PAC
2746a90c39cea586aede98343c5927252bb8e81a
[ "BSD-3-Clause" ]
null
null
null
CPAC/utils/create_fsl_model.py
chrisfoulon/C-PAC
2746a90c39cea586aede98343c5927252bb8e81a
[ "BSD-3-Clause" ]
2
2021-08-02T23:23:40.000Z
2022-02-26T12:39:30.000Z
def load_pheno_file(pheno_file): import os import pandas as pd if not os.path.isfile(pheno_file): err = "\n\n[!] CPAC says: The group-level analysis phenotype file "\ "provided does not exist!\nPath provided: %s\n\n" \ % pheno_file raise Exception(err) wi...
34.62447
86
0.544966
def load_pheno_file(pheno_file): import os import pandas as pd if not os.path.isfile(pheno_file): err = "\n\n[!] CPAC says: The group-level analysis phenotype file "\ "provided does not exist!\nPath provided: %s\n\n" \ % pheno_file raise Exception(err) wi...
false
true
f700578bbd38004bdff93a11c4a048931a765100
977
py
Python
office365/runtime/compat.py
rikeshtailor/Office365-REST-Python-Client
ca7bfa1b22212137bb4e984c0457632163e89a43
[ "MIT" ]
null
null
null
office365/runtime/compat.py
rikeshtailor/Office365-REST-Python-Client
ca7bfa1b22212137bb4e984c0457632163e89a43
[ "MIT" ]
null
null
null
office365/runtime/compat.py
rikeshtailor/Office365-REST-Python-Client
ca7bfa1b22212137bb4e984c0457632163e89a43
[ "MIT" ]
null
null
null
import sys # ------- # Pythons # ------- # Syntax sugar. _ver = sys.version_info #: Python 2.x? is_py2 = (_ver[0] == 2) #: Python 3.x? is_py3 = (_ver[0] == 3) if is_py2: from urlparse import urlparse from urllib import quote from urlparse import urljoin import pytz as timezone from email import...
22.204545
73
0.708291
import sys _ver = sys.version_info is_py2 = (_ver[0] == 2) is_py3 = (_ver[0] == 3) if is_py2: from urlparse import urlparse from urllib import quote from urlparse import urljoin import pytz as timezone from email import message_from_string as message_from_bytes_or_string from __builti...
true
true
f70058779cdd3ba0324c41a9eaa37779092a6ad0
715
py
Python
motiv/sync/mixin.py
SaadTalaat/motiv
5d41fd100ece50b28b137447d33ed00a4050b3da
[ "Apache-2.0" ]
null
null
null
motiv/sync/mixin.py
SaadTalaat/motiv
5d41fd100ece50b28b137447d33ed00a4050b3da
[ "Apache-2.0" ]
9
2019-03-29T15:01:22.000Z
2020-09-18T12:52:45.000Z
motiv/sync/mixin.py
SaadTalaat/motiv
5d41fd100ece50b28b137447d33ed00a4050b3da
[ "Apache-2.0" ]
null
null
null
"""motiv synchronization primitives Module: Using a uniform interface to define synchronization primitives helps us use multiple execution frameworks without changing any of the code written. for example, multiprocessing vs threading. """ import abc class SystemEvent(abc.ABC): """Event abstract ...
19.861111
57
0.636364
import abc class SystemEvent(abc.ABC): @abc.abstractmethod def is_set(self): @abc.abstractmethod def set(self): @abc.abstractmethod def clear(self): @abc.abstractmethod def wait(self, *args, **kwargs): __all__ = [ 'SystemEvent', ]
true
true
f700596493274b2208efa335ed2a2ced29634349
1,595
py
Python
profiles_api/models.py
nafis-badar/profiles-rest-api
9188a8dbdad3b7fdf462d38d664f1756b788e2c3
[ "MIT" ]
null
null
null
profiles_api/models.py
nafis-badar/profiles-rest-api
9188a8dbdad3b7fdf462d38d664f1756b788e2c3
[ "MIT" ]
null
null
null
profiles_api/models.py
nafis-badar/profiles-rest-api
9188a8dbdad3b7fdf462d38d664f1756b788e2c3
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import AbstractBaseUser from django.contrib.auth.models import PermissionsMixin,BaseUserManager # Create your models here. class UserProfileManager(BaseUserManager): """Manager for user profiles """ def create_user(self,email,name,password=None): ...
29.537037
71
0.684639
from django.db import models from django.contrib.auth.models import AbstractBaseUser from django.contrib.auth.models import PermissionsMixin,BaseUserManager class UserProfileManager(BaseUserManager): def create_user(self,email,name,password=None): if not email: raise ValueError("User must gave...
true
true
f7005979eaa3f5c9c2b34b11e8e9c3da9e1602fc
2,997
bzl
Python
tensorflow_decision_forests/keras/wrapper/wrapper.bzl
xsSilva/decision-forests
5eb3524f4d86d1fa177dae7caba5c6e4516d7030
[ "Apache-2.0" ]
null
null
null
tensorflow_decision_forests/keras/wrapper/wrapper.bzl
xsSilva/decision-forests
5eb3524f4d86d1fa177dae7caba5c6e4516d7030
[ "Apache-2.0" ]
null
null
null
tensorflow_decision_forests/keras/wrapper/wrapper.bzl
xsSilva/decision-forests
5eb3524f4d86d1fa177dae7caba5c6e4516d7030
[ "Apache-2.0" ]
null
null
null
"""Rule generation utilities.""" load("@org_tensorflow//tensorflow:tensorflow.bzl", "if_not_windows", "tf_binary_additional_srcs", "tf_cc_binary", "tf_copts") load("//tensorflow_decision_forests/tensorflow:utils.bzl", "rpath_linkopts_to_tensorflow") def py_wrap_yggdrasil_learners( name = None, learner...
37.4625
125
0.651652
load("@org_tensorflow//tensorflow:tensorflow.bzl", "if_not_windows", "tf_binary_additional_srcs", "tf_cc_binary", "tf_copts") load("//tensorflow_decision_forests/tensorflow:utils.bzl", "rpath_linkopts_to_tensorflow") def py_wrap_yggdrasil_learners( name = None, learner_deps = []): wrapper_pa...
true
true
f7005b28d042d57735c533e59720388a5a80e44f
4,801
py
Python
tools/poor-mans-video-editor.py
PansoK/slp
e2c478b00f8f054b24eebb257e18a57451471c79
[ "MIT" ]
null
null
null
tools/poor-mans-video-editor.py
PansoK/slp
e2c478b00f8f054b24eebb257e18a57451471c79
[ "MIT" ]
null
null
null
tools/poor-mans-video-editor.py
PansoK/slp
e2c478b00f8f054b24eebb257e18a57451471c79
[ "MIT" ]
null
null
null
""" Input: tsv file in the form Input Video filename | topic | subtopic | title greek | title english | start time | end time | delete segments input.mp4 | 1 | 1 | έξοδος | output | 00:10:05 | 00:30:10 | 00:11:15-00:12:30,00:20:35-00:22:10 """ import os import subprocess import sys...
25.005208
158
0.565715
import os import subprocess import sys import yaml def run_cmd(command: str): command = f'{os.getenv("SHELL")} -c "{command}"' pipe = subprocess.Popen( command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT ) stdout = "" if pipe.stdout is not None: stdout = "".jo...
true
true
f7005b4ebd505da9c9784f4e6d7f8617d47934f7
590
py
Python
pyqldb/__init__.py
awslabs/amazon-qldb-driver-python
05ed5463189a7126983052fe0e3bc3486b9136ff
[ "Apache-2.0" ]
39
2019-10-30T09:01:54.000Z
2022-02-06T18:30:27.000Z
pyqldb/__init__.py
awslabs/amazon-qldb-driver-python
05ed5463189a7126983052fe0e3bc3486b9136ff
[ "Apache-2.0" ]
30
2020-03-05T23:52:57.000Z
2022-03-24T16:04:06.000Z
pyqldb/__init__.py
awslabs/amazon-qldb-driver-python
05ed5463189a7126983052fe0e3bc3486b9136ff
[ "Apache-2.0" ]
28
2019-12-09T17:21:59.000Z
2022-01-25T11:57:51.000Z
# Copyright 2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license" file...
45.384615
118
0.759322
__version__ = '3.2.2'
true
true
f7005b6cc167114b14a57d483e597b70ad7731ba
5,077
py
Python
init.py
shackspace/one_button
a8b23ffdd0bd39497d465c6d7af2af4464063a48
[ "WTFPL" ]
1
2015-04-03T21:19:30.000Z
2015-04-03T21:19:30.000Z
init.py
shackspace/one_button
a8b23ffdd0bd39497d465c6d7af2af4464063a48
[ "WTFPL" ]
null
null
null
init.py
shackspace/one_button
a8b23ffdd0bd39497d465c6d7af2af4464063a48
[ "WTFPL" ]
null
null
null
#!/usr/bin/env python from threading import Timer,Thread import RPIO from RPIO import PWM import paramiko import json import sys from time import time, sleep from relaxxapi.relaxxapi import relaxx r = None sftp_base_path = "/home/shack/music" button = 4 loud1 = 21 loud2 = 22 state = 0 def init_state(): state =...
24.887255
109
0.621233
from threading import Timer,Thread import RPIO from RPIO import PWM import paramiko import json import sys from time import time, sleep from relaxxapi.relaxxapi import relaxx r = None sftp_base_path = "/home/shack/music" button = 4 loud1 = 21 loud2 = 22 state = 0 def init_state(): state = 0 RPIO.setup(lou...
true
true
f7005bd1aad9ac2334d62b543f0e7ac8f6381776
10,551
py
Python
napari/_qt/layer_controls/qt_vectors_controls.py
Mishrasubha/napari
c4d1038fc3ed30dc228949cbdedf12826ec2efc2
[ "BSD-3-Clause" ]
null
null
null
napari/_qt/layer_controls/qt_vectors_controls.py
Mishrasubha/napari
c4d1038fc3ed30dc228949cbdedf12826ec2efc2
[ "BSD-3-Clause" ]
3
2020-11-14T08:35:18.000Z
2021-07-26T10:06:32.000Z
napari/_qt/layer_controls/qt_vectors_controls.py
Mishrasubha/napari
c4d1038fc3ed30dc228949cbdedf12826ec2efc2
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from qtpy.QtCore import Qt from qtpy.QtWidgets import QComboBox, QDoubleSpinBox, QLabel from ...layers.utils._color_manager_constants import ColorMode from ...utils.translations import trans from ..utils import qt_signals_blocked from ..widgets.qt_color_swatch import QColorSwatchEdit from .qt_layer_...
39.223048
87
0.65444
import numpy as np from qtpy.QtCore import Qt from qtpy.QtWidgets import QComboBox, QDoubleSpinBox, QLabel from ...layers.utils._color_manager_constants import ColorMode from ...utils.translations import trans from ..utils import qt_signals_blocked from ..widgets.qt_color_swatch import QColorSwatchEdit from .qt_layer_...
true
true
f7005d9399a9f18e174ddc2c6c5409f9ec3370f1
944
py
Python
isi_sdk_8_0_1/test/test_hardware_tapes_devices.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_8_0_1/test/test_hardware_tapes_devices.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_8_0_1/test/test_hardware_tapes_devices.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 4 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import isi_sdk_8_0_1 from i...
23.02439
98
0.71822
from __future__ import absolute_import import unittest import isi_sdk_8_0_1 from isi_sdk_8_0_1.models.hardware_tapes_devices import HardwareTapesDevices from isi_sdk_8_0_1.rest import ApiException class TestHardwareTapesDevices(unittest.TestCase): def setUp(self): pass def tearDown(self): ...
true
true
f7005e840555e823b72518c963e171385bf675ec
1,423
py
Python
run.py
xinetzone/self-driving-dash
66860074099c90e620e21bc30b26efd366cc8f1a
[ "Apache-2.0" ]
null
null
null
run.py
xinetzone/self-driving-dash
66860074099c90e620e21bc30b26efd366cc8f1a
[ "Apache-2.0" ]
null
null
null
run.py
xinetzone/self-driving-dash
66860074099c90e620e21bc30b26efd366cc8f1a
[ "Apache-2.0" ]
null
null
null
from dash import dcc, html from dash.dependencies import Input, Output from app import app from layouts import index, record, watch, replay, about # from examples.run import callback_example from callbacks.record import * from callbacks.watch import * from callbacks.replay import * layout = html.Article([ dcc.Loc...
27.365385
63
0.647927
from dash import dcc, html from dash.dependencies import Input, Output from app import app from layouts import index, record, watch, replay, about from callbacks.record import * from callbacks.watch import * from callbacks.replay import * layout = html.Article([ dcc.Location(id='url', refresh=False), html....
true
true
f700608f35098a7965b60e53b106f0704bc73300
28,769
py
Python
neorl/tune/runners/estune.py
XuboGU/neorl
066cdbd9e9cdbfe371278dba3ece116f25edab2d
[ "MIT" ]
1
2021-07-06T20:31:38.000Z
2021-07-06T20:31:38.000Z
neorl/tune/runners/estune.py
XuboGU/neorl
066cdbd9e9cdbfe371278dba3ece116f25edab2d
[ "MIT" ]
null
null
null
neorl/tune/runners/estune.py
XuboGU/neorl
066cdbd9e9cdbfe371278dba3ece116f25edab2d
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import os import random import math from itertools import repeat import itertools import sys, copy, shutil import subprocess from multiprocessing.dummy import Pool from collections import defaultdict import copy import random import matplotlib.pyplot as plt try: from collec...
46.326892
184
0.509437
import numpy as np import pandas as pd import os import random import math from itertools import repeat import itertools import sys, copy, shutil import subprocess from multiprocessing.dummy import Pool from collections import defaultdict import copy import random import matplotlib.pyplot as plt try: from collec...
true
true
f70060aa3fd6b00edb6202ecf166cc9464082bba
12,370
py
Python
test_net.py
zhuriheng/faster-rcnn.pytorch
7536b0f5eee254350fb4dce5c4a077ac6d29db16
[ "MIT" ]
null
null
null
test_net.py
zhuriheng/faster-rcnn.pytorch
7536b0f5eee254350fb4dce5c4a077ac6d29db16
[ "MIT" ]
null
null
null
test_net.py
zhuriheng/faster-rcnn.pytorch
7536b0f5eee254350fb4dce5c4a077ac6d29db16
[ "MIT" ]
null
null
null
# -------------------------------------------------------- # Tensorflow Faster R-CNN # Licensed under The MIT License [see LICENSE for details] # Written by Jiasen Lu, Jianwei Yang, based on code from Ross Girshick # -------------------------------------------------------- from __future__ import absolute_import from __...
37.147147
118
0.621746
from __future__ import absolute_import from __future__ import division from __future__ import print_function import _init_paths import os import sys import numpy as np import argparse import pprint import pdb import time import cv2 import torch from torch.autograd import Variable import torch.nn as nn import to...
true
true
f7006109577a06b46b567649a683de1311a12be8
270
py
Python
.github/templates/flask/module/__main__.py
mondbev1/python-project-template
74e8c903643cca2971c09cb3fff08287dfa74bcc
[ "Unlicense" ]
null
null
null
.github/templates/flask/module/__main__.py
mondbev1/python-project-template
74e8c903643cca2971c09cb3fff08287dfa74bcc
[ "Unlicense" ]
null
null
null
.github/templates/flask/module/__main__.py
mondbev1/python-project-template
74e8c903643cca2971c09cb3fff08287dfa74bcc
[ "Unlicense" ]
null
null
null
import click from flask.cli import FlaskGroup from . import create_app @click.group(cls=FlaskGroup, create_app=create_app) def main(): """Management script for the python_project_template application.""" if __name__ == "__main__": # pragma: no cover main()
20.769231
72
0.740741
import click from flask.cli import FlaskGroup from . import create_app @click.group(cls=FlaskGroup, create_app=create_app) def main(): if __name__ == "__main__": main()
true
true
f700615e2a905b6e5d941c75f337b6670c36b49b
3,149
py
Python
system/system.py
hirune924/kaggle-HuBMAP
e4c2008378eb773db551cee52380bfccdf3a10fa
[ "Apache-2.0" ]
null
null
null
system/system.py
hirune924/kaggle-HuBMAP
e4c2008378eb773db551cee52380bfccdf3a10fa
[ "Apache-2.0" ]
null
null
null
system/system.py
hirune924/kaggle-HuBMAP
e4c2008378eb773db551cee52380bfccdf3a10fa
[ "Apache-2.0" ]
null
null
null
import pytorch_lightning as pl from loss.loss import get_loss from optimizer.optimizer import get_optimizer from scheduler.scheduler import get_scheduler import torch import numpy as np from pytorch_lightning.metrics import Accuracy import segmentation_models_pytorch as smp from utils.utils import load_obj import alb...
33.5
118
0.621467
import pytorch_lightning as pl from loss.loss import get_loss from optimizer.optimizer import get_optimizer from scheduler.scheduler import get_scheduler import torch import numpy as np from pytorch_lightning.metrics import Accuracy import segmentation_models_pytorch as smp from utils.utils import load_obj import alb...
true
true
f70061697e12c46d39594f2bf2f9bb8e344f31c7
9,929
py
Python
coronatest_analyze_csv.py
han-kwang/coronatest-scandata
98fd49f4fdcda10561bce41e769bbbb70ecfe94e
[ "MIT" ]
null
null
null
coronatest_analyze_csv.py
han-kwang/coronatest-scandata
98fd49f4fdcda10561bce41e769bbbb70ecfe94e
[ "MIT" ]
null
null
null
coronatest_analyze_csv.py
han-kwang/coronatest-scandata
98fd49f4fdcda10561bce41e769bbbb70ecfe94e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Analyze CSV file into scores. Created on Sat Feb 12 22:15:29 2022 // @hk_nien """ from pathlib import Path import os import re import sys import pandas as pd import numpy as np PCODES = dict([ # Regio Noord (1011, 'Amsterdam'), (1625, 'Hoorn|Zwaag'), ...
30.835404
84
0.570551
from pathlib import Path import os import re import sys import pandas as pd import numpy as np PCODES = dict([ (1011, 'Amsterdam'), (1625, 'Hoorn|Zwaag'), (1811, 'Alkmaar'), (7471, 'Goor'), (7556, 'Hengelo'), (7903, 'Hoogeveen'), (7942, 'Meppel'), (8011, 'Zwolle'), (8232, 'Le...
true
true
f700617c620c0aa66f529697d1f5e651108eedf8
4,485
py
Python
Starter_Code 2/qualifier/app.py
RonakAgarwal/FinTech_M2_CH
78bcd41bf1944106106bb6e31bd4a8d92d974565
[ "MIT" ]
null
null
null
Starter_Code 2/qualifier/app.py
RonakAgarwal/FinTech_M2_CH
78bcd41bf1944106106bb6e31bd4a8d92d974565
[ "MIT" ]
null
null
null
Starter_Code 2/qualifier/app.py
RonakAgarwal/FinTech_M2_CH
78bcd41bf1944106106bb6e31bd4a8d92d974565
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Loan Qualifier Application. This is a command line application to match applicants with qualifying loans. Example: $ python app.py """ from re import T import sys import fire import questionary from pathlib import Path import csv from qualifier.utils.fileio import ( load_csv, ...
30.719178
87
0.716611
from re import T import sys import fire import questionary from pathlib import Path import csv from qualifier.utils.fileio import ( load_csv, save_csv, ) from qualifier.utils.calculators import ( calculate_monthly_debt_ratio, calculate_loan_to_value_ratio, ) from qualifier.filters.max_loan_size im...
true
true
f70061f5cb80071c33ec1a33d265c8b68682e42c
26,852
py
Python
vnpy/app/portfolio_strategy/backtesting.py
hardywu/vnpy
81ab73dc57d12a3ff7c74c73665513b46fc0f668
[ "MIT" ]
1
2021-05-14T12:57:08.000Z
2021-05-14T12:57:08.000Z
vnpy/app/portfolio_strategy/backtesting.py
hardywu/vnpy
81ab73dc57d12a3ff7c74c73665513b46fc0f668
[ "MIT" ]
null
null
null
vnpy/app/portfolio_strategy/backtesting.py
hardywu/vnpy
81ab73dc57d12a3ff7c74c73665513b46fc0f668
[ "MIT" ]
1
2021-06-14T13:26:41.000Z
2021-06-14T13:26:41.000Z
from collections import defaultdict from datetime import date, datetime, timedelta from typing import Dict, List, Set, Tuple from functools import lru_cache from copy import copy import traceback import numpy as np import plotly.graph_objects as go from plotly.subplots import make_subplots from pandas import DataFrame...
31.405848
92
0.559437
from collections import defaultdict from datetime import date, datetime, timedelta from typing import Dict, List, Set, Tuple from functools import lru_cache from copy import copy import traceback import numpy as np import plotly.graph_objects as go from plotly.subplots import make_subplots from pandas import DataFrame...
true
true
f700642b6d0a80da9a02e1d4c273cd2930c77980
2,659
py
Python
src/python/pants/backend/codegen/export_codegen_goal_test.py
rcuza/pants
0429258b181986eed856ae45af93b776727774a0
[ "Apache-2.0" ]
1
2021-02-22T18:11:26.000Z
2021-02-22T18:11:26.000Z
src/python/pants/backend/codegen/export_codegen_goal_test.py
rcuza/pants
0429258b181986eed856ae45af93b776727774a0
[ "Apache-2.0" ]
null
null
null
src/python/pants/backend/codegen/export_codegen_goal_test.py
rcuza/pants
0429258b181986eed856ae45af93b776727774a0
[ "Apache-2.0" ]
2
2021-05-11T07:51:26.000Z
2021-05-19T10:14:46.000Z
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from pathlib import Path import pytest from pants.backend.codegen.export_codegen_goal import ExportCodegen from pants.backend.codegen.export_codegen_goal import rules as write_codegen_ru...
30.215909
98
0.723956
from pathlib import Path import pytest from pants.backend.codegen.export_codegen_goal import ExportCodegen from pants.backend.codegen.export_codegen_goal import rules as write_codegen_rules from pants.core.target_types import FilesSources, ResourcesSources from pants.core.util_rules import distdir from pants.engin...
true
true
f7006506115787b6ab648322e288f899a2ea56b5
3,002
py
Python
movies_recommender/RecommenderSVD.py
mateuszrusin/filmweb-rekomendacje
06bdff3825f4c9e7b80fb5778d1a40388d2313d9
[ "MIT" ]
3
2019-12-10T10:20:07.000Z
2020-12-03T17:37:24.000Z
movies_recommender/RecommenderSVD.py
mateuszrusin/filmweb-rekomendacje
06bdff3825f4c9e7b80fb5778d1a40388d2313d9
[ "MIT" ]
2
2021-03-31T19:31:04.000Z
2021-12-13T20:32:18.000Z
movies_recommender/RecommenderSVD.py
mateuszrusin/filmweb-rekomendacje
06bdff3825f4c9e7b80fb5778d1a40388d2313d9
[ "MIT" ]
4
2019-11-21T23:49:39.000Z
2020-12-03T17:37:26.000Z
from collections import defaultdict from operator import itemgetter # python -m movies_recommender.RecommenderSVD from movies_analyzer.Movies import Movies from movies_analyzer.RecommendationDataset import RecommendationDataSet from movies_recommender.Recommender import Recommender from surprise import SVD, KNNBasic ...
37.061728
103
0.741506
from collections import defaultdict from operator import itemgetter from movies_analyzer.Movies import Movies from movies_analyzer.RecommendationDataset import RecommendationDataSet from movies_recommender.Recommender import Recommender from surprise import SVD, KNNBasic from movies_recommender.utils import get_top_...
true
true
f700658fdb8362dbb88d94c948cdb708d1fac1ec
1,320
py
Python
lib/iana/ripe/objects/mntner.py
sschwetz/network_tech
fc65166e71bfdb5a0e99ca7e7ce9f7814b92869b
[ "Apache-2.0" ]
73
2017-05-04T06:35:20.000Z
2022-02-03T13:57:00.000Z
lib/iana/ripe/objects/mntner.py
sschwetz/network_tech
fc65166e71bfdb5a0e99ca7e7ce9f7814b92869b
[ "Apache-2.0" ]
35
2017-11-09T16:28:48.000Z
2022-01-12T08:15:48.000Z
lib/iana/ripe/objects/mntner.py
sschwetz/network_tech
fc65166e71bfdb5a0e99ca7e7ce9f7814b92869b
[ "Apache-2.0" ]
20
2017-11-08T05:07:59.000Z
2021-12-09T17:41:06.000Z
""" Copyright 2019 Glen Harmon MNTNER Object Description https://www.ripe.net/manage-ips-and-asns/db/support/documentation/ripe-database-documentation/rpsl-object-types/4-3-descriptions-of-secondary-objects/4-3-4-description-of-the-mntner-object """ from .rpsl import Rpsl class Maintainer(Rpsl): def __init__(...
32.195122
188
0.567424
from .rpsl import Rpsl class Maintainer(Rpsl): def __init__(self): self.handle = None self.description = list() self.update_to = list() self.maintainer_notify = list() self.authentication = list() super().__init__() def html(self, heading_level=1): re...
true
true
f700666f3ddc127976f134add98c0159870b03e1
8,280
py
Python
safedelete/queryset.py
MarcelForArt/django-safedelete
0902e3db957bee0fa9bf9058e8f0a0d2e0e027d7
[ "BSD-3-Clause" ]
null
null
null
safedelete/queryset.py
MarcelForArt/django-safedelete
0902e3db957bee0fa9bf9058e8f0a0d2e0e027d7
[ "BSD-3-Clause" ]
null
null
null
safedelete/queryset.py
MarcelForArt/django-safedelete
0902e3db957bee0fa9bf9058e8f0a0d2e0e027d7
[ "BSD-3-Clause" ]
null
null
null
from django.db.models import query from .query import SafeDeleteQuery from functools import partial, reduce from django.db.models.constants import LOOKUP_SEP from django.db.models import Max, Min, F from django.utils.module_loading import import_string def get_lookup_value(obj, field): return reduce(lambda i, f:...
40.390244
118
0.666304
from django.db.models import query from .query import SafeDeleteQuery from functools import partial, reduce from django.db.models.constants import LOOKUP_SEP from django.db.models import Max, Min, F from django.utils.module_loading import import_string def get_lookup_value(obj, field): return reduce(lambda i, f:...
true
true
f70067377c11a437d33b5c947e65a2cb6d20e8e6
2,056
py
Python
markovGames/learning/bruteSearch.py
rohit-konda/markovGames
d6dd1b8a11f1c95658a468f9e471aecfcf0e6839
[ "MIT" ]
null
null
null
markovGames/learning/bruteSearch.py
rohit-konda/markovGames
d6dd1b8a11f1c95658a468f9e471aecfcf0e6839
[ "MIT" ]
null
null
null
markovGames/learning/bruteSearch.py
rohit-konda/markovGames
d6dd1b8a11f1c95658a468f9e471aecfcf0e6839
[ "MIT" ]
null
null
null
import numpy as np from itertools import product from markovGames.gameDefs.mdpDefs import Policy def getAllDetPol(numStates, numActions): detProbs = [np.array([1 if j == i else 0 for j in range(numActions)]) for i in range(numActions)] return product(detProbs, repeat=numStates) def getPolList(states, acSet)...
29.797101
101
0.668774
import numpy as np from itertools import product from markovGames.gameDefs.mdpDefs import Policy def getAllDetPol(numStates, numActions): detProbs = [np.array([1 if j == i else 0 for j in range(numActions)]) for i in range(numActions)] return product(detProbs, repeat=numStates) def getPolList(states, acSet)...
true
true
f70068b2a70ca8e179b30626bfb6b8c33328a45e
2,694
py
Python
cloudmesh-john/setup.py
cybertraining-dsc/fa19-516-163
d6ba96bd08c8f37c50ac86bf83df7a01d1f31b98
[ "Apache-2.0" ]
null
null
null
cloudmesh-john/setup.py
cybertraining-dsc/fa19-516-163
d6ba96bd08c8f37c50ac86bf83df7a01d1f31b98
[ "Apache-2.0" ]
1
2019-09-24T13:59:25.000Z
2019-09-27T00:16:20.000Z
cloudmesh-john/setup.py
cybertraining-dsc/fa19-516-163
d6ba96bd08c8f37c50ac86bf83df7a01d1f31b98
[ "Apache-2.0" ]
1
2019-09-25T00:21:42.000Z
2019-09-25T00:21:42.000Z
#!/usr/bin/env python # ----------------------------------------------------------------------- # # Copyright 2017, Gregor von Laszewski, Indiana University # # # # Licensed under the Apache License, Version 2.0 (the "License"); you ...
33.675
75
0.554937
from setuptools import find_packages, setup import io def readfile(filename): with io.open(filename, encoding="utf-8") as stream: return stream.read().split() requiers = """ psutil pygments """.split("\n") version = readfile("VERSION")[0].strip() with open('README.md') as f: long_descriptio...
true
true
f7006aafd3946f2f78f841d508a5f60194382134
6,057
py
Python
ctd_processing/_old_dialog.py
sharksmhi/ctd_processing
616df4cd7ed626b678622448a08a0356086a8a3f
[ "MIT" ]
null
null
null
ctd_processing/_old_dialog.py
sharksmhi/ctd_processing
616df4cd7ed626b678622448a08a0356086a8a3f
[ "MIT" ]
null
null
null
ctd_processing/_old_dialog.py
sharksmhi/ctd_processing
616df4cd7ed626b678622448a08a0356086a8a3f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Feb 06 11:19:04 2012 Program to open a dialog box and get a file, check the file name and send it along with the serienummer @author: a001109 Updated: 191010 MHan, Updated for Svea profiles and new CTD. """ def checkCtdFileName(ctd=None, confile='.XMLCON'): import Tkin...
37.85625
116
0.527819
""" Created on Mon Feb 06 11:19:04 2012 Program to open a dialog box and get a file, check the file name and send it along with the serienummer @author: a001109 Updated: 191010 MHan, Updated for Svea profiles and new CTD. """ def checkCtdFileName(ctd=None, confile='.XMLCON'): import Tkinter, tkFileDialog i...
false
true
f7006be989e72bdce78c68bad744121539b63e0a
8,142
py
Python
framework/TSA/Wavelet.py
FlanFlanagan/raven
bd7fca18af94376a28e2144ba1da72c01c8d343c
[ "Apache-2.0" ]
159
2017-03-24T21:07:06.000Z
2022-03-20T13:44:40.000Z
framework/TSA/Wavelet.py
FlanFlanagan/raven
bd7fca18af94376a28e2144ba1da72c01c8d343c
[ "Apache-2.0" ]
1,667
2017-03-27T14:41:22.000Z
2022-03-31T19:50:06.000Z
framework/TSA/Wavelet.py
wanghy-anl/raven
ef1372364a2776385931763f2b28fdf2930c77b9
[ "Apache-2.0" ]
95
2017-03-24T21:05:03.000Z
2022-03-08T17:30:22.000Z
# Copyright 2017 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
41.753846
118
0.681774
import numpy as np from utils import InputData, InputTypes, xmlUtils from .TimeSeriesAnalyzer import TimeSeriesGenerator, TimeSeriesCharacterizer class Wavelet(TimeSeriesGenerator, TimeSeriesCharacterizer): @classmethod def getInputSpecification(cls): specs = super(Wavelet, cls).getInputSpecif...
true
true
f7006c01dfe517f7ba15beb6a2ddbc1643eb7d09
12,557
py
Python
openstack_dashboard/test/integration_tests/pages/project/network/networkspage.py
Mirantis/mos-horizon
d2444220d959c8b921436bd75459c2face0e71d2
[ "Apache-2.0" ]
9
2016-06-03T03:53:24.000Z
2017-05-20T16:53:23.000Z
openstack_dashboard/test/integration_tests/pages/project/network/networkspage.py
Mirantis/mos-horizon
d2444220d959c8b921436bd75459c2face0e71d2
[ "Apache-2.0" ]
1
2016-09-08T10:57:46.000Z
2016-09-08T10:59:06.000Z
openstack_dashboard/test/integration_tests/pages/project/network/networkspage.py
Mirantis/mos-horizon
d2444220d959c8b921436bd75459c2face0e71d2
[ "Apache-2.0" ]
4
2016-08-01T10:50:15.000Z
2017-02-22T12:11:19.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
41.305921
78
0.649359
from openstack_dashboard.test.integration_tests.pages import basepage from openstack_dashboard.test.integration_tests.regions import forms from openstack_dashboard.test.integration_tests.regions import tables from selenium.common import exceptions from selenium.webdriver.common import by class ElementTabl...
true
true
f7006e06b03a87904485aac3fcf8e274655056ff
226
py
Python
part/pg/fixed_percent/part.py
fasiondog/hikyuu_house
0f0b609f17d94ba60da193de9c753eae54693817
[ "MIT" ]
null
null
null
part/pg/fixed_percent/part.py
fasiondog/hikyuu_house
0f0b609f17d94ba60da193de9c753eae54693817
[ "MIT" ]
null
null
null
part/pg/fixed_percent/part.py
fasiondog/hikyuu_house
0f0b609f17d94ba60da193de9c753eae54693817
[ "MIT" ]
1
2021-12-22T06:31:26.000Z
2021-12-22T06:31:26.000Z
from hikyuu import PG_FixedPercent # 部件作者 author = "fasiondog" # 版本 version = '20200825' def part(p=0.2): return PG_FixedPercent(p) part.__doc__ = PG_FixedPercent.__doc__ if __name__ == '__main__': print(part())
13.294118
38
0.70354
from hikyuu import PG_FixedPercent author = "fasiondog" version = '20200825' def part(p=0.2): return PG_FixedPercent(p) part.__doc__ = PG_FixedPercent.__doc__ if __name__ == '__main__': print(part())
true
true
f7006fac7a55e33300dd99dba56d7fa113cff7fb
980
py
Python
kubernetes/test/test_v1_flex_volume_source.py
reymont/python
02a3a31c630c305527b328af49724f348fbdae15
[ "Apache-2.0" ]
1
2018-10-20T19:37:57.000Z
2018-10-20T19:37:57.000Z
kubernetes/test/test_v1_flex_volume_source.py
reymont/python
02a3a31c630c305527b328af49724f348fbdae15
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1_flex_volume_source.py
reymont/python
02a3a31c630c305527b328af49724f348fbdae15
[ "Apache-2.0" ]
2
2018-07-27T19:39:34.000Z
2020-12-25T02:48:27.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.11.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys i...
21.777778
105
0.714286
from __future__ import absolute_import import os import sys import unittest import kubernetes.client from kubernetes.client.rest import ApiException from kubernetes.client.models.v1_flex_volume_source import V1FlexVolumeSource class TestV1FlexVolumeSource(unittest.TestCase): def setUp(self): pass ...
true
true
f700701e51582a6f314450ea9547949094b4db62
3,429
py
Python
fineract/objects/group.py
mobidevke/py-fineract
712b0c20686accd7d7e0a2356ccaf59c5fe4f7dd
[ "Apache-2.0" ]
7
2019-03-11T16:17:33.000Z
2020-10-22T21:57:51.000Z
fineract/objects/group.py
mobidevke/py-fineract
712b0c20686accd7d7e0a2356ccaf59c5fe4f7dd
[ "Apache-2.0" ]
3
2019-11-05T20:22:16.000Z
2019-12-11T17:09:04.000Z
fineract/objects/group.py
mobidevke/py-fineract
712b0c20686accd7d7e0a2356ccaf59c5fe4f7dd
[ "Apache-2.0" ]
2
2020-11-19T16:00:36.000Z
2021-11-19T09:36:13.000Z
from fineract.objects.fineract_object import DataFineractObject from fineract.objects.types import Type class Group(DataFineractObject): """ This class represents a Group. """ def __repr__(self): return self.get__repr__({'group_id': self.id}) def _init_attributes(self): self.id = ...
29.307692
93
0.567221
from fineract.objects.fineract_object import DataFineractObject from fineract.objects.types import Type class Group(DataFineractObject): def __repr__(self): return self.get__repr__({'group_id': self.id}) def _init_attributes(self): self.id = None self.account_no = None self.ex...
true
true
f700704654c1bdfa793688460f5e7faa103312e6
734
py
Python
magic_notifier/sms_clients/cgsms_client.py
jefcolbi/django-magic-notifier
f0b035027a165c7dbbd166cd0dfbf52d9b0a11c6
[ "MIT" ]
13
2021-07-25T19:03:43.000Z
2022-01-30T23:53:03.000Z
magic_notifier/sms_clients/cgsms_client.py
jefcolbi/django-magic-notifier
f0b035027a165c7dbbd166cd0dfbf52d9b0a11c6
[ "MIT" ]
null
null
null
magic_notifier/sms_clients/cgsms_client.py
jefcolbi/django-magic-notifier
f0b035027a165c7dbbd166cd0dfbf52d9b0a11c6
[ "MIT" ]
null
null
null
import logging import requests from django.conf import settings from .base import BaseSmsClient logger = logging.getLogger("notifier") class CGSmsClient(BaseSmsClient): @classmethod def send(cls, number: str, text: str, **kwargs): sub_account = settings.NOTIFIER["SMS"]["GATEWAYS"]["CGS"]["SUB_ACCO...
28.230769
94
0.633515
import logging import requests from django.conf import settings from .base import BaseSmsClient logger = logging.getLogger("notifier") class CGSmsClient(BaseSmsClient): @classmethod def send(cls, number: str, text: str, **kwargs): sub_account = settings.NOTIFIER["SMS"]["GATEWAYS"]["CGS"]["SUB_ACCO...
true
true
f700708d0b9048b76b77d12bc9318376b5a488e6
114,661
py
Python
CppHeaderParser-2.7/CppHeaderParser/CppHeaderParser.py
lamondlab/sipify
0e2f345ddc9514666d067fc32851882ffb22944a
[ "Apache-2.0" ]
4
2018-03-02T10:53:04.000Z
2019-01-25T07:56:13.000Z
CppHeaderParser-2.7/CppHeaderParser/CppHeaderParser.py
lamondlab/sipify
0e2f345ddc9514666d067fc32851882ffb22944a
[ "Apache-2.0" ]
1
2018-05-08T11:12:14.000Z
2021-07-13T09:29:12.000Z
CppHeaderParser-2.7/CppHeaderParser/CppHeaderParser.py
lamondlab/sipify
0e2f345ddc9514666d067fc32851882ffb22944a
[ "Apache-2.0" ]
1
2018-05-11T05:14:00.000Z
2018-05-11T05:14:00.000Z
#!/usr/bin/python # # Author: Jashua R. Cloutier (contact via https://bitbucket.org/senex) # Project: http://senexcanis.com/open-source/cppheaderparser/ # # Copyright (C) 2011, Jashua R. Cloutier # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted ...
43.697027
210
0.51306
import ply.lex as lex import os import sys import re import inspect def lineno(): return inspect.currentframe().f_back.f_lineno version = __version__ = "2.7" tokens = [ 'NUMBER', 'FLOAT_NUMBER', 'TEMPLATE_NAME', 'NAME', 'OPEN_PAREN', 'CLOSE_...
true
true
f7007173943c99d08791c125b906d4befe6387ea
24,923
py
Python
tensorflow/contrib/rnn/python/ops/lstm_ops.py
M155K4R4/Tensorflow
e5e03ef3148303b3dfed89a1492dedf92b45be25
[ "Apache-2.0" ]
5
2019-05-23T02:59:21.000Z
2020-02-05T08:20:23.000Z
tensorflow/contrib/rnn/python/ops/lstm_ops.py
M155K4R4/Tensorflow
e5e03ef3148303b3dfed89a1492dedf92b45be25
[ "Apache-2.0" ]
null
null
null
tensorflow/contrib/rnn/python/ops/lstm_ops.py
M155K4R4/Tensorflow
e5e03ef3148303b3dfed89a1492dedf92b45be25
[ "Apache-2.0" ]
2
2019-07-04T00:47:02.000Z
2019-07-08T08:47:05.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...
35.401989
96
0.650564
from __future__ import absolute_import from __future__ import division from __future__ import print_function import abc from tensorflow.contrib.rnn.ops import gen_lstm_ops from tensorflow.contrib.util import loader from tensorflow.python.framework import dtypes from tensorflow.python.framework import op...
true
true
f7007281123ef0b43ad24fd2ed13f4b9a7f55812
867
py
Python
common/clean_svt_transcript.py
phsmit/kaldi-recipes
b2e2e098cc344767a9ac6cc15942afea5685a7e8
[ "Apache-2.0" ]
null
null
null
common/clean_svt_transcript.py
phsmit/kaldi-recipes
b2e2e098cc344767a9ac6cc15942afea5685a7e8
[ "Apache-2.0" ]
null
null
null
common/clean_svt_transcript.py
phsmit/kaldi-recipes
b2e2e098cc344767a9ac6cc15942afea5685a7e8
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import argparse import codecs import sys def transform(i,o): for line in i: if len(line.strip()) == 0: continue key, trans = line.strip().split(None, 1) ntrans = [] for t in trans.split(): if t.startswith("<"): continu...
30.964286
146
0.608997
import argparse import codecs import sys def transform(i,o): for line in i: if len(line.strip()) == 0: continue key, trans = line.strip().split(None, 1) ntrans = [] for t in trans.split(): if t.startswith("<"): continue ntrans.a...
true
true
f70072e664f2a4c0803afed709115398c03808ab
11,745
py
Python
PSN.py
jeevangelista/PSN
b47e95e8e3c205c0aa29438a025644ce1d25f93e
[ "MIT" ]
null
null
null
PSN.py
jeevangelista/PSN
b47e95e8e3c205c0aa29438a025644ce1d25f93e
[ "MIT" ]
null
null
null
PSN.py
jeevangelista/PSN
b47e95e8e3c205c0aa29438a025644ce1d25f93e
[ "MIT" ]
null
null
null
#!/Users/erol/Code/2.7/bin/python #Change this before running import sys, getopt, glob, csv from math import sqrt from Bio import Struct from Bio.Struct.Geometry import center_of_mass from Bio.PDB import * import numpy as np def string_to_float(val): try: return float(val) except ValueError as e: raise ...
35.27027
109
0.572073
import sys, getopt, glob, csv from math import sqrt from Bio import Struct from Bio.Struct.Geometry import center_of_mass from Bio.PDB import * import numpy as np def string_to_float(val): try: return float(val) except ValueError as e: raise n in model: res_count += len(chain) mod_conta...
false
true
f70073d75e19b01388a36182b6eeb036bacce511
2,604
py
Python
ExeProc/red/pythoncode/addressbook_pb2.py
vitorCamargo/distributed-systems
23a294a21b9d148a415429dcd326a978780a50d0
[ "MIT" ]
null
null
null
ExeProc/red/pythoncode/addressbook_pb2.py
vitorCamargo/distributed-systems
23a294a21b9d148a415429dcd326a978780a50d0
[ "MIT" ]
null
null
null
ExeProc/red/pythoncode/addressbook_pb2.py
vitorCamargo/distributed-systems
23a294a21b9d148a415429dcd326a978780a50d0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: addressbook.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf...
30.635294
182
0.731183
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db ...
true
true
f7007426c0895ef71449b89c57011d35fd1a9bea
2,298
py
Python
tutorial/helpers.py
DEVESHTARASIA/big-data-tutorial
74e2aa1241c30913c5f12b9667f9d626002b98a2
[ "CC-BY-3.0" ]
56
2015-01-01T01:43:31.000Z
2021-10-04T17:47:40.000Z
tutorial/helpers.py
DEVESHTARASIA/big-data-tutorial
74e2aa1241c30913c5f12b9667f9d626002b98a2
[ "CC-BY-3.0" ]
null
null
null
tutorial/helpers.py
DEVESHTARASIA/big-data-tutorial
74e2aa1241c30913c5f12b9667f9d626002b98a2
[ "CC-BY-3.0" ]
51
2015-01-16T15:43:06.000Z
2021-10-06T18:29:05.000Z
""" Small helpers for code that is not shown in the notebooks """ from sklearn import neighbors, datasets, linear_model import pylab as pl import numpy as np from matplotlib.colors import ListedColormap # Create color maps for 3-class classification problem, as with iris cmap_light = ListedColormap(['#FFAAAA', '#AAFF...
31.479452
76
0.608355
from sklearn import neighbors, datasets, linear_model import pylab as pl import numpy as np from matplotlib.colors import ListedColormap cmap_light = ListedColormap(['#FFAAAA', '#AAFFAA', '#AAAAFF']) cmap_bold = ListedColormap(['#FF0000', '#00FF00', '#0000FF']) def plot_iris_knn(): iris = datasets.load_iris() ...
true
true
f7007438100c6e954cb5fc874048d000c8b4c1f5
3,253
py
Python
iwata/settings.py
gingerbeardman/iwata-asks-downloader
8b60b24bd7ad4c5a8b72e2cf9ab7557df65015d9
[ "MIT" ]
16
2020-01-05T14:55:01.000Z
2021-06-06T09:41:08.000Z
iwata/settings.py
gingerbeardman/iwata-asks-downloader
8b60b24bd7ad4c5a8b72e2cf9ab7557df65015d9
[ "MIT" ]
9
2020-01-05T16:42:36.000Z
2020-01-06T15:03:56.000Z
iwata/settings.py
gingerbeardman/iwata-asks-downloader
8b60b24bd7ad4c5a8b72e2cf9ab7557df65015d9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Scrapy settings for iwata project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # https://doc.scrapy.org/en/latest/topics/settings.html # https://doc.scrapy.org/en/latest/topics/...
33.885417
102
0.774055
BOT_NAME = 'iwata' SPIDER_MODULES = ['iwata.spiders'] NEWSPIDER_MODULE = 'iwata.spiders' ROBOTSTXT_OBEY = False ITEM_PIPELINES = { 'iwata.pipelines.MarkdownWriterPipeline': 300, 'scrapy.pipelines.images.ImagesPipeline': 400, } IMAGES_STORE = '_images' F...
true
true
f70074f951aabc6cf1fa5cd4f6fc099ca53429b3
4,050
py
Python
Examples/Host Record/update_host_record/update_host_record_form.py
kemori-bc/gateway-workflows
5aa1e3492b0c0b4ec23a6247ca92861cc77f2187
[ "Apache-2.0" ]
null
null
null
Examples/Host Record/update_host_record/update_host_record_form.py
kemori-bc/gateway-workflows
5aa1e3492b0c0b4ec23a6247ca92861cc77f2187
[ "Apache-2.0" ]
null
null
null
Examples/Host Record/update_host_record/update_host_record_form.py
kemori-bc/gateway-workflows
5aa1e3492b0c0b4ec23a6247ca92861cc77f2187
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 BlueCat Networks (USA) Inc. and its affiliates # # 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 applicabl...
34.033613
98
0.682469
from wtforms import SubmitField from bluecat.wtform_fields import ( Configuration, View, Zone, HostRecord, CustomStringField, PlainHTML, CustomBooleanField, ) from bluecat.server_endpoints import get_host_records_endpoint from bluecat.wtform_extensions import GatewayForm ...
true
true
f7007599d5407174b0644c00cd4a735463bb5b0e
12,011
py
Python
plugins/modules/oci_data_catalog_namespace_facts.py
LaudateCorpus1/oci-ansible-collection
2b1cd87b4d652a97c1ca752cfc4fdc4bdb37a7e7
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_data_catalog_namespace_facts.py
LaudateCorpus1/oci-ansible-collection
2b1cd87b4d652a97c1ca752cfc4fdc4bdb37a7e7
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_data_catalog_namespace_facts.py
LaudateCorpus1/oci-ansible-collection
2b1cd87b4d652a97c1ca752cfc4fdc4bdb37a7e7
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # Copyright (c) 2020, 2022 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
32.114973
151
0.589709
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { "metadata_version": "1.1", "status": ["preview"], "supported_by": "community", } DOCUMENTATION = """ --- module: oci_data_catalog_namespace_facts short_description: Fetches details about on...
true
true
f700763f7e7484369e4aaaf60e64c92af4f1f9e9
89
py
Python
api/run.py
clodonil/mytasks
0355c9a37139d3cd5aeef24e804a2e3f513136b6
[ "Apache-2.0" ]
null
null
null
api/run.py
clodonil/mytasks
0355c9a37139d3cd5aeef24e804a2e3f513136b6
[ "Apache-2.0" ]
null
null
null
api/run.py
clodonil/mytasks
0355c9a37139d3cd5aeef24e804a2e3f513136b6
[ "Apache-2.0" ]
null
null
null
from app import app app.run(app.config['HOST'], app.config['PORT'], app.config['DEBUG'])
29.666667
68
0.696629
from app import app app.run(app.config['HOST'], app.config['PORT'], app.config['DEBUG'])
true
true
f70076a50a1ec77000417afebe6c4b53d762ed40
81
py
Python
project/api/__init__.py
Shiqan/fortnite-replay-api
0ef42287a559b55864244961c3ccf7a697be740f
[ "MIT" ]
4
2019-05-16T12:52:40.000Z
2020-04-21T19:24:36.000Z
project/api/__init__.py
Shiqan/fortnite-replay-api
0ef42287a559b55864244961c3ccf7a697be740f
[ "MIT" ]
null
null
null
project/api/__init__.py
Shiqan/fortnite-replay-api
0ef42287a559b55864244961c3ccf7a697be740f
[ "MIT" ]
2
2021-03-23T13:27:02.000Z
2022-03-06T21:30:08.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- """ Fortnite replay api blueprint """
11.571429
29
0.592593
true
true
f70078f9bc488153bc2bdd1da52425628d5aa4e9
1,968
py
Python
tests/unit_tests/modules/s3/s3gis/KMLLayer.py
PeterDaveHello/eden
26174a9dde2f19cd3bc879694f373ad5f765b6ed
[ "MIT" ]
1
2017-07-22T18:49:34.000Z
2017-07-22T18:49:34.000Z
tests/unit_tests/modules/s3/s3gis/KMLLayer.py
PeterDaveHello/eden
26174a9dde2f19cd3bc879694f373ad5f765b6ed
[ "MIT" ]
null
null
null
tests/unit_tests/modules/s3/s3gis/KMLLayer.py
PeterDaveHello/eden
26174a9dde2f19cd3bc879694f373ad5f765b6ed
[ "MIT" ]
1
2019-12-16T15:14:46.000Z
2019-12-16T15:14:46.000Z
s3gis_tests = load_module("tests.unit_tests.modules.s3.s3gis") s3gis = s3gis_tests.s3gis def test_KMLLayer(): current.session.s3.debug = True current.request.utcnow = datetime.datetime.now() s3gis_tests.layer_test( db, db.gis_layer_kml, dict( name = "Test KML", ...
27.71831
79
0.490346
s3gis_tests = load_module("tests.unit_tests.modules.s3.s3gis") s3gis = s3gis_tests.s3gis def test_KMLLayer(): current.session.s3.debug = True current.request.utcnow = datetime.datetime.now() s3gis_tests.layer_test( db, db.gis_layer_kml, dict( name = "Test KML", ...
true
true
f70079abc23e2a4161a080f73867e8d2f28c4762
1,338
py
Python
examples/starwars/data.py
mdornseif/graphene-gae
a223d10b7558c7e8e6d190cd1297eba54878c4c8
[ "BSD-3-Clause" ]
128
2016-05-17T05:48:13.000Z
2021-11-08T12:45:59.000Z
examples/starwars/data.py
mdornseif/graphene-gae
a223d10b7558c7e8e6d190cd1297eba54878c4c8
[ "BSD-3-Clause" ]
42
2016-05-26T04:35:45.000Z
2021-03-25T21:28:05.000Z
examples/starwars/data.py
mdornseif/graphene-gae
a223d10b7558c7e8e6d190cd1297eba54878c4c8
[ "BSD-3-Clause" ]
13
2016-06-04T14:03:10.000Z
2020-10-01T06:18:43.000Z
from .models import Character, Faction, Ship __author__ = 'ekampf' def initialize(): human = Character(name='Human') human.put() droid = Character(name='Droid') droid.put() rebels = Faction(id="rebels", name='Alliance to Restore the Republic', hero_key=human.key) rebels.put() empire =...
26.235294
94
0.68012
from .models import Character, Faction, Ship __author__ = 'ekampf' def initialize(): human = Character(name='Human') human.put() droid = Character(name='Droid') droid.put() rebels = Faction(id="rebels", name='Alliance to Restore the Republic', hero_key=human.key) rebels.put() empire =...
true
true
f70079cc4279ef48d761d342b154ee50b32ac6d2
14,748
py
Python
rssant_cli/rss.py
dumpmemory/rssant
8bacf91bedc2d2fa35f3e8b0f6a8b8c2a712c1a6
[ "BSD-3-Clause" ]
null
null
null
rssant_cli/rss.py
dumpmemory/rssant
8bacf91bedc2d2fa35f3e8b0f6a8b8c2a712c1a6
[ "BSD-3-Clause" ]
null
null
null
rssant_cli/rss.py
dumpmemory/rssant
8bacf91bedc2d2fa35f3e8b0f6a8b8c2a712c1a6
[ "BSD-3-Clause" ]
null
null
null
import logging import time import json from collections import defaultdict import tqdm import click from django.utils import timezone from django.db import transaction, connection from django.db.models import Q from django.contrib.auth import get_user_model import rssant_common.django_setup # noqa:F401 from rssant_a...
34.865248
100
0.641782
import logging import time import json from collections import defaultdict import tqdm import click from django.utils import timezone from django.db import transaction, connection from django.db.models import Q from django.contrib.auth import get_user_model import rssant_common.django_setup from rssant_api.models i...
true
true
f7007aa840274af20197e60983ca3a3b63feaf8b
1,554
py
Python
solutions/REF_11_main.py
ManoloBrn/gcloudtraining17
8b72f16b3868239743c7a207fb44082d055da4e3
[ "Apache-2.0" ]
null
null
null
solutions/REF_11_main.py
ManoloBrn/gcloudtraining17
8b72f16b3868239743c7a207fb44082d055da4e3
[ "Apache-2.0" ]
null
null
null
solutions/REF_11_main.py
ManoloBrn/gcloudtraining17
8b72f16b3868239743c7a207fb44082d055da4e3
[ "Apache-2.0" ]
2
2016-11-28T05:36:44.000Z
2017-02-13T01:31:38.000Z
#!/usr/bin/env python import webapp2 from google.appengine.api import app_identity from google.appengine.api import mail from conference import ConferenceApi class SetAnnouncementHandler(webapp2.RequestHandler): def get(self): """Set Announcement in Memcache.""" header = self.request.headers.get('...
37.902439
72
0.623552
import webapp2 from google.appengine.api import app_identity from google.appengine.api import mail from conference import ConferenceApi class SetAnnouncementHandler(webapp2.RequestHandler): def get(self): header = self.request.headers.get('X-AppEngine-Cron', None) if not header: raise...
true
true
f7007aeadf7f3003bdb12b053d54a12891257329
5,750
py
Python
torchkit/models/vision/segmentation/unet.py
cosmic-cortex/torchkit
9f44c8a500a4345d81feac14b6b200c5d190283a
[ "MIT" ]
null
null
null
torchkit/models/vision/segmentation/unet.py
cosmic-cortex/torchkit
9f44c8a500a4345d81feac14b6b200c5d190283a
[ "MIT" ]
null
null
null
torchkit/models/vision/segmentation/unet.py
cosmic-cortex/torchkit
9f44c8a500a4345d81feac14b6b200c5d190283a
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable def pad_to_shape(this, shp): """ Not a very safe function. """ return F.pad(this, (0, shp[3] - this.shape[3], 0, shp[2] - this.shape[2])) class First(nn.Module): def __init__(self...
35.060976
100
0.602957
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable def pad_to_shape(this, shp): return F.pad(this, (0, shp[3] - this.shape[3], 0, shp[2] - this.shape[2])) class First(nn.Module): def __init__(self, in_channels, middle_channels, out_channels, dro...
true
true
f7007b869cca1c346ea889953e37448001e40b10
5,930
py
Python
run_decoding/run_decoding_WM_across_epochs_and_conditions.py
romquentin/decod_WM_Selection_and_maintenance
fc1bf2f21959795fbea731f642cc750c2b61bce2
[ "BSD-3-Clause" ]
7
2018-07-16T01:59:03.000Z
2021-07-28T09:48:13.000Z
run_decoding/run_decoding_WM_across_epochs_and_conditions.py
romquentin/decod_WM_Selection_and_maintenance
fc1bf2f21959795fbea731f642cc750c2b61bce2
[ "BSD-3-Clause" ]
1
2020-03-15T00:35:45.000Z
2020-04-17T09:54:38.000Z
run_decoding/run_decoding_WM_across_epochs_and_conditions.py
romquentin/decod_WM_Selection_and_maintenance
fc1bf2f21959795fbea731f642cc750c2b61bce2
[ "BSD-3-Clause" ]
4
2018-08-02T08:52:59.000Z
2021-12-17T11:43:47.000Z
"""Run decoding analyses in sensors space accross memory content and visual perception for the working memory task and save decoding performance""" # Authors: Romain Quentin <rom.quentin@gmail.com> # Jean-Remi King <jeanremi.king@gmail.com> # # License: BSD (3-clause) import os import os.path as op import nu...
41.468531
78
0.641147
import os import os.path as op import numpy as np import mne from h5io import read_hdf5 from mne.decoding import GeneralizingEstimator, LinearModel from sklearn.pipeline import make_pipeline from sklearn.preprocessing import StandardScaler from sklearn.linear_model import Ridge from sklearn.metrics import make_sc...
true
true
f7007b8f63065271ad10c75bc6357fbca374b88c
8,674
py
Python
test/sagemaker_tests/pytorch/inference/conftest.py
leezu/deep-learning-containers
52591228240ad88d1eb39f419ade93d3ca5ec695
[ "Apache-2.0" ]
null
null
null
test/sagemaker_tests/pytorch/inference/conftest.py
leezu/deep-learning-containers
52591228240ad88d1eb39f419ade93d3ca5ec695
[ "Apache-2.0" ]
null
null
null
test/sagemaker_tests/pytorch/inference/conftest.py
leezu/deep-learning-containers
52591228240ad88d1eb39f419ade93d3ca5ec695
[ "Apache-2.0" ]
null
null
null
# Copyright 2019-2020 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fil...
40.157407
113
0.715241
from __future__ import absolute_import import boto3 import os import logging import platform import pytest import shutil import sys import tempfile from sagemaker import LocalSession, Session from sagemaker.pytorch import PyTorch from .utils import image_utils logger = logging.getLogger(__name__) loggin...
true
true
f7007ce6b17b426ac80e33b7b3f19e6da1a19280
4,146
py
Python
dsbox/ml/visualization/metrics.py
Pandinosaurus/dsbox
aea56049025ed7e6e66427f8636286f8be1b6e03
[ "Apache-2.0" ]
16
2020-05-11T09:10:15.000Z
2021-04-13T08:43:28.000Z
dsbox/ml/visualization/metrics.py
Pandinosaurus/dsbox
aea56049025ed7e6e66427f8636286f8be1b6e03
[ "Apache-2.0" ]
1
2020-12-03T20:02:32.000Z
2020-12-03T20:02:32.000Z
dsbox/ml/visualization/metrics.py
Pandinosaurus/dsbox
aea56049025ed7e6e66427f8636286f8be1b6e03
[ "Apache-2.0" ]
1
2020-05-11T17:22:20.000Z
2020-05-11T17:22:20.000Z
import matplotlib.pyplot as plt import numpy as np import pandas as pd from sklearn.metrics import roc_curve, auc __author__ = "Aurélien Massiot" __credits__ = "https://github.com/octo-technology/bdacore" __license__ = "Apache 2.0" def plot_confusion_matrix(confusion_matrix, classes_list, normalize=True, figsize=(1...
31.409091
118
0.623493
import matplotlib.pyplot as plt import numpy as np import pandas as pd from sklearn.metrics import roc_curve, auc __author__ = "Aurélien Massiot" __credits__ = "https://github.com/octo-technology/bdacore" __license__ = "Apache 2.0" def plot_confusion_matrix(confusion_matrix, classes_list, normalize=True, figsize=(1...
true
true
f7007d740bcaf7a6890bc4f3746a71b835476624
75
py
Python
tests/csrf_tests/csrf_token_error_handler_urls.py
jpmallarino/django
659d2421c7adbbcd205604002d521d82d6b0b465
[ "BSD-3-Clause", "0BSD" ]
16
2019-08-10T12:24:06.000Z
2020-05-21T09:11:14.000Z
tests/csrf_tests/csrf_token_error_handler_urls.py
jpmallarino/django
659d2421c7adbbcd205604002d521d82d6b0b465
[ "BSD-3-Clause", "0BSD" ]
12
2019-08-10T11:55:29.000Z
2020-05-21T04:46:30.000Z
tests/csrf_tests/csrf_token_error_handler_urls.py
jpmallarino/django
659d2421c7adbbcd205604002d521d82d6b0b465
[ "BSD-3-Clause", "0BSD" ]
3
2019-08-20T13:29:34.000Z
2020-01-30T22:05:10.000Z
urlpatterns = [] handler404 = "csrf_tests.views.csrf_token_error_handler"
18.75
56
0.8
urlpatterns = [] handler404 = "csrf_tests.views.csrf_token_error_handler"
true
true
f7007dd29ef8b16e106db064eeeb8545c8e209c3
1,031
py
Python
clients/python/sust/api/climate_explorer/clientgen/test/test_physical_risk_summary_indicators.py
sustglobal/dev-center
817947b2a91500c634c4cac9063e5084efb2f8a6
[ "Apache-2.0" ]
null
null
null
clients/python/sust/api/climate_explorer/clientgen/test/test_physical_risk_summary_indicators.py
sustglobal/dev-center
817947b2a91500c634c4cac9063e5084efb2f8a6
[ "Apache-2.0" ]
6
2021-12-06T19:25:57.000Z
2022-03-01T20:58:55.000Z
clients/python/sust/api/climate_explorer/clientgen/test/test_physical_risk_summary_indicators.py
sustglobal/dev-center
817947b2a91500c634c4cac9063e5084efb2f8a6
[ "Apache-2.0" ]
1
2021-12-03T22:39:06.000Z
2021-12-03T22:39:06.000Z
""" Sust Global Climate Explorer API This API provides programmatic access to physical risk exposure data. For more guidance on using this API, please visit the Sust Global Dev Center: https://developers.sustglobal.com. # noqa: E501 The version of the OpenAPI document: beta Generated by: https://op...
28.638889
202
0.741028
import sys import unittest import sust.api.climate_explorer.clientgen from sust.api.climate_explorer.clientgen.model.physical_risk_summary_indicators import PhysicalRiskSummaryIndicators class TestPhysicalRiskSummaryIndicators(unittest.TestCase): def setUp(self): pass def tearDown(self): ...
true
true
f7007e7d6cadbb4707818ec05e6fcbc50ba52dfb
2,656
py
Python
sysinv/sysinv/sysinv/sysinv/common/service.py
starlingx-staging/stx-config
ccbf0392d1941e7cad6673f6351bd905a5a5d419
[ "Apache-2.0" ]
null
null
null
sysinv/sysinv/sysinv/sysinv/common/service.py
starlingx-staging/stx-config
ccbf0392d1941e7cad6673f6351bd905a5a5d419
[ "Apache-2.0" ]
null
null
null
sysinv/sysinv/sysinv/sysinv/common/service.py
starlingx-staging/stx-config
ccbf0392d1941e7cad6673f6351bd905a5a5d419
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- encoding: utf-8 -*- # # Copyright © 2012 eNovance <licensing@enovance.com> # # Author: Julien Danjou <julien@danjou.info> # # 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 Lice...
34.947368
79
0.622364
import socket from oslo_config import cfg from sysinv.openstack.common import context from sysinv.openstack.common import log from sysinv.openstack.common import periodic_task from sysinv.openstack.common import rpc from sysinv.openstack.common.rpc import service as rpc_service from oslo_service im...
true
true
f7007ecebe6e595cb0fbec944c1292dd13f2083b
1,680
py
Python
setup.py
sbrisard/rebin
a0abc9b6e6f82f3c80fe30129f139f1d54f78471
[ "BSD-3-Clause" ]
null
null
null
setup.py
sbrisard/rebin
a0abc9b6e6f82f3c80fe30129f139f1d54f78471
[ "BSD-3-Clause" ]
null
null
null
setup.py
sbrisard/rebin
a0abc9b6e6f82f3c80fe30129f139f1d54f78471
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import re import unittest from setuptools import setup def my_test_suite(): """From http://stackoverflow.com/questions/17001010/. """ test_loader = unittest.TestLoader() test_suite = test_loader.discover('tests', pattern='test_*.py') return test_suite with open('rebin.p...
32.307692
74
0.550595
import re import unittest from setuptools import setup def my_test_suite(): test_loader = unittest.TestLoader() test_suite = test_loader.discover('tests', pattern='test_*.py') return test_suite with open('rebin.py', 'r') as f: lines = f.read() version = re.search(r'^__version__\s*=\s*[\'"]([^\...
true
true
f7007ee1209e9e3b464ffcab4ffdfa1412233c4b
91,000
py
Python
src/metpy/calc/thermo.py
aschueth/MetPy
5e906c0fcfadccdc8514011d15d911243130d405
[ "BSD-3-Clause" ]
1
2021-08-16T13:07:33.000Z
2021-08-16T13:07:33.000Z
src/metpy/calc/thermo.py
aschueth/MetPy
5e906c0fcfadccdc8514011d15d911243130d405
[ "BSD-3-Clause" ]
null
null
null
src/metpy/calc/thermo.py
aschueth/MetPy
5e906c0fcfadccdc8514011d15d911243130d405
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2008,2015,2016,2017,2018,2019 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Contains a collection of thermodynamic calculations.""" import warnings import numpy as np import scipy.integrate as si import scipy.optimize as so from...
34.249153
95
0.664571
import warnings import numpy as np import scipy.integrate as si import scipy.optimize as so from .tools import (_greater_or_close, _less_or_close, _remove_nans, find_bounding_indices, find_intersections, first_derivative, get_layer) from .. import constants as mpconsts from ..cbook import broad...
true
true
f70080a8c5b6f93830a0ccc665937affad0153c6
33
py
Python
privacy/util/webhook.py
Justasic/Privacy.py
471e6669a1e22e539459bbeb24de4efd3b7a11e0
[ "BSD-3-Clause" ]
3
2019-11-04T16:11:36.000Z
2021-05-24T18:56:40.000Z
privacy/util/webhook.py
Justasic/Privacy.py
471e6669a1e22e539459bbeb24de4efd3b7a11e0
[ "BSD-3-Clause" ]
9
2019-11-09T01:47:58.000Z
2022-03-30T00:19:20.000Z
privacy/util/webhook.py
Justasic/Privacy.py
471e6669a1e22e539459bbeb24de4efd3b7a11e0
[ "BSD-3-Clause" ]
2
2020-08-12T03:22:29.000Z
2020-12-10T00:08:46.000Z
# TODO: maybe make this flexible
16.5
32
0.757576
true
true
f7008119dbfc3df53830c38b0b4d874106e6e295
1,207
py
Python
examples/progress-bar/custom-key-bindings.py
gousaiyang/python-prompt-toolkit
6237764658214af4c24633795d2571d2bd03375d
[ "BSD-3-Clause" ]
4,028
2015-01-02T16:31:38.000Z
2018-10-25T14:51:02.000Z
examples/progress-bar/custom-key-bindings.py
gousaiyang/python-prompt-toolkit
6237764658214af4c24633795d2571d2bd03375d
[ "BSD-3-Clause" ]
709
2018-10-25T22:36:52.000Z
2022-03-28T18:34:35.000Z
examples/progress-bar/custom-key-bindings.py
gousaiyang/python-prompt-toolkit
6237764658214af4c24633795d2571d2bd03375d
[ "BSD-3-Clause" ]
399
2018-10-26T18:08:46.000Z
2022-03-28T16:09:41.000Z
#!/usr/bin/env python """ A very simple progress bar which keep track of the progress as we consume an iterator. """ import os import signal import time from prompt_toolkit import HTML from prompt_toolkit.key_binding import KeyBindings from prompt_toolkit.patch_stdout import patch_stdout from prompt_toolkit.shortcuts ...
23.211538
79
0.614747
import os import signal import time from prompt_toolkit import HTML from prompt_toolkit.key_binding import KeyBindings from prompt_toolkit.patch_stdout import patch_stdout from prompt_toolkit.shortcuts import ProgressBar def main(): bottom_toolbar = HTML( ' <b>[f]</b> Print "f" <b>[q]</b> Abort <b>[x]<...
true
true
f700817b9394d6608b7a517ea91f3f68d7dd7ca4
15,460
py
Python
TwitterMiner_UserAllTweets.py
BrainRift/twitterminer
eda652dbf8f69c429707fd14969ba9e70ff97351
[ "MIT" ]
4
2019-06-12T20:03:47.000Z
2021-12-14T17:05:45.000Z
TwitterMiner_UserAllTweets.py
BrainRift/twitterminer
eda652dbf8f69c429707fd14969ba9e70ff97351
[ "MIT" ]
1
2019-06-20T01:32:06.000Z
2019-06-20T01:33:13.000Z
TwitterMiner_UserAllTweets.py
BrainRift/twitterminer
eda652dbf8f69c429707fd14969ba9e70ff97351
[ "MIT" ]
2
2020-01-03T03:43:03.000Z
2021-01-06T18:45:49.000Z
#!/usr/bin/env python # encoding: utf-8 import os import sqlite3 as lite import sys import json import time import urllib.request import tweepy from TwitterMiner_Keys import * from tweepy import OAuthHandler from TwitterMiner_settings import * import hashlib #from Twitter_validate import validate_image def dump_hash...
42.944444
153
0.504657
import os import sqlite3 as lite import sys import json import time import urllib.request import tweepy from TwitterMiner_Keys import * from tweepy import OAuthHandler from TwitterMiner_settings import * import hashlib def dump_hash(twitter_dump): data_hash = None dump = hashlib.sha1() dump.update(tw...
true
true
f70082354fbf968017c0cf3ef52caa845a6bb7ca
5,156
py
Python
onlinecourse/migrations/0001_initial.py
Safia2202/onlinecourseibm
1818bb81b0c22cc237dcf5ee24381783b8d3f8fc
[ "Apache-2.0" ]
null
null
null
onlinecourse/migrations/0001_initial.py
Safia2202/onlinecourseibm
1818bb81b0c22cc237dcf5ee24381783b8d3f8fc
[ "Apache-2.0" ]
null
null
null
onlinecourse/migrations/0001_initial.py
Safia2202/onlinecourseibm
1818bb81b0c22cc237dcf5ee24381783b8d3f8fc
[ "Apache-2.0" ]
1
2021-03-19T09:38:51.000Z
2021-03-19T09:38:51.000Z
# Generated by Django 3.1.3 on 2021-03-13 11:57 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUT...
47.302752
210
0.585531
from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ ...
true
true
f700828dd6b4498dce5f1f79ff761916bbd8bed5
33,203
py
Python
indico/modules/categories/controllers/display.py
bnavigator/indico
2881b6ea69ef992396a3a147f61d8598c11f41c9
[ "MIT" ]
1
2019-11-03T11:34:16.000Z
2019-11-03T11:34:16.000Z
indico/modules/categories/controllers/display.py
NP-compete/indico
80db7ca0ef9d1f3240a16b9ff2d84bf0bf26c549
[ "MIT" ]
null
null
null
indico/modules/categories/controllers/display.py
NP-compete/indico
80db7ca0ef9d1f3240a16b9ff2d84bf0bf26c549
[ "MIT" ]
null
null
null
# This file is part of Indico. # Copyright (C) 2002 - 2019 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals from datetime import date, datetime, time, timedelta from functoo...
47.981214
120
0.640033
from __future__ import unicode_literals from datetime import date, datetime, time, timedelta from functools import partial from io import BytesIO from itertools import chain, groupby, imap from math import ceil from operator import attrgetter, itemgetter from time import mktime import dateutil from dateutil.re...
true
true
f70082df53201fc2c56287cc36465ce81430d5e2
43,776
py
Python
python/tvm/relay/op/strategy/generic.py
xndcn/tvm
7a20b4a490acbdcefa92c9b7c68188139f4916a3
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
null
null
null
python/tvm/relay/op/strategy/generic.py
xndcn/tvm
7a20b4a490acbdcefa92c9b7c68188139f4916a3
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
null
null
null
python/tvm/relay/op/strategy/generic.py
xndcn/tvm
7a20b4a490acbdcefa92c9b7c68188139f4916a3
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
34.442172
100
0.690927
import logging import re from tvm import topi, _ffi, te, ir from tvm.topi.utils import get_const_int, get_const_float, get_const_tuple, get_float_tuple from tvm.target import generic_func, override_native_generic_func from .. import op as _op logger = logging.getLogger("strategy") def naive_schedul...
true
true
f700831c65772de4a694995aa5bd1a37f57f8a1c
11,955
py
Python
googlemaps_helpers/main.py
mrcagney/googlemaps_helpers
75dfcc3e5e788d04c3af3e7608909b349ac83e8d
[ "MIT" ]
1
2017-06-25T17:58:37.000Z
2017-06-25T17:58:37.000Z
googlemaps_helpers/main.py
araichev/googlemaps_helpers
75dfcc3e5e788d04c3af3e7608909b349ac83e8d
[ "MIT" ]
null
null
null
googlemaps_helpers/main.py
araichev/googlemaps_helpers
75dfcc3e5e788d04c3af3e7608909b349ac83e8d
[ "MIT" ]
null
null
null
from itertools import product import math from collections import OrderedDict from pathlib import Path import logging import pandas as pd import numpy as np import geopandas as gpd import shapely.geometry as sg import googlemaps # Configure logging logger = logging.getLogger() handler = logging.StreamHandler() forma...
36.448171
76
0.658302
from itertools import product import math from collections import OrderedDict from pathlib import Path import logging import pandas as pd import numpy as np import geopandas as gpd import shapely.geometry as sg import googlemaps logger = logging.getLogger() handler = logging.StreamHandler() formatter = logging.Form...
true
true
f700833e6a88443d785e41ccd0504c32a9ae21bb
12,489
py
Python
locust/test/test_runners.py
wenlongyan/locust
777d1cc9c8dd93fc8693f06780cbf8166fe137df
[ "MIT" ]
1
2019-10-18T10:18:20.000Z
2019-10-18T10:18:20.000Z
locust/test/test_runners.py
wenlongyan/locust
777d1cc9c8dd93fc8693f06780cbf8166fe137df
[ "MIT" ]
null
null
null
locust/test/test_runners.py
wenlongyan/locust
777d1cc9c8dd93fc8693f06780cbf8166fe137df
[ "MIT" ]
null
null
null
import unittest import gevent from gevent import sleep from gevent.queue import Queue import mock from locust import events from locust.core import Locust, TaskSet, task from locust.exception import LocustError from locust.main import parse_options from locust.rpc import Message from locust.runners import LocalLocust...
40.417476
129
0.57899
import unittest import gevent from gevent import sleep from gevent.queue import Queue import mock from locust import events from locust.core import Locust, TaskSet, task from locust.exception import LocustError from locust.main import parse_options from locust.rpc import Message from locust.runners import LocalLocust...
true
true
f70083f0a986985862c8523f29ef60425bd92fd6
1,690
py
Python
revoke.py
jarviswwong/openssl-ca-server
7e966d5c1e9be28466553cb7b8e9a94cdf5d22ee
[ "MIT" ]
3
2021-07-29T09:49:08.000Z
2021-11-25T11:42:34.000Z
revoke.py
Damoclesword/openssl-ca-server
7e966d5c1e9be28466553cb7b8e9a94cdf5d22ee
[ "MIT" ]
null
null
null
revoke.py
Damoclesword/openssl-ca-server
7e966d5c1e9be28466553cb7b8e9a94cdf5d22ee
[ "MIT" ]
2
2020-04-28T23:34:44.000Z
2021-06-10T05:34:36.000Z
import os import datetime import hashlib import pexpect from config import * from common import openssl, jsonMessage, gencrl from OpenSSL import crypto # 通过证书文件吊销证书 def revokeFromCert(cert): # 读取证书数据 try: x509_obj = crypto.load_certificate(crypto.FILETYPE_PEM, cert) # get_serial_number返回10进制的s...
29.137931
79
0.634911
import os import datetime import hashlib import pexpect from config import * from common import openssl, jsonMessage, gencrl from OpenSSL import crypto def revokeFromCert(cert): try: x509_obj = crypto.load_certificate(crypto.FILETYPE_PEM, cert) serial = hex(x509_obj.get_serial_numbe...
true
true
f700848773d400c4ada7594725b4d25b98b7c121
1,536
py
Python
dev/circuitpython/examples/neotrellis_simpletest.py
scripsi/picodeebee
0ec77e92f09fa8711705623482e57a5e0b702696
[ "MIT" ]
7
2021-03-15T10:06:20.000Z
2022-03-23T02:53:15.000Z
Lights/adafruit-circuitpython-bundle-6.x-mpy-20210310/examples/neotrellis_simpletest.py
IanSMoyes/SpiderPi
cc3469980ae87b92d0dc43c05dbd579f0fa8c4b1
[ "Apache-2.0" ]
5
2021-04-27T18:21:11.000Z
2021-05-02T14:17:14.000Z
Lights/adafruit-circuitpython-bundle-6.x-mpy-20210310/examples/neotrellis_simpletest.py
IanSMoyes/SpiderPi
cc3469980ae87b92d0dc43c05dbd579f0fa8c4b1
[ "Apache-2.0" ]
null
null
null
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries # SPDX-License-Identifier: MIT import time from board import SCL, SDA import busio from adafruit_neotrellis.neotrellis import NeoTrellis # create the i2c object for the trellis i2c_bus = busio.I2C(SCL, SDA) # create the trellis trellis = Ne...
27.428571
63
0.676432
import time from board import SCL, SDA import busio from adafruit_neotrellis.neotrellis import NeoTrellis i2c_bus = busio.I2C(SCL, SDA) trellis = NeoTrellis(i2c_bus) OFF = (0, 0, 0) RED = (255, 0, 0) YELLOW = (255, 150, 0) GREEN = (0, 255, 0) CYAN = (0, 255, 255) BLUE = (0, 0, 255) PURPLE = (...
true
true
f70085721ab1f27e1f288841c761b393cb3b5ed0
2,068
py
Python
MuPythonLibrary/Uefi/EdkII/VariableFormat_Test.py
matthewfcarlson/mu_pip_python_library
659538b80fd5c060e053e14a828d9d41161682a1
[ "BSD-2-Clause" ]
8
2019-10-05T09:06:39.000Z
2022-03-11T10:45:12.000Z
MuPythonLibrary/Uefi/EdkII/VariableFormat_Test.py
matthewfcarlson/mu_pip_python_library
659538b80fd5c060e053e14a828d9d41161682a1
[ "BSD-2-Clause" ]
3
2018-12-14T21:14:17.000Z
2019-04-18T20:26:55.000Z
MuPythonLibrary/Uefi/EdkII/VariableFormat_Test.py
matthewfcarlson/mu_pip_python_library
659538b80fd5c060e053e14a828d9d41161682a1
[ "BSD-2-Clause" ]
8
2019-05-10T19:18:39.000Z
2022-03-11T10:45:09.000Z
# @file VariableFormat_Test.py # Unit test harness for the VariableFormat module/classes. # ## # Copyright (c) 2017, Microsoft Corporation # # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redi...
38.296296
84
0.762089
import unittest import MuPythonLibrary.Uefi.EdkII.VariableFormat as VF class TestVariableHeader(unittest.TestCase): def test_set_name(self): var = VF.VariableHeader() test_name = "MyNewName" var.set_name(test_name) self.assertEqual(var.Name, test_name) ...
true
true
f7008588a2462d13b0cabd06be14dc705036a2fd
3,068
py
Python
yaql/tests/test_common.py
nzlosh/yaql
bb65fc64026d431ffb866d02825deb3a0e4b5943
[ "Apache-2.0" ]
112
2015-10-18T02:57:41.000Z
2022-03-28T18:26:36.000Z
yaql/tests/test_common.py
nzlosh/yaql
bb65fc64026d431ffb866d02825deb3a0e4b5943
[ "Apache-2.0" ]
3
2020-06-09T11:54:38.000Z
2021-04-30T06:12:37.000Z
yaql/tests/test_common.py
nzlosh/yaql
bb65fc64026d431ffb866d02825deb3a0e4b5943
[ "Apache-2.0" ]
27
2015-12-10T00:10:02.000Z
2022-03-20T21:51:01.000Z
# Copyright (c) 2015 Mirantis, 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...
38.35
78
0.622229
import yaql.tests class TestCommon(yaql.tests.TestCase): def test_null(self): self.assertIsNone(self.eval('null')) def test_true(self): res = self.eval('true') self.assertTrue(res) self.assertIsInstance(res, bool) def test_false(self): res = self.eva...
true
true
f70086097b2870bddac591ff695bf96e16de715d
7,800
py
Python
keras/saving/saved_model/layer_serialization.py
quantumalaviya/keras
8d874de12ed2e199d9528bfff891f4f60ee2a636
[ "Apache-2.0" ]
1
2021-09-11T21:25:20.000Z
2021-09-11T21:25:20.000Z
keras/saving/saved_model/layer_serialization.py
quantumalaviya/keras
8d874de12ed2e199d9528bfff891f4f60ee2a636
[ "Apache-2.0" ]
null
null
null
keras/saving/saved_model/layer_serialization.py
quantumalaviya/keras
8d874de12ed2e199d9528bfff891f4f60ee2a636
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 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...
42.162162
115
0.751154
from keras.mixed_precision import policy from keras.saving.saved_model import base_serialization from keras.saving.saved_model import constants from keras.saving.saved_model import save_impl from keras.saving.saved_model import serialized_attributes from keras.utils import generic_utils import tensorflow...
true
true
f700864adcc91b720f4dd4a166b39644acc7d0b2
76
py
Python
random number generation.py
Ratheshprabakar/Python-Programs
fca9d4f0b5f5f5693b3d7e25c6d890f4973dc19e
[ "MIT" ]
2
2019-07-10T06:32:05.000Z
2019-11-13T07:52:53.000Z
random number generation.py
Ratheshprabakar/Python-Programs
fca9d4f0b5f5f5693b3d7e25c6d890f4973dc19e
[ "MIT" ]
null
null
null
random number generation.py
Ratheshprabakar/Python-Programs
fca9d4f0b5f5f5693b3d7e25c6d890f4973dc19e
[ "MIT" ]
1
2019-10-12T06:56:13.000Z
2019-10-12T06:56:13.000Z
import random x=random.random() print("The Random number is",round(x,3))
19
41
0.710526
import random x=random.random() print("The Random number is",round(x,3))
true
true
f700867ec71ff7fa38349f5f83924777079c446f
1,627
py
Python
cmframework/src/cmframework/utils/cmpluginmanager.py
akraino-edge-stack/ta-config-manager
8a3f88d0dbf6afdb0130b9d35e563f8a54d15d44
[ "Apache-2.0" ]
null
null
null
cmframework/src/cmframework/utils/cmpluginmanager.py
akraino-edge-stack/ta-config-manager
8a3f88d0dbf6afdb0130b9d35e563f8a54d15d44
[ "Apache-2.0" ]
null
null
null
cmframework/src/cmframework/utils/cmpluginmanager.py
akraino-edge-stack/ta-config-manager
8a3f88d0dbf6afdb0130b9d35e563f8a54d15d44
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Nokia # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwar...
33.204082
74
0.653964
import re import logging from cmframework.apis import cmerror class CMPluginManager(object): def __init__(self, plugins_path): self.pluginlist = {} self.filterdict = {} self.plugins_path = plugins_path def load_plugin(self): raise cmerror.CMError('Not impl...
true
true
f70086a12cb7a805133ce4cd015dbd84c54c0b65
28
py
Python
ent2id/__init__.py
skojaku/ent2id
1483cc9430999db7a6598dfdf0afa7302ada4893
[ "CC0-1.0" ]
null
null
null
ent2id/__init__.py
skojaku/ent2id
1483cc9430999db7a6598dfdf0afa7302ada4893
[ "CC0-1.0" ]
null
null
null
ent2id/__init__.py
skojaku/ent2id
1483cc9430999db7a6598dfdf0afa7302ada4893
[ "CC0-1.0" ]
null
null
null
from ent2id.Ent2Id import *
14
27
0.785714
from ent2id.Ent2Id import *
true
true
f70086a2b3578a8b051c307075e29ccb0a1db0f5
5,775
py
Python
venv/Lib/site-packages/tencentcloud/hcm/v20181106/models.py
Lparksi/bot
8a38953d09436b60e8edff4ebe86bf19fe3b7046
[ "MIT" ]
3
2020-03-31T10:36:31.000Z
2020-04-23T12:01:10.000Z
venv/Lib/site-packages/tencentcloud/hcm/v20181106/models.py
Lparksi/bot
8a38953d09436b60e8edff4ebe86bf19fe3b7046
[ "MIT" ]
1
2020-07-16T14:51:26.000Z
2020-07-30T12:46:55.000Z
venv/Lib/site-packages/tencentcloud/hcm/v20181106/models.py
Lparksi/bot
8a38953d09436b60e8edff4ebe86bf19fe3b7046
[ "MIT" ]
null
null
null
# -*- coding: utf8 -*- # Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. 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...
33.381503
151
0.641732
from tencentcloud.common.abstract_model import AbstractModel class EvaluationRequest(AbstractModel): def __init__(self): self.SessionId = None self.Image = None self.HcmAppid = None self.Url = None self.SupportHorizontalImage = None self.RejectNonAri...
true
true
f70087c4c75215da4de26e95ab7e5bd813b1cd4c
9,438
py
Python
tests/utils/git_test.py
breml/rally
ea43beb6b60481ee77508da84605add571fc021d
[ "Apache-2.0" ]
null
null
null
tests/utils/git_test.py
breml/rally
ea43beb6b60481ee77508da84605add571fc021d
[ "Apache-2.0" ]
null
null
null
tests/utils/git_test.py
breml/rally
ea43beb6b60481ee77508da84605add571fc021d
[ "Apache-2.0" ]
null
null
null
# Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this f...
52.433333
134
0.703963
import os import logging import unittest.mock as mock from unittest import TestCase from esrally import exceptions from esrally.utils import git class GitTests(TestCase): def test_is_git_working_copy(self): test_dir = os.path.dirname(os.path.dirname(__file__)) self.asser...
true
true