hexsha
stringlengths
40
40
size
int64
3
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
972
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
78
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
3
972
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
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
3
972
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
78
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
3
1.03M
avg_line_length
float64
1.13
941k
max_line_length
int64
2
941k
alphanum_fraction
float64
0
1
560a53521a65db670d446907607307ef54bc6b4c
2,428
py
Python
secrets_loader/secrets_loader.py
georgmzimmer/secrets_loader
9e3e945a9223bca4d0bf568f903dffb238bf84e6
[ "MIT" ]
null
null
null
secrets_loader/secrets_loader.py
georgmzimmer/secrets_loader
9e3e945a9223bca4d0bf568f903dffb238bf84e6
[ "MIT" ]
null
null
null
secrets_loader/secrets_loader.py
georgmzimmer/secrets_loader
9e3e945a9223bca4d0bf568f903dffb238bf84e6
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ This populates environment variables from amazon secrets store and chain loads another program. """ import os import sys import json from .utils.aws import get_aws_account, get_aws_vars, get_missing_vars, get_session from .utils.secrets import get_secret, mask_secret def main(): if len...
32.810811
95
0.613674
1e308a7ca71ff58a5dc0472bbd6ce933b99a451f
714
py
Python
repos/system_upgrade/el8toel9/actors/scancryptopolicies/libraries/scancryptopolicies.py
tmds/leapp-repository
7c9ea115a68530eb25f5c23d3fcadd60c501bf78
[ "Apache-2.0" ]
null
null
null
repos/system_upgrade/el8toel9/actors/scancryptopolicies/libraries/scancryptopolicies.py
tmds/leapp-repository
7c9ea115a68530eb25f5c23d3fcadd60c501bf78
[ "Apache-2.0" ]
null
null
null
repos/system_upgrade/el8toel9/actors/scancryptopolicies/libraries/scancryptopolicies.py
tmds/leapp-repository
7c9ea115a68530eb25f5c23d3fcadd60c501bf78
[ "Apache-2.0" ]
null
null
null
import os from leapp.exceptions import StopActorExecutionError from leapp.libraries.stdlib import api from leapp.models import CryptoPolicyInfo CRYPTO_CURRENT_STATE_FILE = '/etc/crypto-policies/state/current' def process(): if not os.path.exists(CRYPTO_CURRENT_STATE_FILE): # NOTE(pstodulk) just seatbelt...
35.7
85
0.715686
7dd4210f89ef053f4bb624975362b2770d59cf78
22,264
py
Python
pygerduty/__init__.py
lyft/pygerduty
d4e70e7ddb6d460c1d3b3dd02d9187da95df339b
[ "MIT" ]
2
2015-11-07T19:36:44.000Z
2015-11-12T15:50:21.000Z
pygerduty/__init__.py
lyft/pygerduty
d4e70e7ddb6d460c1d3b3dd02d9187da95df339b
[ "MIT" ]
2
2015-10-28T20:06:31.000Z
2019-10-10T17:21:28.000Z
pygerduty/__init__.py
lyft/pygerduty
d4e70e7ddb6d460c1d3b3dd02d9187da95df339b
[ "MIT" ]
1
2019-10-17T02:08:18.000Z
2019-10-17T02:08:18.000Z
import base64 import copy import json import time from six.moves import urllib __author__ = "Gary M. Josack <gary@dropbox.com>" from .version import __version__, version_info # noqa # TODO: # Support for Log Entries # Support for Reports class Error(Exception): pass class IntegrationAPIError(Error): d...
31.490806
99
0.596479
73f3de286d00a8b6d4ddd35f1f5a5ecd7e7922f4
17,652
py
Python
cmdb/views.py
uevol/devops
515573d9e73fa7f0800a89ae982642e0fe4176d9
[ "MIT" ]
2
2018-01-15T05:41:02.000Z
2021-07-27T12:09:25.000Z
cmdb/views.py
uevol/devops
515573d9e73fa7f0800a89ae982642e0fe4176d9
[ "MIT" ]
3
2020-06-05T17:15:52.000Z
2022-03-08T21:09:04.000Z
cmdb/views.py
uevol/devops
515573d9e73fa7f0800a89ae982642e0fe4176d9
[ "MIT" ]
1
2018-01-15T05:42:03.000Z
2018-01-15T05:42:03.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals import sys reload(sys) sys.setdefaultencoding('utf8') from django.shortcuts import render, get_object_or_404, HttpResponse from django.views.decorators.csrf import csrf_exempt from .models import CiCategory, CiProperty import json from devops.pagi...
37.637527
142
0.58373
9dd978cd060dd5b87e8fb6b0f8d679448f3f7a59
413
py
Python
AKDSFramework/error/error.py
DeepNet-Research/AKDSFramework
a0b9fc2466b228ea6053b9f03e1d497462567a96
[ "MIT" ]
13
2020-11-03T00:07:43.000Z
2021-12-31T04:18:03.000Z
AKDSFramework/error/error.py
DeepNet-Research/AKDSFramework
a0b9fc2466b228ea6053b9f03e1d497462567a96
[ "MIT" ]
2
2021-03-06T12:20:33.000Z
2021-03-07T04:26:29.000Z
AKDSFramework/error/error.py
DeepNet-Research/AKDSFramework
a0b9fc2466b228ea6053b9f03e1d497462567a96
[ "MIT" ]
2
2020-11-03T23:13:53.000Z
2021-02-24T13:16:02.000Z
from AKDSFramework.utils import notify class InvalidOperationError(Exception): pass class NotFoundError(Exception): pass class HeapNotBuildError(Exception): pass class EmptyStackError(Exception): pass class BadVertexTypeError(Exception): pass class NegativeEdgeCycleWarning(UserWarning): pass ...
15.884615
44
0.782082
2f54408f295d7a8f99a51d50f688bf18b05016ff
10,284
py
Python
mbin/baxh5_read.py
NeolithEra/mbin
27e9aea4ed67a48cc2d993a0fbd142a651e9ee7b
[ "BSD-3-Clause" ]
27
2017-12-11T17:57:44.000Z
2021-04-13T16:42:48.000Z
mbin/baxh5_read.py
NeolithEra/mbin
27e9aea4ed67a48cc2d993a0fbd142a651e9ee7b
[ "BSD-3-Clause" ]
17
2017-10-31T17:16:55.000Z
2022-02-09T17:32:22.000Z
mbin/baxh5_read.py
NeolithEra/mbin
27e9aea4ed67a48cc2d993a0fbd142a651e9ee7b
[ "BSD-3-Clause" ]
4
2017-12-18T12:54:18.000Z
2021-04-13T16:42:59.000Z
import os,sys,glob import re import math import multiprocessing from pbcore.io.BasH5IO import BasH5Reader import subprocess import numpy as np from collections import OrderedDict,Counter,defaultdict import logging import read_scanner from operator import itemgetter import pickle import warnings warnings.simplefilter("...
35.584775
173
0.631758
eee139d26d365aede9b75e57da4e13367b20773b
1,317
py
Python
ModelBlueprint.py
bornabesic/cnn-sentence-classification
ae0a131e5e2f888ed0f76897f141649ee6f831c6
[ "MIT" ]
null
null
null
ModelBlueprint.py
bornabesic/cnn-sentence-classification
ae0a131e5e2f888ed0f76897f141649ee6f831c6
[ "MIT" ]
null
null
null
ModelBlueprint.py
bornabesic/cnn-sentence-classification
ae0a131e5e2f888ed0f76897f141649ee6f831c6
[ "MIT" ]
null
null
null
import tensorflow as tf class ModelBlueprint: def __init__(self, model_name=None, session=None, learning_rate=None, optimizer=None, ): if model_name==None: return self.model_name=model_name self.session=session self.learning_rate=learning_rate self.optimizer=optimizer ############### # # T...
25.326923
143
0.71754
7897ddfe09517556fd9b5bc2de6c3572272238f4
283
py
Python
plugins/tools/visualInterpreter/examples/robotsCodeGeneration/reactionsStorage/NullificationEncoderGenerator.py
anastasia143/qreal
9bd224b41e569c9c50ab88848a5746a010c65ad7
[ "Apache-2.0" ]
39
2015-01-26T16:18:43.000Z
2021-12-20T23:36:41.000Z
plugins/tools/visualInterpreter/examples/robotsCodeGeneration/reactionsStorage/NullificationEncoderGenerator.py
anastasia143/qreal
9bd224b41e569c9c50ab88848a5746a010c65ad7
[ "Apache-2.0" ]
1,248
2019-02-21T19:32:09.000Z
2022-03-29T16:50:04.000Z
plugins/tools/visualInterpreter/examples/robotsCodeGeneration/reactionsStorage/NullificationEncoderGenerator.py
anastasia143/qreal
9bd224b41e569c9c50ab88848a5746a010c65ad7
[ "Apache-2.0" ]
58
2015-03-03T12:57:28.000Z
2020-05-09T15:54:42.000Z
# Application condition encoder.id == max_used_id and not cur_node_is_processed # Reaction nullification_code = "nxt_motor_set_count(NXT_PORT_" + encoder.Port + ", 0);\n" code.append([nullification_code]) id_to_pos_in_code[encoder.id] = len(code) - 1 cur_node_is_processed = True
25.727273
79
0.780919
3de9748c6f53f7fff31ed7abd37b48a3bfcb6a27
17,134
py
Python
data_augmentation.py
ZehaoXU/yolov3-for-medical-images
fa97484349d3f82617050310ed8825c380011288
[ "MIT" ]
null
null
null
data_augmentation.py
ZehaoXU/yolov3-for-medical-images
fa97484349d3f82617050310ed8825c380011288
[ "MIT" ]
null
null
null
data_augmentation.py
ZehaoXU/yolov3-for-medical-images
fa97484349d3f82617050310ed8825c380011288
[ "MIT" ]
null
null
null
# -*- coding=utf-8 -*- # 1. 裁剪(需改变bbox) # 2. 平移(需改变bbox) # 3. 改变亮度 # 4. 加噪声 # 5. 旋转角度(需要改变bbox) # 6. 镜像(需要改变bbox) # 7. cutout import time import random import cv2 import os import math import numpy as np from skimage.util import random_noise from skimage import exposure d...
35.770355
171
0.51214
cefad0686d153fcc6790e2000e12ecb1ff69000d
2,989
py
Python
ivy/functional/backends/jax/device.py
chie2727/ivy
338d75402f7025b22310c2abc23408b1ff376652
[ "Apache-2.0" ]
681
2022-01-18T19:08:56.000Z
2022-03-31T22:48:37.000Z
ivy/functional/backends/jax/device.py
chie2727/ivy
338d75402f7025b22310c2abc23408b1ff376652
[ "Apache-2.0" ]
637
2022-01-19T07:40:28.000Z
2022-03-31T19:06:47.000Z
ivy/functional/backends/jax/device.py
chie2727/ivy
338d75402f7025b22310c2abc23408b1ff376652
[ "Apache-2.0" ]
501
2022-01-23T14:48:35.000Z
2022-03-31T04:09:38.000Z
"""Collection of Jax device functions, wrapped to fit Ivy syntax and signature.""" # global import os import jax from typing import Union import jaxlib.xla_extension # local import ivy from ivy.functional.backends.jax import JaxArray from ivy.functional.ivy.device import Profiler as BaseProfiler # Helpers # # -----...
22.473684
82
0.652727
9213c481770dbf1332cb94b44cd6226820ecb24a
7,777
py
Python
docs/conf.py
robindoering86/capstone_nf
fcb561eff35a0c57020868549181b2ac8a5e789b
[ "MIT" ]
3
2020-11-17T18:21:48.000Z
2021-05-30T04:03:51.000Z
docs/conf.py
robindoering86/capstone_nf
fcb561eff35a0c57020868549181b2ac8a5e789b
[ "MIT" ]
2
2021-04-30T21:04:04.000Z
2021-12-13T20:28:58.000Z
docs/conf.py
robindoering86/capstone_nf
fcb561eff35a0c57020868549181b2ac8a5e789b
[ "MIT" ]
3
2020-11-17T18:21:50.000Z
2021-09-06T02:32:51.000Z
# -*- coding: utf-8 -*- # # capstone documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have ...
31.742857
80
0.706056
51aa50ed93bfb904dced5126e2acf091216634af
32,819
py
Python
megatron/text_generation_utils.py
rajarshighoshal/gpt-neox
bf9a2921f73f015a11988e3ef7c0d4ed10cb9708
[ "Apache-2.0" ]
null
null
null
megatron/text_generation_utils.py
rajarshighoshal/gpt-neox
bf9a2921f73f015a11988e3ef7c0d4ed10cb9708
[ "Apache-2.0" ]
null
null
null
megatron/text_generation_utils.py
rajarshighoshal/gpt-neox
bf9a2921f73f015a11988e3ef7c0d4ed10cb9708
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright (c) 2021 Josh Levy-Kramer <josh@levykramer.co.uk>. All rights reserved. # This file is based on code by the authors denoted below and has been modified from its original version. # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2....
41.543038
168
0.651513
ebc01c6ace3b0033f2e17fcb25731372ea3a71ac
657
py
Python
results/dynamic_sparse/calc_confidence_intervals.py
ranattias/sparse
a1fbdee8ae9c530c09327b5ae29042f872a7c0a6
[ "MIT" ]
365
2019-07-11T13:08:58.000Z
2022-03-19T01:20:36.000Z
results/dynamic_sparse/calc_confidence_intervals.py
ranattias/sparse
a1fbdee8ae9c530c09327b5ae29042f872a7c0a6
[ "MIT" ]
24
2019-07-11T23:18:34.000Z
2022-02-26T17:49:28.000Z
results/dynamic_sparse/calc_confidence_intervals.py
ranattias/sparse
a1fbdee8ae9c530c09327b5ae29042f872a7c0a6
[ "MIT" ]
41
2019-07-11T13:34:30.000Z
2022-02-13T20:13:11.000Z
import numpy as np import glob for path in glob.glob("./results/*.txt"): print(path) data = [] with open(path) as f: for i, line in enumerate(f): if i == 0: sparsity = line.split(',') sparsity[0] = sparsity[0][sparsity[0].index('[')+1:] sp...
29.863636
68
0.456621
6f1facd9bb516c3ebce9540d05827bbefb9d68ce
3,298
py
Python
src/yaniro.py
Yaniro/yaniropy
569502756e1a089a16e386d7366c8a4e15140169
[ "Apache-2.0" ]
null
null
null
src/yaniro.py
Yaniro/yaniropy
569502756e1a089a16e386d7366c8a4e15140169
[ "Apache-2.0" ]
null
null
null
src/yaniro.py
Yaniro/yaniropy
569502756e1a089a16e386d7366c8a4e15140169
[ "Apache-2.0" ]
null
null
null
import uuid from collections import namedtuple from . import constants from .transforms import Transform Link = namedtuple("Link", "name joints mass center_mass inertia") class Joint(object): ''' ''' def __init__(self, name, joint_type, min_value, max_value, transform=None, actuator...
24.42963
79
0.58399
40ca1c2e0403c80a8649f005228ed65156f65ff8
755
py
Python
tests/test_sns/test_server.py
gtourkas/moto
307104417b579d23d02f670ff55217a2d4a16bee
[ "Apache-2.0" ]
5,460
2015-01-01T01:11:17.000Z
2022-03-31T23:45:38.000Z
tests/test_sns/test_server.py
gtourkas/moto
307104417b579d23d02f670ff55217a2d4a16bee
[ "Apache-2.0" ]
4,475
2015-01-05T19:37:30.000Z
2022-03-31T13:55:12.000Z
tests/test_sns/test_server.py
gtourkas/moto
307104417b579d23d02f670ff55217a2d4a16bee
[ "Apache-2.0" ]
1,831
2015-01-14T00:00:44.000Z
2022-03-31T20:30:04.000Z
from moto.core import ACCOUNT_ID import sure # noqa # pylint: disable=unused-import import moto.server as server """ Test the different server responses """ def test_sns_server_get(): backend = server.create_backend_app("sns") test_client = backend.test_client() topic_data = test_client.action_data("...
27.962963
84
0.723179
12dab037b0617823398ccc8ccbb61dc145c77841
2,479
py
Python
ML-Course-NTU-Lee/hw2/hw2.py
kaka-lin/ML-Courses
d7111fe64db3efae9acafa4532824c9554dbcaf1
[ "MIT" ]
null
null
null
ML-Course-NTU-Lee/hw2/hw2.py
kaka-lin/ML-Courses
d7111fe64db3efae9acafa4532824c9554dbcaf1
[ "MIT" ]
null
null
null
ML-Course-NTU-Lee/hw2/hw2.py
kaka-lin/ML-Courses
d7111fe64db3efae9acafa4532824c9554dbcaf1
[ "MIT" ]
null
null
null
import time import csv import numpy as np def file_processing(file_path, encode): data = [] with open(file_path, encoding=encode) as file: rows = csv.reader(file , delimiter=",") n_row = 0 for row in rows: if n_row != 0: for i in range(len(row)): ...
26.945652
95
0.553449
8e63af954647be68d33d2f0567d2464e6e9bb00e
9,075
py
Python
Command_line/Spectrum.py
Lennard94/IRSA
67dc6162f993de99289606740ed6b5d7402df0c2
[ "MIT" ]
null
null
null
Command_line/Spectrum.py
Lennard94/IRSA
67dc6162f993de99289606740ed6b5d7402df0c2
[ "MIT" ]
null
null
null
Command_line/Spectrum.py
Lennard94/IRSA
67dc6162f993de99289606740ed6b5d7402df0c2
[ "MIT" ]
null
null
null
import numpy as np import sys import os import matplotlib.pyplot as py from scipy.stats import pearsonr """ This file implements the class Spectrum: class Spectrum contains all information about the unshifted, boltzmann weighted and normalized (at T=300 K) theoretical spectrum and experimental spectrum, and ...
50.983146
123
0.615317
dd4e46264f4f952654795a8171c741efe50168cb
7,940
py
Python
tests/test_cache.py
mehdy/django-environ
d482353a932bae0f74c6fc87372a78c604ad6326
[ "MIT" ]
null
null
null
tests/test_cache.py
mehdy/django-environ
d482353a932bae0f74c6fc87372a78c604ad6326
[ "MIT" ]
null
null
null
tests/test_cache.py
mehdy/django-environ
d482353a932bae0f74c6fc87372a78c604ad6326
[ "MIT" ]
null
null
null
# This file is part of the django-environ. # # Copyright (c) 2021, Serghei Iakovlev <egrep@protonmail.ch> # Copyright (c) 2013-2021, Daniele Faraglia <daniele.faraglia@gmail.com> # # For the full copyright and license information, please view # the LICENSE.txt file that was distributed with this source code. import py...
33.50211
90
0.638917
bd1c243bf942c3b6cb9dfb1637249d2d90c61450
13,696
py
Python
compiler/modules/global_bitcell_array.py
im-world/OpenRAM
f66aac3264598eeae31225c62b6a4af52412d407
[ "BSD-3-Clause" ]
335
2018-03-13T21:05:22.000Z
2022-03-30T07:53:25.000Z
compiler/modules/global_bitcell_array.py
im-world/OpenRAM
f66aac3264598eeae31225c62b6a4af52412d407
[ "BSD-3-Clause" ]
87
2018-03-06T00:55:51.000Z
2022-03-30T19:38:29.000Z
compiler/modules/global_bitcell_array.py
im-world/OpenRAM
f66aac3264598eeae31225c62b6a4af52412d407
[ "BSD-3-Clause" ]
95
2018-03-14T16:22:55.000Z
2022-03-24T00:34:37.000Z
# See LICENSE for licensing information. # # Copyright (c) 2016-2021 Regents of the University of California and The Board # of Regents for the Oklahoma Agricultural and Mechanical College # (acting for and on behalf of Oklahoma State University) # All rights reserved. # import bitcell_base_array from globals import OP...
39.356322
140
0.579658
de87e24d77649b025d0c3afe0880388767443683
4,454
py
Python
trumper3.5.py
hampstero/Trumper
fa6c7ba9b62eff7b80cc35e9b4cdd98418cede7e
[ "MIT" ]
null
null
null
trumper3.5.py
hampstero/Trumper
fa6c7ba9b62eff7b80cc35e9b4cdd98418cede7e
[ "MIT" ]
null
null
null
trumper3.5.py
hampstero/Trumper
fa6c7ba9b62eff7b80cc35e9b4cdd98418cede7e
[ "MIT" ]
null
null
null
import sys from string import punctuation import random from collections import defaultdict def trumpify(file): trump_list = list() with open(file) as file_name: file_list = list(file_name.read().split()) for word in file_list: trump_list.append(word.lower().strip(punctuation)) return trump_list ...
29.302632
98
0.67894
706d3c5975f799378dd6fb370cbab9c5db22568d
2,637
py
Python
setup.py
Astech34/pymms
165925d3641090c7a8487ec63ef9fc70d47cb6e9
[ "MIT" ]
1
2020-09-22T00:57:58.000Z
2020-09-22T00:57:58.000Z
setup.py
Astech34/pymms
165925d3641090c7a8487ec63ef9fc70d47cb6e9
[ "MIT" ]
5
2019-09-17T05:02:41.000Z
2021-06-12T10:39:50.000Z
setup.py
Astech34/pymms
165925d3641090c7a8487ec63ef9fc70d47cb6e9
[ "MIT" ]
17
2018-04-19T20:27:34.000Z
2021-04-05T18:37:31.000Z
from setuptools import setup import os import sys with open("README.md", "r") as fh: long_description = fh.read() # Read the version file # https://martin-thoma.com/python-package-versions/ # https://stackoverflow.com/questions/436198/what-is-an-alternative-to-execfile-in-python-3/437857#437857 def execfile(filen...
38.217391
105
0.510429
530893a6c0e6c1481d78efba553821badd35ed59
9,223
py
Python
kaminario_flocker_driver/utils/iscsi_utils.py
silk-us/flocker-driver
9519063fe15a6b41543693087ef0486c67f612a8
[ "Apache-2.0" ]
null
null
null
kaminario_flocker_driver/utils/iscsi_utils.py
silk-us/flocker-driver
9519063fe15a6b41543693087ef0486c67f612a8
[ "Apache-2.0" ]
null
null
null
kaminario_flocker_driver/utils/iscsi_utils.py
silk-us/flocker-driver
9519063fe15a6b41543693087ef0486c67f612a8
[ "Apache-2.0" ]
null
null
null
""" This is iscsi_utils docstring """ from datetime import datetime import logging import os import re import shlex import time from subprocess import CalledProcessError, check_output from kaminario_flocker_driver.constants import DELAY, ITERATION_LIMIT, \ RESCAN_DELAY LOG = logging.getLogger(__name__...
36.74502
80
0.547327
134bf9e6cfd0d444e4a05f8e1303aa1732b76c9a
5,340
py
Python
src/ui.py
stevemart/NetDash
8f37d3b0468a758c6f43fccec2b7012cc4685fb7
[ "Apache-2.0" ]
1
2018-07-29T02:02:02.000Z
2018-07-29T02:02:02.000Z
src/ui.py
abrezovsky/NetDash
8f37d3b0468a758c6f43fccec2b7012cc4685fb7
[ "Apache-2.0" ]
null
null
null
src/ui.py
abrezovsky/NetDash
8f37d3b0468a758c6f43fccec2b7012cc4685fb7
[ "Apache-2.0" ]
1
2020-07-30T09:39:30.000Z
2020-07-30T09:39:30.000Z
"""UI Handling""" import logging import sys try: import tkinter as tk from tkinter import messagebox except ImportError: logging.critical("Can not import tkinter, may not be installed.") sys.exit(3) import src.config as config from src.host import hosts from src.pinger import ping_all_event class A...
34.451613
107
0.635019
7cbb3c60218d6a3a088ed4d7a1ee3064ea2a9b08
291
py
Python
tools/sandbox/wsgi.py
ekmixon/pyre-check
bd2475cc0cf4bef941f0aea6df10d674e6c907ab
[ "MIT" ]
5,975
2018-05-11T15:54:32.000Z
2022-03-31T14:38:00.000Z
tools/sandbox/wsgi.py
ekmixon/pyre-check
bd2475cc0cf4bef941f0aea6df10d674e6c907ab
[ "MIT" ]
524
2018-05-11T16:47:20.000Z
2022-03-22T17:43:06.000Z
tools/sandbox/wsgi.py
ekmixon/pyre-check
bd2475cc0cf4bef941f0aea6df10d674e6c907ab
[ "MIT" ]
501
2018-05-11T16:46:29.000Z
2022-03-19T04:41:57.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-ignore-all-errors from application import application if __name__ == "__main__": application.run()
22.384615
65
0.745704
da897e7281f192b35128b3ccf7871613769d6032
919
py
Python
setup.py
the-bootcamp-project/Python-Package-Boilerplate
ad8bb0f3b6428b75c6cf23520807915e14c2f840
[ "MIT" ]
null
null
null
setup.py
the-bootcamp-project/Python-Package-Boilerplate
ad8bb0f3b6428b75c6cf23520807915e14c2f840
[ "MIT" ]
null
null
null
setup.py
the-bootcamp-project/Python-Package-Boilerplate
ad8bb0f3b6428b75c6cf23520807915e14c2f840
[ "MIT" ]
null
null
null
import pathlib import json import setuptools README = (pathlib.Path(__file__).parent / "README.md").read_text() VERSION = (pathlib.Path(__file__).parent / "VERSION").read_text().rstrip("\n") tbcp = {} with open('./.tbcp.json', "r") as tbcp_json: tbcp = json.load(tbcp_json) setuptools.setup( name=tbcp["PACKAG...
30.633333
94
0.700762
879d6b0f4a45e1b25e76f218dfd9359ad8bda1f6
448
py
Python
frameworks/Python/web2py/gunicorn_conf.py
xsoheilalizadeh/FrameworkBenchmarks
855527008f7488e4fd508d1e72dfa9953874a2c6
[ "BSD-3-Clause" ]
5,300
2015-01-02T08:04:20.000Z
2022-03-31T10:08:33.000Z
frameworks/Python/web2py/gunicorn_conf.py
xsoheilalizadeh/FrameworkBenchmarks
855527008f7488e4fd508d1e72dfa9953874a2c6
[ "BSD-3-Clause" ]
3,075
2015-01-01T05:11:45.000Z
2022-03-31T23:56:33.000Z
frameworks/Python/web2py/gunicorn_conf.py
xsoheilalizadeh/FrameworkBenchmarks
855527008f7488e4fd508d1e72dfa9953874a2c6
[ "BSD-3-Clause" ]
2,151
2015-01-02T14:16:09.000Z
2022-03-30T00:15:26.000Z
import multiprocessing import os import sys _is_travis = os.environ.get('TRAVIS') == 'true' workers = multiprocessing.cpu_count() * 3 if _is_travis: workers = 2 bind = "0.0.0.0:8080" keepalive = 120 errorlog = '-' pidfile = 'gunicorn.pid' pythonpath = 'web2py' worker_class = "meinheld.gmeinheld.MeinheldWorker" ...
19.478261
50
0.727679
99c4406e91f3614369388387ecc95458a5bd99ec
750
py
Python
ex070a.py
emerfelippini/Curso_em_video-Aulas_Python
5b1d78b259732bb9bbad27cd30ce91bba77c5ef0
[ "MIT" ]
null
null
null
ex070a.py
emerfelippini/Curso_em_video-Aulas_Python
5b1d78b259732bb9bbad27cd30ce91bba77c5ef0
[ "MIT" ]
null
null
null
ex070a.py
emerfelippini/Curso_em_video-Aulas_Python
5b1d78b259732bb9bbad27cd30ce91bba77c5ef0
[ "MIT" ]
null
null
null
print('CADASTRO DE PRODUTOS') print('-=' * 20) soma = preço_maior = menor_preço = contagem = 0 menor_nome = '' while True: nome = str(input('Nome do produto: ')) preço = float(input('Preço: R$ ')) soma += preço if preço >= 1000: preço_maior += 1 contagem += 1 if contagem == 1 or menor_pr...
32.608696
68
0.597333
ce109b92a9547fb90f4f5e05f1033c05d5a139ea
9,274
py
Python
run_dipy_gpu.py
guaje/GPUStreamlines
b794717791ce724eb99a1219a9fd8de7afdb0229
[ "BSD-3-Clause" ]
5
2020-12-18T14:52:19.000Z
2022-03-23T14:54:43.000Z
run_dipy_gpu.py
guaje/GPUStreamlines
b794717791ce724eb99a1219a9fd8de7afdb0229
[ "BSD-3-Clause" ]
7
2021-01-15T11:26:29.000Z
2021-07-29T18:40:44.000Z
run_dipy_gpu.py
guaje/GPUStreamlines
b794717791ce724eb99a1219a9fd8de7afdb0229
[ "BSD-3-Clause" ]
3
2021-01-15T11:35:09.000Z
2021-04-13T22:46:13.000Z
#!/usr/bin/env python # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # ...
40.497817
143
0.69366
9dd63a6f5690fd999e4fea835b4e984e1153f4d3
654
py
Python
manager.py
zheng-zy/blog
e6f9ae4a4770ea99d48e15140e2eacaa9678b75e
[ "Apache-2.0" ]
null
null
null
manager.py
zheng-zy/blog
e6f9ae4a4770ea99d48e15140e2eacaa9678b75e
[ "Apache-2.0" ]
null
null
null
manager.py
zheng-zy/blog
e6f9ae4a4770ea99d48e15140e2eacaa9678b75e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # coding=utf-8 # Created by zhezhiyong@163.com on 2016/11/29. import os from flask_script import Manager, Server from app import create_app from app.models import Post app = create_app(os.getenv('FLASK_CONFIG') or 'default') @app.context_processor def inject_nav(): posts = Post.objects(n...
22.551724
107
0.704893
3d73bb89f64336375478eb637db8a9f56766c0a2
969
py
Python
Sort_Merge.py
HKhademian/QuickDS
151c1aabf648f8d356eeb858fad40ec24acfad50
[ "Unlicense" ]
null
null
null
Sort_Merge.py
HKhademian/QuickDS
151c1aabf648f8d356eeb858fad40ec24acfad50
[ "Unlicense" ]
null
null
null
Sort_Merge.py
HKhademian/QuickDS
151c1aabf648f8d356eeb858fad40ec24acfad50
[ "Unlicense" ]
null
null
null
def _merge(left, right, cmp): res = [] leftI , rightI = 0, 0 while leftI<len(left) and rightI<len(right): if cmp(left[leftI], right[rightI])<=0: res.append(left[leftI]) leftI += 1 else: res.append(right[rightI]) rightI += 1 while leftI<len(left): res.append(left[leftI]) leftI += 1 while righ...
20.1875
48
0.643963
9d405669bf24a56d296e8a4d6bb4d8429627c0e4
300
py
Python
predavanje2/zamjena_vrijednosti_varijabli1.py
Miillky/uvod_u_programiranje
209611e38c8fe84c727649df4b868a4278eb77c3
[ "MIT" ]
null
null
null
predavanje2/zamjena_vrijednosti_varijabli1.py
Miillky/uvod_u_programiranje
209611e38c8fe84c727649df4b868a4278eb77c3
[ "MIT" ]
null
null
null
predavanje2/zamjena_vrijednosti_varijabli1.py
Miillky/uvod_u_programiranje
209611e38c8fe84c727649df4b868a4278eb77c3
[ "MIT" ]
null
null
null
# Napišite program koji unosi dva cijela broja te ih sprema u varijable x i y. # Program nakon toga zamjenjuje vrijednosti varijabli te sadržaj varijabli (x, y) ispisuje na ekran. x=int(input('Unesi broj x:')) y=int(input('Unesi broj y:')) c=x x=y y=c print('Uneseni x je', x, 'dok je uneseni y', y)
33.333333
100
0.72
d74b1e4999ffc0d6af85ad7f5398bfdc8bc706fd
497
py
Python
osbenchmark/builder/executors/exception_handling_shell_executor.py
engechas/opensearch-benchmark
d11db3721aebf5419a7fc0b8a7d300a1d63ddbfe
[ "Apache-2.0" ]
26
2021-12-09T06:58:53.000Z
2022-03-29T15:01:37.000Z
osbenchmark/builder/executors/exception_handling_shell_executor.py
engechas/opensearch-benchmark
d11db3721aebf5419a7fc0b8a7d300a1d63ddbfe
[ "Apache-2.0" ]
63
2021-12-08T20:47:17.000Z
2022-03-31T18:21:31.000Z
osbenchmark/builder/executors/exception_handling_shell_executor.py
engechas/opensearch-benchmark
d11db3721aebf5419a7fc0b8a7d300a1d63ddbfe
[ "Apache-2.0" ]
5
2021-12-09T10:17:30.000Z
2022-03-03T05:31:12.000Z
from osbenchmark.builder.executors.shell_executor import ShellExecutor from osbenchmark.exceptions import ExecutorError class ExceptionHandlingShellExecutor(ShellExecutor): def __init__(self, executor): self.executor = executor def execute(self, host, command, **kwargs): try: retu...
35.5
97
0.708249
a799d9ec28ed5bbea5149810116c1f8e67f484e5
2,162
py
Python
docs/conf.py
vmussa/qualichat
a24b1c1049c3676a1fdd5a5a8d86e8dfd350fcb9
[ "MIT" ]
4
2021-06-02T20:03:05.000Z
2022-01-11T12:31:53.000Z
docs/conf.py
vmussa/qualichat
a24b1c1049c3676a1fdd5a5a8d86e8dfd350fcb9
[ "MIT" ]
2
2021-07-20T01:07:29.000Z
2021-08-07T20:52:33.000Z
docs/conf.py
vmussa/qualichat
a24b1c1049c3676a1fdd5a5a8d86e8dfd350fcb9
[ "MIT" ]
5
2021-06-14T12:30:46.000Z
2021-08-02T02:47:55.000Z
# Configuration file for the Sphinx documentation builder. # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ext...
34.31746
79
0.666512
496772ddc32d5de95241e8df1f1bef14e14a28b3
5,380
py
Python
nova/api/openstack/compute/plugins/v3/flavors_extraspecs.py
SnabbCo/nova
d156d7fdf241569da2c27ae02ec88e6ef448f7e2
[ "Apache-2.0" ]
2
2016-04-19T08:20:39.000Z
2021-10-03T16:00:37.000Z
nova/api/openstack/compute/plugins/v3/flavors_extraspecs.py
SnabbCo/nova
d156d7fdf241569da2c27ae02ec88e6ef448f7e2
[ "Apache-2.0" ]
null
null
null
nova/api/openstack/compute/plugins/v3/flavors_extraspecs.py
SnabbCo/nova
d156d7fdf241569da2c27ae02ec88e6ef448f7e2
[ "Apache-2.0" ]
1
2020-07-24T06:34:03.000Z
2020-07-24T06:34:03.000Z
# Copyright 2010 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
39.270073
78
0.65632
51b80732909cc0e652609d481d28def273a5699e
14,065
py
Python
bert_pytorch/trainer/pretrain.py
Hibb-bb/ALLM
8eabed5175cb0f91850b367367abbecdded91568
[ "Apache-2.0" ]
1
2022-01-27T09:39:31.000Z
2022-01-27T09:39:31.000Z
bert_pytorch/trainer/pretrain.py
Hibb-bb/ALLM
8eabed5175cb0f91850b367367abbecdded91568
[ "Apache-2.0" ]
null
null
null
bert_pytorch/trainer/pretrain.py
Hibb-bb/ALLM
8eabed5175cb0f91850b367367abbecdded91568
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn from torch.optim import Adam from torch.utils.data import DataLoader from ..model import BERTLM, BERT, BERTLM_AL from .optim_schedule import ScheduledOptim import tqdm import wandb import numpy as np # version 1: use torch.autograd class LabelSmooth(nn.Module): ''' This is t...
39.397759
121
0.604692
8f55124d92ff3b1b1744d059f11e9802acfd4300
31,598
py
Python
grispy/core.py
malejandrogarcia/grispymag
3dcd6ade77e7063116295368ed7474a82a190775
[ "MIT" ]
null
null
null
grispy/core.py
malejandrogarcia/grispymag
3dcd6ade77e7063116295368ed7474a82a190775
[ "MIT" ]
null
null
null
grispy/core.py
malejandrogarcia/grispymag
3dcd6ade77e7063116295368ed7474a82a190775
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of the # GriSPy Project (https://github.com/mchalela/GriSPy). # Copyright (c) 2019, Martin Chalela # License: MIT # Full Text: https://github.com/mchalela/GriSPy/blob/master/LICENSE """GriSPy core class.""" import numpy as np import time import ...
39.4975
81
0.582537
2e79bee660cae4479c51cae3fc1ee6091a125d67
1,207
py
Python
setup.py
eyedl/cvat_reader
9f4837d82b3bb7946f6fb03b3c8fb0991a6d929f
[ "BSD-3-Clause" ]
null
null
null
setup.py
eyedl/cvat_reader
9f4837d82b3bb7946f6fb03b3c8fb0991a6d929f
[ "BSD-3-Clause" ]
5
2021-12-03T12:56:38.000Z
2022-01-18T20:35:01.000Z
setup.py
eyedl/cvat_reader
9f4837d82b3bb7946f6fb03b3c8fb0991a6d929f
[ "BSD-3-Clause" ]
2
2022-02-09T08:53:35.000Z
2022-03-16T10:21:14.000Z
import setuptools from distutils.core import setup def setup_package(): with open("README.md", "r") as f: readme = f.read() setup( name="cvat_reader", version="0.3.1", author="Koen Vossen", author_email="info@koenvossen.nl", url="https://github.com/eyedl/cvat_r...
30.175
54
0.56338
e8ce33ae9911f2e3785e237993aaade6b08cd30e
5,372
py
Python
connectomics/data/dataset/dataset_tile.py
donglaiw/pytorch_connectomics
c79a3cc82f853a86e98930475f6355d0022916dd
[ "MIT" ]
1
2020-05-17T08:01:56.000Z
2020-05-17T08:01:56.000Z
connectomics/data/dataset/dataset_tile.py
donglaiw/pytorch_connectomics
c79a3cc82f853a86e98930475f6355d0022916dd
[ "MIT" ]
null
null
null
connectomics/data/dataset/dataset_tile.py
donglaiw/pytorch_connectomics
c79a3cc82f853a86e98930475f6355d0022916dd
[ "MIT" ]
3
2020-03-31T21:40:12.000Z
2021-06-09T02:26:43.000Z
from __future__ import print_function, division import numpy as np import json import random import torch import torch.utils.data from . import VolumeDataset from ..utils import crop_volume, relabel,seg_widen_border from ...io import tileToVolume class TileDataset(torch.utils.data.Dataset): """Pytorch dataset ...
44.766667
135
0.612807
f8dd5f3438cf50e1f83babf8c18c64d9e3477ac7
1,808
py
Python
twitter.py
wjivan/repec-scraper
c2388d34565cacccb4fcb93d4ba37a95169fadb2
[ "MIT" ]
null
null
null
twitter.py
wjivan/repec-scraper
c2388d34565cacccb4fcb93d4ba37a95169fadb2
[ "MIT" ]
null
null
null
twitter.py
wjivan/repec-scraper
c2388d34565cacccb4fcb93d4ba37a95169fadb2
[ "MIT" ]
null
null
null
#%% import pandas as pd import numpy as np import psycopg2 from sqlalchemy import create_engine import yaml import tweepy import json # Utilities -------------> with open('config.yaml', 'r') as stream: config = yaml.safe_load(stream) # # Create a database connection db_password = config['dbpass'] engine = create...
27.815385
127
0.75719
dcebc40dede8fd114c3f14a09a71e0c8296002d2
3,541
py
Python
base/invert.py
zeke/TediGAN
859a508c7a3a0c6e1898e4244b44341367eb3dcd
[ "MIT" ]
219
2021-03-16T02:20:51.000Z
2022-03-30T03:08:11.000Z
base/invert.py
SCLBD/TediGAN
859a508c7a3a0c6e1898e4244b44341367eb3dcd
[ "MIT" ]
21
2021-03-29T00:55:22.000Z
2022-03-02T23:05:34.000Z
base/invert.py
SCLBD/TediGAN
859a508c7a3a0c6e1898e4244b44341367eb3dcd
[ "MIT" ]
32
2021-03-24T17:33:06.000Z
2022-03-04T23:57:59.000Z
# python 3.6 """Revised from Inverts given images to latent codes with In-Domain GAN Inversion.""" import os import argparse from utils.inverter import StyleGANInverter from utils.visualizer import save_image, load_image, resize_image def parse_args(): """Parses arguments.""" parser = argparse.ArgumentParser() ...
43.716049
109
0.651793
634f4223b23fcacc7779488db1653a200f61c537
11,845
py
Python
models/base_model.py
MichaelHopwood/GLRM
80930762e6964afb8ef0db9e5ae3a10cfcc975b2
[ "MIT" ]
1
2021-12-17T03:02:55.000Z
2021-12-17T03:02:55.000Z
models/base_model.py
MichaelHopwood/GLRM
80930762e6964afb8ef0db9e5ae3a10cfcc975b2
[ "MIT" ]
null
null
null
models/base_model.py
MichaelHopwood/GLRM
80930762e6964afb8ef0db9e5ae3a10cfcc975b2
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F class GLU(nn.Module): def __init__(self, input_channel, output_channel): super(GLU, self).__init__() self.linear_left = nn.Linear(input_channel, output_channel) self.linear_right = nn.Linear(input_channel, output_channel) ...
49.354167
185
0.616378
5d0e75c94bcf3933f1fa99f20b40a37d44e449d0
1,568
py
Python
avantpy/wrappers/_translated.py
mandaw2014/avantpy-extended
aa73c8573d8f6e0f9bb801e91bc93e348bd48e6c
[ "MIT" ]
null
null
null
avantpy/wrappers/_translated.py
mandaw2014/avantpy-extended
aa73c8573d8f6e0f9bb801e91bc93e348bd48e6c
[ "MIT" ]
null
null
null
avantpy/wrappers/_translated.py
mandaw2014/avantpy-extended
aa73c8573d8f6e0f9bb801e91bc93e348bd48e6c
[ "MIT" ]
null
null
null
""" TranslatedClass is a wrapper to translate the properties and methods of a class using a dictionary. """ class TranslatedClass: def __init__(self, factory, translation_map, *args, soft=False, **kwargs): self.__dict__['__translation_instance'] = factory(*args, **kwargs) self.__dict__['__translati...
38.243902
128
0.681122
da28b2c0c3a381ab8a8d12d5617423eedb3249c1
2,768
py
Python
tests/_animation/test_animation_height_for_ellipse.py
ynsnf/apysc
b10ffaf76ec6beb187477d0a744fca00e3efc3fb
[ "MIT" ]
16
2021-04-16T02:01:29.000Z
2022-01-01T08:53:49.000Z
tests/_animation/test_animation_height_for_ellipse.py
ynsnf/apysc
b10ffaf76ec6beb187477d0a744fca00e3efc3fb
[ "MIT" ]
613
2021-03-24T03:37:38.000Z
2022-03-26T10:58:37.000Z
tests/_animation/test_animation_height_for_ellipse.py
simon-ritchie/apyscript
c319f8ab2f1f5f7fad8d2a8b4fc06e7195476279
[ "MIT" ]
2
2021-06-20T07:32:58.000Z
2021-12-26T08:22:11.000Z
from random import randint from retrying import retry import apysc as ap from apysc._display.width_and_height_interfaces_for_ellipse import \ WidthAndHeightInterfacesForEllipse from apysc._expression import var_names from apysc._type.variable_name_interface import VariableNameInterface from tests.testing...
44.645161
79
0.681358
196654a61e84d1573010d59815858a1459bed2fc
4,213
py
Python
examples/heat-source-mpi.py
sipieta2/mirgecom
0ddb180a1ee7d5bffda9291f5230403b12dcf48b
[ "MIT" ]
null
null
null
examples/heat-source-mpi.py
sipieta2/mirgecom
0ddb180a1ee7d5bffda9291f5230403b12dcf48b
[ "MIT" ]
1
2021-07-14T06:01:52.000Z
2021-07-17T17:44:28.000Z
examples/heat-source-mpi.py
sipieta2/mirgecom
0ddb180a1ee7d5bffda9291f5230403b12dcf48b
[ "MIT" ]
null
null
null
__copyright__ = "Copyright (C) 2020 University of Illinois Board of Trustees" __license__ = """ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation th...
29.669014
83
0.670781
aaa263fb828ab14d710ff788c946be32b9633ddc
4,283
py
Python
plugins/dm/callBack/compress.py
ilhamshff/development-tele-pdf
a969d6c9bc789b7ca56d64e21430e5f0296345dd
[ "Apache-2.0" ]
null
null
null
plugins/dm/callBack/compress.py
ilhamshff/development-tele-pdf
a969d6c9bc789b7ca56d64e21430e5f0296345dd
[ "Apache-2.0" ]
null
null
null
plugins/dm/callBack/compress.py
ilhamshff/development-tele-pdf
a969d6c9bc789b7ca56d64e21430e5f0296345dd
[ "Apache-2.0" ]
null
null
null
''' █ █▄ █ █▄█ ▄▀▄ █▄ ▄█ ██▀ █▀▄ █▀▄ █▀ █ █ ▀█ █ █ █▀█ █ ▀ █ █▄▄ █▀ █▄▀ █▀ Dev : IlhamGUD ''' import os import time import shutil from time import sleep from pdf import PROCESS from pyrogram import filters from Configs.dm import Config from plugins.checkPdf import checkPdf from...
32.44697
87
0.596778
99408a51ffce887f794baf783b6016605b7d5524
2,614
py
Python
eval/scripts/human/generate_hit.py
chateval/chatevalv2
7ba96d81842db00427a6d6351d5cea76a8766450
[ "Apache-2.0" ]
5
2018-06-11T19:47:23.000Z
2020-03-04T01:29:15.000Z
eval/scripts/human/generate_hit.py
chateval/app
7ba96d81842db00427a6d6351d5cea76a8766450
[ "Apache-2.0" ]
12
2018-07-11T18:50:13.000Z
2022-02-10T10:45:58.000Z
eval/scripts/human/generate_hit.py
chateval/app
7ba96d81842db00427a6d6351d5cea76a8766450
[ "Apache-2.0" ]
1
2018-06-29T14:52:16.000Z
2018-06-29T14:52:16.000Z
'''Launches a HIT on Amazon Mechanic Turk for rank-based evaluation of chatbot models''' import boto3 import argparse import os import random import codecs import html from .utils import * from .html_gen import * def create_HIT(examples, mturk): if len(examples) == 0: return 0 num_target_candidates = len(exa...
34.394737
89
0.706963
bd921dd1738f96aee5492549a9bb3bf51b6b54d5
805
py
Python
hw7/ch16/updating/remove_csv_header.py
haley-harris/csc221
f85b9b9b8d4c757c97b627ec20ea2ef60f33c3fb
[ "CC0-1.0" ]
null
null
null
hw7/ch16/updating/remove_csv_header.py
haley-harris/csc221
f85b9b9b8d4c757c97b627ec20ea2ef60f33c3fb
[ "CC0-1.0" ]
null
null
null
hw7/ch16/updating/remove_csv_header.py
haley-harris/csc221
f85b9b9b8d4c757c97b627ec20ea2ef60f33c3fb
[ "CC0-1.0" ]
null
null
null
#! python3 # removes header from all CSV files in the current working dir import csv, os os.makedirs('header-removed', exist_ok=True) for csv_filename in os.listdir('.'): if not csv_filename.endswith('.csv'): continue print('Removing header from ' + csv_filename + ' ...') csv_rows = [] csv_...
23.676471
74
0.629814
8b6f8907d88898deca29e3b49bea5d43606b37e7
2,837
py
Python
pycon2015/settings.py
MyKings/PyConChina2015_lottery
d27757f5b534d1ef1164c37c9f552d2023ebfbae
[ "Apache-2.0" ]
20
2015-09-19T14:54:12.000Z
2021-01-02T07:55:46.000Z
pycon2015/settings.py
FranklinRay/PyConChina2015_lottery
d27757f5b534d1ef1164c37c9f552d2023ebfbae
[ "Apache-2.0" ]
1
2018-01-31T15:04:56.000Z
2018-02-01T01:38:37.000Z
pycon2015/settings.py
FranklinRay/PyConChina2015_lottery
d27757f5b534d1ef1164c37c9f552d2023ebfbae
[ "Apache-2.0" ]
13
2015-09-19T14:58:25.000Z
2019-01-18T04:42:20.000Z
# coding: utf-8 """ Django settings for pycon2015 project. Generated by 'django-admin startproject' using Django 1.8.4. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings...
25.558559
71
0.704265
72c335a89647284b77a3ad13f3a3dace3d6ead66
325
py
Python
PycharmProjects/LLD/ParkingLot/exceptions.py
ShubhamRaj1997/low-level-designs
8632a4d693346ab564c01d06b74823698383adc6
[ "Apache-2.0" ]
null
null
null
PycharmProjects/LLD/ParkingLot/exceptions.py
ShubhamRaj1997/low-level-designs
8632a4d693346ab564c01d06b74823698383adc6
[ "Apache-2.0" ]
null
null
null
PycharmProjects/LLD/ParkingLot/exceptions.py
ShubhamRaj1997/low-level-designs
8632a4d693346ab564c01d06b74823698383adc6
[ "Apache-2.0" ]
null
null
null
class FloorAlreadyPresentException(Exception): pass class FloorNotPresentException(Exception): pass class SpotNotFoundException(Exception): pass class NoFreeSpotFoundException(Exception): pass class SpotAlreadyOccupiedException(Exception): pass class TicketExpiredException(Exception): ...
14.130435
46
0.784615
c35a3b5e8db61f32946e48755a967368f73305a0
7,809
py
Python
jsonsubschema/old/checkers.py
lukeenterprise/json-subschema
f273d62ed1517f5a83a57abf148232ed927a771a
[ "Apache-2.0" ]
1
2019-08-01T15:28:26.000Z
2019-08-01T15:28:26.000Z
jsonsubschema/old/checkers.py
lukeenterprise/json-subschema
f273d62ed1517f5a83a57abf148232ed927a771a
[ "Apache-2.0" ]
null
null
null
jsonsubschema/old/checkers.py
lukeenterprise/json-subschema
f273d62ed1517f5a83a57abf148232ed927a771a
[ "Apache-2.0" ]
null
null
null
''' Created on May 20, 2019 @author: Andrew Habib ''' import sys import math import intervals as I from greenery.lego import parse import subschemachecker from _types import ( JsonString, JsonNumeric, JsonArray, JsonObject ) from _utils import ( print_db, is_sub_interval_from_optional_range...
29.02974
89
0.53925
baceab25d44715b7d8f43f1724b0a1ad252b1261
981
py
Python
python/mxnet/ndarray/linalg.py
Vikas-kum/incubator-mxnet
ba02bf2fe2da423caa59ddb3fd5e433b90b730bf
[ "Apache-2.0" ]
399
2017-05-30T05:12:48.000Z
2022-01-29T05:53:08.000Z
python/mxnet/ndarray/linalg.py
Vikas-kum/incubator-mxnet
ba02bf2fe2da423caa59ddb3fd5e433b90b730bf
[ "Apache-2.0" ]
187
2018-03-16T23:44:43.000Z
2021-12-14T21:19:54.000Z
python/mxnet/ndarray/linalg.py
Vikas-kum/incubator-mxnet
ba02bf2fe2da423caa59ddb3fd5e433b90b730bf
[ "Apache-2.0" ]
107
2017-05-30T05:53:22.000Z
2021-06-24T02:43:31.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 u...
36.333333
62
0.759429
55aba115563b9222b62470ecf0304fbd5089cade
8,656
py
Python
PA/coursework_2/models.py
easyCZ/UoE-Projects
7651c8caf329c4f7b4562eba441bfc24124cfcfd
[ "BSD-2-Clause" ]
null
null
null
PA/coursework_2/models.py
easyCZ/UoE-Projects
7651c8caf329c4f7b4562eba441bfc24124cfcfd
[ "BSD-2-Clause" ]
1
2022-02-23T07:34:53.000Z
2022-02-23T07:34:53.000Z
PA/coursework_2/models.py
easyCZ/UoE-Projects
7651c8caf329c4f7b4562eba441bfc24124cfcfd
[ "BSD-2-Clause" ]
null
null
null
from enum import Enum, unique import math class Stats(object): def __init__(self): self.hits = 0 self.private_hits = 0 self.shared_hits = 0 self.misses = 0 self.invalidated = 0 self.lines_invalidated = 0 self.write_backs = 0 self.write_updates = 0 ...
28.012945
83
0.586876
89992b6a6ef3cc3410f457d2c1b2fba81ed62086
4,032
py
Python
alipay/aop/api/request/SsdataDataserviceDatapropertyBatchqueryRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/request/SsdataDataserviceDatapropertyBatchqueryRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/request/SsdataDataserviceDatapropertyBatchqueryRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.SsdataDataserviceDatapropertyBatchqueryModel import SsdataDataserviceDatapropertyBatchqueryModel class SsdataDataserviceDataproperty...
27.806897
148
0.650298
3effdd0bf7c6afe222257e3da46aae96bf08903c
2,903
py
Python
pymc3/tests/test_models_utils.py
Dr-G/pymc3
abd0a63385a11cfa6faf397dcc5f1a4fc98e1e76
[ "Apache-2.0" ]
2
2020-10-31T18:01:32.000Z
2020-11-01T07:22:48.000Z
pymc3/tests/test_models_utils.py
Dr-G/pymc3
abd0a63385a11cfa6faf397dcc5f1a4fc98e1e76
[ "Apache-2.0" ]
null
null
null
pymc3/tests/test_models_utils.py
Dr-G/pymc3
abd0a63385a11cfa6faf397dcc5f1a4fc98e1e76
[ "Apache-2.0" ]
1
2020-11-23T19:09:58.000Z
2020-11-23T19:09:58.000Z
import numpy as np import pandas as pd import theano.tensor as tt from pymc3.glm import utils import pytest class TestUtils: def setup_method(self): self.data = pd.DataFrame(dict(a=[1, 2, 3], b=[4, 5, 6])) def assertMatrixLabels(self, m, l, mt=None, lt=None): assert np.all( np...
38.706667
98
0.609714
5dc419a5d8bd7f8f1d3f6d1d887493dfedc6c5eb
1,218
py
Python
cacheable/tests/PeeweeAdapterTest.py
d1hotpep/cacheable
9ea97d6504965179f8fe495b67e466c068719445
[ "MIT" ]
null
null
null
cacheable/tests/PeeweeAdapterTest.py
d1hotpep/cacheable
9ea97d6504965179f8fe495b67e466c068719445
[ "MIT" ]
null
null
null
cacheable/tests/PeeweeAdapterTest.py
d1hotpep/cacheable
9ea97d6504965179f8fe495b67e466c068719445
[ "MIT" ]
null
null
null
#!/usr/bin/python import os import sys import unittest sys.path = [ os.path.abspath(os.path.join(os.path.dirname(__file__), '../..')) ] + sys.path from cacheable import Cacheable from cacheable.adapter import PeeweeAdapter from peewee import SqliteDatabase class LengthCacheable(Cacheable): @staticmethod de...
23.882353
91
0.655172
a0563e37e21c077c75870611a754b79ba8a5780b
3,169
py
Python
composeexample/settings.py
jmcevoy1984/Docker-Compose-Quickstart
6b34d8352b4067b358db76dddf05dc70fd65b8ce
[ "MIT" ]
null
null
null
composeexample/settings.py
jmcevoy1984/Docker-Compose-Quickstart
6b34d8352b4067b358db76dddf05dc70fd65b8ce
[ "MIT" ]
null
null
null
composeexample/settings.py
jmcevoy1984/Docker-Compose-Quickstart
6b34d8352b4067b358db76dddf05dc70fd65b8ce
[ "MIT" ]
null
null
null
""" Django settings for composeexample project. Generated by 'django-admin startproject' using Django 1.11.2. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ im...
25.556452
91
0.691701
8b448ea808782ccabbb843a4ceee0691527e40b2
1,505
py
Python
EstradasMenoresParaNovoOutput.py
heltonbiker/RoadScanner
50765c44ffb9a2d66cedce447ddb18c1827554f1
[ "MIT" ]
null
null
null
EstradasMenoresParaNovoOutput.py
heltonbiker/RoadScanner
50765c44ffb9a2d66cedce447ddb18c1827554f1
[ "MIT" ]
null
null
null
EstradasMenoresParaNovoOutput.py
heltonbiker/RoadScanner
50765c44ffb9a2d66cedce447ddb18c1827554f1
[ "MIT" ]
1
2020-07-09T15:28:51.000Z
2020-07-09T15:28:51.000Z
#!/usr/bin/env python # coding: utf-8 import time import json import glob import re import networkx as nx from networkx.readwrite import json_graph lastfile = sorted(glob.glob('output/*.json'))[-1] with open(lastfile) as jsonfile: jsondict = json.load(jsonfile) nodes = [tuple(node['id']) for node in jsondic...
27.363636
111
0.6299
eaf18341fed2be3fcdcf908ce592163aae6c673f
502
py
Python
Ecomm/products/models.py
team-mbm/Ecomm
c3f6db8f773433281fc15ac3df667f63f5f45846
[ "MIT" ]
null
null
null
Ecomm/products/models.py
team-mbm/Ecomm
c3f6db8f773433281fc15ac3df667f63f5f45846
[ "MIT" ]
9
2020-06-05T17:20:51.000Z
2022-03-11T23:14:50.000Z
Ecomm/products/models.py
team-mbm/Ecomm
c3f6db8f773433281fc15ac3df667f63f5f45846
[ "MIT" ]
null
null
null
from django.db import models class Product(models.Model): title = models.CharField(max_length=100) category = models.CharField(max_length=100) price = models.IntegerField() company = models.CharField(max_length=50) image = models.ImageField(upload_to="product_pics") wide_image = models.ImageFie...
35.857143
88
0.7251
38c44fa40c8d9744a19afdc3c82096f94f414c1a
431
py
Python
gallery/urls.py
iyerikuzwe/The-moringa-tribune
a234f4db9b0eb74deb278ab98b068b8392e18735
[ "Unlicense" ]
null
null
null
gallery/urls.py
iyerikuzwe/The-moringa-tribune
a234f4db9b0eb74deb278ab98b068b8392e18735
[ "Unlicense" ]
null
null
null
gallery/urls.py
iyerikuzwe/The-moringa-tribune
a234f4db9b0eb74deb278ab98b068b8392e18735
[ "Unlicense" ]
null
null
null
from django.conf.urls import url from django.conf import settings from django.conf.urls.static import static from . import views urlpatterns = [ url('^$', views.home, name='welcome'), url(r'^category/$', views.search_image, name='search_image'), url(r'^location/(\d+)$', views.filter_by_location, name='loca...
35.916667
82
0.726218
645a3f3ec1bb1c44f9b00a2642a1cab15d98334b
15,136
py
Python
dense_correspondence/correspondence_tools/correspondence_finder.py
thomasweng15/pytorch-dense-correspondence
de6d57943c33b252f11c443e85bad2eed90767b1
[ "BSD-3-Clause" ]
null
null
null
dense_correspondence/correspondence_tools/correspondence_finder.py
thomasweng15/pytorch-dense-correspondence
de6d57943c33b252f11c443e85bad2eed90767b1
[ "BSD-3-Clause" ]
null
null
null
dense_correspondence/correspondence_tools/correspondence_finder.py
thomasweng15/pytorch-dense-correspondence
de6d57943c33b252f11c443e85bad2eed90767b1
[ "BSD-3-Clause" ]
1
2020-05-26T12:41:52.000Z
2020-05-26T12:41:52.000Z
import torch # math import numpy as numpy import numpy as np import math from numpy.linalg import inv import random from itertools import cycle # io from PIL import Image # torchvision import sys sys.path.insert(0, '../pytorch-segmentation-detection/vision/') # from subrepo from torchvision import transforms from de...
39.416667
153
0.714588
369e606a6ed0bc0231d88478cdd806fab90258ca
8,585
py
Python
worker_app/app/user_login.py
HanyuXi/AutoScalerManagementTool
5bc2ed16c97a26a53ba2f38d3d482faf45aa2b5e
[ "MIT" ]
null
null
null
worker_app/app/user_login.py
HanyuXi/AutoScalerManagementTool
5bc2ed16c97a26a53ba2f38d3d482faf45aa2b5e
[ "MIT" ]
null
null
null
worker_app/app/user_login.py
HanyuXi/AutoScalerManagementTool
5bc2ed16c97a26a53ba2f38d3d482faf45aa2b5e
[ "MIT" ]
null
null
null
from app import webapp, mysql from flask import render_template, redirect, url_for, request, session, make_response,jsonify from .img_process import generate_error_responses from .const import ErrorMessages from werkzeug.security import generate_password_hash, check_password_hash import MySQLdb.cursors import os import...
43.57868
185
0.629237
218030d295383e5a65cdca2f8c4492e0a311e3c3
31,320
py
Python
recipes/Voicebank/enhance/MetricGAN/7251_train.py
sunwell1994/speechbrain
dc7a2deaa4113749153c1a967b95aea260d68094
[ "Apache-2.0" ]
null
null
null
recipes/Voicebank/enhance/MetricGAN/7251_train.py
sunwell1994/speechbrain
dc7a2deaa4113749153c1a967b95aea260d68094
[ "Apache-2.0" ]
null
null
null
recipes/Voicebank/enhance/MetricGAN/7251_train.py
sunwell1994/speechbrain
dc7a2deaa4113749153c1a967b95aea260d68094
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env/python3 """ Recipe for training a speech enhancement system with the Voicebank dataset. To run this recipe, do the following: > python train.py hparams/{hyperparam_file}.yaml Authors * Szu-Wei Fu 2020 * Peter Plantinga 2021 * switch the generator to Unet generator and adapt to its dataload...
40.569948
118
0.572861
9f3b9cd80ed8313b6d896a30ee844c82e37b92e8
3,125
py
Python
controllers/template.py
poldelgado/TorneosNube
41d509c36d21c816b40b1520e920195850bcce58
[ "MIT" ]
48
2016-03-23T10:20:05.000Z
2020-11-22T19:30:46.000Z
controllers/template.py
poldelgado/TorneosNube
41d509c36d21c816b40b1520e920195850bcce58
[ "MIT" ]
8
2016-03-23T14:21:47.000Z
2019-09-11T08:31:58.000Z
controllers/template.py
poldelgado/TorneosNube
41d509c36d21c816b40b1520e920195850bcce58
[ "MIT" ]
28
2016-03-23T09:40:10.000Z
2021-05-27T10:24:49.000Z
# -*- coding: utf-8 -*- '''This is a template controller with corresponding views for list, create, view, and edit. The list utilizes the datatables plugin. The create and view views utilize the cascading field plugin. ''' table = db.dog_owner response.view_title = '%s %s' % ( request.function.replace('_', ' ').t...
26.709402
118
0.63232
759bccc61cf11fc67c1ae55f78c2df7a1d65f595
1,832
py
Python
wordcountReducer_MinMaxAvg2.py
jatinmistry13/StateOfTheUnion
aafefad7e9565d914042be5f90fb6a2a8270f6a3
[ "MIT" ]
1
2018-10-16T09:29:43.000Z
2018-10-16T09:29:43.000Z
wordcountReducer_MinMaxAvg2.py
jatinmistry13/StateOfTheUnion
aafefad7e9565d914042be5f90fb6a2a8270f6a3
[ "MIT" ]
null
null
null
wordcountReducer_MinMaxAvg2.py
jatinmistry13/StateOfTheUnion
aafefad7e9565d914042be5f90fb6a2a8270f6a3
[ "MIT" ]
null
null
null
#!/usr/bin/env python from operator import itemgetter import sys current_word = None current_count = 0 word = None wordcount = {} count_list = [] def addToDictionary(current_word, current_count): wordkey = current_word.split("_")[0] if wordcount.get(wordkey) == None: count_list = [] count_li...
26.550725
66
0.646288
77ae9faf58db90e6078fd23e5c21e56de77b5187
3,473
py
Python
tests/test_vector_parameter.py
pennucci/enterprise
24b46116b63d2ef76e0f4132830d17dec575f8a3
[ "MIT" ]
1
2019-02-01T03:22:45.000Z
2019-02-01T03:22:45.000Z
tests/test_vector_parameter.py
pennucci/enterprise
24b46116b63d2ef76e0f4132830d17dec575f8a3
[ "MIT" ]
null
null
null
tests/test_vector_parameter.py
pennucci/enterprise
24b46116b63d2ef76e0f4132830d17dec575f8a3
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_vector_parameter ---------------------------------- Tests for vector parameter functionality """ from __future__ import division import unittest import numpy as np from enterprise.pulsar import Pulsar from enterprise.signals import gp_signals, parameter, sign...
29.432203
119
0.618198
8f61b20d61ac6f93d83a22e78c49c02145f1e12a
11,232
py
Python
devel/lib/python2.7/dist-packages/dynamixel_workbench_msgs/msg/_RX.py
sej0015/holonomic_turtle_bot
4cc80bb27dfce0aa6f2bd975d79f6348acf40401
[ "Apache-2.0" ]
null
null
null
devel/lib/python2.7/dist-packages/dynamixel_workbench_msgs/msg/_RX.py
sej0015/holonomic_turtle_bot
4cc80bb27dfce0aa6f2bd975d79f6348acf40401
[ "Apache-2.0" ]
null
null
null
devel/lib/python2.7/dist-packages/dynamixel_workbench_msgs/msg/_RX.py
sej0015/holonomic_turtle_bot
4cc80bb27dfce0aa6f2bd975d79f6348acf40401
[ "Apache-2.0" ]
null
null
null
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from dynamixel_workbench_msgs/RX.msg. Do not edit.""" import codecs import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct class RX(genpy.Message): _md5sum = "2995886198dd0136a45c431a45ec13b2" _...
46.032787
637
0.723024
17a3904c3d5a76d2759b60a24088f85265b5d65e
451
py
Python
kdict/__init__.py
maximz/kdict
bec84c5b27b644de752bbbbd003c6bb35fc493b5
[ "MIT" ]
null
null
null
kdict/__init__.py
maximz/kdict
bec84c5b27b644de752bbbbd003c6bb35fc493b5
[ "MIT" ]
14
2022-01-13T16:38:40.000Z
2022-03-31T16:26:59.000Z
kdict/__init__.py
maximz/kdict
bec84c5b27b644de752bbbbd003c6bb35fc493b5
[ "MIT" ]
null
null
null
"""Kdict.""" __author__ = """Maxim Zaslavsky""" __email__ = "maxim@maximz.com" __version__ = "__version__ = '0.1.0'" # Set default logging handler to avoid "No handler found" warnings. import logging from logging import NullHandler logging.getLogger(__name__).addHandler(NullHandler()) # Make the kdict class importa...
30.066667
136
0.758315
38349e7f85865b5f892ceabfd88c536979d7c251
1,962
py
Python
trax/models/atari_cnn_test.py
codespeakers/trax
9fc11bca7accda0394d629cac96558f4539d7f61
[ "Apache-2.0" ]
2
2020-02-05T09:27:29.000Z
2020-02-05T09:27:49.000Z
trax/models/atari_cnn_test.py
codespeakers/trax
9fc11bca7accda0394d629cac96558f4539d7f61
[ "Apache-2.0" ]
null
null
null
trax/models/atari_cnn_test.py
codespeakers/trax
9fc11bca7accda0394d629cac96558f4539d7f61
[ "Apache-2.0" ]
1
2021-07-08T16:35:30.000Z
2021-07-08T16:35:30.000Z
# coding=utf-8 # Copyright 2019 The Trax Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
30.65625
74
0.697757
467193e56bf0aea01caa81309a589c0d4e2bf659
700
py
Python
examples/FolderOperations/list_folders.py
rehanalam1/python-o365
ef377acad5f1f07a10955e36871b774399b727d9
[ "Apache-2.0" ]
null
null
null
examples/FolderOperations/list_folders.py
rehanalam1/python-o365
ef377acad5f1f07a10955e36871b774399b727d9
[ "Apache-2.0" ]
null
null
null
examples/FolderOperations/list_folders.py
rehanalam1/python-o365
ef377acad5f1f07a10955e36871b774399b727d9
[ "Apache-2.0" ]
1
2021-01-26T09:59:53.000Z
2021-01-26T09:59:53.000Z
import sys import getpass from O365 import Connection, FluentInbox def main(): username = input("Username: ") password = getpass.getpass("Password: ") authentication = (username, password) Connection.login(*authentication) inbox = FluentInbox() # If given arguments, treat them as folder_ids t...
26.923077
68
0.642857
a23ce7ed7a704be9b424fe036dcb1e077ae4a7e8
18,566
py
Python
ot/utils.py
cshjin/POT
eccb1386eea52b94b82456d126bd20cbe3198e05
[ "MIT" ]
null
null
null
ot/utils.py
cshjin/POT
eccb1386eea52b94b82456d126bd20cbe3198e05
[ "MIT" ]
1
2022-03-14T14:13:49.000Z
2022-03-14T14:13:49.000Z
ot/utils.py
lchapel/POT
8385b6db7a394ed48a0eff630f852a6d3952db65
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Various useful functions """ # Author: Remi Flamary <remi.flamary@unice.fr> # # License: MIT License from functools import reduce import time import numpy as np from scipy.spatial.distance import cdist import sys import warnings from inspect import signature from .backend import get_backe...
30.336601
108
0.57503
be2a9a2cb8d3ba4d534d0ceec743c013cc55529a
2,631
py
Python
src/pyrtable/configutils.py
vilarneto/pyrtable
679a8174963ca5bd088526488a6fd7363b6afb52
[ "MIT" ]
6
2021-04-06T19:48:46.000Z
2021-12-21T20:44:34.000Z
src/pyrtable/configutils.py
vilarneto/pyrtable
679a8174963ca5bd088526488a6fd7363b6afb52
[ "MIT" ]
6
2021-01-22T15:04:27.000Z
2021-10-13T19:54:41.000Z
src/pyrtable/configutils.py
vilarneto/pyrtable
679a8174963ca5bd088526488a6fd7363b6afb52
[ "MIT" ]
null
null
null
import os import threading from typing import List, Optional _config_dirs: Optional[List[str]] = None _config_dirs_lock = threading.Lock() def get_config_dirs() -> List[str]: global _config_dirs import os with _config_dirs_lock: if _config_dirs is None: _config_dirs = os.environ.ge...
27.694737
74
0.628278
5892f830c8b6a18183f7ebb77af8d9808a1382ac
16,510
py
Python
python/tests/test_seldon_client.py
M46F/seldon-core
db251e0177c056bac7b4518033833d27a85529ee
[ "Apache-2.0" ]
1
2021-01-15T04:14:17.000Z
2021-01-15T04:14:17.000Z
python/tests/test_seldon_client.py
M46F/seldon-core
db251e0177c056bac7b4518033833d27a85529ee
[ "Apache-2.0" ]
13
2020-09-07T09:17:59.000Z
2021-01-28T08:18:09.000Z
python/tests/test_seldon_client.py
M46F/seldon-core
db251e0177c056bac7b4518033833d27a85529ee
[ "Apache-2.0" ]
7
2020-09-07T09:10:57.000Z
2021-11-25T02:59:02.000Z
from seldon_core.seldon_client import ( SeldonClient, SeldonClientPrediction, SeldonClientCombine, ) from unittest import mock from seldon_core.utils import ( array_to_grpc_datadef, seldon_message_to_json, json_to_seldon_message, ) from seldon_core.proto import prediction_pb2 from google.protobu...
37.522727
88
0.747123
d793f3eb32e7928f2be08168dfa9f278359e77d6
8,500
py
Python
tests/test_crystal_tools.py
ondrejdyck/pyTEMlib
b8ed2000f1bb44c7add966cef444a02e456258cb
[ "MIT" ]
5
2021-05-07T00:30:52.000Z
2022-03-01T13:11:43.000Z
tests/test_crystal_tools.py
ondrejdyck/pyTEMlib
b8ed2000f1bb44c7add966cef444a02e456258cb
[ "MIT" ]
24
2020-11-22T13:37:40.000Z
2022-03-03T19:12:30.000Z
tests/test_crystal_tools.py
ondrejdyck/pyTEMlib
b8ed2000f1bb44c7add966cef444a02e456258cb
[ "MIT" ]
6
2021-02-19T18:25:01.000Z
2022-01-21T10:19:33.000Z
# -*- coding: utf-8 -*- """ Created on January 23 2021 @author: Gerd Duscher """ import unittest import numpy as np import pyTEMlib.crystal_tools as cs import sys sys.path.append("../pyTEMlib/") if sys.version_info.major == 3: unicode = str class TestUtilityFunctions(unittest.TestCase): def test_cubic(sel...
41.262136
110
0.590118
ae69a9c07392163907f542f4cdcf90bd351d2725
4,014
py
Python
src/honeycomb_circuit_double_epr_test.py
Strilanc/honeycomb_threshold
d71737d3b4fb8878e856f8bd66b9632cc7078159
[ "Apache-2.0" ]
5
2021-07-23T05:33:18.000Z
2022-01-27T00:59:40.000Z
src/honeycomb_circuit_double_epr_test.py
Strilanc/honeycomb_threshold
d71737d3b4fb8878e856f8bd66b9632cc7078159
[ "Apache-2.0" ]
1
2021-08-03T20:58:26.000Z
2021-08-08T17:13:11.000Z
src/honeycomb_circuit_double_epr_test.py
Strilanc/honeycomb_threshold
d71737d3b4fb8878e856f8bd66b9632cc7078159
[ "Apache-2.0" ]
1
2022-01-30T11:05:19.000Z
2022-01-30T11:05:19.000Z
""" This is a hacked together test for confirming that the honeycomb code can store 2 logical qubits. For logical qubits 1, 2 and ancilla qubits a, b it measures X1*Xa Z1*Zb X2*Xb Z2*Zb before and after doing the honeycomb memory circuit while injecting noise. This proves there are two logical qubit...
34.307692
113
0.622571
70afdba6967f1c4ee7e5438e2aeadaaeb5811edb
2,723
py
Python
qa/rpc-tests/txindex.py
Blockchain-Solutions-BCS/bsmcoin-core
4c63fc8cc57caf23629cf5078719841225a04537
[ "MIT" ]
null
null
null
qa/rpc-tests/txindex.py
Blockchain-Solutions-BCS/bsmcoin-core
4c63fc8cc57caf23629cf5078719841225a04537
[ "MIT" ]
null
null
null
qa/rpc-tests/txindex.py
Blockchain-Solutions-BCS/bsmcoin-core
4c63fc8cc57caf23629cf5078719841225a04537
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test txindex generation and fetching # import time from test_framework.test_framework import BsmCoin...
36.797297
102
0.664341
27a28fc8c9383d82fa2a08e61d2138dd5e9c712a
4,097
py
Python
open-hackathon-client/src/client/functions.py
overbest/open-hackathon
62e085fbe603bcb00ca56d2b96cfc43bf44c710b
[ "MIT" ]
null
null
null
open-hackathon-client/src/client/functions.py
overbest/open-hackathon
62e085fbe603bcb00ca56d2b96cfc43bf44c710b
[ "MIT" ]
null
null
null
open-hackathon-client/src/client/functions.py
overbest/open-hackathon
62e085fbe603bcb00ca56d2b96cfc43bf44c710b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # ----------------------------------------------------------------------------------- # Copyright (c) Microsoft Open Technologies (Shanghai) Co. Ltd. All rights reserved. # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this softw...
32.259843
85
0.67464
d16abf9a2d9c32a88c2a18824109a333c442601a
428
py
Python
evento/migrations/0007_auto_20190819_1833.py
kelwys/open_event
5fb4b8e88839745b5be50acde563f8ec0b1cab24
[ "MIT" ]
null
null
null
evento/migrations/0007_auto_20190819_1833.py
kelwys/open_event
5fb4b8e88839745b5be50acde563f8ec0b1cab24
[ "MIT" ]
4
2020-02-12T01:22:34.000Z
2021-04-08T19:49:45.000Z
evento/migrations/0007_auto_20190819_1833.py
kelwys/open_event
5fb4b8e88839745b5be50acde563f8ec0b1cab24
[ "MIT" ]
null
null
null
# Generated by Django 2.2.4 on 2019-08-19 18:33 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('evento', '0006_remove_agenda_arquivo'), ] operations = [ migrations.AlterField( model_name='agenda', name='nome_pale...
22.526316
83
0.621495
08d99654e765419e53cbcda3d93a38bfb5280534
2,111
py
Python
pretrained.py
asvskartheek/sentiment-analysis
9bdc531e31e9b6885eab235ba23d542834bb379e
[ "MIT" ]
null
null
null
pretrained.py
asvskartheek/sentiment-analysis
9bdc531e31e9b6885eab235ba23d542834bb379e
[ "MIT" ]
1
2021-05-03T14:44:18.000Z
2021-05-06T04:01:15.000Z
pretrained.py
asvskartheek/sentiment-analysis
9bdc531e31e9b6885eab235ba23d542834bb379e
[ "MIT" ]
1
2020-11-15T03:02:04.000Z
2020-11-15T03:02:04.000Z
import argparse import pickle import torch from models import * import spacy from utils import count_parameters nlp = spacy.load("en") parser = argparse.ArgumentParser() parser.add_argument( "--model", default="fast", type=str, help="pre-trained model architecture" ) args = parser.parse_args() def predict_...
27.776316
88
0.640455
88f51d65ce3f845e9c6a46c73832aab4dc47b707
27,535
py
Python
creabase/operations.py
creativechain/crea-python
6ea7dbc725ae6b2d28fc6b0c6077b81096a2d283
[ "MIT" ]
null
null
null
creabase/operations.py
creativechain/crea-python
6ea7dbc725ae6b2d28fc6b0c6077b81096a2d283
[ "MIT" ]
null
null
null
creabase/operations.py
creativechain/crea-python
6ea7dbc725ae6b2d28fc6b0c6077b81096a2d283
[ "MIT" ]
null
null
null
import importlib import json import re import struct from collections import OrderedDict from crea.utils import compat_bytes from .account import PublicKey from .operationids import operations from .types import (Int16, Uint16, Uint32, Uint64, String, Bytes, Array, PointInTime, Bool, Optional, Map,...
35.993464
85
0.499764
1b12e3c643e8e81daf49cb2e0b3a32eef6102804
2,707
py
Python
01-code-scripts/preprocess_vnp46a2.py
calekochenour/nighttime-radiance
194cd62042bbe94e67aed9fdf7f3896174fecc38
[ "BSD-3-Clause" ]
7
2020-11-11T08:02:51.000Z
2022-03-17T17:53:47.000Z
01-code-scripts/preprocess_vnp46a2.py
calekochenour/nighttime-radiance
194cd62042bbe94e67aed9fdf7f3896174fecc38
[ "BSD-3-Clause" ]
null
null
null
01-code-scripts/preprocess_vnp46a2.py
calekochenour/nighttime-radiance
194cd62042bbe94e67aed9fdf7f3896174fecc38
[ "BSD-3-Clause" ]
4
2021-04-19T23:57:25.000Z
2022-03-31T06:26:12.000Z
""" ------------------------------------------------------------------------------- Preprocesses NASA VNP46A2 HDF5 files. This Notebook takes raw `.h5` files and completes the following preprocessing tasks: - Extracts radiance and quality flag bands; - Masks radiance for fill values, clouds, and sea water; ...
35.155844
79
0.606206
46a6a7637ef1e46f27bc4a05db0dddfb2d495768
1,002
py
Python
backend_server/operations_test.py
rishavgiri6/News4U
d426eba97039a3d1afd90ecd14c454856b91f9d8
[ "Unlicense" ]
2
2021-08-02T09:41:42.000Z
2021-08-10T05:26:52.000Z
backend_server/operations_test.py
rishavgiri6/News4U
d426eba97039a3d1afd90ecd14c454856b91f9d8
[ "Unlicense" ]
null
null
null
backend_server/operations_test.py
rishavgiri6/News4U
d426eba97039a3d1afd90ecd14c454856b91f9d8
[ "Unlicense" ]
null
null
null
import operations def test_getOneNews_basic(): news = operations.getOneNews() print(news) assert news is not None print('test_getOneNews_basic passed!') def test_getNewsSummariesForUser_basic(): news = operations.getNewsSummariesForUser('test', 1) assert len(news) > 0 print('test_getNewsSu...
34.551724
72
0.759481
04e7ed3d706030b82cdd99f205db2abb538b2fbc
3,667
py
Python
tea/trainer/engine.py
taohu88/chaos
b5dd0b4c71408de4e9231e9970c240f77bc5c923
[ "MIT" ]
1
2019-05-08T01:11:13.000Z
2019-05-08T01:11:13.000Z
tea/trainer/engine.py
taohu88/chaos
b5dd0b4c71408de4e9231e9970c240f77bc5c923
[ "MIT" ]
null
null
null
tea/trainer/engine.py
taohu88/chaos
b5dd0b4c71408de4e9231e9970c240f77bc5c923
[ "MIT" ]
null
null
null
import time from collections import OrderedDict from ignite.engine import Engine, Events from ignite._utils import _to_hours_mins_secs class RunningState(object): """An object that is used to pass internal and user-defined state between event handlers""" def __init__(self, **kwargs): # state, add epoc...
36.306931
120
0.622852
f2a9f773de5261b22cc4f33ddcb283e3b33a297d
11,838
py
Python
vtrace.py
ricklentz/scalable_agent
6c0c8a701990fab9053fb338ede9c915c18fa2b1
[ "Apache-2.0" ]
921
2018-06-26T15:06:03.000Z
2022-03-27T02:14:02.000Z
vtrace.py
ricklentz/scalable_agent
6c0c8a701990fab9053fb338ede9c915c18fa2b1
[ "Apache-2.0" ]
54
2018-06-27T08:39:22.000Z
2022-01-12T05:48:06.000Z
vtrace.py
ricklentz/scalable_agent
6c0c8a701990fab9053fb338ede9c915c18fa2b1
[ "Apache-2.0" ]
170
2018-06-26T16:07:02.000Z
2022-03-24T09:11:17.000Z
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
42.128114
80
0.728924
0468f40ed81d90ebc12699edbec7fbb33b0aab52
8,524
py
Python
test/extensions/filters/network/thrift_proxy/driver/client.py
easwars/envoy
48c4fb87e9632baa6145a21771fb4d67d4aa4231
[ "Apache-2.0" ]
2
2021-04-22T21:38:58.000Z
2021-04-22T21:39:40.000Z
test/extensions/filters/network/thrift_proxy/driver/client.py
easwars/envoy
48c4fb87e9632baa6145a21771fb4d67d4aa4231
[ "Apache-2.0" ]
8
2022-03-01T20:32:32.000Z
2022-03-23T22:08:49.000Z
test/extensions/filters/network/thrift_proxy/driver/client.py
yanavlasov/envoy
2b8a744bf0b77717be889d4f514edd22a76cbe8e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import argparse import io import sys from generated.example import Example from generated.example.ttypes import (Param, TheWorks, AppException) from thrift import Thrift from thrift.protocol import (TBinaryProtocol, TCompactProtocol, TJSONProtocol, TMultiplexedProtocol) from thrift.transport im...
32.534351
100
0.556312
c50941ac6925bac85266c8c8c2b18014df59b78c
1,905
py
Python
arjuna-samples/arjex/lib/gns_adv/app_page_section/pages/sections/leftnav.py
StefanIGit/arjuna
6c7d9099e0d766e7b30936ef25d32c1414133b96
[ "Apache-2.0" ]
13
2020-05-12T06:32:51.000Z
2022-01-24T18:21:19.000Z
arjuna-samples/arjex/lib/gns_adv/app_page_section/pages/sections/leftnav.py
StefanIGit/arjuna
6c7d9099e0d766e7b30936ef25d32c1414133b96
[ "Apache-2.0" ]
5
2020-02-14T12:51:07.000Z
2021-12-01T10:39:51.000Z
arjuna-samples/arjex/lib/gns_adv/app_page_section/pages/sections/leftnav.py
StefanIGit/arjuna
6c7d9099e0d766e7b30936ef25d32c1414133b96
[ "Apache-2.0" ]
25
2020-01-16T10:44:25.000Z
2022-02-24T13:22:22.000Z
# This file is a part of Arjuna # Copyright 2015-2021 Rahul Verma # Website: www.RahulVerma.net # 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...
30.725806
89
0.714961
705d5c26a1ae52c2cf951a7e07cc1037b65bed12
5,454
py
Python
smarty/tests/test_sampler.py
openforcefield/smarty
882d54b6d6d0fada748c71789964b07be2210a6a
[ "MIT" ]
10
2018-03-29T15:31:50.000Z
2022-02-17T14:04:37.000Z
smarty/tests/test_sampler.py
openforcefield/smarty
882d54b6d6d0fada748c71789964b07be2210a6a
[ "MIT" ]
14
2017-11-22T21:27:25.000Z
2019-01-24T04:50:42.000Z
smarty/tests/test_sampler.py
openforcefield/smarty
882d54b6d6d0fada748c71789964b07be2210a6a
[ "MIT" ]
2
2019-03-05T22:52:26.000Z
2022-02-17T14:05:06.000Z
from functools import partial import smarty from smarty import AtomTyper, AtomTypeSampler, score_utils from smarty.utils import get_data_filename from openforcefield.utils import read_molecules from openforcefield import utils import unittest from unittest import TestCase class TestAtomTypeSampler(TestCase): def _...
43.983871
93
0.660249
39aaf3aa1c0dbb2d5089b9f602bbf35e162f4bcf
6,055
py
Python
ykman/pcsc/__init__.py
pavel-petrenko/yubikey-manager
f31a3ec3918d9d977b139a8403c014268ab3f836
[ "BSD-2-Clause" ]
513
2016-08-05T23:12:33.000Z
2022-03-31T05:05:40.000Z
ykman/pcsc/__init__.py
pavel-petrenko/yubikey-manager
f31a3ec3918d9d977b139a8403c014268ab3f836
[ "BSD-2-Clause" ]
339
2016-08-16T06:43:22.000Z
2022-03-24T13:57:19.000Z
ykman/pcsc/__init__.py
pavel-petrenko/yubikey-manager
f31a3ec3918d9d977b139a8403c014268ab3f836
[ "BSD-2-Clause" ]
106
2016-09-08T08:12:25.000Z
2022-03-31T11:42:35.000Z
# Copyright (c) 2020 Yubico AB # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditi...
36.041667
87
0.691825
0c647a1a2c65df7de2e192a38d4780b9095ff3b5
1,042
py
Python
ext_auth/migrations/0001_initial.py
cychongaspevo/ext-auth
9f2a5b3f5df83aea6c36d633c345a8c978f557ed
[ "BSD-3-Clause" ]
1
2019-06-28T15:06:56.000Z
2019-06-28T15:06:56.000Z
ext_auth/migrations/0001_initial.py
cychongaspevo/ext-auth
9f2a5b3f5df83aea6c36d633c345a8c978f557ed
[ "BSD-3-Clause" ]
null
null
null
ext_auth/migrations/0001_initial.py
cychongaspevo/ext-auth
9f2a5b3f5df83aea6c36d633c345a8c978f557ed
[ "BSD-3-Clause" ]
null
null
null
# Generated by Django 2.0.5 on 2018-05-26 02:43 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
35.931034
123
0.639155
9799de387f84194e6bfee0fbb58df50391842972
1,001
py
Python
nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/lsn/__init__.py
culbertm/NSttyPython
ff9f6aedae3fb8495342cd0fc4247c819cf47397
[ "Apache-2.0" ]
null
null
null
nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/lsn/__init__.py
culbertm/NSttyPython
ff9f6aedae3fb8495342cd0fc4247c819cf47397
[ "Apache-2.0" ]
null
null
null
nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/lsn/__init__.py
culbertm/NSttyPython
ff9f6aedae3fb8495342cd0fc4247c819cf47397
[ "Apache-2.0" ]
null
null
null
__all__ = ['lsnappsprofile', 'lsnappsprofile_binding', 'lsnappsprofile_port_binding', 'lsnclient', 'lsnclient_binding', 'lsnclient_network6_binding', 'lsnclient_network_binding', 'lsnclient_nsacl6_binding', 'lsnclient_nsacl_binding', 'lsndeterministicnat', 'lsngroup', 'lsngroup_binding', 'lsngroup_lsnappsprofile_bindin...
1,001
1,001
0.841159
52d79b7846c4e618e25a785c9fc5f6be1fd3a3be
1,207
py
Python
pyprobml-master/figgen/daft/multi-obj-tracker-gen.py
storopoli/Machine-Learning-Probalistic
f8617e7b81f4d6c71e72edc40ba11ac746794a95
[ "MIT" ]
1
2019-05-07T12:40:01.000Z
2019-05-07T12:40:01.000Z
Old/figgen/daft/multi-obj-tracker-gen.py
tywang89/pyprobml
82cfdcb8daea653cda8f77e8737e585418476ca7
[ "MIT" ]
null
null
null
Old/figgen/daft/multi-obj-tracker-gen.py
tywang89/pyprobml
82cfdcb8daea653cda8f77e8737e585418476ca7
[ "MIT" ]
null
null
null
import os import imp import daft #daft = imp.load_source('daft', 'daft-080308/daft.py') pgm = daft.PGM([9, 6], origin=[0, 0], observed_style="inner") pgm.add_node(daft.Node("Z1", r"$Z_1$", 2, 5)) pgm.add_node(daft.Node("Z2", r"$Z_2$", 3, 5)) pgm.add_node(daft.Node("Z3", r"$Z_3$", 4, 5)) pgm.add_node(daft.Node("F", r...
29.439024
64
0.616404
2174f4fe8bf83f8cd3fc0fec81ee0a147d3547cd
388
py
Python
deepnlpf/templates/schema.py
deepnlpf/deepnlpf
6508ab1e8fd395575d606ee20223f25591541e25
[ "Apache-2.0" ]
3
2020-04-11T14:12:45.000Z
2020-05-30T16:31:06.000Z
deepnlpf/templates/schema.py
deepnlpf/deepnlpf
6508ab1e8fd395575d606ee20223f25591541e25
[ "Apache-2.0" ]
34
2020-03-20T19:36:40.000Z
2022-03-20T13:00:32.000Z
deepnlpf/templates/schema.py
deepnlpf/deepnlpf
6508ab1e8fd395575d606ee20223f25591541e25
[ "Apache-2.0" ]
1
2020-09-05T06:44:15.000Z
2020-09-05T06:44:15.000Z
import sys from jsonschema import validate SCHEMA_OUPUT_PLUGIN = { "type": "array", "properties": { "_id": {"type": "number"}, "text": {"type": "string"}, "annotation": {"type": "array"}, }, } def validate_annotation(doc_annotated): result = validate(instance=doc_annotated, sc...
22.823529
73
0.608247
6131c1bcc2c7206e18f6c3cd6e2f38bd477f63df
2,826
py
Python
resources/auth.py
digipointtku/respa
a529e0df4d3f072df7801adb5bf97a5f4abd1243
[ "MIT" ]
1
2019-12-17T10:02:17.000Z
2019-12-17T10:02:17.000Z
resources/auth.py
digipointtku/respa
a529e0df4d3f072df7801adb5bf97a5f4abd1243
[ "MIT" ]
12
2019-11-06T07:53:27.000Z
2019-12-18T06:14:47.000Z
resources/auth.py
digipointtku/respa
a529e0df4d3f072df7801adb5bf97a5f4abd1243
[ "MIT" ]
null
null
null
from django.contrib.auth.models import AnonymousUser from .enums import UnitGroupAuthorizationLevel, UnitAuthorizationLevel def is_authenticated_user(user): return bool(user and user.is_authenticated) def is_superuser(user): return is_authenticated_user(user) and user.is_superuser def is_general_admin(user...
31.4
130
0.722222
8346717c15fd901ec30bbb8cbdb13afdeea62de1
4,304
py
Python
cli/transaction/cli.py
Remmeauth/remme-core-cli
94cc09fe9d2e718b45273dde68d6c672c4773f6a
[ "MIT" ]
null
null
null
cli/transaction/cli.py
Remmeauth/remme-core-cli
94cc09fe9d2e718b45273dde68d6c672c4773f6a
[ "MIT" ]
94
2019-03-27T09:34:28.000Z
2019-08-27T05:32:33.000Z
cli/transaction/cli.py
Remmeauth/remme-core-cli
94cc09fe9d2e718b45273dde68d6c672c4773f6a
[ "MIT" ]
6
2019-06-06T15:16:38.000Z
2020-02-24T12:55:55.000Z
""" Provide implementation of the command line interface's transaction commands. """ import sys import click from remme import Remme from cli.constants import ( FAILED_EXIT_FROM_COMMAND_CODE, NODE_URL_ARGUMENT_HELP_MESSAGE, ) from cli.transaction.forms import ( GetTransactionForm, GetTransactionsListF...
33.107692
118
0.72421
295f8f87267b02d010664f5731c6a6943d6607f4
7,730
py
Python
Pando/scripts/CheckPropsDoc.py
jjzhang166/Pando
ab9b37eeaefdd6ee06b38b590e1fa60912e7aca9
[ "FSFAP" ]
null
null
null
Pando/scripts/CheckPropsDoc.py
jjzhang166/Pando
ab9b37eeaefdd6ee06b38b590e1fa60912e7aca9
[ "FSFAP" ]
null
null
null
Pando/scripts/CheckPropsDoc.py
jjzhang166/Pando
ab9b37eeaefdd6ee06b38b590e1fa60912e7aca9
[ "FSFAP" ]
null
null
null
#!/usr/bin/env python # CheckMentioned.py # Find all the properties used in SciTE source files and check if they # are mentioned in scite/doc/SciTEDoc.html. # Requires Python 2.5 or later import os import string import stat srcRoot = "../../scite" srcDir = os.path.join(srcRoot, "src") docFileName = os.path.join(srcRo...
28.951311
99
0.695343
f13b0ac487b11d508136f59041890b299ff137b5
30,596
py
Python
mne/minimum_norm/time_frequency.py
rhotter/mne-python
f0ced56fadb369f2542c801d60c4472b2f545721
[ "BSD-3-Clause" ]
1
2021-11-15T06:11:51.000Z
2021-11-15T06:11:51.000Z
mne/minimum_norm/time_frequency.py
rhotter/mne-python
f0ced56fadb369f2542c801d60c4472b2f545721
[ "BSD-3-Clause" ]
null
null
null
mne/minimum_norm/time_frequency.py
rhotter/mne-python
f0ced56fadb369f2542c801d60c4472b2f545721
[ "BSD-3-Clause" ]
null
null
null
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # # License: BSD (3-clause) import numpy as np from scipy import linalg from ..epochs import Epochs, make_fixed_length_events from ..evoked import EvokedArray from ..io.constants import FIFF from ..io.pi...
38.680152
86
0.609655
3f2938476c00b8f07495feb8dd9c09442c3fe1fc
16,323
py
Python
src/DevServer/ExtractMidiTrainingData.py
Voice-First-AI/generative-music-watson
e666f64602baab2e35a66c0a5c4389b1bd5666c9
[ "Apache-2.0" ]
null
null
null
src/DevServer/ExtractMidiTrainingData.py
Voice-First-AI/generative-music-watson
e666f64602baab2e35a66c0a5c4389b1bd5666c9
[ "Apache-2.0" ]
null
null
null
src/DevServer/ExtractMidiTrainingData.py
Voice-First-AI/generative-music-watson
e666f64602baab2e35a66c0a5c4389b1bd5666c9
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function import re import os import sys import copy import random import collections import MusicTheory class MidiTrainingData : def __init__ ( self, midiDumpFile ) : self.resolution = 0 self.readDumpFile ( midiDumpFile ) #self.pr...
40.8075
283
0.437052
dba2804dc504f11f4f03ef2a35f28b2339ad92b9
206
py
Python
downloader/util.py
andre487/downloader487
687c0177019d27990b7b29a2b98af360558e8ca4
[ "MIT" ]
null
null
null
downloader/util.py
andre487/downloader487
687c0177019d27990b7b29a2b98af360558e8ca4
[ "MIT" ]
null
null
null
downloader/util.py
andre487/downloader487
687c0177019d27990b7b29a2b98af360558e8ca4
[ "MIT" ]
null
null
null
import os def get_secret_value(env_var: str, file_path: str) -> str: if env_val := os.getenv(env_var): return env_val.strip() with open(file_path) as fp: return fp.read().strip()
20.6
58
0.640777
378878fffdbda0907562247468ec860be45eaed3
354
py
Python
setup.py
Mehralian/Parsivar
db07e512fad9e30238a0ecf4ca67f75a8777327b
[ "MIT" ]
null
null
null
setup.py
Mehralian/Parsivar
db07e512fad9e30238a0ecf4ca67f75a8777327b
[ "MIT" ]
null
null
null
setup.py
Mehralian/Parsivar
db07e512fad9e30238a0ecf4ca67f75a8777327b
[ "MIT" ]
null
null
null
from setuptools import setup setup(name='parsivar', packages=['parsivar'], version='0.2.4', description='Python library for preprocessing Persian text.', author='ICT', author_email='', url='', download_url = '', install_requires=['nltk==3.4.5'], python_requires=">=3.3", classifiers = [], ...
22.125
64
0.649718
0503ee43d54ab8e7bc86b52a76ba935e7e6f6b1c
1,438
py
Python
math/integrals.py
PawelBalawender/misc
cb8e2fc2cfd3ecef0ae4cbcb6bc9eedb0349c09b
[ "MIT" ]
null
null
null
math/integrals.py
PawelBalawender/misc
cb8e2fc2cfd3ecef0ae4cbcb6bc9eedb0349c09b
[ "MIT" ]
null
null
null
math/integrals.py
PawelBalawender/misc
cb8e2fc2cfd3ecef0ae4cbcb6bc9eedb0349c09b
[ "MIT" ]
null
null
null
""" int_{0}^{pi/2} sin^2(x) dx Calculate this integral numerically, using the trapezoidal rule int_{0}^{1/pi} sin(1/x) dx Calculate this integral numerically, using the Gaussian quadrature method """ from math import sin, pi import numpy as np def integral_trapezoidal_rule(f, a: float, b: float, n: int) -> float: ...
25.22807
75
0.593185
e4797353ecdea79b5e7a7af11e2cfead8144921b
68,571
py
Python
test/template_ipsec.py
goldenrye/vpp
0eeca90e864bd900e1e1964518524d731aee4279
[ "Apache-2.0" ]
null
null
null
test/template_ipsec.py
goldenrye/vpp
0eeca90e864bd900e1e1964518524d731aee4279
[ "Apache-2.0" ]
null
null
null
test/template_ipsec.py
goldenrye/vpp
0eeca90e864bd900e1e1964518524d731aee4279
[ "Apache-2.0" ]
null
null
null
import unittest import socket import struct from scapy.layers.inet import IP, ICMP, TCP, UDP from scapy.layers.ipsec import SecurityAssociation, ESP from scapy.layers.l2 import Ether from scapy.packet import raw, Raw from scapy.layers.inet6 import IPv6, ICMPv6EchoRequest, IPv6ExtHdrHopByHop, \ IPv6ExtHdrFragment, ...
43.509518
79
0.528255