hexsha
stringlengths
40
40
size
int64
10
805k
ext
stringclasses
6 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
176
max_stars_repo_name
stringlengths
7
114
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
176
max_issues_repo_name
stringlengths
7
114
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
48.5k
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
176
max_forks_repo_name
stringlengths
7
114
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
10
805k
avg_line_length
float64
5.53
11k
max_line_length
int64
10
129k
alphanum_fraction
float64
0.13
0.93
content_no_comment
stringlengths
0
449k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f700c6cfc5f9d8f51a0ee57bbf7174a70d5c088e
1,413
py
Python
hamgr/hamgr/db/versions/001_add_initial_tables.py
platform9/pf9-ha
7d64f9fe6b72fb4c1e5ed5d23e372a62c9e218a8
[ "Apache-2.0" ]
11
2016-09-06T09:59:29.000Z
2021-10-02T07:24:07.000Z
hamgr/hamgr/db/versions/001_add_initial_tables.py
platform9/pf9-ha
7d64f9fe6b72fb4c1e5ed5d23e372a62c9e218a8
[ "Apache-2.0" ]
5
2017-10-16T06:47:14.000Z
2020-07-06T07:20:13.000Z
hamgr/hamgr/db/versions/001_add_initial_tables.py
platform9/pf9-ha
7d64f9fe6b72fb4c1e5ed5d23e372a62c9e218a8
[ "Apache-2.0" ]
3
2016-09-01T06:20:51.000Z
2017-10-16T02:27:07.000Z
# Copyright (c) 2019 Platform9 Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
30.06383
74
0.740269
from sqlalchemy import Boolean from sqlalchemy import Column from sqlalchemy import DateTime from sqlalchemy import Integer from sqlalchemy import MetaData from sqlalchemy import String from sqlalchemy import Table meta = MetaData() cluster = Table( 'clusters', meta, Column('id', Integer, prima...
true
true
f700c70aaa457cdd5bf6ddadd89ea5f4c679594c
2,113
py
Python
scons/scons-local-2.3.3/SCons/Tool/sunf77.py
pedrishi/pdb2pqr_pypka
74f64948658d021a8bfc8fd78936ce4186ffc88e
[ "BSD-3-Clause" ]
null
null
null
scons/scons-local-2.3.3/SCons/Tool/sunf77.py
pedrishi/pdb2pqr_pypka
74f64948658d021a8bfc8fd78936ce4186ffc88e
[ "BSD-3-Clause" ]
null
null
null
scons/scons-local-2.3.3/SCons/Tool/sunf77.py
pedrishi/pdb2pqr_pypka
74f64948658d021a8bfc8fd78936ce4186ffc88e
[ "BSD-3-Clause" ]
null
null
null
"""SCons.Tool.sunf77 Tool-specific initialization for sunf77, the Sun Studio F77 compiler. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001 - 2014 The SCons Foundation # # Permission is...
33.015625
79
0.737814
__revision__ = "src/engine/SCons/Tool/sunf77.py 2014/08/24 12:12:31 garyo" import SCons.Util from FortranCommon import add_all_to_env compilers = ['sunf77', 'f77'] def generate(env): add_all_to_env(env) fcomp = env.Detect(compilers) or 'f77' env['FORTRAN'] = fcomp env['F77...
true
true
f700c767ff92c13aef1a23a878df02eea4e86053
3,656
py
Python
src/Application/PythonScriptModule/pymodules_old/circuits/core/values.py
antont/tundra
5c9b0a3957071f08ab425dff701cdbb34f9e1868
[ "Apache-2.0" ]
1
2018-04-02T15:38:10.000Z
2018-04-02T15:38:10.000Z
src/Application/PythonScriptModule/pymodules_old/circuits/core/values.py
antont/tundra
5c9b0a3957071f08ab425dff701cdbb34f9e1868
[ "Apache-2.0" ]
null
null
null
src/Application/PythonScriptModule/pymodules_old/circuits/core/values.py
antont/tundra
5c9b0a3957071f08ab425dff701cdbb34f9e1868
[ "Apache-2.0" ]
1
2021-09-04T12:37:34.000Z
2021-09-04T12:37:34.000Z
# Package: values # Date: 11th April 2010 # Author: James Mills, prologic at shortcircuit dot net dot au """Values This defines the Value object used by components and events. """ from types import ListType from itertools import imap from events import Event class ValueChanged(Event): """Value Changed E...
28.341085
78
0.602298
from types import ListType from itertools import imap from events import Event class ValueChanged(Event): def __init__(self, value): super(ValueChanged, self).__init__(value) class Value(object): def __init__(self, event=None, manager=None, onSet=None): self.event = event se...
true
true
f700c828e1ae0ff1deb8636e189c09f5c64ea253
20,605
py
Python
pumml/learners.py
ncfrey/mlmsynth
99fc8fabba511aefd6f0a0be4e85c78c54dd3648
[ "MIT" ]
20
2019-08-22T16:29:37.000Z
2021-12-14T10:35:57.000Z
pumml/learners.py
ncfrey/mlmsynth
99fc8fabba511aefd6f0a0be4e85c78c54dd3648
[ "MIT" ]
5
2020-04-25T02:59:03.000Z
2020-11-13T21:05:02.000Z
pumml/learners.py
ncfrey/mlmsynth
99fc8fabba511aefd6f0a0be4e85c78c54dd3648
[ "MIT" ]
10
2019-08-19T14:29:21.000Z
2022-01-22T03:08:00.000Z
""" Deploy semi-supervised PU machine learning models. This module provides classes for training, testing, and deploying a PU learning model for predicting material synthesizability. Utility functions for plotting aid in visualizing and analyzing results. References: [1] DOI: 10.1021/acsnano.8b08014 [2] DOI: ...
33.889803
88
0.586168
from sklearn.ensemble import RandomForestClassifier from sklearn.metrics import precision_recall_fscore_support from sklearn.cluster import KMeans from sklearn.mixture import GaussianMixture, BayesianGaussianMixture from sklearn.tree import DecisionTreeClassifier from sklearn.metrics import precision_recall_curve from...
true
true
f700c852a705d112cf9cacca70852bbd27ce7263
1,925
py
Python
tools/validators/instance_validator/tests/generate_universe_test.py
ljulliar/digitalbuildings
5b5be8db9e00d967911065f5247a8d39512e6504
[ "Apache-2.0" ]
null
null
null
tools/validators/instance_validator/tests/generate_universe_test.py
ljulliar/digitalbuildings
5b5be8db9e00d967911065f5247a8d39512e6504
[ "Apache-2.0" ]
null
null
null
tools/validators/instance_validator/tests/generate_universe_test.py
ljulliar/digitalbuildings
5b5be8db9e00d967911065f5247a8d39512e6504
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Google 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, sof...
35
80
0.78026
from __future__ import absolute_import from __future__ import division from __future__ import print_function from os import path from absl.testing import absltest from tests import test_constants from validate import generate_universe _DEFAULT_ONTOLOGY_LOCATION = test_constants.ONTOLOGY_ROOT _BAD_MODI...
true
true
f700c9c005ed5bc2dfc7fc9791084a3f9be88c91
3,443
py
Python
tests/learners/scikit_learn/test_gpr_skl.py
CitrineInformatics/smlb
28a3689bd36aa8d51031b4faf7e2331bbd8148a9
[ "Apache-2.0" ]
6
2020-07-27T21:08:55.000Z
2021-05-04T07:00:29.000Z
tests/learners/scikit_learn/test_gpr_skl.py
CitrineInformatics/smlb
28a3689bd36aa8d51031b4faf7e2331bbd8148a9
[ "Apache-2.0" ]
18
2020-09-01T00:47:04.000Z
2021-09-15T22:16:56.000Z
tests/learners/scikit_learn/test_gpr_skl.py
CitrineInformatics/smlb
28a3689bd36aa8d51031b4faf7e2331bbd8148a9
[ "Apache-2.0" ]
2
2020-08-24T21:50:16.000Z
2020-12-06T05:18:57.000Z
"""GaussianProcessRegressionSklearn tests. Scientific Machine Learning Benchmark: A benchmark of regression models in chem- and materials informatics. """ import pytest import numpy as np skl = pytest.importorskip("sklearn") import smlb from smlb.learners.scikit_learn.gaussian_process_regression_sklearn import Gau...
38.255556
107
0.711008
import pytest import numpy as np skl = pytest.importorskip("sklearn") import smlb from smlb.learners.scikit_learn.gaussian_process_regression_sklearn import GaussianProcessRegressionSklearn def test_GaussianProcessRegressionSklearn_1(): kernel = skl.gaussian_process.kernels.DotProduct(sigma_0=0, sigma_0...
true
true
f700cb5fa6b3a65b0f27e583671a9cfd14e15279
486
py
Python
Algorithms/Implementation/picking-numbers.py
Owngithub10101/Hackerrank-Problem-Solving
4e35b609c9f5b94c5bda292b9991baa054a944b6
[ "MIT" ]
23
2020-02-28T16:18:48.000Z
2021-12-21T11:51:07.000Z
Algorithms/Implementation/picking-numbers.py
ramanagali/Hackerrank-Problem-Solving
98f654f984013140d52b9a344146e9e38e46fb81
[ "MIT" ]
null
null
null
Algorithms/Implementation/picking-numbers.py
ramanagali/Hackerrank-Problem-Solving
98f654f984013140d52b9a344146e9e38e46fb81
[ "MIT" ]
16
2020-04-08T10:46:39.000Z
2021-11-15T03:46:56.000Z
# Picking Numbers # Developer: Murillo Grubler # Link: https://www.hackerrank.com/challenges/picking-numbers/problem def picking_number(n, arr): max_combinations = 0 for i in range(n): combination = arr.count(arr[i]) + arr.count(arr[i] + 1) if combination > max_combinations: max_co...
32.4
69
0.674897
def picking_number(n, arr): max_combinations = 0 for i in range(n): combination = arr.count(arr[i]) + arr.count(arr[i] + 1) if combination > max_combinations: max_combinations = combination return max_combinations n = int(input().strip()) a = [int(a_temp) for a_temp in inpu...
true
true
f700cc1f7004dfa3ecb59471f0af8c146b7edf34
1,280
py
Python
python/script/run_cleaning_cache.py
aachenmax/vmaf
e65143f36ac9324a1242614bdd6256861d4f46f6
[ "BSD-2-Clause-Patent" ]
2,874
2016-06-06T16:11:37.000Z
2022-03-31T10:10:22.000Z
python/script/run_cleaning_cache.py
aachenmax/vmaf
e65143f36ac9324a1242614bdd6256861d4f46f6
[ "BSD-2-Clause-Patent" ]
619
2016-06-07T19:30:53.000Z
2022-03-31T16:36:05.000Z
python/script/run_cleaning_cache.py
aachenmax/vmaf
e65143f36ac9324a1242614bdd6256861d4f46f6
[ "BSD-2-Clause-Patent" ]
723
2016-06-05T02:44:33.000Z
2022-03-31T03:29:12.000Z
#!/usr/bin/env python3 import os import sys from vmaf.core.quality_runner import QualityRunner from vmaf.core.result_store import FileSystemResultStore from vmaf.routine import run_remove_results_for_dataset from vmaf.tools.misc import import_python_file __copyright__ = "Copyright 2016-2020, Netflix, Inc." __license__...
23.703704
72
0.666406
import os import sys from vmaf.core.quality_runner import QualityRunner from vmaf.core.result_store import FileSystemResultStore from vmaf.routine import run_remove_results_for_dataset from vmaf.tools.misc import import_python_file __copyright__ = "Copyright 2016-2020, Netflix, Inc." __license__ = "BSD+Patent" def ...
true
true
f700cc2db4300e6b6c079786b6be91828b98ea16
2,146
py
Python
src/cupyopt/nuggets/dataframe.py
d33bs/cupyopt
b29724d574667be8023d50ffc80113e0a7bb218e
[ "Apache-2.0" ]
3
2021-08-10T16:38:23.000Z
2022-01-03T19:12:11.000Z
src/cupyopt/nuggets/dataframe.py
d33bs/cupyopt
b29724d574667be8023d50ffc80113e0a7bb218e
[ "Apache-2.0" ]
7
2022-01-03T19:45:05.000Z
2022-03-16T19:48:16.000Z
src/cupyopt/nuggets/dataframe.py
UCBoulder/cupyopt
fcfcef33553c2e453cd222bb6c02492f1e4b1963
[ "Apache-2.0" ]
null
null
null
""" Dataframe functions """ import logging import os from tempfile import mkstemp import pandas as pd from box import Box # pylint: disable=too-many-arguments logger = logging.getLogger(__name__) # pylint: disable=C0103 def pd_export( dataframe: pd.DataFrame, export_type: str, df_name: str, temp_n...
27.87013
88
0.676142
import logging import os from tempfile import mkstemp import pandas as pd from box import Box logger = logging.getLogger(__name__) def pd_export( dataframe: pd.DataFrame, export_type: str, df_name: str, temp_name: bool = False, df_name_prefix: str = "", df_name_suffix: str = "", dir_...
true
true
f700ccaf9f6d6e05af8e6c7133accb6e5c06ec6f
23
py
Python
utils/__init__.py
alexandrepoirier/XB1_SYNTH
b97ed09829e54c15ff64d8881dce3f8ff7dc38bc
[ "MIT" ]
null
null
null
utils/__init__.py
alexandrepoirier/XB1_SYNTH
b97ed09829e54c15ff64d8881dce3f8ff7dc38bc
[ "MIT" ]
null
null
null
utils/__init__.py
alexandrepoirier/XB1_SYNTH
b97ed09829e54c15ff64d8881dce3f8ff7dc38bc
[ "MIT" ]
null
null
null
from .MidiInfo import *
23
23
0.782609
from .MidiInfo import *
true
true
f700ccd0c37daf9880b1808354c4f39fac9ad540
948
py
Python
location.py
TonyJenkins/redesigned-octo-palm-tree
a88b751a9ad023731ddecd1f30cc13a4dea8e434
[ "Unlicense" ]
1
2017-03-30T16:19:05.000Z
2017-03-30T16:19:05.000Z
location.py
TonyJenkins/redesigned-octo-palm-tree
a88b751a9ad023731ddecd1f30cc13a4dea8e434
[ "Unlicense" ]
null
null
null
location.py
TonyJenkins/redesigned-octo-palm-tree
a88b751a9ad023731ddecd1f30cc13a4dea8e434
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 import argparse import json import urllib.request if __name__ == '__main__': parser = argparse.ArgumentParser () parser.add_argument ('-v', '--verbose', help = 'Enable Verbose Mode', action = 'store_true') parser.add_argument ('-ip', help = 'IP Address to Test') args = parser.parse_arg...
30.580645
94
0.556962
import argparse import json import urllib.request if __name__ == '__main__': parser = argparse.ArgumentParser () parser.add_argument ('-v', '--verbose', help = 'Enable Verbose Mode', action = 'store_true') parser.add_argument ('-ip', help = 'IP Address to Test') args = parser.parse_args () if args.ip: ...
true
true
f700ce19f231a90c836b91d616c94f8404fc8fd4
17,895
py
Python
core/model.py
superstap/jimi
d921b815c726e169c5a35f01a81eea8a75b8321d
[ "Apache-2.0" ]
null
null
null
core/model.py
superstap/jimi
d921b815c726e169c5a35f01a81eea8a75b8321d
[ "Apache-2.0" ]
null
null
null
core/model.py
superstap/jimi
d921b815c726e169c5a35f01a81eea8a75b8321d
[ "Apache-2.0" ]
null
null
null
import os import json from pathlib import Path import jimi # Initialize dbCollectionName = "model" class _model(jimi.db._document): name = str() className = str() classType = str() location = str() hidden = bool() manifest = dict() _dbCollection = jimi.db.db[dbCollectionName] def ne...
59.65
231
0.484325
import os import json from pathlib import Path import jimi dbCollectionName = "model" class _model(jimi.db._document): name = str() className = str() classType = str() location = str() hidden = bool() manifest = dict() _dbCollection = jimi.db.db[dbCollectionName] def new(self,name,...
true
true
f700cf5b133d1f6bcaf30ab756470f1a226e2fa5
7,671
py
Python
cs3api4lab/tests/test_locks.py
SoftwareMind-ScienceMesh-org/cs3api4lab
3de2e3d9fcb920110697686fa37ac06257cd650e
[ "Apache-2.0" ]
null
null
null
cs3api4lab/tests/test_locks.py
SoftwareMind-ScienceMesh-org/cs3api4lab
3de2e3d9fcb920110697686fa37ac06257cd650e
[ "Apache-2.0" ]
null
null
null
cs3api4lab/tests/test_locks.py
SoftwareMind-ScienceMesh-org/cs3api4lab
3de2e3d9fcb920110697686fa37ac06257cd650e
[ "Apache-2.0" ]
null
null
null
import json from unittest import TestCase from time import sleep from cs3api4lab.tests.share_test_base import ShareTestBase from traitlets.config import LoggingConfigurable import urllib.parse class TestLocks(ShareTestBase, TestCase): einstein_id = '4c510ada-c86b-4815-8820-42cdf82c3d51' einstein_idp = 'cernbo...
47.06135
160
0.671229
import json from unittest import TestCase from time import sleep from cs3api4lab.tests.share_test_base import ShareTestBase from traitlets.config import LoggingConfigurable import urllib.parse class TestLocks(ShareTestBase, TestCase): einstein_id = '4c510ada-c86b-4815-8820-42cdf82c3d51' einstein_idp = 'cernbo...
true
true
f700d08368e70d12a9fe5d31f3bb701d4f1002f4
7,826
py
Python
vissl/data/ssl_transforms/__init__.py
pcanas/vissl
d293b8295f03a4caeaebd25f3e5ed38866dd4d10
[ "MIT" ]
null
null
null
vissl/data/ssl_transforms/__init__.py
pcanas/vissl
d293b8295f03a4caeaebd25f3e5ed38866dd4d10
[ "MIT" ]
null
null
null
vissl/data/ssl_transforms/__init__.py
pcanas/vissl
d293b8295f03a4caeaebd25f3e5ed38866dd4d10
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from pathlib import Path from typing import Any, Dict import torchvision.transforms as pth_transforms from classy_vision.dataset.transforms im...
41.407407
91
0.669307
from pathlib import Path from typing import Any, Dict import torchvision.transforms as pth_transforms from classy_vision.dataset.transforms import build_transform, register_transform from classy_vision.dataset.transforms.classy_transform import ClassyTransform from classy_vision.generic.registry_utils import impo...
true
true
f700d1f41ebb403d3a84638d399c5f99730dafef
470
py
Python
plotly/validators/layout/scene/zaxis/_categoryarraysrc.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
2
2020-03-24T11:41:14.000Z
2021-01-14T07:59:43.000Z
plotly/validators/layout/scene/zaxis/_categoryarraysrc.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
null
null
null
plotly/validators/layout/scene/zaxis/_categoryarraysrc.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
4
2019-06-03T14:49:12.000Z
2022-01-06T01:05:12.000Z
import _plotly_utils.basevalidators class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name='categoryarraysrc', parent_name='layout.scene.zaxis', **kwargs ): super(CategoryarraysrcValidator, self).__init__( ...
24.736842
75
0.617021
import _plotly_utils.basevalidators class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name='categoryarraysrc', parent_name='layout.scene.zaxis', **kwargs ): super(CategoryarraysrcValidator, self).__init__( ...
true
true
f700d29025437917f4c7b0d0e788e73f4ece2f27
1,295
py
Python
setup.py
fabiobatalha/wayta
e4d2b9f619f38ec31055bae918ff02046f27825e
[ "BSD-2-Clause" ]
null
null
null
setup.py
fabiobatalha/wayta
e4d2b9f619f38ec31055bae918ff02046f27825e
[ "BSD-2-Clause" ]
null
null
null
setup.py
fabiobatalha/wayta
e4d2b9f619f38ec31055bae918ff02046f27825e
[ "BSD-2-Clause" ]
null
null
null
import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.txt')) as f: README = f.read() with open(os.path.join(here, 'CHANGES.txt')) as f: CHANGES = f.read() requires = [ 'elasticsearch', 'pyramid', 'pyramid_chame...
26.428571
111
0.620077
import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.txt')) as f: README = f.read() with open(os.path.join(here, 'CHANGES.txt')) as f: CHANGES = f.read() requires = [ 'elasticsearch', 'pyramid', 'pyramid_chame...
true
true
f700d349785d32abf8d10d9e46ea09cced369e49
12,762
py
Python
tensorflow/python/platform/default/_gfile.py
ln0119/tensorflow-fast-rcnn
e937e6394818c9a320754237651d7fe083b1020d
[ "Apache-2.0" ]
73
2017-01-05T09:06:08.000Z
2021-11-06T14:00:50.000Z
tensorflow/python/platform/default/_gfile.py
minhhoai2/tensorflow
da88903d5e29230d68d861053aa1dea1432c0696
[ "Apache-2.0" ]
8
2017-04-10T10:36:20.000Z
2021-02-07T01:02:32.000Z
tensorflow/python/platform/default/_gfile.py
minhhoai2/tensorflow
da88903d5e29230d68d861053aa1dea1432c0696
[ "Apache-2.0" ]
151
2016-11-10T09:01:15.000Z
2022-01-18T08:13:49.000Z
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
28.172185
84
0.681555
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import errno import functools import glob as _glob import os import shutil import threading import six class _GFileBase(six.Iterator): def _synchronized(fn): @fun...
true
true
f700d35286f0c2a1efc2a733ed08780f7bb2901e
3,846
py
Python
azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
1
2022-03-30T22:39:15.000Z
2022-03-30T22:39:15.000Z
azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
54
2016-03-25T17:25:01.000Z
2018-10-22T17:27:54.000Z
azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
2
2017-01-20T18:25:46.000Z
2017-05-12T21:31:47.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
38.848485
144
0.632865
import uuid from msrest.pipeline import ClientRawResponse from .. import models class EdgeNodesOperations(object): models = models def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deseria...
true
true
f700d4316842c3ceb0981946e2d5fd713d664c46
190,376
py
Python
pandas/core/frame.py
lmarti/pandas
fdfd66cdf3f357fb52831eb644897e144a0d7f30
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
pandas/core/frame.py
lmarti/pandas
fdfd66cdf3f357fb52831eb644897e144a0d7f30
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
pandas/core/frame.py
lmarti/pandas
fdfd66cdf3f357fb52831eb644897e144a0d7f30
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
2
2016-02-26T05:47:12.000Z
2020-01-08T18:05:00.000Z
""" DataFrame --------- An efficient 2D container for potentially mixed-type time series or other labeled data series. Similar to its R counterpart, data.frame, except providing automatic data alignment and a host of useful data manipulation methods having to do with the labeling information """ from __future__ import...
37.066978
120
0.544134
from __future__ import division import functools import collections import itertools import sys import types import warnings from numpy import nan as NA import numpy as np import numpy.ma as ma from pandas.core.common import (isnull, notnull, PandasError, _try_sort, _default_index, ...
true
true
f700d457ceccdb1435f157493066afbfc7b6f6f1
256
py
Python
geo_agent/test/overwrite_geojson.py
kevjp/openstreetmap-carto
be30cfe8d73f78cb4b5ba9acaaf42a942c70270d
[ "CC0-1.0" ]
null
null
null
geo_agent/test/overwrite_geojson.py
kevjp/openstreetmap-carto
be30cfe8d73f78cb4b5ba9acaaf42a942c70270d
[ "CC0-1.0" ]
null
null
null
geo_agent/test/overwrite_geojson.py
kevjp/openstreetmap-carto
be30cfe8d73f78cb4b5ba9acaaf42a942c70270d
[ "CC0-1.0" ]
null
null
null
import geopandas import shapely.geometry gdf = geopandas.GeoDataFrame(geometry=[shapely.geometry.Point(x, x) for x in [5,4,3,2]]) gdf.index.name = 'id' gdf.to_file("test.geojson", index=True, driver='GeoJSON') gdf.to_file("test.geojson1", driver='GeoJSON')
42.666667
88
0.75
import geopandas import shapely.geometry gdf = geopandas.GeoDataFrame(geometry=[shapely.geometry.Point(x, x) for x in [5,4,3,2]]) gdf.index.name = 'id' gdf.to_file("test.geojson", index=True, driver='GeoJSON') gdf.to_file("test.geojson1", driver='GeoJSON')
true
true
f700d475269b885063676b9344c7da5676553cc3
18,143
py
Python
src/sage/groups/semimonomial_transformations/semimonomial_transformation_group.py
sensen1/sage
d6c5cd9be78cc448ee4c54bac93385b1244a234c
[ "BSL-1.0" ]
1,742
2015-01-04T07:06:13.000Z
2022-03-30T11:32:52.000Z
src/sage/groups/semimonomial_transformations/semimonomial_transformation_group.py
sensen1/sage
d6c5cd9be78cc448ee4c54bac93385b1244a234c
[ "BSL-1.0" ]
66
2015-03-19T19:17:24.000Z
2022-03-16T11:59:30.000Z
src/sage/groups/semimonomial_transformations/semimonomial_transformation_group.py
sensen1/sage
d6c5cd9be78cc448ee4c54bac93385b1244a234c
[ "BSL-1.0" ]
495
2015-01-10T10:23:18.000Z
2022-03-24T22:06:11.000Z
r""" Semimonomial transformation group The semimonomial transformation group of degree `n` over a ring `R` is the semidirect product of the monomial transformation group of degree `n` (also known as the complete monomial group over the group of units `R^{\times}` of `R`) and the group of ring automorphisms. The multi...
35.926733
122
0.532933
from sage.rings.integer import Integer from sage.groups.group import FiniteGroup from sage.structure.unique_representation import UniqueRepresentation from sage.categories.action import Action from sage.combinat.permutation import Permutation from sage.groups.semimonomial_transformations.semimonomial_transformation im...
true
true
f700d48ef6a50160f2fb6218e975fdfbb19d16bb
199
py
Python
mbpo/static/reacher.py
AIDefender/MyMBPO
d75699b65af8eea14acffc1b5738900d1079ad46
[ "MIT" ]
null
null
null
mbpo/static/reacher.py
AIDefender/MyMBPO
d75699b65af8eea14acffc1b5738900d1079ad46
[ "MIT" ]
null
null
null
mbpo/static/reacher.py
AIDefender/MyMBPO
d75699b65af8eea14acffc1b5738900d1079ad46
[ "MIT" ]
null
null
null
import numpy as np class StaticFns: @staticmethod def termination_fn(obs, act, next_obs): done = np.array([False]).repeat(len(obs)) done = done[:,None] return done
18.090909
49
0.613065
import numpy as np class StaticFns: @staticmethod def termination_fn(obs, act, next_obs): done = np.array([False]).repeat(len(obs)) done = done[:,None] return done
true
true
f700d53f312546235262c209dd86926fb0027889
44,327
py
Python
networkx_mod/classes/digraph.py
movingpictures83/MATria
d3dbd0d15e00dbc26db39ace0663868180fdc471
[ "BSD-3-Clause", "MIT" ]
null
null
null
networkx_mod/classes/digraph.py
movingpictures83/MATria
d3dbd0d15e00dbc26db39ace0663868180fdc471
[ "BSD-3-Clause", "MIT" ]
null
null
null
networkx_mod/classes/digraph.py
movingpictures83/MATria
d3dbd0d15e00dbc26db39ace0663868180fdc471
[ "BSD-3-Clause", "MIT" ]
null
null
null
"""Base class for directed graphs.""" # Copyright (C) 2004-2015 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. from copy import deepcopy import networkx_mod as nx from networkx_mod.classes.graph import Graph...
33.055183
79
0.553816
from copy import deepcopy import networkx_mod as nx from networkx_mod.classes.graph import Graph from networkx_mod.exception import NetworkXError import networkx_mod.convert as convert __author__ = """\n""".join(['Aric Hagberg (hagberg@lanl.gov)', 'Pieter Swart (swart@lanl.gov)', ...
true
true
f700d5697d622d86217bf9023751cd36a04be139
1,937
py
Python
app/__init__.py
NewbieTechTeam/USSD-Python-Demo
1bd839f7908c0cdafb06a4418ec3f2f42a4898ed
[ "MIT" ]
51
2017-09-05T10:31:16.000Z
2022-02-07T10:35:22.000Z
app/__init__.py
MalingasCUMBANE/USSD-Python-Demo
695c5e5e1b73e4203f45d29e58b2730f3cafd6ff
[ "MIT" ]
3
2019-07-08T09:28:18.000Z
2021-06-01T23:59:11.000Z
app/__init__.py
MalingasCUMBANE/USSD-Python-Demo
695c5e5e1b73e4203f45d29e58b2730f3cafd6ff
[ "MIT" ]
56
2017-04-19T10:02:41.000Z
2022-03-04T12:15:07.000Z
import logging import logging.config import os from celery.utils.log import get_task_logger from dotenv import load_dotenv from flask import Flask from flask_login import LoginManager from config import config, Config from .AfricasTalkingGateway import gateway from .database import db, redis dotenv_path = os.path.jo...
23.059524
81
0.716056
import logging import logging.config import os from celery.utils.log import get_task_logger from dotenv import load_dotenv from flask import Flask from flask_login import LoginManager from config import config, Config from .AfricasTalkingGateway import gateway from .database import db, redis dotenv_path = os.path.jo...
true
true
f700d854e2b87c83dfa59314f01e5237a60e914f
4,393
py
Python
tests/unit/retries/test_bucket.py
kellertk/botocore
3b8eb4ab832ed1ca1833a6cfce8277ef6d54dc9f
[ "Apache-2.0" ]
null
null
null
tests/unit/retries/test_bucket.py
kellertk/botocore
3b8eb4ab832ed1ca1833a6cfce8277ef6d54dc9f
[ "Apache-2.0" ]
null
null
null
tests/unit/retries/test_bucket.py
kellertk/botocore
3b8eb4ab832ed1ca1833a6cfce8277ef6d54dc9f
[ "Apache-2.0" ]
null
null
null
from botocore.exceptions import CapacityNotAvailableError from botocore.retries import bucket from tests import unittest class FakeClock(bucket.Clock): def __init__(self, timestamp_sequences): self.timestamp_sequences = timestamp_sequences self.sleep_call_amounts = [] def sleep(self, amount):...
39.223214
78
0.644434
from botocore.exceptions import CapacityNotAvailableError from botocore.retries import bucket from tests import unittest class FakeClock(bucket.Clock): def __init__(self, timestamp_sequences): self.timestamp_sequences = timestamp_sequences self.sleep_call_amounts = [] def sleep(self, amount):...
true
true
f700d93a84f72e1c0853d7a82796bc4f20c06470
10,498
py
Python
google/ads/googleads/v7/services/services/ad_group_simulation_service/transports/grpc.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
285
2018-10-05T16:47:58.000Z
2022-03-31T00:58:39.000Z
google/ads/googleads/v7/services/services/ad_group_simulation_service/transports/grpc.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
425
2018-09-10T13:32:41.000Z
2022-03-31T14:50:05.000Z
google/ads/googleads/v7/services/services/ad_group_simulation_service/transports/grpc.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
369
2018-11-28T07:01:00.000Z
2022-03-28T09:53:22.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google 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...
41.824701
101
0.624119
import warnings from typing import Callable, Dict, Optional, Sequence, Tuple from google.api_core import grpc_helpers from google.api_core import gapic_v1 from google import auth from google.auth import credentials from google.auth.transport.grpc import SslCredentials import grpc from goog...
true
true
f700d9479c9728354a66dc7a550274f53cde032e
6,401
py
Python
experiment/Behav_Consistency.py
colizoli/letter_color_mri
f4c4d8a91aa17664bdeb16b0436fc8f8fdac2710
[ "MIT" ]
null
null
null
experiment/Behav_Consistency.py
colizoli/letter_color_mri
f4c4d8a91aa17664bdeb16b0436fc8f8fdac2710
[ "MIT" ]
null
null
null
experiment/Behav_Consistency.py
colizoli/letter_color_mri
f4c4d8a91aa17664bdeb16b0436fc8f8fdac2710
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Letter-color Consistency test O.Colizoli 2020 Each letter of the alphabet in random order x 2 Color wheel opens at a randomized color on each trial (but does not turn) Python 2..7 """ # data saved in ~/LogFiles/sub-XXX # Import necessary modules import random import n...
34.229947
158
0.600375
import random import numpy as np import pandas as pd import os, time from IPython import embed as shell try: import Tkinter as tk from tkColorChooser import askcolor except: import tkinter as tk from tkinter.colorchooser import askcolor subject_ID = [] session = [] ## INPUT WINDOW class GetI...
true
true
f700d97441878947dbaf1f055b12c487191f49a6
4,471
py
Python
list_utils_test.py
KeepCoding/Connecta
e11c2974795cf325c194e107d1749c7e6431219c
[ "MIT" ]
null
null
null
list_utils_test.py
KeepCoding/Connecta
e11c2974795cf325c194e107d1749c7e6431219c
[ "MIT" ]
null
null
null
list_utils_test.py
KeepCoding/Connecta
e11c2974795cf325c194e107d1749c7e6431219c
[ "MIT" ]
null
null
null
import pytest from list_utils import * from oracle import ColumnRecommendation, ColumnClassification def test_find_one(): needle = 1 none = [0, 0, 5, 's'] beginning = [1, None, 9, 6, 0, 0] end = ['x', '0', 1] several = [0, 0, 3, 4, 1, 3, 2, 1, 3, 4] assert find_one(none, needle) == False ...
30.834483
101
0.518676
import pytest from list_utils import * from oracle import ColumnRecommendation, ColumnClassification def test_find_one(): needle = 1 none = [0, 0, 5, 's'] beginning = [1, None, 9, 6, 0, 0] end = ['x', '0', 1] several = [0, 0, 3, 4, 1, 3, 2, 1, 3, 4] assert find_one(none, needle) == False ...
true
true
f700d97d04825866396519cbea6a506aeba198bd
1,169
py
Python
GBB.ConversationalKM.Python/SelectIntent/__init__.py
microsoft/Customer-Service-Conversational-Insights
a5275d8d465df000f3ffb8fedc9a99b5e095dcb8
[ "MIT" ]
8
2020-07-02T08:07:30.000Z
2021-12-02T17:50:06.000Z
GBB.ConversationalKM.Python/SelectIntent/__init__.py
microsoft/Customer-Service-Conversational-Insights
a5275d8d465df000f3ffb8fedc9a99b5e095dcb8
[ "MIT" ]
1
2021-06-08T17:56:54.000Z
2021-06-09T12:28:01.000Z
GBB.ConversationalKM.Python/SelectIntent/__init__.py
microsoft/Customer-Service-Conversational-Insights
a5275d8d465df000f3ffb8fedc9a99b5e095dcb8
[ "MIT" ]
8
2020-07-02T07:50:30.000Z
2021-11-10T08:37:18.000Z
import logging import azure.functions as func import json import os from azure.cosmosdb.table.tableservice import TableService from azure.cosmosdb.table.models import Entity def main(req: func.HttpRequest) -> func.HttpResponse: logging.info('Python HTTP trigger function processed a request.') # Connect to Azu...
38.966667
111
0.691189
import logging import azure.functions as func import json import os from azure.cosmosdb.table.tableservice import TableService from azure.cosmosdb.table.models import Entity def main(req: func.HttpRequest) -> func.HttpResponse: logging.info('Python HTTP trigger function processed a request.') table_servi...
true
true
f700d9cab0b2649998886d89963bee454b666b82
269
py
Python
TimeLoopLib/__init__.py
jvollhueter/pyMANGA-1
414204a394d44405225b4b8224b19464c1006f1d
[ "MIT" ]
null
null
null
TimeLoopLib/__init__.py
jvollhueter/pyMANGA-1
414204a394d44405225b4b8224b19464c1006f1d
[ "MIT" ]
null
null
null
TimeLoopLib/__init__.py
jvollhueter/pyMANGA-1
414204a394d44405225b4b8224b19464c1006f1d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Nov 8 15:25:03 2018 @author: bathmann """ from .TreeDynamicTimeStepping import TreeDynamicTimeStepping from .TreeDynamicTimeLoop import TreeDynamicTimeLoop from .SimpleTimeLoop.SimpleLoop import Loop
22.416667
60
0.773234
from .TreeDynamicTimeStepping import TreeDynamicTimeStepping from .TreeDynamicTimeLoop import TreeDynamicTimeLoop from .SimpleTimeLoop.SimpleLoop import Loop
true
true
f700dc10cf350473ea1bc07b4576a52b3cab050a
5,684
py
Python
src/bin/create_esta_layers.py
terraPulse/boreal-tcc-analysis
e8a7b4bae727811d03bb57c5738945af7fe2920d
[ "MIT" ]
null
null
null
src/bin/create_esta_layers.py
terraPulse/boreal-tcc-analysis
e8a7b4bae727811d03bb57c5738945af7fe2920d
[ "MIT" ]
null
null
null
src/bin/create_esta_layers.py
terraPulse/boreal-tcc-analysis
e8a7b4bae727811d03bb57c5738945af7fe2920d
[ "MIT" ]
null
null
null
''' File: detect_forest_change.py Author: Min Feng Version: 0.1 Create: 2018-04-20 15:42:37 Description: detect forest changes from foest probility layers and tree cover layers ''' import logging def _load_tcc(f_tcc, msk): from gio import geo_raster_ex as gx from gio import config import nump...
34.448485
149
0.619458
import logging def _load_tcc(f_tcc, msk): from gio import geo_raster_ex as gx from gio import config import numpy as np _bnd = gx.read_block(f_tcc, msk) if _bnd is None: return None _dat = np.zeros(msk.data.shape, dtype=np.uint8) _m_tcc = config.getfloat('c...
true
true
f700dcc22a5c304484efeb7bededd6dfe427c31c
1,251
py
Python
ElevatorBot/misc/helperFunctions.py
LukasSchmid97/destinyBloodoakStats
1420802ce01c3435ad5c283f44eb4531d9b22c38
[ "MIT" ]
3
2019-10-19T11:24:50.000Z
2021-01-29T12:02:17.000Z
ElevatorBot/misc/helperFunctions.py
LukasSchmid97/destinyBloodoakStats
1420802ce01c3435ad5c283f44eb4531d9b22c38
[ "MIT" ]
29
2019-10-14T12:26:10.000Z
2021-07-28T20:50:29.000Z
ElevatorBot/misc/helperFunctions.py
LukasSchmid97/destinyBloodoakStats
1420802ce01c3435ad5c283f44eb4531d9b22c38
[ "MIT" ]
2
2019-10-13T17:11:09.000Z
2020-05-13T15:29:04.000Z
import datetime import logging import traceback from dis_snek.models import ComponentContext from dis_snek.models import InteractionContext from ElevatorBot.misc.formating import embed_message def get_now_with_tz() -> datetime.datetime: """Returns the current datetime (timezone aware)""" return datetime.da...
26.617021
130
0.680256
import datetime import logging import traceback from dis_snek.models import ComponentContext from dis_snek.models import InteractionContext from ElevatorBot.misc.formating import embed_message def get_now_with_tz() -> datetime.datetime: return datetime.datetime.now(tz=datetime.timezone.utc) def localize_date...
true
true
f700dcc9cfb02e8ae619011acd798deb80b74bec
5,264
py
Python
sdk/python/pulumi_azure_native/edgeorder/v20201201preview/get_order_collection_by_name.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/edgeorder/v20201201preview/get_order_collection_by_name.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/edgeorder/v20201201preview/get_order_collection_by_name.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
36.303448
193
0.652356
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs __all__ = [ 'GetOrderCollectionByNameResult', 'AwaitableGetOrderCollectionByNameResult', 'get_order_collection_by_name', ] @pulumi.ou...
true
true
f700dcf909f39203bc9f428ef86290ba47cf8386
12,984
py
Python
plasTeX/Base/LaTeX/Index.py
perfectbark/LaTex2Docx
e32f9dcc59cce7bea4e7b114687b2300c623d8c0
[ "MIT" ]
23
2019-06-16T06:00:39.000Z
2022-03-29T14:44:32.000Z
plasTeX/Base/LaTeX/Index.py
hao-han/LaTex2Docx
e32f9dcc59cce7bea4e7b114687b2300c623d8c0
[ "MIT" ]
null
null
null
plasTeX/Base/LaTeX/Index.py
hao-han/LaTex2Docx
e32f9dcc59cce7bea4e7b114687b2300c623d8c0
[ "MIT" ]
12
2019-05-27T06:32:06.000Z
2022-03-15T10:22:07.000Z
#!/usr/bin/env python """ C.11.5 Index and Glossary (p211) """ import string, os from plasTeX.Tokenizer import Token, EscapeSequence from plasTeX import Command, Environment from plasTeX.Logging import getLogger from Sectioning import SectionUtils try: from pyuca import Collator collator = Collator(os.path....
31.211538
92
0.519871
import string, os from plasTeX.Tokenizer import Token, EscapeSequence from plasTeX import Command, Environment from plasTeX.Logging import getLogger from Sectioning import SectionUtils try: from pyuca import Collator collator = Collator(os.path.join(os.path.dirname(__file__), 'allkeys.txt')).sort_key except...
true
true
f700dd2b339ed6f9e5015297b286bb64a6e6ede6
695
py
Python
coremltools/converters/mil/frontend/tensorflow/tf_graph_pass/delete_disconnected_nodes.py
VadimLevin/coremltools
66c17b0fa040a0d8088d33590ab5c355478a9e5c
[ "BSD-3-Clause" ]
2,740
2017-10-03T23:19:01.000Z
2022-03-30T15:16:39.000Z
coremltools/converters/mil/frontend/tensorflow/tf_graph_pass/delete_disconnected_nodes.py
holzschu/coremltools
5ece9069a1487d5083f00f56afe07832d88e3dfa
[ "BSD-3-Clause" ]
1,057
2017-10-05T22:47:01.000Z
2022-03-31T23:51:15.000Z
coremltools/converters/mil/frontend/tensorflow/tf_graph_pass/delete_disconnected_nodes.py
holzschu/coremltools
5ece9069a1487d5083f00f56afe07832d88e3dfa
[ "BSD-3-Clause" ]
510
2017-10-04T19:22:28.000Z
2022-03-31T12:16:52.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause def delete_disconnected_nodes(gd): # delete all nodes with no inputs a...
27.8
83
0.579856
def delete_disconnected_nodes(gd): empty_nodes = [] for k, v in gd.items(): if ( len(gd[k].inputs) == 0 and len(gd[k].outputs) == 0 and len(gd[k].control_inputs) == 0 and len(gd[k].control_outputs) == 0 and gd[k].op != "Placeholde...
true
true
f700ddd360b85347609f21c1d6489abdde7537cf
725
py
Python
code/rolling_tests.py
DonaldWhyte/high-performance-data-processing-in-python
5f0d4155c951155bc6885a4f283eb4044879d0ad
[ "MIT" ]
16
2018-07-26T16:37:19.000Z
2021-08-18T18:34:22.000Z
code/rolling_tests.py
DonaldWhyte/high-performance-data-processing-in-python-v2
f7f8076ff67d53be09e1d2f9988976e31b92f8e9
[ "MIT" ]
1
2019-12-13T01:18:00.000Z
2019-12-14T16:34:26.000Z
code/rolling_tests.py
DonaldWhyte/high-performance-data-processing-in-python-v2
f7f8076ff67d53be09e1d2f9988976e31b92f8e9
[ "MIT" ]
5
2019-02-14T14:04:49.000Z
2021-04-20T17:00:37.000Z
import numpy as np def _main(): # Inputs n = 3 x = np.arange(20, dtype=np.float64) # Slow average/std avg = np.zeros(len(x) - n + 1) std = np.zeros(len(x) - n + 1) for i in range(len(avg)): avg[i] = np.mean(x[i:i+n]) std[i] = np.std(x[i:i+n]) print('AVG') print('\...
21.969697
73
0.553103
import numpy as np def _main(): n = 3 x = np.arange(20, dtype=np.float64) avg = np.zeros(len(x) - n + 1) std = np.zeros(len(x) - n + 1) for i in range(len(avg)): avg[i] = np.mean(x[i:i+n]) std[i] = np.std(x[i:i+n]) print('AVG') print('\n'.join(str(x) for x in av...
true
true
f700de8154178c1411a9769d01d40870fe625d67
18,052
py
Python
methods/transformers/examples/deebert/src/modeling_highway_bert.py
INK-USC/RiddleSense
a3d57eaf084da9cf6b77692c608e2cd2870fbd97
[ "MIT" ]
3
2021-07-06T20:02:31.000Z
2022-03-27T13:13:01.000Z
methods/transformers/examples/deebert/src/modeling_highway_bert.py
INK-USC/RiddleSense
a3d57eaf084da9cf6b77692c608e2cd2870fbd97
[ "MIT" ]
null
null
null
methods/transformers/examples/deebert/src/modeling_highway_bert.py
INK-USC/RiddleSense
a3d57eaf084da9cf6b77692c608e2cd2870fbd97
[ "MIT" ]
null
null
null
import torch from torch import nn from torch.nn import CrossEntropyLoss, MSELoss from transformers.file_utils import add_start_docstrings, add_start_docstrings_to_model_forward from transformers.modeling_bert import ( BERT_INPUTS_DOCSTRING, BERT_START_DOCSTRING, BertEmbeddings, BertLayer, ...
45.471033
173
0.628241
import torch from torch import nn from torch.nn import CrossEntropyLoss, MSELoss from transformers.file_utils import add_start_docstrings, add_start_docstrings_to_model_forward from transformers.modeling_bert import ( BERT_INPUTS_DOCSTRING, BERT_START_DOCSTRING, BertEmbeddings, BertLayer, ...
true
true
f700df51a301f8e08e05d3af92b79a2c373f8c3a
2,122
py
Python
sdk/python/pulumi_kubernetes/rbac/v1beta1/ClusterRoleBindingList.py
kulado/kulado-kubernetes
ecb72f9b25f6dbbae41f00c82388b1ca32329cc7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_kubernetes/rbac/v1beta1/ClusterRoleBindingList.py
kulado/kulado-kubernetes
ecb72f9b25f6dbbae41f00c82388b1ca32329cc7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_kubernetes/rbac/v1beta1/ClusterRoleBindingList.py
kulado/kulado-kubernetes
ecb72f9b25f6dbbae41f00c82388b1ca32329cc7
[ "Apache-2.0" ]
1
2019-08-20T22:51:57.000Z
2019-08-20T22:51:57.000Z
# *** WARNING: this file was generated by the Kulado Kubernetes codegen tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import kulado import kulado.runtime import warnings from ... import tables, version class ClusterRoleBindingList(kulado.CustomResource): """ Clus...
39.296296
107
0.66918
import kulado import kulado.runtime import warnings from ... import tables, version class ClusterRoleBindingList(kulado.CustomResource): def __init__(self, resource_name, opts=None, items=None, metadata=None, __name__=None, __opts__=None): if __name__ is not None: warnings.warn("explicit u...
true
true
f700dfd336a74ceccacb99c9ee142a135cdb9899
3,286
py
Python
packages/tg/appwrappers/identity.py
rjcuevas/Email-Frontend-AngularJS-
753dbd190582ed953058c9e15c2be920716c7985
[ "MIT" ]
null
null
null
packages/tg/appwrappers/identity.py
rjcuevas/Email-Frontend-AngularJS-
753dbd190582ed953058c9e15c2be920716c7985
[ "MIT" ]
null
null
null
packages/tg/appwrappers/identity.py
rjcuevas/Email-Frontend-AngularJS-
753dbd190582ed953058c9e15c2be920716c7985
[ "MIT" ]
null
null
null
import logging from .base import ApplicationWrapper from ..configuration.utils import coerce_config from ..support.converters import asbool log = logging.getLogger(__name__) class IdentityApplicationWrapper(ApplicationWrapper): """Provides user identity when authentication is enabled. The repoze.who provide...
38.658824
140
0.660986
import logging from .base import ApplicationWrapper from ..configuration.utils import coerce_config from ..support.converters import asbool log = logging.getLogger(__name__) class IdentityApplicationWrapper(ApplicationWrapper): def __init__(self, handler, config): super(IdentityApplicationWrapper, self)....
true
true
f700e2424796afd0180d4de78c337de6b2e51cd4
7,792
py
Python
litex_things/deps/litex_boards/litex_boards/partner/targets/nereid.py
bjonnh/fomu-playground
9f95ed7b28d15ce219d09c16c2c8d6b5594adceb
[ "0BSD" ]
null
null
null
litex_things/deps/litex_boards/litex_boards/partner/targets/nereid.py
bjonnh/fomu-playground
9f95ed7b28d15ce219d09c16c2c8d6b5594adceb
[ "0BSD" ]
null
null
null
litex_things/deps/litex_boards/litex_boards/partner/targets/nereid.py
bjonnh/fomu-playground
9f95ed7b28d15ce219d09c16c2c8d6b5594adceb
[ "0BSD" ]
null
null
null
#!/usr/bin/env python3 # This file is Copyright (c) 2018-2019 Rohit Singh <rohit@rohitksingh.in> # This file is Copyright (c) 2019 Florent Kermarrec <florent@enjoy-digital.fr> # License: BSD import sys from migen import * from litex.build.generic_platform import * from litex.soc.integration.soc_core import * from l...
39.353535
102
0.538758
import sys from migen import * from litex.build.generic_platform import * from litex.soc.integration.soc_core import * from litex.soc.integration.soc_sdram import * from litex.soc.integration.builder import * from litex.soc.cores.clock import * from litex.soc.cores import dna, xadc from litex.soc.cores.uart imp...
true
true
f700e260a7d6b3f4dc9cdfd4df281f246d308a20
2,504
py
Python
tests/test_validators.py
fakeezz/edipy
00c125621201e7290add135240c131c22feb3a72
[ "MIT" ]
1
2018-05-15T18:27:31.000Z
2018-05-15T18:27:31.000Z
tests/test_validators.py
fakeezz/edipy
00c125621201e7290add135240c131c22feb3a72
[ "MIT" ]
null
null
null
tests/test_validators.py
fakeezz/edipy
00c125621201e7290add135240c131c22feb3a72
[ "MIT" ]
2
2020-12-25T16:37:56.000Z
2021-06-22T13:13:18.000Z
# coding: utf-8 import pytest from edipy import fields, validators, exceptions @pytest.mark.parametrize('fixed_type, data', [ (fields.Integer(1, validators=[validators.Range(1, 5)]), '1'), (fields.Integer(1, validators=[validators.MaxValue(3)]), '2'), (fields.Integer(1, validators=[validators.MinValue(1...
33.837838
76
0.69369
import pytest from edipy import fields, validators, exceptions @pytest.mark.parametrize('fixed_type, data', [ (fields.Integer(1, validators=[validators.Range(1, 5)]), '1'), (fields.Integer(1, validators=[validators.MaxValue(3)]), '2'), (fields.Integer(1, validators=[validators.MinValue(1)]), '5'), ...
true
true
f700e28af26ab19a72197442b3b55696a4239890
10,237
py
Python
tulflow/harvest.py
tulibraries/tulflow
652957d079c481a84b3602932ed86f3b2b21e3e9
[ "Apache-2.0" ]
1
2022-03-04T18:27:06.000Z
2022-03-04T18:27:06.000Z
tulflow/harvest.py
tulibraries/tulflow
652957d079c481a84b3602932ed86f3b2b21e3e9
[ "Apache-2.0" ]
117
2019-08-29T21:34:53.000Z
2022-03-31T22:11:58.000Z
tulflow/harvest.py
tulibraries/tulflow
652957d079c481a84b3602932ed86f3b2b21e3e9
[ "Apache-2.0" ]
1
2021-09-22T20:40:12.000Z
2021-09-22T20:40:12.000Z
""" tulflow.harvest ~~~~~~~~~~~~~~~ This module contains objects to harvest data from one given location to another. """ import hashlib import io import logging import pandas import sickle from lxml import etree from sickle import Sickle from sickle.models import xml_to_dict from sickle.oaiexceptions import NoRecordsMa...
38.484962
105
0.639152
import hashlib import io import logging import pandas import sickle from lxml import etree from sickle import Sickle from sickle.models import xml_to_dict from sickle.oaiexceptions import NoRecordsMatch from tulflow import process NS = { "marc21": "http://www.loc.gov/MARC21/slim", "oai": "http://www.openarchiv...
true
true
f700e496d81a63919f3b2a6c817388f8a32a78ec
1,789
py
Python
snake.py
joshua-bilbrey/snake-game
58b4daaee0ced74a40d103319d7efc515274826d
[ "CC0-1.0" ]
null
null
null
snake.py
joshua-bilbrey/snake-game
58b4daaee0ced74a40d103319d7efc515274826d
[ "CC0-1.0" ]
null
null
null
snake.py
joshua-bilbrey/snake-game
58b4daaee0ced74a40d103319d7efc515274826d
[ "CC0-1.0" ]
null
null
null
import turtle STARTING_POSITIONS = [(0, 0), (-20, 0), (-40, 0)] MOVE_DISTANCE = 20 UP = 90 DOWN = 270 RIGHT = 0 LEFT = 180 class Snake: """Initializes length and segments of snake.""" def __init__(self): self.length = 3 self.segments = [] self.create_snake() se...
28.396825
78
0.577977
import turtle STARTING_POSITIONS = [(0, 0), (-20, 0), (-40, 0)] MOVE_DISTANCE = 20 UP = 90 DOWN = 270 RIGHT = 0 LEFT = 180 class Snake: def __init__(self): self.length = 3 self.segments = [] self.create_snake() self.head = self.segments[0] def create_snake(se...
true
true
f700e563255eb9b5b51024e029510165ba3ade1b
22,420
py
Python
pailab/tools/tree.py
pailabteam/pailab
3995b25f105827ae631e6120f380748d7d284c9f
[ "Apache-2.0" ]
26
2019-03-15T12:40:11.000Z
2021-05-26T05:23:02.000Z
pailab/tools/tree.py
pailabteam/pailab
3995b25f105827ae631e6120f380748d7d284c9f
[ "Apache-2.0" ]
89
2019-03-15T12:39:07.000Z
2022-02-10T00:14:24.000Z
pailab/tools/tree.py
pailabteam/pailab
3995b25f105827ae631e6120f380748d7d284c9f
[ "Apache-2.0" ]
2
2019-05-10T09:00:36.000Z
2020-03-05T11:32:34.000Z
# -*- coding: utf-8 -*- """This module contains all functions and classes for the MLTree. The MLTree buils a tree-like structure of the objects in a given repository. This allows the user to access objects in a comfortable way allowing for autocompletion (i.e. in Jupyter notebooks). To use it one can simply call the :...
46.036961
193
0.63479
import logging from numpy import load from deepdiff import DeepDiff from pailab.ml_repo.repo import MLObjectType, MLRepo from pailab.ml_repo.repo_objects import RepoInfoKey, DataSet from pailab.ml_repo.repo_store import RepoStore import pailab.ml_repo.repo_store as repo_store import pailab.ml_repo.repo_objects as ...
true
true
f700e65c2ea8c83d9343839a41d81b9217b71539
184
py
Python
crash_course/ch07/exec/restaurant_seating.py
dantin/python-by-example
5769c7a332ebd60fd54e477b6813f2f2a0f3f37f
[ "BSD-3-Clause" ]
null
null
null
crash_course/ch07/exec/restaurant_seating.py
dantin/python-by-example
5769c7a332ebd60fd54e477b6813f2f2a0f3f37f
[ "BSD-3-Clause" ]
null
null
null
crash_course/ch07/exec/restaurant_seating.py
dantin/python-by-example
5769c7a332ebd60fd54e477b6813f2f2a0f3f37f
[ "BSD-3-Clause" ]
null
null
null
count = input('How many people will be in the dinner group? ') count = int(count) if count > 8: print('You\'ll have to wait for a table.') else: print('The table is ready.')
20.444444
62
0.646739
count = input('How many people will be in the dinner group? ') count = int(count) if count > 8: print('You\'ll have to wait for a table.') else: print('The table is ready.')
true
true
f700e672cd17275a041dea32beccb6a84ec37569
392
py
Python
setup.py
Damaen/Travis-Hello-world
6c88895142e708638000c9bd9550c3bc61045689
[ "MIT" ]
null
null
null
setup.py
Damaen/Travis-Hello-world
6c88895142e708638000c9bd9550c3bc61045689
[ "MIT" ]
null
null
null
setup.py
Damaen/Travis-Hello-world
6c88895142e708638000c9bd9550c3bc61045689
[ "MIT" ]
null
null
null
#!/usr/bin/env python from distutils.core import setup from glob import glob from setuptools import find_packages setup(name='Fibonacci', version='1.0', description='Python Distribution Utilities', author='Kevin Chen', packages=find_packages('src'), package_dir={'': 'src'}, py_mo...
24.5
76
0.665816
from distutils.core import setup from glob import glob from setuptools import find_packages setup(name='Fibonacci', version='1.0', description='Python Distribution Utilities', author='Kevin Chen', packages=find_packages('src'), package_dir={'': 'src'}, py_modules=[splitext(basen...
true
true
f700e68836d56c80b1eb23849bcf903eda4dfa6c
5,105
py
Python
nova/virt/hyperv/imagecache.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
null
null
null
nova/virt/hyperv/imagecache.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
null
null
null
nova/virt/hyperv/imagecache.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 Cloudbase Solutions Srl # 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 r...
39.573643
78
0.591773
import os from os_win import utilsfactory from oslo_log import log as logging from oslo_utils import excutils from oslo_utils import units import nova.conf from nova import exception from nova import utils from nova.virt.hyperv import pathutils from nova.virt import images LOG = logging.getLogger(__nam...
true
true
f700e6f165ef83040ba85bd247ff66f7e13fa19c
143,489
py
Python
Bottle.py
pmaillefert/Mywebsite
7ffed0cd5d17a522fa3313ce9183d965a439a611
[ "MIT" ]
null
null
null
Bottle.py
pmaillefert/Mywebsite
7ffed0cd5d17a522fa3313ce9183d965a439a611
[ "MIT" ]
null
null
null
Bottle.py
pmaillefert/Mywebsite
7ffed0cd5d17a522fa3313ce9183d965a439a611
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Bottle is a fast and simple micro-framework for small web applications. It offers request dispatching (Routes) with url parameter support, templates, a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and template engines - all in a single file an...
39.95795
108
0.592457
from __future__ import with_statement __author__ = 'Marcel Hellkamp' __version__ = '0.13-dev' __license__ = 'MIT' if __name__ == '__main__': from optparse import OptionParser _cmd_parser = OptionParser(usage="usage: %prog [options] package.module:app") _opt = _cmd_parser.add_option _opt("--versi...
true
true
f700e9c400b9fe92b7fafce69a144676ee7564a2
976
py
Python
src/wechaty_plugin_contrib/ding_dong_plugin.py
huangaszaq/python-wechaty
7cb046662a6135425000ef7db7539408cdc57349
[ "Apache-2.0" ]
null
null
null
src/wechaty_plugin_contrib/ding_dong_plugin.py
huangaszaq/python-wechaty
7cb046662a6135425000ef7db7539408cdc57349
[ "Apache-2.0" ]
null
null
null
src/wechaty_plugin_contrib/ding_dong_plugin.py
huangaszaq/python-wechaty
7cb046662a6135425000ef7db7539408cdc57349
[ "Apache-2.0" ]
null
null
null
"""basic ding-dong bot for the wechaty plugin""" from typing import Union from wechaty import Message, Contact, Room, FileBox from wechaty.plugin import WechatyPlugin class DingDongPlugin(WechatyPlugin): """basic ding-dong plugin""" @property def name(self): """name of the plugin""" retur...
32.533333
74
0.601434
from typing import Union from wechaty import Message, Contact, Room, FileBox from wechaty.plugin import WechatyPlugin class DingDongPlugin(WechatyPlugin): @property def name(self): return 'ding-dong' async def on_message(self, msg: Message): from_contact = msg.talker() text = msg...
true
true
f700ea04bf267c3ec13cb8c096e3f4f44d7fe2b7
5,088
py
Python
test/python/WMCore_t/Agent_t/Heartbeat_t.py
khurtado/WMCore
f74e252412e49189a92962945a94f93bec81cd1e
[ "Apache-2.0" ]
1
2015-02-05T13:43:46.000Z
2015-02-05T13:43:46.000Z
test/python/WMCore_t/Agent_t/Heartbeat_t.py
khurtado/WMCore
f74e252412e49189a92962945a94f93bec81cd1e
[ "Apache-2.0" ]
1
2016-10-13T14:57:35.000Z
2016-10-13T14:57:35.000Z
test/python/WMCore_t/Agent_t/Heartbeat_t.py
khurtado/WMCore
f74e252412e49189a92962945a94f93bec81cd1e
[ "Apache-2.0" ]
null
null
null
""" _WorkQueueTestCase_ Unit tests for the WMBS File class. """ from __future__ import print_function import time import unittest from WMCore.Agent.HeartbeatAPI import HeartbeatAPI from WMQuality.TestInit import TestInit class HeartbeatTest(unittest.TestCase): def setUp(self): """ _setUp_ ...
38.255639
105
0.651926
from __future__ import print_function import time import unittest from WMCore.Agent.HeartbeatAPI import HeartbeatAPI from WMQuality.TestInit import TestInit class HeartbeatTest(unittest.TestCase): def setUp(self): self.testInit = TestInit(__file__) self.testInit.setLogging() self.tes...
true
true
f700ea4c2d04bc46a69ef4752cb0e51640f0d092
1,549
py
Python
budgetportal/migrations/0054_custompage_body.py
Lunga001/datamanager
ebe9ad9db2ee7011855f1249c46d9d1bf6f4c4d1
[ "MIT" ]
3
2019-08-31T03:08:22.000Z
2020-04-03T13:09:20.000Z
budgetportal/migrations/0054_custompage_body.py
Lunga001/datamanager
ebe9ad9db2ee7011855f1249c46d9d1bf6f4c4d1
[ "MIT" ]
97
2019-04-16T07:54:38.000Z
2022-02-10T07:25:48.000Z
budgetportal/migrations/0054_custompage_body.py
OpenUpSA/budget-portal
879c5875b1d438b9287c38d6730c86be69051ac5
[ "MIT" ]
14
2019-04-23T09:48:17.000Z
2021-04-13T17:48:40.000Z
# Generated by Django 2.2.10 on 2020-03-20 13:00 import wagtail.core.blocks import wagtail.core.fields from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("budgetportal", "0053_custompage"), ] operations = [ migrations.AddField( model_na...
33.673913
85
0.355068
import wagtail.core.blocks import wagtail.core.fields from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("budgetportal", "0053_custompage"), ] operations = [ migrations.AddField( model_name="custompage", name="body", ...
true
true
f700ec8f97639e8cba334b547d045665bc55b7bc
2,445
py
Python
loss/loss_new.py
liwanjunit/ASRGAN
ac01e546939c435c246fbdce64606464f8fdfc00
[ "MIT" ]
null
null
null
loss/loss_new.py
liwanjunit/ASRGAN
ac01e546939c435c246fbdce64606464f8fdfc00
[ "MIT" ]
null
null
null
loss/loss_new.py
liwanjunit/ASRGAN
ac01e546939c435c246fbdce64606464f8fdfc00
[ "MIT" ]
null
null
null
import torch from torch import nn from torchvision.models.vgg import vgg16 class GeneratorLoss_NEW(nn.Module): def __init__(self): super(GeneratorLoss_NEW, self).__init__() vgg = vgg16(pretrained=True) # loss_network = nn.Sequential(*list(vgg.features)[:31]).eval() loss_network = n...
35.434783
112
0.618814
import torch from torch import nn from torchvision.models.vgg import vgg16 class GeneratorLoss_NEW(nn.Module): def __init__(self): super(GeneratorLoss_NEW, self).__init__() vgg = vgg16(pretrained=True) loss_network = nn.Sequential(*list(vgg.features)[:35]).eval() for param...
true
true
f700ed4220ce4098b1a75241602cf0b9cb224983
3,572
py
Python
lib/surface/datapipelines/pipeline/create.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
2
2019-11-10T09:17:07.000Z
2019-12-18T13:44:08.000Z
lib/surface/datapipelines/pipeline/create.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
null
null
null
lib/surface/datapipelines/pipeline/create.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
1
2020-07-25T01:40:19.000Z
2020-07-25T01:40:19.000Z
# -*- coding: utf-8 -*- # # Copyright 2021 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
43.560976
112
0.755039
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from googlecloudsdk.api_lib.datapipelines import util from googlecloudsdk.calliope import base from googlecloudsdk.command_lib.datapipelines import flags _DETAILED_HELP = { 'DESCRIPTION': ...
true
true
f700ed7add06c36d5f90865df0e28dcda3ca0828
1,129
py
Python
core/__init__.py
mensch272/sudoku
a8ae68e27a2ac98e9087a332a7093f903f0bb1a3
[ "Apache-2.0" ]
5
2020-01-18T00:55:21.000Z
2020-01-21T11:14:53.000Z
core/__init__.py
mHaisham/sudoku
a8ae68e27a2ac98e9087a332a7093f903f0bb1a3
[ "Apache-2.0" ]
null
null
null
core/__init__.py
mHaisham/sudoku
a8ae68e27a2ac98e9087a332a7093f903f0bb1a3
[ "Apache-2.0" ]
4
2020-01-18T04:52:57.000Z
2020-01-21T12:09:18.000Z
from kivy.graphics import Color from .navigation import Navigation class Colors: WHITE = Color(1, 1, 1, 1) BLACK = Color(0, 0, 0, 1) GREY = Color(.8, .8, .8, 1) RED = Color(1, 0, 0, 1) GREEN = Color(0, 1, 0, 1) BLUE = Color(0, 0, 1, 1) @staticmethod def lerp(value, *args): ...
21.301887
40
0.394154
from kivy.graphics import Color from .navigation import Navigation class Colors: WHITE = Color(1, 1, 1, 1) BLACK = Color(0, 0, 0, 1) GREY = Color(.8, .8, .8, 1) RED = Color(1, 0, 0, 1) GREEN = Color(0, 1, 0, 1) BLUE = Color(0, 0, 1, 1) @staticmethod def lerp(value, *args): ...
true
true
f700ed8c3574776fd1fef8fec5339212509ec5ff
2,812
py
Python
plugins/openstack/pyparts/service_features.py
aserdean/hotsos
a0f17a7ee2f08a4da0a269d478dec7ebb8f12493
[ "Apache-2.0" ]
null
null
null
plugins/openstack/pyparts/service_features.py
aserdean/hotsos
a0f17a7ee2f08a4da0a269d478dec7ebb8f12493
[ "Apache-2.0" ]
null
null
null
plugins/openstack/pyparts/service_features.py
aserdean/hotsos
a0f17a7ee2f08a4da0a269d478dec7ebb8f12493
[ "Apache-2.0" ]
null
null
null
from core.plugins.openstack import ( OpenstackChecksBase, ) FEATURES = {'neutron': {'main': [ 'availability_zone'], 'openvswitch-agent': [ 'l2_population', 'firewall_driver'], 'l3-age...
37
79
0.47973
from core.plugins.openstack import ( OpenstackChecksBase, ) FEATURES = {'neutron': {'main': [ 'availability_zone'], 'openvswitch-agent': [ 'l2_population', 'firewall_driver'], 'l3-age...
true
true
f700ee68ebec172b781ca8d0ef2916ffdef7a1fb
502
py
Python
backend/wallet/api/v1/serializers.py
crowdbotics-apps/zaka-28999
5c9fff173a11033fc15f3930c2665b077756d738
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/wallet/api/v1/serializers.py
crowdbotics-apps/zaka-28999
5c9fff173a11033fc15f3930c2665b077756d738
[ "FTL", "AML", "RSA-MD" ]
20
2021-08-16T02:16:21.000Z
2021-10-04T18:41:43.000Z
backend/wallet/api/v1/serializers.py
crowdbotics-apps/zaka-28999
5c9fff173a11033fc15f3930c2665b077756d738
[ "FTL", "AML", "RSA-MD" ]
null
null
null
from rest_framework import serializers from wallet.models import UserWallet, PaymentMethod, DriverWallet class UserWalletSerializer(serializers.ModelSerializer): class Meta: model = UserWallet fields = "__all__" class DriverWalletSerializer(serializers.ModelSerializer): class Meta: m...
23.904762
65
0.729084
from rest_framework import serializers from wallet.models import UserWallet, PaymentMethod, DriverWallet class UserWalletSerializer(serializers.ModelSerializer): class Meta: model = UserWallet fields = "__all__" class DriverWalletSerializer(serializers.ModelSerializer): class Meta: m...
true
true
f700eefc840a44bd548faf5f09b0af77618a2b03
1,311
py
Python
apps/covid_19/preprocess/importation.py
malanchak/AuTuMN
0cbd006d1f15da414d02eed44e48bb5c06f0802e
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
apps/covid_19/preprocess/importation.py
malanchak/AuTuMN
0cbd006d1f15da414d02eed44e48bb5c06f0802e
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
apps/covid_19/preprocess/importation.py
malanchak/AuTuMN
0cbd006d1f15da414d02eed44e48bb5c06f0802e
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
from typing import List, Callable from autumn.curve import scale_up_function def get_importation_rate_func_as_birth_rates( importation_times: List[float], importation_n_cases: List[float], detect_prop_func, starting_pops: list, ): """ When imported cases are explicitly simulated as part of the...
26.755102
116
0.667429
from typing import List, Callable from autumn.curve import scale_up_function def get_importation_rate_func_as_birth_rates( importation_times: List[float], importation_n_cases: List[float], detect_prop_func, starting_pops: list, ): for i, time in enumerate(importation_times): importati...
true
true
f700ef09d193fce405fd3b6bc62d564d19383e0d
316
py
Python
PBO_19188/Latihan_7.2.class2.py
Fazlur9/PBO
357b739c0c20ed2aa0c3cc58d48bbae843e9e946
[ "MIT" ]
null
null
null
PBO_19188/Latihan_7.2.class2.py
Fazlur9/PBO
357b739c0c20ed2aa0c3cc58d48bbae843e9e946
[ "MIT" ]
null
null
null
PBO_19188/Latihan_7.2.class2.py
Fazlur9/PBO
357b739c0c20ed2aa0c3cc58d48bbae843e9e946
[ "MIT" ]
null
null
null
class Mahasiswa: def __init__(self, nama, nilai): self.nama = nama self.nilai = nilai def hitung_nilai(self): return sum(self.nilai)/len(self.nilai) mahasiswa = Mahasiswa("Fazlur", (90,70,70,70)) print("Nama :", mahasiswa.nama) print("Total Nilai :", mahasiswa.hitung_nilai())
35.111111
48
0.642405
class Mahasiswa: def __init__(self, nama, nilai): self.nama = nama self.nilai = nilai def hitung_nilai(self): return sum(self.nilai)/len(self.nilai) mahasiswa = Mahasiswa("Fazlur", (90,70,70,70)) print("Nama :", mahasiswa.nama) print("Total Nilai :", mahasiswa.hitung_nilai())
true
true
f700f07327077fff3b3292329ec22f08ef94b3ab
22,882
py
Python
electrum_mona/plugin.py
david4neblio/electrum-mona
2d13b066be2d6205aeaa7ca859884c3ec1b92e83
[ "MIT" ]
2
2019-12-27T09:13:48.000Z
2020-09-18T14:10:48.000Z
electrum_mona/plugin.py
david4neblio/electrum-mona
2d13b066be2d6205aeaa7ca859884c3ec1b92e83
[ "MIT" ]
2
2020-07-31T20:14:43.000Z
2021-10-17T02:33:41.000Z
electrum_mona/plugin.py
david4neblio/electrum-mona
2d13b066be2d6205aeaa7ca859884c3ec1b92e83
[ "MIT" ]
3
2020-03-08T19:40:17.000Z
2021-11-10T21:41:11.000Z
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2015 Thomas Voegtlin # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without...
36.378378
123
0.589721
import os import pkgutil import importlib.util import time import threading import sys from typing import NamedTuple, Any, Union, TYPE_CHECKING, Optional from .i18n import _ from .util import (profiler, DaemonThread, UserCancelled, ThreadJob, UserFacingException) from . import bip32 from . impo...
true
true
f700f0e1159085a7fc47b72ba8e35fe3cab0e1ca
2,830
py
Python
roblox/groups.py
Warhawk947/ro.py
dac29116ef72f577d2e086e3297a79201d58c895
[ "MIT" ]
1
2021-11-25T02:29:12.000Z
2021-11-25T02:29:12.000Z
roblox/groups.py
Warhawk947/ro.py
dac29116ef72f577d2e086e3297a79201d58c895
[ "MIT" ]
null
null
null
roblox/groups.py
Warhawk947/ro.py
dac29116ef72f577d2e086e3297a79201d58c895
[ "MIT" ]
null
null
null
""" Contains classes related to Roblox group data and parsing. """ from typing import Optional, Tuple from .bases.basegroup import BaseGroup from .partials.partialuser import PartialUser from .shout import Shout from .utilities.shared import ClientSharedObject class Group(BaseGroup): """ Represents a Join...
33.294118
116
0.631449
from typing import Optional, Tuple from .bases.basegroup import BaseGroup from .partials.partialuser import PartialUser from .shout import Shout from .utilities.shared import ClientSharedObject class Group(BaseGroup): def __init__(self, shared: ClientSharedObject, data: dict): super().__init__(shared, ...
true
true
f700f0f139cfbd083c127c5a1431fb7583bf64a6
537
py
Python
tests/input/custom_serializer.py
larribas/dagger
1441fed570e535a43fdc23142b0c1a897ad9e992
[ "Apache-2.0" ]
9
2021-09-06T14:22:38.000Z
2022-02-08T07:48:39.000Z
tests/input/custom_serializer.py
larribas/dagger
1441fed570e535a43fdc23142b0c1a897ad9e992
[ "Apache-2.0" ]
36
2021-09-04T06:20:19.000Z
2021-12-26T17:54:59.000Z
tests/input/custom_serializer.py
larribas/dagger
1441fed570e535a43fdc23142b0c1a897ad9e992
[ "Apache-2.0" ]
4
2021-09-06T08:07:19.000Z
2021-10-18T19:13:18.000Z
# noqa from typing import Any, BinaryIO class CustomSerializer: """Custom serializer implementation to test the injection of different serialization strategies to an input.""" @property def extension(self) -> str: # noqa return "ext" def serialize(self, value: Any, writer: BinaryIO): # noq...
26.85
115
0.67784
from typing import Any, BinaryIO class CustomSerializer: @property def extension(self) -> str: return "ext" def serialize(self, value: Any, writer: BinaryIO): raise NotImplementedError() def deserialize(self, reader: BinaryIO) -> Any: raise NotImplementedError() ...
true
true
f700f14379bb536b6a19366d6ecc906744bae9ed
13,352
py
Python
env/Lib/site-packages/imagesize.py
camilorojase/GithubActionsTest
7b448e365d31ec84bf55b68033a88bb00e8e5358
[ "MIT" ]
2
2022-01-19T02:33:11.000Z
2022-01-19T02:33:13.000Z
env/Lib/site-packages/imagesize.py
camilorojase/GithubActionsTest
7b448e365d31ec84bf55b68033a88bb00e8e5358
[ "MIT" ]
null
null
null
env/Lib/site-packages/imagesize.py
camilorojase/GithubActionsTest
7b448e365d31ec84bf55b68033a88bb00e8e5358
[ "MIT" ]
null
null
null
import io import os import re import struct from xml.etree import ElementTree _UNIT_KM = -3 _UNIT_100M = -2 _UNIT_10M = -1 _UNIT_1M = 0 _UNIT_10CM = 1 _UNIT_CM = 2 _UNIT_MM = 3 _UNIT_0_1MM = 4 _UNIT_0_01MM = 5 _UNIT_UM = 6 _UNIT_INCH = 6 _TIFF_TYPE_SIZES = { 1: 1, 2: 1, 3: 2, 4: 4, 5: 8, 6: 1, 7: 1, 8...
36.580822
115
0.479778
import io import os import re import struct from xml.etree import ElementTree _UNIT_KM = -3 _UNIT_100M = -2 _UNIT_10M = -1 _UNIT_1M = 0 _UNIT_10CM = 1 _UNIT_CM = 2 _UNIT_MM = 3 _UNIT_0_1MM = 4 _UNIT_0_01MM = 5 _UNIT_UM = 6 _UNIT_INCH = 6 _TIFF_TYPE_SIZES = { 1: 1, 2: 1, 3: 2, 4: 4, 5: 8, 6: 1, 7: 1, 8...
true
true
f700f1578f586a50af86ffe0c113eb3c249ef6c2
104
py
Python
molsysmt/_private/digestion/target.py
uibcdf/MolModSAKs
02263fb710693f0c41817f1a318459b35fd5462a
[ "MIT" ]
null
null
null
molsysmt/_private/digestion/target.py
uibcdf/MolModSAKs
02263fb710693f0c41817f1a318459b35fd5462a
[ "MIT" ]
null
null
null
molsysmt/_private/digestion/target.py
uibcdf/MolModSAKs
02263fb710693f0c41817f1a318459b35fd5462a
[ "MIT" ]
null
null
null
def digest_target(target): from .element import digest_element return digest_element(target)
14.857143
39
0.759615
def digest_target(target): from .element import digest_element return digest_element(target)
true
true
f700f167a8cab5f46c0dbe65870fac00e29032be
6,073
py
Python
src/kerod/core/sampling_ops.py
LSanselme/kerod
cb52775ed501cbe4bd5fc0f22ec0359ca1d5f902
[ "MIT" ]
35
2020-06-14T11:20:54.000Z
2022-03-02T14:42:25.000Z
src/kerod/core/sampling_ops.py
LSanselme/kerod
cb52775ed501cbe4bd5fc0f22ec0359ca1d5f902
[ "MIT" ]
9
2021-02-03T15:01:39.000Z
2022-03-16T01:46:38.000Z
src/kerod/core/sampling_ops.py
LSanselme/kerod
cb52775ed501cbe4bd5fc0f22ec0359ca1d5f902
[ "MIT" ]
11
2021-02-02T09:41:16.000Z
2022-03-01T15:43:31.000Z
# Copyright 2017 The TensorFlow Authors and modified by Emilien Garreau. 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....
42.468531
99
0.680883
import tensorflow as tf from kerod.utils import ops def subsample_indicator(indicator, num_samples): indices = tf.where(indicator) indices = tf.random.shuffle(indices) indices = tf.reshape(indices, [-1]) num_samples = tf.minimum(tf.size(indices), num_samples) selected_indices = tf...
true
true
f700f20444454593e2536cb9e2591f4eae5a213c
7,178
py
Python
src/config.py
volovodenko/English
860ae0f971909b9aa299c193ea7d0161c88d0b22
[ "Apache-2.0" ]
null
null
null
src/config.py
volovodenko/English
860ae0f971909b9aa299c193ea7d0161c88d0b22
[ "Apache-2.0" ]
null
null
null
src/config.py
volovodenko/English
860ae0f971909b9aa299c193ea7d0161c88d0b22
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import os import re import json import os.path import unittest reg_cmnt = re.compile(r"/\*.*?\*/", re.DOTALL) class Config: "Работа с конфигурационным файлом" def __init__(self, main_path=None, user_path=None): if main_path is None: self._main_path = "config.json...
36.622449
114
0.57314
import os import re import json import os.path import unittest reg_cmnt = re.compile(r"/\*.*?\*/", re.DOTALL) class Config: def __init__(self, main_path=None, user_path=None): if main_path is None: self._main_path = "config.json5" else: self._main_path = main_path ...
true
true
f700f25f477cd57dd0432a787354f47b88697b1c
532
py
Python
tests/test_model.py
margrietpalm/covid_swimming_chaos
e615d84d2716ce167e21a179c86c3adc4d53928a
[ "MIT" ]
null
null
null
tests/test_model.py
margrietpalm/covid_swimming_chaos
e615d84d2716ce167e21a179c86c3adc4d53928a
[ "MIT" ]
null
null
null
tests/test_model.py
margrietpalm/covid_swimming_chaos
e615d84d2716ce167e21a179c86c3adc4d53928a
[ "MIT" ]
null
null
null
import pytest import copy from pathlib import Path import sys sys.path.append(str(Path(__file__).absolute().parent.parent)) from swimmer_abm.model import Model def test_init(): model = Model(nswimmers=3) assert len(model.swimmers) == 3 def test_step(): model = Model(nswimmers=1) swimmer = copy.dee...
23.130435
61
0.695489
import pytest import copy from pathlib import Path import sys sys.path.append(str(Path(__file__).absolute().parent.parent)) from swimmer_abm.model import Model def test_init(): model = Model(nswimmers=3) assert len(model.swimmers) == 3 def test_step(): model = Model(nswimmers=1) swimmer = copy.dee...
true
true
f700f33dffc00e1f53d3e1c3b1d4f0189b0c7b82
696
py
Python
src/repl.py
PolyglotSymposium/mm-i
6520f718b2100dfea2c20d3ae73b33d46292b730
[ "MIT" ]
null
null
null
src/repl.py
PolyglotSymposium/mm-i
6520f718b2100dfea2c20d3ae73b33d46292b730
[ "MIT" ]
null
null
null
src/repl.py
PolyglotSymposium/mm-i
6520f718b2100dfea2c20d3ae73b33d46292b730
[ "MIT" ]
null
null
null
#!/usr/bin/python3 class Evaluator: def __init__(self, lexer): self.__lexer = lexer def evaluate(self, line): return int(next(self.__lexer.tokenize(line)).raw_value) class REPL: def __init__(self, read, print, evaluate): self.__read = read self.__eval = evaluate sel...
25.777778
63
0.573276
class Evaluator: def __init__(self, lexer): self.__lexer = lexer def evaluate(self, line): return int(next(self.__lexer.tokenize(line)).raw_value) class REPL: def __init__(self, read, print, evaluate): self.__read = read self.__eval = evaluate self.__print = print ...
true
true
f700f3f235ce44f72728af90479dc63e15aa97b8
4,426
py
Python
distributed/diagnostics/tests/test_task_stream.py
edyounis/distributed
bb091d5ec7d3ce4eb4a58e0957cba9cdf3da1d6a
[ "BSD-3-Clause" ]
null
null
null
distributed/diagnostics/tests/test_task_stream.py
edyounis/distributed
bb091d5ec7d3ce4eb4a58e0957cba9cdf3da1d6a
[ "BSD-3-Clause" ]
1
2022-02-28T22:02:10.000Z
2022-02-28T22:02:10.000Z
distributed/diagnostics/tests/test_task_stream.py
graingert/distributed
5feb17151cdf660a3443abf8596444a9f51dc575
[ "BSD-3-Clause" ]
null
null
null
import os from time import sleep import pytest from tlz import frequencies from distributed import get_task_stream from distributed.client import wait from distributed.diagnostics.task_stream import TaskStreamPlugin from distributed.metrics import time from distributed.utils_test import div, gen_cluster, inc, slowinc...
28.191083
87
0.658156
import os from time import sleep import pytest from tlz import frequencies from distributed import get_task_stream from distributed.client import wait from distributed.diagnostics.task_stream import TaskStreamPlugin from distributed.metrics import time from distributed.utils_test import div, gen_cluster, inc, slowinc...
true
true
f700f4bd539b8bf548a33cc2116e009d6b138a96
16,593
py
Python
ote_sdk/ote_sdk/entities/dataset_item.py
vraoresearch/openvino_training_extensions
5cdade68a1ec25f694efddc40913fe2527e00e82
[ "Apache-2.0" ]
null
null
null
ote_sdk/ote_sdk/entities/dataset_item.py
vraoresearch/openvino_training_extensions
5cdade68a1ec25f694efddc40913fe2527e00e82
[ "Apache-2.0" ]
null
null
null
ote_sdk/ote_sdk/entities/dataset_item.py
vraoresearch/openvino_training_extensions
5cdade68a1ec25f694efddc40913fe2527e00e82
[ "Apache-2.0" ]
1
2020-12-13T22:13:51.000Z
2020-12-13T22:13:51.000Z
"""This module implements the dataset item entity""" # Copyright (C) 2021-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 # import abc import copy import itertools import logging from threading import Lock from typing import List, Optional, Sequence import numpy as np from ote_sdk.entities.annotation i...
37.62585
117
0.629121
import abc import copy import itertools import logging from threading import Lock from typing import List, Optional, Sequence import numpy as np from ote_sdk.entities.annotation import Annotation, AnnotationSceneEntity from ote_sdk.entities.label import LabelEntity from ote_sdk.entities.media import IMedia2DEnti...
true
true
f700f5af5a55ee69e9bcfc5b9683c37f5e27231c
706
py
Python
charlie2/_scratch/event_tester.py
sammosummo/Charlie2
e856b9bfc83c11e57a63d487fa14a63764e3f6ae
[ "MIT" ]
5
2019-10-10T08:22:29.000Z
2021-04-09T02:34:13.000Z
charlie2/_scratch/event_tester.py
sammosummo/Charlie2
e856b9bfc83c11e57a63d487fa14a63764e3f6ae
[ "MIT" ]
20
2018-06-20T21:15:48.000Z
2018-09-06T17:13:46.000Z
charlie2/_scratch/event_tester.py
sammosummo/Charlie2
e856b9bfc83c11e57a63d487fa14a63764e3f6ae
[ "MIT" ]
3
2019-11-24T04:10:40.000Z
2020-04-04T07:50:57.000Z
from sys import argv, exit from PyQt5.QtCore import Qt from PyQt5.QtWidgets import QApplication, QMainWindow, QWidget class MainWindow(QMainWindow): def __init__(self, parent=None): super(MainWindow, self).__init__(parent) self.setCentralWidget(CustomWidget(self)) self.show() class Cus...
21.393939
62
0.677054
from sys import argv, exit from PyQt5.QtCore import Qt from PyQt5.QtWidgets import QApplication, QMainWindow, QWidget class MainWindow(QMainWindow): def __init__(self, parent=None): super(MainWindow, self).__init__(parent) self.setCentralWidget(CustomWidget(self)) self.show() class Cus...
true
true
f700f5cfd4cc030d3b6feeef81a024d23319dedc
11,085
py
Python
neutron_vpnaas/openstack/common/processutils.py
citrix-openstack-build/neutron-vpnaas
d1ee6923425eca52f400a2de23d1541f16568c2b
[ "Apache-2.0" ]
null
null
null
neutron_vpnaas/openstack/common/processutils.py
citrix-openstack-build/neutron-vpnaas
d1ee6923425eca52f400a2de23d1541f16568c2b
[ "Apache-2.0" ]
null
null
null
neutron_vpnaas/openstack/common/processutils.py
citrix-openstack-build/neutron-vpnaas
d1ee6923425eca52f400a2de23d1541f16568c2b
[ "Apache-2.0" ]
null
null
null
# Copyright 2011 OpenStack Foundation. # 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 req...
38.224138
79
0.589445
import errno import logging import multiprocessing import os import random import shlex import signal from eventlet.green import subprocess from eventlet import greenthread from oslo.utils import strutils import six from neutron_vpnaas.openstack.common._i18n import _ LOG = logging.getLogger(__name__...
true
true
f700f64d326367612e46eead5f8b7101bfc54b8e
1,552
py
Python
39-combination-sum/solution.py
phenix3443/leetcode
b6d8486e859b2db0bf3d58f55a6e1d439b0b891a
[ "MIT" ]
null
null
null
39-combination-sum/solution.py
phenix3443/leetcode
b6d8486e859b2db0bf3d58f55a6e1d439b0b891a
[ "MIT" ]
null
null
null
39-combination-sum/solution.py
phenix3443/leetcode
b6d8486e859b2db0bf3d58f55a6e1d439b0b891a
[ "MIT" ]
null
null
null
# -*- coding:utf-8; -*- class SolutionV1: def combinationSum(self, candidates, target): # 1. 定义保存结果的组合 result = set() # 2. 定义递归函数,i表示递归层数,但是具体含义还不知道 def helper(nums, candidates, target): # 4. 编写递归模板 # 1) 定义递归终止条件 # 应该是从candidate选出来的数的sum=target就...
25.866667
77
0.523196
class SolutionV1: def combinationSum(self, candidates, target): result = set() def helper(nums, candidates, target): if sum(nums) == target: result.append(tuple(nums)) return ...
true
true
f700f66d7a6fb738d17f3ac606e54056809a5935
19,266
py
Python
tests/sentry/integrations/github_enterprise/test_webhooks.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
null
null
null
tests/sentry/integrations/github_enterprise/test_webhooks.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
null
null
null
tests/sentry/integrations/github_enterprise/test_webhooks.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import import six from datetime import datetime from django.utils import timezone from sentry.models import Commit, CommitAuthor, Integration, PullRequest, Repository from sentry.testutils import APITestCase from uuid import uuid4 from .testutils import ( P...
37.555556
96
0.61772
from __future__ import absolute_import import six from datetime import datetime from django.utils import timezone from sentry.models import Commit, CommitAuthor, Integration, PullRequest, Repository from sentry.testutils import APITestCase from uuid import uuid4 from .testutils import ( PUSH_EVENT_EXAMPLE_INSTA...
true
true
f700f699c24a7decc3d4d0de8d4c7caa6080333a
10,663
py
Python
qcengine/programs/turbomole/runner.py
kexul/QCEngine
d7ced823512ce58133739327684cae380592309c
[ "BSD-3-Clause" ]
105
2018-08-15T14:47:27.000Z
2022-02-14T01:53:28.000Z
qcengine/programs/turbomole/runner.py
kexul/QCEngine
d7ced823512ce58133739327684cae380592309c
[ "BSD-3-Clause" ]
338
2018-08-18T15:48:25.000Z
2022-03-30T09:02:40.000Z
qcengine/programs/turbomole/runner.py
kexul/QCEngine
d7ced823512ce58133739327684cae380592309c
[ "BSD-3-Clause" ]
74
2018-08-28T04:37:04.000Z
2022-03-31T06:57:51.000Z
""" Calls the Turbomole executable. """ import os import re from decimal import Decimal from pathlib import Path from typing import Any, Dict, Optional, Tuple from qcelemental.models import AtomicResult, Provenance, BasisSet from qcelemental.util import safe_version, which from ...exceptions import InputError from .....
38.634058
116
0.598331
import os import re from decimal import Decimal from pathlib import Path from typing import Any, Dict, Optional, Tuple from qcelemental.models import AtomicResult, Provenance, BasisSet from qcelemental.util import safe_version, which from ...exceptions import InputError from ..model import ProgramHarness from ..qcvar...
true
true
f700f6f6992552d2b05a043e6c989920e50c2f1a
1,811
py
Python
symbiotic/actions.py
StefanoFrazzetto/symbiotic
d163ad18e60ff1a5e89ed5daee1e3ad1b9f64ddb
[ "Apache-2.0" ]
null
null
null
symbiotic/actions.py
StefanoFrazzetto/symbiotic
d163ad18e60ff1a5e89ed5daee1e3ad1b9f64ddb
[ "Apache-2.0" ]
null
null
null
symbiotic/actions.py
StefanoFrazzetto/symbiotic
d163ad18e60ff1a5e89ed5daee1e3ad1b9f64ddb
[ "Apache-2.0" ]
null
null
null
from datetime import datetime from functools import partial from typing import Callable, List, Union from symbiotic.schedule import Schedule class Action(object): def __init__(self, callback: Callable, *args, **kwargs): self._callback: partial = partial(callback, *args, **kwargs) self._schedule:...
30.183333
86
0.649365
from datetime import datetime from functools import partial from typing import Callable, List, Union from symbiotic.schedule import Schedule class Action(object): def __init__(self, callback: Callable, *args, **kwargs): self._callback: partial = partial(callback, *args, **kwargs) self._schedule:...
true
true
f700f79e05c6776dc943cca7b6d50b88ffccb6d0
1,557
py
Python
web-scrapers/combine-schema.py
matildarehm/big-city
37910719dbd6c79ea5ba98372be354c435c4ebbd
[ "MIT" ]
null
null
null
web-scrapers/combine-schema.py
matildarehm/big-city
37910719dbd6c79ea5ba98372be354c435c4ebbd
[ "MIT" ]
null
null
null
web-scrapers/combine-schema.py
matildarehm/big-city
37910719dbd6c79ea5ba98372be354c435c4ebbd
[ "MIT" ]
null
null
null
import os import json def combine_schema(borough_name): borough_name = borough_name.lower() neighborhood_data = "" with open('../scraped_data/borough_schema/' + borough_name + ".json", 'r', encoding='utf-8') as json_file: data = json.load(json_file) for zipCodes in range(len(data[borough_n...
43.25
131
0.587669
import os import json def combine_schema(borough_name): borough_name = borough_name.lower() neighborhood_data = "" with open('../scraped_data/borough_schema/' + borough_name + ".json", 'r', encoding='utf-8') as json_file: data = json.load(json_file) for zipCodes in range(len(data[borough_n...
true
true
f700f7f47d7e357b6d4b4a24c4774fb80fedbb46
5,515
py
Python
nobrainer/metrics.py
tapasi-brahma/nobrainer
c46586658d226bc3ca22869fd45a2674fdd52be9
[ "Apache-2.0" ]
2
2021-06-20T00:49:22.000Z
2021-12-09T23:20:19.000Z
nobrainer/metrics.py
Aakanksha-Rana/nobrainer
3c8c983e7736e60a94c405e595f37248e503b393
[ "Apache-2.0" ]
1
2021-12-09T23:37:20.000Z
2021-12-09T23:37:20.000Z
nobrainer/metrics.py
tapasi-brahma/nobrainer
c46586658d226bc3ca22869fd45a2674fdd52be9
[ "Apache-2.0" ]
6
2021-12-09T15:56:34.000Z
2021-12-09T16:45:25.000Z
"""Implementations of metrics for 3D semantic segmentation.""" import tensorflow as tf def average_volume_difference(): raise NotImplementedError() def dice(y_true, y_pred, axis=(1, 2, 3, 4)): """Calculate Dice similarity between labels and predictions. Dice similarity is in [0, 1], where 1 is perfect...
37.773973
87
0.670535
import tensorflow as tf def average_volume_difference(): raise NotImplementedError() def dice(y_true, y_pred, axis=(1, 2, 3, 4)): y_pred = tf.convert_to_tensor(y_pred) y_true = tf.cast(y_true, y_pred.dtype) eps = tf.keras.backend.epsilon() intersection = tf.reduce_sum(y_true * y_pred, axis=axi...
true
true
f700f86cbf5234bbc538edad7ad5ecd48dcd69e4
1,654
py
Python
security_monkey/tests/watchers/vpc/test_peering.py
alvaroaleman/security_monkey
b174a705124f12aeee612f9ef93820f2b4227e0e
[ "Apache-2.0" ]
3
2018-05-18T17:32:36.000Z
2021-12-09T13:46:35.000Z
security_monkey/tests/watchers/vpc/test_peering.py
alvaroaleman/security_monkey
b174a705124f12aeee612f9ef93820f2b4227e0e
[ "Apache-2.0" ]
9
2019-01-11T17:55:08.000Z
2021-06-25T15:17:38.000Z
security_monkey/tests/watchers/vpc/test_peering.py
cxmcc/security_monkey
ae4c4b5b278505a97f0513f5ae44db3eb23c175c
[ "Apache-2.0" ]
2
2018-06-15T16:55:11.000Z
2020-04-30T16:26:59.000Z
# Copyright 2016 Bridgewater Associates # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
33.08
79
0.702539
from security_monkey.tests.watchers import SecurityMonkeyWatcherTestCase from security_monkey.watchers.vpc.peering import Peering import boto from moto import mock_sts, mock_ec2 from freezegun import freeze_time class PeeringWatcherTestCase(SecurityMonkeyWatcherTestCase): @freeze_time("2016-07-18 1...
true
true
f700f8db77ef5e63af48fd81de77ff3b4c152594
2,147
py
Python
avijst/tensorflow/data.py
huylb314/AVIAD_AVIJST
bf8e0617849b4f8f4b95ea345be1565ea063ee38
[ "MIT" ]
4
2021-03-17T08:36:52.000Z
2022-03-31T10:32:18.000Z
avijst/tensorflow/data.py
huylb314/AVIAD_AVIJST
bf8e0617849b4f8f4b95ea345be1565ea063ee38
[ "MIT" ]
null
null
null
avijst/tensorflow/data.py
huylb314/AVIAD_AVIJST
bf8e0617849b4f8f4b95ea345be1565ea063ee38
[ "MIT" ]
null
null
null
import numpy as np from sklearn import metrics import math from keras.preprocessing import sequence from keras.preprocessing.text import Tokenizer from typing import * # fastai utility def listify(o): if o is None: return [] if isinstance(o, list): return o if isinstance(o, str): return [o] if isinstan...
33.546875
100
0.640429
import numpy as np from sklearn import metrics import math from keras.preprocessing import sequence from keras.preprocessing.text import Tokenizer from typing import * def listify(o): if o is None: return [] if isinstance(o, list): return o if isinstance(o, str): return [o] if isinstance(o, Iterable):...
true
true
f700f8e66d717d6fd7e8d9734c1db24bc7968239
281
py
Python
tests/artificial/transf_RelativeDifference/trend_Lag1Trend/cycle_30/ar_12/test_artificial_1024_RelativeDifference_Lag1Trend_30_12_20.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
tests/artificial/transf_RelativeDifference/trend_Lag1Trend/cycle_30/ar_12/test_artificial_1024_RelativeDifference_Lag1Trend_30_12_20.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
1
2019-11-30T23:39:38.000Z
2019-12-01T04:34:35.000Z
tests/artificial/transf_RelativeDifference/trend_Lag1Trend/cycle_30/ar_12/test_artificial_1024_RelativeDifference_Lag1Trend_30_12_20.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
import pyaf.Bench.TS_datasets as tsds import pyaf.tests.artificial.process_artificial_dataset as art art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "Lag1Trend", cycle_length = 30, transform = "RelativeDifference", sigma = 0.0, exog_count = 20, ar_order = 12);
40.142857
176
0.743772
import pyaf.Bench.TS_datasets as tsds import pyaf.tests.artificial.process_artificial_dataset as art art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "Lag1Trend", cycle_length = 30, transform = "RelativeDifference", sigma = 0.0, exog_count = 20, ar_order = 12);
true
true
f700f8f83ac5032ea84cc6fc6b5be17bdb522c59
168
py
Python
tests/model_control/detailed/transf_BoxCox/model_control_one_enabled_BoxCox_ConstantTrend_Seasonal_DayOfMonth_MLP.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
tests/model_control/detailed/transf_BoxCox/model_control_one_enabled_BoxCox_ConstantTrend_Seasonal_DayOfMonth_MLP.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
1
2019-11-30T23:39:38.000Z
2019-12-01T04:34:35.000Z
tests/model_control/detailed/transf_BoxCox/model_control_one_enabled_BoxCox_ConstantTrend_Seasonal_DayOfMonth_MLP.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['BoxCox'] , ['ConstantTrend'] , ['Seasonal_DayOfMonth'] , ['MLP'] );
42
90
0.761905
import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['BoxCox'] , ['ConstantTrend'] , ['Seasonal_DayOfMonth'] , ['MLP'] );
true
true
f700f90a4863b2f52518d4c47af307e35d2b3220
1,599
py
Python
scripts/rainbow.py
orrinjelo/AedanWallpaper
c5d67c45d7d295d90bc979f2cda645e0b578f10c
[ "MIT" ]
null
null
null
scripts/rainbow.py
orrinjelo/AedanWallpaper
c5d67c45d7d295d90bc979f2cda645e0b578f10c
[ "MIT" ]
null
null
null
scripts/rainbow.py
orrinjelo/AedanWallpaper
c5d67c45d7d295d90bc979f2cda645e0b578f10c
[ "MIT" ]
null
null
null
from PIL import Image import numpy as np import colorsys import os, sys import argparse import matplotlib.pyplot as plt rgb_to_hsv = np.vectorize(colorsys.rgb_to_hsv) hsv_to_rgb = np.vectorize(colorsys.hsv_to_rgb) def crop(image, box=None): if box: imageBox = box else: imageBox = image.getbb...
29.072727
78
0.661038
from PIL import Image import numpy as np import colorsys import os, sys import argparse import matplotlib.pyplot as plt rgb_to_hsv = np.vectorize(colorsys.rgb_to_hsv) hsv_to_rgb = np.vectorize(colorsys.hsv_to_rgb) def crop(image, box=None): if box: imageBox = box else: imageBox = image.getbb...
true
true
f700fad174e6ff6fa2e5dbcde5ec690589efd9de
301
py
Python
Alert Notification.py
Behordeun/simple-python-projects
c2d088a2c1ebd842ca4d9817d569da4fd6b7f637
[ "Apache-2.0" ]
1
2021-09-09T10:55:23.000Z
2021-09-09T10:55:23.000Z
Alert Notification.py
Behordeun/simple-python-projects
c2d088a2c1ebd842ca4d9817d569da4fd6b7f637
[ "Apache-2.0" ]
null
null
null
Alert Notification.py
Behordeun/simple-python-projects
c2d088a2c1ebd842ca4d9817d569da4fd6b7f637
[ "Apache-2.0" ]
null
null
null
# This is a simple application for alert system from tkinter import * from tkinter import messagebox root = Tk() root.geometry("200x200") def message(): messagebox.showwarning("Alert Box", "Stop virus found") but = Button(root, text="ok", command=Message) but.place(x=100, y=100) root.mainloop()
25.083333
59
0.734219
from tkinter import * from tkinter import messagebox root = Tk() root.geometry("200x200") def message(): messagebox.showwarning("Alert Box", "Stop virus found") but = Button(root, text="ok", command=Message) but.place(x=100, y=100) root.mainloop()
true
true
f700fb1b9f83ac8ec1529d16e00f5a8bbe3d433f
2,355
py
Python
dataflow/sampleGetGlacierOutlineFromInventories.py
GLAMOS/dataflow
af7ca2dea122b3bccee0bdfd4292190bd71eccca
[ "MIT" ]
1
2018-05-22T14:46:48.000Z
2018-05-22T14:46:48.000Z
dataflow/sampleGetGlacierOutlineFromInventories.py
GLAMOS/dataflow
af7ca2dea122b3bccee0bdfd4292190bd71eccca
[ "MIT" ]
22
2018-05-18T15:28:48.000Z
2019-09-05T06:19:33.000Z
dataflow/sampleGetGlacierOutlineFromInventories.py
GLAMOS/dataflow
af7ca2dea122b3bccee0bdfd4292190bd71eccca
[ "MIT" ]
4
2018-07-09T05:08:49.000Z
2021-03-23T08:19:36.000Z
''' Created on 26.07.2018 @author: yvo ''' import configparser import sys from dataflow.DataReaders.DatabaseReaders.GlacierReader import GlacierReader from dataflow.DataReaders.DatabaseReaders.InventoryReader import InventoryReader def printLatestOutline(glaciers): for glacier in glaciers.values(): ...
34.130435
125
0.650955
import configparser import sys from dataflow.DataReaders.DatabaseReaders.GlacierReader import GlacierReader from dataflow.DataReaders.DatabaseReaders.InventoryReader import InventoryReader def printLatestOutline(glaciers): for glacier in glaciers.values(): print("---") print(glacier) ...
true
true
f700fb91eabccac2226537f58a347cff505076df
8,131
py
Python
tensorflow/python/keras/regularizers_test.py
leike666666/tensorflow
a3fd0ddfcb716be124e95b51e96e6c1e4507ef64
[ "Apache-2.0" ]
12
2020-12-28T18:42:10.000Z
2022-03-24T17:34:21.000Z
tensorflow/python/keras/regularizers_test.py
sagol/tensorflow
04f2870814d2773e09dcfa00cbe76a66a2c4de88
[ "Apache-2.0" ]
2
2021-08-25T15:58:11.000Z
2022-02-10T01:47:24.000Z
tensorflow/python/keras/regularizers_test.py
sagol/tensorflow
04f2870814d2773e09dcfa00cbe76a66a2c4de88
[ "Apache-2.0" ]
3
2020-03-09T19:17:02.000Z
2020-06-26T23:14:31.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.535545
80
0.710245
from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl.testing import parameterized import numpy as np from tensorflow.python import keras from tensorflow.python.eager import context from tensorflow.python.keras import keras_parameterized ...
true
true
f700fbd89f1ece538292bf32b2ec1b717f09f289
638
py
Python
termsandconditions_demo/wsgi.py
jlachowski/django-termsandconditions
69085ad7c1ec510371bdbe7c033b449af5f97bff
[ "BSD-3-Clause" ]
null
null
null
termsandconditions_demo/wsgi.py
jlachowski/django-termsandconditions
69085ad7c1ec510371bdbe7c033b449af5f97bff
[ "BSD-3-Clause" ]
null
null
null
termsandconditions_demo/wsgi.py
jlachowski/django-termsandconditions
69085ad7c1ec510371bdbe7c033b449af5f97bff
[ "BSD-3-Clause" ]
null
null
null
"""WSGI File that enables Apache/GUnicorn to run Django""" # pylint: disable=C0103 import os import sys from django.core.wsgi import get_wsgi_application sys.path.insert(0, os.path.abspath(os.path.join(os.path.abspath(os.pardir), os.pardir))) sys.path.insert(0, os.path.abspath(os.path.join(os.path.abspath(os.path.di...
33.578947
93
0.786834
import os import sys from django.core.wsgi import get_wsgi_application sys.path.insert(0, os.path.abspath(os.path.join(os.path.abspath(os.pardir), os.pardir))) sys.path.insert(0, os.path.abspath(os.path.join(os.path.abspath(os.path.dirname(__file__))))) os.environ.setdefault("DJANGO_SETTINGS_MODULE", 'termsandcond...
true
true
f700fd10ec2ca5a09f5d8a94531213dc5a8acc0d
811
py
Python
app/server.py
betandr/grpcdemo
1f1ab18923973f5a6cab36c804978435bbc3a6e5
[ "MIT" ]
5
2018-07-23T16:08:39.000Z
2021-11-10T04:32:12.000Z
app/server.py
betandr/grpcdemo
1f1ab18923973f5a6cab36c804978435bbc3a6e5
[ "MIT" ]
null
null
null
app/server.py
betandr/grpcdemo
1f1ab18923973f5a6cab36c804978435bbc3a6e5
[ "MIT" ]
null
null
null
from concurrent import futures import time import grpc import app.helloworld_pb2 as helloworld_pb2 import app.helloworld_pb2_grpc as helloworld_pb2_grpc _ONE_DAY_IN_SECONDS = 60 * 60 * 24 class Greeter(helloworld_pb2_grpc.GreeterServicer): def Greet(self, request, context): print('Saying `hello` to %s...
24.575758
86
0.718866
from concurrent import futures import time import grpc import app.helloworld_pb2 as helloworld_pb2 import app.helloworld_pb2_grpc as helloworld_pb2_grpc _ONE_DAY_IN_SECONDS = 60 * 60 * 24 class Greeter(helloworld_pb2_grpc.GreeterServicer): def Greet(self, request, context): print('Saying `hello` to %s...
true
true
f700fe26bc9bfda21d39a0bddd89180f5de442ab
2,544
py
Python
StyleText/utils/logging.py
Bourne-M/PaddleOCR
865e737413d430798b8c17525dcc22db4d106752
[ "Apache-2.0" ]
20,401
2020-05-08T10:56:13.000Z
2022-03-31T23:34:38.000Z
StyleText/utils/logging.py
Bourne-M/PaddleOCR
865e737413d430798b8c17525dcc22db4d106752
[ "Apache-2.0" ]
4,988
2020-05-10T08:19:41.000Z
2022-03-31T17:57:11.000Z
StyleText/utils/logging.py
Bourne-M/PaddleOCR
865e737413d430798b8c17525dcc22db4d106752
[ "Apache-2.0" ]
4,479
2020-05-08T11:12:13.000Z
2022-03-31T11:55:28.000Z
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.545455
79
0.704009
import os import sys import logging import functools import paddle.distributed as dist logger_initialized = {} @functools.lru_cache() def get_logger(name='srnet', log_file=None, log_level=logging.INFO): logger = logging.getLogger(name) if name in logger_initialized: return logger for...
true
true
f70101d2e677dfa1c95b8d12717565b56481d031
11,171
py
Python
server/server/organizations/models.py
connectiveproject/connective
8866082b2147feef0e5254ac4215987b9d881396
[ "MIT" ]
4
2021-07-05T10:49:26.000Z
2021-11-24T11:34:43.000Z
server/server/organizations/models.py
connectiveproject/connective
8866082b2147feef0e5254ac4215987b9d881396
[ "MIT" ]
39
2021-06-21T15:02:37.000Z
2022-02-28T15:07:42.000Z
server/server/organizations/models.py
connectiveproject/connective
8866082b2147feef0e5254ac4215987b9d881396
[ "MIT" ]
17
2021-06-16T08:59:45.000Z
2021-09-29T11:35:38.000Z
from django.core.validators import RegexValidator from django.db import models from django.utils.translation import gettext_lazy as _ from taggit.managers import TaggableManager from server.connective_tags.models import ConnectiveTaggedItem from server.schools.models import School from server.utils.db_utils import get...
37.612795
87
0.688569
from django.core.validators import RegexValidator from django.db import models from django.utils.translation import gettext_lazy as _ from taggit.managers import TaggableManager from server.connective_tags.models import ConnectiveTaggedItem from server.schools.models import School from server.utils.db_utils import get...
true
true
f70102464c8e5466183c3e69b120499038456a17
6,962
py
Python
podship/test/engine/functional/api/v1/user.py
candango/socialspider
81b4406a7e30308d904157c76eff949562c8ce28
[ "Apache-2.0" ]
5
2015-05-27T15:22:39.000Z
2015-07-10T21:09:16.000Z
podship/test/engine/functional/api/v1/user.py
candango/socialspider
81b4406a7e30308d904157c76eff949562c8ce28
[ "Apache-2.0" ]
25
2015-10-12T00:36:30.000Z
2016-05-27T17:23:34.000Z
podship/test/engine/functional/api/v1/user.py
candango/podship
81b4406a7e30308d904157c76eff949562c8ce28
[ "Apache-2.0" ]
5
2016-07-06T04:26:59.000Z
2017-12-06T13:05:35.000Z
#!/usr/bin/env python # # Copyright 2015-2016 Flavio Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
38.043716
74
0.594082
from __future__ import (absolute_import, division, print_function, with_statement) import unittest from tornado import httpclient import logging from tornado.escape import json_decode, json_encode from ..v1 import api_url_v1 logger = logging.getLogger(__name__) class UserApiV...
true
true
f7010268e559e7e0ea188f556c3ffbe7b894a88f
243
py
Python
postprocess/_5_1_chemprop.py
ersilia-os/osm-series4-candidates
2d06ae0a5c26efea70d2a21f06a376625977b8b7
[ "MIT" ]
5
2021-06-01T16:52:28.000Z
2021-08-03T11:06:56.000Z
postprocess/_5_1_chemprop.py
ersilia-os/osm-series4-candidates
2d06ae0a5c26efea70d2a21f06a376625977b8b7
[ "MIT" ]
null
null
null
postprocess/_5_1_chemprop.py
ersilia-os/osm-series4-candidates
2d06ae0a5c26efea70d2a21f06a376625977b8b7
[ "MIT" ]
null
null
null
from tqdm import tqdm import pandas as pd from __init__ import FILE df = pd.read_csv(FILE) smiles = list(df["Smiles"]) with open("_chemprop.csv", "w") as f: f.write("smiles\n") for smi in smiles: f.write("{0}\n".format(smi))
20.25
37
0.650206
from tqdm import tqdm import pandas as pd from __init__ import FILE df = pd.read_csv(FILE) smiles = list(df["Smiles"]) with open("_chemprop.csv", "w") as f: f.write("smiles\n") for smi in smiles: f.write("{0}\n".format(smi))
true
true
f70102e75136d1fd056604a40b88ee06d7af2da9
18,984
py
Python
torch/distributed/_shard/sharded_tensor/__init__.py
jaketae/pytorch
5654e6339879e438efb7cf50e88e356472eb0545
[ "Intel" ]
1
2022-02-01T18:50:09.000Z
2022-02-01T18:50:09.000Z
torch/distributed/_shard/sharded_tensor/__init__.py
ellhe-blaster/pytorch
e5282c3cb8bf6ad8c5161f9d0cc271edb9abed25
[ "Intel" ]
null
null
null
torch/distributed/_shard/sharded_tensor/__init__.py
ellhe-blaster/pytorch
e5282c3cb8bf6ad8c5161f9d0cc271edb9abed25
[ "Intel" ]
null
null
null
# coding=utf-8 import copy import functools from typing import List import torch import torch.distributed._shard.sharding_spec as shard_spec from .api import ( _register_sharded_op, Shard, ShardedTensor, ShardedTensorMetadata, TensorProperties, ) from .metadata import ShardMetadata # noqa: F401 ...
42
124
0.656711
import copy import functools from typing import List import torch import torch.distributed._shard.sharding_spec as shard_spec from .api import ( _register_sharded_op, Shard, ShardedTensor, ShardedTensorMetadata, TensorProperties, ) from .metadata import ShardMetadata from .partial_tensor impor...
true
true
f701031bd231b0e34d374a632472743d709b8fc1
20,585
py
Python
fairseq/data/iterators.py
ofirpress/shortformer
edc411ff896ae042c01d939a32c1e4a33e238083
[ "MIT" ]
143
2020-12-30T21:40:00.000Z
2022-01-06T21:19:24.000Z
fairseq/data/iterators.py
jbdatascience/shortformer
0281f7618fb3833c8ac99f3e8e0512aed95fa2a1
[ "MIT" ]
4
2020-12-31T01:04:24.000Z
2021-10-16T23:06:04.000Z
fairseq/data/iterators.py
jbdatascience/shortformer
0281f7618fb3833c8ac99f3e8e0512aed95fa2a1
[ "MIT" ]
7
2020-12-31T17:34:54.000Z
2021-05-21T14:25:57.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import itertools import logging import math import operator import os import queue import time from threading import Thread import numpy as n...
35.8
145
0.614914
import itertools import logging import math import operator import os import queue import time from threading import Thread import numpy as np import torch from fairseq.data import data_utils logger = logging.getLogger(__name__) _sentinel = object() class CountingIterator(object): def __init__(self, ...
true
true
f70103317a07a6f7d5eeac3ff180b3d79a0fc6b7
1,126
py
Python
gen_ndx_for_h.py
fio2003/GPA_star
33530056500fed30bba27aaade3db544f76c4c50
[ "MIT" ]
null
null
null
gen_ndx_for_h.py
fio2003/GPA_star
33530056500fed30bba27aaade3db544f76c4c50
[ "MIT" ]
null
null
null
gen_ndx_for_h.py
fio2003/GPA_star
33530056500fed30bba27aaade3db544f76c4c50
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from parse_topology_for_hydrogens import parse_top_for_h def gen_h_ndx(orig_ndx, topology, out_name='h_prot.ndx'): ndx_ind = list() with open(orig_ndx, 'r') as f: line = f.readline() while '[ Protein ]' not in line: line = f.readline() line = f.readl...
32.171429
71
0.584369
from parse_topology_for_hydrogens import parse_top_for_h def gen_h_ndx(orig_ndx, topology, out_name='h_prot.ndx'): ndx_ind = list() with open(orig_ndx, 'r') as f: line = f.readline() while '[ Protein ]' not in line: line = f.readline() line = f.readline() while ';...
true
true
f7010346ccc7068236993498a0b696ad3a8f117c
943
py
Python
fixture/soap.py
nicholas-y/python_mantis
27c993f6d47804ae12f15664e783cf27db89ed06
[ "Apache-2.0" ]
null
null
null
fixture/soap.py
nicholas-y/python_mantis
27c993f6d47804ae12f15664e783cf27db89ed06
[ "Apache-2.0" ]
null
null
null
fixture/soap.py
nicholas-y/python_mantis
27c993f6d47804ae12f15664e783cf27db89ed06
[ "Apache-2.0" ]
null
null
null
from suds.client import Client from suds import WebFault from model.project import Project class SoapHelper: def __init__(self, app): self.app = app def can_login(self, username, password): client = Client("http://localhost:8080/mantisbt-1.2.20/api/soap/mantisconnect.php?wsdl") try: ...
32.517241
96
0.662778
from suds.client import Client from suds import WebFault from model.project import Project class SoapHelper: def __init__(self, app): self.app = app def can_login(self, username, password): client = Client("http://localhost:8080/mantisbt-1.2.20/api/soap/mantisconnect.php?wsdl") try: ...
true
true
f701037a52d81611de31cc7b16b479f6c00e8253
483
py
Python
trigger.py
melnikk/docker-kibana
588136b6ab89fab82f2c6a35d18bd698bbbb5a5b
[ "MIT" ]
null
null
null
trigger.py
melnikk/docker-kibana
588136b6ab89fab82f2c6a35d18bd698bbbb5a5b
[ "MIT" ]
null
null
null
trigger.py
melnikk/docker-kibana
588136b6ab89fab82f2c6a35d18bd698bbbb5a5b
[ "MIT" ]
null
null
null
#!/usr/bin/python import requests import os token = os.getenv("DOCKER_HUB_TOKEN") version = os.getenv("VERSION") if token==None: print "env DOCKER_HUB_TOKEN not set" exit(1) if version==None: print "env VERSION not set" exit(1) url = "https://registry.hub.docker.com/u/skbkontur/kibana/trigger/%s...
21.954545
82
0.693582
import requests import os token = os.getenv("DOCKER_HUB_TOKEN") version = os.getenv("VERSION") if token==None: print "env DOCKER_HUB_TOKEN not set" exit(1) if version==None: print "env VERSION not set" exit(1) url = "https://registry.hub.docker.com/u/skbkontur/kibana/trigger/%s/" % token payloa...
false
true
f70105949195595111fc3e5cde8ede620a8580fd
1,859
py
Python
denim/scaffold/__init__.py
timsavage/denim
8aafd7d7b0d6cc4029e451e36e6fa25d4c842a04
[ "BSD-2-Clause" ]
null
null
null
denim/scaffold/__init__.py
timsavage/denim
8aafd7d7b0d6cc4029e451e36e6fa25d4c842a04
[ "BSD-2-Clause" ]
1
2015-08-06T22:24:16.000Z
2015-08-18T07:17:38.000Z
denim/scaffold/__init__.py
timsavage/denim
8aafd7d7b0d6cc4029e451e36e6fa25d4c842a04
[ "BSD-2-Clause" ]
null
null
null
# -*- encoding:utf8 -*- try: from jinja2 import Environment, PackageLoader except ImportError: raise ImportError('Scaffolding support requires the Jinja 2 templating library to be installed.') template_environment = Environment(loader=PackageLoader('denim.scaffold')) def single(template_file, output_name, co...
26.942029
101
0.641205
try: from jinja2 import Environment, PackageLoader except ImportError: raise ImportError('Scaffolding support requires the Jinja 2 templating library to be installed.') template_environment = Environment(loader=PackageLoader('denim.scaffold')) def single(template_file, output_name, context): """ Gen...
false
true
f7010728fb2ff36ef48aac18ff34445fa2e903b4
137
py
Python
10870/solution.py
bossm0n5t3r/BOJ
03132388a0c76ef66d6b0dec2053aeca65c4aee6
[ "MIT" ]
2
2020-01-14T07:27:25.000Z
2020-02-12T07:49:58.000Z
2747/solution.py
bossm0n5t3r/BOJ
03132388a0c76ef66d6b0dec2053aeca65c4aee6
[ "MIT" ]
1
2020-01-14T07:29:30.000Z
2021-11-28T11:29:08.000Z
2748/solution.py
bossm0n5t3r/BOJ
03132388a0c76ef66d6b0dec2053aeca65c4aee6
[ "MIT" ]
null
null
null
def sol(): a, b = 0, 1 for i in range(int(input())): a, b = b, a + b print(a) if __name__ == "__main__": sol()
13.7
33
0.445255
def sol(): a, b = 0, 1 for i in range(int(input())): a, b = b, a + b print(a) if __name__ == "__main__": sol()
true
true
f70107c16aa8da73270e2e4f859fa54ad72fc815
5,031
py
Python
slackclient/slackrequest.py
MicahLyle/python-slackclient
ad3710611bc6b061feac46df2535c9089ec38677
[ "MIT" ]
null
null
null
slackclient/slackrequest.py
MicahLyle/python-slackclient
ad3710611bc6b061feac46df2535c9089ec38677
[ "MIT" ]
null
null
null
slackclient/slackrequest.py
MicahLyle/python-slackclient
ad3710611bc6b061feac46df2535c9089ec38677
[ "MIT" ]
null
null
null
import json import platform import requests import six import sys from .version import __version__ class SlackRequest(object): def __init__( self, proxies=None ): # HTTP configs self.custom_user_agent = None self.proxies = proxies # Construct the user-...
40.572581
97
0.611608
import json import platform import requests import six import sys from .version import __version__ class SlackRequest(object): def __init__( self, proxies=None ): self.custom_user_agent = None self.proxies = proxies self.default_user_agent = ...
true
true
f70107d74dd229b54d77f5a86ff7c2a5e86c85cc
13,891
py
Python
src/controller/python/chip/ChipStack.py
tymoteuszblochmobica/connectedhomeip
fe4cf7813766b96df13ceb88f6e1cccf083ae1a9
[ "Apache-2.0" ]
null
null
null
src/controller/python/chip/ChipStack.py
tymoteuszblochmobica/connectedhomeip
fe4cf7813766b96df13ceb88f6e1cccf083ae1a9
[ "Apache-2.0" ]
null
null
null
src/controller/python/chip/ChipStack.py
tymoteuszblochmobica/connectedhomeip
fe4cf7813766b96df13ceb88f6e1cccf083ae1a9
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2020 Project CHIP Authors # Copyright (c) 2020 Google LLC. # 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.apa...
37.042667
111
0.626593
from __future__ import absolute_import from __future__ import print_function import sys import os import time import glob import platform import logging from threading import Lock, Event from ctypes import * from .ChipUtility import ChipUtility from .ChipExceptions import * __all__ = [ "Dev...
true
true