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
74d59e48d760c2bdd824f63462307dcc9124fac9
131
py
Python
tfidf_matcher/__init__.py
stungkit/tfidf_matcher
24182504d21f1eb978839b700f1c402c6288df2f
[ "MIT" ]
13
2020-02-24T18:29:15.000Z
2021-12-28T09:41:35.000Z
tfidf_matcher/__init__.py
stungkit/tfidf_matcher
24182504d21f1eb978839b700f1c402c6288df2f
[ "MIT" ]
null
null
null
tfidf_matcher/__init__.py
stungkit/tfidf_matcher
24182504d21f1eb978839b700f1c402c6288df2f
[ "MIT" ]
3
2020-07-21T04:32:45.000Z
2021-10-21T11:00:56.000Z
# AUTHOR: Louis Tsiattalou # DESCRIPTION: Init for tfidf_matcher package. from .ngrams import ngrams from .matcher import matcher
21.833333
46
0.801527
17
131
6.117647
0.705882
0
0
0
0
0
0
0
0
0
0
0
0.145038
131
5
47
26.2
0.928571
0.526718
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
2d079a19d871b67d7ba2ce209923cccc01b9ff8d
242
py
Python
ecart/serializer.py
micael-grilo/E-Cart
76e86b4c7ea5bd2becda23ef8c69470c86630c5e
[ "MIT" ]
5
2016-09-20T21:33:29.000Z
2018-10-10T06:07:45.000Z
ecart/serializer.py
micael-grilo/E-Cart
76e86b4c7ea5bd2becda23ef8c69470c86630c5e
[ "MIT" ]
1
2016-05-03T07:54:54.000Z
2016-05-03T13:16:48.000Z
ecart/serializer.py
micael-grilo/E-Cart
76e86b4c7ea5bd2becda23ef8c69470c86630c5e
[ "MIT" ]
3
2016-09-18T14:54:49.000Z
2020-01-08T18:19:51.000Z
import json class Serializer(object): """docstring for Serializer""" @staticmethod def dumps(data_obj): return json.dumps(data_obj) @staticmethod def loads(data_string): return json.loads(data_string)
16.133333
38
0.665289
28
242
5.607143
0.535714
0.191083
0.152866
0
0
0
0
0
0
0
0
0
0.239669
242
14
39
17.285714
0.853261
0.099174
0
0.25
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.125
0.25
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
2d1815bfd6d647756ab866fe6efa2fc1a8f472f8
15,759
py
Python
fn_portal/filters/FishAttr_filters.py
AdamCottrill/FishNetPortal
4e58e05f52346ac1ab46698a03d4229c74828406
[ "MIT" ]
null
null
null
fn_portal/filters/FishAttr_filters.py
AdamCottrill/FishNetPortal
4e58e05f52346ac1ab46698a03d4229c74828406
[ "MIT" ]
null
null
null
fn_portal/filters/FishAttr_filters.py
AdamCottrill/FishNetPortal
4e58e05f52346ac1ab46698a03d4229c74828406
[ "MIT" ]
null
null
null
import django_filters from .common_filters import NumberInFilter, ValueInFilter, GeomFilter, GeoFilterSet class FishAttrFilters(GeoFilterSet): """A filter set that contains filters that are common to all the FN125 child tables - FN125Lamprey, FN125Tag, Fn126, and FN127. Filtersets for those class inherit from this one, and add their own models and model specific filters. Filters in this class include filters from FN011 to FN125 Tables. """ roi = GeomFilter( field_name="fish__catch__effort__sample__geom__within", method="filter_roi" ) buffered_point = GeomFilter( field_name="fish__catch__effort__sample__geom__within", method="filter_point" ) management_unit__in = ValueInFilter( field_name="fish__catch__effort__sample__management_units__slug" ) management_unit__not__in = ValueInFilter( field_name="fish__catch__effort__sample__management_units__slug", exclude=True ) # FN011 (PROJECT) ATTRIBUTES year = django_filters.CharFilter( field_name="fish__catch__effort__sample__project__year", lookup_expr="exact" ) year__gte = django_filters.NumberFilter( field_name="fish__catch__effort__sample__project__year", lookup_expr="gte" ) year__lte = django_filters.NumberFilter( field_name="fish__catch__effort__sample__project__year", lookup_expr="lte" ) year__gt = django_filters.NumberFilter( field_name="fish__catch__effort__sample__project__year", lookup_expr="gt" ) year__lt = django_filters.NumberFilter( field_name="fish__catch__effort__sample__project__year", lookup_expr="lt" ) prj_date0 = django_filters.DateFilter( field_name="fish__catch__effort__sample__project__prj_date0", help_text="format: yyyy-mm-dd", ) prj_date0__gte = django_filters.DateFilter( field_name="fish__catch__effort__sample__project__prj_date0", lookup_expr="gte", help_text="format: yyyy-mm-dd", ) prj_date0__lte = django_filters.DateFilter( field_name="fish__catch__effort__sample__project__prj_date0", lookup_expr="lte", help_text="format: yyyy-mm-dd", ) prj_date1 = django_filters.DateFilter( field_name="fish__catch__effort__sample__project__prj_date1", help_text="format: yyyy-mm-dd", ) prj_date1__gte = django_filters.DateFilter( field_name="fish__catch__effort__sample__project__prj_date1", lookup_expr="gte", help_text="format: yyyy-mm-dd", ) prj_date1__lte = django_filters.DateFilter( field_name="fish__catch__effort__sample__project__prj_date1", lookup_expr="lte", help_text="format: yyyy-mm-dd", ) prj_cd = ValueInFilter(field_name="fish__catch__effort__sample__project__prj_cd") prj_cd__not = ValueInFilter( field_name="fish__catch__effort__sample__project__prj_cd", exclude=True ) prj_cd__like = django_filters.CharFilter( field_name="fish__catch__effort__sample__project__prj_cd", lookup_expr="icontains", ) prj_cd__not_like = django_filters.CharFilter( field_name="fish__catch__effort__sample__project__prj_cd", lookup_expr="icontains", exclude=True, ) prj_cd__endswith = django_filters.CharFilter( field_name="fish__catch__effort__sample__project__prj_cd", lookup_expr="endswith", ) prj_cd__not_endswith = django_filters.CharFilter( field_name="fish__catch__effort__sample__project__prj_cd", lookup_expr="endswith", exclude=True, ) prj_nm__like = django_filters.CharFilter( field_name="fish__catch__effort__sample__project__prj_nm", lookup_expr="icontains", ) prj_nm__not_like = django_filters.CharFilter( field_name="fish__catch__effort__sample__project__prj_nm", lookup_expr="icontains", exclude=True, ) prj_ldr = django_filters.CharFilter( field_name="fish__catch__effort__sample__project__prj_ldr__username", lookup_expr="iexact", ) protocol = ValueInFilter( field_name="fish__catch__effort__sample__project__protocol__abbrev" ) protocol__not = ValueInFilter( field_name="fish__catch__effort__sample__project__protocol__abbrev", exclude=True, ) lake = ValueInFilter( field_name="fish__catch__effort__sample__project__lake__abbrev", ) lake__not = ValueInFilter( field_name="fish__catch__effort__sample__project__lake__abbrev", exclude=True ) # FN121 (NET SET) ATTRIBUTES: sam = ValueInFilter(field_name="fish__catch__effort__sample__sam") sam__not = ValueInFilter( field_name="fish__catch__effort__sample__sam", exclude=True ) sidep__gte = django_filters.NumberFilter( field_name="fish__catch__effort__sample__sidep", lookup_expr="gte" ) sidep__lte = django_filters.NumberFilter( field_name="fish__catch__effort__sample__sidep", lookup_expr="lte" ) grtp = ValueInFilter(field_name="fish__catch__effort__sample__grtp") grtp__not = ValueInFilter( field_name="fish__catch__effort__sample__grtp", exclude=True ) gr = ValueInFilter(field_name="fish__catch__effort__sample__gr") gr__not = ValueInFilter(field_name="fish__catch__effort__sample__gr", exclude=True) # grid is a little trick - requires us to filter lake too - user beware! grid = NumberInFilter(field_name="fish__catch__effort__sample__grid__grid") grid__not = NumberInFilter( field_name="fish__catch__effort__sample__grid__grid", exclude=True ) effdur__gte = django_filters.NumberFilter( field_name="fish__catch__effort__sample__effdur", lookup_expr="gte" ) effdur__lte = django_filters.NumberFilter( field_name="fish__catch__effort__sample__effdur", lookup_expr="lte" ) set_date = django_filters.DateFilter( field_name="fish__catch__effort__sample__effdt0", help_text="format: yyyy-mm-dd" ) set_date__gte = django_filters.DateFilter( field_name="fish__catch__effort__sample__effdt0", lookup_expr="gte", help_text="format: yyyy-mm-dd", ) set_date__lte = django_filters.DateFilter( field_name="fish__catch__effort__sample__effdt0", lookup_expr="lte", help_text="format: yyyy-mm-dd", ) lift_date = django_filters.DateFilter( field_name="fish__catch__effort__sample__effdt1", help_text="format: yyyy-mm-dd" ) lift_date__gte = django_filters.DateFilter( field_name="fish__catch__effort__sample__effdt1", lookup_expr="gte", help_text="format: yyyy-mm-dd", ) lift_date__lte = django_filters.DateFilter( field_name="fish__catch__effort__sample__effdt1", lookup_expr="lte", help_text="format: yyyy-mm-dd", ) set_time = django_filters.TimeFilter( field_name="fish__catch__effort__sample__efftm0", help_text="format: HH:MM" ) set_time__gte = django_filters.TimeFilter( field_name="fish__catch__effort__sample__efftm0", lookup_expr="gte", help_text="format: HH:MM", ) set_time__lte = django_filters.TimeFilter( field_name="fish__catch__effort__sample__efftm0", lookup_expr="lte", help_text="format: HH:MM", ) lift_time = django_filters.TimeFilter( field_name="fish__catch__effort__sample__efftm1", help_text="format: HH:MM" ) lift_time__gte = django_filters.TimeFilter( field_name="fish__catch__effort__sample__efftm1", lookup_expr="gte", help_text="format: HH:MM", ) lift_time__lte = django_filters.TimeFilter( field_name="fish__catch__effort__sample__efftm1", lookup_expr="lte", help_text="format: HH:MM", ) # FN122 (EFFORT) ATTRIBUTES eff = ValueInFilter(field_name="fish__catch__effort__eff") eff__not = ValueInFilter(field_name="fish__catch__effort__eff", exclude=True) effdst = django_filters.NumberFilter( field_name="fish__catch__effort__effdst", lookup_expr="exact" ) effdst__gte = django_filters.NumberFilter( field_name="fish__catch__effort__effdst", lookup_expr="gte" ) effdst__lte = django_filters.NumberFilter( field_name="fish__catch__effort__effdst", lookup_expr="lte" ) effdst__gt = django_filters.NumberFilter( field_name="fish__catch__effort__effdst", lookup_expr="gt" ) effdst__lt = django_filters.NumberFilter( field_name="fish__catch__effort__effdst", lookup_expr="lt" ) grdep = django_filters.NumberFilter( field_name="fish__catch__effort__grdep", lookup_expr="exact" ) grdep__gte = django_filters.NumberFilter( field_name="fish__catch__effort__grdep", lookup_expr="gte" ) grdep__lte = django_filters.NumberFilter( field_name="fish__catch__effort__grdep", lookup_expr="lte" ) grdep__gt = django_filters.NumberFilter( field_name="fish__catch__effort__grdep", lookup_expr="gt" ) grdep__lt = django_filters.NumberFilter( field_name="fish__catch__effort__grdep", lookup_expr="lt" ) grtem0 = django_filters.NumberFilter( field_name="fish__catch__effort__grtem0", lookup_expr="exact" ) grtem0__gte = django_filters.NumberFilter( field_name="fish__catch__effort__grtem0", lookup_expr="gte" ) grtem0__lte = django_filters.NumberFilter( field_name="fish__catch__effort__grtem0", lookup_expr="lte" ) grtem0__gt = django_filters.NumberFilter( field_name="fish__catch__effort__grtem0", lookup_expr="gt" ) grtem0__lt = django_filters.NumberFilter( field_name="fish__catch__effort__grtem0", lookup_expr="lt" ) grtem1 = django_filters.NumberFilter( field_name="fish__catch__effort__grtem1", lookup_expr="exact" ) grtem1__gte = django_filters.NumberFilter( field_name="fish__catch__effort__grtem1", lookup_expr="gte" ) grtem1__lte = django_filters.NumberFilter( field_name="fish__catch__effort__grtem1", lookup_expr="lte" ) grtem1__gt = django_filters.NumberFilter( field_name="fish__catch__effort__grtem1", lookup_expr="gt" ) grtem1__lt = django_filters.NumberFilter( field_name="fish__catch__effort__grtem1", lookup_expr="lt" ) # FN123 (CATCH) ATTRIBUTES: grp = ValueInFilter(field_name="fish__catch__grp") grp__not = ValueInFilter(field_name="fish__catch__grp", exclude=True) spc = ValueInFilter(field_name="fish__catch__species__spc") spc__not = ValueInFilter(field_name="fish__catch__species__spc", exclude=True) catcnt = django_filters.NumberFilter( field_name="fish__catch__catcnt", lookup_expr="exact" ) catcnt__gte = django_filters.NumberFilter( field_name="fish__catch__catcnt", lookup_expr="gte" ) catcnt__lte = django_filters.NumberFilter( field_name="fish__catch__catcnt", lookup_expr="lte" ) catcnt__gt = django_filters.NumberFilter( field_name="fish__catch__catcnt", lookup_expr="gt" ) catcnt__lt = django_filters.NumberFilter( field_name="fish__catch__catcnt", lookup_expr="lt" ) biocnt = django_filters.NumberFilter( field_name="fish__catch__biocnt", lookup_expr="exact" ) biocnt__gte = django_filters.NumberFilter( field_name="fish__catch__biocnt", lookup_expr="gte" ) biocnt__lte = django_filters.NumberFilter( field_name="fish__catch__biocnt", lookup_expr="lte" ) biocnt__gt = django_filters.NumberFilter( field_name="fish__catch__biocnt", lookup_expr="gt" ) biocnt__lt = django_filters.NumberFilter( field_name="fish__catch__biocnt", lookup_expr="lt" ) # FN125 (FISH) ATTRIBUTES: tlen = django_filters.NumberFilter(field_name="fish__tlen") tlen__gte = django_filters.NumberFilter(field_name="fish__tlen", lookup_expr="gte") tlen__lte = django_filters.NumberFilter(field_name="fish__tlen", lookup_expr="lte") tlen__gt = django_filters.NumberFilter(field_name="fish__tlen", lookup_expr="gt") tlen__lt = django_filters.NumberFilter(field_name="fish__tlen", lookup_expr="lt") flen = django_filters.NumberFilter(field_name="fish__flen") flen__gte = django_filters.NumberFilter(field_name="fish__flen", lookup_expr="gte") flen__lte = django_filters.NumberFilter(field_name="fish__flen", lookup_expr="lte") flen__gt = django_filters.NumberFilter(field_name="fish__flen", lookup_expr="gt") flen__lt = django_filters.NumberFilter(field_name="fish__flen", lookup_expr="lt") rwt = django_filters.NumberFilter(field_name="fish__rwt") rwt__null = django_filters.BooleanFilter( field_name="fish__rwt", lookup_expr="isnull" ) rwt__gte = django_filters.NumberFilter(field_name="fish__rwt", lookup_expr="gte") rwt__lte = django_filters.NumberFilter(field_name="fish__rwt", lookup_expr="lte") rwt__gt = django_filters.NumberFilter(field_name="fish__rwt", lookup_expr="gt") rwt__lt = django_filters.NumberFilter(field_name="fish__rwt", lookup_expr="lt") mat = ValueInFilter(field_name="fish__mat") mat__not = ValueInFilter(field_name="fish__mat", exclude=True) mat__null = django_filters.BooleanFilter( field_name="fish__mat", lookup_expr="isnull" ) gon = ValueInFilter(field_name="fish__gon") gon__not = ValueInFilter(field_name="fish__gon", exclude=True) gon__null = django_filters.BooleanFilter( field_name="fish__gon", lookup_expr="isnull" ) sex = ValueInFilter(field_name="fish__sex") sex__not = ValueInFilter(field_name="fish__sex", exclude=True) sex__null = django_filters.BooleanFilter( field_name="fish__sex", lookup_expr="isnull" ) clipc = ValueInFilter(field_name="fish__clipc") clipc__not = ValueInFilter(field_name="fish__clipc", exclude=True) clipc__null = django_filters.BooleanFilter( field_name="fish__clipc", lookup_expr="isnull" ) clipc__like = django_filters.CharFilter( field_name="fish__clipc", lookup_expr="icontains" ) clipc__not_like = django_filters.CharFilter( field_name="fish__clipc", lookup_expr="icontains", exclude=True ) clipa = ValueInFilter(field_name="fish__clipa") clipa__not = ValueInFilter(field_name="fish__clipa", exclude=True) clipa__null = django_filters.BooleanFilter( field_name="fish__clipa", lookup_expr="isnull" ) clipa__like = django_filters.CharFilter( field_name="fish__clipa", lookup_expr="icontains" ) clipa__not_like = django_filters.CharFilter( field_name="fish__clipa", lookup_expr="icontains", exclude=True ) nodc = ValueInFilter(field_name="fish__nodc") nodc__not = ValueInFilter(field_name="fish__nodc", exclude=True) nodc__null = django_filters.BooleanFilter( field_name="fish__nodc", lookup_expr="isnull" ) nodc__like = django_filters.CharFilter( field_name="fish__nodc", lookup_expr="icontains" ) nodc__not_like = django_filters.CharFilter( field_name="fish__nodc", lookup_expr="icontains", exclude=True ) noda = ValueInFilter(field_name="fish__noda") noda__not = ValueInFilter(field_name="fish__noda", exclude=True) noda__null = django_filters.BooleanFilter( field_name="fish__noda", lookup_expr="isnull" ) noda__like = django_filters.CharFilter( field_name="fish__noda", lookup_expr="icontains" ) noda__not_like = django_filters.CharFilter( field_name="fish__noda", lookup_expr="icontains", exclude=True )
37.255319
88
0.724475
1,898
15,759
5.301897
0.076396
0.118951
0.171818
0.157408
0.845474
0.797476
0.780284
0.708636
0.655172
0.568021
0
0.006203
0.181547
15,759
422
89
37.343602
0.773996
0.031664
0
0.156863
0
0
0.268925
0.180684
0
0
0
0
0
1
0
false
0
0.005602
0
0.380952
0
0
0
0
null
0
0
0
1
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
0
0
0
0
0
0
0
0
4
2d2277cdda5d2b5e047ce9495c3c9bd5671495c6
136
py
Python
core/handlers/main_db_handler.py
Tampan793/Watermark-Bot
e872f85675e7cdaeeae5efcb1a0af59625d554f5
[ "MIT" ]
null
null
null
core/handlers/main_db_handler.py
Tampan793/Watermark-Bot
e872f85675e7cdaeeae5efcb1a0af59625d554f5
[ "MIT" ]
null
null
null
core/handlers/main_db_handler.py
Tampan793/Watermark-Bot
e872f85675e7cdaeeae5efcb1a0af59625d554f5
[ "MIT" ]
null
null
null
# (c) @M4SK3R1N from configs import Config from core.database import Database db = Database(Config.DATABASE_URL, Config.BOT_USERNAME)
19.428571
55
0.794118
19
136
5.578947
0.631579
0
0
0
0
0
0
0
0
0
0
0.02521
0.125
136
6
56
22.666667
0.865546
0.095588
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
2d281bc3b188a3528fb07c6f83aec0f80d042987
385
py
Python
app/http/pili_service.py
sy264115809/techshow
7d9c8d003b6a652684b140b601061ac59dc44892
[ "MIT" ]
null
null
null
app/http/pili_service.py
sy264115809/techshow
7d9c8d003b6a652684b140b601061ac59dc44892
[ "MIT" ]
null
null
null
app/http/pili_service.py
sy264115809/techshow
7d9c8d003b6a652684b140b601061ac59dc44892
[ "MIT" ]
1
2021-09-14T18:01:39.000Z
2021-09-14T18:01:39.000Z
# coding=utf-8 from pili import * from flask import current_app def _hub(): credentials = Credentials(current_app.config['PILI_ACCESS_KEY'], current_app.config['PILI_SECRET_KEY']) return Hub(credentials, current_app.config['PILI_HUB_NAME']) def get_stream(stream_id): return _hub().get_stream(stream_id) def create_dynamic_stream(): return _hub().create_stream()
22.647059
107
0.755844
55
385
4.927273
0.418182
0.147601
0.177122
0.221402
0.228782
0
0
0
0
0
0
0.002976
0.127273
385
16
108
24.0625
0.803571
0.031169
0
0
0
0
0.115903
0
0
0
0
0
0
1
0.333333
false
0
0.222222
0.222222
0.888889
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
2d458b40385031e7f090e9d9647595375cf582aa
2,684
py
Python
stubs.min/System/Windows/Media/__init___parts/FontFamilyConverter.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
1
2017-07-25T14:30:18.000Z
2017-07-25T14:30:18.000Z
stubs.min/System/Windows/Media/__init___parts/FontFamilyConverter.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
stubs.min/System/Windows/Media/__init___parts/FontFamilyConverter.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
class FontFamilyConverter(TypeConverter): """ Converts instances of the System.String type to and from System.Windows.Media.FontFamily instances. FontFamilyConverter() """ def CanConvertFrom(self,*__args): """ CanConvertFrom(self: FontFamilyConverter,td: ITypeDescriptorContext,t: Type) -> bool Determines whether a class can be converted from a given type to an instance of System.Windows.Media.FontFamily. td: Describes the context information of a type. t: The type of the source that is being evaluated for conversion. Returns: true if the converter can convert from the specified type to an instance of System.Windows.Media.FontFamily; otherwise,false. """ pass def CanConvertTo(self,*__args): """ CanConvertTo(self: FontFamilyConverter,context: ITypeDescriptorContext,destinationType: Type) -> bool Determines whether an instance of System.Windows.Media.FontFamily can be converted to a different type. context: Describes the context information of a type. destinationType: The desired type that this instance of System.Windows.Media.FontFamily is being evaluated for conversion. Returns: true if the converter can convert this instance of System.Windows.Media.FontFamily to the specified type; otherwise,false. """ pass def ConvertFrom(self,*__args): """ ConvertFrom(self: FontFamilyConverter,context: ITypeDescriptorContext,cultureInfo: CultureInfo,o: object) -> object Attempts to convert a specified object to an instance of System.Windows.Media.FontFamily. context: Describes the context information of a type. cultureInfo: Cultural-specific information that should be respected during conversion. o: The object being converted. Returns: The instance of System.Windows.Media.FontFamily that is created from the converted o parameter. """ pass def ConvertTo(self,*__args): """ ConvertTo(self: FontFamilyConverter,context: ITypeDescriptorContext,culture: CultureInfo,value: object,destinationType: Type) -> object Attempts to convert a specified object to an instance of System.Windows.Media.FontFamily. context: Describes the context information of a type. culture: Cultural-specific information that should be respected during conversion. value: The object being converted. destinationType: The type that this instance of System.Windows.Media.FontFamily is converted to. Returns: The object that is created from the converted instance of System.Windows.Media.FontFamily. """ pass
39.470588
139
0.726528
317
2,684
6.126183
0.227129
0.073635
0.101957
0.158599
0.513388
0.513388
0.444387
0.38311
0.360453
0.247168
0
0
0.209389
2,684
67
140
40.059701
0.915174
0.84389
0
0.444444
0
0
0
0
0
0
0
0
0
1
0.444444
false
0.444444
0
0
0.555556
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
4
74211c834b2dd1dade05058e46154bf5ab314dc4
709
py
Python
supabase_client/supebase_exceptions.py
keosariel/supabase-client
0a0e1dfe00ed6171d65f8c022ce23a6e90216616
[ "MIT" ]
6
2021-08-07T20:51:09.000Z
2022-03-03T18:18:42.000Z
supabase_client/supebase_exceptions.py
keosariel/supabase-client
0a0e1dfe00ed6171d65f8c022ce23a6e90216616
[ "MIT" ]
null
null
null
supabase_client/supebase_exceptions.py
keosariel/supabase-client
0a0e1dfe00ed6171d65f8c022ce23a6e90216616
[ "MIT" ]
2
2021-08-11T03:35:35.000Z
2022-03-15T14:53:42.000Z
class SupabaseError(Exception): """Base class for all supabase errors :param message: A human-readable error message string. """ def __init__(self, message): Exception.__init__(self, message) class ClientConnectorError(SupabaseError): def __init__(self, message): SupabaseError.__init__(self, message) class QueryError(SupabaseError): def __init__(self, message): SupabaseError.__init__(self, message) class InvalidRangeError(SupabaseError): def __init__(self, message): SupabaseError.__init__(self, message) class UnexpectedValueTypeError(SupabaseError): def __init__(self, message): SupabaseError.__init__(self, message)
24.448276
62
0.717913
69
709
6.797101
0.318841
0.170576
0.319829
0.191898
0.535181
0.535181
0.535181
0.535181
0.535181
0.409382
0
0
0.190409
709
28
63
25.321429
0.817073
0.126939
0
0.6
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.666667
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
746d2dd92129a5cba7d3203cc33cfadd617835cd
127
py
Python
wandering-warriors/modules/__init__.py
python-discord/code-jam-6
a7eb3b1256ae113c93f0337892c667768e8bc199
[ "MIT" ]
76
2020-01-17T12:09:48.000Z
2022-03-26T19:17:26.000Z
wandering-warriors/modules/__init__.py
1nf1del/code-jam-6
a7eb3b1256ae113c93f0337892c667768e8bc199
[ "MIT" ]
17
2020-01-21T23:13:34.000Z
2020-02-07T00:07:04.000Z
wandering-warriors/modules/__init__.py
1nf1del/code-jam-6
a7eb3b1256ae113c93f0337892c667768e8bc199
[ "MIT" ]
91
2020-01-17T12:01:06.000Z
2022-03-22T20:38:59.000Z
from .abacus import Abacus from .draw_pad import DrawPad from .ledger import Ledger __all__ = ('Abacus', 'DrawPad', 'Ledger')
21.166667
41
0.748031
17
127
5.294118
0.470588
0
0
0
0
0
0
0
0
0
0
0
0.141732
127
5
42
25.4
0.825688
0
0
0
0
0
0.149606
0
0
0
0
0
0
1
0
false
0
0.75
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
778378ad2cae07b1eae7fe45253c50b387c8c03b
256
py
Python
animations/color/list.py
LeLuxNet/GridPy
5f4d02d2b254be1f0682b724a96a99009a415308
[ "MIT" ]
null
null
null
animations/color/list.py
LeLuxNet/GridPy
5f4d02d2b254be1f0682b724a96a99009a415308
[ "MIT" ]
1
2020-05-09T15:48:41.000Z
2020-05-21T20:14:21.000Z
animations/color/list.py
LeLuxNet/GridPy
5f4d02d2b254be1f0682b724a96a99009a415308
[ "MIT" ]
null
null
null
from animations.color import base class ListGenerator(base.IndexColorGeneration): def __init__(self, colors): super().__init__(len(colors)) self.colors = colors def generate_index(self, index): return self.colors[index]
21.333333
47
0.691406
29
256
5.793103
0.586207
0.178571
0
0
0
0
0
0
0
0
0
0
0.210938
256
11
48
23.272727
0.831683
0
0
0
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0.142857
0.142857
0.714286
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
77a564e8a33b0b8bdb5861341a41f636b8f577fb
389
py
Python
test/test_nesting.py
zauberzeug/binding
8b09b15e3675c68850b81d7253f1eb24245ee76b
[ "MIT" ]
1
2022-01-07T03:22:19.000Z
2022-01-07T03:22:19.000Z
test/test_nesting.py
zauberzeug/binding
8b09b15e3675c68850b81d7253f1eb24245ee76b
[ "MIT" ]
null
null
null
test/test_nesting.py
zauberzeug/binding
8b09b15e3675c68850b81d7253f1eb24245ee76b
[ "MIT" ]
null
null
null
from binding import BindableProperty class A: x = BindableProperty() def __init__(self, x): self.x = x def bind_x_to(self, target): self.x.bind_to(target, nesting=1) class B: y = BindableProperty() def __init__(self, y): self.y = y def test_nesting(): a = A(1) b = B(2) a.bind_x_to(b.y) assert a.x == 1 and b.y == 1
12.966667
41
0.562982
62
389
3.306452
0.33871
0.073171
0.22439
0.263415
0
0
0
0
0
0
0
0.018657
0.311054
389
29
42
13.413793
0.746269
0
0
0
0
0
0
0
0
0
0
0
0.0625
1
0.25
false
0
0.0625
0
0.5625
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
77b89c8c2551fa8fcc0927345358401aa9bd99ab
191
py
Python
Merlin_Motion_Control.py
TomQD-94/merlin-motion-control
506ef612812be04074a9c01793c86c951578c67c
[ "MIT" ]
1
2022-02-21T11:12:49.000Z
2022-02-21T11:12:49.000Z
Merlin_Motion_Control.py
TomQD-94/merlin-motion-control
506ef612812be04074a9c01793c86c951578c67c
[ "MIT" ]
null
null
null
Merlin_Motion_Control.py
TomQD-94/merlin-motion-control
506ef612812be04074a9c01793c86c951578c67c
[ "MIT" ]
1
2021-04-27T08:35:41.000Z
2021-04-27T08:35:41.000Z
#!/Users/richard/anaconda3/bin/python3 """Launch app using Anaconda 3.""" from views.interface import MerlinMotionControlApp if __name__ == "__main__": MerlinMotionControlApp().run()
19.1
50
0.748691
20
191
6.75
0.95
0
0
0
0
0
0
0
0
0
0
0.017857
0.120419
191
9
51
21.222222
0.785714
0.34555
0
0
0
0
0.067227
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
77ed35b54ba191d21237cd5df4a01654fd2c195e
14
py
Python
utokenize/testdata/comment_intra.py
MaxTurchin/pycopy-lib
d7a69fc2a28031e2ca475c29239f715c1809d8cc
[ "PSF-2.0" ]
126
2019-07-19T14:42:41.000Z
2022-03-21T22:22:19.000Z
utokenize/testdata/comment_intra.py
MaxTurchin/pycopy-lib
d7a69fc2a28031e2ca475c29239f715c1809d8cc
[ "PSF-2.0" ]
38
2019-08-28T01:46:31.000Z
2022-03-17T05:46:51.000Z
utokenize/testdata/comment_intra.py
MaxTurchin/pycopy-lib
d7a69fc2a28031e2ca475c29239f715c1809d8cc
[ "PSF-2.0" ]
55
2019-08-02T09:32:33.000Z
2021-12-22T11:25:51.000Z
foo # comment
7
13
0.714286
2
14
5
1
0
0
0
0
0
0
0
0
0
0
0
0.214286
14
1
14
14
0.909091
0.5
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
7adab11f81fe9641b079dc6d9cfecadb798ccba4
165
py
Python
ergo/contrib/utils/utils.py
bmillwood/ergo
34be736f1979ad7f1f130bb90728270cb58dbfe8
[ "MIT" ]
93
2020-04-16T03:49:55.000Z
2022-03-26T14:56:29.000Z
ergo/contrib/utils/utils.py
bmillwood/ergo
34be736f1979ad7f1f130bb90728270cb58dbfe8
[ "MIT" ]
326
2020-03-25T17:49:11.000Z
2021-03-25T03:19:51.000Z
ergo/contrib/utils/utils.py
bmillwood/ergo
34be736f1979ad7f1f130bb90728270cb58dbfe8
[ "MIT" ]
26
2020-03-25T03:18:58.000Z
2022-03-18T21:19:11.000Z
from datetime import timedelta def daterange(start_date, end_date): for n in range(int((end_date - start_date).days)): yield start_date + timedelta(n)
23.571429
54
0.715152
25
165
4.52
0.64
0.238938
0
0
0
0
0
0
0
0
0
0
0.187879
165
6
55
27.5
0.843284
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
bb1ea86265c925701352fac69e22fd621159f5e6
42
py
Python
tests/scope.py
ZYAZP/python2
7dc3b62eff51e1decb4a408122e77630fdc1687d
[ "MIT" ]
1,062
2015-11-18T01:04:33.000Z
2022-03-29T07:13:30.000Z
tests/scope.py
ArrowSides/onelinerizer
7dc3b62eff51e1decb4a408122e77630fdc1687d
[ "MIT" ]
26
2015-11-17T06:58:07.000Z
2022-01-15T18:11:16.000Z
tests/scope.py
ArrowSides/onelinerizer
7dc3b62eff51e1decb4a408122e77630fdc1687d
[ "MIT" ]
100
2015-11-17T09:01:22.000Z
2021-09-12T13:58:28.000Z
x = 2 def foo(): x = 1 foo() print x
6
10
0.452381
9
42
2.111111
0.666667
0
0
0
0
0
0
0
0
0
0
0.076923
0.380952
42
6
11
7
0.653846
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0.2
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
bb4daa67b3a7c1bebded6811d734bba3fae430ae
105
py
Python
wcics/mail/errors.py
CS-Center/CS-Center
3cd09f29d214406e6618fc67b9faf59a18f3f11b
[ "MIT" ]
null
null
null
wcics/mail/errors.py
CS-Center/CS-Center
3cd09f29d214406e6618fc67b9faf59a18f3f11b
[ "MIT" ]
6
2019-12-06T18:06:28.000Z
2021-12-01T20:19:05.000Z
wcics/mail/errors.py
CS-Center/CS-Center
3cd09f29d214406e6618fc67b9faf59a18f3f11b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- class MailError(Exception): def __init__(self, addrs): self.failed = addrs
21
28
0.647619
13
105
4.923077
0.846154
0
0
0
0
0
0
0
0
0
0
0.011628
0.180952
105
5
29
21
0.732558
0.2
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
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
246e6304dc03101d69f37d5890c1e8f95b162696
45
py
Python
api/__init__.py
jbrownrs/issue-376-GDS-link
e8cce1b79f46b98a7d24b2da5eca48430fd904a3
[ "MIT" ]
5
2019-01-07T17:22:34.000Z
2020-10-08T15:03:12.000Z
api/__init__.py
jbrownrs/issue-376-GDS-link
e8cce1b79f46b98a7d24b2da5eca48430fd904a3
[ "MIT" ]
203
2017-12-14T09:51:56.000Z
2018-08-28T14:04:08.000Z
api/__init__.py
jbrownrs/issue-376-GDS-link
e8cce1b79f46b98a7d24b2da5eca48430fd904a3
[ "MIT" ]
5
2018-10-22T11:36:01.000Z
2020-07-20T05:47:49.000Z
""" Implement a REST-ful API interface. """
9
35
0.644444
6
45
4.833333
1
0
0
0
0
0
0
0
0
0
0
0
0.177778
45
4
36
11.25
0.783784
0.777778
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
24c3a238ceec7c76992abc6bdae457799345c1bc
974
py
Python
kaznet/apps/main/serializers/__init__.py
onaio/kaznet-web
53da428d5e62e40c5d38d84c3f3ee06071dd779b
[ "Apache-2.0" ]
1
2019-10-03T12:18:15.000Z
2019-10-03T12:18:15.000Z
kaznet/apps/main/serializers/__init__.py
onaio/kaznet-web
53da428d5e62e40c5d38d84c3f3ee06071dd779b
[ "Apache-2.0" ]
63
2018-10-31T12:57:36.000Z
2020-04-27T20:18:22.000Z
kaznet/apps/main/serializers/__init__.py
onaio/kaznet-web
53da428d5e62e40c5d38d84c3f3ee06071dd779b
[ "Apache-2.0" ]
3
2019-08-05T09:10:03.000Z
2020-01-05T21:24:49.000Z
""" Init module for main serializers """ from kaznet.apps.main.serializers.bounty import BountySerializer # noqa from kaznet.apps.main.serializers.client import ClientSerializer # noqa from kaznet.apps.main.serializers.contenttype import KaznetContentTypeSerializer # noqa from kaznet.apps.main.serializers.locations import KaznetLocationSerializer # noqa from kaznet.apps.main.serializers.occurences import KaznetTaskOccurrenceSerializer # noqa from kaznet.apps.main.serializers.submissions import (KaznetSubmissionSerializer, # noqa SubmissionExportSerializer) # noqa from kaznet.apps.main.serializers.task_location import (TaskLocationCreateSerializer, # noqa TaskLocationSerializer) from kaznet.apps.main.serializers.locationttypes import KaznetLocationTypeSerializer # noqa from kaznet.apps.main.serializers.tasks import KaznetTaskSerializer # noqa
64.933333
93
0.750513
90
974
8.111111
0.344444
0.205479
0.172603
0.221918
0.39589
0.316438
0
0
0
0
0
0
0.189938
974
14
94
69.571429
0.925222
0.085216
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.818182
0
0.818182
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
24d907fd34d41b9eae0d2f44c555b225bcd543cc
907
py
Python
p004_test.py
pbgnz/project-euler
8ab4549101f7a3ac2a478eb6193b2b67920c8102
[ "MIT" ]
null
null
null
p004_test.py
pbgnz/project-euler
8ab4549101f7a3ac2a478eb6193b2b67920c8102
[ "MIT" ]
1
2021-04-13T12:47:07.000Z
2021-04-14T20:27:04.000Z
p004_test.py
escobot/project-euler
8ab4549101f7a3ac2a478eb6193b2b67920c8102
[ "MIT" ]
null
null
null
import unittest from p004 import solution, is_palindrome class MyTestCase(unittest.TestCase): def test_is_palindrome_zero(self): self.assertEqual(is_palindrome("o"), True) def test_is_palindrome_positive_even(self): self.assertEqual(is_palindrome("osso"), True) def test_is_palindrome_positive_odd(self): self.assertEqual(is_palindrome("laval"), True) def test_is_palindrome_negative_even(self): self.assertEqual(is_palindrome("oslo"), False) def test_is_palindrome_negative_odd(self): self.assertEqual(is_palindrome("lavas"), False) def test_solution_zero(self): self.assertEqual(solution(0, 0), 0) def test_solution_example(self): self.assertEqual(solution(10, 99), 9009) def test_solution_answer(self): self.assertEqual(solution(100, 999), 906609) if __name__ == '__main__': unittest.main()
25.914286
55
0.713341
114
907
5.333333
0.333333
0.217105
0.25
0.15625
0.475329
0.328947
0
0
0
0
0
0.034899
0.178611
907
34
56
26.676471
0.781208
0
0
0
0
0
0.029801
0
0
0
0
0
0.380952
1
0.380952
false
0
0.095238
0
0.52381
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
24df5f944ef32039cea2fd9aa8fbbb72111acef6
96
py
Python
django/AIST_survey/apps.py
aistairc/voteclustering_aist
f1ee7409698a05a99ce40cdccbe4c2b1f8f81b4c
[ "MIT" ]
null
null
null
django/AIST_survey/apps.py
aistairc/voteclustering_aist
f1ee7409698a05a99ce40cdccbe4c2b1f8f81b4c
[ "MIT" ]
null
null
null
django/AIST_survey/apps.py
aistairc/voteclustering_aist
f1ee7409698a05a99ce40cdccbe4c2b1f8f81b4c
[ "MIT" ]
null
null
null
from django.apps import AppConfig class AistSurveyConfig(AppConfig): name = 'AIST_survey'
16
34
0.770833
11
96
6.636364
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.15625
96
5
35
19.2
0.901235
0
0
0
0
0
0.114583
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
7011b2ae0614609670b4e97d7fc81ec2fb09c3bb
455
py
Python
tests/test_numpy.py
python-pipe/hellp
51fd7c9143ee8ce6392b9b877036ad4347ad29a5
[ "MIT" ]
123
2018-07-31T19:17:27.000Z
2022-03-18T15:29:07.000Z
tests/test_numpy.py
python-pipe/hellp
51fd7c9143ee8ce6392b9b877036ad4347ad29a5
[ "MIT" ]
11
2019-05-01T18:01:59.000Z
2022-01-01T06:43:36.000Z
tests/test_numpy.py
python-pipe/hellp
51fd7c9143ee8ce6392b9b877036ad4347ad29a5
[ "MIT" ]
4
2019-06-07T12:03:53.000Z
2021-05-10T20:29:44.000Z
from sspipe import p, px import numpy as np def test_scalar_rhs(): assert np.int32(1) | p(lambda x: x + 1) | (px == 2) def test_scalar_lhs(): assert 2 | px + np.int32(1) def test_rhs(): assert np.array([1, 2]) | p(lambda x: x.sum()) | (px == 3) def test_rhs_px(): assert np.array([1, 2]) | (px.sum() == 3) def test_lhs(): assert 2 | p(np.log2) | (px == 1) def test_lhs_px(): assert 2 | np.power(px, px + 1) | (px == 8)
16.851852
62
0.558242
84
455
2.904762
0.297619
0.172131
0.106557
0.07377
0.122951
0
0
0
0
0
0
0.061224
0.246154
455
26
63
17.5
0.650146
0
0
0
0
0
0
0
0
0
0
0
0.428571
1
0.428571
true
0
0.142857
0
0.571429
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
1
0
0
0
1
0
0
4
7049b0e74f2f6f27ca826c944b216b0e20f61a74
1,125
py
Python
backend/mysite/student/serializers.py
sun0225SUN/Student-Data-Vision
94b2fbaef425cb2b51b3295059b1b7acca85cfcd
[ "MIT" ]
2
2022-02-16T12:57:45.000Z
2022-02-24T14:09:00.000Z
backend/mysite/student/serializers.py
sun0225SUN/Student-Data-Vision
94b2fbaef425cb2b51b3295059b1b7acca85cfcd
[ "MIT" ]
null
null
null
backend/mysite/student/serializers.py
sun0225SUN/Student-Data-Vision
94b2fbaef425cb2b51b3295059b1b7acca85cfcd
[ "MIT" ]
null
null
null
from rest_framework import serializers from .models import * # Student, StarInfo, SexInfo, GeoInfo, AnhuiGeoInfo, ProvinceInfo class SexInfoSerializer(serializers.ModelSerializer): class Meta: model = SexInfo fields = ['name', 'value'] # 星座信息序列化器 class StarInfoSerializer(serializers.ModelSerializer): class Meta: model = StarInfo fields = ['name', 'value'] # 省外数据的序列化器 class Geo1Serializer(serializers.ModelSerializer): class Meta: model = GeoInfo fields = ['value'] class Geo2Serializer(serializers.ModelSerializer): class Meta: model = GeoInfo fields = ['coords'] # 省内数据的序列化器 class Geo3Serializer(serializers.ModelSerializer): class Meta: model = AnhuiGeoInfo fields = ['value'] class Geo4Serializer(serializers.ModelSerializer): class Meta: model = AnhuiGeoInfo fields = ['coords'] # 省份信息序列化器 class ProvinceInfoSerializer(serializers.ModelSerializer): class Meta: model = ProvinceInfo fields = ['name', 'value']
21.634615
89
0.641778
91
1,125
7.923077
0.340659
0.252427
0.300971
0.339806
0.474341
0.307906
0.307906
0
0
0
0
0.004878
0.271111
1,125
51
90
22.058824
0.87439
0.089778
0
0.6
0
0
0.050672
0
0
0
0
0
0
1
0
false
0
0.066667
0
0.533333
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
709423185bdfdebb688bc7d5a18f61d78ced662c
22
py
Python
bifrost_min_read_check/__init__.py
ssi-dk/bifrost_min_read_check
120951280c4ca7dab07c59d73e677b701e2a5cca
[ "MIT" ]
null
null
null
bifrost_min_read_check/__init__.py
ssi-dk/bifrost_min_read_check
120951280c4ca7dab07c59d73e677b701e2a5cca
[ "MIT" ]
1
2020-08-21T07:14:36.000Z
2020-08-21T07:14:36.000Z
bifrost_min_read_check/__init__.py
ssi-dk/bifrost_min_read_check
120951280c4ca7dab07c59d73e677b701e2a5cca
[ "MIT" ]
null
null
null
__version__ = 'v2_2_8'
22
22
0.772727
4
22
2.75
1
0
0
0
0
0
0
0
0
0
0
0.15
0.090909
22
1
22
22
0.4
0
0
0
0
0
0.26087
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
70974016c8294426ef58c0a0a53fcfaf197aee1a
332
py
Python
HW3/YaRa1312/Pleshyvtseva PythonCore HW 3.3.py
kolyasalubov/Lv-677.PythonCore
c9f9107c734a61e398154a90b8a3e249276c2704
[ "MIT" ]
null
null
null
HW3/YaRa1312/Pleshyvtseva PythonCore HW 3.3.py
kolyasalubov/Lv-677.PythonCore
c9f9107c734a61e398154a90b8a3e249276c2704
[ "MIT" ]
null
null
null
HW3/YaRa1312/Pleshyvtseva PythonCore HW 3.3.py
kolyasalubov/Lv-677.PythonCore
c9f9107c734a61e398154a90b8a3e249276c2704
[ "MIT" ]
6
2022-02-22T22:30:49.000Z
2022-03-28T12:51:19.000Z
#3.3 user_ineteger_1 = int(input("Enter an integer: ")) user_integer_2 = int(input("Enter an other integer or the same as the first one: ")) def sameOrNot(user_ineteger_1, user_integer_2): if (user_ineteger_1 ^ user_integer_2): print("Not Same") else: print("Same") sameOrNot(user_ineteger_1, user_integer_2)
36.888889
84
0.713855
54
332
4.092593
0.425926
0.217195
0.235294
0.230769
0.420814
0.420814
0.307692
0
0
0
0
0.036364
0.171687
332
9
85
36.888889
0.767273
0.009036
0
0
0
0
0.25228
0
0
0
0
0
0
1
0.125
false
0
0
0
0.125
0.25
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
56149181b9ac3f4c3f13a262ec51ccae2f8c900c
193
py
Python
django_amenities/apps.py
okfde/django-amenities
a5522e33e27deb93a2ed49f89a6d9222fc146523
[ "MIT" ]
1
2020-09-17T12:27:04.000Z
2020-09-17T12:27:04.000Z
django_amenities/apps.py
okfde/django-amenities
a5522e33e27deb93a2ed49f89a6d9222fc146523
[ "MIT" ]
null
null
null
django_amenities/apps.py
okfde/django-amenities
a5522e33e27deb93a2ed49f89a6d9222fc146523
[ "MIT" ]
null
null
null
from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ class AmenitiesConfig(AppConfig): name = 'django_amenities' verbose_name = _("Amenities App")
24.125
54
0.777202
23
193
6.304348
0.695652
0.137931
0
0
0
0
0
0
0
0
0
0
0.150259
193
7
55
27.571429
0.884146
0
0
0
0
0
0.150259
0
0
0
0
0
0
1
0
false
0
0.4
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
56415df55959a03e911d73640e65d94b304b6856
161
py
Python
pybamm/models/submodels/thermal/__init__.py
manjunathnilugal/PyBaMM
65d5cba534b4f163670e753714964aaa75d6a2d2
[ "BSD-3-Clause" ]
330
2019-04-17T11:36:57.000Z
2022-03-28T16:49:55.000Z
pybamm/models/submodels/thermal/__init__.py
masoodtamaddon/PyBaMM
a31e2095600bb92e913598ac4d02b2b6b77b31c1
[ "BSD-3-Clause" ]
1,530
2019-03-26T18:13:03.000Z
2022-03-31T16:12:53.000Z
pybamm/models/submodels/thermal/__init__.py
masoodtamaddon/PyBaMM
a31e2095600bb92e913598ac4d02b2b6b77b31c1
[ "BSD-3-Clause" ]
178
2019-03-27T13:48:04.000Z
2022-03-31T09:30:11.000Z
from .base_thermal import BaseThermal from .isothermal import Isothermal from .lumped import Lumped from .x_full import OneDimensionalX from . import pouch_cell
26.833333
37
0.84472
22
161
6.045455
0.545455
0
0
0
0
0
0
0
0
0
0
0
0.124224
161
5
38
32.2
0.943262
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
566e601ac7f314a0c7263784d0d159ced84a93ad
201
py
Python
src/expression_evaluator/operators/basic/in_operator.py
Xett/expression_evaluator
eca895d79f015843a262e9636b86c6dd3d06a69d
[ "MIT" ]
null
null
null
src/expression_evaluator/operators/basic/in_operator.py
Xett/expression_evaluator
eca895d79f015843a262e9636b86c6dd3d06a69d
[ "MIT" ]
null
null
null
src/expression_evaluator/operators/basic/in_operator.py
Xett/expression_evaluator
eca895d79f015843a262e9636b86c6dd3d06a69d
[ "MIT" ]
null
null
null
from expression_evaluator.token import * class InOperator(BasicOperator): symbols = ['in'] priority = PriorityLevel.String @classmethod def _function(cls, a, b): return a in b
22.333333
40
0.681592
23
201
5.869565
0.869565
0
0
0
0
0
0
0
0
0
0
0
0.228856
201
9
41
22.333333
0.870968
0
0
0
0
0
0.009901
0
0
0
0
0
0
1
0.142857
false
0
0.142857
0.142857
0.857143
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
4
5677a8de826460d6b3962eb6561558b2f7259736
244
py
Python
cachex/decorator/CacheParameters.py
malversoft/cachex
8b4d5086c9553c50e91470a2e9a635bf22cde68d
[ "MIT" ]
null
null
null
cachex/decorator/CacheParameters.py
malversoft/cachex
8b4d5086c9553c50e91470a2e9a635bf22cde68d
[ "MIT" ]
null
null
null
cachex/decorator/CacheParameters.py
malversoft/cachex
8b4d5086c9553c50e91470a2e9a635bf22cde68d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from .CacheDefaults import CacheDefaults from ..caches.AbstractCacheParameters import AbstractCacheParameters class CacheParameters(AbstractCacheParameters): """Decorator parameters.""" _defaults = CacheDefaults()
22.181818
68
0.786885
19
244
10.052632
0.684211
0
0
0
0
0
0
0
0
0
0
0.004587
0.106557
244
10
69
24.4
0.87156
0.180328
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
1
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
56835f197330807710a910c73580f2e27a16947f
8,934
py
Python
examples/temp_bubbles/plot_sweep_results.py
SamuelBrand1/covid-19-in-households-public
a0740d85f8f9fb1ae67dbd9c5a92f1085e4d9ea1
[ "Apache-2.0" ]
null
null
null
examples/temp_bubbles/plot_sweep_results.py
SamuelBrand1/covid-19-in-households-public
a0740d85f8f9fb1ae67dbd9c5a92f1085e4d9ea1
[ "Apache-2.0" ]
null
null
null
examples/temp_bubbles/plot_sweep_results.py
SamuelBrand1/covid-19-in-households-public
a0740d85f8f9fb1ae67dbd9c5a92f1085e4d9ea1
[ "Apache-2.0" ]
null
null
null
'''This plots the bubble results ''' from pickle import load from numpy import array, atleast_2d, hstack, where, zeros from matplotlib.pyplot import close, subplots from examples.temp_bubbles.common import DataObject from seaborn import heatmap no_i_vals = 3 no_j_vals = 3 peaks_1 = zeros((no_i_vals,no_j_vals)) peaks_2 = zeros((no_i_vals,no_j_vals)) peaks_3 = zeros((no_i_vals,no_j_vals)) peaks_4 = zeros((no_i_vals,no_j_vals)) jan_antiprev_1 = zeros((no_i_vals,no_j_vals)) jan_antiprev_2 = zeros((no_i_vals,no_j_vals)) jan_antiprev_3 = zeros((no_i_vals,no_j_vals)) jan_antiprev_4 = zeros((no_i_vals,no_j_vals)) for i in range(no_i_vals): filename_stem = 'outputs/temp_bubbles/sweep_results_' + str(i) with open(filename_stem + '.pkl', 'rb') as f: unmerged_population,baseline_H, baseline_time, baseline_S, baseline_E, baseline_I, baseline_R = load(f) ave_hh_size = unmerged_population.ave_hh_size fig, ax = subplots(1, 1, sharex=True) print(baseline_time.shape) print(baseline_E.shape) ax.plot(baseline_time, baseline_E, label='E') ax.plot(baseline_time, baseline_I, label='I') ax.plot(baseline_time, baseline_R, label='R') ax.legend(ncol=1, bbox_to_anchor=(1,0.50)) fig.savefig('sweep_baseline_epidemic' + str(i) +'.png', bbox_inches='tight', dpi=300) close() for j in range(no_j_vals): filename = filename_stem + str(j) with open(filename + '.pkl', 'rb') as f: merged_population2, merged_population3, merged_output = load(f) fig, ax = subplots(1, 1, sharex=True) lgd=['No bubbling','Policy 1', 'Policy 2', 'Policy 3', 'Policy 4',] merge_I_1 = (1/3) * merged_output.H_merge_1.T.dot( merged_population3.states[:, 2] + merged_population3.states[:, 6] + merged_population3.states[:, 10])/ave_hh_size postmerge_I_1 = merged_output.H_postmerge_1.T.dot(unmerged_population.states[:, 2])/ave_hh_size peaks_1[i,j] = max(hstack((merge_I_1, postmerge_I_1))) merge_R_1 = (1/3) * merged_output.H_merge_1.T.dot( merged_population3.states[:, 3] + merged_population3.states[:, 7] + merged_population3.states[:,11])/ave_hh_size postmerge_R_1 = merged_output.H_postmerge_1.T.dot(unmerged_population.states[:, 3])/ave_hh_size jan_antiprev_1[i,j] = postmerge_R_1[-1] merge_I_2 = (1/2) * merged_output.H_merge_2.T.dot( merged_population2.states[:, 2] + merged_population2.states[:, 6])/ave_hh_size postmerge_I_2 = merged_output.H_postmerge_2.T.dot(unmerged_population.states[:, 2])/ave_hh_size peaks_2[i,j] = max(hstack((merge_I_2, postmerge_I_2))) merge_R_2 = (1/2) * merged_output.H_merge_2.T.dot( merged_population2.states[:, 3] + merged_population2.states[:, 7])/ave_hh_size postmerge_R_2 = merged_output.H_postmerge_2.T.dot(unmerged_population.states[:, 3])/ave_hh_size jan_antiprev_2[i,j] = postmerge_R_2[-1] merge_I_3 = (1/2) * merged_output.H_merge_3.T.dot( merged_population2.states[:, 2] + merged_population2.states[:, 6])/ave_hh_size postmerge_I_3 = merged_output.H_postmerge_3.T.dot(unmerged_population.states[:, 2])/ave_hh_size peaks_3[i,j] = max(hstack((merge_I_3, postmerge_I_3))) merge_R_3 = (1/2) * merged_output.H_merge_3.T.dot( merged_population2.states[:, 3] + merged_population2.states[:, 7])/ave_hh_size postmerge_R_3 = merged_output.H_postmerge_3.T.dot(unmerged_population.states[:, 3])/ave_hh_size jan_antiprev_3[i,j] = postmerge_R_3[-1] merge_I_4 = (1/2) * merged_output.H_merge_4.T.dot( merged_population2.states[:, 2] + merged_population2.states[:, 6])/ave_hh_size postmerge_I_4 = merged_output.H_postmerge_4.T.dot(unmerged_population.states[:, 2])/ave_hh_size peaks_4[i,j] = max(hstack((merge_I_4, postmerge_I_4))) merge_R_4 = (1/2) * merged_output.H_merge_4.T.dot( merged_population2.states[:, 3] + merged_population2.states[:, 7])/ave_hh_size postmerge_R_4 = merged_output.H_postmerge_4.T.dot(unmerged_population.states[:, 3])/ave_hh_size jan_antiprev_4[i,j] = postmerge_R_4[-1] ax.plot(baseline_time, 100*baseline_R, label=lgd[0]) ax.plot(hstack((merged_output.t_merge_1,merged_output.t_postmerge_1)),100*hstack((merge_R_1,postmerge_R_1)), label=lgd[1]) ax.plot(hstack((merged_output.t_merge_2,merged_output.t_postmerge_2)),100*hstack((merge_R_2,postmerge_R_2)), label=lgd[2]) ax.plot(hstack((merged_output.t_merge_3,merged_output.t_postmerge_3)),100*hstack((merge_R_3,postmerge_R_3)), label=lgd[3]) ax.plot(hstack((merged_output.t_merge_4,merged_output.t_postmerge_4)),100*hstack((merge_R_4,postmerge_R_4)), label=lgd[4]) ax.set_xlabel('Time in days') ax.set_ylabel('Percentage recovered') ax.set_xlim([340,395]) # ax.set_ylim([5.5,9.0]) ax.legend(ncol=1, bbox_to_anchor=(1,0.50)) fig.savefig('R_by_strategy_sweep' + str(i) + str(j) + '.png', bbox_inches='tight', dpi=300) close() fig, ax = subplots(1, 1, sharex=True) ax.plot(baseline_time, 100*baseline_I, label=lgd[0]) ax.plot(hstack((merged_output.t_merge_1,merged_output.t_postmerge_1)),100*hstack((merge_I_1,postmerge_I_1)), label=lgd[1]) ax.plot(hstack((merged_output.t_merge_2,merged_output.t_postmerge_2)),100*hstack((merge_I_2,postmerge_I_2)), label=lgd[2]) ax.plot(hstack((merged_output.t_merge_3,merged_output.t_postmerge_3)),100*hstack((merge_I_3,postmerge_I_3)), label=lgd[3]) ax.plot(hstack((merged_output.t_merge_4,merged_output.t_postmerge_4)),100*hstack((merge_I_4,postmerge_I_4)), label=lgd[4]) ax.set_xlabel('Time in days') ax.set_ylabel('Percentage infectious') ax.set_xlim([340,395]) # ax.set_ylim([0,1]) ax.legend(ncol=1, bbox_to_anchor=(1,0.50)) fig.savefig('I_by_strategy_sweep' + str(i) + str(j) + '.png', bbox_inches='tight', dpi=300) close() pol_label = [] for pol in range(4): pol_label.append('Policy'+str(pol+1)) peaks_min = array([peaks_1.min(),peaks_2.min(),peaks_3.min(),peaks_4.min()]).min() peaks_max = array([peaks_1.max(),peaks_2.max(),peaks_3.max(),peaks_4.max()]).max() fig, ax = subplots(1,1,sharex=True) heatmap(peaks_1,square=True, vmin=peaks_min, vmax=peaks_max) ax.set_title(pol_label[0]) ax.set_ylabel('Single household density exponent') ax.set_xlabel('Bubbled density exponent') fig.savefig('peaks_1.png',bbox_inches='tight', dpi=300) close() fig, ax = subplots(1,1,sharex=True) heatmap(peaks_2,square=True, vmin=peaks_min, vmax=peaks_max) ax.set_title(pol_label[1]) ax.set_ylabel('Single household density exponent') ax.set_xlabel('Bubbled density exponent') fig.savefig('peaks_2.png',bbox_inches='tight', dpi=300) close() fig, ax = subplots(1,1,sharex=True) heatmap(peaks_3,square=True, vmin=peaks_min, vmax=peaks_max) ax.set_title(pol_label[2]) ax.set_ylabel('Single household density exponent') ax.set_xlabel('Bubbled density exponent') fig.savefig('peaks_3.png',bbox_inches='tight', dpi=300) close() fig, ax = subplots(1,1,sharex=True) heatmap(peaks_4,square=True, vmin=peaks_min, vmax=peaks_max) ax.set_title(pol_label[3]) ax.set_ylabel('Single household density exponent') ax.set_xlabel('Bubbled density exponent') fig.savefig('peaks_4.png',bbox_inches='tight', dpi=300) close() antiprev_min = array([jan_antiprev_1.min(),jan_antiprev_2.min(),jan_antiprev_3.min(),jan_antiprev_4.min()]).min() antiprev_max = array([jan_antiprev_1.max(),jan_antiprev_2.max(),jan_antiprev_3.max(),jan_antiprev_4.max()]).max() fig, ax = subplots(1,1,sharex=True) heatmap(jan_antiprev_1,square=True, vmin=antiprev_min, vmax=antiprev_max) ax.set_title(pol_label[0]) ax.set_ylabel('Single household density exponent') ax.set_xlabel('Bubbled density exponent') fig.savefig('jan_antiprev_1.png',bbox_inches='tight', dpi=300) close() fig, ax = subplots(1,1,sharex=True) heatmap(jan_antiprev_2,square=True, vmin=antiprev_min, vmax=antiprev_max) ax.set_title(pol_label[1]) ax.set_ylabel('Single household density exponent') ax.set_xlabel('Bubbled density exponent') fig.savefig('jan_antiprev_2.png',bbox_inches='tight', dpi=300) close() fig, ax = subplots(1,1,sharex=True) heatmap(jan_antiprev_3,square=True, vmin=antiprev_min, vmax=antiprev_max) ax.set_title(pol_label[2]) ax.set_ylabel('Single household density exponent') ax.set_xlabel('Bubbled density exponent') fig.savefig('jan_antiprev_3.png',bbox_inches='tight', dpi=300) close() fig, ax = subplots(1,1,sharex=True) heatmap(jan_antiprev_4,square=True, vmin=antiprev_min, vmax=antiprev_max) ax.set_title(pol_label[3]) ax.set_ylabel('Single household density exponent') ax.set_xlabel('Bubbled density exponent') fig.savefig('jan_antiprev_4.png',bbox_inches='tight', dpi=300) close()
42.542857
130
0.71323
1,482
8,934
3.978408
0.087719
0.067164
0.027476
0.026119
0.785278
0.765604
0.752374
0.714552
0.679444
0.658243
0
0.043744
0.137676
8,934
209
131
42.746411
0.721573
0.008059
0
0.373418
0
0
0.097583
0.006551
0
0
0
0
0
1
0
false
0
0.031646
0
0.031646
0.012658
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
56868508641f95c8037312c6e71d709a9b56a1e6
229
py
Python
mmdet/models/utils/builder.py
SuhyunL/Fashion-Object-Detection
5870189a65f7c5d009beb763c34fefd029b9cce5
[ "Apache-2.0" ]
326
2021-05-06T01:15:09.000Z
2022-03-30T14:52:13.000Z
mmdet/models/utils/builder.py
MCG-NJU/AdaMixer
7cd998826da5f38e698cebb9a619bc322462a5db
[ "MIT" ]
39
2021-05-20T02:54:40.000Z
2022-03-31T09:16:46.000Z
mmdet/models/utils/builder.py
MCG-NJU/AdaMixer
7cd998826da5f38e698cebb9a619bc322462a5db
[ "MIT" ]
46
2021-05-08T22:25:27.000Z
2022-03-28T08:11:51.000Z
from mmcv.utils import Registry, build_from_cfg TRANSFORMER = Registry('Transformer') def build_transformer(cfg, default_args=None): """Builder for Transformer.""" return build_from_cfg(cfg, TRANSFORMER, default_args)
25.444444
57
0.772926
29
229
5.862069
0.517241
0.105882
0.141176
0
0
0
0
0
0
0
0
0
0.126638
229
8
58
28.625
0.85
0.104803
0
0
0
0
0.055276
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
568b420e2b194c6e850383a0e1263c01a6a582cb
299
py
Python
nilearn/decoding/__init__.py
sahahn/nilearn
642399137b923e273b396a1c33aa06b8081089b7
[ "BSD-2-Clause" ]
null
null
null
nilearn/decoding/__init__.py
sahahn/nilearn
642399137b923e273b396a1c33aa06b8081089b7
[ "BSD-2-Clause" ]
null
null
null
nilearn/decoding/__init__.py
sahahn/nilearn
642399137b923e273b396a1c33aa06b8081089b7
[ "BSD-2-Clause" ]
null
null
null
""" Decoding tools and algorithms. """ from .searchlight import SearchLight from .space_net import SpaceNetClassifier, SpaceNetRegressor from .decoder import Decoder, DecoderRegressor __all__ = ['SearchLight', 'SpaceNetClassifier', 'SpaceNetRegressor', 'Decoder', 'DecoderRegressor']
23
79
0.762542
25
299
8.92
0.56
0.313901
0
0
0
0
0
0
0
0
0
0
0.140468
299
12
80
24.916667
0.867704
0.100334
0
0
0
0
0.264368
0
0
0
0
0
0
1
0
false
0
0.6
0
0.6
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
568b4f13f51fbd3e746104f8badc5ad0334c142c
379
py
Python
acq4/devices/MockPressureControl.py
campagnola/acq4
09699c07d8949950f6df149cf17892aaa3a37402
[ "MIT" ]
47
2015-01-05T16:18:10.000Z
2022-03-16T13:09:30.000Z
acq4/devices/MockPressureControl.py
acq4/acq4
c77636a76d68ffa1bc7dbd41edc522e523b909b8
[ "MIT" ]
48
2015-04-19T16:51:41.000Z
2022-03-31T14:48:16.000Z
acq4/devices/MockPressureControl.py
acq4/acq4
c77636a76d68ffa1bc7dbd41edc522e523b909b8
[ "MIT" ]
32
2015-01-15T14:11:49.000Z
2021-07-15T13:44:52.000Z
from acq4.devices.PressureControl import PressureControl class MockPressureControl(PressureControl): def _setPressure(self, p): self.pressure = p def getPressure(self): return getattr(self, "pressure", 10) def _setSource(self, source): self.source = source def getSource(self): return getattr(self, "source", self.sources[0])
23.6875
56
0.680739
41
379
6.243902
0.512195
0.117188
0.132813
0.164063
0
0
0
0
0
0
0
0.013514
0.218997
379
15
57
25.266667
0.851351
0
0
0
0
0
0.036939
0
0
0
0
0
0
1
0.4
false
0
0.1
0.2
0.8
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
3b17829d2a52135864702c72229a5562364d0705
130
py
Python
src/cascade/input_data/configuration/sex.py
adolgert/cascade
2084e07c9ee5e901dd407b817220de882c7246a3
[ "MIT" ]
null
null
null
src/cascade/input_data/configuration/sex.py
adolgert/cascade
2084e07c9ee5e901dd407b817220de882c7246a3
[ "MIT" ]
null
null
null
src/cascade/input_data/configuration/sex.py
adolgert/cascade
2084e07c9ee5e901dd407b817220de882c7246a3
[ "MIT" ]
null
null
null
SEX_ID_TO_NAME = { 1: "male", 2: "female", 3: "both", } SEX_NAME_TO_ID = {v: k for (k, v) in SEX_ID_TO_NAME.items()}
16.25
60
0.561538
25
130
2.56
0.6
0.15625
0.21875
0.34375
0
0
0
0
0
0
0
0.030612
0.246154
130
7
61
18.571429
0.622449
0
0
0
0
0
0.107692
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
3b1a2bad79b0569b3ffa94c11cc30ebadfab7c45
139
py
Python
python/dragonradio/dragonradio/net/__init__.py
drexelwireless/dragonradio
885abd68d56af709e7a53737352641908005c45b
[ "MIT" ]
8
2020-12-05T20:30:54.000Z
2022-01-22T13:32:14.000Z
python/dragonradio/dragonradio/net/__init__.py
drexelwireless/dragonradio
885abd68d56af709e7a53737352641908005c45b
[ "MIT" ]
3
2020-10-28T22:15:27.000Z
2021-01-27T14:43:41.000Z
python/dragonradio/dragonradio/net/__init__.py
drexelwireless/dragonradio
885abd68d56af709e7a53737352641908005c45b
[ "MIT" ]
null
null
null
# Copyright 2021 Drexel University # Author: Geoffrey Mainland <mainland@drexel.edu> try: from _dragonradio.net import * except: pass
17.375
49
0.76259
17
139
6.176471
0.882353
0
0
0
0
0
0
0
0
0
0
0.034188
0.158273
139
7
50
19.857143
0.863248
0.57554
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.25
0.25
0
0.25
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
4
3b2dfadc0723866c776dd2e832a0bd0837f7b239
246
py
Python
run/depla/experiment/__init__.py
KinakomochiBotan/depla
e2c530f7fe5fc8fe185f0f789738fa7fc52bdeca
[ "MIT" ]
null
null
null
run/depla/experiment/__init__.py
KinakomochiBotan/depla
e2c530f7fe5fc8fe185f0f789738fa7fc52bdeca
[ "MIT" ]
null
null
null
run/depla/experiment/__init__.py
KinakomochiBotan/depla
e2c530f7fe5fc8fe185f0f789738fa7fc52bdeca
[ "MIT" ]
null
null
null
from .experiment import Experiment from .experiment1 import Experiment1 from .experiment2 import Experiment21, Experiment22, Experiment23 from .experiment3 import Experiment31, Experiment32, Experiment33, Experiment34, Experiment35, Experiment36
49.2
107
0.861789
23
246
9.217391
0.652174
0
0
0
0
0
0
0
0
0
0
0.098655
0.093496
246
4
108
61.5
0.852018
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
3b70e4c1e7bc801d960c67b7f02acbf422800456
11,178
py
Python
consensus_and_profile.py
ivanmilevtues/BioInformatic
5cb8f3a51f08d6a39732ec2feecc531e11f97797
[ "MIT" ]
null
null
null
consensus_and_profile.py
ivanmilevtues/BioInformatic
5cb8f3a51f08d6a39732ec2feecc531e11f97797
[ "MIT" ]
null
null
null
consensus_and_profile.py
ivanmilevtues/BioInformatic
5cb8f3a51f08d6a39732ec2feecc531e11f97797
[ "MIT" ]
null
null
null
import pprint def parse_input(data): result = {} for el in data.split('>'): if el =='\n': continue result[el[:14]] = el[14:].strip().replace('\n', '') pprint.pprint(result) return result def make_profile(data): dna_strings = [] for _, v in data.items(): if len(v): dna_strings.append([ch for ch in v]) dna_len = len(dna_strings[0]) # initialize profile with 0s profile = {} profile['A'] = [0 for i in range(dna_len)] profile['C'] = [0 for i in range(dna_len)] profile['G'] = [0 for i in range(dna_len)] profile['T'] = [0 for i in range(dna_len)] for col in range(dna_len): for row in range(len(dna_strings)): profile[dna_strings[row][col]][col] += 1 output(profile, dna_len) def output(data, dna_len): output_string = '' for i in range(dna_len): max_k = '' max_v = 0 for k, v in data.items(): if v[i] > max_v: max_v, max_k = v[i], k output_string += max_k print(output_string) for k, v in data.items(): print(k, end=': ') for ch in v: print(ch, end=' ') print() def main(): data = """ >Rosalind_7877 TACGATTCGGGTACATTAGTCCGCTTGTGGACTTAGCTTAGATTAGTAAACATTTTTCGA GGACTGATCGACCTCTCTAGAACTGAATAGCCGGGAACTAGCTTCGCGACAACTTGTACT GGGGCACCTTATTGACGTTAGGGTACGAACCCTATTACCGGTGTTCACCGATTAGACCGC CCTAATCGAGCACGAAGCGGCATACGAACTAAAAGAACATTAAAGGATGAAGTTCTGGCA TTAGATGTGTGTAACGTCTCGGTCGCTCAGTGGGCCAAGTAGGGTCACGGAGAGGCCTCT TAAGCGACGTTTTATAGCATTTTTGGTCTCCATGAGTACGCGTAACGTATAGCGTCCCAC TCACAGCCATCGTCACGATTAGCAATTTAACACTCGCTCCATAGGGTCTCGCGTGTCTGA GCGCTGCGTGTTTCCCCCCTGTTCACTTGAACTAGTAGATCGTGTAGGGGACACTTCTGG AGAGACTTGATATAGGTCAAAAGGAAAACCTCGTCATGACGGACCAAACCCGGATAACTT GGACTAGGCCCAACAAATAGGGCTTTACTTAGACCTTAAGAGTATAACGGTATCTACGTC AATATGTGGACATCTATGCTATAAACGTCTACAAAGGCTCGAAGCGTGGTTTGCCCATTT CATCCGAGAATCCTCATGTCGGTGTGGCCTAAACTTGCGGTATTGGGAGGGGGCTGATCT GTCCCAGACGTCCAAAACGATTGTGCAGGTCGCAGGCACGAGGTTAGATTTAACACGCCT TTCCCCTTCAGCTCTTGCGTGTCATTCGAGTCTAATGCTGATGCGGTAGACGGCCATATA AGGCGGAACCCGTGACCTTCGAGACAGCCGAGAATCGTTACTAGGACTATCTAAATAACC AAAACCTGGTGGTCGCCAAACGCATTGCAAACCATACGAGGGTTTATCCA >Rosalind_9115 CAAAAGCGCTCCAGCTACGCACAGATCGCTTGATACGCACCCCACTGATTAATATTCTCA GACCGTTACGTTAAACCTTGCAGGGTAAGATTATTCAGCGTAGCACTGCGCCTGGCGCAA CCCAGGCCAGTTGAAATCTCCTATGTTGTACGCACGCACTCCATGGTAGTCGTCCCTAAG TATCCACTGGGAAAGGTGCTCTAACCAAGGCCCCAAGGAAGCGGTGCTCGTTGGTAGTAG TAGAGCGGCGACATTCATCTAGCAGCGTCAAAGATCCTTGTTTAGGACTCTTTGGTCAGG CATCAACAGCCACCCTGGTGCCTGGCGATAATAAATCGCGGGCCCGCTAAAGTTGTTCAA GGTTACAATTGCGAGTTCCCAGTGGTATGTCACCTCAAACGCCCACTGTGACGAAAATAG GCAGGGCGTTTTCGCGATACCCTCTTGCCGTTGTGTGCGAACCATCTCACGTAGACGCGA CACGGAAATGACACATATTATAACCGTCACTTTCGCGATATTGTAGCAGCCTCTTACGCA CTTACACGTAATCCATCACCCGTATTGCCTGTCATTACGCTGCGCCATGAGTCACGTAAT AAACTGGAATCCTTCCCGATGGGATCCGCTCAAGGAACAAAACACCGCTTTACAGTTTTG GCAAAGCCAGAAACTAGAACAGTCAATACTGCCATTCACGGGGCAAAACGCCGACGACGA GCATATGCATCTGGACTTAGAATATGGCGACTCCCAATCTCCATCGCGAGCCGAACCTAA GCAGCGGCGCTTGACCTTCCGAGTCAGGACACAATTGTGGAAAGACATAAGAGGAGGTTC CTTCCGATGCTATCCCGAGATGGCACACCTCCCAGAATATTTCCTAAACCCCTGACGTTA GGCGCGGCGTAGGATGGTGAGGTCACCTGCCCATGACCGCATAGATTGCG >Rosalind_0640 CGAATGATACTCGTACTCTCCAACATTTCATAAGCAAATAGATACTCCCACATTTGCGAA TTCACGAGTAGCGAGCAGGCCTATAACGCTGCTTGGTTAGTTGCTTCGGTAACGTACCGG ATCTGGCGTAACTCAATAATTGTGCTACCTATGCTCAAATGCTATTCACAGACTCTCCAT CACGTCGGGACCCCGAATATGTTTTTATACAGCTAAGTACGCCAGCAAAACGACGTAACG AGTTTCGGTTATTCAATGAGCAGACCCTGATACGGATCGACTACCGTAACTGTCAACGTG AGGGTGAAAGAGAAGGTAATTGTCGTATGCTAAGGCGGGTATGCGACGGGGTTGCGAACT CCGGAGGAGTTAGACTGTCGCGATATCTTCACGTACTGCACAAAGCCTACCAGTTATAAG GTAAAGGTCCCCCGTTGTCAAATCTGAGAGGCGCTCCCAAAGATGGCTAGACACCACCTT AGCGCACGGCTCGGATTATATACTTAAGAGACTAAACCCTCCCCGTAGAGACGCAGGCGG TTAAAACTAGAACAGGCACTTGAAGTTACCCGGAACGCTACCTGCTAATTTCAGCTGTTC TTGGTACCACTTCAGGCAGCTCCGGCAACAAGGCCTCTCCGTTAGTCAATATGGACACTG CATTAGGCGTAGGGATGTCAGGGAGCACTTGTGCAGACGGATAGCTCGAAGCCGCTGGCG TCCGAGAATCTCCTAGAGGATACGATCGTTAATGCAGTAAGCACACCCTCCTAGACCTCT CTTGCGGTCGCTGGCCCTTGGGCAGTGCAACCAACACCATCCGATCTTATAGCCCGCGCA TACACAATGCTCGCCAGTGAATACCGGAGGCTAGGCCTGCAAAACTCTGGCGATGGTGGA GACAATTGTTCTCCCGGGAGGGGCTGGGTTAAGCGCTAATCTGACCCTAC >Rosalind_9012 TTCCTACCTTGATCGTGGTTATCAGCGGTCGTGGGTAGGGAACTGGAGAGTTACAATCAT ACACAACCGCTACTAATCACAACTCTCGTTTTGAACCGCTGTCCAGCCGGCGGATGACCA CGTAAGTGAACTTCGGAATCACCTGCGGTGCATTGTAAAAGAGCAGCTCAGCAAACACAG CCTGCAAGGGTCCATAATAAGGCCAAGGCCACCAACCACCCAGACTAAGATCACATCCGG AACGGGCCTTAAACGTTTTGTGCCTGTCCAGGTCGCGCTCTTTTTAGGAAATACGAAATT CCTGGGTAGAATTTCGCCAGATCGTTCGGTAAAGTAAAGAGGTACCTTGGATCGAATCAA GAATAGCGCTTTGTTTTGCGACTCAGAACGGGTAATTTTTTTTTGCACGCAATTGCCACA GAAAGACAGGTGGTGCGGTGGGCATTACTTTAGTGTACTGGGACGGACTCGCTTCCTCCA AGAAGCCTTCAATATCATTGGCTGCGTGGTTTGTTCAGGCTCGCGGACCCGACTGCTCGG AGTAACGCACGGCTGTTGTCATCGACACGGGAGAACGATTGTCTCTAGCTTGTTATCCGG ATCTGGAGGCCCGATAGTGTATCATCCCTTACCCCCCCGACGTGAATCAACCAGTGTATA GTTGAAGAACAAGGGACCACATGGTAAGATCCGAAGAACTTGCCCCCGAACTACAGAGAA GACGACCGTCTTCGGCTCGTATGAAAAGTCTGTAGCAAGCGATGTATGGCTGTGCAGTAG TAGGTTTGCTATCCACGTGATAGTCGCCCATGACACAGAGTAGGGTACGAGGGGAGGCGG TGACGTTACGGCGTAACGTCACCCCGGGTCATGACGATATGGGTCGCCATTGATTTGATT GTGCCTTGCATCTGCAGTTGGTTCGACAACGGTGGTTGACGCATCTCATG >Rosalind_6116 AGCAGGATTGAGCGCACGGTGGGTACGTTTACACTATCAGCGTCAGTAGAGTGAGGTCGG CACTAGTACATCGTAGAGTTGAAAACAAGGCCTGCACGTCGGCGTGCCATTTGCACTCAT AGTCCTTCGCTACGAGCTAATAGGAATTTCGGGGGATCAAACTCCGCACCATACGATAGT TTATATAGGTCAGGCGTCTCACTAATCTTTAACCGACACATATAATCACAAATAGAGATT GTCGATCTCGCAGTATAATATACGATCAGAACAGTGGGGCCCGGCGCCAGTTCCACGGCG CATGGCAGGCATTTTGGTGTTGTCGCTGTACGAAAATTTGGATCAGACCCTGCTAAATTT CAGCCAAGACTCGACCTCGCTTTCAGGATTAAGCGGTCTAGATCCCGATCGCCATTTTCC CCGTTGTCCCACTGGGAACACCTACAGTAGGTACCAGACCACGCACTGAATACGGTTAAG GCGAGCCCTTCTCCTACATCATTTATTCCTGGTCATACATTCATCTCAAGGAGTGATTGG TACGTCCATGCTGATTTAATCACACGGTTAGCTCATATATGAAGCAAGAGTGTCATGTAT ATGTTAGTTAACGACAAAGCTAAGCCCGGGGGGCAACTGGATAGTCACTCTGCTGGGGCC TTACCGCAGCGGACTCCGTTCAAACGTATAATTTAAATTTATCCATTTGTGTAATGGAAG ACCGCTATTGTCATCCGATAAGCTGGTAGAACAATATAAGTCGCCATGGGTAGTTCTTTC GTATGCGTAGGATCGCGTCGGCTTTTCCGATAACCCCGCATTCGACCAAGTTGTCGTCGA CTGCCAGTAGTAATTACTTTTGGGTATGCGGAGTCGATACTCTTTGAAACCAGAGAGTTT GAGGGCAAGCCTGCTCCATTGACACCTTGAAAAGTATGAGCTCCCTAGAA >Rosalind_4523 TCGCGTTTTATCCAGGCTGAGATAAGGGGCCTGTCTTGCGCAAATGATTCCCGCATGAAA TGAACCCGCCGTAAGCTTCAGCTTTCGATAACATACTGTGCGTTCGGTACAAGGATAACT TAAAACCTCTCGAGCTAGAAACGTAGAATGTCCTTAGCCAGGGTTCTCCAAGTACAGTCT AGGCGGTGTAGTGTGATACAGCCGGTGGCATCTCTCCTTTGACTACTCTTAGGTGCCCTC GCTCGACGCATGGAAGAGCCGGATAAAACAGAGTGGAGTACACTCGCTGAAAACCACCTA TTCAGGCCTACCGCAAAGGCATGCAACGTAACGTACGGAGTTGCATATTAAAAGGCACAC TGACGCGAACCGAAAGCCGGGTCGGTGATCGGCGTCATCGTATATCACGCATTGCAGTGG CAGCGTATTACTCTGGTAACCGAACGACCTTGGTCCACTACAACCCTGGCCCCAGCTATT TTTATATAGTTCCATTTCGGGTGCTGCGTCTCGCACGCAGCAGTTTTGAGATAGGCGCCG TTCAGGCGCCTGCTGACGTCAAAATTGCTACAGTGGCCAGAAATCTCGATCGTCGAGTAA ATAGCCAGATACCTCGCCAAATACCTGTAACCGTCTGTCTACTGTTTTTATGGGTATCAT CTTCAATCGTACACCTCTAGTAACATCACATGGGGGGTGAATCATGGGCATAACGGGTTT TGGAACCGTGACCTTAAATCGGTATGTGTGTTTGGTCGTAAATGTGCGTTCACTTCGGGT CGCCAAACGGCCGTATCGACGCTTTGTTAGGGATTTAACGGCCGCGTATGCCGGTGGCCC TGGATACAGTGTTGGTAAAGCTCTACCAACAATGTCAAAATACTCACATCATCTTACTAA AGAGCCCCAACGTCGAGTCGGGGGACTCGGCGATGAATAAAGTTCTTGTG >Rosalind_9863 TTCCAACGGGCCTGAACATCTTGCCGTACCACAGACGGCGGTCAGACTGTTATGACAGAT GTGCACATCGTCAGGTCACGGCTTGACGAGGGGGCTATTTACATATGGGGTTCCGGACTT GATGTAACCGTGATCTAACTCATGATGAGCGCCGTTAGGGTTGGGCACCGGGCCGCGGCC ACTCGGAGACTTCAAGATTAAGATCCTGATTATCTCCTACCCAGGGGGGAAACAATTGCA GTCATGAGGGGCTATAATGCTTCGGCTGTGCTATCTTTGTGGGGCCTTCTTTAACACAAT TCAACTCCGTTAAAGCTTAAAGCATTGGACGAGATAAATTTGTCAGTAGACTATACGGTC ATCTCGGTTCCCGGCGCTGGCCAGTACCATATCGACCACAGTGTTTCCTAAAAATTCCAT GTATAGGCGTCATGGGTCGAACCCCACGTACGCAGTCCTGAGTATGCACACACATCAGCG ACAAAGTGACCTTATAGGTGGGCTACCTCGCTCGATCGGCCCATGAAGAAGTGTCTGCCA TCTTCGGGGTTCCCTGGTACTTGGGTGGATGTTCCGGGAACTCTGCATCTAGATCTCTGA TGCGGCTTGTACTCGGGTTGTCTCAAGGGGGGTTGTATGGAGGCATCTTTTGGATGATCA CGCCTTTTCATTAATCCGCGCGCTTAGTTATCCACTTCAACCCACAACTAGTTATCCGGC TATACGGAACCAAGTTAAGCGTAATGCGGTAGCAGACTCGCCACCACTTATTGCGTTACT GCGATAGCGAAACTGGATTTGCTCCGAACAACCGAAAAGTAATCGGATGTGGATGATGCG GGCCGCTTTGCCTGAGTTGGGAGTACATCTGGTGATCTGTTCTGGTGGTCATTCCACGAG AGTACTCGAGGGCGTAGCAGATACAAGAGAAGGGCGCCGCTAGGACTAAA >Rosalind_0174 GATATAAACGTGTGTCCCGCTACTAGGGGCCACATGTAATCAAGACTTTGTTTATATGAC AACTTCAGGCCTTACCGATCTGGTGCCAACATGTCAATTTTCCCCTGTTCCAGTATCTAG CCTTCATCGCTGCAGGCTTTCCGAGACAAGCAACCGCTCTTAACTACAGGCAAGACCGGG AATACCTGTCTTAATGACGCTATGACCGGATGCGGAGTACCGCATCGTGATGCAACAACT GTGGACAGTTAGTGTGCAGGGTCATGGAAAGGAGCAGGCGCTTACGTTTTTCGTATACAC AACCACGAGGGGTTAACTTGTGAACAATAAGGTCCGTTAGTAGCACCTCCCCAGGGACAG CACGGGCTCAAGGTCTTCTTCGGATGGGTTGAAACCTCTGGTCGGCGGGCGGGCACTTAG AAAGTCGAAATCCCCACTACGATCAAGCATTCACCTTATCGGCTCGATTGGATCGTCGGA TGGAAGGTCTACCAACCGGCTGGTCAGATTCGCTTTCTTCGATGTACATGCCGGAGTTCT ACATGCACCAAAATTAGCTAGGGTTCCCATGGCCAAGACAACTCATCCTCACTGTGGGAA AGAGTCTTTTGTGATCCAGTTTAGCTGGCGTCACCCCGAATGGCACACATTACATGGTCG GACGCTGGACAGTGAGTGTTCCGCTACAACGCATCGGGCGACCCGTAAACATGTGTTACC CGTCATGATCCACCTAACCAGAAATCAAAGAAGTACTACTTTCCGGCCATGCAACAGGAG CGCGTCATCCTAGTGCGCTAGCCGGGCCATCCTCTAGTAGATCAGGCGTAACGCGATTCC TTCGTAGGCATCGCGCTAATGTAGCAATAGAGAAGCACAAGCCTTCAGGGATAACCCAGT GATTATGCACCTATCTGTTCGAAAAGGGCAAGACGGCACGGCCTCCGCGT >Rosalind_4563 ATGACCCACTAGAAATATTTGCTGCAGCAATAAAGACGCGGTCGTTATTAAAGGACCCCA TCAAGCACGTACACGAGTACGCGTTCACTCCCTAGGCCCGTTCAGCTGTAATGCTCTCCT TACGCGCTAGGGGTACGCAGAGTTTCTATTTCCCGCCTCCAATTATCGTATTTGCCCGCG GCCTTCCGGGCGTCGCTTTATTTCGCCAATACTCGCATCGCGCTCGCACCGCCGTCTGGG GCAGGTTGATACCTGGCACATGTCTCACCCCTTCTATTTTGACGAAGCTCGTAGCGCCCG ACGCGATATAGGGTCGGCGGTATTCGATCGCCTAGTCACCGAGTTCCATGGTGCGATAGG TCGAACTGGTTCGTGTCCCTGGTCAGGAAACTATTCCTCACAGATGATGCTTATTCCTGT TTGTTAGTCTACCCACATGTCCATCTTCCTGCTAATCCATGCCTTTCGGTTAACACTGAC ATAGTAACTAATTCGGCTGCTCCTTCCGGCATATATTTGGCGCCTTCGGCGTGGCGGCCC GGCGCAAGTCCCCCAATGGGGCTGCCCACACTCAGCGGCCCTTCATACGTATGTTTGGAG CACGTTTTAGGTGTAACACGCCCTACCGCGGCGAGGATAACTAACTAATCCGCATACATC TAACCATTCTGCATGGCAGCCTCGTAGCAGCATCCGTTCTACCCGTAACTCGACAAGTCT TTCAAACTAGCAGCGCCCCACCGAAGAGATACGGAGTACCGCAGCCGTAGTAAGACTCAG TTTAACAGGAGAATCTCTGATGGGAATCCCATGAAGGATACAAGAACAAATCGCCTGAGT TGCGATAGGGTGACCGCATTAAGGCTGCTCAGTCATGGCCTCGTATTTCCTTGTGCCATA ATGTTCCGCTGCGGTACGGTGGTTTGGTGGTTAAAGAAGGACTCCAAAGA >Rosalind_8396 GGCGTTCACAAGTTAAGCTGGCTGAAGACTTGTAAAACTCCGGAGCAACACAAGTAACCA TTCGTTGTCGGTCCGGTGCAGGCCAGGGGGTTAGAGAGATCTACATACTAGACCCTTTCA CCTCTTAGGATTAATGTCCAGCCACCGAAACTGCGCGACATCGTGACACTTGCGCCCATA TGCAGTAATGTAATAACCAGCTCTAATATTTCTATCCGACGTCAGCACTACGGTTAAGTC AGGTCCTTAGTGGAATGTAGAGAATCGAGCTGTGAGTAGTAGGGGGGGCTAGCACCCCAT TTAAGCAACGCTACTCACTTAGATCGGGCATAAGAACCTAAAGTGTAAGTAGAGATGATG TAGCCTCCGGTAAACCAGAATTTCCCCGGCCTCTATACCGGGCCTTAACAGTCGTGAGGC GCATCCCTCAGTTCAGTCCGGGACAAACCATAGGTAATAATAAATGGTATTGTTTCAAGC TCATCCCAATTTTGCAATCGGGAACACCACGCTTTATTAACGTCGCATTGCCGTCGTATA AGTCTCGGAGGAAAGGCCACTGTGATAGTTAATGCATAGCTCCAATCTGACGAGCGCGAC CATGTAAACCATTCCTCCGGCACGTTGTAAACGATTGGCTGCCTTATCACTCCACCCCTG CATCGTGGATAATGGACTTGAGCGTAAGTCAATACTCGGTGTTGGCCCTTTTCTCCGTGC ATATTATGCGTTTGAAATCGAGCGACGTTCGGTAATTTCCTTGGTCCGGTTCTTGTCAAT CGACAACATAGGCGTGCTTACGCTTCTTCACGACGAACCATAGATAGCGCCCCTAAGCGC AACGTGTGAGAGCATGATGACGAAACTGGGTGTGCCACTAGGTGTTTTCTACTGTTACGC CAACCTTCCTATTCCACAGTACCTGCGGCTGAACCTTAGTACCTTCTCTA """.strip() parsed_data = parse_input(data) make_profile(parsed_data) if __name__ == '__main__': main()
47.364407
60
0.926552
379
11,178
27.200528
0.580475
0.005238
0.00582
0.007566
0.017169
0.013774
0.009021
0.007275
0
0
0
0.004918
0.054124
11,178
235
61
47.565957
0.970113
0.002326
0
0.009259
0
0
0.882232
0.852094
0
1
0
0
0
1
0.018519
false
0
0.00463
0
0.027778
0.027778
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
null
1
0
0
0
0
0
0
0
0
0
0
0
0
4
3b78751e748e0c28eb4574bc2ceb68edf1932467
209
py
Python
doc/_themes/__init__.py
embedded-devops/Flask-MQTT
bc3a625f14fb4ec8290bf151072c147497f3a0a0
[ "MIT" ]
64
2016-12-10T16:55:32.000Z
2021-01-25T02:15:01.000Z
doc/_themes/__init__.py
embedded-devops/Flask-MQTT
bc3a625f14fb4ec8290bf151072c147497f3a0a0
[ "MIT" ]
2
2017-09-22T09:36:16.000Z
2021-03-22T17:15:52.000Z
doc/_themes/__init__.py
embedded-devops/Flask-MQTT
bc3a625f14fb4ec8290bf151072c147497f3a0a0
[ "MIT" ]
10
2016-12-11T03:19:36.000Z
2021-05-02T14:53:16.000Z
import os __version__ = '1.0.1' def get_path(): return os.path.abspath(os.path.dirname(__file__)) def setup(app): return { 'version': __version__, 'parallel_read_safe': True }
13.933333
53
0.62201
27
209
4.259259
0.666667
0.104348
0
0
0
0
0
0
0
0
0
0.018987
0.244019
209
14
54
14.928571
0.708861
0
0
0
0
0
0.143541
0
0
0
0
0
0
1
0.222222
false
0
0.111111
0.222222
0.555556
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
3b99148cfdeb90a765f839391c5a34781f128d17
185
py
Python
app/schemas.py
ev-horrosh/fastapi-project
4e38f5eb7573b8d70add47dd52fc973e9fed07b9
[ "MIT" ]
null
null
null
app/schemas.py
ev-horrosh/fastapi-project
4e38f5eb7573b8d70add47dd52fc973e9fed07b9
[ "MIT" ]
null
null
null
app/schemas.py
ev-horrosh/fastapi-project
4e38f5eb7573b8d70add47dd52fc973e9fed07b9
[ "MIT" ]
null
null
null
from re import S from pydantic import BaseModel from typing import Optional class User(BaseModel): first_name:str last_name:str age:int sex:Optional[str]=None
16.818182
30
0.708108
27
185
4.777778
0.666667
0.108527
0
0
0
0
0
0
0
0
0
0
0.237838
185
11
31
16.818182
0.914894
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.375
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
8e5772016ce9d093b9d855bc35d35474f74a9187
101
py
Python
abstract-codegen/src/atmfjstc/lib/abstract_codegen/ast/__init__.py
goc9000/python-library
0a4a09278df6e84061baedda8997071e2201103f
[ "MIT" ]
null
null
null
abstract-codegen/src/atmfjstc/lib/abstract_codegen/ast/__init__.py
goc9000/python-library
0a4a09278df6e84061baedda8997071e2201103f
[ "MIT" ]
null
null
null
abstract-codegen/src/atmfjstc/lib/abstract_codegen/ast/__init__.py
goc9000/python-library
0a4a09278df6e84061baedda8997071e2201103f
[ "MIT" ]
null
null
null
""" This package groups all the built-in node classes offered by the `abstract_codegen` package. """
25.25
92
0.752475
15
101
5
0.866667
0
0
0
0
0
0
0
0
0
0
0
0.148515
101
3
93
33.666667
0.872093
0.910891
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
8e6099119f26b536e38e505e34fc237bd2e59cfb
152
py
Python
chapter-14/shakespearebot-waypoint/bot/models.py
GeSup/Hands-on-JavaScript-for-Python-Developers
a4d779e3e46797754252e97ec0e517c9e42682c6
[ "MIT" ]
41
2019-04-30T14:55:48.000Z
2022-03-27T21:59:56.000Z
chapter-14/shakespearebot-waypoint/bot/models.py
GeSup/Hands-on-JavaScript-for-Python-Developers
a4d779e3e46797754252e97ec0e517c9e42682c6
[ "MIT" ]
10
2020-05-27T22:54:38.000Z
2020-10-13T21:52:24.000Z
chapter-14/shakespearebot-waypoint/bot/models.py
GeSup/Hands-on-JavaScript-for-Python-Developers
a4d779e3e46797754252e97ec0e517c9e42682c6
[ "MIT" ]
24
2019-05-07T21:02:11.000Z
2021-10-31T23:44:14.000Z
from django.db import models class Text(models.Model): PlayerLine = models.CharField(max_length=1000) def __str__(self): return self.PlayerLine
25.333333
48
0.769737
21
152
5.333333
0.809524
0
0
0
0
0
0
0
0
0
0
0.030534
0.138158
152
6
49
25.333333
0.824427
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.2
0.2
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
4
8e67c9cb778e91d2cab352898b79d1683798c293
144
py
Python
Externals/micromegas_4.3.5/Packages/smodels-v1.1.0patch1/smodels/tools/__init__.py
yuanfangtardis/vscode_project
2d78a85413cc85789cc4fee8ec991eb2a0563ef8
[ "Apache-2.0" ]
null
null
null
Externals/micromegas_4.3.5/Packages/smodels-v1.1.0patch1/smodels/tools/__init__.py
yuanfangtardis/vscode_project
2d78a85413cc85789cc4fee8ec991eb2a0563ef8
[ "Apache-2.0" ]
null
null
null
Externals/micromegas_4.3.5/Packages/smodels-v1.1.0patch1/smodels/tools/__init__.py
yuanfangtardis/vscode_project
2d78a85413cc85789cc4fee8ec991eb2a0563ef8
[ "Apache-2.0" ]
1
2022-01-15T12:22:30.000Z
2022-01-15T12:22:30.000Z
""" .. module:: tools.__init__ :synopsis: This package contains tools for handling results obtained with the main SModelS code. """
20.571429
81
0.6875
17
144
5.588235
0.941176
0
0
0
0
0
0
0
0
0
0
0
0.215278
144
6
82
24
0.840708
0.930556
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
8e7e2fd82b90a62a490603dc24f1988ca7e27fb8
31
py
Python
networth/__init__.py
Hedde/django-networth
496311e31f3b49202bda9c0b2997ee4508cc9477
[ "MIT" ]
null
null
null
networth/__init__.py
Hedde/django-networth
496311e31f3b49202bda9c0b2997ee4508cc9477
[ "MIT" ]
3
2020-02-12T00:02:35.000Z
2021-06-10T19:38:41.000Z
networth/__init__.py
Hedde/django-networth
496311e31f3b49202bda9c0b2997ee4508cc9477
[ "MIT" ]
null
null
null
__author__ = 'heddevanderheide'
31
31
0.83871
2
31
11
1
0
0
0
0
0
0
0
0
0
0
0
0.064516
31
1
31
31
0.758621
0
0
0
0
0
0.5
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
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
8e92b7bf4f6465a749d963319c6412e27abe7160
111
py
Python
src/ToolChainSCDG/procedures/linux/custom_package/gen_simproc4v.py
AnonymousSEMA/SEMA-ToolChain
05d6a7e43e10d4b1f6c5dfb70fbabeab3d4daf82
[ "BSD-2-Clause" ]
null
null
null
src/ToolChainSCDG/procedures/linux/custom_package/gen_simproc4v.py
AnonymousSEMA/SEMA-ToolChain
05d6a7e43e10d4b1f6c5dfb70fbabeab3d4daf82
[ "BSD-2-Clause" ]
null
null
null
src/ToolChainSCDG/procedures/linux/custom_package/gen_simproc4v.py
AnonymousSEMA/SEMA-ToolChain
05d6a7e43e10d4b1f6c5dfb70fbabeab3d4daf82
[ "BSD-2-Clause" ]
null
null
null
import angr class gen_simproc4v(angr.SimProcedure): def run(self, arg1, ar2, arg3, arg4): return
15.857143
41
0.675676
15
111
4.933333
0.933333
0
0
0
0
0
0
0
0
0
0
0.05814
0.225225
111
6
42
18.5
0.802326
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0.25
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
4
8eb1436051dd71a0f14169c0a3e3c5db3f38a647
95
py
Python
Bio-StrongHold/src/Partial_Permutations.py
crf1111/Bio-Informatics-Learning
2ccc02d7a23584c12aee44c5620160cdcaf70bd4
[ "MIT" ]
1
2018-10-10T19:03:52.000Z
2018-10-10T19:03:52.000Z
Bio-StrongHold/src/Partial_Permutations.py
crf1111/Bio-Informatics-Learning
2ccc02d7a23584c12aee44c5620160cdcaf70bd4
[ "MIT" ]
null
null
null
Bio-StrongHold/src/Partial_Permutations.py
crf1111/Bio-Informatics-Learning
2ccc02d7a23584c12aee44c5620160cdcaf70bd4
[ "MIT" ]
null
null
null
from math import factorial n = 86 k = 8 res = factorial(n)/factorial(n-k)%1e6 print int(res)
11.875
37
0.694737
18
95
3.666667
0.666667
0.454545
0
0
0
0
0
0
0
0
0
0.064103
0.178947
95
7
38
13.571429
0.782051
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0.2
null
null
0.2
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
d930bd7e55bef5a0a588be2aeede17fbaa44f754
745
py
Python
exastolog/test/test_toy3.py
sysbio-curie/pyExaStoLog
a8474823c1b5ef1642339b022675e0d60e340073
[ "BSD-3-Clause" ]
2
2020-11-17T15:00:01.000Z
2021-07-02T07:14:15.000Z
exastolog/test/test_toy3.py
sysbio-curie/pyExaStoLog
a8474823c1b5ef1642339b022675e0d60e340073
[ "BSD-3-Clause" ]
null
null
null
exastolog/test/test_toy3.py
sysbio-curie/pyExaStoLog
a8474823c1b5ef1642339b022675e0d60e340073
[ "BSD-3-Clause" ]
1
2020-07-07T13:36:44.000Z
2020-07-07T13:36:44.000Z
from unittest import TestCase from ..Model import Model from ..Simulation import Simulation from os.path import dirname, join import numpy as np import math class TestToy3(TestCase): def test_toy3(self): model = Model(join(dirname(__file__), "../../notebooks/model_files/toy3.bnet")) simulation = Simulation(model, ['A','B'], [0, 0]) result = simulation.get_last_states_probtraj() self.assertAlmostEqual(result.iloc[0, :].sum(), 1.0) self.assertAlmostEqual(result.loc[0, '<nil>'], 0.25) self.assertAlmostEqual(result.loc[0, 'A'], 0.25) self.assertAlmostEqual(result.loc[0, 'A'], 0.25) self.assertAlmostEqual(result.loc[0, 'A -- B'], 0.25)
33.863636
87
0.632215
95
745
4.863158
0.410526
0.227273
0.292208
0.25974
0.294372
0.227273
0.227273
0.227273
0.227273
0.227273
0
0.041237
0.218792
745
22
88
33.863636
0.752577
0
0
0.125
0
0
0.069705
0.049598
0
0
0
0
0.3125
1
0.0625
false
0
0.375
0
0.5
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
d955bd3b6a1f98f5c7cc4debf622f8e2f6c5f9cd
104
py
Python
goutdotcom/treatment/apps.py
Spiewart/goutdotcom
0916155732a72fcb8c8a2fb0f4dd81efef618af8
[ "MIT" ]
null
null
null
goutdotcom/treatment/apps.py
Spiewart/goutdotcom
0916155732a72fcb8c8a2fb0f4dd81efef618af8
[ "MIT" ]
null
null
null
goutdotcom/treatment/apps.py
Spiewart/goutdotcom
0916155732a72fcb8c8a2fb0f4dd81efef618af8
[ "MIT" ]
null
null
null
from django.apps import AppConfig class TreatmentConfig(AppConfig): name = 'goutdotcom.treatment'
17.333333
33
0.778846
11
104
7.363636
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.144231
104
5
34
20.8
0.910112
0
0
0
0
0
0.192308
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
d9724df91f0d1e509249a814becdf43525ed1c7c
182
py
Python
Contest/ABC051/c/main.py
mpses/AtCoder
9c101fcc0a1394754fcf2385af54b05c30a5ae2a
[ "CC0-1.0" ]
null
null
null
Contest/ABC051/c/main.py
mpses/AtCoder
9c101fcc0a1394754fcf2385af54b05c30a5ae2a
[ "CC0-1.0" ]
null
null
null
Contest/ABC051/c/main.py
mpses/AtCoder
9c101fcc0a1394754fcf2385af54b05c30a5ae2a
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python3 sx, sy, tx, ty = map(int, input().split()) x, y = tx - sx, ty - sy print("R"*x + "U"*-~y + "L"*-~x + "D"*-~y + "R" + "U"*y + "R"*-~x + "D"*-~y + "L"*-~x + "U")
45.5
92
0.401099
37
182
1.972973
0.513514
0.054795
0.082192
0
0
0
0
0
0
0
0
0.006849
0.197802
182
4
92
45.5
0.493151
0.115385
0
0
0
0
0.062112
0
0
0
0
0
0
1
0
true
0
0
0
0
0.333333
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
d9913fd01e1b721da362c3a1ba14143f873c7a20
5,450
py
Python
knoema/source_data/get_indic_id.py
zmmyc/ksh
5869908714ea87a297a8fc19ecafd7d3cf15e889
[ "MIT" ]
1
2022-03-30T06:50:42.000Z
2022-03-30T06:50:42.000Z
knoema/source_data/get_indic_id.py
zmmyc/ksh
5869908714ea87a297a8fc19ecafd7d3cf15e889
[ "MIT" ]
null
null
null
knoema/source_data/get_indic_id.py
zmmyc/ksh
5869908714ea87a297a8fc19ecafd7d3cf15e889
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import requests, json from bs4 import BeautifulSoup from mspider.spider import MSpider class Get_indic_idSpider(MSpider): def __init__(self): self.name = "get_count_id" self.indics = ['GDP', 'GDP-based-on-PPP', 'Real-GDP-growth', 'GDP-per-capita', 'GDP-per-capita-based-on-PPP', 'Inflation-rate', 'Unemployment-rate', 'Current-account-balance', 'Current-account-balance-as-a-share-of-GDP', 'Government-gross-debt-as-a-share-of-GDP', 'Poverty-rate', 'International-reserves', 'Primary-energy-production', 'Primary-energy-consumption', 'Energy-intensity', 'Energy-imports', 'Alternative-and-nuclear-energy-use', 'Fossil-fuel-energy-consumption', 'Diesel-price', 'Gasoline-price', 'Air-transport-freight', 'Number-of-air-passengers-carried', 'Volume-of-goods-transported-by-railways', 'Number-of-passengers-carried-by-railways', 'Length-of-rail-lines', 'Road-density', 'Share-of-the-Internet-users', 'Share-of-households-with-Internet', 'Number-of-mobile-cellular-subscriptions', 'Military-expenditure', 'Military-expenditure-as-a-share-of-GDP', 'Arms-exports', 'Arms-imports', 'Exports', 'Goods-exports', 'Service-exports', 'Merchandise-exports', 'Food-exports', 'Fuel-exports', 'High-technology-exports', 'High-technology-exports-as-a-share-of-exports', 'Imports', 'Goods-imports', 'Service-imports', 'Merchandise-imports', 'Food-imports', 'Fuel-imports', 'Number-of-arrivals', 'Number-of-departures', 'Tourism-expenditures', 'Tourism-expenditures-as-a-share-of-imports', 'Expenditures-for-passenger-transport-items', 'Expenditures-for-travel-items', 'Tourism-receipts', 'Tourism-receipts-as-a-share-of-exports', 'Receipts-for-passenger-transport-items', 'Receipts-for-travel-items', 'CO2-emissions', 'CO2-emissions-per-capita', 'CO2-emissions-intensity', 'Quantity-of-municipal-waste-collected', 'Human-development-index', 'Ease-of-doing-business-index', 'Global-competitiveness-index', 'Corruption-perceptions-index', 'Index-of-economic-freedom', 'Press-freedom-index', 'Political-rights-index', 'Civil-liberties-index', 'Property-rights-index', 'Prosperity-index', 'Happiness', 'Population', 'Population-growth-rate', 'Population-density', 'Urban-population', 'Birth-rate', 'Death-rate', 'Fertility-rate', 'Population-aged-0-14-years', 'Population-aged-15-64-years', 'Population-aged-65-years-and-above', 'Female-population', 'Employment-to-population-ratio', 'Land-area', 'Agricultural-land-area', 'Agricultural-land-as-a-share-of-land-area', 'Forest-area-as-a-share-of-land-area', 'Agriculture-value-added-per-worker', 'Food-production-index', 'Livestock-production-index', 'Crop-production-index', 'Cereal-production', 'Cereal-yield', 'Land-under-cereal-production', 'Number-of-tractors', 'Fertilizer-consumption', 'Neonatal-mortality-rate', 'Infant-mortality-rate', 'Child-mortality-rate', 'Maternal-mortality-ratio', 'Life-expectancy', 'Health-expenditure-as-a-share-of-GDP', 'Health-expenditure-per-capita', 'HIV-prevalence', 'Incidence-of-tuberculosis', 'Female-obesity-prevalence', 'Male-obesity-prevalence', 'Education-expenditure', 'Primary-enrollment', 'Duration-of-primary-education', 'Duration-of-secondary-education', 'Pupil-teacher-ratio-in-primary-education', 'Pupil-teacher-ratio-in-secondary-education', 'Adult-literacy-rate', 'Youth-literacy-rate', 'Homicide-rate', 'Number-of-homicides', 'Number-of-homicides-by-firearm', 'Share-of-homicides-by-firearm', 'Homicides-by-firearm-rate', 'Assault-rate', 'Kidnapping-rate', 'Robbery-rate', 'Rape-rate', 'Burglary-rate', 'Private-car-theft-rate', 'Motor-vehicle-theft-rate', 'Burglary-and-housebreaking-rate', 'Poverty-rate-at-dollar19-a-day', 'Poverty-rate-at-dollar32-a-day', 'Poverty-rate-at-national-poverty-line', 'Rural-poverty-rate', 'Urban-poverty-rate', 'GINI-index', 'Income-share-held-by-lowest-10percent', 'Income-share-held-by-highest-10percent', 'Prevalence-of-undernourishment', 'Number-of-undernourished-people', 'Food-deficit', 'Dietary-energy-supply-adequacy', 'Precipitation', 'Precipitation-volume', 'Rainfall-index', 'Volume-of-groundwater-produced', 'Volume-of-surface-water-produced', 'Internal-renewable-water-resources-per-capita', 'Renewable-water-resources-per-capita', 'Dependency-ratio', 'Freshwater-withdrawals', 'Water-productivity', 'RandD-expenditure', 'Number-of-researchers-in-RandD', 'Number-of-technicians-in-RandD', 'Number-of-scientific-journal-articles', 'Number-of-patent-applications'] self.urls = ['https://knoema.com/atlas/United-States-of-America/%s' %(indic) for indic in self.indics] self.source = list(zip(self.indics, self.urls)) self.file = open('./indicators.json', 'w', encoding='utf-8') super(Get_indic_idSpider, self).__init__(self.basic_func, self.source) def basic_func(self, index, src_item): indic, url = src_item html = self.sess.get(url).text soup = BeautifulSoup(html, 'lxml') payload_data = json.loads(soup.find('input', {'name': 'datadescriptor'}).attrs['value']) item = {} item['id'] = str(payload_data['Stub'][0]['Members'][0]) item['name'] = indic # print(item) self.save_item(item) def save_item(self, item): content = json.dumps(item, ensure_ascii=False) + '\n' self.file.write(content) self.file.flush() if __name__=="__main__": spider = Get_indic_idSpider() # spider.test() spider.crawl() spider.file.close()
147.297297
4,232
0.728807
697
5,450
5.651363
0.420373
0.026403
0.018279
0.022848
0.075654
0.021325
0
0
0
0
0
0.004984
0.079633
5,450
37
4,233
147.297297
0.780303
0.008624
0
0
0
0
0.691111
0.476111
0
0
0
0
0
1
0.107143
false
0.035714
0.142857
0
0.285714
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
794e90ebf4066373e9e80503d5223bdfcb0a3273
580
py
Python
lab8/point.py
kuzkov/computational-geometry
4411231a8097e618e03b3ef0ad5836e49e837216
[ "MIT" ]
1
2021-04-04T07:34:14.000Z
2021-04-04T07:34:14.000Z
lab8/point.py
kuzkov/computational-geometry
4411231a8097e618e03b3ef0ad5836e49e837216
[ "MIT" ]
null
null
null
lab8/point.py
kuzkov/computational-geometry
4411231a8097e618e03b3ef0ad5836e49e837216
[ "MIT" ]
1
2021-02-18T09:50:10.000Z
2021-02-18T09:50:10.000Z
import math import numpy as np from vector import Vector import segment as segment_lib class Point(Vector): def direction(self, segment): det = np.linalg.det([ segment.as_vector().as_array(), segment_lib.Segment(segment.p1, self).as_vector().as_array() ]) return 1 if det > 0 else 0 if math.isclose(det, 0) else -1 # 1 left, -1 right, 0 on def inside_segment(self, segment): pass def tolist(self): return (self.x, self.y) def within_polygon(self, polygon): return polygon.contains(self)
25.217391
91
0.631034
84
580
4.261905
0.416667
0.067039
0.055866
0.083799
0
0
0
0
0
0
0
0.021077
0.263793
580
22
92
26.363636
0.81733
0.037931
0
0
0
0
0
0
0
0
0
0
0
1
0.235294
false
0.058824
0.235294
0.117647
0.705882
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
4
7975367638974979532191242ae89eeddc64e809
4,418
py
Python
jacket/compute/opts.py
bopopescu/jacket
d7ad3147fcb43131098c2a5210847634ff5fb325
[ "Apache-2.0" ]
null
null
null
jacket/compute/opts.py
bopopescu/jacket
d7ad3147fcb43131098c2a5210847634ff5fb325
[ "Apache-2.0" ]
null
null
null
jacket/compute/opts.py
bopopescu/jacket
d7ad3147fcb43131098c2a5210847634ff5fb325
[ "Apache-2.0" ]
2
2016-08-10T02:21:49.000Z
2020-07-24T01:57:21.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. import itertools import jacket.cmd.compute.novnc import jacket.cmd.compute.serialproxy import jacket.cmd.compute.spicehtml5proxy import jacket.compute.baserpc import jacket.compute.cloudpipe.pipelib import jacket.compute.conductor.rpcapi import jacket.compute.conductor.tasks.live_migrate import jacket.compute.conf import jacket.compute.console.manager import jacket.compute.console.rpcapi import jacket.compute.console.serial import jacket.compute.console.xvp import jacket.compute.consoleauth import jacket.compute.consoleauth.manager import jacket.compute.consoleauth.rpcapi import jacket.compute.crypto import jacket.compute.exception import jacket.compute.image.download.file import jacket.compute.image.glance import jacket.compute.ipv6.api import jacket.compute.keymgr import jacket.compute.keymgr.barbican import jacket.compute.keymgr.conf_key_mgr import jacket.compute.netconf import jacket.compute.notifications import jacket.compute.paths import jacket.compute.quota import jacket.compute.rdp import jacket.compute.servicegroup.api import jacket.compute.spice import jacket.compute.utils import jacket.compute.volume import jacket.compute.volume.cinder import jacket.db.base import jacket.db.compute.api import jacket.db.compute.sqlalchemy.api import jacket.objects.compute.network def list_opts(): return [ ('DEFAULT', itertools.chain( [jacket.compute.conductor.tasks.live_migrate.migrate_opt], [jacket.compute.consoleauth.consoleauth_topic_opt], [jacket.db.base.db_driver_opt], [jacket.compute.ipv6.api.ipv6_backend_opt], [jacket.compute.servicegroup.api.servicegroup_driver_opt], jacket.compute.cloudpipe.pipelib.cloudpipe_opts, jacket.cmd.compute.novnc.opts, jacket.compute.console.manager.console_manager_opts, jacket.compute.console.rpcapi.rpcapi_opts, jacket.compute.console.xvp.xvp_opts, jacket.compute.consoleauth.manager.consoleauth_opts, jacket.compute.crypto.crypto_opts, jacket.db.compute.api.db_opts, jacket.db.compute.sqlalchemy.api.db_opts, jacket.compute.exception.exc_log_opts, jacket.compute.netconf.netconf_opts, jacket.compute.notifications.notify_opts, jacket.objects.compute.network.network_opts, jacket.compute.paths.path_opts, jacket.compute.quota.quota_opts, # jacket.compute.service.service_opts, jacket.compute.utils.monkey_patch_opts, jacket.compute.utils.utils_opts, jacket.compute.volume._volume_opts, )), ('barbican', jacket.compute.keymgr.barbican.barbican_opts), ('cinder', jacket.compute.volume.cinder.cinder_opts), ('api_database', jacket.db.compute.sqlalchemy.api.api_db_opts), ('database', jacket.db.compute.sqlalchemy.api.oslo_db_options.database_opts), ('glance', jacket.compute.image.glance.glance_opts), ('image_file_url', [jacket.compute.image.download.file.opt_group]), ('compute_keymgr', itertools.chain( jacket.compute.keymgr.conf_key_mgr.key_mgr_opts, jacket.compute.keymgr.keymgr_opts, )), ('rdp', jacket.compute.rdp.rdp_opts), ('spice', itertools.chain( jacket.cmd.compute.spicehtml5proxy.opts, jacket.compute.spice.spice_opts, )), ('upgrade_levels', itertools.chain( [jacket.compute.baserpc.rpcapi_cap_opt], [jacket.compute.conductor.rpcapi.rpcapi_cap_opt], [jacket.compute.console.rpcapi.rpcapi_cap_opt], [jacket.compute.consoleauth.rpcapi.rpcapi_cap_opt], )), ('workarounds', jacket.compute.utils.workarounds_opts), ]
40.53211
85
0.716614
538
4,418
5.762082
0.247212
0.26
0.183871
0.033548
0.144516
0.086452
0
0
0
0
0
0.002506
0.187189
4,418
108
86
40.907407
0.860763
0.125396
0
0.086957
0
0
0.028045
0
0
0
0
0
0
1
0.01087
true
0
0.413043
0.01087
0.434783
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
79ce0327616efa9691f6ae8fe41ab9246d6bf9e6
143
py
Python
tests/redirects_tests/urls.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
tests/redirects_tests/urls.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
tests/redirects_tests/urls.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
from django.conf.urls import url from django.http import HttpResponse urlpatterns = [ url(r'^$', lambda req: HttpResponse('OK')), ]
20.428571
48
0.678322
18
143
5.388889
0.722222
0.206186
0
0
0
0
0
0
0
0
0
0
0.188811
143
6
49
23.833333
0.836207
0
0
0
0
0
0.029197
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
8db775d1dd9bd4e0cb2fd047201ecfb22122ee56
247
py
Python
toughradius/common/__init__.py
capitek-wangsj/toughradius
ee0e6c20d32262ff7a6ace653af5a78340db62a2
[ "Apache-2.0" ]
null
null
null
toughradius/common/__init__.py
capitek-wangsj/toughradius
ee0e6c20d32262ff7a6ace653af5a78340db62a2
[ "Apache-2.0" ]
null
null
null
toughradius/common/__init__.py
capitek-wangsj/toughradius
ee0e6c20d32262ff7a6ace653af5a78340db62a2
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 class ObjectDict(dict): def __getattr__(self, name): try: return self[name] except KeyError: raise AttributeError(name) def __setattr__(self, name, value): self[name] = value
24.7
39
0.587045
27
247
5.074074
0.666667
0.233577
0.189781
0
0
0
0
0
0
0
0
0.005917
0.315789
247
10
40
24.7
0.804734
0.052632
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
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
4
8ddd3e9119c32c0e18dc330a4330c6e053f331a5
427
py
Python
app/blueprints/seo_arizona/errors.py
Anioko/TestApp
95fa8d27ca8e7a074e62f92609427a378844e621
[ "MIT" ]
null
null
null
app/blueprints/seo_arizona/errors.py
Anioko/TestApp
95fa8d27ca8e7a074e62f92609427a378844e621
[ "MIT" ]
1
2021-06-02T01:53:47.000Z
2021-06-02T01:53:47.000Z
app/blueprints/seo_arizona/errors.py
Anioko/TestApp
95fa8d27ca8e7a074e62f92609427a378844e621
[ "MIT" ]
null
null
null
from flask import render_template from app.blueprints.seo_arizona.views import seo_arizona @seo_arizona.app_errorhandler(403) def forbidden(_): return render_template('errors/403.html'), 403 @seo_arizona.app_errorhandler(404) def page_not_found(_): return render_template('errors/404.html'), 404 @seo_arizona.app_errorhandler(500) def internal_server_error(_): return render_template('errors/500.html'), 500
22.473684
56
0.789227
60
427
5.3
0.416667
0.157233
0.122642
0.235849
0
0
0
0
0
0
0
0.070681
0.105386
427
18
57
23.722222
0.76178
0
0
0
0
0
0.105386
0
0
0
0
0
0
1
0.272727
false
0
0.181818
0.272727
0.727273
0.090909
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
8dde19fedd80853c00291936adb295b97fcd76bc
1,315
py
Python
tests.py
rudradatta/Flames
3692564ef1c3493eb2e1586be47ca997ede97cb4
[ "BSD-3-Clause" ]
null
null
null
tests.py
rudradatta/Flames
3692564ef1c3493eb2e1586be47ca997ede97cb4
[ "BSD-3-Clause" ]
null
null
null
tests.py
rudradatta/Flames
3692564ef1c3493eb2e1586be47ca997ede97cb4
[ "BSD-3-Clause" ]
null
null
null
import flames import unittest class TestFlamesMethods(unittest.TestCase): def test_flames_count(self): self.assertEqual(flames.flames_count('abhi','abhi'),0) self.assertEqual(flames.flames_count('abhi','a'),3) self.assertEqual(flames.flames_count('abhi','asd'),5) def test_flames_result(self): self.assertEqual(flames.flames_result(1),'S') self.assertEqual(flames.flames_result(2),'E') self.assertEqual(flames.flames_result(3),'F') self.assertEqual(flames.flames_result(7),'E') self.assertEqual(flames.flames_result(10),'L') self.assertEqual(flames.flames_result(15),'M') self.assertEqual(flames.flames_result(21),'F') self.assertEqual(flames.flames_result(28),'A') self.assertEqual(flames.flames_result(30),'A') def test_calculate(self): self.assertEqual(flames.calculate('abhi','abhil'),'S') self.assertEqual(flames.calculate('abhi','abhila'),'E') self.assertEqual(flames.calculate('abhi','abhilas'),'F') self.assertEqual(flames.calculate('abhi','abhilashdsm'),'E') self.assertEqual(flames.calculate('Abhi',' abHil '),'S') self.assertEqual(flames.calculate('abhi','abhi.l'),'S') if __name__ == '__main__': unittest.main()
35.540541
68
0.657034
157
1,315
5.343949
0.248408
0.321812
0.450536
0.386174
0.756853
0.510131
0.1764
0.1764
0.1764
0.1764
0
0.015639
0.173384
1,315
36
69
36.527778
0.75621
0
0
0
0
0
0.082953
0
0
0
0
0
0.692308
1
0.115385
false
0
0.076923
0
0.230769
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
0
0
0
0
0
0
0
0
4
8de28136620ecc67d3f38af5cae41d8092c4a0be
165
py
Python
src/wayscript/errors.py
wayscript/wayscript-python
55abcf4f22869fccf6dbc7853444b70339683f2a
[ "MIT" ]
17
2019-04-17T18:48:51.000Z
2022-01-28T08:47:07.000Z
src/wayscript/errors.py
Plataformaalgoritmica/wayscript-python
a0ddaf849b879631c2bab3ab1ea0878e3df10812
[ "MIT" ]
1
2019-11-13T18:11:00.000Z
2019-11-13T18:13:13.000Z
src/wayscript/errors.py
Plataformaalgoritmica/wayscript-python
a0ddaf849b879631c2bab3ab1ea0878e3df10812
[ "MIT" ]
9
2020-01-09T23:06:39.000Z
2022-01-01T12:02:51.000Z
""" WayScript Errors """ class MissingCredentialsError(Exception): """Error thrown when a workspace integration does not have requisite credentials""" pass
20.625
87
0.745455
17
165
7.235294
1
0
0
0
0
0
0
0
0
0
0
0
0.163636
165
7
88
23.571429
0.891304
0.569697
0
0
0
0
0
0
0
0
0
0
0
1
0
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
0
1
1
0
0
0
0
0
4
8def1e2453ca4173ec7af3b63bf0b6b393ac0493
349
py
Python
polymorhism/pol_testing/abc_class.py
borko81/SU_OOP_2021
8c38682bd4a2b032ca09f85b0a579be152223a59
[ "MIT" ]
null
null
null
polymorhism/pol_testing/abc_class.py
borko81/SU_OOP_2021
8c38682bd4a2b032ca09f85b0a579be152223a59
[ "MIT" ]
null
null
null
polymorhism/pol_testing/abc_class.py
borko81/SU_OOP_2021
8c38682bd4a2b032ca09f85b0a579be152223a59
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod class Abstract(ABC): PRICE = 0 @abstractmethod def __init__(self, name, age): self.name = name self.age = age @abstractmethod def show_name_capitalize(self): return self.name.title() @abstractmethod def show_price(self): return self.__class__.PRICE
19.388889
35
0.644699
41
349
5.219512
0.414634
0.238318
0.196262
0
0
0
0
0
0
0
0
0.003937
0.272206
349
18
36
19.388889
0.838583
0
0
0.230769
0
0
0
0
0
0
0
0
0
1
0.230769
false
0
0.076923
0.153846
0.615385
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
4
8defe0931ec33c13ad662fc15043aa6c6f5e4581
3,209
py
Python
programa educativo de matematica.py
lucaslk122/Programa-de-matematica-basica-para-criancas
bd62ea8c1dd339290483b45b1a6f4a31a5c7e366
[ "MIT" ]
null
null
null
programa educativo de matematica.py
lucaslk122/Programa-de-matematica-basica-para-criancas
bd62ea8c1dd339290483b45b1a6f4a31a5c7e366
[ "MIT" ]
null
null
null
programa educativo de matematica.py
lucaslk122/Programa-de-matematica-basica-para-criancas
bd62ea8c1dd339290483b45b1a6f4a31a5c7e366
[ "MIT" ]
null
null
null
3# -*- coding: utf-8 -*- """ Created on Thu May 28 14:31:02 2020 @author: Lucas """ import random acertos = 0 erros = 0 perguntas = 0 print("Programa educativo matematico") print("""Digite a opção desejada [1] para Soma [2] para subtração [3] para divisão [4] para multiplicação""") opção = int(input("Digite sua opção: ")) perguntas2 = int(input("Quantas perguntas quer fazer? ")) if opção ==1: while perguntas < perguntas2: aleatórios = random.randint(1,100) aleatório2 = random.randint(1,100) soma = int(input(f"Quanto vale {aleatórios} + {aleatório2} ? = ")) if soma == (aleatórios + aleatório2): acertos +=1 print("Acertou") else: print("Errou,a resposta é",(aleatórios + aleatório2)) erros += 1 perguntas += 1 print(f"Voce acertou {acertos} e errou {erros} questões") if acertos > acertos*0.6: print("Parabéns, voce está indo muito bem, continue assim! XD") else: print("Precisa estudar mais,heim >.<") elif opção ==2: while perguntas < perguntas2: aleatórios = random.randint(1,100) aleatório2 = random.randint(1,100) subtração = int(input(f"Quanto vale {aleatórios} - {aleatório2} ? = ")) if subtração == (aleatórios - aleatório2): acertos +=1 print("Acertou") else: print("Errou feio errou rude,a resposta é",(aleatórios - aleatório2)) erros += 1 perguntas += 1 print(f"Voce acertou {acertos} e errou {erros} questões") if acertos > acertos*0.6: print("Parabéns, voce está indo muito bem, continue assim! XD") else: print("Precisa estudar mais,heim >.<") elif opção ==3: print("Use apenas duas casas decimais") while perguntas < perguntas2: aleatórios = random.randint(1,100) aleatório2 = random.randint(1,100) divisão = float(input(f"Quanto vale {aleatórios} : {aleatório2} ? = ")) if divisão == round((aleatórios / aleatório2),2): acertos +=1 print("Acertou") else: print(f"Errou ,a resposta é {(aleatórios / aleatório2):.2f}") erros += 1 perguntas += 1 print(f"Voce acertou {acertos} e errou {erros} questões") if acertos > acertos*0.6: print("Parabéns, voce está indo muito bem, continue assim! XD") else: print("Precisa estudar mais,heim >.<") elif opção ==4: while perguntas < perguntas2: aleatórios = random.randint(1,100) aleatório2 = random.randint(1,100) multiplicação = int(input(f"Quanto vale {aleatórios} * {aleatório2} ? = ")) if multiplicação == (aleatórios * aleatório2): acertos +=1 print("Acertou") else: print("Errou ,a resposta é",(aleatórios * aleatório2)) erros += 1 perguntas += 1 print(f"Voce acertou {acertos} e errou {erros} questões") if acertos > acertos*0.6: print("Parabéns, voce está indo muito bem, continue assim! XD") else: print("Precisa estudar mais,heim >.<") else: print("Oxe,essa opção não existe,ta loucona?")
35.263736
83
0.591773
375
3,209
5.064
0.242667
0.126382
0.058978
0.071617
0.758294
0.758294
0.724592
0.704581
0.63981
0.611374
0
0.043346
0.281084
3,209
91
84
35.263736
0.779801
0.006544
0
0.630952
0
0
0.354859
0
0
0
0
0
0
1
0
false
0
0.011905
0
0.011905
0.285714
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
8df8715160af657554f13c94d21120b38964b96a
244
py
Python
tgbot/routers/user/__init__.py
djimboy/tgbot_template_djimbo
71ef5e1a600d4ca952d84efde238359c7af82dcd
[ "MIT" ]
null
null
null
tgbot/routers/user/__init__.py
djimboy/tgbot_template_djimbo
71ef5e1a600d4ca952d84efde238359c7af82dcd
[ "MIT" ]
null
null
null
tgbot/routers/user/__init__.py
djimboy/tgbot_template_djimbo
71ef5e1a600d4ca952d84efde238359c7af82dcd
[ "MIT" ]
null
null
null
# - *- coding: utf- 8 - *- from aiogram import Router from tgbot.routers.user.user_menu import router_user_menu # Подключение хендлеров для юзера def setup_user_handlers(user_router: Router): user_router.include_router(router_user_menu)
24.4
57
0.786885
35
244
5.2
0.542857
0.131868
0.153846
0
0
0
0
0
0
0
0
0.004717
0.131148
244
9
58
27.111111
0.853774
0.229508
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.5
0
0.75
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
0
1
0
0
4
5c0da5f77a085661e96a680ab4f4aace5c39d144
34
py
Python
venv-lib/lib/python3.7/__future__.py
migmaciasdiaz/venvs
bcdbb75931cb27fc4b5b30f12fc44be85952157e
[ "MIT" ]
2
2020-03-30T14:17:10.000Z
2020-10-04T12:33:00.000Z
venv-lib/lib/python3.7/__future__.py
migmaciasdiaz/venvs
bcdbb75931cb27fc4b5b30f12fc44be85952157e
[ "MIT" ]
1
2020-11-24T03:31:13.000Z
2020-11-24T03:31:13.000Z
venv/lib/python3.7/__future__.py
wensu425/aws-eb-webapp
4b149c75c11fe5b33c9a080313ec336fabb45824
[ "MIT" ]
1
2021-05-04T09:18:22.000Z
2021-05-04T09:18:22.000Z
/usr/lib64/python3.7/__future__.py
34
34
0.823529
6
34
4
1
0
0
0
0
0
0
0
0
0
0
0.117647
0
34
1
34
34
0.588235
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
0
0
4
5c0dcc445a82edfdc35b31cc9c086ddb8671e374
294
py
Python
pyez/get_config.py
rsmekala/junosautomation
b76b3e8ce34048e3460cb071d0aeef176ab3836f
[ "Apache-2.0" ]
117
2016-08-22T15:52:28.000Z
2022-01-08T00:53:28.000Z
pyez/get_config.py
rsmekala/junosautomation
b76b3e8ce34048e3460cb071d0aeef176ab3836f
[ "Apache-2.0" ]
12
2017-10-28T09:44:44.000Z
2018-11-21T15:12:42.000Z
pyez/get_config.py
rsmekala/junosautomation
b76b3e8ce34048e3460cb071d0aeef176ab3836f
[ "Apache-2.0" ]
78
2016-08-19T05:35:28.000Z
2022-03-13T07:16:27.000Z
from jnpr.junos import Device from lxml import etree dev = Device(host='xxxx', user='demo', password='demo123', gather_facts=False) dev.open() cnf = dev.rpc.get_config() #cnf = dev.rpc.get_config(filter_xml=etree.XML('<configuration><interfaces/></configuration>')) print etree.tostring(cnf)
29.4
95
0.751701
43
294
5.046512
0.651163
0.0553
0.082949
0.110599
0.165899
0
0
0
0
0
0
0.011152
0.085034
294
9
96
32.666667
0.795539
0.319728
0
0
0
0
0.075377
0
0
0
0
0
0
0
null
null
0.166667
0.333333
null
null
0.166667
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
1
1
0
0
0
0
4
5c19e95ecbd605cd5bbe2f492605c45f95815362
53
py
Python
pindividual.py
IsSveshuD/lab_3
9e4f4a649d30b9a4b11997fbce426f44fa9fcfd1
[ "MIT" ]
null
null
null
pindividual.py
IsSveshuD/lab_3
9e4f4a649d30b9a4b11997fbce426f44fa9fcfd1
[ "MIT" ]
null
null
null
pindividual.py
IsSveshuD/lab_3
9e4f4a649d30b9a4b11997fbce426f44fa9fcfd1
[ "MIT" ]
null
null
null
a, b = map(int, input().split()) print((a%b)*(b%a)+1)
26.5
32
0.528302
12
53
2.333333
0.666667
0.142857
0
0
0
0
0
0
0
0
0
0.020833
0.09434
53
2
33
26.5
0.5625
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
308e63c76843dc2c83c6e852f8d1de8f5c88dc24
236
py
Python
thirdweb/modules/__init__.py
princetonwong/python-sdk
f35181d97620e29d055498fca75f3702f3bb2449
[ "Apache-2.0" ]
1
2022-02-18T16:59:12.000Z
2022-02-18T16:59:12.000Z
thirdweb/modules/__init__.py
princetonwong/python-sdk
f35181d97620e29d055498fca75f3702f3bb2449
[ "Apache-2.0" ]
null
null
null
thirdweb/modules/__init__.py
princetonwong/python-sdk
f35181d97620e29d055498fca75f3702f3bb2449
[ "Apache-2.0" ]
null
null
null
"""All Modules""" from .nft import NftModule as NftModuleV2 from .nft_v1 import * from .nft_types import * from .currency import * from .market import * from .pack import * from .collection import CollectionModule from .bundle import *
23.6
41
0.762712
32
236
5.5625
0.5
0.280899
0
0
0
0
0
0
0
0
0
0.01
0.152542
236
9
42
26.222222
0.88
0.04661
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
0
0
0
4
30a588158c50b26b948593296dc5a892bedb5ede
101
py
Python
scripts/fastapi/escuelas.py
HighDeFing/thesis_v4
2dc9288af75a8b51fe54ed66f520e8aa8a0ab3c7
[ "Apache-2.0" ]
null
null
null
scripts/fastapi/escuelas.py
HighDeFing/thesis_v4
2dc9288af75a8b51fe54ed66f520e8aa8a0ab3c7
[ "Apache-2.0" ]
null
null
null
scripts/fastapi/escuelas.py
HighDeFing/thesis_v4
2dc9288af75a8b51fe54ed66f520e8aa8a0ab3c7
[ "Apache-2.0" ]
null
null
null
import json f = open('Thesis_v3/scripts/fastapi/web/static/data/escuelas.json') data = json.load(f)
20.2
67
0.752475
17
101
4.411765
0.764706
0
0
0
0
0
0
0
0
0
0
0.01087
0.089109
101
4
68
25.25
0.804348
0
0
0
0
0
0.544554
0.544554
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
30b5e4e7800e589009301f09b9320ccd7cff9745
256
py
Python
services/helpers.py
jonti09/postgresql-manager
b41dab209b3b655c71c5e0f36699e63ddba1ad06
[ "MIT" ]
null
null
null
services/helpers.py
jonti09/postgresql-manager
b41dab209b3b655c71c5e0f36699e63ddba1ad06
[ "MIT" ]
null
null
null
services/helpers.py
jonti09/postgresql-manager
b41dab209b3b655c71c5e0f36699e63ddba1ad06
[ "MIT" ]
null
null
null
from configparser import ConfigParser import boto3 class S3Client: @staticmethod def get_client(config: ConfigParser): return boto3.Session( profile_name=config.get('S3', 'profile', fallback='default') ).client('s3')
21.333333
72
0.671875
27
256
6.296296
0.666667
0.211765
0
0
0
0
0
0
0
0
0
0.025126
0.222656
256
11
73
23.272727
0.829146
0
0
0
0
0
0.070313
0
0
0
0
0
0
1
0.125
false
0
0.25
0.125
0.625
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
4
30cae5fcba520d2336e9de37bde53bf9f641c26d
1,593
py
Python
src/Controllers/CEOControl.py
shulip/ShoppingMallSystem
01e5a04a8353ca319ed2dc002fc358f6e44c33dd
[ "MIT" ]
null
null
null
src/Controllers/CEOControl.py
shulip/ShoppingMallSystem
01e5a04a8353ca319ed2dc002fc358f6e44c33dd
[ "MIT" ]
null
null
null
src/Controllers/CEOControl.py
shulip/ShoppingMallSystem
01e5a04a8353ca319ed2dc002fc358f6e44c33dd
[ "MIT" ]
1
2021-04-22T15:14:21.000Z
2021-04-22T15:14:21.000Z
####################################################### # # CEOControl.py # Python implementation of the Class CEOControl # Generated by Enterprise Architect # Created on: 16-5��-2019 12:06:10 # Original author: ���� # ####################################################### from Models.Statement import Statement from Models.Contract import Contract from Controllers.User import User from Controllers.Login import Login class CEOControl(User): def __init__(self,ID): super().__init__() self.__identity = 'ceo' self.__ID = ID self.m_Statement = Statement() self.__contractCon = Contract() def set_contract_ceoaffirm_by_id(self,user_id, ceoaffirm): self.__contractCon.set_contract_ceoaffirm_by_id(user_id, ceoaffirm) def set_contract_ceosign_by_id(self,user_id, ceosign): self.__contractCon.set_contract_ceosign_by_id(user_id, ceosign) def check_all_information(self): pass def get_all_contracts(self): return self.m_Statement.contracts def get_all_receipts(self): return self.m_Statement.receipts def get_all_receivable(self): return self.m_Statement.receivable def confirm_contract(self): pass def login(self,name,password,identity): super().login(name,password,identity) def registration(self): pass def remind_arrearage(self): pass def remind_expiration_con(self): pass def sign_contract(self): pass if __name__ == '__main__': ceo = CEOControl() ceo.login('as',12,'ceo')
24.890625
75
0.640301
188
1,593
5.12234
0.340426
0.049844
0.057113
0.046729
0.19107
0
0
0
0
0
0.003766
0.011876
0.207156
1,593
64
76
24.890625
0.745843
0.096045
0
0.157895
1
0
0.012112
0
0
0
0
0
0
1
0.342105
false
0.210526
0.105263
0.078947
0.552632
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
4
30f4e2ae84a31284f08d9dd4f970283a7dda20d5
40,407
py
Python
pysnmp_mibs/ROHC-MIB.py
jackjack821/pysnmp-mibs
9835ea0bb2420715caf4ee9aaa07d59bb263acd6
[ "BSD-2-Clause" ]
6
2017-04-21T13:48:08.000Z
2022-01-06T19:42:52.000Z
pysnmp_mibs/ROHC-MIB.py
jackjack821/pysnmp-mibs
9835ea0bb2420715caf4ee9aaa07d59bb263acd6
[ "BSD-2-Clause" ]
1
2020-05-05T16:42:25.000Z
2020-05-05T16:42:25.000Z
pysnmp_mibs/ROHC-MIB.py
jackjack821/pysnmp-mibs
9835ea0bb2420715caf4ee9aaa07d59bb263acd6
[ "BSD-2-Clause" ]
6
2020-02-08T20:28:49.000Z
2021-09-14T13:36:46.000Z
# # PySNMP MIB module ROHC-MIB (http://pysnmp.sf.net) # ASN.1 source http://mibs.snmplabs.com:80/asn1/ROHC-MIB # Produced by pysmi-0.0.7 at Sun Feb 14 00:27:00 2016 # On host bldfarm platform Linux version 4.1.13-100.fc21.x86_64 by user goose # Using Python version 3.5.0 (default, Jan 5 2016, 17:11:52) # ( Integer, OctetString, ObjectIdentifier, ) = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") ( NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ( ValueSizeConstraint, ConstraintsIntersection, ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint") ( ifIndex, ) = mibBuilder.importSymbols("IF-MIB", "ifIndex") ( SnmpAdminString, ) = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") ( ModuleCompliance, ObjectGroup, NotificationGroup, ) = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup") ( ObjectIdentity, iso, Unsigned32, Gauge32, mib_2, MibIdentifier, Integer32, TimeTicks, MibScalar, MibTable, MibTableRow, MibTableColumn, Bits, Counter64, Counter32, NotificationType, ModuleIdentity, IpAddress, ) = mibBuilder.importSymbols("SNMPv2-SMI", "ObjectIdentity", "iso", "Unsigned32", "Gauge32", "mib-2", "MibIdentifier", "Integer32", "TimeTicks", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits", "Counter64", "Counter32", "NotificationType", "ModuleIdentity", "IpAddress") ( TimeInterval, DisplayString, TruthValue, TextualConvention, DateAndTime, ) = mibBuilder.importSymbols("SNMPv2-TC", "TimeInterval", "DisplayString", "TruthValue", "TextualConvention", "DateAndTime") rohcMIB = ModuleIdentity((1, 3, 6, 1, 2, 1, 112)).setRevisions(("2004-06-03 00:00",)) if mibBuilder.loadTexts: rohcMIB.setLastUpdated('200406030000Z') if mibBuilder.loadTexts: rohcMIB.setOrganization('IETF Robust Header Compression Working Group') if mibBuilder.loadTexts: rohcMIB.setContactInfo('WG charter:\n http://www.ietf.org/html.charters/rohc-charter.html\n\n Mailing Lists:\n General Discussion: rohc@ietf.org\n To Subscribe: rohc-request@ietf.org\n In Body: subscribe your_email_address\n\n Editor:\n Juergen Quittek\n NEC Europe Ltd.\n Network Laboratories\n Kurfuersten-Anlage 36\n\n\n\n 69221 Heidelberg\n Germany\n Tel: +49 6221 90511-15\n EMail: quittek@netlab.nec.de') if mibBuilder.loadTexts: rohcMIB.setDescription('This MIB module defines a set of basic objects for\n monitoring and configuring robust header compression.\n The module covers information about running instances\n of ROHC (compressors or decompressors) at IP interfaces.\n\n Information about compressor contexts and decompressor\n contexts has different structure for different profiles.\n Therefore it is not provided by this MIB module, but by\n individual modules for different profiles.\n\n Copyright (C) The Internet Society (2004). The\n initial version of this MIB module was published\n in RFC 3816. For full legal notices see the RFC\n itself or see:\n http://www.ietf.org/copyrights/ianamib.html') class RohcChannelIdentifier(Unsigned32, TextualConvention): displayHint = 'd' subtypeSpec = Unsigned32.subtypeSpec+ValueRangeConstraint(1,4294967295) class RohcChannelIdentifierOrZero(Unsigned32, TextualConvention): displayHint = 'd' subtypeSpec = Unsigned32.subtypeSpec+ValueRangeConstraint(0,4294967295) class RohcCompressionRatio(Unsigned32, TextualConvention): displayHint = 'd' rohcObjects = MibIdentifier((1, 3, 6, 1, 2, 1, 112, 1)) rohcConformance = MibIdentifier((1, 3, 6, 1, 2, 1, 112, 2)) rohcInstanceObjects = MibIdentifier((1, 3, 6, 1, 2, 1, 112, 1, 1)) rohcChannelTable = MibTable((1, 3, 6, 1, 2, 1, 112, 1, 1, 1), ) if mibBuilder.loadTexts: rohcChannelTable.setDescription('This table lists and describes all ROHC channels\n per interface.') rohcChannelEntry = MibTableRow((1, 3, 6, 1, 2, 1, 112, 1, 1, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "ROHC-MIB", "rohcChannelID")) if mibBuilder.loadTexts: rohcChannelEntry.setDescription('An entry describing a particular script. Every script that\n is stored in non-volatile memory is required to appear in\n\n\n\n this script table.\n\n Note, that the rohcChannelID identifies the channel\n uniquely. The ifIndex is part of the index of this table\n just in order to allow addressing channels per interface.') rohcChannelID = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 1, 1, 2), RohcChannelIdentifier()) if mibBuilder.loadTexts: rohcChannelID.setDescription("The locally arbitrary, but unique identifier associated\n with this channel. The value is REQUIRED to be unique\n per ROHC MIB implementation independent of the associated\n interface.\n\n The value is REQUIRED to remain constant at least from one\n re-initialization of the entity's network management system\n to the next re-initialization. It is RECOMMENDED that the\n value persist across such re-initializations.") rohcChannelType = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3,))).clone(namedValues=NamedValues(("notInUse", 1), ("rohc", 2), ("dedicatedFeedback", 3),))).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcChannelType.setDescription('Type of usage of the channel. A channel might be currently\n not in use for ROHC or feedback, it might be in use as\n a ROHC channel carrying packets and optional piggy-backed\n feedback, or it might be used as a dedicated feedback\n channel exclusively carrying feedback.') rohcChannelFeedbackFor = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 1, 1, 4), RohcChannelIdentifierOrZero()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcChannelFeedbackFor.setDescription('The index of another channel of this interface for which\n the channel serves as feedback channel.\n\n If no feedback information is transferred on this channel,\n then the value of this ID is 0. If the channel type is set\n to notInUse(1), then the value of this object must be 0.\n If the channel type is rohc(2) and the value of this object\n is a valid channel ID, then feedback information is\n piggy-backed on the ROHC channel. If the channel type is\n dedicatedFeedback(3), then feedback is transferred on this\n channel and the value of this object MUST be different from\n 0 and MUST identify an existing ROHC channel.') rohcChannelDescr = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 1, 1, 5), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcChannelDescr.setDescription('A textual description of the channel.') rohcChannelStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2,))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2),))).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcChannelStatus.setDescription('Status of the channel.') rohcInstanceTable = MibTable((1, 3, 6, 1, 2, 1, 112, 1, 1, 2), ) if mibBuilder.loadTexts: rohcInstanceTable.setDescription('This table lists properties of running instances\n of robust header compressors and decompressors\n at IP interfaces. It is indexed by interface number,\n the type of instance (compressor or decompressor),\n and the ID of the channel used by the instance as\n ROHC channel.\n\n Note that the rohcChannelID uniquely identifies an\n instance. The ifIndex and rohcInstanceType are part\n of the index, because it simplifies accessing instances\n per interface and for addressing either compressors or\n decompressors only.') rohcInstanceEntry = MibTableRow((1, 3, 6, 1, 2, 1, 112, 1, 1, 2, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "ROHC-MIB", "rohcInstanceType"), (0, "ROHC-MIB", "rohcChannelID")) if mibBuilder.loadTexts: rohcInstanceEntry.setDescription('An entry describing a particular instance\n of a robust header compressor or decompressor.') rohcInstanceType = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2,))).clone(namedValues=NamedValues(("compressor", 1), ("decompressor", 2),))) if mibBuilder.loadTexts: rohcInstanceType.setDescription('Type of the instance of ROHC. It is either a\n compressor instance or a decompressor instance.') rohcInstanceFBChannelID = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 2, 1, 4), RohcChannelIdentifierOrZero()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcInstanceFBChannelID.setDescription('Identifier of the channel used for feedback.\n If no feedback channel is used, the value of\n this object is 0 .') rohcInstanceVendor = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 2, 1, 5), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcInstanceVendor.setDescription('An object identifier that identifies the vendor who\n provides the implementation of robust header description.\n This object identifier SHALL point to the object identifier\n directly below the enterprise object identifier\n {1 3 6 1 4 1} allocated for the vendor. The value must be\n the object identifier {0 0} if the vendor is not known.') rohcInstanceVersion = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 2, 1, 6), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0,32))).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcInstanceVersion.setDescription('The version number of the implementation of robust header\n compression. The zero-length string shall be used if the\n implementation does not have a version number.\n\n\n\n\n It is suggested that the version number consist of one or\n more decimal numbers separated by dots, where the first\n number is called the major version number.') rohcInstanceDescr = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 2, 1, 7), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcInstanceDescr.setDescription('A textual description of the implementation.') rohcInstanceClockRes = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 2, 1, 8), Unsigned32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: rohcInstanceClockRes.setDescription('This object indicates the system clock resolution in\n units of milliseconds. A zero (0) value means that there\n is no clock available.') rohcInstanceMaxCID = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 2, 1, 9), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1,16383))).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcInstanceMaxCID.setDescription('The highest context ID number to be used by the\n compressor. Note that this parameter is not coupled to,\n but in effect further constrained by,\n rohcChannelLargeCIDs.') rohcInstanceLargeCIDs = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 2, 1, 10), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcInstanceLargeCIDs.setDescription('When retrieved, this boolean object returns false if\n the short CID representation (0 bytes or 1 prefix byte,\n covering CID 0 to 15) is used; it returns true, if the\n embedded CID representation (1 or 2 embedded CID bytes\n covering CID 0 to 16383) is used.') rohcInstanceMRRU = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 2, 1, 11), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcInstanceMRRU.setDescription('Maximum reconstructed reception unit. This is the\n size of the largest reconstructed unit in octets that\n the decompressor is expected to reassemble from\n segments (see RFC 3095, Section 5.2.5). Note that this\n size includes the CRC. If MRRU is negotiated to be 0,\n no segment headers are allowed on the channel.') rohcInstanceContextStorageTime = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 2, 1, 12), TimeInterval().clone(360000)).setUnits('centi-seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: rohcInstanceContextStorageTime.setDescription('This object indicates the default maximum amount of time\n information on a context belonging to this instance is kept\n as entry in the rohcContextTable after the context is\n expired or terminated. The value of this object is used\n to initialize rohcContexStorageTime object when a new\n context is created.\n Changing the value of an rohcInstanceContextStorageTime\n instance does not affect any entry of the rohcContextTable\n created previously.\n ROHC-MIB implementations SHOULD store the set value of this\n object persistently.') rohcInstanceStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 2, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2,))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2),))).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcInstanceStatus.setDescription('Status of the instance of ROHC.') rohcInstanceContextsTotal = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 2, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcInstanceContextsTotal.setDescription('Counter of all contexts created by this instance.\n\n Discontinuities in the value of this counter can\n occur at re-initialization of the management\n system, and at other times as indicated by the\n value of ifCounterDiscontinuityTime.') rohcInstanceContextsCurrent = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 2, 1, 15), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcInstanceContextsCurrent.setDescription('Number of currently active contexts created by this\n instance.') rohcInstancePackets = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 2, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcInstancePackets.setDescription('Counter of all packets passing this instance.\n\n Discontinuities in the value of this counter can\n occur at re-initialization of the management\n system, and at other times as indicated by the\n value of ifCounterDiscontinuityTime.') rohcInstanceIRs = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 2, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcInstanceIRs.setDescription('The number of all IR packets that are either sent\n or received by this instance.\n\n Discontinuities in the value of this counter can\n occur at re-initialization of the management\n system, and at other times as indicated by the\n\n\n\n value of ifCounterDiscontinuityTime.') rohcInstanceIRDYNs = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 2, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcInstanceIRDYNs.setDescription('The number of all IR-DYN packets that are either sent\n or received by this instance.\n\n Discontinuities in the value of this counter can\n occur at re-initialization of the management\n system, and at other times as indicated by the\n value of ifCounterDiscontinuityTime.') rohcInstanceFeedbacks = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 2, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcInstanceFeedbacks.setDescription('The number of all feedbacks that are either sent\n or received by this instance.\n\n Discontinuities in the value of this counter can\n occur at re-initialization of the management\n system, and at other times as indicated by the\n value of ifCounterDiscontinuityTime.') rohcInstanceCompressionRatio = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 2, 1, 20), RohcCompressionRatio()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcInstanceCompressionRatio.setDescription('This object indicates the compression ratio so far over all\n packets on the channel served by this instance. The\n compression is computed over all bytes of the IP packets\n including the IP header but excluding all lower layer\n headers.') rohcProfileTable = MibTable((1, 3, 6, 1, 2, 1, 112, 1, 1, 3), ) if mibBuilder.loadTexts: rohcProfileTable.setDescription('This table lists a set of profiles supported by the\n instance.') rohcProfileEntry = MibTableRow((1, 3, 6, 1, 2, 1, 112, 1, 1, 3, 1), ).setIndexNames((0, "ROHC-MIB", "rohcChannelID"), (0, "ROHC-MIB", "rohcProfile")) if mibBuilder.loadTexts: rohcProfileEntry.setDescription('An entry describing a particular profile supported by\n the instance. It is indexed by the rohcChannelID\n identifying the instance and by the rohcProfile.') rohcProfile = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 3, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))) if mibBuilder.loadTexts: rohcProfile.setDescription("Identifier of a profile supported. For a listing of\n possible profile values, see the IANA registry for\n 'RObust Header Compression (ROHC) Profile Identifiers'\n at http://www.iana.org/assignments/rohc-pro-ids") rohcProfileVendor = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 3, 1, 3), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcProfileVendor.setDescription('An object identifier that identifies the vendor who\n provides the implementation of robust header description.\n This object identifier SHALL point to the object identifier\n directly below the enterprise object identifier\n {1 3 6 1 4 1} allocated for the vendor. The value must be\n the object identifier {0 0} if the vendor is not known.') rohcProfileVersion = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 3, 1, 4), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0,32))).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcProfileVersion.setDescription('The version number of the implementation of robust header\n compression. The zero-length string shall be used if the\n implementation does not have a version number.\n\n It is suggested that the version number consist of one or\n more decimal numbers separated by dots, where the first\n number is called the major version number.') rohcProfileDescr = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 3, 1, 5), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcProfileDescr.setDescription('A textual description of the implementation.') rohcProfileNegotiated = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 1, 3, 1, 6), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcProfileNegotiated.setDescription('When retrieved, this boolean object returns true\n if the profile has been negotiated to be used at\n the instance, i.e., is supported also be the\n corresponding compressor/decompressor.') rohcContextTable = MibTable((1, 3, 6, 1, 2, 1, 112, 1, 2), ) if mibBuilder.loadTexts: rohcContextTable.setDescription('This table lists and describes all compressor contexts\n per instance.') rohcContextEntry = MibTableRow((1, 3, 6, 1, 2, 1, 112, 1, 2, 1), ).setIndexNames((0, "ROHC-MIB", "rohcChannelID"), (0, "ROHC-MIB", "rohcContextCID")) if mibBuilder.loadTexts: rohcContextEntry.setDescription('An entry describing a particular compressor context.') rohcContextCID = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 2, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0,16383))) if mibBuilder.loadTexts: rohcContextCID.setDescription('The context identifier (CID) of this context.') rohcContextCIDState = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4,))).clone(namedValues=NamedValues(("unused", 1), ("active", 2), ("expired", 3), ("terminated", 4),))).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcContextCIDState.setDescription("State of the CID. When a CID is assigned to a context,\n its state changes from `unused' to `active'. The active\n context may stop operation due to some explicit\n signalling or after observing no packet for some specified\n time. In the first case then the CID state changes to\n `terminated', in the latter case it changes to `expired'.\n If the CID is re-used again for another context, the\n state changes back to `active'.") rohcContextProfile = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 2, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcContextProfile.setDescription('Identifier of the profile for this context.\n The profile is identified by its index in the\n rohcProfileTable for this instance. There MUST exist a\n corresponding entry in the rohcProfileTable using the\n value of rohcContextProfile as second part of the index\n (and using the same rohcChannelID as first part of the\n index).') rohcContextDecompressorDepth = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 2, 1, 5), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcContextDecompressorDepth.setDescription('This object indicates whether reverse decompression, for\n example as described in RFC 3095, Section 6.1, is used\n on this channel or not, and if used, to what extent.\n\n\n\n\n Its value is only valid for decompressor contexts, i.e.,\n if rohcInstanceType has the value decompressor(2). For\n compressor contexts where rohcInstanceType has the value\n compressor(1), the value of this object is irrelevant\n and MUST be set to zero (0).\n\n The value of the reverse decompression depth indicates\n the maximum number of packets that are buffered, and thus\n possibly be reverse decompressed by the decompressor.\n A zero (0) value means that reverse decompression is not\n used.') rohcContextStorageTime = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 2, 1, 6), TimeInterval()).setUnits('centi-seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: rohcContextStorageTime.setDescription('The value of this object specifies how long this row\n can exist in the rohcContextTable after the\n rohcContextCIDState switched to expired(3) or\n terminated(4). This object returns the remaining time\n that the row may exist before it is aged out. The object\n is initialized with the value of the associated\n rohcContextStorageTime object. After expiration or\n termination of the context, the value of this object ticks\n backwards. The entry in the rohcContextTable is destroyed\n when the value reaches 0.\n\n The value of this object may be set in order to increase or\n reduce the remaining time that the row may exist. Setting\n the value to 0 will destroy this entry as soon as the\n rochContextCIDState has the value expired(3) or\n terminated(4).\n\n Note that there is no guarantee that the row is stored as\n long as this object indicates. In case of limited CID\n space, the instance may re-use a CID before the storage\n time of the corresponding row in rohcContextTable reaches\n the value of 0. In this case the information stored in this\n row is not anymore available.') rohcContextActivationTime = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 2, 1, 7), DateAndTime().clone(hexValue="0000000000000000")).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcContextActivationTime.setDescription("The date and time when the context started to be able to\n compress packets or decompress packets, respectively.\n The value '0000000000000000'H is returned if the context\n has not been activated yet.") rohcContextDeactivationTime = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 2, 1, 8), DateAndTime().clone(hexValue="0000000000000000")).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcContextDeactivationTime.setDescription("The date and time when the context stopped being able to\n compress packets or decompress packets, respectively,\n because it expired or was terminated for other reasons.\n The value '0000000000000000'H is returned if the context\n has not been deactivated yet.") rohcContextPackets = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 2, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcContextPackets.setDescription('The number of all packets passing this context.\n\n Discontinuities in the value of this counter can\n occur at re-initialization of the management\n system, and at other times as indicated by the\n value of ifCounterDiscontinuityTime. For checking\n ifCounterDiscontinuityTime, the interface index is\n required. It can be determined by reading the\n rohcChannelTable.') rohcContextIRs = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 2, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcContextIRs.setDescription('The number of all IR packets sent or received,\n respectively, by this context.\n\n Discontinuities in the value of this counter can\n occur at re-initialization of the management\n system, and at other times as indicated by the\n\n\n\n value of ifCounterDiscontinuityTime. For checking\n ifCounterDiscontinuityTime, the interface index is\n required. It can be determined by reading the\n rohcChannelTable.') rohcContextIRDYNs = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 2, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcContextIRDYNs.setDescription('The number of all IR-DYN packets sent or received,\n respectively, by this context.\n\n Discontinuities in the value of this counter can\n occur at re-initialization of the management\n system, and at other times as indicated by the\n value of ifCounterDiscontinuityTime. For checking\n ifCounterDiscontinuityTime, the interface index is\n required. It can be determined by reading the\n rohcChannelTable.') rohcContextFeedbacks = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 2, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcContextFeedbacks.setDescription('The number of all feedbacks sent or received,\n respectively, by this context.\n\n Discontinuities in the value of this counter can\n occur at re-initialization of the management\n system, and at other times as indicated by the\n value of ifCounterDiscontinuityTime. For checking\n ifCounterDiscontinuityTime, the interface index is\n required. It can be determined by reading the\n rohcChannelTable.') rohcContextDecompressorFailures = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 2, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcContextDecompressorFailures.setDescription('The number of all decompressor failures so far in this\n context. The number is only valid for decompressor\n contexts, i.e., if rohcInstanceType has the value\n decompressor(2).\n\n Discontinuities in the value of this counter can\n occur at re-initialization of the management\n system, and at other times as indicated by the\n value of ifCounterDiscontinuityTime. For checking\n ifCounterDiscontinuityTime, the interface index is\n required. It can be determined by reading the\n rohcChannelTable.') rohcContextDecompressorRepairs = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 2, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcContextDecompressorRepairs.setDescription('The number of all context repairs so far in this\n context. The number is only valid for decompressor\n contexts, i.e., if rohcInstanceType has the value\n decompressor(2).\n\n Discontinuities in the value of this counter can\n occur at re-initialization of the management\n system, and at other times as indicated by the\n value of ifCounterDiscontinuityTime. For checking\n ifCounterDiscontinuityTime, the interface index is\n required. It can be determined by reading the\n rohcChannelTable.') rohcContextAllPacketsRatio = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 2, 1, 15), RohcCompressionRatio()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcContextAllPacketsRatio.setDescription('This object indicates the compression ratio so far over all\n packets passing this context. The compression is computed\n over all bytes of the IP packets including the IP header\n but excluding all lower layer headers.') rohcContextAllHeadersRatio = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 2, 1, 16), RohcCompressionRatio()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcContextAllHeadersRatio.setDescription('This object indicates the compression ratio so far over all\n packet headers passing this context. The compression is\n computed over all bytes of all headers that are subject to\n compression for the used profile.') rohcContextAllPacketsMeanSize = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 2, 1, 17), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcContextAllPacketsMeanSize.setDescription('This object indicates the mean compressed packet size\n of all packets passing this context. The packet size\n includes the IP header and payload but excludes all lower\n layer headers. The mean value is given in byte rounded\n to the next integer value.') rohcContextAllHeadersMeanSize = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 2, 1, 18), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcContextAllHeadersMeanSize.setDescription('This object indicates the mean compressed packet header size\n of all packets passing this context. The packet header size\n is the sum of the size of all headers of a packet that are\n subject to compression for the used profile. The mean value\n is given in byte rounded to the next integer value.') rohcContextLastPacketsRatio = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 2, 1, 19), RohcCompressionRatio()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcContextLastPacketsRatio.setDescription('This object indicates the compression ratio\n concerning the last 16 packets passing this context\n or concerning all packets passing this context\n if they are less than 16, so far. The compression is\n computed over all bytes of the IP packets including the IP\n header but excluding all lower layer headers.') rohcContextLastHeadersRatio = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 2, 1, 20), RohcCompressionRatio()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcContextLastHeadersRatio.setDescription('This object indicates the compression ratio concerning the\n headers of the last 16 packets passing this context or\n concerning the headers of all packets passing this context\n if they are less than 16, so far. The compression is\n computed over all bytes of all headers that are subject to\n compression for the used profile.') rohcContextLastPacketsMeanSize = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 2, 1, 21), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcContextLastPacketsMeanSize.setDescription('This object indicates the mean compressed packet size\n concerning the last 16 packets passing this context or\n concerning all packets passing this context if they are\n less than 16, so far. The packet size includes the IP\n header and payload but excludes all lower layer headers.\n The mean value is given in byte rounded to the next\n integer value.') rohcContextLastHeadersMeanSize = MibTableColumn((1, 3, 6, 1, 2, 1, 112, 1, 2, 1, 22), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rohcContextLastHeadersMeanSize.setDescription('This object indicates the mean compressed packet header size\n concerning the last 16 packets passing this context or\n concerning all packets passing this context if they are\n less than 16, so far. The packet header size is the sum of\n the size of all headers of a packet that are subject to\n compression for the used profile. The mean value is given\n in byte rounded to the next integer value.') rohcCompliances = MibIdentifier((1, 3, 6, 1, 2, 1, 112, 2, 1)) rohcGroups = MibIdentifier((1, 3, 6, 1, 2, 1, 112, 2, 2)) rohcCompliance = ModuleCompliance((1, 3, 6, 1, 2, 1, 112, 2, 1, 1)).setObjects(*(("ROHC-MIB", "rohcInstanceGroup"), ("ROHC-MIB", "rohcContextGroup"), ("ROHC-MIB", "rohcStatisticsGroup"), ("ROHC-MIB", "rohcTimerGroup"), ("ROHC-MIB", "rohcContextStatisticsGroup"),)) if mibBuilder.loadTexts: rohcCompliance.setDescription('The compliance statement for SNMP entities that implement\n the ROHC-MIB.\n\n Note that compliance with this compliance\n statement requires compliance with the\n ifCompliance3 MODULE-COMPLIANCE statement of the\n IF-MIB (RFC2863).') rohcInstanceGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 112, 2, 2, 2)).setObjects(*(("ROHC-MIB", "rohcChannelType"), ("ROHC-MIB", "rohcChannelFeedbackFor"), ("ROHC-MIB", "rohcChannelDescr"), ("ROHC-MIB", "rohcChannelStatus"), ("ROHC-MIB", "rohcInstanceFBChannelID"), ("ROHC-MIB", "rohcInstanceVendor"), ("ROHC-MIB", "rohcInstanceVersion"), ("ROHC-MIB", "rohcInstanceDescr"), ("ROHC-MIB", "rohcInstanceClockRes"), ("ROHC-MIB", "rohcInstanceMaxCID"), ("ROHC-MIB", "rohcInstanceLargeCIDs"), ("ROHC-MIB", "rohcInstanceMRRU"), ("ROHC-MIB", "rohcInstanceStatus"), ("ROHC-MIB", "rohcProfileVendor"), ("ROHC-MIB", "rohcProfileVersion"), ("ROHC-MIB", "rohcProfileDescr"), ("ROHC-MIB", "rohcProfileNegotiated"),)) if mibBuilder.loadTexts: rohcInstanceGroup.setDescription('A collection of objects providing information about\n ROHC instances, used channels and available profiles.') rohcStatisticsGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 112, 2, 2, 4)).setObjects(*(("ROHC-MIB", "rohcInstanceContextsTotal"), ("ROHC-MIB", "rohcInstanceContextsCurrent"), ("ROHC-MIB", "rohcInstancePackets"), ("ROHC-MIB", "rohcInstanceIRs"), ("ROHC-MIB", "rohcInstanceIRDYNs"), ("ROHC-MIB", "rohcInstanceFeedbacks"), ("ROHC-MIB", "rohcInstanceCompressionRatio"),)) if mibBuilder.loadTexts: rohcStatisticsGroup.setDescription('A collection of objects providing ROHC statistics.') rohcContextGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 112, 2, 2, 5)).setObjects(*(("ROHC-MIB", "rohcContextCIDState"), ("ROHC-MIB", "rohcContextProfile"), ("ROHC-MIB", "rohcContextDecompressorDepth"),)) if mibBuilder.loadTexts: rohcContextGroup.setDescription('A collection of objects providing information about\n ROHC compressor contexts and decompressor contexts.') rohcTimerGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 112, 2, 2, 6)).setObjects(*(("ROHC-MIB", "rohcInstanceContextStorageTime"), ("ROHC-MIB", "rohcContextStorageTime"), ("ROHC-MIB", "rohcContextActivationTime"), ("ROHC-MIB", "rohcContextDeactivationTime"),)) if mibBuilder.loadTexts: rohcTimerGroup.setDescription('A collection of objects providing statistical information\n about ROHC compressor contexts and decompressor contexts.') rohcContextStatisticsGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 112, 2, 2, 7)).setObjects(*(("ROHC-MIB", "rohcContextPackets"), ("ROHC-MIB", "rohcContextIRs"), ("ROHC-MIB", "rohcContextIRDYNs"), ("ROHC-MIB", "rohcContextFeedbacks"), ("ROHC-MIB", "rohcContextDecompressorFailures"), ("ROHC-MIB", "rohcContextDecompressorRepairs"), ("ROHC-MIB", "rohcContextAllPacketsRatio"), ("ROHC-MIB", "rohcContextAllHeadersRatio"), ("ROHC-MIB", "rohcContextAllPacketsMeanSize"), ("ROHC-MIB", "rohcContextAllHeadersMeanSize"), ("ROHC-MIB", "rohcContextLastPacketsRatio"), ("ROHC-MIB", "rohcContextLastHeadersRatio"), ("ROHC-MIB", "rohcContextLastPacketsMeanSize"), ("ROHC-MIB", "rohcContextLastHeadersMeanSize"),)) if mibBuilder.loadTexts: rohcContextStatisticsGroup.setDescription('A collection of objects providing statistical information\n about ROHC compressor contexts and decompressor contexts.') mibBuilder.exportSymbols("ROHC-MIB", rohcProfileVendor=rohcProfileVendor, rohcInstanceEntry=rohcInstanceEntry, rohcContextDecompressorDepth=rohcContextDecompressorDepth, rohcInstanceIRs=rohcInstanceIRs, rohcChannelID=rohcChannelID, rohcContextTable=rohcContextTable, rohcContextDeactivationTime=rohcContextDeactivationTime, rohcInstanceContextsCurrent=rohcInstanceContextsCurrent, rohcInstanceTable=rohcInstanceTable, rohcInstanceMaxCID=rohcInstanceMaxCID, rohcInstanceFBChannelID=rohcInstanceFBChannelID, RohcChannelIdentifierOrZero=RohcChannelIdentifierOrZero, rohcContextFeedbacks=rohcContextFeedbacks, rohcMIB=rohcMIB, rohcTimerGroup=rohcTimerGroup, rohcContextDecompressorRepairs=rohcContextDecompressorRepairs, rohcInstanceContextStorageTime=rohcInstanceContextStorageTime, rohcInstanceGroup=rohcInstanceGroup, RohcCompressionRatio=RohcCompressionRatio, rohcContextPackets=rohcContextPackets, rohcInstanceLargeCIDs=rohcInstanceLargeCIDs, rohcStatisticsGroup=rohcStatisticsGroup, rohcProfileVersion=rohcProfileVersion, rohcContextLastPacketsMeanSize=rohcContextLastPacketsMeanSize, rohcChannelDescr=rohcChannelDescr, rohcObjects=rohcObjects, rohcContextIRs=rohcContextIRs, rohcContextAllHeadersMeanSize=rohcContextAllHeadersMeanSize, rohcInstancePackets=rohcInstancePackets, rohcContextDecompressorFailures=rohcContextDecompressorFailures, rohcCompliances=rohcCompliances, rohcInstanceStatus=rohcInstanceStatus, rohcContextLastPacketsRatio=rohcContextLastPacketsRatio, rohcInstanceVendor=rohcInstanceVendor, rohcContextLastHeadersMeanSize=rohcContextLastHeadersMeanSize, rohcContextProfile=rohcContextProfile, rohcChannelEntry=rohcChannelEntry, rohcInstanceVersion=rohcInstanceVersion, rohcInstanceFeedbacks=rohcInstanceFeedbacks, rohcContextStorageTime=rohcContextStorageTime, rohcContextAllPacketsMeanSize=rohcContextAllPacketsMeanSize, rohcChannelTable=rohcChannelTable, rohcContextActivationTime=rohcContextActivationTime, rohcContextIRDYNs=rohcContextIRDYNs, rohcContextCID=rohcContextCID, rohcInstanceClockRes=rohcInstanceClockRes, rohcContextCIDState=rohcContextCIDState, rohcProfile=rohcProfile, rohcContextLastHeadersRatio=rohcContextLastHeadersRatio, rohcInstanceCompressionRatio=rohcInstanceCompressionRatio, rohcProfileDescr=rohcProfileDescr, rohcGroups=rohcGroups, rohcChannelStatus=rohcChannelStatus, rohcCompliance=rohcCompliance, rohcProfileNegotiated=rohcProfileNegotiated, PYSNMP_MODULE_ID=rohcMIB, RohcChannelIdentifier=RohcChannelIdentifier, rohcProfileEntry=rohcProfileEntry, rohcChannelType=rohcChannelType, rohcContextGroup=rohcContextGroup, rohcInstanceMRRU=rohcInstanceMRRU, rohcInstanceIRDYNs=rohcInstanceIRDYNs, rohcContextEntry=rohcContextEntry, rohcChannelFeedbackFor=rohcChannelFeedbackFor, rohcContextStatisticsGroup=rohcContextStatisticsGroup, rohcContextAllHeadersRatio=rohcContextAllHeadersRatio, rohcProfileTable=rohcProfileTable, rohcConformance=rohcConformance, rohcInstanceType=rohcInstanceType, rohcInstanceContextsTotal=rohcInstanceContextsTotal, rohcInstanceDescr=rohcInstanceDescr, rohcInstanceObjects=rohcInstanceObjects, rohcContextAllPacketsRatio=rohcContextAllPacketsRatio)
246.384146
3,124
0.740144
5,111
40,407
5.850323
0.128351
0.008093
0.011036
0.009498
0.480151
0.43945
0.369887
0.343667
0.312163
0.29484
0
0.040076
0.163239
40,407
163
3,125
247.895706
0.844281
0.007226
0
0.019608
0
0.30719
0.568543
0.033436
0
0
0
0
0
1
0
false
0.065359
0.052288
0
0.104575
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4
a50bf5796e4acbc1519350c7c0f92a9d2b1f20f3
24
py
Python
aldryn_django_cms/__init__.py
vladimir-bezrukov/Aldryn-Django-cms
0edac2ee0d14fada9e960afe99750b343ceeb706
[ "BSD-3-Clause" ]
1
2021-11-04T17:46:35.000Z
2021-11-04T17:46:35.000Z
aldryn_django_cms/__init__.py
vladimir-bezrukov/Aldryn-Django-cms
0edac2ee0d14fada9e960afe99750b343ceeb706
[ "BSD-3-Clause" ]
null
null
null
aldryn_django_cms/__init__.py
vladimir-bezrukov/Aldryn-Django-cms
0edac2ee0d14fada9e960afe99750b343ceeb706
[ "BSD-3-Clause" ]
null
null
null
__version__ = '3.6.0.1'
12
23
0.625
5
24
2.2
1
0
0
0
0
0
0
0
0
0
0
0.190476
0.125
24
1
24
24
0.333333
0
0
0
0
0
0.291667
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
a50cd6a066649f21e84260aa02f2b64721a82778
1,188
py
Python
src/jemo/plugins/base.py
jazzycamel/jemo
172a28cb9c4f75efeaf7640ce6b77d720f6e713e
[ "MIT" ]
null
null
null
src/jemo/plugins/base.py
jazzycamel/jemo
172a28cb9c4f75efeaf7640ce6b77d720f6e713e
[ "MIT" ]
null
null
null
src/jemo/plugins/base.py
jazzycamel/jemo
172a28cb9c4f75efeaf7640ce6b77d720f6e713e
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod from typing import Callable class PluginBase(ABC): def __init__(self, *, name: str, port: int) -> None: self._name = name self._port = port self._latest_action = "off" def __getattribute__(self, name: str) -> Callable: if name in ("on", "off"): success = object.__getattribute__(self, name)() if success is True: self._latest_action = name return lambda: success return object.__getattribute__(self, name) def __repr__(self) -> str: attrs = ", ".join(f"{k}={v!r}" for k, v in self.__dict__.items()) return f"{self.__class__.__name__}({attrs}" @property def port(self) -> int: return self._port @property def name(self) -> str: return self._name @abstractmethod def on(self) -> bool: # pylint:disable=invalid-name pass @abstractmethod def off(self) -> bool: pass def get_state(self) -> str: return self._latest_action def close(self) -> None: pass @property def latest_action(self) -> str: return self._latest_action
24.75
73
0.588384
141
1,188
4.631206
0.340426
0.073507
0.098009
0.078101
0.088821
0.088821
0
0
0
0
0
0
0.29798
1,188
47
74
25.276596
0.782974
0.022727
0
0.277778
0
0
0.044866
0.028473
0
0
0
0
0
1
0.277778
false
0.083333
0.055556
0.111111
0.555556
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
4
eb59a61061f97223ab1d4a63d1d6e26c9e3f3922
64
py
Python
tests/helpers/test_model_interface.py
sebastian-lapuschkin/Quantus
c3b8a9fb2018f34bd89ba38efa2b2b8c38128b3f
[ "MIT" ]
null
null
null
tests/helpers/test_model_interface.py
sebastian-lapuschkin/Quantus
c3b8a9fb2018f34bd89ba38efa2b2b8c38128b3f
[ "MIT" ]
null
null
null
tests/helpers/test_model_interface.py
sebastian-lapuschkin/Quantus
c3b8a9fb2018f34bd89ba38efa2b2b8c38128b3f
[ "MIT" ]
null
null
null
"""No identified need to test model interface functionality."""
32
63
0.765625
8
64
6.125
1
0
0
0
0
0
0
0
0
0
0
0
0.125
64
1
64
64
0.875
0.890625
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
eb9dfa5d0a36f0ca4db0ee5aca27a1643f342549
257
py
Python
matdat/__init__.py
Fumipo-Theta/matdat
cb55acd346acef5f192d71c835b8fbe5c957cc55
[ "BSD-2-Clause" ]
null
null
null
matdat/__init__.py
Fumipo-Theta/matdat
cb55acd346acef5f192d71c835b8fbe5c957cc55
[ "BSD-2-Clause" ]
null
null
null
matdat/__init__.py
Fumipo-Theta/matdat
cb55acd346acef5f192d71c835b8fbe5c957cc55
[ "BSD-2-Clause" ]
null
null
null
from .figure import Figure from .subplot import Subplot from .subplot_time import SubplotTime from .csv_reader import CsvReader, matchCsv from .excel_reader import ExcelReader from .get_path import getFileList, PathList from .save_plot import actionSavePNG
32.125
43
0.848249
35
257
6.085714
0.542857
0.103286
0
0
0
0
0
0
0
0
0
0
0.116732
257
7
44
36.714286
0.938326
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
ebb6654546e2771ea9a8d0a98c2ca7dabc9a83dc
230
py
Python
scrapyu/__init__.py
lin-zone/scrapyu
abcb8eed2ea02121b74017e007c57c0d3762342d
[ "MIT" ]
1
2021-01-05T09:11:42.000Z
2021-01-05T09:11:42.000Z
scrapyu/__init__.py
lin-zone/scrapyu
abcb8eed2ea02121b74017e007c57c0d3762342d
[ "MIT" ]
null
null
null
scrapyu/__init__.py
lin-zone/scrapyu
abcb8eed2ea02121b74017e007c57c0d3762342d
[ "MIT" ]
null
null
null
__version__ = '0.1.12' from ._useragent import UserAgentMiddleware from ._markdown import MarkdownPipeline from ._cookies import FirefoxCookiesMiddleware from ._mongodb import MongoDBPipeline from ._redis import RedisDupeFilter
25.555556
46
0.847826
24
230
7.75
0.666667
0
0
0
0
0
0
0
0
0
0
0.019512
0.108696
230
8
47
28.75
0.887805
0
0
0
0
0
0.026087
0
0
0
0
0
0
1
0
false
0
0.833333
0
0.833333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
ebd3c4127f7770e12f634b24cbfe903d62dc536d
57
py
Python
LUCI/LuciConvenience.py
benjaminvigneron/LUCI
227bb1e0b87aa06012b2809d9af7767a261e0f00
[ "MIT" ]
null
null
null
LUCI/LuciConvenience.py
benjaminvigneron/LUCI
227bb1e0b87aa06012b2809d9af7767a261e0f00
[ "MIT" ]
null
null
null
LUCI/LuciConvenience.py
benjaminvigneron/LUCI
227bb1e0b87aa06012b2809d9af7767a261e0f00
[ "MIT" ]
null
null
null
""" A hodge-podge of convenience functions for luci """
11.4
47
0.701754
8
57
5
1
0
0
0
0
0
0
0
0
0
0
0
0.175439
57
4
48
14.25
0.851064
0.824561
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
ccdd11c45e65428dfc4eae76238a33996803a95a
12,491
py
Python
py/manipulation/props/parametric_object/parametric_object_test.py
LaudateCorpus1/dm_robotics
647bc810788c74972c1684a8d2e4d2dfd2791485
[ "Apache-2.0" ]
null
null
null
py/manipulation/props/parametric_object/parametric_object_test.py
LaudateCorpus1/dm_robotics
647bc810788c74972c1684a8d2e4d2dfd2791485
[ "Apache-2.0" ]
1
2021-10-05T16:07:56.000Z
2021-10-05T16:07:56.000Z
py/manipulation/props/parametric_object/parametric_object_test.py
LaudateCorpus1/dm_robotics
647bc810788c74972c1684a8d2e4d2dfd2791485
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 DeepMind Technologies Limited. # # 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. """Tests for parametric_object.py.""" from absl.testing import absltest from absl.testing import parameterized from dm_robotics.manipulation.props.parametric_object import parametric_object class PropertyTest(parameterized.TestCase): def test_size_mismatch_in_init(self): with self.assertRaises(ValueError): _ = parametric_object.ParametricMinMaxBounds({ 'p': [[0, 255]], 'q': [[0, 255]], 'r': [[1, 2, 3]]}) with self.assertRaises(ValueError): _ = parametric_object.ParametricMinMaxBounds({ 'p': [[0, 255]], 'q': [[0, 255]], 'r': [[1]]}) with self.assertRaises(ValueError): _ = parametric_object.ParametricMinMaxBounds({ 'p': [[0, 255]], 'q': [[0, 255]], 'r': [[]]}) with self.assertRaises(ValueError): _ = parametric_object.ParametricMinMaxBounds({ 'p': [[0, 255]], 'q': [[0, 255]], 'r': []}) def test_check_instance_assertions(self): param_names = ('p', 'q', 'r') param_check = parametric_object.ParametricMinMaxBounds({ 'p': [[0, 255]], 'q': [[0, 255]], 'r': [[0, 255]]}) prop = parametric_object.ParametricProperties(param_names, param_check) prop.check_instance({'p': 122, 'q': 122, 'r': 122}) self.assertEqual(prop._param_names, ('p', 'q', 'r')) reply = prop.check_instance({'p': 500, 'q': 0, 'r': 0}) self.assertEqual(False, reply) reply = prop.check_instance({'p': 0, 'q': -500, 'r': 0}) self.assertEqual(False, reply) param_check = parametric_object.ParametricMinMaxBounds({ 'p': [[0, 255]], 'q': [['p', 'r']], 'r': [[0, 255]]}) prop = parametric_object.ParametricProperties(param_names, param_check) prop.check_instance({'p': 0, 'q': 122, 'r': 255}) reply = prop.check_instance({'p': 0, 'q': 255, 'r': 122}) self.assertEqual(False, reply) reply = prop.check_instance({'p': 122, 'q': 0, 'r': 255}) self.assertEqual(False, reply) with self.assertRaises(ValueError): prop.check_instance({'p': 0, 'q': 255}) param_names = ('p0', 'p1', 'p2') with self.assertRaises(ValueError): param_check = parametric_object.ParametricMinMaxBounds({ 'p0': [[0, 255]], 'p1': [[0, 255]], 'p2': [[0, 255]]}).check_instance def test_get_dict(self): names = ('first', 'second', 'third') checks = parametric_object.ParametricMinMaxBounds({ 'first': [[0, 255]], 'second': [[0, 255]], 'third': [[0, 255]]}) prop = parametric_object.ParametricProperties(names, checks) _ = prop.get_dict('first0_second0_third0') with self.assertRaises(ValueError): _ = prop.get_dict('first0_second0') with self.assertRaises(ValueError): _ = prop.get_dict('first0_second0_fourth0') with self.assertRaises(ValueError): _ = prop.get_dict('first0_second0_') def test_set_types(self): names = ('first', 'second', 'third') types = {'first': parametric_object.ParametersTypes.INTEGER, 'second': parametric_object.ParametersTypes.INTEGER, 'third': parametric_object.ParametersTypes.INTEGER} checks = parametric_object.ParametricMinMaxBounds({ 'first': [[0, 255]], 'second': [[0, 255]], 'third': [[0, 255]]}, types) prop = parametric_object.ParametricProperties(names, checks) reply = prop.check_instance({'first': 0, 'second': 255, 'third': 122}) self.assertEqual(True, reply) reply = prop.check_instance({'first': 0.0, 'second': 0.0, 'third': 0.0}) self.assertEqual(False, reply) prop_shape = parametric_object.ParametricProperties(names, checks) prop_texture = parametric_object.ParametricProperties(names, checks) prop = parametric_object.ParametricObject(prop_shape, prop_texture) reply = prop.check_instance({'first': 0, 'second': 255, 'third': 122}, {'first': 0, 'second': 255, 'third': 122}) self.assertEqual(True, reply) names = ('first', 'second', 'third') types = {'first': parametric_object.ParametersTypes.FLOAT, 'second': parametric_object.ParametersTypes.FLOAT, 'third': parametric_object.ParametersTypes.FLOAT} checks = parametric_object.ParametricMinMaxBounds({ 'first': [[0, 255]], 'second': [[0, 255]], 'third': [[0, 255]]}, types) prop = parametric_object.ParametricProperties(names, checks) _ = prop.check_instance({'first': 0.0, 'second': 0.0, 'third': 0.0}) reply = prop.check_instance({'first': 0, 'second': 255, 'third': 122}) self.assertEqual(False, reply) types = {'first': parametric_object.ParametersTypes.FLOAT, 'second': parametric_object.ParametersTypes.INTEGER, 'third': parametric_object.ParametersTypes.FLOAT} checks = parametric_object.ParametricMinMaxBounds({ 'first': [[0, 255]], 'second': [[0, 255]], 'third': [[0, 255]]}, types) prop = parametric_object.ParametricProperties(names, checks) _ = prop.check_instance({'first': 0.0, 'second': 0, 'third': 0.0}) reply = prop.check_instance({'first': 0, 'second': 255, 'third': 122}) self.assertEqual(False, reply) names = ('p', 'q', 'r') checks = parametric_object.ParametricMinMaxBounds({ 'p': [[0, 255]], 'q': [[0, 255]], 'r': [[0, 255]]}) prop = parametric_object.ParametricProperties(names, checks) _ = prop.check_instance({'p': 0.0, 'q': 0, 'r': 0.0}) _ = prop.check_instance({'p': 0, 'q': 255.0, 'r': 122}) def test_parameters_min_max_tuples(self): # 0 <= p0, p1, p2 <=1 # 3 <= p0, p1, p2 <=4 names = ('first', 'second', 'third') checks = parametric_object.ParametricMinMaxBounds({ 'first': [[0, 1], [3, 4]], 'second': [[0, 1], [3, 4]], 'third': [[0, 1], [3, 4]]}) prop = parametric_object.ParametricProperties(names, checks) _ = prop.check_instance({'first': 0, 'second': 0, 'third': 0}) _ = prop.check_instance({'first': 1, 'second': 1, 'third': 1}) _ = prop.check_instance({'first': 3, 'second': 3, 'third': 3}) _ = prop.check_instance({'first': 4, 'second': 4, 'third': 4}) reply = prop.check_instance({'first': 2, 'second': 2, 'third': 2}) self.assertEqual(False, reply) reply = prop.check_instance({'first': 2, 'second': 3, 'third': 3}) self.assertEqual(False, reply) reply = prop.check_instance({'first': 2, 'second': 3, 'third': 2}) self.assertEqual(False, reply) reply = prop.check_instance({'first': 3, 'second': 3, 'third': 2}) self.assertEqual(False, reply) reply = prop.check_instance({'first': 5, 'second': 3, 'third': 3}) self.assertEqual(False, reply) reply = prop.check_instance({'first': 1, 'second': 3, 'third': 3}) self.assertEqual(False, reply) # if a == 2, 0 <= b <= c, 0 <= c <=10 # if 3 <= a <= 10, 0 <= b <= 10, 0 <= c <=10 names = ('a', 'b', 'c') checks = parametric_object.ParametricMinMaxBounds({ 'a': [[2, 2], [3, 10]], 'b': [[0, 'c'], [0, 10]], 'c': [[0, 10], [0, 10]]}) prop = parametric_object.ParametricProperties(names, checks) # if a == 2, 0 <= b <= c, 0 <= c <=10 # if 3 <= a <= 10, 0 <= b <= 10, 0 <= c <=10 with self.assertRaises(ValueError): checks = parametric_object.ParametricMinMaxBounds({ 'a': [[2, 2], [3, 10]], 'b': [[0, 'c'], [0, 10]], 'c': [[0, 10]]}) _ = prop.check_instance({'a': 2, 'b': 2, 'c': 10}) _ = prop.check_instance({'a': 3, 'b': 5, 'c': 2}) reply = prop.check_instance({'a': 2, 'b': 5, 'c': 2}) self.assertEqual(False, reply) def test_add_parametric_dict(self): a = parametric_object.ParametersDict({'k1': 1, 'k2': 2}) b = parametric_object.ParametersDict({'k1': 3, 'k2': 4}) c = parametric_object.ParametersDict({'k3': 5, 'k4': 6}) d = parametric_object.ParametersDict({'k1': 7, 'k4': 8}) r = a + b self.assertEqual(r['k1'], 4) self.assertEqual(r['k2'], 6) with self.assertRaises(TypeError): r = a + 1 with self.assertRaises(ValueError): r = a + c with self.assertRaises(ValueError): r = a + d def test_sub_parametric_dict(self): a = parametric_object.ParametersDict({'k1': 1, 'k2': 2}) b = parametric_object.ParametersDict({'k1': 3, 'k2': 4}) c = parametric_object.ParametersDict({'k3': 5, 'k4': 6}) d = parametric_object.ParametersDict({'k1': 7, 'k4': 8}) r = a - b self.assertEqual(r['k1'], -2) self.assertEqual(r['k2'], -2) with self.assertRaises(TypeError): r = a - 1 with self.assertRaises(ValueError): r = a - c with self.assertRaises(ValueError): r = a - d def test_mult_parametric_dict(self): a = parametric_object.ParametersDict({'k1': 1, 'k2': 2}) b = parametric_object.ParametersDict({'k1': 3, 'k2': 4}) r = a * 0.5 self.assertEqual(r['k1'], int(a['k1']*1/2)) self.assertEqual(r['k2'], int(a['k2']*1/2)) with self.assertRaises(TypeError): r = a * b with self.assertRaises(TypeError): r = 0.5 * b def test_truediv_parametric_dict(self): a = parametric_object.ParametersDict({'k1': 1, 'k2': 2}) b = parametric_object.ParametersDict({'k1': 3, 'k2': 4}) r = a // 2 self.assertEqual(r['k1'], int(a['k1'] // 2)) self.assertEqual(r['k2'], int(a['k2'] // 2)) with self.assertRaises(TypeError): r = a // b with self.assertRaises(TypeError): r = 0.5 // b def test_types_conversion(self): names = ('first', 'second', 'third') checks = parametric_object.ParametricMinMaxBounds({ 'first': [[0, 255]], 'second': [[0, 255]], 'third': [[0, 255]]}) prop = parametric_object.ParametricProperties(names, checks) dictionary = {'first': 0, 'second': 3, 'third': 2} param_dict = parametric_object.ParametersDict(dictionary) name = prop.get_name(param_dict) self.assertEqual(name, 'first0_second3_third2') dictionary = {'first': 0.0, 'second': 0.1, 'third': 2.0} param_dict = parametric_object.ParametersDict(dictionary) name = prop.get_name(param_dict) self.assertEqual(name, 'first0.0_second0.1_third2.0') dictionary = {'first': 1.0, 'second': 3.0, 'third': 4} param_dict = parametric_object.ParametersDict(dictionary) name = prop.get_name(param_dict) reconstruction = prop.get_dict(name) self.assertEqual(dictionary, reconstruction) def test_types_algebra(self): dictionary = {'first': 0, 'second': 3, 'third': 2} types = (parametric_object.ParametersTypes.INTEGER,)*3 param_dict = parametric_object.ParametersDict(dictionary, param_types=types) param_half = param_dict * 1.1 self.assertAlmostEqual(param_half['first'], 0) self.assertAlmostEqual(param_half['second'], 3) self.assertAlmostEqual(param_half['third'], 2) types = (parametric_object.ParametersTypes.FLOAT,)*3 param_dict = parametric_object.ParametersDict(dictionary, param_types=types) param_half = param_dict * 1.1 self.assertAlmostEqual(param_half['first'], 0) self.assertAlmostEqual(param_half['second'], 3.3) self.assertAlmostEqual(param_half['third'], 2.2) dictionary = {'first': 0, 'second': 3, 'third': 2} types = (parametric_object.ParametersTypes.INTEGER,)*3 param_dict = parametric_object.ParametersDict(dictionary, param_types=types) param_half = param_dict / 3 self.assertAlmostEqual(param_half['first'], 0) self.assertAlmostEqual(param_half['second'], int(3/3)) self.assertAlmostEqual(param_half['third'], int(2/3)) types = (parametric_object.ParametersTypes.FLOAT,)*3 param_dict = parametric_object.ParametersDict(dictionary, param_types=types) param_half = param_dict / 3 self.assertAlmostEqual(param_half['first'], 0) self.assertAlmostEqual(param_half['second'], float(3/3)) self.assertAlmostEqual(param_half['third'], float(2/3)) if __name__ == '__main__': absltest.main()
41.636667
80
0.629173
1,558
12,491
4.903081
0.105905
0.134049
0.064537
0.048959
0.807566
0.775101
0.737138
0.693415
0.67679
0.608195
0
0.052193
0.193179
12,491
299
81
41.77592
0.705795
0.063966
0
0.558333
0
0
0.081076
0.007799
0
0
0
0
0.254167
1
0.045833
false
0
0.0125
0
0.0625
0
0
0
0
null
0
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
ccdea5fc87e2dce7da82287cb335d1d1997b89b2
125
py
Python
barbearia/email_config.py
FabioMarquesArao/OPE_BARBEARIA
867e7d4b67d9d70b6056b2d817cd3d2561ca7131
[ "MIT" ]
null
null
null
barbearia/email_config.py
FabioMarquesArao/OPE_BARBEARIA
867e7d4b67d9d70b6056b2d817cd3d2561ca7131
[ "MIT" ]
null
null
null
barbearia/email_config.py
FabioMarquesArao/OPE_BARBEARIA
867e7d4b67d9d70b6056b2d817cd3d2561ca7131
[ "MIT" ]
null
null
null
EMAIL_ADDRESS = 'domfigarobarbearia@gmail.com' EMAIL_PASSWORD = 'barbeariadomfigaro' HEROKU_PASSWORD = "Barbeariadomfigaro!"
31.25
46
0.832
11
125
9.181818
0.727273
0.514851
0
0
0
0
0
0
0
0
0
0
0.072
125
4
47
31.25
0.87069
0
0
0
0
0
0.515873
0.222222
0
0
0
0
0
1
0
false
0.666667
0
0
0
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4
ccfb1aaf66833ea1e34ee0d93d00ff4476230fb8
4,890
py
Python
tests/test_filesystem_paths.py
NinjasCL-archive/masonite-fs
333c11d19927f9cf371d12bb87af88b0ca3dd698
[ "MIT" ]
2
2018-08-18T01:15:33.000Z
2018-08-18T17:28:08.000Z
tests/test_filesystem_paths.py
NinjasCL-archive/masonite-fs
333c11d19927f9cf371d12bb87af88b0ca3dd698
[ "MIT" ]
null
null
null
tests/test_filesystem_paths.py
NinjasCL-archive/masonite-fs
333c11d19927f9cf371d12bb87af88b0ca3dd698
[ "MIT" ]
null
null
null
# coding: utf-8 from the import expect from filesystem import paths from filesystem.paths import root class TestFilesystemPaths: def setup_method(self): pass def test_that_root_exists(self): expect(paths.ROOT).to.be.NOT.empty def test_that_app_is_correct(self): expect(paths.APP).to.be.eq('/app') def test_that_app_http_is_correct(self): expect(paths.APP_HTTP).to.be.eq('/app/http') def test_that_app_http_controllers_is_correct(self): expect(paths.APP_HTTP_CONTROLLERS).to.be.eq('/app/http/controllers') def test_that_app_http_middleware_is_correct(self): expect(paths.APP_HTTP_MIDDLEWARE).to.be.eq('/app/http/middleware') def test_that_app_providers_is_correct(self): expect(paths.APP_PROVIDERS).to.be.eq('/app/providers') def test_that_bootstrap_is_correct(self): expect(paths.BOOTSTRAP).to.be.eq('/bootstrap') def test_that_bootstrap_cache_is_correct(self): expect(paths.BOOTSTRAP_CACHE).to.be.eq('/bootstrap/cache') def test_that_config_is_correct(self): expect(paths.CONFIG).to.be.eq('/config') def test_that_databases_is_correct(self): expect(paths.DATABASES).to.be.eq('/databases') def test_that_databases_migrations_is_correct(self): expect(paths.DATABASES_MIGRATIONS).to.be.eq('/databases/migrations') def test_that_resources_is_correct(self): expect(paths.RESOURCES).to.be.eq('/resources') def test_that_resources_templates_is_correct(self): expect(paths.RESOURCES_TEMPLATES).to.be.eq('/resources/templates') def test_that_resources_snippets_is_correct(self): expect(paths.RESOURCES_SNIPPETS).to.be.eq('/resources/snippets') def test_that_routes_is_correct(self): expect(paths.ROUTES).to.be.eq('/routes') def test_that_storage_is_correct(self): expect(paths.STORAGE).to.be.eq('/storage') def test_that_storage_compiled_is_correct(self): expect(paths.STORAGE_COMPILED).to.be.eq('/storage/compiled') def test_that_storage_static_is_correct(self): expect(paths.STORAGE_STATIC).to.be.eq('/storage/static') def test_that_storage_uploads_is_correct(self): expect(paths.STORAGE_UPLOADS).to.be.eq('/storage/uploads') def test_that_tests_is_correct(self): expect(paths.TESTS).to.be.eq('/tests') # root paths def test_that_root_app_is_correct(self): expect(root.APP).to.be.eq(paths.ROOT + paths.APP) def test_that_root_app_http_is_correct(self): expect(root.APP_HTTP).to.be.eq(paths.ROOT + paths.APP_HTTP) def test_that_root_app_http_controllers_is_correct(self): expect(root.APP_HTTP_CONTROLLERS).to.be.eq(paths.ROOT + paths.APP_HTTP_CONTROLLERS) def test_that_root_app_http_middleware_is_correct(self): expect(root.APP_HTTP_MIDDLEWARE).to.be.eq(paths.ROOT + paths.APP_HTTP_MIDDLEWARE) def test_that_root_app_providers_is_correct(self): expect(root.APP_PROVIDERS).to.be.eq(paths.ROOT + paths.APP_PROVIDERS) def test_that_root_bootstrap_is_correct(self): expect(root.BOOTSTRAP).to.be.eq(paths.ROOT + paths.BOOTSTRAP) def test_that_root_bootstrap_cache_is_correct(self): expect(root.BOOTSTRAP_CACHE).to.be.eq(paths.ROOT + paths.BOOTSTRAP_CACHE) def test_that_root_config_is_correct(self): expect(root.CONFIG).to.be.eq(paths.ROOT + paths.CONFIG) def test_that_root_databases_is_correct(self): expect(root.DATABASES).to.be.eq(paths.ROOT + paths.DATABASES) def test_that_root_databases_migrations_is_correct(self): expect(root.DATABASES_MIGRATIONS).to.be.eq(paths.ROOT + paths.DATABASES_MIGRATIONS) def test_that_root_resources_is_correct(self): expect(root.RESOURCES).to.be.eq(paths.ROOT + paths.RESOURCES) def test_that_root_resources_templates_is_correct(self): expect(root.RESOURCES_TEMPLATES).to.be.eq(paths.ROOT + paths.RESOURCES_TEMPLATES) def test_that_root_resources_snippets_is_correct(self): expect(root.RESOURCES_SNIPPETS).to.be.eq(paths.ROOT + paths.RESOURCES_SNIPPETS) def test_that_root_routes_is_correct(self): expect(root.ROUTES).to.be.eq(paths.ROOT + paths.ROUTES) def test_that_root_storage_is_correct(self): expect(root.STORAGE).to.be.eq(paths.ROOT + paths.STORAGE) def test_that_root_storage_compiled_is_correct(self): expect(root.STORAGE_COMPILED).to.be.eq(paths.ROOT + paths.STORAGE_COMPILED) def test_that_root_storage_static_is_correct(self): expect(root.STORAGE_STATIC).to.be.eq(paths.ROOT + paths.STORAGE_STATIC) def test_that_root_storage_uploads_is_correct(self): expect(root.STORAGE_UPLOADS).to.be.eq(paths.ROOT + paths.STORAGE_UPLOADS) def test_that_root_tests_is_correct(self): expect(root.TESTS).to.be.eq(paths.ROOT + paths.TESTS)
37.045455
91
0.740082
724
4,890
4.667127
0.063536
0.080793
0.126961
0.213673
0.872152
0.592483
0.204498
0.023972
0
0
0
0.000239
0.144581
4,890
131
92
37.328244
0.807554
0.004908
0
0
0
0
0.051409
0.008637
0
0
0
0
0
1
0.47619
false
0.011905
0.035714
0
0.52381
0
0
0
0
null
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
6913dde4acd202b7bb00fc51376d6dcff16b4ba7
100
py
Python
q025.py
sjf/project_euler
8514710e2018136ba8a087ae58cba35370700f6f
[ "MIT" ]
null
null
null
q025.py
sjf/project_euler
8514710e2018136ba8a087ae58cba35370700f6f
[ "MIT" ]
null
null
null
q025.py
sjf/project_euler
8514710e2018136ba8a087ae58cba35370700f6f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 f=1 fprev=1 n=2 while f < 10**999: f,fprev = f + fprev,f n += 1 print(n)
11.111111
23
0.58
23
100
2.521739
0.565217
0.206897
0.241379
0
0
0
0
0
0
0
0
0.128205
0.22
100
9
24
11.111111
0.615385
0.21
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.142857
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
69157e91f425c2893ef06beb1c157d48d39855f1
198
py
Python
docsie_universal_importer/providers/google_cloud_storage/urls.py
Zarif99/test-universal
062972ed64d9f048de702ab1edf4025cffca2abb
[ "BSD-3-Clause" ]
null
null
null
docsie_universal_importer/providers/google_cloud_storage/urls.py
Zarif99/test-universal
062972ed64d9f048de702ab1edf4025cffca2abb
[ "BSD-3-Clause" ]
null
null
null
docsie_universal_importer/providers/google_cloud_storage/urls.py
Zarif99/test-universal
062972ed64d9f048de702ab1edf4025cffca2abb
[ "BSD-3-Clause" ]
null
null
null
from docsie_universal_importer.providers.base.urls import default_urlpatterns from .import_provider import GoogleCloudStorageProvider urlpatterns = default_urlpatterns(GoogleCloudStorageProvider)
33
77
0.89899
19
198
9.105263
0.631579
0.208092
0
0
0
0
0
0
0
0
0
0
0.065657
198
5
78
39.6
0.935135
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.666667
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
0
0
0
4
691961c351775c6d1643e0e7e934a4b430e01308
35
py
Python
tests/__init__.py
anrputina/oadds
f2e058f48a9edfbdd9ee7229b4f303cdd4543190
[ "MIT" ]
5
2020-12-25T19:38:32.000Z
2021-06-12T20:39:05.000Z
tests/__init__.py
anrputina/ods-anomalydetection
f2e058f48a9edfbdd9ee7229b4f303cdd4543190
[ "MIT" ]
63
2020-08-04T12:08:09.000Z
2020-10-09T12:08:09.000Z
tests/__init__.py
anrputina/ods-anomalydetection
f2e058f48a9edfbdd9ee7229b4f303cdd4543190
[ "MIT" ]
null
null
null
"""Unit test package for oadds."""
17.5
34
0.657143
5
35
4.6
1
0
0
0
0
0
0
0
0
0
0
0
0.142857
35
1
35
35
0.766667
0.8
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
15c48e2d345be8eb45daabb4d97935eaab12b990
17,156
py
Python
tests/commons/big_query/copy_job_async/copy_job/test_copy_job_service.py
Morgenz/bbq
f0fd3f626841c610aee80ad08a61123b7cccb775
[ "Apache-2.0" ]
41
2018-05-08T11:54:37.000Z
2022-02-09T21:19:17.000Z
tests/commons/big_query/copy_job_async/copy_job/test_copy_job_service.py
Morgenz/bbq
f0fd3f626841c610aee80ad08a61123b7cccb775
[ "Apache-2.0" ]
139
2018-06-07T13:45:21.000Z
2021-04-30T20:44:06.000Z
tests/commons/big_query/copy_job_async/copy_job/test_copy_job_service.py
Morgenz/bbq
f0fd3f626841c610aee80ad08a61123b7cccb775
[ "Apache-2.0" ]
5
2019-09-11T12:28:24.000Z
2022-02-04T21:38:29.000Z
import unittest from apiclient.errors import HttpError from google.appengine.ext import testbed, ndb from mock import patch, Mock from src.commons.big_query.copy_job_async.copy_job.copy_job_request \ import CopyJobRequest from src.commons.big_query.copy_job_async.copy_job.copy_job_service \ import CopyJobService from src.commons.big_query.copy_job_async.post_copy_action_request import \ PostCopyActionRequest from src.commons.big_query.copy_job_async.result_check.result_check_request \ import ResultCheckRequest from src.commons.big_query.copy_job_async.task_creator import TaskCreator from src.commons.big_query.big_query import BigQuery from src.commons.big_query.big_query_job_reference import BigQueryJobReference from src.commons.big_query.big_query_table import BigQueryTable class TestCopyJobService(unittest.TestCase): def setUp(self): self.testbed = testbed.Testbed() self.testbed.activate() ndb.get_context().clear_cache() patch('googleapiclient.discovery.build').start() patch( 'oauth2client.client.GoogleCredentials.get_application_default') \ .start() self._create_http = patch.object(BigQuery, '_create_http').start() self.example_source_bq_table = BigQueryTable('source_project_id_1', 'source_dataset_id_1', 'source_table_id_1') self.example_target_bq_table = BigQueryTable('target_project_id_1', 'target_dataset_id_1', 'target_table_id_1') def tearDown(self): patch.stopall() self.testbed.deactivate() @patch.object(BigQuery, 'insert_job', return_value=BigQueryJobReference( project_id='test_project', job_id='job123', location='EU')) @patch.object(TaskCreator, 'create_copy_job_result_check') def test_that_post_copy_action_request_is_passed( self, create_copy_job_result_check, _): # given post_copy_action_request = \ PostCopyActionRequest(url='/my/url', data={'key1': 'value1'}) # when CopyJobService().run_copy_job_request( CopyJobRequest( task_name_suffix='task_name_suffix', copy_job_type_id='test-process', source_big_query_table=self.example_source_bq_table, target_big_query_table=self.example_target_bq_table, create_disposition="CREATE_IF_NEEDED", write_disposition="WRITE_EMPTY", retry_count=0, post_copy_action_request=post_copy_action_request ) ) # then create_copy_job_result_check.assert_called_once_with( ResultCheckRequest( task_name_suffix='task_name_suffix', copy_job_type_id='test-process', job_reference=BigQueryJobReference( project_id='test_project', job_id='job123', location='EU'), retry_count=0, post_copy_action_request=post_copy_action_request ) ) @patch.object(BigQuery, 'insert_job', return_value=BigQueryJobReference( project_id='test_project', job_id='job123', location='EU')) @patch.object(TaskCreator, 'create_copy_job_result_check') def test_that_create_and_write_disposition_are_passed_to_result_check( self, create_copy_job_result_check, _): # given create_disposition = "SOME_CREATE_DISPOSITION" write_disposition = "SOME_WRITE_DISPOSITION" # when CopyJobService().run_copy_job_request( CopyJobRequest( task_name_suffix='task_name_suffix', copy_job_type_id='test-process', source_big_query_table=self.example_source_bq_table, target_big_query_table=self.example_target_bq_table, create_disposition=create_disposition, write_disposition=write_disposition, retry_count=0, post_copy_action_request=None ) ) # then create_copy_job_result_check.assert_called_once_with( ResultCheckRequest( task_name_suffix='task_name_suffix', copy_job_type_id='test-process', job_reference=BigQueryJobReference( project_id='test_project', job_id='job123', location='EU'), retry_count=0, post_copy_action_request=None ) ) @patch.object(BigQuery, 'insert_job') @patch('time.sleep', side_effect=lambda _: None) def test_that_copy_table_should_throw_error_after_exception_not_being_http_error_thrown_on_copy_job_creation( self, _, insert_job): # given error_message = 'test exception' insert_job.side_effect = Exception(error_message) request = CopyJobRequest( task_name_suffix=None, copy_job_type_id=None, source_big_query_table=self.example_source_bq_table, target_big_query_table=self.example_target_bq_table, create_disposition="CREATE_IF_NEEDED", write_disposition="WRITE_EMPTY" ) # when with self.assertRaises(Exception) as context: CopyJobService().run_copy_job_request(request) # then self.assertTrue(error_message in context.exception) @patch.object(BigQuery, 'insert_job') @patch('time.sleep', side_effect=lambda _: None) def test_that_copy_table_should_throw_unhandled_errors(self, _, insert_job): # given exception = HttpError(Mock(status=500), 'internal error') exception._get_reason = Mock(return_value='internal error') insert_job.side_effect = exception request = CopyJobRequest( task_name_suffix=None, copy_job_type_id=None, source_big_query_table=self.example_source_bq_table, target_big_query_table=self.example_target_bq_table, create_disposition="CREATE_IF_NEEDED", write_disposition="WRITE_EMPTY" ) # when with self.assertRaises(HttpError) as context: CopyJobService().run_copy_job_request(request) # then self.assertEqual(context.exception, exception) @patch.object(BigQuery, 'insert_job') @patch.object(TaskCreator, 'create_post_copy_action') def test_that_copy_table_should_create_correct_post_copy_action_if_404_http_error_thrown_on_copy_job_creation( self, create_post_copy_action, insert_job): # given error = HttpError(Mock(status=404), 'not found') error._get_reason = Mock(return_value='not found') insert_job.side_effect = error post_copy_action_request = PostCopyActionRequest(url='/my/url', data={'key1': 'value1'}) request = CopyJobRequest( task_name_suffix='task_name_suffix', copy_job_type_id='test-process', source_big_query_table=self.example_source_bq_table, target_big_query_table=self.example_target_bq_table, create_disposition="CREATE_IF_NEEDED", write_disposition="WRITE_EMPTY", retry_count=0, post_copy_action_request=post_copy_action_request ) # when CopyJobService().run_copy_job_request(request) # then create_post_copy_action.assert_called_once_with( copy_job_type_id='test-process', post_copy_action_request=post_copy_action_request, job_json={ 'status': { 'state': 'DONE', 'errors': [ { 'reason': 'Invalid', 'message': ( "404 while creating Copy Job from {} to {}".format( self.example_source_bq_table, self.example_target_bq_table)) } ] }, 'configuration': { 'copy': { 'sourceTable': { 'projectId': self.example_source_bq_table.get_project_id(), 'tableId': self.example_source_bq_table.get_table_id(), 'datasetId': self.example_source_bq_table.get_dataset_id() }, 'destinationTable': { 'projectId': self.example_target_bq_table.get_project_id(), 'tableId': self.example_target_bq_table.get_table_id(), 'datasetId': self.example_target_bq_table.get_dataset_id() } } } } ) @patch.object(BigQuery, 'insert_job') @patch.object(TaskCreator, 'create_post_copy_action') def test_that_copy_table_should_create_correct_post_copy_action_if_access_denied_http_error_thrown_on_copy_job_creation( self, create_post_copy_action, insert_job): # given http_error_content = "{\"error\": " \ " {\"errors\": [" \ " {\"reason\": \"Access Denied\"," \ " \"message\": \"Access Denied\"," \ " \"location\": \"US\"" \ " }]," \ " \"code\": 403," \ " \"message\": \"Access Denied\"}}" insert_job.side_effect = HttpError(Mock(status=403), http_error_content) post_copy_action_request = PostCopyActionRequest(url='/my/url', data={ 'key1': 'value1'}) request = CopyJobRequest( task_name_suffix='task_name_suffix', copy_job_type_id='test-process', source_big_query_table=self.example_source_bq_table, target_big_query_table=self.example_target_bq_table, create_disposition="CREATE_IF_NEEDED", write_disposition="WRITE_EMPTY", retry_count=0, post_copy_action_request=post_copy_action_request ) # when CopyJobService().run_copy_job_request(request) # then create_post_copy_action.assert_called_once_with( copy_job_type_id='test-process', post_copy_action_request=post_copy_action_request, job_json={ 'status': { 'state': 'DONE', 'errors': [ { 'reason': 'Invalid', 'message': ( "Access Denied while creating Copy Job from {} to {}".format( self.example_source_bq_table, self.example_target_bq_table)) } ] }, 'configuration': { 'copy': { 'sourceTable': { 'projectId': self.example_source_bq_table.get_project_id(), 'tableId': self.example_source_bq_table.get_table_id(), 'datasetId': self.example_source_bq_table.get_dataset_id() }, 'destinationTable': { 'projectId': self.example_target_bq_table.get_project_id(), 'tableId': self.example_target_bq_table.get_table_id(), 'datasetId': self.example_target_bq_table.get_dataset_id() } } } } ) @patch.object(BigQuery, 'get_job') @patch.object(BigQuery, 'insert_job') @patch.object(TaskCreator, 'create_copy_job_result_check') def test_that_copy_table_will_try_to_wait_if_deadline_exceeded( self, create_copy_job_result_check, insert_job, get_job): # given http_error_content = "{\"error\": " \ " {\"errors\": [" \ " {\"reason\": \"Deadline exceeded\"," \ " \"message\": \"Deadline exceeded\"," \ " \"location\": \"US\"" \ " }]," \ " \"code\": 500," \ " \"message\": \"Deadline exceeded\"}}" successful_job_json = { 'status': { 'state': 'DONE' }, 'jobReference': { 'projectId': self.example_target_bq_table.get_project_id(), 'location': 'EU', 'jobId': 'job123', }, 'configuration': { 'copy': { 'sourceTable': { 'projectId': self.example_source_bq_table.get_project_id(), 'tableId': self.example_source_bq_table.get_table_id(), 'datasetId': self.example_source_bq_table.get_dataset_id() }, 'destinationTable': { 'projectId': self.example_target_bq_table.get_project_id(), 'tableId': self.example_target_bq_table.get_table_id(), 'datasetId': self.example_target_bq_table.get_dataset_id() } } } } insert_job.side_effect = HttpError(Mock(status=500), http_error_content) get_job.return_value = successful_job_json request = CopyJobRequest( task_name_suffix='task_name_suffix', copy_job_type_id='test-process', source_big_query_table=self.example_source_bq_table, target_big_query_table=self.example_target_bq_table, create_disposition="CREATE_IF_NEEDED", write_disposition="WRITE_EMPTY", retry_count=0, post_copy_action_request=None ) # when CopyJobService().run_copy_job_request(request) # then create_copy_job_result_check.assert_called_once_with( ResultCheckRequest( task_name_suffix='task_name_suffix', copy_job_type_id='test-process', job_reference=BigQueryJobReference( project_id=self.example_target_bq_table.get_project_id(), job_id='job123', location='EU' ), retry_count=0, post_copy_action_request=None ) ) @patch('src.commons.big_query.big_query_table_metadata.BigQueryTableMetadata') @patch.object(TaskCreator, 'create_copy_job_result_check') @patch.object(CopyJobService, '_create_random_job_id', return_value='random_job_123') @patch.object(BigQuery, 'insert_job', side_effect=[HttpError(Mock(status=503), 'internal error'), HttpError(Mock(status=409), 'job exists')]) @patch('time.sleep', side_effect=lambda _: None) def test_bug_regression_job_already_exists_after_internal_error( self, _, insert_job, _create_random_job_id, create_copy_job_result_check, table_metadata ): # given post_copy_action_request = \ PostCopyActionRequest(url='/my/url', data={'key1': 'value1'}) table_metadata._BigQueryTableMetadata__get_table_or_partition.return_value.get_location.return_value='EU' # when CopyJobService().run_copy_job_request( CopyJobRequest( task_name_suffix='task_name_suffix', copy_job_type_id='test-process', source_big_query_table=self.example_source_bq_table, target_big_query_table=self.example_target_bq_table, create_disposition="CREATE_IF_NEEDED", write_disposition="WRITE_EMPTY", retry_count=0, post_copy_action_request=post_copy_action_request ) ) # then self.assertEqual(insert_job.call_count, 2) create_copy_job_result_check.assert_called_once_with( ResultCheckRequest( task_name_suffix='task_name_suffix', copy_job_type_id='test-process', job_reference=BigQueryJobReference( project_id='target_project_id_1', job_id='random_job_123', location='EU'), retry_count=0, post_copy_action_request=post_copy_action_request ) )
42.152334
124
0.570354
1,684
17,156
5.328385
0.108076
0.037446
0.053048
0.060849
0.772206
0.747019
0.743898
0.708347
0.671124
0.654519
0
0.007199
0.344136
17,156
406
125
42.256158
0.79026
0.007403
0
0.585014
0
0
0.120214
0.022584
0
0
0
0
0.0317
1
0.028818
false
0.005764
0.034582
0
0.066282
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
15caae15c5cee5107dd04fd63976ca50c1febedb
79
py
Python
braandket/kernel/__init__.py
ZhengKeli/BraAndKet
f47cdbdb4c5040dd071815378138ac376c205f14
[ "MIT" ]
1
2022-01-13T13:18:41.000Z
2022-01-13T13:18:41.000Z
braandket/kernel/__init__.py
ZhengKeli/BraAndKet
f47cdbdb4c5040dd071815378138ac376c205f14
[ "MIT" ]
null
null
null
braandket/kernel/__init__.py
ZhengKeli/BraAndKet
f47cdbdb4c5040dd071815378138ac376c205f14
[ "MIT" ]
2
2020-11-06T20:16:13.000Z
2020-12-01T12:56:03.000Z
from .abstract import Kernel from .auto import AutoKernel from .numpy import *
19.75
28
0.797468
11
79
5.727273
0.636364
0
0
0
0
0
0
0
0
0
0
0
0.151899
79
3
29
26.333333
0.940299
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
15fe23beb9c7568305a1094a355c8b8ff59b537e
294
py
Python
arc/setupc.py
m-schleier/ARC-Alkali-Rydberg-Calculator
eabba3bc9ac2e37ba3a8dbba18d39771dcbbb9fd
[ "BSD-3-Clause" ]
53
2016-12-13T11:57:07.000Z
2022-03-23T20:25:36.000Z
arc/setupc.py
m-schleier/ARC-Alkali-Rydberg-Calculator
eabba3bc9ac2e37ba3a8dbba18d39771dcbbb9fd
[ "BSD-3-Clause" ]
78
2016-12-21T11:56:03.000Z
2022-03-15T21:01:30.000Z
arc/setupc.py
m-schleier/ARC-Alkali-Rydberg-Calculator
eabba3bc9ac2e37ba3a8dbba18d39771dcbbb9fd
[ "BSD-3-Clause" ]
39
2016-12-20T07:17:50.000Z
2022-03-02T17:27:44.000Z
from distutils.core import setup, Extension from numpy.distutils.misc_util import get_numpy_include_dirs setup(ext_modules=[Extension("arc_c_extensions", ["arc_c_extensions.c"], extra_compile_args = ['-Wall', '-O3'], include_dirs=get_numpy_include_dirs())])
42
72
0.707483
38
294
5.078947
0.578947
0.170984
0.15544
0.196891
0
0
0
0
0
0
0
0.004132
0.176871
294
6
73
49
0.793388
0
0
0
0
0
0.142857
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
c62dbdcf249b0771af08bd01ce1cb984ad5302f1
81
py
Python
Dog_model/Dog/apps.py
cs-fullstack-2019-fall/django-models-cw-Deltonjr2
3fc667bed19201b75016798bd367d0bde9cb6c00
[ "Apache-2.0" ]
null
null
null
Dog_model/Dog/apps.py
cs-fullstack-2019-fall/django-models-cw-Deltonjr2
3fc667bed19201b75016798bd367d0bde9cb6c00
[ "Apache-2.0" ]
null
null
null
Dog_model/Dog/apps.py
cs-fullstack-2019-fall/django-models-cw-Deltonjr2
3fc667bed19201b75016798bd367d0bde9cb6c00
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class DogConfig(AppConfig): name = 'Dog'
13.5
33
0.728395
10
81
5.9
0.9
0
0
0
0
0
0
0
0
0
0
0
0.185185
81
5
34
16.2
0.893939
0
0
0
0
0
0.037037
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
c6568e3f6207ae8a99ee488f843417b0e24ee7fa
255
py
Python
auth/serializers.py
sling254/the-hood
ce169abbdc368e1a7e92896abdf8237136456290
[ "MIT" ]
null
null
null
auth/serializers.py
sling254/the-hood
ce169abbdc368e1a7e92896abdf8237136456290
[ "MIT" ]
null
null
null
auth/serializers.py
sling254/the-hood
ce169abbdc368e1a7e92896abdf8237136456290
[ "MIT" ]
null
null
null
from rest_framework import serializers from hood.models import UserProfile class UserProfileSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = UserProfile fields = ('bio', 'birth_date','picture','email','picture')
36.428571
68
0.752941
25
255
7.6
0.76
0
0
0
0
0
0
0
0
0
0
0
0.152941
255
7
69
36.428571
0.87963
0
0
0
0
0
0.125
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
d67252401050d3b5004b1ab15ef96c5d2e1fedcf
76
py
Python
tests/app/controller/webhook/github/events/__init__.py
angeleneleow/rocket2
649f49a94d123e78bfd014189e8fede31fa007f6
[ "MIT" ]
null
null
null
tests/app/controller/webhook/github/events/__init__.py
angeleneleow/rocket2
649f49a94d123e78bfd014189e8fede31fa007f6
[ "MIT" ]
null
null
null
tests/app/controller/webhook/github/events/__init__.py
angeleneleow/rocket2
649f49a94d123e78bfd014189e8fede31fa007f6
[ "MIT" ]
null
null
null
"""Contain the tests for the handlers of each supported GitHub webhook."""
38
75
0.75
11
76
5.181818
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.157895
76
1
76
76
0.890625
0.894737
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
d67ed600e6c41963e2d457d2e537a8860f022e80
1,292
py
Python
models/base.py
IlyaBizyaev/Im2Vec
4fff000c84500c6e977c502519497e27e1f946f2
[ "Apache-2.0" ]
null
null
null
models/base.py
IlyaBizyaev/Im2Vec
4fff000c84500c6e977c502519497e27e1f946f2
[ "Apache-2.0" ]
null
null
null
models/base.py
IlyaBizyaev/Im2Vec
4fff000c84500c6e977c502519497e27e1f946f2
[ "Apache-2.0" ]
null
null
null
from abc import abstractmethod from typing import Any, List import torch def interpolate_vectors(v1: torch.Tensor, v2: torch.Tensor, n: int) -> torch.Tensor: step = (v2 - v1) / (n - 1) return torch.stack([v1 + i * step for i in range(n)], dim=0) def reparameterize(mu: torch.Tensor, log_var: torch.Tensor) -> torch.Tensor: """ Reparameterization trick to sample from N(mu, var) from N(0,1). :param mu: (Tensor) Mean of the latent Gaussian [B x D] :param log_var: (Tensor) Standard deviation of the latent Gaussian [B x D] :return: (Tensor) [B x D] """ std = torch.exp(0.5 * log_var) eps = torch.randn_like(std) return eps * std + mu class BaseVAE(torch.nn.Module): def __init__(self) -> None: super(BaseVAE, self).__init__() def encode(self, inp: torch.Tensor) -> (torch.Tensor, torch.Tensor): raise NotImplementedError def decode(self, inp: torch.Tensor) -> torch.Tensor: raise NotImplementedError def generate(self, x: torch.Tensor, **kwargs) -> torch.Tensor: raise NotImplementedError @abstractmethod def forward(self, *inputs: torch.Tensor) -> List[torch.Tensor]: pass @abstractmethod def loss_function(self, *inputs: Any, **kwargs) -> dict: pass
28.711111
84
0.648607
177
1,292
4.655367
0.40678
0.200243
0.07767
0.106796
0.20267
0.20267
0.17233
0
0
0
0
0.011
0.226006
1,292
44
85
29.363636
0.813
0.170279
0
0.28
0
0
0
0
0
0
0
0
0
1
0.32
false
0.08
0.12
0
0.56
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
4
d6a8edcb5b2dcf22573395513ba3203eee17a175
15
py
Python
assist/__init__.py
jmlopez-rod/assist
6fb1c76dc3b0dc441faa7347285343e2e529651a
[ "BSD-2-Clause" ]
1
2015-10-30T23:33:11.000Z
2015-10-30T23:33:11.000Z
assist/__init__.py
jmlopez-rod/assist
6fb1c76dc3b0dc441faa7347285343e2e529651a
[ "BSD-2-Clause" ]
null
null
null
assist/__init__.py
jmlopez-rod/assist
6fb1c76dc3b0dc441faa7347285343e2e529651a
[ "BSD-2-Clause" ]
null
null
null
"""Assist """
3.75
9
0.4
1
15
6
1
0
0
0
0
0
0
0
0
0
0
0
0.2
15
3
10
5
0.5
0.4
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
d6cc317a27628be12980edb90d20e0b73593f693
205
py
Python
data/copy_license.py
dashingsoft/pyarmor-server
8ac1995d3a0b4ca4592a2a9fa255a7a420f36bc7
[ "MIT" ]
28
2020-07-02T22:12:32.000Z
2022-03-30T03:21:34.000Z
data/copy_license.py
dashingsoft/pyarmor-server
8ac1995d3a0b4ca4592a2a9fa255a7a420f36bc7
[ "MIT" ]
3
2020-03-09T09:43:48.000Z
2020-10-19T05:23:37.000Z
data/copy_license.py
dashingsoft/pyarmor-server
8ac1995d3a0b4ca4592a2a9fa255a7a420f36bc7
[ "MIT" ]
13
2020-04-27T13:31:00.000Z
2022-01-16T05:49:06.000Z
import sys from os.path import join, dirname with open(join(dirname(sys.executable), 'license.lic'), 'rb') as fs: with open(join(sys._MEIPASS, 'license.lic'), 'wb') as fd: fd.write(fs.read())
29.285714
68
0.663415
33
205
4.090909
0.606061
0.162963
0.177778
0
0
0
0
0
0
0
0
0
0.160976
205
6
69
34.166667
0.784884
0
0
0
0
0
0.127451
0
0
0
0
0
0
1
0
true
0.2
0.4
0
0.4
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
0
0
0
4
d6e578f9bf5ed9349829616902ed52c6a3a8e2e9
177
py
Python
get_version.py
sbacchio/tuneit
8d4771acbb56e07336e2aae66160a1f62777cb01
[ "BSD-3-Clause" ]
null
null
null
get_version.py
sbacchio/tuneit
8d4771acbb56e07336e2aae66160a1f62777cb01
[ "BSD-3-Clause" ]
null
null
null
get_version.py
sbacchio/tuneit
8d4771acbb56e07336e2aae66160a1f62777cb01
[ "BSD-3-Clause" ]
null
null
null
"Usage: python -m get_version ./setup.py" import setuptools import sys setuptools.setup = lambda *args, version=None, **kwargs: print(version) exec(open(sys.argv[1]).read())
19.666667
71
0.728814
26
177
4.923077
0.769231
0
0
0
0
0
0
0
0
0
0
0.006369
0.112994
177
8
72
22.125
0.808917
0.220339
0
0
0
0
0.220339
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
0.2
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
ba74d6985832776a9d24326b66b17b4e74388e84
10,385
py
Python
tests/reports/test_controls_reporter.py
FoxoTech/methylcheck
881d14d78e6086aab184716e0b79cdf87e9be8bf
[ "MIT" ]
2
2019-10-13T21:42:14.000Z
2019-10-16T19:08:49.000Z
tests/reports/test_controls_reporter.py
FoxoTech/methylcheck
881d14d78e6086aab184716e0b79cdf87e9be8bf
[ "MIT" ]
11
2021-04-08T16:14:54.000Z
2022-03-09T00:22:13.000Z
tests/reports/test_controls_reporter.py
LifeEGX/methQC
2b4f960e7e5c7baca9dc778ca05ee332e2f27653
[ "MIT" ]
1
2020-01-09T14:26:02.000Z
2020-01-09T14:26:02.000Z
from pathlib import Path import pandas as pd import numpy as np import logging #patching import unittest try: # python 3.4+ should use builtin unittest.mock not mock package from unittest.mock import patch except ImportError: from mock import patch #app import methylcheck import methylprep TESTPATH = 'tests' PROCESSED_450K = Path('docs/example_data/GSE69852') PROCESSED_MOUSE = Path('docs/example_data/mouse_test') PROCESSED_EPIC = Path('docs/example_data/epic') class TestControlsReporter450K(): r450 = methylcheck.reports.ControlsReporter(PROCESSED_450K) r450.process() r450.save() def test_r450(self): """ 450k is tested multiple ways, so best to rerun here""" expected_outfile = 'GSE69852_QC_Report.xlsx' if not Path(PROCESSED_450K, expected_outfile).exists(): raise FileNotFoundError(f"QC Report file missing for folder: {PROCESSED_450K}") results = pd.read_excel(Path(PROCESSED_450K, expected_outfile)) if results.shape != (7,31): raise AssertionError(f"Result file shape differs: {results.shape} vs (7,31)") #if not results['Result'].equals(pd.Series([float("NaN"), 'OK (0.96)', 'OK (0.98)', 'OK (0.97)', 'OK (0.98)', 'OK (0.97)', 'OK (0.97)'])): # pre version 0.8.1 if not results['Result'].equals(pd.Series([float("NaN"), 'OK', 'OK', 'OK', 'OK', 'OK', 'OK'])): # v > 0.8.1 raise AssertionError(f"Values in result column differ: {results['Result'].values}") class TestControlsReporterEpic(): #unittest.TestCase): epic = methylcheck.reports.ControlsReporter(PROCESSED_EPIC) epic.process() epic.save() def test_epic(self): expected_outfile = 'epic_QC_Report.xlsx' if not Path(PROCESSED_EPIC, expected_outfile).exists(): raise FileNotFoundError(f"QC Report file missing for folder: {PROCESSED_EPIC}") results = pd.read_excel(Path(PROCESSED_EPIC, expected_outfile)) if results.shape != (2,30): raise AssertionError(f"Result file shape differs: {results.shape} vs (2,30)") if not list(results.iloc[1].values) == ['202908430131_R07C01', 0.29, 70.18, 45.5, 41.57, 15.44, 1.78, 1.88, 8.07, 7.22, 12.42, 4.67, 7.07, 2.49, 6.13, 2.83, 7.67, 5.25, 19.46, 6.07, 9.18, 15.88, 495, 1700, 404, 354, 0.89, 0.87, 99.5, 'OK']: print('actual:', results.iloc[1].values) raise AssertionError(f"Values in result column differ: {list(results.iloc[1].values)}") if Path(PROCESSED_EPIC,expected_outfile).exists(): Path(PROCESSED_EPIC,expected_outfile).unlink() # next, hide the poobah and run without it Path(PROCESSED_EPIC,'poobah_values.pkl').rename(Path(PROCESSED_EPIC,'_poobah_values.pkl')) try: epic = methylcheck.reports.ControlsReporter(PROCESSED_EPIC, pval=False) epic.process() epic.save() results = pd.read_excel(Path(PROCESSED_EPIC, expected_outfile)) if results.shape != (2,29): raise AssertionError(f"Result file shape differs: {results.shape} vs (2,29)") if not list(results.iloc[1].values) == ['202908430131_R07C01', 0.29, 70.18, 45.5, 41.57, 15.44, 1.78, 1.88, 8.07, 7.22, 12.42, 4.67, 7.07, 2.49, 6.13, 2.83, 7.67, 5.25, 19.46, 6.07, 9.18, 15.88, 495, 1700, 404, 354, 0.89, 0.87, 'OK (0.98)']: raise AssertionError(f"Values in result column differ: {list(results.iloc[1].values)}") if Path(PROCESSED_EPIC,expected_outfile).exists(): Path(PROCESSED_EPIC,expected_outfile).unlink() # UNhide the poobah Path(PROCESSED_EPIC,'_poobah_values.pkl').rename(Path(PROCESSED_EPIC,'poobah_values.pkl')) except: Path(PROCESSED_EPIC,'_poobah_values.pkl').rename(Path(PROCESSED_EPIC,'poobah_values.pkl')) def test_controls_report_minimal(): expected_outfile = 'GSE69852_QC_Report.xlsx' if Path(PROCESSED_450K,expected_outfile).exists(): Path(PROCESSED_450K,expected_outfile).unlink() methylcheck.controls_report(filepath=PROCESSED_450K) if not Path(PROCESSED_450K,expected_outfile).exists(): raise FileNotFoundError(f"QC Report file missing for folder: {PROCESSED_450K}") def test_controls_report_kwargs_legacy(): expected_outfile = 'GSE69852_QC_Report.xlsx' if Path(PROCESSED_450K,expected_outfile).exists(): Path(PROCESSED_450K,expected_outfile).unlink() methylcheck.controls_report(filepath=PROCESSED_450K, legacy=True) if not Path(PROCESSED_450K,expected_outfile).exists(): raise FileNotFoundError(f"QC Report file missing for folder: {PROCESSED_450K} --legacy") results = pd.read_excel(Path(PROCESSED_450K, expected_outfile)) if results.shape != (6,24): raise AssertionError(f"Result file shape differs: {results.shape} vs (1,24)") if not all(np.round(list(results.iloc[0].values)[3:],2) == [0.1,62.8,99.5,51.8,10.9,1.7,1.9,8.4,5.9,20,5.4,7.8,5.9,5.5,3,13,5.9,13.2,7.4,10.5,14.9]): raise AssertionError(f"--legacy: Calculated Numbers don't match those stored in test: returned {list(results.iloc[0].values)[3:]}") def test_controls_report_kwargs_colorblind_bg_offset(): roundoff = 3 expected_outfile = 'GSE69852_QC_Report.xlsx' if Path(PROCESSED_450K,expected_outfile).exists(): Path(PROCESSED_450K,expected_outfile).unlink() methylcheck.controls_report(filepath=PROCESSED_450K, legacy=False, colorblind=True, outfilepath=PROCESSED_450K, bg_offset=0, roundoff=roundoff, passing=0.5) if not Path(PROCESSED_450K,expected_outfile).exists(): raise FileNotFoundError(f"QC Report file missing for folder: {PROCESSED_450K}") results = pd.read_excel(Path(PROCESSED_450K, expected_outfile)) # pandas 1.3x screws up the rounding in report. can't fix it easily (on 2021-09-27) test = [i if isinstance(i,str) else round(i,roundoff) for i in list(results.iloc[1].values)] if not test == ['9247377093_R02C01', 0.671, 62.828, 99.465, 51.829, 10.852, 1.66, 1.894, 1.017, 0.716, 19.967, 0.66, 7.776, 1.97, 5.472, 0.361, 12.982, 5.929, 13.166, 0.902, 10.483, 14.944, 414, 1511, 294, 204, 0.85, 0.88, 99.8, 'M', 'MARGINAL (0.66)', 'Target Removal Green 2, Bisulfite Conversion I Green bkg/U, Bisulfite Conversion II bkg/Green, Specificity II Bkg']: # pre v0.7.3 --> #['9247377093_R02C01', 0.671, 62.84, 99.475, 51.826, 10.854, 1.661, 1.894, 1.017, 0.716, 19.962, 0.66, 7.776, 1.97, 5.47, 0.361, 12.98, 5.932, 13.168, 0.902, 10.483, 14.944, 414, 1511, 294, 204, 0.85, 0.88, 99.6, 'M', 'OK (0.76)']: # v0.8.1 'OK (0.76)' became 'MARGINAL (0.66)' raise AssertionError(f"--colorblind, outfilepath, bg_offset=0, roundoff=3, passing=0.5: Calculated Numbers don't match those stored in test: returned {list(results.iloc[1].values)}") def test_controls_report_kwargs_no_pval(): roundoff = 2 expected_outfile = 'GSE69852_QC_Report.xlsx' if Path(PROCESSED_450K,expected_outfile).exists(): Path(PROCESSED_450K,expected_outfile).unlink() methylcheck.controls_report(filepath=PROCESSED_450K, pval=False) if not Path(PROCESSED_450K,expected_outfile).exists(): raise FileNotFoundError(f"QC Report file missing for folder: {PROCESSED_450K}") results = pd.read_excel(Path(PROCESSED_450K, expected_outfile)) test = [i if isinstance(i,str) else round(i,roundoff) for i in list(results.iloc[1].values)] if not test == ['9247377093_R02C01', 0.08, 62.83, 99.46, 51.83, 10.85, 1.66, 1.89, 8.39, 5.91, 19.97, 5.44, 7.78, 5.88, 5.47, 2.97, 12.98, 5.93, 13.17, 7.44, 10.48, 14.94, 414, 1511, 294, 204, 0.85, 0.88, 'M', 'OK']: # pre v0.7.3 --> #['9247377093_R02C01', 0.08, 62.84, 99.47, 51.83, 10.85, 1.66, 1.89, 8.39, 5.91, 19.96, 5.44, 7.78, 5.88, 5.47, 2.97, 12.98, 5.93, 13.17, 7.44, 10.48, 14.94, 414, 1511, 294, 204, 0.85, 0.88, 'M', 'OK (0.96)']: # v0.8.1 'OK (0.96)' became 'OK' raise AssertionError(f"--pval=False: Calculated Numbers don't match those stored in test: returned {list(results.iloc[1].values)}") def test_controls_report_kwargs_pval_sig(): #methylprep.run_pipeline(PROCESSED_450K, save_control=True, poobah=True, export_poobah=True) roundoff = 2 expected_outfile = 'GSE69852_QC_Report.xlsx' if Path(PROCESSED_450K,expected_outfile).exists(): Path(PROCESSED_450K,expected_outfile).unlink() methylcheck.controls_report(filepath=PROCESSED_450K, pval=True, pval_sig=0.001) if not Path(PROCESSED_450K,expected_outfile).exists(): raise FileNotFoundError(f"QC Report file missing for folder: {PROCESSED_450K}") results = pd.read_excel(Path(PROCESSED_450K, expected_outfile)) test = [i if isinstance(i,str) else round(i,roundoff) for i in list(results.iloc[1].values)] if not test == ['9247377093_R02C01', 0.08, 62.83, 99.46, 51.83, 10.85, 1.66, 1.89, 8.39, 5.91, 19.97, 5.44, 7.78, 5.88, 5.47, 2.97, 12.98, 5.93, 13.17, 7.44, 10.48, 14.94, 414, 1511, 294, 204, 0.85, 0.88, 85.2, 'M', 'OK']: # version v0.7.5 --> ['9247377093_R02C01', 0.08, 62.83, 99.46, 51.83, 10.85, 1.66, 1.89, 8.39, 5.91, 19.97, 5.44, 7.78, 5.88, 5.47, 2.97, 12.98, 5.93, 13.17, 7.44, 10.48, 14.94, 414, 1511, 294, 204, 0.85, 0.88, 85.2, 'M', 'OK (0.96)']: # this works locally --> ['9247377093_R02C01', 0.08, 62.83, 99.46, 51.83, 10.85, 1.66, 1.89, 8.39, 5.91, 19.97, 5.44, 7.78, 5.88, 5.47, 2.97, 12.98, 5.93, 13.17, 7.44, 10.48, 14.94, 414, 1511, 294, 204, 0.85, 0.88, 69.1, 'M', 'FAIL (pval)'] # pre v0.7.3 --> ['9247377093_R02C01', 0.08, 62.84, 99.47, 51.83, 10.85, 1.66, 1.89, 8.39, 5.91, 19.96, 5.44, 7.78, 5.88, 5.47, 2.97, 12.98, 5.93, 13.17, 7.44, 10.48, 14.94, 414, 1511, 294, 204, 0.85, 0.88, 40.8, 'M', 'FAIL (pval)']: # on circlci I get --> ['9247377093_R02C01', 0.08, 62.83, 99.46, 51.83, 10.85, 1.66, 1.89, 8.39, 5.91, 19.97, 5.44, 7.78, 5.88, 5.47, 2.97, 12.98, 5.93, 13.17, 7.44, 10.48, 14.94, 414, 1511, 294, 204, 0.85, 0.88, 85.2, 'M', 'OK (0.96)'] # v0.8.1 'OK (0.96)' became 'OK' raise AssertionError(f"--pval=True pval_sig=0.001: Calculated Numbers don't match those stored in test: return {list(results.iloc[1].values)}") if Path(PROCESSED_450K,expected_outfile).exists(): Path(PROCESSED_450K,expected_outfile).unlink()
68.774834
375
0.658739
1,716
10,385
3.884615
0.156177
0.074107
0.058656
0.086259
0.765077
0.752925
0.727873
0.707021
0.693369
0.686919
0
0.184053
0.177564
10,385
150
376
69.233333
0.596417
0.20674
0
0.470085
0
0.042735
0.225213
0.051644
0
0
0
0
0.094017
1
0.059829
false
0.017094
0.08547
0
0.179487
0.008547
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
baaba6a98acb8b308d5a161ba06afe454b488903
93
py
Python
tests/conftest.py
Andy-Wilkinson/ChemMLToolk
83efc7ea66d2def860a3e04ccd70d77fb689fddc
[ "MIT" ]
1
2019-10-30T03:43:24.000Z
2019-10-30T03:43:24.000Z
tests/conftest.py
Andy-Wilkinson/ChemMLToolk
83efc7ea66d2def860a3e04ccd70d77fb689fddc
[ "MIT" ]
2
2021-11-28T21:09:30.000Z
2021-11-28T21:09:39.000Z
tests/conftest.py
Andy-Wilkinson/ChemMLToolkit
83efc7ea66d2def860a3e04ccd70d77fb689fddc
[ "MIT" ]
null
null
null
import tensorflow as tf if tf.__version__.startswith('1.'): tf.enable_eager_execution()
18.6
35
0.752688
13
93
4.923077
0.846154
0
0
0
0
0
0
0
0
0
0
0.012346
0.129032
93
4
36
23.25
0.777778
0
0
0
0
0
0.021505
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
baaddc9bb45e6aae722ae9541eaec5a520d340ca
189
py
Python
parse/forms.py
damiso15/excel_microservice
4c1b57ad6b5d1afb455d55ea97981b8ecc7c28f6
[ "MIT" ]
null
null
null
parse/forms.py
damiso15/excel_microservice
4c1b57ad6b5d1afb455d55ea97981b8ecc7c28f6
[ "MIT" ]
5
2021-03-30T14:07:01.000Z
2021-09-22T19:30:11.000Z
parse/forms.py
damiso15/excel_microservice
4c1b57ad6b5d1afb455d55ea97981b8ecc7c28f6
[ "MIT" ]
null
null
null
# from django import forms # from .models import ExcelUpload # # # class ExcelUploadForm(forms.ModelForm): # class Meta: # model = ExcelUpload # fields = ('document', )
21
41
0.640212
18
189
6.722222
0.722222
0
0
0
0
0
0
0
0
0
0
0
0.248677
189
8
42
23.625
0.852113
0.910053
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
babe558239c679b8bcf9e3c1eea23a5feb8f7bcc
10,697
py
Python
tests/test_graph.py
zheng-gao/ez_code
fbf48990291aa57d6436d4548b0a6c25dfb8f82d
[ "MIT" ]
null
null
null
tests/test_graph.py
zheng-gao/ez_code
fbf48990291aa57d6436d4548b0a6c25dfb8f82d
[ "MIT" ]
null
null
null
tests/test_graph.py
zheng-gao/ez_code
fbf48990291aa57d6436d4548b0a6c25dfb8f82d
[ "MIT" ]
null
null
null
from fixture.utils import equal_list, equal_dict from ezcode.graph import NegativeCycleExist from ezcode.graph.directed import DirectedGraph from ezcode.graph.undirected import UndirectedGraph def test_undirected_graph(): """ A ------ C | /|\ | / | \ | / | \ | / | E | / | / | / | / | / |/ B ------ D """ graph_str = """ A B C D E A * * B * * * C * * * * D * * * E * * """[1:] graph = UndirectedGraph(edges=[["A", "B"], ["A", "C"], ["B", "C"], ["B", "D"], ["C", "D"], ["C", "E"], ["D", "E"]]) benchmark = { "A": {"A": 0, "B": 1, "C": 1, "D": 2, "E": 2}, "B": {"A": 1, "B": 0, "C": 1, "D": 1, "E": 2}, "C": {"A": 1, "B": 1, "C": 0, "D": 1, "E": 1}, "D": {"A": 2, "B": 1, "C": 1, "D": 0, "E": 1}, "E": {"A": 2, "B": 2, "C": 1, "D": 1, "E": 0} } assert graph_str == str(graph) for n1, b in benchmark.items(): assert equal_dict(graph.bfs_path_value(n1), b) assert equal_dict(graph.dijkstra(n1), b) assert equal_dict(graph.spfa(n1), b) for n2 in benchmark.keys(): assert equal_list(benchmark[n1][n2], graph.dfs_path_value(n1, n2)) assert equal_dict(graph.floyd(), benchmark) def test_undirected_weighted_graph(): """ A --0.2- C | /| \ | / | 0.8 0.8 / | \ | / 0.9 E | 0.5 | / | / | 0.3 | / | / B --0.9- D """ graph_str = """ A B C D E A 0.8 0.2 B 0.8 0.5 0.9 C 0.2 0.5 0.9 0.8 D 0.9 0.9 0.3 E 0.8 0.3 """[1:] graph = UndirectedGraph(edges=[["A", "B"], ["A", "C"], ["B", "C"], ["B", "D"], ["C", "D"], ["C", "E"], ["D", "E"]], weights=[0.8, 0.2, 0.5, 0.9, 0.9, 0.8, 0.3]) assert graph_str == str(graph) resolution = 0.0001 benchmark_1 = { "A": {"A": 0, "B": 0.7, "C": 0.2, "D": 1.1, "E": 1.0}, "B": {"A": 0.7, "B": 0, "C": 0.5, "D": 0.9, "E": 1.2}, "C": {"A": 0.2, "B": 0.5, "C": 0, "D": 0.9, "E": 0.8}, "D": {"A": 1.1, "B": 0.9, "C": 0.9, "D": 0, "E": 0.3}, "E": {"A": 1.0, "B": 1.2, "C": 0.8, "D": 0.3, "E": 0 } } for n1, benchmark in benchmark_1.items(): assert equal_dict(graph.dijkstra(n1), benchmark, resolution=resolution) assert equal_dict(graph.spfa(n1), benchmark, resolution=resolution) for n2 in benchmark_1.keys(): assert equal_list(benchmark_1[n1][n2], graph.dfs_path_value(n1, n2), resolution=resolution) assert equal_dict(graph.floyd(), benchmark_1) benchmark_2 = { "A": {"A": 1, "B": 0.8, "C": 0.648, "D": 0.72, "E": 0.5184}, "B": {"A": 0.8, "B": 1, "C": 0.81, "D": 0.9, "E": 0.648 }, "C": {"A": 0.648, "B": 0.81, "C": 1, "D": 0.9, "E": 0.8 }, "D": {"A": 0.72, "B": 0.9, "C": 0.9, "D": 1, "E": 0.72 }, "E": {"A": 0.5184, "B": 0.648, "C": 0.8, "D": 0.72, "E": 1 } } for n1, benchmark in benchmark_2.items(): assert equal_dict(graph.dijkstra(n1, self_loop_weight=1, disconnected_edge_weight=0, path_value_func=lambda a,b: a * b, min_max_func=max), benchmark, resolution=resolution) assert equal_dict(graph.spfa(n1, self_loop_weight=1, disconnected_edge_weight=0, path_value_func=lambda a, b: a * b, min_max_func=max), benchmark, resolution=resolution) for n2 in benchmark_2.keys(): assert equal_list(benchmark_2[n1][n2], graph.dfs_path_value(n1, n2, self_loop_weight=1, disconnected_edge_weight=0, path_value_func=lambda a, b: a * b, min_max_func=max), resolution=resolution) assert equal_dict(graph.floyd(self_loop_weight=1, disconnected_edge_weight=0, path_value_func=lambda a, b: a * b, min_max_func=max), benchmark_2, resolution=resolution) def test_negative_cycle_detection(): graph = UndirectedGraph(edges=[["A", "B"], ["A", "C"], ["A", "D"], ["B", "C"], ["B", "D"], ["C", "D"]], weights=[2, 3, 2, -3, 1, 1]) try: graph.spfa("A", check_cycle=True) except NegativeCycleExist: assert True else: assert False def test_directed_graph(): """ a <----- c | | | v | f ---> e | ^ v | d -----> b """ graph_str = """ a b c d e f a * b * c * * d * e f * """[1:] graph = DirectedGraph(edges=[("c", "a"), ("b", "f"), ("e", None), ("a", "d"), ("c", "f"), ("d", "b"), ("f", "e")]) assert graph_str == str(graph) assert equal_list(graph.topological_order(), ["e", "f", "b", "d", "a", "c"]) assert graph.is_acyclic_graph() assert not DirectedGraph(edges=[("a", "b"), ("b", "a")]).is_acyclic_graph() graph_str = """ a b c d e f a * b * c * * * d * * e f * """[1:] graph = DirectedGraph(edges=[("a", "b"), ("c", "b"), ("d", "a"), ("b", "d"), ("c", "a"), ("d", "c"), ("c", "f"), ("f", "d"), ("e", None)]) assert graph_str == str(graph) x = float("inf") benchmark = { "a": {"a": 0, "b": 1, "c": 3, "d": 2, "e": x, "f": 4}, "b": {"a": 2, "b": 0, "c": 2, "d": 1, "e": x, "f": 3}, "c": {"a": 1, "b": 1, "c": 0, "d": 2, "e": x, "f": 1}, "d": {"a": 1, "b": 2, "c": 1, "d": 0, "e": x, "f": 2}, "e": {"a": x, "b": x, "c": x, "d": x, "e": 0, "f": x}, "f": {"a": 2, "b": 3, "c": 2, "d": 1, "e": x, "f": 0} } assert graph_str == str(graph) for n1, b in benchmark.items(): assert equal_dict(graph.bfs_path_value(n1), b) assert equal_dict(graph.dijkstra(n1), b) assert equal_dict(graph.spfa(n1), b) for n2 in benchmark.keys(): assert equal_list(benchmark[n1][n2], graph.dfs_path_value(n1, n2)) assert equal_dict(graph.floyd(), benchmark) def test_directed_weighted_graph(): graph_str = """ a b c d e f a 0.8 b 0.8 c 0.5 0.7 0.6 d 0.6 0.8 e f 0.4 """[1:] graph = DirectedGraph( edges=[("a", "b"), ("c", "b"), ("d", "a"), ("b", "d"), ("c", "a"), ("d", "c"), ("c", "f"), ("f", "d"), ("e", None)], weights=[0.8, 0.7, 0.6, 0.8, 0.5, 0.8, 0.6, 0.4, None] ) assert graph_str == str(graph) x, resolution = float("inf"), 0.0001 benchmark_1 = { "a": {"a": 0, "b": 0.8, "c": 2.4, "d": 1.6, "e": x, "f": 3.0, }, "b": {"a": 1.4, "b": 0, "c": 1.6, "d": 0.8, "e": x, "f": 2.2, }, "c": {"a": 0.5, "b": 0.7, "c": 0, "d": 1.0, "e": x, "f": 0.6, }, "d": {"a": 0.6, "b": 1.4, "c": 0.8, "d": 0, "e": x, "f": 1.4, }, "e": {"a": x, "b": x, "c": x, "d": x, "e": 0, "f": x, }, "f": {"a": 1.0, "b": 1.8, "c": 1.2, "d": 0.4, "e": x, "f": 0, } } for n1, benchmark in benchmark_1.items(): assert equal_dict(graph.dijkstra(n1), benchmark, resolution=resolution) assert equal_dict(graph.spfa(n1), benchmark, resolution=resolution) for n2 in benchmark_1.keys(): assert equal_list(benchmark_1[n1][n2], graph.dfs_path_value(n1, n2), resolution=resolution) assert equal_dict(graph.floyd(), benchmark_1, resolution=resolution) benchmark_2 = { "a": {"a": 1, "b": 0.8, "c": 0.512, "d": 0.64, "e": 0, "f": 0.3072}, "b": {"a": 0.48, "b": 1, "c": 0.64, "d": 0.8, "e": 0, "f": 0.384 }, "c": {"a": 0.5, "b": 0.7, "c": 1, "d": 0.56, "e": 0, "f": 0.6 }, "d": {"a": 0.6, "b": 0.56, "c": 0.8, "d": 1, "e": 0, "f": 0.48 }, "e": {"a": 0, "b": 0, "c": 0, "d": 0, "e": 1, "f": 0 }, "f": {"a": 0.24, "b": 0.224, "c": 0.32, "d": 0.4, "e": 0, "f": 1 } } for n1, benchmark in benchmark_2.items(): assert equal_dict(graph.dijkstra(n1, self_loop_weight=1, disconnected_edge_weight=0, path_value_func=lambda a, b: a * b, min_max_func=max), benchmark, resolution=resolution) assert equal_dict(graph.spfa(n1, self_loop_weight=1, disconnected_edge_weight=0, path_value_func=lambda a, b: a * b, min_max_func=max), benchmark, resolution=resolution) for n2 in benchmark_2.keys(): assert equal_list(benchmark_2[n1][n2], graph.dfs_path_value(n1, n2, self_loop_weight=1, disconnected_edge_weight=0, path_value_func=lambda a, b: a * b, min_max_func=max), resolution=resolution) assert equal_dict(graph.floyd(self_loop_weight=1, disconnected_edge_weight=0, path_value_func=lambda a, b: a * b, min_max_func=max), benchmark_2, resolution=resolution) def test_eulerian_path(): """ A ------ C | /|\ | / | \ | / | \ | / | E | / | / | / | / | / |/ B ------ D """ graph = UndirectedGraph(edges=[["A", "B"], ["A", "C"], ["B", "C"], ["B", "D"], ["C", "D"], ["C", "E"], ["D", "E"]]) assert graph.eulerian_path(start_node="A") is None assert graph.eulerian_path(start_node="E") is None assert graph.eulerian_path(start_node="D") == ["D", "B", "A", "C", "D", "E", "C", "B"] assert graph.eulerian_path() == ["B", "A", "C", "B", "D", "C", "E", "D"] """ A -- B | \ | \ D C """ graph = UndirectedGraph(edges=[["A", "B"], ["A", "C"], ["A", "D"]]) assert graph.eulerian_path() is None """ A <--- B | ^ | | v | D ---> C <--- E | v F """ graph = DirectedGraph(edges=[["B", "A"], ["A", "D"], ["D", "C"], ["C", "B"], ["E", "C"], ["C", "F"]]) assert graph.eulerian_path(start_node="A") is None assert graph.eulerian_path(start_node="B") is None assert graph.eulerian_path(start_node="C") is None assert graph.eulerian_path(start_node="D") is None assert graph.eulerian_path(start_node="F") is None assert graph.eulerian_path(start_node="E") == ["E", "C", "B", "A", "D", "C", "F"] assert graph.eulerian_path(start_node="E") == graph.eulerian_path() """ A <--- B ---> F | ^ | | v | D ---> C <--- E """ graph = DirectedGraph(edges=[["B", "A"], ["A", "D"], ["D", "C"], ["C", "B"], ["E", "C"], ["B", "F"]]) assert graph.eulerian_path() is None
40.518939
205
0.444237
1,608
10,697
2.840174
0.060323
0.016641
0.065689
0.087585
0.78279
0.749726
0.733742
0.70681
0.668272
0.613532
0
0.064802
0.314761
10,697
263
206
40.673004
0.558254
0.04319
0
0.416667
0
0
0.133626
0
0
0
0
0
0.277778
1
0.033333
false
0
0.022222
0
0.055556
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
243d8aae60e65abfff3ef3919928ba2a9f7df693
159
py
Python
deui/html/view/nav_element.py
urushiyama/DeUI
14530d2dae7d96a3dee30759f85e02239fb433c5
[ "MIT" ]
1
2021-10-17T01:54:18.000Z
2021-10-17T01:54:18.000Z
deui/html/view/nav_element.py
urushiyama/DeUI
14530d2dae7d96a3dee30759f85e02239fb433c5
[ "MIT" ]
null
null
null
deui/html/view/nav_element.py
urushiyama/DeUI
14530d2dae7d96a3dee30759f85e02239fb433c5
[ "MIT" ]
null
null
null
from .element import Element class Navigation(Element): """ Represents navigation link section. """ def __str__(self): return "nav"
14.454545
39
0.628931
16
159
6
0.8125
0
0
0
0
0
0
0
0
0
0
0
0.27044
159
10
40
15.9
0.827586
0.220126
0
0
0
0
0.027778
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
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
2441847130be3f39e5967ae0ebdadf4d608571ad
374
py
Python
exercicios/01.py
paulo123araujo/minicurso-python
31cd0a168c9cd692a675a9af5172460a11c38916
[ "MIT" ]
null
null
null
exercicios/01.py
paulo123araujo/minicurso-python
31cd0a168c9cd692a675a9af5172460a11c38916
[ "MIT" ]
null
null
null
exercicios/01.py
paulo123araujo/minicurso-python
31cd0a168c9cd692a675a9af5172460a11c38916
[ "MIT" ]
null
null
null
numeros = input("Digite dois números: ").split(" ") num1 = float(numeros[0]) num2 = float(numeros[1]) # print(f"{num1} + {num2} = {num1 + num2}") print("%.2f + %.2f = %.2f" %(num1, num2, (num1 + num2))) # print(num1, "+", num2, "=", num1 + num2) print(num1, "-", num2, "=", num1 - num2) print(num1, "*", num2, "=", num1 * num2) print(num1, "/", num2, "=", num1 / num2)
24.933333
56
0.537433
48
374
4.1875
0.291667
0.477612
0.358209
0.477612
0.60199
0.497512
0.497512
0.497512
0.497512
0.497512
0
0.100324
0.173797
374
14
57
26.714286
0.550162
0.219251
0
0
0
0
0.159722
0
0
0
0
0
0
1
0
false
0
0
0
0
0.571429
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
79f61a5d75644c8b4cf9fd950bb95e70f2f7c3a4
176
py
Python
configs/flownet/flownets_8x1_slong_flyingchairs_384x448.py
hologerry/mmflow
40caf064851bd95317424e31cc137c0007a2bece
[ "Apache-2.0" ]
481
2021-11-16T07:04:23.000Z
2022-03-31T22:21:21.000Z
configs/flownet/flownets_8x1_slong_flyingchairs_384x448.py
hologerry/mmflow
40caf064851bd95317424e31cc137c0007a2bece
[ "Apache-2.0" ]
72
2021-11-16T12:25:55.000Z
2022-03-28T13:10:45.000Z
configs/flownet/flownets_8x1_slong_flyingchairs_384x448.py
hologerry/mmflow
40caf064851bd95317424e31cc137c0007a2bece
[ "Apache-2.0" ]
48
2021-11-16T06:48:46.000Z
2022-03-30T12:46:40.000Z
_base_ = [ '../_base_/models/flownets.py', '../_base_/datasets/flyingchairs_384x448.py', '../_base_/schedules/schedule_s_long.py', '../_base_/default_runtime.py' ]
29.333333
76
0.676136
20
176
5.25
0.65
0.171429
0
0
0
0
0
0
0
0
0
0.038462
0.113636
176
5
77
35.2
0.634615
0
0
0
0
0
0.772727
0.772727
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
0309958523ceb32502c420f13cb24f00e9e388b5
428
py
Python
mpfmc/tests/_test_Template.py
arthurlutz/mpf-mc
6f4aac5d48eb07dd5aa6612985a7567af8577ce2
[ "MIT" ]
16
2016-01-07T18:17:55.000Z
2022-03-27T14:29:42.000Z
mpfmc/tests/_test_Template.py
arthurlutz/mpf-mc
6f4aac5d48eb07dd5aa6612985a7567af8577ce2
[ "MIT" ]
308
2016-04-10T18:33:40.000Z
2021-11-17T21:38:49.000Z
mpfmc/tests/_test_Template.py
arthurlutz/mpf-mc
6f4aac5d48eb07dd5aa6612985a7567af8577ce2
[ "MIT" ]
39
2016-02-23T23:49:20.000Z
2021-11-08T04:50:12.000Z
# How to add a test: # Copy this file # Rename TestTemplate to TestWhatever in line 9 # Rename machine path and config file in lines 11 and 14 from mpfmc.tests.MpfMcTestCase import MpfMcTestCase class TestTemplate(MpfMcTestCase): def get_machine_path(self): return 'tests/machine_files/test_template' def get_config_file(self): return 'test_template.yaml' def test_something(self): pass
23.777778
56
0.733645
60
428
5.1
0.6
0.071895
0
0
0
0
0
0
0
0
0
0.014706
0.205607
428
17
57
25.176471
0.885294
0.313084
0
0
0
0
0.176471
0.114187
0
0
0
0
0
1
0.375
false
0.125
0.125
0.25
0.875
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
4
0358f73562d2122131efd6aa840de358e08667b3
4,060
py
Python
accounting/migrations/0001_initial.py
bobjiangps/django-blog
6afd36fa96c5a027546575b362b0a481c5d7c1a5
[ "MIT" ]
3
2019-10-25T13:08:04.000Z
2020-01-05T11:29:18.000Z
accounting/migrations/0001_initial.py
bobjiangps/django-blog
6afd36fa96c5a027546575b362b0a481c5d7c1a5
[ "MIT" ]
9
2020-05-10T10:13:56.000Z
2022-03-11T23:33:52.000Z
accounting/migrations/0001_initial.py
bobjiangps/django-blog
6afd36fa96c5a027546575b362b0a481c5d7c1a5
[ "MIT" ]
3
2019-02-11T02:55:51.000Z
2020-01-05T11:29:20.000Z
# Generated by Django 2.2.13 on 2021-01-22 17:41 from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Account', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=100)), ('amount', models.DecimalField(decimal_places=2, max_digits=8)), ('icon', models.CharField(max_length=100, null=True)), ('created_date', models.DateTimeField(default=django.utils.timezone.now)), ('updated_date', models.DateTimeField(default=django.utils.timezone.now)), ], options={ 'ordering': ['created_date'], }, ), migrations.CreateModel( name='Category', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=100)), ('icon', models.CharField(max_length=100)), ('category_type', models.CharField(choices=[('income', '收入'), ('expense', '支出')], default='expense', max_length=100)), ], options={ 'ordering': ['id'], }, ), migrations.CreateModel( name='Currency', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=100)), ('icon', models.CharField(max_length=100)), ], options={ 'ordering': ['id'], }, ), migrations.CreateModel( name='SubCategory', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=100)), ('icon', models.CharField(max_length=100)), ('parent', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='accounting.Category')), ], options={ 'ordering': ['id'], }, ), migrations.CreateModel( name='HistoryRecord', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('time_of_occurrence', models.DateTimeField(default=django.utils.timezone.now)), ('amount', models.DecimalField(decimal_places=2, max_digits=8)), ('comment', models.CharField(blank=True, max_length=500, null=True)), ('created_date', models.DateTimeField(default=django.utils.timezone.now)), ('updated_date', models.DateTimeField(default=django.utils.timezone.now)), ('account', models.ForeignKey(default=1, null=True, on_delete=django.db.models.deletion.SET_NULL, to='accounting.Account')), ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='accounting.Category')), ('currency', models.ForeignKey(default=1, null=True, on_delete=django.db.models.deletion.SET_NULL, to='accounting.Currency')), ('sub_category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='accounting.SubCategory')), ], options={ 'ordering': ['-time_of_occurrence'], }, ), migrations.AddField( model_name='account', name='currency', field=models.ForeignKey(default=1, null=True, on_delete=django.db.models.deletion.SET_NULL, to='accounting.Currency'), ), ]
45.617978
150
0.57069
400
4,060
5.66
0.21
0.066254
0.047703
0.084806
0.746025
0.746025
0.713781
0.69258
0.69258
0.607774
0
0.018188
0.282266
4,060
88
151
46.136364
0.758751
0.01133
0
0.580247
1
0
0.117149
0.005484
0
0
0
0
0
1
0
false
0
0.037037
0
0.08642
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
0371b2e5e808a3335687f6bb1d019e4b4c60e31e
1,610
py
Python
01_Modelos_Supervisionados/1.2_Analise_Discriminante_Linear_e_Quadratica/1.2.3_Formulacao_Matematica_de_Reducao_de_Dimensionalidade_LDA.py
BrunoBertti/Scikit_Learning
4b9e10ff7909f3728ac1e8bba19f5fd779340bc4
[ "MIT" ]
null
null
null
01_Modelos_Supervisionados/1.2_Analise_Discriminante_Linear_e_Quadratica/1.2.3_Formulacao_Matematica_de_Reducao_de_Dimensionalidade_LDA.py
BrunoBertti/Scikit_Learning
4b9e10ff7909f3728ac1e8bba19f5fd779340bc4
[ "MIT" ]
null
null
null
01_Modelos_Supervisionados/1.2_Analise_Discriminante_Linear_e_Quadratica/1.2.3_Formulacao_Matematica_de_Reducao_de_Dimensionalidade_LDA.py
BrunoBertti/Scikit_Learning
4b9e10ff7909f3728ac1e8bba19f5fd779340bc4
[ "MIT" ]
null
null
null
########## 1.2.3. Formulação matemática de redução de dimensionalidade LDA ########## # Primeiro note que K significa que \mu_k são vetores em \mathcal{R}^d, e eles estão em um subespaço afim H de dimensão no máximo K - 1 (2 pontos estão em uma linha, 3 pontos estão em um plano, etc.) ). # Como mencionado acima, podemos interpretar LDA como a atribuição de x à classe cuja média \mu_k é a mais próxima em termos de distância de Mahalanobis, enquanto também leva em conta as probabilidades anteriores da classe. Alternativamente, LDA é equivalente a primeiro esferificar os dados de modo que a matriz de covariância seja a identidade e, em seguida, atribuir x à média mais próxima em termos de distância euclidiana (ainda contabilizando as classes prioritárias). # Calcular distâncias euclidianas neste espaço d-dimensional é equivalente a primeiro projetar os pontos de dados em H e calcular as distâncias lá (já que as outras dimensões contribuirão igualmente para cada classe em termos de distância). Em outras palavras, se x estiver mais próximo de \mu_k no espaço original, também será o caso de H. Isso mostra que, implícito no classificador LDA, há uma redução de dimensionalidade por projeção linear em um espaço dimensional K-1 . # Podemos reduzir ainda mais a dimensão, para um L escolhido, projetando no subespaço linear H_L que maximiza a variância do \mu^*_k após a projeção (na verdade, estamos fazendo uma forma de PCA para a classe transformada significa \ mu^*_k). Este L corresponde ao parâmetro n_components usado no método de transformação. Veja 1 para mais detalhes.
161
479
0.778261
262
1,610
4.755725
0.519084
0.012039
0.024077
0.045746
0.048154
0.048154
0
0
0
0
0
0.006015
0.173913
1,610
10
480
161
0.930827
0.968323
0
null
0
null
0
0
null
0
0
0.1
null
1
null
true
0
0
null
null
null
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
null
0
0
1
0
0
0
1
0
0
0
0
0
0
4
cef85293a8bebf5de04a9c7c28c2ecb0f768bbf3
129
py
Python
alcor/models/__init__.py
wolvespack/alcor
dcc6b029ab7e6eb96b65b7b996cf335c3b030649
[ "MIT" ]
2
2017-05-02T11:36:46.000Z
2017-05-02T14:01:16.000Z
alcor/models/__init__.py
wolvespack/alcor
dcc6b029ab7e6eb96b65b7b996cf335c3b030649
[ "MIT" ]
14
2017-10-15T20:13:23.000Z
2017-12-03T17:00:30.000Z
alcor/models/__init__.py
wolvespack/alcor
dcc6b029ab7e6eb96b65b7b996cf335c3b030649
[ "MIT" ]
null
null
null
from .group import Group from .star import (STAR_PARAMETERS_NAMES, GalacticDiskType, Star)
25.8
41
0.581395
12
129
6.083333
0.583333
0
0
0
0
0
0
0
0
0
0
0
0.372093
129
4
42
32.25
0.901235
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
3004b0eda50f3f009063212317a8fd0157f3b144
369
py
Python
tools/configen/example/gen/configen/samples/user/conf/User.py
wpc/hydra
43b8a0f06eaf80f75810cc249e1eaa8a211e39c4
[ "MIT" ]
1
2021-02-23T00:00:20.000Z
2021-02-23T00:00:20.000Z
tools/configen/example/gen/configen/samples/user/conf/User.py
wpc/hydra
43b8a0f06eaf80f75810cc249e1eaa8a211e39c4
[ "MIT" ]
null
null
null
tools/configen/example/gen/configen/samples/user/conf/User.py
wpc/hydra
43b8a0f06eaf80f75810cc249e1eaa8a211e39c4
[ "MIT" ]
null
null
null
# Generated by configen, do not edit. # See https://github.com/facebookresearch/hydra/tree/master/tools/configen # fmt: off # isort:skip_file # flake8: noqa from dataclasses import dataclass from typing import * from omegaconf import MISSING @dataclass class UserConf: _target_: str = "configen.samples.user.User" age: int = MISSING name: str = MISSING
20.5
74
0.742547
49
369
5.530612
0.77551
0
0
0
0
0
0
0
0
0
0
0.003247
0.165312
369
17
75
21.705882
0.876623
0.395664
0
0
1
0
0.119816
0.119816
0
0
0
0
0
1
0
true
0
0.375
0
0.875
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
302af14bd5d8ff0171af453caa11c3079af12cfe
227
py
Python
docker_compose/tweet_collector/config.py
lenaromanenko/twitter_sentiment_analysis
ac642ee4a6c2af01bd413326ff0bae406c2e2efe
[ "MIT" ]
1
2021-03-23T10:27:06.000Z
2021-03-23T10:27:06.000Z
docker_compose/tweet_collector/config.py
lenaromanenko/twitter_sentiment_analysis
ac642ee4a6c2af01bd413326ff0bae406c2e2efe
[ "MIT" ]
null
null
null
docker_compose/tweet_collector/config.py
lenaromanenko/twitter_sentiment_analysis
ac642ee4a6c2af01bd413326ff0bae406c2e2efe
[ "MIT" ]
1
2021-05-31T15:39:30.000Z
2021-05-31T15:39:30.000Z
import os API_KEY = os.getenv('API_KEY') API_SECRET = os.getenv('API_SECRET') ACCESS_TOKEN = os.getenv('ACCESS_TOKEN') ACCESS_TOKEN_SECRET = os.getenv('ACCESS_TOKEN_SECRET') POSTGRES_PASSWORD = os.getenv('POSTGRES_PASSWORD')
25.222222
54
0.784141
34
227
4.882353
0.294118
0.240964
0.13253
0.228916
0
0
0
0
0
0
0
0
0.0837
227
8
55
28.375
0.798077
0
0
0
0
0
0.286344
0
0
0
0
0
0
1
0
false
0.166667
0.166667
0
0.166667
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4