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
ababdd3a25b342758777394d7e476711215c09d5
1,413
py
Python
enaml/tests/test_import_hooks.py
mmckerns/enaml
ebf417b4dce9132bffa038a588ad90436a59d37e
[ "BSD-3-Clause" ]
11
2015-01-04T14:29:23.000Z
2019-12-25T05:38:37.000Z
enaml/tests/test_import_hooks.py
mmckerns/enaml
ebf417b4dce9132bffa038a588ad90436a59d37e
[ "BSD-3-Clause" ]
36
2015-02-20T00:56:53.000Z
2020-12-04T10:02:14.000Z
enaml/tests/test_import_hooks.py
mmckerns/enaml
ebf417b4dce9132bffa038a588ad90436a59d37e
[ "BSD-3-Clause" ]
3
2015-11-19T15:11:37.000Z
2019-03-11T23:45:02.000Z
#------------------------------------------------------------------------------ # Copyright (c) 2011, Enthought, Inc. # All rights reserved. #------------------------------------------------------------------------------ import sys import unittest from enaml.core import import_hooks class FakeSys(object): def __init__(self): self.meta_path = [] class TestImportHooks(unittest.TestCase): def setUp(self): # Monkey-patch "sys" in the import_hooks module. import_hooks.sys = FakeSys() def tearDown(self): import_hooks.sys = sys def test_install_count(self): """ Test that EnamlImporter can be installed in a nested manner. """ importer = import_hooks.EnamlImporter counts = importer._install_count meta_path = import_hooks.sys.meta_path self.assertEquals(counts[importer], 0) self.assertEquals(len(meta_path), 0) importer.install() self.assertEquals(counts[importer], 1) self.assertEquals(len(meta_path), 1) importer.install() self.assertEquals(counts[importer], 2) self.assertEquals(len(meta_path), 1) importer.uninstall() self.assertEquals(counts[importer], 1) self.assertEquals(len(meta_path), 1) importer.uninstall() self.assertEquals(counts[importer], 0) self.assertEquals(len(meta_path), 0)
27.173077
79
0.577495
146
1,413
5.438356
0.349315
0.201511
0.138539
0.188917
0.450882
0.450882
0.38539
0.38539
0.38539
0.38539
0
0.012693
0.219391
1,413
51
80
27.705882
0.707162
0.235669
0
0.448276
0
0
0
0
0
0
0
0
0.344828
1
0.137931
false
0
0.62069
0
0.827586
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
2800043134d5d5de08302870c3f6dccb7535ba7d
172
py
Python
Par_Impar.py
cafesao/Programas_Python
5ccd619ff1d0ef95a85a40296b032bf49892bf15
[ "MIT" ]
1
2019-09-14T00:21:59.000Z
2019-09-14T00:21:59.000Z
Par_Impar.py
cafesao/Programas_Python
5ccd619ff1d0ef95a85a40296b032bf49892bf15
[ "MIT" ]
null
null
null
Par_Impar.py
cafesao/Programas_Python
5ccd619ff1d0ef95a85a40296b032bf49892bf15
[ "MIT" ]
null
null
null
# Mostra se o número é par ou é impar. n1 = int(input('Digite um valor: ')) if(n1 % 2 == 0): print("Este número é par.") else: print("Este número é ímpar")
21.5
39
0.581395
30
172
3.333333
0.7
0.21
0.2
0.32
0
0
0
0
0
0
0
0.031746
0.267442
172
8
40
21.5
0.761905
0.209302
0
0
0
0
0.421875
0
0
0
0
0
0
1
0
false
0
0
0
0
0.4
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
e630d65fa51c053407f22af87798745f079b5ef3
305
py
Python
synaptor/proc/edge/merge/__init__.py
ZettaAI/Synaptor
e425b4c744fca093ee5c63f41b82b3cae7898af4
[ "MIT" ]
7
2018-04-01T18:18:23.000Z
2021-09-13T07:02:16.000Z
synaptor/proc/edge/merge/__init__.py
nkemnitz/Synaptor
40618786d5b762eb3877ecac49ff310f3e6f892d
[ "MIT" ]
5
2018-10-24T19:36:03.000Z
2020-10-30T02:13:38.000Z
synaptor/proc/edge/merge/__init__.py
nkemnitz/Synaptor
40618786d5b762eb3877ecac49ff310f3e6f892d
[ "MIT" ]
6
2018-07-12T17:59:54.000Z
2020-10-30T02:29:50.000Z
from . import edges from .edges import pick_largest_edges, pick_largest_edges_arr from .edges import merge_to_cleft_df from . import merge_dups from .merge_dups import merge_duplicate_clefts from . import merge_df from .merge_df import merge_full_df from . import misc from .misc import update_id_map
23.461538
61
0.832787
51
305
4.627451
0.352941
0.233051
0.127119
0
0
0
0
0
0
0
0
0
0.134426
305
12
62
25.416667
0.893939
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
e64656ced6c208d41baa8d6d5196a322ef2bd48e
941
py
Python
tests/test_db.py
FallibleInc/ownercheck
f3d85f5e889b3815887da082911e6cabea542bc1
[ "MIT" ]
25
2016-09-01T09:53:16.000Z
2022-03-24T19:27:15.000Z
tests/test_db.py
FallibleInc/ownercheck
f3d85f5e889b3815887da082911e6cabea542bc1
[ "MIT" ]
null
null
null
tests/test_db.py
FallibleInc/ownercheck
f3d85f5e889b3815887da082911e6cabea542bc1
[ "MIT" ]
6
2016-12-24T01:52:07.000Z
2021-11-16T21:26:49.000Z
from ownercheck.db import setup_db, generate_code, get_code, remove_code from .conf import TEST_DOMAIN def test_generate_code(): setup_db() assert generate_code(TEST_DOMAIN, 'TXT') != None assert generate_code(TEST_DOMAIN, 'TXT') != generate_code( TEST_DOMAIN, 'CNAME') assert generate_code(TEST_DOMAIN, 'TXT') == generate_code( TEST_DOMAIN, 'TXT') def test_get_code(): setup_db() code = generate_code(TEST_DOMAIN, 'FILE') assert get_code(TEST_DOMAIN, 'FILE') == code assert get_code(TEST_DOMAIN, 'METATAG') == None def test_remove_code(): setup_db() file_code = generate_code(TEST_DOMAIN, 'FILE') cname_code = generate_code(TEST_DOMAIN, 'CNAME') remove_code(TEST_DOMAIN, 'FILE') new_file_code = generate_code(TEST_DOMAIN, 'FILE') new_cname_code = generate_code(TEST_DOMAIN, 'CNAME') assert file_code != new_file_code assert cname_code == new_cname_code
30.354839
72
0.713071
131
941
4.725191
0.152672
0.226171
0.294023
0.355412
0.631664
0.513732
0.397415
0.171244
0.171244
0.171244
0
0
0.176408
941
30
73
31.366667
0.79871
0
0
0.130435
1
0
0.057447
0
0
0
0
0
0.304348
1
0.130435
false
0
0.086957
0
0.217391
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
e64e9a295fcda41b0d521d41cf9ce0d098aaf43f
106
py
Python
domain/estimators/__init__.py
rcap107/holoclean
d4f5929a8e4d92d4f41eb058c04c96cdcb0af767
[ "Apache-2.0" ]
468
2018-11-11T15:40:12.000Z
2022-03-30T13:21:48.000Z
domain/estimators/__init__.py
rcap107/holoclean
d4f5929a8e4d92d4f41eb058c04c96cdcb0af767
[ "Apache-2.0" ]
43
2018-11-10T20:03:49.000Z
2020-10-20T16:39:03.000Z
domain/estimators/__init__.py
rcap107/holoclean
d4f5929a8e4d92d4f41eb058c04c96cdcb0af767
[ "Apache-2.0" ]
118
2018-11-12T19:11:42.000Z
2022-03-23T18:25:29.000Z
from .logistic import Logistic from .naive_bayes import NaiveBayes __all__ = ['Logistic', 'NaiveBayes']
17.666667
36
0.773585
12
106
6.416667
0.583333
0
0
0
0
0
0
0
0
0
0
0
0.132075
106
5
37
21.2
0.836957
0
0
0
0
0
0.169811
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
e65c46c453d743a4a9a005eb148ca3ecdc7a5504
83
py
Python
app/util/__init__.py
kk456852/Staff-attendance-system
9a60b9a0f490852d42e2c404a9933aba181ed2be
[ "Apache-2.0" ]
2
2019-05-13T09:11:30.000Z
2019-06-14T00:11:10.000Z
app/util/__init__.py
kk456852/Staff-attendance-system
9a60b9a0f490852d42e2c404a9933aba181ed2be
[ "Apache-2.0" ]
null
null
null
app/util/__init__.py
kk456852/Staff-attendance-system
9a60b9a0f490852d42e2c404a9933aba181ed2be
[ "Apache-2.0" ]
4
2019-04-25T00:54:04.000Z
2019-04-25T01:09:14.000Z
from concurrent.futures import ThreadPoolExecutor executor = ThreadPoolExecutor()
20.75
49
0.855422
7
83
10.142857
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.096386
83
3
50
27.666667
0.946667
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
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
0
0
1
0
0
0
0
4
054069c0a57b829760102e98f4be5cd2a7de51eb
59
py
Python
docs/user_guide/operation/scripts/examples/helix/post_measurement/felix_pump_ms.py
ASUPychron/pychron
dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76
[ "Apache-2.0" ]
31
2016-03-07T02:38:17.000Z
2022-02-14T18:23:43.000Z
docs/user_guide/operation/scripts/examples/helix/post_measurement/felix_pump_ms.py
ASUPychron/pychron
dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76
[ "Apache-2.0" ]
1,626
2015-01-07T04:52:35.000Z
2022-03-25T19:15:59.000Z
docs/user_guide/operation/scripts/examples/helix/post_measurement/felix_pump_ms.py
UIllinoisHALPychron/pychron
f21b79f4592a9fb9dc9a4cb2e4e943a3885ededc
[ "Apache-2.0" ]
26
2015-05-23T00:10:06.000Z
2022-03-07T16:51:57.000Z
def main(): info('Pumping spectrometer') open(name='V')
14.75
29
0.661017
8
59
4.875
1
0
0
0
0
0
0
0
0
0
0
0
0.135593
59
4
30
14.75
0.764706
0
0
0
0
0
0.35
0
0
0
0
0
0
1
0.333333
true
0
0
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
0
0
0
4
054e2188400bfb8a833fa975efed2b3e78c17c36
5,072
bzl
Python
test/starlark_tests/apple_xcframework_import_tests.bzl
wendyliga/rules_apple
ac43c1e467564d9df6b3355ff93fcaf224f2c0f9
[ "Apache-2.0" ]
null
null
null
test/starlark_tests/apple_xcframework_import_tests.bzl
wendyliga/rules_apple
ac43c1e467564d9df6b3355ff93fcaf224f2c0f9
[ "Apache-2.0" ]
null
null
null
test/starlark_tests/apple_xcframework_import_tests.bzl
wendyliga/rules_apple
ac43c1e467564d9df6b3355ff93fcaf224f2c0f9
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """apple_dynamic_xcframework_import and apple_static_xcframework_import Starlark tests.""" load( ":rules/analysis_target_outputs_test.bzl", "analysis_target_outputs_test", ) load( ":rules/apple_verification_test.bzl", "apple_verification_test", ) def apple_xcframework_import_test_suite(name): """Test suite for apple_dynamic_xcframework_import and apple_static_xcframework_import. Args: name: the base name to be used in things created by this macro """ # Test that apple_dynamic_xcframework_import can import XCFrameworks bundling dynamic frameworks analysis_target_outputs_test( name = "{}_dynamic_xcfw_import_ipa_test".format(name), target_under_test = "//test/starlark_tests/targets_under_test/ios:app_with_imported_dynamic_xcfmwk", expected_outputs = ["app_with_imported_dynamic_xcfmwk.ipa"], tags = [name], ) analysis_target_outputs_test( name = "{}_dynamic_xcfw_import_with_lib_ids_ipa_test".format(name), target_under_test = "//test/starlark_tests/targets_under_test/ios:app_with_imported_dynamic_xcfmwk_with_lib_ids", expected_outputs = ["app_with_imported_dynamic_xcfmwk_with_lib_ids.ipa"], tags = [name], ) apple_verification_test( name = "{}_imported_dynamic_xcfmwk_codesign_test".format(name), build_type = "simulator", target_under_test = "//test/starlark_tests/targets_under_test/ios:app_with_imported_dynamic_xcfmwk", verifier_script = "verifier_scripts/codesign_verifier.sh", tags = [name], ) # Test that apple_static_xcframework_import can import XCFrameworks bundling static frameworks analysis_target_outputs_test( name = "{}_xcfmwk_bundling_static_fmwks_ipa_test".format(name), target_under_test = "//test/starlark_tests/targets_under_test/ios:app_with_imported_xcfmwk_bundling_static_fmwks", expected_outputs = ["app_with_imported_xcfmwk_bundling_static_fmwks.ipa"], tags = [name], ) apple_verification_test( name = "{}_xcfmwk_bundling_static_xcfmwks_codesign_test".format(name), build_type = "simulator", target_under_test = "//test/starlark_tests/targets_under_test/ios:app_with_imported_xcfmwk_bundling_static_fmwks", verifier_script = "verifier_scripts/codesign_verifier.sh", tags = [name], ) # Test that apple_static_xcframework_import can import XCFrameworks # bundling static libraries and make them usable from objc_library analysis_target_outputs_test( name = "{}_static_xcfw_import_ipa_test".format(name), target_under_test = "//test/starlark_tests/targets_under_test/ios:app_with_imported_static_xcfmwk", expected_outputs = ["app_with_imported_static_xcfmwk.ipa"], tags = [name], ) analysis_target_outputs_test( name = "{}_static_xcfw_import_with_lib_ids_ipa_test".format(name), target_under_test = "//test/starlark_tests/targets_under_test/ios:app_with_imported_static_xcfmwk_with_lib_ids", expected_outputs = ["app_with_imported_static_xcfmwk_with_lib_ids.ipa"], tags = [name], ) apple_verification_test( name = "{}_imported_static_xcfmwk_codesign_test".format(name), build_type = "simulator", target_under_test = "//test/starlark_tests/targets_under_test/ios:app_with_imported_static_xcfmwk", verifier_script = "verifier_scripts/codesign_verifier.sh", tags = [name], ) # Test that apple_static_xcframework_import can import XCFrameworks # bundling static libraries with module maps make them usable from # swift_library analysis_target_outputs_test( name = "{}_static_xcfw_with_module_map_import_ipa_test".format(name), target_under_test = "//test/starlark_tests/targets_under_test/ios:app_with_imported_static_xcfmwk_with_module_map", expected_outputs = ["app_with_imported_static_xcfmwk_with_module_map.ipa"], tags = [name], ) apple_verification_test( name = "{}_imported_static_xcfmwk_with_module_map_codesign_test".format(name), build_type = "simulator", target_under_test = "//test/starlark_tests/targets_under_test/ios:app_with_imported_static_xcfmwk_with_module_map", verifier_script = "verifier_scripts/codesign_verifier.sh", tags = [name], ) native.test_suite( name = name, tags = [name], )
42.983051
123
0.740536
644
5,072
5.375776
0.201863
0.051993
0.069324
0.054882
0.757366
0.740035
0.708839
0.6658
0.606586
0.50751
0
0.001912
0.175079
5,072
117
124
43.350427
0.825526
0.25276
0
0.506494
0
0
0.49186
0.482252
0
0
0
0
0
1
0.012987
false
0
0.324675
0
0.337662
0
0
0
0
null
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
057bd23dfa69c8e2736d3156b3cd47320bab47dd
113
py
Python
src/hoge.py
sablet/pytest_template
e74c0a8b8f2d22641b5aac4610e20d854727a6b0
[ "MIT" ]
null
null
null
src/hoge.py
sablet/pytest_template
e74c0a8b8f2d22641b5aac4610e20d854727a6b0
[ "MIT" ]
null
null
null
src/hoge.py
sablet/pytest_template
e74c0a8b8f2d22641b5aac4610e20d854727a6b0
[ "MIT" ]
null
null
null
def hoge(): return "hogehoge" class MyApp: def __init__(self): self.i = "i" self.k = "k"
16.142857
23
0.513274
15
113
3.6
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.336283
113
7
24
16.142857
0.72
0
0
0
0
0
0.087719
0
0
0
0
0
0
1
0.333333
false
0
0
0.166667
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
4
057c32b323ccbe770a60fb12e7cf26fbb42fa87c
181
py
Python
posts/admin.py
dertrockx/social-media-rant
ff1247ab5566ebffb951f41f561963b7a8f88b1b
[ "MIT" ]
1
2018-08-18T20:47:30.000Z
2018-08-18T20:47:30.000Z
posts/admin.py
dertrockx/social-media-rant
ff1247ab5566ebffb951f41f561963b7a8f88b1b
[ "MIT" ]
null
null
null
posts/admin.py
dertrockx/social-media-rant
ff1247ab5566ebffb951f41f561963b7a8f88b1b
[ "MIT" ]
null
null
null
from django.contrib import admin from . import models # Register your models here. admin.site.register(models.Post) class CommetInline(admin.TabularInline): model = models.Comment
25.857143
40
0.80663
24
181
6.083333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.110497
181
7
41
25.857143
0.906832
0.143646
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.4
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
0584050579f6a4b57c7f55eae022452cca9ecb94
120
py
Python
opentapioca/externalid/externalid.py
ziodave/opentapioca
e4d5d41c1fdb199a49745c3efc2a02c6d74be315
[ "Apache-2.0" ]
null
null
null
opentapioca/externalid/externalid.py
ziodave/opentapioca
e4d5d41c1fdb199a49745c3efc2a02c6d74be315
[ "Apache-2.0" ]
null
null
null
opentapioca/externalid/externalid.py
ziodave/opentapioca
e4d5d41c1fdb199a49745c3efc2a02c6d74be315
[ "Apache-2.0" ]
null
null
null
from abc import ABC, abstractmethod class ExternalId(ABC): @abstractmethod def get(self, item): pass
13.333333
35
0.666667
14
120
5.714286
0.785714
0.425
0
0
0
0
0
0
0
0
0
0
0.258333
120
8
36
15
0.898876
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0.2
0.2
0
0.6
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4
5527ff3dc18654e9af57260c7354cc4b8877342f
234
py
Python
cyoa/adventures/admin.py
joannatao97/django-cyoa
a867be55ccc8a8a3e5d499b12b5b94ca7f4b1701
[ "BSD-3-Clause" ]
1
2021-08-18T20:56:07.000Z
2021-08-18T20:56:07.000Z
cyoa/adventures/admin.py
joannatao97/django-cyoa
a867be55ccc8a8a3e5d499b12b5b94ca7f4b1701
[ "BSD-3-Clause" ]
null
null
null
cyoa/adventures/admin.py
joannatao97/django-cyoa
a867be55ccc8a8a3e5d499b12b5b94ca7f4b1701
[ "BSD-3-Clause" ]
null
null
null
from django.contrib import admin from .models import Question, Choice, Adventure # Register your models here. # Used django's tutorials heavily admin.site.register(Question) admin.site.register(Choice) admin.site.register(Adventure)
26
47
0.811966
32
234
5.9375
0.53125
0.142105
0.268421
0
0
0
0
0
0
0
0
0
0.102564
234
9
48
26
0.904762
0.247863
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
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
0
1
0
1
0
0
0
0
4
552a95dc25edf1092263ef59a6216850d68bc93a
516
py
Python
old/install/install.py
MathieuBrillard/le_tavernier
45f27bb20b47478f5d2ea92c2433cfffb32ddbb8
[ "MIT" ]
null
null
null
old/install/install.py
MathieuBrillard/le_tavernier
45f27bb20b47478f5d2ea92c2433cfffb32ddbb8
[ "MIT" ]
null
null
null
old/install/install.py
MathieuBrillard/le_tavernier
45f27bb20b47478f5d2ea92c2433cfffb32ddbb8
[ "MIT" ]
null
null
null
import os print("The libs necessary to run bot.py will be downloaded...") os.system("python -m pip install discord.py") os.system("python -m pip install python-dotenv") os.system("python -m pip install PyNaCl") os.system("python -m pip install youtube-search-python") os.system("python -m pip install asyncio") os.system("python -m pip install requests") os.system("python -m pip install urllib3") os.system("python -m pip install numpy") os.system("python -m pip install Pillow") print("Installation finished.")
32.25
63
0.744186
83
516
4.626506
0.361446
0.1875
0.328125
0.351563
0.585938
0.585938
0
0
0
0
0
0.002198
0.118217
516
15
64
34.4
0.841758
0
0
0
0
0
0.69186
0.040698
0
0
0
0
0
1
0
true
0
0.083333
0
0.083333
0.166667
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
1
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
553e78baff219019db9d7b6a3c45911d7432b85e
136
py
Python
limix/util/url.py
fpcasale/limix
a6bc2850f243fe779991bb53a24ddbebe0ab74d2
[ "Apache-2.0" ]
null
null
null
limix/util/url.py
fpcasale/limix
a6bc2850f243fe779991bb53a24ddbebe0ab74d2
[ "Apache-2.0" ]
null
null
null
limix/util/url.py
fpcasale/limix
a6bc2850f243fe779991bb53a24ddbebe0ab74d2
[ "Apache-2.0" ]
null
null
null
import sys PY2 = sys.version_info < (3, ) if PY2: from urllib import urlretrieve else: from urllib.request import urlretrieve
15.111111
42
0.720588
19
136
5.105263
0.631579
0.206186
0
0
0
0
0
0
0
0
0
0.028037
0.213235
136
8
43
17
0.878505
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
5563969f5153fec097d618096c636c7f3389359b
142
py
Python
dogechia/util/default_root.py
hagbardcelene/doge-chia
72bdf0a7b20a579fe4645f0cb132955e181e1c44
[ "Apache-2.0" ]
27
2021-07-06T16:33:50.000Z
2022-02-19T21:11:25.000Z
dogechia/util/default_root.py
hagbardcelene/doge-chia
72bdf0a7b20a579fe4645f0cb132955e181e1c44
[ "Apache-2.0" ]
15
2021-07-07T02:32:59.000Z
2021-10-15T21:19:51.000Z
dogechia/util/default_root.py
hagbardcelene/doge-chia
72bdf0a7b20a579fe4645f0cb132955e181e1c44
[ "Apache-2.0" ]
12
2021-07-08T15:36:20.000Z
2022-03-15T08:34:01.000Z
import os from pathlib import Path DEFAULT_ROOT_PATH = Path(os.path.expanduser(os.getenv("DOGECHIA_ROOT", "~/.dogechia/mainnet"))).resolve()
28.4
105
0.767606
20
142
5.3
0.6
0
0
0
0
0
0
0
0
0
0
0
0.077465
142
4
106
35.5
0.80916
0
0
0
0
0
0.225352
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
559574c1d6428d6a19511c1b133308b14acf511f
204
py
Python
app/eids/__init__.py
ETspielberg/sdg_query_execution
6e95d4d6e158f72e2aa61c64ba3aac5980b14e5b
[ "MIT" ]
null
null
null
app/eids/__init__.py
ETspielberg/sdg_query_execution
6e95d4d6e158f72e2aa61c64ba3aac5980b14e5b
[ "MIT" ]
2
2021-03-31T18:47:27.000Z
2021-12-13T19:50:45.000Z
app/eids/__init__.py
Aurora-Network-Global/sdg_query_execution
74375faa41656adef13ab472c2f4f4b2097a955a
[ "MIT" ]
2
2018-09-21T07:42:17.000Z
2021-08-02T15:58:45.000Z
""" The eids Blueprint handles the creation and retrieval of EID lists """ from flask import Blueprint eids_blueprint = Blueprint('eids', __name__, template_folder='templates') from . import eids_routes
25.5
73
0.784314
27
204
5.666667
0.666667
0.169935
0
0
0
0
0
0
0
0
0
0
0.132353
204
7
74
29.142857
0.864407
0.323529
0
0
0
0
0.1
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0.666667
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
1
0
4
e95b7f14ecf9ceb4a3f518a2504448710e754a95
140
py
Python
deneme.py
cobanov/pyturkce
b3661955a0bd0ae56ebbda5ee403028b2d6a35c2
[ "MIT" ]
12
2021-11-14T18:56:14.000Z
2022-03-01T21:12:35.000Z
deneme.py
cobanov/pyturkce
b3661955a0bd0ae56ebbda5ee403028b2d6a35c2
[ "MIT" ]
null
null
null
deneme.py
cobanov/pyturkce
b3661955a0bd0ae56ebbda5ee403028b2d6a35c2
[ "MIT" ]
1
2021-11-15T11:11:37.000Z
2021-11-15T11:11:37.000Z
from pyturkce import pyturkce kelime = pyturkce.Sozluk('televizyon') print(kelime.anlamlar) print(kelime.deyimler) print(kelime.ornekler)
17.5
38
0.807143
17
140
6.647059
0.588235
0.292035
0
0
0
0
0
0
0
0
0
0
0.085714
140
7
39
20
0.882813
0
0
0
0
0
0.071429
0
0
0
0
0
0
1
0
false
0
0.2
0
0.2
0.6
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
e9bdef905ac90a82eb2769b524573c6f93f04b17
242
py
Python
Gachon_Bus_Backend/api/serializers.py
gachonswdm/Gachon_Bus_Backend
57c270a6a0c58557b58f0faea2faeffe4f23ffee
[ "MIT" ]
2
2019-05-23T16:23:06.000Z
2019-05-24T04:04:00.000Z
Gachon_Bus_Backend/api/serializers.py
gachonswdm/Gachon_Bus_Backend
57c270a6a0c58557b58f0faea2faeffe4f23ffee
[ "MIT" ]
9
2019-06-17T11:31:27.000Z
2022-02-10T11:35:03.000Z
Gachon_Bus_Backend/api/serializers.py
gachonswdm/Gachon_Bus_Backend
57c270a6a0c58557b58f0faea2faeffe4f23ffee
[ "MIT" ]
1
2019-05-24T03:52:56.000Z
2019-05-24T03:52:56.000Z
from .models import location from rest_framework import serializers class LocationSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = location fields = ('bus_id', 'phone_id', 'latitude', 'longitude')
26.888889
65
0.735537
24
242
7.291667
0.75
0
0
0
0
0
0
0
0
0
0
0
0.177686
242
8
66
30.25
0.879397
0
0
0
0
0
0.128099
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
e9cf431161c6be0f4d3b3639d58e33ceaae6b2c9
335
py
Python
qa/models.py
gskdhiman/medical_qa
ccd74a3bd06130f3a9a05b3fd82b97037d73a337
[ "Apache-2.0" ]
null
null
null
qa/models.py
gskdhiman/medical_qa
ccd74a3bd06130f3a9a05b3fd82b97037d73a337
[ "Apache-2.0" ]
null
null
null
qa/models.py
gskdhiman/medical_qa
ccd74a3bd06130f3a9a05b3fd82b97037d73a337
[ "Apache-2.0" ]
null
null
null
from django.db import models class QuestionAnswer(models.Model): # id = models.IntegerField(max_length=10, unique=True,auto_now_add=True) question = models.CharField(max_length=100) context = models.CharField(max_length=100) answer = models.CharField(max_length=100) def __str__(self): return self.answer
30.454545
76
0.737313
45
335
5.266667
0.6
0.151899
0.227848
0.303797
0.341772
0
0
0
0
0
0
0.039146
0.161194
335
11
77
30.454545
0.80427
0.208955
0
0
0
0
0
0
0
0
0
0
0
1
0.142857
false
0
0.142857
0.142857
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
0
0
0
0
1
1
0
0
4
e9da6f56661a72fed52f55e8fb69bb671fb442bd
224
py
Python
scribeui_pyramid/modules/plugins/setextent/__init__.py
smercier/scribeui
916ce164016311831b223c565bf57a11fc3522ce
[ "MIT" ]
null
null
null
scribeui_pyramid/modules/plugins/setextent/__init__.py
smercier/scribeui
916ce164016311831b223c565bf57a11fc3522ce
[ "MIT" ]
null
null
null
scribeui_pyramid/modules/plugins/setextent/__init__.py
smercier/scribeui
916ce164016311831b223c565bf57a11fc3522ce
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- def routes_plugins(config): #config.add_route('setextent.test', '/setextent/test') pass def includeme(config): #config.include(routes_plugins, route_prefix='plugins') config.scan('.')
22.4
59
0.678571
27
224
5.481481
0.592593
0.175676
0
0
0
0
0
0
0
0
0
0.005181
0.138393
224
9
60
24.888889
0.761658
0.571429
0
0
0
0
0.01087
0
0
0
0
0
0
1
0.5
false
0.25
0
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
4
7567dff1a9505537d88f6514a2eef3aac5f85abe
178
py
Python
src/errors.py
cscorley/triage
b7a2de8c5955418acf2b9bd93953a83327052257
[ "MIT" ]
3
2019-01-13T13:03:53.000Z
2020-05-03T21:34:43.000Z
src/errors.py
cscorley/triage
b7a2de8c5955418acf2b9bd93953a83327052257
[ "MIT" ]
null
null
null
src/errors.py
cscorley/triage
b7a2de8c5955418acf2b9bd93953a83327052257
[ "MIT" ]
1
2018-09-30T13:42:10.000Z
2018-09-30T13:42:10.000Z
#!/usr/bin/env python2 # -*- coding: utf-8 -*- from __future__ import print_function import logging logger = logging.getLogger('errors') class TaserError(Exception): pass
16.181818
37
0.724719
22
178
5.636364
0.909091
0
0
0
0
0
0
0
0
0
0
0.013158
0.146067
178
10
38
17.8
0.802632
0.241573
0
0
0
0
0.045113
0
0
0
0
0
0
1
0
false
0.2
0.4
0
0.6
0.2
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
1
0
0
4
7594eadbd0563657bb91a41bd3c9c1790b6a4362
2,333
py
Python
data/transcoder_evaluation_gfg/python/COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X.py
mxl1n/CodeGen
e5101dd5c5e9c3720c70c80f78b18f13e118335a
[ "MIT" ]
241
2021-07-20T08:35:20.000Z
2022-03-31T02:39:08.000Z
data/transcoder_evaluation_gfg/python/COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X.py
mxl1n/CodeGen
e5101dd5c5e9c3720c70c80f78b18f13e118335a
[ "MIT" ]
49
2021-07-22T23:18:42.000Z
2022-03-24T09:15:26.000Z
data/transcoder_evaluation_gfg/python/COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X.py
mxl1n/CodeGen
e5101dd5c5e9c3720c70c80f78b18f13e118335a
[ "MIT" ]
71
2021-07-21T05:17:52.000Z
2022-03-29T23:49:28.000Z
# Copyright (c) 2019-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # def f_gold ( arr1 , arr2 , m , n , x ) : count = 0 for i in range ( m ) : for j in range ( n ) : if arr1 [ i ] + arr2 [ j ] == x : count = count + 1 return count #TOFILL if __name__ == '__main__': param = [ ([11, 13, 16, 23, 26, 28, 31, 34, 37, 39, 44, 48, 56, 59, 79, 91, 96, 98],[1, 1, 9, 14, 17, 23, 26, 31, 33, 36, 53, 60, 71, 75, 76, 84, 87, 88],9,15,11,), ([50, 14, -98, 14, 90, 36, 66, 44, 10, -98, -24, -36, -32, -50],[34, -6, -66, 0, -6, 82, 60, -98, -8, 60, -2, 4, 22, 76],11,12,8,), ([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],14,9,12,), ([88, 14, 29, 87, 86, 58],[91, 95, 64, 4, 63, 35],3,5,5,), ([-98, -92, -88, -86, -82, -76, -72, -66, -56, -48, -34, -28, -28, -26, -20, -18, -18, -16, -16, -12, -4, 0, 6, 12, 16, 20, 22, 30, 34, 34, 36, 56, 58, 62, 64, 80, 82, 94],[-94, -90, -88, -84, -82, -78, -76, -72, -70, -58, -58, -46, -42, -40, -40, -32, -22, -20, -18, -12, -8, -6, 6, 6, 18, 20, 34, 46, 60, 62, 66, 72, 72, 76, 76, 78, 92, 98],34,32,23,), ([1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0],[1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0],39,26,34,), ([70, 70, 74],[15, 55, 84],1,1,1,), ([-20, -12, -50, 76, 24, 64, -22, -4, -68],[18, 98, -88, 86, 72, -44, 82, 94, 58],5,4,7,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],27,26,37,), ([68, 75, 51, 45, 73, 95, 48, 53, 70, 41, 65, 47, 46, 43, 79, 29, 50],[4, 6, 76, 65, 16, 13, 85, 43, 31, 14, 81, 90, 24, 87, 40, 25, 88],10,10,9,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
66.657143
358
0.442778
536
2,333
1.895522
0.251866
0.151575
0.177165
0.19685
0.19685
0.188976
0.173228
0.163386
0.152559
0.141732
0
0.391563
0.278611
2,333
35
359
66.657143
0.212121
0.079297
0
0
0
0
0.01121
0
0
0
0
0
0
1
0.04
false
0
0
0
0.08
0.04
0
0
1
null
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
7599997156c9d6e6623ef2dfb946ffd878d9e8f4
109
py
Python
ElementTests.py
Eats-Own-Dog-Food/SAO
739c2e98cac701a9de6719c1de31961aae739901
[ "Apache-2.0" ]
null
null
null
ElementTests.py
Eats-Own-Dog-Food/SAO
739c2e98cac701a9de6719c1de31961aae739901
[ "Apache-2.0" ]
null
null
null
ElementTests.py
Eats-Own-Dog-Food/SAO
739c2e98cac701a9de6719c1de31961aae739901
[ "Apache-2.0" ]
null
null
null
''' tests go here ''' from GameBoard import * import unittest class ElementMethodsTest(unittest.TestCase):
12.111111
44
0.761468
12
109
6.916667
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.137615
109
8
45
13.625
0.882979
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0.666667
null
null
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
1
0
0
0
1
0
0
0
0
4
75aee1f6e11034e2c20928870224bbc1472692b8
805
py
Python
example-model-combine.py
AnEvilBurrito/model-builder
f1a7d3a53c7d40b359a5e6521a51869f307ef48c
[ "MIT" ]
null
null
null
example-model-combine.py
AnEvilBurrito/model-builder
f1a7d3a53c7d40b359a5e6521a51869f307ef48c
[ "MIT" ]
null
null
null
example-model-combine.py
AnEvilBurrito/model-builder
f1a7d3a53c7d40b359a5e6521a51869f307ef48c
[ "MIT" ]
null
null
null
import numpy as np from src.OdeModel import OdeModel import src.reactions as re # PPI_Motif1 = OdeModel('PPI_1') # PPI_Motif1.addReaction(re.MassAction('A', 'P')) # PPI_Motif1.specieConc(['A', 'P'], [100, 100]) # PPI_Motif2 = OdeModel('PPI_2') # PPI_Motif2.addReaction(re.MassAction('B', 'P')) # PPI_Motif2.specieConc(['B', 'P'], [100, 100]) # coupled_PPI = PPI_Motif1.combine(PPI_Motif2, 'Coupled_PPI') # coupled_PPI.simulate_beta(200) # coupled_PPI.plot() # forwardOnly = OdeModel('f') # forwardOnly.addReaction(re.MichaelisMentenGeneral('A', 'B',noBackward=True)) # forwardOnly.addReaction(re.Synthesis('A')) # forwardOnly.addReaction(re.Degradation('A')) # forwardOnly.addReaction(re.Degradation('B')) # forwardOnly.specieConc(['A'],[100]) # forwardOnly.simulate_beta(10) # forwardOnly.plot()
27.758621
78
0.724224
105
805
5.4
0.333333
0.137566
0.169312
0.088183
0.126984
0
0
0
0
0
0
0.040928
0.089441
805
29
79
27.758621
0.732606
0.847205
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
75dc6990aff6acbcf7cd5a35154c777c85f40e8a
860
py
Python
main.py
cricalix/nmea-logger
8eb975256eb626c9fcdbde9daf30e02107bcaeb9
[ "MIT" ]
null
null
null
main.py
cricalix/nmea-logger
8eb975256eb626c9fcdbde9daf30e02107bcaeb9
[ "MIT" ]
null
null
null
main.py
cricalix/nmea-logger
8eb975256eb626c9fcdbde9daf30e02107bcaeb9
[ "MIT" ]
null
null
null
from machine import Timer import machine import rgb import ili9431 if __name__ == "__main__": ''' MicroPython will call this code on startup, after boot.py has run. This makes boot.py a good place to initialise the network stack, leaving this code to do the heavy lifting. Use timers and callbacks to listen for data, then go idle() for a period of time. Works whether the board has just booted, or has been running for a while. Timestamps need to be pulled from GPS data coming in via NMEA sentences, because the ESP8266 has a terrible RTC. Adafruit offer hardware for their Feather line of boards that implements a battery-backed RTC. However, given this code is meant to be logging NMEA data on a boat, which will invariably involve a GPS source, the time can be pulled from there. ''' pass
35.833333
78
0.725581
139
860
4.431655
0.676259
0.038961
0.038961
0
0
0
0
0
0
0
0
0.012214
0.238372
860
23
79
37.391304
0.928244
0
0
0
0
0
0.072727
0
0
0
0
0
0
1
0
true
0.166667
0.666667
0
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
1
0
0
4
75e9581657ce1415834b58509d175d061a600609
205
py
Python
chapter05/test/test_module04.py
codingEzio/code_python_book_001
d9dd7a3d40c4c34c2ae8d08222aba989631abd88
[ "Unlicense" ]
null
null
null
chapter05/test/test_module04.py
codingEzio/code_python_book_001
d9dd7a3d40c4c34c2ae8d08222aba989631abd88
[ "Unlicense" ]
null
null
null
chapter05/test/test_module04.py
codingEzio/code_python_book_001
d9dd7a3d40c4c34c2ae8d08222aba989631abd88
[ "Unlicense" ]
null
null
null
import pytest # Hmm.. Fixtures like this are far easy to understand!! @pytest.fixture() def fixture01(): print("\nIn fixture01()...") def test_case01(fixture01): print("\nIn test_case01()...")
17.083333
55
0.668293
26
205
5.192308
0.692308
0.207407
0.251852
0
0
0
0
0
0
0
0
0.05814
0.160976
205
11
56
18.636364
0.726744
0.258537
0
0
0
0
0.268456
0
0
0
0
0
0
1
0.333333
false
0
0.166667
0
0.5
0.333333
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
f932b54cde464ec7124e47bde1d02a1ee533a1a5
128
py
Python
admintmpl/urls.py
ganeshkbhat/pr
206a79bfab264b3410076352c11aa628e694cfdf
[ "MIT" ]
1
2021-09-11T13:01:40.000Z
2021-09-11T13:01:40.000Z
admintmpl/urls.py
ganeshkbhat/pr
206a79bfab264b3410076352c11aa628e694cfdf
[ "MIT" ]
null
null
null
admintmpl/urls.py
ganeshkbhat/pr
206a79bfab264b3410076352c11aa628e694cfdf
[ "MIT" ]
null
null
null
from django.contrib import admin from django.urls import path, include urlpatterns = [ # path('dash/', admin.site.urls) ]
18.285714
37
0.710938
17
128
5.352941
0.647059
0.21978
0
0
0
0
0
0
0
0
0
0
0.171875
128
7
38
18.285714
0.858491
0.234375
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
f93c356237521560436c07552b4e788386d636ae
182
py
Python
lesson 7/cython/cy_primes.py
gtpedrosa/Python4WindEnergy
f8ad09018420cfb3a419173f97b129de7118d814
[ "Apache-2.0" ]
48
2015-01-19T18:21:10.000Z
2021-11-27T22:41:06.000Z
lesson 7/cython/cy_primes.py
arash7444/Python4WindEnergy
8f97a5f86e81ce01d80dafb6f8104165fd3ad397
[ "Apache-2.0" ]
1
2016-05-24T06:07:07.000Z
2016-05-24T08:26:29.000Z
lesson 7/cython/cy_primes.py
arash7444/Python4WindEnergy
8f97a5f86e81ce01d80dafb6f8104165fd3ad397
[ "Apache-2.0" ]
24
2015-06-26T14:44:07.000Z
2021-06-07T18:36:52.000Z
def primes(n): count = 0 for i in xrange(2,n): for j in xrange(2,i): if i%j==0: break else: count+=1 return count
20.222222
29
0.412088
27
182
2.777778
0.592593
0.213333
0.24
0
0
0
0
0
0
0
0
0.053191
0.483516
182
9
30
20.222222
0.744681
0
0
0
0
0
0
0
0
0
0
0
0
1
0.111111
false
0
0
0
0.222222
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
f93f478176af2e24100825260abe54c35a26b9ef
2,107
py
Python
python_etl/ExtractVocab.py
science-automation/ETL-Synthea-Python
8840475755a84ca37d5091d41b06e227216d511a
[ "Apache-2.0" ]
3
2020-04-29T13:09:45.000Z
2021-04-14T19:47:35.000Z
python_etl/ExtractVocab.py
science-automation/ETL-Synthea-Python
8840475755a84ca37d5091d41b06e227216d511a
[ "Apache-2.0" ]
null
null
null
python_etl/ExtractVocab.py
science-automation/ETL-Synthea-Python
8840475755a84ca37d5091d41b06e227216d511a
[ "Apache-2.0" ]
1
2021-04-14T19:47:43.000Z
2021-04-14T19:47:43.000Z
import pandas as pd import datetime import dateutil.parser # # given a synthea input set, find all concept and concept_relationships needed # class ExtractVocab: # # Check the model matches # def __init__(self, model_schema): self.model_schema = model_schema def getConceptExtract(self, df, concept, domain): syntheaconcept = pd.DataFrame(columns=['code']) syntheaconcept['code'] = df['CODE'].drop_duplicates() domainconcept = concept[concept["domain_id"]==domain] return pd.merge(domainconcept, syntheaconcept, left_on='concept_code', right_on='code', how='inner').drop(columns=['code']) # take concepts and find all related concept relationships that "map to" def getConceptRelationshipExtract(self, concept_relationship, concept): df1 = pd.merge(concept_relationship, concept[['concept_id']], left_on='concept_id_1', right_on='concept_id', how='inner').drop(columns=['concept_id']) df2 = pd.merge(concept_relationship, concept[['concept_id']], left_on='concept_id_2', right_on='concept_id', how='inner').drop(columns=['concept_id']) conrel = df1.append(df2) return conrel.loc[conrel['relationship_id'] == 'Maps to'] def conditionsExtract(self, df, concept): df1 = self.getConceptExtract(df, concept, 'Condition') df2 = self.getConceptExtract(df, concept, 'Drug') df3 = self.getConceptExtract(df, concept, 'Observation') return df1.append(df2).append(df3) def observationsExtract(self, df, concept): return self.getConceptExtract(df, concept, 'Measurement') def proceduresExtract(self, df, concept): return self.getConceptExtract(df, concept, 'Procedure') def immunizationsExtract(self, df, concept): return self.getConceptExtract(df, concept, 'Drug') def encountersExtract(self, df, vocab): pass def allergiesExtract(self, df, vocab): return self.getConceptExtract(df, concept, 'Observation') def medicationsExtract(self, df, concept): return self.getConceptExtract(df, concept, 'Drug')
41.313725
158
0.6972
242
2,107
5.942149
0.318182
0.087622
0.127955
0.166898
0.367177
0.282337
0.282337
0.282337
0.214186
0.140473
0
0.00694
0.179402
2,107
50
159
42.14
0.824754
0.081158
0
0.060606
0
0
0.116701
0
0
0
0
0
0
1
0.30303
false
0.030303
0.090909
0.151515
0.666667
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
f980893816fc22ef67b6656e49788028ce4f02ab
36
py
Python
__init__.py
Shivamagrawal2014/pylot
d4b43f3146fced20fbced575d2c24a82f17f25b7
[ "MIT" ]
null
null
null
__init__.py
Shivamagrawal2014/pylot
d4b43f3146fced20fbced575d2c24a82f17f25b7
[ "MIT" ]
null
null
null
__init__.py
Shivamagrawal2014/pylot
d4b43f3146fced20fbced575d2c24a82f17f25b7
[ "MIT" ]
null
null
null
""" Declaring __init__.py file """
9
27
0.638889
4
36
4.75
1
0
0
0
0
0
0
0
0
0
0
0
0.166667
36
3
28
12
0.633333
0.722222
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
f991d9188f4634220a1d8afb0195e1a6d1996f2e
69
py
Python
test.py
SuzieDou/Casimir_programming1
9b6b71f88bc972fcdc58d0510214c661f881dc48
[ "Apache-2.0" ]
null
null
null
test.py
SuzieDou/Casimir_programming1
9b6b71f88bc972fcdc58d0510214c661f881dc48
[ "Apache-2.0" ]
null
null
null
test.py
SuzieDou/Casimir_programming1
9b6b71f88bc972fcdc58d0510214c661f881dc48
[ "Apache-2.0" ]
null
null
null
print('hello world') print('good morning') print('Nice to meet you')
17.25
25
0.710145
11
69
4.454545
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.115942
69
3
26
23
0.803279
0
0
0
0
0
0.565217
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
ddc15be892b5b4accf920e104c8aaf080863e450
185
py
Python
tkmodel.py
cludtk/freedomain
856a649833951994b207f348b1a0dd434163048f
[ "MIT" ]
null
null
null
tkmodel.py
cludtk/freedomain
856a649833951994b207f348b1a0dd434163048f
[ "MIT" ]
null
null
null
tkmodel.py
cludtk/freedomain
856a649833951994b207f348b1a0dd434163048f
[ "MIT" ]
null
null
null
__author__ = 'cvl' class Domain_model(): def __init__(self, json_dict): self.free_domains = json_dict['free_domains'] self.paid_domains = json_dict['paid_domains']
26.428571
53
0.691892
24
185
4.666667
0.541667
0.214286
0.267857
0
0
0
0
0
0
0
0
0
0.189189
185
7
54
26.428571
0.746667
0
0
0
0
0
0.145161
0
0
0
0
0
0
1
0.2
false
0
0
0
0.4
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
ddea030b609b2656ab2a58954f5aa1d0694f6b66
32
py
Python
generator/__init__.py
briglx/AzureConvertJson
193c0d29b4f3d9ce2612ce612da39a8db25b0b52
[ "MIT" ]
null
null
null
generator/__init__.py
briglx/AzureConvertJson
193c0d29b4f3d9ce2612ce612da39a8db25b0b52
[ "MIT" ]
null
null
null
generator/__init__.py
briglx/AzureConvertJson
193c0d29b4f3d9ce2612ce612da39a8db25b0b52
[ "MIT" ]
null
null
null
"""Init file for Generators."""
16
31
0.65625
4
32
5.25
1
0
0
0
0
0
0
0
0
0
0
0
0.125
32
1
32
32
0.75
0.78125
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
fb0998387ac3e579039314b390558c6f17908607
161
py
Python
virtual/bin/django-admin.py
Steve-design/Jirani
e386b1ede05f6c2067af2621c21ce802ec72ae73
[ "MIT" ]
null
null
null
virtual/bin/django-admin.py
Steve-design/Jirani
e386b1ede05f6c2067af2621c21ce802ec72ae73
[ "MIT" ]
8
2020-02-12T03:21:51.000Z
2022-03-12T00:07:01.000Z
virtual/bin/django-admin.py
Steve-design/Jirani
e386b1ede05f6c2067af2621c21ce802ec72ae73
[ "MIT" ]
null
null
null
#!/home/nancy/Desktop/Python/Jirani/virtual/bin/python from django.core import management if __name__ == "__main__": management.execute_from_command_line()
26.833333
54
0.78882
21
161
5.52381
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.093168
161
5
55
32.2
0.794521
0.329193
0
0
0
0
0.074766
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
fb34135ceef625e6bf60047c3258f92111022011
130
py
Python
OnePush/apps.py
krishnasagar14/OnePush
e00678754a9f5a5b55206b395dfc4ecbb43368d0
[ "MIT" ]
null
null
null
OnePush/apps.py
krishnasagar14/OnePush
e00678754a9f5a5b55206b395dfc4ecbb43368d0
[ "MIT" ]
null
null
null
OnePush/apps.py
krishnasagar14/OnePush
e00678754a9f5a5b55206b395dfc4ecbb43368d0
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.apps import AppConfig class OnepushConfig(AppConfig): name = 'OnePush'
16.25
39
0.792308
15
130
6.533333
0.8
0
0
0
0
0
0
0
0
0
0
0
0.153846
130
7
40
18.571429
0.890909
0
0
0
0
0
0.053846
0
0
0
0
0
0
1
0
false
0
0.5
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
fb366baebfc1911d6126a6c3b09e72c405c02a23
227
py
Python
Ekeopara_Praise/Phase 1/Python Basic 1/Day9 Tasks/Task7.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
6
2020-05-23T19:53:25.000Z
2021-05-08T20:21:30.000Z
Ekeopara_Praise/Phase 1/Python Basic 1/Day9 Tasks/Task7.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
8
2020-05-14T18:53:12.000Z
2020-07-03T00:06:20.000Z
Ekeopara_Praise/Phase 1/Python Basic 1/Day9 Tasks/Task7.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
39
2020-05-10T20:55:02.000Z
2020-09-12T17:40:59.000Z
'''7. Write a Python program to test whether the system is a big-endian platform or little-endian platform.''' import sys if sys.byteorder =="little": print("Little-endian platform") else: print("Big-endian platform.")
32.428571
110
0.722467
34
227
4.823529
0.647059
0.341463
0.207317
0
0
0
0
0
0
0
0
0.005208
0.154185
227
6
111
37.833333
0.848958
0.45815
0
0
0
0
0.410256
0
0
0
0
0
0
1
0
true
0
0.2
0
0.2
0.4
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
0
0
0
0
0
0
4
34b1fa43a1e38e977969283355e4679e9f88cdbd
401
py
Python
src/flight_model/data_exchange/__init__.py
davewalker5/FlightBookingSQL
16ba845f8678f23766f0571fc9b8b1d6f7843525
[ "MIT" ]
null
null
null
src/flight_model/data_exchange/__init__.py
davewalker5/FlightBookingSQL
16ba845f8678f23766f0571fc9b8b1d6f7843525
[ "MIT" ]
null
null
null
src/flight_model/data_exchange/__init__.py
davewalker5/FlightBookingSQL
16ba845f8678f23766f0571fc9b8b1d6f7843525
[ "MIT" ]
null
null
null
from .airports import import_airport_details from .airlines import import_airline_details from .aircraft_layouts import import_aircraft_layout_from_stream, import_aircraft_layout_from_file, \ get_layout_file_path __all__ = [ "import_airport_details", "import_airline_details", "import_aircraft_layout_from_stream", "import_aircraft_layout_from_file", "get_layout_file_path" ]
30.846154
101
0.820449
51
401
5.764706
0.294118
0.190476
0.272109
0.326531
0.510204
0.510204
0.510204
0.510204
0.510204
0.510204
0
0
0.122195
401
12
102
33.416667
0.835227
0
0
0
0
0
0.32419
0.274314
0
0
0
0
0
1
0
false
0
0.636364
0
0.636364
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
0
0
0
1
0
1
0
0
4
34c73541907edbd0ee79543bfb3d9c2069129e3e
2,445
py
Python
tests/test_plain_text_parser.py
ninamariadte/R2T2
5d3197f9bf3f949ad72ee1e60aa429d009a79023
[ "MIT" ]
12
2020-02-20T11:13:51.000Z
2022-01-07T09:35:03.000Z
tests/test_plain_text_parser.py
ninamariadte/R2T2
5d3197f9bf3f949ad72ee1e60aa429d009a79023
[ "MIT" ]
65
2020-02-13T21:44:41.000Z
2021-01-26T11:01:21.000Z
tests/test_plain_text_parser.py
ninamariadte/R2T2
5d3197f9bf3f949ad72ee1e60aa429d009a79023
[ "MIT" ]
212
2020-02-10T17:13:11.000Z
2022-03-18T11:09:18.000Z
from r2t2.plain_text_parser import ( parse_plain_text_references ) DOI_URL_HTTP_PREFIX = 'http://doi.org/' DOI_URL_HTTPS_PREFIX = 'https://doi.org/' DOI_1 = '10.1234/zenodo.1234567' REF_NAME_1 = 'Smith2001-1' REF_NAME_2 = 'Johnson2002-2' class TestParsePlainTextReferences: def test_should_return_empty_list_for_empty_string(self): assert parse_plain_text_references('') == [] def test_should_return_empty_list_for_text_without_reference(self): assert parse_plain_text_references('description of some function') == [] def test_should_parse_doi_without_additional_text(self): assert parse_plain_text_references( DOI_1 ) == [DOI_URL_HTTPS_PREFIX + DOI_1] def test_should_parse_doi_with_surround_text(self): assert parse_plain_text_references( 'DOI: ' + DOI_1 + ' used for xyz' ) == [DOI_URL_HTTPS_PREFIX + DOI_1] def test_should_parse_doi_http_url(self): assert parse_plain_text_references( DOI_URL_HTTP_PREFIX + DOI_1 ) == [DOI_URL_HTTPS_PREFIX + DOI_1] def test_should_parse_doi_https_url(self): assert parse_plain_text_references( DOI_URL_HTTP_PREFIX + DOI_1 ) == [DOI_URL_HTTPS_PREFIX + DOI_1] def test_should_parse_single_sphinx_cite_reference(self): assert parse_plain_text_references( r'See :cite:`' + REF_NAME_1 + r'` for an introduction' ) == [REF_NAME_1] def test_should_parse_multiple_sphinx_cite_references(self): assert parse_plain_text_references( r'See :cite:`' + REF_NAME_1 + ', ' + REF_NAME_2 + r'` for an introduction' ) == [REF_NAME_1, REF_NAME_2] def test_should_parse_single_latex_cite_reference(self): assert parse_plain_text_references( r'\\cite{' + REF_NAME_1 + r'}' ) == [REF_NAME_1] def test_should_parse_multiple_latex_cite_reference(self): assert parse_plain_text_references( r'\\cite{' + REF_NAME_1 + ', ' + REF_NAME_2 + r'}' ) == [REF_NAME_1, REF_NAME_2] def test_should_parse_latex_cite_reference_with_page_number(self): assert parse_plain_text_references( r'\\cite[p.~215]{' + REF_NAME_1 + r'}' ) == [REF_NAME_1] def test_should_parse_single_doxygen_cite_reference(self): assert parse_plain_text_references( r'\\cite ' + REF_NAME_1 ) == [REF_NAME_1]
34.43662
86
0.682618
336
2,445
4.416667
0.181548
0.084906
0.122642
0.210243
0.777628
0.759434
0.728437
0.634097
0.491914
0.483154
0
0.028963
0.223313
2,445
70
87
34.928571
0.752501
0
0
0.415094
0
0
0.09407
0.008998
0
0
0
0
0.226415
1
0.226415
false
0
0.018868
0
0.264151
0
0
0
0
null
0
0
1
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
34cbe3d08e45fe6a4aadda929911d62fdcd878f0
20,571
py
Python
auto_process_ngs/test/test_settings.py
fls-bioinformatics-core/auto_process_ngs
1f07a08e14f118e6a61d3f37130515efc6049dd7
[ "AFL-3.0" ]
5
2017-01-31T21:37:09.000Z
2022-03-17T19:26:29.000Z
auto_process_ngs/test/test_settings.py
fls-bioinformatics-core/auto_process_ngs
1f07a08e14f118e6a61d3f37130515efc6049dd7
[ "AFL-3.0" ]
294
2015-08-14T09:00:30.000Z
2022-03-18T10:17:05.000Z
auto_process_ngs/test/test_settings.py
fls-bioinformatics-core/auto_process_ngs
1f07a08e14f118e6a61d3f37130515efc6049dd7
[ "AFL-3.0" ]
7
2017-11-23T07:52:21.000Z
2020-07-15T10:12:05.000Z
####################################################################### # Tests for settings.py module ####################################################################### import unittest import tempfile import shutil from bcftbx.JobRunner import SimpleJobRunner,GEJobRunner from auto_process_ngs.settings import * # Set to False to keep test output dirs REMOVE_TEST_OUTPUTS = True class TestSettings(unittest.TestCase): """Tests for the Settings class """ def setUp(self): # Create a temp working dir self.dirn = tempfile.mkdtemp(suffix='TestSettings') def tearDown(self): # Remove the temporary test directory if REMOVE_TEST_OUTPUTS: shutil.rmtree(self.dirn) def test_sample_settings_file(self): """Settings: load from sample file """ sample_settings_file = os.path.join(get_config_dir(), 'auto_process.ini.sample') self.assertTrue(os.path.isfile(sample_settings_file), "Missing sample file %s" % sample_settings_file) s = Settings(sample_settings_file) # General settings self.assertTrue(isinstance(s.general.default_runner,SimpleJobRunner)) self.assertEqual(s.general.max_concurrent_jobs,12) self.assertEqual(s.general.max_cores,None) self.assertEqual(s.general.max_batches,None) self.assertEqual(s.general.poll_interval,5.0) # Modulefiles self.assertEqual(s.modulefiles.make_fastqs,None) self.assertEqual(s.modulefiles.run_qc,None) self.assertEqual(s.modulefiles.publish_qc,None) self.assertEqual(s.modulefiles.process_icell8,None) self.assertEqual(s.modulefiles.bcl2fastq,None) self.assertEqual(s.modulefiles.cellranger_mkfastq,None) self.assertEqual(s.modulefiles.cellranger_atac_mkfastq,None) self.assertEqual(s.modulefiles.cellranger_arc_mkfastq,None) self.assertEqual(s.modulefiles.spaceranger_mkfastq,None) self.assertEqual(s.modulefiles.illumina_qc,None) self.assertEqual(s.modulefiles.fastq_strand,None) self.assertEqual(s.modulefiles.cellranger,None) self.assertEqual(s.modulefiles.report_qc,None) # Conda self.assertEqual(s.conda.enable_conda,False) self.assertEqual(s.conda.env_dir,None) # Bcl2fastq self.assertEqual(s.bcl2fastq.nprocessors,1) self.assertEqual(s.bcl2fastq.default_version,'>=1.8.4') self.assertEqual(s.bcl2fastq.no_lane_splitting,False) # NextSeq-specific self.assertEqual(s.platform.nextseq.bcl2fastq,'>=2.0') self.assertEqual(s.platform.nextseq.no_lane_splitting,True) # Fastq_stats self.assertEqual(s.fastq_stats.nprocessors,1) # Job-specific runners self.assertTrue(isinstance(s.runners.bcl2fastq,SimpleJobRunner)) self.assertTrue(isinstance(s.runners.qc,SimpleJobRunner)) self.assertTrue(isinstance(s.runners.star,SimpleJobRunner)) self.assertTrue(isinstance(s.runners.stats,SimpleJobRunner)) # Archiving self.assertEqual(s.archive.dirn,None) self.assertEqual(s.archive.log,None) self.assertEqual(s.archive.group,None) self.assertEqual(s.archive.chmod,None) # QC reporting self.assertEqual(s.qc_web_server.dirn,None) self.assertEqual(s.qc_web_server.url,None) # Metadata self.assertEqual(s.metadata.default_data_source,None) def test_partial_settings_file(self): """Settings: load a partial auto_process.ini file """ # Partial file partial_settings_file = os.path.join(self.dirn, "auto_process.ini") with open(partial_settings_file,'w') as s: s.write("""[fastq_stats] nprocessors = 8 """) # Load settings s = Settings(partial_settings_file) # General settings self.assertTrue(isinstance(s.general.default_runner,SimpleJobRunner)) self.assertEqual(s.general.max_concurrent_jobs,12) self.assertEqual(s.general.max_cores,None) self.assertEqual(s.general.max_batches,None) self.assertEqual(s.general.poll_interval,5.0) # Modulefiles self.assertEqual(s.modulefiles.make_fastqs,None) self.assertEqual(s.modulefiles.bcl2fastq,None) self.assertEqual(s.modulefiles.cellranger_mkfastq,None) self.assertEqual(s.modulefiles.cellranger_atac_mkfastq,None) self.assertEqual(s.modulefiles.cellranger_arc_mkfastq,None) self.assertEqual(s.modulefiles.spaceranger_mkfastq,None) self.assertEqual(s.modulefiles.run_qc,None) # Conda self.assertEqual(s.conda.enable_conda,False) self.assertEqual(s.conda.env_dir,None) # Fastq_stats self.assertEqual(s.fastq_stats.nprocessors,8) def test_get_item(self): """Settings: get_item fetches a value """ sample_settings_file = os.path.join(get_config_dir(), 'auto_process.ini.sample') s = Settings(sample_settings_file) max_concurrent_jobs = s.general.max_concurrent_jobs self.assertEqual(s['general'].max_concurrent_jobs, max_concurrent_jobs) def test_preserve_option_case(self): """Settings: case of option names is preserved """ # Settings file settings_file = os.path.join(self.dirn,"auto_process.ini") with open(settings_file,'w') as s: s.write("""[sequencers] SN7001251 = hiseq """) # Load settings s = Settings(settings_file) # Check case of option self.assertTrue('SN7001251' in s.sequencers) self.assertEqual(s.sequencers['SN7001251']['platform'],'hiseq') self.assertEqual(s.sequencers.SN7001251.platform,'hiseq') def test_conda_settings(self): """Settings: check conda options are set correctly """ # Settings file settings_file = os.path.join(self.dirn,"auto_process.ini") with open(settings_file,'w') as s: s.write("""[conda] enable_conda = true env_dir = /scratch/conda_envs """) # Load settings s = Settings(settings_file) # Check conda settings self.assertTrue(s.conda.enable_conda) self.assertEqual(s.conda.env_dir,"/scratch/conda_envs") def test_conda_env_dir(self): """Settings: check conda env dir expands env variable """ # Settings file settings_file = os.path.join(self.dirn,"auto_process.ini") with open(settings_file,'w') as s: s.write("""[conda] enable_conda = true env_dir = /scratch/$USER/conda_envs """) # Load settings s = Settings(settings_file) # Check conda settings self.assertTrue(s.conda.enable_conda) self.assertEqual(s.conda.env_dir,os.path.join("/scratch", os.environ['USER'], "conda_envs")) def test_destination_definitions(self): """Settings: handle 'destination:...' sections """ # Settings file settings_file = os.path.join(self.dirn,"auto_process.ini") with open(settings_file,'w') as s: s.write("""[destination:webserver] directory = /mnt/www/data subdir = random_bin readme_template = README.webserver.template url = https://our.data.com/data include_downloader = true include_qc_report = true hard_links = true [destination:local] directory = /mnt/shared subdir = run_id """) # Load settings s = Settings(settings_file) # Check destination settings self.assertTrue('webserver' in s.destination) self.assertEqual(s.destination['webserver']['directory'], '/mnt/www/data') self.assertEqual(s.destination['webserver']['subdir'],'random_bin') self.assertEqual(s.destination['webserver']['readme_template'], 'README.webserver.template') self.assertEqual(s.destination['webserver']['url'], 'https://our.data.com/data') self.assertEqual(s.destination['webserver']['include_downloader'], True) self.assertEqual(s.destination['webserver']['include_qc_report'], True) self.assertEqual(s.destination['webserver']['hard_links'],True) self.assertTrue('local' in s.destination) self.assertEqual(s.destination['local']['directory'],'/mnt/shared') self.assertEqual(s.destination['local']['subdir'],'run_id') self.assertEqual(s.destination['local']['readme_template'],None) self.assertEqual(s.destination['local']['url'],None) self.assertEqual(s.destination['local']['include_downloader'],False) self.assertEqual(s.destination['local']['include_qc_report'],False) self.assertEqual(s.destination['local']['hard_links'],False) def test_sequencer_definitions(self): """Settings: handle 'sequencer:...' sections """ # Settings file settings_file = os.path.join(self.dirn,"auto_process.ini") with open(settings_file,'w') as s: s.write("""[sequencer:SN7001250] platform = hiseq model = "HiSeq 2500" [sequencer:NB110920] platform = nextseq model = "NextSeq 500" """) # Load settings s = Settings(settings_file) # Check sequencer settings self.assertTrue('SN7001250' in s.sequencers) self.assertEqual(s.sequencers['SN7001250']['platform'],'hiseq') self.assertEqual(s.sequencers['SN7001250']['model'],"HiSeq 2500") self.assertTrue('NB110920' in s.sequencers) self.assertEqual(s.sequencers['NB110920']['platform'],'nextseq') self.assertEqual(s.sequencers['NB110920']['model'],"NextSeq 500") def test_legacy_sequencer_definitions(self): """Settings: handle 'sequencers' section (no 'sequencer:...'s) """ # Settings file settings_file = os.path.join(self.dirn,"auto_process.ini") with open(settings_file,'w') as s: s.write("""[sequencers] SN7001250 = hiseq NB110920 = nextseq """) # Load settings s = Settings(settings_file) # Check sequencer settings self.assertTrue('SN7001250' in s.sequencers) self.assertEqual(s.sequencers['SN7001250']['platform'],'hiseq') self.assertEqual(s.sequencers['SN7001250']['model'],None) self.assertTrue('NB110920' in s.sequencers) self.assertEqual(s.sequencers['NB110920']['platform'],'nextseq') self.assertEqual(s.sequencers['NB110920']['model'],None) def test_mixed_sequencer_definitions(self): """Settings: handle mixture of 'sequencer:...' & 'sequencers' sections """ # Settings file settings_file = os.path.join(self.dirn,"auto_process.ini") with open(settings_file,'w') as s: s.write("""[sequencers] SN7001250 = hiseq NB110920 = nextseq [sequencer:K00129] platform = hiseq4000 model = "HiSeq 4000" """) # Load settings s = Settings(settings_file) # Check sequencer settings self.assertTrue('K00129' in s.sequencers) self.assertEqual(s.sequencers['K00129']['platform'],'hiseq4000') self.assertEqual(s.sequencers['K00129']['model'],"HiSeq 4000") self.assertTrue('SN7001250' in s.sequencers) self.assertEqual(s.sequencers['SN7001250']['platform'],'hiseq') self.assertEqual(s.sequencers['SN7001250']['model'],None) self.assertTrue('NB110920' in s.sequencers) self.assertEqual(s.sequencers['NB110920']['platform'],'nextseq') self.assertEqual(s.sequencers['NB110920']['model'],None) def test_sequencer_definitions_fails_if_platform_not_set(self): """Settings: fail to load if 'sequencer:...' section missing 'platform' """ # Settings file settings_file = os.path.join(self.dirn,"auto_process.ini") with open(settings_file,'w') as s: s.write("""[sequencer:SN7001250] model = "HiSeq 2500" """) # Load settings self.assertRaises(Exception, Settings, settings_file) def test_organism_definitions(self): """Settings: handle 'organism:...' sections """ # Settings file settings_file = os.path.join(self.dirn,"auto_process.ini") with open(settings_file,'w') as s: s.write("""[organism:human] star_index = /data/hg38/star bowtie_index = /data/hg38/bowtie cellranger_reference = /data/10x/refdata-gex-GRCh38-2020-A cellranger_premrna_reference = /data/10x/refdata-cellranger-GRCh38-1.0.1-pre_mrna cellranger_atac_reference = /data/10x/refdata-cellranger-atac-GRCh38-2020-A-2.0.0 cellranger_arc_reference = /data/10x/refdata-cellranger-arc-GRCh38-2020-A-2.0.0 [organism:mouse] star_index = /data/mm10/star bowtie_index = /data/mm10/bowtie cellranger_reference = /data/10x/refdata-gex-mm10-2020-A cellranger_atac_reference = /data/10x/refdata-cellranger-atac-mm10-2020-A-2.0.0 cellranger_arc_reference = /data/10x/refdata-cellranger-arc-mm10-2020-A-2.0.0 """) # Load settings s = Settings(settings_file) # Check organism settings self.assertTrue('human' in s.organisms) self.assertEqual(s.organisms['human']['star_index'], '/data/hg38/star') self.assertEqual(s.organisms['human']['bowtie_index'], '/data/hg38/bowtie') self.assertEqual(s.organisms['human']['cellranger_reference'], '/data/10x/refdata-gex-GRCh38-2020-A') self.assertEqual(s.organisms['human']['cellranger_premrna_reference'], '/data/10x/refdata-cellranger-GRCh38-1.0.1-pre_mrna') self.assertEqual(s.organisms['human']['cellranger_atac_reference'], '/data/10x/refdata-cellranger-atac-GRCh38-2020-A-2.0.0') self.assertEqual(s.organisms['human']['cellranger_arc_reference'], '/data/10x/refdata-cellranger-arc-GRCh38-2020-A-2.0.0') self.assertTrue('mouse' in s.organisms) self.assertEqual(s.organisms['mouse']['star_index'], '/data/mm10/star') self.assertEqual(s.organisms['mouse']['bowtie_index'], '/data/mm10/bowtie') self.assertEqual(s.organisms['mouse']['cellranger_reference'], '/data/10x/refdata-gex-mm10-2020-A') self.assertEqual(s.organisms['mouse']['cellranger_premrna_reference'], None) self.assertEqual(s.organisms['mouse']['cellranger_atac_reference'], '/data/10x/refdata-cellranger-atac-mm10-2020-A-2.0.0') self.assertEqual(s.organisms['mouse']['cellranger_arc_reference'], '/data/10x/refdata-cellranger-arc-mm10-2020-A-2.0.0') def test_legacy_organism_definitions(self): """Settings: handle sections for specific indices (no 'organism:...' sections) """ # Settings file settings_file = os.path.join(self.dirn,"auto_process.ini") with open(settings_file,'w') as s: s.write("""[fastq_strand_indexes] human = /data/hg38/star mouse = /data/mm10/star [10xgenomics_transcriptomes] human = /data/10x/refdata-gex-GRCh38-2020-A mouse = /data/10x/refdata-gex-mm10-2020-A [10xgenomics_premrna_references] human = /data/10x/refdata-cellranger-GRCh38-1.0.1-pre_mrna [10xgenomics_atac_genome_references] human = /data/10x/refdata-cellranger-atac-GRCh38-2020-A-2.0.0 mouse = /data/10x/refdata-cellranger-atac-mm10-2020-A-2.0.0 [10xgenomics_multiome_references] human = /data/10x/refdata-cellranger-arc-GRCh38-2020-A-2.0.0 mouse = /data/10x/refdata-cellranger-arc-mm10-2020-A-2.0.0 """) # Load settings s = Settings(settings_file) # Check organism settings self.assertTrue('human' in s.organisms) self.assertEqual(s.organisms['human']['star_index'], '/data/hg38/star') self.assertEqual(s.organisms['human']['bowtie_index'],None) self.assertEqual(s.organisms['human']['cellranger_reference'], '/data/10x/refdata-gex-GRCh38-2020-A') self.assertEqual(s.organisms['human']['cellranger_premrna_reference'], '/data/10x/refdata-cellranger-GRCh38-1.0.1-pre_mrna') self.assertEqual(s.organisms['human']['cellranger_atac_reference'], '/data/10x/refdata-cellranger-atac-GRCh38-2020-A-2.0.0') self.assertEqual(s.organisms['human']['cellranger_arc_reference'], '/data/10x/refdata-cellranger-arc-GRCh38-2020-A-2.0.0') self.assertTrue('mouse' in s.organisms) self.assertEqual(s.organisms['mouse']['star_index'], '/data/mm10/star') self.assertEqual(s.organisms['mouse']['bowtie_index'],None) self.assertEqual(s.organisms['mouse']['cellranger_reference'], '/data/10x/refdata-gex-mm10-2020-A') self.assertEqual(s.organisms['mouse']['cellranger_premrna_reference'], None) self.assertEqual(s.organisms['mouse']['cellranger_atac_reference'], '/data/10x/refdata-cellranger-atac-mm10-2020-A-2.0.0') self.assertEqual(s.organisms['mouse']['cellranger_arc_reference'], '/data/10x/refdata-cellranger-arc-mm10-2020-A-2.0.0') def test_mixed_organism_definitions(self): """Settings: handle mixture of 'organism:...' and index sections """ # Settings file settings_file = os.path.join(self.dirn,"auto_process.ini") with open(settings_file,'w') as s: s.write("""[organism:human] bowtie_index = /data/hg38/bowtie [organism:mouse] star_index = /data/mm10/star bowtie_index = /data/mm10/bowtie cellranger_reference = /data/10x/refdata-gex-mm10-2020-A cellranger_atac_reference = /data/10x/refdata-cellranger-atac-mm10-2020-A-2.0.0 cellranger_arc_reference = /data/10x/refdata-cellranger-arc-mm10-2020-A-2.0.0 [fastq_strand_indexes] human = /data/hg38/star mouse = /data/mm10/star [10xgenomics_transcriptomes] human = /data/10x/refdata-gex-GRCh38-2020-A [10xgenomics_premrna_references] human = /data/10x/refdata-cellranger-GRCh38-1.0.1-pre_mrna [10xgenomics_atac_genome_references] human = /data/10x/refdata-cellranger-atac-GRCh38-2020-A-2.0.0 [10xgenomics_multiome_references] human = /data/10x/refdata-cellranger-arc-GRCh38-2020-A-2.0.0 """) # Load settings s = Settings(settings_file) # Check organism settings self.assertTrue('human' in s.organisms) self.assertEqual(s.organisms['human']['star_index'], '/data/hg38/star') self.assertEqual(s.organisms['human']['bowtie_index'], '/data/hg38/bowtie') self.assertEqual(s.organisms['human']['cellranger_reference'], '/data/10x/refdata-gex-GRCh38-2020-A') self.assertEqual(s.organisms['human']['cellranger_premrna_reference'], '/data/10x/refdata-cellranger-GRCh38-1.0.1-pre_mrna') self.assertEqual(s.organisms['human']['cellranger_atac_reference'], '/data/10x/refdata-cellranger-atac-GRCh38-2020-A-2.0.0') self.assertEqual(s.organisms['human']['cellranger_arc_reference'], '/data/10x/refdata-cellranger-arc-GRCh38-2020-A-2.0.0') self.assertTrue('mouse' in s.organisms) self.assertEqual(s.organisms['mouse']['star_index'], '/data/mm10/star') self.assertEqual(s.organisms['mouse']['bowtie_index'], '/data/mm10/bowtie') self.assertEqual(s.organisms['mouse']['cellranger_reference'], '/data/10x/refdata-gex-mm10-2020-A') self.assertEqual(s.organisms['mouse']['cellranger_premrna_reference'], None) self.assertEqual(s.organisms['mouse']['cellranger_atac_reference'], '/data/10x/refdata-cellranger-atac-mm10-2020-A-2.0.0') self.assertEqual(s.organisms['mouse']['cellranger_arc_reference'], '/data/10x/refdata-cellranger-arc-mm10-2020-A-2.0.0')
43.955128
86
0.637499
2,382
20,571
5.373636
0.09194
0.134766
0.14375
0.070313
0.828906
0.762656
0.693281
0.663516
0.653125
0.649453
0
0.045719
0.222741
20,571
467
87
44.049251
0.754831
0.085266
0
0.635328
0
0.068376
0.321814
0.165463
0
0
0
0
0.401709
1
0.045584
false
0
0.014245
0
0.062678
0
0
0
0
null
0
0
0
1
1
0
0
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
4
34d2469b1feb0a225e7da49e50c39de9d3c5dc2d
169
py
Python
clickhouse_driver/columns/nullablecolumn.py
risicle/clickhouse-driver
d36569f52d3e62ad2e275b1d63ad79b75a06402d
[ "MIT" ]
823
2017-05-16T15:30:15.000Z
2022-03-31T08:39:04.000Z
clickhouse_driver/columns/nullablecolumn.py
risicle/clickhouse-driver
d36569f52d3e62ad2e275b1d63ad79b75a06402d
[ "MIT" ]
277
2017-07-11T11:35:34.000Z
2022-03-08T06:52:09.000Z
clickhouse_driver/columns/nullablecolumn.py
risicle/clickhouse-driver
d36569f52d3e62ad2e275b1d63ad79b75a06402d
[ "MIT" ]
175
2017-10-11T08:41:12.000Z
2022-03-22T03:59:35.000Z
def create_nullable_column(spec, column_by_spec_getter): inner = spec[9:-1] nested = column_by_spec_getter(inner) nested.nullable = True return nested
21.125
56
0.727811
24
169
4.791667
0.541667
0.13913
0.208696
0.313043
0.4
0
0
0
0
0
0
0.014599
0.189349
169
7
57
24.142857
0.824818
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0
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
0
0
0
0
0
4
34fa5cde48c497fe7b0d21c81297772a50df4fcf
147
py
Python
IrivenPythonTools/__init__.py
iriven/Pyhton-CSV-Utils
4537c1a3f1cd57c4d04c86082b8ead6d7739b127
[ "MIT" ]
null
null
null
IrivenPythonTools/__init__.py
iriven/Pyhton-CSV-Utils
4537c1a3f1cd57c4d04c86082b8ead6d7739b127
[ "MIT" ]
null
null
null
IrivenPythonTools/__init__.py
iriven/Pyhton-CSV-Utils
4537c1a3f1cd57c4d04c86082b8ead6d7739b127
[ "MIT" ]
null
null
null
#coding: utf-8 import sys import os sys.path.append(os.path.dirname(os.path.realpath(__file__))) if __name__ == "__main__": sys.exit(main())
18.375
60
0.707483
23
147
4
0.652174
0.130435
0
0
0
0
0
0
0
0
0
0.007752
0.122449
147
7
61
21
0.705426
0.088435
0
0
0
0
0.06015
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
5502e4ecfb0698eae3dd1d8398a1b93d4e36184c
1,127
py
Python
test/test_TernarySearchTree.py
akiljames83/Pypeline
c06a7e954ff59e1a6cfb7e4e81640720e61d8bfd
[ "MIT" ]
3
2019-10-27T11:16:32.000Z
2021-12-15T17:37:04.000Z
test/test_TernarySearchTree.py
akiljames83/Pypeline
c06a7e954ff59e1a6cfb7e4e81640720e61d8bfd
[ "MIT" ]
null
null
null
test/test_TernarySearchTree.py
akiljames83/Pypeline
c06a7e954ff59e1a6cfb7e4e81640720e61d8bfd
[ "MIT" ]
1
2019-03-15T15:24:17.000Z
2019-03-15T15:24:17.000Z
from Pypeline.Pypes import TernarySearchTree import unittest class NodeTest(unittest.TestCase): """ Tests for methods in the Node class. """ @classmethod def setUpClass(cls): pass #TODO @classmethod def tearDownClass(cls): pass #TODO def setUp(self): pass #TODO def tearDown(self): pass #TODO class TSTTest(unittest.TestCase): """ Tests for methods in the TST class. """ @classmethod def setUpClass(cls): pass #TODO @classmethod def tearDownClass(cls): pass #TODO def setUp(self): pass #TODO def tearDown(self): pass #TODO def test_put(self): tree = TernarySearchTree.TST() tree.put('a', 5) assert tree.rootNode.char == 'a' assert tree.rootNode.value == 5 def test_putItem(self): tree = TernarySearchTree.TST() n = tree.putItem(tree.rootNode, 'a', 5, 0) assert n.char == 'a' assert n.value == 5 def test_get(self): tree = TernarySearchTree.TST() tree.put('a', 5) assert tree.get('a') == 5 def test_getItem(self): tree = TernarySearchTree.TST() tree.put('a', 5) n = tree.getItem(tree.rootNode, 'a', 0) assert n.char == 'a' assert n.value == 5
17.075758
44
0.670807
159
1,127
4.72956
0.257862
0.085106
0.073138
0.148936
0.660904
0.660904
0.660904
0.56516
0.515957
0.446809
0
0.010953
0.189885
1,127
65
45
17.338462
0.812705
0.093168
0
0.704545
0
0
0.009036
0
0
0
0
0.030769
0.159091
1
0.272727
false
0.181818
0.045455
0
0.363636
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
1
0
0
1
0
1
0
0
0
0
0
4
9b83499703244bb9b3a3ae709bc6028240133b12
236
py
Python
core/templatetags/core_custom_tags.py
MrFang/budget-manager
9febb92ad667d9a4793500b0f17ac98a567d3dd6
[ "MIT" ]
1
2020-09-18T13:23:21.000Z
2020-09-18T13:23:21.000Z
core/templatetags/core_custom_tags.py
MrFang/budget-manager
9febb92ad667d9a4793500b0f17ac98a567d3dd6
[ "MIT" ]
13
2020-09-18T13:08:30.000Z
2020-11-06T07:54:53.000Z
core/templatetags/core_custom_tags.py
MrFang/budget-manager
9febb92ad667d9a4793500b0f17ac98a567d3dd6
[ "MIT" ]
2
2020-11-17T12:12:29.000Z
2021-01-23T15:08:52.000Z
from django import template register = template.Library() @register.filter(name='division') def division(value, args): return value/args @register.filter(name='index_search') def index_search(arr, index): return arr[index]
16.857143
37
0.741525
31
236
5.580645
0.516129
0.16185
0.208092
0
0
0
0
0
0
0
0
0
0.135593
236
13
38
18.153846
0.848039
0
0
0
0
0
0.084746
0
0
0
0
0
0
1
0.25
false
0
0.125
0.25
0.625
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
32d1cafce6432ffe33b6bdf704cdc9b5cce21cbb
8,007
py
Python
advanced/part09-15_item_suitcase_hold/test/test_3_cargo_hold.py
Hannah-Abi/python-pro-21
2ce32c4bf118054329d19afdf83c50561be1ada8
[ "MIT" ]
null
null
null
advanced/part09-15_item_suitcase_hold/test/test_3_cargo_hold.py
Hannah-Abi/python-pro-21
2ce32c4bf118054329d19afdf83c50561be1ada8
[ "MIT" ]
null
null
null
advanced/part09-15_item_suitcase_hold/test/test_3_cargo_hold.py
Hannah-Abi/python-pro-21
2ce32c4bf118054329d19afdf83c50561be1ada8
[ "MIT" ]
null
null
null
import unittest from unittest.mock import patch from tmc import points, reflect from tmc.utils import load, load_module, reload_module, get_stdout, check_source from functools import reduce import os import os.path import textwrap from random import choice, randint from datetime import date, datetime, timedelta exercise = 'src.code' def f(attr: list): return ",".join(attr) class CargoHoldTest(unittest.TestCase): @classmethod def setUpClass(cls): with patch('builtins.input', side_effect=[AssertionError("Asking input from the user was not expected.")]): cls.module = load_module(exercise, 'en') @points('8.item_suitcase_hold_part6') def test1_cargo_hold_exists(self): try: from src.code import CargoHold except: self.assertTrue(False, "your program should contain class named CargoHold") @points('8.item_suitcase_hold_part6') def test2_cargo_hold_constructor(self): try: from src.code import CargoHold hold = CargoHold(100) except Exception as e: self.assertTrue(False, 'Calling constructor of the class CargoHold as follows CargoHold(100)' + f' threw an error: {e}\nMake sure, that the constructor is defined properly.') @points('8.item_suitcase_hold_part6') def test3_empty_hold_str(self): from src.code import CargoHold hold = CargoHold(100) corr1 = "0 suitcases, space for 100 kg" val = str(hold) self.assertTrue(corr1 == val, f"Method __str__ should return a string\n{corr1}\nwhen object is initialized as follows\n" + f'CargoHold(100)\nNow method returns a string\n{val}') @points('8.item_suitcase_hold_part6') def test4_hold_add_item(self): try: from src.code import Item from src.code import Suitcase from src.code import CargoHold hold = CargoHold(100) code = """ hold = CargoHold(100) suitcase = Suitcase(25) item = Item("ABC Book", 2) suitcase.add_item(item) hold.add_suitcase(suitcase) """ hold = CargoHold(100) suitcase = Suitcase(25) item = Item("ABC Book", 2) suitcase.add_item(item) hold.add_suitcase(suitcase) except Exception as e: self.assertTrue(False, f'Executing the following code\n{code}\n threw an error\n{e}\nIs method add_suitcase(self, suitcase) defined?') corr1 = "1 suitcase, space for 98 kg" val = str(hold) self.assertTrue(corr1 == val, f"Method __str__ should return a string\n{corr1}\nwhen the following code is executed\n{code}\n" + f'Now method returns a string\n{val}') code = """ hold = CargoHold(50) suitcase = Suitcase(25) item = Item("ABC Book", 2) suitcase.add_item(item) hold.add_suitcase(suitcase) suitcase2 = Suitcase(10) suitcase2.add_item(Item("Rock", 1)) suitcase2.add_item(Item("Mouse", 2)) hold.add_suitcase(suitcase2) """ hold = CargoHold(50) suitcase = Suitcase(25) item = Item("ABC Book", 2) suitcase.add_item(item) hold.add_suitcase(suitcase) suitcase2 = Suitcase(10) suitcase2.add_item(Item("Rock", 1)) suitcase2.add_item(Item("Mouse", 2)) hold.add_suitcase(suitcase2) corr1 = "2 suitcases, space for 45 kg" val = str(hold) self.assertTrue(corr1 == val, f"Method __str__ should return a string\n{corr1}\nwhen the following code is executed\n{code}\n" + f'Now method returns a string\n{val}') @points('8.item_suitcase_hold_part6') def test_5_hold_can_not_be_overloaded(self): try: from src.code import Item from src.code import Suitcase from src.code import CargoHold hold = CargoHold(100) code = """ hold = CargoHold(10) suitcase = Suitcase(25) item = Item("Anvil", 24) suitcase.add_item(item) hold.add_suitcase(suitcase) """ hold = CargoHold(10) suitcase = Suitcase(25) item = Item("Anvil", 24) suitcase.add_item(item) hold.add_suitcase(suitcase) except Exception as e: self.assertTrue(False, f'Executing the following code\n{code}\n threw an error\n{e}\nIs method add_suitcase(self, suitcase) defined?') corr1 = "0 suitcases, space for 10 kg" val = str(hold) self.assertTrue(corr1 == val, f"Method __str__ should return a string\n{corr1}\nwhen the following code is executed\n{code}\n" + f'Now method returns a string\n{val}\nNote, that it is not allowed to add more items to the cargo hold than it\'s capacity is!') @points('8.item_suitcase_hold_part7') def test_6_hold_print_items(self): try: from src.code import Item from src.code import Suitcase from src.code import CargoHold hold = CargoHold(100) code = """ hold = CargoHold(100) suitcase = Suitcase(25) item = Item("ABC Book", 2) suitcase.add_item(item) hold.add_suitcase(suitcase) hold.print_items() """ hold = CargoHold(100) suitcase = Suitcase(25) item = Item("ABC Book", 2) suitcase.add_item(item) hold.add_suitcase(suitcase) hold.print_items() except Exception as e: self.assertTrue(False, f'Executing the following code\n{code}\n threw an error\n{e}\nIs method print_items(self) defined?') out = get_stdout() self.assertTrue(0<len(out), f'When executing the following code\n{code}\nmethod should print out one row\nNow it does not print out anything') lines = [x for x in out.split('\n') if len(x)>0] self.assertTrue(1 == len(lines), f'When executing the following code\n{code}\nmethod should print out one row\nThe print out was\n{out}') expected = "ABC Book (2 kg)" self.assertTrue(out == expected, f'When executing the following code\n{code}\nmethod should print out\n{expected}\nThe print out was\n{out}') @points('8.item_suitcase_hold_part7') def test_6_hold_print_items2(self): try: from src.code import Item from src.code import Suitcase from src.code import CargoHold hold = CargoHold(100) code = """ hold = CargoHold(50) suitcase = Suitcase(25) item = Item("ABC Book", 2) suitcase.add_item(item) hold.add_suitcase(suitcase) suitcase2 = Suitcase(10) suitcase2.add_item(Item("Rock", 1)) suitcase2.add_item(Item("Mouse", 2)) hold.add_suitcase(suitcase2) hold.print_items() """ hold = CargoHold(50) suitcase = Suitcase(25) item1 = Item("ABC Book", 2) suitcase.add_item(item1) hold.add_suitcase(suitcase) suitcase2 = Suitcase(10) item2 = Item("Rock", 1) suitcase2.add_item(item2) item3 =Item("Mouse", 2) suitcase2.add_item(item3) hold.add_suitcase(suitcase2) hold.print_items() except Exception as e: self.assertTrue(False, f'Executing the following code\n{code}\n threw an error\n{e}\nIs method print_items(self) defined?') out = get_stdout() self.assertTrue(0<len(out), f'When executing the following code\n{code}\nmethod should print out one row\nNow it does not print out anything') lines = [x for x in out.split('\n') if len(x)>0] self.assertTrue(3 == len(lines), f'When executing the following code\n{code}\nmethod should print out three rows\nThe print out was\n{out}') tt = [ f"{t}" for t in [item1, item2, item3]] expected = "\n".join(tt) self.assertTrue(sorted(lines) == sorted(tt), f'When executing the following code\n{code}\nmethod should print out\n{expected}\nThe print out was\n{out}') if __name__ == '__main__': unittest.main()
36.729358
161
0.633321
1,090
8,007
4.543119
0.16055
0.038772
0.03332
0.051494
0.769184
0.760905
0.741519
0.686389
0.669426
0.669426
0
0.029501
0.259148
8,007
218
162
36.729358
0.805293
0
0
0.724324
0
0.032432
0.398102
0.087163
0
0
0
0
0.091892
1
0.048649
false
0
0.135135
0.005405
0.194595
0.075676
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
32d9c3f847990d5343b2ca0226ca7e4861424a89
118
py
Python
recursor/atlas/chart.py
OaklandPeters/recursor
3a5eabd0b43e5ec2a66e6215a9bad70b4ab47c34
[ "MIT" ]
null
null
null
recursor/atlas/chart.py
OaklandPeters/recursor
3a5eabd0b43e5ec2a66e6215a9bad70b4ab47c34
[ "MIT" ]
null
null
null
recursor/atlas/chart.py
OaklandPeters/recursor
3a5eabd0b43e5ec2a66e6215a9bad70b4ab47c34
[ "MIT" ]
null
null
null
""" Standard implementation of Atlas class. Essentially just a list of dicts, with item access affecting sublists """
23.6
69
0.779661
16
118
5.75
0.9375
0
0
0
0
0
0
0
0
0
0
0
0.152542
118
4
70
29.5
0.92
0.923729
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
32e8160ad62dac31a2a8bbf45c03289c71e1ee35
667
py
Python
python/anyascii/_data/_255.py
casept/anyascii
d4f426b91751254b68eaa84c6cd23099edd668e6
[ "ISC" ]
null
null
null
python/anyascii/_data/_255.py
casept/anyascii
d4f426b91751254b68eaa84c6cd23099edd668e6
[ "ISC" ]
null
null
null
python/anyascii/_data/_255.py
casept/anyascii
d4f426b91751254b68eaa84c6cd23099edd668e6
[ "ISC" ]
null
null
null
b='Hong Pi Geng Nie Kong Zhi Xiao She Yu Jiang Voi Chong Qi Chen Sang Suo Qian Hui Shan E Ci Qiu Ke Ham Weng Zi Ji Mai Da Cuo Manh Chom Lou Kang Kuo Di Qie Mo Guo Hong Chao Hei Gei Gun Zaat Zoeng Cao Zhe Ke Keoi Gun Xu Peng Jue Gan Si Sui Que Wu Yan Peng Xiao Pan Zyun Sin Taan La Gun Doi Vo Quanh Vo San Lo Vo Beng Zhen Ji Jin Lian Ken Zhou Zao Cuoi Le Qi Bing Yin Pin Oe Tung Me Sou Lu Di Du Liao Zhuo Chang Gach Re Ghe Quanh Soi Chen Ta Jin Que Dao Cin Chen Rang Po Lai Zhong Xie Nen Gach Jiang Qu Lei Ca Que Gach Xiang Lei To Lan Lom La'
667
667
0.613193
131
667
3.122137
0.832061
0
0
0
0
0
0
0
0
0
0
0
0.382309
667
1
667
667
0.992718
0
0
0
0
1
0.992515
0
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
0
0
1
0
1
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
fd16e9db9f7edcfb93d5e31cd63a967c1be8fe5d
561
py
Python
knockoff/sdk/factory/next_strategy/df.py
Nike-Inc/knockoff-factory
1567a46e5eaa3fe1bdf989ef5253f9ee0dbd69b3
[ "Apache-2.0" ]
26
2021-07-08T20:13:12.000Z
2022-03-27T21:08:38.000Z
knockoff/sdk/factory/next_strategy/df.py
Nike-Inc/knockoff-factory
1567a46e5eaa3fe1bdf989ef5253f9ee0dbd69b3
[ "Apache-2.0" ]
8
2021-07-12T20:20:49.000Z
2021-09-11T20:49:40.000Z
knockoff/sdk/factory/next_strategy/df.py
Nike-Inc/knockoff-factory
1567a46e5eaa3fe1bdf989ef5253f9ee0dbd69b3
[ "Apache-2.0" ]
null
null
null
# Copyright 2021-present, Nike, Inc. # All rights reserved. # # This source code is licensed under the Apache-2.0 license found in # the LICENSE file in the root directory of this source tree. import itertools def sample_df(df, **kwargs): return df.sample(**kwargs).to_dict('records')[0] def cycle_df_factory(df): # TODO: add parameter for number of cycles defaulting to None (inifinity) generator = itertools.cycle(df.iterrows()) def _call(*args, **kwargs): _, row = next(generator) return row.to_dict() return _call
24.391304
77
0.695187
81
561
4.716049
0.654321
0.052356
0
0
0
0
0
0
0
0
0
0.01559
0.199643
561
22
78
25.5
0.835189
0.452763
0
0
0
0
0.023333
0
0
0
0
0.045455
0
1
0.333333
false
0
0.111111
0.111111
0.777778
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
1
1
0
0
4
fd2f75351392e5812b6bb2605537973c8226dc76
791
py
Python
nn.py
Vincent-Sietses/Drone_project
de572bdd6e9a41b1c165048e2a6b980534da1ce6
[ "MIT" ]
null
null
null
nn.py
Vincent-Sietses/Drone_project
de572bdd6e9a41b1c165048e2a6b980534da1ce6
[ "MIT" ]
null
null
null
nn.py
Vincent-Sietses/Drone_project
de572bdd6e9a41b1c165048e2a6b980534da1ce6
[ "MIT" ]
null
null
null
import numpy as np def sigmoid(x): # print("sigmoid") # print(x) # print(1 / (1 + np.exp(-x))) return 1 / (1 + np.exp(-x)) def relu(x): # print("x") # print(x) # print("relu") # print(x * (x > 0)) return x * (x > 0) class Network: """Class for networks. TO DO : make the number of layers and neurons modular.""" def __init__(self, architecture, weights, biases): self.architecture = architecture self.weights = weights self.biases = biases def forward_pass(self, input): layers = [input] for i in range(len(self.biases)): # print(layers) layers.append(relu(np.dot(layers[i], self.weights[i]) + self.biases[i])) # print(layers) return sigmoid(layers[-1])
22.6
84
0.557522
105
791
4.152381
0.390476
0.068807
0.075688
0.03211
0.036697
0
0
0
0
0
0
0.012456
0.289507
791
34
85
23.264706
0.763345
0.265487
0
0
0
0
0
0
0
0
0
0
0
1
0.266667
false
0.066667
0.066667
0.133333
0.6
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
4
fd64172542fa2f46fc5c9b9baa5f5a17d9749b2f
175
py
Python
sftpServer/settings.py
wengyan123/SFTPServer
23e4ba7461624aad622ed3d9a96ed36eee811f4c
[ "MIT" ]
null
null
null
sftpServer/settings.py
wengyan123/SFTPServer
23e4ba7461624aad622ed3d9a96ed36eee811f4c
[ "MIT" ]
null
null
null
sftpServer/settings.py
wengyan123/SFTPServer
23e4ba7461624aad622ed3d9a96ed36eee811f4c
[ "MIT" ]
null
null
null
PASSWD = 'secret/pwd/passwd.conf' SERVER_KEYFILE = 'secret/serverKeys/server_rsa' SERVER_BACKLOG = 10 SERVER_ROOT_DIR = '/Users/wengyan/Dev/python/SFTPServer/tests/server_dir'
43.75
73
0.811429
25
175
5.44
0.72
0
0
0
0
0
0
0
0
0
0
0.012195
0.062857
175
4
73
43.75
0.817073
0
0
0
0
0
0.585227
0.585227
0
0
0
0
0
1
0
false
0.25
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4
b5c281180f82ddafcb392ea84d39a82677dc9d40
124
py
Python
tmp/wswp/filename_character.py
godontop/python
a33391304e3396d2f208dfc8cec3c200e4f18136
[ "MIT" ]
null
null
null
tmp/wswp/filename_character.py
godontop/python
a33391304e3396d2f208dfc8cec3c200e4f18136
[ "MIT" ]
null
null
null
tmp/wswp/filename_character.py
godontop/python
a33391304e3396d2f208dfc8cec3c200e4f18136
[ "MIT" ]
null
null
null
import re url = 'http://example.webscraping.com/places/default/view/Australia-1' re.sub('[^/0-9a-zA-Z\-.,; _]', '_', url)
20.666667
70
0.637097
19
124
4.052632
0.894737
0
0
0
0
0
0
0
0
0
0
0.026549
0.08871
124
5
71
24.8
0.654867
0
0
0
0
0
0.669355
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
b5cbde1b63d72dbb7fc7dd8f81d65cda374548f1
91
py
Python
pyjobs/profiler/apps.py
Mdslino/PyJobs
d2496d58067503c3304a6c59052238b1f097472b
[ "BSD-3-Clause" ]
null
null
null
pyjobs/profiler/apps.py
Mdslino/PyJobs
d2496d58067503c3304a6c59052238b1f097472b
[ "BSD-3-Clause" ]
null
null
null
pyjobs/profiler/apps.py
Mdslino/PyJobs
d2496d58067503c3304a6c59052238b1f097472b
[ "BSD-3-Clause" ]
null
null
null
from django.apps import AppConfig class ProfilerConfig(AppConfig): name = "profiler"
15.166667
33
0.758242
10
91
6.9
0.9
0
0
0
0
0
0
0
0
0
0
0
0.164835
91
5
34
18.2
0.907895
0
0
0
0
0
0.087912
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
b5cc6c85819188276d3d746838632bf21fd5ee18
235
py
Python
sort_dic.py
Michal3456/ermlab3
4b4f1e6775467c05875580fef4df336773b23209
[ "MIT" ]
null
null
null
sort_dic.py
Michal3456/ermlab3
4b4f1e6775467c05875580fef4df336773b23209
[ "MIT" ]
null
null
null
sort_dic.py
Michal3456/ermlab3
4b4f1e6775467c05875580fef4df336773b23209
[ "MIT" ]
null
null
null
import operator from Vector import Vector class SortDic(): @staticmethod def sort_dic(__table_count__: Vector): """For refinement.""" __sorted_d__ = sorted(__table_count__.items(), key=operator.itemgetter(1))
23.5
82
0.702128
27
235
5.518519
0.740741
0.134228
0
0
0
0
0
0
0
0
0
0.005236
0.187234
235
9
83
26.111111
0.774869
0.06383
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
b5d225d099065cacb7a9fccbcd7e860642f57545
252
py
Python
accounts/forms.py
ishikawa16/squidroom
f77d0745585bbe5e1de6db52ac6f3f55298a1b79
[ "MIT" ]
null
null
null
accounts/forms.py
ishikawa16/squidroom
f77d0745585bbe5e1de6db52ac6f3f55298a1b79
[ "MIT" ]
null
null
null
accounts/forms.py
ishikawa16/squidroom
f77d0745585bbe5e1de6db52ac6f3f55298a1b79
[ "MIT" ]
null
null
null
from django.contrib.auth.forms import UserCreationForm from .models import CustomUser class CustomUserCreationForm(UserCreationForm): class Meta: model = CustomUser fields = ('username', 'email', 'password1', 'password2', 'code')
28
72
0.722222
24
252
7.583333
0.791667
0
0
0
0
0
0
0
0
0
0
0.009615
0.174603
252
8
73
31.5
0.865385
0
0
0
0
0
0.138889
0
0
0
0
0
0
1
0
false
0.166667
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
0
0
0
4
b5e3514afde0c871cfe8dea7846e845896643443
46
py
Python
umusicfy/songs/__init__.py
CarlosMart626/umusicfy
97e2166fe26d1fbe36df6bea435044ef3d367edf
[ "Apache-2.0" ]
null
null
null
umusicfy/songs/__init__.py
CarlosMart626/umusicfy
97e2166fe26d1fbe36df6bea435044ef3d367edf
[ "Apache-2.0" ]
8
2020-06-05T18:08:05.000Z
2022-01-13T00:44:30.000Z
umusicfy/songs/__init__.py
CarlosMart626/umusicfy
97e2166fe26d1fbe36df6bea435044ef3d367edf
[ "Apache-2.0" ]
null
null
null
default_app_config = 'songs.apps.SongsConfig'
23
45
0.826087
6
46
6
1
0
0
0
0
0
0
0
0
0
0
0
0.065217
46
1
46
46
0.837209
0
0
0
0
0
0.478261
0.478261
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
b5fb54a0548194e8401e9b27838dea4d96f476ad
469
py
Python
test/test_group.py
pygitee/pygitee
7622314a4dbb08cf2f729b6cdd0a2887b96e394e
[ "MIT" ]
null
null
null
test/test_group.py
pygitee/pygitee
7622314a4dbb08cf2f729b6cdd0a2887b96e394e
[ "MIT" ]
null
null
null
test/test_group.py
pygitee/pygitee
7622314a4dbb08cf2f729b6cdd0a2887b96e394e
[ "MIT" ]
null
null
null
# coding: utf-8 from __future__ import absolute_import import unittest class TestGroup(unittest.TestCase): """Group unit test stubs""" def setUp(self): pass def tearDown(self): pass def testGroup(self): """Test Group""" # FIXME: construct object with mandatory attributes with example values # model = gitee.models.group.Group() # noqa: E501 pass if __name__ == '__main__': unittest.main()
17.37037
79
0.628998
53
469
5.320755
0.679245
0.056738
0.078014
0
0
0
0
0
0
0
0
0.011696
0.270789
469
26
80
18.038462
0.812866
0.351812
0
0.272727
0
0
0.027586
0
0
0
0
0.038462
0
1
0.272727
false
0.272727
0.181818
0
0.545455
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
0
1
0
0
4
bd282a3877bf9f660e7480a37cf60be18243554c
501
py
Python
application/game/tests/test_generator_costs_calculator.py
bykof/dragonball-clicker
70e7683a2617472c0d073adaa71203584bf42c87
[ "MIT" ]
1
2020-04-26T01:46:55.000Z
2020-04-26T01:46:55.000Z
application/game/tests/test_generator_costs_calculator.py
bykof/dragonball-clicker
70e7683a2617472c0d073adaa71203584bf42c87
[ "MIT" ]
null
null
null
application/game/tests/test_generator_costs_calculator.py
bykof/dragonball-clicker
70e7683a2617472c0d073adaa71203584bf42c87
[ "MIT" ]
1
2020-05-26T14:02:46.000Z
2020-05-26T14:02:46.000Z
import unittest from application.game.generator_costs_calculator import GeneratorCostsCalculator from models import Generator class TestGeneratorCostsCalculator(unittest.TestCase): def test_calculate_costs(self): self.assertEqual(1, GeneratorCostsCalculator.calculate(Generator(base_cost=1), 1)) self.assertEqual(2, GeneratorCostsCalculator.calculate(Generator(base_cost=1), 5)) self.assertEqual(1174313, GeneratorCostsCalculator.calculate(Generator(base_cost=1), 100))
41.75
98
0.808383
53
501
7.509434
0.471698
0.113065
0.316583
0.346734
0.384422
0.384422
0
0
0
0
0
0.038031
0.107784
501
11
99
45.545455
0.852349
0
0
0
0
0
0
0
0
0
0
0
0.375
1
0.125
false
0
0.375
0
0.625
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
0
0
0
1
0
1
0
0
4
1fba322ce5dfcc04e75066020091b9636373c122
126
py
Python
models/__init__.py
satyajeetmaharana/Video_Description_Seq_To_Seq
1d6e2eb49f1d552492c75c39b00430c4b4970f7b
[ "MIT" ]
null
null
null
models/__init__.py
satyajeetmaharana/Video_Description_Seq_To_Seq
1d6e2eb49f1d552492c75c39b00430c4b4970f7b
[ "MIT" ]
null
null
null
models/__init__.py
satyajeetmaharana/Video_Description_Seq_To_Seq
1d6e2eb49f1d552492c75c39b00430c4b4970f7b
[ "MIT" ]
null
null
null
from .EncoderRNN import EncoderRNN from .DecoderRNN import DecoderRNN from .EncoderDecoderModel import EncoderDecoderModel
31.5
53
0.857143
12
126
9
0.416667
0
0
0
0
0
0
0
0
0
0
0
0.119048
126
3
54
42
0.972973
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
1fbe7c61e09b5ff111b3540169b06322ef2737d9
1,358
py
Python
h1st/h1st/schema/__init__.py
tanrobotix/h1st
c9d67305726f11235751bc5abfd766279cba463b
[ "Apache-2.0" ]
null
null
null
h1st/h1st/schema/__init__.py
tanrobotix/h1st
c9d67305726f11235751bc5abfd766279cba463b
[ "Apache-2.0" ]
3
2020-11-13T19:06:07.000Z
2022-02-10T02:06:03.000Z
h1st/h1st/schema/__init__.py
diophung/h1st
ca4245996448717cf9701e17929eca8daa5d80a4
[ "Apache-2.0" ]
null
null
null
""" Schema Inferrer and Validator Module This module allows you to use schema to define data contract between nodes of the graph. Schema Definition ----------------- Schema is defined using python dictionary and python type. Python dictionary is choosen it is easy to define, easy to read and also easy to extend to add additional meta in the future. Below are some examples: .. code-block:: python # pandas dataframe with three columns my_df_schema = { "type": pd.DataFrame, "fields": { "feature1": float, "feature2": float, "label": str, } } # numpy array schema with shape my_np_schema = { "type": np.ndarray, "item": float, "shape": (None, 24, 24), } # list of integer my_list_schema = { "type": list, "item": int } Schema Validation ----------------- You can use the ``SchemaValidator`` to validate the schema as following .. code-block:: python my_schema = {'type': list, 'item': int} validator = SchemaValidator() result = validator.validate(my_schema, [1, 2, 3]) # print the validation result to console result.display() """ from .schema_inferrer import SchemaInferrer from .schema_validation_result import SchemaValidationResult from .schema_validator import SchemaValidator
22.262295
98
0.639912
164
1,358
5.22561
0.512195
0.046674
0.035006
0.042007
0.049008
0
0
0
0
0
0
0.008867
0.252577
1,358
60
99
22.633333
0.835468
0.879234
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
1fc4c5d60a2c1c378bcc9aef865f9b17d1848cb3
4,932
gyp
Python
js/cpp/binding.gyp
IFWallet/wallet-core
4ab8d2fac26530ffde6dbd56a5b4f1e96c111191
[ "MIT" ]
7
2019-05-29T02:56:59.000Z
2021-08-31T16:58:29.000Z
js/cpp/binding.gyp
moneto-dev/wallet-core
0bfd312f868f02fe51cd2672e2397fd98d707db7
[ "MIT" ]
null
null
null
js/cpp/binding.gyp
moneto-dev/wallet-core
0bfd312f868f02fe51cd2672e2397fd98d707db7
[ "MIT" ]
5
2020-03-07T14:54:39.000Z
2021-09-25T03:27:31.000Z
# Copyright © 2017-2019 Trust Wallet. # # This file is part of Trust. The full Trust copyright notice, including # terms governing use, modification, and redistribution, is contained in the # file LICENSE at the root of the source code distribution tree. # # This is a GENERATED FILE, changes made here WILL BE LOST. # { "targets": [ { "target_name": "trust-wallet-nodejs", "cflags!": [ "-fno-exceptions" ], "cflags_cc!": [ "-fno-exceptions" ], 'xcode_settings': { 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', 'CLANG_CXX_LIBRARY': 'libc++', 'MACOSX_DEPLOYMENT_TARGET': '10.9', }, 'msvs_settings': { 'VCCLCompilerTool': { 'ExceptionHandling': 1 }, }, "sources": [ "Sources.cc", "TWNapiData.cc", "TWNapiString.cc", "generated/AES.cc", "generated/ARKAddress.cc", "generated/ARKSigner.cc", "generated/Account.cc", "generated/AeternityAddress.cc", "generated/AeternitySigner.cc", "generated/AionAddress.cc", "generated/AionSigner.cc", "generated/AnySigner.cc", "generated/Base58.cc", "generated/BinanceSigner.cc", "generated/BitcoinAddress.cc", "generated/BitcoinCashAddress.cc", "generated/BitcoinScript.cc", "generated/BitcoinSigHashType.cc", "generated/BitcoinTransactionSigner.cc", "generated/Blockchain.cc", "generated/BravoAddress.cc", "generated/BravoAddressType.cc", "generated/BravoSigner.cc", "generated/CoinType.cc", "generated/CoinTypeConfiguration.cc", "generated/CoinexSigner.cc", "generated/CosmosAddress.cc", "generated/CosmosSigner.cc", "generated/Curve.cc", "generated/DecredAddress.cc", "generated/DecredSigner.cc", "generated/EOSAddress.cc", "generated/EOSKeyType.cc", "generated/EOSSigner.cc", "generated/EthereumAddress.cc", "generated/EthereumChainID.cc", "generated/EthereumSigner.cc", "generated/FIOAddress.cc", "generated/GroestlcoinAddress.cc", "generated/GroestlcoinTransactionSigner.cc", "generated/HDVersion.cc", "generated/HDWallet.cc", "generated/HRP.cc", "generated/Hash.cc", "generated/IOSTAccount.cc", "generated/IOSTSigner.cc", "generated/IconAddress.cc", "generated/IconAddressType.cc", "generated/IconSigner.cc", "generated/IoTeXAddress.cc", "generated/IoTeXSigner.cc", "generated/KeyDerivation.cc", "generated/NEOAddress.cc", "generated/NULSAddress.cc", "generated/NULSSigner.cc", "generated/NanoAddress.cc", "generated/NanoSigner.cc", "generated/NebulasAddress.cc", "generated/NebulasSigner.cc", "generated/NimiqAddress.cc", "generated/NimiqSigner.cc", "generated/OntologyAddress.cc", "generated/OntologySigner.cc", "generated/PKCS8.cc", "generated/PrivateKey.cc", "generated/PublicKey.cc", "generated/PublicKeyType.cc", "generated/Purpose.cc", "generated/RippleAddress.cc", "generated/RippleSigner.cc", "generated/SegwitAddress.cc", "generated/SemuxAddress.cc", "generated/SemuxSigner.cc", "generated/SteemAddress.cc", "generated/SteemSigner.cc", "generated/StellarAddress.cc", "generated/StellarMemoType.cc", "generated/StellarPassphrase.cc", "generated/StellarSigner.cc", "generated/StellarVersionByte.cc", "generated/StoredKey.cc", "generated/TezosAddress.cc", "generated/TezosSigner.cc", "generated/ThetaSigner.cc", "generated/TronAddress.cc", "generated/TronSigner.cc", "generated/VeChainSigner.cc", "generated/WanchainAddress.cc", "generated/WanchainSigner.cc", "generated/WavesAddress.cc", "generated/WavesSigner.cc", "generated/X509.cc", "generated/ZcashTAddress.cc", "generated/ZcashTransactionSigner.cc", "generated/ZilliqaAddress.cc", "generated/ZilliqaSigner.cc", ], "include_dirs": [ "<!@(node -p \"require('node-addon-api').include\")", "<(module_root_dir)/", "<(module_root_dir)/../../include", "<(module_root_dir)/../../trezor-crypto/include" ], "libraries": [ "<(module_root_dir)/../../build/libTrustWalletCore.a", "<(module_root_dir)/../../build/trezor-crypto/libTrezorCrypto.a", "<(module_root_dir)/../../build/libprotobuf.a" ] } ] }
36.80597
86
0.584144
413
4,932
6.920097
0.42615
0.357943
0.027292
0.018894
0.013296
0
0
0
0
0
0
0.005035
0.275142
4,932
133
87
37.082707
0.794126
0.061233
0
0.016129
0
0
0.627137
0.530188
0
0
0
0
0
1
0
true
0.008065
0
0
0
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
1fe0e406c2998ffaf8b24cbe0a81818900eaad8d
149
py
Python
runtest.py
yoavrotems/kube-hunter
e7585f4ed38a6fa08b692676ee417dbc1b919b91
[ "Apache-2.0" ]
1
2021-09-13T21:52:52.000Z
2021-09-13T21:52:52.000Z
runtest.py
yoavrotems/kube-hunter
e7585f4ed38a6fa08b692676ee417dbc1b919b91
[ "Apache-2.0" ]
2
2021-05-20T20:17:17.000Z
2022-02-26T09:20:16.000Z
runtest.py
yoavrotems/kube-hunter
e7585f4ed38a6fa08b692676ee417dbc1b919b91
[ "Apache-2.0" ]
1
2020-08-13T13:49:38.000Z
2020-08-13T13:49:38.000Z
#!/usr/bin/env python3 import argparse import pytest import tests def main(): exit(pytest.main(['.'])) if __name__ == '__main__': main()
11.461538
28
0.644295
19
149
4.631579
0.684211
0
0
0
0
0
0
0
0
0
0
0.008264
0.187919
149
12
29
12.416667
0.719008
0.14094
0
0
0
0
0.070866
0
0
0
0
0
0
1
0.142857
true
0
0.428571
0
0.571429
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
1feb0dad35334d360cd2b3f554831b2debddf485
144
py
Python
pip_audit/__main__.py
westonsteimel/pip-audit
3b29e66418de9236c92b3ffaa254ae9def2bdcbf
[ "Apache-2.0" ]
447
2021-09-02T17:06:18.000Z
2022-03-28T20:58:22.000Z
pip_audit/__main__.py
westonsteimel/pip-audit
3b29e66418de9236c92b3ffaa254ae9def2bdcbf
[ "Apache-2.0" ]
177
2021-09-02T16:45:42.000Z
2022-03-29T14:19:11.000Z
pip_audit/__main__.py
westonsteimel/pip-audit
3b29e66418de9236c92b3ffaa254ae9def2bdcbf
[ "Apache-2.0" ]
25
2021-09-13T16:04:23.000Z
2022-03-21T17:47:28.000Z
""" The `python -m pip_audit` entrypoint. """ if __name__ == "__main__": # pragma: no cover from pip_audit._cli import audit audit()
16
46
0.645833
19
144
4.315789
0.789474
0.195122
0
0
0
0
0
0
0
0
0
0
0.215278
144
8
47
18
0.725664
0.381944
0
0
0
0
0.098765
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
1ffd7f0dc14e4b67f71172141534c8f76fdd558d
85
py
Python
napari_pyclesperanto_assistant/__init__.py
clEsperanto/napari_pyclesperanto_assistant
7d01887392e4c68a7cdec0d792c643190f2d4e5f
[ "BSD-3-Clause" ]
16
2021-01-27T02:29:24.000Z
2022-03-29T13:39:36.000Z
napari_pyclesperanto_assistant/__init__.py
clEsperanto/napari_pyclesperanto_assistant
7d01887392e4c68a7cdec0d792c643190f2d4e5f
[ "BSD-3-Clause" ]
41
2021-01-01T17:45:23.000Z
2022-03-20T19:54:54.000Z
napari_pyclesperanto_assistant/__init__.py
clEsperanto/napari_pyclesperanto_assistant
7d01887392e4c68a7cdec0d792c643190f2d4e5f
[ "BSD-3-Clause" ]
6
2021-01-05T13:19:38.000Z
2022-02-15T15:32:58.000Z
from ._gui import Assistant from ._convert_to_numpy import * __version__ = "0.11.9"
17
32
0.764706
13
85
4.384615
0.846154
0
0
0
0
0
0
0
0
0
0
0.054795
0.141176
85
4
33
21.25
0.726027
0
0
0
0
0
0.070588
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
951bd28e396d7caa946850ed2d80da16c2c1ab47
223
py
Python
Vault/Shell/Security.py
cloud-hybrid/Cloud
966f0b7e166f91a09116e9aaa6708352222b1ad5
[ "MIT" ]
null
null
null
Vault/Shell/Security.py
cloud-hybrid/Cloud
966f0b7e166f91a09116e9aaa6708352222b1ad5
[ "MIT" ]
null
null
null
Vault/Shell/Security.py
cloud-hybrid/Cloud
966f0b7e166f91a09116e9aaa6708352222b1ad5
[ "MIT" ]
null
null
null
import subprocess class Security(object): def __init__(self): pass def createKey(): pass def authorizeKey(public_key, user, client): command = f"""scp {public_key} {user}@{client}:~/.ssh/authorized_keys
20.272727
73
0.690583
28
223
5.25
0.75
0.095238
0.176871
0.258503
0
0
0
0
0
0
0
0
0.174888
223
11
73
20.272727
0.798913
0
0
0.25
0
0
0
0
0
0
0
0
0
0
null
null
0.25
0.125
null
null
0
1
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
1
0
0
1
0
0
0
0
0
4
953330b5193d29660e2f19218075261b6702473d
23
py
Python
lang/py/cookbook/v2/source/cb2_18_14_exm_4.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
null
null
null
lang/py/cookbook/v2/source/cb2_18_14_exm_4.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
null
null
null
lang/py/cookbook/v2/source/cb2_18_14_exm_4.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
null
null
null
some_measurement * 2.0
11.5
22
0.782609
4
23
4.25
1
0
0
0
0
0
0
0
0
0
0
0.1
0.130435
23
1
23
23
0.75
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
1f1af84f8cde53ca9b1b3a504bcf4a9e500539cc
201
py
Python
dartcms/apps/shop/order_detail/forms.py
astrikov-d/dartcms
41af3ecfcff73d3fb6a483e3a6ca1c4acb6278fa
[ "MIT" ]
26
2015-01-12T09:47:32.000Z
2021-04-15T14:09:49.000Z
dartcms/apps/shop/order_detail/forms.py
astrikov-d/dartcms
41af3ecfcff73d3fb6a483e3a6ca1c4acb6278fa
[ "MIT" ]
41
2016-07-04T06:55:31.000Z
2019-07-31T14:11:53.000Z
dartcms/apps/shop/order_detail/forms.py
astrikov-d/dartcms
41af3ecfcff73d3fb6a483e3a6ca1c4acb6278fa
[ "MIT" ]
12
2015-01-20T09:51:53.000Z
2021-01-26T16:51:47.000Z
from dartcms.utils.loading import get_model from django.forms import ModelForm class OrderDatailForm(ModelForm): class Meta: model = get_model('shop', 'OrderDetail') exclude = []
22.333333
48
0.706468
23
201
6.086957
0.695652
0.114286
0
0
0
0
0
0
0
0
0
0
0.20398
201
8
49
25.125
0.875
0
0
0
0
0
0.074627
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
1f395ddec8054916c8ea6ec26071dc225188c4bf
35
py
Python
env/lib/python3.6/fnmatch.py
xianjunzhengbackup/Cloud-Native-Python
0b74303b444a74210bc2e95f13d17771f6f71583
[ "MIT" ]
2
2020-09-22T14:38:24.000Z
2020-10-30T03:11:36.000Z
SDK/Example/Linkage_demo/work_with_AlwaysAI/pedestrian_tracking_demo/venv/lib/python3.6/fnmatch.py
EyecloudAi/OpenNCC-SDK
efeebfe385a900280de6f46d80bd6fff0416aba3
[ "Apache-2.0" ]
null
null
null
SDK/Example/Linkage_demo/work_with_AlwaysAI/pedestrian_tracking_demo/venv/lib/python3.6/fnmatch.py
EyecloudAi/OpenNCC-SDK
efeebfe385a900280de6f46d80bd6fff0416aba3
[ "Apache-2.0" ]
1
2019-11-21T12:23:41.000Z
2019-11-21T12:23:41.000Z
/usr/local/lib/python3.6/fnmatch.py
35
35
0.8
7
35
4
1
0
0
0
0
0
0
0
0
0
0
0.057143
0
35
1
35
35
0.742857
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
1f8b513590bfecbd10521c54ba8787d7d071ad83
177
py
Python
large_image/exceptions.py
Do-AI/large_image
ecf6f28dc8fabc79534c7c39e0307512b9734b08
[ "Apache-2.0" ]
null
null
null
large_image/exceptions.py
Do-AI/large_image
ecf6f28dc8fabc79534c7c39e0307512b9734b08
[ "Apache-2.0" ]
null
null
null
large_image/exceptions.py
Do-AI/large_image
ecf6f28dc8fabc79534c7c39e0307512b9734b08
[ "Apache-2.0" ]
null
null
null
class TileGeneralException(Exception): pass class TileSourceException(TileGeneralException): pass class TileSourceAssetstoreException(TileSourceException): pass
16.090909
57
0.80791
12
177
11.916667
0.5
0.125874
0
0
0
0
0
0
0
0
0
0
0.141243
177
10
58
17.7
0.940789
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
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
4
2f2f2fd0a45ef945fcc44aeb8be5a15135daaa32
3,830
py
Python
test/test_node.py
criptalia/nis-python-client
2d09340850770768a006680287cf11b6e5bfedb4
[ "MIT" ]
17
2017-12-25T11:58:18.000Z
2021-03-24T14:50:42.000Z
test/test_node.py
criptalia/nis-python-client
2d09340850770768a006680287cf11b6e5bfedb4
[ "MIT" ]
3
2017-12-20T14:13:43.000Z
2018-01-02T15:48:24.000Z
test/test_node.py
criptalia/nis-python-client
2d09340850770768a006680287cf11b6e5bfedb4
[ "MIT" ]
16
2018-01-03T04:54:31.000Z
2022-02-21T10:10:36.000Z
from unittest import TestCase import requests import requests_mock from nemnis import Client, Node class TestNode(TestCase): def setUp(self): self.client = Client(endpoint='mock://127.0.0.1:7890') def test_client_is_used(self): node = Node(self.client) self.assertEqual(node.client, self.client) self.assertEqual(node.name, 'node/') def test_info(self): with requests_mock.Mocker() as m: m.get('mock://127.0.0.1:7890/node/info', status_code=200) resp = self.client.node.info() self.assertIsInstance(resp, requests.Response) self.assertEqual(resp.url, 'mock://127.0.0.1:7890/node/info') self.assertEqual(resp.status_code, 200) def test_extended_info(self): with requests_mock.Mocker() as m: m.get('mock://127.0.0.1:7890/node/extended-info', status_code=200) resp = self.client.node.extended_info() self.assertIsInstance(resp, requests.Response) self.assertEqual(resp.url, 'mock://127.0.0.1:7890/node/extended-info') self.assertEqual(resp.status_code, 200) def test_peer_list_all(self): with requests_mock.Mocker() as m: m.get('mock://127.0.0.1:7890/node/peer-list/all', status_code=200) resp = self.client.node.peer_list_all() self.assertIsInstance(resp, requests.Response) self.assertEqual(resp.url, 'mock://127.0.0.1:7890/node/peer-list/all') self.assertEqual(resp.status_code, 200) def test_peer_list_reachable(self): with requests_mock.Mocker() as m: m.get('mock://127.0.0.1:7890/node/peer-list/reachable', status_code=200) resp = self.client.node.peer_list_reachable() self.assertIsInstance(resp, requests.Response) self.assertEqual(resp.url, 'mock://127.0.0.1:7890/node/peer-list/reachable') self.assertEqual(resp.status_code, 200) def test_peer_list_active(self): with requests_mock.Mocker() as m: m.get('mock://127.0.0.1:7890/node/peer-list/active', status_code=200) resp = self.client.node.peer_list_active() self.assertIsInstance(resp, requests.Response) self.assertEqual(resp.url, 'mock://127.0.0.1:7890/node/peer-list/active') self.assertEqual(resp.status_code, 200) def test_max_chain_height(self): with requests_mock.Mocker() as m: m.get('mock://127.0.0.1:7890/node/active-peers/max-chain-height', status_code=200) resp = self.client.node.max_chain_height() self.assertIsInstance(resp, requests.Response) self.assertEqual( resp.url, 'mock://127.0.0.1:7890/node/active-peers/max-chain-height' ) self.assertEqual(resp.status_code, 200) def test_experiences(self): with requests_mock.Mocker() as m: m.get('mock://127.0.0.1:7890/node/experiences', status_code=200) resp = self.client.node.experiences() self.assertIsInstance(resp, requests.Response) self.assertEqual(resp.url, 'mock://127.0.0.1:7890/node/experiences') self.assertEqual(resp.status_code, 200) def test_boot(self): with requests_mock.Mocker() as m: m.post('mock://127.0.0.1:7890/node/boot', status_code=200) resp = self.client.node.boot({'testbootobject': 'data'}) self.assertIsInstance(resp, requests.Response) self.assertEqual(resp.url, 'mock://127.0.0.1:7890/node/boot') self.assertEqual(resp.status_code, 200)
42.555556
80
0.602872
501
3,830
4.500998
0.103792
0.119734
0.06031
0.067849
0.863858
0.830155
0.809756
0.768514
0.652772
0.571175
0
0.077305
0.263708
3,830
89
81
43.033708
0.72234
0
0
0.402597
0
0.025974
0.181201
0.175196
0
0
0
0
0.337662
1
0.12987
false
0
0.051948
0
0.194805
0
0
0
0
null
0
0
0
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
2f65750fbac6badd1b96c8332fdeeb5b3cda5a74
333
py
Python
password.py
andybyers21/python_files
bfcc0d8be01ea6bad5b1217adaa2e8ebfdb48952
[ "MIT" ]
null
null
null
password.py
andybyers21/python_files
bfcc0d8be01ea6bad5b1217adaa2e8ebfdb48952
[ "MIT" ]
null
null
null
password.py
andybyers21/python_files
bfcc0d8be01ea6bad5b1217adaa2e8ebfdb48952
[ "MIT" ]
null
null
null
import random import string def password(len, chars=string.ascii_letters + string.digits + string.punctuation): """ Generate a random password string with user defined amount of characters. """ return "".join(random.choice(chars) for _ in range(len)) print(password(int(input('How many characters in your password? '))))
30.272727
85
0.738739
45
333
5.422222
0.688889
0
0
0
0
0
0
0
0
0
0
0
0.147147
333
10
86
33.3
0.859155
0.219219
0
0
1
0
0.150794
0
0
0
0
0
0
1
0.2
false
0.4
0.4
0
0.8
0.2
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
1
1
0
1
0
0
4
2f66579ac49457dd2b3bd12e46e2fd73c5e70d56
218
py
Python
appyter/render/__init__.py
MaayanLab/jupyter-template
dd05bfcb95c9eafb1a9df845b5d8fecae1d6b9d5
[ "Apache-2.0" ]
null
null
null
appyter/render/__init__.py
MaayanLab/jupyter-template
dd05bfcb95c9eafb1a9df845b5d8fecae1d6b9d5
[ "Apache-2.0" ]
24
2020-04-07T17:04:47.000Z
2020-05-27T00:51:25.000Z
appyter/render/__init__.py
MaayanLab/jupyter-template
dd05bfcb95c9eafb1a9df845b5d8fecae1d6b9d5
[ "Apache-2.0" ]
null
null
null
''' Each submodule represents a machanism for rendering an appyter as something new. ''' import os from appyter.ext.importlib import importdir importdir(os.path.join(os.path.dirname(__file__)), __package__, globals())
36.333333
84
0.788991
30
218
5.466667
0.8
0.073171
0
0
0
0
0
0
0
0
0
0
0.105505
218
5
85
43.6
0.841026
0.366972
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
2f80a1c7ddad45137b92927f65c42c5f73d20bfd
295
py
Python
examples/miniapps/services_v2/example/main.py
vlad-ghita/python-dependency-injector
5cf5bdda24851dd97cfa0f5054f4a8c35ddac014
[ "BSD-3-Clause" ]
null
null
null
examples/miniapps/services_v2/example/main.py
vlad-ghita/python-dependency-injector
5cf5bdda24851dd97cfa0f5054f4a8c35ddac014
[ "BSD-3-Clause" ]
null
null
null
examples/miniapps/services_v2/example/main.py
vlad-ghita/python-dependency-injector
5cf5bdda24851dd97cfa0f5054f4a8c35ddac014
[ "BSD-3-Clause" ]
null
null
null
"""Example main module.""" def main(uid, password, photo, users_service, auth_service, photos_service): """Authenticate user and upload photo.""" user = users_service.get_user_by_id(uid) auth_service.authenticate(user, password) photos_service.upload_photo(user['uid'], photo)
32.777778
76
0.735593
39
295
5.307692
0.461538
0.115942
0.222222
0
0
0
0
0
0
0
0
0
0.135593
295
8
77
36.875
0.811765
0.189831
0
0
0
0
0.013158
0
0
0
0
0
0
1
0.25
false
0.5
0
0
0.25
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
1
0
0
0
0
0
4
2f9bed3293269fefa2bfdc1ebe7a211f16312f42
139
py
Python
wmt/flask/names/__init__.py
mcflugen/wmt-rest
7ac99b3e1100df4c797fa6156d96a4ca0d318a45
[ "MIT" ]
null
null
null
wmt/flask/names/__init__.py
mcflugen/wmt-rest
7ac99b3e1100df4c797fa6156d96a4ca0d318a45
[ "MIT" ]
null
null
null
wmt/flask/names/__init__.py
mcflugen/wmt-rest
7ac99b3e1100df4c797fa6156d96a4ca0d318a45
[ "MIT" ]
null
null
null
from flask import current_app from ..core import Service, db from .models import Name class NamesService(Service): __model__ = Name
15.444444
30
0.76259
19
139
5.315789
0.684211
0
0
0
0
0
0
0
0
0
0
0
0.179856
139
8
31
17.375
0.885965
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.6
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
85cd9fb87f5320c4f3f302a939b12f21d33ee30e
59
py
Python
design_pattern_singleton.py
pedro-abritta/exercicio1_C214-L2
5b1ac4d7ed8f7f65610027b69adb1edd7ddc4575
[ "MIT" ]
null
null
null
design_pattern_singleton.py
pedro-abritta/exercicio1_C214-L2
5b1ac4d7ed8f7f65610027b69adb1edd7ddc4575
[ "MIT" ]
null
null
null
design_pattern_singleton.py
pedro-abritta/exercicio1_C214-L2
5b1ac4d7ed8f7f65610027b69adb1edd7ddc4575
[ "MIT" ]
null
null
null
from main import Calc mensagem = Calc("Mensagem teste 2!")
19.666667
36
0.745763
9
59
4.888889
0.777778
0.545455
0
0
0
0
0
0
0
0
0
0.02
0.152542
59
3
36
19.666667
0.86
0
0
0
0
0
0.283333
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
85cf03fd13fc0b527b5b866db22be0af0c9157fd
102
py
Python
irclib/__init__.py
dkovar/ircollect
c2cff0b843a80b18e38d6b3f1551f81a4f34d1bc
[ "Apache-2.0" ]
21
2015-02-01T12:07:46.000Z
2021-08-16T14:08:10.000Z
irclib/__init__.py
dkovar/ircollect
c2cff0b843a80b18e38d6b3f1551f81a4f34d1bc
[ "Apache-2.0" ]
null
null
null
irclib/__init__.py
dkovar/ircollect
c2cff0b843a80b18e38d6b3f1551f81a4f34d1bc
[ "Apache-2.0" ]
9
2015-06-06T03:55:33.000Z
2021-05-20T02:53:35.000Z
__all__ = ["irclib.py","ircutils.py","mbr_parser.py"] import irclib import ircutils import mbr_parser
20.4
53
0.77451
15
102
4.866667
0.466667
0.246575
0
0
0
0
0
0
0
0
0
0
0.088235
102
4
54
25.5
0.784946
0
0
0
0
0
0.323529
0
0
0
0
0
0
1
0
false
0
0.75
0
0.75
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
85e4981f88e5221ad15c08327effaefb2a344c4a
135
py
Python
e_commerce/items/urls.py
MiKueen/Django
67afc73676a9a58d4d0badc5b53410f164846b79
[ "Apache-2.0" ]
null
null
null
e_commerce/items/urls.py
MiKueen/Django
67afc73676a9a58d4d0badc5b53410f164846b79
[ "Apache-2.0" ]
8
2019-08-06T02:03:39.000Z
2021-06-10T18:07:47.000Z
e_commerce/items/urls.py
MiKueen/Django
67afc73676a9a58d4d0badc5b53410f164846b79
[ "Apache-2.0" ]
null
null
null
from django.urls import path from .views import item_list app_name = 'items' urlpatterns = [ path('', item_list, name='item_list') ]
16.875
38
0.725926
20
135
4.7
0.6
0.255319
0
0
0
0
0
0
0
0
0
0
0.148148
135
8
39
16.875
0.817391
0
0
0
0
0
0.102941
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
85e9f96142eab1aa35260b7e561fc36c0fd3f034
82
py
Python
pystratis/api/rpc/requestmodels/__init__.py
TjadenFroyda/pyStratis
9cc7620d7506637f8a2b84003d931eceb36ac5f2
[ "MIT" ]
8
2021-06-30T20:44:22.000Z
2021-12-07T14:42:22.000Z
pystratis/api/rpc/requestmodels/__init__.py
TjadenFroyda/pyStratis
9cc7620d7506637f8a2b84003d931eceb36ac5f2
[ "MIT" ]
2
2021-07-01T11:50:18.000Z
2022-01-25T18:39:49.000Z
pystratis/api/rpc/requestmodels/__init__.py
TjadenFroyda/pyStratis
9cc7620d7506637f8a2b84003d931eceb36ac5f2
[ "MIT" ]
4
2021-07-01T04:36:42.000Z
2021-09-17T10:54:19.000Z
from .callbynamerequest import CallByNameRequest __all__ = ['CallByNameRequest']
20.5
48
0.829268
6
82
10.666667
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.097561
82
3
49
27.333333
0.864865
0
0
0
0
0
0.207317
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
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
0
0
1
0
0
0
0
4
c8195292d31a73a6c82b1fe235da7711e685c31d
222
py
Python
python/testData/testRunner/env/unit/test_folder/test_internal_test2.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/testRunner/env/unit/test_folder/test_internal_test2.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/testRunner/env/unit/test_folder/test_internal_test2.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
from unittest import TestCase class UTests(TestCase): def testOne(self): self.assertEqual(5, 2*2) def testTwo(self): self.assertTrue(False) def testThree(self): self.assertTrue(True)
18.5
32
0.648649
27
222
5.333333
0.62963
0.166667
0.25
0
0
0
0
0
0
0
0
0.017964
0.247748
222
11
33
20.181818
0.844311
0
0
0
0
0
0
0
0
0
0
0
0.375
1
0.375
false
0
0.125
0
0.625
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
0
1
0
0
4
c81a3c35dbc862643aaf403e4df08ba9e0ed99a2
94
py
Python
test/test_longest_repeating_character_replacement.py
spencercjh/sync-leetcode-today-problem-python3-example
4957e5eadb697334741df0fc297bec2edaa9e2ab
[ "Apache-2.0" ]
null
null
null
test/test_longest_repeating_character_replacement.py
spencercjh/sync-leetcode-today-problem-python3-example
4957e5eadb697334741df0fc297bec2edaa9e2ab
[ "Apache-2.0" ]
null
null
null
test/test_longest_repeating_character_replacement.py
spencercjh/sync-leetcode-today-problem-python3-example
4957e5eadb697334741df0fc297bec2edaa9e2ab
[ "Apache-2.0" ]
null
null
null
solution = LongestRepeatingCharacterReplacement() assert X == solution.characterReplacement( )
47
49
0.840426
6
94
13.166667
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.074468
94
2
50
47
0.908046
0
0
0
0
0
0
0
0
0
0
0
0.5
1
0
false
0
0
0
0
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
1
0
0
0
0
0
0
0
0
0
4
c86a8977968bf82a02474cee20735d498901199a
1,265
py
Python
saas/backend/util/basic.py
nannan00/bk-iam-saas
217600fa6e5fd466fff9c33c20c4dbd7c69f77d9
[ "MIT" ]
7
2021-08-13T03:48:16.000Z
2021-12-20T15:31:38.000Z
saas/backend/util/basic.py
nannan00/bk-iam-saas
217600fa6e5fd466fff9c33c20c4dbd7c69f77d9
[ "MIT" ]
456
2021-08-16T02:13:57.000Z
2022-03-30T10:02:49.000Z
saas/backend/util/basic.py
nannan00/bk-iam-saas
217600fa6e5fd466fff9c33c20c4dbd7c69f77d9
[ "MIT" ]
17
2021-08-10T04:08:46.000Z
2022-03-14T14:24:36.000Z
# -*- coding: utf-8 -*- """ TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-权限中心(BlueKing-IAM) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://opensource.org/licenses/MIT Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ from typing import List def chunked(data: List, chunk_size: int): """ Break data into lists of length chunk_size: E.g.:: chunked([1, 2, 3, 4, 5, 6], 3) [[1, 2, 3], [4, 5, 6]] By the default, the last chunk list will have fewer than chunk_size elements if the length of data is not divisible by chunk_size: E.g.:: chunked([1, 2, 3, 4, 5, 6, 7, 8], 3) [[1, 2, 3], [4, 5, 6], [7, 8]] """ return [data[i : i + chunk_size] for i in range(0, len(data), chunk_size)] # 直接使用range的步长功能进行分块
45.178571
115
0.690119
208
1,265
4.168269
0.581731
0.069204
0.013841
0.018454
0.076125
0.076125
0.076125
0.066897
0.055363
0.055363
0
0.041916
0.207905
1,265
27
116
46.851852
0.823353
0.832411
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
4
c077a5d536d030b79fe01975b9681f2a9f696a53
404
py
Python
nidhogg/models.py
project-yggdrasil/nidhogg
51d8fe8ee39a52a1bc2f26f611d70929aa57207c
[ "MIT" ]
2
2021-11-26T13:59:42.000Z
2022-02-13T04:30:58.000Z
nidhogg/models.py
project-yggdrasil/nidhogg
51d8fe8ee39a52a1bc2f26f611d70929aa57207c
[ "MIT" ]
null
null
null
nidhogg/models.py
project-yggdrasil/nidhogg
51d8fe8ee39a52a1bc2f26f611d70929aa57207c
[ "MIT" ]
null
null
null
from typing import List, Optional from sqlmodel import Field, SQLModel from nidhogg import engine # TODO mobs_ids into a list, but sqlite doesnt have an array type bc that would make too much sense class DuelData(SQLModel, table=True): duel_id: int = Field(primary_key=True) mob_ids: int oleaf_version: Optional[str] client_version: Optional[str] SQLModel.metadata.create_all(engine)
26.933333
99
0.769802
62
404
4.903226
0.725806
0.098684
0.118421
0
0
0
0
0
0
0
0
0
0.168317
404
14
100
28.857143
0.904762
0.240099
0
0
0
0
0
0
0
0
0
0.071429
0
1
0
true
0
0.333333
0
0.888889
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
0
1
0
1
0
1
0
0
4
c09dd16a925389ea8457c0780c9d1ded081bdcd3
696
py
Python
app/functions/difficulty_calculator.py
neuralhalation/flask-call-of-cthulhu
59e1afc9ac1244106fe3439f9a37f16dcfc15d52
[ "MIT" ]
null
null
null
app/functions/difficulty_calculator.py
neuralhalation/flask-call-of-cthulhu
59e1afc9ac1244106fe3439f9a37f16dcfc15d52
[ "MIT" ]
null
null
null
app/functions/difficulty_calculator.py
neuralhalation/flask-call-of-cthulhu
59e1afc9ac1244106fe3439f9a37f16dcfc15d52
[ "MIT" ]
null
null
null
import math def calculate_hard_difficulty(base_score): """Hard difficulty is calculated by taking the character's base characteristic score and multiplying it by 1/2. Args: base_score (float): The character's base score. Return: float: The hard difficulty score. """ return math.trunc(base_score * (1/2)) def calculate_extreme_difficulty(base_score): """ Extreme difficulty is calculated by taking the character's base characteristic score and multiplying it by 1/5. Args: base_score (float): The character's base score. Return: float: The extreme difficulty score. """ return math.trunc(base_score * (1/5))
24.857143
66
0.685345
94
696
4.968085
0.287234
0.154176
0.111349
0.14561
0.766595
0.766595
0.766595
0.766595
0.595289
0.595289
0
0.015009
0.234195
696
27
67
25.777778
0.861163
0.625
0
0
0
0
0
0
0
0
0
0
0
1
0.4
false
0
0.2
0
1
0
0
0
0
null
0
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
c0fd86aa357117b2c27bc379cb7151b08f93110d
1,663
py
Python
resources/panels/seeds/period_adverb.py
exposit/pythia-oracle
60e4e806c9ed1627f2649822ab1901d28933daac
[ "MIT" ]
32
2016-08-27T01:31:42.000Z
2022-03-21T08:59:28.000Z
resources/panels/seeds/period_adverb.py
exposit/pythia-oracle
60e4e806c9ed1627f2649822ab1901d28933daac
[ "MIT" ]
3
2016-08-27T00:51:47.000Z
2019-08-26T13:23:04.000Z
resources/panels/seeds/period_adverb.py
exposit/pythia-oracle
60e4e806c9ed1627f2649822ab1901d28933daac
[ "MIT" ]
10
2016-08-28T14:14:41.000Z
2021-03-18T03:24:22.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # a tale of two cities chart = ["absolutely", "accordingly", "accurately", "actually", "additionally", "adequately", "affectionately", "again", "airily", "alike", "altogether", "always", "aside", "assuredly", "atmosphere", "awake", "barely", "before", "bitterly", "bodily", "brightly", "brilliantly", "brotherly", "busily", "certainly", "chronically", "comely", "comparatively", "confidingly", "consequently", "constantly", "convulsively", "cunningly", "deftly", "devotedly", "directly", "drily", "drunkenly", "earnestly", "eternally", "evidently", "exceedingly", "expectantly", "extremely", "fiercely", "firmly", "fondly", "forborne", "forcibly", "formerly", "forwardly", "freely", "friendly", "gaily", "gently", "gigantically", "graciously", "grimly", "hastily", "homely", "immediately", "imperfectly", "incessantly", "indefinitely", "inevitably", "instantly", "instinctively", "intimately", "joyfully", "kindly", "languidly", "lately", "legibly", "leisurely", "likely", "lively", "magnificently", "majestically", "menacingly", "merely", "mightily", "miserably", "musingly", "never", "obstinately", "occasionally", "openly", "outwardly", "partially", "perfectly", "perpetually", "pleasantly", "portly", "possibly", "powerfully", "prettily", "previously", "privately", "publicly", "rapidly", "restlessly", "scantily", "securely", "shaken", "signally", "simultaneously", "slightly", "smilingly", "smoother", "steadily", "stealthily", "sternly", "sufficiently", "surprisingly", "tenderly", "timidly", "traitorously", "uneasily", "ungently", "unnecessarily", "unworthily", "uselessly", "vaguely", "widely", "wisely"],
415.75
1,593
0.678894
138
1,663
8.181159
1
0
0
0
0
0
0
0
0
0
0
0.000657
0.084787
1,663
4
1,593
415.75
0.74113
0.038485
0
0
0
0
0.678147
0
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
0
0
1
1
1
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
238d19a7be59b1ec40e3bf81c72a40c2d63c352b
89
py
Python
probing/tasks/multiwoz/__init__.py
AbdulSaleh/dialog-probing
12a04e7ca3363d428aca96e8c2c2ce2ec518a767
[ "MIT" ]
8
2020-06-09T03:36:21.000Z
2021-12-02T10:08:45.000Z
probing/tasks/multiwoz/__init__.py
AbdulSaleh/dialog-probing
12a04e7ca3363d428aca96e8c2c2ce2ec518a767
[ "MIT" ]
5
2020-09-26T00:38:43.000Z
2022-02-10T00:32:54.000Z
probing/tasks/multiwoz/__init__.py
AbdulSaleh/dialog-probing
12a04e7ca3363d428aca96e8c2c2ce2ec518a767
[ "MIT" ]
2
2021-05-14T19:34:18.000Z
2021-08-23T13:41:59.000Z
#!/usr/bin/env python3 # Casper, Deutsch, Saleh Project # scasper@college.harvard.edu
12.714286
32
0.730337
12
89
5.416667
1
0
0
0
0
0
0
0
0
0
0
0.012987
0.134831
89
6
33
14.833333
0.831169
0.898876
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
23a0c9e68048b3a4221849ba5a0ba3eedfc99ec1
84
py
Python
tests/conftest.py
GustavoKatel/django-pymodsecurity
713bab02ad776a26646442a4e05ff5721c247429
[ "MIT" ]
10
2018-10-14T16:38:44.000Z
2020-04-23T10:09:10.000Z
tests/conftest.py
GustavoKatel/django-pymodsecurity
713bab02ad776a26646442a4e05ff5721c247429
[ "MIT" ]
null
null
null
tests/conftest.py
GustavoKatel/django-pymodsecurity
713bab02ad776a26646442a4e05ff5721c247429
[ "MIT" ]
2
2019-09-27T13:37:29.000Z
2020-02-04T10:45:15.000Z
import pytest from django.conf import settings pytest_plugins = ['tests.fixtures']
16.8
35
0.797619
11
84
6
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.119048
84
4
36
21
0.891892
0
0
0
0
0
0.166667
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
23b435e6a31518a3ad883c0e527e5a7242c6f1ef
17,581
py
Python
src/discover/mibs/JUNIPER-IF-MIB.py
QualiSystemsLab/SONiC-Switch-2G
5030307fe6a5e6678ec4df205370ec855d884f1d
[ "Apache-2.0" ]
null
null
null
src/discover/mibs/JUNIPER-IF-MIB.py
QualiSystemsLab/SONiC-Switch-2G
5030307fe6a5e6678ec4df205370ec855d884f1d
[ "Apache-2.0" ]
null
null
null
src/discover/mibs/JUNIPER-IF-MIB.py
QualiSystemsLab/SONiC-Switch-2G
5030307fe6a5e6678ec4df205370ec855d884f1d
[ "Apache-2.0" ]
null
null
null
# PySNMP SMI module. Autogenerated from smidump -f python JUNIPER-IF-MIB # by libsmi2pysnmp-0.1.3 at Thu Jan 21 14:52:14 2016, # Python version sys.version_info(major=2, minor=7, micro=6, releaselevel='final', serial=0) # Imports ( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") ( NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ( ConstraintsIntersection, ConstraintsUnion, SingleValueConstraint, ValueRangeConstraint, ValueSizeConstraint, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ConstraintsUnion", "SingleValueConstraint", "ValueRangeConstraint", "ValueSizeConstraint") ( CounterBasedGauge64, ) = mibBuilder.importSymbols("HCNUM-TC", "CounterBasedGauge64") ( ifEntry, ifIndex, ) = mibBuilder.importSymbols("IF-MIB", "ifEntry", "ifIndex") ( jnxMibs, ) = mibBuilder.importSymbols("JUNIPER-SMI", "jnxMibs") ( Bits, Counter32, Counter64, Gauge32, Integer32, Integer32, ModuleIdentity, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "Counter32", "Counter64", "Gauge32", "Integer32", "Integer32", "ModuleIdentity", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks") ( TimeStamp, ) = mibBuilder.importSymbols("SNMPv2-TC", "TimeStamp") # Objects ifJnx = ModuleIdentity((1, 3, 6, 1, 4, 1, 2636, 3, 3)).setRevisions(("2007-06-05 00:00","2003-07-18 21:53","2002-10-31 00:00","2001-06-21 00:00","2001-03-15 00:00",)) if mibBuilder.loadTexts: ifJnx.setOrganization("Juniper Networks, Inc.") if mibBuilder.loadTexts: ifJnx.setContactInfo(" Juniper Technical Assistance Center\nJuniper Networks, Inc.\n1194 N. Mathilda Avenue\nSunnyvale, CA 94089\nE-mail: support@juniper.net") if mibBuilder.loadTexts: ifJnx.setDescription("The MIB modules extends the ifTable as\ndefined in IF-MIB.") ifJnxTable = MibTable((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1)) if mibBuilder.loadTexts: ifJnxTable.setDescription("A list of Juniper's extension to the interface entries.\nThe number of entries is given by the value of ifNumber.\nThis table contains additional objects for the interface\ntable.") ifJnxEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1)) if mibBuilder.loadTexts: ifJnxEntry.setDescription("An entry containing additional management information\napplicable to a particular interface.") ifIn1SecRate = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 1), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifIn1SecRate.setDescription("The number of bits per second (bps), delivered by \nthis (sub-)layer to its next higher (sub-)layer.") ifIn1SecOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 2), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifIn1SecOctets.setDescription("The number of octets per second (Bps, Bytes per \nsecond), delivered by this (sub-)layer to its next\nhigher (sub-)layer.") ifIn1SecPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 3), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifIn1SecPkts.setDescription("The number of packets per second (pps), delivered\nby this (sub-)layer to its next higher (sub-)layer.") ifOut1SecRate = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 4), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifOut1SecRate.setDescription("The number of bits per second (bps), delivered by\nthis (sub-)layer to its next lower (sub-)layer.") ifOut1SecOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 5), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifOut1SecOctets.setDescription("The number of octets per second (Bps, Bytes per\nsecond), delivered by this (sub-)layer to its next\nlower (sub-)layer.") ifOut1SecPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 6), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifOut1SecPkts.setDescription("The number of packets per second (pps), delivered\nby this (sub-)layer to its next lower (sub-)layer.") ifHCIn1SecRate = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 7), CounterBasedGauge64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifHCIn1SecRate.setDescription("The number of bits per second (bps), delivered by \nthis (sub-)layer to its next higher (sub-)layer.\nThis object is a 64 bit version of ifIn1SecRate.") ifHCOut1SecRate = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 8), CounterBasedGauge64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifHCOut1SecRate.setDescription("The number of bits per second (bps), delivered by\nthis (sub-)layer to its next lower (sub-)layer.\nThis object is a 64 bit version of ifOut1SecRate.") ifJnxInErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 9), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifJnxInErrors.setDescription("Errors: The sum of the incoming frame aborts and FCS errors.") ifJnxInFrameErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 10), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifJnxInFrameErrors.setDescription("Framing Errors: The number of input packets which were \nmisaligned.") ifJnxInQDrops = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 11), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifJnxInQDrops.setDescription("Drops: The number of packets dropped by the input queue of \nthe I/O Manager ASIC.") ifJnxInRunts = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 12), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifJnxInRunts.setDescription("Runts: Frames received that are smaller than the runt \nthreshold.") ifJnxInGiants = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 13), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifJnxInGiants.setDescription("Giants: Frames received that are larger than the giant \nthreshold.") ifJnxInDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 14), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifJnxInDiscards.setDescription("Policed Discards: Frames that the incoming packet match code \ndiscarded because they were not recognized or of interest.") ifJnxInHslCrcErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 15), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifJnxInHslCrcErrors.setDescription("HS Link CRC Errors: The number of CRC errors on the \nhigh-speed links between the ASICs responsible for handling \nthe router interfaces while receiving packets.") ifJnxInHslFifoOverFlows = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 16), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifJnxInHslFifoOverFlows.setDescription("HS link FIFO overflows: The number of FIFO overflows on the\nhigh-speed links between the ASICs responsible for handling\nthe router interfaces.") ifJnxInL3Incompletes = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 17), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifJnxInL3Incompletes.setDescription("L3 incompletes: The number of incoming packets that fail\nLayer 3 sanity checks of the header.") ifJnxInL2ChanErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 18), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifJnxInL2ChanErrors.setDescription("L2 channel errors: the number of incoming packets for which \nthe sofware could not find a valid logical interface.") ifJnxInL2MismatchTimeouts = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 19), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifJnxInL2MismatchTimeouts.setDescription("L2 mismatch timeouts: The count of malformed or short packets\nthat cause the incoming packet handler to discard the frame\nas unreadable.") ifJnxInInvalidVCs = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 20), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifJnxInInvalidVCs.setDescription("Invalid VCs: Number of cells that arrived for a nonexistent\nvirtual circuit.") ifJnxInFifoErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifJnxInFifoErrors.setDescription("FIFO errors: The number of FIFO errors in the receive\ndirection as reported by the ASIC on the PIC.") ifJnxBucketDrops = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 22), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifJnxBucketDrops.setDescription("Bucket drops: Drops due to traffic load exceeding the\ninterface transmit/receive leaky bucket configuration.") ifJnxSramErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifJnxSramErrors.setDescription("SRAM errors: This counter increments when a hardware error\nhas occurred in the SRAM on the PIC.") ifJnxOutErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 24), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifJnxOutErrors.setDescription("Errors: The sum of the outgoing frame aborts and FCS errors.") ifJnxCollisions = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 25), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifJnxCollisions.setDescription("Collisions: The number of output collisions detected on this\ninterface.") ifJnxCarrierTrans = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 26), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifJnxCarrierTrans.setDescription("Carrier transitions: The number of times the interface saw\nthe carrier signal transition.") ifJnxOutQDrops = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 27), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifJnxOutQDrops.setDescription("Drops: The number of packets dropped by the output queue of\nthe I/O Manager ASIC.") ifJnxOutAgedErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 28), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifJnxOutAgedErrors.setDescription("Aged packets: The number of packets that remained in shared\npacket SDRAM for so long that the system automatically purged\nthem.") ifJnxOutFifoErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 29), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifJnxOutFifoErrors.setDescription("FIFO errors: The number of FIFO errors in the transmit\ndirection as reported by the ASIC on the PIC.") ifJnxOutHslFifoUnderFlows = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 30), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifJnxOutHslFifoUnderFlows.setDescription("HS link FIFO underflows: The number of FIFO underflows on the\nhigh-speed links between the ASICs responsible for handling\nthe router interfaces.") ifJnxOutHslCrcErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 1, 1, 31), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifJnxOutHslCrcErrors.setDescription("HS Link CRC Errors: The number of CRC errors on the \nhigh-speed links between the ASICs responsible for handling \nthe router interfaces while transmitting packets.") ifChassisTable = MibTable((1, 3, 6, 1, 4, 1, 2636, 3, 3, 2)) if mibBuilder.loadTexts: ifChassisTable.setDescription("A list of Juniper's extension to the interface entries.\nThe number of entries is given by the value of ifNumber.\nThis table contains additional objects for the interface\ntable to facilitate the identification of interfaces and\nits mapping into the Chassis MIB tables.") ifChassisEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2636, 3, 3, 2, 1)) if mibBuilder.loadTexts: ifChassisEntry.setDescription("An entry containing additional management information\napplicable to a particular interface.") ifChassisFpc = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifChassisFpc.setDescription("The number of the FPC card on which the interface\nis located in the chassis. It is the chassis slot \nin which the FPC card is installed for the specified \ninterface. \n\nAlthough the number is labeled from 0 and up in the \nchassis, the return value for this object always starts\nfrom 1 according to Network Management convention.\nTherefore, a value of zero means there is no real or\nphysical FPC associated with the specified interface.") ifChassisPic = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifChassisPic.setDescription("The number of the PIC card on which the interface\nis located in the chassis. It is the PIC location \non the FPC card for the specified interface.\n\nAlthough the number is labeled from 0 and up in the \nchassis, the return value for this object always starts\nfrom 1 according to Network Management convention.\nTherefore, a value of zero means there is no real or\nphysical PIC associated with the specified interface.") ifChassisPort = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 2, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifChassisPort.setDescription("The number of the port on the PIC card on which the \ninterface is located in the chassis. It is the port \nnumber on the PIC card for the specified interface.\n\nAlthough the number is labeled from 0 and up in the \nchassis, the return value for this object always starts\nfrom 1 according to Network Management convention.\nTherefore, a value of zero means there is no real or\nphysical port associated with the specified interface.") ifChassisChannel = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 2, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifChassisChannel.setDescription("The channel identifier for the specified interface\nif and only if it is part of a channelized interface.\n\nAlthough the channel is numbered from 0 and up in the \ninterface naming, the return value for this object \nalways starts from 1 according to Network Management \nconvention. For the interface which could not be \nchannelized, this object returns zero.") ifChassisLogicalUnit = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 2, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifChassisLogicalUnit.setDescription("The logical unit number of the specified interface.\nIt is the logical part of the interface that is \nconfigured on the physical or channel part if any.\n\nAlthough the logical unit number is numbered from 0 and\nup in the interface naming, the return value for this \nobject always starts from 1 according to Network \nManagement convention. For the interface which is \nreally a physical device, this value returns zero.") ifChassisPicIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 3, 2, 1, 6), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifChassisPicIndex.setDescription("The index or indices for the Chassis MIB tables.\nThis is the instance index which keys into the \njnxContentsTable in Chassis MIB.\n\nFor example, it could return an octet string of\n'8.1.2.0' - meaning a PIC ('8', first digit) \nat FPC slot 0 ('1-1', second digit minus one if nonzero)\nPIC number 1 ('2-1', third digit minus one if nonzero)\nport number whatever (fourth digit currently unused)\n- which in turn could be plugged in by NMS directly\nafter any MIB objects in the jnxContentsTable, say\n'jnxContentsDescr.8.1.2.0', so NMS could get that\nPIC object for the specified interface.\n\nThis object is valid only for those interfaces having \nreal and physical PIC cards. Otherwise, it returns \nan octet string of four zeros '0.0.0.0.'") # Augmentions ifEntry, = mibBuilder.importSymbols("IF-MIB", "ifEntry") ifEntry.registerAugmentions(("JUNIPER-IF-MIB", "ifJnxEntry")) ifJnxEntry.setIndexNames(*ifEntry.getIndexNames()) ifEntry, = mibBuilder.importSymbols("IF-MIB", "ifEntry") ifEntry.registerAugmentions(("JUNIPER-IF-MIB", "ifChassisEntry")) ifChassisEntry.setIndexNames(*ifEntry.getIndexNames()) # Exports # Module identity mibBuilder.exportSymbols("JUNIPER-IF-MIB", PYSNMP_MODULE_ID=ifJnx) # Objects mibBuilder.exportSymbols("JUNIPER-IF-MIB", ifJnx=ifJnx, ifJnxTable=ifJnxTable, ifJnxEntry=ifJnxEntry, ifIn1SecRate=ifIn1SecRate, ifIn1SecOctets=ifIn1SecOctets, ifIn1SecPkts=ifIn1SecPkts, ifOut1SecRate=ifOut1SecRate, ifOut1SecOctets=ifOut1SecOctets, ifOut1SecPkts=ifOut1SecPkts, ifHCIn1SecRate=ifHCIn1SecRate, ifHCOut1SecRate=ifHCOut1SecRate, ifJnxInErrors=ifJnxInErrors, ifJnxInFrameErrors=ifJnxInFrameErrors, ifJnxInQDrops=ifJnxInQDrops, ifJnxInRunts=ifJnxInRunts, ifJnxInGiants=ifJnxInGiants, ifJnxInDiscards=ifJnxInDiscards, ifJnxInHslCrcErrors=ifJnxInHslCrcErrors, ifJnxInHslFifoOverFlows=ifJnxInHslFifoOverFlows, ifJnxInL3Incompletes=ifJnxInL3Incompletes, ifJnxInL2ChanErrors=ifJnxInL2ChanErrors, ifJnxInL2MismatchTimeouts=ifJnxInL2MismatchTimeouts, ifJnxInInvalidVCs=ifJnxInInvalidVCs, ifJnxInFifoErrors=ifJnxInFifoErrors, ifJnxBucketDrops=ifJnxBucketDrops, ifJnxSramErrors=ifJnxSramErrors, ifJnxOutErrors=ifJnxOutErrors, ifJnxCollisions=ifJnxCollisions, ifJnxCarrierTrans=ifJnxCarrierTrans, ifJnxOutQDrops=ifJnxOutQDrops, ifJnxOutAgedErrors=ifJnxOutAgedErrors, ifJnxOutFifoErrors=ifJnxOutFifoErrors, ifJnxOutHslFifoUnderFlows=ifJnxOutHslFifoUnderFlows, ifJnxOutHslCrcErrors=ifJnxOutHslCrcErrors, ifChassisTable=ifChassisTable, ifChassisEntry=ifChassisEntry, ifChassisFpc=ifChassisFpc, ifChassisPic=ifChassisPic, ifChassisPort=ifChassisPort, ifChassisChannel=ifChassisChannel, ifChassisLogicalUnit=ifChassisLogicalUnit, ifChassisPicIndex=ifChassisPicIndex)
145.297521
1,462
0.77288
2,372
17,581
5.727234
0.199831
0.006625
0.068016
0.012367
0.520427
0.466323
0.316967
0.31152
0.309533
0.295988
0
0.058699
0.112394
17,581
120
1,463
146.508333
0.811855
0.015528
0
0.019608
1
0.264706
0.454183
0.014858
0
0
0
0
0
1
0
false
0
0.098039
0
0.098039
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
23e40a9cb7553307384d5174038c81defee2481c
3,902
py
Python
tests/test_ntpq.py
listuser/jc
3ac8d0362b4fb9999fc55a60a9cb20ac80d114f7
[ "MIT" ]
3,215
2019-10-24T15:25:56.000Z
2022-03-31T15:43:01.000Z
tests/test_ntpq.py
listuser/jc
3ac8d0362b4fb9999fc55a60a9cb20ac80d114f7
[ "MIT" ]
109
2019-11-02T16:22:29.000Z
2022-03-30T17:32:17.000Z
tests/test_ntpq.py
listuser/jc
3ac8d0362b4fb9999fc55a60a9cb20ac80d114f7
[ "MIT" ]
75
2020-02-07T00:16:32.000Z
2022-03-29T09:29:53.000Z
import os import unittest import json import jc.parsers.ntpq THIS_DIR = os.path.dirname(os.path.abspath(__file__)) class MyTests(unittest.TestCase): def setUp(self): # input with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ntpq-p.out'), 'r', encoding='utf-8') as f: self.centos_7_7_ntpq_p = f.read() with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/ntpq-p.out'), 'r', encoding='utf-8') as f: self.ubuntu_18_4_ntpq_p = f.read() with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ntpq-pn.out'), 'r', encoding='utf-8') as f: self.centos_7_7_ntpq_pn = f.read() with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/ntpq-pn.out'), 'r', encoding='utf-8') as f: self.ubuntu_18_4_ntpq_pn = f.read() with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/ntpq-p2.out'), 'r', encoding='utf-8') as f: self.ubuntu_18_4_ntpq_p2 = f.read() with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ntpq-p.out'), 'r', encoding='utf-8') as f: self.freebsd12_ntpq_p = f.read() # output with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ntpq-p.json'), 'r', encoding='utf-8') as f: self.centos_7_7_ntpq_p_json = json.loads(f.read()) with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/ntpq-p.json'), 'r', encoding='utf-8') as f: self.ubuntu_18_4_ntpq_p_json = json.loads(f.read()) with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ntpq-pn.json'), 'r', encoding='utf-8') as f: self.centos_7_7_ntpq_pn_json = json.loads(f.read()) with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/ntpq-pn.json'), 'r', encoding='utf-8') as f: self.ubuntu_18_4_ntpq_pn_json = json.loads(f.read()) with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/ntpq-p2.json'), 'r', encoding='utf-8') as f: self.ubuntu_18_4_ntpq_p2_json = json.loads(f.read()) with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ntpq-p.json'), 'r', encoding='utf-8') as f: self.freebsd12_ntpq_p_json = json.loads(f.read()) def test_ntpq_p_nodata(self): """ Test 'ntpq -p' with no data """ self.assertEqual(jc.parsers.ntpq.parse('', quiet=True), []) def test_ntpq_p_centos_7_7(self): """ Test 'ntpq -p' on Centos 7.7 """ self.assertEqual(jc.parsers.ntpq.parse(self.centos_7_7_ntpq_p, quiet=True), self.centos_7_7_ntpq_p_json) def test_ntpq_p_ubuntu_18_4(self): """ Test 'ntpq -p' on Ubuntu 18.4 """ self.assertEqual(jc.parsers.ntpq.parse(self.ubuntu_18_4_ntpq_p, quiet=True), self.ubuntu_18_4_ntpq_p_json) def test_ntpq_pn_centos_7_7(self): """ Test 'ntpq -pn' on Centos 7.7 """ self.assertEqual(jc.parsers.ntpq.parse(self.centos_7_7_ntpq_pn, quiet=True), self.centos_7_7_ntpq_pn_json) def test_ntpq_pn_ubuntu_18_4(self): """ Test 'ntpq -pn' on Ubuntu 18.4 """ self.assertEqual(jc.parsers.ntpq.parse(self.ubuntu_18_4_ntpq_pn, quiet=True), self.ubuntu_18_4_ntpq_pn_json) def test_ntpq_p2_ubuntu_18_4(self): """ Test 'ntpq -p' with ip data with spaces on Ubuntu 18.4 """ self.assertEqual(jc.parsers.ntpq.parse(self.ubuntu_18_4_ntpq_p2, quiet=True), self.ubuntu_18_4_ntpq_p2_json) def test_ntpq_p_freebsd12(self): """ Test 'ntpq -p' on FreeBSD12 """ self.assertEqual(jc.parsers.ntpq.parse(self.freebsd12_ntpq_p, quiet=True), self.freebsd12_ntpq_p_json) if __name__ == '__main__': unittest.main()
41.073684
125
0.641466
648
3,902
3.621914
0.092593
0.05752
0.069024
0.071581
0.890925
0.850873
0.788666
0.680017
0.680017
0.680017
0
0.046609
0.202717
3,902
94
126
41.510638
0.707811
0.062532
0
0
0
0
0.15279
0.1299
0
0
0
0
0.148936
1
0.170213
false
0
0.085106
0
0.276596
0
0
0
0
null
0
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
23f1f50d5bd4d2148ad7c441cc7e91385971511b
81
py
Python
Chapter04/hello-world/hello-name.py
PacktPublishing/Kubernetes-for-Serverless-Applications
560c4a4e5e78b954e2d8dba72ff648a73ce720c7
[ "MIT" ]
15
2018-01-10T13:16:15.000Z
2021-12-04T18:28:32.000Z
Chapter04/hello-world/hello-name.py
PacktPublishing/Kubernetes-for-Serverless-Applications
560c4a4e5e78b954e2d8dba72ff648a73ce720c7
[ "MIT" ]
null
null
null
Chapter04/hello-world/hello-name.py
PacktPublishing/Kubernetes-for-Serverless-Applications
560c4a4e5e78b954e2d8dba72ff648a73ce720c7
[ "MIT" ]
20
2018-02-19T16:13:09.000Z
2021-12-30T15:15:05.000Z
import json def handler(context): print context.json return context.json
16.2
23
0.740741
11
81
5.454545
0.636364
0.366667
0
0
0
0
0
0
0
0
0
0
0.197531
81
5
23
16.2
0.923077
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0.25
null
null
0.25
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
23f29a6470a7ef0cd1882606c6c0cc298fa5d505
807
py
Python
clikpython/helpVersion.py
KG-1510/Project-CLIK
6bdca2d700cf9b4b8747a5de03d44cfc9844ea12
[ "MIT" ]
4
2020-08-14T15:35:46.000Z
2021-01-13T16:45:57.000Z
clikpython/helpVersion.py
KG-1510/Project-CLIK
6bdca2d700cf9b4b8747a5de03d44cfc9844ea12
[ "MIT" ]
5
2020-08-15T03:14:42.000Z
2020-09-24T09:15:30.000Z
clikpython/helpVersion.py
arizsiddiqui/Project-CLIK
34cc3956b26dbdc1266dc65d6b8655286ac8ab60
[ "MIT" ]
10
2020-08-14T15:25:43.000Z
2020-10-29T10:35:08.000Z
from clikpython.utils import message, debug, init_default_key_storage, printy, STORAGE_DIR, STORE_KEY_F def help(): message.success("Usage: clik <command> \n \n init\t\tinitializes the script to input key value pairs \n add\t\tinsert key value pair in existing json file, clik <name of file> add\n sub\t\tdelete key value pair in existing json file, clik <name of file> sub \n mod\t\talter key value in existing json file, clik <name of file> mod\n enc\t\tencrypts key value dictionary to json and generate encryption key, clik <name of file> enc\n dec\t\tdecrypts json file to dictionary, clik <name of file> dec\n help\t\tguide through all the CLIK functions \n version\tshows the CLIK version installed ") def version(): message.success("CLIK Version 1.0") #test functions #help() #version()
67.25
597
0.758364
141
807
4.297872
0.425532
0.066007
0.082508
0.115512
0.19802
0.19802
0.19802
0.19802
0.145215
0.145215
0
0.002924
0.152416
807
11
598
73.363636
0.883041
0.035936
0
0
0
0.2
0.76
0
0
0
0
0
0
1
0.4
true
0
0.2
0
0.6
0.2
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
1
0
null
0
0
0
0
0
1
1
0
0
0
1
0
0
4
23f9f7dcb64f9bc6bd82e57d7a12f592e1bc193e
191
py
Python
gsdl2/sdlffi.py
TiberiumN/gsdl2
f40f52887f127713cb8c922ce4ebb13183170bd8
[ "MIT" ]
2
2020-11-10T06:24:03.000Z
2021-01-01T18:14:26.000Z
gsdl2/sdlffi.py
Yardanico/gsdl2
f40f52887f127713cb8c922ce4ebb13183170bd8
[ "MIT" ]
null
null
null
gsdl2/sdlffi.py
Yardanico/gsdl2
f40f52887f127713cb8c922ce4ebb13183170bd8
[ "MIT" ]
null
null
null
__all__ = ['ffi', 'gfx_ffi'] from sdl import ffi from . import sdlgfx gfx_ffi = sdlgfx.ffi def to_string(cdata, encoding='utf-8'): return ffi.string(cdata).decode(encoding)
17.363636
46
0.670157
28
191
4.321429
0.571429
0.099174
0
0
0
0
0
0
0
0
0
0.006536
0.198953
191
10
47
19.1
0.784314
0
0
0
0
0
0.082873
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0.166667
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
1
0
0
4
f1aadad97daa1e12d860cd6a34ead48b9d55055c
176
py
Python
Coursera/Week.2/Task.2.py
v1nnyb0y/Coursera.BasePython
bbfb3184dc27a4cdb16b087123890991afbc5506
[ "MIT" ]
null
null
null
Coursera/Week.2/Task.2.py
v1nnyb0y/Coursera.BasePython
bbfb3184dc27a4cdb16b087123890991afbc5506
[ "MIT" ]
null
null
null
Coursera/Week.2/Task.2.py
v1nnyb0y/Coursera.BasePython
bbfb3184dc27a4cdb16b087123890991afbc5506
[ "MIT" ]
null
null
null
''' Compare 2 numbers ''' number_1 = int(input()) number_2 = int(input()) if (number_1 > number_2): print(1) elif (number_1 == number_2): print(0) else: print(2)
12.571429
28
0.607955
28
176
3.607143
0.428571
0.207921
0.257426
0.277228
0.376238
0
0
0
0
0
0
0.071942
0.210227
176
13
29
13.538462
0.654676
0.096591
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.375
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
f1d127a3093d6b8e1c9d4548e2f5483cbc616beb
148
py
Python
dlm/utils/__init__.py
romainloiseau/deep-linear-shapes
faed8e14a8f66ab1c780972f616543552295cb1e
[ "MIT" ]
20
2021-08-31T15:10:48.000Z
2021-12-01T19:25:13.000Z
dlm/utils/__init__.py
romainloiseau/deep-linear-shapes
faed8e14a8f66ab1c780972f616543552295cb1e
[ "MIT" ]
null
null
null
dlm/utils/__init__.py
romainloiseau/deep-linear-shapes
faed8e14a8f66ab1c780972f616543552295cb1e
[ "MIT" ]
null
null
null
from .parser import get_parser, str2bool from .random import sample_obj from .tensors import copy_with_noise from .shape_sampler import ShapeSampler
37
40
0.858108
22
148
5.545455
0.681818
0
0
0
0
0
0
0
0
0
0
0.007576
0.108108
148
4
41
37
0.916667
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
f1e9afc0ab250c88df5d68b8cac42ca3f7dae62e
99
py
Python
django_dbaccounting/apps.py
robml/django_dbaccounting
d39466d71151b6e28a6b959001dcd5cfe56b4f4b
[ "BSD-3-Clause-Clear", "BSD-3-Clause" ]
4
2021-02-11T16:35:07.000Z
2021-07-08T15:35:55.000Z
apps.py
di/django_dbaccounting
26bb794649b92c71a5e18d74c0388d3f1fbdd06d
[ "BSD-3-Clause" ]
2
2021-07-08T14:55:07.000Z
2021-07-08T17:23:38.000Z
apps.py
di/django_dbaccounting
26bb794649b92c71a5e18d74c0388d3f1fbdd06d
[ "BSD-3-Clause" ]
3
2020-03-08T18:10:52.000Z
2021-12-19T18:16:39.000Z
from django.apps import AppConfig class DbaccountingConfig(AppConfig): name = 'dbaccounting'
16.5
36
0.777778
10
99
7.7
0.9
0
0
0
0
0
0
0
0
0
0
0
0.151515
99
5
37
19.8
0.916667
0
0
0
0
0
0.121212
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
f1f426ec81738787f469a9eb246ac0b0dd1f4fe7
1,772
py
Python
python/tvm/topi/einsum.py
XiaoSong9905/tvm
48940f697e15d5b50fa1f032003e6c700ae1e423
[ "Apache-2.0" ]
4,640
2017-08-17T19:22:15.000Z
2019-11-04T15:29:46.000Z
python/tvm/topi/einsum.py
XiaoSong9905/tvm
48940f697e15d5b50fa1f032003e6c700ae1e423
[ "Apache-2.0" ]
3,022
2020-11-24T14:02:31.000Z
2022-03-31T23:55:31.000Z
python/tvm/topi/einsum.py
XiaoSong9905/tvm
48940f697e15d5b50fa1f032003e6c700ae1e423
[ "Apache-2.0" ]
1,352
2017-08-17T19:30:38.000Z
2019-11-04T16:09:29.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # pylint: disable=invalid-name,consider-using-enumerate,redefined-outer-name """Einsum operator""" from . import cpp def einsum(subscripts, *operand): """Evaluates the Einstein summation convention on the operands. Parameters ---------- subscripts : string Specifies the subscripts for summation as comma separated list of subscript labels. An implicit (classical Einstein summation) calculation is performed unless the explicit indicator ‘->’ is included as well as subscript labels of the precise output form. a_tuple : tuple of tvm.te.Tensor These are the Tensors for the operation. The only difference of einsum between in tvm and numpy is it needs an extra brackets for the tensors. For example, topi.einsum("ij, jk -> ik", (A, B)). Returns ------- out : tvm.te.Tensor The calculation based on the Einstein summation convention. """ return cpp.einsum(subscripts, operand)
39.377778
92
0.724605
246
1,772
5.215447
0.565041
0.046765
0.020265
0.024942
0
0
0
0
0
0
0
0.002837
0.204289
1,772
44
93
40.272727
0.907092
0.879797
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
4
7b139f610de6c3439edb96c0abcedbefe86d590f
383
py
Python
basic/basic/datetime.py
ramadevim/Basic-python
14bb04fda038fb4ebc24caca9448f9a58620f288
[ "MIT" ]
null
null
null
basic/basic/datetime.py
ramadevim/Basic-python
14bb04fda038fb4ebc24caca9448f9a58620f288
[ "MIT" ]
null
null
null
basic/basic/datetime.py
ramadevim/Basic-python
14bb04fda038fb4ebc24caca9448f9a58620f288
[ "MIT" ]
null
null
null
# import random # # print(random.randint(1,10)) # # import re # stringy = "aardvark" # print(len(re.findall("a", stringy))) # # # import csv # # with open('names.csv','rb') as csv_file: # csv_reader = csv.reader(csv_file) # print(csv_reader) # with open('names1.csv','r') as csv_file: # csv_reader = csv.reader(csv_file) # for line in csv_reader: # print(line)
20.157895
42
0.634465
57
383
4.122807
0.438596
0.229787
0.204255
0.102128
0.289362
0.289362
0.289362
0.289362
0.289362
0
0
0.012862
0.18799
383
18
43
21.277778
0.742765
0.903394
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
7b1d668df5af5983ecaa97b07d4277f42a05c45c
52
py
Python
openpyxlzip/embedding/__init__.py
ankitJoshi03/openpyxlzip
f3b8aa2f80f9d8bc31ce5fcf05c822d88d2ff647
[ "MIT" ]
null
null
null
openpyxlzip/embedding/__init__.py
ankitJoshi03/openpyxlzip
f3b8aa2f80f9d8bc31ce5fcf05c822d88d2ff647
[ "MIT" ]
null
null
null
openpyxlzip/embedding/__init__.py
ankitJoshi03/openpyxlzip
f3b8aa2f80f9d8bc31ce5fcf05c822d88d2ff647
[ "MIT" ]
null
null
null
#OLE base class # rid # oleObjects #under worksheet
17.333333
30
0.75
7
52
5.571429
1
0
0
0
0
0
0
0
0
0
0
0
0.173077
52
3
30
17.333333
0.906977
0.884615
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
9e31b3a51b19d03c670dc0c88aa98437646f58e3
185
py
Python
adapters/schneider_electric/__init__.py
michahagg/domoticz-zigbee2mqtt-plugin
0d891a0bd96ed26547904ae8402a26e684dc8e35
[ "MIT" ]
146
2018-09-19T11:38:48.000Z
2022-03-21T11:54:12.000Z
adapters/schneider_electric/__init__.py
schurgan/zigbee2mqtt-plugin
41042bc52d34ad503812154a11d7f63aede44c71
[ "MIT" ]
783
2018-09-28T17:07:14.000Z
2022-03-31T10:18:27.000Z
adapters/schneider_electric/__init__.py
schurgan/zigbee2mqtt-plugin
41042bc52d34ad503812154a11d7f63aede44c71
[ "MIT" ]
147
2018-09-25T18:39:51.000Z
2022-03-01T19:31:27.000Z
from adapters.schneider_electric.WV704R0A0902 import WV704R0A0902 schneider_adapters = { 'WV704R0A0902': WV704R0A0902, # Schneider Electric Wiser radiator thermostat }
30.833333
92
0.767568
16
185
8.75
0.5625
0.242857
0
0
0
0
0
0
0
0
0
0.210526
0.178378
185
6
93
30.833333
0.710526
0.237838
0
0
0
0
0.085714
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
9e74936a8604313abcbd6a5a3565d70cae7f5b58
127
py
Python
exercicios_basico/ex030.py
montalvas/python
483c2097f6f91bfae127dafcb63e3006eeecad1d
[ "MIT" ]
null
null
null
exercicios_basico/ex030.py
montalvas/python
483c2097f6f91bfae127dafcb63e3006eeecad1d
[ "MIT" ]
null
null
null
exercicios_basico/ex030.py
montalvas/python
483c2097f6f91bfae127dafcb63e3006eeecad1d
[ "MIT" ]
null
null
null
# Ler um número e dizer se é impar ou par n = int(input('Informe um número: ')) print('É par!' if n % 2 == 0 else 'É impar!')
25.4
45
0.614173
26
127
3
0.730769
0.205128
0
0
0
0
0
0
0
0
0
0.020408
0.228346
127
4
46
31.75
0.77551
0.307087
0
0
0
0
0.383721
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
9e80284256110a263f90397323ec80dd838a0925
24
py
Python
tests/files/lucky.py
H4m5t3r/cses-cli
a2e6caca3a3159ce5038a5c7793c22b9c09cf239
[ "MIT" ]
1
2021-09-06T15:32:37.000Z
2021-09-06T15:32:37.000Z
tests/files/lucky.py
H4m5t3r/cses-cli
a2e6caca3a3159ce5038a5c7793c22b9c09cf239
[ "MIT" ]
14
2021-05-18T13:18:25.000Z
2021-06-22T12:42:48.000Z
tests/files/lucky.py
csesfi/cses-cli
a2e6caca3a3159ce5038a5c7793c22b9c09cf239
[ "MIT" ]
null
null
null
def check(n): s = 0
8
13
0.458333
5
24
2.2
1
0
0
0
0
0
0
0
0
0
0
0.066667
0.375
24
2
14
12
0.666667
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
9e8d62c227c06c5d91fe604192c1ae566cd034fb
122
py
Python
euler001.py
ZenithClown/project-euler
6a636e26b4450eafd298e369bf774d6dbebc3626
[ "MIT" ]
null
null
null
euler001.py
ZenithClown/project-euler
6a636e26b4450eafd298e369bf774d6dbebc3626
[ "MIT" ]
1
2020-09-03T17:29:14.000Z
2020-09-03T17:29:14.000Z
euler001.py
ZenithClown/project-euler
6a636e26b4450eafd298e369bf774d6dbebc3626
[ "MIT" ]
null
null
null
#!/bin/python3 def solver(n : int) -> int: vals = [i for i in range(1, n) if i % 3 == 0 or i % 5 == 0] return sum(vals)
24.4
60
0.54918
26
122
2.576923
0.730769
0
0
0
0
0
0
0
0
0
0
0.065934
0.254098
122
5
61
24.4
0.67033
0.106557
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
9e8f2559b703d3c7c9291e589b5fa50206c7d7c2
343
py
Python
app/forms/login.py
MarkGalloway/RIS
6305f0b6e58e60ee6d69211cf977507b9404b8d6
[ "Apache-2.0" ]
12
2016-04-22T14:10:54.000Z
2021-04-08T18:57:27.000Z
app/forms/login.py
MarkGalloway/RIS
6305f0b6e58e60ee6d69211cf977507b9404b8d6
[ "Apache-2.0" ]
36
2015-02-07T20:25:09.000Z
2015-04-05T16:35:57.000Z
app/forms/login.py
MarkGalloway/RIS
6305f0b6e58e60ee6d69211cf977507b9404b8d6
[ "Apache-2.0" ]
8
2015-03-08T23:43:50.000Z
2020-06-09T15:10:42.000Z
from flask.ext.wtf import Form from wtforms import StringField, BooleanField from wtforms.validators import DataRequired class LoginForm(Form): username = StringField('username', validators=[DataRequired()]) password = StringField('password', validators=[DataRequired()]) remember_me = BooleanField('remember_me', default=False)
34.3
67
0.77551
36
343
7.333333
0.527778
0.083333
0
0
0
0
0
0
0
0
0
0
0.119534
343
9
68
38.111111
0.874172
0
0
0
0
0
0.078717
0
0
0
0
0
0
1
0
false
0.142857
0.428571
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
1
0
0
4