hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c1bd321a96c46c319edc37e351e1679ecaf5e8f
194
py
Python
rolepermissions/exceptions.py
buserbrasil/django-role-permissions
d30ef8edfa094fa641963493322282a594367286
[ "MIT" ]
550
2015-01-05T17:28:57.000Z
2022-03-19T06:26:17.000Z
rolepermissions/exceptions.py
hieulm/django-role-permissions
180abbfdc646fc6c8e04747722b2fbcbb3bb3a8e
[ "MIT" ]
107
2015-01-31T16:55:52.000Z
2022-02-09T13:52:28.000Z
rolepermissions/exceptions.py
hieulm/django-role-permissions
180abbfdc646fc6c8e04747722b2fbcbb3bb3a8e
[ "MIT" ]
119
2015-01-31T13:48:30.000Z
2022-01-19T18:31:51.000Z
from __future__ import unicode_literals class CheckerNotRegistered(Exception): pass class RoleDoesNotExist(Exception): pass class RolePermissionScopeException(Exception): pass
13.857143
46
0.793814
from __future__ import unicode_literals class CheckerNotRegistered(Exception): pass class RoleDoesNotExist(Exception): pass class RolePermissionScopeException(Exception): pass
true
true
1c1bd57d715ae39539d9cec1347caa702a8261b9
4,718
py
Python
tensorflow/examples/label_image/label_image.py
qinchangping/tensorflow
f7f7036d1cdc5716aff976fae0ea4d1b9a931b56
[ "Apache-2.0" ]
24
2018-02-01T15:49:22.000Z
2021-01-11T16:31:18.000Z
tensorflow/examples/label_image/label_image.py
qinchangping/tensorflow
f7f7036d1cdc5716aff976fae0ea4d1b9a931b56
[ "Apache-2.0" ]
40
2018-02-19T19:37:24.000Z
2022-03-25T18:34:22.000Z
tensorflow/examples/label_image/label_image.py
qinchangping/tensorflow
f7f7036d1cdc5716aff976fae0ea4d1b9a931b56
[ "Apache-2.0" ]
4
2018-10-29T18:43:22.000Z
2020-09-28T07:19:52.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
33.225352
80
0.7039
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import sys import numpy as np import tensorflow as tf def load_graph(model_file): graph = tf.Graph() graph_def = tf.GraphDef() with open(model_file, "rb") as f: grap...
true
true
1c1bd5855bbcce1165a8452d0a4e206f0ffea6bb
859
py
Python
src/tf_idf.py
devinalvaro/reducto
61dd04065e07fa4777d3e23c58821eeac7c4a7c3
[ "MIT" ]
2
2017-09-29T09:12:15.000Z
2018-11-12T12:41:00.000Z
src/tf_idf.py
devinalvaro/reducto
61dd04065e07fa4777d3e23c58821eeac7c4a7c3
[ "MIT" ]
null
null
null
src/tf_idf.py
devinalvaro/reducto
61dd04065e07fa4777d3e23c58821eeac7c4a7c3
[ "MIT" ]
2
2019-01-11T15:38:47.000Z
2020-07-30T13:25:26.000Z
from math import log def term_frequency(word, word_frequency): """Calculate tf value of a word Args: word: the word to be scored. word_frequency: frequency of a word in the article. Returns: A float representing the word's tf value. """ return 0 if word_frequency[word] ==...
28.633333
76
0.678696
from math import log def term_frequency(word, word_frequency): return 0 if word_frequency[word] == 0 else 1 + log(word_frequency[word]) def inverse_document_frequency(word, document_number, document_frequency): return log(document_number / document_frequency[word])
true
true
1c1bd5943b5415f4bea77059599005e7b7d33891
287
py
Python
calcloud/common.py
bhayden53/calcloud
7478737d0da1218d1ced87787bede201993053aa
[ "BSD-3-Clause" ]
7
2020-01-28T17:15:47.000Z
2021-09-20T13:13:37.000Z
calcloud/common.py
bhayden53/calcloud
7478737d0da1218d1ced87787bede201993053aa
[ "BSD-3-Clause" ]
42
2020-02-04T14:57:58.000Z
2022-02-27T10:30:47.000Z
calcloud/common.py
bhayden53/calcloud
7478737d0da1218d1ced87787bede201993053aa
[ "BSD-3-Clause" ]
4
2020-02-03T14:28:02.000Z
2021-06-18T20:56:02.000Z
""" a module to hold some common configuration items that various scripts may need """ from botocore.config import Config # we need some mitigation of potential API rate restrictions for the (especially) Batch API retry_config = Config(retries={"max_attempts": 20, "mode": "standard"})
47.833333
91
0.770035
from botocore.config import Config retry_config = Config(retries={"max_attempts": 20, "mode": "standard"})
true
true
1c1bd6567c164fb6775c2480e74bcfbf78c52a2a
1,109
py
Python
kde/pim/akonadi-mime/akonadi-mime.py
wrobelda/craft-blueprints-kde
366f460cecd5baebdf3a695696767c8c0e5e7c7e
[ "BSD-2-Clause" ]
null
null
null
kde/pim/akonadi-mime/akonadi-mime.py
wrobelda/craft-blueprints-kde
366f460cecd5baebdf3a695696767c8c0e5e7c7e
[ "BSD-2-Clause" ]
1
2020-01-10T01:06:16.000Z
2020-01-10T01:06:16.000Z
kde/pim/akonadi-mime/akonadi-mime.py
wrobelda/craft-blueprints-kde
366f460cecd5baebdf3a695696767c8c0e5e7c7e
[ "BSD-2-Clause" ]
2
2020-01-02T18:22:12.000Z
2020-08-05T13:39:21.000Z
# -*- coding: utf-8 -*- import info class subinfo(info.infoclass): def setTargets(self): self.versionInfo.setDefaultValues() self.description = "Akonadi Mime library" def setDependencies(self): self.buildDependencies["kde/frameworks/extra-cmake-modules"] = None self.runtimeDe...
35.774194
75
0.70514
import info class subinfo(info.infoclass): def setTargets(self): self.versionInfo.setDefaultValues() self.description = "Akonadi Mime library" def setDependencies(self): self.buildDependencies["kde/frameworks/extra-cmake-modules"] = None self.runtimeDependencies["kde/pim/ako...
true
true
1c1bd6870996353ea82ed9760e1e42aadd64b846
19,849
py
Python
src/pynwb/ecephys.py
t-b/pynwb
b58e7b003247485120380360bb112bc6b22c7e60
[ "BSD-3-Clause-LBNL" ]
1
2021-04-13T20:47:36.000Z
2021-04-13T20:47:36.000Z
src/pynwb/ecephys.py
t-b/pynwb
b58e7b003247485120380360bb112bc6b22c7e60
[ "BSD-3-Clause-LBNL" ]
null
null
null
src/pynwb/ecephys.py
t-b/pynwb
b58e7b003247485120380360bb112bc6b22c7e60
[ "BSD-3-Clause-LBNL" ]
null
null
null
import numpy as np from collections import Iterable from .form.utils import docval, getargs, popargs, call_docval_func from .form.data_utils import DataChunkIterator, assertEqualShape from . import register_class, CORE_NAMESPACE from .base import TimeSeries, _default_resolution, _default_conversion from .core import ...
50.635204
118
0.610409
import numpy as np from collections import Iterable from .form.utils import docval, getargs, popargs, call_docval_func from .form.data_utils import DataChunkIterator, assertEqualShape from . import register_class, CORE_NAMESPACE from .base import TimeSeries, _default_resolution, _default_conversion from .core import ...
true
true
1c1bd6b5b85e9aaf1be46e620cde68a7facdc663
8,396
py
Python
rprecorder/cli/track.py
sniner/rp-recorder
4266c6533c3076d7f903f5dea6b43d3797ef62cc
[ "BSD-2-Clause" ]
null
null
null
rprecorder/cli/track.py
sniner/rp-recorder
4266c6533c3076d7f903f5dea6b43d3797ef62cc
[ "BSD-2-Clause" ]
null
null
null
rprecorder/cli/track.py
sniner/rp-recorder
4266c6533c3076d7f903f5dea6b43d3797ef62cc
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/python3 import json import logging import signal import sqlite3 import sys import time import threading from datetime import datetime import requests logger = logging.getLogger(__name__) # Radio Paradise API: # # * https://github.com/marco79cgn/radio-paradise # * http://moodeaudio.org/forum/showthread....
33.991903
121
0.564316
import json import logging import signal import sqlite3 import sys import time import threading from datetime import datetime import requests logger = logging.getLogger(__name__) class RPTrackDatabase: def __init__(self, path=None): self.connection = None self.path = path self.lo...
true
true
1c1bd6b6c64986aebf80de94c2724bad3b2e55ee
1,604
py
Python
examples/get-token.py
bruxy70/ComAp-API
b167f04accb9859329179ca6ee16e2fc31097db6
[ "MIT" ]
1
2019-09-17T17:36:28.000Z
2019-09-17T17:36:28.000Z
examples/get-token.py
bruxy70/ComAp-API
b167f04accb9859329179ca6ee16e2fc31097db6
[ "MIT" ]
null
null
null
examples/get-token.py
bruxy70/ComAp-API
b167f04accb9859329179ca6ee16e2fc31097db6
[ "MIT" ]
1
2019-09-17T18:14:09.000Z
2019-09-17T18:14:09.000Z
from comap.api import wsv import getpass print('This program will generate a configuration file, that will store your credentials to use ComAp API.\n') print('You will need ComAp API, that you will find on the ComAp API developer portal under your profile.') print('Then you will need your WebSupervisor user name and ...
64.16
185
0.702618
from comap.api import wsv import getpass print('This program will generate a configuration file, that will store your credentials to use ComAp API.\n') print('You will need ComAp API, that you will find on the ComAp API developer portal under your profile.') print('Then you will need your WebSupervisor user name and ...
true
true
1c1bd7499e79636be66c24612bd9b9fa091b8c08
877
py
Python
cidonkey/migrations/0006_auto_20141105_2057.py
samuelcolvin/ci-donkey
9420dfd55c19288e09bcdb3071fe753ead19b906
[ "MIT" ]
1
2015-04-27T13:31:43.000Z
2015-04-27T13:31:43.000Z
cidonkey/migrations/0006_auto_20141105_2057.py
samuelcolvin/ci-donkey
9420dfd55c19288e09bcdb3071fe753ead19b906
[ "MIT" ]
9
2015-01-08T11:00:16.000Z
2015-03-04T12:25:56.000Z
cidonkey/migrations/0006_auto_20141105_2057.py
samuelcolvin/ci-donkey
9420dfd55c19288e09bcdb3071fe753ead19b906
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('cidonkey', '0005_project_coverage_regex'), ] operations = [ migrations.AddField( model_name='buildinfo', ...
27.40625
87
0.595211
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('cidonkey', '0005_project_coverage_regex'), ] operations = [ migrations.AddField( model_name='buildinfo', name='queued', ...
true
true
1c1bd8a0d670c0e8fecbe39d4878eeeac9fc0280
5,052
py
Python
PaddleCV/adversarial/tutorials/mnist_tutorial_deepfool.py
kgresearch/models
09565ab4e12e6e015c8d2c901d455176099773ed
[ "Apache-2.0" ]
2
2021-05-15T07:35:04.000Z
2021-07-15T07:01:13.000Z
PaddleCV/adversarial/tutorials/mnist_tutorial_deepfool.py
kgresearch/models
09565ab4e12e6e015c8d2c901d455176099773ed
[ "Apache-2.0" ]
null
null
null
PaddleCV/adversarial/tutorials/mnist_tutorial_deepfool.py
kgresearch/models
09565ab4e12e6e015c8d2c901d455176099773ed
[ "Apache-2.0" ]
4
2021-08-11T08:25:10.000Z
2021-10-16T07:41:59.000Z
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
33.019608
84
0.631631
import sys sys.path.append("..") import matplotlib.pyplot as plt import paddle.fluid as fluid import paddle from advbox.adversary import Adversary from advbox.attacks.deepfool import DeepFoolAttack from advbox.models.paddle import PaddleModel from tutorials.mnist_model import mnist_cnn_model def main()...
true
true
1c1bd8fe136d65c0ac938127c137780eefa6b4b8
55,552
py
Python
tensorflow/lite/python/lite_v2_test.py
ibeauregard/tensorflow
898ae24a05ae738a816bca5f20226f8323dc1b21
[ "Apache-2.0" ]
1
2020-11-06T08:47:24.000Z
2020-11-06T08:47:24.000Z
tensorflow/lite/python/lite_v2_test.py
ibeauregard/tensorflow
898ae24a05ae738a816bca5f20226f8323dc1b21
[ "Apache-2.0" ]
1
2020-05-16T01:56:36.000Z
2020-05-16T01:56:36.000Z
tensorflow/lite/python/lite_v2_test.py
AyanmoI/tensorflow
20bc44d8fc2feee4c63dd90e49dbcdf34ed6564c
[ "Apache-2.0" ]
null
null
null
# Lint as: python2, python3 # Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
39.038651
80
0.708705
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os from absl.testing import parameterized import numpy as np from six.moves import range from six.moves import zip import tensorflow as tf from tensorflow.lite.python import lite from t...
true
true
1c1bda34adfa2d2818778563131f579d39499a33
3,492
py
Python
bindings/python/ensmallen/datasets/string/arthrobacterspunccl28.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/string/arthrobacterspunccl28.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/arthrobacterspunccl28.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph Arthrobacter sp. UNCCL28. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: protein--prote...
33.257143
223
0.677835
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen import Graph def ArthrobacterSpUnccl28( directed: bool = False, preprocess: bool = True, load_nodes: bool = True, verbose: int = 2, cache: bool = True, cache_path: str = "graphs/str...
true
true
1c1bda6831baf834074a59875ef22b36e624b90f
1,101
py
Python
camera_v4l2.py
Sennevds/video-stream-with-gpio-trigger
5c6efa4c1ab8394c53bac956bd7e8f299dfc13da
[ "MIT" ]
1
2021-05-12T10:09:22.000Z
2021-05-12T10:09:22.000Z
camera_v4l2.py
KUGA2/flask-video-streaming
a923dab79135b90586bf9b74fb8888b853ca5c80
[ "MIT" ]
null
null
null
camera_v4l2.py
KUGA2/flask-video-streaming
a923dab79135b90586bf9b74fb8888b853ca5c80
[ "MIT" ]
1
2021-01-23T19:48:57.000Z
2021-01-23T19:48:57.000Z
import io from PIL import Image import select import v4l2capture from base_camera import BaseCamera class Camera(BaseCamera): """Requires python-v4l2capture module: https://github.com/gebart/python-v4l2capture""" video_source = "/dev/video0" @staticmethod def frames(): video = v4l2capture.Vi...
30.583333
90
0.59673
import io from PIL import Image import select import v4l2capture from base_camera import BaseCamera class Camera(BaseCamera): video_source = "/dev/video0" @staticmethod def frames(): video = v4l2capture.Video_device(Camera.video_source) size_x = 1280 size_y = 720 ...
true
true
1c1bdc0bee72c56144c0f5e4734ccfa9c121521c
2,344
py
Python
applications/ShapeOptimizationApplication/tests/opt_process_eigenfrequency_test/run_test.py
lcirrott/Kratos
8406e73e0ad214c4f89df4e75e9b29d0eb4a47ea
[ "BSD-4-Clause" ]
2
2019-10-25T09:28:10.000Z
2019-11-21T12:51:46.000Z
applications/ShapeOptimizationApplication/tests/opt_process_eigenfrequency_test/run_test.py
lcirrott/Kratos
8406e73e0ad214c4f89df4e75e9b29d0eb4a47ea
[ "BSD-4-Clause" ]
13
2019-10-07T12:06:51.000Z
2020-02-18T08:48:33.000Z
applications/ShapeOptimizationApplication/tests/opt_process_eigenfrequency_test/run_test.py
lcirrott/Kratos
8406e73e0ad214c4f89df4e75e9b29d0eb4a47ea
[ "BSD-4-Clause" ]
null
null
null
# Import Kratos core and apps import KratosMultiphysics as KM # Additional imports from KratosMultiphysics.ShapeOptimizationApplication import optimizer_factory from KratosMultiphysics.KratosUnittest import TestCase import KratosMultiphysics.kratos_utilities as kratos_utilities import os, csv # Read parameters with o...
41.122807
123
0.68558
import KratosMultiphysics as KM from KratosMultiphysics.ShapeOptimizationApplication import optimizer_factory from KratosMultiphysics.KratosUnittest import TestCase import KratosMultiphysics.kratos_utilities as kratos_utilities import os, csv with open("optimization_parameters.json",'r') as parameter_file: par...
true
true
1c1bde397d6a02fc5de8bc38cde4020e75c924ca
1,229
py
Python
SKRJEZ/lab3/zadatak4.py
burw0r/SKRJEZ
5a804c141d031f3d5e6407a6394b1760da6a20a9
[ "MIT" ]
null
null
null
SKRJEZ/lab3/zadatak4.py
burw0r/SKRJEZ
5a804c141d031f3d5e6407a6394b1760da6a20a9
[ "MIT" ]
null
null
null
SKRJEZ/lab3/zadatak4.py
burw0r/SKRJEZ
5a804c141d031f3d5e6407a6394b1760da6a20a9
[ "MIT" ]
null
null
null
import urllib.request import sys import re if __name__ == "__main__": stranica = urllib.request.urlopen(sys.argv[1]) mybytes = stranica.read() mystr = mybytes.decode("utf8") print(mystr) # linkovi hosts_dict = dict() urls = [] for url in re.findall('href="(https+://)(.*?)"', mystr): ...
27.931818
94
0.528072
import urllib.request import sys import re if __name__ == "__main__": stranica = urllib.request.urlopen(sys.argv[1]) mybytes = stranica.read() mystr = mybytes.decode("utf8") print(mystr) hosts_dict = dict() urls = [] for url in re.findall('href="(https+://)(.*?)"', mystr): hos...
true
true
1c1bde3d0b512cebc2fb499ea025950f8003bed1
6,451
py
Python
intuition/core/analyzes.py
sirjamesmeddel-gitty/intuition
cd517e6b3b315a743eb4d0d0dc294e264ab913ce
[ "Apache-2.0" ]
81
2015-01-13T15:16:43.000Z
2021-11-12T20:51:56.000Z
intuition/core/analyzes.py
sirjamesmeddel-gitty/intuition
cd517e6b3b315a743eb4d0d0dc294e264ab913ce
[ "Apache-2.0" ]
1
2015-07-30T06:17:55.000Z
2015-07-30T08:09:14.000Z
intuition/core/analyzes.py
sirjamesmeddel-gitty/intuition
cd517e6b3b315a743eb4d0d0dc294e264ab913ce
[ "Apache-2.0" ]
30
2015-03-26T11:55:46.000Z
2021-07-22T22:16:39.000Z
# -*- coding: utf-8 -*- # vim:fenc=utf-8 ''' Intuition results analyzer -------------------------- Wraps session results with convenient analyse methods :copyright (c) 2014 Xavier Bruhiere :license: Apache 2.0, see LICENSE for more details. ''' import pytz import pandas as pd import numpy as np import dna...
36.241573
79
0.592776
import pytz import pandas as pd import numpy as np import dna.logging import dna.debug import dna.utils from zipline.data.benchmarks import get_benchmark_returns from intuition.finance import qstk_get_sharpe_ratio log = dna.logging.logger(__name__) class Analyze(): def __init__(self, params, results, metrics...
true
true
1c1bdeb97aabd35a519d6cba04242ef188ee7bad
1,458
py
Python
Encapsulation/Exercises/03. football_team_generator/project/player.py
geodimitrov/PythonOOP_SoftUni
f1c6718c878b618b3ab3f174cd4d187bd178940b
[ "MIT" ]
1
2021-06-30T11:53:44.000Z
2021-06-30T11:53:44.000Z
Encapsulation/Exercises/03. football_team_generator/project/player.py
geodimitrov/PythonOOP_SoftUni
f1c6718c878b618b3ab3f174cd4d187bd178940b
[ "MIT" ]
null
null
null
Encapsulation/Exercises/03. football_team_generator/project/player.py
geodimitrov/PythonOOP_SoftUni
f1c6718c878b618b3ab3f174cd4d187bd178940b
[ "MIT" ]
null
null
null
class Player: def __init__(self, name, endurance, sprint, dribble, passing, shooting): self.__name = name self.__endurance = endurance self.__sprint = sprint self.__dribble = dribble self.__passing = passing self.__shooting = shooting @property def name(self)...
23.142857
178
0.628258
class Player: def __init__(self, name, endurance, sprint, dribble, passing, shooting): self.__name = name self.__endurance = endurance self.__sprint = sprint self.__dribble = dribble self.__passing = passing self.__shooting = shooting @property def name(self)...
true
true
1c1bded326336f6f53f997a09b1cec4c61db25e4
3,349
py
Python
ENV/lib/python3.6/site-packages/pyramid/wsgi.py
captain-c00keys/pyramid-stocks
0acf3363a6a7ee61cd41b855f43c9d6f9582ae6a
[ "MIT" ]
null
null
null
ENV/lib/python3.6/site-packages/pyramid/wsgi.py
captain-c00keys/pyramid-stocks
0acf3363a6a7ee61cd41b855f43c9d6f9582ae6a
[ "MIT" ]
null
null
null
ENV/lib/python3.6/site-packages/pyramid/wsgi.py
captain-c00keys/pyramid-stocks
0acf3363a6a7ee61cd41b855f43c9d6f9582ae6a
[ "MIT" ]
null
null
null
from functools import wraps from pyramid.request import call_app_with_subpath_as_path_info def wsgiapp(wrapped): """ Decorator to turn a WSGI application into a :app:`Pyramid` :term:`view callable`. This decorator differs from the :func:`pyramid.wsgi.wsgiapp2` decorator inasmuch as fixups of ``PATH_IN...
38.94186
77
0.67244
from functools import wraps from pyramid.request import call_app_with_subpath_as_path_info def wsgiapp(wrapped): if wrapped is None: raise ValueError('wrapped can not be None') def decorator(context, request): return request.get_response(wrapped) if getattr(wrapped, '__name__', None...
true
true
1c1be13fed288a45a84acd863d74709eddb8e1d6
4,579
py
Python
Multiprocessing.py
dilawarm/AlphaZero
a5e38d49ba24bf9587f5571ad8c1ea7465005d34
[ "MIT" ]
14
2019-09-18T06:23:57.000Z
2022-02-20T22:59:09.000Z
Multiprocessing.py
dilawarm/AlphaZero
a5e38d49ba24bf9587f5571ad8c1ea7465005d34
[ "MIT" ]
14
2020-01-28T23:05:41.000Z
2022-02-10T00:28:31.000Z
Multiprocessing.py
dilawarm/AlphaZero
a5e38d49ba24bf9587f5571ad8c1ea7465005d34
[ "MIT" ]
5
2019-11-24T23:08:04.000Z
2020-12-11T15:32:22.000Z
import Train from multiprocessing import Process, Manager import numpy as np import time from FourInARow import Config # from TicTacToe import Config from collections import defaultdict class DataStore: def __init__(self, max_epochs_stored): self.data = {} self.max_epochs_stored = max_epochs_store...
33.918519
120
0.628522
import Train from multiprocessing import Process, Manager import numpy as np import time from FourInARow import Config from collections import defaultdict class DataStore: def __init__(self, max_epochs_stored): self.data = {} self.max_epochs_stored = max_epochs_stored self.counter = 0 ...
true
true
1c1be1dac37a8fa17ca2811105d2d8d13711f611
282
py
Python
tests/artificial/transf_RelativeDifference/trend_MovingMedian/cycle_5/ar_12/test_artificial_32_RelativeDifference_MovingMedian_5_12_100.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
tests/artificial/transf_RelativeDifference/trend_MovingMedian/cycle_5/ar_12/test_artificial_32_RelativeDifference_MovingMedian_5_12_100.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
1
2019-11-30T23:39:38.000Z
2019-12-01T04:34:35.000Z
tests/artificial/transf_RelativeDifference/trend_MovingMedian/cycle_5/ar_12/test_artificial_32_RelativeDifference_MovingMedian_5_12_100.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
import pyaf.Bench.TS_datasets as tsds import pyaf.tests.artificial.process_artificial_dataset as art art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "MovingMedian", cycle_length = 5, transform = "RelativeDifference", sigma = 0.0, exog_count = 100, ar_order = 12);
40.285714
177
0.744681
import pyaf.Bench.TS_datasets as tsds import pyaf.tests.artificial.process_artificial_dataset as art art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "MovingMedian", cycle_length = 5, transform = "RelativeDifference", sigma = 0.0, exog_count = 100, ar_order = 12);
true
true
1c1be2c39f5d751594987602e2ce46e81540a154
1,305
py
Python
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/apigateway/apis/CheckPolicyNameRequest.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
14
2018-04-19T09:53:56.000Z
2022-01-27T06:05:48.000Z
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/apigateway/apis/CheckPolicyNameRequest.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
15
2018-09-11T05:39:54.000Z
2021-07-02T12:38:02.000Z
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/apigateway/apis/CheckPolicyNameRequest.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
33
2018-04-20T05:29:16.000Z
2022-02-17T09:10:05.000Z
# coding=utf8 # Copyright 2018 JDCLOUD.COM # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
29.659091
99
0.715709
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest class CheckPolicyNameRequest(JDCloudRequest): def __init__(self, parameters, header=None, version="v1"): super(CheckPolicyNameRequest, self).__init__( '/regions/{regionId}/rateLimitPolicies:checkPolicyNameExist', 'PA...
true
true
1c1be4cca7f4bf82b6db51f63fc4fef96c70aa4d
38,876
py
Python
python/ccxt/async_support/coinfalcon.py
sandutsar/ccxt
f27c187fa1626a6c261c6fa5caaae89cb657461d
[ "MIT" ]
null
null
null
python/ccxt/async_support/coinfalcon.py
sandutsar/ccxt
f27c187fa1626a6c261c6fa5caaae89cb657461d
[ "MIT" ]
null
null
null
python/ccxt/async_support/coinfalcon.py
sandutsar/ccxt
f27c187fa1626a6c261c6fa5caaae89cb657461d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.async_support.base.exchange import Exchange from ccxt.base.errors import ExchangeError from ccxt.base.errors import Authenticatio...
40.922105
155
0.511292
rt.base.exchange import Exchange from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import ArgumentsRequired from ccxt.base.errors import RateLimitExceeded from ccxt.base.decimal_to_precision import TICK_SIZE from ccxt.base.precise import Precise class...
true
true
1c1be5becd5f5fa46d506bb759b1bb7740981dba
1,919
py
Python
var/spack/repos/builtin/packages/r-somaticsignatures/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/r-somaticsignatures/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
8
2021-11-09T20:28:40.000Z
2022-03-15T03:26:33.000Z
var/spack/repos/builtin/packages/r-somaticsignatures/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack.package import * class RSomaticsignatures(RPackage): """Somatic Signatures. The SomaticSignatures...
45.690476
79
0.692027
from spack.package import * class RSomaticsignatures(RPackage): bioc = "SomaticSignatures" version('2.30.0', commit='03f7ad707f6530fa7f62093f808884b6e83b0526') version('2.26.0', commit='9d4bed6e118ac76755ffb7abd058b09bac58a9d7') version('2.20.0', commit='dbedc30d92b600b3a17de596ebe38d15982c70c6...
true
true
1c1be60c7d0d408a8449f0ea89288ce710e67fd6
2,024
py
Python
modules/goofile.py
mlynchcogent/InfoSploit
06b4ce97b4ddc9f801f6b76225f482057ce4a1a4
[ "MIT" ]
41
2018-06-09T05:34:36.000Z
2022-03-02T22:35:29.000Z
modules/goofile.py
Purbayan2014/InfoSploit
06b4ce97b4ddc9f801f6b76225f482057ce4a1a4
[ "MIT" ]
1
2022-03-27T16:21:07.000Z
2022-03-27T16:22:03.000Z
modules/goofile.py
Purbayan2014/InfoSploit
06b4ce97b4ddc9f801f6b76225f482057ce4a1a4
[ "MIT" ]
13
2018-06-03T19:35:17.000Z
2022-01-19T07:36:16.000Z
#!/usr/bin/env python # Goofile v1.5 # My Website: http://www.g13net.com # Project Page: http://code.google.com/p/goofile # # TheHarvester used for inspiration # A many thanks to the Edge-Security team! # import string import httplib import sys import re import getopt global result result =[] def usage()...
20.865979
68
0.57164
import string import httplib import sys import re import getopt global result result =[] def usage(): print "Goofile 1.5\n" print "usage: goofile options \n" print " -d: domain to search\n" print " -f: filetype (ex. pdf)\n" print "example:./goofile.py -d test.com -f txt\n" sys.exit() def ...
false
true
1c1be6680d5d1a3429f9ad1b9d63c74e167c5b03
17,548
py
Python
moto/sns/models.py
JohnVonNeumann/moto
4081ece2ea97f401139879a5c6d81d9b21cb7b48
[ "Apache-2.0" ]
null
null
null
moto/sns/models.py
JohnVonNeumann/moto
4081ece2ea97f401139879a5c6d81d9b21cb7b48
[ "Apache-2.0" ]
null
null
null
moto/sns/models.py
JohnVonNeumann/moto
4081ece2ea97f401139879a5c6d81d9b21cb7b48
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals import datetime import uuid import json import requests import six import re from boto3 import Session from moto.compat import OrderedDict from moto.core import BaseBackend, BaseModel from moto.core.utils import iso_8601_datetime_with_milliseconds from moto.sqs import sqs_bac...
37.737634
200
0.64486
from __future__ import unicode_literals import datetime import uuid import json import requests import six import re from boto3 import Session from moto.compat import OrderedDict from moto.core import BaseBackend, BaseModel from moto.core.utils import iso_8601_datetime_with_milliseconds from moto.sqs import sqs_bac...
true
true
1c1be718ef56f5618d875363911182e7fbde2d97
68,568
py
Python
mindspore/ops/operations/sponge_update_ops.py
LottieWang/mindspore
1331c7e432fb691d1cfa625ab7cc7451dcfc7ce0
[ "Apache-2.0" ]
null
null
null
mindspore/ops/operations/sponge_update_ops.py
LottieWang/mindspore
1331c7e432fb691d1cfa625ab7cc7451dcfc7ce0
[ "Apache-2.0" ]
null
null
null
mindspore/ops/operations/sponge_update_ops.py
LottieWang/mindspore
1331c7e432fb691d1cfa625ab7cc7451dcfc7ce0
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
49.258621
119
0.684999
from ..primitive import PrimitiveWithInfer, prim_attr_register from ..._checkparam import Rel from ..._checkparam import Validator as validator from ...common import dtype as mstype class v0coordinaterefresh(PrimitiveWithInfer): @prim_attr_register def __init__(self, atom_numbers, virtual_num...
true
true
1c1be736dbded3cb18dfefe3876d5e2d53cd0a20
724
py
Python
worldmap/test/test_country.py
expertanalytics/fagkveld
96e16b9610e8b60d36425e7bc5435d266de1f8bf
[ "BSD-2-Clause" ]
null
null
null
worldmap/test/test_country.py
expertanalytics/fagkveld
96e16b9610e8b60d36425e7bc5435d266de1f8bf
[ "BSD-2-Clause" ]
null
null
null
worldmap/test/test_country.py
expertanalytics/fagkveld
96e16b9610e8b60d36425e7bc5435d266de1f8bf
[ "BSD-2-Clause" ]
null
null
null
import pytest import numpy as np import bokeh @pytest.fixture() def dtm(): dtm = DTM() country1 = Country() country1.border_x = [np.array([1, 3, 3, 1])] country1.border_y = [np.array([0, 0, 1, 1])] country2 = Country() country2.border_x = [np.array([1, 3, 3, 1])] country2.border_y = [np.a...
22.625
48
0.546961
import pytest import numpy as np import bokeh @pytest.fixture() def dtm(): dtm = DTM() country1 = Country() country1.border_x = [np.array([1, 3, 3, 1])] country1.border_y = [np.array([0, 0, 1, 1])] country2 = Country() country2.border_x = [np.array([1, 3, 3, 1])] country2.border_y = [np.a...
true
true
1c1be782a627ff5b28c4b5190a9c40f8c37c7663
4,171
py
Python
mass_update_incidents/mass_update_incidents.py
erikpaasonen/public-support-scripts
3e9750ed2c6e6c162776e41d33330666f649fe39
[ "Apache-2.0" ]
null
null
null
mass_update_incidents/mass_update_incidents.py
erikpaasonen/public-support-scripts
3e9750ed2c6e6c162776e41d33330666f649fe39
[ "Apache-2.0" ]
null
null
null
mass_update_incidents/mass_update_incidents.py
erikpaasonen/public-support-scripts
3e9750ed2c6e6c162776e41d33330666f649fe39
[ "Apache-2.0" ]
1
2021-07-07T08:15:02.000Z
2021-07-07T08:15:02.000Z
#!/usr/bin/env python # PagerDuty Support asset: mass_update_incidents import argparse import requests import sys import json from datetime import date import pprint import pdpyras # Default parameters: PARAMETERS = { 'is_overview': 'true', # 'since': '', # 'until': '', # 'time_zone': `UTC` } def...
43
80
0.632942
import argparse import requests import sys import json from datetime import date import pprint import pdpyras PARAMETERS = { 'is_overview': 'true', } def mass_update_incidents(args): session = pdpyras.APISession(args.api_key, default_from=args.requester_email) if args.user_id:...
true
true
1c1be786ed455cd56c216a22130c39001ff72cef
2,642
py
Python
tests/sentry/api/bases/test_team.py
ChadKillingsworth/sentry
ffcb9007a95a83ee267935fe605f8ee8f03a85a5
[ "BSD-3-Clause" ]
null
null
null
tests/sentry/api/bases/test_team.py
ChadKillingsworth/sentry
ffcb9007a95a83ee267935fe605f8ee8f03a85a5
[ "BSD-3-Clause" ]
null
null
null
tests/sentry/api/bases/test_team.py
ChadKillingsworth/sentry
ffcb9007a95a83ee267935fe605f8ee8f03a85a5
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from mock import Mock from sentry.api.bases.team import TeamPermission from sentry.models import ApiKey, OrganizationMemberType, ProjectKey from sentry.testutils import TestCase class TeamPermissionBase(TestCase): def setUp(self): self.org = self.create_organizatio...
32.219512
68
0.652914
from __future__ import absolute_import from mock import Mock from sentry.api.bases.team import TeamPermission from sentry.models import ApiKey, OrganizationMemberType, ProjectKey from sentry.testutils import TestCase class TeamPermissionBase(TestCase): def setUp(self): self.org = self.create_organizatio...
true
true
1c1be89ee658a45f0acbbb3ddb9f0c158f5327a2
3,151
py
Python
tests/tls13/test_tls13_TLS_AES_128_GCM_SHA256.py
timb-machine-mirrors/tlsmate
1313161b9170311f466a3a43b3d84797cecc0291
[ "MIT" ]
null
null
null
tests/tls13/test_tls13_TLS_AES_128_GCM_SHA256.py
timb-machine-mirrors/tlsmate
1313161b9170311f466a3a43b3d84797cecc0291
[ "MIT" ]
null
null
null
tests/tls13/test_tls13_TLS_AES_128_GCM_SHA256.py
timb-machine-mirrors/tlsmate
1313161b9170311f466a3a43b3d84797cecc0291
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Implements a class to be used for unit testing. """ import pathlib import logging from tests.cipher_suite_tester import CipherSuiteTester from tlsmate import tls from tlsmate import msg from tlsmate.tlssuite import TlsLibrary class TestCase(CipherSuiteTester): """Class used for tests wi...
36.639535
83
0.657886
import pathlib import logging from tests.cipher_suite_tester import CipherSuiteTester from tlsmate import tls from tlsmate import msg from tlsmate.tlssuite import TlsLibrary class TestCase(CipherSuiteTester): path = pathlib.Path(__file__) cipher_suite = tls.CipherSuite.TLS_AES_128_GCM_SHA256 server_cmd...
true
true
1c1be8ea2d213ccc7668f0fdf8dd2b1dcddde838
3,274
py
Python
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/_configuration.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/_configuration.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/_configuration.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
45.472222
129
0.686011
from typing import TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy from ._version import VERSION if TYPE_CHECKING: from typing import Any from azure.core.credentials import TokenC...
true
true
1c1be90a3faaf06d07762a339fa5456c19624c67
2,610
py
Python
run.py
Pil0u/adventofcode2020
97a6c291fc1653bcb1ea7abd7f38e71e2c0458f8
[ "MIT" ]
null
null
null
run.py
Pil0u/adventofcode2020
97a6c291fc1653bcb1ea7abd7f38e71e2c0458f8
[ "MIT" ]
null
null
null
run.py
Pil0u/adventofcode2020
97a6c291fc1653bcb1ea7abd7f38e71e2c0458f8
[ "MIT" ]
null
null
null
import argparse import importlib import os import re import requests import sys import timeit from dotenv import load_dotenv load_dotenv() SESSION_COOKIE = os.getenv('SESSION_COOKIE') N_REPEATS = int(os.getenv('N_REPEATS')) if 'N_REPEATS' in os.environ else 1 def get_args(): parser = argparse.ArgumentParser(des...
29.325843
125
0.654406
import argparse import importlib import os import re import requests import sys import timeit from dotenv import load_dotenv load_dotenv() SESSION_COOKIE = os.getenv('SESSION_COOKIE') N_REPEATS = int(os.getenv('N_REPEATS')) if 'N_REPEATS' in os.environ else 1 def get_args(): parser = argparse.ArgumentParser(des...
true
true
1c1beb3090b4e9c1e75c2119b288ef34811fe34e
3,477
py
Python
place_searching.py
CodyJG10/Business-Finder
6e725bff340086417582fffac6493909e287008a
[ "MIT" ]
null
null
null
place_searching.py
CodyJG10/Business-Finder
6e725bff340086417582fffac6493909e287008a
[ "MIT" ]
null
null
null
place_searching.py
CodyJG10/Business-Finder
6e725bff340086417582fffac6493909e287008a
[ "MIT" ]
null
null
null
import googlemaps import pandas as pd import time import sys import json def retrieve_places(): # print(sys.argv[1]) # print('test') print(location_query) location = client.geocode(location_query)[0]['geometry']['location'] results = client.places(query = query, loc...
25.014388
98
0.623238
import googlemaps import pandas as pd import time import sys import json def retrieve_places(): print(location_query) location = client.geocode(location_query)[0]['geometry']['location'] results = client.places(query = query, location = location, ...
true
true
1c1bec63d588bc09ed4c9c6577d2a0a5b88e3a8e
654
py
Python
pedal/resolvers/core.py
acbart/python-analysis
3cd2cc22d50a414ae6b62c74d2643be4742238d4
[ "MIT" ]
14
2019-08-22T03:40:23.000Z
2022-03-13T00:30:53.000Z
pedal/resolvers/core.py
pedal-edu/pedal
3cd2cc22d50a414ae6b62c74d2643be4742238d4
[ "MIT" ]
74
2019-09-12T04:35:56.000Z
2022-01-26T19:21:32.000Z
pedal/resolvers/core.py
acbart/python-analysis
3cd2cc22d50a414ae6b62c74d2643be4742238d4
[ "MIT" ]
2
2018-09-16T22:39:15.000Z
2018-09-17T12:53:28.000Z
from pedal.core.report import MAIN_REPORT def make_resolver(func, report=None): ''' Decorates the given function as a Resolver. This means that when the function is executed, the `"pedal.resolver.resolve"` event will be triggered. Args: func (callable): The function to decorate. ...
28.434783
78
0.655963
from pedal.core.report import MAIN_REPORT def make_resolver(func, report=None): if report is None: report = MAIN_REPORT def resolver_wrapper(*args, **kwargs): report.execute_hooks('pedal.resolvers', 'resolve') return func(*args, **kwargs) return resolver_wrapper
true
true
1c1bed1263f1c2b0b9b8ddda3057476d3ba8adc0
1,560
py
Python
voice-conversion/encode/data_loader.py
mberkanbicer/torch-light
facd5e12f45127e81951ca1e6119960e196c6165
[ "MIT" ]
310
2018-11-02T10:12:33.000Z
2022-03-30T02:59:51.000Z
voice-conversion/encode/data_loader.py
mberkanbicer/torch-light
facd5e12f45127e81951ca1e6119960e196c6165
[ "MIT" ]
14
2018-11-08T10:09:46.000Z
2021-07-30T08:54:33.000Z
voice-conversion/encode/data_loader.py
mberkanbicer/torch-light
facd5e12f45127e81951ca1e6119960e196c6165
[ "MIT" ]
152
2018-11-02T13:00:49.000Z
2022-03-28T12:45:08.000Z
import pickle import os from torch.utils import data import torch import numpy as np class Utterances(data.Dataset): def __init__(self, hparams): self.len_crop = hparams.len_crop self.train_dataset = pickle.load(open(os.path.join(hparams.data_dir, hparams.training_data), "rb")) self.n...
35.454545
107
0.560256
import pickle import os from torch.utils import data import torch import numpy as np class Utterances(data.Dataset): def __init__(self, hparams): self.len_crop = hparams.len_crop self.train_dataset = pickle.load(open(os.path.join(hparams.data_dir, hparams.training_data), "rb")) self.n...
true
true
1c1bed30680fbe48cd313200dc407b8964ccef01
115
py
Python
spiral/core/exc.py
acdaniells/spiral
d78344007969d7c991216901b4a9d3ad7d768587
[ "BSD-3-Clause" ]
null
null
null
spiral/core/exc.py
acdaniells/spiral
d78344007969d7c991216901b4a9d3ad7d768587
[ "BSD-3-Clause" ]
1
2020-04-01T18:39:48.000Z
2020-04-01T18:39:48.000Z
spiral/core/exc.py
acdaniells/spiral
d78344007969d7c991216901b4a9d3ad7d768587
[ "BSD-3-Clause" ]
1
2020-04-01T18:36:44.000Z
2020-04-01T18:36:44.000Z
""" Spiral core exceptions module. """ class SpiralError(Exception): """ Spiral generic errors. """
10.454545
30
0.608696
class SpiralError(Exception):
true
true
1c1bedec0d4303778d28a0f1d4c614fc4f737234
6,039
py
Python
sympy/logic/tests/test_inference.py
fperez/sympy
7d8d096215c8f65ba1d4a9c09af78ec0c3844518
[ "BSD-3-Clause" ]
null
null
null
sympy/logic/tests/test_inference.py
fperez/sympy
7d8d096215c8f65ba1d4a9c09af78ec0c3844518
[ "BSD-3-Clause" ]
null
null
null
sympy/logic/tests/test_inference.py
fperez/sympy
7d8d096215c8f65ba1d4a9c09af78ec0c3844518
[ "BSD-3-Clause" ]
1
2021-11-10T06:39:41.000Z
2021-11-10T06:39:41.000Z
"""For more tests on satisfiability, see test_dimacs""" from sympy import symbols from sympy.logic.boolalg import Equivalent, Implies from sympy.logic.inference import pl_true, satisfiable, PropKB from sympy.logic.algorithms.dpll import dpll, dpll_satisfiable, \ find_pure_symbol, find_unit_clause, unit_propagate, ...
40.530201
82
0.562842
from sympy import symbols from sympy.logic.boolalg import Equivalent, Implies from sympy.logic.inference import pl_true, satisfiable, PropKB from sympy.logic.algorithms.dpll import dpll, dpll_satisfiable, \ find_pure_symbol, find_unit_clause, unit_propagate, \ find_pure_symbol_int_repr, find_unit_clause_int_re...
true
true
1c1bedf7fcf3be8316d6bd8065cc0a30713562ac
27,375
py
Python
tests/always/test_project_structure.py
ReadytoRocc/airflow
ec6761a5c0d031221d53ce213c0e42813606c55d
[ "Apache-2.0" ]
1
2020-01-03T12:13:27.000Z
2020-01-03T12:13:27.000Z
tests/always/test_project_structure.py
ReadytoRocc/airflow
ec6761a5c0d031221d53ce213c0e42813606c55d
[ "Apache-2.0" ]
3
2021-12-17T19:19:13.000Z
2022-02-28T01:29:32.000Z
tests/always/test_project_structure.py
ReadytoRocc/airflow
ec6761a5c0d031221d53ce213c0e42813606c55d
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
54.859719
110
0.727489
import ast import glob import itertools import mmap import os import unittest from typing import Dict, Set import pytest ROOT_FOLDER = os.path.realpath( os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir, os.pardir) ) class TestProjectStructure(unittest.TestCase): def test_r...
true
true
1c1bee9e029adf5fc1a47b16f2ee28a9ca08b033
916
py
Python
generate_bound.py
weifanjiang/treeVerification
2a841d24d3f930ffdfae9c554f4c1d9fa8756edc
[ "MIT" ]
1
2020-01-28T04:31:22.000Z
2020-01-28T04:31:22.000Z
generate_bound.py
weifanjiang/treeVerification
2a841d24d3f930ffdfae9c554f4c1d9fa8756edc
[ "MIT" ]
null
null
null
generate_bound.py
weifanjiang/treeVerification
2a841d24d3f930ffdfae9c554f4c1d9fa8756edc
[ "MIT" ]
null
null
null
import argparse import numpy as np parser = argparse.ArgumentParser() parser.add_argument('-i', '--input', help='input testing data') parser.add_argument('-o', '--output', help='output path for features') parser.add_argument('-e', '--epsilon', help='epsilon', type=float) args = vars(parser.parse_args()) input = open(...
29.548387
75
0.59607
import argparse import numpy as np parser = argparse.ArgumentParser() parser.add_argument('-i', '--input', help='input testing data') parser.add_argument('-o', '--output', help='output path for features') parser.add_argument('-e', '--epsilon', help='epsilon', type=float) args = vars(parser.parse_args()) input = open(...
true
true
1c1bf08beec71533aa607e27d56bd9165f06ba30
7,799
py
Python
web/utils/emr.py
srakhe/mental-health-analysis
0b0d0327e827c4e1a96a28d452ea492666674d1a
[ "MIT" ]
null
null
null
web/utils/emr.py
srakhe/mental-health-analysis
0b0d0327e827c4e1a96a28d452ea492666674d1a
[ "MIT" ]
null
null
null
web/utils/emr.py
srakhe/mental-health-analysis
0b0d0327e827c4e1a96a28d452ea492666674d1a
[ "MIT" ]
null
null
null
import boto3 def get_client(): client = boto3.client("emr", region_name="us-west-2") return client def get_emr_id(): with open("data/emr_data/emr_id.txt", "r") as emr_id_file: emr_id = emr_id_file.read() return emr_id def set_emr_id(new_id): with open("data/emr_data/emr_id.txt", "w+") ...
34.662222
98
0.425183
import boto3 def get_client(): client = boto3.client("emr", region_name="us-west-2") return client def get_emr_id(): with open("data/emr_data/emr_id.txt", "r") as emr_id_file: emr_id = emr_id_file.read() return emr_id def set_emr_id(new_id): with open("data/emr_data/emr_id.txt", "w+") ...
true
true
1c1bf25d1be7fa0a0e87428d62c5888e1183c0ef
103,764
py
Python
plot/plot_partial_uniform.py
x-h-liu/paste
27752e190e2f43c3f24c49fdbfce48daadb6add4
[ "BSD-3-Clause" ]
null
null
null
plot/plot_partial_uniform.py
x-h-liu/paste
27752e190e2f43c3f24c49fdbfce48daadb6add4
[ "BSD-3-Clause" ]
null
null
null
plot/plot_partial_uniform.py
x-h-liu/paste
27752e190e2f43c3f24c49fdbfce48daadb6add4
[ "BSD-3-Clause" ]
null
null
null
import matplotlib.pyplot as plt """ Code for comparing alpha for partial uniform, single resampling """ # deltas = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 2.0, 3.0, 4.0, 5.0] # # # overlap70_max_accuracy = 0.7102532171025322 # overlap70_m = 0.7 # overlap70_alpha00 = [0.6618239852978458, 0.6258283056660474,...
251.244552
1,086
0.836253
import matplotlib.pyplot as plt deltas = [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2....
true
true
1c1bf3ab3abd4cea7b8529794e0de937883374c7
1,391
py
Python
src/pyclblast/setup.py
trantila/CLBlast
21b66ca76140be9ac30811e7648abe3837e19177
[ "Apache-2.0" ]
null
null
null
src/pyclblast/setup.py
trantila/CLBlast
21b66ca76140be9ac30811e7648abe3837e19177
[ "Apache-2.0" ]
null
null
null
src/pyclblast/setup.py
trantila/CLBlast
21b66ca76140be9ac30811e7648abe3837e19177
[ "Apache-2.0" ]
null
null
null
# This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. # This file follows the PEP8 Python style guide and uses a max-width of 100 characters per line. # # Author(s): # Cedric Nugteren <www.cedricnugteren.nl> from setuptools import setup from distutils.extension import Extens...
30.23913
96
0.664989
from setuptools import setup from distutils.extension import Extension from Cython.Distutils import build_ext ext_modules = list() ext_modules.append( Extension( "pyclblast", ["src/pyclblast.pyx"], libraries=["clblast"], language="c++" ) ) setup( name="pyclblast", ...
true
true
1c1bf3ab7792a933c46b8c277e7b506d88bc9ffb
5,412
py
Python
src/snowflake/connector/file_util.py
666Chao666/snowflake-connector-python
81a10e522fcf19d45580c79bc066b7a4eab25485
[ "Apache-2.0" ]
null
null
null
src/snowflake/connector/file_util.py
666Chao666/snowflake-connector-python
81a10e522fcf19d45580c79bc066b7a4eab25485
[ "Apache-2.0" ]
null
null
null
src/snowflake/connector/file_util.py
666Chao666/snowflake-connector-python
81a10e522fcf19d45580c79bc066b7a4eab25485
[ "Apache-2.0" ]
2
2021-03-16T12:41:29.000Z
2021-03-16T14:50:08.000Z
# # Copyright (c) 2012-2021 Snowflake Computing Inc. All right reserved. # from __future__ import division import base64 import gzip import os import shutil import struct from io import BytesIO, open from logging import getLogger from typing import IO, Tuple from Cryptodome.Hash import SHA256 from cryptography.hazma...
32.407186
98
0.575942
from __future__ import division import base64 import gzip import os import shutil import struct from io import BytesIO, open from logging import getLogger from typing import IO, Tuple from Cryptodome.Hash import SHA256 from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives im...
true
true
1c1bf42b39b37438f3d927c587247572901fc0cc
17,988
py
Python
src/osipidce/InputOptions.py
michaelberks/OSIPI-DCE-DSC-toolbox
60690aafab06e253601588396c2cdf683f705b82
[ "Apache-2.0" ]
null
null
null
src/osipidce/InputOptions.py
michaelberks/OSIPI-DCE-DSC-toolbox
60690aafab06e253601588396c2cdf683f705b82
[ "Apache-2.0" ]
null
null
null
src/osipidce/InputOptions.py
michaelberks/OSIPI-DCE-DSC-toolbox
60690aafab06e253601588396c2cdf683f705b82
[ "Apache-2.0" ]
null
null
null
/** * @file mdm_InputOptions.h * @brief Header only class defines default input options for T1 mapping and DCE analysis * @details More info... * @author MA Berks (c) Copyright QBI Lab, University of Manchester 2020 */ #ifndef MDM_INPUT_OPTIONS_HDR #define MDM_INPUT_OPTIONS_HDR #include <mdm_InputTypes.h> /...
50.670423
149
0.715699
/** * @file mdm_InputOptions.h * @brief Header only class defines default input options for T1 mapping and DCE analysis * @details More info... * @author MA Berks (c) Copyright QBI Lab, University of Manchester 2020 */ //! Input options structure defining default input options for T1 mapping and DCE anal...
false
true
1c1bf44fc65360adadd3a759143e1eb6eea52d50
2,462
py
Python
src/olympus/planners/planner_particle_swarms/wrapper_particle_swarms.py
priyansh-1902/olympus
f57ad769918c0d5d805c439ab5ffbd180af698fa
[ "MIT" ]
null
null
null
src/olympus/planners/planner_particle_swarms/wrapper_particle_swarms.py
priyansh-1902/olympus
f57ad769918c0d5d805c439ab5ffbd180af698fa
[ "MIT" ]
null
null
null
src/olympus/planners/planner_particle_swarms/wrapper_particle_swarms.py
priyansh-1902/olympus
f57ad769918c0d5d805c439ab5ffbd180af698fa
[ "MIT" ]
null
null
null
#!/usr/bin/env python import time from olympus.objects import ParameterVector from olympus.planners import AbstractPlanner from olympus.utils import daemon import numpy as np class ParticleSwarms(AbstractPlanner): def __init__(self, goal='minimize', max_iters=10**8, options={'c1': 0.5, 'c2': 0.3, 'w': 0.9},...
36.746269
113
0.645816
import time from olympus.objects import ParameterVector from olympus.planners import AbstractPlanner from olympus.utils import daemon import numpy as np class ParticleSwarms(AbstractPlanner): def __init__(self, goal='minimize', max_iters=10**8, options={'c1': 0.5, 'c2': 0.3, 'w': 0.9}, particles=10): ...
true
true
1c1bf479888a920a52f0288e2c88fc50e3ac195a
3,018
py
Python
monitor.py
eplq/simple-system-monitoring
3d66af7c4d0b288ebad92e4ba5fb0e8a0550403d
[ "MIT" ]
null
null
null
monitor.py
eplq/simple-system-monitoring
3d66af7c4d0b288ebad92e4ba5fb0e8a0550403d
[ "MIT" ]
null
null
null
monitor.py
eplq/simple-system-monitoring
3d66af7c4d0b288ebad92e4ba5fb0e8a0550403d
[ "MIT" ]
null
null
null
import psutil from threading import Thread from time import sleep from const import INTERVAL from ws import socketio from sys import platform running = False threads = [] net_previous = { "bytes_sent": 0, "bytes_recv": 0 } def cpu_usage_thread(): while running: cpu = psutil.cpu_percent(interval=...
28.742857
90
0.605036
import psutil from threading import Thread from time import sleep from const import INTERVAL from ws import socketio from sys import platform running = False threads = [] net_previous = { "bytes_sent": 0, "bytes_recv": 0 } def cpu_usage_thread(): while running: cpu = psutil.cpu_percent(interval=...
true
true
1c1bf4aa6eecf331bec1f448d55bfe91d5fa1396
220
py
Python
biometric_attendance/biometric_attendance/doctype/biometric_settings/test_biometric_settings.py
umaepoch/Biometric-Attendance
308d8646320a2913c6a784af27e8aa6b48721bb1
[ "MIT" ]
null
null
null
biometric_attendance/biometric_attendance/doctype/biometric_settings/test_biometric_settings.py
umaepoch/Biometric-Attendance
308d8646320a2913c6a784af27e8aa6b48721bb1
[ "MIT" ]
null
null
null
biometric_attendance/biometric_attendance/doctype/biometric_settings/test_biometric_settings.py
umaepoch/Biometric-Attendance
308d8646320a2913c6a784af27e8aa6b48721bb1
[ "MIT" ]
2
2021-08-17T09:23:06.000Z
2021-09-02T07:16:43.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2020, Akshay Mehta and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest class TestBiometricSettings(unittest.TestCase): pass
20
51
0.777273
from __future__ import unicode_literals import frappe import unittest class TestBiometricSettings(unittest.TestCase): pass
true
true
1c1bf75b939285f314eb23952d46f183c046df37
5,796
py
Python
corehq/util/view_utils.py
kkrampa/commcare-hq
d64d7cad98b240325ad669ccc7effb07721b4d44
[ "BSD-3-Clause" ]
1
2020-05-05T13:10:01.000Z
2020-05-05T13:10:01.000Z
corehq/util/view_utils.py
kkrampa/commcare-hq
d64d7cad98b240325ad669ccc7effb07721b4d44
[ "BSD-3-Clause" ]
1
2019-12-09T14:00:14.000Z
2019-12-09T14:00:14.000Z
corehq/util/view_utils.py
MaciejChoromanski/commcare-hq
fd7f65362d56d73b75a2c20d2afeabbc70876867
[ "BSD-3-Clause" ]
5
2015-11-30T13:12:45.000Z
2019-07-01T19:27:07.000Z
from __future__ import absolute_import from __future__ import unicode_literals import json import logging import traceback from functools import wraps from django import http from django.conf import settings from django.core.exceptions import PermissionDenied from django.http import Http404 from django.urls import rev...
30.994652
113
0.670117
from __future__ import absolute_import from __future__ import unicode_literals import json import logging import traceback from functools import wraps from django import http from django.conf import settings from django.core.exceptions import PermissionDenied from django.http import Http404 from django.urls import rev...
true
true
1c1bf8436a9db93b86a65a37772bb5456e47473a
283
py
Python
angola_erp/transitario/doctype/ficha_de_processo/test_ficha_de_processo.py
smehata/angola_erp
51614992709476e353aef1c03099d78f2a7cedb2
[ "MIT" ]
4
2019-06-12T06:54:10.000Z
2021-08-28T06:07:42.000Z
angola_erp/transitario/doctype/ficha_de_processo/test_ficha_de_processo.py
proenterprise/angola_erp
1c171362b132e567390cf702e6ebd72577297cdf
[ "MIT" ]
4
2017-08-24T17:33:45.000Z
2017-09-24T16:54:01.000Z
angola_erp/transitario/doctype/ficha_de_processo/test_ficha_de_processo.py
proenterprise/angola_erp
1c171362b132e567390cf702e6ebd72577297cdf
[ "MIT" ]
4
2018-02-10T21:08:10.000Z
2021-08-28T06:08:11.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2015, Helio de Jesus and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest # test_records = frappe.get_test_records('Ficha de Processo') class TestFichadeProcesso(unittest.TestCase): pass
21.769231
61
0.773852
from __future__ import unicode_literals import frappe import unittest class TestFichadeProcesso(unittest.TestCase): pass
true
true
1c1bf9c8c3e47df71e4dd8089c16adba1d9b3df7
818
py
Python
project_finder/urls.py
mistryharsh28/Project-Finder
b6882a6588d1d34a8be0e40287e0648a430e5954
[ "MIT" ]
null
null
null
project_finder/urls.py
mistryharsh28/Project-Finder
b6882a6588d1d34a8be0e40287e0648a430e5954
[ "MIT" ]
23
2018-12-25T11:35:58.000Z
2019-03-25T15:37:03.000Z
project_finder/urls.py
mistryharsh28/Project-Finder
b6882a6588d1d34a8be0e40287e0648a430e5954
[ "MIT" ]
11
2018-12-25T10:50:16.000Z
2019-02-25T12:38:42.000Z
"""project_finder URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Clas...
37.181818
77
0.711491
from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('', include('project_finder_web_app.urls')), ]
true
true
1c1bfa7461766adc39581d558ac94fc33237963e
1,011
py
Python
src/metropolis_hastings.py
alexandru-dinu/MCMC
c45632a7aba9e78a30c47644b261130b261f6278
[ "BSD-3-Clause" ]
null
null
null
src/metropolis_hastings.py
alexandru-dinu/MCMC
c45632a7aba9e78a30c47644b261130b261f6278
[ "BSD-3-Clause" ]
1
2021-11-09T11:33:08.000Z
2021-11-11T15:40:08.000Z
src/metropolis_hastings.py
alexandru-dinu/MCMC
c45632a7aba9e78a30c47644b261130b261f6278
[ "BSD-3-Clause" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np import scipy.stats as stats import seaborn as sns mus = np.array([5, 5]) sigmas = np.array([[1, 0.9], [0.9, 1]]) def circle(x, y): return (x - 1) ** 2 + (y - 2) ** 2 - 3 ** 2 def pgauss(x, y): return stats.multivariate_normal.pdf([x, y], mean=mus, cov=sigm...
24.071429
70
0.597428
import matplotlib.pyplot as plt import numpy as np import scipy.stats as stats import seaborn as sns mus = np.array([5, 5]) sigmas = np.array([[1, 0.9], [0.9, 1]]) def circle(x, y): return (x - 1) ** 2 + (y - 2) ** 2 - 3 ** 2 def pgauss(x, y): return stats.multivariate_normal.pdf([x, y], mean=mus, cov=sigm...
true
true
1c1bfaa089920742a5093cd0dd5bdd7bf8f004ba
13,611
py
Python
tempest/services/identity/v2/json/identity_client.py
liucode/tempest-master
ae205e46a578df48ab2f6c243e1b5a31d2e3c5a8
[ "Apache-2.0" ]
null
null
null
tempest/services/identity/v2/json/identity_client.py
liucode/tempest-master
ae205e46a578df48ab2f6c243e1b5a31d2e3c5a8
[ "Apache-2.0" ]
null
null
null
tempest/services/identity/v2/json/identity_client.py
liucode/tempest-master
ae205e46a578df48ab2f6c243e1b5a31d2e3c5a8
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
38.777778
79
0.611638
from oslo_serialization import jsonutils as json from tempest_lib import exceptions as lib_exc from tempest.common import service_client class IdentityClient(service_client.ServiceClient): api_version = "v2.0" def show_api_description(self): url = '' resp, body = self.get(url) ...
true
true
1c1bfb47ec2951aa9735bb5b6e01df5c890db14b
4,957
py
Python
model/non_rg_metrics.py
wanghm92/rotowire_fg
67d7534f78368da8cb74bd222f311fc1a8906ba9
[ "MIT" ]
13
2019-11-11T12:03:15.000Z
2022-03-31T20:02:41.000Z
model/non_rg_metrics.py
wanghm92/rotowire_fg
67d7534f78368da8cb74bd222f311fc1a8906ba9
[ "MIT" ]
5
2020-07-21T03:15:16.000Z
2021-02-08T02:27:04.000Z
model/non_rg_metrics.py
wanghm92/rotowire_fg
67d7534f78368da8cb74bd222f311fc1a8906ba9
[ "MIT" ]
8
2019-11-12T10:38:20.000Z
2020-11-16T02:28:47.000Z
import sys from pyxdameraulevenshtein import normalized_damerau_levenshtein_distance from text2num import text2num full_names = ['Atlanta Hawks', 'Boston Celtics', 'Brooklyn Nets', 'Charlotte Hornets', 'Chicago Bulls', 'Cleveland Cavaliers', 'Detroit Pistons', 'Indiana Pacers', 'Miami Heat', 'Milwaukee Bucks', 'New ...
34.664336
94
0.614283
import sys from pyxdameraulevenshtein import normalized_damerau_levenshtein_distance from text2num import text2num full_names = ['Atlanta Hawks', 'Boston Celtics', 'Brooklyn Nets', 'Charlotte Hornets', 'Chicago Bulls', 'Cleveland Cavaliers', 'Detroit Pistons', 'Indiana Pacers', 'Miami Heat', 'Milwaukee Bucks', 'New ...
true
true
1c1bfbcd1e8f23c8bff1f18761a5530983a1c922
759
py
Python
salt/matchers/compound_pillar_exact_match.py
fake-name/salt
d8f04936e4407f51946e32e8166159778f6c31a5
[ "Apache-2.0" ]
null
null
null
salt/matchers/compound_pillar_exact_match.py
fake-name/salt
d8f04936e4407f51946e32e8166159778f6c31a5
[ "Apache-2.0" ]
null
null
null
salt/matchers/compound_pillar_exact_match.py
fake-name/salt
d8f04936e4407f51946e32e8166159778f6c31a5
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ This is the default pillar exact matcher for compound matches. There is no minion-side equivalent for this, so consequently there is no ``match()`` function below, only an ``mmatch()`` """ from __future__ import absolute_import, print_function, unicode_literals import logging import salt....
28.111111
84
0.685112
from __future__ import absolute_import, print_function, unicode_literals import logging import salt.utils.minions log = logging.getLogger(__name__) def mmatch(expr, delimiter, greedy, opts=None): if not opts: opts = __opts__ ckminions = salt.utils.minions.CkMinions(opts) return ckminions._c...
true
true
1c1bfc1a8389073bbafae67ee9b4f61c296e9dde
12,313
py
Python
shakelib/conversions/imc/boore_kishida_2017.py
uofuseismo/shakemap
3c0d2d0e84c642491946c8819c71644d3b24d4de
[ "CC0-1.0" ]
1
2021-03-30T00:08:40.000Z
2021-03-30T00:08:40.000Z
shakelib/conversions/imc/boore_kishida_2017.py
oylb126/shakemap
cbad8622bd520e1936447620edfb3a4feea1a8d9
[ "CC0-1.0" ]
1
2020-01-06T19:24:30.000Z
2020-01-06T21:15:33.000Z
shakelib/conversions/imc/boore_kishida_2017.py
oylb126/shakemap
cbad8622bd520e1936447620edfb3a4feea1a8d9
[ "CC0-1.0" ]
1
2021-08-20T00:54:31.000Z
2021-08-20T00:54:31.000Z
""" Module implements BooreKishida2017 class to convert between various horizontal intensity measure components. """ # Standard imports import glob import logging import os.path import pkg_resources # Third party imports import numpy as np from openquake.hazardlib.const import IMC from openquake.hazardlib.imt import P...
38.358255
78
0.580931
import glob import logging import os.path import pkg_resources import numpy as np from openquake.hazardlib.const import IMC from openquake.hazardlib.imt import PGA, PGV import pandas as pd from shakelib.conversions.convert_imc import ComponentConverter class BooreKishida2017(ComponentConverter): def __init__...
true
true
1c1bfd1dce746d69ba9238f58bc182c77b93a4d8
218
py
Python
Ex_Files_Learning_Python_Upd/Exercise Files/Ch2/variables_start.py
DougApplegate79/DAproject-TheMillCodeSchool
fc5d255176bf496d6086358a14fbbf72cce744c0
[ "Apache-2.0" ]
2
2020-07-23T19:32:58.000Z
2020-10-24T20:54:09.000Z
Ex_Files_Learning_Python_Upd/Exercise Files/Ch2/variables_start.py
DougApplegate79/DAproject-TheMillCodeSchool
fc5d255176bf496d6086358a14fbbf72cce744c0
[ "Apache-2.0" ]
null
null
null
Ex_Files_Learning_Python_Upd/Exercise Files/Ch2/variables_start.py
DougApplegate79/DAproject-TheMillCodeSchool
fc5d255176bf496d6086358a14fbbf72cce744c0
[ "Apache-2.0" ]
1
2021-07-11T14:41:04.000Z
2021-07-11T14:41:04.000Z
# # Example file for variables # # Declare a variable and initialize it # re-declaring the variable works # ERROR: variables of different types cannot be combined # Global vs. local variables in functions
10.9
56
0.733945
true
true
1c1bfec060f8e6025f13d4f0b44af76dd0977468
12,193
py
Python
import_scripts/ncbi/process_ncbi_taxonomy.py
eliagbayani/local_reference_taxonomy
5bdb2c6e3b5b158bee72a9eade64a595d1e595fb
[ "BSD-2-Clause" ]
8
2017-05-20T07:53:09.000Z
2021-08-16T03:30:59.000Z
import_scripts/ncbi/process_ncbi_taxonomy.py
eliagbayani/local_reference_taxonomy
5bdb2c6e3b5b158bee72a9eade64a595d1e595fb
[ "BSD-2-Clause" ]
257
2015-01-11T12:05:12.000Z
2021-11-04T17:26:02.000Z
import_scripts/ncbi/process_ncbi_taxonomy.py
eliagbayani/local_reference_taxonomy
5bdb2c6e3b5b158bee72a9eade64a595d1e595fb
[ "BSD-2-Clause" ]
4
2015-10-23T13:45:23.000Z
2021-03-12T17:28:53.000Z
#!/usr/bin/env python # Author: Stephen Smith # Arguments: # download - T or F - whether or not to download the tar.gz file from NCBI # downloaddir - where to find (or put) the tar.gz and its contents # kill list file # destination dir - where taxonomy.tsv etc. are to be put # JAR copied this file from data/...
36.28869
195
0.532847
import sys,os,time import os.path from collections import Counter """ this processes the ncbi taxonomy tables for the synonyms and the names that will be included in the upload to the taxomachine """ """ skipping - X -environmental -unknown -unidentified -endophyte -uncultured -scgc -libraries -unc...
false
true
1c1bff4e056af4cd064a625a65d08629dbeb403d
117
py
Python
ae_okta_auth/apps.py
nabaz/ae-okta-auth
69a7f80b7a42224bcb7602def2866fe726893fd4
[ "MIT" ]
1
2018-06-26T22:38:38.000Z
2018-06-26T22:38:38.000Z
ae_okta_auth/apps.py
nabaz/ae-okta-auth
69a7f80b7a42224bcb7602def2866fe726893fd4
[ "MIT" ]
null
null
null
ae_okta_auth/apps.py
nabaz/ae-okta-auth
69a7f80b7a42224bcb7602def2866fe726893fd4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 from django.apps import AppConfig class AeOktaAuthConfig(AppConfig): name = 'ae_okta_auth'
16.714286
34
0.726496
from django.apps import AppConfig class AeOktaAuthConfig(AppConfig): name = 'ae_okta_auth'
true
true
1c1bff55fbb41fd7a1620e601ecc848c9d8cf63b
107
py
Python
xastropy/casbah/__init__.py
bpholden/xastropy
66aff0995a84c6829da65996d2379ba4c946dabe
[ "BSD-3-Clause" ]
3
2015-08-23T00:32:58.000Z
2020-12-31T02:37:52.000Z
xastropy/casbah/__init__.py
Kristall-WangShiwei/xastropy
723fe56cb48d5a5c4cdded839082ee12ef8c6732
[ "BSD-3-Clause" ]
104
2015-07-17T18:31:54.000Z
2018-06-29T17:04:09.000Z
xastropy/casbah/__init__.py
Kristall-WangShiwei/xastropy
723fe56cb48d5a5c4cdded839082ee12ef8c6732
[ "BSD-3-Clause" ]
16
2015-07-17T15:50:37.000Z
2019-04-21T03:42:47.000Z
#import build_casbah_galaxies #import galaxy_data #import igm_spec #import load_casbah #import survey_figs
17.833333
29
0.859813
true
true
1c1bffd16a11763776ec4473095a2a26b555b883
3,635
py
Python
onmt/modules/gate.py
pryo/openNMT
204609435639603022b1068bf915144e36b11f76
[ "MIT" ]
5,864
2017-02-24T19:17:07.000Z
2022-03-31T20:49:22.000Z
onmt/modules/gate.py
pryo/openNMT
204609435639603022b1068bf915144e36b11f76
[ "MIT" ]
1,727
2017-02-27T09:09:56.000Z
2022-03-29T17:08:29.000Z
onmt/modules/gate.py
pryo/openNMT
204609435639603022b1068bf915144e36b11f76
[ "MIT" ]
2,570
2017-02-24T19:20:36.000Z
2022-03-31T06:24:22.000Z
""" ContextGate module """ import torch import torch.nn as nn def context_gate_factory(gate_type, embeddings_size, decoder_size, attention_size, output_size): """Returns the correct ContextGate class""" gate_types = {'source': SourceContextGate, 'target': TargetCont...
39.51087
79
0.646492
import torch import torch.nn as nn def context_gate_factory(gate_type, embeddings_size, decoder_size, attention_size, output_size): gate_types = {'source': SourceContextGate, 'target': TargetContextGate, 'both': BothContextGate} assert gate_type i...
true
true
1c1c003bb0fe6ee06e00624a7c2e64aa48493025
2,544
py
Python
pygatt/backends/bgapi/error_codes.py
guillempages/pygatt
ab24980d84e3d7043802e3ff27d1bd7412a584cc
[ "Apache-2.0" ]
504
2016-01-04T16:38:50.000Z
2022-03-31T14:10:56.000Z
pygatt/backends/bgapi/error_codes.py
guillempages/pygatt
ab24980d84e3d7043802e3ff27d1bd7412a584cc
[ "Apache-2.0" ]
222
2016-01-13T13:03:20.000Z
2022-03-14T09:33:19.000Z
pygatt/backends/bgapi/error_codes.py
guillempages/pygatt
ab24980d84e3d7043802e3ff27d1bd7412a584cc
[ "Apache-2.0" ]
201
2016-01-13T04:01:44.000Z
2022-03-29T07:52:04.000Z
from __future__ import print_function from enum import Enum class ErrorCode(Enum): insufficient_authentication = 0x0405 return_codes = { 0: "Success", # BGAPI errors 0x0180: "Invalid parameter", 0x0181: "Device in wrong state", 0x0182: "Out of memory", 0x0183: "Feature not implemented",...
31.8
79
0.688286
from __future__ import print_function from enum import Enum class ErrorCode(Enum): insufficient_authentication = 0x0405 return_codes = { 0: "Success", 0x0180: "Invalid parameter", 0x0181: "Device in wrong state", 0x0182: "Out of memory", 0x0183: "Feature not implemented", 0x0184: "...
true
true
1c1c00622dd976471ec4abae065f8487dd700d5e
1,163
py
Python
odoo/custom/src/private/ext_account/report/__init__.py
ecosoft-odoo/mh-doodba
093f14850aaff337951b4829b24bf32eee6e6d40
[ "BSL-1.0" ]
1
2021-10-03T08:11:18.000Z
2021-10-03T08:11:18.000Z
odoo/custom/src/private/ext_account/report/__init__.py
ecosoft-odoo/mh-doodba
093f14850aaff337951b4829b24bf32eee6e6d40
[ "BSL-1.0" ]
null
null
null
odoo/custom/src/private/ext_account/report/__init__.py
ecosoft-odoo/mh-doodba
093f14850aaff337951b4829b24bf32eee6e6d40
[ "BSL-1.0" ]
null
null
null
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2008 Camtocamp SA # @author JB Aubort, Nicolas Bessi, Joel Grand-Guillaume # European Central Bank and Polish National Bank invented by Grzegorz Grzelak # Banxico implemented by Agustin C...
44.730769
80
0.638865
true
true
1c1c0082380754dbca9bf9eb39c501570ea789c6
152
py
Python
confirmaction/__init__.py
Zapix/django-confirmaction
d3657a907bb42c2c29e4cfb85af98378da1bd101
[ "BSD-2-Clause" ]
3
2015-05-18T13:49:36.000Z
2015-05-18T14:37:31.000Z
confirmaction/__init__.py
Zapix/django-confirmaction
d3657a907bb42c2c29e4cfb85af98378da1bd101
[ "BSD-2-Clause" ]
null
null
null
confirmaction/__init__.py
Zapix/django-confirmaction
d3657a907bb42c2c29e4cfb85af98378da1bd101
[ "BSD-2-Clause" ]
null
null
null
from .main import set_action from .main import apply_action from .decorators import confirm_action __ALL__ = [set_action, confirm_action, apply_action]
30.4
52
0.835526
from .main import set_action from .main import apply_action from .decorators import confirm_action __ALL__ = [set_action, confirm_action, apply_action]
true
true
1c1c00f5cbe74d4d8894b52fb4b2cca94b648f3b
2,571
py
Python
tf/claire/lambda/snapshot_volumes.py
roguehedgehog/claire
e8a2cb84eeef5a7802189e9815411dc0b292f49a
[ "Apache-2.0" ]
1
2021-06-22T20:32:35.000Z
2021-06-22T20:32:35.000Z
tf/claire/lambda/snapshot_volumes.py
roguehedgehog/claire
e8a2cb84eeef5a7802189e9815411dc0b292f49a
[ "Apache-2.0" ]
null
null
null
tf/claire/lambda/snapshot_volumes.py
roguehedgehog/claire
e8a2cb84eeef5a7802189e9815411dc0b292f49a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 from functools import reduce from boto3 import client from instance import InstanceService from investigation_logger import CLAIRE class SnapshotCreationService: ec2 = client("ec2") instance_service: InstanceService logger: callable def __init__(self, investigation_id: str):...
32.1375
79
0.625049
from functools import reduce from boto3 import client from instance import InstanceService from investigation_logger import CLAIRE class SnapshotCreationService: ec2 = client("ec2") instance_service: InstanceService logger: callable def __init__(self, investigation_id: str): self.instance...
true
true
1c1c01128378414a1b90d4fcb6027f6c9be6a275
1,003
py
Python
python/data_wrangling_components/engine/verbs/union.py
dreness/data-wrangling-components
cf1a6eb152bb4f2fd1d3b933b9aa32b965a29610
[ "MIT" ]
null
null
null
python/data_wrangling_components/engine/verbs/union.py
dreness/data-wrangling-components
cf1a6eb152bb4f2fd1d3b933b9aa32b965a29610
[ "MIT" ]
null
null
null
python/data_wrangling_components/engine/verbs/union.py
dreness/data-wrangling-components
cf1a6eb152bb4f2fd1d3b933b9aa32b965a29610
[ "MIT" ]
null
null
null
# # Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project. # import pandas as pd from data_wrangling_components.table_store import TableStore from data_wrangling_components.types import SetOperationArgs, Step def union(step: Step, store: TableStor...
32.354839
84
0.703888
import pandas as pd from data_wrangling_components.table_store import TableStore from data_wrangling_components.types import SetOperationArgs, Step def union(step: Step, store: TableStore): args = SetOperationArgs(others=step.args["others"]) input_table = store.get(step.input) others = [st...
true
true
1c1c027e1841515fe661abbb9748004be5513c54
1,740
py
Python
tests/test_base_usage.py
congma/libsncompress
ef0c8ee36b8a53b6106ade675d5210fa6e4d5409
[ "BSD-3-Clause" ]
1
2018-03-12T14:40:08.000Z
2018-03-12T14:40:08.000Z
tests/test_base_usage.py
congma/libsncompress
ef0c8ee36b8a53b6106ade675d5210fa6e4d5409
[ "BSD-3-Clause" ]
null
null
null
tests/test_base_usage.py
congma/libsncompress
ef0c8ee36b8a53b6106ade675d5210fa6e4d5409
[ "BSD-3-Clause" ]
null
null
null
"""Testing usage of libsncompress.base""" import os import os.path import pytest import six import six.moves as sm import numpy from numpy.random import shuffle import libsncompress from lsnz_test_infra import jla_full_paths, outdir @pytest.fixture def extra_file(jla_full_paths): fits_dir = jla_full_paths[0] ...
30.526316
72
0.691954
import os import os.path import pytest import six import six.moves as sm import numpy from numpy.random import shuffle import libsncompress from lsnz_test_infra import jla_full_paths, outdir @pytest.fixture def extra_file(jla_full_paths): fits_dir = jla_full_paths[0] fpath = os.path.join(fits_dir, "test_tmp.d...
true
true
1c1c0283ee223db97b1c7e1e755711892c99b83e
595
py
Python
tests/__init__.py
rainforestapp/digestive
3d9dc0c975f8887a7f2255a420893551d3144a7f
[ "MIT" ]
1
2015-10-16T19:42:26.000Z
2015-10-16T19:42:26.000Z
tests/__init__.py
rainforestapp/digestive
3d9dc0c975f8887a7f2255a420893551d3144a7f
[ "MIT" ]
null
null
null
tests/__init__.py
rainforestapp/digestive
3d9dc0c975f8887a7f2255a420893551d3144a7f
[ "MIT" ]
null
null
null
from mocktest import mock, MockTransaction class MockMixin(object): def setUp(self): MockTransaction.__enter__() super(MockMixin, self).setUp() def tearDown(self): super(MockMixin, self).tearDown() MockTransaction.__exit__() def validate_mocks(self): """ Fo...
22.884615
82
0.623529
from mocktest import mock, MockTransaction class MockMixin(object): def setUp(self): MockTransaction.__enter__() super(MockMixin, self).setUp() def tearDown(self): super(MockMixin, self).tearDown() MockTransaction.__exit__() def validate_mocks(self): MockTransactio...
true
true
1c1c031808055e3ee9fb8e4ed7e95e4e4802f4b0
2,054
py
Python
python_packages_static/pydrograph/tests/test_notebooks.py
usgs/neversink_workflow
acd61435b8553e38d4a903c8cd7a3afc612446f9
[ "CC0-1.0" ]
5
2020-05-11T16:05:38.000Z
2021-11-03T22:01:24.000Z
python_packages_static/pydrograph/tests/test_notebooks.py
usgs/neversink_workflow
acd61435b8553e38d4a903c8cd7a3afc612446f9
[ "CC0-1.0" ]
7
2020-08-19T15:53:54.000Z
2022-03-31T21:56:22.000Z
python_packages_static/pydrograph/tests/test_notebooks.py
usgs/neversink_workflow
acd61435b8553e38d4a903c8cd7a3afc612446f9
[ "CC0-1.0" ]
6
2020-07-31T16:00:03.000Z
2022-03-04T20:54:57.000Z
import glob import os import pytest def included_notebooks(): include = ['examples/Notebooks'] files = [] for folder in include: files += glob.glob(os.path.join(folder, '*.ipynb')) return sorted(files) @pytest.fixture(params=included_notebooks(), scope='module') def notebook(request): r...
34.233333
89
0.663583
import glob import os import pytest def included_notebooks(): include = ['examples/Notebooks'] files = [] for folder in include: files += glob.glob(os.path.join(folder, '*.ipynb')) return sorted(files) @pytest.fixture(params=included_notebooks(), scope='module') def notebook(request): r...
true
true
1c1c0456b60bf2a3614a4ae306d622b8ade5cdd0
2,200
py
Python
aiwolf/vote.py
AIWolfSharp/aiwolf-python
78c4ef4f3dce7c7f786330a684623a0ec1a7243b
[ "Apache-2.0" ]
null
null
null
aiwolf/vote.py
AIWolfSharp/aiwolf-python
78c4ef4f3dce7c7f786330a684623a0ec1a7243b
[ "Apache-2.0" ]
null
null
null
aiwolf/vote.py
AIWolfSharp/aiwolf-python
78c4ef4f3dce7c7f786330a684623a0ec1a7243b
[ "Apache-2.0" ]
null
null
null
# # vote.py # # Copyright 2022 OTSUKI Takashi # # 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...
29.333333
101
0.630909
from __future__ import annotations from typing import TypedDict from aiwolf.agent import Agent from aiwolf.constant import AGENT_NONE class _Vote(TypedDict): agent: int day: int target: int class Vote: agent: Agent day: int target: Agent def __init__(self, agent: Agen...
true
true
1c1c058ff7bd3629abe1b5fc330c0f394af6476d
133
py
Python
Python Code/length_of_tuple.py
VamsiKrishna04/Hacktoberfest_2021-1
6d0d217161957746a4b60b7d1f0f71db21026f5a
[ "MIT" ]
1
2021-10-20T12:15:27.000Z
2021-10-20T12:15:27.000Z
Python Code/length_of_tuple.py
VamsiKrishna04/Hacktoberfest_2021-1
6d0d217161957746a4b60b7d1f0f71db21026f5a
[ "MIT" ]
3
2021-10-22T04:46:25.000Z
2021-11-17T06:37:10.000Z
Python Code/length_of_tuple.py
VamsiKrishna04/Hacktoberfest_2021-1
6d0d217161957746a4b60b7d1f0f71db21026f5a
[ "MIT" ]
12
2021-10-21T13:56:49.000Z
2021-11-17T06:32:30.000Z
from typing import Tuple def find_length(tup: Tuple): return len(tup) sample_tuple = (1,2,3,4) print(find_length(sample_tuple))
19
32
0.744361
from typing import Tuple def find_length(tup: Tuple): return len(tup) sample_tuple = (1,2,3,4) print(find_length(sample_tuple))
true
true
1c1c05dd7e4343bf907df17b866bc864828fc1d9
5,519
py
Python
contrib/seeds/makeseeds.py
bontecoin/bontecoin-core
a7c368cf25339b9495e94651ee2a036e4f3068ae
[ "MIT" ]
null
null
null
contrib/seeds/makeseeds.py
bontecoin/bontecoin-core
a7c368cf25339b9495e94651ee2a036e4f3068ae
[ "MIT" ]
null
null
null
contrib/seeds/makeseeds.py
bontecoin/bontecoin-core
a7c368cf25339b9495e94651ee2a036e4f3068ae
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2013-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Generate seeds.txt from Pieter's DNS seeder # NSEEDS=512 MAX_SEEDS_PER_ASN=2 MIN_BLOCKS = 615801 #...
32.087209
186
0.567313
# NSEEDS=512 MAX_SEEDS_PER_ASN=2 MIN_BLOCKS = 615801 # These are hosts that have been observed to be behaving strangely (e.g. # aggressively connecting to every node). SUSPICIOUS_HOSTS = { "" } import re import sys import dns.resolver import collections PATTERN_IPV4 = re.compile(r"^((\d{1,3})\.(\d{1,3})...
true
true
1c1c06324eea59088b9e6e0d7053d85889307c48
3,793
py
Python
src/unicon/plugins/tests/mock/mock_device_ios.py
TestingBytes/unicon.plugins
0600956d805deb4fd790aa3ef591c5d659e85de1
[ "Apache-2.0" ]
null
null
null
src/unicon/plugins/tests/mock/mock_device_ios.py
TestingBytes/unicon.plugins
0600956d805deb4fd790aa3ef591c5d659e85de1
[ "Apache-2.0" ]
null
null
null
src/unicon/plugins/tests/mock/mock_device_ios.py
TestingBytes/unicon.plugins
0600956d805deb4fd790aa3ef591c5d659e85de1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import re import sys import logging import argparse from unicon.mock.mock_device import MockDevice, MockDeviceTcpWrapper, wait_key logger = logging.getLogger(__name__) class MockDeviceIOS(MockDevice): def __init__(self, *args, **kwargs): super().__init__(*args, device_os='ios', ...
32.698276
82
0.593989
import re import sys import logging import argparse from unicon.mock.mock_device import MockDevice, MockDeviceTcpWrapper, wait_key logger = logging.getLogger(__name__) class MockDeviceIOS(MockDevice): def __init__(self, *args, **kwargs): super().__init__(*args, device_os='ios', **kwargs) self...
true
true
1c1c067d24b88eed38ec37a67e12fe0d0a587db9
578
py
Python
Ricardo_OS/Python_backend/apps/socketio_redis_adapter.py
icl-rocketry/Avionics
4fadbccb1cafe4be80c76e15a2546bbb8414398b
[ "MIT" ]
8
2020-01-28T18:35:21.000Z
2021-11-20T13:34:25.000Z
Ricardo_OS/Python_backend/apps/socketio_redis_adapter.py
icl-rocketry/Avionics
4fadbccb1cafe4be80c76e15a2546bbb8414398b
[ "MIT" ]
2
2022-02-15T08:29:49.000Z
2022-02-28T02:13:06.000Z
Ricardo_OS/Python_backend/apps/socketio_redis_adapter.py
icl-rocketry/Avionics
4fadbccb1cafe4be80c76e15a2546bbb8414398b
[ "MIT" ]
1
2020-12-06T05:20:51.000Z
2020-12-06T05:20:51.000Z
import socketio import redis import json r = redis.Redis("localhost","6000") # standard Python sio = socketio.Client(logger=False, engineio_logger=False) sio.connect('http://localhost:1337',namespaces=['/','/telemetry']) @sio.event def connect(): print("I'm connected!") @sio.event def connect_error(data): p...
19.266667
66
0.704152
import socketio import redis import json r = redis.Redis("localhost","6000") sio = socketio.Client(logger=False, engineio_logger=False) sio.connect('http://localhost:1337',namespaces=['/','/telemetry']) @sio.event def connect(): print("I'm connected!") @sio.event def connect_error(data): print("The connect...
true
true
1c1c06a5f2fd1746b831968ec2394fc2e3c54a63
3,727
py
Python
keras/lstm-securitai/model/pipeline_invoke_python.py
PipelineAI/models
d8df07877aa8b10ce9b84983bb440af75e84dca7
[ "Apache-2.0" ]
44
2017-11-17T06:19:05.000Z
2021-11-03T06:00:56.000Z
keras/lstm-securitai/model/pipeline_invoke_python.py
PipelineAI/models
d8df07877aa8b10ce9b84983bb440af75e84dca7
[ "Apache-2.0" ]
3
2018-08-09T14:28:17.000Z
2018-09-10T03:32:42.000Z
keras/lstm-securitai/model/pipeline_invoke_python.py
PipelineAI/models
d8df07877aa8b10ce9b84983bb440af75e84dca7
[ "Apache-2.0" ]
21
2017-11-18T15:12:12.000Z
2020-08-15T07:08:33.000Z
import io import os import numpy as np import pandas import json import logging #<== Optional. Log to console, file, kafka from pipeline_monitor import prometheus_monitor as monitor #<== Optional. Monitor runtime metrics from pipeline_logger import log import tenso...
38.822917
127
0.648779
import io import os import numpy as np import pandas import json import logging from pipeline_monitor import prometheus_monitor as monitor from pipeline_logger import log import tensorflow as tf from tensorflow.contrib import predictor from keras.models import Sequ...
true
true
1c1c06aca164cac6d4e094ad2d8dabd274a56ba2
9,108
py
Python
DQMOffline/Configuration/python/DQMOffline_SecondStep_cff.py
gputtley/cmssw
c1ef8454804e4ebea8b65f59c4a952a6c94fde3b
[ "Apache-2.0" ]
2
2017-09-29T13:32:51.000Z
2019-01-31T00:40:58.000Z
DQMOffline/Configuration/python/DQMOffline_SecondStep_cff.py
gputtley/cmssw
c1ef8454804e4ebea8b65f59c4a952a6c94fde3b
[ "Apache-2.0" ]
8
2020-03-20T23:18:36.000Z
2020-05-27T11:00:06.000Z
DQMOffline/Configuration/python/DQMOffline_SecondStep_cff.py
gputtley/cmssw
c1ef8454804e4ebea8b65f59c4a952a6c94fde3b
[ "Apache-2.0" ]
3
2017-06-07T15:22:28.000Z
2019-02-28T20:48:30.000Z
import FWCore.ParameterSet.Config as cms from DQMServices.Components.DQMMessageLoggerClient_cff import * from DQMServices.Components.DQMFastTimerServiceClient_cfi import * from DQMOffline.Ecal.ecal_dqm_client_offline_cff import * from DQM.EcalPreshowerMonitorClient.es_dqm_client_offline_cff import * from DQM.SiStripM...
43.371429
109
0.663373
import FWCore.ParameterSet.Config as cms from DQMServices.Components.DQMMessageLoggerClient_cff import * from DQMServices.Components.DQMFastTimerServiceClient_cfi import * from DQMOffline.Ecal.ecal_dqm_client_offline_cff import * from DQM.EcalPreshowerMonitorClient.es_dqm_client_offline_cff import * from DQM.SiStripM...
true
true
1c1c06da50ca584ee09743ae52fbe3b6fff4908a
4,020
py
Python
src/azure-cli-telemetry/azure/cli/telemetry/__init__.py
Edmund-Shi/azure-cli
cc9cf7d8e7e873f6adcefe4c0be6b31e2530da61
[ "MIT" ]
null
null
null
src/azure-cli-telemetry/azure/cli/telemetry/__init__.py
Edmund-Shi/azure-cli
cc9cf7d8e7e873f6adcefe4c0be6b31e2530da61
[ "MIT" ]
null
null
null
src/azure-cli-telemetry/azure/cli/telemetry/__init__.py
Edmund-Shi/azure-cli
cc9cf7d8e7e873f6adcefe4c0be6b31e2530da61
[ "MIT" ]
1
2020-09-07T18:44:14.000Z
2020-09-07T18:44:14.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
38.653846
119
0.643781
import sys import os import subprocess import portalocker from azure.cli.telemetry.util import save_payload def _start(config_dir): from azure.cli.telemetry.components.telemetry_logging import get_logger logger = get_logger('process') args = [sys.executable, os.path.realpath(__file__), config_dir]...
true
true
1c1c0709b8edcad4d25edc47e0a618d9112b817e
453
py
Python
tests/resources/test_version.py
reed-only/flask_app
52010732478d4faa9318a7d76cbf2802671e8378
[ "MIT" ]
2
2017-12-17T19:55:16.000Z
2018-01-13T01:00:16.000Z
tests/resources/test_version.py
reed-only/flask_app
52010732478d4faa9318a7d76cbf2802671e8378
[ "MIT" ]
null
null
null
tests/resources/test_version.py
reed-only/flask_app
52010732478d4faa9318a7d76cbf2802671e8378
[ "MIT" ]
null
null
null
""" Tests for version resource """ from unittest import TestCase import requests from tests.resources import API_HOST class TestVersion(TestCase): """ Tests for version resource """ def test_version(self): """ Test get version """ response = requests.get(API_HOST + '...
19.695652
69
0.631347
from unittest import TestCase import requests from tests.resources import API_HOST class TestVersion(TestCase): def test_version(self): response = requests.get(API_HOST + '/version') self.assertEqual(response.status_code, 200) self.assertRegex(response.json().get('version'), r'\d+\.\d+'...
true
true
1c1c07a456a8584b06fcb7677f09806c65294da9
3,032
py
Python
reconcile/github_owners.py
janboll/qontract-reconcile
20d8136dfaec76700aa2b0487e9f7a02adae566c
[ "Apache-2.0" ]
null
null
null
reconcile/github_owners.py
janboll/qontract-reconcile
20d8136dfaec76700aa2b0487e9f7a02adae566c
[ "Apache-2.0" ]
null
null
null
reconcile/github_owners.py
janboll/qontract-reconcile
20d8136dfaec76700aa2b0487e9f7a02adae566c
[ "Apache-2.0" ]
null
null
null
import os import logging from github import Github from sretoolbox.utils import retry from reconcile.utils import gql from reconcile.utils import expiration from reconcile.github_org import get_config from reconcile.utils.raw_github_api import RawGithubApi ROLES_QUERY = """ { roles: roles_v1 { name users...
30.32
77
0.649077
import os import logging from github import Github from sretoolbox.utils import retry from reconcile.utils import gql from reconcile.utils import expiration from reconcile.github_org import get_config from reconcile.utils.raw_github_api import RawGithubApi ROLES_QUERY = """ { roles: roles_v1 { name users...
true
true
1c1c07c39e5dfc1d00a652a39b295966f16a1a8e
388
py
Python
polls/admin.py
awsbreathpanda/mysite
c3db9db48c26e93e459875b267e1eebb90dc79a3
[ "MIT" ]
null
null
null
polls/admin.py
awsbreathpanda/mysite
c3db9db48c26e93e459875b267e1eebb90dc79a3
[ "MIT" ]
null
null
null
polls/admin.py
awsbreathpanda/mysite
c3db9db48c26e93e459875b267e1eebb90dc79a3
[ "MIT" ]
null
null
null
from polls.models import Choice, Question from django.contrib import admin # Register your models here. class QuestionAdmin(admin.ModelAdmin): list_display = ['id', 'question_text', 'pub_date'] class ChoiceAdmin(admin.ModelAdmin): list_display = ['id', 'question', 'choice_text', 'votes'] admin.site.regist...
25.866667
61
0.757732
from polls.models import Choice, Question from django.contrib import admin class QuestionAdmin(admin.ModelAdmin): list_display = ['id', 'question_text', 'pub_date'] class ChoiceAdmin(admin.ModelAdmin): list_display = ['id', 'question', 'choice_text', 'votes'] admin.site.register(Question, QuestionAdmin) ...
true
true
1c1c07e6ce1c243f70ea82c1309da293c4ef16f7
1,461
py
Python
run_log_anonymizer.py
Elkoumy/Libra
d1db46bb1974fc7ca2aa8a564a6cf3792d17d968
[ "Apache-2.0" ]
null
null
null
run_log_anonymizer.py
Elkoumy/Libra
d1db46bb1974fc7ca2aa8a564a6cf3792d17d968
[ "Apache-2.0" ]
null
null
null
run_log_anonymizer.py
Elkoumy/Libra
d1db46bb1974fc7ca2aa8a564a6cf3792d17d968
[ "Apache-2.0" ]
null
null
null
"""In this file, we build the shell jobs to run on the slurm HPC""" import os import subprocess import time from Libra import anonymize_event_log dir_path = os.path.dirname(os.path.realpath(__file__)) jobs_dir = "jobs" """ A time limit of zero requests that no time limit be imposed. Acceptable time ...
26.089286
136
0.68104
import os import subprocess import time from Libra import anonymize_event_log dir_path = os.path.dirname(os.path.realpath(__file__)) jobs_dir = "jobs" datasets = ["CCC19_t", "Unrineweginfectie_t", "Sepsis_t","Traffic_t", "Hospital_t", "CreditReq_t", "BPIC15_t","BPIC20_t", "BPIC13_t", "BPIC12_t", "BPIC17_t...
true
true
1c1c0832c586ccb3898872a91b1cfd047a9e3e33
1,650
py
Python
display/PDA TM5000 800x480/module.py
rbryson74/gfx
656a3b443187c91e19cb78551a74a29ab0691de4
[ "0BSD" ]
null
null
null
display/PDA TM5000 800x480/module.py
rbryson74/gfx
656a3b443187c91e19cb78551a74a29ab0691de4
[ "0BSD" ]
null
null
null
display/PDA TM5000 800x480/module.py
rbryson74/gfx
656a3b443187c91e19cb78551a74a29ab0691de4
[ "0BSD" ]
null
null
null
# coding: utf-8 ############################################################################## # Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. # # Subject to your compliance with these terms, you may use Microchip software # and any derivatives exclusively with Microchip products. It is your # resp...
56.896552
115
0.710909
true
true
1c1c08974063c6dec89d97510e64f8372a44eb15
1,261
py
Python
sgains/commands/mapping_command.py
seqpipe/sgains
70a0e2b4087f7d4ac8db98f3e478f1ad36c2581b
[ "MIT" ]
null
null
null
sgains/commands/mapping_command.py
seqpipe/sgains
70a0e2b4087f7d4ac8db98f3e478f1ad36c2581b
[ "MIT" ]
null
null
null
sgains/commands/mapping_command.py
seqpipe/sgains
70a0e2b4087f7d4ac8db98f3e478f1ad36c2581b
[ "MIT" ]
null
null
null
''' Created on Aug 2, 2017 @author: lubo ''' import argparse from termcolor import colored from sgains.commands.common import GenomeIndexMixin, OptionsBase, MappingMixin from sgains.pipelines.mapping_pipeline import MappingPipeline class MappingCommand( MappingMixin, GenomeIndexMixin, Optio...
28.022222
78
0.671689
import argparse from termcolor import colored from sgains.commands.common import GenomeIndexMixin, OptionsBase, MappingMixin from sgains.pipelines.mapping_pipeline import MappingPipeline class MappingCommand( MappingMixin, GenomeIndexMixin, OptionsBase): def __init__(self, parser, subpa...
true
true
1c1c08f3450bcd885329792c7761dc01b90901e2
784
py
Python
davarocr/davarocr/davar_videotext/models/__init__.py
icedream2/DAVAR-Lab-OCR
c8b82f45516850eeadcab2739fb2a4292f2fdca1
[ "Apache-2.0" ]
387
2021-01-02T07:50:15.000Z
2022-03-31T04:30:03.000Z
davarocr/davarocr/davar_videotext/models/__init__.py
icedream2/DAVAR-Lab-OCR
c8b82f45516850eeadcab2739fb2a4292f2fdca1
[ "Apache-2.0" ]
70
2021-05-04T18:28:18.000Z
2022-03-31T14:14:52.000Z
davarocr/davarocr/davar_videotext/models/__init__.py
icedream2/DAVAR-Lab-OCR
c8b82f45516850eeadcab2739fb2a4292f2fdca1
[ "Apache-2.0" ]
83
2021-01-05T08:28:26.000Z
2022-03-31T07:14:03.000Z
""" ################################################################################################## # Copyright Info : Copyright (c) Davar Lab @ Hikvision Research Institute. All rights reserved. # Filename : __init__.py # Abstract : # Current Version: 1.0.0 # Date : 2020-05-31 ###...
41.263158
108
0.553571
from .seg_heads import yoro_recommender_head, spatial_tempo_east_head from .detectors import spatial_temporal_east_det from .recognizors import TextRecommender from .losses import triple_loss from .backbones import CustomResNet32 __all__=['spatial_temporal_east_det', 'spatial_tempo_east_head', 'yoro_recommender_head',...
true
true
1c1c08fc32f3f4f93f3469030460c4f25cb91773
11,691
py
Python
tests/core/server/test_dos.py
CallMeBrado/cunt-blockchain
9b140b7e5541f3baffabe02a55b75d9aeb889999
[ "Apache-2.0" ]
7
2021-08-09T19:01:51.000Z
2021-12-09T04:32:09.000Z
tests/core/server/test_dos.py
CallMeBrado/cunt-blockchain
9b140b7e5541f3baffabe02a55b75d9aeb889999
[ "Apache-2.0" ]
22
2021-08-17T04:12:11.000Z
2022-03-29T04:10:38.000Z
tests/core/server/test_dos.py
CallMeBrado/cunt-blockchain
9b140b7e5541f3baffabe02a55b75d9aeb889999
[ "Apache-2.0" ]
4
2021-09-05T12:04:51.000Z
2022-03-15T08:44:32.000Z
# flake8: noqa: F811, F401 import asyncio import logging import pytest from aiohttp import ClientSession, ClientTimeout, ServerDisconnectedError, WSCloseCode, WSMessage, WSMsgType from cunt.full_node.full_node_api import FullNodeAPI from cunt.protocols import full_node_protocol from cunt.protocols.protocol_message_ty...
36.195046
118
0.6712
import asyncio import logging import pytest from aiohttp import ClientSession, ClientTimeout, ServerDisconnectedError, WSCloseCode, WSMessage, WSMsgType from cunt.full_node.full_node_api import FullNodeAPI from cunt.protocols import full_node_protocol from cunt.protocols.protocol_message_types import ProtocolMessage...
true
true
1c1c091bba9dd0c93ca0b6313be2f23f5110fe77
3,255
py
Python
jogo-da-velha.py
gqmv/problemas-stream
a9bb4a598310658c61a03583ba8dd221e7b1eb0b
[ "MIT" ]
null
null
null
jogo-da-velha.py
gqmv/problemas-stream
a9bb4a598310658c61a03583ba8dd221e7b1eb0b
[ "MIT" ]
null
null
null
jogo-da-velha.py
gqmv/problemas-stream
a9bb4a598310658c61a03583ba8dd221e7b1eb0b
[ "MIT" ]
null
null
null
def obter_coordenadas(numero): if numero >= 0 and numero <= 3: return (0, numero - 1) if numero >= 4 and numero <= 6: return (1, numero - 4) if numero >= 7 and numero <= 9: return (2, numero - 7) raise ValueError def imprimir_tabuleiro(array_tabuleiro): for linha in arra...
26.463415
161
0.524731
def obter_coordenadas(numero): if numero >= 0 and numero <= 3: return (0, numero - 1) if numero >= 4 and numero <= 6: return (1, numero - 4) if numero >= 7 and numero <= 9: return (2, numero - 7) raise ValueError def imprimir_tabuleiro(array_tabuleiro): for linha in arra...
true
true
1c1c095cfa270f620b55db16f44473b4f136f086
1,743
py
Python
lib/Crypto/SelfTest/Protocol/__init__.py
jestinepaul/pycryptodome
d8800b7eb583d5d1b5e339752cdaaa05ef2c4ad0
[ "Unlicense" ]
2,063
2015-02-27T02:35:21.000Z
2022-03-31T01:21:11.000Z
lib/Crypto/SelfTest/Protocol/__init__.py
jestinepaul/pycryptodome
d8800b7eb583d5d1b5e339752cdaaa05ef2c4ad0
[ "Unlicense" ]
558
2015-04-07T06:14:57.000Z
2022-03-31T18:14:34.000Z
lib/Crypto/SelfTest/Protocol/__init__.py
jestinepaul/pycryptodome
d8800b7eb583d5d1b5e339752cdaaa05ef2c4ad0
[ "Unlicense" ]
671
2017-09-21T08:04:01.000Z
2022-03-29T14:30:07.000Z
# -*- coding: utf-8 -*- # # SelfTest/Protocol/__init__.py: Self-tests for Crypto.Protocol # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedicat...
38.733333
108
0.685026
__revision__ = "$Id$" def get_tests(config={}): tests = [] from Crypto.SelfTest.Protocol import test_rfc1751; tests += test_rfc1751.get_tests(config=config) from Crypto.SelfTest.Protocol import test_KDF; tests += test_KDF.get_tests(config=config) from Crypto.Self...
true
true
1c1c09ab8b33b786ad2791b5f5fc6b2dd20d7ddd
1,389
py
Python
spec/fonts/OpenBaskerville-0.0.53/tools/FONTLOG.py
Julusian/node-freetype2
be52fd5c8530bbb5d2486bccac5d698c578ef722
[ "MIT" ]
29
2015-03-16T14:59:48.000Z
2022-02-06T20:28:16.000Z
spec/fonts/OpenBaskerville-0.0.53/tools/FONTLOG.py
Julusian/node-freetype2
be52fd5c8530bbb5d2486bccac5d698c578ef722
[ "MIT" ]
34
2015-03-16T01:37:22.000Z
2022-02-19T10:51:03.000Z
spec/fonts/OpenBaskerville-0.0.53/tools/FONTLOG.py
isabella232/node-freetype2
c22d51f7c9d351e5968c87e4fe57c51d3b0eebaf
[ "MIT" ]
16
2015-02-11T14:11:37.000Z
2021-11-19T12:04:38.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- """ The FONTLOG is SIL’s concept of a chancelog for a font. When doing a release, we generate one automatically based on AUTHORS.txt, README.txt and the repository history. An example of a FONTLOG: http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=OFL-FAQ_web#...
21.703125
85
0.706983
""" The FONTLOG is SIL’s concept of a chancelog for a font. When doing a release, we generate one automatically based on AUTHORS.txt, README.txt and the repository history. An example of a FONTLOG: http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=OFL-FAQ_web#11bc4f28 (pretty url’s wouldn’t hurt the...
false
true
1c1c0a1408a08771b61fdf7be1cad459354ffa67
1,368
py
Python
matplotlibTUT/plt16_grid_subplot.py
subshine/tutorials
717320cbec72e3e68acefad9c367fc6c5ffb37b1
[ "MIT" ]
10,786
2016-06-10T10:58:42.000Z
2022-03-31T06:45:24.000Z
matplotlibTUT/plt16_grid_subplot.py
subshine/tutorials
717320cbec72e3e68acefad9c367fc6c5ffb37b1
[ "MIT" ]
73
2016-07-13T08:13:22.000Z
2020-11-08T04:57:08.000Z
matplotlibTUT/plt16_grid_subplot.py
subshine/tutorials
717320cbec72e3e68acefad9c367fc6c5ffb37b1
[ "MIT" ]
6,303
2016-06-19T03:29:27.000Z
2022-03-31T07:58:22.000Z
# View more python tutorials on my Youtube and Youku channel!!! # Youtube video tutorial: https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg # Youku video tutorial: http://i.youku.com/pythontutorial # 16 - grid """ Please note, this script is for python3+. If you are using python2+, please modify it accordingly...
27.918367
82
0.637427
import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec ax4_y') ax5 = plt.subplot2grid((3, 3), (2, 1))
true
true
1c1c0a1f99b5824221787167cf13da0f9e3d9e00
5,335
py
Python
src/lean_game_maker/line_reader.py
mmasdeu/Lean-game-maker
b2bb8f878c6e1076f9cc93c6f067463fd7a8f7a6
[ "Apache-2.0" ]
1
2021-12-14T16:21:06.000Z
2021-12-14T16:21:06.000Z
src/lean_game_maker/line_reader.py
mmasdeu/Lean-game-maker
b2bb8f878c6e1076f9cc93c6f067463fd7a8f7a6
[ "Apache-2.0" ]
null
null
null
src/lean_game_maker/line_reader.py
mmasdeu/Lean-game-maker
b2bb8f878c6e1076f9cc93c6f067463fd7a8f7a6
[ "Apache-2.0" ]
null
null
null
from typing import Match, Callable, Optional, List, Type from pathlib import Path from urllib.request import urlopen import regex import copy from lean_game_maker.translator import Translator blank_line_regex = regex.compile(r'^\s*$') def dismiss_line(file_reader, line): pass class FileReader: def __init__...
39.813433
118
0.546392
from typing import Match, Callable, Optional, List, Type from pathlib import Path from urllib.request import urlopen import regex import copy from lean_game_maker.translator import Translator blank_line_regex = regex.compile(r'^\s*$') def dismiss_line(file_reader, line): pass class FileReader: def __init__...
true
true
1c1c0a32298009cc73f4bd4250f13238812633e5
4,809
py
Python
tests/test_pnlcalc.py
vtsyryuk/HackerRank-Python
ca364b6fdf1bc390187c084c6d1405905e9bdd4c
[ "MIT" ]
null
null
null
tests/test_pnlcalc.py
vtsyryuk/HackerRank-Python
ca364b6fdf1bc390187c084c6d1405905e9bdd4c
[ "MIT" ]
null
null
null
tests/test_pnlcalc.py
vtsyryuk/HackerRank-Python
ca364b6fdf1bc390187c084c6d1405905e9bdd4c
[ "MIT" ]
null
null
null
import pickle import unittest from nose.tools import assert_equal from hacker_rank.pnlcalc import HackerRankPnlCalculator class TestHackerRankPnlCalculator(unittest.TestCase): @staticmethod def read_data_from_single_string(input_string): """ Use this function to read the string in the input f...
69.695652
105
0.737367
import pickle import unittest from nose.tools import assert_equal from hacker_rank.pnlcalc import HackerRankPnlCalculator class TestHackerRankPnlCalculator(unittest.TestCase): @staticmethod def read_data_from_single_string(input_string): ordered_keys = ['closes', 'positions', 'currency_mapping', 'fx_...
true
true
1c1c0aa5fc5f70df5661853e74efa9b6732ae66c
745
py
Python
nomad_coder/users/signals.py
igwangsung/nomadgram
ec902cc3820f8b9ff082dd782a56ebef4de8c2e6
[ "MIT" ]
null
null
null
nomad_coder/users/signals.py
igwangsung/nomadgram
ec902cc3820f8b9ff082dd782a56ebef4de8c2e6
[ "MIT" ]
9
2021-03-09T01:22:59.000Z
2022-03-22T20:43:48.000Z
nomad_coder/users/signals.py
igwangsung/nomadgram
ec902cc3820f8b9ff082dd782a56ebef4de8c2e6
[ "MIT" ]
null
null
null
from allauth.account.signals import user_signed_up from django.dispatch import receiver from io import BytesIO from urllib.request import urlopen from django.core.files import File @receiver(user_signed_up) def user_signed_up(request, user, **kwargs): if len(user.socialaccount_set.all()) > 0: social_accoun...
37.25
63
0.704698
from allauth.account.signals import user_signed_up from django.dispatch import receiver from io import BytesIO from urllib.request import urlopen from django.core.files import File @receiver(user_signed_up) def user_signed_up(request, user, **kwargs): if len(user.socialaccount_set.all()) > 0: social_accoun...
true
true
1c1c0ae122f9f95feff0564e2c2254a866485164
14,700
py
Python
dns/tokenizer.py
liyongyue/dnsspider
ab29fb240c45bf16e146e96acff41aea29591f51
[ "0BSD" ]
null
null
null
dns/tokenizer.py
liyongyue/dnsspider
ab29fb240c45bf16e146e96acff41aea29591f51
[ "0BSD" ]
null
null
null
dns/tokenizer.py
liyongyue/dnsspider
ab29fb240c45bf16e146e96acff41aea29591f51
[ "0BSD" ]
null
null
null
# Copyright (C) 2003-2005 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND ...
34.186047
79
0.518095
"""Tokenize DNS master file format""" import cStringIO import sys import dns.exception import dns.name import dns.ttl _DELIMITERS = { ' ' : True, '\t' : True, '\n' : True, ';' : True, '(' : True, ')' : True, '"' : True } _QUOTING_DELIMITERS = { '"' : True } EOF = 0 EOL = ...
false
true
1c1c0b8b4da261ceb0f58df9b5f26a5c56785d95
995
py
Python
py32/create_csv.py
yerbn0409/Algorithm-Trading-Model
54452aabe5eb59dac061d89f4e74b0ad7c71ce20
[ "MIT" ]
1
2018-01-24T04:45:35.000Z
2018-01-24T04:45:35.000Z
py32/create_csv.py
yerbn0409/Algorithm-Trading-Model
54452aabe5eb59dac061d89f4e74b0ad7c71ce20
[ "MIT" ]
1
2018-01-25T02:57:22.000Z
2018-01-25T02:57:22.000Z
py32/create_csv.py
yerbn0409/Algorithm-Trading-Model
54452aabe5eb59dac061d89f4e74b0ad7c71ce20
[ "MIT" ]
null
null
null
import win32com.client import pandas as pd instCpStockCode = win32com.client.Dispatch("CpUtil.CpStockCode") instCpCodeMgr = win32com.client.Dispatch("CpUtil.CpCodeMgr") stockNum = instCpStockCode.GetCount() codeList = instCpCodeMgr.GetStockListByMarket(1) kospi = [] for i in range(stockNum): if instCpStockCode.G...
24.875
64
0.679397
import win32com.client import pandas as pd instCpStockCode = win32com.client.Dispatch("CpUtil.CpStockCode") instCpCodeMgr = win32com.client.Dispatch("CpUtil.CpCodeMgr") stockNum = instCpStockCode.GetCount() codeList = instCpCodeMgr.GetStockListByMarket(1) kospi = [] for i in range(stockNum): if instCpStockCode.G...
true
true
1c1c0d6172391f901bd65c5dd2b460a7549f0bc3
1,539
py
Python
chat/migrations/0001_initial.py
inf3rnus/ReNa-Chat-Django-Backend
983f34e0f1e6db99cf6be3a4fbfcf64bf7eaf108
[ "bzip2-1.0.6" ]
1
2020-09-09T23:07:49.000Z
2020-09-09T23:07:49.000Z
chat/migrations/0001_initial.py
inf3rnus/ReNa-Chat-Django-Backend
983f34e0f1e6db99cf6be3a4fbfcf64bf7eaf108
[ "bzip2-1.0.6" ]
8
2021-04-08T21:58:27.000Z
2022-03-12T00:44:58.000Z
chat/migrations/0001_initial.py
inf3rnus/ReNa-Chat-Django-Backend
983f34e0f1e6db99cf6be3a4fbfcf64bf7eaf108
[ "bzip2-1.0.6" ]
1
2020-12-14T07:10:57.000Z
2020-12-14T07:10:57.000Z
# Generated by Django 3.0.2 on 2020-01-16 04:26 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
39.461538
169
0.621832
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( ...
true
true
1c1c0e140ba0a0c662b5ea518366d708318d7497
4,612
py
Python
lhotse/recipes/ljspeech.py
stachu86/lhotse
d5e78154db2d4d52f15aaadc8882f76eb5b77640
[ "Apache-2.0" ]
353
2020-10-31T10:38:51.000Z
2022-03-30T05:22:52.000Z
lhotse/recipes/ljspeech.py
stachu86/lhotse
d5e78154db2d4d52f15aaadc8882f76eb5b77640
[ "Apache-2.0" ]
353
2020-10-27T23:25:12.000Z
2022-03-31T22:16:05.000Z
lhotse/recipes/ljspeech.py
stachu86/lhotse
d5e78154db2d4d52f15aaadc8882f76eb5b77640
[ "Apache-2.0" ]
66
2020-11-01T06:08:08.000Z
2022-03-29T02:03:07.000Z
""" The LJ Speech Dataset is a public domain speech dataset consisting of 13,100 short audio clips of a single speaker reading passages from 7 non-fiction books. A transcription is provided for each clip. Clips vary in length from 1 to 10 seconds and have a total length of approximately 24 hours. The texts were publis...
37.495935
116
0.691457
import logging import re import shutil import tarfile from pathlib import Path from typing import Dict, Optional, Union from lhotse import validate_recordings_and_supervisions from lhotse.audio import Recording, RecordingSet from lhotse.features import Fbank from lhotse.features.base import TorchaudioFeatureExtractor...
true
true
1c1c0e7b7d8e5b20151db3d915deea06786c99c9
2,742
py
Python
download_models.py
carson-sky/Patch-NetVLAD
7b913626b34dbbe250d6921a6a093512ee513eac
[ "MIT" ]
278
2021-03-02T06:29:35.000Z
2022-03-31T14:50:15.000Z
download_models.py
carson-sky/Patch-NetVLAD
7b913626b34dbbe250d6921a6a093512ee513eac
[ "MIT" ]
49
2021-03-04T00:58:19.000Z
2022-02-10T00:36:03.000Z
download_models.py
carson-sky/Patch-NetVLAD
7b913626b34dbbe250d6921a6a093512ee513eac
[ "MIT" ]
45
2021-03-04T00:13:45.000Z
2022-03-29T06:17:01.000Z
#!/usr/bin/env python import os import urllib.request from patchnetvlad.tools import PATCHNETVLAD_ROOT_DIR def ask_yesno(question): """ Helper to get yes / no answer from user. """ yes = {'yes', 'y'} no = {'no', 'n', 'q', 'quit'} # pylint: disable=invalid-name done = False print(questio...
52.730769
160
0.687454
import os import urllib.request from patchnetvlad.tools import PATCHNETVLAD_ROOT_DIR def ask_yesno(question): yes = {'yes', 'y'} no = {'no', 'n', 'q', 'quit'} done = False print(question) while not done: choice = input().lower() if choice in yes: return True ...
true
true
1c1c0edbddeedeadf3306d96ee9883b26457d077
7,549
py
Python
pace/ads/merkle/mht_node.py
LaudateCorpus1/PACE-python
eb61250886e51647bd1edb6d8f4fa7f83eb0bc81
[ "BSD-2-Clause" ]
7
2016-11-01T17:36:17.000Z
2021-03-12T08:54:36.000Z
pace/ads/merkle/mht_node.py
LaudateCorpus1/PACE-python
eb61250886e51647bd1edb6d8f4fa7f83eb0bc81
[ "BSD-2-Clause" ]
1
2016-11-29T00:38:28.000Z
2016-12-06T14:10:24.000Z
pace/ads/merkle/mht_node.py
LaudateCorpus1/PACE-python
eb61250886e51647bd1edb6d8f4fa7f83eb0bc81
[ "BSD-2-Clause" ]
6
2020-09-09T08:33:17.000Z
2022-01-06T07:02:40.000Z
## ************** ## Copyright 2014 MIT Lincoln Laboratory ## Project: PACE ## Authors: ZS ## Description: Inner nodes in MHTs ## Modifications: ## Date Name Modification ## ---- ---- ------------ ## 18 Jul 2014 ZS Original file ## ************** import bisect from pace.ads.merkle.mht_ut...
32.965066
88
0.550272
self.right = right self.parent = None self.elem = elem def __eq__(self, n2): if (self.hval == n2.hval and self.left == n2.left and self.right == n2.right and self.elem == n2.elem and ((self.parent and n2.parent) or ...
true
true
1c1c0eed884ff85be3971af31c882b4087729d34
4,014
py
Python
bot.py
Lost1419/Python-Discord-Bot-Template
516627ca9338c4ece8dfbacfd1968c5611417050
[ "Apache-2.0" ]
null
null
null
bot.py
Lost1419/Python-Discord-Bot-Template
516627ca9338c4ece8dfbacfd1968c5611417050
[ "Apache-2.0" ]
null
null
null
bot.py
Lost1419/Python-Discord-Bot-Template
516627ca9338c4ece8dfbacfd1968c5611417050
[ "Apache-2.0" ]
null
null
null
"""" Copyright © Krypton 2020 - https://github.com/kkrypt0nn Description: This is a template to create your own discord bot in python. Version: 2.0 """ import discord, asyncio, os, platform, sys from discord.ext import commands, tasks from itertools import cycle if not os.path.isfile("config.py"): sys.exit("'config....
32.112
119
0.743398
import discord, asyncio, os, platform, sys from discord.ext import commands, tasks from itertools import cycle if not os.path.isfile("config.py"): sys.exit("'config.py' not found! Please add it and try again.") else: import config intents = discord.Intents.default() bot = commands.Bot(command_prefix=config.BOT_P...
true
true
1c1c0f09302e6304152eefe05a8319e9c16d3d81
3,145
py
Python
senadores/settings.py
joseguilherme-dev/senadores
747827becf19ecd7977fba662f942444cd740932
[ "MIT" ]
null
null
null
senadores/settings.py
joseguilherme-dev/senadores
747827becf19ecd7977fba662f942444cd740932
[ "MIT" ]
null
null
null
senadores/settings.py
joseguilherme-dev/senadores
747827becf19ecd7977fba662f942444cd740932
[ "MIT" ]
null
null
null
# Scrapy settings for senadores project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # https://docs.scrapy.org/en/latest/topics/settings.html # https://docs.scrapy.org/en/latest/topics/downloader-middlewa...
34.56044
103
0.777742
BOT_NAME = 'senadores' SPIDER_MODULES = ['senadores.spiders'] NEWSPIDER_MODULE = 'senadores.spiders' ROBOTSTXT_OBEY = True ITEM_PIPELINES = { 'senadores.pipelines.MongoPipeline': 300, } 127.0.0.1' MONGO_DATABASE = 'senators'
true
true
1c1c0f7800a808668059c7ec1ac47a7bd614b594
319
py
Python
literal/apps/authentication/models.py
spanickroon/Text-From-Photo-Django-API
e1ef79c90a443cc3e606dec9e1c531aa5943ca59
[ "MIT" ]
null
null
null
literal/apps/authentication/models.py
spanickroon/Text-From-Photo-Django-API
e1ef79c90a443cc3e606dec9e1c531aa5943ca59
[ "MIT" ]
null
null
null
literal/apps/authentication/models.py
spanickroon/Text-From-Photo-Django-API
e1ef79c90a443cc3e606dec9e1c531aa5943ca59
[ "MIT" ]
1
2021-06-08T18:06:21.000Z
2021-06-08T18:06:21.000Z
from django.contrib.auth.models import User from django.db import models class UserProfile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE, null=False) quantity_orders = models.IntegerField(default=0, null=False) def __str__(self) -> str: return f"{self.user.username}"
29
75
0.739812
from django.contrib.auth.models import User from django.db import models class UserProfile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE, null=False) quantity_orders = models.IntegerField(default=0, null=False) def __str__(self) -> str: return f"{self.user.username}"
true
true