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
aa992855fa486f52d2c5cc04ce93bffae7da9a02
1,464
py
Python
tools/dataSetScannerDownloader.py
kakuffo/datascience
0b049e0a63baffec8f7dc82b656fb1dafefdfef5
[ "MIT" ]
null
null
null
tools/dataSetScannerDownloader.py
kakuffo/datascience
0b049e0a63baffec8f7dc82b656fb1dafefdfef5
[ "MIT" ]
null
null
null
tools/dataSetScannerDownloader.py
kakuffo/datascience
0b049e0a63baffec8f7dc82b656fb1dafefdfef5
[ "MIT" ]
null
null
null
''' Scanner which will trace specified strings or content before downloading if present in taget dataset ''' import urllib.request,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d80ef60'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by) ''' Scanner which will trace specified strings or content before downloading if present in taget dataset ''' import urllib2,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d80ef60'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler()) ); by = urllib2.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installation')
45.75
163
0.737705
194
1,464
5.525773
0.371134
0.060634
0.013993
0.025187
0.744403
0.744403
0.744403
0.744403
0.744403
0.692164
0
0.05796
0.11612
1,464
31
164
47.225806
0.770479
0.068306
0
0.352941
0
0
0.363344
0.139871
0.117647
0
0
0
0
1
0
false
0
0.117647
0
0.117647
0.117647
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
2a9a42d72eb3b76349d590f7e1c8927b95c7fa52
285
py
Python
localemr/urls.py
rafaelleru/localemr
aa6e3e5285e96600e87c51639e75acbe35fbba3a
[ "Apache-2.0" ]
19
2020-05-01T19:57:58.000Z
2022-02-23T00:24:24.000Z
localemr/urls.py
rafaelleru/localemr
aa6e3e5285e96600e87c51639e75acbe35fbba3a
[ "Apache-2.0" ]
2
2020-09-14T21:17:35.000Z
2021-02-10T02:39:48.000Z
localemr/urls.py
rafaelleru/localemr
aa6e3e5285e96600e87c51639e75acbe35fbba3a
[ "Apache-2.0" ]
5
2021-03-14T03:00:03.000Z
2022-02-15T12:42:00.000Z
from __future__ import unicode_literals from localemr.responses import LocalElasticMapReduceResponse url_bases = [ "https?://(.+).elasticmapreduce.amazonaws.com", "https?://elasticmapreduce.(.+).amazonaws.com", ] url_paths = {"{0}/$": LocalElasticMapReduceResponse.dispatch}
28.5
61
0.750877
25
285
8.28
0.68
0.202899
0.289855
0.318841
0
0
0
0
0
0
0
0.003891
0.098246
285
9
62
31.666667
0.801556
0
0
0
0
0
0.326316
0.308772
0
0
0
0
0
1
0
false
0
0.285714
0
0.285714
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
2aaf7837d45e3d665564036203ef71b165239ada
95
py
Python
tests/urls.py
Juh10/django-mysql
d997be1321086e2b2c46574bc7882a2737a5c43c
[ "MIT" ]
null
null
null
tests/urls.py
Juh10/django-mysql
d997be1321086e2b2c46574bc7882a2737a5c43c
[ "MIT" ]
null
null
null
tests/urls.py
Juh10/django-mysql
d997be1321086e2b2c46574bc7882a2737a5c43c
[ "MIT" ]
null
null
null
from __future__ import annotations from django.urls import path urlpatterns: list[path] = []
15.833333
34
0.778947
12
95
5.833333
0.75
0
0
0
0
0
0
0
0
0
0
0
0.147368
95
5
35
19
0.864198
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
630cbdaf095dcc6dd4a280cf00a4737b16775107
93
py
Python
scripts/dtdata/__init__.py
fjsakai/bermudatriangles
bb56e2ba7fbb0af61d4bb166447e806e99b9ec32
[ "MIT" ]
4
2021-04-27T08:41:29.000Z
2021-12-21T13:21:00.000Z
scripts/dtdata/__init__.py
fjsakai/bermudatriangles
bb56e2ba7fbb0af61d4bb166447e806e99b9ec32
[ "MIT" ]
null
null
null
scripts/dtdata/__init__.py
fjsakai/bermudatriangles
bb56e2ba7fbb0af61d4bb166447e806e99b9ec32
[ "MIT" ]
1
2021-04-28T05:44:17.000Z
2021-04-28T05:44:17.000Z
from .writer import DTDataWriter from .reader import DTDataReader, DTDatum, DTLabel, DTFiles
31
59
0.827957
11
93
7
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.11828
93
2
60
46.5
0.939024
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
632ccd41d803731cc1f3955e95c5e780d2c69c20
65
py
Python
streaming/phishtank/api/__init__.py
d3vzer0/faust-transparency
17b8b59f26f60c36fda31e507dc6d897c22e80e9
[ "MIT" ]
12
2019-04-21T18:01:45.000Z
2020-11-05T03:17:35.000Z
streaming/phishtank/api/__init__.py
d3vzer0/faust-enricher
17b8b59f26f60c36fda31e507dc6d897c22e80e9
[ "MIT" ]
7
2019-04-22T19:53:36.000Z
2022-02-17T23:45:34.000Z
streaming/phishtank/api/__init__.py
d3vzer0/faust-enricher
17b8b59f26f60c36fda31e507dc6d897c22e80e9
[ "MIT" ]
3
2019-04-22T20:25:52.000Z
2019-12-19T21:19:16.000Z
from streaming.phishtank.api.reported import Reported as Reported
65
65
0.876923
9
65
6.333333
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.076923
65
1
65
65
0.95
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
9311f53785baf796f95cc80b7dbfb4848d9b2c50
13,485
py
Python
3.py
angelsave/reverse_enginering
3d6b46e898535ed162cdcb1b03a90761dcb3bce4
[ "MIT" ]
7
2018-05-04T08:28:58.000Z
2019-11-06T08:49:02.000Z
3.py
angelsave/reverse_enginering
3d6b46e898535ed162cdcb1b03a90761dcb3bce4
[ "MIT" ]
1
2019-09-21T07:29:50.000Z
2019-09-22T16:53:04.000Z
3.py
angelsave/reverse_enginering
3d6b46e898535ed162cdcb1b03a90761dcb3bce4
[ "MIT" ]
8
2018-05-04T08:28:59.000Z
2020-09-27T17:21:28.000Z
#!/usr/bin/env python d = [48,43,238,211,216,10,57,254,72,73,74,96,182,82,110,210,227,210,7,87,38,201,207,187,189,87,70,203,5,140,126,138,209,219,105,9,64,225,203,171,239,208,169,144,213,155,23,255,102,34,91,141,32,237,228,81,182,224,220,129,24,21,101,157,126,203,39,17,98,4,210,138,14,229,0,254,146,201,133,120,194,242,4,178,115,25,90,87,117,151,145,57,3,87,68,201,229,59,111,64,218,204,51,139,134,50,199,207,150,176,209,76,18,9,127,222,176,252,128,240,133,222,99,231,196,149,113,113,85,19,199,214,199,119,4,22,240,68,43,101,120,186,165,147,27,228,252,215,174,190,62,9,79,85,86,36,132,10,56,194,12,250,54,219,162,51,251,0,32,86,219,100,40,198,207,242,184,255,114,201,35,43,45,196,19,50,55,126,102,173,208,153,182,205,49,97,116,224,3,112,122,121,29,184,196,209,215,221,116,62,28,16,16,247,85,6,106,33,228,143,94,202,199,81,122,95,226,38,132,241,154,34,48,183,228,177,3,13,157,17,100,51,238,242,198,246,150,178,0,5,16,144,190,25,38,83,82,243,211,189,30,57,155,79,76,46,112,182,11,10,195,227,34,241,85,76,220,171,56,189,51,29,221,105,219,16,247,209,218,12,8,37,151,202,40,131,209,168,175,219,155,23,237,102,35,94,141,40,255,228,37,162,99,135,133,25,113,9,157,253,175,36,16,96,0,210,191,109,226,90,157,129,200,248,28,229,150,107,181,31,110,62,59,24,133,203,178,3,86,33,172,234,95,14,86,182,160,52,230,232,33,157,221,128,50,180,76,19,8,113,222,95,240,128,156,230,222,57,147,210,148,112,114,85,18,214,214,207,108,4,31,230,68,242,104,120,225,214,155,76,14,227,215,245,176,63,9,92,85,191,52,132,136,93,205,102,143,47,191,40,50,120,0,69,58,209,231,49,162,197,156,210,252,42,222,151,43,34,211,19,51,44,126,102,173,208,194,202,197,85,248,116,100,2,30,32,99,121,210,196,85,141,198,46,84,56,117,102,235,48,101,113,162,102,142,58,128,154,44,122,5,141,204,225,143,136,72,173,183,129,170,102,129,157,117,232,50,109,242,183,48,242,237,100,154,16,20,191,119,124,76,43,138,206,216,142,57,254,18,108,74,24,140,18,11,206,227,196,210,85,67,206,171,223,174,51,94,72,104,140,26,192,209,204,142,8,64,193,151,181,131,139,180,202,177,187,115,154,121,70,60,148,76,138,255,60,54,226,134,224,3,20,130,159,126,245,61,17,127,15,208,176,109,226,90,157,130,200,248,28,220,150,23,232,24,28,63,46,125,242,204,49,103,73,32,74,231,95,0,98,182,161,19,230,233,17,157,161,143,177,54,77,18,122,29,255,220,231,3,156,136,223,92,248,196,23,21,113,84,14,171,214,206,127,4,30,249,68,242,106,120,186,164,149,27,5,251,215,144,147,62,123,42,118,60,94,160,137,93,197,102,129,39,191,207,58,120,130,33,50,181,116,49,130,71,243,211,152,86,187,128,168,74,203,18,51,54,126,128,171,208,27,210,197,48,135,123,224,102,59,122,29,90,181,174,113,215,184,41,44,118,100,3,147,57,1,233,163,229,235,42,196,231,185,123,95,135,168,160,148,159,161,178,183,229,231,8,27,157,116,106,50,8,252,198,147,213,186,101,129,16,244,191,119,6,68,168,239,211,217,100,56,254,16,40,75,96,229,58,70,210,227,161,154,170,217,54,84,245,149,50,71,203,105,248,121,208,209,219,110,102,45,245,163,199,230,249,168,202,212,155,7,251,102,70,89,236,62,136,146,20,180,224,134,133,108,16,1,157,126,202,92,120,122,41,211,231,8,229,46,254,146,200,225,10,163,248,100,219,113,104,114,59,125,151,203,69,5,86,32,201,151,58,7,47,192,160,27,231,140,50,157,176,144,177,181,76,96,8,23,191,177,149,227,156,136,222,57,233,196,148,21,118,85,119,192,149,171,123,4,8,157,68,113,107,28,186,193,230,26,96,132,226,244,205,63,108,10,8,17,52,249,139,56,190,102,235,92,191,171,87,122,1,92,48,209,114,85,161,196,150,215,252,14,186,151,65,73,203,111,84,59,253,228,172,199,142,80,199,49,159,116,224,115,19,122,46,5,181,196,49,210,221,25,81,28,117,127,247,48,107,106,162,129,137,58,160,194,58,249,93,144,177,132,148,244,34,179,240,172,212,102,2,206,93,108,51,109,243,136,131,244,186,0,134,113,253,215,28,68,35,72,157,208,216,10,57,193,109,63,57,103,182,18,110,201,184,132,151,110,23,164,194,225,189,51,71,184,109,140,126,208,202,128,61,100,51,135,202,171,131,238,153,226,214,155,115,255,18,65,89,141,76,157,129,76,217,129,229,224,108,17,1,157,126,198,74,117,107,121,250,228,8,229,90,141,147,200,225,120,186,226,1,178,31,28,45,78,124,151,203,49,106,126,32,201,229,95,66,64,182,197,51,149,132,50,157,196,170,194,214,62,123,29,13,224,168,246,128,157,136,170,88,135,180,253,121,121,85,119,192,165,167,123,4,123,254,69,119,106,117,186,234,154,17,97,238,214,128,176,62,108,78,123,85,52,132,137,56,182,103,235,54,191,153,64,58,1,32,50,238,9,106,131,153,210,184,157,31,206,183,70,45,165,116,49,78,16,132,199,177,246,243,181,72,150,28,143,108,62,12,28,11,198,173,117,228,253,93,69,112,20,107,156,81,111,74,207,128,225,93,163,178,84,27,52,241,162,164,226,237,80,192,222,196,130,5,2,157,117,107,51,109,243,198,245,243,186,0,197,16,144,191,4,40,83,43,238,167,216,10,93,255,72,207,75,96,183,118,110,210,176,137,241,85,38,201,229,200,36,51,71,203,86,231,85,253,252,246,32,36,109,168,231,134,174,252,132,231,249,182,94,210,75,107,116,160,97,194,201,17,152,205,171,168,53,57,44,182,116,211,4,49,46,33,242,199,40,197,122,217,178,247,145,85,253,251,80,251,77,81,27,116,46,207,244,65,46,118,0,233,197,127,74,96,150,229,19,198,179,89,225,206,234,145,149,108,45,5,17,170,168,128,243,167,167,241,94,131,176,252,96,19,123,20,175,187,132,11,109,9,147,37,31,24,0,155,225,164,112,28,246,252,217,156,19,65,99,120,17,25,169,164,21,239,75,198,27,146,134,30,85,44,13,31,252,73,28,143,233,223,254,209,95,150,188,3,73,203,19,86,105,114,229,172,208,176,211,197,49,226,92,224,2,30,122,81,121,181,196,85,164,213,46,44,28,73,112,148,66,104,26,214,219,251,60,196,199,58,24,62,252,165,236,251,154,34,179,183,151,180,102,2,157,117,106,48,110,154,197,247,243,186,115,39,16,144,191,72,78,16,74,156,178,248,103,92,144,47,43,63,14,215,121,15,188,217,171,250,106,68,185,210,207,213,92,41,249,73,193,59,254,161,162,45,82,38,236,166,206,222,241,242,167,187,255,22,162,108,121,52,167,115,140,169,83,209,133,188,165,56,43,105,172,94,144,71,60,48,33,237,143,75,128,42,152,230,194,232,71,169,164,32,141,124,49,100,26,66,252,152,84,103,55,78,174,239,86,85,45,133,229,12,133,161,12,189,251,251,253,212,33,112,12,13,212,227,152,195,242,230,170,86,130,254,180,42,16,37,14,180,190,196,21,54,91,179,1,95,27,1,155,238,232,127,3,157,165,144,158,88,5,34,48,18,68,253,169,10,171,103,235,54,191,223,50,120,1,32,64,162,114,49,162,196,205,190,167,83,230,183,108,41,172,114,58,27,19,128,193,178,237,184,164,17,221,23,137,0,30,122,121,13,180,196,85,215,236,90,45,28,117,3,196,67,26,106,162,229,176,87,159,230,103,90,18,255,168,225,180,183,65,150,196,219,221,70,118,244,17,10,88,77,146,162,150,128,178,0,134,16,172,204,20,84,58,91,154,237,172,14,57,254,72,41,50,5,213,97,122,210,227,161,204,56,96,160,199,222,157,71,46,175,8,231,94,163,164,171,125,102,50,241,169,171,131,209,169,202,212,155,115,252,102,70,89,206,76,239,228,79,184,224,134,133,108,20,1,249,127,175,64,19,14,130,208,231,91,205,89,249,146,200,175,17,194,150,0,178,118,227,90,58,125,191,202,49,3,86,84,200,229,95,106,18,158,197,51,230,140,26,157,196,150,177,157,76,18,109,121,173,212,240,128,157,180,173,90,152,173,228,97,79,33,127,192,214,171,71,104,26,147,38,21,10,70,138,193,155,27,19,252,215,244,177,87,147,78,85,60,87,134,137,56,194,99,235,54,191,174,51,120,1,99,50,209,100,66,38,196,242,211,152,115,187,234,41,72,175,23,86,103,124,229,209,211,152,174,193,49,154,31,224,126,29,122,13,121,181,184,85,215,94,47,44,119,112,3,133,27,1,58,204,229,143,70,192,199,78,122,95,236,205,132,23,137,34,216,178,228,194,32,2,249,119,107,78,105,243,168,247,243,198,2,134,100,145,191,3,36,83,87,238,211,164,9,57,231,203,77,74,28,183,18,18,214,227,184,178,214,39,201,156,198,191,51,59,200,105,232,125,208,230,166,14,9,60,129,202,207,128,209,158,183,208,155,2,234,102,17,37,143,76,188,204,57,181,224,134,203,108,20,1,157,126,198,36,17,14,1,187,230,8,229,90,209,144,200,225,120,171,150,0,178,31,117,90,58,125,151,227,50,3,86,32,189,230,95,106,64,218,160,93,146,143,50,157,196,245,217,199,56,17,109,121,222,179,130,228,181,141,222,57,234,176,149,21,113,85,19,180,215,171,123,4,16,138,69,113,107,120,222,147,144,27,96,252,163,245,177,62,108,36,125,60,52,132,137,16,194,102,235,54,204,163,51,120,1,28,65,178,22,88,210,176,204,167,255,114,187,151,78,38,168,39,86,59,126,150,186,208,152,211,197,48,228,117,236,3,29,123,107,121,177,197,71,215,212,47,14,29,127,2,249,49,98,104,162,229,143,61,196,199,58,127,95,144,204,199,148,136,34,192,2,228,176,102,101,157,117,22,49,109,148,198,247,142,185,0,254,55,144,195,119,38,23,118,241,211,165,14,57,130,74,76,32,96,182,102,111,210,151,163,243,41,34,201,40,186,189,176,70,203,234,141,126,209,160,200,13,94,36,132,202,207,129,209,195,201,212,231,113,255,229,71,89,154,40,236,228,43,200,226,134,253,57,20,125,156,126,235,121,8,14,124,214,231,116,230,90,147,146,200,149,121,194,234,4,178,156,29,90,185,124,151,202,64,87,86,119,173,225,95,22,66,182,210,87,227,140,37,249,198,150,219,182,76,110,110,121,93,221,240,151,249,142,222,46,151,193,148,97,117,85,11,197,214,207,124,4,31,246,68,242,104,120,198,199,155,111,101,252,189,242,177,66,106,78,214,61,52,249,137,56,190,102,235,101,151,162,51,120,1,110,70,208,100,49,162,159,134,210,252,114,187,187,95,73,203,19,86,102,13,246,172,208,152,186,168,65,141,6,148,34,115,27,11,10,221,165,57,221,185,14,17,60,6,20,247,48,1,96,199,197,178,26,227,224,48,19,115,250,236,185,180,184,14,131,189,143,144,91,34,198,6,25,51,109,243,155,253,132,210,105,234,117,176,142,77,44,90,66,136,243,177,42,7,195,104,32,47,14,158,118,71,232,129,211,150,52,77,195,162,210,219,19,45,235,87,177,94,188,180,181,37,98,105,191,160,139,190,241,153,192,221,254,83,212,91,102,58,229,62,199,128,103,220,189,216,238,67,126,92,180,116,166,77,49,37,60,242,214,2,236,48,217,185,245,193,73,200,243,120,215,124,52,55,91,15,228,163,80,111,120,76,166,132,59,25,104,211,236,26,149,132,50,157,196,170,194,214,62,123,29,13,224,142,227,128,157,136,246,62,234,196,148,97,119,85,119,192,183,219,11,97,21,154,48,114,107,120,187,178,239,105,50,229,215,244,177,74,104,78,85,60,94,235,224,86,144,102,235,54,191,223,52,120,1,32,95,176,22,66,202,165,158,167,249,114,187,151,79,61,166,99,37,19,121,229,172,208,202,201,197,49,226,38,251,2,30,122,43,112,181,196,85,163,220,46,44,28,62,81,252,48,1,106,214,228,143,58,196,180,78,123,95,144,204,231,188,136,34,179,183,204,176,102,2,157,6,99,51,109,243,250,132,144,200,105,246,100,174,203,115,38,83,43,139,189,187,58,7,254,72,76,57,120,182,18,110,210,226,167,242,83,39,196,171,166,188,36,70,198,105,155,123,200,214,220,12,27,65,138,203,249,159,209,169,202,134,145,115,255,102,53,123,141,76,239,141,81,197,143,244,241,56,121,96,239,13,199,69,125,53,100,170,130,107,205,55,152,224,187,137,25,174,184,108,221,126,120,41,18,14,149,203,49,3,127,9,155,204,95,106,64,228,211,51,230,140,65,155,196,150,177,208,34,113,67,9,167,175,238,128,157,136,225,81,177,178,201,53,51,48,5,168,183,216,18,104,91,147,33,28,9,13,218,181,187,125,9,144,178,212,142,93,31,93,85,60,52,187,228,127,131,33,170,122,159,198,86,1,104,77,66,176,10,17,157,167,218,208,252,114,187,197,58,72,203,19,4,53,126,229,172,130,138,211,197,49,202,81,224,2,30,40,92,121,181,196,33,223,221,46,44,108,25,98,131,86,110,24,207,145,133,58,196,199,74,3,0,243,163,233,228,225,78,214,229,228,176,102,2,233,118,107,51,109,144,169,154,135,185,0,134,16,227,198,4,116,82,43,238,211,172,11,57,254,72,8,24,98,182,18,110,166,229,161,243,85,84,168,197,223,210,94,21,200,105,140,126,130,197,219,13,9,52,135,202,171,131,190,218,152,208,155,115,255,52,67,89,141,76,189,232,60,181,224,242,139,24,20,1,237,7,219,76,126,96,94,164,130,122,150,51,150,252,188,228,120,194,150,115,194,115,117,46,104,114,151,203,49,81,65,32,201,229,43,110,64,182,197,92,150,233,92,233,192,150,177,181,62,119,12,29,140,244,240,128,157,218,247,57,234,196,198,51,113,85,119,146,204,171,123,4,41,238,68,113,107,42,160,193,155,27,20,249,215,244,177,76,13,32,50,89,102,143,137,56,194,52,201,54,191,171,97,102,1,32,50,131,78,49,162,196,134,208,252,114,187,254,69,60,191,22,86,59,126,146,222,185,236,182,177,53,226,116,224,112,123,10,11,43,145,196,85,215,245,46,44,28,117,43,247,48,1,106,138,229,143,58,196,180,50,122,95,144,240,247,247,250,75,195,195,218,196,110,2,157,117,87,94,2,151,179,155,150,132,1,134,16,144,204,17,38,83,43,246,210,200,11,41,255,88,77,90,97,166,19,126,211,234,166,236,84,44,200,161,186,180,54,85,202,110,141,125,213,214,218,7,8,67,132,215,170,128,208,174,203,198,154,120,254,118,71,94,140,94,238,238,61,182,225,144,132,27,21,6,156,116,174,47,16,1,0,219,230,14,228,73,249,134,201,232,114,203,131,33,178,3,29,84,59,89,150,204,48,0,87,42,200,206,94,96,65,154,196,48,231] k = [83,43,238,211,216,10,57,254,72,76,74,96,182,18,110,210,227,161,243,85,38,201,171,187,189,51,71,203,105,140,126,208,209,219,13,9,64,133,202,171,131,209,169,202,212,155,115,255,102,70,89,141,76,239,228,60,181,224,134,133,24,20,1,157,126,175,36,17,14,1,210,231,8,229,90,249,146,200,225,120,194,150,0,178,31,28,90,58,125,151,203,49,3,86,32,201,229,95,106,64,182,197,51,230,140,50,157,196,150,177,181,76,18,109,121,222,220,240,128,157,136,222,57,234,196,148,21,113,85,119,192,214,171,123,4,123,254,68,113,107,120,187,193,155,27,96,252,215,244,177,62,108,78,85,60,52,132,137,56,194,102,235,54,191,171,51,120,1,32,50,209,100,49,162,196,242,211,252,114,187,151,43,72,203,19,86,59,126,229,172,208,152,211,197,49,226,116,224,2,30,122,121,121,181,196,85,215,221,46,44,28,117,3,247,48,1,106,162,229,143,58,196,199,58,122,95,144,204,132,148,136,34,179,183,228,176,102,2,157,117,107,51,109,243,198,247,243,186,0,134,16,144,191,119,38] e = '' i,j = (0,0) while 1: if i >= len(d): break if j >= len(k): j = 0 e += chr(d[i] ^ k[j]) i += 1 j += 1 with open('3.pyc','wb') as f: f.write('\x03\xf3\x0d\x0a\xeb\x56\x92\x5a' + e) print "All done..."
709.736842
12,298
0.716352
3,729
13,485
2.590507
0.077233
0.003106
0.004141
0.002277
0.020704
0.020704
0.020704
0.020704
0.007246
0.007246
0
0.712922
0.006007
13,485
18
12,299
749.166667
0.007759
0.001483
0
0
0
0
0.003714
0.002377
0
0
0
0
0
0
null
null
0
0
null
null
0.076923
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
1
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
5
9379e801d115ed2c724a93c919079d0fd8cb0d4d
272
py
Python
plextraktsync/decorators/flatten.py
ksya/PlexTraktSync
6c24dae5ad2ca582bb007b13e00f6b9cf09669ea
[ "MIT" ]
1
2020-05-14T13:06:00.000Z
2020-05-14T13:06:00.000Z
plextraktsync/decorators/flatten.py
glensc/PlexTraktSync
29cfe94a8c55a5bdeacb886bcf2a1c9c3a6fe8c4
[ "MIT" ]
45
2021-08-11T03:19:01.000Z
2022-03-23T03:20:06.000Z
plextraktsync/decorators/flatten.py
glensc/PlexTraktSync
29cfe94a8c55a5bdeacb886bcf2a1c9c3a6fe8c4
[ "MIT" ]
null
null
null
from functools import wraps def flatten_list(method): @wraps(method) def inner(*args): return list(method(*args)) return inner def flatten_dict(method): @wraps(method) def inner(*args): return dict(method(*args)) return inner
15.111111
34
0.639706
34
272
5.058824
0.352941
0.232558
0.197674
0.232558
0.406977
0.406977
0.406977
0
0
0
0
0
0.25
272
17
35
16
0.843137
0
0
0.545455
0
0
0
0
0
0
0
0
0
1
0.363636
false
0
0.090909
0.181818
0.818182
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
5
9383e22ed1de5f3da44662c20fb345bd687c75d4
136
py
Python
authlib/oauth1/rfc5849/util.py
YPCrumble/authlib
782a0fced780849418dc2a869528d10387e24b65
[ "BSD-3-Clause" ]
3,172
2017-11-11T05:54:14.000Z
2022-03-31T23:59:59.000Z
authlib/oauth1/rfc5849/util.py
YPCrumble/authlib
782a0fced780849418dc2a869528d10387e24b65
[ "BSD-3-Clause" ]
397
2017-11-11T02:49:06.000Z
2022-03-31T21:02:37.000Z
authlib/oauth1/rfc5849/util.py
YPCrumble/authlib
782a0fced780849418dc2a869528d10387e24b65
[ "BSD-3-Clause" ]
387
2017-11-18T08:59:56.000Z
2022-03-15T18:37:37.000Z
from authlib.common.urls import quote, unquote def escape(s): return quote(s, safe=b'~') def unescape(s): return unquote(s)
13.6
46
0.676471
21
136
4.380952
0.666667
0.152174
0
0
0
0
0
0
0
0
0
0
0.191176
136
9
47
15.111111
0.836364
0
0
0
0
0
0.007353
0
0
0
0
0
0
1
0.4
false
0
0.2
0.4
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
fa94adecca84a1a207eeddc57d8977a2336b1853
8,927
py
Python
senlin/tests/unit/engine/actions/test_check.py
openstack/senlin
390779ca1e08f819683e79993696f945f1c0393e
[ "Apache-2.0" ]
45
2015-10-18T02:56:50.000Z
2022-03-01T15:28:02.000Z
senlin/tests/unit/engine/actions/test_check.py
openstack/senlin
390779ca1e08f819683e79993696f945f1c0393e
[ "Apache-2.0" ]
2
2019-04-26T10:44:47.000Z
2020-12-16T19:45:34.000Z
senlin/tests/unit/engine/actions/test_check.py
openstack/senlin
390779ca1e08f819683e79993696f945f1c0393e
[ "Apache-2.0" ]
45
2015-10-19T02:35:57.000Z
2021-09-28T09:01:42.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from unittest import mock from senlin.common import consts from senlin.engine.actions import base as ab from senlin.engine.actions import cluster_action as ca from senlin.engine import cluster as cm from senlin.engine import dispatcher from senlin.objects import action as ao from senlin.objects import dependency as dobj from senlin.tests.unit.common import base from senlin.tests.unit.common import utils @mock.patch.object(cm.Cluster, 'load') class ClusterCheckTest(base.SenlinTestCase): def setUp(self): super(ClusterCheckTest, self).setUp() self.ctx = utils.dummy_context() @mock.patch.object(ao.Action, 'update') @mock.patch.object(ab.Action, 'create') @mock.patch.object(dobj.Dependency, 'create') @mock.patch.object(dispatcher, 'start_action') @mock.patch.object(ca.ClusterAction, '_wait_for_dependents') def test_do_check(self, mock_wait, mock_start, mock_dep, mock_action, mock_update, mock_load): node1 = mock.Mock(id='NODE_1') node2 = mock.Mock(id='NODE_2') cluster = mock.Mock(id='FAKE_ID', status='old status', status_reason='old reason') cluster.nodes = [node1, node2] cluster.do_check.return_value = True mock_load.return_value = cluster mock_action.side_effect = ['NODE_ACTION_1', 'NODE_ACTION_2'] action = ca.ClusterAction('FAKE_CLUSTER', 'CLUSTER_CHECK', self.ctx) action.id = 'CLUSTER_ACTION_ID' mock_wait.return_value = (action.RES_OK, 'Everything is Okay') # do it res_code, res_msg = action.do_check() # assertions self.assertEqual(action.RES_OK, res_code) self.assertEqual('Cluster checking completed.', res_msg) mock_load.assert_called_once_with(action.context, 'FAKE_CLUSTER') cluster.do_check.assert_called_once_with(action.context) mock_action.assert_has_calls([ mock.call(action.context, 'NODE_1', 'NODE_CHECK', name='node_check_NODE_1', cause=consts.CAUSE_DERIVED, inputs={}), mock.call(action.context, 'NODE_2', 'NODE_CHECK', name='node_check_NODE_2', cause=consts.CAUSE_DERIVED, inputs={}) ]) mock_dep.assert_called_once_with(action.context, ['NODE_ACTION_1', 'NODE_ACTION_2'], 'CLUSTER_ACTION_ID') mock_update.assert_has_calls([ mock.call(action.context, 'NODE_ACTION_1', {'status': 'READY'}), mock.call(action.context, 'NODE_ACTION_2', {'status': 'READY'}), ]) mock_start.assert_called_once_with() mock_wait.assert_called_once_with() cluster.eval_status.assert_called_once_with( action.context, consts.CLUSTER_CHECK) @mock.patch.object(ao.Action, 'update') @mock.patch.object(ab.Action, 'create') @mock.patch.object(ao.Action, 'delete_by_target') @mock.patch.object(dobj.Dependency, 'create') @mock.patch.object(dispatcher, 'start_action') @mock.patch.object(ca.ClusterAction, '_wait_for_dependents') def test_do_check_need_delete(self, mock_wait, mock_start, mock_dep, mock_delete, mock_action, mock_update, mock_load): node1 = mock.Mock(id='NODE_1') node2 = mock.Mock(id='NODE_2') cluster = mock.Mock(id='FAKE_ID', status='old status', status_reason='old reason') cluster.nodes = [node1, node2] cluster.do_check.return_value = True mock_load.return_value = cluster mock_action.side_effect = ['NODE_ACTION_1', 'NODE_ACTION_2'] action = ca.ClusterAction('FAKE_CLUSTER', 'CLUSTER_CHECK', self.ctx, inputs={'delete_check_action': True}) action.id = 'CLUSTER_ACTION_ID' mock_wait.return_value = (action.RES_OK, 'Everything is Okay') # do it res_code, res_msg = action.do_check() # assertions self.assertEqual(action.RES_OK, res_code) self.assertEqual('Cluster checking completed.', res_msg) mock_load.assert_called_once_with(action.context, 'FAKE_CLUSTER') cluster.do_check.assert_called_once_with(action.context) mock_delete.assert_has_calls([ mock.call(action.context, 'NODE_1', action=['NODE_CHECK'], status=['SUCCEEDED', 'FAILED']), mock.call(action.context, 'NODE_2', action=['NODE_CHECK'], status=['SUCCEEDED', 'FAILED']) ]) mock_action.assert_has_calls([ mock.call(action.context, 'NODE_1', 'NODE_CHECK', name='node_check_NODE_1', cause=consts.CAUSE_DERIVED, inputs={'delete_check_action': True}), mock.call(action.context, 'NODE_2', 'NODE_CHECK', name='node_check_NODE_2', cause=consts.CAUSE_DERIVED, inputs={'delete_check_action': True}) ]) mock_dep.assert_called_once_with(action.context, ['NODE_ACTION_1', 'NODE_ACTION_2'], 'CLUSTER_ACTION_ID') mock_update.assert_has_calls([ mock.call(action.context, 'NODE_ACTION_1', {'status': 'READY'}), mock.call(action.context, 'NODE_ACTION_2', {'status': 'READY'}), ]) mock_start.assert_called_once_with() mock_wait.assert_called_once_with() cluster.eval_status.assert_called_once_with( action.context, consts.CLUSTER_CHECK) def test_do_check_cluster_empty(self, mock_load): cluster = mock.Mock(id='FAKE_ID', nodes=[], status='old status', status_reason='old reason') cluster.do_check.return_value = True mock_load.return_value = cluster action = ca.ClusterAction(cluster.id, 'CLUSTER_CHECK', self.ctx) # do it res_code, res_msg = action.do_check() self.assertEqual(action.RES_OK, res_code) self.assertEqual('Cluster checking completed.', res_msg) cluster.do_check.assert_called_once_with(self.ctx) cluster.eval_status.assert_called_once_with( action.context, consts.CLUSTER_CHECK) @mock.patch.object(ao.Action, 'update') @mock.patch.object(ab.Action, 'create') @mock.patch.object(dobj.Dependency, 'create') @mock.patch.object(dispatcher, 'start_action') @mock.patch.object(ca.ClusterAction, '_wait_for_dependents') def test_do_check_failed_waiting(self, mock_wait, mock_start, mock_dep, mock_action, mock_update, mock_load): node = mock.Mock(id='NODE_1') cluster = mock.Mock(id='CLUSTER_ID', status='old status', status_reason='old reason') cluster.do_recover.return_value = True cluster.nodes = [node] mock_load.return_value = cluster mock_action.return_value = 'NODE_ACTION_ID' action = ca.ClusterAction('FAKE_CLUSTER', 'CLUSTER_CHECK', self.ctx) action.id = 'CLUSTER_ACTION_ID' mock_wait.return_value = (action.RES_TIMEOUT, 'Timeout!') res_code, res_msg = action.do_check() self.assertEqual(action.RES_TIMEOUT, res_code) self.assertEqual('Timeout!', res_msg) mock_load.assert_called_once_with(self.ctx, 'FAKE_CLUSTER') cluster.do_check.assert_called_once_with(action.context) mock_action.assert_called_once_with( action.context, 'NODE_1', 'NODE_CHECK', name='node_check_NODE_1', inputs={}, cause=consts.CAUSE_DERIVED, ) mock_dep.assert_called_once_with(action.context, ['NODE_ACTION_ID'], 'CLUSTER_ACTION_ID') mock_update.assert_called_once_with(action.context, 'NODE_ACTION_ID', {'status': 'READY'}) mock_start.assert_called_once_with() mock_wait.assert_called_once_with() cluster.eval_status.assert_called_once_with( action.context, consts.CLUSTER_CHECK)
43.975369
77
0.628991
1,081
8,927
4.901018
0.140611
0.05889
0.06644
0.08305
0.796338
0.775953
0.748396
0.718196
0.705738
0.672895
0
0.006239
0.263806
8,927
202
78
44.193069
0.799909
0.063291
0
0.675
0
0
0.144638
0
0
0
0
0
0.21875
1
0.03125
false
0
0.0625
0
0.1
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
fadbae162502cb04bb98a3355651e978a87190f5
221
py
Python
src/chkdns/whatsmydns/__init__.py
chelnak/chkdns
d7a2c7bad6c2cc96bea13b10f8139b37d4b7826b
[ "MIT" ]
2
2021-11-09T12:30:46.000Z
2022-01-31T22:39:59.000Z
src/chkdns/whatsmydns/__init__.py
chelnak/chkdns
d7a2c7bad6c2cc96bea13b10f8139b37d4b7826b
[ "MIT" ]
1
2021-11-09T12:59:06.000Z
2021-11-10T10:23:39.000Z
src/chkdns/whatsmydns/__init__.py
chelnak/chkdns
d7a2c7bad6c2cc96bea13b10f8139b37d4b7826b
[ "MIT" ]
1
2021-11-09T12:30:41.000Z
2021-11-09T12:30:41.000Z
from .client import ( Client, QueryTimeoutException, QueryException, InvalidServerException, ) __all__ = ( "Client", "QueryTimeoutException", "QueryException", "InvalidServerException", )
15.785714
29
0.674208
12
221
12.083333
0.583333
0.372414
0.565517
0.868966
0
0
0
0
0
0
0
0
0.226244
221
13
30
17
0.847953
0
0
0
0
0
0.285068
0.19457
0
0
0
0
0
1
0
false
0
0.083333
0
0.083333
0
1
0
1
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
4f0c27cf25ff7ad3bb6932a2d94b0cdbc8652da2
178
py
Python
features_fixer/reducer/abstract.py
LudwikBielczynski/features_fixer
43114e3d986265a1e6e34644d3734a361d3fa926
[ "MIT" ]
null
null
null
features_fixer/reducer/abstract.py
LudwikBielczynski/features_fixer
43114e3d986265a1e6e34644d3734a361d3fa926
[ "MIT" ]
null
null
null
features_fixer/reducer/abstract.py
LudwikBielczynski/features_fixer
43114e3d986265a1e6e34644d3734a361d3fa926
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod import pandas as pd class ReducerAbstract(ABC): @abstractmethod def transform(self, df: pd.DataFrame) -> pd.DataFrame: ...
17.8
58
0.691011
21
178
5.857143
0.666667
0.276423
0
0
0
0
0
0
0
0
0
0
0.213483
178
9
59
19.777778
0.878571
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
87a350161d3d04f32b258d5dd8723cfddc8ced74
1,205
py
Python
blog/migrations/0016_auto_20191230_1941.py
JayantTaneja/cncwebsitedjango
bc343d3902c0e4c171b341281213146b21d0ac5b
[ "CNRI-Python" ]
1
2021-03-11T01:55:18.000Z
2021-03-11T01:55:18.000Z
blog/migrations/0016_auto_20191230_1941.py
JayantTaneja/cncwebsitedjango
bc343d3902c0e4c171b341281213146b21d0ac5b
[ "CNRI-Python" ]
13
2020-12-28T00:53:41.000Z
2022-03-12T00:50:13.000Z
blog/migrations/0016_auto_20191230_1941.py
JayantTaneja/cncwebsitedjango
bc343d3902c0e4c171b341281213146b21d0ac5b
[ "CNRI-Python" ]
2
2020-10-24T05:57:57.000Z
2021-04-23T08:11:53.000Z
# Generated by Django 3.0.1 on 2019-12-30 14:11 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0015_auto_20191230_1757'), ] operations = [ migrations.AlterField( model_name='post', name='pic1', field=models.ImageField(blank=True, default=None, null=True, upload_to='blog pics'), ), migrations.AlterField( model_name='post', name='pic2', field=models.ImageField(blank=True, default=None, null=True, upload_to='blog pics'), ), migrations.AlterField( model_name='post', name='pic3', field=models.ImageField(blank=True, default=None, null=True, upload_to='blog pics'), ), migrations.AlterField( model_name='post', name='pic4', field=models.ImageField(blank=True, default=None, null=True, upload_to='blog pics'), ), migrations.AlterField( model_name='post', name='pic5', field=models.ImageField(blank=True, default=None, null=True, upload_to='blog pics'), ), ]
30.897436
96
0.572614
129
1,205
5.248062
0.348837
0.14771
0.184638
0.21418
0.753323
0.753323
0.698671
0.698671
0.698671
0.698671
0
0.042553
0.297925
1,205
38
97
31.710526
0.757683
0.037344
0
0.625
1
0
0.096718
0.019862
0
0
0
0
0
1
0
false
0
0.03125
0
0.125
0
0
0
0
null
0
1
1
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
87ee0eb6db41ddd37847a7feb8eb2899945e1a9f
76
py
Python
KraisitSchool/__init__.py
Kraisitt/KraisitSchool
5b3ba3951c74d7b8b49ba442e48f5a89206f272c
[ "MIT" ]
null
null
null
KraisitSchool/__init__.py
Kraisitt/KraisitSchool
5b3ba3951c74d7b8b49ba442e48f5a89206f272c
[ "MIT" ]
null
null
null
KraisitSchool/__init__.py
Kraisitt/KraisitSchool
5b3ba3951c74d7b8b49ba442e48f5a89206f272c
[ "MIT" ]
null
null
null
# __init__.py from KraisitSchool.studentclass import Student,SpecialStudent
38
61
0.868421
8
76
7.75
1
0
0
0
0
0
0
0
0
0
0
0
0.078947
76
2
61
38
0.885714
0.144737
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
355757ed62d876ee8332373b7617de250ac4cbfa
306
py
Python
InvoiceApp/admin.py
MattGerrans/Eastridge_InvoiceApp
ea9b3c8c3c94bc18166fbce156313f9af2c9d2ed
[ "Unlicense" ]
null
null
null
InvoiceApp/admin.py
MattGerrans/Eastridge_InvoiceApp
ea9b3c8c3c94bc18166fbce156313f9af2c9d2ed
[ "Unlicense" ]
null
null
null
InvoiceApp/admin.py
MattGerrans/Eastridge_InvoiceApp
ea9b3c8c3c94bc18166fbce156313f9af2c9d2ed
[ "Unlicense" ]
null
null
null
from django.contrib import admin from .models import Invoice, InvoiceItem # [Django AttributeError: 'Alias' object has no attribute 'urls'](https://stackoverflow.com/questions/40833324/django-attributeerror-alias-object-has-no-attribute-urls) admin.site.register(Invoice) admin.site.register(InvoiceItem)
43.714286
168
0.816993
39
306
6.410256
0.564103
0.16
0.2
0.248
0.392
0.392
0.392
0.392
0
0
0
0.02807
0.068627
306
6
169
51
0.849123
0.542484
0
0
0
0
0
0
0
0
0
0
0
1
0
true
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
1
0
1
0
0
0
0
5
356104149107392bdbdc6e73bfa2f2e34fe05609
32
py
Python
aulas/aula1.py
Biguelini/Curso-Python-3
0b5df350f5901262927b11b6f2b9b215176808ff
[ "MIT" ]
null
null
null
aulas/aula1.py
Biguelini/Curso-Python-3
0b5df350f5901262927b11b6f2b9b215176808ff
[ "MIT" ]
null
null
null
aulas/aula1.py
Biguelini/Curso-Python-3
0b5df350f5901262927b11b6f2b9b215176808ff
[ "MIT" ]
null
null
null
print('uma linha') # comentário
10.666667
18
0.71875
4
32
5.75
1
0
0
0
0
0
0
0
0
0
0
0
0.125
32
2
19
16
0.821429
0.3125
0
0
0
0
0.45
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
356e13a60935fe699336e0d4fd87c8939e4244c3
256
py
Python
server/feedbackserver/views.py
mvdbroek/geo-userfeedback
1eefa8dada63ba93a928cfd7f11fe3e6fce35243
[ "BSD-3-Clause" ]
null
null
null
server/feedbackserver/views.py
mvdbroek/geo-userfeedback
1eefa8dada63ba93a928cfd7f11fe3e6fce35243
[ "BSD-3-Clause" ]
null
null
null
server/feedbackserver/views.py
mvdbroek/geo-userfeedback
1eefa8dada63ba93a928cfd7f11fe3e6fce35243
[ "BSD-3-Clause" ]
null
null
null
# Create your views here. from django.shortcuts import render_to_response from django.http import HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse from django.template import RequestContext from django.utils import timezone
32
58
0.859375
33
256
6.606061
0.636364
0.229358
0
0
0
0
0
0
0
0
0
0
0.105469
256
7
59
36.571429
0.951965
0.089844
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
35b857919ef5fc98704e32fbbe2d016b5d7c5b30
6,716
py
Python
killCommentLexer.py
stormalf/killcomment
112e7abfae6e5926b5db1b0390081e52256ea404
[ "MIT" ]
null
null
null
killCommentLexer.py
stormalf/killcomment
112e7abfae6e5926b5db1b0390081e52256ea404
[ "MIT" ]
null
null
null
killCommentLexer.py
stormalf/killcomment
112e7abfae6e5926b5db1b0390081e52256ea404
[ "MIT" ]
null
null
null
# Generated from killComment.g4 by ANTLR 4.7.2 from antlr4 import * from io import StringIO from typing.io import TextIO import sys def serializedATN(): with StringIO() as buf: buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\13") buf.write("\u00aa\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7") buf.write("\t\7\4\b\t\b\4\t\t\t\4\n\t\n\3\2\7\2\27\n\2\f\2\16\2\32") buf.write("\13\2\3\2\3\2\6\2\36\n\2\r\2\16\2\37\3\2\7\2#\n\2\f\2") buf.write("\16\2&\13\2\3\2\5\2)\n\2\3\3\7\3,\n\3\f\3\16\3/\13\3\3") buf.write("\3\3\3\3\3\3\3\3\3\7\3\66\n\3\f\3\16\39\13\3\3\3\3\3\3") buf.write("\3\3\3\3\4\7\4@\n\4\f\4\16\4C\13\4\3\4\3\4\3\4\3\4\3\4") buf.write("\7\4J\n\4\f\4\16\4M\13\4\3\4\3\4\3\4\3\4\3\5\7\5T\n\5") buf.write("\f\5\16\5W\13\5\3\5\3\5\3\5\3\5\7\5]\n\5\f\5\16\5`\13") buf.write("\5\3\5\7\5c\n\5\f\5\16\5f\13\5\3\5\3\5\5\5j\n\5\3\6\7") buf.write("\6m\n\6\f\6\16\6p\13\6\3\6\3\6\3\6\3\6\7\6v\n\6\f\6\16") buf.write("\6y\13\6\3\6\3\6\3\6\3\7\7\7\177\n\7\f\7\16\7\u0082\13") buf.write("\7\3\7\3\7\3\7\3\7\6\7\u0088\n\7\r\7\16\7\u0089\3\7\7") buf.write("\7\u008d\n\7\f\7\16\7\u0090\13\7\3\7\3\7\5\7\u0094\n\7") buf.write("\3\b\3\b\5\b\u0098\n\b\3\b\6\b\u009b\n\b\r\b\16\b\u009c") buf.write("\3\t\6\t\u00a0\n\t\r\t\16\t\u00a1\3\n\6\n\u00a5\n\n\r") buf.write("\n\16\n\u00a6\3\n\3\n\5\67Kw\2\13\3\3\5\4\7\5\t\6\13\7") buf.write("\r\b\17\t\21\n\23\13\3\2\5\4\2\f\f\16\17\4\2\f\f\17\17") buf.write("\4\2\13\13\"\"\2\u00c0\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2") buf.write("\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2") buf.write("\2\21\3\2\2\2\2\23\3\2\2\2\3(\3\2\2\2\5-\3\2\2\2\7A\3") buf.write("\2\2\2\ti\3\2\2\2\13n\3\2\2\2\r\u0093\3\2\2\2\17\u009a") buf.write("\3\2\2\2\21\u009f\3\2\2\2\23\u00a4\3\2\2\2\25\27\5\23") buf.write("\n\2\26\25\3\2\2\2\27\32\3\2\2\2\30\26\3\2\2\2\30\31\3") buf.write("\2\2\2\31\33\3\2\2\2\32\30\3\2\2\2\33\35\7%\2\2\34\36") buf.write("\n\2\2\2\35\34\3\2\2\2\36\37\3\2\2\2\37\35\3\2\2\2\37") buf.write(" \3\2\2\2 )\3\2\2\2!#\5\23\n\2\"!\3\2\2\2#&\3\2\2\2$\"") buf.write("\3\2\2\2$%\3\2\2\2%\'\3\2\2\2&$\3\2\2\2\')\7%\2\2(\30") buf.write("\3\2\2\2($\3\2\2\2)\4\3\2\2\2*,\5\23\n\2+*\3\2\2\2,/\3") buf.write("\2\2\2-+\3\2\2\2-.\3\2\2\2.\60\3\2\2\2/-\3\2\2\2\60\61") buf.write("\7)\2\2\61\62\7)\2\2\62\63\7)\2\2\63\67\3\2\2\2\64\66") buf.write("\13\2\2\2\65\64\3\2\2\2\669\3\2\2\2\678\3\2\2\2\67\65") buf.write("\3\2\2\28:\3\2\2\29\67\3\2\2\2:;\7)\2\2;<\7)\2\2<=\7)") buf.write("\2\2=\6\3\2\2\2>@\5\23\n\2?>\3\2\2\2@C\3\2\2\2A?\3\2\2") buf.write("\2AB\3\2\2\2BD\3\2\2\2CA\3\2\2\2DE\7$\2\2EF\7$\2\2FG\7") buf.write("$\2\2GK\3\2\2\2HJ\13\2\2\2IH\3\2\2\2JM\3\2\2\2KL\3\2\2") buf.write("\2KI\3\2\2\2LN\3\2\2\2MK\3\2\2\2NO\7$\2\2OP\7$\2\2PQ\7") buf.write("$\2\2Q\b\3\2\2\2RT\5\23\n\2SR\3\2\2\2TW\3\2\2\2US\3\2") buf.write("\2\2UV\3\2\2\2VX\3\2\2\2WU\3\2\2\2XY\7\61\2\2YZ\7\61\2") buf.write("\2Z^\3\2\2\2[]\n\2\2\2\\[\3\2\2\2]`\3\2\2\2^\\\3\2\2\2") buf.write("^_\3\2\2\2_j\3\2\2\2`^\3\2\2\2ac\5\23\n\2ba\3\2\2\2cf") buf.write("\3\2\2\2db\3\2\2\2de\3\2\2\2eg\3\2\2\2fd\3\2\2\2gh\7\61") buf.write("\2\2hj\7\61\2\2iU\3\2\2\2id\3\2\2\2j\n\3\2\2\2km\5\23") buf.write("\n\2lk\3\2\2\2mp\3\2\2\2nl\3\2\2\2no\3\2\2\2oq\3\2\2\2") buf.write("pn\3\2\2\2qr\7\61\2\2rs\7,\2\2sw\3\2\2\2tv\13\2\2\2ut") buf.write("\3\2\2\2vy\3\2\2\2wx\3\2\2\2wu\3\2\2\2xz\3\2\2\2yw\3\2") buf.write("\2\2z{\7,\2\2{|\7\61\2\2|\f\3\2\2\2}\177\5\23\n\2~}\3") buf.write("\2\2\2\177\u0082\3\2\2\2\u0080~\3\2\2\2\u0080\u0081\3") buf.write("\2\2\2\u0081\u0083\3\2\2\2\u0082\u0080\3\2\2\2\u0083\u0084") buf.write("\7/\2\2\u0084\u0085\7/\2\2\u0085\u0087\3\2\2\2\u0086\u0088") buf.write("\n\2\2\2\u0087\u0086\3\2\2\2\u0088\u0089\3\2\2\2\u0089") buf.write("\u0087\3\2\2\2\u0089\u008a\3\2\2\2\u008a\u0094\3\2\2\2") buf.write("\u008b\u008d\5\23\n\2\u008c\u008b\3\2\2\2\u008d\u0090") buf.write("\3\2\2\2\u008e\u008c\3\2\2\2\u008e\u008f\3\2\2\2\u008f") buf.write("\u0091\3\2\2\2\u0090\u008e\3\2\2\2\u0091\u0092\7/\2\2") buf.write("\u0092\u0094\7/\2\2\u0093\u0080\3\2\2\2\u0093\u008e\3") buf.write("\2\2\2\u0094\16\3\2\2\2\u0095\u0097\7\17\2\2\u0096\u0098") buf.write("\7\f\2\2\u0097\u0096\3\2\2\2\u0097\u0098\3\2\2\2\u0098") buf.write("\u009b\3\2\2\2\u0099\u009b\7\f\2\2\u009a\u0095\3\2\2\2") buf.write("\u009a\u0099\3\2\2\2\u009b\u009c\3\2\2\2\u009c\u009a\3") buf.write("\2\2\2\u009c\u009d\3\2\2\2\u009d\20\3\2\2\2\u009e\u00a0") buf.write("\n\3\2\2\u009f\u009e\3\2\2\2\u00a0\u00a1\3\2\2\2\u00a1") buf.write("\u009f\3\2\2\2\u00a1\u00a2\3\2\2\2\u00a2\22\3\2\2\2\u00a3") buf.write("\u00a5\t\4\2\2\u00a4\u00a3\3\2\2\2\u00a5\u00a6\3\2\2\2") buf.write("\u00a6\u00a4\3\2\2\2\u00a6\u00a7\3\2\2\2\u00a7\u00a8\3") buf.write("\2\2\2\u00a8\u00a9\b\n\2\2\u00a9\24\3\2\2\2\32\2\30\37") buf.write("$(-\67AKU^dinw\u0080\u0089\u008e\u0093\u0097\u009a\u009c") buf.write("\u00a1\u00a6\3\b\2\2") return buf.getvalue() class killCommentLexer(Lexer): atn = ATNDeserializer().deserialize(serializedATN()) decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ] COMMENT_HASHTAG = 1 COMMENT_TRIPLE_SINGLE_QUOTES = 2 COMMENT_TRIPLE_DOUBLE_QUOTES = 3 COMMENT_DOUBLE_SLASHES = 4 COMMENT_SLASH_STAR = 5 COMMENT_DOUBLE_HYPHEN = 6 NEWLINE = 7 ALL = 8 WS = 9 channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ] modeNames = [ "DEFAULT_MODE" ] literalNames = [ "<INVALID>", ] symbolicNames = [ "<INVALID>", "COMMENT_HASHTAG", "COMMENT_TRIPLE_SINGLE_QUOTES", "COMMENT_TRIPLE_DOUBLE_QUOTES", "COMMENT_DOUBLE_SLASHES", "COMMENT_SLASH_STAR", "COMMENT_DOUBLE_HYPHEN", "NEWLINE", "ALL", "WS" ] ruleNames = [ "COMMENT_HASHTAG", "COMMENT_TRIPLE_SINGLE_QUOTES", "COMMENT_TRIPLE_DOUBLE_QUOTES", "COMMENT_DOUBLE_SLASHES", "COMMENT_SLASH_STAR", "COMMENT_DOUBLE_HYPHEN", "NEWLINE", "ALL", "WS" ] grammarFileName = "killComment.g4" def __init__(self, input=None, output:TextIO = sys.stdout): super().__init__(input, output) self.checkVersion("4.7.2") self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache()) self._actions = None self._predicates = None
54.601626
103
0.561644
1,668
6,716
2.228417
0.148082
0.149583
0.107345
0.097928
0.319613
0.213882
0.155233
0.135055
0.121872
0.112994
0
0.299687
0.144431
6,716
122
104
55.04918
0.347198
0.006552
0
0.038095
1
0.628571
0.595831
0.567936
0
0
0
0
0
1
0.019048
false
0
0.038095
0
0.238095
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
1
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
ea5d8b1e4b2b0b9b55907e5b515668ad21cf31a0
165
py
Python
pehchaan/__init__.py
achillesrasquinha/pehchaan
467f705347bed4756937de9510a225ba8aaa9313
[ "MIT" ]
35
2017-03-15T15:28:01.000Z
2020-10-28T11:20:05.000Z
pehchaan/__init__.py
achillesrasquinha/pehchaan
467f705347bed4756937de9510a225ba8aaa9313
[ "MIT" ]
1
2017-04-19T21:04:22.000Z
2017-04-19T21:04:22.000Z
pehchaan/__init__.py
achillesrasquinha/pehchaan
467f705347bed4756937de9510a225ba8aaa9313
[ "MIT" ]
13
2017-04-18T16:28:36.000Z
2021-02-11T10:58:50.000Z
# imports - compatibility imports from __future__ import absolute_import # imports - pehchaan from pehchaan.config import AppConfig from pehchaan.app import App
23.571429
38
0.812121
20
165
6.45
0.5
0.186047
0
0
0
0
0
0
0
0
0
0
0.151515
165
6
39
27.5
0.921429
0.30303
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
575c0820a7e065f2c44af95acd63aa332261ac67
65
py
Python
tests/basic_tests/app/forms.py
if1live/importd
4b1dd2cc43923f44f2c509a3e4a0568fa3d4f9b2
[ "BSD-3-Clause" ]
183
2015-01-14T02:15:54.000Z
2021-04-02T01:31:08.000Z
tests/basic_tests/app/forms.py
if1live/importd
4b1dd2cc43923f44f2c509a3e4a0568fa3d4f9b2
[ "BSD-3-Clause" ]
31
2015-01-07T16:25:46.000Z
2021-02-15T08:30:45.000Z
tests/basic_tests/app/forms.py
if1live/importd
4b1dd2cc43923f44f2c509a3e4a0568fa3d4f9b2
[ "BSD-3-Clause" ]
23
2015-01-05T09:34:55.000Z
2018-05-17T07:27:36.000Z
from django.conf import settings settings.FORMS_IMPORTED = True
16.25
32
0.830769
9
65
5.888889
0.888889
0
0
0
0
0
0
0
0
0
0
0
0.123077
65
3
33
21.666667
0.929825
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
579be97ed118db5982a3d910e926f0b5db38d3bb
167
wsgi
Python
mashup.wsgi
aarontrim/mashup
f6fa82c10cd8f8b311cd1b4348854f1a2db94dab
[ "CC-BY-3.0" ]
null
null
null
mashup.wsgi
aarontrim/mashup
f6fa82c10cd8f8b311cd1b4348854f1a2db94dab
[ "CC-BY-3.0" ]
null
null
null
mashup.wsgi
aarontrim/mashup
f6fa82c10cd8f8b311cd1b4348854f1a2db94dab
[ "CC-BY-3.0" ]
null
null
null
import sys import os sys.path.insert(0, '/var/www/mashup') os.environ['API_KEY'] = "AIzaSyAAKBL2ApwSYk9fS9_X2AferUcvnWX9Tjo" from application import app as application
33.4
65
0.808383
23
167
5.782609
0.782609
0
0
0
0
0
0
0
0
0
0
0.039216
0.083832
167
5
66
33.4
0.830065
0
0
0
0
0
0.363095
0.232143
0
0
0
0
0
1
0
true
0
0.6
0
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
57aa5235558e501d35c266ee6b90276187e70975
137
py
Python
client_industry/admin.py
My-Garage/resourceideaapi
b872a6f15277989870572ba6e523c9dc378b7a24
[ "MIT" ]
1
2021-01-20T14:40:06.000Z
2021-01-20T14:40:06.000Z
client_industry/admin.py
My-Garage/resourceideaapi
b872a6f15277989870572ba6e523c9dc378b7a24
[ "MIT" ]
null
null
null
client_industry/admin.py
My-Garage/resourceideaapi
b872a6f15277989870572ba6e523c9dc378b7a24
[ "MIT" ]
null
null
null
from django.contrib import admin # type: ignore from client_industry.models import ClientIndustry admin.site.register(ClientIndustry)
22.833333
49
0.832117
17
137
6.647059
0.764706
0
0
0
0
0
0
0
0
0
0
0
0.109489
137
5
50
27.4
0.92623
0.087591
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
aa045b2347dee77669cee1a5165bc2a65b99e4f6
4,532
py
Python
thenewboston_node/business_logic/tests/test_blockchain_base/test_validate_root_account_file.py
AbhayAysola/thenewboston-node
8a24cfd814eed590a7a1066e45b8b4877501aa35
[ "MIT" ]
null
null
null
thenewboston_node/business_logic/tests/test_blockchain_base/test_validate_root_account_file.py
AbhayAysola/thenewboston-node
8a24cfd814eed590a7a1066e45b8b4877501aa35
[ "MIT" ]
null
null
null
thenewboston_node/business_logic/tests/test_blockchain_base/test_validate_root_account_file.py
AbhayAysola/thenewboston-node
8a24cfd814eed590a7a1066e45b8b4877501aa35
[ "MIT" ]
null
null
null
from unittest.mock import patch import pytest from thenewboston_node.business_logic.exceptions import ValidationError from thenewboston_node.business_logic.tests import factories from thenewboston_node.business_logic.utils.iter import get_generator def test_blockchain_initial_account_root_file_is_validated(blockchain_base): initial_arf = factories.InitialAccountRootFileFactory() with patch.object(blockchain_base, 'iter_account_root_files', get_generator([initial_arf])): blockchain_base.validate_account_root_files(is_partial_allowed=False) def test_blockchain_without_initial_account_root_file_is_validated(blockchain_base): non_initial_arf = factories.AccountRootFileFactory() with patch.object(blockchain_base, 'iter_account_root_files', get_generator([non_initial_arf])): blockchain_base.validate_account_root_files(is_partial_allowed=True) def test_blockchain_must_have_at_least_initial_account_root_file(blockchain_base): with patch.object(blockchain_base, 'iter_account_root_files', get_generator([])): with pytest.raises(ValidationError, match='Blockchain must contain at least one account root file'): blockchain_base.validate_account_root_files() def test_blockchain_must_start_with_initial_account_root_file(blockchain_base): non_initial_arf = factories.AccountRootFileFactory() with patch.object(blockchain_base, 'iter_account_root_files', get_generator([non_initial_arf])): with pytest.raises(ValidationError, match='Blockchain must start with initial account root file'): blockchain_base.validate_account_root_files(is_partial_allowed=False) def test_validate_account_root_file_points_to_non_existing_block(blockchain_base): initial_arf = factories.InitialAccountRootFileFactory() block_0 = factories.BlockFactory(message=factories.BlockMessageFactory(block_number=0)) arf_5 = factories.AccountRootFileFactory(last_block_number=5) arf_patch = patch.object(blockchain_base, 'iter_account_root_files', get_generator([initial_arf, arf_5])) block_patch = patch.object(blockchain_base, 'iter_blocks', get_generator([block_0])) with arf_patch, block_patch: with pytest.raises(ValidationError, match='Account root file last_block_number points to non-existing block'): blockchain_base.validate_account_root_files(is_partial_allowed=True) def test_validate_account_root_file_last_block_identifier_mismatch(blockchain_base): next_block_identifier = '0' * 64 block_number = 0 initial_arf = factories.InitialAccountRootFileFactory() block_0 = factories.BlockFactory( message=factories.BlockMessageFactory(block_number=block_number, block_identifier='e' * 64), message_hash=next_block_identifier, ) arf_0 = factories.AccountRootFileFactory( last_block_number=block_number, last_block_identifier='f' * 64, next_block_identifier=next_block_identifier, ) arf_patch = patch.object(blockchain_base, 'iter_account_root_files', get_generator([initial_arf, arf_0])) block_patch = patch.object(blockchain_base, 'iter_blocks', get_generator([block_0])) with arf_patch, block_patch: with pytest.raises( ValidationError, match='Account root file last_block_number does not ' 'match last_block_identifier' ): blockchain_base.validate_account_root_files(is_partial_allowed=True) def test_validate_account_root_file_next_block_identifier_mismatch(blockchain_base): last_block_identifier = '0' * 64 block_number = 0 initial_arf = factories.InitialAccountRootFileFactory() block_0 = factories.BlockFactory( message=factories.BlockMessageFactory(block_number=block_number, block_identifier=last_block_identifier), message_hash='e' * 64, ) arf_1 = factories.AccountRootFileFactory( last_block_number=block_number, last_block_identifier=last_block_identifier, next_block_identifier='f' * 64, ) arf_patch = patch.object(blockchain_base, 'iter_account_root_files', get_generator([initial_arf, arf_1])) block_patch = patch.object(blockchain_base, 'iter_blocks', get_generator([block_0])) with arf_patch, block_patch: with pytest.raises( ValidationError, match='Account root file next_block_identifier does not match ' 'last_block_number message hash' ): blockchain_base.validate_account_root_files(is_partial_allowed=True)
46.721649
118
0.780229
554
4,532
5.942238
0.129964
0.086877
0.068044
0.075942
0.906136
0.802552
0.758505
0.713548
0.689247
0.673147
0
0.007744
0.14519
4,532
96
119
47.208333
0.842024
0
0
0.405405
0
0
0.116284
0.044793
0
0
0
0
0
1
0.094595
false
0
0.067568
0
0.162162
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
aa105b1677b8a42e22a0c345bf7b1943a9453270
430
py
Python
src/entities.py
CRafa97/agent-simulation
00dc3a1f2a75b21058c0555b4580a779fda89d4f
[ "MIT" ]
null
null
null
src/entities.py
CRafa97/agent-simulation
00dc3a1f2a75b21058c0555b4580a779fda89d4f
[ "MIT" ]
null
null
null
src/entities.py
CRafa97/agent-simulation
00dc3a1f2a75b21058c0555b4580a779fda89d4f
[ "MIT" ]
null
null
null
class Child: def __init__(self): pass def __str__(self): return "c" def __hash__(self): return self.x ** self.y class Cradle: def __init__(self): self.child = None @property def with_child(self): return self.child != None def __str__(self): return "C" class Block: def __init__(self): pass def __str__(self): return "B"
15.925926
33
0.546512
52
430
3.961538
0.346154
0.242718
0.160194
0.23301
0.38835
0.300971
0.300971
0.300971
0
0
0
0
0.353488
430
27
34
15.925926
0.741007
0
0
0.4
0
0
0.006961
0
0
0
0
0
0
1
0.4
false
0.1
0
0.25
0.8
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
0
0
0
5
a4c31d55b4bfdef9b25d4b1f93f3d7ba7bda77c0
52
py
Python
models/__init__.py
imrachbini/Efficient-CapsNet
82b852002e3d268030d89ccfec586c6f9e2b2b2e
[ "Apache-2.0" ]
177
2021-02-01T09:01:38.000Z
2022-03-30T09:40:40.000Z
models/__init__.py
imrachbini/Efficient-CapsNet
82b852002e3d268030d89ccfec586c6f9e2b2b2e
[ "Apache-2.0" ]
17
2021-02-09T16:09:52.000Z
2022-01-18T12:39:36.000Z
models/__init__.py
imrachbini/Efficient-CapsNet
82b852002e3d268030d89ccfec586c6f9e2b2b2e
[ "Apache-2.0" ]
42
2021-02-01T14:31:16.000Z
2022-03-14T05:13:49.000Z
from models.model import EfficientCapsNet, CapsNet
17.333333
50
0.846154
6
52
7.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.115385
52
2
51
26
0.956522
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
a4d435b04a580351ad008a0a538048275c17b31a
2,501
py
Python
aries_cloudagent/protocols/present_proof/v2_0/handlers/tests/test_pres_handler.py
VersesGitHub/aries-cloudagent-python
eb7182aaad3ab35ea0783e4b97118333f303e8d8
[ "Apache-2.0" ]
1
2021-04-15T09:44:00.000Z
2021-04-15T09:44:00.000Z
aries_cloudagent/protocols/present_proof/v2_0/handlers/tests/test_pres_handler.py
VersesGitHub/aries-cloudagent-python
eb7182aaad3ab35ea0783e4b97118333f303e8d8
[ "Apache-2.0" ]
null
null
null
aries_cloudagent/protocols/present_proof/v2_0/handlers/tests/test_pres_handler.py
VersesGitHub/aries-cloudagent-python
eb7182aaad3ab35ea0783e4b97118333f303e8d8
[ "Apache-2.0" ]
1
2022-02-02T17:05:27.000Z
2022-02-02T17:05:27.000Z
import pytest from asynctest import mock as async_mock, TestCase as AsyncTestCase from ......messaging.request_context import RequestContext from ......messaging.responder import MockResponder from ......transport.inbound.receipt import MessageReceipt from ...messages.pres import V20Pres from .. import pres_handler as test_module class TestV20PresHandler(AsyncTestCase): async def test_called(self): request_context = RequestContext.test_context() request_context.message_receipt = MessageReceipt() request_context.settings["debug.auto_verify_presentation"] = False with async_mock.patch.object( test_module, "V20PresManager", autospec=True ) as mock_pres_mgr: mock_pres_mgr.return_value.receive_pres = async_mock.CoroutineMock() request_context.message = V20Pres() request_context.connection_ready = True request_context.connection_record = async_mock.MagicMock() handler = test_module.V20PresHandler() responder = MockResponder() await handler.handle(request_context, responder) mock_pres_mgr.assert_called_once_with(request_context.profile) mock_pres_mgr.return_value.receive_pres.assert_called_once_with( request_context.message, request_context.connection_record ) assert not responder.messages async def test_called_auto_verify(self): request_context = RequestContext.test_context() request_context.message_receipt = MessageReceipt() request_context.settings["debug.auto_verify_presentation"] = True with async_mock.patch.object( test_module, "V20PresManager", autospec=True ) as mock_pres_mgr: mock_pres_mgr.return_value.receive_pres = async_mock.CoroutineMock() mock_pres_mgr.return_value.verify_pres = async_mock.CoroutineMock() request_context.message = V20Pres() request_context.connection_ready = True request_context.connection_record = async_mock.MagicMock() handler = test_module.V20PresHandler() responder = MockResponder() await handler.handle(request_context, responder) mock_pres_mgr.assert_called_once_with(request_context.profile) mock_pres_mgr.return_value.receive_pres.assert_called_once_with( request_context.message, request_context.connection_record ) assert not responder.messages
42.389831
80
0.718912
270
2,501
6.314815
0.218519
0.172434
0.058065
0.049853
0.787097
0.774194
0.774194
0.774194
0.774194
0.774194
0
0.008105
0.210716
2,501
58
81
43.12069
0.855623
0
0
0.680851
0
0
0.035186
0.02399
0
0
0
0
0.12766
1
0
false
0
0.148936
0
0.170213
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
a4dc21cb2cc328a9b534b9eb19013efc1088a310
50
py
Python
binary_search_tree/__init__.py
JvitorS23/data-structures-with-python
c3824c85e499e82227274de7254bdbf943a1ea3d
[ "MIT" ]
null
null
null
binary_search_tree/__init__.py
JvitorS23/data-structures-with-python
c3824c85e499e82227274de7254bdbf943a1ea3d
[ "MIT" ]
null
null
null
binary_search_tree/__init__.py
JvitorS23/data-structures-with-python
c3824c85e499e82227274de7254bdbf943a1ea3d
[ "MIT" ]
null
null
null
from .bst import BSTNode, BinarySearchTree # noqa
25
49
0.8
6
50
6.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.14
50
1
50
50
0.930233
0.08
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
a4ea769efe7b882c02bcf35a19ed2c7e21a73394
4,499
py
Python
tests/integration_tests.py
FredHutch/FAMLI
6a0b2efd8426dc33a02418c6e12a453327f8fc3f
[ "MIT" ]
14
2018-04-17T01:04:37.000Z
2021-11-09T11:46:32.000Z
tests/integration_tests.py
FredHutch/FAMLI
6a0b2efd8426dc33a02418c6e12a453327f8fc3f
[ "MIT" ]
4
2019-10-01T12:41:14.000Z
2020-10-21T17:04:50.000Z
tests/integration_tests.py
FredHutch/FAMLI
6a0b2efd8426dc33a02418c6e12a453327f8fc3f
[ "MIT" ]
3
2018-04-06T09:02:45.000Z
2019-03-15T13:20:57.000Z
#!/usr/bin/python import gzip import json import subprocess # Run the entire process on the test data p = subprocess.Popen([ "famli", "align", "--input", "/usr/famli/tests/example.fastq", "--sample-name", "example1", "--ref-db", "/usr/famli/tests/refdb.diamond.v0.9.22.dmnd", "--output-folder", "/usr/famli/tests", "--temp-folder", "/usr/famli/tests" ]) stdout, stderr = p.communicate() exitcode = p.wait() assert exitcode == 0 output = json.load(gzip.open("/usr/famli/tests/example1.json.gz")) assert output["aligned_reads"] == 338, output["aligned_reads"] assert output["total_reads"] == 360, output["total_reads"] assert output["ref_db"] == "/usr/famli/tests/refdb.diamond.v0.9.22.dmnd", output["ref_db"] assert output["deduplicated_reads"] == 155, output["deduplicated_reads"] assert output["output_folder"] == "/usr/famli/tests", output["output_folder"] assert output["input_path"] == "/usr/famli/tests/example.fastq", output["input_path"] # Two references had deduplicated reads assert len(output["results"]) == 2, len(output["results"]) # QUALITY TRIMMING # Run the same tests with quality trimming p = subprocess.Popen([ "famli", "align", "--input", "/usr/famli/tests/example.fastq", "--sample-name", "example2", "--ref-db", "/usr/famli/tests/refdb.diamond.v0.9.22.dmnd", "--output-folder", "/usr/famli/tests", "--temp-folder", "/usr/famli/tests", "--min-qual", "35" ]) stdout, stderr = p.communicate() exitcode = p.wait() assert exitcode == 0 output = json.load(gzip.open("/usr/famli/tests/example2.json.gz")) assert output["aligned_reads"] == 338, output["aligned_reads"] assert output["total_reads"] == 360, output["total_reads"] assert output["ref_db"] == "/usr/famli/tests/refdb.diamond.v0.9.22.dmnd", output["ref_db"] assert output["deduplicated_reads"] == 254, output["deduplicated_reads"] assert output["output_folder"] == "/usr/famli/tests", output["output_folder"] assert output["input_path"] == "/usr/famli/tests/example.fastq", output["input_path"] # THREE references now have deduplicated reads assert len(output["results"]) == 3, len(output["results"]) # MULTIPLE INPUT FILES, COMBINED input_fps = "/usr/famli/tests/example.fastq+/usr/famli/tests/example2.fastq" # Run the same tests with quality trimming p = subprocess.Popen([ "famli", "align", "--input", input_fps, "--sample-name", "combined", "--ref-db", "/usr/famli/tests/refdb.diamond.v0.9.22.dmnd", "--output-folder", "/usr/famli/tests", "--temp-folder", "/usr/famli/tests", "--min-qual", "35" ]) stdout, stderr = p.communicate() exitcode = p.wait() assert exitcode == 0 output = json.load(gzip.open("/usr/famli/tests/combined.json.gz")) assert output["aligned_reads"] == 676, output["aligned_reads"] assert output["total_reads"] == 720, output["total_reads"] assert output["ref_db"] == "/usr/famli/tests/refdb.diamond.v0.9.22.dmnd", output["ref_db"] assert output["deduplicated_reads"] == 508, output["deduplicated_reads"] assert output["output_folder"] == "/usr/famli/tests", output["output_folder"] assert output["input_path"] == input_fps, output["input_path"] # THREE references now have deduplicated reads assert len(output["results"]) == 3, len(output["results"]) # Just run the 'filter' module p = subprocess.Popen([ "famli", "filter", "--input", "/usr/famli/tests/example.diamond.aln", "--output", "/usr/famli/tests/example3.json" ]) stdout, stderr = p.communicate() exitcode = p.wait() assert exitcode == 0 output = json.load(open("/usr/famli/tests/example3.json", "rt")) n_dedup = sum([d["nreads"] for d in output]) assert n_dedup == 360, n_dedup # Three references survived filtering assert len(output) == 3 # RETURNING FILTERED ALIGNMENTS p = subprocess.Popen([ "famli", "filter", "--input", "/usr/famli/tests/example.diamond.aln", "--output", "/usr/famli/tests/example4.json", "--output-aln", "/usr/famli/tests/example4.aln" ]) stdout, stderr = p.communicate() exitcode = p.wait() assert exitcode == 0 output = json.load(open("/usr/famli/tests/example4.json", "rt")) n_dedup = sum([d["nreads"] for d in output]) output_aln = open("/usr/famli/tests/example4.aln", "rt").readlines() # The alignment TSV only contains deduplicated reads assert n_dedup == len(output_aln), n_dedup # The number of aligned references matches in the JSON and ALN assert len(output) == len(set([l.split("\t")[1] for l in output_aln])) print("PASSED TESTS")
31.027586
90
0.682374
620
4,499
4.874194
0.185484
0.084712
0.137657
0.056585
0.798809
0.760093
0.73726
0.724024
0.724024
0.724024
0
0.020071
0.125139
4,499
144
91
31.243056
0.747713
0.115804
0
0.693878
0
0
0.439707
0.199041
0
0
0
0
0.306122
1
0
false
0.010204
0.030612
0
0.030612
0.010204
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
3508687a18b76b14f93bc9c51dde60280b733076
87
py
Python
client.py
mevlanaayas/miye-behance-collector
06d1dd80fae18497a6ac423b8bca8dacdfb5c510
[ "MIT" ]
null
null
null
client.py
mevlanaayas/miye-behance-collector
06d1dd80fae18497a6ac423b8bca8dacdfb5c510
[ "MIT" ]
1
2021-06-01T21:42:23.000Z
2021-06-01T21:42:23.000Z
client.py
mevlanaayas/miye-behance-collector
06d1dd80fae18497a6ac423b8bca8dacdfb5c510
[ "MIT" ]
null
null
null
from celery import Celery celery = Celery() celery.config_from_object('celeryconfig')
17.4
41
0.804598
11
87
6.181818
0.545455
0.529412
0.529412
0
0
0
0
0
0
0
0
0
0.103448
87
4
42
21.75
0.871795
0
0
0
0
0
0.137931
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
102e5f3a02ea6d282e8787e953a7bc71e74a282c
230
py
Python
fishingapp_backend/foundation/admin.py
Jimmyjtc001/fishingapp-backend
653ab1b1d61f43a84a67fbb5e581b8bd45f5b2b7
[ "BSD-3-Clause" ]
null
null
null
fishingapp_backend/foundation/admin.py
Jimmyjtc001/fishingapp-backend
653ab1b1d61f43a84a67fbb5e581b8bd45f5b2b7
[ "BSD-3-Clause" ]
null
null
null
fishingapp_backend/foundation/admin.py
Jimmyjtc001/fishingapp-backend
653ab1b1d61f43a84a67fbb5e581b8bd45f5b2b7
[ "BSD-3-Clause" ]
null
null
null
from django.contrib import admin from foundation.models import SearchElement, Favorite, FishingSpot # Register your models here. admin.site.register(SearchElement) admin.site.register(Favorite) admin.site.register(FishingSpot)
23
66
0.830435
28
230
6.821429
0.5
0.141361
0.267016
0
0
0
0
0
0
0
0
0
0.091304
230
9
67
25.555556
0.913876
0.113043
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
109a6ec32938faa8e97c7120b7dba3ae0309bc00
272
py
Python
src/h03_bert_surprisal/data_parallel.py
tpimentelms/lexical-ambiguity-in-context
5277b9e0f1a846b5fe93eeba1cf37de2d48cfc62
[ "MIT" ]
null
null
null
src/h03_bert_surprisal/data_parallel.py
tpimentelms/lexical-ambiguity-in-context
5277b9e0f1a846b5fe93eeba1cf37de2d48cfc62
[ "MIT" ]
null
null
null
src/h03_bert_surprisal/data_parallel.py
tpimentelms/lexical-ambiguity-in-context
5277b9e0f1a846b5fe93eeba1cf37de2d48cfc62
[ "MIT" ]
null
null
null
import torch.nn as nn class TransparentDataParallel(nn.DataParallel): def save(self, *args, **kwargs): return self.module.save(*args, **kwargs) def get_target_tensor(self, *args, **kwargs): return self.module.get_target_tensor(*args, **kwargs)
24.727273
61
0.6875
35
272
5.228571
0.485714
0.218579
0.153005
0.218579
0.327869
0.327869
0
0
0
0
0
0
0.176471
272
10
62
27.2
0.816964
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.166667
0.333333
1
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
109bc742fc9dcdcf36103957408ed6b8f5f00494
182
py
Python
src/__init__.py
ASH1998/SuZu
d925b54d990d2dee75e60bb26adb57afd089b4a5
[ "Apache-2.0" ]
2
2019-10-02T07:18:59.000Z
2019-10-02T07:19:43.000Z
src/__init__.py
ASH1998/SuZu
d925b54d990d2dee75e60bb26adb57afd089b4a5
[ "Apache-2.0" ]
null
null
null
src/__init__.py
ASH1998/SuZu
d925b54d990d2dee75e60bb26adb57afd089b4a5
[ "Apache-2.0" ]
null
null
null
from src.SuzuException.CustomExceptions import NotCompatibleException from src.utils.addpackages import all_from from src.voices.voicetype_1 import * from src.voices.record import *
36.4
69
0.857143
24
182
6.416667
0.541667
0.181818
0.168831
0
0
0
0
0
0
0
0
0.006024
0.087912
182
5
70
36.4
0.921687
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
109eeeb95636c3d1d4cbfb0c91fe06df53e3e037
3,065
py
Python
crop/tomato/electron_transport.py
confused0wl/CEAOS
1b5efe980d02c319b0f052252ecf88bc363d8e98
[ "MIT" ]
null
null
null
crop/tomato/electron_transport.py
confused0wl/CEAOS
1b5efe980d02c319b0f052252ecf88bc363d8e98
[ "MIT" ]
null
null
null
crop/tomato/electron_transport.py
confused0wl/CEAOS
1b5efe980d02c319b0f052252ecf88bc363d8e98
[ "MIT" ]
null
null
null
import math from ...constants import * from .utils import leaf_area_index from .tomato_constants import * def electron_transport(carbohydrate_amount_Leaf, canopy_t, PAR_Canopy): """ Equation 9.14 electron_transport_rate = (potential_electron_transport_rate + PHOTONS_TO_ELECTRONS_CONVERSION_FACTOR * canopy_PAR_absorbed - sqrt((potential_electron_transport_rate + PHOTONS_TO_ELECTRONS_CONVERSION_FACTOR * canopy_PAR_absorbed)**2 - 4 * ELECTRON_TRANSPORT_RATE_CURVATURE * potential_electron_transport_rate * PHOTONS_TO_ELECTRONS_CONVERSION_FACTOR * canopy_PAR_absorbed)) \ /(2 * ELECTRON_TRANSPORT_RATE_CURVATURE) Returns: electron transport rate [µmol {e-} m^-2 s^-1] """ potential_electron_transport_rate = potential_electron_transport(carbohydrate_amount_Leaf, canopy_t) return (potential_electron_transport_rate + PHOTONS_TO_ELECTRONS_CONVERSION_FACTOR * PAR_Canopy - math.sqrt((potential_electron_transport_rate + PHOTONS_TO_ELECTRONS_CONVERSION_FACTOR * PAR_Canopy) ** 2 - 4 * ELECTRON_TRANSPORT_RATE_CURVATURE * potential_electron_transport_rate * PHOTONS_TO_ELECTRONS_CONVERSION_FACTOR * PAR_Canopy)) \ / (2 * ELECTRON_TRANSPORT_RATE_CURVATURE) def potential_electron_transport(carbohydrate_amount_Leaf, canopy_t): """ Equation 9.15 potential_electron_transport_rate = max_electron_transport_rate_at_25 * math.exp(ACTIVATION_ENERGY_JPOT * (reference_canopy_t - REFERENCE_TEMPERATURE_JPOT)/(M_GAS*reference_canopy_t*REFERENCE_TEMPERATURE_JPOT))) * (1+math.exp((ENTROPY_TERM_JPOT * REFERENCE_TEMPERATURE_JPOT - DEACTIVATION_ENERGY_JPOT)/(M_GAS*REFERENCE_TEMPERATURE_JPOT))) / (1+math.exp((ENTROPY_TERM_JPOT * reference_canopy_t - DEACTIVATION_ENERGY_JPOT)/(M_GAS*reference_canopy_t))) Returns: potential electron transport rate[µmol {e-} m^-2 s^-1] """ reference_canopy_t = canopy_t + 273.15 max_canopy_electron_transport_rate_at_25 = max_canopy_electron_transport_at_25(carbohydrate_amount_Leaf) return max_canopy_electron_transport_rate_at_25 \ * math.exp(ACTIVATION_ENERGY_JPOT * (reference_canopy_t - REFERENCE_TEMPERATURE_JPOT)/(M_GAS*reference_canopy_t*REFERENCE_TEMPERATURE_JPOT)) \ * (1+math.exp((ENTROPY_TERM_JPOT * REFERENCE_TEMPERATURE_JPOT - DEACTIVATION_ENERGY_JPOT)/(M_GAS*REFERENCE_TEMPERATURE_JPOT))) \ / (1+math.exp((ENTROPY_TERM_JPOT * reference_canopy_t - DEACTIVATION_ENERGY_JPOT)/(M_GAS*reference_canopy_t))) def max_canopy_electron_transport_at_25(carbohydrate_amount_Leaf): """ Equation 9.16 max_electron_transport_rate_at_25 = LAI * MAX_LEAF_ELECTRON_TRANSPORT_RATE Returns: maximum rate of electron transport at 25°C for the canopy [µmol {e-} m^-2 s^-1] """ return leaf_area_index(carbohydrate_amount_Leaf) * MAX_LEAF_ELECTRON_TRANSPORT_RATE
54.732143
140
0.737357
374
3,065
5.516043
0.165775
0.222492
0.213766
0.130877
0.836161
0.779932
0.740184
0.697043
0.643723
0.564227
0
0.017706
0.189233
3,065
55
141
55.727273
0.812072
0.438173
0
0
0
0
0
0
0
0
0
0
0
1
0.142857
false
0
0.190476
0
0.47619
0
0
0
0
null
1
1
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
10a2648b858ab36cb07f0e3428053d183c44e402
315
py
Python
project/models.py
adhesivecheese/minimal-flask-praw-oauth
aa40c3aa344853c9610384f61a445a6c77d5f532
[ "BSD-3-Clause" ]
null
null
null
project/models.py
adhesivecheese/minimal-flask-praw-oauth
aa40c3aa344853c9610384f61a445a6c77d5f532
[ "BSD-3-Clause" ]
null
null
null
project/models.py
adhesivecheese/minimal-flask-praw-oauth
aa40c3aa344853c9610384f61a445a6c77d5f532
[ "BSD-3-Clause" ]
1
2021-10-29T18:41:22.000Z
2021-10-29T18:41:22.000Z
from flask_login import UserMixin from . import db class User(UserMixin, db.Model): id = db.Column(db.Integer, primary_key=True) # primary keys are required by SQLAlchemy password = db.Column(db.String(100)) name = db.Column(db.String(20)) token = db.Column(db.String(1000)) state = db.Column(db.String(1000))
35
87
0.742857
51
315
4.54902
0.54902
0.172414
0.215517
0.275862
0.172414
0
0
0
0
0
0
0.047101
0.12381
315
9
88
35
0.793478
0.12381
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0.125
0.25
0
1
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
1
0
0
1
0
0
5
5e19b8ecdede2b45735f79074eef3b8fb248eefa
198
py
Python
lyricnommer/exceptions.py
mtsev/lyric-nommer
eafc1bedaab2143142bf23498221ca452e0119f9
[ "MIT" ]
1
2019-04-04T17:16:48.000Z
2019-04-04T17:16:48.000Z
lyricnommer/exceptions.py
mtsev/lyric-nommer
eafc1bedaab2143142bf23498221ca452e0119f9
[ "MIT" ]
null
null
null
lyricnommer/exceptions.py
mtsev/lyric-nommer
eafc1bedaab2143142bf23498221ca452e0119f9
[ "MIT" ]
null
null
null
class LyricsNotFoundError(Exception): pass class ExistingLyricsError(Exception): pass class UnsupportedTypeError(Exception): pass class UnknownTypeError(Exception): pass
18
39
0.737374
16
198
9.125
0.4375
0.356164
0.369863
0
0
0
0
0
0
0
0
0
0.20202
198
11
40
18
0.924051
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
1
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
1
0
0
0
0
0
5
eaaeda030286ea34ca2e7909011bd382f5053032
6,849
py
Python
webstruct/tests/test_loaders.py
vishalbelsare/webstruct
628c8c2d61fa95193087366c400ce29213fc337f
[ "MIT" ]
210
2015-01-06T01:37:28.000Z
2022-03-30T10:44:31.000Z
webstruct/tests/test_loaders.py
vishalbelsare/webstruct
628c8c2d61fa95193087366c400ce29213fc337f
[ "MIT" ]
43
2015-02-05T05:49:53.000Z
2021-09-02T10:27:24.000Z
webstruct/tests/test_loaders.py
vishalbelsare/webstruct
628c8c2d61fa95193087366c400ce29213fc337f
[ "MIT" ]
60
2015-02-13T10:15:58.000Z
2022-02-26T07:54:03.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import import os import lxml.html from webstruct import WebAnnotatorLoader from webstruct import HtmlTokenizer def test_wa_loader(): ld = WebAnnotatorLoader() tree = ld.load(os.path.join(os.path.dirname(__file__), 'data', 'wa1.html')) res = lxml.html.tostring(tree) assert b"<p> __START_ORG__ Scrapinghub __END_ORG__ has an <b>office</b> in __START_CITY__ Montevideo __END_CITY__ </p>" in res, res assert b"wa-" not in res, res assert b"WA-" not in res, res assert b"base href" in res, res def test_wa_loader_None_bug(): ld = WebAnnotatorLoader() tree = ld.load(os.path.join(os.path.dirname(__file__), 'data', 'wa2.html')) res = lxml.html.tostring(tree) assert b'<em>Inc.</em> __END_ORG__ </p>' in res, res def test_wa_loader_with_known_entities(): loader = WebAnnotatorLoader(known_entities={'ORG'}) html = b"<html><body><p><span wa-subtypes='' wa-id='227' wa-type='ORG' class='WebAnnotator_org'>Scrapinghub</span> has an <b>office</b> in <span wa-subtypes='' wa-id='228' wa-type='CITY' class='WebAnnotator_org'>Montevideo</span></p></body></html>" tree = loader.loadbytes(html) res = lxml.html.tostring(tree) assert b'<html><body><p> __START_ORG__ Scrapinghub __END_ORG__ has an <b>office</b> in Montevideo</p></body></html>' in res def _assert_entities(fragment, known_entities, expected): ld = WebAnnotatorLoader(known_entities=known_entities) tree = ld.loadbytes(fragment) tokenizer = HtmlTokenizer() html_tokens, tags = tokenizer.tokenize_single(tree) tokens = [html_token.token for html_token in html_tokens] assert expected == dict([(token, tag) for token, tag in zip(tokens, tags) if tag != 'O']) def test_wa_nested_fragment(): fragment = """ <div class="copyright">Copyright © 2013 <span style="color: rgb(0, 0, 0); background-color: rgb(255, 0, 0); text-decoration: none;" wa-subtypes="" wa-id="227" wa-type="org" class="WebAnnotator_org">Weatherseal Spray Foam.</span> All Rights Reserved.<br> Website Designed by <a wa_temp_href="http://www.western-webs.com" target="_blank" title="www.western-webs.com">Western-Webs</a>, <a wa_temp_href="http://tuam.galway-ireland.ie" target="_blank" title="http://tuam.galway-ireland.ie"><span style="color: rgb(0, 0, 0); background-color: rgb(51, 204, 255); text-decoration: none;" wa-subtypes="" wa-id="2010" wa-type="city" class="WebAnnotator_city"><span style="color: rgb(255, 255, 255); background-color: rgb(102, 51, 102); text-decoration: none;" wa-subtypes="" wa-id="2011" wa-type="addr" class="WebAnnotator_addr">Tuam</span></span></a><span style="color: rgb(255, 255, 255); background-color: rgb(102, 51, 102); text-decoration: none;" wa-subtypes="" wa-id="2011" wa-type="addr" class="WebAnnotator_addr">, </span><a wa_temp_href="http://www.galway-ireland.ie" target="_blank" title="www.galway-ireland.ie/"><span style="color: rgb(0, 0, 0); background-color: rgb(255, 0, 0); text-decoration: none;" wa-subtypes="" wa-id="2009" wa-type="state" class="WebAnnotator_state"><span style="color: rgb(255, 255, 255); background-color: rgb(102, 51, 102); text-decoration: none;" wa-subtypes="" wa-id="2011" wa-type="addr" class="WebAnnotator_addr">County Galway</span></span></a><span style="color: rgb(255, 255, 255); background-color: rgb(102, 51, 102); text-decoration: none;" wa-subtypes="" wa-id="2011" wa-type="addr" class="WebAnnotator_addr">,</span> <a wa_temp_href="http://www.ebookireland.com" target="_blank" title="www.ebookireland.com"><span style="color: rgb(0, 0, 0); background-color: rgb(255, 153, 0); text-decoration: none;" wa-subtypes="" wa-id="2008" wa-type="country" class="WebAnnotator_country"><span style="color: rgb(255, 255, 255); background-color: rgb(102, 51, 102); text-decoration: none;" wa-subtypes="" wa-id="2011" wa-type="addr" class="WebAnnotator_addr"> Ireland</span></span></a></div> """ expected1 = {'Tuam': 'B-city', 'County': 'B-state', 'Galway': 'I-state', 'Ireland': 'B-country'} expected2 = {'Tuam': 'B-addr', 'County': 'I-addr', 'Galway': 'I-addr', 'Ireland': 'I-addr'} _assert_entities(fragment, {'city', 'state', 'country', 'street'}, expected1) _assert_entities(fragment, {'addr'}, expected2) # same as fragment but labeled in different order with WA fragment2 = """ <div class="copyright">Copyright © 2013 <span style="color: rgb(0, 0, 0); background-color: rgb(255, 0, 0); text-decoration: none;" wa-subtypes="" wa-id="227" wa-type="org" class="WebAnnotator_org">Weatherseal Spray Foam.</span> All Rights Reserved.<br> Website Designed by <a wa_temp_href="http://www.western-webs.com" target="_blank" title="www.western-webs.com">Western-Webs</a>, <a wa_temp_href="http://tuam.galway-ireland.ie" target="_blank" title="http://tuam.galway-ireland.ie"><span style="color: rgb(255, 255, 255); background-color: rgb(102, 51, 102); text-decoration: none;" wa-subtypes="" wa-id="2012" wa-type="addr" class="WebAnnotator_addr"><span style="color: rgb(0, 0, 0); background-color: rgb(51, 204, 255); text-decoration: none;" wa-subtypes="" wa-id="2013" wa-type="city" class="WebAnnotator_city">Tuam</span></span></a><span style="color: rgb(255, 255, 255); background-color: rgb(102, 51, 102); text-decoration: none;" wa-subtypes="" wa-id="2012" wa-type="addr" class="WebAnnotator_addr">, <span style="color: rgb(0, 0, 0); background-color: rgb(255, 0, 0); text-decoration: none;" wa-subtypes="" wa-id="2014" wa-type="state" class="WebAnnotator_state"> </span></span><a wa_temp_href="http://www.galway-ireland.ie" target="_blank" title="www.galway-ireland.ie/"><span style="color: rgb(255, 255, 255); background-color: rgb(102, 51, 102); text-decoration: none;" wa-subtypes="" wa-id="2012" wa-type="addr" class="WebAnnotator_addr"><span style="color: rgb(0, 0, 0); background-color: rgb(255, 0, 0); text-decoration: none;" wa-subtypes="" wa-id="2014" wa-type="state" class="WebAnnotator_state">County Galway</span></span></a><span style="color: rgb(255, 255, 255); background-color: rgb(102, 51, 102); text-decoration: none;" wa-subtypes="" wa-id="2012" wa-type="addr" class="WebAnnotator_addr">,</span> <a wa_temp_href="http://www.ebookireland.com" target="_blank" title="www.ebookireland.com"><span style="color: rgb(255, 255, 255); background-color: rgb(102, 51, 102); text-decoration: none;" wa-subtypes="" wa-id="2012" wa-type="addr" class="WebAnnotator_addr"><span style="color:#000000; background-color:#FF9900;" wa-subtypes="" wa-id="2015" wa-type="country" class="WebAnnotator_country"> Ireland</span></span></a></div>""" _assert_entities(fragment2, {'city', 'state', 'country', 'street'}, expected1) _assert_entities(fragment2, {'addr'}, expected2)
96.464789
829
0.690028
1,036
6,849
4.442085
0.138031
0.062581
0.054759
0.063885
0.782486
0.763581
0.730769
0.693177
0.663842
0.663842
0
0.058076
0.115053
6,849
70
830
97.842857
0.700874
0.011243
0
0.176471
0
0.254902
0.761412
0.180381
0
0
0
0
0.235294
1
0.098039
false
0
0.098039
0
0.196078
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
eab6f458ca8fec1225269d4361efa8ff2b22bb25
1,024
py
Python
cowsay/lib/cows/hypno.py
Ovlic/cowsay_py
1ee8d11d6d895d7695d57e26003d71ce18379d3b
[ "MIT" ]
null
null
null
cowsay/lib/cows/hypno.py
Ovlic/cowsay_py
1ee8d11d6d895d7695d57e26003d71ce18379d3b
[ "MIT" ]
null
null
null
cowsay/lib/cows/hypno.py
Ovlic/cowsay_py
1ee8d11d6d895d7695d57e26003d71ce18379d3b
[ "MIT" ]
null
null
null
def Hypno(thoughts, eyes, eye, tongue): return f""" {thoughts} ___ _--_ / - / \\ ( {eyes} \\ ( {eyes} ) | {eyes} _;\\-/| {eyes} _| \\___/######\\___/\\ /##############\\ / ###### ## #| / ##@##@## | / ###### ## \\ <______-------___\\ . //_ | ____ | | //# \\__~__ \\ {tongue} \\ //### \\ \\ | /\' ## ## ##\\ __--~--_ \\_________- /\\ ) ^ ##|--########\\ /--~-_\\________/_ | #@##|#######Y##| | \\ \` /| /O/ ( ### \') ##/######/###/ \\ \\ | | -- | ### /LLLLL--###/ \\_ \\/ | \\_ \\ ) /####_____-- ___ / \\ / | _-####\\ (___/ -\\_________/ / -- |#####@@@@@@\'_ (__\\_ __,) (.___ ,/ /##### \`@@ | -\\\\- //-// @@ @@@@@. | | \\\\_ _// // @\' \'@@. (.) \\_) / / // @@@ (_) (_\' """
35.310345
51
0.15918
17
1,024
4.294118
0.647059
0.328767
0.328767
0
0
0
0
0
0
0
0
0
0.466797
1,024
29
52
35.310345
0.1337
0
0
0
0
0
0.94439
0
0
0
0
0
0
1
0.034483
false
0
0
0.034483
0.068966
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
eacd372cb693bcda445c8503ac0a6457b862edfb
5,528
py
Python
src/mnist_base.py
ozansener/egocentric-object
ea7cd43e2e795f16dd3df80843b11f0e6443839d
[ "MIT" ]
null
null
null
src/mnist_base.py
ozansener/egocentric-object
ea7cd43e2e795f16dd3df80843b11f0e6443839d
[ "MIT" ]
null
null
null
src/mnist_base.py
ozansener/egocentric-object
ea7cd43e2e795f16dd3df80843b11f0e6443839d
[ "MIT" ]
null
null
null
import tensorflow.python.platform import tensorflow as tf def placeholder_inputs(): # this function returns the placeholders for training images_placeholder = tf.placeholder("float", shape=([None, 28*28])) labels_placeholder = tf.placeholder("float", shape=([None, 10])) keep_prob = tf.placeholder("float") return images_placeholder, labels_placeholder, keep_prob def fill_feed_dict(data_set, images_pl, labels_pl, kp, batch_size): """Fills the feed_dict for training the given step. A feed_dict takes the form of: feed_dict = { <placeholder>: <tensor of values to be passed for placeholder>, .... } Args: data_set: The set of images and labels, from input_data.read_data_sets() images_pl: The images placeholder, from placeholder_inputs(). labels_pl: The labels placeholder, from placeholder_inputs(). Returns: feed_dict: The feed dictionary mapping from placeholders to values. """ batch = data_set.train.next_batch(batch_size) feed_dict = { images_pl: batch[0], labels_pl: batch[1], kp: 0.5, } return feed_dict def conv2d(x, W): return tf.nn.conv2d(x, W, strides=[1, 1, 1, 1], padding='SAME') def max_pool_2x2(x): return tf.nn.max_pool(x, ksize=[1, 2, 2, 1], strides=[1, 2, 2, 1], padding='SAME') def inference(input_image, keep_prob): with tf.variable_scope('conv1') as scope: weights = tf.get_variable("weights", shape=[5,5,1,32],initializer=tf.truncated_normal_initializer(stddev = 0.1)) biases = tf.get_variable('biases', shape=[32],initializer=tf.constant_initializer(0.1)) x_image = tf.reshape(input_image, [-1,28,28,1]) hidden_c1 = tf.nn.relu(conv2d(x_image, weights)+biases) hidden_pool1 = max_pool_2x2(hidden_c1) scope.reuse_variables() with tf.variable_scope('conv2') as scope: weights = tf.get_variable("weights", shape=[5,5,32,64],initializer=tf.truncated_normal_initializer(stddev = 0.1)) biases = tf.get_variable('biases', shape=[64],initializer=tf.constant_initializer(0.1)) hidden_c2 = tf.nn.relu(conv2d(hidden_pool1, weights)+biases) hidden_pool2 = max_pool_2x2(hidden_c2) scope.reuse_variables() with tf.variable_scope('fully_connected') as scope: weights = tf.get_variable("weights", shape=[7*7*64, 1024],initializer=tf.truncated_normal_initializer(stddev = 0.1)) biases = tf.get_variable('biases', shape=[1024],initializer=tf.constant_initializer(0.1)) hidden_pool2_flat = tf.reshape(hidden_pool2, [-1, 7*7*64]) hidden_fc1 = tf.nn.relu(tf.matmul(hidden_pool2_flat, weights)+biases) # Add dropout hidden_fc1_drop = tf.nn.dropout(hidden_fc1, keep_prob) scope.reuse_variables() with tf.variable_scope('softmax') as scope: weights = tf.get_variable("weights", shape=[1024, 10],initializer=tf.truncated_normal_initializer(stddev = 0.1)) biases = tf.get_variable('biases', shape=[10],initializer=tf.constant_initializer(0.1)) y_out = tf.nn.softmax(tf.matmul(hidden_fc1_drop, weights)+biases) scope.reuse_variables() return hidden_fc1, y_out def inference_reuse(input_image, keep_prob): with tf.variable_scope('conv1', reuse=True) as scope: weights = tf.get_variable("weights", shape=[5,5,1,32],initializer=tf.truncated_normal_initializer(stddev = 0.1)) biases = tf.get_variable('biases', shape=[32],initializer=tf.constant_initializer(0.1)) x_image = tf.reshape(input_image, [-1,28,28,1]) hidden_c1 = tf.nn.relu(conv2d(x_image, weights)+biases) hidden_pool1 = max_pool_2x2(hidden_c1) scope.reuse_variables() with tf.variable_scope('conv2', reuse=True) as scope: weights = tf.get_variable("weights", shape=[5,5,32,64],initializer=tf.truncated_normal_initializer(stddev = 0.1)) biases = tf.get_variable('biases', shape=[64],initializer=tf.constant_initializer(0.1)) hidden_c2 = tf.nn.relu(conv2d(hidden_pool1, weights)+biases) hidden_pool2 = max_pool_2x2(hidden_c2) scope.reuse_variables() with tf.variable_scope('fully_connected', reuse=True) as scope: weights = tf.get_variable("weights", shape=[7*7*64, 1024],initializer=tf.truncated_normal_initializer(stddev = 0.1)) biases = tf.get_variable('biases', shape=[1024],initializer=tf.constant_initializer(0.1)) hidden_pool2_flat = tf.reshape(hidden_pool2, [-1, 7*7*64]) hidden_fc1 = tf.nn.relu(tf.matmul(hidden_pool2_flat, weights)+biases) # Add dropout hidden_fc1_drop = tf.nn.dropout(hidden_fc1, keep_prob) scope.reuse_variables() with tf.variable_scope('softmax', reuse=True) as scope: weights = tf.get_variable("weights", shape=[1024, 10],initializer=tf.truncated_normal_initializer(stddev = 0.1)) biases = tf.get_variable('biases', shape=[10],initializer=tf.constant_initializer(0.1)) y_out = tf.nn.softmax(tf.matmul(hidden_fc1_drop, weights)+biases) scope.reuse_variables() return hidden_fc1, y_out def loss(y_gt, y_out): return -tf.reduce_sum(y_gt*tf.log(y_out)) def acc(y_gt, y_out): correct_prediction = tf.equal(tf.argmax(y_out,1), tf.argmax(y_gt,1)) accuracy = tf.reduce_mean(tf.cast(correct_prediction, "float")) return accuracy
42.852713
132
0.6733
779
5,528
4.562259
0.160462
0.02251
0.058526
0.042769
0.722003
0.722003
0.700619
0.700619
0.700619
0.676984
0
0.044665
0.198082
5,528
128
133
43.1875
0.757049
0.097685
0
0.55
0
0
0.039773
0
0
0
0
0
0
1
0.1
false
0
0.025
0.0375
0.225
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
eafe15305af97eb1fc04f8f8772d373f4ed755bb
928
py
Python
test_re_ler.py
LhTaira/ruspy
973039329f67cae961b93e4ccba73f67306f27a6
[ "MIT" ]
null
null
null
test_re_ler.py
LhTaira/ruspy
973039329f67cae961b93e4ccba73f67306f27a6
[ "MIT" ]
null
null
null
test_re_ler.py
LhTaira/ruspy
973039329f67cae961b93e4ccba73f67306f27a6
[ "MIT" ]
null
null
null
""" # re-ler Compreender e elicitar a linguagem gerada por expressões regulares simples. * Identificar exemplos clássicos de linguagens regulares escritas como regex. * Identificar exemplos simples gerados pela combinação de 2 a 3 operadores. ---- Para provar a competência, resolva 3 problemas dentro das categorias "intermediate" ou "experienced" do site Regex Crosswords (https://regexcrossword.com/challenges/intermediate/puzzles/1). Salve o resultado num dicionário como abaixo REGEX_CROSSWORDS = [ "intermediate/puzzles/X": "RESPOSTA-X", "intermediate/puzzles/Y": "RESPOSTA-Y", "intermediate/puzzles/Z": "RESPOSTA-Z", ] As chaves do dicionário são a parte da URL após https://regexcrossword.com/challenges/. Também funciona se incluir a URL completa. """ import pytest def test_palavras_cruzadas(): pytest.skip("pensando em um modo de corrigir sem revelar as respostas...")
30.933333
121
0.747845
119
928
5.806723
0.697479
0.109986
0.063676
0.092619
0
0
0
0
0
0
0
0.005155
0.163793
928
29
122
32
0.885309
0.855603
0
0
0
0
0.468254
0
0
0
0
0
0
1
0.333333
true
0
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
1
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
1
0
0
5
d8170bda6ca3b6c8de2d9b2c4b60b69fe35e11d5
452
py
Python
ctpbee/blueprint.py
zhengquantao/ctpbee
3111104b47635608a1b185ac675e5e237bbb54d0
[ "MIT" ]
3
2019-09-17T01:06:22.000Z
2019-11-04T02:04:19.000Z
ctpbee/blueprint.py
zhengquantao/ctpbee
3111104b47635608a1b185ac675e5e237bbb54d0
[ "MIT" ]
1
2019-11-06T05:36:01.000Z
2019-11-06T05:36:01.000Z
ctpbee/blueprint.py
zhengquantao/ctpbee
3111104b47635608a1b185ac675e5e237bbb54d0
[ "MIT" ]
null
null
null
""" Here are the blueprint module /这里是蓝图模块 """ class BluePrint: """ 实现一个类似与CtpBee的管理机制 从而实现分组 """ def __init__(self, info, mode, group, action_class, logger_class, refresh): pass def add_extension(self, extension): pass def suspend_extension(self, extension_name): pass def enable_extension(self, extension_name): pass def delete_extension(self, extension_name): pass
18.08
79
0.641593
49
452
5.653061
0.510204
0.101083
0.31769
0.281588
0.34657
0.238267
0
0
0
0
0
0
0.272124
452
24
80
18.833333
0.841945
0.141593
0
0.454545
0
0
0
0
0
0
0
0
0
1
0.454545
false
0.454545
0
0
0.545455
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
1
0
0
1
0
0
5
dc37bfa53f9d6ff9c18a05b546db7e8e0e41c3d1
40
py
Python
utils/osm/db/__init__.py
OpenGridMap/power-grid-detection
221fcf0461dc869c8c64b11fa48596f83c20e1c8
[ "Apache-2.0" ]
null
null
null
utils/osm/db/__init__.py
OpenGridMap/power-grid-detection
221fcf0461dc869c8c64b11fa48596f83c20e1c8
[ "Apache-2.0" ]
1
2018-07-22T22:43:27.000Z
2018-07-22T22:43:27.000Z
utils/osm/db/__init__.py
OpenGridMap/power-grid-detection
221fcf0461dc869c8c64b11fa48596f83c20e1c8
[ "Apache-2.0" ]
null
null
null
# from models import db, Tag, DataPoint
20
39
0.75
6
40
5
1
0
0
0
0
0
0
0
0
0
0
0
0.175
40
1
40
40
0.909091
0.925
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
dc401e7797e7603341f0277261241bc10a07e1eb
138
py
Python
src/aiida_ro_crate/cli/__init__.py
sphuber/aiida-rocrate
1bce832be7ef7b6f03b2d2c682df9b0d3e9b24af
[ "MIT" ]
null
null
null
src/aiida_ro_crate/cli/__init__.py
sphuber/aiida-rocrate
1bce832be7ef7b6f03b2d2c682df9b0d3e9b24af
[ "MIT" ]
null
null
null
src/aiida_ro_crate/cli/__init__.py
sphuber/aiida-rocrate
1bce832be7ef7b6f03b2d2c682df9b0d3e9b24af
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Command line interface for ``aiida-ro-crate``.""" from .cli import cmd_root from .cmd_export import cmd_export
27.6
52
0.695652
21
138
4.428571
0.761905
0.193548
0
0
0
0
0
0
0
0
0
0.008333
0.130435
138
4
53
34.5
0.766667
0.5
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
dc6299c69fce102da1cf15fc4e071d3eaecbd423
42
py
Python
conftest.py
valohai/openssh-key
84c04540bb7d3bd18697d614770bfcedd36f7611
[ "MIT" ]
1
2021-10-09T13:53:33.000Z
2021-10-09T13:53:33.000Z
conftest.py
valohai/openssh-key
84c04540bb7d3bd18697d614770bfcedd36f7611
[ "MIT" ]
2
2019-02-12T16:00:23.000Z
2019-03-29T13:50:11.000Z
conftest.py
valohai/openssh-key
84c04540bb7d3bd18697d614770bfcedd36f7611
[ "MIT" ]
1
2020-11-19T18:33:21.000Z
2020-11-19T18:33:21.000Z
# Here to make py.test's discovery happy.
21
41
0.738095
8
42
3.875
1
0
0
0
0
0
0
0
0
0
0
0
0.166667
42
1
42
42
0.885714
0.928571
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
dc6935ba60647d6717c15e16a7e91dc1a6a08936
58
py
Python
covid19/__init__.py
RasmusAntons/covid-19
f287f8baf7915f925b4f4838b55e45f49ae71d32
[ "MIT" ]
null
null
null
covid19/__init__.py
RasmusAntons/covid-19
f287f8baf7915f925b4f4838b55e45f49ae71d32
[ "MIT" ]
null
null
null
covid19/__init__.py
RasmusAntons/covid-19
f287f8baf7915f925b4f4838b55e45f49ae71d32
[ "MIT" ]
null
null
null
from covid19.run import main as data from covid19 import *
29
36
0.810345
10
58
4.7
0.7
0.468085
0
0
0
0
0
0
0
0
0
0.081633
0.155172
58
2
37
29
0.877551
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
dc701ac868fd6af0421199a663ef9e176ff4d4e5
151
py
Python
OpenGLCffi/GLES1/EXT/OES/point_size_array.py
cydenix/OpenGLCffi
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
[ "MIT" ]
null
null
null
OpenGLCffi/GLES1/EXT/OES/point_size_array.py
cydenix/OpenGLCffi
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
[ "MIT" ]
null
null
null
OpenGLCffi/GLES1/EXT/OES/point_size_array.py
cydenix/OpenGLCffi
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
[ "MIT" ]
null
null
null
from OpenGLCffi.GLES1 import params @params(api='gles1', prms=['type', 'stride', 'pointer']) def glPointSizePointerOES(type, stride, pointer): pass
21.571429
56
0.735099
18
151
6.166667
0.722222
0.18018
0.306306
0
0
0
0
0
0
0
0
0.014815
0.10596
151
6
57
25.166667
0.807407
0
0
0
0
0
0.147651
0
0
0
0
0
0
1
0.25
false
0.25
0.25
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
5
dc8682b8b53bda86f3866cf2b70a380582957f80
173
py
Python
hello_django/core/views.py
pythonLearningCode/helloDjango
de695906de1ffdeff3ac20379fe01e5643da67f7
[ "MIT" ]
null
null
null
hello_django/core/views.py
pythonLearningCode/helloDjango
de695906de1ffdeff3ac20379fe01e5643da67f7
[ "MIT" ]
null
null
null
hello_django/core/views.py
pythonLearningCode/helloDjango
de695906de1ffdeff3ac20379fe01e5643da67f7
[ "MIT" ]
null
null
null
from django.shortcuts import render, HttpResponse # Create your views here. def hello(request, name, age): return HttpResponse(f'<h1>Hello {name} de {age} anos </h1>')
28.833333
64
0.722543
25
173
5
0.8
0
0
0
0
0
0
0
0
0
0
0.013605
0.150289
173
6
64
28.833333
0.836735
0.132948
0
0
0
0
0.241611
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0.333333
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
0
0
0
5
dc92a191702c6a8c25f1e5820dd6e1ecb892ab8b
41
py
Python
tests/__init__.py
s-weigand/zenodo-cite
14017d7a78c93211e85ad4686fa97d6ef8c11d39
[ "Apache-2.0" ]
null
null
null
tests/__init__.py
s-weigand/zenodo-cite
14017d7a78c93211e85ad4686fa97d6ef8c11d39
[ "Apache-2.0" ]
1
2020-10-11T17:38:11.000Z
2020-10-11T17:38:11.000Z
tests/__init__.py
s-weigand/zenodo-cite
14017d7a78c93211e85ad4686fa97d6ef8c11d39
[ "Apache-2.0" ]
null
null
null
"""Unit test package for zenodo_cite."""
20.5
40
0.707317
6
41
4.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.121951
41
1
41
41
0.777778
0.829268
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
f4a9d76e58667a9e7503ff772d8f0954df046532
36,143
py
Python
python/tests/selfsigned.py
FrancoisPoinsot/emissary
2bc0fe245495cbfb7f5cb3e2fc75d28769fb698a
[ "Apache-2.0" ]
null
null
null
python/tests/selfsigned.py
FrancoisPoinsot/emissary
2bc0fe245495cbfb7f5cb3e2fc75d28769fb698a
[ "Apache-2.0" ]
1
2022-02-14T02:34:21.000Z
2022-02-14T02:34:21.000Z
python/tests/selfsigned.py
FrancoisPoinsot/emissary
2bc0fe245495cbfb7f5cb3e2fc75d28769fb698a
[ "Apache-2.0" ]
null
null
null
# Code generated by selfsigned.py.gen. DO NOT EDIT. from base64 import b64encode from typing import Dict, List, NamedTuple, Optional class Cert(NamedTuple): names: List[str] pubcert: str privkey: str @property def k8s_crt(self) -> str: return b64encode((self.pubcert+"\n").encode('utf-8')).decode('utf-8') @property def k8s_key(self) -> str: return b64encode((self.privkey+"\n").encode('utf-8')).decode('utf-8') def strip(s: str) -> str: return "\n".join(l.strip() for l in s.split("\n") if l.strip()) _TLSCerts: List[Cert] = [ Cert( names=["master.datawire.io"], # Note: This cert is also used to sign several other certs in # this file (as the issuer). pubcert=strip(""" -----BEGIN CERTIFICATE----- MIID8zCCAtugAwIBAgIRAIBtMsh/xwUcw6m3hSPuJP4wDQYJKoZIhvcNAQELBQAw eDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAk1BMQ8wDQYDVQQHEwZCb3N0b24xGDAW BgNVBAoTD0FtYmFzc2Fkb3IgTGFiczEUMBIGA1UECxMLRW5naW5lZXJpbmcxGzAZ BgNVBAMTEm1hc3Rlci5kYXRhd2lyZS5pbzAgFw0yMTExMTAxMzEyMDBaGA8yMDk5 MTExMDEzMTIwMFoweDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAk1BMQ8wDQYDVQQH EwZCb3N0b24xGDAWBgNVBAoTD0FtYmFzc2Fkb3IgTGFiczEUMBIGA1UECxMLRW5n aW5lZXJpbmcxGzAZBgNVBAMTEm1hc3Rlci5kYXRhd2lyZS5pbzCCASIwDQYJKoZI hvcNAQEBBQADggEPADCCAQoCggEBAL+CoQfKiZmfRd3SkuPUW5nh/CU26owzuUjC 75PxuOuOzb/UD+gml2nlSGnRi09PfNsqbLBXdON9YDOkb9sxB85l2wW1+so295Kr qd8Vn5U6oa5MDXLZ+pEd9jaH/JYjAjgB2XpPyoQXj4079WnU24qy3ZOfk6W3wWxc +ljKHLySqvRxwRlCwiZuagQcMfD8nn0vHOMEyj2QymOJ6bx5s0OZcJ72YAVQbYil 4kJQ/obKkrEzMQPORu+q+3dEhuaauJnzOrECpHX/56spSaRYCIkFgoUGfdl+S7Qr lQ4AHCrbjDdZQAyw+3kEiIGDrJuYdWk6XwEAPevC50CXmZ0+3q0CAwEAAaN2MHQw DgYDVR0PAQH/BAQDAgKkMBMGA1UdJQQMMAoGCCsGAQUFBwMBMA8GA1UdEwEB/wQF MAMBAf8wHQYDVR0OBBYEFN0KfRluDdz4MNcFXcyH/6SRRiwXMB0GA1UdEQQWMBSC Em1hc3Rlci5kYXRhd2lyZS5pbzANBgkqhkiG9w0BAQsFAAOCAQEAvtan3vxT2lHk L0qoqHra54OhhDdBEEdQ1NngiyFY1He4HbHmAQi7MtMCDd8GwqKJsIhK9dZ9Q3Ux Z0BvYjB7q9U2i5Fc+KmkbJMsL6gp+Pm9txNq9gDMHz9SaVMqFuI7UyJ0V+M2V7E1 6PWIyxW6MSq5fM6NEEkNgxgGO0479uw588FTc5p6mIfRjcpRMJEXBed3lymQ27+m MNOM/NS6vGdL9ajCqaw/QUV/kdTSfmiMowIo6ClabzIO47qi66sm/gZkUJ2BcLbj G3IqbkXudkWkvZ5XgZ6JnyjXg1ifR/1uaUYPcchO0JiWUu9KHwZiKCoQM+qECCgX /4YZh3ot2w== -----END CERTIFICATE----- """), privkey=strip(""" -----BEGIN PRIVATE KEY----- MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC/gqEHyomZn0Xd 0pLj1FuZ4fwlNuqMM7lIwu+T8bjrjs2/1A/oJpdp5Uhp0YtPT3zbKmywV3TjfWAz pG/bMQfOZdsFtfrKNveSq6nfFZ+VOqGuTA1y2fqRHfY2h/yWIwI4Adl6T8qEF4+N O/Vp1NuKst2Tn5Olt8FsXPpYyhy8kqr0ccEZQsImbmoEHDHw/J59LxzjBMo9kMpj iem8ebNDmXCe9mAFUG2IpeJCUP6GypKxMzEDzkbvqvt3RIbmmriZ8zqxAqR1/+er KUmkWAiJBYKFBn3Zfku0K5UOABwq24w3WUAMsPt5BIiBg6ybmHVpOl8BAD3rwudA l5mdPt6tAgMBAAECggEANAR+Ssh3sZNyfbr5jQqcSuL4Av+0m5pdBGd2fZ/Vk535 QtaN74ez7t6JWbzB8yvrBPi0Bv3qUPQ4Ei7i9w2NSkGeSSHR2eUuP9eCz4ZnDzia u+YKbRzKE2qo+szbDci6jI3sDW3o2xIvOrSDh1h6vWSyDKv2hbewwQdMNJvJTGqt OKKDJ8DJbutrWs80uf26cRU9iqLwAUs7T9WtMoBEgoG1mu5P7fyW5Y+UAy+JXJso 3yoypl8/VG9LDT28w41OaNUdQMyxH4zKDGtMbI8f8OJksvZZcuGHaDkE6h2i8mj8 frMXLEH6TYHYEcljNJaRErDi1ZiMgfQciTZU5fd+PQKBgQD1klkI39REysdNbdD4 Rdckh0fNVMr+cwRxrMuk/g85/mTXEsYTMrz5duFNnNLpAuNGLsSNHKpoMj6waQZO zSbX3O0oBTzYAtg8tIbv6cAsFC3VTADm5wKkbDh5xO7XLD3M8FDkOWzPVcLefA1s K2A2+KOmS+ssfQHrgR6bpC+IUwKBgQDHpJIDiPI4C3cabTaJkVcHIRhMb8YatkRu h3jr/qocRTAcerd4m+t/MsQVXJnCj/Y77Fz7l2IlIEyeZsbejs1myJ8wQR9SozCA 8EIgyARyTvx/oRG4slQokl3FI9dIlteiB9VK9yjeaidd8zShXjtpoyOqC8RJjidM dwz80W8c/wKBgH2d4xV7CaY25ERjTGXzs93npX8PRNdsFnXfojxACaHs08CAxfnE Fo61lQKSmgC/jWq1Oa3FYBX0vcSXtLZSkvAQ/u9d3oXQzrQe1Hec5sSlfdyCCGQU /3EEOs9vQY2n/+T5eSeFiHd2szwD0QnoFkuIXI4Qf7g+KeFCJ1oOXpIpAoGAR0bE Mqrj/4poXXD8daUEMzFnoXKOgd7tE6EeVPM4/JrfEGvnsRHJxEH1q8LByqrnOIGs uM5VZffgIvWCrtbBEp8x5mJ5smE84evlUBrZK45zq4Vv9EcGsO2AuO+Q3wOrvNeb GQag+rdfkrVP5wTjpVVvWDiXPcOY2D3wzxpe1zUCgYApD9hCJOLo7TwOFRT0B5CV LnaW4aeMx9RbcehZzsih7sFmfaZI6V4l86CEdp7kLnZSPYr5d7rPlr/adGcMj9bF SVx+QqH6cMtBK6tSdjJT2KuOfqkzA7tK6SzmApaZTZiz8XM3MooYDj86EJ93l8EH xvKPa17iyHPUWNTHy9NuTA== -----END PRIVATE KEY----- """) ), Cert( names=["presto.example.com"], # Note: # 1. This cert is signed by the "master.datawire.io" cert # (rather than being self-signed). # 2. This cert is a client cert (rather than being a server # cert). pubcert=strip(""" -----BEGIN CERTIFICATE----- MIID8TCCAtmgAwIBAgIQHjsjEOZ4SEEVcrnClDnBPjANBgkqhkiG9w0BAQsFADB4 MQswCQYDVQQGEwJVUzELMAkGA1UECBMCTUExDzANBgNVBAcTBkJvc3RvbjEYMBYG A1UEChMPQW1iYXNzYWRvciBMYWJzMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEbMBkG A1UEAxMSbWFzdGVyLmRhdGF3aXJlLmlvMCAXDTIxMTExMDEzMTIwMFoYDzIwOTkx MTEwMTMxMjAwWjB4MQswCQYDVQQGEwJVUzELMAkGA1UECBMCTUExDzANBgNVBAcT BkJvc3RvbjEYMBYGA1UEChMPQW1iYXNzYWRvciBMYWJzMRQwEgYDVQQLEwtFbmdp bmVlcmluZzEbMBkGA1UEAxMScHJlc3RvLmV4YW1wbGUuY29tMIIBIjANBgkqhkiG 9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4yhKmfYaRGrKMKLwoIi+fWxccRXjBVDjL759 j4xY2WmdZsA0OGkuhPnU92Z7vMrEW2Ior1DeJkJURtmW7thZYhiBJZom2WLJ8nhW dOU3shoQWmPmapmSkRgXkx8BCXDPPbrrCjS3eQZmLD2SILxaA98DmIb07N1tliGM +cwyQo0e9ptBlaMrAOxKJcVx58LXP1Rr4+lctLe198kJ1Fw9vwBpQW8UdrSuMQdh 6lc+OUoEq7F2jJYuWzaaanAMDRiRt+p0jKeyAUp+ZfMhvqBxg76I/rehGANkaAHq tEJJrjyOjUmi/tafCjUCHGk5Xjp74EKakdn1nzqI1Uv7Xc421QIDAQABo3UwczAO BgNVHQ8BAf8EBAMCBaAwEwYDVR0lBAwwCgYIKwYBBQUHAwIwDAYDVR0TAQH/BAIw ADAfBgNVHSMEGDAWgBTdCn0Zbg3c+DDXBV3Mh/+kkUYsFzAdBgNVHREEFjAUghJw cmVzdG8uZXhhbXBsZS5jb20wDQYJKoZIhvcNAQELBQADggEBAE1OJ+e2seALd1uO qB3cQ2Fd2R+sm6pSkitngoaWlmAOsiunT3Qa1H+UWsZdBOv7RQ9JbgmRzsgAMKnR PwnGzDcJ9miBs/qY1LpGEeIziL5/BZ1QimhTvsLzbmdMBdFpZtYNTfGMxuoI2p3R r8pMcAb9P1EFZ8xVtf0KH6Wttq5Z8OHtvkE8W8u+I/FEjdwuu2Uurjx6AamS5Tw/ HmM305OUzE7q0PrFsCBpkkIoc0KOIY0Nrx9B9y0mTRaWpvf0gri1NQuc+a4koFCD zdOaXfE5YKLIQyYBhVnblHbHpPO7PXyC5UqEpHvTaECFi/6eR1BZVCrrgMxCc9s5 J03slWw= -----END CERTIFICATE----- """), privkey=strip(""" -----BEGIN PRIVATE KEY----- MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDjKEqZ9hpEasow ovCgiL59bFxxFeMFUOMvvn2PjFjZaZ1mwDQ4aS6E+dT3Znu8ysRbYiivUN4mQlRG 2Zbu2FliGIElmibZYsnyeFZ05TeyGhBaY+ZqmZKRGBeTHwEJcM89uusKNLd5BmYs PZIgvFoD3wOYhvTs3W2WIYz5zDJCjR72m0GVoysA7EolxXHnwtc/VGvj6Vy0t7X3 yQnUXD2/AGlBbxR2tK4xB2HqVz45SgSrsXaMli5bNppqcAwNGJG36nSMp7IBSn5l 8yG+oHGDvoj+t6EYA2RoAeq0QkmuPI6NSaL+1p8KNQIcaTleOnvgQpqR2fWfOojV S/tdzjbVAgMBAAECggEANj6O4gk06JWfxtGCKLO+2XCg+phBaCmStvoEPd1D8lcY MUtArR/g7fxC8PlWHxVEopXkJUloYzZ/rZOUSWD8p0I2xOX01QCUPQSjkLKUBEHZ Gdy1T0txBpj8ODO1Ka34r0MNkZhZH9t5VqM1W//edwIwd6HypwWRf8JvSc+LSPy6 4AofNr83rebDD62ZfW6qG+MR4Gh3DKST45sYoTtII7e/TWZPhcgO8zkaq+EIm6bc YYlJM1yxbnEEV9mCDlsRWf+RU0ZwGC8noGm9iP9lkrLlF2++CLEllpMexD1bP/67 MzTWAz/GKo2ByMImbnFgYycf+gBHIpV5AzZ1fTd/gQKBgQDoAhuK2DjWWiUsnKGq mGp88y9pQscmA+14XKBQpNDG7/7zRQ2heYDQT83M0ZKFex/GRz1pN/bNUCFZEvqQ 5gXJa+Omq5miRHlFKkhQdezwW04FcgUI8uGCT2dmlaK48NKVXRmLpPHpIvOOW4Cl s3CY0iRwJyKWMdsGcwezgbY3pQKBgQD6pcTJ7gYVOvCVRI6TeLH36ZXy1hg+hjNI K5UjoxkRV00M0akMdOqBmcXmzet7UwepqRih6hol3/Tama2GRzbnwIMRwBTYC5ve D8XwjE8oAZkuz4Wm08gsGn1P0VjPTYbXffwvKrAtxKXZ2tIEKqUAuDbpuDcsmxEh E4deeLhbcQKBgQCeXBnqmo2pGdy3562doO1GnkMlSPRf6VxkxGyUvvrWXygZam/U YPfguCgT/pRRUeotT6EGObHXEDPC9eZbkvYuNtsrf4OdM7nG0QaNDQEOSnQl2V7A bfApHwPIDKkGLTK/ys1N+Oc6J6Yw7BoSgDmBxiYi+0NrW1pRu6BtEUOMFQKBgFgr pBQcpQsm1qbLnRQHayN4igUIhzLHZpbGrgoBP7o36aTOxBbbsfqxK0rLuUCCrrli AIZEobodFDcpxD7uIkRYFkNSPILbYpM1HT5HPTknhslOuwc6jLnm/5nqXMFf1kVL zkCRVbRj7qu6LBLHJZAhPT/uS4pnahkmk4IKGWAhAoGASPPltWWBKaBUkgahC3t/ PyXpeANVcHCrEnWCru5sWDc2zo9YvzVmYz8E3/cnHE4C9EMBxGDvQVsjEOLIIIuM fNnQ+OIW34GWz7pojjvVgirlFVmrT9gV6OXJBmh9aGvQN0En8qxZVQouo/UUkwoO 4gpH/If2ar0U3JDIU+d87o0= -----END PRIVATE KEY----- """) ), Cert( names=["ratelimit.datawire.io"], pubcert=strip(""" -----BEGIN CERTIFICATE----- MIID2jCCAsKgAwIBAgIRAKlRg3DeRR97bt/PNtG2qw0wDQYJKoZIhvcNAQELBQAw ezELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAk1BMQ8wDQYDVQQHEwZCb3N0b24xGDAW BgNVBAoTD0FtYmFzc2Fkb3IgTGFiczEUMBIGA1UECxMLRW5naW5lZXJpbmcxHjAc BgNVBAMTFXJhdGVsaW1pdC5kYXRhd2lyZS5pbzAgFw0yMTExMTAxMzEyMDBaGA8y MDk5MTExMDEzMTIwMFowezELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAk1BMQ8wDQYD VQQHEwZCb3N0b24xGDAWBgNVBAoTD0FtYmFzc2Fkb3IgTGFiczEUMBIGA1UECxML RW5naW5lZXJpbmcxHjAcBgNVBAMTFXJhdGVsaW1pdC5kYXRhd2lyZS5pbzCCASIw DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALypYKoQpEKbSyG3rVM2ddDt3XqD ra6nfBmZ8YqW03dLE0XY8hED2KPruX281SKSU5vgGmA0IRUfelxFxS2Rznrk3CGb lsBBka8GEXQF6TRtcHb1CQHZqeylPBAeuXaMXrwR8fcKXspu+9BHzjkd7w9Fbp7F 6cubtPMGSPzpxhF7FJ+SEuWEzKSonWKa93rk4+ytIcuVZeWmdirZbpuP6Bel05Cu i9Vs6Qia68AQ5tQvsKQoWUkFSJANeY7WMzqEgt+BG0hKt658otVOAJdyFPEA96j7 6CFjS9VXxcD18BruPWdil/6gprQhc/XVRU4cUrOOqPmoKhtmDekLY6Cka9MCAwEA AaNXMFUwDgYDVR0PAQH/BAQDAgWgMBMGA1UdJQQMMAoGCCsGAQUFBwMBMAwGA1Ud EwEB/wQCMAAwIAYDVR0RBBkwF4IVcmF0ZWxpbWl0LmRhdGF3aXJlLmlvMA0GCSqG SIb3DQEBCwUAA4IBAQCIZJnPY9NkOY0w8GaVDHrkHIREU8r/B2cv3dNn0k9ktvlC 0rgUvg7ZDzsr7h+uWI5VgxED1KpnQbDcHMQL2Wk0+z5xJgP+wj1ueSCniJGeOUEH zWZQ4rfs8jUFkBT+Is12YX+YEOGYP71+EzmbGK3glRfbI+NrtJuv+vpiZKcQzHfq V3IpUKpEJ0o4XVUuBKtnVXcWrR+KlJQCY2vC5eSMstjgC5YKVBRiVqbyIGA/ThDq BpKO3eeUmF2SWhIzCCgLq49iTaBpSzw7mFZdQsOTyXQVVppOmcjqTiF3j8FaVTE5 WWblE/fD+ZXIPEMxs9te3T9/DIKDM8AyxoJ1Jh7K -----END CERTIFICATE----- """), privkey=strip(""" -----BEGIN PRIVATE KEY----- MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC8qWCqEKRCm0sh t61TNnXQ7d16g62up3wZmfGKltN3SxNF2PIRA9ij67l9vNUiklOb4BpgNCEVH3pc RcUtkc565Nwhm5bAQZGvBhF0Bek0bXB29QkB2anspTwQHrl2jF68EfH3Cl7KbvvQ R845He8PRW6exenLm7TzBkj86cYRexSfkhLlhMykqJ1imvd65OPsrSHLlWXlpnYq 2W6bj+gXpdOQrovVbOkImuvAEObUL7CkKFlJBUiQDXmO1jM6hILfgRtISreufKLV TgCXchTxAPeo++ghY0vVV8XA9fAa7j1nYpf+oKa0IXP11UVOHFKzjqj5qCobZg3p C2OgpGvTAgMBAAECggEBAJ+xd6M8pu3CaZxGz63qIVwSnDDCGVgHaSJ6jlxTQvht UgkDlBMXAF/wfniSSI8U8TS2Q10/gulQVdCZNkhWbULVSgggnUBrwBc4ublN75Jz OIlY7KDmT9GCJA85Ep/oPaBQSFJmMsqDmx84SLVMQzjX+sTmnfm8+TPlFA8RCplr 83S8PqVVGGh0RdMyFh0Tsv5wqWodxv09vmUgeq42S76NsSg8A6HrVP15EAZcEHiM zOSUYqh58EEDXHOscMy/8bUGY07EHXZmvsTCMDd3Dsx/7QJ4o1AiS0y5JXaMxDyB JSUyQv6zIwzNNyJ7lwqZ9J56B1xcNJoDAw3gCz9/KXECgYEA338WkkQgJrROXepz 508IP7W1p8jp4/1U+MWRjpriwdhuAXnzB4odPL1SYfFPHfgG8RYBMNQAJDkeIoSt xrAJhHkFlJOYzCNos3Aeo8sjqzchWZRnjuJSodRhSShWtJJmuufR55bhYPAr/12h nwpwS0HWdGvK3v5wPtCksCmfwUcCgYEA2BleKiIQQSBoW853vemHrIVKTaGULeU7 degM2lnZBuGKbSxaFxvipj64wORrFm54JxOnCXXWuSJM8tRmoQPA10M3SmUHN/Fu v529QMm5sjB17EfQeIymhuFxHm2xvk9mul9WnaozBX29OrVMlwQoqyMzZu1fsXog AsIb6wUKZxUCgYBDrtIgE3+FGR+Oc30MNLPzz0ym9kJWqBZ+jB5riF5Zg/i0e8Ds rJf0GAWF4bUrBzza7+YGan1setu0amfR/uey9Y+KEjS4xZRkmvS8d71ikXyJC1dd Pw71MUMRC6VOY/O2cJPxxZCVccZxPGLArkGZmOOgODCk3XsSms71BnX56wKBgHN+ S1dVUT6dZWj7lf+H2h0YN7f5zUoiI39Gf+gK8PS+gc8LTzLekmmrR+6/pYQdklXA KRvjQNk9PcbiQd94NA5YPCqkiBEcFcaPNWB076wOPlgDoaVr9mxL/Lr4gXBm205s OcyV9CLRKts/nilv7ZRZgdVWtDgUPxt6RpV64i5pAoGAGGIwDJAK8ctCtwnbRhJy xVHwVcdVjFAEZj0Ytw34FCV6OpJfztvkThA7uqg9yNMwHBdx1vge6Xzxy4rniEtE DyFlHyWTrFwoDBYy4d7cNgDJnaIN2qBY36GDyL2x7/DyKd5+CQN07XWuOmnGrzIo 6ABc+KN1kmXbr9VteFRagAI= -----END PRIVATE KEY----- """) ), Cert( names=["ambassador.example.com"], # Note: This cert is signed by the "master.datawire.io" cert # (rather than being self-signed). pubcert=strip(""" -----BEGIN CERTIFICATE----- MIID+jCCAuKgAwIBAgIRAMQO4rSR9giQAjULkZVYJd0wDQYJKoZIhvcNAQELBQAw eDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAk1BMQ8wDQYDVQQHEwZCb3N0b24xGDAW BgNVBAoTD0FtYmFzc2Fkb3IgTGFiczEUMBIGA1UECxMLRW5naW5lZXJpbmcxGzAZ BgNVBAMTEm1hc3Rlci5kYXRhd2lyZS5pbzAgFw0yMTExMTAxMzEyMDBaGA8yMDk5 MTExMDEzMTIwMFowfDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAk1BMQ8wDQYDVQQH EwZCb3N0b24xGDAWBgNVBAoTD0FtYmFzc2Fkb3IgTGFiczEUMBIGA1UECxMLRW5n aW5lZXJpbmcxHzAdBgNVBAMTFmFtYmFzc2Fkb3IuZXhhbXBsZS5jb20wggEiMA0G CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC7IW+b05L3KzjY3p4OPsynN/8OGztO ANqVOXgjQfoe0eQ9KXSMRLccirWOgQHDUlnpuArPpwxmFx8avq2x/G0Ge3mmZx8m 2uM7XN5wAHhjvnDAnM3Kpfpl3YlpiP7DkaGmbzut4HUew4xf2dDvsul9xKQ8/cAG jsypZKoaDLD+uNmRwrMu7GrHCiPtSEfd5Otw5UFcx2bFuFnbbAby1pjsu/FOwqHN vV4q3ZVIX9eshLKTj2/ODr61yWiLO8LDCBy3nUPoW5FXGCbhRnP/ev0TUvxhYDus TrokBvIXGX5xGbIIHSZ3U8REJP41iC06m7RdbkKEaF61pDyqOSTUtrNhAgMBAAGj eTB3MA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATAMBgNVHRMB Af8EAjAAMB8GA1UdIwQYMBaAFN0KfRluDdz4MNcFXcyH/6SRRiwXMCEGA1UdEQQa MBiCFmFtYmFzc2Fkb3IuZXhhbXBsZS5jb20wDQYJKoZIhvcNAQELBQADggEBAG2o 7XEVqjnQdIwoKX/ergbQtPxkyYTLrGDU6qSoLqiwrfEYnUam/oEwTrJtgee56WbT eVvemVFEgvSdUoPAW/oa05pZZx33B8kHdQn69DwVyCMdQotx71Izo46Bhk4VuxFo J6mBbCUOqdetEDOyehxXUNJRn8VtpDLXanT16tlz3JuJDPBFAk8OvQ6Y65vumedS EDpmx8pPi6amfuOPtZZqP60owXA6bv+icEdGrVpK0sErDwN8kj3fvMYzkVROPtZL 4Z6y4bEGqhBtO+sdz3rTsh7+UOHC/CZgXgdDUK2An2DcjccWqZ0ENAOABEnNgGfA SrCA0+AQjzKx/eJwDcg= -----END CERTIFICATE----- """), privkey=strip(""" -----BEGIN PRIVATE KEY----- MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC7IW+b05L3KzjY 3p4OPsynN/8OGztOANqVOXgjQfoe0eQ9KXSMRLccirWOgQHDUlnpuArPpwxmFx8a vq2x/G0Ge3mmZx8m2uM7XN5wAHhjvnDAnM3Kpfpl3YlpiP7DkaGmbzut4HUew4xf 2dDvsul9xKQ8/cAGjsypZKoaDLD+uNmRwrMu7GrHCiPtSEfd5Otw5UFcx2bFuFnb bAby1pjsu/FOwqHNvV4q3ZVIX9eshLKTj2/ODr61yWiLO8LDCBy3nUPoW5FXGCbh RnP/ev0TUvxhYDusTrokBvIXGX5xGbIIHSZ3U8REJP41iC06m7RdbkKEaF61pDyq OSTUtrNhAgMBAAECggEBAISoCFHEI8w6hLsg3ZUlqbjlNldOsLT0YAAnVGZSMDjG /HDrQWbqk5CVOG3EQHaxm3HW+TsJpf19aJxyDfo+Ax/0SmHPesL1qt57UGi/vJig +Zdh0XVWQnMSIIaDCm+jfp/Y/MqfcweTAqE0bSxvfZyd2PwvuoArnSR8ayW6V4LK WrLXgNMPzmbkmmWOBvIK4tX2cJD4BHy/7iNdRGD+Twtlbs8Oo+cLLoWh7JytbqNi hURbjnMB7gdFuox2MblC1FYnugdTdw4XyDe6dKdyKWJjGzbUxWwyy+yjrAxutfAc xwVDsRBLvww+Ptzf/eSOQPhrVzu7mhY3yXOmUnRRjkECgYEA63+uDb9IxL6HSIw9 x4Bc5RQKmO1IoJohVE+/WezxaDkmUB+FSB7VF5XrSpDgY/x4ZR5OX0urS4/C+Xee PdnLxYH55eQqGvauVnC0sDA+k9o3TYTJmOfYY9uihQC9w3zRGtNxOFlQsVR92NBE 4SzuSVtRr8DTOkhKiOlYBYpF2DkCgYEAy2vTIaI4QGSjAfBWfYWNmKvaVHZ6netW miTcwQu4qAQodEdnslsNVwZ/uMIktSZ5IEkpiAXxeGu0EWEpierY30NH+TY8BJZS I/pCzRVyyt9X/UAoj9yq4chyZXMXZVToN0W3YlVrIJoBdrhvZvwELHrbDZH4JrQw 0AHsZq7xJGkCgYAC4q6cRoK6vmbj8av0HNOGjwdONmIUba8I3G1IyclvcHvSsYAt kQslXdXjNQE62GYVPxjQvBmeNGW8LsYGlfuUMPKB6ZjGec1LC9h67CxoHV1eGslp kTWqi49jN84bbhUV0g9qFFYTxihAltSxOZ610WOf1qn/5dDb+pf0gWw3qQKBgFd4 rRgYXmHqJGIQC9D73dBZjY+mRsGjUeEEmtx0AtpUt2SQ09lQ5+KVC9TRvuEagxlL /IzeKWBjx9F1W1xP3SPcFZXnKVW7oeSQl6sCXxM3iOmAbjC2bdCa1f4jyFqtcRFb bCjfnCovrxNy6Yx6L/1Ecu9Z5kAWWasIOLRK46yJAoGBAKQ8kYHsTnb7redYqh0w oEsJ3Sq3CcMD9813RVMrcTneJwTo/c1aMvYYlz0gAGsaar78av4cvIiCz4YT9WHC f/0OyEC+Y9lQB1/ka8BSjpIfM2L0FWDHJUsGOKZ+C+KlGZpRgF8YDFZHdwmWOokL GhN8OjQwTBEo9hm21z14qvAC -----END PRIVATE KEY----- """) ), Cert( names=["tls-context-host-2"], pubcert=strip(""" -----BEGIN CERTIFICATE----- MIID0TCCArmgAwIBAgIRAL/XZdKaUkBM0tuy0P4+UNEwDQYJKoZIhvcNAQELBQAw eDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAk1BMQ8wDQYDVQQHEwZCb3N0b24xGDAW BgNVBAoTD0FtYmFzc2Fkb3IgTGFiczEUMBIGA1UECxMLRW5naW5lZXJpbmcxGzAZ BgNVBAMTEnRscy1jb250ZXh0LWhvc3QtMjAgFw0yMTExMTAxMzEyMDBaGA8yMDk5 MTExMDEzMTIwMFoweDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAk1BMQ8wDQYDVQQH EwZCb3N0b24xGDAWBgNVBAoTD0FtYmFzc2Fkb3IgTGFiczEUMBIGA1UECxMLRW5n aW5lZXJpbmcxGzAZBgNVBAMTEnRscy1jb250ZXh0LWhvc3QtMjCCASIwDQYJKoZI hvcNAQEBBQADggEPADCCAQoCggEBAK8SUPO0DNCdowxE43ptSscXXon5altJPfu0 ZSo38e2ljRKfBDD2f/Wi2+yEAdZ9zB/TzPoSyMZt1YXbNI8FYYFwOCXqtPadOcvy zJUvCxmJtDK78RsvobskdBDryy0Vr5heGS8L/707n8cmXpat4JyjZRyyLUg0Rhws KxA5nZkS14jAbD3l8EcZ+ALMlLGBynu2PYYthfZ9yJx8CxUYYPReSFXXQauovMDT wzqHBvY2WLkU+cEWyYCaBo4yAsA5P5q34ZRVXn7ePbidnguJJ/34REGqJj3/13dP 79qOtTB0NZQuajMvacEcdgkrN5rD5I+yPYckFrzGXkhObhxP4cMCAwEAAaNUMFIw DgYDVR0PAQH/BAQDAgWgMBMGA1UdJQQMMAoGCCsGAQUFBwMBMAwGA1UdEwEB/wQC MAAwHQYDVR0RBBYwFIISdGxzLWNvbnRleHQtaG9zdC0yMA0GCSqGSIb3DQEBCwUA A4IBAQAzG/5JEIFnh4+31pxdmHq7VawsPpLQzAWbRvZ4BG+6DI54jLGgU8ZDXIxw +2F6SgPiyxWHD6UbQEWlWkp+qWs1D9ribWWuT/AnKDtg6G1aOTm5yygKtyrmb8p1 MujfSE17y7AgOF/3FcegZwZuHZxlQqwJZD6yTCiQYWBczVhPKXvlXIi4SkhnHX1b aRMRTWvHdNMclm8BA5zbTL8njhUCKkjNXSySjtyOc22f4K6A9GS3R1/fYDxKKgol aqFfLS8P0/niK+fGyBE8Lp6P9g63hS60bAOYxraJbGieFqbtKZH2H9von7e6Do3N c1ySbPcvlmzY90yzieRidmD4dNDb -----END CERTIFICATE----- """), privkey=strip(""" -----BEGIN PRIVATE KEY----- MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCvElDztAzQnaMM RON6bUrHF16J+WpbST37tGUqN/HtpY0SnwQw9n/1otvshAHWfcwf08z6EsjGbdWF 2zSPBWGBcDgl6rT2nTnL8syVLwsZibQyu/EbL6G7JHQQ68stFa+YXhkvC/+9O5/H Jl6WreCco2Ucsi1INEYcLCsQOZ2ZEteIwGw95fBHGfgCzJSxgcp7tj2GLYX2fcic fAsVGGD0XkhV10GrqLzA08M6hwb2Nli5FPnBFsmAmgaOMgLAOT+at+GUVV5+3j24 nZ4LiSf9+ERBqiY9/9d3T+/ajrUwdDWULmozL2nBHHYJKzeaw+SPsj2HJBa8xl5I Tm4cT+HDAgMBAAECggEAcdo7gwFIhDK/4i66sNd6ldcAyEHHhO4wvQwn7jjLwHy1 LbL0CtODi78JvtpqR48vvFMFLmwg3cp33cEcgRZCvua33RCx9t9wws13dl1NnqIK 6iOHPOLRDt86C/cL/pnnw/MN9aab/fhUhDLTuLIDLFqmWu8Uu6wjHBctOjP95Zlj 5JBkbHIjJkNVejbfEoBMKVFAFeNYoeuhv8NhBO3XwYVryTp9+PHAwd9a5EbBMryR nQA+XWi7H0iDXEPG/oBvmyh9Rbo+J8r9aBPDRbYZmCCVzihT1R/tiaHSozNHwh2F dUCpg1wFDRSmf2wKMFK3BPOMKvvxdN3FvyY95klmYQKBgQDXZDz2Ik+KJJmkCPyk VWTU7IddPJ1+I/xccirNRKJ1Dtm9zZQXd/gxrH3hFVyyRhYxOtUAbU85h7KUpOz0 /bI/BZph9GbfUcYzZ8otCYyakNUARE6auhR6IWPF7Qu4LC+NHg+k6+JeWHOzn0BR ZXbJ6phe3U/ZNtayjratuT1P7QKBgQDQFA3GU5POen6frF+buyQOFJexwO23yHwp qgjGBHXYZBrp7LoA7ZtLOEcy4C0Pmn3IVvSt7EF38iemvYXntmvpeL1XwHdTv5lq I1x3myt63Vn2OWLu4RhA84PEmlI4pDo7s6msiAS/PSlTmqbSuIDWLAqO7dKgvzIK Kq8+L3fibwKBgHFldW7D24pIAJdKn+/IgWBT8mQU0Hmjam4lMQGGe90S53G0tJ2y bHmCbXc9ruKwYWijp5Yk9ku8dDkrpxDIK7pgMcoWSL6Tp7xSjS8u0tZhH7KXQ6bU BonR4FxIkx3wLUynIedaxH+VI7zSP6NavrJJDtUKwMoDw/6XgfduCah1AoGABke0 qrm3ClJUJAmV0SNy0SH5+hlyk0tvw+on3aIg1GkhDtJgQsrpFvoZ3AU8Fu54wWUu eVlaGH6sh7HMqtOsqh1EybM7ZsGvpa5vigSa6Vho8K+GtuMAUmWHIpXtyVvbjhW8 F0L7sbHs32MZid6btNsbbnjrFILwxbHIHD5ehe0CgYEAg/fe434Wmq+UykjhkYqy wu2oXSgG8PsdiE4jmtfQ6aUtbnWyWfl8GpzzAb+niNHrE4LdohC3virNdBKVuCcn Nwq6gHnTGSbrM+WAa78lvYD6arIW6fD8MvCQXWMN4J1FVk86H2vXhaSObOTls9+D OGSk6BLtLUX79aY4TfNg0yk= -----END PRIVATE KEY----- """) ), Cert( names=["tls-context-host-1"], pubcert=strip(""" -----BEGIN CERTIFICATE----- MIID0TCCArmgAwIBAgIRAKLpGzzKxkWzv1M5uTQKopwwDQYJKoZIhvcNAQELBQAw eDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAk1BMQ8wDQYDVQQHEwZCb3N0b24xGDAW BgNVBAoTD0FtYmFzc2Fkb3IgTGFiczEUMBIGA1UECxMLRW5naW5lZXJpbmcxGzAZ BgNVBAMTEnRscy1jb250ZXh0LWhvc3QtMTAgFw0yMTExMTAxMzEyMDBaGA8yMDk5 MTExMDEzMTIwMFoweDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAk1BMQ8wDQYDVQQH EwZCb3N0b24xGDAWBgNVBAoTD0FtYmFzc2Fkb3IgTGFiczEUMBIGA1UECxMLRW5n aW5lZXJpbmcxGzAZBgNVBAMTEnRscy1jb250ZXh0LWhvc3QtMTCCASIwDQYJKoZI hvcNAQEBBQADggEPADCCAQoCggEBALHxyYppaONKVQFrI4d1I7+xnmJ1Dj4jI6Ic utoEKTlLLZxFtI/Kjj+S4cPfUmV3Arm2vsG3ajZ5AMia50N264zpE3G9/w1riRrc OCZgbMnOm/Uy2nMcDEbNN1eW2AlXU5NVbwraHOk/EywiCgEZYPBPSrDRAntJpjo6 0Oe+yve98yMCvmJOsdIuxExojaAdfEo0o9on0/iy0cereeiegxjLO8QM7uwTDqSH +4dApzvy2PwwUEhUUZrNRdyp7tdW36IzTi7KeCWnX2++2yPNQTt7N3x3SNHf6gj1 fjQ6jYXwGQ0bF95KV5HXbTMEIXRb3hDX2jYiX3cXNOapx5KIio0CAwEAAaNUMFIw DgYDVR0PAQH/BAQDAgWgMBMGA1UdJQQMMAoGCCsGAQUFBwMBMAwGA1UdEwEB/wQC MAAwHQYDVR0RBBYwFIISdGxzLWNvbnRleHQtaG9zdC0xMA0GCSqGSIb3DQEBCwUA A4IBAQAvdh1cc3sOkksjlSJYj8qRyC5kxFm79YTWga3zm8EsUz7I8gjULCfSeEmT aEu6wjFJWTxMBulU0jbu3QVNinQcOqxTEAXdMaP2/2akHZv/u0QHFsOH1K5b9X6w iszEJlwvH8pm0hczzQ9RNgCo8JcmPf+SWlhNsvIjXTaY4VaezoWd80US/90EZWEg CU7vaeTtUXiIkDFbnvoHnBfKtzFVPozdRK92Um5TqYAQhTfoLy1lZ37ehLtEi3/r YnZJ/kVvvj0xu0b3ABS4X7tdquIFpRH9TlHzytPoExDP0yK4rDTBReRltjmG7Mo8 C5c5xkWcqYhep7KMpnkU02onYioc -----END CERTIFICATE----- """), privkey=strip(""" -----BEGIN PRIVATE KEY----- MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCx8cmKaWjjSlUB ayOHdSO/sZ5idQ4+IyOiHLraBCk5Sy2cRbSPyo4/kuHD31JldwK5tr7Bt2o2eQDI mudDduuM6RNxvf8Na4ka3DgmYGzJzpv1MtpzHAxGzTdXltgJV1OTVW8K2hzpPxMs IgoBGWDwT0qw0QJ7SaY6OtDnvsr3vfMjAr5iTrHSLsRMaI2gHXxKNKPaJ9P4stHH q3nonoMYyzvEDO7sEw6kh/uHQKc78tj8MFBIVFGazUXcqe7XVt+iM04uynglp19v vtsjzUE7ezd8d0jR3+oI9X40Oo2F8BkNGxfeSleR120zBCF0W94Q19o2Il93FzTm qceSiIqNAgMBAAECggEBAJj5yQ6x4hcMbxnCFpA8Nxh0RTpVcYIfyWFzm3sT+rCj nblr/3diZnnm9ynh0j8iWfh4T3PQD4J28iKDcO+By6yfLzUoZp0N5pdt3OO5H606 br8UEdLFuRQhFkO5jU4ygcn2t3i33AT1UbEuLjWVsM3HDOoHNT/yJ/KFX9TrJChn 9nV9O7iaeBHMaLHHr2i3DCs5eFkNJfyXeW5qqrsLOPNwVc2LPg1DIwtG6trugpzS ZXdMI8/yVohuHMZu08eaknhJRhgDfPWCnr0oUy2EHQePw8k3ngsJOJlYDqdN5gsy bKGd88gRk57jgGbvZMAhdPVT75i9R76x9/8QCsFuHS0CgYEAwezbF+LAlETtEkHI v373OkYMoeKwsLI+VT2p7ypvYy2XbJTSoon8rUJv7VF1D8qnyIMSDGc0ltFX/Lqh QybhXQRk+Eup67k6QbZm+SQB5+dIo0sPTEuYpN3ftrAcirYlR5cZeJr6y1/7vXdl VziJPMXzopWHevxJyGjxlt1wkXsCgYEA6udlDcYtjYy6NRd+t3fK1oOg6h+I2DtN c3A859BmdWgXQ6oRbdh85TRykQ2N2Ax8PXr/IFL2bwsjytrVv24Stdo+ZFlETbJq an3pHjfnZk6usKs30RxHxYuOIm435SwcOZlmSreTKQLt/MZgVA15uM2NZT01+llT R6LyQ8/PwZcCgYBcPdKVEPlzTTnK1lmrpLPqFwnJMu/CjHYTy6n6JiAnd7cwIbXz NFlo/FIK+xUIdufJ+3ZpSen81wTYJNmx/Ft0CDQS2sKvakKooR9n4FW7vgqSCZD0 RH0N5q+T0T8yR6OB4wBtmqIyfKxcmd8tVqoIq0vRCPkRadGarzhC/3+c4wKBgQC/ 5HFv1CHoTTrcHipc9BYWMQcl2sbuZVt63whSErNwW60NkIOWaVB16OdiSWFDScfA bZa2sC8yPTZrA2OzctcECZoIXcfndMVr4xmpnt+AeuxH1EbPozuaS8u7orA0nVkd UIv4o4gq64LAiMmuQCfcaMaGGn/a2Feo4Jrp/HxqVwKBgE+ShxXc3RtOFRFaca1w sVnXLttEBfYBmeOxEmHaruCBuRlwx4U35Dq5fx5MYoeoaMoyGm8kqknFPSNZywdk /DlPdOnqrlBhY3TdmVk60j7IM8182GKjcMImfFoMjot/oZlKxrq+PcsVoIHeOQL6 b6gCAPn1RvigtZtc5EUILDfG -----END PRIVATE KEY----- """) ), Cert( names=["localhost"], pubcert=strip(""" -----BEGIN CERTIFICATE----- MIIDtTCCAp2gAwIBAgIQBmwf1lv4+/h6sWcQkb0rdzANBgkqhkiG9w0BAQsFADBv MQswCQYDVQQGEwJVUzELMAkGA1UECBMCTUExDzANBgNVBAcTBkJvc3RvbjEYMBYG A1UEChMPQW1iYXNzYWRvciBMYWJzMRQwEgYDVQQLEwtFbmdpbmVlcmluZzESMBAG A1UEAxMJbG9jYWxob3N0MCAXDTIxMTExMDEzMTIwMFoYDzIwOTkxMTEwMTMxMjAw WjBvMQswCQYDVQQGEwJVUzELMAkGA1UECBMCTUExDzANBgNVBAcTBkJvc3RvbjEY MBYGA1UEChMPQW1iYXNzYWRvciBMYWJzMRQwEgYDVQQLEwtFbmdpbmVlcmluZzES MBAGA1UEAxMJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC AQEAnqRejON4fDVxvJFvvteylUBDWAjKmQGX3ta09jvcdWp6fvYvIBJgS/A036Gx QCDijZjm9r0Ruq+StclqCKwC6Y3yAmaVsRclBhAcUCXhym2PFKV54268UHTlMGV8 B23BggWq3kzlgCDRQ6xOdzC39OYm3HfdX7jyeGoEPOsFlsbVwNHAcO7FEShRhfnN VIG9vlYXogaSQPWoBu1HkfyO24rrLV0+FlhB6ddTjKi1JP5XSQAZX2zVRuocgFut 3pt0SX47MqkO2/+CSEjVD42RosnyTobFsfLQFEAbhxaM1QhfFVxcfQXHWfvJhuNA m2P75gGj/vezqW1mXRpubFxqswIDAQABo0swSTAOBgNVHQ8BAf8EBAMCBaAwEwYD VR0lBAwwCgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADAUBgNVHREEDTALgglsb2Nh bGhvc3QwDQYJKoZIhvcNAQELBQADggEBACGfmKYqlwHH7ZldKgHDrkK1obomlAU3 2WQ43DHhSUsausgrTDwuXQ+3K6KpcyDwCJBXBPDVtouawfSaMfqKg3bjo+ttPwey xJsLvdk/U0djpBDJ4GwJFMYsPPBBwGkDFu0w1Xy4IEbVPmzOJ9Lnj8Uf+YIbWwqC BcTvz0BmIcZtkMXn9EdHWjQ1g/DodRkd3yeZjRMQ7WvcvUasOhG9CFGFjsC4ZDbv x2Pz354apCjhr2Dqvg21/9LQgm4zmJakw8HwagRv3eNunLXQYYBcPtfeEVgXyTz+ G0w3VUUFGNg+m+Mu+CqS73826wC/xE4I/1pUdoKkU+AqqakggSEH6Wk= -----END CERTIFICATE----- """), privkey=strip(""" -----BEGIN PRIVATE KEY----- MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCepF6M43h8NXG8 kW++17KVQENYCMqZAZfe1rT2O9x1anp+9i8gEmBL8DTfobFAIOKNmOb2vRG6r5K1 yWoIrALpjfICZpWxFyUGEBxQJeHKbY8UpXnjbrxQdOUwZXwHbcGCBareTOWAINFD rE53MLf05ibcd91fuPJ4agQ86wWWxtXA0cBw7sURKFGF+c1Ugb2+VheiBpJA9agG 7UeR/I7biustXT4WWEHp11OMqLUk/ldJABlfbNVG6hyAW63em3RJfjsyqQ7b/4JI SNUPjZGiyfJOhsWx8tAUQBuHFozVCF8VXFx9BcdZ+8mG40CbY/vmAaP+97OpbWZd Gm5sXGqzAgMBAAECggEAUYFzjoEkGvS+bbpvJibd+q6cqvNBW+EkrPm02bmhp7XA H9DOH3UxgnJ0R91kGuWKYGOJboVvQXIJN1q3HqN5j5M9HpykFeslO3s1gLwlyIIH e/0UpZP0LoYQZpANbCeovuu4gSQS2YSC33j8i2I9cRZ6KtVuqEp2UQVvDflV0sOg Pm7MxqRlYQtaEGNyR91/ib6c6B07gfXfcbrLAk2I1V2zWZW5GtFfk3Xf4PjAlpYA Ip9d9u8tiXFKtSPhNmlowyE+dQDstKrv7FFYWfjp2lbodIeGQpr28KWW7MIuUc57 xeioRTpf6y1kuGNaNHz0VN15Z7E2fOLMvmqurzGsIQKBgQDRUq0uI1wa70EDxE3J PxPiZ2aX81fTaVxhv9am5fl7Eb6lLu/V8nYqNZtWCUfwirQnzj5SK2RRO+OKmH9l M58g7QvRfDOh7MmLRGXS5+9nhmjPMvEv+7RPq4uwiPn9gSfI2NHJLcMpdRE7ojcG OZF6zxnusPrmEK5eilnw1WpAcQKBgQDCBItyI5h1OE3QXM6RAKrE0VW1Us6eu7sc wNNV6y5aORn+RdOQFQX303TT3X+7DP/FBJCVFvdKnO+P6wTT7+bmK6x65MIJDqEI gAa0+Xc5LZRGv0jGAzzit/Biy0EhLu+XOsBXpGyF9qLrdQuUhEUqi81sM2FGcA2I vtBL4dzvYwKBgQCNGY8Vh85hdZ+8u0m3+6YauprEmMs9/krAtYErNeCrHfYGARK4 hF007LfOEimFMupn3rXRy+AuhhFG7q8Jd/evSTrrNi7T2vqsvyloNuIBRfBGo09D igcsoTVjhaIGSVaZI9aeJxPkUT6RlTJEJvAy+YHAjVpDVUFFBzvDhQi/cQKBgBk6 kg9zhX2opqWzi8DbP1l8hxKfA/MsIjao9FI11L8ysaiY19vif/Yr7wMlyFhAZnnu EAbzB5ESOyyRuPz+Mx43C6SnXnvjBRmf3D9oORKcVK2mbgYhoacxl/agy4VPHySh JSXAYcRBwAmyHKFhWcUgjMPHIp0QMRJZDajwY9RVAoGAPLFojNBnu5smAsdZtkg8 HbLFL8iPT96w8ZarCHH+XLywlzjG02c0XDQIC5QeopKRbg0NmJJImmwWIJGhjXC0 dYfI6Lw45AhpQsANPM2dB5ak+3TJGr2RvpSIF6M0+CA69A+VL7NOeBt0acXZv9p7 rSbwm9Ewfog/UaoT+fUUfcs= -----END PRIVATE KEY----- """) ), Cert( names=[ "a.domain.com", "b.domain.com", "*.domain.com", #"localhost", # don't clash with the other "localhost" cert "127.0.0.1", "0:0:0:0:0:0:0:1" ], # Note: This cert is signed by a cert not present in this file # (rather than being self-signed). pubcert=strip(""" -----BEGIN CERTIFICATE----- MIIEADCCAuigAwIBAgIRAJ3dtx28bAfwdex3/R/ETrAwDQYJKoZIhvcNAQELBQAw cjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAk1BMQ8wDQYDVQQHEwZCb3N0b24xGDAW BgNVBAoTD0FtYmFzc2Fkb3IgTGFiczEUMBIGA1UECxMLRW5naW5lZXJpbmcxFTAT BgNVBAMTDGEuZG9tYWluLmNvbTAgFw0yMTExMTAxMzEyMDBaGA8yMDk5MTExMDEz MTIwMFowcjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAk1BMQ8wDQYDVQQHEwZCb3N0 b24xGDAWBgNVBAoTD0FtYmFzc2Fkb3IgTGFiczEUMBIGA1UECxMLRW5naW5lZXJp bmcxFTATBgNVBAMTDGEuZG9tYWluLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEP ADCCAQoCggEBAOBpsKtx/b4PEReo2nZj6aaXW7leNtpZlfy3XgfTKnuGsHicuDrf Pgcapqllm9o9H/F6Y9NhpBliJJmZk90S6UR/BlIWEKLMkXal78yQJU9cluvh0lmA e2FFTK3Yis1kWsGvbOEusnCerFXUbjWCLr9VfLo33oYiSbfo9r+f/o0Q0Q/QPevV Vmd9yuxGIeZlucno/TK4yicGW8awATH0JsvKfbEDf0drztgeFq8RynlkNxEH56Qw 6tLS1rJ6CRY5yyYImwtA3/zyZzSTsSgm7EMYhPg4JSf0wuLTY1uOjfvidfIwhCGu Qxy8h8Z0eAQl0YigXersY2FL4MULD6PqrK0CAwEAAaOBjjCBizAOBgNVHQ8BAf8E BAMCBaAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBWBgNVHREE TzBNggxhLmRvbWFpbi5jb22CDGIuZG9tYWluLmNvbYIMKi5kb21haW4uY29tggls b2NhbGhvc3SHBH8AAAGHEAAAAAAAAAAAAAAAAAAAAAEwDQYJKoZIhvcNAQELBQAD ggEBADdqgP0oBxv/wcctrpgdhfgzurWbUFE3VD3/540WFLmA6OrE5OsN8q3AVz7M 5XtQDBJDQR7I7cGrXXdnJuvTi7RhO2JduAW+oO+ZtRN1yUk4bzmVJzNRAKNGxsPZ NGvPacZyEDwmIodqUUOXIQnmJyvKd7pHuQyPyNDZkuVyH/z7m0vutBXSm4DbZ/Ml Osh6zGQ9OUwy+4wCFi+PGDnHnGr4FuKzv1ZpSGiycA3l8aUu4qZ7a8gLtHe8UXa+ W2OKptRz/ACOsjKEQjCwWXjOV5/LJwtI2qAM/BUEY/GiHeJoNT515bt/sh7yC4Cn pgEAi+5QCFXEtyrT2rtCGfzYZZY= -----END CERTIFICATE----- """), privkey=strip(""" -----BEGIN PRIVATE KEY----- MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDgabCrcf2+DxEX qNp2Y+mml1u5XjbaWZX8t14H0yp7hrB4nLg63z4HGqapZZvaPR/xemPTYaQZYiSZ mZPdEulEfwZSFhCizJF2pe/MkCVPXJbr4dJZgHthRUyt2IrNZFrBr2zhLrJwnqxV 1G41gi6/VXy6N96GIkm36Pa/n/6NENEP0D3r1VZnfcrsRiHmZbnJ6P0yuMonBlvG sAEx9CbLyn2xA39Ha87YHhavEcp5ZDcRB+ekMOrS0tayegkWOcsmCJsLQN/88mc0 k7EoJuxDGIT4OCUn9MLi02Nbjo374nXyMIQhrkMcvIfGdHgEJdGIoF3q7GNhS+DF Cw+j6qytAgMBAAECggEAdAXQpGMT+B5cDOpswEbZtxqL/qN6IpuskvLOt6byUNkL BeCo0y82J4Ac6HmzATsW98b6M4BI0iLOn2cqbmLnnVU7FFd6FGFFV51lBFMGJyjM knm3QjTOFTU59qt838Hhtj+XQDjfYqB2ow1oSVvcBWoSSUi3UIwLpvzYDayPc6hk 65Jq4tlA6iEfXtwmVIcn5k14lXXVMof9kIAPEoZCKl++RDaUCFwJBH4SI6yN+VkN aKKVRxL4dsk6AyubJ/dZW91VfBTaQUs4487s3sQ5Ybk0dCcRjoZw1lT0fYvfR/Hc 2zCvuNndKz1luPB/wXNsQ2cPEuXXMOtE4tF9LKOqFQKBgQDjM0aC1jd1AzKwNtsW E3kS3tKi32d2jq+IekP0ITJZ5tbTXczIMZPvkZIUPz5bKtCnIhiUQd8TxHGI0DPX VwchFQcRxSsfWXf+4ilnAKqJc7ZLMSBzbIJOEVvQagP5ChNU5qfoqKICyE7UlbEZ Xrgp3SunaK+Js5rf3pKppcHtZwKBgQD82/YUWYBD1+vN3Np8sGhagcjlRw1WhhlW trEYei7ILrspP602Xy7gn77UequVKQiLZRgQrg+RRrcwKGvokYGrNpbEoD27sjzh 5VThS4ZEcA9o1IHMDu81Yny6ZtI9F3TldIMP81fGaEekxa+q4XRpYl63LIeeND/0 EB7WLLG0ywKBgQCW4Fklz53aTbpefL82xM21M1WLpXHusEhvCEqSF215eCsXCAZS t2G3SONKIMmG/0K6ipDp+2hplx2SLjkO+pMYa/9a1KWTVvWxxHycEzwstTPMcR5M qDVMJIjlOVHUEtXNnrLIdRvJXz3CPHn0EAuaeW5g6MsRVb02h3a7xACpZwKBgBCa JKMbaUeLEsl2ecX8Ey32HYmoS6Dltx4xaplP1GiCYPmJW8cZIsvO0UnEMCXgBtaY MadOtmj0eqynysX/X8MtF2MbnlIHluXCF/ue6NbvgKOCaG9Mf7pCmCvo+l7Wfm9e YgiXEqlNSX7xF+KhYPJWah+exdzGU3ij4lJvps9XAoGAGf/f9ob2tLmMacLISKdd OOuJz2jSzi+ZuoISiN2tQccBuwzf4cWPY27duUum8lD5+gFxZjUav1npQWrugtxT OqTouIFDHW+jluzNa++cT2FVM2Tj5G9uKwVxS3SfITfZEHRmfoxwWmrmn+wgz+do NuVfL7r0erO8V2bLW2ASEDs= -----END PRIVATE KEY----- """) ), Cert( names=["acook"], pubcert=strip(""" -----BEGIN CERTIFICATE----- MIIDqjCCApKgAwIBAgIRAKcrynhenFaTcxKOdiGvT6QwDQYJKoZIhvcNAQELBQAw azELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAk1BMQ8wDQYDVQQHEwZCb3N0b24xGDAW BgNVBAoTD0FtYmFzc2Fkb3IgTGFiczEUMBIGA1UECxMLRW5naW5lZXJpbmcxDjAM BgNVBAMTBWFjb29rMCAXDTIxMTExMDEzMTIwMFoYDzIwOTkxMTEwMTMxMjAwWjBr MQswCQYDVQQGEwJVUzELMAkGA1UECBMCTUExDzANBgNVBAcTBkJvc3RvbjEYMBYG A1UEChMPQW1iYXNzYWRvciBMYWJzMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEOMAwG A1UEAxMFYWNvb2swggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDAg4ss Hk+na8ygSofzl8O4hIcISKs61iFX002Vo4MxyLPbydxvKvekYHrA/CKbzJfNsECX 0V1+waFPRhoDqZrkG2RBIl2pW4GwFl3eCbr9JyWKrSHA4XH7cLcAuGd5FmeOHKPb Hfn6dWVgBXws8ykSX3r/A3A5+l2xnE81jtYPOr4rtyYUCJF60yQ/w7FvSfXZIO8l hc6qncfzFm1Pg8SZPi9hhoL7/AzmQ+iuqG624VuanKppFDx5yq10X6guH6faVpbf ErrHOIP0N7KcZZjl0bnQdZVlVzXMe+Sra8xWuGqfjMmcL2LkzvtdkTv2AC+8rbNM iaa564JoTcj5znYDAgMBAAGjRzBFMA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAK BggrBgEFBQcDATAMBgNVHRMBAf8EAjAAMBAGA1UdEQQJMAeCBWFjb29rMA0GCSqG SIb3DQEBCwUAA4IBAQAdl8MopS5T3LSo50RPgf7+OiTsCy9V37QIGkctZTGK5s/9 Xiv/XQ8r/wYs3RTMlE9IsjPHyTkQ01FxwUQTliSM+6fpnYaRfVLPZlYNnz1S4j1S pxiM6LcD/Ld0M5faRjCxMmLWqgzrwD6bhV/AS4zmLW3QSHiI8W4L+0q6zp3/4u0D lCR3ObLpjoZq0mLTHqJExGZAcioafgxzl5pwKy9YtUO3acYv8CuJOZzyqbpCKXTa f+n5Tslk+UdHlBb+4cm8VkExnZ+2+AWPrujvUzy60GW1tCWswfz9ZDaM4lLO4CyU 1KEHBiKzK5s/c774GnHhGus3SoPsSCqENImvZb/x -----END CERTIFICATE----- """), privkey=strip(""" -----BEGIN PRIVATE KEY----- MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDAg4ssHk+na8yg Sofzl8O4hIcISKs61iFX002Vo4MxyLPbydxvKvekYHrA/CKbzJfNsECX0V1+waFP RhoDqZrkG2RBIl2pW4GwFl3eCbr9JyWKrSHA4XH7cLcAuGd5FmeOHKPbHfn6dWVg BXws8ykSX3r/A3A5+l2xnE81jtYPOr4rtyYUCJF60yQ/w7FvSfXZIO8lhc6qncfz Fm1Pg8SZPi9hhoL7/AzmQ+iuqG624VuanKppFDx5yq10X6guH6faVpbfErrHOIP0 N7KcZZjl0bnQdZVlVzXMe+Sra8xWuGqfjMmcL2LkzvtdkTv2AC+8rbNMiaa564Jo Tcj5znYDAgMBAAECggEANMrd+3dEeLEDKGHH7nEL5ynQreDfs/7Mnf0AJaz1aU2U pQ0yOfoadyVOBGYgR4FPj8Rpsjhj30LSLZ8XuzFjnHI2h/YYoTzKz7MSgrVAZfO6 Q9E+lFo+m6lJRhVLqtUOCNapyIjr6FcROcfHSbxU4wjz/cK/n+ackvw+bH2DDiGf QsLH+sn8eLc231DvK4pCWwtybYJYXV06m1nqN6/TcxDbewmq2lma6qEFaLp3JEjb 4TK5f1gY3Q3iLG/kwBK8R7E0w0VBzizkb5c8nTPdKN6B+NI5T3AhRwV2PkXHIrJV T1lKHzNJ2QiYmqqUoiACGLpTOpT5euJvoRw6jFaJAQKBgQDGOdJYKB0I4sLh+9zq K0MsBK4pzgk4gywTNY645EnsfcaY0Pj3FZY+56CTu+9B9KYwkVMCaqMptwsVyffJ G22eAQUY6xfbocGfPdi9K0VB2kH35+BPjXSWuMY+xTnNFYV+u8FmuHmk3w3EzFdJ jHE2k94f9CscgsRXQYeeivczoQKBgQD4n4g73aXNuemiSxVZv4iOYj1cqRFFa8tj mJnqS/khSD9CEYielp9kEfRL3SFyD6nfgwL3OF14VdNCvHAsVcPspE7dU53P4muh sy9SmAkAqCP49Vfgrz1gW1knz82Gkc0aPt1QMaKVONQp0JjTEIzrPxVCey3+gjGP RHYeAPkHIwKBgDgj7ifbjIWUu38HNwT3JboUxUK/wKrJs7TpCTfiJ/GbmaB0Jt7L tVaxgS/2HQgAAwVkUy8vBnDtD22nWs8RPpVuUoRBKOuiP1UbTgQdeirxZpeQi13c gTWitTrX3svvmXRQNrEh9Am2xo6DFQGWjgXYESPZolAb1QGlZISJdQOhAoGAcjb/ o9joIYFl1ju9/DPkLNzuqZG1sHmbvw5Mrvjl4ydIgDaD168EXDlvTCazBa4ycM7D 3wSS1ARBgCgHNCbWUfENldmi5uxyW59wfvX/NMEJfYZgL4TxokF0zLhHB6oVWhhF HWEf+oNX3DnK6zNwOWYKgzcJYyE2WUWvKYty25cCgYEAp9Q4W7Ob86NLpV4ly80m sqoTsyx3rjxWKxzxPPfV2OaLC7C5v+WPaewzsKmr4GKmAmJoXsSCUevYiO0vuWfh Kwa//xmc5pgnSmGaUE1XKN59iMJBYzC7CaljdxtuZSipLhZhZfWS3IZqnJYQyjI8 mBtaOgOj5lu1xVKdSm/8Gp4= -----END PRIVATE KEY----- """) ), ] TLSCerts: Dict[str, Cert] = { k: v for v in _TLSCerts for k in v.names }
62.748264
77
0.765376
1,380
36,143
20.042754
0.768841
0.006508
0.005532
0.009111
0.033009
0.026357
0.025164
0.010304
0.007701
0.004772
0
0.120563
0.194727
36,143
575
78
62.857391
0.829754
0.015217
0
0.20841
1
0
0.952948
0.745601
0
1
0
0
0
1
0.005484
false
0
0.003656
0.005484
0.021938
0
0
0
1
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
1
0
0
0
0
0
0
0
0
0
0
0
0
5
f4c02ef485b76fa66ffe20370b9cbcaaf494af1f
86
py
Python
tests/mock_auth_controller.py
thadk/us-congress-pizza-flag-tracker
428cc9d6f68cdcc77ea30015fd06de20b8eb1da8
[ "CC0-1.0" ]
null
null
null
tests/mock_auth_controller.py
thadk/us-congress-pizza-flag-tracker
428cc9d6f68cdcc77ea30015fd06de20b8eb1da8
[ "CC0-1.0" ]
null
null
null
tests/mock_auth_controller.py
thadk/us-congress-pizza-flag-tracker
428cc9d6f68cdcc77ea30015fd06de20b8eb1da8
[ "CC0-1.0" ]
null
null
null
def set_authorize_current_user(): pass def check_update_order_allowed(): pass
17.2
33
0.767442
12
86
5
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.162791
86
5
34
17.2
0.833333
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0.5
true
0.5
0
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
1
0
0
0
0
0
5
f4c3b73e35f6610f682b3a355b25eb4bf8a0e3f7
14
py
Python
test.py
AmbitiousOne/csws-week1
302751c348d1964f23ecf2fcc67c28d50afa72a0
[ "Apache-2.0" ]
null
null
null
test.py
AmbitiousOne/csws-week1
302751c348d1964f23ecf2fcc67c28d50afa72a0
[ "Apache-2.0" ]
null
null
null
test.py
AmbitiousOne/csws-week1
302751c348d1964f23ecf2fcc67c28d50afa72a0
[ "Apache-2.0" ]
null
null
null
print("laura")
14
14
0.714286
2
14
5
1
0
0
0
0
0
0
0
0
0
0
0
0
14
1
14
14
0.714286
0
0
0
0
0
0.333333
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
f4c909d23c0db2dbec476686df6e8488f623851a
121
py
Python
backend/waqur/admin.py
crowdbotics-apps/tstec20211223-32572
47487c035162e2fdffc1ed3c6bf7d84baf06e0ba
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/waqur/admin.py
crowdbotics-apps/tstec20211223-32572
47487c035162e2fdffc1ed3c6bf7d84baf06e0ba
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/waqur/admin.py
crowdbotics-apps/tstec20211223-32572
47487c035162e2fdffc1ed3c6bf7d84baf06e0ba
[ "FTL", "AML", "RSA-MD" ]
null
null
null
from django.contrib import admin from .models import Test123 admin.site.register(Test123) # Register your models here.
17.285714
32
0.801653
17
121
5.705882
0.647059
0
0
0
0
0
0
0
0
0
0
0.057143
0.132231
121
6
33
20.166667
0.866667
0.214876
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
f4da3b8d7e5dd3067b199ad09bc1081533a064b4
93
py
Python
run.py
cabusto/nhlchampionshipbelt
962bf44030d7bd9827ceb5791763f95c7bcfb74a
[ "MIT" ]
null
null
null
run.py
cabusto/nhlchampionshipbelt
962bf44030d7bd9827ceb5791763f95c7bcfb74a
[ "MIT" ]
3
2021-11-08T08:23:29.000Z
2022-03-31T08:29:52.000Z
run.py
cabusto/nhlchampionshipbelt
962bf44030d7bd9827ceb5791763f95c7bcfb74a
[ "MIT" ]
1
2015-11-27T16:14:28.000Z
2015-11-27T16:14:28.000Z
from app import app #app.run(debug = False) app.run(debug = True, port=4000, host='0.0.0.0')
23.25
48
0.677419
19
93
3.315789
0.578947
0.095238
0.349206
0
0
0
0
0
0
0
0
0.098765
0.129032
93
3
49
31
0.679012
0.236559
0
0
0
0
0.1
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
52278f345f49aec0058ed0b7839708ea4eba91a3
111
py
Python
MotunrayoKoyejo/Phase 1/Python Basic 1/Day4/Q30.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
6
2020-05-23T19:53:25.000Z
2021-05-08T20:21:30.000Z
MotunrayoKoyejo/Phase 1/Python Basic 1/Day4/Q30.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
8
2020-05-14T18:53:12.000Z
2020-07-03T00:06:20.000Z
MotunrayoKoyejo/Phase 1/Python Basic 1/Day4/Q30.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
39
2020-05-10T20:55:02.000Z
2020-09-12T17:40:59.000Z
b = int(input("Input the base : ")) h = int(input("Input the height : ")) area = b*h/2 print("area = ", area)
18.5
37
0.576577
19
111
3.368421
0.526316
0.25
0.40625
0.5
0
0
0
0
0
0
0
0.011236
0.198198
111
6
38
18.5
0.707865
0
0
0
0
0
0.383929
0
0
0
0
0
0
1
0
false
0
0
0
0
0.25
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
524a1ba28719e52bd72783e2382a66ff6ce7c943
193
py
Python
Homework_Solutions/logical_operator.py
hamburgcodingschool/L2C-Python-1804
3420691aaee81fb88b2e8e21763014bc91d2ed96
[ "MIT" ]
null
null
null
Homework_Solutions/logical_operator.py
hamburgcodingschool/L2C-Python-1804
3420691aaee81fb88b2e8e21763014bc91d2ed96
[ "MIT" ]
null
null
null
Homework_Solutions/logical_operator.py
hamburgcodingschool/L2C-Python-1804
3420691aaee81fb88b2e8e21763014bc91d2ed96
[ "MIT" ]
null
null
null
print(True and True) # True print(True and False) # False print(False and False) # False print("------") print(True or True) # True print(True or False) # True print(False or False) # False
17.545455
30
0.678756
31
193
4.225806
0.16129
0.274809
0.183206
0.259542
0
0
0
0
0
0
0
0
0.176166
193
11
31
17.545455
0.823899
0.165803
0
0
0
0
0.039216
0
0
0
0
0
0
1
0
true
0
0
0
0
1
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
1
0
5
52622b249ea2d919c1d2100b8c3257403da49056
582
py
Python
src/sortingandsearching/tests/test_distinct_numbers.py
seahrh/cses-problem-set-python
53e8dba200893cc13a0f7b66fc18e55fa0af137a
[ "MIT" ]
null
null
null
src/sortingandsearching/tests/test_distinct_numbers.py
seahrh/cses-problem-set-python
53e8dba200893cc13a0f7b66fc18e55fa0af137a
[ "MIT" ]
null
null
null
src/sortingandsearching/tests/test_distinct_numbers.py
seahrh/cses-problem-set-python
53e8dba200893cc13a0f7b66fc18e55fa0af137a
[ "MIT" ]
null
null
null
from sortingandsearching.distinct_numbers import * class TestDistinctNumbers: def test_array_length_of_2_or_less(self): assert count_distinct([]) == 0 assert count_distinct([1]) == 1 assert count_distinct([1, 1]) == 1 assert count_distinct([2, 1]) == 2 def test_case_1(self): assert count_distinct([2, 3, 2, 2, 3]) == 2 def test_case_2(self): assert count_distinct([7, 4, 10, 9, 6, 1, 8, 2, 5, 3]) == 10 def test_case_3(self): assert count_distinct([5, 9, 5, 5, 10, 9, 3, 1, 8, 8]) == 6
30.631579
69
0.584192
89
582
3.595506
0.325843
0.240625
0.415625
0.2875
0.19375
0
0
0
0
0
0
0.104513
0.276632
582
18
70
32.333333
0.655582
0
0
0
0
0
0
0
0
0
0
0
0.538462
1
0.307692
false
0
0.076923
0
0.461538
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
1
0
1
0
0
0
0
0
0
0
5
526b03485ea0cc5d6833f623c096cee58761e847
226
py
Python
ticker/templatetags/lastweek.py
yusenjeng/invintdex
ea68477d248ca8bdb4d62fd09ee4008e01cb831c
[ "MIT" ]
null
null
null
ticker/templatetags/lastweek.py
yusenjeng/invintdex
ea68477d248ca8bdb4d62fd09ee4008e01cb831c
[ "MIT" ]
null
null
null
ticker/templatetags/lastweek.py
yusenjeng/invintdex
ea68477d248ca8bdb4d62fd09ee4008e01cb831c
[ "MIT" ]
null
null
null
from django import template from datetime import datetime, timedelta register = template.Library() @register.simple_tag def lastweek(format_string): return (datetime.now() + timedelta(weeks=-1)).strftime(format_string)
22.6
73
0.783186
28
226
6.214286
0.678571
0.137931
0
0
0
0
0
0
0
0
0
0.005
0.115044
226
9
74
25.111111
0.865
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0.166667
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
1
1
0
0
5
52749b8b247a077ee80f1ef2d53435f245286717
481
py
Python
docs/archive/0.2-cleanup/fireworks/tutorial/step9a.py
sjdv1982/seamless
1b814341e74a56333c163f10e6f6ceab508b7df9
[ "MIT" ]
15
2017-06-07T12:49:12.000Z
2020-07-25T18:06:04.000Z
docs/archive/0.2-cleanup/fireworks/tutorial/step9a.py
sjdv1982/seamless
1b814341e74a56333c163f10e6f6ceab508b7df9
[ "MIT" ]
110
2016-06-21T23:20:44.000Z
2022-02-24T16:15:22.000Z
docs/archive/0.2-cleanup/fireworks/tutorial/step9a.py
sjdv1982/seamless
1b814341e74a56333c163f10e6f6ceab508b7df9
[ "MIT" ]
6
2016-06-21T11:19:22.000Z
2019-01-21T13:45:39.000Z
# Texture generator ctx.params_gen_texture = cell(("cson", "seamless", "transformer_params")) link(ctx.params_gen_texture, ".", "params_gen_texture.cson") if not ctx.params_gen_texture.value: ### kludge: to be fixed in seamless 0.2 ctx.params_gen_texture.set("{}") ctx.gen_texture = transformer(ctx.params_gen_texture) link(ctx.gen_texture.code.cell(), ".", "cell-gen-texture.py") ctx.texture = cell("array") ctx.texture.set_store("GLTex", 2) #OpenGL texture store, 2D texture
48.1
76
0.746362
73
481
4.69863
0.383562
0.262391
0.279883
0.276968
0
0
0
0
0
0
0
0.009132
0.089397
481
9
77
53.444444
0.773973
0.176715
0
0
0
0
0.220513
0.058974
0
0
0
0
0
1
0
true
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
1
0
0
0
0
0
0
5
527848dad455ed87c086df397732f38444e64dd4
62
py
Python
knx_stack/encode/layer/transport/t_disconnect/__init__.py
majamassarini/knx-stack
11a9baac6b7600649b5fbca43c93b200b23676b4
[ "MIT" ]
2
2021-07-28T07:42:28.000Z
2022-01-25T18:56:05.000Z
knx_stack/encode/layer/transport/t_disconnect/__init__.py
majamassarini/knx-stack
11a9baac6b7600649b5fbca43c93b200b23676b4
[ "MIT" ]
6
2021-07-25T21:36:01.000Z
2022-02-20T21:11:31.000Z
knx_stack/encode/layer/transport/t_disconnect/__init__.py
majamassarini/knx-stack
11a9baac6b7600649b5fbca43c93b200b23676b4
[ "MIT" ]
null
null
null
from knx_stack.encode.layer.transport.t_disconnect import req
31
61
0.870968
10
62
5.2
1
0
0
0
0
0
0
0
0
0
0
0
0.064516
62
1
62
62
0.896552
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
bff45f3adaefe9be2d6f187eb9fdb80e3b497b3d
137
py
Python
torch_runner/__init__.py
grohith327/Torch-Runner
ccf429502585deab25d7b626c3940d358f9f924c
[ "MIT" ]
null
null
null
torch_runner/__init__.py
grohith327/Torch-Runner
ccf429502585deab25d7b626c3940d358f9f924c
[ "MIT" ]
null
null
null
torch_runner/__init__.py
grohith327/Torch-Runner
ccf429502585deab25d7b626c3940d358f9f924c
[ "MIT" ]
null
null
null
from .utils import seed_everything, AverageMeter, EarlyStopping from .train_module import TrainerModule from .config import TrainerConfig
45.666667
63
0.868613
16
137
7.3125
0.75
0
0
0
0
0
0
0
0
0
0
0
0.094891
137
3
64
45.666667
0.943548
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
871738c7752fcc24f4905cc1b22882fa5be83d53
274
py
Python
flock/controller/rfxcom/transport.py
MainRo/python-flock
e1faa78d6aba374493336651848daadad82387a8
[ "MIT" ]
null
null
null
flock/controller/rfxcom/transport.py
MainRo/python-flock
e1faa78d6aba374493336651848daadad82387a8
[ "MIT" ]
null
null
null
flock/controller/rfxcom/transport.py
MainRo/python-flock
e1faa78d6aba374493336651848daadad82387a8
[ "MIT" ]
null
null
null
from twisted.internet.serialport import SerialPort class RfxcomTransport(SerialPort): def __init__(self, protocol, deviceNameOrPortNumber, reactor): super(RfxcomTransport, self).__init__(protocol, deviceNameOrPortNumber, reactor, baudrate='38400')
34.25
79
0.762774
24
274
8.375
0.666667
0.298507
0.368159
0
0
0
0
0
0
0
0
0.021552
0.153285
274
7
80
39.142857
0.844828
0
0
0
0
0
0.018248
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.6
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
5
8726ae5a92da0e20ea3b583b9abd78270844b06c
136
py
Python
python/__init__.py
music2score/music2score
1261c3aad8425590196f298277b5f5db6c539b08
[ "MIT" ]
null
null
null
python/__init__.py
music2score/music2score
1261c3aad8425590196f298277b5f5db6c539b08
[ "MIT" ]
1
2021-03-02T07:17:59.000Z
2021-03-02T07:17:59.000Z
python/__init__.py
music2score/music2score
1261c3aad8425590196f298277b5f5db6c539b08
[ "MIT" ]
1
2022-01-25T03:35:14.000Z
2022-01-25T03:35:14.000Z
'''from constants import * from jobs import * from download import * from convert import * from upload import * from polling import* '''
19.428571
26
0.742647
18
136
5.611111
0.444444
0.49505
0
0
0
0
0
0
0
0
0
0
0.169118
136
7
27
19.428571
0.893805
0.948529
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
5e3f4a55c8bd023583964d5b56fb107b5f449a9a
38
py
Python
tests/__init__.py
ElDiabloRojo/eks_auth
c87430d82b70698958cd75b710ccda8cfcbbbb96
[ "MIT" ]
1
2020-10-13T19:51:18.000Z
2020-10-13T19:51:18.000Z
tests/__init__.py
ElDiabloRojo/eks_auth
c87430d82b70698958cd75b710ccda8cfcbbbb96
[ "MIT" ]
537
2020-04-23T21:06:54.000Z
2022-03-31T17:42:17.000Z
tests/__init__.py
ElDiabloRojo/eks_auth
c87430d82b70698958cd75b710ccda8cfcbbbb96
[ "MIT" ]
null
null
null
"""Unit test package for eks_auth."""
19
37
0.684211
6
38
4.166667
1
0
0
0
0
0
0
0
0
0
0
0
0.131579
38
1
38
38
0.757576
0.815789
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
5e793abf2c7b5e57e557c2810e7bedcbb617f1eb
207
py
Python
unit_tests/helper_functions.py
realvitya/fmcapi
38fb9a8da2d9ebbadf4ed4cb559244646b3bf3be
[ "BSD-3-Clause" ]
57
2017-06-13T17:06:20.000Z
2021-07-27T08:53:25.000Z
unit_tests/helper_functions.py
realvitya/fmcapi
38fb9a8da2d9ebbadf4ed4cb559244646b3bf3be
[ "BSD-3-Clause" ]
66
2017-11-09T16:02:45.000Z
2021-08-04T20:52:41.000Z
unit_tests/helper_functions.py
realvitya/fmcapi
38fb9a8da2d9ebbadf4ed4cb559244646b3bf3be
[ "BSD-3-Clause" ]
56
2017-06-08T07:53:12.000Z
2021-07-30T13:26:47.000Z
"""Methods to assist making unit_tests""" import string import random def id_generator(size=6, chars=string.ascii_uppercase + string.digits): return "".join(random.choice(chars) for _ in range(size))
23
71
0.748792
30
207
5.033333
0.8
0
0
0
0
0
0
0
0
0
0
0.005556
0.130435
207
8
72
25.875
0.833333
0.169082
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.5
0.25
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
5
5e81e9784011e67975df19251d5dff500c56ca67
182
py
Python
ceci/errors.py
LSSTDESC/ceci
7043ae5776d9b2c210a26dde6f84bcc2366c56e7
[ "BSD-3-Clause" ]
5
2018-11-08T14:09:16.000Z
2021-11-29T23:36:36.000Z
ceci/errors.py
LSSTDESC/ceci
7043ae5776d9b2c210a26dde6f84bcc2366c56e7
[ "BSD-3-Clause" ]
54
2018-04-03T17:04:11.000Z
2022-02-24T13:38:23.000Z
ceci/errors.py
LSSTDESC/ceci
7043ae5776d9b2c210a26dde6f84bcc2366c56e7
[ "BSD-3-Clause" ]
7
2018-04-02T21:15:36.000Z
2021-12-01T04:17:21.000Z
class DuplicateStageName(TypeError): pass class IncompleteStage(TypeError): pass class StageNotFound(ValueError): pass class ReservedNameError(TypeError): pass
12.133333
36
0.747253
16
182
8.5
0.5
0.286765
0.264706
0
0
0
0
0
0
0
0
0
0.186813
182
14
37
13
0.918919
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
1
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
1
0
0
0
0
0
5
5eba3b49c2e06c076ce1c23009047c9470e5bc9d
38
py
Python
aiogithubapi/models/__init__.py
timmo001/aiogithubapi
9d33bad77e49f8ee720bcd81c2cbab8a4cf8ebac
[ "MIT" ]
8
2019-07-24T18:14:25.000Z
2022-03-01T18:33:53.000Z
aiogithubapi/models/__init__.py
timmo001/aiogithubapi
9d33bad77e49f8ee720bcd81c2cbab8a4cf8ebac
[ "MIT" ]
33
2019-12-18T22:15:06.000Z
2022-03-30T06:08:38.000Z
aiogithubapi/models/__init__.py
timmo001/aiogithubapi
9d33bad77e49f8ee720bcd81c2cbab8a4cf8ebac
[ "MIT" ]
14
2019-09-02T17:50:16.000Z
2022-03-14T10:30:37.000Z
"""Initialise aiogithubapi models."""
19
37
0.736842
3
38
9.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.078947
38
1
38
38
0.8
0.815789
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
0d842fb9a72dcb9e10301f68da23bc0046b119e4
21,719
py
Python
openmdao/components/tests/test_spline_comp.py
hschilling/blue
0ef1f0eeb934d8cd4ef0a02add6ba3c3a13e6150
[ "Apache-2.0" ]
null
null
null
openmdao/components/tests/test_spline_comp.py
hschilling/blue
0ef1f0eeb934d8cd4ef0a02add6ba3c3a13e6150
[ "Apache-2.0" ]
1
2015-08-12T17:58:18.000Z
2015-08-12T17:58:18.000Z
openmdao/components/tests/test_spline_comp.py
hschilling/OpenMDAO
0ef1f0eeb934d8cd4ef0a02add6ba3c3a13e6150
[ "Apache-2.0" ]
1
2021-01-17T14:03:48.000Z
2021-01-17T14:03:48.000Z
""" Unit tests for the spline interpolator component. """ import unittest import numpy as np import openmdao.api as om from openmdao.components.spline_comp import SPLINE_METHODS from openmdao.utils.assert_utils import assert_check_partials, assert_near_equal from openmdao.utils.general_utils import printoptions from openmdao.utils.spline_distributions import cell_centered from openmdao.components.interp_util.interp import InterpND class SplineCompTestCase(unittest.TestCase): def setUp(self): self.x_cp = np.array([1.0, 2.0, 4.0, 6.0, 10.0, 12.0]) self.y_cp = np.array([5.0, 12.0, 14.0, 16.0, 21.0, 29.0]) self.y_cp2 = np.array([1.0, 5.0, 7.0, 8.0, 13.0, 16.0]) self.n = 50 self.x = np.linspace(1.0, 12.0, self.n) self.prob = om.Problem() def test_simple_spline(self): comp = om.SplineComp(method='akima', x_cp_val=self.x_cp, x_interp_val=self.x) self.prob.model.add_subsystem('akima1', comp) comp.add_spline(y_cp_name='ycp', y_interp_name='y_val', y_cp_val=self.y_cp) self.prob.setup(force_alloc_complex=True) self.prob.run_model() def test_multiple_splines(self): comp = om.SplineComp(method='akima', x_cp_val=self.x_cp, x_interp_val=self.x) self.prob.model.add_subsystem('akima1', comp) comp.add_spline(y_cp_name='ycp1', y_interp_name='y_val1', y_cp_val=self.y_cp) comp.add_spline(y_cp_name='ycp2', y_interp_name='y_val2', y_cp_val=self.y_cp2) self.prob.setup(force_alloc_complex=True) self.prob.run_model() def test_akima_interp_options(self): akima_option = {'delta_x': 0.1, 'eps': 1e-30} comp = om.SplineComp(method='akima', x_cp_val=self.x_cp, x_interp_val=self.x, interp_options=akima_option) self.prob.model.add_subsystem('atmosphere', comp) comp.add_spline(y_cp_name='alt_cp', y_interp_name='alt', y_cp_val=self.y_cp, y_units='kft') self.prob.setup(force_alloc_complex=True) self.prob.run_model() def test_small_akima_spline_bug(self): # Fixes a bug that only occure for a 4 point spline. prob = om.Problem() num_cp = 4 num_radial = 11 comp = om.IndepVarComp() comp.add_output("chord_cp", units="m", val=np.array([0.1, 0.2, 0.3, 0.15])) comp.add_output("theta_cp", units="rad", val=np.array([1.0, 0.8, 0.6, 0.4])) prob.model.add_subsystem("inputs_comp", comp, promotes=["*"]) x_cp = np.linspace(0.0, 1.0, num_cp) x_interp = cell_centered(num_radial, start=0.0, end=1.0) akima_options = {'delta_x': 0.1} comp = om.SplineComp(method='akima', interp_options=akima_options, x_cp_val=x_cp, x_interp_val=x_interp) comp.add_spline(y_cp_name='chord_cp', y_interp_name='chord_interp', y_units='m') comp.add_spline(y_cp_name='theta_cp', y_interp_name='theta_interp', y_units='rad') prob.model.add_subsystem('akima_comp', comp, promotes_inputs=['chord_cp', 'theta_cp'], promotes_outputs=['chord_interp', 'theta_interp']) prob.setup() # Make sure we don't get an exception prob.run_model() def test_akima_backward_compatibility(self): comp = om.SplineComp(method='akima', x_cp_val=self.x_cp, x_interp_val=self.x, interp_options={'delta_x': 0.1}) comp.add_spline(y_cp_name='ycp', y_interp_name='y_val', y_cp_val=self.y_cp) self.prob.model.add_subsystem('akima1', comp) self.prob.setup(force_alloc_complex=True) self.prob.run_model() # Verification array from openmdao 2.x using AkimaSplineComp akima_y = np.array([[ 5. , 7.20902005, 9.21276849, 10.81097162, 11.80335574, 12.1278001 , 12.35869145, 12.58588536, 12.81022332, 13.03254681, 13.25369732, 13.47451633, 13.69584534, 13.91852582, 14.14281484, 14.36710105, 14.59128625, 14.81544619, 15.03965664, 15.26399335, 15.48853209, 15.7133486 , 15.93851866, 16.16573502, 16.39927111, 16.63928669, 16.8857123 , 17.1384785 , 17.39751585, 17.66275489, 17.93412619, 18.21156029, 18.49498776, 18.78433915, 19.07954501, 19.38053589, 19.68724235, 19.99959495, 20.31752423, 20.64096076, 20.96983509, 21.37579297, 21.94811407, 22.66809748, 23.51629844, 24.47327219, 25.51957398, 26.63575905, 27.80238264, 29. ]]) assert_near_equal(akima_y.flatten(), self.prob['akima1.y_val'].flatten(), tolerance=1e-8) derivs = self.prob.check_partials(out_stream=None, method='cs') assert_check_partials(derivs, atol=1e-14, rtol=1e-14) def test_no_ycp_val(self): comp = om.SplineComp(method='akima', x_cp_val=self.x_cp, x_interp_val=self.x) comp.add_spline(y_cp_name='ycp', y_interp_name='y_val') self.prob.model.add_subsystem('akima1', comp) self.prob.setup(force_alloc_complex=True) self.prob.run_model() def test_vectorized_akima(self): xcp = np.array([1.0, 2.0, 4.0, 6.0, 10.0, 12.0]) ycp = np.array([[5.0, 12.0, 14.0, 16.0, 21.0, 29.0], [7.0, 13.0, 9.0, 6.0, 12.0, 14.0]]) n = 12 x = np.linspace(1.0, 12.0, n) comp = om.SplineComp(method='akima', vec_size=2, x_cp_val=xcp, x_interp_val=x, interp_options={'delta_x': 0.1}) comp.add_spline(y_cp_name='ycp', y_interp_name='y_val', y_cp_val=ycp) self.prob.model.add_subsystem('akima1', comp) self.prob.setup(force_alloc_complex=True) self.prob.run_model() y = np.array([[ 5. , 12. , 13.01239669, 14. , 14.99888393, 16. , 17.06891741, 18.26264881, 19.5750558 , 21. , 24.026042, 29. ], [ 7. , 13. , 11.02673797, 9. , 7.09090909, 6. , 6.73660714, 8.46428571, 10.45982143, 12. , 13.08035714, 14. ]]) assert_near_equal(y.flatten(), self.prob['akima1.y_val'].flatten(), tolerance=1e-8) derivs = self.prob.check_partials(out_stream=None, method='cs') assert_check_partials(derivs, atol=1e-14, rtol=1e-14) def test_vectorized_all_derivs(self): xcp = np.array([1.0, 2.0, 4.0, 6.0, 10.0, 12.0]) ycp = np.array([[5.0, 12.0, 14.0, 16.0, 21.0, 29.0], [7.0, 13.0, 9.0, 6.0, 12.0, 14.0]]) n = 12 x = np.linspace(1.0, 12.0, n) for method in SPLINE_METHODS: prob = om.Problem() # These methods have their own test. if method in ['akima', 'bsplines']: continue opts = {} comp = om.SplineComp(method=method, vec_size=2, x_cp_val=xcp, x_interp_val=x, interp_options=opts) comp.add_spline(y_cp_name='ycp', y_interp_name='y_val', y_cp_val=ycp) prob.model.add_subsystem('interp1', comp) prob.setup(force_alloc_complex=True) prob.run_model() if method.startswith('scipy'): derivs = prob.check_partials(out_stream=None) assert_check_partials(derivs, atol=1e-7, rtol=1e-7) else: derivs = prob.check_partials(out_stream=None, method='cs') assert_check_partials(derivs, atol=1e-12, rtol=1e-12) def test_bspline_interp_basic(self): prob = om.Problem() model = prob.model n_cp = 80 n_point = 160 t = np.linspace(0, 3.0*np.pi, n_cp) tt = np.linspace(0, 3.0*np.pi, n_point) x = np.sin(t) model.add_subsystem('px', om.IndepVarComp('x', val=x)) bspline_options = {'order': 4} comp = om.SplineComp(method='bsplines', x_interp_val=tt, num_cp=n_cp, interp_options=bspline_options) prob.model.add_subsystem('interp', comp) comp.add_spline(y_cp_name='h_cp', y_interp_name='h', y_cp_val=x, y_units='km') model.connect('px.x', 'interp.h_cp') prob.setup(force_alloc_complex=True) prob.run_model() xx = prob['interp.h'].flatten() tt = np.linspace(0, 3.0*np.pi, n_point) x_expected = np.sin(tt) delta = xx - x_expected # Here we test that we don't have crazy interpolation error. self.assertLess(max(delta), .15) # And that it gets middle points a little better. self.assertLess(max(delta[15:-15]), .06) derivs = prob.check_partials(out_stream=None, method='cs') assert_check_partials(derivs, atol=1e-14, rtol=1e-14) def test_bsplines_vectorized(self): prob = om.Problem() model = prob.model n_cp = 5 n_point = 10 t = np.linspace(0, 0.5 * np.pi, n_cp) tt = np.linspace(0, 0.5 * np.pi, n_point) x = np.empty((2, n_cp)) x[0, :] = np.sin(t) x[1, :] = 2.0 * np.sin(t) t_sin = (0.5 * (1.0 + np.sin(-0.5 * np.pi + 2.0 * tt))) * np.pi * 0.5 model.add_subsystem('px', om.IndepVarComp('x', val=x)) bspline_options = {'order': 4} comp = om.SplineComp(method='bsplines', x_interp_val=t_sin, num_cp=n_cp, vec_size=2, interp_options=bspline_options) prob.model.add_subsystem('interp', comp) comp.add_spline(y_cp_name='h_cp', y_interp_name='h', y_cp_val=x, y_units='km') model.connect('px.x', 'interp.h_cp') prob.setup(force_alloc_complex=True) prob.run_model() xx = prob['interp.h'] with printoptions(precision=3, floatmode='fixed'): assert_near_equal(x[0, :], np.array([ 0., 0.38268343, 0.70710678, 0.92387953, 1. ]), 1e-5) assert_near_equal(x[1, :], 2.0*np.array([ 0., 0.38268343, 0.70710678, 0.92387953, 1. ]), 1e-5) assert_near_equal(xx[0, :], np.array([ 0., 0.06687281, 0.23486869, 0.43286622, 0.6062628, 0.74821484, 0.86228902, 0.94134389, 0.98587725, 1. ]), 1e-5) assert_near_equal(xx[1, :], 2.0*np.array([ 0., 0.06687281, 0.23486869, 0.43286622, 0.6062628, 0.74821484, 0.86228902, 0.94134389, 0.98587725, 1. ]), 1e-5) derivs = prob.check_partials(out_stream=None, method='cs') assert_check_partials(derivs, atol=1e-14, rtol=1e-14) def test_bspline_bug(self): # Tests a bug fix where the interp_options weren't passed into # the bspline interp comp bspline_options = {'order': 3} comp = om.SplineComp(method='bsplines', num_cp=6, x_interp_val=self.x, interp_options=bspline_options) self.prob.model.add_subsystem('atmosphere', comp) comp.add_spline(y_cp_name='alt_cp', y_interp_name='alt', y_cp_val=self.y_cp, y_units='kft') self.prob.setup(force_alloc_complex=True) # If we set the bspline order to 3, then k should internally be 4 self.assertEqual(comp.interps['alt'].table.k, 4) def test_error_messages(self): n_cp = 80 n_point = 160 t = np.linspace(0, 3.0*np.pi, n_cp) tt = np.linspace(0, 3.0*np.pi, n_point) x = np.sin(t) prob = om.Problem() comp = om.SplineComp(method='bsplines', x_interp_val=tt, x_cp_val=t) prob.model.add_subsystem('interp', comp) comp.add_spline(y_cp_name='h_cp', y_interp_name='h', y_cp_val=x, y_units='km') with self.assertRaises(ValueError) as cm: prob.setup() msg = "SplineComp (interp): 'x_cp_val' is not a valid option when using method 'bsplines'. " msg += "Set 'num_cp' instead." self.assertEqual(str(cm.exception), msg) prob = om.Problem() comp = om.SplineComp(method='akima', x_interp_val=tt, num_cp=n_cp, x_cp_val=t) prob.model.add_subsystem('interp', comp) comp.add_spline(y_cp_name='h_cp', y_interp_name='h', y_cp_val=x, y_units='km') with self.assertRaises(ValueError) as cm: prob.setup() msg = "SplineComp (interp): It is not valid to set both options 'x_cp_val' and 'num_cp'." self.assertEqual(str(cm.exception), msg) prob = om.Problem() comp = om.SplineComp(method='akima', x_interp_val=tt) prob.model.add_subsystem('interp', comp) comp.add_spline(y_cp_name='h_cp', y_interp_name='h', y_cp_val=x, y_units='km') with self.assertRaises(ValueError) as cm: prob.setup() msg = "SplineComp (interp): Either option 'x_cp_val' or 'num_cp' must be set." self.assertEqual(str(cm.exception), msg) def test_y_units(self): x_cp = np.array([1.0, 2.0, 4.0, 6.0, 10.0, 12.0]) y_cp = np.array([5.0, 12.0, 14.0, 16.0, 21.0, 29.0]) n = 50 x = np.linspace(1.0, 12.0, n) prob = om.Problem() model = prob.model # Set options specific to akima akima_option = {'delta_x': 0.1, 'eps': 1e-30} comp = om.SplineComp(method='akima', x_cp_val=x_cp, x_interp_val=x, interp_options=akima_option) prob.model.add_subsystem('atmosphere', comp) comp.add_spline(y_cp_name='alt_cp', y_interp_name='alt', y_cp_val=y_cp, y_units='kft') prob.setup(force_alloc_complex=True) prob.run_model() output = prob.model.list_inputs(units=True) self.assertEqual(output[0][1]['units'], 'kft') class SplineCompFeatureTestCase(unittest.TestCase): def test_basic_example(self): import numpy as np import openmdao.api as om xcp = np.array([1.0, 2.0, 4.0, 6.0, 10.0, 12.0]) ycp = np.array([5.0, 12.0, 14.0, 16.0, 21.0, 29.0]) n = 50 x = np.linspace(1.0, 12.0, n) prob = om.Problem() akima_option = {'delta_x': 0.1} comp = om.SplineComp(method='akima', x_cp_val=xcp, x_interp_val=x, interp_options=akima_option) prob.model.add_subsystem('akima1', comp) comp.add_spline(y_cp_name='ycp', y_interp_name='y_val', y_cp_val=ycp) prob.setup(force_alloc_complex=True) prob.run_model() akima_y = np.array([[ 5. , 7.20902005, 9.21276849, 10.81097162, 11.80335574, 12.1278001 , 12.35869145, 12.58588536, 12.81022332, 13.03254681, 13.25369732, 13.47451633, 13.69584534, 13.91852582, 14.14281484, 14.36710105, 14.59128625, 14.81544619, 15.03965664, 15.26399335, 15.48853209, 15.7133486 , 15.93851866, 16.16573502, 16.39927111, 16.63928669, 16.8857123 , 17.1384785 , 17.39751585, 17.66275489, 17.93412619, 18.21156029, 18.49498776, 18.78433915, 19.07954501, 19.38053589, 19.68724235, 19.99959495, 20.31752423, 20.64096076, 20.96983509, 21.37579297, 21.94811407, 22.66809748, 23.51629844, 24.47327219, 25.51957398, 26.63575905, 27.80238264, 29. ]]) assert_near_equal(akima_y.flatten(), prob.get_val('akima1.y_val').flatten(), tolerance=1e-8) def test_multi_splines(self): import numpy as np import openmdao.api as om x_cp = np.array([1.0, 2.0, 4.0, 6.0, 10.0, 12.0]) y_cp = np.array([5.0, 12.0, 14.0, 16.0, 21.0, 29.0]) y_cp2 = np.array([1.0, 5.0, 7.0, 8.0, 13.0, 16.0]) n = 50 x = np.linspace(1.0, 12.0, n) prob = om.Problem() comp = om.SplineComp(method='akima', x_cp_val=x_cp, x_interp_val=x) prob.model.add_subsystem('akima1', comp) comp.add_spline(y_cp_name='ycp1', y_interp_name='y_val1', y_cp_val=y_cp) comp.add_spline(y_cp_name='ycp2', y_interp_name='y_val2', y_cp_val=y_cp2) prob.setup(force_alloc_complex=True) prob.run_model() def test_spline_distribution_example(self): import numpy as np import openmdao.api as om from openmdao.utils.spline_distributions import sine_distribution x_cp = np.linspace(0., 1., 6) y_cp = np.array([5.0, 12.0, 14.0, 16.0, 21.0, 29.0]) n = 20 x = om.sine_distribution(20, start=0, end=1, phase=np.pi) prob = om.Problem() comp = om.SplineComp(method='akima', x_cp_val=x_cp, x_interp_val=x) prob.model.add_subsystem('akima1', comp) comp.add_spline(y_cp_name='ycp', y_interp_name='y_val', y_cp_val=y_cp) prob.setup(force_alloc_complex=True) prob.run_model() akima_y = np.array([[5. , 5.32381994, 6.28062691 , 7.79410646 , 9.64169506, 11.35166363, 12.26525921, 12.99152288, 13.77257256, 14.58710327, 15.41289673, 16.28341046, 17.96032258, 20.14140712, 22.31181718, 24.40891577, 26.27368825, 27.74068235, 28.67782484, 29. ]]) assert_near_equal(akima_y.flatten(), prob.get_val('akima1.y_val').flatten(), tolerance=1e-8) def test_akima_options(self): import numpy as np import openmdao.api as om x_cp = np.array([1.0, 2.0, 4.0, 6.0, 10.0, 12.0]) y_cp = np.array([5.0, 12.0, 14.0, 16.0, 21.0, 29.0]) n = 50 x = np.linspace(1.0, 12.0, n) prob = om.Problem() model = prob.model # Set options specific to akima akima_option = {'delta_x': 0.1, 'eps': 1e-30} comp = om.SplineComp(method='akima', x_cp_val=x_cp, x_interp_val=x, interp_options=akima_option) prob.model.add_subsystem('atmosphere', comp) comp.add_spline(y_cp_name='alt_cp', y_interp_name='alt', y_cp_val=y_cp, y_units='kft') prob.setup(force_alloc_complex=True) prob.run_model() def test_bspline_options(self): import numpy as np import openmdao.api as om prob = om.Problem() model = prob.model n_cp = 80 n_point = 160 t = np.linspace(0, 3.0*np.pi, n_cp) tt = np.linspace(0, 3.0*np.pi, n_point) x = np.sin(t) # Set options specific to bsplines bspline_options = {'order': 3} comp = om.SplineComp(method='bsplines', x_interp_val=tt, num_cp=n_cp, interp_options=bspline_options) prob.model.add_subsystem('interp', comp, promotes_inputs=[('h_cp', 'x')]) comp.add_spline(y_cp_name='h_cp', y_interp_name='h', y_cp_val=x, y_units=None) prob.setup(force_alloc_complex=True) prob.set_val('x', x) prob.run_model() def test_2to3doc_fixed_grid(self): ycp = np.array([5.0, 12.0, 14.0, 16.0, 21.0, 29.0]) ncp = len(ycp) n = 11 prob = om.Problem() akima_option = {'delta_x': 0.1} comp = om.SplineComp(method='akima', num_cp=ncp, x_interp_val=np.linspace(0.0, 1.0, n), interp_options=akima_option) prob.model.add_subsystem('comp1', comp) comp.add_spline(y_cp_name='chord_cp', y_interp_name='chord', y_cp_val=ycp) prob.setup() prob.run_model() y = np.array([[ 5. , 9.4362525 , 12. , 13.0012475 , 14. , 14.99875415, 16. , 17.93874585, 21. , 24.625 , 29. ]]) assert_near_equal(prob['comp1.chord'], y, 1e-6) def test_bsplines_2to3doc(self): from openmdao.utils.spline_distributions import sine_distribution prob = om.Problem() model = prob.model n_cp = 5 n_point = 10 t = np.linspace(0, 0.5 * np.pi, n_cp) x = np.empty((2, n_cp)) x[0, :] = np.sin(t) x[1, :] = 2.0 * np.sin(t) # In 2.x, the BsplinesComp had a built-in sinusoidal distribution. t_sin = sine_distribution(n_point) * np.pi * 0.5 bspline_options = {'order': 4} comp = om.SplineComp(method='bsplines', x_interp_val=t_sin, num_cp=n_cp, vec_size=2, interp_options=bspline_options) prob.model.add_subsystem('interp', comp) comp.add_spline(y_cp_name='h_cp', y_interp_name='h', y_cp_val=x, y_units='km') prob.setup() prob.run_model() xx = prob['interp.h'] with printoptions(precision=3, floatmode='fixed'): assert_near_equal(x[0, :], np.array([ 0., 0.38268343, 0.70710678, 0.92387953, 1. ]), 1e-5) assert_near_equal(x[1, :], 2.0*np.array([ 0., 0.38268343, 0.70710678, 0.92387953, 1. ]), 1e-5) assert_near_equal(xx[0, :], np.array([ 0., 0.06687281, 0.23486869, 0.43286622, 0.6062628, 0.74821484, 0.86228902, 0.94134389, 0.98587725, 1. ]), 1e-5) assert_near_equal(xx[1, :], 2.0*np.array([ 0., 0.06687281, 0.23486869, 0.43286622, 0.6062628, 0.74821484, 0.86228902, 0.94134389, 0.98587725, 1. ]), 1e-5) if __name__ == '__main__': unittest.main()
36.441275
112
0.57498
3,221
21,719
3.674325
0.108351
0.015463
0.00845
0.029573
0.773891
0.762315
0.744064
0.730376
0.71542
0.698775
0
0.152545
0.287076
21,719
595
113
36.502521
0.611793
0.029698
0
0.682741
0
0
0.053339
0
0
0
0
0
0.076142
1
0.053299
false
0
0.050761
0
0.109137
0.007614
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
0d867cd3e388e354a87793f2f8984600cf24d20c
2,765
py
Python
tests/test_is_stale.py
fcollonval/jupyter-packaging
23d4943256524d232162dabf3e430df463419165
[ "BSD-3-Clause" ]
59
2017-03-23T14:46:02.000Z
2022-03-27T10:56:18.000Z
tests/test_is_stale.py
fcollonval/jupyter-packaging
23d4943256524d232162dabf3e430df463419165
[ "BSD-3-Clause" ]
81
2017-03-08T01:18:17.000Z
2022-03-27T20:10:46.000Z
tests/test_is_stale.py
fcollonval/jupyter-packaging
23d4943256524d232162dabf3e430df463419165
[ "BSD-3-Clause" ]
47
2017-03-08T03:21:48.000Z
2022-03-25T09:50:58.000Z
from jupyter_packaging.setupbase import is_stale def test_destination_is_not_stale(source_dir, destination_dir): assert is_stale(str(destination_dir), str(source_dir)) is False def test_root_file_causes_stale(source_dir, destination_dir): source_dir.join('file1.txt').setmtime(30000) assert is_stale(str(destination_dir), str(source_dir)) is True def test_sub_file_causes_stale(source_dir, destination_dir): source_dir.join('sub', 'subfile2.txt').setmtime(30000) assert is_stale(str(destination_dir), str(source_dir)) is True def test_folder_mtime_does_not_prevent_stale(source_dir, destination_dir): source_dir.join('sub', 'subfile2.txt').setmtime(30000) destination_dir.setmtime(40000) destination_dir.join('sub').setmtime(40000) destination_dir.setmtime(40000) assert is_stale(str(destination_dir), str(source_dir)) is True def test_folder_mtime_does_not_cause_stale(source_dir, destination_dir): source_dir.setmtime(40000) source_dir.join('sub').setmtime(40000) source_dir.setmtime(40000) assert is_stale(str(destination_dir), str(source_dir)) is False # This behavior might not always be wanted? # The alternative is to check whether ALL files in destination is newer # than the newest file in source (more conservative). def test_only_newest_files_determine_stale(source_dir, destination_dir): source_dir.join('file1.txt').setmtime(30000) destination_dir.join('file1.rtf').setmtime(40000) assert is_stale(str(destination_dir), str(source_dir)) is False def test_unstale_on_equal(source_dir): assert is_stale(str(source_dir), str(source_dir)) is False def test_file_vs_dir(source_dir, destination_dir): assert is_stale(str(destination_dir.join('file1.rtf')), str(source_dir)) is False source_dir.join('file2.txt').setmtime(30000) assert is_stale(str(destination_dir.join('file1.rtf')), str(source_dir)) is True def test_dir_vs_file(source_dir, destination_dir): assert is_stale(str(destination_dir), str(source_dir.join('file1.txt'))) is False source_dir.join('file1.txt').setmtime(30000) assert is_stale(str(destination_dir), str(source_dir.join('file1.txt'))) is True def test_file_vs_file(source_dir, destination_dir): assert is_stale(str(destination_dir.join('file1.rtf')), str(source_dir.join('file1.txt'))) is False source_dir.join('file1.txt').setmtime(30000) assert is_stale(str(destination_dir.join('file1.rtf')), str(source_dir.join('file1.txt'))) is True def test_empty_dir(source_dir, tmpdir): empty_dir = tmpdir.mkdir('empty') assert is_stale(str(empty_dir), str(source_dir)) is True assert is_stale(str(source_dir), str(empty_dir)) is False assert is_stale(str(empty_dir), str(empty_dir)) is False
38.943662
103
0.769982
431
2,765
4.642691
0.146172
0.166417
0.103948
0.127936
0.802099
0.746127
0.723638
0.647676
0.633183
0.633183
0
0.035073
0.113201
2,765
70
104
39.5
0.780995
0.058951
0
0.372093
0
0
0.064305
0
0
0
0
0
0.372093
1
0.255814
false
0
0.023256
0
0.27907
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
1
0
0
0
0
0
0
0
5
0d8757e138245565cc44cd821451db195e66badf
176
py
Python
plugins/__init__.py
blumeria/opengenomebrowser
f9f3f0dc70d230348371e98cd41d10355d5d0f25
[ "MIT" ]
null
null
null
plugins/__init__.py
blumeria/opengenomebrowser
f9f3f0dc70d230348371e98cd41d10355d5d0f25
[ "MIT" ]
null
null
null
plugins/__init__.py
blumeria/opengenomebrowser
f9f3f0dc70d230348371e98cd41d10355d5d0f25
[ "MIT" ]
null
null
null
from .calculate_orthofinder import calculate_orthofinder as calculate_core_genome_dendrogram from .calculate_gendiscal import calculate_gendiscal as calculate_genome_similarity
88
92
0.926136
21
176
7.333333
0.47619
0.168831
0
0
0
0
0
0
0
0
0
0
0.0625
176
2
93
88
0.933333
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
0dd9b497b066f875674efc1ffd1459b88b418698
37
py
Python
tests/__init__.py
AlexandreKempf/confiig
d1c89c41b67eaacf379a32ed466ce3e1ff89aac8
[ "MIT" ]
null
null
null
tests/__init__.py
AlexandreKempf/confiig
d1c89c41b67eaacf379a32ed466ce3e1ff89aac8
[ "MIT" ]
null
null
null
tests/__init__.py
AlexandreKempf/confiig
d1c89c41b67eaacf379a32ed466ce3e1ff89aac8
[ "MIT" ]
null
null
null
"""Unit test package for confiig."""
18.5
36
0.675676
5
37
5
1
0
0
0
0
0
0
0
0
0
0
0
0.135135
37
1
37
37
0.78125
0.810811
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
2173d77be5fa4c47a9b832a9dab6bd030e94e7ab
128
py
Python
joplin/pages/event_page/fixtures/helpers/create_fixture.py
cityofaustin/joplin
01424e46993e9b1c8e57391d6b7d9448f31d596b
[ "MIT" ]
15
2018-09-27T07:36:30.000Z
2021-08-03T16:01:21.000Z
joplin/pages/event_page/fixtures/helpers/create_fixture.py
cityofaustin/joplin
01424e46993e9b1c8e57391d6b7d9448f31d596b
[ "MIT" ]
183
2017-11-16T23:30:47.000Z
2020-12-18T21:43:36.000Z
joplin/pages/event_page/fixtures/helpers/create_fixture.py
cityofaustin/joplin
01424e46993e9b1c8e57391d6b7d9448f31d596b
[ "MIT" ]
12
2017-12-12T22:48:05.000Z
2021-03-01T18:01:24.000Z
from pages.base_page.fixtures.helpers.create_fixture_map import create_fixture_map create_fixture = create_fixture_map["event"]
42.666667
82
0.875
19
128
5.473684
0.578947
0.5
0.461538
0
0
0
0
0
0
0
0
0
0.054688
128
2
83
64
0.859504
0
0
0
0
0
0.039063
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
21a06971c031927c0cfba7d0820de6a3e3f97e3c
74
py
Python
gym2/envs/StarTraderTest/__init__.py
dreamersnme/future
87462ea1ef2dfd056e26ede85448af160df7d2ac
[ "MIT" ]
86
2019-03-24T16:53:12.000Z
2022-02-25T11:48:57.000Z
gym2/envs/StarTraderTest/__init__.py
dreamersnme/future
87462ea1ef2dfd056e26ede85448af160df7d2ac
[ "MIT" ]
1
2020-11-15T16:36:54.000Z
2020-11-15T16:36:54.000Z
gym2/envs/StarTraderTest/__init__.py
dreamersnme/future
87462ea1ef2dfd056e26ede85448af160df7d2ac
[ "MIT" ]
33
2019-03-22T00:26:20.000Z
2022-03-25T02:56:17.000Z
from gym.envs.StarTraderTest.StarTrade_test_env import StarTradingTestEnv
37
73
0.905405
9
74
7.222222
1
0
0
0
0
0
0
0
0
0
0
0
0.054054
74
1
74
74
0.928571
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
21cc416a90527e4a04aa2ed445cec71436a174ad
222
py
Python
exercise_2017/11th_week/homework/fact.py
Taewan-P/python_study
f347e370aaa33aba5ab233252bcd759b94615348
[ "MIT" ]
null
null
null
exercise_2017/11th_week/homework/fact.py
Taewan-P/python_study
f347e370aaa33aba5ab233252bcd759b94615348
[ "MIT" ]
null
null
null
exercise_2017/11th_week/homework/fact.py
Taewan-P/python_study
f347e370aaa33aba5ab233252bcd759b94615348
[ "MIT" ]
null
null
null
class GirlFriend: girlfriend = False def __init__(self,exist): self.girlfriend = exist self.girlfriend = False GirlFriend.girlfriend = False print(" No. She doesn't exist! :( ") def exists(self): return False
22.2
38
0.711712
28
222
5.5
0.5
0.292208
0.324675
0
0
0
0
0
0
0
0
0
0.18018
222
10
39
22.2
0.846154
0
0
0
0
0
0.121076
0
0
0
0
0
0
1
0.222222
false
0
0
0.111111
0.555556
0.111111
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
1
0
0
0
1
0
0
0
5
21d18e1d85835466b941ce08aca632c4910185d4
159
py
Python
RappCloud/Utils/__init__.py
robotics-4-all/r4a_RAPP_cloud_api_python
4b738be562b77525bc94e6e8463c1e126bdbf3b5
[ "Apache-2.0" ]
1
2018-02-14T23:04:54.000Z
2018-02-14T23:04:54.000Z
RappCloud/Utils/__init__.py
robotics-4-all/r4a_RAPP_cloud_api_python
4b738be562b77525bc94e6e8463c1e126bdbf3b5
[ "Apache-2.0" ]
1
2017-04-21T11:51:28.000Z
2017-04-21T11:51:28.000Z
RappCloud/Utils/__init__.py
robotics-4-all/r4a_RAPP_cloud_api_python
4b738be562b77525bc94e6e8463c1e126bdbf3b5
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python ## @file RappCloud/Utils/__init__.py # from Net import Net from RandStrGen import RandStrGen from DatatypeAssert import datatypeassert
17.666667
41
0.798742
21
159
5.857143
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.125786
159
8
42
19.875
0.884892
0.339623
0
0
0
0
0
0
0
0
0
0
0.333333
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
df0585701ab95e42e4fce4dd99dafe52758f6d24
93
py
Python
c2dh_nerd/routes/status.py
theorm/c2dh-nerd
790c945a75d25735e826fbbebb0441a00627dc1c
[ "MIT" ]
null
null
null
c2dh_nerd/routes/status.py
theorm/c2dh-nerd
790c945a75d25735e826fbbebb0441a00627dc1c
[ "MIT" ]
null
null
null
c2dh_nerd/routes/status.py
theorm/c2dh-nerd
790c945a75d25735e826fbbebb0441a00627dc1c
[ "MIT" ]
null
null
null
from aiohttp import web async def handler(request): return web.json_response({ 'ok': 1 })
18.6
39
0.72043
14
93
4.714286
0.928571
0
0
0
0
0
0
0
0
0
0
0.012821
0.16129
93
4
40
23.25
0.833333
0
0
0
0
0
0.021505
0
0
0
0
0
0
1
0
true
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
1
0
1
0
1
0
0
5
df1bbd26e82356bf93fce3db61a84798a762bba3
68
py
Python
o3plot/__init__.py
o3seespy/o3plot
98ef894a98925d5cb5cd6ea699627d4845fa75e9
[ "MIT", "BSD-3-Clause" ]
null
null
null
o3plot/__init__.py
o3seespy/o3plot
98ef894a98925d5cb5cd6ea699627d4845fa75e9
[ "MIT", "BSD-3-Clause" ]
null
null
null
o3plot/__init__.py
o3seespy/o3plot
98ef894a98925d5cb5cd6ea699627d4845fa75e9
[ "MIT", "BSD-3-Clause" ]
null
null
null
from o3plot.plotter import * from . import models from .fns import *
22.666667
28
0.764706
10
68
5.2
0.6
0
0
0
0
0
0
0
0
0
0
0.017544
0.161765
68
3
29
22.666667
0.894737
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
df45f309012fa4a2be13831f160bd0a3ce6df337
56
py
Python
elnetpy/__init__.py
PabloRMira/elnetpy
8f63aef12778857586c83205a79d7c199a59f1bc
[ "Apache-2.0" ]
2
2021-04-28T13:39:19.000Z
2021-04-29T19:34:47.000Z
elnetpy/__init__.py
PabloRMira/elnetpy
8f63aef12778857586c83205a79d7c199a59f1bc
[ "Apache-2.0" ]
null
null
null
elnetpy/__init__.py
PabloRMira/elnetpy
8f63aef12778857586c83205a79d7c199a59f1bc
[ "Apache-2.0" ]
null
null
null
from _elnetpy import * # include c++ wrapped functions
28
55
0.75
7
56
5.857143
1
0
0
0
0
0
0
0
0
0
0
0
0.178571
56
1
56
56
0.891304
0.517857
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
df6e8d7dc8aafc188d9c0b36ac295618081d2f3e
43
py
Python
EzLibrarianApplication/constant.py
coregameHD/SmartLib_Librarian
31b58a4aab648ee9110ba6a78d5fcab942267380
[ "MIT" ]
null
null
null
EzLibrarianApplication/constant.py
coregameHD/SmartLib_Librarian
31b58a4aab648ee9110ba6a78d5fcab942267380
[ "MIT" ]
null
null
null
EzLibrarianApplication/constant.py
coregameHD/SmartLib_Librarian
31b58a4aab648ee9110ba6a78d5fcab942267380
[ "MIT" ]
2
2018-10-01T14:08:25.000Z
2020-09-30T03:02:15.000Z
rfc_822_format = "%a, %d %b %Y %H:%M:%S %z"
43
43
0.511628
11
43
1.818182
1
0
0
0
0
0
0
0
0
0
0
0.083333
0.162791
43
1
43
43
0.472222
0
0
0
0
0
0.545455
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
10caee9939070330979cf115a7c5a1a430ab5211
80
py
Python
bdd/pages/base_page.py
fhautoma/weeloDemoQA
858cbc95d7cb93439a1a11ffd1c518fac9a5bc0d
[ "MIT" ]
null
null
null
bdd/pages/base_page.py
fhautoma/weeloDemoQA
858cbc95d7cb93439a1a11ffd1c518fac9a5bc0d
[ "MIT" ]
null
null
null
bdd/pages/base_page.py
fhautoma/weeloDemoQA
858cbc95d7cb93439a1a11ffd1c518fac9a5bc0d
[ "MIT" ]
null
null
null
class BasePage: def __init__(self, context): self.context = context
20
32
0.6625
9
80
5.444444
0.666667
0.44898
0
0
0
0
0
0
0
0
0
0
0.25
80
3
33
26.666667
0.816667
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
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
1
0
0
0
0
1
0
0
5
10f124dbf98bdce3e834dfd709a468c69e180347
22,244
py
Python
pvfactors/tests/test_engine.py
tcapelle/pvfactors
1aaf6cdd3066a3a68d93db4ad7abcf10e97b5620
[ "BSD-3-Clause" ]
null
null
null
pvfactors/tests/test_engine.py
tcapelle/pvfactors
1aaf6cdd3066a3a68d93db4ad7abcf10e97b5620
[ "BSD-3-Clause" ]
null
null
null
pvfactors/tests/test_engine.py
tcapelle/pvfactors
1aaf6cdd3066a3a68d93db4ad7abcf10e97b5620
[ "BSD-3-Clause" ]
null
null
null
from pvfactors.engine import PVEngine from pvfactors.geometry import OrderedPVArray from pvfactors.irradiance import IsotropicOrdered, HybridPerezOrdered from pvfactors.irradiance.utils import breakup_df_inputs import numpy as np import datetime as dt def test_pvengine_float_inputs_iso(params): """Test that PV engine works for float inputs""" irradiance_model = IsotropicOrdered() pvarray = OrderedPVArray.init_from_dict(params) eng = PVEngine(pvarray, irradiance_model=irradiance_model) # Irradiance inputs timestamps = dt.datetime(2019, 6, 11, 11) DNI = 1000. DHI = 100. # Fit engine eng.fit(timestamps, DNI, DHI, params['solar_zenith'], params['solar_azimuth'], params['surface_tilt'], params['surface_azimuth'], params['rho_ground']) # Checks np.testing.assert_almost_equal(eng.irradiance.direct['front_illum_pvrow'], DNI) # Run timestep pvarray = eng.run_full_mode_timestep(0) # Checks assert isinstance(pvarray, OrderedPVArray) np.testing.assert_almost_equal( pvarray.pvrows[0].front.get_param_weighted('qinc'), 1099.22245374) np.testing.assert_almost_equal( pvarray.pvrows[1].front.get_param_weighted('qinc'), 1099.6948573) np.testing.assert_almost_equal( pvarray.pvrows[2].front.get_param_weighted('qinc'), 1102.76149246) def test_pvengine_float_inputs_perez(params): """Test that PV engine works for float inputs""" irradiance_model = HybridPerezOrdered() pvarray = OrderedPVArray.init_from_dict(params) eng = PVEngine(pvarray, irradiance_model=irradiance_model) # Irradiance inputs timestamps = dt.datetime(2019, 6, 11, 11) DNI = 1000. DHI = 100. # Fit engine eng.fit(timestamps, DNI, DHI, params['solar_zenith'], params['solar_azimuth'], params['surface_tilt'], params['surface_azimuth'], params['rho_ground']) # Checks np.testing.assert_almost_equal(eng.irradiance.direct['front_illum_pvrow'], DNI) # Run timestep pvarray = eng.run_full_mode_timestep(0) # Checks assert isinstance(pvarray, OrderedPVArray) np.testing.assert_almost_equal( pvarray.pvrows[0].front.get_param_weighted('qinc'), 1110.1164773159298) np.testing.assert_almost_equal( pvarray.pvrows[1].front.get_param_weighted('qinc'), 1110.595903991) np.testing.assert_almost_equal( pvarray.pvrows[2].front.get_param_weighted('qinc'), 1112.37717553) np.testing.assert_almost_equal( pvarray.pvrows[1].back.get_param_weighted('qinc'), 116.49050349491208) def test_pvengine_ts_inputs_perez(params_serial, df_inputs_serial_calculation, fn_report_example): """Test that PV engine works for timeseries inputs""" # Break up inputs (timestamps, surface_tilt, surface_azimuth, solar_zenith, solar_azimuth, dni, dhi) = breakup_df_inputs( df_inputs_serial_calculation) albedo = params_serial['rho_ground'] # Create engine irradiance_model = HybridPerezOrdered() pvarray = OrderedPVArray.init_from_dict( params_serial, param_names=irradiance_model.params) eng = PVEngine(pvarray, irradiance_model=irradiance_model) # Fit engine eng.fit(timestamps, dni, dhi, solar_zenith, solar_azimuth, surface_tilt, surface_azimuth, albedo) # Run all timesteps report = eng.run_full_mode(fn_build_report=fn_report_example) # Check values np.testing.assert_array_almost_equal( report['qinc_front'], [1066.272392, 1065.979824]) np.testing.assert_array_almost_equal( report['qinc_back'], [135.897106, 136.01297]) np.testing.assert_array_almost_equal( report['iso_front'], [42.816637, 42.780206]) np.testing.assert_array_almost_equal( report['iso_back'], [1.727308, 1.726535]) def test_fast_mode_loop_like(params): """Test value of older and decomissioned loop like fast mode""" # Prepare some engine inputs irradiance_model = HybridPerezOrdered() pvarray = OrderedPVArray.init_from_dict( params, param_names=irradiance_model.params) fast_mode_pvrow_index = 1 # Create engine object eng = PVEngine(pvarray, irradiance_model=irradiance_model, fast_mode_pvrow_index=fast_mode_pvrow_index) # Irradiance inputs timestamps = dt.datetime(2019, 6, 11, 11) DNI = 1000. DHI = 100. # Fit engine eng.fit(timestamps, DNI, DHI, params['solar_zenith'], params['solar_azimuth'], params['surface_tilt'], params['surface_azimuth'], params['rho_ground']) # Checks np.testing.assert_almost_equal(eng.irradiance.direct['front_illum_pvrow'], DNI) # Run timestep pvarray = _fast_mode_with_loop(eng.pvarray, eng.irradiance, eng.vf_calculator, fast_mode_pvrow_index, 0) # Checks assert isinstance(pvarray, OrderedPVArray) np.testing.assert_almost_equal( pvarray.pvrows[1].back.get_param_weighted('qinc'), 119.0505580124769) def test_run_fast_mode_isotropic(params): """Test that PV engine works for timeseries fast mode and float inputs, and using the isotropic irradiance model""" # Prepare some engine inputs irradiance_model = IsotropicOrdered() pvarray = OrderedPVArray.init_from_dict( params, param_names=irradiance_model.params) fast_mode_pvrow_index = 1 fast_mode_segment_index = 0 # Create engine object eng = PVEngine(pvarray, irradiance_model=irradiance_model, fast_mode_pvrow_index=fast_mode_pvrow_index, fast_mode_segment_index=fast_mode_segment_index) # Irradiance inputs timestamps = dt.datetime(2019, 6, 11, 11) DNI = 1000. DHI = 100. # Fit engine eng.fit(timestamps, DNI, DHI, params['solar_zenith'], params['solar_azimuth'], params['surface_tilt'], params['surface_azimuth'], params['rho_ground']) # Checks np.testing.assert_almost_equal(eng.irradiance.direct['front_illum_pvrow'], DNI) # Expected value qinc_expected = 122.73453 # Run fast mode qinc = eng.run_fast_mode( fn_build_report=lambda pvarray: (pvarray.ts_pvrows[1] .back.get_param_weighted('qinc'))) # Check results np.testing.assert_allclose(qinc, qinc_expected) # Without providing segment index eng.fast_mode_segment_index = None qinc = eng.run_fast_mode( fn_build_report=lambda pvarray: (pvarray.ts_pvrows[1] .back.get_param_weighted('qinc'))) # Check results np.testing.assert_allclose(qinc, qinc_expected) def test_run_fast_mode_perez(params): """Test that PV engine works for timeseries fast mode and float inputs. Value is very close to loop-like fast mode""" # Prepare some engine inputs irradiance_model = HybridPerezOrdered() pvarray = OrderedPVArray.init_from_dict( params, param_names=irradiance_model.params) fast_mode_pvrow_index = 1 fast_mode_segment_index = 0 # Create engine object eng = PVEngine(pvarray, irradiance_model=irradiance_model, fast_mode_pvrow_index=fast_mode_pvrow_index, fast_mode_segment_index=fast_mode_segment_index) # Irradiance inputs timestamps = dt.datetime(2019, 6, 11, 11) DNI = 1000. DHI = 100. # Fit engine eng.fit(timestamps, DNI, DHI, params['solar_zenith'], params['solar_azimuth'], params['surface_tilt'], params['surface_azimuth'], params['rho_ground']) # Checks np.testing.assert_almost_equal(eng.irradiance.direct['front_illum_pvrow'], DNI) expected_back_qinc = 119.095285 # Run fast mode qinc = eng.run_fast_mode( fn_build_report=lambda pvarray: (pvarray.ts_pvrows[1] .back.get_param_weighted('qinc'))) # Check results np.testing.assert_allclose(qinc, expected_back_qinc) # Without providing segment index eng.fast_mode_segment_index = None qinc = eng.run_fast_mode( fn_build_report=lambda pvarray: (pvarray.ts_pvrows[1] .back.get_param_weighted('qinc'))) # Check results np.testing.assert_allclose(qinc, expected_back_qinc) def test_run_fast_mode_segments(params): """Test that PV engine works for timeseries fast mode and float inputs. Value is very close to loop-like fast mode""" # Discretize middle PV row's back side params.update({'cut': {1: {'back': 5}}}) # Prepare some engine inputs irradiance_model = HybridPerezOrdered() pvarray = OrderedPVArray.init_from_dict( params, param_names=irradiance_model.params) fast_mode_pvrow_index = 1 fast_mode_segment_index = 2 # Create engine object eng = PVEngine(pvarray, irradiance_model=irradiance_model, fast_mode_pvrow_index=fast_mode_pvrow_index, fast_mode_segment_index=fast_mode_segment_index) # Irradiance inputs timestamps = dt.datetime(2019, 6, 11, 11) DNI = 1000. DHI = 100. # Fit engine eng.fit(timestamps, DNI, DHI, params['solar_zenith'], params['solar_azimuth'], params['surface_tilt'], params['surface_azimuth'], params['rho_ground']) # Checks np.testing.assert_almost_equal(eng.irradiance.direct['front_illum_pvrow'], DNI) # Define report function to grab irradiance from PV row segment def fn_report(pvarray): return (pvarray.ts_pvrows[1].back.list_segments[2] .get_param_weighted('qinc')) # Expected value for middle segment qinc_expected = 116.572594 # Run fast mode for specific segment qinc_segment = eng.run_fast_mode(fn_build_report=fn_report) # Check results np.testing.assert_allclose(qinc_segment, qinc_expected) # Without providing segment index: the value should be the same as above eng.fast_mode_segment_index = None qinc_segment = eng.run_fast_mode(fn_build_report=fn_report) # Check results np.testing.assert_allclose(qinc_segment, qinc_expected) def test_run_fast_mode_compare_to_loop_like(params): """Test that PV engine works for timeseries fast mode and float inputs. Check the left pv row back side (no obstruction, since rotation < 0) This should be exactly the same calculated value as in loop-like fast mode because ground is not infinite for back of left pv row""" # Prepare some engine inputs irradiance_model = HybridPerezOrdered() pvarray = OrderedPVArray.init_from_dict( params, param_names=irradiance_model.params) fast_mode_pvrow_index = 1 # Irradiance inputs timestamps = dt.datetime(2019, 6, 11, 11) DNI = 1000. DHI = 100. # Create engine object eng = PVEngine(pvarray, irradiance_model=irradiance_model, fast_mode_pvrow_index=fast_mode_pvrow_index) # Fit engine eng.fit(timestamps, DNI, DHI, params['solar_zenith'], params['solar_azimuth'], params['surface_tilt'], params['surface_azimuth'], params['rho_ground']) # Run baseline calculation pvrow_idx = 0 time_idx = 0 pvarray_loop = _fast_mode_with_loop(eng.pvarray, eng.irradiance, eng.vf_calculator, pvrow_idx, time_idx) # Expected should be: 138.10421248631152 qinc_expected = pvarray_loop.pvrows[0].back.get_param_weighted('qinc') # Run timeseries calculation qinc = eng.run_fast_mode( fn_build_report=lambda pvarray: (pvarray.ts_pvrows[0] .back.get_param_weighted('qinc')), pvrow_index=0) # Check results: value taken from loop-like fast mode np.testing.assert_allclose(qinc, qinc_expected) def test_run_fast_mode_back_shading(params): """Test that PV engine works for timeseries fast mode and float inputs, and when there's large direct shading on the back surface. Value is very close to loop-style fast mode""" params.update({'gcr': 0.6, 'surface_azimuth': 270, 'surface_tilt': 120, 'solar_zenith': 70.}) # Prepare some engine inputs irradiance_model = HybridPerezOrdered() pvarray = OrderedPVArray.init_from_dict( params, param_names=irradiance_model.params) fast_mode_pvrow_index = 1 fast_mode_segment_index = 0 # Create engine object eng = PVEngine(pvarray, irradiance_model=irradiance_model, fast_mode_pvrow_index=fast_mode_pvrow_index, fast_mode_segment_index=fast_mode_segment_index) # Irradiance inputs timestamps = dt.datetime(2019, 6, 11, 11) DNI = 1000. DHI = 100. # Expected values expected_qinc = 683.537153 # Fit engine eng.fit(timestamps, DNI, DHI, params['solar_zenith'], params['solar_azimuth'], params['surface_tilt'], params['surface_azimuth'], params['rho_ground']) def fn_report(pvarray): return (pvarray.ts_pvrows[1] .back.get_param_weighted('qinc')) # By providing segment index qinc = eng.run_fast_mode(fn_build_report=fn_report) # Check results np.testing.assert_allclose(qinc, expected_qinc) # Without providing segment index eng.fast_mode_segment_index = None qinc = eng.run_fast_mode(fn_build_report=fn_report) # Check results np.testing.assert_allclose(qinc, expected_qinc) def test_fast_mode_8760(params, df_inputs_clearsky_8760): """Test fast mode with 1 PV row to make sure that is consistent after the vectorization update: should get exact same values """ # Get MET data df_inputs = df_inputs_clearsky_8760 timestamps = df_inputs.index dni = df_inputs.dni.values dhi = df_inputs.dhi.values solar_zenith = df_inputs.solar_zenith.values solar_azimuth = df_inputs.solar_azimuth.values surface_tilt = df_inputs.surface_tilt.values surface_azimuth = df_inputs.surface_azimuth.values # Run simulation for only 1 PV row params.update({'n_pvrows': 1}) # Run engine pvarray = OrderedPVArray.init_from_dict(params) eng = PVEngine(pvarray) eng.fit(timestamps, dni, dhi, solar_zenith, solar_azimuth, surface_tilt, surface_azimuth, params['rho_ground']) qinc = eng.run_fast_mode( fn_build_report=lambda pvarray: (pvarray.ts_pvrows[0] .back.get_param_weighted('qinc')), pvrow_index=0) # Check than annual energy on back is consistent np.testing.assert_allclose(np.nansum(qinc) / 1e3, 342.848005) def _fast_mode_with_loop(pvarray, irradiance, vf_calculator, pvrow_idx, idx): """Function for running fast mode using subset of view factor matrix and with the shapely geometries. Saving this for future debugging of new timeseries fast mode. """ # Transform pvarray to time step pvarray.transform(idx) # Apply irradiance terms to pvarray irradiance_vec, rho_vec, invrho_vec, total_perez_vec = \ irradiance.get_full_modeling_vectors(pvarray, idx) # Prepare inputs to view factor calculator geom_dict = pvarray.dict_surfaces view_matrix, obstr_matrix = pvarray.view_obstr_matrices # Indices of the surfaces of the back of the selected pvrows list_surface_indices = pvarray.pvrows[pvrow_idx].back.surface_indices # Calculate view factors using a subset of view_matrix to # gain in calculation speed vf_matrix_subset = vf_calculator.get_vf_matrix_subset( geom_dict, view_matrix, obstr_matrix, pvarray.pvrows, list_surface_indices) pvarray.vf_matrix = vf_matrix_subset irradiance_vec_subset = irradiance_vec[list_surface_indices] # In fast mode, will not care to calculate q0 qinc = vf_matrix_subset.dot(rho_vec * total_perez_vec) \ + irradiance_vec_subset # Calculate other terms isotropic_vec = vf_matrix_subset[:, -1] * total_perez_vec[-1] reflection_vec = qinc - irradiance_vec_subset \ - isotropic_vec # Update selected surfaces with values for i, surf_idx in enumerate(list_surface_indices): surface = geom_dict[surf_idx] surface.update_params({'qinc': qinc[i], 'isotropic': isotropic_vec[i], 'reflection': reflection_vec[i]}) return pvarray def test_run_fast_and_full_modes_sequentially(params, fn_report_example): """Make sure that can run fast and full modes one after the other without making the engine crash""" # Irradiance inputs timestamps = dt.datetime(2019, 6, 11, 11) DNI = 1000. DHI = 100. # Prepare some engine inputs pvarray = OrderedPVArray.init_from_dict(params) fast_mode_pvrow_index = 1 fast_mode_segment_index = 0 # Create engine object eng = PVEngine(pvarray, fast_mode_pvrow_index=fast_mode_pvrow_index, fast_mode_segment_index=fast_mode_segment_index) # Fit engine eng.fit(timestamps, DNI, DHI, params['solar_zenith'], params['solar_azimuth'], params['surface_tilt'], params['surface_azimuth'], params['rho_ground']) # Run fast mode def fn_report(pvarray): return (pvarray.ts_pvrows[1] .back.get_param_weighted('qinc')) qinc_fast = eng.run_fast_mode(fn_build_report=fn_report) # Run full mode report = eng.run_full_mode(fn_build_report=fn_report_example) np.testing.assert_allclose(qinc_fast, 119.095285) np.testing.assert_allclose(report['qinc_back'], 116.49050349491) def test_pvengine_float_inputs_perez_transparency_spacing_full(params): """Test that module transparency and spacing are having the expected effect to calculated PV back side irradiance""" # Irradiance inputs timestamps = dt.datetime(2019, 6, 11, 11) DNI = 1000. DHI = 100. # --- with 0 transparency and spacing # Create models irr_params = {'module_transparency': 0., 'module_spacing_ratio': 0.} irradiance_model = HybridPerezOrdered(**irr_params) pvarray = OrderedPVArray.init_from_dict(params) eng = PVEngine(pvarray, irradiance_model=irradiance_model) # Fit engine eng.fit(timestamps, DNI, DHI, params['solar_zenith'], params['solar_azimuth'], params['surface_tilt'], params['surface_azimuth'], params['rho_ground']) # Run timestep pvarray = eng.run_full_mode_timestep(0) no_spacing_transparency_back_qinc = ( pvarray.pvrows[1].back.get_param_weighted('qinc')) # --- with non-0 transparency and spacing # Create models irr_params = {'module_transparency': 0.1, 'module_spacing_ratio': 0.1} irradiance_model = HybridPerezOrdered(**irr_params) pvarray = OrderedPVArray.init_from_dict(params) eng = PVEngine(pvarray, irradiance_model=irradiance_model) # Fit engine eng.fit(timestamps, DNI, DHI, params['solar_zenith'], params['solar_azimuth'], params['surface_tilt'], params['surface_azimuth'], params['rho_ground']) # Run timestep pvarray = eng.run_full_mode_timestep(0) # Checks expected_back_qinc = 132.13881181118185 # higher than when params are 0 w_spacing_transparency_back_qinc = ( pvarray.pvrows[1].back.get_param_weighted('qinc')) np.testing.assert_almost_equal( w_spacing_transparency_back_qinc, expected_back_qinc) assert no_spacing_transparency_back_qinc < w_spacing_transparency_back_qinc def test_pvengine_float_inputs_perez_transparency_spacing_fast(params): """Test that module transparency and spacing are having the expected effect to calculated PV back side irradiance""" # Irradiance inputs timestamps = dt.datetime(2019, 6, 11, 11) DNI = 1000. DHI = 100. # --- with 0 transparency and spacing # Create models irr_params = {'module_transparency': 0., 'module_spacing_ratio': 0.} irradiance_model = HybridPerezOrdered(**irr_params) pvarray = OrderedPVArray.init_from_dict(params) eng = PVEngine(pvarray, irradiance_model=irradiance_model) # Fit engine eng.fit(timestamps, DNI, DHI, params['solar_zenith'], params['solar_azimuth'], params['surface_tilt'], params['surface_azimuth'], params['rho_ground']) # Run timestep def fn_report(pvarray): return (pvarray.ts_pvrows[1] .back.get_param_weighted('qinc')) no_spacing_transparency_back_qinc = \ eng.run_fast_mode(fn_build_report=fn_report, pvrow_index=1) # --- with non-0 transparency and spacing # Create models irr_params = {'module_transparency': 0.1, 'module_spacing_ratio': 0.1} irradiance_model = HybridPerezOrdered(**irr_params) pvarray = OrderedPVArray.init_from_dict(params) eng = PVEngine(pvarray, irradiance_model=irradiance_model) # Fit engine eng.fit(timestamps, DNI, DHI, params['solar_zenith'], params['solar_azimuth'], params['surface_tilt'], params['surface_azimuth'], params['rho_ground']) # Run timestep w_spacing_transparency_back_qinc = \ eng.run_fast_mode(fn_build_report=fn_report, pvrow_index=1) # Checks expected_back_qinc = 134.7143531 # higher than when params are 0 np.testing.assert_almost_equal( w_spacing_transparency_back_qinc, expected_back_qinc) assert no_spacing_transparency_back_qinc < w_spacing_transparency_back_qinc
36.645799
79
0.676272
2,750
22,244
5.185455
0.104
0.046564
0.033661
0.02777
0.756101
0.732048
0.718724
0.71101
0.691935
0.680435
0
0.033013
0.237412
22,244
606
80
36.706271
0.80764
0.175823
0
0.710744
0
0
0.071492
0
0
0
0
0
0.101928
1
0.049587
false
0
0.016529
0.011019
0.068871
0
0
0
0
null
0
0
0
0
1
1
1
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
5
801775a6220313e7405655892d1ffdaa09ba26e8
2,653
py
Python
transmute_core/tests/test_basetype_serializer.py
yunstanford/transmute-core
a8e5dd055f0f3d39327d71dd61bf0ee147f59ebe
[ "MIT" ]
42
2016-06-04T00:16:16.000Z
2021-06-11T02:09:31.000Z
transmute_core/tests/test_basetype_serializer.py
yunstanford/transmute-core
a8e5dd055f0f3d39327d71dd61bf0ee147f59ebe
[ "MIT" ]
55
2016-06-11T13:58:46.000Z
2021-12-21T06:29:20.000Z
transmute_core/tests/test_basetype_serializer.py
yunstanford/transmute-core
a8e5dd055f0f3d39327d71dd61bf0ee147f59ebe
[ "MIT" ]
18
2016-05-18T20:50:53.000Z
2021-11-18T09:09:59.000Z
import pytest from transmute_core.compat import string_type from transmute_core.exceptions import SerializationException from datetime import datetime NOW = datetime.now() UTCNOW = datetime.utcnow() @pytest.mark.parametrize("inp, expected_output", [("10", 10), ("-1", -1)]) def test_int_load_happy(object_serializer_set, inp, expected_output): """ test all happy cases for the integer serializer """ assert object_serializer_set.load(int, inp) == expected_output @pytest.mark.parametrize("unhappy_input", ["foo", "bar"]) def test_int_load_unhappy(object_serializer_set, unhappy_input): """ test all unhappy cases for the integer serializer """ with pytest.raises(SerializationException): object_serializer_set.load(int, unhappy_input) @pytest.mark.parametrize("inp, expected_output", [("10", 10), ("1.0", 1.0)]) def test_float_load_happy(object_serializer_set, inp, expected_output): """ test all happy cases for the integer serializer """ assert object_serializer_set.load(float, inp) == expected_output @pytest.mark.parametrize("unhappy_input", ["foo", "bar"]) def test_float_load_unhappy(object_serializer_set, unhappy_input): """ test all unhappy cases for the integer serializer """ with pytest.raises(SerializationException): object_serializer_set.load(float, unhappy_input) @pytest.mark.parametrize( "inp, expected_output", [("true", True), ("false", False), (True, True), (False, False)], ) def test_bool_load_happy(object_serializer_set, inp, expected_output): assert object_serializer_set.load(bool, inp) is expected_output @pytest.mark.parametrize("inp, expected_output", [("foo", "foo")]) def test_string_load_happy(object_serializer_set, inp, expected_output): assert object_serializer_set.load(string_type, inp) == expected_output @pytest.mark.parametrize("inp, expected_output", [(NOW.isoformat(), NOW)]) def test_datetime_load_happy(object_serializer_set, inp, expected_output): assert object_serializer_set.load(datetime, inp) == expected_output @pytest.mark.parametrize("inp, expected_output", [(NOW, NOW.isoformat())]) def test_datetime_dump_unhappy(object_serializer_set, inp, expected_output): assert object_serializer_set.dump(datetime, inp) == expected_output @pytest.mark.parametrize("inp", [("")]) def test_datetime_load_unhappy(object_serializer_set, inp): with pytest.raises(SerializationException): object_serializer_set.load(datetime, inp) @pytest.mark.parametrize("inp, out", [(None, None), ("s", "s")]) def test_none_serialzer(object_serializer_set, inp, out): assert object_serializer_set.load(None, inp) == out
39.014706
76
0.756879
346
2,653
5.523121
0.150289
0.167452
0.198849
0.10832
0.762428
0.717949
0.712193
0.712193
0.59079
0.545788
0
0.005957
0.11421
2,653
67
77
39.597015
0.807234
0.074632
0
0.119048
0
0
0.08028
0
0
0
0
0
0.166667
1
0.238095
false
0
0.095238
0
0.333333
0
0
0
0
null
0
1
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
5
80345bc857c8732f72844d035684f843ac3fd371
94
py
Python
pynetutils/__init__.py
RaRhAeu/pynetutils
5b74ddda479ddfcead3f05befaf2172203c21e24
[ "MIT" ]
null
null
null
pynetutils/__init__.py
RaRhAeu/pynetutils
5b74ddda479ddfcead3f05befaf2172203c21e24
[ "MIT" ]
null
null
null
pynetutils/__init__.py
RaRhAeu/pynetutils
5b74ddda479ddfcead3f05befaf2172203c21e24
[ "MIT" ]
null
null
null
from .Servers import TCPServer # noqa from .Clients import TCPClient, UDPClient # noqa
11.75
49
0.734043
11
94
6.272727
0.727273
0
0
0
0
0
0
0
0
0
0
0
0.212766
94
7
50
13.428571
0.932432
0.095745
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
803e035228b1075708b92b8e37ce7f53c6a11698
130
py
Python
proxypool/schedule/__init__.py
Lemon2go/ProxyPool
4a1ec70d624e607d16fc0f8aa5fdfa11a288ea65
[ "Apache-2.0" ]
359
2016-12-06T14:32:33.000Z
2021-02-14T15:17:08.000Z
proxypool/schedule/__init__.py
z1421012325/proxypool
0dabf9aae980a493f904362d70d23467ede66127
[ "Apache-2.0" ]
13
2017-04-11T12:56:35.000Z
2021-01-18T03:01:39.000Z
proxypool/schedule/__init__.py
z1421012325/proxypool
0dabf9aae980a493f904362d70d23467ede66127
[ "Apache-2.0" ]
136
2017-01-30T13:48:15.000Z
2021-02-14T08:36:16.000Z
from .adder import PoolAdder from .tester import UsabilityTester from .schedule import ExpireCheckProcess, ProxyCountCheckProcess
32.5
64
0.869231
13
130
8.692308
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.1
130
3
65
43.333333
0.965812
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
80477249a567d1c8be69e4196d8693e9c474c1ed
85
py
Python
alchemist_lib/broker/__init__.py
Dodo33/alchemist-lib
40c2d3b48d5f46315eb09e7f572d578b7e5324b4
[ "MIT" ]
5
2018-07-11T05:38:51.000Z
2021-12-19T03:06:51.000Z
alchemist_lib/broker/__init__.py
Dodo33/alchemist-lib
40c2d3b48d5f46315eb09e7f572d578b7e5324b4
[ "MIT" ]
null
null
null
alchemist_lib/broker/__init__.py
Dodo33/alchemist-lib
40c2d3b48d5f46315eb09e7f572d578b7e5324b4
[ "MIT" ]
2
2019-07-12T08:51:11.000Z
2021-09-29T22:22:46.000Z
from .poloniexbroker import PoloniexBroker from .bittrexbroker import BittrexBroker
21.25
42
0.870588
8
85
9.25
0.5
0
0
0
0
0
0
0
0
0
0
0
0.105882
85
3
43
28.333333
0.973684
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
33da6bbd0d97b74fc6ca3ec278795229c7fc7522
185
py
Python
hitbasic/translations/select_statement.py
pvmm/hitbasic
f134a80d7e9ada5c7c7423a43001f543fa9ad896
[ "BSD-2-Clause" ]
null
null
null
hitbasic/translations/select_statement.py
pvmm/hitbasic
f134a80d7e9ada5c7c7423a43001f543fa9ad896
[ "BSD-2-Clause" ]
null
null
null
hitbasic/translations/select_statement.py
pvmm/hitbasic
f134a80d7e9ada5c7c7423a43001f543fa9ad896
[ "BSD-2-Clause" ]
null
null
null
from . import StatementComponents, CodeComponents class Statement: def translate(self): return StatementComponents.from_arg_list('SELECT', 'CASE', self.sel).translate()
20.555556
88
0.740541
19
185
7.105263
0.789474
0
0
0
0
0
0
0
0
0
0
0
0.156757
185
8
89
23.125
0.865385
0
0
0
0
0
0.054348
0
0
0
0
0
0
1
0.25
false
0
0.25
0.25
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
1d1c85484eef2f72a7a1951aca8c690449a48e33
674
py
Python
test_ex08_mistura2.py
lucasgsouza03/trabalho_1_grupo_sala
f920f6f8b500ec3aaf514f4e03709cc7a2f26d60
[ "Unlicense" ]
null
null
null
test_ex08_mistura2.py
lucasgsouza03/trabalho_1_grupo_sala
f920f6f8b500ec3aaf514f4e03709cc7a2f26d60
[ "Unlicense" ]
null
null
null
test_ex08_mistura2.py
lucasgsouza03/trabalho_1_grupo_sala
f920f6f8b500ec3aaf514f4e03709cc7a2f26d60
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # H. mistura2 # Sejam duas strings a e b # Retorno uma string '<a> <b>' separada por um espaço # com as duas primeiras letras trocadas de cada string # 'mix', pod' -> 'pox mid' # 'dog', 'dinner' -> 'dig donner' # Implemente a função test_ex04() para que o pytest execute com sucesso # Crie um módulo que deverá conter o método mistura2(a, b) # Este arquivo deverá importar o módulo da função mistura2 def mistura2(a, b): return
29.304348
71
0.703264
107
674
4.420561
0.71028
0.012685
0.042283
0
0
0
0
0
0
0
0
0.027076
0.178042
674
22
72
30.636364
0.826715
0.89911
0
0
0
0
0
0
0
0
0
0.045455
0
1
0.5
false
0
0
0.5
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
1
1
0
0
5
1d88f98ff89687f1413457c3b7f6972cedf959ee
7,802
py
Python
tests/test_dbc.py
StefanUlbrich/design-by-contract
4e99e28a38ea67e8842352792332c3ccdba8da33
[ "MIT" ]
3
2022-03-05T17:41:09.000Z
2022-03-19T09:22:22.000Z
tests/test_dbc.py
StefanUlbrich/design-by-contract
4e99e28a38ea67e8842352792332c3ccdba8da33
[ "MIT" ]
3
2022-03-19T09:41:33.000Z
2022-03-19T09:41:53.000Z
tests/test_dbc.py
StefanUlbrich/design-by-contract
4e99e28a38ea67e8842352792332c3ccdba8da33
[ "MIT" ]
null
null
null
from inspect import signature from typing import Annotated import numpy as np import pandas as pd import pytest from design_by_contract import contract, ContractViolationError, ContractLogicError, UnresolvedSymbol # pylint: skip-file class TestNumpy: def test_matmult_correct(self): @contract def spam( a: Annotated[np.ndarray, lambda a, m, n: (m, n) == a.shape], b: Annotated[np.ndarray, lambda b, n, o: (n, o) == b.shape], ) -> Annotated[np.ndarray, lambda x, m, o: x.shape == (m, o)]: return a @ b spam(np.zeros((3, 2)), np.zeros((2, 4))) def test_matmult_correct_shortcut(self): @contract def spam( a: Annotated[np.ndarray, lambda x, m, n: (m, n) == x.shape], b: Annotated[np.ndarray, lambda x, n, o: (n, o) == x.shape], ) -> Annotated[np.ndarray, lambda x, m, o: x.shape == (m, o)]: return a @ b spam(np.zeros((3, 2)), np.zeros((2, 4))) def test_matmult_violated_in_return(self): @contract def spam( a: Annotated[np.ndarray, lambda x, m, n: (m, n) == x.shape], b: Annotated[np.ndarray, lambda x, n, o: (n, o) == x.shape], ) -> Annotated[np.ndarray, lambda x, m, n: x.shape == (m, n)]: return a @ b with pytest.raises(ContractViolationError) as exc_info: spam(np.zeros((3, 2)), np.zeros((2, 4))) assert str(exc_info.value) == ("Contract violated for argument: `return`") def test_matmult_violated_in_argument(self): @contract def spam( a: Annotated[np.ndarray, lambda x, m, n: (m, n) == x.shape], b: Annotated[np.ndarray, lambda x, n, o: (n, o) == x.shape], ) -> Annotated[np.ndarray, lambda x, m, n: x.shape == (m, n)]: return a @ b with pytest.raises(ContractViolationError) as exc_info: spam(np.zeros((3, 2)), np.zeros((3, 4))) assert str(exc_info.value) == ("Contract violated for argument: `b`") def test_matmult_unresolved(self): @contract def spam( a: Annotated[np.ndarray, lambda x, m, n: (m, n) == x.shape and m > 2], b: Annotated[np.ndarray, lambda x, n, o: (n, o) == x.shape], ) -> Annotated[np.ndarray, lambda x, m, o: x.shape == (m, o)]: return a @ b with pytest.raises(TypeError) as exc_info: spam(np.zeros((3, 2)), np.zeros((2, 4))) assert str(exc_info.value) == ("'>' not supported between instances of 'UnresolvedSymbol' and 'int'") def test_matmult_multi(self): @contract def spam( a: Annotated[np.ndarray, lambda x, m, n: (m, n) == x.shape, lambda x: x.shape[1] == 2], b: Annotated[np.ndarray, lambda x, n, o: (n, o) == x.shape], ) -> Annotated[np.ndarray, lambda x, m, o: x.shape == (m, o)]: return a @ b spam(np.zeros((3, 2)), np.zeros((2, 4))) def test_matmult_mixed(self): @contract def spam( a: Annotated[np.ndarray, lambda x, m, n: (m, n) == x.shape and x.shape[1] == 2], b: Annotated[np.ndarray, lambda x, n, o: (n, o) == x.shape], ) -> Annotated[np.ndarray, lambda x, m, o: x.shape == (m, o)]: return a @ b spam(np.zeros((3, 2)), np.zeros((2, 4))) def test_matmult_mixed_2(self): @contract def spam( a: Annotated[np.ndarray, lambda x, n: (3, n) == x.shape], b: Annotated[np.ndarray, lambda x, n, o: (n, o) == x.shape], ) -> Annotated[np.ndarray, lambda x, o: x.shape == (3, o)]: return a @ b spam(np.zeros((3, 2)), np.zeros((2, 4))) def test_matmult_mixed_violated(self): @contract def spam( a: Annotated[np.ndarray, lambda x, n: (4, n) == x.shape], b: Annotated[np.ndarray, lambda x, n, o: (n, o) == x.shape], ) -> Annotated[np.ndarray, lambda x, o: x.shape == (3, o)]: return a @ b # Here we would expect a contract violation # However, n==shape[1] will not be evaluated so the unresolved # error is raised first with pytest.raises(ContractViolationError) as exc_info: spam(np.zeros((3, 2)), np.zeros((2, 4))) assert str(exc_info.value) == ("Contract violated for argument: `a`") def test_vstack(self): @contract def spam( a: Annotated[np.ndarray, lambda x, m, o: (m, o) == x.shape], b: Annotated[np.ndarray, lambda x, n, o: (n, o) == x.shape], ) -> Annotated[np.ndarray, lambda x, m, n, o: x.shape == (m + n, o)]: print(np.vstack((a, b)).shape) return np.vstack((a, b)) spam(np.zeros((3, 2)), np.zeros((4, 2))) class TestGeneral: def test_docstring(self): @contract def spam(a: np.ndarray, b: Annotated[np.ndarray, lambda b, m: b.shape == (m, 3)]): """A spam function""" pass assert spam.__doc__ == "A spam function" def test_signature(self): @contract def spam(a: np.ndarray, b: Annotated[np.ndarray, lambda b, m: b.shape == (m, 3)]): pass assert "(a: numpy.ndarray, b: typing.Annotated[numpy.ndarray," in str(signature(spam)) def test_reserved(self): @contract(reserved="y") def spam( a: Annotated[np.ndarray, lambda y, m, n: (m, n) == y.shape], b: Annotated[np.ndarray, lambda y, n, o: (n, o) == y.shape], ) -> Annotated[np.ndarray, lambda y, m, o: y.shape == (m, o)]: return a @ b def test_match(self): a, b = UnresolvedSymbol("a"), UnresolvedSymbol("b") a == 2 b == a assert a.value == b.value def test_match_fail(self): a, b = UnresolvedSymbol("a"), UnresolvedSymbol("b") a == 2 b == 1 with pytest.raises(ContractViolationError) as exc_info: a == b def test_match_symmetry(self): a, b = UnresolvedSymbol("a"), UnresolvedSymbol("b") a == 2 assert a.value == 2 b = UnresolvedSymbol("a") 2 == b assert b.value == 2 def test_match_fail2(self): a = UnresolvedSymbol("a") a == 2 with pytest.raises(ContractViolationError) as exc_info: a == 3 with pytest.raises(ContractViolationError) as exc_info: 3 == a a == 2 2 == a class TestPandas: def test_pandas_correct(self): a = pd.DataFrame(np.random.randint(0, 2, size=(10, 3)), columns=list("ABC")) b = pd.DataFrame(np.random.randint(0, 3, size=(10, 3)), columns=list("BCD")) @contract def spam( a: Annotated[pd.DataFrame, lambda x, c: c == {"C", "B"}, lambda x, c: c.issubset(x.columns)], b: Annotated[pd.DataFrame, lambda x, c: c <= set(x.columns)], ) -> Annotated[pd.DataFrame, lambda x, c: c <= set(x.columns)]: return pd.merge(a, b, on=["B", "C"]) spam(a, b) def test_pandas_violated_argument(self): a = pd.DataFrame(np.random.randint(0, 2, size=(10, 3)), columns=list("ABC")) b = pd.DataFrame(np.random.randint(0, 3, size=(10, 3)), columns=list("CDE")) @contract def spam( a: Annotated[pd.DataFrame, lambda x, c: c == {"C", "B"}, lambda x, c: c.issubset(x.columns)], b: Annotated[pd.DataFrame, lambda x, c: c <= set(x.columns)], ) -> Annotated[pd.DataFrame, lambda x, c: c <= set(x.columns)]: return pd.merge(a, b, on=["B", "C"]) with pytest.raises(ContractViolationError) as exc_info: spam(a, b) assert str(exc_info.value) == ("Contract violated for argument: `b`")
35.625571
109
0.541784
1,107
7,802
3.764228
0.101174
0.079914
0.151188
0.201584
0.762899
0.7473
0.718503
0.699304
0.664027
0.638109
0
0.015665
0.296334
7,802
218
110
35.788991
0.743352
0.020379
0
0.603659
0
0
0.040477
0.004061
0
0
0
0
0.060976
1
0.207317
false
0.012195
0.036585
0.073171
0.341463
0.006098
0
0
0
null
0
0
1
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
5
d52b8fe5ebd067fd99fda43449aab1d6b969e1c1
156
py
Python
mmdet2trt/models/roi_heads/roi_extractors/__init__.py
jackweiwang/mmdetection-to-tensorrt
f988ba8e923764fb1173385a1c7160b8f8b5bd99
[ "Apache-2.0" ]
1
2021-08-23T10:09:37.000Z
2021-08-23T10:09:37.000Z
mmdet2trt/models/roi_heads/roi_extractors/__init__.py
gcong18/mmdetection-to-tensorrt
c31c32ee4720ff56010bcda77bacf3a110d0526c
[ "Apache-2.0" ]
null
null
null
mmdet2trt/models/roi_heads/roi_extractors/__init__.py
gcong18/mmdetection-to-tensorrt
c31c32ee4720ff56010bcda77bacf3a110d0526c
[ "Apache-2.0" ]
null
null
null
from .pooling_layers import * from .single_level_roi_extractor import SingleRoIExtractorWraper from .generic_roi_extractor import GenericRoIExtractorWraper
39
64
0.897436
17
156
7.882353
0.647059
0.179104
0.268657
0
0
0
0
0
0
0
0
0
0.076923
156
3
65
52
0.930556
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
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
d52c7750cdfd941e31a17bdfd330e186758d8dc2
208
py
Python
pdf2audiobook/test_file_operations.py
data-stepper/pdf2audiobook
7b2992cf74deb517de6b214556df11c27bffb4ac
[ "MIT" ]
null
null
null
pdf2audiobook/test_file_operations.py
data-stepper/pdf2audiobook
7b2992cf74deb517de6b214556df11c27bffb4ac
[ "MIT" ]
null
null
null
pdf2audiobook/test_file_operations.py
data-stepper/pdf2audiobook
7b2992cf74deb517de6b214556df11c27bffb4ac
[ "MIT" ]
null
null
null
import pytest as pt from . import text_extraction as t from . import speech_synthesis as s from glob import glob # TODO: organize better where the program writes files # and then test those file operations
23.111111
54
0.793269
34
208
4.794118
0.764706
0.122699
0
0
0
0
0
0
0
0
0
0
0.182692
208
8
55
26
0.958824
0.423077
0
0
0
0
0
0
0
0
0
0.125
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
1
0
0
0
1
0
1
0
1
0
0
5
d54867dd584961c4334ec0405484928f2230a948
2,769
py
Python
test/config/test_ComponentDescriptor.py
pip-services-archive/pip-services-runtime-python
70eca1ffc44bfdc45c9c65b0ee347fa578368849
[ "MIT" ]
null
null
null
test/config/test_ComponentDescriptor.py
pip-services-archive/pip-services-runtime-python
70eca1ffc44bfdc45c9c65b0ee347fa578368849
[ "MIT" ]
null
null
null
test/config/test_ComponentDescriptor.py
pip-services-archive/pip-services-runtime-python
70eca1ffc44bfdc45c9c65b0ee347fa578368849
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ tests.config.test_ComponentDescriptor ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) Digital Living Software Corp. 2015-2016, see AUTHORS for more details. :license: MIT, see LICENSE for more details. """ import pytest from pip_services_runtime.config import Category from pip_services_runtime.config import ComponentDescriptor class TestComponentDescriptor: def test_match(self): descriptor = ComponentDescriptor(Category.Controllers, "pip-services-dummies", "default", "1.0") # Check match by individual fields assert descriptor.match(ComponentDescriptor(Category.Controllers, None, None, None)) assert descriptor.match(ComponentDescriptor(Category.Controllers, "pip-services-dummies", None, None)) assert descriptor.match(ComponentDescriptor(Category.Controllers, None, "default", None)) assert descriptor.match(ComponentDescriptor(Category.Controllers, None, None, "1.0")) # Check match by individual "*" fields assert descriptor.match(ComponentDescriptor(Category.Controllers, "*", "*", "*")) assert descriptor.match(ComponentDescriptor(Category.Controllers, "pip-services-dummies", "*", "*")) assert descriptor.match(ComponentDescriptor(Category.Controllers, "*", "default", "*")) assert descriptor.match(ComponentDescriptor(Category.Controllers, "*", "*", "1.0")) # Check match by all values assert descriptor.match(ComponentDescriptor(Category.Controllers, "pip-services-dummies", "default", None)) assert descriptor.match(ComponentDescriptor(Category.Controllers, None, "default", "1.0")) assert descriptor.match(ComponentDescriptor(Category.Controllers, "pip-services-dummies", "default", "1.0")) # Check match by special BusinessLogic category assert descriptor.match(ComponentDescriptor(Category.BusinessLogic, None, None, None)) # Check mismatch by individual fields assert not descriptor.match(ComponentDescriptor(Category.Cache, None, None, None)) assert not descriptor.match(ComponentDescriptor(Category.Controllers, "pip-services-runtime", None, None)) assert not descriptor.match(ComponentDescriptor(Category.Controllers, None, "special", None)) assert not descriptor.match(ComponentDescriptor(Category.Controllers, None, None, "2.0")) def test_to_string(self): descriptor1 = ComponentDescriptor(Category.Controllers, "pip-services-dummies", "default", "1.0") assert "controllers:pip-services-dummies:default:1.0" == str(descriptor1) descriptor2 = ComponentDescriptor(Category.Controllers, None, None, None) assert "controllers:*:*:*" == str(descriptor2)
52.245283
116
0.707114
275
2,769
7.090909
0.214545
0.263077
0.331282
0.344615
0.768718
0.736923
0.615385
0.559487
0.549231
0.216923
0
0.012489
0.16143
2,769
52
117
53.25
0.827304
0.147707
0
0
0
0
0.123335
0.018908
0
0
0
0
0.666667
1
0.074074
false
0
0.111111
0
0.222222
0
0
0
0
null
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
5
d5a15c1e22288dde136808d96f964b540b79f5e4
799
py
Python
tests/filters/test_installing_new_filter.py
kanzure/eth-testrpc
cbb22ff2bebc9f12098b0bb7f2a245f3510522b4
[ "MIT" ]
164
2016-04-20T08:30:22.000Z
2022-01-05T07:43:12.000Z
tests/filters/test_installing_new_filter.py
kanzure/eth-testrpc
cbb22ff2bebc9f12098b0bb7f2a245f3510522b4
[ "MIT" ]
55
2016-06-30T20:06:56.000Z
2019-12-12T07:36:02.000Z
tests/filters/test_installing_new_filter.py
kanzure/eth-testrpc
cbb22ff2bebc9f12098b0bb7f2a245f3510522b4
[ "MIT" ]
46
2016-04-27T16:28:46.000Z
2022-01-09T17:59:09.000Z
def test_registering_new_filter_with_no_args(rpc_client, rpc_call_emitter): filter_id = rpc_client( method='eth_newFilter', params=[{}] ) changes = rpc_client( method='eth_getFilterChanges', params=[filter_id], ) assert not changes def test_registering_new_filter_with_no_args(rpc_client, rpc_call_emitter): filter_id = rpc_client( method='eth_newFilter', params=[{ 'fromBlock': 1, 'toBlock': 10, 'address': '0xd3cda913deb6f67967b99d67acdfa1712c293601', 'topics': ['0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b'], }] ) changes = rpc_client( method='eth_getFilterChanges', params=[filter_id], ) assert not changes
26.633333
93
0.643304
74
799
6.540541
0.391892
0.11157
0.123967
0.14876
0.710744
0.710744
0.710744
0.710744
0.710744
0.710744
0
0.128814
0.261577
799
29
94
27.551724
0.691525
0
0
0.56
0
0
0.254068
0.135169
0
0
0.135169
0
0.08
1
0.08
false
0
0
0
0.08
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
635336bce61c740405bf7556ab0f3952b901691d
9,940
py
Python
src/scaffold.py
AAFC-MBB/metAMOS
b08e29d97f0fa55e63beb87f57a2cfd54fb2ca02
[ "Apache-2.0", "CC0-1.0" ]
68
2015-01-20T10:50:51.000Z
2021-02-28T10:47:09.000Z
src/scaffold.py
AAFC-MBB/metAMOS
b08e29d97f0fa55e63beb87f57a2cfd54fb2ca02
[ "Apache-2.0", "CC0-1.0" ]
120
2015-01-03T04:38:11.000Z
2021-03-16T17:50:39.000Z
src/scaffold.py
AAFC-MBB/metAMOS
b08e29d97f0fa55e63beb87f57a2cfd54fb2ca02
[ "Apache-2.0", "CC0-1.0" ]
30
2015-01-23T06:33:44.000Z
2021-11-15T06:34:19.000Z
#!python import os, sys, string, time, BaseHTTPServer, getopt, re, subprocess, webbrowser from operator import itemgetter from utils import * from findreps import FindRepeats from annotate import Annotate from fannotate import FunctionalAnnotation sys.path.append(INITIAL_UTILS) from ruffus import * _readlibs = [] _skipsteps = [] _settings = Settings() _retainBank = False _mated = False def init(reads, skipsteps, retainBank): global _readlibs global _skipsteps global _retainBank global _mated _readlibs = reads _skipsteps = skipsteps _retainBank = retainBank for lib in _readlibs: if lib.mated == True: _mated = True break @follows(FunctionalAnnotation) @posttask(touch_file("%s/Logs/scaffold.ok"%(_settings.rundir))) @files(["%s/Assemble/out/%s.asm.contig"%(_settings.rundir,_settings.PREFIX)],"%s/Logs/scaffold.ok"%(_settings.rundir)) def Scaffold(input,output): _asm = getSelectedAssembler(_settings) global _retainBank # check if we need to do scaffolding numMates = 0 # check if we need to retain the bank if not os.path.isdir("%s/Scaffold/in/%s.bnk"%(_settings.rundir, _settings.PREFIX)): _retainBank = False if not _retainBank: run_process(_settings, "rm -rf %s/Scaffold/in/%s.bnk"%(_settings.rundir,_settings.PREFIX),"Scaffold") if _asm == "newbler": p = subprocess.Popen("cat %s/Assemble/out/%s.graph.cte |grep \"{CTL\" |wc -l"%(_settings.rundir, _settings.PREFIX), stdin=None, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) (checkStdout, checkStderr) = p.communicate() numMates = int(checkStdout.strip()) if _asm == "newbler": run_process(_settings, "rm -rf %s/Scaffold/in/%s.bnk"%(_settings.rundir, _settings.PREFIX),"Scaffold") # build the bank for amos run_process(_settings, "%s/bank-transact -b %s/Scaffold/in/%s.bnk -c -m %s/Assemble/out/%s.afg"%(_settings.AMOS,_settings.rundir, _settings.PREFIX, _settings.rundir, _settings.PREFIX),"Scaffold") #elif _asm == "velvet" or _asm == "velvet-sc" or _asm == "metavelvet": # run_process(_settings, "rm -rf %s/Scaffold/in/%s.bnk"%(_settings.rundir, _settings.PREFIX), "Scaffold") # run_process(_settings, "%s/bank-transact -b %s/Scaffold/in/%s.bnk -c -m %s/Assemble/out/%s.afg"%(_settings.AMOS, _settings.rundir, _settings.PREFIX, _settings.rundir, _settings.PREFIX), "Scaffold") elif _asm == "ca" or _asm == "CA": run_process(_settings, "%s/toAmos_new -a %s/Assemble/out/%s.asm -f %s/Assemble/out/%s.frg -b %s/Scaffold/in/%s.bnk -U "%(_settings.AMOS, _settings.rundir, _settings.PREFIX, _settings.rundir, _settings.PREFIX, _settings.rundir, _settings.PREFIX),"Scaffold") else: for lib in _readlibs: if lib.format == "fasta": run_process(_settings, "%s/toAmos_new -s %s/Preprocess/out/lib%d.seq -m %s/Assemble/out/%s.lib%d.mappedmates -b %s/Scaffold/in/%s.bnk "%(_settings.AMOS,_settings.rundir,lib.id,_settings.rundir, _settings.PREFIX,lib.id,_settings.rundir,_settings.PREFIX),"Scaffold") elif lib.format == "fastq": matedStr = "" if lib.mated: matedStr = "-i --min %d --max %d --libname lib%d"%(lib.mmin, lib.mmax, lib.id) run_process(_settings, "%s/toAmos_new -Q %s/Preprocess/out/lib%d.seq %s -b %s/Scaffold/in/%s.bnk "%(_settings.AMOS,_settings.rundir,lib.id,matedStr,_settings.rundir,_settings.PREFIX),"Scaffold") run_process(_settings, "%s/toAmos_new -c %s/Assemble/out/%s.asm.tigr -b %s/Scaffold/in/%s.bnk "%(_settings.AMOS,_settings.rundir,_settings.PREFIX,_settings.rundir,_settings.PREFIX),"Scaffold") else: run_process(_settings, "perl %s/bank-unlock %s/Scaffold/in/%s.bnk"%(_settings.AMOS,_settings.rundir,_settings.PREFIX),"SCAFFOLD") run_process(_settings, "rm %s/Scaffold/in/%s.bnk/CTE.*"%(_settings.rundir,_settings.PREFIX),"SCAFFOLD") run_process(_settings, "rm %s/Scaffold/in/%s.bnk/CTL.*"%(_settings.rundir,_settings.PREFIX),"SCAFFOLD") run_process(_settings, "rm %s/Scaffold/in/%s.bnk/MTF.*"%(_settings.rundir,_settings.PREFIX),"SCAFFOLD") run_process(_settings, "rm %s/Scaffold/in/%s.bnk/SCF.*"%(_settings.rundir,_settings.PREFIX),"SCAFFOLD") # after the banks are created, skip the scaffolding when we have no mates if "Scaffold" in _skipsteps or "scaffold" in _skipsteps or "assemble" in _skipsteps or "Assemble" in _skipsteps: run_process(_settings, "%s/bank2fasta -eid -b %s/Scaffold/in/%s.bnk > %s/Scaffold/out/%s.contigs"%(_settings.AMOS, _settings.rundir, _settings.PREFIX, _settings.rundir, _settings.PREFIX), "Scaffold") if os.path.exists("%s/Assemble/out/%s.linearize.scaffolds.final"%(_settings.rundir, _settings.PREFIX)): run_process(_settings, "unlink %s/Scaffold/out/%s.linearize.scaffolds.final"%(_settings.rundir, _settings.PREFIX), "Scaffold") run_process(_settings, "ln %s/Assemble/out/%s.linearize.scaffolds.final %s/Scaffold/out/%s.linearize.scaffolds.final"%(_settings.rundir, _settings.PREFIX, _settings.rundir, _settings.PREFIX), "Scaffold") else: run_process(_settings, "unlink %s/Scaffold/out/%s.linearize.scaffolds.final"%(_settings.rundir, _settings.PREFIX), "Scaffold") run_process(_settings, "ln %s/Assemble/out/%s.asm.contig %s/Scaffold/out/%s.linearize.scaffolds.final"%(_settings.rundir, _settings.PREFIX, _settings.rundir, _settings.PREFIX), "Scaffold") run_process(_settings, "unlink %s/Scaffold/out/%s.scaffolds.final"%(_settings.rundir, _settings.PREFIX), "Scaffold") run_process(_settings, "ln %s/Scaffold/out/%s.linearize.scaffolds.final %s/Scaffold/out/%s.scaffolds.final"%(_settings.rundir, _settings.PREFIX, _settings.rundir, _settings.PREFIX), "Scaffold") run_process(_settings, "touch %s/Scaffold/out/%s.motifs"%(_settings.rundir, _settings.PREFIX), "Scaffold") run_process(_settings, "touch %s/Logs/scaffold.skip"%(_settings.rundir), "Scaffold") return 0 if _mated == False and numMates == 0: print "No mate pair info available for scaffolding, skipping" run_process(_settings, "%s/bank2fasta -eid -b %s/Scaffold/in/%s.bnk > %s/Scaffold/out/%s.contigs"%(_settings.AMOS, _settings.rundir, _settings.PREFIX, _settings.rundir, _settings.PREFIX), "Scaffold") run_process(_settings, "ln %s/Scaffold/out/%s.contigs %s/Scaffold/out/%s.linearize.scaffolds.final"%(_settings.rundir, _settings.PREFIX, _settings.rundir, _settings.PREFIX), "Scaffold") run_process(_settings, "ln %s/Scaffold/out/%s.scaffolds.final %s/Scaffold/out/%s.linearize.scaffolds.final"%(_settings.rundir, _settings.PREFIX, _settings.rundir, _settings.PREFIX), "Scaffold") run_process(_settings, "touch %s/Scaffold/out/%s.motifs"%(_settings.rundir, _settings.PREFIX), "Scaffold") #run_process(_settings, "touch %s/Scaffold/out/%s.linearize.scaffolds.final"%(_settings.rundir, _settings.PREFIX), "Scaffold") #_skipsteps.append("FindScaffoldORFS") #_skipsteps.append("Propagate") return 0 #use asmQC to update mate insert lens run_process(_settings, "%s/asmQC -b %s/Scaffold/in/%s.bnk -scaff -recompute -update -numsd 2 "%(_settings.AMOS,_settings.rundir,_settings.PREFIX),"SCAFFOLD") run_process(_settings, "perl %s/bank-unlock %s/Scaffold/in/%s.bnk"%(_settings.AMOS,_settings.rundir,_settings.PREFIX),"SCAFFOLD") #calls to Bambus2, goBambus2 script # first, parse the parameters markRepeatParams = getProgramParams(_settings.METAMOS_UTILS, "bambus.spec", "MarkRepeats", "-") orientContigParams = getProgramParams(_settings.METAMOS_UTILS, "bambus.spec", "OrientContigs", "-") run_process(_settings, "%s/clk -b %s/Scaffold/in/%s.bnk"%(_settings.BAMBUS2,_settings.rundir,_settings.PREFIX),"Scaffold") run_process(_settings, "%s/Bundler -b %s/Scaffold/in/%s.bnk"%(_settings.BAMBUS2,_settings.rundir,_settings.PREFIX),"Scaffold") run_process(_settings, "%s/MarkRepeats %s -b %s/Scaffold/in/%s.bnk > %s/Scaffold/in/%s.reps"%(_settings.BAMBUS2,markRepeatParams,_settings.rundir,_settings.PREFIX,_settings.rundir,_settings.PREFIX),"Scaffold") run_process(_settings, "%s/OrientContigs %s -b %s/Scaffold/in/%s.bnk -repeats %s/Scaffold/in/%s.reps "%(_settings.BAMBUS2,orientContigParams,_settings.rundir,_settings.PREFIX, _settings.rundir, _settings.PREFIX),"Scaffold") # output results run_process(_settings, "%s/bank2fasta -eid -b %s/Scaffold/in/%s.bnk > %s/Scaffold/out/%s.contigs"%(_settings.AMOS,_settings.rundir,_settings.PREFIX,_settings.rundir,_settings.PREFIX),"Scaffold") run_process(_settings, "%s/OutputMotifs -b %s/Scaffold/in/%s.bnk > %s/Scaffold/out/%s.motifs"%(_settings.BAMBUS2,_settings.rundir,_settings.PREFIX,_settings.rundir,_settings.PREFIX),"Scaffold") if _settings.VERBOSE: run_process(_settings, "%s/OutputResults -b %s/Scaffold/in/%s.bnk -p %s/Scaffold/out/%s "%(_settings.BAMBUS2,_settings.rundir,_settings.PREFIX,_settings.rundir,_settings.PREFIX),"Scaffold") run_process(_settings, "%s/OutputScaffolds -b %s/Scaffold/in/%s.bnk > %s/Scaffold/out/%s.scaffolds.final"%(_settings.BAMBUS2,_settings.rundir,_settings.PREFIX,_settings.rundir,_settings.PREFIX),"Scaffold") # generate linearize results run_process(_settings, "%s/Linearize -b %s/Scaffold/in/%s.bnk"%(_settings.BAMBUS2,_settings.rundir,_settings.PREFIX),"Scaffold") if _settings.VERBOSE: run_process(_settings, "%s/OutputResults -b %s/Scaffold/in/%s.bnk -p %s/Scaffold/out/%s.linearize "%(_settings.BAMBUS2,_settings.rundir,_settings.PREFIX,_settings.rundir,_settings.PREFIX),"Scaffold") run_process(_settings, "%s/OutputScaffolds -b %s/Scaffold/in/%s.bnk > %s/Scaffold/out/%s.linearize.scaffolds.final"%(_settings.BAMBUS2,_settings.rundir,_settings.PREFIX,_settings.rundir,_settings.PREFIX),"Scaffold")
72.028986
283
0.7166
1,298
9,940
5.268105
0.154854
0.143317
0.209125
0.26616
0.746271
0.722726
0.646095
0.63425
0.6284
0.591986
0
0.002298
0.124447
9,940
137
284
72.554745
0.783408
0.088632
0
0.265306
0
0.214286
0.321314
0.19124
0
0
0
0
0
0
null
null
0
0.071429
null
null
0.010204
0
0
0
null
0
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
5
6387ac91219fabf266d453b9e260830e6ef79fd1
1,021
py
Python
cupProject/cupApp/models.py
cs-fullstack-2019-spring/django-moreviews-cw-bettyjware11-1
aa8f2631882af7afb36c0d4b87124a5df58b63d4
[ "Apache-2.0" ]
null
null
null
cupProject/cupApp/models.py
cs-fullstack-2019-spring/django-moreviews-cw-bettyjware11-1
aa8f2631882af7afb36c0d4b87124a5df58b63d4
[ "Apache-2.0" ]
null
null
null
cupProject/cupApp/models.py
cs-fullstack-2019-spring/django-moreviews-cw-bettyjware11-1
aa8f2631882af7afb36c0d4b87124a5df58b63d4
[ "Apache-2.0" ]
null
null
null
from django.db import models # Create your models here. # name, material, and manufacturerDate class Cup(models.Model): name = models.CharField(max_length=200, default="") material = models.CharField(max_length=200, default="") manufactuerDate = models.DateField(default="") # phoneApp # from django.db import models # # # Create your models here. # class Phone(models.Model): # name = models.CharField(max_length=200, default="") # hoursOfBattery = models.DecimalField(default=0.0, max_digits=5, decimal_places=2) # version = models.DecimalField(default=0.0, max_digits=5, decimal_places=2) # # def __str__(self): # return self.name # computerApp # from django.db import models # # # Create your models here. # class Computer(models.Model): # name = models.CharField(max_length=200, default="") # cores = models.IntegerField(default=0) # speed = models.DecimalField(default=0.0, max_digits=5, decimal_places=2) # # def __str__(self): # return self.name
27.594595
87
0.700294
130
1,021
5.361538
0.323077
0.086083
0.1033
0.137733
0.751793
0.751793
0.703013
0.703013
0.703013
0.428981
0
0.029516
0.170421
1,021
36
88
28.361111
0.793388
0.726738
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.2
0
1
0
0
0
0
null
0
0
0
0
1
1
1
1
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
5
638aa3631321ed4ba691687d6cc9dab64466f140
157
py
Python
docs/libs/pystache/tests/examples/partials_with_lambdas.py
rsh/Cinder-Emscripten
4a08250c56656865c7c3a52fb9380980908b1439
[ "BSD-2-Clause" ]
3,494
2015-01-02T08:42:09.000Z
2022-03-31T14:16:23.000Z
pystache/tests/examples/partials_with_lambdas.py
idobatter/pystache
17a5dfdcd56eb76af731d141de395a7632a905b8
[ "MIT" ]
1,284
2015-01-02T07:31:47.000Z
2022-03-30T02:06:43.000Z
pystache/tests/examples/partials_with_lambdas.py
idobatter/pystache
17a5dfdcd56eb76af731d141de395a7632a905b8
[ "MIT" ]
780
2015-01-02T22:14:29.000Z
2022-03-30T00:16:56.000Z
""" TODO: add a docstring. """ from pystache.tests.examples.lambdas import rot class PartialsWithLambdas(object): def rot(self): return rot
12.076923
47
0.681529
19
157
5.631579
0.894737
0
0
0
0
0
0
0
0
0
0
0
0.210191
157
12
48
13.083333
0.862903
0.140127
0
0
0
0
0
0
0
0
0
0.083333
0
1
0.25
false
0
0.25
0.25
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
1
1
0
0
5
892125871819283c390b85ff0add6e3a26d78b0a
184
py
Python
src/intellimouse_ctl/__main__.py
K-Visscher/intellimouse-ctl
871c225584d0f41270d6cf5ae59c53d4da386f6d
[ "MIT" ]
1
2022-03-18T10:39:42.000Z
2022-03-18T10:39:42.000Z
src/intellimouse_ctl/__main__.py
K-Visscher/intellimouse-ctl
871c225584d0f41270d6cf5ae59c53d4da386f6d
[ "MIT" ]
3
2022-02-21T15:52:11.000Z
2022-02-23T04:58:12.000Z
src/intellimouse_ctl/__main__.py
K-Visscher/intellimouse-ctl
871c225584d0f41270d6cf5ae59c53d4da386f6d
[ "MIT" ]
1
2022-02-28T03:05:41.000Z
2022-02-28T03:05:41.000Z
#!/usr/bin/env python3 """ This module provides the `if __name__ == "__main__":` construct for the intellimouse-ctl CLI`. """ from . import main if __name__ == "__main__": main()
20.444444
94
0.673913
24
184
4.5
0.75
0.111111
0.185185
0
0
0
0
0
0
0
0
0.006536
0.168478
184
8
95
23
0.699346
0.630435
0
0
0
0
0.133333
0
0
0
0
0
0
1
0
true
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
1
0
1
0
0
0
0
5
89791026fe35567f525e83c0c81f5532756f85fd
169
py
Python
tests/parser.py
henry232323/pycord
93b4c0b38f1036f3d36af0a5c00e62a15c312841
[ "MIT" ]
23
2017-09-16T13:13:12.000Z
2017-11-16T23:24:46.000Z
tests/parser.py
henry232323/pycord
93b4c0b38f1036f3d36af0a5c00e62a15c312841
[ "MIT" ]
5
2017-11-20T04:39:26.000Z
2020-11-29T09:32:47.000Z
tests/parser.py
henry232323/pycord
93b4c0b38f1036f3d36af0a5c00e62a15c312841
[ "MIT" ]
11
2018-01-19T14:51:38.000Z
2021-04-07T08:38:42.000Z
import inspect def is_mod(ctx): return True def test(first:int, last:str) -> is_mod: pass print(inspect.signature(test).return_annotation is inspect._empty)
15.363636
66
0.733728
26
169
4.615385
0.692308
0.083333
0
0
0
0
0
0
0
0
0
0
0.159763
169
10
67
16.9
0.84507
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0.166667
0.166667
0.166667
0.666667
0.166667
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
1
1
0
0
5
7f2d3afb107602e0b2b0fd5c94ee6b42ad1ca71b
97
py
Python
wpy/common/__init__.py
wxnacy/wpy
575def7e0653e92658df1aaeea71e381ac5de533
[ "MIT" ]
null
null
null
wpy/common/__init__.py
wxnacy/wpy
575def7e0653e92658df1aaeea71e381ac5de533
[ "MIT" ]
null
null
null
wpy/common/__init__.py
wxnacy/wpy
575def7e0653e92658df1aaeea71e381ac5de533
[ "MIT" ]
null
null
null
from .security import MD5 from .rand import Rand from .xml import XML from .format import Format
19.4
26
0.793814
16
97
4.8125
0.4375
0
0
0
0
0
0
0
0
0
0
0.012346
0.164948
97
4
27
24.25
0.938272
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
7f30b5f2c749a8b7a7210d24842dca5f32d2d3d0
15,534
py
Python
mule/lib/mule/tests/unit/test_operators.py
metomi/mule
44a64bb6d49755cf6fec3d466e8719671e73d130
[ "BSD-3-Clause" ]
null
null
null
mule/lib/mule/tests/unit/test_operators.py
metomi/mule
44a64bb6d49755cf6fec3d466e8719671e73d130
[ "BSD-3-Clause" ]
null
null
null
mule/lib/mule/tests/unit/test_operators.py
metomi/mule
44a64bb6d49755cf6fec3d466e8719671e73d130
[ "BSD-3-Clause" ]
2
2019-09-16T04:52:22.000Z
2021-04-11T06:12:22.000Z
# *****************************COPYRIGHT****************************** # (C) Crown copyright Met Office. All rights reserved. # For further details please refer to the file LICENCE.txt # which you should have received as part of this distribution. # *****************************COPYRIGHT****************************** # # This file is part of Mule. # # Mule is free software: you can redistribute it and/or modify it under # the terms of the Modified BSD License, as published by the # Open Source Initiative. # # Mule is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # Modified BSD License for more details. # # You should have received a copy of the Modified BSD License # along with Mule. If not, see <http://opensource.org/licenses/BSD-3-Clause>. """ Unit tests for the built-in :class:`mule.DataOperator` subclasses. """ from __future__ import (absolute_import, division, print_function) import numpy as np import mule.tests as tests import mule.operators as operators from mule import Field3, ArrayDataProvider class Test_operators(tests.MuleTest): MDI = -1234.0 # Create a field object from a data array; this only needs to be very # basic to provide something suitable to test the operators def _field_from_data(self, data): fld = Field3.empty() fld.lbrel = 3 fld.lbrow = data.shape[0] fld.lbnpt = data.shape[1] fld.bmdi = self.MDI provider = ArrayDataProvider(data) fld.set_data_provider(provider) return fld def run_operator_test(self, data, operator, valid): if hasattr(data, "shape"): # Single array argument fld = self._field_from_data(data) new_field = operator(fld) else: # Multi-array argument flds = [] for array in data: flds.append(self._field_from_data(array)) provider = ArrayDataProvider(array) flds[-1].set_data_provider(provider) new_field = operator(flds) # Retrieve the transformed data and compare it to the valid data self.assertArrayEqual(new_field.get_data(), valid) # Test typical usage of operator to add to a field def test_AddScalarOperator_add(self): data = np.arange(12, dtype="float").reshape(4, 3) operator = operators.AddScalarOperator(50.0) valid = data + 50.0 self.run_operator_test(data, operator, valid) # Test typical usage of operator to subtract from a field def test_AddScalarOperator_subtract(self): data = np.arange(12, dtype="float").reshape(4, 3) operator = operators.AddScalarOperator(-50.0) valid = data - 50.0 self.run_operator_test(data, operator, valid) # Test typical usage of operator to add to a field, with mdi points def test_AddScalarOperator_mdi(self): data = np.arange(12, dtype="float").reshape(4, 3) data[2, 2] = self.MDI operator = operators.AddScalarOperator(50.0) valid = data + 50.0 valid[2, 2] = self.MDI self.run_operator_test(data, operator, valid) # Test typical usage of operator to multiply a field def test_ScaleFactorOperator_multiply(self): data = np.arange(12, dtype="float").reshape(4, 3) operator = operators.ScaleFactorOperator(3.0) valid = data * 3.0 self.run_operator_test(data, operator, valid) # Test typical usage of operator to divide a field def test_ScaleFactorOperator_divide(self): data = np.arange(12, dtype="float").reshape(4, 3) operator = operators.ScaleFactorOperator(0.5) valid = data * 0.5 self.run_operator_test(data, operator, valid) # Test typical usage of operator to multiply a field, with mdi points def test_ScaleFactorOperator_mdi(self): data = np.arange(12, dtype="float").reshape(4, 3) data[2, 2] = self.MDI operator = operators.ScaleFactorOperator(3.0) valid = data * 3.0 valid[2, 2] = self.MDI self.run_operator_test(data, operator, valid) # Test limit operator lower limit only def test_HardLimitOperator_lower(self): data = np.arange(12, dtype="float").reshape(4, 3) operator = operators.HardLimitOperator(lower_limit=4.0) valid = data.copy() valid[data < 4.0] = 4.0 self.run_operator_test(data, operator, valid) # Test limit operator upper limit only def test_HardLimitOperator_upper(self): data = np.arange(12, dtype="float").reshape(4, 3) operator = operators.HardLimitOperator(upper_limit=8.0) valid = data.copy() valid[data > 8.0] = 8.0 self.run_operator_test(data, operator, valid) # Test limit operator lower and upper limits def test_HardLimitOperator_both(self): data = np.arange(12, dtype="float").reshape(4, 3) operator = operators.HardLimitOperator(lower_limit=3.0, upper_limit=9.0) valid = data.copy() valid[data < 3.0] = 3.0 valid[data > 9.0] = 9.0 self.run_operator_test(data, operator, valid) # Test limit operator lower and upper limits with fill values def test_HardLimitOperator_both(self): data = np.arange(12, dtype="float").reshape(4, 3) operator = operators.HardLimitOperator(lower_limit=3.0, lower_fill=99.0, upper_limit=9.0, upper_fill=123.0) valid = data.copy() valid[data < 3.0] = 99.0 valid[data > 9.0] = 123.0 self.run_operator_test(data, operator, valid) # Test limit operator lower and upper limits with fill values and mdi def test_HardLimitOperator_both_mdi(self): data = np.arange(12, dtype="float").reshape(4, 3) operator = operators.HardLimitOperator(lower_limit=3.0, lower_fill=99.0, upper_limit=9.0, upper_fill=123.0) data[2, 2] = self.MDI valid = data.copy() valid[data < 3.0] = 99.0 valid[data > 9.0] = 123.0 valid[2, 2] = self.MDI self.run_operator_test(data, operator, valid) # Test value exchange operator on non-mdi value def test_ValueExchangeOperator_non_mdi(self): data = np.arange(12, dtype="float").reshape(4, 3) operator = operators.ValueExchangeOperator(5.0, 123.0) valid = data.copy() valid[1, 2] = 123.0 self.run_operator_test(data, operator, valid) # Test value exchange operator on mdi value def test_ValueExchangeOperator_mdi(self): data = np.arange(12, dtype="float").reshape(4, 3) data[2, 2] = self.MDI operator = operators.ValueExchangeOperator(self.MDI, 123.0) valid = data.copy() valid[2, 2] = 123.0 self.run_operator_test(data, operator, valid) # Test adding multiple fields together def test_AddFieldsOperator(self): data1 = np.arange(12, dtype="float").reshape(4, 3) data2 = np.arange(12, 24, dtype="float").reshape(4, 3) data3 = np.arange(24, 36, dtype="float").reshape(4, 3) data = [data1, data2, data3] operator = operators.AddFieldsOperator() valid = data1 + data2 + data3 self.run_operator_test(data, operator, valid) # Test adding multiple fields together, with mdi points preserved def test_AddFieldsOperator_preserve_mdi(self): data1 = np.arange(12, dtype="float").reshape(4, 3) data2 = np.arange(12, 24, dtype="float").reshape(4, 3) data3 = np.arange(24, 36, dtype="float").reshape(4, 3) data1[2, 2] = self.MDI data = [data1, data2, data3] operator = operators.AddFieldsOperator() valid = data1 + data2 + data3 valid[2, 2] = self.MDI self.run_operator_test(data, operator, valid) # Test adding multiple fields together, with mdi points not preserved def test_AddFieldsOperator_no_preserve_mdi(self): data1 = np.arange(12, dtype="float").reshape(4, 3) data2 = np.arange(12, 24, dtype="float").reshape(4, 3) data3 = np.arange(24, 36, dtype="float").reshape(4, 3) data1[2, 2] = self.MDI data = [data1, data2, data3] operator = operators.AddFieldsOperator(preserve_mdi=False) valid = data1 + data2 + data3 self.run_operator_test(data, operator, valid) # Test adding multiple fields together, alternative mdi value def test_AddFieldsOperator_alternative_mdi(self): data1 = np.arange(12, dtype="float").reshape(4, 3) data2 = np.arange(12, 24, dtype="float").reshape(4, 3) data3 = np.arange(24, 36, dtype="float").reshape(4, 3) data1[2, 2] = self.MDI data = [data1, data2, data3] operator = operators.AddFieldsOperator(mdi_val=15.0) valid = data1 + data2 + data3 valid[1, 0] = 15.0 self.run_operator_test(data, operator, valid) # Test subtraction of multiple fields def test_SubtractFieldsOperator(self): data1 = np.arange(12, dtype="float").reshape(4, 3) data2 = np.arange(12, 24, dtype="float").reshape(4, 3) data3 = np.arange(24, 36, dtype="float").reshape(4, 3) data = [data1, data2, data3] operator = operators.SubtractFieldsOperator() valid = data1 - data2 - data3 self.run_operator_test(data, operator, valid) # Test subtracting multiple fields, with mdi points preserved def test_SubtractFieldsOperator_preserve_mdi(self): data1 = np.arange(12, dtype="float").reshape(4, 3) data2 = np.arange(12, 24, dtype="float").reshape(4, 3) data3 = np.arange(24, 36, dtype="float").reshape(4, 3) data1[2, 2] = self.MDI data = [data1, data2, data3] operator = operators.SubtractFieldsOperator() valid = data1 - data2 - data3 valid[2, 2] = self.MDI self.run_operator_test(data, operator, valid) # Test subtracting multiple fields, with mdi points not preserved def test_SubtractFieldsOperator_no_preserve_mdi(self): data1 = np.arange(12, dtype="float").reshape(4, 3) data2 = np.arange(12, 24, dtype="float").reshape(4, 3) data3 = np.arange(24, 36, dtype="float").reshape(4, 3) data1[2, 2] = self.MDI data = [data1, data2, data3] operator = operators.SubtractFieldsOperator(preserve_mdi=False) valid = data1 - data2 - data3 self.run_operator_test(data, operator, valid) # Test subtracting multiple fields, alternative mdi value def test_SubtractFieldsOperator_alternative_mdi(self): data1 = np.arange(12, dtype="float").reshape(4, 3) data2 = np.arange(12, 24, dtype="float").reshape(4, 3) data3 = np.arange(24, 36, dtype="float").reshape(4, 3) data1[2, 2] = self.MDI data = [data1, data2, data3] operator = operators.SubtractFieldsOperator(mdi_val=15.0) valid = data1 - data2 - data3 valid[1, 0] = 15.0 self.run_operator_test(data, operator, valid) # Test multiplying fields def test_MultiplyFieldsOperator(self): data1 = np.arange(12, dtype="float").reshape(4, 3) data2 = np.arange(12, 24, dtype="float").reshape(4, 3) data3 = np.arange(24, 36, dtype="float").reshape(4, 3) data = [data1, data2, data3] operator = operators.MultiplyFieldsOperator() valid = data1 * data2 * data3 self.run_operator_test(data, operator, valid) # Test multiplying fields, with mdi points preserved def test_MultiplyFieldsOperator_preserve_mdi(self): data1 = np.arange(12, dtype="float").reshape(4, 3) data2 = np.arange(12, 24, dtype="float").reshape(4, 3) data3 = np.arange(24, 36, dtype="float").reshape(4, 3) data1[2, 2] = self.MDI data = [data1, data2, data3] operator = operators.MultiplyFieldsOperator() valid = data1 * data2 * data3 valid[2, 2] = self.MDI self.run_operator_test(data, operator, valid) # Test multiplying fields, with mdi points not preserved def test_MultiplyFieldsOperator_no_preserve_mdi(self): data1 = np.arange(12).reshape(4, 3) data2 = np.arange(12, 24).reshape(4, 3) data3 = np.arange(24, 36).reshape(4, 3) data1[2, 2] = self.MDI data = [data1, data2, data3] operator = operators.MultiplyFieldsOperator(preserve_mdi=False) valid = data1 * data2 * data3 self.run_operator_test(data, operator, valid) # Test multiplying fields, alternative mdi value def test_MultiplyFieldsOperator_alternative_mdi(self): data1 = np.arange(12, dtype="float").reshape(4, 3) data2 = np.arange(12, 24, dtype="float").reshape(4, 3) data3 = np.arange(24, 36, dtype="float").reshape(4, 3) data1[2, 2] = self.MDI data = [data1, data2, data3] operator = operators.MultiplyFieldsOperator(mdi_val=15.0) valid = data1 * data2 * data3 valid[1, 0] = 15.0 self.run_operator_test(data, operator, valid) # Test dividing fields def test_DivideFieldsOperator(self): data1 = np.arange(12, dtype="float").reshape(4, 3) data2 = np.arange(12, 24, dtype="float").reshape(4, 3) data3 = np.arange(24, 36, dtype="float").reshape(4, 3) data = [data1, data2, data3] operator = operators.DivideFieldsOperator() valid = data1 / data2 / data3 self.run_operator_test(data, operator, valid) # Test dividing fields, with mdi points preserved def test_DivideFieldsOperator_preserve_mdi(self): data1 = np.arange(12, dtype="float").reshape(4, 3) data2 = np.arange(12, 24, dtype="float").reshape(4, 3) data3 = np.arange(24, 36, dtype="float").reshape(4, 3) data1[2, 2] = self.MDI data = [data1, data2, data3] operator = operators.DivideFieldsOperator() valid = data1 / data2 / data3 valid[2, 2] = self.MDI self.run_operator_test(data, operator, valid) # Test dividing fields, with mdi points not preserved def test_DivideFieldsOperator_no_preserve_mdi(self): data1 = np.arange(12, dtype="float").reshape(4, 3) data2 = np.arange(12, 24, dtype="float").reshape(4, 3) data3 = np.arange(24, 36, dtype="float").reshape(4, 3) data1[2, 2] = self.MDI data = [data1, data2, data3] operator = operators.DivideFieldsOperator(preserve_mdi=False) valid = data1 / data2 / data3 self.run_operator_test(data, operator, valid) # Test dividing fields, alternative mdi value def test_DivideFieldsOperator_alternative_mdi(self): data1 = np.arange(12, dtype="float").reshape(4, 3) data2 = np.arange(12, 24, dtype="float").reshape(4, 3) data3 = np.arange(24, 36, dtype="float").reshape(4, 3) data1[2, 2] = self.MDI data = [data1, data2, data3] operator = operators.DivideFieldsOperator(mdi_val=15.0) valid = data1 / data2 / data3 valid[1, 0] = 15.0 self.run_operator_test(data, operator, valid) if __name__ == '__main__': tests.main()
42.558904
78
0.625209
2,018
15,534
4.721506
0.10109
0.051217
0.05762
0.109572
0.787888
0.750315
0.731003
0.719773
0.702351
0.694584
0
0.058284
0.255568
15,534
364
79
42.675824
0.765652
0.167632
0
0.689139
0
0
0.023545
0
0
0
0
0
0.003745
1
0.116105
false
0
0.018727
0
0.146067
0.003745
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
7f489e632fd03d55c19898f964cacf85f0fe4422
89
py
Python
ai/app/schema/comments.py
0xCompyler/shulker
79fdbdfa17f50fdbff7f7e709a87d8a8ea84cb51
[ "MIT" ]
3
2022-03-09T06:01:25.000Z
2022-03-13T06:35:57.000Z
ai/app/schema/comments.py
0xCompyler/shulker
79fdbdfa17f50fdbff7f7e709a87d8a8ea84cb51
[ "MIT" ]
null
null
null
ai/app/schema/comments.py
0xCompyler/shulker
79fdbdfa17f50fdbff7f7e709a87d8a8ea84cb51
[ "MIT" ]
null
null
null
from pydantic import BaseModel class CommentsAnalysis(BaseModel): comment_url: str
14.833333
34
0.797753
10
89
7
0.9
0
0
0
0
0
0
0
0
0
0
0
0.157303
89
5
35
17.8
0.933333
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
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
1
0
1
0
1
0
0
5
7f5b5d17c96a732f40ff07466067d4e4738aa4e7
1,049
py
Python
apps/fhir/server/migrations/0001_squashed_0018_auto_20210513_1812.py
CMSgov/bluebutton-web-server
3e7bfb049a2b6bd64fdc4eeae7512b461ccbe682
[ "Apache-2.0" ]
25
2017-12-10T00:48:31.000Z
2022-03-25T01:29:13.000Z
apps/fhir/server/migrations/0001_squashed_0018_auto_20210513_1812.py
EmmaIvy/bluebutton-web-server
7dbb1a65532c56a905bc825d6a7f170bf6f311c8
[ "Apache-2.0" ]
298
2017-12-05T05:53:32.000Z
2022-03-21T19:29:03.000Z
apps/fhir/server/migrations/0001_squashed_0018_auto_20210513_1812.py
EmmaIvy/bluebutton-web-server
7dbb1a65532c56a905bc825d6a7f170bf6f311c8
[ "Apache-2.0" ]
31
2017-12-04T16:01:12.000Z
2021-09-26T22:34:55.000Z
# Generated by Django 2.2.22 on 2021-05-13 23:23 from django.db import migrations class Migration(migrations.Migration): replaces = [('server', '0001_initial'), ('server', '0002_auto_20160917_1523'), ('server', '0003_auto_20160917_1745'), ('server', '0004_auto_20160917_1802'), ('server', '0005_supportedresourcetype_patch'), ('server', '0006_supportedresourcetype_secure_access'), ('server', '0007_auto_20170423_2201'), ('server', '0008_supportedresourcetype_resourcetype'), ('server', '0009_auto_20170501_2213'), ('server', '0010_auto_20170501_2220'), ('server', '0011_auto_20170713_1917'), ('server', '0012_auto_20170713_1944'), ('server', '0013_resourcerouter_supported_resource'), ('server', '0014_remove_resourcerouter_supported_resource'), ('server', '0015_resourcerouter_supported_resource'), ('server', '0016_resourcerouter_server_search_expiry'), ('server', '0017_resourcerouter_wait_time')] initial = True dependencies = [ ('bluebutton', '0001_squashed_0006_auto_20210513_1812'), ] operations = [ ]
58.277778
784
0.746425
116
1,049
6.284483
0.594828
0.049383
0.127572
0.152263
0
0
0
0
0
0
0
0.211193
0.097235
1,049
17
785
61.705882
0.558606
0.043851
0
0
1
0
0.645355
0.521479
0
0
0
0
0
1
0
false
0
0.111111
0
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
1
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
5
7fbc4588ccbe0579a7620eb1423a4aad17ea622a
44
py
Python
tests/components/rest_command/__init__.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
tests/components/rest_command/__init__.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
31,101
2020-03-02T13:00:16.000Z
2022-03-31T23:57:36.000Z
tests/components/rest_command/__init__.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Tests for the rest_command component."""
22
43
0.727273
6
44
5.166667
1
0
0
0
0
0
0
0
0
0
0
0
0.113636
44
1
44
44
0.794872
0.840909
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
7fbe45d27f5668798d0798fca12f8ba810bc7d8b
39
py
Python
test/__init__.py
thomas-neuman/nkn-client-python
a64dd17fde55442c4904fe00a2448b9aeb734cf6
[ "Apache-2.0" ]
null
null
null
test/__init__.py
thomas-neuman/nkn-client-python
a64dd17fde55442c4904fe00a2448b9aeb734cf6
[ "Apache-2.0" ]
null
null
null
test/__init__.py
thomas-neuman/nkn-client-python
a64dd17fde55442c4904fe00a2448b9aeb734cf6
[ "Apache-2.0" ]
null
null
null
from nkn_client.client import NknClient
39
39
0.897436
6
39
5.666667
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.076923
39
1
39
39
0.944444
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5