hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f7482bfc288c5e09ed332c989d45f50608da5bc7
4,557
py
Python
detect.py
adityapatkar/covid-detection
59797402bb4359d6070558d40597f7fce3958a0d
[ "MIT" ]
null
null
null
detect.py
adityapatkar/covid-detection
59797402bb4359d6070558d40597f7fce3958a0d
[ "MIT" ]
null
null
null
detect.py
adityapatkar/covid-detection
59797402bb4359d6070558d40597f7fce3958a0d
[ "MIT" ]
null
null
null
import os import torch from torch.utils.data import Dataset, random_split, DataLoader from PIL import Image import torchvision.models as models import matplotlib.pyplot as plt import torchvision.transforms as transforms # from sklearn.metrics import f1_score import torch.nn.functional as F import torch.nn as nn from t...
30.38
88
0.63397
import os import torch from torch.utils.data import Dataset, random_split, DataLoader from PIL import Image import torchvision.models as models import matplotlib.pyplot as plt import torchvision.transforms as transforms import torch.nn.functional as F import torch.nn as nn from torchvision.utils import make_grid from...
true
true
f7482c172b6e0083190fc2fbe4e040d9edaf0b36
2,846
py
Python
legacy_tests/kernel/bigquery_tests.py
freyrsae/pydatalab
9aba1ac6bbe8e1384e7a4b07c5042af84348797d
[ "Apache-2.0" ]
198
2016-07-14T19:47:52.000Z
2022-03-15T08:45:21.000Z
legacy_tests/kernel/bigquery_tests.py
freyrsae/pydatalab
9aba1ac6bbe8e1384e7a4b07c5042af84348797d
[ "Apache-2.0" ]
534
2016-07-15T19:12:43.000Z
2022-03-11T23:11:39.000Z
legacy_tests/kernel/bigquery_tests.py
freyrsae/pydatalab
9aba1ac6bbe8e1384e7a4b07c5042af84348797d
[ "Apache-2.0" ]
86
2016-07-13T17:39:05.000Z
2021-11-03T03:39:41.000Z
# Copyright 2015 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
31.977528
99
0.723472
from __future__ import absolute_import from __future__ import unicode_literals import mock import unittest import google.auth import IPython import IPython.core.magic def noop_decorator(func): return func IPython.core.magic.register_line_cell_magic = noop_decorator IPython.core.magic.register_line_m...
true
true
f7482c2375eacce0e8da1a8510194f6a67a28f91
1,592
py
Python
python/tests/unit/test_pretty_daml.py
DACH-NY/dazl-client
56c8b1be047415b2bcb35b6558de4a780a402458
[ "Apache-2.0" ]
null
null
null
python/tests/unit/test_pretty_daml.py
DACH-NY/dazl-client
56c8b1be047415b2bcb35b6558de4a780a402458
[ "Apache-2.0" ]
null
null
null
python/tests/unit/test_pretty_daml.py
DACH-NY/dazl-client
56c8b1be047415b2bcb35b6558de4a780a402458
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2017-2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. # SPDX-License-Identifier: Apache-2.0 from dazl.damlast import DarFile, daml_types as daml from dazl.damlast.daml_lf_1 import DottedName, ModuleRef, PackageRef, TypeConName from dazl.damlast.lookup import MultiPackag...
30.037736
102
0.72299
from dazl.damlast import DarFile, daml_types as daml from dazl.damlast.daml_lf_1 import DottedName, ModuleRef, PackageRef, TypeConName from dazl.damlast.lookup import MultiPackageLookup from dazl.pretty import DamlPrettyPrinter, PrettyOptions from .dars import Pending def test_render_list_of_party(): type_ = ...
true
true
f7482c855815f0010dcb58d5f7c7f87afbbd2606
385
py
Python
boot.py
Deseteral/hogwarts_lights
a3da7091225b92f32cd03aa159ba3739c49bf3af
[ "MIT" ]
null
null
null
boot.py
Deseteral/hogwarts_lights
a3da7091225b92f32cd03aa159ba3739c49bf3af
[ "MIT" ]
null
null
null
boot.py
Deseteral/hogwarts_lights
a3da7091225b92f32cd03aa159ba3739c49bf3af
[ "MIT" ]
null
null
null
import network cred_f = open('wifi_credentials.txt') wifi_credentials = cred_f.read().split('\n'); sta_if = network.WLAN(network.STA_IF) if not sta_if.isconnected(): print('connecting to network...') sta_if.active(True) sta_if.connect(wifi_credentials[0], wifi_credentials[1]) while not sta_if.isconnec...
27.5
60
0.711688
import network cred_f = open('wifi_credentials.txt') wifi_credentials = cred_f.read().split('\n'); sta_if = network.WLAN(network.STA_IF) if not sta_if.isconnected(): print('connecting to network...') sta_if.active(True) sta_if.connect(wifi_credentials[0], wifi_credentials[1]) while not sta_if.isconnec...
true
true
f7482c9603f3e3853650fe79b40d0bc4b006a565
6,225
py
Python
pyleecan/Classes/WindingDW2L.py
IrakozeFD/pyleecan
5a93bd98755d880176c1ce8ac90f36ca1b907055
[ "Apache-2.0" ]
null
null
null
pyleecan/Classes/WindingDW2L.py
IrakozeFD/pyleecan
5a93bd98755d880176c1ce8ac90f36ca1b907055
[ "Apache-2.0" ]
null
null
null
pyleecan/Classes/WindingDW2L.py
IrakozeFD/pyleecan
5a93bd98755d880176c1ce8ac90f36ca1b907055
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # File generated according to Generator/ClassesRef/Machine/WindingDW2L.csv # WARNING! All changes made in this file will be lost! """Method code available at https://github.com/Eomys/pyleecan/tree/master/pyleecan/Methods/Machine/WindingDW2L """ from os import linesep from sys import getsizeof f...
35.775862
110
0.629558
from os import linesep from sys import getsizeof from logging import getLogger from ._check import check_var, raise_ from ..Functions.get_logger import get_logger from ..Functions.save import save from ..Functions.copy import copy from ..Functions.load import load_init_dict from ..Functions.Load.import_class import...
true
true
f7482cac62d743339c0acdb593b5924dace70277
374
py
Python
setup.py
AshiqAbdulkhader/Compylex
47ddd011f40c6825b54665ca69e631797838684f
[ "MIT" ]
1
2021-07-11T15:32:09.000Z
2021-07-11T15:32:09.000Z
setup.py
AshiqAbdulkhader/Compylex
47ddd011f40c6825b54665ca69e631797838684f
[ "MIT" ]
1
2021-10-01T14:23:06.000Z
2021-10-01T14:23:06.000Z
setup.py
AshiqAbdulkhader/Compylex
47ddd011f40c6825b54665ca69e631797838684f
[ "MIT" ]
2
2021-08-18T14:39:40.000Z
2021-10-01T09:32:06.000Z
from setuptools import setup setup(name='compylex', version='1.1', description='Code compiler', url='https://github.com/AshiqAbdulkhader/Compylex', packages=['compylex'], install_requires=[], license='MIT License', author='Muhammed Ashiq Abdul Khader', author_email='ashi...
26.714286
57
0.649733
from setuptools import setup setup(name='compylex', version='1.1', description='Code compiler', url='https://github.com/AshiqAbdulkhader/Compylex', packages=['compylex'], install_requires=[], license='MIT License', author='Muhammed Ashiq Abdul Khader', author_email='ashi...
true
true
f7482e8d52a32298bda776c6e4d2a8291682066f
844
py
Python
nanome/_internal/_network/_commands/_serialization/_send_notification.py
rramji/nanome-lib
2806598af31cfb4bb6e16366f0b300d2ddcc9c13
[ "MIT" ]
null
null
null
nanome/_internal/_network/_commands/_serialization/_send_notification.py
rramji/nanome-lib
2806598af31cfb4bb6e16366f0b300d2ddcc9c13
[ "MIT" ]
null
null
null
nanome/_internal/_network/_commands/_serialization/_send_notification.py
rramji/nanome-lib
2806598af31cfb4bb6e16366f0b300d2ddcc9c13
[ "MIT" ]
null
null
null
from nanome._internal._network._serialization import _ContextDeserialization, _ContextSerialization from nanome._internal._util._serializers import _DictionarySerializer, _LongSerializer from nanome._internal._structure._serialization import _WorkspaceSerializer, _AtomSerializer from nanome._internal._util._serializers...
38.363636
99
0.783175
from nanome._internal._network._serialization import _ContextDeserialization, _ContextSerialization from nanome._internal._util._serializers import _DictionarySerializer, _LongSerializer from nanome._internal._structure._serialization import _WorkspaceSerializer, _AtomSerializer from nanome._internal._util._serializers...
true
true
f7482f4cdf51cc54617dabd8193563b54e20e4f3
27
py
Python
paypal/__init__.py
igloox/django-paypal
65c7002888133c904f0c80cd87d85fc91e0dd78d
[ "Unlicense", "MIT" ]
null
null
null
paypal/__init__.py
igloox/django-paypal
65c7002888133c904f0c80cd87d85fc91e0dd78d
[ "Unlicense", "MIT" ]
null
null
null
paypal/__init__.py
igloox/django-paypal
65c7002888133c904f0c80cd87d85fc91e0dd78d
[ "Unlicense", "MIT" ]
null
null
null
__version__ = (0, 1, 3, 3)
13.5
26
0.555556
__version__ = (0, 1, 3, 3)
true
true
f7483023fe6a53e465f582b8968ca414ea598a26
1,915
py
Python
pyravendb/tests/raven_commands_tests/test_patch.py
CDuPlooy/ravendb-python-client
dbe51ee8eea166e0d9e60897ab480dd9a693366b
[ "MIT" ]
19
2019-02-16T14:39:38.000Z
2022-03-23T12:27:00.000Z
pyravendb/tests/raven_commands_tests/test_patch.py
CDuPlooy/ravendb-python-client
dbe51ee8eea166e0d9e60897ab480dd9a693366b
[ "MIT" ]
24
2018-10-21T07:31:21.000Z
2022-03-27T17:27:29.000Z
pyravendb/tests/raven_commands_tests/test_patch.py
CDuPlooy/ravendb-python-client
dbe51ee8eea166e0d9e60897ab480dd9a693366b
[ "MIT" ]
14
2018-08-14T07:58:46.000Z
2022-01-05T12:20:08.000Z
import unittest from pyravendb.commands.raven_commands import PutDocumentCommand, PatchCommand from pyravendb.custom_exceptions.exceptions import DocumentDoesNotExistsException from pyravendb.data.patches import PatchRequest from pyravendb.tests.test_base import TestBase class TestPatch(TestBase): def setUp(self)...
44.534884
98
0.684595
import unittest from pyravendb.commands.raven_commands import PutDocumentCommand, PatchCommand from pyravendb.custom_exceptions.exceptions import DocumentDoesNotExistsException from pyravendb.data.patches import PatchRequest from pyravendb.tests.test_base import TestBase class TestPatch(TestBase): def setUp(self)...
true
true
f7483075726840b87d32c2123dd043cd12efa138
5,168
py
Python
rasa_core_sdk/__init__.py
saqibahmed515/rasa_core_sdk
e5b7e66b2f4a6937bf9eed995ea70ddc37bb277a
[ "Apache-2.0" ]
null
null
null
rasa_core_sdk/__init__.py
saqibahmed515/rasa_core_sdk
e5b7e66b2f4a6937bf9eed995ea70ddc37bb277a
[ "Apache-2.0" ]
null
null
null
rasa_core_sdk/__init__.py
saqibahmed515/rasa_core_sdk
e5b7e66b2f4a6937bf9eed995ea70ddc37bb277a
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import copy import logging import typing from typing import Dict, Text, Any, Optional, Iterator from typing import List logger = logging.getLogger(__name__) if typing...
31.321212
78
0.581656
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import copy import logging import typing from typing import Dict, Text, Any, Optional, Iterator from typing import List logger = logging.getLogger(__name__) if typing...
true
true
f74831bde1edbf54a42cdffbaf816df45ecddd59
4,040
py
Python
navpy/utils/utils.py
adhika/NavPy
57130633adcb611cee0dbdfbbee758ca21552cc9
[ "BSD-3-Clause" ]
null
null
null
navpy/utils/utils.py
adhika/NavPy
57130633adcb611cee0dbdfbbee758ca21552cc9
[ "BSD-3-Clause" ]
null
null
null
navpy/utils/utils.py
adhika/NavPy
57130633adcb611cee0dbdfbbee758ca21552cc9
[ "BSD-3-Clause" ]
null
null
null
""" Utilities Functions. Copyright (c) 2014 NavPy Developers. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in LICENSE.txt """ import numpy as _np import sys def input_check_Nx1(x): """ Check x to be of dimension Nx1 and reshape it as a 1-D array Adhik...
25.56962
79
0.542822
import numpy as _np import sys def input_check_Nx1(x): x = _np.atleast_1d(x) theSize = _np.shape(x) if(len(theSize) > 1): if ((theSize[0] != 1) & (theSize[1] != 1)): raise ValueError('Not an N x 1 array') x = x.reshape(_np.size(x)) elif (theSize[0] == 1):...
true
true
f748340c6d3b40628b286e12ed5528d81346d6d9
1,828
py
Python
unsupervised_learning/0x03-hyperparameter_tuning/4-bayes_opt.py
cbarros7/holbertonschool-machine_learning
1edb4c253441f6319b86c9c590d1e7dd3fc32bf4
[ "MIT" ]
1
2022-03-09T19:12:22.000Z
2022-03-09T19:12:22.000Z
unsupervised_learning/0x03-hyperparameter_tuning/4-bayes_opt.py
cbarros7/holbertonschool-machine_learning
1edb4c253441f6319b86c9c590d1e7dd3fc32bf4
[ "MIT" ]
null
null
null
unsupervised_learning/0x03-hyperparameter_tuning/4-bayes_opt.py
cbarros7/holbertonschool-machine_learning
1edb4c253441f6319b86c9c590d1e7dd3fc32bf4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ 4-bayes_opt.py """ import numpy as np from scipy.stats import norm GP = __import__('2-gp').GaussianProcess class BayesianOptimization: """ Class that instantiates a Bayesian optimization on a noiseless 1D Gaussian process """ def __init__(self, f, X_init, Y_init, bounds...
29.483871
77
0.527352
import numpy as np from scipy.stats import norm GP = __import__('2-gp').GaussianProcess class BayesianOptimization: def __init__(self, f, X_init, Y_init, bounds, ac_samples, l=1, sigma_f=1, xsi=0.01, minimize=True): self.f = f self.gp = GP(X_init, Y_init, l, sigma_f) se...
true
true
f748347236d2f7ed1a4774d2dc48c01ba8dd3898
3,884
py
Python
Lib/objc/_CloudDocs.py
snazari/Pyto
bcea7bbef35cab21ce73087b1a0c00a07d07ec72
[ "MIT" ]
701
2018-10-22T11:54:09.000Z
2022-03-31T14:39:30.000Z
Lib/objc/_CloudDocs.py
snazari/Pyto
bcea7bbef35cab21ce73087b1a0c00a07d07ec72
[ "MIT" ]
229
2018-10-24T09:15:31.000Z
2021-12-24T16:51:37.000Z
Lib/objc/_CloudDocs.py
snazari/Pyto
bcea7bbef35cab21ce73087b1a0c00a07d07ec72
[ "MIT" ]
131
2018-11-25T18:33:03.000Z
2022-03-24T03:18:07.000Z
""" Classes from the 'CloudDocs' framework. """ try: from rubicon.objc import ObjCClass except ValueError: def ObjCClass(name): return None def _Class(name): try: return ObjCClass(name) except NameError: return None BRZombie = _Class("BRZombie") BRXPCSyncProxy = _Class("BRX...
45.162791
85
0.844748
try: from rubicon.objc import ObjCClass except ValueError: def ObjCClass(name): return None def _Class(name): try: return ObjCClass(name) except NameError: return None BRZombie = _Class("BRZombie") BRXPCSyncProxy = _Class("BRXPCSyncProxy") BRNotificationQueue = _Class("BRNo...
true
true
f74835f3182443e8b2003e77b093fbfc09c67fcf
7,153
py
Python
src/anu/constants/amino_acid.py
ankitskvmdam/anu
699598fb60dcc23f6cccd5abb30a03b294d21598
[ "MIT" ]
null
null
null
src/anu/constants/amino_acid.py
ankitskvmdam/anu
699598fb60dcc23f6cccd5abb30a03b294d21598
[ "MIT" ]
null
null
null
src/anu/constants/amino_acid.py
ankitskvmdam/anu
699598fb60dcc23f6cccd5abb30a03b294d21598
[ "MIT" ]
null
null
null
"""Enum for amino acid.""" from enum import Enum from typing import Dict, TypedDict class AcidityBasicity(Enum): """Enum for acidity and basicity.""" U = 3 # Neutral A = 1 # Acid B = 2 # Base class Charge(Enum): """Enum for charge.""" U = 3 # Neutral P = 1 # Positive N = 2 #...
28.612
57
0.533622
from enum import Enum from typing import Dict, TypedDict class AcidityBasicity(Enum): U = 3 A = 1 B = 2 class Charge(Enum): U = 3 P = 1 N = 2 class Hydropathy(Enum): HL = 1 HB = 2 M = 3 class AminoAcidToInt(Enum): A = 1 C = 2 D = 3 ...
true
true
f74836a59589ecbcca9deb222de2394c05b492b9
376
py
Python
lesson 4/question 3.py
Kev-in123/ICS2O7
425c59975d4ce6aa0937fd8715b51d04487e4fa9
[ "MIT" ]
2
2021-08-10T18:16:08.000Z
2021-09-26T19:49:26.000Z
lesson 4/question 3.py
Kev-in123/ICS2O7
425c59975d4ce6aa0937fd8715b51d04487e4fa9
[ "MIT" ]
null
null
null
lesson 4/question 3.py
Kev-in123/ICS2O7
425c59975d4ce6aa0937fd8715b51d04487e4fa9
[ "MIT" ]
null
null
null
occasions = { "Christmas":"Merry Christmas!", "Birthday":"Happy Birthday!", "New Years":"Happy New Year!", } occasion = str(input(f"Hi!\nWhat occasion is it? Here are the ones I know:\n{list(occasions.keys())}\n")) try: occasion = occasion.title() print(occasions[occasion]) except: pri...
25.066667
106
0.640957
occasions = { "Christmas":"Merry Christmas!", "Birthday":"Happy Birthday!", "New Years":"Happy New Year!", } occasion = str(input(f"Hi!\nWhat occasion is it? Here are the ones I know:\n{list(occasions.keys())}\n")) try: occasion = occasion.title() print(occasions[occasion]) except: pri...
true
true
f74837658af5f26bfa35d26f6b329c3a2b845ffb
2,481
py
Python
crawlers/advert/_utils.py
fostroll/ru_corner
defb681aa9311c2dd6ed98d1b934453c29e9a750
[ "Apache-2.0" ]
null
null
null
crawlers/advert/_utils.py
fostroll/ru_corner
defb681aa9311c2dd6ed98d1b934453c29e9a750
[ "Apache-2.0" ]
null
null
null
crawlers/advert/_utils.py
fostroll/ru_corner
defb681aa9311c2dd6ed98d1b934453c29e9a750
[ "Apache-2.0" ]
null
null
null
#-*- encoding: utf-8 -*- from collections import OrderedDict import os import re from selenium import webdriver from selenium.webdriver.chrome.options import Options ### import sys sys.path.append('../') ### import utils MIN_TEXT_LINES = 1 MIN_CHUNK_LINES = 1 MIN_CHUNK_WORDS = 20 MAX_CHUNK_WORDS = 200 AUTHORS_IGNOR...
35.956522
78
0.593309
from collections import OrderedDict import os import re from selenium import webdriver from selenium.webdriver.chrome.options import Options port sys sys.path.append('../') port utils MIN_TEXT_LINES = 1 MIN_CHUNK_LINES = 1 MIN_CHUNK_WORDS = 20 MAX_CHUNK_WORDS = 200 AUTHORS_IGNORE_FN = os.path.join(utils.PAGES_DIR,...
true
true
f7483846732635e5b5b6f1b88f389f5faba61b80
887
py
Python
test/test_list_breakdown_values_response.py
moaazsidat/mux-python
3f03b9dd0761fa1a0cd5bdbeac85ccf4f326508c
[ "MIT" ]
36
2019-02-28T21:18:39.000Z
2022-03-04T19:58:45.000Z
test/test_list_breakdown_values_response.py
moaazsidat/mux-python
3f03b9dd0761fa1a0cd5bdbeac85ccf4f326508c
[ "MIT" ]
7
2019-04-01T14:48:34.000Z
2022-03-04T16:31:34.000Z
test/test_list_breakdown_values_response.py
moaazsidat/mux-python
3f03b9dd0761fa1a0cd5bdbeac85ccf4f326508c
[ "MIT" ]
9
2019-11-29T03:57:58.000Z
2022-03-02T17:29:25.000Z
# coding: utf-8 """ Mux Python - Copyright 2019 Mux Inc. NOTE: This class is auto generated. Do not edit the class manually. """ from __future__ import absolute_import import unittest import mux_python from mux_python.models.list_breakdown_values_response import ListBreakdownValuesResponse # noqa: E501 from mux_...
23.972973
110
0.742954
from __future__ import absolute_import import unittest import mux_python from mux_python.models.list_breakdown_values_response import ListBreakdownValuesResponse from mux_python.rest import ApiException class TestListBreakdownValuesResponse(unittest.TestCase): def setUp(self): pass def tearD...
true
true
f748387ffbb30506777b5c93cb3532b4a502eda5
1,290
py
Python
moleculegen/callback/__init__.py
sanjaradylov/moleculegen-ml
4acb77244909cf8cfe4fb75461d4bed9b77f29f1
[ "BSD-3-Clause" ]
3
2021-11-18T11:41:21.000Z
2022-02-08T22:01:20.000Z
moleculegen/callback/__init__.py
sanjaradylov/moleculegen-ml
4acb77244909cf8cfe4fb75461d4bed9b77f29f1
[ "BSD-3-Clause" ]
20
2019-12-12T11:47:32.000Z
2021-06-02T07:55:18.000Z
moleculegen/callback/__init__.py
sanjaradylov/moleculegen-ml
4acb77244909cf8cfe4fb75461d4bed9b77f29f1
[ "BSD-3-Clause" ]
2
2019-12-23T08:17:01.000Z
2022-02-08T22:01:21.000Z
""" Build callback objects to run during model training. Classes: Callback: Callback ABC. CallbackList: Perform callbacks sequentially and log output messages. BatchMetricScorer: Calculate and log metrics after batch sampling and forward computation. EarlyStopping: Stop...
24.339623
89
0.691473
__all__ = ( 'Callback', 'CallbackList', 'BatchMetricScorer', 'EarlyStopping', 'EpochMetricScorer', 'Generator', 'PhysChemDescriptorPlotter', 'ProgressBar', ) from .base import ( Callback, CallbackList, ) from .callbacks import ( BatchMetricScorer, EarlyStopp...
true
true
f748388c21336444c73f28049facce59b7b6e8d8
503
py
Python
tests/test_trading_fee.py
lohithn4/NowTrade
ac04499731130297135b3526325191bd2cb36343
[ "MIT" ]
87
2015-11-09T07:11:32.000Z
2021-12-16T03:13:09.000Z
tests/test_trading_fee.py
lohithn4/NowTrade
ac04499731130297135b3526325191bd2cb36343
[ "MIT" ]
14
2015-09-28T18:24:18.000Z
2020-04-22T15:17:26.000Z
tests/test_trading_fee.py
lohithn4/NowTrade
ac04499731130297135b3526325191bd2cb36343
[ "MIT" ]
34
2015-10-12T13:26:09.000Z
2022-01-15T20:16:23.000Z
""" Tests for trading_fee.py module. """ import unittest from nowtrade.trading_fee import StaticFee class TestTradingFees(unittest.TestCase): """ Tests trading_fee.py classes. """ def test_trading_fees(self): """ Simple test for all trading fees. """ trading_fee = Static...
23.952381
69
0.654076
import unittest from nowtrade.trading_fee import StaticFee class TestTradingFees(unittest.TestCase): def test_trading_fees(self): trading_fee = StaticFee(5) self.assertEquals(trading_fee.__repr__(), 'StaticFee(fee=5)') self.assertEquals(trading_fee.get_fee(100, 1), 5) if __name__ == "__mai...
true
true
f748391d5aacf30ed6defee704efd85c4061ce33
17,104
py
Python
pytorch_disco/config_files/hyperparams.py
YunchuZhang/Visually-Grounded-Library-of-Behaviors-for-Generalizing-Manipulation-Across-Objects-Configurations-
896afda942dfc04e4aaad2ee751c32df1eb17913
[ "MIT" ]
1
2022-03-14T22:25:17.000Z
2022-03-14T22:25:17.000Z
pytorch_disco/config_files/hyperparams.py
YunchuZhang/Visually-Grounded-Library-of-Behaviors
896afda942dfc04e4aaad2ee751c32df1eb17913
[ "MIT" ]
null
null
null
pytorch_disco/config_files/hyperparams.py
YunchuZhang/Visually-Grounded-Library-of-Behaviors
896afda942dfc04e4aaad2ee751c32df1eb17913
[ "MIT" ]
null
null
null
import os B = 2 # batch size MB = 1 # batch size for metric learning max_clusters = 2 commitment_cost = 0.25 is_refine_net = False is_init_cluter_with_instance = False top_grasp_only = False H = 240 # height W = 320 # width # BY = 200*2 # bird height (y axis, [-40, 40]) # BX = 176*2 # bird width (x axis, [0, 70.4]) ...
22.86631
91
0.546246
import os B = 2 MB = 1 max_clusters = 2 commitment_cost = 0.25 is_refine_net = False is_init_cluter_with_instance = False top_grasp_only = False H = 240 W = 320 1 S = 2 T = 256 V = 100000 sensor_S = 10 loadname = None emb2D_init = "" feat_init = "" obj_init = "" box_init = "" ort_init = "" inp_init = "" tr...
true
true
f7483af073c23e6259d9dccc6602e4c00935b8ea
9,036
py
Python
my_db.py
AndriiKuts-U/Lorem-ipsum
e791bddb616980cc3dcc40d5b98ef9c301c7a7bc
[ "MIT" ]
null
null
null
my_db.py
AndriiKuts-U/Lorem-ipsum
e791bddb616980cc3dcc40d5b98ef9c301c7a7bc
[ "MIT" ]
null
null
null
my_db.py
AndriiKuts-U/Lorem-ipsum
e791bddb616980cc3dcc40d5b98ef9c301c7a7bc
[ "MIT" ]
1
2021-04-09T00:03:30.000Z
2021-04-09T00:03:30.000Z
# Copyright (c) [2021] [Andrii Kuts, Oleksandr Tsepkov] import sqlite3 as sq import csv with sq.connect("data/server.db") as con: cur = con.cursor() def create_table_teams(): cur.execute("""CREATE TABLE IF NOT EXISTS teams ( team_id INTEGER PRIMARY KEY, team_name TEXT )""")...
38.126582
293
0.618526
import sqlite3 as sq import csv with sq.connect("data/server.db") as con: cur = con.cursor() def create_table_teams(): cur.execute("""CREATE TABLE IF NOT EXISTS teams ( team_id INTEGER PRIMARY KEY, team_name TEXT )""") con.commit() def create_table_users(): ...
true
true
f7483c140bfc442c473b0da28dcd404919327d25
7,891
py
Python
flit/init.py
StephenRoille/flit
bc8d8e8905f677c672f90751c4c95c33e1c11a50
[ "BSD-3-Clause" ]
null
null
null
flit/init.py
StephenRoille/flit
bc8d8e8905f677c672f90751c4c95c33e1c11a50
[ "BSD-3-Clause" ]
null
null
null
flit/init.py
StephenRoille/flit
bc8d8e8905f677c672f90751c4c95c33e1c11a50
[ "BSD-3-Clause" ]
1
2021-06-24T10:21:43.000Z
2021-06-24T10:21:43.000Z
from collections import OrderedDict from datetime import date import json import os from pathlib import Path import re import sys import pytoml as toml def get_data_dir(): """Get the directory path for flit user data files. """ home = os.path.realpath(os.path.expanduser('~')) if sys.platform == 'darwi...
35.545045
104
0.559498
from collections import OrderedDict from datetime import date import json import os from pathlib import Path import re import sys import pytoml as toml def get_data_dir(): home = os.path.realpath(os.path.expanduser('~')) if sys.platform == 'darwin': d = Path(home, 'Library') elif os.name == 'nt': ...
true
true
f7483c3e7e96a28ce8de117fffe3245d030badf6
2,831
py
Python
z3tracker/items/storage.py
Feneg/z3-tracker
d54c738e19de300ee7de13f333cab8bca93dfa7d
[ "MIT" ]
null
null
null
z3tracker/items/storage.py
Feneg/z3-tracker
d54c738e19de300ee7de13f333cab8bca93dfa7d
[ "MIT" ]
1
2019-09-29T07:59:16.000Z
2019-09-29T07:59:16.000Z
z3tracker/items/storage.py
Feneg/z3-tracker
d54c738e19de300ee7de13f333cab8bca93dfa7d
[ "MIT" ]
1
2019-09-29T02:12:09.000Z
2019-09-29T02:12:09.000Z
''' Item/dungeon tracker saving ''' import json import os.path import threading from ..config import CONFIG, CONFIGDIRECTORY from ..version import __version__ as version DATALOCK = threading.RLock() __all__ = ( 'load_items', 'load_dungeons', 'load_locations', 'load_entrances' 'store_items', 'store_dungeons'...
17.054217
79
0.557047
import json import os.path import threading from ..config import CONFIG, CONFIGDIRECTORY from ..version import __version__ as version DATALOCK = threading.RLock() __all__ = ( 'load_items', 'load_dungeons', 'load_locations', 'load_entrances' 'store_items', 'store_dungeons', 'store_locations','store_entrances...
true
true
f7483dad4fb3ba20f6383a16b57ff9bf154fd6f7
22,663
py
Python
tests/test_sansio.py
caseyduquettesc/gidgethub
e751664d95917dbdb856c382bfe2f4655e2a83c1
[ "Apache-2.0" ]
1
2020-08-30T08:52:35.000Z
2020-08-30T08:52:35.000Z
tests/test_sansio.py
caseyduquettesc/gidgethub
e751664d95917dbdb856c382bfe2f4655e2a83c1
[ "Apache-2.0" ]
6
2020-08-30T08:52:48.000Z
2020-10-29T16:00:24.000Z
tests/test_sansio.py
Smirenost/gidgethub
27c104de7a3e1b3052fb252f11b61a8ee01691f1
[ "Apache-2.0" ]
null
null
null
import datetime import http import json import pathlib import pytest from gidgethub import ( BadRequest, BadRequestUnknownError, GitHubBroken, HTTPException, InvalidField, RateLimitExceeded, RedirectionException, ValidationError, ValidationFailure, ) from gidgethub import sansio ...
38.411864
100
0.627234
import datetime import http import json import pathlib import pytest from gidgethub import ( BadRequest, BadRequestUnknownError, GitHubBroken, HTTPException, InvalidField, RateLimitExceeded, RedirectionException, ValidationError, ValidationFailure, ) from gidgethub import sansio ...
true
true
f7483dc41d7e3e1457294dcbb499f8e642d0b5a9
4,130
py
Python
pybo/config.py
mikkokotila/pybo
ae921861e3e8c18856f19c59fc4c7da8f2126c1c
[ "Apache-2.0" ]
null
null
null
pybo/config.py
mikkokotila/pybo
ae921861e3e8c18856f19c59fc4c7da8f2126c1c
[ "Apache-2.0" ]
null
null
null
pybo/config.py
mikkokotila/pybo
ae921861e3e8c18856f19c59fc4c7da8f2126c1c
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """Configuration file to set up Pybo """ from pathlib import Path import yaml default_config = '''tokenizer: trie_files: - &part 'particles.txt' - &ancient ancient.txt - &except exceptions.txt - &uncomp uncompound_lexicon.txt - &tsikchen tsikchen.txt - &oral0 oral_corpus_0.t...
29.29078
107
0.610654
from pathlib import Path import yaml default_config = '''tokenizer: trie_files: - &part 'particles.txt' - &ancient ancient.txt - &except exceptions.txt - &uncomp uncompound_lexicon.txt - &tsikchen tsikchen.txt - &oral0 oral_corpus_0.txt - &oral1 oral_corpus_1.txt - &oral2 oral_corp...
true
true
f7483e5dfd6b57db763ade7fe914981a6b5ebc64
2,790
py
Python
idm/utils.py
ruslanvolov6667/ID
d2e2e0d8764bb9bc9caad163d69de03972cb5380
[ "MIT" ]
1
2020-07-16T00:16:06.000Z
2020-07-16T00:16:06.000Z
idm/utils.py
ruslanvolov6667/ID
d2e2e0d8764bb9bc9caad163d69de03972cb5380
[ "MIT" ]
null
null
null
idm/utils.py
ruslanvolov6667/ID
d2e2e0d8764bb9bc9caad163d69de03972cb5380
[ "MIT" ]
null
null
null
from .objects import DB from vkapi import VkApi, VkApiResponseException import json from flask import render_template import typing import time import re def get_all_history_gen(vk: VkApi, chat_id: int) -> typing.Generator[dict, None, None]: __offset = 0 chat = vk("messages.getHistory", count=1, peer...
35.769231
120
0.62043
from .objects import DB from vkapi import VkApi, VkApiResponseException import json from flask import render_template import typing import time import re def get_all_history_gen(vk: VkApi, chat_id: int) -> typing.Generator[dict, None, None]: __offset = 0 chat = vk("messages.getHistory", count=1, peer...
true
true
f7483ee3be5db3999804cc6a4892f9c98b9db917
285
py
Python
tests/benchmark/inhib_diameter_modes/__init__.py
mpascucci/AST-image-processing
54111e874237f0c146760d514eea96131177878a
[ "ECL-2.0", "Apache-2.0" ]
6
2020-11-24T15:55:35.000Z
2021-12-31T11:52:56.000Z
tests/benchmark/inhib_diameter_modes/__init__.py
mpascucci/AST-image-processing
54111e874237f0c146760d514eea96131177878a
[ "ECL-2.0", "Apache-2.0" ]
1
2020-11-24T15:46:15.000Z
2020-11-24T15:46:15.000Z
tests/benchmark/inhib_diameter_modes/__init__.py
mpascucci/AST-image-processing
54111e874237f0c146760d514eea96131177878a
[ "ECL-2.0", "Apache-2.0" ]
3
2021-02-04T10:08:43.000Z
2022-02-21T02:00:47.000Z
from . import nlclsq from . import slopeOP #! REQUIRES THIS PACKAGE https://github.com/vrunge/slopeOP from . import op #! REQUIRES THIS PACKAGE https://github.com/mpascucci/optimalpartitioning from . import count __doc__ = "functions for inhibition diameter measurement"
40.714286
99
0.754386
from . import nlclsq from . import slopeOP from . import op from . import count __doc__ = "functions for inhibition diameter measurement"
true
true
f7483f3934aac500c4e32e3e8f1cb19cdeb79aed
8,742
py
Python
MicrosoftLocale.py
ckbx-cakebox/labanotator-shape-library-inspector
91a1d4b5a677488856b85250ecbb2758a935e07c
[ "MIT" ]
null
null
null
MicrosoftLocale.py
ckbx-cakebox/labanotator-shape-library-inspector
91a1d4b5a677488856b85250ecbb2758a935e07c
[ "MIT" ]
null
null
null
MicrosoftLocale.py
ckbx-cakebox/labanotator-shape-library-inspector
91a1d4b5a677488856b85250ecbb2758a935e07c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import ctypes import ctypes.wintypes import functools class I18nText(object): def __init__(self, strings = None): self.__strings = {} if strings != None: self.__strings = strings def __setitem__(self, locale, string): if st...
29.33557
147
0.677648
import ctypes import ctypes.wintypes import functools class I18nText(object): def __init__(self, strings = None): self.__strings = {} if strings != None: self.__strings = strings def __setitem__(self, locale, string): if string == '': del self.__strings[l...
true
true
f7483f93cf86e3764e6994c6d5fb53582b30e48a
2,093
py
Python
waterworld/pettingzoosislwaterworldDMFGACexecution.py
Sriram94/DMFG
9206d4302350bed165e6812e8874041335ecf8a8
[ "MIT" ]
4
2021-12-17T08:00:28.000Z
2022-02-12T12:25:24.000Z
waterworld/pettingzoosislwaterworldDMFGACexecution.py
Sriram94/DMFG
9206d4302350bed165e6812e8874041335ecf8a8
[ "MIT" ]
null
null
null
waterworld/pettingzoosislwaterworldDMFGACexecution.py
Sriram94/DMFG
9206d4302350bed165e6812e8874041335ecf8a8
[ "MIT" ]
null
null
null
from pettingzoo.sisl.waterworld import waterworld from RL_dmfgac import Actor import csv import numpy as np import tensorflow.compat.v1 as tf tf.disable_v2_behavior() def run_waterworld(parallel_env): n_actions = 25 num_episode = 0 while num_episode < 100: observation = parallel_env....
24.337209
104
0.581462
from pettingzoo.sisl.waterworld import waterworld from RL_dmfgac import Actor import csv import numpy as np import tensorflow.compat.v1 as tf tf.disable_v2_behavior() def run_waterworld(parallel_env): n_actions = 25 num_episode = 0 while num_episode < 100: observation = parallel_env....
true
true
f7483f9d3df18b099964e1ffe938a8951d77ad5d
1,484
py
Python
Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IntegrationsCheck_Widget_IntegrationsCategory/IntegrationsCheck_Widget_IntegrationsCategory.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IntegrationsCheck_Widget_IntegrationsCategory/IntegrationsCheck_Widget_IntegrationsCategory.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IntegrationsCheck_Widget_IntegrationsCategory/IntegrationsCheck_Widget_IntegrationsCategory.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import collections import random from typing import Counter import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 def parse_data(list_content): lists_data = [] list_collections: Counter = collections.Counter(list_content) top_lists = list_collections.most_common(10) ...
25.586207
110
0.572102
import collections import random from typing import Counter import demistomock as demisto from CommonServerPython import * def parse_data(list_content): lists_data = [] list_collections: Counter = collections.Counter(list_content) top_lists = list_collections.most_common(10) lists_number = len(t...
true
true
f7483fba5c4cf0cbfd7723ca74f926e8ead5e5e9
1,871
py
Python
tools/harness-automation/cases_R140/sed_6_1_5.py
AdityaHPatwardhan/openthread
a201e9d5d0273bb51fa20efc8758be20a725018e
[ "BSD-3-Clause" ]
2,962
2016-05-11T15:06:06.000Z
2022-03-27T20:06:16.000Z
tools/harness-automation/cases_R140/sed_6_1_5.py
AdityaHPatwardhan/openthread
a201e9d5d0273bb51fa20efc8758be20a725018e
[ "BSD-3-Clause" ]
5,899
2016-05-11T19:21:49.000Z
2022-03-31T18:17:20.000Z
tools/harness-automation/cases_R140/sed_6_1_5.py
AdityaHPatwardhan/openthread
a201e9d5d0273bb51fa20efc8758be20a725018e
[ "BSD-3-Clause" ]
1,113
2016-05-11T15:37:42.000Z
2022-03-31T09:37:04.000Z
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # 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 retain the above copyright # notic...
40.673913
77
0.769642
import unittest from autothreadharness.harness_case import HarnessCase class SED_6_1_5(HarnessCase): role = HarnessCase.ROLE_SED case = '6 1 5' golden_devices_required = 3 def on_dialog(self, dialog, title): pass if __name__ == '__main__': unittest.main()
true
true
f7483fc0d4519ce430d1a7f8ad2e63404b8a54d9
119
py
Python
example/blog/urls.py
Microdisseny/django-ajax-raw-id-fields
8a49039a42f4cdf7b47589af1ef13332f5277f55
[ "MIT" ]
2
2020-08-25T13:45:31.000Z
2020-08-25T13:45:37.000Z
example/blog/urls.py
Microdisseny/django-ajax-raw-id-fields
8a49039a42f4cdf7b47589af1ef13332f5277f55
[ "MIT" ]
11
2019-02-06T00:15:05.000Z
2022-02-10T07:35:16.000Z
example/blog/urls.py
Microdisseny/django-ajax-raw-id-fields
8a49039a42f4cdf7b47589af1ef13332f5277f55
[ "MIT" ]
null
null
null
from django.urls import re_path from . import views urlpatterns = [ re_path(r'^$', views.index, name='index'), ]
14.875
46
0.672269
from django.urls import re_path from . import views urlpatterns = [ re_path(r'^$', views.index, name='index'), ]
true
true
f748403b430561ec9eecb804fb40cba314a037e3
1,214
py
Python
google/cloud/logging_v2/services/metrics_service_v2/transports/__init__.py
ysde/python-logging
3ac637a76f6ee6800947de2508ec2c3193413bf0
[ "Apache-2.0" ]
null
null
null
google/cloud/logging_v2/services/metrics_service_v2/transports/__init__.py
ysde/python-logging
3ac637a76f6ee6800947de2508ec2c3193413bf0
[ "Apache-2.0" ]
null
null
null
google/cloud/logging_v2/services/metrics_service_v2/transports/__init__.py
ysde/python-logging
3ac637a76f6ee6800947de2508ec2c3193413bf0
[ "Apache-2.0" ]
null
null
null
# -*- 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 o...
33.722222
87
0.789127
from collections import OrderedDict from typing import Dict, Type from .base import MetricsServiceV2Transport from .grpc import MetricsServiceV2GrpcTransport from .grpc_asyncio import MetricsServiceV2GrpcAsyncIOTransport _transport_registry = OrderedDict() _transport_registry["grpc"] = MetricsSer...
true
true
f74840ca551e10a4d564079bc327f8700d554773
3,013
py
Python
vit_jax/configs.py
wangbingo/vision_transformer
2ebff8b73cbc0f34b7af2d5045dfcb5c5bacfd6a
[ "Apache-2.0" ]
null
null
null
vit_jax/configs.py
wangbingo/vision_transformer
2ebff8b73cbc0f34b7af2d5045dfcb5c5bacfd6a
[ "Apache-2.0" ]
null
null
null
vit_jax/configs.py
wangbingo/vision_transformer
2ebff8b73cbc0f34b7af2d5045dfcb5c5bacfd6a
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
32.053191
74
0.750415
import ml_collections def get_testing(): config = ml_collections.ConfigDict() config.patches = ml_collections.ConfigDict({'size': (16, 16)}) config.hidden_size = 1 config.transformer = ml_collections.ConfigDict() config.transformer.mlp_dim = 1 config.transformer.num_heads = 1 config.transf...
true
true
f7484139c078f151635d0e93cd3f9e13f6980ab0
4,798
py
Python
alipay/aop/api/request/AlipayMobileMovieActivityNotifyRequest.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/request/AlipayMobileMovieActivityNotifyRequest.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/request/AlipayMobileMovieActivityNotifyRequest.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * class AlipayMobileMovieActivityNotifyRequest(object): def __init__(self, biz_model=None): self._biz_model = biz_model self._...
28.730539
174
0.633597
import simplejson as json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * class AlipayMobileMovieActivityNotifyRequest(object): def __init__(self, biz_model=None): self._biz_model = biz_model self._activity_detail = None self._activit...
true
true
f74841d0daee5ff18f56390b2e4071bbc2dec634
3,425
py
Python
calculator.py
c910335/vface-server
874765a2034a69998916c4c3d625f9cfaf8abe5d
[ "MIT" ]
7
2020-09-10T14:00:16.000Z
2021-12-02T08:33:23.000Z
calculator.py
c910335/vface-server
874765a2034a69998916c4c3d625f9cfaf8abe5d
[ "MIT" ]
null
null
null
calculator.py
c910335/vface-server
874765a2034a69998916c4c3d625f9cfaf8abe5d
[ "MIT" ]
1
2021-08-31T01:20:25.000Z
2021-08-31T01:20:25.000Z
import math class Calculator: def __init__(self, width): self.width = width self.params = { 'angle_x': [0], 'angle_y': [0], 'angle_z': [0], 'eye_l_open': [1], 'eye_r_open': [1], 'eye_ball_x': [0], 'eye_ball_y': [0],...
42.283951
147
0.568175
import math class Calculator: def __init__(self, width): self.width = width self.params = { 'angle_x': [0], 'angle_y': [0], 'angle_z': [0], 'eye_l_open': [1], 'eye_r_open': [1], 'eye_ball_x': [0], 'eye_ball_y': [0],...
true
true
f748420399f87027778e16599514feafd9370aa7
2,450
py
Python
optional-container-engine/tests/test_end_to_end.py
spannerk/googleCloudPlatformExample
6a8bd7f94b01c3e2e256dc28702c2019831b94da
[ "Apache-2.0" ]
null
null
null
optional-container-engine/tests/test_end_to_end.py
spannerk/googleCloudPlatformExample
6a8bd7f94b01c3e2e256dc28702c2019831b94da
[ "Apache-2.0" ]
null
null
null
optional-container-engine/tests/test_end_to_end.py
spannerk/googleCloudPlatformExample
6a8bd7f94b01c3e2e256dc28702c2019831b94da
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 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, ...
31.818182
74
0.686939
import os import time from bs4 import BeautifulSoup import pytest import requests @pytest.mark.e2e def test_end_to_end(): base_url = os.environ.get('E2E_URL', 'http://localhost:8080') book_data = { 'title': 'a confederacy of dunces', } response = requests.post(base_url + '/bo...
true
true
f748436dffebae835a3df101621ac0eedc738532
2,274
py
Python
explanations.py
vickyyu90/maxnet
38c49c39dbe77b2984d8cdb2f4087310b2220593
[ "Apache-2.0" ]
null
null
null
explanations.py
vickyyu90/maxnet
38c49c39dbe77b2984d8cdb2f4087310b2220593
[ "Apache-2.0" ]
null
null
null
explanations.py
vickyyu90/maxnet
38c49c39dbe77b2984d8cdb2f4087310b2220593
[ "Apache-2.0" ]
null
null
null
import numpy as np import torch import torch.nn as nn from skimage.transform import resize from tqdm import tqdm class RISE(nn.Module): """A RISE class that computes saliency maps with RISE. """ def __init__(self, model, input_size, N, p1, gpu_batch=100): super(RISE, self).__init__() self...
34.454545
184
0.574758
import numpy as np import torch import torch.nn as nn from skimage.transform import resize from tqdm import tqdm class RISE(nn.Module): def __init__(self, model, input_size, N, p1, gpu_batch=100): super(RISE, self).__init__() self.model = model self.input_size = input_size self.gpu...
true
true
f7484596cc92fbc7a9f115048e14ac5f473fff5c
1,700
py
Python
billing/models.py
constellation-project/constellation
7208ffe9b8a40e98100ebbd2f173cf99f39b5c1e
[ "BSD-3-Clause" ]
1
2019-12-21T17:52:28.000Z
2019-12-21T17:52:28.000Z
billing/models.py
constellation-project/constellation
7208ffe9b8a40e98100ebbd2f173cf99f39b5c1e
[ "BSD-3-Clause" ]
null
null
null
billing/models.py
constellation-project/constellation
7208ffe9b8a40e98100ebbd2f173cf99f39b5c1e
[ "BSD-3-Clause" ]
null
null
null
from django.db import models from polymorphic.models import PolymorphicModel class Product(models.Model): PAYER_TYPES = [ ('all', 'All'), ('mem', 'Member'), ('org', 'Organization'), ('cus', 'Custom') ] name = models.CharField(max_length=255) #currency = models.CharFie...
33.333333
108
0.714706
from django.db import models from polymorphic.models import PolymorphicModel class Product(models.Model): PAYER_TYPES = [ ('all', 'All'), ('mem', 'Member'), ('org', 'Organization'), ('cus', 'Custom') ] name = models.CharField(max_length=255) price = models.BigInt...
true
true
f74846660cdfbf003a1625a0f9ec6352fa8fc1c2
5,608
py
Python
git_hashes.py
shakthimaan/ocaml_bench_scripts
2aff9f721ee07b331ba8e1f56e5a35d00ab541e3
[ "ISC" ]
5
2019-04-19T05:15:08.000Z
2022-03-15T07:18:18.000Z
git_hashes.py
shakthimaan/ocaml_bench_scripts
2aff9f721ee07b331ba8e1f56e5a35d00ab541e3
[ "ISC" ]
5
2020-03-26T15:39:36.000Z
2020-09-09T08:06:12.000Z
git_hashes.py
shakthimaan/ocaml_bench_scripts
2aff9f721ee07b331ba8e1f56e5a35d00ab541e3
[ "ISC" ]
3
2020-02-18T10:44:51.000Z
2020-05-20T10:42:37.000Z
# Python module for getting git commits from the command line args import datetime import os import subprocess import sys def parseISO8601Likedatetime(s): return datetime.datetime.strptime(s, "%Y-%m-%d %H:%M:%S %z") def get_git_hashes(args): def shell_exec(cmd, verbose=args.verbose, check=False, stdout=None, stder...
39.77305
166
0.697753
import datetime import os import subprocess import sys def parseISO8601Likedatetime(s): return datetime.datetime.strptime(s, "%Y-%m-%d %H:%M:%S %z") def get_git_hashes(args): def shell_exec(cmd, verbose=args.verbose, check=False, stdout=None, stderr=None): if verbose: print('+ %s'%cmd) return subprocess.ru...
true
true
f74846e53d3858bee12120b286f804602a94047b
10,026
py
Python
src/ansible_navigator/ui_framework/colorize.py
ekmixon/ansible-navigator
9903d82ac76a4aee61a64c2e5f19f5ccca3cf136
[ "Apache-2.0", "MIT" ]
134
2021-03-26T17:44:49.000Z
2022-03-31T13:15:52.000Z
src/ansible_navigator/ui_framework/colorize.py
cidrblock/ansible-navigator
674e5edce4d4181e6f79b6f24b590a347156665d
[ "Apache-2.0", "MIT" ]
631
2021-03-26T19:38:32.000Z
2022-03-31T22:57:36.000Z
src/ansible_navigator/ui_framework/colorize.py
cidrblock/ansible-navigator
674e5edce4d4181e6f79b6f24b590a347156665d
[ "Apache-2.0", "MIT" ]
48
2021-03-26T17:44:29.000Z
2022-03-08T21:12:26.000Z
"""Tokenize and color text """ import json import logging import os import re import colorsys import curses import functools from itertools import chain from .curses_defs import CursesLine from .curses_defs import CursesLinePart from ..tm_tokenize.grammars import Grammars from ..tm_tokenize.tokenize import tokeniz...
31.828571
100
0.524835
import json import logging import os import re import colorsys import curses import functools from itertools import chain from .curses_defs import CursesLine from .curses_defs import CursesLinePart from ..tm_tokenize.grammars import Grammars from ..tm_tokenize.tokenize import tokenize CURSES_STYLES = { 0: No...
true
true
f748479f93b5b3d0f3f4478d325c28392464ed7e
4,255
py
Python
services/pipeline/emission/tests/analysisTests/configTests/TestSaveAllConfigs.py
e-mission/e-mission-ng-aggregator
0ce43b93192459ac1864b8e88e96b83ea0929aa2
[ "BSD-3-Clause-Clear", "BSD-3-Clause" ]
21
2015-02-09T00:35:17.000Z
2021-12-14T16:41:05.000Z
services/pipeline/emission/tests/analysisTests/configTests/TestSaveAllConfigs.py
e-mission/e-mission-ng-aggregator
0ce43b93192459ac1864b8e88e96b83ea0929aa2
[ "BSD-3-Clause-Clear", "BSD-3-Clause" ]
672
2015-01-29T18:10:56.000Z
2022-03-24T13:04:51.000Z
services/pipeline/emission/tests/analysisTests/configTests/TestSaveAllConfigs.py
e-mission/e-mission-ng-aggregator
0ce43b93192459ac1864b8e88e96b83ea0929aa2
[ "BSD-3-Clause-Clear", "BSD-3-Clause" ]
110
2015-01-29T18:11:10.000Z
2022-03-29T17:58:14.000Z
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import # Standard imports from future import standard_library standard_library.install_aliases() from builtins import * import unittest import datetime as pydt import logging imp...
42.55
128
0.678496
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from builtins import * import unittest import datetime as pydt import logging import json import co...
true
true
f74848023acc6c37c2ff7c5db0c53a7377777d9b
15,258
py
Python
google/cloud/gaming/v1beta/gaming-v1beta-py/google/cloud/gaming_v1beta/types/common.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
7
2021-02-21T10:39:41.000Z
2021-12-07T07:31:28.000Z
google/cloud/gaming/v1beta/gaming-v1beta-py/google/cloud/gaming_v1beta/types/common.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
6
2021-02-02T23:46:11.000Z
2021-11-15T01:46:02.000Z
google/cloud/gaming/v1beta/gaming-v1beta-py/google/cloud/gaming_v1beta/types/common.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...
30.824242
114
0.589068
import proto from google.protobuf import duration_pb2 from google.protobuf import timestamp_pb2 __protobuf__ = proto.module( package='google.cloud.gaming.v1beta', manifest={ 'OperationMetadata', 'OperationStatus', 'LabelSelector', 'RealmSelector', ...
true
true
f7484a209c004713d68e7062c4d57d75e32af0d8
858
py
Python
infer_resnet_action_recognition.py
Ikomia-dev/infer_resnet_action_recognition
ddd5b4758bc3a1276fe9ef25237b1811801b80aa
[ "MIT" ]
null
null
null
infer_resnet_action_recognition.py
Ikomia-dev/infer_resnet_action_recognition
ddd5b4758bc3a1276fe9ef25237b1811801b80aa
[ "MIT" ]
null
null
null
infer_resnet_action_recognition.py
Ikomia-dev/infer_resnet_action_recognition
ddd5b4758bc3a1276fe9ef25237b1811801b80aa
[ "MIT" ]
null
null
null
from ikomia import dataprocess # -------------------- # - Interface class to integrate the process with Ikomia application # - Inherits dataprocess.CPluginProcessInterface from Ikomia API # -------------------- class IkomiaPlugin(dataprocess.CPluginProcessInterface): def __init__(self): dataprocess.CPlug...
39
127
0.765734
from ikomia import dataprocess class IkomiaPlugin(dataprocess.CPluginProcessInterface): def __init__(self): dataprocess.CPluginProcessInterface.__init__(self) def getProcessFactory(self): from infer_resnet_action_recognition.infer_resnet_action_recognition_process import ResNetActionReco...
true
true
f7484a5d9e67a1bd07eaefc9f0887138c2e914db
379
py
Python
final/src/problem1_b2/__init__2.py
jmnel/combinatorial-optimization
c921dee6cb0febc47a8a791f8220b02b35caf0cf
[ "MIT" ]
null
null
null
final/src/problem1_b2/__init__2.py
jmnel/combinatorial-optimization
c921dee6cb0febc47a8a791f8220b02b35caf0cf
[ "MIT" ]
null
null
null
final/src/problem1_b2/__init__2.py
jmnel/combinatorial-optimization
c921dee6cb0febc47a8a791f8220b02b35caf0cf
[ "MIT" ]
null
null
null
import settings from . import model_params from .task import Task from pprint import pprint from .adj_graph import draw_adj_graph pprint(Task.all()[-1].predecessors) arcs = [[1 if p in t.predecessors else 0 for p in range(len(Task.all()))] for t in Task.all()] draw_adj_graph(arcs, filename='fi...
25.266667
73
0.688654
import settings from . import model_params from .task import Task from pprint import pprint from .adj_graph import draw_adj_graph pprint(Task.all()[-1].predecessors) arcs = [[1 if p in t.predecessors else 0 for p in range(len(Task.all()))] for t in Task.all()] draw_adj_graph(arcs, filename='fi...
true
true
f7484ac712084022603734057759933aaebf0ce6
783
py
Python
tests/test_mpi_adam.py
757670303037/stable-baselines
91ac2e82dca3961ecd9d239427a095a21ba85674
[ "MIT" ]
3,681
2018-07-02T16:07:58.000Z
2022-03-31T12:29:00.000Z
tests/test_mpi_adam.py
757670303037/stable-baselines
91ac2e82dca3961ecd9d239427a095a21ba85674
[ "MIT" ]
1,088
2018-07-09T11:36:45.000Z
2022-03-31T23:50:35.000Z
tests/test_mpi_adam.py
757670303037/stable-baselines
91ac2e82dca3961ecd9d239427a095a21ba85674
[ "MIT" ]
910
2018-07-23T12:16:47.000Z
2022-03-28T09:39:06.000Z
import subprocess import pytest from .test_common import _assert_eq def test_mpi_adam(): """Test RunningMeanStd object for MPI""" # Test will be run in CI before pytest is run pytest.skip() return_code = subprocess.call(['mpirun', '--allow-run-as-root', '-np', '2', ...
31.32
87
0.588761
import subprocess import pytest from .test_common import _assert_eq def test_mpi_adam(): pytest.skip() return_code = subprocess.call(['mpirun', '--allow-run-as-root', '-np', '2', 'python', '-m', 'stable_baselines.common.mpi_adam']) _assert_eq(return_code, 0) def...
true
true
f7484b0e20f53dc98fb22cc5b72e7f00d58ab1ed
60
py
Python
pizza/test/__init__.py
cjerdonek/groome-python-expected
33c8963fc295045554b3a6f7afa9010957b2fd23
[ "Unlicense" ]
1
2015-05-05T19:17:19.000Z
2015-05-05T19:17:19.000Z
pizza/test/__init__.py
cjerdonek/groome-python-expected
33c8963fc295045554b3a6f7afa9010957b2fd23
[ "Unlicense" ]
null
null
null
pizza/test/__init__.py
cjerdonek/groome-python-expected
33c8963fc295045554b3a6f7afa9010957b2fd23
[ "Unlicense" ]
null
null
null
""" This package contains tests and test-support code. """
12
50
0.7
true
true
f7484ba056993b5fbbed1bd484f57c3394676068
4,973
py
Python
python/modules/approximateField.py
KolCrooks/bisweb
2ec0abb1ceafc3d63ca2c82222d546386319e29a
[ "Apache-2.0" ]
null
null
null
python/modules/approximateField.py
KolCrooks/bisweb
2ec0abb1ceafc3d63ca2c82222d546386319e29a
[ "Apache-2.0" ]
null
null
null
python/modules/approximateField.py
KolCrooks/bisweb
2ec0abb1ceafc3d63ca2c82222d546386319e29a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # LICENSE # # _This file is Copyright 2018 by the Image Processing and Analysis Group (BioImage Suite Team). Dept. of Radiology & Biomedical Imaging, Yale School of Medicine._ # # BioImage Suite Web is licensed under the Apache License, Version 2.0 (the "License"); # # - you may not u...
35.021127
164
0.634828
import bis_path import sys import math import numpy as np import argparse import bis_basemodule import bis_objects import modules_desc; import biswrapper as libbis; class approximateField(bis_basemodule.baseModule): def __init__(self): super().__init__(); sel...
true
true
f7484bf91456c27d29a18360fd7c53f39ea9e660
14,545
py
Python
glance_store/tests/unit/test_cinder_store.py
qweraqq/glance_store
8099db255da607b8dd46990a8c1971849fde5f3a
[ "Apache-2.0" ]
null
null
null
glance_store/tests/unit/test_cinder_store.py
qweraqq/glance_store
8099db255da607b8dd46990a8c1971849fde5f3a
[ "Apache-2.0" ]
null
null
null
glance_store/tests/unit/test_cinder_store.py
qweraqq/glance_store
8099db255da607b8dd46990a8c1971849fde5f3a
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 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...
44.480122
78
0.604606
import contextlib import errno import hashlib import mock import os import six import socket import tempfile import time import uuid from os_brick.initiator import connector from oslo_concurrency import processutils from oslo_utils import units from glance_store._drivers import cinder from glance_store...
true
true
f7484bf979c8391ee9b3a935fa160c405969d3a3
3,364
py
Python
airflow/migrations/versions/03afc6b6f902_increase_length_of_fab_ab_view_menu_.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
15,947
2019-01-05T13:51:02.000Z
2022-03-31T23:33:16.000Z
airflow/migrations/versions/03afc6b6f902_increase_length_of_fab_ab_view_menu_.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
14,603
2019-01-05T09:43:19.000Z
2022-03-31T23:11:59.000Z
airflow/migrations/versions/03afc6b6f902_increase_length_of_fab_ab_view_menu_.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
8,429
2019-01-05T19:45:47.000Z
2022-03-31T22:13:01.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
35.041667
106
0.63912
import sqlalchemy as sa from alembic import op from sqlalchemy.engine.reflection import Inspector from airflow.models.base import COLLATION_ARGS revision = '03afc6b6f902' down_revision = '92c57b58940d' branch_labels = None depends_on = None def upgrade(): conn = op.get_bind() inspector =...
true
true
f7484cde516086184a56582ac4153e0f225cef86
8,070
py
Python
non_semantic_speech_benchmark/export_model/tflite_conversion.py
xjdrlabs/google-research
77228d842da67759f9b42b696ec43d5165cfd297
[ "Apache-2.0" ]
1
2021-07-24T06:54:21.000Z
2021-07-24T06:54:21.000Z
non_semantic_speech_benchmark/export_model/tflite_conversion.py
Pragalbhmandaokar/google-research
f753c392312d4ca1437f80dc9592b6c1461e63a0
[ "Apache-2.0" ]
null
null
null
non_semantic_speech_benchmark/export_model/tflite_conversion.py
Pragalbhmandaokar/google-research
f753c392312d4ca1437f80dc9592b6c1461e63a0
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
38.798077
100
0.735564
import os from absl import app from absl import flags from absl import logging import numpy as np import tensorflow as tf from non_semantic_speech_benchmark.data_prep import audio_to_embeddings_beam_utils from non_semantic_speech_benchmark.distillation import models from non_semantic_speech_benchma...
true
true
f7484d8833af2947098c8dcabd0be3544300f6f7
5,755
py
Python
pysnmp/TIMETRA-SAS-IEEE8021-CFM-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/TIMETRA-SAS-IEEE8021-CFM-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/TIMETRA-SAS-IEEE8021-CFM-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module TIMETRA-SAS-IEEE8021-CFM-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/TIMETRA-SAS-IEEE8021-CFM-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 21:14:14 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python vers...
119.895833
952
0.783493
OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, SingleValueConstraint, ValueRangeConstraint, ConstraintsIntersection, ValueSizeConstraint = mibBuild...
true
true
f7484dd700656db64a7b3a390dc950a942461ab0
4,328
py
Python
library/f5bigip_sys_snmp_community.py
erjac77/ansible-role-f5
c45b5d9d5f34a8ac6d19ded836d0a6b7ee7f8056
[ "Apache-2.0" ]
1
2020-02-21T06:48:14.000Z
2020-02-21T06:48:14.000Z
library/f5bigip_sys_snmp_community.py
erjac77/ansible-role-f5
c45b5d9d5f34a8ac6d19ded836d0a6b7ee7f8056
[ "Apache-2.0" ]
null
null
null
library/f5bigip_sys_snmp_community.py
erjac77/ansible-role-f5
c45b5d9d5f34a8ac6d19ded836d0a6b7ee7f8056
[ "Apache-2.0" ]
1
2021-03-29T03:55:34.000Z
2021-03-29T03:55:34.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2016 Eric Jacob <erjac77@gmail.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 #...
31.362319
120
0.67329
ANSIBLE_METADATA = { "metadata_version": "1.1", "status": ["preview"], "supported_by": "community", } DOCUMENTATION = """ --- module: f5bigip_sys_snmp_community short_description: BIG-IP sys snmp community module description: - Configures the simple network management protocol (SNMP) c...
true
true
f7484e3b33d7e6a31225509338ccb6fabead2989
160
py
Python
pyaww/__init__.py
ammarsys/pyanywhere-wrapper
d8cde2d29900c25fc7ab3cd8103923f727b5dade
[ "MIT" ]
5
2021-06-25T14:34:52.000Z
2021-07-04T14:15:13.000Z
pyaww/__init__.py
ammarsys/pyanywhere-wrapper
d8cde2d29900c25fc7ab3cd8103923f727b5dade
[ "MIT" ]
1
2021-12-12T00:47:25.000Z
2022-01-24T17:19:43.000Z
pyaww/__init__.py
ammarsys/pyanywhere-wrapper
d8cde2d29900c25fc7ab3cd8103923f727b5dade
[ "MIT" ]
1
2021-12-14T15:44:52.000Z
2021-12-14T15:44:52.000Z
from pyaww import ( always_on_task, console, file, sched_task, static_header, static_file, user, webapp ) __version__ = '0.0.3'
13.333333
21
0.6125
from pyaww import ( always_on_task, console, file, sched_task, static_header, static_file, user, webapp ) __version__ = '0.0.3'
true
true
f748503c664aae55110b81923f6b0443f9ec71e7
69
py
Python
EKV_Adjustment.py
aitordelrivero/MScThesisAdRC_AnnexI
28f2c59592adb336d1f400403d67253a86ba4c1a
[ "Unlicense" ]
null
null
null
EKV_Adjustment.py
aitordelrivero/MScThesisAdRC_AnnexI
28f2c59592adb336d1f400403d67253a86ba4c1a
[ "Unlicense" ]
null
null
null
EKV_Adjustment.py
aitordelrivero/MScThesisAdRC_AnnexI
28f2c59592adb336d1f400403d67253a86ba4c1a
[ "Unlicense" ]
null
null
null
#This file is only available to the lab members in the internal Wiki
34.5
68
0.797101
true
true
f74851875e16f4915513ece2bc4c9f99af1154d5
2,728
py
Python
metrics/sum_uniformity_primer.py
alces-flight/qiaseq-dna
16e01500b9e12f63d8e82dd4a7ab02129c17e860
[ "MIT" ]
null
null
null
metrics/sum_uniformity_primer.py
alces-flight/qiaseq-dna
16e01500b9e12f63d8e82dd4a7ab02129c17e860
[ "MIT" ]
null
null
null
metrics/sum_uniformity_primer.py
alces-flight/qiaseq-dna
16e01500b9e12f63d8e82dd4a7ab02129c17e860
[ "MIT" ]
null
null
null
#------------------------------------------------------------------------------------------ def getUniformityMetrics(depths): # get total cumulative depth depthTotal = sum(depths) # if zero depth at all primers/sites, return zeros if depthTotal == 0: outvec = [0] * 5 retur...
35.428571
157
0.530059
def getUniformityMetrics(depths): depthTotal = sum(depths) if depthTotal == 0: outvec = [0] * 5 return tuple(outvec) depths.sort() depthMean = 1.00 * depthTotal / len(depths) pctGtVec = [] for pct in (5.0, 10.0, 20.0...
true
true
f74851bd0e6c64bdc59e2f4db1b02b6d1ad3b6b8
125,665
py
Python
test/orm/test_joins.py
gujun4990/sqlalchemy
057bae2295feb86529a04f09cd2f3d4c2c6d88a8
[ "MIT" ]
1
2018-11-15T16:02:17.000Z
2018-11-15T16:02:17.000Z
test/orm/test_joins.py
gujun4990/sqlalchemy
057bae2295feb86529a04f09cd2f3d4c2c6d88a8
[ "MIT" ]
null
null
null
test/orm/test_joins.py
gujun4990/sqlalchemy
057bae2295feb86529a04f09cd2f3d4c2c6d88a8
[ "MIT" ]
null
null
null
from sqlalchemy.testing import eq_, assert_raises, assert_raises_message import operator from sqlalchemy import * from sqlalchemy import exc as sa_exc, util from sqlalchemy.sql import compiler, table, column from sqlalchemy.engine import default from sqlalchemy.orm import * from sqlalchemy.orm import attributes from s...
38.35928
81
0.563188
from sqlalchemy.testing import eq_, assert_raises, assert_raises_message import operator from sqlalchemy import * from sqlalchemy import exc as sa_exc, util from sqlalchemy.sql import compiler, table, column from sqlalchemy.engine import default from sqlalchemy.orm import * from sqlalchemy.orm import attributes from s...
true
true
f74851e10772b160a568381ee238b6ed99634783
10,079
py
Python
Project_2/bricka/breakout.py
ElchinValiyev/GameAI
bae8fcdeeb9b1362179ec0d9d9e12a64d68f0a5e
[ "MIT" ]
null
null
null
Project_2/bricka/breakout.py
ElchinValiyev/GameAI
bae8fcdeeb9b1362179ec0d9d9e12a64d68f0a5e
[ "MIT" ]
null
null
null
Project_2/bricka/breakout.py
ElchinValiyev/GameAI
bae8fcdeeb9b1362179ec0d9d9e12a64d68f0a5e
[ "MIT" ]
null
null
null
# Add mouse controls # add half size paddle after hitting back wall import math, pygame, sys, shutil, getpass from pygame.locals import * pygame.init() fpsClock = pygame.time.Clock() screen = pygame.display.set_mode((640, 480)) # create screen - 640 pix by 480 pix pygame.display.set_caption('Breakout') # set title ...
34.282313
109
0.481595
import math, pygame, sys, shutil, getpass from pygame.locals import * pygame.init() fpsClock = pygame.time.Clock() screen = pygame.display.set_mode((640, 480)) pygame.display.set_caption('Breakout') try: fontObj = pygame.font.Font('PressStart2P.ttf', 36) except: fontObj = pygame.font.Font('freesansbol...
true
true
f748537543380c15854b84b7a82bbb60bb20dd66
257
py
Python
.history/my_classes/ScopesClosuresAndDecorators/Closures_20210711165644.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
.history/my_classes/ScopesClosuresAndDecorators/Closures_20210711165644.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
.history/my_classes/ScopesClosuresAndDecorators/Closures_20210711165644.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
""" Closuers Free variables and closures Remember: Functions defined inside another function can access the outer (nonLocal) variables """ def outer(): x = 'python' def inner(): print("{0} rocks!".format(x))
18.357143
93
0.59144
def outer(): x = 'python' def inner(): print("{0} rocks!".format(x))
true
true
f74853fbea4c1606929b10df6a0c750543284611
4,039
py
Python
temp/src/TF_publisher.py
wvu-irl/smart-2
b39b6d477b5259b3bf0d96180a154ee1dafae0ac
[ "MIT" ]
null
null
null
temp/src/TF_publisher.py
wvu-irl/smart-2
b39b6d477b5259b3bf0d96180a154ee1dafae0ac
[ "MIT" ]
null
null
null
temp/src/TF_publisher.py
wvu-irl/smart-2
b39b6d477b5259b3bf0d96180a154ee1dafae0ac
[ "MIT" ]
null
null
null
#!/usr/bin/env python import rospy import numpy as np from sensor_msgs.msg import Image from std_msgs.msg import String import math import tf import sys from localization.msg import Marker from tf import transformations as t class TF_marker_publisher(): def __init__(self): rospy.init_node("TF_marker_publ...
48.662651
146
0.643971
import rospy import numpy as np from sensor_msgs.msg import Image from std_msgs.msg import String import math import tf import sys from localization.msg import Marker from tf import transformations as t class TF_marker_publisher(): def __init__(self): rospy.init_node("TF_marker_publisher",anonymous=True...
true
true
f74854a9fcfa236fe6d03a42714cfbe75f51c89c
1,999
py
Python
cpp/src/tools/scons/scons-local-1.2.0.d20090223/SCons/Options/BoolOption.py
nawien-sharma/keyczar
c55563bbd70f4b6fefc7444e296aab9894475f9a
[ "Apache-2.0" ]
30
2015-01-29T14:06:05.000Z
2022-01-10T07:47:29.000Z
cpp/src/tools/scons/scons-local-1.2.0.d20090223/SCons/Options/BoolOption.py
nawien-sharma/keyczar
c55563bbd70f4b6fefc7444e296aab9894475f9a
[ "Apache-2.0" ]
1
2017-02-20T20:57:48.000Z
2018-12-19T23:44:38.000Z
cpp/src/tools/scons/scons-local-1.2.0.d20090223/SCons/Options/BoolOption.py
nawien-sharma/keyczar
c55563bbd70f4b6fefc7444e296aab9894475f9a
[ "Apache-2.0" ]
15
2015-04-23T02:38:36.000Z
2021-03-01T20:09:39.000Z
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitati...
39.196078
97
0.757379
__revision__ = "src/engine/SCons/Options/BoolOption.py 4043 2009/02/23 09:06:45 scons" __doc__ = """Place-holder for the old SCons.Options module hierarchy This is for backwards compatibility. The new equivalent is the Variables/ class hierarchy. These will have deprecation warnings added (so...
true
true
f74854e2e2b58f45cf1f882bd37fb6d18c51a447
2,510
py
Python
src/layers.py
edmundwsy/IEEE-RAS-slam-winter-school-project-9
da94c5e08acd4efc90b4061871f6afe31e6268b3
[ "MIT" ]
2
2021-07-14T13:17:45.000Z
2021-07-27T10:58:37.000Z
src/layers.py
edmundwsy/IEEE-RAS-slam-winter-school-project-9
da94c5e08acd4efc90b4061871f6afe31e6268b3
[ "MIT" ]
null
null
null
src/layers.py
edmundwsy/IEEE-RAS-slam-winter-school-project-9
da94c5e08acd4efc90b4061871f6afe31e6268b3
[ "MIT" ]
3
2021-06-07T09:59:43.000Z
2021-07-22T18:38:57.000Z
from keras.engine.topology import Layer, InputSpec import keras.utils.conv_utils as conv_utils import tensorflow as tf import keras.backend as K def normalize_data_format(value): if value is None: value = K.image_data_format() data_format = value.lower() if data_format not in {'channels_first', 'ch...
45.636364
94
0.623108
from keras.engine.topology import Layer, InputSpec import keras.utils.conv_utils as conv_utils import tensorflow as tf import keras.backend as K def normalize_data_format(value): if value is None: value = K.image_data_format() data_format = value.lower() if data_format not in {'channels_first', 'ch...
true
true
f74856d540616156095d4c36b22fb0528ea5e8dd
1,233
py
Python
Data Scientist Career Path/8. Hypothesis Testing/3. Experimental Design/2. Simulation/4. estimate.py
myarist/Codecademy
2ba0f104bc67ab6ef0f8fb869aa12aa02f5f1efb
[ "MIT" ]
23
2021-06-06T15:35:55.000Z
2022-03-21T06:53:42.000Z
Data Scientist Career Path/8. Hypothesis Testing/3. Experimental Design/2. Simulation/4. estimate.py
shivaniverma1/Data-Scientist
f82939a411484311171465591455880c8e354750
[ "MIT" ]
null
null
null
Data Scientist Career Path/8. Hypothesis Testing/3. Experimental Design/2. Simulation/4. estimate.py
shivaniverma1/Data-Scientist
f82939a411484311171465591455880c8e354750
[ "MIT" ]
9
2021-06-08T01:32:04.000Z
2022-03-18T15:38:09.000Z
import numpy as np import pandas as pd from scipy.stats import chi2_contingency # preset values significance_threshold = 0.05 sample_size = 100 lift = .3 control_rate = .5 name_rate = (1 + lift) * control_rate # initialize an empty list of results results = [] # start the loop for i in range(100): # simulate data:...
33.324324
110
0.729116
import numpy as np import pandas as pd from scipy.stats import chi2_contingency significance_threshold = 0.05 sample_size = 100 lift = .3 control_rate = .5 name_rate = (1 + lift) * control_rate results = [] for i in range(100): sample_control = np.random.choice(['yes', 'no'], size=int(sample_size/2), p=[con...
true
true
f74856f19a10a7bc9954dce3eade4b180a5e5ab1
10,348
py
Python
django_project/virtualornithology/timelines/filtering.py
carnby/aurora
f31e3de28694fd5763643d90ee91e99a55d4ec97
[ "MIT" ]
8
2016-02-25T13:48:10.000Z
2020-06-06T07:23:30.000Z
django_project/virtualornithology/timelines/filtering.py
carnby/aurora
f31e3de28694fd5763643d90ee91e99a55d4ec97
[ "MIT" ]
null
null
null
django_project/virtualornithology/timelines/filtering.py
carnby/aurora
f31e3de28694fd5763643d90ee91e99a55d4ec97
[ "MIT" ]
2
2016-03-07T11:54:59.000Z
2020-06-06T07:23:31.000Z
from collections import Counter import numpy as np import random import math import difflib class TimelineFilter(object): def __init__(self, characterizer, skip_fields=None, max_entropy_percentile=100.0, time_bucket_size=10, start_strategy=None, pick_strategy=None, approve_tweet_fn=None, ...
36.055749
161
0.589486
from collections import Counter import numpy as np import random import math import difflib class TimelineFilter(object): def __init__(self, characterizer, skip_fields=None, max_entropy_percentile=100.0, time_bucket_size=10, start_strategy=None, pick_strategy=None, approve_tweet_fn=None, ...
true
true
f748579d799b9ebf30c6be0a557f71c631409362
21,858
py
Python
swift/common/memcached.py
kalrey/swift
8d02147d04a41477383de8e13bea6ac3fd2cade0
[ "Apache-2.0" ]
1
2015-09-12T08:05:49.000Z
2015-09-12T08:05:49.000Z
swift/common/memcached.py
kalrey/swift
8d02147d04a41477383de8e13bea6ac3fd2cade0
[ "Apache-2.0" ]
null
null
null
swift/common/memcached.py
kalrey/swift
8d02147d04a41477383de8e13bea6ac3fd2cade0
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2010-2012 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 or agree...
41.71374
79
0.559658
import cPickle as pickle import logging import time from bisect import bisect from swift import gettext_ as _ from hashlib import md5 from distutils.version import StrictVersion from eventlet.green import socket from eventlet.pools import Pool from eventlet import Timeout, __version__ as eventlet_versi...
true
true
f748588ce59c6a1fede78b78fce17d391ddd2581
3,264
py
Python
Crickits/mag_neat_o/magneato.py
joewalk102/Adafruit_Learning_System_Guides
2bda607f8c433c661a2d9d40b4db4fd132334c9a
[ "MIT" ]
665
2017-09-27T21:20:14.000Z
2022-03-31T09:09:25.000Z
Crickits/mag_neat_o/magneato.py
joewalk102/Adafruit_Learning_System_Guides
2bda607f8c433c661a2d9d40b4db4fd132334c9a
[ "MIT" ]
641
2017-10-03T19:46:37.000Z
2022-03-30T18:28:46.000Z
Crickits/mag_neat_o/magneato.py
joewalk102/Adafruit_Learning_System_Guides
2bda607f8c433c661a2d9d40b4db4fd132334c9a
[ "MIT" ]
734
2017-10-02T22:47:38.000Z
2022-03-30T14:03:51.000Z
import time from busio import I2C from adafruit_seesaw.seesaw import Seesaw from adafruit_seesaw.pwmout import PWMOut from adafruit_motor import motor, servo from digitalio import DigitalInOut, Direction, Pull import board print("Mag Neat-o!") # Create seesaw object i2c = I2C(board.SCL, board.SDA) seesaw = Seesaw(i2c...
28.137931
73
0.621936
import time from busio import I2C from adafruit_seesaw.seesaw import Seesaw from adafruit_seesaw.pwmout import PWMOut from adafruit_motor import motor, servo from digitalio import DigitalInOut, Direction, Pull import board print("Mag Neat-o!") i2c = I2C(board.SCL, board.SDA) seesaw = Seesaw(i2c) motor_a = motor.DC...
true
true
f748596e3fc15bf03680a861f94c3f0e8e083983
4,491
py
Python
application/views.py
Iurii-Dziuban/django-sandbox
b1c014ce0f70a3d98b5e2532bd751d6964ee5bd5
[ "MIT" ]
null
null
null
application/views.py
Iurii-Dziuban/django-sandbox
b1c014ce0f70a3d98b5e2532bd751d6964ee5bd5
[ "MIT" ]
null
null
null
application/views.py
Iurii-Dziuban/django-sandbox
b1c014ce0f70a3d98b5e2532bd751d6964ee5bd5
[ "MIT" ]
null
null
null
import json import threading from django.http import HttpResponse from django.shortcuts import render, get_object_or_404 from django.utils import timezone from django.db.models import F from application.app_constants import EVENT_CATEGORIES from application.models import LikedEvent, User, Journey, Category, UserRank ...
30.344595
99
0.720107
import json import threading from django.http import HttpResponse from django.shortcuts import render, get_object_or_404 from django.utils import timezone from django.db.models import F from application.app_constants import EVENT_CATEGORIES from application.models import LikedEvent, User, Journey, Category, UserRank ...
true
true
f7485aa3356f5ee3c81facd849d2e64de16db1f1
3,097
py
Python
plugins/polio/preparedness/client.py
BLSQ/iaso
95c8087c0182bdd576598eb8cd39c440e58e15d7
[ "MIT" ]
29
2020-12-26T07:22:19.000Z
2022-03-07T13:40:09.000Z
plugins/polio/preparedness/client.py
BLSQ/iaso
95c8087c0182bdd576598eb8cd39c440e58e15d7
[ "MIT" ]
150
2020-11-09T15:03:27.000Z
2022-03-07T15:36:07.000Z
plugins/polio/preparedness/client.py
BLSQ/iaso
95c8087c0182bdd576598eb8cd39c440e58e15d7
[ "MIT" ]
4
2020-11-09T10:38:13.000Z
2021-10-04T09:42:47.000Z
import base64 import json import os import time from datetime import datetime, timedelta from logging import getLogger import gspread from gspread import Client from gspread.exceptions import APIError from oauth2client.service_account import ServiceAccountCredentials logger = getLogger(__name__) DIRNAME = os.path.d...
32.6
115
0.661608
import base64 import json import os import time from datetime import datetime, timedelta from logging import getLogger import gspread from gspread import Client from gspread.exceptions import APIError from oauth2client.service_account import ServiceAccountCredentials logger = getLogger(__name__) DIRNAME = os.path.d...
true
true
f7485adc0a68b82262184ee2151691b5a2ee01ac
3,753
py
Python
FullSubmission/Task #2/Source Code/Method II/TL/TransportLayer.py
KrishnKher/CS3543-Project-I
2854e14c85e083cc786a82bacd301962c1fa96bc
[ "MIT" ]
null
null
null
FullSubmission/Task #2/Source Code/Method II/TL/TransportLayer.py
KrishnKher/CS3543-Project-I
2854e14c85e083cc786a82bacd301962c1fa96bc
[ "MIT" ]
null
null
null
FullSubmission/Task #2/Source Code/Method II/TL/TransportLayer.py
KrishnKher/CS3543-Project-I
2854e14c85e083cc786a82bacd301962c1fa96bc
[ "MIT" ]
null
null
null
import socket import logging import time import threading import sys class RDT: CONGESTION_AVOIDANCE = -1 SLOW_START = 0 FAST_RECOVERY = 1 def __init__(self): self.MSS = 2048 self.N = 100 # Window size. self.RTO = 0.75 # Timeout (secs). self.connection = False ...
29.785714
83
0.51239
import socket import logging import time import threading import sys class RDT: CONGESTION_AVOIDANCE = -1 SLOW_START = 0 FAST_RECOVERY = 1 def __init__(self): self.MSS = 2048 self.N = 100 self.RTO = 0.75 self.connection = False self.ACK = {} self.lo...
true
true
f7485bcb3c35dac73c15cb1d1cea343b0c7c461c
135
py
Python
tests/conftest.py
stfl/backtestd.py
cc776abfaa2f403d2897e14f3486c3976baafb80
[ "MIT" ]
null
null
null
tests/conftest.py
stfl/backtestd.py
cc776abfaa2f403d2897e14f3486c3976baafb80
[ "MIT" ]
null
null
null
tests/conftest.py
stfl/backtestd.py
cc776abfaa2f403d2897e14f3486c3976baafb80
[ "MIT" ]
null
null
null
"""Integration tests configuration file.""" # pylint: disable=unused-import from backtestd.py.tests.conftest import pytest_configure
22.5
56
0.8
from backtestd.py.tests.conftest import pytest_configure
true
true
f7485bf12e13dfc689f6d8fd9b7c359d91e3203d
3,140
py
Python
tools/wifi_connection_check.py
fito-jaeuklee/ESP32_LOCAL_OTA_SERVER
8e0d7832e300893ed227b04044991d21f9a9faea
[ "Apache-2.0" ]
null
null
null
tools/wifi_connection_check.py
fito-jaeuklee/ESP32_LOCAL_OTA_SERVER
8e0d7832e300893ed227b04044991d21f9a9faea
[ "Apache-2.0" ]
null
null
null
tools/wifi_connection_check.py
fito-jaeuklee/ESP32_LOCAL_OTA_SERVER
8e0d7832e300893ed227b04044991d21f9a9faea
[ "Apache-2.0" ]
null
null
null
import os import platform import getpass # from core import * # import pyping import subprocess import time def createNewConnection(name, SSID, key): config = """<?xml version=\"1.0\"?> <WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1"> <name>"""+name+"""</name> <SSIDConfig> ...
34.505495
97
0.57293
import os import platform import getpass import subprocess import time def createNewConnection(name, SSID, key): config = """<?xml version=\"1.0\"?> <WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1"> <name>"""+name+"""</name> <SSIDConfig> <SSID> <name>"""+SSID+"...
true
true
f7485c3f7c9e1065f163d2b8827b167e7fc9eadc
51,002
py
Python
venv/Lib/site-packages/numpy/core/tests/test_indexing.py
unbun/snake.ai
0c017357608dc7c06af0ca3ca57d870641461207
[ "MIT" ]
6,989
2017-07-18T06:23:18.000Z
2022-03-31T15:58:36.000Z
venv/Lib/site-packages/numpy/core/tests/test_indexing.py
unbun/snake.ai
0c017357608dc7c06af0ca3ca57d870641461207
[ "MIT" ]
1,978
2017-07-18T09:17:58.000Z
2022-03-31T14:28:43.000Z
venv/Lib/site-packages/numpy/core/tests/test_indexing.py
unbun/snake.ai
0c017357608dc7c06af0ca3ca57d870641461207
[ "MIT" ]
1,228
2017-07-18T09:03:13.000Z
2022-03-29T05:57:40.000Z
from __future__ import division, absolute_import, print_function import sys import warnings import functools import operator import pytest import numpy as np from numpy.core._multiarray_tests import array_indexing from itertools import product from numpy.testing import ( assert_, assert_equal, assert_raises, asse...
38.203745
79
0.549096
from __future__ import division, absolute_import, print_function import sys import warnings import functools import operator import pytest import numpy as np from numpy.core._multiarray_tests import array_indexing from itertools import product from numpy.testing import ( assert_, assert_equal, assert_raises, asse...
true
true
f7485ce00b13b16d1c367a1d9061a97aab9c8190
1,239
py
Python
IntroProPython/IntroProPython - exercicios/capitulo 11/exercicio-11-05.py
SweydAbdul/estudos-python
b052708d0566a0afb9a1c04d035467d45f820879
[ "MIT" ]
null
null
null
IntroProPython/IntroProPython - exercicios/capitulo 11/exercicio-11-05.py
SweydAbdul/estudos-python
b052708d0566a0afb9a1c04d035467d45f820879
[ "MIT" ]
null
null
null
IntroProPython/IntroProPython - exercicios/capitulo 11/exercicio-11-05.py
SweydAbdul/estudos-python
b052708d0566a0afb9a1c04d035467d45f820879
[ "MIT" ]
null
null
null
############################################################################## # Parte do livro Introdução à Programação com Python # Autor: Nilo Ney Coutinho Menezes # Editora Novatec (c) 2010-2017 # Primeira edição - Novembro/2010 - ISBN 978-85-7522-250-8 # Primeira reimpressão - Outubro/2011 # Segunda reimpressão - ...
39.967742
78
0.606134
true
true
f7485cef2a7d6e7c391ae99f56c83f8ddce2f3c5
1,494
py
Python
src/appengine/handlers/testcase_detail/mark_fixed.py
urbanenomad/clusterfuzz
b6ed4bf088f24868b8a7c9c1aa568bfadca379b9
[ "Apache-2.0" ]
null
null
null
src/appengine/handlers/testcase_detail/mark_fixed.py
urbanenomad/clusterfuzz
b6ed4bf088f24868b8a7c9c1aa568bfadca379b9
[ "Apache-2.0" ]
null
null
null
src/appengine/handlers/testcase_detail/mark_fixed.py
urbanenomad/clusterfuzz
b6ed4bf088f24868b8a7c9c1aa568bfadca379b9
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 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 agreed to in writing, ...
33.2
74
0.753012
from flask import request from handlers import base_handler_flask from handlers.testcase_detail import show from libs import handler_flask from libs import helpers def mark(testcase): testcase.fixed = 'Yes' testcase.open = False testcase.put() helpers.log('Marked testcase %s as fixed' % testcase...
true
true
f7485d27f464973768d05ddf30f86274afce31af
2,392
py
Python
src/Data/2. AddBridges-SA2.py
mili7522/GGCNN
c0a4cec6dd4d4f8836d2cffd98f5d97d96bea418
[ "MIT" ]
3
2019-03-02T01:24:04.000Z
2022-02-18T01:45:57.000Z
src/Data/2. AddBridges-SA2.py
mili7522/GGCNN
c0a4cec6dd4d4f8836d2cffd98f5d97d96bea418
[ "MIT" ]
null
null
null
src/Data/2. AddBridges-SA2.py
mili7522/GGCNN
c0a4cec6dd4d4f8836d2cffd98f5d97d96bea418
[ "MIT" ]
1
2019-02-28T08:32:10.000Z
2019-02-28T08:32:10.000Z
import pandas as pd import os os.chdir('Data') # Bridges identified using http://stat.abs.gov.au/itt/r.jsp?ABSMaps neighbours = [(117031337,121041417, 'Sydney - Haymarket - The Rocks', 'North Sydney - Lavender Bay'), (121041415, 122011418, 'Mosman', 'Balgowlah - Clontarf - Seaforth'), ...
64.648649
154
0.649666
import pandas as pd import os os.chdir('Data') neighbours = [(117031337,121041417, 'Sydney - Haymarket - The Rocks', 'North Sydney - Lavender Bay'), (121041415, 122011418, 'Mosman', 'Balgowlah - Clontarf - Seaforth'), (121031408, 122031427, 'Lindfield - Roseville', 'Forestville -...
true
true
f7485fd066424ede4f563d0a793586ac6a5a6a02
3,368
py
Python
tests/aquisition/test_measure.py
jvdoorn/SpectrumAnalyzer
264afaa795bd7246da2967d49b176361c454746e
[ "MIT" ]
1
2020-12-29T18:02:04.000Z
2020-12-29T18:02:04.000Z
tests/aquisition/test_measure.py
jvdoorn/SpectrumAnalyzer
264afaa795bd7246da2967d49b176361c454746e
[ "MIT" ]
5
2021-02-07T16:01:48.000Z
2022-03-12T00:51:26.000Z
tests/aquisition/test_measure.py
jvdoorn/SpectrumAnalyzer
264afaa795bd7246da2967d49b176361c454746e
[ "MIT" ]
null
null
null
import unittest import numpy as np from specc.analysis.analyzer import CircuitTester from specc.aquisition.daq import DataAcquisitionInterface from specc.data.results import SignalResponse from tests.utils import ACCEPTABLE_ERROR, TEST_AMPLITUDE, TEST_DF, TEST_FREQUENCY, TEST_SAMPLES, TEST_SAMPLE_RATE class TestDAQ...
38.712644
115
0.684976
import unittest import numpy as np from specc.analysis.analyzer import CircuitTester from specc.aquisition.daq import DataAcquisitionInterface from specc.data.results import SignalResponse from tests.utils import ACCEPTABLE_ERROR, TEST_AMPLITUDE, TEST_DF, TEST_FREQUENCY, TEST_SAMPLES, TEST_SAMPLE_RATE class TestDAQ...
true
true
f74861432bed72662e178ce3757027cdae9ded9b
1,357
py
Python
nseta/common/multithreadedScanner.py
pkjmesra/nseta
28cd8cede465efe9f506a38c5933602c463e5185
[ "MIT" ]
8
2020-10-12T02:59:03.000Z
2022-03-20T15:06:50.000Z
nseta/common/multithreadedScanner.py
webclinic017/nseta
e718c4cf05937456ea10fdd7a911d76ffbc51a2e
[ "MIT" ]
3
2020-10-13T16:30:09.000Z
2021-01-07T23:57:05.000Z
nseta/common/multithreadedScanner.py
webclinic017/nseta
e718c4cf05937456ea10fdd7a911d76ffbc51a2e
[ "MIT" ]
5
2020-10-12T14:57:41.000Z
2021-12-30T11:52:34.000Z
# -*- coding: utf-8 -*- import inspect from nseta.common.commons import * from nseta.common.log import tracelog @tracelog def multithreaded_scan(**args): frame = inspect.currentframe() args, _, _, kwargs_main = inspect.getargvalues(frame) del(kwargs_main['frame']) kwargs = kwargs_main['args'] items_segment =...
32.309524
111
0.67944
import inspect from nseta.common.commons import * from nseta.common.log import tracelog @tracelog def multithreaded_scan(**args): frame = inspect.currentframe() args, _, _, kwargs_main = inspect.getargvalues(frame) del(kwargs_main['frame']) kwargs = kwargs_main['args'] items_segment = kwargs['items'] n...
true
true
f74861a226272e45f15412a9c60ef4336196e688
1,251
py
Python
stomp/__init__.py
AaronDMarasco/stomp.py
22f26087baf6206e531f0418125618bf553b3139
[ "Apache-2.0" ]
null
null
null
stomp/__init__.py
AaronDMarasco/stomp.py
22f26087baf6206e531f0418125618bf553b3139
[ "Apache-2.0" ]
null
null
null
stomp/__init__.py
AaronDMarasco/stomp.py
22f26087baf6206e531f0418125618bf553b3139
[ "Apache-2.0" ]
null
null
null
"""stomp.py provides connectivity to a message broker supporting the STOMP protocol. Protocol versions 1.0, 1.1 and 1.2 are supported. See the GITHUB project page for more information. Author: Jason R Briggs License: http://www.apache.org/licenses/LICENSE-2.0 Project Page: https://github.com/jasonrbriggs/stomp.py ""...
21.20339
84
0.781775
import stomp.adapter as adapter import stomp.connect as connect import stomp.listener as listener import stomp.logging as logging __version__ = (5, 0, 2) Connection10 = connect.StompConnection10 StompConnection10 = Connection10 Connection11 = connect.StompConnection11 StompConnection11 = Connection11 Connect...
true
true
f74861f8df58a7f0c4de559a24c0e7bc14ddfce2
443
py
Python
group_lectures/01_intro/05_plotting.py
mpambasange/MachineLearning
8b813345264513a57934317b01e1311628dc5b01
[ "MIT" ]
16
2016-09-01T08:50:59.000Z
2022-02-15T20:56:07.000Z
group_lectures/01_intro/05_plotting.py
olehermanse/INF3490-PythonAI
8b813345264513a57934317b01e1311628dc5b01
[ "MIT" ]
2
2016-10-20T09:36:19.000Z
2017-08-29T00:28:54.000Z
group_lectures/01_intro/05_plotting.py
olehermanse/INF3490-PythonAI
8b813345264513a57934317b01e1311628dc5b01
[ "MIT" ]
15
2016-10-31T12:30:37.000Z
2021-03-15T12:12:50.000Z
#!/usr/bin/env python3 # author: github.com/olehermanse # import libraries used for plotting and mathematical operations: import numpy as np import matplotlib.pyplot as plt # Define a mathematical expression as a function: def f(x): return x**3 x = np.linspace(-3, 3, 100) # Make array of 100 values between -2 an...
29.533333
80
0.68623
import numpy as np import matplotlib.pyplot as plt def f(x): return x**3 x = np.linspace(-3, 3, 100) plt.plot(x,f(x)) plt.show()
true
true
f7486216cf4671080dce6c5c46c5e41469439d71
1,898
py
Python
src/pyclts/commands/make_pkg.py
XachaB/pyclts
c7420d9c59122210422ae249f00a37284cda98c8
[ "Apache-2.0" ]
6
2020-09-07T20:49:04.000Z
2022-01-23T15:14:26.000Z
src/pyclts/commands/make_pkg.py
XachaB/pyclts
c7420d9c59122210422ae249f00a37284cda98c8
[ "Apache-2.0" ]
43
2019-10-22T06:53:58.000Z
2021-11-18T15:50:18.000Z
src/pyclts/commands/make_pkg.py
XachaB/pyclts
c7420d9c59122210422ae249f00a37284cda98c8
[ "Apache-2.0" ]
2
2019-11-22T10:37:40.000Z
2021-11-01T18:40:07.000Z
""" Prepare transcriptiondata from the transcription sources. """ from uritemplate import URITemplate from clldutils.clilib import ParserError from csvw.dsv import UnicodeWriter from pyclts.commands.make_dataset import process_transcription_data try: from lingpy.sequence.sound_classes import token2class from l...
36.5
88
0.640148
from uritemplate import URITemplate from clldutils.clilib import ParserError from csvw.dsv import UnicodeWriter from pyclts.commands.make_dataset import process_transcription_data try: from lingpy.sequence.sound_classes import token2class from lingpy.data import Model LINGPY = True except ImportError: ...
true
true
f748621e52b61a6b274acb7d6ac75e23cefa65fa
79
py
Python
ptp/components/mixins/__init__.py
tkornut/ptp
50c78c8f03024a71fc3d7959bfed9f238634141e
[ "Apache-2.0" ]
2
2019-04-08T21:49:15.000Z
2019-04-13T20:15:31.000Z
ptp/components/mixins/__init__.py
tkornut/ptp
50c78c8f03024a71fc3d7959bfed9f238634141e
[ "Apache-2.0" ]
11
2019-02-23T16:58:27.000Z
2019-04-10T03:40:04.000Z
ptp/components/mixins/__init__.py
tkornut/ptp
50c78c8f03024a71fc3d7959bfed9f238634141e
[ "Apache-2.0" ]
null
null
null
from .word_mappings import WordMappings __all__ = [ 'WordMappings', ]
13.166667
39
0.683544
from .word_mappings import WordMappings __all__ = [ 'WordMappings', ]
true
true
f748625f0af98010b446db53d1350fc2cce70b6c
1,220
py
Python
setup.py
kingemma0430/jet-bridge
7cb68a0232850c28ebf9c474b031db507845feb5
[ "MIT" ]
2
2020-07-27T22:18:42.000Z
2021-11-15T10:03:14.000Z
setup.py
kingemma0430/jet-bridge
7cb68a0232850c28ebf9c474b031db507845feb5
[ "MIT" ]
null
null
null
setup.py
kingemma0430/jet-bridge
7cb68a0232850c28ebf9c474b031db507845feb5
[ "MIT" ]
null
null
null
import os from setuptools import setup, find_packages def read(fname): path = os.path.join(os.path.dirname(__file__), fname) try: file = open(path, encoding='utf-8') except TypeError: file = open(path) return file.read() def get_install_requires(): install_requires = [ 't...
22.181818
57
0.62541
import os from setuptools import setup, find_packages def read(fname): path = os.path.join(os.path.dirname(__file__), fname) try: file = open(path, encoding='utf-8') except TypeError: file = open(path) return file.read() def get_install_requires(): install_requires = [ 't...
true
true
f748629c8b4e96183df10cc90241c7b6ec55f2a9
511
py
Python
harness/fuzzware_harness/user_hooks/fuzz.py
fuzzware-fuzzer/fuzzware-emulator
4ee11957c32c02826577aef4c470505a4e359303
[ "Apache-2.0" ]
null
null
null
harness/fuzzware_harness/user_hooks/fuzz.py
fuzzware-fuzzer/fuzzware-emulator
4ee11957c32c02826577aef4c470505a4e359303
[ "Apache-2.0" ]
null
null
null
harness/fuzzware_harness/user_hooks/fuzz.py
fuzzware-fuzzer/fuzzware-emulator
4ee11957c32c02826577aef4c470505a4e359303
[ "Apache-2.0" ]
2
2022-03-27T12:23:09.000Z
2022-03-30T12:08:07.000Z
from unicorn.arm_const import UC_ARM_REG_R0 from .. import native def get_fuzz(uc, size): """ Gets at most 'size' bytes from the fuzz pool. If we run out of fuzz, something will happen (e.g., exit) :param size: :return: """ return native.get_fuzz(uc, size) def fuzz_remaining(): return...
21.291667
61
0.679061
from unicorn.arm_const import UC_ARM_REG_R0 from .. import native def get_fuzz(uc, size): return native.get_fuzz(uc, size) def fuzz_remaining(): return native.fuzz_remaining() def load_fuzz(file_path): native.load_fuzz(file_path) def return_fuzz_byte(uc): global fuzz c = get_fuzz(uc, 1) uc.r...
true
true
f74862d83f960bae8b2e0a721a0857e081cca9cf
2,730
py
Python
match_log.py
HannesHaglund/Swiss
b1449734ad1d7d609fdd40a7736a4b84ba7885e0
[ "MIT" ]
8
2016-11-24T15:42:52.000Z
2022-03-29T08:12:41.000Z
match_log.py
HannesHaglund/Swiss
b1449734ad1d7d609fdd40a7736a4b84ba7885e0
[ "MIT" ]
null
null
null
match_log.py
HannesHaglund/Swiss
b1449734ad1d7d609fdd40a7736a4b84ba7885e0
[ "MIT" ]
null
null
null
from match_result import MatchResult from shared_functions import bye_dummy_player_name import networkx as nx import random class MatchLog: def __init__(self): self._entries = [] self._explicit_players = [] self._player_active_map = {} # Ensures we don't error if the user tries to l...
27.575758
87
0.608791
from match_result import MatchResult from shared_functions import bye_dummy_player_name import networkx as nx import random class MatchLog: def __init__(self): self._entries = [] self._explicit_players = [] self._player_active_map = {} self.set_player_active(bye_dummy_playe...
true
true
f74862fc57af4ddc68eb0678e0559ef5850639cd
7,215
py
Python
IsThisAValidTeamName/stats/agent_copy.py
ksajan/iis-ms-del
6339f639d674fedb88454b43dcd64493be2a4558
[ "MIT" ]
2
2019-12-24T13:32:22.000Z
2019-12-26T11:26:08.000Z
IsThisAValidTeamName/stats/agent_copy.py
ksajan/iis-ms-del
6339f639d674fedb88454b43dcd64493be2a4558
[ "MIT" ]
1
2019-12-26T07:53:34.000Z
2019-12-26T07:53:34.000Z
IsThisAValidTeamName/stats/agent_copy.py
ksajan/iis-ms-del
6339f639d674fedb88454b43dcd64493be2a4558
[ "MIT" ]
35
2019-12-22T05:05:43.000Z
2019-12-22T07:16:56.000Z
import pkg_resources import types import pkg_resources import types import time import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns sns.set() from pandas_datareader import data as pdr import yfinance as yf yf.pdr_override() company = input("Enter Company Name : ") df_full = pd...
34.357143
109
0.584338
import pkg_resources import types import pkg_resources import types import time import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns sns.set() from pandas_datareader import data as pdr import yfinance as yf yf.pdr_override() company = input("Enter Company Name : ") df_full = pd...
true
true
f74863d4f5bd68b19e177e2d78103607d7f36047
1,475
py
Python
app/core/tests/test_admin.py
LuisMota93/recipe-app-api
6e17880bf874f583c37c25551b3eb116ea7d2d12
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
LuisMota93/recipe-app-api
6e17880bf874f583c37c25551b3eb116ea7d2d12
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
LuisMota93/recipe-app-api
6e17880bf874f583c37c25551b3eb116ea7d2d12
[ "MIT" ]
null
null
null
from django.test import TestCase, Client from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( email = 'admin@mail.com', ...
33.522727
101
0.64
from django.test import TestCase, Client from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( email = 'admin@mail.com', ...
true
true
f74863e9d1ec374c366eaac7b47409c5a6a01eb8
516
py
Python
setup.py
neocrk21/jefferson3
c196fc31a8a415b3ab31294052ae59d9ffc95cb7
[ "MIT" ]
null
null
null
setup.py
neocrk21/jefferson3
c196fc31a8a415b3ab31294052ae59d9ffc95cb7
[ "MIT" ]
null
null
null
setup.py
neocrk21/jefferson3
c196fc31a8a415b3ab31294052ae59d9ffc95cb7
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding=utf-8 from distutils.core import setup version = '0.3' setup( name='jefferson', version=version, description='JFFS2 filesystem extraction tool originally released by Stefan Viehböck. Python3 update by Jaan Klouman', author='Stefan Viehböck & Jaan Klouman', url='http...
25.8
122
0.69186
from distutils.core import setup version = '0.3' setup( name='jefferson', version=version, description='JFFS2 filesystem extraction tool originally released by Stefan Viehböck. Python3 update by Jaan Klouman', author='Stefan Viehböck & Jaan Klouman', url='https://github.com/sviehb/jefferson', ...
true
true
f7486473166589d1446909259e7709fb68e2a5df
3,373
py
Python
src/structure/process_pdb.py
igordub/enm-research-project
c5c52f2a6b415bd871800bcf725fda23cb3fd542
[ "MIT" ]
null
null
null
src/structure/process_pdb.py
igordub/enm-research-project
c5c52f2a6b415bd871800bcf725fda23cb3fd542
[ "MIT" ]
null
null
null
src/structure/process_pdb.py
igordub/enm-research-project
c5c52f2a6b415bd871800bcf725fda23cb3fd542
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import click import logging from pathlib import Path from dotenv import find_dotenv, load_dotenv import os import pandas as pd from biopandas.pdb import PandasPdb from copy import deepcopy import src.utilities as utils @click.command() @click.argument('input_dir', type=click.Path(exists=True))...
34.070707
100
0.673881
import click import logging from pathlib import Path from dotenv import find_dotenv, load_dotenv import os import pandas as pd from biopandas.pdb import PandasPdb from copy import deepcopy import src.utilities as utils @click.command() @click.argument('input_dir', type=click.Path(exists=True)) @click.argument('outpu...
true
true
f7486571a49ac12a6623aa6536ad0b18ae0e49bc
7,694
py
Python
allennlp_models/lm/models/masked_language_model.py
matt-peters/allennlp-models
cdd505ed539fdc2b82e4cc0a23eae4bfd3368e7e
[ "Apache-2.0" ]
1
2021-03-03T20:03:24.000Z
2021-03-03T20:03:24.000Z
allennlp_models/lm/models/masked_language_model.py
matt-peters/allennlp-models
cdd505ed539fdc2b82e4cc0a23eae4bfd3368e7e
[ "Apache-2.0" ]
29
2020-10-29T20:28:47.000Z
2022-03-28T13:05:18.000Z
allennlp_models/lm/models/masked_language_model.py
matt-peters/allennlp-models
cdd505ed539fdc2b82e4cc0a23eae4bfd3368e7e
[ "Apache-2.0" ]
null
null
null
from typing import Dict from overrides import overrides import torch from allennlp.common.checks import check_dimensions_match from allennlp.data import TextFieldTensors, Vocabulary from allennlp.models.model import Model from allennlp.modules import Seq2SeqEncoder, TextFieldEmbedder from allennlp.nn import util, Ini...
41.815217
99
0.646868
from typing import Dict from overrides import overrides import torch from allennlp.common.checks import check_dimensions_match from allennlp.data import TextFieldTensors, Vocabulary from allennlp.models.model import Model from allennlp.modules import Seq2SeqEncoder, TextFieldEmbedder from allennlp.nn import util, Ini...
true
true
f74865b56f4b1d7205a79fa7c0282396b519d460
22,310
py
Python
docs/documentation_generator.py
remihacker5/ursina
d32a74ff4069279c95ab978c81db2e55f933e24a
[ "MIT" ]
null
null
null
docs/documentation_generator.py
remihacker5/ursina
d32a74ff4069279c95ab978c81db2e55f933e24a
[ "MIT" ]
null
null
null
docs/documentation_generator.py
remihacker5/ursina
d32a74ff4069279c95ab978c81db2e55f933e24a
[ "MIT" ]
null
null
null
from pathlib import Path from pprint import pprint import keyword import builtins import textwrap from ursina import color, lerp, application def indentation(line): return len(line) - len(line.lstrip()) def get_module_attributes(str): attrs = list() for l in str.split('\n'): if len(l) == 0: ...
35.983871
142
0.540923
from pathlib import Path from pprint import pprint import keyword import builtins import textwrap from ursina import color, lerp, application def indentation(line): return len(line) - len(line.lstrip()) def get_module_attributes(str): attrs = list() for l in str.split('\n'): if len(l) == 0: ...
true
true
f74866f7d2c35ff00963583bee6720c53a9ff553
8,247
py
Python
src/clincoded/audit/biosample.py
ClinGen/clincoded
5624c74546ce2a44eda00ee632a8de8c2099da10
[ "MIT" ]
30
2015-09-23T20:38:57.000Z
2021-03-10T03:12:46.000Z
src/clincoded/audit/biosample.py
ClinGen/clincoded
5624c74546ce2a44eda00ee632a8de8c2099da10
[ "MIT" ]
2,132
2015-06-08T21:50:35.000Z
2022-02-15T22:44:18.000Z
src/clincoded/audit/biosample.py
ClinGen/clincoded
5624c74546ce2a44eda00ee632a8de8c2099da10
[ "MIT" ]
10
2015-09-25T20:11:25.000Z
2020-12-09T02:58:44.000Z
from contentbase.auditor import ( AuditFailure, audit_checker, ) term_mapping = { "head": "UBERON:0000033", "limb": "UBERON:0002101", "salivary gland": "UBERON:0001044", "male accessory sex gland": "UBERON:0010147", "testis": "UBERON:0000473", "female gonad": "UBERON:0000992", "dig...
39.45933
171
0.652843
from contentbase.auditor import ( AuditFailure, audit_checker, ) term_mapping = { "head": "UBERON:0000033", "limb": "UBERON:0002101", "salivary gland": "UBERON:0001044", "male accessory sex gland": "UBERON:0010147", "testis": "UBERON:0000473", "female gonad": "UBERON:0000992", "dig...
true
true
f74867a56a14a465141079cee5e89751ec5733c8
9,363
py
Python
experiments/hafner_comparison.py
mossjacob/alfi-paper
9c5650db852d6a0ff97a5c4292d647c300274082
[ "MIT" ]
3
2021-10-04T11:42:34.000Z
2022-01-24T11:26:42.000Z
experiments/hafner_comparison.py
mossjacob/alfi-paper
9c5650db852d6a0ff97a5c4292d647c300274082
[ "MIT" ]
1
2022-01-24T11:15:54.000Z
2022-01-24T11:20:23.000Z
experiments/hafner_comparison.py
mossjacob/alfi-paper
9c5650db852d6a0ff97a5c4292d647c300274082
[ "MIT" ]
1
2022-01-24T11:23:27.000Z
2022-01-24T11:23:27.000Z
import torch import numpy as np from torch.nn import Parameter from gpytorch.optim import NGD from torch.optim import Adam from matplotlib import pyplot as plt from gpytorch.constraints import Positive, Interval from gpytorch.distributions import MultitaskMultivariateNormal, MultivariateNormal from alfi.c...
38.690083
113
0.645306
import torch import numpy as np from torch.nn import Parameter from gpytorch.optim import NGD from torch.optim import Adam from matplotlib import pyplot as plt from gpytorch.constraints import Positive, Interval from gpytorch.distributions import MultitaskMultivariateNormal, MultivariateNormal from alfi.c...
true
true
f74867e6e943621b2ca968bb770f91046f73c40c
1,976
py
Python
scraping_2/com-4/reviewsprofiles/reviewsprofiles/spiders/lgbt4scraper.py
hvarS/AmazonPrivacy
d3c975e428d8ac80dbe4b4e7a2e33082eec89524
[ "MIT" ]
null
null
null
scraping_2/com-4/reviewsprofiles/reviewsprofiles/spiders/lgbt4scraper.py
hvarS/AmazonPrivacy
d3c975e428d8ac80dbe4b4e7a2e33082eec89524
[ "MIT" ]
null
null
null
scraping_2/com-4/reviewsprofiles/reviewsprofiles/spiders/lgbt4scraper.py
hvarS/AmazonPrivacy
d3c975e428d8ac80dbe4b4e7a2e33082eec89524
[ "MIT" ]
null
null
null
import scrapy import pandas as pd import time import os category_name = "LGBT" category_num = 4 class QuotesSpider(scrapy.Spider): name = category_name.lower() + str(category_num) + "spider" def start_requests(self): list_of_urls = [] parent_dir = "./reviewpages" link_file = parent_di...
30.875
93
0.565283
import scrapy import pandas as pd import time import os category_name = "LGBT" category_num = 4 class QuotesSpider(scrapy.Spider): name = category_name.lower() + str(category_num) + "spider" def start_requests(self): list_of_urls = [] parent_dir = "./reviewpages" link_file = parent_di...
true
true
f74868487fe9dbc32c22be09fcd99d71fc3aa856
15,050
py
Python
examples/cgle_periodic/run.py
fkemeth/emergent_pdes
d0501f21c9eb569543a19d4d95d6c91a9ccb11fe
[ "MIT" ]
null
null
null
examples/cgle_periodic/run.py
fkemeth/emergent_pdes
d0501f21c9eb569543a19d4d95d6c91a9ccb11fe
[ "MIT" ]
null
null
null
examples/cgle_periodic/run.py
fkemeth/emergent_pdes
d0501f21c9eb569543a19d4d95d6c91a9ccb11fe
[ "MIT" ]
null
null
null
""" Run CGLE example using specified config file. """ import int.cgle as cint import tests import lpde import os import pickle import shutil import configparser import numpy as np import matplotlib.pyplot as plt import tqdm import torch from torch.utils.tensorboard import SummaryWriter import utils_cgle from scipy.s...
45.606061
99
0.57289
import int.cgle as cint import tests import lpde import os import pickle import shutil import configparser import numpy as np import matplotlib.pyplot as plt import tqdm import torch from torch.utils.tensorboard import SummaryWriter import utils_cgle from scipy.spatial.distance import cdist torch.set_default_dtype...
true
true
f7486919d94253b029e1bdc18a98387e040a1b29
1,384
py
Python
bluebottle/events/migrations/0004_add_permissions.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
10
2015-05-28T18:26:40.000Z
2021-09-06T10:07:03.000Z
bluebottle/events/migrations/0004_add_permissions.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
762
2015-01-15T10:00:59.000Z
2022-03-31T15:35:14.000Z
bluebottle/events/migrations/0004_add_permissions.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
9
2015-02-20T13:19:30.000Z
2022-03-08T14:09:17.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2019-05-15 10:40 from __future__ import unicode_literals from django.db import migrations, connection from bluebottle.utils.utils import update_group_permissions from bluebottle.clients import properties from bluebottle.clients.models import Client from bluebo...
27.68
83
0.592486
from __future__ import unicode_literals from django.db import migrations, connection from bluebottle.utils.utils import update_group_permissions from bluebottle.clients import properties from bluebottle.clients.models import Client from bluebottle.clients.utils import LocalTenant def add_group_permissions(apps, ...
true
true
f748694532787cb58f71cd9a97508c105fe3181e
6,899
py
Python
_run.py
ThomasVieth/geodeconstructor
934ab7c0a0f0b728111d33ac90812272c85310f2
[ "MIT" ]
null
null
null
_run.py
ThomasVieth/geodeconstructor
934ab7c0a0f0b728111d33ac90812272c85310f2
[ "MIT" ]
null
null
null
_run.py
ThomasVieth/geodeconstructor
934ab7c0a0f0b728111d33ac90812272c85310f2
[ "MIT" ]
null
null
null
""" """ ## python imports from argparse import ArgumentParser from datetime import datetime, timedelta from enum import IntEnum from os.path import abspath, dirname, join ## internal imports from geodeconstructor.history.json import generate_location_history_json from geodeconstructor.history.locations import iter...
35.561856
92
0.628352
import ArgumentParser from datetime import datetime, timedelta from enum import IntEnum from os.path import abspath, dirname, join uctor.history.json import generate_location_history_json from geodeconstructor.history.locations import iter_unique_path_by_attribute = ArgumentParser() argument_parser.add_argument( ...
true
true
f7486a7eafd213db18651d28ab1c2807af42e74e
802
py
Python
neotest/bases.py
neotest-io/neotest
1b195c19295a16548fbd0ac912127b401c9baca4
[ "MIT" ]
1
2020-10-05T11:01:31.000Z
2020-10-05T11:01:31.000Z
neotest/bases.py
neotest-io/neotest
1b195c19295a16548fbd0ac912127b401c9baca4
[ "MIT" ]
null
null
null
neotest/bases.py
neotest-io/neotest
1b195c19295a16548fbd0ac912127b401c9baca4
[ "MIT" ]
null
null
null
# This file is part of Neotest. # See http://www.neotest.io for more information. # This program is published under the MIT license. import multiprocessing import threading import neotest class ProcessBase(multiprocessing.Process, neotest.logging.LogClientBase): def __init__(self, name=None): multiproce...
34.869565
104
0.746883
import multiprocessing import threading import neotest class ProcessBase(multiprocessing.Process, neotest.logging.LogClientBase): def __init__(self, name=None): multiprocessing.Process.__init__(self, name=name) neotest.logging.LogClientBase.__init__(self, logger="process", queue=neot...
true
true
f7486b27f033c7a14fbdd38996694a1378beece9
21,835
py
Python
djangosaml2/views.py
CBitLabs/djangosaml2
6fc8f2dc50d8a58dca142c9577d6bffa9ff8d7c8
[ "Apache-2.0" ]
null
null
null
djangosaml2/views.py
CBitLabs/djangosaml2
6fc8f2dc50d8a58dca142c9577d6bffa9ff8d7c8
[ "Apache-2.0" ]
1
2018-11-26T17:02:54.000Z
2018-11-26T17:02:54.000Z
djangosaml2/views.py
CBitLabs/djangosaml2
6fc8f2dc50d8a58dca142c9577d6bffa9ff8d7c8
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2010-2013 Yaco Sistemas (http://www.yaco.es) # Copyright (C) 2009 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ...
42.315891
123
0.686329
import base64 import logging from django.conf import settings from django.contrib import auth from django.contrib.auth.decorators import login_required try: from django.contrib.auth.views import LogoutView django_logout = LogoutView.as_view() except ImportError: from django.contrib.auth.view...
true
true
f7486b764d0578227632b6b6e4b6b62ba7560618
1,307
py
Python
0_Strings/backward_slice.py
ChristopherDaigle/udemy_python
8bc6335251c2da4f621d506f5ac580c7c8311fcc
[ "Unlicense" ]
null
null
null
0_Strings/backward_slice.py
ChristopherDaigle/udemy_python
8bc6335251c2da4f621d506f5ac580c7c8311fcc
[ "Unlicense" ]
null
null
null
0_Strings/backward_slice.py
ChristopherDaigle/udemy_python
8bc6335251c2da4f621d506f5ac580c7c8311fcc
[ "Unlicense" ]
null
null
null
# Backward slicing #-65432109876543210987654321 # 01234567890123456789012345 letters = "".join(sorted('qwertyuiopasdfghjklzxcvbnm')) # abcdefghijklmnopqrstuvwxyz # print(letters) # for i, a in enumerate(sorte...
30.395349
91
0.65723
letters = "".join(sorted('qwertyuiopasdfghjklzxcvbnm')) backwards = letters[25:0:-1] print(backwards) backwards = letters[25:-1:-1] print(backwards) backwards = letters[25::-1] print(b...
true
true
f7486b8d7cf9fc63f219a3613605b51efa361e29
432
py
Python
evap/evaluation/migrations/0052_add_course_is_private.py
felixrindt/EvaP
fe65fcc511cc942695ce1edbaab170894f0d37b1
[ "MIT" ]
29
2020-02-28T23:03:41.000Z
2022-02-19T09:29:36.000Z
evap/evaluation/migrations/0052_add_course_is_private.py
felixrindt/EvaP
fe65fcc511cc942695ce1edbaab170894f0d37b1
[ "MIT" ]
737
2015-01-02T17:43:25.000Z
2018-12-10T20:45:10.000Z
evap/evaluation/migrations/0052_add_course_is_private.py
felixrindt/EvaP
fe65fcc511cc942695ce1edbaab170894f0d37b1
[ "MIT" ]
83
2015-01-14T12:39:41.000Z
2018-10-29T16:36:43.000Z
# Generated by Django 1.9.2 on 2016-05-22 14:45 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('evaluation', '0051_change_question_order_verbose'), ] operations = [ migrations.AddField( model_name='course', name=...
22.736842
80
0.627315
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('evaluation', '0051_change_question_order_verbose'), ] operations = [ migrations.AddField( model_name='course', name='is_private', field=models.BooleanF...
true
true