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
2bb2c9cea42ee185b7169711c01785326c47df8c
43
py
Python
abc/185/A.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
2
2022-01-22T07:56:58.000Z
2022-01-24T00:29:37.000Z
abc/185/A.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
null
null
null
abc/185/A.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
null
null
null
A = map(int, input().split()) print(min(A))
21.5
29
0.604651
8
43
3.25
0.875
0
0
0
0
0
0
0
0
0
0
0
0.093023
43
2
30
21.5
0.666667
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
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
1
0
4
2bb767a942cbba3cee7127e0a1ecdcf92f9d3b15
96
py
Python
oscar/lib/python2.7/site-packages/flake8/__main__.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/flake8/__main__.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/flake8/__main__.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
"""Module allowing for ``python -m flake8 ...``.""" from flake8.main import cli cli.main()
19.2
52
0.625
13
96
4.615385
0.769231
0
0
0
0
0
0
0
0
0
0
0.025316
0.177083
96
4
53
24
0.734177
0.46875
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
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
4
2bbbb791c3c9cf7de98e4ca40d686b8d6cfe7cc8
167
py
Python
python27_comp.py
SM64-TAS-ABC/DAKompiler
f3d47f9644958a7343759e5763159d5d0e15d625
[ "MIT" ]
3
2019-07-28T19:50:34.000Z
2020-05-06T06:28:42.000Z
python27_comp.py
SM64-TAS-ABC/DAKompiler
f3d47f9644958a7343759e5763159d5d0e15d625
[ "MIT" ]
null
null
null
python27_comp.py
SM64-TAS-ABC/DAKompiler
f3d47f9644958a7343759e5763159d5d0e15d625
[ "MIT" ]
null
null
null
def to_bytes(n, length, byteorder='big'): h = '%x' % n s = ('0'*(len(h) % 2) + h).zfill(length*2).decode('hex') return s if byteorder == 'big' else s[::-1]
41.75
60
0.532934
29
167
3.034483
0.689655
0.272727
0
0
0
0
0
0
0
0
0
0.030303
0.209581
167
4
61
41.75
0.636364
0
0
0
0
0
0.071429
0
0
0
0
0
0
1
0.25
false
0
0
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
2bc914bc771ab46b3ea4e43f424e57c733be0b9c
365
py
Python
tests/unit/test_utils.py
mxa/mapillary_tools
4bfebf8705d06d8568619cc0c6b83fd3d4fad95e
[ "BSD-2-Clause" ]
201
2015-01-15T17:57:14.000Z
2022-03-11T23:32:10.000Z
tests/unit/test_utils.py
mxa/mapillary_tools
4bfebf8705d06d8568619cc0c6b83fd3d4fad95e
[ "BSD-2-Clause" ]
357
2015-01-02T11:40:07.000Z
2022-02-03T06:29:44.000Z
tests/unit/test_utils.py
mxa/mapillary_tools
4bfebf8705d06d8568619cc0c6b83fd3d4fad95e
[ "BSD-2-Clause" ]
141
2015-01-11T22:14:56.000Z
2022-03-16T10:44:25.000Z
from mapillary_tools import utils def test_filter(): images = [ "foo/bar/hello.mp4/hello_123.jpg", "/hello.mp4/hello_123.jpg", "foo/bar/hello/hello_123.jpg", "/hello.mp4/hell_123.jpg", ] r = utils.filter_video_samples(images, "hello.mp4") assert r == ["foo/bar/hello.mp4/hello_123.jpg", "/hello.mp4/hello_123.jpg"]
28.076923
79
0.632877
54
365
4.092593
0.37037
0.217195
0.248869
0.289593
0.484163
0.39819
0.39819
0.39819
0.39819
0.39819
0
0.082192
0.2
365
12
80
30.416667
0.674658
0
0
0
0
0
0.463014
0.438356
0
0
0
0
0.1
1
0.1
false
0
0.1
0
0.2
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
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
2bd642d4cfc3771c180b43889138b148cdd88d5f
182
py
Python
src/commands/away.py
globau/timetracker
c06b0563c6fdde0abe9e34b1efe0d15cc1d0843d
[ "BSD-3-Clause" ]
2
2019-05-18T12:59:12.000Z
2019-05-31T20:41:07.000Z
src/commands/away.py
globau/timetracker
c06b0563c6fdde0abe9e34b1efe0d15cc1d0843d
[ "BSD-3-Clause" ]
1
2019-05-19T12:03:17.000Z
2019-05-27T13:23:16.000Z
src/commands/away.py
globau/timetracker
c06b0563c6fdde0abe9e34b1efe0d15cc1d0843d
[ "BSD-3-Clause" ]
null
null
null
import state import ui from main import cli @cli.command(aliases=["a"], help="set away now") def away(): state.set_away(away=True, reason="requested") ui.notify(away=True)
18.2
49
0.697802
29
182
4.344828
0.62069
0.111111
0
0
0
0
0
0
0
0
0
0
0.148352
182
9
50
20.222222
0.812903
0
0
0
0
0
0.120879
0
0
0
0
0
0
1
0.142857
true
0
0.428571
0
0.571429
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
2bebe6f21f8cebe111cf052b5464de1b3a43924c
7,992
py
Python
Lib/filibuster/content/general.py
LettError/filibuster
c59bef292d779d4bca82e18818f765d494a46a7b
[ "MIT" ]
10
2016-12-21T12:10:23.000Z
2021-03-03T16:49:43.000Z
Lib/filibuster/content/general.py
LettError/filibuster
c59bef292d779d4bca82e18818f765d494a46a7b
[ "MIT" ]
4
2016-12-21T17:53:36.000Z
2020-07-07T13:26:27.000Z
Lib/filibuster/content/general.py
LettError/filibuster
c59bef292d779d4bca82e18818f765d494a46a7b
[ "MIT" ]
2
2019-05-13T16:50:00.000Z
2020-07-08T12:51:30.000Z
# -*- coding: UTF-8 -*- # """ history Generally useful stuff should go here, see content for ideas - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 3.0.0 - split all the content into babycontents evb - note: only one dictionary named 'content' allowed per module this limitation is to speed up loading """ from datetime import date thisYear = date.today().year __version__ = '4.0' content = { 'alphabet_caps' : ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'], 'alphabet_lc' : ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'], 'alphabet_common_lc' : ['s','t','r','n','d','m','n','l','e','a','o'], 'alphabet_sizes' : ['A','B','C','D','E','F','A','B','C','D','E','F','A','B','C','D','E','F','AA','BB','CC','DD','EE','AA','BB','CC','DD','EE','FF','AAA','EEE',], 'syllables' : ['am','air','com','cor','dac','dar','dat','dec','dom','fas','far','haz','lor','mac','mat','nor','or','pat','par','sac','sog','tow','us','vis','war','zen'], 'colors_primary' : ['cyan', 'magenta', 'yellow', 'black', 'red', 'green', 'blue'], 'colors_more' : ['chartreuse','taupe','beige','teal','brown','gray','white','carmine','purple','moss green', ], 'colors_adj' : ['light ', 'dark ', 'deep ', '','','','','','','','',], 'colors_elaborate' : [ '<#colors_adj#><#colors_primary#>', '<#colors_adj#><#colors_more#>', ], 'num_card' : ['one','two','three','four','five','six','seven','eight','nine'], 'num_card_multiple' : ['two','three','four','five','six','seven','eight','nine'], 'num_card_few' : ['two','three','four'], 'num_card_010_019' : ['ten','eleven','twelve','thirteen','fourteen','fifteen','sixteen','seventeen','eighteen','nineteen'], 'num_card_010_090' : ['twenty','thirty','forty','fifty','sixty','seventy','eighty','ninety'], 'num_card_000_100' : ['<#num_card#>','<#num_card_010_019#>','<#num_card_010_090#>','<#num_card_010_090#><#num_card#>'], 'num_roman' : ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X'], 'num_ord' : ['first','second','third','fourth','fifth','sixth','seventh','eighth','ninth'], 'num_ord_010_019' : ['tenth','eleventh','twelfth','thirteenth','fourteenth','fifteenth','sixteenth','seventeenth','eighteenth','nineteenth'], 'num_ord_010_090' : ['twentieth','thirtieth','fortieth','fiftieth','sixtieth','seventieth','eightieth','ninetieth'], 'num_ord_000_100' : ['<#num_ord#>','<#num_ord_010_019#>','<#num_ord_010_090#>','<#num_card_010_090#> <#num_ord#>'], 'num_temperatureF' : [u'<-randint(-20, 100)->°'], 'num_temperatureC' : [u'<-randint(-20, 50)->°'], 'num_temperature' : [u'<#num_temperatureF#>F',u'<#num_temperatureC#>C',], 'amount_small' : ['some','few','2','3','4','5','6'], 'amount_more' : ['over seven', 'over eight', 'over nine', 'over ten', 'over a dozen', 'dozens'], 'amount_many' : ['dozens','a lot','too many','many','a large group', 'a large number'], 'figs' : ['1','2','3','4','5','6','7','8','9','0'], 'figs_nonzero' : ['1','2','3','4','5','6','7','8','9'], 'figs_multiple' : ['2','3','4','5','6','7','8','9'], 'figs_rand_5digit' : ['<-randint(100, 999)->','<-randint(1000, 9999)->','<-randint(10000, 99999)->'], 'figs_rand_4digit' : ['<-randint(1000, 9999)->'], 'figs_rand_3digit' : ['<-randint(100, 999)->'], 'figs_rand_2digit' : ['<-randint(10, 99)->'], 'figs_rand_04digit' : ['<#figs#><#figs#><#figs#><#figs#>'], 'figs_rand_03digit' : ['<#figs#><#figs#><#figs#>'], 'figs_rand_02digit' : ['<#figs#><#figs#>'], 'figs_ord' : ['1st','2nd','3rd','4th','5th','6th','7th','8th','9th'], 'age_adult' : ['<-randint(20, 99)->'], 'age_child' : ['<-randint(3, 12)->'], 'age_baby' : ['<-randint(1, 2)->'], 'age_teenager' : ['<-randint(12, 18)->'], 'age_retired' : ['<-randint(65, 99)->'], 'age_worker' : ['<-randint(21, 65)->'], 'time_comingyears' : [str(thisYear), str(thisYear+1), str(thisYear+2), str(thisYear+3), str(thisYear+4) ], 'time_thisyear' : [str(thisYear)], 'time_nextyear' : [str(thisYear+1)], 'time_lastyear' : [str(thisYear-1)], 'time_monthday' : ['<-randint(1,29)->'], 'time_seasons' : ['Spring', 'Summer', 'Autumn', 'Winter' ], 'time_holidays' : [ '<#time_seasons#>', '<#time_seasons#>', '<#time_seasons#>', 'Holidays', 'Thanksgiving', 'Christmas', 'Easter', '<#time_holidays_minor#>',], 'time_holidays_minor' : ['Kwanzaa','Armageddon',"Secretary's Day",'Auto Safety Week','Arbor Day','Cinco de Mayo','Bastille Day',"Guy Fawkes' Night",'Black <#time_days#>'], 'time_months' : ['January','February','March','April','May','June','July','August','September','October','November','December'], 'time_monthdays' : ['<#figs_nonzero#>','1<#figs_nonzero#>','2<#figs_nonzero#>'], 'time_date' : ['1<#figs#> <#time_months#> 200<#figs#>'], 'time_days' : ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'], 'time_workhours' : ['8 a.m.', '9 a.m.', '10 a.m.', '11 a.m.', '12 a.m.', '1 p.m.', '2 p.m.', '3 p.m.', '4 p.m.', '5 p.m.', '6 p.m.'], 'time_usenet' : ['<#time_days#>, 1<#figs#> <#time_months#> 199<#figs#> 1<#figs#>:3<#figs#>:2<#figs#> +<#figs#><#figs#>00 (GMT)'], 'time_age' : ['<#figs_rand_2digit#>'], 'time_day_recentpast' : ['yesterday', 'this morning', 'early this morning', 'last night', 'yesterday afternoon'], 'time_day_nearfuture' : ['today','later today','tomorrow'], 'time_week_recentpast' : ['recently','last week','last <#time_days#>'], 'time_week_nearfuture' : ['presently','shortly','tomorrow','this week','within the week','this <#time_days#>','next <#time_days#>'], 'p_figures_pop' : ['thunderbird','cadillac','corvette','elcamino','bongwater','xrayspex','lavalamp', 'snowcrash','hiro','raven', 'bladerunner','wallace','gromit','pikachu','batman','robin','greenlantern','spiderman','laracroft','dasher','dancer','prancer', 'vixen','comet','cupid','donner','blitzen','mentos','borg','enterprise','hal9000','kremlin','moulinrouge','bigben', 'ernie','bert','kermit','piggy','bigbird'], 'p_miscellaneous' : ['bubbles','paxil','wynona','static','cannonball','roadrage','nascar','mgs','cornflakes','alphabits','zarvox','beanie', 'grand','royal','windmill','touchdown','station'], 'p_whatever' : [ '<#sci_astro#>','<#sci_astro#>','<#sci_astro#>', '<#lit_mythology#>','<#lit_mythology#>','<#lit_mythology#>', '<#lit_figures#>','<#lit_figures#>','<#lit_figures#>', '<#p_figures_pop#>','<#p_figures_pop#>', '<#p_miscellaneous#>', '<#sci_elements#>'], 'left_or_right' : ['left', 'right'], }
7,992
7,992
0.471346
867
7,992
4.16609
0.475202
0.023256
0.023256
0.005537
0.099391
0.070598
0.067553
0.055371
0.055371
0.045958
0
0.040995
0.255255
7,992
1
7,992
7,992
0.565524
1.023899
0
0.022989
0
0.011494
0.508384
0.031831
0
0
0
0
0
1
0
false
0
0.011494
0
0.011494
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
9205fea1e7e13072dbd8b3514ba115f1acb96fd4
58
py
Python
core/bot/commands/__init__.py
osipov-andrey/control_bot
4e82da2eee762dd416db42091532f3e17f2dc7e7
[ "MIT" ]
2
2021-04-24T08:56:15.000Z
2022-01-26T08:22:43.000Z
core/bot/commands/__init__.py
osipov-andrey/control_bot
4e82da2eee762dd416db42091532f3e17f2dc7e7
[ "MIT" ]
null
null
null
core/bot/commands/__init__.py
osipov-andrey/control_bot
4e82da2eee762dd416db42091532f3e17f2dc7e7
[ "MIT" ]
null
null
null
""" Package with command classes and command workflow """
29
57
0.741379
7
58
6.142857
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.155172
58
1
58
58
0.877551
0.844828
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
9206ae8c1ded9455c04771183d073e66e358e759
91
py
Python
.config-autokey-data-scripts/dt--2020-0131-1617.py
thenorili/nori-vimrc
a95bc8171d6fabee390ecc4afe6dad42ebd68d8e
[ "MIT" ]
2
2020-06-17T15:35:42.000Z
2020-06-17T15:35:46.000Z
.config-autokey-data-scripts/dt--2020-0131-1617.py
thenorili/01dotfiles
a95bc8171d6fabee390ecc4afe6dad42ebd68d8e
[ "MIT" ]
null
null
null
.config-autokey-data-scripts/dt--2020-0131-1617.py
thenorili/01dotfiles
a95bc8171d6fabee390ecc4afe6dad42ebd68d8e
[ "MIT" ]
null
null
null
from datetime import datetime keyboard.send_keys(datetime.now().strftime('%Y-%m%-d-%H%M'))
30.333333
60
0.736264
15
91
4.4
0.8
0
0
0
0
0
0
0
0
0
0
0
0.054945
91
2
61
45.5
0.767442
0
0
0
0
0
0.142857
0
0
0
0
0
0
1
0
true
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
1
0
1
0
0
0
0
4
ecff8cc29178676affcd681a9eb8ac060df26609
876
py
Python
World 01/Class 06/ex004.py
DanielRios549/PythonExcercises
acb44a7cc383e8534f47bc59235d9cc04fd83880
[ "MIT" ]
6
2021-05-04T22:09:16.000Z
2022-01-08T20:27:39.000Z
World 01/Class 06/ex004.py
DanielRios549/PythonExercises
acb44a7cc383e8534f47bc59235d9cc04fd83880
[ "MIT" ]
null
null
null
World 01/Class 06/ex004.py
DanielRios549/PythonExercises
acb44a7cc383e8534f47bc59235d9cc04fd83880
[ "MIT" ]
null
null
null
''' Create a script that reads something and show the type and all informations about it. ''' something = input('Type something: ') print(f'The type of this value is \033[34m{type(something)}\033[m') print(f'Has only spaces? \033[34m{something.isspace()}\033[m') print(f'Is numeric? \033[34m{something.isnumeric()}\033[m') print(f'Is alphabetic? \033[34m{something.isalpha()}\033[m') print(f'Is alphamumeric? \033[34m{something.isalnum()}\033[m') print(f'Is uppercase? \033[34m{something.isupper()}\033[m') print(f'Is lowercase? \033[34m{something.islower()}\033[m') print(f'Is capital? \033[34m{something.istitle()}\033[m') print(f'Is decimal? \033[34m{something.isdecimal()}\033[m') print(f'Is digit? \033[34m{something.isdigit()}\033[m') print(f'Is printable? \033[34m{something.isprintable()}\033[m') print(f'Is identifier? \033[34m{something.isidentifier()}\033[m')
48.666667
89
0.718037
144
876
4.368056
0.333333
0.114467
0.157393
0.174881
0.190779
0
0
0
0
0
0
0.118812
0.077626
876
17
90
51.529412
0.659653
0.097032
0
0
0
0
0.799743
0.550706
0
0
0
0
0
1
0
false
0
0
0
0
0.923077
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
1
1
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
a688d7b2cfcd5058fb4a60373c1bf5f68850aafd
58,328
py
Python
codegen/comp_codegen.py
m1griffin/arrayfunc
df57097699c25d3e949e1ade307ed61eaa5728c2
[ "Apache-2.0" ]
2
2017-08-28T08:41:16.000Z
2018-05-29T03:49:36.000Z
codegen/comp_codegen.py
m1griffin/arrayfunc
df57097699c25d3e949e1ade307ed61eaa5728c2
[ "Apache-2.0" ]
null
null
null
codegen/comp_codegen.py
m1griffin/arrayfunc
df57097699c25d3e949e1ade307ed61eaa5728c2
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 ############################################################################## # Project: arrayfunc # Purpose: Generate the C code for math operations. # Language: Python 3.4 # Date: 30-Dec-2017 # ############################################################################### # # Copyright 2014 - 2020 Michael Griffin <m12.griffin@gmail.com> # # 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. # ############################################################################## # ============================================================================== import itertools import codegen_common # ============================================================================== mathops_head = """//------------------------------------------------------------------------------ // Project: arrayfunc // Module: %(funclabel)s.c // Purpose: Calculate the %(funclabel)s of values in an array. // Language: C // Date: 15-Nov-2017. // //------------------------------------------------------------------------------ // // Copyright 2014 - 2020 Michael Griffin <m12.griffin@gmail.com> // // 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. // //------------------------------------------------------------------------------ /*--------------------------------------------------------------------------- */ // This must be defined before "Python.h" in order for the pointers in the // argument parsing functions to work properly. #define PY_SSIZE_T_CLEAN #include "Python.h" #include <limits.h> #include <math.h> #include "arrayerrs.h" #include "arrayparams_base.h" #include "arrayparams_comp.h" #include "simddefs.h" #ifdef AF_HASSIMD_X86 #include "%(funclabel)s_simd_x86.h" #endif #if defined(AF_HASSIMD_ARMv7_32BIT) || defined(AF_HASSIMD_ARM_AARCH64) #include "arm_neon.h" #endif #if defined(AF_HASSIMD_ARMv7_32BIT) #include "%(funclabel)s_simd_armv7.h" #endif #if defined(AF_HASSIMD_ARM_AARCH64) #include "%(funclabel)s_simd_armv8.h" #endif /*--------------------------------------------------------------------------- */ """ # ============================================================================== # The actual compare operations (non-SIMD). ops_comp = """ /*--------------------------------------------------------------------------- */ /* The following series of functions reflect the different parameter options possible. arraylen = The length of the data arrays. data1 = The first data array. data2 = The second data array. param = The parameter to be applied to each array element. */ // param_arr_num char %(funclabel)s_%(funcmodifier)s_1(Py_ssize_t arraylen, int nosimd, %(arraytype)s *data1, %(arraytype)s param) { // array index counter. Py_ssize_t x; %(simd_call_1)s for (x = 0; x < arraylen; x++) { if (!(data1[x] %(copname)s param)) { return 0; } } return 1; } // param_num_arr char %(funclabel)s_%(funcmodifier)s_3(Py_ssize_t arraylen, int nosimd, %(arraytype)s param, %(arraytype)s *data2) { // array index counter. Py_ssize_t x; %(simd_call_3)s for (x = 0; x < arraylen; x++) { if (!(param %(copname)s data2[x])) { return 0; } } return 1; } // param_arr_arr char %(funclabel)s_%(funcmodifier)s_5(Py_ssize_t arraylen, int nosimd, %(arraytype)s *data1, %(arraytype)s *data2) { // array index counter. Py_ssize_t x; %(simd_call_5)s for (x = 0; x < arraylen; x++) { if (!(data1[x] %(copname)s data2[x])) { return 0; } } return 1; } """ # ============================================================================== # ============================================================================== # The actual compare operations using SIMD operations for x86-64. ops_simdsupport_x86 = """ /*--------------------------------------------------------------------------- */ /* The following series of functions reflect the different parameter options possible. arraylen = The length of the data arrays. data1 = The first data array. data2 = The second data array. param = The parameter to be applied to each array element. */ // param_arr_num for array code: %(arraycode)s #if defined(AF_HASSIMD_X86) char %(funclabel)s_%(funcmodifier)s_1_simd(Py_ssize_t arraylen, %(arraytype)s *data1, %(arraytype)s param) { // array index counter. Py_ssize_t index; // SIMD related variables. Py_ssize_t alignedlength; unsigned int y; %(simdattr)s datasliceleft, datasliceright; %(simdattr)s resultslice%(SIMD_x86_compslice)s; %(arraytype)s compvals[%(simdwidth)s]; // Initialise the comparison values. for (y = 0; y < %(simdwidth)s; y++) { compvals[y] = param; } datasliceright = %(vldinstr)s compvals); // Calculate array lengths for arrays whose lengths which are not even // multipes of the SIMD slice length. alignedlength = arraylen - (arraylen %% %(simdwidth)s); // Perform the main operation using SIMD instructions. // On x86 we have to do this in a round-about fashion for some // types of comparison operations due to how SIMD works on that // platform. for (index = 0; index < alignedlength; index += %(simdwidth)s) { datasliceleft = %(vldinstr)s &data1[index]); %(SIMD_x86_arr_num)s } // Get the max value within the left over elements at the end of the array. for (index = alignedlength; index < arraylen; index++) { if (!(data1[index] %(compare_ops)s param)) { return 0; } } return 1; } // param_num_arr char %(funclabel)s_%(funcmodifier)s_3_simd(Py_ssize_t arraylen, %(arraytype)s param, %(arraytype)s *data2) { // array index counter. Py_ssize_t index; // SIMD related variables. Py_ssize_t alignedlength; unsigned int y; %(simdattr)s datasliceleft, datasliceright; %(simdattr)s resultslice%(SIMD_x86_compslice)s; %(arraytype)s compvals[%(simdwidth)s]; // Initialise the comparison values. for (y = 0; y < %(simdwidth)s; y++) { compvals[y] = param; } datasliceleft = %(vldinstr)s compvals); // Calculate array lengths for arrays whose lengths which are not even // multipes of the SIMD slice length. alignedlength = arraylen - (arraylen %% %(simdwidth)s); // Perform the main operation using SIMD instructions. // On x86 we have to do this in a round-about fashion for some // types of comparison operations due to how SIMD works on that // platform. for (index = 0; index < alignedlength; index += %(simdwidth)s) { datasliceright = %(vldinstr)s &data2[index]); %(SIMD_x86_num_arr)s } // Get the max value within the left over elements at the end of the array. for (index = alignedlength; index < arraylen; index++) { if (!(param %(compare_ops)s data2[index])) { return 0; } } return 1; } // param_arr_arr char %(funclabel)s_%(funcmodifier)s_5_simd(Py_ssize_t arraylen, %(arraytype)s *data1, %(arraytype)s *data2) { // array index counter. Py_ssize_t index; // SIMD related variables. Py_ssize_t alignedlength; %(simdattr)s datasliceleft, datasliceright; %(simdattr)s resultslice%(SIMD_x86_compslice)s; // Calculate array lengths for arrays whose lengths which are not even // multipes of the SIMD slice length. alignedlength = arraylen - (arraylen %% %(simdwidth)s); // Perform the main operation using SIMD instructions. // On x86 we have to do this in a round-about fashion for some // types of comparison operations due to how SIMD works on that // platform. for (index = 0; index < alignedlength; index += %(simdwidth)s) { datasliceleft = %(vldinstr)s &data1[index]); datasliceright = %(vldinstr)s &data2[index]); %(SIMD_x86_arr_arr)s } // Get the max value within the left over elements at the end of the array. for (index = alignedlength; index < arraylen; index++) { if (!(data1[index] %(compare_ops)s data2[index])) { return 0; } } return 1; } #endif /*--------------------------------------------------------------------------- */ """ # The actual compare operations using SIMD operations for ARMv7 NEON 32 bit. ops_simdsupport_armv7 = """ /*--------------------------------------------------------------------------- */ /* ARMv7 32 bit SIMD. The following series of functions reflect the different parameter options possible. arraylen = The length of the data arrays. data1 = The first data array. data2 = The second data array. param = The parameter to be applied to each array element. */ // param_arr_num #if defined(AF_HASSIMD_ARMv7_32BIT) char %(funclabel)s_%(funcmodifier)s_1_simd(Py_ssize_t arraylen, %(arraytype)s *data1, %(arraytype)s param) { // array index counter. Py_ssize_t index; // SIMD related variables. Py_ssize_t alignedlength; unsigned int y; %(simdattr)s datasliceleft, datasliceright; %(simdrsltattr)s resultslice; %(arraytype)s compvals[%(simdwidth)s]; // Initialise the comparison values. for (y = 0; y < %(simdwidth)s; y++) { compvals[y] = param; } datasliceright = %(vldinstr)s( compvals); // Calculate array lengths for arrays whose lengths which are not even // multipes of the SIMD slice length. alignedlength = arraylen - (arraylen %% %(simdwidth)s); // Perform the main operation using SIMD instructions. for (index = 0; index < alignedlength; index += %(simdwidth)s) { datasliceleft = %(vldinstr)s( &data1[index]); // The actual SIMD operation. resultslice = %(SIMD_ARM_comp)s(datasliceleft, datasliceright); // Compare the results of the SIMD operation. if (!(%(vresult)s)) { return 0; } } // Get the max value within the left over elements at the end of the array. for (index = alignedlength; index < arraylen; index++) { if (!(data1[index] %(compare_ops)s param)) { return 0; } } return 1; } // param_num_arr char %(funclabel)s_%(funcmodifier)s_3_simd(Py_ssize_t arraylen, %(arraytype)s param, %(arraytype)s *data2) { // array index counter. Py_ssize_t index; // SIMD related variables. Py_ssize_t alignedlength; unsigned int y; %(simdattr)s datasliceleft, datasliceright; %(simdrsltattr)s resultslice; %(arraytype)s compvals[%(simdwidth)s]; // Initialise the comparison values. for (y = 0; y < %(simdwidth)s; y++) { compvals[y] = param; } datasliceleft = %(vldinstr)s( compvals); // Calculate array lengths for arrays whose lengths which are not even // multipes of the SIMD slice length. alignedlength = arraylen - (arraylen %% %(simdwidth)s); // Perform the main operation using SIMD instructions. for (index = 0; index < alignedlength; index += %(simdwidth)s) { datasliceright = %(vldinstr)s( &data2[index]); // The actual SIMD operation. resultslice = %(SIMD_ARM_comp)s(datasliceleft, datasliceright); // Compare the results of the SIMD operation. if (!(%(vresult)s)) { return 0; } } // Get the max value within the left over elements at the end of the array. for (index = alignedlength; index < arraylen; index++) { if (!(param %(compare_ops)s data2[index])) { return 0; } } return 1; } // param_arr_arr char %(funclabel)s_%(funcmodifier)s_5_simd(Py_ssize_t arraylen, %(arraytype)s *data1, %(arraytype)s *data2) { // array index counter. Py_ssize_t index; // SIMD related variables. Py_ssize_t alignedlength; %(simdattr)s datasliceleft, datasliceright; %(simdrsltattr)s resultslice; // Calculate array lengths for arrays whose lengths which are not even // multipes of the SIMD slice length. alignedlength = arraylen - (arraylen %% %(simdwidth)s); // Perform the main operation using SIMD instructions. for (index = 0; index < alignedlength; index += %(simdwidth)s) { datasliceleft = %(vldinstr)s( &data1[index]); datasliceright = %(vldinstr)s( &data2[index]); // The actual SIMD operation. resultslice = %(SIMD_ARM_comp)s(datasliceleft, datasliceright); // Compare the results of the SIMD operation. if (!(%(vresult)s)) { return 0; } } // Get the max value within the left over elements at the end of the array. for (index = alignedlength; index < arraylen; index++) { if (!(data1[index] %(compare_ops)s data2[index])) { return 0; } } return 1; } #endif /*--------------------------------------------------------------------------- */ """ # The actual compare operations using SIMD operations for ARMv8 NEON 64 bit. ops_simdsupport_armv8 = """ /*--------------------------------------------------------------------------- */ /* ARMv8 AARCH64 64 bit SIMD. The following series of functions reflect the different parameter options possible. arraylen = The length of the data arrays. data1 = The first data array. data2 = The second data array. param = The parameter to be applied to each array element. */ // param_arr_num #if defined(AF_HASSIMD_ARM_AARCH64) char %(funclabel)s_%(funcmodifier)s_1_simd(Py_ssize_t arraylen, %(arraytype)s *data1, %(arraytype)s param) { // array index counter. Py_ssize_t index; // SIMD related variables. Py_ssize_t alignedlength; unsigned int y; %(simdattr)s datasliceleft, datasliceright; %(simdrsltattr)s resultslice; %(arraytype)s compvals[%(simdwidth)s]; uint64x2_t veccombine; uint64_t highresult, lowresult; // Initialise the comparison values. for (y = 0; y < %(simdwidth)s; y++) { compvals[y] = param; } datasliceright = %(vldinstr)s( compvals); // Calculate array lengths for arrays whose lengths which are not even // multipes of the SIMD slice length. alignedlength = arraylen - (arraylen %% %(simdwidth)s); // Perform the main operation using SIMD instructions. for (index = 0; index < alignedlength; index += %(simdwidth)s) { datasliceleft = %(vldinstr)s( &data1[index]); // The actual SIMD operation. resultslice = %(SIMD_ARM_comp)s(datasliceleft, datasliceright); // Combine the result to two 64 bit vectors. veccombine = %(veccombine)s(resultslice); // Get the high and low lanes of the combined vector. lowresult = vgetq_lane_u64(veccombine, 0); highresult = vgetq_lane_u64(veccombine, 1); // Compare the results of the SIMD operation. if ((lowresult != %(resultmask)s) || (highresult != %(resultmask)s)) { return 0; } } // Get the max value within the left over elements at the end of the array. for (index = alignedlength; index < arraylen; index++) { if (!(data1[index] %(compare_ops)s param)) { return 0; } } return 1; } // param_num_arr char %(funclabel)s_%(funcmodifier)s_3_simd(Py_ssize_t arraylen, %(arraytype)s param, %(arraytype)s *data2) { // array index counter. Py_ssize_t index; // SIMD related variables. Py_ssize_t alignedlength; unsigned int y; %(simdattr)s datasliceleft, datasliceright; %(simdrsltattr)s resultslice; %(arraytype)s compvals[%(simdwidth)s]; uint64x2_t veccombine; uint64_t highresult, lowresult; // Initialise the comparison values. for (y = 0; y < %(simdwidth)s; y++) { compvals[y] = param; } datasliceleft = %(vldinstr)s( compvals); // Calculate array lengths for arrays whose lengths which are not even // multipes of the SIMD slice length. alignedlength = arraylen - (arraylen %% %(simdwidth)s); // Perform the main operation using SIMD instructions. for (index = 0; index < alignedlength; index += %(simdwidth)s) { datasliceright = %(vldinstr)s( &data2[index]); // The actual SIMD operation. resultslice = %(SIMD_ARM_comp)s(datasliceleft, datasliceright); // Combine the result to two 64 bit vectors. veccombine = %(veccombine)s(resultslice); // Get the high and low lanes of the combined vector. lowresult = vgetq_lane_u64(veccombine, 0); highresult = vgetq_lane_u64(veccombine, 1); // Compare the results of the SIMD operation. if ((lowresult != %(resultmask)s) || (highresult != %(resultmask)s)) { return 0; } } // Get the max value within the left over elements at the end of the array. for (index = alignedlength; index < arraylen; index++) { if (!(param %(compare_ops)s data2[index])) { return 0; } } return 1; } // param_arr_arr char %(funclabel)s_%(funcmodifier)s_5_simd(Py_ssize_t arraylen, %(arraytype)s *data1, %(arraytype)s *data2) { // array index counter. Py_ssize_t index; // SIMD related variables. Py_ssize_t alignedlength; %(simdattr)s datasliceleft, datasliceright; %(simdrsltattr)s resultslice; uint64x2_t veccombine; uint64_t highresult, lowresult; // Calculate array lengths for arrays whose lengths which are not even // multipes of the SIMD slice length. alignedlength = arraylen - (arraylen %% %(simdwidth)s); // Perform the main operation using SIMD instructions. for (index = 0; index < alignedlength; index += %(simdwidth)s) { datasliceleft = %(vldinstr)s( &data1[index]); datasliceright = %(vldinstr)s( &data2[index]); // The actual SIMD operation. resultslice = %(SIMD_ARM_comp)s(datasliceleft, datasliceright); // Combine the result to two 64 bit vectors. veccombine = %(veccombine)s(resultslice); // Get the high and low lanes of the combined vector. lowresult = vgetq_lane_u64(veccombine, 0); highresult = vgetq_lane_u64(veccombine, 1); // Compare the results of the SIMD operation. if ((lowresult != %(resultmask)s) || (highresult != %(resultmask)s)) { return 0; } } // Get the max value within the left over elements at the end of the array. for (index = alignedlength; index < arraylen; index++) { if (!(data1[index] %(compare_ops)s data2[index])) { return 0; } } return 1; } #endif /*--------------------------------------------------------------------------- */ """ # ============================================================================== # This is the set of function calls used to call each operator function. compcall = """ // %(funcmodifier)s case '%(arraycode)s' : { switch (arraydata.paramcat) { case param_arr_num : { resultcode = %(funclabel)s_%(funcmodifier)s_1(arraydata.arraylength, arraydata.nosimd, arraydata.array1.%(arraycode)s, arraydata.param.%(arraycode)s); break; } case param_num_arr : { resultcode = %(funclabel)s_%(funcmodifier)s_3(arraydata.arraylength, arraydata.nosimd, arraydata.param.%(arraycode)s, arraydata.array2.%(arraycode)s); break; } case param_arr_arr : { resultcode = %(funclabel)s_%(funcmodifier)s_5(arraydata.arraylength, arraydata.nosimd, arraydata.array1.%(arraycode)s, arraydata.array2.%(arraycode)s); break; } } break; } """ # ============================================================================== # Calls to parameter parseing and the implementing functions. comp_params = """ /*--------------------------------------------------------------------------- */ /* The wrapper to the underlying C function */ static PyObject *py_%(funclabel)s(PyObject *self, PyObject *args, PyObject *keywds) { // The error code returned by the function. char resultcode = 0; // This is used to hold the parsed parameters. struct args_params_comp arraydata = ARGSINIT_COMP; // ----------------------------------------------------- // Get the parameters passed from Python. arraydata = getparams_comp(self, args, keywds, "%(funclabel)s"); // If there was an error, we count on the parameter parsing function to // release the buffers if this was necessary. if (arraydata.error) { return NULL; } // Call the C function. switch(arraydata.arraytype) { %(opscall)s // Wrong array type code. default: { releasebuffers_comp(arraydata); ErrMsgTypeExpectFloat(); return NULL; break; } } // Release the buffers. releasebuffers_comp(arraydata); // Return whether compare was OK. if (resultcode) { Py_RETURN_TRUE; } else { Py_RETURN_FALSE; } } /*--------------------------------------------------------------------------- */ /* The module doc string */ PyDoc_STRVAR(%(funclabel)s__doc__, "%(funclabel)s \\n\\ _____________________________ \\n\\ \\n\\ Calculate %(funclabel)s over the values in an array. \\n\\ \\n\\ ====================== ============================================== \\n\\ Equivalent to: all([x %(compare_ops)s param for x in array1]) \\n\\ or all([param %(compare_ops)s x for x in array1]) \\n\\ or all([x %(compare_ops)s y for x,y in zip(array1, array2)]) \\n\\ ====================== ============================================== \\n\\ \\n\\ ====================== ============================================== \\n\\ Array types supported: %(supportedarrays)s \\n\\ ====================== ============================================== \\n\\ \\n\\ Call formats: \\n\\ \\n\\ result = %(funclabel)s(array1, param) \\n\\ result = %(funclabel)s(param, array1) \\n\\ result = %(funclabel)s(array1, array2) \\n\\ result = %(funclabel)s(array1, param, maxlen=y) \\n\\ result = %(funclabel)s(array1, param, nosimd=False) \\n\\ \\n\\ * array1 - The first input data array to be examined. If no output \\n\\ array is provided the results will overwrite the input data. \\n\\ * param - A non-array numeric parameter. \\n\\ * array2 - A second input data array. Each element in this array is \\n\\ applied to the corresponding element in the first array. \\n\\ * maxlen - Limit the length of the array used. This must be a valid \\n\\ positive integer. If a zero or negative length, or a value which is \\n\\ greater than the actual length of the array is specified, this \\n\\ parameter is ignored. \\n\\ * nosimd - If True, SIMD acceleration is disabled if present. \\n\\ The default is False (SIMD acceleration is enabled if present). \\n\\ * result - A boolean value corresponding to the result of all the \\n\\ comparison operations. If all comparison operations result in true, \\n\\ the return value will be true. If any of them result in false, the \\n\\ return value will be false. \\n\\ "); /*--------------------------------------------------------------------------- */ /* A list of all the methods defined by this module. "%(funclabel)s" is the name seen inside of Python. "py_%(funclabel)s" is the name of the C function handling the Python call. "METH_VARGS" tells Python how to call the handler. The {NULL, NULL} entry indicates the end of the method definitions. */ static PyMethodDef %(funclabel)s_methods[] = { {"%(funclabel)s", (PyCFunction)py_%(funclabel)s, METH_VARARGS | METH_KEYWORDS, %(funclabel)s__doc__}, {NULL, NULL, 0, NULL} }; static struct PyModuleDef %(funclabel)smodule = { PyModuleDef_HEAD_INIT, "%(funclabel)s", NULL, -1, %(funclabel)s_methods }; PyMODINIT_FUNC PyInit_%(funclabel)s(void) { return PyModule_Create(&%(funclabel)smodule); }; /*--------------------------------------------------------------------------- */ """ # ============================================================================== # SIMD call, version 1. SIMD_calltemplate_1 = '''\n%(simdplatform)s // SIMD version. if (!nosimd && (arraylen >= (%(simdwidth)s * 2))) { return %(funclabel)s_%(funcmodifier)s_1_simd(arraylen, data1, param); } #endif\n''' # SIMD call, version 3. SIMD_calltemplate_3 = '''\n%(simdplatform)s // SIMD version. if (!nosimd && (arraylen >= (%(simdwidth)s * 2))) { return %(funclabel)s_%(funcmodifier)s_3_simd(arraylen, param, data2); } #endif\n''' # SIMD call, version 5. SIMD_calltemplate_5 = '''\n%(simdplatform)s // SIMD version. if (!nosimd && (arraylen >= (%(simdwidth)s * 2))) { return %(funclabel)s_%(funcmodifier)s_5_simd(arraylen, data1, data2); } #endif\n''' # ============================================================================== # ============================================================================== # SIMD code for x86. These handle the comparison operations. This must be # done in a round about way for x86 due to the way it works on that platform. # This set covers unsigned integer operations only. # param_arr_num SIMD_x86_uint_arr_num = { 'eq' : '''// Compare the slices. resultslice = %(veqinstr)s(datasliceleft, datasliceright); // Check the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0xffff)) { return 0; }''', 'ge' : '''// Find the minimum values. compslice = %(vmininstr)s(datasliceleft, datasliceright); // If this is different from our compare parameter, then the test // has failed. resultslice = %(veqinstr)s(compslice, datasliceright); // Check the results of the SIMD operation. if ((__builtin_ia32_pmovmskb128((v16qi) resultslice) != 0xffff)) { return 0; }''', 'gt' : '''// Make sure they're not equal. resultslice = %(veqinstr)s(datasliceleft, datasliceright); if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0x0000)) { return 0; } // Find the minimum values. compslice = %(vmininstr)s(datasliceleft, datasliceright); // If this is different from our compare parameter, then the test // has failed. resultslice = %(veqinstr)s(compslice, datasliceright); // Check the results of the SIMD operation. if ((__builtin_ia32_pmovmskb128((v16qi) resultslice) != 0xffff)) { return 0; }''', 'le' : '''// Find the maximum values. compslice = %(vmaxinstr)s(datasliceleft, datasliceright); // If this is different from our compare parameter, then the test // has failed. resultslice = %(veqinstr)s(compslice, datasliceright); // Compare the results of the SIMD operation. if ((__builtin_ia32_pmovmskb128((v16qi) resultslice) != 0xffff)) { return 0; }''', 'lt' : '''// Make sure they're not equal. resultslice = %(veqinstr)s(datasliceleft, datasliceright); if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0x0000)) { return 0; } // Find the maximum values. compslice = %(vmaxinstr)s(datasliceleft, datasliceright); // If this is different from our compare parameter, then the test // has failed. resultslice = %(veqinstr)s(compslice, datasliceright); // Compare the results of the SIMD operation. if ((__builtin_ia32_pmovmskb128((v16qi) resultslice) != 0xffff)) { return 0; }''', 'ne' : '''// Compare for equality. resultslice = %(veqinstr)s(datasliceleft, datasliceright); // Compare the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0x0000)) { return 0; }''', } # param_num_arr SIMD_x86_uint_num_arr = { 'eq' : '''// Compare the slices. resultslice = %(veqinstr)s(datasliceleft, datasliceright); // Check the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0xffff)) { return 0; }''', 'ge' : '''// Find the minimum values. compslice = %(vmininstr)s(datasliceleft, datasliceright); // If this is different from our compare parameter, then the test // has failed. resultslice = %(veqinstr)s(compslice, datasliceright); // Check the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0xffff)) { return 0; }''', 'gt' : '''// Make sure they're not equal. resultslice = %(veqinstr)s(datasliceleft, datasliceright); if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0x0000)) { return 0; } // Find the minimum values. compslice = %(vmininstr)s(datasliceleft, datasliceright); // If this is different from our compare parameter, then the test // has failed. resultslice = %(veqinstr)s(compslice, datasliceright); // Check the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0xffff)) { return 0; }''', 'le' : '''// Find the maximum values. compslice = %(vmaxinstr)s(datasliceleft, datasliceright); // If this is different from our compare parameter, then the test // has failed. resultslice = %(veqinstr)s(compslice, datasliceright); // Compare the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0xffff)) { return 0; }''', 'lt' : '''// Make sure they're not equal. resultslice = %(veqinstr)s(datasliceleft, datasliceright); if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0x0000)) { return 0; } // Find the maximum values. compslice = %(vmaxinstr)s(datasliceleft, datasliceright); // If this is different from our compare parameter, then the test // has failed. resultslice = %(veqinstr)s(compslice, datasliceright); // Compare the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0xffff)) { return 0; }''', 'ne' : '''// Compare for equality. resultslice = %(veqinstr)s(datasliceleft, datasliceright); // Compare the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0x0000)) { return 0; }''', } # param_arr_arr SIMD_x86_uint_arr_arr = { 'eq' : '''// Compare the slices. resultslice = %(veqinstr)s(datasliceleft, datasliceright); // Check the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0xffff)) { return 0; }''', 'ge' : '''// Find the minimum values. compslice = %(vmininstr)s(datasliceleft, datasliceright); // If this is different from our compare parameter, then the test // has failed. resultslice = %(veqinstr)s(compslice, datasliceright); // Compare the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0xffff)) { return 0; }''', 'gt' : '''// Make sure they're not equal. resultslice = %(veqinstr)s(datasliceleft, datasliceright); if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0x0000)) { return 0; } // Find the minimum values. compslice = %(vmininstr)s(datasliceleft, datasliceright); // If this is different from our compare parameter, then the test // has failed. resultslice = %(veqinstr)s(compslice, datasliceright); // Compare the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0xffff)) { return 0; }''', 'le' : '''// Find the maximum values. compslice = %(vmaxinstr)s(datasliceleft, datasliceright); // If this is different from our compare parameter, then the test // has failed. resultslice = %(veqinstr)s(compslice, datasliceright); // Compare the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0xffff)) { return 0; }''', 'lt' : '''// Make sure they're not equal. resultslice = %(veqinstr)s(datasliceleft, datasliceright); if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0x0000)) { return 0; } // Find the maximum values. compslice = %(vmaxinstr)s(datasliceleft, datasliceright); // If this is different from our compare parameter, then the test // has failed. resultslice = %(veqinstr)s(compslice, datasliceright); // Compare the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0xffff)) { return 0; }''', 'ne' : '''// Compare for equality. resultslice = %(veqinstr)s(datasliceleft, datasliceright); // Compare the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0x0000)) { return 0; }''', } # ============================================================================== # SIMD code for x86. This set covers signed integer operations only. # param_arr_num SIMD_x86_int_arr_num = { 'eq' : '''// Compare the slices. resultslice = %(veqinstr)s(datasliceleft, datasliceright); // Check the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0xffff)) { return 0; }''', 'ge' : '''// Find the minimum values. compslice = %(vmininstr)s(datasliceleft, datasliceright); // If this is different from our compare parameter, then the test // has failed. resultslice = %(veqinstr)s(compslice, datasliceright); // Check the results of the SIMD operation. if ((__builtin_ia32_pmovmskb128((v16qi) resultslice) != 0xffff)) { return 0; }''', 'gt' : '''// Compare the slices. resultslice = %(vgtinstr)s(datasliceleft, datasliceright); // Check the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0xffff)) { return 0; }''', 'le' : '''// Compare the slices. resultslice = %(vgtinstr)s(datasliceleft, datasliceright); // Check the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0x0000)) { return 0; }''', 'lt' : '''// Make sure they're not equal. resultslice = %(veqinstr)s(datasliceleft, datasliceright); if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0x0000)) { return 0; } // Make sure they're not greater than. resultslice = %(vgtinstr)s(datasliceleft, datasliceright); // Check the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0x0000)) { return 0; }''', 'ne' : '''// Compare for equality. resultslice = %(veqinstr)s(datasliceleft, datasliceright); // Compare the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0x0000)) { return 0; }''', } # param_num_arr SIMD_x86_int_num_arr = { 'eq' : '''// Compare the slices. resultslice = %(veqinstr)s(datasliceleft, datasliceright); // Check the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0xffff)) { return 0; }''', 'ge' : '''// Find the minimum values. compslice = %(vmininstr)s(datasliceleft, datasliceright); // If this is different from our compare parameter, then the test // has failed. resultslice = %(veqinstr)s(compslice, datasliceright); // Check the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0xffff)) { return 0; }''', 'gt' : '''// Compare the slices. resultslice = %(vgtinstr)s(datasliceleft, datasliceright); // Check the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0xffff)) { return 0; }''', 'le' : '''// Compare the slices. resultslice = %(vgtinstr)s(datasliceleft, datasliceright); // Check the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0x0000)) { return 0; }''', 'lt' : '''// Make sure they're not equal. resultslice = %(veqinstr)s(datasliceleft, datasliceright); if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0x0000)) { return 0; } // Make sure they're not greater than. resultslice = %(vgtinstr)s(datasliceleft, datasliceright); // Check the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0x0000)) { return 0; }''', 'ne' : '''// Compare for equality. resultslice = %(veqinstr)s(datasliceleft, datasliceright); // Compare the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0x0000)) { return 0; }''', } # param_arr_arr SIMD_x86_int_arr_arr = { 'eq' : '''// Compare the slices. resultslice = %(veqinstr)s(datasliceleft, datasliceright); // Check the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0xffff)) { return 0; }''', 'ge' : '''// Find the minimum values. compslice = %(vmininstr)s(datasliceleft, datasliceright); // If this is different from our compare parameter, then the test // has failed. resultslice = %(veqinstr)s(compslice, datasliceright); // Compare the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0xffff)) { return 0; }''', 'gt' : '''// Compare the slices. resultslice = %(vgtinstr)s(datasliceleft, datasliceright); // Check the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0xffff)) { return 0; }''', 'le' : '''// Compare the slices. resultslice = %(vgtinstr)s(datasliceleft, datasliceright); // Check the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0x0000)) { return 0; }''', 'lt' : '''// Make sure they're not equal. resultslice = %(veqinstr)s(datasliceleft, datasliceright); if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0x0000)) { return 0; } // Make sure they're not greater than. resultslice = %(vgtinstr)s(datasliceleft, datasliceright); // Check the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0x0000)) { return 0; }''', 'ne' : '''// Compare for equality. resultslice = %(veqinstr)s(datasliceleft, datasliceright); // Compare the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0x0000)) { return 0; }''', } # ============================================================================== # Templates for x86 SIMD. x86_unsigned_templates = {'arr_num' : SIMD_x86_uint_arr_num, 'num_arr' : SIMD_x86_uint_num_arr, 'arr_arr' : SIMD_x86_uint_arr_arr} x86_signed_templates = {'arr_num' : SIMD_x86_int_arr_num, 'num_arr' : SIMD_x86_int_num_arr, 'arr_arr' : SIMD_x86_int_arr_arr} SIMD_x86_SIMD_templates = { 'b' : x86_signed_templates, 'B' : x86_unsigned_templates, 'h' : x86_signed_templates, 'H' : x86_unsigned_templates, 'i' : x86_signed_templates, 'I' : x86_unsigned_templates, } # x86 SIMD attributes. simdattr_x86 = { 'b' : 'v16qi', 'B' : 'v16qi', 'h' : 'v8hi', 'H' : 'v8hi', 'i' : 'v4si', 'I' : 'v4si', 'f' : 'v4sf', 'd' : 'v2df', } # x86 SIMD load instructions. vldinstr_x86 = { 'b' : '(v16qi) __builtin_ia32_lddqu((char *) ', 'B' : '(v16qi) __builtin_ia32_lddqu((char *) ', 'h' : '(v8hi) __builtin_ia32_lddqu((char *) ', 'H' : '(v8hi) __builtin_ia32_lddqu((char *) ', 'i' : '(v4si) __builtin_ia32_lddqu((char *) ', 'I' : '(v4si) __builtin_ia32_lddqu((char *) ', 'f' : '(v4sf) __builtin_ia32_loadups( ', 'd' : '(v2df) __builtin_ia32_loadupd( ', } veqinstr_x86 = { 'b' : '__builtin_ia32_pcmpeqb128', 'B' : '__builtin_ia32_pcmpeqb128', 'h' : '__builtin_ia32_pcmpeqw128', 'H' : '__builtin_ia32_pcmpeqw128', 'i' : '__builtin_ia32_pcmpeqd128', 'I' : '__builtin_ia32_pcmpeqd128', } vmininstr_x86 = { 'b' : '__builtin_ia32_pminsb128', 'B' : '__builtin_ia32_pminub128', 'h' : '__builtin_ia32_pminsw128', 'H' : '__builtin_ia32_pminuw128', 'i' : '__builtin_ia32_pminsd128', 'I' : '__builtin_ia32_pminud128', } vmaxinstr_x86 = { 'b' : '__builtin_ia32_pmaxsb128', 'B' : '__builtin_ia32_pmaxub128', 'h' : '__builtin_ia32_pmaxsw128', 'H' : '__builtin_ia32_pmaxuw128', 'i' : '__builtin_ia32_pmaxsd128', 'I' : '__builtin_ia32_pmaxud128', } vgtinstr_x86 = { 'b' : '__builtin_ia32_pcmpgtb128', 'B' : '', 'h' : '__builtin_ia32_pcmpgtw128', 'H' : '', 'i' : '__builtin_ia32_pcmpgtd128', 'I' : '', } # Which compare operations need an additional vector for intermediate results. # This depends both upon array type and function. compslice = ', compslice' compslice_uint_x86 = { 'eq' : '', 'ge' : compslice, 'gt' : compslice, 'le' : compslice, 'lt' : compslice, 'ne' : '' } compslice_int_x86 = { 'eq' : '', 'ge' : compslice, 'gt' : '', 'le' : '', 'lt' : '', 'ne' : '' } SIMD_x86_compslice = { 'b' : compslice_int_x86, 'B' : compslice_uint_x86, 'h' : compslice_int_x86, 'H' : compslice_uint_x86, 'i' : compslice_int_x86, 'I' : compslice_uint_x86, } # ============================================================================== # SIMD code for x86. This set covers single and double floating point # operations only. On x86, floating point SIMD operations are much # more regular and complete than for integer operations. SIMD_x86_float = '''// Compare the slices. resultslice = %(vcmpinstr)s(datasliceleft, datasliceright); // Check the results of the SIMD operation. if (!(__builtin_ia32_pmovmskb128((v16qi) resultslice) == 0xffff)) { return 0; }''' vfloat_ops_x86 = { 'f' : { 'eq' : '__builtin_ia32_cmpeqps', 'ge' : '__builtin_ia32_cmpgeps', 'gt' : '__builtin_ia32_cmpgtps', 'le' : '__builtin_ia32_cmpleps', 'lt' : '__builtin_ia32_cmpltps', 'ne' : '__builtin_ia32_cmpneqps' }, 'd' : { 'eq' : '__builtin_ia32_cmpeqpd', 'ge' : '__builtin_ia32_cmpgepd', 'gt' : '__builtin_ia32_cmpgtpd', 'le' : '__builtin_ia32_cmplepd', 'lt' : '__builtin_ia32_cmpltpd', 'ne' : '__builtin_ia32_cmpneqpd' } } # ============================================================================== # Total list of which array types are supported by x86 SIMD instructions. SIMD_x86_support = simdattr_x86.keys() # ============================================================================== # ============================================================================== # For ARM NEON ARMv7 32 bit. # Benchmarking has shown that some SIMD operations are slower than the # non-SIMD versions and so are not used here. simdattr_armv7 = { 'b' : 'int8x8_t', 'B' : 'uint8x8_t', 'h' : 'int16x4_t', 'H' : 'uint16x4_t', } simdrsltattr_armv7 = { 'b' : 'uint8x8_t', 'B' : 'uint8x8_t', 'h' : 'uint16x4_t', 'H' : 'uint16x4_t', } # Load values to SIMD registers. vldinstr_armv7 = { 'b' : 'vld1_s8', 'B' : 'vld1_u8', 'h' : 'vld1_s16', 'H' : 'vld1_u16', } # Compare result to see if OK. This depends both on size and also # 'ne' must be handled differently. vresult_8_armv7 = 'vreinterpret_u64_u8(resultslice) == 0xffffffffffffffff' vresult_16_armv7 = 'vreinterpret_u64_u16(resultslice) == 0xffffffffffffffff' vresult_8_ne_armv7 = 'vreinterpret_u64_u8(resultslice) == 0x0000000000000000' vresult_16_ne_armv7 = 'vreinterpret_u64_u16(resultslice) == 0x0000000000000000' vreslt_8_total_armv7 = { 'eq' : vresult_8_armv7, 'ge' : vresult_8_armv7, 'gt' : vresult_8_armv7, 'le' : vresult_8_armv7, 'lt' : vresult_8_armv7, 'ne' : vresult_8_ne_armv7, } vresult_16_total_armv7 = { 'eq' : vresult_16_armv7, 'ge' : vresult_16_armv7, 'gt' : vresult_16_armv7, 'le' : vresult_16_armv7, 'lt' : vresult_16_armv7, 'ne' : vresult_16_ne_armv7, } # The above combined so we can look it up. vresult_armv7 = { 'b' : vreslt_8_total_armv7, 'B' : vreslt_8_total_armv7, 'h' : vresult_16_total_armv7, 'H' : vresult_16_total_armv7, } # The ARM SIMD ops for compare. The NE op must be combined with a # different vresult as there is no actual not equal op. vsimdops_armv7 = { 'b' : { 'eq' : 'vceq_s8', 'ge' : 'vcge_s8', 'gt' : 'vcgt_s8', 'le' : 'vcle_s8', 'lt' : 'vclt_s8', 'ne' : 'vceq_s8' }, 'B' : { 'eq' : 'vceq_u8', 'ge' : 'vcge_u8', 'gt' : 'vcgt_u8', 'le' : 'vcle_u8', 'lt' : 'vclt_u8', 'ne' : 'vceq_u8' }, 'h' : { 'eq' : 'vceq_s16', 'ge' : 'vcge_s16', 'gt' : 'vcgt_s16', 'le' : 'vcle_s16', 'lt' : 'vclt_s16', 'ne' : 'vceq_s16' }, 'H' : { 'eq' : 'vceq_u16', 'ge' : 'vcge_u16', 'gt' : 'vcgt_u16', 'le' : 'vcle_u16', 'lt' : 'vclt_u16', 'ne' : 'vceq_u16' }, } # ============================================================================== # Total list of which array types are supported by ARM SIMD instructions. SIMD_armv7_support = simdattr_armv7.keys() # ============================================================================== # For ARM NEON armv8 64 bit. # Benchmarking has shown that some SIMD operations are slower than the # non-SIMD versions and so are not used here. vsimdattr_armv8 = { 'b' : 'int8x16_t', 'B' : 'uint8x16_t', 'h' : 'int16x8_t', 'H' : 'uint16x8_t', 'i' : 'int32x4_t', 'I' : 'uint32x4_t', 'f' : 'float32x4_t', } vsimdrsltattr_armv8 = { 'b' : 'uint8x16_t', 'B' : 'uint8x16_t', 'h' : 'uint16x8_t', 'H' : 'uint16x8_t', 'i' : 'uint32x4_t', 'I' : 'uint32x4_t', 'f' : 'uint32x4_t', } # Load values to SIMD registers. vldinstr_armv8 = { 'b' : 'vld1q_s8', 'B' : 'vld1q_u8', 'h' : 'vld1q_s16', 'H' : 'vld1q_u16', 'i' : 'vld1q_s32', 'I' : 'vld1q_u32', 'f' : 'vld1q_f32', } # Combine the result vectors into two 64 bit vectors. veccombine_armv8 = { 'b' : 'vreinterpretq_u64_u8', 'B' : 'vreinterpretq_u64_u8', 'h' : 'vreinterpretq_u64_u16', 'H' : 'vreinterpretq_u64_u16', 'i' : 'vreinterpretq_u64_u32', 'I' : 'vreinterpretq_u64_u32', 'f' : 'vreinterpretq_u64_u32', } # Compare result to see if OK. This depends both on size and also # 'ne' must be handled differently. vresultmask_ops_armv8 = '0xffffffffffffffff' vresultmask_ne_armv8 = '0x0000000000000000' vresultmask_armv8 = { 'eq' : vresultmask_ops_armv8, 'ge' : vresultmask_ops_armv8, 'gt' : vresultmask_ops_armv8, 'le' : vresultmask_ops_armv8, 'lt' : vresultmask_ops_armv8, 'ne' : vresultmask_ne_armv8, } # The ARM SIMD ops for compare. The NE op must be combined with a # different vresult as there is no actual not equal op. vsimdops_armv8 = { 'b' : { 'eq' : 'vceqq_s8', 'ge' : 'vcgeq_s8', 'gt' : 'vcgtq_s8', 'le' : 'vcleq_s8', 'lt' : 'vcltq_s8', 'ne' : 'vceqq_s8' }, 'B' : { 'eq' : 'vceqq_u8', 'ge' : 'vcgeq_u8', 'gt' : 'vcgtq_u8', 'le' : 'vcleq_u8', 'lt' : 'vcltq_u8', 'ne' : 'vceqq_u8' }, 'h' : { 'eq' : 'vceqq_s16', 'ge' : 'vcgeq_s16', 'gt' : 'vcgtq_s16', 'le' : 'vcleq_s16', 'lt' : 'vcltq_s16', 'ne' : 'vceqq_s16' }, 'H' : { 'eq' : 'vceqq_u16', 'ge' : 'vcgeq_u16', 'gt' : 'vcgtq_u16', 'le' : 'vcleq_u16', 'lt' : 'vcltq_u16', 'ne' : 'vceqq_u16' }, 'i' : { 'eq' : 'vceqq_s32', 'ge' : 'vcgeq_s32', 'gt' : 'vcgtq_s32', 'le' : 'vcleq_s32', 'lt' : 'vcltq_s32', 'ne' : 'vceqq_s32' }, 'I' : { 'eq' : 'vceqq_u32', 'ge' : 'vcgeq_u32', 'gt' : 'vcgtq_u32', 'le' : 'vcleq_u32', 'lt' : 'vcltq_u32', 'ne' : 'vceqq_u32' }, 'f' : { 'eq' : 'vceqq_f32', 'ge' : 'vcgeq_f32', 'gt' : 'vcgtq_f32', 'le' : 'vcleq_f32', 'lt' : 'vcltq_f32', 'ne' : 'vceqq_f32' }, } # ============================================================================== # Total list of which array types are supported by ARM SIMD instructions. SIMD_armv8_support = vsimdattr_armv8.keys() # ============================================================================== # Width of array elements. simdwidth = {'b' : 'CHARSIMDSIZE', 'B' : 'CHARSIMDSIZE', 'h' : 'SHORTSIMDSIZE', 'H' : 'SHORTSIMDSIZE', 'i' : 'INTSIMDSIZE', 'I' : 'INTSIMDSIZE', 'f' : 'FLOATSIMDSIZE', 'd' : 'DOUBLESIMDSIZE', } # ============================================================================== # Compare operations. compare_ops = { 'eq' : '==', 'ge' : '>=', 'gt' : '>', 'le' : '<=', 'lt' : '<', 'ne' : '!=' } # ============================================================================== # These get substituted into function call templates. SIMD_platform_x86 = '#if defined(AF_HASSIMD_X86)' SIMD_platform_x86_ARM = '#if defined(AF_HASSIMD_X86) || defined(AF_HASSIMD_ARMv7_32BIT) || defined(AF_HASSIMD_ARM_AARCH64)' SIMD_platform_x86_ARMv8 = '#if defined(AF_HASSIMD_X86) || defined(AF_HASSIMD_ARM_AARCH64)' SIMD_platform_ARMv7 = '#if defined(AF_HASSIMD_ARMv7_32BIT)' SIMD_platform_ARM64v8 = '#if defined(AF_HASSIMD_ARM_AARCH64)' # ============================================================================== # Return the platform SIMD enable C macro. # This is for the platform independent file, and not the plaform specific # SIMD files. def findsimdplatform(arraycode): hasx86 = arraycode in SIMD_x86_support hasarmv7 = arraycode in SIMD_armv7_support hasarmv8 = arraycode in SIMD_armv8_support # Only the platforms combinations which are used currently are defined here. if hasx86 and hasarmv7 and hasarmv8: return SIMD_platform_x86_ARM elif hasx86 and (not hasarmv7) and (not hasarmv8): return SIMD_platform_x86 elif hasx86 and (not hasarmv7) and hasarmv8: return SIMD_platform_x86_ARMv8 else: return 'Error: Template error, this should not be here.' # ============================================================================== # ============================================================================== # Read in the op codes. opdata = codegen_common.ReadINI('affuncdata.ini') # Filter out the desired math functions. funclist = [(x,dict(y)) for x,y in opdata.items() if y.get('c_code_template') == 'template_comp'] # ============================================================================== # Output the main code body. for funcname, func in funclist: # Create the source code based on templates. filename = funcname + '.c' with open(filename, 'w') as f: funcdata = {'funclabel' : funcname} f.write(mathops_head % {'funclabel' : funcname}) opscalltext = [] # Check each array type. for arraycode in codegen_common.arraycodes: funcdata['funcmodifier'] = codegen_common.arraytypes[arraycode].replace(' ', '_') funcdata['arraytype'] = codegen_common.arraytypes[arraycode] if arraycode == 'f': funcdata['copname'] = func['c_operator_f'] elif arraycode == 'd': funcdata['copname'] = func['c_operator_d'] elif arraycode in codegen_common.intarrays: funcdata['copname'] = func['c_operator_i'] else: print('Error - Unsupported array code.', arraycode) # Each call to an SIMD function comes in three different versions due # to there being three different parameter formats. if arraycode in (set(SIMD_x86_support) | set(SIMD_armv7_support) | set(SIMD_armv8_support)): simdfunccall = {'simdwidth' : simdwidth[arraycode], 'funclabel' : funcdata['funclabel'], 'funcmodifier' : funcdata['funcmodifier'], 'simdplatform' : findsimdplatform(arraycode),} simd_call_1 = SIMD_calltemplate_1 % simdfunccall simd_call_3 = SIMD_calltemplate_3 % simdfunccall simd_call_5 = SIMD_calltemplate_5 % simdfunccall else: simd_call_1 = '' simd_call_3 = '' simd_call_5 = '' funcdata['simd_call_1'] = simd_call_1 funcdata['simd_call_3'] = simd_call_3 funcdata['simd_call_5'] = simd_call_5 f.write(ops_comp % funcdata) # This is the call to the functions for this array type. This # is inserted into another template below. funcdata['arraycode'] = arraycode opscalltext.append(compcall % funcdata) supportedarrays = codegen_common.FormatDocsArrayTypes(func['arraytypes']) f.write(comp_params % {'funclabel' : funcname, 'opcodedocs' : func['opcodedocs'], 'compare_ops' : compare_ops[funcname], 'supportedarrays' : supportedarrays, 'matherrors' : ', '.join(func['matherrors'].split(',')), 'opscall' : ''.join(opscalltext), 'simd_call_1' : simd_call_1, 'simd_call_3' : simd_call_3, 'simd_call_5' : simd_call_5}) # ============================================================================== # ============================================================================== # The original date of the SIMD C code. simdcodedate = '16-Jan-2018' simdfilename = '_simd_x86' # This outputs the SIMD version for x86-64. for funcname, func in funclist: outputlist = [] # This provides the description in the header of the file. maindescription = 'Calculate the %s of values in an array.' % funcname # Output the generated code. # Handle integer operations. for arraycode in SIMD_x86_SIMD_templates: arraytype = codegen_common.arraytypes[arraycode] # This fetches the individual SIMD instructions. template_instr = {'veqinstr' : veqinstr_x86[arraycode], 'vmininstr' : vmininstr_x86[arraycode], 'vmaxinstr' : vmaxinstr_x86[arraycode], 'vgtinstr' : vgtinstr_x86[arraycode], } # These templates put the SIMD instructions together for the # final template. template_arr_num = SIMD_x86_SIMD_templates[arraycode]['arr_num'][funcname] % template_instr template_num_arr = SIMD_x86_SIMD_templates[arraycode]['num_arr'][funcname] % template_instr template_arr_arr = SIMD_x86_SIMD_templates[arraycode]['arr_arr'][funcname] % template_instr # The compare_ops symbols is the same for integer and floating point. datavals = {'funclabel' : funcname, 'arraytype' : arraytype, 'funcmodifier' : arraytype.replace(' ', '_'), 'arraycode' : arraycode, 'compare_ops' : compare_ops[funcname], 'simdwidth' : simdwidth[arraycode], 'simdattr' : simdattr_x86[arraycode], 'vldinstr' : vldinstr_x86[arraycode], 'SIMD_x86_compslice' : SIMD_x86_compslice[arraycode][funcname], 'SIMD_x86_arr_num' : template_arr_num, 'SIMD_x86_num_arr' : template_num_arr, 'SIMD_x86_arr_arr' : template_arr_arr } # Start of function definition. outputlist.append(ops_simdsupport_x86 % datavals) # Handle floating point operations. for arraycode in vfloat_ops_x86: arraytype = codegen_common.arraytypes[arraycode] template_instr = {'vcmpinstr' : vfloat_ops_x86[arraycode][funcname]} template_float = SIMD_x86_float % template_instr # The compare_ops symbols is the same for integer and floating point. datavals = {'funclabel' : funcname, 'arraytype' : arraytype, 'funcmodifier' : arraytype.replace(' ', '_'), 'arraycode' : arraycode, 'compare_ops' : compare_ops[funcname], 'simdwidth' : simdwidth[arraycode], 'simdattr' : simdattr_x86[arraycode], 'vldinstr' : vldinstr_x86[arraycode], 'SIMD_x86_compslice' : '', 'SIMD_x86_arr_num' : template_float, 'SIMD_x86_num_arr' : template_float, 'SIMD_x86_arr_arr' : template_float } # Start of function definition. outputlist.append(ops_simdsupport_x86 % datavals) # This outputs the SIMD version. codegen_common.OutputSourceCode(funcname + simdfilename + '.c', outputlist, maindescription, codegen_common.SIMDDescription, simdcodedate, '', ['simddefs']) # Output the .h header file. headedefs = codegen_common.GenSIMDCHeaderText(outputlist, funcname) # Write out the file. codegen_common.OutputCHeader(funcname + simdfilename + '.h', headedefs, maindescription, codegen_common.SIMDDescription, simdcodedate) # ============================================================================== # ============================================================================== # The original date of the SIMD C code. simdcodedate = '06-Oct-2019' simdfilename = '_simd_armv7' # This outputs the SIMD version for ARM NEON ARMv7 32 bit. for funcname, func in funclist: outputlist = [] # This provides the description in the header of the file. maindescription = 'Calculate the %s of values in an array.' % funcname # Output the generated code. for arraycode in SIMD_armv7_support: arraytype = codegen_common.arraytypes[arraycode] # The compare_ops symbols is the same for integer and floating point. datavals = {'funclabel' : funcname, 'arraytype' : arraytype, 'funcmodifier' : arraytype.replace(' ', '_'), 'simdwidth' : simdwidth[arraycode], 'arraycode' : arraycode, 'arraytype' : codegen_common.arraytypes[arraycode], 'compare_ops' : compare_ops[funcname], 'simdattr' : simdattr_armv7[arraycode], 'simdrsltattr' : simdrsltattr_armv7[arraycode], 'vldinstr' : vldinstr_armv7[arraycode], 'vresult' : vresult_armv7[arraycode][funcname], 'SIMD_ARM_comp' : vsimdops_armv7[arraycode][funcname], } # Start of function definition. outputlist.append(ops_simdsupport_armv7 % datavals) # This outputs the SIMD version. codegen_common.OutputSourceCode(funcname + simdfilename + '.c', outputlist, maindescription, codegen_common.SIMDDescription, simdcodedate, '', ['simddefs', 'simdmacromsg_armv7']) # Output the .h header file. headedefs = codegen_common.GenSIMDCHeaderText(outputlist, funcname) # Write out the file. codegen_common.OutputCHeader(funcname + simdfilename + '.h', headedefs, maindescription, codegen_common.SIMDDescription, simdcodedate) # ============================================================================== # ============================================================================== # The original date of the SIMD C code. simdcodedate = '22-Mar-2020' simdfilename = '_simd_armv8' # This outputs the SIMD version for ARM NEON ARMv8 64 bit. for funcname, func in funclist: outputlist = [] # This provides the description in the header of the file. maindescription = 'Calculate the %s of values in an array.' % funcname # Output the generated code. for arraycode in codegen_common.arraycodes: if arraycode in SIMD_armv8_support: arraytype = codegen_common.arraytypes[arraycode] # The compare_ops symbols is the same for integer and floating point. datavals = {'funclabel' : funcname, 'arraytype' : arraytype, 'funcmodifier' : arraytype.replace(' ', '_'), 'simdwidth' : simdwidth[arraycode], 'arraycode' : arraycode, 'arraytype' : codegen_common.arraytypes[arraycode], 'compare_ops' : compare_ops[funcname], 'simdattr' : vsimdattr_armv8[arraycode], 'simdrsltattr' : vsimdrsltattr_armv8[arraycode], 'veccombine' : veccombine_armv8[arraycode], 'resultmask' : vresultmask_armv8[funcname], 'vldinstr' : vldinstr_armv8[arraycode], 'SIMD_ARM_comp' : vsimdops_armv8[arraycode][funcname], } # Start of function definition. outputlist.append(ops_simdsupport_armv8 % datavals) # This outputs the SIMD version. codegen_common.OutputSourceCode(funcname + simdfilename + '.c', outputlist, maindescription, codegen_common.SIMDDescription, simdcodedate, '', ['simddefs', 'simdmacromsg_armv8']) # Output the .h header file. headedefs = codegen_common.GenSIMDCHeaderText(outputlist, funcname) # Write out the file. codegen_common.OutputCHeader(funcname + simdfilename + '.h', headedefs, maindescription, codegen_common.SIMDDescription, simdcodedate) # ==============================================================================
30.004115
156
0.634841
6,866
58,328
5.210312
0.091756
0.026751
0.047744
0.03086
0.735059
0.702438
0.68041
0.663694
0.651814
0.645441
0
0.033264
0.165032
58,328
1,943
157
30.019557
0.701285
0.130829
0
0.554688
1
0.012784
0.761717
0.175313
0
0
0.007633
0
0
1
0.00071
false
0.00071
0.00142
0
0.06179
0.00071
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
a69ffdf5e46865295f34f291658e94fb74365e4b
378
py
Python
api/src/opentrons/protocol_engine/execution/__init__.py
faliester/opentrons
e945d0f72fed39b0f68c0b30b7afd1981644184f
[ "Apache-2.0" ]
null
null
null
api/src/opentrons/protocol_engine/execution/__init__.py
faliester/opentrons
e945d0f72fed39b0f68c0b30b7afd1981644184f
[ "Apache-2.0" ]
null
null
null
api/src/opentrons/protocol_engine/execution/__init__.py
faliester/opentrons
e945d0f72fed39b0f68c0b30b7afd1981644184f
[ "Apache-2.0" ]
null
null
null
"""Command execution module.""" from .command_handlers import CommandHandlers from .equipment import EquipmentHandler, LoadedLabware, LoadedPipette from .movement import MovementHandler from .pipetting import PipettingHandler __all__ = [ "CommandHandlers", "EquipmentHandler", "LoadedLabware", "LoadedPipette", "MovementHandler", "PipettingHandler", ]
23.625
69
0.759259
29
378
9.724138
0.551724
0.205674
0.297872
0
0
0
0
0
0
0
0
0
0.150794
378
15
70
25.2
0.878505
0.066138
0
0
0
0
0.253602
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
a6b8e925df10a0704a01f1deab8b0c6ade21ff50
138
py
Python
cvat/apps/annotation/__init__.py
raunilillemets/cvat
c083b5d3a60270121abc3f3fe596ff94ae0eb60f
[ "MIT" ]
2
2020-01-10T08:50:50.000Z
2020-01-23T06:11:11.000Z
cvat/apps/annotation/__init__.py
raunilillemets/cvat
c083b5d3a60270121abc3f3fe596ff94ae0eb60f
[ "MIT" ]
29
2020-01-28T23:08:18.000Z
2022-03-12T00:05:33.000Z
cvat/apps/annotation/__init__.py
maitreyamaity/CVAT-SIM-TEST
6b97145c8f4584d9ad40a4b6541424955e272e42
[ "MIT" ]
5
2020-07-01T18:02:48.000Z
2021-01-22T02:21:48.000Z
# Copyright (C) 2018 Intel Corporation # # SPDX-License-Identifier: MIT default_app_config = 'cvat.apps.annotation.apps.AnnotationConfig'
27.6
65
0.797101
17
138
6.352941
0.941176
0
0
0
0
0
0
0
0
0
0
0.032
0.094203
138
4
66
34.5
0.832
0.471014
0
0
0
0
0.608696
0.608696
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
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
a6c399610c3ca39b1016bf3a17aac8a46de2b9ca
183
py
Python
list_slice.py
python4duty/python3
b94857db4b080891f19f377ecbc562b2cc80385a
[ "MIT" ]
null
null
null
list_slice.py
python4duty/python3
b94857db4b080891f19f377ecbc562b2cc80385a
[ "MIT" ]
null
null
null
list_slice.py
python4duty/python3
b94857db4b080891f19f377ecbc562b2cc80385a
[ "MIT" ]
null
null
null
# SLICE list = ['start', 'second', 'third', 'fourth', 'fifth'] list_fra = list[2] print(list) print(list_fra) print(list[1:3]) print(list[-3:-1]) print(list[-3:]) print(list[:-3])
14.076923
54
0.617486
30
183
3.7
0.4
0.486486
0.27027
0.198198
0
0
0
0
0
0
0
0.04321
0.114754
183
12
55
15.25
0.641975
0.027322
0
0
0
0
0.153409
0
0
0
0
0
0
1
0
false
0
0
0
0
0.75
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
1
0
4
a6e239a67c705fe391b91fc8c5c11203668fa35a
253
py
Python
allure/adaptor.py
AnandJyrm/allure-pytest
495a90d64690d200ca402a5dbffb96f6335d428b
[ "Apache-2.0" ]
112
2017-01-24T21:37:49.000Z
2022-03-25T22:32:12.000Z
allure/adaptor.py
AnandJyrm/allure-pytest
495a90d64690d200ca402a5dbffb96f6335d428b
[ "Apache-2.0" ]
56
2017-01-21T20:01:41.000Z
2019-01-14T13:35:53.000Z
allure/adaptor.py
AnandJyrm/allure-pytest
495a90d64690d200ca402a5dbffb96f6335d428b
[ "Apache-2.0" ]
52
2017-01-23T13:40:40.000Z
2022-03-30T00:02:31.000Z
''' Created on Feb 23, 2014 @author: pupssman ''' import warnings warnings.warn('"allure.adaptor" is deprecated, use "allure.pytest_plugin" instead.') # impersonate the old ``adaptor`` from allure.pytest_plugin import * # @UnusedWildImport # noqa
19.461538
84
0.731225
31
253
5.903226
0.774194
0.131148
0.196721
0
0
0
0
0
0
0
0
0.02765
0.142292
253
12
85
21.083333
0.815668
0.395257
0
0
0
0
0.468531
0.153846
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
a6f095f5308fc275f656e713e0bb940656e5d7ab
57
py
Python
apps/receipt/__init__.py
uk-gov-mirror/ministryofjustice.manchester_traffic_offences_pleas
4c625b13fa2826bdde083a0270dcea1791f6dc18
[ "MIT" ]
3
2015-12-22T16:37:14.000Z
2018-01-22T18:44:38.000Z
apps/receipt/__init__.py
uk-gov-mirror/ministryofjustice.manchester_traffic_offences_pleas
4c625b13fa2826bdde083a0270dcea1791f6dc18
[ "MIT" ]
145
2015-03-04T11:17:50.000Z
2022-03-21T12:10:13.000Z
apps/receipt/__init__.py
uk-gov-mirror/ministryofjustice.manchester_traffic_offences_pleas
4c625b13fa2826bdde083a0270dcea1791f6dc18
[ "MIT" ]
3
2015-12-29T14:59:12.000Z
2021-04-11T06:24:11.000Z
# tidy up imports #from .process import process_receipts
19
38
0.807018
8
57
5.625
0.875
0
0
0
0
0
0
0
0
0
0
0
0.140351
57
3
38
19
0.918367
0.912281
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
47115ce29f0a7759c870443a773e39c46d0f4155
41
py
Python
core/python-scripts/custom_errors.py
lucaromagnoli/Nomad-Monad-Scripts
1e8f66cdd3c8797360dad15bf0f2d8d227658279
[ "MIT" ]
null
null
null
core/python-scripts/custom_errors.py
lucaromagnoli/Nomad-Monad-Scripts
1e8f66cdd3c8797360dad15bf0f2d8d227658279
[ "MIT" ]
null
null
null
core/python-scripts/custom_errors.py
lucaromagnoli/Nomad-Monad-Scripts
1e8f66cdd3c8797360dad15bf0f2d8d227658279
[ "MIT" ]
null
null
null
class ResampleError(ValueError): ...
13.666667
32
0.682927
3
41
9.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.170732
41
2
33
20.5
0.823529
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
47148f470fe90bb994a5f6d18a1a2e7f366e4182
472
py
Python
web/settings.py
GreenBeret3155/THHTTT-recsys
6740322a798b9a2d90bd62c8d8814afe33f23b6b
[ "MIT" ]
null
null
null
web/settings.py
GreenBeret3155/THHTTT-recsys
6740322a798b9a2d90bd62c8d8814afe33f23b6b
[ "MIT" ]
null
null
null
web/settings.py
GreenBeret3155/THHTTT-recsys
6740322a798b9a2d90bd62c8d8814afe33f23b6b
[ "MIT" ]
null
null
null
MONGODB_SETTINGS = { 'db': 'rsframgia', 'collection': 'viblo_posts', 'host': 'mongodb+srv://nhomanhemcututu:chubichthuy@cluster0.vnbw3.mongodb.net/rsframgia?authSource=admin&replicaSet=atlas-mi89bw-shard-0&w=majority&readPreference=primary&appname=MongoDB%20Compass&retryWrites=true&ssl=true' } PATH_DICTIONARY = "models/id2word.dictionary" PATH_CORPUS = "models/corpus.mm" PATH_LDA_MODEL = "models/LDA.model" PATH_DOC_TOPIC_DIST = "models/doc_topic_dist.dat"
47.2
227
0.783898
60
472
5.983333
0.7
0.044568
0.066852
0
0
0
0
0
0
0
0
0.018265
0.072034
472
9
228
52.444444
0.80137
0
0
0
0
0.111111
0.701271
0.557203
0
0
0
0
0
1
0
false
0.111111
0
0
0
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
1
1
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4
472e8063db61fd1106d5efacc8182f98a6046e95
117
py
Python
EventFilter/RPCRawToDigi/python/RPCCPPFRawToDigi_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
EventFilter/RPCRawToDigi/python/RPCCPPFRawToDigi_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
EventFilter/RPCRawToDigi/python/RPCCPPFRawToDigi_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms from EventFilter.RPCRawToDigi.RPCCPPFRawToDigi_cfi import rpcCPPFRawToDigi
29.25
74
0.888889
13
117
7.923077
0.846154
0
0
0
0
0
0
0
0
0
0
0
0.076923
117
3
75
39
0.953704
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
472ebc935e277d6419a318f01110032a9143e5c4
704
py
Python
src/core/utils/core.py
ravenSanstete/hako
fe72c76e9f319add1921a63dee711f90f4960873
[ "MIT" ]
1
2016-11-17T07:15:00.000Z
2016-11-17T07:15:00.000Z
src/core/utils/core.py
ravenSanstete/hako
fe72c76e9f319add1921a63dee711f90f4960873
[ "MIT" ]
6
2016-11-17T10:27:38.000Z
2016-11-18T13:20:05.000Z
src/core/utils/core.py
ravenSanstete/hako
fe72c76e9f319add1921a63dee711f90f4960873
[ "MIT" ]
null
null
null
import functools as F # an auxiliary method for displaying error # which should never be used as a concrete method, please partial it def err(module_name,info): raise Exception("Module %s Error:%s" % module_name,info); def require_override(): raise NotImplementedError; # check a list of instance, whether they share the same types # more complicated check routines will be defined after finishing the type system module # this may not be called check types def check_types(instance_list,class_ptr): return F.reduce(lambda x,y:x and y, [isinstance(m,class_ptr) for m in instance_list],True); # entry ports for other modules from .map_buf import MapBuffer from .set_buf import SetBuffer
32
95
0.774148
113
704
4.734513
0.672566
0.037383
0.052336
0
0
0
0
0
0
0
0
0
0.161932
704
21
96
33.52381
0.90678
0.453125
0
0
0
0
0.047619
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0.111111
0.777778
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
4
5b499792a12e700d68ceaeebdff10488a6d68b78
57
py
Python
Two_stage_stochastic_optimization/optimal_power_flows/distributed_optimal_power_flow.py
sichu366/Optimization
62a6b32b4001930312cc267a4dd54aa3a7df406d
[ "MIT" ]
10
2018-12-24T02:17:37.000Z
2022-03-19T07:44:21.000Z
Two_stage_stochastic_optimization/optimal_power_flows/distributed_optimal_power_flow.py
wuyou33/youhua
0142cc59a987964ec7d5ae08ccaf5a8af3f592d1
[ "MIT" ]
null
null
null
Two_stage_stochastic_optimization/optimal_power_flows/distributed_optimal_power_flow.py
wuyou33/youhua
0142cc59a987964ec7d5ae08ccaf5a8af3f592d1
[ "MIT" ]
1
2019-09-11T04:40:39.000Z
2019-09-11T04:40:39.000Z
""" Distributed optimal power flow for DC networks. """
11.4
47
0.701754
7
57
5.714286
1
0
0
0
0
0
0
0
0
0
0
0
0.175439
57
4
48
14.25
0.851064
0.824561
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
5b6559f1d9fa81c2610931f4748935e6c7acf615
24
py
Python
resources/mgltools_x86_64Linux2_1.5.6/MGLToolsPckgs/opengltk/wrapper/__init__.py
J-E-J-S/aaRS-Pipeline
43f59f28ab06e4b16328c3bc405cdddc6e69ac44
[ "MIT" ]
8
2021-12-14T21:30:01.000Z
2022-02-14T11:30:03.000Z
resources/mgltools_x86_64Linux2_1.5.6/MGLToolsPckgs/opengltk/wrapper/__init__.py
J-E-J-S/aaRS-Pipeline
43f59f28ab06e4b16328c3bc405cdddc6e69ac44
[ "MIT" ]
null
null
null
resources/mgltools_x86_64Linux2_1.5.6/MGLToolsPckgs/opengltk/wrapper/__init__.py
J-E-J-S/aaRS-Pipeline
43f59f28ab06e4b16328c3bc405cdddc6e69ac44
[ "MIT" ]
null
null
null
# # copyright_notice #
4.8
18
0.666667
2
24
7.5
1
0
0
0
0
0
0
0
0
0
0
0
0.208333
24
4
19
6
0.789474
0.666667
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
5b9204902c2e3cafc9c513967a40b4f4f72f9286
408
py
Python
download-deveres/para-execicios-curso-em-video/exe034.py
Hugo-Oliveira-RDO11/meus-deveres
b5e41015e2cb95946262678e82197e5f47d56271
[ "MIT" ]
null
null
null
download-deveres/para-execicios-curso-em-video/exe034.py
Hugo-Oliveira-RDO11/meus-deveres
b5e41015e2cb95946262678e82197e5f47d56271
[ "MIT" ]
null
null
null
download-deveres/para-execicios-curso-em-video/exe034.py
Hugo-Oliveira-RDO11/meus-deveres
b5e41015e2cb95946262678e82197e5f47d56271
[ "MIT" ]
null
null
null
s = float(input('digite o salario do funcionario? R$')) if s <= 1250.0: c1 = (s * 15 / 100) + s print('agora o funcionario vai ter o reajuste de 15%\nentao o salario dele que era R${:.2f}, passa a ser de R${:.2f}'.format(s, c1)) else: c2 = (s * 10 / 100) + s print('agora o fucionario vai ter o reajuste de 10%\nentao o salario dele que era R${:.2f}, passa a ser de R${:.2f}'.format(s, c2))
45.333333
136
0.612745
78
408
3.205128
0.435897
0.048
0.072
0.112
0.64
0.384
0.384
0.384
0.384
0.384
0
0.084906
0.220588
408
8
137
51
0.701258
0
0
0
0
0.285714
0.617647
0
0
0
0
0
0
1
0
false
0.285714
0
0
0
0.285714
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
1
1
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4
5ba814ec4fa9e4190ba680575a7a5cb43b329a39
329
py
Python
PrizmDoc-Python-Sample/views/index.py
rdavidson1994/PrizmDoc-Python-Sample
b69cacc2917ddc3e1584de4fa161c424c44de1c3
[ "MIT" ]
null
null
null
PrizmDoc-Python-Sample/views/index.py
rdavidson1994/PrizmDoc-Python-Sample
b69cacc2917ddc3e1584de4fa161c424c44de1c3
[ "MIT" ]
null
null
null
PrizmDoc-Python-Sample/views/index.py
rdavidson1994/PrizmDoc-Python-Sample
b69cacc2917ddc3e1584de4fa161c424c44de1c3
[ "MIT" ]
null
null
null
from flask import Blueprint, redirect, render_template, url_for from config import args as config blueprint = Blueprint("index", __name__) @blueprint.route("/") def base_url(): return redirect(url_for(".index")) @blueprint.route("/index") def index(): return render_template("index/index.html", apiKey=config.apiKey)
23.5
68
0.741641
43
329
5.465116
0.465116
0.119149
0
0
0
0
0
0
0
0
0
0
0.121581
329
13
69
25.307692
0.813149
0
0
0
0
0
0.103343
0
0
0
0
0
0
1
0.222222
false
0
0.222222
0.222222
0.666667
0.444444
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
1
0
4
5bb516b5919ce4b5549047bf4b35a180b7f37178
44
py
Python
libseq/__init__.py
antonybholmes/libseq
98e69f017061ac9c290d50a3f6a70ef74e51169b
[ "MIT" ]
null
null
null
libseq/__init__.py
antonybholmes/libseq
98e69f017061ac9c290d50a3f6a70ef74e51169b
[ "MIT" ]
null
null
null
libseq/__init__.py
antonybholmes/libseq
98e69f017061ac9c290d50a3f6a70ef74e51169b
[ "MIT" ]
null
null
null
name = 'libseq' from libseq.libseq import *
14.666667
27
0.727273
6
44
5.333333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.159091
44
2
28
22
0.864865
0
0
0
0
0
0.136364
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
5bbffd0777b560b615874c7b8cd60c817b2da3ea
45
py
Python
barbershop/settings/prod.py
sauli6692/barbershop
862357bd78235e720b2e3b868d2423a57bb4e328
[ "MIT" ]
null
null
null
barbershop/settings/prod.py
sauli6692/barbershop
862357bd78235e720b2e3b868d2423a57bb4e328
[ "MIT" ]
null
null
null
barbershop/settings/prod.py
sauli6692/barbershop
862357bd78235e720b2e3b868d2423a57bb4e328
[ "MIT" ]
null
null
null
from .common import * # noqa DEBUG = False
11.25
29
0.666667
6
45
5
1
0
0
0
0
0
0
0
0
0
0
0
0.244444
45
4
30
11.25
0.882353
0.088889
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
5bc9673e43db91d3341c6ed62172ebddcee49241
163
py
Python
duffy/database.py
Zlopez/duffy
db9621a2f2127b41d3ed6e29d8e50bf0f0d68a64
[ "Apache-2.0" ]
null
null
null
duffy/database.py
Zlopez/duffy
db9621a2f2127b41d3ed6e29d8e50bf0f0d68a64
[ "Apache-2.0" ]
null
null
null
duffy/database.py
Zlopez/duffy
db9621a2f2127b41d3ed6e29d8e50bf0f0d68a64
[ "Apache-2.0" ]
null
null
null
from .extensions import db class Duffyv1Model(db.Model): __abstract__ = 'True' def save(self): db.session.add(self) db.session.commit()
16.3
29
0.638037
20
163
5
0.75
0.12
0.26
0
0
0
0
0
0
0
0
0.00813
0.245399
163
9
30
18.111111
0.804878
0
0
0
0
0
0.02454
0
0
0
0
0
0
1
0.166667
false
0
0.166667
0
0.666667
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
1
0
0
4
5bd220639c3bdb556cb67d9e82ea1417076ba3c7
114
py
Python
docker/__init__.py
Kandongwe/RunestoneServer
f555868521b3717beec0ec42dbcbcb443c64686c
[ "MIT" ]
null
null
null
docker/__init__.py
Kandongwe/RunestoneServer
f555868521b3717beec0ec42dbcbcb443c64686c
[ "MIT" ]
null
null
null
docker/__init__.py
Kandongwe/RunestoneServer
f555868521b3717beec0ec42dbcbcb443c64686c
[ "MIT" ]
null
null
null
# ********* # |docname| # ********* # This is required by Poetry so that `docker_tools.py` can be an entry point.
22.8
77
0.578947
16
114
4.0625
1
0
0
0
0
0
0
0
0
0
0
0
0.175439
114
4
78
28.5
0.691489
0.921053
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
5bd8ac00a25d4645de3340139e365cfd591be873
2,722
py
Python
tests/parts/Light/test_LED.py
izm51/obniz-python-sdk
40a738b5fe2c0a415cdc09f46d28c143982bfb07
[ "MIT" ]
11
2019-03-22T12:02:11.000Z
2021-01-21T04:57:18.000Z
tests/parts/Light/test_LED.py
izm51/obniz-python-sdk
40a738b5fe2c0a415cdc09f46d28c143982bfb07
[ "MIT" ]
5
2019-03-02T08:28:25.000Z
2021-02-02T22:06:37.000Z
tests/parts/Light/test_LED.py
izm51/obniz-python-sdk
40a738b5fe2c0a415cdc09f46d28c143982bfb07
[ "MIT" ]
3
2019-07-20T06:55:09.000Z
2019-12-04T05:05:00.000Z
import pytest from tests.utils import assert_send, assert_finished class TestLED: def test_wired(self, obniz): obniz.wired('LED', { "anode": 0, "cathode": 1 }) assert_send(obniz, [{ "io0": False }]) assert_send(obniz, [{ "io1": False }]) assert_send(obniz, [{ "display": { "pin_assign": { "0": { "module_name": "LED", "pin_name": "anode" }, "1": { "module_name": "LED", "pin_name": "cathode" } } } }]) assert_finished(obniz) def test_wired_error_with_no_keys(self, obniz): with pytest.raises(Exception): obniz.wired('LED', {}) assert_finished(obniz) def test_wired_error_with_no_arg(self, obniz): with pytest.raises(Exception): obniz.wired('LED') assert_finished(obniz) def test_wired_only_anode(self, obniz): obniz.wired('LED', { "anode": 10 }) assert_send(obniz, [{ "io10": False }]) assert_send(obniz, [{ "display": { "pin_assign": { "10": { "module_name": "LED", "pin_name": "anode" } } } }]) assert_finished(obniz) def test_on_off(self, obniz): led = obniz.wired('LED', { "anode": 0, "cathode": 1 }) assert_send(obniz, [{ "io0": False }]) assert_send(obniz, [{ "io1": False }]) assert_send(obniz, [{ "display": { "pin_assign": { "0": { "module_name": "LED", "pin_name": "anode" }, "1": { "module_name": "LED", "pin_name": "cathode" } } } }]) assert_finished(obniz) led.on() assert_send(obniz, [{ "io": { "animation": { "name": led.animation_name, "status": "pause" } } }]) assert_send(obniz, [{ "io0": True }]) assert_finished(obniz) led.off() assert_send(obniz, [{ "io": { "animation": { "name": led.animation_name, "status": "pause" } } }]) assert_send(obniz, [{ "io0": False }]) assert_finished(obniz)
28.957447
62
0.390522
217
2,722
4.658986
0.207373
0.128586
0.178042
0.098912
0.818991
0.793274
0.722057
0.686449
0.686449
0.652819
0
0.014025
0.476121
2,722
93
63
29.268817
0.694951
0
0
0.611765
0
0
0.115356
0
0
0
0
0
0.235294
1
0.058824
false
0
0.023529
0
0.094118
0
0
0
0
null
0
0
0
1
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
4
5bd920533ea801e24cc2294fd06315314a20b46f
90
py
Python
src/server/python/6playgroup/w9live.py
nicojqn/Livy
d5076a493747563d8e40600d52371df888c75d27
[ "MIT" ]
null
null
null
src/server/python/6playgroup/w9live.py
nicojqn/Livy
d5076a493747563d8e40600d52371df888c75d27
[ "MIT" ]
null
null
null
src/server/python/6playgroup/w9live.py
nicojqn/Livy
d5076a493747563d8e40600d52371df888c75d27
[ "MIT" ]
null
null
null
from live6playgroup import * if __name__=="__main__": print(get_live_url("w9").path)
30
34
0.722222
12
90
4.583333
1
0
0
0
0
0
0
0
0
0
0
0.025641
0.133333
90
3
34
30
0.679487
0
0
0
0
0
0.11236
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0.333333
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
5be4eb16c649c1f62d292d5fc9f63494acd286af
249
py
Python
tuvok/plugins/builtins.py
gdelvalle/tuvok
20bd7e92b9e9631cbb80ce60239cdd8154dda69f
[ "Apache-2.0" ]
19
2018-10-26T18:42:30.000Z
2020-05-24T10:44:55.000Z
tuvok/plugins/builtins.py
gdelvalle/tuvok
20bd7e92b9e9631cbb80ce60239cdd8154dda69f
[ "Apache-2.0" ]
11
2018-10-26T17:06:54.000Z
2020-01-04T02:46:06.000Z
tuvok/plugins/builtins.py
gdelvalle/tuvok
20bd7e92b9e9631cbb80ce60239cdd8154dda69f
[ "Apache-2.0" ]
3
2018-12-29T06:58:06.000Z
2020-04-24T19:48:19.000Z
from tuvok.plugins import BaseTuvokPlugin from tuvok.checks.builtins import FileLayoutCheck class BuiltinPlugin(BaseTuvokPlugin): """ The null plugin always passes. """ def get_checks(self): return [FileLayoutCheck()]
20.75
49
0.710843
25
249
7.04
0.76
0.102273
0
0
0
0
0
0
0
0
0
0
0.208835
249
11
50
22.636364
0.893401
0.120482
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.4
0.2
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
1
0
0
4
75024351b3bcc22f52f27c08335f5feb9829ab8c
1,018
py
Python
pirates/launcher/PiratesLauncher.py
ksmit799/POTCO-PS
520d38935ae8df4b452c733a82c94dddac01e275
[ "Apache-2.0" ]
8
2017-01-24T04:33:29.000Z
2020-11-01T08:36:24.000Z
pirates/launcher/PiratesLauncher.py
ksmit799/Pirates-Online-Remake
520d38935ae8df4b452c733a82c94dddac01e275
[ "Apache-2.0" ]
1
2017-03-02T18:05:17.000Z
2017-03-14T06:47:10.000Z
pirates/launcher/PiratesLauncher.py
ksmit799/Pirates-Online-Remake
520d38935ae8df4b452c733a82c94dddac01e275
[ "Apache-2.0" ]
11
2017-03-02T18:46:07.000Z
2020-11-01T08:36:26.000Z
from direct.directnotify import DirectNotifyGlobal import os class PiratesLauncher: notify = DirectNotifyGlobal.directNotify.newCategory('PiratesLauncher') def getGameServer(self): return self.getValue('GAMESERVER', '127.0.0.1') def setPandaErrorCode(self, code): pass def getValue(self, key, default=None): return os.environ.get(key, default) def setValue(self, key, value): os.environ[key] = str(value) def isTestServer(self): return False def setPandaWindowOpen(self): pass def isDummy(self): return False def getRegistry(self, arg): pass def getBlue(self): pass def getPlayToken(self): return 'dev' def getDISLToken(self): return 'dev' def getNeedPwForSecretKey(self): return False def getParentPasswordSet(self): return False def getPhaseComplete(self, arg): return True def setDisconnectDetailsNormal(self): pass
20.36
75
0.643418
105
1,018
6.238095
0.428571
0.10687
0.091603
0.109924
0
0
0
0
0
0
0
0.008075
0.270138
1,018
50
76
20.36
0.873486
0
0
0.323529
0
0
0.039254
0
0
0
0
0
0
1
0.441176
false
0.176471
0.058824
0.264706
0.823529
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
1
0
0
4
75188d74a92083a312d265971653f8cbf64ce3bb
545
py
Python
ulb_manager/backend/models.py
lincy-chu/Django-Vue
9284777d855076b53cc4726d34ec4fa3ec4c8dc9
[ "MIT" ]
1
2018-10-01T17:48:51.000Z
2018-10-01T17:48:51.000Z
ulb_manager/backend/models.py
lincy-chu/Django-Vue
9284777d855076b53cc4726d34ec4fa3ec4c8dc9
[ "MIT" ]
null
null
null
ulb_manager/backend/models.py
lincy-chu/Django-Vue
9284777d855076b53cc4726d34ec4fa3ec4c8dc9
[ "MIT" ]
null
null
null
from django.db import models # Create your models here. class bookInfo(models.Model): fromUser = models.CharField(max_length=30, default='WYS') fromSite = models.CharField(max_length=50) bookName = models.CharField(max_length=50) updateTime = models.DateTimeField() class siteInfo(models.Model): siteName = models.CharField(max_length=50) bookName = models.CharField(max_length=50) url = models.CharField(max_length=200) updateTime = models.DateTimeField() lastChapter = models.CharField(max_length=100)
28.684211
61
0.743119
67
545
5.940299
0.432836
0.263819
0.316583
0.422111
0.301508
0.301508
0.301508
0.301508
0.301508
0.301508
0
0.034557
0.150459
545
18
62
30.277778
0.825054
0.044037
0
0.333333
0
0
0.00578
0
0
0
0
0
0
1
0
false
0
0.083333
0
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
7534040565856f995d539de57f03be332097037d
537
py
Python
mundo_2/desafio_052.py
lvfds/Curso_Python3
1afb7706553a1d21d3d97e061144c5f019ca9391
[ "MIT" ]
null
null
null
mundo_2/desafio_052.py
lvfds/Curso_Python3
1afb7706553a1d21d3d97e061144c5f019ca9391
[ "MIT" ]
null
null
null
mundo_2/desafio_052.py
lvfds/Curso_Python3
1afb7706553a1d21d3d97e061144c5f019ca9391
[ "MIT" ]
null
null
null
# Faça um programa que leia um número inteiro diga se ele é o não um número primo. numero_digitado_pelo_usuario = int(input('Digite um número qualquer: ')) if numero_digitado_pelo_usuario != 1 and numero_digitado_pelo_usuario % 2 != 0 and numero_digitado_pelo_usuario % 3 != 0 and numero_digitado_pelo_usuario % 5 != 0 and numero_digitado_pelo_usuario % 7 != 0 or numero_digitado_pelo_usuario == 2: print(f'O número {numero_digitado_pelo_usuario} é primo!') else: print(f'O número {numero_digitado_pelo_usuario} não é primo!')
67.125
243
0.774674
89
537
4.370787
0.382022
0.323907
0.416452
0.578406
0.560411
0.419023
0.195373
0.195373
0
0
0
0.021834
0.147114
537
8
244
67.125
0.827511
0.148976
0
0
0
0
0.278509
0.131579
0
0
0
0
0
1
0
false
0
0
0
0
0.4
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
754d9224b5ed795806a254e02f4374f55efd1edb
112
py
Python
simpleimage/__init__.py
emmmile/simpleimage
6b079592ce64d67903bf9c085a132ddd9712fba8
[ "MIT" ]
null
null
null
simpleimage/__init__.py
emmmile/simpleimage
6b079592ce64d67903bf9c085a132ddd9712fba8
[ "MIT" ]
null
null
null
simpleimage/__init__.py
emmmile/simpleimage
6b079592ce64d67903bf9c085a132ddd9712fba8
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- from .simpleimage import SimpleImage from .filename import FileName
18.666667
36
0.723214
14
112
5.785714
0.714286
0
0
0
0
0
0
0
0
0
0
0.020619
0.133929
112
5
37
22.4
0.814433
0.348214
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
f3285980968ebb35b5b006df50a94bb162fc792d
175
py
Python
tests/conftest.py
pyapp-org/pyapp-messaging-aws
87c98ec2fc5a0f51cb148a2f72aebebf727b2c41
[ "BSD-3-Clause" ]
1
2022-03-26T19:21:12.000Z
2022-03-26T19:21:12.000Z
tests/conftest.py
pyapp-org/pyapp-messaging-aws
87c98ec2fc5a0f51cb148a2f72aebebf727b2c41
[ "BSD-3-Clause" ]
null
null
null
tests/conftest.py
pyapp-org/pyapp-messaging-aws
87c98ec2fc5a0f51cb148a2f72aebebf727b2c41
[ "BSD-3-Clause" ]
null
null
null
from pyapp.conf import settings # Ensure settings are configured settings.configure( ["pyapp_ext.messaging.default_settings", "pyapp_ext.aiobotocore.default_settings"] )
25
86
0.805714
21
175
6.52381
0.619048
0.116788
0
0
0
0
0
0
0
0
0
0
0.102857
175
6
87
29.166667
0.872611
0.171429
0
0
0
0
0.517483
0.517483
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
1
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
f331bb7028c9e5da0ddf8ae53c65471d84a287f4
233
py
Python
05-Inheritance/exer-04-need_for_speed/project/family_car.py
Beshkov/OOP
297edadb3e7801dfeee5752a20aae6aead8da610
[ "MIT" ]
1
2021-05-24T17:51:53.000Z
2021-05-24T17:51:53.000Z
05-Inheritance/exer-04-need_for_speed/project/family_car.py
Beshkov/Python_OOP
297edadb3e7801dfeee5752a20aae6aead8da610
[ "MIT" ]
null
null
null
05-Inheritance/exer-04-need_for_speed/project/family_car.py
Beshkov/Python_OOP
297edadb3e7801dfeee5752a20aae6aead8da610
[ "MIT" ]
null
null
null
from project.car import Car class FamilyCar(Car): pass family_car = FamilyCar(150, 150) family_car.drive(50) print(family_car.fuel) family_car.drive(50) print(family_car.fuel) print(family_car.__class__.__bases__[0].__name__)
17.923077
49
0.785408
37
233
4.459459
0.432432
0.327273
0.254545
0.193939
0.412121
0.412121
0.412121
0.412121
0
0
0
0.052381
0.098712
233
12
50
19.416667
0.733333
0
0
0.444444
0
0
0
0
0
0
0
0
0
1
0
false
0.111111
0.111111
0
0.222222
0.333333
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
1
0
0
0
0
0
4
f337f9245707095d495d8e7aa10bb766cb1d0933
269
py
Python
autoflow/workflow/components/preprocessing/transform/quantile.py
auto-flow/autoflow
f5903424ad8694d57741a0bd6dfeaba320ea6517
[ "BSD-3-Clause" ]
49
2020-04-16T11:17:28.000Z
2020-05-06T01:32:44.000Z
autoflow/workflow/components/preprocessing/transform/quantile.py
auto-flow/autoflow
f5903424ad8694d57741a0bd6dfeaba320ea6517
[ "BSD-3-Clause" ]
null
null
null
autoflow/workflow/components/preprocessing/transform/quantile.py
auto-flow/autoflow
f5903424ad8694d57741a0bd6dfeaba320ea6517
[ "BSD-3-Clause" ]
3
2020-04-17T00:53:24.000Z
2020-04-23T03:04:26.000Z
from autoflow.workflow.components.feature_engineer_base import AutoFlowFeatureEngineerAlgorithm __all__ = ["QuantileTransformer"] class QuantileTransformer(AutoFlowFeatureEngineerAlgorithm): class__ = "QuantileTransformer" module__ = "sklearn.preprocessing"
29.888889
95
0.836431
19
269
11.315789
0.789474
0.223256
0
0
0
0
0
0
0
0
0
0
0.096654
269
8
96
33.625
0.884774
0
0
0
0
0
0.219331
0.078067
0
0
0
0
0
1
0
false
0
0.2
0
0.8
0
1
0
1
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
4
f34219ba05da2447376b3d0978c56de648766103
131
py
Python
caas_app/apps.py
legonigel/CAAS
55b81c5f7936f7f8fe45ca3716fe18d382024529
[ "MIT" ]
null
null
null
caas_app/apps.py
legonigel/CAAS
55b81c5f7936f7f8fe45ca3716fe18d382024529
[ "MIT" ]
null
null
null
caas_app/apps.py
legonigel/CAAS
55b81c5f7936f7f8fe45ca3716fe18d382024529
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.apps import AppConfig class CaasAppConfig(AppConfig): name = 'caas_app'
16.375
39
0.793893
16
131
6.125
0.8125
0
0
0
0
0
0
0
0
0
0
0
0.152672
131
7
40
18.714286
0.882883
0
0
0
0
0
0.061069
0
0
0
0
0
0
1
0
false
0
0.5
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
f3565187adf289063048aee693f2d74c9536c722
39
py
Python
tests/vim/__init__.py
specfault/GreenerPython
976260c3e78969cfd3e1e40639325f104325c703
[ "MIT" ]
null
null
null
tests/vim/__init__.py
specfault/GreenerPython
976260c3e78969cfd3e1e40639325f104325c703
[ "MIT" ]
null
null
null
tests/vim/__init__.py
specfault/GreenerPython
976260c3e78969cfd3e1e40639325f104325c703
[ "MIT" ]
null
null
null
from .vim import save __all__ = [save]
13
21
0.717949
6
39
4
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.179487
39
2
22
19.5
0.75
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
f3a4220dcfd4f3abce94218d94a876fb823fde29
113
py
Python
api_helper/config.py
StepanBarantsev/course_management
627d003d8ed63a5cc64485a191c4b98e91796a45
[ "Apache-2.0" ]
null
null
null
api_helper/config.py
StepanBarantsev/course_management
627d003d8ed63a5cc64485a191c4b98e91796a45
[ "Apache-2.0" ]
null
null
null
api_helper/config.py
StepanBarantsev/course_management
627d003d8ed63a5cc64485a191c4b98e91796a45
[ "Apache-2.0" ]
null
null
null
import os class ConfigApi: lms_key = os.environ.get('LMS_KEY') fauna_key = os.environ.get('FAUNA_KEY')
16.142857
43
0.690265
18
113
4.111111
0.5
0.162162
0.324324
0.405405
0
0
0
0
0
0
0
0
0.176991
113
6
44
18.833333
0.795699
0
0
0
0
0
0.141593
0
0
0
0
0
0
1
0
false
0
0.25
0
1
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
f3b42c1e823e8eab2dbf1377d1eed6032475cdb9
212
py
Python
src/analyses/forms.py
raonyguimaraes/OncoX
f2fe6e9a786fd81f7933c8a54beef948e8527604
[ "MIT" ]
null
null
null
src/analyses/forms.py
raonyguimaraes/OncoX
f2fe6e9a786fd81f7933c8a54beef948e8527604
[ "MIT" ]
null
null
null
src/analyses/forms.py
raonyguimaraes/OncoX
f2fe6e9a786fd81f7933c8a54beef948e8527604
[ "MIT" ]
null
null
null
from django.forms import ModelForm from analyses.models import Analysis # Create the form class. class AnalysisForm(ModelForm): class Meta: model = Analysis fields = ['name', 'type', 'files']
26.5
42
0.693396
25
212
5.88
0.76
0
0
0
0
0
0
0
0
0
0
0
0.212264
212
8
42
26.5
0.88024
0.103774
0
0
0
0
0.068783
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
340feee5e3b0d12977d435252da837f5dbccff73
87
py
Python
return/apps.py
faithngotho/Awwards
c1be97cb231cc5fc54022d81a664668f5d4abe18
[ "MIT" ]
null
null
null
return/apps.py
faithngotho/Awwards
c1be97cb231cc5fc54022d81a664668f5d4abe18
[ "MIT" ]
null
null
null
return/apps.py
faithngotho/Awwards
c1be97cb231cc5fc54022d81a664668f5d4abe18
[ "MIT" ]
null
null
null
from django.apps import AppConfig class ReturnConfig(AppConfig): name = 'return'
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
1
0
0
4
3440f5dec73018666fe35b5b4765f857c888cf06
175
py
Python
nsense/main/produce_flat_dataset.py
reubenjohn/nsense
c2ade83ee467cc88a3fe24f543508fa9df664c3b
[ "MIT" ]
null
null
null
nsense/main/produce_flat_dataset.py
reubenjohn/nsense
c2ade83ee467cc88a3fe24f543508fa9df664c3b
[ "MIT" ]
null
null
null
nsense/main/produce_flat_dataset.py
reubenjohn/nsense
c2ade83ee467cc88a3fe24f543508fa9df664c3b
[ "MIT" ]
null
null
null
import sys from nsense.dataset import flatten_data_source if __name__ == "__main__": data_dir = sys.argv[1] flat_dir = sys.argv[2] flatten_data_source(data_dir, flat_dir)
21.875
46
0.777143
29
175
4.137931
0.551724
0.183333
0.283333
0
0
0
0
0
0
0
0
0.013072
0.125714
175
8
47
21.875
0.771242
0
0
0
0
0
0.045455
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
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
1
0
0
0
0
4
34508ca6e31bc01e70f057556b802c3db4a70a66
66
py
Python
drf_cached_token/__init__.py
ueni-ltd/drf-cached-token
67173ff3666f627975b4656033768babb3694664
[ "MIT" ]
1
2018-05-08T22:13:50.000Z
2018-05-08T22:13:50.000Z
drf_cached_token/__init__.py
ueni-ltd/drf-cached-token
67173ff3666f627975b4656033768babb3694664
[ "MIT" ]
null
null
null
drf_cached_token/__init__.py
ueni-ltd/drf-cached-token
67173ff3666f627975b4656033768babb3694664
[ "MIT" ]
null
null
null
default_app_config = 'drf_cached_token.apps.DrfCachedTokenConfig'
33
65
0.878788
8
66
6.75
1
0
0
0
0
0
0
0
0
0
0
0
0.045455
66
1
66
66
0.857143
0
0
0
0
0
0.636364
0.636364
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
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
34658c606722d9ed7e70e432c79a90e4a3a32bee
91
py
Python
myproject/bookblog/apps.py
borko81/simple_django
b4faafe939e30998b1bd96aee1d0c83b242efc00
[ "MIT" ]
1
2021-08-04T19:44:20.000Z
2021-08-04T19:44:20.000Z
myproject/bookblog/apps.py
borko81/simple_django
b4faafe939e30998b1bd96aee1d0c83b242efc00
[ "MIT" ]
null
null
null
myproject/bookblog/apps.py
borko81/simple_django
b4faafe939e30998b1bd96aee1d0c83b242efc00
[ "MIT" ]
null
null
null
from django.apps import AppConfig class BookblogConfig(AppConfig): name = 'bookblog'
15.166667
33
0.758242
10
91
6.9
0.9
0
0
0
0
0
0
0
0
0
0
0
0.164835
91
5
34
18.2
0.907895
0
0
0
0
0
0.087912
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
1
0
0
4
347100e1cfd696b90f322531e12871b82c4b0531
195
py
Python
mapping.py
yurinnick/tow-example-project
92fbdc4e6ba9beb9ae19246ad05394418a3d0c22
[ "Apache-2.0" ]
null
null
null
mapping.py
yurinnick/tow-example-project
92fbdc4e6ba9beb9ae19246ad05394418a3d0c22
[ "Apache-2.0" ]
null
null
null
mapping.py
yurinnick/tow-example-project
92fbdc4e6ba9beb9ae19246ad05394418a3d0c22
[ "Apache-2.0" ]
null
null
null
mapping = { "files": [ ("site-example.conf", "/etc/nginx/sites-available/site-example.conf") ], "templates": [ ("index.html.tmpl", "/var/www/html/index.html") ] }
21.666667
77
0.538462
21
195
5
0.714286
0.209524
0.285714
0
0
0
0
0
0
0
0
0
0.235897
195
8
78
24.375
0.704698
0
0
0
0
0
0.584615
0.348718
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
34725c4f7acaf3af365736504247e95b6f50406f
27
py
Python
runtimes/xgboost/mlserver_xgboost/version.py
dtpryce/MLServer
02744b3c770141b0b1d9dad2a0256d243051de61
[ "Apache-2.0" ]
null
null
null
runtimes/xgboost/mlserver_xgboost/version.py
dtpryce/MLServer
02744b3c770141b0b1d9dad2a0256d243051de61
[ "Apache-2.0" ]
null
null
null
runtimes/xgboost/mlserver_xgboost/version.py
dtpryce/MLServer
02744b3c770141b0b1d9dad2a0256d243051de61
[ "Apache-2.0" ]
null
null
null
__version__ = "1.1.0.dev6"
13.5
26
0.666667
5
27
2.8
0.8
0
0
0
0
0
0
0
0
0
0
0.166667
0.111111
27
1
27
27
0.416667
0
0
0
0
0
0.37037
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
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
cad194002f1f83b76c03a3789a836231ec24ac2d
140
py
Python
World/Object/Unit/Spell/Constants/Categories/Racial.py
sundayz/idewave-core
5bdb88892173c9c3e8c85f431cf9b5dbd9f23941
[ "Apache-2.0" ]
10
2019-06-29T19:24:52.000Z
2021-02-21T22:45:57.000Z
World/Object/Unit/Spell/Constants/Categories/Racial.py
sundayz/idewave-core
5bdb88892173c9c3e8c85f431cf9b5dbd9f23941
[ "Apache-2.0" ]
4
2019-08-15T07:03:36.000Z
2021-06-02T13:01:25.000Z
World/Object/Unit/Spell/Constants/Categories/Racial.py
sundayz/idewave-core
5bdb88892173c9c3e8c85f431cf9b5dbd9f23941
[ "Apache-2.0" ]
8
2019-06-30T22:47:48.000Z
2021-02-20T19:21:30.000Z
from enum import Enum class Racial(Enum): # Night Elf SHADOWMELD = 20580 SHADOWMELD_PASSIVE = 21009
17.5
39
0.564286
14
140
5.571429
0.785714
0
0
0
0
0
0
0
0
0
0
0.117647
0.392857
140
8
40
17.5
0.8
0.064286
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0.25
0.25
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
1
0
0
1
0
0
4
cad80a314cd41f480b2f340a55999e981f9c4028
679
bzl
Python
source/bazel/deps/pthreadpool/get.bzl
luxe/CodeLang-compiler
78837d90bdd09c4b5aabbf0586a5d8f8f0c1e76a
[ "MIT" ]
1
2019-01-06T08:45:46.000Z
2019-01-06T08:45:46.000Z
source/bazel/deps/pthreadpool/get.bzl
luxe/CodeLang-compiler
78837d90bdd09c4b5aabbf0586a5d8f8f0c1e76a
[ "MIT" ]
264
2015-11-30T08:34:00.000Z
2018-06-26T02:28:41.000Z
source/bazel/deps/pthreadpool/get.bzl
UniLang/compiler
c338ee92994600af801033a37dfb2f1a0c9ca897
[ "MIT" ]
null
null
null
# Do not edit this file directly. # It was auto-generated by: code/programs/reflexivity/reflexive_refresh load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file") def pthreadpool(): http_archive( name = "pthreadpool", build_file = "//bazel/deps/pthreadpool:build.BUILD", sha256 = "7a523b439a996e2f4376169279409059101f2f71eed4fcc915971368990504a0", strip_prefix = "pthreadpool-6673a4c71fe35e077c6843a74017d9c25610c537", urls = [ "https://github.com/Unilang/pthreadpool/archive/6673a4c71fe35e077c6843a74017d9c25610c537.tar.gz", ], )
39.941176
109
0.721649
67
679
7.164179
0.61194
0.0375
0.058333
0.079167
0.179167
0.179167
0.179167
0.179167
0.179167
0.179167
0
0.197898
0.159057
679
16
110
42.4375
0.642732
0.148748
0
0
1
0
0.636522
0.417391
0
0
0
0
0
1
0.083333
true
0
0
0
0.083333
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
1
1
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
1b1cbd4cca3c66440e7ecfb96420a6387156f7ee
164
py
Python
src/data/data.py
epomatti/cbpq-api
733f00ac1e7eb022dc5b6d699b83ec69c1761bfc
[ "MIT" ]
null
null
null
src/data/data.py
epomatti/cbpq-api
733f00ac1e7eb022dc5b6d699b83ec69c1761bfc
[ "MIT" ]
null
null
null
src/data/data.py
epomatti/cbpq-api
733f00ac1e7eb022dc5b6d699b83ec69c1761bfc
[ "MIT" ]
null
null
null
import mysql.connector cnx = mysql.connector.connect(user='root', password='password', host='127.0.0.1', database='cbpq') cnx.close()
32.8
64
0.597561
20
164
4.9
0.75
0.285714
0
0
0
0
0
0
0
0
0
0.048
0.237805
164
5
65
32.8
0.736
0
0
0
0
0
0.151515
0
0
0
0
0
0
1
0
false
0.25
0.25
0
0.25
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
1
0
0
0
0
0
4
1b1dda4978c4a5e16213ce55cd1ae85758330504
220
py
Python
apgl/io/GraphReader.py
mathemaphysics/APGL
6ca7c176e04017feeae00c4cee069fd126df0fbc
[ "BSD-3-Clause" ]
13
2015-02-19T14:39:09.000Z
2021-04-12T01:22:32.000Z
apgl/io/GraphReader.py
mathemaphysics/APGL
6ca7c176e04017feeae00c4cee069fd126df0fbc
[ "BSD-3-Clause" ]
1
2020-07-29T07:09:33.000Z
2020-07-29T07:09:33.000Z
apgl/io/GraphReader.py
mathemaphysics/APGL
6ca7c176e04017feeae00c4cee069fd126df0fbc
[ "BSD-3-Clause" ]
7
2015-03-16T07:26:49.000Z
2021-01-12T06:57:27.000Z
''' Created on 29 Oct 2009 @author: charanpal An abstract class which reads graphs from files. ''' class GraphReader(object): def __init__(self): pass def readFromFile(self, fileName): pass
12.941176
48
0.659091
27
220
5.222222
0.851852
0
0
0
0
0
0
0
0
0
0
0.036585
0.254545
220
16
49
13.75
0.823171
0.418182
0
0.4
0
0
0
0
0
0
0
0
0
1
0.4
false
0.4
0
0
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
4
1b1e397bc701a92ac9715b123a7f45e045aa0e2a
96
py
Python
techcrm/services/webv2/manage.py
techakademi/DockerEgitimProjeler
9ab6b5005fe53a2da6b5c0df2537d3d6d9238d80
[ "MIT" ]
null
null
null
techcrm/services/webv2/manage.py
techakademi/DockerEgitimProjeler
9ab6b5005fe53a2da6b5c0df2537d3d6d9238d80
[ "MIT" ]
null
null
null
techcrm/services/webv2/manage.py
techakademi/DockerEgitimProjeler
9ab6b5005fe53a2da6b5c0df2537d3d6d9238d80
[ "MIT" ]
null
null
null
from project import app if __name__ == "__main__": app.run(debug = True, host = "0.0.0.0")
19.2
43
0.635417
16
96
3.3125
0.75
0.113208
0.113208
0
0
0
0
0
0
0
0
0.051948
0.197917
96
5
43
19.2
0.636364
0
0
0
0
0
0.154639
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
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
4
1b51b4b603a970975b45dc178d37241790904798
529
py
Python
reports/tests/factories.py
cmc333333/mapusaurus
1d7ccef90d0ed832d52f797cbe68057057cd0177
[ "CC0-1.0" ]
null
null
null
reports/tests/factories.py
cmc333333/mapusaurus
1d7ccef90d0ed832d52f797cbe68057057cd0177
[ "CC0-1.0" ]
55
2018-02-09T04:11:31.000Z
2018-07-04T18:30:29.000Z
reports/tests/factories.py
cmc333333/mapusaurus
1d7ccef90d0ed832d52f797cbe68057057cd0177
[ "CC0-1.0" ]
null
null
null
import factory from reports.serializers import ReportInput class ReportInputFactory(factory.Factory): class Meta: model = ReportInput county_ids = factory.LazyFunction(set) email = factory.Faker("email") lender_ids = factory.LazyFunction(set) lien_status = factory.LazyFunction(set) loan_purpose = factory.LazyFunction(set) metro_ids = factory.LazyFunction(set) owner_occupancy = factory.LazyFunction(set) property_type = factory.LazyFunction(set) year = factory.Faker("year")
27.842105
47
0.73724
58
529
6.603448
0.465517
0.347258
0.402089
0.195822
0
0
0
0
0
0
0
0
0.173913
529
18
48
29.388889
0.87643
0
0
0
0
0
0.017013
0
0
0
0
0
0
1
0
false
0
0.142857
0
0.928571
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
1
0
0
4
1b60b2a02a54a2caad48b99db37d7a1aff28f3c1
34
py
Python
python/testData/inspections/PyUnreachableCodeInspection/ExprOrSysExitAssignedToVar.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/inspections/PyUnreachableCodeInspection/ExprOrSysExitAssignedToVar.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/inspections/PyUnreachableCodeInspection/ExprOrSysExitAssignedToVar.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
import sys FOO = abc or sys.exit()
17
23
0.705882
7
34
3.428571
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.176471
34
2
23
17
0.857143
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
1b8f2fa07f11a2d7d4582f4227963eeb2e7da59b
66
py
Python
infracheck/checks/__init__.py
riotkit-org/infracheck
e328e9ad722e6e2906aca378270099017198f602
[ "Apache-2.0" ]
10
2019-08-16T23:08:43.000Z
2021-05-05T06:26:04.000Z
infracheck/checks/__init__.py
riotkit-org/infracheck
e328e9ad722e6e2906aca378270099017198f602
[ "Apache-2.0" ]
39
2019-04-13T10:00:21.000Z
2021-11-24T15:02:05.000Z
infracheck/checks/__init__.py
zwiazeksyndykalistowpolski/infracheck
e328e9ad722e6e2906aca378270099017198f602
[ "Apache-2.0" ]
1
2019-05-09T15:31:49.000Z
2019-05-09T15:31:49.000Z
""" This file makes the directory a package for unit tests """
22
58
0.681818
10
66
4.5
1
0
0
0
0
0
0
0
0
0
0
0
0.227273
66
3
59
22
0.882353
0.818182
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
59f329447185347f2d74ba34a626a925df4f4bd0
262
py
Python
pocsuite/lib/utils/sebug.py
J-XianSheng/Pocsuite
f529e7c193f0b291bf4cdf578829863d04a4e611
[ "OLDAP-2.6", "Python-2.0", "OLDAP-2.7" ]
null
null
null
pocsuite/lib/utils/sebug.py
J-XianSheng/Pocsuite
f529e7c193f0b291bf4cdf578829863d04a4e611
[ "OLDAP-2.6", "Python-2.0", "OLDAP-2.7" ]
null
null
null
pocsuite/lib/utils/sebug.py
J-XianSheng/Pocsuite
f529e7c193f0b291bf4cdf578829863d04a4e611
[ "OLDAP-2.6", "Python-2.0", "OLDAP-2.7" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright (c) 2014-2015 pocsuite developers (http://seebug.org) See the file 'docs/COPYING' for copying permission """ from pocsuite.thirdparty.knowledge.webservice import Clinet class seebugBase(): pass
18.714286
63
0.71374
34
262
5.5
0.941176
0
0
0
0
0
0
0
0
0
0
0.04
0.141221
262
13
64
20.153846
0.791111
0.599237
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.333333
0.333333
0
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
0
1
1
1
0
1
0
0
4
59f543e861aacc256685f0eace2c9895f177ba63
535
py
Python
logpy/log/__init__.py
SebastiaanBij/log.py
8d6c3ddcb9a2907bdaeed4869cb5b8e5d6e96252
[ "MIT" ]
null
null
null
logpy/log/__init__.py
SebastiaanBij/log.py
8d6c3ddcb9a2907bdaeed4869cb5b8e5d6e96252
[ "MIT" ]
2
2022-01-19T14:50:53.000Z
2022-01-19T14:50:57.000Z
logpy/log/__init__.py
SebastiaanBij/log.py
8d6c3ddcb9a2907bdaeed4869cb5b8e5d6e96252
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # ||Documentation|| ######################################################################################################################## """ The log module containing: - Format - Level - Levels These are used to edit your logs appearance and importance. You can use them in the logpy.logger.Logger object. """ # ||Imports|| ######################################################################################################################## from .level import Level, Levels from .format import Format
29.722222
120
0.398131
42
535
5.071429
0.785714
0.103286
0
0
0
0
0
0
0
0
0
0.002062
0.093458
535
17
121
31.470588
0.437113
0.405607
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
59f5c46a76bff24a310befb2632e8e5364e87b9f
180
py
Python
TESTING NEW SENTIMENT.py
zacandcheese/Predicting-Elections
94e53825d746335f50de43a4efd32dbb1460439f
[ "MIT" ]
1
2019-01-06T21:01:59.000Z
2019-01-06T21:01:59.000Z
TESTING NEW SENTIMENT.py
zacandcheese/Predicting-Elections
94e53825d746335f50de43a4efd32dbb1460439f
[ "MIT" ]
null
null
null
TESTING NEW SENTIMENT.py
zacandcheese/Predicting-Elections
94e53825d746335f50de43a4efd32dbb1460439f
[ "MIT" ]
1
2019-02-20T02:28:43.000Z
2019-02-20T02:28:43.000Z
#TESTING NEW SENTIMENT from textblob import TextBlob message = "GET HIM OUT. Trump sucks" analysis = TextBlob(message) print(analysis.sentiment.polarity) print(analysis.sentiment)
25.714286
36
0.811111
23
180
6.347826
0.652174
0.205479
0.30137
0
0
0
0
0
0
0
0
0
0.105556
180
7
37
25.714286
0.906832
0.116667
0
0
0
0
0.150943
0
0
0
0
0
0
1
0
false
0
0.2
0
0.2
0.4
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
59fc65dc47843166c7a3c4a8984712fc5c8ddcaf
1,571
py
Python
evaluator.py
ddimmery/softblock
25f1ed61a0ab4c377e0b57546b57287bb90667bf
[ "MIT" ]
1
2022-02-07T04:35:56.000Z
2022-02-07T04:35:56.000Z
evaluator.py
ddimmery/softblock
25f1ed61a0ab4c377e0b57546b57287bb90667bf
[ "MIT" ]
null
null
null
evaluator.py
ddimmery/softblock
25f1ed61a0ab4c377e0b57546b57287bb90667bf
[ "MIT" ]
2
2021-11-19T19:26:36.000Z
2022-02-07T04:36:01.000Z
#! /usr/bin/python3 from abc import ABCMeta, abstractmethod from numbers import Number from typing import Union, List import numpy as np from scipy.stats import norm from dgp import DGP NORMAL_QUANTILE = norm.ppf(0.975) class Evaluator(metaclass=ABCMeta): def __init__(self) -> None: pass @abstractmethod def evaluate(self, X, Y0, Y1, ATE, ITE, A, YA, ATEhat, ITEhat) -> Number: pass class ATEError(Evaluator): def evaluate(self, X, Y0, Y1, ATE, ITE, A, YA, ATEhat, ITEhat) -> Number: return ATE - ATEhat.estimate class ITEBias(Evaluator): def evaluate(self, X, Y0, Y1, ATE, ITE, A, YA, ATEhat, ITEhat) -> Number: return np.average(ITE - ITEhat.estimate) class ITEMSE(Evaluator): def evaluate(self, X, Y0, Y1, ATE, ITE, A, YA, ATEhat, ITEhat) -> Number: return np.average(np.power(ITE - ITEhat.estimate, 2)) class CovariateMSE(Evaluator): def evaluate(self, X, Y0, Y1, ATE, ITE, A, YA, ATEhat, ITEhat) -> Number: X1 = np.average(X[A==1, :], 0) X0 = np.average(X[A==0, :], 0) return np.mean(np.power(X1 - X0, 2)).item() class ATECovers(Evaluator): def evaluate(self, X, Y0, Y1, ATE, ITE, A, YA, ATEhat, ITEhat) -> Number: lwr = ATEhat.estimate - NORMAL_QUANTILE * ATEhat.std_error upr = ATEhat.estimate + NORMAL_QUANTILE * ATEhat.std_error return (ATE >= lwr) & (ATE <= upr) class CISize(Evaluator): def evaluate(self, X, Y0, Y1, ATE, ITE, A, YA, ATEhat, ITEhat) -> Number: return 2 * NORMAL_QUANTILE * ATEhat.std_error
27.561404
77
0.642903
226
1,571
4.420354
0.278761
0.077077
0.105105
0.112112
0.537538
0.50951
0.50951
0.425425
0.425425
0.425425
0
0.02459
0.223425
1,571
56
78
28.053571
0.794262
0.011458
0
0.257143
0
0
0
0
0
0
0
0
0
1
0.228571
false
0.057143
0.171429
0.114286
0.771429
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
1
0
0
4
940cffb215cef470d27793bc04c4b2e3949db124
118
py
Python
flocker/docs/test/__init__.py
wallnerryan/flocker-profiles
bcd3ced8edf4af86a68070ff6a714c45f9f4913b
[ "Apache-2.0" ]
null
null
null
flocker/docs/test/__init__.py
wallnerryan/flocker-profiles
bcd3ced8edf4af86a68070ff6a714c45f9f4913b
[ "Apache-2.0" ]
null
null
null
flocker/docs/test/__init__.py
wallnerryan/flocker-profiles
bcd3ced8edf4af86a68070ff6a714c45f9f4913b
[ "Apache-2.0" ]
null
null
null
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Tests for components for Flocker documentation. """
19.666667
60
0.745763
15
118
5.866667
0.866667
0
0
0
0
0
0
0
0
0
0
0
0.169492
118
5
61
23.6
0.897959
0.90678
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
941946019e9da672a52e98d9564319a633079753
3,178
py
Python
app/models.py
phaksheet/guessthesong
f5d70dea5271286b2e8faea5dd6cb04a06635eee
[ "MIT" ]
2
2018-12-15T21:17:10.000Z
2018-12-15T21:17:17.000Z
app/models.py
phaksheet/guessthesong
f5d70dea5271286b2e8faea5dd6cb04a06635eee
[ "MIT" ]
4
2018-12-18T15:38:18.000Z
2018-12-18T16:44:34.000Z
app/models.py
DubThink/Guessong
9200dddd27658f2627d26b1b1fd9de6c56b8931a
[ "MIT" ]
null
null
null
from app import db, login from flask_login import UserMixin from werkzeug.security import generate_password_hash, check_password_hash from time import time # class PlaylistScore(db.Model): # __tablename__='playlistscore' # # id = db.Column(db.Integer, primary_key=True) # user_id = db.Column(db.Integer, db.ForeignKey('user.id'), primary_key=True) # playlist_id = db.Column(db.Integer, db.ForeignKey('playlist.id'), primary_key=True) # timestamp = db.Column(db.Integer) # score = db.Column(db.Integer) # # user = db.relationship("User",back_populates="scores") # playlist=db.relationship("Playlist",back_populates="scores") # playlist_song = db.Table('playlistsong', db.Model.metadata, db.Column('song_id', db.Integer, db.ForeignKey('song.id')), db.Column('playlist_id', db.Integer, db.ForeignKey('playlist.id')) ) class User(UserMixin,db.Model): __tablename__='user' id = db.Column(db.Integer, primary_key=True) username = db.Column(db.String(32), index=True, unique=True) email = db.Column(db.String(120), index=True) password_hash = db.Column(db.String(128)) # scores = db.relationship("PlaylistScore",back_populates="user") def set_password(self, password): self.password_hash = generate_password_hash(password) def check_password(self, password): return check_password_hash(self.password_hash, password) def __repr__(self): return '<User {} {} {}>'.format(self.id,self.username,self.email) @login.user_loader def load_user(id): return User.query.get(int(id)) class Playlist(db.Model): __tablename__='playlist' id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(256), index=True) thumbnail = db.Column(db.String(256)) spotifyid = db.Column(db.String(1024)) songs = db.relationship("Song", secondary=playlist_song) def toJSON(self): return { 'id':self.id, 'name':self.name, 'thumbnail':self.thumbnail, 'song_count':len(self.songs), } def __repr__(self): return '<Playlist id:{} name:{}>'.format(self.id,self.name) class Song(db.Model): __tablename__='song' id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(256)) artist = db.Column(db.String(256)) album = db.Column(db.String(256)) thumbnail_url = db.Column(db.String(256)) preview_url = db.Column(db.String(256)) external_url = db.Column(db.String(256)) itunes_resource_id = db.Column(db.Integer, index=True) def toJSON(self): return { "name": self.name, "artist": self.artist, "album": self.album, "thumbnail_url": self.thumbnail_url, "preview_url": self.preview_url, "external_url": self.external_url, "itunes_resource_id": self.itunes_resource_id, } def __repr__(self): return "Song<'%s' by '%s' on album '%s' with itunes id %i and internal id %i>" %\ (self.name,self.artist,self.album,self.itunes_resource_id,self.id)
35.311111
91
0.644745
412
3,178
4.786408
0.194175
0.093306
0.106491
0.097363
0.239351
0.188134
0.121704
0.090264
0.056795
0.056795
0
0.014394
0.213027
3,178
89
92
35.707865
0.77409
0.170548
0
0.15873
1
0.015873
0.102975
0
0
0
0
0
0
1
0.126984
false
0.095238
0.063492
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
1
0
0
0
null
0
0
0
0
0
0
0
1
0
1
1
0
0
4
9437bbcbf7b2f4fea6ad8781f5069a60771c5163
226
py
Python
problem/01000~09999/02712/2712.py3.py
njw1204/BOJ-AC
1de41685725ae4657a7ff94e413febd97a888567
[ "MIT" ]
1
2019-04-19T16:37:44.000Z
2019-04-19T16:37:44.000Z
problem/01000~09999/02712/2712.py3.py
njw1204/BOJ-AC
1de41685725ae4657a7ff94e413febd97a888567
[ "MIT" ]
1
2019-04-20T11:42:44.000Z
2019-04-20T11:42:44.000Z
problem/01000~09999/02712/2712.py3.py
njw1204/BOJ-AC
1de41685725ae4657a7ff94e413febd97a888567
[ "MIT" ]
3
2019-04-19T16:37:47.000Z
2021-10-25T00:45:00.000Z
for _ in range(int(input())): v,e=input().split() v=float(v) if e=="kg":print("%.4f"%(v*2.2046),"lb") if e=="lb":print("%.4f"%(v*0.4536),"kg") if e=="l":print("%.4f"%(v*0.2642),"g") if e=="g":print("%.4f"%(v*3.7854),"l")
32.285714
41
0.504425
48
226
2.354167
0.479167
0.106195
0.283186
0.159292
0
0
0
0
0
0
0
0.115942
0.084071
226
7
42
32.285714
0.429952
0
0
0
0
0
0.123348
0
0
0
0
0
0
1
0
false
0
0
0
0
0.571429
0
0
0
null
0
1
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
1
0
4
9485d4e0e3f73656554c2a183b839bc66ee86e3a
568
py
Python
QuickPotato/statistical/verification.py
afparsons/QuickPotato
6d0b967c506bb9db5adf7d3d4983bfcfd726b030
[ "MIT" ]
130
2020-11-19T00:19:53.000Z
2022-01-18T21:16:40.000Z
QuickPotato/statistical/verification.py
afparsons/QuickPotato
6d0b967c506bb9db5adf7d3d4983bfcfd726b030
[ "MIT" ]
16
2020-11-22T14:27:11.000Z
2022-01-19T17:38:57.000Z
QuickPotato/statistical/verification.py
afparsons/QuickPotato
6d0b967c506bb9db5adf7d3d4983bfcfd726b030
[ "MIT" ]
11
2020-12-02T08:36:46.000Z
2021-12-27T06:52:23.000Z
from QuickPotato.utilities.decorators import save_boundary_evidence @save_boundary_evidence def check_max_boundary_of_measurement(value, boundary): """ :return: """ if boundary is None: return None elif float(value) < float(boundary): return True else: return False @save_boundary_evidence def check_min_boundary_of_measurement(value, boundary): """ :return: """ if boundary is None: return None elif float(value) > float(boundary): return True else: return False
17.75
67
0.65493
64
568
5.59375
0.375
0.156425
0.167598
0.128492
0.815642
0.659218
0.659218
0.659218
0.659218
0.659218
0
0
0.267606
568
31
68
18.322581
0.860577
0.02993
0
0.705882
0
0
0
0
0
0
0
0
0
1
0.117647
false
0
0.058824
0
0.529412
0
0
0
0
null
0
0
0
1
0
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
1
0
0
4
8483418c8e0d6cb2b371c53a9f72fa799e487667
1,539
py
Python
stake_last_all_api/chain_interface/chain_getBlock.py
DerWalundDieKatze/Yumekui
cb3174103ced7474ce6d1abd774b399557dcaf4f
[ "Apache-2.0" ]
null
null
null
stake_last_all_api/chain_interface/chain_getBlock.py
DerWalundDieKatze/Yumekui
cb3174103ced7474ce6d1abd774b399557dcaf4f
[ "Apache-2.0" ]
null
null
null
stake_last_all_api/chain_interface/chain_getBlock.py
DerWalundDieKatze/Yumekui
cb3174103ced7474ce6d1abd774b399557dcaf4f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 ''' @author: caroline @license: (C) Copyright 2019-2022, Node Supply Chain Manager Corporation Limited. @contact: caroline.fang.cc@gmail.com @software: pycharm @file: chain_getBlock.py @time: 2020/1/8 5:22 下午 @desc: ''' ''' 1. chain_getblock 作用:用于获取区块信息 参数: height usage: 当前区块高度 返回值:区块明细信息 示例代码 请求: curl http://localhost:15645 -X POST --data '{"jsonrpc":"2.0","method":"chain_getBlock","params":[1], "id": 3}' -H "Content-Type:application/json" 响应: { "jsonrpc": "2.0", "id": 3, "result": { "Hash": "0xcfa283a5b591da5a15971bf62fffae87e649bcf749776f4c83ffe50e65920f8e", "ChainId": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "Version": 1, "PreviousHash": "0x1717b4b9f740cebeb2659886122a29c0876ed906dd05370319fee4ecf219b1e9", "GasLimit": 180000000, "GasUsed": 0, "Height": 1, "Timestamp": 1559272779, "StateRoot": "0xd7bd5b3af4f2f1fb3d484743052c2e911f9fb7b04131660912244347508f16a9", "TxRoot": "0x", "LeaderAddress": "0x0374bf9c8ea268b5548686685dda4a74fc95903ca7c440e5b187a718b595c1f374", "MinorAddresses": [ "0x0374bf9c8ea268b5548686685dda4a74fc95903ca7c440e5b187a718b595c1f374", "0x02f11cfd138eaaaba5f8c0a7f1f2791bdabd0b0c404734dceac820aa9b683bfb1a", "0x03949aad279a32536ce20f0957c9c6ba592532ea70e5f174332bed4c94382354e3", "0x0263bc5628fa7033727d14b5d6714ac7d6a5d34bc5db994a896f54499f12db9b0b" ], "Txs": [ ] } } '''
29.596154
146
0.753736
110
1,539
10.518182
0.827273
0.033708
0.015557
0
0
0
0
0
0
0
0
0.389177
0.123457
1,539
52
147
29.596154
0.468495
0.161144
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
848457db65dbf90060b6fd44899871470881d29f
93
py
Python
app/settings.py
clioo/checker
e9bed73b423c5ac3e9ce0d3b850525df97bcd186
[ "MIT" ]
null
null
null
app/settings.py
clioo/checker
e9bed73b423c5ac3e9ce0d3b850525df97bcd186
[ "MIT" ]
null
null
null
app/settings.py
clioo/checker
e9bed73b423c5ac3e9ce0d3b850525df97bcd186
[ "MIT" ]
null
null
null
USERS = {} DEBUG = False try: from local_settings import * except ImportError: pass
11.625
32
0.677419
11
93
5.636364
1
0
0
0
0
0
0
0
0
0
0
0
0.247312
93
8
33
11.625
0.885714
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0.166667
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
1
1
0
0
0
0
4
84b52f825eba009b4171df4d75d475b3fabb2310
411
py
Python
tesserarius/extensions/__init__.py
rehive/tesserarius
5c1ddddd856c0d8765d9ea05c7317962cb23ed8c
[ "MIT" ]
1
2020-03-03T13:33:44.000Z
2020-03-03T13:33:44.000Z
tesserarius/extensions/__init__.py
rehive/tesserarius
5c1ddddd856c0d8765d9ea05c7317962cb23ed8c
[ "MIT" ]
2
2020-03-03T18:29:29.000Z
2020-07-17T12:59:45.000Z
tesserarius/extensions/__init__.py
rehive/tesserarius
5c1ddddd856c0d8765d9ea05c7317962cb23ed8c
[ "MIT" ]
null
null
null
from invoke import Collection from tesserarius.extensions.serviceaccount import collection as sa_collection from tesserarius.extensions.roles import collection as roles_collection from tesserarius.extensions.tasks import bind collection = Collection("extensions") collection.add_task(bind, "bind") collection.add_collection(sa_collection, "serviceaccount") collection.add_collection(roles_collection, "roles")
41.1
77
0.856448
48
411
7.1875
0.291667
0.13913
0.217391
0.304348
0
0
0
0
0
0
0
0
0.072993
411
9
78
45.666667
0.905512
0
0
0
0
0
0.080292
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
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
1
0
0
0
0
4
84c52e9b63c47756c53e886c69f2eb6e50df996f
177
py
Python
dash/conf.example.py
dongweiming/django-linux-dash
bc7100766a727f437d4e0bb68d5e179d662e3839
[ "MIT" ]
44
2015-01-05T04:37:11.000Z
2019-08-28T16:05:14.000Z
dash/conf.example.py
dongweiming/django-linux-dash
bc7100766a727f437d4e0bb68d5e179d662e3839
[ "MIT" ]
1
2015-02-07T17:52:59.000Z
2015-02-08T00:15:02.000Z
dash/conf.example.py
dongweiming/django-linux-dash
bc7100766a727f437d4e0bb68d5e179d662e3839
[ "MIT" ]
27
2015-01-28T16:20:17.000Z
2021-10-03T05:33:44.000Z
# Define the path to the DNSMasq Lease file dnsmasq_lease_file = '/var/lib/misc/dnsmasq.leases' # Read list of hosts to ping from csv file ping_hosts ping_hosts = 'ping_hosts'
29.5
53
0.774011
31
177
4.258065
0.580645
0.204545
0.242424
0.272727
0
0
0
0
0
0
0
0
0.152542
177
5
54
35.4
0.88
0.525424
0
0
0
0
0.469136
0.345679
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
84ef3acdffd9136f792645513abca616abe487a1
968
py
Python
setup.py
psagers/salvage
a1b4b7e596d9895b2dbf65f5552fc5dd91ed88ac
[ "BSD-2-Clause" ]
null
null
null
setup.py
psagers/salvage
a1b4b7e596d9895b2dbf65f5552fc5dd91ed88ac
[ "BSD-2-Clause" ]
null
null
null
setup.py
psagers/salvage
a1b4b7e596d9895b2dbf65f5552fc5dd91ed88ac
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python from setuptools import setup setup( name='salvage', version='0.1.3', description='Allows a group of people to hold sensitive information using a simple secret-splitting scheme.', long_description=open('README.rst').read(), author='Peter Sagerson', author_email='psagersDjwublJf@ignorare.net', packages=[], scripts=['bin/salvage'], url='https://bitbucket.org/psagers/salvage', license='BSD', install_requires=[], classifiers=[ 'Development Status :: 4 - Beta', 'License :: OSI Approved :: BSD License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Topic :: Security', ], )
31.225806
113
0.61157
104
968
5.663462
0.634615
0.225806
0.297114
0.220713
0.091681
0
0
0
0
0
0
0.021622
0.235537
968
30
114
32.266667
0.774324
0.020661
0
0
0
0
0.579725
0.029567
0
0
0
0
0
1
0
true
0
0.038462
0
0.038462
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
1
0
0
0
0
0
0
4
ca0b8bfdc9daff2c44a308929bb0153d913beecd
327
py
Python
src/python/WMCore/WMBS/Oracle/Workflow/GetInjectedWorkflows.py
khurtado/WMCore
f74e252412e49189a92962945a94f93bec81cd1e
[ "Apache-2.0" ]
21
2015-11-19T16:18:45.000Z
2021-12-02T18:20:39.000Z
src/python/WMCore/WMBS/Oracle/Workflow/GetInjectedWorkflows.py
khurtado/WMCore
f74e252412e49189a92962945a94f93bec81cd1e
[ "Apache-2.0" ]
5,671
2015-01-06T14:38:52.000Z
2022-03-31T22:11:14.000Z
src/python/WMCore/WMBS/Oracle/Workflow/GetInjectedWorkflows.py
khurtado/WMCore
f74e252412e49189a92962945a94f93bec81cd1e
[ "Apache-2.0" ]
67
2015-01-21T15:55:38.000Z
2022-02-03T19:53:13.000Z
#!/usr/bin/env python """ _GetInjectedWorkflows_ Oracle implementation of Workflow.GetInjectedWorkflows """ __all__ = [] from WMCore.WMBS.MySQL.Workflow.GetInjectedWorkflows import GetInjectedWorkflows as MySQLGetInjectedWorkflows class GetInjectedWorkflows(MySQLGetInjectedWorkflows): """ Oracle Template """
19.235294
109
0.788991
26
327
9.692308
0.730769
0.222222
0
0
0
0
0
0
0
0
0
0
0.125382
327
16
110
20.4375
0.881119
0.351682
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
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
4
ca2333fe103f109dc4fa5d722b1749568170777a
172
py
Python
python/tvm/cpp/__init__.py
landcold7/tvm-learn
b4348123dc4bea6f8bb1119deffe55ab374d6081
[ "Apache-2.0" ]
4
2019-03-29T06:04:45.000Z
2019-11-23T14:30:47.000Z
python/tvm/cpp/__init__.py
tianxingyzxq/tvm-learn
b4348123dc4bea6f8bb1119deffe55ab374d6081
[ "Apache-2.0" ]
null
null
null
python/tvm/cpp/__init__.py
tianxingyzxq/tvm-learn
b4348123dc4bea6f8bb1119deffe55ab374d6081
[ "Apache-2.0" ]
3
2019-03-25T11:46:00.000Z
2019-11-23T14:30:52.000Z
"""C++ backend related python scripts""" from __future__ import absolute_import as _abs from .function import * from ._ctypes._api import register_node from . import expr
24.571429
46
0.784884
24
172
5.25
0.708333
0
0
0
0
0
0
0
0
0
0
0
0.139535
172
6
47
28.666667
0.851351
0.197674
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
ca4f8f538fec70954cca31860702e556a0e82b05
129
py
Python
datasets/__init__.py
Zzlongjuanfeng/pytorch-deep-coral
6829a3cb82968ab4e80d80906a59ea453ec2d147
[ "MIT" ]
null
null
null
datasets/__init__.py
Zzlongjuanfeng/pytorch-deep-coral
6829a3cb82968ab4e80d80906a59ea453ec2d147
[ "MIT" ]
null
null
null
datasets/__init__.py
Zzlongjuanfeng/pytorch-deep-coral
6829a3cb82968ab4e80d80906a59ea453ec2d147
[ "MIT" ]
null
null
null
from .mnist import get_mnist from .usps import get_usps from .visda import get_visda __all__ = (get_usps, get_mnist, get_visda)
21.5
42
0.79845
22
129
4.227273
0.318182
0.290323
0
0
0
0
0
0
0
0
0
0
0.139535
129
5
43
25.8
0.837838
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.75
0
0.75
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
ca7ab84b0adb7da293b61b31c1742daf47c6d6a4
135
py
Python
src/wsgi.py
whs2k/ImageComparison
32d6f72680306cf376ff59975fa0349ae2d75b26
[ "MIT" ]
null
null
null
src/wsgi.py
whs2k/ImageComparison
32d6f72680306cf376ff59975fa0349ae2d75b26
[ "MIT" ]
null
null
null
src/wsgi.py
whs2k/ImageComparison
32d6f72680306cf376ff59975fa0349ae2d75b26
[ "MIT" ]
null
null
null
from main import app if __name__ == "__main__": # app = imp.load_source('app', '0.2.1-whs-invoSho_yolo.py') app.run(debug=True)
27
62
0.666667
23
135
3.478261
0.826087
0
0
0
0
0
0
0
0
0
0
0.026316
0.155556
135
4
63
33.75
0.675439
0.422222
0
0
0
0
0.109589
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
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
4
ca83bec4b271cc44fa0cd7aac7b3a219098d7e7b
635
py
Python
tasks/daily.py
ukwa/ukwa-tasks
bd8ef8a038a7ab45089d2ecfd97c61d599bc531a
[ "Apache-2.0" ]
1
2018-09-26T12:37:33.000Z
2018-09-26T12:37:33.000Z
tasks/daily.py
ukwa/ukwa-tasks
bd8ef8a038a7ab45089d2ecfd97c61d599bc531a
[ "Apache-2.0" ]
1
2021-06-01T21:50:27.000Z
2021-06-01T21:50:27.000Z
tasks/daily.py
ukwa/ukwa-tasks
bd8ef8a038a7ab45089d2ecfd97c61d599bc531a
[ "Apache-2.0" ]
1
2021-04-11T09:47:39.000Z
2021-04-11T09:47:39.000Z
#!/usr/bin/env python # encoding: utf-8 """ This module summarises the tasks that are to be run daily. """ import luigi from tasks.hdfs.listings import GenerateHDFSSummaries from tasks.backup.postgresql import BackupProductionW3ACTPostgres class DailyIngestTasks(luigi.WrapperTask): """ Daily ingest tasks, should generally be a few hours ahead of the access-side tasks (below): """ def requires(self): return [BackupProductionW3ACTPostgres(), GenerateHDFSSummaries()] if __name__ == '__main__': # Running from Python, but using the Luigi scheduler: luigi.run(['DailyIngestTasks'])
26.458333
95
0.719685
72
635
6.236111
0.722222
0.040089
0
0
0
0
0
0
0
0
0
0.005814
0.187402
635
23
96
27.608696
0.864341
0.376378
0
0
1
0
0.06469
0
0
0
0
0
0
1
0.111111
false
0
0.333333
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
1
0
0
0
null
0
0
0
0
0
0
0
0
1
1
1
0
0
4
ca8600c1b3f2fdba3483c79e8d58b4a02aecd85b
86
py
Python
unity_build_pipeline/Support/config.py
MadCoder39/UnityBuildPipelineiOS
71d6424bea31c3df458fba29b670ced2ac6fe7f2
[ "MIT" ]
2
2021-03-29T17:23:51.000Z
2021-03-31T12:20:39.000Z
unity_build_pipeline/Support/config.py
MadCoder39/UnityBuildPipelineiOS
71d6424bea31c3df458fba29b670ced2ac6fe7f2
[ "MIT" ]
null
null
null
unity_build_pipeline/Support/config.py
MadCoder39/UnityBuildPipelineiOS
71d6424bea31c3df458fba29b670ced2ac6fe7f2
[ "MIT" ]
2
2021-03-05T10:35:46.000Z
2021-03-29T17:24:43.000Z
import os pipeline_source_path = os.path.dirname(os.path.abspath(__file__ + '/../'))
21.5
74
0.72093
12
86
4.666667
0.666667
0.214286
0
0
0
0
0
0
0
0
0
0
0.093023
86
3
75
28.666667
0.717949
0
0
0
0
0
0.046512
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
0468ac10dcd28c27567ebaf4b2425bfe0612f089
49
py
Python
blockdiagram/__init__.py
cmspeed/blockdiagram
a4c968fe36135b3539db8cc11baf02e7237b905a
[ "Apache-2.0" ]
34
2019-06-16T18:42:47.000Z
2022-02-28T12:38:22.000Z
blockdiagram/__init__.py
cmspeed/blockdiagram
a4c968fe36135b3539db8cc11baf02e7237b905a
[ "Apache-2.0" ]
null
null
null
blockdiagram/__init__.py
cmspeed/blockdiagram
a4c968fe36135b3539db8cc11baf02e7237b905a
[ "Apache-2.0" ]
2
2019-06-24T19:19:50.000Z
2022-02-28T12:38:23.000Z
name = "blockdiagram" from .blockdiagram import *
24.5
27
0.77551
5
49
7.6
0.8
0
0
0
0
0
0
0
0
0
0
0
0.122449
49
2
27
24.5
0.883721
0
0
0
0
0
0.24
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
04695ba4e6f605d6969eff75a20fcfba2e8e1182
218
py
Python
modules/__init__.py
amuritna/phenny
c01f409f41db125fe3f50093ed1ec3454f95a529
[ "EFL-2.0" ]
7
2018-10-29T18:01:47.000Z
2022-01-21T04:13:46.000Z
modules/__init__.py
amuritna/phenny
c01f409f41db125fe3f50093ed1ec3454f95a529
[ "EFL-2.0" ]
225
2018-03-08T10:41:50.000Z
2021-11-01T19:51:17.000Z
modules/__init__.py
amuritna/phenny
c01f409f41db125fe3f50093ed1ec3454f95a529
[ "EFL-2.0" ]
44
2018-03-19T15:30:15.000Z
2020-07-29T08:47:45.000Z
from __init__ import all_modules __all__ = all_modules(__file__) def caseless_equal(str_a, str_b): return str_a.casefold() == str_b.casefold() def caseless_list(str_list): return list(map(str.casefold, str_list))
21.8
44
0.779817
35
218
4.228571
0.457143
0.135135
0
0
0
0
0
0
0
0
0
0
0.110092
218
9
45
24.222222
0.762887
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.166667
0.333333
0.833333
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
046a1ed50b52d5205fac79ff8d6c82acb32dc96d
184
py
Python
prepro.py
martimfj/VBA-Compiler
c5a88843a0d13d561f4baba312bbaf7f8a2e5ca0
[ "MIT" ]
null
null
null
prepro.py
martimfj/VBA-Compiler
c5a88843a0d13d561f4baba312bbaf7f8a2e5ca0
[ "MIT" ]
9
2019-02-23T13:19:30.000Z
2019-06-08T14:34:23.000Z
prepro.py
martimfj/VBA-Compiler
c5a88843a0d13d561f4baba312bbaf7f8a2e5ca0
[ "MIT" ]
null
null
null
import re class PrePro: @staticmethod def filtra(code): filter_comments = re.sub("'.*\n", "\n", code) return re.sub("^(\s*(\r\n|\n|\r))", '', filter_comments)
26.285714
65
0.548913
25
184
3.96
0.6
0.282828
0
0
0
0
0
0
0
0
0
0
0.222826
184
7
65
26.285714
0.692308
0
0
0
0
0
0.135135
0
0
0
0
0
0
1
0.166667
false
0
0.166667
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
0473865199e18bdd0251246cfdcb9960cf460e48
86
py
Python
tankopedia/__main__.py
zifter/telegram_wotblitz_bot
a6fa54ebe8b49bd7c82b16a87ca6cbd156b8df33
[ "MIT" ]
null
null
null
tankopedia/__main__.py
zifter/telegram_wotblitz_bot
a6fa54ebe8b49bd7c82b16a87ca6cbd156b8df33
[ "MIT" ]
null
null
null
tankopedia/__main__.py
zifter/telegram_wotblitz_bot
a6fa54ebe8b49bd7c82b16a87ca6cbd156b8df33
[ "MIT" ]
null
null
null
from telegrambot import telegrambot if __name__ == '__main__': telegrambot.run()
17.2
35
0.744186
9
86
6.222222
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.162791
86
4
36
21.5
0.777778
0
0
0
0
0
0.093023
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
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
4
04819d78f1708d71bda7402ee99244028ac4e4b9
115
py
Python
Python/1 pengenalan python/2 komentar dan operasi matematika/1 komentar satu baris.py
ekovegeance-com/tree
7a429d0f35c5a71769820177f60d22e7231b4e40
[ "Apache-2.0" ]
3
2020-12-21T13:01:35.000Z
2020-12-27T08:25:57.000Z
Python/1 pengenalan python/2 komentar dan operasi matematika/1 komentar satu baris.py
ekovegeance-com/tree
7a429d0f35c5a71769820177f60d22e7231b4e40
[ "Apache-2.0" ]
2
2020-12-05T23:26:16.000Z
2020-12-27T10:21:47.000Z
Python/1 pengenalan python/2 komentar dan operasi matematika/1 komentar satu baris.py
faizH3/faiz
c6a38717b91db8f76a0c4c4fd3168eb3ce8123ef
[ "Apache-2.0" ]
3
2021-07-27T19:05:40.000Z
2021-11-08T09:03:23.000Z
#seratus sembilan puluh dua juta tiga puluh sembilan ribu rupiah jumlah_semuanya = 192039000 print(jumlah_semuanya)
38.333333
64
0.852174
16
115
6
0.75
0.291667
0
0
0
0
0
0
0
0
0
0.088235
0.113043
115
3
65
38.333333
0.852941
0.547826
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
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
1
0
4
0489db4617a19500f40bd55977d79839e91ee1c9
79
py
Python
Source/Qt5/modules/gui.py
TheEnvironmentGuy/noodle-pipe
175ee86618ff202c3291f1bfa3952a14b9d6ac75
[ "MIT" ]
null
null
null
Source/Qt5/modules/gui.py
TheEnvironmentGuy/noodle-pipe
175ee86618ff202c3291f1bfa3952a14b9d6ac75
[ "MIT" ]
12
2015-01-31T02:37:45.000Z
2015-02-05T04:18:21.000Z
Source/Qt5/modules/gui.py
TheEnvironmentGuy/noodle-pipe
175ee86618ff202c3291f1bfa3952a14b9d6ac75
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- print("Note : Starting GUI...")
9.875
31
0.531646
10
79
4.2
1
0
0
0
0
0
0
0
0
0
0
0.015625
0.189873
79
7
32
11.285714
0.640625
0.481013
0
0
0
0
0.564103
0
0
0
0
0
0
1
0
true
0
0
0
0
1
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
1
0
4
048bce354d0ac7a2a59727c66901a5a73574a843
123
py
Python
8/8-2.py
liuhanyu200/pygame
38a68e779e6b0a63edb1758fca98ebbf40bb0444
[ "BSD-3-Clause" ]
null
null
null
8/8-2.py
liuhanyu200/pygame
38a68e779e6b0a63edb1758fca98ebbf40bb0444
[ "BSD-3-Clause" ]
null
null
null
8/8-2.py
liuhanyu200/pygame
38a68e779e6b0a63edb1758fca98ebbf40bb0444
[ "BSD-3-Clause" ]
null
null
null
# coding:utf-8 def favorite_book(book): print("My favorite book is " + book + ".") favorite_book("《python 从入门到实践》")
15.375
46
0.650407
17
123
4.588235
0.647059
0.461538
0
0
0
0
0
0
0
0
0
0.009901
0.178862
123
7
47
17.571429
0.762376
0.097561
0
0
0
0
0.330275
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.333333
0.333333
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
049e2809d0938ba10dec85f90a07dd7c4b081676
595
py
Python
dms/utils/exception.py
zhmsg/dms
3ac2b71c4a83ac721987c6f5a2f81bc0618ceca2
[ "MIT" ]
null
null
null
dms/utils/exception.py
zhmsg/dms
3ac2b71c4a83ac721987c6f5a2f81bc0618ceca2
[ "MIT" ]
12
2015-09-18T01:19:28.000Z
2021-12-13T19:51:10.000Z
dms/utils/exception.py
zhmsg/dms
3ac2b71c4a83ac721987c6f5a2f81bc0618ceca2
[ "MIT" ]
1
2017-06-30T08:11:10.000Z
2017-06-30T08:11:10.000Z
#! /usr/bin/env python # coding: utf-8 class ClientError(Exception): def __init__(self): pass class BadRequest(ClientError): def __init__(self, key, detail=None): self.key = key self.detail = detail class ConflictRequest(ClientError): def __init__(self, detail=None): self.detail = detail class ResourceNotFound(ClientError): def __init__(self, resource_name, resource_value): self.resource_name = resource_name self.resource_value = resource_value class Forbidden(ClientError): def __init__(self): pass
17
54
0.67395
67
595
5.597015
0.358209
0.093333
0.146667
0.234667
0
0
0
0
0
0
0
0.002193
0.233613
595
34
55
17.5
0.820175
0.058824
0
0.352941
0
0
0
0
0
0
0
0
0
1
0.294118
false
0.117647
0
0
0.588235
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
4
04bb02d7302c409cd5ad1248b417d45c23ec1834
44
py
Python
ladim/__init__.py
pnsaevik/ladim
967728b291631dd5a83cb0ee041770a0a9b08313
[ "MIT" ]
null
null
null
ladim/__init__.py
pnsaevik/ladim
967728b291631dd5a83cb0ee041770a0a9b08313
[ "MIT" ]
null
null
null
ladim/__init__.py
pnsaevik/ladim
967728b291631dd5a83cb0ee041770a0a9b08313
[ "MIT" ]
null
null
null
from .main import main __version__ = "1.2"
11
22
0.704545
7
44
3.857143
0.857143
0
0
0
0
0
0
0
0
0
0
0.055556
0.181818
44
3
23
14.666667
0.694444
0
0
0
0
0
0.068182
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
04f20b5b5bbdae8808f2039f792699a5ffa26392
299
py
Python
chemprop/data/__init__.py
wengong-jin/chemprop
3ad3577367d8a53f28aade0be41b56b1f25b6125
[ "MIT" ]
77
2018-06-15T16:07:39.000Z
2022-03-06T01:01:59.000Z
chemprop/data/__init__.py
yangkevin2/chemprop
f3c8b6d25e5a17989881787be42c148816d8b8ed
[ "MIT" ]
16
2018-11-07T03:19:34.000Z
2020-04-27T18:20:15.000Z
chemprop/data/__init__.py
wengong-jin/chemprop
3ad3577367d8a53f28aade0be41b56b1f25b6125
[ "MIT" ]
22
2018-11-01T14:44:33.000Z
2022-03-06T01:00:45.000Z
from .data import MoleculeDatapoint, MoleculeDataset from .scaffold import cluster_split from .scaler import StandardScaler from .similarity import morgan_similarity, scaffold_similarity from .unsupervised_cluster import generate_unsupervised_cluster_labels from .vocab import get_vocab, load_vocab
42.714286
70
0.879599
36
299
7.055556
0.5
0.149606
0
0
0
0
0
0
0
0
0
0
0.090301
299
6
71
49.833333
0.933824
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
04fe3a85d9a5653eecfc9962196504eb32be5c0a
130
py
Python
boom.py
raphaelreme/bomberman
a6c03e31378dc31d0e5b207dbf2c1c14cf582f1d
[ "MIT" ]
null
null
null
boom.py
raphaelreme/bomberman
a6c03e31378dc31d0e5b207dbf2c1c14cf582f1d
[ "MIT" ]
null
null
null
boom.py
raphaelreme/bomberman
a6c03e31378dc31d0e5b207dbf2c1c14cf582f1d
[ "MIT" ]
null
null
null
"""Entry point for pyinstaller""" from bomberman import main if __name__ == "__main__": main.DEBUG = False main.main()
14.444444
33
0.669231
16
130
4.9375
0.75
0.202532
0
0
0
0
0
0
0
0
0
0
0.207692
130
8
34
16.25
0.76699
0.207692
0
0
0
0
0.082474
0
0
0
0
0
0
1
0
true
0
0.25
0
0.25
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
b6d47f0203daa8bfd88b07af79c553e98a29af40
109
py
Python
tests/ci/paths.py
amastrucci/message_ix
154c58150755f1445ed48de028656daefccde995
[ "Apache-2.0", "CC-BY-4.0" ]
null
null
null
tests/ci/paths.py
amastrucci/message_ix
154c58150755f1445ed48de028656daefccde995
[ "Apache-2.0", "CC-BY-4.0" ]
1
2019-06-13T20:51:20.000Z
2019-06-13T20:51:20.000Z
tests/ci/paths.py
amastrucci/message_ix
154c58150755f1445ed48de028656daefccde995
[ "Apache-2.0", "CC-BY-4.0" ]
null
null
null
import os here = os.path.dirname(os.path.realpath(__file__)) dbpath = os.path.join(here, 'db', 'scenarios')
21.8
50
0.715596
17
109
4.352941
0.647059
0.243243
0
0
0
0
0
0
0
0
0
0
0.100917
109
4
51
27.25
0.755102
0
0
0
0
0
0.100917
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
b6d779a219f3b4f6157a11d40bc754af462dd902
9,546
py
Python
ilm.py
z0zz0/MSc_thesis
935d0b9aa6781970fad96a58a191134d38702b10
[ "MIT" ]
null
null
null
ilm.py
z0zz0/MSc_thesis
935d0b9aa6781970fad96a58a191134d38702b10
[ "MIT" ]
null
null
null
ilm.py
z0zz0/MSc_thesis
935d0b9aa6781970fad96a58a191134d38702b10
[ "MIT" ]
null
null
null
import torch from torch import nn import torch.nn.functional as F """ Instance-level Meta Normalization Instance Normalization """ import torch from torch import nn import torch.nn.functional as F class ilm_IN(nn.Module): def __init__(self, channels, key_group_size=5, reduction=5, eps=1e-5): super(ilm_IN, self).__init__() assert channels % key_group_size == 0 assert reduction > 0 self.num_groups = channels self.feat_per_group = 1 self.key_groups = channels // key_group_size self.key_feat_per_group = key_group_size if self.key_groups > reduction: self.embed_size = self.key_groups // reduction else: self.embed_size = 2 self.fc_embed = nn.Sequential( nn.Linear(self.key_groups, self.embed_size, bias=False), nn.ReLU(inplace=True) ) self.fc_weight = nn.Sequential( self.fc_embed, nn.Linear(self.embed_size, self.key_groups, bias=False), nn.Sigmoid() ) self.fc_bias = nn.Sequential( self.fc_embed, nn.Linear(self.embed_size, self.key_groups, bias=False), nn.Tanh() ) self.weight_bias = nn.Parameter(torch.ones(1, channels, 1, 1, 1)) self.bias_bias = nn.Parameter(torch.zeros(1, channels, 1, 1, 1)) self.eps = eps def forward(self, x): b, c, d, h, w = x.size() g = self.key_groups x = x.view(b, g, 1, -1) key_mean = x.mean(-1, keepdim=True) key_var = x.var(-1, keepdim=True) weight = self.fc_weight(key_var.view(b, g)).view(b, g, 1).repeat(1, 1, self.key_feat_per_group).view(b, c, 1, 1, 1) weight = weight + self.weight_bias bias = self.fc_bias(key_mean.view(b, g)).view(b, g, 1).repeat(1, 1, self.key_feat_per_group).view(b, c, 1, 1, 1) bias = bias + self.bias_bias g = self.num_groups x = x.view(b, g, 1, -1) mean = x.mean(-1, keepdim=True) var = x.var(-1, keepdim=True) x = (x - mean) / (var + self.eps).sqrt() x = x.view(b, c, d, h, w) return x * weight + bias """ Instance-level Meta Normalization Group Normalization """ class ilm_GN(nn.Module): def __init__(self, channels, num_groups=5, key_group_size=5, reduction=5, eps=1e-5): super(ilm_GN, self).__init__() assert num_groups % reduction == 0 assert channels % num_groups == 0 assert channels % key_group_size == 0 self.num_groups = num_groups self.feat_per_group = channels // num_groups self.key_groups = channels // key_group_size self.key_feat_per_group = key_group_size if self.key_groups >= reduction: self.embed_size = self.key_groups // reduction else: self.embed_size = 2 self.fc_embed = nn.Sequential( nn.Linear(self.key_groups, self.embed_size, bias=False), nn.ReLU(inplace=True) ) self.fc_weight = nn.Sequential( self.fc_embed, nn.Linear(self.embed_size, self.key_groups, bias=False), nn.Sigmoid() ) self.fc_bias = nn.Sequential( self.fc_embed, nn.Linear(self.embed_size, self.key_groups, bias=False), nn.Tanh() ) self.weight_bias = nn.Parameter(torch.ones(1, channels, 1, 1, 1)) self.bias_bias = nn.Parameter(torch.zeros(1, channels, 1, 1, 1)) self.eps = eps def forward(self, x): b, c, d, h, w = x.size() g = self.key_groups x = x.view(b, g, 1, -1) key_mean = x.mean(-1, keepdim=True) key_var = x.var(-1, keepdim=True) weight = self.fc_weight(key_var.view(b, g)).view(b, g, 1).repeat(1, 1, self.key_feat_per_group).view(b, c, 1, 1, 1) weight = weight + self.weight_bias bias = self.fc_bias(key_mean.view(b, g)).view(b, g, 1).repeat(1, 1, self.key_feat_per_group).view(b, c, 1, 1, 1) bias = bias + self.bias_bias g = self.num_groups x = x.view(b, g, 1, -1) mean = x.mean(-1, keepdim=True) var = x.var(-1, keepdim=True) x = (x - mean) / (var + self.eps).sqrt() x = x.view(b, c, d, h, w) return x * weight + bias """ Instance-level Meta Normalization Layer Normalization """ class ilm_LN(nn.Module): def __init__(self, channels, key_group_size=5, reduction=5, eps=1e-5): super(ilm_LN, self).__init__() assert channels % key_group_size == 0 assert reduction > 0 self.eps = eps self.num_groups = 1 self.feat_per_group = channels self.key_groups = channels // key_group_size self.key_feat_per_group = key_group_size if self.key_groups > reduction: self.embed_size = self.key_groups // reduction else: self.embed_size = 2 self.fc_embed = nn.Sequential( nn.Linear(self.key_groups, self.embed_size, bias=False), nn.ReLU(inplace=True) ) self.fc_weight = nn.Sequential( self.fc_embed, nn.Linear(self.embed_size, self.key_groups, bias=False), nn.Sigmoid() ) self.fc_bias = nn.Sequential( self.fc_embed, nn.Linear(self.embed_size, self.key_groups, bias=False), nn.Tanh() ) self.weight_bias = nn.Parameter(torch.ones(1, channels, 1, 1, 1)) self.bias_bias = nn.Parameter(torch.zeros(1, channels, 1, 1, 1)) def forward(self, x): b, c, d, h, w = x.size() g = self.key_groups x = x.view(b, g, 1, -1) key_mean = x.mean(-1, keepdim=True) key_var = x.var(-1, keepdim=True) weight = self.fc_weight(key_var.view(b, g)).view(b, g, 1).repeat(1, 1, self.key_feat_per_group).view(b, c, 1, 1, 1) weight = weight + self.weight_bias bias = self.fc_bias(key_mean.view(b, g)).view(b, g, 1).repeat(1, 1, self.key_feat_per_group).view(b, c, 1, 1, 1) bias = bias + self.bias_bias g = self.num_groups x = x.view(b, g, 1, -1) mean = x.mean(-1, keepdim=True) var = x.var(-1, keepdim=True) x = (x - mean) / (var + self.eps).sqrt() x = x.view(b, c, d, h, w) return x * weight + bias """ Using the idea of acquiring attributions during the forward pass with an Auto-Encoder for normalization such as is done with Instance-level meta normalization but batch-wise rather than instance-wise. Forward Statistics Capture Batch Normalization """ ## forward_statistics_catcher_BN (short fsc) class fsc_BN3d(nn.Module): def __init__(self, channels, embed_size, eps=1e-5): super(fsc_BN3d, self).__init__() assert channels > 0 assert embed_size < channels self.eps = eps self.channels = channels self.embed_size = embed_size self.fc_embed = nn.Sequential( nn.Linear(self.channels, self.embed_size, bias=False), nn.ReLU(inplace=True) ) self.fc_weight = nn.Sequential( self.fc_embed, nn.Linear(self.embed_size, self.channels, bias=False), nn.Sigmoid() ) self.fc_bias = nn.Sequential( self.fc_embed, nn.Linear(self.embed_size, self.channels, bias=False), nn.Tanh() ) ## register_buffer send e.g. "running_mean" to the GPU device along with the module but doesn't add to the graph self.register_buffer("running_mean", torch.zeros(channels)) self.register_buffer("running_var", torch.zeros(channels)) ## nn.Parameter adds variables to the graph self.weight_bias = nn.Parameter(torch.ones(1, channels, 1, 1, 1)) self.bias_bias = nn.Parameter(torch.zeros(1, channels, 1, 1, 1)) def forward(self, x): b, c, d, h, w = x.size() # standardization parameters mean = x.view(b, c, -1).mean([-1, 0], keepdim=True).squeeze() var = x.view(b, c, -1).var([-1, 0], keepdim=True).squeeze() # transformation parameters weight = self.fc_weight(mean) weight = weight[None, :, None, None, None] + self.weight_bias bias = self.fc_bias(var) bias = bias[None, :, None, None, None] + self.bias_bias # standardize if self.training: ## X_hat_new = (1−momentum) × X_hat + momentum × x_t , where X_hat is the estimated statistic and x_t is the new observed value. ## See pytorch documentation on batch norm for how running mean and var are calculated using momentum. self.running_mean = 0.9 * self.running_mean + 0.1 * mean ## momentum is 0.1 since that is what was used in batch norm on the BN model lacking statistics from forward pass self.running_var = 0.9 * self.running_var + 0.1 * var ## momentum is 0.1 since that is what was used in batch norm on the BN model lacking statistics from forward pass x = (x - mean[None, :, None, None, None]) / (var + self.eps).sqrt()[None, :, None, None, None] else: x = (x - self.running_mean[None, :, None, None, None]) / (self.running_var + self.eps).sqrt()[None, :, None, None, None] # transform return x * weight + bias
34.092857
182
0.57951
1,384
9,546
3.834538
0.106936
0.015074
0.051441
0.029395
0.751272
0.716601
0.701338
0.696062
0.678161
0.678161
0
0.021054
0.29845
9,546
280
183
34.092857
0.770942
0.0749
0
0.740741
0
0
0.002748
0
0
0
0
0
0.047619
1
0.042328
false
0
0.031746
0
0.116402
0
0
0
0
null
0
0
0
0
1
1
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
4
8e0d2f8b085376b4f256b60b01bb0c5550ce3317
35
py
Python
andaime/tasks/__init__.py
luiscape/andaime
0c99220b19eb19295bdde85d1777c4e420bc15f6
[ "MIT" ]
1
2019-09-10T16:59:56.000Z
2019-09-10T16:59:56.000Z
andaime/tasks/__init__.py
luiscape/andaime
0c99220b19eb19295bdde85d1777c4e420bc15f6
[ "MIT" ]
13
2016-12-27T19:26:00.000Z
2016-12-27T20:40:24.000Z
andaime/tasks/__init__.py
luiscape/andaime
0c99220b19eb19295bdde85d1777c4e420bc15f6
[ "MIT" ]
null
null
null
''' Tasks managed by `andaime`. '''
11.666667
27
0.6
4
35
5.25
1
0
0
0
0
0
0
0
0
0
0
0
0.142857
35
3
28
11.666667
0.7
0.771429
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
8e1076ab87a3866766259fe5fe0133f0ee3b049f
197
py
Python
lib_rovpp/as_classes/v1/rovpp_v1_simple_as.py
jfuruness/lib_rovpp
67032c2dc296fa1804a8305d8cb671339b8e45e0
[ "BSD-3-Clause" ]
1
2021-09-27T14:20:12.000Z
2021-09-27T14:20:12.000Z
lib_rovpp/as_classes/v1/rovpp_v1_simple_as.py
jfuruness/lib_rovpp
67032c2dc296fa1804a8305d8cb671339b8e45e0
[ "BSD-3-Clause" ]
null
null
null
lib_rovpp/as_classes/v1/rovpp_v1_simple_as.py
jfuruness/lib_rovpp
67032c2dc296fa1804a8305d8cb671339b8e45e0
[ "BSD-3-Clause" ]
1
2021-10-01T16:30:33.000Z
2021-10-01T16:30:33.000Z
from .rovpp_v1_lite_simple_as import ROVPPV1LiteSimpleAS from ..non_lite import NonLite class ROVPPV1SimpleAS(NonLite, ROVPPV1LiteSimpleAS): name = "ROV++V1 Simple" __slots__ = tuple()
19.7
56
0.771574
23
197
6.217391
0.695652
0
0
0
0
0
0
0
0
0
0
0.02994
0.152284
197
9
57
21.888889
0.826347
0
0
0
0
0
0.071066
0
0
0
0
0
0
1
0
false
0
0.4
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
1
0
0
4
8e12f5ca2849d5cdf8750e2211baf9ad01c37e42
121
py
Python
server/Drawable.py
tpoerschke/multisnak
06a408e988353acdfe713e24490bef49a31e85d7
[ "MIT" ]
null
null
null
server/Drawable.py
tpoerschke/multisnak
06a408e988353acdfe713e24490bef49a31e85d7
[ "MIT" ]
null
null
null
server/Drawable.py
tpoerschke/multisnak
06a408e988353acdfe713e24490bef49a31e85d7
[ "MIT" ]
null
null
null
class Drawable(object): def __init__(self, coords, symbol): self.coords = coords self.symbol = symbol
30.25
39
0.644628
14
121
5.285714
0.571429
0.27027
0
0
0
0
0
0
0
0
0
0
0.256198
121
4
40
30.25
0.822222
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.5
0
1
0
0
null
1
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
4
8e13635e1f54edc9078fb8de9224b5a40fc4129c
133
py
Python
run.py
tcole98/solar_app
dffeea33fe5ac346990d6f610faddb36ae0411b7
[ "MIT" ]
null
null
null
run.py
tcole98/solar_app
dffeea33fe5ac346990d6f610faddb36ae0411b7
[ "MIT" ]
null
null
null
run.py
tcole98/solar_app
dffeea33fe5ac346990d6f610faddb36ae0411b7
[ "MIT" ]
null
null
null
#!flask/bin/python import os os.environ["LOCATION"] = "LOCAL" from server import app app.run(debug=True, threaded=True, port=3000)
16.625
45
0.736842
21
133
4.666667
0.809524
0
0
0
0
0
0
0
0
0
0
0.033898
0.112782
133
8
45
16.625
0.79661
0.12782
0
0
0
0
0.112069
0
0
0
0
0
0
1
0
true
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
1
0
1
0
0
0
0
4
8e235505dea685c6bf596992a21ce0b10b99e58b
8,313
py
Python
iserv/task.py
CaptainSword123/iserv.py
efdd9bdae7454c2f23a36639dedd2e20106c8f39
[ "MIT" ]
1
2021-11-16T12:40:53.000Z
2021-11-16T12:40:53.000Z
iserv/task.py
Leon-hk/iserv.py
efdd9bdae7454c2f23a36639dedd2e20106c8f39
[ "MIT" ]
null
null
null
iserv/task.py
Leon-hk/iserv.py
efdd9bdae7454c2f23a36639dedd2e20106c8f39
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ MIT License Copyright (c) 2021 CaptainSword123 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. """ class LiteTask: """Die Lite-Klasse der Klasse :class:`Task`. Sie enthält nur Grundlegende Informationen der Aufgabe, um die volle Aufgabe zu bekommen ``task()`` ausführen. Attributes ----------- title: :class:`str` Der Aufgabentitel, der in der Vorschau steht. id: :class:`int` Die Aufgaben ID. start: :class:`datetime.datetime` Der Starttermin der Aufgabe. end: :class:`datetime.datetime` Der Abgabetermin der Aufgabe. tags: List[:class:`str`] Eine Liste mit den Tags der Aufgabe. done: :class:`bool` ``True`` wenn die Aufgabe erledigt ist, ``False`` wenn sie noch nicht erledigt wurde. feedback: :class:`bool` ``True`` wenn eine Rückmeldung erfolgt ist, ``False`` wenn keine Rückmeldung erfolgt ist. """ def __init__(self, title, id, start, end, tags, done, feedback, client=None): self.title = title self.id = id self.start = start self.end = end self.tags = tags self.done = done self.feedback = feedback self._client = client def task(self): return self._client.get_task(self.id) class Task(LiteTask): """Eine IServ Aufgabe, diese kann vom Typ :class:`FileTask` oder :class:`TextTask` sein. Attributes ----------- title: :class:`str` Der Aufgabentitel, der in der Vorschau steht. description: :class:`str` Die ausführliche Aufgabenbeschreibung. teacher: :class:`LiteUser` Der `LiteUser` des Lehrers, der die Aufgabe erstellt hat. id: :class:`int` Die Aufgaben ID. start: :class:`datetime.datetime` Der Starttermin der Aufgabe. end: :class:`datetime.datetime` Der Abgabetermin der Aufgabe. tags: List[:class:`str`] Eine Liste mit den Tags der Aufgabe. done: :class:`str`/List[:class:`IServFile`] ``True`` wenn die Aufgabe erledigt ist, ``None`` wenn sie noch nicht erledigt wurde. feedback: :class:`Feedback` ``Feedback`` wenn eine Rückmeldung gegeben wurde, ``None`` wenn keine Rückmeldung gegeben wurde. attachments: List[:class:`IServFile`] Eine Liste der sich im Anhang befindlichen Dateien in Form von `IServFile`s. """ def __init__(self, title, description, teacher, id, start, end, tags, done, feedback, attachments): self.description = description self.teacher = teacher self.attachments = attachments super().__init__(title, id, start, end, tags, done, feedback) class TextTask(Task): """Eine :class:`Task`, bei der die Abgabe in Form eines Textes erfolgt Attributes ----------- title: :class:`str` Der Aufgabentitel, der in der Vorschau steht. description: :class:`str` Die ausführliche Aufgabenbeschreibung. teacher: :class:`User` Der `User` des Lehrers, der die Aufgabe erstellt hat. id: :class:`int` Die Aufgaben ID. start: :class:`datetime.datetime` Der Starttermin der Aufgabe. .. warning:: Der Starttermin wird nur als Datum angegeben, die Uhrzeit ist nicht gegeben. Dazu bitte die vollwertige :class:`Task` mit `.task()` aufrufen. end: :class:`datetime.datetime` Der Abgabetermin der Aufgabe. tags: List[:class:`str`] Eine Liste mit den Tags der Aufgabe. done: :class:`str` ``str`` mit dem abgegebenen Text, wenn die Aufgabe erledigt ist, ``None`` wenn sie noch nicht erledigt wurde. feedback: :class:`Feedback` ``Feedback`` wenn eine Rückmeldung gegeben wurde, ``None`` wenn keine Rückmeldung gegeben wurde. attachments: List[:class:`IServFile`] Eine Liste der sich im Anhang befindlichen Dateien in Form von `IServFile`s. """ def __init__(self, title, description, teacher, id, start, end, tags, done, feedback, attachments): super().__init__(title, description, teacher, id, start, end, tags, done, feedback, attachments) def __repr__(self): return '<iserv.TextTask title="%s" id=%s>' % (self.title, self.id) def __str__(self): return '<iserv.TextTask title="%s" id=%s>' % (self.title, self.id) class FileTask(Task): """Eine :class:`Task`, bei der die Abgabe in Form eines Textes erfolgt Attributes ----------- title: :class:`str` Der Aufgabentitel, der in der Vorschau steht. description: :class:`str` Die ausführliche Aufgabenbeschreibung. teacher: :class:`User` Der `User` des Lehrers, der die Aufgabe erstellt hat. id: :class:`int` Die Aufgaben ID. start: :class:`datetime.datetime` Der Starttermin der Aufgabe. end: :class:`datetime.datetime` Der Abgabetermin der Aufgabe. tags: List[:class:`str`] Eine Liste mit den Tags der Aufgabe. done: List[:class:`IServFile`] List[:class:`IServFile`] mit den abgegebenen Dateien, wenn die Aufgabe erledigt ist, ``None`` wenn sie noch nicht erledigt wurde. feedback: :class:`Feedback` ``Feedback`` wenn eine Rückmeldung gegeben wurde, ``None`` wenn keine Rückmeldung gegeben wurde. attachments: List[:class:`IServFile`] Eine Liste der sich im Anhang befindlichen Dateien in Form von `IServFile`s. """ def __init__(self, title, description, teacher, id, start, end, tags, done, feedback, attachments): super().__init__(title, description, teacher, id, start, end, tags, done, feedback, attachments) def __repr__(self): return '<iserv.FileTask title="%s" id=%s>' % (self.title, self.id) def __str__(self): return '<iserv.FileTask title="%s" id=%s>' % (self.title, self.id) class BoolTask(Task): """Eine :class:`Task`, bei der die Abgabe in Form von Ja/Nein erfolgt Attributes ----------- title: :class:`str` Der Aufgabentitel, der in der Vorschau steht. description: :class:`str` Die ausführliche Aufgabenbeschreibung. teacher: :class:`User` Der `User` des Lehrers, der die Aufgabe erstellt hat. id: :class:`int` Die Aufgaben ID. start: :class:`datetime.datetime` Der Starttermin der Aufgabe. end: :class:`datetime.datetime` Der Abgabetermin der Aufgabe. tags: List[:class:`str`] Eine Liste mit den Tags der Aufgabe. done: :class:`bool` ``True`` wenn die Aufgabe mit "Ja" bestätigt wurde, ``False`` wenn sie noch nicht bestätigt wurde. feedback: :class:`Feedback` ``Feedback`` wenn eine Rückmeldung gegeben wurde, ``None`` wenn keine Rückmeldung gegeben wurde. attachments: List[:class:`IServFile`] Eine Liste der sich im Anhang befindlichen Dateien in Form von `IServFile`s. """ def __init__(self, title, description, teacher, id, start, end, tags, done, feedback, attachments): super().__init__(title, description, teacher, id, start, end, tags, done, feedback, attachments) def __repr__(self): return '<iserv.BoolTask title="%s" id=%s>' % (self.title, self.id) def __str__(self): return '<iserv.BoolTask title="%s" id=%s>' % (self.title, self.id)
38.665116
159
0.659569
1,047
8,313
5.176695
0.200573
0.02952
0.038745
0.04428
0.684317
0.67952
0.676753
0.665314
0.657565
0.65572
0
0.001251
0.230843
8,313
214
160
38.845794
0.846419
0.695297
0
0.487179
0
0
0.098458
0
0
0
0
0
0
1
0.307692
false
0
0
0.179487
0.615385
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
8e3acd4883c25e5f1795ae716781a1e4a330ec22
113
py
Python
fetcher/__main__.py
mgithub46/covid19-datafetcher
bd081f1b99f77a421205e5190f42d5f2ac3b6627
[ "Apache-2.0" ]
31
2020-06-17T11:16:47.000Z
2022-01-11T17:24:52.000Z
fetcher/__main__.py
mgithub46/covid19-datafetcher
bd081f1b99f77a421205e5190f42d5f2ac3b6627
[ "Apache-2.0" ]
24
2020-06-18T20:09:40.000Z
2021-03-30T18:34:33.000Z
fetcher/__main__.py
mgithub46/covid19-datafetcher
bd081f1b99f77a421205e5190f42d5f2ac3b6627
[ "Apache-2.0" ]
15
2020-06-25T20:30:22.000Z
2021-09-20T04:31:10.000Z
import sys from .lib import main if __name__ == "__main__": print("Version: ", sys.version_info) main()
16.142857
40
0.663717
15
113
4.4
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.20354
113
6
41
18.833333
0.733333
0
0
0
0
0
0.150442
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
0.2
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
8e49a66c79966c7c80d8cc1ceaade2bb3091b5d7
546
py
Python
controle_colaboradores_api/apps/localidades_brasileiras/tests/test_models.py
helderlgoliveira/controle-colaboradores-api
def3f77ef547e87b6f827cb711fd0f7d1099d987
[ "BSD-3-Clause" ]
1
2021-10-17T04:28:31.000Z
2021-10-17T04:28:31.000Z
controle_colaboradores_api/apps/localidades_brasileiras/tests/test_models.py
helderlgoliveira/controle-colaboradores-api
def3f77ef547e87b6f827cb711fd0f7d1099d987
[ "BSD-3-Clause" ]
null
null
null
controle_colaboradores_api/apps/localidades_brasileiras/tests/test_models.py
helderlgoliveira/controle-colaboradores-api
def3f77ef547e87b6f827cb711fd0f7d1099d987
[ "BSD-3-Clause" ]
null
null
null
import pytest from model_bakery import baker @pytest.fixture def unidade_federativa(db): return baker.make('UnidadeFederativa', nome="Unidade Federativa X") @pytest.fixture def municipio(db): return baker.make('Municipio', nome="Município X") class TestUnidadeFederativa: def test_str(self, unidade_federativa): assert str(unidade_federativa) == "Unidade Federativa X" class TestMunicipio: def test_str(self, municipio): assert str(municipio) == "Município X"
20.222222
64
0.673993
60
546
6.033333
0.416667
0.234807
0.088398
0.093923
0
0
0
0
0
0
0
0
0.234432
546
26
65
21
0.866029
0
0
0.125
0
0
0.161172
0
0
0
0
0
0.125
1
0.25
false
0
0.125
0.125
0.625
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
f3dda8688054d51fb9383d11e419f6f68a2aad88
363
py
Python
resources/resource_names.py
githubfromgui/load-balancer-pretty-logs
a65d22d076f2384e7b833b1257fcd2d8f436b2e6
[ "MIT" ]
null
null
null
resources/resource_names.py
githubfromgui/load-balancer-pretty-logs
a65d22d076f2384e7b833b1257fcd2d8f436b2e6
[ "MIT" ]
null
null
null
resources/resource_names.py
githubfromgui/load-balancer-pretty-logs
a65d22d076f2384e7b833b1257fcd2d8f436b2e6
[ "MIT" ]
null
null
null
class ResourceNames(): def __init__(self, log_group_name: str, log_stream_name: str): self.log_group_name = log_group_name self.log_stream_name = log_stream_name def get_log_group_name(self) -> str: return self.log_group_name def get_log_stream_name(self) -> str: return self.log_stream_name
27.923077
65
0.661157
51
363
4.196078
0.235294
0.163551
0.280374
0.224299
0.224299
0.224299
0
0
0
0
0
0
0.267218
363
12
66
30.25
0.804511
0
0
0
0
0
0
0
0
0
0
0
0
1
0.375
false
0
0
0.25
0.75
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
4
6d035045314210118b8777cdb7f9bfbf68810097
144
py
Python
cartola_draft/exceptions.py
matheusccouto/cartola-squad-selector
2aaac35be4c44031e26a94419aa797858bcf0348
[ "MIT" ]
null
null
null
cartola_draft/exceptions.py
matheusccouto/cartola-squad-selector
2aaac35be4c44031e26a94419aa797858bcf0348
[ "MIT" ]
null
null
null
cartola_draft/exceptions.py
matheusccouto/cartola-squad-selector
2aaac35be4c44031e26a94419aa797858bcf0348
[ "MIT" ]
null
null
null
"""Custom execeptions for Cartola FC Draft.""" class SchemeError(Exception): """Indicates that the Line-up does not follow the scheme."""
24
64
0.715278
19
144
5.421053
0.947368
0
0
0
0
0
0
0
0
0
0
0
0.159722
144
5
65
28.8
0.85124
0.659722
0
0
0
0
0
0
0
0
0
0
0
1
0
true
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
1
0
0
0
1
0
0
4
6d15aa91093034f3731d7be3d713b7f2a0203c20
153
py
Python
jsane/__init__.py
Mumbleskates/jsane
f63c01ab50899e207dae8427e4faef0e9d35e41e
[ "MIT" ]
131
2016-01-29T10:39:07.000Z
2021-07-21T04:27:50.000Z
jsane/__init__.py
Mumbleskates/jsane
f63c01ab50899e207dae8427e4faef0e9d35e41e
[ "MIT" ]
8
2016-10-20T19:39:48.000Z
2018-12-04T18:13:22.000Z
jsane/__init__.py
Mumbleskates/jsane
f63c01ab50899e207dae8427e4faef0e9d35e41e
[ "MIT" ]
8
2016-02-27T13:28:44.000Z
2020-01-01T11:35:57.000Z
# flake8: noqa from .traversable import JSaneException from .wrapper import load, loads, dump, dumps, from_dict, from_object, new __version__ = '0.1.2'
25.5
74
0.764706
22
153
5.045455
0.818182
0
0
0
0
0
0
0
0
0
0
0.030303
0.137255
153
5
75
30.6
0.810606
0.078431
0
0
0
0
0.035971
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
6d268651bd05263ed34104054a7ba23505bdd132
1,392
py
Python
config/settings/development.py
Rigo-Villalta/django-alpha-bootstrap
17a51518e834a02eeeb8fe24f23706b74da90db7
[ "BSD-3-Clause" ]
null
null
null
config/settings/development.py
Rigo-Villalta/django-alpha-bootstrap
17a51518e834a02eeeb8fe24f23706b74da90db7
[ "BSD-3-Clause" ]
null
null
null
config/settings/development.py
Rigo-Villalta/django-alpha-bootstrap
17a51518e834a02eeeb8fe24f23706b74da90db7
[ "BSD-3-Clause" ]
null
null
null
from .base import * INSTALLED_APPS += ["debug_toolbar"] MIDDLEWARE.insert(0, "debug_toolbar.middleware.DebugToolbarMiddleware") DEBUG = True ALLOWED_HOSTS = os.environ.get('SERVERNAMES').split(' ') EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend" INTERNAL_IPS = [ "127.0.0.1", ] DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", "NAME": os.environ["DB_NAME"], "USER": os.environ["DB_USER"], "PASSWORD": os.environ["DB_USER_PASSWORD"], "HOST": os.environ["DB_HOST"], # DB_HOST=127.0.0.1 if localhost "PORT": os.environ["DB_PORT"] # DB_PORT=5432 default postgresql } } DEBUG_TOOLBAR_PANELS = [ "debug_toolbar.panels.history.HistoryPanel", "debug_toolbar.panels.versions.VersionsPanel", "debug_toolbar.panels.timer.TimerPanel", "debug_toolbar.panels.settings.SettingsPanel", "debug_toolbar.panels.headers.HeadersPanel", "debug_toolbar.panels.request.RequestPanel", "debug_toolbar.panels.sql.SQLPanel", "debug_toolbar.panels.staticfiles.StaticFilesPanel", "debug_toolbar.panels.templates.TemplatesPanel", "debug_toolbar.panels.cache.CachePanel", "debug_toolbar.panels.signals.SignalsPanel", "debug_toolbar.panels.logging.LoggingPanel", "debug_toolbar.panels.redirects.RedirectsPanel", "debug_toolbar.panels.profiling.ProfilingPanel", ]
32.372093
72
0.716954
156
1,392
6.205128
0.467949
0.210744
0.278926
0.012397
0.047521
0
0
0
0
0
0
0.014178
0.138649
1,392
43
73
32.372093
0.793161
0.04454
0
0
0
0
0.616717
0.53012
0
0
0
0
0
1
0
false
0.028571
0.028571
0
0.028571
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
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
6d3cb8c1e65b841d44cf4878c8fa8f293cf4a5d5
48
py
Python
mytest.py
TaylorWillber/pedestrainYolu3Okbak
06df113f0c7b1207047d6c4ee28225e533c867aa
[ "MIT" ]
6
2020-08-31T06:59:08.000Z
2022-03-28T03:06:21.000Z
mytest.py
TaylorWillber/pedestrainYolu3Okbak
06df113f0c7b1207047d6c4ee28225e533c867aa
[ "MIT" ]
2
2022-01-25T06:41:42.000Z
2022-03-03T08:38:31.000Z
mytest.py
TaylorWillber/pedestrainYolu3Okbak
06df113f0c7b1207047d6c4ee28225e533c867aa
[ "MIT" ]
1
2021-05-07T08:22:36.000Z
2021-05-07T08:22:36.000Z
a = b'hhh' print(a) b = bytes.decode(a) print(b)
12
19
0.625
11
48
2.727273
0.545455
0.133333
0
0
0
0
0
0
0
0
0
0
0.145833
48
4
20
12
0.731707
0
0
0
0
0
0.061224
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
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
1
0
4
ed95209d3d719bb6caf653808fd38e2068023a18
131
py
Python
Examples/AppKit/CocoaBindings/ToDos/ToDos.py
linuxfood/pyobjc-framework-Cocoa-test
3475890f165ab26a740f13d5afe4c62b4423a140
[ "MIT" ]
null
null
null
Examples/AppKit/CocoaBindings/ToDos/ToDos.py
linuxfood/pyobjc-framework-Cocoa-test
3475890f165ab26a740f13d5afe4c62b4423a140
[ "MIT" ]
null
null
null
Examples/AppKit/CocoaBindings/ToDos/ToDos.py
linuxfood/pyobjc-framework-Cocoa-test
3475890f165ab26a740f13d5afe4c62b4423a140
[ "MIT" ]
null
null
null
import ToDosDocument # noqa: F401 if __name__ == "__main__": from PyObjCTools import AppHelper AppHelper.runEventLoop()
18.714286
37
0.732824
13
131
6.769231
0.846154
0
0
0
0
0
0
0
0
0
0
0.028302
0.19084
131
6
38
21.833333
0.801887
0.076336
0
0
0
0
0.067227
0
0
0
0
0
0
1
0
true
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
1
0
1
0
0
0
0
4