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
574c7c4d48f0ca5d59278273440414120893b17f
2,739
py
Python
tests/test_artifact_type.py
polyswarm/polyswarm-artifact
74156ade5630001667ae262ce31eb8a5a72948e5
[ "MIT" ]
1
2020-07-11T05:50:09.000Z
2020-07-11T05:50:09.000Z
tests/test_artifact_type.py
polyswarm/polyswarm-artifact
74156ade5630001667ae262ce31eb8a5a72948e5
[ "MIT" ]
6
2019-05-28T22:50:33.000Z
2021-06-09T21:00:05.000Z
tests/test_artifact_type.py
polyswarm/polyswarm-artifact
74156ade5630001667ae262ce31eb8a5a72948e5
[ "MIT" ]
1
2021-04-26T10:58:34.000Z
2021-04-26T10:58:34.000Z
import pytest from polyswarmartifact import ArtifactType from polyswarmartifact.exceptions import DecodeError def test_file_artifact_type_from_lowercase_string(): # arrange # act artifact_type = ArtifactType.from_string('file') # assert assert artifact_type == ArtifactType.FILE def test_file_artifact_type_from_uppercase_string(): # arrange # act artifact_type = ArtifactType.from_string('FILE') # assert assert artifact_type == ArtifactType.FILE def test_url_artifact_type_from_lowercase_string(): # arrange # act artifact_type = ArtifactType.from_string('url') # assert assert artifact_type == ArtifactType.URL def test_url_artifact_type_from_uppercase_string(): # arrange # act artifact_type = ArtifactType.from_string('URL') # assert assert artifact_type == ArtifactType.URL def test_fake_artifact_type_from_uppercase_string(): # arrange # act artifact_type = ArtifactType.from_string('fake') # assert assert artifact_type is None def test_none_artifact_type(): # arrange # act artifact_type = ArtifactType.from_string(None) # assert assert artifact_type is None def test_file_artifact_type_to_string(): # arrange # act # assert assert ArtifactType.to_string(ArtifactType.FILE) == 'file' def test_url_artifact_type_to_string(): # arrange # act # assert assert ArtifactType.to_string(ArtifactType.URL) == 'url' def test_file_artifact_type_from_int(): # arrange # act artifact_type = ArtifactType(0) # assert assert artifact_type == ArtifactType.FILE def test_file_decode(): # arrange # act # assert assert ArtifactType.FILE.decode_content(b'test string') == b'test string' def test_url_artifact_type_from_int(): # arrange # act artifact_type = ArtifactType(1) # assert assert artifact_type == ArtifactType.URL def test_file_artifact_type_to_int(): # arrange # act # assert assert ArtifactType.FILE.value == 0 def test_url_artifact_type_to_int(): # arrange # act # assert assert ArtifactType.URL.value == 1 def test_url_decode(): # arrange # act # assert assert ArtifactType.URL.decode_content(b'test string') == 'test string' def test_url_decode_empty(): # arrange # act # assert assert ArtifactType.URL.decode_content(b'') == '' def test_url_decode_none(): # arrange # act # assert assert ArtifactType.URL.decode_content(None) is None def test_url_decode_invalid_raises(): # arrange # act # assert with pytest.raises(DecodeError): ArtifactType.URL.decode_content('asdf'.encode('utf-16'))
20.75
77
0.69989
328
2,739
5.521341
0.115854
0.185533
0.185533
0.097184
0.826063
0.790723
0.71894
0.694644
0.600773
0.399227
0
0.002788
0.214312
2,739
131
78
20.908397
0.838755
0.117561
0
0.173913
0
0
0.033404
0
0
0
0
0
0.347826
1
0.369565
false
0
0.065217
0
0.434783
0
0
0
0
null
0
1
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
5
f510e2e05bbe27b3e61353d0c55b291a22f692be
284
py
Python
EventFilter/RPCRawToDigi/python/rpcUnpacker_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
EventFilter/RPCRawToDigi/python/rpcUnpacker_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
EventFilter/RPCRawToDigi/python/rpcUnpacker_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 import EventFilter.RPCRawToDigi.rpcUnpackingModule_cfi rpcunpacker = EventFilter.RPCRawToDigi.rpcUnpackingModule_cfi.rpcUnpackingModule.clone() rpcunpacker.InputLabel = cms.InputTag("rawDataCollector") rpcunpacker.doSynchro = cms.bool(True)
40.571429
89
0.859155
28
284
8.642857
0.642857
0.190083
0.338843
0.363636
0
0
0
0
0
0
0
0
0.059859
284
6
90
47.333333
0.906367
0
0
0
0
0
0.056338
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
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
f54aa4f85d6c79e0450907ffa9a4baebf3b8b502
494
py
Python
src/service/connections/__init__.py
deeso/service-utilities
9a3ebdcad9a1d0049a23e3486d7ea99a6d08f81a
[ "Apache-2.0" ]
null
null
null
src/service/connections/__init__.py
deeso/service-utilities
9a3ebdcad9a1d0049a23e3486d7ea99a6d08f81a
[ "Apache-2.0" ]
null
null
null
src/service/connections/__init__.py
deeso/service-utilities
9a3ebdcad9a1d0049a23e3486d7ea99a6d08f81a
[ "Apache-2.0" ]
null
null
null
from .base_connection import ConnectionFactory from .kombu_connection import KombuConnection from .mongo_connection import MongoConnection from .socket_connection import TCPConnection, UDPConnection from .jsonline_connection import JsonTCPLineConnection, JsonUDPLineConnection ConnectionFactory.register_connection(KombuConnection) ConnectionFactory.register_connection(MongoConnection) ConnectionFactory.register_connection(TCPConnection) ConnectionFactory.register_connection(UDPConnection)
44.909091
77
0.906883
43
494
10.209302
0.372093
0.182232
0.318907
0
0
0
0
0
0
0
0
0
0.054656
494
10
78
49.4
0.940043
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.555556
0
0.555556
0
0
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
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
f554b393d695b4cd32b02d198eaee37d41eb21cb
82
py
Python
phelps/readability/__init__.py
Nsl42/rssint
3978f8b33fbe95021cec51c1dead49704332207c
[ "Apache-2.0" ]
null
null
null
phelps/readability/__init__.py
Nsl42/rssint
3978f8b33fbe95021cec51c1dead49704332207c
[ "Apache-2.0" ]
null
null
null
phelps/readability/__init__.py
Nsl42/rssint
3978f8b33fbe95021cec51c1dead49704332207c
[ "Apache-2.0" ]
null
null
null
from readability import Document, main from page_parser import ascii, Unparseable
27.333333
42
0.853659
11
82
6.272727
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.121951
82
2
43
41
0.958333
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
f55d4477b6e14eb96e6b2dada68d13fb3f97167b
78
py
Python
bansync/__init__.py
entchen66/sinbad3.1
3353118b8693c84d5572ab2a7a2278a32be2a76c
[ "MIT" ]
null
null
null
bansync/__init__.py
entchen66/sinbad3.1
3353118b8693c84d5572ab2a7a2278a32be2a76c
[ "MIT" ]
null
null
null
bansync/__init__.py
entchen66/sinbad3.1
3353118b8693c84d5572ab2a7a2278a32be2a76c
[ "MIT" ]
1
2020-02-29T10:57:21.000Z
2020-02-29T10:57:21.000Z
from . import bansync def setup(bot): bot.add_cog(bansync.BanSync(bot))
13
37
0.705128
12
78
4.5
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.166667
78
5
38
15.6
0.830769
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
5
f56790adc0e8a3c5fcce28d8cb70c49fbd0893c8
174
py
Python
problems/grasshopper__summation.py
stereoabuse/codewars
d6437afaef38c3601903891b8b9cb0f84c108c54
[ "MIT" ]
null
null
null
problems/grasshopper__summation.py
stereoabuse/codewars
d6437afaef38c3601903891b8b9cb0f84c108c54
[ "MIT" ]
null
null
null
problems/grasshopper__summation.py
stereoabuse/codewars
d6437afaef38c3601903891b8b9cb0f84c108c54
[ "MIT" ]
null
null
null
## Grasshopper - Summation ## 8 kyu ## https://www.codewars.com/kata/55d24f55d7dd296eb9000030 def summation(num): return sum([i for i in range(num+1)])
19.333333
59
0.637931
22
174
5.045455
0.863636
0
0
0
0
0
0
0
0
0
0
0.140741
0.224138
174
8
60
21.75
0.681481
0.494253
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
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
f5844c501d7bf8b1c0579c2e66956d0c0ab1f7eb
54
py
Python
ac_compiler/parser/__init__.py
nicklambourne/crafting-a-compiler
4dde7390f4bdf83dedaca2e8b8b83ee42d270638
[ "BSD-3-Clause" ]
4
2020-04-03T14:06:46.000Z
2021-12-20T12:53:10.000Z
ac_compiler/parser/__init__.py
nicklambourne/crafting-a-compiler
4dde7390f4bdf83dedaca2e8b8b83ee42d270638
[ "BSD-3-Clause" ]
null
null
null
ac_compiler/parser/__init__.py
nicklambourne/crafting-a-compiler
4dde7390f4bdf83dedaca2e8b8b83ee42d270638
[ "BSD-3-Clause" ]
1
2021-02-11T22:34:39.000Z
2021-02-11T22:34:39.000Z
from .parser import Parser from .ast import AST, Node
18
26
0.777778
9
54
4.666667
0.555556
0
0
0
0
0
0
0
0
0
0
0
0.166667
54
2
27
27
0.933333
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
f5861a2595188f74c3e4ad0aed8b1d167a343fa1
122
py
Python
Nebula/admin.py
H0R4T1U/Nebula
d58c107d0ac71471d7bc2b0fbf7754e6dcaae1e4
[ "MIT" ]
2
2021-09-13T20:43:38.000Z
2021-09-14T18:31:45.000Z
Nebula/admin.py
H0R4T1U/website
d58c107d0ac71471d7bc2b0fbf7754e6dcaae1e4
[ "MIT" ]
null
null
null
Nebula/admin.py
H0R4T1U/website
d58c107d0ac71471d7bc2b0fbf7754e6dcaae1e4
[ "MIT" ]
null
null
null
from django.contrib import admin # Register your models here. from .models import Project admin.site.register(Project)
15.25
32
0.795082
17
122
5.705882
0.647059
0
0
0
0
0
0
0
0
0
0
0
0.139344
122
8
33
15.25
0.92381
0.213115
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
f59b7c809ca317a25e802d3e69109dd83d98bd01
83
py
Python
__init__.py
warpcomdev/aiogochan
a7ec93a7537956b72c3d210eb9177fed757ffdf8
[ "MIT" ]
null
null
null
__init__.py
warpcomdev/aiogochan
a7ec93a7537956b72c3d210eb9177fed757ffdf8
[ "MIT" ]
null
null
null
__init__.py
warpcomdev/aiogochan
a7ec93a7537956b72c3d210eb9177fed757ffdf8
[ "MIT" ]
null
null
null
from channel import Channel from selector import Selector from wg import WaitGroup
20.75
29
0.855422
12
83
5.916667
0.5
0
0
0
0
0
0
0
0
0
0
0
0.144578
83
3
30
27.666667
1
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
f59f6d425764b7c413cd4d04eed6a0e573835a61
74
py
Python
training_scripts/layers/__init__.py
Rufaim/Ranker-Net
a3100d7c5b0b51ad764abb8025f299be29b2f688
[ "MIT" ]
null
null
null
training_scripts/layers/__init__.py
Rufaim/Ranker-Net
a3100d7c5b0b51ad764abb8025f299be29b2f688
[ "MIT" ]
null
null
null
training_scripts/layers/__init__.py
Rufaim/Ranker-Net
a3100d7c5b0b51ad764abb8025f299be29b2f688
[ "MIT" ]
null
null
null
from .glu import GLU,GLUv2 from .nalu import NALU from .dense import Dense
24.666667
26
0.797297
13
74
4.538462
0.461538
0
0
0
0
0
0
0
0
0
0
0.015873
0.148649
74
3
27
24.666667
0.920635
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
19151ffcd4e306bd09d600de48a7ff3bcde28380
39
py
Python
programming/Workshop Work/Workshop_3/ex8.1.py
probablyacat/degree_level1
c08262514032ed86eb68c680e369bd9095954745
[ "MIT" ]
null
null
null
programming/Workshop Work/Workshop_3/ex8.1.py
probablyacat/degree_level1
c08262514032ed86eb68c680e369bd9095954745
[ "MIT" ]
null
null
null
programming/Workshop Work/Workshop_3/ex8.1.py
probablyacat/degree_level1
c08262514032ed86eb68c680e369bd9095954745
[ "MIT" ]
null
null
null
"""The polynomial is x^3-7x^2+14x-5"""
19.5
38
0.615385
9
39
2.666667
1
0
0
0
0
0
0
0
0
0
0
0.171429
0.102564
39
1
39
39
0.514286
0.820513
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
1915ac5d8a35336a00ed502e3fbde6f3b7a4614a
151
py
Python
jnas_metadata_loader/__init__.py
Hiroshiba/jnas_metadata_loader
98c7f56d3b8e6ef2a4e30306821a21e5bdd7f5ae
[ "MIT" ]
null
null
null
jnas_metadata_loader/__init__.py
Hiroshiba/jnas_metadata_loader
98c7f56d3b8e6ef2a4e30306821a21e5bdd7f5ae
[ "MIT" ]
null
null
null
jnas_metadata_loader/__init__.py
Hiroshiba/jnas_metadata_loader
98c7f56d3b8e6ef2a4e30306821a21e5bdd7f5ae
[ "MIT" ]
null
null
null
from .load import ( load_from_directory, load_from_paths, load_original_text_from_directory, load_transcription_text_from_directory, )
21.571429
43
0.788079
19
151
5.631579
0.421053
0.364486
0.317757
0
0
0
0
0
0
0
0
0
0.165563
151
6
44
25.166667
0.849206
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.166667
0
0.166667
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
1
0
0
0
0
0
0
5
19954f624a16ef6e96e1f5f7ac71463546976ccf
93
py
Python
firstpython.py
dheepdatascigit/pythonprojectdemo
0ec87834b3e16bdb59c291ffab127603ba273453
[ "MIT" ]
null
null
null
firstpython.py
dheepdatascigit/pythonprojectdemo
0ec87834b3e16bdb59c291ffab127603ba273453
[ "MIT" ]
null
null
null
firstpython.py
dheepdatascigit/pythonprojectdemo
0ec87834b3e16bdb59c291ffab127603ba273453
[ "MIT" ]
null
null
null
# This is just a demo file print("Hello world") print("this is update to my previous code")
18.6
43
0.72043
17
93
3.941176
0.823529
0.179104
0
0
0
0
0
0
0
0
0
0
0.182796
93
5
43
18.6
0.881579
0.258065
0
0
0
0
0.661765
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
27125aae800935a9e21833f4c489612c4593c409
282
py
Python
ensemble/logic/statemachine.py
licit-lab/ensemble
7a78ef0d69610d4fcfc5e008f931ade15e35acbf
[ "Linux-OpenIB" ]
null
null
null
ensemble/logic/statemachine.py
licit-lab/ensemble
7a78ef0d69610d4fcfc5e008f931ade15e35acbf
[ "Linux-OpenIB" ]
null
null
null
ensemble/logic/statemachine.py
licit-lab/ensemble
7a78ef0d69610d4fcfc5e008f931ade15e35acbf
[ "Linux-OpenIB" ]
null
null
null
class StateMachine: def __init__(self, initialState): self.currentState = initialState self.currentState.run() # Template method: def runAll(self, inputs): self.currentState = self.currentState.next_state(inputs) self.currentState.run()
28.2
64
0.677305
28
282
6.642857
0.5
0.430108
0.301075
0
0
0
0
0
0
0
0
0
0.22695
282
9
65
31.333333
0.853211
0.056738
0
0.285714
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0
0
0.428571
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
27756f7bda6f3e6a719e3355c23bdbf1d3350d69
101
py
Python
build/build.py
BOJIT/esp-multitool
399f327e6235c6fb6f5905f595ff0a29a8ba79fb
[ "MIT" ]
null
null
null
build/build.py
BOJIT/esp-multitool
399f327e6235c6fb6f5905f595ff0a29a8ba79fb
[ "MIT" ]
null
null
null
build/build.py
BOJIT/esp-multitool
399f327e6235c6fb6f5905f595ff0a29a8ba79fb
[ "MIT" ]
null
null
null
# Build script for Raspberry Pi Image (Dockerfile Entry Point) import dotenv print('hello world!')
16.833333
62
0.762376
14
101
5.5
1
0
0
0
0
0
0
0
0
0
0
0
0.158416
101
5
63
20.2
0.905882
0.594059
0
0
0
0
0.307692
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
27762994efa0e9700807c5cec0119fc565764730
211
py
Python
task 2 filename extension.py
ADVAIT135/adu
4c917bf5e8ad92fb78276609f7a6906047d8aab9
[ "MIT" ]
1
2021-02-07T19:50:16.000Z
2021-02-07T19:50:16.000Z
task 2 filename extension.py
ADVAIT135/adu
4c917bf5e8ad92fb78276609f7a6906047d8aab9
[ "MIT" ]
null
null
null
task 2 filename extension.py
ADVAIT135/adu
4c917bf5e8ad92fb78276609f7a6906047d8aab9
[ "MIT" ]
null
null
null
print("Enter the name of the file along with it's extension:-") a=str(input()) if('.py' in a): print("The extension of the file is : python") else: print("The extension of the file is not python")
30.142857
64
0.654028
37
211
3.72973
0.567568
0.108696
0.195652
0.275362
0.405797
0.405797
0.405797
0
0
0
0
0
0.21327
211
6
65
35.166667
0.831325
0
0
0
0
0
0.64878
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
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
1
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
27cd506d63ae77f5bc84345d3636d5beec2bdf7d
114
py
Python
wrench/classification/__init__.py
Stranger469/ARS2
b6d62b66997180abe01b676d5359c20daa42b7ad
[ "Apache-2.0" ]
null
null
null
wrench/classification/__init__.py
Stranger469/ARS2
b6d62b66997180abe01b676d5359c20daa42b7ad
[ "Apache-2.0" ]
null
null
null
wrench/classification/__init__.py
Stranger469/ARS2
b6d62b66997180abe01b676d5359c20daa42b7ad
[ "Apache-2.0" ]
null
null
null
from .astra import Astra from .denoise import Denoise from .implyloss import ImplyLoss from .weasel import WeaSEL
22.8
32
0.824561
16
114
5.875
0.375
0
0
0
0
0
0
0
0
0
0
0
0.140351
114
4
33
28.5
0.959184
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
27f453f230bc57a4fd9c11797a85131c877f0642
4,128
py
Python
data/data_manager.py
ristea/stead-earthquake-cnn
3d803e714ca3a8d24589ed155793d2c7da4b7ba2
[ "MIT" ]
1
2021-07-20T07:31:05.000Z
2021-07-20T07:31:05.000Z
data/data_manager.py
ristea/stead-earthquake-cnn
3d803e714ca3a8d24589ed155793d2c7da4b7ba2
[ "MIT" ]
null
null
null
data/data_manager.py
ristea/stead-earthquake-cnn
3d803e714ca3a8d24589ed155793d2c7da4b7ba2
[ "MIT" ]
2
2021-02-27T10:28:29.000Z
2022-03-16T12:13:26.000Z
from data.base_dataset import BaseDataset import numpy as np import torch class DataManager: def __init__(self, config): self.config = config def get_dataloader(self): dataset = BaseDataset(self.config) dataloader = torch.utils.data.DataLoader( dataset, batch_size=self.config['batch_size'], shuffle=True, pin_memory=True if self.config['device'] == 'cuda' else False ) return dataloader def get_train_eval_dataloaders(self): np.random.seed(707) dataset = BaseDataset(self.config) dataset_size = len(dataset) ## SPLIT DATASET train_split = self.config['train_size'] train_size = int(train_split * dataset_size) validation_size = dataset_size - train_size indices = list(range(dataset_size)) np.random.shuffle(indices) train_indices = indices[:train_size] temp = int(train_size + validation_size) val_indices = indices[train_size:temp] ## DATA LOARDER ## train_sampler = torch.utils.data.sampler.SubsetRandomSampler(train_indices) valid_sampler = torch.utils.data.sampler.SubsetRandomSampler(val_indices) train_loader = torch.utils.data.DataLoader(dataset=dataset, batch_size=self.config['batch_size'], sampler=train_sampler, pin_memory=True if self.config['device'] == 'cuda' else False) validation_loader = torch.utils.data.DataLoader(dataset=dataset, batch_size=self.config['batch_size'], sampler=valid_sampler, pin_memory=True if self.config['device'] == 'cuda' else False) return train_loader, validation_loader def get_train_eval_test_dataloaders(self): np.random.seed(707) dataset = BaseDataset(self.config) dataset_size = len(dataset) ## SPLIT DATASET train_split = self.config['train_size'] valid_split = self.config['valid_size'] test_split = self.config['test_size'] train_size = int(train_split * dataset_size) valid_size = int(valid_split * dataset_size) test_size = dataset_size - train_size - valid_size indices = list(range(dataset_size)) np.random.shuffle(indices) train_indices = indices[:train_size] valid_indices = indices[train_size:(train_size + valid_size)] test_indices = indices[(train_size + valid_size):] ## DATA LOARDER ## train_sampler = torch.utils.data.sampler.SubsetRandomSampler(train_indices) valid_sampler = torch.utils.data.sampler.SubsetRandomSampler(valid_indices) test_sampler = torch.utils.data.sampler.SubsetRandomSampler(test_indices) train_loader = torch.utils.data.DataLoader(dataset=dataset, batch_size=self.config['batch_size'], sampler=train_sampler, pin_memory=True if self.config['device'] == 'cuda' else False) validation_loader = torch.utils.data.DataLoader(dataset=dataset, batch_size=self.config['batch_size'], sampler=valid_sampler, pin_memory=True if self.config['device'] == 'cuda' else False) test_loader = torch.utils.data.DataLoader(dataset=dataset, batch_size=self.config['batch_size'], sampler=test_sampler, pin_memory=True if self.config['device'] == 'cuda' else False) return train_loader, validation_loader, test_loader
43.452632
118
0.561047
407
4,128
5.447174
0.127764
0.094723
0.069463
0.064953
0.810555
0.738836
0.717636
0.701849
0.670275
0.670275
0
0.002256
0.355862
4,128
94
119
43.914894
0.831516
0.013081
0
0.550725
0
0
0.039163
0
0
0
0
0
0
1
0.057971
false
0
0.043478
0
0.15942
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
7e07055bf94d555ef17d847b1e0a46e846d96eb4
135
py
Python
jivago/templating/rendered_view.py
keotl/jivago
892dfb0cae773e36245083c3e56f0f8523145523
[ "MIT" ]
12
2018-03-19T20:57:44.000Z
2020-01-27T14:11:24.000Z
jivago/templating/rendered_view.py
keotl/jivago
892dfb0cae773e36245083c3e56f0f8523145523
[ "MIT" ]
73
2018-04-20T22:26:00.000Z
2021-12-01T14:17:37.000Z
jivago/templating/rendered_view.py
keotl/jivago
892dfb0cae773e36245083c3e56f0f8523145523
[ "MIT" ]
1
2019-02-28T13:33:45.000Z
2019-02-28T13:33:45.000Z
class RenderedView(object): def __init__(self, view_file: str, data): self.view_file = view_file self.data = data
22.5
45
0.651852
18
135
4.5
0.555556
0.296296
0.296296
0
0
0
0
0
0
0
0
0
0.251852
135
5
46
27
0.80198
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
fd6c6ab843cca55cc95879f6073e1a4177a4db1a
125
py
Python
tests/test_transformations.py
kirshanthans/multi-tape-transducers
1ce8935f8c977be7b6c72ae63c33b8628866da19
[ "MIT" ]
2
2019-07-29T08:34:02.000Z
2021-06-14T14:18:37.000Z
tests/test_transformations.py
kirshanthans/multi-tape-transducers
1ce8935f8c977be7b6c72ae63c33b8628866da19
[ "MIT" ]
null
null
null
tests/test_transformations.py
kirshanthans/multi-tape-transducers
1ce8935f8c977be7b6c72ae63c33b8628866da19
[ "MIT" ]
null
null
null
import pytest from polyrec.statemachines import MultiTapeFSA, MultiTapeFST from polyrec.transformations import Transformation
41.666667
60
0.896
13
125
8.615385
0.692308
0.196429
0
0
0
0
0
0
0
0
0
0
0.08
125
3
61
41.666667
0.973913
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
fd7cac03d4dc78de124cd107a8e93d6499ec6502
550
py
Python
tests/test_doc.py
iver56/julius
0b176bd99bfb568ac977995c2549ead386804f0f
[ "MIT" ]
256
2020-10-26T12:11:41.000Z
2022-03-15T08:30:45.000Z
tests/test_doc.py
gheyret/julius
36d9ba63bd08c9d908e72d017910e1b2a177c6a3
[ "MIT" ]
13
2020-10-26T19:27:59.000Z
2022-01-28T09:27:20.000Z
tests/test_doc.py
gheyret/julius
36d9ba63bd08c9d908e72d017910e1b2a177c6a3
[ "MIT" ]
15
2020-11-03T09:40:18.000Z
2022-03-06T07:14:39.000Z
from doctest import testmod import unittest from julius import resample, fftconv, lowpass, bands, utils class DocStringTest(unittest.TestCase): def test_resample(self): self.assertEqual(testmod(resample).failed, 0) def test_fftconv(self): self.assertEqual(testmod(fftconv).failed, 0) def test_lowpass(self): self.assertEqual(testmod(lowpass).failed, 0) def test_bands(self): self.assertEqual(testmod(bands).failed, 0) def test_utils(self): self.assertEqual(testmod(utils).failed, 0)
25
59
0.707273
68
550
5.647059
0.294118
0.091146
0.247396
0.338542
0
0
0
0
0
0
0
0.011186
0.187273
550
21
60
26.190476
0.847875
0
0
0
0
0
0
0
0
0
0
0
0.357143
1
0.357143
false
0.214286
0.214286
0
0.642857
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
5
fd9d3cc5c3d473a708f9b639781a9462726615f1
662
py
Python
CPAC/unet/__init__.py
Lawreros/C-PAC
ce26ba9a38cbd401cd405150eeed23b805007724
[ "BSD-3-Clause" ]
125
2015-03-04T09:14:46.000Z
2022-03-29T07:46:12.000Z
CPAC/unet/__init__.py
Lawreros/C-PAC
ce26ba9a38cbd401cd405150eeed23b805007724
[ "BSD-3-Clause" ]
1,018
2015-01-04T16:01:29.000Z
2022-03-31T19:23:09.000Z
CPAC/unet/__init__.py
Lawreros/C-PAC
ce26ba9a38cbd401cd405150eeed23b805007724
[ "BSD-3-Clause" ]
117
2015-01-10T08:05:52.000Z
2022-01-18T05:16:51.000Z
from .function import write_nifti, estimate_dice, extract_large_comp, predict_volumes, MyParser from .model import weigths_init, Conv3dBlock, UpConv3dBlock, Conv2dBlock, UpConv2dBlock, UNet3d, UNet2d, MultiSliceBcUNet, MultiSliceSsUNet, MultiSliceModel from .dataset import VolumeDataset, BlockDataset __all__ = [ 'write_nifti', 'estimate_dice', 'extract_large_comp', 'predict_volumes', 'MyParser', 'weigths_init', 'Conv3dBlock', 'UpConv3dBlock', 'Conv2dBlock', 'UpConv2dBlock', 'UNet3d', 'UNet2d', 'MultiSliceBcUNet', 'MultiSliceSsUNet', 'MultiSliceModel', 'VolumeDataset', 'BlockDataset' ]
26.48
156
0.717523
56
662
8.196429
0.517857
0.043573
0.078431
0.095861
0.775599
0.775599
0.775599
0.775599
0.775599
0.775599
0
0.022018
0.176737
662
25
157
26.48
0.820183
0
0
0
0
0
0.315234
0
0
0
0
0
0
1
0
false
0
0.136364
0
0.136364
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
fdc50820fda882e602b061354a1fb8495670b691
59
py
Python
jetavator_databricks_local/jetavator_databricks_local/services/__init__.py
jetavator/jetavator_databricks
719c934b6391f6f41ca34b4d4df8c697c1a25283
[ "Apache-2.0" ]
null
null
null
jetavator_databricks_local/jetavator_databricks_local/services/__init__.py
jetavator/jetavator_databricks
719c934b6391f6f41ca34b4d4df8c697c1a25283
[ "Apache-2.0" ]
null
null
null
jetavator_databricks_local/jetavator_databricks_local/services/__init__.py
jetavator/jetavator_databricks
719c934b6391f6f41ca34b4d4df8c697c1a25283
[ "Apache-2.0" ]
null
null
null
from .LocalDatabricksService import LocalDatabricksService
29.5
58
0.915254
4
59
13.5
0.75
0
0
0
0
0
0
0
0
0
0
0
0.067797
59
1
59
59
0.981818
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
fdf1adb6891aba3d8d38555f134b5dbef9e2a717
148
py
Python
environments/WeBots/controller/__init__.py
zal/simenvbenchmark
269d953b50408411a87950aebfb6adc20afbbead
[ "MIT" ]
9
2020-12-16T11:43:35.000Z
2022-03-04T18:28:35.000Z
environments/WeBots/controller/__init__.py
zal/simenvbenchmark
269d953b50408411a87950aebfb6adc20afbbead
[ "MIT" ]
null
null
null
environments/WeBots/controller/__init__.py
zal/simenvbenchmark
269d953b50408411a87950aebfb6adc20afbbead
[ "MIT" ]
1
2022-02-17T02:49:08.000Z
2022-02-17T02:49:08.000Z
#!/usr/bin/env python3 from .robot_env import RobotEnv_webots from .nnn_env import nnnEnv_webots from .simulation_interface import WebotsInterface
24.666667
49
0.844595
21
148
5.714286
0.666667
0.15
0
0
0
0
0
0
0
0
0
0.007519
0.101351
148
5
50
29.6
0.894737
0.141892
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
fdf4988699090024130b87b0c27359c74b50c1f7
53
py
Python
deliverable_model/serving/model/__init__.py
shfshf/deliverable_model
d1f34c4a719bd392033f3f9c9ccb2dbbcf6ec264
[ "Apache-2.0" ]
2
2020-08-20T04:26:58.000Z
2021-01-04T10:06:31.000Z
deliverable_model/serving/model/__init__.py
shfshf/deliverable_model
d1f34c4a719bd392033f3f9c9ccb2dbbcf6ec264
[ "Apache-2.0" ]
6
2019-12-12T03:13:43.000Z
2021-11-10T20:08:18.000Z
deliverable_model/serving/model/__init__.py
shfshf/deliverable_model
d1f34c4a719bd392033f3f9c9ccb2dbbcf6ec264
[ "Apache-2.0" ]
4
2019-11-15T09:56:01.000Z
2020-05-08T10:23:00.000Z
import deliverable_model.serving.model.model_loaders
26.5
52
0.90566
7
53
6.571429
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.037736
53
1
53
53
0.901961
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
e31b876c1334612958eb6334c18b6383c7766dab
315
py
Python
tests/test_utils.py
xia0long/canst
6224e8323cfcb1868f6022693ab5e08d790e27d1
[ "MIT" ]
1
2022-01-20T11:38:48.000Z
2022-01-20T11:38:48.000Z
tests/test_utils.py
xia0long/canst
6224e8323cfcb1868f6022693ab5e08d790e27d1
[ "MIT" ]
null
null
null
tests/test_utils.py
xia0long/canst
6224e8323cfcb1868f6022693ab5e08d790e27d1
[ "MIT" ]
null
null
null
import pytest from canst.can import Frame from canst.utils import * def test_frame_data_to_str(): data1 = [65, 7, 133, 28, 0, 128, 0, 0] data2 = [255, 255, 255, 255, 255, 255, 255, 255] assert frame_data_to_str(data1) == "4107851c00800000" assert frame_data_to_str(data2) == "ffffffffffffffff"
22.5
57
0.685714
49
315
4.204082
0.489796
0.203884
0.262136
0.291262
0.427184
0.116505
0.116505
0
0
0
0
0.224409
0.193651
315
13
58
24.230769
0.586614
0
0
0
0
0
0.101587
0
0
0
0
0
0.25
1
0.125
false
0
0.375
0
0.5
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
e34172527d7e0bb7cf2065117ee8f5e2f4ffcb4e
498
py
Python
src/datastructure/stacks1.py
Valeeswaran/tutorials
71b43cad46f4d7d2d67d3ff4be61bdaaade2a36a
[ "MIT" ]
null
null
null
src/datastructure/stacks1.py
Valeeswaran/tutorials
71b43cad46f4d7d2d67d3ff4be61bdaaade2a36a
[ "MIT" ]
null
null
null
src/datastructure/stacks1.py
Valeeswaran/tutorials
71b43cad46f4d7d2d67d3ff4be61bdaaade2a36a
[ "MIT" ]
null
null
null
from collections import deque class Stack: def __init__(self): self.container = deque() def push(self, value): self.container.append(value) def pop(self): return self.container.pop() def peek(self): return self.container[-1] def is_empty(self): return len(self.container)==0 def size(self): return len(self.container) if __name__ == "__main__": s = Stack() s.push(24) print(s.pop()) print(s.is_empty())
18.444444
37
0.596386
65
498
4.353846
0.430769
0.275618
0.09894
0.162544
0.183746
0
0
0
0
0
0
0.01105
0.273092
498
27
38
18.444444
0.770718
0
0
0
0
0
0.016032
0
0
0
0
0
0
1
0.315789
false
0
0.052632
0.210526
0.631579
0.105263
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
e36f25f43d88e8726bc407e1e6cfb29d6b31558d
155
py
Python
gpscraper/forms/__init__.py
alverelt/gpscraper
9c0322d1b8f0c70786bd15512746650b6c4d9ded
[ "MIT" ]
1
2021-06-09T05:15:49.000Z
2021-06-09T05:15:49.000Z
gpscraper/forms/__init__.py
alverelt/gpscraper
9c0322d1b8f0c70786bd15512746650b6c4d9ded
[ "MIT" ]
1
2021-07-30T21:30:31.000Z
2021-08-10T21:15:53.000Z
gpscraper/forms/__init__.py
alverelt/gpscraper
9c0322d1b8f0c70786bd15512746650b6c4d9ded
[ "MIT" ]
null
null
null
from .permissions import permissions from .reviews import reviews_next_page from .review_history import review_history from .search import search_next_page
38.75
42
0.877419
22
155
5.909091
0.409091
0.123077
0
0
0
0
0
0
0
0
0
0
0.096774
155
4
43
38.75
0.928571
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
8b608074f70b6cdd800e7d6de7262a2d3f332854
14,646
py
Python
tests/test_singly_linkedlist.py
alan-augustine/python_singly_linkedlist
f227a4154b22de8a273d319ecdd6329035d5d258
[ "MIT" ]
null
null
null
tests/test_singly_linkedlist.py
alan-augustine/python_singly_linkedlist
f227a4154b22de8a273d319ecdd6329035d5d258
[ "MIT" ]
null
null
null
tests/test_singly_linkedlist.py
alan-augustine/python_singly_linkedlist
f227a4154b22de8a273d319ecdd6329035d5d258
[ "MIT" ]
null
null
null
# pylint: disable=missing-function-docstring,redefined-outer-name, # pylint: disable=protected-access,missing-module-docstring import pytest from singly_linkedlist.singly_linkedlist import Node, \ SinglyLinkedList, SinglyLinkedListException, SinglyLinkedListIndexError, \ SinglyLinkedListEmptyError # return an empty linked list @pytest.fixture def test_linkedlist(): return SinglyLinkedList() def test_node_data(): node = Node('A') assert node.data == 'A' def test_node_next(): node = Node('A') assert node.next is None def test_insert_head_empty_list_1(test_linkedlist): """Insert data into an empty linked list.""" test_linkedlist.insert_head('A') assert test_linkedlist.head.data == 'A' def test_insert_head_empty_list_2(test_linkedlist): """ Insert data into an empty linked list and check whether header node's next has None """ test_linkedlist.insert_head('A') assert test_linkedlist.head.next is None def test_insert_head_one_element_list_1(test_linkedlist): """ Insert head element to a single element linked list and check whether header node has expected data. """ test_linkedlist.insert_head('A') test_linkedlist.insert_head('B') assert test_linkedlist.head.data == 'B' def test_insert_head_one_element_list_2(test_linkedlist): """ Insert head element to a single element linked list and check whether header node.next points to second element """ test_linkedlist.insert_head('A') test_linkedlist.insert_head('B') assert test_linkedlist.head.next.data == 'A' def test_insert_head_for_two_element_list_1(test_linkedlist): """ Insert head element to a two element linked list and check whether header node has expected data. """ test_linkedlist.insert_head('A') test_linkedlist.insert_head('B') test_linkedlist.insert_head('C') assert test_linkedlist.head.data == 'C' # capfd - capturefd is a built-in pytest fixture to capture # stdout, stderr using file descriptor method def test_print_elements_empty_list(test_linkedlist, capfd): # print to stdout test_linkedlist.print_elements() # capture stdout out, _ = capfd.readouterr() assert out == "\nThe list is empty!\n" def test_print_elements_one_element_list(test_linkedlist, capfd): test_linkedlist.insert_head('A') test_linkedlist.insert_at('B', 1) test_linkedlist.print_elements() out, _ = capfd.readouterr() assert out == "\nA\nB\n" def test_print_elements_two_element_list(test_linkedlist, capfd): test_linkedlist.insert_head('A') test_linkedlist.insert_at('B', 1) test_linkedlist.insert_at('C', 2) test_linkedlist.print_elements() out, _ = capfd.readouterr() assert out == "\nA\nB\nC\n" def test_insert_end_for_empty_list(test_linkedlist): """ Insert last element to an empty element linked list and check whether header node has expected data """ test_linkedlist.insert_end('A') assert test_linkedlist.head.data == 'A' def test_insert_end_for_one_element_list(test_linkedlist): """ Insert last element to a single element linked list and check whether the last node has expected data """ test_linkedlist.insert_end('A') test_linkedlist.insert_end('B') assert test_linkedlist.head.data == 'A' def test_length_for_empty_linked_list(test_linkedlist): assert test_linkedlist.list_length() == 0 def test_length_for_non_empty_linked_list(test_linkedlist): test_linkedlist.insert_end('A') assert test_linkedlist.list_length() == 1 def test_insert_at_negetive_index_exception(test_linkedlist): with pytest.raises(SinglyLinkedListIndexError): test_linkedlist.insert_at('B', -1) def test_insert_at_index_greater_than_list_length_exception(test_linkedlist): test_linkedlist.insert_head('A') # or below base class will also work # with pytest.raises(SinglyLinkedListException) as excinfo: with pytest.raises(SinglyLinkedListIndexError) as excinfo: test_linkedlist.insert_at('B', 2) assert str(excinfo.value) == ("Unable to insert at index 2" " : Invalid Position") def test_insert_at_empty_list(test_linkedlist): test_linkedlist.insert_at('A', 0) assert test_linkedlist.head.data == 'A' def test_insert_at_one_element_list_pos_0(test_linkedlist): test_linkedlist.insert_head('A') test_linkedlist.insert_at('B', 0) assert test_linkedlist.head.data == 'B' def test_insert_at_one_element_list_pos_1(test_linkedlist): test_linkedlist.insert_head('A') test_linkedlist.insert_at('B', 1) assert test_linkedlist.head.next.data == 'B' def test_insert_at_out_of_range_index_exception(test_linkedlist): with pytest.raises(SinglyLinkedListException): test_linkedlist.insert_at('A', 1) def test_insert_at_negative_index_exception(test_linkedlist): with pytest.raises(SinglyLinkedListException): test_linkedlist.insert_at('A', -1) def test_delete_end_empty_list_exception(test_linkedlist): with pytest.raises(SinglyLinkedListEmptyError) as excinfo: test_linkedlist.delete_end() assert str(excinfo.value) == ("Unable to delete " "from empty list") def test_delete_end_one_element_list(test_linkedlist): test_linkedlist.insert_head('A') test_linkedlist.delete_end() assert test_linkedlist.head is None def test_delete_end_two_element_list_head_data(test_linkedlist): test_linkedlist.insert_head('A') test_linkedlist.insert_at('B', 1) test_linkedlist.delete_end() assert test_linkedlist.head.data == 'A' def test_delete_end_two_element_list_head_next(test_linkedlist): test_linkedlist.insert_head('A') test_linkedlist.insert_at('B', 1) test_linkedlist.delete_end() assert test_linkedlist.head.next is None def test_delete_head_empty_linked_list(test_linkedlist): with pytest.raises(SinglyLinkedListEmptyError) as execinfo: test_linkedlist.delete_head() assert str(execinfo.value) == ("Unable to delete head from" " empty linked list") def test_delete_head_one_element_linked_list(test_linkedlist): test_linkedlist.insert_head('A') test_linkedlist.delete_head() assert test_linkedlist.head is None def test_delete_head_two_element_linked_list(test_linkedlist): test_linkedlist.insert_head('A') test_linkedlist.insert_at('B', 1) test_linkedlist.delete_head() assert test_linkedlist.head.data == 'B' def test_delete_at_empty_list(test_linkedlist): with pytest.raises(SinglyLinkedListEmptyError) as execinfo: test_linkedlist.delete_at(0) assert str(execinfo.value) == ("Unable to delete head from" " empty linked list") def test_delete_at_negative_index(test_linkedlist): test_linkedlist.insert_head('A') with pytest.raises(SinglyLinkedListIndexError) as execinfo: test_linkedlist.delete_at(-1) assert str(execinfo.value) == "Index cannot be negative" def test_delete_at_index_greater_than_list_length(test_linkedlist): test_linkedlist.insert_head('A') with pytest.raises(SinglyLinkedListIndexError) as execinfo: test_linkedlist.delete_at(1) assert str(execinfo.value) == ("Index=1 is out of range for" " list length=1") def test_delete_at_delete_head(test_linkedlist): test_linkedlist.insert_head('A') test_linkedlist.delete_at(0) assert test_linkedlist.head is None def test_delete_at_delete_end(test_linkedlist): test_linkedlist.insert_head('A') test_linkedlist.insert_at('B', 1) test_linkedlist.delete_at(1) assert test_linkedlist.head.next is None def test_delete_at_four_element_list_index_two(test_linkedlist): test_linkedlist.insert_head('A') test_linkedlist.insert_at('B', 1) test_linkedlist.insert_at('C', 2) test_linkedlist.insert_at('D', 3) test_linkedlist.delete_at(2) second_element = test_linkedlist.head.next third_element = second_element.next assert third_element.data == 'D' # __get_cycle_meet_node() private method in class becomes # _SinglyLinkedList__get_cycle_meet_node() def test__get_cycle_meet_node_empty_list_exception(test_linkedlist): with pytest.raises(SinglyLinkedListException) as execinfo: test_linkedlist._SinglyLinkedList__get_cycle_meet_node() assert str(execinfo.value) == "Empty linked list" def test__get_cycle_meet_node_one_element_list_none(test_linkedlist): test_linkedlist.insert_head('A') assert test_linkedlist._SinglyLinkedList__get_cycle_meet_node() is None def test__get_cycle_meet_node_two_element_list_none(test_linkedlist): test_linkedlist.insert_end('A') test_linkedlist.insert_end('B') assert test_linkedlist._SinglyLinkedList__get_cycle_meet_node() is None def test__get_cycle_meet_node_two_element_list_true(test_linkedlist): test_linkedlist.insert_end('A') test_linkedlist.insert_end('B') # create a cycle/loop test_linkedlist.head.next.next = test_linkedlist.head assert test_linkedlist._SinglyLinkedList__get_cycle_meet_node() \ is test_linkedlist.head def test_cycle_present_false(test_linkedlist): test_linkedlist.insert_end('A') test_linkedlist.insert_end('B') test_linkedlist.insert_end('C') # assert cycle_present() function returns False assert not test_linkedlist.cycle_present() def test_cycle_present_true(test_linkedlist): """ Create a 3 element linked list with a cycle and test whether cycle_present() function detects it """ test_linkedlist.insert_end('A') test_linkedlist.insert_end('B') test_linkedlist.insert_end('C') # create a cycle - connection from 3rd to 2nd element test_linkedlist.head.next.next.next = test_linkedlist.head.next # assert cycle_present() function returns True assert test_linkedlist.cycle_present() def test_remove_cycle_no_cycle(test_linkedlist): test_linkedlist.insert_end('A') test_linkedlist.insert_end('B') test_linkedlist.remove_cycle() assert test_linkedlist.head.next.next is None def test_remove_cycle_circular_linkedlist(test_linkedlist): test_linkedlist.insert_end('A') test_linkedlist.insert_end('B') test_linkedlist.insert_end('C') # create a cycle - connection from 3rd to 1st element test_linkedlist.head.next.next.next = test_linkedlist.head test_linkedlist.remove_cycle() assert test_linkedlist.head.next.next.next is None def test_remove_cycle(test_linkedlist): char_list = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K'] for i in char_list: test_linkedlist.insert_end(i) last_node = test_linkedlist.head while last_node.next is not None: if last_node.data == 'E': fifth_element = last_node last_node = last_node.next # create a cycle - connection from last to fifth element last_node.next = fifth_element test_linkedlist.remove_cycle() last_node = test_linkedlist.head while last_node.next is not None: last_node = last_node.next assert last_node.next is None def test_get_node_at_index_empty_list_exception(test_linkedlist): with pytest.raises(SinglyLinkedListEmptyError) as execinfo: _ = test_linkedlist.get_node_at_index(0) assert str(execinfo.value) == "Empty linked list" def test_get_node_at_index_negative_index_exception(test_linkedlist): test_linkedlist.insert_end('A') with pytest.raises(SinglyLinkedListIndexError) as execinfo: _ = test_linkedlist.get_node_at_index(-1) assert str(execinfo.value) == "Index out of range: -1" def test_get_node_at_index_out_of_range_index_exception(test_linkedlist): test_linkedlist.insert_end('A') with pytest.raises(SinglyLinkedListIndexError) as execinfo: _ = test_linkedlist.get_node_at_index(1) assert str(execinfo.value) == ("Index=1 out of range for " "list length=1") def test__check_indices_for_swap_empty_list(test_linkedlist): with pytest.raises(SinglyLinkedListException) as execinfo: test_linkedlist._SinglyLinkedList__check_indices_for_swap(0, 0) assert str(execinfo.value) == "Empty linked list" def test__check_indices_for_swap_negative_index1(test_linkedlist): test_linkedlist.insert_end('A') with pytest.raises(SinglyLinkedListIndexError) as execinfo: test_linkedlist._SinglyLinkedList__check_indices_for_swap(-1, 0) assert str(execinfo.value) == "Invalid index: -1" def test__check_indices_for_swap_negative_index2(test_linkedlist): test_linkedlist.insert_end('B') with pytest.raises(SinglyLinkedListIndexError) as execinfo: test_linkedlist._SinglyLinkedList__check_indices_for_swap(0, -2) assert str(execinfo.value) == "Invalid index: -2" def test__check_indices_for_swap_out_of_range_index1(test_linkedlist): test_linkedlist.insert_end('A') with pytest.raises(SinglyLinkedListIndexError) as execinfo: test_linkedlist._SinglyLinkedList__check_indices_for_swap(1, 0) assert str(execinfo.value) == ("Index=1 out of range for" " list length=1") def test__check_indices_for_swap_out_of_range_index2(test_linkedlist): test_linkedlist.insert_end('B') with pytest.raises(SinglyLinkedListIndexError) as execinfo: test_linkedlist._SinglyLinkedList__check_indices_for_swap(0, 2) assert str(execinfo.value) == ("Index=2 out of range for" " list length=1") def test_swap_nodes_empty_linkedlist(test_linkedlist): with pytest.raises(SinglyLinkedListException): test_linkedlist.swap_nodes_at_indices(1, 2) def test_swap_nodes_negetive_index1_exception(test_linkedlist): with pytest.raises(SinglyLinkedListException): test_linkedlist.swap_nodes_at_indices(-1, 2) def test_swap_nodes_negetive_index2_exception(test_linkedlist): with pytest.raises(SinglyLinkedListException): test_linkedlist.swap_nodes_at_indices(1, -2) def test_swap_nodes_out_of_range_index1_exception(test_linkedlist): test_linkedlist.insert_end('A') test_linkedlist.insert_end('B') with pytest.raises(SinglyLinkedListException): test_linkedlist.swap_nodes_at_indices(2, 0) def test_swap_nodes_out_of_range_index2_exception(test_linkedlist): test_linkedlist.insert_end('A') test_linkedlist.insert_end('B') with pytest.raises(SinglyLinkedListException): test_linkedlist.swap_nodes_at_indices(0, 2)
34.060465
78
0.74744
1,978
14,646
5.162791
0.077856
0.268703
0.15472
0.067568
0.844497
0.772914
0.723854
0.684293
0.650313
0.592049
0
0.006543
0.165233
14,646
429
79
34.13986
0.828726
0.100847
0
0.520446
0
0
0.045413
0
0
0
0
0
0.178439
1
0.211896
false
0
0.007435
0.003717
0.223048
0.022305
0
0
0
null
1
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
5
8b7f74cbd8136d4af37065847e22704ec03393d0
109
py
Python
src/typin/research_import.py
paulross/typin
113224d868c95e93b9ae724b0a9d9cfe3e3c78f8
[ "MIT" ]
7
2017-11-12T21:29:18.000Z
2019-01-30T01:50:47.000Z
src/typin/research_import.py
paulross/typin
113224d868c95e93b9ae724b0a9d9cfe3e3c78f8
[ "MIT" ]
null
null
null
src/typin/research_import.py
paulross/typin
113224d868c95e93b9ae724b0a9d9cfe3e3c78f8
[ "MIT" ]
null
null
null
def func_that_raises(): raise ValueError('Error message') def func_no_catch(): func_that_raises()
13.625
37
0.715596
15
109
4.8
0.666667
0.194444
0.388889
0
0
0
0
0
0
0
0
0
0.174312
109
7
38
15.571429
0.8
0
0
0
0
0
0.121495
0
0
0
0
0
0
1
0.5
true
0
0
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
0
0
0
5
8b8bdc073bd85794b0489b8e35dbb1c6fecb4cd5
17
py
Python
main.py
itheimapy/test004
409ca045375cca88b4e79e6d28dc236316708f3e
[ "MIT" ]
null
null
null
main.py
itheimapy/test004
409ca045375cca88b4e79e6d28dc236316708f3e
[ "MIT" ]
null
null
null
main.py
itheimapy/test004
409ca045375cca88b4e79e6d28dc236316708f3e
[ "MIT" ]
null
null
null
num=1 num2=2222
4.25
9
0.705882
4
17
3
1
0
0
0
0
0
0
0
0
0
0
0.428571
0.176471
17
3
10
5.666667
0.428571
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
8bbb11294000cb2d51f6e9e7673a7d58a0488600
59
py
Python
src/app_bundle/source/command/__init__.py
phoopy/phoopy-skeleton
7ab9b7173c3d0a4cea3603a26554ca8664550d59
[ "MIT" ]
3
2018-10-17T15:36:06.000Z
2020-08-17T19:12:00.000Z
src/app_bundle/source/command/__init__.py
phoopy/phoopy-skeleton
7ab9b7173c3d0a4cea3603a26554ca8664550d59
[ "MIT" ]
null
null
null
src/app_bundle/source/command/__init__.py
phoopy/phoopy-skeleton
7ab9b7173c3d0a4cea3603a26554ca8664550d59
[ "MIT" ]
null
null
null
from .hello_world_command import HelloWorldCommand # noqa
29.5
58
0.847458
7
59
6.857143
1
0
0
0
0
0
0
0
0
0
0
0
0.118644
59
1
59
59
0.923077
0.067797
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
8be2d4481b89a775a467dcfa4ad2e2822fcfcf01
40
py
Python
pipeline/sklearn/__init__.py
edublancas/pipeline
5bef04d77fdadc1dc4ec22b9b346f0a062cca1ce
[ "MIT" ]
null
null
null
pipeline/sklearn/__init__.py
edublancas/pipeline
5bef04d77fdadc1dc4ec22b9b346f0a062cca1ce
[ "MIT" ]
12
2016-05-25T19:54:53.000Z
2016-12-28T06:12:32.000Z
pipeline/sklearn/__init__.py
edublancas/pipeline
5bef04d77fdadc1dc4ec22b9b346f0a062cca1ce
[ "MIT" ]
null
null
null
from .MetaEstimator import MetaEstimator
40
40
0.9
4
40
9
0.75
0
0
0
0
0
0
0
0
0
0
0
0.075
40
1
40
40
0.972973
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
8becd460d0e4b3932333584716617c6be700cd04
130
py
Python
LinkLayer/error.py
BorisChenCZY/ImplementTheNetwork
cfa6c025c02224641e6dad87fe8f3753fd8ca6a0
[ "MIT" ]
null
null
null
LinkLayer/error.py
BorisChenCZY/ImplementTheNetwork
cfa6c025c02224641e6dad87fe8f3753fd8ca6a0
[ "MIT" ]
null
null
null
LinkLayer/error.py
BorisChenCZY/ImplementTheNetwork
cfa6c025c02224641e6dad87fe8f3753fd8ca6a0
[ "MIT" ]
null
null
null
class MTUError(Exception): pass class MACError(Exception): pass class IPv4AddressError(Exception): pass
11.818182
35
0.661538
12
130
7.166667
0.5
0.453488
0.418605
0
0
0
0
0
0
0
0
0.010526
0.269231
130
10
36
13
0.894737
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
478048ab16e8faf12a676299a48263a88895b827
39
py
Python
tests/__init__.py
pawnhearts/configuru
9ed06324079e0a92fe9bb0da97b90c192d2eebb7
[ "BSD-3-Clause" ]
1
2021-05-02T14:51:29.000Z
2021-05-02T14:51:29.000Z
tests/__init__.py
pawnhearts/configuru
9ed06324079e0a92fe9bb0da97b90c192d2eebb7
[ "BSD-3-Clause" ]
null
null
null
tests/__init__.py
pawnhearts/configuru
9ed06324079e0a92fe9bb0da97b90c192d2eebb7
[ "BSD-3-Clause" ]
null
null
null
"""Unit test package for configuru."""
19.5
38
0.692308
5
39
5.4
1
0
0
0
0
0
0
0
0
0
0
0
0.128205
39
1
39
39
0.794118
0.820513
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
9a16e0b617011c319be6b3fd374663b352ff985b
88
py
Python
rand_wc_model_gen/analysis/__init__.py
KarrLab/rand_wc_model_gen
4b48a3acea96fca01e3930ab024e8352166a12a5
[ "MIT" ]
1
2021-07-05T17:47:54.000Z
2021-07-05T17:47:54.000Z
rand_wc_model_gen/analysis/__init__.py
KarrLab/rand_wc_model_gen
4b48a3acea96fca01e3930ab024e8352166a12a5
[ "MIT" ]
4
2018-08-09T15:08:25.000Z
2020-04-29T22:01:55.000Z
rand_wc_model_gen/analysis/__init__.py
KarrLab/rand_wc_model_gen
4b48a3acea96fca01e3930ab024e8352166a12a5
[ "MIT" ]
null
null
null
from .core import AnalysisRunner from . import kb from . import model from . import sim
17.6
32
0.772727
13
88
5.230769
0.538462
0.441176
0
0
0
0
0
0
0
0
0
0
0.181818
88
4
33
22
0.944444
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
9a43fc9a9fe95b5486d6982cda7504542e3980ec
12,294
py
Python
iosxr_grpc/genpy/mdt_grpc_dialin/mdt_grpc_dialin_pb2_grpc.py
parth-paradkar/cli2yang-tools
55afdab7a470abcad7765c6aea63cec26cdc30b4
[ "Apache-2.0" ]
7
2019-02-15T08:48:45.000Z
2020-05-21T10:04:43.000Z
iosxr_grpc/genpy/mdt_grpc_dialin/mdt_grpc_dialin_pb2_grpc.py
parth-paradkar/cli2yang-tools
55afdab7a470abcad7765c6aea63cec26cdc30b4
[ "Apache-2.0" ]
null
null
null
iosxr_grpc/genpy/mdt_grpc_dialin/mdt_grpc_dialin_pb2_grpc.py
parth-paradkar/cli2yang-tools
55afdab7a470abcad7765c6aea63cec26cdc30b4
[ "Apache-2.0" ]
2
2021-02-18T04:55:40.000Z
2021-06-09T06:22:01.000Z
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from mdt_grpc_dialin import mdt_grpc_dialin_pb2 as mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2 class gRPCConfigOperStub(object): # missing associated documentation comment in .proto file pass def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.GetConfig = channel.unary_stream( '/IOSXRExtensibleManagabilityService.gRPCConfigOper/GetConfig', request_serializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.ConfigGetArgs.SerializeToString, response_deserializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.ConfigGetReply.FromString, ) self.MergeConfig = channel.unary_unary( '/IOSXRExtensibleManagabilityService.gRPCConfigOper/MergeConfig', request_serializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.ConfigArgs.SerializeToString, response_deserializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.ConfigReply.FromString, ) self.DeleteConfig = channel.unary_unary( '/IOSXRExtensibleManagabilityService.gRPCConfigOper/DeleteConfig', request_serializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.ConfigArgs.SerializeToString, response_deserializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.ConfigReply.FromString, ) self.ReplaceConfig = channel.unary_unary( '/IOSXRExtensibleManagabilityService.gRPCConfigOper/ReplaceConfig', request_serializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.ConfigArgs.SerializeToString, response_deserializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.ConfigReply.FromString, ) self.CliConfig = channel.unary_unary( '/IOSXRExtensibleManagabilityService.gRPCConfigOper/CliConfig', request_serializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.CliConfigArgs.SerializeToString, response_deserializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.CliConfigReply.FromString, ) self.CommitReplace = channel.unary_unary( '/IOSXRExtensibleManagabilityService.gRPCConfigOper/CommitReplace', request_serializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.CommitReplaceArgs.SerializeToString, response_deserializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.CommitReplaceReply.FromString, ) self.CommitConfig = channel.unary_unary( '/IOSXRExtensibleManagabilityService.gRPCConfigOper/CommitConfig', request_serializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.CommitArgs.SerializeToString, response_deserializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.CommitReply.FromString, ) self.ConfigDiscardChanges = channel.unary_unary( '/IOSXRExtensibleManagabilityService.gRPCConfigOper/ConfigDiscardChanges', request_serializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.DiscardChangesArgs.SerializeToString, response_deserializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.DiscardChangesReply.FromString, ) self.GetOper = channel.unary_stream( '/IOSXRExtensibleManagabilityService.gRPCConfigOper/GetOper', request_serializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.GetOperArgs.SerializeToString, response_deserializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.GetOperReply.FromString, ) self.CreateSubs = channel.unary_stream( '/IOSXRExtensibleManagabilityService.gRPCConfigOper/CreateSubs', request_serializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.CreateSubsArgs.SerializeToString, response_deserializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.CreateSubsReply.FromString, ) class gRPCConfigOperServicer(object): # missing associated documentation comment in .proto file pass def GetConfig(self, request, context): """Configuration related commands """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def MergeConfig(self, request, context): # missing associated documentation comment in .proto file pass context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def DeleteConfig(self, request, context): # missing associated documentation comment in .proto file pass context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def ReplaceConfig(self, request, context): # missing associated documentation comment in .proto file pass context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def CliConfig(self, request, context): # missing associated documentation comment in .proto file pass context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def CommitReplace(self, request, context): # missing associated documentation comment in .proto file pass context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def CommitConfig(self, request, context): """Do we need implicit or explicit commit """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def ConfigDiscardChanges(self, request, context): # missing associated documentation comment in .proto file pass context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def GetOper(self, request, context): """Get only returns oper data """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def CreateSubs(self, request, context): """Get Telemetry Data """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def add_gRPCConfigOperServicer_to_server(servicer, server): rpc_method_handlers = { 'GetConfig': grpc.unary_stream_rpc_method_handler( servicer.GetConfig, request_deserializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.ConfigGetArgs.FromString, response_serializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.ConfigGetReply.SerializeToString, ), 'MergeConfig': grpc.unary_unary_rpc_method_handler( servicer.MergeConfig, request_deserializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.ConfigArgs.FromString, response_serializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.ConfigReply.SerializeToString, ), 'DeleteConfig': grpc.unary_unary_rpc_method_handler( servicer.DeleteConfig, request_deserializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.ConfigArgs.FromString, response_serializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.ConfigReply.SerializeToString, ), 'ReplaceConfig': grpc.unary_unary_rpc_method_handler( servicer.ReplaceConfig, request_deserializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.ConfigArgs.FromString, response_serializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.ConfigReply.SerializeToString, ), 'CliConfig': grpc.unary_unary_rpc_method_handler( servicer.CliConfig, request_deserializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.CliConfigArgs.FromString, response_serializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.CliConfigReply.SerializeToString, ), 'CommitReplace': grpc.unary_unary_rpc_method_handler( servicer.CommitReplace, request_deserializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.CommitReplaceArgs.FromString, response_serializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.CommitReplaceReply.SerializeToString, ), 'CommitConfig': grpc.unary_unary_rpc_method_handler( servicer.CommitConfig, request_deserializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.CommitArgs.FromString, response_serializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.CommitReply.SerializeToString, ), 'ConfigDiscardChanges': grpc.unary_unary_rpc_method_handler( servicer.ConfigDiscardChanges, request_deserializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.DiscardChangesArgs.FromString, response_serializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.DiscardChangesReply.SerializeToString, ), 'GetOper': grpc.unary_stream_rpc_method_handler( servicer.GetOper, request_deserializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.GetOperArgs.FromString, response_serializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.GetOperReply.SerializeToString, ), 'CreateSubs': grpc.unary_stream_rpc_method_handler( servicer.CreateSubs, request_deserializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.CreateSubsArgs.FromString, response_serializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.CreateSubsReply.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'IOSXRExtensibleManagabilityService.gRPCConfigOper', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) class gRPCExecStub(object): """ Should we seperate Exec from Config/Oper? """ def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.ShowCmdTextOutput = channel.unary_stream( '/IOSXRExtensibleManagabilityService.gRPCExec/ShowCmdTextOutput', request_serializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.ShowCmdArgs.SerializeToString, response_deserializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.ShowCmdTextReply.FromString, ) self.ShowCmdJSONOutput = channel.unary_stream( '/IOSXRExtensibleManagabilityService.gRPCExec/ShowCmdJSONOutput', request_serializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.ShowCmdArgs.SerializeToString, response_deserializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.ShowCmdJSONReply.FromString, ) class gRPCExecServicer(object): """ Should we seperate Exec from Config/Oper? """ def ShowCmdTextOutput(self, request, context): """Exec commands """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def ShowCmdJSONOutput(self, request, context): # missing associated documentation comment in .proto file pass context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def add_gRPCExecServicer_to_server(servicer, server): rpc_method_handlers = { 'ShowCmdTextOutput': grpc.unary_stream_rpc_method_handler( servicer.ShowCmdTextOutput, request_deserializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.ShowCmdArgs.FromString, response_serializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.ShowCmdTextReply.SerializeToString, ), 'ShowCmdJSONOutput': grpc.unary_stream_rpc_method_handler( servicer.ShowCmdJSONOutput, request_deserializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.ShowCmdArgs.FromString, response_serializer=mdt__grpc__dialin_dot_mdt__grpc__dialin__pb2.ShowCmdJSONReply.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'IOSXRExtensibleManagabilityService.gRPCExec', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))
45.873134
113
0.784204
1,271
12,294
6.985051
0.09284
0.078847
0.146429
0.09011
0.840392
0.753323
0.753323
0.692611
0.689007
0.605767
0
0.004773
0.147877
12,294
267
114
46.044944
0.842688
0.073857
0
0.411168
1
0
0.13677
0.074586
0
0
0
0
0
1
0.081218
false
0.045685
0.010152
0
0.111675
0
0
0
0
null
0
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
9a581cf570d84751d46d8fdd511b7dac4ce2f4f5
263
py
Python
{{cookiecutter.project_name}}/{{cookiecutter.project_repo}}/{{cookiecutter.project_repo}}.py
TonyFlury/NewPythonProject
e101a563310cd0e1e7fda00d1cf7c8ff901791ff
[ "MIT" ]
1
2017-05-02T10:19:26.000Z
2017-05-02T10:19:26.000Z
{{cookiecutter.project_name}}/{{cookiecutter.project_repo}}/{{cookiecutter.project_repo}}.py
TonyFlury/NewPythonProject
e101a563310cd0e1e7fda00d1cf7c8ff901791ff
[ "MIT" ]
null
null
null
{{cookiecutter.project_name}}/{{cookiecutter.project_repo}}/{{cookiecutter.project_repo}}.py
TonyFlury/NewPythonProject
e101a563310cd0e1e7fda00d1cf7c8ff901791ff
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding=utf-8 """ # {{cookiecutter.project_repo}} : {{cookiecutter.project_desc}} Summary : {{cookiecutter.project_summary}} Use Case : {{cookiecutter.project_usecase}} Testable Statements : ... """ from . version import *
14.611111
63
0.669202
27
263
6.37037
0.740741
0.44186
0
0
0
0
0
0
0
0
0
0.004545
0.163498
263
17
64
15.470588
0.777273
0.855513
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
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
9a5dcc0e12ef300123bd6cf6f1f4f0dbe018aed5
144
py
Python
pydamain/domain/models/__init__.py
by-Exist/pydamain
40d90dbb2a854bc8286dfb5531754e4651097790
[ "MIT" ]
null
null
null
pydamain/domain/models/__init__.py
by-Exist/pydamain
40d90dbb2a854bc8286dfb5531754e4651097790
[ "MIT" ]
null
null
null
pydamain/domain/models/__init__.py
by-Exist/pydamain
40d90dbb2a854bc8286dfb5531754e4651097790
[ "MIT" ]
null
null
null
# type: ignore from dataclasses import field from .value_object import ValueObject from .entity import Entity from .aggregate import Aggregate
20.571429
37
0.826389
19
144
6.210526
0.578947
0
0
0
0
0
0
0
0
0
0
0
0.138889
144
6
38
24
0.951613
0.083333
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
7bd791b99350335540e8797f65cc67eb54417830
163
py
Python
tests/apps.py
Tinche/uapi
fc24e54fe25fcdafb5af2c24f2ba4b9407c3734b
[ "Apache-2.0" ]
7
2022-03-26T01:33:14.000Z
2022-03-27T15:30:18.000Z
tests/apps.py
Tinche/attrsapi
fc24e54fe25fcdafb5af2c24f2ba4b9407c3734b
[ "Apache-2.0" ]
3
2022-01-30T22:23:54.000Z
2022-02-02T13:59:23.000Z
tests/apps.py
Tinche/attrsapi
fc24e54fe25fcdafb5af2c24f2ba4b9407c3734b
[ "Apache-2.0" ]
null
null
null
from uapi import App def make_generic_subapp() -> App: app = App() @app.get("/subapp") def subapp() -> str: return "subapp" return app
13.583333
33
0.570552
21
163
4.333333
0.52381
0.197802
0.197802
0
0
0
0
0
0
0
0
0
0.294479
163
11
34
14.818182
0.791304
0
0
0
0
0
0.079755
0
0
0
0
0
0
1
0.285714
false
0
0.142857
0.142857
0.714286
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
1
0
0
0
1
1
0
0
5
7be854a3b344039b3aa03e5976d6c56eda8b7627
83
py
Python
Basic's/Practise/List2.py
Fahad-Hafeez/Python-Learning
c37f26e10c1d23f5277327c9bc474c19747f2b90
[ "Apache-2.0" ]
null
null
null
Basic's/Practise/List2.py
Fahad-Hafeez/Python-Learning
c37f26e10c1d23f5277327c9bc474c19747f2b90
[ "Apache-2.0" ]
null
null
null
Basic's/Practise/List2.py
Fahad-Hafeez/Python-Learning
c37f26e10c1d23f5277327c9bc474c19747f2b90
[ "Apache-2.0" ]
null
null
null
l = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] for i in l: if i % 2 == 0: print(i)
20.75
35
0.361446
21
83
1.428571
0.809524
0
0
0
0
0
0
0
0
0
0
0.265306
0.409639
83
4
36
20.75
0.346939
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.25
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
d03a1c39237bea77c5330ac16c0331ab71e115bf
19
py
Python
__init__.py
mobilerobot-io/rpid
a7706da96998c45afa5f169ecf615f8a80ec2cb5
[ "BSD-2-Clause" ]
null
null
null
__init__.py
mobilerobot-io/rpid
a7706da96998c45afa5f169ecf615f8a80ec2cb5
[ "BSD-2-Clause" ]
null
null
null
__init__.py
mobilerobot-io/rpid
a7706da96998c45afa5f169ecf615f8a80ec2cb5
[ "BSD-2-Clause" ]
null
null
null
# To make a module
9.5
18
0.684211
4
19
3.25
1
0
0
0
0
0
0
0
0
0
0
0
0.263158
19
1
19
19
0.928571
0.842105
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
d05397555411109892252c40f8a0ed8eda408d02
367
py
Python
app/utils/validations/__init__.py
Jajc09/sifco-api
ef1af2a48513695f7a7a5a82d0d96d1c256908f3
[ "MIT" ]
null
null
null
app/utils/validations/__init__.py
Jajc09/sifco-api
ef1af2a48513695f7a7a5a82d0d96d1c256908f3
[ "MIT" ]
null
null
null
app/utils/validations/__init__.py
Jajc09/sifco-api
ef1af2a48513695f7a7a5a82d0d96d1c256908f3
[ "MIT" ]
null
null
null
# rutas de las diferentes clases a ejecutar dentro de validations from app.utils.validations.get_cluster_validator import get_cluster_validator from app.utils.validations.get_code_validator import get_code_validator from app.utils.validations.get_rede_validator import get_rede_validator from app.utils.validations.get_approve_validator import get_approve_validator
52.428571
77
0.888283
54
367
5.740741
0.351852
0.090323
0.154839
0.296774
0.422581
0.33871
0
0
0
0
0
0
0.076294
367
7
78
52.428571
0.914454
0.171662
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
d05c0a1344b9e9eb4c88a3eafcd5f4182a7432ad
104
py
Python
BOJ/21000~21999/21300~21399/21301.py
shinkeonkim/today-ps
f3e5e38c5215f19579bb0422f303a9c18c626afa
[ "Apache-2.0" ]
2
2020-01-29T06:54:41.000Z
2021-11-07T13:23:27.000Z
BOJ/21000~21999/21300~21399/21301.py
shinkeonkim/Today_PS
bb0cda0ee1b9c57e1cfa38355e29d0f1c6167a44
[ "Apache-2.0" ]
null
null
null
BOJ/21000~21999/21300~21399/21301.py
shinkeonkim/Today_PS
bb0cda0ee1b9c57e1cfa38355e29d0f1c6167a44
[ "Apache-2.0" ]
null
null
null
from statistics import * print("COMFY" if stdev([*map(float,input().split())]) <= 1.0 else "NOT COMFY")
34.666667
78
0.663462
16
104
4.3125
0.9375
0
0
0
0
0
0
0
0
0
0
0.021739
0.115385
104
2
79
52
0.728261
0
0
0
0
0
0.134615
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
d0fcde81b92b1d87f70534102a847d82f4dec47f
30
py
Python
StarTradingCompany/SpaceStation.py
hculpan/StarTradingCompany
70f4ea42ad08253bdb9e26c770922883e44bdaa0
[ "MIT" ]
null
null
null
StarTradingCompany/SpaceStation.py
hculpan/StarTradingCompany
70f4ea42ad08253bdb9e26c770922883e44bdaa0
[ "MIT" ]
null
null
null
StarTradingCompany/SpaceStation.py
hculpan/StarTradingCompany
70f4ea42ad08253bdb9e26c770922883e44bdaa0
[ "MIT" ]
null
null
null
class SpaceStation: pass
7.5
19
0.7
3
30
7
1
0
0
0
0
0
0
0
0
0
0
0
0.266667
30
3
20
10
0.954545
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
efb83a17e6d839005acd002ab0e67e7806db2bc4
83
py
Python
util.py
gparadis/spades_ws3_dataInit
63bb0765aa3311e99392dd97d98fde043994dc27
[ "MIT" ]
null
null
null
util.py
gparadis/spades_ws3_dataInit
63bb0765aa3311e99392dd97d98fde043994dc27
[ "MIT" ]
null
null
null
util.py
gparadis/spades_ws3_dataInit
63bb0765aa3311e99392dd97d98fde043994dc27
[ "MIT" ]
null
null
null
def load_pickled_hdt(path): import pickle return pickle.load(open(path, 'rb'))
20.75
38
0.73494
13
83
4.538462
0.769231
0
0
0
0
0
0
0
0
0
0
0
0.13253
83
3
39
27.666667
0.819444
0
0
0
0
0
0.024096
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
5
efdf24b7132dec7882d4ecbe6b3abf3c289aa0fd
85
py
Python
src/python/zquantum/core/circuits/symbolic/__init__.py
TimWeaving/z-quantum-core
a47eb6e3b74958e4c7106ab5702cf1e19d39b14a
[ "Apache-2.0" ]
24
2020-04-15T17:36:59.000Z
2022-01-25T05:02:14.000Z
src/python/zquantum/core/circuits/symbolic/__init__.py
TimWeaving/z-quantum-core
a47eb6e3b74958e4c7106ab5702cf1e19d39b14a
[ "Apache-2.0" ]
177
2020-04-23T15:19:59.000Z
2022-03-30T18:06:17.000Z
src/python/zquantum/core/circuits/symbolic/__init__.py
TimWeaving/z-quantum-core
a47eb6e3b74958e4c7106ab5702cf1e19d39b14a
[ "Apache-2.0" ]
19
2020-06-24T10:56:02.000Z
2021-09-30T13:02:21.000Z
from ._sorting import natural_key, natural_key_fixed_names_order, natural_key_revlex
42.5
84
0.894118
13
85
5.230769
0.692308
0.441176
0
0
0
0
0
0
0
0
0
0
0.070588
85
1
85
85
0.860759
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
4bea72ef1647550f746932353c708ee90bff7037
3,324
py
Python
tests/core/test_urn.py
joshuataylor/great_expectations
19dcead43aef9a833b3aa894a1226714a80ab840
[ "Apache-2.0" ]
6,451
2017-09-11T16:32:53.000Z
2022-03-31T23:27:49.000Z
tests/core/test_urn.py
joshuataylor/great_expectations
19dcead43aef9a833b3aa894a1226714a80ab840
[ "Apache-2.0" ]
3,892
2017-09-08T18:57:50.000Z
2022-03-31T23:15:20.000Z
tests/core/test_urn.py
joshuataylor/great_expectations
19dcead43aef9a833b3aa894a1226714a80ab840
[ "Apache-2.0" ]
1,023
2017-09-08T15:22:05.000Z
2022-03-31T21:17:08.000Z
from urllib.parse import parse_qs import pytest from pyparsing import ParseException from great_expectations.core.urn import ge_urn def test_ge_validations_urn(): # We should be able to parse validations urns urn = ( "urn:great_expectations:validations:my_suite:expect_something.observed_value:query=s%20tring&query=" "string3&query2=string2" ) res = ge_urn.parseString(urn) assert res["urn_type"] == "validations" assert res["expectation_suite_name"] == "my_suite" assert res["metric_name"] == "expect_something.observed_value" kwargs_dict = parse_qs(res["metric_kwargs"]) assert kwargs_dict == {"query": ["s tring", "string3"], "query2": ["string2"]} # no kwargs is ok urn = "urn:great_expectations:validations:my_suite:expect_something.observed_value" res = ge_urn.parseString(urn) assert res["urn_type"] == "validations" assert res["expectation_suite_name"] == "my_suite" assert res["metric_name"] == "expect_something.observed_value" assert "metric_kwargs" not in res def test_ge_metrics_urn(): urn = "urn:great_expectations:metrics:20200403T1234.324Z:my_suite:expect_something.observed_value:column=mycol" res = ge_urn.parseString(urn) assert res["urn_type"] == "metrics" assert res["run_id"] == "20200403T1234.324Z" assert res["expectation_suite_name"] == "my_suite" assert res["metric_name"] == "expect_something.observed_value" kwargs_dict = parse_qs(res["metric_kwargs"]) assert kwargs_dict == {"column": ["mycol"]} # No kwargs is ok urn = "urn:great_expectations:metrics:20200403T1234.324Z:my_suite:expect_something.observed_value" res = ge_urn.parseString(urn) assert res["urn_type"] == "metrics" assert res["run_id"] == "20200403T1234.324Z" assert res["expectation_suite_name"] == "my_suite" assert res["metric_name"] == "expect_something.observed_value" assert "kwargs_dict" not in res def test_ge_stores_urn(): urn = "urn:great_expectations:stores:my_store:mymetric:kw=param" res = ge_urn.parseString(urn) assert res["urn_type"] == "stores" assert res["store_name"] == "my_store" assert res["metric_name"] == "mymetric" kwargs_dict = parse_qs(res["metric_kwargs"]) assert kwargs_dict == { "kw": ["param"], } # No kwargs is ok urn = "urn:great_expectations:stores:my_store:mymetric" res = ge_urn.parseString(urn) assert res["urn_type"] == "stores" assert res["store_name"] == "my_store" assert res["metric_name"] == "mymetric" assert "metric_kwargs" not in res def test_invalid_urn(): # Must start with "urn:great_expectations" with pytest.raises(ParseException) as e: ge_urn.parseString("not_a_ge_urn") assert "not_a_ge_urn" in e.value.line # Must have one of the recognized types with pytest.raises(ParseException) as e: ge_urn.parseString("urn:great_expectations:foo:bar:baz:bin:barg") assert "urn:great_expectations:foo:bar:baz:bin:barg" in e.value.line # Cannot have too many parts with pytest.raises(ParseException) as e: ge_urn.parseString( "urn:great_expectations:validations:foo:bar:baz:bin:barg:boo" ) assert "urn:great_expectations:validations:foo:bar:baz:bin:barg:boo" in e.value.line
35.361702
115
0.702166
450
3,324
4.948889
0.191111
0.080826
0.098788
0.100584
0.790301
0.787607
0.779075
0.779075
0.673103
0.6511
0
0.0247
0.171781
3,324
93
116
35.741935
0.784235
0.059266
0
0.523077
0
0
0.433152
0.290798
0
0
0
0
0.446154
1
0.061538
false
0
0.061538
0
0.123077
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
5
ef1ee50cbb4dc4ca621cdbe589911d5eb98177d2
2,020
py
Python
unittest/qm/inputWriterTest.py
faribas/RMG-Py
6149e29b642bf8da9537e2db98f15121f0e040c7
[ "MIT" ]
1
2021-11-15T10:30:48.000Z
2021-11-15T10:30:48.000Z
unittest/qm/inputWriterTest.py
faribas/RMG-Py
6149e29b642bf8da9537e2db98f15121f0e040c7
[ "MIT" ]
null
null
null
unittest/qm/inputWriterTest.py
faribas/RMG-Py
6149e29b642bf8da9537e2db98f15121f0e040c7
[ "MIT" ]
1
2019-02-22T01:16:13.000Z
2019-02-22T01:16:13.000Z
""" Created on May 23, 2012 @author: nmvdewie """ import time import unittest import rmgpy.qm.inputwriters as writers import os import rmgpy.qm.qmtp as qm import rmgpy.molecule as mol class Test(unittest.TestCase): def testMOPACInputWriter(self): """ Checks whether the .mop output file has been written based on the 3D coords file (.mol) """ name = 'WTARULDDTDQWMU-UHFFFAOYAW' inchi = 'InChI=1/C10H16/c1-7-4-5-8-6-9(7)10(8,2)3/h8-9H,1,4-6H2,2-3H3' directory = os.path.join(os.path.dirname(__file__), 'data','QMfiles','3DMolfiles') target_file = os.path.join(directory, name+'.mop') if os.path.exists(target_file): os.remove(target_file) molecule = mol.Molecule().fromInChI(inchi) mf = qm.molFile(molecule, name, directory) writer = writers.MOPACPM3InputWriter(mf, attemptNumber=1, multiplicity=1) writer.write() time.sleep(3)#otherwise assertion fails before the file is written! self.assertTrue(os.path.exists(target_file)) def testG03InputWriter(self): """ Checks whether the .gjf output file has been written based on the 3D coords file (.mol) """ name = 'WTARULDDTDQWMU-UHFFFAOYAW' inchi = 'InChI=1/C10H16/c1-7-4-5-8-6-9(7)10(8,2)3/h8-9H,1,4-6H2,2-3H3' directory = os.path.join(os.path.dirname(__file__), 'data','QMfiles','3DMolfiles') target_file = os.path.join(directory, name+'.gjf') if os.path.exists(target_file): os.remove(target_file) molecule = mol.Molecule().fromInChI(inchi) mf = qm.molFile(molecule, name, directory) writer = writers.GaussianPM3InputWriter(mf, attemptNumber=1, multiplicity=1) writer.write() time.sleep(3)#otherwise assertion fails before the file is written! self.assertTrue(os.path.exists(target_file)) if __name__ == "__main__": #import sys;sys.argv = ['', 'Test.testName'] unittest.main()
36.727273
95
0.64505
271
2,020
4.719557
0.332103
0.046912
0.031274
0.056294
0.722439
0.722439
0.722439
0.722439
0.722439
0.722439
0
0.047224
0.224257
2,020
55
96
36.727273
0.768985
0.182178
0
0.545455
0
0.060606
0.142768
0.10645
0
0
0
0
0.060606
1
0.060606
false
0
0.181818
0
0.272727
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
ef300959ea222ff138d5f5e8ef49c06b45f7d677
42
py
Python
aploader/views/__init__.py
WPMedia/politico-civic-ap-loader
a9642aaa88db9fd1afb070babafcfcb489466099
[ "MIT" ]
1
2019-09-22T20:08:04.000Z
2019-09-22T20:08:04.000Z
aploader/views/__init__.py
The-Politico/politico-civic-ap-loader
4afeebb62da4b8f22da63711e7176bf4527bccfb
[ "MIT" ]
5
2019-01-28T17:00:46.000Z
2021-05-09T19:28:43.000Z
aploader/views/__init__.py
WPMedia/politico-civic-ap-loader
a9642aaa88db9fd1afb070babafcfcb489466099
[ "MIT" ]
1
2019-01-28T15:10:00.000Z
2019-01-28T15:10:00.000Z
# flake8: noqa from .caller import Caller
14
26
0.761905
6
42
5.333333
0.833333
0
0
0
0
0
0
0
0
0
0
0.028571
0.166667
42
2
27
21
0.885714
0.285714
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
ef46923635910aa8b025da7980f9153b45fb33c4
100
py
Python
tests/file_templates.py
ezdac/raiden-service-bundle
9d8d55410c4829d71fc3855776d46d011453c280
[ "MIT" ]
3
2018-10-06T03:47:20.000Z
2019-05-31T22:26:45.000Z
tests/file_templates.py
ezdac/raiden-service-bundle
9d8d55410c4829d71fc3855776d46d011453c280
[ "MIT" ]
106
2019-11-12T09:15:18.000Z
2022-03-09T16:33:11.000Z
tests/file_templates.py
ezdac/raiden-service-bundle
9d8d55410c4829d71fc3855776d46d011453c280
[ "MIT" ]
13
2019-11-26T10:14:19.000Z
2021-01-18T15:08:46.000Z
USER_PRESENCE_TEMPLATE = '{"last_update": ${last_update}, "network_to_users": ${network_to_users}}'
50
99
0.76
13
100
5.230769
0.615385
0.294118
0.411765
0
0
0
0
0
0
0
0
0
0.06
100
1
100
100
0.723404
0
0
0
0
0
0.72
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
3238c22b0a9df4442247e41d46d072fcf6df41f1
2,041
py
Python
imapfw/drivers/imap.py
paralax/imapfw
740a4fed1a1de28e4134a115a1dd9c6e90e29ec1
[ "MIT" ]
492
2015-10-12T18:18:48.000Z
2022-02-14T11:46:46.000Z
imapfw/drivers/imap.py
paralax/imapfw
740a4fed1a1de28e4134a115a1dd9c6e90e29ec1
[ "MIT" ]
21
2015-11-10T00:49:07.000Z
2021-12-30T07:51:25.000Z
imapfw/drivers/imap.py
paralax/imapfw
740a4fed1a1de28e4134a115a1dd9c6e90e29ec1
[ "MIT" ]
40
2015-10-15T13:27:31.000Z
2021-12-30T07:52:24.000Z
# The MIT License (MIT). # Copyright (c) 2015, Nicolas Sebrecht & contributors. from imapfw.imap import Imap as ImapBackend from imapfw.interface import adapts, checkInterfaces from .driver import Driver, DriverInterface # Annotations. from imapfw.imap import SearchConditions, FetchAttributes from imapfw.types.folder import Folders, Folder from imapfw.types.message import Messages #TODO: remove "reverse" later: the DriverInterface must define all the # interfaces of this object. @checkInterfaces(reverse=False) @adapts(DriverInterface) class Imap(Driver): """The Imap driver, possibly redefined by the rascal.""" local = False def __init__(self, *args): super(Imap, self).__init__(*args) self.imap = ImapBackend(self.conf.get('backend')) def connect(self): host = self.conf.get('host') port = int(self.conf.get('port')) return self.imap.connect(host, port) def getCapability(self): return self.imap.getCapability() def getFolders(self) -> Folders: return self.imap.getFolders() def getMessages(self, messages: Messages, attributes: FetchAttributes) -> Messages: return self.imap.getMessages(messages, attributes) def getNamespace(self): return self.imap.getNamespace() def login(self) -> None: user = self.conf.get('username') password = self.conf.get('password') return self.imap.login(user, password) def logout(self) -> None: self.imap.logout() def searchUID(self, conditions: SearchConditions=SearchConditions()): return self.imap.searchUID(conditions) def select(self, folder: Folder) -> None: return self.imap.select(folder) #def append(self, server, mail): #response = server.append(mail) #return response #def update(self, server, mail): #response = server.update(mail) #return response #def fetch(self, server, uids): #response = server.fetch(uids) #return response
28.347222
73
0.674669
234
2,041
5.850427
0.34188
0.058437
0.081812
0.029218
0.040906
0
0
0
0
0
0
0.002497
0.215091
2,041
71
74
28.746479
0.85206
0.22685
0
0
0
0
0.019885
0
0
0
0
0.014085
0
1
0.277778
false
0.055556
0.166667
0.166667
0.722222
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
1
0
1
1
0
0
5
325007e8c9fed76f7a815fdda8a7e7ad27dec58a
139
py
Python
keepalive/types.py
madhavarshney/keepalive-service
06e211d570ebd323b65313b5b9c1c9942e894163
[ "MIT" ]
null
null
null
keepalive/types.py
madhavarshney/keepalive-service
06e211d570ebd323b65313b5b9c1c9942e894163
[ "MIT" ]
null
null
null
keepalive/types.py
madhavarshney/keepalive-service
06e211d570ebd323b65313b5b9c1c9942e894163
[ "MIT" ]
1
2021-06-10T17:25:54.000Z
2021-06-10T17:25:54.000Z
from typing import Dict, Any # TODO: strictly type the following Config = Dict[str, Any] Service = Dict[str, Any] State = Dict[str, bool]
19.857143
35
0.719424
22
139
4.545455
0.681818
0.21
0.2
0
0
0
0
0
0
0
0
0
0.172662
139
6
36
23.166667
0.869565
0.23741
0
0
0
0
0
0
0
0
0
0.166667
0
1
0
false
0
0.25
0
0.25
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
1
0
0
0
0
0
0
0
0
0
0
5
3251c998010402a33456582fc0b2ab4348a8404d
159
py
Python
recipes/pyannote.metrics/run_test.py
Walter-0/staged-recipes
c4fc8733ac723c0266440a7ed744c40578ce5d79
[ "BSD-3-Clause" ]
null
null
null
recipes/pyannote.metrics/run_test.py
Walter-0/staged-recipes
c4fc8733ac723c0266440a7ed744c40578ce5d79
[ "BSD-3-Clause" ]
2
2021-09-27T15:27:10.000Z
2022-01-12T17:18:24.000Z
recipes/pyannote.metrics/run_test.py
Walter-0/staged-recipes
c4fc8733ac723c0266440a7ed744c40578ce5d79
[ "BSD-3-Clause" ]
2
2021-09-14T11:23:33.000Z
2021-09-14T12:35:49.000Z
import multiprocessing as mp def main(): import pyannote import pyannote.metrics if __name__ == '__main__': mp.freeze_support() main()
13.25
28
0.660377
18
159
5.333333
0.666667
0.291667
0
0
0
0
0
0
0
0
0
0
0.251572
159
11
29
14.454545
0.806723
0
0
0
0
0
0.050314
0
0
0
0
0
0
1
0.142857
true
0
0.428571
0
0.571429
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
326d7f1fb65bebc66f2cb2bf2516c49c61216025
119
py
Python
yfantasy/__init__.py
MatthewMaclean/fantasy_hockey_util
1703d84cbf292b0c781675101eaec6a86f6833b2
[ "MIT" ]
null
null
null
yfantasy/__init__.py
MatthewMaclean/fantasy_hockey_util
1703d84cbf292b0c781675101eaec6a86f6833b2
[ "MIT" ]
null
null
null
yfantasy/__init__.py
MatthewMaclean/fantasy_hockey_util
1703d84cbf292b0c781675101eaec6a86f6833b2
[ "MIT" ]
null
null
null
VERSION = (0, 1) YFANTASY_MAIN = 'yfantasy' def get_package_version(): return '%s.%s' % (VERSION[0], VERSION[1])
17
45
0.638655
17
119
4.294118
0.588235
0.219178
0
0
0
0
0
0
0
0
0
0.040404
0.168067
119
6
46
19.833333
0.69697
0
0
0
0
0
0.109244
0
0
0
0
0
0
1
0.25
false
0
0
0.25
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
5
329a66431d844073e53ee19ea2768bdb68d2d490
246
py
Python
flask_hippocket/tests/test_apps/mapper/__init__.py
svieira/Flask-HipPocket
9b5c2733a7d500fb36632b0200a423ad5fa202b1
[ "MIT" ]
5
2015-04-03T22:11:22.000Z
2021-08-10T22:48:24.000Z
flask_hippocket/tests/test_apps/mapper/__init__.py
svieira/Flask-HipPocket
9b5c2733a7d500fb36632b0200a423ad5fa202b1
[ "MIT" ]
null
null
null
flask_hippocket/tests/test_apps/mapper/__init__.py
svieira/Flask-HipPocket
9b5c2733a7d500fb36632b0200a423ad5fa202b1
[ "MIT" ]
3
2016-11-02T04:11:36.000Z
2021-06-01T08:30:17.000Z
from flask import url_for def mapper_index(): return "Mapper Index Page" def overridden_endpoint(): return "The url for url_for('endpoint_name') is " + url_for("endpoint_name") def post_only(): return "Only accessible via POST"
17.571429
80
0.715447
36
246
4.666667
0.527778
0.142857
0.166667
0.214286
0
0
0
0
0
0
0
0
0.186992
246
13
81
18.923077
0.84
0
0
0
0
0
0.382114
0.097561
0
0
0
0
0
1
0.428571
true
0
0.142857
0.428571
1
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
1
1
0
0
5
08da048246133177f87064c606b772c1bcddd98a
278
py
Python
Mycoffee/dome2/views.py
AbderrhmanAbdellatif/MyCoffee
01563ccd1881caea605391fb813b7d0f2f59be02
[ "MIT" ]
null
null
null
Mycoffee/dome2/views.py
AbderrhmanAbdellatif/MyCoffee
01563ccd1881caea605391fb813b7d0f2f59be02
[ "MIT" ]
null
null
null
Mycoffee/dome2/views.py
AbderrhmanAbdellatif/MyCoffee
01563ccd1881caea605391fb813b7d0f2f59be02
[ "MIT" ]
null
null
null
from django.http import request from django.shortcuts import render from django.http import HttpResponse # Create your views here. def index(request): return HttpResponse('<h1>index form dome2</h1>') def my1(request): return HttpResponse('<h1>my1 form dome2</h1>')
27.8
52
0.744604
39
278
5.307692
0.487179
0.144928
0.135266
0.193237
0
0
0
0
0
0
0
0.033898
0.151079
278
10
53
27.8
0.84322
0.082734
0
0
0
0
0.188976
0
0
0
0
0
0
1
0.285714
false
0
0.428571
0.285714
1
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
5
3ea1634b5077da8b2f699e5319c384c2d49cc0f1
568
py
Python
txweb/tests/test_util_basic_sanitize_render_output.py
devdave/txWeb
e447fbefd16134cb2f83323c04c20c41638d7da3
[ "MIT" ]
null
null
null
txweb/tests/test_util_basic_sanitize_render_output.py
devdave/txWeb
e447fbefd16134cb2f83323c04c20c41638d7da3
[ "MIT" ]
4
2020-11-03T19:59:05.000Z
2021-06-02T03:22:25.000Z
txweb/tests/test_util_basic_sanitize_render_output.py
devdave/txWeb
e447fbefd16134cb2f83323c04c20c41638d7da3
[ "MIT" ]
null
null
null
import pytest from txweb.util.basic import sanitize_render_output from twisted.web.server import NOT_DONE_YET from twisted.internet.defer import Deferred def test_full_suite_coverage(): assert sanitize_render_output("Foo") == b"Foo" assert sanitize_render_output(b"Foo") == b"Foo" with pytest.raises(RuntimeError): assert sanitize_render_output(("Foo",)) assert sanitize_render_output(NOT_DONE_YET) == NOT_DONE_YET d = Deferred() assert sanitize_render_output(d) == NOT_DONE_YET assert sanitize_render_output(123) == b"123"
25.818182
63
0.753521
80
568
5.0375
0.3875
0.243176
0.347395
0.387097
0.280397
0
0
0
0
0
0
0.012474
0.153169
568
22
64
25.818182
0.825364
0
0
0
0
0
0.03169
0
0
0
0
0
0.461538
1
0.076923
false
0
0.307692
0
0.384615
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
1
0
0
0
0
5
f5f116992789384aeb382b07a925d202b35b09af
1,638
py
Python
Concat_fac_files/concat_fac_pubs.py
ScilifelabDataCentre/IAB_2021
cefe4fd46a9c8865d868bd05b60a1bb32deebda0
[ "MIT" ]
null
null
null
Concat_fac_files/concat_fac_pubs.py
ScilifelabDataCentre/IAB_2021
cefe4fd46a9c8865d868bd05b60a1bb32deebda0
[ "MIT" ]
null
null
null
Concat_fac_files/concat_fac_pubs.py
ScilifelabDataCentre/IAB_2021
cefe4fd46a9c8865d868bd05b60a1bb32deebda0
[ "MIT" ]
null
null
null
"""Script designed to concatenate files from publications database for required years""" import pandas as pd # Import years 2013-2020 (for 2021 years of interest) fac_2013 = pd.read_excel( "INSERT DATA FILE NAME.xlsx", sheet_name="Publications", header=0, engine="openpyxl", keep_default_na=False, ) fac_2014 = pd.read_excel( "INSERT DATA FILE NAME.xlsx", sheet_name="Publications", header=0, engine="openpyxl", keep_default_na=False, ) fac_2015 = pd.read_excel( "INSERT DATA FILE NAME.xlsx", sheet_name="Publications", header=0, engine="openpyxl", keep_default_na=False, ) fac_2016 = pd.read_excel( "INSERT DATA FILE NAME.xlsx", sheet_name="Publications", header=0, engine="openpyxl", keep_default_na=False, ) fac_2017 = pd.read_excel( "INSERT DATA FILE NAME.xlsx", sheet_name="Publications", header=0, engine="openpyxl", keep_default_na=False, ) fac_2018 = pd.read_excel( "INSERT DATA FILE NAME.xlsx", sheet_name="Publications", header=0, engine="openpyxl", keep_default_na=False, ) fac_2019 = pd.read_excel( "INSERT DATA FILE NAME.xlsx", sheet_name="Publications", header=0, engine="openpyxl", keep_default_na=False, ) fac_2020 = pd.read_excel( "INSERT DATA FILE NAME.xlsx", sheet_name="Publications", header=0, engine="openpyxl", keep_default_na=False, ) # concatenate years together Fac_13to20 = pd.concat( [fac_2013, fac_2014, fac_2015, fac_2016, fac_2017, fac_2018, fac_2019, fac_2020] ) # Write out to excel Fac_13to20.to_excel("Facilities_20210419.xlsx")
21.272727
84
0.690476
226
1,638
4.774336
0.221239
0.044486
0.081557
0.126043
0.70899
0.70899
0.70899
0.70899
0.70899
0.70899
0
0.075643
0.192918
1,638
76
85
21.552632
0.740545
0.110501
0
0.655738
0
0
0.270531
0.016563
0
0
0
0
0
1
0
false
0
0.016393
0
0.016393
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
f5faa095771dd77594cb698a96b5bfd95d25da36
27
py
Python
microscoper/__main__.py
LeeKamentsky/microscoper
74a488a33d4b971a0df8706400338cb969c2396b
[ "MIT" ]
7
2019-01-11T21:18:09.000Z
2021-10-12T08:04:31.000Z
microscoper/__main__.py
LeeKamentsky/microscoper
74a488a33d4b971a0df8706400338cb969c2396b
[ "MIT" ]
5
2017-07-25T23:09:12.000Z
2020-07-22T13:46:41.000Z
microscoper/__main__.py
LeeKamentsky/microscoper
74a488a33d4b971a0df8706400338cb969c2396b
[ "MIT" ]
6
2018-01-23T10:33:44.000Z
2021-03-16T20:36:38.000Z
from .io import run run()
6.75
19
0.666667
5
27
3.6
0.8
0
0
0
0
0
0
0
0
0
0
0
0.222222
27
3
20
9
0.857143
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
eb087765701c86607df93d3a24e7d8b360ecd801
10,464
py
Python
psydac/mapping/tests/test_discrete_mapping.py
pyccel/spl
e3a799b6791807e71660dac72324b22593804cb6
[ "MIT" ]
5
2018-03-13T13:50:26.000Z
2018-12-22T14:04:11.000Z
psydac/mapping/tests/test_discrete_mapping.py
pyccel/spl
e3a799b6791807e71660dac72324b22593804cb6
[ "MIT" ]
3
2019-02-08T13:29:47.000Z
2019-03-06T17:23:08.000Z
psydac/mapping/tests/test_discrete_mapping.py
pyccel/spl
e3a799b6791807e71660dac72324b22593804cb6
[ "MIT" ]
1
2018-12-15T09:55:12.000Z
2018-12-15T09:55:12.000Z
import os import pytest import numpy as np import h5py as h5 from sympde.topology import Domain from igakit.cad import circle, ruled from psydac.api.discretization import discretize from psydac.core.bsplines import cell_index from psydac.fem.tensor import TensorFemSpace from psydac.fem.splines import SplineSpace from psydac.mapping.discrete import NurbsMapping from psydac.utilities.utils import refine_array_1d try: mesh_dir = os.environ['PSYDAC_MESH_DIR'] except KeyError: base_dir = os.path.dirname(os.path.realpath(__file__)) base_dir = os.path.join(base_dir, '..', '..', '..') mesh_dir = os.path.join(base_dir, 'mesh') # Tolerance for testing float equality RTOL = 1e-15 ATOL = 1e-15 @pytest.mark.parametrize('geometry_file', ['collela_3d.h5', 'collela_2d.h5', 'bent_pipe.h5']) @pytest.mark.parametrize('npts_per_cell', [2, 3, 4]) def test_build_mesh_reg(geometry_file, npts_per_cell): filename = os.path.join(mesh_dir, geometry_file) domain = Domain.from_file(filename) domainh = discretize(domain, filename=filename) for mapping in domainh.mappings.values(): space = mapping.space grid = [refine_array_1d(space.breaks[i], npts_per_cell - 1, remove_duplicates=False) for i in range(mapping.ldim)] x_mesh, y_mesh, z_mesh = mapping.build_mesh(grid, npts_per_cell=npts_per_cell) if mapping.ldim == 2: eta1, eta2 = grid pcoords = np.array([[mapping(e1, e2) for e2 in eta2] for e1 in eta1]) x_mesh_l = pcoords[..., 0:1] y_mesh_l = pcoords[..., 1:2] z_mesh_l = np.zeros_like(x_mesh_l) elif mapping.ldim == 3: eta1, eta2, eta3 = grid pcoords = np.array([[[mapping(e1, e2, e3) for e3 in eta3] for e2 in eta2] for e1 in eta1]) x_mesh_l = pcoords[..., 0] y_mesh_l = pcoords[..., 1] z_mesh_l = pcoords[..., 2] else: assert False assert x_mesh.flags['C_CONTIGUOUS'] and y_mesh.flags['C_CONTIGUOUS'] and z_mesh.flags['C_CONTIGUOUS'] assert np.allclose(x_mesh, x_mesh_l, atol=ATOL, rtol=RTOL) assert np.allclose(y_mesh, y_mesh_l, atol=ATOL, rtol=RTOL) assert np.allclose(z_mesh, z_mesh_l, atol=ATOL, rtol=RTOL) @pytest.mark.parametrize('geometry_file', ['collela_3d.h5', 'collela_2d.h5', 'bent_pipe.h5']) @pytest.mark.parametrize('npts_i', [2, 5, 10, 25]) def test_build_mesh_i(geometry_file, npts_i): filename = os.path.join(mesh_dir, geometry_file) domain = Domain.from_file(filename) domainh = discretize(domain, filename=filename) for mapping in domainh.mappings.values(): space = mapping.space grid = [np.linspace(space.breaks[i][0], space.breaks[i][-1], npts_i) for i in range(mapping.ldim)] x_mesh, y_mesh, z_mesh = mapping.build_mesh(grid) if mapping.ldim == 2: eta1, eta2 = grid pcoords = np.array([[mapping(e1, e2) for e2 in eta2] for e1 in eta1]) x_mesh_l = pcoords[..., 0:1] y_mesh_l = pcoords[..., 1:2] z_mesh_l = np.zeros_like(x_mesh_l) elif mapping.ldim == 3: eta1, eta2, eta3 = grid pcoords = np.array([[[mapping(e1, e2, e3) for e3 in eta3] for e2 in eta2] for e1 in eta1]) x_mesh_l = pcoords[..., 0] y_mesh_l = pcoords[..., 1] z_mesh_l = pcoords[..., 2] else: assert False assert x_mesh.flags['C_CONTIGUOUS'] and y_mesh.flags['C_CONTIGUOUS'] and z_mesh.flags['C_CONTIGUOUS'] assert np.allclose(x_mesh, x_mesh_l, atol=ATOL, rtol=RTOL) assert np.allclose(y_mesh, y_mesh_l, atol=ATOL, rtol=RTOL) assert np.allclose(z_mesh, z_mesh_l, atol=ATOL, rtol=RTOL) @pytest.mark.parallel @pytest.mark.parametrize('geometry', ['collela_3d.h5', 'collela_2d.h5', 'bent_pipe.h5']) @pytest.mark.parametrize('npts_per_cell', [2, 3, 4, 6]) def test_parallel_jacobians_regular(geometry, npts_per_cell): from mpi4py import MPI comm = MPI.COMM_WORLD rank = comm.Get_rank() filename = os.path.join(mesh_dir, geometry) domain = Domain.from_file(filename=filename) domainh = discretize(domain, filename=filename, comm=comm) mapping = list(domainh.mappings.values())[0] space = mapping.space # Regular tensor grid. grid_reg = [refine_array_1d(space.breaks[i], npts_per_cell - 1, False) for i in range(space.ldim)] npts_per_cell = [npts_per_cell] * space.ldim jacobian_matrix_p = mapping.jac_mat_grid(grid_reg, npts_per_cell=npts_per_cell) inv_jacobian_matrix_p = mapping.inv_jac_mat_grid(grid_reg, npts_per_cell=npts_per_cell) jacobian_determinants_p = mapping.jac_det_grid(grid_reg, npts_per_cell=npts_per_cell) starts, ends = space.local_domain actual_starts = tuple(npts_per_cell[0] * s for s in starts) actual_ends = tuple(npts_per_cell[0] * (e + 1) for e in ends) index = tuple(slice(s, e, 1) for s,e in zip(actual_starts, actual_ends)) shape_0 = tuple(len(grid_reg[i]) for i in range(space.ldim)) + (space.ldim, space.ldim) shape_1 = tuple(len(grid_reg[i]) for i in range(space.ldim)) # Saving in an hdf5 file to compare on root fh5 = h5.File(f'result_parallel.h5', mode='w', driver='mpio', comm=comm) fh5.create_dataset('jac_mat', shape=shape_0, dtype=float) fh5.create_dataset('inv_jac', shape=shape_0, dtype=float) fh5.create_dataset('jac_dets', shape=shape_1, dtype=float) fh5['jac_mat'][index] = jacobian_matrix_p fh5['inv_jac'][index] = inv_jacobian_matrix_p fh5['jac_dets'][index] = jacobian_determinants_p fh5.close() # Check if rank == 0: domainh = discretize(domain, filename=filename, comm=None) mapping = list(domainh.mappings.values())[0] space = mapping.space jacobian_matrix = mapping.jac_mat_grid(grid_reg, npts_per_cell=npts_per_cell) inv_jacobian_matrix = mapping.inv_jac_mat_grid(grid_reg, npts_per_cell=npts_per_cell) jacobian_determinants = mapping.jac_det_grid(grid_reg, npts_per_cell=npts_per_cell) fh5 = h5.File(f'result_parallel.h5', mode='r') jac_mat_par = fh5['jac_mat'][...] inv_jac_mat_par = fh5['inv_jac'][...] jac_dets_par = fh5['jac_dets'][...] assert np.allclose(jac_mat_par, jacobian_matrix, atol=ATOL, rtol=RTOL) assert np.allclose(inv_jac_mat_par, inv_jacobian_matrix, atol=ATOL, rtol=RTOL) assert np.allclose(jac_dets_par, jacobian_determinants, atol=ATOL, rtol=RTOL) fh5.close() os.remove('result_parallel.h5') @pytest.mark.parallel @pytest.mark.parametrize('geometry', ['collela_3d.h5', 'collela_2d.h5', 'bent_pipe.h5']) @pytest.mark.parametrize('npts_irregular', [2, 5, 10, 25]) def test_parallel_jacobians_irregular(geometry, npts_irregular): from mpi4py import MPI comm = MPI.COMM_WORLD rank = comm.Get_rank() filename = os.path.join(mesh_dir, geometry) domain = Domain.from_file(filename=filename) domainh = discretize(domain, filename=filename, comm=comm) mapping = list(domainh.mappings.values())[0] space = mapping.space # Irregular tensor grid grid_i = [np.linspace(space.breaks[i][0], space.breaks[i][-1], npts_irregular, True) for i in range(space.ldim)] jacobian_matrix_p = mapping.jac_mat_grid(grid_i) inv_jacobian_matrix_p = mapping.inv_jac_mat_grid(grid_i) jacobian_determinants_p = mapping.jac_det_grid(grid_i) cell_indexes = [cell_index(space.breaks[i], grid_i[i]) for i in range(space.ldim)] starts, ends = space.local_domain actual_starts = tuple(np.searchsorted(cell_indexes[i], starts[i], side='left') for i in range(space.ldim)) actual_ends = tuple(np.searchsorted(cell_indexes[i], ends[i], side='right') for i in range(space.ldim)) index = tuple(slice(s, e, 1) for s,e in zip(actual_starts, actual_ends)) shape_0 = tuple(len(grid_i[i]) for i in range(space.ldim)) + (space.ldim, space.ldim) shape_1 = tuple(len(grid_i[i]) for i in range(space.ldim)) # Saving in an hdf5 file to compare on root fh5 = h5.File(f'result_parallel.h5', mode='w', driver='mpio', comm=comm) fh5.create_dataset('jac_mat', shape=shape_0, dtype=float) fh5.create_dataset('inv_jac', shape=shape_0, dtype=float) fh5.create_dataset('jac_dets', shape=shape_1, dtype=float) fh5['jac_mat'][index] = jacobian_matrix_p fh5['inv_jac'][index] = inv_jacobian_matrix_p fh5['jac_dets'][index] = jacobian_determinants_p fh5.close() # Check if rank == 0: domainh = discretize(domain, filename=filename, comm=None) mapping = list(domainh.mappings.values())[0] space = mapping.space jacobian_matrix = mapping.jac_mat_grid(grid_i) inv_jacobian_matrix = mapping.inv_jac_mat_grid(grid_i) jacobian_determinants = mapping.jac_det_grid(grid_i) fh5 = h5.File(f'result_parallel.h5', mode='r') jac_mat_par = fh5['jac_mat'][...] inv_jac_mat_par = fh5['inv_jac'][...] jac_dets_par = fh5['jac_dets'][...] assert np.allclose(jac_mat_par, jacobian_matrix, atol=ATOL, rtol=RTOL) assert np.allclose(inv_jac_mat_par, inv_jacobian_matrix, atol=ATOL, rtol=RTOL) assert np.allclose(jac_dets_par, jacobian_determinants, atol=ATOL, rtol=RTOL) fh5.close() os.remove('result_parallel.h5') def test_nurbs_circle(): rmin, rmax = 0.2, 1 c1, c2 = 0, 0 # Igakit c_ext = circle(radius=rmax, center=(c1, c2)) c_int = circle(radius=rmin, center=(c1, c2)) disk = ruled(c_ext, c_int).transpose() w = disk.weights k = disk.knots control = disk.points d = disk.degree # Psydac spaces = [SplineSpace(degree, knot) for degree, knot in zip(d, k)] T = TensorFemSpace(*spaces) mapping = NurbsMapping.from_control_points_weights(T, control_points=control[..., :2], weights=w) x1_pts = np.linspace(0, 1, 10) x2_pts = np.linspace(0, 1, 10) for x2 in x2_pts: for x1 in x1_pts: x_p, y_p = mapping(x1, x2) x_i, y_i, z_i = disk(x1, x2) assert np.allclose((x_p, y_p), (x_i, y_i), atol=ATOL, rtol=RTOL) J_p = mapping.jac_mat(x1, x2) J_i = disk.gradient(u=x1, v=x2) assert np.allclose(J_i[:2], J_p, atol=ATOL, rtol=RTOL)
34.76412
122
0.663513
1,597
10,464
4.10645
0.128366
0.025618
0.040256
0.034157
0.795059
0.78896
0.753278
0.742757
0.726136
0.70921
0
0.02535
0.208333
10,464
300
123
34.88
0.766296
0.018062
0
0.594872
0
0
0.058256
0
0
0
0
0
0.092308
1
0.025641
false
0
0.071795
0
0.097436
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
eb0e5a501806f26072c8ab484e1c8ad8ee8f2cd0
36
py
Python
python/testData/mover/lastLine.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/mover/lastLine.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/mover/lastLine.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
print "first" print "second"<caret>
12
21
0.722222
5
36
5.2
0.8
0
0
0
0
0
0
0
0
0
0
0
0.111111
36
3
21
12
0.8125
0
0
0
0
0
0.297297
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
1
0
5
de4694f83e9ab67f6fae970cff8a1dd12ddf7785
145
py
Python
Lib/site-packages/wagtail/utils/l18n/__init__.py
nateonmission/nateonmission.com
c7c5078ca2160fa97cb6cdc0497438547f82ae41
[ "bzip2-1.0.6" ]
1
2021-06-03T21:57:32.000Z
2021-06-03T21:57:32.000Z
env/lib/python3.9/site-packages/l18n/__init__.py
febycloud/wagtail_project_demo
0a72f112133423b08c1a149d527f3366cfad198f
[ "MIT" ]
4
2021-03-19T00:33:36.000Z
2022-03-11T23:47:17.000Z
env/lib/python3.9/site-packages/l18n/__init__.py
febycloud/wagtail_project_demo
0a72f112133423b08c1a149d527f3366cfad198f
[ "MIT" ]
null
null
null
from .version import __version__, __version_info__ from .maps import tz_cities, tz_fullnames, territories from .translation import set_language
29
54
0.848276
19
145
5.842105
0.631579
0
0
0
0
0
0
0
0
0
0
0
0.110345
145
4
55
36.25
0.860465
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
de49e17f7df01aba10b7b2e8d3697ac470247561
199
py
Python
recommend/admin.py
xiaolancara/cara_movie_recommender
425168ffc2dc34e89cb29a1617e6b4390111b95a
[ "MIT" ]
null
null
null
recommend/admin.py
xiaolancara/cara_movie_recommender
425168ffc2dc34e89cb29a1617e6b4390111b95a
[ "MIT" ]
null
null
null
recommend/admin.py
xiaolancara/cara_movie_recommender
425168ffc2dc34e89cb29a1617e6b4390111b95a
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Movie, UserRating, UserList # Register your models here. admin.site.register(Movie) admin.site.register(UserRating) admin.site.register(UserList)
28.428571
47
0.819095
27
199
6.037037
0.481481
0.165644
0.312883
0
0
0
0
0
0
0
0
0
0.090452
199
7
48
28.428571
0.900552
0.130653
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
de5953a24d815b564dc4d31896f3648e926880be
43
py
Python
remote/__main__.py
rubbieKelvin/Tars
2085a92a98e59bac64ad568510b66819bd3cc362
[ "MIT" ]
null
null
null
remote/__main__.py
rubbieKelvin/Tars
2085a92a98e59bac64ad568510b66819bd3cc362
[ "MIT" ]
null
null
null
remote/__main__.py
rubbieKelvin/Tars
2085a92a98e59bac64ad568510b66819bd3cc362
[ "MIT" ]
null
null
null
from . import Remote t = Remote() t.run()
8.6
20
0.627907
7
43
3.857143
0.714286
0.518519
0
0
0
0
0
0
0
0
0
0
0.209302
43
4
21
10.75
0.794118
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
1
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
de9008f164072d7110cd618d74495ec5f728186b
75
py
Python
ultron/extensions/fc_ping/__init__.py
Luvlymangos/Ultron
559a565e8479dd5d75edc21ddd21b67d1c3095e9
[ "MIT" ]
null
null
null
ultron/extensions/fc_ping/__init__.py
Luvlymangos/Ultron
559a565e8479dd5d75edc21ddd21b67d1c3095e9
[ "MIT" ]
null
null
null
ultron/extensions/fc_ping/__init__.py
Luvlymangos/Ultron
559a565e8479dd5d75edc21ddd21b67d1c3095e9
[ "MIT" ]
null
null
null
from .fc_ping import FCPing def setup(bot): bot.add_cog(FCPing(bot))
12.5
28
0.706667
13
75
3.923077
0.769231
0
0
0
0
0
0
0
0
0
0
0
0.173333
75
5
29
15
0.822581
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
5
deed7334e090639435cb45e62a9b4729775fcd79
60
py
Python
djmoney/forms/__init__.py
toudi/django-money
44878b26f05351a55ec97d2b437de48875ea6cee
[ "BSD-3-Clause" ]
null
null
null
djmoney/forms/__init__.py
toudi/django-money
44878b26f05351a55ec97d2b437de48875ea6cee
[ "BSD-3-Clause" ]
null
null
null
djmoney/forms/__init__.py
toudi/django-money
44878b26f05351a55ec97d2b437de48875ea6cee
[ "BSD-3-Clause" ]
null
null
null
# coding=utf-8 from .fields import * from .widgets import *
15
22
0.716667
9
60
4.777778
0.777778
0
0
0
0
0
0
0
0
0
0
0.02
0.166667
60
3
23
20
0.84
0.2
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
def1c69fd698d65df3534def3d426a65ccb9d1c8
218
py
Python
rotating_stars/qt/__init__.py
pierrebai/RotatingStars
062b7328a3b0f25f2a043dbec6d803d8425f8e9b
[ "MIT" ]
null
null
null
rotating_stars/qt/__init__.py
pierrebai/RotatingStars
062b7328a3b0f25f2a043dbec6d803d8425f8e9b
[ "MIT" ]
null
null
null
rotating_stars/qt/__init__.py
pierrebai/RotatingStars
062b7328a3b0f25f2a043dbec6d803d8425f8e9b
[ "MIT" ]
null
null
null
# Ignore errors when importing these in case the Qt5 packages are not installed. try: from .step_scene_animator import step_scene_animator #from .anim_scene_animator import anim_scene_animator except: pass
31.142857
80
0.798165
32
218
5.1875
0.6875
0.313253
0.204819
0
0
0
0
0
0
0
0
0.005525
0.169725
218
6
81
36.333333
0.911602
0.59633
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.25
0.25
0
0.25
0
0
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
1
1
0
0
0
0
0
5
7239f9e5f3868517adafae6d124bf129a1964ccb
85
py
Python
juego/__init__.py
alejomongua/parquesBackend
5170f11b83d49944a16bfcd5928b1b2098562f02
[ "MIT" ]
1
2020-11-01T01:26:53.000Z
2020-11-01T01:26:53.000Z
juego/__init__.py
alejomongua/parquesBackend
5170f11b83d49944a16bfcd5928b1b2098562f02
[ "MIT" ]
null
null
null
juego/__init__.py
alejomongua/parquesBackend
5170f11b83d49944a16bfcd5928b1b2098562f02
[ "MIT" ]
1
2020-10-14T21:35:33.000Z
2020-10-14T21:35:33.000Z
"""Módulo donde se guardan todas las clases para el juego""" from .game import Game
21.25
60
0.741176
14
85
4.5
0.928571
0
0
0
0
0
0
0
0
0
0
0
0.176471
85
3
61
28.333333
0.9
0.635294
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
a0ed3fdd254368dbc2825ddbf90c8f86ca9a6289
208
py
Python
bankaccounts/exceptions.py
danlannz/example-fastapi
5b7d5d2bc6e02ace55b063e7749d9ca947b2c4c5
[ "BSD-3-Clause" ]
17
2021-07-23T16:41:28.000Z
2022-03-13T17:14:03.000Z
bankaccounts/exceptions.py
danlannz/example-fastapi
5b7d5d2bc6e02ace55b063e7749d9ca947b2c4c5
[ "BSD-3-Clause" ]
1
2021-08-30T22:16:32.000Z
2021-08-30T22:16:32.000Z
bankaccounts/exceptions.py
danlannz/example-fastapi
5b7d5d2bc6e02ace55b063e7749d9ca947b2c4c5
[ "BSD-3-Clause" ]
1
2021-08-24T23:16:39.000Z
2021-08-24T23:16:39.000Z
class AccountNotFoundError(Exception): pass class TransactionError(Exception): pass class AccountClosedError(TransactionError): pass class InsufficientFundsError(TransactionError): pass
13.866667
47
0.778846
16
208
10.125
0.4375
0.166667
0.222222
0
0
0
0
0
0
0
0
0
0.163462
208
14
48
14.857143
0.931034
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
1
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
1
0
0
0
0
0
5
9d019043f3db8acc876fdf1f9188b473dcbb1ba7
3,494
py
Python
scratch/msg_parse.py
jgeofil/avax-python
b09e78e3d7e1c35db5ae42e3918e960e775f2d45
[ "MIT" ]
25
2021-05-16T23:43:47.000Z
2022-03-29T03:08:30.000Z
scratch/msg_parse.py
zefonseca/ava-python
9c72af7c720edfab9c73379a102cf6a11d864ebd
[ "MIT" ]
2
2021-04-26T11:43:22.000Z
2021-06-04T07:55:22.000Z
scratch/msg_parse.py
jgeofil/avax-python
b09e78e3d7e1c35db5ae42e3918e960e775f2d45
[ "MIT" ]
4
2021-08-06T10:55:58.000Z
2022-03-29T08:03:05.000Z
#!/usr/bin/python3 # avax-python : Python tools for the exploration of the Avalanche AVAX network. # # Find tutorials and use cases at https://crypto.bi """ Copyright (C) 2021 - crypto.bi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- Help support this Open Source project! Donations address: X-avax1qr6yzjykcjmeflztsgv6y88dl0xnlel3chs3r4 Thank you! """ # --#--#-- from avaxpython.network.codec import Codec from avaxpython.utils.wrappers.Packer import Packer from avaxpython.network.Messages import Messages from avaxpython.network.Op import Op messages = [ [0x01, 0x00, 0x00, 0x00, 0x01, 0xf7, 0xcb, 0xfb, 0xc5, 0x00, 0x00, 0x00, 0x00, 0x60, 0x64, 0x65, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc0, 0xa8, 0x01, 0xf1, 0x25, 0xb3, 0x00, 0x0f, 0x61, 0x76, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x2f, 0x31, 0x2e, 0x33, 0x2e, 0x31], bytearray.fromhex('0d0427d4b22a2a78bcddd456742caf91b56badbff985ee19aef14573e7343fd652ffffffff2ccf6bab9890026b5646b2266b2a12b995d08cdc31f87af05207bd48458ab48000000295f90292f9021aa08ec445d627f07413218ba7a086fd7a1d7d512e898a1adf6a51de010b6bd9b9c3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940100000000000000000000000000000000000000a0c191253eb7fef0caf14d934abee3b186a27c4ebabcdb2324790a9a195cd2ed01a042832900dc345daeb36f6b84879c94abdd619c1e532feb3ec3c5a3871be03c70a0056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001830d4264837a1200825208846064967f80a00000000000000000000000000000000000000000000000000000000000000000880000000000000000a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421f870f86e80856d6e2edc008252089427854a16ab3154fb8d8c52fdba67063ec86f5072872386f26fc1000080830150f8a02f456012877664d75995a6ee397f23c4cd3a9e17c35eaa01f9549e7918fc4ceea007fe8345b396e371686330ea2fd9d7fbf05692332d61a4666e6ed5edba2cdac1c08080'), ] for msg_bytes in messages: parsed_msg = Codec.Parse(bytes(msg_bytes)) print(parsed_msg)
77.644444
1,495
0.855753
300
3,494
9.953333
0.543333
0.037508
0.044206
0.042867
0.013396
0.013396
0.013396
0.013396
0.013396
0
0
0.418945
0.099599
3,494
44
1,496
79.409091
0.530197
0.380939
0
0
0
0
0.683745
0.683745
0
1
0.096879
0
0
1
0
false
0
0.235294
0
0.235294
0.058824
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
1
1
null
1
0
0
0
0
0
0
0
0
0
0
0
0
5
9d019d349d1a6932a20d525ed63630d146a78830
77
py
Python
tests/test_socfaker_pcap.py
priamai/soc-faker
51b587f0cec52212136905280406e915006d2afc
[ "MIT" ]
122
2020-02-21T16:06:54.000Z
2022-03-21T13:53:03.000Z
tests/test_socfaker_pcap.py
priamai/soc-faker
51b587f0cec52212136905280406e915006d2afc
[ "MIT" ]
13
2020-01-29T16:37:05.000Z
2022-01-27T21:30:10.000Z
tests/test_socfaker_pcap.py
priamai/soc-faker
51b587f0cec52212136905280406e915006d2afc
[ "MIT" ]
20
2020-04-10T11:59:29.000Z
2022-02-10T09:20:26.000Z
def test_socfaker_pcap(socfaker_fixture): assert socfaker_fixture.pcap()
25.666667
41
0.818182
10
77
5.9
0.6
0.508475
0
0
0
0
0
0
0
0
0
0
0.103896
77
2
42
38.5
0.855072
0
0
0
0
0
0
0
0
0
0
0
0.5
1
0.5
false
0
0
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
0
0
0
0
0
0
0
5
9d025e8d1383f70579baa2007139f39bbd58e055
113
py
Python
04_oop_magic_and_dataclasses/advanced_04.py
teacher144123/AdvancedPython_2019
86c23257f7ef54f59ed5dccedf42bd646300f4ae
[ "MIT" ]
null
null
null
04_oop_magic_and_dataclasses/advanced_04.py
teacher144123/AdvancedPython_2019
86c23257f7ef54f59ed5dccedf42bd646300f4ae
[ "MIT" ]
null
null
null
04_oop_magic_and_dataclasses/advanced_04.py
teacher144123/AdvancedPython_2019
86c23257f7ef54f59ed5dccedf42bd646300f4ae
[ "MIT" ]
3
2019-03-06T12:12:19.000Z
2019-04-08T06:55:27.000Z
from advanced_03 import hi, bye name = 'Annie' for _ in range(2): hi(name) for _ in range(2): bye(name)
14.125
31
0.637168
20
113
3.45
0.6
0.202899
0.289855
0.318841
0
0
0
0
0
0
0
0.046512
0.238938
113
7
32
16.142857
0.755814
0
0
0.333333
0
0
0.044248
0
0
0
0
0
0
1
0
false
0
0.166667
0
0.166667
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
9d02678e42883b304f021c341fd941148dc7925d
81
py
Python
nnfs/activations/__init__.py
akshaykurmi/neural-networks-from-scratch
54d62d9f5adb102d14267a922a515fa79bf52bd6
[ "MIT" ]
2
2019-09-13T22:31:21.000Z
2020-11-28T18:51:14.000Z
nnfs/activations/__init__.py
akshaykurmi/neural-networks-from-scratch
54d62d9f5adb102d14267a922a515fa79bf52bd6
[ "MIT" ]
null
null
null
nnfs/activations/__init__.py
akshaykurmi/neural-networks-from-scratch
54d62d9f5adb102d14267a922a515fa79bf52bd6
[ "MIT" ]
null
null
null
from .relu import ReLU from .sigmoid import Sigmoid from .softmax import Softmax
20.25
28
0.814815
12
81
5.5
0.416667
0
0
0
0
0
0
0
0
0
0
0
0.148148
81
3
29
27
0.956522
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
9d5599b7019a0d54ec7e09d4ab1a1118bec35700
3,115
py
Python
exercises/en/test_04_11.py
UBC-MDS/exploratory-data-viz
83b704ce10d1ff5e10bfd4cdfa872ac52993fd54
[ "CC-BY-4.0" ]
null
null
null
exercises/en/test_04_11.py
UBC-MDS/exploratory-data-viz
83b704ce10d1ff5e10bfd4cdfa872ac52993fd54
[ "CC-BY-4.0" ]
88
2020-12-04T06:56:51.000Z
2021-05-10T22:02:45.000Z
exercises/en/test_04_11.py
UBC-MDS/exploratory-data-viz
83b704ce10d1ff5e10bfd4cdfa872ac52993fd54
[ "CC-BY-4.0" ]
4
2021-01-13T09:30:57.000Z
2021-08-03T20:49:31.000Z
def test(): # Here we can either check objects created in the solution code, or the # string value of the solution, available as __solution__. A helper for # printing formatted messages is available as __msg__. See the testTemplate # in the meta.json for details. # If an assertion fails, the message will be displayed assert not numeric_cols is None, "Your answer for numeric_cols does not exist. Have you assigned the list of labels for numeric columns to the correct variable name?" assert type(numeric_cols) == list, "numeric_cols does not appear to be of type list. Can you store all the labels of the numeric columns into a list called numeric_cols?" assert set(numeric_cols) == set(['culmen_length_mm', 'culmen_depth_mm', 'flipper_length_mm', 'body_mass_g']), "Make sure you only include the numeric columns in numeric_cols. Hint: there are 4 numeric columns in the dataframe." assert numeric_cols == ['culmen_length_mm', 'culmen_depth_mm', 'flipper_length_mm', 'body_mass_g'], "You're close. Please make sure that the numeric columns are ordered in the same order they appear in the dataframe." assert not numeric_histograms is None, "Your answer for numeric_histograms does not exist. Have you assigned the chart object to the correct variable name?" assert type(numeric_histograms) == alt.vegalite.v4.api.RepeatChart, "Your answer is not an Altair RepeatChart object. Check to make sure that you have assigned an alt.Chart object to numeric_histograms and that you are repeating by columns in numeric_cols." assert numeric_histograms.columns == 2, "Make sure you have 2 columns in your RepeatChart. Hint: use columns argument." assert numeric_histograms.spec.mark == 'bar', "Make sure you are using the 'mark_bar' to generate histograms." assert numeric_histograms.spec.encoding.x.shorthand == alt.RepeatRef(repeat = 'repeat'), "Make sure you specify that the chart set-up is repeated for different columns as the x-axis encoding. Hint: use alt.repeat()" assert numeric_histograms.spec.encoding.x.bin != alt.utils.schemapi.Undefined, "Make sure you are specifying the bin argument for the x-axis encoding for the histogram." assert numeric_histograms.spec.encoding.x.bin.maxbins != alt.utils.schemapi.Undefined, "Make sure you specify the maxbins argument for binning the x-axis encoding to something reasonable (like 30 or 40)." assert numeric_histograms.spec.encoding.x.type == "quantitative", "Make sure you let Altair know that alt.repeat() is a quantitative type, since it's not a column in the dataframe." assert ( numeric_histograms.spec.encoding.y.field in {'count()', 'count():quantitative', 'count():Q'} or numeric_histograms.spec.encoding.y.shorthand in {'count()', 'count():quantitative', 'count():Q'} ), "Make sure you are using 'count()' as the y-axis encoding." assert numeric_histograms.spec.height == 150, "Make sure your plot has a height of 150." assert numeric_histograms.spec.width == 150, "Make sure your plot has a width of 150." __msg__.good("You're correct, well done!")
100.483871
261
0.752809
483
3,115
4.747412
0.31677
0.103794
0.090275
0.0942
0.335369
0.272133
0.191888
0.080244
0.044483
0.044483
0
0.007666
0.16244
3,115
30
262
103.833333
0.871215
0.095024
0
0
0
0.4
0.621401
0
0
0
0
0
0.75
1
0.05
true
0
0
0
0.05
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
1
0
null
0
0
0
1
0
0
1
0
0
0
0
0
0
5
19d39346710249eec7447cc88eebbb3af88c6d4b
144
py
Python
forms/admin.py
Taycode/TayForms
20bfa287a7a27f6b0453fa4f6f8ed4f92490383a
[ "MIT" ]
null
null
null
forms/admin.py
Taycode/TayForms
20bfa287a7a27f6b0453fa4f6f8ed4f92490383a
[ "MIT" ]
null
null
null
forms/admin.py
Taycode/TayForms
20bfa287a7a27f6b0453fa4f6f8ed4f92490383a
[ "MIT" ]
1
2021-07-26T09:53:01.000Z
2021-07-26T09:53:01.000Z
"""Form Admin""" from django.contrib import admin from .models import Form, Question admin.site.register(Form) admin.site.register(Question)
16
34
0.770833
20
144
5.55
0.5
0.162162
0.306306
0
0
0
0
0
0
0
0
0
0.111111
144
8
35
18
0.867188
0.069444
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
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
c24818696daca341b6872201f72fa1bbe36c295e
170
py
Python
Jati/Database/SQL/mysql/Query.py
ghuvrons/Jati
b4d056cf38d4770f3bef0f3db93c4b982f4e3da0
[ "MIT" ]
null
null
null
Jati/Database/SQL/mysql/Query.py
ghuvrons/Jati
b4d056cf38d4770f3bef0f3db93c4b982f4e3da0
[ "MIT" ]
null
null
null
Jati/Database/SQL/mysql/Query.py
ghuvrons/Jati
b4d056cf38d4770f3bef0f3db93c4b982f4e3da0
[ "MIT" ]
null
null
null
from threading import Event import datetime from ..Query import Query as baseQuery class Query(baseQuery): def getResult(self): return self.db.execute(self)
21.25
38
0.747059
23
170
5.521739
0.652174
0
0
0
0
0
0
0
0
0
0
0
0.182353
170
7
39
24.285714
0.913669
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.5
0.166667
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
1
0
0
5
a06e1e1484ff5377349b943278753917db8bcb90
123
py
Python
devilry/__init__.py
aless80/devilry-django
416c262e75170d5662542f15e2d7fecf5ab84730
[ "BSD-3-Clause" ]
29
2015-01-18T22:56:23.000Z
2020-11-10T21:28:27.000Z
devilry/__init__.py
aless80/devilry-django
416c262e75170d5662542f15e2d7fecf5ab84730
[ "BSD-3-Clause" ]
786
2015-01-06T16:10:18.000Z
2022-03-16T11:10:50.000Z
devilry/__init__.py
aless80/devilry-django
416c262e75170d5662542f15e2d7fecf5ab84730
[ "BSD-3-Clause" ]
15
2015-04-06T06:18:43.000Z
2021-02-24T12:28:30.000Z
from pkg_resources import resource_string import json __version__ = json.loads(resource_string(__name__, 'version.json'))
24.6
67
0.829268
16
123
5.6875
0.625
0.307692
0
0
0
0
0
0
0
0
0
0
0.089431
123
4
68
30.75
0.8125
0
0
0
0
0
0.097561
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
a0a804e7119647e071003bc0a63f3642f12b5bdf
57
py
Python
flexget/plugins/parsers/__init__.py
sillygreen89/Flexget
60f24ab0dda7b94c87ba43451921c50c3cef391f
[ "MIT" ]
1
2018-05-02T21:14:50.000Z
2018-05-02T21:14:50.000Z
flexget/plugins/parsers/__init__.py
sillygreen89/Flexget
60f24ab0dda7b94c87ba43451921c50c3cef391f
[ "MIT" ]
null
null
null
flexget/plugins/parsers/__init__.py
sillygreen89/Flexget
60f24ab0dda7b94c87ba43451921c50c3cef391f
[ "MIT" ]
null
null
null
from .parser_common import ParseWarning, SERIES_ID_TYPES
28.5
56
0.877193
8
57
5.875
1
0
0
0
0
0
0
0
0
0
0
0
0.087719
57
1
57
57
0.903846
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
a0bd4fa3ee1cdb05c23401aff00064db3a252414
37
py
Python
src/osfa/__main__.py
FreehandBlock51/OSFA
13b6f8e6a11020e3205e0c89cb6e095edfbe402a
[ "MIT" ]
1
2022-02-02T03:29:44.000Z
2022-02-02T03:29:44.000Z
src/osfa/__main__.py
FreehandBlock51/OSFA
13b6f8e6a11020e3205e0c89cb6e095edfbe402a
[ "MIT" ]
3
2022-02-02T00:58:45.000Z
2022-02-10T20:13:04.000Z
src/osfa/__main__.py
FreehandBlock51/OSFA
13b6f8e6a11020e3205e0c89cb6e095edfbe402a
[ "MIT" ]
1
2022-02-02T00:55:58.000Z
2022-02-02T00:55:58.000Z
from .osfa import RunShell RunShell()
18.5
26
0.810811
5
37
6
0.8
0
0
0
0
0
0
0
0
0
0
0
0.108108
37
2
27
18.5
0.909091
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
a0bf0fa38ee436b0b9700bfe2c22752f72f79463
70
py
Python
tests/test_sample.py
xBrite/sample-python-package
e49032625922d1aed9a354f8a17f27e1080d618a
[ "MIT" ]
1
2019-10-22T15:31:44.000Z
2019-10-22T15:31:44.000Z
tests/test_sample.py
xBrite/sample-python-package
e49032625922d1aed9a354f8a17f27e1080d618a
[ "MIT" ]
1
2020-09-07T15:31:02.000Z
2020-09-07T19:11:14.000Z
tests/test_sample.py
xBrite/sample-python-package
e49032625922d1aed9a354f8a17f27e1080d618a
[ "MIT" ]
2
2020-09-01T01:18:44.000Z
2021-01-25T16:04:49.000Z
def test_sample(): assert True, "This is just a fake sample test"
23.333333
50
0.7
12
70
4
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.214286
70
2
51
35
0.872727
0
0
0
0
0
0.442857
0
0
0
0
0
0.5
1
0.5
true
0
0
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
1
0
0
0
0
0
0
5
262b6c77fd3e4a300ff279aba7406c4b4aac7e7d
20
py
Python
hello.py
umangsingh9987/Hello-World
361458df6252043773bca2ae7fa2ba6a07882044
[ "MIT" ]
null
null
null
hello.py
umangsingh9987/Hello-World
361458df6252043773bca2ae7fa2ba6a07882044
[ "MIT" ]
null
null
null
hello.py
umangsingh9987/Hello-World
361458df6252043773bca2ae7fa2ba6a07882044
[ "MIT" ]
null
null
null
print("Hello Fest")
10
19
0.7
3
20
4.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.1
20
1
20
20
0.777778
0
0
0
0
0
0.5
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
265d1f4f49d0f4373acb8270d3cfa91b4f8abf81
4,957
py
Python
z2/part2/interactive/jm/random_normal_1/355237974.py
kozakusek/ipp-2020-testy
09aa008fa53d159672cc7cbf969a6b237e15a7b8
[ "MIT" ]
1
2020-04-16T12:13:47.000Z
2020-04-16T12:13:47.000Z
z2/part2/interactive/jm/random_normal_1/355237974.py
kozakusek/ipp-2020-testy
09aa008fa53d159672cc7cbf969a6b237e15a7b8
[ "MIT" ]
18
2020-03-06T17:50:15.000Z
2020-05-19T14:58:30.000Z
z2/part2/interactive/jm/random_normal_1/355237974.py
kozakusek/ipp-2020-testy
09aa008fa53d159672cc7cbf969a6b237e15a7b8
[ "MIT" ]
18
2020-03-06T17:45:13.000Z
2020-06-09T19:18:31.000Z
from part1 import ( gamma_board, gamma_busy_fields, gamma_delete, gamma_free_fields, gamma_golden_move, gamma_golden_possible, gamma_move, gamma_new, ) """ scenario: test_random_actions uuid: 355237974 """ """ random actions, total chaos """ board = gamma_new(5, 5, 5, 5) assert board is not None assert gamma_busy_fields(board, 1) == 0 assert gamma_move(board, 2, 4, 1) == 1 assert gamma_move(board, 3, 3, 3) == 1 assert gamma_move(board, 3, 3, 3) == 0 assert gamma_move(board, 4, 2, 4) == 1 assert gamma_move(board, 4, 2, 0) == 1 assert gamma_golden_move(board, 4, 3, 3) == 1 assert gamma_move(board, 5, 4, 1) == 0 assert gamma_move(board, 1, 1, 0) == 1 assert gamma_move(board, 1, 2, 0) == 0 assert gamma_busy_fields(board, 1) == 1 assert gamma_free_fields(board, 1) == 20 assert gamma_move(board, 2, 0, 3) == 1 assert gamma_move(board, 2, 1, 3) == 1 assert gamma_move(board, 3, 3, 3) == 0 assert gamma_move(board, 4, 3, 1) == 1 assert gamma_move(board, 4, 2, 0) == 0 assert gamma_golden_possible(board, 4) == 0 assert gamma_move(board, 5, 4, 3) == 1 assert gamma_move(board, 5, 4, 2) == 1 assert gamma_busy_fields(board, 5) == 2 assert gamma_move(board, 1, 3, 0) == 1 assert gamma_move(board, 2, 2, 1) == 1 assert gamma_move(board, 2, 2, 1) == 0 assert gamma_golden_move(board, 2, 0, 1) == 0 assert gamma_move(board, 3, 0, 1) == 1 assert gamma_move(board, 3, 1, 1) == 1 assert gamma_busy_fields(board, 3) == 2 assert gamma_move(board, 4, 2, 3) == 1 assert gamma_move(board, 5, 4, 1) == 0 assert gamma_busy_fields(board, 5) == 2 assert gamma_golden_move(board, 5, 3, 3) == 1 board541986966 = gamma_board(board) assert board541986966 is not None assert board541986966 == ("..4..\n" "22455\n" "....5\n" "33242\n" ".141.\n") del board541986966 board541986966 = None assert gamma_move(board, 1, 4, 3) == 0 assert gamma_move(board, 1, 2, 1) == 0 assert gamma_busy_fields(board, 1) == 2 assert gamma_move(board, 2, 4, 3) == 0 assert gamma_move(board, 3, 4, 3) == 0 assert gamma_move(board, 3, 1, 4) == 1 assert gamma_golden_possible(board, 3) == 1 assert gamma_move(board, 4, 4, 0) == 1 assert gamma_move(board, 4, 3, 2) == 1 assert gamma_move(board, 5, 2, 0) == 0 assert gamma_busy_fields(board, 5) == 3 assert gamma_move(board, 1, 2, 0) == 0 assert gamma_move(board, 1, 1, 1) == 0 assert gamma_free_fields(board, 1) == 7 assert gamma_move(board, 2, 2, 3) == 0 assert gamma_move(board, 2, 2, 3) == 0 assert gamma_move(board, 3, 2, 1) == 0 assert gamma_move(board, 4, 4, 4) == 1 assert gamma_move(board, 4, 0, 4) == 0 assert gamma_move(board, 5, 0, 3) == 0 assert gamma_move(board, 5, 4, 3) == 0 assert gamma_golden_possible(board, 5) == 0 assert gamma_move(board, 1, 4, 3) == 0 assert gamma_move(board, 1, 0, 3) == 0 assert gamma_busy_fields(board, 1) == 2 assert gamma_move(board, 2, 2, 0) == 0 assert gamma_golden_possible(board, 2) == 1 board618311998 = gamma_board(board) assert board618311998 is not None assert board618311998 == (".34.4\n" "22455\n" "...45\n" "33242\n" ".1414\n") del board618311998 board618311998 = None assert gamma_move(board, 3, 0, 0) == 1 assert gamma_move(board, 4, 4, 3) == 0 assert gamma_move(board, 4, 3, 0) == 0 assert gamma_move(board, 5, 2, 0) == 0 assert gamma_free_fields(board, 5) == 5 assert gamma_move(board, 1, 3, 3) == 0 assert gamma_move(board, 1, 3, 1) == 0 assert gamma_golden_possible(board, 1) == 1 assert gamma_move(board, 2, 0, 0) == 0 assert gamma_move(board, 3, 4, 3) == 0 assert gamma_move(board, 3, 2, 4) == 0 assert gamma_move(board, 4, 4, 3) == 0 assert gamma_golden_move(board, 4, 2, 4) == 0 assert gamma_move(board, 5, 4, 0) == 0 assert gamma_move(board, 5, 0, 3) == 0 assert gamma_move(board, 1, 2, 0) == 0 assert gamma_move(board, 1, 4, 3) == 0 assert gamma_move(board, 2, 2, 2) == 1 assert gamma_move(board, 3, 0, 0) == 0 assert gamma_move(board, 4, 4, 0) == 0 assert gamma_move(board, 4, 0, 2) == 0 assert gamma_move(board, 5, 4, 0) == 0 assert gamma_move(board, 5, 4, 0) == 0 assert gamma_move(board, 1, 2, 0) == 0 assert gamma_move(board, 1, 3, 2) == 0 assert gamma_move(board, 2, 4, 0) == 0 assert gamma_move(board, 2, 4, 1) == 0 assert gamma_move(board, 3, 2, 1) == 0 assert gamma_move(board, 4, 0, 0) == 0 assert gamma_free_fields(board, 4) == 1 board563339742 = gamma_board(board) assert board563339742 is not None assert board563339742 == (".34.4\n" "22455\n" "..245\n" "33242\n" "31414\n") del board563339742 board563339742 = None assert gamma_move(board, 5, 2, 1) == 0 assert gamma_golden_possible(board, 5) == 0 assert gamma_move(board, 1, 4, 0) == 0 assert gamma_move(board, 2, 2, 1) == 0 assert gamma_move(board, 3, 4, 3) == 0 assert gamma_free_fields(board, 3) == 4 assert gamma_move(board, 4, 4, 3) == 0 assert gamma_free_fields(board, 4) == 1 assert gamma_move(board, 5, 2, 0) == 0 assert gamma_move(board, 5, 4, 0) == 0 gamma_delete(board)
31.373418
46
0.663103
901
4,957
3.490566
0.051054
0.346264
0.357711
0.476948
0.799046
0.773291
0.676312
0.563116
0.444833
0.423529
0
0.138109
0.180553
4,957
157
47
31.573248
0.63614
0
0
0.330935
0
0
0.021565
0
0
0
0
0
0.76259
1
0
false
0
0.007194
0
0.007194
0
0
0
0
null
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
5
26618a8f9cf6b851ac7020295ba8e51b394cf010
144
py
Python
PFERD/crawl/ilias/__init__.py
Toorero/PFERD
d6f38a61e16fa95d8a2365abc1cfd70f35ee0289
[ "MIT" ]
74
2019-06-25T16:05:39.000Z
2022-03-25T08:33:16.000Z
PFERD/crawl/ilias/__init__.py
Toorero/PFERD
d6f38a61e16fa95d8a2365abc1cfd70f35ee0289
[ "MIT" ]
43
2018-11-27T17:09:23.000Z
2022-01-15T15:28:55.000Z
PFERD/crawl/ilias/__init__.py
Toorero/PFERD
d6f38a61e16fa95d8a2365abc1cfd70f35ee0289
[ "MIT" ]
22
2019-06-07T11:28:10.000Z
2022-01-26T16:21:25.000Z
from .kit_ilias_web_crawler import KitIliasWebCrawler, KitIliasWebCrawlerSection __all__ = ["KitIliasWebCrawler", "KitIliasWebCrawlerSection"]
36
80
0.861111
11
144
10.636364
0.818182
0.735043
0
0
0
0
0
0
0
0
0
0
0.069444
144
3
81
48
0.873134
0
0
0
0
0
0.298611
0.173611
0
0
0
0
0
1
0
false
0
0.5
0
0.5
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
f8168d523976e23016d7c0762364d13c76c02501
236
py
Python
src/client_errors/forms.py
hohner36/hexchan-engine
8edf155e8fe64936dfe428a6e9bac69705934b1f
[ "MIT" ]
2
2021-04-16T10:11:18.000Z
2022-03-15T15:16:14.000Z
src/client_errors/forms.py
hohner36/hexchan-engine
8edf155e8fe64936dfe428a6e9bac69705934b1f
[ "MIT" ]
2
2019-09-02T18:39:51.000Z
2019-09-02T18:43:34.000Z
src/client_errors/forms.py
hohner36/hexchan-engine
8edf155e8fe64936dfe428a6e9bac69705934b1f
[ "MIT" ]
2
2019-09-02T18:37:25.000Z
2022-02-20T19:19:40.000Z
from django import forms class ClientErrorForm(forms.Form): msg = forms.CharField(max_length=1024, required=False) url = forms.CharField(max_length=256, required=False) line = forms.CharField(max_length=4, required=False)
29.5
58
0.758475
32
236
5.5
0.5625
0.238636
0.289773
0.392045
0
0
0
0
0
0
0
0.039216
0.135593
236
7
59
33.714286
0.823529
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.2
0
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
5
f86e0f6e8d66654d23d1de0dec3616b0c9f98d4c
33,255
py
Python
stringtime/parsetab.py
byteface/stringtime
de0b2d670ad691d6646974de84ec76e44f409c97
[ "MIT" ]
null
null
null
stringtime/parsetab.py
byteface/stringtime
de0b2d670ad691d6646974de84ec76e44f409c97
[ "MIT" ]
8
2022-03-28T23:50:41.000Z
2022-03-29T22:12:25.000Z
stringtime/parsetab.py
byteface/stringtime
de0b2d670ad691d6646974de84ec76e44f409c97
[ "MIT" ]
null
null
null
# parsetab.py # This file is automatically generated. Do not edit. # pylint: disable=W,C,R _tabversion = "3.10" _lr_method = "LALR" _lr_signature = "A AFTER_TOMORROW AM AT BEFORE_YESTERDAY COLON DATE_END DAY MINUS MONTH NUMBER OF ON PAST_PHRASE PHRASE PLUS PM THE TIME TODAY TOMORROW WORD_NUMBER YEAR YESTERDAY\n date_object :\n date_object : date_list\n date_list : date_list date\n date_list : date\n date_list : date_past\n date_list : in\n date_list : adder\n date_list : remover\n date_list : date_yesterday\n date_list : date_2moro\n date_list : date_day\n date_list : date_end\n date_list : date_or\n date_list : date_before_yesterday\n date_list : date_after_tomorrow\n date_list : date_twice\n date_list : timestamp\n date_list : timestamp_adpt\n \n timestamp : NUMBER COLON NUMBER\n timestamp : NUMBER COLON NUMBER COLON NUMBER\n \n timestamp_adpt : timestamp AM\n timestamp_adpt : timestamp PM\n timestamp_adpt : AT timestamp\n timestamp_adpt : AT timestamp PM\n timestamp_adpt : AT timestamp AM\n \n date : NUMBER\n date : WORD_NUMBER\n date : AT NUMBER\n date : AT WORD_NUMBER\n date : TIME\n date : NUMBER TIME\n date : NUMBER AM\n date : NUMBER PM\n date : AT NUMBER AM\n date : AT NUMBER PM\n date : WORD_NUMBER TIME\n date : PHRASE TIME\n date : TIME PHRASE\n date : NUMBER TIME PHRASE\n date : WORD_NUMBER TIME PHRASE\n date : PHRASE TIME PHRASE\n \n date_twice : date date\n date_twice : date_day date\n \n in : PHRASE NUMBER TIME\n in : PHRASE WORD_NUMBER TIME\n \n adder : PLUS NUMBER TIME\n adder : PLUS WORD_NUMBER TIME\n \n remover : MINUS NUMBER TIME\n remover : MINUS WORD_NUMBER TIME\n \n date_past : NUMBER TIME PAST_PHRASE\n date_past : WORD_NUMBER TIME PAST_PHRASE\n \n date_yesterday : YESTERDAY\n date_yesterday : YESTERDAY AT NUMBER\n date_yesterday : YESTERDAY AT WORD_NUMBER\n \n date_2moro : TOMORROW\n date_2moro : TOMORROW AT NUMBER\n date_2moro : TOMORROW AT WORD_NUMBER\n \n date_day : DAY\n date_day : ON DAY\n date_day : PHRASE DAY\n date_day : PAST_PHRASE DAY\n \n date_or : PAST_PHRASE TIME\n \n date_before_yesterday : BEFORE_YESTERDAY\n date_before_yesterday : THE BEFORE_YESTERDAY\n date_before_yesterday : THE TIME BEFORE_YESTERDAY\n \n date_after_tomorrow : AFTER_TOMORROW\n date_after_tomorrow : THE TIME AFTER_TOMORROW\n \n date_end : NUMBER DATE_END\n date_end : THE NUMBER DATE_END\n date_end : MONTH NUMBER DATE_END\n date_end : NUMBER DATE_END OF MONTH\n date_end : ON THE NUMBER DATE_END\n date_end : MONTH THE NUMBER DATE_END\n date_end : THE NUMBER DATE_END OF MONTH\n " _lr_action_items = { "$end": ( [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 26, 27, 28, 32, 33, 34, 35, 36, 39, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 56, 57, 58, 65, 68, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97, 98, 99, 100, 102, 104, 106, 107, 108, ], [ -1, 0, -2, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -26, -27, -30, -52, -55, -58, -63, -66, -3, -26, -27, -42, -43, -21, -22, -31, -32, -33, -68, -36, -28, -29, -23, -38, -37, -60, -61, -62, -59, -64, -31, -36, -28, -39, -50, -19, -40, -51, -34, -35, -24, -25, -41, -44, -45, -46, -47, -48, -49, -53, -54, -56, -57, -69, -65, -67, -70, -71, -72, -73, -20, -74, ], ), "NUMBER": ( [ 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 30, 31, 32, 33, 34, 35, 36, 37, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 56, 57, 58, 63, 64, 65, 66, 68, 71, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97, 98, 99, 100, 102, 103, 104, 106, 107, 108, ], [ 18, 35, 35, -5, -6, -7, -8, -9, -10, 35, -12, -13, -14, -15, -16, -17, -18, -26, -27, 49, -30, 54, 59, 61, -52, -55, -58, 67, 70, -63, -66, -3, -26, -27, 74, -42, -43, -21, -22, -31, -32, -33, -68, 78, -36, -28, -29, -23, -38, -37, -60, -61, -62, 92, 94, -59, 96, -64, 101, -31, -36, -28, -39, -50, -19, -40, -51, -34, -35, -24, -25, -41, -44, -45, -46, -47, -48, -49, -53, -54, -56, -57, -69, -65, -67, -70, -71, 107, -72, -73, -20, -74, ], ), "WORD_NUMBER": ( [ 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 32, 33, 34, 35, 36, 37, 39, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 56, 57, 58, 63, 64, 65, 68, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97, 98, 99, 100, 102, 104, 106, 107, 108, ], [ 19, 36, 36, -5, -6, -7, -8, -9, -10, 36, -12, -13, -14, -15, -16, -17, -18, -26, -27, 50, -30, 55, 60, 62, -52, -55, -58, -63, -66, -3, -26, -27, 50, -42, -43, -21, -22, -31, -32, -33, -68, -36, -28, -29, -23, -38, -37, -60, -61, -62, 93, 95, -59, -64, -31, -36, -28, -39, -50, -19, -40, -51, -34, -35, -24, -25, -41, -44, -45, -46, -47, -48, -49, -53, -54, -56, -57, -69, -65, -67, -70, -71, -72, -73, -20, -74, ], ), "AT": ( [ 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 26, 27, 28, 32, 33, 34, 35, 36, 39, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 56, 57, 58, 65, 68, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97, 98, 99, 100, 102, 104, 106, 107, 108, ], [ 20, 37, 37, -5, -6, -7, -8, -9, -10, 37, -12, -13, -14, -15, -16, -17, -18, -26, -27, -30, 63, 64, -58, -63, -66, -3, -26, -27, -42, -43, -21, -22, -31, -32, -33, -68, -36, -28, -29, -23, -38, -37, -60, -61, -62, -59, -64, -31, -36, -28, -39, -50, -19, -40, -51, -34, -35, -24, -25, -41, -44, -45, -46, -47, -48, -49, -53, -54, -56, -57, -69, -65, -67, -70, -71, -72, -73, -20, -74, ], ), "TIME": ( [ 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 26, 27, 28, 30, 32, 33, 34, 35, 36, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 65, 68, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97, 98, 99, 100, 102, 104, 106, 107, 108, ], [ 21, 21, 21, -5, -6, -7, -8, -9, -10, 21, -12, -13, -14, -15, -16, -17, -18, 43, 48, -30, 53, 58, -52, -55, -58, 69, -63, -66, -3, 72, 73, 53, -42, -43, -21, -22, -31, -32, -33, -68, -36, -28, -29, -23, -38, -37, 86, 87, -60, -61, -62, 88, 89, 90, 91, -59, -64, -31, -36, -28, -39, -50, -19, -40, -51, -34, -35, -24, -25, -41, -44, -45, -46, -47, -48, -49, -53, -54, -56, -57, -69, -65, -67, -70, -71, -72, -73, -20, -74, ], ), "PHRASE": ( [ 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 26, 27, 28, 32, 33, 34, 35, 36, 39, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 56, 57, 58, 65, 68, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97, 98, 99, 100, 102, 104, 106, 107, 108, ], [ 22, 38, 38, -5, -6, -7, -8, -9, -10, 38, -12, -13, -14, -15, -16, -17, -18, -26, -27, 52, -52, -55, -58, -63, -66, -3, -26, -27, -42, -43, -21, -22, 75, -32, -33, -68, 79, -28, -29, -23, -38, 85, -60, -61, -62, -59, -64, 75, 79, -28, -39, -50, -19, -40, -51, -34, -35, -24, -25, -41, -44, -45, -46, -47, -48, -49, -53, -54, -56, -57, -69, -65, -67, -70, -71, -72, -73, -20, -74, ], ), "PLUS": ( [ 0, ], [ 24, ], ), "MINUS": ( [ 0, ], [ 25, ], ), "YESTERDAY": ( [ 0, ], [ 26, ], ), "TOMORROW": ( [ 0, ], [ 27, ], ), "DAY": ( [ 0, 22, 23, 29, ], [ 28, 56, 57, 65, ], ), "ON": ( [ 0, ], [ 29, ], ), "PAST_PHRASE": ( [ 0, 43, 48, ], [ 23, 76, 80, ], ), "THE": ( [ 0, 29, 31, ], [ 30, 66, 71, ], ), "MONTH": ( [ 0, 77, 105, ], [ 31, 102, 108, ], ), "BEFORE_YESTERDAY": ( [ 0, 30, 69, ], [ 32, 68, 98, ], ), "AFTER_TOMORROW": ( [ 0, 69, ], [ 33, 99, ], ), "AM": ( [ 16, 18, 35, 49, 51, 74, 78, 107, ], [ 41, 44, 44, 81, 84, 81, -19, -20, ], ), "PM": ( [ 16, 18, 35, 49, 51, 74, 78, 107, ], [ 42, 45, 45, 82, 83, 82, -19, -20, ], ), "DATE_END": ( [ 18, 67, 70, 96, 101, ], [ 46, 97, 100, 104, 106, ], ), "COLON": ( [ 18, 49, 78, ], [ 47, 47, 103, ], ), "OF": ( [ 46, 97, ], [ 77, 105, ], ), } _lr_action = {} for _k, _v in _lr_action_items.items(): for _x, _y in zip(_v[0], _v[1]): if not _x in _lr_action: _lr_action[_x] = {} _lr_action[_x][_k] = _y del _lr_action_items _lr_goto_items = { "date_object": ( [ 0, ], [ 1, ], ), "date_list": ( [ 0, ], [ 2, ], ), "date": ( [ 0, 2, 3, 10, ], [ 3, 34, 39, 40, ], ), "date_past": ( [ 0, ], [ 4, ], ), "in": ( [ 0, ], [ 5, ], ), "adder": ( [ 0, ], [ 6, ], ), "remover": ( [ 0, ], [ 7, ], ), "date_yesterday": ( [ 0, ], [ 8, ], ), "date_2moro": ( [ 0, ], [ 9, ], ), "date_day": ( [ 0, ], [ 10, ], ), "date_end": ( [ 0, ], [ 11, ], ), "date_or": ( [ 0, ], [ 12, ], ), "date_before_yesterday": ( [ 0, ], [ 13, ], ), "date_after_tomorrow": ( [ 0, ], [ 14, ], ), "date_twice": ( [ 0, ], [ 15, ], ), "timestamp": ( [ 0, 20, ], [ 16, 51, ], ), "timestamp_adpt": ( [ 0, ], [ 17, ], ), } _lr_goto = {} for _k, _v in _lr_goto_items.items(): for _x, _y in zip(_v[0], _v[1]): if not _x in _lr_goto: _lr_goto[_x] = {} _lr_goto[_x][_k] = _y del _lr_goto_items _lr_productions = [ ("S' -> date_object", "S'", 1, None, None, None), ("date_object -> <empty>", "date_object", 0, "p_date_object", "__init__.py", 422), ("date_object -> date_list", "date_object", 1, "p_date_object", "__init__.py", 423), ("date_list -> date_list date", "date_list", 2, "p_date_list", "__init__.py", 433), ("date_list -> date", "date_list", 1, "p_date", "__init__.py", 439), ("date_list -> date_past", "date_list", 1, "p_date", "__init__.py", 440), ("date_list -> in", "date_list", 1, "p_date", "__init__.py", 441), ("date_list -> adder", "date_list", 1, "p_date", "__init__.py", 442), ("date_list -> remover", "date_list", 1, "p_date", "__init__.py", 443), ("date_list -> date_yesterday", "date_list", 1, "p_date", "__init__.py", 444), ("date_list -> date_2moro", "date_list", 1, "p_date", "__init__.py", 445), ("date_list -> date_day", "date_list", 1, "p_date", "__init__.py", 446), ("date_list -> date_end", "date_list", 1, "p_date", "__init__.py", 447), ("date_list -> date_or", "date_list", 1, "p_date", "__init__.py", 448), ( "date_list -> date_before_yesterday", "date_list", 1, "p_date", "__init__.py", 449, ), ("date_list -> date_after_tomorrow", "date_list", 1, "p_date", "__init__.py", 450), ("date_list -> date_twice", "date_list", 1, "p_date", "__init__.py", 451), ("date_list -> timestamp", "date_list", 1, "p_date", "__init__.py", 452), ("date_list -> timestamp_adpt", "date_list", 1, "p_date", "__init__.py", 453), ( "timestamp -> NUMBER COLON NUMBER", "timestamp", 3, "p_timestamp", "__init__.py", 473, ), ( "timestamp -> NUMBER COLON NUMBER COLON NUMBER", "timestamp", 5, "p_timestamp", "__init__.py", 474, ), ( "timestamp_adpt -> timestamp AM", "timestamp_adpt", 2, "p_timestamp_adapter", "__init__.py", 497, ), ( "timestamp_adpt -> timestamp PM", "timestamp_adpt", 2, "p_timestamp_adapter", "__init__.py", 498, ), ( "timestamp_adpt -> AT timestamp", "timestamp_adpt", 2, "p_timestamp_adapter", "__init__.py", 499, ), ( "timestamp_adpt -> AT timestamp PM", "timestamp_adpt", 3, "p_timestamp_adapter", "__init__.py", 500, ), ( "timestamp_adpt -> AT timestamp AM", "timestamp_adpt", 3, "p_timestamp_adapter", "__init__.py", 501, ), ("date -> NUMBER", "date", 1, "p_single_date", "__init__.py", 516), ("date -> WORD_NUMBER", "date", 1, "p_single_date", "__init__.py", 517), ("date -> AT NUMBER", "date", 2, "p_single_date", "__init__.py", 518), ("date -> AT WORD_NUMBER", "date", 2, "p_single_date", "__init__.py", 519), ("date -> TIME", "date", 1, "p_single_date", "__init__.py", 520), ("date -> NUMBER TIME", "date", 2, "p_single_date", "__init__.py", 521), ("date -> NUMBER AM", "date", 2, "p_single_date", "__init__.py", 522), ("date -> NUMBER PM", "date", 2, "p_single_date", "__init__.py", 523), ("date -> AT NUMBER AM", "date", 3, "p_single_date", "__init__.py", 524), ("date -> AT NUMBER PM", "date", 3, "p_single_date", "__init__.py", 525), ("date -> WORD_NUMBER TIME", "date", 2, "p_single_date", "__init__.py", 526), ("date -> PHRASE TIME", "date", 2, "p_single_date", "__init__.py", 527), ("date -> TIME PHRASE", "date", 2, "p_single_date", "__init__.py", 528), ("date -> NUMBER TIME PHRASE", "date", 3, "p_single_date", "__init__.py", 529), ("date -> WORD_NUMBER TIME PHRASE", "date", 3, "p_single_date", "__init__.py", 530), ("date -> PHRASE TIME PHRASE", "date", 3, "p_single_date", "__init__.py", 531), ("date_twice -> date date", "date_twice", 2, "p_twice", "__init__.py", 610), ("date_twice -> date_day date", "date_twice", 2, "p_twice", "__init__.py", 611), ("in -> PHRASE NUMBER TIME", "in", 3, "p_single_date_in", "__init__.py", 641), ("in -> PHRASE WORD_NUMBER TIME", "in", 3, "p_single_date_in", "__init__.py", 642), ("adder -> PLUS NUMBER TIME", "adder", 3, "p_single_date_plus", "__init__.py", 655), ( "adder -> PLUS WORD_NUMBER TIME", "adder", 3, "p_single_date_plus", "__init__.py", 656, ), ( "remover -> MINUS NUMBER TIME", "remover", 3, "p_single_date_minus", "__init__.py", 669, ), ( "remover -> MINUS WORD_NUMBER TIME", "remover", 3, "p_single_date_minus", "__init__.py", 670, ), ( "date_past -> NUMBER TIME PAST_PHRASE", "date_past", 3, "p_single_date_past", "__init__.py", 684, ), ( "date_past -> WORD_NUMBER TIME PAST_PHRASE", "date_past", 3, "p_single_date_past", "__init__.py", 685, ), ( "date_yesterday -> YESTERDAY", "date_yesterday", 1, "p_single_date_yesterday", "__init__.py", 693, ), ( "date_yesterday -> YESTERDAY AT NUMBER", "date_yesterday", 3, "p_single_date_yesterday", "__init__.py", 694, ), ( "date_yesterday -> YESTERDAY AT WORD_NUMBER", "date_yesterday", 3, "p_single_date_yesterday", "__init__.py", 695, ), ( "date_2moro -> TOMORROW", "date_2moro", 1, "p_single_date_2moro", "__init__.py", 712, ), ( "date_2moro -> TOMORROW AT NUMBER", "date_2moro", 3, "p_single_date_2moro", "__init__.py", 713, ), ( "date_2moro -> TOMORROW AT WORD_NUMBER", "date_2moro", 3, "p_single_date_2moro", "__init__.py", 714, ), ("date_day -> DAY", "date_day", 1, "p_single_date_day", "__init__.py", 731), ("date_day -> ON DAY", "date_day", 2, "p_single_date_day", "__init__.py", 732), ("date_day -> PHRASE DAY", "date_day", 2, "p_single_date_day", "__init__.py", 733), ( "date_day -> PAST_PHRASE DAY", "date_day", 2, "p_single_date_day", "__init__.py", 734, ), ( "date_or -> PAST_PHRASE TIME", "date_or", 2, "p_this_or_next_period", "__init__.py", 765, ), ( "date_before_yesterday -> BEFORE_YESTERDAY", "date_before_yesterday", 1, "p_before_yesterday", "__init__.py", 786, ), ( "date_before_yesterday -> THE BEFORE_YESTERDAY", "date_before_yesterday", 2, "p_before_yesterday", "__init__.py", 787, ), ( "date_before_yesterday -> THE TIME BEFORE_YESTERDAY", "date_before_yesterday", 3, "p_before_yesterday", "__init__.py", 788, ), ( "date_after_tomorrow -> AFTER_TOMORROW", "date_after_tomorrow", 1, "p_after_tomorrow", "__init__.py", 798, ), ( "date_after_tomorrow -> THE TIME AFTER_TOMORROW", "date_after_tomorrow", 3, "p_after_tomorrow", "__init__.py", 799, ), ( "date_end -> NUMBER DATE_END", "date_end", 2, "p_single_date_end", "__init__.py", 809, ), ( "date_end -> THE NUMBER DATE_END", "date_end", 3, "p_single_date_end", "__init__.py", 810, ), ( "date_end -> MONTH NUMBER DATE_END", "date_end", 3, "p_single_date_end", "__init__.py", 811, ), ( "date_end -> NUMBER DATE_END OF MONTH", "date_end", 4, "p_single_date_end", "__init__.py", 812, ), ( "date_end -> ON THE NUMBER DATE_END", "date_end", 4, "p_single_date_end", "__init__.py", 813, ), ( "date_end -> MONTH THE NUMBER DATE_END", "date_end", 4, "p_single_date_end", "__init__.py", 814, ), ( "date_end -> THE NUMBER DATE_END OF MONTH", "date_end", 5, "p_single_date_end", "__init__.py", 815, ), ]
19.300638
2,666
0.275447
2,752
33,255
3.042515
0.094477
0.053028
0.053864
0.02723
0.684343
0.552968
0.497552
0.394363
0.325451
0.302042
0
0.196041
0.611156
33,255
1,722
2,667
19.311847
0.451473
0.002526
0
0.830123
1
0.000584
0.226038
0.011005
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
1
0
0
1
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
f870a151a0a788f5f887f730294aa2e4984ed7f4
72
py
Python
Algorithms/1. Warmup/08 - Mini-Max Sum.py
rosiejh/HackerRank
bfb07b8add04d3f3b67a61754db483f88a79e5a5
[ "Apache-2.0" ]
null
null
null
Algorithms/1. Warmup/08 - Mini-Max Sum.py
rosiejh/HackerRank
bfb07b8add04d3f3b67a61754db483f88a79e5a5
[ "Apache-2.0" ]
null
null
null
Algorithms/1. Warmup/08 - Mini-Max Sum.py
rosiejh/HackerRank
bfb07b8add04d3f3b67a61754db483f88a79e5a5
[ "Apache-2.0" ]
null
null
null
def miniMaxSum(arr): print(sum(arr) - max(arr), sum(arr) - min(arr))
36
51
0.625
12
72
3.75
0.583333
0.266667
0
0
0
0
0
0
0
0
0
0
0.152778
72
2
51
36
0.737705
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0
0.5
0.5
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
1
0
5
f8bcad4e303e9af2ada07e8e5856d06a66b97d83
24
py
Python
python/testData/completion/duplicateImportKeyword/a.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/completion/duplicateImportKeyword/a.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/completion/duplicateImportKeyword/a.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
import logging.co<caret>
24
24
0.833333
4
24
5
1
0
0
0
0
0
0
0
0
0
0
0
0.041667
24
1
24
24
0.869565
0
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
3e344b394473e46452a21a469e56b963e11994a9
179
py
Python
backenddb/camera/filters.py
sprenge/concierge
3cd8ff33a0cb0d3cd79de914fbaf4e32d277ea40
[ "MIT" ]
2
2021-01-29T23:45:22.000Z
2021-07-29T04:29:29.000Z
backenddb/camera/filters.py
sprenge/concierge
3cd8ff33a0cb0d3cd79de914fbaf4e32d277ea40
[ "MIT" ]
null
null
null
backenddb/camera/filters.py
sprenge/concierge
3cd8ff33a0cb0d3cd79de914fbaf4e32d277ea40
[ "MIT" ]
null
null
null
import django_filters from .models import Recordings class RecordingsFilter(django_filters.FilterSet): class Meta: model = Recordings fields = '__all__'
25.571429
50
0.709497
18
179
6.722222
0.722222
0.214876
0
0
0
0
0
0
0
0
0
0
0.234637
179
7
51
25.571429
0.883212
0
0
0
0
0
0.04023
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
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
3e49946225d3a28864946e1eced656e24d620282
263
py
Python
tests/test_recursive_sum.py
finico/algorithms-python
92ff5840445e50dfa8f4fb22899d70ced2d29584
[ "MIT" ]
null
null
null
tests/test_recursive_sum.py
finico/algorithms-python
92ff5840445e50dfa8f4fb22899d70ced2d29584
[ "MIT" ]
5
2018-08-31T11:13:55.000Z
2018-09-12T10:10:20.000Z
tests/test_recursive_sum.py
finico/algorithms-python
92ff5840445e50dfa8f4fb22899d70ced2d29584
[ "MIT" ]
1
2018-08-31T16:08:00.000Z
2018-08-31T16:08:00.000Z
import unittest from src.recursive_sum import recursive_sum class TestRecursiveSum(unittest.TestCase): def test_empty(self): self.assertEqual(recursive_sum([]), 0) def test_sum(self): self.assertEqual(recursive_sum([1, 22, 333]), 356)
21.916667
58
0.714829
34
263
5.352941
0.558824
0.263736
0.208791
0.307692
0.340659
0
0
0
0
0
0
0.046083
0.174905
263
11
59
23.909091
0.792627
0
0
0
0
0
0
0
0
0
0
0
0.285714
1
0.285714
false
0
0.285714
0
0.714286
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
3e50f0b886485c9b2ff8eff52a0c92920e49f317
42
py
Python
pymor/__main__.py
aslemen/pymor
41757ae2b98a69916cb26af222e9808f5baa01b6
[ "MIT" ]
null
null
null
pymor/__main__.py
aslemen/pymor
41757ae2b98a69916cb26af222e9808f5baa01b6
[ "MIT" ]
2
2020-04-15T14:29:22.000Z
2020-04-15T14:30:26.000Z
abc_depccg_parser/__main__.py
aslemen/abc-depccg-parser
ce2dd13b5e6da244c619634d091a53af99029aec
[ "MIT" ]
null
null
null
from . import cli cli.cmd_main.__call__()
14
23
0.761905
7
42
3.857143
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.119048
42
3
23
14
0.72973
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
3e552d5375db0e4ad554ff5ba39f18396110fd2d
124
py
Python
stdlib/type_mocks/sys.py
kmod/icbd
9636564eb3993afa07c6220d589bbd1991923d74
[ "MIT" ]
7
2015-04-06T15:17:13.000Z
2020-10-21T04:57:00.000Z
stdlib/type_mocks/sys.py
kmod/icbd
9636564eb3993afa07c6220d589bbd1991923d74
[ "MIT" ]
null
null
null
stdlib/type_mocks/sys.py
kmod/icbd
9636564eb3993afa07c6220d589bbd1991923d74
[ "MIT" ]
4
2016-05-16T17:53:08.000Z
2020-11-28T17:18:50.000Z
argv = [''] def exit(n): pass exit(0) stdout = open("/dev/null") stderr = open("/dev/null") stdin = open("/dev/null")
12.4
26
0.572581
19
124
3.736842
0.631579
0.295775
0.464789
0
0
0
0
0
0
0
0
0.009804
0.177419
124
9
27
13.777778
0.686275
0
0
0
0
0
0.217742
0
0
0
0
0
0
1
0.142857
false
0.142857
0
0
0.142857
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
1
0
0
0
0
0
5
3e6f273c9ef207c1837f9dfda91f1d3beb522f68
491
py
Python
aws_managers/athena/operators/comparisons.py
vahndi/aws-managers
bdbfb2b8a9258a53e3ea4dfbbfe5491a34113899
[ "MIT" ]
null
null
null
aws_managers/athena/operators/comparisons.py
vahndi/aws-managers
bdbfb2b8a9258a53e3ea4dfbbfe5491a34113899
[ "MIT" ]
null
null
null
aws_managers/athena/operators/comparisons.py
vahndi/aws-managers
bdbfb2b8a9258a53e3ea4dfbbfe5491a34113899
[ "MIT" ]
null
null
null
from aws_managers.athena.operators.mixins import ComparisonMixin class ScalarComparison(ComparisonMixin, object): def __str__(self): return f'{self.column} {self.operator} {self.value}' class TimestampComparison(ComparisonMixin, object): def __str__(self): return f'{self.column} {self.operator} timestamp {self.value}' class StringComparison(ComparisonMixin, object): def __str__(self): return f"{self.column} {self.operator} '{self.value}'"
21.347826
70
0.716904
54
491
6.277778
0.407407
0.185841
0.212389
0.238938
0.584071
0.584071
0.584071
0.584071
0.584071
0.584071
0
0
0.162933
491
22
71
22.318182
0.824818
0
0
0.3
0
0
0.281059
0
0
0
0
0
0
1
0.3
false
0
0.1
0.3
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
3e9112c3a53ba0878d6e56a5cc8445f14675c93e
588
py
Python
worker/bhamon_orchestra_worker/service_client.py
BenjaminHamon/BuildService
2ca12f9ae74e9cbf732229849f6cd6d13f40151a
[ "MIT" ]
2
2021-01-28T15:56:50.000Z
2021-03-02T06:27:09.000Z
worker/bhamon_orchestra_worker/service_client.py
BenjaminHamon/BuildService
2ca12f9ae74e9cbf732229849f6cd6d13f40151a
[ "MIT" ]
null
null
null
worker/bhamon_orchestra_worker/service_client.py
BenjaminHamon/BuildService
2ca12f9ae74e9cbf732229849f6cd6d13f40151a
[ "MIT" ]
null
null
null
import abc class ServiceClient(abc.ABC): """ Base class of a communication client for the worker with the Orchestra service """ @abc.abstractmethod def get_run(self, project_identifier: str, run_identifier: str) -> dict: pass @abc.abstractmethod def trigger_job(self, project_identifier: str, job_identifier: str, parameters: dict, source: dict) -> dict: pass @abc.abstractmethod def cancel_run(self, project_identifier: str, run_identifier: str) -> None: pass @abc.abstractmethod def abort_run(self, project_identifier: str, run_identifier: str) -> None: pass
22.615385
109
0.748299
79
588
5.417722
0.405063
0.242991
0.186916
0.224299
0.469626
0.338785
0.338785
0.338785
0.238318
0.238318
0
0
0.153061
588
25
110
23.52
0.859438
0.132653
0
0.571429
0
0
0
0
0
0
0
0
0
1
0.285714
false
0.285714
0.071429
0
0.428571
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
e40f29fedef620660a4d0674c2d1727cdfb0d470
140
py
Python
utils/__init__.py
trislaz/SimCLR
d7c8950a1afc8adad4e617e7ecd90a0d3828740f
[ "MIT" ]
null
null
null
utils/__init__.py
trislaz/SimCLR
d7c8950a1afc8adad4e617e7ecd90a0d3828740f
[ "MIT" ]
null
null
null
utils/__init__.py
trislaz/SimCLR
d7c8950a1afc8adad4e617e7ecd90a0d3828740f
[ "MIT" ]
null
null
null
from .masks import mask_correlated_samples from .yaml_config_hook import post_config_hook from .filestorage import CustomFileStorageObserver
46.666667
50
0.9
18
140
6.666667
0.666667
0.166667
0
0
0
0
0
0
0
0
0
0
0.078571
140
3
50
46.666667
0.930233
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
e425d53ef4f7ffb7b95c1bf75321f239b549bade
196
py
Python
vh/gate_proxy.py
rEinve/ajenti-v
7f3ef24198f91d7b7be42bbf0df36414d09172a4
[ "MIT" ]
150
2015-01-08T22:49:25.000Z
2021-11-13T03:15:50.000Z
vh/gate_proxy.py
rEinve/ajenti-v
7f3ef24198f91d7b7be42bbf0df36414d09172a4
[ "MIT" ]
148
2015-01-07T03:53:16.000Z
2021-10-03T16:13:57.000Z
vh/gate_proxy.py
rEinve/ajenti-v
7f3ef24198f91d7b7be42bbf0df36414d09172a4
[ "MIT" ]
91
2015-01-08T22:49:15.000Z
2022-03-17T12:04:29.000Z
from ajenti.api import plugin from ajenti.plugins.vh.api import ApplicationGatewayComponent @plugin class ProxyPass (ApplicationGatewayComponent): id = 'proxy' title = _('Reverse proxy')
24.5
61
0.77551
21
196
7.190476
0.666667
0.13245
0
0
0
0
0
0
0
0
0
0
0.142857
196
8
62
24.5
0.89881
0
0
0
0
0
0.091371
0
0
0
0
0
0
1
0
false
0.166667
0.333333
0
0.833333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
1
0
0
5
e45ebaf87023362d48dedca82f0965653903942d
220
py
Python
7_kyu/Strings_swap_vowels_case.py
UlrichBerntien/Codewars-Katas
bbd025e67aa352d313564d3862db19fffa39f552
[ "MIT" ]
null
null
null
7_kyu/Strings_swap_vowels_case.py
UlrichBerntien/Codewars-Katas
bbd025e67aa352d313564d3862db19fffa39f552
[ "MIT" ]
null
null
null
7_kyu/Strings_swap_vowels_case.py
UlrichBerntien/Codewars-Katas
bbd025e67aa352d313564d3862db19fffa39f552
[ "MIT" ]
null
null
null
VOWELS = { c for c in "aeouiAEOUI" } def swap_vowel_case_char(c :str) -> str: return c.swapcase() if c in VOWELS else c def swap_vowel_case(st: str) -> str: return "".join(swap_vowel_case_char(c) for c in st)
27.5
55
0.677273
41
220
3.439024
0.414634
0.06383
0.276596
0.099291
0.255319
0
0
0
0
0
0
0
0.2
220
7
56
31.428571
0.801136
0
0
0
0
0
0.045455
0
0
0
0
0
0
1
0.4
false
0
0
0.4
0.8
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
0
0
1
0
0
0
1
1
0
0
5
e4809902a5b64e4afe52efe953ca4f58e3d7d35f
1,852
py
Python
tests/test_theme.py
mmuldo/palette-cleanser
0da9744b72e338efdda24065a31e9336b45f51a3
[ "MIT" ]
1
2021-09-28T08:45:16.000Z
2021-09-28T08:45:16.000Z
tests/test_theme.py
mmuldo/palette-cleanser
0da9744b72e338efdda24065a31e9336b45f51a3
[ "MIT" ]
null
null
null
tests/test_theme.py
mmuldo/palette-cleanser
0da9744b72e338efdda24065a31e9336b45f51a3
[ "MIT" ]
null
null
null
from palettecleanser import palette from palettecleanser import theme from palettecleanser import config import os import pytest class TestTheme: def test_table(self, monkeypatch): monkeypatch.setattr('builtins.input', lambda _: 'y') monkeypatch.setattr(config, 'palettes_dir', os.path.join(os.path.dirname(__file__), 'test_data/fake_config/palettes')) p0 = palette.Palette([palette.Color(0, 10, 15), palette.Color(40, 10, 5)], 'hi') p0.save() p1 = palette.Palette([palette.Color(105, 10, 165), palette.Color(40, 140, 5)], 'test') p1.save() t = theme.Theme('hello', ['hi', 'test'], 'test_data/muruusa-mountain.jpg') print() print(t) def test_from_image(self, monkeypatch): monkeypatch.setattr('builtins.input', lambda _: 'y') monkeypatch.setattr(config, 'palettes_dir', os.path.join(os.path.dirname(__file__), 'test_data/fake_config/palettes')) t = theme.from_image(os.path.join(os.path.dirname(__file__), 'test_data/muruusa-mountain.jpg'), name='muruusa3') print() print(t) def test_from_config(self, monkeypatch): monkeypatch.setattr('builtins.input', lambda _: 'y') monkeypatch.setattr(config, 'palettes_dir', os.path.join(os.path.dirname(__file__), 'test_data/fake_config/palettes')) monkeypatch.setattr(config, 'themes_dir', os.path.join(os.path.dirname(__file__), 'test_data/fake_config/themes')) p0 = palette.Palette([palette.Color(0, 10, 15), palette.Color(40, 10, 5)], 'hi') p0.save() p1 = palette.Palette([palette.Color(105, 10, 165), palette.Color(40, 140, 5)], 'test') p1.save() t = theme.Theme('hello', ['hi', 'test'], 'test_data/muruusa-mountain.jpg', {'blah': 1}) t.save() t0 = theme.from_config('hello') assert t == t0
46.3
126
0.651728
243
1,852
4.781893
0.226337
0.051635
0.043029
0.051635
0.781411
0.765921
0.728055
0.728055
0.728055
0.697935
0
0.039761
0.185205
1,852
39
127
47.487179
0.730285
0
0
0.529412
0
0
0.188985
0.112311
0
0
0
0
0.029412
1
0.088235
false
0
0.147059
0
0.264706
0.117647
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
e4bb1a49555eda6a9d5ec64d9df51eb6ba2353f5
96
py
Python
venv/lib/python3.8/site-packages/future/moves/xmlrpc/client.py
GiulianaPola/select_repeats
17a0d053d4f874e42cf654dd142168c2ec8fbd11
[ "MIT" ]
2
2022-03-13T01:58:52.000Z
2022-03-31T06:07:54.000Z
venv/lib/python3.8/site-packages/future/moves/xmlrpc/client.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
19
2021-11-20T04:09:18.000Z
2022-03-23T15:05:55.000Z
venv/lib/python3.8/site-packages/future/moves/xmlrpc/client.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
null
null
null
/home/runner/.cache/pip/pool/d8/f7/e7/2f921b295c1d28fec2f01d4e52f884b6e04e6f0a07e2900f7ef1c8bd07
96
96
0.895833
9
96
9.555556
1
0
0
0
0
0
0
0
0
0
0
0.395833
0
96
1
96
96
0.5
0
0
0
0
0
0
0
0
1
0
0
0
0
null
null
0
0
null
null
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
null
1
0
0
0
1
0
0
0
0
0
0
0
0
5
e4ca799b221307dfe1c5244c325b0f7bd2b28f89
105
py
Python
lib/__init__.py
awesome-security/maryam
3dd1381598fe69af95919e1068293b178b76120e
[ "MIT" ]
1
2020-03-17T18:00:36.000Z
2020-03-17T18:00:36.000Z
lib/__init__.py
Warlockk/maryam
3dd1381598fe69af95919e1068293b178b76120e
[ "MIT" ]
null
null
null
lib/__init__.py
Warlockk/maryam
3dd1381598fe69af95919e1068293b178b76120e
[ "MIT" ]
1
2020-03-17T18:00:33.000Z
2020-03-17T18:00:33.000Z
import banner import Guide import _fileSave import check import About import color import builtwith
15
17
0.819048
14
105
6.071429
0.571429
0
0
0
0
0
0
0
0
0
0
0
0.180952
105
7
18
15
0.988372
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