hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
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
247
max_issues_repo_name
stringlengths
4
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
4
247
max_forks_repo_name
stringlengths
4
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
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
faac24cf431579bec22a2a840c0759c39b7237d8
2,445
py
Python
tests/test_hebrew_python.py
matan-h/hebrew-python
28e6ab2d14fcada9ffe228660f47ef2af244ab2a
[ "BSD-4-Clause" ]
1
2021-11-11T05:17:21.000Z
2021-11-11T05:17:21.000Z
tests/test_hebrew_python.py
matan-h/hebrew-python
28e6ab2d14fcada9ffe228660f47ef2af244ab2a
[ "BSD-4-Clause" ]
1
2021-12-27T00:39:20.000Z
2021-12-27T00:39:20.000Z
tests/test_hebrew_python.py
matan-h/hebrew-python
28e6ab2d14fcada9ffe228660f47ef2af244ab2a
[ "BSD-4-Clause" ]
null
null
null
import sys import unittest # for debug the test: true_stdout = sys.stdout true_stderr = sys.stderr DEBUG = False if DEBUG: from ddebug import dd dd.add_output_folder(with_errors=False) try: import friendly_traceback except ImportError: friendly_traceback = None if __name__ == '__main__': unitte...
27.47191
91
0.610634
import builtins import sys import unittest import hebrew_python.hook as hepy from io import StringIO from contextlib import contextmanager import re # for debug the test: true_stdout = sys.stdout true_stderr = sys.stderr DEBUG = False if DEBUG: from ddebug import dd dd.add_output_folder(with_errors=False) tr...
92
309
0
1,591
0
0
0
12
157
cac639136f54f0b421674840cca71ea62ce9f26d
1,176
py
Python
Q01__/46_LRU_Cache/Solution.py
hsclinical/leetcode
48a57f6a5d5745199c5685cd2c8f5c4fa293e54a
[ "Apache-2.0" ]
null
null
null
Q01__/46_LRU_Cache/Solution.py
hsclinical/leetcode
48a57f6a5d5745199c5685cd2c8f5c4fa293e54a
[ "Apache-2.0" ]
null
null
null
Q01__/46_LRU_Cache/Solution.py
hsclinical/leetcode
48a57f6a5d5745199c5685cd2c8f5c4fa293e54a
[ "Apache-2.0" ]
null
null
null
# Your LRUCache object will be instantiated and called as such: # obj = LRUCache(capacity) # param_1 = obj.get(key) # obj.put(key,value)
33.6
64
0.517857
class LRUCache: def __init__(self, capacity: int): self.dataDict = {} self.dataList = [] self.capacity = capacity def get(self, key: int) -> int: if key in self.dataList: index = self.dataList.index(key) if index != len(self.dataList) - 1: ...
0
0
0
1,012
0
0
0
0
23
32d3f498b5b97c7424f3051a49ccac8f836f7aca
4,115
py
Python
astrom/kmtn-astrometry/kmtn_astrom.py
changsuchoi/cspy
9fa8f125bed368f636ea19180e742f8304bbc432
[ "MIT" ]
null
null
null
astrom/kmtn-astrometry/kmtn_astrom.py
changsuchoi/cspy
9fa8f125bed368f636ea19180e742f8304bbc432
[ "MIT" ]
null
null
null
astrom/kmtn-astrometry/kmtn_astrom.py
changsuchoi/cspy
9fa8f125bed368f636ea19180e742f8304bbc432
[ "MIT" ]
null
null
null
# python code for KMTNET data astrometry (specially CTIO data) # read kmtnet_astrom.txt first to understand the order and process # 2015.09.17 Changsu Choi from astropy.io import ascii import os import astropy.units as u import astropy.coordinates as coord import astropy.units as u #os.system('gethead kmtc.20150218...
30.708955
380
0.72661
# python code for KMTNET data astrometry (specially CTIO data) # read kmtnet_astrom.txt first to understand the order and process # 2015.09.17 Changsu Choi from astropy.io import ascii import numpy as np import os,sys from astropy.io import fits import astropy.units as u import astropy.coordinates as coord import ast...
0
0
0
0
0
1,952
0
-9
134
da23ddba88a387143815bdc7741f07171f29808d
823
py
Python
sksurgeryspeech/ui/sksurgeryspeech_command_line.py
UCL/scikit-surgeryspeech
4a2dcec3df98969a95863dc91fb5caaeb2d4a238
[ "BSD-3-Clause" ]
null
null
null
sksurgeryspeech/ui/sksurgeryspeech_command_line.py
UCL/scikit-surgeryspeech
4a2dcec3df98969a95863dc91fb5caaeb2d4a238
[ "BSD-3-Clause" ]
23
2020-06-15T11:06:17.000Z
2020-12-01T14:41:44.000Z
sksurgeryspeech/ui/sksurgeryspeech_command_line.py
SciKit-Surgery/scikit-surgeryspeech
4a2dcec3df98969a95863dc91fb5caaeb2d4a238
[ "BSD-3-Clause" ]
null
null
null
# coding=utf-8 """Command line processing""" import argparse from sksurgeryspeech import __version__ from sksurgeryspeech.ui import sksurgeryspeech_demo def main(args=None): """Entry point for scikit-surgeryspeech application""" parser = argparse.ArgumentParser(description='scikit-surgeryspeech') ver...
24.939394
77
0.708384
# coding=utf-8 """Command line processing""" import argparse from sksurgeryspeech import __version__ from sksurgeryspeech.ui import sksurgeryspeech_demo def main(args=None): """Entry point for scikit-surgeryspeech application""" parser = argparse.ArgumentParser(description='scikit-surgeryspeech') ver...
0
0
0
0
0
0
0
0
0
b5579edae01fcdc963d77a96b7ec45ad274f61de
4,862
py
Python
scripts/pytorch_wrapper.py
JLivingston01/py_research
928f74287039a933d27c5a5dc3df8db4cb79c152
[ "MIT" ]
1
2022-02-21T00:47:41.000Z
2022-02-21T00:47:41.000Z
scripts/pytorch_wrapper.py
JLivingston01/py_research
928f74287039a933d27c5a5dc3df8db4cb79c152
[ "MIT" ]
null
null
null
scripts/pytorch_wrapper.py
JLivingston01/py_research
928f74287039a933d27c5a5dc3df8db4cb79c152
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import torch from torch import nn X = np.random.normal(5,2,(10000,30)) Y = X@np.random.normal(1,2,30) model = NeuralNetwork( configuration= nn.Sequential( nn.Linear(30,10), nn.Sigmoid(), nn.Linear(10,1) ...
24.31
78
0.569724
import numpy as np import pandas as pd import torch from torch import nn from torch.utils.data import TensorDataset,DataLoader class NeuralNetwork(nn.Module): def __init__(self, configuration, loss_fn, optimizer, lr, batch_s...
0
0
0
2,344
0
0
0
32
45
b56b84899f7a80aac99a7d6d79d83e0d3df834a8
958
py
Python
scraper/storage_spiders/kkfashionvn.py
chongiadung/choinho
d2a216fe7a5064d73cdee3e928a7beef7f511fd1
[ "MIT" ]
null
null
null
scraper/storage_spiders/kkfashionvn.py
chongiadung/choinho
d2a216fe7a5064d73cdee3e928a7beef7f511fd1
[ "MIT" ]
10
2020-02-11T23:34:28.000Z
2022-03-11T23:16:12.000Z
scraper/storage_spiders/kkfashionvn.py
chongiadung/choinho
d2a216fe7a5064d73cdee3e928a7beef7f511fd1
[ "MIT" ]
3
2018-08-05T14:54:25.000Z
2021-06-07T01:49:59.000Z
# Auto generated by generator.py. Delete this line if you make modification. from scrapy.spiders import Rule from scrapy.linkextractors import LinkExtractor XPATH = { 'name' : "//div[@class='mo-ta']/p[1]", 'price' : "//span[@class='item_price']", 'category' : "//div[@class='tieu-de']/h1/a", 'descriptio...
35.481481
111
0.609603
# Auto generated by generator.py. Delete this line if you make modification. from scrapy.spiders import Rule from scrapy.linkextractors import LinkExtractor XPATH = { 'name' : "//div[@class='mo-ta']/p[1]", 'price' : "//span[@class='item_price']", 'category' : "//div[@class='tieu-de']/h1/a", 'descriptio...
0
0
0
0
0
0
0
0
0
209e7d84d4d078f6bb157ff3081913b22bb20177
835
py
Python
Python/benchmarking/struct_deserialization.py
felixbinder/tdw
eb2b00b74b9fcf8ef2dcba1baa62424640c520b1
[ "BSD-2-Clause" ]
307
2020-05-20T18:08:49.000Z
2022-03-21T19:55:08.000Z
Python/benchmarking/struct_deserialization.py
felixbinder/tdw
eb2b00b74b9fcf8ef2dcba1baa62424640c520b1
[ "BSD-2-Clause" ]
92
2020-07-21T18:29:13.000Z
2022-03-28T07:25:54.000Z
Python/benchmarking/struct_deserialization.py
felixbinder/tdw
eb2b00b74b9fcf8ef2dcba1baa62424640c520b1
[ "BSD-2-Clause" ]
53
2020-07-14T15:55:17.000Z
2022-03-20T16:20:01.000Z
from time import time from tdw.controller import Controller from tdw.tdw_utils import TDWUtils """ Benchmark the speed of deserializing structs (such as Vector3 and Quaternion). """ if __name__ == "__main__": o_id = 0 cmds = [{"$type": "teleport_object", "position": {"x": 0, "y": 0, "z": 0}, ...
26.935484
78
0.553293
from time import time from tdw.controller import Controller from tdw.tdw_utils import TDWUtils """ Benchmark the speed of deserializing structs (such as Vector3 and Quaternion). """ if __name__ == "__main__": o_id = 0 cmds = [{"$type": "teleport_object", "position": {"x": 0, "y": 0, "z": 0}, ...
0
0
0
0
0
0
0
0
0
f356fa4c071df3368258b586764b644585a00714
141
py
Python
exercises/en/exc_01_03.py
kaseyhackspace/eng-course-sample
0dd3821f34b9111eb4de8f0f24b7516061407caf
[ "MIT" ]
null
null
null
exercises/en/exc_01_03.py
kaseyhackspace/eng-course-sample
0dd3821f34b9111eb4de8f0f24b7516061407caf
[ "MIT" ]
null
null
null
exercises/en/exc_01_03.py
kaseyhackspace/eng-course-sample
0dd3821f34b9111eb4de8f0f24b7516061407caf
[ "MIT" ]
null
null
null
import numpy as np q=__ l=__ x = np.linspace(0,l,__) M = q/2*(l*x-x**2) V = q*(1/2-x) print("Moment") print(__) print("Shear") print(__)
10.071429
23
0.588652
import numpy as np q=__ l=__ x = np.linspace(0,l,__) M = q/2*(l*x-x**2) V = q*(1/2-x) print("Moment") print(__) print("Shear") print(__)
0
0
0
0
0
0
0
0
0
d74b5019d83c90d0f1d6c091d0a5982297146bcc
350
py
Python
SomeCode/Fibonacci_Sequence/fib_recursive.py
arthxvr/coding--python
1e91707be6cb8fef816dad0c1a65f2cc3327357e
[ "MIT" ]
null
null
null
SomeCode/Fibonacci_Sequence/fib_recursive.py
arthxvr/coding--python
1e91707be6cb8fef816dad0c1a65f2cc3327357e
[ "MIT" ]
null
null
null
SomeCode/Fibonacci_Sequence/fib_recursive.py
arthxvr/coding--python
1e91707be6cb8fef816dad0c1a65f2cc3327357e
[ "MIT" ]
null
null
null
for c in range(1, 50): print(c, ":", fibonacci(c))
23.333333
52
0.52
def fibonacci(n): if type(n) != int: raise TypeError('n must be a positive int') if n < 1: raise ValueError('n must be a positive int') if n == 1: return 1 elif n == 2: return 2 elif n > 2: return fibonacci(n - 1) + fibonacci(n - 2) for c in range(1, 50): ...
0
0
0
0
0
272
0
0
22
4a8e25813b907a40feaa1559a5f471ab13c22d1f
3,194
py
Python
experiments-tosem/rq1.py
testingautomated-usi/DeepHyperion
698e27cdea7581055de0d5f02d0585053452ac8f
[ "MIT" ]
5
2021-04-28T09:35:44.000Z
2021-09-10T18:18:08.000Z
experiments-tosem/rq1.py
testingautomated-usi/DeepHyperion
698e27cdea7581055de0d5f02d0585053452ac8f
[ "MIT" ]
null
null
null
experiments-tosem/rq1.py
testingautomated-usi/DeepHyperion
698e27cdea7581055de0d5f02d0585053452ac8f
[ "MIT" ]
2
2021-04-26T12:46:44.000Z
2021-09-16T08:27:53.000Z
# # This is the code for plotting the figures for RQ1. It is optimized towards plotting exactly those figures # Use data_analysis.py for explorative data analysis # import matplotlib matplotlib.rcParams['pdf.fonttype'] = 42 matplotlib.rcParams['ps.fonttype'] = 42 if __name__ == "__main__": main()
38.95122
114
0.716969
# # This is the code for plotting the figures for RQ1. It is optimized towards plotting exactly those figures # Use data_analysis.py for explorative data analysis # import matplotlib matplotlib.rcParams['pdf.fonttype'] = 42 matplotlib.rcParams['ps.fonttype'] = 42 from plotting_utils import load_data_from_folder, creat...
0
0
0
0
0
2,649
0
150
91
682b75ede6c09c1b14fd7011e3d65b73f93372df
1,556
py
Python
example/telegrambot.py
Nachtalb/django-telegrambot
55aa2683e7453d7c65701fecdfcd029e86f34b7d
[ "BSD-3-Clause" ]
245
2016-01-26T16:24:41.000Z
2022-03-07T08:00:36.000Z
example/telegrambot.py
Nachtalb/django-telegrambot
55aa2683e7453d7c65701fecdfcd029e86f34b7d
[ "BSD-3-Clause" ]
49
2016-09-17T02:26:50.000Z
2021-12-20T06:53:19.000Z
example/telegrambot.py
Nachtalb/django-telegrambot
55aa2683e7453d7c65701fecdfcd029e86f34b7d
[ "BSD-3-Clause" ]
97
2016-04-17T22:05:19.000Z
2022-03-24T11:04:48.000Z
# -*- coding: utf-8 -*- # Example code for telegrambot.py module import logging logger = logging.getLogger(__name__) # Define a few command handlers. These usually take the two arguments bot and # update. Error handlers also receive the raised TelegramError object in error.
31.12
91
0.726864
# -*- coding: utf-8 -*- # Example code for telegrambot.py module from telegram.ext import CommandHandler, MessageHandler, Filters from django_telegrambot.apps import DjangoTelegramBot import logging logger = logging.getLogger(__name__) # Define a few command handlers. These usually take the two arguments bot and # u...
0
0
0
0
0
1,036
0
75
158
0332766a058a8145c7c4f524085c8c21f3bf51b0
1,558
py
Python
core/face_alignment.py
zhaipro/yry
81587179b40fafeb6c24ef58489c59061f7368ce
[ "Apache-2.0" ]
null
null
null
core/face_alignment.py
zhaipro/yry
81587179b40fafeb6c24ef58489c59061f7368ce
[ "Apache-2.0" ]
null
null
null
core/face_alignment.py
zhaipro/yry
81587179b40fafeb6c24ef58489c59061f7368ce
[ "Apache-2.0" ]
null
null
null
import os from pathlib import Path root_path = Path(__file__).parent landmarks_model_path = os.path.join(root_path, 'shape_predictor_68_face_landmarks.dat') landmarks_detector = LandmarksDetector(landmarks_model_path)
43.277778
130
0.595635
import os import dlib from pathlib import Path root_path = Path(__file__).parent class LandmarksDetector: def __init__(self, predictor_model_path): """ :param predictor_model_path: path to shape_predictor_68_face_landmarks.dat file """ self.detector = dlib.get_frontal_fa...
0
0
0
1,291
0
0
0
-10
48
6154f32c6c3c7577ec90b8c0271ec0cf22620436
4,210
py
Python
app/paper/paperSigma/CONUS_map.py
fkwai/geolearn
30cb4353d22af5020a48100d07ab04f465a315b0
[ "MIT" ]
null
null
null
app/paper/paperSigma/CONUS_map.py
fkwai/geolearn
30cb4353d22af5020a48100d07ab04f465a315b0
[ "MIT" ]
null
null
null
app/paper/paperSigma/CONUS_map.py
fkwai/geolearn
30cb4353d22af5020a48100d07ab04f465a315b0
[ "MIT" ]
2
2021-04-04T02:45:59.000Z
2022-03-19T09:41:39.000Z
import os import rnnSMAP import matplotlib import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import imp imp.reload(rnnSMAP) rnnSMAP.reload() figTitleLst = ['Temporal Test', 'Spatial Test'] figNameLst = ['temporal', 'spatial'] matplotlib.rcParams.update({'font.size': 14}) matplotlib.rcParams.upda...
32.635659
77
0.587648
import os import rnnSMAP import matplotlib import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import imp imp.reload(rnnSMAP) rnnSMAP.reload() figTitleLst = ['Temporal Test', 'Spatial Test'] figNameLst = ['temporal', 'spatial'] matplotlib.rcParams.update({'font.size': 14}) matplotlib.rcParams.upda...
0
0
0
0
0
0
0
0
0
e3e55584798ccf7f1581a3f462a9c39c61dee078
15,483
py
Python
src/crosswalks/make_crosswalk.py
jujiang526/mta
d8f01cb6ab1cfd74109937c7ac4d2a8ae8be6084
[ "Apache-2.0" ]
14
2020-06-12T00:22:29.000Z
2022-03-20T07:46:28.000Z
src/crosswalks/make_crosswalk.py
jujiang526/mta
d8f01cb6ab1cfd74109937c7ac4d2a8ae8be6084
[ "Apache-2.0" ]
4
2020-08-07T18:20:24.000Z
2022-02-08T15:43:55.000Z
src/crosswalks/make_crosswalk.py
jujiang526/mta
d8f01cb6ab1cfd74109937c7ac4d2a8ae8be6084
[ "Apache-2.0" ]
3
2020-07-03T15:41:22.000Z
2021-09-26T19:24:45.000Z
if __name__ == "__main__": main()
59.779923
182
0.613835
import pandas as pd import geopandas as gpd import re import textdistance import numpy as np import math def make_ordinal(s): ordinal = lambda n: "%d%s" % (n,"tsnrhtdd"[(math.floor(n/10)%10!=1)*(n%10<4)*n%10::4]) name_ord = [] for x in s: x = x.title() m = re.findall(r'\d+', x) ...
0
0
0
0
0
15,293
0
-27
178
0ba651c21a66e26b88a2cb551112680207e27de1
91
py
Python
setup.py
wtnb75/tarjinja
f6ac83d8bde0f476274002ba01d7709568f9a529
[ "MIT" ]
3
2021-06-05T22:55:25.000Z
2022-01-23T11:48:21.000Z
setup.py
wtnb75/tarjinja
f6ac83d8bde0f476274002ba01d7709568f9a529
[ "MIT" ]
6
2020-11-29T16:52:58.000Z
2020-12-01T21:51:58.000Z
setup.py
wtnb75/tarjinja
f6ac83d8bde0f476274002ba01d7709568f9a529
[ "MIT" ]
null
null
null
from setuptools import setup setup(install_requires=open("requirements.txt").readlines())
22.75
60
0.813187
from setuptools import setup setup(install_requires=open("requirements.txt").readlines())
0
0
0
0
0
0
0
0
0
db88f9801fb7811f0a3219bfa14db8d66420f6dc
35,685
py
Python
sip-4.19.21/configure.py
Clynie/StockSpider-1
4d3bec01f581c4c8dd45af668ce8aab4c98685ba
[ "MIT" ]
null
null
null
sip-4.19.21/configure.py
Clynie/StockSpider-1
4d3bec01f581c4c8dd45af668ce8aab4c98685ba
[ "MIT" ]
null
null
null
sip-4.19.21/configure.py
Clynie/StockSpider-1
4d3bec01f581c4c8dd45af668ce8aab4c98685ba
[ "MIT" ]
null
null
null
# This script handles the SIP configuration and generates the Makefiles. # # Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com> # # This file is part of SIP. # # This copy of SIP is licensed for use under the terms of the SIP License # Agreement. See the file LICENSE for more details. # # Thi...
34.148325
151
0.612414
# This script handles the SIP configuration and generates the Makefiles. # # Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com> # # This file is part of SIP. # # This copy of SIP is licensed for use under the terms of the SIP License # Agreement. See the file LICENSE for more details. # # Thi...
0
0
0
0
0
916
0
0
137
ea27b8518a7a50aa30fef48f4dcfe22e4fa2434b
908
py
Python
stix2matcher/test/test_object_path_quoting.py
clslgrnc/cti-pattern-matcher
bcd37eeb8c44e012ff1dbe4434c510f343575840
[ "BSD-3-Clause" ]
32
2017-02-22T14:54:01.000Z
2022-02-21T09:10:02.000Z
stix2matcher/test/test_object_path_quoting.py
clslgrnc/cti-pattern-matcher
bcd37eeb8c44e012ff1dbe4434c510f343575840
[ "BSD-3-Clause" ]
44
2016-11-03T21:41:53.000Z
2022-03-30T15:22:23.000Z
stix2matcher/test/test_object_path_quoting.py
clslgrnc/cti-pattern-matcher
bcd37eeb8c44e012ff1dbe4434c510f343575840
[ "BSD-3-Clause" ]
23
2016-11-07T19:03:13.000Z
2021-06-10T10:12:36.000Z
_observations = [ { "type": "observed-data", "first_observed": "2004-10-11T21:44:58Z", "last_observed": "2004-10-11T21:44:58Z", "number_observed": 1, "objects": { "0": { "type": u"some-type", "has-hyphen": 1, "has.d...
23.282051
49
0.562775
import pytest from stix2patterns.pattern import ParseException from stix2matcher.matcher import match _observations = [ { "type": "observed-data", "first_observed": "2004-10-11T21:44:58Z", "last_observed": "2004-10-11T21:44:58Z", "number_observed": 1, "objects": { ...
0
360
0
0
0
0
0
36
113
6f77ee6c621798575aa325b96f73f4cb76819cbc
987
py
Python
GitRangerLiu/0002/store_reldb.py
saurabh896/python-1
f8d3aedf4c0fe6e24dfa3269ea7e642c9f7dd9b7
[ "MIT" ]
3,976
2015-01-01T15:49:39.000Z
2022-03-31T03:47:56.000Z
GitRangerLiu/0002/store_reldb.py
dwh65416396/python
1a7e3edd1cd3422cc0eaa55471a0b42e004a9a1a
[ "MIT" ]
97
2015-01-11T02:59:46.000Z
2022-03-16T14:01:56.000Z
GitRangerLiu/0002/store_reldb.py
dwh65416396/python
1a7e3edd1cd3422cc0eaa55471a0b42e004a9a1a
[ "MIT" ]
3,533
2015-01-01T06:19:30.000Z
2022-03-28T13:14:54.000Z
#reference: https://www.tutorialspoint.com/python/python_database_access.htm if __name__ == '__main__': store_reldb()
25.973684
79
0.570415
#reference: https://www.tutorialspoint.com/python/python_database_access.htm import MySQLdb as mysqldb def store_reldb(): db = mysqldb.connect(host = 'localhost', user = 'chris', passwd = '1314', \ db = 'show_me_the_code') cursor = db.cursor() #Create a table cursor.execute('...
0
0
0
0
0
810
0
4
46
ab5129ded6bb3b79a9f5e6771ecbe5565cc412bb
775
py
Python
examples/simple/routes/get_user.py
nekonoshiri/tiny-router
3bb808bcc9f9eb368ee390179dfc5e9d48cf8600
[ "MIT" ]
null
null
null
examples/simple/routes/get_user.py
nekonoshiri/tiny-router
3bb808bcc9f9eb368ee390179dfc5e9d48cf8600
[ "MIT" ]
null
null
null
examples/simple/routes/get_user.py
nekonoshiri/tiny-router
3bb808bcc9f9eb368ee390179dfc5e9d48cf8600
[ "MIT" ]
null
null
null
from ..router import Router router = Router()
25
76
0.654194
import json from typing import Any, Dict from ..request import Request from ..response import Response from ..router import Router router = Router() @router.get("/users/{user_id}") def get_user(request: Request) -> Response: user_id = request.path_parameters.get("user_id") if not user_id: return Re...
0
390
0
0
0
186
0
15
135
c32d8594788213d0081bff4ce0cd3bedd23da94d
350
py
Python
E033/main.py
alperkonuralp/AlperIlePython
64e4940648a74306951dbfd97b593cfbcd94b7f6
[ "Apache-2.0" ]
1
2021-01-30T16:50:40.000Z
2021-01-30T16:50:40.000Z
E033/main.py
alperkonuralp/AlperIlePython
64e4940648a74306951dbfd97b593cfbcd94b7f6
[ "Apache-2.0" ]
null
null
null
E033/main.py
alperkonuralp/AlperIlePython
64e4940648a74306951dbfd97b593cfbcd94b7f6
[ "Apache-2.0" ]
null
null
null
import os filename = os.path.join(os.getcwd(), "data.json") # f = open(filename) with open(filename, mode="w") as f: print("name :", f.name) print("mode :", f.mode) print("buffer :", f.buffer) print("encoding :", f.encoding) print("closed :", f.closed) print("errors :", f.errors) ...
23.333333
50
0.574286
import os filename = os.path.join(os.getcwd(), "data.json") # f = open(filename) with open(filename, mode="w") as f: print("name :", f.name) print("mode :", f.mode) print("buffer :", f.buffer) print("encoding :", f.encoding) print("closed :", f.closed) print("errors :", f.errors) ...
0
0
0
0
0
0
0
0
0
f0884fef8ad8756af5861bcee7d27f5a89b2c466
931
py
Python
setup.py
jmtapio/not-co-logger
2556b874511e583e483d84f1b5bbcec4cb0d74ba
[ "MIT" ]
1
2020-04-23T06:17:11.000Z
2020-04-23T06:17:11.000Z
setup.py
jmtapio/not-co-logger
2556b874511e583e483d84f1b5bbcec4cb0d74ba
[ "MIT" ]
null
null
null
setup.py
jmtapio/not-co-logger
2556b874511e583e483d84f1b5bbcec4cb0d74ba
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from setuptools import setup setup( name='notcologger', version='0.1.2', description='Not CO Logger, a cloud logging library.', long_description= '''This library is aimed at helping produce consistent searchable log entries to stdout in a cloud/container environment.''', k...
30.032258
70
0.649839
#!/usr/bin/env python3 from setuptools import setup setup( name='notcologger', version='0.1.2', description='Not CO Logger, a cloud logging library.', long_description= '''This library is aimed at helping produce consistent searchable log entries to stdout in a cloud/container environment.''', k...
0
0
0
0
0
0
0
0
0
846c34c251c0cbeffeac8f6640cbae570766595b
1,359
py
Python
src/sensai/tensorflow/tf_mlp.py
schroedk/sensAI
a2d6d7c6ab7bed9ccd5eac216dd988c49d69aec7
[ "MIT" ]
10
2020-02-19T09:16:54.000Z
2022-02-04T16:19:33.000Z
src/sensai/tensorflow/tf_mlp.py
schroedk/sensAI
a2d6d7c6ab7bed9ccd5eac216dd988c49d69aec7
[ "MIT" ]
47
2020-03-11T16:26:51.000Z
2022-02-04T15:29:40.000Z
src/sensai/tensorflow/tf_mlp.py
schroedk/sensAI
a2d6d7c6ab7bed9ccd5eac216dd988c49d69aec7
[ "MIT" ]
5
2020-03-12T21:33:22.000Z
2020-12-21T14:43:04.000Z
from .. import normalisation
46.862069
123
0.727005
from tensorflow import keras from .tf_base import KerasVectorRegressionModel from .. import normalisation class KerasMultiLayerPerceptronVectorRegressionModel(KerasVectorRegressionModel): def __init__(self, hiddenDims=(5,5), hiddenActivation="sigmoid", outputActivation="sigmoid", loss="mse", metrics=...
0
0
0
1,226
0
0
0
33
68
06f624c430991a082034d586c733777b98be2ca9
1,998
py
Python
run_scripts/convert_pmg_xsec_db.py
morgenst/PyAnalysisTools
f3b1f89870e7bbae1549c228a56d2c36bbba7af3
[ "MIT" ]
null
null
null
run_scripts/convert_pmg_xsec_db.py
morgenst/PyAnalysisTools
f3b1f89870e7bbae1549c228a56d2c36bbba7af3
[ "MIT" ]
null
null
null
run_scripts/convert_pmg_xsec_db.py
morgenst/PyAnalysisTools
f3b1f89870e7bbae1549c228a56d2c36bbba7af3
[ "MIT" ]
null
null
null
#!/usr/bin/env python from __future__ import print_function import sys if __name__ == '__main__': main(sys.argv[1:])
39.176471
110
0.5996
#!/usr/bin/env python from __future__ import print_function import sys from PyAnalysisTools.base import get_default_argparser, default_init from PyAnalysisTools.base.YAMLHandle import YAMLLoader, YAMLDumper from PyAnalysisTools.AnalysisTools.XSHandle import Dataset def main(argv): parser = get_default_argparse...
0
0
0
0
0
1,653
0
129
90
a2becad7a4561b792574e2f10d402e4cc13be0c4
3,702
py
Python
tests/builder/test_decorator_builder.py
igrek51/nuclear
d610e63ad98143dcc77e77e4ecbdaed9c38c3314
[ "MIT" ]
6
2020-06-24T20:03:06.000Z
2021-09-21T10:05:17.000Z
tests/builder/test_decorator_builder.py
igrek51/nuclear
d610e63ad98143dcc77e77e4ecbdaed9c38c3314
[ "MIT" ]
2
2021-09-19T15:28:02.000Z
2021-09-21T17:29:38.000Z
tests/builder/test_decorator_builder.py
igrek51/nuclear
d610e63ad98143dcc77e77e4ecbdaed9c38c3314
[ "MIT" ]
2
2020-06-24T21:21:35.000Z
2021-08-01T17:24:38.000Z
cli = CliBuilder()
31.109244
86
0.619395
from nuclear import * from nuclear.parser.error import CliDefinitionError from tests.asserts import MockIO, assert_error from functools import reduce import base64 cli = CliBuilder() @cli.add_command('hello') def say_hello(name: str, decode: bool = False, repeat: int = 1): """ Say hello to someone :para...
0
1,305
0
0
0
1,996
0
54
317
9b1e9c8c1bcdcd96a6e85f61e36b49c932bf7d5a
1,083
py
Python
intake/migrations/0064_purgedvisitor.py
cforlando/intake
a5233d5c0f862f28ee265b9b4831405aabeec7e2
[ "MIT" ]
51
2016-07-20T02:26:57.000Z
2021-07-07T14:45:06.000Z
intake/migrations/0064_purgedvisitor.py
enterstudio/intake
793a8935914fdc8356321ec46e54d9ae1eeeee04
[ "MIT" ]
1,091
2016-04-29T18:07:45.000Z
2021-04-19T18:39:39.000Z
intake/migrations/0064_purgedvisitor.py
enterstudio/intake
793a8935914fdc8356321ec46e54d9ae1eeeee04
[ "MIT" ]
24
2016-06-14T18:10:43.000Z
2021-11-14T20:26:39.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-08-22 18:16 from __future__ import unicode_literals
27.075
114
0.493998
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-08-22 18:16 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('intake', '0063_purgedapplication_purgedstatusupdate'), ] operations = [ mig...
0
0
0
904
0
0
0
19
46
41483716ff9a653ae3d2f1df97b42c5f2ab2706f
67
py
Python
files/Factors.py
AjayRajNelapudi/Script-Evaluation-Assistant
200a3fc11e15f22b812c829d133707393be39c23
[ "MIT" ]
1
2018-09-22T10:10:42.000Z
2018-09-22T10:10:42.000Z
files/Factors.py
AjayRajNelapudi/Script-Evaluation-Assistant
200a3fc11e15f22b812c829d133707393be39c23
[ "MIT" ]
1
2018-09-16T14:44:47.000Z
2018-09-16T14:44:47.000Z
files/Factors.py
AjayRajNelapudi/Script-Evaluation-Assistant
200a3fc11e15f22b812c829d133707393be39c23
[ "MIT" ]
3
2018-09-16T14:37:55.000Z
2018-09-30T06:44:49.000Z
n = int(input()) for i in range(0, n+1): if n % i == 0: print(i)
16.75
23
0.507463
n = int(input()) for i in range(0, n+1): if n % i == 0: print(i)
0
0
0
0
0
0
0
0
0
c11ae1d44dda85eca2e9072897484d9f30c150e5
70,518
py
Python
neurallog/network/dataset.py
guimaraes13/NeuralLog
63cca557257ec67905b79048718db385cc4c3aab
[ "Apache-2.0" ]
6
2021-05-04T12:24:17.000Z
2021-07-28T03:20:48.000Z
neurallog/network/dataset.py
guimaraes13/NeuralLog
63cca557257ec67905b79048718db385cc4c3aab
[ "Apache-2.0" ]
null
null
null
neurallog/network/dataset.py
guimaraes13/NeuralLog
63cca557257ec67905b79048718db385cc4c3aab
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Victor Guimares # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
40.181197
80
0.57011
# Copyright 2021 Victor Guimarães # # 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 i...
2
47,552
0
6,439
0
189
0
262
382
ebce24889550988f1b0cf018468119ba1adbce7c
8,754
py
Python
hat/vector_control/migrations/0001_initial.py
ekhalilbsq/iaso
e6400c52aeb4f67ce1ca83b03efa3cb11ef235ee
[ "MIT" ]
29
2020-12-26T07:22:19.000Z
2022-03-07T13:40:09.000Z
hat/vector_control/migrations/0001_initial.py
ekhalilbsq/iaso
e6400c52aeb4f67ce1ca83b03efa3cb11ef235ee
[ "MIT" ]
150
2020-11-09T15:03:27.000Z
2022-03-07T15:36:07.000Z
hat/vector_control/migrations/0001_initial.py
ekhalilbsq/iaso
e6400c52aeb4f67ce1ca83b03efa3cb11ef235ee
[ "MIT" ]
4
2020-11-09T10:38:13.000Z
2021-10-04T09:42:47.000Z
# Generated by Django 2.0 on 2018-12-07 11:05 import django.contrib.postgres.fields import django.contrib.postgres.fields.citext
37.570815
113
0.421407
# Generated by Django 2.0 on 2018-12-07 11:05 from django.conf import settings import django.contrib.postgres.fields import django.contrib.postgres.fields.citext from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): initial = True depen...
0
0
0
8,481
0
0
0
31
112
0c7f8da16f61bced21ebb02151a449d6604c473a
3,447
py
Python
kaivy/windows/virtual_window_title_bar.py
team-kaivy/kaivy
e27b53e8e9eedc48abc99151f3adbb76f0a9b331
[ "MIT" ]
null
null
null
kaivy/windows/virtual_window_title_bar.py
team-kaivy/kaivy
e27b53e8e9eedc48abc99151f3adbb76f0a9b331
[ "MIT" ]
null
null
null
kaivy/windows/virtual_window_title_bar.py
team-kaivy/kaivy
e27b53e8e9eedc48abc99151f3adbb76f0a9b331
[ "MIT" ]
null
null
null
######################################################################################################################## # # # This file is part of kAIvy ...
39.62069
136
0.495213
######################################################################################################################## # # # This file is part of kAIvy ...
0
0
0
2,273
0
0
0
108
156
b0334bea56715d8ba34f24b296effc7b67be149a
15,462
py
Python
poet/build/builder.py
sdispater/poet
5a07ee95e546ab6460bde43bf59837120e17dfa5
[ "MIT" ]
367
2017-04-01T15:10:04.000Z
2021-12-23T18:26:03.000Z
poet/build/builder.py
sdispater/poet
5a07ee95e546ab6460bde43bf59837120e17dfa5
[ "MIT" ]
22
2017-04-13T15:39:02.000Z
2017-10-05T14:55:26.000Z
poet/build/builder.py
sdispater/poet
5a07ee95e546ab6460bde43bf59837120e17dfa5
[ "MIT" ]
16
2017-04-14T08:19:48.000Z
2019-07-21T13:34:12.000Z
# -*- coding: utf-8 -*-
29.677543
98
0.525805
# -*- coding: utf-8 -*- import os import re import warnings from setuptools.dist import Distribution from setuptools.extension import Extension from pip.commands.wheel import WheelCommand from pip.status_codes import SUCCESS from semantic_version import Spec, Version from .._compat import Path, PY2, encode from ..ut...
3
0
0
15,088
0
0
0
101
246
8aa35a9d3b950a629adc8f543bb25b86ccfe5177
24,262
py
Python
lingvo/core/beam_search_helper.py
shadowridgedev/lingvo
7a55484a3bc424f06ad8a921fb7e623ade73b0bf
[ "Apache-2.0" ]
null
null
null
lingvo/core/beam_search_helper.py
shadowridgedev/lingvo
7a55484a3bc424f06ad8a921fb7e623ade73b0bf
[ "Apache-2.0" ]
null
null
null
lingvo/core/beam_search_helper.py
shadowridgedev/lingvo
7a55484a3bc424f06ad8a921fb7e623ade73b0bf
[ "Apache-2.0" ]
1
2021-12-22T00:26:59.000Z
2021-12-22T00:26:59.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
44.435897
80
0.667958
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
0
3,652
0
13,985
0
0
0
28
68
a783b5038e9d34e2c321cad981dfaf4376994938
5,021
py
Python
vortex/VortexPayloadProtocol.py
Synerty/vortexpy
fcf4c4dccbdf300b04bb962276230a48434cba17
[ "MIT" ]
1
2018-01-04T10:55:49.000Z
2018-01-04T10:55:49.000Z
vortex/VortexPayloadProtocol.py
Synerty/vortexpy
fcf4c4dccbdf300b04bb962276230a48434cba17
[ "MIT" ]
null
null
null
vortex/VortexPayloadProtocol.py
Synerty/vortexpy
fcf4c4dccbdf300b04bb962276230a48434cba17
[ "MIT" ]
null
null
null
""" * Created by Synerty Pty Ltd * * This software is open source, the MIT license applies. * * Website : http://www.synerty.com * Support : support@synerty.com """ import logging logger = logging.getLogger(name=__name__)
32.185897
89
0.614021
""" * Created by Synerty Pty Ltd * * This software is open source, the MIT license applies. * * Website : http://www.synerty.com * Support : support@synerty.com """ import logging from abc import ABCMeta, abstractmethod from collections import deque from twisted.internet import reactor from twisted.internet.defe...
0
1,326
0
3,014
0
0
0
228
223
2fa250f6887152c9f5dfbcb9850a379e8af9a21f
4,568
py
Python
matsdp/apt/apt_plot.py
dianwdw/matsdp
b5b822036d2ae1dab00f02a39fe7ba4a51384017
[ "BSD-3-Clause" ]
2
2019-11-12T08:35:45.000Z
2022-02-20T14:26:54.000Z
matsdp/apt/apt_plot.py
dianwdw/matsdp
b5b822036d2ae1dab00f02a39fe7ba4a51384017
[ "BSD-3-Clause" ]
null
null
null
matsdp/apt/apt_plot.py
dianwdw/matsdp
b5b822036d2ae1dab00f02a39fe7ba4a51384017
[ "BSD-3-Clause" ]
1
2021-12-13T13:27:04.000Z
2021-12-13T13:27:04.000Z
# -*- coding: utf-8 -*- import matplotlib matplotlib.use("Agg")
44.784314
167
0.598074
# -*- coding: utf-8 -*- import matplotlib matplotlib.use("Agg") def plot_proxigram_csv(proxigram_csv_file_path, sysname, visible_elmt_list, interplation_on = False, fig_width=6, fig_height=5, fig_dpi = 600, fig_format = 'png'): args_dict = locals() import os import numpy as np import matplotlib...
0
0
0
0
0
4,474
0
0
25
7cca1a7ee26e5b0c58ebf6109568a30fa8e46997
37,125
py
Python
src/tac/core/wavenet_vocoder/models/wavenet.py
stefantaubert/Tacotron-2
710a3b39b48147307fa8eef2c9f635562f48d49a
[ "MIT" ]
null
null
null
src/tac/core/wavenet_vocoder/models/wavenet.py
stefantaubert/Tacotron-2
710a3b39b48147307fa8eef2c9f635562f48d49a
[ "MIT" ]
null
null
null
src/tac/core/wavenet_vocoder/models/wavenet.py
stefantaubert/Tacotron-2
710a3b39b48147307fa8eef2c9f635562f48d49a
[ "MIT" ]
null
null
null
import tensorflow as tf from src.tac.core.wavenet_vocoder.models.modules import (WeightNorm) def _expand_global_features(batch_size, time_length, global_features, data_format='BCT'): """Expand global conditioning features to all time steps Args: batch_size: int time_length: int global_features: Tensor of sha...
40.005388
168
0.713185
import numpy as np import tensorflow as tf from src.etc import audio from src.tac.core.wavenet_vocoder import util from src.tac.core.wavenet_vocoder.models.gaussian import sample_from_gaussian from src.tac.core.wavenet_vocoder.models.mixture import \ sample_from_discretized_mix_logistic from src.tac.core.wavenet_v...
0
0
0
33,749
0
0
0
513
178
d4cd7ebf8fa512c108f7df03d7c875dde967fc1e
2,022
py
Python
Recipe_Core_App/models/custom_user.py
ziibii88/Recipe_API_Project
486da89a1c71554930dbb5a535a9a5c27d26667b
[ "MIT" ]
2
2020-05-12T03:36:33.000Z
2020-11-24T08:22:16.000Z
Recipe_Core_App/models/custom_user.py
ziibii88/Recipe_API_Project
486da89a1c71554930dbb5a535a9a5c27d26667b
[ "MIT" ]
10
2021-03-30T13:20:42.000Z
2022-03-12T00:29:05.000Z
Recipe_Core_App/models/custom_user.py
ziibii88/Recipe_API_Project
486da89a1c71554930dbb5a535a9a5c27d26667b
[ "MIT" ]
null
null
null
"""Custom User Model"""
42.125
76
0.696835
"""Custom User Model""" from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, \ PermissionsMixin from django.db import models class CustomUserManager(BaseUserManager): """Custom User Manager overridden from BaseUserManager for CustomUser""" def _create_user(self, email, password=None...
0
0
0
1,823
0
0
0
82
91
0ec5f780bd00d1bb32c388da1e6b8f06ae969ace
30,621
py
Python
train_valid.py
qbhan/pathembed
c21823529840593bf606e10696f5879e5adb51b2
[ "MIT" ]
1
2021-10-13T05:01:22.000Z
2021-10-13T05:01:22.000Z
train_valid.py
qbhan/pathembed
c21823529840593bf606e10696f5879e5adb51b2
[ "MIT" ]
null
null
null
train_valid.py
qbhan/pathembed
c21823529840593bf606e10696f5879e5adb51b2
[ "MIT" ]
null
null
null
import torch.nn as nn import torchvision import torchvision.transforms as transforms import torch.optim as optim from tensorboardX import SummaryWriter # for mixed precision import argparse # from test_cython import * # L = 9 # number of convolutional layers # n_kernels = 100 # number of kernels in each layer # kern...
45.297337
269
0.616048
import torch import torch.nn as nn import torch.nn.functional as F import torchvision import torchvision.transforms as transforms import torchvision.utils import torch.optim as optim from torch.utils.data import DataLoader from tensorboardX import SummaryWriter # for mixed precision import torch.nn.utils as torch_util...
0
0
0
0
0
27,537
0
59
534
d35989135b0bef0d1ac8815fe7e35507a50d08b4
132
py
Python
examples/tenant_tutorial/tenant_tutorial/urls_public.py
pvandegeer/django-tenant-schemas
20c72782cee51a33fd5c56a0af7b2c653c1b6770
[ "MIT" ]
1,101
2015-01-01T23:36:37.000Z
2022-03-29T18:11:25.000Z
examples/tenant_tutorial/tenant_tutorial/urls_public.py
pvandegeer/django-tenant-schemas
20c72782cee51a33fd5c56a0af7b2c653c1b6770
[ "MIT" ]
429
2015-01-01T23:38:43.000Z
2022-03-28T08:43:54.000Z
examples/tenant_tutorial/tenant_tutorial/urls_public.py
pvandegeer/django-tenant-schemas
20c72782cee51a33fd5c56a0af7b2c653c1b6770
[ "MIT" ]
429
2015-01-01T23:29:17.000Z
2022-03-14T20:18:55.000Z
from django.conf.urls import url from tenant_tutorial.views import HomeView urlpatterns = [ url(r'^$', HomeView.as_view()), ]
16.5
42
0.719697
from django.conf.urls import url from tenant_tutorial.views import HomeView urlpatterns = [ url(r'^$', HomeView.as_view()), ]
0
0
0
0
0
0
0
0
0
7f2c3b138b5ad1b508898a36bd80800d2e2f4cad
4,909
py
Python
ctwingest/marker_table.py
henrygong/ctwingest
1eafea4e4faad62de2473cb77857d24c3d9c6e77
[ "MIT" ]
null
null
null
ctwingest/marker_table.py
henrygong/ctwingest
1eafea4e4faad62de2473cb77857d24c3d9c6e77
[ "MIT" ]
null
null
null
ctwingest/marker_table.py
henrygong/ctwingest
1eafea4e4faad62de2473cb77857d24c3d9c6e77
[ "MIT" ]
null
null
null
""" Create a Marker table from an AnnData Object. """ import pandas as pd from ctwingest.scanpyapi import proportion_expressed_cluster, centroids, get_expression, std_gt_0_genes def scale_centroids(centers, max=2.5, min=-2.5): """avg.exp.scaled""" scaled = centers.subtract(centers.mean(axis=1), axis=0) sc...
43.061404
120
0.681605
""" Create a Marker table from an AnnData Object. """ from statsmodels.stats.proportion import proportions_ztest from scipy.stats import ttest_ind import pandas as pd import numpy as np from ctwingest.scanpyapi import proportion_expressed_cluster, centroids, get_expression, std_gt_0_genes def scale_centroids(centers,...
0
0
0
0
0
0
0
46
66
c31e4d77fa90c2a95e1a0a532f837cf00973ea85
5,235
py
Python
Agent/dqn.py
dacozai/QuantumDeepAdvantage
6ca2388141906e2782d29b60740db27925ee557f
[ "Apache-2.0" ]
3
2019-11-20T07:51:28.000Z
2021-02-02T08:34:52.000Z
Agent/dqn.py
dacozai/QuantumDeepAdvantage
6ca2388141906e2782d29b60740db27925ee557f
[ "Apache-2.0" ]
null
null
null
Agent/dqn.py
dacozai/QuantumDeepAdvantage
6ca2388141906e2782d29b60740db27925ee557f
[ "Apache-2.0" ]
1
2019-12-31T04:01:18.000Z
2019-12-31T04:01:18.000Z
################################################################# # Copyright (C) # # 2019 Qiskit Team # # Permission given to modify the code as long as you keep this # # declaration at the top ...
32.515528
112
0.640306
################################################################# # Copyright (C) # # 2019 Qiskit Team # # Permission given to modify the code as long as you keep this # # declaration at the top ...
0
0
0
4,589
0
0
0
69
181
3fa893ae3b5d7fc4a34a49eff4fe696c69c68d19
12,818
py
Python
tests/networks_test.py
micbia/SegU-Net
69c3e3596d32d93b62d3636317e1dbf531f5862e
[ "MIT" ]
9
2020-05-13T22:45:43.000Z
2022-02-10T10:13:21.000Z
tests/networks_test.py
micbia/SegU-Net
69c3e3596d32d93b62d3636317e1dbf531f5862e
[ "MIT" ]
null
null
null
tests/networks_test.py
micbia/SegU-Net
69c3e3596d32d93b62d3636317e1dbf531f5862e
[ "MIT" ]
null
null
null
from keras.layers import concatenate
58
181
0.599001
import numpy as np, time from keras.models import Model, load_model from keras.layers import Input, BatchNormalization, Activation, Dropout, concatenate from keras.layers.convolutional import Conv2D, Conv2DTranspose, Conv3D, Conv3DTranspose from keras.layers.pooling import MaxPooling2D, GlobalMaxPool2D, MaxPooling3D f...
0
0
0
0
0
12,398
0
227
156
ed7a1c4be9927b9f24bf9212440d3f9502a6b548
746
py
Python
account/admin.py
PrestonMonteWest/comp-mart
e7699f3c4ac1d77c447cd9300fb9912f4840d2a9
[ "Apache-2.0" ]
1
2018-04-09T02:06:30.000Z
2018-04-09T02:06:30.000Z
account/admin.py
PrestonMonteWest/compmart
e7699f3c4ac1d77c447cd9300fb9912f4840d2a9
[ "Apache-2.0" ]
1
2018-07-04T21:08:58.000Z
2018-07-09T02:34:50.000Z
account/admin.py
PrestonMonteWest/compmart
e7699f3c4ac1d77c447cd9300fb9912f4840d2a9
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from . import models admin.site.register(models.Address, AddressAdmin) admin.site.register(models.CreditCard, CreditCardAdmin)
39.263158
83
0.698391
from django.contrib import admin from . import models class AddressAdmin(admin.ModelAdmin): list_display = ('user', 'street', 'city', 'state', 'zip_code') raw_id_fields = ('user',) search_fields = ('street', 'city', 'state', 'zip_code') fields = ('user', 'street', 'city', 'state', 'zip_code') class Cr...
0
0
0
539
0
0
0
0
46
71a22cab3a5f46c536fa8e2e24f0611fcff253c2
1,091
py
Python
PyOpenGL-3.0.2/OpenGL/raw/GL/ARB/base_instance.py
frederica07/Dragon_Programming_Process
c0dff2e20c1be6db5adc6f9977efae8f7f888ef5
[ "BSD-2-Clause" ]
null
null
null
PyOpenGL-3.0.2/OpenGL/raw/GL/ARB/base_instance.py
frederica07/Dragon_Programming_Process
c0dff2e20c1be6db5adc6f9977efae8f7f888ef5
[ "BSD-2-Clause" ]
null
null
null
PyOpenGL-3.0.2/OpenGL/raw/GL/ARB/base_instance.py
frederica07/Dragon_Programming_Process
c0dff2e20c1be6db5adc6f9977efae8f7f888ef5
[ "BSD-2-Clause" ]
null
null
null
'''Autogenerated by get_gl_extensions script, do not edit!''' EXTENSION_NAME = 'GL_ARB_base_instance' def glInitBaseInstanceARB(): '''Return boolean indicating whether this extension is available''' from OpenGL import extensions return extensions.hasGLExtension( EXTENSION_NAME )
45.458333
119
0.810266
'''Autogenerated by get_gl_extensions script, do not edit!''' from OpenGL import platform as _p, constants as _cs, arrays from OpenGL.GL import glget import ctypes EXTENSION_NAME = 'GL_ARB_base_instance' def _f( function ): return _p.createFunction( function,_p.GL,'GL_ARB_base_instance',False) @_f @_p.types(None,_...
0
533
0
0
0
73
0
36
155
517e237ee7721179f23df9b8e1d8c509af07f2d3
4,046
py
Python
kits.py
gajanlee/UCAS-kits
75c985a8ea1e69bfe401c9b0555a7d526d4cc71e
[ "MIT" ]
null
null
null
kits.py
gajanlee/UCAS-kits
75c985a8ea1e69bfe401c9b0555a7d526d4cc71e
[ "MIT" ]
null
null
null
kits.py
gajanlee/UCAS-kits
75c985a8ea1e69bfe401c9b0555a7d526d4cc71e
[ "MIT" ]
null
null
null
import configparser import time import configparser if __name__ == "__main__": cf = configparser.ConfigParser() cf.read("info.conf") while process_orders(cf): time.sleep(2)
32.629032
171
0.561789
import configparser import requests import time import numpy as np from PIL import Image from io import BytesIO import configparser from code import CodeRecognizer from utils import * class UCAS: def __init__(self, user): self.__session = requests.Session() self.__user = user # self.login...
210
76
0
2,902
0
597
0
1
202
a353593d14c77c62907e98f74374cf5b3f4d0eb0
635
py
Python
SUBS/009_SUBS.py
domenicosolazzo/Rosalind
288fa79aa715de6632413ddaa0e2527a1d7ee265
[ "MIT" ]
null
null
null
SUBS/009_SUBS.py
domenicosolazzo/Rosalind
288fa79aa715de6632413ddaa0e2527a1d7ee265
[ "MIT" ]
null
null
null
SUBS/009_SUBS.py
domenicosolazzo/Rosalind
288fa79aa715de6632413ddaa0e2527a1d7ee265
[ "MIT" ]
null
null
null
#!/usr/bin/env python ''' A solution to a ROSALIND bioinformatics problem. Problem Title: Finding a Motif in DNA Rosalind ID: SUBS Rosalind #: 009 URL: http://rosalind.info/problems/subs/ ''' if __name__ == "__main__": main()
24.423077
57
0.620472
#!/usr/bin/env python ''' A solution to a ROSALIND bioinformatics problem. Problem Title: Finding a Motif in DNA Rosalind ID: SUBS Rosalind #: 009 URL: http://rosalind.info/problems/subs/ ''' def main(): with open('data/rosalind_subs.txt') as input_data: s,t = input_data.readlines() s = s.rstrip() t ...
0
0
0
0
0
382
0
0
22
dde944103b320bbb0108dbd91b7db350f5d0fa72
1,339
py
Python
website/baseapp/models/order.py
raviarrow88/Django-ecommerce
9fd0340e4d2f1ff024092ba574702cd9dbfd2162
[ "MIT" ]
null
null
null
website/baseapp/models/order.py
raviarrow88/Django-ecommerce
9fd0340e4d2f1ff024092ba574702cd9dbfd2162
[ "MIT" ]
9
2020-06-06T01:49:00.000Z
2022-03-12T00:30:35.000Z
website/baseapp/models/order.py
raviarrow88/Django-ecommerce
9fd0340e4d2f1ff024092ba574702cd9dbfd2162
[ "MIT" ]
null
null
null
# from .user import UserProfile
30.431818
87
0.678865
from django.db import models from .timestamp import TimeStamp # from .user import UserProfile from customer.models import UserProfile from .item import Item class Order(TimeStamp): user =models.ForeignKey(UserProfile,on_delete=models.SET_NULL,null=True,blank=True) completed = models.BooleanField(default=False...
0
727
0
431
0
0
0
37
112
f2f6448df1215a4699a0b8cfe080518be476866d
2,243
py
Python
tests/utils.py
codefever/dremel.py
42d44a843e1ba5cefd32c14490a124f85f4c1c4e
[ "MIT" ]
2
2021-04-09T12:22:50.000Z
2022-03-27T14:04:31.000Z
tests/utils.py
codefever/dremel.py
42d44a843e1ba5cefd32c14490a124f85f4c1c4e
[ "MIT" ]
null
null
null
tests/utils.py
codefever/dremel.py
42d44a843e1ba5cefd32c14490a124f85f4c1c4e
[ "MIT" ]
null
null
null
#!/usr/bin/env python
30.310811
93
0.598306
#!/usr/bin/env python import os import random from google.protobuf import text_format from google.protobuf.descriptor import Descriptor, FieldDescriptor from .document_pb2 import Document from dremel.consts import * from dremel.simple import create_simple_storage def read_docs(): sample_dir = os.path.join(os.pa...
0
0
0
0
269
1,591
0
88
272
f957582cf4088d5cebfe722f507924fba380cb9d
427
py
Python
simple-examples/07_other-examples/dict.py
wiltonpaulo/python-fullcourse
5befe60221a2e6f8a567a11e2f449245c11b3447
[ "MIT" ]
null
null
null
simple-examples/07_other-examples/dict.py
wiltonpaulo/python-fullcourse
5befe60221a2e6f8a567a11e2f449245c11b3447
[ "MIT" ]
null
null
null
simple-examples/07_other-examples/dict.py
wiltonpaulo/python-fullcourse
5befe60221a2e6f8a567a11e2f449245c11b3447
[ "MIT" ]
null
null
null
print("Way to transform two lists into one dict") purchases = ["rice", "beans", "pasta"] prices = ["2.00", "3.80", "4.90"] new_list = {} # for x in range(len(purchases)): # new_list[purchases[x]] = prices[x] # for id, item in enumerate(compras): # new_list[purchases[id]] = prices[id] new_list = {item: prices...
22.473684
70
0.662763
print("Way to transform two lists into one dict") purchases = ["rice", "beans", "pasta"] prices = ["2.00", "3.80", "4.90"] new_list = {} # for x in range(len(purchases)): # new_list[purchases[x]] = prices[x] # for id, item in enumerate(compras): # new_list[purchases[id]] = prices[id] new_list = {item: prices...
0
0
0
0
0
0
0
0
0
cccd40a89b5d3ec8ef38be6a8a9d8358e4b4a7ee
4,907
py
Python
Modules/visualization.py
EVA4-RS-Group/Phase2
7c551e3894979cc425dd51baeddbfa5a51b7878d
[ "Apache-2.0" ]
null
null
null
Modules/visualization.py
EVA4-RS-Group/Phase2
7c551e3894979cc425dd51baeddbfa5a51b7878d
[ "Apache-2.0" ]
null
null
null
Modules/visualization.py
EVA4-RS-Group/Phase2
7c551e3894979cc425dd51baeddbfa5a51b7878d
[ "Apache-2.0" ]
2
2020-08-26T02:33:33.000Z
2021-03-16T10:51:40.000Z
'''Plotting Utility. Grad-CAM implementation in Pytorch Reference: [1] xyz [2] xyz ''' import matplotlib.pyplot as plt import numpy as np import torch def denormalize(tensor, mean, std): """Denormalize the image for given mean and standard deviation. Args: tensor: Image tensor mean: Dataset...
32.282895
113
0.592011
'''Plotting Utility. Grad-CAM implementation in Pytorch Reference: [1] xyz [2] xyz ''' import matplotlib.pyplot as plt import numpy as np import torch def denormalize(tensor, mean, std): """Denormalize the image for given mean and standard deviation. Args: tensor: Image tensor mean: Dataset...
0
0
0
0
0
3,694
0
0
92
0c35895d716286e0c3bf45a9d0405b8ccf2b63fd
1,935
py
Python
deploy_java/DockerJava/javaTopo_image.py
vmeta42/neodata
00a42ab8d1adbb14f09bc4cc04720b0067241985
[ "Apache-2.0" ]
null
null
null
deploy_java/DockerJava/javaTopo_image.py
vmeta42/neodata
00a42ab8d1adbb14f09bc4cc04720b0067241985
[ "Apache-2.0" ]
null
null
null
deploy_java/DockerJava/javaTopo_image.py
vmeta42/neodata
00a42ab8d1adbb14f09bc4cc04720b0067241985
[ "Apache-2.0" ]
1
2022-03-16T08:31:28.000Z
2022-03-16T08:31:28.000Z
# coding:utf-8 import os if __name__ == "__main__": j = JavaImage(codeDir=os.path.abspath(os.curdir), shell_file="javapack.sh", imageTag="harbor.dev.21vianet.com/cmdb/cmdb_javatopo:latest") j.begin() # print()
33.947368
115
0.61137
# coding:utf-8 import os import subprocess class JavaImage(): def __init__(self, *args, **kwargs): self.codeDir = kwargs["codeDir"] self.mvnScript = kwargs["shell_file"] self.dockerImage = kwargs["imageTag"] def mvn_command(self, capture_output=True): self.out = subprocess.ru...
0
0
0
1,651
0
0
0
-4
45
0472b3c394edd47e2e182c61417a754346641796
979
py
Python
uploads/core/forms.py
lindsay777/ITRI_hospital_UI
ee82b44e7e0edd28580a4fbb37c277ff85da8192
[ "MIT" ]
null
null
null
uploads/core/forms.py
lindsay777/ITRI_hospital_UI
ee82b44e7e0edd28580a4fbb37c277ff85da8192
[ "MIT" ]
1
2018-08-12T08:30:54.000Z
2018-08-12T08:30:54.000Z
uploads/core/forms.py
lindsay777/ITRI_hospital_UI
ee82b44e7e0edd28580a4fbb37c277ff85da8192
[ "MIT" ]
null
null
null
#from uploads.core.models import File # modelformdescription document # class FileForm(forms.ModelForm): # class Meta: # model = File # fields = ('filename',) # file = forms.FileField() # pid = forms.CharField(max_length=20) # name = forms.CharField(max_length=20) # sex = forms.Cha...
29.666667
47
0.657814
from django import forms from uploads.core.models import Document #from uploads.core.models import File # 創造一個依照model的form,會繼承欄位description document class DocumentForm(forms.ModelForm): class Meta: model = Document fields = ('description', 'document', ) class nameForm(forms.Form): rename=form...
39
0
0
138
0
0
0
22
90
cd9cb66122591a5591685af112fa2e4503ad0c79
5,119
py
Python
gene_finding/genes_ppi_enrichr.py
ddhostallero/cxplain
c17a119faa384ffd2ca01529d470df2bd4b16813
[ "MIT" ]
null
null
null
gene_finding/genes_ppi_enrichr.py
ddhostallero/cxplain
c17a119faa384ffd2ca01529d470df2bd4b16813
[ "MIT" ]
null
null
null
gene_finding/genes_ppi_enrichr.py
ddhostallero/cxplain
c17a119faa384ffd2ca01529d470df2bd4b16813
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np pathway_file = '../../drp-data/pathways/9606.enrichr_pathway.edge' pathway = pd.read_csv(pathway_file, sep='\t', header=None) print("pathways:", pathway[0].nunique()) print("pathway genes:", pathway[1].nunique()) gsc_filtered = '../../KnowEng_GSC/GSC_10mod/drawr_filtered/DraWR_...
35.548611
128
0.676109
import pandas as pd import numpy as np import matplotlib.pyplot as plt pathway_file = '../../drp-data/pathways/9606.enrichr_pathway.edge' pathway = pd.read_csv(pathway_file, sep='\t', header=None) print("pathways:", pathway[0].nunique()) print("pathway genes:", pathway[1].nunique()) gsc_filtered = '../../KnowEng_GSC...
0
0
0
0
0
0
0
10
22
d39c4f37b45ab8280f00f4481b2167d271367281
215
py
Python
libDep.py
TheSinOfSloth/Remote_switchOff
7ae27a712a5702536bc51257374c7649375d6d92
[ "MIT" ]
1
2020-04-06T14:13:57.000Z
2020-04-06T14:13:57.000Z
libDep.py
1hef001/Automatic_switchOff
7ae27a712a5702536bc51257374c7649375d6d92
[ "MIT" ]
null
null
null
libDep.py
1hef001/Automatic_switchOff
7ae27a712a5702536bc51257374c7649375d6d92
[ "MIT" ]
null
null
null
import os import platform if(platform.system() == 'Windows'): FILENAME = 'terminateFile.bat' elif(platform.system() == 'Linux'): FILENAME = 'idle.sh' TIME = 900 PATH = os.getcwd() # print(platform.system())
21.5
35
0.669767
import os import platform if(platform.system() == 'Windows'): FILENAME = 'terminateFile.bat' elif(platform.system() == 'Linux'): FILENAME = 'idle.sh' TIME = 900 PATH = os.getcwd() # print(platform.system())
0
0
0
0
0
0
0
0
0
0b8766629c87c39c0ef02b967e9144a3b7d6946f
1,050
py
Python
deeptrack/benchmarks/test_fluorescence.py
HarshithBachimanchi/DeepTrack-2.0
5983f5224b75aef4ce3932662bd15723f13841a0
[ "MIT" ]
1
2022-03-18T17:25:18.000Z
2022-03-18T17:25:18.000Z
deeptrack/benchmarks/test_fluorescence.py
HarshithBachimanchi/DeepTrack-2.0
5983f5224b75aef4ce3932662bd15723f13841a0
[ "MIT" ]
null
null
null
deeptrack/benchmarks/test_fluorescence.py
HarshithBachimanchi/DeepTrack-2.0
5983f5224b75aef4ce3932662bd15723f13841a0
[ "MIT" ]
null
null
null
import deeptrack as dt u = dt.units
21.875
81
0.625714
import sys import numpy as np import itertools import deeptrack as dt import pytest u = dt.units def create_pipeline(output_region=(0, 0, 128, 128), num_particles=1): optics = dt.Fluorescence(output_region=output_region) mie = dt.Sphere( radius=2e-6, refractive_index=1.45, z=10, ...
0
579
0
0
0
324
0
-27
134
5d71ad984bf074d92f237d6404d33add30a5bd3f
523
py
Python
scripts/euca2ools.py
nii-clouds/Literate-Computing-Basics
9bc03edafd503c2215f0e9028389e3ce31a418ec
[ "CC-BY-4.0" ]
13
2016-07-24T07:03:50.000Z
2021-07-26T07:50:56.000Z
scripts/euca2ools.py
nii-clouds/Literate-Computing-Basics
9bc03edafd503c2215f0e9028389e3ce31a418ec
[ "CC-BY-4.0" ]
1
2016-07-14T03:06:01.000Z
2016-07-14T03:06:01.000Z
scripts/euca2ools.py
nii-clouds/Literate-Computing-Basics
9bc03edafd503c2215f0e9028389e3ce31a418ec
[ "CC-BY-4.0" ]
5
2017-01-10T16:15:01.000Z
2019-08-29T06:21:12.000Z
# helper functions for Euca2ools
29.055556
60
0.544933
# helper functions for Euca2ools import subprocess import os import time def run_euca2ools(envfile, cmd): env = os.environ.copy() with open(os.path.expanduser(envfile), 'r') as f: for l in f.readlines(): if l.startswith('export '): l = l[6:].strip() name, va...
0
0
0
0
0
426
0
-26
90
eb75ac8fdab6ae6405b604f70c5f5ada8b3bf5a7
2,186
py
Python
Psc2/songs/claudius_irae.py
psc-g/Psc2
6676fc67263c9268ff65784d583cb838cfd42c28
[ "Apache-2.0" ]
24
2018-10-09T22:36:43.000Z
2021-10-15T16:34:42.000Z
Psc2/songs/claudius_irae.py
psc-g/Psc2
6676fc67263c9268ff65784d583cb838cfd42c28
[ "Apache-2.0" ]
2
2018-12-07T20:01:13.000Z
2018-12-11T15:19:23.000Z
Psc2/songs/claudius_irae.py
psc-g/Psc2
6676fc67263c9268ff65784d583cb838cfd42c28
[ "Apache-2.0" ]
5
2018-12-07T15:37:57.000Z
2020-03-28T11:59:40.000Z
"""ClaudiusIrae song logic."""
34.15625
79
0.588747
"""ClaudiusIrae song logic.""" import OSC from Psc2.songs import song from Psc2.modes import bass_doubler from Psc2.modes import looper class ClaudiusIrae(song.Song): """This defines the logic for ClaudiusIrae. For most of the song it is in bass-doubling mode, except for the solo section where the bass is aut...
0
0
0
2,025
0
0
0
17
113
a3642725c5e6f2e8169b1cd241aec6bc6bae5734
3,035
py
Python
exercises/demo.py
Zaph-x/DistributedExercisesAAU
40ca2716e252aca46f840405a89fac3ffd37f122
[ "MIT" ]
null
null
null
exercises/demo.py
Zaph-x/DistributedExercisesAAU
40ca2716e252aca46f840405a89fac3ffd37f122
[ "MIT" ]
null
null
null
exercises/demo.py
Zaph-x/DistributedExercisesAAU
40ca2716e252aca46f840405a89fac3ffd37f122
[ "MIT" ]
null
null
null
# We extend the MessageStub here for the message-types we wish to communicate # This class extends on the basic Device class. We will implement the protocol in the run method
43.357143
115
0.639868
import random from emulators.Device import Device from emulators.Medium import Medium from emulators.MessageStub import MessageStub # We extend the MessageStub here for the message-types we wish to communicate class PingMessage(MessageStub): # the constructor-function takes the source and destination as argumen...
0
0
0
2,679
0
0
0
44
133
e41a1c4a736dca7523e7626d2638116f83876bd8
19,910
py
Python
bike/refactor/test_renameMethod.py
debiancn/bicyclerepair
dd054e802d6d8ad80baeccee0396da68144f2a26
[ "ICU" ]
2
2020-05-29T06:31:53.000Z
2020-12-19T21:49:25.000Z
bike/refactor/test_renameMethod.py
debiancn/bicyclerepair
dd054e802d6d8ad80baeccee0396da68144f2a26
[ "ICU" ]
null
null
null
bike/refactor/test_renameMethod.py
debiancn/bicyclerepair
dd054e802d6d8ad80baeccee0396da68144f2a26
[ "ICU" ]
null
null
null
#!/usr/bin/env python import unittest # tests that cover stuff not renamed automatically # (I.e. are renamed after user manually expresses desire to do so) MethodTestdata = trimLines(""" class TheClass: def theMethod(self): pass def differentMethod(self): pass class DifferentClass:...
28.002813
140
0.547212
#!/usr/bin/env python import setpath import unittest from rename import rename import compiler from bike import testdata from bike.testutils import* from bike.transformer.save import save class RenameMethodTests: def test_renamesTheMethod(self): srcBefore=trimLines(""" class TheClass: ...
0
0
0
19,109
0
0
0
18
371
fc39730a027f1990317acfd6696c41b7fecb8c57
2,196
py
Python
Combined Data/duplicate_addresses.py
alfredholmes/UK-Company-Data
69f87980309fbd9ef3434770a8a87cd4b600e6cb
[ "MIT" ]
1
2022-01-27T22:29:19.000Z
2022-01-27T22:29:19.000Z
Combined Data/duplicate_addresses.py
alfredholmes/UK-Company-Data
69f87980309fbd9ef3434770a8a87cd4b600e6cb
[ "MIT" ]
null
null
null
Combined Data/duplicate_addresses.py
alfredholmes/UK-Company-Data
69f87980309fbd9ef3434770a8a87cd4b600e6cb
[ "MIT" ]
null
null
null
import sys sys.path.append('../lib') if __name__ == '__main__': main()
29.28
249
0.638434
import ijson, csv, json, datetime import sys sys.path.append('../lib') from accounts.company import Company def main(): enterprises = {} print('loading enterprises') with open('combined_data.json', 'r') as f: for i, c in enumerate(ijson.items(f, 'item')): if i % 10000 == 0: print(i) address = frozens...
0
0
0
0
0
2,024
0
27
68
81559963f29d21ffc38158ededa6ad16e94ccb86
96
py
Python
yamldirs/__init__.py
datakortet/yamldirs
529f20a5ff3da46448828fc9c7c80ca417bb6e91
[ "MIT" ]
13
2017-10-23T12:39:20.000Z
2022-03-04T16:58:44.000Z
yamldirs/__init__.py
datakortet/yamldirs
529f20a5ff3da46448828fc9c7c80ca417bb6e91
[ "MIT" ]
5
2017-10-24T12:20:13.000Z
2017-10-25T13:31:04.000Z
yamldirs/__init__.py
datakortet/yamldirs
529f20a5ff3da46448828fc9c7c80ca417bb6e91
[ "MIT" ]
3
2017-10-24T12:20:39.000Z
2021-12-22T13:19:44.000Z
# -*- coding: utf-8 -*- __version__ = '1.1.15'
16
46
0.625
# -*- coding: utf-8 -*- __version__ = '1.1.15' from .filemaker import create_files # noqa
0
0
0
0
0
0
0
14
34
e8186f362f3a5c6e2c0bf8ddc167f936786e9755
829
py
Python
com.ppc.Microservices/intelligence/daylight/location_midnight_microservice.py
peoplepower/botlab
21cc90c558a17b7ef4a42bca247b437d2f968dc0
[ "Apache-2.0" ]
16
2017-03-31T04:41:51.000Z
2020-07-15T07:03:06.000Z
com.ppc.Microservices/intelligence/daylight/location_midnight_microservice.py
peoplepower/botlab
21cc90c558a17b7ef4a42bca247b437d2f968dc0
[ "Apache-2.0" ]
4
2018-07-03T05:39:36.000Z
2018-07-06T02:59:32.000Z
com.ppc.Microservices/intelligence/daylight/location_midnight_microservice.py
peoplepower/botlab
21cc90c558a17b7ef4a42bca247b437d2f968dc0
[ "Apache-2.0" ]
8
2017-04-01T21:07:59.000Z
2019-09-18T15:23:37.000Z
''' Created on February 25, 2019 This file is subject to the terms and conditions defined in the file 'LICENSE.txt', which is part of this source code package. @author: David Moss '''
33.16
119
0.723764
''' Created on February 25, 2019 This file is subject to the terms and conditions defined in the file 'LICENSE.txt', which is part of this source code package. @author: David Moss ''' from intelligence.intelligence import Intelligence class LocationMidnightMicroservice(Intelligence): """ Announce midnight t...
0
0
0
568
0
0
0
29
46
bc4831896be9b443c435adb7e470a5ed2b0aa1f6
9,224
py
Python
ravenframework/BaseClasses/Assembler.py
dgarrett622/raven
f36cc108f7500b0e2717df4832b69b801b43960d
[ "Apache-2.0" ]
null
null
null
ravenframework/BaseClasses/Assembler.py
dgarrett622/raven
f36cc108f7500b0e2717df4832b69b801b43960d
[ "Apache-2.0" ]
null
null
null
ravenframework/BaseClasses/Assembler.py
dgarrett622/raven
f36cc108f7500b0e2717df4832b69b801b43960d
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
50.681319
174
0.66598
# Copyright 2017 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
0
0
0
7,933
0
0
0
20
89
9489bfa545777ad8ca14dfc0924aa4cbbb07cf88
5,776
py
Python
examples/AllInOne/allinone_ownloop.py
irmen/Pyro3
5bd531088d9a11ec83556a0429f18df6cb5cd437
[ "MIT" ]
3
2018-01-13T20:50:41.000Z
2020-02-24T13:35:08.000Z
examples/AllInOne/allinone_ownloop.py
irmen/Pyro3
5bd531088d9a11ec83556a0429f18df6cb5cd437
[ "MIT" ]
null
null
null
examples/AllInOne/allinone_ownloop.py
irmen/Pyro3
5bd531088d9a11ec83556a0429f18df6cb5cd437
[ "MIT" ]
6
2015-03-21T20:34:05.000Z
2021-06-08T04:04:33.000Z
#!/usr/bin/env python # # This application creates a Name Server, Event Server, # Pyro server, and clients, and uses a custom event loop to keep them # all running in parallel. # The custom loop runs in its own server thread otherwise we # can't run client invocations, obviously. # The main loop calls Pyro objects to s...
31.911602
86
0.721434
#!/usr/bin/env python # # This application creates a Name Server, Event Server, # Pyro server, and clients, and uses a custom event loop to keep them # all running in parallel. # The custom loop runs in its own server thread otherwise we # can't run client invocations, obviously. # The main loop calls Pyro objects to s...
0
0
0
2,413
0
2,214
0
10
270
fd6536b19aafb8bd6cbe2ae5992f2e0633363eb1
511
py
Python
examples/hello_template.py
orest-d/liquer
7a5b5a69cf673b4a849dd2da3050ccd75081e454
[ "MIT" ]
3
2019-12-10T10:22:36.000Z
2019-12-12T16:36:11.000Z
examples/hello_template.py
orest-d/liquer
7a5b5a69cf673b4a849dd2da3050ccd75081e454
[ "MIT" ]
null
null
null
examples/hello_template.py
orest-d/liquer
7a5b5a69cf673b4a849dd2da3050ccd75081e454
[ "MIT" ]
2
2019-11-14T16:26:52.000Z
2021-07-26T04:53:54.000Z
# Make it run from the examples directory import sys sys.path.append("..") # with default delimiters print (evaluate_template(""" Template example [[]] - $hello$ - $hello/greet$ - $hello/greet-everybody$ """)) # with custom delimiters print (evaluate_template(""" Template example $$$ - [[hello]] - [[hello/greet]] ...
15.484848
41
0.655577
# Make it run from the examples directory import sys sys.path.append("..") from liquer import * @first_command def hello(): return "Hello" @command def greet(greeting, who="world"): return f"{greeting}, {who}!" # with default delimiters print (evaluate_template(""" Template example [[]] - $hello$ - $hello/...
0
79
0
0
0
0
0
-1
69
0a6f3a549a3f8a41861c7ee807040649078ca252
3,461
py
Python
ss_baselines/saven/ddppo/algo/ddppo.py
gtatiya/sound-spaces
52792865b2a491883bdbfebbc015acaf980a8d3a
[ "CC-BY-4.0" ]
1
2021-09-28T16:04:09.000Z
2021-09-28T16:04:09.000Z
ss_baselines/saven/ddppo/algo/ddppo.py
gtatiya/sound-spaces
52792865b2a491883bdbfebbc015acaf980a8d3a
[ "CC-BY-4.0" ]
null
null
null
ss_baselines/saven/ddppo/algo/ddppo.py
gtatiya/sound-spaces
52792865b2a491883bdbfebbc015acaf980a8d3a
[ "CC-BY-4.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from typing import Tuple import torch import torch.distributed as distrib EPS_PPO = 1e-5 def dis...
34.959596
97
0.649812
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from typing import Tuple import torch import torch.distributed as distrib from ss_baselines.saven....
0
0
0
2,050
0
0
0
68
91
047464dd0842beeeadd509639a066e71adabcead
1,427
py
Python
chapter09/chain.py
JoeanAmiee/Mastering-Python-Design-Patterns-Second-Edition
89c55dcf5e1e0e730dde593b487050f360371932
[ "MIT" ]
278
2018-08-16T12:59:24.000Z
2022-03-21T08:21:11.000Z
chapter09/chain.py
50611/Mastering-Python-Design-Patterns-Second-Edition
6efc4a935f15d2aa6c840131f72fb8c53a493a93
[ "MIT" ]
4
2019-05-16T11:44:45.000Z
2022-02-04T07:24:47.000Z
chapter09/chain.py
50611/Mastering-Python-Design-Patterns-Second-Edition
6efc4a935f15d2aa6c840131f72fb8c53a493a93
[ "MIT" ]
166
2018-08-13T21:47:16.000Z
2022-03-18T12:20:31.000Z
if __name__ == '__main__': main()
26.924528
55
0.553609
class Event: def __init__(self, name): self.name = name def __str__(self): return self.name class Widget: def __init__(self, parent=None): self.parent = parent def handle(self, event): handler = f'handle_{event}' if hasattr(self, handler)...
0
0
0
842
0
388
0
0
154
dc532744bff28dc0b15b2faea563fe4cb6ff5ae6
5,260
py
Python
venv/Lib/site-packages/PySide2/examples/sql/books/ui_bookwindow.py
Farhan-Malik/advance-hand-gesture
0ebe21ddd7c8c2eb14746678be57b33d38c47205
[ "MIT" ]
41
2021-06-19T13:57:18.000Z
2021-12-02T17:08:53.000Z
venv/Lib/site-packages/PySide2/examples/sql/books/ui_bookwindow.py
Farhan-Malik/advance-hand-gesture
0ebe21ddd7c8c2eb14746678be57b33d38c47205
[ "MIT" ]
20
2021-05-03T18:02:23.000Z
2022-03-12T12:01:04.000Z
venvWIN/Lib/site-packages/PySide2/examples/sql/books/ui_bookwindow.py
NeroNekro/PortableController
a8bbfc1b6c8cb2c919e48eb0104e42f436059b18
[ "BSD-3-Clause" ]
4
2021-07-02T03:09:51.000Z
2021-11-25T13:00:10.000Z
# -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file 'bookwindow.ui' ## ## Created by: Qt User Interface Compiler version 5.14.0 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! ###############...
40.461538
96
0.68251
# -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file 'bookwindow.ui' ## ## Created by: Qt User Interface Compiler version 5.14.0 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! ###############...
0
0
0
4,553
0
0
0
231
90
24c230a304bff436e218ccf5ebd50b2cdc35065c
2,356
py
Python
src/analysisService.py
openeuler-mirror/hpcrunner
338bc16b1dceb3909a49a6a51c0946c4b1a30f77
[ "MulanPSL-1.0" ]
null
null
null
src/analysisService.py
openeuler-mirror/hpcrunner
338bc16b1dceb3909a49a6a51c0946c4b1a30f77
[ "MulanPSL-1.0" ]
null
null
null
src/analysisService.py
openeuler-mirror/hpcrunner
338bc16b1dceb3909a49a6a51c0946c4b1a30f77
[ "MulanPSL-1.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*-
25.608696
63
0.669355
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from machineService import MachineService from configService import ConfigService from downloadService import DownloadService from installService import InstallService from envService import EnvService from buildService import BuildService from runService import RunServi...
0
0
0
1,850
0
0
0
192
266
dfdaee496a68b4ad6cd43c190ebddc067bf47fca
5,280
py
Python
feature_mining/em_original.py
nfreundlich/CS410_CourseProject
c50d0ff04472e48b0b59abe4467dc17d7c2cfab8
[ "MIT" ]
null
null
null
feature_mining/em_original.py
nfreundlich/CS410_CourseProject
c50d0ff04472e48b0b59abe4467dc17d7c2cfab8
[ "MIT" ]
18
2018-10-24T01:35:45.000Z
2018-12-17T03:57:36.000Z
feature_mining/em_original.py
nfreundlich/CS410_CourseProject
c50d0ff04472e48b0b59abe4467dc17d7c2cfab8
[ "MIT" ]
null
null
null
if __name__ == '__main__': em = ExpectationMaximizationOriginal() em.em()
44.745763
143
0.57197
import numpy as np import math from feature_mining.em_base import ExpectationMaximization class ExpectationMaximizationOriginal(ExpectationMaximization): """ Original EM Algorithm as developed by Santu. """ def __init__(self, dump_path="../tests/data/em_01/"): print(type(self).__name__, '- in...
0
0
0
5,082
0
0
0
24
89
400952750f2e5961c31828c24e96fa7524ba2ebd
98,704
py
Python
pygeoutil/ggeo.py
ritviksahajpal/pygeoutil
b3d396c64eb7ecb8090bc6be9765003ce0b18cf5
[ "MIT" ]
1
2018-02-28T10:02:39.000Z
2018-02-28T10:02:39.000Z
pygeoutil/ggeo.py
ritviksahajpal/pygeoutil
b3d396c64eb7ecb8090bc6be9765003ce0b18cf5
[ "MIT" ]
7
2016-08-14T03:54:26.000Z
2022-03-11T23:17:45.000Z
pygeoutil/ggeo.py
ritviksahajpal/pygeoutil
b3d396c64eb7ecb8090bc6be9765003ce0b18cf5
[ "MIT" ]
null
null
null
import os import pdb import time import errno import shapely.wkt import shapely.ops import shapely.prepared import logging import tempfile import distutils.version import atexit import functools import math import numpy import gdal import gdalconst from osgeo import gdal from osgeo import osr from osgeo import ogr LO...
39.560721
120
0.662314
import os import pdb import time import errno import shapely.wkt import shapely.ops from shapely import speedups import shapely.prepared import subprocess import logging import tempfile import distutils.version import atexit import functools import math import numpy import gdal import gdalconst from osgeo import gdal ...
0
0
0
0
5,804
127
0
3
120
01531490b5a75ebd803634367f6ed969cdc69f75
2,233
py
Python
backend/course_application/sources/services/course_service.py
heyImDrew/edupro
98b8342dda45071da4871bbf73f2ef002fee938f
[ "Apache-2.0" ]
null
null
null
backend/course_application/sources/services/course_service.py
heyImDrew/edupro
98b8342dda45071da4871bbf73f2ef002fee938f
[ "Apache-2.0" ]
null
null
null
backend/course_application/sources/services/course_service.py
heyImDrew/edupro
98b8342dda45071da4871bbf73f2ef002fee938f
[ "Apache-2.0" ]
null
null
null
course_service = CourseService()
37.847458
94
0.677116
import random from ..serializers.course_serializers import CourseSerializer from ..serializers.partition_serializer import PartitionSerializer, PartitionTaskSerializer from ..models.user_course import UserCourse from ..models.course import Course from ..models.partition import Partition from ..models.partition_task im...
0
0
0
1,836
0
0
0
184
178
1dd066a74be8c7882c1f9c99223ba4a076b3de2d
1,973
py
Python
breeds/migrations/0002_auto_20180430_1118.py
rocity/simple-endpoints
6754a7353dd6b71f19276b67467297e951129a45
[ "MIT" ]
null
null
null
breeds/migrations/0002_auto_20180430_1118.py
rocity/simple-endpoints
6754a7353dd6b71f19276b67467297e951129a45
[ "MIT" ]
null
null
null
breeds/migrations/0002_auto_20180430_1118.py
rocity/simple-endpoints
6754a7353dd6b71f19276b67467297e951129a45
[ "MIT" ]
null
null
null
# Generated by Django 2.0.4 on 2018-04-30 11:18
37.942308
114
0.562088
# Generated by Django 2.0.4 on 2018-04-30 11:18 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('breeds', '0001_initial'), ] operations = [ migrations.CreateModel( name='Anime', fields...
0
0
0
1,830
0
0
0
26
68
510eda9630efc129fe5bb152e8a858ee54a8d0b9
2,365
py
Python
build.py
rpokemon/ideasforpokemon
b135b3f78a77abaf533b38c4eec75509b1a4a152
[ "MIT" ]
null
null
null
build.py
rpokemon/ideasforpokemon
b135b3f78a77abaf533b38c4eec75509b1a4a152
[ "MIT" ]
null
null
null
build.py
rpokemon/ideasforpokemon
b135b3f78a77abaf533b38c4eec75509b1a4a152
[ "MIT" ]
null
null
null
#! python3 # Run Python script if __name__ == '__main__': main()
35.298507
164
0.586469
#! python3 import datetime import json from csscompressor import compress def main(): # Open config file with open("config.json", 'r') as config_file: config = json.load(config_file) # Incriment the build counter config["build"] += 1 # Print starting script message print("\n{} CSS; bu...
0
0
0
0
0
2,209
0
-3
89
976ac13a0d17f78cc33df43ffbf0a73639846a80
1,783
py
Python
s3dis_viz.py
zghera/pvcnn-tf
9aaae991d8117736d0cb260bb525cf5e90c93f21
[ "MIT" ]
null
null
null
s3dis_viz.py
zghera/pvcnn-tf
9aaae991d8117736d0cb260bb525cf5e90c93f21
[ "MIT" ]
null
null
null
s3dis_viz.py
zghera/pvcnn-tf
9aaae991d8117736d0cb260bb525cf5e90c93f21
[ "MIT" ]
null
null
null
"""Demo to visualize data pipeline output.""" if __name__ == "__main__": main(create_pointcloud_dump=False)
25.84058
73
0.614133
"""Demo to visualize data pipeline output.""" import matplotlib.pyplot as plt import tensorflow as tf from dataloaders.s3dis import create_s3dis_dataset def main(create_pointcloud_dump: bool): objects = { 0: "clutter", 1: "ceiling", 2: "floor", 3: "wall", 4: "beam", 5: "column", 6: "door...
0
0
0
0
0
1,540
0
41
89
5f0c939440824c40818d4392a6861bfb95e0b707
636
py
Python
heron/dsl/src/python/__init__.py
zhengyangtean/CG4001_Heron_ElasticBolt
e471593c265088996d485e2dd11c9f2484876568
[ "Apache-2.0" ]
1
2017-11-06T08:23:43.000Z
2017-11-06T08:23:43.000Z
heron/dsl/src/python/__init__.py
zhengyangtean/CG4001_Heron_ElasticBolt
e471593c265088996d485e2dd11c9f2484876568
[ "Apache-2.0" ]
null
null
null
heron/dsl/src/python/__init__.py
zhengyangtean/CG4001_Heron_ElasticBolt
e471593c265088996d485e2dd11c9f2484876568
[ "Apache-2.0" ]
null
null
null
""" The top-level library for Heron's Python DSL, which enables you to write Heron [topologies](https://twitter.github.io/heron/docs/concepts/topologies/) in a Python DSL. Heron topologies are acyclic graphs used to process streaming data. Topologies have two major components: [spouts](spout/spout.m.html#heron_py.spou...
39.75
78
0.784591
""" The top-level library for Heron's Python DSL, which enables you to write Heron [topologies](https://twitter.github.io/heron/docs/concepts/topologies/) in a Python DSL. Heron topologies are acyclic graphs used to process streaming data. Topologies have two major components: [spouts](spout/spout.m.html#heron_py.spou...
0
0
0
0
0
0
0
38
22
b5b8d9b15a585714c65998304ca44e6f5f5f48fc
3,214
py
Python
train_mask_detector.py
ali-commits/pyhtonML-FaceMaskDetection
506294ba97786b2eb9c63936d9078eca4d5b4707
[ "MIT" ]
null
null
null
train_mask_detector.py
ali-commits/pyhtonML-FaceMaskDetection
506294ba97786b2eb9c63936d9078eca4d5b4707
[ "MIT" ]
null
null
null
train_mask_detector.py
ali-commits/pyhtonML-FaceMaskDetection
506294ba97786b2eb9c63936d9078eca4d5b4707
[ "MIT" ]
null
null
null
from tensorflow.keras.preprocessing.image import ImageDataGenerator from tensorflow.keras.preprocessing.image import img_to_array from tensorflow.keras.preprocessing.image import load_img from tensorflow.keras.applications import MobileNetV2 from tensorflow.keras.applications.mobilenet_v2 import preprocess_input from t...
28.442478
86
0.756067
from tensorflow.keras.preprocessing.image import ImageDataGenerator from tensorflow.keras.preprocessing.image import img_to_array from tensorflow.keras.preprocessing.image import load_img from tensorflow.keras.applications import MobileNetV2 from tensorflow.keras.applications.mobilenet_v2 import preprocess_input from t...
0
0
0
0
0
0
0
-1
44
e22a9c687b78795ce4ef99ea128b7372e86e57eb
505
py
Python
api/test/test_statics_inhabitants.py
Viet2503/rki-vaccination-data
a40ff7be7e55850f5184cebc3cc1049541c87282
[ "MIT" ]
27
2020-12-30T06:47:23.000Z
2021-12-05T14:14:53.000Z
api/test/test_statics_inhabitants.py
rphl/rki-vaccination-data
360f1456613bfd2f0e6199016dde3941ed6f234a
[ "MIT" ]
56
2020-12-31T09:00:57.000Z
2022-01-19T18:17:15.000Z
api/test/test_statics_inhabitants.py
rphl/rki-vaccination-data
360f1456613bfd2f0e6199016dde3941ed6f234a
[ "MIT" ]
7
2020-12-30T13:39:58.000Z
2021-11-21T13:52:53.000Z
""" Unittest """ import unittest # pylint: disable=import-error if __name__ == '__main__': unittest.main()
28.055556
62
0.724752
""" Unittest """ import unittest # pylint: disable=import-error from _utils.statics import inhabitants class TestModuleStaticsInhabitants(unittest.TestCase): """ Test Module for statics.inhabitants """ def test_total(self): """ Test for inhabitants.TOTAL """ self.assertEqual(type(inhabitants.TOTAL).__name_...
0
0
0
333
0
0
0
17
45
a102ca24a694ce5cda55ec16de27a47047d2234b
21,181
py
Python
nestedsulcusfeatures_HBM2011/register_to_template.py
binarybottle/nestedsulcusfeatures_HBM2011
4a1e064316b73c268c49383a34f49baca23cef93
[ "Apache-2.0" ]
null
null
null
nestedsulcusfeatures_HBM2011/register_to_template.py
binarybottle/nestedsulcusfeatures_HBM2011
4a1e064316b73c268c49383a34f49baca23cef93
[ "Apache-2.0" ]
null
null
null
nestedsulcusfeatures_HBM2011/register_to_template.py
binarybottle/nestedsulcusfeatures_HBM2011
4a1e064316b73c268c49383a34f49baca23cef93
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python """ Register brains, landmarks, and labels to a template. (c) 2011, @rno klein """ import os from os.path import exists from subprocess import call from numpy import float, isnan # Run intensity-based registration # 1. Register brains to template # 2. Transform brains to each other via template # 3...
50.672249
108
0.507153
#!/usr/bin/python """ Register brains, landmarks, and labels to a template. (c) 2011, @rno klein """ import os from os.path import exists from subprocess import call from numpy import float, isnan # Run intensity-based registration # 1. Register brains to template # 2. Transform brains to each other via template # 3...
0
0
0
0
0
0
0
0
0
74727a6c79fe3a6e89dbf9ba47e01f093de21c57
574
py
Python
EfficientCoding/Assignment-1-equilibriumindex.py
vikbehal/Explore
b35948d8a6894647df3ee462746475f7e66f78f8
[ "MIT" ]
3
2019-01-29T06:33:34.000Z
2022-01-26T20:01:04.000Z
EfficientCoding/Assignment-1-equilibriumindex.py
vikbehal/Explore
b35948d8a6894647df3ee462746475f7e66f78f8
[ "MIT" ]
null
null
null
EfficientCoding/Assignment-1-equilibriumindex.py
vikbehal/Explore
b35948d8a6894647df3ee462746475f7e66f78f8
[ "MIT" ]
1
2022-03-11T10:47:29.000Z
2022-03-11T10:47:29.000Z
#inputString = input() inputString = "3,-4, 2, -1,-3, 2, 1" inputList = [int(val) for val in inputString.split(",")] print(solve(inputList))
22.076923
57
0.557491
def solve(inputList): # Edge cases if sum(inputList[1:]) == 0: return 0 totalItems = len(inputList) if sum(inputList[:totalItems - 1]) == 0: return totalItems - 1 leftSum = 0 rightSum = sum(inputList) for idx, item in enumerate(inputList): rightSum -= it...
0
0
0
0
0
404
0
0
23
90e2e88ba073a5e73d350beeba17dadc19ce1da1
390
py
Python
rplugin/python3/defx/session.py
roachsinai/defx.nvim
609e858b5211ec4de45cb93045ab320c961048b2
[ "MIT" ]
1,229
2017-01-03T13:21:59.000Z
2022-03-29T06:33:20.000Z
rplugin/python3/defx/session.py
roachsinai/defx.nvim
609e858b5211ec4de45cb93045ab320c961048b2
[ "MIT" ]
295
2017-12-07T02:38:55.000Z
2022-03-29T00:30:52.000Z
rplugin/python3/defx/session.py
roachsinai/defx.nvim
609e858b5211ec4de45cb93045ab320c961048b2
[ "MIT" ]
136
2018-07-20T02:57:54.000Z
2022-03-01T00:30:36.000Z
# ============================================================================ # FILE: session.py # AUTHOR: Shougo Matsushita <Shougo.Matsu at gmail.com> # License: MIT license # ============================================================================
27.857143
78
0.402564
# ============================================================================ # FILE: session.py # AUTHOR: Shougo Matsushita <Shougo.Matsu at gmail.com> # License: MIT license # ============================================================================ import typing class Session(typing.NamedTuple): name: str...
0
0
0
95
0
0
0
-8
46
6ee29bfe43fc37be3cb3d8d63953bf79d532f4aa
1,973
py
Python
vae.py
chauhankaranraj/ELDR-pytorch
99d40186e960933e6f0ae18270530f3534741296
[ "MIT" ]
null
null
null
vae.py
chauhankaranraj/ELDR-pytorch
99d40186e960933e6f0ae18270530f3534741296
[ "MIT" ]
null
null
null
vae.py
chauhankaranraj/ELDR-pytorch
99d40186e960933e6f0ae18270530f3534741296
[ "MIT" ]
null
null
null
# NOTE: this code is currently copypasta'd from pytorch official examples repo at # https://github.com/pytorch/examples/blob/master/vae/main.py # In the future, this could probably be added as a submodule import torch.nn as nn # Reconstruction + KL divergence losses summed over all elements and batch
34.017241
81
0.660416
# NOTE: this code is currently copypasta'd from pytorch official examples repo at # https://github.com/pytorch/examples/blob/master/vae/main.py # In the future, this could probably be added as a submodule import pdb import torch import torch.nn as nn import torch.nn.functional as F class VAE(nn.Module): def __ini...
0
0
0
813
0
753
0
-10
112
35744b0cc75c7d6a7b087efb811ee192fa489500
318
py
Python
onfido/apps.py
snicks1/django-onfido
7288552c6a156d022539d4d22d7f5a0236018ada
[ "MIT" ]
null
null
null
onfido/apps.py
snicks1/django-onfido
7288552c6a156d022539d4d22d7f5a0236018ada
[ "MIT" ]
null
null
null
onfido/apps.py
snicks1/django-onfido
7288552c6a156d022539d4d22d7f5a0236018ada
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*-
19.875
50
0.625786
# -*- coding: utf-8 -*- from django.apps import AppConfig class OnfidoAppConfig(AppConfig): """AppConfig for Django-Onfido.""" name = 'onfido' verbose_name = "Onfido" configs = [] def ready(self): """Validate config and connect signals.""" super(OnfidoAppConfig, self).ready()
0
0
0
236
0
0
0
12
45
6f54454045f345a91f5cdf3456d3e88496e7aada
8,242
py
Python
bob/bio/face/database/pola_thermal.py
bioidiap/bob.bio.face
2341e6423ca5a412ebe23fa18acacd69ea1ef914
[ "BSD-3-Clause" ]
4
2016-09-01T13:16:46.000Z
2021-09-03T03:27:18.000Z
bob/bio/face/database/pola_thermal.py
bioidiap/bob.bio.face
2341e6423ca5a412ebe23fa18acacd69ea1ef914
[ "BSD-3-Clause" ]
6
2015-09-02T19:31:15.000Z
2016-10-10T21:48:39.000Z
bob/bio/face/database/pola_thermal.py
bioidiap/bob.bio.face
2341e6423ca5a412ebe23fa18acacd69ea1ef914
[ "BSD-3-Clause" ]
6
2015-10-07T17:18:48.000Z
2017-07-18T19:41:14.000Z
#!/usr/bin/env python # vim: set fileencoding=utf-8 : # Tiago de Freitas Pereira <tiago.pereira@idiap.ch> """ PolaThermal database: database implementation """
45.038251
314
0.609803
#!/usr/bin/env python # vim: set fileencoding=utf-8 : # Tiago de Freitas Pereira <tiago.pereira@idiap.ch> """ PolaThermal database: database implementation """ from bob.bio.base.database import CSVDataset from bob.bio.base.database import CSVToSampleLoaderBiometrics from bob.bio.face.database.sample_loaders import ...
20
2,601
0
5,136
0
0
0
153
178
9afdc4c833bc248918013ec47848b1b410c62331
5,661
py
Python
Repository_files/TLCS/models/create_plots.py
kraken24/mhp_hackathon_sustainable_traffic_light_challenge
0b4c61968d54c7e8faceb07a2c78c70570a2e162
[ "CC0-1.0" ]
null
null
null
Repository_files/TLCS/models/create_plots.py
kraken24/mhp_hackathon_sustainable_traffic_light_challenge
0b4c61968d54c7e8faceb07a2c78c70570a2e162
[ "CC0-1.0" ]
null
null
null
Repository_files/TLCS/models/create_plots.py
kraken24/mhp_hackathon_sustainable_traffic_light_challenge
0b4c61968d54c7e8faceb07a2c78c70570a2e162
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sat Mar 5 02:12:12 2022 @author: Kraken Project: MHP Hackathon """ import os import pandas as pd import matplotlib.pyplot as plt plt.rcParams.update({'font.size': 16}) WORKING_DIR = "model_14" WORKING_DIR2 = "model_12" # "model_8": dqn with fixed weights # "model_4": dqn MVG_...
35.161491
84
0.585409
# -*- coding: utf-8 -*- """ Created on Sat Mar 5 02:12:12 2022 @author: Kraken Project: MHP Hackathon """ import os import pandas as pd import matplotlib.pyplot as plt plt.rcParams.update({'font.size': 16}) WORKING_DIR = "model_14" WORKING_DIR2 = "model_12" # "model_8": dqn with fixed weights # "model_4": dqn MVG_...
0
0
0
0
0
0
0
0
0
ab4dcf42708ad98c9f00d476dd47908b95919fce
22,998
py
Python
src/deepke/relation_extraction/multimodal/models/clip/feature_extraction_utils.py
johncolezhang/DeepKE
ea4552ec42cb003a835f00fc14fb454f9a9a7183
[ "MIT" ]
3
2022-02-18T05:03:02.000Z
2022-03-19T12:32:16.000Z
src/deepke/relation_extraction/multimodal/models/clip/feature_extraction_utils.py
johncolezhang/DeepKE
ea4552ec42cb003a835f00fc14fb454f9a9a7183
[ "MIT" ]
null
null
null
src/deepke/relation_extraction/multimodal/models/clip/feature_extraction_utils.py
johncolezhang/DeepKE
ea4552ec42cb003a835f00fc14fb454f9a9a7183
[ "MIT" ]
null
null
null
# coding=utf-8 # Copyright 2021 The HuggingFace Inc. team. # # 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...
44.226923
189
0.651709
# coding=utf-8 # Copyright 2021 The HuggingFace Inc. team. # # 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...
0
13,374
0
7,725
0
197
0
137
348
781ab1b68d7175d472282dd2c34637ddada37ab7
23,855
py
Python
tests/test_outputs_handler_matsim_xml_writer.py
arup-group/genet
24bfbee31da6d7951598adb29ddf17d3a08ed5e6
[ "MIT" ]
22
2020-12-22T11:11:44.000Z
2022-03-07T16:25:35.000Z
tests/test_outputs_handler_matsim_xml_writer.py
tkahng/genet
d5c29ed9e44408b60f55d8de889d7430debc9f04
[ "MIT" ]
27
2020-12-22T09:45:35.000Z
2022-03-03T14:52:24.000Z
tests/test_outputs_handler_matsim_xml_writer.py
tkahng/genet
d5c29ed9e44408b60f55d8de889d7430debc9f04
[ "MIT" ]
7
2021-01-02T10:00:05.000Z
2022-01-06T03:53:43.000Z
import os, sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) pt2matsim_network_test_file = os.path.abspath( os.path.join(os.path.dirname(__file__), "test_data", "matsim", "network.xml")) pt2matsim_schedule_file = os.path.abspath( os.path.join(os.path.dirname(__file__), "tes...
51.634199
117
0.57686
import os, sys import pytest import lxml from copy import deepcopy from shapely.geometry import LineString from tests.fixtures import network_object_from_test_data, full_fat_default_config_path, assert_semantically_equal from tests import xml_diff from genet.outputs_handler import matsim_xml_writer from genet.core impo...
0
980
0
0
0
21,371
0
203
794
6fc066cfaa85a48df43cc8e9329854aaebfcadd0
7,123
py
Python
lesson04/likangwen/lession04_hw.py
herrywen-nanj/51reboot
1130c79a360e1b548a6eaad176eb60f8bed22f40
[ "Apache-2.0" ]
null
null
null
lesson04/likangwen/lession04_hw.py
herrywen-nanj/51reboot
1130c79a360e1b548a6eaad176eb60f8bed22f40
[ "Apache-2.0" ]
null
null
null
lesson04/likangwen/lession04_hw.py
herrywen-nanj/51reboot
1130c79a360e1b548a6eaad176eb60f8bed22f40
[ "Apache-2.0" ]
null
null
null
# RESULT = {} # USERINFO = ("admin", "123456") USERINFO = ("a", "a") FIELDS = ['name', 'age', 'tel', 'email'] # RESULT.append(FIELDS) FORMAT = """ ==================================================================== 1. username age tel email 2. 2.1 add # add monkey 12 132xxx monkey@51reboot.com ...
28.955285
106
0.491226
import sys import getpass import json from prettytable import PrettyTable import pandas import logging import os.path import time # 定义变量 RESULT = {} # USERINFO = ("admin", "123456") USERINFO = ("a", "a") FIELDS = ['name', 'age', 'tel', 'email'] # RESULT.append(FIELDS) FORMAT = """ ==================================...
1,200
0
0
0
0
5,572
0
-46
441
d33ec8e728c20478a449e26f8c58c3e1196d416e
8,511
py
Python
troposphere_mate/core/orchestration.py
tsuttsu305/troposphere_mate-project
15ee94cc913efb32bc991979efcad943c992074c
[ "MIT" ]
10
2019-07-08T14:52:16.000Z
2021-10-15T22:18:22.000Z
troposphere_mate/core/orchestration.py
tsuttsu305/troposphere_mate-project
15ee94cc913efb32bc991979efcad943c992074c
[ "MIT" ]
1
2019-07-08T00:36:50.000Z
2019-07-08T00:36:50.000Z
troposphere_mate/core/orchestration.py
tsuttsu305/troposphere_mate-project
15ee94cc913efb32bc991979efcad943c992074c
[ "MIT" ]
2
2020-03-22T14:44:54.000Z
2020-08-05T02:08:01.000Z
# -*- coding: utf-8 -*- """ Implement a Orchestration Framework. """ try: except: pass def resolve_pipeline(plan): """ :type plan: List[Tuple[str, str]] :param plan: [(can_id, tag), ...] :rtype: List[Tuple[List[str], str]]] """ pipeline_change_set = list() job = ([], None) pre...
29.655052
99
0.602397
# -*- coding: utf-8 -*- """ Implement a Orchestration Framework. """ try: from typing import List, Tuple, Dict, Type except: pass import attr from collections import OrderedDict from pathlib_mate import PathCls as Path from .mate import AWSObject, Template from .canned import Canned def resolve_pipeline(p...
1,011
1,916
0
4,916
0
0
0
65
298
c14cc8c968eafae9faee4ceccaee3b5b93fb10da
4,863
py
Python
findfaceApp/findeyes/frol.py
WilShi/unity_tool
14df85aec6f2c889a3c7bf4f88d6632029f96bef
[ "MIT" ]
null
null
null
findfaceApp/findeyes/frol.py
WilShi/unity_tool
14df85aec6f2c889a3c7bf4f88d6632029f96bef
[ "MIT" ]
null
null
null
findfaceApp/findeyes/frol.py
WilShi/unity_tool
14df85aec6f2c889a3c7bf4f88d6632029f96bef
[ "MIT" ]
null
null
null
from sys import argv if __name__ == "__main__": Frol().startfind(argv[1])
28.946429
127
0.544931
import datetime from sys import argv import tensorflow as tf import os import glob from skimage import io import matplotlib.pyplot as plt from multiprocessing import Process from PIL import Image, ImageDraw from pathlib import Path from PyQt5.QtWidgets import QApplication, QWidget, QMessageBox import qdarkstyle imp...
156
0
0
4,318
0
0
0
68
336
d6ccd34a5a30b7522fa57f541100cb9301ffad9e
1,971
py
Python
pixeldrain.py
FayasNoushad/Pixeldrain
e8d620986f3d186b6c472b75db8bd3dad58bf4b5
[ "MIT" ]
5
2021-11-28T12:03:12.000Z
2021-12-29T03:14:06.000Z
pixeldrain.py
FayasNoushad/Pixeldrain
e8d620986f3d186b6c472b75db8bd3dad58bf4b5
[ "MIT" ]
null
null
null
pixeldrain.py
FayasNoushad/Pixeldrain
e8d620986f3d186b6c472b75db8bd3dad58bf4b5
[ "MIT" ]
1
2021-12-21T02:42:41.000Z
2021-12-21T02:42:41.000Z
import requests def upload_file(file): """ Upload a file to pixeldrain upload_file(file) """ response = requests.post( "https://pixeldrain.com/api/file", data={"anonymous": True}, files={"file": open(file, "rb")} ) return response.json() def file(file_id): ...
28.157143
136
0.646372
import requests def upload_file(file): """ Upload a file to pixeldrain upload_file(file) """ response = requests.post( "https://pixeldrain.com/api/file", data={"anonymous": True}, files={"file": open(file, "rb")} ) return response.json() def file(file_id): ...
0
0
0
0
0
0
0
0
0
72b3cfe0b7ace9709b11fe2908ccaeabc29f1262
1,359
py
Python
08.Regression/8.2.LinearRegression_CV.py
radiumweilei/chinahadoop-ml-2
ea886610a6ccb278afeff759bf2dc8a30ef3f275
[ "Apache-2.0" ]
null
null
null
08.Regression/8.2.LinearRegression_CV.py
radiumweilei/chinahadoop-ml-2
ea886610a6ccb278afeff759bf2dc8a30ef3f275
[ "Apache-2.0" ]
null
null
null
08.Regression/8.2.LinearRegression_CV.py
radiumweilei/chinahadoop-ml-2
ea886610a6ccb278afeff759bf2dc8a30ef3f275
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding:utf-8 -*- import numpy as np import matplotlib.pyplot as plt import pandas as pd from sklearn.model_selection import train_test_split from sklearn.linear_model import Lasso from sklearn.model_selection import GridSearchCV if __name__ == "__main__": # pandas data = pd.read_csv('8...
32.357143
98
0.658572
#!/usr/bin/python # -*- coding:utf-8 -*- import numpy as np import matplotlib.pyplot as plt import pandas as pd from sklearn.model_selection import train_test_split from sklearn.linear_model import Lasso, Ridge, ElasticNet from sklearn.model_selection import GridSearchCV if __name__ == "__main__": # pandas读入 ...
105
0
0
0
0
0
0
19
0
549b9bd68f1c4944ff9d770440583ba0a6c1005e
1,967
py
Python
lbrynet/daemon/auth/factory.py
vyaspranjal33/lbry
e03e41ad3105ccc0d8d8891b0e9fa63f9bbfce34
[ "MIT" ]
null
null
null
lbrynet/daemon/auth/factory.py
vyaspranjal33/lbry
e03e41ad3105ccc0d8d8891b0e9fa63f9bbfce34
[ "MIT" ]
null
null
null
lbrynet/daemon/auth/factory.py
vyaspranjal33/lbry
e03e41ad3105ccc0d8d8891b0e9fa63f9bbfce34
[ "MIT" ]
null
null
null
import logging log = logging.getLogger(__name__)
38.568627
107
0.688866
import logging from twisted.web import server, guard, resource from twisted.cred import portal from lbrynet import conf from .auth import PasswordChecker, HttpPasswordRealm from ..auth.keyring import Keyring log = logging.getLogger(__name__) class HTTPJSONRPCFactory(server.Site): def __init__(self, resource, k...
0
0
0
1,650
0
0
0
83
181
f9abc59e0046c917fae8331d828bf949fa2bf3b8
11,840
py
Python
http_async_client/base.py
jossefaz/async-http-client
74fe7540d1781d64d41161350019bc5ccfec6426
[ "MIT" ]
1
2021-12-05T21:01:59.000Z
2021-12-05T21:01:59.000Z
http_async_client/base.py
jossefaz/http-async-client
74fe7540d1781d64d41161350019bc5ccfec6426
[ "MIT" ]
null
null
null
http_async_client/base.py
jossefaz/http-async-client
74fe7540d1781d64d41161350019bc5ccfec6426
[ "MIT" ]
null
null
null
async_client_factory = BaseRESTAsyncClient.get_instance
40.409556
157
0.601098
from functools import partial from typing import Union, Dict, Optional from http_async_client.enums import SupportedProtocols, Methods import httpx import re from dataclasses import dataclass from httpx._types import RequestContent, URLTypes, RequestData, RequestFiles, QueryParamTypes, HeaderTypes, CookieTypes from nan...
0
2,305
4,727
4,281
0
0
0
155
311
da8499f0797074b5c7fabba9eb9bbeb7b0b66b09
728
py
Python
examples/textArea.py
tgolsson/appJar
5e2f8bff44e927e7c2bae17fccddc6dbf79952f0
[ "Apache-2.0" ]
666
2016-11-14T18:17:40.000Z
2022-03-29T03:53:22.000Z
examples/textArea.py
tgolsson/appJar
5e2f8bff44e927e7c2bae17fccddc6dbf79952f0
[ "Apache-2.0" ]
598
2016-10-20T21:04:09.000Z
2022-03-15T22:44:49.000Z
examples/textArea.py
tgolsson/appJar
5e2f8bff44e927e7c2bae17fccddc6dbf79952f0
[ "Apache-2.0" ]
95
2017-01-19T12:23:58.000Z
2022-03-06T18:16:21.000Z
import sys sys.path.append("../") from appJar import gui app=gui() app.addScrolledTextArea("t1") app.setTextAreaChangeFunction("t1", press) app.addButtons(["CLEAR", "SET"], press) app.addButtons(["LOG", "CHECK"], log) app.addCheckBox("CALL") app.addCheckBox("END") app.addEntry("text") app.go()
23.483871
117
0.637363
import sys sys.path.append("../") from appJar import gui def press(btn=None): if btn == "CLEAR": app.clearTextArea("t1", callFunction=app.getCheckBox("CALL")) elif btn == "SET": app.setTextArea("t1", app.getEntry("text"), callFunction=app.getCheckBox("CALL"), end=app.getCheckBox("END")) els...
0
0
0
0
0
383
0
0
46
588b761156ea659c9c346c22dd0ae03fb49cf417
12,480
py
Python
dp_multiq/tree.py
michaeljneely/google-research
8028769662d23426be6d316e4ab954e8c85cf8fe
[ "Apache-2.0" ]
1
2021-08-15T20:03:51.000Z
2021-08-15T20:03:51.000Z
dp_multiq/tree.py
michaeljneely/google-research
8028769662d23426be6d316e4ab954e8c85cf8fe
[ "Apache-2.0" ]
12
2021-08-25T16:15:31.000Z
2022-02-10T05:10:37.000Z
dp_multiq/tree.py
michaeljneely/google-research
8028769662d23426be6d316e4ab954e8c85cf8fe
[ "Apache-2.0" ]
1
2021-05-09T07:26:31.000Z
2021-05-09T07:26:31.000Z
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
35.965418
127
0.685817
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
0
0
0
9,457
0
0
0
-13
68
81b0da0e4b675061328ec8d1c6ae3f7c6c0db455
5,077
py
Python
kaa/exts/games/_cards.py
haasosaurus/kaa
476fc93e2c6c9a75c2eaf70f189ef993e877f896
[ "MIT" ]
2
2021-11-16T01:18:18.000Z
2021-12-28T06:53:34.000Z
kaa/exts/games/_cards.py
haasosaurus/pythonidae
476fc93e2c6c9a75c2eaf70f189ef993e877f896
[ "MIT" ]
null
null
null
kaa/exts/games/_cards.py
haasosaurus/pythonidae
476fc93e2c6c9a75c2eaf70f189ef993e877f896
[ "MIT" ]
5
2020-02-23T00:50:30.000Z
2020-06-24T07:42:45.000Z
# -*- coding: utf-8 -*- if __name__ == '__main__': tests()
22.766816
128
0.515068
# -*- coding: utf-8 -*- import enum import random from typing import Union class Card: """ represents a single playing card """ class Suit(enum.Enum): SPADES = ('Spades', 'S', '♠️') DIAMONDS = ('Diamonds', 'D', '♣️') CLUBS = ('Clubs', 'C', '♥️') HEARTS = ('Hearts', '...
264
0
0
3,201
0
1,615
0
-15
136
c48e6a44c4da3a2f27992537d69968cbcb561fe2
1,806
py
Python
nipype/interfaces/freesurfer/__init__.py
effigies/nipype
18fe222557cf3b9627e06b2a66fba589feaca581
[ "Apache-2.0" ]
null
null
null
nipype/interfaces/freesurfer/__init__.py
effigies/nipype
18fe222557cf3b9627e06b2a66fba589feaca581
[ "Apache-2.0" ]
2
2017-10-05T21:08:38.000Z
2018-10-09T23:01:23.000Z
nipype/interfaces/freesurfer/__init__.py
effigies/nipype
18fe222557cf3b9627e06b2a66fba589feaca581
[ "Apache-2.0" ]
null
null
null
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Top-level namespace for freesurfer."""
66.888889
91
0.668328
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Top-level namespace for freesurfer.""" from .base import Info, FSCommand, no_freesurfer from .preprocess import (ParseDICOMDir, UnpackSDICOMDir, MRIConvert, Resample, ReconAll, ...
0
0
0
0
0
0
0
1,517
133
e0e9a4a6b64f80ce663be8d5634e8732072df3c3
211
py
Python
WEEKS/CD_Sata-Structures/_RESOURCES/CODESIGNAL/valid_time.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
WEEKS/CD_Sata-Structures/_RESOURCES/CODESIGNAL/valid_time.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
WEEKS/CD_Sata-Structures/_RESOURCES/CODESIGNAL/valid_time.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
def validTime(time): """ Boolean indicating if time is in valid 24hr format """ tokens = time.split(':') hours = int(tokens[0]) minutes = int(tokens[1]) return not (hours > 23 or minutes > 59)
26.375
51
0.625592
def validTime(time): """ Boolean indicating if time is in valid 24hr format """ tokens = time.split(':') hours = int(tokens[0]) minutes = int(tokens[1]) return not (hours > 23 or minutes > 59)
0
0
0
0
0
0
0
0
0
af5759f25b7a68cffdc5af17722bac8dc2f24f92
1,672
py
Python
copy_csv_res.py
Murilodsv/py-jules
601ca9e6fbad7fe82404f5296babb04583ddda95
[ "MIT" ]
null
null
null
copy_csv_res.py
Murilodsv/py-jules
601ca9e6fbad7fe82404f5296babb04583ddda95
[ "MIT" ]
null
null
null
copy_csv_res.py
Murilodsv/py-jules
601ca9e6fbad7fe82404f5296babb04583ddda95
[ "MIT" ]
1
2020-04-13T17:23:54.000Z
2020-04-13T17:23:54.000Z
# -*- coding: utf-8 -*- """ Created on Tue Apr 20 13:32:20 2021 #--- Copy csv results to single folder based on dashboard_db.csv #--- Murilo Vianna (murilodsv@gmail.com) #--- May, 2021. #--- Dev-log in: https://github.com/Murilodsv/py-jules @author: muril """ # DEBUG import os; os.chdir('C:/M...
24.588235
89
0.504785
# -*- coding: utf-8 -*- """ Created on Tue Apr 20 13:32:20 2021 #--- Copy csv results to single folder based on dashboard_db.csv #--- Murilo Vianna (murilodsv@gmail.com) #--- May, 2021. #--- Dev-log in: https://github.com/Murilodsv/py-jules @author: muril """ # DEBUG import os; os.chdir('C:/M...
0
0
0
0
0
0
0
0
0
761134a35bd916ec48ce32ff5660748d454f087a
68
py
Python
dtale_desktop/default_sources/dft_csv/metadata.py
dennislwm/dtale-desktop
1a034d505f6b45c1ece4c18b83af6ae367d16824
[ "MIT" ]
154
2020-10-27T00:33:51.000Z
2022-02-19T13:16:36.000Z
dtale_desktop/default_sources/dft_csv/metadata.py
dennislwm/dtale-desktop
1a034d505f6b45c1ece4c18b83af6ae367d16824
[ "MIT" ]
9
2020-10-26T23:48:38.000Z
2021-02-18T04:13:42.000Z
dtale_desktop/default_sources/dft_csv/metadata.py
dennislwm/dtale-desktop
1a034d505f6b45c1ece4c18b83af6ae367d16824
[ "MIT" ]
15
2021-01-31T01:11:20.000Z
2022-02-17T11:41:27.000Z
import os display_name = f"csv files in {os.path.expanduser('~')}"
17
56
0.691176
import os display_name = f"csv files in {os.path.expanduser('~')}"
0
0
0
0
0
0
0
0
0
8a65b2fac9052c66b04cfc5adb41cf66fe6c89b0
790
py
Python
filter_plugins/wrap_list_elements.py
major/ansible-role-aptly
ca975fe854831c0694c0b5dc56be9ac056b7602c
[ "MIT" ]
2
2017-01-24T14:58:25.000Z
2017-05-23T08:10:28.000Z
filter_plugins/wrap_list_elements.py
major/ansible-role-aptly
ca975fe854831c0694c0b5dc56be9ac056b7602c
[ "MIT" ]
8
2016-12-05T14:33:55.000Z
2018-07-19T15:33:02.000Z
filter_plugins/wrap_list_elements.py
major/ansible-role-aptly
ca975fe854831c0694c0b5dc56be9ac056b7602c
[ "MIT" ]
7
2015-11-01T15:05:09.000Z
2019-01-18T09:35:54.000Z
from ansible import errors # # Additional Jinja2 filter to wrap list elements with quote # def wrap_list_elements(arg): """ Wrap each list element with quote, to use before join filter :param arg: the brute list to manage :type arg: list :return: quoted elements :rtype: l...
21.351351
68
0.634177
from ansible import errors # # Additional Jinja2 filter to wrap list elements with quote # def wrap_list_elements(arg): """ Wrap each list element with quote, to use before join filter :param arg: the brute list to manage :type arg: list :return: quoted elements :rtype: l...
0
0
0
197
0
0
0
0
23