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
b6bc12c6e394a41260819455fc1fa669f92ddc79
1,262
py
Python
第 5 课 递归函数答案.py
xrandx/-Dating-with-python-this-winter
d242faeda1598d50c3b371deeccfbbe3bbc8fb51
[ "Apache-2.0" ]
3
2021-01-03T10:10:25.000Z
2021-01-11T06:13:40.000Z
第 5 课 递归函数答案.py
xrandx/-Dating-with-python-this-winter
d242faeda1598d50c3b371deeccfbbe3bbc8fb51
[ "Apache-2.0" ]
null
null
null
第 5 课 递归函数答案.py
xrandx/-Dating-with-python-this-winter
d242faeda1598d50c3b371deeccfbbe3bbc8fb51
[ "Apache-2.0" ]
2
2021-01-08T10:12:17.000Z
2021-01-19T02:03:32.000Z
# 1. x, y # 2. (a, b) = (b, r) # a < b a % b = a, a = a + 0 * b # 3. 0x % 0 = x # 1. nfactorial(n) # 2. n! = n * (n - 1)! # 3. n = 1 n = 0 1 # 1. shorter, longer, k divingBoard # 2. k = k - 1 # 3. 0 0 # leetcode if __name__ == '__main__': main()
25.755102
104
0.515055
# 1. 初始条件是 x, y # 2. 辗转相除法利用的是 (a, b)的最大公约数 = (b, r)的最大公约数,于是可以利用这个降低问题规模 # 注:如果 a < b, 则 a % b = a, 即 a = a + 0 * b # 3. 确定终止条件,如果余数为 0,就要终止,任意的x % 0 = x, 为返回值 def gcd(x, y): if y == 0: return x else: return gcd(y, x % y) # 1. 初始条件是 n,factorial(n) 得出 阶乘结果 # 2. n! = n * (n...
844
0
0
424
0
147
0
0
90
794169ccb575a21eac75486dff0e6dc33e09ec6e
18,209
py
Python
DICOM_RT/DicomPatient.py
mghro/MIRDCalculation
aa2435d0f77a01c81c519a6f828f508cacf55830
[ "MIT" ]
null
null
null
DICOM_RT/DicomPatient.py
mghro/MIRDCalculation
aa2435d0f77a01c81c519a6f828f508cacf55830
[ "MIT" ]
null
null
null
DICOM_RT/DicomPatient.py
mghro/MIRDCalculation
aa2435d0f77a01c81c519a6f828f508cacf55830
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu May 27 16:09:19 2021 @author: alejandrobertolet """
45.866499
123
0.550277
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu May 27 16:09:19 2021 @author: alejandrobertolet """ from os import listdir import numpy as np import pydicom from rt_utils import RTStructBuilder import matplotlib.pylab as plt from datetime import datetime class DicomPatient: def __init__(self,...
0
0
0
17,773
0
0
0
23
238
4a0b36f9c3b8ed0a60ccc5fd28f057508843d7b4
1,005
py
Python
errorify/parse_verbs.py
wangwang110/PIE
474769e3c4266deefcb7dd5daf802a1306bc7c99
[ "MIT" ]
165
2019-10-08T09:54:46.000Z
2022-03-17T06:50:32.000Z
errorify/parse_verbs.py
wangwang110/PIE
474769e3c4266deefcb7dd5daf802a1306bc7c99
[ "MIT" ]
28
2019-11-02T07:06:26.000Z
2022-03-24T09:20:58.000Z
errorify/parse_verbs.py
wangwang110/PIE
474769e3c4266deefcb7dd5daf802a1306bc7c99
[ "MIT" ]
38
2019-12-05T06:01:54.000Z
2022-03-21T09:35:23.000Z
import pickle verbs_file = "morphs.txt" with open(verbs_file,"r") as ip_file: ip_lines = ip_file.readlines() words = {} for line in ip_lines: line = line.strip().split() if len(line) != 3: print(line) word = line[1] word_form = line[0] if word in words: words[word].add(word_form) else: words[w...
22.333333
78
0.633831
import pickle verbs_file = "morphs.txt" def expand_dict(d): result = {} for key in d: if key in result: result[key] = result[key].union(d[key].difference({key})) else: result[key] = d[key].difference({key}) for item in d[key]: if item in result: if item != key: result[item] = result[item].uni...
0
0
0
0
0
575
0
0
23
54f0e1fea1aae17b610a41e7a6948f90123eb03d
22,344
py
Python
endpoints/bookstore-grpc-transcoding/bookstore_pb2.py
yshalabi/python-docs-samples
591787c01d94102ba9205f998d95a05b39ccad2f
[ "Apache-2.0" ]
3
2021-01-24T23:42:57.000Z
2021-02-17T12:02:12.000Z
endpoints/bookstore-grpc-transcoding/bookstore_pb2.py
yshalabi/python-docs-samples
591787c01d94102ba9205f998d95a05b39ccad2f
[ "Apache-2.0" ]
320
2020-11-08T21:02:43.000Z
2022-02-10T10:43:29.000Z
endpoints/bookstore-grpc-transcoding/bookstore_pb2.py
yshalabi/python-docs-samples
591787c01d94102ba9205f998d95a05b39ccad2f
[ "Apache-2.0" ]
3
2019-02-11T16:16:11.000Z
2019-04-19T21:34:37.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: bookstore.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _ref...
37.364548
2,708
0.756758
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: bookstore.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _ref...
0
0
0
0
0
0
0
0
0
516bc14af357ac012042fe5c6a7082ff32bc50f5
85
py
Python
tests/test_json.py
thautwarm/PIE
314178a61b54052ddd3554429d131c432181b78e
[ "MIT" ]
null
null
null
tests/test_json.py
thautwarm/PIE
314178a61b54052ddd3554429d131c432181b78e
[ "MIT" ]
null
null
null
tests/test_json.py
thautwarm/PIE
314178a61b54052ddd3554429d131c432181b78e
[ "MIT" ]
null
null
null
from pie.json_loader import JsonLoader print(JsonLoader(__file__, __name__).load())
21.25
44
0.811765
from pie.json_loader import JsonLoader print(JsonLoader(__file__, __name__).load())
0
0
0
0
0
0
0
0
0
9ea2aee5e00c5f8bc65c102a1430ea40e42c9fb7
180
py
Python
104_manejoCadenas/metodoIsupper.py
josuerojasq/netacad_python
510c3a026f83e499144d91c00edc5045a8304a08
[ "MIT" ]
null
null
null
104_manejoCadenas/metodoIsupper.py
josuerojasq/netacad_python
510c3a026f83e499144d91c00edc5045a8304a08
[ "MIT" ]
null
null
null
104_manejoCadenas/metodoIsupper.py
josuerojasq/netacad_python
510c3a026f83e499144d91c00edc5045a8304a08
[ "MIT" ]
null
null
null
#El mtodo "isupper()" es la versin en mayscula de "islower()" # se concentra solo en letras maysculas print("Moooo".isupper()) print('moooo'.isupper()) print('MOOOO'.isupper())
36
64
0.722222
#El método "isupper()" es la versión en mayúscula de "islower()" # se concentra solo en letras mayúsculas print("Moooo".isupper()) print('moooo'.isupper()) print('MOOOO'.isupper())
8
0
0
0
0
0
0
0
0
77fb56a9c7349553448da175d675afdce50419e5
2,614
py
Python
Telecom-Churn-Prediction-with-Boosting/code.py
SaimaS786/ga-learner-dsmp-repo
905dbe0ed110016a951656c5dad0884519185950
[ "MIT" ]
null
null
null
Telecom-Churn-Prediction-with-Boosting/code.py
SaimaS786/ga-learner-dsmp-repo
905dbe0ed110016a951656c5dad0884519185950
[ "MIT" ]
null
null
null
Telecom-Churn-Prediction-with-Boosting/code.py
SaimaS786/ga-learner-dsmp-repo
905dbe0ed110016a951656c5dad0884519185950
[ "MIT" ]
null
null
null
# -------------- import pandas as pd from sklearn.model_selection import train_test_split #path - Path of file # Code starts here path df = pd.read_csv(path) X = df.drop(['Churn','customerID'],1) y = df['Churn'] X_train,X_test,y_train,y_test = train_test_split(X,y,test_size = 0.3, random_state = 0) # --------------...
28.725275
87
0.746366
# -------------- import pandas as pd from sklearn.model_selection import train_test_split #path - Path of file # Code starts here path df = pd.read_csv(path) X = df.drop(['Churn','customerID'],1) y = df['Churn'] X_train,X_test,y_train,y_test = train_test_split(X,y,test_size = 0.3, random_state = 0) # --------------...
0
0
0
0
0
0
0
-2
0
cbaa79c5fd2a2359b3e015681d4a979988e19197
3,698
py
Python
recordit/src/recordit/ros_recorder.py
ipa-jfh/robot_recorder
d9cc3edc99216653368d2bb679b7d1619142da8e
[ "BSD-3-Clause" ]
34
2018-06-14T15:32:46.000Z
2021-10-20T08:20:29.000Z
recordit/src/recordit/ros_recorder.py
ipa-jfh/robot_recorder
d9cc3edc99216653368d2bb679b7d1619142da8e
[ "BSD-3-Clause" ]
7
2018-05-11T17:03:45.000Z
2018-12-20T21:46:59.000Z
recordit/src/recordit/ros_recorder.py
ipa-jfh/robot_recorder
d9cc3edc99216653368d2bb679b7d1619142da8e
[ "BSD-3-Clause" ]
8
2018-08-30T13:03:04.000Z
2021-11-08T05:14:58.000Z
#!/usr/bin/env python
36.613861
80
0.598702
#!/usr/bin/env python import rospy from sensor_msgs.msg import JointState from tf.msg import tfMessage from std_srvs.srv import Trigger, TriggerResponse from urdf_parser_py.urdf import URDF from recordit.recorder import Recorder, sm from recordit.track import Track, LinJTrack, RotJTrack def resp(srv, *argv, **kwargs...
0
2,068
0
1,119
0
174
0
112
201
275b5ff4ce31a7e40d7e91bf34fc31b6184d9b64
705
py
Python
repaircafeapp/migrations/0002_auto_20211121_1238.py
paulgreg/repaircafesite
705e049fbd9ee2425dd1394dec1f508efd64daba
[ "MIT" ]
null
null
null
repaircafeapp/migrations/0002_auto_20211121_1238.py
paulgreg/repaircafesite
705e049fbd9ee2425dd1394dec1f508efd64daba
[ "MIT" ]
null
null
null
repaircafeapp/migrations/0002_auto_20211121_1238.py
paulgreg/repaircafesite
705e049fbd9ee2425dd1394dec1f508efd64daba
[ "MIT" ]
null
null
null
# Generated by Django 3.2.8 on 2021-11-21 11:38
24.310345
50
0.567376
# Generated by Django 3.2.8 on 2021-11-21 11:38 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('repaircafeapp', '0001_initial'), ] operations = [ migrations.AlterField( model_name='request', name='brand_text', ...
0
0
0
591
0
0
0
19
46
9033fa6a7be1b3ffeda43b07710cc2d85306b14f
782
py
Python
rongen/app.py
SteveUpton/dsr-lab
ee2f9d272f001fbe34c286b8f568d10a0a4aa956
[ "MIT" ]
4
2018-03-22T15:45:15.000Z
2019-11-12T16:27:20.000Z
rongen/app.py
SteveUpton/dsr-lab
ee2f9d272f001fbe34c286b8f568d10a0a4aa956
[ "MIT" ]
null
null
null
rongen/app.py
SteveUpton/dsr-lab
ee2f9d272f001fbe34c286b8f568d10a0a4aa956
[ "MIT" ]
2
2017-10-19T12:57:00.000Z
2019-03-01T13:27:49.000Z
import zmq HOST = '0.0.0.0' PORT = '4444' _context = zmq.Context() _publisher = _context.socket(zmq.PUB) url = 'tcp://{}:{}'.format(HOST, PORT) from flask import Flask app = Flask(__name__) if __name__ == '__main__': app.run(debug=True,host='0.0.0.0',port=5000)
20.051282
65
0.638107
import time import zmq HOST = '0.0.0.0' PORT = '4444' _context = zmq.Context() _publisher = _context.socket(zmq.PUB) url = 'tcp://{}:{}'.format(HOST, PORT) def publish_message(message): try: _publisher.bind(url) time.sleep(1) print "sending message : {0}".format(message, _publisher) ...
0
137
0
0
0
303
0
-18
90
3926ce3f8a67e95ff5af44db21ae9edc407bfd0a
1,195
py
Python
setup.py
dropbox/oid_translate
7276e742d9bff31a51c7bd2c897edd71c169883c
[ "Apache-2.0" ]
5
2015-03-31T17:08:02.000Z
2021-07-13T10:51:03.000Z
setup.py
dropbox/oid_translate
7276e742d9bff31a51c7bd2c897edd71c169883c
[ "Apache-2.0" ]
3
2015-02-26T23:46:30.000Z
2021-08-12T18:07:24.000Z
setup.py
dropbox/oid_translate
7276e742d9bff31a51c7bd2c897edd71c169883c
[ "Apache-2.0" ]
2
2015-02-26T19:51:59.000Z
2020-11-18T18:39:02.000Z
from distutils.core import setup, Extension execfile("oid_translate/version.py") _oid_translate = Extension("oid_translate._oid_translate", libraries = ["netsnmp"], sources = ["oid_translate/_oid_translate.c"]) kwargs = { "name": "oid_translate", "version": str(__versi...
35.147059
85
0.646025
from distutils.core import setup, Extension execfile("oid_translate/version.py") _oid_translate = Extension("oid_translate._oid_translate", libraries = ["netsnmp"], sources = ["oid_translate/_oid_translate.c"]) kwargs = { "name": "oid_translate", "version": str(__versi...
0
0
0
0
0
0
0
0
0
5dc5faccd0e9361bdf963a2eb61c601fcfd7068d
72
py
Python
src/ipyml/_version.py
lnijhawan1/ipyml
e194837b69c1d1834dd6078d5f6cdc6dab2b3b21
[ "BSD-3-Clause" ]
null
null
null
src/ipyml/_version.py
lnijhawan1/ipyml
e194837b69c1d1834dd6078d5f6cdc6dab2b3b21
[ "BSD-3-Clause" ]
11
2022-02-21T01:29:23.000Z
2022-03-08T17:10:47.000Z
src/ipyml/_version.py
lnijhawan1/ipyml
e194837b69c1d1834dd6078d5f6cdc6dab2b3b21
[ "BSD-3-Clause" ]
null
null
null
""" single source of truth for ipyml version """ __version__ = "0.1.0"
14.4
44
0.666667
""" single source of truth for ipyml version """ __version__ = "0.1.0"
0
0
0
0
0
0
0
0
0
299db6a37dfea0174d6c816711614b932773d9d7
3,826
py
Python
python/atlas_incljet2012_syst_classes.py
gibsjose/Spectrum
27047619129c5d5744b38b2d01bb8bb67305b75f
[ "MIT" ]
2
2018-11-26T05:03:50.000Z
2020-11-15T04:07:08.000Z
python/atlas_incljet2012_syst_classes.py
gibsjose/Spectrum
27047619129c5d5744b38b2d01bb8bb67305b75f
[ "MIT" ]
null
null
null
python/atlas_incljet2012_syst_classes.py
gibsjose/Spectrum
27047619129c5d5744b38b2d01bb8bb67305b75f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import math from subprocess import call import sys sys.path.insert(0, 'python') # import SpectrumSteering from SpectrumSteering import Gen from SpectrumSteering import Plot from SpectrumSteering import Graph from SpectrumSteering import EtaLoop #from optparse import Opt...
20.243386
114
0.706221
#!/usr/bin/env python # -*- coding: utf-8 -*- import math from subprocess import call import sys sys.path.insert(0, 'python') # import SpectrumSteering from SpectrumSteering import Gen from SpectrumSteering import Plot from SpectrumSteering import Graph from SpectrumSteering import EtaLoop #from optparse import Opt...
0
0
0
0
0
0
0
0
0
8b5425dad678d55ec5d15a37ad149f0c1f4a840b
4,905
py
Python
msh/mesh.py
acrovato/dg-flo
759263f80c92984b2c1dada11a09e17235b529ce
[ "Apache-2.0" ]
4
2020-11-25T18:33:14.000Z
2021-05-17T13:46:23.000Z
msh/mesh.py
acrovato/dg-flo
759263f80c92984b2c1dada11a09e17235b529ce
[ "Apache-2.0" ]
null
null
null
msh/mesh.py
acrovato/dg-flo
759263f80c92984b2c1dada11a09e17235b529ce
[ "Apache-2.0" ]
1
2021-12-11T13:21:37.000Z
2021-12-11T13:21:37.000Z
# -*- coding: utf8 -*- # test encoding: ----- # Copyright 2021 Adrien Crovato # # 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 re...
39.556452
131
0.520897
# -*- coding: utf8 -*- # test encoding: à-é-è-ô-ï-€ # Copyright 2021 Adrien Crovato # # 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 # # Unl...
13
0
0
4,101
0
0
0
20
112
cea014bdd701c43d272ebd105d7d0b23a0d1423c
825
py
Python
interview_preparation_kit/warm_up_challenges/counting_valleys/app.py
heiniovason/my_hackerrank_assignments
f1a3a393e071024cdc4a31c1775434f3ada61935
[ "MIT" ]
null
null
null
interview_preparation_kit/warm_up_challenges/counting_valleys/app.py
heiniovason/my_hackerrank_assignments
f1a3a393e071024cdc4a31c1775434f3ada61935
[ "MIT" ]
null
null
null
interview_preparation_kit/warm_up_challenges/counting_valleys/app.py
heiniovason/my_hackerrank_assignments
f1a3a393e071024cdc4a31c1775434f3ada61935
[ "MIT" ]
null
null
null
#!/bin/python3 # Complete the countingValleys function below. if __name__ == '__main__': n = 9 s = ['U', 'D', 'D', 'D', 'U', 'D', 'U', 'U'] print(countingValleys(n, s))
25.78125
66
0.489697
#!/bin/python3 import math import os # Complete the countingValleys function below. def countingValleys(n, s): counter = 0 if n >= 2 and n <= math.pow(10, 6): # Constraint 1 altitude = 0 for step in s: if step == 'U': # Constraint 2 if altitude == -1: ...
0
0
0
0
0
595
0
-22
67
2b342abed7b8f87984c27430c6d9b8e53170e474
26,744
py
Python
train.py
Akanni96/TRUNET
12dff08f2361848e13b0952540e2198db386eab8
[ "MIT" ]
4
2020-08-29T22:41:18.000Z
2021-05-28T03:21:33.000Z
train.py
Akanni96/TRUNET
12dff08f2361848e13b0952540e2198db386eab8
[ "MIT" ]
8
2020-08-30T10:12:11.000Z
2021-09-08T02:54:32.000Z
train.py
Akanni96/TRUNET
12dff08f2361848e13b0952540e2198db386eab8
[ "MIT" ]
3
2021-02-25T12:23:32.000Z
2021-11-17T09:37:05.000Z
import os os.environ["TF_CPP_MIN_LOG_LEVEL"] = "2" os.environ['TF_FORCE_GPU_ALLOW_GROWTH'] = 'true' import sys import tensorflow as tf from tensorflow.keras.mixed_precision import experimental as mixed_precision try: import tensorflow_addons as tfa except Exception as e: tfa = None import utilit...
53.2749
238
0.61539
from netCDF4 import Dataset, num2date import os os.environ["TF_CPP_MIN_LOG_LEVEL"] = "2" os.environ['TF_FORCE_GPU_ALLOW_GROWTH'] = 'true' import argparse import ast import gc import logging import math import sys import time import numpy as np import pandas as pd import psutil import tensorflow as t...
0
385
0
24,157
0
0
0
-58
350
961033a053b3636252c7937b8989284baad33175
524
py
Python
ideas/migrations/0007_auto_20190512_0019.py
neosergio/hackatrix-api
27f0180415efa97bd7345d100b314d8807486b67
[ "Apache-2.0" ]
1
2021-02-12T10:25:28.000Z
2021-02-12T10:25:28.000Z
ideas/migrations/0007_auto_20190512_0019.py
neosergio/hackatrix-api
27f0180415efa97bd7345d100b314d8807486b67
[ "Apache-2.0" ]
7
2020-02-21T00:53:38.000Z
2022-02-10T12:22:53.000Z
ideas/migrations/0007_auto_20190512_0019.py
neosergio/hackatrix-api
27f0180415efa97bd7345d100b314d8807486b67
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.1.7 on 2019-05-12 00:19
26.2
159
0.65458
# Generated by Django 2.1.7 on 2019-05-12 00:19 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('ideas', '0006_auto_20190511_2342'), ] operations = [ migrations.AlterField( model_name='idea', ...
0
0
0
377
0
0
0
30
68
d748fef321e3dfe0a3df6eff4f87a2943cbad06c
6,071
py
Python
jsonclasses/jsonclass.py
forever9717/jsonclasses
cc9bde67ceab220425b4855ebb59d432e6fd6ddc
[ "MIT" ]
null
null
null
jsonclasses/jsonclass.py
forever9717/jsonclasses
cc9bde67ceab220425b4855ebb59d432e6fd6ddc
[ "MIT" ]
null
null
null
jsonclasses/jsonclass.py
forever9717/jsonclasses
cc9bde67ceab220425b4855ebb59d432e6fd6ddc
[ "MIT" ]
null
null
null
""" This module contains `jsonclass`, the decorator for JSON Classes. """ from __future__ import annotations from jsonclasses.keypath import identical_key from typing import (Optional, Union, Callable, TypeVar, cast, TYPE_CHECKING) from dataclasses import dataclass from .jconf import (JConf, OnCreate, CanCreate, OnDele...
39.422078
78
0.656399
""" This module contains `jsonclass`, the decorator for JSON Classes. """ from __future__ import annotations from jsonclasses.keypath import identical_key from typing import ( Optional, Union, Callable, TypeVar, overload, cast, TYPE_CHECKING ) from dataclasses import dataclass from .jconf import ( JConf, OnCrea...
0
2,069
0
0
0
838
0
26
99
02886ea84452f450ff8a5d5a822654cbcf90ec35
2,591
py
Python
run_example/save_and_load_example.py
Ahren09/RecBole
b3921818dfbc1b81f9eda8d5e9f05bc9d9114089
[ "MIT" ]
null
null
null
run_example/save_and_load_example.py
Ahren09/RecBole
b3921818dfbc1b81f9eda8d5e9f05bc9d9114089
[ "MIT" ]
null
null
null
run_example/save_and_load_example.py
Ahren09/RecBole
b3921818dfbc1b81f9eda8d5e9f05bc9d9114089
[ "MIT" ]
null
null
null
# @Time : 2021/03/20 # @Author : Yushuo Chen # @Email : chenyushuo@ruc.edu.cn """ save and load example ======================== Here is the sample code for the save and load in RecBole. The path to saved data or model can be found in the output of RecBole. """ if __name__ == '__main__': save_example()
32.3875
115
0.705133
# @Time : 2021/03/20 # @Author : Yushuo Chen # @Email : chenyushuo@ruc.edu.cn """ save and load example ======================== Here is the sample code for the save and load in RecBole. The path to saved data or model can be found in the output of RecBole. """ import pickle from logging import getLogger import ...
0
0
0
0
0
1,955
0
138
181
ddf6428c0dc0980408683d7563278b037754f4ba
601
py
Python
Exemplos Python OpenCV/Seção 1/Ep 1 - read.py
3fred3/Pega_Visao
fdc1be48ee6ea0c8773ad459b99046a289f4ed63
[ "MIT" ]
null
null
null
Exemplos Python OpenCV/Seção 1/Ep 1 - read.py
3fred3/Pega_Visao
fdc1be48ee6ea0c8773ad459b99046a289f4ed63
[ "MIT" ]
null
null
null
Exemplos Python OpenCV/Seção 1/Ep 1 - read.py
3fred3/Pega_Visao
fdc1be48ee6ea0c8773ad459b99046a289f4ed63
[ "MIT" ]
null
null
null
import cv2 as cv # Lendo Imagens/Reading Images img = cv.imread('Exemplos Python OpenCV/Resources/Photos/cats.jpg') #cv.comando('NOME_JANELA') cv.imshow('Cats', img) #cv.comando('NOME_JANELA',VARIAVEL) cv.waitKey(0) #espera o usurio apertar o teclado # Lendo Videos/Reading Videos capture = cv.VideoCa...
27.318182
96
0.698835
import cv2 as cv # Lendo Imagens/Reading Images img = cv.imread('Exemplos Python OpenCV/Resources/Photos/cats.jpg') #cv.comando('NOME_JANELA') cv.imshow('Cats', img) #cv.comando('NOME_JANELA',VARIAVEL) cv.waitKey(0) #espera o usuário apertar o teclado # Lendo Videos/Reading Videos capture = cv.VideoC...
2
0
0
0
0
0
0
0
0
7f22abf1058e1d694557d74ef8382f6dac02cae4
3,106
py
Python
preprocess/add_references.py
TBiele/covid19-misinformation-telegram
90ce38ef7061f019ddd096a5feadbd16910ab677
[ "Apache-2.0" ]
null
null
null
preprocess/add_references.py
TBiele/covid19-misinformation-telegram
90ce38ef7061f019ddd096a5feadbd16910ab677
[ "Apache-2.0" ]
null
null
null
preprocess/add_references.py
TBiele/covid19-misinformation-telegram
90ce38ef7061f019ddd096a5feadbd16910ab677
[ "Apache-2.0" ]
null
null
null
import argparse import random import json from tqdm import tqdm import re from multiprocessing import Pool import numpy as np # from newspaper import Article, Config # manager = Manager() # articles = manager.dict() # config = Config() # config.fetch_images = False transl_table = dict([(ord(x), ord(y)) for x, y in ...
25.669421
97
0.660013
import argparse import random import os import json import string from tqdm import tqdm import re from multiprocessing import Pool, Manager import requests import time import numpy as np # from newspaper import Article, Config # manager = Manager() # articles = manager.dict() # config = Config() # config.fetch_imag...
17
0
0
0
0
1,671
0
-27
157
56d2323113b0a12bca38254e004e25fa97dbdce0
548
py
Python
character/migrations/0020_character_size.py
scottBowles/dnd
a1ef333f1a865d51b5426dc4b3493e8437584565
[ "MIT" ]
null
null
null
character/migrations/0020_character_size.py
scottBowles/dnd
a1ef333f1a865d51b5426dc4b3493e8437584565
[ "MIT" ]
null
null
null
character/migrations/0020_character_size.py
scottBowles/dnd
a1ef333f1a865d51b5426dc4b3493e8437584565
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2021-08-20 18:46
28.842105
211
0.591241
# Generated by Django 3.2.5 on 2021-08-20 18:46 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('character', '0019_auto_20210820_0247'), ] operations = [ migrations.AddField( model_name='character', name='size', ...
0
0
0
434
0
0
0
19
46
2d864a877779c70d8c428516889afa4b09436129
1,351
py
Python
Lessons/lesson19.py
Javascript-void0/hxgv
09d04a5bb4f74a476d652bfd8ae5ff56588593c4
[ "MIT" ]
null
null
null
Lessons/lesson19.py
Javascript-void0/hxgv
09d04a5bb4f74a476d652bfd8ae5ff56588593c4
[ "MIT" ]
null
null
null
Lessons/lesson19.py
Javascript-void0/hxgv
09d04a5bb4f74a476d652bfd8ae5ff56588593c4
[ "MIT" ]
null
null
null
# Snow Animation from tkinter import Tk, Canvas, TclError from time import sleep from random import randint window=Tk() window.title("Snow") cvs=Canvas(window, height=800, width=1200, bg="blue") cvs.pack() ball=cvs.create_oval(50,50,100,100,outline="red", fill="yellow") snow = [] r = 5 for i in range(600): x =...
22.516667
85
0.590674
# Snow Animation from tkinter import Tk, Canvas, TclError from time import sleep from random import randint window=Tk() window.title("Snow") cvs=Canvas(window, height=800, width=1200, bg="blue") cvs.pack() ball=cvs.create_oval(50,50,100,100,outline="red", fill="yellow") snow = [] r = 5 for i in range(600): x =...
0
0
0
0
0
613
0
0
96
02feaf84268f276fb70026b31884a9ce7b095530
7,851
py
Python
origin/makelog_app.py
nukeguys/myutil
65d0aff36ec45bffbd2e52fea0fabfbabd5609b1
[ "Apache-2.0" ]
null
null
null
origin/makelog_app.py
nukeguys/myutil
65d0aff36ec45bffbd2e52fea0fabfbabd5609b1
[ "Apache-2.0" ]
null
null
null
origin/makelog_app.py
nukeguys/myutil
65d0aff36ec45bffbd2e52fea0fabfbabd5609b1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 import sys if __name__ == '__main__': start='' end='' if len(sys.argv) > 1: start=sys.argv[1] if len(sys.argv) > 2: end=sys.argv[2] gitLog = GitLog(start, end) GeneratorLog().saveLog(gitLog)
39.452261
137
0.542479
#!/usr/bin/python3 import os import sys import urllib.request from orderedset import OrderedSet from shell import Shell from log import Log class GeneratorLog: logname = os.path.basename(os.getcwd()) logpath = os.path.expanduser('~') + '/applog/' logfullname = logpath + logname + ".log" def __init__(s...
0
1,646
0
5,672
0
0
0
0
281
39c8a0d18feca0c72851a75d2286ca3241c0cb7a
303
py
Python
BestTwo/order/models.py
HAMDONGHO/USMS_Senior
e247137b6a9a351676f2de7887d83b1f900e298e
[ "MIT" ]
null
null
null
BestTwo/order/models.py
HAMDONGHO/USMS_Senior
e247137b6a9a351676f2de7887d83b1f900e298e
[ "MIT" ]
null
null
null
BestTwo/order/models.py
HAMDONGHO/USMS_Senior
e247137b6a9a351676f2de7887d83b1f900e298e
[ "MIT" ]
null
null
null
# Create your models here.
25.25
61
0.716172
from django.db import models from django.utils import timezone # Create your models here. class Order(models.Model): table = models.IntegerField() order_time = models.DateTimeField(default = timezone.now) content = models.TextField() def __str__(self): return self.content
0
0
0
190
0
0
0
19
67
d0a036e88a3f861cb4549ff1c66c112d64dea088
3,073
py
Python
pygsuite/slides/page_elements/text.py
gitter-badger/pygsuite
536766c36f653edbc7585141f1c3327f508e19da
[ "MIT" ]
null
null
null
pygsuite/slides/page_elements/text.py
gitter-badger/pygsuite
536766c36f653edbc7585141f1c3327f508e19da
[ "MIT" ]
null
null
null
pygsuite/slides/page_elements/text.py
gitter-badger/pygsuite
536766c36f653edbc7585141f1c3327f508e19da
[ "MIT" ]
null
null
null
""""textElements": [ { "endIndex": 224, "paragraphMarker": { "style": {} } }, { "endIndex": 130, "textRun": { "content": "Li lingues differe in li grammatica e li vocabules. Omnicos directe al desirabilite de un nov ", "style": {} } }, { "endIndex": 143, "startIndex": 130, "textRun":...
31.680412
187
0.582818
class BaseTextElement(object): def __init__(self, element, presentation): self._element = element self._presentation = presentation def end_index(self): return self._element.get("endIndex") def start_index(self): return self._element.get("startIndex") def text_run(self...
0
54
0
909
0
0
0
0
68
2b47d3b952c24ab09260cab5b844d941c0640311
4,982
py
Python
fideslog/sdk/python/event.py
ethyca/fideseye
c74bb0245724c2db77db37317226db153780860b
[ "Apache-2.0" ]
1
2022-01-13T16:56:37.000Z
2022-01-13T16:56:37.000Z
fideslog/sdk/python/event.py
ethyca/fideseye
c74bb0245724c2db77db37317226db153780860b
[ "Apache-2.0" ]
1
2022-01-21T22:09:06.000Z
2022-01-21T22:09:06.000Z
fideslog/sdk/python/event.py
ethyca/fideslog
c74bb0245724c2db77db37317226db153780860b
[ "Apache-2.0" ]
null
null
null
# pylint: disable= too-many-arguments, too-many-instance-attributes
51.360825
267
0.634083
# pylint: disable= too-many-arguments, too-many-instance-attributes from datetime import datetime, timezone from typing import Dict, List, Optional from urllib.parse import urlparse from .exceptions import InvalidEventError class AnalyticsEvent: """ A discrete event, representing a user action within a fide...
0
0
0
4,732
0
0
0
68
113
f30524d7f5d9e4366255b6852122dc42013fcdbf
1,069
py
Python
discord_key_bot/keyparse/__init__.py
bayangan1991/discord-key-bot
e1ed7d23d639cc04163c0af7d32a02134c95e930
[ "Unlicense" ]
1
2021-12-01T05:33:47.000Z
2021-12-01T05:33:47.000Z
discord_key_bot/keyparse/__init__.py
bayangan1991/discord-key-bot
e1ed7d23d639cc04163c0af7d32a02134c95e930
[ "Unlicense" ]
null
null
null
discord_key_bot/keyparse/__init__.py
bayangan1991/discord-key-bot
e1ed7d23d639cc04163c0af7d32a02134c95e930
[ "Unlicense" ]
1
2021-11-06T22:07:40.000Z
2021-11-06T22:07:40.000Z
import re keyspace = { "gog": [r"^[a-z,A-Z,0-9]{5}-[a-z,A-Z,0-9]{5}-[a-z,A-Z,0-9]{5}-[a-z,A-Z,0-9]{5}$"], "steam": [ r"^[a-z,A-Z,0-9]{5}-[a-z,A-Z,0-9]{5}-[a-z,A-Z,0-9]{5}$", r"^[a-z,A-Z,0-9]{5}-[a-z,A-Z,0-9]{5}-[a-z,A-Z,0-9]{5}-[a-z,A-Z,0-9]{5}-[a-z,A-Z,0-9]{5}$", ], "playstation": [r"^...
30.542857
98
0.430309
import re keyspace = { "gog": [r"^[a-z,A-Z,0-9]{5}-[a-z,A-Z,0-9]{5}-[a-z,A-Z,0-9]{5}-[a-z,A-Z,0-9]{5}$"], "steam": [ r"^[a-z,A-Z,0-9]{5}-[a-z,A-Z,0-9]{5}-[a-z,A-Z,0-9]{5}$", r"^[a-z,A-Z,0-9]{5}-[a-z,A-Z,0-9]{5}-[a-z,A-Z,0-9]{5}-[a-z,A-Z,0-9]{5}-[a-z,A-Z,0-9]{5}$", ], "playstation": [r"^...
0
0
0
0
0
223
0
0
46
3cea8799f4645f063d9212c59e9c242e1ce67e92
481
py
Python
2016/src/Advent2016_06.py
davidxbuck/advent2018
eed5424a8008b9c0829f5872ad6cd469ce9f70b9
[ "MIT" ]
1
2021-12-11T02:19:28.000Z
2021-12-11T02:19:28.000Z
2016/src/Advent2016_06.py
davidxbuck/advent2018
eed5424a8008b9c0829f5872ad6cd469ce9f70b9
[ "MIT" ]
null
null
null
2016/src/Advent2016_06.py
davidxbuck/advent2018
eed5424a8008b9c0829f5872ad6cd469ce9f70b9
[ "MIT" ]
1
2020-12-08T04:31:46.000Z
2020-12-08T04:31:46.000Z
# Advent of Code 2016 # # From https://adventofcode.com/2016/day/6 import numpy as np msgs = np.array([list(row.strip()) for row in open('../inputs/Advent2016_06.txt', 'r')], dtype=str) part1 = part2 = '' for y in range(msgs.shape[1]): unique, counts = np.unique(msgs[:, y], return_counts=True) part1 += unique...
32.066667
99
0.669439
# Advent of Code 2016 # # From https://adventofcode.com/2016/day/6 import numpy as np msgs = np.array([list(row.strip()) for row in open('../inputs/Advent2016_06.txt', 'r')], dtype=str) part1 = part2 = '' for y in range(msgs.shape[1]): unique, counts = np.unique(msgs[:, y], return_counts=True) part1 += unique...
0
0
0
0
0
0
0
0
0
95282814bf26366c0d0a01f111dfbbe4cfed2f7d
1,784
py
Python
bin/app.py
soCzech/flickrSync
4b9a65d427283dab85c32d73efe261051ee6c7c7
[ "MIT" ]
null
null
null
bin/app.py
soCzech/flickrSync
4b9a65d427283dab85c32d73efe261051ee6c7c7
[ "MIT" ]
3
2015-09-08T13:57:03.000Z
2015-09-08T13:57:03.000Z
bin/app.py
soCzech/flickrSync
4b9a65d427283dab85c32d73efe261051ee6c7c7
[ "MIT" ]
null
null
null
import time import os.path import argparse try: from flickrSync import FlickrAPI import_error = False except ImportError: import_error = True if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("-a", "--authorize", action="store_true", help="run the authorization setup") parser.add_...
38.782609
125
0.724215
import sys import time import os.path import argparse try: from flickrSync import FlickrAPI import_error = False except ImportError: import_error = True if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("-a", "--authorize", action="store_true", help="run the authorization setup") ...
0
0
0
0
0
0
0
-11
22
51d9b96194826e5eb76bede80dc5e73cb41e1219
31,915
py
Python
Tests/test_NAL/test_NAL6.py
AIxer/PyNARS
443b6a5e1c9779a1b861df1ca51ce5a190998d2e
[ "MIT" ]
null
null
null
Tests/test_NAL/test_NAL6.py
AIxer/PyNARS
443b6a5e1c9779a1b861df1ca51ce5a190998d2e
[ "MIT" ]
null
null
null
Tests/test_NAL/test_NAL6.py
AIxer/PyNARS
443b6a5e1c9779a1b861df1ca51ce5a190998d2e
[ "MIT" ]
null
null
null
import unittest import Tests.utils_for_test as utils_for_test # utils_for_test.rule_map = RuleMap_v2() find_var_with_pos: Callable = lambda pos_search, variables, positions: [var for var, pos in zip(variables, positions) if pos[:len(pos_search)] == pos_search] def unification_variable(term1: Term, term2: Term, po...
33.665612
163
0.512016
import unittest from pynars.NARS.DataStructures import Task from pynars.NAL.MetaLevelInference.VariableSubstitution import * from pynars.NARS.RuleMap import RuleMap import Tests.utils_for_test as utils_for_test from Tests.utils_for_test import * from pynars.utils.Print import PrintType, out_print # utils_for_test.ru...
0
291
0
28,510
0
855
0
126
180
5e69b7536b653d6a70154c6a9403f3ae217a1adc
1,337
py
Python
src/pyhttpfs/core/icons.py
ii-Python/pyhttpfs
e792aad8fbc781a141374e4fc608ad5b6924b869
[ "MIT" ]
1
2021-08-31T21:56:08.000Z
2021-08-31T21:56:08.000Z
src/pyhttpfs/core/icons.py
ii-Python/pyhttpfs
e792aad8fbc781a141374e4fc608ad5b6924b869
[ "MIT" ]
null
null
null
src/pyhttpfs/core/icons.py
ii-Python/pyhttpfs
e792aad8fbc781a141374e4fc608ad5b6924b869
[ "MIT" ]
null
null
null
# Copyright 2021 iiPython # Modules import os import json from pyhttpfs import pyhttpfs # Initialization _ICONS_FILE = os.path.join(pyhttpfs.assets_dir, "icons.json") _CAN_LOAD = os.path.isfile(_ICONS_FILE) if not _CAN_LOAD: pyhttpfs.log("[yellow]No `icons.json` file present, icons will be disabled.") _ICON_DATA...
28.446809
81
0.646971
# Copyright 2021 iiPython # Modules import os import json from pyhttpfs import pyhttpfs # Initialization _ICONS_FILE = os.path.join(pyhttpfs.assets_dir, "icons.json") _CAN_LOAD = os.path.isfile(_ICONS_FILE) if not _CAN_LOAD: pyhttpfs.log("[yellow]No `icons.json` file present, icons will be disabled.") _ICON_DATA...
0
0
0
0
0
868
0
0
68
328616b5dfb9ce5046a776176a0d36f4d1ecc210
7,727
py
Python
ranking_scraper/smashgg/queries.py
odysseycaravels/ranking-scraper
0a9ab097ef15267a0021b40ddc131caa7cf4264b
[ "MIT" ]
null
null
null
ranking_scraper/smashgg/queries.py
odysseycaravels/ranking-scraper
0a9ab097ef15267a0021b40ddc131caa7cf4264b
[ "MIT" ]
null
null
null
ranking_scraper/smashgg/queries.py
odysseycaravels/ranking-scraper
0a9ab097ef15267a0021b40ddc131caa7cf4264b
[ "MIT" ]
null
null
null
""" GraphQL queries in string form used by SmashGGScraper. """ # TODO: This is lifted from the old project. Confirm these still work (will need some rework). TOURNAMENTS_BY_COUNTRY_PAGING = """ query TournamentsByCountryPaging($countryCode: String!, $afterDate: Timestamp!, $perPage: Int!) { tournaments(query: { ...
26.282313
97
0.554808
""" GraphQL queries in string form used by SmashGGScraper. """ # TODO: This is lifted from the old project. Confirm these still work (will need some rework). from datetime import datetime from ranking_scraper.gql_query import GraphQLQuery, StringWithoutQuotes def get_completed_tournaments_paging(game_id: int, ...
0
0
0
0
0
4,082
0
58
182
a1227d648819610268c3a3a7f594235c69a9d15b
4,397
py
Python
duck2spark/duck2SparkCoder/duck2spark_abnt2-master/duck2spark/duck2spark.py
Renan0eng/Duck2Spark
b6bd9f143e5d712d46748d7b42c9f022ff8e2d7e
[ "MIT" ]
1
2022-02-22T01:54:36.000Z
2022-02-22T01:54:36.000Z
duck2spark/duck2SparkCoder/duck2spark_abnt2-master/duck2spark/duck2spark.py
Renan0eng/Duck2Spark
b6bd9f143e5d712d46748d7b42c9f022ff8e2d7e
[ "MIT" ]
null
null
null
duck2spark/duck2SparkCoder/duck2spark_abnt2-master/duck2spark/duck2spark.py
Renan0eng/Duck2Spark
b6bd9f143e5d712d46748d7b42c9f022ff8e2d7e
[ "MIT" ]
null
null
null
#!/usr/bin/python import sys if __name__ == "__main__": if len(sys.argv) < 2: usage() sys.exit() main(sys.argv[1:])
28.185897
140
0.648624
#!/usr/bin/python import sys import getopt import os def generate_source(payload, init_delay=2500, loop_count=-1, loop_delay=5000, blink=True): head = '''/* * Sketch generated by duck2spark from Marcus Mengs aka MaMe82 * */ #include "DigiKeyboard.h" ''' init = ''' void setup() { // initialize the digital pin as a...
0
0
0
0
0
4,177
0
-20
113
9c455331ca3e94b8ff9fb9baa7feaab8209932e0
49,375
py
Python
resources/tests/test_resource_api.py
digipointtku/respa
a529e0df4d3f072df7801adb5bf97a5f4abd1243
[ "MIT" ]
1
2019-12-17T10:02:17.000Z
2019-12-17T10:02:17.000Z
resources/tests/test_resource_api.py
digipointtku/respa
a529e0df4d3f072df7801adb5bf97a5f4abd1243
[ "MIT" ]
12
2019-11-06T07:53:27.000Z
2019-12-18T06:14:47.000Z
resources/tests/test_resource_api.py
digipointtku/respa
a529e0df4d3f072df7801adb5bf97a5f4abd1243
[ "MIT" ]
null
null
null
from django.urls import reverse def _check_permissions_dict(api_client, resource, is_admin, is_manager, is_viewer, can_make_reservations, can_ignore_opening_hours, can_bypass_payment): """ Check that user permissions returned from resource endpoint contain correct values f...
42.454858
128
0.708759
import datetime import pytest from copy import deepcopy from django.urls import reverse from django.contrib.auth import get_user_model from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from django.contrib.gis.geos import Point from django.utils import timezone ...
4
46,451
0
0
0
145
0
493
1,230
523d24e4d36fa9242ddc3a56eaa4db3a33a26598
65,505
py
Python
src/windows/brightMainWindow.py
Alopex4/spruce
2bf0bae18fe9b0d13691f2ee926071635cbe7c6f
[ "MIT" ]
1
2019-07-04T10:32:07.000Z
2019-07-04T10:32:07.000Z
src/windows/brightMainWindow.py
Alopex4/spruce
2bf0bae18fe9b0d13691f2ee926071635cbe7c6f
[ "MIT" ]
null
null
null
src/windows/brightMainWindow.py
Alopex4/spruce
2bf0bae18fe9b0d13691f2ee926071635cbe7c6f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # from scapy.all import srp, Ether, ARP, conf # Capture packet manager # from docutils.nodes import section # Thread workers # Menu open dialogs
35.123324
104
0.574078
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import csv import json import struct import platform import subprocess from time import sleep from copy import deepcopy from functools import namedtuple from datetime import datetime from collections import OrderedDict import netifaces import numpy as np from P...
0
1,183
0
62,892
0
0
0
462
774
3a23a13353154cf75af0d7e0703dd7f9bc6f752f
898
py
Python
tests/test_session.py
Hiteshsuhas/err-stackstorm
7579350ac50d9324b64a73b86d57e094270cb275
[ "Apache-2.0" ]
15
2016-09-19T12:06:12.000Z
2021-11-30T12:04:44.000Z
tests/test_session.py
Hiteshsuhas/err-stackstorm
7579350ac50d9324b64a73b86d57e094270cb275
[ "Apache-2.0" ]
22
2017-06-19T18:13:54.000Z
2021-05-28T09:25:01.000Z
tests/test_session.py
Hiteshsuhas/err-stackstorm
7579350ac50d9324b64a73b86d57e094270cb275
[ "Apache-2.0" ]
7
2017-06-19T17:03:59.000Z
2021-09-27T11:06:31.000Z
# coding:utf-8 import time import pytest from lib.session import Session from lib.errors import SessionExpiredError pytest_plugins = ["errbot.backends.test"] extra_plugin_dir = "." def test_session(): """ Session class tests """ user_id = "test_id" secret = "test_secret" session = Session(use...
19.955556
47
0.667038
# coding:utf-8 import time import pytest from lib.session import Session from lib.errors import SessionExpiredError pytest_plugins = ["errbot.backends.test"] extra_plugin_dir = "." def test_session(): """ Session class tests """ user_id = "test_id" secret = "test_secret" session = Session(use...
0
0
0
0
0
0
0
0
0
df79e38592c6b9e0e4b7c2cebad8f37aca859518
1,283
py
Python
tests/gru_test.py
gglin001/poptorch
61f38ed2d8c6b672e023862eb698865fa7f4724e
[ "MIT" ]
128
2020-12-08T22:22:46.000Z
2022-03-23T10:54:26.000Z
tests/gru_test.py
gglin001/poptorch
61f38ed2d8c6b672e023862eb698865fa7f4724e
[ "MIT" ]
4
2021-06-22T14:26:28.000Z
2022-02-15T11:25:05.000Z
tests/gru_test.py
gglin001/poptorch
61f38ed2d8c6b672e023862eb698865fa7f4724e
[ "MIT" ]
7
2020-12-09T20:32:56.000Z
2022-01-18T16:12:24.000Z
#!/usr/bin/env python3 # Copyright (c) 2020 Graphcore Ltd. All rights reserved.
27.297872
69
0.670304
#!/usr/bin/env python3 # Copyright (c) 2020 Graphcore Ltd. All rights reserved. import pytest import torch import poptorch import helpers @pytest.mark.parametrize("bias", [True, False]) @pytest.mark.parametrize("batch_first", [True, False]) def test_gru(bias, batch_first): length = 1 batches = 3 input_si...
0
1,120
0
0
0
0
0
-30
112
e3074a386308702b6a1a26bfa47e5932bbb91678
2,563
py
Python
bip32_helper.py
ismailakkila/bip32
3ea5ef02fd87e4b7f36d3d72a60568939fcb8183
[ "MIT" ]
3
2021-04-17T18:06:50.000Z
2022-03-12T04:26:05.000Z
bip32_helper.py
ismailakkila/bip32
3ea5ef02fd87e4b7f36d3d72a60568939fcb8183
[ "MIT" ]
null
null
null
bip32_helper.py
ismailakkila/bip32
3ea5ef02fd87e4b7f36d3d72a60568939fcb8183
[ "MIT" ]
1
2022-01-27T20:16:22.000Z
2022-01-27T20:16:22.000Z
"""This module contains BIP39 helper functions""" import hashlib from ecc import PrivateKey BASE58_ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' def get_seed(mnemonic_bytes, passphrase=None): """ This function creates a mnemonic seed from bytes encoded mnemonic. Passphrase is op...
26.153061
78
0.62778
"""This module contains BIP39 helper functions""" import hashlib from ecc import PrivateKey BASE58_ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' def get_seed(mnemonic_bytes, passphrase=None): """ This function creates a mnemonic seed from bytes encoded mnemonic. Passphrase is op...
0
0
0
0
0
0
0
0
0
8b9dadea4a1efb3267a13c63890bf3e5eee2d4d9
3,351
py
Python
demo/demo_common.py
mindjun/fishbase
7bb8fb9592bcaf7b4e23bb442861fd8b42981704
[ "MIT" ]
null
null
null
demo/demo_common.py
mindjun/fishbase
7bb8fb9592bcaf7b4e23bb442861fd8b42981704
[ "MIT" ]
1
2019-03-21T10:19:46.000Z
2019-03-21T10:19:46.000Z
demo/demo_common.py
mindjun/fishbase
7bb8fb9592bcaf7b4e23bb442861fd8b42981704
[ "MIT" ]
null
null
null
# fish_base.common demo # 2017.3.15 create by Leo # 2018.2.11 edit by David Yi # 2018.2.12 common config #11013 # 2018.5.10 # 2018.5.15 # 2018.5.19 # 2018.5.26 # 2018.5.30 if __name__ == '__main__': # # result = serialize_instance(Foo) print(result) # # test_legitimate_...
22.489933
103
0.604297
# fish_base.common demo # 2017.3.15 create by Leo # 2018.2.11 edit by David Yi from fishbase.fish_common import * from fishbase.fish_file import get_abs_filename_with_sub_path # 2018.2.12 common 中 config 文件处理相关,#11013 def demo_common_config(): print('--- conf_as_dict demo---') # 定义配置文件名 conf_filename = '...
492
0
0
114
0
2,043
0
53
203
2b7cbd5ac30602cb97e8c78329e2d9023586ba2d
33,714
py
Python
alnitak/tests/parser_test.py
definitelyprobably/alnitak
9e0413ce4c7408a8516570c980def27ebe8ee6c3
[ "MIT" ]
null
null
null
alnitak/tests/parser_test.py
definitelyprobably/alnitak
9e0413ce4c7408a8516570c980def27ebe8ee6c3
[ "MIT" ]
null
null
null
alnitak/tests/parser_test.py
definitelyprobably/alnitak
9e0413ce4c7408a8516570c980def27ebe8ee6c3
[ "MIT" ]
null
null
null
from alnitak.tests import setup from alnitak import prog from alnitak import parser as Parser s = setup.Init(keep=True) prog = setup.create_state_obj(s) a_flag = Parser.Flag(Parser.FlagType.bare, '-a', '--aflag') b_flag = Parser.Flag(Parser.FlagType.bare, '-b', '--bflag') c_flag = Parser.Flag(Parser.FlagType.bare,...
28.165414
76
0.568221
from alnitak.tests import setup from alnitak import prog from alnitak import parser as Parser from alnitak import exceptions as Except from pathlib import Path from subprocess import Popen, PIPE s = setup.Init(keep=True) prog = setup.create_state_obj(s) a_flag = Parser.Flag(Parser.FlagType.bare, '-a', '--aflag') ...
0
0
0
0
0
32,659
0
35
297
3548cf0e36d0ccd6292c377b4e3c675aaac63add
209
py
Python
test.py
tancredosouza/krites.io-codeProcessor
aaad814764115b41bf855a44f25a4637c913acde
[ "MIT" ]
null
null
null
test.py
tancredosouza/krites.io-codeProcessor
aaad814764115b41bf855a44f25a4637c913acde
[ "MIT" ]
null
null
null
test.py
tancredosouza/krites.io-codeProcessor
aaad814764115b41bf855a44f25a4637c913acde
[ "MIT" ]
null
null
null
if __name__ == "__main__": N = int(input()) while N > 0: x = int(input()) print(fib(x)) N = N - 1
14.928571
32
0.425837
def fib(x): if x < 2: return x return fib(x - 1) + fib(x-2) if __name__ == "__main__": N = int(input()) while N > 0: x = int(input()) print(fib(x)) N = N - 1
0
0
0
0
0
55
0
0
22
2b3ed8bac7e10c6109ac5950dc188e150cb97e8c
330
py
Python
setup.py
jhurt/dribbble-palettes
63521c3597319d1282d4e1e8ff17604b04ade5cf
[ "BSD-2-Clause" ]
1
2017-09-12T05:41:11.000Z
2017-09-12T05:41:11.000Z
setup.py
jhurt/dribbble-palettes
63521c3597319d1282d4e1e8ff17604b04ade5cf
[ "BSD-2-Clause" ]
null
null
null
setup.py
jhurt/dribbble-palettes
63521c3597319d1282d4e1e8ff17604b04ade5cf
[ "BSD-2-Clause" ]
null
null
null
from distutils.core import setup setup( name='dribbble_palettes', packages=['dribbble_palettes'], install_requires=[ "Pillow==2.7.0", "Scrapy==1.0.3", ], entry_points={ 'console_scripts': [ 'palette_from_color = dribbble_palettes.palette_from_color:cli', ...
20.625
76
0.593939
from distutils.core import setup setup( name='dribbble_palettes', packages=['dribbble_palettes'], install_requires=[ "Pillow==2.7.0", "Scrapy==1.0.3", ], entry_points={ 'console_scripts': [ 'palette_from_color = dribbble_palettes.palette_from_color:cli', ...
0
0
0
0
0
0
0
0
0
ce3eb344d99109af8b0309fb4c580974128be268
1,734
py
Python
lcd_test.py
antigones/TC_LCDDisplay10_Arduino_micropy
c62032e3083767b99fa194a7134ab271b1958ec1
[ "MIT" ]
null
null
null
lcd_test.py
antigones/TC_LCDDisplay10_Arduino_micropy
c62032e3083767b99fa194a7134ab271b1958ec1
[ "MIT" ]
null
null
null
lcd_test.py
antigones/TC_LCDDisplay10_Arduino_micropy
c62032e3083767b99fa194a7134ab271b1958ec1
[ "MIT" ]
null
null
null
# Tested on Arduino NanoRP2040 Connect from machine import Pin import time import LCDDisplay10 # Create an I2C object out of our SDA and SCL pin objects sda_pin = Pin(12) # GPIO12, A4, D18, STEMMA QT - blue wire (for Arduino NanoRP2040 Connect) scl_pin = Pin(13) # GPIO13, A5, D19, STEMMA QT - yellow wire (f...
29.896552
123
0.693195
# Tested on Arduino NanoRP2040 Connect from machine import I2C, Pin import time import LCDDisplay10 # Create an I2C object out of our SDA and SCL pin objects sda_pin = Pin(12) # GPIO12, A4, D18, STEMMA QT - blue wire (for Arduino NanoRP2040 Connect) scl_pin = Pin(13) # GPIO13, A5, D19, STEMMA QT - yellow wi...
0
0
0
0
0
1,091
0
5
50
48e7c50651d3a875afd4b3a613cf5a5763bbf845
19,674
py
Python
python/prototools.py
aceway/tools
6c906f93377ab768da2e305303991a6d137a78ad
[ "Apache-2.0" ]
1
2017-09-10T14:53:36.000Z
2017-09-10T14:53:36.000Z
python/prototools.py
aceway/tools
6c906f93377ab768da2e305303991a6d137a78ad
[ "Apache-2.0" ]
null
null
null
python/prototools.py
aceway/tools
6c906f93377ab768da2e305303991a6d137a78ad
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding=utf-8 -*- ######################################################################## # File Name: prototools.py # # Author: aceway # Mail: a...
46.400943
127
0.497459
#!/usr/bin/env python # -*- coding=utf-8 -*- ######################################################################## # File Name: prototools.py # # Author: aceway # Mail: a...
2,001
0
0
0
0
3,466
0
0
46
73131503ac058e0993f18d4c0fc934233bb69735
1,812
py
Python
melenium/common/capabilities.py
a-maliarov/melenium
c71b79e6533c16fd638e7a7b84afaf5d16620cf9
[ "MIT" ]
1
2020-11-01T01:40:32.000Z
2020-11-01T01:40:32.000Z
melenium/common/capabilities.py
a-maliarov/melenium
c71b79e6533c16fd638e7a7b84afaf5d16620cf9
[ "MIT" ]
null
null
null
melenium/common/capabilities.py
a-maliarov/melenium
c71b79e6533c16fd638e7a7b84afaf5d16620cf9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ melenium.capabilities ~~~~~~~~~~~~~~~~~~~~~ Contains ChromeCapabilities. """ __all__ = ['ChromeCapabilities'] #----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
29.704918
95
0.606512
# -*- coding: utf-8 -*- """ melenium.capabilities ~~~~~~~~~~~~~~~~~~~~~ Contains ChromeCapabilities. """ __all__ = ['ChromeCapabilities'] import base64 from .presets import PRESETS #----------------------------------------------------------------------------- class ChromeCapabilities(object): def __init__(...
0
142
0
1,300
0
0
0
-1
69
1c42249594d6b1f31f8ce6b14ac9498a4d1e0e6b
5,109
py
Python
websocket/websocket/server.py
hi2017teamB/ChatAppProject
d78790800dab407f46c487098718babc847a861f
[ "MIT" ]
69
2018-01-06T07:00:34.000Z
2022-02-21T03:30:20.000Z
websocket/websocket/server.py
hi2017teamB/ChatAppProject
d78790800dab407f46c487098718babc847a861f
[ "MIT" ]
1
2021-10-19T08:05:06.000Z
2021-10-19T08:05:06.000Z
websocket/websocket/server.py
hi2017teamB/ChatAppProject
d78790800dab407f46c487098718babc847a861f
[ "MIT" ]
31
2018-01-22T12:21:55.000Z
2022-02-21T03:30:23.000Z
import gevent assert gevent.version_info >= (0, 13, 2), 'Newer version of gevent is required to run websocket.server' __all__ = ['WebsocketHandler', 'WebsocketServer']
37.844444
125
0.599922
import sys import traceback from os.path import abspath, dirname, join, basename from socket import error from hashlib import md5 from datetime import datetime from gevent.pywsgi import WSGIHandler, WSGIServer from websocket.policyserver import FlashPolicyServer from websocket import WebSocket import gevent assert ge...
0
0
0
4,347
0
224
0
97
268
6c9cbd4578db48f55c5a2b3a77fcafe47e2f75ae
24,329
py
Python
src/ZServer/FTPServer.py
tseaver/Zope-RFA
08634f39b0f8b56403a2a9daaa6ee4479ef0c625
[ "ZPL-2.1" ]
2
2015-12-21T10:34:56.000Z
2017-09-24T11:07:58.000Z
src/ZServer/FTPServer.py
MatthewWilkes/Zope
740f934fc9409ae0062e8f0cd6dcfd8b2df00376
[ "ZPL-2.1" ]
null
null
null
src/ZServer/FTPServer.py
MatthewWilkes/Zope
740f934fc9409ae0062e8f0cd6dcfd8b2df00376
[ "ZPL-2.1" ]
null
null
null
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS I...
35.777941
79
0.588886
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS I...
0
0
0
20,791
0
0
0
52
294
d5646cdaa18635950e355145e912b12f7d9baf28
2,681
py
Python
preprocess/imagenet_100_subset.py
SongweiGe/Contrastive-Learning-with-Non-Semantic-Negatives
5fbdc4d84346afa7a17ae2632cab38a6291d69fb
[ "MIT" ]
32
2021-11-01T06:36:46.000Z
2022-03-18T08:12:03.000Z
preprocess/imagenet_100_subset.py
btzyd/Contrastive-Learning-with-Non-Semantic-Negatives
5fbdc4d84346afa7a17ae2632cab38a6291d69fb
[ "MIT" ]
1
2022-01-05T04:21:54.000Z
2022-01-05T06:44:10.000Z
preprocess/imagenet_100_subset.py
btzyd/Contrastive-Learning-with-Non-Semantic-Negatives
5fbdc4d84346afa7a17ae2632cab38a6291d69fb
[ "MIT" ]
5
2021-12-26T15:43:26.000Z
2022-03-04T11:37:44.000Z
### script to generate ImageNet-100 dataset ### official split: https://github.com/HobbitLong/CMC/blob/master/imagenet100.txt import os import argparse parser = argparse.ArgumentParser() parser.add_argument('--imagenet_path', type=str, required=True) parser.add_argument('--imagenet100_path', type=str, required=True) ...
58.282609
100
0.60276
### script to generate ImageNet-100 dataset ### official split: https://github.com/HobbitLong/CMC/blob/master/imagenet100.txt import os import argparse parser = argparse.ArgumentParser() parser.add_argument('--imagenet_path', type=str, required=True) parser.add_argument('--imagenet100_path', type=str, required=True) ...
0
0
0
0
0
0
0
0
0
62fce293a9f42fe2447ebbfe38682ed4296ed689
5,160
py
Python
pgsyn/push/state.py
Y1fanHE/kdps
c09810afb35d93018b9a7d7edb182e2f8f8a6049
[ "MIT" ]
null
null
null
pgsyn/push/state.py
Y1fanHE/kdps
c09810afb35d93018b9a7d7edb182e2f8f8a6049
[ "MIT" ]
null
null
null
pgsyn/push/state.py
Y1fanHE/kdps
c09810afb35d93018b9a7d7edb182e2f8f8a6049
[ "MIT" ]
null
null
null
''' Author: He,Yifan Date: 2022-02-18 16:06:00 LastEditors: He,Yifan LastEditTime: 2022-02-18 16:36:42 '''
33.076923
114
0.570155
''' Author: He,Yifan Date: 2022-02-18 16:06:00 LastEditors: He,Yifan LastEditTime: 2022-02-18 16:36:42 ''' from typing import Sequence, Union from collections import deque import numpy as np from pgsyn.push.config import PushConfig from pgsyn.push.type_library import PushTypeLibrary from pgsyn.push.atoms import Code...
0
1,183
0
3,558
0
0
0
109
201
f6665591c1657401d24354fd11c6db7f151b4209
7,681
py
Python
affinity_pred/infer_mpi.py
jglaser/affinity_pred
b51ba839449f828706b9179949015e27ae18960b
[ "BSD-2-Clause" ]
null
null
null
affinity_pred/infer_mpi.py
jglaser/affinity_pred
b51ba839449f828706b9179949015e27ae18960b
[ "BSD-2-Clause" ]
null
null
null
affinity_pred/infer_mpi.py
jglaser/affinity_pred
b51ba839449f828706b9179949015e27ae18960b
[ "BSD-2-Clause" ]
null
null
null
from mpi4py import MPI from mpi4py.futures import MPICommExecutor from transformers import BertTokenizerFast from transformers import BertConfig from transformers import TrainingArguments from transformers import HfArgumentParser import pandas as pd import os import json seq_model_name = "Rostlab/prot_bert_bfd" # f...
37.10628
136
0.654342
from mpi4py import MPI from mpi4py.futures import MPICommExecutor import torch import transformers from transformers import AutoModelForSequenceClassification, BertModel, RobertaModel, BertTokenizerFast, RobertaTokenizer from transformers import PreTrainedModel, BertConfig, RobertaConfig from transformers import Trai...
0
412
0
0
0
3,702
0
459
651
294d1487c336e533ec18efafff542e415f1af61b
6,880
py
Python
core/modules/cron.py
CloverGit/inpanel
1dae819556ead575ce5dc69dcd5a374126aa5561
[ "Apache-2.0" ]
1
2020-04-20T13:57:08.000Z
2020-04-20T13:57:08.000Z
core/modules/cron.py
CloverGit/inpanel
1dae819556ead575ce5dc69dcd5a374126aa5561
[ "Apache-2.0" ]
null
null
null
core/modules/cron.py
CloverGit/inpanel
1dae819556ead575ce5dc69dcd5a374126aa5561
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (c) 2017 - 2019, doudoudzj # All rights reserved. # # InPanel is distributed under the terms of the (new) BSD License. # The full license can be found in 'LICENSE'. """Module for Cron Jobs Management.""" import os import re crontab = '/etc/crontab' cronspool = '/var/spool/cron/...
26.875
97
0.478343
# -*- coding: utf-8 -*- # # Copyright (c) 2017 - 2019, doudoudzj # All rights reserved. # # InPanel is distributed under the terms of the (new) BSD License. # The full license can be found in 'LICENSE'. """Module for Cron Jobs Management.""" import os import re crontab = '/etc/crontab' cronspool = '/var/spool/cron/...
0
0
0
0
0
2,266
0
0
92
5bdc0bb244a075491fdae0f56b7a4d39f67f6388
3,305
py
Python
datasets/split_flying_chairs.py
Chen-Jianhu/detectron2
d992315889fa08238050e1c15231f1f350fee01d
[ "Apache-2.0" ]
null
null
null
datasets/split_flying_chairs.py
Chen-Jianhu/detectron2
d992315889fa08238050e1c15231f1f350fee01d
[ "Apache-2.0" ]
null
null
null
datasets/split_flying_chairs.py
Chen-Jianhu/detectron2
d992315889fa08238050e1c15231f1f350fee01d
[ "Apache-2.0" ]
null
null
null
# -*- encoding: utf-8 -*- """ @File : /detectron2/datasets/split_flying_chairs.py @Time : 2020-11-24 23:58:33 @Author : Facebook, Inc. and its affiliates. @Last Modified: 2020-11-25 22:23:00 @Modified By : Chen-Jianhu (jhchen.mail@gmail.com) @License : Copyright(C), USTC @Desc : This...
34.789474
95
0.619365
# -*- encoding: utf-8 -*- """ @File : /detectron2/datasets/split_flying_chairs.py @Time : 2020-11-24 23:58:33 @Author : Facebook, Inc. and its affiliates. @Last Modified: 2020-11-25 22:23:00 @Modified By : Chen-Jianhu (jhchen.mail@gmail.com) @License : Copyright(C), USTC @Desc : This...
0
0
0
0
0
944
0
-10
45
5d174015a979e6d20e038c0d746931dc751e47cc
953
py
Python
Chapter3/ex_3_18.py
zxjzxj9/PyTorchIntroduction
9435542b17840272f1787119a00fc3daf8815455
[ "BSD-3-Clause" ]
205
2020-05-27T12:57:42.000Z
2022-03-29T03:32:09.000Z
Chapter3/ex_3_18.py
sophiewu1204/PyTorchIntroduction
ef9e01d815696cfc9ba882c303116140f8163141
[ "BSD-3-Clause" ]
9
2020-06-12T01:17:54.000Z
2021-01-06T12:45:11.000Z
Chapter3/ex_3_18.py
sophiewu1204/PyTorchIntroduction
ef9e01d815696cfc9ba882c303116140f8163141
[ "BSD-3-Clause" ]
63
2020-06-27T02:46:22.000Z
2022-03-22T02:21:49.000Z
""" python ex_3_18.py # """ import torch.nn as nn # #
26.472222
76
0.549843
""" 本文件中的代码可以通过使用命令 python ex_3_18.py 运行 (#号及其后面内容为注释,可以忽略) """ import torch.nn as nn # 模块列表的使用方法 class MyModule(nn.Module): def __init__(self): super(MyModule, self).__init__() self.linears = nn.ModuleList([nn.Linear(10, 10) for i in range(10)]) def forward(self, x): # 模块列表的迭代和使...
216
0
0
771
0
0
0
0
44
64c0607d94ce92f5673def3652d4e81d5d939a73
358
py
Python
bookmarks/admin.py
gradel/django-generic-bookmarks
98d4c2099c019a6767fccebd96ec726f35fd1414
[ "MIT" ]
null
null
null
bookmarks/admin.py
gradel/django-generic-bookmarks
98d4c2099c019a6767fccebd96ec726f35fd1414
[ "MIT" ]
null
null
null
bookmarks/admin.py
gradel/django-generic-bookmarks
98d4c2099c019a6767fccebd96ec726f35fd1414
[ "MIT" ]
null
null
null
from django.contrib import admin from bookmarks import models admin.site.register(models.Bookmark, BookmarkAdmin)
25.571429
66
0.701117
from django.contrib import admin from bookmarks import models class BookmarkAdmin(admin.ModelAdmin): list_display = ('content_object', 'key', 'user', 'created_at') list_filter = ('created_at',) ordering = ('-created_at',) search_fields = ('user', 'key') readonly_fields = ('user',) admin.site.reg...
0
0
0
218
0
0
0
0
23
d75f33d0c842c00b8a6d318eaccad5d3bb508655
17,634
py
Python
ostap/math/tests/test_math_interpolation.py
TatianaOvsiannikova/ostap
a005a78b4e2860ac8f4b618e94b4b563b2eddcf1
[ "BSD-3-Clause" ]
null
null
null
ostap/math/tests/test_math_interpolation.py
TatianaOvsiannikova/ostap
a005a78b4e2860ac8f4b618e94b4b563b2eddcf1
[ "BSD-3-Clause" ]
null
null
null
ostap/math/tests/test_math_interpolation.py
TatianaOvsiannikova/ostap
a005a78b4e2860ac8f4b618e94b4b563b2eddcf1
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # ============================================================================= # Copyright (c) Ostap developpers. # ============================================================================= ## @file ostap/math/tests/test_math_interpolation.py # Test module for the fi...
35.338677
120
0.447885
#!/usr/bin/env python # -*- coding: utf-8 -*- # ============================================================================= # Copyright (c) Ostap developpers. # ============================================================================= ## @file ostap/math/tests/test_math_interpolation.py # Test module for the fi...
0
0
0
0
0
5,059
0
211
275
13d4010833643e040f38190893a391c7e1b98730
3,337
py
Python
exporters/committime/__init__.py
caiomedeirospinto/pelorus
2cd21f11cb36b1d1cd34add6c7d23c13079d803c
[ "Apache-2.0" ]
71
2019-11-27T19:36:42.000Z
2021-02-09T22:22:58.000Z
exporters/committime/__init__.py
caiomedeirospinto/pelorus
2cd21f11cb36b1d1cd34add6c7d23c13079d803c
[ "Apache-2.0" ]
176
2019-11-27T18:46:20.000Z
2021-02-15T14:39:21.000Z
exporters/committime/__init__.py
caiomedeirospinto/pelorus
2cd21f11cb36b1d1cd34add6c7d23c13079d803c
[ "Apache-2.0" ]
43
2019-12-11T20:43:58.000Z
2021-02-14T18:50:00.000Z
SUPPORTED_PROTOCOLS = {"http", "https", "ssh", "git"}
35.5
106
0.676056
import logging from typing import Any, Optional import attr import giturlparse SUPPORTED_PROTOCOLS = {"http", "https", "ssh", "git"} @attr.define class CommitMetric: name: str = attr.field() labels: Any = attr.field(default=None, kw_only=True) namespace: Optional[str] = attr.field(default=None, kw_only=...
0
3,178
0
0
0
0
0
-9
112
c2e2610277683c960b2b4f57aac87a84e28e1b95
1,181
py
Python
setup.py
thelastpickle-private/cass_snapshot_link
d81e8d968dd19bd8439d87706c3236f0b84a3a72
[ "Apache-2.0" ]
null
null
null
setup.py
thelastpickle-private/cass_snapshot_link
d81e8d968dd19bd8439d87706c3236f0b84a3a72
[ "Apache-2.0" ]
null
null
null
setup.py
thelastpickle-private/cass_snapshot_link
d81e8d968dd19bd8439d87706c3236f0b84a3a72
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 # Copyright 2012 Aaron Morton # # 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 ...
28.804878
74
0.725656
#!/usr/bin/env python # encoding: utf-8 # Copyright 2012 Aaron Morton # # 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 ...
0
0
0
0
0
0
0
0
0
40a5c13d7bfe8ebdc535f6e928718db2cd73a81f
623
py
Python
src/11/11367.py
youngdaLee/Baekjoon
7d858d557dbbde6603fe4e8af2891c2b0e1940c0
[ "MIT" ]
11
2020-09-20T15:17:11.000Z
2022-03-17T12:43:33.000Z
src/11/11367.py
youngdaLee/Baekjoon
7d858d557dbbde6603fe4e8af2891c2b0e1940c0
[ "MIT" ]
3
2021-10-30T07:51:36.000Z
2022-03-09T05:19:23.000Z
src/11/11367.py
youngdaLee/Baekjoon
7d858d557dbbde6603fe4e8af2891c2b0e1940c0
[ "MIT" ]
13
2021-01-21T03:19:08.000Z
2022-03-28T10:44:58.000Z
""" 11367. Report Card Time : xCrypt0r : Python 3 : 29,380 KB : 64 ms : 2020 9 18 """ if __name__ == '__main__': main()
20.096774
37
0.499197
""" 11367. Report Card Time 작성자: xCrypt0r 언어: Python 3 사용 메모리: 29,380 KB 소요 시간: 64 ms 해결 날짜: 2020년 9월 18일 """ def main(): for _ in range(int(input())): name, score = input().split() score = int(score) if score < 60: grade = 'F' elif score < 67: grade = 'D' elif score < 70:...
63
0
0
0
0
449
0
0
23
f85703056f319c73f3770b2046065e608e49dc85
488
py
Python
vaetc/network/reparam.py
ganmodokix/vaetc
866b79677b4f06603203376d967989dedadbffae
[ "MIT" ]
null
null
null
vaetc/network/reparam.py
ganmodokix/vaetc
866b79677b4f06603203376d967989dedadbffae
[ "MIT" ]
null
null
null
vaetc/network/reparam.py
ganmodokix/vaetc
866b79677b4f06603203376d967989dedadbffae
[ "MIT" ]
null
null
null
import torch def reparameterize(mean: torch.Tensor, logvar: torch.Tensor) -> torch.Tensor: """ The reparameterization trick (https://arxiv.org/abs/1312.6114) in a Gaussian distribution. Args: mean (torch.Tensor): The mean of the distribution. logvar (torch.Tensor): The log-variance of the dist...
28.705882
98
0.659836
import torch def reparameterize(mean: torch.Tensor, logvar: torch.Tensor) -> torch.Tensor: """ The reparameterization trick (https://arxiv.org/abs/1312.6114) in a Gaussian distribution. Args: mean (torch.Tensor): The mean of the distribution. logvar (torch.Tensor): The log-variance of the dist...
0
0
0
0
0
0
0
0
0
38d49c29fd8739b65f74150fb28bd10e2c83a28f
953
py
Python
Learning Goal Generator/learninggoalgenerator.py
jaeheonshim/smallprojects
69746094541f880aff6539fb8fcd63fcb93c4298
[ "MIT" ]
null
null
null
Learning Goal Generator/learninggoalgenerator.py
jaeheonshim/smallprojects
69746094541f880aff6539fb8fcd63fcb93c4298
[ "MIT" ]
null
null
null
Learning Goal Generator/learninggoalgenerator.py
jaeheonshim/smallprojects
69746094541f880aff6539fb8fcd63fcb93c4298
[ "MIT" ]
null
null
null
import random from random import randint import time percentg = randint(90, 100) percentg = str(percentg) randassign = input("Enter assignment example: The map quiz >>>") time.sleep(1) finished = False while finished == False: goals = ["I will complete most of my homework in class", "I will be focused in class " +...
35.296296
83
0.678909
import random from random import randint import time percentg = randint(90, 100) percentg = str(percentg) randassign = input("Enter assignment example: The map quiz >>>") time.sleep(1) finished = False while finished == False: goals = ["I will complete most of my homework in class", "I will be focused in class " +...
0
0
0
0
0
0
0
0
0
18f74ec34f4c49e2063ec4a89174542ce0a24be0
17,565
py
Python
tridesclous/matplotlibplot.py
subhacom/tridesclous
e80dc7b82a7661732cff05a7b2064aeb6c0d9326
[ "MIT" ]
null
null
null
tridesclous/matplotlibplot.py
subhacom/tridesclous
e80dc7b82a7661732cff05a7b2064aeb6c0d9326
[ "MIT" ]
null
null
null
tridesclous/matplotlibplot.py
subhacom/tridesclous
e80dc7b82a7661732cff05a7b2064aeb6c0d9326
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt from .catalogueconstructor import CatalogueConstructor from .tools import make_color_dict, get_neighborhood def plot_centroids(arg0, labels=[], alpha=1, neighborhood_radius=None, **kargs): """ arg0 can be cataloguecconstructor or catalogue...
32.05292
110
0.576829
import numpy as np import matplotlib.pyplot as plt from .tools import median_mad from .dataio import DataIO from .catalogueconstructor import CatalogueConstructor from .tools import make_color_dict, get_neighborhood def plot_probe_geometry(dataio, chan_grp=0, margin=150, channel_number_mode='absolut'): ...
6
0
0
0
0
10,147
0
13
264
97317b543e1e1d3028d091bdfe7c3e24f2a939a3
2,636
py
Python
Chapter 9/9.4_9.5.py
adrian88szymanski/Python_Crash_Course_Eric_Matthes
74e9a627e3e044ea30e4a8579843d95fe8e4fc14
[ "MIT" ]
8
2021-07-21T02:52:49.000Z
2022-02-08T20:47:09.000Z
Chapter 9/9.4_9.5.py
barbarian47/Python_Crash_Course_Eric_Matthes
74e9a627e3e044ea30e4a8579843d95fe8e4fc14
[ "MIT" ]
null
null
null
Chapter 9/9.4_9.5.py
barbarian47/Python_Crash_Course_Eric_Matthes
74e9a627e3e044ea30e4a8579843d95fe8e4fc14
[ "MIT" ]
7
2021-06-10T12:27:56.000Z
2022-01-29T13:53:15.000Z
#! python3 print("Task 9.4") restaurant = Restaurant('food house', 'grill bar') restaurant.describe_restaurant() restaurant.open_restaurant() print(f"\nNumber served: {restaurant.number_served}") restaurant.number_served = 430 print(f"Number served: {restaurant.number_served}") restaurant.number_served = 4245 print...
30.651163
94
0.690819
#! python3 print("Task 9.4") class Restaurant(): """Class about opening restaurant""" def __init__(self, restaurant_name, cuisine_type): self.restaurant_name = restaurant_name.title() self.cuisine_type = cuisine_type.title() self.number_served = 0 def describe_restaurant(self): ...
0
0
0
1,618
0
0
0
0
46
81bc90a8018baee67c5da0757ba66c67712b62f6
64
py
Python
torchtext/experimental/datasets/__init__.py
parmeet/text
1fb2aedb48b5ecc5e81741e7c8504486b91655c6
[ "BSD-3-Clause" ]
3,172
2017-01-18T19:47:03.000Z
2022-03-27T17:06:03.000Z
torchtext/experimental/datasets/__init__.py
parmeet/text
1fb2aedb48b5ecc5e81741e7c8504486b91655c6
[ "BSD-3-Clause" ]
1,228
2017-01-18T20:09:16.000Z
2022-03-31T04:42:35.000Z
torchtext/experimental/datasets/__init__.py
parmeet/text
1fb2aedb48b5ecc5e81741e7c8504486b91655c6
[ "BSD-3-Clause" ]
850
2017-01-19T03:19:54.000Z
2022-03-29T15:29:52.000Z
from . import raw from . import sst2 __all__ = ["raw", "sst2"]
12.8
25
0.640625
from . import raw from . import sst2 __all__ = ["raw", "sst2"]
0
0
0
0
0
0
0
0
0
4e9e5ee1ac04556c1142d63b596086b406b05c45
3,897
py
Python
boku-no-hero-academia/boku-no-hero-academia.py
lauwilson/respectful-manga-scraper
973504f6446b93e997d8303b7a1e0ee11eeeb93d
[ "MIT" ]
null
null
null
boku-no-hero-academia/boku-no-hero-academia.py
lauwilson/respectful-manga-scraper
973504f6446b93e997d8303b7a1e0ee11eeeb93d
[ "MIT" ]
null
null
null
boku-no-hero-academia/boku-no-hero-academia.py
lauwilson/respectful-manga-scraper
973504f6446b93e997d8303b7a1e0ee11eeeb93d
[ "MIT" ]
null
null
null
# logpath = 'results_hero_academia.log' # if os.path.exists(logpath): # pass # logging.basicConfig(filename=logpath) domain = "http://eatmanga.com" # time.sleep(3) # if os.access(incomplete_local_chapter_path, os.W_OK): # os.rename(incomplete_local_chapter_path, local_chapter_path) # els...
36.764151
109
0.657172
import requests from lxml import html import shutil import time import os import logging import re import random # logpath = 'results_hero_academia.log' # if os.path.exists(logpath): # pass # logging.basicConfig(filename=logpath) domain = "http://eatmanga.com" def main(): outputPath = ".\\output\\" if no...
0
0
0
0
0
2,967
0
-63
291
f592b77c8b171c7aedc3ea012695446731defc1e
4,813
py
Python
Auto_trade.py
lyk109/Auto_Metal_Trade
be9cd79a530724f8a51c674f64b5028c929e2e09
[ "Apache-2.0" ]
null
null
null
Auto_trade.py
lyk109/Auto_Metal_Trade
be9cd79a530724f8a51c674f64b5028c929e2e09
[ "Apache-2.0" ]
null
null
null
Auto_trade.py
lyk109/Auto_Metal_Trade
be9cd79a530724f8a51c674f64b5028c929e2e09
[ "Apache-2.0" ]
4
2018-03-27T18:21:00.000Z
2022-03-07T16:14:29.000Z
#!/usr/bin/env.python #_*_ coding: utf-8 _*_ # # # main()
40.108333
121
0.513609
#!/usr/bin/env.python #_*_ coding: utf-8 _*_ from selenium import webdriver import os import time import Trade #获取当前时间 def gettime(): a = time.localtime() year = int(a[0]) month = int(a[1]) day = int(a[2]) hour = int(a[3]) minute = int(a[4]) sec = int(a[5]) now = "%0...
921
0
0
0
0
4,316
0
-22
140
75a669f9376fabe7dfff8db8e1b03894f3db4c9e
3,684
py
Python
examples/plot_cca.py
Teekuningas/pypma
5ca2788bf036bdc84440dadc194cd0bb39dd2057
[ "BSD-3-Clause" ]
10
2020-10-18T16:35:40.000Z
2022-03-10T13:48:57.000Z
examples/plot_cca.py
jaidevjoshi83/sparsecca
5ca2788bf036bdc84440dadc194cd0bb39dd2057
[ "BSD-3-Clause" ]
4
2021-11-12T10:27:40.000Z
2022-01-04T16:50:39.000Z
examples/plot_cca.py
jaidevjoshi83/sparsecca
5ca2788bf036bdc84440dadc194cd0bb39dd2057
[ "BSD-3-Clause" ]
1
2022-01-06T14:05:54.000Z
2022-01-06T14:05:54.000Z
""" Different CCA methods ===================== Exempliefies different CCA methods """ # %% # Import necessary libraries. import pandas as pd import numpy as np from numpy.linalg import svd from statsmodels.multivariate.cancorr import CanCorr from sparsecca import cca_ipls from sparsecca import cca_pmd from spars...
29.007874
91
0.680239
""" Different CCA methods ===================== Exempliefies different CCA methods """ # %% # Import necessary libraries. import pandas as pd import numpy as np from numpy.linalg import svd from statsmodels.multivariate.cancorr import CanCorr from sparsecca import cca_ipls from sparsecca import cca_pmd from spars...
0
0
0
0
0
176
0
13
44
97ec20d8e8b04e37b7816d9f2800e1514126ee8c
2,602
py
Python
tests/links_tests/model_tests/faster_rcnn_tests/utils_tests/test_bbox2loc_loc2bbox.py
HPI-MachineIntelligence-MetaLearning/chainercv_ssd
304098bafed1dc709ec40193ac77fd70297b88a0
[ "MIT" ]
1
2017-09-04T22:03:03.000Z
2017-09-04T22:03:03.000Z
tests/links_tests/model_tests/faster_rcnn_tests/utils_tests/test_bbox2loc_loc2bbox.py
HPI-MachineIntelligence-MetaLearning/chainercv_ssd
304098bafed1dc709ec40193ac77fd70297b88a0
[ "MIT" ]
null
null
null
tests/links_tests/model_tests/faster_rcnn_tests/utils_tests/test_bbox2loc_loc2bbox.py
HPI-MachineIntelligence-MetaLearning/chainercv_ssd
304098bafed1dc709ec40193ac77fd70297b88a0
[ "MIT" ]
null
null
null
from chainer import testing testing.run_module(__name__, __file__)
30.255814
72
0.664105
import unittest import numpy as np from chainer import cuda from chainer import testing from chainer.testing import attr from chainercv.links.model.faster_rcnn import bbox2loc from chainercv.links.model.faster_rcnn import loc2bbox from chainercv.utils import generate_random_bbox class TestLocBboxConversions(unitte...
0
508
0
1,722
0
0
0
98
203
ccd8eba2ba346c7bff7ce960639830bf8f3893ec
5,919
py
Python
speech_to_text/transcribe_audio.py
dertilo/speech-to-text
3d18ca00d81cdfc393f79639b705a8ff03fb80d9
[ "MIT" ]
null
null
null
speech_to_text/transcribe_audio.py
dertilo/speech-to-text
3d18ca00d81cdfc393f79639b705a8ff03fb80d9
[ "MIT" ]
null
null
null
speech_to_text/transcribe_audio.py
dertilo/speech-to-text
3d18ca00d81cdfc393f79639b705a8ff03fb80d9
[ "MIT" ]
null
null
null
import os import numpy as np import torch from nemo.collections.asr.parts.preprocessing import AudioSegment TARGET_SAMPLE_RATE = 16_000 if __name__ == "__main__": # idxs = list((k,list(g)) for k,g in itertools.groupby(list(enumerate("thisss isss a ttteeest")), key=lambda x: x[1])) # print(idxs) audio...
32.521978
122
0.642507
import itertools import os from dataclasses import dataclass from typing import Optional, List, Tuple import librosa import numpy as np import torch from nemo.collections.asr.parts.preprocessing import AudioSegment from speech_processing.speech_utils import MAX_16_BIT_PCM from transformers import Wav2Vec2Processor, Wa...
0
4,513
0
0
0
0
0
92
225
1a4f6d8eae8699f972bada89572a8f1267ba502e
4,067
py
Python
lastfm_crawler/user_crawler.py
saskeli/ds_last
d2290a95e465e0fb99c326399a69b6ed038efeff
[ "MIT" ]
null
null
null
lastfm_crawler/user_crawler.py
saskeli/ds_last
d2290a95e465e0fb99c326399a69b6ed038efeff
[ "MIT" ]
null
null
null
lastfm_crawler/user_crawler.py
saskeli/ds_last
d2290a95e465e0fb99c326399a69b6ed038efeff
[ "MIT" ]
null
null
null
import sys from os.path import isfile if __name__ == "__main__": args = _argparse().parse_args() assert args.name or args.input, "either seed file or seed string needs to be supplied" seed = [args.name] if args.input and isfile(args.input): seed = read_names(args.input) main(Connect...
35.060345
119
0.573396
import json import requests import sys import time from argparse import ArgumentParser from collections import deque from os.path import isfile from tabber import Tabber def _argparse(): arg_parse = ArgumentParser(description="Crawl last.fm for finnish users, given a seed person or a reference to a " ...
0
0
0
753
0
2,631
0
0
294
cbeb3a0e3bdb5f4f1bf3231ca4a178149ae7b240
22,226
py
Python
Dragon/python/dragon/vm/caffe/layers/common.py
awesome-archive/Dragon
b35f9320909d07d138c2f6b345a4c24911f7c521
[ "BSD-2-Clause" ]
null
null
null
Dragon/python/dragon/vm/caffe/layers/common.py
awesome-archive/Dragon
b35f9320909d07d138c2f6b345a4c24911f7c521
[ "BSD-2-Clause" ]
null
null
null
Dragon/python/dragon/vm/caffe/layers/common.py
awesome-archive/Dragon
b35f9320909d07d138c2f6b345a4c24911f7c521
[ "BSD-2-Clause" ]
null
null
null
# ------------------------------------------------------------ # Copyright (c) 2017-present, SeetaTech, Co.,Ltd. # # Licensed under the BSD 2-Clause License. # You should have received a copy of the BSD 2-Clause License # along with the software. If not, See, # # <https://opensource.org/licenses/BSD-2-Clause> # # ...
32.258345
92
0.636732
# ------------------------------------------------------------ # Copyright (c) 2017-present, SeetaTech, Co.,Ltd. # # Licensed under the BSD 2-Clause License. # You should have received a copy of the BSD 2-Clause License # along with the software. If not, See, # # <https://opensource.org/licenses/BSD-2-Clause> # # ...
0
0
0
20,999
0
0
0
-4
666
a131a884e9c104640456c5d82c206dc9213ca3b6
2,474
py
Python
screen_win.py
ajaxalex5/MidYearProject
a399347cd8cb4b24cf1aeac4e11269a0a2109ddf
[ "MIT" ]
null
null
null
screen_win.py
ajaxalex5/MidYearProject
a399347cd8cb4b24cf1aeac4e11269a0a2109ddf
[ "MIT" ]
null
null
null
screen_win.py
ajaxalex5/MidYearProject
a399347cd8cb4b24cf1aeac4e11269a0a2109ddf
[ "MIT" ]
null
null
null
#root = Tk() #root.title("Win Screen") #app = Winscreen(root) #root.mainloop()
28.436782
92
0.460792
from tkinter import * from time import * from threading import * class Winscreen(Frame): def __init__(self, master, restart, level, player): super().__init__(master) self.grid() self.level = level self.player = player self.create_widgets() self.restart = restart ...
0
0
0
2,307
0
0
0
-1
89
7ca4f9d933e0b40cb371a6fac0b9094faab88b1c
1,938
py
Python
setup.py
hnyu/alf
7548f034e4abbd49a52fed27a01861ee5bfcc1d7
[ "Apache-2.0" ]
1
2022-02-15T07:18:32.000Z
2022-02-15T07:18:32.000Z
setup.py
Aminullah6264/gpvi_plus_updated_adv
449cb2594a1a9ee158af19984c4caaf7d86f1e7f
[ "Apache-2.0" ]
null
null
null
setup.py
Aminullah6264/gpvi_plus_updated_adv
449cb2594a1a9ee158af19984c4caaf7d86f1e7f
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2019 Horizon Robotics. 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 applicab...
34
92
0.613003
# Copyright (c) 2019 Horizon Robotics. 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 applicab...
0
0
0
0
0
0
0
-12
22
8c9401575c1fac60aad305ab5cc3d1501c9f05e2
4,084
py
Python
RLBench/policy/controller.py
ZXspectrumZ80/The-RL-works
73b27b528bb382536ba1d233b4b3c04f7ac993d0
[ "MIT" ]
null
null
null
RLBench/policy/controller.py
ZXspectrumZ80/The-RL-works
73b27b528bb382536ba1d233b4b3c04f7ac993d0
[ "MIT" ]
null
null
null
RLBench/policy/controller.py
ZXspectrumZ80/The-RL-works
73b27b528bb382536ba1d233b4b3c04f7ac993d0
[ "MIT" ]
1
2021-11-13T05:59:33.000Z
2021-11-13T05:59:33.000Z
"""Quadrocopter Controller.""" import logging logger = logging.getLogger(__name__) __all__ = ('NonLinearQuadrocopterController') # TODO: Controller: Documentation
32.412698
76
0.544809
"""Quadrocopter Controller.""" from RLBench import Policy from RLBench.spaces import BoundedSpace from RLBench.envs._quadrocopter import StateVector import numpy as np import logging logger = logging.getLogger(__name__) __all__ = ('NonLinearQuadrocopterController') # TODO: Controller: Documentation class NonLinea...
0
250
0
3,506
0
0
0
49
111
279dad7cb79c25a66b3c58fb4b92ab1f75306a98
251
py
Python
loginInfo/admin.py
Shamaun-Nabi/Online-Gaming-Shop
817f43e8a7db0805fedc47089894b531251b1131
[ "MIT" ]
3
2021-03-30T17:56:43.000Z
2021-04-10T08:55:07.000Z
loginInfo/admin.py
Shamaun-Nabi/Online-Gaming-Shop-with-Team
817f43e8a7db0805fedc47089894b531251b1131
[ "MIT" ]
2
2021-03-19T16:18:46.000Z
2021-03-20T13:23:13.000Z
loginInfo/admin.py
Shamaun-Nabi/Online-Gaming-Shop
817f43e8a7db0805fedc47089894b531251b1131
[ "MIT" ]
3
2021-03-08T15:57:11.000Z
2021-07-07T17:00:43.000Z
from django.contrib import admin from .models import Customer # Register your models here. admin.site.register(Customer,CustomerInfo)
25.1
71
0.76494
from django.contrib import admin from .models import Customer # Register your models here. class CustomerInfo(admin.ModelAdmin): list_display=['first_name','last_name','email','phone','password',] admin.site.register(Customer,CustomerInfo)
0
0
0
88
0
0
0
0
23
1bb5af85bd32a5fd6c82b973c35a5fc97996ce65
1,158
py
Python
load_dfs_check.py
kedarshet/Hadoop-Distributed-File-System.-Customized-
62646f50a1937e57d2cfa20cb0109d0cd9089e07
[ "Apache-2.0" ]
1
2021-12-14T11:39:42.000Z
2021-12-14T11:39:42.000Z
load_dfs_check.py
kedarshet/Hadoop-Distributed-File-System.-Customized-
62646f50a1937e57d2cfa20cb0109d0cd9089e07
[ "Apache-2.0" ]
null
null
null
load_dfs_check.py
kedarshet/Hadoop-Distributed-File-System.-Customized-
62646f50a1937e57d2cfa20cb0109d0cd9089e07
[ "Apache-2.0" ]
null
null
null
# check_datanode("/home/akanksha/BD_YAH/NameNode/")
37.354839
83
0.498273
import os import pathlib import json from datanode import remove def check_datanode(path_to_namenodes,datanode_log_path,namenode_log_path): with open(os.path.join(path_to_namenodes,"namenode.json"), 'r') as fp: data=json.load(fp) for i in data.keys(): if i[-1]=="/": continue ...
0
0
0
0
0
1,019
0
-23
111
d79fbdcc3b0861d43be87b655050fe7e38518769
1,051
py
Python
main.py
tatsuokun/sentence_compressoin
64655353ee7d351892fdc9c77a54f03a46097934
[ "BSD-3-Clause" ]
10
2018-12-16T11:15:35.000Z
2021-11-15T06:16:58.000Z
main.py
tatsuokun/sentence_compressoin
64655353ee7d351892fdc9c77a54f03a46097934
[ "BSD-3-Clause" ]
null
null
null
main.py
tatsuokun/sentence_compressoin
64655353ee7d351892fdc9c77a54f03a46097934
[ "BSD-3-Clause" ]
2
2019-04-11T06:28:46.000Z
2019-07-10T03:26:21.000Z
if __name__ == '__main__': main()
23.886364
58
0.53568
import argparse import torch from run import load, run def parse_args(): gpu_id = -1 parser = argparse.ArgumentParser(prog='evaluation') parser.add_argument('--gpu-id', type=int, metavar='GPU_ID', default=gpu_id) return parser.pa...
0
0
0
0
0
908
0
-11
112
d7b23bc80fc2e2b518c927f442bd9ee2af45eec2
608
py
Python
docs/tutorials/functions/binning.py
p-teng/ProgLearn
d449a60237a13e8c5a35e9f885219720134b9d62
[ "MIT" ]
1
2021-02-02T03:18:46.000Z
2021-02-02T03:18:46.000Z
tutorials/functions/binning.py
p-teng/ProgLearn
d449a60237a13e8c5a35e9f885219720134b9d62
[ "MIT" ]
null
null
null
tutorials/functions/binning.py
p-teng/ProgLearn
d449a60237a13e8c5a35e9f885219720134b9d62
[ "MIT" ]
null
null
null
import math from sklearn.preprocessing import KBinsDiscretizer def KBinsDiscretize(data_x, n_bins=0, alpha=3.322, encode="ordinal", strategy="uniform"): """ """ # Makes n_bins optional, calculates optimal n_bins by default # Sturges Rule - num_bins = 1 + 3.322 * log_10(num_inputs) if n_bins ...
30.4
89
0.674342
import numpy as np import math from sklearn.preprocessing import KBinsDiscretizer def KBinsDiscretize(data_x, n_bins=0, alpha=3.322, encode="ordinal", strategy="uniform"): """ """ # Makes n_bins optional, calculates optimal n_bins by default # Sturges Rule - num_bins = 1 + 3.322 * log_10(num_inp...
0
0
0
0
0
0
0
-3
22
8a446fd08dc38b9e05a08eef8f7aefed7ddc4094
678
py
Python
hash.py
heterogenousok/leetcode
b9048ad9536e7814b3a98c6924963d2c3b8e9995
[ "MIT" ]
null
null
null
hash.py
heterogenousok/leetcode
b9048ad9536e7814b3a98c6924963d2c3b8e9995
[ "MIT" ]
null
null
null
hash.py
heterogenousok/leetcode
b9048ad9536e7814b3a98c6924963d2c3b8e9995
[ "MIT" ]
null
null
null
#!/usr/bin/python # author luke # MAXKEY=1000 if __name__ == '__main__': use_hash() hash('xiongda') # #O(1) O(1)
20.545455
69
0.530973
#!/usr/bin/python # author luke #常量会用大写的来命名 MAXKEY=1000 def elf_hash(hash_str): h = 0 g = 0 for i in hash_str: h = (h << 4) + ord(i) g = h & 0xf0000000 if g: h ^= g >> 24 h &= ~g return h % MAXKEY def use_hash(): str_list = ["xiongda", "lele", "hanmeime...
198
0
0
0
0
439
0
0
46
4d55d0d30d5562fdaca9f9fea6a2697d32419a14
1,730
py
Python
ThreadedPS.py
Rishit-dagli/Network-scanner-Python
951e8caa0344a388a517250b3e2aac071eea03c3
[ "Apache-2.0" ]
1
2020-07-24T03:50:18.000Z
2020-07-24T03:50:18.000Z
ThreadedPS.py
Rishit-dagli/Network-scanner-Python
951e8caa0344a388a517250b3e2aac071eea03c3
[ "Apache-2.0" ]
null
null
null
ThreadedPS.py
Rishit-dagli/Network-scanner-Python
951e8caa0344a388a517250b3e2aac071eea03c3
[ "Apache-2.0" ]
null
null
null
''' Threaded Port Scanner 1.0.0: A python code to demonstrate demonstrates a Threaded Port scanner built using Python 3.x We here use threading to speed up the process Note: Port scanning is dangerous, so you are advised to not to use this script without permission ''' __author__ = "Rishit Dagli" __co...
21.358025
89
0.641618
''' Threaded Port Scanner 1.0.0: A python code to demonstrate demonstrates a Threaded Port scanner built using Python 3.x We here use threading to speed up the process Note: Port scanning is dangerous, so you are advised to not to use this script without permission ''' __author__ = "Rishit Dagli" __co...
0
0
0
0
0
0
0
0
0
d3574e8af1c184730367a0ea0193ba07db199e7b
302
py
Python
projects/01_Sort-Analysis/misc/prettify_colors.py
Shishqa/MIPT_3sem_Cpp-Practice
860949738d33f44f0faf8bdc5021d4b98e048a51
[ "MIT" ]
null
null
null
projects/01_Sort-Analysis/misc/prettify_colors.py
Shishqa/MIPT_3sem_Cpp-Practice
860949738d33f44f0faf8bdc5021d4b98e048a51
[ "MIT" ]
null
null
null
projects/01_Sort-Analysis/misc/prettify_colors.py
Shishqa/MIPT_3sem_Cpp-Practice
860949738d33f44f0faf8bdc5021d4b98e048a51
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import re import sys good_text = [] text = sys.stdin.readlines() for line in text: line = re.split(r"\W+", line) line[0] = re.sub(r'(?<!^)(?=[A-Z])', '_', line[0]).upper() print("#define %-25s {%3s, %3s, %3s, 255}" % (line[0], line[2], line[3], line[4]))
20.133333
62
0.519868
#!/usr/bin/python3 import re import sys good_text = [] text = sys.stdin.readlines() for line in text: line = re.split(r"\W+", line) line[0] = re.sub(r'(?<!^)(?=[A-Z])', '_', line[0]).upper() print("#define %-25s {%3s, %3s, %3s, 255}" % (line[0], line[2], line[3], line[4]))
0
0
0
0
0
0
0
0
0
210fae3a5743726bbbfabaeda5798d9522a8c92f
18,760
py
Python
pybb/views.py
concentricsky/pybbm
90147b74cff4740e6580a94b073f5eb576a93b4f
[ "BSD-2-Clause" ]
null
null
null
pybb/views.py
concentricsky/pybbm
90147b74cff4740e6580a94b073f5eb576a93b4f
[ "BSD-2-Clause" ]
null
null
null
pybb/views.py
concentricsky/pybbm
90147b74cff4740e6580a94b073f5eb576a93b4f
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from django.shortcuts import _get_queryset try: from django.views import generic except ImportError: try: except ImportError: raise ImportError('If you using django version < 1.3 you should install django-cbv for pybb') def filter_hidden(request, queryset_or_model): ""...
37.89899
163
0.66242
# -*- coding: utf-8 -*- import math from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required, permission_required from django.core.exceptions import ObjectDoesNotExist, PermissionDenied from django.core.urlresolvers import reverse from django.contrib import messages from d...
0
3,004
0
13,466
0
0
0
707
985
388efb07d573526bcd899e300f83577b7efcfd9b
3,770
py
Python
tests/runner/http/test_method.py
liuxiran/apisix-python-plugin-runner
d69efa1a8cb4e6e111b611cb564224339bae039d
[ "Apache-2.0" ]
null
null
null
tests/runner/http/test_method.py
liuxiran/apisix-python-plugin-runner
d69efa1a8cb4e6e111b611cb564224339bae039d
[ "Apache-2.0" ]
1
2021-10-17T12:30:45.000Z
2021-10-17T12:30:45.000Z
tests/runner/http/test_method.py
liuxiran/apisix-python-plugin-runner
d69efa1a8cb4e6e111b611cb564224339bae039d
[ "Apache-2.0" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
67.321429
101
0.818037
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
0
0
0
0
0
2,842
0
50
91
819bed47d1694a56d20515557978f8557c066f38
1,336
py
Python
thirdparty/blender_autocomplete-master/2.81a/bpy/ops/boid.py
Ray1184/HPMSBatch
3852710e7366361cb9e90f471ddccbbce5ffe8ee
[ "MIT" ]
null
null
null
thirdparty/blender_autocomplete-master/2.81a/bpy/ops/boid.py
Ray1184/HPMSBatch
3852710e7366361cb9e90f471ddccbbce5ffe8ee
[ "MIT" ]
null
null
null
thirdparty/blender_autocomplete-master/2.81a/bpy/ops/boid.py
Ray1184/HPMSBatch
3852710e7366361cb9e90f471ddccbbce5ffe8ee
[ "MIT" ]
null
null
null
import typing def rule_add(type: typing.Union[int, str] = 'GOAL'): '''Add a boid rule to the current boid state :param type: TypeGOAL Goal, Go to assigned object or loudest assigned signal source.AVOID Avoid, Get away from assigned object or loudest assigned signal source.AVOID_COLLISION Avoid Collision, Ma...
19.362319
591
0.678892
import sys import typing def rule_add(type: typing.Union[int, str] = 'GOAL'): '''Add a boid rule to the current boid state :param type: TypeGOAL Goal, Go to assigned object or loudest assigned signal source.AVOID Avoid, Get away from assigned object or loudest assigned signal source.AVOID_COLLISION Avoid Co...
0
0
0
0
0
0
0
-11
22
a2a77975fc6ffe1b9867301f70347d67a986b9a7
1,180
py
Python
export_dms/help_form.py
shagun30/djambala-2
06f14e3dd237d7ebf535c62172cfe238c3934f4d
[ "BSD-3-Clause" ]
null
null
null
export_dms/help_form.py
shagun30/djambala-2
06f14e3dd237d7ebf535c62172cfe238c3934f4d
[ "BSD-3-Clause" ]
null
null
null
export_dms/help_form.py
shagun30/djambala-2
06f14e3dd237d7ebf535c62172cfe238c3934f4d
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ /dms/export_dms/help_form.py .. enthaelt die kompletten Kontext-Hilfetexte fuer die Exportseite Django content Management System Hans Rauch hans.rauch@gmx.net Die Programme des dms-Systems koennen frei genutzt und den spezifischen Beduerfnissen entsprechend angepasst werden. 0.0...
28.780488
94
0.629661
# -*- coding: utf-8 -*- """ /dms/export_dms/help_form.py .. enthaelt die kompletten Kontext-Hilfetexte fuer die Exportseite Django content Management System Hans Rauch hans.rauch@gmx.net Die Programme des dms-Systems koennen frei genutzt und den spezifischen Beduerfnissen entsprechend angepasst werden. 0.0...
4
0
0
0
0
0
0
0
0
69d6fd1e9534b3ef92d35c92ac76db26d17effb8
7,406
py
Python
easyPheno/generate_feat_impo.py
grimmlab/easyPheno
176121763ca681d0f0b65c7558d7bb117155c2fa
[ "MIT" ]
null
null
null
easyPheno/generate_feat_impo.py
grimmlab/easyPheno
176121763ca681d0f0b65c7558d7bb117155c2fa
[ "MIT" ]
null
null
null
easyPheno/generate_feat_impo.py
grimmlab/easyPheno
176121763ca681d0f0b65c7558d7bb117155c2fa
[ "MIT" ]
null
null
null
import numpy as np import os import glob import optuna.trial import pandas as pd from easyPheno.preprocess import base_dataset from easyPheno.utils import helper_functions from easyPheno.model import _base_model from easyPheno.evaluation import eval_metrics, results_analysis def post_generate_feature_importances(re...
57.410853
116
0.540373
import numpy as np import os import glob import optuna.trial import pandas as pd from easyPheno.preprocess import base_dataset from easyPheno.utils import helper_functions from easyPheno.model import _model_functions, _base_model from easyPheno.evaluation import eval_metrics, results_analysis def post_generate_feat...
0
0
0
0
0
0
0
18
0
281661a0f2e56753b968e44561027ec1fa2d7df8
5,302
py
Python
motelsAPI/settings/base.py
amartinez1/5letrasAPI
670b638a8254a0809c9f953350cd1a3264b61bf7
[ "MIT" ]
2
2015-05-02T12:30:22.000Z
2015-05-08T18:13:43.000Z
motelsAPI/settings/base.py
amartinez1/5letrasAPI
670b638a8254a0809c9f953350cd1a3264b61bf7
[ "MIT" ]
null
null
null
motelsAPI/settings/base.py
amartinez1/5letrasAPI
670b638a8254a0809c9f953350cd1a3264b61bf7
[ "MIT" ]
null
null
null
import os from os.path import abspath, dirname, join, normpath DJANGO_ROOT = dirname(dirname(abspath(__file__))) SITE_ROOT = dirname(DJANGO_ROOT) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) STATIC_ROOT = normpath(join(SITE_ROOT, 'assets')) STATIC_URL = '/static/' STATICFILES_DIRS = ( ...
28.972678
79
0.676914
import os from os.path import abspath, basename, dirname, join, normpath from django.conf import global_settings DJANGO_ROOT = dirname(dirname(abspath(__file__))) SITE_ROOT = dirname(DJANGO_ROOT) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) STATIC_ROOT = normpath(join(SITE_ROOT, 'assets')...
0
0
0
0
0
0
0
28
22
ffc260269c76d1c013af4b9bb72aecf6f47746d4
3,772
py
Python
thond/module_numpy_2.py
thond-tsdv/pyexample
33fbb1786e840f55b5e1415fad9c705d979beff5
[ "BSD-2-Clause" ]
1
2021-06-10T15:08:33.000Z
2021-06-10T15:08:33.000Z
thond/module_numpy_2.py
thond-tsdv/pyexample
33fbb1786e840f55b5e1415fad9c705d979beff5
[ "BSD-2-Clause" ]
null
null
null
thond/module_numpy_2.py
thond-tsdv/pyexample
33fbb1786e840f55b5e1415fad9c705d979beff5
[ "BSD-2-Clause" ]
5
2021-01-15T11:07:41.000Z
2022-02-17T21:24:59.000Z
"""Test numpy AoS v SoA for H layout""" #todo: Clean this up - very quickly knocked up. import numpy as np import time def numpy_SoA_v_AoS(L=10000): """ Compare reading and writing from/to numpy dataset using Array of Structures v Strucure of Arrays """ libE_fields = [('sim_id',int), ('given...
23.428571
98
0.556204
"""Test numpy AoS v SoA for H layout""" #todo: Clean this up - very quickly knocked up. import numpy as np import time def numpy_SoA_v_AoS(L=10000): """ Compare reading and writing from/to numpy dataset using Array of Structures v Strucure of Arrays """ libE_fields = [('sim_id',int), ('given...
0
0
0
0
0
0
0
0
0
5cf997721e35651acfc80437d7cdcded39064fcf
1,626
py
Python
mesh/rotate.py
icemtel/stokes
022de2417919a18ed5b0262111e430384053137d
[ "MIT" ]
null
null
null
mesh/rotate.py
icemtel/stokes
022de2417919a18ed5b0262111e430384053137d
[ "MIT" ]
null
null
null
mesh/rotate.py
icemtel/stokes
022de2417919a18ed5b0262111e430384053137d
[ "MIT" ]
null
null
null
''' To rotate geometrical objects. - Initial contribution by Gary Klindt ''' from scipy.linalg import norm, det import numpy as np def rotateVector(vector, alpha, axis, eps=1e-8): """ return a rotated vector by alpha around axis """ vector = np.array(vector) axis = np.array(axis) if (norm(axi...
27.559322
80
0.536285
''' To rotate geometrical objects. - Initial contribution by Gary Klindt ''' from scipy.linalg import norm, det import numpy as np def rotateVector(vector, alpha, axis, eps=1e-8): """ return a rotated vector by alpha around axis """ vector = np.array(vector) axis = np.array(axis) if (norm(axi...
0
0
0
0
0
0
0
0
0
ef2b27c9a8c5d8f6a06f9149cca59621f45a9531
813
py
Python
problems/B/AAndBAndCompilationErrors.py
deveshbajpai19/CodeForces
707b374f03012ec68054841f791d48b33ae4ef1b
[ "MIT" ]
55
2016-06-19T05:45:15.000Z
2022-03-31T15:18:53.000Z
problems/B/AAndBAndCompilationErrors.py
farhadcu/CodeForces-2
707b374f03012ec68054841f791d48b33ae4ef1b
[ "MIT" ]
null
null
null
problems/B/AAndBAndCompilationErrors.py
farhadcu/CodeForces-2
707b374f03012ec68054841f791d48b33ae4ef1b
[ "MIT" ]
25
2016-07-29T13:03:15.000Z
2021-09-17T01:45:45.000Z
__author__ = 'Devesh Bajpai' ''' https://codeforces.com/problemset/problem/519/B Solution: Calculate the sum of each round of errors. The difference of first and second will give the error resolved by second round. Similarly, the difference of second and third will give the error resolved by third round. ''' if...
28.034483
116
0.719557
__author__ = 'Devesh Bajpai' ''' https://codeforces.com/problemset/problem/519/B Solution: Calculate the sum of each round of errors. The difference of first and second will give the error resolved by second round. Similarly, the difference of second and third will give the error resolved by third round. ''' def...
0
0
0
0
0
204
0
0
23
b9445641f1f20a65978acb1b6a71eaa11d3eb3d0
346
py
Python
1.py
Mukherjeedip/Python-Projects
64b0d53744f6c8163317178beb79f55eec76fc25
[ "MIT" ]
1
2021-10-01T12:41:36.000Z
2021-10-01T12:41:36.000Z
1.py
Mukherjeedip/Python-Projects
64b0d53744f6c8163317178beb79f55eec76fc25
[ "MIT" ]
1
2021-10-01T15:38:20.000Z
2021-10-01T15:38:20.000Z
1.py
Mukherjeedip/Python-Projects
64b0d53744f6c8163317178beb79f55eec76fc25
[ "MIT" ]
7
2020-10-02T11:58:22.000Z
2021-10-09T15:37:19.000Z
sws = Tk() sws.title("Clock") label=Label(sws, font=("",35),background="blue",foreground="pink") label.pack(anchor='center') time() mainloop()
18.210526
67
0.638728
from tkinter import * from tkinter.ttk import * from time import strftime sws = Tk() sws.title("Clock") def time(): string= strftime('%H:%M:%S %p') label.config(text=string) label.after(1000, time) label=Label(sws, font=("",35),background="blue",foreground="pink") label.pack(anchor='center') ...
0
0
0
0
0
87
0
8
94
d243375c2e1970a2a7573e1b5e93fb5568dc49bd
18,367
py
Python
dataset/dataset_fuse.py
villawang/TEAM-Net
eb19d52d81a1de79e99b08a3c0cde6ed3570dfa1
[ "MIT" ]
2
2021-10-19T04:17:29.000Z
2022-03-30T03:48:22.000Z
dataset/dataset_fuse.py
villawang/TEAM-Net
eb19d52d81a1de79e99b08a3c0cde6ed3570dfa1
[ "MIT" ]
1
2022-03-30T02:59:10.000Z
2022-03-30T02:59:10.000Z
dataset/dataset_fuse.py
villawang/TEAM-Net
eb19d52d81a1de79e99b08a3c0cde6ed3570dfa1
[ "MIT" ]
null
null
null
""" Definition of PyTorch "Dataset" that iterates through compressed videos and return compressed representations (I-frames, motion vectors, or residuals) for training or testing. """ import os import torch.utils.data as data GOP_SIZE = 12
37.637295
107
0.575652
""" Definition of PyTorch "Dataset" that iterates through compressed videos and return compressed representations (I-frames, motion vectors, or residuals) for training or testing. """ import os import os.path import random import numpy as np import torch import torch.utils.data as data from coviar import get_num_fr...
0
0
0
17,003
0
721
0
-1
382
86cfbe9fa4b3a96113d1a96d5d0ff2344b6d82d7
38,482
py
Python
util/solder/solder.py
SamuelRiedel/snitch
94fff50c3c14c41baf0941eef85b457e528c09f6
[ "Apache-2.0" ]
null
null
null
util/solder/solder.py
SamuelRiedel/snitch
94fff50c3c14c41baf0941eef85b457e528c09f6
[ "Apache-2.0" ]
null
null
null
util/solder/solder.py
SamuelRiedel/snitch
94fff50c3c14c41baf0941eef85b457e528c09f6
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 ETH Zurich and University of Bologna. # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # # Fabian Schuiki <fschuiki@iis.ee.ethz.ch> # Florian Zaruba <zarubaf@iis.ee.ethz.ch> import pathlib from mako.lookup import TemplateLookup templates ...
32.778535
118
0.515696
# Copyright 2020 ETH Zurich and University of Bologna. # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # # Fabian Schuiki <fschuiki@iis.ee.ethz.ch> # Florian Zaruba <zarubaf@iis.ee.ethz.ch> import math import pathlib from copy import copy from mako.looku...
0
0
0
36,917
0
235
0
-13
442
46eafe5dcf705bc3f18a37d512e50761310b9848
20,585
py
Python
tests/test_stochastic.py
i404788/pyti
c9674941b98053cc80af985e7395345f2e0fa19b
[ "MIT" ]
null
null
null
tests/test_stochastic.py
i404788/pyti
c9674941b98053cc80af985e7395345f2e0fa19b
[ "MIT" ]
null
null
null
tests/test_stochastic.py
i404788/pyti
c9674941b98053cc80af985e7395345f2e0fa19b
[ "MIT" ]
null
null
null
from __future__ import absolute_import
63.928571
96
0.707068
from __future__ import absolute_import import unittest import numpy as np from tests.sample_data import SampleData from pyti import stochastic class TestStochastic(unittest.TestCase): def setUp(self): """Create data to use for testing.""" self.high_data = SampleData().get_sample_high_data() ...
0
0
0
20,417
0
0
0
16
112
da65e660fa1221b3885a7b5c968fce1101c01568
1,938
py
Python
tests/test_matrix_operations.py
seounghwan-oh/homomorphic_encryption
be700505547b81671c37026e55c4eefbd44dcaae
[ "MIT" ]
25
2020-11-06T13:54:33.000Z
2022-03-18T18:53:37.000Z
tests/test_matrix_operations.py
seounghwan-oh/homomorphic_encryption
be700505547b81671c37026e55c4eefbd44dcaae
[ "MIT" ]
1
2021-04-04T17:49:00.000Z
2021-04-05T13:46:21.000Z
tests/test_matrix_operations.py
seounghwan-oh/homomorphic_encryption
be700505547b81671c37026e55c4eefbd44dcaae
[ "MIT" ]
6
2021-04-04T17:26:09.000Z
2022-03-28T19:26:29.000Z
"""Tests for matrix_operations.py.""" import os import unittest TEST_DIRECTORY = os.path.dirname(__file__) if __name__ == '__main__': res = unittest.main(verbosity=3, exit=False)
32.847458
110
0.573271
"""Tests for matrix_operations.py.""" import os import unittest from util import matrix_operations TEST_DIRECTORY = os.path.dirname(__file__) class TestMatrixOperations(unittest.TestCase): def test_matrix_vector_multiply(self): mat = [[0, 1, 2], [1, 4, 10], [-5, 6, 10]] vec = [3, 8, 9] ...
0
0
0
1,694
0
0
0
13
45
7b44f2a1e06e2a13a6ac9c05c9425b6cf727f606
16,401
py
Python
plottool_ibeis/__init__.py
Erotemic/plottool_ibeis
dfa0d627cfd9fd8221dbb73d97dcac1e7ddf216f
[ "Apache-2.0" ]
null
null
null
plottool_ibeis/__init__.py
Erotemic/plottool_ibeis
dfa0d627cfd9fd8221dbb73d97dcac1e7ddf216f
[ "Apache-2.0" ]
null
null
null
plottool_ibeis/__init__.py
Erotemic/plottool_ibeis
dfa0d627cfd9fd8221dbb73d97dcac1e7ddf216f
[ "Apache-2.0" ]
3
2016-07-12T17:00:09.000Z
2017-03-03T22:52:12.000Z
# flake8: noqa """ Wrappers around matplotlib """ from __future__ import absolute_import, division, print_function __version__ = '2.1.2' import utool as ut ut.noinject(__name__, '[plottool_ibeis.__init__]') # Hopefully this was imported sooner. TODO remove dependency #from guitool_ibeis import __PYQT__ #import guit...
48.380531
107
0.542589
# flake8: noqa """ Wrappers around matplotlib """ from __future__ import absolute_import, division, print_function __version__ = '2.1.2' import utool as ut ut.noinject(__name__, '[plottool_ibeis.__init__]') # Hopefully this was imported sooner. TODO remove dependency #from guitool_ibeis import __PYQT__ #import guit...
0
0
0
0
0
520
0
9,695
734
a6216812195d3c11e210d6318fc7c40790113ace
76
py
Python
mayan/apps/document_parsing/__init__.py
CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons
0e4e919fd2e1ded6711354a0330135283e87f8c7
[ "Apache-2.0" ]
2
2021-09-12T19:41:19.000Z
2021-09-12T19:41:20.000Z
mayan/apps/document_parsing/__init__.py
CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons
0e4e919fd2e1ded6711354a0330135283e87f8c7
[ "Apache-2.0" ]
37
2021-09-13T01:00:12.000Z
2021-10-02T03:54:30.000Z
mayan/apps/document_parsing/__init__.py
CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons
0e4e919fd2e1ded6711354a0330135283e87f8c7
[ "Apache-2.0" ]
1
2021-09-22T13:17:30.000Z
2021-09-22T13:17:30.000Z
default_app_config = 'mayan.apps.document_parsing.apps.DocumentParsingApp'
38
75
0.855263
default_app_config = 'mayan.apps.document_parsing.apps.DocumentParsingApp'
0
0
0
0
0
0
0
0
0
172ab41e5594b3901c666448ab6a607ea58a7aa7
1,963
py
Python
lang/Python/sierpinski-triangle-graphical-3.py
ethansaxenian/RosettaDecode
8ea1a42a5f792280b50193ad47545d14ee371fb7
[ "MIT" ]
1
2018-11-09T22:08:38.000Z
2018-11-09T22:08:38.000Z
lang/Python/sierpinski-triangle-graphical-3.py
ethansaxenian/RosettaDecode
8ea1a42a5f792280b50193ad47545d14ee371fb7
[ "MIT" ]
null
null
null
lang/Python/sierpinski-triangle-graphical-3.py
ethansaxenian/RosettaDecode
8ea1a42a5f792280b50193ad47545d14ee371fb7
[ "MIT" ]
1
2018-11-09T22:08:40.000Z
2018-11-09T22:08:40.000Z
########################################################################################## # The drawing function # -------------------- # # level level of Sierpinski triangle (minimum value = 1) # ss screensize (Draws on a screen of size ss x ss. Default value = 400.) #---------------------------------------------...
32.180328
91
0.560367
########################################################################################## # The drawing function # -------------------- # # level level of Sierpinski triangle (minimum value = 1) # ss screensize (Draws on a screen of size ss x ss. Default value = 400.) #---------------------------------------------...
0
0
0
0
0
1,458
0
0
22
d0a8be633ce7e4365d607db7e264b3ef37f192c7
6,553
py
Python
src/occlusion.py
zhangyan32/HiCComp
fd763a606769770fd9a22ee9874ac0c316589e4d
[ "MIT" ]
null
null
null
src/occlusion.py
zhangyan32/HiCComp
fd763a606769770fd9a22ee9874ac0c316589e4d
[ "MIT" ]
null
null
null
src/occlusion.py
zhangyan32/HiCComp
fd763a606769770fd9a22ee9874ac0c316589e4d
[ "MIT" ]
null
null
null
import numpy as np import model import torch.nn as nn from torch.utils import data import torch import torch.optim as optim from torch.autograd import Variable from time import gmtime, strftime use_gpu = 0 import matplotlib.pyplot as plt import sys path = '/home/zhangyan/triplet_loss' chrN_start = 18 chrN_end = 1...
38.098837
145
0.652526
import numpy as np import model import torch.nn as nn from torch.utils import data import torch import torch.optim as optim from torch.autograd import Variable from time import gmtime, strftime use_gpu = 0 import matplotlib.pyplot as plt import sys path = '/home/zhangyan/triplet_loss' chrN_start = 18 chrN_end = 1...
0
0
0
0
0
40
0
0
27
88290db166b43c18d0a7545b1c562ab9e2cb7f21
367
py
Python
month01/all_code/day07/homework/exercise01.py
chaofan-zheng/tedu-python-demo
abe983ddc52690f4726cf42cc6390cba815026d8
[ "Apache-2.0" ]
4
2021-01-07T14:25:15.000Z
2021-02-01T10:36:10.000Z
month01/all_code/day07/homework/exercise01.py
chaofan-zheng/tedu-python-demo
abe983ddc52690f4726cf42cc6390cba815026d8
[ "Apache-2.0" ]
null
null
null
month01/all_code/day07/homework/exercise01.py
chaofan-zheng/tedu-python-demo
abe983ddc52690f4726cf42cc6390cba815026d8
[ "Apache-2.0" ]
null
null
null
""" (RGBA),, "R" -> "" "G" -> "" "B" -> "" "A" -> "" """ dict_color_info = { "R": "", "G": "", "B": "", "A": "" } color = input("(RGBA):") # print(dict_color_info[color]) # key,. if color in dict_color_info: print(dict_color_info[color]) else: print("")
16.681818
51
0.52861
""" 在终端中获取颜色(RGBA),打印描述信息,否则提示颜色不存在 "R" -> "红色" "G" -> "绿色" "B" -> "蓝色" "A" -> "透明度" """ dict_color_info = { "R": "红色", "G": "绿色", "B": "蓝色", "A": "透明度" } color = input("请输入颜色(RGBA):") # print(dict_color_info[color]) # 如果字典不存在当前key,会报错. if color in dict_color_info: print(dict_c...
201
0
0
0
0
0
0
0
0