hexsha
string
size
int64
ext
string
lang
string
max_stars_repo_path
string
max_stars_repo_name
string
max_stars_repo_head_hexsha
string
max_stars_repo_licenses
list
max_stars_count
int64
max_stars_repo_stars_event_min_datetime
string
max_stars_repo_stars_event_max_datetime
string
max_issues_repo_path
string
max_issues_repo_name
string
max_issues_repo_head_hexsha
string
max_issues_repo_licenses
list
max_issues_count
int64
max_issues_repo_issues_event_min_datetime
string
max_issues_repo_issues_event_max_datetime
string
max_forks_repo_path
string
max_forks_repo_name
string
max_forks_repo_head_hexsha
string
max_forks_repo_licenses
list
max_forks_count
int64
max_forks_repo_forks_event_min_datetime
string
max_forks_repo_forks_event_max_datetime
string
content
string
avg_line_length
float64
max_line_length
int64
alphanum_fraction
float64
qsc_code_num_words_quality_signal
int64
qsc_code_num_chars_quality_signal
float64
qsc_code_mean_word_length_quality_signal
float64
qsc_code_frac_words_unique_quality_signal
float64
qsc_code_frac_chars_top_2grams_quality_signal
float64
qsc_code_frac_chars_top_3grams_quality_signal
float64
qsc_code_frac_chars_top_4grams_quality_signal
float64
qsc_code_frac_chars_dupe_5grams_quality_signal
float64
qsc_code_frac_chars_dupe_6grams_quality_signal
float64
qsc_code_frac_chars_dupe_7grams_quality_signal
float64
qsc_code_frac_chars_dupe_8grams_quality_signal
float64
qsc_code_frac_chars_dupe_9grams_quality_signal
float64
qsc_code_frac_chars_dupe_10grams_quality_signal
float64
qsc_code_frac_chars_replacement_symbols_quality_signal
float64
qsc_code_frac_chars_digital_quality_signal
float64
qsc_code_frac_chars_whitespace_quality_signal
float64
qsc_code_size_file_byte_quality_signal
float64
qsc_code_num_lines_quality_signal
float64
qsc_code_num_chars_line_max_quality_signal
float64
qsc_code_num_chars_line_mean_quality_signal
float64
qsc_code_frac_chars_alphabet_quality_signal
float64
qsc_code_frac_chars_comments_quality_signal
float64
qsc_code_cate_xml_start_quality_signal
float64
qsc_code_frac_lines_dupe_lines_quality_signal
float64
qsc_code_cate_autogen_quality_signal
float64
qsc_code_frac_lines_long_string_quality_signal
float64
qsc_code_frac_chars_string_length_quality_signal
float64
qsc_code_frac_chars_long_word_length_quality_signal
float64
qsc_code_frac_lines_string_concat_quality_signal
float64
qsc_code_cate_encoded_data_quality_signal
float64
qsc_code_frac_chars_hex_words_quality_signal
float64
qsc_code_frac_lines_prompt_comments_quality_signal
float64
qsc_code_frac_lines_assert_quality_signal
float64
qsc_codepython_cate_ast_quality_signal
float64
qsc_codepython_frac_lines_func_ratio_quality_signal
float64
qsc_codepython_cate_var_zero_quality_signal
bool
qsc_codepython_frac_lines_pass_quality_signal
float64
qsc_codepython_frac_lines_import_quality_signal
float64
qsc_codepython_frac_lines_simplefunc_quality_signal
float64
qsc_codepython_score_lines_no_logic_quality_signal
float64
qsc_codepython_frac_lines_print_quality_signal
float64
qsc_code_num_words
int64
qsc_code_num_chars
int64
qsc_code_mean_word_length
int64
qsc_code_frac_words_unique
null
qsc_code_frac_chars_top_2grams
int64
qsc_code_frac_chars_top_3grams
int64
qsc_code_frac_chars_top_4grams
int64
qsc_code_frac_chars_dupe_5grams
int64
qsc_code_frac_chars_dupe_6grams
int64
qsc_code_frac_chars_dupe_7grams
int64
qsc_code_frac_chars_dupe_8grams
int64
qsc_code_frac_chars_dupe_9grams
int64
qsc_code_frac_chars_dupe_10grams
int64
qsc_code_frac_chars_replacement_symbols
int64
qsc_code_frac_chars_digital
int64
qsc_code_frac_chars_whitespace
int64
qsc_code_size_file_byte
int64
qsc_code_num_lines
int64
qsc_code_num_chars_line_max
int64
qsc_code_num_chars_line_mean
int64
qsc_code_frac_chars_alphabet
int64
qsc_code_frac_chars_comments
int64
qsc_code_cate_xml_start
int64
qsc_code_frac_lines_dupe_lines
int64
qsc_code_cate_autogen
int64
qsc_code_frac_lines_long_string
int64
qsc_code_frac_chars_string_length
int64
qsc_code_frac_chars_long_word_length
int64
qsc_code_frac_lines_string_concat
null
qsc_code_cate_encoded_data
int64
qsc_code_frac_chars_hex_words
int64
qsc_code_frac_lines_prompt_comments
int64
qsc_code_frac_lines_assert
int64
qsc_codepython_cate_ast
int64
qsc_codepython_frac_lines_func_ratio
int64
qsc_codepython_cate_var_zero
int64
qsc_codepython_frac_lines_pass
int64
qsc_codepython_frac_lines_import
int64
qsc_codepython_frac_lines_simplefunc
int64
qsc_codepython_score_lines_no_logic
int64
qsc_codepython_frac_lines_print
int64
effective
string
hits
int64
4e4ad652bab35390c7573ef492731fc6c77f64d0
66
py
Python
content/home/f.py
jasonlin316/academic-kickstart
38760e636d77c835526a313756d8ed917467acab
[ "MIT" ]
null
null
null
content/home/f.py
jasonlin316/academic-kickstart
38760e636d77c835526a313756d8ed917467acab
[ "MIT" ]
null
null
null
content/home/f.py
jasonlin316/academic-kickstart
38760e636d77c835526a313756d8ed917467acab
[ "MIT" ]
null
null
null
# -*- coding: UTF-8 -*- a1 = 3.14159 print("number is %05.1f" %a1)
22
29
0.560606
12
66
3.083333
0.916667
0
0
0
0
0
0
0
0
0
0
0.218182
0.166667
66
3
29
22
0.454545
0.318182
0
0
0
0
0.363636
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
4ea9a68cc01985b661221170633bd2ffae72b6f9
45
py
Python
sympyosis/__main__.py
ZechCodes/sympyosis
0c7315a08fc91d2d074b42f0aeb5d04c6f3f22d1
[ "MIT" ]
null
null
null
sympyosis/__main__.py
ZechCodes/sympyosis
0c7315a08fc91d2d074b42f0aeb5d04c6f3f22d1
[ "MIT" ]
null
null
null
sympyosis/__main__.py
ZechCodes/sympyosis
0c7315a08fc91d2d074b42f0aeb5d04c6f3f22d1
[ "MIT" ]
null
null
null
from sympyosis.app import App App.launch()
9
29
0.755556
7
45
4.857143
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.155556
45
4
30
11.25
0.894737
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
0915865c87184279d8c0b14699c705a7ee4695dd
91
py
Python
mission_control/test/test_utilities/__init__.py
ChrisScianna/ROS-Underwater-RnD
f928bcc6b19a830b98e2cc2aedd65ff35b887901
[ "BSD-3-Clause" ]
null
null
null
mission_control/test/test_utilities/__init__.py
ChrisScianna/ROS-Underwater-RnD
f928bcc6b19a830b98e2cc2aedd65ff35b887901
[ "BSD-3-Clause" ]
85
2020-10-05T11:44:46.000Z
2021-09-08T14:31:07.000Z
mission_control/test/test_utilities/__init__.py
ChrisScianna/ROS-Underwater-RnD
f928bcc6b19a830b98e2cc2aedd65ff35b887901
[ "BSD-3-Clause" ]
1
2021-11-04T13:18:17.000Z
2021-11-04T13:18:17.000Z
from .mission_control_interface import MissionControlInterface from .waits import wait_for
30.333333
62
0.89011
11
91
7.090909
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.087912
91
2
63
45.5
0.939759
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
09232595bb207224fbe599ade607ec8f5161f0ba
3,708
py
Python
angr_platforms/tricore/rcrw_instr.py
shahinsba/angr-platforms
86f9ea90c396fb5561d0196a2d1a873e573b0294
[ "BSD-2-Clause" ]
null
null
null
angr_platforms/tricore/rcrw_instr.py
shahinsba/angr-platforms
86f9ea90c396fb5561d0196a2d1a873e573b0294
[ "BSD-2-Clause" ]
null
null
null
angr_platforms/tricore/rcrw_instr.py
shahinsba/angr-platforms
86f9ea90c396fb5561d0196a2d1a873e573b0294
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3 """ rcrw_instr.py Implementation of RCRW format instructions. """ from pyvex.lifting.util import Type, Instruction from .rtl import extend_to_32_bits from .logger import log_this class RCRW_INSERT(Instruction): """ Insert Bit Field instruction: op = 0xD7 op2 = 0x00 (3-bit) User Status Flags: no change. """ name = 'RCRW_INSERT' op = "{0}{1}".format(bin(0xd)[2:].zfill(4), bin(7)[2:].zfill(4)) op2 = "{0}".format(bin(0)[2:].zfill(3)) bin_format = op + 'b'*4 + 'a'*4 + op2 + 'w'*5 + 'c'*4 + 'd'*4 def parse(self, bitstrm): data = Instruction.parse(self, bitstrm) width = int(data['w'], 2) data = {"a": int(data['a'], 2), "const4": int(data['b'], 2), "c": int(data['c'], 2), "w": width, "d": int(data['d'], 2)} log_this(self.name, data, hex(self.addr)) return data def get_dst_reg(self): return "d{0}".format(self.data['c']) def get_const4(self): return self.constant(self.data['const4'], Type.int_32) def get_d_d(self): return self.get("d{0}".format(self.data['d']), Type.int_32) def get_d_a(self): return self.get("d{0}".format(self.data['a']), Type.int_32) def fetch_operands(self): return self.get_d_a(), self.get_d_d(), self.get_const4() def compute_result(self, *args): d_a = args[0] d_d = args[1] const4 = args[2] pos = (d_d & 0x1f).cast_to(Type.int_8) width = self.data['w'] const_1 = self.constant(1, Type.int_32) mask = ((const_1 << width)-1) << pos result = (d_a & ~mask) | ((const4 << pos) & mask) # undefined result if (pos + width) > 32 cond_undefined = extend_to_32_bits(((pos + width) >> 5) == 0) result = result & cond_undefined.cast_to(Type.int_32) return result def commit_result(self, res): self.put(res, self.get_dst_reg()) class RCRW_IMASK(Instruction): """ Insert Mask instruction: op = 0xD7 op2 = 0x01 (3-bit) User Status Flags: no change. """ name = 'RCRW_IMASK' op = "{0}{1}".format(bin(0xd)[2:].zfill(4), bin(7)[2:].zfill(4)) op2 = "{0}".format(bin(1)[2:].zfill(3)) bin_format = op + 'b'*4 + 'a'*4 + op2 + 'w'*5 + 'c'*4 + 'd'*4 def parse(self, bitstrm): data = Instruction.parse(self, bitstrm) width = int(data['w'], 2) data = {"const4": int(data['b'], 2), "c": int(data['c'], 2), "w": width, "d": int(data['d'], 2)} log_this(self.name, data, hex(self.addr)) return data def get_dst_reg(self): return "d{0}".format(self.data['c']) def get_const4(self): return self.constant(self.data['const4'], Type.int_32) def get_d_d(self): return self.get("d{0}".format(self.data['d']), Type.int_32) def fetch_operands(self): return self.get_d_d(), self.get_const4() def compute_result(self, *args): d_d = args[0] const4 = args[1] pos = (d_d & 0x1f).cast_to(Type.int_8) width = self.data['w'] const_1 = self.constant(1, Type.int_32) result_1 = ((const_1 << width)-1) << pos result_2 = const4 << pos # undefined result if (pos + width) > 32 cond_undefined = extend_to_32_bits(((pos + width) >> 5) == 0) result_1 = result_1 & cond_undefined.cast_to(Type.int_32) result_2 = result_2 & cond_undefined.cast_to(Type.int_32) self.put(result_1, "d{0}".format(self.data['c']+1)) self.put(result_2, "d{0}".format(self.data['c']))
30.644628
69
0.549353
556
3,708
3.508993
0.158273
0.043055
0.04613
0.043055
0.743721
0.743721
0.702717
0.659662
0.659662
0.606868
0
0.052943
0.271575
3,708
120
70
30.9
0.669382
0.089536
0
0.571429
0
0
0.038228
0
0
0
0.004248
0
0
1
0.181818
false
0
0.038961
0.116883
0.506494
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
5
0929ee1a3ba43c4d262be960ab540b8377ec91f2
19
py
Python
__main__.py
jack1142/zxpy
fb527cc69169dc884e48bf194c77972a54d1123f
[ "MIT" ]
null
null
null
__main__.py
jack1142/zxpy
fb527cc69169dc884e48bf194c77972a54d1123f
[ "MIT" ]
null
null
null
__main__.py
jack1142/zxpy
fb527cc69169dc884e48bf194c77972a54d1123f
[ "MIT" ]
null
null
null
import zx zx.cli()
6.333333
9
0.684211
4
19
3.25
0.75
0
0
0
0
0
0
0
0
0
0
0
0.157895
19
2
10
9.5
0.8125
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
11899be3b477996772cd1ae754815056f22ca205
38
py
Python
preprocessing/__init__.py
zhigangjiang/LGT-Net
d9a619158b2dc66a50c100e7fa7e491f1df16fd7
[ "MIT" ]
11
2022-03-03T17:49:33.000Z
2022-03-25T11:23:11.000Z
preprocessing/__init__.py
zhigangjiang/LGT-Net
d9a619158b2dc66a50c100e7fa7e491f1df16fd7
[ "MIT" ]
null
null
null
preprocessing/__init__.py
zhigangjiang/LGT-Net
d9a619158b2dc66a50c100e7fa7e491f1df16fd7
[ "MIT" ]
1
2022-03-04T06:39:50.000Z
2022-03-04T06:39:50.000Z
""" @date: 2021/7/5 @description: """
7.6
15
0.552632
5
38
4.2
1
0
0
0
0
0
0
0
0
0
0
0.181818
0.131579
38
4
16
9.5
0.454545
0.763158
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
11c4f2b19da7b5c889286e32379929823ae6af4b
201
py
Python
memento.py
oleksiygarnik/Vehicles-trajectory-detection
f66b7f9584783a49c77c4c30220b149f59350fdc
[ "MIT" ]
null
null
null
memento.py
oleksiygarnik/Vehicles-trajectory-detection
f66b7f9584783a49c77c4c30220b149f59350fdc
[ "MIT" ]
null
null
null
memento.py
oleksiygarnik/Vehicles-trajectory-detection
f66b7f9584783a49c77c4c30220b149f59350fdc
[ "MIT" ]
null
null
null
from collections import deque class PointContainerMemento(object): def __init__(self): self.points = [] class PlotHistory(object): def __init__(self): self.history = deque()
18.272727
36
0.676617
21
201
6.095238
0.619048
0.140625
0.203125
0.265625
0.328125
0
0
0
0
0
0
0
0.223881
201
11
37
18.272727
0.820513
0
0
0.285714
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0.142857
0
0.714286
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
5
11db17a1f40574a96fc09f79ce09c9e00334d162
39
py
Python
select2/models/__init__.py
SpectralAngel/django-select2-forms
a1e7b48ade3b0a6bfbb3dbf5ddb880634b56da08
[ "BSD-2-Clause" ]
59
2015-02-19T01:44:58.000Z
2022-03-10T00:25:29.000Z
select2/models/__init__.py
SpectralAngel/django-select2-forms
a1e7b48ade3b0a6bfbb3dbf5ddb880634b56da08
[ "BSD-2-Clause" ]
34
2015-01-08T13:43:33.000Z
2022-02-24T19:15:20.000Z
select2/models/__init__.py
SpectralAngel/django-select2-forms
a1e7b48ade3b0a6bfbb3dbf5ddb880634b56da08
[ "BSD-2-Clause" ]
26
2015-01-07T17:41:44.000Z
2021-02-26T08:56:09.000Z
from .base import SortableThroughModel
19.5
38
0.871795
4
39
8.5
1
0
0
0
0
0
0
0
0
0
0
0
0.102564
39
1
39
39
0.971429
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
11ed1fbfc9611a4ed5afbbee45476fbb091ec170
33
py
Python
bugtests/test262p/y.py
doom38/jython_v2.2.1
0803a0c953c294e6d14f9fc7d08edf6a3e630a15
[ "CNRI-Jython" ]
null
null
null
bugtests/test262p/y.py
doom38/jython_v2.2.1
0803a0c953c294e6d14f9fc7d08edf6a3e630a15
[ "CNRI-Jython" ]
null
null
null
bugtests/test262p/y.py
doom38/jython_v2.2.1
0803a0c953c294e6d14f9fc7d08edf6a3e630a15
[ "CNRI-Jython" ]
null
null
null
assert __name__ == "test262p.y"
11
31
0.69697
4
33
4.75
1
0
0
0
0
0
0
0
0
0
0
0.107143
0.151515
33
2
32
16.5
0.571429
0
0
0
0
0
0.3125
0
0
0
0
0
1
1
0
true
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
1
0
0
0
0
0
0
5
ee9ace7e643ab890a180d0eb88dd59918dc8ec94
285
py
Python
app/utils.py
youssefhoummad/ni9ash
b8d69c72e5b9c1e8dae170bda74d599072e3d5c1
[ "MIT" ]
null
null
null
app/utils.py
youssefhoummad/ni9ash
b8d69c72e5b9c1e8dae170bda74d599072e3d5c1
[ "MIT" ]
null
null
null
app/utils.py
youssefhoummad/ni9ash
b8d69c72e5b9c1e8dae170bda74d599072e3d5c1
[ "MIT" ]
null
null
null
def get_object_or_none(model, *args, **kwargs): try: return model._default_manager.get(*args, **kwargs) except model.DoesNotExist: return None def get_object_or_this(model, this, *args, **kwargs): return get_object_or_none(model, *args, **kwargs) or this
28.5
61
0.691228
40
285
4.65
0.375
0.215054
0.177419
0.150538
0.322581
0.322581
0.322581
0
0
0
0
0
0.185965
285
9
62
31.666667
0.801724
0
0
0
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0
0.142857
0.714286
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
e12bfc4c9b09f653693774e642c19f31f2f2979b
174
py
Python
dataset_creation/__init__.py
jbesty/irep_2022_closing_the_loop
db88bd3ead2231636aa46e36f0a0272b17437612
[ "MIT" ]
null
null
null
dataset_creation/__init__.py
jbesty/irep_2022_closing_the_loop
db88bd3ead2231636aa46e36f0a0272b17437612
[ "MIT" ]
null
null
null
dataset_creation/__init__.py
jbesty/irep_2022_closing_the_loop
db88bd3ead2231636aa46e36f0a0272b17437612
[ "MIT" ]
null
null
null
# __init__.py from .NSWPH_functions import NSWPH_Initialize_Nm1_Models, NSWPH_Minimum_Data_Point, NSWPH_Directed_Walk_Data from .create_datasets import evaluate_input_OPs
43.5
109
0.87931
25
174
5.44
0.76
0
0
0
0
0
0
0
0
0
0
0.006289
0.086207
174
3
110
58
0.849057
0.063218
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
010ad8eaef72dca84f9bb42e48848a8fa78cc183
111
py
Python
config.py
RomaOkorosso/fes-test-task
cfd8212dfbc9b2b0669ce6e1ea0a59b3f96809dc
[ "MIT" ]
null
null
null
config.py
RomaOkorosso/fes-test-task
cfd8212dfbc9b2b0669ce6e1ea0a59b3f96809dc
[ "MIT" ]
null
null
null
config.py
RomaOkorosso/fes-test-task
cfd8212dfbc9b2b0669ce6e1ea0a59b3f96809dc
[ "MIT" ]
null
null
null
# created by RomaOkorosso at 21.03.2021 # config.py db_url = "postgres://USER:PASSWORD@IP:PORT/DATABASE_NAME"
22.2
57
0.756757
18
111
4.555556
1
0
0
0
0
0
0
0
0
0
0
0.080808
0.108108
111
4
58
27.75
0.747475
0.423423
0
0
0
0
0.754098
0.754098
0
0
0
0
0
1
0
false
1
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
1
0
0
0
0
0
5
012c203c1d4459b2909816795351727c39e6834b
39
py
Python
onebarangay_psql/rbi/tests/__init__.py
PrynsTag/oneBarangay-PostgreSQL
11d7b97b57603f4c88948905560a22a5314409ce
[ "Apache-2.0" ]
null
null
null
onebarangay_psql/rbi/tests/__init__.py
PrynsTag/oneBarangay-PostgreSQL
11d7b97b57603f4c88948905560a22a5314409ce
[ "Apache-2.0" ]
43
2022-02-07T00:18:35.000Z
2022-03-21T04:42:48.000Z
onebarangay_psql/rbi/tests/__init__.py
PrynsTag/oneBarangay-PostgreSQL
11d7b97b57603f4c88948905560a22a5314409ce
[ "Apache-2.0" ]
null
null
null
"""Default init file for rbi tests."""
19.5
38
0.666667
6
39
4.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.153846
39
1
39
39
0.787879
0.820513
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
013e4a460398c400c9de86df39f0cac5a3303a39
8,015
py
Python
conkit/misc/tests/test_bandwidth.py
mesdaghi/conkit
01468761352bd3ac5078e5e9fef6f73c8c49036e
[ "BSD-3-Clause" ]
12
2017-06-12T17:20:32.000Z
2021-12-10T09:35:26.000Z
conkit/misc/tests/test_bandwidth.py
mesdaghi/conkit
01468761352bd3ac5078e5e9fef6f73c8c49036e
[ "BSD-3-Clause" ]
60
2017-02-08T19:29:34.000Z
2022-03-17T16:00:54.000Z
conkit/misc/tests/test_bandwidth.py
mesdaghi/conkit
01468761352bd3ac5078e5e9fef6f73c8c49036e
[ "BSD-3-Clause" ]
12
2017-09-25T07:25:35.000Z
2022-02-27T18:59:13.000Z
"""Testing facility for conkit.misc.bandwidth""" __author__ = "Felix Simkovic" __date__ = "19 Jun 2017" import numpy as np import unittest from conkit.misc import bandwidth from conkit.misc.ext import c_bandwidth class TestAmiseBW(unittest.TestCase): def test_bandwidth_1(self): xy = np.array([(1, 5), (3, 3), (2, 4)], dtype=np.int64) x = np.asarray([i for (x, y) in xy for i in np.arange(x, y + 1)])[:, np.newaxis] self.assertEqual(round(bandwidth.AmiseBW(x).bandwidth, 7), 1.1455243) def test_bandwidth_2(self): xy = np.array([(1, 5), (3, 3), (2, 4), (1, 10), (4, 9)], dtype=np.int64) x = np.asarray([i for (x, y) in xy for i in np.arange(x, y + 1)])[:, np.newaxis] self.assertEqual(round(bandwidth.AmiseBW(x).bandwidth, 7), 1.5310027) def test_bandwidth_3(self): xy = np.array([(3, 5), (2, 4), (3, 4)], dtype=np.int64) x = np.asarray([i for (x, y) in xy for i in np.arange(x, y + 1)])[:, np.newaxis] self.assertEqual(round(bandwidth.AmiseBW(x).bandwidth, 7), 0.3758801) class TestBowmanBW(unittest.TestCase): def test_bandwidth_1(self): xy = np.array([(1, 5), (3, 3), (2, 4)], dtype=np.int64) x = np.asarray([i for (x, y) in xy for i in np.arange(x, y + 1)])[:, np.newaxis] self.assertEqual(round(bandwidth.BowmanBW(x).bandwidth, 7), 0.7881495) def test_bandwidth_2(self): xy = np.array([(1, 5), (3, 3), (2, 4), (1, 10), (4, 9)], dtype=np.int64) x = np.asarray([i for (x, y) in xy for i in np.arange(x, y + 1)])[:, np.newaxis] self.assertEqual(round(bandwidth.BowmanBW(x).bandwidth, 7), 1.4223373) def test_bandwidth_3(self): xy = np.array([(3, 5), (2, 4), (3, 4)], dtype=np.int64) x = np.asarray([i for (x, y) in xy for i in np.arange(x, y + 1)])[:, np.newaxis] self.assertEqual(round(bandwidth.BowmanBW(x).bandwidth, 7), 0.6052020) class TestLinearBW(unittest.TestCase): def test_bandwidth_1(self): xy = np.array([(1, 5), (3, 3), (2, 4)], dtype=np.int64) x = np.asarray([i for (x, y) in xy for i in np.arange(x, y + 1)])[:, np.newaxis] self.assertEqual(bandwidth.LinearBW(x, threshold=8).bandwidth, 0.625) def test_bandwidth_2(self): xy = np.array([(1, 5), (3, 3), (2, 4), (1, 10), (4, 9)], dtype=np.int64) x = np.asarray([i for (x, y) in xy for i in np.arange(x, y + 1)])[:, np.newaxis] self.assertEqual(bandwidth.LinearBW(x, threshold=10).bandwidth, 1.0) def test_bandwidth_3(self): xy = np.array([(3, 5), (2, 4), (3, 4)], dtype=np.int64) x = np.asarray([i for (x, y) in xy for i in np.arange(x, y + 1)])[:, np.newaxis] self.assertEqual(round(bandwidth.LinearBW(x, threshold=15).bandwidth, 7), 0.3333333) class TestScottBW(unittest.TestCase): def test_bandwidth_1(self): xy = np.array([(1, 5), (3, 3), (2, 4)], dtype=np.int64) x = np.asarray([i for (x, y) in xy for i in np.arange(x, y + 1)])[:, np.newaxis] self.assertEqual(round(bandwidth.ScottBW(x).bandwidth, 7), 0.8357821) def test_bandwidth_2(self): xy = np.array([(1, 5), (3, 3), (2, 4), (1, 10), (4, 9)], dtype=np.int64) x = np.asarray([i for (x, y) in xy for i in np.arange(x, y + 1)])[:, np.newaxis] self.assertEqual(round(bandwidth.ScottBW(x).bandwidth, 7), 1.4513602) def test_bandwidth_3(self): xy = np.array([(3, 5), (2, 4), (3, 4)], dtype=np.int64) x = np.asarray([i for (x, y) in xy for i in np.arange(x, y + 1)])[:, np.newaxis] self.assertEqual(round(bandwidth.ScottBW(x).bandwidth, 7), 0.5179240) class TestSilvermanBW(unittest.TestCase): def test_bandwidth_1(self): xy = np.array([(1, 5), (3, 3), (2, 4)], dtype=np.int64) x = np.asarray([i for (x, y) in xy for i in np.arange(x, y + 1)])[:, np.newaxis] self.assertEqual(round(bandwidth.SilvermanBW(x).bandwidth, 7), 0.7523629) def test_bandwidth_2(self): xy = np.array([(1, 5), (3, 3), (2, 4), (1, 10), (4, 9)], dtype=np.int64) x = np.asarray([i for (x, y) in xy for i in np.arange(x, y + 1)])[:, np.newaxis] self.assertEqual(round(bandwidth.SilvermanBW(x).bandwidth, 7), 1.3065002) def test_bandwidth_3(self): xy = np.array([(3, 5), (2, 4), (3, 4)], dtype=np.int64) x = np.asarray([i for (x, y) in xy for i in np.arange(x, y + 1)])[:, np.newaxis] self.assertEqual(round(bandwidth.SilvermanBW(x).bandwidth, 7), 0.4662301) class Test(unittest.TestCase): def test_bandwidth_factory_1(self): obj = bandwidth.bandwidth_factory("amise") self.assertEqual(str(obj), "<class 'conkit.misc.bandwidth.AmiseBW'>") def test_bandwidth_factory_2(self): obj = bandwidth.bandwidth_factory("bowman") self.assertEqual(str(obj), "<class 'conkit.misc.bandwidth.BowmanBW'>") def test_bandwidth_factory_3(self): obj = bandwidth.bandwidth_factory("linear") self.assertEqual(str(obj), "<class 'conkit.misc.bandwidth.LinearBW'>") def test_bandwidth_factory_4(self): obj = bandwidth.bandwidth_factory("scott") self.assertEqual(str(obj), "<class 'conkit.misc.bandwidth.ScottBW'>") def test_bandwidth_factory_5(self): obj = bandwidth.bandwidth_factory("silverman") self.assertEqual(str(obj), "<class 'conkit.misc.bandwidth.SilvermanBW'>") def test_bandwidth_factory_6(self): with self.assertRaises(ValueError): bandwidth.bandwidth_factory("SILVERMAN") def test_bandwidth_factory_7(self): with self.assertRaises(ValueError): bandwidth.bandwidth_factory("Silverman") def test_bandwidth_factory_8(self): with self.assertRaises(ValueError): bandwidth.bandwidth_factory("silvermn") def test_bandwidth_factory_9(self): with self.assertRaises(ValueError): bandwidth.bandwidth_factory("garbage") class TestExt(unittest.TestCase): def test_gauss_curvature_1(self): A = np.array([[1], [2], [3], [4], [5], [3], [2], [3], [4]], dtype=np.int64) curvature = c_bandwidth.c_get_gauss_curvature(A, -1.5, 0.5) self.assertAlmostEqual(3.171746247735917e-05, curvature) def test_gauss_curvature_2(self): A = np.array([[1]], dtype=np.int64) curvature = c_bandwidth.c_get_gauss_curvature(A, -1.5, 0.5) self.assertAlmostEqual(0.0002854501468289852, curvature) def test_gauss_curvature_3(self): A = np.array([[1]], dtype=np.int64) curvature = c_bandwidth.c_get_gauss_curvature(A, 0, 0.5) self.assertAlmostEqual(1.2957831963165134, curvature) def test_stiffness_integral_1(self): A = np.array([[1], [2], [3], [4], [5], [3], [2], [3], [4]], dtype=np.int64) stiff_integ = c_bandwidth.c_get_stiffness_integral(A, 2.0, 0.0001) self.assertAlmostEqual(0.003100864697366348, stiff_integ) def test_stiffness_integral_2(self): A = np.array([[1], [2], [3], [4], [5], [3], [2], [3], [4]], dtype=np.int64) stiff_integ = c_bandwidth.c_get_stiffness_integral(A, 2.0, 0.1) self.assertAlmostEqual(0.003100864697366348, stiff_integ) def test_stiffness_integral_3(self): A = np.array([[1], [2], [3], [4], [5], [3], [2], [3], [4]], dtype=np.int64) stiff_integ = c_bandwidth.c_get_stiffness_integral(A, 1000.0, 0.0001) self.assertAlmostEqual(2.1106164693083826e-16, stiff_integ) def test_optimize_bandwidth_1(self): A = np.array([[1], [2], [3], [4], [5], [3], [2], [3], [4]], dtype=np.int64) optimized = c_bandwidth.c_optimize_bandwidth(A, 2.0) self.assertAlmostEqual(0.4116948343202962, optimized) def test_optimize_bandwidth_2(self): A = np.array([[1], [2], [3], [4], [5], [3], [2], [3], [4]], dtype=np.int64) optimized = c_bandwidth.c_optimize_bandwidth(A, 1000.0) self.assertAlmostEqual(317.11331138268406, optimized) if __name__ == "__main__": unittest.main(verbosity=2)
44.527778
92
0.619963
1,223
8,015
3.946034
0.095666
0.046415
0.079569
0.0431
0.787194
0.728554
0.727932
0.727932
0.656859
0.656859
0
0.09125
0.201497
8,015
179
93
44.776536
0.662813
0.00524
0
0.455224
0
0
0.037404
0.020836
0
0
0
0
0.238806
1
0.238806
false
0
0.029851
0
0.320896
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
5
014e55ee16e1ee72641555b48b60b3643da70b02
86
py
Python
script/instructions/__init__.py
Aimini/51cpu
cdeb75510d1dcd867fbebe10e963c4dbecd5ff13
[ "MIT" ]
null
null
null
script/instructions/__init__.py
Aimini/51cpu
cdeb75510d1dcd867fbebe10e963c4dbecd5ff13
[ "MIT" ]
null
null
null
script/instructions/__init__.py
Aimini/51cpu
cdeb75510d1dcd867fbebe10e963c4dbecd5ff13
[ "MIT" ]
null
null
null
import instructions.info if __name__ == '__main__': instructions.info.print_info()
28.666667
34
0.767442
10
86
5.7
0.7
0.561404
0
0
0
0
0
0
0
0
0
0
0.116279
86
3
34
28.666667
0.75
0
0
0
0
0
0.091954
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0.333333
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
01655c0b54ea3289d010cdd27ac0fc78670d2691
136
py
Python
clean-example.py
xflr6/latexpages
65d2961ecbbf47ab1ab126cab90b63e1ba121e26
[ "MIT" ]
2
2019-05-19T00:08:10.000Z
2021-03-29T14:10:25.000Z
clean-example.py
xflr6/latexpages
65d2961ecbbf47ab1ab126cab90b63e1ba121e26
[ "MIT" ]
null
null
null
clean-example.py
xflr6/latexpages
65d2961ecbbf47ab1ab126cab90b63e1ba121e26
[ "MIT" ]
1
2021-03-29T14:14:18.000Z
2021-03-29T14:14:18.000Z
#!/usr/bin/env python3 # clean-example.py import latexpages if __name__ == '__main__': latexpages.clean('example/latexpages.ini')
17
46
0.727941
17
136
5.352941
0.764706
0.263736
0
0
0
0
0
0
0
0
0
0.008403
0.125
136
7
47
19.428571
0.756303
0.279412
0
0
0
0
0.3125
0.229167
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
016f99242599723634fa45b5f6f4399c3ed81438
125
py
Python
home/pedrosenarego/scripts/zorba/gestures/armsinside.py
rv8flyboy/pyrobotlab
4e04fb751614a5cb6044ea15dcfcf885db8be65a
[ "Apache-2.0" ]
63
2015-02-03T18:49:43.000Z
2022-03-29T03:52:24.000Z
home/pedrosenarego/scripts/zorba/gestures/armsinside.py
rv8flyboy/pyrobotlab
4e04fb751614a5cb6044ea15dcfcf885db8be65a
[ "Apache-2.0" ]
16
2016-01-26T19:13:29.000Z
2018-11-25T21:20:51.000Z
home/pedrosenarego/scripts/zorba/gestures/armsinside.py
rv8flyboy/pyrobotlab
4e04fb751614a5cb6044ea15dcfcf885db8be65a
[ "Apache-2.0" ]
151
2015-01-03T18:55:54.000Z
2022-03-04T07:04:23.000Z
def armsinside(): i01.rightArm.rotate.attach() i01.rightArm.rotate.moveTo(0) sleep(7) i01.rightArm.rotate.detach()
20.833333
31
0.712
17
125
5.235294
0.647059
0.370787
0.573034
0
0
0
0
0
0
0
0
0.073395
0.128
125
6
32
20.833333
0.743119
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
true
0
0
0
0.2
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
6d87841dd6668b8d00aee50e1620809a0f14a893
34
py
Python
src/api/__init__.py
MrPingouinMC/Amulet-Map-Editor
7fe0d16a58875e718d2a6ca90752e9ff72bf2173
[ "MIT" ]
1
2021-11-12T01:26:06.000Z
2021-11-12T01:26:06.000Z
src/api/__init__.py
MrPingouinMC/Amulet-Map-Editor
7fe0d16a58875e718d2a6ca90752e9ff72bf2173
[ "MIT" ]
null
null
null
src/api/__init__.py
MrPingouinMC/Amulet-Map-Editor
7fe0d16a58875e718d2a6ca90752e9ff72bf2173
[ "MIT" ]
null
null
null
from api.world import WorldFormat
17
33
0.852941
5
34
5.8
1
0
0
0
0
0
0
0
0
0
0
0
0.117647
34
1
34
34
0.966667
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
6db148a2e5fbd0e3b271492f4cd258c1d3fd538e
781
py
Python
test/test_devices_page_all_of.py
CiscoDevNet/python-msx-sdk
d7e0a08c656504b4f4551d263e67c671a2a04b3f
[ "MIT" ]
null
null
null
test/test_devices_page_all_of.py
CiscoDevNet/python-msx-sdk
d7e0a08c656504b4f4551d263e67c671a2a04b3f
[ "MIT" ]
null
null
null
test/test_devices_page_all_of.py
CiscoDevNet/python-msx-sdk
d7e0a08c656504b4f4551d263e67c671a2a04b3f
[ "MIT" ]
null
null
null
""" MSX SDK MSX SDK client. # noqa: E501 The version of the OpenAPI document: 1.0.9 Generated by: https://openapi-generator.tech """ import sys import unittest import python_msx_sdk from python_msx_sdk.model.device import Device globals()['Device'] = Device from python_msx_sdk.model.devices_page_all_of import DevicesPageAllOf class TestDevicesPageAllOf(unittest.TestCase): """DevicesPageAllOf unit test stubs""" def setUp(self): pass def tearDown(self): pass def testDevicesPageAllOf(self): """Test DevicesPageAllOf""" # FIXME: construct object with mandatory attributes with example values # model = DevicesPageAllOf() # noqa: E501 pass if __name__ == '__main__': unittest.main()
20.552632
79
0.68758
92
781
5.652174
0.565217
0.057692
0.069231
0.061538
0.080769
0
0
0
0
0
0
0.014827
0.222791
781
37
80
21.108108
0.841845
0.37516
0
0.2
1
0
0.030973
0
0
0
0
0.027027
0
1
0.2
false
0.2
0.333333
0
0.6
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
1
0
0
0
0
1
1
0
1
0
0
5
6dd3e6942c6616310dbfd23698838ed27c1dc545
22
py
Python
test-cr-client/testfiles/bad_test.py
Nick-Anderssohn/hello-class
5f9c6ab7a7383d876680e4c3989327ebdda5d2e2
[ "MIT" ]
1
2017-06-06T04:37:34.000Z
2017-06-06T04:37:34.000Z
test-cr-client/testfiles/bad_test.py
Nick-Anderssohn/hello-compsci
5f9c6ab7a7383d876680e4c3989327ebdda5d2e2
[ "MIT" ]
1
2017-07-27T01:57:57.000Z
2017-07-27T01:57:57.000Z
test-cr-client/testfiles/bad_test.py
Nick-Anderssohn/hello-compsci
5f9c6ab7a7383d876680e4c3989327ebdda5d2e2
[ "MIT" ]
null
null
null
prit("Hello Python3!")
22
22
0.727273
3
22
5.333333
1
0
0
0
0
0
0
0
0
0
0
0.047619
0.045455
22
1
22
22
0.714286
0
0
0
0
0
0.608696
0
0
0
0
0
0
1
0
true
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
6dfccc17f167ff5cd25060484be9404206618be1
85
py
Python
enthought/chaco/datamapper.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
3
2016-12-09T06:05:18.000Z
2018-03-01T13:00:29.000Z
enthought/chaco/datamapper.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
1
2020-12-02T00:51:32.000Z
2020-12-02T08:48:55.000Z
enthought/chaco/datamapper.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
null
null
null
# proxy module from __future__ import absolute_import from chaco.datamapper import *
21.25
38
0.835294
11
85
6
0.727273
0
0
0
0
0
0
0
0
0
0
0
0.129412
85
3
39
28.333333
0.891892
0.141176
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
09758e974d7c3491d49dd0488134664ea359b2b8
8,532
py
Python
replication/runtime_analysis_graph2vec_geo2dr.py
paulmorio/geo2dr
49d5f1cdc0a4aa0c2c19744f6b1c723fd5988955
[ "MIT" ]
32
2020-03-13T21:09:50.000Z
2021-10-02T13:01:46.000Z
replication/runtime_analysis_graph2vec_geo2dr.py
paulmorio/geo2dr
49d5f1cdc0a4aa0c2c19744f6b1c723fd5988955
[ "MIT" ]
3
2020-03-22T14:34:49.000Z
2021-08-17T15:20:40.000Z
replication/runtime_analysis_graph2vec_geo2dr.py
paulmorio/geo2dr
49d5f1cdc0a4aa0c2c19744f6b1c723fd5988955
[ "MIT" ]
5
2020-03-29T00:31:10.000Z
2021-08-17T10:57:32.000Z
""" A script which times the training time of our graph2vec reimplementations using both disk memory dataset loaders and ram memory dataset loaders. """ import os import time import numpy as np from geometric2dr.decomposition.weisfeiler_lehman_patterns import wl_corpus from geometric2dr.embedding_methods.pvdbow_trainer import Trainer, InMemoryTrainer from geometric2dr.embedding_methods.classify import cross_val_accuracy import geometric2dr.embedding_methods.utils as utils # Input data paths dataset = "MUTAG" corpus_data_dir = "data/" + dataset wl_depth = 2 min_count = 0 emb_dimension = 128 batch_size = 1024 epochs = 100 initial_lr = 0.1 # Learn embeddings graph_files = utils.get_files(corpus_data_dir, ".gexf", max_files=0) wl_corpus(graph_files, wl_depth) extension = ".wld" + str(wl_depth) # Extension of the graph document output_embedding_fh = "runtime_analysis_embeddings" # Load from disk trainer hd_times = [] for _ in range(10): trainer = Trainer(corpus_dir=corpus_data_dir, extension=extension, max_files=0, output_fh=output_embedding_fh, emb_dimension=emb_dimension, batch_size=batch_size, epochs=epochs, initial_lr=initial_lr, min_count=min_count) start_time = time.time() trainer.train() end_time = (time.time() - start_time) hd_times.append(end_time) mean_hd_time = np.mean(hd_times) std_hd_time = np.std(hd_times) # Use memory trainer memory_times = [] for _ in range(10): trainer = InMemoryTrainer(corpus_dir=corpus_data_dir, extension=extension, max_files=0, output_fh=output_embedding_fh, emb_dimension=emb_dimension, batch_size=batch_size, epochs=epochs, initial_lr=initial_lr, min_count=min_count) start_time = time.time() trainer.train() end_time = (time.time() - start_time) memory_times.append(end_time) mean_mem_time = np.mean(memory_times) std_mem_time = np.std(memory_times) # print("Hard Drive Geo2DR Graph2Vec mean time: %.4f standard dev: %.4f " % (mean_hd_time, std_hd_time)) print("In Memory Geo2DR Graph2Vec mean time: %.4f standard dev: %.4f " % (mean_mem_time, std_mem_time)) # Anonymous Walk Embeddings import os import time import numpy as np import geometric2dr.embedding_methods.utils as utils from geometric2dr.decomposition.anonymous_walk_patterns import awe_corpus from geometric2dr.embedding_methods.classify import cross_val_accuracy from geometric2dr.embedding_methods.pvdm_trainer import PVDM_Trainer # Note use of PVDM aw_length = 10 label_setting = "nodes" # AWE is quite nice and versatile allowing for different node-label/edge-label settings # Input data paths dataset = "MUTAG" corpus_data_dir = "data/" + dataset # Desired output paths output_embedding_fh = "AWE_Embeddings.json" ####### # Step 1 Create corpus data for neural language model # We keep permanent files for sake of deeper post studies and testing ####### graph_files = utils.get_files(corpus_data_dir, ".gexf", max_files=0) memory_times = [] for _ in range(10): awe_corpus(corpus_data_dir, aw_length, label_setting, saving_graph_docs=True) extension = ".awe_" + str(aw_length) + "_" + label_setting ###### # Step 2 Train a neural language model to learn distributed representations # of the graphs directly or of its substructures. Here we learn it directly # for an example of the latter check out the DGK models. ###### trainer = PVDM_Trainer(corpus_dir=corpus_data_dir, extension=extension, max_files=0, window_size=16, output_fh=output_embedding_fh, emb_dimension=128, batch_size=100, epochs=100, initial_lr=0.1, min_count=0) start_time = time.time() trainer.train() end_time = (time.time() - start_time) memory_times.append(end_time) mean_mem_time = np.mean(memory_times) std_mem_time = np.std(memory_times) print("In Memory Geo2DR AWE-DD mean time: %.4f standard dev: %.4f " % (mean_mem_time, std_mem_time)) import os import time import numpy as np import geometric2dr.embedding_methods.utils as utils from geometric2dr.decomposition.weisfeiler_lehman_patterns import wl_corpus from geometric2dr.embedding_methods.skipgram_trainer import InMemoryTrainer # DGK-WL # Input data paths dataset = "MUTAG" corpus_data_dir = "data/" + dataset # Desired output paths for subgraph embeddings output_embedding_fh = "WL_Subgraph_Embeddings.json" # WL decomposition hyperparameters wl_depth = 2 ############ # Step 1 # Run the decomposition algorithm to get subgraph patterns across the graphs of MUTAG ############ graph_files = utils.get_files(corpus_data_dir, ".gexf", max_files=0) corpus, vocabulary, prob_map, num_graphs, graph_map = wl_corpus(graph_files, wl_depth) extension = ".wld" + str(wl_depth) # Extension of the graph document ############ # Step 2 # Train a skipgram (w. Negative Sampling) model to learn distributed representations of the subgraph patterns ############ memory_times = [] for _ in range(10): trainer = InMemoryTrainer(corpus_dir=corpus_data_dir, extension=extension, max_files=0, window_size=10, output_fh=output_embedding_fh, emb_dimension=32, batch_size=1280, epochs=100, initial_lr=0.1, min_count=1) start_time = time.time() trainer.train() end_time = (time.time() - start_time) memory_times.append(end_time) mean_mem_time = np.mean(memory_times) std_mem_time = np.std(memory_times) print("In Memory Geo2DR DGK-WL mean time: %.4f standard dev: %.4f " % (mean_mem_time, std_mem_time)) # DGK-SP import os import time import numpy as np import geometric2dr.embedding_methods.utils as utils from geometric2dr.decomposition.shortest_path_patterns import sp_corpus from geometric2dr.embedding_methods.skipgram_trainer import InMemoryTrainer # Input data paths dataset = "MUTAG" corpus_data_dir = "data/" + dataset # Desired output paths for subgraph embeddings output_embedding_fh = "SPP_Subgraph_Embeddings.json" ############ # Step 1 # Run the decomposition algorithm to get subgraph patterns across the graphs of MUTAG ############ graph_files = utils.get_files(corpus_data_dir, ".gexf", max_files=0) corpus, vocabulary, prob_map, num_graphs, graph_map = sp_corpus(corpus_data_dir) # will produce .spp files extension = ".spp" ############ # Step 2 # Train a skipgram (w. Negative Sampling) model to learn distributed representations of the subgraph patterns ############ memory_times = [] for _ in range(10): trainer = InMemoryTrainer(corpus_dir=corpus_data_dir, extension=extension, max_files=0, window_size=10, output_fh=output_embedding_fh, emb_dimension=32, batch_size=128, epochs=100, initial_lr=0.1, min_count=1) start_time = time.time() trainer.train() end_time = (time.time() - start_time) memory_times.append(end_time) mean_mem_time = np.mean(memory_times) std_mem_time = np.std(memory_times) print("In Memory Geo2DR DGK-SP mean time: %.4f standard dev: %.4f " % (mean_mem_time, std_mem_time)) # # DGK-GK import os import time import numpy as np import geometric2dr.embedding_methods.utils as utils from geometric2dr.decomposition.graphlet_patterns import graphlet_corpus from geometric2dr.embedding_methods.skipgram_trainer import Trainer, InMemoryTrainer # Input data paths dataset = "MUTAG" corpus_data_dir = "data/" + dataset # Desired output paths for subgraph embeddings output_embedding_fh = "Graphlet_Subgraph_Embeddings.json" # Graphlet decomposition hyperparameters num_graphlet = 7 # size of the graphlets to extract sample_size = 100 # number of graphlets samples to extract ############ # Step 1 # Run the decomposition algorithm to get subgraph patterns across the graphs of MUTAG ############ graph_files = utils.get_files(corpus_data_dir, ".gexf", max_files=0) corpus, vocabulary, prob_map, num_graphs, graph_map = graphlet_corpus(corpus_data_dir, num_graphlet, sample_size) extension = ".graphlet_ng_"+str(num_graphlet)+"_ss_"+str(sample_size) ############ # Step 2 # Train a skipgram (w. Negative Sampling) model to learn distributed representations of the subgraph patterns ############ memory_times = [] for _ in range(10): trainer = InMemoryTrainer(corpus_dir=corpus_data_dir, extension=extension, max_files=0, window_size=10, output_fh=output_embedding_fh, emb_dimension=32, batch_size=128, epochs=100, initial_lr=0.1, min_count=0) start_time = time.time() trainer.train() end_time = (time.time() - start_time) memory_times.append(end_time) mean_mem_time = np.mean(memory_times) std_mem_time = np.std(memory_times) print("In Memory Geo2DR DGK-GRAPHLET mean time: %.4f standard dev: %.4f " % (mean_mem_time, std_mem_time))
33.198444
135
0.764416
1,250
8,532
4.9592
0.1496
0.030973
0.039845
0.036135
0.769156
0.758832
0.748024
0.727698
0.712857
0.668334
0
0.019457
0.13256
8,532
256
136
33.328125
0.818133
0.219995
0
0.690141
0
0
0.08595
0.017874
0
0
0
0
0
1
0
false
0
0.225352
0
0.225352
0.035211
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
09ac8f5e76f2663e0c4956a8660a9c870aa0fc5f
149
py
Python
__init__.py
mawanda-jun/TReNDS-neuroimaging
8075f4196e7eb812ce96b5a10b18d13c293ce727
[ "MIT" ]
1
2020-06-28T18:13:49.000Z
2020-06-28T18:13:49.000Z
__init__.py
mawanda-jun/TReNDS-neuroimaging
8075f4196e7eb812ce96b5a10b18d13c293ce727
[ "MIT" ]
null
null
null
__init__.py
mawanda-jun/TReNDS-neuroimaging
8075f4196e7eb812ce96b5a10b18d13c293ce727
[ "MIT" ]
1
2022-03-18T13:13:10.000Z
2022-03-18T13:13:10.000Z
from dataset import TReNDS_dataset from network import ShallowNet from pytorchtools import EarlyStopping, TReNDSLoss from vae_classifier import Model
37.25
50
0.885906
19
149
6.842105
0.631579
0
0
0
0
0
0
0
0
0
0
0
0.107383
149
4
51
37.25
0.977444
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
09dab6d138b7087ce8ab27588b1d170d7e79c2fe
246
py
Python
niyopolymers/patches/create_warning_letter_template.py
venku31/niyopolymers
f150ee591d2ea10720d8e98c5f6abf7c6e2edb2d
[ "MIT" ]
null
null
null
niyopolymers/patches/create_warning_letter_template.py
venku31/niyopolymers
f150ee591d2ea10720d8e98c5f6abf7c6e2edb2d
[ "MIT" ]
null
null
null
niyopolymers/patches/create_warning_letter_template.py
venku31/niyopolymers
f150ee591d2ea10720d8e98c5f6abf7c6e2edb2d
[ "MIT" ]
null
null
null
import frappe def execute(): path = frappe.get_app_path("niyopolymers", "patches", "imports", "warning_letter_template.csv") frappe.core.doctype.data_import.data_import.import_file("Warning Letter Template", path, "Insert", console=True)
49.2
116
0.764228
32
246
5.65625
0.65625
0.143646
0.232044
0
0
0
0
0
0
0
0
0
0.097561
246
5
116
49.2
0.815315
0
0
0
0
0
0.331984
0.109312
0
0
0
0
0
1
0.25
false
0
0.75
0
1
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
5
61d781493e7ab1c07e72e52880da7d17e717503c
34
py
Python
ptop/statistics/__init__.py
deeps-nars/ptop
96822e8c8ecb2fcce1b0edf975266985af4d16e4
[ "MIT" ]
327
2015-07-07T14:18:07.000Z
2017-06-19T21:53:32.000Z
ptop/statistics/__init__.py
deeps-nars/ptop
96822e8c8ecb2fcce1b0edf975266985af4d16e4
[ "MIT" ]
47
2017-07-12T12:24:20.000Z
2021-07-02T20:49:46.000Z
ptop/statistics/__init__.py
deeps-nars/ptop
96822e8c8ecb2fcce1b0edf975266985af4d16e4
[ "MIT" ]
40
2017-11-22T06:12:33.000Z
2021-11-20T01:48:37.000Z
from .statistics import Statistics
34
34
0.882353
4
34
7.5
0.75
0
0
0
0
0
0
0
0
0
0
0
0.088235
34
1
34
34
0.967742
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
61d953e246348a46d0d6759a146f02216a0d15d0
120
py
Python
symtmm/__init__.py
Matael/symtmm
7156172259c77b3fa48df322f3456313c1031fcd
[ "MIT" ]
1
2021-02-24T01:53:57.000Z
2021-02-24T01:53:57.000Z
symtmm/__init__.py
Matael/symtmm
7156172259c77b3fa48df322f3456313c1031fcd
[ "MIT" ]
null
null
null
symtmm/__init__.py
Matael/symtmm
7156172259c77b3fa48df322f3456313c1031fcd
[ "MIT" ]
null
null
null
__VERSION__ = '0.0' from symtmm.solver import Solver from symtmm.layers import Layer from symtmm.media import Air, Eqf
20
33
0.791667
19
120
4.789474
0.578947
0.32967
0
0
0
0
0
0
0
0
0
0.019417
0.141667
120
5
34
24
0.864078
0
0
0
0
0
0.025
0
0
0
0
0
0
1
0
false
0
0.75
0
0.75
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
61e92e63ec1728daa5401b0ab36092e1b6049f1d
113
py
Python
setup.py
yespon/Chinese-Annotator
79aca8b0428a48ac789f2d2771e9e9fb03ccc8fa
[ "Apache-2.0" ]
915
2018-07-25T07:30:27.000Z
2022-03-25T14:09:17.000Z
setup.py
12xiaoni/data-label
448a22941d9c4a55c7756003d94e410c2506ec43
[ "Apache-2.0" ]
20
2018-10-12T15:48:56.000Z
2021-09-27T09:12:01.000Z
setup.py
12xiaoni/data-label
448a22941d9c4a55c7756003d94e410c2506ec43
[ "Apache-2.0" ]
204
2018-07-30T06:52:29.000Z
2022-03-03T15:18:39.000Z
from setuptools import setup, find_packages setup(name='chi_annotator', version='1.0', packages=find_packages())
37.666667
68
0.79646
16
113
5.4375
0.75
0.275862
0
0
0
0
0
0
0
0
0
0.019048
0.070796
113
3
68
37.666667
0.809524
0
0
0
0
0
0.140351
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
61f15454ed7e3843b25bdc56e3c3d0bd9f563c46
97
py
Python
demodocusfw/graph/__init__.py
dchud/demodocus
e37040af521bc56a61fea6327fae111268b81497
[ "Apache-2.0" ]
7
2020-11-17T15:02:32.000Z
2022-02-18T23:53:23.000Z
demodocusfw/graph/__init__.py
dchud/demodocus
e37040af521bc56a61fea6327fae111268b81497
[ "Apache-2.0" ]
20
2020-11-02T13:40:40.000Z
2020-11-30T14:09:01.000Z
demodocusfw/graph/__init__.py
dchud/demodocus
e37040af521bc56a61fea6327fae111268b81497
[ "Apache-2.0" ]
4
2020-11-02T18:48:24.000Z
2020-11-20T18:31:29.000Z
from .state import State, StateData from .edge import Edge, EdgeMetrics from .graph import Graph
24.25
35
0.804124
14
97
5.571429
0.5
0
0
0
0
0
0
0
0
0
0
0
0.14433
97
3
36
32.333333
0.939759
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
113d6b738ba44f91f808dbc7223d27a629d55dc0
324
py
Python
5. Logistic Regression/accessory_fun.py
haitaozhao/PRSL
c81d64d1d2968af8ba5f34ce0ecfed32007822f1
[ "MIT" ]
5
2022-02-27T08:35:44.000Z
2022-03-12T07:53:53.000Z
5. Logistic Regression/accessory_fun.py
haitaozhao/PRSL
c81d64d1d2968af8ba5f34ce0ecfed32007822f1
[ "MIT" ]
null
null
null
5. Logistic Regression/accessory_fun.py
haitaozhao/PRSL
c81d64d1d2968af8ba5f34ce0ecfed32007822f1
[ "MIT" ]
null
null
null
import numpy as np # sigmoid function def my_sigmoid(w,x): return 1/(1+np.exp(-w.T.dot(x.T))) # 损失函数 def obj_fun(w,x,y): tmp = y.reshape(1,-1)*np.log(my_sigmoid(w,x)) + \ (1-y.reshape(1,-1))*np.log(1-my_sigmoid(w,x)) return np.sum(-tmp) # 计算随机梯度的函数 def my_Stgrad(w,x,y): return (my_sigmoid(w,x) - y)*x.T
27
53
0.617284
70
324
2.771429
0.357143
0.061856
0.206186
0.226804
0.329897
0.154639
0
0
0
0
0
0.029304
0.157407
324
12
54
27
0.681319
0.095679
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.111111
0.222222
0.777778
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
114e66a6e7250ae3d47a7f2f3dd3934b10cb8681
82
py
Python
smwds/user/__init__.py
rtx3/Salt-MWDS
33d8b0abe65c74fba1a7be6838575603983c6c43
[ "MIT" ]
2
2016-08-26T06:20:04.000Z
2016-08-26T12:50:02.000Z
smwds/user/__init__.py
rtx3/Salt-MWDS
33d8b0abe65c74fba1a7be6838575603983c6c43
[ "MIT" ]
null
null
null
smwds/user/__init__.py
rtx3/Salt-MWDS
33d8b0abe65c74fba1a7be6838575603983c6c43
[ "MIT" ]
1
2017-03-31T05:20:10.000Z
2017-03-31T05:20:10.000Z
# -*- coding: utf-8 -*- from user.models import User from user.views import user
16.4
28
0.695122
13
82
4.384615
0.615385
0.280702
0
0
0
0
0
0
0
0
0
0.014706
0.170732
82
4
29
20.5
0.823529
0.256098
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
115edd329a78a1257c5b50e9f817642feb21777f
110
py
Python
zeitslots_to_json.py
omehling/faim_website
0131c834dc6e653ce5c890723b433a43bb1628b9
[ "MIT" ]
null
null
null
zeitslots_to_json.py
omehling/faim_website
0131c834dc6e653ce5c890723b433a43bb1628b9
[ "MIT" ]
null
null
null
zeitslots_to_json.py
omehling/faim_website
0131c834dc6e653ce5c890723b433a43bb1628b9
[ "MIT" ]
null
null
null
import pandas as pd dfcsv=pd.read_csv('gruppen-zeitslots-vers3.csv') dfcsv.T.to_json('gruppen-zeitslots.json')
36.666667
48
0.8
19
110
4.526316
0.684211
0.372093
0
0
0
0
0
0
0
0
0
0.009524
0.045455
110
3
49
36.666667
0.809524
0
0
0
0
0
0.441441
0.441441
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
116186ae2711713c8d5d1eecadd63b1e51735895
17
py
Python
nilm_metadata/central_metadata/appliance_types/__init__.py
BaluJr/nilm_metadata
3a498e3acd0975e6d77e68887a0119c51b74b9d7
[ "Apache-2.0" ]
null
null
null
nilm_metadata/central_metadata/appliance_types/__init__.py
BaluJr/nilm_metadata
3a498e3acd0975e6d77e68887a0119c51b74b9d7
[ "Apache-2.0" ]
null
null
null
nilm_metadata/central_metadata/appliance_types/__init__.py
BaluJr/nilm_metadata
3a498e3acd0975e6d77e68887a0119c51b74b9d7
[ "Apache-2.0" ]
null
null
null
#print "HERE too"
17
17
0.705882
3
17
4
1
0
0
0
0
0
0
0
0
0
0
0
0.117647
17
1
17
17
0.8
0.941176
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
feccd72bcb5fa1af7f5f738acc1bad2200e60457
86
py
Python
xremotebot/lib/exceptions.py
Robots-Linti/xremotebot
f07b65e1d3e1698ad330445fadb3da95198282c9
[ "MIT" ]
null
null
null
xremotebot/lib/exceptions.py
Robots-Linti/xremotebot
f07b65e1d3e1698ad330445fadb3da95198282c9
[ "MIT" ]
null
null
null
xremotebot/lib/exceptions.py
Robots-Linti/xremotebot
f07b65e1d3e1698ad330445fadb3da95198282c9
[ "MIT" ]
null
null
null
class NoFreeRobots(Exception): pass class UnavailableRobot(Exception): pass
12.285714
34
0.744186
8
86
8
0.625
0.40625
0
0
0
0
0
0
0
0
0
0
0.186047
86
6
35
14.333333
0.914286
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
3a1c1f915d35575f726b94cb0bfeef7f349d82b3
42
py
Python
global_id/models/mixins/__init__.py
ThePokerFaCcCe/messenger
2db3d5c2ccd05ac40d2442a13d664ca9ad3cb14c
[ "MIT" ]
null
null
null
global_id/models/mixins/__init__.py
ThePokerFaCcCe/messenger
2db3d5c2ccd05ac40d2442a13d664ca9ad3cb14c
[ "MIT" ]
null
null
null
global_id/models/mixins/__init__.py
ThePokerFaCcCe/messenger
2db3d5c2ccd05ac40d2442a13d664ca9ad3cb14c
[ "MIT" ]
null
null
null
from .guid_generic_mixin import GUIDMixin
21
41
0.880952
6
42
5.833333
1
0
0
0
0
0
0
0
0
0
0
0
0.095238
42
1
42
42
0.921053
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
3a4da97c089e00efe5f69ba2912a4ba255a5d6f0
3,624
py
Python
tests/test_gpuctl.py
Ed-Yang/gpuctl
c84dd38d6732ce882a099d952bd2f519dd87c292
[ "MIT" ]
2
2021-03-24T13:57:33.000Z
2021-05-11T00:58:28.000Z
tests/test_gpuctl.py
Ed-Yang/gpuctl
c84dd38d6732ce882a099d952bd2f519dd87c292
[ "MIT" ]
null
null
null
tests/test_gpuctl.py
Ed-Yang/gpuctl
c84dd38d6732ce882a099d952bd2f519dd87c292
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import time # from re import U import unittest from gpuctl import PciDev, GpuCtl, GpuDev, GpuAMD, GpuNV, GpuOk from gpuctl import GpuOk, GpuNak class TestGpuCtl(unittest.TestCase): def test_invalid_key(self): gpu_ctl = None try: gpu_ctl = GpuCtl(slots='aaaa') self.assertEqual(gpu_ctl, None) except: pass def test_discover_all(self): pci_devices = PciDev.discovery() gpu_devices = [] for pdev in pci_devices: gpu = None if pdev.is_amd(): gpu = GpuAMD(pdev) if pdev.is_nvidia(): gpu = GpuNV(pdev) if gpu and gpu.is_gpu(): gpu_devices.append(gpu) gpu_ctl = GpuCtl(gpu_devices=gpu_devices) def test_discover_vendor(self): vendors = ['AMD', 'NVIDIA'] pci_devices = PciDev.discovery(vendor_filter=vendors) gpu_devices = [] for pdev in pci_devices: gpu = None if pdev.is_amd(): gpu = GpuAMD(pdev) if pdev.is_nvidia(): gpu = GpuNV(pdev) if gpu and gpu.is_gpu(): gpu_devices.append(gpu) gpu_ctl = GpuCtl(gpu_devices=gpu_devices) def test_add_devices(self): vendors = ['AMD', 'NVIDIA'] pci_devices = PciDev.discovery(vendor_filter=vendors) gpu_devices = [] for pdev in pci_devices: gpu = None if pdev.is_amd(): gpu = GpuAMD(pdev) if pdev.is_nvidia(): gpu = GpuNV(pdev) if gpu and gpu.is_gpu(): gpu_devices.append(gpu) gpu_ctl = GpuCtl(gpu_devices=gpu_devices) cnt = gpu_ctl.add_gpu_devices(gpu_devices) self.assertEqual(cnt, 0) def test_over_temp(self): slot_name = '1111:11:11.1' pci_id = '1111:1111' pdev = PciDev(slot_name, pci_id, 'mock pci') self.assertIsNotNone(pdev) self.assertEqual(pdev.vendor_name(), 'Other') gpu_dev = GpuNak(pdev) self.assertIsNotNone(gpu_dev) gpu_ctl = GpuCtl(gpu_devices=[gpu_dev], fan=10, temp=20, tas='./tests/ok.sh') self.assertNotEqual(gpu_ctl, None) rv = gpu_ctl.set_interval(wait_period=10) self.assertTrue(rv) gpu_ctl.start() time.sleep(5) gpu_ctl.stop() def test_interval(self): slot_name = '1111:11:11.1' pci_id = '1111:1111' pdev = PciDev(slot_name, pci_id, 'mock pci') self.assertIsNotNone(pdev) self.assertEqual(pdev.vendor_name(), 'Other') gpu_dev = GpuOk(pdev) self.assertIsNotNone(gpu_dev) gpu_ctl = GpuCtl(gpu_devices=[gpu_dev]) rv = gpu_ctl.set_interval(intvl=1, wait_period=3) self.assertTrue(rv) rv = gpu_ctl.set_interval(intvl=2, wait_period=20) self.assertTrue(rv) rv = gpu_ctl.set_interval(intvl=2, wait_period=1) self.assertFalse(rv) def test_nak_gpu(self): slot_name = '1111:11:11.1' pci_id = '1111:1111' pdev = PciDev(slot_name, pci_id, 'mock pci') self.assertIsNotNone(pdev) self.assertEqual(pdev.vendor_name(), 'Other') gpu_dev = GpuNak(pdev) self.assertIsNotNone(gpu_dev) gpu_ctl = GpuCtl(gpu_devices=[gpu_dev], verbose=True) rv = gpu_ctl.set_interval(wait_period=10) self.assertTrue(rv) gpu_ctl.start() time.sleep(5) gpu_ctl.stop() if __name__ == '__main__': unittest.main()
27.454545
85
0.577815
461
3,624
4.303688
0.199566
0.060484
0.042339
0.045363
0.729335
0.729335
0.717238
0.717238
0.717238
0.717238
0
0.028169
0.314294
3,624
131
86
27.664122
0.770221
0.010486
0
0.673469
0
0
0.040458
0
0
0
0
0
0.173469
1
0.071429
false
0.010204
0.040816
0
0.122449
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
3a5683e4dd15e942657e684e15324a4d78686ef0
17,148
py
Python
scav-hunt/scaveye.py
scottshepard/MScA-Robotics-Capstone
29762ef87274fcd4d86a69918edc44f2a9f99ed5
[ "MIT" ]
3
2019-11-16T20:38:10.000Z
2020-04-11T01:24:36.000Z
scav-hunt/scaveye.py
scottshepard/MScA-Robotics-Capstone
29762ef87274fcd4d86a69918edc44f2a9f99ed5
[ "MIT" ]
1
2019-12-05T01:57:28.000Z
2019-12-05T01:57:28.000Z
scav-hunt/scaveye.py
MScA-Robotics/capstone-project-3
29762ef87274fcd4d86a69918edc44f2a9f99ed5
[ "MIT" ]
2
2020-05-17T19:56:12.000Z
2020-06-23T02:09:30.000Z
import os import glob import picamera import cv2 import numpy as np import importlib.util from datetime import datetime import videorecorder as vr import time from collections import Counter # If using TPU, need to load a different library # from tensorflow.lite.python.interpreter import Interpreter def take_picture(path): if path is None: path = "/home/pi/Pictures" camera = picamera.PiCamera() try: camera.capture(os.path.join(path, "image_{0}.jpg".format(datetime.now().strftime('%m%d%Y%H%M%S')))) finally: print('Picture taken') camera.close() def record_video(path=None, cone_color='green', duration=5, runid=0): if path is None: path="/home/pi/Videos" path = os.path.join(path,cone_color) try: recorder = vr.VideoRecorder(path,runid) print('Loaded Video Recorder') recorder.start_recording() time.sleep(duration) recorder.stop_recording() except: print('Video Recording failed') finally: print('Video recorded') class ObjectClassificationModel: def __init__(self, model_dir, image_dir, graph_name='detect.tflite', min_conf_threshold=0.5, use_TPU=False): self.model_dir = model_dir self.image_dir = image_dir self.min_conf_threshold = float(min_conf_threshold) self.use_TPU = use_TPU self._load_model(model_dir=model_dir, graph_name=graph_name) def _load_model(self, model_dir, graph_name): CWD_PATH = os.getcwd() # Load model labels PATH_TO_LABELS = os.path.join(CWD_PATH, model_dir, 'labelmap.txt') with open(PATH_TO_LABELS, 'r') as f: labels = [line.strip() for line in f.readlines()] if labels[0] == '???': del(labels[0]) self.labels = labels pkg = importlib.util.find_spec('tensorflow') if pkg is None: from tflite_runtime.interpreter import Interpreter if self.use_TPU: print('Loading tflite interpreter') from tflite_runtime.interpreter import load_delegate else: from tensorflow.lite.python.interpreter import Interpreter if self.use_TPU: print('Loading tflite interpreter') from tflite_runtime.interpreter import load_delegate # If using Edge TPU, assign filename for Edge TPU model if self.use_TPU: # If user has specified the name of the .tflite file, use that name, otherwise use default 'edgetpu.tflite' if (graph_name == 'detect.tflite'): graph_name = 'edgetpu.tflite' PATH_TO_CKPT = os.path.join(CWD_PATH, model_dir, graph_name) # Load the Tensorflow Lite model. # If using Edge TPU, use special load_delegate argument if self.use_TPU: self.interpreter = Interpreter(model_path=PATH_TO_CKPT, experimental_delegates=[load_delegate('libedgetpu.so.1.0')]) print(PATH_TO_CKPT) else: self.interpreter = Interpreter(model_path=PATH_TO_CKPT) self.interpreter.allocate_tensors() # Get model details self.input_details = self.interpreter.get_input_details() self.output_details = self.interpreter.get_output_details() self.height = self.input_details[0]['shape'][1] self.width = self.input_details[0]['shape'][2] self.floating_model = (self.input_details[0]['dtype'] == np.float32) self.input_mean = 127.5 self.input_std = 127.5 def classify(self, image_dir): images = glob.glob(image_dir + '/*') classes_list = [] scores_list = [] for image_path in images: print('Classifying: {}'.format(image_path)) # Load image and resize to expected shape [1xHxWx3] image = cv2.imread(image_path) image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) imH, imW, _ = image.shape image_resized = cv2.resize(image_rgb, (self.width, self.height)) input_data = np.expand_dims(image_resized, axis=0) # Normalize pixel values if using a floating model (i.e. if model is non-quantized) if self.floating_model: input_data = (np.float32(input_data) - self.input_mean) / self.input_std # Perform the actual detection by running the model with the image as input self.interpreter.set_tensor(self.input_details[0]['index'],input_data) self.interpreter.invoke() # Retrieve detection results # We are not using the boxes right now since we do not need to know # where picture the object is, only that it is there. # boxes = interpreter.get_tensor(output_details[0]['index'])[0] # Bounding box coordinates of detected objects classes = self.interpreter.get_tensor(self.output_details[1]['index'])[0] # Class index of detected objects scores = self.interpreter.get_tensor(self.output_details[2]['index'])[0] # Confidence of detected objects classes_list.append(classes[scores > self.min_conf_threshold]) scores_list.append(scores[scores > self.min_conf_threshold]) objects_detected = {} for classes in classes_list: objects = set([self.labels[int(c)] for c in classes]) for obj in objects: if obj in objects_detected.keys(): objects_detected[obj] += 1 else: objects_detected[obj] = 1 return classes_list, scores_list, objects_detected def classify_video(self, video_dir): """Function to detect objects in video file""" #1. Get the list of all video files from the directory passed in videos = glob.glob(video_dir + '/*') #2. Check the number of *.avi files in the folder num_videos = len(videos) #3. Do not run classification if number of videos in the folder are more than 10 and alert if num_videos > 10: print('Found more than 10 videos in the directory: {}'.format(video_dir)) return #4. For each video file for video_file in videos: video_name=os.path.basename(video_file) print('Processing video: {}'.format(video_name)) #4.1 Open the video file video = cv2.VideoCapture(video_file) imW = video.get(cv2.CAP_PROP_FRAME_WIDTH) imH = video.get(cv2.CAP_PROP_FRAME_HEIGHT) collect_labels = [] #4 .1.1 pass frame by frame to the detection model index = 0 print('Min Threshold',self.min_conf_threshold) while(video.isOpened()): # Acquire frame and resize to expected shape [1xHxWx3] ret, frame = video.read() if frame is None: break frame_rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) frame_resized = cv2.resize(frame_rgb, (self.width, self.height)) input_data = np.expand_dims(frame_resized, axis=0) # Normalize pixel values if using a floating model (i.e. if model is non-quantized) if self.floating_model: input_data = (np.float32(input_data) - self.input_mean) / self.input_std # Perform the actual detection by running the model with the image as input self.interpreter.set_tensor(self.input_details[0]['index'],input_data) self.interpreter.invoke() # Retrieve detection results boxes = self.interpreter.get_tensor(self.output_details[0]['index'])[0] # Bounding box coordinates of detected objects classes = self.interpreter.get_tensor(self.output_details[1]['index'])[0] # Class index of detected objects scores = self.interpreter.get_tensor(self.output_details[2]['index'])[0] # Confidence of detected objects # Loop over all detections and draw detection box if confidence is above minimum threshold for i in range(len(scores)): if ((scores[i] > self.min_conf_threshold) and (scores[i] <= 1.0)): # Get bounding box coordinates and draw box # Interpreter can return coordinates that are outside of image dimensions, need to force them to be within image using max() and min() ymin = int(max(1,(boxes[i][0] * imH))) xmin = int(max(1,(boxes[i][1] * imW))) ymax = int(min(imH,(boxes[i][2] * imH))) xmax = int(min(imW,(boxes[i][3] * imW))) cv2.rectangle(frame, (xmin,ymin), (xmax,ymax), (10, 255, 0), 4) # Draw label object_name = self.labels[int(classes[i])] # Look up object name from "labels" array using class index label = '%s: %d%%' % (object_name, int(scores[i]*100)) # Example: 'person: 72%' labelSize, baseLine = cv2.getTextSize(label, cv2.FONT_HERSHEY_SIMPLEX, 0.7, 2) # Get font size label_ymin = max(ymin, labelSize[1] + 10) # Make sure not to draw label too close to top of window cv2.rectangle(frame, (xmin, label_ymin-labelSize[1]-10), (xmin+labelSize[0], label_ymin+baseLine-10), (255, 255, 255), cv2.FILLED) # Draw white box to put label text in cv2.putText(frame, label, (xmin, label_ymin-7), cv2.FONT_HERSHEY_SIMPLEX, 0.7, (0, 0, 0), 2) # Draw label text collect_labels.append(object_name) index += 1 # All the results have been drawn on the frame, so it's time to display it. cv2.imshow('Object detector', frame) video.release() #cv2.destroyAllWindows() if len(collect_labels)>0: most_common,num_most_common = Counter(collect_labels).most_common(1)[0] max_object = most_common else: max_object = 'Nothing' print('Maximum detected object :{}'.format(max_object)) print(Counter(collect_labels)) return max_object class ConeClassificationModel: def __init__(self, model_dir, image_dir, graph_name='cone_detect.tflite', min_conf_threshold=0.5, use_TPU=False): self.model_dir = model_dir self.image_dir = image_dir self.min_conf_threshold = float(min_conf_threshold) self.use_TPU = use_TPU self._load_model(model_dir=model_dir, graph_name=graph_name) def _load_model(self, model_dir, graph_name): CWD_PATH = os.getcwd() # Load model labels PATH_TO_LABELS = os.path.join(CWD_PATH, model_dir, 'labelmap.txt') with open(PATH_TO_LABELS, 'r') as f: labels = [line.strip() for line in f.readlines()] if labels[0] == '???': del(labels[0]) self.labels = labels pkg = importlib.util.find_spec('tensorflow') if pkg is None: from tflite_runtime.interpreter import Interpreter if self.use_TPU: print('Loading tflite interpreter') from tflite_runtime.interpreter import load_delegate else: from tensorflow.lite.python.interpreter import Interpreter if self.use_TPU: print('Loading tflite interpreter') from tflite_runtime.interpreter import load_delegate # If using Edge TPU, assign filename for Edge TPU model if self.use_TPU: # If user has specified the name of the .tflite file, use that name, otherwise use default 'edgetpu.tflite' if (graph_name == 'cone_detect.tflite'): graph_name = 'cone_edgetpu.tflite' # Load the model PATH_TO_CKPT = os.path.join(CWD_PATH, model_dir, graph_name) #self.interpreter = Interpreter(model_path=PATH_TO_CKPT) # Load the Tensorflow Lite model. # If using Edge TPU, use special load_delegate argument if self.use_TPU: self.interpreter = Interpreter(model_path=PATH_TO_CKPT, experimental_delegates=[load_delegate('libedgetpu.so.1.0')]) print(PATH_TO_CKPT) else: self.interpreter = Interpreter(model_path=PATH_TO_CKPT) self.interpreter.allocate_tensors() # Get model details self.input_details = self.interpreter.get_input_details() self.output_details = self.interpreter.get_output_details() self.height = self.input_details[0]['shape'][1] self.width = self.input_details[0]['shape'][2] self.floating_model = (self.input_details[0]['dtype'] == np.float32) self.input_mean = 127.5 self.input_std = 127.5 def classify(self, image_dir): images = glob.glob(image_dir + '/*.jpg') classes_list = [] scores_list = [] boxes_list =[] for image_path in images: print('Classifying: {}'.format(image_path)) # Load image and resize to expected shape [1xHxWx3] image = cv2.imread(image_path) image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) imH, imW, _ = image.shape image_resized = cv2.resize(image_rgb, (self.width, self.height)) input_data = np.expand_dims(image_resized, axis=0) # Normalize pixel values if using a floating model (i.e. if model is non-quantized) if self.floating_model: input_data = (np.float32(input_data) - self.input_mean) / self.input_std # Perform the actual detection by running the model with the image as input self.interpreter.set_tensor(self.input_details[0]['index'],input_data) self.interpreter.invoke() boxes = self.interpreter.get_tensor(self.output_details[0]['index'])[0] # Bounding box coordinates of detected objects classes = self.interpreter.get_tensor(self.output_details[1]['index'])[0] # Class index of detected objects scores = self.interpreter.get_tensor(self.output_details[2]['index'])[0] # Confidence of detected objects boxes_list.append(boxes[scores > self.min_conf_threshold]) classes_list.append(classes[scores > self.min_conf_threshold]) scores_list.append(scores[scores > self.min_conf_threshold]) # Get bounding box coordinates and draw box # Interpreter can return coordinates that are outside of image dimensions, need to force them to be within image using max() and min() objects_dict ={} for i in range(len(scores)): if ((scores[i] > self.min_conf_threshold) and (scores[i] <= 1.0)): ymin = int(max(1,(boxes[i][0] * imH))) xmin = int(max(1,(boxes[i][1] * imW))) ymax = int(min(imH,(boxes[i][2] * imH))) xmax = int(min(imW,(boxes[i][3] * imW))) print((xmin,ymin), (xmax,ymax),(imH,imW)) cv2.rectangle(image, (xmin,ymin), (xmax,ymax), (10, 255, 0), 2) # Draw label object_name = self.labels[int(classes[i])] # Look up object name from "labels" array using class index objects_dict[object_name] = [(xmin,ymin), (xmax,ymax),(imH,imW)] label = '%s: %d%%' % (object_name, int(scores[i]*100)) # Example: 'person: 72%' labelSize, baseLine = cv2.getTextSize(label, cv2.FONT_HERSHEY_SIMPLEX, 0.7, 2) # Get font size label_ymin = max(ymin, labelSize[1] + 10) # Make sure not to draw label too close to top of window cv2.rectangle(image, (xmin, label_ymin-labelSize[1]-10), (xmin+labelSize[0], label_ymin+baseLine-10), (255, 255, 255), cv2.FILLED) # Draw white box to put label text in cv2.putText(image, label, (xmin, label_ymin-7), cv2.FONT_HERSHEY_SIMPLEX, 0.8, (0, 0, 0), 2) # Draw label text classes_list.append(classes[scores > self.min_conf_threshold]) scores_list.append(scores[scores > self.min_conf_threshold]) objects_detected = {} for classes in classes_list: objects = set([self.labels[int(c)] for c in classes]) for obj in objects: if obj in objects_detected.keys(): objects_detected[obj] += 1 else: objects_detected[obj] = 1 return boxes_list, classes_list, scores_list, objects_detected, objects_dict if __name__ == '__main__': model = ObjectClassificationModel('Sample_TFLite_model', '/home/pi/Pictures/scav_hunt') classes, scores, objects = model.classify(os.path.join(model.image_dir, 'archive/orange'))
48.440678
192
0.607476
2,173
17,148
4.627704
0.146802
0.037291
0.025457
0.023866
0.7679
0.763325
0.744033
0.72673
0.722255
0.715095
0
0.019385
0.293037
17,148
353
193
48.577904
0.810113
0.187835
0
0.662745
0
0
0.054417
0.001949
0
0
0
0
0
1
0.035294
false
0
0.078431
0
0.137255
0.070588
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
28e50161cd6d1fffd9c647d21db06debece1cf27
61
py
Python
qunetsim/__init__.py
pritamsinha2304/QuNetSim
65a7486d532816724b5c98cfdcc0910404bfe0e2
[ "MIT" ]
61
2020-02-15T00:59:20.000Z
2022-03-08T10:29:23.000Z
qunetsim/__init__.py
pritamsinha2304/QuNetSim
65a7486d532816724b5c98cfdcc0910404bfe0e2
[ "MIT" ]
50
2020-01-28T12:18:50.000Z
2021-12-16T21:38:19.000Z
qunetsim/__init__.py
pritamsinha2304/QuNetSim
65a7486d532816724b5c98cfdcc0910404bfe0e2
[ "MIT" ]
27
2020-01-21T12:59:28.000Z
2022-02-21T14:23:00.000Z
from .components import Host, Network from .objects import *
20.333333
37
0.786885
8
61
6
0.75
0
0
0
0
0
0
0
0
0
0
0
0.147541
61
2
38
30.5
0.923077
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
e9224fc9d93e1b11c5a9a3e8767f4d4a54b0d397
159
py
Python
persistent/errors.py
fictorial/python-object-persistence
93331e6e94ef356fe51ad377a67ed85225406943
[ "MIT" ]
1
2020-01-18T01:56:47.000Z
2020-01-18T01:56:47.000Z
persistent/errors.py
fictorial/python-object-persistence
93331e6e94ef356fe51ad377a67ed85225406943
[ "MIT" ]
null
null
null
persistent/errors.py
fictorial/python-object-persistence
93331e6e94ef356fe51ad377a67ed85225406943
[ "MIT" ]
1
2021-03-28T05:23:17.000Z
2021-03-28T05:23:17.000Z
class UniquenessError(ValueError): def __init__(self, index_name): ValueError.__init__(self, index_name) class NotFoundError(KeyError): pass
19.875
45
0.735849
17
159
6.294118
0.647059
0.149533
0.242991
0.317757
0
0
0
0
0
0
0
0
0.176101
159
7
46
22.714286
0.816794
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0.2
0
0
0.6
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
5
3a88dc9b7a19489dfbe01bdc504291e06dfd9f10
1,626
py
Python
test/unittests/test_GroundWatLE.py
mudkipmaster/gwlf-e
9e058445537dd32d1916f76c4b73ca64261771cd
[ "Apache-2.0" ]
null
null
null
test/unittests/test_GroundWatLE.py
mudkipmaster/gwlf-e
9e058445537dd32d1916f76c4b73ca64261771cd
[ "Apache-2.0" ]
6
2018-07-24T22:46:28.000Z
2018-07-29T19:13:09.000Z
test/unittests/test_GroundWatLE.py
mudkipmaster/gwlf-e
9e058445537dd32d1916f76c4b73ca64261771cd
[ "Apache-2.0" ]
1
2018-07-24T18:22:01.000Z
2018-07-24T18:22:01.000Z
import numpy as np from VariableUnittest import VariableUnitTest from gwlfe.Input.WaterBudget import GroundWatLE class TestGroundWatLE(VariableUnitTest): def test_GroundWatLE_ground_truth(self): z = self.z np.testing.assert_array_almost_equal( np.load(self.basepath + "/GroundWatLE.npy"), GroundWatLE.GroundWatLE(z.NYrs, z.DaysMonth, z.Temp, z.InitSnow_0, z.Prec, z.NRur, z.NUrb, z.Area, z.CNI_0, z.AntMoist_0, z.Grow_0, z.CNP_0, z.Imper, z.ISRR, z.ISRA, z.CN, z.UnsatStor_0, z.KV, z.PcntET, z.DayHrs, z.MaxWaterCap, z.SatStor_0, z.RecessionCoef, z.SeepCoef), decimal=7) def test_GroundWatLE(self): z = self.z np.testing.assert_array_almost_equal( GroundWatLE.GroundWatLE_f(z.NYrs, z.DaysMonth, z.Temp, z.InitSnow_0, z.Prec, z.NRur, z.NUrb, z.Area, z.CNI_0, z.AntMoist_0, z.Grow_0, z.CNP_0, z.Imper, z.ISRR, z.ISRA, z.CN, z.UnsatStor_0, z.KV, z.PcntET, z.DayHrs, z.MaxWaterCap, z.SatStor_0, z.RecessionCoef, z.SeepCoef), GroundWatLE.GroundWatLE(z.NYrs, z.DaysMonth, z.Temp, z.InitSnow_0, z.Prec, z.NRur, z.NUrb, z.Area, z.CNI_0, z.AntMoist_0, z.Grow_0, z.CNP_0, z.Imper, z.ISRR, z.ISRA, z.CN, z.UnsatStor_0, z.KV, z.PcntET, z.DayHrs, z.MaxWaterCap, z.SatStor_0, z.RecessionCoef, z.SeepCoef), decimal=7)
56.068966
112
0.560886
227
1,626
3.876652
0.237885
0.047727
0.020455
0.051136
0.730682
0.730682
0.730682
0.730682
0.730682
0.730682
0
0.020909
0.323493
1,626
28
113
58.071429
0.779091
0
0
0.608696
0
0
0.00984
0
0
0
0
0
0.086957
1
0.086957
false
0
0.130435
0
0.26087
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
3a89137dc5d68a37f1bbd913ab2462d253b89b3e
37
py
Python
reproducibility_project/src/engine_input/cassandra/__init__.py
chrisjonesBSU/reproducibility_study
34ab6542a28742d734db550293795992f33cf0a6
[ "MIT" ]
3
2021-08-12T16:42:01.000Z
2021-11-20T00:27:49.000Z
reproducibility_project/src/engine_input/cassandra/__init__.py
chrisjonesBSU/reproducibility_study
34ab6542a28742d734db550293795992f33cf0a6
[ "MIT" ]
67
2021-08-09T23:30:17.000Z
2022-03-24T16:38:59.000Z
reproducibility_project/src/engine_input/cassandra/__init__.py
chrisjonesBSU/reproducibility_study
34ab6542a28742d734db550293795992f33cf0a6
[ "MIT" ]
17
2021-08-09T23:38:40.000Z
2022-02-24T22:40:28.000Z
"""Cassandra engine input module."""
18.5
36
0.702703
4
37
6.5
1
0
0
0
0
0
0
0
0
0
0
0
0.108108
37
1
37
37
0.787879
0.810811
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
3ab384e4234a4adcfb3c0cab22507c8d19600ca3
172
py
Python
chatpls/structures/__init__.py
jaobernardi/chatpls
eaf79b72466cdfbf8168b8e059859c707cfde8df
[ "MIT" ]
1
2021-05-08T22:38:18.000Z
2021-05-08T22:38:18.000Z
chatpls/structures/__init__.py
jaobernardi/chatpls
eaf79b72466cdfbf8168b8e059859c707cfde8df
[ "MIT" ]
2
2021-05-06T09:19:06.000Z
2021-05-06T09:19:39.000Z
chatpls/structures/__init__.py
jaobernardi/chatpls
eaf79b72466cdfbf8168b8e059859c707cfde8df
[ "MIT" ]
null
null
null
from .http import Server, Response, Request from .wrappers import EventResponse, RelativeJsonFile, Config from .twitch import TwitchAPI from .database import User, Database
43
61
0.831395
21
172
6.809524
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.116279
172
4
62
43
0.940789
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
c93bd3a15adaeec5908e6e9444c3a3ef6c610155
1,171
py
Python
src/training/Core2/Chapter5Numbers/Exercise5_6.py
MagicForest/Python
8af56e9384061504f05b229467c922ba71a433cb
[ "Apache-2.0" ]
null
null
null
src/training/Core2/Chapter5Numbers/Exercise5_6.py
MagicForest/Python
8af56e9384061504f05b229467c922ba71a433cb
[ "Apache-2.0" ]
null
null
null
src/training/Core2/Chapter5Numbers/Exercise5_6.py
MagicForest/Python
8af56e9384061504f05b229467c922ba71a433cb
[ "Apache-2.0" ]
null
null
null
def parseExpression(expression): operators = ['**', '+', '-', '*', '/', '%'] operator = '+' for currOperator in operators: if expression.__contains__(currOperator): operator = currOperator break if bool(operator): operands = expression.split(operator) return {'firstOperand': int(operands[0]), 'operator': operator, 'secondOperand': int(operands[1])} def add(firstOperand, secondOperand): return firstOperand + secondOperand def subtract(firstOperand, secondOperand): return firstOperand - secondOperand def multiply(firstOperand, secondOperand): return firstOperand * secondOperand def divide(firstOperand, secondOperand): return firstOperand / secondOperand def mod(firstOperand, secondOperand): return firstOperand % secondOperand def pow(firstOperand, secondOperand): return firstOperand ** secondOperand def calculate(firstOperand, operator, secondOperand): operatorMappingFunc = {'+': add, '-': subtract, '*': multiply, '/': divide, '%': mod, '**': pow} return operatorMappingFunc[operator](firstOperand, secondOperand)
29.275
103
0.671221
93
1,171
8.408602
0.301075
0.415601
0.237852
0.329923
0.452685
0.452685
0
0
0
0
0
0.002155
0.207515
1,171
39
104
30.025641
0.840517
0
0
0
0
0
0.042403
0
0
0
0
0
0
1
0.32
false
0
0
0.24
0.64
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
5
a39098d812e8eb68ed52c197237e51ff40205d53
87
py
Python
tests/fixtures/abcd_package/test_c.py
venmo/nose-randomly
39db5db71a226ffdb6572d5785638e0a16379cfb
[ "BSD-3-Clause" ]
19
2015-07-30T17:27:56.000Z
2021-08-10T07:19:43.000Z
tests/fixtures/abcd_package/test_c.py
venmo/nose-randomly
39db5db71a226ffdb6572d5785638e0a16379cfb
[ "BSD-3-Clause" ]
11
2016-02-14T10:33:44.000Z
2016-10-28T12:38:35.000Z
tests/fixtures/abcd_package/test_c.py
adamchainz/nose-randomly
8a3fbeaf7cc5452c44da8c7e7573fe89391c8260
[ "BSD-3-Clause" ]
4
2016-06-01T06:04:46.000Z
2016-10-26T11:41:53.000Z
from unittest import TestCase class C(TestCase): def test_it(self): pass
12.428571
29
0.666667
12
87
4.75
0.916667
0
0
0
0
0
0
0
0
0
0
0
0.264368
87
6
30
14.5
0.890625
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0.25
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
5
6e8d32cda8a3901c6e46ce26252c14adf9645b09
329
py
Python
uvicore/http/routing/__init__.py
coboyoshi/uvicore
9cfdeeac83000b156fe48f068b4658edaf51c8de
[ "MIT" ]
null
null
null
uvicore/http/routing/__init__.py
coboyoshi/uvicore
9cfdeeac83000b156fe48f068b4658edaf51c8de
[ "MIT" ]
null
null
null
uvicore/http/routing/__init__.py
coboyoshi/uvicore
9cfdeeac83000b156fe48f068b4658edaf51c8de
[ "MIT" ]
null
null
null
# Public API used in packages routes and controllers from .api_router import ApiRoute, ApiRouter from .auto_api import AutoApi from .guard import Guard from .model_router import ModelRouter from .router import Router from .router import Routes from .router import Routes as Controller from .web_router import WebRoute, WebRouter
32.9
52
0.829787
48
329
5.604167
0.479167
0.267658
0.178439
0.163569
0
0
0
0
0
0
0
0
0.136778
329
9
53
36.555556
0.947183
0.151976
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
6ebc43029760f14ec70645af215efb5d20bf6399
401
py
Python
backend/messaging/models.py
vrindger/cb-test
3b0122dfbd0b4ca905a82ec8d4279582eeb71d6f
[ "Apache-2.0" ]
null
null
null
backend/messaging/models.py
vrindger/cb-test
3b0122dfbd0b4ca905a82ec8d4279582eeb71d6f
[ "Apache-2.0" ]
null
null
null
backend/messaging/models.py
vrindger/cb-test
3b0122dfbd0b4ca905a82ec8d4279582eeb71d6f
[ "Apache-2.0" ]
null
null
null
from django.db import models class Message(models.Model): sender_email = models.CharField(max_length=40) recipient_email = models.CharField(max_length=40, default='') title = models.CharField(max_length=40) message_body = models.CharField(max_length=100) def _str_(self): return 'To: ' + self.recipient_email + 'Title: ' + self.title + 'MessageBody: ' + self.message_body
40.1
107
0.715711
52
401
5.307692
0.480769
0.217391
0.26087
0.347826
0.318841
0.224638
0
0
0
0
0
0.026786
0.162095
401
10
107
40.1
0.794643
0
0
0
0
0
0.059701
0
0
0
0
0
0
1
0.125
false
0
0.125
0.125
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
5
6eca76199ad0d68006c4197b13af137e96972fe0
184
py
Python
com/bdu/chapter/four/Conditions.py
engineerpawan/python-examples
80806f8ab0fd7d96c2074989559ab4843d1e0be3
[ "MIT" ]
null
null
null
com/bdu/chapter/four/Conditions.py
engineerpawan/python-examples
80806f8ab0fd7d96c2074989559ab4843d1e0be3
[ "MIT" ]
null
null
null
com/bdu/chapter/four/Conditions.py
engineerpawan/python-examples
80806f8ab0fd7d96c2074989559ab4843d1e0be3
[ "MIT" ]
null
null
null
album_year = 1983 if album_year > 1980: print "Album year is greater than 1980" elif (album_year > 1990): print "greater than 1990" else: print "album is less than 1980"
20.444444
43
0.690217
29
184
4.275862
0.448276
0.290323
0
0
0
0
0
0
0
0
0
0.170213
0.233696
184
9
44
20.444444
0.70922
0
0
0
0
0
0.38587
0
0
0
0
0
0
0
null
null
0
0
null
null
0.428571
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
5
42c906967f55d6427bfe9295a4a4a109862f9d47
68
py
Python
WORC/facade/__init__.py
MStarmans91/WORC
b6b8fc2ccb7d443a69b5ca20b1d6efb65b3f0fc7
[ "ECL-2.0", "Apache-2.0" ]
47
2018-01-28T14:08:15.000Z
2022-03-24T16:10:07.000Z
WORC/facade/__init__.py
JZK00/WORC
14e8099835eccb35d49b52b97c0be64ecca3809c
[ "ECL-2.0", "Apache-2.0" ]
13
2018-08-28T13:32:57.000Z
2020-10-26T16:35:59.000Z
WORC/facade/__init__.py
JZK00/WORC
14e8099835eccb35d49b52b97c0be64ecca3809c
[ "ECL-2.0", "Apache-2.0" ]
16
2017-11-13T10:53:36.000Z
2022-03-18T17:02:04.000Z
from .simpleworc import SimpleWORC from .basicworc import BasicWORC
22.666667
34
0.852941
8
68
7.25
0.5
0
0
0
0
0
0
0
0
0
0
0
0.117647
68
2
35
34
0.966667
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
42e8ec7828edddcfd480403a89aee3bc13982023
122
py
Python
session03_test/test.py
heawon99/Repository-NEXT_HW_new
e73fac56469b7518034322f0d2fefe5f95c8c164
[ "MIT" ]
null
null
null
session03_test/test.py
heawon99/Repository-NEXT_HW_new
e73fac56469b7518034322f0d2fefe5f95c8c164
[ "MIT" ]
null
null
null
session03_test/test.py
heawon99/Repository-NEXT_HW_new
e73fac56469b7518034322f0d2fefe5f95c8c164
[ "MIT" ]
null
null
null
def add(a, b): return a + b add() def add(a, b): print(a+b) def say_hello(): print("hello") say_hello()
8.133333
18
0.532787
22
122
2.863636
0.363636
0.126984
0.222222
0.253968
0
0
0
0
0
0
0
0
0.278689
122
14
19
8.714286
0.715909
0
0
0.25
0
0
0.041667
0
0
0
0
0
0
1
0.375
false
0
0
0.125
0.5
0.25
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
5
42ff12fce56ed9c58bba61243f72c9f7bd18e33b
229
py
Python
src/airfly/_vendor/airflow/contrib/operators/bigquery_to_gcs.py
ryanchao2012/airfly
230ddd88885defc67485fa0c51f66c4a67ae98a9
[ "MIT" ]
7
2021-09-27T11:38:48.000Z
2022-02-01T06:06:24.000Z
src/airfly/_vendor/airflow/contrib/operators/bigquery_to_gcs.py
ryanchao2012/airfly
230ddd88885defc67485fa0c51f66c4a67ae98a9
[ "MIT" ]
null
null
null
src/airfly/_vendor/airflow/contrib/operators/bigquery_to_gcs.py
ryanchao2012/airfly
230ddd88885defc67485fa0c51f66c4a67ae98a9
[ "MIT" ]
null
null
null
# Auto generated by 'inv collect-airflow' from airfly._vendor.airflow.providers.google.cloud.transfers.bigquery_to_gcs import ( BigQueryToGCSOperator, ) class BigQueryToCloudStorageOperator(BigQueryToGCSOperator): pass
25.444444
85
0.816594
23
229
8
0.913043
0
0
0
0
0
0
0
0
0
0
0
0.10917
229
8
86
28.625
0.901961
0.170306
0
0
1
0
0
0
0
0
0
0
0
1
0
true
0.2
0.2
0
0.4
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
6e2eadf2c87144eeae292fb7c2109477c366633c
108
py
Python
q2_gcn_norm/__init__.py
Jiung-Wen/q2-gcn-norm
90a756c98a0fb5defd06afb2d7bbbd95de9df5c4
[ "BSD-3-Clause" ]
1
2022-03-02T18:03:04.000Z
2022-03-02T18:03:04.000Z
q2_gcn_norm/__init__.py
Jiung-Wen/q2-gcn-norm
90a756c98a0fb5defd06afb2d7bbbd95de9df5c4
[ "BSD-3-Clause" ]
4
2019-12-07T08:27:51.000Z
2021-11-29T19:43:29.000Z
q2_gcn_norm/__init__.py
Jiung-Wen/q2-gcn-norm
90a756c98a0fb5defd06afb2d7bbbd95de9df5c4
[ "BSD-3-Clause" ]
null
null
null
from ._copy_num_normalize import copy_num_normalize __all__ = 'copy_num_normalize' __version__ = '2021.11'
21.6
51
0.824074
15
108
4.933333
0.6
0.283784
0.648649
0
0
0
0
0
0
0
0
0.061856
0.101852
108
4
52
27
0.701031
0
0
0
0
0
0.231481
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
6e2ffb703f7d37de8531f31197b33cdcd1a9e1c2
17
py
Python
Compiler Design Lab/ChocoPy_LLVM_Compiler/custom_tests/IfExpr.py
Abhishek-Aditya-bs/Lab-Projects-and-Assignments
fd2681a1c7453367a4df1790e58afb312f13998c
[ "MIT" ]
null
null
null
Compiler Design Lab/ChocoPy_LLVM_Compiler/custom_tests/IfExpr.py
Abhishek-Aditya-bs/Lab-Projects-and-Assignments
fd2681a1c7453367a4df1790e58afb312f13998c
[ "MIT" ]
null
null
null
Compiler Design Lab/ChocoPy_LLVM_Compiler/custom_tests/IfExpr.py
Abhishek-Aditya-bs/Lab-Projects-and-Assignments
fd2681a1c7453367a4df1790e58afb312f13998c
[ "MIT" ]
null
null
null
5 if True else 10
17
17
0.764706
5
17
2.6
1
0
0
0
0
0
0
0
0
0
0
0.230769
0.235294
17
1
17
17
0.769231
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
284f0d6e28462adae12c1ed6e4bf40d44d4b762d
204
py
Python
cmp_command_acceptor/app/controllers/interfaces/CommandFactory.py
andrii-z4i/xmind-telegram
82e50ae0ada048b87a2c082bbdd4510e02cb3694
[ "MIT" ]
null
null
null
cmp_command_acceptor/app/controllers/interfaces/CommandFactory.py
andrii-z4i/xmind-telegram
82e50ae0ada048b87a2c082bbdd4510e02cb3694
[ "MIT" ]
16
2018-05-07T09:42:56.000Z
2018-11-19T06:05:51.000Z
cmp_command_acceptor/app/controllers/interfaces/CommandFactory.py
andrii-z4i/xmind-telegram
82e50ae0ada048b87a2c082bbdd4510e02cb3694
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod from shared.model.Command import Command class CommandFactory(ABC): @abstractmethod def prepare_command(self) -> Command: raise NotImplementedError()
22.666667
41
0.754902
22
204
6.954545
0.636364
0.222222
0
0
0
0
0
0
0
0
0
0
0.176471
204
8
42
25.5
0.910714
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
285dce87a285a443c4526d18957bbd35bf0d9bd1
212
py
Python
features/features_script.py
christophe-joyet/inphinity
a100fef2b6963c32c75f86e8d34c9a997dd4bba0
[ "MIT" ]
null
null
null
features/features_script.py
christophe-joyet/inphinity
a100fef2b6963c32c75f86e8d34c9a997dd4bba0
[ "MIT" ]
4
2019-03-05T09:34:02.000Z
2019-03-29T12:04:26.000Z
features/features_script.py
christophe-joyet/inphinity
a100fef2b6963c32c75f86e8d34c9a997dd4bba0
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- import sys sys.path.insert(0, './') from features import features_functions features_functions.createFeaturesFile('Bacterium_id_5190.csv', './features/CSV_files', 5190)
26.5
92
0.745283
28
212
5.464286
0.714286
0.222222
0
0
0
0
0
0
0
0
0
0.051546
0.084906
212
8
92
26.5
0.737113
0.179245
0
0
0
0
0.248555
0.121387
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
287fb9c5c9e90bb4c1fedf17ce8a0a513bde5d55
141
py
Python
observatoire-de-paris/Granotek/Appli Python/webcam_analyzer/main.py
S0nzero/iCreate2019
4126c1da4fcf226d43a064e1cd0081491dfc71a5
[ "MIT" ]
null
null
null
observatoire-de-paris/Granotek/Appli Python/webcam_analyzer/main.py
S0nzero/iCreate2019
4126c1da4fcf226d43a064e1cd0081491dfc71a5
[ "MIT" ]
null
null
null
observatoire-de-paris/Granotek/Appli Python/webcam_analyzer/main.py
S0nzero/iCreate2019
4126c1da4fcf226d43a064e1cd0081491dfc71a5
[ "MIT" ]
null
null
null
import tkinter from app import App # Create a window and pass it to the Application object App(tkinter.Tk(), "Decouvre ta planete", 0)
23.5
56
0.730496
23
141
4.478261
0.826087
0
0
0
0
0
0
0
0
0
0
0.00885
0.198582
141
6
57
23.5
0.902655
0.375887
0
0
0
0
0.231707
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
953599920cfa6c0881ce87344a1251d84c55c6b1
312
py
Python
python_programs/functions/printAsterix.py
Lioncat2002/CSE-programs
48c60a34343acd435f2c5a3e731d3f71bb54158c
[ "MIT" ]
1
2021-11-15T15:21:29.000Z
2021-11-15T15:21:29.000Z
python_programs/functions/printAsterix.py
Lioncat2002/CSE-programs
48c60a34343acd435f2c5a3e731d3f71bb54158c
[ "MIT" ]
null
null
null
python_programs/functions/printAsterix.py
Lioncat2002/CSE-programs
48c60a34343acd435f2c5a3e731d3f71bb54158c
[ "MIT" ]
2
2021-11-14T01:45:51.000Z
2021-11-15T15:21:08.000Z
''' Write a Python function named printAsterisks that is passed a positive integer value n, and prints out a line of n asterisks. If n is greater than 75, then only 75 asterisks should be displayed. ''' def printAsterix(n): return '*'*(n if n<75 else 75) print(printAsterix(int(input("Enter number: "))))
31.2
99
0.724359
51
312
4.431373
0.72549
0.026549
0
0
0
0
0
0
0
0
0
0.031128
0.176282
312
9
100
34.666667
0.848249
0.625
0
0
0
0
0.137615
0
0
0
0
0
0
1
0.333333
false
0
0
0.333333
0.666667
0.666667
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
1
0
5
957bf59b10b1661f5290871d5678d8405f25fbed
1,419
py
Python
swing_server/helpers.py
docker-swing/swing-server
48ee777f1464b45cfb9d316f728b4b84a64ecd3d
[ "Apache-2.0" ]
1
2021-06-06T11:56:49.000Z
2021-06-06T11:56:49.000Z
swing_server/helpers.py
docker-swing/swing-server
48ee777f1464b45cfb9d316f728b4b84a64ecd3d
[ "Apache-2.0" ]
null
null
null
swing_server/helpers.py
docker-swing/swing-server
48ee777f1464b45cfb9d316f728b4b84a64ecd3d
[ "Apache-2.0" ]
null
null
null
import os import re from werkzeug.security import check_password_hash, generate_password_hash version_regex = r'^\d+(?:\.\d+)+$' name_regex = r'^[a-z]+(?:-[a-z]+)*$' zip_regex = r'^[a-z]+(?:-[a-z]+)*\-\d+(?:\.\d+)+\.zip' def is_valid_filename(filename) -> bool: return bool(re.match(zip_regex, filename)) def is_valid_version(version) -> bool: return bool(re.match(version_regex, version)) def is_valid_chart_name(name) -> bool: return bool(re.match(name_regex, name)) def is_readable_dir(path: str) -> bool: return os.path.isdir(path) and os.access(path, os.R_OK) def to_dicts(arr): return [x.to_dict() for x in arr] def create_directory(path: str): if not os.path.exists(path): os.makedirs(path) def hash_password(password: str) -> str: """ Create a hash of the password using randomly generated salt. """ return generate_password_hash(password, salt_length=12) def check_password(password: str, hashed_password: str) -> bool: """ Compare the password against its hashed variant. """ return check_password_hash(hashed_password, password) def parse_archive_filename(filename): """ Read the filename of the requested archive and return both the chart name and the release version. """ chunks = filename[:-4].split('-') chart_name = '-'.join(chunks[:-1]) version = chunks[-1] return chart_name, version
23.65
73
0.673714
206
1,419
4.466019
0.34466
0.052174
0.032609
0.052174
0.090217
0.021739
0
0
0
0
0
0.004288
0.178295
1,419
59
74
24.050847
0.784734
0.146582
0
0
1
0
0.065461
0.033592
0
0
0
0
0
1
0.321429
false
0.178571
0.107143
0.178571
0.714286
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
5
95c9b2d794a55186aa36dbdd1eacfa83515abb49
6,818
py
Python
tests/test_audio.py
mlxyz/insynth
0d2ad6d6177944978e6d85990b9991a614d75b68
[ "MIT" ]
null
null
null
tests/test_audio.py
mlxyz/insynth
0d2ad6d6177944978e6d85990b9991a614d75b68
[ "MIT" ]
1
2021-12-06T20:46:20.000Z
2021-12-06T20:48:37.000Z
tests/test_audio.py
mlxyz/insynth
0d2ad6d6177944978e6d85990b9991a614d75b68
[ "MIT" ]
1
2021-12-06T20:45:50.000Z
2021-12-06T20:45:50.000Z
import unittest import numpy as np from insynth.perturbators.audio import AudioBackgroundWhiteNoisePerturbator, AudioPitchPerturbator, \ AudioClippingPerturbator, AudioVolumePerturbator, AudioEchoPerturbator, AudioShortNoisePerturbator, \ AudioImpulseResponsePerturbator, AudioBackgroundNoisePerturbator class TestAudio(unittest.TestCase): def _generate_random_audio(self): data = np.random.uniform(-1, 1, 44100) return data def test_AudioBackgroundWhiteNoisePerturbator_with_noise(self): input_signal = self._generate_random_audio() perturbator = AudioBackgroundWhiteNoisePerturbator(p=1.0, noise_prob=type('', (object,), {'rvs': lambda _: 1.0})(), noise_prob_args={}) output_signal,sample_rate = perturbator.apply((input_signal, 44100)) # assert arrays are not equal np.testing.assert_raises(AssertionError, np.testing.assert_array_equal, input_signal, output_signal) def test_AudioBackgroundWhiteNoisePerturbator_without_noise(self): input_signal = self._generate_random_audio() perturbator = AudioBackgroundWhiteNoisePerturbator(p=1.0, noise_prob=type('', (object,), {'rvs': lambda _: 0.0})(), noise_prob_args={}) output_signal,sample_rate = perturbator.apply((input_signal, 44100)) np.testing.assert_array_equal(input_signal, output_signal) def test_AudioPitchPerturbator_with_pitch_change(self): input_signal = self._generate_random_audio() perturbator = AudioPitchPerturbator(p=1.0, pitch_prob=type('', (object,), {'rvs': lambda _: 12})(), pitch_prob_args={}) output_signal,sample_rate = perturbator.apply((input_signal, 44100)) np.testing.assert_raises(AssertionError, np.testing.assert_array_equal, input_signal, output_signal) def test_AudioPitchPerturbator_without_pitch_change(self): input_signal = self._generate_random_audio() perturbator = AudioPitchPerturbator(p=1.0, pitch_prob=type('', (object,), {'rvs': lambda _: 0})(), pitch_prob_args={}) output_signal,sample_rate = perturbator.apply((input_signal, 44100)) np.testing.assert_array_almost_equal(input_signal, output_signal, 1) def test_AudioClippingPerturbator_with_clipping(self): input_signal = self._generate_random_audio() perturbator = AudioClippingPerturbator(p=1.0, clipping_prob=type('', (object,), {'rvs': lambda _: 50})(), clipping_prob_args={}) output_signal,sample_rate = perturbator.apply((input_signal, 44100)) np.testing.assert_raises(AssertionError, np.testing.assert_array_equal, input_signal, output_signal) def test_AudioClippingPerturbator_without_clipping(self): input_signal = self._generate_random_audio() perturbator = AudioClippingPerturbator(p=1.0, clipping_prob=type('', (object,), {'rvs': lambda _: 0})(), clipping_prob_args={}) output_signal,sample_rate = perturbator.apply((input_signal, 44100)) np.testing.assert_array_almost_equal(input_signal, output_signal, 1) def test_AudioVolumePerturbator_with_volume_change(self): input_signal = self._generate_random_audio() perturbator = AudioVolumePerturbator(p=1.0, volume_prob=type('', (object,), {'rvs': lambda _: 10})(), volume_prob_args={}) output_signal,sample_rate = perturbator.apply((input_signal, 44100)) np.testing.assert_raises(AssertionError, np.testing.assert_array_equal, input_signal, output_signal) def test_AudioVolumePerturbator_without_volume_change(self): input_signal = self._generate_random_audio() perturbator = AudioVolumePerturbator(p=1.0, volume_prob=type('', (object,), {'rvs': lambda _: 0})(), volume_prob_args={}) output_signal,sample_rate = perturbator.apply((input_signal, 44100)) np.testing.assert_array_almost_equal(input_signal, output_signal, 4) def test_AudioEchoPerturbator_with_echo(self): input_signal = self._generate_random_audio() perturbator = AudioEchoPerturbator(p=1.0, echo_prob=type('', (object,), {'rvs': lambda _: 1.0})(), echo_prob_args={}) output_signal,sample_rate = perturbator.apply((input_signal, 44100)) np.testing.assert_raises(AssertionError, np.testing.assert_array_equal, input_signal, output_signal) def test_AudioEchoPerturbator_without_echo(self): input_signal = self._generate_random_audio() perturbator = AudioEchoPerturbator(p=1.0, echo_prob=type('', (object,), {'rvs': lambda _: 0.0})(), echo_prob_args={}) output_signal,sample_rate = perturbator.apply((input_signal, 44100)) np.testing.assert_array_equal(output_signal, input_signal * 2) def test_AudioBackgroundNoisePerturbator_with_noise(self): input_signal = self._generate_random_audio() perturbator = AudioBackgroundNoisePerturbator(p=1.0, noise_types=['']) output_signal,sample_rate = perturbator.apply((input_signal, 44100)) np.testing.assert_raises(AssertionError, np.testing.assert_array_equal, input_signal, output_signal) def test_AudioShortNoisePerturbator_with_noise(self): input_signal = self._generate_random_audio() perturbator = AudioShortNoisePerturbator(p=1.0, noise_types=['']) output_signal,sample_rate = perturbator.apply((input_signal, 44100)) np.testing.assert_raises(AssertionError, np.testing.assert_array_equal, input_signal, output_signal) def test_AudioImpulseResponsePerturbator_with_noise(self): input_signal = self._generate_random_audio() perturbator = AudioImpulseResponsePerturbator(p=1.0, impulse_types=['']) output_signal,sample_rate = perturbator.apply((input_signal, 44100)) np.testing.assert_raises(AssertionError, np.testing.assert_array_equal, input_signal, output_signal) if __name__ == '__main__': unittest.main()
51.263158
116
0.63919
663
6,818
6.19457
0.110106
0.104456
0.076698
0.060141
0.779888
0.779888
0.779158
0.778184
0.778184
0.778184
0
0.023771
0.265767
6,818
132
117
51.651515
0.796644
0.00396
0
0.583333
0
0
0.005597
0
0
0
0
0
0.135417
1
0.145833
false
0
0.03125
0
0.197917
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
95ddc37bb84b1010a5d27edc321a76e524c3e67d
250
py
Python
apps/publications/translation.py
remocrevo/celus
682b13168eb475d7f970502113e756e40a899877
[ "MIT" ]
7
2020-02-20T13:24:40.000Z
2022-01-28T19:36:04.000Z
apps/publications/translation.py
techlib/czechelib-stats
ca132e326af0924740a525710474870b1fb5fd37
[ "MIT" ]
15
2020-04-28T13:09:02.000Z
2021-11-03T15:21:24.000Z
apps/publications/translation.py
techlib/czechelib-stats
ca132e326af0924740a525710474870b1fb5fd37
[ "MIT" ]
4
2020-02-20T13:48:30.000Z
2021-03-19T00:33:34.000Z
from modeltranslation.translator import translator, TranslationOptions from .models import Platform class PlatformTranslationOptions(TranslationOptions): fields = ('name', 'provider') translator.register(Platform, PlatformTranslationOptions)
25
70
0.828
20
250
10.35
0.65
0
0
0
0
0
0
0
0
0
0
0
0.1
250
9
71
27.777778
0.92
0
0
0
0
0
0.048
0
0
0
0
0
0
1
0
false
0
0.4
0
0.8
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
250677022d1e228c75eb5d1c4ef6c49f59a1155f
322
py
Python
alphatrade/__init__.py
algo2win/alpha_trade
85dc53e8f3a7fcc6a80f84a1e57a9fdf48022c72
[ "MIT" ]
21
2020-10-24T11:37:03.000Z
2022-03-22T07:24:15.000Z
alphatrade/__init__.py
algo2win/alpha_trade
85dc53e8f3a7fcc6a80f84a1e57a9fdf48022c72
[ "MIT" ]
27
2020-10-24T18:41:34.000Z
2022-03-24T06:09:44.000Z
alphatrade/__init__.py
algo2win/alpha_trade
85dc53e8f3a7fcc6a80f84a1e57a9fdf48022c72
[ "MIT" ]
14
2020-10-24T22:19:25.000Z
2022-03-13T14:46:53.000Z
from __future__ import unicode_literals, absolute_import from .alphatrade import AlphaTrade, TransactionType, OrderType, ProductType, LiveFeedType, Instrument from alphatrade import exceptions __all__ = ['AlphaTrade', 'TransactionType', 'OrderType', 'ProductType', 'LiveFeedType', 'Instrument', 'exceptions']
40.25
101
0.782609
28
322
8.642857
0.5
0.115702
0.165289
0.371901
0.553719
0.553719
0
0
0
0
0
0
0.124224
322
7
102
46
0.858156
0
0
0
0
0
0.23913
0
0
0
0
0
0
1
0
false
0
0.6
0
0.6
0
1
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
256938a208ce388b46e2c3b15efa03a6b341bbcd
127
py
Python
cal/admin.py
yangd01234/up-two-date
8a2e044b2fd4fb53ea7fceef65955035b320e426
[ "MIT" ]
null
null
null
cal/admin.py
yangd01234/up-two-date
8a2e044b2fd4fb53ea7fceef65955035b320e426
[ "MIT" ]
10
2019-12-04T23:25:35.000Z
2022-02-10T09:19:45.000Z
cal/admin.py
yangd01234/up-two-date
8a2e044b2fd4fb53ea7fceef65955035b320e426
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Time # register models to show up on admin page admin.site.register(Time)
25.4
42
0.80315
21
127
4.857143
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.141732
127
5
43
25.4
0.93578
0.314961
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
c2b6888637a7a14175544804420974aebc286e43
571
py
Python
qcnpy/costfunction.py
KristianWold/qcnpy
a77d588ec2c0b28c8f02ec24602d07013bedd9d4
[ "MIT" ]
null
null
null
qcnpy/costfunction.py
KristianWold/qcnpy
a77d588ec2c0b28c8f02ec24602d07013bedd9d4
[ "MIT" ]
null
null
null
qcnpy/costfunction.py
KristianWold/qcnpy
a77d588ec2c0b28c8f02ec24602d07013bedd9d4
[ "MIT" ]
null
null
null
import numpy as np class MSE: def __call__(self, y_pred, y): return 0.5 * np.mean((y_pred - y)**2) def derivative(self, y_pred, y): return y_pred - y class CrossEntropy: def __call__(self, y_pred, y): return -np.sum(y * np.log(y_pred)) def derivative(self, y_pred, y): return (y_pred - y) / (y_pred * (1 - y_pred)) class NoCost: def __call__(self, y_pred, y): return y_pred def derivative(self, y_pred, y): n_samples, n_targets = y_pred.shape return np.ones((n_samples, n_targets))
21.148148
53
0.602452
93
571
3.376344
0.290323
0.22293
0.171975
0.191083
0.547771
0.547771
0.547771
0.328025
0.22293
0.22293
0
0.009639
0.273205
571
26
54
21.961538
0.746988
0
0
0.352941
0
0
0
0
0
0
0
0
0
1
0.352941
false
0
0.058824
0.294118
0.941176
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
c2cfa8ec3c9192d557cd889ec1226d91cd6ce827
2,054
py
Python
ciclo1_python/ucaldas/MisionTIC_UCaldas_Ciclo1/Andres Felipe Escallon Portilla/Semana2/Talleres/info_add_talleres/Tallersemana203/main.py
felipeescallon/mision_tic_2022
20496fc40b18d2e98114d6362928f34fde41aaae
[ "CC0-1.0" ]
7
2021-07-05T21:25:50.000Z
2021-11-09T11:09:41.000Z
ciclo1_python/ucaldas/MisionTIC_UCaldas_Ciclo1/Andres Felipe Escallon Portilla/Semana2/Talleres/info_add_talleres/Tallersemana203/main.py
felipeescallon/mision_tic_2022
20496fc40b18d2e98114d6362928f34fde41aaae
[ "CC0-1.0" ]
null
null
null
ciclo1_python/ucaldas/MisionTIC_UCaldas_Ciclo1/Andres Felipe Escallon Portilla/Semana2/Talleres/info_add_talleres/Tallersemana203/main.py
felipeescallon/mision_tic_2022
20496fc40b18d2e98114d6362928f34fde41aaae
[ "CC0-1.0" ]
null
null
null
""" Taller 2.3 Distancia mas corta # Tu nombre aquí Mayo xx-XX """ # Definición de Funciones (Dividir) #====================================================================== # E S P A C I O D E T R A B A J O A L U M N O # ===================================================================== def calcular_distancia_c1_a1(xc1,yc1,xa1,ya1): #TODO: comentarios #TODO: instrucciones return #------------------------------------------- def calcular_distancia_a1_ch(xa1,ya1,xch,ych): #TODO: comentarios #TODO: instrucciones return #------------------------------------------- def calcular_distancia_ch_a2(xch,ych,xa2,ya2): #TODO: comentarios #TODO: instrucciones return #------------------------------------------- def calcular_distancia_a2_c2(xa2,ya2,xc2,yc2): #TODO: comentarios #TODO: instrucciones return #------------------------------------------- def obtener_distancia_total (d1,d2,d3,d4): #TODO: comentarios #TODO: instrucciones return #====================================================================== # E S P A C I O P R E _ _ C O N F I G U R A D O # ===================================================================== #====================================================================== # Algoritmo principal Punto de entrada a la aplicación (Conquistar) # ===================================================================== #lectura coordenadas celular 1 #TODO: instrucciones #lectura coordenadas antena 1 #TODO: instrucciones #lectura coordenadas central holi #TODO: instrucciones #lectura coordenadas antena 2 #TODO: instrucciones #lectura coordenadas celular 1 #TODO: una vez haga os puntos anteriores quite el simbolo de comentarios # y organice la identación #d1=calcular_distancia_c1_a1(xc1,yc1,xa1,ya1) #d2=calcular_distancia_a1_ch(xa1,ya1,xch,ych) #d3=calcular_distancia_ch_a2(xch,ych,xa2,ya2) #d4=calcular_distancia_a2_c2(xa2,ya2,xc2,yc2) #distancia_total=obtener_distancia_total (d1,d2,d3,d4) #print("La distancia otal es",distancia_total)
30.656716
72
0.519474
233
2,054
4.44206
0.381974
0.147826
0.091787
0.154589
0.687923
0.483092
0.443478
0.373913
0
0
0
0.030168
0.12853
2,054
66
73
31.121212
0.548045
0.802337
0
0.5
0
0
0
0
0
0
0
0.015152
0
1
0.5
false
0
0
0.5
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
1
1
0
0
5
c2d93bc1c24f5d226f84ab5033cafc2f5534b822
198
py
Python
app/constants/ignore.py
heart-your-health/valve
802fcd890da6fcdb2e8ff88b3be0f0b8277bec5c
[ "MIT" ]
null
null
null
app/constants/ignore.py
heart-your-health/valve
802fcd890da6fcdb2e8ff88b3be0f0b8277bec5c
[ "MIT" ]
2
2018-05-21T21:27:11.000Z
2020-03-12T19:32:57.000Z
app/constants/ignore.py
sageleaf/me
802fcd890da6fcdb2e8ff88b3be0f0b8277bec5c
[ "MIT" ]
1
2018-04-30T19:04:26.000Z
2018-04-30T19:04:26.000Z
ignore_validation = { "/api/v1/profile": ("POST", "PUT"), "/api/v1/exchange": "GET", "/api/v1/validation": "GET", "/api/v1/meals/search" : "GET", "/api/v1/meals/browse" : "GET" }
28.285714
39
0.545455
25
198
4.28
0.48
0.233645
0.224299
0.242991
0
0
0
0
0
0
0
0.030864
0.181818
198
7
40
28.285714
0.62963
0
0
0
0
0
0.542714
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
6c2fe969de5ffd3d06d8f78819c59e7da7ccfa78
156
py
Python
UnitTests/UnitTestMissionPlanner/bin/Debug/Scripts/rc.py
EduardoAzoia/Integrador
88ba0371685f9aa0efe00dbc06f10881445197b3
[ "Apache-2.0" ]
null
null
null
UnitTests/UnitTestMissionPlanner/bin/Debug/Scripts/rc.py
EduardoAzoia/Integrador
88ba0371685f9aa0efe00dbc06f10881445197b3
[ "Apache-2.0" ]
null
null
null
UnitTests/UnitTestMissionPlanner/bin/Debug/Scripts/rc.py
EduardoAzoia/Integrador
88ba0371685f9aa0efe00dbc06f10881445197b3
[ "Apache-2.0" ]
null
null
null
 print 'Start Script' for chan in range(1,9): Script.SendRC(chan,1500,False) Script.SendRC(3,1500,True) Script.Sleep(1000) Script.SendRC(3,1100,True)
17.333333
34
0.730769
28
156
4.107143
0.642857
0.313043
0.226087
0
0
0
0
0
0
0
0
0.143885
0.108974
156
9
35
17.333333
0.676259
0
0
0
0
0
0.077922
0
0
0
0
0
0
0
null
null
0
0
null
null
0.166667
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
5
6c4cc5fd9dbd2922188443efa2531eb19767642b
106
py
Python
goods/cleaning.py
DroppinDangles/inventory-tracker
ae1f15eecafb240f1d6535d6f3e37d9356bf20e9
[ "MIT" ]
null
null
null
goods/cleaning.py
DroppinDangles/inventory-tracker
ae1f15eecafb240f1d6535d6f3e37d9356bf20e9
[ "MIT" ]
null
null
null
goods/cleaning.py
DroppinDangles/inventory-tracker
ae1f15eecafb240f1d6535d6f3e37d9356bf20e9
[ "MIT" ]
null
null
null
#import goods packages from goods.good import Good class Cleaning(Good): def __init__(self): pass
17.666667
28
0.735849
15
106
4.933333
0.733333
0
0
0
0
0
0
0
0
0
0
0
0.188679
106
6
29
17.666667
0.860465
0.198113
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0.25
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
5
6c510b058b55ba13950201ac6c6f7a4545f2a249
73
py
Python
Discord_Together/__init__.py
Chrovo/Discord-Together.py
b1a947a17655009a6cc009b883db50e299c742c4
[ "MIT" ]
8
2021-06-28T14:01:43.000Z
2022-03-26T20:56:09.000Z
Discord_Together/__init__.py
Chrovo/Discord-Together.py
b1a947a17655009a6cc009b883db50e299c742c4
[ "MIT" ]
2
2021-06-18T19:40:32.000Z
2021-06-18T19:42:10.000Z
Discord_Together/__init__.py
Chrovo/Discord-Together.py
b1a947a17655009a6cc009b883db50e299c742c4
[ "MIT" ]
2
2021-06-16T20:05:29.000Z
2021-06-18T19:28:13.000Z
from .discordtogether import DiscordTogether from .exceptions import *
24.333333
45
0.821918
7
73
8.571429
0.571429
0
0
0
0
0
0
0
0
0
0
0
0.136986
73
2
46
36.5
0.952381
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
6c5a6c10f21aad21a0a1e2a9d78d12b54ab0ac57
187
py
Python
cnns/nnlib/attacks/empty.py
anonymous-user-commits/perturb-net
66fc7c4a1234fa34b92bcc85751f0a6e23d80a23
[ "MIT" ]
1
2018-03-25T13:19:46.000Z
2018-03-25T13:19:46.000Z
cnns/nnlib/attacks/empty.py
anonymous-user-commits/perturb-net
66fc7c4a1234fa34b92bcc85751f0a6e23d80a23
[ "MIT" ]
null
null
null
cnns/nnlib/attacks/empty.py
anonymous-user-commits/perturb-net
66fc7c4a1234fa34b92bcc85751f0a6e23d80a23
[ "MIT" ]
null
null
null
import foolbox # Attack the image. class EmptyAttack(foolbox.attacks.Attack): def __call__(self, input_or_adv, label=None, unpack=True, **kwargs): return input_or_adv.copy()
26.714286
72
0.73262
26
187
4.961538
0.807692
0.108527
0.155039
0
0
0
0
0
0
0
0
0
0.15508
187
7
73
26.714286
0.816456
0.090909
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0.25
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
667ad4f807388231aefaca9c917dc46673f00bcf
77
py
Python
tgmsg/__init__.py
KolosDan/tgmsg
1e735afe999f88e09fe9801e9c36ba763125dca5
[ "MIT" ]
null
null
null
tgmsg/__init__.py
KolosDan/tgmsg
1e735afe999f88e09fe9801e9c36ba763125dca5
[ "MIT" ]
null
null
null
tgmsg/__init__.py
KolosDan/tgmsg
1e735afe999f88e09fe9801e9c36ba763125dca5
[ "MIT" ]
1
2022-01-25T12:57:26.000Z
2022-01-25T12:57:26.000Z
from .tg_client import TelegramClient from .models import keyboards, messages
38.5
39
0.857143
10
77
6.5
0.8
0
0
0
0
0
0
0
0
0
0
0
0.103896
77
2
39
38.5
0.942029
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
66915643aad9374fc2ace7ca20a618487db923d2
135
py
Python
lattedb/correlator/admin.py
callat-qcd/lattedb
75c06748f3d59332a84ec1b5794c215c5974a46f
[ "BSD-3-Clause" ]
1
2019-12-11T02:33:23.000Z
2019-12-11T02:33:23.000Z
lattedb/correlator/admin.py
callat-qcd/lattedb
75c06748f3d59332a84ec1b5794c215c5974a46f
[ "BSD-3-Clause" ]
10
2020-01-29T17:06:01.000Z
2021-05-31T14:41:19.000Z
lattedb/correlator/admin.py
callat-qcd/lattedb
75c06748f3d59332a84ec1b5794c215c5974a46f
[ "BSD-3-Clause" ]
null
null
null
"""Admin view for correlation functions """ from espressodb.base.admin import register_admins register_admins("lattedb.correlator")
16.875
49
0.8
16
135
6.625
0.8125
0.264151
0
0
0
0
0
0
0
0
0
0
0.103704
135
7
50
19.285714
0.876033
0.266667
0
0
0
0
0.2
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
66c9e40227d7c9a8ab2a69b3493ee6bf8df86111
133
py
Python
config.py
oldcryptogeek/coinjerk-btcp
76d16b6c890bf1caa155ff07bca162526db08fc7
[ "MIT" ]
8
2020-09-22T03:40:31.000Z
2021-04-17T15:17:03.000Z
config.py
Zaxounette/coinjerk-btcp
76d16b6c890bf1caa155ff07bca162526db08fc7
[ "MIT" ]
5
2021-01-10T23:36:12.000Z
2022-02-19T06:46:18.000Z
config.py
Zaxounette/coinjerk-btcp
76d16b6c890bf1caa155ff07bca162526db08fc7
[ "MIT" ]
2
2021-01-03T23:36:39.000Z
2021-02-13T15:45:09.000Z
import os class Config(object): ENABLE_USER_REGISTRATION = \ (os.getenv("ENABLE_USER_REGISTRATION").lower() == "true")
19
65
0.676692
15
133
5.733333
0.733333
0.232558
0.511628
0
0
0
0
0
0
0
0
0
0.180451
133
6
66
22.166667
0.788991
0
0
0
0
0
0.210526
0.180451
0
0
0
0
0
1
0
false
0
0.25
0
0.75
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
5
66e7ec9a040eb2110e33b1cd4b9d3d9c80b71844
36
py
Python
target_athena/tests/__init__.py
beubeu13220/target-athena
ebe012bb6694f3685e4efa616a0acbd75c982fc5
[ "Apache-2.0" ]
4
2021-09-08T17:41:57.000Z
2021-12-22T03:30:06.000Z
target_athena/tests/__init__.py
beubeu13220/target-athena
ebe012bb6694f3685e4efa616a0acbd75c982fc5
[ "Apache-2.0" ]
19
2021-05-28T21:48:41.000Z
2021-08-23T04:17:01.000Z
target_athena/tests/__init__.py
beubeu13220/target-athena
ebe012bb6694f3685e4efa616a0acbd75c982fc5
[ "Apache-2.0" ]
7
2021-12-02T19:27:57.000Z
2022-03-09T08:23:12.000Z
"""Test suite for target-athena."""
18
35
0.666667
5
36
4.8
1
0
0
0
0
0
0
0
0
0
0
0
0.111111
36
1
36
36
0.75
0.805556
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
dd2d74d24d8f464c3d10a371dd62322793a10018
46
py
Python
cobra/main.py
Matheusblz/learning_things
69c16d30db8a79dffd5b83e91070aec7ab376b8a
[ "MIT" ]
null
null
null
cobra/main.py
Matheusblz/learning_things
69c16d30db8a79dffd5b83e91070aec7ab376b8a
[ "MIT" ]
null
null
null
cobra/main.py
Matheusblz/learning_things
69c16d30db8a79dffd5b83e91070aec7ab376b8a
[ "MIT" ]
null
null
null
print('Olá, mundo!') print('A cobra fumou!!')
15.333333
24
0.630435
7
46
4.142857
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.108696
46
2
25
23
0.707317
0
0
0
0
0
0.565217
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
dd3f43f53c6543147a958041e4bdd51a4efe7ce0
123
py
Python
alexandria/__init__.py
HarkonenBade/alexandria
2e16dbf2d11c7928d0a661b28bfc2552b68cb3fe
[ "MIT" ]
null
null
null
alexandria/__init__.py
HarkonenBade/alexandria
2e16dbf2d11c7928d0a661b28bfc2552b68cb3fe
[ "MIT" ]
null
null
null
alexandria/__init__.py
HarkonenBade/alexandria
2e16dbf2d11c7928d0a661b28bfc2552b68cb3fe
[ "MIT" ]
null
null
null
from __future__ import absolute_import from flask import Flask app = Flask(__name__) from . import db from . import api
13.666667
38
0.780488
18
123
4.833333
0.5
0.229885
0
0
0
0
0
0
0
0
0
0
0.178862
123
8
39
15.375
0.861386
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.8
0
0.8
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
dd557a81fe3c9e869c8ff50c94a373fc86815309
99
py
Python
src/__init__.py
Kobie-Kirven/SCiMS
7e683b241f375277a38ee482e46b8dcc3a7cf186
[ "MIT" ]
null
null
null
src/__init__.py
Kobie-Kirven/SCiMS
7e683b241f375277a38ee482e46b8dcc3a7cf186
[ "MIT" ]
null
null
null
src/__init__.py
Kobie-Kirven/SCiMS
7e683b241f375277a38ee482e46b8dcc3a7cf186
[ "MIT" ]
null
null
null
# Author: Kobie Kirven # Davenport Lab - Penn State University # Date: 9-2-2021 from src import *
16.5
39
0.717172
15
99
4.733333
1
0
0
0
0
0
0
0
0
0
0
0.075
0.191919
99
5
40
19.8
0.8125
0.737374
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
dd8846de012d3b7b86af081fcef6f01877c3a6ca
187
py
Python
src/impacts_tools/p3.py
torimcd/impacts_tools
c5b78721e3f69077586e0778f6c961747a9d1bd4
[ "BSD-3-Clause" ]
1
2021-09-28T23:14:04.000Z
2021-09-28T23:14:04.000Z
src/impacts_tools/p3.py
torimcd/impacts_tools
c5b78721e3f69077586e0778f6c961747a9d1bd4
[ "BSD-3-Clause" ]
3
2021-09-28T22:50:32.000Z
2022-01-13T22:28:18.000Z
src/impacts_tools/p3.py
torimcd/impacts_tools
c5b78721e3f69077586e0778f6c961747a9d1bd4
[ "BSD-3-Clause" ]
null
null
null
""" Classes for IMPACTS P3 Instruments """ class P3(object): """ """ def __init__(self, filepath, date): pass def readfile(self, filepath, ): pass
12.466667
39
0.540107
19
187
5.105263
0.736842
0.247423
0
0
0
0
0
0
0
0
0
0.015873
0.326203
187
15
40
12.466667
0.753968
0.181818
0
0.4
0
0
0
0
0
0
0
0
0
1
0.4
false
0.4
0
0
0.6
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
5
dd9305be7ca67706c1fd46c1c8375a70d2de7d3d
94
py
Python
parts/edag_transistor.py
baryluk/edag
675107e2078bcecb30768a5e96c7431104352024
[ "BSL-1.0" ]
null
null
null
parts/edag_transistor.py
baryluk/edag
675107e2078bcecb30768a5e96c7431104352024
[ "BSL-1.0" ]
null
null
null
parts/edag_transistor.py
baryluk/edag
675107e2078bcecb30768a5e96c7431104352024
[ "BSL-1.0" ]
null
null
null
#!/usr/bin/env python3 # Transistors. "2N3904" "2SC1815" # NPN? "2SA9012" "2SA1015" # PNP?
11.75
22
0.638298
11
94
5.454545
1
0
0
0
0
0
0
0
0
0
0
0.265823
0.159574
94
7
23
13.428571
0.493671
0.542553
0
0
0
0
0.586957
0
0
0
0
0
0
1
0
true
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
06d40e812ad2b3f573602b965f409bc16890ec0c
147
py
Python
backend/application/models/authbase/__init__.py
zxjlm/Christin
37d7a2d2a7e388a86625128729c31322da01c3cf
[ "MIT" ]
3
2021-07-07T23:32:22.000Z
2021-07-28T06:41:15.000Z
backend/application/models/authbase/__init__.py
zxjlm/Christin
37d7a2d2a7e388a86625128729c31322da01c3cf
[ "MIT" ]
1
2021-06-06T03:24:44.000Z
2021-06-06T03:24:44.000Z
backend/application/models/authbase/__init__.py
zxjlm/Christin
37d7a2d2a7e388a86625128729c31322da01c3cf
[ "MIT" ]
2
2021-06-06T00:50:58.000Z
2021-06-06T05:04:16.000Z
from .resource import Resource from .resource_type import ResourceType from .role import Role from .user import User from .logs import AnalysesLog
24.5
39
0.829932
21
147
5.761905
0.428571
0.198347
0
0
0
0
0
0
0
0
0
0
0.136054
147
5
40
29.4
0.952756
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
6637a71c694404bcab4340b6cde23522fe6b6aad
75
py
Python
neko/trainers/__init__.py
SangheonOhWDC/neko
041a35d883ff7f7ad10ab8841c12a739fc2a73bc
[ "MIT" ]
11
2021-05-05T07:03:57.000Z
2021-12-10T04:48:55.000Z
neko/trainers/__init__.py
byin-cwi/neko
9a09cc5585f6a5f1cb25fefc88cc3ab461b8cb12
[ "MIT" ]
1
2021-08-02T19:02:30.000Z
2021-08-10T23:13:05.000Z
neko/trainers/__init__.py
byin-cwi/neko
9a09cc5585f6a5f1cb25fefc88cc3ab461b8cb12
[ "MIT" ]
2
2021-06-25T02:37:18.000Z
2022-02-18T09:29:20.000Z
from .base import Trainer from .gradcomp import GradientsComparisonTrainer
25
48
0.866667
8
75
8.125
0.75
0
0
0
0
0
0
0
0
0
0
0
0.106667
75
2
49
37.5
0.970149
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
6650ece9eff653fec0a780c57d465c6ed9f75645
63
py
Python
labs/code/packages/usemymath.py
Linlin15963/msds501
0bcfa7f59a4e9b2d71db2c5973eb04c1ae60e72f
[ "MIT" ]
86
2018-08-14T20:13:32.000Z
2022-03-21T22:30:15.000Z
labs/code/packages/usemymath.py
Linlin15963/msds501
0bcfa7f59a4e9b2d71db2c5973eb04c1ae60e72f
[ "MIT" ]
2
2017-07-21T02:02:25.000Z
2017-09-13T03:19:09.000Z
labs/code/packages/usemymath.py
Linlin15963/msds501
0bcfa7f59a4e9b2d71db2c5973eb04c1ae60e72f
[ "MIT" ]
99
2015-02-28T20:10:38.000Z
2018-07-30T20:24:43.000Z
from mymath import * print(pi) print(pow2(0)) print(pow2(10))
10.5
20
0.698413
11
63
4
0.727273
0.409091
0
0
0
0
0
0
0
0
0
0.090909
0.126984
63
5
21
12.6
0.709091
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.25
0
0.25
0.75
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
66535de2732e1d5ab114c90ef0998c9ad4943553
56
py
Python
medimodule/Brain/models/__init__.py
cuchoco/MI2RLNet
4ef84e641705df9b10e627c701eb0c9ed924a82a
[ "Apache-2.0" ]
9
2021-02-25T23:10:17.000Z
2022-02-14T11:48:11.000Z
medimodule/Brain/models/__init__.py
cuchoco/MI2RLNet
4ef84e641705df9b10e627c701eb0c9ed924a82a
[ "Apache-2.0" ]
null
null
null
medimodule/Brain/models/__init__.py
cuchoco/MI2RLNet
4ef84e641705df9b10e627c701eb0c9ed924a82a
[ "Apache-2.0" ]
7
2021-02-22T12:20:24.000Z
2022-03-07T04:56:53.000Z
from .mri_bet import MRIBET from .bbb_seg import BBBSeg
28
28
0.821429
10
56
4.4
0.8
0
0
0
0
0
0
0
0
0
0
0
0.142857
56
2
29
28
0.916667
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
b0764c98279ab2a712c4cdfcc31812582f80a408
119
py
Python
Chapter01/do_something.py
ibiscum/Python-Parallel-Programming-Cookbook-Second-Edition
8fd583019778b4d797d4f948d091b5564e23f732
[ "MIT" ]
null
null
null
Chapter01/do_something.py
ibiscum/Python-Parallel-Programming-Cookbook-Second-Edition
8fd583019778b4d797d4f948d091b5564e23f732
[ "MIT" ]
null
null
null
Chapter01/do_something.py
ibiscum/Python-Parallel-Programming-Cookbook-Second-Edition
8fd583019778b4d797d4f948d091b5564e23f732
[ "MIT" ]
null
null
null
import random def do_something(count, out_list): for i in range(count): out_list.append(random.random())
17
40
0.689076
18
119
4.388889
0.722222
0.202532
0.303797
0
0
0
0
0
0
0
0
0
0.201681
119
6
41
19.833333
0.831579
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
5
b0aadf625334de18a075e7eba79d0b2a34ce5efe
66
py
Python
sklearn_export/__init__.py
zwelz3/sklearn-export
6692d94f8a592e8f3c9f21d672d8aa814e4d1473
[ "MIT" ]
4
2019-03-02T14:18:36.000Z
2021-11-09T08:10:32.000Z
sklearn_export/__init__.py
zwelz3/sklearn-export
6692d94f8a592e8f3c9f21d672d8aa814e4d1473
[ "MIT" ]
3
2019-05-03T03:54:36.000Z
2022-02-14T03:57:24.000Z
sklearn_export/__init__.py
zwelz3/sklearn-export
6692d94f8a592e8f3c9f21d672d8aa814e4d1473
[ "MIT" ]
1
2022-02-21T00:46:29.000Z
2022-02-21T00:46:29.000Z
# -*- coding: utf-8 -*- from sklearn_export.Export import Export
16.5
40
0.69697
9
66
5
0.777778
0
0
0
0
0
0
0
0
0
0
0.017857
0.151515
66
3
41
22
0.785714
0.318182
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
b0ad745de92261706fc5d3fa1e348b03bc4dbca7
268
py
Python
tests/bindings/test_starimport.py
garyo/godot-python
f3d70f4fcf88c865fc7b3b7ac9cf09f8c503a1aa
[ "MIT" ]
null
null
null
tests/bindings/test_starimport.py
garyo/godot-python
f3d70f4fcf88c865fc7b3b7ac9cf09f8c503a1aa
[ "MIT" ]
null
null
null
tests/bindings/test_starimport.py
garyo/godot-python
f3d70f4fcf88c865fc7b3b7ac9cf09f8c503a1aa
[ "MIT" ]
null
null
null
# This test is in it own file to protect other tests from the `import *` side effects from godot.bindings import * def test_starimport(): assert issubclass(Node, Object) assert isinstance(PhysicsServer, _PhysicsServer) assert isinstance(Engine, _Engine)
29.777778
85
0.757463
35
268
5.714286
0.771429
0.16
0
0
0
0
0
0
0
0
0
0
0.175373
268
8
86
33.5
0.904977
0.309701
0
0
0
0
0
0
0
0
0
0
0.6
1
0.2
true
0
0.4
0
0.6
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
1
0
1
0
1
0
0
5
b0045483f9d153ad4551abacdaaaa89fcb63f7cb
97
py
Python
tests/test_utils/constants.py
DenverCoder1/godel-number-to-code
1f4fc3d5eba97ca45411302a67db79c77e44e19d
[ "MIT" ]
null
null
null
tests/test_utils/constants.py
DenverCoder1/godel-number-to-code
1f4fc3d5eba97ca45411302a67db79c77e44e19d
[ "MIT" ]
null
null
null
tests/test_utils/constants.py
DenverCoder1/godel-number-to-code
1f4fc3d5eba97ca45411302a67db79c77e44e19d
[ "MIT" ]
1
2022-01-18T19:51:33.000Z
2022-01-18T19:51:33.000Z
# program numbers BASIC = 140624 GOTO = 158250875866513204219300194287615 VARIABLES = 6198727823
19.4
40
0.835052
8
97
10.125
1
0
0
0
0
0
0
0
0
0
0
0.576471
0.123711
97
4
41
24.25
0.376471
0.154639
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
b05e498a8d968ae962d4f71fd69ee85e50d36b39
494
py
Python
osOperate.py
yvanwangl/pythonLesson
5b3892465a321b9f749ffda623f5871656bde608
[ "MIT" ]
null
null
null
osOperate.py
yvanwangl/pythonLesson
5b3892465a321b9f749ffda623f5871656bde608
[ "MIT" ]
null
null
null
osOperate.py
yvanwangl/pythonLesson
5b3892465a321b9f749ffda623f5871656bde608
[ "MIT" ]
null
null
null
import os import shutil # print(os.path.join('C:\\Users\\hanlu', 'testDir')) # os.mkdir('C:\\Users\\hanlu\\testDir') # os.rmdir('C:\\Users\\hanlu\\testDir') # os.path.split('C:\\Users\\hanlu\\testDir') # print([x for x in os.listdir('.') if os.path.isdir(x)]) # # shutil.copyfile('writeFiles/writeTemp.txt', 'writeFiles/copy.txt') # # print([x for x in os.listdir('.') if os.path.isfile(x) and os.path.splitext(x)[1] == '.py']) # os.rename('copy.txt', 'rename.txt') os.remove('rename.txt')
27.444444
94
0.643725
80
494
3.975
0.3875
0.09434
0.138365
0.226415
0.371069
0.18239
0.18239
0.18239
0.18239
0.18239
0
0.002232
0.093117
494
17
95
29.058824
0.707589
0.852227
0
0
0
0
0.16129
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
c686dc0ec870c52b31b9b183d7d17b8fadd17ee2
145
py
Python
trainer/__init__.py
Y-modify/DeepL2
e8ba0ad302ad8ed208b70695b6015f8c75a0496c
[ "MIT" ]
2
2019-02-17T03:54:52.000Z
2019-02-17T04:06:16.000Z
trainer/__init__.py
Y-modify/deepl2
e8ba0ad302ad8ed208b70695b6015f8c75a0496c
[ "MIT" ]
20
2019-01-06T09:15:11.000Z
2019-01-18T03:12:33.000Z
trainer/__init__.py
Y-modify/deepl2
e8ba0ad302ad8ed208b70695b6015f8c75a0496c
[ "MIT" ]
1
2019-01-06T09:12:52.000Z
2019-01-06T09:12:52.000Z
from .train import train from .preview import preview from logging import NullHandler, getLogger getLogger(__name__).addHandler(NullHandler())
20.714286
45
0.82069
17
145
6.764706
0.529412
0
0
0
0
0
0
0
0
0
0
0
0.110345
145
6
46
24.166667
0.891473
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.75
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
c6d5e641867ad432cb26ed2b1906de1f4824015e
42
py
Python
tahoe_scorm/exceptions.py
appsembler/tahoe-scorm
f5ad868d1ffc5c0de3b568319c808197e17b42e5
[ "MIT" ]
null
null
null
tahoe_scorm/exceptions.py
appsembler/tahoe-scorm
f5ad868d1ffc5c0de3b568319c808197e17b42e5
[ "MIT" ]
2
2020-11-04T15:15:42.000Z
2021-02-04T10:30:57.000Z
tahoe_scorm/exceptions.py
appsembler/tahoe-scorm
f5ad868d1ffc5c0de3b568319c808197e17b42e5
[ "MIT" ]
null
null
null
class ScormException(Exception): pass
14
32
0.761905
4
42
8
1
0
0
0
0
0
0
0
0
0
0
0
0.166667
42
2
33
21
0.914286
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
af2292e1057b17f596e14c6a0dfaa0d670e34e3a
66
py
Python
src/__init__.py
hCraker/geocat-viz
7188ffdea3121d3368df2d1246e29d2d5825164c
[ "Apache-2.0" ]
null
null
null
src/__init__.py
hCraker/geocat-viz
7188ffdea3121d3368df2d1246e29d2d5825164c
[ "Apache-2.0" ]
null
null
null
src/__init__.py
hCraker/geocat-viz
7188ffdea3121d3368df2d1246e29d2d5825164c
[ "Apache-2.0" ]
null
null
null
from ._version import __version__ from . import util import cmaps
16.5
33
0.818182
9
66
5.444444
0.555556
0
0
0
0
0
0
0
0
0
0
0
0.151515
66
3
34
22
0.875
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
af3e20330e2685bb6b5e520e16d2cf0079d77109
501
py
Python
source/__init__.py
ml6jason/imgflow
deb31b72837d9e5cc5d7bed0ef980b330e4fd527
[ "BSD-2-Clause" ]
null
null
null
source/__init__.py
ml6jason/imgflow
deb31b72837d9e5cc5d7bed0ef980b330e4fd527
[ "BSD-2-Clause" ]
1
2020-11-24T22:42:28.000Z
2020-11-24T22:42:28.000Z
source/__init__.py
ml6jason/imgflow
deb31b72837d9e5cc5d7bed0ef980b330e4fd527
[ "BSD-2-Clause" ]
null
null
null
from .core.loader import ClassificationDatasetLoader as LoadClassDataset from .core.loader import CVATDatasetLoader as LoadCVATDataset from .core.loader import DetectionResultLoader as LoadDetectionResults from .core.loader import LocalDirLoader as LocalDirLoader from .core.transform import ImgTransformSave as Save from .core.transform import ImgTransformResize as Resize from .core.transform import ImgTransformScale as Scale from .core.transform import ImgTransformExtractBboxes as ExtractBboxes
50.1
72
0.870259
56
501
7.785714
0.375
0.146789
0.12844
0.183486
0
0
0
0
0
0
0
0
0.097804
501
9
73
55.666667
0.964602
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
af54b9e6b1c180d8f8477452b32e1e52e3c9b697
81
py
Python
04/01/instance_method/astimezone.py
pylangstudy/201709
53d868786d7327a83bfa7f4149549c6f9855a6c6
[ "CC0-1.0" ]
null
null
null
04/01/instance_method/astimezone.py
pylangstudy/201709
53d868786d7327a83bfa7f4149549c6f9855a6c6
[ "CC0-1.0" ]
32
2017-09-01T00:52:17.000Z
2017-10-01T00:30:02.000Z
04/01/instance_method/astimezone.py
pylangstudy/201709
53d868786d7327a83bfa7f4149549c6f9855a6c6
[ "CC0-1.0" ]
null
null
null
import datetime now = datetime.datetime.now() print(now) print(now.astimezone())
16.2
29
0.765432
11
81
5.636364
0.454545
0.354839
0.354839
0
0
0
0
0
0
0
0
0
0.08642
81
4
30
20.25
0.837838
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0.5
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
af864386ec13e2fcb5556eba73488a4420e97e8d
119
py
Python
{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/apps/common/context_processors.py
vioquedu/django-redux-boilerplate
f63d7a99d825215ea4d5e2eb41bb6fc1be491718
[ "BSD-3-Clause" ]
5
2016-07-21T23:54:20.000Z
2017-07-26T20:36:25.000Z
{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/apps/common/context_processors.py
vioquedu/django-redux-boilerplate
f63d7a99d825215ea4d5e2eb41bb6fc1be491718
[ "BSD-3-Clause" ]
5
2016-10-22T20:08:06.000Z
2017-01-12T13:01:42.000Z
{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/apps/common/context_processors.py
vioquedu/django-redux-boilerplate
f63d7a99d825215ea4d5e2eb41bb6fc1be491718
[ "BSD-3-Clause" ]
null
null
null
from django.conf import settings def site_info(request): return { 'site_name': settings.SITE_NAME, }
14.875
40
0.663866
15
119
5.066667
0.733333
0.210526
0
0
0
0
0
0
0
0
0
0
0.243697
119
7
41
17
0.844444
0
0
0
0
0
0.07563
0
0
0
0
0
0
1
0.2
false
0
0.2
0.2
0.6
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
5
af8bad67d9b6377eb5eb30843f1e83d2aba77a3a
6,338
py
Python
modules/networkx/algorithms/tests/test_mixing_degree.py
fstwn/Cockatoo
0c5f9c515053bfc31e62d20fddc4ae9bece09d88
[ "MIT" ]
9
2020-09-26T03:41:21.000Z
2021-11-29T06:52:35.000Z
modules/networkx/algorithms/tests/test_mixing_degree.py
fstwn/Cockatoo
0c5f9c515053bfc31e62d20fddc4ae9bece09d88
[ "MIT" ]
9
2020-08-10T19:38:03.000Z
2022-02-24T08:41:32.000Z
modules/networkx/algorithms/tests/test_mixing_degree.py
fstwn/Cockatoo
0c5f9c515053bfc31e62d20fddc4ae9bece09d88
[ "MIT" ]
7
2015-04-28T19:19:30.000Z
2022-02-06T11:46:29.000Z
#!/usr/bin/env python from nose.tools import * from nose import SkipTest import networkx import networkx.algorithms.mixing as mixing class TestDegreeMixing(object): def setUp(self): self.P4=networkx.path_graph(4) self.D=networkx.DiGraph() self.D.add_edges_from([(0, 2), (0, 3), (1, 3), (2, 3)]) self.M=networkx.MultiGraph() self.M.add_path(list(range(4))) self.M.add_edge(0,1) self.S=networkx.Graph() self.S.add_edges_from([(0,0),(1,1)]) def test_node_degree_xy_undirected(self): xy=sorted(mixing.node_degree_xy(self.P4)) xy_result=sorted([(1,2), (2,1), (2,2), (2,2), (1,2), (2,1)]) assert_equal(xy,xy_result) def test_node_degree_xy_directed(self): xy=sorted(mixing.node_degree_xy(self.D)) xy_result=sorted([(2,1), (2,3), (1,3), (1,3)]) assert_equal(xy,xy_result) def test_node_degree_xy_multigraph(self): xy=sorted(mixing.node_degree_xy(self.M)) xy_result=sorted([(2,3), (2,3), (3,2), (3,2), (2,3), (3,2), (1,2), (2,1)]) assert_equal(xy,xy_result) def test_node_degree_xy_selfloop(self): xy=sorted(mixing.node_degree_xy(self.S)) xy_result=sorted([(2,2), (2,2)]) assert_equal(xy,xy_result) def test_degree_mixing_dict_undirected(self): d=mixing.degree_mixing_dict(self.P4) d_result={1:{2:2}, 2:{1:2,2:2}, } assert_equal(d,d_result) def test_degree_mixing_dict_directed(self): d=mixing.degree_mixing_dict(self.D) print(d) d_result={1:{3:2}, 2:{1:1,3:1}, 3:{} } assert_equal(d,d_result) def test_degree_mixing_dict_multigraph(self): d=mixing.degree_mixing_dict(self.M) d_result={1:{2:1}, 2:{1:1,3:3}, 3:{2:3} } assert_equal(d,d_result) class TestDegreeMixingMatrix(object): @classmethod def setupClass(cls): global np global npt try: import numpy as np import numpy.testing as npt except ImportError: raise SkipTest('NumPy not available.') def setUp(self): self.P4=networkx.path_graph(4) self.D=networkx.DiGraph() self.D.add_edges_from([(0, 2), (0, 3), (1, 3), (2, 3)]) self.M=networkx.MultiGraph() self.M.add_path(list(range(4))) self.M.add_edge(0,1) self.S=networkx.Graph() self.S.add_edges_from([(0,0),(1,1)]) def test_degree_mixing_matrix_undirected(self): a_result=np.array([[0,0,0], [0,0,2], [0,2,2]] ) a=mixing.degree_mixing_matrix(self.P4,normalized=False) npt.assert_equal(a,a_result) a=mixing.degree_mixing_matrix(self.P4) npt.assert_equal(a,a_result/float(a_result.sum())) def test_degree_mixing_matrix_directed(self): a_result=np.array([[0,0,0,0], [0,0,0,2], [0,1,0,1], [0,0,0,0]] ) a=mixing.degree_mixing_matrix(self.D,normalized=False) npt.assert_equal(a,a_result) a=mixing.degree_mixing_matrix(self.D) npt.assert_equal(a,a_result/float(a_result.sum())) def test_degree_mixing_matrix_multigraph(self): a_result=np.array([[0,0,0,0], [0,0,1,0], [0,1,0,3], [0,0,3,0]] ) a=mixing.degree_mixing_matrix(self.M,normalized=False) npt.assert_equal(a,a_result) a=mixing.degree_mixing_matrix(self.M) npt.assert_equal(a,a_result/float(a_result.sum())) def test_degree_mixing_matrix_selfloop(self): a_result=np.array([[0,0,0], [0,0,0], [0,0,2]] ) a=mixing.degree_mixing_matrix(self.S,normalized=False) npt.assert_equal(a,a_result) a=mixing.degree_mixing_matrix(self.S) npt.assert_equal(a,a_result/float(a_result.sum())) def test_degree_assortativity_undirected(self): r=mixing.degree_assortativity(self.P4) npt.assert_almost_equal(r,-1.0/2,decimal=4) def test_degree_assortativity_directed(self): r=mixing.degree_assortativity(self.D) npt.assert_almost_equal(r,-0.57735,decimal=4) def test_degree_assortativity_multigraph(self): r=mixing.degree_assortativity(self.M) npt.assert_almost_equal(r,-1.0/7.0,decimal=4) class TestDegreeMixingMatrixPearsonr(object): @classmethod def setupClass(cls): global np global npt try: import numpy as np import numpy.testing as npt except ImportError: raise SkipTest('NumPy not available.') try: import scipy except ImportError: raise SkipTest('SciPy not available.') def setUp(self): self.P4=networkx.path_graph(4) self.D=networkx.DiGraph() self.D.add_edges_from([(0, 2), (0, 3), (1, 3), (2, 3)]) self.M=networkx.MultiGraph() self.M.add_path(list(range(4))) self.M.add_edge(0,1) self.S=networkx.Graph() self.S.add_edges_from([(0,0),(1,1)]) def test_degree_assortativity_undirected(self): r=mixing.degree_pearsonr(self.P4) npt.assert_almost_equal(r,-1.0/2,decimal=4) def test_degree_assortativity_directed(self): r=mixing.degree_pearsonr(self.D) npt.assert_almost_equal(r,-0.57735,decimal=4) def test_degree_assortativity_multigraph(self): r=mixing.degree_pearsonr(self.M) npt.assert_almost_equal(r,-1.0/7.0,decimal=4)
30.917073
63
0.535027
836
6,338
3.845694
0.09689
0.018663
0.018663
0.018663
0.848523
0.840124
0.802799
0.724106
0.680871
0.655988
0
0.049274
0.337173
6,338
204
64
31.068627
0.71602
0.003156
0
0.545455
0
0
0.009501
0
0
0
0
0
0.127273
1
0.133333
false
0
0.072727
0
0.224242
0.006061
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
af8c89e0bff36f539a4ce61e304d8265ff96ab2c
59
py
Python
aerofiles/openair/__init__.py
flyingjoe/aerofiles
ac5775dbd47335e24aceb5df9d744192a46177f6
[ "MIT" ]
26
2015-04-17T08:24:13.000Z
2022-01-25T00:19:04.000Z
aerofiles/openair/__init__.py
GliderGeek/aerofiles
24b212547dec5a85c7d41c6924598f353d0fbb77
[ "MIT" ]
100
2015-04-17T04:46:50.000Z
2021-04-04T07:08:59.000Z
aerofiles/openair/__init__.py
GliderGeek/aerofiles
24b212547dec5a85c7d41c6924598f353d0fbb77
[ "MIT" ]
26
2015-04-17T04:09:19.000Z
2021-09-29T11:33:50.000Z
# flake8: noqa from .reader import Reader, LowLevelReader
14.75
42
0.779661
7
59
6.571429
0.857143
0
0
0
0
0
0
0
0
0
0
0.02
0.152542
59
3
43
19.666667
0.9
0.20339
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
afc9e75de3a57736fe2c176446eb657964f9e8e3
61
py
Python
main.py
jwrobel12/get-the-subway
aaa301883c32f1b12993b2e0a7767b941e2ea258
[ "MIT" ]
null
null
null
main.py
jwrobel12/get-the-subway
aaa301883c32f1b12993b2e0a7767b941e2ea258
[ "MIT" ]
null
null
null
main.py
jwrobel12/get-the-subway
aaa301883c32f1b12993b2e0a7767b941e2ea258
[ "MIT" ]
null
null
null
from functions import my_functions my_functions.hello("s")
20.333333
35
0.803279
9
61
5.222222
0.666667
0.468085
0
0
0
0
0
0
0
0
0
0
0.114754
61
2
36
30.5
0.87037
0
0
0
0
0
0.016949
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
afcafeedf49bab6da1f7cbebae2a61ce76b69375
219
py
Python
src/airfly/_vendor/airflow/operators/google_api_to_s3_transfer.py
ryanchao2012/airfly
230ddd88885defc67485fa0c51f66c4a67ae98a9
[ "MIT" ]
7
2021-09-27T11:38:48.000Z
2022-02-01T06:06:24.000Z
src/airfly/_vendor/airflow/operators/google_api_to_s3_transfer.py
ryanchao2012/airfly
230ddd88885defc67485fa0c51f66c4a67ae98a9
[ "MIT" ]
null
null
null
src/airfly/_vendor/airflow/operators/google_api_to_s3_transfer.py
ryanchao2012/airfly
230ddd88885defc67485fa0c51f66c4a67ae98a9
[ "MIT" ]
null
null
null
# Auto generated by 'inv collect-airflow' from airfly._vendor.airflow.providers.amazon.aws.transfers.google_api_to_s3 import ( GoogleApiToS3Operator, ) class GoogleApiToS3Transfer(GoogleApiToS3Operator): pass
24.333333
84
0.808219
24
219
7.208333
0.916667
0
0
0
0
0
0
0
0
0
0
0.020619
0.114155
219
8
85
27.375
0.871134
0.178082
0
0
1
0
0
0
0
0
0
0
0
1
0
true
0.2
0.2
0
0.4
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
afd0945ba4e210738689deac5e704f17ba98925b
144
py
Python
setup/utils/config_parsers/user.py
mnguyen-io/polkadot_api_server
b6a4aa6bdebce0b4a78e60f3681edd179e631577
[ "Apache-2.0" ]
32
2020-02-06T19:06:40.000Z
2022-03-08T23:02:56.000Z
setup/utils/config_parsers/user.py
mnguyen-io/polkadot_api_server
b6a4aa6bdebce0b4a78e60f3681edd179e631577
[ "Apache-2.0" ]
25
2020-03-11T20:45:12.000Z
2022-02-01T16:30:52.000Z
setup/utils/config_parsers/user.py
mnguyen-io/polkadot_api_server
b6a4aa6bdebce0b4a78e60f3681edd179e631577
[ "Apache-2.0" ]
22
2020-03-03T04:42:50.000Z
2021-08-29T21:50:36.000Z
class NodeConfig: def __init__(self, node_name: str, ws_url: str) -> None: self.node_name = node_name self.ws_url = ws_url
24
60
0.645833
22
144
3.772727
0.5
0.289157
0.289157
0
0
0
0
0
0
0
0
0
0.256944
144
5
61
28.8
0.775701
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
5
bb9f62eed789159a3302e4fc3eb6efcf3dde8a89
39
py
Python
tests/__init__.py
msicilia/uprof_ont
97bdfae68edecfc4bc198a3da28ebea99e2fabfd
[ "MIT" ]
null
null
null
tests/__init__.py
msicilia/uprof_ont
97bdfae68edecfc4bc198a3da28ebea99e2fabfd
[ "MIT" ]
null
null
null
tests/__init__.py
msicilia/uprof_ont
97bdfae68edecfc4bc198a3da28ebea99e2fabfd
[ "MIT" ]
null
null
null
"""Unit test package for uprof_ont."""
19.5
38
0.692308
6
39
4.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.128205
39
1
39
39
0.764706
0.820513
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
bba31bcddd9c0745b63eef9c32025165a84f34b1
406
py
Python
typhon/core/type_system/constraints/base_constraint.py
strongrex2001/typhon
7a8ad7e0252768844009ab331fc8aa61350f23a9
[ "Apache-2.0" ]
4
2021-03-03T12:44:34.000Z
2021-07-03T10:15:43.000Z
typhon/core/type_system/constraints/base_constraint.py
eliphatfs/typhon
7a8ad7e0252768844009ab331fc8aa61350f23a9
[ "Apache-2.0" ]
null
null
null
typhon/core/type_system/constraints/base_constraint.py
eliphatfs/typhon
7a8ad7e0252768844009ab331fc8aa61350f23a9
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sat Mar 13 21:31:02 2021 @author: eliphat """ class BaseConstraint: def cause_vars(self): raise NotImplementedError() def effect_vars(self): raise NotImplementedError() def fix(self, ts): raise NotImplementedError() def is_resolved(self): # is_resolved will be called after fix raise NotImplementedError()
19.333333
46
0.642857
47
406
5.468085
0.659574
0.373541
0.315175
0.249027
0.272374
0
0
0
0
0
0
0.042904
0.253695
406
20
47
20.3
0.805281
0.278325
0
0.444444
0
0
0
0
0
0
0
0
0
1
0.444444
false
0
0
0
0.555556
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
5
bbd59245a127ec5bef294fb75ae40df5eed17b65
163
py
Python
instapp/admin.py
imekenye/Instagram-clone
19c895a7bc4d5137f8df6eab7ade3920dfc3eb39
[ "Unlicense" ]
null
null
null
instapp/admin.py
imekenye/Instagram-clone
19c895a7bc4d5137f8df6eab7ade3920dfc3eb39
[ "Unlicense" ]
13
2020-02-12T00:19:23.000Z
2022-03-11T23:47:08.000Z
instapp/admin.py
imekenye/Instagram-clone
19c895a7bc4d5137f8df6eab7ade3920dfc3eb39
[ "Unlicense" ]
1
2019-06-07T10:01:06.000Z
2019-06-07T10:01:06.000Z
from django.contrib import admin from .models import Image,UserProfile admin.site.register(Image) admin.site.register(UserProfile) # Register your models here.
18.111111
37
0.809816
22
163
6
0.545455
0.136364
0.257576
0
0
0
0
0
0
0
0
0
0.110429
163
8
38
20.375
0.910345
0.159509
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
bbea6f18f807d1e95d88cbbf8bec51c445d775c2
18
py
Python
iotas/devices/philips/hue/__init__.py
jpwarren/holideck
4fd39f5cf5bd3a1749d5c57f1a73ea70fd9a8f49
[ "MIT" ]
2
2016-12-09T22:53:24.000Z
2016-12-21T11:15:04.000Z
iotas/devices/philips/hue/__init__.py
jpwarren/holideck
4fd39f5cf5bd3a1749d5c57f1a73ea70fd9a8f49
[ "MIT" ]
null
null
null
iotas/devices/philips/hue/__init__.py
jpwarren/holideck
4fd39f5cf5bd3a1749d5c57f1a73ea70fd9a8f49
[ "MIT" ]
null
null
null
print "Hello hue"
9
17
0.722222
3
18
4.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.166667
18
1
18
18
0.866667
0
0
0
0
0
0.5
0
0
0
0
0
0
0
null
null
0
0
null
null
1
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
5