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
c10f80b1fa4a2bebbb5d28f85d6e88dd5d049df2
112
py
Python
start.py
quadrixm/ya
621f7c12f0bfdcca49068177cfa6e0025f3a3bae
[ "MIT" ]
22
2019-01-26T15:52:24.000Z
2021-11-11T22:24:21.000Z
start.py
quadrixm/ya
621f7c12f0bfdcca49068177cfa6e0025f3a3bae
[ "MIT" ]
1
2018-07-31T05:39:19.000Z
2018-07-31T05:39:19.000Z
start.py
quadrixm/ya
621f7c12f0bfdcca49068177cfa6e0025f3a3bae
[ "MIT" ]
1
2018-07-31T05:30:02.000Z
2018-07-31T05:30:02.000Z
import sys import src.main as mn if __name__ == '__main__': file_name = sys.argv[1] mn.main(file_name)
16
27
0.678571
19
112
3.473684
0.578947
0.242424
0.363636
0
0
0
0
0
0
0
0
0.011236
0.205357
112
6
28
18.666667
0.730337
0
0
0
0
0
0.071429
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
c11ead25e4f1ab4232dafcde49692b6c9dcffe6e
3,666
py
Python
examples/drawing/draw_connector.py
xxao/pero
a7f0c84fae0b21fe120204e798bd61cdab3a125d
[ "MIT" ]
13
2019-07-15T17:51:21.000Z
2022-03-15T06:13:43.000Z
examples/drawing/draw_connector.py
xxao/pero
a7f0c84fae0b21fe120204e798bd61cdab3a125d
[ "MIT" ]
1
2021-12-29T00:46:44.000Z
2022-01-21T16:18:48.000Z
examples/drawing/draw_connector.py
xxao/pero
a7f0c84fae0b21fe120204e798bd61cdab3a125d
[ "MIT" ]
3
2020-09-27T14:31:45.000Z
2022-01-22T14:28:15.000Z
# Created byMartin.cz # Copyright (c) Martin Strohalm. All rights reserved. import pero class DrawTest(pero.Graphics): """Test case for connector arrows drawing.""" def draw(self, canvas, *args, **kwargs): """Draws the test.""" # clear canvas canvas.fill(pero.colors.White) # set properties arrow_size = 15 line_color = pero.colors.Blue start_fill_color = pero.colors.Red.opaque(0.25) end_fill_color = pero.colors.Blue.opaque(0.25) # init arrow arrow = pero.ConnectorArrow(line_color=line_color) arrow.start_head = pero.NormalHead(size=arrow_size, line_color=line_color, fill_color=start_fill_color) arrow.end_head = pero.NormalHead(size=arrow_size, line_color=line_color, fill_color=end_fill_color) # init coords x = 50 y1 = 40 y2 = 140 # draw guides canvas.line_color = pero.colors.Red canvas.draw_line(20, y1, 660, y1) canvas.draw_line(20, y2, 660, y2) # test horizontal connector arrow arrow.draw(canvas, x1=x-25, y1=y1, x2=x+25, y2=y2, orientation=pero.ORI_HORIZONTAL) x += 70 arrow.draw(canvas, x1=x+25, y1=y1, x2=x-25, y2=y2, orientation=pero.ORI_HORIZONTAL) # test vertical connector arrow x += 100 arrow.draw(canvas, x1=x-25, y1=y1, x2=x+25, y2=y2, orientation=pero.ORI_VERTICAL) x += 70 arrow.draw(canvas, x1=x+25, y1=y1, x2=x-25, y2=y2, orientation=pero.ORI_VERTICAL) # test horizontal curved connector arrow x += 100 arrow.draw(canvas, x1=x-30, y1=y1, x2=x+30, y2=y2, curve=1, orientation=pero.ORI_HORIZONTAL) x += 70 arrow.draw(canvas, x1=x+30, y1=y1, x2=x-30, y2=y2, curve=1, orientation=pero.ORI_HORIZONTAL) # test vertical curved connector arrow x += 100 arrow.draw(canvas, x1=x-25, y1=y1, x2=x+25, y2=y2, curve=1, orientation=pero.ORI_VERTICAL) x += 70 arrow.draw(canvas, x1=x+25, y1=y1, x2=x-25, y2=y2, curve=1, orientation=pero.ORI_VERTICAL) x = 50 y1 += 150 y2 += 150 # draw guides canvas.line_color = pero.colors.Red canvas.draw_line(20, y1, 660, y1) canvas.draw_line(20, y2, 660, y2) # test horizontal connector arrow arrow.draw(canvas, x1=x-20, y1=y1, x2=x+20, y2=y2, pivot=0, orientation=pero.ORI_HORIZONTAL) x += 20 arrow.draw(canvas, x1=x-20, y1=y1, x2=x+20, y2=y2, pivot=1, orientation=pero.ORI_HORIZONTAL) # test vertical connector arrow x += 100 arrow.draw(canvas, x1=x-20, y1=y1, x2=x+20, y2=y2, pivot=0, orientation=pero.ORI_VERTICAL) x += 70 arrow.draw(canvas, x1=x-20, y1=y1, x2=x+20, y2=y2, pivot=1, orientation=pero.ORI_VERTICAL) # test horizontal curved connector arrow x += 100 arrow.draw(canvas, x1=x-40, y1=y1, x2=x+40, y2=y2, pivot=0, curve=1, orientation=pero.ORI_HORIZONTAL) x += 20 arrow.draw(canvas, x1=x-40, y1=y1, x2=x+40, y2=y2, pivot=1, curve=1, orientation=pero.ORI_HORIZONTAL) # test vertical curved connector arrow x += 100 arrow.draw(canvas, x1=x-40, y1=y1, x2=x+40, y2=y2, pivot=0, curve=1, orientation=pero.ORI_VERTICAL) x += 70 arrow.draw(canvas, x1=x-40, y1=y1, x2=x+40, y2=y2, pivot=1, curve=1, orientation=pero.ORI_VERTICAL) # run test if __name__ == '__main__': pero.debug(DrawTest(), 'show', "Connector Arrows", 680, 330)
37.793814
111
0.596563
548
3,666
3.895985
0.15146
0.067447
0.112412
0.1274
0.762998
0.762998
0.759251
0.759251
0.759251
0.759251
0
0.101956
0.274959
3,666
96
112
38.1875
0.701279
0.133661
0
0.4
0
0
0.008892
0
0
0
0
0
0
1
0.018182
false
0
0.018182
0
0.054545
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
c1248b6194a6cbc9932eb66ed01946ca8b46d2ef
54
py
Python
loguniform/__init__.py
j-faria/LogUniform
caed56d92eed0bd9398c11eb88ce2476077a6ffa
[ "MIT" ]
1
2021-07-09T01:49:33.000Z
2021-07-09T01:49:33.000Z
loguniform/__init__.py
j-faria/LogUniform
caed56d92eed0bd9398c11eb88ce2476077a6ffa
[ "MIT" ]
2
2018-05-25T13:43:13.000Z
2021-05-14T17:18:11.000Z
loguniform/__init__.py
j-faria/LogUniform
caed56d92eed0bd9398c11eb88ce2476077a6ffa
[ "MIT" ]
null
null
null
from .LogUniform import LogUniform, ModifiedLogUniform
54
54
0.888889
5
54
9.6
0.8
0
0
0
0
0
0
0
0
0
0
0
0.074074
54
1
54
54
0.96
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
c1308637b21009d2aa801664dbf8c2d14d5a68f0
178
py
Python
null/__init__.py
SilverStrange/NullChecker
ac70724b3d55fc845d207ee22524e3544b5b6f0b
[ "MIT" ]
null
null
null
null/__init__.py
SilverStrange/NullChecker
ac70724b3d55fc845d207ee22524e3544b5b6f0b
[ "MIT" ]
null
null
null
null/__init__.py
SilverStrange/NullChecker
ac70724b3d55fc845d207ee22524e3544b5b6f0b
[ "MIT" ]
null
null
null
from .file import File from .scan import scan, create_workers from .config import create_default_config, read_config from .options import parse_args from .defaults import Default
35.6
54
0.842697
27
178
5.37037
0.481481
0
0
0
0
0
0
0
0
0
0
0
0.117978
178
5
55
35.6
0.923567
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
c13e50e4836dc71e4a9e1be518e0fe6c77db793f
83
py
Python
Test/game/graphic/render.py
twodulls/pythonsample
f576f79be75d96df61e26ef79a0e36a6feedfec1
[ "Apache-2.0" ]
null
null
null
Test/game/graphic/render.py
twodulls/pythonsample
f576f79be75d96df61e26ef79a0e36a6feedfec1
[ "Apache-2.0" ]
null
null
null
Test/game/graphic/render.py
twodulls/pythonsample
f576f79be75d96df61e26ef79a0e36a6feedfec1
[ "Apache-2.0" ]
null
null
null
from ..sound.echo import echo_test def render_test(): print("render") echo_test()
20.75
34
0.746988
13
83
4.538462
0.615385
0.271186
0
0
0
0
0
0
0
0
0
0
0.108434
83
4
35
20.75
0.797297
0
0
0
0
0
0.071429
0
0
0
0
0
0
1
0.25
true
0
0.25
0
0.5
0.25
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
1
0
0
0
0
0
0
5
c14e052b2e79efb071fbf6c74ad6b924371f1778
314
py
Python
context_propagation_python/context.py
AminoApps/context-propagation-python
ddde90d468c43e669c0c0a325e0127d9a755e1a6
[ "Apache-2.0" ]
null
null
null
context_propagation_python/context.py
AminoApps/context-propagation-python
ddde90d468c43e669c0c0a325e0127d9a755e1a6
[ "Apache-2.0" ]
null
null
null
context_propagation_python/context.py
AminoApps/context-propagation-python
ddde90d468c43e669c0c0a325e0127d9a755e1a6
[ "Apache-2.0" ]
1
2020-01-21T09:13:39.000Z
2020-01-21T09:13:39.000Z
from context_propagation_python.constants import THREAD_LOCAL_CONTEXT def set_context(carrier): THREAD_LOCAL_CONTEXT.context = carrier def get_context(): if hasattr(THREAD_LOCAL_CONTEXT, 'context'): return {k: v for k, v in THREAD_LOCAL_CONTEXT.context.items()} else: return dict()
24.153846
70
0.735669
42
314
5.214286
0.52381
0.200913
0.328767
0.342466
0
0
0
0
0
0
0
0
0.181529
314
12
71
26.166667
0.85214
0
0
0
0
0
0.022293
0
0
0
0
0
0
1
0.25
false
0
0.125
0
0.625
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
5
c1787daaed1c52ecc5ced43e836b3b1f95392a0c
21
py
Python
ctrl/__init__.py
sirhcsenots/ctrl
86e960b9948aa6a78f3eea9f7571ebb868e4ee06
[ "MIT" ]
null
null
null
ctrl/__init__.py
sirhcsenots/ctrl
86e960b9948aa6a78f3eea9f7571ebb868e4ee06
[ "MIT" ]
null
null
null
ctrl/__init__.py
sirhcsenots/ctrl
86e960b9948aa6a78f3eea9f7571ebb868e4ee06
[ "MIT" ]
null
null
null
# Control Everything
10.5
20
0.809524
2
21
8.5
1
0
0
0
0
0
0
0
0
0
0
0
0.142857
21
1
21
21
0.944444
0.857143
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
c1a027700785bdf5ee7c151b0e15f48a00bdca19
305
py
Python
capstone/capapi/tests/test_documents.py
truthiswill/capstone
61b17611ebee17a5f5e4f64ae4ccaa67ac357478
[ "MIT" ]
null
null
null
capstone/capapi/tests/test_documents.py
truthiswill/capstone
61b17611ebee17a5f5e4f64ae4ccaa67ac357478
[ "MIT" ]
4
2021-09-02T20:54:31.000Z
2022-02-27T14:04:06.000Z
capstone/capapi/tests/test_documents.py
whitemike889/capstone
61b17611ebee17a5f5e4f64ae4ccaa67ac357478
[ "MIT" ]
null
null
null
import pytest from capdb.models import CaseMetadata @pytest.mark.django_db def test_case_document_full_cite(client, whitelisted_case_document, ingest_metadata): case = CaseMetadata.objects.get(name=whitelisted_case_document.name) assert case.full_cite() == whitelisted_case_document.full_cite()
33.888889
85
0.829508
41
305
5.829268
0.560976
0.200837
0.288703
0.167364
0
0
0
0
0
0
0
0
0.091803
305
8
86
38.125
0.862816
0
0
0
0
0
0
0
0
0
0
0
0.166667
1
0.166667
false
0
0.333333
0
0.5
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
c1a4aae6d2e94b66399d559e3876300c990bf459
214
py
Python
nighres/laminar/__init__.py
jennydaman/nighres
9ced74e61db02261e4753a69b03f4479bfdc26b6
[ "Apache-2.0" ]
null
null
null
nighres/laminar/__init__.py
jennydaman/nighres
9ced74e61db02261e4753a69b03f4479bfdc26b6
[ "Apache-2.0" ]
null
null
null
nighres/laminar/__init__.py
jennydaman/nighres
9ced74e61db02261e4753a69b03f4479bfdc26b6
[ "Apache-2.0" ]
null
null
null
from nighres.laminar.volumetric_layering import volumetric_layering from nighres.laminar.profile_sampling import profile_sampling from nighres.laminar.laminar_iterative_smoothing import laminar_iterative_smoothing
53.5
83
0.915888
26
214
7.230769
0.384615
0.175532
0.287234
0
0
0
0
0
0
0
0
0
0.056075
214
3
84
71.333333
0.930693
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
c1ec953bd09bba5f0eae1471c670435dfda84e69
775
py
Python
scripts/template.py
calmisential/SkeNetch
c014b9d2caa0a3a9809b437c957cea3b73af685d
[ "Apache-2.0" ]
1
2021-12-14T07:26:28.000Z
2021-12-14T07:26:28.000Z
scripts/template.py
calmisential/SkeNetch
c014b9d2caa0a3a9809b437c957cea3b73af685d
[ "Apache-2.0" ]
null
null
null
scripts/template.py
calmisential/SkeNetch
c014b9d2caa0a3a9809b437c957cea3b73af685d
[ "Apache-2.0" ]
1
2021-12-14T07:26:30.000Z
2021-12-14T07:26:30.000Z
from abc import ABCMeta, abstractmethod class ITrainer(metaclass=ABCMeta): @abstractmethod def _set_model(self, *args, **kwargs): pass @abstractmethod def _set_train_dataloader(self, *args, **kwargs): pass @abstractmethod def _set_optimizer(self, *args, **kwargs): pass @abstractmethod def _set_lr_scheduler(self, *args, **kwargs): pass @abstractmethod def load(self, *args, **kwargs): pass @abstractmethod def _save(self, *args, **kwargs): pass @abstractmethod def train(self, *args, **kwargs): pass @abstractmethod def test(self, *args, **kwargs): pass @abstractmethod def forward_pipeline(self, *args, **kwargs): pass
19.375
53
0.611613
79
775
5.848101
0.316456
0.331169
0.272727
0.350649
0.625541
0.625541
0.246753
0
0
0
0
0
0.277419
775
39
54
19.871795
0.825
0
0
0.62069
0
0
0
0
0
0
0
0
0
1
0.310345
false
0.310345
0.034483
0
0.37931
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
5
c1f4b3171e1ece7d1f469fa18639ac8dd4caf4f3
324
py
Python
plx_gpib_ethernet/__init__.py
snhobbs/prologix-gpib-ethernet
1cf5f673447d16bdcb359ef46258333f38b8a37f
[ "MIT" ]
23
2017-02-27T02:09:45.000Z
2022-03-30T11:17:10.000Z
plx_gpib_ethernet/__init__.py
snhobbs/prologix-gpib-ethernet
1cf5f673447d16bdcb359ef46258333f38b8a37f
[ "MIT" ]
5
2017-09-27T13:41:15.000Z
2021-03-07T09:13:14.000Z
plx_gpib_ethernet/__init__.py
snhobbs/prologix-gpib-ethernet
1cf5f673447d16bdcb359ef46258333f38b8a37f
[ "MIT" ]
9
2017-12-14T10:27:54.000Z
2021-01-05T03:20:52.000Z
from .plx_gpib_ethernet import PrologixGPIBEthernet from .plx_gpib_ethernet_device import PrologixGPIBEthernetDevice from .version import __version__ __all__ = ['plx_gpib_ethernet', 'plx_gpib_ethernet_device', 'PrologixGPIBEthernet', 'PrologixGPIBEthernetDevice', '__version__']
32.4
64
0.740741
28
324
7.785714
0.357143
0.12844
0.275229
0.174312
0
0
0
0
0
0
0
0
0.197531
324
9
65
36
0.838462
0
0
0
0
0
0.302469
0.154321
0
0
0
0
0
1
0
false
0
0.375
0
0.375
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
1
0
0
0
0
5
c1fa7c697472265c7b1596a261fd7f91163fbc94
134
py
Python
feature-demos/slicing.py
t4d-classes/python_03152021
41c0e688a895d6986422dfd0b60b38f356414f31
[ "MIT" ]
null
null
null
feature-demos/slicing.py
t4d-classes/python_03152021
41c0e688a895d6986422dfd0b60b38f356414f31
[ "MIT" ]
null
null
null
feature-demos/slicing.py
t4d-classes/python_03152021
41c0e688a895d6986422dfd0b60b38f356414f31
[ "MIT" ]
null
null
null
letters = [chr(num) for num in range(65, 91)] # print(letters) print(letters[-10:-3]) print(letters[10:-5:2]) # print(letters[8])
13.4
45
0.641791
23
134
3.73913
0.608696
0.55814
0.325581
0
0
0
0
0
0
0
0
0.103448
0.134328
134
9
46
14.888889
0.637931
0.238806
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.666667
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
1
0
5
de0fbb592d2d631109d3deed89407743c4053fba
233
py
Python
pirates/battle/DefenseRepeaterCannon.py
Willy5s/Pirates-Online-Rewritten
7434cf98d9b7c837d57c181e5dabd02ddf98acb7
[ "BSD-3-Clause" ]
81
2018-04-08T18:14:24.000Z
2022-01-11T07:22:15.000Z
pirates/battle/DefenseRepeaterCannon.py
Willy5s/Pirates-Online-Rewritten
7434cf98d9b7c837d57c181e5dabd02ddf98acb7
[ "BSD-3-Clause" ]
4
2018-09-13T20:41:22.000Z
2022-01-08T06:57:00.000Z
pirates/battle/DefenseRepeaterCannon.py
Willy5s/Pirates-Online-Rewritten
7434cf98d9b7c837d57c181e5dabd02ddf98acb7
[ "BSD-3-Clause" ]
26
2018-05-26T12:49:27.000Z
2021-09-11T09:11:59.000Z
from pandac.PandaModules import * from pirates.battle.DefenseCannon import DefenseCannon class DefenseRepeaterCannon(DefenseCannon): def __init__(self, cr, shipCannon=False): DefenseCannon.__init__(self, cr, shipCannon)
33.285714
54
0.793991
24
233
7.375
0.625
0.090395
0.112994
0.225989
0
0
0
0
0
0
0
0
0.128755
233
7
55
33.285714
0.871921
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.4
0
0.8
0
1
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
a9b2531055f38d029c71d90dd45c0e035b03497e
25
py
Python
api/__init__.py
yydcnjjw/anki-jp-tools
ddebd98f5c6f8b1a91020f558fc2ae7644739fd6
[ "Apache-2.0" ]
null
null
null
api/__init__.py
yydcnjjw/anki-jp-tools
ddebd98f5c6f8b1a91020f558fc2ae7644739fd6
[ "Apache-2.0" ]
null
null
null
api/__init__.py
yydcnjjw/anki-jp-tools
ddebd98f5c6f8b1a91020f558fc2ae7644739fd6
[ "Apache-2.0" ]
null
null
null
from .api import api_call
25
25
0.84
5
25
4
0.8
0
0
0
0
0
0
0
0
0
0
0
0.12
25
1
25
25
0.909091
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
a9c3380e9a153fdb6811f8cac8c9022929b1d78b
28,171
py
Python
calliope/backend/pyomo/constraints/group.py
guidogz/Calliope_guido
148ee39c3671e55ad3a1a2da216ee23112d16abf
[ "Apache-2.0" ]
null
null
null
calliope/backend/pyomo/constraints/group.py
guidogz/Calliope_guido
148ee39c3671e55ad3a1a2da216ee23112d16abf
[ "Apache-2.0" ]
null
null
null
calliope/backend/pyomo/constraints/group.py
guidogz/Calliope_guido
148ee39c3671e55ad3a1a2da216ee23112d16abf
[ "Apache-2.0" ]
null
null
null
""" Copyright (C) 2013-2019 Calliope contributors listed in AUTHORS. Licensed under the Apache 2.0 License (see LICENSE file). group.py ~~~~~~~~ Group constraints. """ import logging import numpy as np import pyomo.core as po # pylint: disable=import-error from calliope.backend.pyomo.util import loc_tech_is_in, get_param logger = logging.getLogger(__name__) ORDER = 20 # order in which to invoke constraints relative to other constraint files def return_noconstraint(*args): logger.debug('group constraint returned NoConstraint: {}'.format(','.join(args))) return po.Constraint.NoConstraint def load_constraints(backend_model): model_data_dict = backend_model.__calliope_model_data['data'] for sense in ['min', 'max', 'equals']: if 'group_energy_cap_share_{}'.format(sense) in model_data_dict: setattr( backend_model, 'group_energy_cap_share_{}_constraint'.format(sense), po.Constraint( getattr(backend_model, 'group_names_energy_cap_share_{}'.format(sense)), [sense], rule=energy_cap_share_constraint_rule ) ) if 'group_energy_cap_{}'.format(sense) in model_data_dict: setattr( backend_model, 'group_energy_cap_{}_constraint'.format(sense), po.Constraint( getattr(backend_model, 'group_names_energy_cap_{}'.format(sense)), [sense], rule=energy_cap_constraint_rule ) ) if 'group_resource_area_{}'.format(sense) in model_data_dict: setattr( backend_model, 'group_resource_area_{}_constraint'.format(sense), po.Constraint( getattr(backend_model, 'group_names_resource_area_{}'.format(sense)), [sense], rule=resource_area_constraint_rule ) ) if 'group_carrier_prod_{}'.format(sense) in model_data_dict: setattr( backend_model, 'group_carrier_prod_{}_constraint'.format(sense), po.Constraint( getattr(backend_model, 'group_names_carrier_prod_{}'.format(sense)), backend_model.carriers, [sense], rule=carrier_prod_constraint_rule ) ) if 'group_demand_share_{}'.format(sense) in model_data_dict: setattr( backend_model, 'group_demand_share_{}_constraint'.format(sense), po.Constraint(getattr(backend_model, 'group_names_demand_share_{}'.format(sense)), backend_model.carriers, [sense], rule=demand_share_constraint_rule) ) if 'group_demand_share_per_timestep_{}'.format(sense) in model_data_dict: setattr( backend_model, 'group_demand_share_per_timestep_{}_constraint'.format(sense), po.Constraint( getattr(backend_model, 'group_names_demand_share_per_timestep_{}'.format(sense)), backend_model.carriers, backend_model.timesteps, [sense], rule=demand_share_per_timestep_constraint_rule ) ) if 'group_carrier_prod_share_{}'.format(sense) in model_data_dict: setattr( backend_model, 'group_carrier_prod_share_{}_constraint'.format(sense), po.Constraint( getattr(backend_model, 'group_names_carrier_prod_share_{}'.format(sense)), backend_model.carriers, [sense], rule=carrier_prod_share_constraint_rule ) ) if 'group_carrier_prod_share_per_timestep_{}'.format(sense) in model_data_dict: setattr( backend_model, 'group_carrier_prod_share_per_timestep_{}_constraint'.format(sense), po.Constraint( getattr(backend_model, 'group_names_carrier_prod_share_per_timestep_{}'.format(sense)), backend_model.carriers, backend_model.timesteps, [sense], rule=carrier_prod_share_per_timestep_constraint_rule ) ) if 'group_net_import_share_{}'.format(sense) in model_data_dict: setattr( backend_model, 'group_net_import_share_{}_constraint'.format(sense), po.Constraint( getattr(backend_model, 'group_names_net_import_share_{}'.format(sense)), backend_model.carriers, [sense], rule=net_import_share_constraint_rule ) ) if 'group_cost_{}'.format(sense) in model_data_dict: setattr( backend_model, 'group_cost_{}_constraint'.format(sense), po.Constraint( getattr(backend_model, 'group_names_cost_{}'.format(sense)), backend_model.costs, [sense], rule=cost_cap_constraint_rule ) ) if 'group_cost_var_{}'.format(sense) in model_data_dict: setattr( backend_model, 'group_cost_var_{}_constraint'.format(sense), po.Constraint(getattr(backend_model, 'group_names_cost_var_{}'.format(sense)), backend_model.costs, [sense], rule=cost_var_cap_constraint_rule) ) if 'group_cost_investment_{}'.format(sense) in model_data_dict: setattr( backend_model, 'group_cost_investment_{}_constraint'.format(sense), po.Constraint( getattr(backend_model, 'group_names_cost_investment_{}'.format(sense)), backend_model.costs, [sense], rule=cost_investment_cap_constraint_rule ) ) if 'group_demand_share_per_timestep_decision' in model_data_dict: backend_model.group_demand_share_per_timestep_decision_main_constraint = po.Constraint( backend_model.group_names_demand_share_per_timestep_decision, backend_model.carriers, backend_model.techs, backend_model.timesteps, rule=demand_share_per_timestep_decision_main_constraint_rule ) backend_model.group_demand_share_per_timestep_decision_sum_constraint = po.Constraint( backend_model.group_names_demand_share_per_timestep_decision, backend_model.carriers, rule=demand_share_per_timestep_decision_sum_constraint_rule ) def equalizer(lhs, rhs, sign): if sign == 'max': return lhs <= rhs elif sign == 'min': return lhs >= rhs elif sign == 'equals': return lhs == rhs else: raise ValueError('Invalid sign: {}'.format(sign)) def get_demand_share_lhs_and_rhs_loc_tech_carriers(backend_model, group_name, carrier): """ Returns ------- (lhs_loc_tech_carriers, rhs_loc_tech_carriers): lhs are the supply technologies, rhs are the demand technologies """ lhs_loc_techs = getattr( backend_model, 'group_constraint_loc_techs_{}'.format(group_name) ) lhs_locs = set(loc_tech.split('::')[0] for loc_tech in lhs_loc_techs) lhs_loc_tech_carriers = [ i for i in backend_model.loc_tech_carriers_prod if i.rsplit('::', 1)[0] in lhs_loc_techs and i.split('::')[-1] == carrier ] rhs_loc_tech_carriers = [ i for i in backend_model.loc_tech_carriers_demand if i.split('::')[0] in lhs_locs and i.split('::')[-1] == carrier ] return (lhs_loc_tech_carriers, rhs_loc_tech_carriers) def demand_share_constraint_rule(backend_model, group_name, carrier, what): """ Enforces shares of demand of a carrier to be met by the given groups of technologies at the given locations, on average over the entire model period. The share is relative to ``demand`` technologies only. .. container:: scrolling-wrapper .. math:: \\sum_{loc::tech::carrier \\in given\\_group, timestep \\in timesteps} carrier_{prod}(loc::tech::carrier, timestep) \\leq share \\times \\sum_{loc::tech:carrier \\in loc\\_techs\\_demand \\in given\\_locations, timestep\\in timesteps} carrier_{con}(loc::tech::carrier, timestep) """ share = get_param(backend_model, 'group_demand_share_{}'.format(what), (carrier, group_name)) if share is None: return return_noconstraint('demand_share', group_name) else: lhs_loc_tech_carriers, rhs_loc_tech_carriers = get_demand_share_lhs_and_rhs_loc_tech_carriers( backend_model, group_name, carrier ) lhs = sum( backend_model.carrier_prod[loc_tech_carrier, timestep] for loc_tech_carrier in lhs_loc_tech_carriers for timestep in backend_model.timesteps ) rhs = share * -1 * sum( backend_model.carrier_con[loc_tech_carrier, timestep] for loc_tech_carrier in rhs_loc_tech_carriers for timestep in backend_model.timesteps ) return equalizer(lhs, rhs, what) def demand_share_per_timestep_constraint_rule(backend_model, group_name, carrier, timestep, what): """ Enforces shares of demand of a carrier to be met by the given groups of technologies at the given locations, in each timestep. The share is relative to ``demand`` technologies only. .. container:: scrolling-wrapper .. math:: \\sum_{loc::tech::carrier \\in given\\_group} carrier_{prod}(loc::tech::carrier, timestep) \\leq share \\times \\sum_{loc::tech:carrier \\in loc\\_techs\\_demand \\in given\\_locations} carrier_{con}(loc::tech::carrier, timestep) for timestep \\in timesteps """ share = get_param(backend_model, 'group_demand_share_per_timestep_{}'.format(what), (carrier, group_name)) if share is None: return return_noconstraint('demand_share_per_timestep', group_name) else: lhs_loc_tech_carriers, rhs_loc_tech_carriers = get_demand_share_lhs_and_rhs_loc_tech_carriers( backend_model, group_name, carrier ) lhs = sum( backend_model.carrier_prod[loc_tech_carrier, timestep] for loc_tech_carrier in lhs_loc_tech_carriers ) rhs = share * -1 * sum( backend_model.carrier_con[loc_tech_carrier, timestep] for loc_tech_carrier in rhs_loc_tech_carriers ) return equalizer(lhs, rhs, what) def demand_share_per_timestep_decision_main_constraint_rule(backend_model, group_name, carrier, tech, timestep): """ Allows the model to decide on how a fraction demand for a carrier is met by the given groups, which will all have the same share in each timestep. The share is relative to the actual demand from ``demand`` technologies only. The main constraint enforces that the shares are the same in each timestep. .. container:: scrolling-wrapper .. math:: \\sum_{loc::tech::carrier \\in given\\_group} carrier_{prod}(loc::tech::carrier, timestep) = \\sum_{loc::tech::carrier \\in given\\_group} required\\_resource(loc::tech::carrier, timestep) \\times \\sum_{loc::tech::carrier \\in given\\_group} demand\\_share\\_per\\_timestep\\_decision(loc::tech::carrier) \\forall timestep \\in timesteps \\forall tech \\in techs """ share_of_carrier_demand = get_param(backend_model, 'group_demand_share_per_timestep_decision', (carrier, group_name)) if share_of_carrier_demand is None: return return_noconstraint('demand_share_per_timestep_decision_main', group_name) else: # lhs are the supply technologies, rhs are the demand technologies lhs_loc_tech_carriers, rhs_loc_tech_carriers = get_demand_share_lhs_and_rhs_loc_tech_carriers( backend_model, group_name, carrier ) # Filter the supply loc_tech_carriers by the current tech lhs_loc_tech_carriers = [i for i in lhs_loc_tech_carriers if '::{}::'.format(tech) in i] # Only techs that are in the given group are considered if len(lhs_loc_tech_carriers) == 0: return return_noconstraint('demand_share_per_timestep_decision_main', group_name) lhs = sum( backend_model.carrier_prod[loc_tech_carrier, timestep] for loc_tech_carrier in lhs_loc_tech_carriers ) rhs = -1 * sum( backend_model.required_resource[rhs_loc_tech_carrier.rsplit('::', 1)[0], timestep] for rhs_loc_tech_carrier in rhs_loc_tech_carriers ) * sum( backend_model.demand_share_per_timestep_decision[lhs_loc_tech_carrier] for lhs_loc_tech_carrier in lhs_loc_tech_carriers ) return equalizer(lhs, rhs, 'equals') def demand_share_per_timestep_decision_sum_constraint_rule(backend_model, group_name, carrier): """ Allows the model to decide on how a fraction of demand for a carrier is met by the given groups, which will all have the same share in each timestep. The share is relative to the actual demand from ``demand`` technologies only. The sum constraint ensures that all decision shares add up to the share of carrier demand specified in the constraint. This constraint is only applied if the share of carrier demand has been set to a not-None value. .. container:: scrolling-wrapper .. math:: share = \\sum_{loc::tech::carrier \\in given\\_group} demand\\_share\\_per\\_timestep\\_decision(loc::tech::carrier) """ share_of_carrier_demand = get_param(backend_model, 'group_demand_share_per_timestep_decision', (carrier, group_name)) # If inf was given that means that we don't limit the total share if share_of_carrier_demand is None or np.isinf(share_of_carrier_demand): return return_noconstraint('demand_share_per_timestep_decision_sum', group_name) else: lhs_loc_tech_carriers, _ = get_demand_share_lhs_and_rhs_loc_tech_carriers( backend_model, group_name, carrier ) return share_of_carrier_demand == sum( backend_model.demand_share_per_timestep_decision[loc_tech_carrier] for loc_tech_carrier in lhs_loc_tech_carriers ) def get_carrier_prod_share_lhs_and_rhs_loc_techs(backend_model, group_name): lhs_loc_techs = getattr( backend_model, 'group_constraint_loc_techs_{}'.format(group_name) ) lhs_locs = [loc_tech.split('::')[0] for loc_tech in lhs_loc_techs] rhs_loc_techs = [ i for i in backend_model.loc_techs_supply_conversion_all if i.split('::')[0] in lhs_locs ] return (lhs_loc_techs, rhs_loc_techs) def carrier_prod_share_constraint_rule(backend_model, constraint_group, carrier, what): """ Enforces shares of carrier_prod for groups of technologies and locations, on average over the entire model period. The share is relative to ``supply`` and ``supply_plus`` technologies only. .. container:: scrolling-wrapper .. math:: \\sum_{loc::tech::carrier \\in given\\_group, timestep \\in timesteps} carrier_{prod}(loc::tech::carrier, timestep) \\leq share \\times \\sum_{loc::tech:carrier \\in loc\\_tech\\_carriers\\_supply\\_all \\in given\\_locations, timestep\\in timesteps} carrier_{prod}(loc::tech::carrier, timestep) """ share = get_param(backend_model, 'group_carrier_prod_share_{}'.format(what), (carrier, constraint_group)) if share is None: return return_noconstraint('supply_share', constraint_group) else: lhs_loc_techs, rhs_loc_techs = get_carrier_prod_share_lhs_and_rhs_loc_techs( backend_model, constraint_group ) lhs = sum( backend_model.carrier_prod[loc_tech + '::' + carrier, timestep] for loc_tech in lhs_loc_techs for timestep in backend_model.timesteps ) rhs = share * sum( backend_model.carrier_prod[loc_tech + '::' + carrier, timestep] for loc_tech in rhs_loc_techs for timestep in backend_model.timesteps ) return equalizer(lhs, rhs, what) def carrier_prod_share_per_timestep_constraint_rule(backend_model, constraint_group, carrier, timestep, what): """ Enforces shares of carrier_prod for groups of technologies and locations, in each timestep. The share is relative to ``supply`` and ``supply_plus`` technologies only. .. container:: scrolling-wrapper .. math:: \\sum_{loc::tech::carrier \\in given\\_group} carrier_{prod}(loc::tech::carrier, timestep) \\leq share \\times \\sum_{loc::tech:carrier \\in loc\\_tech\\_carriers\\_supply\\_all \\in given\\_locations} carrier_{prod}(loc::tech::carrier, timestep) for timestep \\in timesteps """ share = get_param(backend_model, 'group_carrier_prod_share_per_timestep_{}'.format(what), (carrier, constraint_group)) if share is None: return return_noconstraint('carrier_prod_share_per_timestep', constraint_group) else: lhs_loc_techs, rhs_loc_techs = get_carrier_prod_share_lhs_and_rhs_loc_techs( backend_model, constraint_group ) lhs = sum( backend_model.carrier_prod[loc_tech + '::' + carrier, timestep] for loc_tech in lhs_loc_techs ) rhs = share * sum( backend_model.carrier_prod[loc_tech + '::' + carrier, timestep] for loc_tech in rhs_loc_techs ) return equalizer(lhs, rhs, what) def net_import_share_constraint_rule(backend_model, constraint_group, carrier, what): """ Enforces demand shares of net imports from transmission technologies for groups of locations, on average over the entire model period. Transmission within the group are ignored. The share is relative to ``demand`` technologies only. .. container:: scrolling-wrapper .. math:: \\sum_{loc::tech::carrier \\in loc\\_tech\\_carriers\\_transmission \\in given\\_locations, timestep \\in timesteps} carrier_{prod}(loc::tech::carrier, timestep) + \\sum_{loc::tech::carrier \\in loc\\_tech\\_carriers\\_transmission \\in given\\_locations, timestep \\in timesteps} carrier_{con}(loc::tech::carrier, timestep) \\leq share \\times \\sum_{loc::tech:carrier \\in loc\\_tech\\_demand \\in given\\_locations, timestep\\in timesteps} carrier_{con}(loc::tech::carrier, timestep) """ share = get_param(backend_model, 'group_net_import_share_{}'.format(what), (carrier, constraint_group)) if share.value is None: return return_noconstraint('net_import_share', constraint_group) else: trans_loc_tech = getattr( backend_model, 'group_constraint_loc_techs_{}'.format(constraint_group) ) locs = set(loc_tech.split('::')[0] for loc_tech in trans_loc_tech) trans_loc_tech = filter(lambda loc_tec: loc_tec.split(":")[-1] not in locs, trans_loc_tech) demand_loc_tech = [ i for i in backend_model.loc_tech_carriers_demand if i.split('::')[0] in locs ] lhs = sum( (backend_model.carrier_prod[loc_tech + '::' + carrier, timestep] + backend_model.carrier_con[loc_tech + '::' + carrier, timestep]) for loc_tech in trans_loc_tech for timestep in backend_model.timesteps ) rhs = - share * sum( backend_model.carrier_con[loc_tech, timestep] for loc_tech in demand_loc_tech for timestep in backend_model.timesteps ) return equalizer(lhs, rhs, what) def carrier_prod_constraint_rule(backend_model, constraint_group, carrier, what): """ Enforces carrier_prod for groups of technologies and locations, as a sum over the entire model period. .. container:: scrolling-wrapper .. math:: \\sum_{loc::tech::carrier \\in given\\_group, timestep \\in timesteps} carrier_{prod}(loc::tech::carrier, timestep) \\leq supply_max """ limit = get_param(backend_model, 'group_carrier_prod_{}'.format(what), (carrier, constraint_group)) if limit is None: return return_noconstraint('carrier_prod', constraint_group) else: # We won't actually use the rhs techs lhs_loc_techs, rhs_loc_techs = get_carrier_prod_share_lhs_and_rhs_loc_techs( backend_model, constraint_group ) lhs = sum( backend_model.carrier_prod[loc_tech + '::' + carrier, timestep] for loc_tech in lhs_loc_techs for timestep in backend_model.timesteps if loc_tech + '::' + carrier in backend_model.loc_tech_carriers_prod ) return equalizer(lhs, limit, what) def energy_cap_share_constraint_rule(backend_model, constraint_group, what): """ Enforces shares of energy_cap for groups of technologies and locations. The share is relative to ``supply`` and ``supply_plus`` technologies only. .. container:: scrolling-wrapper .. math:: \\sum_{loc::tech \\in given\\_group} energy_{cap}(loc::tech) \\leq share \\times \\sum_{loc::tech \\in loc\\_tech\\_supply\\_all \\in given\\_locations} energy_{cap}(loc::tech) """ share = get_param(backend_model, 'group_energy_cap_share_{}'.format(what), (constraint_group)) if share is None: return return_noconstraint('energy_cap_share', constraint_group) else: lhs_loc_techs = getattr( backend_model, 'group_constraint_loc_techs_{}'.format(constraint_group) ) lhs_locs = [loc_tech.split('::')[0] for loc_tech in lhs_loc_techs] rhs_loc_techs = [ i for i in backend_model.loc_techs_supply_conversion_all if i.split('::')[0] in lhs_locs ] lhs = sum( backend_model.energy_cap[loc_tech] for loc_tech in lhs_loc_techs ) rhs = share * sum( backend_model.energy_cap[loc_tech] for loc_tech in rhs_loc_techs ) return equalizer(lhs, rhs, what) def energy_cap_constraint_rule(backend_model, constraint_group, what): """ Enforce upper and lower bounds for energy_cap of energy_cap for groups of technologies and locations. .. container:: scrolling-wrapper .. math:: \\sum_{loc::tech \\in given\\_group} energy_{cap}(loc::tech) \\leq energy\\_cap\\_max\\\\ \\sum_{loc::tech \\in given\\_group} energy_{cap}(loc::tech) \\geq energy\\_cap\\_min """ threshold = get_param(backend_model, 'group_energy_cap_{}'.format(what), (constraint_group)) if threshold is None: return return_noconstraint('energy_cap', constraint_group) else: lhs_loc_techs = getattr( backend_model, 'group_constraint_loc_techs_{}'.format(constraint_group) ) # Transmission techs only contribute half their capacity in each direction lhs = [] for loc_tech in lhs_loc_techs: if loc_tech_is_in(backend_model, loc_tech, 'loc_techs_transmission'): weight = 0.5 else: weight = 1 lhs.append(weight * backend_model.energy_cap[loc_tech]) rhs = threshold return equalizer(sum(lhs), rhs, what) def cost_cap_constraint_rule(backend_model, group_name, cost, what): """ Limit cost for a specific cost class to a certain value, i.e. Ɛ-constrained costs, for groups of technologies and locations. .. container:: scrolling-wrapper .. math:: \\sum{loc::tech \\in loc\\_techs_{group\\_name}, timestep \\in timesteps} \\boldsymbol{cost}(cost, loc::tech, timestep) \\begin{cases} \\leq cost\\_max(cost) \\geq cost\\_min(cost) = cost\\_equals(cost) \\end{cases} """ cost_cap = get_param(backend_model, 'group_cost_{}'.format(what), (cost, group_name)) if cost_cap is None: return return_noconstraint('cost_cap', group_name) else: loc_techs = [i for i in getattr( backend_model, 'group_constraint_loc_techs_{}'.format(group_name) ) if i in backend_model.loc_techs_cost] sum_cost = sum(backend_model.cost[cost, loc_tech] for loc_tech in loc_techs) return equalizer(sum_cost, cost_cap, what) def cost_investment_cap_constraint_rule(backend_model, group_name, cost, what): """ Limit investment costs specific to a cost class to a certain value, i.e. Ɛ-constrained costs, for groups of technologies and locations. .. container:: scrolling-wrapper .. math:: \\sum{loc::tech \\in loc\\_techs_{group\\_name}, timestep \\in timesteps} \\boldsymbol{cost\\_{investment}}(cost, loc::tech, timestep) \\begin{cases} \\leq cost\\_investment\\_max(cost) \\geq cost\\_investment\\_min(cost) = cost\\_investment\\_equals(cost) \\end{cases} """ cost_cap = get_param(backend_model, 'group_cost_investment_{}'.format(what), (cost, group_name)) if cost_cap is None: return return_noconstraint('cost_investment_cap', group_name) else: loc_techs = [i for i in getattr( backend_model, 'group_constraint_loc_techs_{}'.format(group_name) ) if i in backend_model.loc_techs_investment_cost] sum_cost = sum(backend_model.cost_investment[cost, loc_tech] for loc_tech in loc_techs) return equalizer(sum_cost, cost_cap, what) def cost_var_cap_constraint_rule(backend_model, group_name, cost, what): """ Limit variable costs specific to a cost class to a certain value, i.e. Ɛ-constrained costs, for groups of technologies and locations. .. container:: scrolling-wrapper .. math:: \\sum{loc::tech \\in loc\\_techs_{group\\_name}, timestep \\in timesteps} \\boldsymbol{cost\\_{var}}(cost, loc::tech, timestep) \\begin{cases} \\leq cost\\_var\\_max(cost) \\geq cost\\_var\\_min(cost) = cost\\_var\\_equals(cost) \\end{cases} """ cost_cap = get_param(backend_model, 'group_cost_var_{}'.format(what), (cost, group_name)) if cost_cap is None: return return_noconstraint('cost_var_cap', group_name) else: loc_techs = [i for i in getattr( backend_model, 'group_constraint_loc_techs_{}'.format(group_name) ) if i in backend_model.loc_techs_om_cost] sum_cost = sum( backend_model.cost_var[cost, loc_tech, timestep] for loc_tech in loc_techs for timestep in backend_model.timesteps ) return equalizer(sum_cost, cost_cap, what) def resource_area_constraint_rule(backend_model, constraint_group, what): """ Enforce upper and lower bounds of resource_area for groups of technologies and locations. .. container:: scrolling-wrapper .. math:: \\boldsymbol{resource_{area}}(loc::tech) \\leq group\\_resource\\_area\\_max\\\\ \\boldsymbol{resource_{area}}(loc::tech) \\geq group\\_resource\\_area\\_min """ threshold = get_param(backend_model, 'group_resource_area_{}'.format(what), (constraint_group)) if threshold is None: return return_noconstraint('resource_area', constraint_group) else: lhs_loc_techs = getattr( backend_model, 'group_constraint_loc_techs_{}'.format(constraint_group) ) lhs = sum( backend_model.resource_area[loc_tech] for loc_tech in lhs_loc_techs ) rhs = threshold return equalizer(lhs, rhs, what)
38.172087
180
0.648007
3,455
28,171
4.927352
0.062518
0.0625
0.06391
0.0336
0.861842
0.822956
0.799753
0.743832
0.680745
0.650611
0
0.001619
0.25473
28,171
737
181
38.223881
0.80924
0.275745
0
0.424623
0
0
0.112664
0.092854
0
0
0
0
0
1
0.047739
false
0
0.027638
0
0.163317
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
a9f3be09cba4d1a0ebb5496b58ee3addc8a1b51b
44
py
Python
python/dgl/_ffi/_ctypes/__init__.py
ketyi/dgl
a1b859c29b63a673c148d13231a49504740e0e01
[ "Apache-2.0" ]
9,516
2018-12-08T22:11:31.000Z
2022-03-31T13:04:33.000Z
python/dgl/_ffi/_ctypes/__init__.py
ketyi/dgl
a1b859c29b63a673c148d13231a49504740e0e01
[ "Apache-2.0" ]
2,494
2018-12-08T22:43:00.000Z
2022-03-31T21:16:27.000Z
python/dgl/_ffi/_ctypes/__init__.py
ketyi/dgl
a1b859c29b63a673c148d13231a49504740e0e01
[ "Apache-2.0" ]
2,529
2018-12-08T22:56:14.000Z
2022-03-31T13:07:41.000Z
"""ctypes specific implementation of FFI"""
22
43
0.75
5
44
6.6
1
0
0
0
0
0
0
0
0
0
0
0
0.113636
44
1
44
44
0.846154
0.840909
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
e764248423e9e625e62d79fe79c7d0a157c84d10
3,323
py
Python
src/custom_shapes.py
charleswilmot/Contrastive_DPG
e63f3251ea2501ca8416a0c57d12fff9df4ef039
[ "BSD-2-Clause" ]
null
null
null
src/custom_shapes.py
charleswilmot/Contrastive_DPG
e63f3251ea2501ca8416a0c57d12fff9df4ef039
[ "BSD-2-Clause" ]
null
null
null
src/custom_shapes.py
charleswilmot/Contrastive_DPG
e63f3251ea2501ca8416a0c57d12fff9df4ef039
[ "BSD-2-Clause" ]
null
null
null
import pyrep from pyrep.objects import Shape, Dummy, Object from pyrep.robots.arms.arm import Arm from pyrep.const import ObjectType class StatefulObject(Dummy): def __init__(self, name_or_handle, pyrep): super().__init__(name_or_handle) self._pyrep = pyrep def get_state(self): funcname = "getState@{}".format(self.get_name()) ints, floats, strings, bytes = self._pyrep.script_call(funcname, pyrep.const.sim.sim_scripttype_childscript) if not ints: raise ValueError( "Script return value incorect ({})".format(self.get_name()) ) return ints[0] def set_state(self, on): funcname = "setState@{}".format(self.get_name()) ints, floats, strings, bytes = self._pyrep.script_call( funcname, pyrep.const.sim.sim_scripttype_childscript, ints=[int(on)] ) if not ints: raise ValueError( "Script return value incorect ({})".format(self.get_name()) ) return ints[0] def set_goal(self, on): funcname = "setGoal@{}".format(self.get_name()) ints, floats, strings, bytes = self._pyrep.script_call( funcname, pyrep.const.sim.sim_scripttype_childscript, ints=[int(on)] ) if not ints: raise ValueError( "Script return value incorect ({})".format(self.get_name()) ) return ints[0] class TapShape(StatefulObject): def __init__(self, name_or_handle, pyrep): super().__init__(name_or_handle, pyrep) proximity_sensors = self.get_objects_in_tree( object_type=ObjectType.PROXIMITY_SENSOR ) self.proximity_sensor_0 = next( s for s in proximity_sensors if s.get_name().startswith("proximity_sensor_0") ) self.proximity_sensor_1 = next( s for s in proximity_sensors if s.get_name().startswith("proximity_sensor_1") ) self.joint = self.get_objects_in_tree( object_type=ObjectType.JOINT )[0] class ButtonShape(StatefulObject): def __init__(self, name_or_handle, pyrep): super().__init__(name_or_handle, pyrep) self.proximity_sensor = self.get_objects_in_tree( object_type=ObjectType.PROXIMITY_SENSOR )[0] class LeverShape(StatefulObject): def __init__(self, name_or_handle, pyrep): super().__init__(name_or_handle, pyrep) proximity_sensors = self.get_objects_in_tree( object_type=ObjectType.PROXIMITY_SENSOR ) self.proximity_sensor_0 = next( s for s in proximity_sensors if s.get_name().startswith("proximity_sensor_0") ) self.proximity_sensor_1 = next( s for s in proximity_sensors if s.get_name().startswith("proximity_sensor_1") ) self.joint = self.get_objects_in_tree( object_type=ObjectType.JOINT )[0] class Kuka(Arm): def __init__(self, name_or_handle): if type(name_or_handle) is int: name = Object.get_object_name(name_or_handle) else: name = name_or_handle super().__init__(count=0, name=name, num_joints=7)
32.90099
116
0.614505
394
3,323
4.829949
0.180203
0.037835
0.07567
0.062533
0.785602
0.785602
0.773516
0.773516
0.773516
0.773516
0
0.006765
0.288294
3,323
100
117
33.23
0.797886
0
0
0.586207
0
0
0.061089
0
0
0
0
0
0
1
0.091954
false
0
0.045977
0
0.229885
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
e7cad18636fc98345e1722c27da275915f3865e8
164
py
Python
codewars/7kyu/doha22/shortest_word/shortest_word.py
doha22/Training_one
0cd7cf86c7da0f6175834146296b763d1841766b
[ "MIT" ]
null
null
null
codewars/7kyu/doha22/shortest_word/shortest_word.py
doha22/Training_one
0cd7cf86c7da0f6175834146296b763d1841766b
[ "MIT" ]
2
2019-01-22T10:53:42.000Z
2019-01-31T08:02:48.000Z
codewars/7kyu/doha22/shortest_word/shortest_word.py
doha22/Training_one
0cd7cf86c7da0f6175834146296b763d1841766b
[ "MIT" ]
13
2019-01-22T10:37:42.000Z
2019-01-25T13:30:43.000Z
def find_short(s): # your code here m = min(s.split(), key = len) l = len(m) return l def find_short2(s): return min(len(x) for x in s.split())
20.5
41
0.573171
31
164
2.967742
0.580645
0.152174
0
0
0
0
0
0
0
0
0
0.008403
0.27439
164
8
41
20.5
0.764706
0.085366
0
0
0
0
0
0
0
0
0
0.125
0
1
0.333333
false
0
0
0.166667
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
1
1
0
0
5
99e153c82ab038ba5f02bba579b5c82772dca0bd
148
py
Python
trialpage.py
Glenn-Po/LearningPython
96b12999d13b55216a3da6cf6b9248a8e86cbe0b
[ "Apache-2.0" ]
null
null
null
trialpage.py
Glenn-Po/LearningPython
96b12999d13b55216a3da6cf6b9248a8e86cbe0b
[ "Apache-2.0" ]
null
null
null
trialpage.py
Glenn-Po/LearningPython
96b12999d13b55216a3da6cf6b9248a8e86cbe0b
[ "Apache-2.0" ]
null
null
null
'''from enum import Enum class Color(Enum): red = 1 green = 2 blue = 3 print(Color.red) print(Color(1)) print(Color['red']) '''
10.571429
24
0.567568
22
148
3.818182
0.545455
0.357143
0.309524
0
0
0
0
0
0
0
0
0.036697
0.263514
148
13
25
11.384615
0.733945
0.932432
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
1
1
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
0
1
0
0
0
0
0
0
5
823812aefc7ef7a844b1b42375eaa424e4546d55
43
py
Python
src/includes/python/bin.py
vmchale/project-init
722b36504c554814c3cdfe374810d789527ad872
[ "BSD-3-Clause" ]
121
2017-05-01T12:48:29.000Z
2022-03-23T02:08:01.000Z
src/includes/python/bin.py
vmchale/project-init
722b36504c554814c3cdfe374810d789527ad872
[ "BSD-3-Clause" ]
11
2017-05-01T08:54:50.000Z
2020-04-02T06:22:12.000Z
src/includes/python/bin.py
vmchale/project-init
722b36504c554814c3cdfe374810d789527ad872
[ "BSD-3-Clause" ]
12
2017-05-01T12:49:38.000Z
2022-01-27T20:24:35.000Z
#!/usr/bin/env python import {{ project }}
14.333333
21
0.651163
6
43
4.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.139535
43
2
22
21.5
0.756757
0.465116
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
1
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
1
0
0
0
0
5
41641dd92e35cc6c411f54800f89c260674a6fbd
90
py
Python
python_perl_storable/__init__.py
darviarush/python-perl-storable
5757664c5adedfbe73fd592d5270692a7f02f136
[ "MIT" ]
null
null
null
python_perl_storable/__init__.py
darviarush/python-perl-storable
5757664c5adedfbe73fd592d5270692a7f02f136
[ "MIT" ]
null
null
null
python_perl_storable/__init__.py
darviarush/python-perl-storable
5757664c5adedfbe73fd592d5270692a7f02f136
[ "MIT" ]
null
null
null
from .thaw import thaw from .freeze import freeze from .perl import freeze_perl, thaw_perl
30
40
0.822222
15
90
4.8
0.333333
0.333333
0
0
0
0
0
0
0
0
0
0
0.133333
90
3
40
30
0.923077
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
419502f7e70ebe37d2e9dc43deab17d098696dbe
58
py
Python
atcoder/abc/abc004_b.py
knuu/competitive-programming
16bc68fdaedd6f96ae24310d697585ca8836ab6e
[ "MIT" ]
1
2018-11-12T15:18:55.000Z
2018-11-12T15:18:55.000Z
atcoder/abc/abc004_b.py
knuu/competitive-programming
16bc68fdaedd6f96ae24310d697585ca8836ab6e
[ "MIT" ]
null
null
null
atcoder/abc/abc004_b.py
knuu/competitive-programming
16bc68fdaedd6f96ae24310d697585ca8836ab6e
[ "MIT" ]
null
null
null
print('\n'.join([input()[::-1] for _ in range(4)][::-1]))
29
57
0.5
10
58
2.8
0.9
0
0
0
0
0
0
0
0
0
0
0.056604
0.086207
58
1
58
58
0.471698
0
0
0
0
0
0.034483
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
41a2b17a7a55854954ce305f1b6d4bc40b78b910
23
py
Python
rama_master.py
mmayar/Clase-Ciencia-de-los-Datos
28ad34663ef25a3ab7ce528b50b19159581e7d35
[ "MIT" ]
null
null
null
rama_master.py
mmayar/Clase-Ciencia-de-los-Datos
28ad34663ef25a3ab7ce528b50b19159581e7d35
[ "MIT" ]
null
null
null
rama_master.py
mmayar/Clase-Ciencia-de-los-Datos
28ad34663ef25a3ab7ce528b50b19159581e7d35
[ "MIT" ]
null
null
null
print("Hallo an alle")
11.5
22
0.695652
4
23
4
1
0
0
0
0
0
0
0
0
0
0
0
0.130435
23
1
23
23
0.8
0
0
0
0
0
0.565217
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
68bd9d0fda3baf8dd7058ae47f699979d789341a
4,196
py
Python
baseline/unet/unet_model.py
Hwihuni/Deep-Model-Watermarking
73ea2286ace0aac3d55f6056da38ea2bc38ed00d
[ "MIT" ]
null
null
null
baseline/unet/unet_model.py
Hwihuni/Deep-Model-Watermarking
73ea2286ace0aac3d55f6056da38ea2bc38ed00d
[ "MIT" ]
null
null
null
baseline/unet/unet_model.py
Hwihuni/Deep-Model-Watermarking
73ea2286ace0aac3d55f6056da38ea2bc38ed00d
[ "MIT" ]
null
null
null
""" Full assembly of the parts to form the complete network """ import torch.nn.functional as F import math from .unet_parts import * class UNet(nn.Module): def __init__(self, n_channels, n_classes, bilinear=True): super(UNet, self).__init__() self.n_channels = n_channels self.n_classes = n_classes self.bilinear = bilinear self.inc = DoubleConv(self.n_channels, 64) self.down1 = Down(64, 128) self.down2 = Down(128, 256) self.down3 = Down(256, 512) factor = 2 if bilinear else 1 self.down4 = Down(512, 1024 // factor, 1024) self.up1 = Up(1024, 512 // factor, bilinear) self.up2 = Up(512, 256 // factor, bilinear) self.up3 = Up(256, 128 // factor, bilinear) self.up4 = Up(128, 64, bilinear) self.outc = OutConv(64, self.n_classes) def forward(self, x): x1 = self.inc(x) x2 = self.down1(x1) x3 = self.down2(x2) x4 = self.down3(x3) x5 = self.down4(x4) x6 = self.up1(x5, x4) x7 = self.up2(x6, x3) x8 = self.up3(x7, x2) # x9 = self.up4(x8, x1) logits = self.outc(x9) return logits class Fc(nn.Module): def __init__(self,n_channels, n_classes): super(Fc, self).__init__() self.n_channels2 = n_channels self.n_classes2 = n_classes self.fc1 = Conv_1D(self.n_channels2, 160) self.fc2 = Conv_1D(160, 240) self.fc3 = Conv_1D(240+self.n_channels2, 320) self.fc4 = Conv_1D(320, 360) self.fc5 = Conv_1D(360+self.n_channels2, 480) self.fc6 = Conv_1D(480, 520) self.fc7 = Conv_1D(520+self.n_channels2, 600) self.outfc = Conv_1D(600, self.n_classes2) def forward(self, x_mid): x21 = self.fc1(x_mid) x22 = torch.cat([x_mid,self.fc2(x21)], dim=1) x23 = self.fc3(x22) x24 = torch.cat([x_mid,self.fc4(x23)], dim=1) x25 = self.fc5(x24) x26 = torch.cat([x_mid,self.fc6(x25)], dim=1) x27 = self.fc7(x26) logits = self.outfc(x27) return logits class Model_int(nn.Module): def __init__(self, n_channels, n_classes, bilinear=True): super(Model_int, self).__init__() self.n_channels1 = 1 self.n_classes1 = 1 self.n_channels2 = 3 self.n_classes2 = 1 self.bilinear = bilinear self.inc = DoubleConv(self.n_channels1, 64) self.down1 = Down(64, 128) self.down2 = Down(128, 256) self.down3 = Down(256, 512) factor = 2 if bilinear else 1 self.down4 = Down(512, 1024 // factor, 1024) self.up1 = Up(1024, 512 // factor, bilinear) self.up2 = Up(512, 256 // factor, bilinear) self.up3 = Up(256, 128 // factor, bilinear) self.up4 = Up(128, 64, bilinear) self.outc = OutConv(64, self.n_classes1) self.pool = nn.AvgPool2d(3) self.intep = nn.Upsample(scale_factor=3) self.fc1 = Conv_1D(self.n_channels2, 160) self.fc2 = Conv_1D(160, 240) self.fc3 = Conv_1D(240+self.n_channels2, 320) self.fc4 = Conv_1D(320, 360) self.fc5 = Conv_1D(360+self.n_channels2, 480) self.fc6 = Conv_1D(480, 520) self.fc7 = Conv_1D(520+self.n_channels2, 600) self.outfc = Conv_1D(600, self.n_classes2) def forward(self, xin): x = xin[:,1:2,:,:]/(1e-12+xin[:,0:1,:,:]) x1 = self.inc(x) x2 = self.down1(x1) x3 = self.down2(x2) x4 = self.down3(x3) x5 = self.down4(x4) x6 = self.up1(x5, x4) x7 = self.up2(x6, x3) x8 = self.up3(x7, x2) # x9 = self.up4(x8, x1) #mid = self.intep(self.pool(self.outc(x9))) mid = self.outc(x9) x_mid = torch.cat([mid, xin], dim=1) x21 = self.fc1(x_mid) x22 = torch.cat([x_mid,self.fc2(x21)], dim=1) x23 = self.fc3(x22) x24 = torch.cat([x_mid,self.fc4(x23)], dim=1) x25 = self.fc5(x24) x26 = torch.cat([x_mid,self.fc6(x25)], dim=1) x27 = self.fc7(x26) logits = torch.cat([mid, self.outfc(x27)], dim=1) return logits
33.03937
63
0.565062
626
4,196
3.65016
0.175719
0.054705
0.061269
0.03151
0.748359
0.740481
0.740481
0.740481
0.70372
0.687965
0
0.141117
0.295758
4,196
126
64
33.301587
0.632149
0.023594
0
0.688679
0
0
0
0
0
0
0
0
0
1
0.056604
false
0
0.028302
0
0.141509
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
ec13f693c464363c80dac6e1e9bb81473a79b180
36
py
Python
Python/mol.py
abdalrhmanyasser/Abdalrhman_Rep
e0fc3caa2cc04e92f591ccd7934586986d194000
[ "CC0-1.0" ]
null
null
null
Python/mol.py
abdalrhmanyasser/Abdalrhman_Rep
e0fc3caa2cc04e92f591ccd7934586986d194000
[ "CC0-1.0" ]
null
null
null
Python/mol.py
abdalrhmanyasser/Abdalrhman_Rep
e0fc3caa2cc04e92f591ccd7934586986d194000
[ "CC0-1.0" ]
null
null
null
from molWeight import * findweight()
18
23
0.805556
4
36
7.25
1
0
0
0
0
0
0
0
0
0
0
0
0.111111
36
2
24
18
0.90625
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
6b7ed0bd2e983164eb376218da1fde2970942777
131
py
Python
src/prefect/tasks/mixpanel/__init__.py
suryatmodulus/prefect
e4ac9f6aa831140c7fba0397f3e5e0884b1b9e42
[ "Apache-2.0" ]
3
2021-11-09T10:46:58.000Z
2022-03-11T04:22:35.000Z
src/prefect/tasks/mixpanel/__init__.py
suryatmodulus/prefect
e4ac9f6aa831140c7fba0397f3e5e0884b1b9e42
[ "Apache-2.0" ]
8
2021-10-11T16:42:59.000Z
2022-03-31T08:42:24.000Z
src/prefect/tasks/mixpanel/__init__.py
suryatmodulus/prefect
e4ac9f6aa831140c7fba0397f3e5e0884b1b9e42
[ "Apache-2.0" ]
1
2022-03-11T04:22:40.000Z
2022-03-11T04:22:40.000Z
""" This module contains a collection of tasks to interact with Mixpanel APIs. """ from .mixpanel_tasks import MixpanelExportTask
21.833333
74
0.793893
17
131
6.058824
0.882353
0
0
0
0
0
0
0
0
0
0
0
0.145038
131
5
75
26.2
0.919643
0.564886
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
6b908bf60af6792e0e100ec508ff8a0b34531cfd
242
py
Python
db/query.py
muellerzr/capstone-2021
a7f0c4de902735aece018d7c2ffedccc1995d51a
[ "Apache-2.0" ]
null
null
null
db/query.py
muellerzr/capstone-2021
a7f0c4de902735aece018d7c2ffedccc1995d51a
[ "Apache-2.0" ]
1
2021-11-30T00:03:22.000Z
2021-11-30T00:03:22.000Z
db/query.py
muellerzr/capstone-2021
a7f0c4de902735aece018d7c2ffedccc1995d51a
[ "Apache-2.0" ]
null
null
null
from pymongo import MongoClient client = MongoClient('mongodb+srv://<username>:<password>@cluster0.27gwi.mongodb.net/Cluster0?retryWrites=true&w=majority') db=client.credentials #fivestar = db.reviews.find_one({'rating': 5}) #print(fivestar)
40.333333
123
0.785124
31
242
6.096774
0.806452
0
0
0
0
0
0
0
0
0
0
0.021834
0.053719
242
6
124
40.333333
0.803493
0.247934
0
0
0
0.333333
0.546961
0.546961
0
0
0
0
0
1
0
false
0.333333
0.333333
0
0.333333
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
1
0
1
null
0
0
0
0
0
0
0
1
1
0
0
0
0
5
6b9e02f9211409f10e7764f30ef7c7bc74bf73e2
682
py
Python
openweathermap_client/exceptions.py
Nobatek/openweathermap-client
07cd28fa7930e3d595d1946236c9b00851eb8bfa
[ "MIT" ]
null
null
null
openweathermap_client/exceptions.py
Nobatek/openweathermap-client
07cd28fa7930e3d595d1946236c9b00851eb8bfa
[ "MIT" ]
null
null
null
openweathermap_client/exceptions.py
Nobatek/openweathermap-client
07cd28fa7930e3d595d1946236c9b00851eb8bfa
[ "MIT" ]
null
null
null
"""OpenWeatherMap API client exceptions.""" from marshmallow import ValidationError class OpenWeatherMapClientError(Exception): """Generic OpenWeatherMap API client exception.""" class OWMClientKeyNotDefinedError(OpenWeatherMapClientError): """OpenWeatherMap API key not defined error.""" class OWMClientUnknownServiceNameError(OpenWeatherMapClientError): """OpenWeatherMap API service unknown error.""" class OWMClientAccessLimitationError(OpenWeatherMapClientError): """OpenWeatherMap API service access limitation error.""" class OWMClientValidationError(OpenWeatherMapClientError, ValidationError): """OpenWeatherMap API data validation error."""
28.416667
75
0.802053
51
682
10.72549
0.509804
0.186472
0.230347
0.179159
0
0
0
0
0
0
0
0
0.112903
682
23
76
29.652174
0.904132
0.381232
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.166667
0
1
0
0
0
1
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
1
0
0
5
6bd330ecd62ce882e921fe42445422e3cafc9446
24
py
Python
auto_torrenting.py
c-okelly/small_jobs
316114c983e789ff932abaf933b5938e313befb3
[ "MIT" ]
null
null
null
auto_torrenting.py
c-okelly/small_jobs
316114c983e789ff932abaf933b5938e313befb3
[ "MIT" ]
null
null
null
auto_torrenting.py
c-okelly/small_jobs
316114c983e789ff932abaf933b5938e313befb3
[ "MIT" ]
null
null
null
# Author Conor O'Kelly
8
22
0.708333
4
24
4.25
1
0
0
0
0
0
0
0
0
0
0
0
0.208333
24
2
23
12
0.894737
0.833333
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
d40aefb01dffe34973a1f115edb7b5c079b5d477
57
py
Python
caiman_napari/__init__.py
kushalkolar/caiman-napari-prototype
e9434d513f0454fd84c1dc0987d4c0658a2dfda4
[ "Apache-2.0" ]
null
null
null
caiman_napari/__init__.py
kushalkolar/caiman-napari-prototype
e9434d513f0454fd84c1dc0987d4c0658a2dfda4
[ "Apache-2.0" ]
null
null
null
caiman_napari/__init__.py
kushalkolar/caiman-napari-prototype
e9434d513f0454fd84c1dc0987d4c0658a2dfda4
[ "Apache-2.0" ]
1
2021-12-03T21:22:08.000Z
2021-12-03T21:22:08.000Z
from .cnmf import napari_experimental_provide_dock_widget
57
57
0.929825
8
57
6.125
1
0
0
0
0
0
0
0
0
0
0
0
0.052632
57
1
57
57
0.907407
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
d46cea1160fabf2e3539d5eba8408300d75f0ebc
150
py
Python
tests/web_platform/CSS2/positioning/test_right_applies_to.py
jonboland/colosseum
cbf974be54fd7f6fddbe7285704cfaf7a866c5c5
[ "BSD-3-Clause" ]
71
2015-04-13T09:44:14.000Z
2019-03-24T01:03:02.000Z
tests/web_platform/CSS2/positioning/test_right_applies_to.py
jonboland/colosseum
cbf974be54fd7f6fddbe7285704cfaf7a866c5c5
[ "BSD-3-Clause" ]
35
2019-05-06T15:26:09.000Z
2022-03-28T06:30:33.000Z
tests/web_platform/CSS2/positioning/test_right_applies_to.py
jonboland/colosseum
cbf974be54fd7f6fddbe7285704cfaf7a866c5c5
[ "BSD-3-Clause" ]
139
2015-05-30T18:37:43.000Z
2019-03-27T17:14:05.000Z
from tests.utils import W3CTestCase class TestRightAppliesTo(W3CTestCase): vars().update(W3CTestCase.find_tests(__file__, 'right-applies-to-'))
25
72
0.786667
17
150
6.647059
0.823529
0
0
0
0
0
0
0
0
0
0
0.022059
0.093333
150
5
73
30
0.808824
0
0
0
0
0
0.113333
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
d480434187d2d4965e1d9a7be83e957a7e829b31
100
py
Python
acm_icpc/2018_2019_KNU_DzaDza/1_4/F.py
mstrechen/cp
ffac439840a71f70580a0ef197e47479e167a0eb
[ "MIT" ]
null
null
null
acm_icpc/2018_2019_KNU_DzaDza/1_4/F.py
mstrechen/cp
ffac439840a71f70580a0ef197e47479e167a0eb
[ "MIT" ]
null
null
null
acm_icpc/2018_2019_KNU_DzaDza/1_4/F.py
mstrechen/cp
ffac439840a71f70580a0ef197e47479e167a0eb
[ "MIT" ]
null
null
null
a = input().split(' ') n = int(a[0]) k = int(a[1]) print(2 ** (4 * n + k + 1) + 2 ** (4 * n))
16.666667
43
0.36
20
100
1.8
0.55
0.222222
0.166667
0
0
0
0
0
0
0
0
0.101449
0.31
100
5
44
20
0.42029
0
0
0
0
0
0.010526
0
0
0
0
0
0
1
0
false
0
0
0
0
0.25
1
0
1
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
cf579f861cc9d7beae973d53a1a8c919d94e3c59
78
py
Python
db_create.py
Don-1/info3180-project3-4
5a361e91a3c48498eea464312fb12d39bfa190c9
[ "MIT" ]
null
null
null
db_create.py
Don-1/info3180-project3-4
5a361e91a3c48498eea464312fb12d39bfa190c9
[ "MIT" ]
null
null
null
db_create.py
Don-1/info3180-project3-4
5a361e91a3c48498eea464312fb12d39bfa190c9
[ "MIT" ]
null
null
null
from config import SQLALCHEMY_DATABASE_URI from app import db db.create_all()
19.5
42
0.846154
13
78
4.846154
0.769231
0
0
0
0
0
0
0
0
0
0
0
0.115385
78
4
43
19.5
0.913043
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
cf829f2a0769af24ffc63064db6a6bdc86a1f38a
116
py
Python
solutions/908.smallest-range-i.241983759.ac.py
satu0king/Leetcode-Solutions
2edff60d76c2898d912197044f6284efeeb34119
[ "MIT" ]
78
2020-10-22T11:31:53.000Z
2022-02-22T13:27:49.000Z
solutions/908.smallest-range-i.241983759.ac.py
satu0king/Leetcode-Solutions
2edff60d76c2898d912197044f6284efeeb34119
[ "MIT" ]
null
null
null
solutions/908.smallest-range-i.241983759.ac.py
satu0king/Leetcode-Solutions
2edff60d76c2898d912197044f6284efeeb34119
[ "MIT" ]
26
2020-10-23T15:10:44.000Z
2021-11-07T16:13:50.000Z
class Solution(object): def smallestRangeI(self, A, K): return max(0, max(A) - min(A) - 2 * K)
23.2
46
0.534483
17
116
3.647059
0.764706
0
0
0
0
0
0
0
0
0
0
0.025
0.310345
116
4
47
29
0.75
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0.333333
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
d8783061dcd132ff7ce4c566ed60236c58199386
87
py
Python
Hackerrank-Solutions/Hackerrank-Python-Solutions/Numpy/Shape and Reshape.py
HetDaftary/Competitive-Coding-Solutions
a683fa11895410c6eef07b1a68054f3e90aa596b
[ "MIT" ]
null
null
null
Hackerrank-Solutions/Hackerrank-Python-Solutions/Numpy/Shape and Reshape.py
HetDaftary/Competitive-Coding-Solutions
a683fa11895410c6eef07b1a68054f3e90aa596b
[ "MIT" ]
null
null
null
Hackerrank-Solutions/Hackerrank-Python-Solutions/Numpy/Shape and Reshape.py
HetDaftary/Competitive-Coding-Solutions
a683fa11895410c6eef07b1a68054f3e90aa596b
[ "MIT" ]
null
null
null
import numpy as np print(np.reshape(list(map(int, input().strip().split())), (3, 3)))
29
66
0.643678
15
87
3.733333
0.866667
0
0
0
0
0
0
0
0
0
0
0.025641
0.103448
87
3
66
29
0.692308
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
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
1
0
0
1
0
5
d89d90e5483c3e450210df4df77773036f4c9016
19,881
py
Python
data/transcoder_evaluation_gfg/python/UNIQUE_CELLS_BINARY_MATRIX.py
mxl1n/CodeGen
e5101dd5c5e9c3720c70c80f78b18f13e118335a
[ "MIT" ]
241
2021-07-20T08:35:20.000Z
2022-03-31T02:39:08.000Z
data/transcoder_evaluation_gfg/python/UNIQUE_CELLS_BINARY_MATRIX.py
mxl1n/CodeGen
e5101dd5c5e9c3720c70c80f78b18f13e118335a
[ "MIT" ]
49
2021-07-22T23:18:42.000Z
2022-03-24T09:15:26.000Z
data/transcoder_evaluation_gfg/python/UNIQUE_CELLS_BINARY_MATRIX.py
mxl1n/CodeGen
e5101dd5c5e9c3720c70c80f78b18f13e118335a
[ "MIT" ]
71
2021-07-21T05:17:52.000Z
2022-03-29T23:49:28.000Z
# Copyright (c) 2019-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # def f_gold ( mat , n , m ) : rowsum = [ 0 ] * n ; colsum = [ 0 ] * m ; for i in range ( n ) : for j in range ( m ) : if ( mat [ i ] [ j ] != 0 ) : rowsum [ i ] += 1 ; colsum [ j ] += 1 ; uniquecount = 0 ; for i in range ( n ) : for j in range ( m ) : if ( mat [ i ] [ j ] != 0 and rowsum [ i ] == 1 and colsum [ j ] == 1 ) : uniquecount += 1 ; return uniquecount ; #TOFILL if __name__ == '__main__': param = [ ([[0, 1, 0, 0], [0, 0, 1, 0], [1, 0, 0, 1]] ,3,4,), ([[0, 1, 0, 0], [0, 0, 1, 0], [1, 0, 0, 1]] ,2,2,), ([[0, 1, 0, 0], [0, 0, 1, 1], [1, 0, 1, 1]] ,3,4,), ([[0, 1, 0, 0], [0, 0, 1, 0], [1, 1, 0, 1]] ,3,4,), ([[1, 1, 1, 1], [0, 0, 1, 0], [1, 0, 0, 1]] ,3,3,), ([[0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 33, 13, 43, 21, 83, 34, 30, 20, 82, 85, 36], [7, 69, 9, 45, 18, 47, 1, 78, 72, 53, 37, 20, 95, 71, 58, 41, 38, 44, 15, 35, 81, 27, 21, 40, 44, 90, 44, 5, 97, 49], [69, 92, 21, 8, 66, 37, 14, 34, 60, 61, 46, 21, 91, 18, 61, 69, 34, 82, 54, 99, 90, 29, 41, 92, 70, 90, 58, 82, 30, 33], [63, 96, 90, 86, 34, 49, 12, 22, 85, 24, 56, 25, 66, 1, 74, 34, 5, 17, 1, 78, 21, 6, 75, 39, 59, 20, 84, 85, 64, 24], [41, 90, 67, 38, 38, 28, 10, 24, 62, 52, 71, 87, 87, 24, 95, 50, 86, 91, 38, 69, 18, 72, 99, 49, 17, 76, 86, 53, 6, 94], [66, 5, 2, 62, 99, 5, 31, 81, 63, 91, 95, 74, 76, 18, 77, 57, 72, 99, 62, 4, 62, 46, 71, 21, 60, 45, 79, 98, 22, 65], [6, 65, 83, 27, 10, 55, 78, 34, 41, 32, 67, 51, 80, 39, 97, 5, 58, 99, 17, 23, 90, 46, 7, 62, 7, 15, 30, 20, 67, 86], [54, 50, 71, 95, 49, 50, 3, 64, 46, 81, 22, 52, 37, 60, 67, 48, 30, 88, 97, 43, 10, 71, 80, 96, 2, 72, 79, 67, 84, 98], [46, 41, 4, 87, 8, 10, 5, 74, 90, 80, 59, 58, 23, 61, 17, 28, 18, 52, 58, 41, 75, 98, 79, 1, 97, 73, 17, 79, 4, 46], [70, 6, 83, 23, 94, 1, 73, 61, 22, 65, 57, 36, 25, 16, 26, 92, 5, 22, 14, 73, 78, 80, 94, 96, 70, 17, 1, 18, 75, 11], [92, 12, 34, 80, 74, 8, 90, 42, 14, 51, 9, 83, 98, 38, 29, 29, 28, 88, 92, 76, 83, 6, 2, 53, 31, 37, 56, 93, 40, 12], [55, 97, 57, 45, 25, 42, 18, 30, 18, 7, 79, 30, 5, 69, 33, 6, 48, 4, 13, 26, 49, 20, 32, 96, 65, 89, 89, 53, 65, 3], [21, 43, 25, 85, 67, 93, 35, 86, 23, 13, 98, 23, 63, 99, 83, 15, 79, 26, 67, 81, 94, 61, 28, 34, 16, 43, 11, 24, 87, 25], [77, 19, 34, 66, 72, 5, 75, 66, 54, 96, 24, 76, 80, 51, 24, 50, 54, 17, 96, 84, 35, 30, 47, 42, 22, 31, 51, 37, 88, 88], [13, 89, 31, 14, 84, 39, 92, 89, 38, 75, 18, 39, 83, 67, 41, 46, 49, 27, 23, 35, 13, 26, 78, 35, 41, 6, 72, 52, 53, 79], [8, 47, 80, 93, 64, 34, 29, 35, 48, 74, 65, 69, 67, 14, 46, 27, 46, 29, 1, 82, 3, 26, 21, 24, 45, 84, 29, 18, 3, 51], [97, 18, 37, 63, 85, 19, 23, 84, 55, 24, 83, 26, 97, 96, 54, 99, 89, 33, 88, 57, 9, 64, 75, 85, 59, 81, 16, 5, 44, 46], [10, 77, 58, 70, 64, 80, 70, 93, 60, 25, 87, 11, 93, 85, 63, 26, 41, 53, 75, 24, 81, 73, 72, 94, 7, 87, 73, 83, 64, 72], [46, 78, 51, 92, 99, 71, 6, 30, 16, 57, 65, 61, 17, 63, 7, 35, 69, 91, 30, 44, 99, 80, 6, 80, 56, 8, 84, 95, 20, 73], [30, 62, 77, 26, 66, 61, 61, 45, 46, 24, 77, 16, 82, 16, 66, 1, 74, 25, 14, 81, 82, 7, 21, 93, 91, 49, 4, 12, 22, 34], [26, 28, 19, 31, 14, 87, 81, 23, 81, 8, 38, 10, 30, 7, 2, 22, 5, 67, 73, 69, 56, 20, 93, 70, 68, 57, 21, 17, 79, 27], [39, 83, 67, 92, 86, 70, 95, 69, 13, 98, 50, 10, 56, 44, 28, 85, 37, 36, 56, 92, 77, 57, 36, 1, 43, 9, 84, 81, 67, 32], [99, 70, 58, 52, 70, 89, 28, 65, 40, 80, 20, 88, 79, 10, 76, 62, 37, 99, 60, 91, 77, 94, 67, 52, 35, 62, 12, 29, 30, 22], [81, 53, 91, 22, 60, 49, 49, 7, 46, 11, 16, 54, 57, 36, 51, 22, 37, 3, 35, 38, 55, 41, 38, 88, 34, 99, 11, 79, 14, 81], [21, 28, 86, 60, 34, 65, 87, 96, 4, 56, 70, 80, 10, 35, 88, 10, 76, 63, 97, 91, 25, 74, 89, 32, 56, 26, 68, 73, 27, 73], [90, 11, 53, 32, 59, 30, 9, 11, 87, 17, 96, 11, 57, 86, 50, 96, 73, 81, 53, 89, 80, 97, 66, 43, 39, 42, 76, 34, 25, 78], [9, 94, 12, 10, 88, 34, 76, 26, 96, 35, 77, 83, 56, 77, 56, 86, 48, 23, 65, 8, 98, 13, 49, 10, 3, 28, 27, 85, 11, 88], [12, 7, 42, 96, 10, 61, 64, 28, 26, 93, 91, 52, 74, 4, 22, 10, 4, 7, 63, 87, 67, 88, 30, 76, 21, 48, 17, 67, 79, 96], [9, 40, 86, 96, 59, 69, 41, 68, 48, 61, 5, 7, 75, 6, 29, 51, 81, 28, 57, 63, 38, 83, 49, 12, 45, 83, 97, 45, 5, 65], [35, 35, 31, 36, 40, 99, 40, 61, 12, 82, 92, 13, 30, 40, 17, 73, 22, 56, 62, 57, 15, 93, 54, 16, 84, 89, 24, 80, 80, 25]],1,28,), ([[0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 45, 59, 40, 83, 46, 59, 89, 37, 82, 68, 65, 97, 28, 41, 83, 97, 15, 87, 93, 39, 78, 94, 66, 77, 28, 31, 12, 13, 3], [63, 29, 64, 94, 76, 85, 66, 50, 80, 96, 92, 73, 17, 56, 83, 7, 36, 40, 1, 42, 36, 39, 1, 88, 63, 74, 75, 86, 56, 31, 1, 41, 11, 6, 51, 64, 81, 78, 96, 20, 4, 39, 47, 22, 93, 42, 77, 79], [35, 25, 3, 51, 12, 14, 40, 32, 50, 68, 29, 31, 96, 24, 11, 30, 19, 36, 6, 2, 19, 46, 40, 18, 36, 46, 56, 52, 54, 56, 20, 1, 23, 38, 20, 4, 69, 6, 63, 90, 1, 63, 79, 80, 87, 86, 54, 69], [43, 5, 70, 66, 10, 36, 35, 45, 23, 62, 47, 16, 37, 42, 35, 40, 16, 69, 11, 51, 93, 75, 80, 89, 50, 67, 67, 65, 12, 7, 43, 46, 96, 22, 76, 6, 38, 39, 60, 85, 62, 92, 96, 27, 49, 15, 33, 96], [46, 98, 71, 13, 53, 39, 50, 70, 60, 9, 4, 94, 92, 21, 12, 77, 50, 13, 52, 91, 92, 82, 80, 21, 55, 10, 78, 92, 29, 11, 30, 40, 91, 49, 3, 1, 32, 39, 85, 2, 74, 31, 18, 7, 5, 29, 68, 46], [56, 3, 13, 67, 72, 50, 4, 42, 99, 76, 24, 19, 99, 82, 40, 34, 89, 7, 75, 38, 19, 99, 45, 20, 91, 95, 89, 2, 93, 37, 31, 42, 6, 85, 97, 9, 74, 86, 95, 53, 11, 83, 76, 16, 13, 38, 13, 15], [18, 16, 41, 50, 69, 91, 66, 41, 27, 59, 65, 14, 35, 23, 22, 27, 50, 25, 98, 54, 49, 91, 99, 85, 3, 25, 68, 57, 15, 67, 11, 92, 3, 18, 53, 9, 79, 72, 40, 56, 14, 61, 13, 47, 74, 94, 5, 86], [99, 5, 12, 35, 85, 26, 1, 10, 38, 24, 95, 47, 87, 85, 2, 95, 2, 30, 25, 83, 62, 1, 92, 63, 84, 59, 54, 69, 55, 94, 87, 42, 91, 53, 65, 9, 71, 51, 90, 16, 53, 70, 62, 37, 61, 57, 45, 76], [88, 17, 2, 95, 37, 54, 42, 29, 65, 78, 40, 11, 58, 96, 20, 66, 31, 5, 96, 50, 9, 41, 10, 53, 49, 26, 67, 36, 23, 94, 39, 59, 23, 23, 43, 25, 84, 60, 33, 33, 65, 47, 33, 38, 24, 73, 95, 49], [92, 87, 30, 82, 58, 90, 97, 59, 16, 93, 16, 33, 39, 46, 38, 23, 26, 49, 81, 24, 83, 42, 27, 2, 8, 79, 41, 13, 91, 22, 47, 47, 65, 69, 29, 79, 30, 46, 6, 6, 87, 52, 5, 86, 41, 20, 20, 39], [30, 48, 81, 60, 23, 60, 50, 13, 74, 38, 39, 68, 19, 52, 41, 92, 27, 23, 19, 80, 35, 5, 88, 5, 93, 6, 41, 41, 54, 44, 48, 37, 93, 56, 33, 91, 35, 6, 46, 74, 36, 44, 7, 7, 29, 80, 65, 60], [35, 57, 29, 38, 77, 12, 87, 80, 58, 78, 80, 6, 36, 52, 88, 27, 25, 40, 36, 60, 29, 95, 3, 13, 68, 11, 48, 79, 60, 2, 79, 70, 13, 35, 51, 56, 40, 77, 59, 12, 16, 53, 41, 20, 40, 61, 77, 34], [19, 45, 91, 29, 19, 56, 27, 2, 40, 65, 78, 8, 27, 97, 95, 30, 25, 49, 56, 65, 31, 99, 60, 85, 34, 17, 73, 29, 72, 83, 6, 88, 6, 3, 95, 31, 76, 52, 8, 90, 26, 15, 77, 56, 86, 62, 13, 46], [54, 9, 88, 3, 23, 12, 41, 44, 58, 11, 19, 59, 73, 37, 10, 73, 33, 77, 20, 44, 75, 93, 13, 63, 14, 73, 54, 42, 38, 83, 72, 82, 98, 36, 9, 80, 5, 15, 24, 64, 48, 43, 39, 25, 80, 86, 80, 97], [5, 60, 7, 18, 6, 12, 33, 98, 21, 58, 82, 78, 42, 94, 46, 3, 57, 53, 62, 13, 51, 19, 59, 62, 37, 77, 15, 90, 70, 91, 12, 89, 50, 47, 16, 16, 67, 34, 88, 46, 87, 64, 94, 49, 21, 53, 62, 81], [54, 82, 3, 53, 12, 80, 38, 78, 91, 18, 84, 35, 81, 84, 70, 90, 71, 76, 17, 21, 70, 47, 37, 89, 54, 15, 11, 9, 68, 3, 13, 96, 6, 1, 5, 66, 86, 96, 41, 50, 7, 21, 81, 53, 20, 65, 32, 96], [84, 74, 6, 41, 33, 74, 25, 24, 95, 93, 12, 37, 50, 9, 93, 67, 4, 54, 85, 6, 66, 37, 84, 45, 97, 14, 84, 43, 66, 7, 55, 37, 76, 16, 17, 95, 71, 90, 1, 2, 95, 84, 33, 13, 65, 51, 33, 3], [60, 83, 44, 96, 5, 47, 43, 47, 6, 60, 36, 37, 77, 76, 6, 30, 92, 10, 28, 6, 73, 24, 52, 82, 68, 45, 87, 27, 68, 13, 75, 75, 19, 33, 78, 13, 7, 33, 32, 45, 56, 72, 46, 98, 19, 34, 63, 70], [54, 55, 50, 65, 45, 30, 79, 73, 61, 93, 59, 2, 30, 46, 68, 19, 84, 5, 73, 84, 57, 63, 52, 59, 60, 80, 84, 20, 90, 33, 12, 21, 56, 23, 20, 87, 49, 47, 70, 45, 76, 35, 72, 27, 80, 47, 32, 29], [71, 80, 53, 93, 56, 89, 43, 4, 64, 91, 87, 23, 60, 30, 43, 88, 48, 80, 7, 87, 31, 19, 52, 68, 6, 83, 60, 91, 93, 12, 38, 13, 28, 5, 46, 46, 81, 27, 26, 62, 68, 72, 90, 97, 12, 77, 85, 52], [37, 25, 39, 67, 19, 71, 81, 77, 24, 51, 45, 8, 72, 45, 2, 30, 67, 45, 26, 17, 38, 67, 57, 33, 94, 79, 72, 94, 64, 23, 12, 8, 73, 72, 38, 33, 48, 97, 45, 75, 23, 43, 25, 15, 10, 20, 16, 99], [98, 85, 57, 46, 1, 25, 56, 46, 59, 62, 78, 61, 83, 8, 41, 15, 44, 82, 1, 97, 65, 34, 4, 81, 2, 39, 54, 10, 42, 45, 26, 27, 39, 25, 29, 82, 22, 90, 60, 90, 52, 85, 21, 8, 66, 98, 76, 18], [81, 15, 3, 85, 83, 59, 55, 32, 11, 82, 53, 29, 67, 4, 92, 9, 57, 38, 7, 65, 35, 47, 34, 63, 9, 90, 72, 19, 26, 46, 56, 10, 43, 30, 40, 55, 58, 31, 72, 47, 77, 37, 94, 57, 79, 57, 99, 3], [29, 88, 45, 87, 73, 2, 15, 96, 18, 29, 40, 3, 97, 58, 71, 94, 91, 38, 29, 31, 65, 43, 27, 27, 93, 69, 3, 29, 13, 97, 60, 84, 67, 70, 81, 47, 68, 97, 33, 6, 64, 78, 71, 70, 51, 67, 22, 72], [24, 77, 77, 65, 53, 41, 32, 69, 71, 45, 32, 28, 97, 14, 13, 93, 50, 40, 1, 47, 91, 30, 34, 46, 1, 34, 59, 7, 65, 42, 82, 99, 19, 13, 23, 66, 3, 86, 36, 49, 72, 87, 72, 57, 89, 99, 64, 11], [41, 6, 45, 81, 57, 82, 33, 61, 18, 7, 29, 69, 16, 95, 69, 74, 29, 29, 16, 4, 65, 72, 92, 1, 92, 3, 64, 66, 89, 57, 75, 18, 39, 84, 81, 7, 55, 17, 68, 36, 94, 1, 35, 76, 17, 80, 28, 32], [55, 35, 19, 93, 93, 80, 4, 21, 44, 62, 1, 83, 51, 90, 76, 17, 37, 92, 36, 29, 69, 3, 15, 67, 77, 69, 21, 23, 47, 86, 34, 41, 90, 47, 31, 35, 7, 45, 57, 96, 22, 70, 21, 49, 47, 27, 10, 86], [44, 51, 18, 68, 99, 38, 36, 60, 68, 74, 96, 74, 45, 74, 75, 9, 13, 57, 82, 57, 37, 47, 11, 28, 6, 33, 14, 47, 29, 15, 56, 69, 86, 31, 19, 18, 58, 70, 73, 30, 95, 35, 17, 16, 97, 68, 95, 33], [36, 11, 60, 4, 63, 5, 64, 85, 77, 4, 35, 26, 26, 19, 37, 11, 66, 31, 18, 75, 44, 16, 58, 2, 59, 96, 48, 86, 36, 8, 36, 25, 40, 95, 4, 43, 74, 27, 38, 81, 38, 64, 89, 17, 13, 85, 79, 24], [7, 64, 63, 22, 53, 74, 97, 12, 72, 22, 39, 47, 64, 44, 16, 59, 34, 46, 80, 78, 70, 55, 74, 24, 27, 73, 16, 2, 31, 63, 47, 19, 56, 11, 86, 93, 95, 8, 74, 6, 31, 99, 50, 29, 21, 41, 69, 69], [88, 79, 56, 28, 34, 56, 77, 55, 44, 32, 86, 29, 3, 69, 11, 48, 53, 56, 53, 26, 9, 75, 65, 56, 28, 23, 31, 66, 61, 82, 16, 59, 81, 48, 17, 35, 95, 99, 59, 88, 41, 37, 30, 82, 91, 16, 84, 47], [28, 21, 41, 45, 97, 73, 64, 88, 13, 94, 43, 97, 58, 88, 20, 63, 1, 23, 33, 57, 81, 54, 66, 95, 31, 54, 16, 37, 7, 1, 94, 18, 42, 39, 26, 75, 65, 57, 69, 86, 77, 17, 7, 71, 12, 38, 87, 48], [55, 54, 72, 15, 30, 55, 73, 21, 60, 78, 8, 47, 36, 73, 26, 84, 70, 34, 60, 23, 97, 85, 41, 90, 69, 55, 73, 45, 61, 33, 89, 52, 81, 19, 75, 8, 70, 6, 72, 57, 88, 60, 19, 52, 41, 91, 84, 88], [38, 69, 16, 39, 97, 74, 51, 5, 83, 62, 41, 85, 67, 59, 92, 19, 80, 62, 53, 66, 8, 46, 12, 88, 65, 82, 23, 39, 60, 27, 57, 44, 70, 28, 23, 34, 25, 11, 48, 65, 10, 73, 26, 10, 18, 60, 73, 45], [26, 9, 36, 15, 24, 40, 2, 4, 95, 20, 39, 45, 26, 60, 69, 68, 86, 70, 31, 69, 7, 69, 4, 91, 73, 37, 2, 49, 83, 17, 17, 40, 51, 88, 77, 28, 46, 78, 87, 87, 74, 49, 17, 27, 62, 11, 83, 44], [91, 36, 16, 60, 87, 97, 52, 22, 78, 77, 86, 71, 38, 65, 51, 97, 86, 23, 15, 79, 31, 28, 67, 42, 25, 33, 97, 23, 92, 53, 16, 37, 5, 11, 12, 21, 18, 14, 33, 21, 26, 89, 25, 35, 63, 20, 63, 66], [12, 32, 97, 48, 95, 97, 59, 20, 37, 40, 61, 56, 14, 36, 76, 90, 34, 6, 46, 77, 22, 99, 83, 23, 64, 96, 44, 11, 68, 61, 76, 56, 51, 63, 30, 10, 88, 23, 1, 48, 4, 28, 44, 67, 2, 58, 6, 42], [17, 37, 44, 23, 40, 85, 44, 31, 76, 93, 13, 90, 97, 98, 20, 47, 10, 65, 52, 63, 29, 54, 86, 50, 65, 44, 8, 9, 23, 84, 34, 16, 86, 62, 87, 65, 78, 52, 23, 38, 40, 8, 32, 40, 66, 48, 13, 27], [46, 71, 3, 85, 61, 72, 65, 17, 26, 29, 72, 38, 51, 43, 72, 8, 25, 55, 45, 91, 86, 67, 57, 49, 54, 47, 64, 24, 62, 33, 99, 40, 29, 8, 75, 16, 33, 64, 11, 29, 49, 88, 66, 5, 88, 53, 44, 7], [95, 94, 70, 69, 79, 27, 99, 54, 73, 23, 58, 17, 87, 46, 47, 93, 59, 45, 62, 54, 75, 13, 12, 2, 42, 54, 11, 78, 22, 85, 49, 37, 36, 89, 49, 58, 3, 66, 91, 33, 18, 48, 75, 71, 37, 50, 36, 27], [22, 31, 40, 54, 64, 70, 53, 54, 54, 97, 71, 6, 64, 54, 65, 46, 42, 93, 75, 92, 56, 40, 15, 30, 23, 12, 92, 95, 30, 16, 30, 68, 33, 57, 97, 28, 85, 79, 26, 14, 57, 15, 66, 16, 37, 11, 11, 33], [2, 33, 63, 3, 84, 33, 26, 34, 78, 52, 93, 66, 72, 27, 72, 71, 75, 94, 49, 47, 21, 21, 71, 84, 61, 14, 20, 5, 31, 62, 12, 56, 56, 12, 66, 26, 68, 30, 98, 20, 66, 35, 79, 51, 14, 55, 36, 53], [54, 63, 94, 58, 27, 2, 85, 78, 91, 85, 23, 35, 62, 72, 59, 76, 64, 92, 41, 33, 97, 9, 79, 74, 49, 2, 3, 23, 74, 19, 18, 35, 54, 60, 9, 95, 94, 52, 50, 12, 17, 91, 85, 49, 48, 27, 14, 55], [13, 3, 64, 88, 96, 72, 99, 23, 80, 73, 39, 58, 18, 54, 31, 64, 42, 37, 98, 70, 78, 88, 97, 42, 83, 29, 70, 3, 18, 85, 29, 52, 42, 52, 36, 95, 8, 96, 80, 86, 2, 51, 15, 17, 13, 54, 99, 25], [74, 75, 33, 78, 98, 22, 44, 4, 26, 1, 10, 2, 29, 25, 87, 94, 60, 89, 13, 40, 34, 35, 79, 39, 42, 84, 86, 25, 14, 83, 86, 87, 1, 39, 30, 5, 94, 71, 62, 77, 31, 7, 29, 51, 89, 77, 79, 51], [94, 71, 69, 14, 94, 23, 80, 88, 43, 56, 21, 30, 76, 40, 94, 22, 2, 23, 87, 86, 62, 30, 27, 98, 75, 93, 37, 70, 16, 20, 74, 46, 74, 25, 59, 86, 32, 17, 90, 80, 10, 17, 2, 66, 29, 4, 30, 61], [58, 76, 34, 78, 24, 88, 82, 25, 89, 25, 92, 30, 55, 89, 24, 39, 77, 2, 34, 16, 48, 24, 50, 2, 93, 39, 81, 59, 23, 12, 77, 69, 15, 60, 64, 2, 70, 64, 36, 87, 13, 2, 5, 40, 80, 64, 39, 35], [57, 41, 45, 34, 19, 90, 42, 17, 35, 76, 35, 6, 52, 74, 43, 23, 83, 43, 53, 72, 73, 67, 97, 66, 34, 35, 82, 27, 27, 64, 39, 60, 81, 73, 96, 23, 78, 11, 4, 51, 38, 51, 48, 80, 36, 25, 5, 74]],1,32,), ([[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [69, 62, 79, 46, 48, 38, 61, 81, 17, 48, 33, 18, 36, 54, 3, 89, 99, 20], [31, 21, 34, 57, 37, 1, 57, 55, 31, 23, 75, 48, 20, 7, 99, 2, 97, 40], [24, 74, 9, 43, 97, 51, 85, 78, 50, 87, 76, 22, 92, 91, 10, 82, 88, 67], [4, 30, 85, 22, 92, 73, 41, 16, 56, 69, 14, 52, 14, 47, 16, 43, 68, 37], [14, 41, 87, 73, 24, 75, 92, 19, 83, 12, 47, 98, 12, 3, 30, 58, 46, 51], [99, 15, 43, 22, 9, 92, 93, 39, 81, 68, 57, 68, 7, 2, 54, 37, 74, 82], [28, 59, 46, 63, 35, 99, 94, 85, 58, 89, 13, 71, 6, 84, 45, 5, 38, 44], [25, 82, 88, 15, 72, 77, 39, 48, 52, 60, 89, 23, 69, 52, 86, 22, 25, 55], [64, 65, 4, 52, 32, 53, 26, 79, 35, 91, 14, 34, 60, 25, 54, 27, 21, 48], [35, 52, 70, 99, 26, 15, 5, 90, 33, 25, 81, 52, 44, 20, 56, 66, 8, 83], [64, 29, 48, 19, 9, 72, 15, 98, 68, 63, 91, 38, 47, 13, 96, 99, 46, 36], [10, 55, 23, 23, 68, 44, 5, 4, 30, 52, 97, 13, 18, 32, 33, 58, 62, 71], [14, 14, 10, 59, 39, 46, 18, 19, 37, 3, 55, 7, 71, 52, 54, 38, 63, 64], [6, 74, 52, 44, 36, 37, 64, 48, 27, 65, 1, 48, 85, 37, 92, 49, 55, 39], [36, 66, 66, 68, 2, 65, 18, 41, 98, 91, 39, 26, 75, 3, 49, 28, 16, 99], [22, 80, 97, 77, 49, 28, 16, 64, 60, 66, 26, 42, 92, 3, 21, 32, 70, 69], [24, 65, 23, 80, 8, 45, 89, 11, 57, 12, 72, 10, 63, 35, 38, 21, 51, 18]],10,12,), ([[0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 2, 93, 66, 82, 36, 56], [21, 97, 63, 2, 74, 15, 62, 12, 3, 4, 9, 46, 42, 74, 31, 37, 11, 61, 27, 46, 70, 94, 43, 99, 45], [18, 50, 6, 13, 12, 7, 14, 73, 99, 47, 7, 39, 56, 85, 19, 27, 61, 66, 52, 56, 14, 33, 12, 85, 94], [86, 66, 93, 24, 96, 45, 76, 55, 71, 53, 66, 19, 51, 82, 98, 66, 45, 40, 83, 6, 51, 41, 47, 17, 23], [40, 73, 37, 85, 58, 21, 27, 11, 39, 94, 63, 28, 84, 47, 47, 4, 61, 18, 50, 93, 36, 91, 1, 35, 5], [6, 60, 5, 32, 39, 95, 40, 42, 74, 95, 8, 91, 29, 60, 78, 23, 4, 34, 38, 61, 27, 83, 31, 3, 93], [77, 27, 43, 60, 96, 46, 37, 67, 6, 59, 3, 77, 11, 27, 2, 64, 44, 76, 55, 40, 76, 23, 64, 95, 57], [10, 35, 6, 89, 95, 54, 94, 79, 67, 82, 56, 81, 60, 14, 46, 16, 27, 37, 97, 61, 20, 25, 50, 58, 78], [37, 5, 54, 37, 74, 10, 9, 78, 33, 93, 24, 70, 57, 26, 39, 44, 64, 48, 67, 48, 40, 46, 96, 90, 3], [76, 14, 83, 4, 12, 99, 23, 3, 3, 42, 80, 77, 19, 28, 38, 9, 56, 17, 7, 72, 76, 54, 28, 66, 28], [25, 91, 99, 79, 49, 48, 99, 47, 62, 33, 42, 87, 27, 8, 62, 38, 4, 54, 48, 69, 16, 61, 18, 45, 18], [8, 29, 21, 54, 91, 47, 66, 68, 48, 76, 80, 89, 23, 17, 61, 52, 42, 51, 1, 21, 57, 36, 2, 23, 60], [59, 66, 43, 59, 74, 73, 93, 90, 36, 60, 93, 4, 21, 97, 95, 92, 97, 4, 4, 33, 14, 9, 88, 64, 62], [89, 7, 92, 5, 13, 2, 84, 12, 91, 7, 34, 21, 60, 82, 10, 38, 58, 56, 44, 85, 80, 64, 20, 50, 54], [46, 40, 24, 85, 58, 31, 50, 10, 84, 14, 19, 30, 57, 16, 22, 54, 84, 70, 43, 97, 19, 5, 71, 98, 20], [15, 38, 1, 5, 98, 54, 85, 61, 78, 17, 76, 27, 70, 25, 91, 45, 2, 22, 96, 54, 17, 61, 66, 26, 56], [33, 1, 40, 43, 44, 62, 36, 56, 39, 89, 13, 39, 12, 21, 87, 18, 13, 19, 35, 46, 57, 34, 62, 56, 1], [57, 86, 28, 4, 71, 75, 76, 40, 53, 39, 35, 98, 82, 10, 51, 64, 79, 59, 26, 3, 77, 98, 17, 65, 78], [1, 88, 57, 11, 67, 77, 55, 86, 41, 59, 30, 25, 71, 64, 89, 25, 66, 34, 55, 58, 86, 54, 1, 18, 16], [56, 74, 31, 48, 77, 34, 34, 60, 76, 37, 40, 17, 41, 56, 54, 79, 13, 46, 72, 17, 11, 40, 46, 65, 32], [52, 10, 59, 15, 3, 9, 8, 74, 8, 16, 11, 23, 56, 56, 22, 18, 39, 3, 8, 5, 91, 5, 19, 81, 61], [46, 18, 61, 60, 2, 50, 63, 71, 49, 80, 71, 18, 90, 93, 16, 46, 94, 25, 8, 64, 14, 22, 78, 91, 35], [51, 76, 43, 85, 75, 3, 73, 55, 19, 42, 61, 23, 80, 4, 96, 65, 4, 59, 90, 91, 80, 30, 33, 80, 33], [20, 95, 48, 27, 32, 86, 27, 25, 66, 87, 12, 46, 48, 85, 75, 85, 37, 4, 90, 84, 61, 71, 47, 91, 47], [17, 32, 10, 50, 75, 59, 18, 66, 35, 6, 3, 71, 35, 77, 66, 66, 51, 72, 73, 34, 39, 95, 93, 49, 47]],15,17,), ([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 83, 85, 49, 74], [4, 62, 18, 60, 64, 20, 52, 36, 62, 48, 96, 57, 57, 91, 41, 88, 93, 53, 88, 62, 29, 39, 82], [10, 61, 56, 9, 50, 75, 12, 2, 90, 73, 17, 35, 46, 67, 70, 87, 35, 79, 72, 96, 34, 11, 3], [93, 10, 82, 82, 12, 91, 51, 83, 97, 89, 59, 2, 2, 5, 22, 33, 69, 28, 58, 14, 50, 74, 41], [15, 74, 68, 43, 55, 49, 18, 81, 95, 97, 25, 12, 55, 47, 85, 81, 84, 93, 67, 71, 64, 60, 97], [90, 84, 43, 37, 32, 99, 85, 52, 53, 56, 72, 2, 48, 16, 91, 36, 10, 92, 81, 89, 79, 18, 92], [2, 40, 42, 95, 95, 25, 1, 82, 16, 42, 37, 37, 71, 6, 78, 22, 95, 74, 46, 40, 54, 46, 36], [41, 98, 67, 23, 43, 61, 17, 93, 65, 3, 78, 75, 30, 21, 16, 62, 60, 9, 66, 26, 67, 15, 12], [19, 14, 15, 87, 11, 63, 43, 67, 43, 1, 4, 85, 25, 84, 74, 82, 97, 53, 35, 25, 3, 51, 50], [13, 35, 89, 55, 18, 51, 30, 40, 30, 58, 88, 90, 65, 97, 72, 12, 8, 75, 78, 18, 65, 85, 10], [37, 29, 46, 88, 44, 36, 18, 79, 32, 20, 34, 73, 41, 98, 35, 57, 27, 18, 21, 18, 27, 95, 28], [97, 15, 45, 47, 36, 19, 99, 96, 45, 57, 76, 29, 98, 16, 22, 72, 55, 12, 98, 16, 55, 47, 73], [27, 99, 11, 83, 95, 15, 53, 91, 33, 71, 87, 22, 65, 58, 27, 75, 12, 60, 85, 72, 77, 33, 66], [9, 77, 26, 45, 55, 52, 9, 79, 7, 57, 57, 37, 73, 78, 30, 51, 47, 84, 54, 23, 79, 58, 56], [31, 68, 89, 62, 83, 60, 37, 34, 1, 41, 95, 44, 35, 27, 21, 72, 82, 23, 41, 93, 80, 50, 74], [81, 22, 40, 2, 42, 30, 44, 83, 10, 84, 63, 24, 6, 45, 18, 16, 40, 16, 79, 70, 97, 13, 68], [96, 50, 29, 58, 7, 97, 5, 40, 4, 7, 80, 37, 75, 59, 50, 69, 29, 55, 89, 67, 96, 30, 20], [94, 67, 61, 44, 56, 79, 60, 41, 78, 40, 50, 10, 17, 15, 93, 53, 98, 99, 73, 51, 81, 66, 26], [38, 92, 30, 55, 9, 92, 16, 24, 86, 20, 62, 52, 78, 52, 43, 96, 10, 66, 71, 65, 15, 75, 84], [50, 41, 60, 33, 52, 38, 84, 64, 10, 96, 50, 63, 59, 12, 58, 89, 9, 49, 61, 81, 78, 88, 51], [45, 67, 80, 18, 61, 50, 14, 10, 74, 6, 3, 86, 2, 76, 1, 52, 13, 32, 25, 38, 5, 18, 10], [53, 83, 34, 30, 32, 11, 86, 30, 1, 6, 78, 56, 67, 58, 79, 95, 19, 61, 62, 86, 71, 91, 35], [43, 5, 46, 35, 87, 36, 4, 61, 2, 35, 46, 4, 60, 48, 4, 70, 51, 17, 4, 86, 57, 85, 76]],17,22,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
382.326923
9,101
0.473719
4,889
19,881
1.922888
0.03109
0.018934
0.022657
0.025104
0.022232
0.021806
0.021806
0.021062
0.020849
0.01936
0
0.61077
0.26211
19,881
52
9,102
382.326923
0.030061
0.009305
0
0.285714
0
0
0.001219
0
0
0
0
0
0
1
0.02381
false
0
0
0
0.047619
0.02381
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
d8a41006ae613f092c2493be67fa94572854ab3b
92
py
Python
froide/foisite/admin.py
manonthemat/froide
698c49935eaf2e922f3c9f6a46af0fd545ccbbbb
[ "MIT" ]
198
2016-12-03T22:42:55.000Z
2022-03-25T15:08:36.000Z
froide/foisite/admin.py
manonthemat/froide
698c49935eaf2e922f3c9f6a46af0fd545ccbbbb
[ "MIT" ]
264
2016-11-30T18:53:17.000Z
2022-03-17T11:34:18.000Z
froide/foisite/admin.py
ashmpace/question-mtl
5ce1289cd6db0e629aa138d2dee235d9a4c4546b
[ "MIT" ]
42
2016-12-22T04:08:27.000Z
2022-02-26T08:30:38.000Z
from django.contrib import admin from .models import FoiSite admin.site.register(FoiSite)
15.333333
32
0.815217
13
92
5.769231
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.119565
92
5
33
18.4
0.925926
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
d8b4ee6c6b8979ab9fa1955a0f045727106c7104
36
py
Python
login.py
ManiaShark/project
6f5e8e320b1538bad226424984fff51b6e74f596
[ "MIT" ]
1
2018-09-12T01:05:17.000Z
2018-09-12T01:05:17.000Z
login.py
ManiaShark/project
6f5e8e320b1538bad226424984fff51b6e74f596
[ "MIT" ]
null
null
null
login.py
ManiaShark/project
6f5e8e320b1538bad226424984fff51b6e74f596
[ "MIT" ]
1
2018-09-12T11:02:26.000Z
2018-09-12T11:02:26.000Z
num = 1 num2 = 33333 num3 = 333333
7.2
13
0.638889
6
36
3.833333
1
0
0
0
0
0
0
0
0
0
0
0.538462
0.277778
36
4
14
9
0.346154
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
d8e33f74acbf4800ef30401dd24af5ca23b7058c
3,000
py
Python
Sticky-Notes/tests/test_outputs/getFileName.py
v2thegreat/sticky-notes
e79dd10b8fb88e0195ac1ca90d6b8dcb0f56e002
[ "Apache-2.0" ]
null
null
null
Sticky-Notes/tests/test_outputs/getFileName.py
v2thegreat/sticky-notes
e79dd10b8fb88e0195ac1ca90d6b8dcb0f56e002
[ "Apache-2.0" ]
null
null
null
Sticky-Notes/tests/test_outputs/getFileName.py
v2thegreat/sticky-notes
e79dd10b8fb88e0195ac1ca90d6b8dcb0f56e002
[ "Apache-2.0" ]
null
null
null
expected_outputs = ['Note-0.md', 'Note-0.HTML', 'Note-1.md', 'Note-1.HTML', 'Note-2.md', 'Note-2.HTML', 'Note-3.md', 'Note-3.HTML', 'Note-4.md', 'Note-4.HTML', 'Note-5.md', 'Note-5.HTML', 'Note-6.md', 'Note-6.HTML', 'Note-7.md', 'Note-7.HTML', 'Note-8.md', 'Note-8.HTML', 'Note-9.md', 'Note-9.HTML', 'Note-10.md', 'Note-10.HTML', 'Note-11.md', 'Note-11.HTML', 'Note-12.md', 'Note-12.HTML', 'Note-13.md', 'Note-13.HTML', 'Note-14.md', 'Note-14.HTML', 'Note-15.md', 'Note-15.HTML', 'Note-16.md', 'Note-16.HTML', 'Note-17.md', 'Note-17.HTML', 'Note-18.md', 'Note-18.HTML', 'Note-19.md', 'Note-19.HTML', 'Note-20.md', 'Note-20.HTML', 'Note-21.md', 'Note-21.HTML', 'Note-22.md', 'Note-22.HTML', 'Note-23.md', 'Note-23.HTML', 'Note-24.md', 'Note-24.HTML', 'Note-25.md', 'Note-25.HTML', 'Note-26.md', 'Note-26.HTML', 'Note-27.md', 'Note-27.HTML', 'Note-28.md', 'Note-28.HTML', 'Note-29.md', 'Note-29.HTML', 'Note-30.md', 'Note-30.HTML', 'Note-31.md', 'Note-31.HTML', 'Note-32.md', 'Note-32.HTML', 'Note-33.md', 'Note-33.HTML', 'Note-34.md', 'Note-34.HTML', 'Note-35.md', 'Note-35.HTML', 'Note-36.md', 'Note-36.HTML', 'Note-37.md', 'Note-37.HTML', 'Note-38.md', 'Note-38.HTML', 'Note-39.md', 'Note-39.HTML', 'Note-40.md', 'Note-40.HTML', 'Note-41.md', 'Note-41.HTML', 'Note-42.md', 'Note-42.HTML', 'Note-43.md', 'Note-43.HTML', 'Note-44.md', 'Note-44.HTML', 'Note-45.md', 'Note-45.HTML', 'Note-46.md', 'Note-46.HTML', 'Note-47.md', 'Note-47.HTML', 'Note-48.md', 'Note-48.HTML', 'Note-49.md', 'Note-49.HTML', 'Note-50.md', 'Note-50.HTML', 'Note-51.md', 'Note-51.HTML', 'Note-52.md', 'Note-52.HTML', 'Note-53.md', 'Note-53.HTML', 'Note-54.md', 'Note-54.HTML', 'Note-55.md', 'Note-55.HTML', 'Note-56.md', 'Note-56.HTML', 'Note-57.md', 'Note-57.HTML', 'Note-58.md', 'Note-58.HTML', 'Note-59.md', 'Note-59.HTML', 'Note-60.md', 'Note-60.HTML', 'Note-61.md', 'Note-61.HTML', 'Note-62.md', 'Note-62.HTML', 'Note-63.md', 'Note-63.HTML', 'Note-64.md', 'Note-64.HTML', 'Note-65.md', 'Note-65.HTML', 'Note-66.md', 'Note-66.HTML', 'Note-67.md', 'Note-67.HTML', 'Note-68.md', 'Note-68.HTML', 'Note-69.md', 'Note-69.HTML', 'Note-70.md', 'Note-70.HTML', 'Note-71.md', 'Note-71.HTML', 'Note-72.md', 'Note-72.HTML', 'Note-73.md', 'Note-73.HTML', 'Note-74.md', 'Note-74.HTML', 'Note-75.md', 'Note-75.HTML', 'Note-76.md', 'Note-76.HTML', 'Note-77.md', 'Note-77.HTML', 'Note-78.md', 'Note-78.HTML', 'Note-79.md', 'Note-79.HTML', 'Note-80.md', 'Note-80.HTML', 'Note-81.md', 'Note-81.HTML', 'Note-82.md', 'Note-82.HTML', 'Note-83.md', 'Note-83.HTML', 'Note-84.md', 'Note-84.HTML', 'Note-85.md', 'Note-85.HTML', 'Note-86.md', 'Note-86.HTML', 'Note-87.md', 'Note-87.HTML', 'Note-88.md', 'Note-88.HTML', 'Note-89.md', 'Note-89.HTML', 'Note-90.md', 'Note-90.HTML', 'Note-91.md', 'Note-91.HTML', 'Note-92.md', 'Note-92.HTML', 'Note-93.md', 'Note-93.HTML', 'Note-94.md', 'Note-94.HTML', 'Note-95.md', 'Note-95.HTML', 'Note-96.md', 'Note-96.HTML', 'Note-97.md', 'Note-97.HTML', 'Note-98.md', 'Note-98.HTML', 'Note-99.md', 'Note-99.HTML']
1,500
2,999
0.598667
602
3,000
2.981728
0.174419
0.334262
0
0
0
0
0
0
0
0
0
0.135811
0.067333
3,000
1
3,000
3,000
0.505718
0
0
0
0
0
0.726667
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
d8ee5f8d9b3a85a50d156261bb8a4ea705b11351
115
py
Python
fiction_segmentation/data/test_split_overflow.py
aklagoo/fiction_segmentation
c14d5c380f800a632bc9f3199e69e6b25413e086
[ "MIT" ]
null
null
null
fiction_segmentation/data/test_split_overflow.py
aklagoo/fiction_segmentation
c14d5c380f800a632bc9f3199e69e6b25413e086
[ "MIT" ]
null
null
null
fiction_segmentation/data/test_split_overflow.py
aklagoo/fiction_segmentation
c14d5c380f800a632bc9f3199e69e6b25413e086
[ "MIT" ]
null
null
null
from unittest import TestCase class TestSplit_overflow(TestCase): def test_uniformity(self, x): pass
16.428571
35
0.730435
14
115
5.857143
0.928571
0
0
0
0
0
0
0
0
0
0
0
0.208696
115
6
36
19.166667
0.901099
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0.25
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
1
0
0
1
0
0
5
d8fe60cb7b72d3e5b63d2e4e57e12e4214168725
24
py
Python
app/classes/missing.py
fossabot/Starboard-2
798e2d04995ae7d920e76708b9ea8fae6f4af319
[ "MIT" ]
null
null
null
app/classes/missing.py
fossabot/Starboard-2
798e2d04995ae7d920e76708b9ea8fae6f4af319
[ "MIT" ]
null
null
null
app/classes/missing.py
fossabot/Starboard-2
798e2d04995ae7d920e76708b9ea8fae6f4af319
[ "MIT" ]
null
null
null
class Missing: pass
8
14
0.666667
3
24
5.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.291667
24
2
15
12
0.941176
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
2b25ed291a003b5f379cf6ba31308ce499cb34a2
424
py
Python
ch18/pymui_v2.py
rauhaanrizvi/code
018270126c3549ec586165ee7b054ecb4fcb3bb8
[ "0BSD" ]
10
2021-05-07T08:31:57.000Z
2022-03-06T11:16:23.000Z
ch18/pymui_v2.py
rauhaanrizvi/code
018270126c3549ec586165ee7b054ecb4fcb3bb8
[ "0BSD" ]
null
null
null
ch18/pymui_v2.py
rauhaanrizvi/code
018270126c3549ec586165ee7b054ecb4fcb3bb8
[ "0BSD" ]
4
2021-08-23T08:48:36.000Z
2022-03-13T04:00:04.000Z
# Basic MUI components Button = require('@material-ui/core/Button')['default'] List = require('@material-ui/core/List')['default'] ListItem = require('@material-ui/core/ListItem')['default'] Typography = require('@material-ui/core/Typography')['default'] Input = require('@material-ui/core/Input')['default'] InputLabel = require('@material-ui/core/InputLabel')['default'] Box = require('@material-ui/core/Box')['default']
42.4
63
0.721698
52
424
5.884615
0.288462
0.343137
0.388889
0.480392
0
0
0
0
0
0
0
0
0.061321
424
9
64
47.111111
0.768844
0.04717
0
0
0
0
0.551122
0.428928
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
2b3940a57b9b855605a3d04e880237d3e9088f16
70
py
Python
settings.py
rtre84/Flask-Restplus-Swagger-Postgres
5289fa26c89f30297eba2868a581906f76cf724b
[ "MIT" ]
1
2020-09-17T12:11:35.000Z
2020-09-17T12:11:35.000Z
settings.py
rtre84/Flask-Restplus-Swagger-Postgres
5289fa26c89f30297eba2868a581906f76cf724b
[ "MIT" ]
null
null
null
settings.py
rtre84/Flask-Restplus-Swagger-Postgres
5289fa26c89f30297eba2868a581906f76cf724b
[ "MIT" ]
null
null
null
# DB_URI = 'sqlite:///./main.db' DB_URI = 'postgres://localhost/mydb'
23.333333
36
0.642857
10
70
4.3
0.7
0.232558
0
0
0
0
0
0
0
0
0
0
0.1
70
2
37
35
0.68254
0.428571
0
0
0
0
0.657895
0.657895
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
2b3be92ebdc406b9f0984b35ac3c573766beccb5
83
py
Python
manipulaHTML_start.py
lucasiqueira86/Python
becabacbf9a55405ffafda50df7e8a02aedc3051
[ "MIT" ]
null
null
null
manipulaHTML_start.py
lucasiqueira86/Python
becabacbf9a55405ffafda50df7e8a02aedc3051
[ "MIT" ]
null
null
null
manipulaHTML_start.py
lucasiqueira86/Python
becabacbf9a55405ffafda50df7e8a02aedc3051
[ "MIT" ]
null
null
null
# # Exemplo de processamento e parse de HTML # from html.parser import HTMLParser
16.6
42
0.771084
12
83
5.333333
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.180723
83
4
43
20.75
0.941176
0.481928
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
2b40ed1fb10bb9082962ab805b1faee855b0b57e
310
py
Python
Mycoffee/accounts/views.py
AbderrhmanAbdellatif/MyCoffee
01563ccd1881caea605391fb813b7d0f2f59be02
[ "MIT" ]
null
null
null
Mycoffee/accounts/views.py
AbderrhmanAbdellatif/MyCoffee
01563ccd1881caea605391fb813b7d0f2f59be02
[ "MIT" ]
null
null
null
Mycoffee/accounts/views.py
AbderrhmanAbdellatif/MyCoffee
01563ccd1881caea605391fb813b7d0f2f59be02
[ "MIT" ]
null
null
null
from django.http import request from django.shortcuts import render # Create your views here. def signin(request): return render(request,'accounts/signin.html') def signup(request): return render(request,'accounts/signup.html') def profile(request): return render(request,'accounts/profile.html')
28.181818
50
0.767742
41
310
5.804878
0.439024
0.163866
0.239496
0.327731
0.428571
0
0
0
0
0
0
0
0.122581
310
11
50
28.181818
0.875
0.074194
0
0
0
0
0.213287
0.073427
0
0
0
0
0
1
0.375
false
0
0.25
0.375
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
2b48a65242018f8f0b0cb6a6bc4910557c1f169e
2,034
py
Python
lightningtrace/transformations.py
GeomaticsResearch/lightningtrace
3d1c0a799dfa78a39fdbd0700e22b8709f641a33
[ "MIT" ]
5
2017-02-12T01:16:42.000Z
2019-01-06T16:48:08.000Z
lightningtrace/transformations.py
GeomaticsResearch/lightningtrace
3d1c0a799dfa78a39fdbd0700e22b8709f641a33
[ "MIT" ]
1
2018-04-10T21:27:45.000Z
2019-02-14T00:15:08.000Z
lightningtrace/transformations.py
GeomaticsResearch/lightningtrace
3d1c0a799dfa78a39fdbd0700e22b8709f641a33
[ "MIT" ]
null
null
null
import numpy as np def world_to_pixel_coords(affine, coords): """Convert a set of coordinates from world to pixel coordinates. :param affine: The rasterio affine object :param coords: World coordinates you want to translate to pixel coordinates """ # Convert to numpy array coords = np.array(coords) if coords.shape[0] <= 0 or coords.shape[1] < 2: raise ValueError("Shape of coords is incorrect. Please make sure you have X, Y, optional Z format") # Affine transformations between raster and world coordinates. # See https://github.com/sgillies/affine # See https://github.com/mapbox/rasterio/blob/master/docs/windowed-rw.rst # See http://www.perrygeo.com/python-affine-transforms.html # affine = Convert from pixel coordinates to world coordinates reverse_affine = ~affine # reverse_affine = Convert from world coordinates to pixel coordinates coords[:, 0:2] = np.apply_along_axis(lambda x: reverse_affine*(x[0], x[1]), axis=1, arr=coords) return coords def pixel_to_world_coords(affine, pixel_coords): """Convert a set of coordinates from pixel to world coordinates. :param affine: The rasterio affine object :param pixel_coords: Pixel coordinates (col, row) you want to translate to world coordinates """ coords = np.array(pixel_coords) if coords.shape[0] <= 0 or coords.shape[1] < 2: raise ValueError("Shape of pixel_coords is incorrect. Please make sure you have X, Y, optional Z format") # Affine transformations between raster and world coordinates. # See https://github.com/sgillies/affine # See https://github.com/mapbox/rasterio/blob/master/docs/windowed-rw.rst # See http://www.perrygeo.com/python-affine-transforms.html # affine = Convert from pixel coordinates to world coordinates reverse_affine = ~affine # reverse_affine = Convert from world coordinates to pixel coordinates coords[:, 0:2] = np.apply_along_axis(lambda x: affine*(x[0], x[1]), axis=1, arr=coords) return coords
48.428571
113
0.721731
293
2,034
4.945392
0.25256
0.099379
0.049689
0.046929
0.829538
0.801932
0.801932
0.755003
0.68599
0.68599
0
0.010817
0.181908
2,034
41
114
49.609756
0.859976
0.551622
0
0.4
0
0
0.190035
0
0
0
0
0
0
1
0.133333
false
0
0.066667
0
0.333333
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
2b6f56601504428d404ef21c2c065e37bf422b79
86
py
Python
account_setings.py
NurgaliyevS/Crypto_bot_telegram
cf8545d3079a9c5de98b4564bf6bf5d3c02a28ad
[ "MIT" ]
2
2022-03-20T02:49:08.000Z
2022-03-31T15:26:03.000Z
settings.py
NurgaliyevS/Crypto_Telegram_Bot_Buy_Coins
5b13d65c68d1c0c5ce5737ffc197b5b226689802
[ "MIT" ]
null
null
null
settings.py
NurgaliyevS/Crypto_Telegram_Bot_Buy_Coins
5b13d65c68d1c0c5ce5737ffc197b5b226689802
[ "MIT" ]
null
null
null
from dotenv import load_dotenv load_dotenv() # take environment variables from .env.
28.666667
54
0.802326
12
86
5.583333
0.666667
0.298507
0
0
0
0
0
0
0
0
0
0
0.139535
86
3
54
28.666667
0.905405
0.430233
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
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
99416782c8e0b909961f70c2f4bdc7554e54b060
68
py
Python
minerutils/__init__.py
EPICLab/miner-utils
802d614ea39eb6f35797d2033717f1b953a6825f
[ "MIT" ]
2
2020-09-22T00:05:20.000Z
2022-03-18T02:34:18.000Z
minerutils/__init__.py
EPICLab/miner-utils
802d614ea39eb6f35797d2033717f1b953a6825f
[ "MIT" ]
1
2020-10-01T21:23:21.000Z
2020-10-02T18:26:56.000Z
minerutils/__init__.py
EPICLab/miner-utils
802d614ea39eb6f35797d2033717f1b953a6825f
[ "MIT" ]
null
null
null
from .auth import MinerWithAuthentication from .github import GitHub
34
41
0.867647
8
68
7.375
0.625
0
0
0
0
0
0
0
0
0
0
0
0.102941
68
2
42
34
0.967213
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
996b6eadca01ee00a408b771a3d547d847157f5e
276
py
Python
{{cookiecutter.project_shortname}}/{{cookiecutter.package_name}}/__init__.py
slint/cookiecutter-invenio-datamodel
edf16c5830db9d6e73dd9f133fc3cd1ce29a0d71
[ "MIT" ]
null
null
null
{{cookiecutter.project_shortname}}/{{cookiecutter.package_name}}/__init__.py
slint/cookiecutter-invenio-datamodel
edf16c5830db9d6e73dd9f133fc3cd1ce29a0d71
[ "MIT" ]
null
null
null
{{cookiecutter.project_shortname}}/{{cookiecutter.package_name}}/__init__.py
slint/cookiecutter-invenio-datamodel
edf16c5830db9d6e73dd9f133fc3cd1ce29a0d71
[ "MIT" ]
null
null
null
{% include 'misc/header.py' %} """{{ cookiecutter.description }}""" from __future__ import absolute_import, print_function from .ext import {{ cookiecutter.extension_class }} from .version import __version__ __all__ = ('__version__', '{{ cookiecutter.extension_class }}')
25.090909
63
0.73913
28
276
6.571429
0.607143
0.228261
0.282609
0
0
0
0
0
0
0
0
0
0.115942
276
10
64
27.6
0.754098
0
0
0
0
0
0.245833
0.116667
0
0
0
0
0
0
null
null
0
0.6
null
null
0.2
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
1
0
0
0
1
0
0
0
0
5
997bd596b360bb4e957def706805050c29e6a2e0
79
py
Python
desafios/des048.py
Ericssm96/python
764d0d704be685db9e993c4b74d3df78da12cc6f
[ "MIT" ]
null
null
null
desafios/des048.py
Ericssm96/python
764d0d704be685db9e993c4b74d3df78da12cc6f
[ "MIT" ]
null
null
null
desafios/des048.py
Ericssm96/python
764d0d704be685db9e993c4b74d3df78da12cc6f
[ "MIT" ]
null
null
null
s = 0 for c in range(0, 501): if c % 2 != 0 and c % 3 == 0: s += c
15.8
33
0.379747
18
79
1.666667
0.611111
0
0
0
0
0
0
0
0
0
0
0.204545
0.443038
79
4
34
19.75
0.477273
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
9983217e23f84635b737ee96a0fc27810089ff8f
68
py
Python
chat/controllers/__init__.py
liuwill-projects/flask-server-scaffold
e75e3667053b6584a41aaba563d0a34f4db8fc1c
[ "MIT" ]
1
2017-04-27T09:44:35.000Z
2017-04-27T09:44:35.000Z
chat/controllers/__init__.py
liuwill-projects/flask-server-scaffold
e75e3667053b6584a41aaba563d0a34f4db8fc1c
[ "MIT" ]
null
null
null
chat/controllers/__init__.py
liuwill-projects/flask-server-scaffold
e75e3667053b6584a41aaba563d0a34f4db8fc1c
[ "MIT" ]
null
null
null
from flask import Flask, jsonify from chat.utils.jsonp import jsonp
22.666667
34
0.823529
11
68
5.090909
0.636364
0
0
0
0
0
0
0
0
0
0
0
0.132353
68
2
35
34
0.949153
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
41df7e93d1b07022234bc59a3194a82463a794db
80
py
Python
creepy/__init__.py
itesoro/reepyc
38523ed0de784fa293c3f22af6d01712f0aa38c8
[ "MIT" ]
1
2022-02-11T22:05:36.000Z
2022-02-11T22:05:36.000Z
creepy/__init__.py
itesoro/reepyc
38523ed0de784fa293c3f22af6d01712f0aa38c8
[ "MIT" ]
15
2020-11-24T09:22:28.000Z
2021-11-10T17:54:32.000Z
creepy/__init__.py
itesoro/reepyc
38523ed0de784fa293c3f22af6d01712f0aa38c8
[ "MIT" ]
null
null
null
from .query import connect, unproxy from .copy import copy from .app import app
20
35
0.7875
13
80
4.846154
0.538462
0
0
0
0
0
0
0
0
0
0
0
0.1625
80
3
36
26.666667
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
1
0
0
5
41f225bad3fd07b95061fd54f8a0cfa152e50218
254
py
Python
manage.py
amalchuk/readable
ce5397039516299a105ed975d79d9e62d0fe747f
[ "MIT" ]
null
null
null
manage.py
amalchuk/readable
ce5397039516299a105ed975d79d9e62d0fe747f
[ "MIT" ]
null
null
null
manage.py
amalchuk/readable
ce5397039516299a105ed975d79d9e62d0fe747f
[ "MIT" ]
null
null
null
#!/usr/bin/env python from os import environ if __name__ == "__main__": environ.setdefault("DJANGO_SETTINGS_MODULE", "readable.settings.development") from django.core.management import execute_from_command_line execute_from_command_line()
25.4
81
0.779528
32
254
5.6875
0.6875
0.120879
0.197802
0.241758
0
0
0
0
0
0
0
0
0.125984
254
9
82
28.222222
0.81982
0.07874
0
0
0
0
0.253219
0.218884
0
0
0
0
0
1
0
true
0
0.4
0
0.4
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
5106badfed7ceee8bf0550d5ebdd7953c15c52ab
97
py
Python
Codeforces/669/gen.py
Mindjolt2406/Competitive-Programming
d000d98bf7005ee4fb809bcea2f110e4c4793b80
[ "MIT" ]
2
2018-12-11T14:37:24.000Z
2022-01-23T18:11:54.000Z
Codeforces/669/gen.py
Mindjolt2406/Competitive-Programming
d000d98bf7005ee4fb809bcea2f110e4c4793b80
[ "MIT" ]
null
null
null
Codeforces/669/gen.py
Mindjolt2406/Competitive-Programming
d000d98bf7005ee4fb809bcea2f110e4c4793b80
[ "MIT" ]
null
null
null
from random import * n = randint(5,10) print n for i in range(n): print randint(1,10), print ""
16.166667
22
0.670103
19
97
3.421053
0.684211
0.215385
0
0
0
0
0
0
0
0
0
0.075949
0.185567
97
6
23
16.166667
0.746835
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0.166667
null
null
0.5
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
5
511c4b0f0051cca6d3e9d4723359af3604198075
242
py
Python
extraction_tool/constants.py
ohadlevy/homebridge-palgate-opener
1dc2c4e00a7dc969221db6f571a75d2d4088a7a0
[ "MIT" ]
13
2020-10-24T22:17:31.000Z
2022-03-04T22:31:23.000Z
extraction_tool/constants.py
ohadlevy/homebridge-palgate-opener
1dc2c4e00a7dc969221db6f571a75d2d4088a7a0
[ "MIT" ]
7
2021-01-24T11:23:24.000Z
2022-02-27T13:19:28.000Z
extraction_tool/constants.py
ohadlevy/homebridge-palgate-opener
1dc2c4e00a7dc969221db6f571a75d2d4088a7a0
[ "MIT" ]
4
2020-10-24T22:17:42.000Z
2022-01-20T08:01:31.000Z
SMS_ADDR = "https://api1.pal-es.com/v1/bt/verify/972{}/start/sms/" SMS_TOKEN = "GDN5-F8KG5-GNYSD45-KGBXRW843-SDFN4" VALIDATE_ADDR = "https://api1.pal-es.com/v1/bt/verify/972{}/code/{}/" DEVICE_ADDR = "https://api1.pal-es.com/v1/bt/devices/"
48.4
69
0.706612
42
242
3.97619
0.52381
0.161677
0.233533
0.287425
0.556886
0.556886
0.556886
0.556886
0.407186
0.407186
0
0.091703
0.053719
242
4
70
60.5
0.637555
0
0
0
0
0.25
0.727273
0.140496
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
512969a9d62c413ba64061dc9a182ad677f3a2ad
264
py
Python
thirdparty/statistic.py
bopopescu/redis-ctl
16ae59b6dfe3d62ecb59951bd81395c370b005ef
[ "MIT" ]
109
2015-02-11T03:06:09.000Z
2017-06-06T09:48:00.000Z
thirdparty/statistic.py
bopopescu/redis-ctl
16ae59b6dfe3d62ecb59951bd81395c370b005ef
[ "MIT" ]
14
2015-04-10T02:09:21.000Z
2017-04-24T00:22:18.000Z
thirdparty/statistic.py
bopopescu/redis-ctl
16ae59b6dfe3d62ecb59951bd81395c370b005ef
[ "MIT" ]
53
2015-03-13T15:34:34.000Z
2017-05-05T22:31:49.000Z
class Base(object): def __str__(self): return 'Unimplemented Statistic Service' def write_points(self, name, fields): raise NotImplementedError() def query(self, name, fields, span, end, interval): raise NotImplementedError()
26.4
55
0.674242
28
264
6.178571
0.714286
0.092486
0.16185
0
0
0
0
0
0
0
0
0
0.231061
264
9
56
29.333333
0.852217
0
0
0.285714
0
0
0.117424
0
0
0
0
0
0
1
0.428571
false
0
0
0.142857
0.714286
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
5135b10c191bf7b9cc9a6a8eac047d3870110b02
186
py
Python
pythonDesafios/aula10.py
mateusdev7/desafios-python
6160ddc84548c7af7f5775f9acabe58238f83008
[ "MIT" ]
null
null
null
pythonDesafios/aula10.py
mateusdev7/desafios-python
6160ddc84548c7af7f5775f9acabe58238f83008
[ "MIT" ]
null
null
null
pythonDesafios/aula10.py
mateusdev7/desafios-python
6160ddc84548c7af7f5775f9acabe58238f83008
[ "MIT" ]
null
null
null
# Condições tempo = int(input('Quantos anos tem seu carro?\n>')) if tempo <= 3: print('Seu carro está novo') else: print('Seu carro está velhinho...') print('Fim do programa.')
20.666667
52
0.650538
28
186
4.321429
0.714286
0.198347
0.214876
0.280992
0
0
0
0
0
0
0
0.006579
0.182796
186
8
53
23.25
0.789474
0.048387
0
0
0
0
0.52
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
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
1
0
5
51515643097b406b77e71f83643bb04a5b1b38ed
115
py
Python
pyinterfaces/convenience/record.py
OaklandPeters/pyinterfaces
c60efaad92e8d2e1ec25df718dfb43f034a083bb
[ "MIT" ]
null
null
null
pyinterfaces/convenience/record.py
OaklandPeters/pyinterfaces
c60efaad92e8d2e1ec25df718dfb43f034a083bb
[ "MIT" ]
null
null
null
pyinterfaces/convenience/record.py
OaklandPeters/pyinterfaces
c60efaad92e8d2e1ec25df718dfb43f034a083bb
[ "MIT" ]
null
null
null
""" These are the interfaces from the package itemize/. Todo: add dependency on itemize, and import them here. """
23
54
0.73913
17
115
5
0.882353
0
0
0
0
0
0
0
0
0
0
0
0.165217
115
4
55
28.75
0.885417
0.921739
0
null
0
null
0
0
null
0
0
0.25
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
1
0
0
0
1
0
0
0
0
0
0
5
516495aeea8fc8f01a72d4b5e6c869fcb616427e
6,481
py
Python
stage/configuration/test_amazon_s3_destination.py
anubandhan/datacollector-tests
301c024c66d68353735256b262b681dd05ba16cc
[ "Apache-2.0" ]
null
null
null
stage/configuration/test_amazon_s3_destination.py
anubandhan/datacollector-tests
301c024c66d68353735256b262b681dd05ba16cc
[ "Apache-2.0" ]
1
2019-04-24T11:06:38.000Z
2019-04-24T11:06:38.000Z
stage/configuration/test_amazon_s3_destination.py
anubandhan/datacollector-tests
301c024c66d68353735256b262b681dd05ba16cc
[ "Apache-2.0" ]
2
2019-05-24T06:34:37.000Z
2020-03-30T11:48:18.000Z
import pytest from streamsets.testframework.decorators import stub @stub def test_access_key_id(sdc_builder, sdc_executor): pass @stub @pytest.mark.parametrize('stage_attributes', [{'server_side_encryption_option': 'KMS', 'use_server_side_encryption': True}]) def test_aws_kms_key_arn(sdc_builder, sdc_executor, stage_attributes): pass @stub def test_bucket(sdc_builder, sdc_executor): pass @stub def test_common_prefix(sdc_builder, sdc_executor): pass @stub @pytest.mark.parametrize('stage_attributes', [{'compress_with_gzip': False}, {'compress_with_gzip': True}]) def test_compress_with_gzip(sdc_builder, sdc_executor, stage_attributes): pass @stub def test_connection_timeout(sdc_builder, sdc_executor): pass @stub @pytest.mark.parametrize('stage_attributes', [{'server_side_encryption_option': 'CUSTOMER', 'use_server_side_encryption': True}]) def test_customer_encryption_key(sdc_builder, sdc_executor, stage_attributes): pass @stub @pytest.mark.parametrize('stage_attributes', [{'server_side_encryption_option': 'CUSTOMER', 'use_server_side_encryption': True}]) def test_customer_encryption_key_md5(sdc_builder, sdc_executor, stage_attributes): pass @stub def test_data_time_zone(sdc_builder, sdc_executor): pass @stub def test_delimiter(sdc_builder, sdc_executor): pass @stub @pytest.mark.parametrize('stage_attributes', [{'server_side_encryption_option': 'KMS', 'use_server_side_encryption': True}]) def test_encryption_context(sdc_builder, sdc_executor, stage_attributes): pass @stub @pytest.mark.parametrize('stage_attributes', [{'region': 'OTHER'}]) def test_endpoint(sdc_builder, sdc_executor, stage_attributes): pass @stub def test_minimum_upload_part_size(sdc_builder, sdc_executor): pass @stub def test_multipart_upload_threshold(sdc_builder, sdc_executor): pass @stub def test_object_name_prefix(sdc_builder, sdc_executor): pass @stub def test_object_name_suffix(sdc_builder, sdc_executor): pass @stub @pytest.mark.parametrize('stage_attributes', [{'on_record_error': 'DISCARD'}, {'on_record_error': 'STOP_PIPELINE'}, {'on_record_error': 'TO_ERROR'}]) def test_on_record_error(sdc_builder, sdc_executor, stage_attributes): pass @stub def test_partition_prefix(sdc_builder, sdc_executor): pass @stub def test_preconditions(sdc_builder, sdc_executor): pass @stub @pytest.mark.parametrize('stage_attributes', [{'use_proxy': True}]) def test_proxy_host(sdc_builder, sdc_executor, stage_attributes): pass @stub @pytest.mark.parametrize('stage_attributes', [{'use_proxy': True}]) def test_proxy_password(sdc_builder, sdc_executor, stage_attributes): pass @stub @pytest.mark.parametrize('stage_attributes', [{'use_proxy': True}]) def test_proxy_port(sdc_builder, sdc_executor, stage_attributes): pass @stub @pytest.mark.parametrize('stage_attributes', [{'use_proxy': True}]) def test_proxy_user(sdc_builder, sdc_executor, stage_attributes): pass @stub @pytest.mark.parametrize('stage_attributes', [{'region': 'AP_NORTHEAST_1'}, {'region': 'AP_NORTHEAST_2'}, {'region': 'AP_NORTHEAST_3'}, {'region': 'AP_SOUTHEAST_1'}, {'region': 'AP_SOUTHEAST_2'}, {'region': 'AP_SOUTH_1'}, {'region': 'CA_CENTRAL_1'}, {'region': 'CN_NORTHWEST_1'}, {'region': 'CN_NORTH_1'}, {'region': 'EU_CENTRAL_1'}, {'region': 'EU_WEST_1'}, {'region': 'EU_WEST_2'}, {'region': 'EU_WEST_3'}, {'region': 'OTHER'}, {'region': 'SA_EAST_1'}, {'region': 'US_EAST_1'}, {'region': 'US_EAST_2'}, {'region': 'US_GOV_WEST_1'}, {'region': 'US_WEST_1'}, {'region': 'US_WEST_2'}]) def test_region(sdc_builder, sdc_executor, stage_attributes): pass @stub def test_required_fields(sdc_builder, sdc_executor): pass @stub def test_retry_count(sdc_builder, sdc_executor): pass @stub def test_secret_access_key(sdc_builder, sdc_executor): pass @stub @pytest.mark.parametrize('stage_attributes', [{'server_side_encryption_option': 'CUSTOMER', 'use_server_side_encryption': True}, {'server_side_encryption_option': 'KMS', 'use_server_side_encryption': True}, {'server_side_encryption_option': 'NONE', 'use_server_side_encryption': True}, {'server_side_encryption_option': 'S3', 'use_server_side_encryption': True}]) def test_server_side_encryption_option(sdc_builder, sdc_executor, stage_attributes): pass @stub def test_socket_timeout(sdc_builder, sdc_executor): pass @stub def test_thread_pool_size_for_parallel_uploads(sdc_builder, sdc_executor): pass @stub def test_time_basis(sdc_builder, sdc_executor): pass @stub @pytest.mark.parametrize('stage_attributes', [{'use_proxy': False}, {'use_proxy': True}]) def test_use_proxy(sdc_builder, sdc_executor, stage_attributes): pass @stub @pytest.mark.parametrize('stage_attributes', [{'use_server_side_encryption': False}, {'use_server_side_encryption': True}]) def test_use_server_side_encryption(sdc_builder, sdc_executor, stage_attributes): pass
29.729358
107
0.584632
672
6,481
5.205357
0.153274
0.066038
0.122642
0.198113
0.759863
0.736421
0.736421
0.699828
0.627787
0.591481
0
0.004715
0.31276
6,481
217
108
29.866359
0.780647
0
0
0.557047
0
0
0.197994
0.075926
0
0
0
0
0
1
0.221477
false
0.228188
0.013423
0
0.234899
0
0
0
0
null
0
0
1
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
5
5ad25bcf361868f1573ce15be23883e97a4be338
83
py
Python
src/moderate/endianness/solutions/python/solution.py
rdtsc/codeeval-solutions
d5c06baf89125e9e9f4b163ee57e5a8f7e73e717
[ "MIT" ]
null
null
null
src/moderate/endianness/solutions/python/solution.py
rdtsc/codeeval-solutions
d5c06baf89125e9e9f4b163ee57e5a8f7e73e717
[ "MIT" ]
null
null
null
src/moderate/endianness/solutions/python/solution.py
rdtsc/codeeval-solutions
d5c06baf89125e9e9f4b163ee57e5a8f7e73e717
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys print(sys.byteorder.title(), 'Endian', sep='')
13.833333
46
0.674699
12
83
4.666667
0.916667
0
0
0
0
0
0
0
0
0
0
0.013514
0.108434
83
5
47
16.6
0.743243
0.253012
0
0
0
0
0.098361
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
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
1
0
0
1
0
5
5afc70df7ddecda1d227e407ffd0daf35b4c8077
74
py
Python
tests/invalid/type_enum.py
anthem-ai/fhir-types
42348655fb3a9b3f131b911d6bc0782da8c14ce4
[ "Apache-2.0" ]
2
2022-02-03T00:51:30.000Z
2022-02-03T18:42:43.000Z
tests/invalid/type_enum.py
anthem-ai/fhir-types
42348655fb3a9b3f131b911d6bc0782da8c14ce4
[ "Apache-2.0" ]
null
null
null
tests/invalid/type_enum.py
anthem-ai/fhir-types
42348655fb3a9b3f131b911d6bc0782da8c14ce4
[ "Apache-2.0" ]
null
null
null
from fhir_types import FHIR_Patient p: FHIR_Patient = {"gender": "mail"}
18.5
36
0.743243
11
74
4.727273
0.727273
0.423077
0
0
0
0
0
0
0
0
0
0
0.135135
74
3
37
24.666667
0.8125
0
0
0
0
0
0.135135
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
5aff4b608618ed1aa9318dbfab951aa942848689
176
py
Python
settings/django_settings/cfg_prod.py
thitta/Someone.tw-Blog
b38669877f269006fcbeb5544ec3054acfef5128
[ "Apache-2.0" ]
3
2019-05-04T01:30:40.000Z
2019-10-15T03:21:29.000Z
settings/django_settings/cfg_prod.py
thitta/Someone.tw-Blog
b38669877f269006fcbeb5544ec3054acfef5128
[ "Apache-2.0" ]
8
2020-02-12T00:09:35.000Z
2022-02-10T08:40:10.000Z
settings/django_settings/cfg_prod.py
thitta/Someone.tw-Blog
b38669877f269006fcbeb5544ec3054acfef5128
[ "Apache-2.0" ]
null
null
null
DEBUG = False ALLOWED_HOSTS = ["someone.tw", "blog.someone.tw", "www.someone.tw", "128.199.149.10"] STATIC_URL = 'https://storage.googleapis.com/blog-someone-tw-static/site/'
35.2
85
0.715909
27
176
4.592593
0.703704
0.290323
0.209677
0
0
0
0
0
0
0
0
0.067485
0.073864
176
4
86
44
0.693252
0
0
0
0
0
0.636364
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
852115df3213ad90cf9b078d620a244ed9ae7ed0
32
py
Python
resizeright/__init__.py
alexhagen/ResizeRight
0ba9eaac7e7a73b639180ba23d98adce48c1ec57
[ "MIT" ]
null
null
null
resizeright/__init__.py
alexhagen/ResizeRight
0ba9eaac7e7a73b639180ba23d98adce48c1ec57
[ "MIT" ]
null
null
null
resizeright/__init__.py
alexhagen/ResizeRight
0ba9eaac7e7a73b639180ba23d98adce48c1ec57
[ "MIT" ]
null
null
null
from .resize_right import resize
32
32
0.875
5
32
5.4
0.8
0
0
0
0
0
0
0
0
0
0
0
0.09375
32
1
32
32
0.931034
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
517442ed0c4dd697a07e82ffa940f98ff6002947
127
py
Python
03.Complete Python Developer - Zero to Mastery - AN/04.Advanced Python Functional Programming/map.py
ptyadana/python-dojo
98c7234b84f0afea99a091c7198342d66bbdff5b
[ "MIT" ]
3
2020-06-01T04:17:18.000Z
2020-12-18T03:05:55.000Z
03.Complete Python Developer - Zero to Mastery - AN/04.Advanced Python Functional Programming/map.py
ptyadana/python-dojo
98c7234b84f0afea99a091c7198342d66bbdff5b
[ "MIT" ]
1
2020-04-25T08:01:59.000Z
2020-04-25T08:01:59.000Z
03.Complete Python Developer - Zero to Mastery - AN/04.Advanced Python Functional Programming/map.py
ptyadana/python-dojo
98c7234b84f0afea99a091c7198342d66bbdff5b
[ "MIT" ]
7
2020-04-26T10:02:36.000Z
2021-06-08T05:12:46.000Z
#map def multiply_by_two(item): return item*2 my_list = [1,2,3] print(my_list) print(list(map(multiply_by_two, my_list)))
15.875
42
0.724409
25
127
3.4
0.52
0.211765
0.305882
0
0
0
0
0
0
0
0
0.036036
0.125984
127
7
43
18.142857
0.72973
0.023622
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0
0.2
0.4
0.4
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
0
0
0
5
518bd21174229fbc45b75642d1272497dae68adf
74
py
Python
byconeer/lib/__init__.py
sofiapfund/bycon
d7993eaf99cfce46f3025718ab3aa3c0f812badd
[ "CC0-1.0" ]
null
null
null
byconeer/lib/__init__.py
sofiapfund/bycon
d7993eaf99cfce46f3025718ab3aa3c0f812badd
[ "CC0-1.0" ]
1
2021-03-18T12:17:59.000Z
2021-03-18T12:19:24.000Z
byconeer/lib/__init__.py
sofiapfund/bycon
d7993eaf99cfce46f3025718ab3aa3c0f812badd
[ "CC0-1.0" ]
null
null
null
# __init__.py from .table_tools import * from .publication_utils import *
18.5
32
0.783784
10
74
5.2
0.8
0
0
0
0
0
0
0
0
0
0
0
0.135135
74
3
33
24.666667
0.8125
0.148649
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
51ab65493b66211277baa7db6b16138562290d3c
389
py
Python
moka/numeric.py
zhengpingzhou/pymoka
7ad4ee3eb97e656ade7b31ff4400db633854712a
[ "MIT" ]
2
2020-09-13T08:15:47.000Z
2021-02-19T07:29:44.000Z
moka/numeric.py
zhengpingzhou/pymoka
7ad4ee3eb97e656ade7b31ff4400db633854712a
[ "MIT" ]
null
null
null
moka/numeric.py
zhengpingzhou/pymoka
7ad4ee3eb97e656ade7b31ff4400db633854712a
[ "MIT" ]
null
null
null
import random import numpy.linalg as LA def normalize(value, value_min, value_max): """Map value from [value_min, value_max] to [-1, 1]""" return 2 * ((value - value_min) / (value_max - value_min)) - 1 def unnormalize(value, value_min, value_max): """Map value from [-1, 1] to [value_min, value_max]""" return ((value + 1) / 2.0 * (value_max - value_min) + value_min)
27.785714
68
0.652956
62
389
3.870968
0.306452
0.266667
0.325
0.333333
0.3625
0.275
0.275
0.275
0
0
0
0.028662
0.192802
389
13
69
29.923077
0.735669
0.249357
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
0
0
0
5
51c86b84d59feefc6bd773989dfabe205923f9bf
120
py
Python
questionnaire/__init__.py
cjz25/cquestionnaire
961c508d463a8d9d50c8485fa65c4a9d3a56e5fa
[ "MIT" ]
null
null
null
questionnaire/__init__.py
cjz25/cquestionnaire
961c508d463a8d9d50c8485fa65c4a9d3a56e5fa
[ "MIT" ]
null
null
null
questionnaire/__init__.py
cjz25/cquestionnaire
961c508d463a8d9d50c8485fa65c4a9d3a56e5fa
[ "MIT" ]
1
2021-10-15T12:51:01.000Z
2021-10-15T12:51:01.000Z
class Sequence: def __init__(self, old_seq, new_seq): self.old_seq = old_seq self.new_seq = new_seq
24
41
0.65
19
120
3.578947
0.421053
0.264706
0.294118
0
0
0
0
0
0
0
0
0
0.266667
120
4
42
30
0.772727
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
5
51cb168625fc743eca63cdf8bb5092c8a2551b37
103
py
Python
examples/simple/test_simple.py
kuss/pytest-convey
46ec70721e7403d43465f11795da09053e5a963e
[ "MIT" ]
7
2019-08-16T06:30:12.000Z
2021-02-09T22:45:27.000Z
examples/simple/test_simple.py
kuss/pytest-board
46ec70721e7403d43465f11795da09053e5a963e
[ "MIT" ]
1
2021-10-15T11:08:15.000Z
2021-10-15T11:08:15.000Z
examples/simple/test_simple.py
kuss/pytest-convey
46ec70721e7403d43465f11795da09053e5a963e
[ "MIT" ]
null
null
null
def test_pass(): assert True def test_fail(): assert False def test_exception(): x = 1/0
11.444444
21
0.631068
16
103
3.875
0.6875
0.33871
0
0
0
0
0
0
0
0
0
0.026316
0.262136
103
8
22
12.875
0.789474
0
0
0
0
0
0
0
0
0
0
0
0.333333
1
0.5
false
0.166667
0
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
5
51f92a2c6513baddca3c660fe1f56cdcee61c54a
373
py
Python
test_covid_news_handling.py
RhianMackintosh/ECM1400-Coursework
d579f843a08725e0ab593f715f3a5eceeb73f6ec
[ "BSD-4-Clause-UC" ]
null
null
null
test_covid_news_handling.py
RhianMackintosh/ECM1400-Coursework
d579f843a08725e0ab593f715f3a5eceeb73f6ec
[ "BSD-4-Clause-UC" ]
null
null
null
test_covid_news_handling.py
RhianMackintosh/ECM1400-Coursework
d579f843a08725e0ab593f715f3a5eceeb73f6ec
[ "BSD-4-Clause-UC" ]
null
null
null
from covid_news_handling import * """ This module provides tests for the functions in the covid_news_handling module """ def test_news_API_request(): assert news_API_request() == news_API_request("Covid COVID-19 coronavirus"), "Test failed: default covid terms" assert isinstance(list, news_API_request()), "Test failed: list returned from news request"
37.3
116
0.756032
52
373
5.173077
0.5
0.104089
0.208178
0
0
0
0
0
0
0
0
0.006369
0.158177
373
9
117
41.444444
0.850318
0
0
0
0
0
0.366906
0
0
0
0
0
0.5
1
0.25
true
0
0.25
0
0.5
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
1
0
0
0
0
0
0
5
cfc21b2b6383464ee2d24b1e11f37268e134aa55
306
py
Python
IOMC/EventVertexGenerators/python/VtxSmearedRealistic5TeVPA2016Collision_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
IOMC/EventVertexGenerators/python/VtxSmearedRealistic5TeVPA2016Collision_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
IOMC/EventVertexGenerators/python/VtxSmearedRealistic5TeVPA2016Collision_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms from IOMC.EventVertexGenerators.VtxSmearedParameters_cfi import Realistic5TeVPACollision2016VtxSmearingParameters,VtxSmearedCommon VtxSmeared = cms.EDProducer("BetafuncEvtVtxGenerator", Realistic5TeVPACollision2016VtxSmearingParameters, VtxSmearedCommon )
38.25
130
0.882353
20
306
13.45
0.8
0.483271
0
0
0
0
0
0
0
0
0
0.035336
0.075163
306
7
131
43.714286
0.915194
0
0
0
0
0
0.075163
0.075163
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
1
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
5c713b2eff972a9ff68ddaba928a8edc4cf17d08
220
py
Python
app/v2/inbound_sms/__init__.py
tlwr/notifications-api
88a6b7729edb9be41ce3e7c027f1452b7b6d00d2
[ "MIT" ]
10
2020-05-04T14:11:06.000Z
2022-02-22T19:06:36.000Z
app/v2/inbound_sms/__init__.py
tlwr/notifications-api
88a6b7729edb9be41ce3e7c027f1452b7b6d00d2
[ "MIT" ]
554
2020-05-07T21:56:24.000Z
2022-03-31T23:04:51.000Z
app/v2/inbound_sms/__init__.py
tlwr/notifications-api
88a6b7729edb9be41ce3e7c027f1452b7b6d00d2
[ "MIT" ]
4
2020-08-27T16:43:29.000Z
2021-02-17T22:17:27.000Z
from flask import Blueprint from app.v2.errors import register_errors v2_inbound_sms_blueprint = Blueprint("v2_inbound_sms", __name__, url_prefix='/v2/received-text-messages') register_errors(v2_inbound_sms_blueprint)
31.428571
105
0.845455
32
220
5.34375
0.5
0.157895
0.210526
0.269006
0.409357
0.409357
0
0
0
0
0
0.02451
0.072727
220
6
106
36.666667
0.813725
0
0
0
0
0
0.181818
0.118182
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0.75
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
1
0
5
5caf500a4c1108a0ec4c7efe2d786c19fc283ab7
167
py
Python
scanpy/queries/__init__.py
mkmkryu/scanpy2
f3db32a142dc31c1b628380db1c969a6d0b9dc3a
[ "BSD-3-Clause" ]
1,171
2017-01-17T14:01:02.000Z
2022-03-31T23:02:57.000Z
scanpy/queries/__init__.py
mkmkryu/scanpy2
f3db32a142dc31c1b628380db1c969a6d0b9dc3a
[ "BSD-3-Clause" ]
1,946
2017-01-22T10:19:04.000Z
2022-03-31T17:13:03.000Z
scanpy/queries/__init__.py
mkmkryu/scanpy2
f3db32a142dc31c1b628380db1c969a6d0b9dc3a
[ "BSD-3-Clause" ]
499
2017-01-21T11:39:29.000Z
2022-03-23T13:57:35.000Z
from ._queries import ( biomart_annotations, gene_coordinates, mitochondrial_genes, ) # Biomart queries from ._queries import enrich # gprofiler queries
23.857143
49
0.754491
17
167
7.117647
0.647059
0.181818
0.280992
0
0
0
0
0
0
0
0
0
0.191617
167
6
50
27.833333
0.896296
0.197605
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
5cb50203da8ee56c8f3fdeb0508f3b9652a0fb12
905
py
Python
starspace/data.py
chanzuckerberg/spatial-warehouse
ce5ac5345af02ec7d2c58153fd01ab5499574a45
[ "MIT" ]
6
2019-10-16T15:36:54.000Z
2021-01-12T16:56:23.000Z
starspace/data.py
chanzuckerberg/spatial-warehouse
ce5ac5345af02ec7d2c58153fd01ab5499574a45
[ "MIT" ]
5
2019-10-07T20:02:50.000Z
2020-03-11T03:49:22.000Z
starspace/data.py
chanzuckerberg/spatial-warehouse
ce5ac5345af02ec7d2c58153fd01ab5499574a45
[ "MIT" ]
2
2020-02-25T17:06:34.000Z
2021-11-09T19:28:54.000Z
from .classes import Matrix, Spots, Regions # TODO add more data to s3, add to this module. class osmFISH: @staticmethod def matrix(): url = ("s3://starspace.data/formatted/osmfish_codeluppi_2018_nat-methods_somatosensory-cortex/" "osmfish-codeluppi-2018-nat-methods-somatosensory-cortex.matrix.zarr/") return Matrix.load_zarr(url) @staticmethod def spots(): url = ("s3://starspace.data/formatted/osmfish_codeluppi_2018_nat-methods_somatosensory-cortex/" "osmfish-codeluppi-2018-nat-methods-somatosensory-cortex.spots.zarr/") return Spots.load_zarr(url) @staticmethod def regions(): url = ("s3://starspace.data/formatted/osmfish_codeluppi_2018_nat-methods_somatosensory-cortex/" "osmfish-codeluppi-2018-nat-methods-somatosensory-cortex.regions.zarr/") return Regions.load_zarr(url)
37.708333
104
0.699448
105
905
5.885714
0.285714
0.15534
0.194175
0.223301
0.690939
0.606796
0.606796
0.606796
0.606796
0.606796
0
0.038043
0.18674
905
23
105
39.347826
0.80163
0.049724
0
0.352941
0
0
0.538462
0.538462
0
0
0
0.043478
0
1
0.176471
false
0
0.058824
0
0.470588
0
0
0
0
null
0
1
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
null
0
0
1
0
0
0
0
0
0
0
0
0
0
5
5cbfc4a112fe5584ebe197a7342143104c92f6f2
32
py
Python
metacrypt/__init__.py
analyticsdept/py-cli-decrypt
7a867957368ce99775ff3e3074a80b85d7a96ae5
[ "MIT" ]
null
null
null
metacrypt/__init__.py
analyticsdept/py-cli-decrypt
7a867957368ce99775ff3e3074a80b85d7a96ae5
[ "MIT" ]
null
null
null
metacrypt/__init__.py
analyticsdept/py-cli-decrypt
7a867957368ce99775ff3e3074a80b85d7a96ae5
[ "MIT" ]
null
null
null
from .metacrypt import MetaCrypt
32
32
0.875
4
32
7
0.75
0
0
0
0
0
0
0
0
0
0
0
0.09375
32
1
32
32
0.965517
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
5cd8431607f2467a9dcd1e8f7dd462c59def17ff
269
py
Python
skbeam/core/tests/utils.py
mrakitin/scikit-beam
89fe81486431b72df4dc497564867b9b3a26ee26
[ "BSD-3-Clause" ]
71
2016-01-04T22:32:27.000Z
2022-03-25T07:57:54.000Z
skbeam/core/tests/utils.py
mrakitin/scikit-beam
89fe81486431b72df4dc497564867b9b3a26ee26
[ "BSD-3-Clause" ]
288
2015-12-09T23:40:31.000Z
2021-02-02T00:32:00.000Z
skbeam/core/tests/utils.py
mrakitin/scikit-beam
89fe81486431b72df4dc497564867b9b3a26ee26
[ "BSD-3-Clause" ]
53
2015-12-10T14:35:17.000Z
2021-06-24T13:36:00.000Z
from __future__ import print_function, absolute_import, division import numpy as np def parabola_gen(x, center, height, width): return width * (x-center)**2 + height def gauss_gen(x, center, height, width): return height * np.exp(-((x-center) / width)**2)
22.416667
64
0.70632
40
269
4.55
0.525
0.153846
0.10989
0.175824
0.296703
0.296703
0
0
0
0
0
0.008929
0.167286
269
11
65
24.454545
0.803571
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0.333333
1
0.166667
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
1
1
1
0
0
5
7a8fb22d5ba96d5a17babfb8cd0a6394cfffba97
28
py
Python
models/UPCC/__init__.py
TD21forever/QoS-Predcition-Algorithm-library
f4503462887d719a39c9ccddd6cc55546e783fd5
[ "MIT" ]
2
2022-02-08T08:19:59.000Z
2022-02-17T01:42:54.000Z
models/UPCC/__init__.py
TD21forever/QoS-Predcition-Algorithm-library
f4503462887d719a39c9ccddd6cc55546e783fd5
[ "MIT" ]
null
null
null
models/UPCC/__init__.py
TD21forever/QoS-Predcition-Algorithm-library
f4503462887d719a39c9ccddd6cc55546e783fd5
[ "MIT" ]
null
null
null
from .model import UPCCModel
28
28
0.857143
4
28
6
1
0
0
0
0
0
0
0
0
0
0
0
0.107143
28
1
28
28
0.96
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
7a99cf29c8b32fb953166fbbcd9d8b70f80366ba
577
py
Python
pymoo/rand/impl/numpy_random_generator.py
yashvesikar/pymoo
8ce725671d95df580654568fa9bc0e53268aff5d
[ "MIT" ]
null
null
null
pymoo/rand/impl/numpy_random_generator.py
yashvesikar/pymoo
8ce725671d95df580654568fa9bc0e53268aff5d
[ "MIT" ]
null
null
null
pymoo/rand/impl/numpy_random_generator.py
yashvesikar/pymoo
8ce725671d95df580654568fa9bc0e53268aff5d
[ "MIT" ]
null
null
null
import numpy as np from pymoo.rand.random_generator import RandomGenerator class NumpyRandomGenerator(RandomGenerator): def seed(self, x): np.random.seed(x) def rand(self, size=None): if size is None: return np.random.random() elif isinstance(size, int): return np.random.random(size) else: return np.random.random((size[0], size[1])) def randint(self, low, high, size=None): return np.random.randint(low, high, size) def perm(self, n): return np.random.permutation(n)
23.08
55
0.622184
76
577
4.710526
0.434211
0.134078
0.195531
0.167598
0.134078
0
0
0
0
0
0
0.004728
0.266898
577
24
56
24.041667
0.841608
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.125
0.125
0.75
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
7aba5d2dfd4f66bd15f5cf87af550886b48f2d7c
158
py
Python
trillian/helpers.py
projectsbyif/trillian-demo-python-api-client
5ab5de705cffe27d4ef0c23b46d0eeb40dac7f46
[ "Apache-2.0" ]
null
null
null
trillian/helpers.py
projectsbyif/trillian-demo-python-api-client
5ab5de705cffe27d4ef0c23b46d0eeb40dac7f46
[ "Apache-2.0" ]
null
null
null
trillian/helpers.py
projectsbyif/trillian-demo-python-api-client
5ab5de705cffe27d4ef0c23b46d0eeb40dac7f46
[ "Apache-2.0" ]
1
2019-04-01T02:15:18.000Z
2019-04-01T02:15:18.000Z
import base64 def to_b64(binary): return base64.b64encode(binary).decode('ascii') def from_b64(base64_text): return base64.b64decode(base64_text)
15.8
51
0.753165
22
158
5.227273
0.590909
0.208696
0
0
0
0
0
0
0
0
0
0.132353
0.139241
158
9
52
17.555556
0.713235
0
0
0
0
0
0.031646
0
0
0
0
0
0
1
0.4
false
0
0.2
0.4
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
5
8fa7524ec5e06301c03cb2a6ee1c9f90b63d7c7a
149
py
Python
br2gm/constants.py
vpavlin/br2gm
7e9c5f293e119a263402728ad0f45149cfdcfa17
[ "MIT" ]
1
2015-04-14T07:49:05.000Z
2015-04-14T07:49:05.000Z
br2gm/constants.py
vpavlin/br2gm
7e9c5f293e119a263402728ad0f45149cfdcfa17
[ "MIT" ]
null
null
null
br2gm/constants.py
vpavlin/br2gm
7e9c5f293e119a263402728ad0f45149cfdcfa17
[ "MIT" ]
null
null
null
#!/usr/bin/env python from os.path import expanduser, join DEFAULT_CREDS_NAME=".br2gm_auth" DEFAULT_CREDS=join(expanduser("~"), DEFAULT_CREDS_NAME)
24.833333
55
0.791946
22
149
5.090909
0.681818
0.321429
0.285714
0
0
0
0
0
0
0
0
0.007246
0.073826
149
5
56
29.8
0.804348
0.134228
0
0
0
0
0.09375
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
891182127b6b9c6d2cc9d4603f145f19203dc00d
1,894
py
Python
packetsniffer/sniffer.py
malgulam/100ProjectsOfCode
95026b15d858a6e97dfd847c5ec576bbc260ff61
[ "MIT" ]
8
2020-12-13T16:15:34.000Z
2021-11-13T22:45:28.000Z
packetsniffer/sniffer.py
malgulam/100ProjectsOfCode
95026b15d858a6e97dfd847c5ec576bbc260ff61
[ "MIT" ]
1
2021-06-02T03:42:39.000Z
2021-06-02T03:42:39.000Z
packetsniffer/sniffer.py
malgulam/100ProjectsOfCode
95026b15d858a6e97dfd847c5ec576bbc260ff61
[ "MIT" ]
1
2020-12-14T20:01:14.000Z
2020-12-14T20:01:14.000Z
#!/usr/bin/python3 #imports import socket import struct import binascii #platform module to check the system type #import os import platform platform_ = str(platform.system()).lower() #for packet interface, we'll use PF_PACKET for linux and #AF_INET for window if 'linux' or 'x' in platform_: s = socket.socket(socket.PF_PACKET, socket.SOCK_RAW, socket.htons(0x0800)) #recvfrom to receive packets...using 2048(from tutorials(seems to be the best guess!)) while True: packet = s.recvfrom(2048) #ripping ethernet header eth_header = packet[0][0:14] #unpacking the header with the struct method eth_header = struct.unpack("!6s6s2s", eth_header) print(f'DESTINATION MAC: {binascii.hexlify(eth_header[0])} Source MAC:{binascii.hexlify(eth_header[1])} TYPE: {binascii.hexlify(eth_header[2])}') ipheader = packet[0][14:34] ip_header = struct.unpack("!12s4s4s", ipheader) print(f'SOURCE IP:{socket.inet_ntoa(ip_header[1])} DESTINATION IP:{socket.inet_ntoa(ip_header[2])}') elif 'windows' or 'win' in platform: s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.htons(0x0800)) #recvfrom to receive packets...using 2048(from tutorials(seems to be the best guess!)) while True: packet = s.recvfrom(2048) #ripping ethernet header eth_header = packet[0][0:14] #unpacking the header with the struct method eth_header = struct.unpack("!6s6s2s", eth_header) print(f'DESTINATION MAC: {binascii.hexlify(eth_header[0])} Source MAC:{binascii.hexlify(eth_header[1])} TYPE: {binascii.hexlify(eth_header[2])}') ipheader = packet[0][14:34] ip_header = struct.unpack("!12s4s4s", ipheader) print(f'SOURCE IP:{socket.inet_ntoa(ip_header[1])} DESTINATION IP:{socket.inet_ntoa(ip_header[2])}') else: print('Unknown platform!Modify script!')
44.046512
153
0.693242
271
1,894
4.734317
0.306273
0.084178
0.084178
0.112237
0.782541
0.782541
0.737334
0.737334
0.737334
0.737334
0
0.044316
0.17793
1,894
42
154
45.095238
0.779705
0.236536
0
0.592593
0
0.148148
0.367503
0.241283
0
0
0.008368
0
0
1
0
false
0
0.148148
0
0.148148
0.185185
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
8f1802cd539fb1324d63dceb4f6c76914d6b4ff6
113
py
Python
pyobjconfig/__init__.py
wwoods/pyobjconfig
7a47e72643c8e8d2c6e5824caf6630f2eb96270b
[ "MIT" ]
null
null
null
pyobjconfig/__init__.py
wwoods/pyobjconfig
7a47e72643c8e8d2c6e5824caf6630f2eb96270b
[ "MIT" ]
2
2022-03-08T16:34:28.000Z
2022-03-08T18:09:22.000Z
pyobjconfig/__init__.py
wwoods/pyobjconfig
7a47e72643c8e8d2c6e5824caf6630f2eb96270b
[ "MIT" ]
null
null
null
from .common import ConfigurableObject, ConfigurableSwitch from pydantic import BaseModel as PydanticBaseModel
22.6
58
0.867257
11
113
8.909091
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.115044
113
4
59
28.25
0.98
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
8f42bf2b59b1704061a939bfe6a1aafe18882b5b
186
py
Python
authentication/admin.py
jjlorenzo/django_multitenant
ad1c111fc1246380ee1001e4b04d9469599b9518
[ "MIT" ]
null
null
null
authentication/admin.py
jjlorenzo/django_multitenant
ad1c111fc1246380ee1001e4b04d9469599b9518
[ "MIT" ]
null
null
null
authentication/admin.py
jjlorenzo/django_multitenant
ad1c111fc1246380ee1001e4b04d9469599b9518
[ "MIT" ]
1
2020-09-11T20:43:36.000Z
2020-09-11T20:43:36.000Z
from __future__ import absolute_import from .models import Practice from .models import User from django.contrib import admin admin.site.register(Practice) admin.site.register(User)
16.909091
38
0.822581
26
186
5.692308
0.461538
0.135135
0.216216
0
0
0
0
0
0
0
0
0
0.11828
186
10
39
18.6
0.902439
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
8f61bb2bb8d71085a10db639d8d03d9ccda1c654
160
py
Python
app/main/errors.py
rickmutua/news-app
2568bdf79ee03c22c54afaa70fdd3970eb6a7772
[ "MIT" ]
null
null
null
app/main/errors.py
rickmutua/news-app
2568bdf79ee03c22c54afaa70fdd3970eb6a7772
[ "MIT" ]
null
null
null
app/main/errors.py
rickmutua/news-app
2568bdf79ee03c22c54afaa70fdd3970eb6a7772
[ "MIT" ]
null
null
null
from flask import render_template from . import main @main.app_errorhandler(404) def four_0w_four(error): return render_template('four0wfour.html'), 404
17.777778
50
0.78125
23
160
5.217391
0.695652
0.233333
0
0
0
0
0
0
0
0
0
0.057554
0.13125
160
9
50
17.777778
0.805755
0
0
0
0
0
0.093168
0
0
0
0
0
0
1
0.2
false
0
0.4
0.2
0.8
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
1
0
0
0
5
8f6c1f2f9c232a0621261b7669e12ff4269c0463
206
py
Python
src/main.py
trilader/frischluft-firmware
c24bed143db4af991a4626e5faab35878e68504a
[ "Apache-2.0" ]
7
2021-05-26T20:26:36.000Z
2021-06-05T17:17:24.000Z
src/main.py
trilader/frischluft-firmware
c24bed143db4af991a4626e5faab35878e68504a
[ "Apache-2.0" ]
4
2021-05-28T13:39:28.000Z
2021-06-27T20:48:47.000Z
src/main.py
trilader/frischluft-firmware
c24bed143db4af991a4626e5faab35878e68504a
[ "Apache-2.0" ]
2
2021-05-28T15:01:28.000Z
2021-05-28T16:11:05.000Z
# Early 2021 # Author metachris # Part of frischluft.works # Filename: main.py # Purpose: .mpy migration after we ran out of memory # License Details found @ /LICENSE file in this repository import start
22.888889
58
0.757282
30
206
5.2
0.933333
0
0
0
0
0
0
0
0
0
0
0.023669
0.179612
206
8
59
25.75
0.899408
0.868932
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
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
56b00ee6080e9cb909139ff425bd4b8e48022640
2,989
py
Python
code/python/filters.py
funked1/pieper_md
bd541dc9cec86b795abafd0648ae0114c3d20a91
[ "MIT" ]
null
null
null
code/python/filters.py
funked1/pieper_md
bd541dc9cec86b795abafd0648ae0114c3d20a91
[ "MIT" ]
3
2020-04-26T18:48:48.000Z
2020-04-26T18:52:40.000Z
code/python/filters.py
funked1/pieper_md
bd541dc9cec86b795abafd0648ae0114c3d20a91
[ "MIT" ]
null
null
null
from scipy import signal import numpy as np from scipy.signal import kaiserord, lfilter, firwin, freqz from pylab import figure, clf, plot, xlabel, ylabel, xlim, ylim, title, grid, axes, show import matplotlib.pyplot as plt def lpf_40(fs): width = 5.0 / fs ripple_db = 60 N, beta = kaiserord(ripple_db, width) cutoff_hz = 40 taps = firwin(N, cutoff_hz, window=('kaiser', beta), pass_zero='lowpass', fs=fs) #-------------------------------------------------------------------------- # Plot magnitude response of the filter #-------------------------------------------------------------------------- """ freq, h = signal.freqz(taps, 1, fs=fs) h_db = 20 * np.log10(abs(h)) fig, ax = plt.subplots() ax.plot(freq, h_db, color='green') ax.set_title('40 Hz Lowpass Filter Frequency Response', fontsize='15', fontweight='bold') ax.set_ylabel('Amplitude (dB)', fontsize='15', fontweight='bold') ax.set_xlabel('Frequency (Hz)', fontsize='15', fontweight='bold') ax.tick_params(axis='both', which='major', labelsize="15") ax.set_xlim([0, 100]) ax.grid() plt.show() """ return taps def notch_50(fs): f0 = 50.0 # Frequency to be removed Q = 30.0 zeros, poles = signal.iirnotch(f0, Q, fs) #-------------------------------------------------------------------------- # Plot magnitude response of the filter #-------------------------------------------------------------------------- """ freq, h = signal.freqz(zeros, poles, fs=fs) # frequency response h_db = 20 * np.log10(abs(h)) fig, ax = plt.subplots() ax.plot(freq, h_db, color='green') ax.set_title('50 Hz Notch Filter Frequency Response', fontsize='15', fontweight='bold') ax.set_ylabel('Amplitude (dB)', fontsize='15', fontweight='bold') ax.set_xlabel('Frequency (Hz)', fontsize='15', fontweight='bold') ax.tick_params(axis='both', which='major', labelsize="15") ax.set_xlim([0, 100]) ax.set_ylim([-25, 10]) ax.grid() plt.show() """ return [zeros, poles] def notch_60(fs): f0 = 60.0 # Frequency to be removed Q = 30.0 zeros, poles = signal.iirnotch(f0, Q, fs) #-------------------------------------------------------------------------- # Plot magnitude response of the filter #-------------------------------------------------------------------------- """ freq, h = signal.freqz(zeros, poles, fs=fs) # frequency response h_db = 20 * np.log10(abs(h)) fig, ax = plt.subplots() ax.plot(freq, h_db, color='green') ax.set_title('60 Hz Notch Filter Frequency Response', fontsize='15', fontweight='bold') ax.set_ylabel('Amplitude (dB)', fontsize='15', fontweight='bold') ax.set_xlabel('Frequency (Hz)', fontsize='15', fontweight='bold') ax.tick_params(axis='both', which='major', labelsize="15") ax.set_xlim([0, 100]) ax.set_ylim([-25, 10]) ax.grid() plt.show() """ return [zeros, poles]
36.45122
93
0.53262
375
2,989
4.162667
0.242667
0.044843
0.115311
0.138373
0.773222
0.762332
0.762332
0.762332
0.762332
0.762332
0
0.037128
0.179993
2,989
81
94
36.901235
0.599755
0.202743
0
0.272727
0
0
0.017403
0
0
0
0
0
0
1
0.136364
false
0.045455
0.227273
0
0.5
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
56c2e9fdc3793ab3711cbba5f07a0175346bc477
164
py
Python
tdml/dataframe/dataframe.py
zechengz/tdml
af60d35b7b62259e414edaa0a45fb2d3563b0430
[ "MIT" ]
2
2020-08-08T00:36:23.000Z
2021-06-21T19:51:30.000Z
tdml/dataframe/dataframe.py
zechengz/tdml
af60d35b7b62259e414edaa0a45fb2d3563b0430
[ "MIT" ]
null
null
null
tdml/dataframe/dataframe.py
zechengz/tdml
af60d35b7b62259e414edaa0a45fb2d3563b0430
[ "MIT" ]
1
2020-10-06T19:40:41.000Z
2020-10-06T19:40:41.000Z
def toPandas(df): """ Transform the dataframe into the Pandas dataframe. Args: df: Dataframe in specified package. Returns: A Pandas dataframe. """ pass
14.909091
51
0.707317
21
164
5.52381
0.714286
0.258621
0
0
0
0
0
0
0
0
0
0
0.20122
164
11
52
14.909091
0.885496
0.847561
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0.5
0
0
0.5
0
1
0
0
null
1
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
0
0
0
5
56fad6cfa7bc67bd633a1f04872360133adc771d
468
py
Python
aries_cloudagent/vc/tests/dids/did_example_489398593.py
kuraakhilesh8230/aries-cloudagent-python
ee384d1330f6a50ff45a507392ce54f92900f23a
[ "Apache-2.0" ]
247
2019-07-02T21:10:21.000Z
2022-03-30T13:55:33.000Z
aries_cloudagent/vc/tests/dids/did_example_489398593.py
kuraakhilesh8230/aries-cloudagent-python
ee384d1330f6a50ff45a507392ce54f92900f23a
[ "Apache-2.0" ]
1,462
2019-07-02T20:57:30.000Z
2022-03-31T23:13:35.000Z
aries_cloudagent/vc/tests/dids/did_example_489398593.py
kuraakhilesh8230/aries-cloudagent-python
ee384d1330f6a50ff45a507392ce54f92900f23a
[ "Apache-2.0" ]
377
2019-06-20T21:01:31.000Z
2022-03-30T08:27:53.000Z
DID_EXAMPLE_48939859 = { "@context": "https://www.w3.org/ns/did/v1", "id": "did:example:489398593", "assertionMethod": [ { "id": "did:example:489398593#test", "type": "Bls12381G2Key2020", "controller": "did:example:489398593", "publicKeyBase58": "oqpWYKaZD9M1Kbe94BVXpr8WTdFBNZyKv48cziTiQUeuhm7sBhCABMyYG4kcMrseC68YTFFgyhiNeBKjzdKk9MiRWuLv5H4FFujQsQK2KTAtzU8qTBiZqBHMmnLF4PL7Ytu", } ], }
36
165
0.649573
29
468
10.413793
0.655172
0.13245
0.188742
0.139073
0
0
0
0
0
0
0
0.182561
0.215812
468
12
166
39
0.640327
0
0
0
0
0
0.641026
0.425214
0
0
0
0
0.083333
1
0
false
0
0
0
0
0
1
0
1
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
712e715e7339b903c6a7a5f4bf3b643795f3ea90
103
py
Python
website/about/admin.py
phayv/open_project
2ab2b87683ea120f6f7baa734df9a6920716232b
[ "BSD-3-Clause" ]
null
null
null
website/about/admin.py
phayv/open_project
2ab2b87683ea120f6f7baa734df9a6920716232b
[ "BSD-3-Clause" ]
14
2020-03-24T15:57:26.000Z
2022-03-11T23:26:57.000Z
website/about/admin.py
phayv/open_project
2ab2b87683ea120f6f7baa734df9a6920716232b
[ "BSD-3-Clause" ]
1
2018-08-01T02:17:01.000Z
2018-08-01T02:17:01.000Z
from django.contrib import admin from about.models import UserProfile admin.site.register(UserProfile)
25.75
36
0.854369
14
103
6.285714
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.087379
103
4
37
25.75
0.93617
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
854090c93e71c710dec79c570953ac1fb920dcdc
55
py
Python
nni/algorithms/hpo/ppo_tuner/__init__.py
dutxubo/nni
c16f4e1c89b54b8b80661ef0072433d255ad2d24
[ "MIT" ]
9,680
2019-05-07T01:42:30.000Z
2022-03-31T16:48:33.000Z
nni/algorithms/hpo/ppo_tuner/__init__.py
dutxubo/nni
c16f4e1c89b54b8b80661ef0072433d255ad2d24
[ "MIT" ]
1,957
2019-05-06T21:44:21.000Z
2022-03-31T09:21:53.000Z
nni/algorithms/hpo/ppo_tuner/__init__.py
dutxubo/nni
c16f4e1c89b54b8b80661ef0072433d255ad2d24
[ "MIT" ]
1,571
2019-05-07T06:42:55.000Z
2022-03-31T03:19:24.000Z
from .ppo_tuner import PPOTuner, PPOClassArgsValidator
27.5
54
0.872727
6
55
7.833333
1
0
0
0
0
0
0
0
0
0
0
0
0.090909
55
1
55
55
0.94
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
856f899f63bdd9e468bb0c9913661ad5a365256b
23
py
Python
Chapter 04/ch4_3_14.py
bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE
f6a4194684515495d00aa38347a725dd08f39a0c
[ "MIT" ]
null
null
null
Chapter 04/ch4_3_14.py
bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE
f6a4194684515495d00aa38347a725dd08f39a0c
[ "MIT" ]
null
null
null
Chapter 04/ch4_3_14.py
bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE
f6a4194684515495d00aa38347a725dd08f39a0c
[ "MIT" ]
null
null
null
print(bool(3.14)) #True
23
23
0.695652
5
23
3.2
1
0
0
0
0
0
0
0
0
0
0
0.136364
0.043478
23
1
23
23
0.590909
0.173913
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
85c0df13c1e339984db7d8ff25b3ebe2162f504f
187
py
Python
boost_adaptbx/tests/tst_rational_truediv.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
boost_adaptbx/tests/tst_rational_truediv.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
boost_adaptbx/tests/tst_rational_truediv.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
from __future__ import division import libtbx.load_env import os execfile(libtbx.env.under_dist("boost_adaptbx", os.path.join("tests", "tst_rational.py")))
31.166667
73
0.668449
24
187
4.875
0.791667
0
0
0
0
0
0
0
0
0
0
0
0.224599
187
5
74
37.4
0.806897
0
0
0
0
0
0.176471
0
0
0
0
0
0
1
0
true
0
0.6
0
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
a48edac983626719434d0d83f572375c318cf9c9
12,399
py
Python
evology/research/icml/asym_analysis_scholl.py
aymericvie/evology
8f00d94dee7208be5a5bdd0375a9d6ced25097f4
[ "Apache-2.0" ]
null
null
null
evology/research/icml/asym_analysis_scholl.py
aymericvie/evology
8f00d94dee7208be5a5bdd0375a9d6ced25097f4
[ "Apache-2.0" ]
2
2022-01-10T02:10:56.000Z
2022-01-14T03:41:42.000Z
evology/research/icml/asym_analysis_scholl.py
aymericvie/evology
8f00d94dee7208be5a5bdd0375a9d6ced25097f4
[ "Apache-2.0" ]
null
null
null
import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import numpy as np from scipy.ndimage.filters import gaussian_filter import ternary import numpy as np from ternary.helpers import simplex_iterator from matplotlib.colors import ListedColormap sns.set(font_scale=1) scale = 25 fontsize = 18 data = pd.read_csv( "/Users/aymericvie/Documents/GitHub/evology/evology/research/icml/data/asym_dis_scholl.csv" ) # Removing the sum 0 or sum nan runs does not seem necessary data_group = data.groupby( ["WS_VI_initial", "WS_TF_initial", "WS_NT_initial"], as_index=False ).mean() def generate_random_heatmap_data(scale): tf_ws = dict() vi_ws = dict() nt_ws = dict() attractor = dict() l = 0 for (i, j, k) in simplex_iterator(scale): nt_ws[(i, j)] = data_group.loc[l, "WS_NT_final"] vi_ws[(i, j)] = data_group.loc[l, "WS_VI_final"] tf_ws[(i, j)] = data_group.loc[l, "WS_TF_final"] if data_group.loc[l, "WS_TF_final"] >= 90: attractor[(i, j)] = 0 elif data_group.loc[l, "WS_TF_final"] > 10: attractor[(i, j)] = 1 else: attractor[(i, j)] = 2 l += 1 return nt_ws, vi_ws, tf_ws, attractor nt_r, vi_r, tf_r, attractor = generate_random_heatmap_data(scale) figure, tax = ternary.figure(scale=scale) figure.set_size_inches(10, 8) tax.heatmap(nt_r, style='triangular') tax.boundary() tax.clear_matplotlib_ticks() ticks = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100] tax.ticks(ticks = ticks, axis='blr', linewidth=1, multiple=10) tax.bottom_axis_label("VI Initial Wealth Share (%)", fontsize = fontsize) tax.left_axis_label("NT Initial Wealth Share (%)", fontsize = fontsize) tax.right_axis_label("TF Initial Wealth Share (%)", fontsize = fontsize) tax.get_axes().axis('off') tax.set_title('NT final wealth share', fontsize = fontsize) tax._redraw_labels() plt.tight_layout() plt.savefig('figures/WS_NT_scholl.png',dpi=300) #plt.show() figure, tax = ternary.figure(scale=scale) figure.set_size_inches(10, 8) tax.heatmap(vi_r, style='triangular') tax.boundary() tax.clear_matplotlib_ticks() ticks = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100] tax.ticks(ticks = ticks, axis='blr', linewidth=1, multiple=10) tax.bottom_axis_label("VI Initial Wealth Share (%)", fontsize = fontsize) tax.left_axis_label("NT Initial Wealth Share (%)", fontsize = fontsize) tax.right_axis_label("TF Initial Wealth Share (%)", fontsize = fontsize) tax.get_axes().axis('off') tax.set_title('VI final wealth share', fontsize = fontsize) tax._redraw_labels() plt.tight_layout() plt.savefig('figures/WS_VI_scholl.png',dpi=300) #plt.show() figure, tax = ternary.figure(scale=scale) figure.set_size_inches(10, 8) tax.heatmap(tf_r, style='triangular') tax.boundary() tax.clear_matplotlib_ticks() ticks = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100] tax.ticks(ticks = ticks, axis='blr', linewidth=1, multiple=10) tax.bottom_axis_label("VI Initial Wealth Share (%)", fontsize = fontsize) tax.left_axis_label("NT Initial Wealth Share (%)", fontsize = fontsize) tax.right_axis_label("TF Initial Wealth Share (%)", fontsize = fontsize) tax.get_axes().axis('off') tax.set_title('TF final wealth share', fontsize = fontsize) tax._redraw_labels() plt.tight_layout() plt.savefig('figures/WS_TF_scholl.png',dpi=300) #plt.show() cmap = plt.get_cmap('inferno', 3) cmap = ListedColormap(['red', 'grey', 'blue']) figure, tax = ternary.figure(scale=scale) figure.set_size_inches(10, 8) tax.heatmap(attractor, style='triangular',cmap=cmap, colorbar=False) tax.boundary() tax.clear_matplotlib_ticks() ticks = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100] tax.ticks(ticks = ticks, axis='blr', linewidth=1, multiple=10) tax.bottom_axis_label("VI Initial Wealth Share (%)", fontsize = fontsize) tax.left_axis_label("NT Initial Wealth Share (%)", fontsize = fontsize) tax.right_axis_label("TF Initial Wealth Share (%)", fontsize = fontsize) tax.get_axes().axis('off') tax.set_title('Basins of attraction', fontsize = fontsize) tax._redraw_labels() plt.tight_layout() plt.savefig('figures/basins_scholl.png',dpi=300) #plt.show() def gen_data(scale): gens = dict() l = 0 for (i, j, k) in simplex_iterator(scale): gens[(i, j)] = data_group.loc[l, "Gen"] l += 1 return gens """ Density/diffusion plot for generations """ gens = gen_data(scale) figure, tax = ternary.figure(scale=scale) figure.set_size_inches(10, 8) tax.heatmap(gens, style='triangular') tax.boundary() tax.clear_matplotlib_ticks() ticks = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100] tax.ticks(ticks = ticks, axis='blr', linewidth=1, multiple=10) tax.bottom_axis_label("VI Initial Wealth Share (%)", fontsize = fontsize) tax.left_axis_label("NT Initial Wealth Share (%)", fontsize = fontsize) tax.right_axis_label("TF Initial Wealth Share (%)", fontsize = fontsize) tax.get_axes().axis('off') tax.set_title('Max generations', fontsize = fontsize) tax._redraw_labels() plt.tight_layout() plt.savefig('figures/generations_scholl.png',dpi=300) #plt.show() # Difference in returns # Result: regions with early extinctions correspond to high difference in returns; # these are regions that are by nature imbalanced and pushing to the boundary. def gen_data(scale): gens = dict() l = 0 for (i, j, k) in simplex_iterator(scale): gens[(i, j)] = data_group.loc[l, "AvgDiffReturns"] if data_group.loc[l, "AvgDiffReturns"] > 10: gens[(i, j)] = 10 l += 1 return gens gens = gen_data(scale) figure, tax = ternary.figure(scale=scale) figure.set_size_inches(10, 8) tax.heatmap(gens, style='triangular') tax.boundary() tax.clear_matplotlib_ticks() ticks = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100] tax.ticks(ticks = ticks, axis='blr', linewidth=1, multiple=10) tax.bottom_axis_label("VI Initial Wealth Share (%)", fontsize = fontsize) tax.left_axis_label("NT Initial Wealth Share (%)", fontsize = fontsize) tax.right_axis_label("TF Initial Wealth Share (%)", fontsize = fontsize) tax.get_axes().axis('off') tax.set_title('Avg diff returns', fontsize = fontsize) tax._redraw_labels() plt.tight_layout() plt.savefig('figures/diff_returns_scholl.png',dpi=300) #plt.show() def gen_data(scale): gens = dict() l = 0 for (i, j, k) in simplex_iterator(scale): gens[(i, j)] = data_group.loc[l, "AvgDiffReturns"] if data_group.loc[l, "AvgDiffReturns"] > 1: gens[(i, j)] = 1 l += 1 return gens gens = gen_data(scale) figure, tax = ternary.figure(scale=scale) figure.set_size_inches(10, 8) tax.heatmap(gens, style='triangular') tax.boundary() tax.clear_matplotlib_ticks() ticks = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100] tax.ticks(ticks = ticks, axis='blr', linewidth=1, multiple=10) tax.bottom_axis_label("VI Initial Wealth Share (%)", fontsize = fontsize) tax.left_axis_label("NT Initial Wealth Share (%)", fontsize = fontsize) tax.right_axis_label("TF Initial Wealth Share (%)", fontsize = fontsize) tax.get_axes().axis('off') tax.set_title('Avg diff returns', fontsize = fontsize) tax._redraw_labels() plt.tight_layout() plt.savefig('figures/diff_returns_scholl2.png',dpi=300) #plt.show() def PathPoints(data): points = [] for i in range(len(data["WS_NT_final"])): x = (data.loc[i, "WS_VI_final"] / 100) * scale y = (data.loc[i, "WS_TF_final"] / 100) * scale z = (data.loc[i, "WS_NT_final"] / 100) * scale points.append((x, y, z)) return points points = PathPoints(data) # origin = [((100/3, 100/3, 100/3))] figure, tax = ternary.figure(scale=scale) figure.set_size_inches(10, 8) tax.gridlines(color="gray", multiple=10) tax.boundary() tax.clear_matplotlib_ticks() ticks = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100] tax.bottom_axis_label("VI Initial Wealth Share (%)", fontsize = fontsize) tax.left_axis_label("NT Initial Wealth Share (%)", fontsize = fontsize) tax.right_axis_label("TF Initial Wealth Share (%)", fontsize = fontsize) tax.scatter(points, marker='D', color='red', label="Simulations") tax.ticks(ticks = ticks, axis='blr', linewidth=1, multiple=10) tax.get_axes().axis('off') tax.set_title('Scatterplot', fontsize=fontsize) plt.legend(loc='upper right', fontsize=fontsize) plt.tight_layout() tax._redraw_labels() plt.savefig('figures/scatterplot_scholl.png',dpi=300) # plt.show() """ density """ def PathPoints(df): points = [] N = len(df) for i in range(N): x = int((df.loc[i, "WS_VI_final"] / 100) * scale) y = int((df.loc[i, "WS_TF_final"] / 100) * scale) z = int((df.loc[i, "WS_NT_final"] / 100) * scale) points.append((x, y, z)) return points points = PathPoints(data) def DensityData(points, scale): density = dict() total_count = (scale + 1) * (scale + 2) / 2 sum_count = 0 total_enum = 0 for (i, j, k) in simplex_iterator(scale): count = 0 total_enum += 1 for point in points: if i == point[0] and j == point[1]: count += 1 density[(i, j)] = (count / total_count) / 10 sum_count += density[(i, j)] return density # scale = 24 # to remove the artifact attractor scale = 25 #cant set scale more than the experiment setting (25) density = DensityData(points, scale) figure, tax = ternary.figure(scale=scale) figure.set_size_inches(10, 8) tax.heatmap(density, style="triangular", cmap="Reds", vmin=0, vmax=0.15) tax.boundary() tax.clear_matplotlib_ticks() ticks = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100] tax.ticks(ticks=ticks, axis="blr", linewidth=1, multiple=10) tax.bottom_axis_label("VI Final Wealth Share (%)", fontsize=fontsize) tax.left_axis_label("NT Final Wealth Share (%)", fontsize=fontsize) tax.right_axis_label("TF Final Wealth Share (%)", fontsize=fontsize) tax.get_axes().axis("off") tax.set_title("Wealth asymptotic distributions density", fontsize=fontsize) tax._redraw_labels() plt.tight_layout() plt.savefig("figures/density_scholl.png", dpi=300) #plt.show() #### SUBSTRATEGIES def gen_data(scale): tf = dict() vi = dict() nt = dict() l = 0 for (i, j, k) in simplex_iterator(scale): nt[(i, j)] = data_group.loc[l, "Mean_NT"] vi[(i, j)] = data_group.loc[l, "Mean_VI"] tf[(i, j)] = data_group.loc[l, "Mean_TF"] l += 1 return nt, vi, tf nt, vi, tf = gen_data(scale) figure, tax = ternary.figure(scale=scale) figure.set_size_inches(10, 8) tax.heatmap(nt, style='triangular') tax.boundary() tax.clear_matplotlib_ticks() ticks = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100] tax.ticks(ticks = ticks, axis='blr', linewidth=1, multiple=10) tax.bottom_axis_label("NT Initial Wealth Share (%)", fontsize = fontsize) tax.left_axis_label("VI Initial Wealth Share (%)", fontsize = fontsize) tax.right_axis_label("TF Initial Wealth Share (%)", fontsize = fontsize) tax.get_axes().axis('off') tax.set_title('NT substrategy', fontsize = fontsize) tax._redraw_labels() plt.tight_layout() plt.savefig('figures/nt_substrat_scholl.png',dpi=300) #plt.show() figure, tax = ternary.figure(scale=scale) figure.set_size_inches(10, 8) tax.heatmap(vi, style='triangular') tax.boundary() tax.clear_matplotlib_ticks() ticks = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100] tax.ticks(ticks = ticks, axis='blr', linewidth=1, multiple=10) tax.bottom_axis_label("NT Initial Wealth Share (%)", fontsize = fontsize) tax.left_axis_label("VI Initial Wealth Share (%)", fontsize = fontsize) tax.right_axis_label("TF Initial Wealth Share (%)", fontsize = fontsize) tax.get_axes().axis('off') tax.set_title('VI substrategy', fontsize = fontsize) tax._redraw_labels() plt.tight_layout() plt.savefig('figures/vi_substrat_scholl.png',dpi=300) #plt.show() figure, tax = ternary.figure(scale=scale) figure.set_size_inches(10, 8) tax.heatmap(tf, style='triangular') tax.boundary() tax.clear_matplotlib_ticks() ticks = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100] tax.ticks(ticks = ticks, axis='blr', linewidth=1, multiple=10) tax.bottom_axis_label("NT Initial Wealth Share (%)", fontsize = fontsize) tax.left_axis_label("VI Initial Wealth Share (%)", fontsize = fontsize) tax.right_axis_label("TF Initial Wealth Share (%)", fontsize = fontsize) tax.get_axes().axis('off') tax.set_title('TF substrategy', fontsize = fontsize) tax._redraw_labels() plt.tight_layout() plt.savefig('figures/tf_substrat_scholl.png',dpi=300) #plt.show()
34.537604
95
0.691507
1,907
12,399
4.34085
0.110645
0.094709
0.107876
0.127205
0.791012
0.778207
0.765281
0.746799
0.726262
0.711766
0
0.043367
0.150093
12,399
359
96
34.537604
0.742171
0.041052
0
0.631757
0
0.003378
0.177721
0.036002
0
0
0
0
0
1
0.027027
false
0
0.030405
0
0.084459
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
a4988b6c33c555ef3041d4b7eff578ccdab16908
157
py
Python
wrappers/serial/simulation/surface.py
ska-telescope/algorithm-reference-library
1b2c8d6079249202864abf8c60cdea40f0f123cb
[ "Apache-2.0" ]
22
2016-12-14T11:20:07.000Z
2021-08-13T15:23:41.000Z
wrappers/serial/simulation/surface.py
ska-telescope/algorithm-reference-library
1b2c8d6079249202864abf8c60cdea40f0f123cb
[ "Apache-2.0" ]
30
2017-06-27T09:15:38.000Z
2020-09-11T18:16:37.000Z
wrappers/arlexecute/simulation/surface.py
SKA-ScienceDataProcessor/algorithm-reference-library
1b2c8d6079249202864abf8c60cdea40f0f123cb
[ "Apache-2.0" ]
20
2017-07-02T03:45:49.000Z
2019-12-11T17:19:01.000Z
""" Functions for ionospheric modelling: see SDP memo 97 """ from processing_components.simulation.surface import simulate_gaintable_from_voltage_patterns
26.166667
93
0.840764
19
157
6.684211
0.947368
0
0
0
0
0
0
0
0
0
0
0.014184
0.101911
157
5
94
31.4
0.886525
0.33121
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
8efc6ccb02b93a85de313d9fae0522d63fee59b4
80
py
Python
BobuxServer/bobuxserver/websockets/serverlogic.py
ItsMajestiX/Bobux
63b079727faba2e4e342dce7df45315977690584
[ "MIT" ]
null
null
null
BobuxServer/bobuxserver/websockets/serverlogic.py
ItsMajestiX/Bobux
63b079727faba2e4e342dce7df45315977690584
[ "MIT" ]
1
2021-07-29T17:52:25.000Z
2021-07-29T17:52:25.000Z
BobuxServer/bobuxserver/websockets/serverlogic.py
ItsMajestiX/Bobux
63b079727faba2e4e342dce7df45315977690584
[ "MIT" ]
null
null
null
import websockets import json async def processCommand(message, path): pass
16
40
0.7875
10
80
6.3
0.9
0
0
0
0
0
0
0
0
0
0
0
0.1625
80
5
41
16
0.940299
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.25
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
1
1
0
0
0
0
5
f15837d12be1c9944d2217d63a329e0b31d116ad
635
py
Python
app/main/errors.py
Z-Tool/ztool-backhend
7d332dcdc088723fe33707d2679d6704ebcb9095
[ "MIT" ]
3
2017-02-16T06:50:12.000Z
2017-02-16T07:39:21.000Z
app/main/errors.py
Z-Tool/ztool-backhend
7d332dcdc088723fe33707d2679d6704ebcb9095
[ "MIT" ]
null
null
null
app/main/errors.py
Z-Tool/ztool-backhend
7d332dcdc088723fe33707d2679d6704ebcb9095
[ "MIT" ]
2
2017-02-16T07:40:06.000Z
2020-09-01T06:08:57.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask import jsonify from . import main @main.app_errorhandler(400) def bad_request(e): return jsonify({'error': '403 bad request'}), 400 @main.app_errorhandler(401) def unauthorized(e): return jsonify({'error': '401 unauthorized'}), 401 @main.app_errorhandler(403) def forbidden(e): return jsonify({'error': '403 forbidden'}), 403 @main.app_errorhandler(404) def page_not_found(e): return jsonify({'error': '404 page not found'}), 404 @main.app_errorhandler(500) def internal_server_error(e): return jsonify({'error': '500 internal server error'}), 500
21.166667
63
0.700787
89
635
4.88764
0.359551
0.08046
0.218391
0.218391
0.101149
0
0
0
0
0
0
0.084404
0.141732
635
29
64
21.896552
0.713761
0.066142
0
0
0
0
0.189509
0
0
0
0
0
0
1
0.294118
false
0
0.117647
0.294118
0.705882
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
f16352c6d05c7eeaba0c03e2929d4bc4bc0c921b
648
py
Python
tests/datasets/context.py
doruktiktiklar/sadedegel
3362c4b6bf07c34634313b9eafe52e6817efec60
[ "MIT" ]
null
null
null
tests/datasets/context.py
doruktiktiklar/sadedegel
3362c4b6bf07c34634313b9eafe52e6817efec60
[ "MIT" ]
null
null
null
tests/datasets/context.py
doruktiktiklar/sadedegel
3362c4b6bf07c34634313b9eafe52e6817efec60
[ "MIT" ]
null
null
null
import sys from pathlib import Path sys.path.insert(0, (Path(__file__) / '..' / '..').absolute()) from sadedegel.dataset import load_raw_corpus, load_sentence_corpus,load_annotated_corpus # noqa # pylint: disable=unused-import, wrong-import-position from sadedegel.dataset.extended import load_extended_metadata, load_extended_sents_corpus, load_extended_raw_corpus # noqa # pylint: disable=unused-import, wrong-import-position from sadedegel.dataset import util # noqa # pylint: disable=unused-import, wrong-import-position from sadedegel.dataset import file_paths, CorpusTypeEnum # noqa # pylint: disable=unused-import, wrong-import-position
64.8
178
0.808642
86
648
5.872093
0.325581
0.10297
0.158416
0.182178
0.546535
0.546535
0.546535
0.546535
0.451485
0.451485
0
0.001701
0.092593
648
9
179
72
0.857143
0.362654
0
0
0
0
0.009901
0
0
0
0
0
0
1
0
true
0
0.857143
0
0.857143
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
1
0
0
5
74b6f038aa40842d5f102393dc915957c5479f9b
240
py
Python
src/nagiosql/api/tests.py
strategist922/NagiosQL-API
ebaaf99d2d1da7f04d6337ae37193cdbb2d6c2b9
[ "BSD-3-Clause" ]
null
null
null
src/nagiosql/api/tests.py
strategist922/NagiosQL-API
ebaaf99d2d1da7f04d6337ae37193cdbb2d6c2b9
[ "BSD-3-Clause" ]
null
null
null
src/nagiosql/api/tests.py
strategist922/NagiosQL-API
ebaaf99d2d1da7f04d6337ae37193cdbb2d6c2b9
[ "BSD-3-Clause" ]
1
2021-07-13T04:42:06.000Z
2021-07-13T04:42:06.000Z
# Copyright 2012 NagiosQL-API authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. from nagiosql.api.test_service import * from nagiosql.api.test_host import *
34.285714
59
0.783333
40
240
4.65
0.8
0.177419
0.16129
0.204301
0
0
0
0
0
0
0
0.019802
0.158333
240
7
60
34.285714
0.90099
0.645833
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
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
1
0
0
5
74e08417815e4834e807ad7d225fe6cdc71bf0c9
58
py
Python
cmdparserkhv/__init__.py
khvorov45/CmdParser
5eb7a109826cf4d95f791367af44219f5ebd4ff2
[ "MIT" ]
null
null
null
cmdparserkhv/__init__.py
khvorov45/CmdParser
5eb7a109826cf4d95f791367af44219f5ebd4ff2
[ "MIT" ]
null
null
null
cmdparserkhv/__init__.py
khvorov45/CmdParser
5eb7a109826cf4d95f791367af44219f5ebd4ff2
[ "MIT" ]
null
null
null
# pylint: skip-file from .parser import CmdParser, Cmdent
19.333333
37
0.775862
8
58
5.625
1
0
0
0
0
0
0
0
0
0
0
0
0.137931
58
2
38
29
0.9
0.293103
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
74fbad25ec881f43e888d45c6b1f59bc1cdb0cae
209
py
Python
nni/retiarii/__init__.py
jgard1/COS598D_Assignment3
0ac4b02c8572d3e5757b79b42a83407e55204a04
[ "MIT" ]
1
2021-03-08T19:21:00.000Z
2021-03-08T19:21:00.000Z
nni/retiarii/__init__.py
jgard1/COS598D_Assignment3
0ac4b02c8572d3e5757b79b42a83407e55204a04
[ "MIT" ]
8
2021-08-31T23:35:05.000Z
2022-03-24T10:45:36.000Z
nni/retiarii/__init__.py
rushtehrani/nni
f897829772b8146e0e13ba92b6a51f8fa8227ac5
[ "MIT" ]
2
2021-03-23T17:43:00.000Z
2022-01-18T18:14:17.000Z
from .operation import Operation from .graph import * from .execution import * from .mutator import * from .serializer import basic_unit, json_dump, json_dumps, json_load, json_loads, serialize, serialize_cls
34.833333
106
0.808612
29
209
5.62069
0.551724
0.184049
0
0
0
0
0
0
0
0
0
0
0.124402
209
5
107
41.8
0.89071
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
2d152cd9a33ee73b0c31fbdedfa2cba8117ee576
269
py
Python
flask_app/routes/admin.py
m01seenko/flask-boilerplate
20aebeb19782cb76f06e366d2fb2107cc1c3ac6d
[ "MIT" ]
null
null
null
flask_app/routes/admin.py
m01seenko/flask-boilerplate
20aebeb19782cb76f06e366d2fb2107cc1c3ac6d
[ "MIT" ]
null
null
null
flask_app/routes/admin.py
m01seenko/flask-boilerplate
20aebeb19782cb76f06e366d2fb2107cc1c3ac6d
[ "MIT" ]
null
null
null
import http from flask import Blueprint admin_blueprint = Blueprint("admin", __name__, url_prefix="/admin") @admin_blueprint.route("/", methods=["GET"]) @admin_blueprint.route("/index", methods=["GET"]) def index(): return "Forbidden", http.HTTPStatus.FORBIDDEN
24.454545
67
0.732342
32
269
5.90625
0.53125
0.222222
0.201058
0
0
0
0
0
0
0
0
0
0.100372
269
10
68
26.9
0.780992
0
0
0
0
0
0.122677
0
0
0
0
0
0
1
0.142857
false
0
0.285714
0.142857
0.571429
0.571429
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
1
0
5