hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c2e83de294b08d097eda13bb958e629ecbb541e
7,059
py
Python
ParamGenerator/Phoenics/BayesianNeuralNetwork/pymc3_interface.py
Tabor-Research-Group/ChemOS
50117f572e95e68dc4dccb624cedb28dbfc6e419
[ "Apache-2.0" ]
37
2018-03-20T21:23:11.000Z
2022-03-26T08:19:20.000Z
ParamGenerator/Phoenics/BayesianNeuralNetwork/pymc3_interface.py
Tabor-Research-Group/ChemOS
50117f572e95e68dc4dccb624cedb28dbfc6e419
[ "Apache-2.0" ]
1
2021-06-29T10:03:22.000Z
2021-06-29T10:03:22.000Z
ParamGenerator/Phoenics/BayesianNeuralNetwork/pymc3_interface.py
Tabor-Research-Group/ChemOS
50117f572e95e68dc4dccb624cedb28dbfc6e419
[ "Apache-2.0" ]
10
2018-05-16T21:04:05.000Z
2021-10-15T18:14:06.000Z
#!/usr/bin/env python __author__ = 'Florian Hase' #======================================================================== import numpy as np import theano import theano.tensor as T import pymc3 as pm from Utils.utils import VarDictParser #from BayesianNeuralNetwork.distributions import DiscreteLaplace #======...
41.523529
170
0.696274
__author__ = 'Florian Hase' import numpy as np import theano import theano.tensor as T import pymc3 as pm from Utils.utils import VarDictParser class Pymc3Network(VarDictParser): def __init__(self, var_dicts, observed_params, observed_losses, batch_size, model_details): VarDictParser.__init__(self, var_dict...
true
true
1c2e84f9242aa5d5ab7410159ed00ce8f79e48be
460
py
Python
Matplotlib/Part 4/Part4.py
aritraroy24/Learning_NumPy_SciPy
cd33fbcb7dee11547b7c6e30692866373fb0ea5b
[ "MIT" ]
null
null
null
Matplotlib/Part 4/Part4.py
aritraroy24/Learning_NumPy_SciPy
cd33fbcb7dee11547b7c6e30692866373fb0ea5b
[ "MIT" ]
null
null
null
Matplotlib/Part 4/Part4.py
aritraroy24/Learning_NumPy_SciPy
cd33fbcb7dee11547b7c6e30692866373fb0ea5b
[ "MIT" ]
null
null
null
from matplotlib import pyplot as plt plt.style.use("fivethirtyeight") hours = [1, 2, 3, 4, 5, 6, 7, 8, 9] dev1 = [8, 6, 5, 5, 4, 2, 1, 1, 0] dev2 = [0, 1, 2, 2, 2, 4, 4, 4, 4] dev3 = [0, 1, 1, 1, 2, 2, 3, 3, 4] labels = ['Dev1', 'Dev2', 'Dev3'] colors = ['#6d904f', '#fc4f30', '#008fd5'] plt.stackplot(hours, dev1...
20.909091
68
0.591304
from matplotlib import pyplot as plt plt.style.use("fivethirtyeight") hours = [1, 2, 3, 4, 5, 6, 7, 8, 9] dev1 = [8, 6, 5, 5, 4, 2, 1, 1, 0] dev2 = [0, 1, 2, 2, 2, 4, 4, 4, 4] dev3 = [0, 1, 1, 1, 2, 2, 3, 3, 4] labels = ['Dev1', 'Dev2', 'Dev3'] colors = ['#6d904f', '#fc4f30', '#008fd5'] plt.stackplot(hours, dev1...
true
true
1c2e85128466df3e710be0f1ad094ceda7965972
10,591
py
Python
PythonExercises.py
jaxalbert/PythonExperiments
e5c658be1969b59be9a85a969db0e298f7e23bd6
[ "MIT" ]
2
2018-03-05T06:14:35.000Z
2019-01-08T15:32:30.000Z
PythonExercises.py
jaxalbert/PythonExperiments
e5c658be1969b59be9a85a969db0e298f7e23bd6
[ "MIT" ]
null
null
null
PythonExercises.py
jaxalbert/PythonExperiments
e5c658be1969b59be9a85a969db0e298f7e23bd6
[ "MIT" ]
null
null
null
#!/usr/bin/env python def stemWord(w): """Renders a word in to its generic form. This function is used preprocess words for NLP. It removes all trailing punctuation marks "';-?.,!:". It also removes the possessive "'s" from words. And it converts it to all lower case Args: w (...
35.901695
147
0.589274
def stemWord(w): w=w.split("'")[0]#Separates and eliminates all after the "'" w=[letter for letter in w if not (letter in ';-?.,!:')] return ''.join(w).lower() class LanguageModel: @staticmethod def getWordFreq(txt): list1 = txt.split() newlist = [] dic = {} ...
true
true
1c2e8556fed0cb0df722a9c46df711a1dc400983
14,733
py
Python
yolov3_tf2/models.py
makra89/Quake_AI
8df69c75b117079f5e40929341c4638e741de11d
[ "BSD-3-Clause" ]
4
2022-02-10T22:13:37.000Z
2022-03-27T18:44:38.000Z
yolov3_tf2/models.py
makra89/Quake_AI
8df69c75b117079f5e40929341c4638e741de11d
[ "BSD-3-Clause" ]
14
2021-08-29T13:36:12.000Z
2021-09-22T05:22:57.000Z
yolov3_tf2/models.py
makra89/Quake_AI
8df69c75b117079f5e40929341c4638e741de11d
[ "BSD-3-Clause" ]
1
2021-11-21T21:01:31.000Z
2021-11-21T21:01:31.000Z
import numpy as np import tensorflow as tf from tensorflow.keras import Model from tensorflow.keras.layers import ( Add, Concatenate, Conv2D, Input, Lambda, LeakyReLU, MaxPool2D, UpSampling2D, ZeroPadding2D, BatchNormalization, ) from tensorflow.keras.regularizers import l2 from ...
36.924812
110
0.602525
import numpy as np import tensorflow as tf from tensorflow.keras import Model from tensorflow.keras.layers import ( Add, Concatenate, Conv2D, Input, Lambda, LeakyReLU, MaxPool2D, UpSampling2D, ZeroPadding2D, BatchNormalization, ) from tensorflow.keras.regularizers import l2 from ...
true
true
1c2e86674db23f39db6bd3763d114c2f1fca0050
2,508
py
Python
test_jsondb.py
andreixk/SimpleRecipeManagerAPI
240d536fc6783005c8fb48f54a75dfb7654b7680
[ "MIT" ]
null
null
null
test_jsondb.py
andreixk/SimpleRecipeManagerAPI
240d536fc6783005c8fb48f54a75dfb7654b7680
[ "MIT" ]
null
null
null
test_jsondb.py
andreixk/SimpleRecipeManagerAPI
240d536fc6783005c8fb48f54a75dfb7654b7680
[ "MIT" ]
null
null
null
import pytest from fastapi.testclient import TestClient from unittest import mock from unittest.mock import mock_open import json from jsondb import PrimitiveStorage, ObjectStorage from conftest import Stub class TestStorage(): @pytest.mark.parametrize('Storage,fake_data', [ (PrimitiveStorage, ['a','b']), ...
41.8
86
0.639155
import pytest from fastapi.testclient import TestClient from unittest import mock from unittest.mock import mock_open import json from jsondb import PrimitiveStorage, ObjectStorage from conftest import Stub class TestStorage(): @pytest.mark.parametrize('Storage,fake_data', [ (PrimitiveStorage, ['a','b']), ...
true
true
1c2e8693a0bd5d8977f78731eb94fec0b7bbd19d
22,241
py
Python
test/functional/test_framework/util.py
minblock/watacoin
39b64687af9237feed324ee01e330e153aa5bc36
[ "MIT" ]
null
null
null
test/functional/test_framework/util.py
minblock/watacoin
39b64687af9237feed324ee01e330e153aa5bc36
[ "MIT" ]
null
null
null
test/functional/test_framework/util.py
minblock/watacoin
39b64687af9237feed324ee01e330e153aa5bc36
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Helpful routines for regression testing.""" from base64 import b64encode from binascii import hexlify,...
38.882867
140
0.652309
from base64 import b64encode from binascii import hexlify, unhexlify from decimal import Decimal, ROUND_DOWN import hashlib import inspect import json import logging import os import random import re from subprocess import CalledProcessError import time from . import coverage from .authproxy import AuthServiceProxy, ...
true
true
1c2e869b0603b84c2ae7af7ba218f65b9f92ec56
17,754
py
Python
wagl/data.py
ASVincent/wagl
cf3a72e53e53f3a7b2f2b5308068069b1b714f2a
[ "Apache-2.0" ]
null
null
null
wagl/data.py
ASVincent/wagl
cf3a72e53e53f3a7b2f2b5308068069b1b714f2a
[ "Apache-2.0" ]
null
null
null
wagl/data.py
ASVincent/wagl
cf3a72e53e53f3a7b2f2b5308068069b1b714f2a
[ "Apache-2.0" ]
1
2019-01-23T00:51:56.000Z
2019-01-23T00:51:56.000Z
""" Data access functions --------------------- """ from __future__ import absolute_import from os.path import join as pjoin, basename, dirname import subprocess import tempfile import logging import numpy as np import h5py import rasterio from rasterio.crs import CRS from rasterio.warp import reproject from rasterio...
34.340426
77
0.611299
from __future__ import absolute_import from os.path import join as pjoin, basename, dirname import subprocess import tempfile import logging import numpy as np import h5py import rasterio from rasterio.crs import CRS from rasterio.warp import reproject from rasterio.enums import Resampling from wagl.geobox import Gri...
true
true
1c2e87352e339ee35eb0dfb1569501950c26402b
388
py
Python
nudni/wsgi.py
misli/nudni
a0c03cd3104a57d5104dd1f593a777a3571fca4d
[ "BSD-3-Clause" ]
2
2017-11-18T11:12:10.000Z
2017-11-18T11:12:12.000Z
nudni/wsgi.py
misli/nudni
a0c03cd3104a57d5104dd1f593a777a3571fca4d
[ "BSD-3-Clause" ]
null
null
null
nudni/wsgi.py
misli/nudni
a0c03cd3104a57d5104dd1f593a777a3571fca4d
[ "BSD-3-Clause" ]
null
null
null
""" WSGI config for nudni project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTIN...
22.823529
78
0.783505
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "nudni.settings") application = get_wsgi_application()
true
true
1c2e875a17af7e0890ffebcddd9c7877a9fa8af2
1,168
py
Python
setup.py
yucelkilic/ASTRiDE
cca4e3ee0d907c3675d8f2dcf9246acf69027dae
[ "MIT" ]
null
null
null
setup.py
yucelkilic/ASTRiDE
cca4e3ee0d907c3675d8f2dcf9246acf69027dae
[ "MIT" ]
null
null
null
setup.py
yucelkilic/ASTRiDE
cca4e3ee0d907c3675d8f2dcf9246acf69027dae
[ "MIT" ]
null
null
null
from setuptools import find_packages, setup def readme(): with open('README.rst') as f: return f.read() setup( name='astride', version='0.3.5', description='Automated Streak Detection for High Velocity Objects', long_description=readme(), platforms=['any'], packages=find_packages()...
34.352941
76
0.598459
from setuptools import find_packages, setup def readme(): with open('README.rst') as f: return f.read() setup( name='astride', version='0.3.5', description='Automated Streak Detection for High Velocity Objects', long_description=readme(), platforms=['any'], packages=find_packages()...
true
true
1c2e878fc87fe5d8f0093738d896b1c599ff30cc
3,195
py
Python
cobrinha trabalhadeira/lab06/lab6MT.py
ansattz/solving_sto
4f66a0a78fdbfe101f07e0f7cb8f7c8b595f16b9
[ "MIT" ]
null
null
null
cobrinha trabalhadeira/lab06/lab6MT.py
ansattz/solving_sto
4f66a0a78fdbfe101f07e0f7cb8f7c8b595f16b9
[ "MIT" ]
null
null
null
cobrinha trabalhadeira/lab06/lab6MT.py
ansattz/solving_sto
4f66a0a78fdbfe101f07e0f7cb8f7c8b595f16b9
[ "MIT" ]
null
null
null
# Douglas Vieira # @ansattz #1 - Não delete nem modifique esta linha def lettercount(s): phrase = str.split(s) letters = len(phrase) return letters #Casos de teste da questão 1 - Não delete nem modifique esta linha print(lettercount("Vamos terminar este lab hoje mesmo")) # 2 - Não delete nem modifique ...
28.783784
179
0.650704
def lettercount(s): phrase = str.split(s) letters = len(phrase) return letters print(lettercount("Vamos terminar este lab hoje mesmo")) def phrasecount(s): fpoint = str.replace(s,'...','.') phtype1 = str.count(fpoint,'.') phtype2 = str.count(s,'!') phtype3 = str.count(s,'?') ph...
true
true
1c2e88c6ed8136dab2b63811698e0b327fcdc54f
3,758
py
Python
dl/scan/part_tflite.py
showkeyjar/beauty
7c944cf896c899d9e23b2e50e293103bb03fe6cd
[ "MulanPSL-1.0" ]
1
2022-01-29T12:32:38.000Z
2022-01-29T12:32:38.000Z
dl/scan/part_tflite.py
showkeyjar/beauty
7c944cf896c899d9e23b2e50e293103bb03fe6cd
[ "MulanPSL-1.0" ]
null
null
null
dl/scan/part_tflite.py
showkeyjar/beauty
7c944cf896c899d9e23b2e50e293103bb03fe6cd
[ "MulanPSL-1.0" ]
null
null
null
#!/usr/bin/python # -*- encoding: utf-8 -*- import numpy as np import cv2 from os.path import dirname, join import tensorflow as tf """ 判断人脸部位 """ # Load TFLite model and allocate tensors. model_file = join(dirname(__file__), "face_part.tflite") interpreter = tf.compat.v1.lite.Interpreter(model_path=model_file) # Ge...
40.847826
184
0.61868
import numpy as np import cv2 from os.path import dirname, join import tensorflow as tf model_file = join(dirname(__file__), "face_part.tflite") interpreter = tf.compat.v1.lite.Interpreter(model_path=model_file) input_details = interpreter.get_input_details() print("input:", input_details) output_details = interpret...
true
true
1c2e88e126f2fb3f6cce316611db58129c930a48
391
py
Python
django_projects/chat_app_channels/chatapp/chatapp/asgi.py
phiratio/lpthw
a32240d4355fb331805d515f96e1d009914e5c47
[ "MIT" ]
1
2021-04-21T09:38:38.000Z
2021-04-21T09:38:38.000Z
django_projects/chat_app_channels/chatapp/chatapp/asgi.py
phiratio/lpthw
a32240d4355fb331805d515f96e1d009914e5c47
[ "MIT" ]
34
2019-12-16T16:53:24.000Z
2022-01-13T02:29:30.000Z
django_projects/chat_app_channels/chatapp/chatapp/asgi.py
phiratio/lpthw
a32240d4355fb331805d515f96e1d009914e5c47
[ "MIT" ]
null
null
null
""" ASGI config for chatapp project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTI...
23
78
0.785166
import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'chatapp.settings') application = get_asgi_application()
true
true
1c2e88eb86dd7141662fd801b624b54caf1cf2ef
1,370
py
Python
backend/database/migration.py
GCETTB-HYLAND-Hackathon2012-22/Miracurol-Rebuild
a6748e93b45872efdbaca013388dd6277824a9a5
[ "Apache-2.0" ]
null
null
null
backend/database/migration.py
GCETTB-HYLAND-Hackathon2012-22/Miracurol-Rebuild
a6748e93b45872efdbaca013388dd6277824a9a5
[ "Apache-2.0" ]
null
null
null
backend/database/migration.py
GCETTB-HYLAND-Hackathon2012-22/Miracurol-Rebuild
a6748e93b45872efdbaca013388dd6277824a9a5
[ "Apache-2.0" ]
null
null
null
import pathlib from alembic import command from alembic.config import Config as AlembicConfig from sqlalchemy.engine import make_url from backend.commons.enums import Config from backend.utils.config_utils import read_config def run_migrations(downgrade_first: bool = False) -> None: script_location: str = f'{re...
35.128205
89
0.729197
import pathlib from alembic import command from alembic.config import Config as AlembicConfig from sqlalchemy.engine import make_url from backend.commons.enums import Config from backend.utils.config_utils import read_config def run_migrations(downgrade_first: bool = False) -> None: script_location: str = f'{re...
true
true
1c2e897ad5c9e8578ce18e6f53c03911e852907f
700
py
Python
brain/src/sm_main.py
FabianFalck/de_niro
1f9d05b7232cb9e76eff975e5ef1c8bf3fb5cde6
[ "MIT" ]
7
2019-06-12T03:36:15.000Z
2021-06-27T18:39:40.000Z
brain/src/sm_main.py
Hankfirst/de_niro
1f9d05b7232cb9e76eff975e5ef1c8bf3fb5cde6
[ "MIT" ]
null
null
null
brain/src/sm_main.py
Hankfirst/de_niro
1f9d05b7232cb9e76eff975e5ef1c8bf3fb5cde6
[ "MIT" ]
3
2019-06-12T03:35:36.000Z
2021-06-27T04:37:31.000Z
#!/usr/bin/env python """ Main thread for running the state machine. Author: Sagar Doshi Date: 05/2018 """ import rospy import smach_ros import unittest import threading import time # Custom modules import import sm_mach if __name__ == "__main__": rospy.init_node('fezzik_state_machine') # Create the state...
20
85
0.715714
import rospy import smach_ros import unittest import threading import time import sm_mach if __name__ == "__main__": rospy.init_node('fezzik_state_machine') sm = sm_mach.init_sm() # containers, so only need to add this to the top-level state machine sis = smach_ros.IntrospectionServer("Fez...
true
true
1c2e8983ec719dce811b9524bf40526bfd2eedb5
193
py
Python
py_tdlib/constructors/set_scope_notification_settings.py
Mr-TelegramBot/python-tdlib
2e2d21a742ebcd439971a32357f2d0abd0ce61eb
[ "MIT" ]
24
2018-10-05T13:04:30.000Z
2020-05-12T08:45:34.000Z
py_tdlib/constructors/set_scope_notification_settings.py
MrMahdi313/python-tdlib
2e2d21a742ebcd439971a32357f2d0abd0ce61eb
[ "MIT" ]
3
2019-06-26T07:20:20.000Z
2021-05-24T13:06:56.000Z
py_tdlib/constructors/set_scope_notification_settings.py
MrMahdi313/python-tdlib
2e2d21a742ebcd439971a32357f2d0abd0ce61eb
[ "MIT" ]
5
2018-10-05T14:29:28.000Z
2020-08-11T15:04:10.000Z
from ..factory import Method class setScopeNotificationSettings(Method): scope = None # type: "NotificationSettingsScope" notification_settings = None # type: "scopeNotificationSettings"
27.571429
66
0.797927
from ..factory import Method class setScopeNotificationSettings(Method): scope = None notification_settings = None
true
true
1c2e8a2ecb1994da7171f9cf7c06b1e07ef5eb21
717
py
Python
testutils/decorators.py
getmetamapper/metamapper
0b2f67eec03fbf7ece35ff9f58ea9bb2dde4d85f
[ "BSD-2-Clause" ]
53
2020-07-01T23:11:59.000Z
2022-03-31T19:10:28.000Z
testutils/decorators.py
getmetamapper/metamapper
0b2f67eec03fbf7ece35ff9f58ea9bb2dde4d85f
[ "BSD-2-Clause" ]
5
2020-11-25T19:48:57.000Z
2022-02-27T23:50:18.000Z
testutils/decorators.py
getmetamapper/metamapper
0b2f67eec03fbf7ece35ff9f58ea9bb2dde4d85f
[ "BSD-2-Clause" ]
5
2020-08-29T16:43:59.000Z
2022-01-17T19:05:30.000Z
# -*- coding: utf-8 -*- import functools import testutils.helpers as helpers def as_someone(user_types): """Decorator to mimic different user roles. """ def the_decorator(func): @functools.wraps(func) def func_wrapper(view, *args, **kwargs): cached_user = view.user ...
32.590909
84
0.608089
import functools import testutils.helpers as helpers def as_someone(user_types): def the_decorator(func): @functools.wraps(func) def func_wrapper(view, *args, **kwargs): cached_user = view.user for user_type in user_types: view.user_type = user_type ...
true
true
1c2e8be0c07c4c79c57782db9882b7b968cd8d52
7,198
py
Python
models.py
mrdbarros/csgo_analyze
a4d7487bd56a14a99dc762920965060a5a43fa15
[ "Apache-2.0" ]
null
null
null
models.py
mrdbarros/csgo_analyze
a4d7487bd56a14a99dc762920965060a5a43fa15
[ "Apache-2.0" ]
4
2020-06-17T20:24:53.000Z
2021-09-28T03:55:45.000Z
models.py
mrdbarros/csgo_analyze
a4d7487bd56a14a99dc762920965060a5a43fa15
[ "Apache-2.0" ]
null
null
null
import data_loading import torch def emb_sz_rule(n_cat): "Rule of thumb to pick embedding size corresponding to `n_cat`" return min(600, round(1.6 * n_cat ** 0.56)) class LinBnDrop(torch.nn.Sequential): "Module grouping `BatchNorm1d`, `Dropout` and `Linear` layers" def __init__(self, n_in, n_out...
45.556962
137
0.634065
import data_loading import torch def emb_sz_rule(n_cat): return min(600, round(1.6 * n_cat ** 0.56)) class LinBnDrop(torch.nn.Sequential): def __init__(self, n_in, n_out, bn=True, p=0., act=None, lin_first=False): layers = [torch.nn.BatchNorm1d(n_in)] if bn else [] if p != 0: layers.appe...
true
true
1c2e8bf63583af76879137c28d1e1bfd7558d730
5,464
py
Python
quantumGAN/deprecated_files/discriminator_minimax.py
tomiock/qGAN
fb98a2b5286eb479665ade353efa40bd6e55dc36
[ "Apache-2.0" ]
1
2021-06-14T09:33:32.000Z
2021-06-14T09:33:32.000Z
quantumGAN/deprecated_files/discriminator_minimax.py
tomiock/gGAN
fb98a2b5286eb479665ade353efa40bd6e55dc36
[ "Apache-2.0" ]
7
2021-06-14T12:21:40.000Z
2021-10-01T07:29:01.000Z
quantumGAN/deprecated_files/discriminator_minimax.py
tomiock/qGAN
fb98a2b5286eb479665ade353efa40bd6e55dc36
[ "Apache-2.0" ]
null
null
null
"""DISCRIMINATOR BCE""" import json import random from typing import Dict, List import numpy as np from quantumGAN.functions import minimax_derivative_fake, minimax_derivative_real, sigmoid, \ sigmoid_prime def load(filename): f = open(filename, "r") data = json.load(f) f.close() # cost = getattr(sys.modules[_...
35.947368
93
0.646962
import json import random from typing import Dict, List import numpy as np from quantumGAN.functions import minimax_derivative_fake, minimax_derivative_real, sigmoid, \ sigmoid_prime def load(filename): f = open(filename, "r") data = json.load(f) f.close() net = ClassicalDiscriminatorMINIMAX(None, None, data[...
true
true
1c2e8da7f1a8c7cb5c1ba3839e249911f1c92d46
271
py
Python
18_Math3/Step01/wowo0709.py
StudyForCoding/BEAKJOON
84e1c5e463255e919ccf6b6a782978c205420dbf
[ "MIT" ]
null
null
null
18_Math3/Step01/wowo0709.py
StudyForCoding/BEAKJOON
84e1c5e463255e919ccf6b6a782978c205420dbf
[ "MIT" ]
3
2020-11-04T05:38:53.000Z
2021-03-02T02:15:19.000Z
18_Math3/Step01/wowo0709.py
StudyForCoding/BEAKJOON
84e1c5e463255e919ccf6b6a782978c205420dbf
[ "MIT" ]
null
null
null
while(1): a,b = map(int,input().split()) if a==0 and b==0: exit(0) elif (a!=0 and b==0) or (a==0 and b!=0): print('neither') elif a%b==0: print('multiple') elif b%a==0: print('factor') else: print('neither')
22.583333
44
0.457565
while(1): a,b = map(int,input().split()) if a==0 and b==0: exit(0) elif (a!=0 and b==0) or (a==0 and b!=0): print('neither') elif a%b==0: print('multiple') elif b%a==0: print('factor') else: print('neither')
true
true
1c2e8db06813e97495b935f3a62d070441bf6d9a
1,756
py
Python
code/venv/lib/python3.8/site-packages/datadog_api_client/v1/model/synthetics_basic_auth_ntlm_type.py
Valisback/hiring-engineers
7196915dd5a429ae27c21fa43d527f0332e662ed
[ "Apache-2.0" ]
null
null
null
code/venv/lib/python3.8/site-packages/datadog_api_client/v1/model/synthetics_basic_auth_ntlm_type.py
Valisback/hiring-engineers
7196915dd5a429ae27c21fa43d527f0332e662ed
[ "Apache-2.0" ]
null
null
null
code/venv/lib/python3.8/site-packages/datadog_api_client/v1/model/synthetics_basic_auth_ntlm_type.py
Valisback/hiring-engineers
7196915dd5a429ae27c21fa43d527f0332e662ed
[ "Apache-2.0" ]
null
null
null
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2019-Present Datadog, Inc. from datadog_api_client.v1.model_utils import ( ModelSimple, cached_property, ...
27.4375
142
0.612756
from datadog_api_client.v1.model_utils import ( ModelSimple, cached_property, ) class SyntheticsBasicAuthNTLMType(ModelSimple): allowed_values = { "value": { "NTLM": "ntlm", }, } validations = {} @cached_property def openapi_types(): return { ...
true
true
1c2e8e6321d95ddbf511a3d098115f8a1538a5ba
549
py
Python
yamtbx/dataproc/xds/command_line/xds_integrate_lp_to_xparm.py
7l2icj/kamo_clone
5f4a5eed3cd9d91a021d805e46125c19cc2ed1b6
[ "BSD-3-Clause" ]
16
2016-05-20T11:19:40.000Z
2021-01-01T19:44:23.000Z
yamtbx/dataproc/xds/command_line/xds_integrate_lp_to_xparm.py
7l2icj/kamo_clone
5f4a5eed3cd9d91a021d805e46125c19cc2ed1b6
[ "BSD-3-Clause" ]
4
2017-03-10T00:51:11.000Z
2021-02-07T17:18:46.000Z
yamtbx/dataproc/xds/command_line/xds_integrate_lp_to_xparm.py
7l2icj/kamo_clone
5f4a5eed3cd9d91a021d805e46125c19cc2ed1b6
[ "BSD-3-Clause" ]
9
2016-12-15T16:00:06.000Z
2021-09-10T08:34:14.000Z
#!/usr/bin/env yamtbx.python """ (c) RIKEN 2015. All rights reserved. Author: Keitaro Yamashita This software is released under the new BSD License; see LICENSE. """ import os from yamtbx.dataproc.xds.xparm import get_xparm_from_integrate_lp def run(integrate_lp, frame_num): xparm_str = get_xparm_from_integrate...
23.869565
68
0.724954
import os from yamtbx.dataproc.xds.xparm import get_xparm_from_integrate_lp def run(integrate_lp, frame_num): xparm_str = get_xparm_from_integrate_lp(integrate_lp, frame_num) open("XPARM.XDS.%.4d"%frame_num, "w").write(xparm_str) if __name__ == "__main__": import sys integrate_lp = sys.argv[1] f...
true
true
1c2e8ee4df75228959da73fbbd7d2db0011e6712
430
py
Python
Week2/problem1.py
AustinKladke/6.00.1x-MIT-CS-Python
0f9e2840fdd5f005bae2a53a3b8a251e0635654e
[ "MIT" ]
null
null
null
Week2/problem1.py
AustinKladke/6.00.1x-MIT-CS-Python
0f9e2840fdd5f005bae2a53a3b8a251e0635654e
[ "MIT" ]
null
null
null
Week2/problem1.py
AustinKladke/6.00.1x-MIT-CS-Python
0f9e2840fdd5f005bae2a53a3b8a251e0635654e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun Feb 7 11:40:18 2021 @author: akladke """ #balance = 42 balance = 484 annualInterestRate = 0.2 monthlyPaymentRate = 0.04 for i in range(0, 12): min_payment = balance * monthlyPaymentRate unpaid_balance = balance - min_payment interest = annualInterestRate/12 * u...
23.888889
53
0.702326
balance = 484 annualInterestRate = 0.2 monthlyPaymentRate = 0.04 for i in range(0, 12): min_payment = balance * monthlyPaymentRate unpaid_balance = balance - min_payment interest = annualInterestRate/12 * unpaid_balance balance = round(unpaid_balance + interest, 2) print("Remaining balance: {}".format...
true
true
1c2e8f5126310bf5dc00013e478e20cf77af87a8
1,858
py
Python
Hash.py
V3noM-Cyber/Hashjokar
9d29bbdee22e29488074bc2b16178d91cee2778e
[ "MIT" ]
null
null
null
Hash.py
V3noM-Cyber/Hashjokar
9d29bbdee22e29488074bc2b16178d91cee2778e
[ "MIT" ]
null
null
null
Hash.py
V3noM-Cyber/Hashjokar
9d29bbdee22e29488074bc2b16178d91cee2778e
[ "MIT" ]
null
null
null
import hashlib from colorama import init from time import * from termcolor import colored import sys import os import hashlib, binascii from colorama import Fore, Back, Style hash = "" init() print( Fore.RED+''' ●🔥════════════════════════◄►═══════════════════🔥● ██╗░░░██╗██████╗░███╗░░██╗░█████╗░███╗░░░███╗   ██║░...
29.967742
70
0.453714
import hashlib from colorama import init from time import * from termcolor import colored import sys import os import hashlib, binascii from colorama import Fore, Back, Style hash = "" init() print( Fore.RED+''' ●🔥════════════════════════◄►═══════════════════🔥● ██╗░░░██╗██████╗░███╗░░██╗░█████╗░███╗░░░███╗   ██║░...
true
true
1c2e8f59e079c1df103e60b7754c0feb424f213c
363
py
Python
doc/tutorials/data/03_halide_basic.py
Hconk/AutoKernel
edfb409efe37e2aea5350961e3a8160c11856853
[ "Apache-2.0" ]
754
2020-11-11T06:34:26.000Z
2022-03-29T03:45:36.000Z
doc/tutorials/data/03_halide_basic.py
Hconk/AutoKernel
edfb409efe37e2aea5350961e3a8160c11856853
[ "Apache-2.0" ]
16
2020-12-01T03:27:01.000Z
2021-08-13T06:20:58.000Z
doc/tutorials/data/03_halide_basic.py
Hconk/AutoKernel
edfb409efe37e2aea5350961e3a8160c11856853
[ "Apache-2.0" ]
82
2020-11-12T00:14:45.000Z
2022-03-27T09:22:08.000Z
#!/usr/bin/python3 import halide as hl x, y = hl.Var("x"), hl.Var("y") func = hl.Func("func") func[x,y] = x + 10*y #func.trace_stores() out = func.realize(3, 4) # width, height = 3,4 print("=============================") for j in range(out.height()): for i in range(out.width()): print("out[x=%i,y=%i...
16.5
49
0.517906
import halide as hl x, y = hl.Var("x"), hl.Var("y") func = hl.Func("func") func[x,y] = x + 10*y out = func.realize(3, 4) print("=============================") for j in range(out.height()): for i in range(out.width()): print("out[x=%i,y=%i]=%i"%(i,j,out[i,j])) print("Success!")
true
true
1c2e90a0f9ba63d07086acc94891fb7c5086ab1e
4,403
py
Python
usaspending_api/etl/transaction_loaders/data_load_helpers.py
gaybro8777/usaspending-api
fe9d730acd632401bbbefa168e3d86d59560314b
[ "CC0-1.0" ]
null
null
null
usaspending_api/etl/transaction_loaders/data_load_helpers.py
gaybro8777/usaspending-api
fe9d730acd632401bbbefa168e3d86d59560314b
[ "CC0-1.0" ]
null
null
null
usaspending_api/etl/transaction_loaders/data_load_helpers.py
gaybro8777/usaspending-api
fe9d730acd632401bbbefa168e3d86d59560314b
[ "CC0-1.0" ]
null
null
null
from datetime import datetime import os import re import boto3 import csv import logging from django.conf import settings logger = logging.getLogger("console") def capitalize_if_string(val): try: return val.upper() except AttributeError: return val # 10/31/2019: According to PO direction, ...
35.796748
121
0.633205
from datetime import datetime import os import re import boto3 import csv import logging from django.conf import settings logger = logging.getLogger("console") def capitalize_if_string(val): try: return val.upper() except AttributeError: return val def false_if_null(val): if val is Non...
true
true
1c2e90c332fe1e210457721c098a7ba2d97cb487
7,344
py
Python
src/external_model.py
alex-calderwood/twine_generation
8a3ba3779bffeb7a0b18bfd0960685b26bd4e5e8
[ "BSD-4-Clause-UC" ]
2
2021-11-18T07:28:09.000Z
2022-03-23T13:56:18.000Z
src/external_model.py
alex-calderwood/twine_generation
8a3ba3779bffeb7a0b18bfd0960685b26bd4e5e8
[ "BSD-4-Clause-UC" ]
null
null
null
src/external_model.py
alex-calderwood/twine_generation
8a3ba3779bffeb7a0b18bfd0960685b26bd4e5e8
[ "BSD-4-Clause-UC" ]
null
null
null
import openai import os import time import twee_utils as utils # Load your API key from an environment variable or secret management service openai.api_key = os.getenv("OPENAI_API_KEY") ZERO_SHOT = open('src/zero_shot.txt', 'r').read() class TwineGenerator: def __init__(self, model='context', verbose=True): ...
45.614907
1,616
0.651144
import openai import os import time import twee_utils as utils openai.api_key = os.getenv("OPENAI_API_KEY") ZERO_SHOT = open('src/zero_shot.txt', 'r').read() class TwineGenerator: def __init__(self, model='context', verbose=True): self.model = model.lower() self.verbose = bool(verbose) ...
true
true
1c2e9132a54de644c28ae19522b0d1693090fb3f
10,968
py
Python
models/llc_score.py
litosly/RankingOptimizationApprochtoLLC
b6b79fb1364fcc481aa84093a8e8399966b19d02
[ "MIT" ]
5
2020-10-10T02:11:16.000Z
2021-11-08T22:55:34.000Z
models/llc_score.py
litosly/RankingOptimizationApprochtoLLC
b6b79fb1364fcc481aa84093a8e8399966b19d02
[ "MIT" ]
null
null
null
models/llc_score.py
litosly/RankingOptimizationApprochtoLLC
b6b79fb1364fcc481aa84093a8e8399966b19d02
[ "MIT" ]
2
2020-10-22T14:50:43.000Z
2021-08-15T07:00:43.000Z
from prediction.predictor import predict_scores, predict_vector from sklearn.linear_model import LinearRegression from utils.critique import LP1SimplifiedOptimize from utils.keyphrase_selection import * import numpy as np from tqdm import tqdm class LP1Simplified(object): def __init__(self, keyphrase_freq, item_...
60.596685
185
0.535284
from prediction.predictor import predict_scores, predict_vector from sklearn.linear_model import LinearRegression from utils.critique import LP1SimplifiedOptimize from utils.keyphrase_selection import * import numpy as np from tqdm import tqdm class LP1Simplified(object): def __init__(self, keyphrase_freq, item_...
true
true
1c2e91ad8c46cbfb50cd64e65f5ea767cbea1915
4,982
py
Python
sld-api-backend/helpers/get_data.py
guorenxi/Stack-Lifecycle-Deployment
2780441cb692392993116cf94c14a94ae8edbc6c
[ "MIT" ]
null
null
null
sld-api-backend/helpers/get_data.py
guorenxi/Stack-Lifecycle-Deployment
2780441cb692392993116cf94c14a94ae8edbc6c
[ "MIT" ]
null
null
null
sld-api-backend/helpers/get_data.py
guorenxi/Stack-Lifecycle-Deployment
2780441cb692392993116cf94c14a94ae8edbc6c
[ "MIT" ]
null
null
null
from fastapi import HTTPException from celery.result import AsyncResult from datetime import datetime from functools import wraps from croniter import croniter import redis from crud import stacks as crud_stacks from crud import deploys as crud_deploys from crud import user as crud_users from crud import activityLogs ...
32.776316
117
0.642914
from fastapi import HTTPException from celery.result import AsyncResult from datetime import datetime from functools import wraps from croniter import croniter import redis from crud import stacks as crud_stacks from crud import deploys as crud_deploys from crud import user as crud_users from crud import activityLogs ...
true
true
1c2e91e14d21753133705a1872b6a3cc03cf96d4
1,675
py
Python
Autoencoding/save32by32ForAll.py
MiningMyBusiness/SketchyExperiments
11f3baee63a984501b9707aa58420540b19db59f
[ "MIT" ]
2
2019-01-31T19:56:50.000Z
2019-03-21T12:26:57.000Z
Autoencoding/save32by32ForAll.py
MiningMyBusiness/SketchyExperiments
11f3baee63a984501b9707aa58420540b19db59f
[ "MIT" ]
null
null
null
Autoencoding/save32by32ForAll.py
MiningMyBusiness/SketchyExperiments
11f3baee63a984501b9707aa58420540b19db59f
[ "MIT" ]
null
null
null
## Name: Save 32 by 32 image vector ## Description: Reads in the matrix representation of the images ## for each class and resizes each image from 256 by 256 ## to 32 by 32 and then converts it to a vector with ## 1024 elements (32*32). A stack of these vectors (matrix) ## ...
34.895833
80
0.654328
import glob import numpy as np import matplotlib.pyplot as plt import cv2 dataLoc = '256X256/sketch/tx_000100000000' allFolders = glob.glob(dataLoc + '/*') newSize = 32 def readImgAndResize(folderName, multi, newSize): imgStack_mat = np.load(folder + '/matStack.npy') num_of_images = imgStack_m...
true
true
1c2e9290459d49bd1262122f8dd1051edf6b6a31
1,516
py
Python
crypto_data_app/__init__.py
gldeng/crypto-data-app
4460ffd2417a02605862b66073e172519ea5fbd7
[ "MIT" ]
null
null
null
crypto_data_app/__init__.py
gldeng/crypto-data-app
4460ffd2417a02605862b66073e172519ea5fbd7
[ "MIT" ]
null
null
null
crypto_data_app/__init__.py
gldeng/crypto-data-app
4460ffd2417a02605862b66073e172519ea5fbd7
[ "MIT" ]
null
null
null
from flask_redis import FlaskRedis from flask import Flask from flask_restful import Resource, Api from datetime import datetime def create_app(config_pyfile): app = Flask(__name__, instance_relative_config=False) app.config.from_pyfile(config_pyfile) redis_store = FlaskRedis(app, strict=False) api =...
31.583333
88
0.525066
from flask_redis import FlaskRedis from flask import Flask from flask_restful import Resource, Api from datetime import datetime def create_app(config_pyfile): app = Flask(__name__, instance_relative_config=False) app.config.from_pyfile(config_pyfile) redis_store = FlaskRedis(app, strict=False) api =...
true
true
1c2e930bbcde5c690c5b9f48f7f7e63d0c74e976
2,587
py
Python
Space Invaders/utilities/deus_ex.py
msutic/python_project_alpha
5fed153babf294ce5f5714de8f711b1a5943d2d5
[ "MIT" ]
1
2021-01-08T00:38:02.000Z
2021-01-08T00:38:02.000Z
Space Invaders/utilities/deus_ex.py
msutic/python_project_alpha
5fed153babf294ce5f5714de8f711b1a5943d2d5
[ "MIT" ]
4
2021-01-12T20:07:19.000Z
2021-03-19T22:21:31.000Z
Space Invaders/utilities/deus_ex.py
msutic/python_project_alpha
5fed153babf294ce5f5714de8f711b1a5943d2d5
[ "MIT" ]
null
null
null
from time import time, sleep from PyQt5.QtCore import pyqtSignal, QThread, pyqtSlot from PyQt5.QtWidgets import QLabel from config import cfg class DeusEx(QThread): empower = pyqtSignal(QLabel) collision_occured = pyqtSignal(QLabel, QLabel, int) def __init__(self): super().__init__() ...
33.166667
90
0.526479
from time import time, sleep from PyQt5.QtCore import pyqtSignal, QThread, pyqtSlot from PyQt5.QtWidgets import QLabel from config import cfg class DeusEx(QThread): empower = pyqtSignal(QLabel) collision_occured = pyqtSignal(QLabel, QLabel, int) def __init__(self): super().__init__() ...
true
true
1c2e93b8c4720408303fc37f202fa46b4a4ef25f
5,329
py
Python
confidnet/loaders/loader.py
luoyan407/predict_trustworthiness_smallscale
b7e1e2a68b0aee9b484228d1b5686f7252919e97
[ "Apache-2.0" ]
149
2019-10-01T14:04:05.000Z
2022-03-24T12:25:15.000Z
confidnet/loaders/loader.py
luoyan407/predict_trustworthiness_smallscale
b7e1e2a68b0aee9b484228d1b5686f7252919e97
[ "Apache-2.0" ]
10
2019-12-12T09:45:50.000Z
2021-12-27T04:45:22.000Z
confidnet/loaders/loader.py
luoyan407/predict_trustworthiness_smallscale
b7e1e2a68b0aee9b484228d1b5686f7252919e97
[ "Apache-2.0" ]
30
2019-12-02T16:25:22.000Z
2022-02-16T10:48:47.000Z
from pathlib import Path import numpy as np import torch from torch.utils.data.sampler import SubsetRandomSampler from confidnet.augmentations import get_composed_augmentations from confidnet.utils.logger import get_logger LOGGER = get_logger(__name__, level="DEBUG") class AbstractDataLoader: def __init__(s...
42.632
128
0.605555
from pathlib import Path import numpy as np import torch from torch.utils.data.sampler import SubsetRandomSampler from confidnet.augmentations import get_composed_augmentations from confidnet.utils.logger import get_logger LOGGER = get_logger(__name__, level="DEBUG") class AbstractDataLoader: def __init__(s...
true
true
1c2e9443cf5eb3a35aeb948b351e7d6cdc5b1396
13,537
py
Python
plugins/modules/oci_analytics_private_access_channel.py
slmjy/oci-ansible-collection
349c91e2868bf4706a6e3d6fb3b47fc622bfe11b
[ "Apache-2.0" ]
108
2020-05-19T20:46:10.000Z
2022-03-25T14:10:01.000Z
plugins/modules/oci_analytics_private_access_channel.py
slmjy/oci-ansible-collection
349c91e2868bf4706a6e3d6fb3b47fc622bfe11b
[ "Apache-2.0" ]
90
2020-06-14T22:07:11.000Z
2022-03-07T05:40:29.000Z
plugins/modules/oci_analytics_private_access_channel.py
slmjy/oci-ansible-collection
349c91e2868bf4706a6e3d6fb3b47fc622bfe11b
[ "Apache-2.0" ]
42
2020-08-30T23:09:12.000Z
2022-03-25T16:58:01.000Z
#!/usr/bin/python # Copyright (c) 2020, 2021 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
36.785326
150
0.650218
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { "metadata_version": "1.1", "status": ["preview"], "supported_by": "community", } DOCUMENTATION = """ --- module: oci_analytics_private_access_channel short_description: Manage a PrivateAccessChann...
true
true
1c2e95f5e12bce802fd887828e3ab4159233eaa3
414
py
Python
reapit/reapit/doctype/item_sync_settings/item_sync_settings.py
rtdany10/reapit
aba62ac13fb1a81da9e2e182506712416b63aa92
[ "MIT" ]
null
null
null
reapit/reapit/doctype/item_sync_settings/item_sync_settings.py
rtdany10/reapit
aba62ac13fb1a81da9e2e182506712416b63aa92
[ "MIT" ]
null
null
null
reapit/reapit/doctype/item_sync_settings/item_sync_settings.py
rtdany10/reapit
aba62ac13fb1a81da9e2e182506712416b63aa92
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2021, Wahni Green Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class ItemSyncSettings(Document): def validate(self): if self.enabled: if not...
29.571429
63
0.768116
from __future__ import unicode_literals import frappe from frappe.model.document import Document class ItemSyncSettings(Document): def validate(self): if self.enabled: if not (self.api_endpoint and self.price_list): frappe.throw("Invalid endpoint or price list.")
true
true
1c2e972200daba906a25b9d9ebe3ed09289c0ab6
10,914
py
Python
tests/test_scrape_ew_and_errew.py
mwanakijiji/rrlfe2
0637b348b8d3e54ff34c56caa8b4c6fdac1c699e
[ "MIT" ]
null
null
null
tests/test_scrape_ew_and_errew.py
mwanakijiji/rrlfe2
0637b348b8d3e54ff34c56caa8b4c6fdac1c699e
[ "MIT" ]
18
2022-01-13T14:43:57.000Z
2022-03-24T12:52:41.000Z
tests/test_scrape_ew_and_errew.py
mwanakijiji/rrlfe
4a822bb499bd0af4543f8b34d9322e812a5a3d2c
[ "MIT" ]
null
null
null
import matplotlib matplotlib.use('Agg') import sys, os from configparser import ConfigParser, ExtendedInterpolation import pandas as pd import astropy current_dir = os.path.dirname(__file__) target_dir = os.path.abspath(os.path.join(current_dir, "../")) sys.path.insert(0, target_dir) # import more things with change...
52.724638
208
0.723566
import matplotlib matplotlib.use('Agg') import sys, os from configparser import ConfigParser, ExtendedInterpolation import pandas as pd import astropy current_dir = os.path.dirname(__file__) target_dir = os.path.abspath(os.path.join(current_dir, "../")) sys.path.insert(0, target_dir) from modules import * from modul...
true
true
1c2e97e86be84acb21ba351d83b002528e614107
23,642
py
Python
src/translate.py
CloudRenderVR/human-motion-prediction-pytorch-uncertainty
cb96f3b2d8a2b54916b2f3f76c1c9b982af5b46b
[ "MIT" ]
null
null
null
src/translate.py
CloudRenderVR/human-motion-prediction-pytorch-uncertainty
cb96f3b2d8a2b54916b2f3f76c1c9b982af5b46b
[ "MIT" ]
null
null
null
src/translate.py
CloudRenderVR/human-motion-prediction-pytorch-uncertainty
cb96f3b2d8a2b54916b2f3f76c1c9b982af5b46b
[ "MIT" ]
null
null
null
"""Simple code for training an RNN for motion prediction.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import math import os import random import sys import time import h5py import numpy as np from six.moves import xrange # pylint: disable=redefined...
39.469115
169
0.641232
from __future__ import absolute_import from __future__ import division from __future__ import print_function import math import os import random import sys import time import h5py import numpy as np from six.moves import xrange import data_utils import seq2seq_model import torch import torch.optim as optim from to...
true
true
1c2e97f80754cf03aef7cce4dbf0e63f4c25eeb5
141
py
Python
solutions/Video_analysis/webservice/service/__init__.py
xiaogaozi/bootcamp
d1a4b69edc3f7e31ce3809043128348aa3597df6
[ "Apache-2.0" ]
1
2021-04-06T06:13:20.000Z
2021-04-06T06:13:20.000Z
solutions/Video_analysis/webservice/service/__init__.py
xiaogaozi/bootcamp
d1a4b69edc3f7e31ce3809043128348aa3597df6
[ "Apache-2.0" ]
null
null
null
solutions/Video_analysis/webservice/service/__init__.py
xiaogaozi/bootcamp
d1a4b69edc3f7e31ce3809043128348aa3597df6
[ "Apache-2.0" ]
null
null
null
import logging logging.basicConfig(filename='app.log', filemode='w', format='%(asctime)s - %(levelname)s - %(message)s', level=logging.INFO)
47
125
0.723404
import logging logging.basicConfig(filename='app.log', filemode='w', format='%(asctime)s - %(levelname)s - %(message)s', level=logging.INFO)
true
true
1c2e98c5d3a6ae7e454bd0a11c1fd19a668d87f1
727
py
Python
0-python-tutorial/15-whileLoops01.py
luis2ra/py3-00-w3schools
6bb851837f8ef9520491d13fa2c909047c9b18cf
[ "MIT" ]
null
null
null
0-python-tutorial/15-whileLoops01.py
luis2ra/py3-00-w3schools
6bb851837f8ef9520491d13fa2c909047c9b18cf
[ "MIT" ]
null
null
null
0-python-tutorial/15-whileLoops01.py
luis2ra/py3-00-w3schools
6bb851837f8ef9520491d13fa2c909047c9b18cf
[ "MIT" ]
null
null
null
# Demo Python While Loops - The while Loop ''' Python Loops Python has two primitive loop commands: * while loops * for loops The while Loop With the while loop we can execute a set of statements as long as a condition is true. The break Statement With the break statement we can stop the loop even if the while co...
24.233333
93
0.742779
i = 1 while i < 6: print(i) i += 1
true
true
1c2e9b907048749d4a615844f89a74dedb32a1ae
2,412
py
Python
autoimpute/analysis/metrics.py
gjdv/autoimpute
aa418102d3b64fc7e0c0dafa6839746f0b9a6545
[ "MIT" ]
191
2019-03-16T17:00:33.000Z
2022-03-11T12:14:17.000Z
autoimpute/analysis/metrics.py
MlataIbrahim/autoimpute
d22cd86db6facd4a68746c8c0fcb3fae70071dac
[ "MIT" ]
57
2019-03-09T23:59:38.000Z
2022-03-01T08:17:33.000Z
autoimpute/analysis/metrics.py
MlataIbrahim/autoimpute
d22cd86db6facd4a68746c8c0fcb3fae70071dac
[ "MIT" ]
19
2019-04-13T19:01:23.000Z
2021-05-14T08:59:27.000Z
"""This module devises metrics to compare estimates from analysis models.""" import numpy as np import pandas as pd def raw_bias(Q_bar, Q): """Calculate raw bias between coefficients Q and actual Q. Q_bar can be one estimate (scalar) or a vector of estimates. This equation subtracts the expected Q_bar fr...
30.531646
78
0.65796
import numpy as np import pandas as pd def raw_bias(Q_bar, Q): shape_err = "Q_bar & Q must be scalars or vectors of same length." if isinstance(Q_bar, pd.DataFrame): s = len(Q_bar.shape) if s != 1: raise ValueError(shape_err) if isinstance(Q, pd.DataFrame): s = le...
true
true
1c2e9bcf8eeceddc793d357ac20131bc4c084d2d
2,020
py
Python
download_and_clean_data_scripts/pixabay/pixabay_main_custom.py
NMag-ze/Colorization
1c91fb69d3505de6cd746dab3ddc15a704aa028a
[ "MIT" ]
null
null
null
download_and_clean_data_scripts/pixabay/pixabay_main_custom.py
NMag-ze/Colorization
1c91fb69d3505de6cd746dab3ddc15a704aa028a
[ "MIT" ]
null
null
null
download_and_clean_data_scripts/pixabay/pixabay_main_custom.py
NMag-ze/Colorization
1c91fb69d3505de6cd746dab3ddc15a704aa028a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Time : 2018/8/16 10:59 # @Author : 陈子昂 import os import requests from bs4 import BeautifulSoup from tqdm import tqdm import sys from utils import save_img, path_processor, img_name_processor def pexels(keyword): img_cnt = 0 if not keyword: sys.exit('程序退出:未输入关键字!') for page i...
42.978723
588
0.587624
import os import requests from bs4 import BeautifulSoup from tqdm import tqdm import sys from utils import save_img, path_processor, img_name_processor def pexels(keyword): img_cnt = 0 if not keyword: sys.exit('程序退出:未输入关键字!') for page in tqdm(range(1, 50)): print(f'\n-----[{keyword}]正在爬取第{page}页--...
true
true
1c2e9bd62250529bf5b8c71a6f78cdc41dea29c9
1,568
py
Python
stats_scripts/data_management/validate_consistancy.py
LilithHafner/SymbulationEmp
fb53c7fbefa03f6d901cdd49bdb823a637449bba
[ "MIT" ]
null
null
null
stats_scripts/data_management/validate_consistancy.py
LilithHafner/SymbulationEmp
fb53c7fbefa03f6d901cdd49bdb823a637449bba
[ "MIT" ]
null
null
null
stats_scripts/data_management/validate_consistancy.py
LilithHafner/SymbulationEmp
fb53c7fbefa03f6d901cdd49bdb823a637449bba
[ "MIT" ]
null
null
null
lines = open('collated_data.data').readlines() header = [x.strip('"') for x in lines[0].split()] independent_variables = 'HRR', 'HRR', 'SLR', 'BS', 'BT', 'SL', 'SYN', 'POP', 'UPS', 'T' dependant_variables = 'host_count', 'sym_count', 'survival', 'moi' omit = ('file_name',) versions = '"Standard-1.1"', '"Duplicate-1.1...
35.636364
100
0.58801
lines = open('collated_data.data').readlines() header = [x.strip('"') for x in lines[0].split()] independent_variables = 'HRR', 'HRR', 'SLR', 'BS', 'BT', 'SL', 'SYN', 'POP', 'UPS', 'T' dependant_variables = 'host_count', 'sym_count', 'survival', 'moi' omit = ('file_name',) versions = '"Standard-1.1"', '"Duplicate-1.1...
true
true
1c2e9ca1193e20f92c9e20e10de63accebbd6262
1,642
py
Python
laikaboss/modules/meta_iqy.py
sandialabs/laikaboss
3064ac1176911651d61c5176e9bd83eacec36b16
[ "Apache-2.0" ]
2
2019-11-02T23:40:23.000Z
2019-12-01T22:24:57.000Z
laikaboss/modules/meta_iqy.py
sandialabs/laikaboss
3064ac1176911651d61c5176e9bd83eacec36b16
[ "Apache-2.0" ]
null
null
null
laikaboss/modules/meta_iqy.py
sandialabs/laikaboss
3064ac1176911651d61c5176e9bd83eacec36b16
[ "Apache-2.0" ]
3
2017-08-09T23:58:40.000Z
2019-12-01T22:25:06.000Z
# Copyright 2020 National Technology & Engineering Solutions of Sandia, LLC # (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. # Government retains certain rights in this software. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
35.695652
76
0.696711
from laikaboss.si_module import SI_MODULE class META_IQY(SI_MODULE): def __init__(self): self.module_name = "META_IQY" def _run(self, scanObject, result, depth, args): s = scanObject.buffer index_one = s.index(b"1") newline = b'\n' url = s[index_one+1:s.index(newlin...
true
true
1c2e9cc4b9a651b57cc3b5e361842704cab3a988
11,924
py
Python
docs/doxygen/swig_doc.py
hb9fxq/gr-aaronia_rtsa
ac66cc0630668b70fddc393735e6034ccd1cf40a
[ "MIT" ]
null
null
null
docs/doxygen/swig_doc.py
hb9fxq/gr-aaronia_rtsa
ac66cc0630668b70fddc393735e6034ccd1cf40a
[ "MIT" ]
null
null
null
docs/doxygen/swig_doc.py
hb9fxq/gr-aaronia_rtsa
ac66cc0630668b70fddc393735e6034ccd1cf40a
[ "MIT" ]
null
null
null
# # Copyright 2010-2012 Free Software Foundation, Inc. # # This file was generated by gr_modtool, a tool from the GNU Radio framework # This file is a part of gr-aaronia_rtsa # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # th...
35.807808
102
0.666555
from __future__ import unicode_literals import sys, time from doxyxml import DoxyIndex, DoxyClass, DoxyFriend, DoxyFunction, DoxyFile from doxyxml import DoxyOther, base def py_name(name): bits = name.split('_') return '_'.join(bits[1:]) def make_name(name): bits = name.split('_') return bits[0] + '...
true
true
1c2e9da8b1410e0876c772e4e9d83e5a0a64b024
436
py
Python
src/dendrograms/dendrogram.py
Ellon-M/visualizations
5a42c213ea8fd0597e2035778d9ae6460eb9e821
[ "MIT" ]
null
null
null
src/dendrograms/dendrogram.py
Ellon-M/visualizations
5a42c213ea8fd0597e2035778d9ae6460eb9e821
[ "MIT" ]
null
null
null
src/dendrograms/dendrogram.py
Ellon-M/visualizations
5a42c213ea8fd0597e2035778d9ae6460eb9e821
[ "MIT" ]
null
null
null
# dendrogram import scipy.cluster.hierarchy as shc # Import Data df = pd.read_csv('https://raw.githubusercontent.com/selva86/datasets/master/USArrests.csv') # Plot plt.figure(figsize=(16, 10), dpi= 80) plt.title("USArrests Dendograms", fontsize=22) dend = shc.dendrogram(shc.linkage(df[['Murder', 'Assault', 'Urb...
29.066667
143
0.729358
import scipy.cluster.hierarchy as shc df = pd.read_csv('https://raw.githubusercontent.com/selva86/datasets/master/USArrests.csv') plt.figure(figsize=(16, 10), dpi= 80) plt.title("USArrests Dendograms", fontsize=22) dend = shc.dendrogram(shc.linkage(df[['Murder', 'Assault', 'UrbanPop', 'Rape']], method='ward'), ...
true
true
1c2e9f75bc7f7bb8f373ef0d4b1ceb3207725ff7
1,967
py
Python
.history/main_20171106224753.py
reecebenson/DADSA-Tennis-PartA
d0763f819b300fcd0ce27041f5bc4ef0519c00bf
[ "MIT" ]
null
null
null
.history/main_20171106224753.py
reecebenson/DADSA-Tennis-PartA
d0763f819b300fcd0ce27041f5bc4ef0519c00bf
[ "MIT" ]
null
null
null
.history/main_20171106224753.py
reecebenson/DADSA-Tennis-PartA
d0763f819b300fcd0ce27041f5bc4ef0519c00bf
[ "MIT" ]
null
null
null
# DADSA - Assignment 1 # Reece Benson from classes import Menu as Menu from classes import Handler as Handler class App(): # Define the variables we will be using debug = True handler = None # Define all of the properties we will need to use def __init__(self): # Load our handler ...
31.725806
83
0.543467
from classes import Menu as Menu from classes import Handler as Handler class App(): debug = True handler = None def __init__(self): self.handler = Handler.Handler(self) self.handler.load() self.generate_rounds() self.exit() def g...
true
true
1c2e9fe71d358bad524ca7f4ba082ca2127b186a
2,471
py
Python
lib/reda/importers/geotom.py
j-gallistl/reda
13b1f9e1cda92bbbbafc5c28be2c691d3b722740
[ "MIT" ]
12
2017-12-11T08:32:46.000Z
2021-06-09T05:41:57.000Z
lib/reda/importers/geotom.py
j-gallistl/reda
13b1f9e1cda92bbbbafc5c28be2c691d3b722740
[ "MIT" ]
58
2017-11-12T11:10:42.000Z
2021-06-11T13:52:44.000Z
lib/reda/importers/geotom.py
geophysics-ubonn/REDA
8f0399031121f5a937171231a25f9ab03a3c8873
[ "MIT" ]
11
2017-11-12T12:02:35.000Z
2021-02-16T06:54:04.000Z
# -*- coding: utf-8 -*- from io import StringIO import pandas as pd import numpy as np from reda.containers.ERT import ERT from reda.importers.utils.decorators import enable_result_transforms @enable_result_transforms def _parse_wenner_file(filename, settings): """Parse a Geotom .wen (Wenner configuration) file...
22.463636
79
0.541076
from io import StringIO import pandas as pd import numpy as np from reda.containers.ERT import ERT from reda.importers.utils.decorators import enable_result_transforms @enable_result_transforms def _parse_wenner_file(filename, settings): with open(filename, 'r') as fid2: geotom_data_orig = fid2.read...
true
true
1c2ea03e03b381cfed1b2a2fb9de2e155e4a83d4
3,527
py
Python
tests/test_unicode_strings.py
alekseyl1992/pyrobuf
dc553f2c407d3ea1ca78c6b58e149d05ff811a23
[ "Apache-2.0" ]
578
2015-12-17T20:39:31.000Z
2022-02-15T05:14:03.000Z
tests/test_unicode_strings.py
alekseyl1992/pyrobuf
dc553f2c407d3ea1ca78c6b58e149d05ff811a23
[ "Apache-2.0" ]
121
2015-12-19T07:37:32.000Z
2022-02-22T05:22:55.000Z
tests/test_unicode_strings.py
alekseyl1992/pyrobuf
dc553f2c407d3ea1ca78c6b58e149d05ff811a23
[ "Apache-2.0" ]
82
2015-12-19T00:19:28.000Z
2022-02-21T09:00:21.000Z
import unittest Test = None TestSs1 = None # Alpha, Beta, Gamma, Delta GREEK_LETTERS = u"\u0391\u0392\u0393\u0394" class TestUnicodeStrings(unittest.TestCase): @classmethod def setUpClass(cls): global Test, TestSs1, TestFieldTypes from test_message_proto import Test, TestSs1 def test_un...
43.012195
108
0.686703
import unittest Test = None TestSs1 = None GREEK_LETTERS = u"\u0391\u0392\u0393\u0394" class TestUnicodeStrings(unittest.TestCase): @classmethod def setUpClass(cls): global Test, TestSs1, TestFieldTypes from test_message_proto import Test, TestSs1 def test_unicode_string_parse_from_stri...
true
true
1c2ea062620b72b16560fe0603e880b6ea79c7f0
271
py
Python
buoi7/bai12.py
Viet7501/viet1
e0be1da1fb0f4736c8d0457733ccaaed9232c4e9
[ "Apache-2.0" ]
null
null
null
buoi7/bai12.py
Viet7501/viet1
e0be1da1fb0f4736c8d0457733ccaaed9232c4e9
[ "Apache-2.0" ]
null
null
null
buoi7/bai12.py
Viet7501/viet1
e0be1da1fb0f4736c8d0457733ccaaed9232c4e9
[ "Apache-2.0" ]
null
null
null
set1 = {0, 1, 2, 3, 4, 5, 6} set2 = {5, 6, 7, 8, 9, 0, 1} # set1.difference_update(set2) # set1.intersection_update(set2) print(set1.issubset(set2)) print(set1.isdisjoint(set2)) print(set1.issuperset(set2)) set1.symmetric_difference_update(set2) print(set1)
22.583333
39
0.682657
set1 = {0, 1, 2, 3, 4, 5, 6} set2 = {5, 6, 7, 8, 9, 0, 1} print(set1.issubset(set2)) print(set1.isdisjoint(set2)) print(set1.issuperset(set2)) set1.symmetric_difference_update(set2) print(set1)
true
true
1c2ea0d7071e64a32dcaa6aa1f4226fc529ca0a6
9,426
py
Python
saleor/payment/gateway.py
facundon/Cholitas-Backend
4d73e0697a6b6fc61b82b72ff1c99b2eabe8f4c6
[ "CC-BY-4.0" ]
null
null
null
saleor/payment/gateway.py
facundon/Cholitas-Backend
4d73e0697a6b6fc61b82b72ff1c99b2eabe8f4c6
[ "CC-BY-4.0" ]
null
null
null
saleor/payment/gateway.py
facundon/Cholitas-Backend
4d73e0697a6b6fc61b82b72ff1c99b2eabe8f4c6
[ "CC-BY-4.0" ]
null
null
null
import logging from decimal import Decimal from typing import TYPE_CHECKING, Callable, List, Optional from django.db import transaction from ..payment.interface import TokenConfig from ..plugins.manager import get_plugins_manager from . import GatewayError, PaymentError, TransactionKind from .models import Payment, T...
32.729167
87
0.736474
import logging from decimal import Decimal from typing import TYPE_CHECKING, Callable, List, Optional from django.db import transaction from ..payment.interface import TokenConfig from ..plugins.manager import get_plugins_manager from . import GatewayError, PaymentError, TransactionKind from .models import Payment, T...
true
true
1c2ea26a0e074c408ad814c5bbffa80acfedad47
1,230
py
Python
tests/unit/objects/test_list_objects.py
dlite-tools/aws-s3-tools
f434ed36c1fc0530f2be6b52808cbc5e59ea8990
[ "MIT" ]
6
2021-02-18T10:03:17.000Z
2022-01-14T06:11:54.000Z
tests/unit/objects/test_list.py
FerrariDG/aws-s3-tools
0ddbb35cebc858bae1a0627aa8726e063a3ef5cd
[ "MIT" ]
4
2021-04-20T18:20:32.000Z
2022-02-04T08:32:39.000Z
tests/unit/objects/test_list_objects.py
dlite-tools/aws-s3-tools
f434ed36c1fc0530f2be6b52808cbc5e59ea8990
[ "MIT" ]
2
2021-03-04T00:25:51.000Z
2021-05-10T13:20:42.000Z
"""Unit tests for list.py""" from botocore.exceptions import ClientError from s3_tools import list_objects from tests.unit.conftest import ( create_bucket, BUCKET_NAME, FILENAME ) class TestList: def test_list_nonexisting_bucket(self, s3_client): try: list_objects(BUCKET_NAME) ...
27.333333
69
0.647154
from botocore.exceptions import ClientError from s3_tools import list_objects from tests.unit.conftest import ( create_bucket, BUCKET_NAME, FILENAME ) class TestList: def test_list_nonexisting_bucket(self, s3_client): try: list_objects(BUCKET_NAME) except ClientError as ...
true
true
1c2ea307dfc71029b6d922a7886d6cfe21a1e7e4
5,215
py
Python
tests/common/test_run/ascend/matmul_addn_transdata_run.py
tianjiashuo/akg
a9cbf642063fb1086a93e8bc6be6feb145689817
[ "Apache-2.0" ]
286
2020-06-23T06:40:44.000Z
2022-03-30T01:27:49.000Z
tests/common/test_run/ascend/matmul_addn_transdata_run.py
tianjiashuo/akg
a9cbf642063fb1086a93e8bc6be6feb145689817
[ "Apache-2.0" ]
10
2020-07-31T03:26:59.000Z
2021-12-27T15:00:54.000Z
tests/common/test_run/ascend/matmul_addn_transdata_run.py
tianjiashuo/akg
a9cbf642063fb1086a93e8bc6be6feb145689817
[ "Apache-2.0" ]
30
2020-07-17T01:04:14.000Z
2021-12-27T14:05:19.000Z
# 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...
48.287037
185
0.671333
import akg.tvm import numpy as np from akg.utils import kernel_exec as utils from akg.ops.math.ascend import MatMul from tests.common.test_run.ascend.matmul_run import * from akg.ops.math import Addn from akg.ops.math import Add def matmul_addn_transdata(x, y, adds, b, out_dtype, left_format="zZ", right_format="nZ", ...
true
true
1c2ea46aad078a13c077e1ce5e6d9d9417d6e2d3
815
py
Python
gan/PyTorch-GAN-Mnist/test.py
hadleyhzy34/GANs-practice
37d1dcf4e4b492e6d070b0ba72f320913af9b17a
[ "MIT" ]
null
null
null
gan/PyTorch-GAN-Mnist/test.py
hadleyhzy34/GANs-practice
37d1dcf4e4b492e6d070b0ba72f320913af9b17a
[ "MIT" ]
null
null
null
gan/PyTorch-GAN-Mnist/test.py
hadleyhzy34/GANs-practice
37d1dcf4e4b492e6d070b0ba72f320913af9b17a
[ "MIT" ]
null
null
null
import torch from torchvision import transforms import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec plt.rcParams['figure.figsize'] = (10.0, 8.0) plt.rcParams['image.interpolation'] = 'nearest' plt.rcParams['image.cmap'] = 'gray' def show_images(images): sqrtn = int(np.ceil...
21.447368
57
0.70184
import torch from torchvision import transforms import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec plt.rcParams['figure.figsize'] = (10.0, 8.0) plt.rcParams['image.interpolation'] = 'nearest' plt.rcParams['image.cmap'] = 'gray' def show_images(images): sqrtn = int(np.ceil...
true
true
1c2ea46c2dbae491088472dec33c9b4319f71f78
8,389
py
Python
src/m2_functions.py
ElliotBoutell/ObjectsFunctionsAndMethods
2f022fc7dbca5a5ad3b90cdb280e59b1ef28dd93
[ "MIT" ]
null
null
null
src/m2_functions.py
ElliotBoutell/ObjectsFunctionsAndMethods
2f022fc7dbca5a5ad3b90cdb280e59b1ef28dd93
[ "MIT" ]
null
null
null
src/m2_functions.py
ElliotBoutell/ObjectsFunctionsAndMethods
2f022fc7dbca5a5ad3b90cdb280e59b1ef28dd93
[ "MIT" ]
null
null
null
""" Practice DEFINING and CALLING FUNCTIONS Authors: David Mutchler, Dave Fisher, Valerie Galluzzi, Amanda Stouder, their colleagues and Elliot Boutell. """ ######################################################################## # # Done: 1. PUT YOUR NAME IN THE ABOVE LINE and... # # Allow this file ...
34.101626
93
0.561092
######################################################################## import rosegraphics as rg import random def main(): # A TurtleWindow works "behind the scenes" to enable Turtle movement window = rg.TurtleWindow() turtle1() turtle4() turtle5() turtle3() turtle2() turtle2() ...
true
true
1c2ea51069614377d2b53c72c7b82fa4c473af18
3,559
py
Python
anuvaad-etl/anuvaad-extractor/aligner/etl-aligner/kafkawrapper/alignmentwflowconsumer.py
ManavTriesStuff/anuvaad
6993e3ac78818c171c173ccf8acf962ff57856a4
[ "MIT" ]
15
2021-01-08T08:42:30.000Z
2022-03-12T17:52:15.000Z
anuvaad-etl/anuvaad-extractor/aligner/etl-aligner/kafkawrapper/alignmentwflowconsumer.py
ManavTriesStuff/anuvaad
6993e3ac78818c171c173ccf8acf962ff57856a4
[ "MIT" ]
16
2021-01-21T01:38:51.000Z
2022-01-20T08:59:52.000Z
anuvaad-etl/anuvaad-extractor/aligner/etl-aligner/kafkawrapper/alignmentwflowconsumer.py
ManavTriesStuff/anuvaad
6993e3ac78818c171c173ccf8acf962ff57856a4
[ "MIT" ]
25
2020-08-26T11:25:38.000Z
2022-03-29T04:40:21.000Z
import json import logging import random import string import threading from kafka import KafkaConsumer, TopicPartition from service.alignmentservice import AlignmentService from utilities.alignmentutils import AlignmentUtils from logging.config import dictConfig from configs.alignerconfig import kafka_bootstrap_serve...
35.237624
125
0.540882
import json import logging import random import string import threading from kafka import KafkaConsumer, TopicPartition from service.alignmentservice import AlignmentService from utilities.alignmentutils import AlignmentUtils from logging.config import dictConfig from configs.alignerconfig import kafka_bootstrap_serve...
true
true
1c2ea52c32488d1ead6f2d2517e097d076dc1c24
13,804
py
Python
circuit.py
Diimu/circuitsimulator
3a4aeaaa89b5e9bba1598736140e32b3ca1e0da4
[ "MIT" ]
null
null
null
circuit.py
Diimu/circuitsimulator
3a4aeaaa89b5e9bba1598736140e32b3ca1e0da4
[ "MIT" ]
3
2019-09-08T18:34:27.000Z
2019-09-08T21:51:18.000Z
circuit.py
Diimu/circuitsimulator
3a4aeaaa89b5e9bba1598736140e32b3ca1e0da4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Class "Circuit" defines simple one port object/circuit having frequency (single point or array), impedance, and possibly a list of components that constitute the circuit. """ import numpy as np import scipy import matplotlib.pyplot as plt import skrf class Circuit: def __init__(s...
41.083333
262
0.562808
import numpy as np import scipy import matplotlib.pyplot as plt import skrf class Circuit: def __init__(self, f, Z, Z0=50, draw_smith=True): self.Z = Z self.f = f self.Z0 = Z0 self.draw_smith=draw_smith self.components = [('start', Z)] if np.size(sel...
true
true
1c2ea563c1498911db332ccc6f834146e3a96988
105,906
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/aio/operations/_network_watchers_operations.py
praveenkuttappan/azure-sdk-for-python
4b79413667b7539750a6c7dde15737013a3d4bd5
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/aio/operations/_network_watchers_operations.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/aio/operations/_network_watchers_operations.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "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 ...
53.541962
250
0.686288
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pi...
true
true
1c2ea56f126d1754020d9b2394105da6f3ce0700
7,580
py
Python
sleepy/http.py
HitSyr/Sleepy
70ec9479fb947a624e3c658ea39c886c30bf794d
[ "MIT" ]
4
2021-12-08T21:38:14.000Z
2022-01-30T04:16:38.000Z
sleepy/http.py
HitSyr/Sleepy
70ec9479fb947a624e3c658ea39c886c30bf794d
[ "MIT" ]
2
2021-09-29T13:33:26.000Z
2021-12-12T12:52:16.000Z
sleepy/http.py
HitSyr/Sleepy
70ec9479fb947a624e3c658ea39c886c30bf794d
[ "MIT" ]
null
null
null
""" Copyright (c) 2018-present HitchedSyringe This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. """ from __future__ import annotations __all__ = ( "HTTPRequester", ...
29.84252
94
0.596042
from __future__ import annotations __all__ = ( "HTTPRequester", "HTTPRequestFailed", ) import asyncio import logging from collections.abc import MutableMapping from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple, Union import aiohttp from discord.ext import commands _LOG = logging.getLogger(__...
true
true
1c2ea76b9cf021143d713f6a07b53b3b5319c5e6
3,425
py
Python
server.py
umran23/2_Threaded_server
eed32916ae645419c9634f7f6f4994300fe3feef
[ "Apache-2.0" ]
null
null
null
server.py
umran23/2_Threaded_server
eed32916ae645419c9634f7f6f4994300fe3feef
[ "Apache-2.0" ]
null
null
null
server.py
umran23/2_Threaded_server
eed32916ae645419c9634f7f6f4994300fe3feef
[ "Apache-2.0" ]
null
null
null
import socket from threading import Thread class Server: addr = '' port = 3030 connections = 4 def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.logging('Socket has created') self....
29.525862
76
0.52
import socket from threading import Thread class Server: addr = '' port = 3030 connections = 4 def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.logging('Socket has created') self....
true
true
1c2ea7d11faf357ec52b98e2b099ef65b110baa3
4,548
py
Python
temboo/core/Library/Twitter/Trends/Available.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
7
2016-03-07T02:07:21.000Z
2022-01-21T02:22:41.000Z
temboo/core/Library/Twitter/Trends/Available.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
null
null
null
temboo/core/Library/Twitter/Trends/Available.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
8
2016-06-14T06:01:11.000Z
2020-04-22T09:21:44.000Z
# -*- coding: utf-8 -*- ############################################################################### # # Available # Retrieves the locations that Twitter has trending topic information for. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "Lic...
40.247788
173
0.677661
from temboo.core.choreography import Choreography from temboo.core.choreography import InputSet from temboo.core.choreography import ResultSet from temboo.core.choreography import ChoreographyExecution import json class Available(Choreography): def __init__(self, temboo_session): super(Available, self)...
true
true
1c2ea7fb4024eb02de28a8b3543f21c6f2b00b6c
67
py
Python
tuiuiu/tuiuiutenant/__init__.py
caputomarcos/tuiuiu.io
d8fb57cf95487e7fe1454b2130ef18acc916da46
[ "BSD-3-Clause" ]
3
2019-08-08T09:09:35.000Z
2020-12-15T18:04:17.000Z
tuiuiu/tuiuiutenant/__init__.py
caputomarcos/tuiuiu.io
d8fb57cf95487e7fe1454b2130ef18acc916da46
[ "BSD-3-Clause" ]
null
null
null
tuiuiu/tuiuiutenant/__init__.py
caputomarcos/tuiuiu.io
d8fb57cf95487e7fe1454b2130ef18acc916da46
[ "BSD-3-Clause" ]
1
2017-09-09T20:10:40.000Z
2017-09-09T20:10:40.000Z
default_app_config = 'tuiuiu.tuiuiutenant.apps.TuiuiuTenantConfig'
33.5
66
0.865672
default_app_config = 'tuiuiu.tuiuiutenant.apps.TuiuiuTenantConfig'
true
true
1c2ea8d8d7ef40216683485021e310b67b3e922f
1,963
py
Python
genanki/deck.py
jahzielv/genanki
6d173fcd8a50b29164d733fce750276bc9a9f39d
[ "MIT" ]
null
null
null
genanki/deck.py
jahzielv/genanki
6d173fcd8a50b29164d733fce750276bc9a9f39d
[ "MIT" ]
null
null
null
genanki/deck.py
jahzielv/genanki
6d173fcd8a50b29164d733fce750276bc9a9f39d
[ "MIT" ]
null
null
null
import json from .apkg_col import APKG_COL class Deck: def __init__(self, deck_id=None, name=None): self.deck_id = deck_id self.name = name self.notes = [] self.models = {} # map of model id to model def add_note(self, note): self.notes.append(note) def add_model(self, model): self.mo...
32.716667
118
0.691798
import json from .apkg_col import APKG_COL class Deck: def __init__(self, deck_id=None, name=None): self.deck_id = deck_id self.name = name self.notes = [] self.models = {} def add_note(self, note): self.notes.append(note) def add_model(self, model): self.models[model.model_id] = mode...
true
true
1c2ea92a4a85689ac010f07469d5822e50872e06
9,408
py
Python
nssrc/com/citrix/netscaler/nitro/resource/config/aaa/aaauser_authorizationpolicy_binding.py
guardicore/nitro-python
5346a5086134aead80968f15a41ff527adaa0ec1
[ "Apache-2.0" ]
null
null
null
nssrc/com/citrix/netscaler/nitro/resource/config/aaa/aaauser_authorizationpolicy_binding.py
guardicore/nitro-python
5346a5086134aead80968f15a41ff527adaa0ec1
[ "Apache-2.0" ]
null
null
null
nssrc/com/citrix/netscaler/nitro/resource/config/aaa/aaauser_authorizationpolicy_binding.py
guardicore/nitro-python
5346a5086134aead80968f15a41ff527adaa0ec1
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2021 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
32
322
0.737883
from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_resource from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_response from nssrc.com.citrix.netscaler.nitro.service.options import options from nssrc.com.citrix.netscaler.nitro.exception.nitro_exception import nitro...
true
true
1c2ea92c956ad3a9d2609c38a046d8ef976c4efa
4,139
py
Python
benchmark/startQiskit_noisy954.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_noisy954.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_noisy954.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=5 # total number=45 import cirq import qiskit from qiskit.providers.aer import QasmSimulator from qiskit.test.mock import FakeVigo from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import ...
30.88806
82
0.60691
import cirq import qiskit from qiskit.providers.aer import QasmSimulator from qiskit.test.mock import FakeVigo from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2,floo...
true
true
1c2ea9c9fc370bfa92466b9a39561738eb589c91
1,175
py
Python
calories_screen.py
RossinesP/pygamer_bike_game
2b852126f1d04d6fc5e1053a3217862d86c7856d
[ "MIT" ]
null
null
null
calories_screen.py
RossinesP/pygamer_bike_game
2b852126f1d04d6fc5e1053a3217862d86c7856d
[ "MIT" ]
null
null
null
calories_screen.py
RossinesP/pygamer_bike_game
2b852126f1d04d6fc5e1053a3217862d86c7856d
[ "MIT" ]
null
null
null
from screen import Screen from tracker import Tracker from adafruit_display_text import label import neopixel import terminalio class CaloriesScreen(Screen): def __init__(self, screen_manager, pixels: neopixel.NeoPixel, tracker: Tracker): super().__init__(screen_manager, pixels, tracker) font = t...
33.571429
84
0.670638
from screen import Screen from tracker import Tracker from adafruit_display_text import label import neopixel import terminalio class CaloriesScreen(Screen): def __init__(self, screen_manager, pixels: neopixel.NeoPixel, tracker: Tracker): super().__init__(screen_manager, pixels, tracker) font = t...
true
true
1c2eaa0ab91564a8c0e4fbb3f53ce5a5e680221a
10,973
py
Python
deeppavlov/tasks/insults/build.py
deepmipt/kpi2017
0f6b13c6ea76e544804ce66ba372c66d5ef9ee30
[ "Apache-2.0" ]
3
2018-02-19T15:34:44.000Z
2018-06-05T10:02:00.000Z
deeppavlov/tasks/insults/build.py
deepmipt/kpi2017
0f6b13c6ea76e544804ce66ba372c66d5ef9ee30
[ "Apache-2.0" ]
null
null
null
deeppavlov/tasks/insults/build.py
deepmipt/kpi2017
0f6b13c6ea76e544804ce66ba372c66d5ef9ee30
[ "Apache-2.0" ]
1
2021-03-22T09:06:52.000Z
2021-03-22T09:06:52.000Z
# Copyright 2017 Neural Networks and Deep Learning lab, MIPT # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
38.773852
124
0.564385
import parlai.core.build_data as build_data import os import re import string import numpy as np import pandas as pd import urllib def data_preprocessing(f): f = [x.lower() for x in f] f = [re.sub(r'^"|"$', '', x) for x in f] f = [x.replace("\\n", " ") for x in f] f = [x.replace("\\t", " ") for x in...
true
true
1c2eab47e8c5b4f21800af9cd5ed1e8c95cb0209
4,176
py
Python
src/compas_assembly/datastructures/block.py
BlockResearchGroup/compas_assembly
6a257e1afaf304f9ddad02baed2396e5bacf91f8
[ "MIT" ]
8
2019-01-30T18:08:07.000Z
2021-06-25T09:35:01.000Z
src/compas_assembly/datastructures/block.py
BlockResearchGroup/compas_assembly
6a257e1afaf304f9ddad02baed2396e5bacf91f8
[ "MIT" ]
6
2019-07-17T11:29:45.000Z
2020-03-20T13:32:38.000Z
src/compas_assembly/datastructures/block.py
BlockResearchGroup/compas_assembly
6a257e1afaf304f9ddad02baed2396e5bacf91f8
[ "MIT" ]
18
2019-01-29T09:02:40.000Z
2021-12-09T09:52:25.000Z
from __future__ import print_function from __future__ import absolute_import from __future__ import division from compas.geometry import centroid_points from compas.geometry import cross_vectors from compas.geometry import dot_vectors from compas.geometry import normalize_vector from compas.geometry import centroid_po...
28.216216
89
0.588362
from __future__ import print_function from __future__ import absolute_import from __future__ import division from compas.geometry import centroid_points from compas.geometry import cross_vectors from compas.geometry import dot_vectors from compas.geometry import normalize_vector from compas.geometry import centroid_po...
true
true
1c2eabd376142cf807c1e8d6a65fe520113a747a
2,247
py
Python
rbapi/apps/api/models.py
Yariquezz/check_gov_ua
89d9a4d66ad5a675f64c8172de9d343b1024b102
[ "Apache-2.0" ]
null
null
null
rbapi/apps/api/models.py
Yariquezz/check_gov_ua
89d9a4d66ad5a675f64c8172de9d343b1024b102
[ "Apache-2.0" ]
9
2020-04-04T12:38:15.000Z
2021-10-02T09:56:42.000Z
rbapi/apps/api/models.py
Yariquezz/check_gov_ua
89d9a4d66ad5a675f64c8172de9d343b1024b102
[ "Apache-2.0" ]
null
null
null
from django.db import models import uuid def get_default_uuid(): return uuid.uuid4().hex class BankInfo(models.Model): tax_code = models.IntegerField(primary_key=True) bank_name = models.CharField(max_length=200, default=None, null=True) support_number_1 = models.CharField(max_length=13, default=Non...
34.569231
87
0.683133
from django.db import models import uuid def get_default_uuid(): return uuid.uuid4().hex class BankInfo(models.Model): tax_code = models.IntegerField(primary_key=True) bank_name = models.CharField(max_length=200, default=None, null=True) support_number_1 = models.CharField(max_length=13, default=Non...
true
true
1c2eabda09f4342028ede80cfd64ae89c9792eb2
2,844
py
Python
apps/backend/users/views.py
12roshan12/Hotel-website
81c9ca74ea1f080c7fffb7cc350a39ccb2f2596f
[ "MIT" ]
null
null
null
apps/backend/users/views.py
12roshan12/Hotel-website
81c9ca74ea1f080c7fffb7cc350a39ccb2f2596f
[ "MIT" ]
null
null
null
apps/backend/users/views.py
12roshan12/Hotel-website
81c9ca74ea1f080c7fffb7cc350a39ccb2f2596f
[ "MIT" ]
null
null
null
from django.urls import reverse from django.shortcuts import render, redirect, HttpResponseRedirect from django.contrib.messages.views import SuccessMessageMixin from django.utils.translation import templatize from django.views.generic import CreateView, ListView, DeleteView, UpdateView from .forms import EnquiryForm, ...
32.689655
78
0.716245
from django.urls import reverse from django.shortcuts import render, redirect, HttpResponseRedirect from django.contrib.messages.views import SuccessMessageMixin from django.utils.translation import templatize from django.views.generic import CreateView, ListView, DeleteView, UpdateView from .forms import EnquiryForm, ...
true
true
1c2eabe68bf4698868e90a9f2d54a2c3d20e6bd8
12,464
py
Python
nonebot/matcher.py
Lancercmd/nonebot2
59d49becf49d108442c7ca05e4f3e2fb98c3a972
[ "MIT" ]
null
null
null
nonebot/matcher.py
Lancercmd/nonebot2
59d49becf49d108442c7ca05e4f3e2fb98c3a972
[ "MIT" ]
null
null
null
nonebot/matcher.py
Lancercmd/nonebot2
59d49becf49d108442c7ca05e4f3e2fb98c3a972
[ "MIT" ]
null
null
null
""" 事件响应器 ========== 该模块实现事件响应器的创建与运行,并提供一些快捷方法来帮助用户更好的与机器人进行 对话 。 """ from nonebot.log import logger import typing import inspect from functools import wraps from datetime import datetime from contextvars import ContextVar from collections import defaultdict from nonebot.rule import Rule from nonebot.permission imp...
27.575221
106
0.522866
from nonebot.log import logger import typing import inspect from functools import wraps from datetime import datetime from contextvars import ContextVar from collections import defaultdict from nonebot.rule import Rule from nonebot.permission import Permission, USER from nonebot.typing import Type, List, Dict, Union,...
true
true
1c2eacfafb6429adc60a79646324136bfdb1e1d0
786
py
Python
var/spack/repos/builtin/packages/py-lit/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2,360
2017-11-06T08:47:01.000Z
2022-03-31T14:45:33.000Z
var/spack/repos/builtin/packages/py-lit/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
13,838
2017-11-04T07:49:45.000Z
2022-03-31T23:38:39.000Z
var/spack/repos/builtin/packages/py-lit/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1,793
2017-11-04T07:45:50.000Z
2022-03-30T14:31:53.000Z
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyLit(PythonPackage): """lit is a portable tool for executing LLVM and Clang style test su...
37.428571
96
0.749364
from spack import * class PyLit(PythonPackage): pypi = "lit/lit-0.5.0.tar.gz" version('0.7.1', sha256='ecef2833aef7f411cb923dac109c7c9dcc7dbe7cafce0650c1e8d19c243d955f') version('0.5.0', sha256='3ea4251e78ebeb2e07be2feb33243d1f8931d956efc96ccc2b0846ced212b58c') depends_on('py-setuptools', type='...
true
true
1c2ead19859c5bebfcacdc7ae5358b7e31a8fe09
2,097
py
Python
is_ros_pkg/examples/client.py
viniciusbaltoe/is-ros-pkg
e1ec6d5aa40d82b9259e406a1d6d196402e7a246
[ "MIT" ]
null
null
null
is_ros_pkg/examples/client.py
viniciusbaltoe/is-ros-pkg
e1ec6d5aa40d82b9259e406a1d6d196402e7a246
[ "MIT" ]
null
null
null
is_ros_pkg/examples/client.py
viniciusbaltoe/is-ros-pkg
e1ec6d5aa40d82b9259e406a1d6d196402e7a246
[ "MIT" ]
null
null
null
from is_wire.core import Channel, Subscription, Message from google.protobuf.empty_pb2 import Empty from is_msgs.common_pb2 import Position import json import socket import time if __name__ == "__main__": # -------------------------- Options ------------------------- cont = True config_file = '../etc/conf/con...
33.822581
71
0.592752
from is_wire.core import Channel, Subscription, Message from google.protobuf.empty_pb2 import Empty from is_msgs.common_pb2 import Position import json import socket import time if __name__ == "__main__": cont = True config_file = '../etc/conf/config.json' config = json.load(open(config_file, 'r')) ...
true
true
1c2eadfcae187ab3eede7b128082e792f9694294
95
py
Python
tests/__init__.py
rebornix/jedi-language-server
13297ba1cc109c5f8c2e3b72a82ea79cc9711473
[ "MIT" ]
300
2019-08-20T14:00:37.000Z
2022-03-31T00:10:25.000Z
tests/__init__.py
rebornix/jedi-language-server
13297ba1cc109c5f8c2e3b72a82ea79cc9711473
[ "MIT" ]
136
2019-08-19T16:04:16.000Z
2022-03-17T21:31:18.000Z
tests/__init__.py
rebornix/jedi-language-server
13297ba1cc109c5f8c2e3b72a82ea79cc9711473
[ "MIT" ]
37
2020-05-03T14:20:51.000Z
2022-03-23T06:12:22.000Z
"""Testing entrypoint.""" import py TEST_DATA = py.path.local(__file__) / ".." / "test_data"
15.833333
56
0.652632
import py TEST_DATA = py.path.local(__file__) / ".." / "test_data"
true
true
1c2eaf20ba4549dae9aed8b51f3a802ab0cf1569
2,506
py
Python
bigml/tests/inspect_model_steps.py
deven96/python
46be8622fe58f004bdbd636a08a8904ef4134bcd
[ "Apache-2.0" ]
1
2021-08-30T20:18:38.000Z
2021-08-30T20:18:38.000Z
bigml/tests/inspect_model_steps.py
deven96/python
46be8622fe58f004bdbd636a08a8904ef4134bcd
[ "Apache-2.0" ]
null
null
null
bigml/tests/inspect_model_steps.py
deven96/python
46be8622fe58f004bdbd636a08a8904ef4134bcd
[ "Apache-2.0" ]
1
2021-08-30T20:18:40.000Z
2021-08-30T20:18:40.000Z
# -*- coding: utf-8 -*- #!/usr/bin/env python # # Copyright 2012, 2015-2019 BigML # # 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...
32.545455
75
0.735834
import io import os from bigml.tests.world import res_filename from world import world from nose.tools import eq_ def i_translate_the_tree_into_IF_THEN_rules(step): output = io.BytesIO() world.local_model.rules(out=output) world.output = output.getvalue() def i_check_the_data_distribution(step, file): ...
true
true
1c2eaf3facbffed299455ef3e1efd26f63e89301
591
py
Python
runners/fastwsgi_server.py
timb-machine-mirrors/pcf
d697a531da8c4206a6d874e689312a359446f8da
[ "MIT" ]
null
null
null
runners/fastwsgi_server.py
timb-machine-mirrors/pcf
d697a531da8c4206a6d874e689312a359446f8da
[ "MIT" ]
null
null
null
runners/fastwsgi_server.py
timb-machine-mirrors/pcf
d697a531da8c4206a6d874e689312a359446f8da
[ "MIT" ]
null
null
null
import fastwsgi import app def start_server(): host, port, debug, ssl_context = app.config_prepare() def requires_authorization(f): @wraps(f) def decorated(*args, **kwargs): if config['security']['basic_auth'] == '0': return f(*args, **kwargs) auth = re...
28.142857
82
0.605753
import fastwsgi import app def start_server(): host, port, debug, ssl_context = app.config_prepare() def requires_authorization(f): @wraps(f) def decorated(*args, **kwargs): if config['security']['basic_auth'] == '0': return f(*args, **kwargs) auth = re...
true
true
1c2eaf46a4ed2fe9166ba288f3f111543133d5b3
10,128
py
Python
workbench/deals/models.py
yoshson/workbench
701558cac3357cd82e4dc99f0fefed12ee81ddc5
[ "MIT" ]
15
2020-09-02T22:17:34.000Z
2022-02-01T20:09:10.000Z
workbench/deals/models.py
yoshson/workbench
701558cac3357cd82e4dc99f0fefed12ee81ddc5
[ "MIT" ]
18
2020-01-08T15:28:26.000Z
2022-02-28T02:46:41.000Z
workbench/deals/models.py
yoshson/workbench
701558cac3357cd82e4dc99f0fefed12ee81ddc5
[ "MIT" ]
8
2020-09-29T08:00:24.000Z
2022-01-16T11:58:19.000Z
import datetime as dt from functools import total_ordering from django.db import models from django.db.models import Q from django.utils import timezone from django.utils.html import format_html from django.utils.translation import gettext_lazy as _ from workbench.accounts.models import User from workbench.contacts.m...
30.053412
86
0.61957
import datetime as dt from functools import total_ordering from django.db import models from django.db.models import Q from django.utils import timezone from django.utils.html import format_html from django.utils.translation import gettext_lazy as _ from workbench.accounts.models import User from workbench.contacts.m...
true
true
1c2eb04a1a9b3067e99eeca4aaa9170032411906
6,912
py
Python
pyastar/astar.py
julesy89/pyastar
8f063d55c9f88e1d1f3c6a08b652038abf33b90c
[ "Apache-2.0" ]
3
2020-02-10T16:33:31.000Z
2022-01-30T06:09:46.000Z
pyastar/astar.py
julesy89/pyastar
8f063d55c9f88e1d1f3c6a08b652038abf33b90c
[ "Apache-2.0" ]
null
null
null
pyastar/astar.py
julesy89/pyastar
8f063d55c9f88e1d1f3c6a08b652038abf33b90c
[ "Apache-2.0" ]
null
null
null
from pyastar.problem import Problem from pyastar.util.node import NodeFactory from pyastar.util.pq import PriorityQueueSet class AStar: def __init__(self, problem, heuristic_is_inconsistent=False, open_set_max_size=None, open_set_truncate_size=N...
31.135135
105
0.584346
from pyastar.problem import Problem from pyastar.util.node import NodeFactory from pyastar.util.pq import PriorityQueueSet class AStar: def __init__(self, problem, heuristic_is_inconsistent=False, open_set_max_size=None, open_set_truncate_size=N...
true
true
1c2eb1241d77c82f23ac9ba30d8c63a85cb425c1
4,431
py
Python
source/runbooks/ssm-py-scripts/start_secondary_ssm_automation_aurora_cluster.py
elduds/aws-instance-scheduler
4b4c8a628fd0ab34e7d5c17af215f0bf10e48bd8
[ "Apache-2.0" ]
338
2018-02-09T17:24:26.000Z
2021-10-06T01:33:52.000Z
source/runbooks/ssm-py-scripts/start_secondary_ssm_automation_aurora_cluster.py
elduds/aws-instance-scheduler
4b4c8a628fd0ab34e7d5c17af215f0bf10e48bd8
[ "Apache-2.0" ]
267
2018-02-09T10:45:25.000Z
2021-10-15T14:47:34.000Z
source/runbooks/ssm-py-scripts/start_secondary_ssm_automation_aurora_cluster.py
elduds/aws-instance-scheduler
4b4c8a628fd0ab34e7d5c17af215f0bf10e48bd8
[ "Apache-2.0" ]
193
2018-02-14T08:25:30.000Z
2021-10-06T14:59:14.000Z
###################################################################################################################### # Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # ...
41.027778
118
0.488152
import boto3 import logging from botocore.config import Config def start_rds_secondary_ssm_automation(event, context) -> list: logging.debug(context) execution_ids = [] if not event.get('RdsResourceArns'): return execution_ids ssm_client = get_client(event) resource_list = get_resour...
true
true
1c2eb12c6402438db405004fbe1816c60fc14302
969
py
Python
MSKHackMAG/api.py
kelbin/MCHProject2021Mosru
3acf7bef228da7a42a1f2ae42562d4ac98a53acb
[ "MIT" ]
null
null
null
MSKHackMAG/api.py
kelbin/MCHProject2021Mosru
3acf7bef228da7a42a1f2ae42562d4ac98a53acb
[ "MIT" ]
null
null
null
MSKHackMAG/api.py
kelbin/MCHProject2021Mosru
3acf7bef228da7a42a1f2ae42562d4ac98a53acb
[ "MIT" ]
1
2021-06-13T23:33:51.000Z
2021-06-13T23:33:51.000Z
from afisha import get_afisha from analytic import write_like, calculate_recomendation from result import Result import json def get_feed(): r = get_afisha() return r def send_like(data): userId = data["userId"] afishaId = data["afishaId"] result = write_like(userId, afishaId, 1) return res...
22.534884
61
0.668731
from afisha import get_afisha from analytic import write_like, calculate_recomendation from result import Result import json def get_feed(): r = get_afisha() return r def send_like(data): userId = data["userId"] afishaId = data["afishaId"] result = write_like(userId, afishaId, 1) return res...
true
true
1c2eb33b28bbe6a77f7479bf5efcdd305388856e
539
py
Python
flame/core/model/model_wrapper.py
v-tronglh/flamev2
7f376e8fbcfb592e0ad6f72fdaad0af5f2cf9231
[ "MIT" ]
3
2021-08-05T15:42:05.000Z
2022-03-17T08:56:58.000Z
flame/core/model/model_wrapper.py
v-tronglh/flamev2
7f376e8fbcfb592e0ad6f72fdaad0af5f2cf9231
[ "MIT" ]
null
null
null
flame/core/model/model_wrapper.py
v-tronglh/flamev2
7f376e8fbcfb592e0ad6f72fdaad0af5f2cf9231
[ "MIT" ]
null
null
null
from typing import Any, Callable from torch.nn import Module class ModelWrapper: def __init__( self, model: Module, input_transform: Callable = lambda x: x, ): super(ModelWrapper, self).__init__() self.model = model self.input_transform = input_transform d...
23.434783
48
0.621521
from typing import Any, Callable from torch.nn import Module class ModelWrapper: def __init__( self, model: Module, input_transform: Callable = lambda x: x, ): super(ModelWrapper, self).__init__() self.model = model self.input_transform = input_transform d...
true
true
1c2eb363382ba5f5dcee9f8740c9c3dcf0ae5183
362
py
Python
idact/detail/log/set_paramiko_log_level.py
intdata-bsc/idact
54cb65a711c145351e205970c27c83e6393cccf5
[ "MIT" ]
5
2018-12-06T15:40:34.000Z
2019-06-19T11:22:58.000Z
idact/detail/log/set_paramiko_log_level.py
garstka/idact
b9c8405c94db362c4a51d6bfdf418b14f06f0da1
[ "MIT" ]
9
2018-12-06T16:35:26.000Z
2019-04-28T19:01:40.000Z
idact/detail/log/set_paramiko_log_level.py
intdata-bsc/idact
54cb65a711c145351e205970c27c83e6393cccf5
[ "MIT" ]
2
2019-04-28T19:18:58.000Z
2019-06-17T06:56:28.000Z
"""This module contains a function for setting the log level for paramiko.""" import logging from idact.detail.log.get_logger import get_debug_logger PARAMIKO_LOG_LEVEL = logging.WARNING def set_paramiko_log_level(): """Sets the log level for paramiko.""" transport = get_debug_logger('paramiko.transport') ...
27.846154
77
0.779006
import logging from idact.detail.log.get_logger import get_debug_logger PARAMIKO_LOG_LEVEL = logging.WARNING def set_paramiko_log_level(): transport = get_debug_logger('paramiko.transport') transport.setLevel(PARAMIKO_LOG_LEVEL)
true
true
1c2eb66c68f8848733b17a3cf4239ec78a433d0d
7,298
py
Python
configs/trainval/daotad_eccv2022/2.a.iii.1.py
klauscc/vedatad
c59f5ddc8fb227ef08baccbb513948bb1bb23857
[ "Apache-2.0" ]
null
null
null
configs/trainval/daotad_eccv2022/2.a.iii.1.py
klauscc/vedatad
c59f5ddc8fb227ef08baccbb513948bb1bb23857
[ "Apache-2.0" ]
null
null
null
configs/trainval/daotad_eccv2022/2.a.iii.1.py
klauscc/vedatad
c59f5ddc8fb227ef08baccbb513948bb1bb23857
[ "Apache-2.0" ]
null
null
null
# 1. data dataset_type = "Thumos14Dataset" data_root = "data/thumos14/" img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True ) num_frames = 480 img_shape = (224, 224) overlap_ratio = 0.25 img_dir = "frames_15fps_256x256" data = dict( samples_per_gpu=4, workers_per_g...
28.960317
110
0.571252
dataset_type = "Thumos14Dataset" data_root = "data/thumos14/" img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True ) num_frames = 480 img_shape = (224, 224) overlap_ratio = 0.25 img_dir = "frames_15fps_256x256" data = dict( samples_per_gpu=4, workers_per_gpu=4, ...
true
true
1c2eb69e1e3be5add0d649df44930718da7344ef
797
py
Python
miniurl_generic/url/migrations/0001_initial.py
yannisVentura/Django_MiniUrl_Bootstrap
89a7cdb8c12ba75cf0cd2cb6206961506aad9287
[ "BSD-3-Clause" ]
null
null
null
miniurl_generic/url/migrations/0001_initial.py
yannisVentura/Django_MiniUrl_Bootstrap
89a7cdb8c12ba75cf0cd2cb6206961506aad9287
[ "BSD-3-Clause" ]
8
2017-04-05T13:15:39.000Z
2017-10-17T09:39:04.000Z
miniurl_generic/url/migrations/0001_initial.py
yannisVentura/Django_MiniUrl_Bootstrap
89a7cdb8c12ba75cf0cd2cb6206961506aad9287
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-10-04 08:06 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='MiniUr...
29.518519
114
0.603513
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='MiniUrl', fields=[ ('id', models.AutoField(auto_cre...
true
true
1c2eb6b0bb8c9e52dc65101ee61fd393746c6d9b
1,205
py
Python
airflow/ti_deps/deps/dag_unpaused_dep.py
wileeam/airflow
f46be8152a4d89c57db4ca46f5b3339e4876b723
[ "Apache-2.0" ]
8
2017-04-20T16:15:44.000Z
2020-10-11T13:44:10.000Z
airflow/ti_deps/deps/dag_unpaused_dep.py
devlocalca/airflow
58c3542ed25061320ce61dbe0adf451a44c738dd
[ "Apache-2.0" ]
219
2017-03-15T18:40:16.000Z
2022-02-28T22:52:43.000Z
airflow/ti_deps/deps/dag_unpaused_dep.py
devlocalca/airflow
58c3542ed25061320ce61dbe0adf451a44c738dd
[ "Apache-2.0" ]
3
2016-07-14T21:51:10.000Z
2020-10-12T13:26:36.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
37.65625
71
0.744398
from airflow.ti_deps.deps.base_ti_dep import BaseTIDep from airflow.utils.session import provide_session class DagUnpausedDep(BaseTIDep): NAME = "Dag Not Paused" IGNOREABLE = True @provide_session def _get_dep_statuses(self, ti, session, dep_context): if ti.task.dag.is_paused: yi...
true
true
1c2eb6fa73a233d255344a1bb49e88539d1b2bb5
616
py
Python
leetcode/easy/intersection_of_two_arrays_ii/py/solution.py
lilsweetcaligula/Online-Judges
48454a8e6b5b86f80e89eca1b396480df8960cfd
[ "MIT" ]
null
null
null
leetcode/easy/intersection_of_two_arrays_ii/py/solution.py
lilsweetcaligula/Online-Judges
48454a8e6b5b86f80e89eca1b396480df8960cfd
[ "MIT" ]
null
null
null
leetcode/easy/intersection_of_two_arrays_ii/py/solution.py
lilsweetcaligula/Online-Judges
48454a8e6b5b86f80e89eca1b396480df8960cfd
[ "MIT" ]
null
null
null
class Solution(object): def intersect(self, nums1, nums2): """ :type nums1: List[int] :type nums2: List[int] :rtype: List[int] """ result = [] nums1 = sorted(nums1) nums2 = sorted(nums2) i = 0 j = 0 while i <...
23.692308
48
0.371753
class Solution(object): def intersect(self, nums1, nums2): result = [] nums1 = sorted(nums1) nums2 = sorted(nums2) i = 0 j = 0 while i < len(nums1) and j < len(nums2): if nums1[i] == nums2[j]: result.append(nums1[i]) ...
true
true
1c2eb71ead2363009a56bf89e169532913118a38
160
py
Python
cards/apps.py
neosergio/WisdomBox
f41bd828f5e264c7ad05262b29c8f02cf904b54a
[ "MIT" ]
null
null
null
cards/apps.py
neosergio/WisdomBox
f41bd828f5e264c7ad05262b29c8f02cf904b54a
[ "MIT" ]
2
2017-02-09T14:52:43.000Z
2017-02-10T19:31:38.000Z
cards/apps.py
neosergio/WisdomBox
f41bd828f5e264c7ad05262b29c8f02cf904b54a
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.apps import AppConfig class CardsConfig(AppConfig): name = 'cards' verbose_name = 'Wisdom Cards'
17.777778
39
0.7625
from __future__ import unicode_literals from django.apps import AppConfig class CardsConfig(AppConfig): name = 'cards' verbose_name = 'Wisdom Cards'
true
true
1c2eb726a627a42117538c0779f66d6db0987c03
218
py
Python
stupidArtnet/__init__.py
verycollective/stupidArtnet
80e7722598d06e1c533ffd28a92e26c784e23389
[ "MIT" ]
13
2018-11-07T20:19:57.000Z
2020-07-31T23:15:00.000Z
stupidArtnet/__init__.py
digitalanimalscollective/stupidArtnet
80e7722598d06e1c533ffd28a92e26c784e23389
[ "MIT" ]
2
2019-04-10T17:22:23.000Z
2020-02-11T14:55:44.000Z
stupidArtnet/__init__.py
digitalanimalscollective/stupidArtnet
80e7722598d06e1c533ffd28a92e26c784e23389
[ "MIT" ]
9
2019-03-01T12:00:27.000Z
2020-07-30T19:34:15.000Z
"""Facilitates library imports.""" from stupidArtnet.StupidArtnetServer import StupidArtnetServer from stupidArtnet.ArtnetUtils import shift_this, put_in_range, make_address_mask from .StupidArtnet import StupidArtnet
43.6
80
0.866972
from stupidArtnet.StupidArtnetServer import StupidArtnetServer from stupidArtnet.ArtnetUtils import shift_this, put_in_range, make_address_mask from .StupidArtnet import StupidArtnet
true
true
1c2eb746dbf03c9401fcbe7364388d36d331e74a
72
py
Python
straph/paths/__init__.py
GiulioRossetti/Straph
edc021d25243bcca619c62dca1f28cf05b73a92c
[ "Apache-2.0" ]
3
2021-05-24T16:23:51.000Z
2021-08-07T20:14:53.000Z
straph/paths/__init__.py
GiulioRossetti/Straph
edc021d25243bcca619c62dca1f28cf05b73a92c
[ "Apache-2.0" ]
1
2021-05-25T12:30:36.000Z
2021-05-25T12:30:36.000Z
straph/paths/__init__.py
GiulioRossetti/Straph
edc021d25243bcca619c62dca1f28cf05b73a92c
[ "Apache-2.0" ]
3
2021-05-25T09:04:43.000Z
2021-11-02T16:27:23.000Z
from straph.paths.path_object import * from straph.paths.paths import *
24
38
0.805556
from straph.paths.path_object import * from straph.paths.paths import *
true
true
1c2eb7cfed9158485e706c5f38abfc820fbb10d4
3,169
py
Python
src/ef/field/__init__.py
fizmat/ef_python
1fccdc90b1dd628c9adb5f8713bee4e4df633daf
[ "MIT" ]
1
2018-12-13T08:32:46.000Z
2018-12-13T08:32:46.000Z
src/ef/field/__init__.py
dumbman/ef_python
d26e48d3afd81c3b24a5ec207fce674cdc9609d3
[ "MIT" ]
3
2018-05-21T11:26:57.000Z
2020-03-12T12:28:44.000Z
src/ef/field/__init__.py
dumbman/ef_python
d26e48d3afd81c3b24a5ec207fce674cdc9609d3
[ "MIT" ]
null
null
null
import inject import numpy as np from ef.util.serializable_h5 import SerializableH5 class Field(SerializableH5): def __init__(self, name, electric_or_magnetic): self.name = name self.electric_or_magnetic = electric_or_magnetic def __add__(self, b): return FieldSum.factory((self, b)) ...
38.180723
112
0.603976
import inject import numpy as np from ef.util.serializable_h5 import SerializableH5 class Field(SerializableH5): def __init__(self, name, electric_or_magnetic): self.name = name self.electric_or_magnetic = electric_or_magnetic def __add__(self, b): return FieldSum.factory((self, b)) ...
true
true
1c2eb7eb9834caf7eb2dfffa95fda486d9a9f4e3
35,676
py
Python
pyrex/generation.py
abigailbishop/pyrex
10ba2e9f4c8820f4fcf5f00bd866927dacb0b2b5
[ "MIT" ]
6
2018-06-19T16:01:35.000Z
2020-05-21T20:02:53.000Z
pyrex/generation.py
bhokansonfasig/pyrex
8b2abc954f2cf4945424042f33847b783c72dcfa
[ "MIT" ]
4
2018-01-19T14:52:33.000Z
2021-09-02T17:20:07.000Z
pyrex/generation.py
abigailbishop/pyrex
10ba2e9f4c8820f4fcf5f00bd866927dacb0b2b5
[ "MIT" ]
5
2018-01-19T14:49:16.000Z
2021-01-21T12:34:59.000Z
""" Module for particle (neutrino) generators. Generators are responsible for the input of events into the simulation. """ from collections.abc import Iterable from enum import Enum import logging import numpy as np from pyrex.internal_functions import get_from_enum from pyrex.earth_model import earth from pyrex.par...
35.927492
79
0.59746
from collections.abc import Iterable from enum import Enum import logging import numpy as np from pyrex.internal_functions import get_from_enum from pyrex.earth_model import earth from pyrex.particle import Event, Particle, NeutrinoInteraction from pyrex.io import File logger = logging.getLogger(__name__) class Gen...
true
true
1c2eb94162bd8c245bbcdc3f3cc42fa660d07460
6,069
py
Python
routes.py
kuldeep24680/RESTAPI-for-analyzing-data-to-excel-uploaded-file-and-downloading-resultant-csv-files-on-flask
5e3f35de2599f71078974c4e5a46bb94da426200
[ "MIT" ]
null
null
null
routes.py
kuldeep24680/RESTAPI-for-analyzing-data-to-excel-uploaded-file-and-downloading-resultant-csv-files-on-flask
5e3f35de2599f71078974c4e5a46bb94da426200
[ "MIT" ]
null
null
null
routes.py
kuldeep24680/RESTAPI-for-analyzing-data-to-excel-uploaded-file-and-downloading-resultant-csv-files-on-flask
5e3f35de2599f71078974c4e5a46bb94da426200
[ "MIT" ]
null
null
null
from app import app from flask import render_template, request,send_file import pandas as pd import csv import xlrd # to route the user the upload the .xlsx file @app.route('/') def upload_file(): return render_template('upload.html') # function that converts the .xlsx file into .csv file and saves ...
42.145833
215
0.672928
from app import app from flask import render_template, request,send_file import pandas as pd import csv import xlrd @app.route('/') def upload_file(): return render_template('upload.html') @app.route('/Fileupload', methods = ['POST']) def upload(): if request.method == 'POST': f = request...
true
true
1c2eb95134eb8fd3953659373a21b5dc998d5027
1,365
py
Python
run_results.py
phylatechnologies/ibd_classification_benchmark
667e0b42e70bd56c6675062b10dae38407e785b0
[ "MIT" ]
null
null
null
run_results.py
phylatechnologies/ibd_classification_benchmark
667e0b42e70bd56c6675062b10dae38407e785b0
[ "MIT" ]
null
null
null
run_results.py
phylatechnologies/ibd_classification_benchmark
667e0b42e70bd56c6675062b10dae38407e785b0
[ "MIT" ]
null
null
null
import os import pandas as pd import numpy as np from metadata.getters import get_pwd from analysis.evaluation_methods import get_performance import random np.random.seed(26) random.seed(26) def get_sample_info(dataset): ''' :param exp_name: experiment string :return: unpickled data set ''' data_fi...
26.25
68
0.589744
import os import pandas as pd import numpy as np from metadata.getters import get_pwd from analysis.evaluation_methods import get_performance import random np.random.seed(26) random.seed(26) def get_sample_info(dataset): data_file = '{}.pkl'.format(dataset) data_path = '{}/datasets/{}'.format(get_pwd(), data_f...
true
true
1c2eb97d2acd29ed9d533618df715e94812ce8e5
27,136
py
Python
macOS/Xcode/Maestral/Maestral/app_packages/survey/tools.py
productinfo/maestral-cocoa
d1626c68ace1939bd53cda53c53cbb43c9fb7a8e
[ "MIT" ]
8
2020-11-13T08:48:01.000Z
2021-12-16T06:30:27.000Z
macOS/Xcode/Maestral/Maestral/app_packages/survey/tools.py
productinfo/maestral-cocoa
d1626c68ace1939bd53cda53c53cbb43c9fb7a8e
[ "MIT" ]
4
2022-01-05T09:16:30.000Z
2022-03-29T09:32:44.000Z
macOS/Xcode/Maestral/Maestral/app_packages/survey/tools.py
productinfo/maestral-cocoa
d1626c68ace1939bd53cda53c53cbb43c9fb7a8e
[ "MIT" ]
1
2022-01-05T08:56:59.000Z
2022-01-05T08:56:59.000Z
import enum import types import wrapio import os import string import itertools from . import helpers __all__ = ('Source', 'Translator', 'LineEditor', 'MultiLineEditor', 'Select', 'MultiSelect') _blocks = string.whitespace + string.punctuation class Source(helpers.Handle): """ Turns stdin rea...
20.026568
79
0.532098
import enum import types import wrapio import os import string import itertools from . import helpers __all__ = ('Source', 'Translator', 'LineEditor', 'MultiLineEditor', 'Select', 'MultiSelect') _blocks = string.whitespace + string.punctuation class Source(helpers.Handle): Event = enum.Enum( ...
true
true
1c2eba00650c8b64ca478183c3d227a97692f36e
1,439
py
Python
nonebot/adapters/feishu/utils.py
nonebot/adapter-feishu
392d734bbf09b88c2e7557102f2562111b84fce8
[ "MIT" ]
2
2021-11-29T16:05:17.000Z
2022-03-21T07:45:50.000Z
nonebot/adapters/feishu/utils.py
nonebot/adapter-feishu
392d734bbf09b88c2e7557102f2562111b84fce8
[ "MIT" ]
1
2022-03-16T07:26:10.000Z
2022-03-16T07:26:10.000Z
nonebot/adapters/feishu/utils.py
nonebot/adapter-feishu
392d734bbf09b88c2e7557102f2562111b84fce8
[ "MIT" ]
null
null
null
import base64 import hashlib from typing import Any, Dict, Optional from cashews import cache from Crypto.Cipher import AES from nonebot.utils import logger_wrapper from .exception import ActionFailed log = logger_wrapper("FEISHU") cache.setup("mem://") def _handle_api_result(result: Optional[Dict[str, Any]]) -> ...
21.80303
71
0.607366
import base64 import hashlib from typing import Any, Dict, Optional from cashews import cache from Crypto.Cipher import AES from nonebot.utils import logger_wrapper from .exception import ActionFailed log = logger_wrapper("FEISHU") cache.setup("mem://") def _handle_api_result(result: Optional[Dict[str, Any]]) -> ...
true
true
1c2ebcb9f1c7e30c527922e1b531e8cc615065de
1,998
py
Python
src/oidcop/session/info.py
MdreW/oidc-op
684355981ea12516e1b5ef3ed72a4ecf572109bf
[ "Apache-2.0" ]
null
null
null
src/oidcop/session/info.py
MdreW/oidc-op
684355981ea12516e1b5ef3ed72a4ecf572109bf
[ "Apache-2.0" ]
null
null
null
src/oidcop/session/info.py
MdreW/oidc-op
684355981ea12516e1b5ef3ed72a4ecf572109bf
[ "Apache-2.0" ]
null
null
null
from typing import List from typing import Optional from oidcmsg.impexp import ImpExp class SessionInfo(ImpExp): parameter = {"subordinate": [], "revoked": bool, "type": "", "extra_args": {}} def __init__( self, subordinate: Optional[List[str]] = None, revoked: Optional[bool] = False...
28.140845
86
0.610611
from typing import List from typing import Optional from oidcmsg.impexp import ImpExp class SessionInfo(ImpExp): parameter = {"subordinate": [], "revoked": bool, "type": "", "extra_args": {}} def __init__( self, subordinate: Optional[List[str]] = None, revoked: Optional[bool] = False...
true
true
1c2ebce233d748bc3dbd55e3e7f871b51601686e
21,795
py
Python
ModernWarfare/modernwarfare.py
EthanC/Hyde
0325eb12c5849dbe4e4b317bd8d3f026c989e7f9
[ "MIT" ]
14
2020-05-01T13:54:48.000Z
2022-02-14T21:58:35.000Z
ModernWarfare/modernwarfare.py
EthanC/Hyde
0325eb12c5849dbe4e4b317bd8d3f026c989e7f9
[ "MIT" ]
3
2020-06-09T19:24:48.000Z
2021-03-06T11:34:04.000Z
ModernWarfare/modernwarfare.py
EthanC/Hyde
0325eb12c5849dbe4e4b317bd8d3f026c989e7f9
[ "MIT" ]
4
2020-05-24T19:15:08.000Z
2022-02-04T21:20:29.000Z
import logging from typing import Any, Dict, List, Optional, TypedDict from utility import Utility from .database import Database from .XAssets import ( Accessories, BattlePasses, BattlePassItems, Bundles, CallingCards, Camos, Charms, Consumables, Emblems, Equipment, Execut...
36.446488
86
0.590411
import logging from typing import Any, Dict, List, Optional, TypedDict from utility import Utility from .database import Database from .XAssets import ( Accessories, BattlePasses, BattlePassItems, Bundles, CallingCards, Camos, Charms, Consumables, Emblems, Equipment, Execut...
true
true
1c2ebfbba2889019f3daeaf8c2c41e1faae71ede
896
py
Python
examples/core/produce_c_file.py
fengjixuchui/src
0c5a6cd8057717f73b1373f8d85eb9b19e1934e1
[ "BSD-3-Clause" ]
1,160
2015-05-02T15:13:20.000Z
2022-03-31T20:04:28.000Z
examples/core/produce_c_file.py
fengjixuchui/src
0c5a6cd8057717f73b1373f8d85eb9b19e1934e1
[ "BSD-3-Clause" ]
19
2015-04-20T13:47:00.000Z
2021-07-07T13:00:42.000Z
examples/core/produce_c_file.py
fengjixuchui/src
0c5a6cd8057717f73b1373f8d85eb9b19e1934e1
[ "BSD-3-Clause" ]
257
2015-04-01T21:42:33.000Z
2022-03-10T11:57:51.000Z
""" summary: decompile entire file description: automate IDA to perform auto-analysis on a file and, once that is done, produce a .c file containing the decompilation of all the functions in that file. Run like so: ida -A "-S...path/to/produce_c_file.py" <binary-file> where: * -A instructs ID...
23.578947
72
0.722098
import ida_pro import ida_auto import ida_loader import ida_hexrays idb_path = ida_loader.get_path(ida_loader.PATH_TYPE_IDB) c_path = "%s.c" % idb_path ida_auto.auto_wait() ida_hexrays.decompile_many( c_path, None, ida_hexrays.VDRUN_NEWFILE |ida_hexrays.VDRUN_SILENT |ida_hexrays.VDRUN_MAYSTOP) ida...
true
true
1c2ebfd75fe3944d8065afbbfce8e4cb94d66e50
13,075
py
Python
src/saml2/httpbase.py
skanct/pysaml2
0c1e26a6dd8759962857a30ebd67f63fe9e881ee
[ "Apache-2.0" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
desktop/core/ext-py/pysaml2-4.4.0/src/saml2/httpbase.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
desktop/core/ext-py/pysaml2-4.4.0/src/saml2/httpbase.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
import calendar import six from six.moves import http_cookiejar import copy import re from six.moves.urllib.parse import urlparse from six.moves.urllib.parse import urlencode import requests import time from six.moves.http_cookies import SimpleCookie from saml2.time_util import utc_now from saml2 import class_name, SAM...
31.735437
95
0.524512
import calendar import six from six.moves import http_cookiejar import copy import re from six.moves.urllib.parse import urlparse from six.moves.urllib.parse import urlencode import requests import time from six.moves.http_cookies import SimpleCookie from saml2.time_util import utc_now from saml2 import class_name, SAM...
true
true
1c2ec000659f19143f2f3a883502db0eb1d71d33
6,398
py
Python
Chapter_Clustering_GMM/ProcessMonitoring_GMM.py
ML-PSE/Machine_Learning_for_PSE
b53578d7cc0e0eca4907527b188a60de06d6710e
[ "Apache-2.0" ]
2
2022-02-20T18:57:46.000Z
2022-03-03T07:07:12.000Z
Chapter_Clustering_GMM/ProcessMonitoring_GMM.py
ML-PSE/Machine_Learning_for_PSE
b53578d7cc0e0eca4907527b188a60de06d6710e
[ "Apache-2.0" ]
null
null
null
Chapter_Clustering_GMM/ProcessMonitoring_GMM.py
ML-PSE/Machine_Learning_for_PSE
b53578d7cc0e0eca4907527b188a60de06d6710e
[ "Apache-2.0" ]
null
null
null
##%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ## Process Monitoring of Etch data ## %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #%% import required packages import numpy as np import matplotlib.pyplot as plt from sklearn...
36.770115
165
0.595186
import numpy as np import matplotlib.pyplot as plt from sklearn.mixture import GaussianMixture import scipy.io matlab_data = scipy.io.loadmat('MACHINE_Data.mat', struct_as_record = False) Etch_data = matlab_data['LAMDATA'] calibration_dataAll = Etch_data[0,0].calibration variable_names = Etch_data[0,0].va...
true
true
1c2ec0204f13deadf34e31a40a561e0198ba50a8
665
py
Python
src/genie/libs/parser/bigip/get_net_sfcchain.py
nujo/genieparser
083b01efc46afc32abe1a1858729578beab50cd3
[ "Apache-2.0" ]
204
2018-06-27T00:55:27.000Z
2022-03-06T21:12:18.000Z
src/genie/libs/parser/bigip/get_net_sfcchain.py
nujo/genieparser
083b01efc46afc32abe1a1858729578beab50cd3
[ "Apache-2.0" ]
468
2018-06-19T00:33:18.000Z
2022-03-31T23:23:35.000Z
src/genie/libs/parser/bigip/get_net_sfcchain.py
nujo/genieparser
083b01efc46afc32abe1a1858729578beab50cd3
[ "Apache-2.0" ]
309
2019-01-16T20:21:07.000Z
2022-03-30T12:56:41.000Z
# Global Imports import json from collections import defaultdict # Metaparser from genie.metaparser import MetaParser # ============================================= # Collection for '/mgmt/tm/net/sfc/chain' resources # ============================================= class NetSfcChainSchema(MetaParser): schema =...
19.558824
52
0.578947
import json from collections import defaultdict from genie.metaparser import MetaParser class NetSfcChainSchema(MetaParser): schema = {} class NetSfcChain(NetSfcChainSchema): cli_command = "/mgmt/tm/net/sfc/chain" def rest(self): response = self.device.get(self.cli_command) respon...
true
true
1c2ec05a5b77d971e797ce93d09ecd74e83f2274
585
py
Python
tests/common/server_sent_events/sse4python/test_web_request_factory.py
yellowdog/yellowdog-sdk-python-public
da69a7d6e45c92933e34fefcaef8b5d98dcd6036
[ "Apache-2.0" ]
null
null
null
tests/common/server_sent_events/sse4python/test_web_request_factory.py
yellowdog/yellowdog-sdk-python-public
da69a7d6e45c92933e34fefcaef8b5d98dcd6036
[ "Apache-2.0" ]
null
null
null
tests/common/server_sent_events/sse4python/test_web_request_factory.py
yellowdog/yellowdog-sdk-python-public
da69a7d6e45c92933e34fefcaef8b5d98dcd6036
[ "Apache-2.0" ]
null
null
null
from yellowdog_client.common.server_sent_events.sse4python import WebRequestFactory class TestCreate(object): def test__expect_requester_returned_with_headers_passed(self, mocker): mock_requester = mocker.patch( "yellowdog_client.common.server_sent_events.sse4python.web_request_factory.WebRequ...
34.411765
100
0.752137
from yellowdog_client.common.server_sent_events.sse4python import WebRequestFactory class TestCreate(object): def test__expect_requester_returned_with_headers_passed(self, mocker): mock_requester = mocker.patch( "yellowdog_client.common.server_sent_events.sse4python.web_request_factory.WebRequ...
true
true