hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f72fbad2adffd95d82e895b59a2b7ca1499c137d
193
py
Python
python/interpret-core/interpret/greybox/__init__.py
prateekiiest/interpret
b5530a587251a77516ab443037fc37f71708564c
[ "MIT" ]
2,674
2019-10-03T14:14:35.000Z
2022-03-31T13:40:49.000Z
python/interpret-core/interpret/greybox/__init__.py
prateekiiest/interpret
b5530a587251a77516ab443037fc37f71708564c
[ "MIT" ]
257
2019-11-08T19:22:56.000Z
2022-03-29T20:09:07.000Z
python/interpret-core/interpret/greybox/__init__.py
prateekiiest/interpret
b5530a587251a77516ab443037fc37f71708564c
[ "MIT" ]
367
2019-10-31T15:33:21.000Z
2022-03-31T13:40:50.000Z
# Copyright (c) 2019 Microsoft Corporation # Distributed under the MIT software license from .treeinterpreter import TreeInterpreter # noqa: F401 from .shaptree import ShapTree # noqa: F401
32.166667
58
0.792746
from .treeinterpreter import TreeInterpreter from .shaptree import ShapTree
true
true
f72fbadd2f5f8ca5d3e6c9fc5dc5627d098e888f
5,496
py
Python
source/generate_symbolic_derivatives.py
daccordeon/CEonlyPony
7af50792a3a28101391397fce1e2b5e01d919701
[ "BSD-3-Clause" ]
null
null
null
source/generate_symbolic_derivatives.py
daccordeon/CEonlyPony
7af50792a3a28101391397fce1e2b5e01d919701
[ "BSD-3-Clause" ]
null
null
null
source/generate_symbolic_derivatives.py
daccordeon/CEonlyPony
7af50792a3a28101391397fce1e2b5e01d919701
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 """Generate symbolic derivatives as lambdified functions for gwbench. When run as a script: generate all symbolic derivatives for tf2_tidal at all standard locations ahead of benchmarking. Slurm gets upset when multiple tasks try to create the derivatives if there aren't any there already, so ru...
39.539568
119
0.691776
from typing import List, Set, Dict, Tuple, Optional, Union import os from gwbench import wf_class as wfc from gwbench import detector_response_derivatives as drd def generate_symbolic_derivatives( wf_model_name: str, wf_other_var_dic: Optional[Dict[str, str]], deriv_symbs_string: str, locs: List[str]...
true
true
f72fbb46da1ac696d933485cf3bec183189f023a
1,181
py
Python
setup.py
i008/neptune-contrib
4071c44112da4d7c52ee42cbb1ba937a66e5845b
[ "MIT" ]
null
null
null
setup.py
i008/neptune-contrib
4071c44112da4d7c52ee42cbb1ba937a66e5845b
[ "MIT" ]
null
null
null
setup.py
i008/neptune-contrib
4071c44112da4d7c52ee42cbb1ba937a66e5845b
[ "MIT" ]
null
null
null
from setuptools import find_packages, setup def main(): extras = { 'bots': ['python-telegram-bot'], 'hpo': ['scikit-optimize==0.5.2', 'scipy'], 'monitoring': ['scikit-optimize==0.5.2', 'sacred==0.7.5', 'scikit-learn==0.21.3', 'scikit-plot==0.3.7', 'seaborn==0.8.1', '...
31.078947
110
0.580017
from setuptools import find_packages, setup def main(): extras = { 'bots': ['python-telegram-bot'], 'hpo': ['scikit-optimize==0.5.2', 'scipy'], 'monitoring': ['scikit-optimize==0.5.2', 'sacred==0.7.5', 'scikit-learn==0.21.3', 'scikit-plot==0.3.7', 'seaborn==0.8.1', '...
true
true
f72fbc9ef2815a7c16260374b2af5e47dc631fe1
5,099
py
Python
dev_scripts/chemenv/equivalent_indices.py
frssp/pymatgen
bdd977f065b66191557c7398b31a1571bc541fdb
[ "MIT" ]
5
2019-04-11T20:57:38.000Z
2021-12-01T05:00:42.000Z
dev_scripts/chemenv/equivalent_indices.py
darnoceloc/pymatgen
5cc42912a12a265a603df7e34c856561f76edc1f
[ "MIT" ]
3
2017-07-18T01:13:41.000Z
2019-04-29T18:17:30.000Z
dev_scripts/chemenv/equivalent_indices.py
darnoceloc/pymatgen
5cc42912a12a265a603df7e34c856561f76edc1f
[ "MIT" ]
3
2019-10-14T19:47:34.000Z
2020-07-02T08:10:45.000Z
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals """ Development script of the ChemEnv utility to get the equivalent indices of the model coordination environments """ __author__ = "David Waroquiers" __copyr...
34.452703
110
0.442636
from __future__ import division, unicode_literals __author__ = "David Waroquiers" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "2.0" __maintainer__ = "David Waroquiers" __email__ = "david.waroquiers@gmail.com" __date__ = "Feb 20, 2016" import numpy as np if __name__ == '__main__': cg...
true
true
f72fbcceb7f7342d732b521612c2db620aa6ae77
15,134
py
Python
neutron/agent/l3/extensions/qos/fip.py
netsec/neutron
17f90e17f139dc47eaafa1d3e342eb87ff0f61ed
[ "Apache-2.0" ]
null
null
null
neutron/agent/l3/extensions/qos/fip.py
netsec/neutron
17f90e17f139dc47eaafa1d3e342eb87ff0f61ed
[ "Apache-2.0" ]
null
null
null
neutron/agent/l3/extensions/qos/fip.py
netsec/neutron
17f90e17f139dc47eaafa1d3e342eb87ff0f61ed
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 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 requ...
43.24
79
0.619466
from neutron_lib.agent import l3_extension from neutron_lib import constants from neutron_lib.services.qos import constants as qos_consts from oslo_concurrency import lockutils from oslo_log import log as logging from neutron.agent.l3.extensions.qos import base as qos_base from neutron.agent.linux import ip_lib from ...
true
true
f72fbced7d7530fbca0bf7e3bb8adb613862ba38
183
py
Python
Euler/Problem_16.py
ChristensenCode/energy-viking
7a720cbcfabcb020ed42d52462bfad4058b0c20f
[ "MIT" ]
null
null
null
Euler/Problem_16.py
ChristensenCode/energy-viking
7a720cbcfabcb020ed42d52462bfad4058b0c20f
[ "MIT" ]
null
null
null
Euler/Problem_16.py
ChristensenCode/energy-viking
7a720cbcfabcb020ed42d52462bfad4058b0c20f
[ "MIT" ]
null
null
null
# Problem 16 Power Digit Sum x = 2**1000 print(x) value = str(2**1000) totalling = [] for i in range(len(value)): total = int(value[i]) totalling.append(total) print(sum(totalling))
20.333333
28
0.688525
x = 2**1000 print(x) value = str(2**1000) totalling = [] for i in range(len(value)): total = int(value[i]) totalling.append(total) print(sum(totalling))
true
true
f72fbf0efa739283e1861ea301b93db9d409887a
1,174
py
Python
neutron/db/migration/alembic_migrations/versions/1f71e54a85e7_ml2_net_seg_model.py
gampel/neutron
51a6260266dc59c066072ca890ad9c40b1aad6cf
[ "Apache-2.0" ]
10
2015-09-22T10:22:53.000Z
2016-02-25T06:12:05.000Z
neutron/db/migration/alembic_migrations/versions/1f71e54a85e7_ml2_net_seg_model.py
gampel/neutron
51a6260266dc59c066072ca890ad9c40b1aad6cf
[ "Apache-2.0" ]
12
2015-01-08T18:30:45.000Z
2015-03-13T21:04:15.000Z
neutron/db/migration/alembic_migrations/versions/1f71e54a85e7_ml2_net_seg_model.py
gampel/neutron
51a6260266dc59c066072ca890ad9c40b1aad6cf
[ "Apache-2.0" ]
7
2015-02-05T10:23:52.000Z
2019-05-18T17:11:19.000Z
# Copyright 2014 OpenStack Foundation # # 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 ...
28.634146
78
0.721465
revision = '1f71e54a85e7' down_revision = '44621190bc02' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('ml2_network_segments', sa.Column('segment_index', sa.Integer(), nullable=False, server_default='0')) def downgrade(): op.drop_column('...
true
true
f72fbf450177a71f28c55fbc60c587342b06a61a
26,495
py
Python
scikits/crab/recommenders/knn/classes.py
MostaSchoolOfAI/crab
1c1fc21e902e4ee422ab367d691df16978972f8c
[ "BSD-3-Clause" ]
null
null
null
scikits/crab/recommenders/knn/classes.py
MostaSchoolOfAI/crab
1c1fc21e902e4ee422ab367d691df16978972f8c
[ "BSD-3-Clause" ]
null
null
null
scikits/crab/recommenders/knn/classes.py
MostaSchoolOfAI/crab
1c1fc21e902e4ee422ab367d691df16978972f8c
[ "BSD-3-Clause" ]
null
null
null
""" Generalized Recommender models. This module contains basic memory recommender interfaces used throughout the whole scikit-crab package. The interfaces are realized as abstract base classes (ie., some optional functionality is provided in the interface itself, so that the interfaces can be subclassed). """ # Aut...
37.316901
98
0.627062
from sklearn.base import BaseEstimator from .base import ItemRecommender, UserRecommender from .item_strategies import ItemsNeighborhoodStrategy from .neighborhood_strategies import NearestNeighborsStrategy import numpy as np class ItemBasedRecommender(ItemRecommender): def __init__(self, model, similarity, ite...
true
true
f72fbfc6053fee1b605915399588d9a35599ebe1
13,242
py
Python
care/utils/tests/test_base.py
agzuniverse/care
952babf5b394921fcdb4fd4b1405cb571261f322
[ "MIT" ]
null
null
null
care/utils/tests/test_base.py
agzuniverse/care
952babf5b394921fcdb4fd4b1405cb571261f322
[ "MIT" ]
null
null
null
care/utils/tests/test_base.py
agzuniverse/care
952babf5b394921fcdb4fd4b1405cb571261f322
[ "MIT" ]
null
null
null
import abc import datetime from collections import OrderedDict from typing import Any, Dict import dateparser from django.contrib.gis.geos import Point from pytz import unicode from rest_framework import status from rest_framework.test import APITestCase from care.facility.models import ( CATEGORY_CHOICES, DI...
35.596774
118
0.589337
import abc import datetime from collections import OrderedDict from typing import Any, Dict import dateparser from django.contrib.gis.geos import Point from pytz import unicode from rest_framework import status from rest_framework.test import APITestCase from care.facility.models import ( CATEGORY_CHOICES, DI...
true
true
f72fc0334115b183ce538c3c6dd415915cddc916
1,223
py
Python
data_statistics.py
Dipeshtamboli/domain-shift
3f29577df6ab7269ad69a5fc651b63ed78708f0b
[ "MIT" ]
null
null
null
data_statistics.py
Dipeshtamboli/domain-shift
3f29577df6ab7269ad69a5fc651b63ed78708f0b
[ "MIT" ]
null
null
null
data_statistics.py
Dipeshtamboli/domain-shift
3f29577df6ab7269ad69a5fc651b63ed78708f0b
[ "MIT" ]
null
null
null
import pdb import numpy as np import os import glob import torch import torch.nn as nn import torchvision.models as models import torchvision.transforms as transforms from torch.autograd import Variable from PIL import Image from tqdm import tqdm relative_path = 'datasets/resnet_features_subset_office31/' ...
33.054054
112
0.713001
import pdb import numpy as np import os import glob import torch import torch.nn as nn import torchvision.models as models import torchvision.transforms as transforms from torch.autograd import Variable from PIL import Image from tqdm import tqdm relative_path = 'datasets/resnet_features_subset_office31/' ...
true
true
f72fc06d644f387753e387544faebf08963a1082
16,871
py
Python
tensorflow_probability/python/distributions/poisson_lognormal.py
hephaex/probability
740d0db0bf2b1e1a04cfd0b55481c44380b3cb05
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/distributions/poisson_lognormal.py
hephaex/probability
740d0db0bf2b1e1a04cfd0b55481c44380b3cb05
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/distributions/poisson_lognormal.py
hephaex/probability
740d0db0bf2b1e1a04cfd0b55481c44380b3cb05
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
39.510539
80
0.684073
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf from tensorflow_probability.python.bijectors import exp as exp_bijector from tensorflow_probability.python.distributions import categorical from tensorflow_probabili...
true
true
f72fc09102b906fd3f59703976525e7e5cd9e483
2,338
py
Python
tests/test_paramark.py
mrzechonek/pytest-paramark
2c899e200eb0d68e66cd4e32e46c9cdd396845ec
[ "MIT" ]
1
2021-12-23T11:21:16.000Z
2021-12-23T11:21:16.000Z
tests/test_paramark.py
mrzechonek/pytest-paramark
2c899e200eb0d68e66cd4e32e46c9cdd396845ec
[ "MIT" ]
null
null
null
tests/test_paramark.py
mrzechonek/pytest-paramark
2c899e200eb0d68e66cd4e32e46c9cdd396845ec
[ "MIT" ]
null
null
null
from namedlist import namedlist import pytest # fmt: off @pytest.fixture(indirect=True) def foo(request): Foo = namedlist('Foo', ( ('some_option', 42), ('another_option', 'test'), )) return Foo(**request.param) @pytest.fixture(indirect=True) def bar(request): Bar = namedlist('Bar',...
20.155172
55
0.641574
from namedlist import namedlist import pytest @pytest.fixture(indirect=True) def foo(request): Foo = namedlist('Foo', ( ('some_option', 42), ('another_option', 'test'), )) return Foo(**request.param) @pytest.fixture(indirect=True) def bar(request): Bar = namedlist('Bar', ( ...
true
true
f72fc0b2e52b6be3a20c325a24aba237a4e6319d
1,372
py
Python
bigtable/hello_happybase/main_test.py
thesugar/python-docs-samples
1a59ca688f1d7602d52cd4088fa7b6e3afe0afd0
[ "Apache-2.0" ]
34
2020-07-27T19:14:01.000Z
2022-03-31T14:46:53.000Z
bigtable/hello_happybase/main_test.py
thesugar/python-docs-samples
1a59ca688f1d7602d52cd4088fa7b6e3afe0afd0
[ "Apache-2.0" ]
254
2020-01-31T23:44:06.000Z
2022-03-23T22:52:49.000Z
bigtable/hello_happybase/main_test.py
thesugar/python-docs-samples
1a59ca688f1d7602d52cd4088fa7b6e3afe0afd0
[ "Apache-2.0" ]
30
2020-01-31T20:45:34.000Z
2022-03-23T19:56:42.000Z
# Copyright 2016 Google 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 to in writing, ...
32.666667
74
0.729592
import os import random from main import main PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] BIGTABLE_INSTANCE = os.environ['BIGTABLE_INSTANCE'] TABLE_NAME_FORMAT = 'hello-world-hb-test-{}' TABLE_NAME_RANGE = 10000 def test_main(capsys): table_name = TABLE_NAME_FORMAT.format( random.randrange(TABLE_NAME_...
true
true
f72fc11fa59ceffe2e3f49244bef15eddabf9421
7,807
py
Python
cloudcafe/compute/flavors_api/models/flavor.py
ProjectMeniscus/cloudcafe
fa8fd796b303f0c5f0d6e98b2b5d01f6ea8fefe9
[ "Apache-2.0" ]
null
null
null
cloudcafe/compute/flavors_api/models/flavor.py
ProjectMeniscus/cloudcafe
fa8fd796b303f0c5f0d6e98b2b5d01f6ea8fefe9
[ "Apache-2.0" ]
null
null
null
cloudcafe/compute/flavors_api/models/flavor.py
ProjectMeniscus/cloudcafe
fa8fd796b303f0c5f0d6e98b2b5d01f6ea8fefe9
[ "Apache-2.0" ]
1
2020-11-17T19:05:08.000Z
2020-11-17T19:05:08.000Z
""" Copyright 2013 Rackspace Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
34.39207
77
0.599846
import json import xml.etree.ElementTree as ET from cafe.engine.models.base import AutoMarshallingModel from cloudcafe.compute.common.equality_tools import EqualityTools from cloudcafe.compute.common.constants import Constants from cloudcafe.compute.common.models.link import Links class CreateFlavor(AutoMarshalling...
true
true
f72fc1298f0c5130bd5594ba286c250a4a144484
524
py
Python
build/srslib_test/catkin_generated/pkg.develspace.context.pc.py
6RiverSystems/darknet_ros
03c72b96afa99f7cc75f7792b51deb4a7f4ed379
[ "BSD-3-Clause" ]
null
null
null
build/srslib_test/catkin_generated/pkg.develspace.context.pc.py
6RiverSystems/darknet_ros
03c72b96afa99f7cc75f7792b51deb4a7f4ed379
[ "BSD-3-Clause" ]
null
null
null
build/srslib_test/catkin_generated/pkg.develspace.context.pc.py
6RiverSystems/darknet_ros
03c72b96afa99f7cc75f7792b51deb4a7f4ed379
[ "BSD-3-Clause" ]
null
null
null
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/kalyco/mfp_workspace/src/srslib_test/include".split(';') if "/home/kalyco/mfp_workspace/src/srslib_test/include" != "" else [] PROJECT_CATKIN_DEPENDS = "".replace(';', ' ') PKG_CONFIG_LIBRARIES_W...
58.222222
167
0.757634
CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/kalyco/mfp_workspace/src/srslib_test/include".split(';') if "/home/kalyco/mfp_workspace/src/srslib_test/include" != "" else [] PROJECT_CATKIN_DEPENDS = "".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "-lsrslib_test".split(';') if "-lsrslib_test...
true
true
f72fc1629529690ac89591087b2b8586758a03f9
1,138
py
Python
scripts/package.py
ralfonso/theory
41684969313cfc545d74b306e409fd5bf21387b3
[ "MIT" ]
4
2015-07-03T19:53:59.000Z
2016-04-25T03:03:56.000Z
scripts/package.py
ralfonso/theory
41684969313cfc545d74b306e409fd5bf21387b3
[ "MIT" ]
null
null
null
scripts/package.py
ralfonso/theory
41684969313cfc545d74b306e409fd5bf21387b3
[ "MIT" ]
2
2020-03-29T22:02:29.000Z
2021-07-13T07:17:19.000Z
#!/usr/bin/env python import os import shutil import sys import subprocess import cairo def main(): version = '0.1.11' script_location = sys.argv[0] script_path = os.path.abspath(script_location) app_path = os.sep.join(script_path.split(os.sep)[:-3]) src = os.path.join(app_path,'theory') d...
23.708333
107
0.654657
import os import shutil import sys import subprocess import cairo def main(): version = '0.1.11' script_location = sys.argv[0] script_path = os.path.abspath(script_location) app_path = os.sep.join(script_path.split(os.sep)[:-3]) src = os.path.join(app_path,'theory') dest = os.path.join(app...
false
true
f72fc212dd0b3eb11cf3285fa9470daba40b1324
9,865
py
Python
web3/providers/eth_tester/middleware.py
ayushkumar63123/web3.py
4dda2db9d27a409f1a9c2b4a8ec917b53c51383f
[ "MIT" ]
1
2022-03-19T03:49:34.000Z
2022-03-19T03:49:34.000Z
web3/providers/eth_tester/middleware.py
ayushkumar63123/web3.py
4dda2db9d27a409f1a9c2b4a8ec917b53c51383f
[ "MIT" ]
null
null
null
web3/providers/eth_tester/middleware.py
ayushkumar63123/web3.py
4dda2db9d27a409f1a9c2b4a8ec917b53c51383f
[ "MIT" ]
1
2021-11-12T00:38:42.000Z
2021-11-12T00:38:42.000Z
import operator from typing import ( TYPE_CHECKING, Any, Callable, ) from eth_typing import ( ChecksumAddress, ) from eth_utils import ( is_dict, is_hex, is_string, ) from eth_utils.curried import ( apply_formatter_if, apply_formatters_to_dict, ) from eth_utils.toolz import ( as...
31.119874
100
0.693259
import operator from typing import ( TYPE_CHECKING, Any, Callable, ) from eth_typing import ( ChecksumAddress, ) from eth_utils import ( is_dict, is_hex, is_string, ) from eth_utils.curried import ( apply_formatter_if, apply_formatters_to_dict, ) from eth_utils.toolz import ( as...
true
true
f72fc26e54686c0677dd432b4718786ee33861af
188
py
Python
toal/annotators/WebAnnotators.py
Bhaskers-Blu-Org1/text-oriented-active-learning
facfb40673a59e43391b7bdb508e612dff1988d9
[ "MIT" ]
4
2020-10-23T14:42:30.000Z
2021-06-10T13:29:04.000Z
toal/annotators/WebAnnotators.py
Bhaskers-Blu-Org1/text-oriented-active-learning
facfb40673a59e43391b7bdb508e612dff1988d9
[ "MIT" ]
null
null
null
toal/annotators/WebAnnotators.py
Bhaskers-Blu-Org1/text-oriented-active-learning
facfb40673a59e43391b7bdb508e612dff1988d9
[ "MIT" ]
1
2020-07-30T10:35:09.000Z
2020-07-30T10:35:09.000Z
from .AbstractAnnotator import AbstractAnnotator class WebAnnotator(AbstractAnnotator): def annotate(self, unlab_index, unlabeled_x, unlabeled_y): raise NotImplementedError()
31.333333
62
0.797872
from .AbstractAnnotator import AbstractAnnotator class WebAnnotator(AbstractAnnotator): def annotate(self, unlab_index, unlabeled_x, unlabeled_y): raise NotImplementedError()
true
true
f72fc3c32c354207da9306ce6997164be7d90d1b
9,544
py
Python
venv/lib/python3.8/site-packages/awscli/customizations/eks/kubeconfig.py
sr9dc/DS_Systems_Project_2
0b348c1dd300756f732b4ce13e04239036dc601a
[ "MIT" ]
4
2022-01-07T13:37:33.000Z
2022-03-31T03:21:17.000Z
venv/lib/python3.8/site-packages/awscli/customizations/eks/kubeconfig.py
sr9dc/DS_Systems_Project_2
0b348c1dd300756f732b4ce13e04239036dc601a
[ "MIT" ]
1
2022-01-27T04:21:58.000Z
2022-01-27T04:21:58.000Z
venv/lib/python3.8/site-packages/awscli/customizations/eks/kubeconfig.py
sr9dc/DS_Systems_Project_2
0b348c1dd300756f732b4ce13e04239036dc601a
[ "MIT" ]
null
null
null
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
34.454874
83
0.585813
import os import yaml import logging import errno from botocore.compat import OrderedDict from awscli.customizations.eks.exceptions import EKSError from awscli.customizations.eks.ordered_yaml import (ordered_yaml_load, ordered_yaml_dump) class KubeconfigError(EKSE...
true
true
f72fc4014791e9cb00ad25357fa03b020d005be5
8,006
py
Python
mxdc/devices/cryojet.py
michel4j/mxdc
844f0854cc696553c8a51f8e9b5b06a8e4345261
[ "BSD-3-Clause" ]
2
2018-10-23T19:05:40.000Z
2021-03-18T20:06:32.000Z
mxdc/devices/cryojet.py
michel4j/mxdc
844f0854cc696553c8a51f8e9b5b06a8e4345261
[ "BSD-3-Clause" ]
null
null
null
mxdc/devices/cryojet.py
michel4j/mxdc
844f0854cc696553c8a51f8e9b5b06a8e4345261
[ "BSD-3-Clause" ]
null
null
null
from enum import Enum from gi.repository import GLib from zope.interface import implementer import mxdc.devices.shutter from mxdc import Device, Signal, Property from mxdc.devices import misc from mxdc.utils.log import get_module_logger from .interfaces import ICryostat logger = get_module_logger(__name__) class C...
33.923729
103
0.62066
from enum import Enum from gi.repository import GLib from zope.interface import implementer import mxdc.devices.shutter from mxdc import Device, Signal, Property from mxdc.devices import misc from mxdc.utils.log import get_module_logger from .interfaces import ICryostat logger = get_module_logger(__name__) class C...
true
true
f72fc514b8852f9e17acbed322e8818424cb6190
59,548
py
Python
test/azure/Expected/AcceptanceTests/Paging/paging/aio/operations/_paging_operations.py
amrElroumy/autorest.python
b37af1779f6d53b4fa0d92da62151f8133006f98
[ "MIT" ]
null
null
null
test/azure/Expected/AcceptanceTests/Paging/paging/aio/operations/_paging_operations.py
amrElroumy/autorest.python
b37af1779f6d53b4fa0d92da62151f8133006f98
[ "MIT" ]
null
null
null
test/azure/Expected/AcceptanceTests/Paging/paging/aio/operations/_paging_operations.py
amrElroumy/autorest.python
b37af1779f6d53b4fa0d92da62151f8133006f98
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
47.983884
140
0.653171
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_er...
true
true
f72fc59c0d562a760978fca715dfabbc90935136
791
pyde
Python
mode/examples/Topics/Create Shapes/PolygonPShape/PolygonPShape.pyde
timgates42/processing.py
78a237922c2a928b83f4ad579dbf8d32c0099890
[ "Apache-2.0" ]
1,224
2015-01-01T22:09:23.000Z
2022-03-29T19:43:56.000Z
mode/examples/Topics/Create Shapes/PolygonPShape/PolygonPShape.pyde
timgates42/processing.py
78a237922c2a928b83f4ad579dbf8d32c0099890
[ "Apache-2.0" ]
253
2015-01-14T03:45:51.000Z
2022-02-08T01:18:19.000Z
mode/examples/Topics/Create Shapes/PolygonPShape/PolygonPShape.pyde
timgates42/processing.py
78a237922c2a928b83f4ad579dbf8d32c0099890
[ "Apache-2.0" ]
225
2015-01-13T18:38:33.000Z
2022-03-30T20:27:39.000Z
""" PrimitivePShape. Using a PShape to display a custom polygon. """ def setup(): size(640, 360, P2D) smooth() # First create the shape. global star star = createShape() star.beginShape() # You can set fill and stroke. star.fill(102) star.stroke(255) star.strokeWeight(2) ...
19.775
51
0.610619
def setup(): size(640, 360, P2D) smooth() global star star = createShape() star.beginShape() star.fill(102) star.stroke(255) star.strokeWeight(2) star.vertex(0, -50) star.vertex(14, -20) star.vertex(47, -15) star.vertex(23, 7) star.vertex(29, 40) sta...
true
true
f72fc60681e9156e8be7417e9e0e510cbc1a4913
7,388
py
Python
faucet/faucet_pipeline.py
boldsort/faucet
451fbaa8ebce1822e06615c9da947f1dc7e3e416
[ "Apache-2.0" ]
3
2021-04-07T19:10:12.000Z
2021-12-30T17:11:14.000Z
faucet/faucet_pipeline.py
boldsort/faucet
451fbaa8ebce1822e06615c9da947f1dc7e3e416
[ "Apache-2.0" ]
27
2019-03-22T03:44:20.000Z
2020-01-19T16:53:55.000Z
faucet/faucet_pipeline.py
boldsort/faucet
451fbaa8ebce1822e06615c9da947f1dc7e3e416
[ "Apache-2.0" ]
1
2019-10-25T22:51:42.000Z
2019-10-25T22:51:42.000Z
"""Standard FAUCET pipeline.""" # Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer. # Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd. # Copyright (C) 2015--2019 The Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file...
34.362791
93
0.678668
from faucet.faucet_metadata import EGRESS_METADATA_MASK class ValveTableConfig: def __init__(self, name, table_id, exact_match=None, meter=None, output=True, miss_goto=None, size=None, match_types=None, set_fields=None, dec_ttl=None, vlan_scale=None, vlan_port...
true
true
f72fc60aecfcd841a19625037bc8f38fa6921303
30,717
py
Python
models/tests/test_dataio.py
endymecy/NDIToolbox
f7a0a642b4a778d9d0c131871f4bfb9822ecb3da
[ "BSD-4-Clause" ]
5
2017-02-28T16:16:06.000Z
2020-07-13T06:49:34.000Z
models/tests/test_dataio.py
endymecy/NDIToolbox
f7a0a642b4a778d9d0c131871f4bfb9822ecb3da
[ "BSD-4-Clause" ]
1
2018-08-19T19:08:14.000Z
2018-08-19T19:08:14.000Z
models/tests/test_dataio.py
endymecy/NDIToolbox
f7a0a642b4a778d9d0c131871f4bfb9822ecb3da
[ "BSD-4-Clause" ]
4
2017-10-25T20:17:15.000Z
2021-07-26T11:39:50.000Z
"""test_dataio.py - tests the dataio module Chris R. Coughlin (TRI/Austin, Inc.) """ __author__ = 'Chris R. Coughlin' import unittest from models import dataio from controllers import pathfinder from utils.skiptest import skipIfModuleNotInstalled import h5py import numpy as np import numpy.testing import scipy.misc ...
51.799325
126
0.624442
__author__ = 'Chris R. Coughlin' import unittest from models import dataio from controllers import pathfinder from utils.skiptest import skipIfModuleNotInstalled import h5py import numpy as np import numpy.testing import scipy.misc import os import random class TestDataIO(unittest.TestCase): def setUp(self): ...
true
true
f72fca48a62d8d293aa54c0897823b567e43a32a
2,008
py
Python
tests/test_RunningStats.py
gratuxri/play-chess-with-a-webcam
9ef7ec306a2a612871fba83130ebee1f044ef0c1
[ "Apache-2.0" ]
17
2019-10-25T01:33:43.000Z
2022-03-21T03:31:56.000Z
tests/test_RunningStats.py
gratuxri/play-chess-with-a-webcam
9ef7ec306a2a612871fba83130ebee1f044ef0c1
[ "Apache-2.0" ]
34
2019-10-17T06:52:30.000Z
2022-01-19T12:45:43.000Z
tests/test_RunningStats.py
gratuxri/play-chess-with-a-webcam
9ef7ec306a2a612871fba83130ebee1f044ef0c1
[ "Apache-2.0" ]
4
2019-11-29T09:19:38.000Z
2021-10-13T03:12:25.000Z
#!/usr/bin/python3 # part of https://github.com/WolfgangFahl/play-chess-with-a-webcam from pcwawc.runningstats import RunningStats, ColorStats, MovingAverage import pytest from unittest import TestCase class RunningStatsTest(TestCase): def test_RunningStats(self): rs = RunningStats() rs.push(1...
36.509091
103
0.556275
from pcwawc.runningstats import RunningStats, ColorStats, MovingAverage import pytest from unittest import TestCase class RunningStatsTest(TestCase): def test_RunningStats(self): rs = RunningStats() rs.push(17.0); rs.push(19.0); rs.push(24.0); mean = rs.mean(); ...
true
true
f72fcbddac8b795d0d38b329417686484d875719
2,006
py
Python
jabberbot/_tests/test_capat.py
RealTimeWeb/wikisite
66a22c68c172f0ebb3c88a9885ccd33e2d59c3c5
[ "Apache-2.0" ]
null
null
null
jabberbot/_tests/test_capat.py
RealTimeWeb/wikisite
66a22c68c172f0ebb3c88a9885ccd33e2d59c3c5
[ "Apache-2.0" ]
null
null
null
jabberbot/_tests/test_capat.py
RealTimeWeb/wikisite
66a22c68c172f0ebb3c88a9885ccd33e2d59c3c5
[ "Apache-2.0" ]
1
2020-01-09T04:53:32.000Z
2020-01-09T04:53:32.000Z
# -*- coding: utf-8 -*- import py try: from jabberbot import capat except ImportError: py.test.skip("Skipping jabber bot tests - pyxmpp is not installed") def test_ver_simple(): # example values supplied by the XEP ident = (("client", "pc"), ) feat = ("http://jabber.org/protocol/disco#info", ...
34.586207
76
0.612164
import py try: from jabberbot import capat except ImportError: py.test.skip("Skipping jabber bot tests - pyxmpp is not installed") def test_ver_simple(): ident = (("client", "pc"), ) feat = ("http://jabber.org/protocol/disco#info", "http://jabber.org/protocol/disco#items", ...
true
true
f72fcdb0009d66ce95554b101bd82a076188d8f3
1,140
py
Python
where_to_go/places/models.py
MZen2610/Yandex-poster
07b1e44974783563c394b22625aa2543d74552f9
[ "MIT" ]
null
null
null
where_to_go/places/models.py
MZen2610/Yandex-poster
07b1e44974783563c394b22625aa2543d74552f9
[ "MIT" ]
null
null
null
where_to_go/places/models.py
MZen2610/Yandex-poster
07b1e44974783563c394b22625aa2543d74552f9
[ "MIT" ]
null
null
null
from django.db import models class Place(models.Model): title = models.CharField(max_length=150, verbose_name='Наименование') description_short = models.TextField(blank=True, verbose_name='Краткое описание') description_long = models.TextField(blank=True, verbose_name='Полное описание') lng = models.D...
35.625
111
0.7
from django.db import models class Place(models.Model): title = models.CharField(max_length=150, verbose_name='Наименование') description_short = models.TextField(blank=True, verbose_name='Краткое описание') description_long = models.TextField(blank=True, verbose_name='Полное описание') lng = models.D...
true
true
f72fcde236c44645e86f524db09b26ce3bfb931b
3,649
py
Python
server/core.py
cwza/deep_t2i
22877fdd28ad407984ddc3bc4d57109c54c22fc0
[ "Apache-2.0" ]
null
null
null
server/core.py
cwza/deep_t2i
22877fdd28ad407984ddc3bc4d57109c54c22fc0
[ "Apache-2.0" ]
null
null
null
server/core.py
cwza/deep_t2i
22877fdd28ad407984ddc3bc4d57109c54c22fc0
[ "Apache-2.0" ]
1
2020-11-30T06:11:02.000Z
2020-11-30T06:11:02.000Z
import os from pathlib import Path import numpy as np from PIL import Image import requests from google.cloud import storage import base64 from io import BytesIO import uuid __all__ = ['do', 'recaptcha_check'] def predict_and2jpg(model, cap): ''' cap: "white hair yellow eyes", returns: jpeg file buffer remember t...
34.424528
101
0.698822
import os from pathlib import Path import numpy as np from PIL import Image import requests from google.cloud import storage import base64 from io import BytesIO import uuid __all__ = ['do', 'recaptcha_check'] def predict_and2jpg(model, cap): img, _ = model.predict(cap) img = Image.fromarray(np.uint8(img.nump...
true
true
f72fce083693b057598af0c60439146c9ccc930a
1,461
py
Python
Task2D.py
dan7267/1a-flood-risk-project-93
d95cee987f5673d637626e1804f719371a25daa8
[ "MIT" ]
null
null
null
Task2D.py
dan7267/1a-flood-risk-project-93
d95cee987f5673d637626e1804f719371a25daa8
[ "MIT" ]
null
null
null
Task2D.py
dan7267/1a-flood-risk-project-93
d95cee987f5673d637626e1804f719371a25daa8
[ "MIT" ]
null
null
null
# Copyright (C) 2018 Garth N. Wells # # SPDX-License-Identifier: MIT import datetime from floodsystem.datafetcher import fetch_measure_levels from floodsystem.stationdata import build_station_list def run(): """Requirements for Task2D""" # Build list of stations stations = build_station_list() # S...
27.055556
75
0.659138
import datetime from floodsystem.datafetcher import fetch_measure_levels from floodsystem.stationdata import build_station_list def run(): stations = build_station_list() station_name = "Cam" station_cam = None for station in stations: if station.name == station_name: ...
true
true
f72fce4b9ca244110fc20c8066f330fd436dbac7
769
py
Python
contacts/server/server.py
alfredoroblesa/contacts-tool
7b9d9ddbaa3ac1f2fc1210aa11958043a79d2e05
[ "MIT" ]
null
null
null
contacts/server/server.py
alfredoroblesa/contacts-tool
7b9d9ddbaa3ac1f2fc1210aa11958043a79d2e05
[ "MIT" ]
null
null
null
contacts/server/server.py
alfredoroblesa/contacts-tool
7b9d9ddbaa3ac1f2fc1210aa11958043a79d2e05
[ "MIT" ]
null
null
null
import os import json from flask import Flask, render_template DATABASE_PATH = "../.contacts-store" # Read database and build HTML string file_names = os.listdir(DATABASE_PATH) file_names.remove(".git") html = "<table><th>Contact</th><th>Last Name</th><th>Tlf</th><th>Email</th><th>Job</th><th>Province</th>" for file_...
33.434783
174
0.654096
import os import json from flask import Flask, render_template DATABASE_PATH = "../.contacts-store" file_names = os.listdir(DATABASE_PATH) file_names.remove(".git") html = "<table><th>Contact</th><th>Last Name</th><th>Tlf</th><th>Email</th><th>Job</th><th>Province</th>" for file_name in file_names: file_path = os...
true
true
f72fcf78d29e01d35333b5634ff87c068a1f35d6
13,176
py
Python
Networks/4_layer_net_Parameter_optimization.py
Kohulan/Decimer-Python
17373e02faedb28ba94742f61001bb3c6b015798
[ "MIT" ]
5
2019-07-24T14:18:07.000Z
2021-11-08T00:35:55.000Z
Networks/4_layer_net_Parameter_optimization.py
Kohulan/Decimer-Python
17373e02faedb28ba94742f61001bb3c6b015798
[ "MIT" ]
null
null
null
Networks/4_layer_net_Parameter_optimization.py
Kohulan/Decimer-Python
17373e02faedb28ba94742f61001bb3c6b015798
[ "MIT" ]
5
2020-09-16T13:01:31.000Z
2022-01-24T06:26:06.000Z
''' * This Software is under the MIT License * Refer to LICENSE or https://opensource.org/licenses/MIT for more information * Written by Kohulan Rajan * © 2019 ''' #Parallelized datareading network import tensorflow as tf import os import sys import numpy as np import matplotlib as mpl import csv mpl...
41.046729
245
0.652095
import tensorflow as tf import os import sys import numpy as np import matplotlib as mpl import csv mpl.use('Agg') import matplotlib.pyplot as plt from datetime import datetime from numpy import array import pickle import lz4.frame as lz import multiprocessing np.set_printoptions(threshold=np.nan) os....
true
true
f72fcf8390be1f9d3facd1c0666a534992e527a7
10,916
py
Python
tensorflow_quantum/core/ops/batch_util_test.py
PyJedi/quantum
3f4a3c320e048b8a8faf3a10339975d2d5366fb6
[ "Apache-2.0" ]
1
2020-06-01T01:28:36.000Z
2020-06-01T01:28:36.000Z
tensorflow_quantum/core/ops/batch_util_test.py
PyJedi/quantum
3f4a3c320e048b8a8faf3a10339975d2d5366fb6
[ "Apache-2.0" ]
null
null
null
tensorflow_quantum/core/ops/batch_util_test.py
PyJedi/quantum
3f4a3c320e048b8a8faf3a10339975d2d5366fb6
[ "Apache-2.0" ]
1
2020-06-07T01:28:01.000Z
2020-06-07T01:28:01.000Z
# Copyright 2020 The TensorFlow Quantum 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...
39.839416
80
0.600861
import numpy as np import tensorflow as tf from absl.testing import parameterized from scipy import stats import cirq from tensorflow_quantum.core.ops import batch_util from tensorflow_quantum.python import util BATCH_SIZE = 12 N_QUBITS = 5 PAULI_LENGTH = 3 SYMBOLS = ['alpha', 'beta', 'gamma'] def _get_mixed_batch(...
true
true
f72fcf8e506902e300f338f0524ddabfe7e97eb9
13,031
py
Python
watertap/core/zero_order_properties.py
jalving/watertap
a89bd61deaaca9c30402727545e8223a276c93e6
[ "BSD-3-Clause-LBNL" ]
null
null
null
watertap/core/zero_order_properties.py
jalving/watertap
a89bd61deaaca9c30402727545e8223a276c93e6
[ "BSD-3-Clause-LBNL" ]
null
null
null
watertap/core/zero_order_properties.py
jalving/watertap
a89bd61deaaca9c30402727545e8223a276c93e6
[ "BSD-3-Clause-LBNL" ]
null
null
null
############################################################################### # WaterTAP Copyright (c) 2021, The Regents of the University of California, # through Lawrence Berkeley National Laboratory, Oak Ridge National # Laboratory, National Renewable Energy Laboratory, and National Energy # Technology Laboratory ...
39.728659
81
0.578927
from idaes.core import (EnergyBalanceType, MaterialBalanceType, MaterialFlowBasis, PhysicalParameterBlock, StateBlock, StateBlockData, declare_process_block_class) from idaes.c...
true
true
f72fcfcd3dc525e47916c5740040252f6d957d98
5,279
py
Python
py/jupyterlite/src/jupyterlite/config.py
marimeireles/jupyterlite
65c9304cf89d311b8a48f227a0cbb2b7f50cf4bd
[ "BSD-3-Clause" ]
null
null
null
py/jupyterlite/src/jupyterlite/config.py
marimeireles/jupyterlite
65c9304cf89d311b8a48f227a0cbb2b7f50cf4bd
[ "BSD-3-Clause" ]
null
null
null
py/jupyterlite/src/jupyterlite/config.py
marimeireles/jupyterlite
65c9304cf89d311b8a48f227a0cbb2b7f50cf4bd
[ "BSD-3-Clause" ]
null
null
null
"""an observable configuration object for the JupyterLite lifecycle .. todo:: Move to a canonical JSON schema? """ import os from pathlib import Path from typing import Optional as _Optional from typing import Text as _Text from typing import Tuple as _Tuple from traitlets import CInt, Tuple, Unicode, default f...
29.327778
87
0.614321
import os from pathlib import Path from typing import Optional as _Optional from typing import Text as _Text from typing import Tuple as _Tuple from traitlets import CInt, Tuple, Unicode, default from traitlets.config import LoggingConfigurable from . import constants as C from .trait_types import CPath, TypedTuple ...
true
true
f72fcfd6c1a73e3ebdb2254eb93485dc7e9e2ac2
10,495
py
Python
tests/test_expressions.py
thorag76/mappyfile
51ae914cb6282549b73cde684cbc54e213c74d4a
[ "MIT" ]
48
2017-02-07T23:37:37.000Z
2021-12-28T12:56:37.000Z
tests/test_expressions.py
thorag76/mappyfile
51ae914cb6282549b73cde684cbc54e213c74d4a
[ "MIT" ]
135
2017-03-16T08:54:59.000Z
2022-03-30T20:00:22.000Z
tests/test_expressions.py
thorag76/mappyfile
51ae914cb6282549b73cde684cbc54e213c74d4a
[ "MIT" ]
23
2017-01-31T08:46:48.000Z
2021-07-08T15:28:49.000Z
# -*- coding: utf-8 -*- import logging import json import inspect import pytest from mappyfile.parser import Parser from mappyfile.pprint import PrettyPrinter from mappyfile.transformer import MapfileToDict def output(s): """ Parse, transform, and pretty print the result """ p = Parser() m = M...
22.765727
120
0.577608
import logging import json import inspect import pytest from mappyfile.parser import Parser from mappyfile.pprint import PrettyPrinter from mappyfile.transformer import MapfileToDict def output(s): p = Parser() m = MapfileToDict(include_position=True) logging.info(inspect.stack()[1][3]) ast = p....
true
true
f72fd038fc632f6e1fa32dff24a488528fb8fed5
230
py
Python
xga/relations/clusters/Mλ.py
DavidT3/XGA
cde51c3f29f98b5f1e981fb6d327c04072b0ba38
[ "BSD-3-Clause" ]
12
2020-05-16T09:45:45.000Z
2022-02-14T14:41:46.000Z
xga/relations/clusters/Mλ.py
DavidT3/XGA
cde51c3f29f98b5f1e981fb6d327c04072b0ba38
[ "BSD-3-Clause" ]
684
2020-05-28T08:52:09.000Z
2022-03-31T10:56:24.000Z
xga/relations/clusters/Mλ.py
DavidT3/XGA
cde51c3f29f98b5f1e981fb6d327c04072b0ba38
[ "BSD-3-Clause" ]
2
2022-02-04T10:55:55.000Z
2022-02-04T11:30:56.000Z
# This code is a part of XMM: Generate and Analyse (XGA), a module designed for the XMM Cluster Survey (XCS). # Last modified by David J Turner (david.turner@sussex.ac.uk) 11/12/2020, 16:41. Copyright (c) David J Turner
20.909091
110
0.704348
true
true
f72fd0a975c56ec2d4a2ead5794352e000898434
699
py
Python
test_app.py
john-lock/chatter
46c0c61f7e5798478a3630aadbfc47d281189edd
[ "MIT" ]
null
null
null
test_app.py
john-lock/chatter
46c0c61f7e5798478a3630aadbfc47d281189edd
[ "MIT" ]
2
2019-09-17T18:47:31.000Z
2019-09-17T18:47:34.000Z
test_app.py
john-lock/chatter
46c0c61f7e5798478a3630aadbfc47d281189edd
[ "MIT" ]
null
null
null
import pytest import app @pytest.fixture def client(): app.app.config['TESTING'] = True client = app.app.test_client() yield client def test_client_page(client): rv = client.get('/') # Main page (instructions) assert b'<p class="lead">A Pusher-powered chat application built using Flask</p>' ...
25.888889
115
0.69671
import pytest import app @pytest.fixture def client(): app.app.config['TESTING'] = True client = app.app.test_client() yield client def test_client_page(client): rv = client.get('/') assert b'<p class="lead">A Pusher-powered chat application built using Flask</p>' in rv.data assert b...
true
true
f72fd0f50afdb4c7cb225054bd39d9412b196c9c
1,314
py
Python
aries_cloudagent/protocols/discovery/v1_0/handlers/tests/test_query_handler.py
msembinelli/aries-cloudagent-python
a5a29dab30238f52dcfb6645aab115d01720a5c7
[ "Apache-2.0" ]
1
2020-11-30T05:47:54.000Z
2020-11-30T05:47:54.000Z
aries_cloudagent/protocols/discovery/v1_0/handlers/tests/test_query_handler.py
msembinelli/aries-cloudagent-python
a5a29dab30238f52dcfb6645aab115d01720a5c7
[ "Apache-2.0" ]
1
2020-06-16T20:20:55.000Z
2020-06-16T20:20:55.000Z
aries_cloudagent/protocols/discovery/v1_0/handlers/tests/test_query_handler.py
msembinelli/aries-cloudagent-python
a5a29dab30238f52dcfb6645aab115d01720a5c7
[ "Apache-2.0" ]
2
2020-02-18T20:34:01.000Z
2021-03-12T16:18:30.000Z
import pytest from aries_cloudagent.core.protocol_registry import ProtocolRegistry from aries_cloudagent.messaging.base_handler import HandlerException from aries_cloudagent.messaging.request_context import RequestContext from aries_cloudagent.messaging.responder import MockResponder from ...handlers.query_handler im...
34.578947
69
0.758752
import pytest from aries_cloudagent.core.protocol_registry import ProtocolRegistry from aries_cloudagent.messaging.base_handler import HandlerException from aries_cloudagent.messaging.request_context import RequestContext from aries_cloudagent.messaging.responder import MockResponder from ...handlers.query_handler im...
true
true
f72fd1f63d52cbb7ac69ac0d3b60be8df77af67c
4,536
py
Python
benchmark/startQiskit_Class3343.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_Class3343.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_Class3343.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=4 # total number=49 import cirq import qiskit from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2 import numpy as np import networkx as nx def bitwise_...
35.4375
140
0.650573
import cirq import qiskit from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2 import numpy as np import networkx as nx def bitwise_xor(s: str, t: str) -> str: len...
true
true
f72fd32beb09f4059eb8836278eae50e6d7228a6
2,650
py
Python
purly/py/setup.py
rmorshea/purly
0d07d6d7636fd81d9c1c14e2df6a32fc28b325f7
[ "MIT" ]
2
2018-08-18T05:39:24.000Z
2018-08-21T19:02:16.000Z
purly/py/setup.py
rmorshea/purly
0d07d6d7636fd81d9c1c14e2df6a32fc28b325f7
[ "MIT" ]
2
2018-07-27T07:14:19.000Z
2018-07-27T07:17:06.000Z
purly/py/setup.py
rmorshea/purly
0d07d6d7636fd81d9c1c14e2df6a32fc28b325f7
[ "MIT" ]
null
null
null
from __future__ import print_function import os import sys import shutil from glob import glob from setuptools import find_packages from distutils.core import setup # the name of the project name = "purly" # basic paths used to gather files here = os.path.abspath(os.path.dirname(__file__)) root = os.path.join(here, ...
31.547619
79
0.442642
from __future__ import print_function import os import sys import shutil from glob import glob from setuptools import find_packages from distutils.core import setup name = "purly" here = os.path.abspath(os.path.dirname(__file__)) root = os.path.join(here, name) if sys.version_info < (3,6) or sys.version_info >= (3...
true
true
f72fd342ba9c1c26e0b221251203aed9effad1f6
18,549
py
Python
plugin.video.SportsDevil/lib/utils/drench.py
akuala/REPO.KUALA
ea9a157025530d2ce8fa0d88431c46c5352e89d4
[ "Apache-2.0" ]
2
2018-11-02T19:55:30.000Z
2020-08-14T02:22:20.000Z
plugin.video.SportsDevil/lib/utils/drench.py
akuala/REPO.KUALA
ea9a157025530d2ce8fa0d88431c46c5352e89d4
[ "Apache-2.0" ]
null
null
null
plugin.video.SportsDevil/lib/utils/drench.py
akuala/REPO.KUALA
ea9a157025530d2ce8fa0d88431c46c5352e89d4
[ "Apache-2.0" ]
3
2019-12-17T20:47:00.000Z
2021-02-11T19:03:59.000Z
""" JavaScript encryption module ver. 2.0 by Daniel Rench Based on existing code: Copyright (c) 2003 by Andre Mueller. Init of blowfish constants with a function (init/backup errors) Copyright (c) 2003 by Rainer Wollmann This Object is open source. You can redistribute it and/or modify it under the terms of th...
60.224026
3,083
0.721441
import math as Math class blowfish: def __init__(self,k): if len(k) is 0: raise '0 length key' self.bf_P = self.Fbf_P() self.bf_S0 = self.Fbf_S0() self.bf_S1 = self.Fbf_S1() self.bf_S2 = self.Fbf_S2() self.bf_S3 = self.Fbf_S3() self.key = k j = 0 i = 0 while i < 18: ...
true
true
f72fd3f3fdf870d59380133842ea37b254c8a18a
24,808
py
Python
Scripts/simulation/restaurants/restaurant_commands.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
Scripts/simulation/restaurants/restaurant_commands.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
Scripts/simulation/restaurants/restaurant_commands.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Server\restaurants\restaurant_commands.py # Compiled at: 2018-08-28 03:56:41 # Size of source mod 2**32: 29...
51.791232
192
0.747743
from protocolbuffers import Restaurant_pb2 from event_testing import test_events from google.protobuf import text_format from restaurants import restaurant_utils from restaurants.chefs_choice import ChefsChoice from restaurants.restaurant_diner_situation import DinerSubSituationState, RestaurantDinerSubSituation, Resta...
true
true
f72fd45c61980e5c188d7f2e1db08ef2a024468b
685
py
Python
examples/custom_plugin/plugins/MyFirstPlugin/pwba_plugin.py
pxlc/PyWebBrowserApp
0165b29cbe5f88068f62d8298b1f5e3ee611a985
[ "MIT" ]
1
2021-11-09T07:53:25.000Z
2021-11-09T07:53:25.000Z
examples/custom_plugin/plugins/MyFirstPlugin/pwba_plugin.py
pxlc/PyWebBrowserApp
0165b29cbe5f88068f62d8298b1f5e3ee611a985
[ "MIT" ]
null
null
null
examples/custom_plugin/plugins/MyFirstPlugin/pwba_plugin.py
pxlc/PyWebBrowserApp
0165b29cbe5f88068f62d8298b1f5e3ee611a985
[ "MIT" ]
null
null
null
from PyWebBrowserApp import PluginBase from PyWebBrowserApp import register_plugin_op class Plugin(PluginBase): def __init__(self): super(Plugin, self).__init__() self.name = '${P}' @register_plugin_op def test_plugin_callback(self, op_data): # self.info(op_data.get('message',...
25.37037
109
0.665693
from PyWebBrowserApp import PluginBase from PyWebBrowserApp import register_plugin_op class Plugin(PluginBase): def __init__(self): super(Plugin, self).__init__() self.name = '${P}' @register_plugin_op def test_plugin_callback(self, op_data): print('Hello from ${P} cal...
true
true
f72fd4a32451e1afa48eb80e2147811dcd4f5f9f
54,405
py
Python
.kodi/addons/script.ftvguide/gui.py
C6SUMMER/allinclusive-kodi-pi
8baf247c79526849c640c6e56ca57a708a65bd11
[ "Apache-2.0" ]
null
null
null
.kodi/addons/script.ftvguide/gui.py
C6SUMMER/allinclusive-kodi-pi
8baf247c79526849c640c6e56ca57a708a65bd11
[ "Apache-2.0" ]
null
null
null
.kodi/addons/script.ftvguide/gui.py
C6SUMMER/allinclusive-kodi-pi
8baf247c79526849c640c6e56ca57a708a65bd11
[ "Apache-2.0" ]
2
2018-04-17T17:34:39.000Z
2020-07-26T03:43:33.000Z
# # Copyright (C) 2014 Tommy Winther # http://tommy.winther.nu # # Modified for FTV Guide (09/2014 onwards) # by Thomas Geppert [bluezed] - bluezed.apps@gmail.com # # This Program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License...
38.944166
161
0.614282
import datetime import threading import time import xbmc import xbmcgui import source as src from notification import Notification from strings import * import streaming DEBUG = False MODE_EPG = 'EPG' MODE_TV = 'TV' MODE_OSD = 'OSD' ACTION_LEFT = 1 ACTION_RIGHT = 2 ACTION_UP = 3 ACTION_DOWN ...
true
true
f72fd4f07817e53144026d6614cb8968d8cb124e
2,873
py
Python
setup.py
rupanshi-chawda/nm-theme
d909d7f89d6b0bca49d6d90ed50d087bab41b912
[ "BSD-3-Clause" ]
null
null
null
setup.py
rupanshi-chawda/nm-theme
d909d7f89d6b0bca49d6d90ed50d087bab41b912
[ "BSD-3-Clause" ]
null
null
null
setup.py
rupanshi-chawda/nm-theme
d909d7f89d6b0bca49d6d90ed50d087bab41b912
[ "BSD-3-Clause" ]
null
null
null
""" nm-theme setup """ import json import sys from pathlib import Path import setuptools HERE = Path(__file__).parent.resolve() # Get the package info from package.json pkg_json = json.loads((HERE / "package.json").read_bytes()) # The name of the project name = "nm-theme" lab_path = (HERE / pkg_json["jupyterlab"][...
29.927083
104
0.655761
import json import sys from pathlib import Path import setuptools HERE = Path(__file__).parent.resolve() pkg_json = json.loads((HERE / "package.json").read_bytes()) name = "nm-theme" lab_path = (HERE / pkg_json["jupyterlab"]["outputDir"]) ensured_targets = [ str(lab_path / "package.json"), str(lab_path / ...
true
true
f72fd53943b50711edaa6f2f5b0e426773997a03
8,917
py
Python
service_clients/aws/s3_client.py
radzhome/python-service-clients
dd17e74217a9412b1b78c90433bfced08733fd88
[ "BSD-2-Clause" ]
2
2019-04-18T05:29:32.000Z
2019-11-01T22:58:56.000Z
service_clients/aws/s3_client.py
radzhome/python-service-clients
dd17e74217a9412b1b78c90433bfced08733fd88
[ "BSD-2-Clause" ]
null
null
null
service_clients/aws/s3_client.py
radzhome/python-service-clients
dd17e74217a9412b1b78c90433bfced08733fd88
[ "BSD-2-Clause" ]
null
null
null
from __future__ import unicode_literals """ S3 bucket CRUD operations core module """ import logging import time import boto3 import botocore from botocore.client import Config class S3Client: # pragma: no cover """ S3 class encapsulates uploading, downloading & other s3 file ops and handling errors ...
37.309623
120
0.596165
from __future__ import unicode_literals import logging import time import boto3 import botocore from botocore.client import Config class S3Client: S3_DATE_FORMAT = '%Y-%m-%dT%H:%M:%S.000Z' RECONNECT_SLEEP_SECS = 0.5 CONN_RETRIES = 10 CONN_CONFIG = Config(connect_timeout=5, retries={'max_attempts':...
true
true
f72fd5b91881f72c58b41d9a2321dc53142923f3
1,234
py
Python
acmicpc/9093/9093-1.py
love-adela/algorithm
4ccd02173c96f8369962f1fd4e5166a221690fa2
[ "MIT" ]
3
2019-03-09T05:19:23.000Z
2019-04-06T09:26:36.000Z
acmicpc/9093/9093-1.py
love-adela/algorithm
4ccd02173c96f8369962f1fd4e5166a221690fa2
[ "MIT" ]
1
2020-02-23T10:38:04.000Z
2020-02-23T10:38:04.000Z
acmicpc/9093/9093-1.py
love-adela/algorithm
4ccd02173c96f8369962f1fd4e5166a221690fa2
[ "MIT" ]
1
2019-05-22T13:47:53.000Z
2019-05-22T13:47:53.000Z
# Stack 활용해서 풀기 N = int(input()) class Node(object): def __init__(self, value=None, next=None): self.value = value self.next = next class Stack(object): def __init__(self): self.head = None self.count = 0 def is_empty(self): return not bool(self.head) def pus...
21.649123
51
0.502431
N = int(input()) class Node(object): def __init__(self, value=None, next=None): self.value = value self.next = next class Stack(object): def __init__(self): self.head = None self.count = 0 def is_empty(self): return not bool(self.head) def push(self, item): ...
true
true
f72fd5e243d2a0ee9ab66cb14a1e4f2f75b8f2b5
15,989
py
Python
lib/surface/container/node_pools/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/container/node_pools/create.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
null
null
null
lib/surface/container/node_pools/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 2014 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...
41.52987
83
0.766965
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from apitools.base.py import exceptions as apitools_exceptions from googlecloudsdk.api_lib.compute import metadata_utils from googlecloudsdk.api_lib.compute import utils from googlecloudsdk.api_lib.containe...
true
true
f72fd770b3c890aabd12bd755ed60cdc88efa9e5
8,995
py
Python
custom/m4change/reports/ld_hmis_report.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
471
2015-01-10T02:55:01.000Z
2022-03-29T18:07:18.000Z
custom/m4change/reports/ld_hmis_report.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
14,354
2015-01-01T07:38:23.000Z
2022-03-31T20:55:14.000Z
custom/m4change/reports/ld_hmis_report.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
175
2015-01-06T07:16:47.000Z
2022-03-29T13:27:01.000Z
from django.utils.translation import ugettext as _ from corehq.apps.locations.permissions import location_safe from corehq.apps.reports.datatables import DataTablesHeader, DataTablesColumn, NumericColumn from corehq.apps.reports.filters.select import MonthFilter, YearFilter from corehq.apps.reports.standard import Mon...
42.429245
107
0.545859
from django.utils.translation import ugettext as _ from corehq.apps.locations.permissions import location_safe from corehq.apps.reports.datatables import DataTablesHeader, DataTablesColumn, NumericColumn from corehq.apps.reports.filters.select import MonthFilter, YearFilter from corehq.apps.reports.standard import Mon...
true
true
f72fd7ec1ff8566fe5149edae2c9a1ef77dfb47b
66
py
Python
server.py
sigu1011/gameinn
6c314fa5deefdc2780356900a4d6fa55317a18cd
[ "MIT" ]
null
null
null
server.py
sigu1011/gameinn
6c314fa5deefdc2780356900a4d6fa55317a18cd
[ "MIT" ]
1
2019-11-27T23:46:36.000Z
2019-11-27T23:46:36.000Z
server.py
sigu1011/gameinn
6c314fa5deefdc2780356900a4d6fa55317a18cd
[ "MIT" ]
null
null
null
from gameinn import app if __name__ == '__main__': app.run()
13.2
26
0.666667
from gameinn import app if __name__ == '__main__': app.run()
true
true
f72fd8714765a1fe1b575242873790f455b95c4d
3,480
py
Python
text_features_extraction.py
maxgreat/dsve-loc
dd6807d02c0d5fd3e215be8e5c7a88e73102e561
[ "BSD-3-Clause-Clear" ]
null
null
null
text_features_extraction.py
maxgreat/dsve-loc
dd6807d02c0d5fd3e215be8e5c7a88e73102e561
[ "BSD-3-Clause-Clear" ]
null
null
null
text_features_extraction.py
maxgreat/dsve-loc
dd6807d02c0d5fd3e215be8e5c7a88e73102e561
[ "BSD-3-Clause-Clear" ]
null
null
null
""" ****************** COPYRIGHT AND CONFIDENTIALITY INFORMATION ****************** Copyright (c) 2018 [Thomson Licensing] All Rights Reserved This program contains proprietary information which is a trade secret/business \ secret of [Thomson Licensing] and is protected, even if unpublished, under \ applicable Co...
39.101124
150
0.675287
import argparse import time import numpy as np import torch from misc.dataset import TextDataset from misc.model import joint_embedding from misc.utils import save_obj, collate_fn_cap_padded from torch.utils.data import DataLoader device = torch.device("cuda") if __name__ == '__main__': pa...
true
true
f72fd9650f220263368abc650314f11467ad9ad0
117
py
Python
FRCScouting/Contact/urls.py
xNovax/FRCScouting.ca
caf2774e5854a7386eceb21e57b68c1f9c1f7d2d
[ "MIT" ]
1
2019-06-13T03:07:15.000Z
2019-06-13T03:07:15.000Z
FRCScouting/Contact/urls.py
xNovax/FRCScouting.ca
caf2774e5854a7386eceb21e57b68c1f9c1f7d2d
[ "MIT" ]
8
2019-07-04T16:19:06.000Z
2019-07-12T17:37:51.000Z
FRCScouting/Contact/urls.py
xNovax/FRCScouting.ca
caf2774e5854a7386eceb21e57b68c1f9c1f7d2d
[ "MIT" ]
null
null
null
from django.urls import path from . import views urlpatterns = [ path('', views.contactus, name= 'contactus') ]
16.714286
48
0.692308
from django.urls import path from . import views urlpatterns = [ path('', views.contactus, name= 'contactus') ]
true
true
f72fda32958488cb17ecc7633d36804837bdf534
7,499
py
Python
flsim/utils/config_utils.py
karthikprasad/FLSim
3c62fe83de2f06feffb9ed65ce9f71803bbd6027
[ "Apache-2.0" ]
null
null
null
flsim/utils/config_utils.py
karthikprasad/FLSim
3c62fe83de2f06feffb9ed65ce9f71803bbd6027
[ "Apache-2.0" ]
null
null
null
flsim/utils/config_utils.py
karthikprasad/FLSim
3c62fe83de2f06feffb9ed65ce9f71803bbd6027
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import argparse import collections import json from typing import Any, Dict, List, Tuple, Type from hydra.expe...
34.557604
87
0.648887
import argparse import collections import json from typing import Any, Dict, List, Tuple, Type from hydra.experimental import initialize, compose from omegaconf import OmegaConf, DictConfig def fullclassname(cls: Type[Any]) -> str: module = cls.__module__ name = cls.__qualname__ if module is not None an...
true
true
f72fda7d11cd1da25e984d8313329f9d5e6cc36b
12,611
py
Python
py3.1/multiprocess/queues.py
geofft/multiprocess
d998ffea9e82d17662b12b94a236182e7fde46d5
[ "BSD-3-Clause" ]
356
2015-06-21T21:05:10.000Z
2022-03-30T11:57:08.000Z
py3.1/multiprocess/queues.py
geofft/multiprocess
d998ffea9e82d17662b12b94a236182e7fde46d5
[ "BSD-3-Clause" ]
103
2015-06-22T01:44:14.000Z
2022-03-01T03:44:25.000Z
py3.1/multiprocess/queues.py
geofft/multiprocess
d998ffea9e82d17662b12b94a236182e7fde46d5
[ "BSD-3-Clause" ]
72
2015-09-02T14:10:24.000Z
2022-03-25T06:49:43.000Z
# # Module implementing queues # # multiprocessing/queues.py # # Copyright (c) 2006-2008, R Oudkerk # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must ret...
31.606516
81
0.581714
__all__ = ['Queue', 'SimpleQueue', 'JoinableQueue'] import sys import os import threading import collections import time import atexit import weakref from queue import Empty, Full try: import _multiprocess as _multiprocessing except ImportError: import _multiprocessing from multiprocess import Pipe from mult...
true
true
f72fdb09c91a65da5dcb94cfe00e07d00f7cf5cf
3,669
py
Python
python/oneflow/test/modules/test_chunk.py
triple-Mu/oneflow
395da40885016d0b899f8a1eb87e5311a556a9b8
[ "Apache-2.0" ]
1
2022-03-14T11:17:56.000Z
2022-03-14T11:17:56.000Z
python/oneflow/test/modules/test_chunk.py
triple-Mu/oneflow
395da40885016d0b899f8a1eb87e5311a556a9b8
[ "Apache-2.0" ]
null
null
null
python/oneflow/test/modules/test_chunk.py
triple-Mu/oneflow
395da40885016d0b899f8a1eb87e5311a556a9b8
[ "Apache-2.0" ]
null
null
null
""" Copyright 2020 The OneFlow 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 applicable law or agr...
33.354545
73
0.613791
import unittest from collections import OrderedDict from random import shuffle import numpy as np from random import shuffle import oneflow as flow import oneflow.unittest from oneflow.test_utils.automated_test_util import * @flow.unittest.skip_unless_1n1d() class TestChunk(flow.unittest.TestCase): @autotest(...
true
true
f72fdba810e4acacfce8c3f39354b4ef1f6e88b2
2,774
py
Python
src/application/analysis/english_analysis.py
jagoPG/-restaurant-ml-inspector
4efc7855401cc8cfa9d5e470c14685158a607448
[ "Apache-2.0" ]
1
2018-07-10T12:53:35.000Z
2018-07-10T12:53:35.000Z
src/application/analysis/english_analysis.py
jagoPG/-restaurant-ml-inspector
4efc7855401cc8cfa9d5e470c14685158a607448
[ "Apache-2.0" ]
null
null
null
src/application/analysis/english_analysis.py
jagoPG/-restaurant-ml-inspector
4efc7855401cc8cfa9d5e470c14685158a607448
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env # -*- coding: utf-8 -*- """ Copyright 2017-2018 Jagoba Pérez-Gómez 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 ...
32.255814
96
0.655732
import logging from textblob import TextBlob from src.application.analysis.evaluated_word import EvaluatedWord class EnglishAnalysis(object): def __init__(self, keyword_repository, reviews): self._keyword_repository = keyword_repository self._reviews = reviews self._words = {} ...
true
true
f72fdc1d6884bbc99ff86fadd0864d05af6b34ab
2,186
py
Python
method_of_moments/continuous/_loc_scale.py
AlbertFarkhutdinov/method_of_moments
0a69c63197d7f88a3b57356620b4d84e76543177
[ "MIT" ]
null
null
null
method_of_moments/continuous/_loc_scale.py
AlbertFarkhutdinov/method_of_moments
0a69c63197d7f88a3b57356620b4d84e76543177
[ "MIT" ]
null
null
null
method_of_moments/continuous/_loc_scale.py
AlbertFarkhutdinov/method_of_moments
0a69c63197d7f88a3b57356620b4d84e76543177
[ "MIT" ]
null
null
null
""" This module contains description of class for probability distributions from location-scale family. """ from method_of_moments.continuous._base_continuous import BaseContinuous class LocScale(BaseContinuous): """ Class for probability distributions from location-scale family. Parameters ------...
28.025641
79
0.63312
from method_of_moments.continuous._base_continuous import BaseContinuous class LocScale(BaseContinuous): def __init__(self, loc: float = 0.0, scale: float = 1.0, **kwargs) -> None: super().__init__(**kwargs) self.loc = loc self.scale = scale @property def loc(self) -> float: ...
true
true
f72fdcd3421f334ce1bfe3c860ab1e55aab23f82
1,226
py
Python
test/test_jcampdx.py
MIRCen/brukerapi-python
5455800895924c69bf839fa621fa7a06d343b4ff
[ "MIT" ]
7
2020-06-30T16:09:20.000Z
2022-03-09T13:27:55.000Z
test/test_jcampdx.py
MIRCen/brukerapi-python
5455800895924c69bf839fa621fa7a06d343b4ff
[ "MIT" ]
2
2020-09-06T19:29:36.000Z
2021-03-15T08:03:46.000Z
test/test_jcampdx.py
MIRCen/brukerapi-python
5455800895924c69bf839fa621fa7a06d343b4ff
[ "MIT" ]
1
2022-01-20T09:43:45.000Z
2022-01-20T09:43:45.000Z
from brukerapi.jcampdx import JCAMPDX import numpy as np from pathlib import Path import pytest @pytest.mark.skip(reason="in progress") def test_jcampdx(test_jcampdx_data): j = JCAMPDX(Path(test_jcampdx_data[1]) / test_jcampdx_data[0]['path']) for key, ref in test_jcampdx_data[0]['parameters'].items(): ...
29.902439
74
0.626427
from brukerapi.jcampdx import JCAMPDX import numpy as np from pathlib import Path import pytest @pytest.mark.skip(reason="in progress") def test_jcampdx(test_jcampdx_data): j = JCAMPDX(Path(test_jcampdx_data[1]) / test_jcampdx_data[0]['path']) for key, ref in test_jcampdx_data[0]['parameters'].items(): ...
true
true
f72fdd762dd6a686c705479e1165f5735db40a61
1,055
py
Python
src/lib/telegram/parsemode.py
thonkify/thonkify
2cb4493d796746cb46c8519a100ef3ef128a761a
[ "MIT" ]
17
2017-08-04T15:41:05.000Z
2020-10-16T18:02:41.000Z
src/lib/telegram/parsemode.py
thonkify/thonkify
2cb4493d796746cb46c8519a100ef3ef128a761a
[ "MIT" ]
3
2017-08-04T23:37:37.000Z
2017-08-04T23:38:34.000Z
src/lib/telegram/parsemode.py
thonkify/thonkify
2cb4493d796746cb46c8519a100ef3ef128a761a
[ "MIT" ]
3
2017-12-07T16:30:59.000Z
2019-06-16T02:48:28.000Z
#!/usr/bin/env python # pylint: disable=R0903 # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2017 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public L...
36.37931
71
0.747867
class ParseMode(object): MARKDOWN = 'Markdown' HTML = 'HTML'
true
true
f72fdd985d4e4c0bdc2d66e73fde136c53658738
3,108
py
Python
openaerostruct/structures/section_properties_tube.py
lkelvinm/OpenAeroStruct
395075d28783c1b99b4ab25ddf034000caf9cd0d
[ "Apache-2.0" ]
null
null
null
openaerostruct/structures/section_properties_tube.py
lkelvinm/OpenAeroStruct
395075d28783c1b99b4ab25ddf034000caf9cd0d
[ "Apache-2.0" ]
null
null
null
openaerostruct/structures/section_properties_tube.py
lkelvinm/OpenAeroStruct
395075d28783c1b99b4ab25ddf034000caf9cd0d
[ "Apache-2.0" ]
null
null
null
from __future__ import division, print_function import numpy as np from openmdao.api import ExplicitComponent class SectionPropertiesTube(ExplicitComponent): """ Compute geometric properties for a tube element. The thicknesses are added to the interior of the element, so the 'radius' value is the oute...
35.724138
80
0.568855
from __future__ import division, print_function import numpy as np from openmdao.api import ExplicitComponent class SectionPropertiesTube(ExplicitComponent): def initialize(self): self.options.declare('surface', types=dict) def setup(self): self.surface = surface = self.options['surface'] ...
true
true
f72fdda2808488fef61058f47c4ebf00428e8bf0
9,861
py
Python
devel/lib/python2.7/dist-packages/mav_manager/srv/_GoalTimed.py
MultiRobotUPenn/groundstation_ws_vio_swarm
60e01af6bf32bafb5bc31626b055436278dc8311
[ "MIT" ]
1
2020-03-10T06:32:51.000Z
2020-03-10T06:32:51.000Z
install/lib/python2.7/dist-packages/mav_manager/srv/_GoalTimed.py
MultiRobotUPenn/groundstation_ws_vio_swarm
60e01af6bf32bafb5bc31626b055436278dc8311
[ "MIT" ]
null
null
null
install/lib/python2.7/dist-packages/mav_manager/srv/_GoalTimed.py
MultiRobotUPenn/groundstation_ws_vio_swarm
60e01af6bf32bafb5bc31626b055436278dc8311
[ "MIT" ]
1
2018-11-07T03:37:23.000Z
2018-11-07T03:37:23.000Z
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from mav_manager/GoalTimedRequest.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import genpy class GoalTimedRequest(genpy.Message): _md5sum = "3c9a1ea281c62219122f22a...
33.540816
145
0.653179
import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import genpy class GoalTimedRequest(genpy.Message): _md5sum = "3c9a1ea281c62219122f22aa2b508b97" _type = "mav_manager/GoalTimedRequest" _has_header = False _full_text = """float32[4] goal duration duration time t_st...
true
true
f72fde34553d0101da278cb9f85832174a12acbb
1,294
py
Python
src/image-gallery/azext_image_gallery/_client_factory.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "MIT" ]
207
2017-11-29T06:59:41.000Z
2022-03-31T10:00:53.000Z
src/image-gallery/azext_image_gallery/_client_factory.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "MIT" ]
4,061
2017-10-27T23:19:56.000Z
2022-03-31T23:18:30.000Z
src/image-gallery/azext_image_gallery/_client_factory.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "MIT" ]
802
2017-10-11T17:36:26.000Z
2022-03-31T22:24:32.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
36.971429
100
0.710974
def _compute_client_factory(cli_ctx): from azure.cli.core.commands.client_factory import get_mgmt_service_client from .vendored_sdks.azure_mgmt_compute._compute_management_client import ComputeManagementClient return get_mgmt_service_client(cli_ctx, ComputeManagementClient) def cf_galleries(cli_ctx, _):...
true
true
f72fde9be8445c641564cc9689aca34ffff96645
5,280
py
Python
mmdet/core/hook/ema.py
mrzhuzhe/mmdetection
c04ca2c2a65500bc248a5d2ab6ace5b15f00064d
[ "Apache-2.0" ]
null
null
null
mmdet/core/hook/ema.py
mrzhuzhe/mmdetection
c04ca2c2a65500bc248a5d2ab6ace5b15f00064d
[ "Apache-2.0" ]
null
null
null
mmdet/core/hook/ema.py
mrzhuzhe/mmdetection
c04ca2c2a65500bc248a5d2ab6ace5b15f00064d
[ "Apache-2.0" ]
null
null
null
# Copyright (c) OpenMMLab. All rights reserved. import math from mmcv.parallel import is_module_wrapper from mmcv.runner.hooks import HOOKS, Hook class BaseEMAHook(Hook): """Exponential Moving Average Hook. Use Exponential Moving Average on all parameters of model in training process. All par...
40.305344
79
0.621212
import math from mmcv.parallel import is_module_wrapper from mmcv.runner.hooks import HOOKS, Hook class BaseEMAHook(Hook): def __init__(self, momentum=0.0002, interval=1, skip_buffers=False, resume_from=None, momen...
true
true
f72fdecee874f57c54aafbb15866dc4f007451be
1,697
py
Python
**PyBank**/main.py
cathchristabel/Python-Challenge
f8a56210c15785626c693101f12173c9b55f3c9d
[ "ADSL" ]
null
null
null
**PyBank**/main.py
cathchristabel/Python-Challenge
f8a56210c15785626c693101f12173c9b55f3c9d
[ "ADSL" ]
null
null
null
**PyBank**/main.py
cathchristabel/Python-Challenge
f8a56210c15785626c693101f12173c9b55f3c9d
[ "ADSL" ]
null
null
null
import os import csv filepath = os.path.join('..','**PyBank**','Resources','budget_data.csv') output_path = os.path.join('..','**PyBank**','financial_analysis.txt') total_months = 0 total_net = 0 net_change_list = [] month_of_change = [] greatest_increase = ["", 0] greatest_decrease = ["", 9999999999999] with open (...
31.425926
93
0.6264
import os import csv filepath = os.path.join('..','**PyBank**','Resources','budget_data.csv') output_path = os.path.join('..','**PyBank**','financial_analysis.txt') total_months = 0 total_net = 0 net_change_list = [] month_of_change = [] greatest_increase = ["", 0] greatest_decrease = ["", 9999999999999] with open (...
true
true
f72fe00487d7fd4d4a1b45f52317911518a2dda8
923
py
Python
integration_tests/src/main/python/marks.py
wbo4958/spark-rapids
2b18d10313b57aaf6541f40da571c98abcdbc908
[ "Apache-2.0" ]
null
null
null
integration_tests/src/main/python/marks.py
wbo4958/spark-rapids
2b18d10313b57aaf6541f40da571c98abcdbc908
[ "Apache-2.0" ]
null
null
null
integration_tests/src/main/python/marks.py
wbo4958/spark-rapids
2b18d10313b57aaf6541f40da571c98abcdbc908
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020-2021, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
36.92
74
0.789816
import pytest allow_non_gpu = pytest.mark.allow_non_gpu approximate_float = pytest.mark.approximate_float ignore_order = pytest.mark.ignore_order incompat = pytest.mark.incompat limit = pytest.mark.limit qarun = pytest.mark.qarun cudf_udf = pytest.mark.cudf_udf rapids_udf_example_native = pytest.mark.rapids_udf_examp...
true
true
f72fe031967fabab6e73cfb6ef6a29f19e93d585
473
py
Python
src/maestral_cocoa/constants.py
SamSchott/maestral-cocoa
bb031b2df010ae84e058fadd3a1b10b19d23b762
[ "MIT" ]
8
2020-11-13T08:48:01.000Z
2021-12-16T06:30:27.000Z
macOS/Xcode/Maestral/Maestral/app/maestral_cocoa/constants.py
SamSchott/maestral-cocoa
bb031b2df010ae84e058fadd3a1b10b19d23b762
[ "MIT" ]
4
2021-08-23T20:41:39.000Z
2021-11-16T08:43:58.000Z
src/maestral_cocoa/constants.py
SamSchott/maestral-cocoa
bb031b2df010ae84e058fadd3a1b10b19d23b762
[ "MIT" ]
1
2021-11-09T07:14:44.000Z
2021-11-09T07:14:44.000Z
# -*- coding: utf-8 -*- # system imports import sys try: from importlib.metadata import metadata except ImportError: # Backwards compatibility Python 3.7 and lower from importlib_metadata import metadata # type: ignore _app_module = sys.modules["__main__"].__package__ _md = metadata(_app_module) # typ...
26.277778
72
0.744186
import sys try: from importlib.metadata import metadata except ImportError: from importlib_metadata import metadata _app_module = sys.modules["__main__"].__package__ _md = metadata(_app_module) FROZEN = "Briefcase-Version" in _md or getattr(sys, "frozen", False)
true
true
f72fe13e3737561fcf3652de947a89127a226c44
619
py
Python
scraper_app/pipelines.py
brian-yang/pollen-scraper
77e47d68bb1c6ca31e7b91550728fa59e9cb2d8a
[ "MIT" ]
null
null
null
scraper_app/pipelines.py
brian-yang/pollen-scraper
77e47d68bb1c6ca31e7b91550728fa59e9cb2d8a
[ "MIT" ]
null
null
null
scraper_app/pipelines.py
brian-yang/pollen-scraper
77e47d68bb1c6ca31e7b91550728fa59e9cb2d8a
[ "MIT" ]
null
null
null
from sqlalchemy.orm import sessionmaker from models import Forecasts, db_connect, create_forecast_table import logging class PollenScraperPipeline(object): def __init__(self): engine = db_connect() create_forecast_table(engine) self.Session = sessionmaker(bind=engine) def process_item...
24.76
63
0.620355
from sqlalchemy.orm import sessionmaker from models import Forecasts, db_connect, create_forecast_table import logging class PollenScraperPipeline(object): def __init__(self): engine = db_connect() create_forecast_table(engine) self.Session = sessionmaker(bind=engine) def process_item...
true
true
f72fe1c22165e6e851d2bbb6a57c5a9a578e49f4
845
py
Python
keras/engine/saving.py
itsraina/keras
5e9376b5b94b6fb445dd52dbfafbc4e95bff5e35
[ "Apache-2.0" ]
null
null
null
keras/engine/saving.py
itsraina/keras
5e9376b5b94b6fb445dd52dbfafbc4e95bff5e35
[ "Apache-2.0" ]
null
null
null
keras/engine/saving.py
itsraina/keras
5e9376b5b94b6fb445dd52dbfafbc4e95bff5e35
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 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.409091
80
0.685207
from keras.saving import *
true
true
f72fe23bdf252ab6cbb78597079dd21aae3c8959
719
py
Python
ext_pylib/__init__.py
hbradleyiii/ext_pylib
15a9b5a80db87b5f20e03ef6bfa015acf4bf8543
[ "MIT" ]
2
2015-12-18T14:33:23.000Z
2015-12-22T11:48:53.000Z
ext_pylib/__init__.py
hbradleyiii/ext_pylib
15a9b5a80db87b5f20e03ef6bfa015acf4bf8543
[ "MIT" ]
null
null
null
ext_pylib/__init__.py
hbradleyiii/ext_pylib
15a9b5a80db87b5f20e03ef6bfa015acf4bf8543
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # /'' |''\ | | # \. | |../ | * |.. # / \/ T | \ / | | | \ # \.../\.| __ | \/ | | |../ # ###################/############### # / """ ext_pylib ~~~~~~~~~ Extra python libraries for scaffolding server...
20.542857
56
0.520167
from __future__ import absolute_import from . import domain from . import files from . import input from . import password from . import terminal from . import user __title__ = 'ext_pylib' __version__ = '0.2' __author__ = 'Harold Bradley III' __license__ = 'MIT' __copyright__ = 'Copyright 2015-2016 Harold Bradle...
true
true
f72fe24bceb08d360b3e71ca50fe69638691a3cf
4,782
py
Python
src/train_set.py
caoyunhao/keras-speed-prediction
b1c87a012f8049050f124062e3cc24322e7d95b9
[ "BSD-2-Clause" ]
null
null
null
src/train_set.py
caoyunhao/keras-speed-prediction
b1c87a012f8049050f124062e3cc24322e7d95b9
[ "BSD-2-Clause" ]
null
null
null
src/train_set.py
caoyunhao/keras-speed-prediction
b1c87a012f8049050f124062e3cc24322e7d95b9
[ "BSD-2-Clause" ]
null
null
null
# !/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018/4/6 10:55 # @Author : Yunhao Cao # @File : train_set.py import os import re import shutil import tool import config __author__ = 'Yunhao Cao' __all__ = [ '', ] level_list = config.LV_LIST classes = config.NUM_OF_LEVEL validation_rate = config....
31.460526
117
0.641363
import os import re import shutil import tool import config __author__ = 'Yunhao Cao' __all__ = [ '', ] level_list = config.LV_LIST classes = config.NUM_OF_LEVEL validation_rate = config.VALIDATION_RATE origin_data_dir = config.ORIGIN_DATA_DIR processed_set_dir = config.PROCESSED_SET_DIR trainset_dir = config....
true
true
f72fe2b962d8ae02afda6b1e6bd5174272456fd7
1,176
py
Python
src/okchain1/theme/rtd/conf/clients_ruby.py
sakya666/crate-docs-theme
5767fe05c342581d1387baa7222ec09f61ce9cc5
[ "Apache-2.0" ]
null
null
null
src/okchain1/theme/rtd/conf/clients_ruby.py
sakya666/crate-docs-theme
5767fe05c342581d1387baa7222ec09f61ce9cc5
[ "Apache-2.0" ]
null
null
null
src/okchain1/theme/rtd/conf/clients_ruby.py
sakya666/crate-docs-theme
5767fe05c342581d1387baa7222ec09f61ce9cc5
[ "Apache-2.0" ]
1
2022-03-14T04:06:36.000Z
2022-03-14T04:06:36.000Z
# -*- coding: utf-8; -*- # # Licensed to Crate (https://crate.io) under one or more contributor # license agreements. See the NOTICE file distributed with this work for # additional information regarding copyright ownership. Crate licenses # this file to you under the Apache License, Version 2.0 (the "License"); # yo...
40.551724
77
0.764456
from okchain1.theme.rtd.conf import * project = u'Crate Ruby Driver' html_theme_options.update({ 'canonical_url_path': 'docs/clients/ruby/en/latest/', })
true
true
f72fe2bfca70709b096167614b03f46712fae7e4
5,248
py
Python
hwtLib/tests/types/union_test.py
optical-o/hwtLib
edad621f5ad4cdbea20a5751ff4468979afe2f77
[ "MIT" ]
24
2017-02-23T10:00:50.000Z
2022-01-28T12:20:21.000Z
hwtLib/tests/types/union_test.py
optical-o/hwtLib
edad621f5ad4cdbea20a5751ff4468979afe2f77
[ "MIT" ]
32
2017-04-28T10:29:34.000Z
2021-04-27T09:16:43.000Z
hwtLib/tests/types/union_test.py
optical-o/hwtLib
edad621f5ad4cdbea20a5751ff4468979afe2f77
[ "MIT" ]
8
2019-09-19T03:34:36.000Z
2022-01-21T06:56:58.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import unittest from hwt.hdl.types.bits import Bits from hwt.hdl.types.struct import HStruct from hwt.hdl.types.union import HUnion from hwtLib.types.ctypes import uint8_t, uint16_t, int8_t, uint32_t from pyMathBitPrecise.bit_utils import mask class UnionTC(unittest.Te...
26.639594
67
0.416921
import unittest from hwt.hdl.types.bits import Bits from hwt.hdl.types.struct import HStruct from hwt.hdl.types.union import HUnion from hwtLib.types.ctypes import uint8_t, uint16_t, int8_t, uint32_t from pyMathBitPrecise.bit_utils import mask class UnionTC(unittest.TestCase): def test_assertMembersSameSize(sel...
true
true
f72fe2eb838ca241bfbb6311a02f5d6800326a7d
3,217
py
Python
editor/photo_effects.py
gitgik/photo-editing-app
730f88a1946d425cbe790cd4ed0689a1938a8cd0
[ "MIT" ]
5
2017-02-23T14:24:22.000Z
2021-02-23T03:43:18.000Z
editor/photo_effects.py
gitgik/photo-editing-app
730f88a1946d425cbe790cd4ed0689a1938a8cd0
[ "MIT" ]
1
2021-06-08T19:14:01.000Z
2021-06-08T19:14:01.000Z
editor/photo_effects.py
gitgik/photo-editing-app
730f88a1946d425cbe790cd4ed0689a1938a8cd0
[ "MIT" ]
2
2019-01-21T20:16:05.000Z
2019-06-23T14:30:50.000Z
"""Define imports.""" from PIL import ImageFilter, ImageOps, ImageEnhance def grayscale(image, name, temp_url): """Return an image with a contrast of grey.""" image.seek(0) photo = ImageOps.grayscale(image) photo.save(temp_url + "GRAYSCALE" + name) return temp_url + "GRAYSCALE" + name def smooth...
28.723214
74
0.658688
from PIL import ImageFilter, ImageOps, ImageEnhance def grayscale(image, name, temp_url): image.seek(0) photo = ImageOps.grayscale(image) photo.save(temp_url + "GRAYSCALE" + name) return temp_url + "GRAYSCALE" + name def smooth(image, name, temp_url): image.seek(0) photo = image.filter(Image...
true
true
f72fe3a6e22942dfdabf42624c7f630b6ceb120b
610
py
Python
eveonline-assistant/plans/urls.py
wengole/eveonline-assistant
35041952509bd347c5c9458630404726d7ddd5d8
[ "BSD-3-Clause" ]
1
2016-07-01T03:15:16.000Z
2016-07-01T03:15:16.000Z
eveonline-assistant/plans/urls.py
wengole/eveonline-assistant
35041952509bd347c5c9458630404726d7ddd5d8
[ "BSD-3-Clause" ]
null
null
null
eveonline-assistant/plans/urls.py
wengole/eveonline-assistant
35041952509bd347c5c9458630404726d7ddd5d8
[ "BSD-3-Clause" ]
null
null
null
from django.conf.urls import patterns, url from . import views urlpatterns = patterns( '', # URL pattern for the UserListView url( regex=r'^add/$', view=views.AddPlan.as_view(), name='add' ), url( regex=r'^manage/$', view=views.ManagePlans.as_view(), ...
20.333333
62
0.545902
from django.conf.urls import patterns, url from . import views urlpatterns = patterns( '', url( regex=r'^add/$', view=views.AddPlan.as_view(), name='add' ), url( regex=r'^manage/$', view=views.ManagePlans.as_view(), name='manage' ), url( ...
true
true
f72fe3eae0d57d1739f0d017bc8c4f227f8e08ed
11,579
py
Python
asdf/util.py
eteq/asdf
6d9e0e48bbffea166a19b71e29f5f9c211983bfe
[ "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
asdf/util.py
eteq/asdf
6d9e0e48bbffea166a19b71e29f5f9c211983bfe
[ "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
asdf/util.py
eteq/asdf
6d9e0e48bbffea166a19b71e29f5f9c211983bfe
[ "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- import inspect import math import struct import types from urllib.parse import urljoin from urllib.request import pathname2url from urllib import parse as urlparse import numpy as np from .extern.decorators import add_common_doc...
28.9475
78
0.59297
import inspect import math import struct import types from urllib.parse import urljoin from urllib.request import pathname2url from urllib import parse as urlparse import numpy as np from .extern.decorators import add_common_docstring __all__ = ['human_list', 'get_array_base', 'get_base_uri', 'filepath_to_url', ...
true
true
f72fe510b547f529b3a5626defad1371dfcbc75e
16,658
py
Python
wbgapi/data.py
mo-cmyk/wbgapi
a0f8658b7a74ec79256d7b66ff58cb95726e89aa
[ "MIT" ]
41
2020-01-29T17:39:50.000Z
2022-03-31T00:21:52.000Z
wbgapi/data.py
mo-cmyk/wbgapi
a0f8658b7a74ec79256d7b66ff58cb95726e89aa
[ "MIT" ]
18
2020-01-03T06:43:43.000Z
2022-02-19T13:09:21.000Z
wbgapi/data.py
mo-cmyk/wbgapi
a0f8658b7a74ec79256d7b66ff58cb95726e89aa
[ "MIT" ]
7
2021-03-24T15:41:09.000Z
2022-03-21T21:26:25.000Z
'''Access World Bank API data ''' import wbgapi as w try: import numpy as np import pandas as pd except ImportError: np = None pd = None def fetch(series, economy='all', time='all', mrv=None, mrnev=None, skipBlanks=False, labels=False, skipAggs=False, numericTimeKeys=False, params={}, db=None, **dime...
39.380615
221
0.593228
import wbgapi as w try: import numpy as np import pandas as pd except ImportError: np = None pd = None def fetch(series, economy='all', time='all', mrv=None, mrnev=None, skipBlanks=False, labels=False, skipAggs=False, numericTimeKeys=False, params={}, db=None, **dimensions): if db is None: ...
true
true
f72fe57794917edbcfc8d26818116b24e336b4d8
787
py
Python
examples/tf/trpo_gym_tf_cartpole.py
shadiakiki1986/garage
095bb5d25b32df1d44b47e99a78a9b01796941d9
[ "MIT" ]
null
null
null
examples/tf/trpo_gym_tf_cartpole.py
shadiakiki1986/garage
095bb5d25b32df1d44b47e99a78a9b01796941d9
[ "MIT" ]
null
null
null
examples/tf/trpo_gym_tf_cartpole.py
shadiakiki1986/garage
095bb5d25b32df1d44b47e99a78a9b01796941d9
[ "MIT" ]
null
null
null
import gym from garage.baselines import LinearFeatureBaseline from garage.experiment import run_experiment from garage.tf.algos import TRPO from garage.tf.envs import TfEnv from garage.tf.policies import CategoricalMLPPolicy # Need to wrap in a tf environment and force_reset to true # see https://github.com/openai/rl...
26.233333
72
0.758577
import gym from garage.baselines import LinearFeatureBaseline from garage.experiment import run_experiment from garage.tf.algos import TRPO from garage.tf.envs import TfEnv from garage.tf.policies import CategoricalMLPPolicy env = TfEnv(gym.make("CartPole-v0")) policy = CategoricalMLPPolicy( name="policy", env_s...
true
true
f72fe5795879771746bcc6ee4b44c101ac8e4453
267
py
Python
CCF/CSP/2018/18121.py
cnsteven/online-judge
60ee841a97e2bc0dc9c7b23fe5daa186898ab8b7
[ "MIT" ]
1
2019-05-04T10:28:32.000Z
2019-05-04T10:28:32.000Z
CCF/CSP/2018/18121.py
cnsteven/online-judge
60ee841a97e2bc0dc9c7b23fe5daa186898ab8b7
[ "MIT" ]
null
null
null
CCF/CSP/2018/18121.py
cnsteven/online-judge
60ee841a97e2bc0dc9c7b23fe5daa186898ab8b7
[ "MIT" ]
3
2020-12-31T04:36:38.000Z
2021-07-25T07:39:31.000Z
r, y, g = map(int, input().split()) n = int(input()) ans = 0 for _ in range(n): k, t = map(int, input().split()) if k == 0: ans += t elif k == 1: ans += t elif k == 2: ans = ans + t + r elif k == 3: pass print(ans)
17.8
36
0.419476
r, y, g = map(int, input().split()) n = int(input()) ans = 0 for _ in range(n): k, t = map(int, input().split()) if k == 0: ans += t elif k == 1: ans += t elif k == 2: ans = ans + t + r elif k == 3: pass print(ans)
true
true
f72fe6c802fc9b6df210c17f9eaf4d123167398f
1,996
py
Python
examples/Model_HM_RWS.py
kpoeppel/pytorch_probgraph
b78595ab03bbe92595ad2f6b35f5dd8bf84d6da0
[ "BSD-3-Clause" ]
47
2020-08-10T02:04:26.000Z
2022-03-23T22:20:56.000Z
examples/Model_HM_RWS.py
kpoeppel/pytorch_probgraph
b78595ab03bbe92595ad2f6b35f5dd8bf84d6da0
[ "BSD-3-Clause" ]
null
null
null
examples/Model_HM_RWS.py
kpoeppel/pytorch_probgraph
b78595ab03bbe92595ad2f6b35f5dd8bf84d6da0
[ "BSD-3-Clause" ]
4
2020-08-10T15:32:06.000Z
2021-12-29T15:04:20.000Z
import site site.addsitedir('..') import torch from pytorch_probgraph import BernoulliLayer from pytorch_probgraph import InteractionLinear from pytorch_probgraph import HelmholtzMachine from itertools import chain from tqdm import tqdm class Model_HM_RWS(torch.nn.Module): def __init__(self): super().__i...
43.391304
147
0.655311
import site site.addsitedir('..') import torch from pytorch_probgraph import BernoulliLayer from pytorch_probgraph import InteractionLinear from pytorch_probgraph import HelmholtzMachine from itertools import chain from tqdm import tqdm class Model_HM_RWS(torch.nn.Module): def __init__(self): super().__i...
true
true
f72fe7511018a20cd842050a050f2a2e4c49353b
6,242
py
Python
jesse/models/utils.py
farukuzun/jesse
c4c0c3dbab034db853fc1b09ac0f2697592bed79
[ "MIT" ]
1
2021-07-04T10:18:28.000Z
2021-07-04T10:18:28.000Z
jesse/models/utils.py
farukuzun/jesse
c4c0c3dbab034db853fc1b09ac0f2697592bed79
[ "MIT" ]
null
null
null
jesse/models/utils.py
farukuzun/jesse
c4c0c3dbab034db853fc1b09ac0f2697592bed79
[ "MIT" ]
null
null
null
import threading import numpy as np import jesse.helpers as jh from jesse.models.Candle import Candle from jesse.models.CompletedTrade import CompletedTrade from jesse.models.DailyBalance import DailyBalance from jesse.models.Order import Order from jesse.models.Orderbook import Orderbook from jesse.models.Ticker imp...
31.21
181
0.60942
import threading import numpy as np import jesse.helpers as jh from jesse.models.Candle import Candle from jesse.models.CompletedTrade import CompletedTrade from jesse.models.DailyBalance import DailyBalance from jesse.models.Order import Order from jesse.models.Orderbook import Orderbook from jesse.models.Ticker imp...
true
true
f72fe7bf8580c7c8f15d68a00c11795a0b14058e
23,210
py
Python
vyper/semantics/validation/local.py
Doc-Pixel/vyper
4da1090d5ed9c339fdd402e987db760d7d63c088
[ "Apache-2.0" ]
null
null
null
vyper/semantics/validation/local.py
Doc-Pixel/vyper
4da1090d5ed9c339fdd402e987db760d7d63c088
[ "Apache-2.0" ]
null
null
null
vyper/semantics/validation/local.py
Doc-Pixel/vyper
4da1090d5ed9c339fdd402e987db760d7d63c088
[ "Apache-2.0" ]
null
null
null
import copy from typing import Optional from vyper import ast as vy_ast from vyper.ast.validation import validate_call_args from vyper.exceptions import ( ExceptionList, FunctionDeclarationException, ImmutableViolation, InvalidLiteral, InvalidOperation, InvalidType, IteratorException, N...
40.43554
100
0.609823
import copy from typing import Optional from vyper import ast as vy_ast from vyper.ast.validation import validate_call_args from vyper.exceptions import ( ExceptionList, FunctionDeclarationException, ImmutableViolation, InvalidLiteral, InvalidOperation, InvalidType, IteratorException, N...
true
true
f72fe8bd0b61ca670674b153c7c49dccbd99c3d8
3,581
py
Python
google/bigtable/v2/bigtable-v2-py/noxfile.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
7
2021-02-21T10:39:41.000Z
2021-12-07T07:31:28.000Z
google/bigtable/v2/bigtable-v2-py/noxfile.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
6
2021-02-02T23:46:11.000Z
2021-11-15T01:46:02.000Z
google/bigtable/v2/bigtable-v2-py/noxfile.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
4
2021-01-28T23:25:45.000Z
2021-08-30T01:55:16.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...
26.924812
96
0.62692
import os import pathlib import shutil import subprocess import sys import nox CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() LOWER_BOUND_CONSTRAINTS_FILE = CURRENT_DIRECTORY / "constraints.txt" PACKAGE_NAME = subprocess.check_output([sys.executable, "setup.py", "--name"], encoding="utf-8") nox.ses...
true
true
f72fe92c6ad18f95463733bd1c3b6b698ed22a61
26,454
py
Python
Python/VRI/CLUS_VRI_ProcessByTSA_GROUPC.py
bcgov/clus
e0d4e49f031126ee40f36b338651b9fddc180f8a
[ "Apache-2.0" ]
27
2018-07-26T23:05:54.000Z
2022-03-15T22:55:46.000Z
Python/VRI/CLUS_VRI_ProcessByTSA_GROUPC.py
ElizabethKleynhans/clus
a02aef861712ab62bb5b5877208a138e0074e365
[ "Apache-2.0" ]
41
2018-04-25T19:31:29.000Z
2022-03-28T17:08:36.000Z
Python/VRI/CLUS_VRI_ProcessByTSA_GROUPC.py
ElizabethKleynhans/clus
a02aef861712ab62bb5b5877208a138e0074e365
[ "Apache-2.0" ]
10
2018-04-25T17:25:10.000Z
2022-02-16T21:53:23.000Z
#------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ''' Script for processing SPI Data for use in CLUS Caribou Project Mike Fowler Spatial Data Analyst June 2018 ''' #---------------------------------...
61.37819
225
0.525251
''' Script for processing SPI Data for use in CLUS Caribou Project Mike Fowler Spatial Data Analyst June 2018 ''' import datetime import sys import os import shutil import getpass import arcpy as gp import gc global tsa, connInstance, kennyloggins srcTSA = r'C:\Users\mwfowler\AppData\Local\Temp\tsa.gdb\data\tsa_study_...
false
true
f72fe9a85ffacd84ac9c14f50a694fd687e510c2
3,681
py
Python
third_party/lxml_xpath_qs.py
bpuderer/python-snippets27
8d51ff34c48bee1247575536d8ed506eafde8631
[ "MIT" ]
3
2015-11-20T14:30:53.000Z
2015-12-19T05:55:19.000Z
third_party/lxml_xpath_qs.py
bpuderer/python-snippets27
8d51ff34c48bee1247575536d8ed506eafde8631
[ "MIT" ]
null
null
null
third_party/lxml_xpath_qs.py
bpuderer/python-snippets27
8d51ff34c48bee1247575536d8ed506eafde8631
[ "MIT" ]
1
2016-01-05T20:54:49.000Z
2016-01-05T20:54:49.000Z
from lxml import etree from StringIO import StringIO # lxml provides full XPath syntax unlike ElementTree's ElementPath # https://www.w3.org/TR/xpath/ # http://lxml.de/xpathxslt.html # http://lxml.de/api/lxml.etree._ElementTree-class.html#xpath # http://www.ibm.com/developerworks/library/x-hiperfparse/ # http://infoh...
40.450549
129
0.704428
from lxml import etree from StringIO import StringIO # https://www.w3.org/TR/xpath/ # http://lxml.de/xpathxslt.html # http://lxml.de/api/lxml.etree._ElementTree-class.html#xpath # http://www.ibm.com/developerworks/library/x-hiperfparse/ # http://infohost.nmt.edu/tcc/help/pubs/pylxml/web/xpath.html # https://docs.pyth...
false
true
f72fea862619713252e7fba20316ffcd135413b8
21,695
py
Python
external/mmdetection/tests/ote_params_validation/test_ote_data_utils_params_validation.py
opencv/openvino_training_extensions
f5d809741e192a2345558efc75899a475019cf98
[ "Apache-2.0" ]
775
2019-03-01T02:13:33.000Z
2020-09-07T22:49:15.000Z
external/mmdetection/tests/ote_params_validation/test_ote_data_utils_params_validation.py
opencv/openvino_training_extensions
f5d809741e192a2345558efc75899a475019cf98
[ "Apache-2.0" ]
229
2019-02-28T21:37:08.000Z
2020-09-07T15:11:49.000Z
external/mmdetection/tests/ote_params_validation/test_ote_data_utils_params_validation.py
opencv/openvino_training_extensions
f5d809741e192a2345558efc75899a475019cf98
[ "Apache-2.0" ]
290
2019-02-28T20:32:11.000Z
2020-09-07T05:51:41.000Z
# Copyright (C) 2021-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 # import os.path as osp import tempfile import mmcv import pytest from detection_tasks.extension.datasets.data_utils import ( CocoDataset, LoadAnnotations, find_label_by_name, format_list_to_str, get_anchor_boxes, ...
39.445455
117
0.638442
import os.path as osp import tempfile import mmcv import pytest from detection_tasks.extension.datasets.data_utils import ( CocoDataset, LoadAnnotations, find_label_by_name, format_list_to_str, get_anchor_boxes, get_classes_from_annotation, get_sizes_from_dataset_entity, load_dataset_it...
true
true
f72fea9931e22e9f239b53d7134f8989231f7dc2
2,129
py
Python
aiida/backends/djsite/db/migrations/0014_add_node_uuid_unique_constraint.py
azadoks/aiida-core
b806b7fef8fc79090deccfe2019b77cb922e0581
[ "MIT", "BSD-3-Clause" ]
180
2019-07-12T07:45:26.000Z
2022-03-22T13:16:57.000Z
aiida/backends/djsite/db/migrations/0014_add_node_uuid_unique_constraint.py
azadoks/aiida-core
b806b7fef8fc79090deccfe2019b77cb922e0581
[ "MIT", "BSD-3-Clause" ]
2,325
2019-07-04T13:41:44.000Z
2022-03-31T12:17:10.000Z
aiida/backends/djsite/db/migrations/0014_add_node_uuid_unique_constraint.py
azadoks/aiida-core
b806b7fef8fc79090deccfe2019b77cb922e0581
[ "MIT", "BSD-3-Clause" ]
88
2019-07-06T01:42:39.000Z
2022-03-18T14:20:09.000Z
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
38.709091
114
0.627055
from django.db import migrations, models from aiida.backends.djsite.db.migrations import upgrade_schema_version from aiida.common.utils import get_new_uuid REVISION = '1.0.14' DOWN_REVISION = '1.0.13' def verify_node_uuid_uniqueness(_, __): from aiida.backends.general.migrations.duplicate_uuids import verify_u...
true
true
f72feae6ab211e77121bc7730e459830daa3eb1d
826
py
Python
pyadlml/dataset/obj.py
tcsvn/pyadlml
9b87d223ba0ef9814ba830263dd35fc6432fae87
[ "MIT" ]
4
2020-11-11T17:29:10.000Z
2021-01-08T20:55:47.000Z
pyadlml/dataset/obj.py
tcsvn/pyadlml
9b87d223ba0ef9814ba830263dd35fc6432fae87
[ "MIT" ]
null
null
null
pyadlml/dataset/obj.py
tcsvn/pyadlml
9b87d223ba0ef9814ba830263dd35fc6432fae87
[ "MIT" ]
5
2020-10-05T03:23:31.000Z
2022-01-25T19:15:34.000Z
from pyadlml.dataset._representations.raw import create_raw from pyadlml.dataset._representations.changepoint import create_changepoint from pyadlml.dataset.activities import check_activities class Data(): def __init__(self, activities, devices, activity_list, device_list): #assert check_activities(activit...
34.416667
76
0.737288
from pyadlml.dataset._representations.raw import create_raw from pyadlml.dataset._representations.changepoint import create_changepoint from pyadlml.dataset.activities import check_activities class Data(): def __init__(self, activities, devices, activity_list, device_list): self.df_activit...
true
true
f72fec11a0ec5517350c9336346de65477e1cb36
87,391
py
Python
python3/pyinotify.py
koto/pyinotify
b828a124bcf2310df7e2e7683b0902fcd78a08bf
[ "MIT" ]
1
2020-03-31T21:41:57.000Z
2020-03-31T21:41:57.000Z
python3/pyinotify.py
koto/pyinotify
b828a124bcf2310df7e2e7683b0902fcd78a08bf
[ "MIT" ]
null
null
null
python3/pyinotify.py
koto/pyinotify
b828a124bcf2310df7e2e7683b0902fcd78a08bf
[ "MIT" ]
null
null
null
#!/usr/bin/env python # pyinotify.py - python interface to inotify # Copyright (c) 2005-2011 Sebastien Martini <seb@dbzteam.org> # # 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 res...
37.603701
83
0.58276
class PyinotifyError(Exception): pass class UnsupportedPythonVersionError(PyinotifyError): def __init__(self, version): PyinotifyError.__init__(self, ('Python %s is unsupported, requires ' 'at least Python 3.0') % version) import sys...
true
true
f72fec409082a747247e54f3160b84531dff3bf0
49
py
Python
pydotted/__init__.py
aredden/pydotted
62ad1d3eaccc65edc94b3cf4a0673ad089a29c6a
[ "MIT" ]
null
null
null
pydotted/__init__.py
aredden/pydotted
62ad1d3eaccc65edc94b3cf4a0673ad089a29c6a
[ "MIT" ]
null
null
null
pydotted/__init__.py
aredden/pydotted
62ad1d3eaccc65edc94b3cf4a0673ad089a29c6a
[ "MIT" ]
null
null
null
from .pydotted import pydot __ALL__ = ["pydot"]
12.25
27
0.714286
from .pydotted import pydot __ALL__ = ["pydot"]
true
true
f72fed24b1aa083de6ed1211270c3ee51f07a93e
5,502
py
Python
custom_components/panasonic_smart_app/sensor.py
sugoi-wada/panasonic_smart_app
78c3e377165b93c415108fa21137067585cfc72d
[ "MIT" ]
null
null
null
custom_components/panasonic_smart_app/sensor.py
sugoi-wada/panasonic_smart_app
78c3e377165b93c415108fa21137067585cfc72d
[ "MIT" ]
null
null
null
custom_components/panasonic_smart_app/sensor.py
sugoi-wada/panasonic_smart_app
78c3e377165b93c415108fa21137067585cfc72d
[ "MIT" ]
null
null
null
from datetime import datetime, timedelta import logging from homeassistant.components.sensor import SensorEntity from homeassistant.const import ( STATE_UNAVAILABLE, DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_TEMPERATURE, DEVICE_CLASS_ENERGY, DEVICE_CLASS_PM25, TEMP_CELSIUS, ENERGY_KILO_WATT_HOUR, ...
25.71028
87
0.62341
from datetime import datetime, timedelta import logging from homeassistant.components.sensor import SensorEntity from homeassistant.const import ( STATE_UNAVAILABLE, DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_TEMPERATURE, DEVICE_CLASS_ENERGY, DEVICE_CLASS_PM25, TEMP_CELSIUS, ENERGY_KILO_WATT_HOUR, ...
true
true
f72fed563a8c29934c97216b6cbba861286ec271
3,487
py
Python
IPython/core/tests/test_prompts.py
flexlee/ipython
7528fbd76073c90262b9ac127de57c4c59b23a5c
[ "BSD-3-Clause-Clear" ]
1
2022-03-13T23:06:43.000Z
2022-03-13T23:06:43.000Z
IPython/core/tests/test_prompts.py
andreasjansson/ipython
09b4311726f46945b936c699f7a6489d74d7397f
[ "BSD-3-Clause-Clear" ]
null
null
null
IPython/core/tests/test_prompts.py
andreasjansson/ipython
09b4311726f46945b936c699f7a6489d74d7397f
[ "BSD-3-Clause-Clear" ]
1
2020-05-03T10:25:12.000Z
2020-05-03T10:25:12.000Z
# -*- coding: utf-8 """Tests for prompt generation.""" import unittest import os import nose.tools as nt from IPython.testing import tools as tt, decorators as dec from IPython.core.prompts import PromptManager, LazyEvaluate from IPython.testing.globalipapp import get_ipython from IPython.utils import py3compat from...
31.133929
86
0.578721
import unittest import os import nose.tools as nt from IPython.testing import tools as tt, decorators as dec from IPython.core.prompts import PromptManager, LazyEvaluate from IPython.testing.globalipapp import get_ipython from IPython.utils import py3compat from IPython.utils.tempdir import TemporaryDirectory ip = ...
true
true
f72fed7319c1d66dcc65177c208b1a6671806efd
4,361
py
Python
var/spack/repos/builtin/packages/ginkgo/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1
2020-09-02T11:55:57.000Z
2020-09-02T11:55:57.000Z
var/spack/repos/builtin/packages/ginkgo/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/ginkgo/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2020-01-10T18:54:54.000Z
2021-07-03T22:57:16.000Z
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * import sys class Ginkgo(CMakePackage, CudaPackage): """High-performance linear algebra library f...
45.427083
94
0.61706
from spack import * import sys class Ginkgo(CMakePackage, CudaPackage): homepage = "https://ginkgo-project.github.io/" git = "https://github.com/ginkgo-project/ginkgo.git" maintainers = ['tcojean', 'hartwiganzt'] version('develop', branch='develop') version('master', branch='master') ...
true
true
f72fedd3534283eb11dfd4a84eada7c236ead59a
10,438
py
Python
src/quart/wrappers/request.py
MarkoShiva/quart
f6709c6082a3cab9dffdcd937122f4d65a5990f7
[ "MIT" ]
null
null
null
src/quart/wrappers/request.py
MarkoShiva/quart
f6709c6082a3cab9dffdcd937122f4d65a5990f7
[ "MIT" ]
null
null
null
src/quart/wrappers/request.py
MarkoShiva/quart
f6709c6082a3cab9dffdcd937122f4d65a5990f7
[ "MIT" ]
null
null
null
from __future__ import annotations import asyncio import io from cgi import FieldStorage, parse_header from typing import Any, AnyStr, Awaitable, Callable, Generator, Optional from urllib.parse import parse_qs from werkzeug.datastructures import CombinedMultiDict, Headers, MultiDict from .base import BaseRequestWebs...
34.111111
95
0.610653
from __future__ import annotations import asyncio import io from cgi import FieldStorage, parse_header from typing import Any, AnyStr, Awaitable, Callable, Generator, Optional from urllib.parse import parse_qs from werkzeug.datastructures import CombinedMultiDict, Headers, MultiDict from .base import BaseRequestWebs...
true
true
f72fee28d1d7a6de068ec92b5dd4448e2007bd1e
7,158
py
Python
sdk/python/pulumi_azure_native/avs/v20210101preview/get_workload_network_dns_service.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/avs/v20210101preview/get_workload_network_dns_service.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/avs/v20210101preview/get_workload_network_dns_service.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 __a...
35.969849
207
0.644035
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __all__ = [ 'GetWorkloadNetworkDnsServiceResult', 'AwaitableGetWorkloadNetworkDnsServiceResult', 'get_workload_network_dns_service', ] @pulumi.output_type cla...
true
true
f72fee595b4703f699cfe5d567dfaf697a1d6207
828
py
Python
pysm/preprocessing/museum_crm/x01_make_karma_sources.py
binh-vu/semantic-modeling
b387584502ba1daa6abd6b7573828416f6426b49
[ "MIT" ]
3
2019-10-31T15:26:20.000Z
2022-03-03T06:04:03.000Z
pysm/preprocessing/museum_crm/x01_make_karma_sources.py
binh-vu/semantic-modeling
b387584502ba1daa6abd6b7573828416f6426b49
[ "MIT" ]
1
2021-10-05T14:57:29.000Z
2022-03-27T01:58:41.000Z
pysm/preprocessing/museum_crm/x01_make_karma_sources.py
binh-vu/semantic-modeling
b387584502ba1daa6abd6b7573828416f6426b49
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- import ujson from pathlib import Path from typing import Dict, Tuple, List, Set, Union, Optional, Any from semantic_modeling.config import config from semantic_modeling.data_io import get_data_tables, get_raw_data_tables, get_semantic_models, get_ontology, \ get_sampled_da...
41.4
112
0.805556
import ujson from pathlib import Path from typing import Dict, Tuple, List, Set, Union, Optional, Any from semantic_modeling.config import config from semantic_modeling.data_io import get_data_tables, get_raw_data_tables, get_semantic_models, get_ontology, \ get_sampled_data_tables from semantic_modeling.utilities...
true
true
f72fef007e9ec6112672dfd0e87b7ec609049c6a
2,115
py
Python
scrape_artists/artists.py
flannerykj/python_scrape
c5166431810432c24e04150eb305b3ec2a899a91
[ "MIT" ]
null
null
null
scrape_artists/artists.py
flannerykj/python_scrape
c5166431810432c24e04150eb305b3ec2a899a91
[ "MIT" ]
null
null
null
scrape_artists/artists.py
flannerykj/python_scrape
c5166431810432c24e04150eb305b3ec2a899a91
[ "MIT" ]
null
null
null
import csv import requests import socket from bs4 import BeautifulSoup import re import json def parse_artists(): artist_profiles = [] try: url = 'http://wx.toronto.ca/inter/pmmd/streetart.nsf/artists?OpenView' response = requests.get(url) html = response.content soup = Beautif...
33.571429
144
0.605674
import csv import requests import socket from bs4 import BeautifulSoup import re import json def parse_artists(): artist_profiles = [] try: url = 'http://wx.toronto.ca/inter/pmmd/streetart.nsf/artists?OpenView' response = requests.get(url) html = response.content soup = Beautif...
true
true
f72fef0e4ab230a89d2f0b6d56c75cd135c69cf4
497
py
Python
puzzles/day21/puzzle1.py
sbr075/advent2021
e431b56d9ee9ef9ef02fb9f9cde276feefb78095
[ "MIT" ]
1
2021-12-03T23:13:36.000Z
2021-12-03T23:13:36.000Z
puzzles/day21/puzzle1.py
sbr075/advent2021
e431b56d9ee9ef9ef02fb9f9cde276feefb78095
[ "MIT" ]
null
null
null
puzzles/day21/puzzle1.py
sbr075/advent2021
e431b56d9ee9ef9ef02fb9f9cde276feefb78095
[ "MIT" ]
null
null
null
def read_input(): with open("input.txt", "r") as file: return [int(p[28:]) for p in file.read().splitlines()] mod = lambda i,j: ((i-1) % j) + 1 def main(): pos = read_input() s = [0,0] for i in range(1,1000,3): pos[(i-1)%2] += sum([mod(j,100) for j in range(i,i+3)]) pos[(i-1)%2...
26.157895
63
0.478873
def read_input(): with open("input.txt", "r") as file: return [int(p[28:]) for p in file.read().splitlines()] mod = lambda i,j: ((i-1) % j) + 1 def main(): pos = read_input() s = [0,0] for i in range(1,1000,3): pos[(i-1)%2] += sum([mod(j,100) for j in range(i,i+3)]) pos[(i-1)%2...
true
true
f72fefc517a309b1ebb05a09c441a25eb97845f7
654
py
Python
sort/insertion_sort.py
vasili-byl/algorithms
4e37609ab9b724e140cfec4b01495a0952d28724
[ "MIT" ]
1
2020-05-02T13:40:10.000Z
2020-05-02T13:40:10.000Z
sort/insertion_sort.py
vasili-byl/algorithms
4e37609ab9b724e140cfec4b01495a0952d28724
[ "MIT" ]
null
null
null
sort/insertion_sort.py
vasili-byl/algorithms
4e37609ab9b724e140cfec4b01495a0952d28724
[ "MIT" ]
null
null
null
from sort.abstract_sort import Sort class InsertionSort(Sort): def __call__(self, array, left_bound=None, right_bound=None): if left_bound is None: left_bound = 0 if right_bound is None: right_bound = len(array) - 1 for i in range(left_bound + 1, right_bound + 1): ...
32.7
65
0.496942
from sort.abstract_sort import Sort class InsertionSort(Sort): def __call__(self, array, left_bound=None, right_bound=None): if left_bound is None: left_bound = 0 if right_bound is None: right_bound = len(array) - 1 for i in range(left_bound + 1, right_bound + 1): ...
true
true
f72ff070a885f440110d03df8a65db80bf61a2f3
4,299
py
Python
rllib/utils/torch_ops.py
acmore/ray
9f0f54266064e203b0bdcc9d3fa947cb4518ebc0
[ "Apache-2.0" ]
null
null
null
rllib/utils/torch_ops.py
acmore/ray
9f0f54266064e203b0bdcc9d3fa947cb4518ebc0
[ "Apache-2.0" ]
1
2020-06-23T07:54:44.000Z
2020-06-23T08:04:47.000Z
rllib/utils/torch_ops.py
acmore/ray
9f0f54266064e203b0bdcc9d3fa947cb4518ebc0
[ "Apache-2.0" ]
null
null
null
import numpy as np from ray.rllib.utils import try_import_tree from ray.rllib.utils.framework import try_import_torch torch, _ = try_import_torch() tree = try_import_tree() def explained_variance(y, pred): y_var = torch.var(y, dim=[0]) diff_var = torch.var(y - pred, dim=[0]) min_ = torch.Tensor([-1.0]) ...
30.928058
78
0.640381
import numpy as np from ray.rllib.utils import try_import_tree from ray.rllib.utils.framework import try_import_torch torch, _ = try_import_torch() tree = try_import_tree() def explained_variance(y, pred): y_var = torch.var(y, dim=[0]) diff_var = torch.var(y - pred, dim=[0]) min_ = torch.Tensor([-1.0]) ...
true
true
f72ff1c4d7592842535f6a31fa135b7e0705f968
1,651
py
Python
spotify_tracker/watcher_client.py
eriktaubeneck/spotifytracker
c0f7f1a418aae9184cb1d2d27835495f261027ce
[ "MIT" ]
null
null
null
spotify_tracker/watcher_client.py
eriktaubeneck/spotifytracker
c0f7f1a418aae9184cb1d2d27835495f261027ce
[ "MIT" ]
null
null
null
spotify_tracker/watcher_client.py
eriktaubeneck/spotifytracker
c0f7f1a418aae9184cb1d2d27835495f261027ce
[ "MIT" ]
null
null
null
import time import logging from .spotify_client import SpotifyPlaylistClient from . import config logger = logging.getLogger(name='spotify_tracker') class SpotifyWatcherClient(SpotifyPlaylistClient): def __init__(self): self.playlist_id = config.get_config_value('watcher_playlist_id') self.last...
34.395833
75
0.634161
import time import logging from .spotify_client import SpotifyPlaylistClient from . import config logger = logging.getLogger(name='spotify_tracker') class SpotifyWatcherClient(SpotifyPlaylistClient): def __init__(self): self.playlist_id = config.get_config_value('watcher_playlist_id') self.last...
true
true