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
eb9fd0269907f86d115d62e0ea0520c852272710
249
py
Python
source/tools/filetool.py
chopin1993/protocolmaster-20210731
e23e235ee00b940a4161c606415574d2a52c701c
[ "Apache-2.0" ]
null
null
null
source/tools/filetool.py
chopin1993/protocolmaster-20210731
e23e235ee00b940a4161c606415574d2a52c701c
[ "Apache-2.0" ]
null
null
null
source/tools/filetool.py
chopin1993/protocolmaster-20210731
e23e235ee00b940a4161c606415574d2a52c701c
[ "Apache-2.0" ]
null
null
null
import os def get_file_list(root, key=None): files = os.listdir(root) if key is not None: files.sort(key=key) return files def get_config_file(name): return os.path.join(os.path.dirname(__file__), ".." , "resource", name)
20.75
75
0.658635
39
249
4
0.564103
0.076923
0
0
0
0
0
0
0
0
0
0
0.204819
249
12
75
20.75
0.787879
0
0
0
0
0
0.04
0
0
0
0
0
0
1
0.25
false
0
0.125
0.125
0.625
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
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
eba40c7836d02b53113b113f1c42b28c5c259a93
404
py
Python
twitoff/__init__.py
jeffyjkang/DS-Unit-3-Sprint-3-Productization-and-Cloud
d12952dd625c8d282db1946dd50c7f478e90dd7a
[ "MIT" ]
null
null
null
twitoff/__init__.py
jeffyjkang/DS-Unit-3-Sprint-3-Productization-and-Cloud
d12952dd625c8d282db1946dd50c7f478e90dd7a
[ "MIT" ]
null
null
null
twitoff/__init__.py
jeffyjkang/DS-Unit-3-Sprint-3-Productization-and-Cloud
d12952dd625c8d282db1946dd50c7f478e90dd7a
[ "MIT" ]
null
null
null
from .app import create_app # APP = create_app() # python commands: # in app dir #FLASKAPP=twitoff flask run # in root dir # FLASK_APP=twitoff flask shell ''' Notes for setup: in root, FLASK_APP=twitoff flask shell import create_app init create_app() import DB DB.create_all() creates tables ''' ''' Other commands user1 = User.query.filter(User.name == 'nasa') user1 = user1.one() user1.tweets '''
14.428571
46
0.725248
62
404
4.612903
0.5
0.125874
0.104895
0.13986
0.174825
0
0
0
0
0
0
0.01173
0.155941
404
28
47
14.428571
0.826979
0.282178
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
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
0
1
0
1
0
1
0
0
3
ebb439a6545138904530c4467b730cf8637621d9
391
py
Python
utils/reduce_data.py
akshatabhat/transformers
83c6f38b9bf1397f3d2c95c7b0ea8907f709c580
[ "Apache-2.0" ]
1
2021-03-26T14:06:52.000Z
2021-03-26T14:06:52.000Z
utils/reduce_data.py
akshatabhat/transformers
83c6f38b9bf1397f3d2c95c7b0ea8907f709c580
[ "Apache-2.0" ]
null
null
null
utils/reduce_data.py
akshatabhat/transformers
83c6f38b9bf1397f3d2c95c7b0ea8907f709c580
[ "Apache-2.0" ]
null
null
null
import json def main(file_path, out_len): with open(file_path, 'r') as f: data = json.loads(f.read()) print(len(data['data'])) data['data'] = data['data'][:out_len] with open(file_path, 'w') as f: print(len(data['data'])) json.dump(data, f) if __name__ == "__main__": main('data/train-v1.1.json', 10) main('data/dev-v1.1.json', 2)
23
45
0.56266
62
391
3.33871
0.435484
0.231884
0.231884
0.231884
0.328502
0.21256
0
0
0
0
0
0.02349
0.237852
391
16
46
24.4375
0.671141
0
0
0.166667
0
0
0.163683
0
0
0
0
0
0
1
0.083333
false
0
0.083333
0
0.166667
0.166667
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
0
0
0
0
3
ebd48457bf3399a79fee4cd86c9c5e15db08cd7f
235
py
Python
Practice/Beginner/Hard Cash(CASH)/solution.py
DipanjanDasIT/CodeChefCodes
f3d6c9ee6598b1c873d614c4aff005c2971a4fc0
[ "MIT" ]
null
null
null
Practice/Beginner/Hard Cash(CASH)/solution.py
DipanjanDasIT/CodeChefCodes
f3d6c9ee6598b1c873d614c4aff005c2971a4fc0
[ "MIT" ]
null
null
null
Practice/Beginner/Hard Cash(CASH)/solution.py
DipanjanDasIT/CodeChefCodes
f3d6c9ee6598b1c873d614c4aff005c2971a4fc0
[ "MIT" ]
null
null
null
testcases = int(input()) for _ in range(testcases): main_details = list(map(int, input().split())) coin_details = list(map(lambda x: int(x)%main_details[-1], input().split())) print(sum(coin_details)%main_details[-1])
39.166667
81
0.659574
34
235
4.382353
0.5
0.221477
0.187919
0
0
0
0
0
0
0
0
0.01
0.148936
235
5
82
47
0.735
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.2
0
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
0
0
3
ccdce89434f75942295d9616fd82c9bb36f9f529
27
py
Python
src/lib/Bcfg2/Server/Reports/reports/__init__.py
amplify-education/bcfg2
02d7f574babfeb2da99e2aad3a92b4e8d6494f07
[ "mpich2" ]
null
null
null
src/lib/Bcfg2/Server/Reports/reports/__init__.py
amplify-education/bcfg2
02d7f574babfeb2da99e2aad3a92b4e8d6494f07
[ "mpich2" ]
null
null
null
src/lib/Bcfg2/Server/Reports/reports/__init__.py
amplify-education/bcfg2
02d7f574babfeb2da99e2aad3a92b4e8d6494f07
[ "mpich2" ]
null
null
null
__all__ = ['templatetags']
13.5
26
0.703704
2
27
7.5
1
0
0
0
0
0
0
0
0
0
0
0
0.111111
27
1
27
27
0.625
0
0
0
0
0
0.444444
0
0
0
0
0
0
1
0
false
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
0
0
0
0
0
0
0
0
0
0
3
cce06a46f4f819aee94f70073960cb4bc2718754
76
py
Python
config/prod.py
Cjwpython/WordlessBook
3426ccf3ab2f8848caef98bbc7635407774d32b2
[ "MIT" ]
2
2021-05-19T10:53:25.000Z
2022-01-20T01:20:08.000Z
config/prod.py
Cjwpython/WordlessBook
3426ccf3ab2f8848caef98bbc7635407774d32b2
[ "MIT" ]
null
null
null
config/prod.py
Cjwpython/WordlessBook
3426ccf3ab2f8848caef98bbc7635407774d32b2
[ "MIT" ]
1
2022-01-20T01:19:56.000Z
2022-01-20T01:19:56.000Z
# coding: utf-8 from config.base import * DEBUG = False SERVER_PORT = 8899
12.666667
25
0.723684
12
76
4.5
1
0
0
0
0
0
0
0
0
0
0
0.080645
0.184211
76
5
26
15.2
0.790323
0.171053
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
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
0
0
1
0
0
0
0
3
ccfbcfc80bfd4176875b1439857777b6f9e25659
4,052
py
Python
Day12/Part2.py
PeterDowdy/AdventOfCode2019
93078b5fc2ef78cdb1b860a3535839dc718c9f5f
[ "MIT" ]
null
null
null
Day12/Part2.py
PeterDowdy/AdventOfCode2019
93078b5fc2ef78cdb1b860a3535839dc718c9f5f
[ "MIT" ]
null
null
null
Day12/Part2.py
PeterDowdy/AdventOfCode2019
93078b5fc2ef78cdb1b860a3535839dc718c9f5f
[ "MIT" ]
null
null
null
from math import gcd moons = [(-16, -1, -12), (0, -4, -17), (-11, 11, 0), (2, 2, -6)] velocities = [(0,0,0),(0,0,0),(0,0,0),(0,0,0)] x_positions = set() y_positions = set() z_positions = set() x_positions.add((moons[0][0],moons[1][0],moons[2][0],moons[3][0],velocities[0][0],velocities[1][0],velocities[2][0],velocities[3][0])) y_positions.add((moons[0][1],moons[1][1],moons[2][1],moons[3][1],velocities[0][1],velocities[1][2],velocities[2][1],velocities[3][1])) z_positions.add((moons[0][2],moons[1][2],moons[2][2],moons[3][2],velocities[0][2],velocities[1][0],velocities[2][2],velocities[3][2])) x_sequences = {(moons[0][0],moons[1][0],moons[2][0],moons[3][0],velocities[0][0],velocities[1][0],velocities[2][0],velocities[3][0]): 0} y_sequences = {(moons[0][1],moons[1][1],moons[2][1],moons[3][1],velocities[0][1],velocities[1][1],velocities[2][1],velocities[3][1]): 0} z_sequences = {(moons[0][2],moons[1][2],moons[2][2],moons[3][2],velocities[0][2],velocities[1][2],velocities[2][2],velocities[3][2]): 0} ctr = 0 def step(): for i in range(0,4): moon = moons[i] gravity_delta = (sum([-1 if other_moon[0] < moon[0] else 1 if other_moon[0] > moon[0] else 0 for other_moon in moons]), sum([-1 if other_moon[1] < moon[1] else 1 if other_moon[1] > moon[1] else 0 for other_moon in moons]), sum([-1 if other_moon[2] < moon[2] else 1 if other_moon[2] > moon[2] else 0 for other_moon in moons]) ) velocity = velocities[i] velocities[i] = (velocity[0]+gravity_delta[0],velocity[1]+gravity_delta[1],velocity[2]+gravity_delta[2]) for i in range(0,4): moon = moons[i] velocity = velocities[i] moons[i] = (moon[0]+velocity[0],moon[1]+velocity[1],moon[2]+velocity[2]) x_cycle_length = 0 y_cycle_length = 0 z_cycle_length = 0 while True: ctr += 1 step() if (moons[0][0],moons[1][0],moons[2][0],moons[3][0],velocities[0][0],velocities[1][0],velocities[2][0],velocities[3][0]) in x_positions: x_cycle_length = ctr-x_sequences[(moons[0][0],moons[1][0],moons[2][0],moons[3][0],velocities[0][0],velocities[1][0],velocities[2][0],velocities[3][0])] pass if (moons[0][1],moons[1][1],moons[2][1],moons[3][1],velocities[0][1],velocities[1][2],velocities[2][1],velocities[3][1]) in y_positions: y_cycle_length = ctr-y_sequences[(moons[0][1],moons[1][1],moons[2][1],moons[3][1],velocities[0][1],velocities[1][2],velocities[2][1],velocities[3][1])] pass if (moons[0][2],moons[1][2],moons[2][2],moons[3][2],velocities[0][2],velocities[1][0],velocities[2][2],velocities[3][2]) in z_positions: z_cycle_length = ctr-z_sequences[(moons[0][2],moons[1][2],moons[2][2],moons[3][2],velocities[0][2],velocities[1][0],velocities[2][2],velocities[3][2])] pass if x_cycle_length != 0 and y_cycle_length != 0 and z_cycle_length != 0: break x_positions.add((moons[0][0],moons[1][0],moons[2][0],moons[3][0],velocities[0][0],velocities[1][0],velocities[2][0],velocities[3][0])) y_positions.add((moons[0][1],moons[1][1],moons[2][1],moons[3][1],velocities[0][1],velocities[1][2],velocities[2][1],velocities[3][1])) z_positions.add((moons[0][2],moons[1][2],moons[2][2],moons[3][2],velocities[0][2],velocities[1][0],velocities[2][2],velocities[3][2])) x_sequences[(moons[0][0],moons[1][0],moons[2][0],moons[3][0],velocities[0][0],velocities[1][0],velocities[2][0],velocities[3][0])] = ctr y_sequences[(moons[0][1],moons[1][1],moons[2][1],moons[3][1],velocities[0][1],velocities[1][2],velocities[2][1],velocities[3][1])] = ctr z_sequences[(moons[0][2],moons[1][2],moons[2][2],moons[3][2],velocities[0][2],velocities[1][0],velocities[2][2],velocities[3][2])] = ctr print('Cycles found:') print(f'x lasts {x_cycle_length}') print(f'y lasts {y_cycle_length}') print(f'z lasts {z_cycle_length}') print((x_cycle_length,y_cycle_length,z_cycle_length)) def compute_lcm(x, y): return (x*y)/gcd(x,y) print(int(compute_lcm(x_cycle_length, int(compute_lcm(y_cycle_length, z_cycle_length)))))
57.070423
159
0.637957
764
4,052
3.287958
0.070681
0.12699
0.052548
0.096338
0.738057
0.736465
0.698248
0.690287
0.650478
0.632166
0
0.100773
0.10612
4,052
70
160
57.885714
0.592766
0
0
0.263158
0
0
0.020977
0
0
0
0
0
0
1
0.035088
false
0.052632
0.017544
0.017544
0.070175
0.105263
0
0
0
null
0
0
0
0
1
0
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
1
0
0
0
0
0
3
ccfc9563a897ecbadd4690eb294f53f692567173
1,834
py
Python
03/main.py
cjcbusatto/advent-of-code-2020
7868a6dfe9233809e47c27dd2afd2a287fbf4906
[ "MIT" ]
null
null
null
03/main.py
cjcbusatto/advent-of-code-2020
7868a6dfe9233809e47c27dd2afd2a287fbf4906
[ "MIT" ]
null
null
null
03/main.py
cjcbusatto/advent-of-code-2020
7868a6dfe9233809e47c27dd2afd2a287fbf4906
[ "MIT" ]
null
null
null
def get_map_from_input(input_location): f = open(input_location, 'r') input_map = f.read().split('\n') f.close() lines = len(input_map) columns = len(input_map[0]) print(f"Original map = {lines} x {columns}") extended_map = [] for line in input_map: extended_map.append(line * 200) print( f"Extended map = {str(len(extended_map))} x {str(len(extended_map[0]))}") return extended_map def traverse_map_counting_trees(extended_map, right, down): squares = [] i = 0 j = 0 while i < len(extended_map): if i == 0: squares.append(extended_map[i][j]) else: try: squares.append(extended_map[i][(j * right)]) except: print("Error") break i += down j+= 1 tree_counter = 0 for char in squares: if char == '#': tree_counter += 1 return tree_counter extended_map = get_map_from_input('input') number_of_threes = traverse_map_counting_trees(extended_map, 1, 1) print(f"1x1 => {number_of_threes}") number_of_threes = traverse_map_counting_trees(extended_map, 3, 1) print(f"3x1 => {number_of_threes}") number_of_threes = traverse_map_counting_trees(extended_map, 5, 1) print(f"5x1 => {number_of_threes}") number_of_threes = traverse_map_counting_trees(extended_map, 7, 1) print(f"7x1 => {number_of_threes}") number_of_threes = traverse_map_counting_trees(extended_map, 1, 2) print(f"1x2 => {number_of_threes}") total = traverse_map_counting_trees(extended_map, 1, 1) * traverse_map_counting_trees(extended_map, 3, 1) * traverse_map_counting_trees( extended_map, 5, 1) * traverse_map_counting_trees(extended_map, 7, 1) * traverse_map_counting_trees(extended_map, 1, 2) print(f"Numbers multiplied = {total}")
26.970588
136
0.657579
263
1,834
4.250951
0.235741
0.206619
0.186941
0.236136
0.567979
0.5322
0.454383
0.454383
0.315742
0.315742
0
0.028691
0.220829
1,834
68
137
26.970588
0.753674
0
0
0
0
0
0.147139
0.027793
0
0
0
0
0
1
0.042553
false
0
0
0
0.085106
0.191489
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
0
0
0
0
3
6917abd481963fb432ab3aee8ef82db2c9fb0a45
104
py
Python
app/utils/Constants.py
jonzxz/project-piscator
588c8b1ac9355f9a82ac449fdbeaa1ef7eb441ef
[ "MIT" ]
null
null
null
app/utils/Constants.py
jonzxz/project-piscator
588c8b1ac9355f9a82ac449fdbeaa1ef7eb441ef
[ "MIT" ]
null
null
null
app/utils/Constants.py
jonzxz/project-piscator
588c8b1ac9355f9a82ac449fdbeaa1ef7eb441ef
[ "MIT" ]
1
2021-02-18T03:08:21.000Z
2021-02-18T03:08:21.000Z
IMAP_GMAIL = 'imap.gmail.com' IMAP_OUTLOOK = 'outlook.office365.com' IMAP_YAHOO = 'imap.mail.yahoo.com'
26
38
0.759615
16
104
4.75
0.4375
0.236842
0
0
0
0
0
0
0
0
0
0.031579
0.086538
104
3
39
34.666667
0.768421
0
0
0
0
0
0.519231
0.201923
0
0
0
0
0
1
0
false
0
0
0
0
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
0
0
0
0
3
6929df2927459d70fbbc2605690e202e9fada472
649
py
Python
MLGame/mlgame/crosslang/exceptions.py
Liuian/1092_INTRODUCTION-TO-MACHINE-LEARNING-AND-ITS-APPLICATION-TO-GAMING
f4a58d0d9f5832a77a4a86352e084065dc7bae50
[ "MIT" ]
null
null
null
MLGame/mlgame/crosslang/exceptions.py
Liuian/1092_INTRODUCTION-TO-MACHINE-LEARNING-AND-ITS-APPLICATION-TO-GAMING
f4a58d0d9f5832a77a4a86352e084065dc7bae50
[ "MIT" ]
null
null
null
MLGame/mlgame/crosslang/exceptions.py
Liuian/1092_INTRODUCTION-TO-MACHINE-LEARNING-AND-ITS-APPLICATION-TO-GAMING
f4a58d0d9f5832a77a4a86352e084065dc7bae50
[ "MIT" ]
null
null
null
""" The exceptions for the crosslang module """ class CompilationError(Exception): """ Exception raised when failed to compile the user script """ def __init__(self, file, reason): self.file = file self.reason = reason def __str__(self): return "Failed to compile '{}':\n{}".format(self.file, self.reason) class MLClientExecutionError(Exception): """ Exception raised when an error occurred while running non-python ml script """ def __init__(self, message): """ Constructor """ self.message = message def __str__(self): return self.message
23.178571
78
0.624037
71
649
5.478873
0.492958
0.061697
0.123393
0.143959
0
0
0
0
0
0
0
0
0.269646
649
27
79
24.037037
0.820675
0.280431
0
0.181818
0
0
0.066502
0
0
0
0
0
0
1
0.363636
false
0
0
0.181818
0.727273
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
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
693467a0acaed0c7690c50885524596a1996895e
922
py
Python
TERCEIRO MUNDO - THIRD WORLD/Um print especial - 97.py
MatheusKlebson/Python-Course
c1c5404095601733057bd91a96b5b4c45f0b5b9a
[ "MIT" ]
null
null
null
TERCEIRO MUNDO - THIRD WORLD/Um print especial - 97.py
MatheusKlebson/Python-Course
c1c5404095601733057bd91a96b5b4c45f0b5b9a
[ "MIT" ]
1
2020-11-25T15:47:38.000Z
2020-11-25T15:47:38.000Z
TERCEIRO MUNDO - THIRD WORLD/Um print especial - 97.py
MatheusKlebson/Python-Course
c1c5404095601733057bd91a96b5b4c45f0b5b9a
[ "MIT" ]
null
null
null
# Exercício Python 097: Faça um programa que tenha uma função chamada escreva(), # que receba um texto qualquer como parâmetro e mostre uma mensagem com tamanho adaptável. # Ex: # escreva(‘Olá, Mundo!’) Saída: # ~~~~~~~~~ # Olá, Mundo! # ~~~~~~~~~ def write(text): size = len(text) + 4 print("="*size) print(f" {text}") print("="*size) write("HELLO WORLD") write("I AM PROGRAMMER")
61.466667
167
0.273319
54
922
4.666667
0.740741
0.063492
0
0
0
0
0
0
0
0
0
0.012308
0.647505
922
15
168
61.466667
0.763077
0.817787
0
0.285714
0
0
0.226415
0
0
0
0
0
0
1
0.142857
false
0
0
0
0.142857
0.428571
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
3
6938f0e86ee3f8439ad8093f9adb38fd142480f6
1,366
py
Python
ois_api_client/v2_0/dto/AdditionalQueryParams.py
peterkulik/ois_api_client
51dabcc9f920f89982c4419bb058f5a88193cee0
[ "MIT" ]
7
2020-10-22T08:15:29.000Z
2022-01-27T07:59:39.000Z
ois_api_client/v3_0/dto/AdditionalQueryParams.py
peterkulik/ois_api_client
51dabcc9f920f89982c4419bb058f5a88193cee0
[ "MIT" ]
null
null
null
ois_api_client/v3_0/dto/AdditionalQueryParams.py
peterkulik/ois_api_client
51dabcc9f920f89982c4419bb058f5a88193cee0
[ "MIT" ]
null
null
null
from typing import Optional from dataclasses import dataclass from .InvoiceAppearance import InvoiceAppearance from .InvoiceCategory import InvoiceCategory from .PaymentMethod import PaymentMethod from .Source import Source @dataclass class AdditionalQueryParams: """Additional params of the invoice query :param tax_number: Tax number of the supplier or the customer of the invoice (the search criteria depends on the value of the invoiceDirection tag) :param group_member_tax_number: Tax number of group member of the supplier or the customer of the invoice (the search criteria depends on the value of the invoiceDirection tag) :param name: Query param of the supplier or the customer of the invoice for leading match pattern (the search criteria depends on the value of the invoiceDirection tag) :param invoice_category: Type of invoice :param payment_method: Method of payment :param invoice_appearance: Form of appearance of the invoice :param source: Data exchange source :param currency: Currency of the invoice """ tax_number: Optional[str] group_member_tax_number: Optional[str] name: Optional[str] invoice_category: Optional[InvoiceCategory] payment_method: Optional[PaymentMethod] invoice_appearance: Optional[InvoiceAppearance] source: Optional[Source] currency: Optional[str]
44.064516
180
0.786237
179
1,366
5.921788
0.268156
0.056604
0.067925
0.042453
0.321698
0.285849
0.285849
0.285849
0.285849
0.25
0
0
0.171303
1,366
30
181
45.533333
0.936396
0.551245
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.375
0
0.9375
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
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
3
695785b2963244eb85ab885b374aa8c222d96191
98
py
Python
ex.047.mostraNumerosPares.py
romulorm/cev-python
b5c6844956c131a9e4e02355459c218739ebf8c5
[ "MIT" ]
null
null
null
ex.047.mostraNumerosPares.py
romulorm/cev-python
b5c6844956c131a9e4e02355459c218739ebf8c5
[ "MIT" ]
null
null
null
ex.047.mostraNumerosPares.py
romulorm/cev-python
b5c6844956c131a9e4e02355459c218739ebf8c5
[ "MIT" ]
null
null
null
# Conta somente números pares for c in range(2, 51, 2): print(c, end=' ') print("Acabou!")
14
30
0.602041
16
98
3.6875
0.8125
0
0
0
0
0
0
0
0
0
0
0.052632
0.22449
98
6
31
16.333333
0.723684
0.27551
0
0
0
0
0.119403
0
0
0
0
0
0
1
0
false
0
0
0
0
0.666667
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
0
0
0
0
0
1
0
3
c600a7c769c43dfaa68adc940ed5418cbaa4e03b
121
py
Python
treasureisland/Parameters.py
idoerg/GenomicIslandPrediction
c50edd0c280efca3fac90674a9695cb763c27e31
[ "MIT" ]
null
null
null
treasureisland/Parameters.py
idoerg/GenomicIslandPrediction
c50edd0c280efca3fac90674a9695cb763c27e31
[ "MIT" ]
null
null
null
treasureisland/Parameters.py
idoerg/GenomicIslandPrediction
c50edd0c280efca3fac90674a9695cb763c27e31
[ "MIT" ]
null
null
null
WINDOW_SIZE = 8000 KMER_SIZE = 6 UPPER_THRESHOLD = 0.75 LOWER_THRESHOLD = 0.5 TUNE_METRIC = 1000 MINIMUM_GI_SIZE = 10000
17.285714
23
0.785124
21
121
4.190476
0.809524
0.227273
0
0
0
0
0
0
0
0
0
0.184466
0.14876
121
6
24
20.166667
0.669903
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
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
0
0
0
0
3
c61aff15e6261423fb5fd8677c7a2c1c475568d6
785
py
Python
src/features/migrations/0025_enable_all_remote_config_feature_states.py
augustuswm/flagsmith-api
6f37947fe3791726a92b4df2cdbded11e77387d3
[ "BSD-3-Clause" ]
1,259
2021-06-10T11:24:09.000Z
2022-03-31T10:30:44.000Z
src/features/migrations/0025_enable_all_remote_config_feature_states.py
augustuswm/flagsmith-api
6f37947fe3791726a92b4df2cdbded11e77387d3
[ "BSD-3-Clause" ]
392
2021-06-10T11:12:29.000Z
2022-03-31T10:13:53.000Z
src/features/migrations/0025_enable_all_remote_config_feature_states.py
augustuswm/flagsmith-api
6f37947fe3791726a92b4df2cdbded11e77387d3
[ "BSD-3-Clause" ]
58
2021-06-11T03:18:07.000Z
2022-03-31T14:39:10.000Z
# Generated by Django 2.2.17 on 2021-01-10 12:35 from django.db import migrations def enable_all_remote_config_feature_states(apps, schema_editor): FeatureState = apps.get_model('features', 'FeatureState') # update all existing remote config feature states to maintain current # functionality when hiding disabled flags since we've now merged flags # and remote config feature states. FeatureState.objects.filter(feature__type="CONFIG").update(enabled=True) def reverse(apps, schema_editor): pass class Migration(migrations.Migration): dependencies = [ ('features', '0024_auto_20200917_1032'), ] operations = [ migrations.RunPython( enable_all_remote_config_feature_states, reverse_code=reverse ) ]
26.166667
76
0.723567
96
785
5.71875
0.645833
0.087432
0.138434
0.182149
0.123862
0.123862
0
0
0
0
0
0.050713
0.196178
785
29
77
27.068966
0.819334
0.278981
0
0
1
0
0.101604
0.040998
0
0
0
0
0
1
0.133333
false
0.066667
0.066667
0
0.4
0
0
0
0
null
0
0
1
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
0
0
1
0
0
0
0
0
3
c61dc702b237c15662d2418ed34215b2b2a25a9f
1,999
py
Python
rolling/apply.py
andrewcfreeman/rolling
7cff8e45bbebaf64a5da1ad6e7d1a7619eebca17
[ "MIT" ]
189
2018-03-12T00:31:19.000Z
2022-03-26T00:17:38.000Z
rolling/apply.py
andrewcfreeman/rolling
7cff8e45bbebaf64a5da1ad6e7d1a7619eebca17
[ "MIT" ]
23
2017-12-31T17:50:48.000Z
2021-11-27T15:31:54.000Z
rolling/apply.py
andrewcfreeman/rolling
7cff8e45bbebaf64a5da1ad6e7d1a7619eebca17
[ "MIT" ]
7
2019-01-28T02:53:49.000Z
2021-11-11T18:34:45.000Z
from collections import deque from itertools import islice from .base import RollingObject class Apply(RollingObject): """ Iterator object that applies a function to a rolling window over a Python iterable. Parameters ---------- iterable : any iterable object window_size : integer, the size of the rolling window moving over the iterable operation : callable, default sum a function, or class implementing a __call__ method, to be applied to each window Complexity ---------- Update time: operation dependent Memory usage: O(k) where k is the size of the rolling window Examples -------- Rolling sum using builtin sum(): >>> import rolling >>> seq = (8, 1, 1, 3, 6, 5) >>> r_sum = rolling.Apply(seq, 3, operation=sum) >>> next(r_sum) 10 >>> next(r_sum) 5 Reverse each window: >>> r_rev = rolling.Apply(seq, 4, operation=lambda x: list(reversed(x))) >>> list(r_rev) [[3, 1, 1, 8], [6, 3, 1, 1], [5, 6, 3, 1]] """ def _init_fixed(self, iterable, window_size, operation=sum, **kwargs): head = islice(self._iterator, window_size - 1) self._buffer = deque(head, maxlen=window_size) self._operation = operation def _init_variable(self, iterable, window_size, operation=sum, **kwargs): self._buffer = deque(maxlen=window_size) self._operation = operation @property def current_value(self): return self._operation(self._buffer) def _add_new(self, new): self._buffer.append(new) def _remove_old(self): self._buffer.popleft() def _update_window(self, new): self._buffer.append(new) @property def _obs(self): return len(self._buffer) def __repr__(self): return "Rolling(operation='{}', window_size={}, window_type='{}')".format( self._operation.__name__, self.window_size, self.window_type )
24.084337
82
0.62031
253
1,999
4.699605
0.371542
0.067283
0.035324
0.020185
0.216989
0.216989
0.067283
0
0
0
0
0.016249
0.261131
1,999
82
83
24.378049
0.788761
0.405203
0
0.222222
0
0
0.054183
0.021863
0
0
0
0
0
1
0.296296
false
0
0.111111
0.111111
0.555556
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
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
c61e07f6e1d7dbddc3e330dbcdac65bf1c316ee7
2,166
py
Python
src/dfd/models/interface.py
cicheck/dfd
b02752f958cfea2f85222e2b4b3ba7e265a6152d
[ "MIT" ]
null
null
null
src/dfd/models/interface.py
cicheck/dfd
b02752f958cfea2f85222e2b4b3ba7e265a6152d
[ "MIT" ]
2
2021-12-31T17:44:20.000Z
2021-12-31T19:51:11.000Z
src/dfd/models/interface.py
cicheck/dfd
b02752f958cfea2f85222e2b4b3ba7e265a6152d
[ "MIT" ]
null
null
null
from __future__ import annotations import abc import enum import pathlib import typing as t class Prediction(enum.Enum): """Represents model prediction.""" def _generate_next_value_(name, start, count, last_values): return name REAL = enum.auto() FAKE = enum.auto() UNCERTAIN = enum.auto() @classmethod def from_confidence(cls, confidence: float, threshold: float = 0.5) -> Prediction: """Translate model confidence into prediction using given threshold. Returns: Model prediction over given threshold. """ if confidence >= threshold: return cls.FAKE if 1 - confidence >= threshold: return cls.REAL return cls.UNCERTAIN class ModelInterface(abc.ABC): """Height level wrapper around actual models used underneath. The goal of exposed interface is to hide implementation details such as what library is used to define models. Currently interface operates on paths and handles only data stored on disk. """ @abc.abstractmethod def train(self, train_ds_path: pathlib.Path, validation_ds_path: pathlib.Path) -> None: """Train model using given train and validation data.""" @abc.abstractmethod def test(self, test_ds_path: pathlib.Path) -> t.Dict[str, float]: """Evaluate model over provided test data. Returns: dict, metrics of interests mapped to their values """ @abc.abstractmethod def predict(self, sample_path: pathlib.Path) -> t.Dict[pathlib.Path, Prediction]: """Make predictions over provided sample of frames.""" @abc.abstractmethod def save(self, path: pathlib.Path): """Save model under given path.""" @classmethod @abc.abstractmethod def load(cls, path: pathlib.Path) -> ModelInterface: """Load model from given path.""" @abc.abstractmethod def get_available_metrics_names(self) -> t.List[str]: """Get names of metrics supported by model. Each metric value will be returned by train and test functions. Returns: names of supported metrics """
27.769231
91
0.66205
262
2,166
5.396947
0.427481
0.054455
0.084866
0.036068
0.028289
0
0
0
0
0
0
0.001847
0.250231
2,166
77
92
28.12987
0.868842
0.368421
0
0.25
1
0
0
0
0
0
0
0
0
1
0.25
false
0
0.15625
0.03125
0.6875
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
0
0
0
1
0
0
3
c63aa739c17a4e754a25a2ea9c3f099089da52a6
350
py
Python
__init__.py
LLNL/ferdinand
af47b415ea1e9cb21a45b20d1f3854bc7f3a4d70
[ "Apache-2.0" ]
null
null
null
__init__.py
LLNL/ferdinand
af47b415ea1e9cb21a45b20d1f3854bc7f3a4d70
[ "Apache-2.0" ]
null
null
null
__init__.py
LLNL/ferdinand
af47b415ea1e9cb21a45b20d1f3854bc7f3a4d70
[ "Apache-2.0" ]
null
null
null
############################################## # # # Ferdinand 0.40, Ian Thompson, LLNL # # # # gnd,endf,fresco,azure,hyrma # # # ############################################## __all__ = ["f90nml"]
38.888889
46
0.18
13
350
4.538462
1
0
0
0
0
0
0
0
0
0
0
0.028249
0.494286
350
8
47
43.75
0.305085
0.328571
0
0
0
0
0.214286
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
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
0
0
0
0
0
0
0
3
d660266eecc102047200d3452d83cf102a416710
497
py
Python
manokee/timing/timing.py
smiszym/manokee
afb63b8ce5ba3f83bb924965b8d5098a6d28c474
[ "MIT" ]
null
null
null
manokee/timing/timing.py
smiszym/manokee
afb63b8ce5ba3f83bb924965b8d5098a6d28c474
[ "MIT" ]
14
2021-03-11T02:05:20.000Z
2022-03-12T01:05:11.000Z
manokee/timing/timing.py
smiszym/manokee
afb63b8ce5ba3f83bb924965b8d5098a6d28c474
[ "MIT" ]
null
null
null
class Timing: def beat_to_seconds(self, beat_number: float) -> float: """ Convert beat number to seconds. :param beat_number: Beat number counted from 0. :return: Time in seconds. """ raise NotImplementedError def seconds_to_beat(self, time: float) -> float: """ Convert seconds to beat number. :param time: Time in seconds. :return: Beat number counted from 0. """ raise NotImplementedError
29.235294
59
0.597586
56
497
5.196429
0.339286
0.206186
0.116838
0.14433
0.151203
0
0
0
0
0
0
0.005917
0.31992
497
16
60
31.0625
0.85503
0.410463
0
0.4
0
0
0
0
0
0
0
0
0
1
0.4
false
0
0
0
0.6
0
0
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
0
0
0
1
0
0
3
d66748bfb42fb82f0c12adab0e031e9250276edd
2,947
py
Python
build/lib/WORC/featureprocessing/SelectIndividuals.py
Sikerdebaard/PREDICTFastr
e1f172c3606e6f33edf58008f958dcd1c0ac5b7b
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
build/lib/WORC/featureprocessing/SelectIndividuals.py
Sikerdebaard/PREDICTFastr
e1f172c3606e6f33edf58008f958dcd1c0ac5b7b
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
build/lib/WORC/featureprocessing/SelectIndividuals.py
Sikerdebaard/PREDICTFastr
e1f172c3606e6f33edf58008f958dcd1c0ac5b7b
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2016-2019 Biomedical Imaging Group Rotterdam, Departments of # Medical Informatics and Radiology, Erasmus MC, Rotterdam, The Netherlands # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from sklearn.base import BaseEstimator from sklearn.feature_selection.base import SelectorMixin import numpy as np class SelectIndividuals(BaseEstimator, SelectorMixin): ''' Object to fit feature selection based on the type group the feature belongs to. The label for the feature is used for this procedure. ''' def __init__(self, parameters=['hf_mean', 'sf_compactness']): ''' Parameters ---------- parameters: dict, mandatory Contains the settings for the groups to be selected. Should contain the settings for the following groups: - histogram_features - shape_features - orientation_features - semantic_features - patient_features - coliage_features - phase_features - vessel_features - log_features - texture_features ''' self.parameters = parameters def fit(self, feature_labels): ''' Select only features specificed by parameters per patient. Parameters ---------- feature_labels: list, optional Contains the labels of all features used. The index in this list will be used in the transform funtion to select features. ''' # Remove NAN selectrows = list() for num, l in enumerate(feature_labels): if any(x in l for x in self.parameters): selectrows.append(num) self.selectrows = selectrows def transform(self, inputarray): ''' Transform the inputarray to select only the features based on the result from the fit function. Parameters ---------- inputarray: numpy array, mandatory Array containing the items to use selection on. The type of item in this list does not matter, e.g. floats, strings etc. ''' return np.asarray([np.asarray(x)[self.selectrows].tolist() for x in inputarray]) def _get_support_mask(self): # NOTE: Method is required for the Selector class, but can be empty pass
35.506024
88
0.635562
350
2,947
5.285714
0.497143
0.032432
0.014054
0.017297
0
0
0
0
0
0
0
0.005794
0.297251
2,947
82
89
35.939024
0.887494
0.638616
0
0
0
0
0.027668
0
0
0
0
0
0
1
0.25
false
0.0625
0.1875
0
0.5625
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
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
3
d6690698841bc39fcf328d809c1ae9a9943d7b0f
1,279
py
Python
src/entities/relativeentity.py
alisonbento/steering-all
99797f99180dd64189ea5ed85ff71b66bfd9cf6f
[ "MIT" ]
3
2016-10-10T18:34:55.000Z
2017-08-02T15:18:28.000Z
src/entities/relativeentity.py
alisonbento/steering-all
99797f99180dd64189ea5ed85ff71b66bfd9cf6f
[ "MIT" ]
null
null
null
src/entities/relativeentity.py
alisonbento/steering-all
99797f99180dd64189ea5ed85ff71b66bfd9cf6f
[ "MIT" ]
null
null
null
from entity import Entity class RelativeEntity(Entity): def __init__(self, width, height): Entity.__init__(self, width, height) self.margin = [0, 0, 0, 0] def below(self, entity): self.y = entity.y + entity.height + self.margin[1] def above(self, entity): self.y = entity.y - self.height - self.margin[3] def leftOf(self, entity): self.x = entity.x - self.width - self.margin[2] def rightOf(self, entity): self.x = entity.x + entity.width + self.margin[0] def margin(self, margin): self.margin = margin; def marginLeft(self, margin): self.margin[0] = margin def marginRight(self, margin): self.margin[2] = margin def marginTop(self, margin): self.margin[1] = margin def marginBottom(self, margin): self.margin[3] = margin def alignLeft(self): self.x = 0 + self.margin[0] def alignRight(self, width): self.x = width - self.width - self.margin[2] def alignTop(self): self.y = 0 + self.margin[1] def alignBottom(self, height): self.y = height - self.height - self.margin[3] def centerRelativeX(self, entity): self.x = entity.x + (entity.width / 2) - (self.width / 2) def centerRelativeY(self, entity): self.y = entity.y + (entity.height / 2) - (self.height / 2)
22.839286
63
0.641908
184
1,279
4.418478
0.168478
0.233702
0.103321
0.123001
0.334563
0.334563
0.164822
0.164822
0
0
0
0.021825
0.211884
1,279
55
64
23.254545
0.784722
0
0
0
0
0
0
0
0
0
0
0
0
1
0.457143
false
0
0.028571
0
0.514286
0
0
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
0
0
0
1
0
0
3
d673caa4093bd3809cb0be9e8da138d53b90b322
3,860
py
Python
test/domain_types/test_polygon.py
covjson/covjson-validator
97b6ee445bfcc70ad73d731dce3d67aa4aafaf3a
[ "BSD-3-Clause" ]
null
null
null
test/domain_types/test_polygon.py
covjson/covjson-validator
97b6ee445bfcc70ad73d731dce3d67aa4aafaf3a
[ "BSD-3-Clause" ]
6
2022-02-02T16:52:33.000Z
2022-02-09T09:40:50.000Z
test/domain_types/test_polygon.py
covjson/covjson-validator
97b6ee445bfcc70ad73d731dce3d67aa4aafaf3a
[ "BSD-3-Clause" ]
null
null
null
# Pytests to test the Polygon domain type in the domain.json schema file import pytest from jsonschema.exceptions import ValidationError pytestmark = pytest.mark.schema("/schemas/domain") @pytest.mark.exhaustive def test_valid_polygon_domain(validator, polygon_domain): ''' Tests an example of a Polygon domain ''' validator.validate(polygon_domain) def test_missing_composite_axis(validator, polygon_domain): ''' Invalid: Polygon domain with missing 'composite' axis ''' del polygon_domain["axes"]["composite"] with pytest.raises(ValidationError): validator.validate(polygon_domain) def test_empty_composite_axis(validator, polygon_domain): ''' Invalid: Polygon domain with empty 'composite' axis ''' polygon_domain["axes"]["composite"] = { "values" : [] } with pytest.raises(ValidationError): validator.validate(polygon_domain) def test_wrong_composite_axis_type(validator, polygon_domain): ''' Invalid: Polygon domain with primitive instead of polygon axis ''' polygon_domain["axes"]["composite"] = { "values": [1, 2, 3] } with pytest.raises(ValidationError): validator.validate(polygon_domain) def test_wrong_composite_axis_type2(validator, polygon_domain): ''' Invalid: Polygon domain with tuple instead of polygon axis (invalid polygons) ''' polygon_domain["axes"]["composite"]["values"] = [ [1, 1], [2, 2], [3, 3] ] with pytest.raises(ValidationError): validator.validate(polygon_domain) def test_composite_axis_with_2_values(validator, polygon_domain): ''' Invalid: Polygon domain with composite axis with two polygons ''' polygon_domain["axes"]["composite"]["values"] = [ [ [ [100.0, 1.0], [101.0, 0.0], [101.0, 2.0], [100.0, 2.0], [100.0, 1.0] ] ], [ [ [101.0, 1.0], [102.0, 0.0], [102.0, 2.0], [101.0, 2.0], [101.0, 1.0] ] ] ] with pytest.raises(ValidationError): validator.validate(polygon_domain) def test_wrong_composite_axis_coordinates(validator, polygon_domain): ''' Invalid: Polygon domain with invalid coordinates ''' polygon_domain["axes"]["composite"]["coordinates"] = ["y", "x"] with pytest.raises(ValidationError): validator.validate(polygon_domain) def test_wrong_data_type(validator, polygon_domain): ''' Invalid: Polygon domain with wrong data type ''' polygon_domain["axes"]["composite"]["dataType"] = "tuple" with pytest.raises(ValidationError): validator.validate(polygon_domain) def test_extra_axis(validator, polygon_domain): ''' Invalid: Polygon domain with unrecognised extra axis ''' polygon_domain["axes"]["composite2"] = \ polygon_domain["axes"]["composite"] with pytest.raises(ValidationError): validator.validate(polygon_domain) def test_empty_z_axis(validator, polygon_domain): ''' Invalid: Polygon domain with empty 'z' axis ''' polygon_domain["axes"]["z"] = { "values" : [] } with pytest.raises(ValidationError): validator.validate(polygon_domain) def test_multivalued_z_axis(validator, polygon_domain): ''' Invalid: Polygon domain with multi-valued 'z' axis ''' polygon_domain["axes"]["z"] = { "values" : [1, 2] } with pytest.raises(ValidationError): validator.validate(polygon_domain) def test_empty_t_axis(validator, polygon_domain): ''' Invalid: Polygon domain with empty 't' axis ''' polygon_domain["axes"]["t"] = { "values" : [] } with pytest.raises(ValidationError): validator.validate(polygon_domain) def test_multivalued_t_axis(validator, polygon_domain): ''' Invalid: Polygon domain with multi-valued 't' axis ''' polygon_domain["axes"]["t"] = { "values" : ["2008-01-01T04:00:00Z", "2008-01-01T05:00:00Z"] } with pytest.raises(ValidationError): validator.validate(polygon_domain)
33.275862
97
0.690933
464
3,860
5.571121
0.157328
0.271567
0.110638
0.15087
0.759381
0.747776
0.668472
0.574855
0.49323
0.401547
0
0.031796
0.168912
3,860
115
98
33.565217
0.774002
0.198705
0
0.416667
0
0
0.088587
0
0
0
0
0
0
1
0.216667
false
0
0.033333
0
0.25
0
0
0
0
null
1
0
0
0
1
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
0
0
0
3
d6812fee96c936a6d4abcdec5e68b3b5abdd5c3f
409
py
Python
api/core/models.py
vrmartins/poc-django-rest-framework
a4914c25c7decbe16f5233233e9da4dce57f64d8
[ "MIT" ]
null
null
null
api/core/models.py
vrmartins/poc-django-rest-framework
a4914c25c7decbe16f5233233e9da4dce57f64d8
[ "MIT" ]
7
2020-04-05T14:25:37.000Z
2021-09-22T18:50:16.000Z
api/core/models.py
vrmartins/poc-django-rest-framework
a4914c25c7decbe16f5233233e9da4dce57f64d8
[ "MIT" ]
null
null
null
from django.db import models from core.utils.cnpj_is_valid import cnpj_is_valid class Customer(models.Model): name = models.CharField(max_length=50, null=False, blank=False) address = models.CharField(max_length=50, null=False, blank=False) cnpj = models.CharField(max_length=14, unique=True, null=False, blank=False, validators=[cnpj_is_valid]) def __str__(self): return self.name
34.083333
108
0.750611
61
409
4.819672
0.491803
0.061224
0.112245
0.244898
0.306122
0.306122
0.306122
0.306122
0.306122
0
0
0.017094
0.141809
409
11
109
37.181818
0.820513
0
0
0
0
0
0
0
0
0
0
0
0
1
0.125
false
0
0.25
0.125
1
0
0
0
0
null
0
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
0
0
0
0
1
1
0
0
3
d6876109b60f86d0c814c99a79b62726595f011e
167
py
Python
webapp/campaigns/urls.py
AKarbas/datachef-interview-assignment
04a69a0daf0ab5378a2e03913ac60818e3fb73d9
[ "Intel" ]
null
null
null
webapp/campaigns/urls.py
AKarbas/datachef-interview-assignment
04a69a0daf0ab5378a2e03913ac60818e3fb73d9
[ "Intel" ]
null
null
null
webapp/campaigns/urls.py
AKarbas/datachef-interview-assignment
04a69a0daf0ab5378a2e03913ac60818e3fb73d9
[ "Intel" ]
null
null
null
from django.urls import path from . import views app_name = 'campaigns' urlpatterns = [ path('<int:campaign_id>/', views.Campaign.as_view(), name='campaign'), ]
18.555556
74
0.700599
22
167
5.181818
0.681818
0
0
0
0
0
0
0
0
0
0
0
0.143713
167
8
75
20.875
0.797203
0
0
0
0
0
0.209581
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
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
0
0
1
0
0
0
0
3
d687affcc64565d8faf1f33b4994b4b1b73c74f1
1,470
py
Python
src/test/test_imperfect_indicitive.py
shrutiichandra/spanish-conjugator
2ebf41b92c14c3e47a873c52fdf4ce1d17bff5e0
[ "MIT" ]
null
null
null
src/test/test_imperfect_indicitive.py
shrutiichandra/spanish-conjugator
2ebf41b92c14c3e47a873c52fdf4ce1d17bff5e0
[ "MIT" ]
null
null
null
src/test/test_imperfect_indicitive.py
shrutiichandra/spanish-conjugator
2ebf41b92c14c3e47a873c52fdf4ce1d17bff5e0
[ "MIT" ]
null
null
null
# -*- coding: iso-8859-15 -*- import spanishconjugator from spanishconjugator.SpanishConjugator import Conjugator # ----------------------------------- Imperfect Indicative ----------------------------------- # def test_imperfect_indicative_yo_ar(): expected = "hablaba" assert Conjugator().conjugate('hablar','imperfect','indicative','yo') == expected def test_imperfect_indicative_tu_ar(): expected = "hablabas" assert Conjugator().conjugate('hablar','imperfect','indicative','tu') == expected def test_imperfect_indicative_usted_ar(): expected = "hablaba" assert Conjugator().conjugate('hablar','imperfect','indicative','usted') == expected def test_imperfect_indicative_nosotros_ar(): expected = 'hablábamos' assert str(Conjugator().conjugate('hablar','imperfect','indicative','nosotros')) == expected def test_imperfect_indicative_vosotros_ar(): expected = "hablabais" assert Conjugator().conjugate('hablar','imperfect','indicative','vosotros') == expected def test_imperfect_indicative_ustedes_ar(): expected = "hablaban" assert Conjugator().conjugate('hablar','imperfect','indicative','ustedes') == expected def test_imperfect_indicative_yo_ar_3(): expected = "charlaba" assert Conjugator().conjugate('charlar','imperfect','indicative','yo') == expected def test_imperfect_indicative_yo_ar_4(): expected = "era" assert Conjugator().conjugate('ser','imperfect','indicative','yo') == expected
39.72973
96
0.702041
144
1,470
6.930556
0.243056
0.323647
0.128257
0.208417
0.626253
0.445892
0.267535
0.225451
0.134269
0
0
0.006112
0.109524
1,470
37
97
39.72973
0.756303
0.081633
0
0.076923
0
0
0.218425
0
0
0
0
0
0.307692
1
0.307692
false
0
0.076923
0
0.384615
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
0
0
0
0
3
d68b45e4e7a07123f8215b18f29f9f415483134c
219
py
Python
list.py
TomckySan/python-training
7d5214d01e8844a314d4a5aea6a4e35afa19f729
[ "MIT" ]
null
null
null
list.py
TomckySan/python-training
7d5214d01e8844a314d4a5aea6a4e35afa19f729
[ "MIT" ]
null
null
null
list.py
TomckySan/python-training
7d5214d01e8844a314d4a5aea6a4e35afa19f729
[ "MIT" ]
null
null
null
# coding: utf-8 sales= [255, 100, 353, 400] print len(sales) print sales[2] sales[2] = 100 print sales[2] # 含んでいるか否か print 100 in sales print 500 in sales # range print range(10) print range(3,10) print range(3,10,2)
13.6875
27
0.69863
42
219
3.642857
0.404762
0.117647
0.143791
0.169935
0.183007
0
0
0
0
0
0
0.186813
0.16895
219
15
28
14.6
0.653846
0.127854
0
0.2
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0.8
0
0
0
null
0
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
1
0
0
0
0
0
0
1
0
3
d6c44db13e9cf80092cf19bc3a381fd343fa5385
1,248
py
Python
events/migrations/0049_auto_20210308_1449.py
horacexd/clist
9759dfea97b86514bec9825d2430abc36decacf0
[ "Apache-2.0" ]
166
2019-05-16T23:46:08.000Z
2022-03-31T05:20:23.000Z
events/migrations/0049_auto_20210308_1449.py
horacexd/clist
9759dfea97b86514bec9825d2430abc36decacf0
[ "Apache-2.0" ]
92
2020-01-18T22:51:53.000Z
2022-03-12T01:23:57.000Z
events/migrations/0049_auto_20210308_1449.py
VadVergasov/clist
4afcdfe88250d224043b28efa511749347cec71c
[ "Apache-2.0" ]
23
2020-02-09T17:38:43.000Z
2021-12-09T14:39:07.000Z
# Generated by Django 3.1.7 on 2021-03-08 14:49 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('events', '0048_auto_20210307_1644'), ] operations = [ migrations.AlterField( model_name='event', name='email_conf', field=models.JSONField(blank=True, default=dict), ), migrations.AlterField( model_name='event', name='fields_info', field=models.JSONField(blank=True, default=dict), ), migrations.AlterField( model_name='event', name='limits', field=models.JSONField(blank=True, default=dict), ), migrations.AlterField( model_name='event', name='logins_paths', field=models.JSONField(blank=True, default=dict), ), migrations.AlterField( model_name='event', name='standings_urls', field=models.JSONField(blank=True, default=dict), ), migrations.AlterField( model_name='participant', name='addition_fields', field=models.JSONField(blank=True, default=dict), ), ]
28.363636
61
0.560897
118
1,248
5.813559
0.398305
0.174927
0.218659
0.253644
0.669096
0.669096
0.613703
0.555394
0.555394
0.555394
0
0.036643
0.322115
1,248
43
62
29.023256
0.774232
0.036058
0
0.621622
1
0
0.110741
0.019151
0
0
0
0
0
1
0
false
0
0.027027
0
0.108108
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
d6c7f2bc5030b6e6a1c3bad3cfc0eb72b6f4212f
172
py
Python
iex_parser_test/__init__.py
Cedric-Kram/iex_parser
b5aebe79b2125681ab0606f4f59ec325aadeebb9
[ "Apache-2.0" ]
15
2019-08-15T07:22:44.000Z
2022-01-18T20:52:22.000Z
iex_parser_test/__init__.py
Cedric-Kram/iex_parser
b5aebe79b2125681ab0606f4f59ec325aadeebb9
[ "Apache-2.0" ]
5
2020-05-29T04:58:34.000Z
2022-01-31T07:27:20.000Z
iex_parser_test/__init__.py
Cedric-Kram/iex_parser
b5aebe79b2125681ab0606f4f59ec325aadeebb9
[ "Apache-2.0" ]
4
2020-09-08T15:03:20.000Z
2022-01-18T13:33:56.000Z
"""iex_parser""" from .parser import Parser from .messages import DEEP_1_0, TOPS_1_6, TOPS_1_5 __all__ = [ 'Parser', 'DEEP_1_0', 'TOPS_1_5', 'TOPS_1_6' ]
14.333333
50
0.645349
29
172
3.241379
0.413793
0.212766
0.12766
0.212766
0.234043
0
0
0
0
0
0
0.088889
0.215116
172
11
51
15.636364
0.607407
0.05814
0
0
0
0
0.192308
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0
1
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
0
0
0
0
0
0
0
0
3
d6db1b844a289657730452a636a61c698c02aa89
1,117
py
Python
varex/commons/VCFEntry.py
weiyi-bitw/varex
765e8876c0ced480a47c0e523736bd31b7897644
[ "MIT" ]
null
null
null
varex/commons/VCFEntry.py
weiyi-bitw/varex
765e8876c0ced480a47c0e523736bd31b7897644
[ "MIT" ]
null
null
null
varex/commons/VCFEntry.py
weiyi-bitw/varex
765e8876c0ced480a47c0e523736bd31b7897644
[ "MIT" ]
null
null
null
class VCFEntry(object): def __init__(self, vkey, ssid, pid, ac, passFilter=1, qual=-1, gq=-1, dp=-1, ad=-1): self.vkey = vkey if not ssid: self.ssid = "UNKNOWN" else: self.ssid = ssid self.pid = pid self.ac = ac self.passFilter = passFilter self.qual = qual self.gq = gq self.dp = dp self.ad = ad def __repr__(self): return "VCFEntry: (" + ', '.join([str(x) for x in [self.vkey, self.ssid, self.pid, self.ac, self.passFilter, self.qual, self.gq, self.dp, self.ad]]) + ")" def __str__(self): return '\t'.join([str(x) for x in [self.vkey, self.ssid, self.pid, self.ac, self.passFilter, self.qual, self.gq, self.dp, self.ad]]) def __eq__(self, other): return (isinstance(other, self.__class__) and self.__dict__ == other.__dict__) def __ne__(self, other): return not self.__eq__(other) def sameEntry(self, other): return (isinstance(other, self.__class__) and self.vkey == other.vkey and self.ssid == other.ssid and self.pid == other.pid)
32.852941
162
0.584602
159
1,117
3.855346
0.220126
0.065253
0.053834
0.035889
0.430669
0.430669
0.430669
0.430669
0.430669
0.280587
0
0.00612
0.268577
1,117
33
163
33.848485
0.744186
0
0
0
0
0
0.020702
0
0
0
0
0
0
1
0.25
false
0.166667
0
0.208333
0.5
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
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
0
0
0
3
d6e6b0705f1fc5675687010c9694d9720c0c22e7
133
py
Python
app/extensions.py
vatsalag99/mapping_self-harm_risk_twitter
262c36f994c909714a738686b025633d832bc596
[ "MIT" ]
null
null
null
app/extensions.py
vatsalag99/mapping_self-harm_risk_twitter
262c36f994c909714a738686b025633d832bc596
[ "MIT" ]
1
2021-06-02T01:16:32.000Z
2021-06-02T01:16:32.000Z
app/extensions.py
vatsalag99/mapping_self-harm_risk_twitter
262c36f994c909714a738686b025633d832bc596
[ "MIT" ]
null
null
null
"""Extensions module - Set up for additional libraries can go in here.""" from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy()
26.6
73
0.766917
18
133
5.611111
0.888889
0
0
0
0
0
0
0
0
0
0
0
0.150376
133
5
74
26.6
0.893805
0.503759
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
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
0
0
1
0
0
0
0
3
ba334945cd720fa1ed44ce5324c0dde69e532940
5,765
py
Python
src/pnmol/kernels.py
schmidtjonathan/pnmol-experiments
e07396079e2f2038011f3a377022482991090c5a
[ "MIT" ]
1
2022-02-24T18:25:43.000Z
2022-02-24T18:25:43.000Z
src/pnmol/kernels.py
schmidtjonathan/pnmol-experiments
e07396079e2f2038011f3a377022482991090c5a
[ "MIT" ]
null
null
null
src/pnmol/kernels.py
schmidtjonathan/pnmol-experiments
e07396079e2f2038011f3a377022482991090c5a
[ "MIT" ]
null
null
null
import abc from functools import cached_property, partial import jax import jax.numpy as jnp class Kernel(abc.ABC): """Covariance kernel interface.""" @abc.abstractmethod def __call__(self, X, Y): raise NotImplementedError class _PairwiseKernel(Kernel): @partial(jax.jit, static_argnums=(0,)) def __call__(self, X, Y): # Single element of the Gram matrix: # X.shape=(d,), Y.shape=(d,) -> K.shape = () if X.ndim == Y.ndim <= 1: return self.pairwise(X, Y) # Diagonal of the Gram matrix: # X.shape=(N,d), Y.shape=(N,d) -> K.shape = (N,) if X.shape == Y.shape: return self._evaluate_inner(X, Y) # Full Gram matrix: # X.shape=[N,d), Y.shape=(d,K) -> K.shape = (N,K) return self._evaluate_outer(X, Y) @abc.abstractmethod def pairwise(self, x, y): raise NotImplementedError @cached_property def _evaluate_inner(self): return jax.jit(jax.vmap(self.pairwise, (0, 0), 0)) @cached_property def _evaluate_outer(self): _pairwise_row = jax.jit(jax.vmap(self.pairwise, (0, None), 0)) return jax.jit(jax.vmap(_pairwise_row, (None, 1), 1)) def __str__(self): return f"{self.__class__.__name__}()" def __add__(self, other): @jax.jit def pairwise_new(x, y): return self.pairwise(x, y) + other.pairwise(x, y) return Lambda(pairwise_new) class Lambda(_PairwiseKernel): def __init__(self, fun, /): self._lambda_fun = jax.jit(fun) @partial(jax.jit, static_argnums=(0,)) def pairwise(self, x, y): return self._lambda_fun(x, y) class _RadialKernel(_PairwiseKernel): r"""Radial kernels. k(x,y) = output_scale * \varphi(\|x-y\|*input_scale) """ def __init__( self, *, output_scale=1.0, input_scale=1.0, ): self._output_scale = output_scale self._input_scale = input_scale @property def output_scale(self): return self._output_scale @property def output_scale_squared(self): return self.output_scale ** 2 @property def input_scale(self): return self._input_scale @property def input_scale_squared(self): return self.input_scale ** 2 @abc.abstractmethod def pairwise(self, X, Y): raise NotImplementedError @partial(jax.jit, static_argnums=0) def _distance_squared_l2(self, X, Y): return (X - Y).dot(X - Y) class SquareExponential(_RadialKernel): @partial(jax.jit, static_argnums=0) def pairwise(self, x, y): dist_squared = self._distance_squared_l2(x, y) * self.input_scale_squared return self.output_scale_squared * jnp.exp(-dist_squared / 2.0) class Matern52(_RadialKernel): # Careful! Matern52 is not differentiable at x=y! # Therefore, it is likely unusable for PNMOL... @partial(jax.jit, static_argnums=(0,)) def pairwise(self, x, y): dist_unscaled = self._distance_squared_l2(x, y) dist_scaled = jnp.sqrt(5.0 * dist_unscaled * self.input_scale_squared) A = 1 + dist_scaled + dist_scaled ** 2.0 / 3.0 B = jnp.exp(-dist_scaled) return self.output_scale_squared * A * B class Polynomial(_PairwiseKernel): """k(x,y) = (x.T @ y + c)^d""" def __init__(self, *, order=2, const=1.0): self._order = order self._const = const @property def order(self): return self._order @property def const(self): return self._const @partial(jax.jit, static_argnums=(0,)) def pairwise(self, x, y): return (x.dot(y) + self.const) ** self.order class WhiteNoise(_PairwiseKernel): def __init__(self, *, output_scale=1.0): self._output_scale = output_scale @property def output_scale(self): return self._output_scale @partial(jax.jit, static_argnums=(0,)) def pairwise(self, x, y): return self.output_scale ** 2 * jnp.all(x == y) class _StackedKernel(Kernel): def __init__(self, *, kernel_list): self.kernel_list = kernel_list @partial(jax.jit, static_argnums=0) def __call__(self, X, Y): gram_matrix_list = [k(X, Y) for k in self.kernel_list] # Diagonal of the Gram matrix: # Concatenate the results together if X.shape == Y.shape: return jnp.concatenate(gram_matrix_list) # Full Gram matrix: # Block diag the gram matrix return jax.scipy.linalg.block_diag(*gram_matrix_list) def duplicate(kernel, num): """Create a stack of kernels such that the Gram matrix becomes block diagonal. The blocks are all identical. """ return _StackedKernel(kernel_list=[kernel] * num) def mle_input_scale(*, mesh_points, data, kernel_type, input_scale_trials): scale_to_log_lklhd = partial( input_scale_to_log_likelihood, data=data, kernel_type=kernel_type, mesh_points=mesh_points, ) scale_to_log_lklhd_optimised = jax.jit(jax.vmap(scale_to_log_lklhd)) log_likelihood_values = scale_to_log_lklhd_optimised(input_scale=input_scale_trials) index_max = jnp.argmax(log_likelihood_values) return input_scale_trials[index_max] @partial(jax.jit, static_argnums=3) def input_scale_to_log_likelihood(input_scale, mesh_points, data, kernel_type): kernel = kernel_type(input_scale=input_scale) K = kernel(mesh_points, mesh_points.T) return log_likelihood(gram_matrix=K, y=data, n=data.shape[0]) @jax.jit def log_likelihood(gram_matrix, y, n): a = y @ jnp.linalg.solve(gram_matrix, y) b = jnp.log(jnp.linalg.det(gram_matrix)) c = n * jnp.log(2 * jnp.pi) return -0.5 * (a + b + c)
27.193396
88
0.640937
802
5,765
4.337905
0.174564
0.016097
0.018971
0.049152
0.425122
0.28399
0.245473
0.190572
0.159241
0.125898
0
0.01118
0.239722
5,765
211
89
27.322275
0.782569
0.113096
0
0.311111
0
0
0.005333
0.005333
0
0
0
0
0
1
0.237037
false
0
0.02963
0.103704
0.533333
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
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
ba3dee974a940c282171ed9e43e895bc5c1ce3fc
370
py
Python
mjpoll/__init__.py
DarkWizarD24/mjpoll
877eb45ca713a2e03a84deff4765f282b870e635
[ "MIT" ]
null
null
null
mjpoll/__init__.py
DarkWizarD24/mjpoll
877eb45ca713a2e03a84deff4765f282b870e635
[ "MIT" ]
null
null
null
mjpoll/__init__.py
DarkWizarD24/mjpoll
877eb45ca713a2e03a84deff4765f282b870e635
[ "MIT" ]
null
null
null
# coding: utf-8 from flask import Flask from flask_babel import Babel from flask_bootstrap import Bootstrap app = Flask(__name__) app.config.from_pyfile('application.cfg') app.secret_key = '_\xeb\xaa9\xea\xb9&\xe8\xdfx\xd4oKu\x01\xf3\x94d\x08\xdeGs\x11<' #TODO get if from config babel = Babel(app) Bootstrap(app) import views import data from data import init_db
19.473684
107
0.775676
61
370
4.540984
0.590164
0.097473
0
0
0
0
0
0
0
0
0
0.043077
0.121622
370
18
108
20.555556
0.809231
0.097297
0
0
0
0.090909
0.23565
0.190332
0
0
0
0.055556
0
1
0
false
0
0.545455
0
0.545455
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
0
0
0
0
null
0
0
1
0
0
0
0
0
1
0
1
0
0
3
ba47aae912bab03eeec32d53c9d7b3b8de1668c7
54,161
py
Python
rubikscolorresolver/cube_555.py
jmsutariya/cube-tracker
2296d68883acbd3430110318420d09f98c186e91
[ "MIT" ]
29
2017-03-03T23:47:53.000Z
2021-12-20T19:43:35.000Z
rubikscolorresolver/cube_555.py
jmsutariya/cube-tracker
2296d68883acbd3430110318420d09f98c186e91
[ "MIT" ]
6
2017-03-12T05:25:27.000Z
2022-03-27T08:20:25.000Z
rubikscolorresolver/cube_555.py
jmsutariya/cube-tracker
2296d68883acbd3430110318420d09f98c186e91
[ "MIT" ]
18
2017-08-31T13:28:58.000Z
2021-12-20T19:43:09.000Z
corner_tuples = ( (1, 26, 105), (5, 101, 80), (21, 51, 30), (25, 76, 55), (126, 50, 71), (130, 75, 96), (146, 125, 46), (150, 100, 121), ) edge_orbit_id = { 2: 0, 3: 1, 4: 0, 6: 0, 11: 1, 16: 0, 10: 0, 15: 1, 20: 0, 22: 0, 23: 1, 24: 0, # Upper 27: 0, 28: 1, 29: 0, 31: 0, 36: 1, 41: 0, 35: 0, 40: 1, 45: 0, 47: 0, 48: 1, 49: 0, # Left 52: 0, 53: 1, 54: 0, 56: 0, 61: 1, 66: 0, 60: 0, 65: 1, 70: 0, 72: 0, 73: 1, 74: 0, # Front 77: 0, 78: 1, 79: 0, 81: 0, 86: 1, 91: 0, 85: 0, 90: 1, 95: 0, 97: 0, 98: 1, 99: 0, # Right 102: 0, 103: 1, 104: 0, 106: 0, 111: 1, 116: 0, 110: 0, 115: 1, 120: 0, 122: 0, 123: 1, 124: 0, # Back 127: 0, 128: 1, 129: 0, 131: 0, 136: 1, 141: 0, 135: 0, 140: 1, 145: 0, 147: 0, 148: 1, 149: 0, # Down } edge_orbit_wing_pairs = ( # orbit 0 ( (2, 104), (4, 102), (6, 27), (16, 29), (10, 79), (20, 77), (22, 52), (24, 54), (31, 110), (41, 120), (35, 56), (45, 66), (81, 60), (91, 70), (85, 106), (95, 116), (72, 127), (74, 129), (131, 49), (141, 47), (135, 97), (145, 99), (147, 124), (149, 122), ), # orbit 1 ( (3, 103), (11, 28), (15, 78), (23, 53), (36, 115), (40, 61), (86, 65), (90, 111), (128, 73), (136, 48), (140, 98), (148, 123), ), ) center_groups = ( ("centers", (13, 38, 63, 88, 113, 138)), ( "x-centers", ( 7, 9, 13, 17, 19, # Upper 32, 34, 38, 42, 44, # Left 57, 59, 63, 67, 69, # Front 82, 84, 88, 92, 94, # Right 107, 109, 113, 117, 119, # Back 132, 134, 138, 142, 144, # Down ), ), ( "t-centers", ( 8, 12, 13, 14, 18, # Upper 33, 37, 38, 39, 43, # Left 58, 62, 63, 64, 68, # Front 83, 87, 88, 89, 93, # Right 108, 112, 113, 114, 118, # Back 133, 137, 138, 139, 143, # Down ), ), ) highlow_edge_values = { (2, 104, "B", "D"): "D", (2, 104, "B", "L"): "D", (2, 104, "B", "R"): "D", (2, 104, "B", "U"): "D", (2, 104, "D", "B"): "U", (2, 104, "D", "F"): "U", (2, 104, "D", "L"): "U", (2, 104, "D", "R"): "U", (2, 104, "F", "D"): "D", (2, 104, "F", "L"): "D", (2, 104, "F", "R"): "D", (2, 104, "F", "U"): "D", (2, 104, "L", "B"): "U", (2, 104, "L", "D"): "D", (2, 104, "L", "F"): "U", (2, 104, "L", "U"): "D", (2, 104, "R", "B"): "U", (2, 104, "R", "D"): "D", (2, 104, "R", "F"): "U", (2, 104, "R", "U"): "D", (2, 104, "U", "B"): "U", (2, 104, "U", "F"): "U", (2, 104, "U", "L"): "U", (2, 104, "U", "R"): "U", (3, 103, "B", "D"): "D", (3, 103, "B", "L"): "D", (3, 103, "B", "R"): "D", (3, 103, "B", "U"): "D", (3, 103, "D", "B"): "U", (3, 103, "D", "F"): "U", (3, 103, "D", "L"): "U", (3, 103, "D", "R"): "U", (3, 103, "F", "D"): "D", (3, 103, "F", "L"): "D", (3, 103, "F", "R"): "D", (3, 103, "F", "U"): "D", (3, 103, "L", "B"): "U", (3, 103, "L", "D"): "D", (3, 103, "L", "F"): "U", (3, 103, "L", "U"): "D", (3, 103, "R", "B"): "U", (3, 103, "R", "D"): "D", (3, 103, "R", "F"): "U", (3, 103, "R", "U"): "D", (3, 103, "U", "B"): "U", (3, 103, "U", "F"): "U", (3, 103, "U", "L"): "U", (3, 103, "U", "R"): "U", (4, 102, "B", "D"): "U", (4, 102, "B", "L"): "U", (4, 102, "B", "R"): "U", (4, 102, "B", "U"): "U", (4, 102, "D", "B"): "D", (4, 102, "D", "F"): "D", (4, 102, "D", "L"): "D", (4, 102, "D", "R"): "D", (4, 102, "F", "D"): "U", (4, 102, "F", "L"): "U", (4, 102, "F", "R"): "U", (4, 102, "F", "U"): "U", (4, 102, "L", "B"): "D", (4, 102, "L", "D"): "U", (4, 102, "L", "F"): "D", (4, 102, "L", "U"): "U", (4, 102, "R", "B"): "D", (4, 102, "R", "D"): "U", (4, 102, "R", "F"): "D", (4, 102, "R", "U"): "U", (4, 102, "U", "B"): "D", (4, 102, "U", "F"): "D", (4, 102, "U", "L"): "D", (4, 102, "U", "R"): "D", (6, 27, "B", "D"): "U", (6, 27, "B", "L"): "U", (6, 27, "B", "R"): "U", (6, 27, "B", "U"): "U", (6, 27, "D", "B"): "D", (6, 27, "D", "F"): "D", (6, 27, "D", "L"): "D", (6, 27, "D", "R"): "D", (6, 27, "F", "D"): "U", (6, 27, "F", "L"): "U", (6, 27, "F", "R"): "U", (6, 27, "F", "U"): "U", (6, 27, "L", "B"): "D", (6, 27, "L", "D"): "U", (6, 27, "L", "F"): "D", (6, 27, "L", "U"): "U", (6, 27, "R", "B"): "D", (6, 27, "R", "D"): "U", (6, 27, "R", "F"): "D", (6, 27, "R", "U"): "U", (6, 27, "U", "B"): "D", (6, 27, "U", "F"): "D", (6, 27, "U", "L"): "D", (6, 27, "U", "R"): "D", (10, 79, "B", "D"): "D", (10, 79, "B", "L"): "D", (10, 79, "B", "R"): "D", (10, 79, "B", "U"): "D", (10, 79, "D", "B"): "U", (10, 79, "D", "F"): "U", (10, 79, "D", "L"): "U", (10, 79, "D", "R"): "U", (10, 79, "F", "D"): "D", (10, 79, "F", "L"): "D", (10, 79, "F", "R"): "D", (10, 79, "F", "U"): "D", (10, 79, "L", "B"): "U", (10, 79, "L", "D"): "D", (10, 79, "L", "F"): "U", (10, 79, "L", "U"): "D", (10, 79, "R", "B"): "U", (10, 79, "R", "D"): "D", (10, 79, "R", "F"): "U", (10, 79, "R", "U"): "D", (10, 79, "U", "B"): "U", (10, 79, "U", "F"): "U", (10, 79, "U", "L"): "U", (10, 79, "U", "R"): "U", (11, 28, "B", "D"): "D", (11, 28, "B", "L"): "D", (11, 28, "B", "R"): "D", (11, 28, "B", "U"): "D", (11, 28, "D", "B"): "U", (11, 28, "D", "F"): "U", (11, 28, "D", "L"): "U", (11, 28, "D", "R"): "U", (11, 28, "F", "D"): "D", (11, 28, "F", "L"): "D", (11, 28, "F", "R"): "D", (11, 28, "F", "U"): "D", (11, 28, "L", "B"): "U", (11, 28, "L", "D"): "D", (11, 28, "L", "F"): "U", (11, 28, "L", "U"): "D", (11, 28, "R", "B"): "U", (11, 28, "R", "D"): "D", (11, 28, "R", "F"): "U", (11, 28, "R", "U"): "D", (11, 28, "U", "B"): "U", (11, 28, "U", "F"): "U", (11, 28, "U", "L"): "U", (11, 28, "U", "R"): "U", (15, 78, "B", "D"): "D", (15, 78, "B", "L"): "D", (15, 78, "B", "R"): "D", (15, 78, "B", "U"): "D", (15, 78, "D", "B"): "U", (15, 78, "D", "F"): "U", (15, 78, "D", "L"): "U", (15, 78, "D", "R"): "U", (15, 78, "F", "D"): "D", (15, 78, "F", "L"): "D", (15, 78, "F", "R"): "D", (15, 78, "F", "U"): "D", (15, 78, "L", "B"): "U", (15, 78, "L", "D"): "D", (15, 78, "L", "F"): "U", (15, 78, "L", "U"): "D", (15, 78, "R", "B"): "U", (15, 78, "R", "D"): "D", (15, 78, "R", "F"): "U", (15, 78, "R", "U"): "D", (15, 78, "U", "B"): "U", (15, 78, "U", "F"): "U", (15, 78, "U", "L"): "U", (15, 78, "U", "R"): "U", (16, 29, "B", "D"): "D", (16, 29, "B", "L"): "D", (16, 29, "B", "R"): "D", (16, 29, "B", "U"): "D", (16, 29, "D", "B"): "U", (16, 29, "D", "F"): "U", (16, 29, "D", "L"): "U", (16, 29, "D", "R"): "U", (16, 29, "F", "D"): "D", (16, 29, "F", "L"): "D", (16, 29, "F", "R"): "D", (16, 29, "F", "U"): "D", (16, 29, "L", "B"): "U", (16, 29, "L", "D"): "D", (16, 29, "L", "F"): "U", (16, 29, "L", "U"): "D", (16, 29, "R", "B"): "U", (16, 29, "R", "D"): "D", (16, 29, "R", "F"): "U", (16, 29, "R", "U"): "D", (16, 29, "U", "B"): "U", (16, 29, "U", "F"): "U", (16, 29, "U", "L"): "U", (16, 29, "U", "R"): "U", (20, 77, "B", "D"): "U", (20, 77, "B", "L"): "U", (20, 77, "B", "R"): "U", (20, 77, "B", "U"): "U", (20, 77, "D", "B"): "D", (20, 77, "D", "F"): "D", (20, 77, "D", "L"): "D", (20, 77, "D", "R"): "D", (20, 77, "F", "D"): "U", (20, 77, "F", "L"): "U", (20, 77, "F", "R"): "U", (20, 77, "F", "U"): "U", (20, 77, "L", "B"): "D", (20, 77, "L", "D"): "U", (20, 77, "L", "F"): "D", (20, 77, "L", "U"): "U", (20, 77, "R", "B"): "D", (20, 77, "R", "D"): "U", (20, 77, "R", "F"): "D", (20, 77, "R", "U"): "U", (20, 77, "U", "B"): "D", (20, 77, "U", "F"): "D", (20, 77, "U", "L"): "D", (20, 77, "U", "R"): "D", (22, 52, "B", "D"): "U", (22, 52, "B", "L"): "U", (22, 52, "B", "R"): "U", (22, 52, "B", "U"): "U", (22, 52, "D", "B"): "D", (22, 52, "D", "F"): "D", (22, 52, "D", "L"): "D", (22, 52, "D", "R"): "D", (22, 52, "F", "D"): "U", (22, 52, "F", "L"): "U", (22, 52, "F", "R"): "U", (22, 52, "F", "U"): "U", (22, 52, "L", "B"): "D", (22, 52, "L", "D"): "U", (22, 52, "L", "F"): "D", (22, 52, "L", "U"): "U", (22, 52, "R", "B"): "D", (22, 52, "R", "D"): "U", (22, 52, "R", "F"): "D", (22, 52, "R", "U"): "U", (22, 52, "U", "B"): "D", (22, 52, "U", "F"): "D", (22, 52, "U", "L"): "D", (22, 52, "U", "R"): "D", (23, 53, "B", "D"): "D", (23, 53, "B", "L"): "D", (23, 53, "B", "R"): "D", (23, 53, "B", "U"): "D", (23, 53, "D", "B"): "U", (23, 53, "D", "F"): "U", (23, 53, "D", "L"): "U", (23, 53, "D", "R"): "U", (23, 53, "F", "D"): "D", (23, 53, "F", "L"): "D", (23, 53, "F", "R"): "D", (23, 53, "F", "U"): "D", (23, 53, "L", "B"): "U", (23, 53, "L", "D"): "D", (23, 53, "L", "F"): "U", (23, 53, "L", "U"): "D", (23, 53, "R", "B"): "U", (23, 53, "R", "D"): "D", (23, 53, "R", "F"): "U", (23, 53, "R", "U"): "D", (23, 53, "U", "B"): "U", (23, 53, "U", "F"): "U", (23, 53, "U", "L"): "U", (23, 53, "U", "R"): "U", (24, 54, "B", "D"): "D", (24, 54, "B", "L"): "D", (24, 54, "B", "R"): "D", (24, 54, "B", "U"): "D", (24, 54, "D", "B"): "U", (24, 54, "D", "F"): "U", (24, 54, "D", "L"): "U", (24, 54, "D", "R"): "U", (24, 54, "F", "D"): "D", (24, 54, "F", "L"): "D", (24, 54, "F", "R"): "D", (24, 54, "F", "U"): "D", (24, 54, "L", "B"): "U", (24, 54, "L", "D"): "D", (24, 54, "L", "F"): "U", (24, 54, "L", "U"): "D", (24, 54, "R", "B"): "U", (24, 54, "R", "D"): "D", (24, 54, "R", "F"): "U", (24, 54, "R", "U"): "D", (24, 54, "U", "B"): "U", (24, 54, "U", "F"): "U", (24, 54, "U", "L"): "U", (24, 54, "U", "R"): "U", (27, 6, "B", "D"): "D", (27, 6, "B", "L"): "D", (27, 6, "B", "R"): "D", (27, 6, "B", "U"): "D", (27, 6, "D", "B"): "U", (27, 6, "D", "F"): "U", (27, 6, "D", "L"): "U", (27, 6, "D", "R"): "U", (27, 6, "F", "D"): "D", (27, 6, "F", "L"): "D", (27, 6, "F", "R"): "D", (27, 6, "F", "U"): "D", (27, 6, "L", "B"): "U", (27, 6, "L", "D"): "D", (27, 6, "L", "F"): "U", (27, 6, "L", "U"): "D", (27, 6, "R", "B"): "U", (27, 6, "R", "D"): "D", (27, 6, "R", "F"): "U", (27, 6, "R", "U"): "D", (27, 6, "U", "B"): "U", (27, 6, "U", "F"): "U", (27, 6, "U", "L"): "U", (27, 6, "U", "R"): "U", (28, 11, "B", "D"): "U", (28, 11, "B", "L"): "U", (28, 11, "B", "R"): "U", (28, 11, "B", "U"): "U", (28, 11, "D", "B"): "D", (28, 11, "D", "F"): "D", (28, 11, "D", "L"): "D", (28, 11, "D", "R"): "D", (28, 11, "F", "D"): "U", (28, 11, "F", "L"): "U", (28, 11, "F", "R"): "U", (28, 11, "F", "U"): "U", (28, 11, "L", "B"): "D", (28, 11, "L", "D"): "U", (28, 11, "L", "F"): "D", (28, 11, "L", "U"): "U", (28, 11, "R", "B"): "D", (28, 11, "R", "D"): "U", (28, 11, "R", "F"): "D", (28, 11, "R", "U"): "U", (28, 11, "U", "B"): "D", (28, 11, "U", "F"): "D", (28, 11, "U", "L"): "D", (28, 11, "U", "R"): "D", (29, 16, "B", "D"): "U", (29, 16, "B", "L"): "U", (29, 16, "B", "R"): "U", (29, 16, "B", "U"): "U", (29, 16, "D", "B"): "D", (29, 16, "D", "F"): "D", (29, 16, "D", "L"): "D", (29, 16, "D", "R"): "D", (29, 16, "F", "D"): "U", (29, 16, "F", "L"): "U", (29, 16, "F", "R"): "U", (29, 16, "F", "U"): "U", (29, 16, "L", "B"): "D", (29, 16, "L", "D"): "U", (29, 16, "L", "F"): "D", (29, 16, "L", "U"): "U", (29, 16, "R", "B"): "D", (29, 16, "R", "D"): "U", (29, 16, "R", "F"): "D", (29, 16, "R", "U"): "U", (29, 16, "U", "B"): "D", (29, 16, "U", "F"): "D", (29, 16, "U", "L"): "D", (29, 16, "U", "R"): "D", (31, 110, "B", "D"): "U", (31, 110, "B", "L"): "U", (31, 110, "B", "R"): "U", (31, 110, "B", "U"): "U", (31, 110, "D", "B"): "D", (31, 110, "D", "F"): "D", (31, 110, "D", "L"): "D", (31, 110, "D", "R"): "D", (31, 110, "F", "D"): "U", (31, 110, "F", "L"): "U", (31, 110, "F", "R"): "U", (31, 110, "F", "U"): "U", (31, 110, "L", "B"): "D", (31, 110, "L", "D"): "U", (31, 110, "L", "F"): "D", (31, 110, "L", "U"): "U", (31, 110, "R", "B"): "D", (31, 110, "R", "D"): "U", (31, 110, "R", "F"): "D", (31, 110, "R", "U"): "U", (31, 110, "U", "B"): "D", (31, 110, "U", "F"): "D", (31, 110, "U", "L"): "D", (31, 110, "U", "R"): "D", (35, 56, "B", "D"): "D", (35, 56, "B", "L"): "D", (35, 56, "B", "R"): "D", (35, 56, "B", "U"): "D", (35, 56, "D", "B"): "U", (35, 56, "D", "F"): "U", (35, 56, "D", "L"): "U", (35, 56, "D", "R"): "U", (35, 56, "F", "D"): "D", (35, 56, "F", "L"): "D", (35, 56, "F", "R"): "D", (35, 56, "F", "U"): "D", (35, 56, "L", "B"): "U", (35, 56, "L", "D"): "D", (35, 56, "L", "F"): "U", (35, 56, "L", "U"): "D", (35, 56, "R", "B"): "U", (35, 56, "R", "D"): "D", (35, 56, "R", "F"): "U", (35, 56, "R", "U"): "D", (35, 56, "U", "B"): "U", (35, 56, "U", "F"): "U", (35, 56, "U", "L"): "U", (35, 56, "U", "R"): "U", (36, 115, "B", "D"): "D", (36, 115, "B", "L"): "D", (36, 115, "B", "R"): "D", (36, 115, "B", "U"): "D", (36, 115, "D", "B"): "U", (36, 115, "D", "F"): "U", (36, 115, "D", "L"): "U", (36, 115, "D", "R"): "U", (36, 115, "F", "D"): "D", (36, 115, "F", "L"): "D", (36, 115, "F", "R"): "D", (36, 115, "F", "U"): "D", (36, 115, "L", "B"): "U", (36, 115, "L", "D"): "D", (36, 115, "L", "F"): "U", (36, 115, "L", "U"): "D", (36, 115, "R", "B"): "U", (36, 115, "R", "D"): "D", (36, 115, "R", "F"): "U", (36, 115, "R", "U"): "D", (36, 115, "U", "B"): "U", (36, 115, "U", "F"): "U", (36, 115, "U", "L"): "U", (36, 115, "U", "R"): "U", (40, 61, "B", "D"): "D", (40, 61, "B", "L"): "D", (40, 61, "B", "R"): "D", (40, 61, "B", "U"): "D", (40, 61, "D", "B"): "U", (40, 61, "D", "F"): "U", (40, 61, "D", "L"): "U", (40, 61, "D", "R"): "U", (40, 61, "F", "D"): "D", (40, 61, "F", "L"): "D", (40, 61, "F", "R"): "D", (40, 61, "F", "U"): "D", (40, 61, "L", "B"): "U", (40, 61, "L", "D"): "D", (40, 61, "L", "F"): "U", (40, 61, "L", "U"): "D", (40, 61, "R", "B"): "U", (40, 61, "R", "D"): "D", (40, 61, "R", "F"): "U", (40, 61, "R", "U"): "D", (40, 61, "U", "B"): "U", (40, 61, "U", "F"): "U", (40, 61, "U", "L"): "U", (40, 61, "U", "R"): "U", (41, 120, "B", "D"): "D", (41, 120, "B", "L"): "D", (41, 120, "B", "R"): "D", (41, 120, "B", "U"): "D", (41, 120, "D", "B"): "U", (41, 120, "D", "F"): "U", (41, 120, "D", "L"): "U", (41, 120, "D", "R"): "U", (41, 120, "F", "D"): "D", (41, 120, "F", "L"): "D", (41, 120, "F", "R"): "D", (41, 120, "F", "U"): "D", (41, 120, "L", "B"): "U", (41, 120, "L", "D"): "D", (41, 120, "L", "F"): "U", (41, 120, "L", "U"): "D", (41, 120, "R", "B"): "U", (41, 120, "R", "D"): "D", (41, 120, "R", "F"): "U", (41, 120, "R", "U"): "D", (41, 120, "U", "B"): "U", (41, 120, "U", "F"): "U", (41, 120, "U", "L"): "U", (41, 120, "U", "R"): "U", (45, 66, "B", "D"): "U", (45, 66, "B", "L"): "U", (45, 66, "B", "R"): "U", (45, 66, "B", "U"): "U", (45, 66, "D", "B"): "D", (45, 66, "D", "F"): "D", (45, 66, "D", "L"): "D", (45, 66, "D", "R"): "D", (45, 66, "F", "D"): "U", (45, 66, "F", "L"): "U", (45, 66, "F", "R"): "U", (45, 66, "F", "U"): "U", (45, 66, "L", "B"): "D", (45, 66, "L", "D"): "U", (45, 66, "L", "F"): "D", (45, 66, "L", "U"): "U", (45, 66, "R", "B"): "D", (45, 66, "R", "D"): "U", (45, 66, "R", "F"): "D", (45, 66, "R", "U"): "U", (45, 66, "U", "B"): "D", (45, 66, "U", "F"): "D", (45, 66, "U", "L"): "D", (45, 66, "U", "R"): "D", (47, 141, "B", "D"): "U", (47, 141, "B", "L"): "U", (47, 141, "B", "R"): "U", (47, 141, "B", "U"): "U", (47, 141, "D", "B"): "D", (47, 141, "D", "F"): "D", (47, 141, "D", "L"): "D", (47, 141, "D", "R"): "D", (47, 141, "F", "D"): "U", (47, 141, "F", "L"): "U", (47, 141, "F", "R"): "U", (47, 141, "F", "U"): "U", (47, 141, "L", "B"): "D", (47, 141, "L", "D"): "U", (47, 141, "L", "F"): "D", (47, 141, "L", "U"): "U", (47, 141, "R", "B"): "D", (47, 141, "R", "D"): "U", (47, 141, "R", "F"): "D", (47, 141, "R", "U"): "U", (47, 141, "U", "B"): "D", (47, 141, "U", "F"): "D", (47, 141, "U", "L"): "D", (47, 141, "U", "R"): "D", (48, 136, "B", "D"): "U", (48, 136, "B", "L"): "U", (48, 136, "B", "R"): "U", (48, 136, "B", "U"): "U", (48, 136, "D", "B"): "D", (48, 136, "D", "F"): "D", (48, 136, "D", "L"): "D", (48, 136, "D", "R"): "D", (48, 136, "F", "D"): "U", (48, 136, "F", "L"): "U", (48, 136, "F", "R"): "U", (48, 136, "F", "U"): "U", (48, 136, "L", "B"): "D", (48, 136, "L", "D"): "U", (48, 136, "L", "F"): "D", (48, 136, "L", "U"): "U", (48, 136, "R", "B"): "D", (48, 136, "R", "D"): "U", (48, 136, "R", "F"): "D", (48, 136, "R", "U"): "U", (48, 136, "U", "B"): "D", (48, 136, "U", "F"): "D", (48, 136, "U", "L"): "D", (48, 136, "U", "R"): "D", (49, 131, "B", "D"): "D", (49, 131, "B", "L"): "D", (49, 131, "B", "R"): "D", (49, 131, "B", "U"): "D", (49, 131, "D", "B"): "U", (49, 131, "D", "F"): "U", (49, 131, "D", "L"): "U", (49, 131, "D", "R"): "U", (49, 131, "F", "D"): "D", (49, 131, "F", "L"): "D", (49, 131, "F", "R"): "D", (49, 131, "F", "U"): "D", (49, 131, "L", "B"): "U", (49, 131, "L", "D"): "D", (49, 131, "L", "F"): "U", (49, 131, "L", "U"): "D", (49, 131, "R", "B"): "U", (49, 131, "R", "D"): "D", (49, 131, "R", "F"): "U", (49, 131, "R", "U"): "D", (49, 131, "U", "B"): "U", (49, 131, "U", "F"): "U", (49, 131, "U", "L"): "U", (49, 131, "U", "R"): "U", (52, 22, "B", "D"): "D", (52, 22, "B", "L"): "D", (52, 22, "B", "R"): "D", (52, 22, "B", "U"): "D", (52, 22, "D", "B"): "U", (52, 22, "D", "F"): "U", (52, 22, "D", "L"): "U", (52, 22, "D", "R"): "U", (52, 22, "F", "D"): "D", (52, 22, "F", "L"): "D", (52, 22, "F", "R"): "D", (52, 22, "F", "U"): "D", (52, 22, "L", "B"): "U", (52, 22, "L", "D"): "D", (52, 22, "L", "F"): "U", (52, 22, "L", "U"): "D", (52, 22, "R", "B"): "U", (52, 22, "R", "D"): "D", (52, 22, "R", "F"): "U", (52, 22, "R", "U"): "D", (52, 22, "U", "B"): "U", (52, 22, "U", "F"): "U", (52, 22, "U", "L"): "U", (52, 22, "U", "R"): "U", (53, 23, "B", "D"): "U", (53, 23, "B", "L"): "U", (53, 23, "B", "R"): "U", (53, 23, "B", "U"): "U", (53, 23, "D", "B"): "D", (53, 23, "D", "F"): "D", (53, 23, "D", "L"): "D", (53, 23, "D", "R"): "D", (53, 23, "F", "D"): "U", (53, 23, "F", "L"): "U", (53, 23, "F", "R"): "U", (53, 23, "F", "U"): "U", (53, 23, "L", "B"): "D", (53, 23, "L", "D"): "U", (53, 23, "L", "F"): "D", (53, 23, "L", "U"): "U", (53, 23, "R", "B"): "D", (53, 23, "R", "D"): "U", (53, 23, "R", "F"): "D", (53, 23, "R", "U"): "U", (53, 23, "U", "B"): "D", (53, 23, "U", "F"): "D", (53, 23, "U", "L"): "D", (53, 23, "U", "R"): "D", (54, 24, "B", "D"): "U", (54, 24, "B", "L"): "U", (54, 24, "B", "R"): "U", (54, 24, "B", "U"): "U", (54, 24, "D", "B"): "D", (54, 24, "D", "F"): "D", (54, 24, "D", "L"): "D", (54, 24, "D", "R"): "D", (54, 24, "F", "D"): "U", (54, 24, "F", "L"): "U", (54, 24, "F", "R"): "U", (54, 24, "F", "U"): "U", (54, 24, "L", "B"): "D", (54, 24, "L", "D"): "U", (54, 24, "L", "F"): "D", (54, 24, "L", "U"): "U", (54, 24, "R", "B"): "D", (54, 24, "R", "D"): "U", (54, 24, "R", "F"): "D", (54, 24, "R", "U"): "U", (54, 24, "U", "B"): "D", (54, 24, "U", "F"): "D", (54, 24, "U", "L"): "D", (54, 24, "U", "R"): "D", (56, 35, "B", "D"): "U", (56, 35, "B", "L"): "U", (56, 35, "B", "R"): "U", (56, 35, "B", "U"): "U", (56, 35, "D", "B"): "D", (56, 35, "D", "F"): "D", (56, 35, "D", "L"): "D", (56, 35, "D", "R"): "D", (56, 35, "F", "D"): "U", (56, 35, "F", "L"): "U", (56, 35, "F", "R"): "U", (56, 35, "F", "U"): "U", (56, 35, "L", "B"): "D", (56, 35, "L", "D"): "U", (56, 35, "L", "F"): "D", (56, 35, "L", "U"): "U", (56, 35, "R", "B"): "D", (56, 35, "R", "D"): "U", (56, 35, "R", "F"): "D", (56, 35, "R", "U"): "U", (56, 35, "U", "B"): "D", (56, 35, "U", "F"): "D", (56, 35, "U", "L"): "D", (56, 35, "U", "R"): "D", (60, 81, "B", "D"): "D", (60, 81, "B", "L"): "D", (60, 81, "B", "R"): "D", (60, 81, "B", "U"): "D", (60, 81, "D", "B"): "U", (60, 81, "D", "F"): "U", (60, 81, "D", "L"): "U", (60, 81, "D", "R"): "U", (60, 81, "F", "D"): "D", (60, 81, "F", "L"): "D", (60, 81, "F", "R"): "D", (60, 81, "F", "U"): "D", (60, 81, "L", "B"): "U", (60, 81, "L", "D"): "D", (60, 81, "L", "F"): "U", (60, 81, "L", "U"): "D", (60, 81, "R", "B"): "U", (60, 81, "R", "D"): "D", (60, 81, "R", "F"): "U", (60, 81, "R", "U"): "D", (60, 81, "U", "B"): "U", (60, 81, "U", "F"): "U", (60, 81, "U", "L"): "U", (60, 81, "U", "R"): "U", (61, 40, "B", "D"): "U", (61, 40, "B", "L"): "U", (61, 40, "B", "R"): "U", (61, 40, "B", "U"): "U", (61, 40, "D", "B"): "D", (61, 40, "D", "F"): "D", (61, 40, "D", "L"): "D", (61, 40, "D", "R"): "D", (61, 40, "F", "D"): "U", (61, 40, "F", "L"): "U", (61, 40, "F", "R"): "U", (61, 40, "F", "U"): "U", (61, 40, "L", "B"): "D", (61, 40, "L", "D"): "U", (61, 40, "L", "F"): "D", (61, 40, "L", "U"): "U", (61, 40, "R", "B"): "D", (61, 40, "R", "D"): "U", (61, 40, "R", "F"): "D", (61, 40, "R", "U"): "U", (61, 40, "U", "B"): "D", (61, 40, "U", "F"): "D", (61, 40, "U", "L"): "D", (61, 40, "U", "R"): "D", (65, 86, "B", "D"): "U", (65, 86, "B", "L"): "U", (65, 86, "B", "R"): "U", (65, 86, "B", "U"): "U", (65, 86, "D", "B"): "D", (65, 86, "D", "F"): "D", (65, 86, "D", "L"): "D", (65, 86, "D", "R"): "D", (65, 86, "F", "D"): "U", (65, 86, "F", "L"): "U", (65, 86, "F", "R"): "U", (65, 86, "F", "U"): "U", (65, 86, "L", "B"): "D", (65, 86, "L", "D"): "U", (65, 86, "L", "F"): "D", (65, 86, "L", "U"): "U", (65, 86, "R", "B"): "D", (65, 86, "R", "D"): "U", (65, 86, "R", "F"): "D", (65, 86, "R", "U"): "U", (65, 86, "U", "B"): "D", (65, 86, "U", "F"): "D", (65, 86, "U", "L"): "D", (65, 86, "U", "R"): "D", (66, 45, "B", "D"): "D", (66, 45, "B", "L"): "D", (66, 45, "B", "R"): "D", (66, 45, "B", "U"): "D", (66, 45, "D", "B"): "U", (66, 45, "D", "F"): "U", (66, 45, "D", "L"): "U", (66, 45, "D", "R"): "U", (66, 45, "F", "D"): "D", (66, 45, "F", "L"): "D", (66, 45, "F", "R"): "D", (66, 45, "F", "U"): "D", (66, 45, "L", "B"): "U", (66, 45, "L", "D"): "D", (66, 45, "L", "F"): "U", (66, 45, "L", "U"): "D", (66, 45, "R", "B"): "U", (66, 45, "R", "D"): "D", (66, 45, "R", "F"): "U", (66, 45, "R", "U"): "D", (66, 45, "U", "B"): "U", (66, 45, "U", "F"): "U", (66, 45, "U", "L"): "U", (66, 45, "U", "R"): "U", (70, 91, "B", "D"): "U", (70, 91, "B", "L"): "U", (70, 91, "B", "R"): "U", (70, 91, "B", "U"): "U", (70, 91, "D", "B"): "D", (70, 91, "D", "F"): "D", (70, 91, "D", "L"): "D", (70, 91, "D", "R"): "D", (70, 91, "F", "D"): "U", (70, 91, "F", "L"): "U", (70, 91, "F", "R"): "U", (70, 91, "F", "U"): "U", (70, 91, "L", "B"): "D", (70, 91, "L", "D"): "U", (70, 91, "L", "F"): "D", (70, 91, "L", "U"): "U", (70, 91, "R", "B"): "D", (70, 91, "R", "D"): "U", (70, 91, "R", "F"): "D", (70, 91, "R", "U"): "U", (70, 91, "U", "B"): "D", (70, 91, "U", "F"): "D", (70, 91, "U", "L"): "D", (70, 91, "U", "R"): "D", (72, 127, "B", "D"): "U", (72, 127, "B", "L"): "U", (72, 127, "B", "R"): "U", (72, 127, "B", "U"): "U", (72, 127, "D", "B"): "D", (72, 127, "D", "F"): "D", (72, 127, "D", "L"): "D", (72, 127, "D", "R"): "D", (72, 127, "F", "D"): "U", (72, 127, "F", "L"): "U", (72, 127, "F", "R"): "U", (72, 127, "F", "U"): "U", (72, 127, "L", "B"): "D", (72, 127, "L", "D"): "U", (72, 127, "L", "F"): "D", (72, 127, "L", "U"): "U", (72, 127, "R", "B"): "D", (72, 127, "R", "D"): "U", (72, 127, "R", "F"): "D", (72, 127, "R", "U"): "U", (72, 127, "U", "B"): "D", (72, 127, "U", "F"): "D", (72, 127, "U", "L"): "D", (72, 127, "U", "R"): "D", (73, 128, "B", "D"): "U", (73, 128, "B", "L"): "U", (73, 128, "B", "R"): "U", (73, 128, "B", "U"): "U", (73, 128, "D", "B"): "D", (73, 128, "D", "F"): "D", (73, 128, "D", "L"): "D", (73, 128, "D", "R"): "D", (73, 128, "F", "D"): "U", (73, 128, "F", "L"): "U", (73, 128, "F", "R"): "U", (73, 128, "F", "U"): "U", (73, 128, "L", "B"): "D", (73, 128, "L", "D"): "U", (73, 128, "L", "F"): "D", (73, 128, "L", "U"): "U", (73, 128, "R", "B"): "D", (73, 128, "R", "D"): "U", (73, 128, "R", "F"): "D", (73, 128, "R", "U"): "U", (73, 128, "U", "B"): "D", (73, 128, "U", "F"): "D", (73, 128, "U", "L"): "D", (73, 128, "U", "R"): "D", (74, 129, "B", "D"): "D", (74, 129, "B", "L"): "D", (74, 129, "B", "R"): "D", (74, 129, "B", "U"): "D", (74, 129, "D", "B"): "U", (74, 129, "D", "F"): "U", (74, 129, "D", "L"): "U", (74, 129, "D", "R"): "U", (74, 129, "F", "D"): "D", (74, 129, "F", "L"): "D", (74, 129, "F", "R"): "D", (74, 129, "F", "U"): "D", (74, 129, "L", "B"): "U", (74, 129, "L", "D"): "D", (74, 129, "L", "F"): "U", (74, 129, "L", "U"): "D", (74, 129, "R", "B"): "U", (74, 129, "R", "D"): "D", (74, 129, "R", "F"): "U", (74, 129, "R", "U"): "D", (74, 129, "U", "B"): "U", (74, 129, "U", "F"): "U", (74, 129, "U", "L"): "U", (74, 129, "U", "R"): "U", (77, 20, "B", "D"): "D", (77, 20, "B", "L"): "D", (77, 20, "B", "R"): "D", (77, 20, "B", "U"): "D", (77, 20, "D", "B"): "U", (77, 20, "D", "F"): "U", (77, 20, "D", "L"): "U", (77, 20, "D", "R"): "U", (77, 20, "F", "D"): "D", (77, 20, "F", "L"): "D", (77, 20, "F", "R"): "D", (77, 20, "F", "U"): "D", (77, 20, "L", "B"): "U", (77, 20, "L", "D"): "D", (77, 20, "L", "F"): "U", (77, 20, "L", "U"): "D", (77, 20, "R", "B"): "U", (77, 20, "R", "D"): "D", (77, 20, "R", "F"): "U", (77, 20, "R", "U"): "D", (77, 20, "U", "B"): "U", (77, 20, "U", "F"): "U", (77, 20, "U", "L"): "U", (77, 20, "U", "R"): "U", (78, 15, "B", "D"): "U", (78, 15, "B", "L"): "U", (78, 15, "B", "R"): "U", (78, 15, "B", "U"): "U", (78, 15, "D", "B"): "D", (78, 15, "D", "F"): "D", (78, 15, "D", "L"): "D", (78, 15, "D", "R"): "D", (78, 15, "F", "D"): "U", (78, 15, "F", "L"): "U", (78, 15, "F", "R"): "U", (78, 15, "F", "U"): "U", (78, 15, "L", "B"): "D", (78, 15, "L", "D"): "U", (78, 15, "L", "F"): "D", (78, 15, "L", "U"): "U", (78, 15, "R", "B"): "D", (78, 15, "R", "D"): "U", (78, 15, "R", "F"): "D", (78, 15, "R", "U"): "U", (78, 15, "U", "B"): "D", (78, 15, "U", "F"): "D", (78, 15, "U", "L"): "D", (78, 15, "U", "R"): "D", (79, 10, "B", "D"): "U", (79, 10, "B", "L"): "U", (79, 10, "B", "R"): "U", (79, 10, "B", "U"): "U", (79, 10, "D", "B"): "D", (79, 10, "D", "F"): "D", (79, 10, "D", "L"): "D", (79, 10, "D", "R"): "D", (79, 10, "F", "D"): "U", (79, 10, "F", "L"): "U", (79, 10, "F", "R"): "U", (79, 10, "F", "U"): "U", (79, 10, "L", "B"): "D", (79, 10, "L", "D"): "U", (79, 10, "L", "F"): "D", (79, 10, "L", "U"): "U", (79, 10, "R", "B"): "D", (79, 10, "R", "D"): "U", (79, 10, "R", "F"): "D", (79, 10, "R", "U"): "U", (79, 10, "U", "B"): "D", (79, 10, "U", "F"): "D", (79, 10, "U", "L"): "D", (79, 10, "U", "R"): "D", (81, 60, "B", "D"): "U", (81, 60, "B", "L"): "U", (81, 60, "B", "R"): "U", (81, 60, "B", "U"): "U", (81, 60, "D", "B"): "D", (81, 60, "D", "F"): "D", (81, 60, "D", "L"): "D", (81, 60, "D", "R"): "D", (81, 60, "F", "D"): "U", (81, 60, "F", "L"): "U", (81, 60, "F", "R"): "U", (81, 60, "F", "U"): "U", (81, 60, "L", "B"): "D", (81, 60, "L", "D"): "U", (81, 60, "L", "F"): "D", (81, 60, "L", "U"): "U", (81, 60, "R", "B"): "D", (81, 60, "R", "D"): "U", (81, 60, "R", "F"): "D", (81, 60, "R", "U"): "U", (81, 60, "U", "B"): "D", (81, 60, "U", "F"): "D", (81, 60, "U", "L"): "D", (81, 60, "U", "R"): "D", (85, 106, "B", "D"): "D", (85, 106, "B", "L"): "D", (85, 106, "B", "R"): "D", (85, 106, "B", "U"): "D", (85, 106, "D", "B"): "U", (85, 106, "D", "F"): "U", (85, 106, "D", "L"): "U", (85, 106, "D", "R"): "U", (85, 106, "F", "D"): "D", (85, 106, "F", "L"): "D", (85, 106, "F", "R"): "D", (85, 106, "F", "U"): "D", (85, 106, "L", "B"): "U", (85, 106, "L", "D"): "D", (85, 106, "L", "F"): "U", (85, 106, "L", "U"): "D", (85, 106, "R", "B"): "U", (85, 106, "R", "D"): "D", (85, 106, "R", "F"): "U", (85, 106, "R", "U"): "D", (85, 106, "U", "B"): "U", (85, 106, "U", "F"): "U", (85, 106, "U", "L"): "U", (85, 106, "U", "R"): "U", (86, 65, "B", "D"): "D", (86, 65, "B", "L"): "D", (86, 65, "B", "R"): "D", (86, 65, "B", "U"): "D", (86, 65, "D", "B"): "U", (86, 65, "D", "F"): "U", (86, 65, "D", "L"): "U", (86, 65, "D", "R"): "U", (86, 65, "F", "D"): "D", (86, 65, "F", "L"): "D", (86, 65, "F", "R"): "D", (86, 65, "F", "U"): "D", (86, 65, "L", "B"): "U", (86, 65, "L", "D"): "D", (86, 65, "L", "F"): "U", (86, 65, "L", "U"): "D", (86, 65, "R", "B"): "U", (86, 65, "R", "D"): "D", (86, 65, "R", "F"): "U", (86, 65, "R", "U"): "D", (86, 65, "U", "B"): "U", (86, 65, "U", "F"): "U", (86, 65, "U", "L"): "U", (86, 65, "U", "R"): "U", (90, 111, "B", "D"): "D", (90, 111, "B", "L"): "D", (90, 111, "B", "R"): "D", (90, 111, "B", "U"): "D", (90, 111, "D", "B"): "U", (90, 111, "D", "F"): "U", (90, 111, "D", "L"): "U", (90, 111, "D", "R"): "U", (90, 111, "F", "D"): "D", (90, 111, "F", "L"): "D", (90, 111, "F", "R"): "D", (90, 111, "F", "U"): "D", (90, 111, "L", "B"): "U", (90, 111, "L", "D"): "D", (90, 111, "L", "F"): "U", (90, 111, "L", "U"): "D", (90, 111, "R", "B"): "U", (90, 111, "R", "D"): "D", (90, 111, "R", "F"): "U", (90, 111, "R", "U"): "D", (90, 111, "U", "B"): "U", (90, 111, "U", "F"): "U", (90, 111, "U", "L"): "U", (90, 111, "U", "R"): "U", (91, 70, "B", "D"): "D", (91, 70, "B", "L"): "D", (91, 70, "B", "R"): "D", (91, 70, "B", "U"): "D", (91, 70, "D", "B"): "U", (91, 70, "D", "F"): "U", (91, 70, "D", "L"): "U", (91, 70, "D", "R"): "U", (91, 70, "F", "D"): "D", (91, 70, "F", "L"): "D", (91, 70, "F", "R"): "D", (91, 70, "F", "U"): "D", (91, 70, "L", "B"): "U", (91, 70, "L", "D"): "D", (91, 70, "L", "F"): "U", (91, 70, "L", "U"): "D", (91, 70, "R", "B"): "U", (91, 70, "R", "D"): "D", (91, 70, "R", "F"): "U", (91, 70, "R", "U"): "D", (91, 70, "U", "B"): "U", (91, 70, "U", "F"): "U", (91, 70, "U", "L"): "U", (91, 70, "U", "R"): "U", (95, 116, "B", "D"): "U", (95, 116, "B", "L"): "U", (95, 116, "B", "R"): "U", (95, 116, "B", "U"): "U", (95, 116, "D", "B"): "D", (95, 116, "D", "F"): "D", (95, 116, "D", "L"): "D", (95, 116, "D", "R"): "D", (95, 116, "F", "D"): "U", (95, 116, "F", "L"): "U", (95, 116, "F", "R"): "U", (95, 116, "F", "U"): "U", (95, 116, "L", "B"): "D", (95, 116, "L", "D"): "U", (95, 116, "L", "F"): "D", (95, 116, "L", "U"): "U", (95, 116, "R", "B"): "D", (95, 116, "R", "D"): "U", (95, 116, "R", "F"): "D", (95, 116, "R", "U"): "U", (95, 116, "U", "B"): "D", (95, 116, "U", "F"): "D", (95, 116, "U", "L"): "D", (95, 116, "U", "R"): "D", (97, 135, "B", "D"): "U", (97, 135, "B", "L"): "U", (97, 135, "B", "R"): "U", (97, 135, "B", "U"): "U", (97, 135, "D", "B"): "D", (97, 135, "D", "F"): "D", (97, 135, "D", "L"): "D", (97, 135, "D", "R"): "D", (97, 135, "F", "D"): "U", (97, 135, "F", "L"): "U", (97, 135, "F", "R"): "U", (97, 135, "F", "U"): "U", (97, 135, "L", "B"): "D", (97, 135, "L", "D"): "U", (97, 135, "L", "F"): "D", (97, 135, "L", "U"): "U", (97, 135, "R", "B"): "D", (97, 135, "R", "D"): "U", (97, 135, "R", "F"): "D", (97, 135, "R", "U"): "U", (97, 135, "U", "B"): "D", (97, 135, "U", "F"): "D", (97, 135, "U", "L"): "D", (97, 135, "U", "R"): "D", (98, 140, "B", "D"): "U", (98, 140, "B", "L"): "U", (98, 140, "B", "R"): "U", (98, 140, "B", "U"): "U", (98, 140, "D", "B"): "D", (98, 140, "D", "F"): "D", (98, 140, "D", "L"): "D", (98, 140, "D", "R"): "D", (98, 140, "F", "D"): "U", (98, 140, "F", "L"): "U", (98, 140, "F", "R"): "U", (98, 140, "F", "U"): "U", (98, 140, "L", "B"): "D", (98, 140, "L", "D"): "U", (98, 140, "L", "F"): "D", (98, 140, "L", "U"): "U", (98, 140, "R", "B"): "D", (98, 140, "R", "D"): "U", (98, 140, "R", "F"): "D", (98, 140, "R", "U"): "U", (98, 140, "U", "B"): "D", (98, 140, "U", "F"): "D", (98, 140, "U", "L"): "D", (98, 140, "U", "R"): "D", (99, 145, "B", "D"): "D", (99, 145, "B", "L"): "D", (99, 145, "B", "R"): "D", (99, 145, "B", "U"): "D", (99, 145, "D", "B"): "U", (99, 145, "D", "F"): "U", (99, 145, "D", "L"): "U", (99, 145, "D", "R"): "U", (99, 145, "F", "D"): "D", (99, 145, "F", "L"): "D", (99, 145, "F", "R"): "D", (99, 145, "F", "U"): "D", (99, 145, "L", "B"): "U", (99, 145, "L", "D"): "D", (99, 145, "L", "F"): "U", (99, 145, "L", "U"): "D", (99, 145, "R", "B"): "U", (99, 145, "R", "D"): "D", (99, 145, "R", "F"): "U", (99, 145, "R", "U"): "D", (99, 145, "U", "B"): "U", (99, 145, "U", "F"): "U", (99, 145, "U", "L"): "U", (99, 145, "U", "R"): "U", (102, 4, "B", "D"): "D", (102, 4, "B", "L"): "D", (102, 4, "B", "R"): "D", (102, 4, "B", "U"): "D", (102, 4, "D", "B"): "U", (102, 4, "D", "F"): "U", (102, 4, "D", "L"): "U", (102, 4, "D", "R"): "U", (102, 4, "F", "D"): "D", (102, 4, "F", "L"): "D", (102, 4, "F", "R"): "D", (102, 4, "F", "U"): "D", (102, 4, "L", "B"): "U", (102, 4, "L", "D"): "D", (102, 4, "L", "F"): "U", (102, 4, "L", "U"): "D", (102, 4, "R", "B"): "U", (102, 4, "R", "D"): "D", (102, 4, "R", "F"): "U", (102, 4, "R", "U"): "D", (102, 4, "U", "B"): "U", (102, 4, "U", "F"): "U", (102, 4, "U", "L"): "U", (102, 4, "U", "R"): "U", (103, 3, "B", "D"): "U", (103, 3, "B", "L"): "U", (103, 3, "B", "R"): "U", (103, 3, "B", "U"): "U", (103, 3, "D", "B"): "D", (103, 3, "D", "F"): "D", (103, 3, "D", "L"): "D", (103, 3, "D", "R"): "D", (103, 3, "F", "D"): "U", (103, 3, "F", "L"): "U", (103, 3, "F", "R"): "U", (103, 3, "F", "U"): "U", (103, 3, "L", "B"): "D", (103, 3, "L", "D"): "U", (103, 3, "L", "F"): "D", (103, 3, "L", "U"): "U", (103, 3, "R", "B"): "D", (103, 3, "R", "D"): "U", (103, 3, "R", "F"): "D", (103, 3, "R", "U"): "U", (103, 3, "U", "B"): "D", (103, 3, "U", "F"): "D", (103, 3, "U", "L"): "D", (103, 3, "U", "R"): "D", (104, 2, "B", "D"): "U", (104, 2, "B", "L"): "U", (104, 2, "B", "R"): "U", (104, 2, "B", "U"): "U", (104, 2, "D", "B"): "D", (104, 2, "D", "F"): "D", (104, 2, "D", "L"): "D", (104, 2, "D", "R"): "D", (104, 2, "F", "D"): "U", (104, 2, "F", "L"): "U", (104, 2, "F", "R"): "U", (104, 2, "F", "U"): "U", (104, 2, "L", "B"): "D", (104, 2, "L", "D"): "U", (104, 2, "L", "F"): "D", (104, 2, "L", "U"): "U", (104, 2, "R", "B"): "D", (104, 2, "R", "D"): "U", (104, 2, "R", "F"): "D", (104, 2, "R", "U"): "U", (104, 2, "U", "B"): "D", (104, 2, "U", "F"): "D", (104, 2, "U", "L"): "D", (104, 2, "U", "R"): "D", (106, 85, "B", "D"): "U", (106, 85, "B", "L"): "U", (106, 85, "B", "R"): "U", (106, 85, "B", "U"): "U", (106, 85, "D", "B"): "D", (106, 85, "D", "F"): "D", (106, 85, "D", "L"): "D", (106, 85, "D", "R"): "D", (106, 85, "F", "D"): "U", (106, 85, "F", "L"): "U", (106, 85, "F", "R"): "U", (106, 85, "F", "U"): "U", (106, 85, "L", "B"): "D", (106, 85, "L", "D"): "U", (106, 85, "L", "F"): "D", (106, 85, "L", "U"): "U", (106, 85, "R", "B"): "D", (106, 85, "R", "D"): "U", (106, 85, "R", "F"): "D", (106, 85, "R", "U"): "U", (106, 85, "U", "B"): "D", (106, 85, "U", "F"): "D", (106, 85, "U", "L"): "D", (106, 85, "U", "R"): "D", (110, 31, "B", "D"): "D", (110, 31, "B", "L"): "D", (110, 31, "B", "R"): "D", (110, 31, "B", "U"): "D", (110, 31, "D", "B"): "U", (110, 31, "D", "F"): "U", (110, 31, "D", "L"): "U", (110, 31, "D", "R"): "U", (110, 31, "F", "D"): "D", (110, 31, "F", "L"): "D", (110, 31, "F", "R"): "D", (110, 31, "F", "U"): "D", (110, 31, "L", "B"): "U", (110, 31, "L", "D"): "D", (110, 31, "L", "F"): "U", (110, 31, "L", "U"): "D", (110, 31, "R", "B"): "U", (110, 31, "R", "D"): "D", (110, 31, "R", "F"): "U", (110, 31, "R", "U"): "D", (110, 31, "U", "B"): "U", (110, 31, "U", "F"): "U", (110, 31, "U", "L"): "U", (110, 31, "U", "R"): "U", (111, 90, "B", "D"): "U", (111, 90, "B", "L"): "U", (111, 90, "B", "R"): "U", (111, 90, "B", "U"): "U", (111, 90, "D", "B"): "D", (111, 90, "D", "F"): "D", (111, 90, "D", "L"): "D", (111, 90, "D", "R"): "D", (111, 90, "F", "D"): "U", (111, 90, "F", "L"): "U", (111, 90, "F", "R"): "U", (111, 90, "F", "U"): "U", (111, 90, "L", "B"): "D", (111, 90, "L", "D"): "U", (111, 90, "L", "F"): "D", (111, 90, "L", "U"): "U", (111, 90, "R", "B"): "D", (111, 90, "R", "D"): "U", (111, 90, "R", "F"): "D", (111, 90, "R", "U"): "U", (111, 90, "U", "B"): "D", (111, 90, "U", "F"): "D", (111, 90, "U", "L"): "D", (111, 90, "U", "R"): "D", (115, 36, "B", "D"): "U", (115, 36, "B", "L"): "U", (115, 36, "B", "R"): "U", (115, 36, "B", "U"): "U", (115, 36, "D", "B"): "D", (115, 36, "D", "F"): "D", (115, 36, "D", "L"): "D", (115, 36, "D", "R"): "D", (115, 36, "F", "D"): "U", (115, 36, "F", "L"): "U", (115, 36, "F", "R"): "U", (115, 36, "F", "U"): "U", (115, 36, "L", "B"): "D", (115, 36, "L", "D"): "U", (115, 36, "L", "F"): "D", (115, 36, "L", "U"): "U", (115, 36, "R", "B"): "D", (115, 36, "R", "D"): "U", (115, 36, "R", "F"): "D", (115, 36, "R", "U"): "U", (115, 36, "U", "B"): "D", (115, 36, "U", "F"): "D", (115, 36, "U", "L"): "D", (115, 36, "U", "R"): "D", (116, 95, "B", "D"): "D", (116, 95, "B", "L"): "D", (116, 95, "B", "R"): "D", (116, 95, "B", "U"): "D", (116, 95, "D", "B"): "U", (116, 95, "D", "F"): "U", (116, 95, "D", "L"): "U", (116, 95, "D", "R"): "U", (116, 95, "F", "D"): "D", (116, 95, "F", "L"): "D", (116, 95, "F", "R"): "D", (116, 95, "F", "U"): "D", (116, 95, "L", "B"): "U", (116, 95, "L", "D"): "D", (116, 95, "L", "F"): "U", (116, 95, "L", "U"): "D", (116, 95, "R", "B"): "U", (116, 95, "R", "D"): "D", (116, 95, "R", "F"): "U", (116, 95, "R", "U"): "D", (116, 95, "U", "B"): "U", (116, 95, "U", "F"): "U", (116, 95, "U", "L"): "U", (116, 95, "U", "R"): "U", (120, 41, "B", "D"): "U", (120, 41, "B", "L"): "U", (120, 41, "B", "R"): "U", (120, 41, "B", "U"): "U", (120, 41, "D", "B"): "D", (120, 41, "D", "F"): "D", (120, 41, "D", "L"): "D", (120, 41, "D", "R"): "D", (120, 41, "F", "D"): "U", (120, 41, "F", "L"): "U", (120, 41, "F", "R"): "U", (120, 41, "F", "U"): "U", (120, 41, "L", "B"): "D", (120, 41, "L", "D"): "U", (120, 41, "L", "F"): "D", (120, 41, "L", "U"): "U", (120, 41, "R", "B"): "D", (120, 41, "R", "D"): "U", (120, 41, "R", "F"): "D", (120, 41, "R", "U"): "U", (120, 41, "U", "B"): "D", (120, 41, "U", "F"): "D", (120, 41, "U", "L"): "D", (120, 41, "U", "R"): "D", (122, 149, "B", "D"): "U", (122, 149, "B", "L"): "U", (122, 149, "B", "R"): "U", (122, 149, "B", "U"): "U", (122, 149, "D", "B"): "D", (122, 149, "D", "F"): "D", (122, 149, "D", "L"): "D", (122, 149, "D", "R"): "D", (122, 149, "F", "D"): "U", (122, 149, "F", "L"): "U", (122, 149, "F", "R"): "U", (122, 149, "F", "U"): "U", (122, 149, "L", "B"): "D", (122, 149, "L", "D"): "U", (122, 149, "L", "F"): "D", (122, 149, "L", "U"): "U", (122, 149, "R", "B"): "D", (122, 149, "R", "D"): "U", (122, 149, "R", "F"): "D", (122, 149, "R", "U"): "U", (122, 149, "U", "B"): "D", (122, 149, "U", "F"): "D", (122, 149, "U", "L"): "D", (122, 149, "U", "R"): "D", (123, 148, "B", "D"): "U", (123, 148, "B", "L"): "U", (123, 148, "B", "R"): "U", (123, 148, "B", "U"): "U", (123, 148, "D", "B"): "D", (123, 148, "D", "F"): "D", (123, 148, "D", "L"): "D", (123, 148, "D", "R"): "D", (123, 148, "F", "D"): "U", (123, 148, "F", "L"): "U", (123, 148, "F", "R"): "U", (123, 148, "F", "U"): "U", (123, 148, "L", "B"): "D", (123, 148, "L", "D"): "U", (123, 148, "L", "F"): "D", (123, 148, "L", "U"): "U", (123, 148, "R", "B"): "D", (123, 148, "R", "D"): "U", (123, 148, "R", "F"): "D", (123, 148, "R", "U"): "U", (123, 148, "U", "B"): "D", (123, 148, "U", "F"): "D", (123, 148, "U", "L"): "D", (123, 148, "U", "R"): "D", (124, 147, "B", "D"): "D", (124, 147, "B", "L"): "D", (124, 147, "B", "R"): "D", (124, 147, "B", "U"): "D", (124, 147, "D", "B"): "U", (124, 147, "D", "F"): "U", (124, 147, "D", "L"): "U", (124, 147, "D", "R"): "U", (124, 147, "F", "D"): "D", (124, 147, "F", "L"): "D", (124, 147, "F", "R"): "D", (124, 147, "F", "U"): "D", (124, 147, "L", "B"): "U", (124, 147, "L", "D"): "D", (124, 147, "L", "F"): "U", (124, 147, "L", "U"): "D", (124, 147, "R", "B"): "U", (124, 147, "R", "D"): "D", (124, 147, "R", "F"): "U", (124, 147, "R", "U"): "D", (124, 147, "U", "B"): "U", (124, 147, "U", "F"): "U", (124, 147, "U", "L"): "U", (124, 147, "U", "R"): "U", (127, 72, "B", "D"): "D", (127, 72, "B", "L"): "D", (127, 72, "B", "R"): "D", (127, 72, "B", "U"): "D", (127, 72, "D", "B"): "U", (127, 72, "D", "F"): "U", (127, 72, "D", "L"): "U", (127, 72, "D", "R"): "U", (127, 72, "F", "D"): "D", (127, 72, "F", "L"): "D", (127, 72, "F", "R"): "D", (127, 72, "F", "U"): "D", (127, 72, "L", "B"): "U", (127, 72, "L", "D"): "D", (127, 72, "L", "F"): "U", (127, 72, "L", "U"): "D", (127, 72, "R", "B"): "U", (127, 72, "R", "D"): "D", (127, 72, "R", "F"): "U", (127, 72, "R", "U"): "D", (127, 72, "U", "B"): "U", (127, 72, "U", "F"): "U", (127, 72, "U", "L"): "U", (127, 72, "U", "R"): "U", (128, 73, "B", "D"): "D", (128, 73, "B", "L"): "D", (128, 73, "B", "R"): "D", (128, 73, "B", "U"): "D", (128, 73, "D", "B"): "U", (128, 73, "D", "F"): "U", (128, 73, "D", "L"): "U", (128, 73, "D", "R"): "U", (128, 73, "F", "D"): "D", (128, 73, "F", "L"): "D", (128, 73, "F", "R"): "D", (128, 73, "F", "U"): "D", (128, 73, "L", "B"): "U", (128, 73, "L", "D"): "D", (128, 73, "L", "F"): "U", (128, 73, "L", "U"): "D", (128, 73, "R", "B"): "U", (128, 73, "R", "D"): "D", (128, 73, "R", "F"): "U", (128, 73, "R", "U"): "D", (128, 73, "U", "B"): "U", (128, 73, "U", "F"): "U", (128, 73, "U", "L"): "U", (128, 73, "U", "R"): "U", (129, 74, "B", "D"): "U", (129, 74, "B", "L"): "U", (129, 74, "B", "R"): "U", (129, 74, "B", "U"): "U", (129, 74, "D", "B"): "D", (129, 74, "D", "F"): "D", (129, 74, "D", "L"): "D", (129, 74, "D", "R"): "D", (129, 74, "F", "D"): "U", (129, 74, "F", "L"): "U", (129, 74, "F", "R"): "U", (129, 74, "F", "U"): "U", (129, 74, "L", "B"): "D", (129, 74, "L", "D"): "U", (129, 74, "L", "F"): "D", (129, 74, "L", "U"): "U", (129, 74, "R", "B"): "D", (129, 74, "R", "D"): "U", (129, 74, "R", "F"): "D", (129, 74, "R", "U"): "U", (129, 74, "U", "B"): "D", (129, 74, "U", "F"): "D", (129, 74, "U", "L"): "D", (129, 74, "U", "R"): "D", (131, 49, "B", "D"): "U", (131, 49, "B", "L"): "U", (131, 49, "B", "R"): "U", (131, 49, "B", "U"): "U", (131, 49, "D", "B"): "D", (131, 49, "D", "F"): "D", (131, 49, "D", "L"): "D", (131, 49, "D", "R"): "D", (131, 49, "F", "D"): "U", (131, 49, "F", "L"): "U", (131, 49, "F", "R"): "U", (131, 49, "F", "U"): "U", (131, 49, "L", "B"): "D", (131, 49, "L", "D"): "U", (131, 49, "L", "F"): "D", (131, 49, "L", "U"): "U", (131, 49, "R", "B"): "D", (131, 49, "R", "D"): "U", (131, 49, "R", "F"): "D", (131, 49, "R", "U"): "U", (131, 49, "U", "B"): "D", (131, 49, "U", "F"): "D", (131, 49, "U", "L"): "D", (131, 49, "U", "R"): "D", (135, 97, "B", "D"): "D", (135, 97, "B", "L"): "D", (135, 97, "B", "R"): "D", (135, 97, "B", "U"): "D", (135, 97, "D", "B"): "U", (135, 97, "D", "F"): "U", (135, 97, "D", "L"): "U", (135, 97, "D", "R"): "U", (135, 97, "F", "D"): "D", (135, 97, "F", "L"): "D", (135, 97, "F", "R"): "D", (135, 97, "F", "U"): "D", (135, 97, "L", "B"): "U", (135, 97, "L", "D"): "D", (135, 97, "L", "F"): "U", (135, 97, "L", "U"): "D", (135, 97, "R", "B"): "U", (135, 97, "R", "D"): "D", (135, 97, "R", "F"): "U", (135, 97, "R", "U"): "D", (135, 97, "U", "B"): "U", (135, 97, "U", "F"): "U", (135, 97, "U", "L"): "U", (135, 97, "U", "R"): "U", (136, 48, "B", "D"): "D", (136, 48, "B", "L"): "D", (136, 48, "B", "R"): "D", (136, 48, "B", "U"): "D", (136, 48, "D", "B"): "U", (136, 48, "D", "F"): "U", (136, 48, "D", "L"): "U", (136, 48, "D", "R"): "U", (136, 48, "F", "D"): "D", (136, 48, "F", "L"): "D", (136, 48, "F", "R"): "D", (136, 48, "F", "U"): "D", (136, 48, "L", "B"): "U", (136, 48, "L", "D"): "D", (136, 48, "L", "F"): "U", (136, 48, "L", "U"): "D", (136, 48, "R", "B"): "U", (136, 48, "R", "D"): "D", (136, 48, "R", "F"): "U", (136, 48, "R", "U"): "D", (136, 48, "U", "B"): "U", (136, 48, "U", "F"): "U", (136, 48, "U", "L"): "U", (136, 48, "U", "R"): "U", (140, 98, "B", "D"): "D", (140, 98, "B", "L"): "D", (140, 98, "B", "R"): "D", (140, 98, "B", "U"): "D", (140, 98, "D", "B"): "U", (140, 98, "D", "F"): "U", (140, 98, "D", "L"): "U", (140, 98, "D", "R"): "U", (140, 98, "F", "D"): "D", (140, 98, "F", "L"): "D", (140, 98, "F", "R"): "D", (140, 98, "F", "U"): "D", (140, 98, "L", "B"): "U", (140, 98, "L", "D"): "D", (140, 98, "L", "F"): "U", (140, 98, "L", "U"): "D", (140, 98, "R", "B"): "U", (140, 98, "R", "D"): "D", (140, 98, "R", "F"): "U", (140, 98, "R", "U"): "D", (140, 98, "U", "B"): "U", (140, 98, "U", "F"): "U", (140, 98, "U", "L"): "U", (140, 98, "U", "R"): "U", (141, 47, "B", "D"): "D", (141, 47, "B", "L"): "D", (141, 47, "B", "R"): "D", (141, 47, "B", "U"): "D", (141, 47, "D", "B"): "U", (141, 47, "D", "F"): "U", (141, 47, "D", "L"): "U", (141, 47, "D", "R"): "U", (141, 47, "F", "D"): "D", (141, 47, "F", "L"): "D", (141, 47, "F", "R"): "D", (141, 47, "F", "U"): "D", (141, 47, "L", "B"): "U", (141, 47, "L", "D"): "D", (141, 47, "L", "F"): "U", (141, 47, "L", "U"): "D", (141, 47, "R", "B"): "U", (141, 47, "R", "D"): "D", (141, 47, "R", "F"): "U", (141, 47, "R", "U"): "D", (141, 47, "U", "B"): "U", (141, 47, "U", "F"): "U", (141, 47, "U", "L"): "U", (141, 47, "U", "R"): "U", (145, 99, "B", "D"): "U", (145, 99, "B", "L"): "U", (145, 99, "B", "R"): "U", (145, 99, "B", "U"): "U", (145, 99, "D", "B"): "D", (145, 99, "D", "F"): "D", (145, 99, "D", "L"): "D", (145, 99, "D", "R"): "D", (145, 99, "F", "D"): "U", (145, 99, "F", "L"): "U", (145, 99, "F", "R"): "U", (145, 99, "F", "U"): "U", (145, 99, "L", "B"): "D", (145, 99, "L", "D"): "U", (145, 99, "L", "F"): "D", (145, 99, "L", "U"): "U", (145, 99, "R", "B"): "D", (145, 99, "R", "D"): "U", (145, 99, "R", "F"): "D", (145, 99, "R", "U"): "U", (145, 99, "U", "B"): "D", (145, 99, "U", "F"): "D", (145, 99, "U", "L"): "D", (145, 99, "U", "R"): "D", (147, 124, "B", "D"): "U", (147, 124, "B", "L"): "U", (147, 124, "B", "R"): "U", (147, 124, "B", "U"): "U", (147, 124, "D", "B"): "D", (147, 124, "D", "F"): "D", (147, 124, "D", "L"): "D", (147, 124, "D", "R"): "D", (147, 124, "F", "D"): "U", (147, 124, "F", "L"): "U", (147, 124, "F", "R"): "U", (147, 124, "F", "U"): "U", (147, 124, "L", "B"): "D", (147, 124, "L", "D"): "U", (147, 124, "L", "F"): "D", (147, 124, "L", "U"): "U", (147, 124, "R", "B"): "D", (147, 124, "R", "D"): "U", (147, 124, "R", "F"): "D", (147, 124, "R", "U"): "U", (147, 124, "U", "B"): "D", (147, 124, "U", "F"): "D", (147, 124, "U", "L"): "D", (147, 124, "U", "R"): "D", (148, 123, "B", "D"): "D", (148, 123, "B", "L"): "D", (148, 123, "B", "R"): "D", (148, 123, "B", "U"): "D", (148, 123, "D", "B"): "U", (148, 123, "D", "F"): "U", (148, 123, "D", "L"): "U", (148, 123, "D", "R"): "U", (148, 123, "F", "D"): "D", (148, 123, "F", "L"): "D", (148, 123, "F", "R"): "D", (148, 123, "F", "U"): "D", (148, 123, "L", "B"): "U", (148, 123, "L", "D"): "D", (148, 123, "L", "F"): "U", (148, 123, "L", "U"): "D", (148, 123, "R", "B"): "U", (148, 123, "R", "D"): "D", (148, 123, "R", "F"): "U", (148, 123, "R", "U"): "D", (148, 123, "U", "B"): "U", (148, 123, "U", "F"): "U", (148, 123, "U", "L"): "U", (148, 123, "U", "R"): "U", (149, 122, "B", "D"): "D", (149, 122, "B", "L"): "D", (149, 122, "B", "R"): "D", (149, 122, "B", "U"): "D", (149, 122, "D", "B"): "U", (149, 122, "D", "F"): "U", (149, 122, "D", "L"): "U", (149, 122, "D", "R"): "U", (149, 122, "F", "D"): "D", (149, 122, "F", "L"): "D", (149, 122, "F", "R"): "D", (149, 122, "F", "U"): "D", (149, 122, "L", "B"): "U", (149, 122, "L", "D"): "D", (149, 122, "L", "F"): "U", (149, 122, "L", "U"): "D", (149, 122, "R", "B"): "U", (149, 122, "R", "D"): "D", (149, 122, "R", "F"): "U", (149, 122, "R", "U"): "D", (149, 122, "U", "B"): "U", (149, 122, "U", "F"): "U", (149, 122, "U", "L"): "U", (149, 122, "U", "R"): "U", }
27.96128
44
0.255848
8,987
54,161
1.540892
0.019695
0.031196
0.007799
0.001733
0.030618
0
0
0
0
0
0
0.230541
0.320858
54,161
1,936
45
27.975723
0.145937
0.002105
0
0.009331
0
0
0.096417
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
ba77c3decd45da528d69e289a995dee1a225f06b
651
py
Python
Exercicios/ex109 - Formatando moedas em python.py
anderdot/curso-em-video-python
ea295cf0afa914ff9ab9acb87c458d77e3fb62ad
[ "MIT" ]
null
null
null
Exercicios/ex109 - Formatando moedas em python.py
anderdot/curso-em-video-python
ea295cf0afa914ff9ab9acb87c458d77e3fb62ad
[ "MIT" ]
null
null
null
Exercicios/ex109 - Formatando moedas em python.py
anderdot/curso-em-video-python
ea295cf0afa914ff9ab9acb87c458d77e3fb62ad
[ "MIT" ]
null
null
null
# Desafio 109: Modifique as funções que form criadas no desafio 107 para que # elas aceitem um parâmetro a mais, informando se o valor retornado por elas # vai ser ou não formatado pela função moeda(), desenvolvida no desafio 108. from rotinas import titulo from modulos.ex109 import moeda as m valor = int(input('Digite um valor: R$ ')) titulo('Análise', 50) print(f'A metade de {m.moeda(valor)} é {m.metade(valor, True)}.') print(f'O dobro de {m.moeda(valor)} é {m.dobro(valor, True)}.') print(f'A taxa de 10% de {m.moeda(valor)} é {m.aumentar(valor, 10, True)}.') print(f'O desconto de 15% de {m.moeda(valor)} é {m.diminuir(valor, 15, True)}.')
50.076923
80
0.709677
117
651
3.948718
0.504274
0.051948
0.069264
0.112554
0.12987
0.12987
0
0
0
0
0
0.039711
0.149002
651
12
81
54.25
0.794224
0.347158
0
0
0
0.25
0.643705
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0.5
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
3
ba7d6a9e7d22a756e68ebfce9d1c8d488b047ed1
222
py
Python
String/058. Length of Last Word.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
138
2020-02-08T05:25:26.000Z
2021-11-04T11:59:28.000Z
String/058. Length of Last Word.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
null
null
null
String/058. Length of Last Word.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
24
2021-01-02T07:18:43.000Z
2022-03-20T08:17:54.000Z
""" 58. Length of Last Word """ class Solution: def lengthOfLastWord(self, s): """ :type s: str :rtype: int """ li = s.split() return len(li[-1]) if li else 0
18.5
39
0.45045
27
222
3.703704
0.851852
0
0
0
0
0
0
0
0
0
0
0.030534
0.40991
222
12
39
18.5
0.732824
0.216216
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.75
0
1
0
0
null
0
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
0
0
0
1
0
0
3
ba8cbf1e8f33b4e6ae6ea6fa33a6606299a26211
767
py
Python
util/path.py
cassianobecker/dnn
bb2ea04f77733de9df10f795bb049ac3b9d30478
[ "MIT" ]
3
2020-02-21T21:35:07.000Z
2020-09-29T15:20:00.000Z
util/path.py
cassianobecker/dnn
bb2ea04f77733de9df10f795bb049ac3b9d30478
[ "MIT" ]
27
2020-02-20T21:00:23.000Z
2020-05-22T15:23:25.000Z
util/path.py
cassianobecker/dnn
bb2ea04f77733de9df10f795bb049ac3b9d30478
[ "MIT" ]
null
null
null
import os import shutil def get_root(): root_dir = os.path.dirname(os.path.abspath(__file__)) return os.path.split(root_dir)[0] def absolute_path(relative_path): return os.path.join(get_root(), relative_path) def append_path(module, relative_path): return os.path.join(get_dir(module), relative_path) def get_dir(module): return os.path.dirname(os.path.abspath(module)) def is_project_in_cbica(): current_file_path = os.path.dirname(os.path.abspath(__file__)) return current_file_path.split('/')[1] == 'cbica' def copy_folder(src_path, dest_path, delete_src=False): if os.path.isdir(dest_path): shutil.rmtree(dest_path) shutil.copytree(src_path, dest_path) if delete_src: shutil.rmtree(src_path)
21.305556
66
0.720991
118
767
4.372881
0.29661
0.116279
0.093023
0.087209
0.310078
0.310078
0.25969
0.139535
0
0
0
0.003082
0.153846
767
35
67
21.914286
0.791988
0
0
0
0
0
0.007823
0
0
0
0
0
0
1
0.3
false
0
0.1
0.15
0.65
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
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
baa043ba112c1db1f058e902f2a7ddaf2805cded
254
py
Python
ui/experimental.py
miguelgarciaarribas/multroaster
eb3a17e8257cd184cb91d53a2a61c6d3481ac206
[ "MIT" ]
1
2020-04-18T09:13:18.000Z
2020-04-18T09:13:18.000Z
ui/experimental.py
miguelgarciaarribas/multroaster
eb3a17e8257cd184cb91d53a2a61c6d3481ac206
[ "MIT" ]
18
2020-04-24T07:22:54.000Z
2020-08-28T10:33:18.000Z
ui/experimental.py
miguelgarciaarribas/multroaster
eb3a17e8257cd184cb91d53a2a61c6d3481ac206
[ "MIT" ]
null
null
null
from PyQt5.QtGui import QImage, QPixmap # review class ExperimentalContent(): def __init__(self, mainWindow): print("Loading Experimental content") self.mainWindow = mainWindow self.mainWindow.expLabel.setText("hello world")
31.75
55
0.716535
26
254
6.846154
0.807692
0.235955
0
0
0
0
0
0
0
0
0
0.004878
0.192913
254
7
56
36.285714
0.863415
0.023622
0
0
0
0
0.158537
0
0
0
0
0
0
1
0.166667
false
0
0.166667
0
0.5
0.166667
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
0
0
0
0
3
bac96c72212d49906c555e8ee6009e66b8770acd
420
py
Python
structural/decorator_example.py
EdiBoba/python_patterns
b3343eed5592beea2996316feb8df4bad107e1fc
[ "MIT" ]
2
2022-02-08T16:30:22.000Z
2022-03-16T08:20:25.000Z
structural/decorator_example.py
EdiBoba/python_patterns
b3343eed5592beea2996316feb8df4bad107e1fc
[ "MIT" ]
null
null
null
structural/decorator_example.py
EdiBoba/python_patterns
b3343eed5592beea2996316feb8df4bad107e1fc
[ "MIT" ]
3
2021-08-06T15:47:47.000Z
2021-12-09T18:59:38.000Z
from abc import ABCMeta, abstractmethod class IOperator(metaclass=ABCMeta): @abstractmethod def operator(self): pass class Component(IOperator): def operator(self): return 10.0 class Wrapper(IOperator): def __init__(self, obj): self.obj = obj def operator(self): return self.obj.operator() + 5.0 comp = Component() comp = Wrapper(comp) print(comp.operator())
16.153846
40
0.657143
50
420
5.44
0.44
0.121324
0.165441
0.154412
0
0
0
0
0
0
0
0.015576
0.235714
420
25
41
16.8
0.831776
0
0
0.1875
0
0
0
0
0
0
0
0
0
1
0.25
false
0.0625
0.0625
0.125
0.625
0.0625
0
0
0
null
0
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
1
0
0
0
3
bacf7bd40e07778d4ffdc5b9e3092f4045164220
449
py
Python
funk/tools.py
mwilliamson/funk
658ff45b33b90f621104d9776c4b122b84779350
[ "BSD-2-Clause" ]
1
2016-04-22T08:02:01.000Z
2016-04-22T08:02:01.000Z
funk/tools.py
mwilliamson/funk
658ff45b33b90f621104d9776c4b122b84779350
[ "BSD-2-Clause" ]
null
null
null
funk/tools.py
mwilliamson/funk
658ff45b33b90f621104d9776c4b122b84779350
[ "BSD-2-Clause" ]
null
null
null
class Data(object): def __init__(self, attributes): self._keys = list(attributes.keys()) for key in attributes: setattr(self, key, attributes[key]) def __str__(self): return "Data({0})".format(", ".join( "{0}={1!r}".format(key, getattr(self, key)) for key in self._keys )) def __repr__(self): return str(self) def data(**kwargs): return Data(kwargs)
24.944444
55
0.550111
54
449
4.314815
0.425926
0.06867
0.06867
0
0
0
0
0
0
0
0
0.009554
0.300668
449
17
56
26.411765
0.732484
0
0
0
0
0
0.044543
0
0
0
0
0
0
1
0.285714
false
0
0
0.214286
0.571429
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
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
bade9c016e086e5bd504bbf7ecd019f9ea2e8e26
322
py
Python
tests/test_client.py
debonzi/celery_crossover
2da97fe527a357d5c85dfd29b04424d08dbe9b93
[ "MIT" ]
10
2018-04-06T18:58:18.000Z
2021-11-05T19:19:03.000Z
tests/test_client.py
debonzi/celery_crossover
2da97fe527a357d5c85dfd29b04424d08dbe9b93
[ "MIT" ]
2
2018-08-15T18:15:54.000Z
2021-03-26T06:58:02.000Z
tests/test_client.py
debonzi/celery_crossover
2da97fe527a357d5c85dfd29b04424d08dbe9b93
[ "MIT" ]
3
2018-04-09T03:06:12.000Z
2019-11-08T17:35:57.000Z
# -*- coding: utf-8 -*- import types from crossover import Client from crossover import _Requester def test_client_attributes(): client = Client("redis://localhost:6379/0") assert isinstance(client, Client) assert isinstance(client.test, _Requester) assert isinstance(client.call_task, types.MethodType)
26.833333
57
0.748447
39
322
6.051282
0.538462
0.20339
0.279661
0
0
0
0
0
0
0
0
0.021818
0.145963
322
11
58
29.272727
0.836364
0.065217
0
0
0
0
0.080268
0.080268
0
0
0
0
0.375
1
0.125
false
0
0.375
0
0.5
0
0
0
0
null
1
1
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
0
0
0
1
0
0
0
0
3
bafe54956d92542ae97bc15168154b2050039241
485
py
Python
mac/pyobjc-framework-Quartz/PyObjCTest/test_PDFAnnotation.py
albertz/music-player
d23586f5bf657cbaea8147223be7814d117ae73d
[ "BSD-2-Clause" ]
132
2015-01-01T10:02:42.000Z
2022-03-09T12:51:01.000Z
mac/pyobjc-framework-Quartz/PyObjCTest/test_PDFAnnotation.py
mba811/music-player
7998986b34cfda2244ef622adefb839331b81a81
[ "BSD-2-Clause" ]
6
2015-01-06T08:23:19.000Z
2019-03-14T12:22:06.000Z
mac/pyobjc-framework-Quartz/PyObjCTest/test_PDFAnnotation.py
mba811/music-player
7998986b34cfda2244ef622adefb839331b81a81
[ "BSD-2-Clause" ]
27
2015-02-23T11:51:43.000Z
2022-03-07T02:34:18.000Z
from PyObjCTools.TestSupport import * from Quartz.PDFKit import * class TestPDFAnnotation (TestCase): def testMethods(self): self.assertResultIsBOOL(PDFAnnotation.shouldDisplay) self.assertArgIsBOOL(PDFAnnotation.setShouldDisplay_, 0) self.assertResultIsBOOL(PDFAnnotation.shouldPrint) self.assertArgIsBOOL(PDFAnnotation.setShouldPrint_, 0) self.assertResultIsBOOL(PDFAnnotation.hasAppearanceStream) if __name__ == "__main__": main()
32.333333
66
0.762887
40
485
9
0.6
0.183333
0.291667
0.2
0
0
0
0
0
0
0
0.00489
0.156701
485
14
67
34.642857
0.875306
0
0
0
0
0
0.016529
0
0
0
0
0
0.454545
1
0.090909
false
0
0.181818
0
0.363636
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
1
0
0
0
0
0
0
0
0
0
3
2401ef1bb0cb741cbeac82b95a7eba1326a957b7
1,813
py
Python
backend/ibutsu_server/models/group.py
john-dupuy/ibutsu-server
ae380fc7a72a4898075291bac8fdb86952bfd06a
[ "MIT" ]
null
null
null
backend/ibutsu_server/models/group.py
john-dupuy/ibutsu-server
ae380fc7a72a4898075291bac8fdb86952bfd06a
[ "MIT" ]
null
null
null
backend/ibutsu_server/models/group.py
john-dupuy/ibutsu-server
ae380fc7a72a4898075291bac8fdb86952bfd06a
[ "MIT" ]
null
null
null
# coding: utf-8 from __future__ import absolute_import from ibutsu_server import util from ibutsu_server.models.base_model_ import Model class Group(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. """ def __init__(self, id=None, name=None): """Group - a model defined in OpenAPI :param id: The id of this Group. :type id: str :param name: The name of this Group. :type name: str """ self.openapi_types = {"id": str, "name": str} self.attribute_map = {"id": "id", "name": "name"} self._id = id self._name = name @classmethod def from_dict(cls, dikt) -> "Group": """Returns the dict as a model :param dikt: A dict. :type: dict :return: The Group of this Group. :rtype: Group """ return util.deserialize_model(dikt, cls) @property def id(self): """Gets the id of this Group. Unique ID of the project :return: The id of this Group. :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Group. Unique ID of the project :param id: The id of this Group. :type id: str """ self._id = id @property def name(self): """Gets the name of this Group. The name of the group :return: The name of this Group. :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this Group. The name of the group :param name: The name of this Group. :type name: str """ self._name = name
21.329412
96
0.552675
241
1,813
4.062241
0.253112
0.067416
0.123596
0.05618
0.367722
0.355465
0.355465
0.296221
0.296221
0.296221
0
0.000845
0.34749
1,813
84
97
21.583333
0.826712
0.432984
0
0.25
1
0
0.029909
0
0
0
0
0
0
1
0.25
false
0
0.125
0
0.541667
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
0
0
0
1
0
0
3
241bc9ceeaf007cf8c3f1adcf1de894a391d7c80
325
py
Python
serving_patterns/src/app/api/_health.py
shibuiwilliam/ml-system-in-action
0aa9d6bc4a4346236b9c971ec90afad04bcf5cca
[ "MIT" ]
10
2020-08-30T03:19:10.000Z
2021-08-08T17:38:06.000Z
serving_patterns/src/app/api/_health.py
shibuiwilliam/ml-system-in-action
0aa9d6bc4a4346236b9c971ec90afad04bcf5cca
[ "MIT" ]
null
null
null
serving_patterns/src/app/api/_health.py
shibuiwilliam/ml-system-in-action
0aa9d6bc4a4346236b9c971ec90afad04bcf5cca
[ "MIT" ]
6
2020-08-30T03:19:13.000Z
2021-11-26T23:32:42.000Z
from typing import Dict import logging from src.middleware.profiler import do_cprofile logger = logging.getLogger(__name__) @do_cprofile def health() -> Dict[str, str]: return {"health": "ok"} def health_sync() -> Dict[str, str]: return health() async def health_async() -> Dict[str, str]: return health()
17.105263
47
0.698462
44
325
4.977273
0.454545
0.123288
0.136986
0.219178
0.30137
0
0
0
0
0
0
0
0.172308
325
18
48
18.055556
0.814126
0
0
0.181818
0
0
0.024615
0
0
0
0
0
0
1
0.181818
false
0
0.272727
0.181818
0.727273
0
0
0
0
null
0
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
0
0
0
0
1
1
0
0
3
2458dac6adb26f8c77b50a1f69f3c2ef18781671
2,518
py
Python
models/deep_factorized_model.py
kundajelab/mpra_minimal
2799ed87821130fc537836651d37e45a3247382d
[ "MIT" ]
11
2019-05-06T13:13:35.000Z
2022-03-10T22:24:27.000Z
models/deep_factorized_model.py
mineeme/MPRA-DragoNN
2799ed87821130fc537836651d37e45a3247382d
[ "MIT" ]
null
null
null
models/deep_factorized_model.py
mineeme/MPRA-DragoNN
2799ed87821130fc537836651d37e45a3247382d
[ "MIT" ]
2
2019-07-24T20:42:08.000Z
2020-02-21T02:33:30.000Z
from models.base_model import BaseModel from keras.models import Sequential from keras.layers import Input, Dense, Conv1D, MaxPooling1D, Dropout, Flatten, BatchNormalization from keras.optimizers import Adam import tensorflow as tf class DeepFactorizedModel(BaseModel): def __init__(self, config): super(DeepFactorizedModel, self).__init__(config) self.build_model() def build_model(self): self.model = Sequential() # sublayer 1 self.model.add(Conv1D(48, 3, padding='same', activation='relu', input_shape=(self.config.input_sequence_length, 4))) self.model.add(BatchNormalization()) self.model.add(Dropout(0.1)) self.model.add(Conv1D(64, 3, padding='same', activation='relu')) self.model.add(BatchNormalization()) self.model.add(Dropout(0.1)) self.model.add(Conv1D(100, 3, padding='same', activation='relu')) self.model.add(BatchNormalization()) self.model.add(Dropout(0.1)) self.model.add(Conv1D(150, 7, padding='same', activation='relu')) self.model.add(BatchNormalization()) self.model.add(Dropout(0.1)) self.model.add(Conv1D(300, 7, padding='same', activation='relu')) self.model.add(BatchNormalization()) self.model.add(Dropout(0.1)) self.model.add(MaxPooling1D(3)) # sublayer 2 self.model.add(Conv1D(200, 7, padding='same', activation='relu')) self.model.add(BatchNormalization()) self.model.add(Dropout(0.1)) self.model.add(Conv1D(200, 3, padding='same', activation='relu')) self.model.add(BatchNormalization()) self.model.add(Dropout(0.1)) self.model.add(Conv1D(200, 3, padding='same', activation='relu')) self.model.add(BatchNormalization()) self.model.add(Dropout(0.1)) self.model.add(MaxPooling1D(4)) # sublayer 3 self.model.add(Conv1D(200, 7, padding='same', activation='relu')) self.model.add(BatchNormalization()) self.model.add(Dropout(0.1)) self.model.add(MaxPooling1D(4)) self.model.add(Flatten()) self.model.add(Dense(100, activation='relu')) self.model.add(BatchNormalization()) self.model.add(Dropout(0.1)) self.model.add(Dense(self.config.number_of_outputs, activation='linear')) self.model.compile( loss= "mean_squared_error", optimizer=self.config.optimizer, # custom metrics in trainer )
34.493151
124
0.643765
309
2,518
5.187702
0.20712
0.207736
0.262009
0.089208
0.635683
0.607611
0.607611
0.607611
0.607611
0.607611
0
0.039235
0.210485
2,518
72
125
34.972222
0.767103
0.023034
0
0.52
0
0
0.04075
0
0
0
0
0
0
1
0.04
false
0
0.1
0
0.16
0
0
0
0
null
1
1
0
0
0
0
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
0
0
0
0
3
2459202d8235c994028b62181cbfcd741881a72d
323
py
Python
scripts/nengo_os/print_control.py
markplagge/neuro_os
60b246c0f975d30658628e1caf60cd209e740e6e
[ "BSD-3-Clause" ]
null
null
null
scripts/nengo_os/print_control.py
markplagge/neuro_os
60b246c0f975d30658628e1caf60cd209e740e6e
[ "BSD-3-Clause" ]
1
2020-07-21T02:25:45.000Z
2020-07-21T02:27:45.000Z
scripts/nengo_os/print_control.py
markplagge/neuro_os
60b246c0f975d30658628e1caf60cd209e740e6e
[ "BSD-3-Clause" ]
null
null
null
debug_print = False has_run_once = False def d_print(*args, **kwargs): global debug_print global has_run_once if not has_run_once: m = "enabled" if debug_print else "disabled" print(f"Debug Print Mode is {m}") has_run_once = True if debug_print: print(*args, **kwargs)
17.944444
52
0.634675
48
323
4
0.4375
0.260417
0.208333
0
0
0
0
0
0
0
0
0
0.275542
323
17
53
19
0.820513
0
0
0
0
0
0.11838
0
0
0
0
0
0
1
0.090909
false
0
0
0
0.090909
0.636364
0
0
0
null
1
1
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
0
0
0
0
0
0
1
0
3
24605b6587afbc12049e73b54cb4418582146acb
37
py
Python
zhaquirks/bosch/__init__.py
WolfRevo/zha-device-handlers
0fa4ca1c03c611be0cf2c38c4fec2a197e3dd1d3
[ "Apache-2.0" ]
213
2020-04-16T10:48:31.000Z
2022-03-30T20:48:07.000Z
zhaquirks/bosch/__init__.py
WolfRevo/zha-device-handlers
0fa4ca1c03c611be0cf2c38c4fec2a197e3dd1d3
[ "Apache-2.0" ]
1,088
2020-04-03T13:23:29.000Z
2022-03-31T23:55:03.000Z
zhaquirks/bosch/__init__.py
WolfRevo/zha-device-handlers
0fa4ca1c03c611be0cf2c38c4fec2a197e3dd1d3
[ "Apache-2.0" ]
280
2020-04-24T08:44:27.000Z
2022-03-31T12:58:04.000Z
"""Bosch quirks.""" BOSCH = "Bosch"
9.25
19
0.567568
4
37
5.25
0.5
0
0
0
0
0
0
0
0
0
0
0
0.162162
37
3
20
12.333333
0.677419
0.351351
0
0
0
0
0.277778
0
0
0
0
0
0
1
0
false
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
0
0
0
0
0
0
0
0
0
0
3
24669af442e48736ce23de6fe426df216d0af465
661
py
Python
sharedql/schema.py
akaytatsu/sharedql
ceeb3df2909bc90325c72f930fba35de6827ee74
[ "MIT" ]
null
null
null
sharedql/schema.py
akaytatsu/sharedql
ceeb3df2909bc90325c72f930fba35de6827ee74
[ "MIT" ]
null
null
null
sharedql/schema.py
akaytatsu/sharedql
ceeb3df2909bc90325c72f930fba35de6827ee74
[ "MIT" ]
null
null
null
from __future__ import print_function import sys import importlib from django.conf import settings import graphene from .base import sharedql for imports in settings.INSTALLED_APPS: imports = imports + ".schema" try: mod = importlib.import_module(imports + ".schema") except ImportError: pass # print("Failed to load {module}".format(module=imports),file=sys.stderr) bases = tuple(sharedql.query_classes + [graphene.ObjectType, object]) # for cls in bases: # print("Including '{}' in global GraphQL Query...".format(cls.__name__)) SharedQuery = type('Query', bases, {}) schema = graphene.Schema(query=SharedQuery)
25.423077
81
0.715582
80
661
5.7625
0.55
0.056399
0
0
0
0
0
0
0
0
0
0
0.172466
661
26
82
25.423077
0.842779
0.249622
0
0
0
0
0.03854
0
0
0
0
0
0
1
0
false
0.066667
0.666667
0
0.666667
0.066667
0
0
0
null
0
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
0
0
1
1
0
1
0
0
3
03018f2878f299da32e5fb359237991d538d5f69
288
py
Python
services/web/project/adminsettings.py
pwdel/srcflask
71c91cc9edb2a5e3aa08dbdd819e05feb84175f2
[ "BSD-Source-Code" ]
null
null
null
services/web/project/adminsettings.py
pwdel/srcflask
71c91cc9edb2a5e3aa08dbdd819e05feb84175f2
[ "BSD-Source-Code" ]
null
null
null
services/web/project/adminsettings.py
pwdel/srcflask
71c91cc9edb2a5e3aa08dbdd819e05feb84175f2
[ "BSD-Source-Code" ]
null
null
null
# administrative username and password for development ADMIN_USERNAME = 'admin' ADMIN_PASSWORD = 'password' ADMIN_TYPE = 'admin' # for production # ADMIN_USERNAME = 'environ.get('ADMIN_USERNAME') # ADMIN_PASSWORD = 'environ.get('ADMIN_PASSWORD') # ADMIN_TYPE = 'environ.get('ADMIN_TYPE')
32
54
0.770833
35
288
6.085714
0.314286
0.183099
0.211268
0
0
0
0
0
0
0
0
0
0.107639
288
8
55
36
0.828794
0.704861
0
0
0
0
0.227848
0
0
0
0
0
0
1
0
false
0.333333
0
0
0
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
0
0
1
0
0
0
0
0
3
03094a8fb0cb1c5dd1e571be669375786508c47f
403
py
Python
oacensus/exceptions.py
ananelson/oacensus
87916c92ab1233bcf82a481113017dfb8d7701b9
[ "Apache-2.0" ]
null
null
null
oacensus/exceptions.py
ananelson/oacensus
87916c92ab1233bcf82a481113017dfb8d7701b9
[ "Apache-2.0" ]
2
2016-01-10T20:23:41.000Z
2016-01-14T16:57:06.000Z
oacensus/exceptions.py
ananelson/oacensus
87916c92ab1233bcf82a481113017dfb8d7701b9
[ "Apache-2.0" ]
null
null
null
class OacensusError(Exception): pass class UserFeedback(OacensusError): """ An exception which was caused by user input or a runtime error and which should be presented nicely. """ class ConfigFileFormatProblem(UserFeedback): """ A problem with config files. """ pass class APIError(UserFeedback): """ An exception raised by a remote API. """ pass
19.190476
76
0.665012
45
403
5.955556
0.666667
0.067164
0
0
0
0
0
0
0
0
0
0
0.253102
403
20
77
20.15
0.890365
0.411911
0
0.428571
0
0
0
0
0
0
0
0
0
1
0
true
0.428571
0
0
0.571429
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
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
1
0
0
3
031c707ec58ef183b7c607c6546f5f047d0e3e8e
272
py
Python
scripting/__init__.py
csdms/py-scripting
df8ba070e44a9d8e6ffcb70958f851e6776e2853
[ "MIT" ]
null
null
null
scripting/__init__.py
csdms/py-scripting
df8ba070e44a9d8e6ffcb70958f851e6776e2853
[ "MIT" ]
null
null
null
scripting/__init__.py
csdms/py-scripting
df8ba070e44a9d8e6ffcb70958f851e6776e2853
[ "MIT" ]
null
null
null
from ._version import get_versions from .contexts import cd from .prompting import error, prompt, status, success from .unix import cp, ln_s __all__ = ["prompt", "status", "success", "error", "cp", "cd", "ln_s"] __version__ = get_versions()["version"] del get_versions
24.727273
70
0.724265
38
272
4.815789
0.473684
0.180328
0.20765
0
0
0
0
0
0
0
0
0
0.136029
272
10
71
27.2
0.778723
0
0
0
0
0
0.143382
0
0
0
0
0
0
1
0
false
0
0.571429
0
0.571429
0
0
0
0
null
0
1
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
0
0
0
1
0
1
0
0
3
033bef35de4a5d1c411f88cd89ce77dc04b26d5f
1,748
py
Python
src/toil/server/wsgi_app.py
PolusAI/toil
a98acdb5cbe0f850b2c11403d147577d9971f4e1
[ "Apache-2.0" ]
516
2015-07-30T19:08:55.000Z
2018-07-03T20:53:42.000Z
src/toil/server/wsgi_app.py
PolusAI/toil
a98acdb5cbe0f850b2c11403d147577d9971f4e1
[ "Apache-2.0" ]
1,949
2015-07-29T23:38:49.000Z
2018-07-05T12:42:04.000Z
src/toil/server/wsgi_app.py
gmloose/toil
a82834073b28f66747c5c3ac99d1a678b82d2290
[ "Apache-2.0" ]
193
2015-07-31T18:52:57.000Z
2018-07-05T08:54:11.000Z
# Copyright (C) 2015-2021 Regents of the University of California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from typing import Any, Optional, Dict from gunicorn.app.base import BaseApplication # type: ignore class GunicornApplication(BaseApplication): # type: ignore """ An entry point to integrate a Gunicorn WSGI server in Python. To start a WSGI application with callable `app`, run the following code: WSGIApplication(app, options={ ... }).run() For more details, see: https://docs.gunicorn.org/en/latest/custom.html """ def __init__(self, app: object, options: Optional[Dict[str, Any]] = None): self.options = options or {} self.application = app super().__init__() def init(self, *args: Any) -> None: pass def load_config(self) -> None: for key, value in self.options.items(): if key in self.cfg.settings and value is not None: self.cfg.set(key.lower(), value) def load(self) -> object: return self.application def run_app(app: object, options: Optional[Dict[str, Any]] = None) -> None: """ Run a Gunicorn WSGI server. """ GunicornApplication(app, options=options).run()
34.27451
78
0.676201
239
1,748
4.903766
0.506276
0.051195
0.022184
0.027304
0.064846
0.064846
0.064846
0.064846
0
0
0
0.008856
0.224828
1,748
50
79
34.96
0.856089
0.519451
0
0
0
0
0
0
0
0
0
0
0
1
0.294118
false
0.058824
0.117647
0.058824
0.529412
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
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
3
033e5296d7002695cb78ba70091a41d8f1afe514
102
py
Python
tests/files/build_flask.py
microservice-tools/pixis
ce5a1ecc70732677518d21a0e876440af1245eac
[ "MIT" ]
null
null
null
tests/files/build_flask.py
microservice-tools/pixis
ce5a1ecc70732677518d21a0e876440af1245eac
[ "MIT" ]
21
2018-04-25T19:07:41.000Z
2018-07-18T06:04:56.000Z
tests/files/build_flask.py
microservice-tools/pixis
ce5a1ecc70732677518d21a0e876440af1245eac
[ "MIT" ]
1
2018-04-23T14:44:00.000Z
2018-04-23T14:44:00.000Z
SPEC = 'swagger.yaml' IMPLEMENTATION = 'flask' OUTPUT = 'build' FLASK_SERVER_NAME = 'my_flask_server'
20.4
37
0.754902
13
102
5.615385
0.769231
0.30137
0
0
0
0
0
0
0
0
0
0
0.117647
102
4
38
25.5
0.811111
0
0
0
0
0
0.362745
0
0
0
0
0
0
1
0
false
0
0
0
0
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
0
0
0
0
3
036b561ed932ab60b4b97fb19bd96ddc0a940784
246
py
Python
lab_restful/app/models/Paper.py
afish1001/lab_server
c6a2b09834d73078ab52e2965849cd41ba795b4b
[ "MIT" ]
null
null
null
lab_restful/app/models/Paper.py
afish1001/lab_server
c6a2b09834d73078ab52e2965849cd41ba795b4b
[ "MIT" ]
null
null
null
lab_restful/app/models/Paper.py
afish1001/lab_server
c6a2b09834d73078ab52e2965849cd41ba795b4b
[ "MIT" ]
null
null
null
from .. import utils from ..config import table class Paper(): def __init__(self): self.collection = table.paper self.conn = utils.mongo.db.get_collection(self.collection) def list(self): pass paper = Paper()
16.4
66
0.642276
31
246
4.935484
0.548387
0.183007
0
0
0
0
0
0
0
0
0
0
0.247967
246
14
67
17.571429
0.827027
0
0
0
0
0
0
0
0
0
0
0
0
1
0.222222
false
0.111111
0.222222
0
0.555556
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
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
3
ceed5b9c4d3963ebe8a8bb9c365ef1238097db1b
390
py
Python
tests/basics/try_reraise.py
geowor01/micropython
7fb13eeef4a85f21cae36f1d502bcc53880e1815
[ "MIT" ]
7
2019-10-18T13:41:39.000Z
2022-03-15T17:27:57.000Z
tests/basics/try_reraise.py
geowor01/micropython
7fb13eeef4a85f21cae36f1d502bcc53880e1815
[ "MIT" ]
null
null
null
tests/basics/try_reraise.py
geowor01/micropython
7fb13eeef4a85f21cae36f1d502bcc53880e1815
[ "MIT" ]
2
2020-06-23T09:10:15.000Z
2020-12-22T06:42:14.000Z
# Reraising last exception with raise w/o args def f(): try: raise ValueError("val", 3) print("FAIL") raise SystemExit except: raise try: f() print("FAIL") raise SystemExit except ValueError as e: pass # Can reraise only in except block try: raise print("FAIL") raise SystemExit except RuntimeError: print("PASS")
15
46
0.602564
48
390
4.895833
0.5625
0.114894
0.178723
0.306383
0.382979
0
0
0
0
0
0
0.003704
0.307692
390
25
47
15.6
0.866667
0.197436
0
0.578947
0
0
0.06129
0
0
0
0
0
0
1
0.052632
true
0.105263
0
0
0.052632
0.210526
0
0
0
null
0
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
0
1
1
0
0
0
0
0
3
cef7afd517df5ca0ce5466fa5f955c031bbbb177
223
py
Python
src/projects/tests/factories/package.py
unikubehq/projects
0df69eafa2a0d2664a22c7a5866d4512ac4d57fe
[ "Apache-2.0" ]
1
2021-10-05T13:17:03.000Z
2021-10-05T13:17:03.000Z
src/projects/tests/factories/package.py
unikubehq/projects
0df69eafa2a0d2664a22c7a5866d4512ac4d57fe
[ "Apache-2.0" ]
48
2021-07-06T07:24:36.000Z
2022-03-24T08:27:30.000Z
src/projects/tests/factories/package.py
unikubehq/projects
0df69eafa2a0d2664a22c7a5866d4512ac4d57fe
[ "Apache-2.0" ]
null
null
null
import factory from projects.tests.factories.project import ProjectFactory class DeckFactory(factory.DjangoModelFactory): class Meta: model = "projects.Deck" project = factory.SubFactory(ProjectFactory)
20.272727
59
0.766816
22
223
7.772727
0.681818
0
0
0
0
0
0
0
0
0
0
0
0.161435
223
10
60
22.3
0.914439
0
0
0
0
0
0.058296
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.833333
0
1
0
0
null
0
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
0
0
0
1
0
1
0
0
3
cef8e48081ec1240c8d15a802e15c821eaaffb84
1,064
py
Python
cfc_app/migrations/0005_auto_20201024_0139.py
ephyle/Legit-Info
7f3845563a64299aa64e4fdba75949276ed9a711
[ "BSD-2-Clause", "CC-BY-4.0", "Apache-2.0" ]
44
2020-10-19T13:06:10.000Z
2022-01-23T10:56:31.000Z
cfc_app/migrations/0005_auto_20201024_0139.py
ephyle/Legit-Info
7f3845563a64299aa64e4fdba75949276ed9a711
[ "BSD-2-Clause", "CC-BY-4.0", "Apache-2.0" ]
111
2020-10-20T22:12:58.000Z
2022-03-28T00:25:13.000Z
cfc_app/migrations/0005_auto_20201024_0139.py
ephyle/Legit-Info
7f3845563a64299aa64e4fdba75949276ed9a711
[ "BSD-2-Clause", "CC-BY-4.0", "Apache-2.0" ]
31
2021-02-08T22:32:37.000Z
2022-03-11T10:57:29.000Z
# Generated by Django 3.0.8 on 2020-10-24 01:39 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cfc_app', '0004_auto_20201024_0133'), ] operations = [ migrations.AlterField( model_name='hash', name='fob_method', field=models.CharField(editable=False, max_length=6), ), migrations.AlterField( model_name='hash', name='generated_date', field=models.DateField(editable=False), ), migrations.AlterField( model_name='hash', name='hashcode', field=models.CharField(editable=False, max_length=32), ), migrations.AlterField( model_name='hash', name='item_name', field=models.CharField(editable=False, max_length=255), ), migrations.AlterField( model_name='hash', name='size', field=models.PositiveIntegerField(editable=False), ), ]
27.282051
67
0.56391
102
1,064
5.735294
0.470588
0.17094
0.213675
0.247863
0.531624
0.531624
0.215385
0
0
0
0
0.051247
0.321429
1,064
38
68
28
0.759003
0.042293
0
0.46875
1
0
0.093412
0.022616
0
0
0
0
0
1
0
false
0
0.03125
0
0.125
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
cefb3f843b82b1bef9a3afd4b8e0d08adb19182d
175
py
Python
code/eda.py
rodriggs/twosigmafinancial
a8ad216a71e4bb3fbfbd606281b101b845eae961
[ "MIT" ]
null
null
null
code/eda.py
rodriggs/twosigmafinancial
a8ad216a71e4bb3fbfbd606281b101b845eae961
[ "MIT" ]
null
null
null
code/eda.py
rodriggs/twosigmafinancial
a8ad216a71e4bb3fbfbd606281b101b845eae961
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import h5py # docker run -it kagglegym # python # >>> import kagglegym # >>> kagglegym.test() train = pd.read_hdf("../data/train.h5")
15.909091
39
0.691429
26
175
4.615385
0.692308
0
0
0
0
0
0
0
0
0
0
0.013699
0.165714
175
10
40
17.5
0.808219
0.417143
0
0
0
0
0.164948
0
0
0
0
0
0
1
0
false
0
0.75
0
0.75
0
1
0
0
null
0
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
0
0
0
1
0
1
0
0
3
3010ae6e12181dbe483e73b05d5e55639ba72b1f
240
py
Python
backend/categories/models.py
cristianemoyano/django-react-webapp
c91d263f58b0d66a8c260e095d0ec6cee66f8afd
[ "MIT" ]
null
null
null
backend/categories/models.py
cristianemoyano/django-react-webapp
c91d263f58b0d66a8c260e095d0ec6cee66f8afd
[ "MIT" ]
null
null
null
backend/categories/models.py
cristianemoyano/django-react-webapp
c91d263f58b0d66a8c260e095d0ec6cee66f8afd
[ "MIT" ]
null
null
null
from django.db import models class Category(models.Model): """Category model.""" name = models.CharField(max_length=100, unique=True) class Meta: ordering = ('name',) def __str__(self): return self.name
17.142857
56
0.633333
29
240
5.068966
0.724138
0
0
0
0
0
0
0
0
0
0
0.016484
0.241667
240
13
57
18.461538
0.791209
0.0625
0
0
0
0
0.018265
0
0
0
0
0
0
1
0.142857
false
0
0.142857
0.142857
0.857143
0
1
0
0
null
0
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
0
0
0
0
1
1
0
0
3
302088ce171e1ce5fee7f69b6466cc5d52936180
3,960
py
Python
dingtalk/python/alibabacloud_dingtalk/workrecord_1_0/client.py
yndu13/dingtalk-sdk
700fb7bb49c4d3167f84afc5fcb5e7aa5a09735f
[ "Apache-2.0" ]
15
2020-08-27T04:10:26.000Z
2022-03-07T06:25:42.000Z
dingtalk/python/alibabacloud_dingtalk/workrecord_1_0/client.py
yndu13/dingtalk-sdk
700fb7bb49c4d3167f84afc5fcb5e7aa5a09735f
[ "Apache-2.0" ]
1
2020-09-27T01:30:46.000Z
2021-12-29T09:15:34.000Z
dingtalk/python/alibabacloud_dingtalk/workrecord_1_0/client.py
yndu13/dingtalk-sdk
700fb7bb49c4d3167f84afc5fcb5e7aa5a09735f
[ "Apache-2.0" ]
5
2020-08-27T04:07:44.000Z
2021-12-03T02:55:20.000Z
# -*- coding: utf-8 -*- # This file is auto-generated, don't edit it. Thanks. from Tea.core import TeaCore from alibabacloud_tea_openapi.client import Client as OpenApiClient from alibabacloud_tea_openapi import models as open_api_models from alibabacloud_tea_util.client import Client as UtilClient from alibabacloud_dingtalk.workrecord_1_0 import models as dingtalkworkrecord__1__0_models from alibabacloud_tea_util import models as util_models from alibabacloud_openapi_util.client import Client as OpenApiUtilClient class Client(OpenApiClient): """ *\ """ def __init__( self, config: open_api_models.Config, ): super().__init__(config) self._endpoint_rule = '' if UtilClient.empty(self._endpoint): self._endpoint = 'api.dingtalk.com' def count_work_record( self, request: dingtalkworkrecord__1__0_models.CountWorkRecordRequest, ) -> dingtalkworkrecord__1__0_models.CountWorkRecordResponse: runtime = util_models.RuntimeOptions() headers = dingtalkworkrecord__1__0_models.CountWorkRecordHeaders() return self.count_work_record_with_options(request, headers, runtime) async def count_work_record_async( self, request: dingtalkworkrecord__1__0_models.CountWorkRecordRequest, ) -> dingtalkworkrecord__1__0_models.CountWorkRecordResponse: runtime = util_models.RuntimeOptions() headers = dingtalkworkrecord__1__0_models.CountWorkRecordHeaders() return await self.count_work_record_with_options_async(request, headers, runtime) def count_work_record_with_options( self, request: dingtalkworkrecord__1__0_models.CountWorkRecordRequest, headers: dingtalkworkrecord__1__0_models.CountWorkRecordHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkworkrecord__1__0_models.CountWorkRecordResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.user_id): query['userId'] = request.user_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkworkrecord__1__0_models.CountWorkRecordResponse(), self.do_roarequest('CountWorkRecord', 'workrecord_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/workrecord/counts', 'json', req, runtime) ) async def count_work_record_with_options_async( self, request: dingtalkworkrecord__1__0_models.CountWorkRecordRequest, headers: dingtalkworkrecord__1__0_models.CountWorkRecordHeaders, runtime: util_models.RuntimeOptions, ) -> dingtalkworkrecord__1__0_models.CountWorkRecordResponse: UtilClient.validate_model(request) query = {} if not UtilClient.is_unset(request.user_id): query['userId'] = request.user_id real_headers = {} if not UtilClient.is_unset(headers.common_headers): real_headers = headers.common_headers if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token): real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token req = open_api_models.OpenApiRequest( headers=real_headers, query=OpenApiUtilClient.query(query) ) return TeaCore.from_map( dingtalkworkrecord__1__0_models.CountWorkRecordResponse(), await self.do_roarequest_async('CountWorkRecord', 'workrecord_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/workrecord/counts', 'json', req, runtime) )
44.494382
150
0.716162
432
3,960
6.141204
0.201389
0.01357
0.11308
0.147003
0.785526
0.747079
0.687524
0.687524
0.683754
0.683754
0
0.013016
0.204545
3,960
88
151
45
0.829206
0.020202
0
0.644737
1
0
0.054837
0.025867
0
0
0
0
0
1
0.039474
false
0
0.092105
0
0.197368
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
30292b7c2f6979a04692b3c67d475af07d5a822b
184
py
Python
modules/moderation/__init__.py
H3xadecimal/Nest
4422cf5725a71603ff58ccbf9f261b28ff96f70e
[ "MIT" ]
10
2018-04-21T07:29:42.000Z
2019-02-01T20:46:48.000Z
modules/moderation/__init__.py
H3xadecimal/Nest
4422cf5725a71603ff58ccbf9f261b28ff96f70e
[ "MIT" ]
2
2018-09-10T00:58:40.000Z
2019-12-22T11:19:58.000Z
modules/moderation/__init__.py
H3xadecimal/Nest
4422cf5725a71603ff58ccbf9f261b28ff96f70e
[ "MIT" ]
2
2018-09-09T23:07:56.000Z
2019-10-19T15:26:56.000Z
""" Basic moderation utilities for Birb. """ from .staff import CheckMods from .actions import ModActions def setup(bot): bot.add_cog(CheckMods()) bot.add_cog(ModActions())
15.333333
36
0.717391
24
184
5.416667
0.666667
0.092308
0.138462
0
0
0
0
0
0
0
0
0
0.163043
184
11
37
16.727273
0.844156
0.195652
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.4
0
0.6
0
1
0
0
null
0
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
0
0
0
1
0
1
0
0
3
303842a63bcf998cc97937b86976891ee5b81ac2
5,547
py
Python
lift-learn/metrics/_values.py
smn-ailab/lift-learn
158b8be554aad49033ee2eacf14fbbeb2418d6f7
[ "MIT" ]
1
2019-03-12T11:07:16.000Z
2019-03-12T11:07:16.000Z
lift-learn/metrics/_values.py
smn-ailab/lift-learn
158b8be554aad49033ee2eacf14fbbeb2418d6f7
[ "MIT" ]
1
2019-02-15T06:21:33.000Z
2019-02-20T01:03:54.000Z
lift-learn/metrics/_values.py
smn-ailab/lift-learn
158b8be554aad49033ee2eacf14fbbeb2418d6f7
[ "MIT" ]
null
null
null
"""Metrics to assess performance on ite prediction task.""" from typing import Optional import numpy as np import pandas as pd def expected_response(y: np.ndarray, w: np.ndarray, policy: np.ndarray, mu: Optional[np.ndarray]=None, ps: Optional[np.ndarray]=None) -> float: """Estimate expected response. Parameters ---------- y: array-like of shape = (n_samples) Observed target values. w: array-like of shape = shape = (n_samples) Treatment assignment variables. policy: array-like of shape = (n_samples) Estimated treatment policy. mu: array-like of shape = (n_samples, n_trts), optional Estimated potential outcomes. ps: array-like of shape = (n_samples, n_trts), optional Estimated propensity scores. Returns ------- expected_response: float Estimated expected_response. """ mu = np.zeros((w.shape[0], np.unique(w).shape[0])) if mu is None else mu ps = pd.get_dummies(w).mean(axis=0).values if ps is None else ps indicator = np.array(w == policy, dtype=int) expected_response = np.mean(mu[np.arange(w.shape[0]), policy] + (y - mu[np.arange(w.shape[0]), policy]) * indicator / ps[w]) return expected_response def ips_value(y: np.ndarray, w: np.ndarray, policy: np.ndarray, ps: Optional[np.ndarray]=None) -> float: """Decision Value Estimator based on Inverse Propensity Score Weighting method. Parameters ---------- y: array-like of shape = (n_samples) Observed target values. w: array-like of shape = shape = (n_samples) Treatment assignment indicators. policy: array-like of shape = (n_samples) Estimated decision model. ps: array-like of shape = (n_samples), optional Estimated propensity scores. Returns ------- decision_value: float Estimated decision value using Inverse Propensity Score Weighting method. References ---------- [1] Y. Zhao, X. Fang, D. S. Levi: Uplift modeling with multiple treatments and general response types, 2017. [2] A. Schuler, M. Baiocchi, R. Tibshirani, N. Shah: A comparison of methods for model selection when estimating individual treatment effects, 2018. """ if not isinstance(y, np.ndarray): raise TypeError("y must be a numpy.ndarray.") if not isinstance(w, np.ndarray): raise TypeError("w must be a numpy.ndarray.") if not isinstance(policy, np.ndarray): raise TypeError("policy must be a numpy.ndarray.") if ps is None: trts_probs = pd.get_dummies(w).mean(axis=0).values ps = np.ones((w.shape[0], np.unique(w).shape[0])) * np.expand_dims(trts_probs, axis=0) else: assert (np.max(ps) < 1) and (np.min(ps) > 0), "ps must be strictly between 0 and 1." treatment_matrix = pd.get_dummies(w).values if np.unique(policy).shape[0] == np.unique(w).shape[0]: policy = pd.get_dummies(policy).values else: diff = np.setdiff1d(np.unique(w), np.unique(policy)) policy = pd.get_dummies(policy).values for _diff in diff: policy = np.insert(policy, _diff, 0, axis=1) indicator_matrix = policy * treatment_matrix outcome_matrix = np.expand_dims(y, axis=1) * treatment_matrix decision_value = np.mean(np.sum(indicator_matrix * (outcome_matrix / ps), axis=1)) return decision_value def dr_value(y: np.ndarray, w: np.ndarray, policy: np.ndarray, mu: np.ndarray, ps: Optional[np.ndarray]=None) -> float: """Decision Value Estimator based on Doubly Robust method. Parameters ---------- y: array-like of shape = (n_samples) Observed target values. w: array-like of shape = (n_samples) Treatment assignment indicators. policy: array-like of shape = (n_samples) Estimated decision model. ps: array-like of shape = (n_samples) Estimated propensity scores. mu: array-like of shape = (n_samples, n_treatments), optional Estimated potential outcome for each treatment. Returns ------- decision_value: float Estimated decision value using Doubly Robust method. References ---------- [1] A. Schuler, M. Baiocchi, R. Tibshirani, N. Shah: A comparison of methods for model selection when estimating individual treatment effects, 2018. """ if not isinstance(y, np.ndarray): raise TypeError("y must be a numpy.ndarray.") if not isinstance(w, np.ndarray): raise TypeError("w must be a numpy.ndarray.") if not isinstance(policy, np.ndarray): raise TypeError("policy must be a numpy.ndarray.") if not isinstance(mu, np.ndarray): raise TypeError("mu must be a numpy.ndarray.") if ps is None: trts_probs = pd.get_dummies(w).mean(axis=0).values ps = np.ones((w.shape[0], np.unique(w).shape[0])) * np.expand_dims(trts_probs, axis=0) else: assert (np.max(ps) < 1) and (np.min(ps) > 0), "ps must be strictly between 0 and 1." treatment_matrix = pd.get_dummies(w).values policy = pd.get_dummies(policy).values diff = np.setdiff1d(np.unique(w), np.unique(policy)) for _diff in diff: policy = np.insert(policy, _diff, 0, axis=1) indicator_matrix = policy * treatment_matrix outcome_matrix = np.expand_dims(y, axis=1) * treatment_matrix decision_value = np.mean(np.sum(treatment_matrix * mu + indicator_matrix * (outcome_matrix - mu) / ps, axis=1)) return decision_value
36.493421
152
0.650442
772
5,547
4.589378
0.176166
0.053345
0.043466
0.063223
0.796218
0.761219
0.713237
0.691222
0.624894
0.603443
0
0.011233
0.229674
5,547
151
153
36.735099
0.817927
0.383991
0
0.677966
0
0
0.083702
0
0
0
0
0
0.033898
1
0.050847
false
0
0.050847
0
0.152542
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
0
0
0
0
3
303aea533163720c626b39e6c0bbce695a86963f
16,358
py
Python
tests/cases/matching_graph.py
nilsec/mtrack
76652c468417c7e3ac9903586c0127b884d6b032
[ "MIT" ]
null
null
null
tests/cases/matching_graph.py
nilsec/mtrack
76652c468417c7e3ac9903586c0127b884d6b032
[ "MIT" ]
null
null
null
tests/cases/matching_graph.py
nilsec/mtrack
76652c468417c7e3ac9903586c0127b884d6b032
[ "MIT" ]
null
null
null
import unittest import numpy as np from mtrack.graphs import G1 from mtrack.evaluation.matching_graph import MatchingGraph from mtrack.evaluation.voxel_skeleton import VoxelSkeleton from comatch import match_components import json test_data_dir = "./data" class ParallelLinesSetUp(unittest.TestCase): def setUp(self): """ o o | | | | | | | | | | o o | | | | | | | | o o | | | | . . . . . . """ self.gt_vertices = 10 self.rec_vertices = 10 self.gt = G1(self.gt_vertices) self.rec = G1(self.rec_vertices) z = 0 for v in self.gt.get_vertex_iterator(): self.gt.set_position(v, np.array([100,100,z])) self.gt.set_orientation(v, np.array([1,0,0])) z += 5 if int(v)<self.gt_vertices-1: self.gt.add_edge(int(v), int(v)+1) self.vs_gt = VoxelSkeleton(self.gt, voxel_size=[1.,1.,1.], verbose=True) # Different offset: z = 0 for v in self.rec.get_vertex_iterator(): self.rec.set_position(v, np.array([150,100,z])) self.rec.set_orientation(v, np.array([1,0,0])) z += 5 if int(v)<self.rec_vertices-1: self.rec.add_edge(int(v), int(v)+1) self.vs_rec = VoxelSkeleton(self.rec, voxel_size=[1.,1.,1.], verbose=True) self.groundtruth_skeletons = [self.vs_gt] self.reconstructed_skeletons = [self.vs_rec] self.skeletons = {"gt": self.vs_gt, "rec": self.vs_rec} self.distance_threshold = 50.1 self.voxel_size = [1.,1.,1.] class ErrorTestSetUpSameDistance(unittest.TestCase): def setUp(self): self.gt_vertices = 10 self.rec1_vertices = 5 self.rec2_vertices = 5 self.gt = G1(self.gt_vertices) self.rec1 = G1(self.rec1_vertices) self.rec2 = G1(self.rec2_vertices) z = 0 for v in self.gt.get_vertex_iterator(): self.gt.set_position(v, np.array([100,100,z])) self.gt.set_orientation(v, np.array([1,0,0])) z += 5 if int(v)<self.gt_vertices-1: self.gt.add_edge(int(v), int(v)+1) self.vs_gt = VoxelSkeleton(self.gt, voxel_size=[1.,1.,1.], verbose=True, subsample=5) z = 0 for v in self.rec1.get_vertex_iterator(): self.rec1.set_position(v, np.array([160,100, z])) self.rec1.set_orientation(v, np.array([1,0,0])) z += 5 if int(v)<self.rec1_vertices-1: self.rec1.add_edge(int(v), int(v)+1) z = 0 for v in self.rec2.get_vertex_iterator(): self.rec2.set_position(v, np.array([100,150, z])) self.rec2.set_orientation(v, np.array([1,0,0])) z += 5 if int(v)<self.rec2_vertices-1: self.rec2.add_edge(int(v), int(v)+1) self.vs_rec1 = VoxelSkeleton(self.rec1, voxel_size=[1.,1.,1.], verbose=True, subsample=5) self.vs_rec2 = VoxelSkeleton(self.rec2, voxel_size=[1.,1.,1.], verbose=True, subsample=5) self.groundtruth_skeletons = [self.vs_gt] self.reconstructed_skeletons = [self.vs_rec1, self.vs_rec2] self.skeletons = {"gt": [self.vs_gt], "rec": [self.vs_rec1, self.vs_rec2]} self.distance_threshold = 51 self.voxel_size = [1.,1.,1.] class MatchingGraphNoInitAllTestCase(ParallelLinesSetUp): def runTest(self): mg = MatchingGraph(self.groundtruth_skeletons, self.reconstructed_skeletons, self.distance_threshold, self.voxel_size, verbose=True, initialize_all=False) self.assertTrue(mg.total_vertices ==\ self.vs_gt.get_graph().get_number_of_vertices() +\ self.vs_rec.get_graph().get_number_of_vertices()) class MatchingGraphInitializeTestCase(ParallelLinesSetUp): def runTest(self): mg = MatchingGraph(self.groundtruth_skeletons, self.reconstructed_skeletons, self.distance_threshold, self.voxel_size, verbose=True, initialize_all=False) # Test private methods too as internals are complex: matching_graph, mappings, mv_to_v, v_to_mv = mg._MatchingGraph__initialize() self.assertTrue(matching_graph.get_number_of_vertices() ==\ mg._MatchingGraph__get_total_vertices()) self.assertTrue(matching_graph.get_number_of_edges()==0) for tag in ["gt", "rec"]: for graph in mg.graphs[tag]: for v in graph.get_vertex_iterator(): mv = v_to_mv[(graph, int(v))] pos_v = np.array(graph.get_position(v)) pos_mv = np.array(matching_graph.get_position(mv)) self.assertTrue(np.all(pos_v == pos_mv)) mv_ids_rec = mappings["rec"]["mv_ids"] mv_ids_gt = mappings["gt"]["mv_ids"] self.assertTrue(set(mv_ids_rec) & set(mv_ids_gt) == set([])) self.assertTrue(sorted(mv_ids_rec + mv_ids_gt) ==\ range(matching_graph.get_number_of_vertices())) for i in range(len(mv_ids_gt)): mv_id = mv_ids_gt[i] graph_pos = np.array(matching_graph.get_position(mv_id)) mapping_pos = mappings["gt"]["positions"][i] self.assertTrue(np.all(graph_pos == mapping_pos)) for i in range(len(mv_ids_rec)): mv_id = mv_ids_rec[i] graph_pos = np.array(matching_graph.get_position(mv_id)) mapping_pos = mappings["rec"]["positions"][i] self.assertTrue(np.all(graph_pos == mapping_pos)) class MatchingGraphAddSkeletonEdgesTestCase(ParallelLinesSetUp): def runTest(self): mg = MatchingGraph(self.groundtruth_skeletons, self.reconstructed_skeletons, self.distance_threshold, self.voxel_size, verbose=True, initialize_all=False) matching_graph, mappings, mv_to_v, v_to_mv = mg._MatchingGraph__initialize() mg.matching_graph = matching_graph mg.mappings = mappings mg.mv_to_v = mv_to_v mg.v_to_mv = v_to_mv self.assertTrue(matching_graph.get_number_of_edges() == 0) mg._MatchingGraph__add_skeleton_edges() self.assertTrue(matching_graph.get_number_of_edges() ==\ self.vs_gt.get_graph().get_number_of_edges() +\ self.vs_rec.get_graph().get_number_of_edges()) # Check that all edges are attached to the correct vertices: for e in matching_graph.get_edge_iterator(): mv0 = e.source() mv1 = e.target() v0 = mv_to_v[mv0] v1 = mv_to_v[mv1] # Compare graphs self.assertTrue(v0[0] == v1[0]) edge = v0[0].get_edge(v0[1], v1[1]) # Raises value error if not there pos_v0 = np.array(v0[0].get_position(v0[1])) pos_v1 = np.array(v0[0].get_position(v1[1])) pos_mv0 = np.array(matching_graph.get_position(mv0)) pos_mv1 = np.array(matching_graph.get_position(mv1)) self.assertTrue(np.all(pos_v0 == pos_mv0)) self.assertTrue(np.all(pos_v1 == pos_mv1)) class MatchingGraphAddMatchingEdgesTestCase(ParallelLinesSetUp): def runTest(self): mg = MatchingGraph(self.groundtruth_skeletons, self.reconstructed_skeletons, self.distance_threshold, self.voxel_size, verbose=True, initialize_all=False) matching_graph, mappings, mv_to_v, v_to_mv = mg._MatchingGraph__initialize() mg.matching_graph = matching_graph mg.mappings = mappings mg.mv_to_v = mv_to_v mg.v_to_mv = v_to_mv mg._MatchingGraph__add_skeleton_edges() edges_pre_add = mg.matching_graph.get_number_of_edges() mg._MatchingGraph__add_matching_edges(self.distance_threshold, self.voxel_size) edges_post_add = mg.matching_graph.get_number_of_edges() self.assertTrue(edges_post_add > edges_pre_add) mg.mask_skeleton_edges() edges_post_masking = mg.matching_graph.get_number_of_edges() self.assertTrue(edges_post_masking == edges_pre_add) for e in mg.matching_graph.get_edge_iterator(): self.assertTrue(mg.get_edge_type(e) == "skeleton") mg.clear_edge_masks() self.assertTrue(edges_post_add == mg.matching_graph.get_number_of_edges()) mg.mask_matching_edges() self.assertTrue(edges_post_add - edges_pre_add ==\ mg.matching_graph.get_number_of_edges()) for e in mg.matching_graph.get_edge_iterator(): self.assertTrue(mg.get_edge_type(e) == "matching") v0_gt = mg.is_groundtruth_mv(e.source()) v1_gt = mg.is_groundtruth_mv(e.target()) self.assertTrue(int(v0_gt) != int(v1_gt)) mg.clear_edge_masks() mg.to_nml(test_data_dir + "/matching_graph.nml") class MatchingGraphExportToComatch(ParallelLinesSetUp): def runTest(self): mg = MatchingGraph(self.groundtruth_skeletons, self.reconstructed_skeletons, self.distance_threshold, self.voxel_size, verbose=True, initialize_all=True) nodes_gt, nodes_rec, edges_gt_rec, labels_gt, labels_rec, edge_costs, edge_conflicts, edge_pairs = mg.export_to_comatch() for v_gt in nodes_gt: self.assertTrue(mg.is_groundtruth_mv(v_gt)) for v_rec in nodes_rec: self.assertFalse(mg.is_groundtruth_mv(v_rec)) mg.mask_matching_edges() self.assertTrue(len(edges_gt_rec) == mg.get_number_of_edges()) mg.clear_edge_masks() self.assertTrue(len(nodes_gt) + len(nodes_rec) == mg.get_number_of_vertices()) class MatchingGraphImportMatches(ParallelLinesSetUp): def runTest(self): print "Import matches" mg = MatchingGraph(self.groundtruth_skeletons, self.reconstructed_skeletons, self.distance_threshold, self.voxel_size, verbose=True, initialize_all=True) nodes_gt, nodes_rec, edges_gt_rec, labels_gt, labels_rec, edge_costs, edge_conflicts, edge_pairs = mg.export_to_comatch() label_matches, node_matches, num_splits, num_merges, num_fps, num_fns = match_components(nodes_gt, nodes_rec, edges_gt_rec, labels_gt, labels_rec) matches = node_matches # Everything is matched self.assertTrue(len(matches) == mg.get_number_of_vertices()/2) mg.import_matches(matches) for v in mg.get_vertex_iterator(): self.assertTrue(mg.is_tp(v)) self.assertFalse(mg.is_fp(v)) self.assertFalse(mg.is_fn(v)) for e in mg.get_edge_iterator(): self.assertFalse(mg.is_split(e)) self.assertFalse(mg.is_merge(e)) class MatchingGraphExportToComatch(ParallelLinesSetUp): def runTest(self): mg = MatchingGraph(self.groundtruth_skeletons, self.reconstructed_skeletons, self.distance_threshold, self.voxel_size, verbose=True, initialize_all=True) nodes_gt, nodes_rec, edges_gt_rec, labels_gt, labels_rec, edge_costs, edge_conflicts, edge_pairs = mg.export_to_comatch() for v_gt in nodes_gt: self.assertTrue(mg.is_groundtruth_mv(v_gt)) for v_rec in nodes_rec: self.assertFalse(mg.is_groundtruth_mv(v_rec)) mg.mask_matching_edges() self.assertTrue(len(edges_gt_rec) == mg.get_number_of_edges()) mg.clear_edge_masks() self.assertTrue(len(nodes_gt) + len(nodes_rec) == mg.get_number_of_vertices()) class TestOneToOne(ErrorTestSetUpSameDistance): def runTest(self): print "OneToOne" mg = MatchingGraph(self.groundtruth_skeletons, self.reconstructed_skeletons, self.distance_threshold, self.voxel_size, verbose=True, distance_cost=True, initialize_all=True) nodes_gt, nodes_rec, edges_gt_rec, labels_gt, labels_rec, edge_costs, edge_conflicts, edge_pairs = mg.export_to_comatch() try: # Quadmatch label_matches, node_matches, num_splits, num_merges, num_fps, num_fns = match_components(nodes_gt, nodes_rec, edges_gt_rec, labels_gt, labels_rec, edge_conflicts=edge_conflicts, max_edges=1, edge_costs=edge_costs) except TypeError: # Comatch label_matches, node_matches, num_splits, num_merges, num_fps, num_fns = match_components(nodes_gt, nodes_rec, edges_gt_rec, labels_gt, labels_rec, allow_many_to_many=False, edge_costs=edge_costs, no_match_costs=1000.) print "label matches:", label_matches print "node_matches:", node_matches comatch_errors = {"splits": num_splits, "num_merges": num_merges, "num_fps": num_fps, "num_fns": num_fns} print comatch_errors mg.import_matches(node_matches) output_dir = test_data_dir + "/MatchingOnetoOne" mg.export_all(output_dir) with open(output_dir + "/macro_errors.json", "w+") as f: json.dump(comatch_errors, f) class TestManyToMany(ErrorTestSetUpSameDistance): def runTest(self): print "ManyToMany" mg = MatchingGraph(self.groundtruth_skeletons, self.reconstructed_skeletons, self.distance_threshold, self.voxel_size, verbose=True, distance_cost=True, initialize_all=True) nodes_gt, nodes_rec, edges_gt_rec, labels_gt, labels_rec, edge_costs, edge_conflicts, edge_pairs = mg.export_to_comatch() try: # Quadmatch label_matches, node_matches, num_splits, num_merges, num_fps, num_fns = match_components(nodes_gt, nodes_rec, edges_gt_rec, labels_gt, labels_rec, edge_conflicts=edge_conflicts, max_edges=10, edge_costs=edge_costs) except TypeError: # Comatch label_matches, node_matches, num_splits, num_merges, num_fps, num_fns = match_components(nodes_gt, nodes_rec, edges_gt_rec, labels_gt, labels_rec, allow_many_to_many=True, edge_costs=edge_costs, no_match_costs=1000.) print "label matches:", label_matches print "node_matches:", node_matches comatch_errors = {"splits": num_splits, "num_merges": num_merges, "num_fps": num_fps, "num_fns": num_fns} print comatch_errors mg.import_matches(node_matches) output_dir = test_data_dir + "/MatchingManytoMany" mg.export_all(output_dir) with open(output_dir + "/macro_errors.json", "w+") as f: json.dump(comatch_errors, f) if __name__ == "__main__": unittest.main()
38.399061
183
0.578127
1,950
16,358
4.528718
0.094359
0.044389
0.023667
0.025365
0.771487
0.720303
0.681916
0.650323
0.632997
0.609218
0
0.016658
0.324734
16,358
425
184
38.489412
0.782817
0.014183
0
0.568493
0
0
0.020643
0
0
0
0
0
0.116438
0
null
null
0
0.041096
null
null
0.030822
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
3
3043145d544f46f022747e55bca435bd3cfd11fa
133
py
Python
src/a01/communication.py
mcardosos/adx-automation-client
d657ff85b0f0e408e5c64703c47798d164f49a35
[ "MIT" ]
3
2018-02-28T06:22:39.000Z
2020-05-20T12:39:00.000Z
src/a01/communication.py
mcardosos/adx-automation-client
d657ff85b0f0e408e5c64703c47798d164f49a35
[ "MIT" ]
19
2018-02-26T21:13:43.000Z
2018-05-02T16:33:35.000Z
src/a01/communication.py
mcardosos/adx-automation-client
d657ff85b0f0e408e5c64703c47798d164f49a35
[ "MIT" ]
6
2018-02-26T18:10:31.000Z
2020-12-30T10:21:31.000Z
import requests from a01.auth import A01Auth session = requests.Session() # pylint: disable=invalid-name session.auth = A01Auth()
19
60
0.766917
17
133
6
0.647059
0
0
0
0
0
0
0
0
0
0
0.052174
0.135338
133
6
61
22.166667
0.834783
0.210526
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
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
0
0
1
0
0
0
0
3
304caab2fd293dcea3ce7502cec96c166db7a553
187
py
Python
system/widget.py
ywchiao/shot
4b7c55bdcca44d05e07fffa59fe4e23364032cb5
[ "MIT" ]
null
null
null
system/widget.py
ywchiao/shot
4b7c55bdcca44d05e07fffa59fe4e23364032cb5
[ "MIT" ]
null
null
null
system/widget.py
ywchiao/shot
4b7c55bdcca44d05e07fffa59fe4e23364032cb5
[ "MIT" ]
1
2020-03-27T02:07:27.000Z
2020-03-27T02:07:27.000Z
from .system import System from logcat import LogCat class Widget(System): def __init__(self): super().__init__() self.on("cmd_render", self._render) # widget.py
14.384615
43
0.663102
24
187
4.75
0.583333
0.140351
0
0
0
0
0
0
0
0
0
0
0.224599
187
12
44
15.583333
0.786207
0.048128
0
0
0
0
0.057143
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.666667
0
1
0
0
null
0
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
0
0
0
1
0
1
0
0
3
305a285236c3e11d999251641ede1bf722d4ce33
211
py
Python
web/app/conf/__init__.py
kvikshaug/btc.kvikshaug.no
a353096db9edf7ef0aa44e77c367c96b73fbfe6f
[ "Unlicense" ]
null
null
null
web/app/conf/__init__.py
kvikshaug/btc.kvikshaug.no
a353096db9edf7ef0aa44e77c367c96b73fbfe6f
[ "Unlicense" ]
null
null
null
web/app/conf/__init__.py
kvikshaug/btc.kvikshaug.no
a353096db9edf7ef0aa44e77c367c96b73fbfe6f
[ "Unlicense" ]
null
null
null
import importlib import os conf_module = importlib.import_module("conf.%s" % os.environ['CONFIGURATION']) settings = { key: getattr(conf_module, key) for key in dir(conf_module) if key.isupper() }
19.181818
78
0.706161
29
211
5
0.551724
0.206897
0
0
0
0
0
0
0
0
0
0
0.170616
211
10
79
21.1
0.828571
0
0
0
0
0
0.094787
0
0
0
0
0
0
1
0
false
0
0.375
0
0.375
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
0
0
0
1
0
0
0
0
3
0630137217338e4305c7a3e00109299b6cd31cc9
133
py
Python
src/rstatmon/session_manager.py
git-ogawa/raspi-statmon
619d7a8f697cad92437e2f558de2e0a626b5072f
[ "BSD-3-Clause" ]
null
null
null
src/rstatmon/session_manager.py
git-ogawa/raspi-statmon
619d7a8f697cad92437e2f558de2e0a626b5072f
[ "BSD-3-Clause" ]
null
null
null
src/rstatmon/session_manager.py
git-ogawa/raspi-statmon
619d7a8f697cad92437e2f558de2e0a626b5072f
[ "BSD-3-Clause" ]
null
null
null
from flask import session class Session(): @staticmethod def set_session(key: str, value): session[key] = value
12.090909
37
0.646617
16
133
5.3125
0.6875
0.235294
0
0
0
0
0
0
0
0
0
0
0.263158
133
10
38
13.3
0.867347
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.2
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
0
0
0
0
0
1
0
0
3
063c305a923cd42896c01fbe6e2e8a0cb43f9912
452
py
Python
excript/aulas/aula26_concatena.py
victorers1/anotacoes_curso_python
c4ef56bcfc7e3baa3944fc2962e8217c6d720b0e
[ "MIT" ]
null
null
null
excript/aulas/aula26_concatena.py
victorers1/anotacoes_curso_python
c4ef56bcfc7e3baa3944fc2962e8217c6d720b0e
[ "MIT" ]
null
null
null
excript/aulas/aula26_concatena.py
victorers1/anotacoes_curso_python
c4ef56bcfc7e3baa3944fc2962e8217c6d720b0e
[ "MIT" ]
null
null
null
num_int = 5 num_dec = 7.3 val_str = "texto qualquer " print("Primeiro número é:", num_int) print("O poder do Kakaroto é mais de %i mil" %num_dec) print("Olá mundo " + val_str + str(num_int)) print("Concatenando decimal:", num_dec) print("Concatenando decimal: %.10f" %num_dec) print("Concatenando decimal: " + str(num_dec)) print("Concatenando strings:", val_str) print("Concatenando strings: %s" %val_str) print("Concatenando strings: " + val_str)
30.133333
55
0.721239
70
452
4.471429
0.414286
0.325879
0.140575
0.220447
0.479233
0
0
0
0
0
0
0.012723
0.130531
452
15
56
30.133333
0.783715
0
0
0
0
0
0.476821
0
0
0
0
0
0
1
0
false
0
0
0
0
0.75
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
0
0
0
0
0
0
1
0
3
066e5fb8233dc5224d22ebf3b89a9a83782274aa
745
py
Python
TITADOweb/web/migrations/0005_passwordresetcodes.py
KomeilParseh/TITA-DO
714685fa18bfd2ef07f5c0d656927039b05d7997
[ "MIT" ]
9
2020-08-27T10:10:11.000Z
2021-04-21T04:46:15.000Z
TITADOweb/web/migrations/0005_passwordresetcodes.py
mdk1384/TITA-DO-1
714685fa18bfd2ef07f5c0d656927039b05d7997
[ "MIT" ]
2
2020-08-27T12:09:57.000Z
2021-01-05T09:29:19.000Z
TITADOweb/web/migrations/0005_passwordresetcodes.py
mdk1384/TITA-DO-1
714685fa18bfd2ef07f5c0d656927039b05d7997
[ "MIT" ]
2
2020-08-27T10:10:18.000Z
2021-01-01T06:20:20.000Z
# Generated by Django 3.1.4 on 2020-12-27 17:34 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('web', '0004_token'), ] operations = [ migrations.CreateModel( name='Passwordresetcodes', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('code', models.CharField(max_length=32)), ('email', models.CharField(max_length=120)), ('time', models.DateTimeField()), ('username', models.CharField(max_length=50)), ('password', models.CharField(max_length=50)), ], ), ]
29.8
114
0.561074
73
745
5.616438
0.684932
0.146341
0.17561
0.234146
0.126829
0
0
0
0
0
0
0.053537
0.297987
745
24
115
31.041667
0.730402
0.060403
0
0
1
0
0.091691
0
0
0
0
0
0
1
0
false
0.111111
0.055556
0
0.222222
0
0
0
0
null
0
0
1
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
0
0
1
0
0
0
0
0
3
069a8d7c6fbb5a8f120cebac621c759b5b2c0718
233
py
Python
article_retrieval/__main__.py
aleph-oh/wikigame-solver
9a7b0a16df41291890e2bbe5903be55b25cef0f4
[ "MIT" ]
null
null
null
article_retrieval/__main__.py
aleph-oh/wikigame-solver
9a7b0a16df41291890e2bbe5903be55b25cef0f4
[ "MIT" ]
null
null
null
article_retrieval/__main__.py
aleph-oh/wikigame-solver
9a7b0a16df41291890e2bbe5903be55b25cef0f4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """Constructs article graph.""" from database import clear_db from database.constants import engine from .database_builder import populate_db if __name__ == "__main__": clear_db(engine) populate_db()
21.181818
41
0.759657
31
233
5.290323
0.612903
0.219512
0
0
0
0
0
0
0
0
0
0.005
0.141631
233
10
42
23.3
0.815
0.201717
0
0
0
0
0.044444
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
0
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
0
1
0
1
0
0
0
0
3
06a458881d352d1e5bc5252e5c9354f711ebe5e6
208
py
Python
src_old/tests/scripts/core/ex7.py
toddrme2178/pyccel
deec37503ab0c5d0bcca1a035f7909f7ce8ef653
[ "MIT" ]
null
null
null
src_old/tests/scripts/core/ex7.py
toddrme2178/pyccel
deec37503ab0c5d0bcca1a035f7909f7ce8ef653
[ "MIT" ]
null
null
null
src_old/tests/scripts/core/ex7.py
toddrme2178/pyccel
deec37503ab0c5d0bcca1a035f7909f7ce8ef653
[ "MIT" ]
null
null
null
#coding: utf-8 a = zeros((10,10), double) for i in range(0,10): a[i,i] = 2.0 for i in range(0,9): a[i,i+1] = -1.0 for i in range(0,9): a[i,i+1] = -1.0 n = 5 for i in range(0, n): x = 1
10.947368
26
0.480769
53
208
1.886792
0.339623
0.16
0.24
0.44
0.63
0.39
0.39
0.39
0.39
0.39
0
0.156463
0.293269
208
18
27
11.555556
0.52381
0.0625
0
0.4
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
1
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
0
0
0
0
0
0
0
0
3
06abef330b43336341fe87f19a5bb8dd00ab85db
252
py
Python
driver/comtypes_gamry_simulate.py
yul69-cell/HELAO
a39372eb385ee93b711443d9cbd56c5ec737ff70
[ "CC0-1.0" ]
null
null
null
driver/comtypes_gamry_simulate.py
yul69-cell/HELAO
a39372eb385ee93b711443d9cbd56c5ec737ff70
[ "CC0-1.0" ]
null
null
null
driver/comtypes_gamry_simulate.py
yul69-cell/HELAO
a39372eb385ee93b711443d9cbd56c5ec737ff70
[ "CC0-1.0" ]
null
null
null
#create cinet and functions like COMError that simulate Gamry #dtaq.Cook is defined to return dummy data when called #import config here and check if a simulation is being run and if so load that simulation .py that overrides functions like dtaq.Cook
50.4
133
0.809524
43
252
4.744186
0.744186
0.127451
0
0
0
0
0
0
0
0
0
0
0.166667
252
5
133
50.4
0.971429
0.972222
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
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
3
06af2b443d404bade0c4526a7994135505c898f7
737
py
Python
kelte/maths/vector.py
brianbruggeman/rl
6dd8a53da07697ffc87e62aa397be7b3b08f0aa0
[ "MIT" ]
null
null
null
kelte/maths/vector.py
brianbruggeman/rl
6dd8a53da07697ffc87e62aa397be7b3b08f0aa0
[ "MIT" ]
null
null
null
kelte/maths/vector.py
brianbruggeman/rl
6dd8a53da07697ffc87e62aa397be7b3b08f0aa0
[ "MIT" ]
null
null
null
from dataclasses import dataclass, field from .point import Point @dataclass() class Direction(Point): x: int = 0 y: int = 0 NONE: Direction = Direction(0, 0) NORTH: Direction = Direction(0, -1) SOUTH: Direction = Direction(0, 1) EAST: Direction = Direction(1, 0) WEST: Direction = Direction(-1, 0) NORTH_EAST: Direction = NORTH + EAST NORTH_WEST: Direction = NORTH + WEST SOUTH_EAST: Direction = SOUTH + EAST SOUTH_WEST: Direction = SOUTH + WEST UP: Direction = Direction(0, -1) DOWN: Direction = Direction(0, 1) RIGHT: Direction = Direction(1, 0) LEFT: Direction = Direction(-1, 0) UP_RIGHT: Direction = UP + RIGHT UP_LEFT: Direction = UP + LEFT DOWN_RIGHT: Direction = DOWN + RIGHT DOWN_LEFT: Direction = DOWN + LEFT
22.333333
40
0.708277
104
737
4.942308
0.211538
0.315175
0.184825
0.155642
0
0
0
0
0
0
0
0.032949
0.176391
737
32
41
23.03125
0.813839
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.086957
0
0.217391
0
0
0
0
null
1
1
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
0
1
0
0
0
0
0
0
3
2311235022e84d72f4d0c26645f17bee8edd6070
1,615
py
Python
statzcw/stats.py
xt0fer/Py21-BasicStats
5e747765e58092d014fb36e66e2c4d623b1dbcba
[ "MIT" ]
null
null
null
statzcw/stats.py
xt0fer/Py21-BasicStats
5e747765e58092d014fb36e66e2c4d623b1dbcba
[ "MIT" ]
null
null
null
statzcw/stats.py
xt0fer/Py21-BasicStats
5e747765e58092d014fb36e66e2c4d623b1dbcba
[ "MIT" ]
1
2021-07-11T14:50:21.000Z
2021-07-11T14:50:21.000Z
from typing import List def zcount(list: List[float]) -> float: return len(list) # print("stats test") # print("zcount should be 5 ==", zcount([1.0,2.0,3.0,4.0,5.0])) def zmean(list: List[float]) -> float: return sum(list) / zcount(list) def zmode(list: List[float]) -> float: return max(set(list), key = list.count) def zmedian(list: List[float]) -> float: sortedLst = sorted(list) lstLen = len(list) index = (lstLen - 1) // 2 if (lstLen % 2): return sortedLst[index] else: return (sortedLst[index] + sortedLst[index + 1])/2.0 def zvariance(list: List[float]) -> float: # Number of observations n = zcount(list) - 1 # Mean of the data #mean = sum(data) / n mean = zmean(list) # Square deviations deviations = [abs(mean - xi) ** 2 for xi in list] # Variance variance = sum(deviations) / n return variance def zstddev(list: List[float]) -> float: return 0.0 def zstderr(list: List[float]) -> float: return 0.0 def zcov(a, b): pass def zcorr(listx: List[float], listy: List[float]) -> float: return 0.0 def readDataSets(files): # print("in readDataSets...", files) data = {} for file in files: twoLists = readDataFile(file) data[file] = twoLists return data def readDataFile(file): x,y = [], [] with open(file) as f: first_line = f.readline() # consume headers for l in f: row = l.split(',') #print(row, type(row)) x.append(float(row[0])) y.append(float(row[1])) return (x,y)
23.071429
63
0.577709
224
1,615
4.160714
0.352679
0.08691
0.120172
0.135193
0.166309
0.089056
0.089056
0.062232
0
0
0
0.022959
0.271827
1,615
69
64
23.405797
0.769558
0.150464
0
0.068182
0
0
0.000735
0
0
0
0
0
0
1
0.25
false
0.022727
0.022727
0.136364
0.522727
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
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
2316d7baa946659edc0058ea0663bc1e4f77f7ab
14
py
Python
getv/__init__.py
FUNNYDMAN/getv
b0c495c9c9b9dea8bff86916aee85ecac4f505ab
[ "MIT" ]
1
2018-08-07T18:50:43.000Z
2018-08-07T18:50:43.000Z
getv/__init__.py
FUNNYDMAN/getv
b0c495c9c9b9dea8bff86916aee85ecac4f505ab
[ "MIT" ]
null
null
null
getv/__init__.py
FUNNYDMAN/getv
b0c495c9c9b9dea8bff86916aee85ecac4f505ab
[ "MIT" ]
null
null
null
name = "getv"
7
13
0.571429
2
14
4
1
0
0
0
0
0
0
0
0
0
0
0
0.214286
14
1
14
14
0.727273
0
0
0
0
0
0.285714
0
0
0
0
0
0
1
0
false
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
0
0
0
0
0
0
0
0
0
0
3
231e10107f5e6e0ebcb3429683ae08fd50e51f90
162
py
Python
collections/employee.py
learning-foundation/python-oo-ds
58c212da4562f65f99c8df24bff7667744ea552b
[ "MIT" ]
null
null
null
collections/employee.py
learning-foundation/python-oo-ds
58c212da4562f65f99c8df24bff7667744ea552b
[ "MIT" ]
null
null
null
collections/employee.py
learning-foundation/python-oo-ds
58c212da4562f65f99c8df24bff7667744ea552b
[ "MIT" ]
null
null
null
class Employee(): def __init__(self, name, doc_number, salary): self._name = name self._doc_number = doc_number self._salary = salary
27
49
0.635802
20
162
4.65
0.45
0.290323
0
0
0
0
0
0
0
0
0
0
0.271605
162
6
50
27
0.788136
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0
0
0.4
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
0
0
0
0
3
23294fabdcf63ba5d2ca1685c4bb3c0849350f0e
207
py
Python
game_test.py
jakub530/PyGame-Neural-Net
6f592ee97d97470cddc6599203c9a5d9759905c4
[ "MIT" ]
null
null
null
game_test.py
jakub530/PyGame-Neural-Net
6f592ee97d97470cddc6599203c9a5d9759905c4
[ "MIT" ]
null
null
null
game_test.py
jakub530/PyGame-Neural-Net
6f592ee97d97470cddc6599203c9a5d9759905c4
[ "MIT" ]
null
null
null
import sys, pygame,math import numpy as np from pygame import gfxdraw import pygame_lib, nn_lib import pygame.freetype from pygame_lib import color import random import copy import auto_maze import node_vis
20.7
28
0.845411
35
207
4.857143
0.542857
0.117647
0
0
0
0
0
0
0
0
0
0
0.135266
207
10
29
20.7
0.949721
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
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
0
1
0
1
0
1
0
0
3
233e938c1235975c31635e57391932a8a3358fab
692
py
Python
tests/tf_tests/functional/test_tf_inference.py
Deeplite/deeplite-profiler
2b21c0dc5948606c47377f786b605baf4fa31bee
[ "Apache-2.0" ]
17
2021-04-13T06:09:52.000Z
2021-11-24T06:39:41.000Z
tests/tf_tests/functional/test_tf_inference.py
Deeplite/deeplite-profiler
2b21c0dc5948606c47377f786b605baf4fa31bee
[ "Apache-2.0" ]
14
2021-04-14T13:46:42.000Z
2021-12-20T21:10:25.000Z
tests/tf_tests/functional/test_tf_inference.py
Deeplite/deeplite-profiler
2b21c0dc5948606c47377f786b605baf4fa31bee
[ "Apache-2.0" ]
7
2021-04-09T16:47:56.000Z
2022-03-05T11:04:30.000Z
import pytest from tests.tf_tests.functional import BaseFunctionalTest, TENSORFLOW_SUPPORTED, TENSORFLOW_AVAILABLE, MODEL, DATA class TestTFInference(BaseFunctionalTest): def test_get_acc(self): from deeplite.tf_profiler.tf_inference import get_accuracy assert get_accuracy(MODEL, DATA['test']) < 100 def test_get_topk(self): from deeplite.tf_profiler.tf_inference import get_topk assert len(get_topk(MODEL, DATA['test'])) == 2 assert len(get_topk(MODEL, DATA['test'], topk=1)) == 1 def test_get_missclass(self): from deeplite.tf_profiler.tf_inference import get_missclass assert get_missclass(MODEL, DATA['test']) > 0
36.421053
113
0.728324
92
692
5.23913
0.336957
0.093361
0.107884
0.112033
0.406639
0.406639
0.406639
0.286307
0.286307
0
0
0.012324
0.179191
692
18
114
38.444444
0.836268
0
0
0
0
0
0.023188
0
0
0
0
0
0.307692
1
0.230769
false
0
0.384615
0
0.692308
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
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
3
23549dd532a597635dde1ce83730aec62792e9bd
200
py
Python
waymo_open_dataset/latency/examples/tensorflow/multiframe/wod_latency_submission/__init__.py
mirtaheri/waymo-open-dataset
16c6a1a98fa8bb005fdfe798d27e6f3edf98c356
[ "Apache-2.0" ]
1,814
2019-08-20T18:30:38.000Z
2022-03-31T04:14:51.000Z
waymo_open_dataset/latency/examples/tensorflow/multiframe/wod_latency_submission/__init__.py
mirtaheri/waymo-open-dataset
16c6a1a98fa8bb005fdfe798d27e6f3edf98c356
[ "Apache-2.0" ]
418
2019-08-20T22:38:02.000Z
2022-03-31T07:51:15.000Z
waymo_open_dataset/latency/examples/tensorflow/multiframe/wod_latency_submission/__init__.py
mirtaheri/waymo-open-dataset
16c6a1a98fa8bb005fdfe798d27e6f3edf98c356
[ "Apache-2.0" ]
420
2019-08-21T10:59:06.000Z
2022-03-31T08:31:44.000Z
"""Example __init__.py to wrap the wod_latency_submission module imports.""" from . import model initialize_model = model.initialize_model run_model = model.run_model DATA_FIELDS = model.DATA_FIELDS
28.571429
76
0.815
29
200
5.206897
0.62069
0.198676
0.264901
0
0
0
0
0
0
0
0
0
0.11
200
6
77
33.333333
0.848315
0.35
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
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
0
0
0
0
0
0
0
3
23793e314023b1afee56b5645d0f4bbfd1a679ef
1,098
py
Python
jaxvi/models.py
sagar87/jaxvi
78829552589f8d44082cf8a1a8e02da549d7c298
[ "MIT" ]
null
null
null
jaxvi/models.py
sagar87/jaxvi
78829552589f8d44082cf8a1a8e02da549d7c298
[ "MIT" ]
null
null
null
jaxvi/models.py
sagar87/jaxvi
78829552589f8d44082cf8a1a8e02da549d7c298
[ "MIT" ]
null
null
null
from abc import abstractmethod from jaxvi.abstract import ABCMeta, abstract_attribute import jax.numpy as jnp from jax.scipy.stats import norm, gamma class Model(metaclass=ABCMeta): @abstract_attribute def latent_dim(self): pass @abstractmethod def inv_T(self, zeta: jnp.DeviceArray) -> jnp.DeviceArray: pass @abstractmethod def log_joint(self, theta: jnp.DeviceArray) -> jnp.DeviceArray: pass class LinearRegression(Model): def __init__(self, x, y): self.x = x self.y = y self.latent_dim = x.shape[1] + 1 def inv_T(self, zeta: jnp.DeviceArray) -> jnp.DeviceArray: return jnp.append(zeta[:-1], jnp.exp(zeta[-1])) def log_joint(self, theta: jnp.DeviceArray) -> jnp.DeviceArray: betas = theta[:2] sigma = theta[2] beta_prior = norm.logpdf(betas, 0, 10).sum() sigma_prior = gamma.logpdf(sigma, a=1, scale=2).sum() yhat = jnp.inner(self.x, betas) likelihood = norm.logpdf(self.y, yhat, sigma).sum() return beta_prior + sigma_prior + likelihood
27.45
67
0.644809
148
1,098
4.675676
0.364865
0.16185
0.098266
0.16185
0.274566
0.263006
0.263006
0.263006
0.263006
0
0
0.013142
0.237705
1,098
39
68
28.153846
0.81362
0
0
0.310345
0
0
0
0
0
0
0
0
0
1
0.206897
false
0.103448
0.137931
0.034483
0.482759
0
0
0
0
null
0
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
1
0
0
0
0
0
3
2381e2b9c699c0ba9541e7eef0d109d8c8508180
121
py
Python
setup.py
m0hithreddy/rpyc-mem
72e46da34fe2165a89d702a02ec0bb7b6d64775e
[ "MIT" ]
1
2022-03-12T23:29:13.000Z
2022-03-12T23:29:13.000Z
setup.py
m0hithreddy/rpyc-mem
72e46da34fe2165a89d702a02ec0bb7b6d64775e
[ "MIT" ]
null
null
null
setup.py
m0hithreddy/rpyc-mem
72e46da34fe2165a89d702a02ec0bb7b6d64775e
[ "MIT" ]
null
null
null
from setuptools import setup setup( version=open("rpyc_mem/_version.py").readlines()[-1].split()[-1].strip("\"'") )
20.166667
81
0.661157
16
121
4.875
0.8125
0
0
0
0
0
0
0
0
0
0
0.018349
0.099174
121
5
82
24.2
0.697248
0
0
0
0
0
0.173554
0
0
0
0
0
0
1
0
true
0
0.25
0
0.25
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
0
0
0
0
0
3
88bea4fa9c19bdca4e8c6da218e8d49f1310845f
240
py
Python
api_ui/views.py
mihail-ivanov/base-vue-api
a2ef8ae360d3d26425093aefaf521082cf3684c5
[ "MIT" ]
null
null
null
api_ui/views.py
mihail-ivanov/base-vue-api
a2ef8ae360d3d26425093aefaf521082cf3684c5
[ "MIT" ]
null
null
null
api_ui/views.py
mihail-ivanov/base-vue-api
a2ef8ae360d3d26425093aefaf521082cf3684c5
[ "MIT" ]
null
null
null
from django.contrib.auth.models import User from rest_framework import generics from .serializers import UserSerializer class UserList(generics.ListCreateAPIView): queryset = User.objects.all() serializer_class = UserSerializer
21.818182
43
0.808333
27
240
7.111111
0.703704
0
0
0
0
0
0
0
0
0
0
0
0.133333
240
10
44
24
0.923077
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
1
0
1
0
0
null
0
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
0
0
0
1
0
1
0
0
3
88e195f25d51cac398d0cfdc139ce3c46cd5aeca
257
py
Python
prototype/zlua_prototype/tests/test_debugger.py
Zolo-mario/ZoloLua
7527a78b12c3f97cb729327d4d0c724f3dba17f9
[ "MIT" ]
9
2019-03-11T04:43:03.000Z
2019-05-12T08:33:31.000Z
prototype/zlua_prototype/tests/test_debugger.py
zoloypzuo/ZeloLua
7527a78b12c3f97cb729327d4d0c724f3dba17f9
[ "MIT" ]
2
2019-04-10T05:20:45.000Z
2019-06-02T13:56:39.000Z
prototype/zlua_prototype/tests/test_debugger.py
Zolo-mario/zlua
7527a78b12c3f97cb729327d4d0c724f3dba17f9
[ "MIT" ]
1
2021-12-29T03:13:49.000Z
2021-12-29T03:13:49.000Z
from unittest import TestCase class TestDebugger(TestCase): def test_execute(self): # self.fail() pass def test_parse_instr(self): from zlua_prototype.debugger import _parse_instr assert _parse_instr('f ')==('f','')
25.7
56
0.657588
31
257
5.193548
0.612903
0.186335
0
0
0
0
0
0
0
0
0
0
0.237354
257
10
57
25.7
0.821429
0.042802
0
0
0
0
0.012245
0
0
0
0
0
0.142857
1
0.285714
false
0.142857
0.285714
0
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
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
3
88ef9a2c09c1a2b19ed7b65cb09a3ea45e5657d4
4,023
py
Python
stubs.min/Rhino/Geometry/__init___parts/Rectangle3d.py
ricardyn/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
1
2021-02-02T13:39:16.000Z
2021-02-02T13:39:16.000Z
stubs.min/Rhino/Geometry/__init___parts/Rectangle3d.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
stubs.min/Rhino/Geometry/__init___parts/Rectangle3d.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
class Rectangle3d(object,IEpsilonComparable[Rectangle3d]): """ Rectangle3d(plane: Plane,width: float,height: float) Rectangle3d(plane: Plane,width: Interval,height: Interval) Rectangle3d(plane: Plane,cornerA: Point3d,cornerB: Point3d) """ def ClosestPoint(self,point,includeInterior=None): """ ClosestPoint(self: Rectangle3d,point: Point3d,includeInterior: bool) -> Point3d ClosestPoint(self: Rectangle3d,point: Point3d) -> Point3d """ pass def Contains(self,*__args): """ Contains(self: Rectangle3d,x: float,y: float) -> PointContainment Contains(self: Rectangle3d,pt: Point3d) -> PointContainment """ pass def Corner(self,index): """ Corner(self: Rectangle3d,index: int) -> Point3d """ pass @staticmethod def CreateFromPolyline(polyline,deviation=None,angleDeviation=None): """ CreateFromPolyline(polyline: IEnumerable[Point3d]) -> (Rectangle3d,float,float) CreateFromPolyline(polyline: IEnumerable[Point3d]) -> Rectangle3d """ pass def EpsilonEquals(self,other,epsilon): """ EpsilonEquals(self: Rectangle3d,other: Rectangle3d,epsilon: float) -> bool """ pass def MakeIncreasing(self): """ MakeIncreasing(self: Rectangle3d) """ pass def PointAt(self,*__args): """ PointAt(self: Rectangle3d,t: float) -> Point3d PointAt(self: Rectangle3d,x: float,y: float) -> Point3d """ pass def RecenterPlane(self,*__args): """ RecenterPlane(self: Rectangle3d,origin: Point3d)RecenterPlane(self: Rectangle3d,index: int) """ pass def ToNurbsCurve(self): """ ToNurbsCurve(self: Rectangle3d) -> NurbsCurve """ pass def ToPolyline(self): """ ToPolyline(self: Rectangle3d) -> Polyline """ pass def Transform(self,xform): """ Transform(self: Rectangle3d,xform: Transform) -> bool """ pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass @staticmethod def __new__(self,plane,*__args): """ __new__[Rectangle3d]() -> Rectangle3d __new__(cls: type,plane: Plane,width: float,height: float) __new__(cls: type,plane: Plane,width: Interval,height: Interval) __new__(cls: type,plane: Plane,cornerA: Point3d,cornerB: Point3d) """ pass def __reduce_ex__(self,*args): pass def __repr__(self,*args): """ __repr__(self: object) -> str """ pass def __str__(self,*args): pass Area=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Area(self: Rectangle3d) -> float """ BoundingBox=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: BoundingBox(self: Rectangle3d) -> BoundingBox """ Center=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Center(self: Rectangle3d) -> Point3d """ Circumference=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Circumference(self: Rectangle3d) -> float """ Height=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Height(self: Rectangle3d) -> float """ IsValid=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: IsValid(self: Rectangle3d) -> bool """ Plane=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Plane(self: Rectangle3d) -> Plane Set: Plane(self: Rectangle3d)=value """ Width=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Width(self: Rectangle3d) -> float """ X=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: X(self: Rectangle3d) -> Interval Set: X(self: Rectangle3d)=value """ Y=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Y(self: Rectangle3d) -> Interval Set: Y(self: Rectangle3d)=value """ Unset=None
31.186047
215
0.679592
457
4,023
5.796499
0.161926
0.11325
0.06795
0.0906
0.436769
0.362023
0.254058
0.254058
0.254058
0.254058
0
0.015811
0.166791
4,023
128
216
31.429688
0.774463
0.387025
0
0.391304
0
0
0
0
0
0
0
0
0
1
0.347826
false
0.347826
0
0
0.608696
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
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
3
00375bfd9ff84622fa3d819bbee6225d14901c17
97
py
Python
Streamlit_DEMO/Text_input.py
ysraell/examples
b41df16ddda3db2cbafc4e4c85ac9bd5d000d375
[ "BSD-3-Clause" ]
7
2020-06-11T19:15:29.000Z
2021-01-31T22:04:56.000Z
Streamlit_DEMO/Text_input.py
ysraell/examples
b41df16ddda3db2cbafc4e4c85ac9bd5d000d375
[ "BSD-3-Clause" ]
2
2019-12-30T13:09:07.000Z
2020-06-22T03:14:28.000Z
Streamlit_DEMO/Text_input.py
ysraell/examples
b41df16ddda3db2cbafc4e4c85ac9bd5d000d375
[ "BSD-3-Clause" ]
3
2020-06-15T18:17:53.000Z
2020-06-22T20:32:33.000Z
import streamlit as st title = st.text_input("Search:", "") st.write("You search for: ", title)
19.4
36
0.680412
15
97
4.333333
0.733333
0
0
0
0
0
0
0
0
0
0
0
0.14433
97
4
37
24.25
0.783133
0
0
0
0
0
0.237113
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
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
0
0
1
0
0
0
0
3
003ca20243cae85d6e1700ea19f81a8feb7a525d
36
py
Python
clarity/Alignment/__init__.py
wjguan/phenocell
80ff7a0b5cc9e1ecedd8fe488b81a3df120096d9
[ "MIT" ]
null
null
null
clarity/Alignment/__init__.py
wjguan/phenocell
80ff7a0b5cc9e1ecedd8fe488b81a3df120096d9
[ "MIT" ]
null
null
null
clarity/Alignment/__init__.py
wjguan/phenocell
80ff7a0b5cc9e1ecedd8fe488b81a3df120096d9
[ "MIT" ]
null
null
null
__all__ = ['Elastix', 'Resampling'];
36
36
0.666667
3
36
6.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.083333
36
1
36
36
0.606061
0
0
0
0
0
0.459459
0
0
0
0
0
0
1
0
false
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
0
0
0
0
0
0
0
0
0
0
3
003dc875c6b6a3c3cf3b1f0f40f7270a5adb32a6
225
py
Python
examples/plugins/dummy/dummy/main.py
mikiec84/gaffer
8c5d5b5e2ff3fcb1f7cc7c8fbfc623f97dd0da8d
[ "MIT", "Unlicense" ]
null
null
null
examples/plugins/dummy/dummy/main.py
mikiec84/gaffer
8c5d5b5e2ff3fcb1f7cc7c8fbfc623f97dd0da8d
[ "MIT", "Unlicense" ]
null
null
null
examples/plugins/dummy/dummy/main.py
mikiec84/gaffer
8c5d5b5e2ff3fcb1f7cc7c8fbfc623f97dd0da8d
[ "MIT", "Unlicense" ]
1
2018-10-28T00:59:17.000Z
2018-10-28T00:59:17.000Z
from gaffer import Plugin __all__ = ['DummyPlugin'] from .app import DummyApp class DummyPlugin(Plugin): name = "dummy" version = "1.0" description = "test" def app(self, cfg): return DummyApp()
14.0625
26
0.635556
26
225
5.346154
0.769231
0
0
0
0
0
0
0
0
0
0
0.011905
0.253333
225
15
27
15
0.815476
0
0
0
0
0
0.102222
0
0
0
0
0
0
1
0.111111
false
0
0.222222
0.111111
0.888889
0
1
0
0
null
0
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
0
0
0
0
1
1
0
0
3
00433726aac3c77abe8b0c9529d3eb24d0cd9286
1,074
py
Python
recipe_app/forms.py
dbobbgit/recipebox
8e4e5c6f609e2524726954c9382ca37e844721f9
[ "MIT" ]
null
null
null
recipe_app/forms.py
dbobbgit/recipebox
8e4e5c6f609e2524726954c9382ca37e844721f9
[ "MIT" ]
null
null
null
recipe_app/forms.py
dbobbgit/recipebox
8e4e5c6f609e2524726954c9382ca37e844721f9
[ "MIT" ]
null
null
null
from django import forms from recipe_app.models import Author from django.contrib.auth.forms import UserCreationForm # Create two forms: RecipeForm & AuthorForm """ Author: - Name: CharField - Bio: TextField Recipe: - Title: CharField - Author: ForeignKey - Description: TextField - Time Required: CharField (for example, "One hour") - Instructions: TextField """ class AddAuthorForm(UserCreationForm): name = forms.CharField(max_length=100) bio = forms.CharField(max_length=250) username = forms.CharField(max_length=150) password1 = forms.CharField(widget=forms.PasswordInput) password2 = None # class Meta: # model = Author # fields = [ # 'name', # 'bio' # ] class AddRecipeForm(forms.Form): title = forms.CharField(max_length=100) author = forms.ModelChoiceField(queryset=Author.objects.all()) description = forms.CharField(max_length=500) time_required = forms.CharField(max_length=50) instructions = forms.CharField(widget=forms.Textarea)
26.195122
66
0.685289
115
1,074
6.330435
0.469565
0.153846
0.14011
0.18956
0.071429
0
0
0
0
0
0
0.022485
0.213222
1,074
40
67
26.85
0.839053
0.115456
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0.133333
0.2
0
1
0
0
0
0
null
0
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
0
0
1
0
0
1
0
0
3
cc3b53a3879a2fe4a77aa4a8b7af91545a4857ec
4,623
py
Python
stable_baselines/low_dim_analysis/eval_util.py
hugerepo-tianhang/low_dim_update_stable
565f6cbf886d266d0633bc112ccae28f1d116ee1
[ "MIT" ]
null
null
null
stable_baselines/low_dim_analysis/eval_util.py
hugerepo-tianhang/low_dim_update_stable
565f6cbf886d266d0633bc112ccae28f1d116ee1
[ "MIT" ]
null
null
null
stable_baselines/low_dim_analysis/eval_util.py
hugerepo-tianhang/low_dim_update_stable
565f6cbf886d266d0633bc112ccae28f1d116ee1
[ "MIT" ]
null
null
null
# def get_param_traj_file_path(dir_name, net_name, index): # return f'{dir_name}/{net_name}_{index}.txt' import os from datetime import datetime def get_current_timestamp(): return datetime.now().strftime('%Y-%m-%d-%H:%M:%S') def get_project_dir(): project_dir = os.path.abspath(os.path.join(os.path.abspath(__file__), '..', '..', '..')) return project_dir def get_run_name(args): if args.additional_notes == "": add_note = "" else: add_note = f'_additional_notes_{args.additional_notes}' return f'optimizer_{args.optimizer}_env_{args.env}_time_step_{args.num_timesteps}_' \ f'normalize_{args.normalize}_n_steps_{args.n_steps}_nminibatches_{args.nminibatches}_seed_{args.seed}' \ f'_run_{args.run_num}' \ f'{add_note}' def get_dir_path_for_this_run(args, proj_dir=None): if proj_dir is not None: return f'{proj_dir}/stable_baselines/{args.alg}/{get_run_name(args)}' else: return f'{get_project_dir()}/stable_baselines/{args.alg}/{get_run_name(args)}' def get_log_dir(this_run_dir): return f"{this_run_dir}/the_log_dir" def get_save_dir(this_run_dir): return f"{this_run_dir}/the_save_dir" def get_test_data_dir(this_run_dir): return f"{this_run_dir}/test_data" def get_full_params_dir(this_run_dir): return f"{this_run_dir}/full_params" def get_aug_plot_dir(this_run_dir): return f"{this_run_dir}/aug_plot_dir" def get_intermediate_data_dir(this_run_dir, params_scope="pi"): return f"{this_run_dir}/{params_scope}_intermediate_data" def get_eval_losses_file_path(dir_name, total_timesteps): return f'{dir_name}/eval_loss_{total_timesteps}.hdf5' def get_full_param_traj_file_path(dir_name, index): return f'{dir_name}/all_params_{index}.txt' def get_plot_dir(args): return f'{get_project_dir()}/plots/{args.alg}/{get_current_timestamp()}_{get_run_name(args)}' def get_cma_plot_dir(plot_dir, n_comp_to_use, run_num, origin): return f'{plot_dir}/cma/cma_n_comp_{n_comp_to_use}_origin_{origin}_run_num_{run_num}' def get_cma_and_then_ppo_plot_dir(plot_dir, pca_indexes, run_num, cma_num_steps, ppo_num_steps, origin): return f'{plot_dir}/cma_and_then_ppo/cma_and_then_ppo_pca_indexes_{pca_indexes}' \ f'_ppo_num_steps_{ppo_num_steps}_cma_num_steps_{cma_num_steps}_origin_{origin}_run_num_{run_num}' def get_other_pcs_plane_plot_dir(plot_dir, other_pcs): return f'{plot_dir}/other_pcs_{other_pcs}' def get_ppos_plot_dir(plot_dir, n_comp_to_use, cma_run_num): return f'{plot_dir}/ppos/ppos_n_comp_{n_comp_to_use}_run_num_{cma_run_num}' def get_first_n_pc1_vs_V_plot_dir(plot_dir, granularity): return f'{plot_dir}/first_n_pc1_vs_V/first_n_pc1_vs_V_granularity_{granularity}' def get_plane_angles_vs_final_plane_along_the_way_plot_dir(plot_dir, n_comp_to_use): return f'{plot_dir}/plane_angles_vs_final_plane/plane_angles_vs_final_plane_n_comp_to_use_{n_comp_to_use}' def get_pcs_filename(intermediate_dir, n_comp): return f"{intermediate_dir}/n_comp_{n_comp}_pcs" def get_mean_param_filename(intermediate_dir): return f"{intermediate_dir}/mean_param" def get_explain_ratios_filename(intermediate_dir, n_comp): return f"{intermediate_dir}/n_comp_{n_comp}_explain_ratios" def get_projected_full_path_filename(intermediate_dir, n_comp, pca_center, which_components=(1,2)): return f"{intermediate_dir}/n_comp_{n_comp}_pca_center_{pca_center}_which_components_{which_components}_projected_full_path" def get_eval_returns_filename(intermediate_dir, eval_string, n_comp, pca_center, which_components=(1,2)): return f"{intermediate_dir}/{eval_string}_n_comp_{n_comp}_pca_center_{pca_center}_which_components_{which_components}eval_returns" def get_projected_finals_eval_returns_filename(intermediate_dir, n_comp_start, np_comp_end, pca_center): return f"{intermediate_dir}/n_comp_start_{n_comp_start}_np_comp_end_{np_comp_end}_pca_center_{pca_center}eval_returns" def get_cma_returns_dirname(intermediate_dir, n_comp, run_num): return f"{intermediate_dir}/cma/cma_n_comp_{n_comp}_run_num_{run_num}" def get_ppos_returns_dirname(intermediate_dir, n_comp, run_num): return f"{intermediate_dir}/ppos/ppos_n_comp_{n_comp}_run_num_{run_num}" def get_cma_and_then_ppo_run_dir(intermediate_dir, pca_indexes, run_num, cma_steps): return f"{intermediate_dir}/cma_and_then_ppo/ctp_pca_index_{pca_indexes}_cma_steps_{cma_steps}_run_num_{run_num}" def get_ppo_part(this_run_dir): return f"{this_run_dir}/ppo_part" if __name__ == '__main__': print(get_log_dir("a", 1, "s", False, 0))
36.401575
134
0.784123
789
4,623
4.007605
0.155894
0.056926
0.044276
0.063251
0.558191
0.422201
0.314674
0.297596
0.253004
0.199874
0
0.00241
0.102531
4,623
127
135
36.401575
0.759701
0.022496
0
0.027027
0
0.013514
0.43126
0.417091
0
0
0
0
0
1
0.391892
false
0
0.027027
0.351351
0.824324
0.013514
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
1
0
0
0
1
0
0
0
3
cc3d4f119ef3b88e30b1e9d3c45699b0745cbf05
1,038
py
Python
AntShares/Network/Inventory.py
OTCGO/sync_antshares
5724a5a820ec5f59e0c886a3c1646db2d07b4d78
[ "MIT" ]
10
2017-03-28T05:44:35.000Z
2021-02-17T03:51:39.000Z
AntShares/Network/Inventory.py
OTCGO/sync_antshares
5724a5a820ec5f59e0c886a3c1646db2d07b4d78
[ "MIT" ]
2
2017-07-06T10:00:25.000Z
2017-08-09T10:14:34.000Z
AntShares/Network/Inventory.py
OTCGO/sync_antshares
5724a5a820ec5f59e0c886a3c1646db2d07b4d78
[ "MIT" ]
3
2017-03-28T05:44:39.000Z
2018-02-09T09:56:03.000Z
# -*- coding:utf-8 -*- """ Description: Inventory Class Usage: from AntShares.Network.Inventory import Inventory """ from AntShares.IO.MemoryStream import MemoryStream from AntShares.IO.BinaryWriter import BinaryWriter from AntShares.Cryptography.Helper import * from AntShares.Helper import * import binascii class Inventory(object): """docstring for Inventory""" def __init__(self): super(Inventory, self).__init__() self.hash = None def ensureHash(self): self.hash = big_or_little(binascii.hexlify( bin_dbl_sha256(binascii.unhexlify(self.getHashData())))) return self.hash def getHashData(self): ms = MemoryStream() w = BinaryWriter(ms) self.serializeUnsigned(w) return ms.toArray() def getScriptHashesForVerifying(self): pass def serialize(self): pass def serializeUnsigned(self): pass def deserialize(self): pass def deserializeUnsigned(self): pass
21.183673
80
0.654143
106
1,038
6.292453
0.433962
0.097451
0.065967
0
0
0
0
0
0
0
0
0.005155
0.252408
1,038
48
81
21.625
0.854381
0.133911
0
0.178571
0
0
0
0
0
0
0
0
0
1
0.285714
false
0.178571
0.178571
0
0.571429
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
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
3
cc52398a725b3573f2ce15c63cfb703dc5d3fa5f
2,760
py
Python
test/Django/05/02/BookManager/Book/views.py
Kingworrior007/lchw001
e59e6f300123bd98d49e81be16e73a4440ffa85a
[ "MIT" ]
2
2018-03-09T02:13:54.000Z
2020-12-28T01:47:30.000Z
test/Django/05/02/BookManager/Book/views.py
X-Warrior007/lchw001
e59e6f300123bd98d49e81be16e73a4440ffa85a
[ "MIT" ]
null
null
null
test/Django/05/02/BookManager/Book/views.py
X-Warrior007/lchw001
e59e6f300123bd98d49e81be16e73a4440ffa85a
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.http import HttpResponse,JsonResponse from django.conf import settings from Book.models import PictureInfo,AreaInfo from django.core.paginator import Paginator # Create your views here. def sheng(request): """获取省级数据,并转JSON字典,响应给ajax""" # 查询省级数据 sheng_list = [AreaInfo,AreaInfo,AreaInfo,AreaInfo,...] sheng_list = AreaInfo.objects.filter(parent__isnull=True) # 构造JSON列表 list = [] for sheng in sheng_list: list.append([sheng.id, sheng.name]) # 构造JSON字典 sheng_json_dict = {'shenglist':list} # 响应JSON : ajax收到的也是如此结构如此内容的json字典 return JsonResponse(sheng_json_dict) """ { "shenglist":[ [id, name], [id, name], ] } """ """ { "shenglist":[ {"id":id, "name":name}, {"id":id, "name":name}, ] } """ """ <select id="sheng"> <option value="100000">北京市</option> </select> <select id="shi"> <option value="100005">昌平区</option> </select> <select id="qu"> <option value="0">请选择</option> </select> """ def area(request): """提供省市区三级联动的页面""" return render(request, 'Book/area.html') def page(request, page_num): """分页""" # 查询省级信息 sheng_list = [AreaInfo,AreaInfo,AreaInfo,AreaInfo,AreaInfo,AreaInfo,... 33] sheng_list = AreaInfo.objects.filter(parent__isnull=True) # 分页的需求: 对sheng_list进行分页,每页10条 # pagenator = [AreaInfo,AreaInfo,AreaInfo,AreaInfo,AreaInfo,AreaInfo,... 33] paginator = Paginator(sheng_list, 10) # 为了实现,当用户输入/page/ 也是默认的请求第一页的数据 # print(type(page_num)) if page_num == '': page_num = '1' # 度取出某一页数据 page = [AreaInfo,AreaInfo,AreaInfo,AreaInfo,AreaInfo,AreaInfo,AreaInfo,AreaInfo,AreaInfo,AreaInfo] page = paginator.page(page_num) # 1 '1' # 构造上下文 context = { 'page':page } # 渲染模板 return render(request, 'Book/page.html', context) def recv(request): """接受上传的图片,内容保存的项目,地址记录到数据库""" # 获取图片数据 pic = request.FILES.get('pic') # InMemoryUploadF... # 获取上传的文件的名字 pic_name = pic.name # 准备文件存储的路径 : '/static/media/Book/mm03.jpeg' path = '%s/Book/%s' % (settings.MEDIA_ROOT, pic_name) # 需要将受到的文件内容数据,保存到项目中 with open(path, 'ab') as file: for c in pic.chunks(): # chunks() 以安全守护的形式去遍历,避免大文件造成内存溢出 file.write(c) # 还需要将文件保存到项目中的路径,在数据库中记录 pictureInfo = PictureInfo() # 仅仅是给模型对象的path属性赋值而已 pictureInfo.path = 'Book/%s' % pic_name # 以下代码才是把path属性里面的数据,写入到数据库表中 pictureInfo.save() # 响应结果 return HttpResponse('上传成功') def upload(request): """提供图片上传的表单页面""" return render(request, 'Book/upload.html') def staticFile(request): """加载静态图片""" return render(request, 'Book/staticfile.html')
21.5625
113
0.63913
307
2,760
5.667752
0.403909
0.202299
0.248276
0.257471
0.185057
0.185057
0.156322
0.098851
0.045977
0
0
0.011965
0.212681
2,760
127
114
21.732283
0.788771
0.288768
0
0.051282
0
0
0.068966
0
0
0
0
0
0
1
0.153846
false
0
0.128205
0
0.435897
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
0
0
0
0
3
cc67238765ba95b77b94fefb1d5fa168307525e1
1,921
py
Python
DjangoBlog/articles/migrations/0009_auto_20210815_1840.py
Dimple278/Publication-Repository
ec274bf5822e160b90f0a5bc8559c1d199e12854
[ "Unlicense", "MIT" ]
null
null
null
DjangoBlog/articles/migrations/0009_auto_20210815_1840.py
Dimple278/Publication-Repository
ec274bf5822e160b90f0a5bc8559c1d199e12854
[ "Unlicense", "MIT" ]
1
2021-08-08T06:46:46.000Z
2021-08-08T06:46:46.000Z
DjangoBlog/articles/migrations/0009_auto_20210815_1840.py
Dimple278/Publication-Repository
ec274bf5822e160b90f0a5bc8559c1d199e12854
[ "Unlicense", "MIT" ]
2
2021-07-03T11:55:11.000Z
2021-08-09T08:27:52.000Z
# Generated by Django 3.2.4 on 2021-08-15 12:55 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('articles', '0008_auto_20210808_0801'), ] operations = [ migrations.AddField( model_name='article', name='doi', field=models.CharField(blank=True, max_length=100), ), migrations.AddField( model_name='article', name='impactFactor', field=models.FloatField(default=0), ), migrations.AddField( model_name='article', name='journal_type', field=models.CharField(choices=[('National', 'National'), ('International', 'International')], default='National', max_length=20), ), migrations.AddField( model_name='article', name='peer_reviewed', field=models.BooleanField(default=False), ), migrations.AddField( model_name='article', name='sjrRating', field=models.FloatField(default=0), ), migrations.AddField( model_name='book', name='doi', field=models.CharField(blank=True, max_length=100), ), migrations.AddField( model_name='conferencearticle', name='doi', field=models.CharField(blank=True, max_length=100), ), migrations.AlterField( model_name='article', name='article_link', field=models.URLField(blank=True), ), migrations.AlterField( model_name='book', name='book_link', field=models.URLField(blank=True), ), migrations.AlterField( model_name='conferencearticle', name='conference_link', field=models.URLField(blank=True), ), ]
30.015625
142
0.548673
171
1,921
6.035088
0.345029
0.087209
0.156008
0.18314
0.587209
0.587209
0.428295
0.428295
0.428295
0.319767
0
0.034135
0.328995
1,921
63
143
30.492063
0.766486
0.023425
0
0.719298
1
0
0.136606
0.012273
0
0
0
0
0
1
0
false
0
0.017544
0
0.070175
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
cc9334543aeeb4519b2ac91825f9b078d9f16ee4
94
py
Python
src6/1/string3.py
pjackson3/cs50
4cf8ca67abfc293d4dbb9bf5a1cb742d74ca7a31
[ "MIT" ]
null
null
null
src6/1/string3.py
pjackson3/cs50
4cf8ca67abfc293d4dbb9bf5a1cb742d74ca7a31
[ "MIT" ]
null
null
null
src6/1/string3.py
pjackson3/cs50
4cf8ca67abfc293d4dbb9bf5a1cb742d74ca7a31
[ "MIT" ]
1
2020-11-24T23:25:26.000Z
2020-11-24T23:25:26.000Z
# input and print, with format strings s = input("What's your name?\n") print(f"hello, {s}")
18.8
38
0.659574
17
94
3.647059
0.764706
0
0
0
0
0
0
0
0
0
0
0
0.159574
94
4
39
23.5
0.78481
0.382979
0
0
0
0
0.517857
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
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
3
cc9a005a14d0a98035518428a505d967d10c254e
101
py
Python
Section 18/8.Document-function-with-keyword-based-arguments.py
airbornum/-Complete-Python-Scripting-for-Automation
bc053444f8786259086269ca1713bdb10144dd74
[ "MIT" ]
18
2020-04-13T03:14:06.000Z
2022-03-09T18:54:41.000Z
Section 18/8.Document-function-with-keyword-based-arguments.py
airbornum/-Complete-Python-Scripting-for-Automation
bc053444f8786259086269ca1713bdb10144dd74
[ "MIT" ]
null
null
null
Section 18/8.Document-function-with-keyword-based-arguments.py
airbornum/-Complete-Python-Scripting-for-Automation
bc053444f8786259086269ca1713bdb10144dd74
[ "MIT" ]
22
2020-04-29T21:12:42.000Z
2022-03-17T18:19:54.000Z
def display(a,b): print(f'a={a}') return None display(3,4) display(a=3,b=4) display(b=4,a=3)
14.428571
18
0.60396
23
101
2.652174
0.434783
0.262295
0
0
0
0
0
0
0
0
0
0.070588
0.158416
101
7
19
14.428571
0.647059
0
0
0
0
0
0.052083
0
0
0
0
0
0
1
0.166667
false
0
0
0
0.333333
0.166667
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
0
0
0
0
3
aea00ef15d75bbb6792d81d979d452ecd7795555
754
py
Python
wfdb/__init__.py
melbourne-cdth/wfdb-python
a36c22e12f8417ff18e57dbe54b7180dd183ec66
[ "MIT" ]
null
null
null
wfdb/__init__.py
melbourne-cdth/wfdb-python
a36c22e12f8417ff18e57dbe54b7180dd183ec66
[ "MIT" ]
null
null
null
wfdb/__init__.py
melbourne-cdth/wfdb-python
a36c22e12f8417ff18e57dbe54b7180dd183ec66
[ "MIT" ]
null
null
null
from wfdb.io.record import (Record, MultiRecord, rdheader, rdrecord, rdsamp, wrsamp, dl_database, edf2mit, mit2edf, wav2mit, mit2wav, wfdb2mat, csv2mit, sampfreq, signame, wfdbdesc, wfdbtime, sigavg) from wfdb.io.annotation import (Annotation, rdann, wrann, show_ann_labels, show_ann_classes, ann2rr, rr2ann, csv2ann, rdedfann, mrgann) from wfdb.io.download import get_dbs, get_record_list, dl_files, set_db_index_url from wfdb.plot.plot import plot_items, plot_wfdb, plot_all_records from wfdb.plot.plot_plotly import plot_items_pl, plot_wfdb_pl, plot_all_records_pl from wfdb.version import __version__
58
82
0.66313
92
754
5.130435
0.554348
0.101695
0.063559
0.067797
0
0
0
0
0
0
0
0.016423
0.27321
754
12
83
62.833333
0.844891
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.545455
0
0.545455
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
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
3
aec73f93f4747f28f93931758f77133311e3036f
83
py
Python
dynasty/__init__.py
LeMinaw/Dynasty
458685df8051cd11f497222e0cd7b672515cd6aa
[ "MIT" ]
2
2021-04-04T19:31:32.000Z
2022-02-06T13:38:09.000Z
dynasty/__init__.py
LeMinaw/Dynasty
458685df8051cd11f497222e0cd7b672515cd6aa
[ "MIT" ]
null
null
null
dynasty/__init__.py
LeMinaw/Dynasty
458685df8051cd11f497222e0cd7b672515cd6aa
[ "MIT" ]
null
null
null
__version__ = '0.0.2' from pathlib import Path APP_DIR = Path(__file__).parent
10.375
31
0.722892
13
83
3.923077
0.846154
0
0
0
0
0
0
0
0
0
0
0.043478
0.168675
83
7
32
11.857143
0.695652
0
0
0
0
0
0.060241
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
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
0
0
1
0
0
0
0
3
aed61ba31c0649cb1a7854a5aa110c70142265a0
269
py
Python
cmd_creator_b.py
azeznassar/JavaScriptToUML
53cccc1bba635114f03d966fd2f0f2f2d2d74bae
[ "MIT" ]
5
2020-08-16T09:25:42.000Z
2022-01-19T21:00:48.000Z
cmd_creator_b.py
azeznassar/JavaScriptToUML
53cccc1bba635114f03d966fd2f0f2f2d2d74bae
[ "MIT" ]
null
null
null
cmd_creator_b.py
azeznassar/JavaScriptToUML
53cccc1bba635114f03d966fd2f0f2f2d2d74bae
[ "MIT" ]
4
2020-08-19T09:05:13.000Z
2021-08-03T17:25:53.000Z
# pylint: disable="import-error" from command_line_creator import CommandLineCreator from current_cmd_b import CurrentCMD_B class CmdCreatorB(CommandLineCreator): def create_cmd(self): current_cmd = CurrentCMD_B(self.output) return current_cmd
29.888889
51
0.773234
33
269
6.030303
0.606061
0.150754
0
0
0
0
0
0
0
0
0
0
0.167286
269
9
52
29.888889
0.888393
0.111524
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.833333
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
0
0
0
0
0
1
0
1
0
0
3
aee1d165304e92ca3a56f102fa49637d4eb2d084
4,637
py
Python
anyHR/constraint/node/Node.py
figlerg/anyHR
418742aa10634338c405de87b2ee1cbe08ae8a9e
[ "BSD-3-Clause" ]
1
2021-08-14T17:59:51.000Z
2021-08-14T17:59:51.000Z
anyHR/constraint/node/Node.py
figlerg/anyHR
418742aa10634338c405de87b2ee1cbe08ae8a9e
[ "BSD-3-Clause" ]
2
2022-03-27T13:38:19.000Z
2022-03-31T15:20:26.000Z
anyHR/constraint/node/Node.py
figlerg/anyHR
418742aa10634338c405de87b2ee1cbe08ae8a9e
[ "BSD-3-Clause" ]
1
2022-03-27T08:31:23.000Z
2022-03-27T08:31:23.000Z
# from constraint.node.SubstitutorVisitor import SubstitutorVisitor from enum import Enum class Node(object): def __init__(self): self.children = list() self.node_type = NodeType.NODE def get_vars(self, vars = set()): # recursively crawls tree and writes down all the variables # stop if self.node_type == NodeType.VARIABLE: vars.add(self.name) # recursion for child in self.children: child.get_vars(vars) return vars # for visitor class. Using isinstance breaks when importing from outside class NodeType(Enum): NODE = 0 LEQ = 1 GEQ = 2 LESS = 3 GREATER = 4 EQ = 5 NEQ = 6 IN = 7 VARIABLE = 8 CONSTANT = 9 ADDITION = 10 SUBTRACTION = 11 MULTIPLICATION = 12 EXPONENTIAL = 13 def __eq__(self, other): return self.value == other.value class LEQ(Node): def __init__(self, op1, op2): Node.__init__(self) self.node_type = NodeType.LEQ self.children.append(op1) self.children.append(op2) def __str__(self): return '(' + str(self.children[0]) + ' <= ' + str(self.children[1]) + ')' class GEQ(Node): def __init__(self, op1, op2): Node.__init__(self) self.node_type = NodeType.GEQ self.children.append(op1) self.children.append(op2) def __str__(self): return '(' + str(self.children[0]) + ' >= ' + str(self.children[1]) + ')' class Less(Node): def __init__(self, op1, op2): Node.__init__(self) self.node_type = NodeType.LESS self.children.append(op1) self.children.append(op2) def __str__(self): return '(' + str(self.children[0]) + ' < ' + str(self.children[1]) + ')' class Greater(Node): def __init__(self, op1, op2): Node.__init__(self) self.node_type = NodeType.GREATER self.children.append(op1) self.children.append(op2) def __str__(self): return '(' + str(self.children[0]) + ' > ' + str(self.children[1]) + ')' class EQ(Node): def __init__(self, op1, op2): Node.__init__(self) self.node_type = NodeType.EQ self.children.append(op1) self.children.append(op2) def __str__(self): return '(' + str(self.children[0]) + ' = ' + str(self.children[1]) + ')' class NEQ(Node): def __init__(self, op1, op2): Node.__init__(self) self.node_type = NodeType.NEQ self.children.append(op1) self.children.append(op2) def __str__(self): return '(' + str(self.children[0]) + ' != ' + str(self.children[1]) + ')' class In(Node): def __init__(self, op, op_low, op_up): Node.__init__(self) self.node_type = NodeType.IN self.children.append(op) self.children.append(op_low) self.children.append(op_up) def __str__(self): return '(' + str(self.children[0]) + ')' + ' IN ' + '[ ' + str(self.children[1]) + ' , ' + str(self.children[2]) + ' ]' class Variable(Node): def __init__(self, name): Node.__init__(self) self.node_type = NodeType.VARIABLE self.name = name def __str__(self): return self.name class Constant(Node): def __init__(self, value): Node.__init__(self) self.node_type = NodeType.CONSTANT self.value = value def __str__(self): return str(self.value) class Addition(Node): def __init__(self, op1, op2): Node.__init__(self) self.node_type = NodeType.ADDITION self.children.append(op1) self.children.append(op2) def __str__(self): return '(' + str(self.children[0]) + ' + ' + str(self.children[1]) + ')' class Subtraction(Node): def __init__(self, op1, op2): Node.__init__(self) self.node_type = NodeType.SUBTRACTION self.children.append(op1) self.children.append(op2) def __str__(self): return '(' + str(self.children[0]) + ' - ' + str(self.children[1]) + ')' class Multiplication(Node): def __init__(self, op1, op2): Node.__init__(self) self.node_type = NodeType.MULTIPLICATION self.children.append(op1) self.children.append(op2) def __str__(self): return '(' + str(self.children[0]) + ' * ' + str(self.children[1]) + ')' class Exponential(Node): def __init__(self, op1): Node.__init__(self) self.node_type = NodeType.EXPONENTIAL self.children.append(op1) def __str__(self): return '(' + 'EXP(' + str(self.children[1]) + ') ' + ')'
25.478022
128
0.587233
563
4,637
4.507993
0.14032
0.217494
0.156028
0.118203
0.618203
0.596927
0.587864
0.537431
0.524823
0.524823
0
0.023104
0.271943
4,637
181
129
25.618785
0.728673
0.045072
0
0.415385
0
0
0.015607
0
0
0
0
0
0
1
0.223077
false
0
0.007692
0.107692
0.569231
0
0
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
0
0
1
0
0
0
3
aee85d757db25a014d88c52b4b892e6e8e5b9803
335
py
Python
TestGetter.py
okiyama/Chess-EEA-Opponent-Modelling
c81f2b5226e3441ed236b3b20c3811e721d412d8
[ "MIT" ]
null
null
null
TestGetter.py
okiyama/Chess-EEA-Opponent-Modelling
c81f2b5226e3441ed236b3b20c3811e721d412d8
[ "MIT" ]
null
null
null
TestGetter.py
okiyama/Chess-EEA-Opponent-Modelling
c81f2b5226e3441ed236b3b20c3811e721d412d8
[ "MIT" ]
null
null
null
class TestGetter: """ Interface for getting tests. Useful because I'd like to both be able to evolve a next test as well as play a normal game of chess with the user """ #I thought about using abstract base class for this but it feels like overkill def getNextTest(self, opponents, previousTest): raise NotImplementedError
67
155
0.761194
53
335
4.811321
0.867925
0
0
0
0
0
0
0
0
0
0
0
0.19403
335
5
156
67
0.944444
0.662687
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0
1
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
0
0
1
0
0
0
0
1
0
0
3
aee9791412aca3b9a70fc201a6a8bbfc83e5a9e9
210
py
Python
SmartTE/Signals/UndoSignals.py
smartboyathome/SmartTE
373a721f17e9a1f3d1bbe5c9c101c638de3fa96d
[ "BSD-3-Clause" ]
1
2020-07-15T19:53:27.000Z
2020-07-15T19:53:27.000Z
SmartTE/Signals/UndoSignals.py
smartboyathome/SmartTE
373a721f17e9a1f3d1bbe5c9c101c638de3fa96d
[ "BSD-3-Clause" ]
null
null
null
SmartTE/Signals/UndoSignals.py
smartboyathome/SmartTE
373a721f17e9a1f3d1bbe5c9c101c638de3fa96d
[ "BSD-3-Clause" ]
null
null
null
UNDO_EMPTY = 'undostack-empty' UNDO_NOT_EMPTY = 'undostack-not-empty' REDO_EMPTY = 'redostack-empty' REDO_NOT_EMPTY = 'redostack-not-empty' UNDO_CHANGED = 'undostack-changed' REDO_CHANGED = 'redostack-changed'
30
38
0.790476
28
210
5.642857
0.25
0.202532
0
0
0
0
0
0
0
0
0
0
0.085714
210
6
39
35
0.822917
0
0
0
0
0
0.485714
0
0
0
0
0
0
1
0
false
0
0
0
0
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
0
0
0
0
3
aeeff92da6880272b842617fa1cd1119d5a74e02
2,534
py
Python
pyclustering/cluster/tests/integration/it_hsyncnet.py
JosephChataignon/pyclustering
bf4f51a472622292627ec8c294eb205585e50f52
[ "BSD-3-Clause" ]
1,013
2015-01-26T19:50:14.000Z
2022-03-31T07:38:48.000Z
pyclustering/cluster/tests/integration/it_hsyncnet.py
peterlau0626/pyclustering
bf4f51a472622292627ec8c294eb205585e50f52
[ "BSD-3-Clause" ]
542
2015-01-20T16:44:32.000Z
2022-01-29T14:57:20.000Z
pyclustering/cluster/tests/integration/it_hsyncnet.py
peterlau0626/pyclustering
bf4f51a472622292627ec8c294eb205585e50f52
[ "BSD-3-Clause" ]
262
2015-03-19T07:28:12.000Z
2022-03-30T07:28:24.000Z
"""! @brief Integration-tests for Hierarchical Sync (HSyncNet) algorithm. @authors Andrei Novikov (pyclustering@yandex.ru) @date 2014-2020 @copyright BSD-3-Clause """ import unittest; import matplotlib; matplotlib.use('Agg'); from pyclustering.cluster.tests.hsyncnet_templates import HsyncnetTestTemplates; from pyclustering.nnet import solve_type; from pyclustering.samples.definitions import SIMPLE_SAMPLES; from pyclustering.core.tests import remove_library; class HsyncnetIntegrationTest(unittest.TestCase): def testClusteringSampleSimple1WithoutCollectingByCore(self): HsyncnetTestTemplates.templateClustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, 2, [5, 5], solve_type.FAST, 5, 0.3, False, True); def testClusteringSampleSimple1ByCore(self): HsyncnetTestTemplates.templateClustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, 2, [5, 5], solve_type.FAST, 5, 0.3, True, True); def testClusteringOneAllocationSampleSimple1ByCore(self): HsyncnetTestTemplates.templateClustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, 1, [10], solve_type.FAST, 5, 0.3, True, True); def testClusteringSampleSimple2ByCore(self): HsyncnetTestTemplates.templateClustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE2, 3, [10, 5, 8], solve_type.FAST, 5, 0.2, True, True); def testClusteringOneAllocationSampleSimple2ByCore(self): HsyncnetTestTemplates.templateClustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE2, 1, [23], solve_type.FAST, 5, 0.2, True, True); def testClusteringOneDimensionDataSampleSimple7ByCore(self): HsyncnetTestTemplates.templateClustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE7, 2, [10, 10], solve_type.FAST, 5, 0.3, True, True); def testClusteringTheSameData1ByCore(self): HsyncnetTestTemplates.templateClustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE12, 3, [5, 5, 5], solve_type.FAST, 5, 0.3, True, True); def testDynamicLengthCollectingByCore(self): HsyncnetTestTemplates.templateDynamicLength(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, 2, None, 5, 0.3, True, True); def testDynamicLengthWithoutCollectingByCore(self): HsyncnetTestTemplates.templateDynamicLength(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, 2, None, 5, 0.3, False, True); def testProcessingWhenLibraryCoreRemoved(self): self.runRemovedLibraryCoreTest() @remove_library def runRemovedLibraryCoreTest(self): HsyncnetTestTemplates.templateClustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, 2, [5, 5], solve_type.FAST, 5, 0.3, False, True)
41.540984
133
0.753749
259
2,534
7.247104
0.281853
0.076185
0.101225
0.208844
0.50666
0.50666
0.426745
0.316462
0.316462
0.287693
0
0.040892
0.15075
2,534
60
134
42.233333
0.83132
0.063536
0
0
0
0
0.001302
0
0
0
0
0
0
1
0.354839
false
0
0.193548
0
0.580645
0
0
0
0
null
0
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
0
1
0
0
3