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
e8b95468398dfbf5ccf8ee057f5e1a97d91c23c9
304
py
Python
tailow/operators/size.py
sourcepirate/tailow
5398e619ad9508ba89153e9cc505a80cdb65d5fd
[ "MIT" ]
2
2018-06-13T06:01:09.000Z
2018-10-19T12:00:50.000Z
tailow/operators/size.py
sourcepirate/tailow
5398e619ad9508ba89153e9cc505a80cdb65d5fd
[ "MIT" ]
null
null
null
tailow/operators/size.py
sourcepirate/tailow
5398e619ad9508ba89153e9cc505a80cdb65d5fd
[ "MIT" ]
2
2018-08-01T06:13:47.000Z
2018-10-20T07:15:11.000Z
from tailow.operators.base import Operator class SizeOperator(Operator): """ operator to query for arrays by number of elements """ def to_query(self, field_name, value): return {"$size": value} def get_value(self, field, value): return field.to_son(value)
20.266667
59
0.648026
39
304
4.948718
0.641026
0.072539
0
0
0
0
0
0
0
0
0
0
0.253289
304
14
60
21.714286
0.85022
0.164474
0
0
0
0
0.021552
0
0
0
0
0
0
1
0.333333
false
0
0.166667
0.333333
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
1
0
0
0
1
1
0
0
3
e8c3672245371fce722c62fe43be41b167aa31e3
156
py
Python
test/__init__.py
LanaMaidenbaum41/test
d9ffd610dc4b1dc940f444b2adf676b3c610d0bd
[ "MIT" ]
null
null
null
test/__init__.py
LanaMaidenbaum41/test
d9ffd610dc4b1dc940f444b2adf676b3c610d0bd
[ "MIT" ]
183
2019-05-16T18:18:04.000Z
2022-03-31T19:50:02.000Z
test/__init__.py
LanaMaidenbaum41/test
d9ffd610dc4b1dc940f444b2adf676b3c610d0bd
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Top-level package for Test.""" __author__ = """Lana Maidenbaum""" __email__ = 'lana.maidenbaum@zeel.com' __version__ = '0.1.1'
19.5
38
0.641026
20
156
4.4
0.85
0.318182
0
0
0
0
0
0
0
0
0
0.02963
0.134615
156
7
39
22.285714
0.622222
0.320513
0
0
0
0
0.44
0.24
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
e8cfdb21fb6c07f6632ba57c031ad7697503326a
1,910
py
Python
pose/excerciseClass.py
San-B-09/BeFit
7bd9cad51d6135fc5fab7221336f8969653b6af5
[ "Apache-2.0" ]
null
null
null
pose/excerciseClass.py
San-B-09/BeFit
7bd9cad51d6135fc5fab7221336f8969653b6af5
[ "Apache-2.0" ]
null
null
null
pose/excerciseClass.py
San-B-09/BeFit
7bd9cad51d6135fc5fab7221336f8969653b6af5
[ "Apache-2.0" ]
null
null
null
from pose.poseClass import pose from pose import helpers class dumbbell_lateral_raises(pose): angles={ ('left_hip','left_shoulder','left_elbow'):None, ('right_hip','right_shoulder','right_elbow'):None, ('left_shoulder','left_elbow','left_wrist'):None, ('right_shoulder','right_elbow','right_wrist'):None } def __init__(self,coordinates,conf): pose.__init__(self,coordinates,conf) self.loadInfo() class squats(pose): angles={ ('nose','shoulder','hip'):None, ('shoulder','hip','knee'):None, ('hip','knee','ankle'):None } def __init__(self,coordinates,conf): pose.__init__(self,coordinates,conf) self.loadInfo() class dumbbell_upper_head(pose): angles={ ('right_shoulder','left_shoulder','left_elbow'):None, ('left_shoulder','right_shoulder','right_elbow'):None, ('right_shoulder','right_elbow','left_wrist'):None, ('right_shoulder','right_elbow','right_wrist'):None } def __init__(self,coordinates,conf): pose.__init__(self,coordinates,conf) self.loadInfo() class push_up(pose): angles={ # ('nose','shoulder','hip'):None, # ('shoulder','hip','knee'):None, # ('hip','knee','ankle'):None, ('shoulder','ankle','wrist'):None } def __init__(self,coordinates,conf): pose.__init__(self,coordinates,conf) self.loadInfo() class sit_up(pose): angles={ ('nose','shoulder','hip'):None, ('hip','knee','ankle'):None, ('shoulder','hip','knee'):None, } def __init__(self,coordinates,conf): pose.__init__(self,coordinates,conf) self.loadInfo() class bicep_press(pose): angles={ ('shoulder','elbow','wrist'):None } def __init__(self,coordinates,conf): pose.__init__(self,coordinates,conf) self.loadInfo()
30.31746
62
0.610471
212
1,910
5.127358
0.160377
0.088316
0.209752
0.25391
0.799448
0.680773
0.651334
0.620975
0.620975
0.620975
0
0
0.210995
1,910
63
63
30.31746
0.721301
0.048168
0
0.555556
0
0
0.220386
0
0
0
0
0
0
1
0.111111
false
0
0.037037
0
0.37037
0
0
0
0
null
0
1
1
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
2cd748d2051b8e82062e8e8a4558cedcec3899bb
701
py
Python
spec/__init__.py
deep-spin/spec-blackboxnlp
23db7a559e09ff7f63ede06b04cad226432b90db
[ "MIT" ]
2
2020-11-26T07:46:48.000Z
2021-07-28T08:06:58.000Z
spec/__init__.py
deep-spin/spec-blackboxnlp
23db7a559e09ff7f63ede06b04cad226432b90db
[ "MIT" ]
null
null
null
spec/__init__.py
deep-spin/spec-blackboxnlp
23db7a559e09ff7f63ede06b04cad226432b90db
[ "MIT" ]
null
null
null
""" SpEC ~~~~~~~~~~~~~~~~~~~ Sparsity, Explainability, and Communication :copyright: (c) 2019 by Marcos Treviso :licence: MIT, see LICENSE for more details """ # Generate your own AsciiArt at: # patorjk.com/software/taag/#f=Calvin%20S&t=SpEC __banner__ = """ _____ _____ _____ | __|___| __| | |__ | . | __| --| |_____| _|_____|_____| |_| """ __prog__ = "spec" __title__ = 'SpEC' __summary__ = 'Sparsity, Explainability, and Communication' __uri__ = 'https://github.com/mtreviso/spec' __version__ = '0.0.1' __author__ = 'Marcos V. Treviso and Andre F. T. Martins' __email__ = 'marcostreviso@gmail.com' __license__ = 'MIT' __copyright__ = 'Copyright 2019 Marcos Treviso'
21.90625
59
0.663338
72
701
5.305556
0.680556
0.115183
0.13089
0.198953
0
0
0
0
0
0
0
0.022414
0.172611
701
31
60
22.612903
0.636207
0.328103
0
0
1
0
0.629067
0.049892
0
0
0
0
0
1
0
false
0
0
0
0
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
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
2cd8482be7ce334c43cdcfd74e894afdafd98102
157
py
Python
planning/data/__init__.py
XinyuHua/pair-emnlp2020
45f8b8ea3752dfb43aa75914afab1b29b2f10c50
[ "MIT" ]
20
2020-10-10T05:38:14.000Z
2022-02-15T01:07:39.000Z
planning/data/__init__.py
XinyuHua/pair-emnlp2020
45f8b8ea3752dfb43aa75914afab1b29b2f10c50
[ "MIT" ]
4
2020-10-20T03:29:41.000Z
2021-04-23T16:10:34.000Z
planning/data/__init__.py
XinyuHua/pair-emnlp2020
45f8b8ea3752dfb43aa75914afab1b29b2f10c50
[ "MIT" ]
2
2021-07-06T01:20:01.000Z
2021-08-19T05:26:24.000Z
from .dictionary import BertDictionary from .text_planning_dataset import TextPlanningDataset __all__ = [ 'BertDictionary', 'TextPlanningDataset', ]
22.428571
54
0.789809
13
157
9.076923
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.140127
157
7
55
22.428571
0.874074
0
0
0
0
0
0.208861
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
2cee532fa1ad8c3bab0846e524ce8d97c1e63a13
93
py
Python
test/login.py
hongren798911/haha
8b198b6e4ae3d992f2d1d7217b7532da3d557112
[ "MIT" ]
null
null
null
test/login.py
hongren798911/haha
8b198b6e4ae3d992f2d1d7217b7532da3d557112
[ "MIT" ]
null
null
null
test/login.py
hongren798911/haha
8b198b6e4ae3d992f2d1d7217b7532da3d557112
[ "MIT" ]
null
null
null
num1 = 100 num2 = 200 num3 = 300 num4 = 400 num5 = 500 mum6 = 600 num7 = 700 num8 = 800
6.642857
10
0.602151
16
93
3.5
1
0
0
0
0
0
0
0
0
0
0
0.5
0.311828
93
13
11
7.153846
0.375
0
0
0
0
0
0
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
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
2cfaf45dde9f79b4daea8e34b742698f034e176d
685
py
Python
code/exampleStrats/gradualtft.py
protonlaser91/PrisonersDilemmaTournament
5a24aca5149b4768778de820eaaf6b096c4aff6d
[ "MIT" ]
null
null
null
code/exampleStrats/gradualtft.py
protonlaser91/PrisonersDilemmaTournament
5a24aca5149b4768778de820eaaf6b096c4aff6d
[ "MIT" ]
null
null
null
code/exampleStrats/gradualtft.py
protonlaser91/PrisonersDilemmaTournament
5a24aca5149b4768778de820eaaf6b096c4aff6d
[ "MIT" ]
null
null
null
import numpy as np from random import random def strategy(history, memory): currentCount,defector,hasDefected = (0,0,False) if memory is None else memory choice = 1 if currentCount > 0: choice = 0 currentCount -= 1 return choice, (currentCount,defector,hasDefected) elif currentCount > -2: currentCount -= 1 return choice, (currentCount,defector,hasDefected) else: hasDefected = False if history.shape[1] >= 1 and history[1,-1] == 0 and not hasDefected: choice = 0 hasDefected = True currentCount = defector defector += 1 return choice, (currentCount,defector,hasDefected)
27.4
81
0.643796
77
685
5.727273
0.363636
0.226757
0.281179
0.170068
0.353742
0.353742
0.253968
0
0
0
0
0.030181
0.274453
685
25
82
27.4
0.857143
0
0
0.35
0
0
0
0
0
0
0
0
0
1
0.05
false
0
0.1
0
0.3
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
fa01b60aac42da66a6f0eab342c49c8c76904fbf
87
py
Python
lab02/eurocv/apps.py
vascoalramos/tpw
e0d1ab14f1e701dd2b2a77522c57cb22fda85e56
[ "MIT" ]
null
null
null
lab02/eurocv/apps.py
vascoalramos/tpw
e0d1ab14f1e701dd2b2a77522c57cb22fda85e56
[ "MIT" ]
null
null
null
lab02/eurocv/apps.py
vascoalramos/tpw
e0d1ab14f1e701dd2b2a77522c57cb22fda85e56
[ "MIT" ]
null
null
null
from django.apps import AppConfig class EurocvConfig(AppConfig): name = 'eurocv'
14.5
33
0.747126
10
87
6.5
0.9
0
0
0
0
0
0
0
0
0
0
0
0.172414
87
5
34
17.4
0.902778
0
0
0
0
0
0.068966
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
fa0d80b9aeafc9ccb67f6cea2a2f78fcffb1f863
701
py
Python
tests/snippets/index_overflow.py
khg0712/RustPython
a04c19ccb0f5e7e1774d5e6f267ffed3ee27aeae
[ "MIT" ]
3
2019-08-14T02:05:49.000Z
2020-01-03T08:39:56.000Z
tests/snippets/index_overflow.py
khg0712/RustPython
a04c19ccb0f5e7e1774d5e6f267ffed3ee27aeae
[ "MIT" ]
6
2021-10-14T15:55:16.000Z
2022-03-31T14:04:02.000Z
tests/snippets/index_overflow.py
khg0712/RustPython
a04c19ccb0f5e7e1774d5e6f267ffed3ee27aeae
[ "MIT" ]
1
2020-05-26T15:20:20.000Z
2020-05-26T15:20:20.000Z
import sys def expect_cannot_fit_index_error(s, index): try: s[index] except IndexError: pass # TODO: Replace current except block with commented # after solving https://github.com/RustPython/RustPython/issues/322 # except IndexError as error: # assert str(error) == "cannot fit 'int' into an index-sized integer" else: assert False MAX_INDEX = sys.maxsize + 1 MIN_INDEX = -(MAX_INDEX + 1) test_str = "test" expect_cannot_fit_index_error(test_str, MIN_INDEX) expect_cannot_fit_index_error(test_str, MAX_INDEX) test_list = [0, 1, 2, 3] expect_cannot_fit_index_error(test_list, MIN_INDEX) expect_cannot_fit_index_error(test_list, MAX_INDEX)
25.962963
77
0.727532
105
701
4.542857
0.438095
0.113208
0.157233
0.209644
0.358491
0.30608
0.30608
0.155136
0
0
0
0.015762
0.185449
701
26
78
26.961538
0.819615
0.306705
0
0
0
0
0.008316
0
0
0
0
0.038462
0.0625
1
0.0625
false
0.0625
0.0625
0
0.125
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
1
0
0
0
0
1
0
0
0
0
0
3
fa2894498609ba22cccb5fff7dcf91feb33619f2
4,857
py
Python
tests/blockchain_tests.py
AoHRuthless/Doubloon
9279ac7decd434d43bf9b03487691aa52aab499f
[ "Apache-2.0" ]
1
2018-08-13T10:26:39.000Z
2018-08-13T10:26:39.000Z
tests/blockchain_tests.py
AoHRuthless/Doubloon
9279ac7decd434d43bf9b03487691aa52aab499f
[ "Apache-2.0" ]
null
null
null
tests/blockchain_tests.py
AoHRuthless/Doubloon
9279ac7decd434d43bf9b03487691aa52aab499f
[ "Apache-2.0" ]
null
null
null
import sys sys.path.append(sys.path[0] + '/src') from unittest import TestCase from src.blockchain import Blockchain from src import constant PUBLIC_KEY = '30819f300d06092a864886f70d010101050003818d0030818902818100d99c9347b6ecd418b1df48012201c5bd2869a707e45dee91a5c63027dc8020210aa4cf6e34e81fc200f29c893add94fefbf37594a964641fc52f8905280c4d93457d4cee5fb216a09a9e8688c62e26bc9e962357c019c5e6c73818f155b87ccaa70059cfa0698c85f5d982bef73bc84e6dfac540cf4f43308b799b8439c1011d0203010001' PRIVATE_KEY = '3082025b02010002818100d99c9347b6ecd418b1df48012201c5bd2869a707e45dee91a5c63027dc8020210aa4cf6e34e81fc200f29c893add94fefbf37594a964641fc52f8905280c4d93457d4cee5fb216a09a9e8688c62e26bc9e962357c019c5e6c73818f155b87ccaa70059cfa0698c85f5d982bef73bc84e6dfac540cf4f43308b799b8439c1011d02030100010281802b55c5f2a317f888ce6b33909e30122bc02f8206cd507360e7cd56eba93a8eab65ce3a4cad1688b47eb1d1c0764b880f5b273984185398a8c700d75d828328b34bffe18565d9145a0db7aef152a9452642acc0518ccfa224287ba38fabb93a51f0da4db17b82a0ca12b6b69ff1c7b172061ce60ae9665b064ee21490e5cd0215024100db115ac3a95d00bdeabb429f841100d2786ab0849753eed0e0208020e8fe2e5d7e171d69d7552a9adee2840e846e56a6b1452c3a7b7c330f02595b3479f815cf024100fe4c5fe8c71d1e746d83b9bd9021d1fd6027090382321421f432ffabc713fca58cf1d116108e493a7b98854be96c761300a891f281db40ffdb9edc09cb29e15302404ca9f3209c299ef3d7acb6f10a0fc540e2c13b8afb46754205dd79d98a90417b987fd05c54ee4a1daeb888cc67ce1166fe8c9da0cdcc36361f7553f4b6667a830240675e845e0b123b1ef8a5630b3b5b84108ad55344a9d7d1773bdcbf31046b8b7780238bea7c305a73fb69b445774d2f71ea029bd108182803d9326a1f51066521024052b9850ce79b3b2f2eeb481999d65426089fa3680fd35568e5010ba0121e37cf10c64ecc20843a26a09c5d5eefbb35a43061cd33b7adca63965d7dbfcedf6544' class BlockchainTest(TestCase): def setUp(self): self.blockchain = Blockchain() class BlockchainSetupTests(BlockchainTest): def test_init(self): self.assertEqual(self.blockchain.current_transactions, []) self.assertEqual(self.blockchain.peers, set()) self.assertEqual(len(self.blockchain.chain), 1) class BlockchainBlockTests(BlockchainTest): def test_add_block_with_prev_hash_provided(self): result = self.blockchain.add_block(10, 20) block_dict = { 'index': 2, 'timestamp': self.blockchain.last_block.timestamp, 'transactions': [], 'proof': 10, 'prev_hash': 20 } self.assertEqual(result, block_dict) def test_add_block_with_no_prev_hash_provided(self): result = self.blockchain.add_block(10) block_dict = { 'index': 2, 'timestamp': self.blockchain.last_block.timestamp, 'transactions': [], 'proof': 10, 'prev_hash': self.blockchain.chain[0].hash } self.assertEqual(result, block_dict) def test_last_block_points_to_end(self): self.assertEqual(self.blockchain.last_block, self.blockchain.chain[0]) self.blockchain.add_block(10, 20) self.assertEqual(self.blockchain.last_block, self.blockchain.chain[1]) class BlockchainTransactionTests(BlockchainTest): def test_add_miner_transaction(self): result = self.blockchain.add_transaction(constant.MINER_KEY, 'receiver', 3, PRIVATE_KEY) self.assertEqual(result, 2) def test_add_regular_transaction_with_valid_private_key_succeeds(self): result = self.blockchain.add_transaction(PUBLIC_KEY, 'receiver', 3, PRIVATE_KEY) self.assertEqual(result, 2) def test_add_regular_transaction_with_invalid_private_key_fails(self): result = self.blockchain.add_transaction(PUBLIC_KEY, 'receiver', 3, PUBLIC_KEY) self.assertEqual(result, -1) class BlockchainPeerTests(BlockchainTest): def test_add_peer_succeeds(self): result1 = self.blockchain.add_peer('http://127.0.0.1:9000') result2 = self.blockchain.add_peer('http://127.0.0.1:9001') self.assertTrue(result1) self.assertTrue(result2) self.assertIn('127.0.0.1:9000', self.blockchain.peers) self.assertIn('127.0.0.1:9001', self.blockchain.peers) def test_add_peer_fails(self): result = self.blockchain.add_peer('/127.0.0.1:9000') self.assertFalse(result) self.assertNotIn('127.0.0.1:9000', self.blockchain.peers) def test_peers_idempotent(self): self.assertEqual(len(self.blockchain.peers), 0) self.blockchain.add_peer('http://127.0.0.1:9000') self.assertEqual(len(self.blockchain.peers), 1) self.blockchain.add_peer('http://127.0.0.1:9000') self.assertEqual(len(self.blockchain.peers), 1) class BlockchainProofTests(BlockchainTest): def test_proof_of_work(self): self.assertEqual(self.blockchain.proof_of_work(100), 33575)
50.072165
1,230
0.774758
405
4,857
9.091358
0.197531
0.110266
0.050788
0.013036
0.368007
0.319392
0.265073
0.244976
0.229223
0.189842
0
0.275464
0.144945
4,857
97
1,231
50.072165
0.611124
0
0
0.289474
0
0
0.367847
0.316591
0
1
0
0
0.263158
1
0.157895
false
0
0.052632
0
0.289474
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
3
fa2aef92f1386e419f64a36bf512725d85f56e94
1,725
py
Python
start_training.py
DrInfy/TheHarvester
dd21194ab2220c8edb73352c299d2bfb0f11d7d6
[ "MIT" ]
6
2020-03-08T21:04:47.000Z
2021-05-29T07:14:25.000Z
start_training.py
DrInfy/TheHarvester
dd21194ab2220c8edb73352c299d2bfb0f11d7d6
[ "MIT" ]
5
2020-04-20T08:41:48.000Z
2021-01-04T18:15:39.000Z
start_training.py
DrInfy/TheHarvester
dd21194ab2220c8edb73352c299d2bfb0f11d7d6
[ "MIT" ]
2
2021-01-18T21:07:56.000Z
2021-11-22T15:24:21.000Z
import subprocess wsl = "wsl python3.7 /mnt/" + YOUR_PATH_TO_HARVESTER # to = "--timeout 900 -z" to = "-p2 ai.terran.hard" to2 = "-p2 ai.zerg.hard" to3 = "-p2 ai.protoss.hard" def ai_opponents(difficulty: str) -> str: text = "" for race in ["zerg", "protoss", "terran"]: for build in ["rush", "timing", "power", "air", "air", "macro"]: text += f"ai.{race}.{difficulty}.{build}," return text.strip(",") harvester_test_pattern = ( "harvesterzerg.learning," "harvesterzerg.scripted," "harvesterzerg.scripted.default.2," "harvesterzerg.learning.default.2," "harvesterzerg.scripted.default.3," "harvesterzerg.learning.default.3," "harvesterzerg.scripted.default.4," "harvesterzerg.learning.default.4," "harvesterzerg.scripted.default.5," "harvesterzerg.learning.default.5," "harvesterzerg.scripted.default.6," "harvesterzerg.learning.default.6," "harvesterzerg.scripted.default.7," "harvesterzerg.learning.default.7," "harvesterzerg.play.default.master," ).strip(",") cmd_list_ml = [ # f"{wsl} -p1 harvesterzerg.learning -p2 harvesterzerg.learning.default.2", # f"{wsl} -p1 harvesterzerg.learning.default.2 -p2 harvesterzerg.learning.default.3", # f"{wsl} -p1 harvesterzerg.learning -p2 harvesterzerg.learning.default.3", ] for i in range(0, 15): cmd_list_ml.append(f'{wsl} -p1 {harvester_test_pattern} -p2 {ai_opponents("hard")}') for i in range(0, 15): cmd_list_ml.append(f'{wsl} -p1 {harvester_test_pattern} -p2 {ai_opponents("veryhard")}') index = 0 for cmd in cmd_list_ml: index += 1 final_cmd = cmd + " --port " + str(10000 + index * 10) cmds = final_cmd.split(" ") subprocess.Popen(cmds)
33.173077
92
0.667826
221
1,725
5.113122
0.316742
0.241593
0.247788
0.076991
0.273451
0.221239
0.221239
0.221239
0.221239
0.120354
0
0.03527
0.161739
1,725
51
93
33.823529
0.746196
0.147826
0
0.05
0
0
0.518089
0.411604
0
0
0
0
0
1
0.025
false
0
0.025
0
0.075
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
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
fa47150e782b7ef30a60052a4f1b959b3b1766a3
432
py
Python
model/algorithms/__init__.py
nertsam/DAGsched
dcd431384fe1dd3f0f55a9287fc980f2b445beaf
[ "MIT" ]
null
null
null
model/algorithms/__init__.py
nertsam/DAGsched
dcd431384fe1dd3f0f55a9287fc980f2b445beaf
[ "MIT" ]
null
null
null
model/algorithms/__init__.py
nertsam/DAGsched
dcd431384fe1dd3f0f55a9287fc980f2b445beaf
[ "MIT" ]
null
null
null
def required_model(name: object, kwargs: object) -> object: required_fields = kwargs['required_fields'] if 'required_fields' in kwargs else [] task_f = kwargs['required_task_fields'] if 'required_task_fields' in kwargs else [] proc_f = kwargs['required_proc_fields'] if 'required_proc_fields' in kwargs else [] display_name = kwargs['display_name'] if 'display_name' in kwargs else name def f(klass): return klass return f
43.2
84
0.761574
64
432
4.875
0.25
0.102564
0.153846
0.173077
0
0
0
0
0
0
0
0
0.134259
432
10
85
43.2
0.834225
0
0
0
0
0
0.310185
0
0
0
0
0
0
1
0.25
false
0
0
0.125
0.5
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
1
0
0
0
3
fa7021d6098d58c035a0d3dad7302d599a66813a
923
py
Python
setup.py
hyong/mercury-python
b93806926253497e5af3a9578078f523a7b1eb8e
[ "Apache-2.0" ]
null
null
null
setup.py
hyong/mercury-python
b93806926253497e5af3a9578078f523a7b1eb8e
[ "Apache-2.0" ]
null
null
null
setup.py
hyong/mercury-python
b93806926253497e5af3a9578078f523a7b1eb8e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup setup(name='mercury', version='1.12.9', description='Python Language pack for Mercury', author='Eric Law', author_email='eric.law@accenture.com', url='https://github.com/Accenture/mercury-python', project_urls={ 'Parent': 'https://github.com/Accenture/mercury' }, packages=['mercury', 'mercury.system', 'mercury.resources'], license='Apache 2.0', python_requires='>=3.6.7', install_requires=['aiohttp', 'msgpack-python'], classifiers=[ 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License' ] )
32.964286
66
0.588299
97
923
5.556701
0.57732
0.141002
0.185529
0.19295
0.111317
0
0
0
0
0
0
0.024566
0.250271
923
27
67
34.185185
0.754335
0.045504
0
0
0
0
0.526735
0.025028
0
0
0
0
0
1
0
true
0
0.043478
0
0.043478
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
3afca77e1d303804e80011de9994eebd4cd184b7
31
py
Python
demo.py
TOMMYWHY/acnet_mobilenet
6ebd21510cb6cca84f498d86daa081321a585b08
[ "MIT" ]
null
null
null
demo.py
TOMMYWHY/acnet_mobilenet
6ebd21510cb6cca84f498d86daa081321a585b08
[ "MIT" ]
null
null
null
demo.py
TOMMYWHY/acnet_mobilenet
6ebd21510cb6cca84f498d86daa081321a585b08
[ "MIT" ]
null
null
null
p = touch.autograd.Variable()
10.333333
29
0.709677
4
31
5.5
1
0
0
0
0
0
0
0
0
0
0
0
0.129032
31
2
30
15.5
0.814815
0
0
0
0
0
0
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
3afde623e923bb16765921cd6884a6f3f7f37e8e
3,612
py
Python
cexapi/cexapi.py
codarrenvelvindron/cex.io-api-python
5e54ca7d4d98e509e18d1ecda311da544649ea60
[ "MIT" ]
1
2021-11-09T18:47:44.000Z
2021-11-09T18:47:44.000Z
cexapi/cexapi.py
codarrenvelvindron/cex.io-api-python
5e54ca7d4d98e509e18d1ecda311da544649ea60
[ "MIT" ]
null
null
null
cexapi/cexapi.py
codarrenvelvindron/cex.io-api-python
5e54ca7d4d98e509e18d1ecda311da544649ea60
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Author: t0pep0 # e-mail: t0pep0.gentoo@gmail.com # Jabber: t0pep0@jabber.ru # BTC : 1ipEA2fcVyjiUnBqUx7PVy5efktz2hucb # donate free =) # Forked and modified by Codarren Velvindron # Compatible Python3 import hmac import hashlib import time import urllib.request, urllib.parse, urllib.error import json class Api(object): __username = '' __api_key = '' __api_secret = '' __nonce_v = '' # Init class def __init__(self, username, api_key, api_secret): self.__username = username self.__api_key = api_key self.__api_secret = api_secret # get timestamp as nonce def __nonce(self): self.__nonce_v = '{:.10f}'.format(time.time() * 1000).split('.')[0] # generate signature def __signature(self): byte_secret = bytes(self.__api_secret, "ascii") string = self.__nonce_v + self.__username + self.__api_key # create string encode_string = string.encode ('utf-8') signature = hmac.new(byte_secret, encode_string, digestmod=hashlib.sha256).hexdigest().upper() # create signature return signature def __post(self, url, param): # Post Request (Low Level API call) post_url = url header = { 'User-agent': 'bot-cex.io-' } params = urllib.parse.urlencode(param) post_data = params.encode( "ascii") req = urllib.request.Request(url = post_url, data = post_data, headers = header) page = urllib.request.urlopen(req).read() return page def api_call(self, method, param={}, private=0, couple=''): # api call (Middle level) url = 'https://cex.io/api/' + method + '/' # generate url if couple != '': url = url + couple + '/' # set couple if needed if private == 1: # add auth-data if needed self.__nonce() param.update({ 'key': self.__api_key, 'signature': self.__signature(), 'nonce': self.__nonce_v}) answer = self.__post(url, param) # Post Request a = answer.decode("utf-8") #return json.loads(answer) # generate dict and return return a # generates a valid json output def ticker(self, couple='MHC/BTC'): return self.api_call('ticker', {}, 0, couple) def tickers(self, couple='USD'): return self.api_call('tickers', {}, 0, couple) def ohlcv(self, end_date, couple='BTC/USD'): return self.api_call('ohlcv/hd/'+str(end_date), {}, 0, couple) def order_book(self, couple='MHC/BTC'): return self.api_call('order_book', {}, 0, couple) def trade_history(self, since=1, couple='MHC/BTC'): return self.api_call('trade_history', {"since": str(since)}, 0, couple) def balance(self): return self.api_call('balance', {}, 1) def current_orders(self, couple='MHC/BTC'): return self.api_call('open_orders', {}, 1, couple) def cancel_order(self, order_id): return self.api_call('cancel_order', {"id": order_id}, 1) def place_order(self, ptype='buy', amount=1, price=1, couple='MHC/BTC'): return self.api_call('place_order', {"type": ptype, "amount": str(amount), "price": str(price)}, 1, couple) def archived_orders(self, couple='XLM/USD'): return self.api_call('archived_orders', {}, 1, couple) def price_stats(self, last_hours, max_resp_arr_size, couple='MHC/BTC'): return self.api_call( 'price_stats', {"lastHours": last_hours, "maxRespArrSize": max_resp_arr_size}, 0, couple)
36.484848
122
0.614341
459
3,612
4.605664
0.311547
0.05298
0.067644
0.088458
0.139073
0.088931
0.088931
0.075213
0
0
0
0.015057
0.246124
3,612
98
123
36.857143
0.761293
0.140365
0
0
0
0
0.099286
0
0
0
0
0
0
1
0.235294
false
0
0.073529
0.161765
0.588235
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
d7075ae50fe80531ab2a8eb41c4eb490a0897696
297
py
Python
conftest.py
gousteris/git-diff-conditional-buildkite-plugin
517442ca9ebe21021e1078debf88c231ba8e8dff
[ "MIT" ]
19
2020-03-27T11:53:11.000Z
2021-04-14T23:11:27.000Z
conftest.py
segmentio/git-diff-conditional-buildkite-plugin
62a276000149da0bbf4e152634211c75966a8558
[ "MIT" ]
7
2020-03-27T11:59:51.000Z
2021-08-06T14:01:42.000Z
conftest.py
segmentio/git-diff-conditional-buildkite-plugin
62a276000149da0bbf4e152634211c75966a8558
[ "MIT" ]
6
2020-03-28T20:49:49.000Z
2022-01-19T17:48:02.000Z
"""Place fixtures in this file for use across all test files""" import pytest @pytest.fixture(scope="function") def logger(caplog): caplog.set_level("DEBUG") return caplog @pytest.fixture def log_and_exit_mock(mocker): return mocker.patch("scripts.generate_pipeline.log_and_exit")
21.214286
65
0.754209
43
297
5.046512
0.744186
0.119816
0.092166
0
0
0
0
0
0
0
0
0
0.13468
297
13
66
22.846154
0.844358
0.191919
0
0
0
0
0.217949
0.162393
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
d7108aaef549127c37482205d3e95284067ddf78
189
py
Python
uber/views.py
sami-mai/Carpool-R-Us
306c60788e3dc123c3ac85e0c40ac5a291590709
[ "MIT" ]
null
null
null
uber/views.py
sami-mai/Carpool-R-Us
306c60788e3dc123c3ac85e0c40ac5a291590709
[ "MIT" ]
5
2020-02-12T00:43:34.000Z
2021-06-10T20:18:42.000Z
uber/views.py
sami-mai/Carpool-R-Us
306c60788e3dc123c3ac85e0c40ac5a291590709
[ "MIT" ]
null
null
null
from django.shortcuts import render # Create your views here. def landing(request): title = "Home" context = {"title": title} return render(request, 'landing.html', context)
18.9
51
0.687831
23
189
5.652174
0.73913
0
0
0
0
0
0
0
0
0
0
0
0.195767
189
9
52
21
0.855263
0.121693
0
0
0
0
0.128049
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.6
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
0
0
1
0
0
3
d71aa4de2d66c237cc707eb9393bb1bbbb06c886
75
py
Python
test/test_maximum_average_subarray_i.py
spencercjh/sync-leetcode-today-problem-python3-example
4957e5eadb697334741df0fc297bec2edaa9e2ab
[ "Apache-2.0" ]
null
null
null
test/test_maximum_average_subarray_i.py
spencercjh/sync-leetcode-today-problem-python3-example
4957e5eadb697334741df0fc297bec2edaa9e2ab
[ "Apache-2.0" ]
null
null
null
test/test_maximum_average_subarray_i.py
spencercjh/sync-leetcode-today-problem-python3-example
4957e5eadb697334741df0fc297bec2edaa9e2ab
[ "Apache-2.0" ]
null
null
null
solution = MaximumAverageSubarrayI() assert X == solution.findMaxAverage( )
37.5
38
0.8
6
75
10
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.093333
75
2
38
37.5
0.882353
0
0
0
0
0
0
0
0
0
0
0
0.5
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
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
3
d72da0462a860ef207ae387369b10c547914c8ab
24
py
Python
tests/acknowledge/acknowledge.py
orenyodfat/CWR-DataApi
f3b6ba8308c901b6ab87073c155c08e30692333c
[ "MIT" ]
37
2015-04-21T15:33:53.000Z
2022-02-07T00:02:29.000Z
tests/acknowledge/acknowledge.py
orenyodfat/CWR-DataApi
f3b6ba8308c901b6ab87073c155c08e30692333c
[ "MIT" ]
86
2015-02-01T22:26:02.000Z
2021-07-09T08:49:36.000Z
tests/acknowledge/acknowledge.py
orenyodfat/CWR-DataApi
f3b6ba8308c901b6ab87073c155c08e30692333c
[ "MIT" ]
27
2015-01-26T16:01:09.000Z
2021-11-08T23:53:55.000Z
__author__ = 'yaroslav'
12
23
0.75
2
24
7
1
0
0
0
0
0
0
0
0
0
0
0
0.125
24
1
24
24
0.666667
0
0
0
0
0
0.333333
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
d735642e9d558eb3bf9fdd07fb6538d0fa899e7b
987
py
Python
shell/core/backdoors.py
theralfbrown/shellsploit-framework
93b66ab9361872697eafda2125b37005f49116be
[ "MIT" ]
3
2020-03-21T04:37:50.000Z
2021-08-14T07:31:13.000Z
shell/core/backdoors.py
security-geeks/shellsploit-framework
93b66ab9361872697eafda2125b37005f49116be
[ "MIT" ]
null
null
null
shell/core/backdoors.py
security-geeks/shellsploit-framework
93b66ab9361872697eafda2125b37005f49116be
[ "MIT" ]
3
2020-02-04T13:28:47.000Z
2020-06-10T01:34:19.000Z
from color import * #Will be add command line params .. def backdoorlist( require=False): if require != False: data = [ "linux/x86/reverse_tcp", "linux/x64/reverse_tcp", "osx/x86/reverse_tcp", "osx/x64/reverse_tcp", "windows/x86/reverse_tcp", "php/reverse_tcp", "asp/reverse_tcp", "jsp/reverse_tcp", "war/reverse_tcp", "unix/python/reverse_tcp", "unix/perl/reverse_tcp", "unix/bash/reverse_tcp", "unix/ruby/reverse_tcp", ] return data else: print (bcolors.GREEN+""" Binaries ========== linux/x86/reverse_tcp linux/x64/reverse_tcp osx/x86/reverse_tcp windows/x86/reverse_tcp - [Passive] windows/x64/reverse_tcp - [Passive] Web Payloads ============= php/reverse_tcp - [Passive] asp/reverse_tcp - [Passive] jsp/reverse_tcp - [Passive] war/reverse_tcp - [Passive] Scripting Payloads =================== unix/python/reverse_tcp unix/perl/reverse_tcp unix/bash/reverse_tcp unix/ruby/reverse_tcp """ + bcolors.ENDC)
17.625
37
0.672746
132
987
4.833333
0.318182
0.407524
0.153605
0.056426
0.473354
0.473354
0.394984
0.394984
0.394984
0.394984
0
0.023981
0.155015
987
55
38
17.945455
0.741007
0.034448
0
0
0
0
0.746583
0.341746
0
0
0
0
0
1
0.02439
false
0.146341
0.02439
0
0.073171
0.02439
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
1
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
3
d736eacec6de3c37305776ffe4de524fa9c56eb4
739
py
Python
stronghold/tests/testmixins.py
davitovmasyan/django-stronghold
73021742e9aad5c57509623c1152fcf7aa6ed232
[ "MIT" ]
252
2015-01-07T20:03:27.000Z
2022-03-22T18:17:28.000Z
stronghold/tests/testmixins.py
davitovmasyan/django-stronghold
73021742e9aad5c57509623c1152fcf7aa6ed232
[ "MIT" ]
35
2015-02-16T02:29:22.000Z
2021-10-04T09:14:11.000Z
stronghold/tests/testmixins.py
davitovmasyan/django-stronghold
73021742e9aad5c57509623c1152fcf7aa6ed232
[ "MIT" ]
48
2015-02-15T17:56:52.000Z
2021-10-04T12:33:27.000Z
from stronghold.views import StrongholdPublicMixin import django from django.views.generic import View from django.views.generic.base import TemplateResponseMixin if django.VERSION[:2] < (1, 9): from django.utils import unittest else: import unittest class StrongholdMixinsTests(unittest.TestCase): def test_public_mixin_sets_attr(self): class TestView(StrongholdPublicMixin, View): pass self.assertTrue(TestView.dispatch.STRONGHOLD_IS_PUBLIC) def test_public_mixin_sets_attr_with_multiple_mixins(self): class TestView(StrongholdPublicMixin, TemplateResponseMixin, View): template_name = 'dummy.html' self.assertTrue(TestView.dispatch.STRONGHOLD_IS_PUBLIC)
26.392857
75
0.760487
83
739
6.578313
0.481928
0.054945
0.054945
0.080586
0.271062
0.271062
0.175824
0
0
0
0
0.004902
0.171854
739
27
76
27.37037
0.887255
0
0
0.117647
0
0
0.013532
0
0
0
0
0
0.117647
1
0.117647
false
0.058824
0.352941
0
0.647059
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
0
1
1
0
1
0
0
3
d738bec2f9d2cad3aaccf4ee4535837028c7758a
401
py
Python
examples/hsd_struct/src/hsd_struct_beh.py
hnikolov/pihdf
9a0d2add059db1ee90805e2124beff1fb5185fae
[ "MIT" ]
2
2016-09-25T00:08:47.000Z
2016-10-09T10:09:55.000Z
examples/hsd_struct/src/hsd_struct_beh.py
hnikolov/pihdf
9a0d2add059db1ee90805e2124beff1fb5185fae
[ "MIT" ]
null
null
null
examples/hsd_struct/src/hsd_struct_beh.py
hnikolov/pihdf
9a0d2add059db1ee90805e2124beff1fb5185fae
[ "MIT" ]
null
null
null
def hsd_struct_beh(mode_1, mode_2, LEDs, LED_rdy_en, LED_rdy_buff, LED_rdy_out, DELAY_BITS, BUFFER_SIZE): '''| | Specify the behavior, describe data processing; there is no notion | of clock. Access the in/out interfaces via get() and append() | methods. The "hsd_struct_beh" function does not return values. |________''' print "Warning: Behavior model not implemented yet!"
40.1
105
0.720698
60
401
4.45
0.783333
0.067416
0.089888
0
0
0
0
0
0
0
0
0.006135
0.187032
401
9
106
44.555556
0.812883
0
0
0
0
0
0.260355
0
0
0
0
0
0
0
null
null
0
0
null
null
0.5
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
1
0
0
0
0
0
0
1
0
3
d75380c7f93cf504e36d7b8aad4924bb1e6a7e9d
1,692
py
Python
icarus/test/test_util.py
oascigil/icarus_edge_comp
b7bb9f9b8d0f27b4b01469dcba9cfc0c4949d64b
[ "MIT" ]
5
2021-03-20T09:22:55.000Z
2021-12-20T17:01:33.000Z
icarus/test/test_util.py
oascigil/icarus_edge_comp
b7bb9f9b8d0f27b4b01469dcba9cfc0c4949d64b
[ "MIT" ]
1
2021-12-13T07:40:46.000Z
2021-12-20T16:59:08.000Z
icarus/test/test_util.py
oascigil/icarus_edge_comp
b7bb9f9b8d0f27b4b01469dcba9cfc0c4949d64b
[ "MIT" ]
1
2021-11-25T05:42:20.000Z
2021-11-25T05:42:20.000Z
import unittest import networkx as nx import fnss import icarus.util as util class TestUtil(unittest.TestCase): @classmethod def setUpClass(cls): pass @classmethod def tearDownClass(cls): pass def setUp(self): pass def tearDown(self): pass def test_timestr(self): self.assertEqual("1m 30s", util.timestr(90, True)) self.assertEqual("1m", util.timestr(90, False)) self.assertEqual("2m", util.timestr(120, True)) self.assertEqual("21s", util.timestr(21, True)) self.assertEqual("0m", util.timestr(21, False)) self.assertEqual("1h", util.timestr(3600, True)) self.assertEqual("1h", util.timestr(3600, False)) self.assertEqual("1h 0m 4s", util.timestr(3604, True)) self.assertEqual("1h", util.timestr(3604, False)) self.assertEqual("1h 2m 4s", util.timestr(3724, True)) self.assertEqual("1h 2m", util.timestr(3724, False)) self.assertEqual("2d 1h 3m 9s", util.timestr(49 * 3600 + 189, True)) self.assertEqual("0s", util.timestr(0, True)) self.assertEqual("0m", util.timestr(0, False)) def test_multicast_tree(self): topo = fnss.Topology() topo.add_path([2, 1, 3, 4]) sp = nx.all_pairs_shortest_path(topo) tree = util.multicast_tree(sp, 1, [2, 3]) self.assertSetEqual(set(tree), set([(1, 2), (1, 3)])) def test_apportionment(self): self.assertEqual(util.apportionment(10, [0.53, 0.47]), [5, 5]) self.assertEqual(util.apportionment(100, [0.4, 0.21, 0.39]), [40, 21, 39]) self.assertEqual(util.apportionment(99, [0.2, 0.7, 0.1]), [20, 69, 10])
32.538462
82
0.615839
230
1,692
4.491304
0.317391
0.246854
0.147144
0.063892
0.158761
0.158761
0
0
0
0
0
0.094037
0.22695
1,692
51
83
33.176471
0.695719
0
0
0.15
0
0
0.033688
0
0
0
0
0
0.45
1
0.175
false
0.1
0.1
0
0.3
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
1
0
0
0
1
0
0
0
0
0
3
d7560a43f54c8aae8cfba885c28425454151868f
866
py
Python
accelerator/migrations/0064_update_gender_criteria_to_full_gender_spec.py
masschallenge/django-accelerator
8af898b574be3b8335edc8961924d1c6fa8b5fd5
[ "MIT" ]
6
2017-06-14T19:34:01.000Z
2020-03-08T07:16:59.000Z
accelerator/migrations/0064_update_gender_criteria_to_full_gender_spec.py
masschallenge/django-accelerator
8af898b574be3b8335edc8961924d1c6fa8b5fd5
[ "MIT" ]
160
2017-06-20T17:12:13.000Z
2022-03-30T13:53:12.000Z
accelerator/migrations/0064_update_gender_criteria_to_full_gender_spec.py
masschallenge/django-accelerator
8af898b574be3b8335edc8961924d1c6fa8b5fd5
[ "MIT" ]
null
null
null
# Generated by Django 2.2.24 on 2021-07-01 20:17 from django.db import migrations def update_criterion_specs(apps, schema_editor): CriterionOptionSpec = apps.get_model("accelerator", "CriterionOptionSpec") CriterionOptionSpec.objects.filter(option="m").update(option="Male") CriterionOptionSpec.objects.filter(option="f").update(option="Female") def reverse_update(apps, schema_editor): CriterionOptionSpec = apps.get_model("accelerator", "CriterionOptionSpec") CriterionOptionSpec.objects.filter(option="Male").update(option="m") CriterionOptionSpec.objects.filter(option="Female").update(option="f") class Migration(migrations.Migration): dependencies = [ ('accelerator', '0063_usernote'), ] operations = [ migrations.RunPython(update_criterion_specs, reverse_update) ]
30.928571
78
0.71709
90
866
6.777778
0.455556
0.170492
0.209836
0.24918
0.377049
0.377049
0.377049
0.377049
0.377049
0.377049
0
0.027473
0.159353
866
27
79
32.074074
0.81044
0.053118
0
0.117647
1
0
0.132029
0
0
0
0
0
0
1
0.117647
false
0
0.058824
0
0.352941
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
d767675283bbb063fdc340913b93263291f2c950
212
py
Python
tests/integration/test_integration_foreign_payment_codes.py
pwitab/visma
ffa6698738fcc1be9de727e7fe77cce30310f830
[ "BSD-3-Clause" ]
5
2018-08-10T19:12:48.000Z
2021-07-08T12:43:24.000Z
tests/integration/test_integration_foreign_payment_codes.py
pwitab/visma
ffa6698738fcc1be9de727e7fe77cce30310f830
[ "BSD-3-Clause" ]
16
2018-06-17T18:51:05.000Z
2021-01-10T10:44:36.000Z
tests/integration/test_integration_foreign_payment_codes.py
pwitab/visma
ffa6698738fcc1be9de727e7fe77cce30310f830
[ "BSD-3-Clause" ]
3
2019-03-05T15:01:13.000Z
2021-06-15T14:35:37.000Z
from visma.models import ForeignPaymentCodes class TestForeignPaymentCodes: def test_list_foregin_payment_codes(self): codes = ForeignPaymentCodes.objects.all() assert len(codes) is not 0
21.2
49
0.754717
24
212
6.5
0.875
0
0
0
0
0
0
0
0
0
0
0.005814
0.188679
212
9
50
23.555556
0.901163
0
0
0
0
0
0
0
0
0
0
0
0.2
1
0.2
false
0
0.2
0
0.6
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
0
0
1
0
0
3
d77119de6b793cbac0f2940da62fd48d954f6aef
165
py
Python
squirrel/__main__.py
egxdigital/squirrel
f4c5dbead63788a088d24b28b6cd8ad283585eaa
[ "MIT" ]
null
null
null
squirrel/__main__.py
egxdigital/squirrel
f4c5dbead63788a088d24b28b6cd8ad283585eaa
[ "MIT" ]
null
null
null
squirrel/__main__.py
egxdigital/squirrel
f4c5dbead63788a088d24b28b6cd8ad283585eaa
[ "MIT" ]
null
null
null
"""Squirrel Main This module contains the entry point code for the Squirrel program. """ from squirrel.squirrel import main if __name__ == '__main__': main()
16.5
67
0.727273
22
165
5.090909
0.681818
0
0
0
0
0
0
0
0
0
0
0
0.181818
165
10
68
16.5
0.82963
0.49697
0
0
0
0
0.103896
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
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
1
0
1
0
0
0
0
3
d7741c04bf8fcb98f38a8a2f9343cab79bc9f668
394
py
Python
clairvoyance/preprocessing/__init__.py
ZhaozhiQIAN/SyncTwin-NeurIPS-2021
78eff91d0287c7f1f66c76ca24834c7d1029ad3b
[ "MIT" ]
5
2021-11-23T08:41:08.000Z
2022-03-06T16:20:37.000Z
clairvoyance/preprocessing/__init__.py
ZhaozhiQIAN/SyncTwin-NeurIPS-2021
78eff91d0287c7f1f66c76ca24834c7d1029ad3b
[ "MIT" ]
null
null
null
clairvoyance/preprocessing/__init__.py
ZhaozhiQIAN/SyncTwin-NeurIPS-2021
78eff91d0287c7f1f66c76ca24834c7d1029ad3b
[ "MIT" ]
2
2021-11-16T16:10:53.000Z
2021-12-28T07:13:03.000Z
from .encoding import ( MinMaxNormalizer, Normalizer, OneHotEncoder, ProblemMaker, ReNormalizer, StandardNormalizer, ) from .outlier_filter import FilterNegative, FilterOutOfRange __all__ = [ "FilterNegative", "FilterOutOfRange", "OneHotEncoder", "MinMaxNormalizer", "StandardNormalizer", "ReNormalizer", "Normalizer", "ProblemMaker", ]
18.761905
60
0.687817
24
394
11.083333
0.583333
0.225564
0
0
0
0
0
0
0
0
0
0
0.215736
394
20
61
19.7
0.860841
0
0
0
0
0
0.281726
0
0
0
0
0
0
1
0
false
0
0.105263
0
0.105263
0
1
0
1
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
0
0
0
3
d77d6e7fb86f611447c66f19c0c89a6591454f10
162
py
Python
parse.py
lpmi-13/telegramStressBot
d6968108347e1215a97c6f8a2a2801e3770874d7
[ "MIT" ]
null
null
null
parse.py
lpmi-13/telegramStressBot
d6968108347e1215a97c6f8a2a2801e3770874d7
[ "MIT" ]
2
2017-05-08T21:03:37.000Z
2020-10-25T05:16:55.000Z
parse.py
lpmi-13/telegramStressBot
d6968108347e1215a97c6f8a2a2801e3770874d7
[ "MIT" ]
null
null
null
import nltk from nltk import word_tokenize def create_POS_tags(sentence): parsedSentence = word_tokenize(sentence) return nltk.pos_tag(parsedSentence)
18
44
0.796296
21
162
5.904762
0.619048
0.193548
0
0
0
0
0
0
0
0
0
0
0.148148
162
8
45
20.25
0.898551
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.4
0
0.8
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
ad08cf47ba42bae95ff25fda628ffbf2136e4ecb
59
py
Python
pacote-download/Mundo1/ex002.py
ariadne-pereira/cev-python
b2c6bbebb5106bb0152c9127c04c83f23e9d7757
[ "MIT" ]
null
null
null
pacote-download/Mundo1/ex002.py
ariadne-pereira/cev-python
b2c6bbebb5106bb0152c9127c04c83f23e9d7757
[ "MIT" ]
null
null
null
pacote-download/Mundo1/ex002.py
ariadne-pereira/cev-python
b2c6bbebb5106bb0152c9127c04c83f23e9d7757
[ "MIT" ]
null
null
null
nome = input('Qual o seu nome?') print('Bem vindo ' , nome)
29.5
32
0.644068
10
59
3.8
0.8
0
0
0
0
0
0
0
0
0
0
0
0.169492
59
2
33
29.5
0.77551
0
0
0
0
0
0.433333
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
ad2588d5d21fa5a0ab0624f48b923896aa205c21
214
py
Python
python/mock_patch/test_topathch.py
amitsaha/playground
82cb5ac02ac90d3fa858a5153b0a5705187c14ce
[ "Unlicense" ]
4
2018-04-14T16:28:39.000Z
2021-11-14T12:08:02.000Z
python/mock_patch/test_topathch.py
amitsaha/playground
82cb5ac02ac90d3fa858a5153b0a5705187c14ce
[ "Unlicense" ]
3
2022-02-14T10:38:51.000Z
2022-02-27T16:01:16.000Z
python/mock_patch/test_topathch.py
amitsaha/playground
82cb5ac02ac90d3fa858a5153b0a5705187c14ce
[ "Unlicense" ]
4
2015-07-07T01:01:27.000Z
2019-04-12T05:38:26.000Z
from mock import patch @patch('topatch.afunction') class TestToPatch(): def test_afunction(self, mock_afunction): mock_afunction('foo', 'bar') mock_afunction.assert_any_call('foo', 'bar')
23.777778
52
0.682243
26
214
5.384615
0.615385
0.278571
0
0
0
0
0
0
0
0
0
0
0.186916
214
8
53
26.75
0.804598
0
0
0
0
0
0.135514
0
0
0
0
0
0.166667
1
0.166667
false
0
0.166667
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
ad8f7bbcca004c832305ceeebbf23ba748e94eff
933
py
Python
Session 3/Dictionaries/Accessing, writing & deleting data.py
Tassneem04Hamdy/AUG-Problem-Solving-For-Bioinformatics-Level-1-
7273610cc2e37acb65530dc384472e78ee8c30f7
[ "MIT" ]
4
2021-04-16T12:27:16.000Z
2021-10-08T19:05:33.000Z
Session 3/Dictionaries/Accessing, writing & deleting data.py
Tassneem04Hamdy/AUG-Problem-Solving-For-Bioinformatics-Level-1-
7273610cc2e37acb65530dc384472e78ee8c30f7
[ "MIT" ]
null
null
null
Session 3/Dictionaries/Accessing, writing & deleting data.py
Tassneem04Hamdy/AUG-Problem-Solving-For-Bioinformatics-Level-1-
7273610cc2e37acb65530dc384472e78ee8c30f7
[ "MIT" ]
5
2021-04-18T10:46:44.000Z
2021-05-03T16:13:25.000Z
my_dictionary = { 'type': 'Fruits', 'name': 'Apple', 'color': 'Green', 'available': True, 'number': 25 } print(my_dictionary) print(my_dictionary['name']) # searching with wrong key print(my_dictionary['weight']) ############################################################### # printing keys and values for d in my_dictionary: print(d, my_dictionary[d]) # printing values direct for data in my_dictionary.values(): print(data) ############################################################### # modify a value my_dictionary['color'] = 'Red' print(my_dictionary) ############################################################### # inserting new item my_dictionary['weight'] = '5k' print(my_dictionary) ############################################################### # deleting an item del my_dictionary['weight'] print(my_dictionary) ###############################################################
21.697674
63
0.45552
82
933
5.02439
0.463415
0.378641
0.247573
0
0
0
0
0
0
0
0
0.003641
0.116827
933
42
64
22.214286
0.496359
0.131833
0
0.2
0
0
0.155738
0
0
0
0
0
0
1
0
false
0
0
0
0
0.4
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
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
a8e5b8ce05b40fbc469c45e36983e0d032a99b84
1,581
py
Python
showyourwork/exceptions/other.py
katiebreivik/showyourwork
77a15de6778e14c3a3936e86e181539cc31cc693
[ "MIT" ]
null
null
null
showyourwork/exceptions/other.py
katiebreivik/showyourwork
77a15de6778e14c3a3936e86e181539cc31cc693
[ "MIT" ]
null
null
null
showyourwork/exceptions/other.py
katiebreivik/showyourwork
77a15de6778e14c3a3936e86e181539cc31cc693
[ "MIT" ]
null
null
null
from .base import ShowyourworkException class RequestError(ShowyourworkException): def __init__( self, status="", message="An error occurred while accessing a remote server.", ): super().__init__(f"Request error {status}: {message}") class CondaNotFoundError(ShowyourworkException): def __init__(self): super().__init__( f"Conda package manager not found. Is it installed and available in the system PATH?" ) class ShowyourworkNotFoundError(ShowyourworkException): def __init__(self, path): super().__init__( f"The requested version of showyourwork was not found at {path}." ) class ConfigError(ShowyourworkException): pass class MissingFigureOutputError(ShowyourworkException): pass class MissingDependencyError(ShowyourworkException): pass class FigureGenerationError(ShowyourworkException): pass class ConfigError(ShowyourworkException): pass class MissingConfigFile(ShowyourworkException): pass class NotImplementedError(ShowyourworkException): pass class TarballExtractionError(ShowyourworkException): pass class MissingCondaEnvironmentInUserRule(ShowyourworkException): pass class RunDirectiveNotAllowedInUserRules(ShowyourworkException): def __init__(self, name): super().__init__( f"The `run` directive is not allowed in user-defined rules. " f"Please use `script` or `shell` instead in rule {name}." ) class CalledProcessError(ShowyourworkException): pass
21.657534
97
0.71537
140
1,581
7.85
0.492857
0.22748
0.245678
0.11647
0.083712
0
0
0
0
0
0
0
0.209994
1,581
72
98
21.958333
0.879904
0
0
0.340909
0
0
0.214421
0
0
0
0
0
0
1
0.090909
false
0.227273
0.022727
0
0.431818
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
1
0
0
0
0
0
3
a8fc954825cc770935a579719186567eddd9a42d
1,899
py
Python
tests/bugs/core_2361_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
tests/bugs/core_2361_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
tests/bugs/core_2361_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
#coding:utf-8 # # id: bugs.core_2361 # title: String truncation reading 8859-1 Spanish column using isc_dsql_fetch with UTF-8 connection.. # decription: # tracker_id: CORE-2361 # min_versions: [] # versions: 3.0 # qmid: None import pytest from firebird.qa import db_factory, isql_act, Action # version: 3.0 # resources: None substitutions_1 = [] init_script_1 = """create table "'Master by Reseller$'" ( "Tier" VARCHAR(20) CHARACTER SET ISO8859_1 COLLATE ES_ES_CI_AI ); commit; insert into "'Master by Reseller$'" ( "Tier" ) VALUES ('(blank)'); insert into "'Master by Reseller$'" ( "Tier" ) VALUES ('Approved'); insert into "'Master by Reseller$'" ( "Tier" ) VALUES ('Bronze'); insert into "'Master by Reseller$'" ( "Tier" ) VALUES ('DMR'); insert into "'Master by Reseller$'" ( "Tier" ) VALUES ('Domestic Distributor'); insert into "'Master by Reseller$'" ( "Tier" ) VALUES ('End-User'); insert into "'Master by Reseller$'" ( "Tier" ) VALUES ('Evaluation'); insert into "'Master by Reseller$'" ( "Tier" ) VALUES ('Gold'); insert into "'Master by Reseller$'" ( "Tier" ) VALUES ('New'); insert into "'Master by Reseller$'" ( "Tier" ) VALUES ('Silver'); insert into "'Master by Reseller$'" ( "Tier" ) VALUES ('VAM'); commit; """ db_1 = db_factory(page_size=4096, charset='ISO8859_1', sql_dialect=3, init=init_script_1) test_script_1 = """select case when 1 = 0 then '(blank)' else "'Master by Reseller$'"."Tier" end from "'Master by Reseller$'"; """ act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1) expected_stdout_1 = """ CASE ==================== (blank) Approved Bronze DMR Domestic Distributor End-User Evaluation Gold New Silver VAM """ @pytest.mark.version('>=3.0') def test_1(act_1: Action): act_1.expected_stdout = expected_stdout_1 act_1.execute() assert act_1.clean_expected_stdout == act_1.clean_stdout
27.128571
126
0.674039
262
1,899
4.721374
0.362595
0.090542
0.181083
0.210186
0.320129
0.320129
0.320129
0
0
0
0
0.035737
0.160084
1,899
69
127
27.521739
0.739812
0.14218
0
0.113636
0
0.022727
0.685838
0
0
0
0
0
0.022727
1
0.022727
false
0
0.045455
0
0.068182
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
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
d10e119827edf64c5992be98368eca488d789d1c
263
py
Python
users/tokens.py
maks-nurgazy/diploma-project
66889488ffaa0269e1be2df6f6c76a3ca68a3cfb
[ "MIT" ]
null
null
null
users/tokens.py
maks-nurgazy/diploma-project
66889488ffaa0269e1be2df6f6c76a3ca68a3cfb
[ "MIT" ]
null
null
null
users/tokens.py
maks-nurgazy/diploma-project
66889488ffaa0269e1be2df6f6c76a3ca68a3cfb
[ "MIT" ]
null
null
null
from rest_framework_simplejwt.tokens import RefreshToken def get_jwt_tokens_for_user(user, **kwargs): """ Generates a refresh token for the valid user """ refresh = RefreshToken.for_user(user) return str(refresh), str(refresh.access_token)
23.909091
56
0.737643
35
263
5.314286
0.628571
0.075269
0.11828
0
0
0
0
0
0
0
0
0
0.174905
263
10
57
26.3
0.857143
0.1673
0
0
1
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
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
d1208d36f83d1a05d8b97f40944b08d56a4cd522
338
py
Python
backend/api/routes/__init__.py
senavs/todo-list
6476805583d0edbb9df85111cfc799a2144e2c54
[ "Apache-2.0" ]
null
null
null
backend/api/routes/__init__.py
senavs/todo-list
6476805583d0edbb9df85111cfc799a2144e2c54
[ "Apache-2.0" ]
null
null
null
backend/api/routes/__init__.py
senavs/todo-list
6476805583d0edbb9df85111cfc799a2144e2c54
[ "Apache-2.0" ]
null
null
null
from fastapi import APIRouter from . import auth, index, list, task router = APIRouter() router.include_router(index.router) router.include_router(auth.router, prefix='/auth', tags=['Authenticate']) router.include_router(list.router, prefix='/lists', tags=['Lists']) router.include_router(task.router, prefix='/lists', tags=['Tasks'])
30.727273
73
0.754438
44
338
5.704545
0.340909
0.207171
0.302789
0.167331
0
0
0
0
0
0
0
0
0.079882
338
10
74
33.8
0.807074
0
0
0
0
0
0.115385
0
0
0
0
0
0
1
0
false
0
0.285714
0
0.285714
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
d129876e7873140e41030905edf7719f9275b25b
430
py
Python
src/bpmn_python/graph/classes/events/start_event_type.py
ToJestKrzysio/ProcessVisualization
9a359a31816bf1be65e3684a571509e3a2c2c0ac
[ "MIT" ]
null
null
null
src/bpmn_python/graph/classes/events/start_event_type.py
ToJestKrzysio/ProcessVisualization
9a359a31816bf1be65e3684a571509e3a2c2c0ac
[ "MIT" ]
null
null
null
src/bpmn_python/graph/classes/events/start_event_type.py
ToJestKrzysio/ProcessVisualization
9a359a31816bf1be65e3684a571509e3a2c2c0ac
[ "MIT" ]
null
null
null
# coding=utf-8 """ Class used for representing tStartEvent of BPMN 2.0 graph """ import graph.classes.events.catch_event_type as catch_event class StartEvent(catch_event.CatchEvent): """ Class used for representing tStartEvent of BPMN 2.0 graph """ def __init__(self): """ Default constructor, initializes object fields with new instances. """ super(StartEvent, self).__init__()
23.888889
74
0.683721
53
430
5.320755
0.641509
0.106383
0.085106
0.170213
0.340426
0.340426
0.340426
0.340426
0.340426
0.340426
0
0.014925
0.22093
430
17
75
25.294118
0.826866
0.455814
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
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
d16ceb896d9da20d75ec5f24a103e4ea1f377294
187
py
Python
BOJ/14000~14999/14471.py
shinkeonkim/today-ps
f3e5e38c5215f19579bb0422f303a9c18c626afa
[ "Apache-2.0" ]
2
2020-01-29T06:54:41.000Z
2021-11-07T13:23:27.000Z
BOJ/14000~14999/14471.py
shinkeonkim/Today_PS
bb0cda0ee1b9c57e1cfa38355e29d0f1c6167a44
[ "Apache-2.0" ]
null
null
null
BOJ/14000~14999/14471.py
shinkeonkim/Today_PS
bb0cda0ee1b9c57e1cfa38355e29d0f1c6167a44
[ "Apache-2.0" ]
null
null
null
n,m=map(int,input().split()) L = [list(map(int,input().split())) for i in range(m)] ans = 0 L.sort(key = lambda t:t[0],reverse = True) for i in L[:-1]: ans += max(0,n-i[0]) print(ans)
26.714286
54
0.582888
41
187
2.658537
0.560976
0.110092
0.201835
0.293578
0
0
0
0
0
0
0
0.031447
0.149733
187
7
55
26.714286
0.654088
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.142857
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
d16d1cb99b4e9f346c6042010a46e200ea4ee6ee
343
py
Python
libra/discovery_set.py
Xing-Huang/libra-client
bf74bc66b98a279476d751b637b1f84da84a51fe
[ "MIT" ]
null
null
null
libra/discovery_set.py
Xing-Huang/libra-client
bf74bc66b98a279476d751b637b1f84da84a51fe
[ "MIT" ]
null
null
null
libra/discovery_set.py
Xing-Huang/libra-client
bf74bc66b98a279476d751b637b1f84da84a51fe
[ "MIT" ]
null
null
null
from canoser import Struct from libra.account_config import AccountConfig from libra.event import EventKey class DiscoverySet(Struct): _fields = [] DISCOVERY_SET_STRUCT_NAME = "DiscoverySet" @classmethod def change_event_key(cls): return EventKey.new_from_address(AccountConfig.discovery_set_address(), 2)
28.583333
82
0.752187
40
343
6.175
0.625
0.072874
0
0
0
0
0
0
0
0
0
0.003571
0.183673
343
12
82
28.583333
0.878571
0
0
0
0
0
0.036036
0
0
0
0
0
0
1
0.111111
false
0
0.333333
0.111111
0.888889
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
0
0
1
1
1
0
0
3
0f0041c3812a531ebd6ee9156ded1a3d042762da
11,015
py
Python
modules/bot_oc.py
opencitations/telegrambot
7a74893bb0a7a85d5db04045832d7b2c676bff48
[ "MIT" ]
1
2021-07-18T02:48:40.000Z
2021-07-18T02:48:40.000Z
modules/bot_oc.py
opencitations/telegrambot
7a74893bb0a7a85d5db04045832d7b2c676bff48
[ "MIT" ]
null
null
null
modules/bot_oc.py
opencitations/telegrambot
7a74893bb0a7a85d5db04045832d7b2c676bff48
[ "MIT" ]
null
null
null
my_commands = { "/contact" : {"notes":" Retrieve all the accounts (email, Twitter, GitHub, etc.) to contact the OpenCitations folks", 'parse_mode':'Markdown'}, "/ask" : {"notes":"Params: <DOI>. Retrieve information about the entity identified by the input DOI (source: COCI)", 'parse_mode':'Markdown'}, "/citations" : {"notes":"Params: <DOI>. Retrieve all the entities that cite the one identified by the input DOI (source: COCI)", 'parse_mode':'Markdown'}, "/references" : {"notes":"Params: <DOI>. Retrieve all the entities that are cited by the one identified by the input DOI (source: COCI)", 'parse_mode':'Markdown'}, } def get_my_commands(): return my_commands def exec_my_commands(command,param): if command == "/contact": return how_to_contact_you(param) if command == "/ask": return ask_coci(param) if command == "/citations": return who_cite_me_in_coci(param) if command == "/references": return what_are_my_ref_in_coci(param) #ADD all the methods you want to use #################################### import csv import urllib.request import json import re contact = { 'Website':'http://opencitations.net/', 'Email':'contact@opencitations.net', 'Twitter':'https://twitter.com/opencitations', 'Github': 'https://github.com/essepuntato/opencitations', 'Wordpress': 'https://opencitations.wordpress.com/' } def how_to_contact_you(a_text): str_to_return = "" for c in contact: str_to_return = str_to_return + "\n*"+c+"*: "+contact[c] return str_to_return #'http://opencitations.net/index/coci/api/v1/metadata/10.1108/jd-12-2013-0166' def ask_coci(a_text): str_to_return = "" try: a_text = a_text[0] except: return "You must text me a *DOI* !" find_list = re.findall(r"(10.\d{4,9}\/\S*)",a_text) if len(find_list) == 0: return "Please, text me a correct *DOI format*" res = find_list[0] api_call = 'http://opencitations.net/index/coci/api/v1/metadata/' input = res api_call = api_call+input+'?json=array(";%20",author).dict(",%20",author,fn,gn,orcid)' #call API try: contents = urllib.request.urlopen(api_call).read().decode('utf-8') json_output = json.loads(contents) if len(json_output) == 0: return "No data found for: *"+ input+"*" else: rc_data = json_output[0] #Title str_title = "\n\n*Title:* "+rc_data['title'] if str_title != "\n\n*Title:* ": str_to_return = str_to_return + str_title #Authors str_authors = "\n\n*Author(s):* " for an_author in rc_data['author']: an_author_str = "" if 'fn' in an_author: an_author_str = an_author_str + str(an_author['fn']) if 'gn' in an_author: an_author_str = an_author_str+", "+str(an_author['gn']) if 'orcid' in an_author: an_author_str = an_author_str + " "+"https://orcid.org/"+str(an_author['orcid']) if an_author_str != "": str_authors = str_authors + '\n' + an_author_str if str_authors != "\n\n*Author(s):* ": str_to_return = str_to_return + str_authors #list_authors = rc_data['author'].split('; ') #for an_author in list_authors: # str_authors = str_authors + "\n" + str(an_author) #if str_authors != "\n\nAuthor(s): ": # str_to_return = str_to_return + str_authors #Publication year str_year = "\n\n*Publication year:* " + rc_data['year'] if str_year != "\n\n*Publication year:* ": str_to_return = str_to_return + str_year #DOI str_to_return = str_to_return + "\n\n*DOI:* "+'https://www.doi.org/'+input #OA URL str_cit = "\n\n*OA URL:* "+rc_data['oa_link'] if str_cit != "\n\n*OA URL:* ": str_to_return = str_to_return + str_cit #Citations str_cit = "\n\n*Cited by:* "+rc_data['citation_count'] if str_cit != "\n\n*Cited by:* ": str_to_return = str_to_return + str_cit except: return "Sorry, the connection went wrong!" return str_to_return def who_cite_me_in_coci(a_text): str_to_return = "" try: a_text = a_text[0] except: return "You must text me a *DOI* !" find_list = re.findall(r"(10.\d{4,9}\/\S*)",a_text) if len(find_list) == 0: return "Please, text me a correct *DOI format*" res = find_list[0] api_call = 'http://opencitations.net/index/coci/api/v1/citations/' input = res api_call = api_call+input #call API try: contents = urllib.request.urlopen(api_call).read().decode('utf-8') json_output = json.loads(contents) if len(json_output) == 0: return "No citations found for: *"+ input+"*" else: str_to_return = str_to_return + "\n- *Cited by:* "+str(len(json_output))+ "\n\n" for c_elem in json_output: #OCI #str_to_return = str_to_return + "\n- *OCI:* "+"["+str(c_elem['oci'])+"]"+"(http://opencitations.net/index/coci/browser/ci/"+str(c_elem['oci'])+")" #DOI #str_to_return = str_to_return + "\n- *Citing DOI:* "+'https://www.doi.org/'+c_elem['citing'] #WITH tinyurl for OCI str_to_return = str_to_return + '\n['+c_elem['citing']+'](https://www.doi.org/'+c_elem['citing']+')' #lucinda_link = 'http://opencitations.net/index/coci/browser/ci/'+str(c_elem['oci']) #tiny_url = urllib.request.urlopen('http://tinyurl.com/api-create.php?url='+lucinda_link).read().decode('utf-8') #str_to_return = str_to_return + "\n["+c_elem['citing']+"]("+str(tiny_url)+")" #Citation Creation date #creation_str = "" #list_date = c_elem['creation'].split("-") #if len(list_date) > 0: # creation_str = str(list_date[0]) # if len(list_date) > 1: # creation_str = get_month_name(str(list_date[1])) +" "+ creation_str # if len(list_date) > 2: # creation_str = str(int(list_date[2])) + " "+ creation_str #if creation_str != "": # str_to_return = str_to_return + "\n- *Citation creation date:* "+creation_str #Timespan #tspan_str = "" #result_y = re.search(r"(\d{1,})Y",c_elem['timespan']) #if result_y: # tspan_str += str(result_y.groups(0)[0]) + " Years" # result_y = re.search(r"(\d{1,})M",c_elem['timespan']) # if result_y: # tspan_str += ", "+str(result_y.groups(0)[0]) + " Months" # result_y = re.search(r"(\d{1,})D",c_elem['timespan']) # if result_y: # tspan_str += ", "+str(result_y.groups(0)[0]) + " Days" #if tspan_str != "": # str_to_return = str_to_return + "\n- *Timespan:* "+tspan_str ##New item #str_to_return = str_to_return + "\n\n" #str_to_return = str_to_return + "\n" except: return "Sorry, the connection went wrong!" return str_to_return def what_are_my_ref_in_coci(a_text): str_to_return = "" try: a_text = a_text[0] except: return "You must text me a *DOI* !" find_list = re.findall(r"(10.\d{4,9}\/\S*)",a_text) if len(find_list) == 0: return "Please, text me a correct *DOI format*" res = find_list[0] api_call = 'http://opencitations.net/index/coci/api/v1/references/' input = res api_call = api_call+input #call API try: contents = urllib.request.urlopen(api_call).read().decode('utf-8') json_output = json.loads(contents) if len(json_output) == 0: return "No references found for: *"+ input + "*" else: str_to_return = str_to_return + "\n- *References:* "+str(len(json_output))+ "\n\n" for c_elem in json_output: #OCI #str_to_return = str_to_return + "\n- *OCI:* "+"["+str(c_elem['oci'])+"]"+"(http://opencitations.net/index/coci/browser/ci/"+str(c_elem['oci'])+")" #DOI #str_to_return = str_to_return + "\n- *Cited DOI:* "+'https://www.doi.org/'+c_elem['cited'] str_to_return = str_to_return + '\n['+c_elem['cited']+'](https://www.doi.org/'+c_elem['cited']+')' #WITH tinyurl for OCI #lucinda_link = 'http://opencitations.net/index/coci/browser/ci/'+str(c_elem['oci']) #tiny_url = urllib.request.urlopen('http://tinyurl.com/api-create.php?url='+lucinda_link).read().decode('utf-8') #str_to_return = str_to_return + "\n["+c_elem['cited']+"]("+str(tiny_url)+")" #Citation Creation date #creation_str = "" #list_date = c_elem['creation'].split("-") #if len(list_date) > 0: # creation_str = str(list_date[0]) # if len(list_date) > 1: # creation_str = get_month_name(str(list_date[1])) +" "+ creation_str # if len(list_date) > 2: # creation_str = str(int(list_date[2])) + " "+ creation_str #if creation_str != "": # str_to_return = str_to_return + "\n- *Citation creation date:* "+creation_str #Timespan #tspan_str = "" #result_y = re.search(r"(\d{1,})Y",c_elem['timespan']) #if result_y: # tspan_str += str(result_y.groups(0)[0]) + " Years" # result_y = re.search(r"(\d{1,})M",c_elem['timespan']) # if result_y: # tspan_str += ", "+str(result_y.groups(0)[0]) + " Months" # result_y = re.search(r"(\d{1,})D",c_elem['timespan']) # if result_y: # tspan_str += ", "+str(result_y.groups(0)[0]) + " Days" #if tspan_str != "": # str_to_return = str_to_return + "\n- *Timespan:* "+tspan_str ##New item #str_to_return = str_to_return + "\n\n" except: return "Sorry, the connection went wrong!" return str_to_return def get_month_name(month_num): monthDict={'01':'Jan', '02':'Feb', '03':'Mar', '04':'Apr', '05':'May', '06':'Jun', '07':'Jul', '08':'Aug', '09':'Sep', '10':'Oct', '11':'Nov', '12':'Dec'} return monthDict[month_num]
39.90942
167
0.535361
1,430
11,015
3.874825
0.136364
0.052337
0.115142
0.078325
0.765385
0.741382
0.710522
0.673886
0.628767
0.611081
0
0.014072
0.303223
11,015
275
168
40.054545
0.707883
0.316387
0
0.459259
0
0.022222
0.250878
0.011207
0
0
0
0
0
1
0.051852
false
0
0.02963
0.007407
0.244444
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
0f2b82918b30990906c8cf384315c56b06dde564
80
py
Python
release/stubs.min/Tekla/Structures/ModelInternal_parts/AreWeUnitTesting.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
release/stubs.min/Tekla/Structures/ModelInternal_parts/AreWeUnitTesting.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
release/stubs.min/Tekla/Structures/ModelInternal_parts/AreWeUnitTesting.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
class AreWeUnitTesting(object): # no doc Value = False __all__ = []
16
31
0.6125
8
80
5.625
1
0
0
0
0
0
0
0
0
0
0
0
0.2875
80
4
32
20
0.789474
0.075
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
3
0f2cb2735a3c9b7ea7019b251686b0875798e3d0
64
py
Python
flattenator/__init__.py
lsst-sqre/flattenator
297c92a1b075653ca37c200c0ddc8d46d1b64975
[ "MIT" ]
null
null
null
flattenator/__init__.py
lsst-sqre/flattenator
297c92a1b075653ca37c200c0ddc8d46d1b64975
[ "MIT" ]
null
null
null
flattenator/__init__.py
lsst-sqre/flattenator
297c92a1b075653ca37c200c0ddc8d46d1b64975
[ "MIT" ]
null
null
null
from .flattenator import Flattenator __all__ = ["Flattenator"]
16
36
0.78125
6
64
7.666667
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.125
64
3
37
21.333333
0.821429
0
0
0
0
0
0.171875
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
0f2feac9a2affe9de90859ee84f6a37f704d944b
58
py
Python
tests/constants.py
hairygeek/yt_lib
3de4ba980cd26312e9211930d4424267803fc6df
[ "MIT" ]
4
2019-08-12T12:40:48.000Z
2020-04-20T20:00:03.000Z
tests/constants.py
hairygeek/yt_lib
3de4ba980cd26312e9211930d4424267803fc6df
[ "MIT" ]
null
null
null
tests/constants.py
hairygeek/yt_lib
3de4ba980cd26312e9211930d4424267803fc6df
[ "MIT" ]
null
null
null
CJ_PATH = r'' COOKIES_PATH = r'' CHAN_ID = '' VID_ID = ''
11.6
18
0.586207
10
58
3
0.7
0.333333
0
0
0
0
0
0
0
0
0
0
0.206897
58
4
19
14.5
0.652174
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
0f3b73e98465b8b1b4c9ad2d85ba8b9865ebbc38
653
py
Python
pybwap/__init__.py
NQysit/pybwap
f95af52ed756f0a18eb32cd2b3917f7f66848a9d
[ "MIT" ]
null
null
null
pybwap/__init__.py
NQysit/pybwap
f95af52ed756f0a18eb32cd2b3917f7f66848a9d
[ "MIT" ]
null
null
null
pybwap/__init__.py
NQysit/pybwap
f95af52ed756f0a18eb32cd2b3917f7f66848a9d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os from flask import Flask, render_template, send_from_directory app = Flask(__name__) app.config.from_object('config.DevelopmentConfig') from .main import main_blueprint app.register_blueprint(main_blueprint) from .ch_0x00 import ch_0x00_blueprint app.register_blueprint(ch_0x00_blueprint) from .xss_0x01 import xss_0x01_blueprint app.register_blueprint(xss_0x01_blueprint) @app.route('/static/<folder>/<name>') def serve(folder, name): ''' Only for developing purpose ''' dirname = os.path.dirname(__file__) return send_from_directory(os.path.join(dirname, 'static', folder), filename=name)
23.321429
86
0.767228
89
653
5.303371
0.426966
0.101695
0.127119
0.184322
0
0
0
0
0
0
0
0.033101
0.12098
653
27
87
24.185185
0.789199
0.07657
0
0
0
0
0.090444
0.080205
0
0
0
0
0
1
0.071429
false
0
0.357143
0
0.5
0.428571
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
1
0
0
1
0
3
0f51ec37186fd8a1db6bbc54e44a5583d0b59c2f
426
py
Python
batch.py
SergioLaRosa/downloaderdude
7f3fea4d5019d199b1ae2f5a62c66a4550321e67
[ "MIT" ]
null
null
null
batch.py
SergioLaRosa/downloaderdude
7f3fea4d5019d199b1ae2f5a62c66a4550321e67
[ "MIT" ]
null
null
null
batch.py
SergioLaRosa/downloaderdude
7f3fea4d5019d199b1ae2f5a62c66a4550321e67
[ "MIT" ]
null
null
null
# URLs processed simultaneously class Batch(): def __init__(self): self._batch = 0 def set_batch(self, n_batch): try: self._batch = n_batch except BaseException: print("[ERROR] Can't set task batch number.") def get_batch(self): try: return self._batch except BaseException: print("[ERROR] Can't get task batch number.")
21.3
57
0.570423
50
426
4.64
0.44
0.116379
0.206897
0.25
0.327586
0.327586
0.327586
0
0
0
0
0.003546
0.338028
426
19
58
22.421053
0.819149
0.068075
0
0.307692
0
0
0.182278
0
0
0
0
0
0
1
0.230769
false
0
0
0
0.384615
0.153846
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
3
0f559b826d34c24f7992bcda817728b961f99017
17,662
py
Python
common/updatefiles.py
cheersalam/webrtc
29e9cad470e6f8a95e2fc32bc111c8550c2ef0ca
[ "BSD-3-Clause" ]
null
null
null
common/updatefiles.py
cheersalam/webrtc
29e9cad470e6f8a95e2fc32bc111c8550c2ef0ca
[ "BSD-3-Clause" ]
null
null
null
common/updatefiles.py
cheersalam/webrtc
29e9cad470e6f8a95e2fc32bc111c8550c2ef0ca
[ "BSD-3-Clause" ]
null
null
null
playerFilesWin = { "lib/avcodec-56.dll" : { "flag_deps" : True, "should_be_removed" : True }, "lib/avformat-56.dll" : { "flag_deps" : True, "should_be_removed" : True }, "lib/avutil-54.dll" : { "flag_deps" : True, "should_be_removed" : True }, "lib/swscale-3.dll" : { "flag_deps" : True, "should_be_removed" : True }, "lib/gen_files_list.py" : { "flag_deps" : True, "should_be_removed" : True }, "lib/crashrpt_lang.ini" : { "flag_deps" : True, "should_be_removed" : True }, "lib/CrashSender.exe" : { "flag_deps" : True, "should_be_removed" : True }, "lib/avcodec-57.dll" : { "flag_deps" : True, "should_be_removed" : True }, "lib/avformat-57.dll" : { "flag_deps" : True, "should_be_removed" : True }, "lib/avutil-55.dll" : { "flag_deps" : True, "should_be_removed" : True }, "lib/swscale-4.dll" : { "flag_deps" : True, "should_be_removed" : True }, "lib/avcodec-58.dll" : { "flag_deps" : True}, "lib/avformat-58.dll" : { "flag_deps" : True}, "lib/avutil-56.dll" : { "flag_deps" : True}, "lib/swscale-5.dll" : { "flag_deps" : True}, "lib/cef.pak" : { "flag_deps" : True }, "lib/cef_100_percent.pak" : { "flag_deps" : True }, "lib/cef_200_percent.pak" : { "flag_deps" : True }, "lib/cef_extensions.pak" : { "flag_deps" : True }, "lib/chrome_elf.dll" : { "flag_deps" : True }, "lib/d3dcompiler_43.dll" : { "flag_deps" : True }, "lib/d3dcompiler_47.dll" : { "flag_deps" : True }, "lib/devtools_resources.pak" : { "flag_deps" : True }, "lib/icudtl.dat" : { "flag_deps" : True }, "lib/libcef.dll" : { "flag_deps" : True }, "lib/libEGL.dll" : { "flag_deps" : True }, "lib/libGLESv2.dll" : { "flag_deps" : True }, "lib/libGLESv1_CM.dll" : { "flag_deps" : True }, "lib/angle_util.dll" : { "flag_deps" : True }, "lib/natives_blob.bin" : { "flag_deps" : True }, "lib/snapshot_blob.bin" : { "flag_deps" : True }, "lib/v8_context_snapshot.bin" : { "flag_deps" : True }, "lib/widevinecdmadapter.dll" : { "flag_deps" : True, "should_be_removed" : True}, "lib/images/sample_app.png" : { "flag_deps" : True, "should_be_removed" : True}, "lib/locales/am.pak" : { "flag_deps" : True }, "lib/locales/ar.pak" : { "flag_deps" : True }, "lib/locales/bg.pak" : { "flag_deps" : True }, "lib/locales/bn.pak" : { "flag_deps" : True }, "lib/locales/ca.pak" : { "flag_deps" : True }, "lib/locales/cs.pak" : { "flag_deps" : True }, "lib/locales/da.pak" : { "flag_deps" : True }, "lib/locales/de.pak" : { "flag_deps" : True }, "lib/locales/el.pak" : { "flag_deps" : True }, "lib/locales/en-GB.pak" : { "flag_deps" : True }, "lib/locales/en-US.pak" : { "flag_deps" : True }, "lib/locales/es-419.pak" : { "flag_deps" : True }, "lib/locales/es.pak" : { "flag_deps" : True }, "lib/locales/et.pak" : { "flag_deps" : True }, "lib/locales/fa.pak" : { "flag_deps" : True }, "lib/locales/fi.pak" : { "flag_deps" : True }, "lib/locales/fil.pak" : { "flag_deps" : True }, "lib/locales/fr.pak" : { "flag_deps" : True }, "lib/locales/gu.pak" : { "flag_deps" : True }, "lib/locales/he.pak" : { "flag_deps" : True }, "lib/locales/hi.pak" : { "flag_deps" : True }, "lib/locales/hr.pak" : { "flag_deps" : True }, "lib/locales/hu.pak" : { "flag_deps" : True }, "lib/locales/id.pak" : { "flag_deps" : True }, "lib/locales/it.pak" : { "flag_deps" : True }, "lib/locales/ja.pak" : { "flag_deps" : True }, "lib/locales/kn.pak" : { "flag_deps" : True }, "lib/locales/ko.pak" : { "flag_deps" : True }, "lib/locales/lt.pak" : { "flag_deps" : True }, "lib/locales/lv.pak" : { "flag_deps" : True }, "lib/locales/ml.pak" : { "flag_deps" : True }, "lib/locales/mr.pak" : { "flag_deps" : True }, "lib/locales/ms.pak" : { "flag_deps" : True }, "lib/locales/nb.pak" : { "flag_deps" : True }, "lib/locales/nl.pak" : { "flag_deps" : True }, "lib/locales/pl.pak" : { "flag_deps" : True }, "lib/locales/pt-BR.pak" : { "flag_deps" : True }, "lib/locales/pt-PT.pak" : { "flag_deps" : True }, "lib/locales/ro.pak" : { "flag_deps" : True }, "lib/locales/ru.pak" : { "flag_deps" : True }, "lib/locales/sk.pak" : { "flag_deps" : True }, "lib/locales/sl.pak" : { "flag_deps" : True }, "lib/locales/sr.pak" : { "flag_deps" : True }, "lib/locales/sv.pak" : { "flag_deps" : True }, "lib/locales/sw.pak" : { "flag_deps" : True }, "lib/locales/ta.pak" : { "flag_deps" : True }, "lib/locales/te.pak" : { "flag_deps" : True }, "lib/locales/th.pak" : { "flag_deps" : True }, "lib/locales/tr.pak" : { "flag_deps" : True }, "lib/locales/uk.pak" : { "flag_deps" : True }, "lib/locales/vi.pak" : { "flag_deps" : True }, "lib/locales/zh-CN.pak" : { "flag_deps" : True }, "lib/locales/zh-TW.pak" : { "flag_deps" : True }, # "lib/localhost.pack" : {}, "lib/u2ec.dll" : { "should_be_removed" : True }, "lib/collector.dll" : { "should_be_removed" : True }, "lib/logging.dll" : {}, "lib/rtspclient.dll" : { "should_be_removed" : True }, "lib/crash_reporter.cfg" : {}, "lib/benchmark.data" : { "should_be_removed" : True }, "lib/background.ts" : { "should_be_removed" : True }, "lib/benchmark_fullhd_hi.data" : {}, "lib/benchmark_fullhd_low.data" : { "should_be_removed" : True }, "lib/benchmark_hdready_hi.data" : {}, "lib/benchmark_hdready_low.data" : { "should_be_removed" : True }, "lib/config.ini" : { "may_be_modified" : True, "may_be_removed" : True }, "quickreset.exe" : { "should_be_removed" : True }, "lib/LiquidSkyHelper.exe" : { "should_be_removed" : True }, "lib/lang_en.ini" : { "should_be_removed" : True }, "lib/render-cef.dll" : { "should_be_removed" : True }, "lib/player-cef.dll" : { "should_be_removed" : True }, "lib/render-cuda.dll" : { "should_be_removed" : True }, "lib/render-ffmpeg.dll" : {}, "lib/render-ffmpeg-hw.dll" : { "should_be_removed" : True}, "lib/usb_driver.exe" : { "should_be_removed" : True }, #default liquidsky version "LiquidSkyClient.exe" : {}, "lib/LiquidSky.exe" : {}, "lib/usb_driver.msi" : { "should_be_removed" : True }, "lib/UsbHelper.exe" : { "should_be_removed" : True }, "lib/Vivien.exe" : { "should_be_removed" : True }, "VivienClient.exe" : { "should_be_removed" : True }, } #if you add any new file to verizon, please make sure that it is included to main list too playerFilesWinCast = { "lib/usb_driver.msi" : {}, "lib/UsbHelper.exe" : {}, "lib/Vivien.exe" : {}, "VivienClient.exe" : {}, "lib/LiquidSky.exe" : { "should_be_removed" : True }, "LiquidSkyClient.exe" : { "should_be_removed" : True }, "lib/localhost1.pack" : { "should_be_removed" : True }, "lib/localhost2.pack" : { "should_be_removed" : True }, "lib/localhost3.pack" : { "should_be_removed" : True }, "lib/localhost4.pack" : { "should_be_removed" : True }, } playerFilesMac = { "Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/am.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/ar.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/bg.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/bn.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/ca.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/cef.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/cef_100_percent.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/cef_200_percent.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/cef_extensions.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/cs.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/da.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/de.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/devtools_resources.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/el.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/en.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/en_GB.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/es.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/es_419.lproj/locale.pak": { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/et.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/fa.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/fi.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/fil.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/fr.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/gu.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/he.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/hi.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/hr.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/hu.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/icudtl.dat" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/id.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/Info.plist" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/it.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/ja.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/kn.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/ko.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/lt.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/lv.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/ml.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/mr.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/ms.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/natives_blob.bin" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/nb.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/nl.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/pl.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/pt_BR.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/pt_PT.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/ro.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/ru.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/sk.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/sl.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/snapshot_blob.bin" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/sr.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/sv.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/sw.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/ta.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/te.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/th.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/tr.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/uk.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/vi.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/zh_CN.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/Chromium Embedded Framework.framework/Resources/zh_TW.lproj/locale.pak" : { "access_mode" : "644" }, "Frameworks/LiquidSky Helper.app/Contents/Info.plist" : { "access_mode" : "644" }, "Frameworks/LiquidSky Helper.app/Contents/MacOS/LiquidSky Helper" : { "access_mode" : "755" }, "Info.plist" : { "access_mode" : "644" }, "MacOS/libavcodec.dylib" : { "access_mode" : "644" }, "MacOS/libavformat.dylib" : { "access_mode" : "644" }, "MacOS/libavutil.dylib" : { "access_mode" : "644" }, "MacOS/libcollector.dylib" : { "access_mode" : "644", "should_be_removed" : True }, "MacOS/liblogging.dylib" : { "access_mode" : "644" }, "MacOS/libplayer-cef.dylib" : { "access_mode" : "644" }, "MacOS/librender-ffmpeg-hw.dylib" : { "access_mode" : "644" }, "MacOS/librender-ffmpeg.dylib" : { "access_mode" : "644" }, "MacOS/librtspclient.dylib" : { "access_mode" : "644" }, "MacOS/libswscale.dylib" : { "access_mode" : "644" }, "MacOS/LiquidSky" : { "access_mode" : "755", "should_be_removed" : True }, "MacOS/liquidsky-client" : { "access_mode" : "755" }, "Resources/background.ts" : { "access_mode" : "644", "should_be_removed" : True }, "Resources/benchmark_fullhd_hi.data" : { "access_mode" : "644", "should_be_removed" : True }, "Resources/benchmark_hdready_hi.data" : { "access_mode" : "644", "should_be_removed" : True }, "Resources/lang_en.ini" : { "access_mode" : "644" }, "Resources/liquidsky.icns" : { "access_mode" : "644" }, "Resources/localhost.pack" : { "access_mode" : "644" }, } streamerFilesWin = { "avcodec-57.dll" : { "should_be_removed" : True }, "avformat-57.dll" : { "should_be_removed" : True }, "avutil-55.dll" : { "should_be_removed" : True }, "swscale-4.dll" : { "should_be_removed" : True }, "avcodec-58.dll" : {}, "avformat-58.dll" : {}, "avutil-56.dll" : {}, "swscale-5.dll" : {}, "crashrpt_lang.ini" : {}, "CrashSender.exe" : {}, "osk-monitor.exe" : {}, "osk.exe" : {}, "sky.cfg" : { "may_be_modified" : True, "may_be_removed" : True }, "streamer-service.exe" : {}, "streamer-updater.exe" : { "should_be_removed" : True }, "update-executor.exe" : {}, "streamer.exe" : { "should_be_removed" : True }, "SkyBeam.exe" : {}, "storagetool.exe" : {}, "setuptool.exe" : {}, "vmhelper.dll" : {}, "logging.dll" : {}, "changelang.exe" : {}, "app-sender.exe" : {}, "process-monitor.exe" : {}, "webrtc-lib.dll" : {}, "lsfb.exe" : {}, } streamerFilesWinCast = { "usb-service.exe" : {}, } branchIniDisabled = { "lib/branch.ini" : { "should_be_removed" : True }, } branchIniEnabled = { "lib/branch.ini" : {}, } targets = { "player-win" : { "files" : playerFilesWin, "path" : ["buildproject", "player"], "brands" : { "cast" : playerFilesWinCast }, }, "player-mac" : { "files" : playerFilesMac, "path" : ["buildproject", "LiquidSky.app", "Contents"], "brands" : {}, }, "streamer-win" : { "files" : streamerFilesWin, "path" : ["buildproject", "streamer"], "brands" : { "cast" : streamerFilesWinCast }, }, }
60.486301
154
0.630563
2,052
17,662
5.266082
0.113548
0.069313
0.096613
0.102721
0.806034
0.739126
0.581714
0.531279
0.506663
0.468166
0
0.022157
0.18486
17,662
291
155
60.694158
0.728416
0.007927
0
0
0
0
0.652343
0.242553
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
0f854456a91aac536aec2fb17db51a2f8344e01c
74
py
Python
augur/metrics/platform/routes.py
Nayan-Das/augur
857f4a4e7d688fd54356aa0f546834071fbabbf2
[ "MIT" ]
1
2020-02-28T18:51:43.000Z
2020-02-28T18:51:43.000Z
augur/metrics/platform/routes.py
Nayan-Das/augur
857f4a4e7d688fd54356aa0f546834071fbabbf2
[ "MIT" ]
1
2021-06-02T00:58:41.000Z
2021-06-02T00:58:41.000Z
augur/metrics/platform/routes.py
Nayan-Das/augur
857f4a4e7d688fd54356aa0f546834071fbabbf2
[ "MIT" ]
null
null
null
def create_platform_routes(server): metrics = server._augur.metrics
14.8
35
0.77027
9
74
6
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.148649
74
4
36
18.5
0.857143
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
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
1
0
0
0
0
0
0
0
3
0f87054df9c74ee2c34ad2435d0071591357f748
93
py
Python
dynamic_databases/__init__.py
sligodave/dynamic_databases
8bb85d59ef5ad6b0176b192a82ec457fb00601c5
[ "MIT" ]
4
2017-05-14T23:45:42.000Z
2020-12-21T06:33:15.000Z
dynamic_databases/__init__.py
sligodave/dynamic_databases
8bb85d59ef5ad6b0176b192a82ec457fb00601c5
[ "MIT" ]
2
2017-05-14T22:47:40.000Z
2018-04-19T11:01:29.000Z
dynamic_databases/__init__.py
sligodave/dynamic_databases
8bb85d59ef5ad6b0176b192a82ec457fb00601c5
[ "MIT" ]
3
2017-05-26T22:42:25.000Z
2021-10-21T01:14:23.000Z
__version__ = '0.1.7' default_app_config = 'dynamic_databases.apps.DynamicDatabasesConfig'
18.6
68
0.806452
11
93
6.181818
1
0
0
0
0
0
0
0
0
0
0
0.035294
0.086022
93
4
69
23.25
0.764706
0
0
0
0
0
0.543478
0.48913
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
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
0f90448ac74fa457d3c66dd70e9a31f1a0170da1
59
py
Python
ditto/flickr/__init__.py
garrettc/django-ditto
fcf15beb8f9b4d61634efd4a88064df12ee16a6f
[ "MIT" ]
54
2016-08-15T17:32:41.000Z
2022-02-27T03:32:05.000Z
ditto/flickr/__init__.py
garrettc/django-ditto
fcf15beb8f9b4d61634efd4a88064df12ee16a6f
[ "MIT" ]
229
2015-07-23T12:50:47.000Z
2022-03-24T10:33:20.000Z
ditto/flickr/__init__.py
garrettc/django-ditto
fcf15beb8f9b4d61634efd4a88064df12ee16a6f
[ "MIT" ]
8
2015-09-10T17:10:35.000Z
2022-03-25T13:05:01.000Z
default_app_config = "ditto.flickr.apps.DittoFlickrConfig"
29.5
58
0.847458
7
59
6.857143
1
0
0
0
0
0
0
0
0
0
0
0
0.050847
59
1
59
59
0.857143
0
0
0
0
0
0.59322
0.59322
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
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
7e13e1f7cd0f8dfc86c33515f8eed65171e22242
612
py
Python
pymitblod/gender.py
slimcdk/pymitblod
8bae9401abec73e53a0687a5429b215722076b39
[ "Apache-2.0" ]
null
null
null
pymitblod/gender.py
slimcdk/pymitblod
8bae9401abec73e53a0687a5429b215722076b39
[ "Apache-2.0" ]
null
null
null
pymitblod/gender.py
slimcdk/pymitblod
8bae9401abec73e53a0687a5429b215722076b39
[ "Apache-2.0" ]
null
null
null
''' All model classes for pymitblod ''' from __future__ import annotations from typing import Callable class Gender(): ''' Class representing an institution. ''' def __init__( self, id:int, name:str, blood_volume_ml_lambda:Callable[[float, float, float], float], ): self._id = id self._name = name self._blood_volume_ml_lambda = blood_volume_ml_lambda def __repr__(self) -> str: return str(self._name) def blood_volume_ml_lambda(self) -> Callable: return self._blood_volume_ml_lambda
20.4
74
0.616013
71
612
4.859155
0.422535
0.15942
0.188406
0.275362
0.133333
0
0
0
0
0
0
0
0.297386
612
29
75
21.103448
0.802326
0.107843
0
0
0
0
0
0
0
0
0
0
0
1
0.1875
false
0
0.125
0.125
0.5
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
0
0
0
3
7e18044f5ac21085211914b4557e38ac75f7285e
278
py
Python
tests/context.py
eyal0/lcovparse
3c29ef50870339d692ec116b68521904692a926a
[ "Apache-2.0" ]
2
2021-09-12T23:07:54.000Z
2021-11-20T02:57:30.000Z
tests/context.py
eyal0/lcovparse
3c29ef50870339d692ec116b68521904692a926a
[ "Apache-2.0" ]
null
null
null
tests/context.py
eyal0/lcovparse
3c29ef50870339d692ec116b68521904692a926a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python2 """Context for all tests.""" from __future__ import absolute_import import os import sys sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)) + "../lcovparse")) import lcovparse # pylint: disable=wrong-import-position,unused-import
25.272727
91
0.76259
40
278
5.075
0.65
0.08867
0
0
0
0
0
0
0
0
0
0.003953
0.089928
278
10
92
27.8
0.798419
0.345324
0
0
0
0
0.068571
0
0
0
0
0
0
1
0
true
0
0.8
0
0.8
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
7e47a45aa4626c8612e5e79d872162e8912b39d8
293
py
Python
warehouse.py
Arthraim/warehouse
3905635217f679eb9c3ace00b016668588f6bb98
[ "MIT" ]
1
2015-01-14T08:06:07.000Z
2015-01-14T08:06:07.000Z
warehouse.py
Arthraim/warehouse
3905635217f679eb9c3ace00b016668588f6bb98
[ "MIT" ]
null
null
null
warehouse.py
Arthraim/warehouse
3905635217f679eb9c3ace00b016668588f6bb98
[ "MIT" ]
null
null
null
__author__ = 'arthur' from PyQt5.QtCore import * from models import * class WareHouse(QObject): def __init__(self): super(QObject, self).__init__() @pyqtSlot(result=QVariant) def all_cargo(self): return QVariant(map(lambda x: x.javascriptify(), Cargo.select()))
22.538462
73
0.682594
35
293
5.342857
0.714286
0
0
0
0
0
0
0
0
0
0
0.004219
0.191126
293
13
73
22.538462
0.78481
0
0
0
0
0
0.020408
0
0
0
0
0
0
1
0.222222
false
0
0.222222
0.111111
0.666667
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
7e602fe1c74aa3fb84a2c81524ea7c737c67eb63
233
py
Python
setup.py
jsdnlb/Tangelo-challenge
4cd83f5dcd5b870f2dba6a7f08d35fe1f60709ce
[ "MIT" ]
null
null
null
setup.py
jsdnlb/Tangelo-challenge
4cd83f5dcd5b870f2dba6a7f08d35fe1f60709ce
[ "MIT" ]
3
2022-02-11T00:32:38.000Z
2022-02-11T14:29:33.000Z
setup.py
jsdnlb/tangelo-challenge
4cd83f5dcd5b870f2dba6a7f08d35fe1f60709ce
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages # Building and Distributing Packages with Setuptools # Documentation here: https://setuptools.pypa.io/en/latest/setuptools.html setup(name='app', version='1.0', packages=find_packages())
33.285714
74
0.793991
31
233
5.903226
0.741935
0.131148
0
0
0
0
0
0
0
0
0
0.009434
0.090129
233
6
75
38.833333
0.853774
0.527897
0
0
0
0
0.056075
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
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
1
0
1
0
0
0
0
3
7e7d5c74d34a346aa2f86f99938df07c5e5fd4cb
89
py
Python
ourteam/apps.py
Kgermando/parlementaires
ef9a464373ce2facbb6543be6d3b0d7d5c11200c
[ "Apache-2.0" ]
1
2021-08-09T02:22:42.000Z
2021-08-09T02:22:42.000Z
ourteam/apps.py
Kgermando/parlementaires
ef9a464373ce2facbb6543be6d3b0d7d5c11200c
[ "Apache-2.0" ]
null
null
null
ourteam/apps.py
Kgermando/parlementaires
ef9a464373ce2facbb6543be6d3b0d7d5c11200c
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class OurteamConfig(AppConfig): name = 'ourteam'
14.833333
33
0.752809
10
89
6.7
0.9
0
0
0
0
0
0
0
0
0
0
0
0.168539
89
5
34
17.8
0.905405
0
0
0
0
0
0.078652
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
7eb5995e03f60c1e708787551eef79b2faedc457
132
py
Python
Neural Network/NNToyFx/python/activations.py
stormy-ua/MachineLearning
e03a50e4c9fab8c7c4232ae0c305f6e7b48134bf
[ "MIT" ]
null
null
null
Neural Network/NNToyFx/python/activations.py
stormy-ua/MachineLearning
e03a50e4c9fab8c7c4232ae0c305f6e7b48134bf
[ "MIT" ]
null
null
null
Neural Network/NNToyFx/python/activations.py
stormy-ua/MachineLearning
e03a50e4c9fab8c7c4232ae0c305f6e7b48134bf
[ "MIT" ]
null
null
null
from simulation import * def relu(ctx: SimulationContext, x: Connection): relu1 = ctx.max(x, ctx.variable(0)) return relu1
22
48
0.704545
18
132
5.166667
0.777778
0
0
0
0
0
0
0
0
0
0
0.027778
0.181818
132
6
49
22
0.833333
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
3
0e18f19e2f26af45d020c41ca5247b1bdd969657
151
py
Python
abacus_tpot/tpot_config.py
workforce-data-initiative/tpot-abacus
a5abf4af544693e0c58f7891785718e7bc606ed6
[ "Apache-2.0" ]
1
2019-09-09T20:52:49.000Z
2019-09-09T20:52:49.000Z
abacus_tpot/tpot_config.py
workforce-data-initiative/tpot-abacus
a5abf4af544693e0c58f7891785718e7bc606ed6
[ "Apache-2.0" ]
43
2018-02-11T11:24:18.000Z
2022-02-22T05:32:16.000Z
abacus_tpot/tpot_config.py
workforce-data-initiative/tpot-abacus
a5abf4af544693e0c58f7891785718e7bc606ed6
[ "Apache-2.0" ]
null
null
null
# eventually we will have a proper config ANONYMIZATION_THRESHOLD = 10 WAREHOUSE_URI = 'postgres://localhost' WAGE_RECORD_URI = 'postgres://localhost'
30.2
41
0.794702
19
151
6.105263
0.842105
0.189655
0.344828
0
0
0
0
0
0
0
0
0.014925
0.112583
151
4
42
37.75
0.850746
0.258278
0
0
0
0
0.363636
0
0
0
0
0
0
1
0
false
0
0
0
0
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
0e2c27724ea07da3d95021b9be790ef2004472e6
2,158
py
Python
thriftpy2/contrib/aio/transport/framed.py
JonnoFTW/thriftpy2
3b4d28d611a752f8796604ee274f03c517670a43
[ "MIT" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
thriftpy2/contrib/aio/transport/framed.py
JonnoFTW/thriftpy2
3b4d28d611a752f8796604ee274f03c517670a43
[ "MIT" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
thriftpy2/contrib/aio/transport/framed.py
JonnoFTW/thriftpy2
3b4d28d611a752f8796604ee274f03c517670a43
[ "MIT" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import import struct import asyncio from io import BytesIO from .base import TAsyncTransportBase, readall from .buffered import TAsyncBufferedTransport class TAsyncFramedTransport(TAsyncTransportBase): """Class that wraps another transport and frames its I/O when writing.""" def __init__(self, trans): self._trans = trans self._rbuf = BytesIO() self._wbuf = BytesIO() def is_open(self): return self._trans.is_open() @asyncio.coroutine def open(self): return (yield from self._trans.open()) def close(self): return self._trans.close() @asyncio.coroutine def read(self, sz): # Important: don't attempt to read the next frame if the caller # doesn't actually need any data. if sz == 0: return b'' ret = self._rbuf.read(sz) if len(ret) != 0: return ret yield from self.read_frame() return self._rbuf.read(sz) @asyncio.coroutine def read_frame(self): buff = yield from readall(self._trans.read, 4) sz, = struct.unpack('!i', buff) frame = yield from readall(self._trans.read, sz) self._rbuf = BytesIO(frame) def write(self, buf): self._wbuf.write(buf) @asyncio.coroutine def flush(self): # reset wbuf before write/flush to preserve state on underlying failure out = self._wbuf.getvalue() self._wbuf = BytesIO() # N.B.: Doing this string concatenation is WAY cheaper than making # two separate calls to the underlying socket object. Socket writes in # Python turn out to be REALLY expensive, but it seems to do a pretty # good job of managing string buffer operations without excessive # copies self._trans.write(struct.pack("!i", len(out)) + out) yield from self._trans.flush() def getvalue(self): return self._trans.getvalue() class TAsyncFramedTransportFactory(object): def get_transport(self, trans): return TAsyncBufferedTransport(TAsyncFramedTransport(trans))
28.773333
79
0.647822
271
2,158
5.04428
0.428044
0.072421
0.055596
0.041697
0.042429
0.042429
0
0
0
0
0
0.002509
0.261353
2,158
74
80
29.162162
0.855082
0.244208
0
0.130435
0
0
0.002474
0
0
0
0
0
0
1
0.217391
false
0
0.130435
0.108696
0.565217
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
0e2f13b1e7a11523bafcf1c9ffaaf118b159dadf
372
py
Python
DSTK/Timeseries/recurrence_plots.py
jotterbach/dstk
d371262ca09527fb8279f066b564abf5a1fe28df
[ "MIT" ]
12
2017-01-10T19:50:32.000Z
2020-03-30T20:28:31.000Z
DSTK/Timeseries/recurrence_plots.py
jotterbach/dstk
d371262ca09527fb8279f066b564abf5a1fe28df
[ "MIT" ]
7
2016-10-12T16:21:58.000Z
2016-12-01T00:34:54.000Z
DSTK/Timeseries/recurrence_plots.py
jotterbach/dstk
d371262ca09527fb8279f066b564abf5a1fe28df
[ "MIT" ]
8
2016-08-22T11:23:12.000Z
2020-03-13T23:18:39.000Z
import _recurrence_map import numpy as np def poincare_map(ts, ts2=None, threshold=0.1): rec_dist = poincare_recurrence_dist(ts, ts2) return (rec_dist < threshold).astype(int) def poincare_recurrence_dist(ts, ts2=None): if ts2 is None: return _recurrence_map.recurrence_map(ts, ts) else: return _recurrence_map.recurrence_map(ts, ts2)
23.25
54
0.725806
55
372
4.636364
0.4
0.254902
0.062745
0.188235
0.478431
0.266667
0
0
0
0
0
0.023102
0.185484
372
15
55
24.8
0.818482
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.7
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
0
0
0
0
0
1
0
0
3
0e3027662b184f06c13870ffba5c59a0f9bdc59f
1,223
py
Python
buffer.py
Shahaf-Yamin/CartPole-Policy-Gradients
98845fa6aa24d1de22644b783ea564a778a5c64f
[ "MIT" ]
null
null
null
buffer.py
Shahaf-Yamin/CartPole-Policy-Gradients
98845fa6aa24d1de22644b783ea564a778a5c64f
[ "MIT" ]
null
null
null
buffer.py
Shahaf-Yamin/CartPole-Policy-Gradients
98845fa6aa24d1de22644b783ea564a778a5c64f
[ "MIT" ]
null
null
null
import numpy as np from collections import namedtuple, deque import random Transition = namedtuple('Transition', ('state', 'action', 'next_state', 'reward', 'not_done')) class ReplayBuffer(object): def __init__(self, capacity): self.memory = deque([], maxlen=capacity) def push(self, *args): self.memory.append([*args]) def sample(self, batch_size): batch = random.sample(self.memory, batch_size) batch = list(map(np.asarray, zip(*batch)))[ 0].T # FIXME: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray. states, actions, rewards, next_states, done = np.vstack(batch[0]), np.vstack(batch[1]), np.vstack(batch[2]), np.vstack(batch[3]), \ np.vstack(batch[4]) return states, actions, rewards, next_states, done def sample_last(self): batch = self.memory[-1] return batch def __len__(self): return len(self.memory)
40.766667
293
0.63287
155
1,223
4.896774
0.522581
0.065876
0.085639
0.063241
0.089592
0.089592
0
0
0
0
0
0.007642
0.251022
1,223
29
294
42.172414
0.820961
0.222404
0
0
0
0
0.048913
0
0
0
0
0.034483
0
1
0.238095
false
0
0.142857
0.047619
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
1
0
0
1
0
0
0
0
1
0
0
3
0e351d8158536eec299c27c17ae7a1f82b512746
455
py
Python
upper_print.py
DazEB2/SimplePyScripts
1dde0a42ba93fe89609855d6db8af1c63b1ab7cc
[ "CC-BY-4.0" ]
117
2015-12-18T07:18:27.000Z
2022-03-28T00:25:54.000Z
upper_print.py
DazEB2/SimplePyScripts
1dde0a42ba93fe89609855d6db8af1c63b1ab7cc
[ "CC-BY-4.0" ]
8
2018-10-03T09:38:46.000Z
2021-12-13T19:51:09.000Z
upper_print.py
DazEB2/SimplePyScripts
1dde0a42ba93fe89609855d6db8af1c63b1ab7cc
[ "CC-BY-4.0" ]
28
2016-08-02T17:43:47.000Z
2022-03-21T08:31:12.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' def upper_print(f): def wrapper(*args, **kwargs): f(*[i.upper() if hasattr(i, 'upper') else i for i in args], **kwargs) return wrapper if __name__ == '__main__': text = 'hello world!' print(text) # hello world! old_print = print print = upper_print(print) print(text) # HELLO WORLD! print = old_print print(text) # hello world!
18.2
77
0.6
61
455
4.213115
0.47541
0.194553
0.217899
0.22179
0.18677
0
0
0
0
0
0
0.005848
0.248352
455
24
78
18.958333
0.745614
0.18022
0
0.230769
0
0
0.089674
0
0
0
0
0
0
1
0.153846
false
0
0
0
0.230769
0.538462
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
3
0e3954cbaaaca908b84089a968d649cf3012eb17
1,254
py
Python
app/auth/forms.py
dancan-sandys/Becky_pizza
5a12669a9def43768f8ef00ff863dbf3c78ed896
[ "MIT" ]
null
null
null
app/auth/forms.py
dancan-sandys/Becky_pizza
5a12669a9def43768f8ef00ff863dbf3c78ed896
[ "MIT" ]
null
null
null
app/auth/forms.py
dancan-sandys/Becky_pizza
5a12669a9def43768f8ef00ff863dbf3c78ed896
[ "MIT" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import StringField,BooleanField,PasswordField,SubmitField from wtforms.validators import Email,Required,EqualTo from wtforms import ValidationError from ..models import User class LoginForm(FlaskForm): email = StringField("enter your email adress",validators = [Required(),Email()]) password = PasswordField("enter password", validators = [Required()]) remember = BooleanField("remember me") login = SubmitField("login ") class Signup(FlaskForm): username = StringField("enter your username", validators=[Required()]) email = StringField("enter your email", validators=[Required(),Email()]) password = PasswordField("enter password" ,validators=[Required(),EqualTo("confirm_password", message= "password must be the same")]) confirm_password = PasswordField ("confirm password", validators=[Required()]) submit = SubmitField("signup") # def validate_email(self,data_field): # if User.query.filter_by(email=data_field.data): # raise ValidationError("invalid email") # def validate_username(self,data_field): # if User.query.filter_by(username=data_field.data): # raise ValidationError("username already taken")
36.882353
137
0.72488
134
1,254
6.701493
0.358209
0.120267
0.066815
0.055679
0.378619
0.238307
0.238307
0.238307
0.167038
0
0
0
0.158692
1,254
33
138
38
0.851185
0.22807
0
0
0
0
0.173459
0
0
0
0
0
0
1
0
false
0.25
0.3125
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
0
1
1
0
1
0
0
3
0e44e2abfa92ca47f5eabcd2125c3a73c5fbe7bb
13,106
py
Python
apps/api/modules/bkdata_aiops.py
qqqqqie/bk-log
1765f1901aafaa6fb6a57b8db5d35dd32b3cb5c1
[ "MIT" ]
75
2021-07-14T09:32:36.000Z
2022-03-31T15:26:53.000Z
apps/api/modules/bkdata_aiops.py
qqqqqie/bk-log
1765f1901aafaa6fb6a57b8db5d35dd32b3cb5c1
[ "MIT" ]
561
2021-07-14T07:45:47.000Z
2022-03-31T11:41:28.000Z
apps/api/modules/bkdata_aiops.py
qqqqqie/bk-log
1765f1901aafaa6fb6a57b8db5d35dd32b3cb5c1
[ "MIT" ]
41
2021-07-14T07:39:50.000Z
2022-03-25T09:22:18.000Z
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-LOG 蓝鲸日志平台 available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-LOG 蓝鲸日志平台 is licensed under the MIT License. License for BK-LOG 蓝鲸日志平台: -------------------------------------------------------------------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ from django.utils.translation import ugettext_lazy as _ # noqa from apps.api.modules.utils import add_esb_info_before_request_for_bkdata_user # noqa from config.domains import AIOPS_APIGATEWAY_ROOT, AIOPS_MODEL_APIGATEWAY_ROOT # noqa from apps.api.base import DataAPI, DataApiRetryClass # noqa class _BkDataAIOPSApi: MODULE = _("数据平台aiops模块") def __init__(self): self.create_sample_set = DataAPI( method="POST", url=AIOPS_APIGATEWAY_ROOT + "sample_set/", module=self.MODULE, description=u"创建样本集", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) self.add_rt_to_sample_set = DataAPI( method="POST", url=AIOPS_APIGATEWAY_ROOT + "sample_set/{sample_set_id}/result_table/", module=self.MODULE, url_keys=["sample_set_id"], description=u"RT提交, 把RT添加到 stage表中", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) self.collect_configs = DataAPI( method="POST", url=AIOPS_APIGATEWAY_ROOT + "sample_set/{sample_set_id}/collect_configs/", module=self.MODULE, url_keys=["sample_set_id"], description=u"创建或更新样本采集配置", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) self.auto_collect = DataAPI( method="POST", url=AIOPS_APIGATEWAY_ROOT + "sample_set/{sample_set_id}/result_table/{result_table_id}/extract/auto_collect/", module=self.MODULE, url_keys=["sample_set_id", "result_table_id"], description=u"创建或更新自动修改样本集配置", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) self.apply_sample_set = DataAPI( method="POST", url=AIOPS_APIGATEWAY_ROOT + "sample_set/{sample_set_id}/submit/apply/", module=self.MODULE, url_keys=["sample_set_id"], description=u"执行样本集提交", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) self.submit_status = DataAPI( method="GET", url=AIOPS_APIGATEWAY_ROOT + "sample_set/{sample_set_id}/submit/status/", module=self.MODULE, url_keys=["sample_set_id"], description=u"查询提交后的固化任务执行状态", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) self.delete_sample_set = DataAPI( method="DELETE", url=AIOPS_APIGATEWAY_ROOT + "sample_set/{sample_set_id}/", module=self.MODULE, url_keys=["sample_set_id"], description=u"删除样本集", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) self.create_model = DataAPI( method="POST", url=AIOPS_APIGATEWAY_ROOT + "models/", module=self.MODULE, description=u"模型创建", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) self.create_experiment = DataAPI( method="POST", url=AIOPS_APIGATEWAY_ROOT + "models/{model_id}/experiments/", module=self.MODULE, url_keys=["model_id"], description=u"AIOps 创建实验", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) self.experiments_config = DataAPI( method="GET", url=AIOPS_APIGATEWAY_ROOT + "models/{model_id}/experiments/{experiment_id}/config/", module=self.MODULE, url_keys=["model_id", "experiment_id"], description=u"获取实验配置信息", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) self.retrieve_execute_config = DataAPI( method="GET", url=AIOPS_APIGATEWAY_ROOT + "meta_data/retrieve_execute_config/", module=self.MODULE, description=u"获取实验执行配置信息", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) self.update_execute_config = DataAPI( method="POST", url=AIOPS_APIGATEWAY_ROOT + "meta_data/update_execute_config/", module=self.MODULE, description=u"更新实验执行配置", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) self.execute_experiments = DataAPI( method="POST", url=AIOPS_APIGATEWAY_ROOT + "models/{model_id}/experiments/{experiment_id}/node/execute/", module=self.MODULE, url_keys=["model_id", "experiment_id"], description=u"执行实验配置", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) self.execute_experiments_node_status = DataAPI( method="GET", url=AIOPS_APIGATEWAY_ROOT + "models/{model_id}/experiments/{experiment_id}/node/execute/status/", module=self.MODULE, url_keys=["model_id", "experiment_id"], description=u"实验步骤状态 (当前用于切分状态捕获)", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) self.basic_models_training_status = DataAPI( method="POST", url=AIOPS_APIGATEWAY_ROOT + "models/{model_id}/experiments/{experiment_id}/basic_models/training_status/", module=self.MODULE, url_keys=["model_id", "experiment_id"], description=u"备选模型训练状态列表", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) self.aiops_get_costum_algorithm = DataAPI( method="GET", url=AIOPS_APIGATEWAY_ROOT + "algorithm/{algorithm_name}/", module=self.MODULE, url_keys=["algorithm_name"], description=u"获取单个自定义算法(最新版本)", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) self.basic_models_evaluation_status = DataAPI( method="POST", url=AIOPS_APIGATEWAY_ROOT + "models/{model_id}/experiments/{experiment_id}/basic_models/evaluation_status/", module=self.MODULE, url_keys=["model_id", "experiment_id"], description=u"备选模型评估状态列表", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) self.basic_model_evaluation_result = DataAPI( method="GET", url=AIOPS_MODEL_APIGATEWAY_ROOT + "models/{model_id}/experiments/{experiment_id}/basic_models/{basic_model_id}/evaluation_result/", module=self.MODULE, url_keys=["model_id", "experiment_id", "basic_model_id"], description=u"备选模型评估结果", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) self.pre_commit = DataAPI( method="POST", url=AIOPS_APIGATEWAY_ROOT + "models/{model_id}/experiments/{experiment_id}/pre_commit/", module=self.MODULE, url_keys=["model_id", "experiment_id"], description=u"实验提交前查看配置", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) self.experiment_commit = DataAPI( method="POST", url=AIOPS_APIGATEWAY_ROOT + "models/{model_id}/experiments/{experiment_id}/commit/", module=self.MODULE, url_keys=["model_id", "experiment_id"], description=u"实验提交", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) self.release_config = DataAPI( method="GET", url=AIOPS_APIGATEWAY_ROOT + "models/{model_id}/release/{experiment_id}/{basic_model_id}/config/", module=self.MODULE, url_keys=["model_id", "experiment_id", "basic_model_id"], description=u"获取模型发布配置", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) self.release = DataAPI( method="POST", url=AIOPS_APIGATEWAY_ROOT + "models/{model_id}/release/{experiment_id}/{basic_model_id}", module=self.MODULE, url_keys=["model_id", "experiment_id", "basic_model_id"], description=u"模型发布", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) self.update_model_info = DataAPI( method="PUT", url=AIOPS_APIGATEWAY_ROOT + "models/{model_id}/", module=self.MODULE, url_keys=["model_id"], description=u"修改模型", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) self.aiops_release = DataAPI( method="GET", url=AIOPS_APIGATEWAY_ROOT + "models/{model_id}/release/", module=self.MODULE, url_keys=["model_id"], description=u"备选模型列表", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) self.aiops_release_model_release_id_model_file = DataAPI( method="GET", url=AIOPS_APIGATEWAY_ROOT + "models/{model_id}/release/{model_release_id}/model_file/", module=self.MODULE, url_keys=["model_id", "model_release_id"], description=u"获取发布的模型对应的模型文件", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) self.aiops_experiments_debug = DataAPI( method="POST", url=AIOPS_APIGATEWAY_ROOT + "experiments/debug/", module=self.MODULE, description=u"训练和预测调试", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) self.serving_data_processing_id_config = DataAPI( method="GET", url=AIOPS_APIGATEWAY_ROOT + "serving/{data_processing_id}/config/", module=self.MODULE, url_keys=["data_processing_id"], description=u"AIOps 模型实例信息", before_request=add_esb_info_before_request_for_bkdata_user, after_request=None, default_timeout=300, ) BkDataAIOPSApi = _BkDataAIOPSApi()
43.254125
120
0.628872
1,468
13,106
5.243188
0.156676
0.092893
0.036378
0.058205
0.733143
0.708978
0.700143
0.662856
0.632844
0.610108
0
0.009304
0.278346
13,106
302
121
43.397351
0.804504
0.10499
0
0.549091
0
0
0.171531
0.099761
0
0
0
0
0
1
0.003636
false
0
0.014545
0
0.025455
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
0e458fb301ccce1987472231c3b00c1628040969
13,195
py
Python
pytket/pytket/passes/script.py
NewGitter2017/tket
6ff81af26280770bf2ca80bfb2140e8fa98182aa
[ "Apache-2.0" ]
null
null
null
pytket/pytket/passes/script.py
NewGitter2017/tket
6ff81af26280770bf2ca80bfb2140e8fa98182aa
[ "Apache-2.0" ]
null
null
null
pytket/pytket/passes/script.py
NewGitter2017/tket
6ff81af26280770bf2ca80bfb2140e8fa98182aa
[ "Apache-2.0" ]
null
null
null
# Copyright 2019-2021 Cambridge Quantum Computing # # 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 List from lark import Lark, Transformer from pytket.circuit import OpType # type: ignore from pytket.passes import BasePass, RepeatPass, SequencePass # type: ignore from pytket.passes import ( # type: ignore CliffordSimp, CommuteThroughMultis, ContextSimp, DecomposeArbitrarilyControlledGates, DecomposeBoxes, DecomposeClassicalExp, DecomposeMultiQubitsCX, DecomposeSingleQubitsTK1, DelayMeasures, EulerAngleReduction, FlattenRegisters, FullPeepholeOptimise, GuidedPauliSimp, KAKDecomposition, OptimisePhaseGadgets, PauliSimp, PauliSquash, PeepholeOptimise2Q, RebaseCirq, RebaseHQS, RebaseProjectQ, RebasePyZX, RebaseQuil, RebaseTket, RebaseUMD, RebaseUFR, RebaseOQC, RemoveBarriers, RemoveDiscarded, RemoveRedundancies, SimplifyInitial, SimplifyMeasured, SynthesiseHQS, SynthesiseTket, SynthesiseOQC, SynthesiseUMD, SquashHQS, ThreeQubitSquash, ) from pytket.transform import CXConfigType, PauliSynthStrat # type: ignore pass_grammar = """ start: comp_pass comp_pass: ( basic_pass | seq_pass | repeat_pass ) basic_pass: | clifford_simp | clifford_simp_no_swaps | commute_through_multis | context_simp | context_simp_no_classical | decompose_arbitrarily_controlled_gates | decompose_boxes | decompose_classical_exp | decompose_multi_qubits_cx | decompose_single_qubits_tk1 | delay_measures | euler_angle_reduction | flatten_registers | full_peephole_optimise | full_peephole_optimise_no_swaps | guided_pauli_simp | guided_pauli_simp_default | kak_decomposition | optimise_phase_gadgets | optimise_phase_gadgets_default | pauli_simp | pauli_simp_default | pauli_squash | pauli_squash_default | peephole_optimise_2q | rebase_cirq | rebase_hqs | rebase_oqc | rebase_projectq | rebase_pyzx | rebase_quil | rebase_tket | rebase_ufr | rebase_umd | remove_barriers | remove_discarded | remove_redundancies | simplify_initial | simplify_initial_no_classical | simplify_measured | squash_hqs | synthesise_hqs | synthesise_tket | synthesise_oqc | synthesise_umd | three_qubit_squash seq_pass: "[" pass_list "]" pass_list: comp_pass ("," comp_pass)* repeat_pass: "repeat" "(" comp_pass ")" clifford_simp: "CliffordSimp" clifford_simp_no_swaps: "CliffordSimpNoSwaps" commute_through_multis: "CommuteThroughMultis" context_simp: "ContextSimp" context_simp_no_classical: "ContextSimpNoClassical" decompose_arbitrarily_controlled_gates: "DecomposeArbitrarilyControlledGates" decompose_boxes: "DecomposeBoxes" decompose_classical_exp: "DecomposeClassicalExp" decompose_multi_qubits_cx: "DecomposeMultiQubitsCX" decompose_single_qubits_tk1: "DecomposeSingleQubitsTK1" delay_measures: "DelayMeasures" euler_angle_reduction: "EulerAngleReduction" "(" op_type "," op_type ")" flatten_registers: "FlattenRegisters" full_peephole_optimise: "FullPeepholeOptimise" full_peephole_optimise_no_swaps: "FullPeepholeOptimiseNoSwaps" guided_pauli_simp: "GuidedPauliSimp" "(" pauli_synth_strat "," cx_config_type ")" guided_pauli_simp_default: "GuidedPauliSimp" kak_decomposition: "KAKDecomposition" optimise_phase_gadgets: "OptimisePhaseGadgets" "(" cx_config_type ")" optimise_phase_gadgets_default: "OptimisePhaseGadgets" pauli_simp: "PauliSimp" "(" pauli_synth_strat "," cx_config_type ")" pauli_simp_default: "PauliSimp" pauli_squash: "PauliSquash" "(" pauli_synth_strat "," cx_config_type ")" pauli_squash_default: "PauliSquash" peephole_optimise_2q: "PeepholeOptimise2Q" rebase_cirq: "RebaseCirq" rebase_hqs: "RebaseHQS" rebase_oqc: "RebaseOQC" rebase_projectq: "RebaseProjectQ" rebase_pyzx: "RebasePyZX" rebase_quil: "RebaseQuil" rebase_tket: "RebaseTket" rebase_ufr: "RebaseUFR" rebase_umd: "RebaseUMD" remove_barriers: "RemoveBarriers" remove_discarded: "RemoveDiscarded" remove_redundancies: "RemoveRedundancies" simplify_initial: "SimplifyInitial" simplify_initial_no_classical: "SimplifyInitialNoClassical" simplify_measured: "SimplifyMeasured" squash_hqs: "SquashHQS" synthesise_hqs: "SynthesiseHQS" synthesise_tket: "SynthesiseTket" synthesise_oqc: "SynthesiseOQC" synthesise_umd: "SynthesiseUMD" three_qubit_squash: "ThreeQubitSquash" cx_config_type: | cx_config_type_snake | cx_config_type_star | cx_config_type_tree | cx_config_type_multi_q_gate cx_config_type_snake: "Snake" cx_config_type_star: "Star" cx_config_type_tree: "Tree" cx_config_type_multi_q_gate: "MultiQGate" op_type: ( op_type_rx | op_type_ry | op_type_rz ) op_type_rx: "Rx" op_type_ry: "Ry" op_type_rz: "Rz" pauli_synth_strat: | pauli_synth_strat_individual | pauli_synth_strat_pairwise | pauli_synth_strat_sets pauli_synth_strat_individual: "Individual" pauli_synth_strat_pairwise: "Pairwise" pauli_synth_strat_sets: "Sets" %import common.WS_INLINE -> WS %import common.CR %import common.LF _NEWLINE: CR? LF %ignore WS %ignore _NEWLINE """ class PassTransformer(Transformer): def start(self, t: List) -> BasePass: return t[0] def comp_pass(self, t: List) -> BasePass: return t[0] def basic_pass(self, t: list) -> BasePass: return t[0] def seq_pass(self, t: List) -> BasePass: return t[0] def pass_list(self, t: List) -> BasePass: return SequencePass(t) def repeat_pass(self, t: List) -> BasePass: return RepeatPass(t[0]) def clifford_simp(self, t: List) -> BasePass: return CliffordSimp() def clifford_simp_no_swaps(self, t: List) -> BasePass: return CliffordSimp(allow_swaps=False) def commute_through_multis(self, t: List) -> BasePass: return CommuteThroughMultis() def context_simp(self, t: List) -> BasePass: return ContextSimp() def context_simp_no_classical(self, t: List) -> BasePass: return ContextSimp(allow_classical=False) def decompose_arbitrarily_controlled_gates(self, t: List) -> BasePass: return DecomposeArbitrarilyControlledGates() def decompose_boxes(self, t: List) -> BasePass: return DecomposeBoxes() def decompose_classical_exp(self, t: List) -> BasePass: return DecomposeClassicalExp() def decompose_multi_qubits_cx(self, t: List) -> BasePass: return DecomposeMultiQubitsCX() def decompose_single_qubits_tk1(self, t: List) -> BasePass: return DecomposeSingleQubitsTK1() def delay_measures(self, t: List) -> BasePass: return DelayMeasures() def euler_angle_reduction(self, t: List) -> BasePass: return EulerAngleReduction(t[0], t[1]) def flatten_registers(self, t: List) -> BasePass: return FlattenRegisters() def full_peephole_optimise(self, t: List) -> BasePass: return FullPeepholeOptimise() def full_peephole_optimise_no_swaps(self, t: List) -> BasePass: return FullPeepholeOptimise(allow_swaps=False) def guided_pauli_simp(self, t: List) -> BasePass: return GuidedPauliSimp(strat=t[0], cx_config=t[1]) def guided_pauli_simp_default(self, t: List) -> BasePass: return GuidedPauliSimp() def kak_decomposition(self, t: List) -> BasePass: return KAKDecomposition() def optimise_phase_gadgets(self, t: List) -> BasePass: return OptimisePhaseGadgets(cx_config=t[0]) def optimise_phase_gadgets_default(self, t: List) -> BasePass: return OptimisePhaseGadgets() def pauli_simp(self, t: List) -> BasePass: return PauliSimp(strat=t[0], cx_config=t[1]) def pauli_simp_default(self, t: List) -> BasePass: return PauliSimp() def pauli_squash(self, t: List) -> BasePass: return PauliSquash(strat=t[0], cx_config=t[1]) def pauli_squash_default(self, t: List) -> BasePass: return PauliSquash() def peephole_optimise_2q(self, t: List) -> BasePass: return PeepholeOptimise2Q() def rebase_cirq(self, t: List) -> BasePass: return RebaseCirq() def rebase_hqs(self, t: List) -> BasePass: return RebaseHQS() def rebase_oqc(self, t: List) -> BasePass: return RebaseOQC() def rebase_projectq(self, t: List) -> BasePass: return RebaseProjectQ() def rebase_pyzx(self, t: List) -> BasePass: return RebasePyZX() def rebase_quil(self, t: List) -> BasePass: return RebaseQuil() def rebase_tket(self, t: List) -> BasePass: return RebaseTket() def rebase_ufr(self, t: List) -> BasePass: return RebaseUFR() def rebase_umd(self, t: List) -> BasePass: return RebaseUMD() def remove_barriers(self, t: List) -> BasePass: return RemoveBarriers() def remove_discarded(self, t: List) -> BasePass: return RemoveDiscarded() def remove_redundancies(self, t: List) -> BasePass: return RemoveRedundancies() def simplify_initial(self, t: List) -> BasePass: return SimplifyInitial() def simplify_initial_no_classical(self, t: List) -> BasePass: return SimplifyInitial(allow_classical=False) def simplify_measured(self, t: List) -> BasePass: return SimplifyMeasured() def squash_hqs(self, t: List) -> BasePass: return SquashHQS() def synthesise_hqs(self, t: List) -> BasePass: return SynthesiseHQS() def synthesise_tket(self, t: List) -> BasePass: return SynthesiseTket() def synthesise_oqc(self, t: List) -> BasePass: return SynthesiseOQC() def synthesise_umd(self, t: List) -> BasePass: return SynthesiseUMD() def three_qubit_squash(self, t: List) -> BasePass: return ThreeQubitSquash() def cx_config_type(self, t: List) -> CXConfigType: return t[0] def cx_config_type_snake(self, t: List) -> CXConfigType: return CXConfigType.Snake def cx_config_type_star(self, t: List) -> CXConfigType: return CXConfigType.Star def cx_config_type_tree(self, t: List) -> CXConfigType: return CXConfigType.Tree def cx_config_type_multi_q_gate(self, t: List) -> CXConfigType: return CXConfigType.MultiQGate def op_type(self, t: List) -> OpType: return t[0] def op_type_rx(self, t: List) -> OpType: return OpType.Rx def op_type_ry(self, t: List) -> OpType: return OpType.Ry def op_type_rz(self, t: List) -> OpType: return OpType.Rz def pauli_synth_strat(self, t: List) -> PauliSynthStrat: return t[0] def pauli_synth_strat_individual(self, t: List) -> PauliSynthStrat: return PauliSynthStrat.Individual def pauli_synth_strat_pairwise(self, t: List) -> PauliSynthStrat: return PauliSynthStrat.Pairwise def pauli_synth_strat_sets(self, t: List) -> PauliSynthStrat: return PauliSynthStrat.Sets parser = Lark(pass_grammar) transformer = PassTransformer() def compilation_pass_from_script(script: str) -> BasePass: """Generate a compilation pass from a specification. The specification must conform to a simple grammar. For example, the following are valid specifications: * "RemoveRedundancies" * "[RemoveBarriers, RemoveRedundancies]" (a sequence of passes) * "repeat(FullPeepholeOptimise)" (repeat a pass until it doesn't change the circuit) Sequences and repeats can be nested arbitrarily. Whitespace is ignored. Most passes are specified using their Python names. For those that take enums as parameters, non-default values can be specified using their Python names: * "PauliSimp" (default parameters) * "PauliSimp(Pairwise, Tree)" * "EulerAngleReduction(Ry, Rz)" For some passes with optional boolean parameters the name can be modified as follows: * "CliffordSimp" (default parameters) * "CliffordSimpNoSwaps" * "SimplifyInitial" (default parameters) * "SimplifyInitialNoClassical" There is currently no support for passes requiring more complex parameters such as lambdas or circuits. The full formal grammar can be inspected using :py:meth:`compilation_pass_grammar`. :param script: specification of pass """ tree = parser.parse(script) return transformer.transform(tree) def compilation_pass_grammar() -> str: """Formal grammar for specifying compilation passes. This is the grammar assumed by :py:meth:`complilation_pass_from_script`. :return: grammar in extended Backus--Naur form""" return pass_grammar
30.125571
88
0.721031
1,520
13,195
6.009211
0.190132
0.035581
0.064046
0.096781
0.292424
0.195971
0.062952
0.029231
0.015984
0
0
0.003847
0.192194
13,195
437
89
30.194508
0.853082
0.143994
0
0.022654
0
0
0.355026
0.119237
0
0
0
0
0
1
0.216828
false
0.223301
0.029126
0.210356
0.466019
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
0e51b7b58041b179a5ca569376e14c8b5faa8e01
100
py
Python
src/spaczz/regex/__init__.py
brunobg/spaczz
69c73cad16f65f01be2202ecc0c836dd03b42b61
[ "MIT" ]
153
2020-07-07T01:26:25.000Z
2022-03-31T23:47:00.000Z
src/spaczz/regex/__init__.py
brunobg/spaczz
69c73cad16f65f01be2202ecc0c836dd03b42b61
[ "MIT" ]
38
2020-07-15T02:29:34.000Z
2021-08-15T21:32:54.000Z
src/spaczz/regex/__init__.py
brunobg/spaczz
69c73cad16f65f01be2202ecc0c836dd03b42b61
[ "MIT" ]
20
2020-07-07T15:41:05.000Z
2022-02-21T19:28:22.000Z
"""Module for regex components.""" from .regexconfig import RegexConfig __all__ = ["RegexConfig"]
16.666667
36
0.74
10
100
7
0.8
0
0
0
0
0
0
0
0
0
0
0
0.13
100
5
37
20
0.804598
0.28
0
0
0
0
0.166667
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
0e5a54810fbef414231a098e12c3d3a8fbf58189
343
py
Python
2020/01-1.py
matteodelabre/advent-of-code
a6f51222b52f948cec6aa94cb7c50bcfd4f53dc1
[ "CC0-1.0" ]
1
2021-12-02T05:16:11.000Z
2021-12-02T05:16:11.000Z
2020/01-1.py
matteodelabre/advent-of-code
a6f51222b52f948cec6aa94cb7c50bcfd4f53dc1
[ "CC0-1.0" ]
null
null
null
2020/01-1.py
matteodelabre/advent-of-code
a6f51222b52f948cec6aa94cb7c50bcfd4f53dc1
[ "CC0-1.0" ]
null
null
null
rows = [] try: while True: rows.append(int(input())) except EOFError: pass rows.sort() goal = 2020 l = 0 r = len(rows) - 1 while rows[l] + rows[r] != goal and l < r: if rows[l] + rows[r] < goal: l += 1 else: r -= 1 if rows[l] + rows[r] == goal: print(rows[l] * rows[r]) else: print('FAIL')
13.72
42
0.498542
55
343
3.109091
0.418182
0.116959
0.210526
0.233918
0.269006
0.187135
0
0
0
0
0
0.034188
0.317784
343
24
43
14.291667
0.696581
0
0
0.105263
0
0
0.011662
0
0
0
0
0
0
1
0
false
0.052632
0
0
0
0.105263
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
3
0e5ee46bdd0854fb83ad5b03e98e62a0395d3652
57,678
py
Python
tests/integration/boxscore/test_ncaab_boxscore.py
MArtinherz/sportsipy
24f4c1d5e3bb8ecc56e21568961588491e9cfd2a
[ "MIT" ]
221
2018-05-15T19:48:03.000Z
2021-01-05T15:36:21.000Z
tests/integration/boxscore/test_ncaab_boxscore.py
MArtinherz/sportsipy
24f4c1d5e3bb8ecc56e21568961588491e9cfd2a
[ "MIT" ]
502
2018-07-25T03:09:26.000Z
2021-01-06T16:07:02.000Z
tests/integration/boxscore/test_ncaab_boxscore.py
MArtinherz/sportsipy
24f4c1d5e3bb8ecc56e21568961588491e9cfd2a
[ "MIT" ]
72
2021-01-21T13:17:00.000Z
2022-03-31T21:43:25.000Z
import mock import os import pandas as pd from datetime import datetime from flexmock import flexmock from sportsipy import utils from sportsipy.constants import HOME from sportsipy.ncaab.constants import BOXSCORES_URL, SCHEDULE_URL from sportsipy.ncaab.boxscore import Boxscore, Boxscores MONTH = 1 YEAR = 2020 BOXSCORE = '2020-01-22-19-louisville' def read_file(filename): filepath = os.path.join(os.path.dirname(__file__), 'ncaab', filename) return open('%s' % filepath, 'r', encoding='utf8').read() def mock_pyquery(url): class MockPQ: def __init__(self, html_contents): self.status_code = 200 self.html_contents = html_contents self.text = html_contents def __call__(self, div): return read_file('table.html') if url == BOXSCORES_URL % (MONTH, 5, YEAR): return MockPQ(read_file('boxscores-1-5-2020.html')) if url == BOXSCORES_URL % (MONTH, 6, YEAR): return MockPQ(read_file('boxscores-1-6-2020.html')) boxscore = read_file('%s.html' % BOXSCORE) return MockPQ(boxscore) class MockDateTime: def __init__(self, year, month): self.year = year self.month = month class TestNCAABBoxscore: @mock.patch('requests.get', side_effect=mock_pyquery) def setup_method(self, *args, **kwargs): self.results = { 'date': 'January 22, 2020', 'location': 'KFC Yum! Center, Louisville, Kentucky', 'winner': HOME, 'winning_name': 'Louisville', 'winning_abbr': 'LOUISVILLE', 'losing_name': 'Georgia Tech', 'losing_abbr': 'GEORGIA-TECH', 'pace': 66.2, 'away_ranking': None, 'away_win_percentage': .421, 'away_wins': 8, 'away_losses': 11, 'away_minutes_played': 200, 'away_field_goals': 22, 'away_field_goal_attempts': 48, 'away_field_goal_percentage': .458, 'away_two_point_field_goals': 17, 'away_two_point_field_goal_attempts': 31, 'away_two_point_field_goal_percentage': .548, 'away_three_point_field_goals': 5, 'away_three_point_field_goal_attempts': 17, 'away_three_point_field_goal_percentage': .294, 'away_free_throws': 15, 'away_free_throw_attempts': 20, 'away_free_throw_percentage': .750, 'away_offensive_rebounds': 7, 'away_defensive_rebounds': 23, 'away_total_rebounds': 30, 'away_assists': 11, 'away_steals': 4, 'away_blocks': 4, 'away_turnovers': 16, 'away_personal_fouls': 18, 'away_points': 64, 'away_true_shooting_percentage': .557, 'away_effective_field_goal_percentage': .510, 'away_three_point_attempt_rate': .354, 'away_free_throw_attempt_rate': .417, 'away_offensive_rebound_percentage': 28.0, 'away_defensive_rebound_percentage': 63.9, 'away_total_rebound_percentage': 49.2, 'away_assist_percentage': 50.0, 'away_steal_percentage': 6.1, 'away_block_percentage': 10.5, 'away_turnover_percentage': 22.0, 'away_offensive_rating': 97.0, 'away_defensive_rating': 103.0, 'home_ranking': 6, 'home_win_percentage': .842, 'home_wins': 16, 'home_losses': 3, 'home_minutes_played': 200, 'home_field_goals': 24, 'home_field_goal_attempts': 58, 'home_field_goal_percentage': .414, 'home_two_point_field_goals': 18, 'home_two_point_field_goal_attempts': 38, 'home_two_point_field_goal_percentage': .474, 'home_three_point_field_goals': 6, 'home_three_point_field_goal_attempts': 20, 'home_three_point_field_goal_percentage': .300, 'home_free_throws': 14, 'home_free_throw_attempts': 23, 'home_free_throw_percentage': .609, 'home_offensive_rebounds': 13, 'home_defensive_rebounds': 18, 'home_total_rebounds': 31, 'home_assists': 12, 'home_steals': 9, 'home_blocks': 3, 'home_turnovers': 10, 'home_personal_fouls': 17, 'home_points': 68, 'home_true_shooting_percentage': .493, 'home_effective_field_goal_percentage': .466, 'home_three_point_attempt_rate': .345, 'home_free_throw_attempt_rate': .397, 'home_offensive_rebound_percentage': 36.1, 'home_defensive_rebound_percentage': 72.0, 'home_total_rebound_percentage': 50.8, 'home_assist_percentage': 50.0, 'home_steal_percentage': 13.6, 'home_block_percentage': 9.7, 'home_turnover_percentage': 12.8, 'home_offensive_rating': 103.0, 'home_defensive_rating': 97.0 } flexmock(utils) \ .should_receive('_todays_date') \ .and_return(MockDateTime(YEAR, MONTH)) self.boxscore = Boxscore('2020-01-22-19-louisville') def test_ncaab_boxscore_returns_requested_boxscore(self): for attribute, value in self.results.items(): assert getattr(self.boxscore, attribute) == value assert getattr(self.boxscore, 'summary') == { # Box score is not parsed correctly 'away': [], 'home': [] } def test_invalid_url_yields_empty_class(self): flexmock(Boxscore) \ .should_receive('_retrieve_html_page') \ .and_return(None) boxscore = Boxscore(BOXSCORE) for key, value in boxscore.__dict__.items(): if key == '_uri': continue assert value is None def test_ncaab_boxscore_dataframe_returns_dataframe_of_all_values(self): df = pd.DataFrame([self.results], index=[BOXSCORE]) # Pandas doesn't natively allow comparisons of DataFrames. # Concatenating the two DataFrames (the one generated during the test # and the expected one above) and dropping duplicate rows leaves only # the rows that are unique between the two frames. This allows a quick # check of the DataFrame to see if it is empty - if so, all rows are # duplicates, and they are equal. frames = [df, self.boxscore.dataframe] df1 = pd.concat(frames).drop_duplicates(keep=False) assert df1.empty def test_ncaab_boxscore_players(self): boxscore = Boxscore(BOXSCORE) assert len(boxscore.home_players) == 10 assert len(boxscore.away_players) == 7 for player in boxscore.home_players: assert not player.dataframe.empty for player in boxscore.away_players: assert not player.dataframe.empty def test_ncaab_boxscore_string_representation(self): expected = ('Boxscore for Georgia Tech ' 'at Louisville (January 22, 2020)') boxscore = Boxscore(BOXSCORE) assert boxscore.__repr__() == expected class TestNCAABBoxscores: def setup_method(self): self.expected = { '1-5-2020': [ {'boxscore': '2020-01-05-13-michigan-state', 'away_name': 'Michigan', 'away_abbr': 'michigan', 'away_score': 69, 'away_rank': 12, 'home_name': 'Michigan State', 'home_abbr': 'michigan-state', 'home_score': 87, 'home_rank': 14, 'non_di': False, 'top_25': True, 'winning_name': 'Michigan State', 'winning_abbr': 'michigan-state', 'losing_name': 'Michigan', 'losing_abbr': 'michigan'}, {'boxscore': '2020-01-05-13-saint-josephs', 'away_name': 'Dayton', 'away_abbr': 'dayton', 'away_score': 80, 'away_rank': 20, 'home_name': "St. Joseph's", 'home_abbr': 'saint-josephs', 'home_score': 67, 'home_rank': None, 'non_di': False, 'top_25': True, 'winning_name': 'Dayton', 'winning_abbr': 'dayton', 'losing_name': "St. Joseph's", 'losing_abbr': 'saint-josephs'}, {'boxscore': '2020-01-05-15-american', 'away_name': 'Boston University', 'away_abbr': 'boston-university', 'away_score': 63, 'away_rank': None, 'home_name': 'American', 'home_abbr': 'american', 'home_score': 67, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'American', 'winning_abbr': 'american', 'losing_name': 'Boston University', 'losing_abbr': 'boston-university'}, {'boxscore': '2020-01-05-14-lafayette', 'away_name': 'Bucknell', 'away_abbr': 'bucknell', 'away_score': 78, 'away_rank': None, 'home_name': 'Lafayette', 'home_abbr': 'lafayette', 'home_score': 66, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Bucknell', 'winning_abbr': 'bucknell', 'losing_name': 'Lafayette', 'losing_abbr': 'lafayette'}, {'boxscore': '2020-01-05-14-duquesne', 'away_name': 'Davidson', 'away_abbr': 'davidson', 'away_score': 64, 'away_rank': None, 'home_name': 'Duquesne', 'home_abbr': 'duquesne', 'home_score': 71, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Duquesne', 'winning_abbr': 'duquesne', 'losing_name': 'Davidson', 'losing_abbr': 'davidson'}, {'boxscore': '2020-01-05-16-south-dakota', 'away_name': 'Denver', 'away_abbr': 'denver', 'away_score': 78, 'away_rank': None, 'home_name': 'South Dakota', 'home_abbr': 'south-dakota', 'home_score': 80, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'South Dakota', 'winning_abbr': 'south-dakota', 'losing_name': 'Denver', 'losing_abbr': 'denver'}, {'boxscore': '2020-01-05-14-canisius', 'away_name': 'Fairfield', 'away_abbr': 'fairfield', 'away_score': 46, 'away_rank': None, 'home_name': 'Canisius', 'home_abbr': 'canisius', 'home_score': 42, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Fairfield', 'winning_abbr': 'fairfield', 'losing_name': 'Canisius', 'losing_abbr': 'canisius'}, {'boxscore': '2020-01-05-17-northwestern-state', 'away_name': 'Houston Baptist', 'away_abbr': 'houston-baptist', 'away_score': 79, 'away_rank': None, 'home_name': 'Northwestern State', 'home_abbr': 'northwestern-state', 'home_score': 106, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Northwestern State', 'winning_abbr': 'northwestern-state', 'losing_name': 'Houston Baptist', 'losing_abbr': 'houston-baptist'}, {'boxscore': '2020-01-05-14-milwaukee', 'away_name': 'UIC', 'away_abbr': 'illinois-chicago', 'away_score': 62, 'away_rank': None, 'home_name': 'Milwaukee', 'home_abbr': 'milwaukee', 'home_score': 64, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Milwaukee', 'winning_abbr': 'milwaukee', 'losing_name': 'UIC', 'losing_abbr': 'illinois-chicago'}, {'boxscore': '2020-01-05-14-monmouth', 'away_name': 'Iona', 'away_abbr': 'iona', 'away_score': 61, 'away_rank': None, 'home_name': 'Monmouth', 'home_abbr': 'monmouth', 'home_score': 73, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Monmouth', 'winning_abbr': 'monmouth', 'losing_name': 'Iona', 'losing_abbr': 'iona'}, {'boxscore': '2020-01-05-17-north-dakota', 'away_name': "Purdue-Fort Wayne", 'away_abbr': 'ipfw', 'away_score': 69, 'away_rank': None, 'home_name': 'North Dakota', 'home_abbr': 'north-dakota', 'home_score': 83, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'North Dakota', 'winning_abbr': 'north-dakota', 'losing_name': "Purdue-Fort Wayne", 'losing_abbr': 'ipfw'}, {'boxscore': '2020-01-05-14-green-bay', 'away_name': 'IUPUI', 'away_abbr': 'iupui', 'away_score': 93, 'away_rank': None, 'home_name': 'Green Bay', 'home_abbr': 'green-bay', 'home_score': 78, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'IUPUI', 'winning_abbr': 'iupui', 'losing_name': 'Green Bay', 'losing_abbr': 'green-bay'}, {'boxscore': '2020-01-05-14-fordham', 'away_name': 'La Salle', 'away_abbr': 'la-salle', 'away_score': 66, 'away_rank': None, 'home_name': 'Fordham', 'home_abbr': 'fordham', 'home_score': 60, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'La Salle', 'winning_abbr': 'la-salle', 'losing_name': 'Fordham', 'losing_abbr': 'fordham'}, {'boxscore': '2020-01-05-14-lehigh', 'away_name': 'Loyola (MD)', 'away_abbr': 'loyola-md', 'away_score': 71, 'away_rank': None, 'home_name': 'Lehigh', 'home_abbr': 'lehigh', 'home_score': 78, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Lehigh', 'winning_abbr': 'lehigh', 'losing_name': 'Loyola (MD)', 'losing_abbr': 'loyola-md'}, {'boxscore': '2020-01-05-13-niagara', 'away_name': 'Manhattan', 'away_abbr': 'manhattan', 'away_score': 67, 'away_rank': None, 'home_name': 'Niagara', 'home_abbr': 'niagara', 'home_score': 62, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Manhattan', 'winning_abbr': 'manhattan', 'losing_name': 'Niagara', 'losing_abbr': 'niagara'}, {'boxscore': '2020-01-05-14-saint-peters', 'away_name': 'Marist', 'away_abbr': 'marist', 'away_score': 40, 'away_rank': None, 'home_name': "St. Peter's", 'home_abbr': 'saint-peters', 'home_score': 66, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': "St. Peter's", 'winning_abbr': 'saint-peters', 'losing_name': 'Marist', 'losing_abbr': 'marist'}, {'boxscore': '2020-01-05-16-saint-louis', 'away_name': 'UMass', 'away_abbr': 'massachusetts', 'away_score': 80, 'away_rank': None, 'home_name': 'Saint Louis', 'home_abbr': 'saint-louis', 'home_score': 83, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Saint Louis', 'winning_abbr': 'saint-louis', 'losing_name': 'UMass', 'losing_abbr': 'massachusetts'}, {'boxscore': '2020-01-05-12-holy-cross', 'away_name': 'Navy', 'away_abbr': 'navy', 'away_score': 61, 'away_rank': None, 'home_name': 'Holy Cross', 'home_abbr': 'holy-cross', 'home_score': 63, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Holy Cross', 'winning_abbr': 'holy-cross', 'losing_name': 'Navy', 'losing_abbr': 'navy'}, {'boxscore': '2020-01-05-15-oakland', 'away_name': 'Northern Kentucky', 'away_abbr': 'northern-kentucky', 'away_score': 75, 'away_rank': None, 'home_name': 'Oakland', 'home_abbr': 'oakland', 'home_score': 64, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Northern Kentucky', 'winning_abbr': 'northern-kentucky', 'losing_name': 'Oakland', 'losing_abbr': 'oakland'}, {'boxscore': '2020-01-05-15-north-dakota-state', 'away_name': 'Northland', 'away_abbr': 'Northland', 'away_score': 43, 'away_rank': None, 'home_name': 'North Dakota State', 'home_abbr': 'north-dakota-state', 'home_score': 97, 'home_rank': None, 'non_di': True, 'top_25': False, 'winning_name': 'North Dakota State', 'winning_abbr': 'north-dakota-state', 'losing_name': 'Northland', 'losing_abbr': 'Northland'}, {'boxscore': '2020-01-05-19-minnesota', 'away_name': 'Northwestern', 'away_abbr': 'northwestern', 'away_score': 68, 'away_rank': None, 'home_name': 'Minnesota', 'home_abbr': 'minnesota', 'home_score': 77, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Minnesota', 'winning_abbr': 'minnesota', 'losing_name': 'Northwestern', 'losing_abbr': 'northwestern'}, {'boxscore': '2020-01-05-18-colorado', 'away_name': 'Oregon State', 'away_abbr': 'oregon-state', 'away_score': 76, 'away_rank': None, 'home_name': 'Colorado', 'home_abbr': 'colorado', 'home_score': 68, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Oregon State', 'winning_abbr': 'oregon-state', 'losing_name': 'Colorado', 'losing_abbr': 'colorado'}, {'boxscore': '2020-01-05-20-illinois', 'away_name': 'Purdue', 'away_abbr': 'purdue', 'away_score': 37, 'away_rank': None, 'home_name': 'Illinois', 'home_abbr': 'illinois', 'home_score': 63, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Illinois', 'winning_abbr': 'illinois', 'losing_name': 'Purdue', 'losing_abbr': 'purdue'}, {'boxscore': '2020-01-05-12-rhode-island', 'away_name': 'Richmond', 'away_abbr': 'richmond', 'away_score': 69, 'away_rank': None, 'home_name': 'Rhode Island', 'home_abbr': 'rhode-island', 'home_score': 61, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Richmond', 'winning_abbr': 'richmond', 'losing_name': 'Rhode Island', 'losing_abbr': 'rhode-island'}, {'boxscore': '2020-01-05-14-rider', 'away_name': 'Siena', 'away_abbr': 'siena', 'away_score': 77, 'away_rank': None, 'home_name': 'Rider', 'home_abbr': 'rider', 'home_score': 85, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Rider', 'winning_abbr': 'rider', 'losing_name': 'Siena', 'losing_abbr': 'siena'}, {'boxscore': '2020-01-05-22-washington', 'away_name': 'USC', 'away_abbr': 'southern-california', 'away_score': 40, 'away_rank': None, 'home_name': 'Washington', 'home_abbr': 'washington', 'home_score': 72, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Washington', 'winning_abbr': 'washington', 'losing_name': 'USC', 'losing_abbr': 'southern-california'}, {'boxscore': '2020-01-05-16-george-washington', 'away_name': 'St. Bonaventure', 'away_abbr': 'st-bonaventure', 'away_score': 71, 'away_rank': None, 'home_name': 'George Washington', 'home_abbr': 'george-washington', 'home_score': 66, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'St. Bonaventure', 'winning_abbr': 'st-bonaventure', 'losing_name': 'George Washington', 'losing_abbr': 'george-washington'}, {'boxscore': '2020-01-05-16-xavier', 'away_name': "St. John's (NY)", 'away_abbr': 'st-johns-ny', 'away_score': 67, 'away_rank': None, 'home_name': 'Xavier', 'home_abbr': 'xavier', 'home_score': 75, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Xavier', 'winning_abbr': 'xavier', 'losing_name': "St. John's (NY)", 'losing_abbr': 'st-johns-ny'}, {'boxscore': '2020-01-05-13-maine', 'away_name': 'Stony Brook', 'away_abbr': 'stony-brook', 'away_score': 73, 'away_rank': None, 'home_name': 'Maine', 'home_abbr': 'maine', 'home_score': 52, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Stony Brook', 'winning_abbr': 'stony-brook', 'losing_name': 'Maine', 'losing_abbr': 'maine'}, {'boxscore': '2020-01-05-12-george-mason', 'away_name': 'VCU', 'away_abbr': 'virginia-commonwealth', 'away_score': 72, 'away_rank': None, 'home_name': 'George Mason', 'home_abbr': 'george-mason', 'home_score': 59, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'VCU', 'winning_abbr': 'virginia-commonwealth', 'losing_name': 'George Mason', 'losing_abbr': 'george-mason'}, {'boxscore': '2020-01-05-13-detroit-mercy', 'away_name': "Wright State", 'away_abbr': "wright-state", 'away_score': 70, 'away_rank': None, 'home_name': 'Detroit', 'home_abbr': 'detroit-mercy', 'home_score': 69, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Wright State', 'winning_abbr': 'wright-state', 'losing_name': "Detroit", 'losing_abbr': "detroit-mercy"} ] } @mock.patch('requests.get', side_effect=mock_pyquery) def test_boxscores_search(self, *args, **kwargs): result = Boxscores(datetime(2020, 1, 5)).games assert result == self.expected @mock.patch('requests.get', side_effect=mock_pyquery) def test_boxscores_search_invalid_end(self, *args, **kwargs): result = Boxscores(datetime(2020, 1, 5), datetime(2020, 1, 4)).games assert result == self.expected @mock.patch('requests.get', side_effect=mock_pyquery) def test_boxscores_search_multiple_days(self, *args, **kwargs): expected = { '1-5-2020': [ {'boxscore': '2020-01-05-13-michigan-state', 'away_name': 'Michigan', 'away_abbr': 'michigan', 'away_score': 69, 'away_rank': 12, 'home_name': 'Michigan State', 'home_abbr': 'michigan-state', 'home_score': 87, 'home_rank': 14, 'non_di': False, 'top_25': True, 'winning_name': 'Michigan State', 'winning_abbr': 'michigan-state', 'losing_name': 'Michigan', 'losing_abbr': 'michigan'}, {'boxscore': '2020-01-05-13-saint-josephs', 'away_name': 'Dayton', 'away_abbr': 'dayton', 'away_score': 80, 'away_rank': 20, 'home_name': "St. Joseph's", 'home_abbr': 'saint-josephs', 'home_score': 67, 'home_rank': None, 'non_di': False, 'top_25': True, 'winning_name': 'Dayton', 'winning_abbr': 'dayton', 'losing_name': "St. Joseph's", 'losing_abbr': 'saint-josephs'}, {'boxscore': '2020-01-05-15-american', 'away_name': 'Boston University', 'away_abbr': 'boston-university', 'away_score': 63, 'away_rank': None, 'home_name': 'American', 'home_abbr': 'american', 'home_score': 67, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'American', 'winning_abbr': 'american', 'losing_name': 'Boston University', 'losing_abbr': 'boston-university'}, {'boxscore': '2020-01-05-14-lafayette', 'away_name': 'Bucknell', 'away_abbr': 'bucknell', 'away_score': 78, 'away_rank': None, 'home_name': 'Lafayette', 'home_abbr': 'lafayette', 'home_score': 66, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Bucknell', 'winning_abbr': 'bucknell', 'losing_name': 'Lafayette', 'losing_abbr': 'lafayette'}, {'boxscore': '2020-01-05-14-duquesne', 'away_name': 'Davidson', 'away_abbr': 'davidson', 'away_score': 64, 'away_rank': None, 'home_name': 'Duquesne', 'home_abbr': 'duquesne', 'home_score': 71, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Duquesne', 'winning_abbr': 'duquesne', 'losing_name': 'Davidson', 'losing_abbr': 'davidson'}, {'boxscore': '2020-01-05-16-south-dakota', 'away_name': 'Denver', 'away_abbr': 'denver', 'away_score': 78, 'away_rank': None, 'home_name': 'South Dakota', 'home_abbr': 'south-dakota', 'home_score': 80, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'South Dakota', 'winning_abbr': 'south-dakota', 'losing_name': 'Denver', 'losing_abbr': 'denver'}, {'boxscore': '2020-01-05-14-canisius', 'away_name': 'Fairfield', 'away_abbr': 'fairfield', 'away_score': 46, 'away_rank': None, 'home_name': 'Canisius', 'home_abbr': 'canisius', 'home_score': 42, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Fairfield', 'winning_abbr': 'fairfield', 'losing_name': 'Canisius', 'losing_abbr': 'canisius'}, {'boxscore': '2020-01-05-17-northwestern-state', 'away_name': 'Houston Baptist', 'away_abbr': 'houston-baptist', 'away_score': 79, 'away_rank': None, 'home_name': 'Northwestern State', 'home_abbr': 'northwestern-state', 'home_score': 106, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Northwestern State', 'winning_abbr': 'northwestern-state', 'losing_name': 'Houston Baptist', 'losing_abbr': 'houston-baptist'}, {'boxscore': '2020-01-05-14-milwaukee', 'away_name': 'UIC', 'away_abbr': 'illinois-chicago', 'away_score': 62, 'away_rank': None, 'home_name': 'Milwaukee', 'home_abbr': 'milwaukee', 'home_score': 64, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Milwaukee', 'winning_abbr': 'milwaukee', 'losing_name': 'UIC', 'losing_abbr': 'illinois-chicago'}, {'boxscore': '2020-01-05-14-monmouth', 'away_name': 'Iona', 'away_abbr': 'iona', 'away_score': 61, 'away_rank': None, 'home_name': 'Monmouth', 'home_abbr': 'monmouth', 'home_score': 73, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Monmouth', 'winning_abbr': 'monmouth', 'losing_name': 'Iona', 'losing_abbr': 'iona'}, {'boxscore': '2020-01-05-17-north-dakota', 'away_name': "Purdue-Fort Wayne", 'away_abbr': 'ipfw', 'away_score': 69, 'away_rank': None, 'home_name': 'North Dakota', 'home_abbr': 'north-dakota', 'home_score': 83, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'North Dakota', 'winning_abbr': 'north-dakota', 'losing_name': "Purdue-Fort Wayne", 'losing_abbr': 'ipfw'}, {'boxscore': '2020-01-05-14-green-bay', 'away_name': 'IUPUI', 'away_abbr': 'iupui', 'away_score': 93, 'away_rank': None, 'home_name': 'Green Bay', 'home_abbr': 'green-bay', 'home_score': 78, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'IUPUI', 'winning_abbr': 'iupui', 'losing_name': 'Green Bay', 'losing_abbr': 'green-bay'}, {'boxscore': '2020-01-05-14-fordham', 'away_name': 'La Salle', 'away_abbr': 'la-salle', 'away_score': 66, 'away_rank': None, 'home_name': 'Fordham', 'home_abbr': 'fordham', 'home_score': 60, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'La Salle', 'winning_abbr': 'la-salle', 'losing_name': 'Fordham', 'losing_abbr': 'fordham'}, {'boxscore': '2020-01-05-14-lehigh', 'away_name': 'Loyola (MD)', 'away_abbr': 'loyola-md', 'away_score': 71, 'away_rank': None, 'home_name': 'Lehigh', 'home_abbr': 'lehigh', 'home_score': 78, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Lehigh', 'winning_abbr': 'lehigh', 'losing_name': 'Loyola (MD)', 'losing_abbr': 'loyola-md'}, {'boxscore': '2020-01-05-13-niagara', 'away_name': 'Manhattan', 'away_abbr': 'manhattan', 'away_score': 67, 'away_rank': None, 'home_name': 'Niagara', 'home_abbr': 'niagara', 'home_score': 62, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Manhattan', 'winning_abbr': 'manhattan', 'losing_name': 'Niagara', 'losing_abbr': 'niagara'}, {'boxscore': '2020-01-05-14-saint-peters', 'away_name': 'Marist', 'away_abbr': 'marist', 'away_score': 40, 'away_rank': None, 'home_name': "St. Peter's", 'home_abbr': 'saint-peters', 'home_score': 66, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': "St. Peter's", 'winning_abbr': 'saint-peters', 'losing_name': 'Marist', 'losing_abbr': 'marist'}, {'boxscore': '2020-01-05-16-saint-louis', 'away_name': 'UMass', 'away_abbr': 'massachusetts', 'away_score': 80, 'away_rank': None, 'home_name': 'Saint Louis', 'home_abbr': 'saint-louis', 'home_score': 83, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Saint Louis', 'winning_abbr': 'saint-louis', 'losing_name': 'UMass', 'losing_abbr': 'massachusetts'}, {'boxscore': '2020-01-05-12-holy-cross', 'away_name': 'Navy', 'away_abbr': 'navy', 'away_score': 61, 'away_rank': None, 'home_name': 'Holy Cross', 'home_abbr': 'holy-cross', 'home_score': 63, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Holy Cross', 'winning_abbr': 'holy-cross', 'losing_name': 'Navy', 'losing_abbr': 'navy'}, {'boxscore': '2020-01-05-15-oakland', 'away_name': 'Northern Kentucky', 'away_abbr': 'northern-kentucky', 'away_score': 75, 'away_rank': None, 'home_name': 'Oakland', 'home_abbr': 'oakland', 'home_score': 64, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Northern Kentucky', 'winning_abbr': 'northern-kentucky', 'losing_name': 'Oakland', 'losing_abbr': 'oakland'}, {'boxscore': '2020-01-05-15-north-dakota-state', 'away_name': 'Northland', 'away_abbr': 'Northland', 'away_score': 43, 'away_rank': None, 'home_name': 'North Dakota State', 'home_abbr': 'north-dakota-state', 'home_score': 97, 'home_rank': None, 'non_di': True, 'top_25': False, 'winning_name': 'North Dakota State', 'winning_abbr': 'north-dakota-state', 'losing_name': 'Northland', 'losing_abbr': 'Northland'}, {'boxscore': '2020-01-05-19-minnesota', 'away_name': 'Northwestern', 'away_abbr': 'northwestern', 'away_score': 68, 'away_rank': None, 'home_name': 'Minnesota', 'home_abbr': 'minnesota', 'home_score': 77, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Minnesota', 'winning_abbr': 'minnesota', 'losing_name': 'Northwestern', 'losing_abbr': 'northwestern'}, {'boxscore': '2020-01-05-18-colorado', 'away_name': 'Oregon State', 'away_abbr': 'oregon-state', 'away_score': 76, 'away_rank': None, 'home_name': 'Colorado', 'home_abbr': 'colorado', 'home_score': 68, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Oregon State', 'winning_abbr': 'oregon-state', 'losing_name': 'Colorado', 'losing_abbr': 'colorado'}, {'boxscore': '2020-01-05-20-illinois', 'away_name': 'Purdue', 'away_abbr': 'purdue', 'away_score': 37, 'away_rank': None, 'home_name': 'Illinois', 'home_abbr': 'illinois', 'home_score': 63, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Illinois', 'winning_abbr': 'illinois', 'losing_name': 'Purdue', 'losing_abbr': 'purdue'}, {'boxscore': '2020-01-05-12-rhode-island', 'away_name': 'Richmond', 'away_abbr': 'richmond', 'away_score': 69, 'away_rank': None, 'home_name': 'Rhode Island', 'home_abbr': 'rhode-island', 'home_score': 61, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Richmond', 'winning_abbr': 'richmond', 'losing_name': 'Rhode Island', 'losing_abbr': 'rhode-island'}, {'boxscore': '2020-01-05-14-rider', 'away_name': 'Siena', 'away_abbr': 'siena', 'away_score': 77, 'away_rank': None, 'home_name': 'Rider', 'home_abbr': 'rider', 'home_score': 85, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Rider', 'winning_abbr': 'rider', 'losing_name': 'Siena', 'losing_abbr': 'siena'}, {'boxscore': '2020-01-05-22-washington', 'away_name': 'USC', 'away_abbr': 'southern-california', 'away_score': 40, 'away_rank': None, 'home_name': 'Washington', 'home_abbr': 'washington', 'home_score': 72, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Washington', 'winning_abbr': 'washington', 'losing_name': 'USC', 'losing_abbr': 'southern-california'}, {'boxscore': '2020-01-05-16-george-washington', 'away_name': 'St. Bonaventure', 'away_abbr': 'st-bonaventure', 'away_score': 71, 'away_rank': None, 'home_name': 'George Washington', 'home_abbr': 'george-washington', 'home_score': 66, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'St. Bonaventure', 'winning_abbr': 'st-bonaventure', 'losing_name': 'George Washington', 'losing_abbr': 'george-washington'}, {'boxscore': '2020-01-05-16-xavier', 'away_name': "St. John's (NY)", 'away_abbr': 'st-johns-ny', 'away_score': 67, 'away_rank': None, 'home_name': 'Xavier', 'home_abbr': 'xavier', 'home_score': 75, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Xavier', 'winning_abbr': 'xavier', 'losing_name': "St. John's (NY)", 'losing_abbr': 'st-johns-ny'}, {'boxscore': '2020-01-05-13-maine', 'away_name': 'Stony Brook', 'away_abbr': 'stony-brook', 'away_score': 73, 'away_rank': None, 'home_name': 'Maine', 'home_abbr': 'maine', 'home_score': 52, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Stony Brook', 'winning_abbr': 'stony-brook', 'losing_name': 'Maine', 'losing_abbr': 'maine'}, {'boxscore': '2020-01-05-12-george-mason', 'away_name': 'VCU', 'away_abbr': 'virginia-commonwealth', 'away_score': 72, 'away_rank': None, 'home_name': 'George Mason', 'home_abbr': 'george-mason', 'home_score': 59, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'VCU', 'winning_abbr': 'virginia-commonwealth', 'losing_name': 'George Mason', 'losing_abbr': 'george-mason'}, {'boxscore': '2020-01-05-13-detroit-mercy', 'away_name': "Wright State", 'away_abbr': "wright-state", 'away_score': 70, 'away_rank': None, 'home_name': 'Detroit', 'home_abbr': 'detroit-mercy', 'home_score': 69, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Wright State', 'winning_abbr': 'wright-state', 'losing_name': "Detroit", 'losing_abbr': "detroit-mercy"} ], '1-6-2020': [ {'boxscore': '2020-01-06-21-oklahoma-state', 'away_name': 'West Virginia', 'away_abbr': 'west-virginia', 'away_score': 55, 'away_rank': 17, 'home_name': 'Oklahoma State', 'home_abbr': 'oklahoma-state', 'home_score': 41, 'home_rank': None, 'non_di': False, 'top_25': True, 'winning_name': 'West Virginia', 'winning_abbr': 'west-virginia', 'losing_name': 'Oklahoma State', 'losing_abbr': 'oklahoma-state'}, {'boxscore': '2020-01-06-20-jackson-state', 'away_name': 'Alabama A&M', 'away_abbr': 'alabama-am', 'away_score': 66, 'away_rank': None, 'home_name': 'Jackson State', 'home_abbr': 'jackson-state', 'home_score': 57, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Alabama A&M', 'winning_abbr': 'alabama-am', 'losing_name': 'Jackson State', 'losing_abbr': 'jackson-state'}, {'boxscore': '2020-01-06-20-grambling', 'away_name': 'Alabama State', 'away_abbr': 'alabama-state', 'away_score': 63, 'away_rank': None, 'home_name': 'Grambling', 'home_abbr': 'grambling', 'home_score': 68, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Grambling', 'winning_abbr': 'grambling', 'losing_name': 'Alabama State', 'losing_abbr': 'alabama-state'}, {'boxscore': '2020-01-06-20-texas-southern', 'away_name': 'Alcorn State', 'away_abbr': 'alcorn-state', 'away_score': 95, 'away_rank': None, 'home_name': 'Texas Southern', 'home_abbr': 'texas-southern', 'home_score': 80, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Alcorn State', 'winning_abbr': 'alcorn-state', 'losing_name': 'Texas Southern', 'losing_abbr': 'texas-southern'}, {'boxscore': '2020-01-06-19-howard', 'away_name': 'Bethune-Cookman', 'away_abbr': 'bethune-cookman', 'away_score': 102, 'away_rank': None, 'home_name': 'Howard', 'home_abbr': 'howard', 'home_score': 73, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Bethune-Cookman', 'winning_abbr': 'bethune-cookman', 'losing_name': 'Howard', 'losing_abbr': 'howard'}, {'boxscore': '2020-01-06-19-army', 'away_name': 'Colgate', 'away_abbr': 'colgate', 'away_score': 70, 'away_rank': None, 'home_name': 'Army', 'home_abbr': 'army', 'home_score': 65, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Colgate', 'winning_abbr': 'colgate', 'losing_name': 'Army', 'losing_abbr': 'army'}, {'boxscore': '2020-01-06-19-north-carolina-at', 'away_name': 'Florida A&M', 'away_abbr': 'florida-am', 'away_score': 90, 'away_rank': None, 'home_name': 'North Carolina A&T', 'home_abbr': 'north-carolina-at', 'home_score': 97, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'North Carolina A&T', 'winning_abbr': 'north-carolina-at', 'losing_name': 'Florida A&M', 'losing_abbr': 'florida-am'}, {'boxscore': '2020-01-06-19-arkansas-little-rock', 'away_name': 'Georgia Southern', 'away_abbr': 'georgia-southern', 'away_score': 73, 'away_rank': None, 'home_name': 'Little Rock', 'home_abbr': 'little-rock', 'home_score': 79, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Little Rock', 'winning_abbr': 'little-rock', 'losing_name': 'Georgia Southern', 'losing_abbr': 'georgia-southern'}, {'boxscore': '2020-01-06-20-arkansas-state', 'away_name': 'Georgia State', 'away_abbr': 'georgia-state', 'away_score': 87, 'away_rank': None, 'home_name': 'Arkansas State', 'home_abbr': 'arkansas-state', 'home_score': 90, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Arkansas State', 'winning_abbr': 'arkansas-state', 'losing_name': 'Georgia State', 'losing_abbr': 'georgia-state'}, {'boxscore': '2020-01-06-19-appalachian-state', 'away_name': 'Louisiana', 'away_abbr': 'louisiana', 'away_score': 81, 'away_rank': None, 'home_name': 'Appalachian State', 'home_abbr': 'appalachian-state', 'home_score': 73, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Louisiana', 'winning_abbr': 'louisiana', 'losing_name': 'Appalachian State', 'losing_abbr': 'appalachian-state'}, {'boxscore': '2020-01-06-19-coastal-carolina', 'away_name': 'Louisiana-Monroe', 'away_abbr': 'louisiana-monroe', 'away_score': 64, 'away_rank': None, 'home_name': 'Coastal Carolina', 'home_abbr': 'coastal-carolnia', 'home_score': 93, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Coastal Carolina', 'winning_abbr': 'coastal-carolina', 'losing_name': 'Louisiana-Monroe', 'losing_abbr': 'louisiana-monroe'}, {'boxscore': '2020-01-06-19-coppin-state', 'away_name': 'Norfolk State', 'away_abbr': 'norfolk-state', 'away_score': 82, 'away_rank': None, 'home_name': 'Coppin State', 'home_abbr': 'coppin-state', 'home_score': 59, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Norfolk State', 'winning_abbr': 'norfolk-state', 'losing_name': 'Coppin State', 'losing_abbr': 'coppin-state'}, {'boxscore': '2020-01-06-20-texas-arlington', 'away_name': 'South Alabama', 'away_abbr': 'south-alabama', 'away_score': 66, 'away_rank': None, 'home_name': 'Texas-Arlington', 'home_abbr': 'texas-arlington', 'home_score': 54, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'South Alabama', 'winning_abbr': 'south-alabama', 'losing_name': 'Texas-Arlington', 'losing_abbr': 'texas-arlington'}, {'boxscore': '2020-01-06-19-morgan-state', 'away_name': 'South Carolina State', 'away_abbr': 'south-carolina-state', 'away_score': 63, 'away_rank': None, 'home_name': 'Morgan State', 'home_abbr': 'morgan-state', 'home_score': 77, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Morgan State', 'winning_abbr': 'morgan-state', 'losing_name': 'South Carolina State', 'losing_abbr': 'south-carolina-state'}, {'boxscore': '2020-01-06-21-prairie-view', 'away_name': 'Southern', 'away_abbr': 'southern', 'away_score': 54, 'away_rank': None, 'home_name': 'Prairie View', 'home_abbr': 'prairie-view', 'home_score': 64, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Prairie View', 'winning_abbr': 'prairie-view', 'losing_name': 'Southern', 'losing_abbr': 'southern'}, {'boxscore': '2020-01-06-20-texas-state', 'away_name': 'Troy', 'away_abbr': 'troy', 'away_score': 71, 'away_rank': None, 'home_name': 'Texas State', 'home_abbr': 'texas-state', 'home_score': 63, 'home_rank': None, 'non_di': False, 'top_25': False, 'winning_name': 'Troy', 'winning_abbr': 'troy', 'losing_name': 'Texas State', 'losing_abbr': 'texas-state'} ] } @mock.patch('requests.get', side_effect=mock_pyquery) def test_boxscores_search_string_representation(self, *args, **kwargs): result = Boxscores(datetime(2020, 1, 5)) assert result.__repr__() == 'NCAAB games for 1-5-2020'
41.110478
78
0.437793
5,097
57,678
4.678438
0.083775
0.049987
0.046968
0.041433
0.736811
0.712908
0.698943
0.691143
0.682882
0.672608
0
0.047291
0.428812
57,678
1,402
79
41.1398
0.676521
0.006831
0
0.753495
0
0
0.37534
0.057371
0
0
0
0
0.00883
1
0.011773
false
0
0.006623
0.000736
0.025018
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
0eb0a8f9ad766e5dfaab13e68e0f57e269d67f78
981
py
Python
alpacka/envs/__init__.py
shoot-tree-search/sts
2d9f19a40c7fb1c637dd3bd230942c01f14927e1
[ "MIT" ]
2
2021-01-03T04:21:56.000Z
2021-02-12T12:54:58.000Z
alpacka/envs/__init__.py
shoot-tree-search/sts
2d9f19a40c7fb1c637dd3bd230942c01f14927e1
[ "MIT" ]
null
null
null
alpacka/envs/__init__.py
shoot-tree-search/sts
2d9f19a40c7fb1c637dd3bd230942c01f14927e1
[ "MIT" ]
null
null
null
"""Environments.""" import gin from alpacka.envs import bin_packing from alpacka.envs import cartpole from alpacka.envs import gfootball from alpacka.envs import octomaze from alpacka.envs import sokoban from alpacka.envs.base import * from alpacka.envs.wrappers import * # Configure envs in this module to ensure they're accessible via the # alpacka.envs.* namespace. def configure_env(env_class): return gin.external_configurable( env_class, module='alpacka.envs' ) ActionNoiseSokoban = configure_env(sokoban.ActionNoiseSokoban) # pylint: disable=invalid-name BinPacking = configure_env(bin_packing.BinPacking) # pylint: disable=invalid-name CartPole = configure_env(cartpole.CartPole) # pylint: disable=invalid-name GoogleFootball = configure_env(gfootball.GoogleFootball) # pylint: disable=invalid-name Octomaze = configure_env(octomaze.Octomaze) # pylint: disable=invalid-name Sokoban = configure_env(sokoban.Sokoban) # pylint: disable=invalid-name
35.035714
93
0.796126
123
981
6.252033
0.317073
0.128739
0.136541
0.187256
0
0
0
0
0
0
0
0
0.118247
981
27
94
36.333333
0.889017
0.286442
0
0
0
0
0.017467
0
0
0
0
0
0
1
0.055556
false
0
0.444444
0.055556
0.555556
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
1
0
1
0
0
3
7ec4be3802281f0f009f1059ea1169959c79b1bc
92
py
Python
Curso-em-video-Python/PycharmProjects/pythonExercicios/ex046 - ContagemRegressiva.py
sartinicj/curso-em-video-python
8cb4ca05a88351c44aa4a7befc59c9596a50f268
[ "MIT" ]
null
null
null
Curso-em-video-Python/PycharmProjects/pythonExercicios/ex046 - ContagemRegressiva.py
sartinicj/curso-em-video-python
8cb4ca05a88351c44aa4a7befc59c9596a50f268
[ "MIT" ]
null
null
null
Curso-em-video-Python/PycharmProjects/pythonExercicios/ex046 - ContagemRegressiva.py
sartinicj/curso-em-video-python
8cb4ca05a88351c44aa4a7befc59c9596a50f268
[ "MIT" ]
null
null
null
from time import sleep for i in range(10, 0, -1): print(i) sleep(1) print('Yeey!!')
15.333333
26
0.597826
17
92
3.235294
0.764706
0.218182
0
0
0
0
0
0
0
0
0
0.070423
0.228261
92
5
27
18.4
0.704225
0
0
0
0
0
0.065217
0
0
0
0
0
0
1
0
false
0
0.2
0
0.2
0.4
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
7ed22c3a12b83e7e397a2f42645d4d28f20c10a1
1,028
py
Python
setup.py
albarsil/pyschemavalidator-
18b6dddc41a2e48e87edd9c8744956c933a0954c
[ "MIT" ]
2
2021-07-14T22:16:11.000Z
2021-07-15T13:59:16.000Z
setup.py
albarsil/pyschemavalidator-
18b6dddc41a2e48e87edd9c8744956c933a0954c
[ "MIT" ]
null
null
null
setup.py
albarsil/pyschemavalidator-
18b6dddc41a2e48e87edd9c8744956c933a0954c
[ "MIT" ]
1
2021-11-08T17:51:56.000Z
2021-11-08T17:51:56.000Z
from setuptools import setup, find_packages def readme(): with open('README.md') as f: return f.read() setup( name='pyschemavalidator', version='1.0.4', description='Decorator for endpoint inputs on APIs and a dictionary/JSON validator.', long_description=readme(), long_description_content_type="text/markdown", url='https://github.com/albarsil/pyschemavalidator', author='Allan Barcelos', author_email='albarsil@gmail.com', license='MIT', classifiers=[ 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9' ], keywords=['api', 'flask', 'graphql', 'json', 'validation', 'schema', 'dictionary', 'graphql'], packages=find_packages(exclude=['tests.*', 'tests']), install_requires=[], test_suite='tests.test_suite' )
34.266667
98
0.640078
114
1,028
5.684211
0.649123
0.146605
0.192901
0.200617
0
0
0
0
0
0
0
0.015834
0.201362
1,028
29
99
35.448276
0.773447
0
0
0
0
0
0.483463
0
0
0
0
0
0
1
0.037037
true
0
0.037037
0
0.111111
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
7ed76cffa617d7dbb0eb5704950de02465bd2acc
239
py
Python
GPLT_Python/L1-003.py
upupming/algorithm
44edcffe886eaf4ce8c7b27a8db50d7ed5d29ef1
[ "MIT" ]
107
2019-10-25T07:46:59.000Z
2022-03-29T11:10:56.000Z
GPLT_Python/L1-003.py
upupming/algorithm
44edcffe886eaf4ce8c7b27a8db50d7ed5d29ef1
[ "MIT" ]
1
2021-08-13T05:42:27.000Z
2021-08-13T05:42:27.000Z
GPLT_Python/L1-003.py
upupming/algorithm
44edcffe886eaf4ce8c7b27a8db50d7ed5d29ef1
[ "MIT" ]
18
2020-12-09T14:24:22.000Z
2022-03-30T06:56:01.000Z
a = str(input()) b = {'0': 0, '1': 0, '2': 0, '3': 0, '4': 0, '5': 0, '6': 0, '7': 0, '8': 0, '9': 0} for i in a: b[i] = b[i] + 1 for i in range(len(b)): if b[str(i)] == 0: continue print(str(i) + ':' + str(b[str(i)]))
26.555556
84
0.376569
52
239
1.730769
0.423077
0.133333
0.133333
0
0
0
0
0
0
0
0
0.128655
0.284519
239
8
85
29.875
0.397661
0
0
0
0
0
0.046025
0
0
0
0
0
0
1
0
false
0
0
0
0
0.125
0
0
1
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
7eeeeddb273daae8d265bebeae3ae172280c5d3f
3,588
py
Python
src/sqlfluff/core/rules/functional/segment_predicates.py
r0fls/sqlfluff
3bc658e26758d1eb1ce35dade2e2cf064a4d6675
[ "MIT" ]
null
null
null
src/sqlfluff/core/rules/functional/segment_predicates.py
r0fls/sqlfluff
3bc658e26758d1eb1ce35dade2e2cf064a4d6675
[ "MIT" ]
null
null
null
src/sqlfluff/core/rules/functional/segment_predicates.py
r0fls/sqlfluff
3bc658e26758d1eb1ce35dade2e2cf064a4d6675
[ "MIT" ]
null
null
null
"""Defines commonly used segment predicates for rule writers. For consistency, all the predicates in this module are implemented as functions returning functions. This avoids rule writers having to remember the distinction between normal functions and functions returning functions. This is not necessarily a complete set of predicates covering all possible requirements. Rule authors can define their own predicates as needed, either as regular functions, `lambda`, etc. """ from typing import Callable from sqlfluff.core.parser import BaseSegment def is_type(*seg_type: str) -> Callable[[BaseSegment], bool]: """Returns a function that determines if segment is one of the types.""" def _(segment: BaseSegment): return segment.is_type(*seg_type) return _ def is_name(*seg_name: str) -> Callable[[BaseSegment], bool]: """Returns a function that determines if segment is one of the names.""" def _(segment: BaseSegment): return segment.is_name(*seg_name) return _ def is_keyword(*keyword_name) -> Callable[[BaseSegment], bool]: """Returns a function that determines if it's a matching keyword.""" return and_(is_type("keyword"), is_name(*keyword_name)) def is_code() -> Callable[[BaseSegment], bool]: """Returns a function that checks if segment is code.""" def _(segment: BaseSegment) -> bool: return segment.is_code return _ def is_comment() -> Callable[[BaseSegment], bool]: """Returns a function that checks if segment is comment.""" def _(segment: BaseSegment) -> bool: return segment.is_comment return _ def is_expandable() -> Callable[[BaseSegment], bool]: """Returns a function that checks if segment is expandable.""" def _(segment: BaseSegment) -> bool: return segment.is_expandable return _ def is_meta() -> Callable[[BaseSegment], bool]: """Returns a function that checks if segment is meta.""" def _(segment: BaseSegment) -> bool: return segment.is_meta return _ def is_raw() -> Callable[[BaseSegment], bool]: """Returns a function that checks if segment is raw.""" def _(segment: BaseSegment) -> bool: return segment.is_raw() return _ def is_whitespace() -> Callable[[BaseSegment], bool]: """Returns a function that checks if segment is whitespace.""" def _(segment: BaseSegment) -> bool: return segment.is_whitespace return _ def get_type() -> Callable[[BaseSegment], str]: """Returns a function that gets segment type.""" def _(segment: BaseSegment) -> str: return segment.get_type() return _ def get_name() -> Callable[[BaseSegment], str]: """Returns a function that gets segment name.""" def _(segment: BaseSegment) -> str: return segment.get_name() return _ def and_(*functions: Callable[[BaseSegment], bool]) -> Callable[[BaseSegment], bool]: """Returns a function that computes the functions and-ed together.""" def _(segment: BaseSegment): return all(function(segment) for function in functions) return _ def or_(*functions: Callable[[BaseSegment], bool]) -> Callable[[BaseSegment], bool]: """Returns a function that computes the functions or-ed together.""" def _(segment: BaseSegment): return any(function(segment) for function in functions) return _ def not_(fn: Callable[[BaseSegment], bool]) -> Callable[[BaseSegment], bool]: """Returns a function that computes: not fn().""" def _(segment: BaseSegment): return not fn(segment) return _
26.382353
85
0.687291
440
3,588
5.470455
0.202273
0.130868
0.143332
0.116327
0.620274
0.620274
0.559618
0.426672
0.38845
0.321562
0
0
0.201784
3,588
135
86
26.577778
0.840433
0.346711
0
0.464286
0
0
0.003088
0
0
0
0
0
0
1
0.482143
false
0
0.035714
0.232143
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
1
0
0
0
1
1
0
0
3
7efc02867d62088c24fe38cb0e01aef98549a474
585
py
Python
source/intentionally_blank/ext/formatters/eof_newline/formatter.py
sixty-north/intentionally-blank
ef00c91003811b05170f417a3acbcf4bf92bd643
[ "MIT" ]
null
null
null
source/intentionally_blank/ext/formatters/eof_newline/formatter.py
sixty-north/intentionally-blank
ef00c91003811b05170f417a3acbcf4bf92bd643
[ "MIT" ]
null
null
null
source/intentionally_blank/ext/formatters/eof_newline/formatter.py
sixty-north/intentionally-blank
ef00c91003811b05170f417a3acbcf4bf92bd643
[ "MIT" ]
null
null
null
from intentionally_blank.formatter import Formatter class NewlineAtEofFormatter(Formatter): """Ensure the last line of the file has a newline terminator. """ def format(self, lines): """ Args: lines: An iterable series of strings, each with a newline terminator. Yields: An iterable series of strings, each with a newline terminator. """ return map(ensure_newline_terminator, lines) def ensure_newline_terminator(line): if line.endswith("\n"): return line return f"{line}\n"
25.434783
81
0.635897
68
585
5.397059
0.514706
0.231608
0.147139
0.098093
0.277929
0.277929
0.277929
0.277929
0.277929
0.277929
0
0
0.28547
585
22
82
26.590909
0.87799
0.374359
0
0
0
0
0.032787
0
0
0
0
0
0
1
0.25
false
0
0.125
0
0.875
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
7d0655be98836fde86e8a90e510ed3097683aff2
967
py
Python
crits/comments/urls.py
dutrow/crits
6b357daa5c3060cf622d3a3b0c7b41a9ca69c049
[ "MIT" ]
738
2015-01-02T12:39:55.000Z
2022-03-23T11:05:51.000Z
crits/comments/urls.py
dutrow/crits
6b357daa5c3060cf622d3a3b0c7b41a9ca69c049
[ "MIT" ]
605
2015-01-01T01:03:39.000Z
2021-11-17T18:51:07.000Z
crits/comments/urls.py
dutrow/crits
6b357daa5c3060cf622d3a3b0c7b41a9ca69c049
[ "MIT" ]
316
2015-01-07T12:35:01.000Z
2022-03-30T04:44:30.000Z
from django.conf.urls import url from . import views urlpatterns = [ url(r'^remove/(?P<obj_type>\S+)/(?P<obj_id>\S+)/$', views.remove_comment, name='crits-comments-views-remove_comment'), url(r'^(?P<method>\S+)/(?P<obj_type>\S+)/(?P<obj_id>\S+)/$', views.add_update_comment, name='crits-comments-views-add_update_comment'), url(r'^activity/$', views.activity, name='crits-comments-views-activity'), url(r'^activity/(?P<atype>\S+)/(?P<value>\S+)/$', views.activity, name='crits-comments-views-activity'), url(r'^activity/get_new_comments/$', views.get_new_comments, name='crits-comments-views-get_new_comments'), url(r'^search/(?P<stype>[A-Za-z0-9\-\._]+)/(?P<sterm>.+?)/$', views.comment_search, name='crits-comments-views-comment_search'), url(r'^list/$', views.comments_listing, name='crits-comments-views-comments_listing'), url(r'^list/(?P<option>\S+)/$', views.comments_listing, name='crits-comments-views-comments_listing'), ]
64.466667
139
0.688728
144
967
4.465278
0.256944
0.18196
0.211509
0.273717
0.587869
0.413686
0.413686
0.413686
0.413686
0.171073
0
0.00223
0.072389
967
14
140
69.071429
0.714604
0
0
0
0
0.083333
0.554292
0.535677
0
0
0
0
0
1
0
false
0
0.166667
0
0.166667
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
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
7d0bbe8da578c249333be408a98ef7bf3a18a601
2,068
py
Python
wms/config/wms.py
bhavesh95863/WMS
c45858a943a607e5d0b49f698e469f3362aae001
[ "MIT" ]
null
null
null
wms/config/wms.py
bhavesh95863/WMS
c45858a943a607e5d0b49f698e469f3362aae001
[ "MIT" ]
null
null
null
wms/config/wms.py
bhavesh95863/WMS
c45858a943a607e5d0b49f698e469f3362aae001
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "label": _("WMS"), "icon": "octicon octicon-briefcase", "items": [ { "type": "doctype", "name": "WMS Lead", "label": _("WMS Lead") }, { "type": "doctype", "name": "Send SMS", "label": _("Send SMS") }, { "type": "doctype", "name": "Message Template", "label": _("Message Template") }, { "type": "doctype", "name": "Group", "label": _("Group") }, { "type": "doctype", "name": "WhatsApp Setting", "label": _("WhatsApp Setting") }, { "type": "doctype", "name": "WMS Task", "label": _("Task") }, { "type": "doctype", "name": "WMS Task Rule", "label": _("Task Rule") }, { "type": "doctype", "name": "Message Rule", "label": _("Message Rule") } ] }, { "label": _("Reports"), "icon": "octicon octicon-briefcase", "items": [ { "type": "report", "name": "Performance Report", "doctype": "WMS Task", "is_query_report": True }, { "type": "doctype", "name": "Whatsapp Message Log", "label": _("Whatsapp Message Log") } ] } ]
29.126761
55
0.287718
110
2,068
5.227273
0.327273
0.172174
0.234783
0.093913
0.201739
0.125217
0
0
0
0
0
0
0.581721
2,068
70
56
29.542857
0.66474
0
0
0.191176
0
0
0.267267
0
0
0
0
0
0
1
0.014706
true
0
0.029412
0.014706
0.058824
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
1
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
7d397f642d7aef0cc79a1f55aff842d15208de96
198
py
Python
reviewboard/site/evolutions/localsite_public.py
BarracudaPff/code-golf-data-pythpn
42e8858c2ebc6a061012bcadb167d29cebb85c5e
[ "MIT" ]
null
null
null
reviewboard/site/evolutions/localsite_public.py
BarracudaPff/code-golf-data-pythpn
42e8858c2ebc6a061012bcadb167d29cebb85c5e
[ "MIT" ]
null
null
null
reviewboard/site/evolutions/localsite_public.py
BarracudaPff/code-golf-data-pythpn
42e8858c2ebc6a061012bcadb167d29cebb85c5e
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django_evolution.mutations import AddField from django.db import models MUTATIONS = [AddField("LocalSite", "public", models.BooleanField, initial=False)]
49.5
81
0.833333
24
198
6.625
0.666667
0.125786
0
0
0
0
0
0
0
0
0
0
0.085859
198
4
81
49.5
0.878453
0
0
0
0
0
0.075377
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
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
7d4b8c1cbb3320cfef8a2500aa0c61c3209c9888
9,655
py
Python
faro/utils.py
cgiraldo/FARO
aa599fe8eebb489fe032549ec52771574a6d04bd
[ "MIT" ]
null
null
null
faro/utils.py
cgiraldo/FARO
aa599fe8eebb489fe032549ec52771574a6d04bd
[ "MIT" ]
null
null
null
faro/utils.py
cgiraldo/FARO
aa599fe8eebb489fe032549ec52771574a6d04bd
[ "MIT" ]
null
null
null
import re import gensim.utils as gensim_utils def normalize_text_proximity(message): """ Clean text of dots between words Keyword arguments: message -- a plain sentence or paragraph """ sent = message.lower() sent = sent.replace("á", "a") sent = sent.replace("é", "e") sent = sent.replace("í", "i") sent = sent.replace("ó", "o") sent = sent.replace("ú", "u") sent = re.sub(r'(?i)(?<=[a-z])\.(?=[a-z])', "", sent) return sent def clean_text(message): """ Delete extra characters from text before validation Keyword arguments: message -- a plain sentence or paragraph """ sent = re.sub(r'[\-_*+,\(\).:]{1,}', "", message) sent = re.sub(r'[ ]{1,}', "", sent) sent = re.sub(r'(?i)\bnº', "", sent) return sent def preprocess_text(message): """ Delete some artifacts from text Keyword arguments: message -- a plain sentence or paragraph """ uni_message = gensim_utils.to_unicode(message) uni_message = uni_message.replace("\t", " ") uni_message = uni_message.replace("\r\n", " ") uni_message = uni_message.replace("\r", " ") uni_message = uni_message.replace("\n", " ") return uni_message def word2features(sent, i): """ Extract features of a node in the "sent" list for a CRF Keyword arguments: sent -- a list of triples <word, PoS tag, label> i -- index of the node to extract the featues """ word = sent[i][0] postag = sent[i][1] features = { 'bias': 1.0, 'word': word, 'word.lower()': word.lower(), 'word.istitle()': word.istitle(), 'word[-3:]': word[-3:], 'word[:3]': word[:3], 'word.isdigit()': word.isdigit(), 'postag': postag, } if i > 0: word1 = sent[i-1][0] postag1 = sent[i-1][1] features.update({ '-1:word': word1, '-1:word.lower()': word1.lower(), '-1:word.istitle': word1.istitle(), '-1:postag': postag1, }) else: features['BOS'] = True # EXTRA if i > 2: word1 = sent[i-2][0] postag1 = sent[i-2][1] features.update({ '-2:word': word1, '-2:word.lower()': word1.lower(), '-2:word.istitle': word1.istitle(), '-2:word.postag': postag1, }) if i > 3: word1 = sent[i-3][0] postag1 = sent[i-3][1] features.update({ '-3:word': word1, '-3:word.lower()': word1.lower(), '-3:word.istitle': word1.istitle(), '-3:word.postag': postag1, }) if i > 2: word0 = sent[i][0] postag0 = sent[i][1] word1 = sent[i-1][0] postag1 = sent[i-1][1] features.update({ '-01:word': word1 + word0, '-01:word.lower()': (word1 + " " + word0).lower(), '-01:word0_postag1': postag1 + word0, '-01:word1_postag0': postag0 + word1, }) if i > 3: word0 = sent[i][0] word1 = sent[i-2][0] postag0 = sent[i][1] postag1 = sent[i-2][1] features.update({ '-02:word': word1 + word0, '-02:word.lower()': (word1 + " " + word0).lower(), '-02:word0_postag1': postag1 + word0, '-02:word1_postag0': postag0 + word1, }) if i < len(sent) - 2: word1 = sent[i+2][0] postag1 = sent[i+2][1] features.update({ '+2:word': word1, '+2:word.lower()': word1.lower(), '+2:word.istitle': word1.istitle(), '+2:word.postag': postag1, }) if i < len(sent)-1: word1 = sent[i+1][0] postag1 = sent[i+1][1] features.update({ '+1:word': word1, '+1:word.lower()': word1.lower(), '+1:word.istitle()': word1.istitle(), '+1:postag': postag1, }) else: features['EOS'] = True return features def char2features_mail(sent, i): """ Extract features of a node (for the mail CRF) Keyword arguments: sent -- a list of pairs <word, label> i -- index of the node to extract the featues """ word = sent[i][0] features = { 'bias': 1.0, 'char.lower()': word.lower(), } if i > 0: word1 = sent[i-1][0] features.update({ '-1:char.lower()': word1.lower(), }) else: features['BOS'] = True if i < len(sent)-1: word1 = sent[i+1][0] features.update({ '+1:char.lower()': word1.lower(), }) else: features['EOS'] = True # EXTRA if i > 2: word1 = sent[i-2][0] features.update({ '-2:char.lower()': word1.lower(), }) if i > 3: word1 = sent[i-3][0] features.update({ '-3:char.lower()': word1.lower(), }) if i > 4: word1 = sent[i-4][0] features.update({ '-4:char.lower()': word1.lower(), }) if i > 5: word1 = sent[i-5][0] features.update({ '-5:char.lower()': word1.lower(), }) if i > 6: word1 = sent[i-6][0] features.update({ '-6:char.lower()': word1.lower(), }) if i > 7: word1 = sent[i-7][0] features.update({ '-7:char.lower()': word1.lower(), }) if i > 8: word1 = sent[i-8][0] features.update({ '-8:char.lower()': word1.lower(), }) if i < len(sent) - 2: word1 = sent[i+2][0] features.update({ '+2:char.lower()': word1.lower(), }) if i < len(sent) - 3: word1 = sent[i+3][0] features.update({ '+3:char.lower()': word1.lower(), }) if i < len(sent) - 4: word1 = sent[i+4][0] features.update({ '+4:char.lower()': word1.lower(), }) if i < len(sent) - 5: word1 = sent[i+5][0] features.update({ '+5:char.lower()': word1.lower(), }) if i < len(sent) - 6: word1 = sent[i+6][0] features.update({ '+6:char.lower()': word1.lower(), }) if i < len(sent) - 7: word1 = sent[i+7][0] features.update({ '+7:char.lower()': word1.lower(), }) if i < len(sent) - 8: word1 = sent[i+8][0] features.update({ '+8:char.lower()': word1.lower(), }) return features def char2features_space(sent, i): """ Extract features of a node (for the whitespace-CRF detector) Keyword arguments: sent -- a list of pairs <word, label> i -- index of the node to extract the featues """ word = sent[i][0] features = { 'bias': 1.0, 'char': word, 'char.lower()': word.lower(), } if i > 0: word1 = sent[i-1][0] features.update({ '-1:char': word1, '-1:char.lower()': word1.lower(), '-1:char.isdigit()': word1.isdigit(), }) else: features['BOS'] = True if i < len(sent)-1: word1 = sent[i+1][0] features.update({ '+1:char': word1, '+1:char.lower()': word1.lower(), '+1:char.isdigit()': word1.isdigit(), }) else: features['EOS'] = True # EXTRA if i > 2: word1 = sent[i-2][0] features.update({ '-2:char': word1, '-2:char.lower()': word1.lower(), '-2:char.isdigit()': word1.isdigit(), }) if i > 2: word1 = sent[i-2][0] word2 = sent[i-1][0] features.update({ '-21:char.lower()': word1.lower() + word2.lower(), '-21:char.isdigit()': word1.isdigit() and word2.isdigit(), }) if i > 3: word1 = sent[i-3][0] features.update({ '-3:char': word1, '-3:char.lower()': word1.lower(), '-3:char.isdigit()': word1.isdigit(), }) if i > 3: word1 = sent[i-3][0] word2 = sent[i-2][0] features.update({ '-32:char.lower()': word1.lower() + word2.lower(), '-32:char.isdigit()': word1.isdigit() and word2.isdigit(), }) if i < len(sent) - 2: word1 = sent[i+2][0] features.update({ '+2:char': word1, '+2:char.lower()': word1.lower(), '+2:char.isdigit()': word1.isdigit(), }) if i < len(sent) - 2: word1 = sent[i+1][0] word2 = sent[i+2][0] features.update({ '+21:char.lower()': word1.lower() + word2.lower(), '+21:char.isdigit()': word1.isdigit() and word2.isdigit(), }) if i < len(sent) - 3: word1 = sent[i+3][0] features.update({ '+3:char': word1, '+3:char.lower()': word1.lower(), '+3:char.isdigit()': word1.isdigit(), }) if i < len(sent) - 3: word1 = sent[i+2][0] word2 = sent[i+3][0] features.update({ '+32:char.lower()': word1.lower() + word2.lower(), '+32:char.isdigit()': word1.isdigit() and word2.isdigit(), }) if i < len(sent) - 3: word0 = sent[i][0] word1 = sent[i+1][0] word2 = sent[i+2][0] features.update({ '+02:lower()': (word0 + word1 + word2).lower(), '+02:isdigit()': (word0 + word1 + word2).isdigit(), }) return features
24.017413
70
0.46028
1,160
9,655
3.810345
0.091379
0.065611
0.076923
0.111765
0.789367
0.74638
0.721719
0.69638
0.655882
0.608597
0
0.06251
0.352149
9,655
401
71
24.077307
0.644125
0.083273
0
0.577855
0
0
0.138493
0.002871
0
0
0
0
0
1
0.020761
false
0
0.00692
0
0.048443
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
adb376c4779c93a08c2bf6100553c99275ca06ea
6,077
py
Python
examples/hand_pose_estimation/processors_keypoints.py
ManuelMeder/paz
6de73c0a99e0f9c7233c2797eebba2bb01631e6c
[ "MIT" ]
null
null
null
examples/hand_pose_estimation/processors_keypoints.py
ManuelMeder/paz
6de73c0a99e0f9c7233c2797eebba2bb01631e6c
[ "MIT" ]
null
null
null
examples/hand_pose_estimation/processors_keypoints.py
ManuelMeder/paz
6de73c0a99e0f9c7233c2797eebba2bb01631e6c
[ "MIT" ]
null
null
null
import numpy as np from backend_keypoints import create_score_maps, extract_2D_keypoints from backend_keypoints import crop_image_from_coordinates, extract_keypoints from backend_keypoints import crop_image_from_mask, extract_hand_segment from backend_keypoints import extract_bounding_box, find_max_location from backend_keypoints import extract_dominant_hand_visibility from backend_keypoints import extract_dominant_keypoints2D from backend_keypoints import flip_right_to_left_hand from backend_keypoints import get_hand_side_and_keypooints from backend_keypoints import normalize_keypoints from paz.abstract import Processor class ExtractHandmask(Processor): """Extract Hand mask from the segmentation label provided. The pixels with value greater than 1 belongs to hands """ def __init__(self): super(ExtractHandmask, self).__init__() def call(self, segmentation_label): return extract_hand_segment(segmentation_label=segmentation_label) class ExtractHandsideandKeypoints(Processor): """Extract Hand Side by counting the number of pixels belonging to each hand. """ def __init__(self): super(ExtractHandsideandKeypoints, self).__init__() def call(self, hand_parts_mask, keypoints3D): return get_hand_side_and_keypooints(hand_parts_mask, keypoints3D) class NormalizeKeypoints(Processor): """Normalize KeyPoints. """ def __init__(self): super(NormalizeKeypoints, self).__init__() def call(self, keypoints3D): return normalize_keypoints(keypoints3D) class FlipRightHandToLeftHand(Processor): """Flip Right hand keypoints to Left hand keypoints. """ def __init__(self, flip_to_left=True): super(FlipRightHandToLeftHand, self).__init__() self.flip_to_left = flip_to_left def call(self, keypoints3D): return flip_right_to_left_hand(keypoints3D, self.flip_to_left) class ExtractDominantHandVisibility(Processor): """Extract hand Visibility of Left or Right hand based on the dominant_hand flag. """ def __init__(self): super(ExtractDominantHandVisibility, self).__init__() def call(self, keypoint_visibility, dominant_hand): return extract_dominant_hand_visibility(keypoint_visibility, dominant_hand) class ExtractDominantKeypoints2D(Processor): """Extract hand keypoints of Left or Right hand based on the dominant_hand flag. """ def __init__(self): super(ExtractDominantKeypoints2D, self).__init__() def call(self, keypoint_visibility, dominant_hand): return extract_dominant_keypoints2D(keypoint_visibility, dominant_hand) class CropImageFromMask(Processor): """Crop Image from Mask. """ def __init__(self, image_size=(320, 320, 3), crop_size=256): super(CropImageFromMask, self).__init__() self.image_size = image_size self.crop_size = crop_size def call(self, keypoints, keypoint_visibility, image, camera_matrix): return crop_image_from_mask(keypoints, keypoint_visibility, image, self.image_size, self.crop_size, camera_matrix) class CreateScoremaps(Processor): """Create Gaussian Score maps representing 2D Keypoints. image_size: Size of the input image crop_size: Cropped Image size variance: variance of the gaussian scoremap to be generated """ def __init__(self, image_size, crop_size, variance): super(CreateScoremaps, self).__init__() self.image_size = image_size self.crop_size = crop_size self.variance = variance def call(self, keypoints2D, keypoints_visibility): return create_score_maps(keypoints2D, keypoints_visibility, self.image_size, self.crop_size, self.variance) class Extract2DKeypoints(Processor): """ Extract the keyppoints based on the visibility of the hand""" def __init__(self): super(Extract2DKeypoints, self).__init__() def call(self, keypoint_visibility): return extract_2D_keypoints(keypoint_visibility) class ExtractBoundingbox(Processor): """ Extract bounding box from a binary mask""" def __init__(self): super(ExtractBoundingbox, self).__init__() def call(self, binary_hand_mask): return extract_bounding_box(binary_hand_mask) class AdjustCropSize(Processor): """ Adjust the crop size with a buffer of scale 0.25 added""" def __init__(self, crop_size=256): super(AdjustCropSize, self).__init__() self.crop_size = crop_size def call(self, crop_size_best): crop_size_best = crop_size_best.astype(dtype=np.float64) crop_size_best = crop_size_best * 1.25 scaled_crop = np.maximum(self.crop_size / crop_size_best, 0.25) scaled_crop = np.minimum(scaled_crop, 5.0) return scaled_crop class CropImage(Processor): """ Crop the input image provided the location, output image size and the scaling of the output image""" def __init__(self, crop_size=256): super(CropImage, self).__init__() self.crop_size = crop_size def call(self, image, crop_location, scale): return crop_image_from_coordinates(image, crop_location, self.crop_size, scale) class ExtractKeypoints(Processor): """ Extract keypoints when provided with a predicted scoremap""" def __init__(self): super(ExtractKeypoints, self).__init__() def call(self, keypoint_scoremaps): return extract_keypoints(keypoint_scoremaps) class FindMaxLocation(Processor): """ Find the brightest point in the score map, which is represented as a keypoint""" def __init__(self): super(FindMaxLocation, self).__init__() def call(self, scoremaps): keypoints_2D = find_max_location(scoremaps) return keypoints_2D
31.984211
80
0.70413
705
6,077
5.689362
0.18156
0.047868
0.038394
0.05834
0.328596
0.212665
0.158065
0.135378
0.108701
0.108701
0
0.010377
0.222972
6,077
189
81
32.153439
0.839051
0.170479
0
0.23
0
0
0
0
0
0
0
0
0
1
0.28
false
0
0.11
0.12
0.67
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
adb5fa9a4046aad685ec8217a10885613f798277
56
py
Python
devday/sponsoring/__init__.py
jenslauterbach/devday_website
a827c9237e656842542eff07ec9fa7b39716a0ee
[ "CC-BY-4.0", "BSD-3-Clause" ]
6
2018-09-30T20:18:01.000Z
2020-03-12T09:03:38.000Z
devday/sponsoring/__init__.py
jenslauterbach/devday_website
a827c9237e656842542eff07ec9fa7b39716a0ee
[ "CC-BY-4.0", "BSD-3-Clause" ]
260
2018-09-30T14:17:57.000Z
2022-03-04T13:48:34.000Z
devday/sponsoring/__init__.py
jenslauterbach/devday_website
a827c9237e656842542eff07ec9fa7b39716a0ee
[ "CC-BY-4.0", "BSD-3-Clause" ]
9
2018-09-30T13:17:21.000Z
2020-10-03T12:55:05.000Z
default_app_config = 'sponsoring.apps.SponsoringConfig'
28
55
0.857143
6
56
7.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.053571
56
1
56
56
0.867925
0
0
0
0
0
0.571429
0.571429
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
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
adcc36ffc2e2e8f7a5b13fe702db8dab22da84df
381
py
Python
megalinter/tests/test_megalinter/linters/rust_clippy_test.py
private-forks/mega-linter
e22555d5dd18f6e7c32057b87b366d22f61a115d
[ "MIT" ]
null
null
null
megalinter/tests/test_megalinter/linters/rust_clippy_test.py
private-forks/mega-linter
e22555d5dd18f6e7c32057b87b366d22f61a115d
[ "MIT" ]
37
2021-05-12T06:28:04.000Z
2022-03-31T10:14:51.000Z
megalinter/tests/test_megalinter/linters/rust_clippy_test.py
private-forks/mega-linter
e22555d5dd18f6e7c32057b87b366d22f61a115d
[ "MIT" ]
null
null
null
# !/usr/bin/env python3 """ Unit tests for RUST linter clippy This class has been automatically generated by .automation/build.py, please do not update it manually """ from unittest import TestCase from megalinter.tests.test_megalinter.LinterTestRoot import LinterTestRoot class rust_clippy_test(TestCase, LinterTestRoot): descriptor_id = "RUST" linter_name = "clippy"
25.4
101
0.784777
50
381
5.88
0.72
0.068027
0
0
0
0
0
0
0
0
0
0.003058
0.141732
381
14
102
27.214286
0.896024
0.414698
0
0
1
0
0.046512
0
0
0
0
0
0
1
0
false
0
0.4
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
1
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
3
ade3eb7e1347229abd0cf82b50e4a088e04ffa76
543
py
Python
pacote-download/Python/modulo01/python01/Aula08.py
fabiosabariego/curso-python
a4ffff53ff9e92b5ef0de637e9bcce25f7feebd9
[ "MIT" ]
null
null
null
pacote-download/Python/modulo01/python01/Aula08.py
fabiosabariego/curso-python
a4ffff53ff9e92b5ef0de637e9bcce25f7feebd9
[ "MIT" ]
null
null
null
pacote-download/Python/modulo01/python01/Aula08.py
fabiosabariego/curso-python
a4ffff53ff9e92b5ef0de637e9bcce25f7feebd9
[ "MIT" ]
null
null
null
# ------------------------------- UTILIZANDO MODULOS - AULA 08 ------------------------------- # BIBLIOTECA MATH #from math import sqrt #num = int(input('Digite um Numero: ')) #raiz = sqrt(num) #print('O Valor da raiz de {} é: {:.2f}'.format(num, raiz)) # BIBLIOTECA RANDOM #import random # num = random.random() -> Esta é uma opção de gerar numeros randomicos, neste caso gera qualquer numero de 0 a 1. #num = random.randint(1, 10) #print(num) import emoji print(emoji.emojize("Olá, mundo! :purple_heart:", use_aliases=True))
20.884615
118
0.604052
73
543
4.465753
0.671233
0.042945
0
0
0
0
0
0
0
0
0
0.017544
0.160221
543
25
119
21.72
0.697368
0.78453
0
0
0
0
0.247619
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
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
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
1
0
3
adf09047622763f9323976214e678f90e9ed8ff9
1,708
py
Python
project_name/urls.py
rafael-rpa/django-auth-extension-boilerplate
2fba1f4dc6a14da525c93303e86934682f4bfcbc
[ "MIT" ]
1
2017-04-26T10:13:34.000Z
2017-04-26T10:13:34.000Z
project_name/urls.py
rafael-rpa/django-auth-extension-boilerplate
2fba1f4dc6a14da525c93303e86934682f4bfcbc
[ "MIT" ]
null
null
null
project_name/urls.py
rafael-rpa/django-auth-extension-boilerplate
2fba1f4dc6a14da525c93303e86934682f4bfcbc
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.conf.urls import include, url from django.contrib import admin from auth_extension import views as auth_views from django.contrib.auth.views import login, logout, password_reset, password_reset_done, password_reset_confirm, password_reset_complete from django.conf import settings from django.conf.urls.static import static urlpatterns = [ url(r'^$', auth_views.dashboard, name='dashboard'), url(r'^register/$', auth_views.register, name='register'), url(r'^login/$', login, {'template_name': 'login.html'}, name='login'), url(r'^logout/$', logout, {'next_page': '/'}, name='logout'), url(r'^account/edit/$', auth_views.account_edit, name='account-edit'), url(r'^account/change-password/$', auth_views.change_password, name='change-password'), url(r'^password/reset/$', password_reset, {'template_name': 'password-reset-form.html', 'subject_template_name': 'password_reset_subject.txt', 'post_reset_redirect': '/password/reset/done/', 'html_email_template_name': 'password-reset-email.html'}, name='password-reset'), url(r'^password/reset/done/$', password_reset_done, {'template_name': 'password-reset-done.html'}), url(r'^password/reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', password_reset_confirm, {'template_name': 'password-reset-confirm.html', 'post_reset_redirect': '/password/done/'}, name='password_reset_confirm'), url(r'^password/done/$', password_reset_complete, {'template_name': 'password-reset-complete.html'}), url(r'^admin/', admin.site.urls), ] if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
55.096774
276
0.730094
237
1,708
5.050633
0.248945
0.21721
0.113617
0.125313
0.061821
0
0
0
0
0
0
0.008997
0.088993
1,708
30
277
56.933333
0.760283
0
0
0
0
0.045455
0.394614
0.223653
0
0
0
0
0
1
0
false
0.272727
0.318182
0
0.318182
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
0
1
1
0
0
0
0
3
adf6daa9b589cfc3315f30adb8aabf6d767de08b
808
py
Python
catalyst/dl/callbacks/metrics/__init__.py
TeAmP0is0N/catalyst
445e366266196a2f1076cc7fa2438d66dfa58c14
[ "Apache-2.0" ]
1
2020-09-24T00:34:06.000Z
2020-09-24T00:34:06.000Z
catalyst/dl/callbacks/metrics/__init__.py
TeAmP0is0N/catalyst
445e366266196a2f1076cc7fa2438d66dfa58c14
[ "Apache-2.0" ]
null
null
null
catalyst/dl/callbacks/metrics/__init__.py
TeAmP0is0N/catalyst
445e366266196a2f1076cc7fa2438d66dfa58c14
[ "Apache-2.0" ]
1
2020-09-24T00:34:07.000Z
2020-09-24T00:34:07.000Z
# flake8: noqa from catalyst.dl.callbacks.metrics.accuracy import ( AccuracyCallback, MultiLabelAccuracyCallback, ) from catalyst.dl.callbacks.metrics.auc import AUCCallback from catalyst.dl.callbacks.metrics.cmc import CMCScoreCallback from catalyst.dl.callbacks.metrics.dice import ( DiceCallback, MultiClassDiceMetricCallback, MulticlassDiceMetricCallback, ) from catalyst.dl.callbacks.metrics.f1_score import F1ScoreCallback from catalyst.dl.callbacks.metrics.iou import ( ClasswiseIouCallback, ClasswiseJaccardCallback, IouCallback, JaccardCallback, ) from catalyst.dl.callbacks.metrics.ppv_tpr_f1 import ( PrecisionRecallF1ScoreCallback, ) from catalyst.dl.callbacks.metrics.precision import ( AveragePrecisionCallback, MeanAveragePrecisionCallback, )
27.862069
66
0.804455
76
808
8.513158
0.421053
0.148377
0.173107
0.284389
0.370943
0
0
0
0
0
0
0.007082
0.126238
808
28
67
28.857143
0.909348
0.014851
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.32
0
0.32
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
1
0
1
0
0
0
0
3
adff3e929b131603bc3d8d375940f959a87b03cb
138
py
Python
Exe22.py
flavioUENP/aula1
8deba1de0ac54109c54d7e44d2852a8ca639e625
[ "Apache-2.0" ]
null
null
null
Exe22.py
flavioUENP/aula1
8deba1de0ac54109c54d7e44d2852a8ca639e625
[ "Apache-2.0" ]
null
null
null
Exe22.py
flavioUENP/aula1
8deba1de0ac54109c54d7e44d2852a8ca639e625
[ "Apache-2.0" ]
null
null
null
f=float(input("Digite a temperatura na escala Farenheit: ")) celsius=5/9*(f-32) print("A temperatura",f,"ºF, Em Célsius é: ",celsius,"ºC")
46
60
0.702899
24
138
4.041667
0.791667
0.247423
0
0
0
0
0
0
0
0
0
0.032
0.094203
138
3
61
46
0.744
0
0
0
0
0
0.539568
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
bc2ade7603e85b28fb608daaa69727e893191a3a
194
py
Python
setup.py
khuong507/bluemix-cloudbase-init
10628014687c5f0cfb183f5e8f182856078fa5fa
[ "Apache-2.0" ]
3
2019-05-30T02:41:17.000Z
2019-11-11T09:59:07.000Z
setup.py
khuong507/bluemix-cloudbase-init
10628014687c5f0cfb183f5e8f182856078fa5fa
[ "Apache-2.0" ]
1
2021-02-05T14:51:01.000Z
2021-02-11T08:37:31.000Z
setup.py
khuong507/bluemix-cloudbase-init
10628014687c5f0cfb183f5e8f182856078fa5fa
[ "Apache-2.0" ]
2
2017-08-10T13:44:23.000Z
2019-12-19T15:08:52.000Z
from distutils.core import setup setup(name='Bluemix', version='0.1', description='A bluemix datasource to be used with cloudbase-init', packages=['bluemix', 'bluemix.conf'])
27.714286
72
0.685567
25
194
5.32
0.84
0
0
0
0
0
0
0
0
0
0
0.012579
0.180412
194
6
73
32.333333
0.823899
0
0
0
0
0
0.412371
0
0
0
0
0
0
1
0
true
0
0.2
0
0.2
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
70b214dd70a108da0b34f14109cdc980a1bad769
166
py
Python
run.py
envy7/project-dream-team-three
ebadf13ee0d76bd924bd1ba639d448f8e28ac01c
[ "Unlicense" ]
null
null
null
run.py
envy7/project-dream-team-three
ebadf13ee0d76bd924bd1ba639d448f8e28ac01c
[ "Unlicense" ]
null
null
null
run.py
envy7/project-dream-team-three
ebadf13ee0d76bd924bd1ba639d448f8e28ac01c
[ "Unlicense" ]
null
null
null
import os from app import create_app config_name = os.getenv('FLASK_CONFIG') app = create_app('development') if __name__ == '__main__': app.run(host='0.0.0.0')
18.444444
39
0.710843
27
166
3.925926
0.555556
0.056604
0.056604
0
0
0
0
0
0
0
0
0.027972
0.138554
166
8
40
20.75
0.713287
0
0
0
0
0
0.228916
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
70b25fd80453311c6bb986cd2ea2ef428837a8d3
30,392
py
Python
tests/test_utils.py
jbradberry/universe
109261f75c49435d118cf9c5238124466a03d2d3
[ "MIT" ]
null
null
null
tests/test_utils.py
jbradberry/universe
109261f75c49435d118cf9c5238124466a03d2d3
[ "MIT" ]
24
2020-04-14T20:32:21.000Z
2021-08-03T13:29:45.000Z
tests/test_utils.py
jbradberry/universe
109261f75c49435d118cf9c5238124466a03d2d3
[ "MIT" ]
3
2016-10-28T19:20:30.000Z
2021-02-28T03:19:49.000Z
import unittest from universe import components, engine, utils class PlanetProductionTestCase(unittest.TestCase): def test_values(self): manager = engine.Manager() manager.register_entity_type('species', [ components.SpeciesProductionComponent(), ]) manager.register_entity_type('planet', [ components.PopulationComponent(), ]) engine.Entity.register_manager(manager) data = [ (700, 0, 0), (700, 699, 0), (700, 700, 1), (700, 1_000_000, 1428), (1000, 0, 0), (1000, 999, 0), (1000, 1000, 1), (1000, 1_000_000, 1000), (1500, 0, 0), (1500, 1499, 0), (1500, 1500, 1), (1500, 1_000_000, 666), ] for per, pop, value in data: species = engine.Entity(**{ 'type': 'species', 'population_per_r': per, 'minerals_per_m': 5, 'mines_cost_r': 2, 'mines_per_pop': 5, }) planet = engine.Entity(**{ 'type': 'planet', 'population': pop, }) self.assertEqual(utils.production(species, planet), value, f"population_per_r: {per}, population: {pop}") class PlanetValueTestCase(unittest.TestCase): def test_values(self): manager = engine.Manager() manager.register_entity_type('species', [ components.SpeciesComponent(), ]) manager.register_entity_type('planet', [ components.EnvironmentComponent(), ]) engine.Entity.register_manager(manager) species = engine.Entity(** {'type': 'species', 'name': 'Human', 'plural_name': 'Humans', 'growth_rate': 15, 'gravity_immune': False, 'gravity_min': 32, 'gravity_max': 86, 'temperature_immune': False, 'temperature_min': 10, 'temperature_max': 64, 'radiation_immune': False, 'radiation_min': 38, 'radiation_max': 90,} ) data = [ # Taken from a historical Stars game. (59, 37, 64, 100), (59, 36, 64, 99), (57, 37, 64, 98), (59, 37, 66, 98), (59, 35, 64, 98), (62, 37, 64, 97), (59, 35, 63, 97), (59, 37, 61, 97), (59, 40, 64, 97), (59, 39, 66, 96), (59, 33, 64, 96), (59, 36, 68, 95), (59, 33, 63, 95), (59, 41, 66, 94), (53, 37, 64, 94), (59, 31, 64, 94), (62, 37, 61, 93), (59, 44, 64, 93), (59, 37, 57, 93), (59, 31, 63, 93), (59, 45, 64, 92), (67, 37, 64, 92), (59, 36, 70, 92), (59, 37, 72, 92), (61, 32, 64, 92), (59, 29, 63, 91), (59, 47, 64, 90), (59, 45, 66, 89), (66, 37, 61, 89), (69, 36, 64, 89), (67, 37, 62, 89), (59, 37, 53, 89), (59, 37, 76, 88), (59, 36, 75, 88), (60, 27, 63, 88), (59, 26, 65, 88), (61, 28, 64, 88), (47, 38, 64, 87), (59, 36, 76, 87), (59, 38, 51, 86), (71, 37, 62, 86), (68, 41, 64, 86), (70, 35, 65, 85), (45, 37, 64, 85), (73, 37, 64, 85), (59, 51, 64, 85), (59, 45, 70, 84), (52, 40, 68, 84), (61, 24, 63, 84), (71, 37, 60, 83), (63, 26, 65, 83), (60, 27, 60, 83), (52, 41, 68, 83), (68, 35, 68, 83), (61, 30, 58, 82), (46, 42, 64, 81), (56, 51, 64, 81), (60, 27, 58, 81), (73, 34, 64, 81), (52, 42, 68, 81), (68, 45, 64, 81), (73, 37, 61, 81), (51, 35, 57, 80), (53, 35, 55, 80), (72, 31, 64, 80), (60, 27, 57, 80), (68, 33, 68, 80), (59, 42, 51, 80), (59, 32, 77, 80), (66, 26, 65, 79), (51, 35, 56, 79), (59, 37, 49, 79), (59, 51, 60, 79), (73, 37, 60, 79), (68, 32, 68, 79), (59, 30, 77, 78), (72, 37, 57, 78), (61, 27, 57, 78), (59, 51, 59, 78), (52, 43, 69, 78), (60, 24, 70, 78), (59, 24, 71, 78), (61, 26, 58, 78), (57, 42, 77, 78), (52, 43, 70, 77), (60, 24, 71, 77), (73, 43, 64, 77), (62, 27, 57, 76), (58, 48, 73, 76), (59, 46, 51, 76), (73, 31, 65, 76), (72, 37, 55, 76), (60, 24, 72, 76), (61, 24, 70, 76), (59, 37, 48, 75), (52, 43, 72, 75), (68, 33, 56, 75), (68, 29, 68, 75), (73, 45, 64, 75), (60, 24, 73, 74), (52, 43, 73, 74), (59, 26, 77, 74), (68, 46, 68, 74), (61, 24, 56, 74), (46, 43, 68, 73), (68, 27, 68, 73), (68, 33, 74, 73), (63, 24, 70, 73), (71, 50, 64, 73), (72, 37, 51, 72), (52, 43, 74, 72), (68, 26, 68, 72), (73, 47, 64, 72), (73, 36, 54, 71), (62, 46, 51, 71), (52, 43, 75, 71), (51, 50, 68, 71), (43, 42, 64, 71), (55, 34, 49, 70), (59, 54, 61, 70), (68, 50, 68, 70), (65, 24, 70, 70), (66, 46, 74, 69), (41, 37, 64, 69), (73, 50, 64, 69), (52, 48, 73, 68), (75, 31, 65, 68), (67, 24, 70, 68), (68, 24, 69, 68), (56, 49, 77, 68), (68, 27, 72, 67), (43, 46, 64, 67), (63, 26, 51, 67), (74, 28, 61, 66), (65, 46, 51, 66), (68, 33, 78, 66), (73, 34, 53, 66), (41, 36, 61, 65), (47, 42, 77, 65), (51, 43, 78, 64), (59, 37, 45, 64), (73, 34, 51, 64), (43, 49, 64, 64), (64, 38, 81, 64), (73, 51, 66, 64), (53, 55, 64, 63), (49, 27, 54, 63), (50, 43, 78, 63), (59, 56, 61, 63), (57, 23, 78, 63), (73, 32, 53, 63), (66, 26, 51, 63), (57, 25, 79, 62), (59, 55, 71, 62), (69, 40, 79, 62), (75, 28, 61, 62), (77, 31, 65, 62), (65, 24, 51, 62), (53, 50, 77, 62), (60, 32, 46, 61), (73, 32, 51, 61), (56, 23, 78, 61), (47, 42, 78, 61), (41, 37, 56, 61), (47, 45, 77, 60), (68, 26, 51, 60), (76, 28, 61, 59), (66, 46, 49, 59), (41, 37, 74, 59), (56, 22, 78, 58), (74, 31, 53, 58), (62, 32, 46, 58), (43, 52, 64, 58), (64, 38, 45, 57), (59, 58, 61, 57), (64, 38, 83, 57), (73, 51, 58, 57), (78, 33, 68, 57), (70, 26, 51, 57), (41, 37, 52, 57), (77, 28, 61, 56), (74, 31, 51, 56), (79, 31, 65, 56), (69, 24, 51, 56), (73, 53, 67, 56), (49, 50, 77, 56), (66, 46, 48, 55), (67, 38, 45, 55), (72, 26, 51, 55), (52, 51, 50, 55), (58, 35, 43, 54), (56, 21, 78, 54), (45, 46, 77, 54), (79, 33, 68, 54), (78, 28, 61, 53), (76, 31, 53, 53), (39, 37, 74, 53), (47, 50, 77, 53), (41, 39, 51, 53), (56, 20, 78, 52), (63, 16, 67, 52), (66, 46, 47, 52), (62, 32, 44, 52), (80, 31, 65, 52), (47, 37, 83, 52), (72, 24, 51, 52), (64, 38, 85, 51), (47, 42, 81, 51), (69, 57, 66, 50), (76, 31, 51, 50), (59, 60, 61, 50), (46, 51, 77, 50), (48, 51, 50, 50), (70, 42, 82, 50), (66, 46, 46, 49), (67, 40, 44, 49), (77, 31, 53, 49), (47, 37, 84, 49), (47, 39, 83, 49), (77, 31, 52, 49), (41, 42, 51, 49), (47, 40, 83, 48), (43, 46, 77, 48), (73, 56, 67, 48), (82, 31, 65, 47), (47, 35, 84, 47), (37, 37, 74, 47), (81, 42, 68, 47), (48, 56, 70, 46), (65, 32, 43, 46), (62, 32, 42, 46), (47, 42, 83, 46), (78, 31, 52, 46), (72, 22, 51, 46), (82, 33, 68, 46), (64, 38, 87, 45), (78, 31, 51, 45), (73, 42, 82, 45), (59, 62, 61, 44), (79, 31, 53, 44), (43, 57, 64, 44), (47, 35, 85, 44), (84, 33, 64, 44), (72, 23, 49, 44), (41, 45, 51, 44), (70, 27, 82, 43), (75, 28, 79, 43), (75, 56, 67, 43), (46, 52, 78, 43), (68, 59, 69, 42), (66, 32, 42, 42), (35, 37, 74, 42), (84, 32, 63, 42), (84, 33, 66, 42), (47, 51, 48, 42), (84, 31, 65, 41), (80, 31, 53, 41), (47, 35, 86, 41), (67, 40, 41, 40), (81, 31, 53, 39), (41, 45, 49, 39), (47, 35, 87, 38), (40, 57, 64, 38), (85, 32, 62, 38), (77, 56, 67, 38), (46, 53, 79, 38), (77, 42, 82, 37), (77, 54, 57, 37), (85, 30, 62, 37), (33, 37, 74, 36), (48, 35, 88, 36), (85, 29, 62, 36), (72, 21, 48, 36), (40, 45, 48, 35), (32, 37, 74, 34), (83, 31, 53, 34), (59, 23, 89, 34), (59, 17, 44, 34), (62, 19, 44, 34), (79, 56, 67, 34), (47, 51, 45, 34), (67, 40, 38, 33), (72, 19, 49, 33), (38, 57, 64, 33), (61, 18, 44, 33), (75, 28, 83, 33), (46, 54, 80, 33), (84, 31, 53, 32), (78, 42, 83, 32), (66, 32, 38, 32), (57, 17, 44, 32), (62, 19, 43, 32), (83, 38, 48, 32), (71, 11, 68, 31), (56, 17, 44, 31), (72, 18, 49, 31), (37, 57, 64, 31), (41, 57, 57, 31), (72, 20, 47, 31), (38, 45, 48, 31), (83, 35, 48, 31), (69, 16, 49, 30), (81, 56, 67, 30), (83, 40, 48, 30), (72, 17, 49, 29), (79, 56, 57, 29), (65, 19, 43, 29), (32, 50, 68, 29), (46, 54, 82, 29), (37, 45, 48, 29), (84, 31, 78, 29), (83, 33, 48, 29), (67, 20, 43, 28), (68, 17, 82, 28), (47, 53, 44, 28), (49, 12, 52, 28), (35, 57, 64, 27), (69, 45, 38, 27), (32, 51, 68, 27), (41, 59, 57, 27), (38, 56, 57, 27), (37, 55, 57, 27), (36, 45, 48, 27), (84, 31, 79, 27), (71, 17, 47, 26), (34, 57, 64, 26), (86, 51, 70, 26), (32, 51, 70, 26), (41, 59, 56, 26), (61, 12, 46, 26), (72, 19, 46, 26), (68, 17, 83, 26), (47, 12, 52, 26), (48, 12, 52, 26), (84, 56, 67, 25), (83, 47, 49, 25), (46, 54, 84, 25), (72, 17, 47, 25), (35, 45, 48, 25), (46, 12, 52, 25), (33, 57, 64, 24), (86, 52, 70, 24), (73, 20, 44, 24), (59, 10, 46, 24), (41, 59, 54, 24), (61, 11, 46, 24), (84, 28, 79, 24), (47, 55, 44, 24), (45, 12, 52, 24), (46, 54, 85, 23), (86, 53, 70, 23), (73, 17, 47, 23), (45, 63, 53, 23), (61, 10, 46, 23), (67, 20, 40, 23), (72, 18, 45, 23), (34, 45, 48, 23), (84, 27, 79, 23), (70, 17, 83, 23), (32, 57, 64, 22), (83, 42, 84, 22), (44, 12, 52, 22), (65, 17, 41, 22), (32, 51, 74, 22), (73, 19, 44, 22), (33, 45, 48, 22), (76, 15, 78, 21), (84, 54, 74, 21), (84, 25, 79, 21), (47, 55, 42, 21), (72, 16, 83, 20), (41, 61, 53, 20), (32, 45, 48, 20), (72, 17, 44, 20), (73, 17, 83, 20), (36, 23, 81, 19), (49, 12, 46, 19), (42, 63, 53, 18), (73, 19, 41, 18), (72, 16, 44, 18), (86, 25, 79, 18), (47, 57, 42, 18), (48, 12, 46, 18), (86, 58, 69, 17), (72, 16, 43, 17), (47, 58, 42, 17), (47, 12, 46, 17), (72, 15, 43, 16), (71, 60, 85, 16), (73, 20, 39, 16), (73, 19, 40, 16), (75, 17, 83, 16), (47, 59, 42, 16), (32, 29, 84, 16), (46, 12, 46, 16), (85, 60, 71, 15), (83, 46, 41, 15), (45, 12, 46, 15), (76, 16, 83, 14), (47, 60, 42, 14), (44, 12, 46, 14), (47, 61, 42, 13), (47, 62, 41, 12), (47, 61, 41, 12), (43, 12, 46, 12), (32, 64, 68, 12), (42, 12, 46, 11), (77, 14, 83, 11), (86, 57, 49, 10), (70, 63, 38, 9), (77, 12, 83, 9), (34, 23, 90, 8), (77, 10, 83, 8), (75, 12, 88, 7), (34, 10, 79, 6), (39, 13, 42, 5), (32, 60, 85, 3), (32, 59, 85, 3), (32, 63, 85, 2), (75, 9, 88, -1), (47, 41, 37, -1), (87, 20, 51, -1), (87, 53, 70, -1), (83, 65, 60, -1), (45, 65, 53, -1), (31, 45, 48, -1), (32, 65, 85, -1), (87, 25, 79, -1), (49, 41, 37, -1), (50, 41, 37, -1), (73, 45, 37, -1), (31, 29, 84, -1), (51, 41, 37, -1), (52, 41, 37, -1), (76, 53, 36, -2), (88, 34, 73, -2), (75, 63, 36, -2), (30, 45, 48, -2), (88, 53, 70, -2), (48, 66, 48, -2), (48, 66, 50, -2), (54, 8, 46, -2), (48, 66, 51, -2), (55, 8, 46, -2), (47, 66, 53, -2), (57, 8, 46, -2), (59, 8, 46, -2), (67, 20, 36, -2), (77, 8, 83, -2), (72, 8, 44, -2), (89, 29, 62, -3), (89, 57, 49, -3), (77, 7, 83, -3), (89, 18, 53, -3), (50, 7, 46, -3), (84, 20, 35, -3), (48, 44, 35, -3), (52, 7, 46, -3), (89, 53, 70, -3), (53, 7, 46, -3), (67, 20, 35, -3), (31, 66, 85, -3), (89, 25, 79, -3), (73, 19, 35, -3), (51, 44, 35, -3), (53, 44, 35, -3), (51, 65, 36, -3), (54, 44, 35, -3), (58, 44, 35, -3), (59, 44, 35, -3), (89, 31, 78, -3), (46, 7, 90, -3), (46, 7, 89, -3), (63, 23, 34, -4), (90, 18, 76, -4), (30, 15, 36, -4), (56, 68, 70, -4), (90, 53, 70, -4), (44, 32, 94, -4), (66, 32, 34, -4), (73, 20, 34, -4), (30, 66, 85, -4), (90, 25, 79, -4), (67, 20, 34, -4), (72, 6, 38, -4), (51, 65, 35, -4), (72, 6, 42, -4), (59, 44, 34, -4), (28, 29, 84, -4), (83, 46, 34, -4), (46, 7, 91, -4), (70, 32, 34, -4), (36, 69, 54, -5), (66, 59, 33, -5), (91, 61, 52, -5), (36, 69, 77, -5), (27, 58, 48, -5), (66, 69, 78, -5), (91, 53, 70, -5), (63, 10, 95, -5), (27, 27, 69, -5), (27, 25, 90, -5), (27, 25, 89, -5), (91, 25, 79, -5), (27, 25, 88, -5), (27, 25, 86, -5), (27, 25, 85, -5), (27, 25, 84, -5), (51, 65, 34, -5), (27, 26, 84, -5), (27, 27, 84, -5), (27, 29, 84, -5), (59, 44, 33, -5), (46, 7, 92, -5), (91, 38, 47, -5), (32, 21, 32, -6), (67, 70, 64, -6), (73, 32, 32, -6), (92, 53, 70, -6), (86, 33, 32, -6), (36, 14, 96, -6), (26, 52, 88, -6), (67, 25, 96, -6), (83, 69, 37, -6), (92, 25, 79, -6), (30, 68, 85, -6), (73, 23, 32, -6), (73, 25, 32, -6), (73, 28, 32, -6), (85, 33, 32, -6), (83, 32, 32, -6), (46, 7, 93, -6), (92, 38, 38, -6), (92, 38, 40, -6), (92, 38, 41, -6), (92, 38, 43, -6), (26, 52, 87, -6), (92, 38, 45, -6), (26, 52, 85, -6), (92, 38, 46, -6), (26, 52, 84, -6), (39, 71, 72, -7), (28, 12, 35, -7), (73, 32, 31, -7), (64, 71, 56, -7), (75, 27, 31, -7), (73, 25, 31, -7), (25, 26, 85, -7), (73, 30, 31, -7), (75, 31, 31, -7), (25, 44, 55, -7), (53, 62, 97, -7), (73, 45, 31, -7), (77, 24, 31, -7), (27, 25, 92, -7), (93, 25, 79, -7), (84, 32, 31, -7), (30, 69, 85, -7), (67, 22, 31, -7), (67, 26, 31, -7), (62, 32, 31, -7), (66, 32, 31, -7), (73, 28, 31, -7), (93, 37, 61, -7), (73, 27, 31, -7), (46, 7, 94, -7), (59, 40, 31, -7), (78, 32, 31, -7), (59, 39, 31, -7), (75, 32, 31, -7), (73, 42, 31, -7), (80, 32, 31, -7), (73, 31, 31, -7), (70, 32, 31, -7), (73, 41, 31, -7), (63, 32, 31, -7), (67, 32, 31, -7), (78, 72, 71, -8), (72, 20, 30, -8), (42, 66, 96, -8), (77, 28, 98, -8), (39, 65, 31, -8), (30, 51, 32, -8), (39, 22, 98, -8), (84, 32, 30, -8), (72, 6, 34, -8), (86, 58, 98, -8), (71, 7, 33, -8), (24, 10, 87, -8), (88, 70, 69, -8), (80, 29, 98, -8), (30, 70, 90, -8), (27, 25, 93, -8), (30, 70, 88, -8), (30, 70, 87, -8), (30, 70, 85, -8), (92, 38, 36, -8), (75, 41, 30, -8), (73, 20, 30, -8), (24, 50, 86, -8), (46, 7, 95, -8), (73, 41, 30, -8), (73, 37, 30, -8), (67, 25, 99, -9), (36, 52, 99, -9), (23, 61, 65, -9), (74, 32, 99, -9), (68, 30, 99, -9), (32, 39, 99, -9), (58, 73, 70, -9), (95, 25, 79, -9), (78, 73, 88, -9), (62, 12, 29, -9), (93, 44, 36, -9), (32, 37, 29, -9), (30, 70, 91, -9), (27, 25, 94, -9), (92, 38, 35, -9), (23, 50, 86, -9), (23, 50, 50, -9), (46, 7, 96, -9), (81, 73, 91, -10), (27, 20, 95, -10), (22, 49, 82, -10), (27, 21, 95, -10), (84, 32, 28, -10), (27, 23, 95, -10), (30, 70, 92, -10), (27, 24, 95, -10), (92, 38, 34, -10), (23, 65, 68, -10), (22, 50, 50, -10), (28, 32, 31, -11), (92, 15, 33, -11), (92, 38, 33, -11), (84, 32, 27, -11), (30, 70, 93, -11), (62, 32, 27, -11), (82, 76, 75, -12), (93, 44, 33, -12), (84, 76, 62, -12), (65, 74, 92, -12), (88, 10, 28, -12), (73, 33, 26, -12), (88, 13, 28, -12), (75, 41, 26, -12), (30, 70, 94, -12), (93, 25, 95, -12), (20, 50, 86, -12), (69, 36, 25, -13), (78, 56, 25, -13), (98, 9, 90, -13), (19, 21, 39, -13), (84, 32, 25, -13), (51, 65, 26, -13), (47, 72, 95, -13), (46, 60, 25, -13), (19, 21, 61, -13), (46, 6, 99, -13), (19, 49, 46, -13), (19, 49, 49, -13), (19, 49, 50, -13), (19, 50, 50, -13), (19, 50, 45, -13), (30, 70, 96, -14), (37, 66, 26, -14), (18, 53, 63, -14), (55, 70, 30, -14), (18, 49, 46, -14), (18, 50, 86, -14), (62, 32, 24, -14), (65, 32, 24, -14), (73, 20, 24, -14), (69, 32, 24, -14), (14, 28, 85, -15), (84, 33, 22, -15), (78, 63, 15, -15), (74, 61, 12, -15), (54, 34, 9, -15), (72, 49, 13, -15), (52, 44, 16, -15), (10, 37, 56, -15), (80, 54, 20, -15), (17, 14, 89, -15), (67, 90, 66, -15), (57, 62, 7, -15), (85, 16, 19, -15), (9, 17, 66, -15), (55, 34, 22, -15), (58, 91, 89, -15), (86, 52, 15, -15), (66, 56, 6, -15), (57, 90, 89, -15), (46, 19, 2, -15), (13, 27, 90, -15), (70, 87, 65, -15), (41, 33, 7, -15), (59, 45, 6, -15), (84, 32, 23, -15), (35, 89, 65, -15), (61, 54, 12, -15), (26, 37, 99, -15), (72, 91, 56, -15), (82, 45, 18, -15), (11, 30, 85, -15), (52, 92, 63, -15), (15, 61, 46, -15), (69, 16, 17, -15), (79, 17, 22, -15), (45, 20, 22, -15), (85, 39, 17, -15), (84, 36, 18, -15), (63, 17, 4, -15), (6, 31, 61, -15), (80, 50, 20, -15), (80, 44, 20, -15), (58, 80, 44, -15), (22, 69, 44, -15), (79, 44, 20, -15), (51, 49, 14, -15), (53, 79, 62, -15), (34, 89, 89, -15), (10, 51, 72, -15), (35, 88, 85, -15), (43, 47, 8, -15), (23, 70, 68, -15), (35, 90, 56, -15), (38, 79, 61, -15), (17, 11, 69, -15), (74, 50, 1, -15), (79, 63, 5, -15), (78, 44, 20, -15), (77, 27, 21, -15), (69, 41, 6, -15), (15, 55, 90, -15), (59, 90, 46, -15), (17, 47, 46, -15), (17, 35, 76, -15), (39, 88, 51, -15), (6, 64, 66, -15), (47, 79, 87, -15), (11, 39, 38, -15), (79, 80, 82, -15), (59, 21, 23, -15), (12, 33, 60, -15), (12, 32, 71, -15), (9, 35, 43, -15), (40, 94, 76, -15), (58, 82, 88, -15), (7, 54, 48, -15), (16, 55, 90, -15), (15, 61, 45, -15), (82, 90, 86, -15), (16, 53, 90, -15), (60, 35, 9, -15), (16, 51, 90, -15), (23, 55, 96, -15), (34, 88, 89, -15), (61, 34, 18, -15), (59, 45, 7, -15), (17, 50, 90, -15), (59, 45, 12, -15), (17, 50, 88, -15), (59, 45, 17, -15), (17, 50, 87, -15), (62, 44, 18, -15), (58, 34, 22, -15), (60, 34, 22, -15), (63, 32, 19, -15), (64, 44, 19, -15), (70, 16, 17, -15), (62, 33, 22, -15), (65, 44, 19, -15), (73, 19, 17, -15), (53, 44, 16, -15), (11, 39, 39, -15), (65, 32, 21, -15), (70, 43, 19, -15), (73, 19, 19, -15), (54, 44, 16, -15), (11, 39, 40, -15), (65, 32, 22, -15), (70, 38, 21, -15), (73, 20, 23, -15), (61, 44, 16, -15), (7, 64, 66, -15), (11, 39, 41, -15), (70, 34, 21, -15), (62, 44, 16, -15), (11, 39, 43, -15), (24, 3, 81, -15), (8, 64, 66, -15), (11, 39, 44, -15), (10, 64, 66, -15), (11, 64, 66, -15), (63, 44, 18, -15), (13, 64, 66, -15), (63, 44, 19, -15), (16, 64, 66, -15), (63, 43, 19, -15), (37, 79, 54, -15), (17, 64, 68, -15), (17, 35, 75, -15), (17, 61, 68, -15), (86, 48, 13, -15), (12, 39, 45, -15), (63, 37, 19, -15), (17, 57, 68, -15), (86, 48, 14, -15), (14, 39, 45, -15), (73, 34, 21, -15), (63, 34, 19, -15), (17, 54, 68, -15), (16, 40, 45, -15), (73, 32, 21, -15), (65, 32, 23, -15), (17, 53, 68, -15), (16, 44, 45, -15), (86, 48, 16, -15), (16, 47, 45, -15), (16, 50, 45, -15), (24, 2, 78, -16), (27, 75, 63, -16), (84, 89, 37, -16), (25, 66, 31, -16), (31, 88, 38, -16), (63, 92, 37, -16), (31, 92, 88, -16), (31, 93, 79, -16), (62, 95, 37, -16), (52, 9, 2, -16), (27, 26, 27, -16), (87, 49, 13, -16), (65, 75, 96, -17), (61, 79, 36, -17), (4, 20, 92, -17), (88, 23, 16, -17), (90, 77, 85, -17), (88, 73, 32, -17), (88, 51, 13, -17), (88, 50, 13, -17), (59, 67, 6, -18), (3, 14, 93, -18), (44, 7, 21, -18), (89, 51, 13, -18), (5, 36, 94, -19), (44, 91, 34, -19), (89, 78, 92, -19), (90, 51, 13, -19), (72, 74, 29, -19), (28, 21, 5, -19), (16, 23, 95, -20), (27, 13, 11, -20), (85, 75, 99, -20), (91, 39, 17, -20), (27, 81, 65, -20), (86, 70, 16, -21), (44, 78, 97, -21), (50, 96, 96, -21), (92, 28, 10, -21), (95, 76, 68, -21), (50, 70, 16, -21), (10, 4, 54, -21), (47, 71, 2, -22), (41, 89, 31, -22), (32, 85, 31, -22), (29, 72, 27, -22), (32, 84, 31, -22), (17, 3, 73, -22), (32, 83, 31, -22), (23, 14, 24, -23), (68, 83, 98, -23), (55, 95, 98, -23), (72, 87, 30, -23), (95, 39, 17, -24), (23, 11, 10, -24), (12, 42, 29, -24), (20, 3, 95, -24), (96, 16, 22, -25), (81, 74, 15, -25), (21, 90, 90, -26), (21, 20, 21, -26), (67, 76, 23, -27), (91, 93, 30, -28), (14, 77, 72, -28), (72, 82, 25, -28), (19, 84, 91, -29), (13, 74, 34, -29), (61, 86, 24, -29), (88, 76, 1, -29), (9, 27, 24, -29), (18, 61, 7, -29), (12, 64, 21, -30), (3, 85, 69, -30), (7, 79, 54, -30), (42, 90, 9, -30), (15, 79, 77, -30), (9, 92, 86, -30), (48, 85, 4, -30), (4, 89, 68, -30), (66, 85, 3, -30), (17, 94, 69, -30), (12, 34, 18, -30), (9, 47, 11, -30), (10, 42, 7, -30), (7, 85, 65, -30), (12, 19, 14, -30), (9, 94, 72, -30), (12, 80, 85, -30), (6, 82, 82, -30), (46, 86, 21, -30), (7, 22, 6, -30), (17, 24, 12, -30), (39, 87, 6, -30), (40, 84, 10, -30), (8, 74, 97, -32), (25, 81, 18, -37), (25, 93, 19, -37), (19, 78, 3, -42), ] for g, t, r, value in data: planet = engine.Entity(** {'type': 'planet', 'gravity': g, 'temperature': t, 'radiation': r} ) self.assertEqual(utils.planet_value(species, planet), value)
30.240796
75
0.274184
3,908
30,392
2.122057
0.043501
0.009044
0.006029
0.012058
0.063427
0.032799
0.022911
0.022911
0.022911
0.022911
0
0.49008
0.517406
30,392
1,004
76
30.270916
0.075339
0.001152
0
0.018109
0
0
0.012024
0
0
0
0
0
0.002012
1
0.002012
false
0
0.002012
0
0.006036
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
1
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
70ea7b65b45e04018fd11eba650c698a19bfac5d
556
py
Python
build.py
MolGL/MolGL
e83b3a1edc83844368a8515b1324498aed418c7a
[ "Apache-2.0" ]
2
2016-11-15T17:06:55.000Z
2017-02-16T20:31:02.000Z
build.py
MolGL/MolGL
e83b3a1edc83844368a8515b1324498aed418c7a
[ "Apache-2.0" ]
8
2016-11-04T05:51:51.000Z
2016-11-18T06:44:30.000Z
build.py
MolGL/MolGL
e83b3a1edc83844368a8515b1324498aed418c7a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # ———————————————————————————————————————————————————————————————————————————— # Copyright © 2014 - 2016, Sequømics Research, All rights reserved. # Copyright © 2014 - 2016, Sequømics Corporation. All rights reserved. # ———————————————————————————————————————————————————————————————————————————— # Licensed under the Apache License (the "License, version 2.0"); # you may not use this file except in compliance with the License. # ————————————————————————————————————————————————————————————————————————————
50.545455
78
0.413669
50
556
9.2
0.72
0.043478
0.06087
0.078261
0.117391
0
0
0
0
0
0
0.038229
0.106115
556
10
79
55.6
0.424547
0.965827
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
0
0
0
1
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
70f6b613f46f9572a127a9da271c9e2dc28fc894
3,090
py
Python
gfauto/gfauto/test_util.py
KishkinJ10/graphicsfuzz
673f9bba2b02608b26edef786095007949c00675
[ "Apache-2.0" ]
519
2018-09-25T12:55:31.000Z
2022-03-30T17:26:53.000Z
gfauto/gfauto/test_util.py
KishkinJ10/graphicsfuzz
673f9bba2b02608b26edef786095007949c00675
[ "Apache-2.0" ]
544
2018-09-25T08:54:28.000Z
2022-03-07T16:04:51.000Z
gfauto/gfauto/test_util.py
KishkinJ10/graphicsfuzz
673f9bba2b02608b26edef786095007949c00675
[ "Apache-2.0" ]
139
2018-09-26T05:11:20.000Z
2022-02-15T09:14:27.000Z
# -*- coding: utf-8 -*- # Copyright 2019 The GraphicsFuzz Project Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://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. """Test utility module. A test directory contains a Test proto stored in "source/test.json", the reference and variant shader jobs, and various other files, including results. This module is used to read Test proto files and get various paths that exist in test directories. """ from pathlib import Path from gfauto import proto_util, util from gfauto.test_pb2 import Test TEST_METADATA = "test.json" REFERENCE_DIR = "reference" VARIANT_DIR = "variant" SHADER_JOB = "shader.json" SHADER_JOB_RESULT = "shader.info.json" def get_source_dir(test_dir: Path) -> Path: return test_dir / "source" def get_metadata_path(test_dir: Path) -> Path: return get_metadata_path_from_source_dir(get_source_dir(test_dir)) def get_metadata_path_from_source_dir(source_dir: Path) -> Path: return source_dir / TEST_METADATA def metadata_write(metadata: Test, test_dir: Path) -> Path: metadata_write_to_path(metadata, get_metadata_path(test_dir)) return test_dir def metadata_read(test_dir: Path) -> Test: return metadata_read_from_path(get_metadata_path(test_dir)) def metadata_read_from_source_dir(source_dir: Path) -> Test: return metadata_read_from_path(get_metadata_path_from_source_dir(source_dir)) def metadata_read_from_path(test_metadata_path: Path) -> Test: text = util.file_read_text(test_metadata_path) result = Test() proto_util.json_to_message(text, result) return result def metadata_write_to_path(metadata: Test, test_metadata_path: Path) -> Path: text = proto_util.message_to_json(metadata) util.file_write_text(test_metadata_path, text) return test_metadata_path def get_shader_job_path(test_dir: Path, shader_name: str) -> Path: return test_dir / "source" / shader_name / SHADER_JOB def get_device_directory(test_dir: Path, device_name: str) -> Path: return test_dir / "results" / device_name def get_results_directory(test_dir: Path, device_name: str) -> Path: return get_device_directory(test_dir, device_name) / "result" def get_reductions_dir(test_dir: Path, device_name: str) -> Path: return get_device_directory(test_dir, device_name) / "reductions" def get_reduced_test_dir(test_dir: Path, device_name: str, reduction_name: str) -> Path: return get_reductions_dir(test_dir, device_name) / reduction_name def get_reduction_work_directory(reduced_test_dir: Path, name_of_shader: str) -> Path: return reduced_test_dir / "reduction_work" / name_of_shader
32.1875
119
0.772168
471
3,090
4.766454
0.246285
0.068597
0.048998
0.037862
0.344321
0.207127
0.170601
0.157238
0.130958
0.107795
0
0.003788
0.145631
3,090
95
120
32.526316
0.846591
0.280259
0
0
0
0
0.045826
0
0
0
0
0
0
1
0.333333
false
0
0.071429
0.261905
0.738095
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
cb01a78dea1ba413678bdaa15b5fb376d5cfbcae
168
py
Python
pydundas/tests/rest/test_project.py
autonopy/pydundas
66fa46d593d3a2f9f3da7a0220f8a7dc495e2758
[ "MIT" ]
4
2019-04-09T05:30:10.000Z
2022-01-26T14:45:52.000Z
pydundas/tests/rest/test_project.py
autonopy/pydundas
66fa46d593d3a2f9f3da7a0220f8a7dc495e2758
[ "MIT" ]
4
2019-04-08T13:00:56.000Z
2022-01-27T06:46:33.000Z
pydundas/tests/rest/test_project.py
autonopy/pydundas
66fa46d593d3a2f9f3da7a0220f8a7dc495e2758
[ "MIT" ]
3
2019-04-08T07:07:12.000Z
2022-01-26T14:46:00.000Z
import unittest from pydundas import Api class TestProject(unittest.TestCase): def test_no_syntax_error(self): self.assertIsNotNone(Api(None).project())
18.666667
49
0.755952
21
168
5.904762
0.809524
0
0
0
0
0
0
0
0
0
0
0
0.154762
168
8
50
21
0.873239
0
0
0
0
0
0
0
0
0
0
0
0.2
1
0.2
false
0
0.4
0
0.8
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
cb0302f31a96c3dde5eb9872c52023093a2d18f1
516
py
Python
odoo/custom/src/private/nxpo_budget_revision_monitoring_project/report/budget_monitor_revision_report.py
Saran440/nxpo
769bbebc0df2e12acbf5b1e398e34b3405d53c50
[ "BSL-1.0" ]
null
null
null
odoo/custom/src/private/nxpo_budget_revision_monitoring_project/report/budget_monitor_revision_report.py
Saran440/nxpo
769bbebc0df2e12acbf5b1e398e34b3405d53c50
[ "BSL-1.0" ]
null
null
null
odoo/custom/src/private/nxpo_budget_revision_monitoring_project/report/budget_monitor_revision_report.py
Saran440/nxpo
769bbebc0df2e12acbf5b1e398e34b3405d53c50
[ "BSL-1.0" ]
null
null
null
# Copyright 2020 Ecosoft Co., Ltd. (http://ecosoft.co.th) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models class BudgetMonitorRevisionReport(models.Model): _inherit = "budget.monitor.revision.report" project_id = fields.Many2one(comodel_name="res.project") def _select_budget(self): select_budget_query = super()._select_budget() select_budget_query = ",".join([select_budget_query, "aa.project_id"]) return select_budget_query
32.25
78
0.722868
67
516
5.328358
0.656716
0.201681
0.190476
0
0
0
0
0
0
0
0
0.015982
0.151163
516
15
79
34.4
0.799087
0.226744
0
0
0
0
0.138889
0.075758
0
0
0
0
0
1
0.125
false
0
0.125
0
0.75
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
0
0
1
0
0
3
cb4daf0e2bd9267bcf8579574005098133b4355c
376
py
Python
tests/test_transform_identity.py
dlshriver/Queryable
0975f2687213958121ea4ac7efbaee9030193917
[ "MIT" ]
5
2016-04-04T16:49:11.000Z
2020-10-12T13:00:06.000Z
tests/test_transform_identity.py
dlshriver/Queryable
0975f2687213958121ea4ac7efbaee9030193917
[ "MIT" ]
3
2016-04-08T16:13:54.000Z
2022-02-03T15:23:48.000Z
tests/test_transform_identity.py
dlshriver/pinq
0975f2687213958121ea4ac7efbaee9030193917
[ "MIT" ]
null
null
null
import unittest from pinq.transforms import identity class predicate_true_tests(unittest.TestCase): def test_identity_int(self): self.assertEqual(identity(123), 123) def test_identity_str(self): self.assertEqual(identity("apple"), "apple") def test_identity_list(self): self.assertEqual(identity(["great", 100029]), ["great", 100029])
25.066667
72
0.710106
45
376
5.755556
0.488889
0.081081
0.173745
0.312741
0
0
0
0
0
0
0
0.057508
0.167553
376
14
73
26.857143
0.769968
0
0
0
0
0
0.053191
0
0
0
0
0
0.333333
1
0.333333
false
0
0.222222
0
0.666667
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
3
cb67393408279dfc1bb2c5b77e787a0b82d4c97b
476
py
Python
newspaper/newspaper/news/managers.py
luisfer85/newspaper
7829eede4ef878562e54ee591bb61862f6fd6ac8
[ "Apache-2.0" ]
null
null
null
newspaper/newspaper/news/managers.py
luisfer85/newspaper
7829eede4ef878562e54ee591bb61862f6fd6ac8
[ "Apache-2.0" ]
null
null
null
newspaper/newspaper/news/managers.py
luisfer85/newspaper
7829eede4ef878562e54ee591bb61862f6fd6ac8
[ "Apache-2.0" ]
null
null
null
from datetime import datetime from django.db import models from django.db.models.query import QuerySet class BaseNewsQuerySet(QuerySet): def published(self): return self.filter(publish_date__lte=datetime.now()).order_by('publish_date') class BaseNewsManager(models.Manager): def get_query_set(self): return BaseNewsQuerySet(self.model, using=self._db) def published(self): return self.get_query_set().published()
23.8
86
0.714286
59
476
5.59322
0.457627
0.090909
0.072727
0.133333
0.157576
0
0
0
0
0
0
0
0.193277
476
19
87
25.052632
0.859375
0
0
0.181818
0
0
0.026258
0
0
0
0
0
0
1
0.272727
false
0
0.272727
0.272727
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
1
0
0
0
1
1
0
0
3
cbc2172760f370c3b4d7c60769a266040ec53d06
442
py
Python
BITs/2014/Abdrahmanova_G_I/task_3_1.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
BITs/2014/Abdrahmanova_G_I/task_3_1.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
BITs/2014/Abdrahmanova_G_I/task_3_1.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
#Задача 3. Вариант 1. #Напишите программу, которая выводит имя "Иво Ливи", и запрашивает его псевдоним. Программа должна сцеплять две эти строки и выводить полученную строку, разделяя имя и псевдоним с помощью тире. name=input('Герой нашей сегодняшней программы - Иво Ливи. \nПод каким же именем мы знаем этого человека? ') print('Ваш ответ: ', name) print('Все верно: Иво Ливи - ', name) input('Нажмите Enter') #Abdrahmanova G. I. #7.03.2016
55.25
193
0.757919
67
442
5
0.820896
0.062687
0
0
0
0
0
0
0
0
0
0.02381
0.144796
442
8
194
55.25
0.862434
0.540724
0
0
0
0
0.695
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
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
1
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
3
cbd9e2d20a7a2ee57818c7e4187d5b9ba2868f18
598
py
Python
{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/settings/base.py
drgarcia1986/cookiecutter-muffin
7aa861787b4280477a726da99cf9de4047b01d91
[ "MIT" ]
3
2016-06-24T21:14:37.000Z
2017-03-07T05:36:33.000Z
{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/settings/base.py
drgarcia1986/cookiecutter-muffin
7aa861787b4280477a726da99cf9de4047b01d91
[ "MIT" ]
null
null
null
{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/settings/base.py
drgarcia1986/cookiecutter-muffin
7aa861787b4280477a726da99cf9de4047b01d91
[ "MIT" ]
null
null
null
import os STATIC_FOLDERS = ( '{{cookiecutter.repo_name}}/common/static', '{{cookiecutter.repo_name}}/users/static', ) # Muffin Plugins PLUGINS = ( 'muffin_jinja2', 'muffin_peewee', 'muffin_session', ) # Plugins configurations SESSION_SECRET = 'SecretHere' SESSION_LOGIN_URL = '/users/signin/' JINJA2_TEMPLATE_FOLDERS = ( '{{cookiecutter.repo_name}}/common/templates', '{{cookiecutter.repo_name}}/public/templates', '{{cookiecutter.repo_name}}/users/templates' ) PEEWEE_CONNECTION = os.environ.get('DATABASE_URL', 'sqlite:///{{cookiecutter.repo_name}}.sqlite')
22.148148
97
0.70903
63
598
6.460317
0.444444
0.235872
0.29484
0.132678
0.162162
0
0
0
0
0
0
0.003831
0.12709
598
26
98
23
0.775862
0.061873
0
0
0
0
0.584229
0.448029
0
0
0
0
0
1
0
false
0
0.055556
0
0.055556
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
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
1daff2d7a44c6c02cc6f43b03cc6ccde6dd9165f
1,748
py
Python
assets/src/ba_data/python/bastd/mapdata/rampage.py
Benefit-Zebra/ballistica
eb85df82cff22038e74a2d93abdcbe9cd755d782
[ "MIT" ]
317
2020-04-04T00:33:10.000Z
2022-03-28T01:07:09.000Z
assets/src/ba_data/python/bastd/mapdata/rampage.py
Alshahriah/ballistica
326f6677a0118667e93ce9034849622ebef706fa
[ "MIT" ]
315
2020-04-04T22:33:10.000Z
2022-03-31T22:50:02.000Z
assets/src/ba_data/python/bastd/mapdata/rampage.py
Alshahriah/ballistica
326f6677a0118667e93ce9034849622ebef706fa
[ "MIT" ]
97
2020-04-04T01:32:17.000Z
2022-03-16T19:02:59.000Z
# Released under the MIT License. See LICENSE for details. # # This file was automatically generated from "rampage.ma" # pylint: disable=all points = {} # noinspection PyDictCreation boxes = {} boxes['area_of_interest_bounds'] = (0.3544110667, 5.616383286, -4.066055072) + (0.0, 0.0, 0.0) + ( 19.90053969, 10.34051135, 8.16221072) boxes['edge_box'] = (0.3544110667, 5.438284793, -4.100357672) + ( 0.0, 0.0, 0.0) + (12.57718032, 4.645176013, 3.605557343) points['ffa_spawn1'] = (0.5006944438, 5.051501304, -5.79356326) + (6.626174027, 1.0, 0.3402012662) points['ffa_spawn2'] = (0.5006944438, 5.051501304, -2.435321368) + (6.626174027, 1.0, 0.3402012662) points['flag1'] = (-5.885814199, 5.112162255, -4.251754911) points['flag2'] = (6.700855451, 5.10270501, -4.259912982) points['flag_default'] = (0.3196701116, 5.110914413, -4.292515158) boxes['map_bounds'] = (0.4528955042, 4.899663734, -3.543675157) + ( 0.0, 0.0, 0.0) + (23.54502348, 14.19991443, 12.08017448) points['powerup_spawn1'] = (-2.645358507, 6.426340583, -4.226597191) points['powerup_spawn2'] = (3.540102796, 6.549722855, -4.198476335) points['shadow_lower_bottom'] = (5.580073911, 3.136491026, 5.341226521) points['shadow_lower_top'] = (5.580073911, 4.321758709, 5.341226521) points['shadow_upper_bottom'] = (5.274539479, 8.425373402, 5.341226521) points['shadow_upper_top'] = (5.274539479, 11.93458162, 5.341226521) points['spawn1'] = (-4.745706238, 5.051501304, -4.247934288) + (0.9186962739, 1.0, 0.5153189341) points['spawn2'] = (5.838590388, 5.051501304, -4.259627405) + (0.9186962739, 1.0, 0.5153189341)
52.969697
77
0.638444
230
1,748
4.773913
0.469565
0.034608
0.032787
0.032787
0.162113
0.112933
0.052823
0
0
0
0
0.487685
0.187071
1,748
32
78
54.625
0.285011
0.091533
0
0
1
0
0.121997
0.014539
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
1dc2f03665e1c48e0dda7a55e8fc1d2784bcdfa3
6,513
py
Python
tests/test_models.py
hramezani/django-voting
f07707cb84765be76f7e9e985dd0523842b02ae7
[ "BSD-3-Clause" ]
null
null
null
tests/test_models.py
hramezani/django-voting
f07707cb84765be76f7e9e985dd0523842b02ae7
[ "BSD-3-Clause" ]
null
null
null
tests/test_models.py
hramezani/django-voting
f07707cb84765be76f7e9e985dd0523842b02ae7
[ "BSD-3-Clause" ]
null
null
null
# coding: utf-8 from __future__ import unicode_literals from django.contrib.auth.models import User from django.test import TestCase from voting.models import Vote from test_app.models import Item # Basic voting ############################################################### class BasicVotingTests(TestCase): def setUp(self): self.item = Item.objects.create(name='test1') self.users = [] for username in ['u1', 'u2', 'u3', 'u4']: self.users.append(User.objects.create_user(username, '%s@test.com' % username, 'test')) def test_print_model(self): Vote.objects.record_vote(self.item, self.users[0], +1) expected = 'u1: 1 on test1' result = Vote.objects.all()[0] self.assertEqual(str(result), expected) def test_novotes(self): result = Vote.objects.get_score(self.item) self.assertEqual(result, {'score': 0, 'num_votes': 0}) def test_onevoteplus(self): Vote.objects.record_vote(self.item, self.users[0], +1) result = Vote.objects.get_score(self.item) self.assertEqual(result, {'score': 1, 'num_votes': 1}) def test_onevoteminus(self): Vote.objects.record_vote(self.item, self.users[0], -1) result = Vote.objects.get_score(self.item) self.assertEqual(result, {'score': -1, 'num_votes': 1}) def test_onevotezero(self): Vote.objects.record_vote(self.item, self.users[0], 0) result = Vote.objects.get_score(self.item) self.assertEqual(result, {'score': 0, 'num_votes': 0}) def test_allvoteplus(self): for user in self.users: Vote.objects.record_vote(self.item, user, +1) result = Vote.objects.get_score(self.item) self.assertEqual(result, {'score': 4, 'num_votes': 4}) for user in self.users[:2]: Vote.objects.record_vote(self.item, user, 0) result = Vote.objects.get_score(self.item) self.assertEqual(result, {'score': 2, 'num_votes': 2}) for user in self.users[:2]: Vote.objects.record_vote(self.item, user, -1) result = Vote.objects.get_score(self.item) self.assertEqual(result, {'score': 0, 'num_votes': 4}) def test_wrongvote(self): try: Vote.objects.record_vote(self.item, self.users[0], -2) except ValueError as e: self.assertEqual(e.args[0], "Invalid vote (must be +1/0/-1)") else: self.fail("Did nor raise 'ValueError: Invalid vote (must be +1/0/-1)'") # Retrieval of votes ######################################################### class VoteRetrievalTests(TestCase): def setUp(self): self.items = [] for name in ['test1', 'test2', 'test3', 'test4']: self.items.append(Item.objects.create(name=name)) self.users = [] for username in ['u1', 'u2', 'u3', 'u4']: self.users.append(User.objects.create_user(username, '%s@test.com' % username, 'test')) for user in self.users: Vote.objects.record_vote(self.items[0], user, +1) for user in self.users[:2]: Vote.objects.record_vote(self.items[0], user, 0) for user in self.users[:2]: Vote.objects.record_vote(self.items[0], user, -1) Vote.objects.record_vote(self.items[1], self.users[0], +1) Vote.objects.record_vote(self.items[2], self.users[0], -1) Vote.objects.record_vote(self.items[3], self.users[0], 0) def test_get_pos_vote(self): vote = Vote.objects.get_for_user(self.items[1], self.users[0]) result = (vote.vote, vote.is_upvote(), vote.is_downvote()) expected = (1, True, False) self.assertEqual(result, expected) def test_get_neg_vote(self): vote = Vote.objects.get_for_user(self.items[2], self.users[0]) result = (vote.vote, vote.is_upvote(), vote.is_downvote()) expected = (-1, False, True) self.assertEqual(result, expected) def test_get_zero_vote(self): self.assertTrue(Vote.objects.get_for_user(self.items[3], self.users[0]) is None) def test_in_bulk1(self): votes = Vote.objects.get_for_user_in_bulk(self.items, self.users[0]) self.assertEqual( [(id, vote.vote) for id, vote in votes.items()], [(1, -1), (2, 1), (3, -1)]) def test_empty_items(self): result = Vote.objects.get_for_user_in_bulk([], self.users[0]) self.assertEqual(result, {}) def test_get_top(self): for user in self.users[1:]: Vote.objects.record_vote(self.items[1], user, +1) Vote.objects.record_vote(self.items[2], user, +1) Vote.objects.record_vote(self.items[3], user, +1) result = list(Vote.objects.get_top(Item)) expected = [(self.items[1], 4), (self.items[3], 3), (self.items[2], 2)] self.assertEqual(result, expected) def test_get_bottom(self): for user in self.users[1:]: Vote.objects.record_vote(self.items[1], user, +1) Vote.objects.record_vote(self.items[2], user, +1) Vote.objects.record_vote(self.items[3], user, +1) for user in self.users[1:]: Vote.objects.record_vote(self.items[1], user, -1) Vote.objects.record_vote(self.items[2], user, -1) Vote.objects.record_vote(self.items[3], user, -1) result = list(Vote.objects.get_bottom(Item)) expected = [(self.items[2], -4), (self.items[3], -3), (self.items[1], -2)] self.assertEqual(result, expected) def test_get_scores_in_bulk(self): for user in self.users[1:]: Vote.objects.record_vote(self.items[1], user, +1) Vote.objects.record_vote(self.items[2], user, +1) Vote.objects.record_vote(self.items[3], user, +1) for user in self.users[1:]: Vote.objects.record_vote(self.items[1], user, -1) Vote.objects.record_vote(self.items[2], user, -1) Vote.objects.record_vote(self.items[3], user, -1) result = Vote.objects.get_scores_in_bulk(self.items) expected = { 1: {'score': 0, 'num_votes': 4}, 2: {'score': -2, 'num_votes': 4}, 3: {'score': -4, 'num_votes': 4}, 4: {'score': -3, 'num_votes': 3}, } self.assertEqual(result, expected) def test_get_scores_in_bulk_no_items(self): result = Vote.objects.get_scores_in_bulk([]) self.assertEqual(result, {})
41.484076
99
0.595425
896
6,513
4.198661
0.116071
0.134503
0.131047
0.161882
0.766348
0.729399
0.715843
0.665338
0.611643
0.598086
0
0.029494
0.234761
6,513
156
100
41.75
0.725321
0.007063
0
0.418605
0
0
0.051561
0
0
0
0
0
0.139535
1
0.139535
false
0
0.03876
0
0.193798
0.007752
0
0
0
null
0
0
1
0
1
1
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
1ddf116bdca6613e7a3cef9650883687a600fa9d
179
py
Python
dmutils/__init__.py
robot2051/dto-digitalmarketplace-utils
e581be6396c12473697398b0ec9d253c564a324b
[ "MIT" ]
null
null
null
dmutils/__init__.py
robot2051/dto-digitalmarketplace-utils
e581be6396c12473697398b0ec9d253c564a324b
[ "MIT" ]
null
null
null
dmutils/__init__.py
robot2051/dto-digitalmarketplace-utils
e581be6396c12473697398b0ec9d253c564a324b
[ "MIT" ]
null
null
null
from . import logging, config, proxy_fix, formats, request_id from .flask_init import init_app, init_frontend_app, init_manager import flask_featureflags __version__ = '24.4.1'
25.571429
65
0.810056
27
179
4.925926
0.703704
0.105263
0
0
0
0
0
0
0
0
0
0.025316
0.117318
179
6
66
29.833333
0.816456
0
0
0
0
0
0.03352
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
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
1deb8efbdd96d38511ba7695b577776dc1d7e9c2
149
py
Python
data/hospital_level/raw/hifld_hospital/download.py
csinva/covid-19-analysis
e7b1e82cb6b25d62a868ff61025d88e17452de28
[ "MIT" ]
2
2020-03-24T16:50:02.000Z
2020-03-24T17:00:50.000Z
data_new/hospital_level/raw/hifld_hospital/download.py
rahul263-stack/covid19-severity-prediction
f581adb2fccb12d5ab3f3c59ee120f484703edf5
[ "MIT" ]
1
2020-03-28T15:34:28.000Z
2020-03-28T19:22:27.000Z
data/hospital_level/raw/hifld_hospital/download.py
Yu-Group/covid-19-ventilator-demand-prediction
e7b1e82cb6b25d62a868ff61025d88e17452de28
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import os os.system('wget \ https://opendata.arcgis.com/datasets/6ac5e325468c4cb9b905f1728d6fbf0f_0.csv \ -O hifld_hospital.csv')
24.833333
77
0.791946
20
149
5.8
0.9
0
0
0
0
0
0
0
0
0
0
0.15
0.060403
149
5
78
29.8
0.678571
0.114094
0
0
0
0
0
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
380600494572f949b77592c439a21526f70f73b6
123
py
Python
contact/urls.py
BobsProgrammingAcademy/Portfolio-Website-Deployment
e3122f6fa0376f64b1580e03b8cb43da6dc85a1a
[ "MIT" ]
null
null
null
contact/urls.py
BobsProgrammingAcademy/Portfolio-Website-Deployment
e3122f6fa0376f64b1580e03b8cb43da6dc85a1a
[ "MIT" ]
null
null
null
contact/urls.py
BobsProgrammingAcademy/Portfolio-Website-Deployment
e3122f6fa0376f64b1580e03b8cb43da6dc85a1a
[ "MIT" ]
null
null
null
from django.urls import path from .views import ContactListView urlpatterns = [ path('', ContactListView.as_view()), ]
20.5
40
0.739837
14
123
6.428571
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.146341
123
6
41
20.5
0.857143
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
38070ca03e30ff02df559993d8efdc9637c42c89
4,610
py
Python
src/sentry/integrations/github/client.py
detouched/sentry
1d3cc332c9ee1c2cf5ddaf1e850e14386c3684dd
[ "BSD-3-Clause" ]
1
2018-12-04T12:57:00.000Z
2018-12-04T12:57:00.000Z
src/sentry/integrations/github/client.py
detouched/sentry
1d3cc332c9ee1c2cf5ddaf1e850e14386c3684dd
[ "BSD-3-Clause" ]
1
2021-05-09T11:43:43.000Z
2021-05-09T11:43:43.000Z
src/sentry/integrations/github/client.py
detouched/sentry
1d3cc332c9ee1c2cf5ddaf1e850e14386c3684dd
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from datetime import datetime from sentry.integrations.github.utils import get_jwt from sentry.integrations.client import ApiClient class GitHubClientMixin(ApiClient): allow_redirects = True base_url = 'https://api.github.com' def get_jwt(self): return get_jwt() def get_last_commits(self, repo, end_sha): # return api request that fetches last ~30 commits # see https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository # using end_sha as parameter return self.get( u'/repos/{}/commits'.format( repo, ), params={'sha': end_sha}, ) def compare_commits(self, repo, start_sha, end_sha): # see https://developer.github.com/v3/repos/commits/#compare-two-commits # where start sha is oldest and end is most recent return self.get(u'/repos/{}/compare/{}...{}'.format( repo, start_sha, end_sha, )) def repo_hooks(self, repo): return self.get(u'/repos/{}/hooks'.format(repo)) def get_commits(self, repo): return self.get(u'/repos/{}/commits'.format(repo)) def get_commit(self, repo, sha): return self.get(u'/repos/{}/commits/{}'.format(repo, sha)) def get_repo(self, repo): return self.get(u'/repos/{}'.format(repo)) def get_repositories(self): repositories = self.get( '/installation/repositories', params={'per_page': 100}, ) return repositories['repositories'] def search_repositories(self, query): return self.get( '/search/repositories', params={'q': query}, ) def get_assignees(self, repo): return self.get(u'/repos/{}/assignees'.format(repo)) def get_issues(self, repo): return self.get(u'/repos/{}/issues'.format(repo)) def search_issues(self, query): return self.get( '/search/issues', params={'q': query}, ) def get_issue(self, repo, number): return self.get(u'/repos/{}/issues/{}'.format(repo, number)) def create_issue(self, repo, data): endpoint = u'/repos/{}/issues'.format(repo) return self.post(endpoint, data=data) def create_comment(self, repo, issue_id, data): endpoint = u'/repos/{}/issues/{}/comments'.format(repo, issue_id) return self.post(endpoint, data=data) def get_user(self, gh_username): return self.get(u'/users/{}'.format(gh_username)) def request(self, method, path, headers=None, data=None, params=None): if headers is None: headers = { 'Authorization': 'token %s' % self.get_token(), # TODO(jess): remove this whenever it's out of preview 'Accept': 'application/vnd.github.machine-man-preview+json', } return self._request(method, path, headers=headers, data=data, params=params) def get_token(self): """ Get token retrieves the active access token from the integration model. Should the token have expried, a new token will be generated and automatically presisted into the integration. """ token = self.integration.metadata.get('access_token') expires_at = self.integration.metadata.get('expires_at') if expires_at is not None: expires_at = datetime.strptime(expires_at, '%Y-%m-%dT%H:%M:%S') if not token or expires_at < datetime.utcnow(): res = self.create_token() token = res['token'] expires_at = datetime.strptime( res['expires_at'], '%Y-%m-%dT%H:%M:%SZ', ) self.integration.metadata.update({ 'access_token': token, 'expires_at': expires_at.isoformat(), }) self.integration.save() return token def create_token(self): return self.post( u'/installations/{}/access_tokens'.format( self.integration.external_id, ), headers={ 'Authorization': 'Bearer %s' % self.get_jwt(), # TODO(jess): remove this whenever it's out of preview 'Accept': 'application/vnd.github.machine-man-preview+json', }, ) class GitHubAppsClient(GitHubClientMixin): def __init__(self, integration): self.integration = integration super(GitHubAppsClient, self).__init__()
32.237762
89
0.58872
537
4,610
4.931099
0.270019
0.060423
0.058912
0.05287
0.314199
0.257931
0.236782
0.163897
0.066465
0.066465
0
0.00212
0.283731
4,610
142
90
32.464789
0.799818
0.122126
0
0.151515
0
0
0.147787
0.051013
0
0
0
0.014085
0
1
0.20202
false
0
0.040404
0.141414
0.474747
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
1
0
0
0
1
0
0
0
3
382763467eeacdcf8102a2eb884ff148f1377e58
269
py
Python
dataladmetadatamodel/text.py
yarikoptic/metadata-model
fac75a12f1c1ceaf111372dc1d22c8f39ce1481d
[ "MIT" ]
null
null
null
dataladmetadatamodel/text.py
yarikoptic/metadata-model
fac75a12f1c1ceaf111372dc1d22c8f39ce1481d
[ "MIT" ]
null
null
null
dataladmetadatamodel/text.py
yarikoptic/metadata-model
fac75a12f1c1ceaf111372dc1d22c8f39ce1481d
[ "MIT" ]
null
null
null
""" Instances of the Text class just contain text. Their main use is as dummy-element during model development. """ from dataclasses import dataclass from dataladmetadatamodel.connector import ConnectedObject @dataclass class Text(ConnectedObject): content: str
19.214286
58
0.799257
33
269
6.515152
0.787879
0
0
0
0
0
0
0
0
0
0
0
0.144981
269
13
59
20.692308
0.934783
0.39777
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.4
0
0.8
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