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
83abb4d4d3cf2aafa9619cdb6dec6f8edbeb67fc
51
py
Python
python/subprojects/boosting/mlrl/boosting/__init__.py
Waguy02/Boomer-Scripted
b06bb9213d64dca0c05d41701dea12666931618c
[ "MIT" ]
8
2020-06-30T01:06:43.000Z
2022-03-14T01:58:29.000Z
python/subprojects/boosting/mlrl/boosting/__init__.py
Waguy02/Boomer-Scripted
b06bb9213d64dca0c05d41701dea12666931618c
[ "MIT" ]
3
2020-12-14T11:30:18.000Z
2022-02-07T06:31:51.000Z
python/subprojects/boosting/mlrl/boosting/__init__.py
Waguy02/Boomer-Scripted
b06bb9213d64dca0c05d41701dea12666931618c
[ "MIT" ]
4
2020-06-24T08:45:00.000Z
2021-12-23T21:44:51.000Z
from mlrl.boosting.boosting_learners import Boomer
25.5
50
0.882353
7
51
6.285714
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.078431
51
1
51
51
0.93617
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
83e4b4b5ff732af1635e52a68436d02b3d711f24
338
py
Python
projects/views.py
Michellemukami/portfolio1
8c661112a43664e0b8f3b89d08b5052523c5e4c3
[ "MIT" ]
null
null
null
projects/views.py
Michellemukami/portfolio1
8c661112a43664e0b8f3b89d08b5052523c5e4c3
[ "MIT" ]
5
2020-06-05T22:54:41.000Z
2021-09-08T01:17:21.000Z
projects/views.py
Michellemukami/portfolio1
8c661112a43664e0b8f3b89d08b5052523c5e4c3
[ "MIT" ]
null
null
null
from django.shortcuts import render,redirect from .models import Project # Create your views here. def home (request): return render(request, 'home.html') def about (request): return render(request, 'about.html') def project(request): posts=Project.objects.all() return render(request, 'project.html',{"posts":posts})
30.727273
58
0.721893
44
338
5.545455
0.477273
0.147541
0.233607
0.213115
0
0
0
0
0
0
0
0
0.150888
338
11
58
30.727273
0.850174
0.068047
0
0
0
0
0.11465
0
0
0
0
0
0
1
0.333333
false
0
0.222222
0.222222
0.888889
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
f7ec0f21f55d5ee4f3424626b8416450ef89c1dd
115
py
Python
other/sumitb2019_a.py
ryosuke0825/atcoder_python
185cdbe7db44ecca1aaf357858d16d31ce515ddb
[ "MIT" ]
null
null
null
other/sumitb2019_a.py
ryosuke0825/atcoder_python
185cdbe7db44ecca1aaf357858d16d31ce515ddb
[ "MIT" ]
null
null
null
other/sumitb2019_a.py
ryosuke0825/atcoder_python
185cdbe7db44ecca1aaf357858d16d31ce515ddb
[ "MIT" ]
null
null
null
m1, d1 = map(int, input().split()) m2, d2 = map(int, input().split()) if m1 != m2: print(1) else: print(0)
16.428571
34
0.53913
20
115
3.1
0.65
0.193548
0.354839
0.516129
0
0
0
0
0
0
0
0.088889
0.217391
115
6
35
19.166667
0.6
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
0.333333
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
1
0
0
0
0
0
0
5
7936391f9523ec518e28938ca221c115b335f50e
163
py
Python
api/admin.py
vsemionov/boomerang
dd2dd6ddd2b4e9b3c03fd03e44b3e8d07d656bfd
[ "MIT" ]
1
2021-12-09T10:44:47.000Z
2021-12-09T10:44:47.000Z
api/admin.py
vsemionov/boomerang
dd2dd6ddd2b4e9b3c03fd03e44b3e8d07d656bfd
[ "MIT" ]
34
2017-05-04T00:16:18.000Z
2020-06-05T17:09:20.000Z
api/admin.py
vsemionov/boomerang
dd2dd6ddd2b4e9b3c03fd03e44b3e8d07d656bfd
[ "MIT" ]
1
2021-09-22T08:12:24.000Z
2021-09-22T08:12:24.000Z
from django.contrib import admin # Register your models here. admin.site.site_header = 'Boomerang administration' admin.site.site_title = 'Boomerang site admin'
23.285714
51
0.797546
22
163
5.818182
0.636364
0.140625
0.203125
0
0
0
0
0
0
0
0
0
0.122699
163
6
52
27.166667
0.895105
0.159509
0
0
0
0
0.325926
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
f724e6dae565bcc5a26d05bdb7f2553473458a1f
1,242
py
Python
tests/test_project_setups.py
insspb/python3-boilerplate
7d70cd8a7bbbe2805ae5f4cb538996a30b96c736
[ "MIT" ]
3
2020-04-22T04:09:18.000Z
2021-12-20T08:44:44.000Z
tests/test_project_setups.py
insspb/python3-boilerplate
7d70cd8a7bbbe2805ae5f4cb538996a30b96c736
[ "MIT" ]
11
2019-08-31T08:37:40.000Z
2019-08-31T11:25:29.000Z
tests/test_project_setups.py
insspb/python3-boilerplate
7d70cd8a7bbbe2805ae5f4cb538996a30b96c736
[ "MIT" ]
1
2020-11-24T11:18:50.000Z
2020-11-24T11:18:50.000Z
import pytest """ This file include several configuration of answers to setup file. Each configuration should be completed without errors to pass this tests. """ @pytest.mark.skip def test_all_python_versions_deploy(): """Test setup.py format correct for all Python versions support.""" pass @pytest.mark.skip def test_2x_only_python_version_deploy(): """Test setup.py format correct for Python 2.7 only versions support.""" pass @pytest.mark.skip def test_3x_only_python_versions_deploy(): """Test setup.py format correct for all Python 3.x versions supported.""" pass @pytest.mark.skip def test_markdown_documentation(): pass @pytest.mark.skip def test_rst_documentation(): pass @pytest.mark.skip def test_install_github_issues_templates(): pass @pytest.mark.skip def test_install_gitlab_issues_templates(): pass @pytest.mark.skip def test_mit_license_deploy(): pass @pytest.mark.skip def test_bsd_license_deploy(): pass @pytest.mark.skip def test_gnu_license_deploy(): pass @pytest.mark.skip def test_apache_license_deploy(): pass @pytest.mark.skip def test_unlicensed_license_deploy(): pass @pytest.mark.skip def test_none_license_deploy(): pass
16.342105
77
0.750403
179
1,242
4.960894
0.312849
0.146396
0.204955
0.248874
0.710586
0.686937
0.658784
0.52027
0.126126
0.126126
0
0.004789
0.15942
1,242
75
78
16.56
0.845785
0.15781
0
0.65
0
0
0
0
0
0
0
0
0
1
0.325
true
0.325
0.025
0
0.35
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
1
0
0
0
0
0
5
f72e3fc70899c2619f3a52ac0851c7d574b246cd
78
py
Python
app/db.py
AntonOni/my-flasktodo
8e4ea7aca25e0b0ea11d4d2ea3fb322b55cfcd3a
[ "MIT" ]
null
null
null
app/db.py
AntonOni/my-flasktodo
8e4ea7aca25e0b0ea11d4d2ea3fb322b55cfcd3a
[ "MIT" ]
2
2021-03-25T23:44:31.000Z
2022-03-29T22:01:18.000Z
app/db.py
AntonOni/my-flasktodo
8e4ea7aca25e0b0ea11d4d2ea3fb322b55cfcd3a
[ "MIT" ]
null
null
null
import dataset db = dataset.connect('sqlite:///tasks.db') tasks = db['tasks']
19.5
42
0.692308
11
78
4.909091
0.545455
0.259259
0.444444
0
0
0
0
0
0
0
0
0
0.102564
78
4
43
19.5
0.771429
0
0
0
0
0
0.291139
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
f76037be4467b698f73c17306d08dba5c08d6ea2
11
py
Python
NoteBooks/Curso de Scikit-learn/garbage files/inicio.py
Alejandro-sin/Learning_Notebooks
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
[ "MIT" ]
1
2021-02-26T13:12:22.000Z
2021-02-26T13:12:22.000Z
NoteBooks/Curso de Scikit-learn/garbage files/inicio.py
Alejandro-sin/Learning_Notebooks
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
[ "MIT" ]
null
null
null
NoteBooks/Curso de Scikit-learn/garbage files/inicio.py
Alejandro-sin/Learning_Notebooks
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
[ "MIT" ]
null
null
null
print("ff")
11
11
0.636364
2
11
3.5
1
0
0
0
0
0
0
0
0
0
0
0
0
11
1
11
11
0.636364
0
0
0
0
0
0.166667
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
f788a1174e0fed666bba32cc70e454c712a77230
146
py
Python
strategy/tax_other.py
rlelito/DesignPatterns
4e59442a10c1407ed4d9cdceea790263c30223b3
[ "MIT" ]
null
null
null
strategy/tax_other.py
rlelito/DesignPatterns
4e59442a10c1407ed4d9cdceea790263c30223b3
[ "MIT" ]
null
null
null
strategy/tax_other.py
rlelito/DesignPatterns
4e59442a10c1407ed4d9cdceea790263c30223b3
[ "MIT" ]
null
null
null
from calculate_tax import CalculateTax class TaxOther(CalculateTax): def tax(self, net_price: float) -> float: return net_price + 1
20.857143
45
0.719178
19
146
5.368421
0.736842
0.156863
0
0
0
0
0
0
0
0
0
0.008621
0.205479
146
6
46
24.333333
0.87069
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0.25
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
e3e7a040ff51df7a07df26e6440e66fed8a293ca
552
py
Python
src/sima/simo/hydrodynamicseparationmethod.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
src/sima/simo/hydrodynamicseparationmethod.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
src/sima/simo/hydrodynamicseparationmethod.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
# Generated with HydrodynamicSeparationMethod # from enum import Enum from enum import auto class HydrodynamicSeparationMethod(Enum): """""" BW2_FILTERING = auto() NLP_FILTERING = auto() NONE = auto() def label(self): if self == HydrodynamicSeparationMethod.BW2_FILTERING: return "2nd Order Butterworth Filter" if self == HydrodynamicSeparationMethod.NLP_FILTERING: return "Non-Linearity Pass Filter" if self == HydrodynamicSeparationMethod.NONE: return "No estimation"
30.666667
62
0.682971
52
552
7.173077
0.5
0.048257
0.273458
0.214477
0
0
0
0
0
0
0
0.00716
0.240942
552
18
63
30.666667
0.883055
0.077899
0
0
1
0
0.132
0
0
0
0
0
0
1
0.076923
false
0.076923
0.153846
0
0.769231
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
1
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
5
5808d36a5b761d9583e0e5b1b015b57ae79bc5cb
158
py
Python
tests/test_screen_funcs.py
whitegreyblack/Spaceship
84bb4e64753b7957639d100d157adcaadcf0269a
[ "MIT" ]
1
2018-03-29T14:32:14.000Z
2018-03-29T14:32:14.000Z
tests/test_screen_funcs.py
whitegreyblack/Spaceship
84bb4e64753b7957639d100d157adcaadcf0269a
[ "MIT" ]
null
null
null
tests/test_screen_funcs.py
whitegreyblack/Spaceship
84bb4e64753b7957639d100d157adcaadcf0269a
[ "MIT" ]
null
null
null
import os import sys import time import timeit sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))+'/../') from bearlibterminal import terminal as t
26.333333
69
0.778481
25
158
4.76
0.64
0.10084
0
0
0
0
0
0
0
0
0
0.006993
0.094937
158
6
70
26.333333
0.825175
0
0
0
0
0
0.025157
0
0
0
0
0
0
1
0
true
0
0.833333
0
0.833333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
582867ff182ff4c4996678e79c5b30c789fbc380
778
py
Python
ace/system/base/__init__.py
ace-ecosystem/ace2-core
a0de6b90f7437a98b1ee6ebcc693fa14f4b13c53
[ "Apache-2.0" ]
null
null
null
ace/system/base/__init__.py
ace-ecosystem/ace2-core
a0de6b90f7437a98b1ee6ebcc693fa14f4b13c53
[ "Apache-2.0" ]
11
2020-12-30T03:13:09.000Z
2021-05-02T14:09:32.000Z
ace/system/base/__init__.py
ace-ecosystem/ace2-core
a0de6b90f7437a98b1ee6ebcc693fa14f4b13c53
[ "Apache-2.0" ]
1
2022-03-16T20:44:16.000Z
2022-03-16T20:44:16.000Z
from ace.system.base.alerting import AlertingBaseInterface from ace.system.base.analysis_tracking import AnalysisTrackingBaseInterface from ace.system.base.audit import AuditTrackingBaseInterface from ace.system.base.auth import AuthenticationBaseInterface from ace.system.base.caching import CachingBaseInterface from ace.system.base.config import ConfigurationBaseInterface from ace.system.base.events import EventBaseInterface from ace.system.base.module_tracking import AnalysisModuleTrackingBaseInterface from ace.system.base.request_tracking import AnalysisRequestTrackingBaseInterface from ace.system.base.storage import StorageBaseInterface from ace.system.base.tokenization import TokenizationBaseInterface from ace.system.base.work_queue import WorkQueueBaseInterface
59.846154
81
0.892031
88
778
7.840909
0.352273
0.121739
0.226087
0.295652
0
0
0
0
0
0
0
0
0.061697
778
12
82
64.833333
0.945205
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
583438a112700c18050c942d450aa05a1d25e43b
77
py
Python
lib/pcduino/__init__.py
acidghost/pcduino-hue-control
2f13093d075c52387de8befc27a77318c3f47a0c
[ "MIT" ]
null
null
null
lib/pcduino/__init__.py
acidghost/pcduino-hue-control
2f13093d075c52387de8befc27a77318c3f47a0c
[ "MIT" ]
null
null
null
lib/pcduino/__init__.py
acidghost/pcduino-hue-control
2f13093d075c52387de8befc27a77318c3f47a0c
[ "MIT" ]
null
null
null
from gpio import * from adc import analog_read #from pwm import analog_write
19.25
29
0.818182
13
77
4.692308
0.615385
0.393443
0
0
0
0
0
0
0
0
0
0
0.155844
77
3
30
25.666667
0.938462
0.363636
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
58388ac166bbc543d03a379da3f387fe3cacac62
109
py
Python
data/__init__.py
Skhaki18/APS360
4a386fc8ee14802bcb5ef25eefc234160673896a
[ "MIT" ]
1
2022-02-09T20:35:05.000Z
2022-02-09T20:35:05.000Z
data/__init__.py
Skhaki18/APS360
4a386fc8ee14802bcb5ef25eefc234160673896a
[ "MIT" ]
null
null
null
data/__init__.py
Skhaki18/APS360
4a386fc8ee14802bcb5ef25eefc234160673896a
[ "MIT" ]
null
null
null
from data.dataconstructor import Data_Driver from data.postprocessor import AnnotationLive, DynamicAnnotation
54.5
64
0.899083
12
109
8.083333
0.666667
0.164948
0
0
0
0
0
0
0
0
0
0
0.073395
109
2
64
54.5
0.960396
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
586a08d5114e0cd2ec67a2fe4c41b57d3976033a
11
py
Python
new.py
chevy71/test
54f4e96ea8590c921dc0815af75557544f7ce9a0
[ "MIT" ]
null
null
null
new.py
chevy71/test
54f4e96ea8590c921dc0815af75557544f7ce9a0
[ "MIT" ]
1
2019-03-27T09:55:01.000Z
2019-03-27T09:55:01.000Z
new.py
chevy71/test
54f4e96ea8590c921dc0815af75557544f7ce9a0
[ "MIT" ]
2
2019-03-26T20:01:57.000Z
2019-03-27T09:51:18.000Z
print(5*5)
5.5
10
0.636364
3
11
2.333333
0.666667
0
0
0
0
0
0
0
0
0
0
0.2
0.090909
11
1
11
11
0.5
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
546d0face1031348a973c606af4789638921e761
886
py
Python
authentication/forms.py
leonolan2020/phoenix
b5956a7003e548f01255cbd5d0d76cfd0ac77a81
[ "MIT" ]
1
2020-09-19T21:56:40.000Z
2020-09-19T21:56:40.000Z
authentication/forms.py
leonolan2020/phoenix
b5956a7003e548f01255cbd5d0d76cfd0ac77a81
[ "MIT" ]
null
null
null
authentication/forms.py
leonolan2020/phoenix
b5956a7003e548f01255cbd5d0d76cfd0ac77a81
[ "MIT" ]
5
2020-09-18T18:53:03.000Z
2020-10-21T14:42:00.000Z
from django import forms class LoginForm(forms.Form): username=forms.CharField(max_length=50, required=True) password=forms.CharField(max_length=150, required=True) back_url=forms.CharField(max_length=150, required=False) class ResetPasswordForm(forms.Form): username=forms.CharField(required=True,max_length=200,widget=forms.TextInput(attrs={'class':'form-control leo-farsi mt-3','placeholder':'موبایل','type':'tel'})) old_password=forms.CharField(max_length=150, required=False) new_password=forms.CharField(max_length=150, required=True) class RegisterForm(forms.Form): region_id=forms.IntegerField(required=True) username=forms.CharField(max_length=50, required=True) password=forms.CharField(max_length=150, required=True) first_name=forms.CharField(max_length=50, required=True) last_name=forms.CharField(max_length=50, required=True)
52.117647
164
0.783296
122
886
5.557377
0.344262
0.20649
0.225664
0.30531
0.643068
0.584071
0.584071
0.457227
0.268437
0.268437
0
0.033375
0.086907
886
17
165
52.117647
0.804697
0
0
0.266667
0
0
0.063134
0
0
0
0
0
0
1
0
false
0.333333
0.066667
0
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
5
5470f5947efbf69b37fa0ca797d64fafc92cb6ca
4,813
py
Python
offpele/tests/test_main.py
cescgina/peleffy
fc68116dc98050ed3c2c92270d8218565d099801
[ "MIT" ]
null
null
null
offpele/tests/test_main.py
cescgina/peleffy
fc68116dc98050ed3c2c92270d8218565d099801
[ "MIT" ]
null
null
null
offpele/tests/test_main.py
cescgina/peleffy
fc68116dc98050ed3c2c92270d8218565d099801
[ "MIT" ]
null
null
null
""" This module contains the tests to check offpele's molecular representations. """ import pytest import os import tempfile from offpele.main import run_offpele, handle_output_paths from offpele.utils import get_data_file_path, temporary_cd from offpele.topology import Molecule FORCEFIELD_NAME = 'openff_unconstrained-1.2.0.offxml' class TestMain(object): """ It wraps all tests that involve the Molecule class. """ def test_offpele_default_call(self): """ It checks the default call of offpele's main function. """ LIGAND_PATH = 'ligands/BNZ.pdb' ligand_path = get_data_file_path(LIGAND_PATH) with tempfile.TemporaryDirectory() as tmpdir: with temporary_cd(tmpdir): run_offpele(ligand_path, output=tmpdir) def test_offpele_custom_call(self): """ It checks the custom call of offpele's main function. """ LIGAND_PATH = 'ligands/BNZ.pdb' ligand_path = get_data_file_path(LIGAND_PATH) with tempfile.TemporaryDirectory() as tmpdir: with temporary_cd(tmpdir): run_offpele(ligand_path, forcefield=FORCEFIELD_NAME, resolution=10, charges_method='gasteiger', output=tmpdir, with_solvent=True, as_datalocal=True) def test_default_output_paths(self): """ It checks the default output paths that are used for each parameter file from offpele. """ def from_PosixPath_to_string(paths): """ Convert PosixPaths to strings """ return map(str, paths) molecule = Molecule(smiles='c1ccccc1', name='benzene', tag='BNZ') rotlib_path, impact_path, solvent_path = \ handle_output_paths(molecule, '', False) # Convert PosixPaths to strings rotlib_path, impact_path, solvent_path = map( str, [rotlib_path, impact_path, solvent_path]) assert rotlib_path == 'BNZ.rot.assign', 'Unexpected default ' \ + 'rotamer library path' assert impact_path == 'bnzz', 'Unexpected default Impact ' \ + 'template path' assert solvent_path == 'ligandParams.txt', 'Unexpected default ' \ + 'solvent parameters path' with tempfile.TemporaryDirectory() as tmpdir: with temporary_cd(tmpdir): # To avoid the complain about unexistent folder os.mkdir('output') rotlib_path, impact_path, solvent_path = \ handle_output_paths(molecule, 'output', False) # Convert PosixPaths to strings rotlib_path, impact_path, solvent_path = map( str, [rotlib_path, impact_path, solvent_path]) assert rotlib_path == 'output/BNZ.rot.assign', 'Unexpected default ' \ + 'rotamer library path' assert impact_path == 'output/bnzz', 'Unexpected default Impact ' \ + 'template path' assert solvent_path == 'output/ligandParams.txt', 'Unexpected ' \ + 'default solvent parameters path' rotlib_path, impact_path, solvent_path = \ handle_output_paths(molecule, '', True) # Convert PosixPaths to strings rotlib_path, impact_path, solvent_path = map( str, [rotlib_path, impact_path, solvent_path]) assert rotlib_path == 'DataLocal/LigandRotamerLibs/' \ + 'BNZ.rot.assign', 'Unexpected default rotamer library path' assert impact_path == 'DataLocal/Templates/OFF/Parsley/' \ + 'HeteroAtoms/bnzz', 'Unexpected default Impact template' assert solvent_path == 'DataLocal/OBC/ligandParams.txt', \ 'Unexpected default solvent parameters path' with tempfile.TemporaryDirectory() as tmpdir: with temporary_cd(tmpdir): # To avoid the complain about unexistent folder os.mkdir('output') rotlib_path, impact_path, solvent_path = \ handle_output_paths(molecule, 'output', True) # Convert PosixPaths to strings rotlib_path, impact_path, solvent_path = map( str, [rotlib_path, impact_path, solvent_path]) assert rotlib_path == 'output/DataLocal/LigandRotamerLibs/' \ + 'BNZ.rot.assign', 'Unexpected default rotamer library path' assert impact_path == 'output/DataLocal/Templates/OFF/Parsley/' \ + 'HeteroAtoms/bnzz', 'Unexpected default Impact template path' assert solvent_path == 'output/DataLocal/OBC/ligandParams.txt', \ 'Unexpected default solvent parameters path'
37.897638
78
0.617287
505
4,813
5.683168
0.225743
0.055749
0.066899
0.083624
0.754704
0.731359
0.731359
0.712892
0.712892
0.666551
0
0.00207
0.297528
4,813
126
79
38.198413
0.846791
0.117806
0
0.447368
0
0
0.228467
0.06764
0
0
0
0
0.157895
1
0.052632
false
0
0.078947
0
0.157895
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
49d122ccd768e329de385685724f8e334ea8063f
6,334
py
Python
tests/units/event_system/event_system_replay_1_test.py
iconloop/LFT2
3862d63aaf148f99240c6d4a54408dc2520b94c6
[ "Apache-2.0" ]
23
2020-02-10T10:08:20.000Z
2021-11-17T02:02:06.000Z
tests/units/event_system/event_system_replay_1_test.py
iconloop/LFT2
3862d63aaf148f99240c6d4a54408dc2520b94c6
[ "Apache-2.0" ]
3
2020-03-05T07:18:16.000Z
2020-06-01T09:03:11.000Z
tests/units/event_system/event_system_replay_1_test.py
iconloop/LFT2
3862d63aaf148f99240c6d4a54408dc2520b94c6
[ "Apache-2.0" ]
6
2020-02-21T02:02:40.000Z
2021-12-01T23:35:07.000Z
from io import StringIO from typing import TypeVar from lft.event import EventSystem from lft.event.mediators import DelayedEventMediator, TimestampEventMediator, JsonRpcEventMediator from tests.units.event_system.event_system_replay_0_test import Event1, Event2, Event3, on_test1, on_test2, on_test3 T = TypeVar("T") def test_event_system(): results = [] event_system = EventSystem(use_priority=False) event_system.set_mediator(TimestampEventMediator) event_system.set_mediator(DelayedEventMediator) event_system.set_mediator(JsonRpcEventMediator) event_system.simulator.register_handler(Event1, lambda e: on_test1(e, results, event_system)) event_system.simulator.register_handler(Event2, lambda e: on_test2(e, results, event_system)) event_system.simulator.register_handler(Event3, lambda e: on_test3(e, results, event_system)) record_io = StringIO() record_io.write(record) record_io.seek(0) timestamp_io = StringIO() timestamp_io.write(timestamp) timestamp_io.seek(0) json_rpc_io = StringIO() json_rpc_io.write(json_rpc) json_rpc_io.seek(0) event_system.start_replay(record_io, {TimestampEventMediator: timestamp_io, JsonRpcEventMediator: json_rpc_io}) record = r""" {"!type": "lft.event.event_recorder.EventRecord", "!data": {"number": 0, "event": {"!type": "tests.units.event_system.event_system_replay_0_test.Event1", "!data": {}}}} {"!type": "lft.event.event_recorder.EventRecord", "!data": {"number": 2, "event": {"!type": "tests.units.event_system.event_system_replay_0_test.Event3", "!data": {"num": 3}}}} """ timestamp = r""" {"!number": 1, "!type": "int", "!data": 1564560247454275} {"!number": 1, "!type": "int", "!data": 1564560247454501} {"!number": 2, "!type": "int", "!data": 1564560250967674} {"!number": 3, "!type": "int", "!data": 1564560254034700} """ json_rpc = r""" {"!number": 1, "!type": "exception", "!data": "gANjanNvbnJwY2NsaWVudC5leGNlcHRpb25zClJlY2VpdmVkTm9uMnh4UmVzcG9uc2VFcnJvcgpx\nAFgYAAAAUmVjZWl2ZWQgNDAwIHN0YXR1cyBjb2RlcQGFcQJScQN9cQRYBAAAAGNvZGVxBU2QAXNi\nLg==\n"} {"!number": 1, "!type": "exception", "!data": "gANjcmVxdWVzdHMuZXhjZXB0aW9ucwpDb25uZWN0aW9uRXJyb3IKcQBjdXJsbGliMy5leGNlcHRp\nb25zCk1heFJldHJ5RXJyb3IKcQFOWAcAAAAvYXBpL3YzcQJOh3EDUnEEhXEFUnEGfXEHKFgIAAAA\ncmVzcG9uc2VxCE5YBwAAAHJlcXVlc3RxCWNyZXF1ZXN0cy5tb2RlbHMKUHJlcGFyZWRSZXF1ZXN0\nCnEKKYFxC31xDChYBgAAAG1ldGhvZHENWAQAAABQT1NUcQ5YAwAAAHVybHEPWCcAAABodHRwczov\nL3dhbGxldC5pY29uLmZvdW5kYXRpb24xbC9hcGkvdjNxEFgHAAAAaGVhZGVyc3ERY3JlcXVlc3Rz\nLnN0cnVjdHVyZXMKQ2FzZUluc2Vuc2l0aXZlRGljdApxEimBcRN9cRRYBgAAAF9zdG9yZXEVY2Nv\nbGxlY3Rpb25zCk9yZGVyZWREaWN0CnEWKVJxFyhYCgAAAHVzZXItYWdlbnRxGFgKAAAAVXNlci1B\nZ2VudHEZWBYAAABweXRob24tcmVxdWVzdHMvMi4yMC4wcRqGcRtYDwAAAGFjY2VwdC1lbmNvZGlu\nZ3EcWA8AAABBY2NlcHQtRW5jb2RpbmdxHVgNAAAAZ3ppcCwgZGVmbGF0ZXEehnEfWAYAAABhY2Nl\ncHRxIFgGAAAAQWNjZXB0cSFYEAAAAGFwcGxpY2F0aW9uL2pzb25xIoZxI1gKAAAAY29ubmVjdGlv\nbnEkWAoAAABDb25uZWN0aW9ucSVYCgAAAGtlZXAtYWxpdmVxJoZxJ1gMAAAAY29udGVudC10eXBl\ncShYDAAAAENvbnRlbnQtVHlwZXEpaCKGcSpYDgAAAGNvbnRlbnQtbGVuZ3RocStYDgAAAENvbnRl\nbnQtTGVuZ3RocSxYAgAAADU3cS2GcS51c2JYCAAAAF9jb29raWVzcS9jcmVxdWVzdHMuY29va2ll\ncwpSZXF1ZXN0c0Nvb2tpZUphcgpxMCmBcTF9cTIoWAcAAABfcG9saWN5cTNjaHR0cC5jb29raWVq\nYXIKRGVmYXVsdENvb2tpZVBvbGljeQpxNCmBcTV9cTYoWAgAAABuZXRzY2FwZXE3iFgHAAAAcmZj\nMjk2NXE4iVgTAAAAcmZjMjEwOV9hc19uZXRzY2FwZXE5TlgMAAAAaGlkZV9jb29raWUycTqJWA0A\nAABzdHJpY3RfZG9tYWlucTuJWBsAAABzdHJpY3RfcmZjMjk2NV91bnZlcmlmaWFibGVxPIhYFgAA\nAHN0cmljdF9uc191bnZlcmlmaWFibGVxPYlYEAAAAHN0cmljdF9uc19kb21haW5xPksAWBwAAABz\ndHJpY3RfbnNfc2V0X2luaXRpYWxfZG9sbGFycT+JWBIAAABzdHJpY3RfbnNfc2V0X3BhdGhxQIlY\nEAAAAF9ibG9ja2VkX2RvbWFpbnNxQSlYEAAAAF9hbGxvd2VkX2RvbWFpbnNxQk5YBAAAAF9ub3dx\nQ0p6S0FddWJoL31xRGhDSnpLQV11YlgEAAAAYm9keXFFQzl7Impzb25ycGMiOiAiMi4wIiwgIm1l\ndGhvZCI6ICJpY3hfZ2V0TGFzdEJsb2NrIiwgImlkIjogMX1xRlgFAAAAaG9va3NxR31xSGgIXXFJ\nc1gOAAAAX2JvZHlfcG9zaXRpb25xSk51YnViLg==\n"} {"!number": 2, "!type": "dict", "!data": {"version": "0.1a", "prev_block_hash": "dae35ec99b918d66745c3529ad2c6cb684b36e8b0f23d4dead64951ebe1ba16f", "merkle_tree_root_hash": "ca0e9e1476c1add1f9fb74cfa15c1129406816baa4efa07ddeae83158890e3e0", "time_stamp": 1564560247863015, "confirmed_transaction_list": [{"version": "0x3", "from": "hxa9546e6e6ec8bcb1e52106914f5f1fba90013f44", "to": "cx1b97c1abfd001d5cd0b5a3f93f22cccfea77e34e", "timestamp": "0x58ef591274190", "nid": "0x1", "stepLimit": "0x2625a00", "dataType": "call", "value": "0x68155a43676e00000", "data": {"method": "bet_on_numbers", "params": {"numbers": "7,8,9,10,11,12,13,14,15,16,17,18,19,20", "user_seed": ""}}, "signature": "wa+chZN4cuBewZGsVYBJQjzbMB/As+C0kByGt1KW3H1HYrxNxUPwV0RGQK5Gt5obJpTxv7EDa1Tx2jEnahKqbwA=", "txHash": "0xca0e9e1476c1add1f9fb74cfa15c1129406816baa4efa07ddeae83158890e3e0"}], "block_hash": "5b56f64bb4598746b65edeb64638e41b9707fe7dbd6b59bde3e1d4c6c155297a", "height": 6486306, "peer_id": "hx04fb8e539e0cafe69cbf114c973334bf9a58cec7", "signature": "GF1xENEPi77rqEnzOdNZrhhNAOtyrmSeMEG+YAmFk5YYmUjHDMZ1f1Ar1rLlMnGbG4z7i8ptpLqmdf3TuN00kgA=", "next_leader": "hx04fb8e539e0cafe69cbf114c973334bf9a58cec7"}} {"!number": 3, "!type": "dict", "!data": {"version": "0.1a", "prev_block_hash": "d4d262a83b6a759a3414aa8079c81a1c9d7659ad6bf1bcf02b8ed90910134bf0", "merkle_tree_root_hash": "2a9875f88da7ec8d3f7cd75eea5503a3259655f94b96af9de4a05349a1fa054e", "time_stamp": 1564560251863533, "confirmed_transaction_list": [{"version": "0x3", "from": "hxedddc5504e3809fd3d796e2148c9217a8d6c2ae1", "to": "cx1b97c1abfd001d5cd0b5a3f93f22cccfea77e34e", "timestamp": "0x58ef591e06030", "nid": "0x1", "stepLimit": "0x2625a00", "dataType": "call", "value": "0x8ac7230489e80000", "data": {"method": "bet_on_numbers", "params": {"numbers": "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20", "user_seed": ""}}, "signature": "eLT3UJ4qKY/DxG1+cG9LKdxKezyKFFobavdd2CGY6VpCCSLDTTFf4iIt2GvHBUC7zrwWZnMK+dtLiOmoIrOd5wA=", "txHash": "0x2a9875f88da7ec8d3f7cd75eea5503a3259655f94b96af9de4a05349a1fa054e"}], "block_hash": "9ef90ffc63ae9a9c6258edf07c66bbfb0d80a30e14457187a95ebab8e93422ae", "height": 6486308, "peer_id": "hx04fb8e539e0cafe69cbf114c973334bf9a58cec7", "signature": "cSjNWdTJi0LmGqP+SviSbVdXP+BLF12VHGxdQ5VNM81cJ+en4rg9EGBWzwbxqrd/vLzG3dGLhmqrBZE6KXsr1wE=", "next_leader": "hx04fb8e539e0cafe69cbf114c973334bf9a58cec7"}} """ if __name__ == "__main__": test_event_system()
107.355932
1,807
0.827913
459
6,334
11.206972
0.394336
0.04063
0.015552
0.021384
0.164852
0.141719
0.126944
0.097395
0.07951
0.036547
0
0.168894
0.054942
6,334
58
1,808
109.206897
0.690444
0
0
0.069767
0
0.139535
0.78797
0.574518
0
0
0.036154
0
0
1
0.023256
false
0
0.116279
0
0.139535
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
49f3547823fe75f6ef7f9df3d96e3fdbbffb08b3
109
py
Python
main.py
alyssalarios/RetinotopicMapping
0801617c6bc3463812d293593511d3fd2cc6d82b
[ "Apache-2.0" ]
null
null
null
main.py
alyssalarios/RetinotopicMapping
0801617c6bc3463812d293593511d3fd2cc6d82b
[ "Apache-2.0" ]
null
null
null
main.py
alyssalarios/RetinotopicMapping
0801617c6bc3463812d293593511d3fd2cc6d82b
[ "Apache-2.0" ]
null
null
null
def print_hi(name): print(f'hi, {name}') if __name__ =='__main__': print_hi('PyCharm')
10.9
26
0.550459
14
109
3.571429
0.571429
0.28
0
0
0
0
0
0
0
0
0
0
0.275229
109
9
27
12.111111
0.632911
0
0
0
0
0
0.257732
0
0
0
0
0
0
1
0.25
false
0
0
0
0.25
0.75
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
1
0
5
3fa9ad6b115198f2f22dd1b5e19ee06d769f1a71
5,047
py
Python
tests/test_swf/responses/test_activity_types.py
moseb/moto
d596560971ae289f102b9aecb9939b3c49a56ac5
[ "Apache-2.0" ]
1
2020-01-13T21:45:21.000Z
2020-01-13T21:45:21.000Z
tests/test_swf/responses/test_activity_types.py
moseb/moto
d596560971ae289f102b9aecb9939b3c49a56ac5
[ "Apache-2.0" ]
1
2016-02-11T14:54:01.000Z
2016-02-12T14:11:05.000Z
tests/test_swf/responses/test_activity_types.py
moseb/moto
d596560971ae289f102b9aecb9939b3c49a56ac5
[ "Apache-2.0" ]
2
2017-03-02T05:59:52.000Z
2020-09-03T13:25:44.000Z
import boto from boto.swf.exceptions import SWFResponseError import sure # noqa from moto import mock_swf_deprecated # RegisterActivityType endpoint @mock_swf_deprecated def test_register_activity_type(): conn = boto.connect_swf("the_key", "the_secret") conn.register_domain("test-domain", "60") conn.register_activity_type("test-domain", "test-activity", "v1.0") types = conn.list_activity_types("test-domain", "REGISTERED") actype = types["typeInfos"][0] actype["activityType"]["name"].should.equal("test-activity") actype["activityType"]["version"].should.equal("v1.0") @mock_swf_deprecated def test_register_already_existing_activity_type(): conn = boto.connect_swf("the_key", "the_secret") conn.register_domain("test-domain", "60") conn.register_activity_type("test-domain", "test-activity", "v1.0") conn.register_activity_type.when.called_with( "test-domain", "test-activity", "v1.0" ).should.throw(SWFResponseError) @mock_swf_deprecated def test_register_with_wrong_parameter_type(): conn = boto.connect_swf("the_key", "the_secret") conn.register_domain("test-domain", "60") conn.register_activity_type.when.called_with( "test-domain", "test-activity", 12 ).should.throw(SWFResponseError) # ListActivityTypes endpoint @mock_swf_deprecated def test_list_activity_types(): conn = boto.connect_swf("the_key", "the_secret") conn.register_domain("test-domain", "60") conn.register_activity_type("test-domain", "b-test-activity", "v1.0") conn.register_activity_type("test-domain", "a-test-activity", "v1.0") conn.register_activity_type("test-domain", "c-test-activity", "v1.0") all_activity_types = conn.list_activity_types("test-domain", "REGISTERED") names = [ activity_type["activityType"]["name"] for activity_type in all_activity_types["typeInfos"] ] names.should.equal(["a-test-activity", "b-test-activity", "c-test-activity"]) @mock_swf_deprecated def test_list_activity_types_reverse_order(): conn = boto.connect_swf("the_key", "the_secret") conn.register_domain("test-domain", "60") conn.register_activity_type("test-domain", "b-test-activity", "v1.0") conn.register_activity_type("test-domain", "a-test-activity", "v1.0") conn.register_activity_type("test-domain", "c-test-activity", "v1.0") all_activity_types = conn.list_activity_types( "test-domain", "REGISTERED", reverse_order=True ) names = [ activity_type["activityType"]["name"] for activity_type in all_activity_types["typeInfos"] ] names.should.equal(["c-test-activity", "b-test-activity", "a-test-activity"]) # DeprecateActivityType endpoint @mock_swf_deprecated def test_deprecate_activity_type(): conn = boto.connect_swf("the_key", "the_secret") conn.register_domain("test-domain", "60") conn.register_activity_type("test-domain", "test-activity", "v1.0") conn.deprecate_activity_type("test-domain", "test-activity", "v1.0") actypes = conn.list_activity_types("test-domain", "DEPRECATED") actype = actypes["typeInfos"][0] actype["activityType"]["name"].should.equal("test-activity") actype["activityType"]["version"].should.equal("v1.0") @mock_swf_deprecated def test_deprecate_already_deprecated_activity_type(): conn = boto.connect_swf("the_key", "the_secret") conn.register_domain("test-domain", "60") conn.register_activity_type("test-domain", "test-activity", "v1.0") conn.deprecate_activity_type("test-domain", "test-activity", "v1.0") conn.deprecate_activity_type.when.called_with( "test-domain", "test-activity", "v1.0" ).should.throw(SWFResponseError) @mock_swf_deprecated def test_deprecate_non_existent_activity_type(): conn = boto.connect_swf("the_key", "the_secret") conn.register_domain("test-domain", "60") conn.deprecate_activity_type.when.called_with( "test-domain", "non-existent", "v1.0" ).should.throw(SWFResponseError) # DescribeActivityType endpoint @mock_swf_deprecated def test_describe_activity_type(): conn = boto.connect_swf("the_key", "the_secret") conn.register_domain("test-domain", "60") conn.register_activity_type( "test-domain", "test-activity", "v1.0", task_list="foo", default_task_heartbeat_timeout="32", ) actype = conn.describe_activity_type("test-domain", "test-activity", "v1.0") actype["configuration"]["defaultTaskList"]["name"].should.equal("foo") infos = actype["typeInfo"] infos["activityType"]["name"].should.equal("test-activity") infos["activityType"]["version"].should.equal("v1.0") infos["status"].should.equal("REGISTERED") @mock_swf_deprecated def test_describe_non_existent_activity_type(): conn = boto.connect_swf("the_key", "the_secret") conn.register_domain("test-domain", "60") conn.describe_activity_type.when.called_with( "test-domain", "non-existent", "v1.0" ).should.throw(SWFResponseError)
35.542254
81
0.711908
645
5,047
5.303876
0.116279
0.096463
0.065478
0.070155
0.844782
0.830167
0.743058
0.743058
0.694826
0.692195
0
0.015532
0.132554
5,047
141
82
35.794326
0.765875
0.024173
0
0.613208
0
0
0.264281
0
0
0
0
0
0
1
0.09434
false
0
0.037736
0
0.132075
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
3fc0ffad3a731b69b502c8327aac737e524c5f8b
38
py
Python
kickeststats/resources/tests/__init__.py
antimaLinux/kickscarper
c2607847f1c7ad8bc30014ab4e62f0976ace5f0f
[ "MIT" ]
null
null
null
kickeststats/resources/tests/__init__.py
antimaLinux/kickscarper
c2607847f1c7ad8bc30014ab4e62f0976ace5f0f
[ "MIT" ]
1
2020-10-14T06:44:12.000Z
2020-10-14T06:44:12.000Z
kickeststats/resources/tests/__init__.py
antimaLinux/kickscraper
c2607847f1c7ad8bc30014ab4e62f0976ace5f0f
[ "MIT" ]
null
null
null
"""Tests resources initialization."""
19
37
0.736842
3
38
9.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.078947
38
1
38
38
0.8
0.815789
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
3fcd527efb95f48e259657402b596db356c49056
1,023
py
Python
tests/test_utils.py
6un9-h0-Dan/PoshC2
dd39e62421ed5efd1e895e66b8ad59f034bf6a4c
[ "BSD-3-Clause" ]
1,504
2016-07-12T04:14:00.000Z
2022-03-31T02:59:30.000Z
tests/test_utils.py
6un9-h0-Dan/PoshC2
dd39e62421ed5efd1e895e66b8ad59f034bf6a4c
[ "BSD-3-Clause" ]
139
2016-10-13T10:41:18.000Z
2022-03-31T13:22:47.000Z
tests/test_utils.py
6un9-h0-Dan/PoshC2
dd39e62421ed5efd1e895e66b8ad59f034bf6a4c
[ "BSD-3-Clause" ]
377
2016-07-12T03:10:03.000Z
2022-03-31T10:04:13.000Z
import pytest from poshc2.Utils import validate_sleep_time, validate_killdate def test_validate_sleep_time(): assert validate_sleep_time("5h") is not None assert validate_sleep_time("4m") is not None assert validate_sleep_time("3s ") is not None assert validate_sleep_time(" 5000h ") is not None assert validate_sleep_time(" 999 s ") is None assert validate_sleep_time("999 s") is None assert validate_sleep_time("999d") is None assert validate_sleep_time("s") is None assert validate_sleep_time("asdf") is None assert validate_sleep_time("") is None assert validate_sleep_time(None) is None def test_validate_killdate(): assert not validate_killdate("0123-45-67") assert not validate_killdate("0000-00-0") assert not validate_killdate("bad") assert not validate_killdate("") assert not validate_killdate("2020-01-45") assert not validate_killdate("2020-13-01") assert validate_killdate("2020-01-01") assert validate_killdate(" 2020-01-01 ")
36.535714
63
0.740958
151
1,023
4.768212
0.218543
0.234722
0.306944
0.351389
0.677778
0.631944
0.397222
0.129167
0.129167
0.129167
0
0.075117
0.167155
1,023
28
64
36.535714
0.769953
0
0
0.173913
0
0
0.097656
0
0
0
0
0
0.826087
1
0.086957
true
0
0.086957
0
0.173913
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
1
0
0
0
0
0
0
5
3fd71ecbebcecb6fd3d52b0a202cf82730ad1575
2,896
py
Python
lego/apps/contact/tests/test_views.py
andrinelo/lego
9b53c8fe538d9107b980a70e2a21fb487cc3b290
[ "MIT" ]
null
null
null
lego/apps/contact/tests/test_views.py
andrinelo/lego
9b53c8fe538d9107b980a70e2a21fb487cc3b290
[ "MIT" ]
null
null
null
lego/apps/contact/tests/test_views.py
andrinelo/lego
9b53c8fe538d9107b980a70e2a21fb487cc3b290
[ "MIT" ]
null
null
null
from unittest import mock from rest_framework import status from lego.apps.users.models import User from lego.utils.test_utils import BaseAPITestCase class ContactViewSetTestCase(BaseAPITestCase): fixtures = [ 'initial_files.yaml', 'initial_abakus_groups.yaml', 'development_users.yaml', 'development_memberships.yaml' ] def setUp(self): self.url = '/api/v1/contact-form/' self.user = User.objects.first() @mock.patch('lego.apps.contact.views.send_message') @mock.patch('lego.apps.contact.serializers.verify_captcha', return_value=True) def test_without_auth(self, mock_verify_captcha, mock_send_message): response = self.client.post( self.url, { 'title': 'title', 'message': 'message', 'anonymous': True, 'captcha_response': 'test' } ) self.assertEquals(status.HTTP_202_ACCEPTED, response.status_code) mock_verify_captcha.assert_called_once() @mock.patch('lego.apps.contact.views.send_message') @mock.patch('lego.apps.contact.serializers.verify_captcha', return_value=True) def test_without_auth_not_anonymous(self, mock_verify_captcha, mock_send_message): response = self.client.post( self.url, { 'title': 'title', 'message': 'message', 'anonymous': False, 'captcha_response': 'test' } ) self.assertEquals(status.HTTP_400_BAD_REQUEST, response.status_code) @mock.patch('lego.apps.contact.views.send_message') @mock.patch('lego.apps.contact.serializers.verify_captcha', return_value=True) def test_with_auth(self, mock_verify_captcha, mock_send_message): self.client.force_login(self.user) response = self.client.post( self.url, { 'title': 'title', 'message': 'message', 'anonymous': True, 'captcha_response': 'test' } ) self.assertEquals(status.HTTP_202_ACCEPTED, response.status_code) mock_verify_captcha.assert_called_once() mock_send_message.assert_called_once_with('title', 'message', self.user, True) @mock.patch('lego.apps.contact.views.send_message') @mock.patch('lego.apps.contact.serializers.verify_captcha', return_value=False) def test_with_auth_invalid_captcha(self, mock_verify_captcha, mock_send_message): self.client.force_login(self.user) response = self.client.post( self.url, { 'title': 'title', 'message': 'message', 'anonymous': True, 'captcha_response': 'test' } ) self.assertEquals(status.HTTP_400_BAD_REQUEST, response.status_code) mock_verify_captcha.assert_called_once()
37.61039
86
0.632942
318
2,896
5.5
0.216981
0.081761
0.059463
0.077759
0.753573
0.753573
0.753573
0.753573
0.751286
0.734706
0
0.006021
0.254489
2,896
76
87
38.105263
0.804076
0
0
0.590909
0
0
0.227555
0.143992
0
0
0
0
0.121212
1
0.075758
false
0
0.060606
0
0.166667
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
3fe6efb55b5b2f5712b1a4c870fd430a19de429b
78
py
Python
helloworld.py
AzureQDragon/hello-world
676a1ddf8bd371faa02093888df567881c4a0d2f
[ "MIT" ]
null
null
null
helloworld.py
AzureQDragon/hello-world
676a1ddf8bd371faa02093888df567881c4a0d2f
[ "MIT" ]
1
2019-12-04T01:32:22.000Z
2019-12-04T01:32:22.000Z
helloworld.py
AzureQDragon/hello-world
676a1ddf8bd371faa02093888df567881c4a0d2f
[ "MIT" ]
null
null
null
#The classic print("Hello World") #Print more things print("Hello New World")
15.6
24
0.74359
12
78
4.833333
0.666667
0.344828
0
0
0
0
0
0
0
0
0
0
0.128205
78
5
24
15.6
0.852941
0.358974
0
0
0
0
0.530612
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
b20792341342a68543a257ad5e322622bac338f6
141
py
Python
floss/__init__.py
jedimasterbot/flare-floss
6eb7e2a87f9d4e1c99c6b2f2bc95b28dbdab73f9
[ "Apache-2.0" ]
1
2020-12-09T04:39:16.000Z
2020-12-09T04:39:16.000Z
floss/__init__.py
4k4xs4pH1r3/flare-floss
6eb7e2a87f9d4e1c99c6b2f2bc95b28dbdab73f9
[ "Apache-2.0" ]
null
null
null
floss/__init__.py
4k4xs4pH1r3/flare-floss
6eb7e2a87f9d4e1c99c6b2f2bc95b28dbdab73f9
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2017 FireEye, Inc. All Rights Reserved. from . import version __all__ = ('__version__') __version__ = version.__version__
17.625
55
0.744681
16
141
5.5625
0.6875
0.47191
0.47191
0
0
0
0
0
0
0
0
0.033613
0.156028
141
7
56
20.142857
0.714286
0.375887
0
0
0
0
0.127907
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
b78276c025700fc59192aead9d1a1722e0701ae3
2,518
py
Python
tests/test_managers_rule.py
cherryasphalt/django-recurrence
74f7b37271add99780e0b430f8eb3e44328b7bb9
[ "BSD-3-Clause" ]
null
null
null
tests/test_managers_rule.py
cherryasphalt/django-recurrence
74f7b37271add99780e0b430f8eb3e44328b7bb9
[ "BSD-3-Clause" ]
null
null
null
tests/test_managers_rule.py
cherryasphalt/django-recurrence
74f7b37271add99780e0b430f8eb3e44328b7bb9
[ "BSD-3-Clause" ]
null
null
null
from datetime import datetime from dateutil import tz from django.utils.timezone import make_aware from recurrence import choices from recurrence.models import Param, Recurrence, Rule import pytest import recurrence @pytest.mark.django_db def test_create_from_rule_object(): limits = Recurrence.objects.create() rule = Rule.objects.create( recurrence=limits, mode=choices.INCLUSION, freq=recurrence.WEEKLY, until=make_aware(datetime(2014, 12, 31, 0, 0, 0), tz.UTC) ) object = Rule.objects.create_from_rule_object( choices.EXCLUSION, rule, limits ) assert rule.to_rule_object() == object.to_rule_object() assert rule.mode is True assert object.mode is False @pytest.mark.django_db def test_create_from_rule_object_byday(): limits = Recurrence.objects.create() rule = Rule.objects.create( recurrence=limits, mode=choices.INCLUSION, freq=recurrence.WEEKLY, until=make_aware(datetime(2014, 12, 31, 0, 0, 0), tz.UTC) ) Param.objects.create( rule=rule, param='byday', value=6, index=0 ) expected = 'RRULE:FREQ=WEEKLY;UNTIL=20141231T000000Z;BYDAY=SU' original = Rule.objects.to_rule_object(rule) serialized = recurrence.serialize(original) assert serialized == expected object = Rule.objects.create_from_rule_object( choices.INCLUSION, original, limits ) serialized = recurrence.serialize(object.to_rule_object()) assert serialized == expected @pytest.mark.django_db def test_create_from_rule_object_bymonth(): limits = Recurrence.objects.create() rule = Rule.objects.create( recurrence=limits, mode=choices.INCLUSION, freq=recurrence.WEEKLY, until=make_aware(datetime(2014, 12, 31, 0, 0, 0), tz.UTC) ) Param.objects.create( rule=rule, param='bymonth', value=6, index=0 ) Param.objects.create( rule=rule, param='bymonth', value=8, index=1 ) expected = 'RRULE:FREQ=WEEKLY;UNTIL=20141231T000000Z;BYMONTH=6,8' original = Rule.objects.to_rule_object(rule) serialized = recurrence.serialize(original) assert serialized == expected object = Rule.objects.create_from_rule_object( choices.INCLUSION, original, limits ) serialized = recurrence.serialize(object.to_rule_object()) assert serialized == expected
25.18
69
0.663622
296
2,518
5.503378
0.182432
0.073665
0.051565
0.073665
0.802947
0.788214
0.734193
0.734193
0.673419
0.673419
0
0.036013
0.239079
2,518
99
70
25.434343
0.814196
0
0
0.646341
0
0
0.047657
0.040111
0
0
0
0
0.085366
1
0.036585
false
0
0.085366
0
0.121951
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
b7956851a5cf031864fb766373e5d938198debb8
99
py
Python
Animations/phasor_animation/helper_functions.py
kaungsgit/Python_DSP
0a2850ab4043332b8d1f516f1e589543207639c5
[ "MIT" ]
null
null
null
Animations/phasor_animation/helper_functions.py
kaungsgit/Python_DSP
0a2850ab4043332b8d1f516f1e589543207639c5
[ "MIT" ]
null
null
null
Animations/phasor_animation/helper_functions.py
kaungsgit/Python_DSP
0a2850ab4043332b8d1f516f1e589543207639c5
[ "MIT" ]
null
null
null
import os def print_cust(str_val, val, enable=False): if enable: print(str_val, val)
14.142857
43
0.656566
16
99
3.875
0.625
0.193548
0.290323
0
0
0
0
0
0
0
0
0
0.242424
99
6
44
16.5
0.826667
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.5
0.5
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
1
0
5
b7d3fd2a58df302175fa18944810b41c67947309
69
py
Python
deepmachine/data/generator/__init__.py
yuxiang-zhou/deepmachine
b8a64354f7d37664172ef79a66b1fc0a9fa0f493
[ "MIT" ]
1
2018-09-04T11:12:11.000Z
2018-09-04T11:12:11.000Z
deepmachine/data/generator/__init__.py
yuxiang-zhou/deepmachine
b8a64354f7d37664172ef79a66b1fc0a9fa0f493
[ "MIT" ]
null
null
null
deepmachine/data/generator/__init__.py
yuxiang-zhou/deepmachine
b8a64354f7d37664172ef79a66b1fc0a9fa0f493
[ "MIT" ]
null
null
null
from .base import Generator, MergeGenerators from . import preprocess
34.5
44
0.84058
8
69
7.25
0.75
0
0
0
0
0
0
0
0
0
0
0
0.115942
69
2
45
34.5
0.95082
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
b7eee842eb3372d5abca29c2bbe8cbe61d8f06c4
4,475
py
Python
test_cmd.py
ruester/modelprop
1a1afa1327d67a58d5ec1ce097055d7bafaf3988
[ "Apache-2.0" ]
null
null
null
test_cmd.py
ruester/modelprop
1a1afa1327d67a58d5ec1ce097055d7bafaf3988
[ "Apache-2.0" ]
null
null
null
test_cmd.py
ruester/modelprop
1a1afa1327d67a58d5ec1ce097055d7bafaf3988
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright © 2021 Helmholtz Centre Potsdam GFZ German Research Centre for Geosciences, Potsdam, Germany # # 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 # # https://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. """ Unittests to query to modelprop data. """ import json import os import subprocess import unittest class TestTorres(unittest.TestCase): """ Test class to query the modelprop with torres. """ def test_full(self): """ Runs the program and tests the output. """ schema = "Torres_Corredor_et_al_2017" current_dir = os.path.dirname(os.path.abspath(__file__)) path_modelprop = os.path.join(current_dir, "modelprop.py") subprocess.run( ["python3", path_modelprop, schema, "buildings", "structural"], check=True, ) output_file = os.path.join(current_dir, "output", "query_output.json") with open(output_file, "rt") as fh: output_data = json.load(fh) self.assertEqual(schema, output_data["meta"]["id"]) class TestMavrouli(unittest.TestCase): """ Test class to query the modelprop for mavrouli. """ def test_full(self): """ Runs the program and tests the output. """ schema = "Mavrouli_et_al_2014" current_dir = os.path.dirname(os.path.abspath(__file__)) path_modelprop = os.path.join(current_dir, "modelprop.py") subprocess.run( ["python3", path_modelprop, schema, "buildings", "structural"], check=True, ) output_file = os.path.join(current_dir, "output", "query_output.json") with open(output_file, "rt") as fh: output_data = json.load(fh) self.assertEqual(schema, output_data["meta"]["id"]) class TestSuppasri(unittest.TestCase): """ Test class to query the modelprop for suppasri. """ def test_full(self): """ Runs the program and tests the output. """ schema = "SUPPASRI2013_v2.0" current_dir = os.path.dirname(os.path.abspath(__file__)) path_modelprop = os.path.join(current_dir, "modelprop.py") subprocess.run( ["python3", path_modelprop, schema, "buildings", "structural"], check=True, ) output_file = os.path.join(current_dir, "output", "query_output.json") with open(output_file, "rt") as fh: output_data = json.load(fh) self.assertEqual(schema, output_data["meta"]["id"]) class TestSara(unittest.TestCase): """ Test class to query the modelprop for sara. """ def test_full(self): """ Runs the program and tests the output. """ schema = "SARA_v1.0" current_dir = os.path.dirname(os.path.abspath(__file__)) path_modelprop = os.path.join(current_dir, "modelprop.py") subprocess.run( ["python3", path_modelprop, schema, "buildings", "structural"], check=True, ) output_file = os.path.join(current_dir, "output", "query_output.json") with open(output_file, "rt") as fh: output_data = json.load(fh) self.assertEqual(schema, output_data["meta"]["id"]) class TestMedina(unittest.TestCase): """ Test class to query the modelprop for medina. """ def test_full(self): """ Runs the program and tests the output. """ schema = "Medina_2019" current_dir = os.path.dirname(os.path.abspath(__file__)) path_modelprop = os.path.join(current_dir, "modelprop.py") subprocess.run( ["python3", path_modelprop, schema, "buildings", "structural"], check=True, ) output_file = os.path.join(current_dir, "output", "query_output.json") with open(output_file, "rt") as fh: output_data = json.load(fh) self.assertEqual(schema, output_data["meta"]["id"]) if __name__ == "__main__": unittest.main()
29.248366
307
0.626369
550
4,475
4.929091
0.245455
0.044264
0.036887
0.062707
0.711546
0.711546
0.711546
0.711546
0.695315
0.625968
0
0.010213
0.256089
4,475
152
308
29.440789
0.803845
0.247821
0
0.704225
0
0
0.137615
0.008225
0
0
0
0
0.070423
1
0.070423
false
0
0.056338
0
0.197183
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
4d1b809bdf8b2ea444ab65b29ebe7589079e1ffc
211
py
Python
__main__.py
evenharder/koistudy-crawler
c088c16a249b92868408c2f66794b64e80e59951
[ "MIT" ]
2
2017-02-18T16:09:56.000Z
2021-08-20T08:58:30.000Z
__main__.py
evenharder/koistudy-crawler
c088c16a249b92868408c2f66794b64e80e59951
[ "MIT" ]
1
2017-02-24T15:46:41.000Z
2017-02-24T15:46:41.000Z
__main__.py
evenharder/koistudy-crawler
c088c16a249b92868408c2f66794b64e80e59951
[ "MIT" ]
2
2017-02-18T17:00:37.000Z
2020-10-26T09:02:48.000Z
from tkinter import * from tkinter.ttk import * from tkinter.filedialog import askdirectory from tkinter.scrolledtext import * import queue import os import sys import io import tk_interface tk_interface.GUI()
17.583333
43
0.824645
30
211
5.733333
0.466667
0.255814
0.197674
0
0
0
0
0
0
0
0
0
0.132701
211
12
44
17.583333
0.939891
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.9
0
0.9
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
4d308fc87e152eb8a37128d74f71935bdcb21e83
97
py
Python
test/test_files/test_dynamic/test_dynamic_from_import_start.py
SoftwareUnderstanding/inspect4py
9c4d7252535082ad938b26baf281d93f3a27285e
[ "BSD-3-Clause" ]
2
2022-02-15T20:30:57.000Z
2022-03-17T00:50:37.000Z
test/test_files/test_dynamic/test_dynamic_from_import_start.py
SoftwareUnderstanding/code_inspector
a820b5a7bb18f5df9c3e79346108d8280b20c39a
[ "BSD-3-Clause" ]
101
2021-06-09T14:19:59.000Z
2022-01-24T13:24:39.000Z
test/test_files/test_dynamic/test_dynamic_from_import_start.py
SoftwareUnderstanding/inspect4py
9c4d7252535082ad938b26baf281d93f3a27285e
[ "BSD-3-Clause" ]
1
2021-09-22T06:59:32.000Z
2021-09-22T06:59:32.000Z
from test_dynamic_func import * def func_3(func): return func() a=func_3(func_1) print(a)
10.777778
31
0.71134
18
97
3.555556
0.611111
0.15625
0.28125
0
0
0
0
0
0
0
0
0.0375
0.175258
97
8
32
12.125
0.7625
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.2
0.2
0.6
0.2
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
5
4d42109c992489a2a64e8f607565ff861519c01f
20,683
py
Python
mediapipe/calculators/signn/main.py
JohnK-mi/angle_algor
3789c33a8405d4a938cbc1496a620bd082690a56
[ "Apache-2.0" ]
null
null
null
mediapipe/calculators/signn/main.py
JohnK-mi/angle_algor
3789c33a8405d4a938cbc1496a620bd082690a56
[ "Apache-2.0" ]
null
null
null
mediapipe/calculators/signn/main.py
JohnK-mi/angle_algor
3789c33a8405d4a938cbc1496a620bd082690a56
[ "Apache-2.0" ]
null
null
null
import json import math from scipy import stats from operator import itemgetter class Point: def __init__(self, x, y): self.point = (x, y) def __str__(self): return str(self.point) def __repr__(self): return str(self.point) class Hand: def __init__(self, *args): self.points = [] for point in args: self.points.append(point) print(self) def __str__(self): return str(self.points) def __repr__(self): return str(self.points) def testLoaded(): return True def dataProcess(*pyData): data = '''{"G":[74.01586441832058, 17.340933424627845, 40.370329393508435, 12.873503711162364, 40.370329393508435, 12.873503711162364, 40.370329393508435, 12.873503711162364, 40.370329393508435, 12.873503711162364, 40.370329393508435, 12.873503711162364, 18.07623590089355, 16.50876800528234, 12.749216034538879, 13.587719716614938, 49.468281024172306, 25.699087733006127, 23.177913279241864, 15.300201758085768, 22.49884524281407, 18.31065746354109, 17.974000804243992, 21.03858742728468, 15.41172253451187, 15.93294006967198, 21.176054977871882, 20.781252955293926, 12.749216034538879, 13.587719716614938, 23.177913279241864, 15.300201758085768, 43.23292804287742, 10.561602216182624, 31.155497420809326, 13.62275174059382, 17.35777963101107, 16.25047406898561, 12.888085365778052, 14.130572002979816], "V":[21.8283778870849, 13.958799093250441, 66.51189580771944, 16.94900168585604, 66.51189580771944, 16.94900168585604, 66.51189580771944, 16.94900168585604, 66.51189580771944, 16.94900168585604, 66.51189580771944, 16.94900168585604, 78.61713928395135, 16.682485766804238, 76.2360107646767, 16.0539646713596, 44.909982577116914, 19.731302047399133, 29.359870338108834, 19.265687832048773, 41.17207668100196, 24.25420211092361, 62.4217786941041, 20.785595210879276, 67.8389082340857, 19.484755140275233, 73.78920827880384, 16.53127103125933, 76.2360107646767, 16.0539646713596, 29.359870338108834, 19.265687832048773, 71.92679354221019, 9.901333740369644, 78.9089128453547, 15.927999388806596, 67.76904959283505, 16.74997694706698, 52.51728852775674, 14.83841387455954], "Y":[27.1448918802772, 15.577148102984559, 59.216106199091634, 12.527320365440753, 59.216106199091634, 12.527320365440753, 59.216106199091634, 12.527320365440753, 59.216106199091634, 12.527320365440753, 59.216106199091634, 12.527320365440753, 72.487939833006, 12.64904763129539, 47.64830344667024, 25.82851988951724, 15.198873966425364, 13.912749636207431, 53.531987318293375, 15.16639652647007, 66.35239157861865, 11.774238064693263, 68.31691538124043, 10.034139496782059, 52.603486005771906, 22.929292485994004, 74.8541817104954, 12.711925616967394, 47.64830344667024, 25.82851988951724, 53.531987318293375, 15.16639652647007, 80.44307197203806, 8.155373726854858, 75.81470497092778, 8.312863060597886, 60.24294167024109, 11.525320694225526, 44.51318638361976, 12.968484189079648], "A":[16.41413554414109, 11.628550833007935, 54.813155144056424, 9.959500772512339, 54.813155144056424, 9.959500772512339, 54.813155144056424, 9.959500772512339, 54.813155144056424, 9.959500772512339, 54.813155144056424, 9.959500772512339, 61.715992937811045, 24.044747261312512, 73.03801144528624, 15.896875415209387, 22.228160161694753, 11.187361381941223, 57.79474803942778, 12.954473534785341, 71.43058829352262, 7.467919630872851, 77.90682176987721, 7.166139908251978, 70.46381626871923, 15.994385672482178, 66.61585368068839, 16.207281533148603, 73.03801144528624, 15.896875415209387, 57.79474803942778, 12.954473534785341, 59.77510783568133, 10.050230885846139, 73.94311667666479, 9.622144018791099, 81.02767285269961, 7.360604055429424, 70.52935899717296, 11.541280638710592], "E":[26.180271831755928, 14.177595691104163, 54.634461170171576, 9.297903072644084, 54.634461170171576, 9.297903072644084, 54.634461170171576, 9.297903072644084, 54.634461170171576, 9.297903072644084, 54.634461170171576, 9.297903072644084, 69.93567610071692, 21.510835113714545, 74.70848702102131, 16.611503770245566, 39.38456386481985, 22.922334190271485, 42.548569134475215, 25.120465094180947, 76.60084157329369, 12.732340631803535, 80.95867742590876, 8.395413139941791, 73.6713475415226, 20.176884322066098, 71.2319728331702, 18.58800364299937, 74.70848702102131, 16.611503770245566, 42.548569134475215, 25.120465094180947, 68.63933084933824, 8.577072784609594, 81.40628142020218, 6.385936971393742, 79.48841374997464, 7.248259382247755, 64.61345280454941, 11.515176435542445], "L":[14.756247115135933, 8.732797941912512, 44.90358350762643, 9.493182154493498, 44.90358350762643, 9.493182154493498, 44.90358350762643, 9.493182154493498, 44.90358350762643, 9.493182154493498, 44.90358350762643, 9.493182154493498, 82.96658327811959, 9.482490066322816, 82.32081780921315, 12.013387356129094, 37.58284892118786, 26.212317862410888, 44.22116521240563, 29.159084958608577, 50.626803881237166, 22.407880379848844, 82.05255221805737, 5.531913364889223, 70.45529240152618, 15.123922279206711, 82.40261400955895, 7.4280013953244115, 82.32081780921315, 12.013387356129094, 44.22116521240563, 29.159084958608577, 64.36336982442747, 5.5432136863061725, 82.08516340508672, 4.626144915472316, 78.32314226373019, 6.617206793287127, 58.50804047957859, 10.422659052867433], "R":[31.71458602451762, 15.042331263108773, 78.65402544369213, 7.545505025631339, 78.65402544369213, 7.545505025631339, 78.65402544369213, 7.545505025631339, 78.65402544369213, 7.545505025631339, 78.65402544369213, 7.545505025631339, 65.33456494825084, 9.508369696754455, 69.0465226005151, 8.248211688554852, 33.34459371564547, 23.946084233213952, 27.880768308866397, 14.818876925369773, 47.92095460866419, 13.584874420532033, 75.86650224007082, 14.015173070998932, 80.33225169753482, 11.33461413366367, 64.32833417218538, 8.863452049523938, 69.0465226005151, 8.248211688554852, 27.880768308866397, 14.818876925369773, 78.01305006983026, 7.012002257568324, 83.00390935161947, 5.533254435984881, 71.35889098979769, 6.921949043712869, 55.73681119248771, 8.877347823923218], "W":[27.28017953290835, 15.332088895654978, 72.99329147488639, 17.41028575275122, 72.99329147488639, 17.41028575275122, 72.99329147488639, 17.41028575275122, 72.99329147488639, 17.41028575275122, 72.99329147488639, 17.41028575275122, 82.43683560998873, 5.931742776243015, 81.52182482092775, 5.367639722313998, 25.50522674469182, 17.007433294291932, 26.436602306397212, 10.686560755587232, 29.613262290395912, 13.261491221047653, 77.7459079677188, 11.694961921665577, 80.2620753653645, 8.315814156767036, 81.95132481485541, 5.7512190439748645, 81.52182482092775, 5.367639722313998, 26.436602306397212, 10.686560755587232, 74.94120746202047, 6.661581367940546, 83.17633895279788, 5.5578697800505825, 70.8667060843131, 8.166652750693117, 54.28840375467383, 9.25839091367745], "Q":[67.77035719777528, 21.001951471432132, 68.51299066261709, 7.770114131960612, 68.51299066261709, 7.770114131960612, 68.51299066261709, 7.770114131960612, 68.51299066261709, 7.770114131960612, 68.51299066261709, 7.770114131960612, 73.86961015648247, 16.24647987032122, 70.85985630312192, 19.742333228935056, 57.50543770623297, 10.80706622285427, 78.38686510247287, 20.680288255800463, 72.61405143417309, 13.193032365224887, 75.11554679058806, 13.201468303255563, 73.39127615907942, 19.515524164777517, 69.66215267075135, 19.615750771527292, 70.85985630312192, 19.742333228935056, 78.38686510247287, 20.680288255800463, 38.09402809179774, 17.596980759364534, 33.67029590305789, 17.07655023202593, 33.076997564426335, 15.57852758583373, 33.797901529189076, 13.547311405483487], "T":[28.857549211781034, 11.47467011910009, 69.59302333485864, 9.574229758739298, 69.59302333485864, 9.574229758739298, 69.59302333485864, 9.574229758739298, 69.59302333485864, 9.574229758739298, 69.59302333485864, 9.574229758739298, 63.82996038389993, 20.966274004186854, 70.15474632490137, 18.3805888533436, 42.39986151853912, 22.566152536935004, 78.27672197500013, 11.411106357252413, 83.61004252036713, 4.943892608497388, 81.48411600689002, 6.729441187520715, 66.63625450600647, 18.591146428603107, 75.87985335552584, 13.617246729002769, 70.15474632490137, 18.3805888533436, 78.27672197500013, 11.411106357252413, 71.52958948686064, 7.3649005309660955, 83.13983618077627, 5.115594169050099, 78.11707340571657, 6.9986569657485855, 62.34113627635413, 7.480190301209794], "I":[27.814836059173718, 17.01704813398845, 52.02909658597997, 15.65997301993444, 52.02909658597997, 15.65997301993444, 52.02909658597997, 15.65997301993444, 52.02909658597997, 15.65997301993444, 52.02909658597997, 15.65997301993444, 73.02543578391476, 13.892221520179211, 73.70537290959324, 12.990588007125076, 36.130224188565045, 26.735792549508187, 54.17955640531622, 20.77612544914792, 73.75112887378361, 16.690681432504274, 76.08026156143991, 12.58681077529011, 70.27225907557653, 18.65418408683913, 68.08903629572245, 18.39704185874277, 73.70537290959324, 12.990588007125076, 54.17955640531622, 20.77612544914792, 61.83816221712179, 12.751079853495694, 75.57185268246033, 9.187614773773898, 80.13286419622689, 6.066435860731561, 72.76780621412608, 13.025827443487408], "P":[65.7938417152238, 18.916112743683463, 24.128675575859905, 16.941473311485925, 24.128675575859905, 16.941473311485925, 24.128675575859905, 16.941473311485925, 24.128675575859905, 16.941473311485925, 24.128675575859905, 16.941473311485925, 20.1252914548215, 13.722593992688616, 13.7995710359844, 8.23911089887668, 56.175887955009784, 11.405730694671984, 19.769893375141745, 10.744033173633698, 18.31001367108947, 17.27360144162757, 30.06296781672673, 24.770699500349448, 31.539339709801418, 14.080533743623405, 20.05943637683383, 14.094757446093531, 13.7995710359844, 8.23911089887668, 19.769893375141745, 10.744033173633698, 29.17420354391353, 24.02190049066913, 29.930714917496164, 21.23310830814135, 25.112747494798196, 18.980406064143814, 19.501262361429823, 17.639877727072378], "H":[77.54348738838696, 14.095007724488157, 44.93366898081811, 18.813467515700903, 44.93366898081811, 18.813467515700903, 44.93366898081811, 18.813467515700903, 44.93366898081811, 18.813467515700903, 44.93366898081811, 18.813467515700903, 14.571208615074104, 13.012285344232748, 10.941695714312848, 7.6542435945433684, 69.53920082170066, 19.625157161330478, 45.95410597062695, 16.054647639047626, 47.61318144583233, 22.49632040410767, 19.36267582948642, 13.824800460667847, 15.837740785484955, 7.70897161381357, 14.075122802150416, 11.395598977505534, 10.941695714312848, 7.6542435945433684, 45.95410597062695, 16.054647639047626, 44.92901298788362, 9.774247114358255, 29.204865542153318, 9.426520069789794, 14.69703417943586, 10.354007892204576, 12.190614383410692, 10.556999786290977], "F":[18.545660029501477, 11.270443331071426, 44.321445524277834, 9.144583561597225, 44.321445524277834, 9.144583561597225, 44.321445524277834, 9.144583561597225, 44.321445524277834, 9.144583561597225, 44.321445524277834, 9.144583561597225, 79.63318786048741, 10.228780500407941, 73.60873711956854, 12.243492009423539, 39.77861370186376, 17.78759337193518, 63.822419319314676, 13.127135706748275, 62.740547051853994, 10.359945079665934, 84.40636465252268, 3.5878096980253544, 84.49596823670858, 3.6931623374216858, 74.12269445245283, 5.7969693040893, 73.60873711956854, 12.243492009423539, 63.822419319314676, 13.127135706748275, 65.6466290768853, 6.510208952555095, 78.6624887264573, 5.479850080978663, 84.10872633845528, 5.55701348796783, 72.86635896671484, 9.111806086933605], "O":[41.351211061227744, 9.307518422010244, 49.84656513146667, 9.137329273631348, 49.84656513146667, 9.137329273631348, 49.84656513146667, 9.137329273631348, 49.84656513146667, 9.137329273631348, 49.84656513146667, 9.137329273631348, 26.460452854634784, 20.639060375045943, 62.10894185099308, 18.33939938924229, 14.375733297973312, 6.740818191724812, 70.79720525916186, 16.784114581498336, 47.588240574302404, 12.30461054900525, 66.6657840123859, 11.018370903532755, 55.30907311706162, 15.007751139645526, 45.63325846568443, 20.882398434416103, 62.10894185099308, 18.33939938924229, 70.79720525916186, 16.784114581498336, 79.6325627158384, 7.448078391727167, 83.22144678640117, 6.316486851354054, 79.71831015216873, 6.0850605701000555, 74.88433005444043, 6.837851884363044], "U":[23.159173462850323, 11.679478260638227, 69.79573926960501, 12.68805841611636, 69.79573926960501, 12.68805841611636, 69.79573926960501, 12.68805841611636, 69.79573926960501, 12.68805841611636, 69.79573926960501, 12.68805841611636, 72.7030035504984, 13.911428291633746, 77.81575308342393, 9.909315710556031, 43.528181120708595, 14.987303771628563, 19.327155288396472, 12.797028574729191, 25.20235383168952, 16.63395968861133, 79.59526090308607, 8.664944120189842, 81.73399014189658, 5.309367038784823, 73.52669456255302, 8.886498456364373, 77.81575308342393, 9.909315710556031, 19.327155288396472, 12.797028574729191, 76.24391654067131, 6.048490597619365, 83.3789841527916, 5.298187366366579, 67.60409888623185, 9.265467660589524, 49.19961921070108, 11.454848529747535], "M":[29.878059856443517, 16.21558927480942, 66.57334182592417, 18.062561211518688, 66.57334182592417, 18.062561211518688, 66.57334182592417, 18.062561211518688, 66.57334182592417, 18.062561211518688, 66.57334182592417, 18.062561211518688, 76.15111116946328, 17.052755518091487, 57.61486236018485, 24.938602291638862, 46.96847824186204, 24.186962055645274, 59.649760157599935, 22.7065989316315, 68.82386458143823, 20.2991427445647, 77.67720101024237, 12.524524951711998, 58.5127465517246, 26.934761685919273, 70.96582559223425, 19.00394433712427, 57.61486236018485, 24.938602291638862, 59.649760157599935, 22.7065989316315, 68.98361949688429, 15.663618894049309, 78.88915167408233, 15.268908910780276, 75.26233570096727, 14.880599611134832, 60.736320721237696, 14.73770757712386], "B":[31.976918276185373, 10.900813131694747, 71.39010086004394, 10.058245499150306, 71.39010086004394, 10.058245499150306, 71.39010086004394, 10.058245499150306, 71.39010086004394, 10.058245499150306, 71.39010086004394, 10.058245499150306, 82.33579413399339, 4.627727026244515, 85.11623449523051, 3.373532948419311, 16.767335322880918, 18.089433578343442, 42.210805246318166, 17.94806349947833, 65.94675689282136, 10.48751598047864, 81.10277156528367, 5.317134657379532, 84.75725469505316, 3.1574393634075517, 79.9807327364562, 5.011346077558139, 85.11623449523051, 3.373532948419311, 42.210805246318166, 17.94806349947833, 70.42139026563389, 6.463956331739789, 82.9861331792802, 4.864843860559117, 83.47520170380326, 4.83297359823334, 69.73032569687132, 5.633341855293969], "N":[20.74350309004142, 11.500072698122281, 60.94145470084188, 12.668760825990308, 60.94145470084188, 12.668760825990308, 60.94145470084188, 12.668760825990308, 60.94145470084188, 12.668760825990308, 60.94145470084188, 12.668760825990308, 78.090077562623, 9.854771842756143, 41.27367286741777, 26.103704539103195, 48.238206140976565, 25.998102913690534, 53.804779231918, 20.68547523758959, 72.11142326879346, 13.34081474833778, 68.97295331318432, 22.554678475567158, 49.888904366734465, 22.886091933559968, 55.97155920999713, 26.565399955697764, 41.27367286741777, 26.103704539103195, 53.804779231918, 20.68547523758959, 66.33097751760948, 15.53459360817915, 74.93100076001558, 15.08864536858277, 68.84632102796058, 19.359706642211684, 54.9149458896442, 20.760869776099387], "D":[20.83689409423133, 10.69043254343647, 60.12131757039794, 14.87452857540271, 60.12131757039794, 14.87452857540271, 60.12131757039794, 14.87452857540271, 60.12131757039794, 14.87452857540271, 60.12131757039794, 14.87452857540271, 78.62253259579857, 7.622512353139992, 78.93956667661868, 9.978321143921205, 44.378547576764475, 23.272742573180164, 36.404880016113836, 17.120012971266878, 64.74729118999387, 16.524494250681286, 80.75305960824217, 7.666701104090743, 69.14554899548729, 17.646085885112296, 79.43353444159331, 10.382981652413187, 78.93956667661868, 9.978321143921205, 36.404880016113836, 17.120012971266878, 68.1296847277507, 10.158038140238432, 80.11398404143038, 8.560400449011437, 79.22880547175177, 9.717909631397266, 64.35137314196507, 12.085472855852911], "K":[33.36946347685798, 16.38693485793649, 77.41799341060033, 10.438295202162136, 77.41799341060033, 10.438295202162136, 77.41799341060033, 10.438295202162136, 77.41799341060033, 10.438295202162136, 77.41799341060033, 10.438295202162136, 82.58433125565551, 6.311937803624483, 80.64156989752212, 7.45811987318187, 28.15468285346538, 21.143348684864044, 56.81826173915687, 12.504808461257822, 61.1758486888635, 12.868475258663427, 73.01075534732273, 9.779413651729936, 77.94643940983214, 9.36842777135728, 83.18871730149893, 5.48429387609385, 80.64156989752212, 7.45811987318187, 56.81826173915687, 12.504808461257822, 72.15734331594197, 6.196813486480908, 85.04241626364963, 3.7547653302313013, 76.82552748558858, 6.880560218103401, 60.515516499061185, 8.22042248952327], "X":[31.873696556190964, 14.568821278742666, 73.9258584828044, 13.389019189355112, 73.9258584828044, 13.389019189355112, 73.9258584828044, 13.389019189355112, 73.9258584828044, 13.389019189355112, 73.9258584828044, 13.389019189355112, 46.27131207914839, 19.91710133306637, 70.96408838509234, 9.594482180695804, 33.56384480696779, 18.979163200066996, 46.03193878344786, 11.695530670230605, 48.16340062570671, 13.866497038759377, 59.88648623465295, 12.961778197235176, 29.4370013866321, 24.673205599573627, 28.213372244280155, 23.018543663822772, 70.96408838509234, 9.594482180695804, 46.03193878344786, 11.695530670230605, 80.01282552102506, 9.26706422173453, 79.81478869650775, 9.29286875646048, 65.71455170717454, 9.820165874437123, 51.012384869185446, 9.055677310058798], "S":[30.035245785329, 14.335150776373457, 56.59453139781921, 11.23053991698437, 56.59453139781921, 11.23053991698437, 56.59453139781921, 11.23053991698437, 56.59453139781921, 11.23053991698437, 56.59453139781921, 11.23053991698437, 65.34146548910687, 24.266251371596756, 77.21324047451009, 11.72001743753504, 30.919670255942865, 25.304525951293748, 58.70748532906902, 19.149501879726518, 80.69264171367594, 7.808348175364943, 78.92737405398216, 11.1586383789383, 72.62527986835663, 19.540035565454897, 72.036560175986, 19.324631941532683, 77.21324047451009, 11.72001743753504, 58.70748532906902, 19.149501879726518, 70.31856855684713, 11.728116572606321, 81.51646283526402, 8.260021609656587, 76.66575035723272, 7.604173087994394, 60.42592212664573, 11.31838440257719], "C":[39.07376559466777, 12.516055776593037, 52.348082468694216, 12.156746778851728, 52.348082468694216, 12.156746778851728, 52.348082468694216, 12.156746778851728, 52.348082468694216, 12.156746778851728, 52.348082468694216, 12.156746778851728, 25.171287102500294, 19.50334241431456, 53.86229037168352, 22.441745337081304, 12.557797214426024, 10.332919269741463, 45.57352611410064, 17.19133773614484, 44.76998805566073, 10.406518827051679, 17.930541758785132, 13.925923126844042, 50.88058026957692, 22.42278980359569, 18.761751648449156, 13.931664690471003, 53.86229037168352, 22.441745337081304, 45.57352611410064, 17.19133773614484, 76.72132201186248, 10.145371980094518, 81.28292588732494, 7.88835214297695, 82.20916961155231, 5.773461571253213, 80.67580217942132, 4.99189052196192] } ''' table = json.loads(data) xTable=[] yTable=[] probTable=[] for x in range(0,21): xTable.append(pyData[x].point[0]) yTable.append(pyData[x].point[1]) angles =[] for x in range(0, 5): index = (x * 4) + 1 angles.insert(x * 4, abs(math.degrees(math.atan((yTable[0] - yTable[index]) / (xTable[0] - xTable[index]))))) # Get the angles of each finger in sequential order for x in range(1, 6): for y in range(0, 3): index = (x * y) + 1 angles.insert(x * y + 1, abs(math.degrees(math.atan((yTable[index] - yTable[index + 1]) / (xTable[index] - xTable[index + 1]))))) for key2 in table: tScores=[] for x in range(0,20): tScores.append((angles[x]-table[key2][x*2])/table[key2][(x*2)+1]) tScores[x]=stats.t.sf(abs(tScores[x]), 2)*2 sum = 0 for x in tScores: sum+=x sum=sum/20 #print(key2) #print(tScores) #print("Prob of "+str(key2)+"="+str(sum)) probTable.append([key2,sum]) probTable=sorted(probTable, key=itemgetter(1),reverse = True) print(probTable) print(" ")
181.429825
808
0.806024
2,190
20,683
7.60137
0.380822
0.002523
0.005707
0.010212
0.252238
0.24539
0.235478
0.235478
0.235478
0.235478
0
0.826197
0.082
20,683
113
809
183.035398
0.050561
0.005512
0
0.102564
0
0.307692
0.918887
0.027135
0
0
0
0
0
1
0.102564
false
0
0.051282
0.064103
0.24359
0.038462
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
1
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
4d5cdf3138a77da466fc8f1ea593542843d39c96
73
py
Python
test_images/RandomMutateImage.py
vincentdavis/corrupt_image_finder
fcfe6d785f0a1cb6d3655058386ef523ae0fa838
[ "BSD-3-Clause" ]
null
null
null
test_images/RandomMutateImage.py
vincentdavis/corrupt_image_finder
fcfe6d785f0a1cb6d3655058386ef523ae0fa838
[ "BSD-3-Clause" ]
null
null
null
test_images/RandomMutateImage.py
vincentdavis/corrupt_image_finder
fcfe6d785f0a1cb6d3655058386ef523ae0fa838
[ "BSD-3-Clause" ]
null
null
null
im = open('006993_photoA.tif', 'rb') ord(im.read(1)) chr(ord(im.read(1)))
24.333333
36
0.643836
15
73
3.066667
0.666667
0.217391
0.391304
0.434783
0
0
0
0
0
0
0
0.117647
0.068493
73
3
37
24.333333
0.558824
0
0
0
0
0
0.256757
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
4d61c0269a68764f58464781237795b54ac48f47
21
py
Python
hello.py
fullchaos91/learn-python
17988140f038667a5ac5882361ece07de88983d0
[ "MIT" ]
1
2021-10-08T20:33:30.000Z
2021-10-08T20:33:30.000Z
hello.py
fullchaos91/learn-python
17988140f038667a5ac5882361ece07de88983d0
[ "MIT" ]
null
null
null
hello.py
fullchaos91/learn-python
17988140f038667a5ac5882361ece07de88983d0
[ "MIT" ]
null
null
null
print("print hello")
10.5
20
0.714286
3
21
5
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.095238
21
1
21
21
0.789474
0
0
0
0
0
0.52381
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
4dc23b9f860d1695abaab0a23ebc1f59c5ce34d5
666
py
Python
publication_backbone/models/determinant_model.py
Excentrics/publication-backbone
65c9820308b09a6ae1086c265f8d49e36f3724b9
[ "BSD-3-Clause" ]
6
2016-05-19T14:59:51.000Z
2020-03-19T10:08:29.000Z
publication_backbone/models/determinant_model.py
Excentrics/publication-backbone
65c9820308b09a6ae1086c265f8d49e36f3724b9
[ "BSD-3-Clause" ]
null
null
null
publication_backbone/models/determinant_model.py
Excentrics/publication-backbone
65c9820308b09a6ae1086c265f8d49e36f3724b9
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ This overrides the Rubric with the class loaded from the PUBLICATION_BACKBONE_DETERMINANT_MODEL setting if it exists. """ from django.conf import settings from publication_backbone.utils.loader import load_class #============================================================================== # Extensibility #============================================================================== DETERMINANT_MODEL = getattr(settings, 'PUBLICATION_BACKBONE_DETERMINANT_MODEL', 'publication_backbone.models.defaults.rubricator.determinant.Determinant') Determinant = load_class(DETERMINANT_MODEL, 'PUBLICATION_BACKBONE_DETERMINANT_MODEL')
35.052632
85
0.624625
59
666
6.79661
0.525424
0.236908
0.224439
0.261845
0
0
0
0
0
0
0
0.001629
0.078078
666
18
86
37
0.651466
0.465465
0
0
0
0
0.428571
0.428571
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
4dd11a964b75cb54571074f3994d4b39f38e68c2
98
py
Python
indigo/admin.py
OpenDataServices/indigo-app
db41caa4f6f115d47c1dab465361f7b7e44c6807
[ "MIT" ]
1
2020-08-06T09:11:06.000Z
2020-08-06T09:11:06.000Z
indigo/admin.py
INDIGO-Initiative/database-app
0bb8ef553ea01b6e3cc8ce045322b3337cb2364a
[ "MIT" ]
61
2020-07-02T17:23:04.000Z
2022-03-25T16:45:56.000Z
indigo/admin.py
OpenDataServices/indigo-app
db41caa4f6f115d47c1dab465361f7b7e44c6807
[ "MIT" ]
null
null
null
from django.contrib import admin from indigo.models import Sandbox admin.site.register(Sandbox)
16.333333
33
0.826531
14
98
5.785714
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.112245
98
5
34
19.6
0.931034
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
12905c7be27fa9c2d267d9cd325278c25ce45f4b
82
py
Python
bin/edux_scraper.py
palicand/edux_scraper
9f1acf3d582199924d9993a74ae6b62274385d10
[ "MIT" ]
null
null
null
bin/edux_scraper.py
palicand/edux_scraper
9f1acf3d582199924d9993a74ae6b62274385d10
[ "MIT" ]
null
null
null
bin/edux_scraper.py
palicand/edux_scraper
9f1acf3d582199924d9993a74ae6b62274385d10
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 __author__ = 'Andrej Palicka <andrej.palicka@merck.com>'
16.4
56
0.731707
11
82
5.090909
0.818182
0.464286
0
0
0
0
0
0
0
0
0
0.013699
0.109756
82
4
57
20.5
0.753425
0.256098
0
0
0
0
0.706897
0.448276
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
12a062fba4c209b6f50c6b0fd8be64693e32bf6f
64
py
Python
src/profiler.py
mjvogelsong/synapse
e76b385e1681c1721edc09cdf5b5ef7944d08a28
[ "MIT" ]
null
null
null
src/profiler.py
mjvogelsong/synapse
e76b385e1681c1721edc09cdf5b5ef7944d08a28
[ "MIT" ]
null
null
null
src/profiler.py
mjvogelsong/synapse
e76b385e1681c1721edc09cdf5b5ef7944d08a28
[ "MIT" ]
null
null
null
import cProfile def profile(string): cProfile.run(string)
12.8
22
0.734375
8
64
5.875
0.75
0
0
0
0
0
0
0
0
0
0
0
0.171875
64
4
23
16
0.886792
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
5
12a8e6801f3e67eb6f8b25a17c01a9b09d6c3134
126
py
Python
app/routes/__init__.py
gabrieldosprazeres/e-plus
0cd2cf77a2be5ac5b577e22c64f78180d3f5ff69
[ "MIT" ]
null
null
null
app/routes/__init__.py
gabrieldosprazeres/e-plus
0cd2cf77a2be5ac5b577e22c64f78180d3f5ff69
[ "MIT" ]
null
null
null
app/routes/__init__.py
gabrieldosprazeres/e-plus
0cd2cf77a2be5ac5b577e22c64f78180d3f5ff69
[ "MIT" ]
null
null
null
from flask import Flask from app.routes.api_route import bp_api def init_app(app: Flask): app.register_blueprint(bp_api)
21
39
0.793651
22
126
4.318182
0.545455
0.105263
0
0
0
0
0
0
0
0
0
0
0.134921
126
5
40
25.2
0.87156
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.5
0
0.75
0.25
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
5
12aaf8df37e4b068b7bc123dee6391d8b8e2029f
155
py
Python
tests/BaseTest.py
Gawaboumga/PyMatex
3ccc0aa23211a064aa31a9b509b108cd606a4992
[ "MIT" ]
1
2019-03-05T09:45:04.000Z
2019-03-05T09:45:04.000Z
tests/BaseTest.py
Gawaboumga/PyMatex
3ccc0aa23211a064aa31a9b509b108cd606a4992
[ "MIT" ]
null
null
null
tests/BaseTest.py
Gawaboumga/PyMatex
3ccc0aa23211a064aa31a9b509b108cd606a4992
[ "MIT" ]
null
null
null
from pymatex.listener import MatexAST import unittest class BaseTest(unittest.TestCase): def parse(self, text): return MatexAST.parse(text)
17.222222
37
0.741935
19
155
6.052632
0.736842
0
0
0
0
0
0
0
0
0
0
0
0.180645
155
8
38
19.375
0.905512
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.4
0.2
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
1
0
0
5
12c37b858596691aacb370c2f67292d7fbc4c0e0
105
py
Python
game/game_code/tests/__init__.py
RDGT/adventure-poc
e211491e5958d12a3347b3e279006d915d691d20
[ "MIT" ]
2
2018-04-23T15:03:41.000Z
2018-07-18T06:36:51.000Z
game/game_code/tests/__init__.py
RDGT/adventure-poc
e211491e5958d12a3347b3e279006d915d691d20
[ "MIT" ]
6
2018-03-25T12:04:27.000Z
2018-09-14T09:08:34.000Z
game/game_code/tests/__init__.py
RDGT/adventure-poc
e211491e5958d12a3347b3e279006d915d691d20
[ "MIT" ]
1
2018-07-22T09:46:55.000Z
2018-07-22T09:46:55.000Z
from test_level_1 import TestAdventureLevelOne from test_functionality import TestAdventureFunctionality
35
57
0.92381
11
105
8.545455
0.727273
0.170213
0
0
0
0
0
0
0
0
0
0.010309
0.07619
105
2
58
52.5
0.958763
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
12d421fcad0164987a62d1569685bc6b04b8b71c
187
py
Python
petit_interfacer/__init__.py
Plawn/petit_transformer
45c369339af65846038040ed4e580472363c27a6
[ "Apache-2.0" ]
null
null
null
petit_interfacer/__init__.py
Plawn/petit_transformer
45c369339af65846038040ed4e580472363c27a6
[ "Apache-2.0" ]
null
null
null
petit_interfacer/__init__.py
Plawn/petit_transformer
45c369339af65846038040ed4e580472363c27a6
[ "Apache-2.0" ]
null
null
null
from .prototype_transformer import interface_binder_for, transformer_from_prototype from .utils import BlindBind, RealOptional, Remove, ClassProxyTest, Dataclass from . import exceptions
46.75
83
0.86631
21
187
7.47619
0.666667
0.165605
0
0
0
0
0
0
0
0
0
0
0.090909
187
3
84
62.333333
0.923529
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
42034e637dc3d3fcdf025f067706cfbaa34b367d
340
py
Python
y/google-cloud-sdk/lib/googlecloudapis/compute/alpha/__init__.py
ychen820/microblog
d379afa2db3582d5c3be652165f0e9e2e0c154c6
[ "BSD-3-Clause" ]
null
null
null
y/google-cloud-sdk/lib/googlecloudapis/compute/alpha/__init__.py
ychen820/microblog
d379afa2db3582d5c3be652165f0e9e2e0c154c6
[ "BSD-3-Clause" ]
null
null
null
y/google-cloud-sdk/lib/googlecloudapis/compute/alpha/__init__.py
ychen820/microblog
d379afa2db3582d5c3be652165f0e9e2e0c154c6
[ "BSD-3-Clause" ]
2
2020-07-25T05:03:06.000Z
2020-11-04T04:55:57.000Z
"""Common imports for generated compute client library.""" # pylint:disable=wildcard-import import pkgutil from googlecloudapis.apitools.base.py import * from googlecloudapis.compute.alpha.compute_alpha_client import * from googlecloudapis.compute.alpha.compute_alpha_messages import * __path__ = pkgutil.extend_path(__path__, __name__)
30.909091
66
0.829412
41
340
6.463415
0.536585
0.181132
0.188679
0.241509
0.369811
0.369811
0.369811
0
0
0
0
0
0.088235
340
10
67
34
0.854839
0.247059
0
0
1
0
0
0
0
0
0
0
0
1
0
false
0
0.8
0
0.8
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
1
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
4261012c85e05ef0b23ea2334f03f52daf0f8e25
27
py
Python
state_machine/src/states/__init__.py
Thedush/ChatBot
d82042649d994c4763a0d5200fb6d43d3c1066c4
[ "BSD-3-Clause" ]
null
null
null
state_machine/src/states/__init__.py
Thedush/ChatBot
d82042649d994c4763a0d5200fb6d43d3c1066c4
[ "BSD-3-Clause" ]
null
null
null
state_machine/src/states/__init__.py
Thedush/ChatBot
d82042649d994c4763a0d5200fb6d43d3c1066c4
[ "BSD-3-Clause" ]
1
2021-11-10T11:56:53.000Z
2021-11-10T11:56:53.000Z
from face_rec.srv import *
13.5
26
0.777778
5
27
4
1
0
0
0
0
0
0
0
0
0
0
0
0.148148
27
1
27
27
0.869565
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
429673f901445410fb23f45c537d8ef7d6213883
159
py
Python
tests/ops/test_zero.py
wesselb/matrix
ba343d69945d7cbc67330d01a87eee363ce5d408
[ "MIT" ]
3
2021-07-30T17:38:08.000Z
2021-11-21T04:41:40.000Z
tests/ops/test_zero.py
wesselb/matrix
ba343d69945d7cbc67330d01a87eee363ce5d408
[ "MIT" ]
null
null
null
tests/ops/test_zero.py
wesselb/matrix
ba343d69945d7cbc67330d01a87eee363ce5d408
[ "MIT" ]
null
null
null
import lab as B # noinspection PyUnresolvedReferences from ..util import approx, check_un_op, dense1 def test_zero(dense1): check_un_op(B.zero, dense1)
17.666667
46
0.773585
24
159
4.916667
0.666667
0.118644
0.152542
0
0
0
0
0
0
0
0
0.022222
0.150943
159
8
47
19.875
0.851852
0.220126
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.5
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
5
42af6fcd5764ca416e56a4c7566c7148adfa4118
98
py
Python
snakeplane/__init__.py
cpitts1/snakeplane
1b69a6b5695049f91272a1dd3389a6bcf0496b73
[ "Apache-2.0" ]
27
2019-03-14T15:58:00.000Z
2022-01-10T12:11:12.000Z
snakeplane/__init__.py
cpitts1/snakeplane
1b69a6b5695049f91272a1dd3389a6bcf0496b73
[ "Apache-2.0" ]
13
2019-04-04T17:57:19.000Z
2021-05-11T03:43:14.000Z
snakeplane/__init__.py
cpitts1/snakeplane
1b69a6b5695049f91272a1dd3389a6bcf0496b73
[ "Apache-2.0" ]
16
2019-03-15T03:40:07.000Z
2022-02-19T10:30:32.000Z
"""Snakeplane Alteryx Designer Python SDK Abstraction Layer.""" from .version import __version__
24.5
63
0.795918
11
98
6.727273
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.122449
98
3
64
32.666667
0.860465
0.581633
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
c415ba308d74882e940ea14a2fb12b2bc77f0050
11,559
py
Python
rosbridge_library/test/internal/test_ros_loader.py
denesh-globotix/rosbridge_suite
fbefbe20ed64ee658e4391a74f1b76bb5149c42a
[ "BSD-3-Clause" ]
null
null
null
rosbridge_library/test/internal/test_ros_loader.py
denesh-globotix/rosbridge_suite
fbefbe20ed64ee658e4391a74f1b76bb5149c42a
[ "BSD-3-Clause" ]
null
null
null
rosbridge_library/test/internal/test_ros_loader.py
denesh-globotix/rosbridge_suite
fbefbe20ed64ee658e4391a74f1b76bb5149c42a
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import sys import rospy import rosunit import unittest from rosbridge_library.internal import ros_loader PKG = 'rosbridge_library' NAME = 'test_ros_loader' class TestROSLoader(unittest.TestCase): def setUp(self): rospy.init_node(NAME) def test_bad_msgnames(self): bad = ["", "/", "//", "///", "////", "/////", "bad", "stillbad", "not/better/still", "not//better//still", "not///better///still", "better/", "better//", "better///", "/better", "//better", "///better", "this\isbad", "\\"] for x in bad: self.assertRaises(ros_loader.InvalidTypeStringException, ros_loader.get_message_class, x) self.assertRaises(ros_loader.InvalidTypeStringException, ros_loader.get_message_instance, x) def test_irregular_msgnames(self): irregular = ["std_msgs//String", "//std_msgs/String", "/std_msgs//String", "/std_msgs/String", "//std_msgs//String", "/std_msgs/String/", "//std_msgs//String//", "std_msgs/String/", "std_msgs//String//"] for x in irregular: self.assertNotEqual(ros_loader.get_message_class(x), None) self.assertNotEqual(ros_loader.get_message_instance(x), None) def test_std_msgnames(self): stdmsgs = ["std_msgs/Bool", "std_msgs/Byte", "std_msgs/ByteMultiArray", "std_msgs/ColorRGBA", "std_msgs/Duration", "std_msgs/Empty", "std_msgs/Float32", "std_msgs/Float32MultiArray", "std_msgs/Float64", "std_msgs/Header", "std_msgs/Int16", "std_msgs/Int16MultiArray", "std_msgs/Int32", "std_msgs/Int32MultiArray", "std_msgs/Int64", "std_msgs/Int64MultiArray", "std_msgs/Int8", "std_msgs/Int8MultiArray", "std_msgs/MultiArrayDimension", "std_msgs/MultiArrayLayout", "std_msgs/String", "std_msgs/Time", "std_msgs/UInt16", "std_msgs/UInt16MultiArray", "std_msgs/UInt32MultiArray", "std_msgs/UInt64MultiArray", "std_msgs/UInt32", "std_msgs/UInt64", "std_msgs/UInt8", "std_msgs/UInt8MultiArray"] for x in stdmsgs: self.assertNotEqual(ros_loader.get_message_class(x), None) inst = ros_loader.get_message_instance(x) self.assertNotEqual(inst, None) self.assertEqual(x, inst._type) def test_msg_cache(self): stdmsgs = ["std_msgs/Bool", "std_msgs/Byte", "std_msgs/ByteMultiArray", "std_msgs/ColorRGBA", "std_msgs/Duration", "std_msgs/Empty", "std_msgs/Float32", "std_msgs/Float32MultiArray", "std_msgs/Float64", "std_msgs/Header", "std_msgs/Int16", "std_msgs/Int16MultiArray", "std_msgs/Int32", "std_msgs/Int32MultiArray", "std_msgs/Int64", "std_msgs/Int64MultiArray", "std_msgs/Int8", "std_msgs/Int8MultiArray", "std_msgs/MultiArrayDimension", "std_msgs/MultiArrayLayout", "std_msgs/String", "std_msgs/Time", "std_msgs/UInt16", "std_msgs/UInt16MultiArray", "std_msgs/UInt32MultiArray", "std_msgs/UInt64MultiArray", "std_msgs/UInt32", "std_msgs/UInt64", "std_msgs/UInt8", "std_msgs/UInt8MultiArray"] for x in stdmsgs: self.assertNotEqual(ros_loader.get_message_class(x), None) inst = ros_loader.get_message_instance(x) self.assertNotEqual(inst, None) self.assertEqual(x, inst._type) self.assertTrue(x in ros_loader._loaded_msgs) def test_assorted_msgnames(self): assortedmsgs = ["geometry_msgs/Pose", "actionlib_msgs/GoalStatus", "geometry_msgs/WrenchStamped", "stereo_msgs/DisparityImage", "nav_msgs/OccupancyGrid", "geometry_msgs/Point32", "std_msgs/String", "trajectory_msgs/JointTrajectoryPoint", "diagnostic_msgs/KeyValue", "visualization_msgs/InteractiveMarkerUpdate", "nav_msgs/GridCells", "sensor_msgs/PointCloud2"] for x in assortedmsgs: self.assertNotEqual(ros_loader.get_message_class(x), None) inst = ros_loader.get_message_instance(x) self.assertNotEqual(inst, None) self.assertEqual(x, inst._type) def test_invalid_msgnames_primitives(self): invalid = ["bool", "int8", "uint8", "int16", "uint16", "int32", "uint32", "int64", "uint64", "float32", "float64", "string", "time", "duration"] for x in invalid: self.assertRaises(ros_loader.InvalidTypeStringException, ros_loader.get_message_class, x) self.assertRaises(ros_loader.InvalidTypeStringException, ros_loader.get_message_instance, x) def test_nonexistent_packagenames(self): nonexistent = ["wangle_msgs/Jam", "whistleblower_msgs/Document", "sexual_harrassment_msgs/UnwantedAdvance", "coercion_msgs/Bribe", "airconditioning_msgs/Cold", "pr2thoughts_msgs/Escape"] for x in nonexistent: self.assertRaises(ros_loader.InvalidPackageException, ros_loader.get_message_class, x) self.assertRaises(ros_loader.InvalidPackageException, ros_loader.get_message_instance, x) def test_packages_without_msgs(self): no_msgs = ["roslib/Time", "roslib/Duration", "roslib/Header", "std_srvs/ConflictedMsg", "topic_tools/MessageMessage"] for x in no_msgs: self.assertRaises(ros_loader.InvalidModuleException, ros_loader.get_message_class, x) self.assertRaises(ros_loader.InvalidModuleException, ros_loader.get_message_instance, x) def test_nonexistent_msg_classnames(self): nonexistent = ["roscpp/Time", "roscpp/Duration", "roscpp/Header", "rospy/Time", "rospy/Duration", "rospy/Header", "std_msgs/Spool", "geometry_msgs/Tetrahedron", "sensor_msgs/TelepathyUnit"] for x in nonexistent: self.assertRaises(ros_loader.InvalidClassException, ros_loader.get_message_class, x) self.assertRaises(ros_loader.InvalidClassException, ros_loader.get_message_instance, x) def test_bad_servicenames(self): bad = ["", "/", "//", "///", "////", "/////", "bad", "stillbad", "not/better/still", "not//better//still", "not///better///still", "better/", "better//", "better///", "/better", "//better", "///better", "this\isbad", "\\"] for x in bad: self.assertRaises(ros_loader.InvalidTypeStringException, ros_loader.get_service_class, x) self.assertRaises(ros_loader.InvalidTypeStringException, ros_loader.get_service_instance, x) self.assertRaises(ros_loader.InvalidTypeStringException, ros_loader.get_service_request_instance, x) self.assertRaises(ros_loader.InvalidTypeStringException, ros_loader.get_service_response_instance, x) def test_irregular_servicenames(self): irregular = ["roscpp//GetLoggers", "/roscpp/GetLoggers/", "/roscpp/GetLoggers", "//roscpp/GetLoggers", "/roscpp//GetLoggers", "roscpp/GetLoggers//", "/roscpp/GetLoggers//", "roscpp/GetLoggers/", "roscpp//GetLoggers//"] for x in irregular: self.assertNotEqual(ros_loader.get_service_class(x), None) self.assertNotEqual(ros_loader.get_service_instance(x), None) self.assertNotEqual(ros_loader.get_service_request_instance(x), None) self.assertNotEqual(ros_loader.get_service_response_instance(x), None) def test_common_servicenames(self): common = ["roscpp/GetLoggers", "roscpp/SetLoggerLevel", "std_srvs/Empty", "nav_msgs/GetMap", "nav_msgs/GetPlan", "sensor_msgs/SetCameraInfo", "topic_tools/MuxAdd", "topic_tools/MuxSelect", "tf2_msgs/FrameGraph", "rospy_tutorials/BadTwoInts", "rospy_tutorials/AddTwoInts"] for x in common: self.assertNotEqual(ros_loader.get_service_class(x), None) self.assertNotEqual(ros_loader.get_service_instance(x), None) self.assertNotEqual(ros_loader.get_service_request_instance(x), None) self.assertNotEqual(ros_loader.get_service_response_instance(x), None) self.assertEqual(x, ros_loader.get_service_instance(x)._type) def test_srv_cache(self): common = ["roscpp/GetLoggers", "roscpp/SetLoggerLevel", "std_srvs/Empty", "nav_msgs/GetMap", "nav_msgs/GetPlan", "sensor_msgs/SetCameraInfo", "topic_tools/MuxAdd", "topic_tools/MuxSelect", "tf2_msgs/FrameGraph", "rospy_tutorials/BadTwoInts", "rospy_tutorials/AddTwoInts"] for x in common: self.assertNotEqual(ros_loader.get_service_class(x), None) self.assertNotEqual(ros_loader.get_service_instance(x), None) self.assertNotEqual(ros_loader.get_service_request_instance(x), None) self.assertNotEqual(ros_loader.get_service_response_instance(x), None) self.assertTrue(x in ros_loader._loaded_srvs) def test_packages_without_srvs(self): no_msgs = ["roslib/A", "roslib/B", "roslib/C", "std_msgs/CuriousSrv"] for x in no_msgs: self.assertRaises(ros_loader.InvalidModuleException, ros_loader.get_service_class, x) self.assertRaises(ros_loader.InvalidModuleException, ros_loader.get_service_instance, x) self.assertRaises(ros_loader.InvalidModuleException, ros_loader.get_service_request_instance, x) self.assertRaises(ros_loader.InvalidModuleException, ros_loader.get_service_response_instance, x) def test_nonexistent_service_packagenames(self): nonexistent = ["butler_srvs/FetchDrink", "money_srvs/MoreMoney", "snoopdogg_srvs/SipOnGinAndJuice", "revenge_srvs/BackStab"] for x in nonexistent: self.assertRaises(ros_loader.InvalidPackageException, ros_loader.get_service_class, x) self.assertRaises(ros_loader.InvalidPackageException, ros_loader.get_service_instance, x) self.assertRaises(ros_loader.InvalidPackageException, ros_loader.get_service_request_instance, x) self.assertRaises(ros_loader.InvalidPackageException, ros_loader.get_service_response_instance, x) def test_nonexistent_service_classnames(self): nonexistent = ["std_srvs/KillAllHumans", "std_srvs/Full", "rospy_tutorials/SubtractTwoInts", "nav_msgs/LoseMap", "topic_tools/TellMeWhatThisTopicIsActuallyAbout"] for x in nonexistent: self.assertRaises(ros_loader.InvalidClassException, ros_loader.get_service_class, x) self.assertRaises(ros_loader.InvalidClassException, ros_loader.get_service_instance, x) self.assertRaises(ros_loader.InvalidClassException, ros_loader.get_service_request_instance, x) self.assertRaises(ros_loader.InvalidClassException, ros_loader.get_service_response_instance, x) if __name__ == '__main__': rosunit.unitrun(PKG, NAME, TestROSLoader)
51.602679
82
0.646596
1,205
11,559
5.897095
0.147718
0.097523
0.07937
0.07754
0.772587
0.76752
0.761328
0.750493
0.741768
0.719251
0
0.010437
0.237391
11,559
223
83
51.834081
0.795689
0.00173
0
0.664975
0
0
0.278669
0.126636
0
0
0
0
0.263959
1
0.086294
false
0
0.025381
0
0.116751
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
c420a4fc97f8f40e43a86db5114368d7f54b5c1a
143
py
Python
locale/pot/api/core/_autosummary/pyvista-Camera-distance-1.py
tkoyama010/pyvista-doc-translations
23bb813387b7f8bfe17e86c2244d5dd2243990db
[ "MIT" ]
4
2020-08-07T08:19:19.000Z
2020-12-04T09:51:11.000Z
locale/pot/api/core/_autosummary/pyvista-Camera-distance-1.py
tkoyama010/pyvista-doc-translations
23bb813387b7f8bfe17e86c2244d5dd2243990db
[ "MIT" ]
19
2020-08-06T00:24:30.000Z
2022-03-30T19:22:24.000Z
locale/pot/api/core/_autosummary/pyvista-Camera-distance-1.py
tkoyama010/pyvista-doc-translations
23bb813387b7f8bfe17e86c2244d5dd2243990db
[ "MIT" ]
1
2021-03-09T07:50:40.000Z
2021-03-09T07:50:40.000Z
import pyvista pl = pyvista.Plotter() pl.camera.distance # Expected: ## 1.73205 pl.camera.distance = 2.0 pl.camera.distance # Expected: ## 2.0
14.3
24
0.72028
22
143
4.681818
0.5
0.23301
0.466019
0.466019
0
0
0
0
0
0
0
0.08
0.125874
143
9
25
15.888889
0.744
0.216783
0
0.4
0
0
0
0
0
0
0
0
0
1
0
false
0
0.2
0
0.2
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
c437940ad4f23a82022b26418c701b3ada62636f
57
py
Python
onesecmail/__init__.py
DaSh-More/OneSecMail
446eb28841f69f682dde1db6da5fc45ad7b644ab
[ "MIT" ]
null
null
null
onesecmail/__init__.py
DaSh-More/OneSecMail
446eb28841f69f682dde1db6da5fc45ad7b644ab
[ "MIT" ]
null
null
null
onesecmail/__init__.py
DaSh-More/OneSecMail
446eb28841f69f682dde1db6da5fc45ad7b644ab
[ "MIT" ]
null
null
null
from .mail import Mail, get_domain_list, get_random_mail
28.5
56
0.842105
10
57
4.4
0.7
0
0
0
0
0
0
0
0
0
0
0
0.105263
57
1
57
57
0.862745
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
c44c4c1ef716d3f13ec61cb50b3dd2e3db06a388
638
py
Python
alpyro_msgs/geometry_msgs/twiststamped.py
rho2/alpyro_msgs
b5a680976c40c83df70d61bb2db1de32a1cde8d3
[ "MIT" ]
1
2020-12-13T13:07:10.000Z
2020-12-13T13:07:10.000Z
alpyro_msgs/geometry_msgs/twiststamped.py
rho2/alpyro_msgs
b5a680976c40c83df70d61bb2db1de32a1cde8d3
[ "MIT" ]
null
null
null
alpyro_msgs/geometry_msgs/twiststamped.py
rho2/alpyro_msgs
b5a680976c40c83df70d61bb2db1de32a1cde8d3
[ "MIT" ]
null
null
null
from alpyro_msgs import RosMessage from alpyro_msgs.geometry_msgs.twist import Twist from alpyro_msgs.std_msgs.header import Header class TwistStamped(RosMessage): __msg_typ__ = "geometry_msgs/TwistStamped" __msg_def__ = "c3RkX21zZ3MvSGVhZGVyIGhlYWRlcgogIHVpbnQzMiBzZXEKICB0aW1lIHN0YW1wCiAgc3RyaW5nIGZyYW1lX2lkCmdlb21ldHJ5X21zZ3MvVHdpc3QgdHdpc3QKICBnZW9tZXRyeV9tc2dzL1ZlY3RvcjMgbGluZWFyCiAgICBmbG9hdDY0IHgKICAgIGZsb2F0NjQgeQogICAgZmxvYXQ2NCB6CiAgZ2VvbWV0cnlfbXNncy9WZWN0b3IzIGFuZ3VsYXIKICAgIGZsb2F0NjQgeAogICAgZmxvYXQ2NCB5CiAgICBmbG9hdDY0IHoKCg==" __md5_sum__ = "98d34b0043a2093cf9d9345ab6eef12e" header: Header twist: Twist
49.076923
342
0.904389
39
638
14.25641
0.461538
0.053957
0.07554
0
0
0
0
0
0
0
0
0.107023
0.062696
638
12
343
53.166667
0.822742
0
0
0
0
0
0.598746
0.598746
0
1
0
0
0
1
0
false
0
0.333333
0
1
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
null
1
0
0
0
0
0
0
0
1
0
1
0
0
5
c4507f1820c84329d94191b5327b0528c2debb4b
101
py
Python
bookmate/__init__.py
Rpsl/bookmate_downloader
0a586f83639e5ea7520d5b3de663ab1e923e7d90
[ "MIT" ]
null
null
null
bookmate/__init__.py
Rpsl/bookmate_downloader
0a586f83639e5ea7520d5b3de663ab1e923e7d90
[ "MIT" ]
null
null
null
bookmate/__init__.py
Rpsl/bookmate_downloader
0a586f83639e5ea7520d5b3de663ab1e923e7d90
[ "MIT" ]
1
2019-10-07T10:35:41.000Z
2019-10-07T10:35:41.000Z
from .book import BookDownloader from .downloader import Downloader from .parser import ScriptParser
25.25
34
0.851485
12
101
7.166667
0.583333
0
0
0
0
0
0
0
0
0
0
0
0.118812
101
3
35
33.666667
0.966292
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
c45cabc07b3f7d248b135302df37f3315acb595a
4,040
py
Python
signals/divergence.py
lorne-luo/venom
bf6379d9a40dd81f1e01cc230a4eae93452c0f18
[ "Unlicense", "MIT" ]
null
null
null
signals/divergence.py
lorne-luo/venom
bf6379d9a40dd81f1e01cc230a4eae93452c0f18
[ "Unlicense", "MIT" ]
null
null
null
signals/divergence.py
lorne-luo/venom
bf6379d9a40dd81f1e01cc230a4eae93452c0f18
[ "Unlicense", "MIT" ]
1
2021-05-11T09:57:38.000Z
2021-05-11T09:57:38.000Z
import numpy as np from datetime import datetime, timedelta import talib from scipy.signal import argrelmin, argrelmax from binance_client.constants import OrderSide, SignalDirection def short_divergence(prices, indicators): """ :return: direction, len(prices) - 3, [33,34] """ prices = np.array(prices) indicators = np.array(indicators) (rsi_max_indexes,) = argrelmax(indicators) current_index = len(prices) - 3 if len(rsi_max_indexes) < 2: return current_index, [] reversal_start_indexes = [] continue_start_indexes = [] # short divergence if rsi_max_indexes[-1] == current_index: for i in range(-2, -1 * (len(rsi_max_indexes) + 1), -1): if not indicators[rsi_max_indexes[i]]: break # indicator is None if current_index - rsi_max_indexes[i] < 4: continue # too close # short reversal divergence if prices[current_index] > prices[rsi_max_indexes[i]] and \ indicators[current_index] < indicators[rsi_max_indexes[i]]: if not check_price_cross(SignalDirection.SHORT, prices[rsi_max_indexes[i]:current_index + 1]): reversal_start_indexes.append(rsi_max_indexes[i]) # hidden continue divergence if prices[current_index] < prices[rsi_max_indexes[i]] and \ indicators[current_index] > indicators[rsi_max_indexes[i]]: if not check_price_cross(SignalDirection.SHORT, prices[rsi_max_indexes[i]:current_index + 1]): continue_start_indexes.append(rsi_max_indexes[i]) return current_index, reversal_start_indexes, continue_start_indexes def long_divergence(prices, indicators): """ :return: direction, len(prices) - 3, [33,34] """ prices = np.array(prices) indicators = np.array(indicators) (rsi_min_indexes,) = argrelmin(indicators) current_index = len(prices) - 3 if len(rsi_min_indexes) < 2: return current_index, [] reversal_start_indexes = [] continue_start_indexes = [] # long divergence if rsi_min_indexes[-1] == current_index: for i in range(-2, -1 * (len(rsi_min_indexes) + 1), -1): if not indicators[rsi_min_indexes[i]]: break # indicator is None if current_index - rsi_min_indexes[i] < 4: continue # too close # long reversal divergence if prices[current_index] < prices[rsi_min_indexes[i]] and \ indicators[current_index] > indicators[rsi_min_indexes[i]]: if not check_price_cross(SignalDirection.LONG, prices[rsi_min_indexes[i]:current_index + 1]): reversal_start_indexes.append(rsi_min_indexes[i]) # hidden continue divergence if prices[current_index] > prices[rsi_min_indexes[i]] and \ indicators[current_index] < indicators[rsi_min_indexes[i]]: if not check_price_cross(SignalDirection.LONG, prices[rsi_min_indexes[i]:current_index + 1]): continue_start_indexes.append(rsi_min_indexes[i]) return current_index, reversal_start_indexes, continue_start_indexes def check_price_cross(direction, prices): """ LONG: cant be lower SHORT: cant be higher """ count = len(prices) slope = (prices[-1] - prices[0]) / (count - 1) if direction == SignalDirection.LONG: if prices[0] > prices[1] or prices[count - 3] < prices[-1]: return True elif direction == SignalDirection.SHORT: if prices[0] < prices[1] or prices[count - 3] > prices[-1]: return True for i in range(2, count - 2): compare_value = slope * i + prices[0] if direction == SignalDirection.LONG: if prices[i] < compare_value: return True elif direction == SignalDirection.SHORT: if prices[i] > compare_value: return True return False
38.113208
110
0.629455
489
4,040
4.9591
0.149284
0.108866
0.075052
0.057732
0.826392
0.818969
0.773608
0.728247
0.68701
0.654021
0
0.014966
0.272277
4,040
105
111
38.47619
0.809864
0.081188
0
0.422535
0
0
0
0
0
0
0
0
0
1
0.042254
false
0
0.070423
0
0.239437
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
6718cf8608c2b173e1778dec9439dfafdf419a72
17
py
Python
Projects_in_Python/sample/sample.py
SCHW18TZ/Mini_Python_Projects
8c973ef8d8282f7f558bf47541b1776e3f19ec14
[ "MIT" ]
null
null
null
Projects_in_Python/sample/sample.py
SCHW18TZ/Mini_Python_Projects
8c973ef8d8282f7f558bf47541b1776e3f19ec14
[ "MIT" ]
null
null
null
Projects_in_Python/sample/sample.py
SCHW18TZ/Mini_Python_Projects
8c973ef8d8282f7f558bf47541b1776e3f19ec14
[ "MIT" ]
null
null
null
print("sample")
8.5
16
0.647059
2
17
5.5
1
0
0
0
0
0
0
0
0
0
0
0
0.117647
17
1
17
17
0.733333
0
0
0
0
0
0.375
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
6748f91f70f5133d853737e9fd9e1d23660ffcbc
123
py
Python
measure.py
sq-meng/autogauss
b9c8f479e653da145508f7c8be0a142c5937cb05
[ "MIT" ]
null
null
null
measure.py
sq-meng/autogauss
b9c8f479e653da145508f7c8be0a142c5937cb05
[ "MIT" ]
null
null
null
measure.py
sq-meng/autogauss
b9c8f479e653da145508f7c8be0a142c5937cb05
[ "MIT" ]
null
null
null
import aglib # aglib.scan([1, 1, 0], 'sample.txt') aglib.scan([0, 0, 20], '2020-5-9--12n.txt') input('Enter to exit...')
17.571429
43
0.593496
23
123
3.173913
0.695652
0.246575
0
0
0
0
0
0
0
0
0
0.140187
0.130081
123
7
44
17.571429
0.542056
0.284553
0
0
0
0
0.37931
0
0
0
0
0
0
1
0
true
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
1
0
1
0
0
0
0
5
675be9215468bdecd34395eae0cf4ee055168944
94
py
Python
fairy_admin/rbac/views/__init__.py
lvqier/fairy-admin
50e3d0b2ddcfbd6411280b538f46b57895a5d4f8
[ "MIT" ]
2
2020-09-24T10:12:23.000Z
2021-01-27T13:27:53.000Z
fairy_admin/rbac/views/__init__.py
lvqier/fairy-admin
50e3d0b2ddcfbd6411280b538f46b57895a5d4f8
[ "MIT" ]
null
null
null
fairy_admin/rbac/views/__init__.py
lvqier/fairy-admin
50e3d0b2ddcfbd6411280b538f46b57895a5d4f8
[ "MIT" ]
null
null
null
from .user import UserView from .role import RoleView from .permission import PermissionView
18.8
38
0.829787
12
94
6.5
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.138298
94
4
39
23.5
0.962963
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
6767efc201cef1694cb58006a396af7ac3d24f85
102
py
Python
Pacote download/PythonExercíciosHARDMODE/ex024HM.py
RodrigoMASRamos/Projects.py
ed15981b320914c9667305dcd5fb5b7906fd9b00
[ "MIT" ]
null
null
null
Pacote download/PythonExercíciosHARDMODE/ex024HM.py
RodrigoMASRamos/Projects.py
ed15981b320914c9667305dcd5fb5b7906fd9b00
[ "MIT" ]
null
null
null
Pacote download/PythonExercíciosHARDMODE/ex024HM.py
RodrigoMASRamos/Projects.py
ed15981b320914c9667305dcd5fb5b7906fd9b00
[ "MIT" ]
null
null
null
#ex024: Crie um programa que leia o nome de uma cidade e diga se ela começa ou não com o nome ‘SANTO’
51
101
0.745098
22
102
3.454545
0.909091
0.131579
0
0
0
0
0
0
0
0
0
0.0375
0.215686
102
1
102
102
0.9125
0.980392
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
1
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
676851e4f0b3526d76a5de8ad05e49e041c49806
426
py
Python
sprague_plugin/__init__.py
Geojuffie/HackingEDPlanning-Team5-QGISNL
464a5884612b59683b1f997a4919677108c3ad5d
[ "CC0-1.0" ]
null
null
null
sprague_plugin/__init__.py
Geojuffie/HackingEDPlanning-Team5-QGISNL
464a5884612b59683b1f997a4919677108c3ad5d
[ "CC0-1.0" ]
null
null
null
sprague_plugin/__init__.py
Geojuffie/HackingEDPlanning-Team5-QGISNL
464a5884612b59683b1f997a4919677108c3ad5d
[ "CC0-1.0" ]
2
2021-01-30T12:32:33.000Z
2021-02-12T07:29:50.000Z
# encoding: utf-8 #----------------------------------------------------------- # Copyright (C) 2021 Team QGIS-NL #----------------------------------------------------------- # Licensed under the terms of # Creative Commons Legal Code # CC0 1.0 Universal #--------------------------------------------------------------------- from .sprague_plugin import SpraguePlugin def classFactory(iface): return SpraguePlugin(iface)
30.428571
70
0.41784
33
426
5.363636
0.939394
0
0
0
0
0
0
0
0
0
0
0.020779
0.096244
426
13
71
32.769231
0.438961
0.723005
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0.333333
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
5
6788202d00982197eba18898536ad8cd04405b11
34
py
Python
tests/__init__.py
takashiAg/biquad_filter
5bf8a5467d42f0015f2fe3f1f2c0cf432acc165a
[ "BSD-2-Clause" ]
null
null
null
tests/__init__.py
takashiAg/biquad_filter
5bf8a5467d42f0015f2fe3f1f2c0cf432acc165a
[ "BSD-2-Clause" ]
null
null
null
tests/__init__.py
takashiAg/biquad_filter
5bf8a5467d42f0015f2fe3f1f2c0cf432acc165a
[ "BSD-2-Clause" ]
null
null
null
from .context import biquad_filter
34
34
0.882353
5
34
5.8
1
0
0
0
0
0
0
0
0
0
0
0
0.088235
34
1
34
34
0.935484
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
e1dd96db9bef3ceb16de1d36e1c91553d592424a
122
py
Python
casper4/basic_validation_code.se.py
kevaundray/research
16f20848c614b580071fed3d2ff1dc69688fa4f4
[ "MIT" ]
1,351
2015-09-22T08:17:10.000Z
2022-03-31T22:48:07.000Z
casper4/basic_validation_code.se.py
kevaundray/research
16f20848c614b580071fed3d2ff1dc69688fa4f4
[ "MIT" ]
42
2016-08-31T14:43:29.000Z
2021-12-05T23:10:31.000Z
casper4/basic_validation_code.se.py
LaudateCorpus1/research
6e8b7b367e7f1b18b4b92151df01dfeaa0774a23
[ "MIT" ]
334
2015-09-20T10:15:23.000Z
2022-03-28T17:46:57.000Z
~calldatacopy(0, 0, 128) ~call(3000, 1, 0, 0, 128, 0, 32) return(~mload(0) == 0xfe2ec957647679d210034b65e9c7db2452910b0c)
30.5
63
0.721311
16
122
5.5
0.625
0.045455
0.113636
0
0
0
0
0
0
0
0
0.440367
0.106557
122
3
64
40.666667
0.366972
0
0
0
0
0
0
0
0
0
0.344262
0
0
1
0
true
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
e1ee336bf214792f0c0aa1d0db6d5aba88fe37f8
232
py
Python
resumao/summary/admin.py
pablorodriguesk/summary
367379a25fde7bd5c94113c6e923d6c153c64d0d
[ "bzip2-1.0.6" ]
null
null
null
resumao/summary/admin.py
pablorodriguesk/summary
367379a25fde7bd5c94113c6e923d6c153c64d0d
[ "bzip2-1.0.6" ]
null
null
null
resumao/summary/admin.py
pablorodriguesk/summary
367379a25fde7bd5c94113c6e923d6c153c64d0d
[ "bzip2-1.0.6" ]
null
null
null
from django.contrib import admin from .models import User from .models import Summary from .models import Categoria # Register your models here. admin.site.register(User) admin.site.register(Summary) admin.site.register(Categoria)
23.2
32
0.814655
33
232
5.727273
0.393939
0.15873
0.253968
0
0
0
0
0
0
0
0
0
0.107759
232
9
33
25.777778
0.913043
0.112069
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.571429
0
0.571429
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
1
0
0
5
c0071edb115d4c945d2c8e203c4f25f95ccab1e5
77
py
Python
mfgp/task0/mbtr_utils/__init__.py
kunalghosh/Multi_Fidelity_Prediction_GP
c858554f5c1f0c4aafa12cf7c441bd2d56b115f5
[ "BSD-3-Clause" ]
null
null
null
mfgp/task0/mbtr_utils/__init__.py
kunalghosh/Multi_Fidelity_Prediction_GP
c858554f5c1f0c4aafa12cf7c441bd2d56b115f5
[ "BSD-3-Clause" ]
3
2021-08-31T08:53:49.000Z
2021-10-05T15:10:42.000Z
mfgp/task0/mbtr_utils/__init__.py
kunalghosh/Multi_Fidelity_Prediction_GP
c858554f5c1f0c4aafa12cf7c441bd2d56b115f5
[ "BSD-3-Clause" ]
null
null
null
from .create import create_mbtr from .mbtr_description import make_mbtr_desc
25.666667
44
0.87013
12
77
5.25
0.583333
0
0
0
0
0
0
0
0
0
0
0
0.103896
77
2
45
38.5
0.913043
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
c00bab8b4a9879b20876fd46595ce768bd1f9def
98
py
Python
computerAgent.py
kamrulhasan1203/Futoshiki
c81939c5467c2e825b73f9caa1b93f8cdc5d46f5
[ "MIT" ]
null
null
null
computerAgent.py
kamrulhasan1203/Futoshiki
c81939c5467c2e825b73f9caa1b93f8cdc5d46f5
[ "MIT" ]
null
null
null
computerAgent.py
kamrulhasan1203/Futoshiki
c81939c5467c2e825b73f9caa1b93f8cdc5d46f5
[ "MIT" ]
null
null
null
class computerAgent(object): """doc string""" def __init__(self,game): self.game=game pass
14
28
0.693878
13
98
4.923077
0.769231
0.25
0
0
0
0
0
0
0
0
0
0
0.153061
98
6
29
16.333333
0.771084
0.102041
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0.25
0
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
5
c03c4ddb065c5276fce34cab8ee4e5debf784da5
226
py
Python
showme/tests/test_docs.py
kennethreitz/showme
c307a1f687613192ba5d0fab3872d863acbe36a4
[ "MIT" ]
67
2015-01-05T16:19:43.000Z
2019-06-27T13:23:09.000Z
showme/tests/test_docs.py
not-kennethreitz/showme
c307a1f687613192ba5d0fab3872d863acbe36a4
[ "MIT" ]
2
2016-04-21T20:23:56.000Z
2018-03-28T19:37:08.000Z
showme/tests/test_docs.py
not-kennethreitz/showme
c307a1f687613192ba5d0fab3872d863acbe36a4
[ "MIT" ]
15
2015-05-20T11:18:02.000Z
2019-06-12T00:04:16.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ >>> test() sample docstring for test """ import doctest import showme @showme.docs def test(): """sample docstring for test""" pass if __name__ == '__main__': test()
10.272727
32
0.623894
29
226
4.586207
0.689655
0.150376
0.285714
0.330827
0.390977
0
0
0
0
0
0
0.005435
0.185841
226
21
33
10.761905
0.717391
0.464602
0
0
0
0
0.07619
0
0
0
0
0
0
1
0.142857
true
0.142857
0.285714
0
0.428571
0
1
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
1
1
0
0
0
0
0
5
c03d9b08fa3678aa7c6a0f22d4c272c9e211d136
74
py
Python
Python Aulas/Mundo 1/Aula 008a.py
rodrigobarbonifilho/Python
807bf01ddacd0a0f7f563ae5a65f8fb2dd22ca16
[ "MIT" ]
null
null
null
Python Aulas/Mundo 1/Aula 008a.py
rodrigobarbonifilho/Python
807bf01ddacd0a0f7f563ae5a65f8fb2dd22ca16
[ "MIT" ]
null
null
null
Python Aulas/Mundo 1/Aula 008a.py
rodrigobarbonifilho/Python
807bf01ddacd0a0f7f563ae5a65f8fb2dd22ca16
[ "MIT" ]
null
null
null
import emoji print(emoji.emojize('Olá,Mundo :smile:', use_aliases=True ))
24.666667
60
0.756757
11
74
5
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.081081
74
2
61
37
0.808824
0
0
0
0
0
0.22973
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
1
0
5
c058a306c11ff77baf10dc92ac2cc62a09a510e9
48
py
Python
src/te2/ecs/__init__.py
roboboredom/textengine2
289169a28c77f0b69153d6b1871cbc8346fd393e
[ "MIT" ]
null
null
null
src/te2/ecs/__init__.py
roboboredom/textengine2
289169a28c77f0b69153d6b1871cbc8346fd393e
[ "MIT" ]
9
2020-09-10T18:15:46.000Z
2020-09-23T18:57:55.000Z
src/te2/ecs/__init__.py
roboboredom/textengine2
289169a28c77f0b69153d6b1871cbc8346fd393e
[ "MIT" ]
null
null
null
""" Modules for the entity-component-system. """
16
40
0.708333
6
48
5.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.104167
48
3
41
16
0.790698
0.833333
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
c064931a3c3c2988066f2e8319c03bbc9d11dd78
74
py
Python
_main/home/pi/kmori-Pla-Rail-Scripts/stop.py
Kumapapa2012/Raspberry-Pi-Zero-on-PLA-RAIL
2dcbd2f11bd92ef1b9be569c2a97c9117d984cef
[ "MIT" ]
null
null
null
_main/home/pi/kmori-Pla-Rail-Scripts/stop.py
Kumapapa2012/Raspberry-Pi-Zero-on-PLA-RAIL
2dcbd2f11bd92ef1b9be569c2a97c9117d984cef
[ "MIT" ]
null
null
null
_main/home/pi/kmori-Pla-Rail-Scripts/stop.py
Kumapapa2012/Raspberry-Pi-Zero-on-PLA-RAIL
2dcbd2f11bd92ef1b9be569c2a97c9117d984cef
[ "MIT" ]
null
null
null
#!/usr/bin/env python import utils print utils.Set8830Status(3,"Brake")
12.333333
36
0.743243
11
74
5
0.909091
0
0
0
0
0
0
0
0
0
0
0.075758
0.108108
74
5
37
14.8
0.757576
0.27027
0
0
0
0
0.096154
0
0
0
0
0
0
0
null
null
0
0.5
null
null
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
1
0
5
c0686b7c32333a8bff8efe285625485a85dc2336
70
py
Python
src/ansys/mapdl/core/inline_functions/__init__.py
Miiicah/pymapdl
ce85393ca82db7556a5d05883ca3fd9296444cba
[ "MIT" ]
1
2022-02-09T01:12:02.000Z
2022-02-09T01:12:02.000Z
src/ansys/mapdl/core/inline_functions/__init__.py
Miiicah/pymapdl
ce85393ca82db7556a5d05883ca3fd9296444cba
[ "MIT" ]
9
2022-02-24T20:34:18.000Z
2022-03-31T20:44:17.000Z
src/ansys/mapdl/core/inline_functions/__init__.py
lynch1972/pymapdl
46b31438af2a0d5b2d9a69abe82e0fe69935a855
[ "MIT" ]
null
null
null
from .core import SelectionStatus from .inline_functions import Query
23.333333
35
0.857143
9
70
6.555556
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.114286
70
2
36
35
0.951613
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
222fef9f2a0e1892144aaa82688685ea587d382c
58
py
Python
constance/test/__init__.py
sflems/django-constance
e177292c74cbf158c7218d8818d5d6c34b17eee1
[ "BSD-3-Clause" ]
899
2015-12-17T09:24:11.000Z
2022-03-31T15:57:53.000Z
constance/test/__init__.py
sflems/django-constance
e177292c74cbf158c7218d8818d5d6c34b17eee1
[ "BSD-3-Clause" ]
342
2015-12-27T11:07:44.000Z
2022-03-24T13:34:46.000Z
constance/test/__init__.py
sflems/django-constance
e177292c74cbf158c7218d8818d5d6c34b17eee1
[ "BSD-3-Clause" ]
213
2015-12-23T00:32:34.000Z
2022-03-17T17:04:57.000Z
from .unittest import override_config # pragma: no cover
29
57
0.793103
8
58
5.625
1
0
0
0
0
0
0
0
0
0
0
0
0.155172
58
1
58
58
0.918367
0.275862
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
223264b07e1e39fb09cd1c27bb717d721c5345b4
269
py
Python
grpc/RPCServer/tools/BaseTool.py
liushouyun/equipment
58ff32679d03e9fc911204080d0c476a878a8cd6
[ "Apache-2.0" ]
null
null
null
grpc/RPCServer/tools/BaseTool.py
liushouyun/equipment
58ff32679d03e9fc911204080d0c476a878a8cd6
[ "Apache-2.0" ]
null
null
null
grpc/RPCServer/tools/BaseTool.py
liushouyun/equipment
58ff32679d03e9fc911204080d0c476a878a8cd6
[ "Apache-2.0" ]
null
null
null
from abc import ABCMeta,abstractmethod class BaseTool(object): __metaclass__ = ABCMeta def __init__(self): self.headers = '' @abstractmethod def checkParameter(self): pass @abstractmethod def checkDataType(self): pass
17.933333
38
0.654275
25
269
6.72
0.64
0.202381
0
0
0
0
0
0
0
0
0
0
0.271375
269
15
39
17.933333
0.857143
0
0
0.363636
0
0
0
0
0
0
0
0
0
1
0.272727
false
0.181818
0.090909
0
0.545455
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
5
224440cc0419cc1d382d5a89485f88e8270ae9df
144
py
Python
face_detection/arcsoft/ASVL_COLOR_FORMAT.py
lujiazho/Digital-Image-Processing
079f768b39986245b56e81ce340a2db23ce27356
[ "MIT" ]
4
2021-12-16T04:44:42.000Z
2022-02-24T04:36:26.000Z
face_detection/arcsoft/ASVL_COLOR_FORMAT.py
lujiazho/Digital-Image-Processing
079f768b39986245b56e81ce340a2db23ce27356
[ "MIT" ]
null
null
null
face_detection/arcsoft/ASVL_COLOR_FORMAT.py
lujiazho/Digital-Image-Processing
079f768b39986245b56e81ce340a2db23ce27356
[ "MIT" ]
2
2022-02-24T04:36:28.000Z
2022-02-24T13:35:11.000Z
#-*- encoding=utf-8 -*- ASVL_PAF_I420 = 0x601 ASVL_PAF_NV12 = 0x801 ASVL_PAF_NV21 = 0x802 ASVL_PAF_YUYV = 0x501 ASVL_PAF_RGB24_B8G8R8 = 0x201
18
29
0.763889
25
144
4
0.68
0.35
0
0
0
0
0
0
0
0
0
0.264
0.131944
144
7
30
20.571429
0.528
0.152778
0
0
0
0
0
0
0
0
0.208333
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
0
0
5
225f67e42474865931e9e6df4cf00f2bd8db6742
4,728
py
Python
conflowgen/domain_models/distribution_seeders/container_weight_distribution_seeder.py
bbargstaedt/conflowgen
b5b5c0e2df8a605d23ef467aaa3e88aa463a34ee
[ "MIT" ]
null
null
null
conflowgen/domain_models/distribution_seeders/container_weight_distribution_seeder.py
bbargstaedt/conflowgen
b5b5c0e2df8a605d23ef467aaa3e88aa463a34ee
[ "MIT" ]
null
null
null
conflowgen/domain_models/distribution_seeders/container_weight_distribution_seeder.py
bbargstaedt/conflowgen
b5b5c0e2df8a605d23ef467aaa3e88aa463a34ee
[ "MIT" ]
null
null
null
from conflowgen.domain_models.distribution_models.container_weight_distribution import ContainerWeightDistribution from conflowgen.domain_models.data_types.container_length import ContainerLength def _add_weight_distribution_category( container_length: ContainerLength, weight_category: int, fraction: float ) -> None: """Adds entry to the table. As there is no user interface, there is no repository interface. Thus the entries are created directly.""" ContainerWeightDistribution.create( container_length=container_length, weight_category=weight_category, fraction=fraction ) def seed(): """ Seeds the database with some initial values for the weight categories. The initially seeded values stem from the cargo profile the brochure "Container securing systems - product catalogue" of MacGregor (Edition 101601, February 2016) URL: https://www.macgregor.com/globalassets/picturepark/imported-assets/65120.pdf """ # 20 foot container _add_weight_distribution_category(ContainerLength.twenty_feet, 2, 1) _add_weight_distribution_category(ContainerLength.twenty_feet, 4, 1) _add_weight_distribution_category(ContainerLength.twenty_feet, 6, 2) _add_weight_distribution_category(ContainerLength.twenty_feet, 8, 2.5) _add_weight_distribution_category(ContainerLength.twenty_feet, 10, 2.5) _add_weight_distribution_category(ContainerLength.twenty_feet, 12, 3) _add_weight_distribution_category(ContainerLength.twenty_feet, 14, 3) _add_weight_distribution_category(ContainerLength.twenty_feet, 16, 3) _add_weight_distribution_category(ContainerLength.twenty_feet, 18, 2.5) _add_weight_distribution_category(ContainerLength.twenty_feet, 20, 2.5) _add_weight_distribution_category(ContainerLength.twenty_feet, 22, 2) _add_weight_distribution_category(ContainerLength.twenty_feet, 24, 2) _add_weight_distribution_category(ContainerLength.twenty_feet, 26, 2) _add_weight_distribution_category(ContainerLength.twenty_feet, 28, 1) _add_weight_distribution_category(ContainerLength.twenty_feet, 30, 1) # 40 foot container _add_weight_distribution_category(ContainerLength.forty_feet, 2, 0) _add_weight_distribution_category(ContainerLength.forty_feet, 4, 2) _add_weight_distribution_category(ContainerLength.forty_feet, 6, 5) _add_weight_distribution_category(ContainerLength.forty_feet, 8, 6) _add_weight_distribution_category(ContainerLength.forty_feet, 10, 9) _add_weight_distribution_category(ContainerLength.forty_feet, 12, 11) _add_weight_distribution_category(ContainerLength.forty_feet, 14, 11) _add_weight_distribution_category(ContainerLength.forty_feet, 16, 9) _add_weight_distribution_category(ContainerLength.forty_feet, 18, 4) _add_weight_distribution_category(ContainerLength.forty_feet, 20, 3) _add_weight_distribution_category(ContainerLength.forty_feet, 22, 3) _add_weight_distribution_category(ContainerLength.forty_feet, 24, 3) _add_weight_distribution_category(ContainerLength.forty_feet, 26, 1) _add_weight_distribution_category(ContainerLength.forty_feet, 28, 1) _add_weight_distribution_category(ContainerLength.forty_feet, 30, 1) # 45 foot container, same weight distribution as for 40 foot containers is assumed _add_weight_distribution_category(ContainerLength.forty_five_feet, 2, 0) _add_weight_distribution_category(ContainerLength.forty_five_feet, 4, 2) _add_weight_distribution_category(ContainerLength.forty_five_feet, 6, 5) _add_weight_distribution_category(ContainerLength.forty_five_feet, 8, 6) _add_weight_distribution_category(ContainerLength.forty_five_feet, 10, 9) _add_weight_distribution_category(ContainerLength.forty_five_feet, 12, 11) _add_weight_distribution_category(ContainerLength.forty_five_feet, 14, 11) _add_weight_distribution_category(ContainerLength.forty_five_feet, 16, 9) _add_weight_distribution_category(ContainerLength.forty_five_feet, 18, 4) _add_weight_distribution_category(ContainerLength.forty_five_feet, 20, 3) _add_weight_distribution_category(ContainerLength.forty_five_feet, 22, 3) _add_weight_distribution_category(ContainerLength.forty_five_feet, 24, 3) _add_weight_distribution_category(ContainerLength.forty_five_feet, 26, 1) _add_weight_distribution_category(ContainerLength.forty_five_feet, 28, 1) _add_weight_distribution_category(ContainerLength.forty_five_feet, 30, 1) for container_weight_category in range(2, 32, 2): _add_weight_distribution_category(ContainerLength.other, container_weight_category, 0)
57.658537
114
0.806261
577
4,728
6.147314
0.187175
0.248661
0.278263
0.384268
0.741754
0.741754
0.729067
0.692698
0.515365
0
0
0.03862
0.12923
4,728
81
115
58.37037
0.822929
0.119078
0
0
0
0
0
0
0
0
0
0
0
1
0.033333
false
0
0.033333
0
0.066667
0
0
0
0
null
1
1
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
0
0
0
0
0
0
0
0
5
22761217bc656cde9173cb22b7b7817ece637cee
207
py
Python
segNet2/local_variables.py
linsats/sceneflownet
1df20490bd93da17bdf4e525a7ea86bc7e1fce4c
[ "MIT" ]
26
2018-10-11T14:32:34.000Z
2021-09-24T10:21:54.000Z
segNet2/local_variables.py
linsats/sceneflownet
1df20490bd93da17bdf4e525a7ea86bc7e1fce4c
[ "MIT" ]
1
2019-02-12T00:02:56.000Z
2019-02-12T00:02:56.000Z
segNet2/local_variables.py
linsats/sceneflownet
1df20490bd93da17bdf4e525a7ea86bc7e1fce4c
[ "MIT" ]
4
2018-11-29T08:19:01.000Z
2020-01-10T05:24:17.000Z
import os import sys BASE_DIR = os.path.dirname(os.path.abspath(__file__)) DATA_DIR = os.path.abspath(os.path.join(BASE_DIR,os.pardir,'Data')) ROOT_DIR = os.path.abspath(os.path.join(BASE_DIR, os.pardir))
25.875
67
0.758454
38
207
3.894737
0.342105
0.243243
0.182432
0.216216
0.554054
0.554054
0.554054
0.554054
0.554054
0.554054
0
0
0.077295
207
7
68
29.571429
0.774869
0
0
0
0
0
0.019417
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
97d77aca1b6fe9d185a032cbe396393399cf7def
244
py
Python
connect_four/hashing/hasher.py
rpachauri/connect4
6caf6965afaaff6883193ac295c6ac5b1f4e9c4a
[ "MIT" ]
null
null
null
connect_four/hashing/hasher.py
rpachauri/connect4
6caf6965afaaff6883193ac295c6ac5b1f4e9c4a
[ "MIT" ]
null
null
null
connect_four/hashing/hasher.py
rpachauri/connect4
6caf6965afaaff6883193ac295c6ac5b1f4e9c4a
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod class Hasher(ABC): @abstractmethod def move(self, action: int): pass @abstractmethod def undo_move(self): pass @abstractmethod def hash(self) -> str: pass
14.352941
35
0.606557
27
244
5.444444
0.555556
0.346939
0.285714
0
0
0
0
0
0
0
0
0
0.311475
244
16
36
15.25
0.875
0
0
0.545455
0
0
0
0
0
0
0
0
0
1
0.272727
false
0.272727
0.090909
0
0.454545
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
5
97d7c7fbafef6a97fba6f2cadd1ce7be12217f78
72
py
Python
matrixre/match.py
aar015/matrix-regex
8fe0e3c68c4187883559bc5cdb2d93da3458fb9e
[ "MIT" ]
null
null
null
matrixre/match.py
aar015/matrix-regex
8fe0e3c68c4187883559bc5cdb2d93da3458fb9e
[ "MIT" ]
null
null
null
matrixre/match.py
aar015/matrix-regex
8fe0e3c68c4187883559bc5cdb2d93da3458fb9e
[ "MIT" ]
null
null
null
class Match(object): def __init__(self, span, match): pass
14.4
36
0.611111
9
72
4.444444
0.888889
0
0
0
0
0
0
0
0
0
0
0
0.277778
72
4
37
18
0.769231
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0.333333
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
1
0
0
1
0
0
5
3f0f4a41380287722b4e39180b9b599c6910368d
147
py
Python
partysig/__init__.py
str4d/partysig
a460e6d06514a1c762ee8f683d0992a3f74ad055
[ "MIT" ]
5
2016-12-28T15:37:21.000Z
2017-08-03T00:12:54.000Z
partysig/__init__.py
str4d/partysig
a460e6d06514a1c762ee8f683d0992a3f74ad055
[ "MIT" ]
null
null
null
partysig/__init__.py
str4d/partysig
a460e6d06514a1c762ee8f683d0992a3f74ad055
[ "MIT" ]
null
null
null
# Copyright (c) Jack Grigg # See LICENSE for details. from ._version import get_versions __version__ = get_versions()['version'] del get_versions
21
39
0.77551
20
147
5.3
0.7
0.311321
0.339623
0
0
0
0
0
0
0
0
0
0.136054
147
6
40
24.5
0.834646
0.333333
0
0
0
0
0.073684
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
3f260b19a25689daf5f715716f9ff8b4578de0d2
191
py
Python
tests/unit/mock_import.py
zuliatowoade/Trapheus
3b2c7b0fd07e5038994a76c56ba7c8aeea3067a5
[ "MIT" ]
1
2020-10-03T15:53:33.000Z
2020-10-03T15:53:33.000Z
tests/unit/mock_import.py
zuliatowoade/Trapheus
3b2c7b0fd07e5038994a76c56ba7c8aeea3067a5
[ "MIT" ]
null
null
null
tests/unit/mock_import.py
zuliatowoade/Trapheus
3b2c7b0fd07e5038994a76c56ba7c8aeea3067a5
[ "MIT" ]
null
null
null
import sys sys.modules['custom_exceptions'] = __import__('mock_custom_exceptions') sys.modules['utility'] = __import__('mock_utility') sys.modules['constants'] = __import__('mock_constants')
38.2
71
0.78534
22
191
6.045455
0.363636
0.225564
0
0
0
0
0
0
0
0
0
0
0.057592
191
5
72
38.2
0.738889
0
0
0
0
0
0.421875
0.114583
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
3f68dd8fed0c2a0e43b6e402ee6f3c4c49569012
10,842
py
Python
scripts/topic_modeling_static_result.py
the-deep/DEEPL
93f7bf7d61d7424250d01c1fc510347375d767c4
[ "MIT" ]
6
2018-05-17T07:40:16.000Z
2020-09-27T00:04:39.000Z
scripts/topic_modeling_static_result.py
eoglethorpe/DEEPL
fb6403ceb63197ecd314905f060a2e5f1e790f66
[ "MIT" ]
11
2017-10-28T10:50:09.000Z
2021-06-10T20:07:44.000Z
scripts/topic_modeling_static_result.py
eoglethorpe/DEEPL
fb6403ceb63197ecd314905f060a2e5f1e790f66
[ "MIT" ]
1
2018-10-04T21:27:58.000Z
2018-10-04T21:27:58.000Z
from topic_modeling.lda import get_topics_and_subtopics import json doc1 = """ Hosts feel the pressure, refugees ever grateful x Six months have passed since the latest influx from Myanmar’s Rakhine state started, but there has been no real headway in ending the ongoing Rohingya crisis. Nearly 700,000 Rohingyas managed to save their lives fleeing into Bangladesh after a military crackdown began in Rakhine on August 25 last year, leaving behind all their belongings and property. On humanitarian ground, Bangladesh allowed the Rohingyas to stay at the refugee camps set up in Cox’s Bazar’s Ukhiya and Teknaf upazilas, where several hundreds of thousands of Rohingyas were already living for many years. Although the process of providing shelter feels like somewhat of a burden to the locals and the government as the days have progressed, Rohingyas are always expressing their gratefulness to the people of Bangladesh and Prime Minister Sheikh Hasina """ doc2 = """ Rohingya flee no man's land after Myanmar threat Rohingya flee no man's land after Myanmar threat By Afp Published: 05:26 EST, 28 February 2018 | Updated: 07:11 EST, 28 February 2018 Around 6,000 Rohingya have been living on a thin stretch of land between the two countries since fleeing Myanmar Hundreds of Rohingya living in no man's land have left their makeshift camp and crossed into Bangladesh after soldiers from Myanmar used loudhailers to threaten them, community leaders said Wednesday. Around 6,000 Rohingya have been living on a thin strip of land between the two countries since fleeing Myanmar in the wake of a brutal military crackdown on the Muslim minority in late August. They were among the first to flee Myanmar when the violence erupted last year and set up shelters in no man's land in the weeks before Bangladesh agreed to let the Rohingya into the country. In recent weeks they have come under pressure from Myanmar soldiers, who have stepped up patrols along the barbed-wire border fence just yards from the camp and broadcast messages using loudhailers ordering the Rohingya to leave. Community leader Dil Mohammad said the messages had spread panic through the camp. "We can't now sleep peacefully. Most of the Rohingya in the camps now want to flee and take shelter in Bangladesh," Mohammad said. "Around 150 families have already left the camp for Bangladesh as they were afraid they might be forcefully sent back to Rakhine," he told AFP, referring to the area of Myanmar where the Rohingya used to live. - Threatened with prosecution - One Border Guard Bangladesh official said the Myanmar soldiers were playing the announcement at least 10 to 15 times a day. In it they urge the Rohingya to leave, saying the land they are on is under Myanmar's jurisdiction and threatening them with prosecution if they remain. Last week Bangladesh and Myanmar officials visited the camp and urged the refugees to return to Rakhine. But community leaders have said they will not go back unless their demands for citizenship and security guarantees are met. Myanmar views the Rohingya as illegal immigrants from Bangladesh and has long denied them citizenship and basic rights. Nearly 700,000 have fled since the military backed by Buddhist mobs launched a brutal crackdown in the wake of attacks by Rohingya militants on police posts. Doctors without Borders has said 6,700 Rohingya were killed in the first month of the violence alone, in a campaign the United Nations has called ethnic cleansing. Most of the refugees are now living in camps in Bangladesh. The Bangladesh government has signed an agreement with Myanmar to repatriate them, but the refugees themselves say they do not want to return. Bangladesh was supposed to start the repatriation process last month but it has been delayed amid concerns over a lack of preparation. Myanmar forces have also erected a kilometres-long barbed-wire fence along the border in recent weeks and installed multiple outposts with armed guards and loudspeakers, the refugees said. "Unfortunately we have no presence in the so-called no man's land. We know that refugees continue to arrive in Bangladesh on a daily basis and we are assisting all new arrivals regardless of where they came from," said Vivian Tan, spokeswoman for the UN refugee agency. "UNHCR maintains that those who have fled human rights violations, persecution and violence have the right to seek asylum and must be guaranteed safety and protection." Share or comment on this article Sorry we are not currently accepting comments on this article. """ doc3 = """ Rohingya crisis: Myanmar ‘bars entry’ for UK govt body after criticism The Myanmar authorities have allegedly blocked entry for a fact-finding committee of the British government following criticism by the UK MPs over Myanmar’s role in the Rohingya crisis. The Commons International Development Committee was due to hold a series of meetings with Myanmar’s senior military and civilian leaders including the country’s de facto leader Aung San Suu Kyi and scrutinise the British aid projects in Myanmar, reports The Telegraph . The committee had produced a report in January this year condemning the persecution on Rohingyas in Myanmar, highlighting the evidence of sexual violence on the Muslim minority carried out by the country’s military during a crackdown in late August last year, forcing nearly 700,000 people to flee to Bangladesh. The Myanmar embassy has reportedly failed to provide visas for the members of the committee’s fact-finding body, a move which the committee accused as linked to their report on the Rohingya crisis. Expressing extreme disappointment, the Committee Chair and Labour MP Stephen Twigg said that it was hard to escape the conclusion that this was a direct consequence of the committee’s report on the Rohingyas, reports The Telegraph . The refusal to allow entry to the committee has also hampered its job of overseeing the projects in Myanmar funded by a £100 million Department for International Development (DFID) aid programme for 2018-19, Twigg also said. The UK MPs were due to visit the health and education projects in Myanmar’s Rakhine state and Magway region. Earlier in January, the committee expressed “grave concern” about the plans to repatriate the Rohingya refugees in Bangladesh, terming the crisis a “huge human tragedy” caused by Myanmar’s actions. The UK MPs had warned against any repatriation plan for the Rohingyas without guarantees of protection, and called for voluntary return of the refugees. The governments of Bangladesh and Myanmar had earlier drawn up an agreement to begin repatriation of the Rohingya refugees from late January. The repatriation process, however, has been postponed for logistical reasons, reports The Telegraph . The Rohingyas in the refugee camps in Bangladesh were reportedly traumatised by fears of forced return to Myanmar, with their community leaders demanding the Myanmar authorities first guarantee the Rohingyas of their long-denied citizenship and include them in the country’s list of recognised ethnic groups. On Wednesday, February 28, 2018, hundreds of Rohingyas living in the no man’s land between Bangladesh and Myanmar abruptly fled into Bangladesh, claiming that Myanmar soldiers had threatened them to leave. The incident took place after the Myanmar soldiers beefed up patrols along the barbed wire border fence, increasing pressure and causing panic among the around 6,000 people living on the thin strip of land between the two countries, reports The Telegraph . """ doc4 = """ The initial stage (called phase 1) of the Rohingya crises involved rapid, mass displacement of populations , during which shelter needs focused on access to adequate shelter for survival and dignity. Various humanitarian actors provided emergency shelter kits (ESK) for essential security and personal safety, protection from the climate and enhanced resistance to disease and ill health . ESK developed by the shelter sector included tarps , rope and bamboo. However, in the initial response, most agencies provided an acute version of these items , which excluded bamboo. In most cases , the refugee families procured some bamboo themselves , or foraged for sticks and timber in the surrounding forest to construct rudimentary makeshift shelters . Given that shelters had already been constructed but were far below standards in terms of living conditions and structural integrity, rather than using bamboo in the emergency kits the sector developed and promoted the shelter upgrade kit (USK), or phase 2. This kit consists of tarps, bamboo, fixings, tools and technical assistance with the aim of improving living conditions (with site improvements contributing to the effort) and shelter structural stability to better withstand climatic conditions. Because of the scale of the crisis and the urgency to respond before the monsoon season, the Shelter and NFI Sector decided in November to reorient whatever was already in the pipeline for ESK , toward the USK . The ESK had included four bamboo Borak and 55 Bamboo Mulli, whereas the USK includes four bamboo Borak and 60 bamboo Mulli per household. """ doc5 = """ Children’s experiences in Cox’s Bazar and the specific vulnerabilities they face are distinct from adults. To better understand children’s needs, their challenges and day-to-day experiences in the settlements and host communities, hearing from children themselves is critical. Therefore, SCI, Plan International and WVI undertook a children’s consultation with children from Rohingya refugee communities and host communities in Cox’s Bazar between the 2nd and 6th of December 2017. This exercise builds on experiences from after Typhoon Haiyan in the Philippines, the Earthquake in Nepal and the Ebola outbreak in Sierra Leone. What children have shared with the consultation teams about their needs, hopes and desires will be used to design and improve our interventions and will feed into the Humanitarian Response Plan (HRP). The Children’s Consultation exercise collected a wealth of information however, due to time required for data encoding following the consultations there were significant limitations for detailed analysis. Therefore, main findings have been organised by sector allowing readers to easily navigate and influence their HRP contributions. It should be noted that this Children’s Consultation is not a sectoral needs assessment in itself but rather a collation of issues affecting children and their own perceptions of what is important to them based on what they believe to be their current reality. """ docs = [doc1, doc2, doc3, doc4, doc5] def main(*args, **kwargs): num_topics = 3 num_words = 4 depth = 5 result = get_topics_and_subtopics(docs, num_topics, num_words, depth, passes=80) print(json.dumps(result, indent=2))
328.545455
3,576
0.81544
1,737
10,842
5.084053
0.393782
0.009059
0.004077
0.006794
0.044616
0.041898
0.041898
0.041898
0.028536
0.008833
0
0.011636
0.159749
10,842
32
3,577
338.8125
0.957629
0
0
0.185185
0
0.296296
0.964582
0
0
0
0
0
0
1
0.037037
false
0.074074
0.111111
0
0.148148
0.037037
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
5
58b07d0060e7e22a4ec9b718ae51592f0dd488f8
64
py
Python
enthought/pyface/action/tool_palette_manager.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
3
2016-12-09T06:05:18.000Z
2018-03-01T13:00:29.000Z
enthought/pyface/action/tool_palette_manager.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
1
2020-12-02T00:51:32.000Z
2020-12-02T08:48:55.000Z
enthought/pyface/action/tool_palette_manager.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
null
null
null
# proxy module from pyface.action.tool_palette_manager import *
21.333333
48
0.828125
9
64
5.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.109375
64
2
49
32
0.894737
0.1875
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
58b1b6daef893889f08477646901b16b66b0099e
111
py
Python
lib/db/__init__.py
askurandrio/WiikiRESTAPI
de03d541d72a19a5b75042fd4cbb09b59c8accf8
[ "MIT" ]
1
2021-09-03T12:50:01.000Z
2021-09-03T12:50:01.000Z
lib/db/__init__.py
askurandrio/WikiRESTAPI
de03d541d72a19a5b75042fd4cbb09b59c8accf8
[ "MIT" ]
null
null
null
lib/db/__init__.py
askurandrio/WikiRESTAPI
de03d541d72a19a5b75042fd4cbb09b59c8accf8
[ "MIT" ]
null
null
null
"""The db package""" from .classes import Page, Change from .db_session import get_session, make_sessionmaker
22.2
54
0.783784
16
111
5.25
0.75
0
0
0
0
0
0
0
0
0
0
0
0.126126
111
4
55
27.75
0.865979
0.126126
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
58be2a172f8938f5e2cfdcdcbbd2dd2ff77008a8
95
py
Python
api/categories/admin.py
lanceris/categories_api_kapital
377dea2249584916f3a12bcf630827a4c6a67541
[ "MIT" ]
null
null
null
api/categories/admin.py
lanceris/categories_api_kapital
377dea2249584916f3a12bcf630827a4c6a67541
[ "MIT" ]
6
2021-03-19T01:34:42.000Z
2022-02-10T10:15:51.000Z
api/categories/admin.py
lanceris/categories_api_kapital
377dea2249584916f3a12bcf630827a4c6a67541
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Category admin.site.register(Category)
13.571429
32
0.810526
13
95
5.923077
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.126316
95
6
33
15.833333
0.927711
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
58dcf12bdccc45c4a1d178b764f77ab0c7bc58a3
224
py
Python
utils/submission.py
steve-levesque/Portfolio-ML-KaggleComp
f4506471b525e045402ddf81d9979cbd278f02ca
[ "MIT" ]
null
null
null
utils/submission.py
steve-levesque/Portfolio-ML-KaggleComp
f4506471b525e045402ddf81d9979cbd278f02ca
[ "MIT" ]
null
null
null
utils/submission.py
steve-levesque/Portfolio-ML-KaggleComp
f4506471b525e045402ddf81d9979cbd278f02ca
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import os def save_data(submission_file, y_pred, path, file_name, ext=".csv"): submission_file.iloc[:, 1] = y_pred submission_file.to_csv(path + file_name + ext, index=False)
24.888889
68
0.732143
38
224
4.078947
0.605263
0.270968
0.154839
0.193548
0
0
0
0
0
0
0
0.005319
0.160714
224
8
69
28
0.819149
0
0
0
0
0
0.017857
0
0
0
0
0
0
1
0.166667
false
0
0.5
0
0.666667
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
452336c7da883264a6a9fc5a9af99cbd442654a4
44
py
Python
wetransfer/exc.py
fliot/py3wetransfer
11246c134bea1d2db47cf3de56edfe23b12fad61
[ "Apache-2.0" ]
19
2018-09-28T15:49:55.000Z
2021-11-16T10:51:58.000Z
wetransfer/exc.py
Sandyman/py3-wetransfer
11bb35961d374086dc9bf618406450b1187be422
[ "Apache-2.0" ]
7
2018-10-17T17:17:59.000Z
2019-12-10T09:35:54.000Z
wetransfer/exc.py
Sandyman/py3-wetransfer
11bb35961d374086dc9bf618406450b1187be422
[ "Apache-2.0" ]
7
2018-10-04T05:05:01.000Z
2021-01-29T10:52:26.000Z
class TransferError(RuntimeError): pass
14.666667
34
0.772727
4
44
8.5
1
0
0
0
0
0
0
0
0
0
0
0
0.159091
44
2
35
22
0.918919
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
18d7618c4d77728e502299e532650704f622f15d
18
py
Python
week-2/3-data-visualization/3. CMS Histgrams/tools/__init__.py
PCPUNMSM/Summer-School-2020
49fdf5b40a1f71e5da57836a98eb996d2beb17a1
[ "MIT" ]
10
2020-02-22T18:30:12.000Z
2021-11-14T19:24:23.000Z
week-2/3-data-visualization/3. CMS Histgrams/tools/__init__.py
PCPUNMSM/Summer-School-2020
49fdf5b40a1f71e5da57836a98eb996d2beb17a1
[ "MIT" ]
null
null
null
week-2/3-data-visualization/3. CMS Histgrams/tools/__init__.py
PCPUNMSM/Summer-School-2020
49fdf5b40a1f71e5da57836a98eb996d2beb17a1
[ "MIT" ]
4
2020-01-31T22:14:00.000Z
2020-02-08T16:37:08.000Z
from . import cms
9
17
0.722222
3
18
4.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.222222
18
1
18
18
0.928571
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
7a0bda6a1da51d3d27e0bdd2dff4b003e99d7929
31
py
Python
jange/apps/__init__.py
jangedoo/jange
7f6ee5c341f417cae9e60318fb00716b39b02c00
[ "Apache-2.0" ]
13
2020-10-28T05:28:03.000Z
2022-03-30T12:23:09.000Z
jange/apps/__init__.py
jangedoo/jange
7f6ee5c341f417cae9e60318fb00716b39b02c00
[ "Apache-2.0" ]
11
2020-07-13T20:07:49.000Z
2021-10-06T21:28:27.000Z
jange/apps/__init__.py
jangedoo/jange
7f6ee5c341f417cae9e60318fb00716b39b02c00
[ "Apache-2.0" ]
4
2020-11-18T00:03:44.000Z
2022-01-25T15:55:37.000Z
from .topic import topic_model
15.5
30
0.83871
5
31
5
0.8
0
0
0
0
0
0
0
0
0
0
0
0.129032
31
1
31
31
0.925926
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
e1401b9f3a88999f62bd9084334fb484f5d77e31
28
py
Python
tests/test_dummy.py
leanprover-community/leancrawler
8a1c4af8fff81966cac9045290e7fecb5416593d
[ "Apache-2.0" ]
12
2018-08-28T13:41:10.000Z
2021-09-16T18:47:38.000Z
tests/test_dummy.py
leanprover-community/leancrawler
8a1c4af8fff81966cac9045290e7fecb5416593d
[ "Apache-2.0" ]
6
2019-10-08T18:44:58.000Z
2022-02-13T13:35:18.000Z
tests/test_dummy.py
leanprover-community/leancrawler
8a1c4af8fff81966cac9045290e7fecb5416593d
[ "Apache-2.0" ]
3
2019-09-26T02:49:02.000Z
2022-02-08T06:10:36.000Z
from leancrawler import *
7
25
0.75
3
28
7
1
0
0
0
0
0
0
0
0
0
0
0
0.214286
28
3
26
9.333333
0.954545
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
e1616cdf39c05c34c59fbc7444d9417782986850
3,862
py
Python
tests/test_neurodiffeq.py
dapratama/neurodiffeq
0104f3789c0b483edfd41ca6bfb4636d39b3d024
[ "MIT" ]
null
null
null
tests/test_neurodiffeq.py
dapratama/neurodiffeq
0104f3789c0b483edfd41ca6bfb4636d39b3d024
[ "MIT" ]
null
null
null
tests/test_neurodiffeq.py
dapratama/neurodiffeq
0104f3789c0b483edfd41ca6bfb4636d39b3d024
[ "MIT" ]
null
null
null
import torch import pytest from neurodiffeq.neurodiffeq import safe_diff, unsafe_diff, diff N_SAMPLES = 10 def get_data(flatten_u=False, flatten_t=False, f=lambda x: x ** 2): t_shape = (N_SAMPLES,) if flatten_t else (N_SAMPLES, 1) u_shape = (N_SAMPLES,) if flatten_u else (N_SAMPLES, 1) t = torch.rand(t_shape, requires_grad=True) u = f(t).view(u_shape) return u, t def check_output(t, output, f_prime=lambda x: 2 * x): assert t.shape == output.shape assert torch.isclose(output, t * 2).all() def test_safe_diff(): with pytest.raises(ValueError): u, t = get_data(flatten_u=True, flatten_t=True) check_output(t, safe_diff(u, t)) with pytest.raises(ValueError): u, t = get_data(flatten_u=True, flatten_t=False) check_output(t, safe_diff(u, t)) with pytest.raises(ValueError): u, t = get_data(flatten_u=False, flatten_t=True) check_output(t, safe_diff(u, t)) u, t = get_data(flatten_u=False, flatten_t=False) check_output(t, safe_diff(u, t)) def test_unsafe_diff(): u, t = get_data(flatten_u=True, flatten_t=True) check_output(t, unsafe_diff(u, t)) u, t = get_data(flatten_u=True, flatten_t=False) check_output(t, unsafe_diff(u, t)) u, t = get_data(flatten_u=False, flatten_t=True) check_output(t, unsafe_diff(u, t)) u, t = get_data(flatten_u=False, flatten_t=False) check_output(t, unsafe_diff(u, t)) def test_diff(): # with default shape_check with pytest.raises(ValueError): u, t = get_data(flatten_u=True, flatten_t=True) check_output(t, diff(u, t)) with pytest.raises(ValueError): u, t = get_data(flatten_u=True, flatten_t=False) check_output(t, diff(u, t)) with pytest.raises(ValueError): u, t = get_data(flatten_u=False, flatten_t=True) check_output(t, diff(u, t)) u, t = get_data(flatten_u=False, flatten_t=False) check_output(t, diff(u, t)) # with shape_check = True with pytest.raises(ValueError): u, t = get_data(flatten_u=True, flatten_t=True) check_output(t, diff(u, t, shape_check=True)) with pytest.raises(ValueError): u, t = get_data(flatten_u=True, flatten_t=False) check_output(t, diff(u, t, shape_check=True)) with pytest.raises(ValueError): u, t = get_data(flatten_u=False, flatten_t=True) check_output(t, diff(u, t, shape_check=True)) u, t = get_data(flatten_u=False, flatten_t=False) check_output(t, diff(u, t, shape_check=True)) # with shape_check = False u, t = get_data(flatten_u=False, flatten_t=False) check_output(t, diff(u, t)) u, t = get_data(flatten_u=True, flatten_t=True) check_output(t, diff(u, t, shape_check=False)) u, t = get_data(flatten_u=True, flatten_t=False) check_output(t, diff(u, t, shape_check=False)) u, t = get_data(flatten_u=False, flatten_t=True) check_output(t, diff(u, t, shape_check=False)) u, t = get_data(flatten_u=False, flatten_t=False) check_output(t, diff(u, t, shape_check=False)) def test_higher_order_derivatives(): u, t = get_data(flatten_u=False, flatten_t=False, f=lambda x: x ** 2) assert torch.isclose(diff(u, t), t * 2).all() assert torch.isclose(diff(u, t, order=2), 2 * torch.ones_like(t)).all() for order in range(3, 10): assert torch.isclose(diff(u, t, order=order), torch.zeros_like(t)).all() u, t = get_data(flatten_u=False, flatten_t=False, f=torch.exp) for order in range(1, 10): assert torch.isclose(diff(u, t, order=order), u).all() def test_legacy_siganature(): u, t = get_data(flatten_u=False, flatten_t=False) with pytest.warns(FutureWarning): diff(x=u, t=t) with pytest.warns(FutureWarning): safe_diff(x=u, t=t) with pytest.warns(FutureWarning): unsafe_diff(x=u, t=t)
36.093458
80
0.666494
653
3,862
3.719755
0.088821
0.043639
0.064224
0.154385
0.799506
0.772334
0.762454
0.750515
0.750515
0.691231
0
0.005486
0.197566
3,862
106
81
36.433962
0.778316
0.018902
0
0.654762
0
0
0
0
0
0
0
0
0.071429
1
0.083333
false
0
0.035714
0
0.130952
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
e179b161d22db52331ded9a3ba7a151db41f8426
60
py
Python
tests/api/endpoints/test_bel.py
belbio/bel
14ff8e543a679e7dfff3f38f31c0f91ffd55e4d8
[ "Apache-2.0" ]
6
2018-01-31T21:25:40.000Z
2020-11-18T16:43:56.000Z
tests/api/endpoints/test_bel.py
belbio/bel
14ff8e543a679e7dfff3f38f31c0f91ffd55e4d8
[ "Apache-2.0" ]
83
2018-01-03T17:31:49.000Z
2021-12-13T19:50:17.000Z
tests/api/endpoints/test_bel.py
belbio/bel
14ff8e543a679e7dfff3f38f31c0f91ffd55e4d8
[ "Apache-2.0" ]
2
2019-04-12T20:42:06.000Z
2020-07-17T02:49:03.000Z
# Standard Library import json # Third Party import pytest
10
18
0.783333
8
60
5.875
0.875
0
0
0
0
0
0
0
0
0
0
0
0.183333
60
5
19
12
0.959184
0.466667
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
e1a94daa9af41fe23fb602a492db6de5924fda0c
2,751
py
Python
hubconf.py
shubham1206agra/pretrained-models.pytorch
a2940f79dd65656eabe5a0cd6d5d014ef1fc2523
[ "BSD-3-Clause" ]
null
null
null
hubconf.py
shubham1206agra/pretrained-models.pytorch
a2940f79dd65656eabe5a0cd6d5d014ef1fc2523
[ "BSD-3-Clause" ]
null
null
null
hubconf.py
shubham1206agra/pretrained-models.pytorch
a2940f79dd65656eabe5a0cd6d5d014ef1fc2523
[ "BSD-3-Clause" ]
null
null
null
dependencies = ['torch', 'torchvision', 'munch', 'tqdm'] from pretrainedmodels.models.fbresnet import fbresnet152 from pretrainedmodels.models.cafferesnet import cafferesnet101 from pretrainedmodels.models.bninception import bninception from pretrainedmodels.models.resnext import resnext101_32x4d from pretrainedmodels.models.resnext import resnext101_64x4d from pretrainedmodels.models.inceptionv4 import inceptionv4 from pretrainedmodels.models.inceptionresnetv2 import inceptionresnetv2 from pretrainedmodels.models.nasnet import nasnetalarge from pretrainedmodels.models.nasnet_mobile import nasnetamobile from pretrainedmodels.models.torchvision_models import alexnet from pretrainedmodels.models.torchvision_models import densenet121 from pretrainedmodels.models.torchvision_models import densenet169 from pretrainedmodels.models.torchvision_models import densenet201 from pretrainedmodels.models.torchvision_models import densenet161 from pretrainedmodels.models.torchvision_models import resnet18 from pretrainedmodels.models.torchvision_models import resnet34 from pretrainedmodels.models.torchvision_models import resnet50 from pretrainedmodels.models.torchvision_models import resnet101 from pretrainedmodels.models.torchvision_models import resnet152 from pretrainedmodels.models.torchvision_models import inceptionv3 from pretrainedmodels.models.torchvision_models import squeezenet1_0 from pretrainedmodels.models.torchvision_models import squeezenet1_1 from pretrainedmodels.models.torchvision_models import vgg11 from pretrainedmodels.models.torchvision_models import vgg11_bn from pretrainedmodels.models.torchvision_models import vgg13 from pretrainedmodels.models.torchvision_models import vgg13_bn from pretrainedmodels.models.torchvision_models import vgg16 from pretrainedmodels.models.torchvision_models import vgg16_bn from pretrainedmodels.models.torchvision_models import vgg19_bn from pretrainedmodels.models.torchvision_models import vgg19 from pretrainedmodels.models.dpn import dpn68 from pretrainedmodels.models.dpn import dpn68b from pretrainedmodels.models.dpn import dpn92 from pretrainedmodels.models.dpn import dpn98 from pretrainedmodels.models.dpn import dpn131 from pretrainedmodels.models.dpn import dpn107 from pretrainedmodels.models.xception import xception from pretrainedmodels.models.senet import senet154 from pretrainedmodels.models.senet import se_resnet50 from pretrainedmodels.models.senet import se_resnet101 from pretrainedmodels.models.senet import se_resnet152 from pretrainedmodels.models.senet import se_resnext50_32x4d from pretrainedmodels.models.senet import se_resnext101_32x4d from pretrainedmodels.models.pnasnet import pnasnet5large from pretrainedmodels.models.polynet import polynet
57.3125
71
0.89422
312
2,751
7.766026
0.185897
0.37144
0.482872
0.320677
0.695419
0.574494
0.231118
0.046224
0
0
0
0.040562
0.067975
2,751
47
72
58.531915
0.904446
0
0
0
0
0
0.009088
0
0
0
0
0
0
1
0
false
0
0.978261
0
0.978261
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
e1b14d7f5798fb299edb584c3089ceb9037f42da
145
py
Python
ample/util/version.py
fsimkovic/ample
c3c2196ca292e831e3cd8d15e3d3079bb6609848
[ "BSD-3-Clause" ]
6
2017-03-17T14:43:14.000Z
2021-08-06T07:07:14.000Z
ample/util/version.py
fsimkovic/ample
c3c2196ca292e831e3cd8d15e3d3079bb6609848
[ "BSD-3-Clause" ]
47
2017-03-17T14:37:09.000Z
2021-01-28T10:22:15.000Z
ample/util/version.py
fsimkovic/ample
c3c2196ca292e831e3cd8d15e3d3079bb6609848
[ "BSD-3-Clause" ]
6
2017-09-26T08:45:09.000Z
2020-03-19T14:26:49.000Z
__version_info__ = (1, 5, 5) __version__ = '.'.join(str(v) for v in __version_info__) __git_revno__ = "3b9cd7076b27f40eda31c1194e50801878237e90"
36.25
58
0.77931
17
145
5.529412
0.705882
0.234043
0
0
0
0
0
0
0
0
0
0.246154
0.103448
145
3
59
48.333333
0.476923
0
0
0
0
0
0.282759
0.275862
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
beddc16ac094efb495d02c61a408cbd0376f9495
805
py
Python
tests/test_app_other_name.py
Kludex/typer-cli
a8000afa67ec8b05238e3ee02910eca5d3c1ef16
[ "MIT" ]
187
2020-03-08T23:27:42.000Z
2022-03-23T20:53:16.000Z
tests/test_app_other_name.py
Kludex/typer-cli
a8000afa67ec8b05238e3ee02910eca5d3c1ef16
[ "MIT" ]
53
2020-03-08T19:00:38.000Z
2022-03-25T13:04:11.000Z
tests/test_app_other_name.py
Kludex/typer-cli
a8000afa67ec8b05238e3ee02910eca5d3c1ef16
[ "MIT" ]
17
2020-06-29T03:10:50.000Z
2022-03-11T18:25:50.000Z
import subprocess def test_script_help(): result = subprocess.run( [ "coverage", "run", "-m", "typer_cli", "tests/assets/app_other_name.py", "run", "--help", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", ) assert "--name" in result.stdout def test_script(): result = subprocess.run( [ "coverage", "run", "-m", "typer_cli", "tests/assets/app_other_name.py", "run", "--name", "Camila", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", ) assert "Hello Camila" in result.stdout
20.641026
45
0.449689
71
805
4.971831
0.394366
0.15864
0.073654
0.152975
0.708215
0.708215
0.708215
0.708215
0.708215
0.708215
0
0.004264
0.417391
805
38
46
21.184211
0.748401
0
0
0.647059
0
0
0.193789
0.074534
0
0
0
0
0.058824
1
0.058824
false
0
0.029412
0
0.088235
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
bee3a27822baf93e423b4369f079e9cc8abe8994
5,389
py
Python
contrib/.venv/lib/python3.8/site-packages/fastecdsa/tests/test_rfc6979_ecdsa.py
jtatman/katersltc-client
7ea88bfa32e9bdce9bf8d434a8909a07b65412f7
[ "MIT" ]
219
2016-05-01T14:19:09.000Z
2022-03-29T00:58:42.000Z
contrib/.venv/lib/python3.8/site-packages/fastecdsa/tests/test_rfc6979_ecdsa.py
jtatman/katersltc-client
7ea88bfa32e9bdce9bf8d434a8909a07b65412f7
[ "MIT" ]
80
2016-04-05T10:35:13.000Z
2022-03-15T19:05:45.000Z
contrib/.venv/lib/python3.8/site-packages/fastecdsa/tests/test_rfc6979_ecdsa.py
jtatman/katersltc-client
7ea88bfa32e9bdce9bf8d434a8909a07b65412f7
[ "MIT" ]
74
2016-08-19T06:35:03.000Z
2022-03-20T04:29:58.000Z
from hashlib import sha1, sha224, sha256, sha384, sha512 from re import findall, DOTALL from urllib.request import urlopen from unittest import TestCase from ..curve import P192, P224, P256, P384, P521 from ..ecdsa import sign from ..util import RFC6979 class TestRFC6979ECDSA(TestCase): @classmethod def setUpClass(cls): cls.rfc6979_text = urlopen('https://tools.ietf.org/rfc/rfc6979.txt').read().decode() cls.hash_lookup = { '1': sha1, '224': sha224, '256': sha256, '384': sha384, '512': sha512 } def test_p192_rfc6979_ecdsa(self): curve_tests = findall(r'curve: NIST P-192(.*)curve: NIST P-224', self.rfc6979_text, flags=DOTALL)[0] q = int(findall(r'q = ([0-9A-F]*)', curve_tests)[0], 16) x = int(findall(r'x = ([0-9A-F]*)', curve_tests)[0], 16) test_regex = r'With SHA-(\d+), message = "([a-zA-Z]*)":\n' \ r'\s*k = ([0-9A-F]*)\n' \ r'\s*r = ([0-9A-F]*)\n' \ r'\s*s = ([0-9A-F]*)\n' for test in findall(test_regex, curve_tests): h = self.hash_lookup[test[0]] msg = test[1] k = int(test[2], 16) r = int(test[3], 16) s = int(test[4], 16) self.assertEqual(k, RFC6979(msg, x, q, h).gen_nonce()) self.assertEqual((r, s), sign(msg, x, curve=P192, hashfunc=h)) def test_p224_rfc6979_ecdsa(self): curve_tests = findall(r'curve: NIST P-224(.*)curve: NIST P-256', self.rfc6979_text, flags=DOTALL)[0] q = int(findall(r'q = ([0-9A-F]*)', curve_tests)[0], 16) x = int(findall(r'x = ([0-9A-F]*)', curve_tests)[0], 16) test_regex = r'With SHA-(\d+), message = "([a-zA-Z]*)":\n' \ r'\s*k = ([0-9A-F]*)\n' \ r'\s*r = ([0-9A-F]*)\n' \ r'\s*s = ([0-9A-F]*)\n' for test in findall(test_regex, curve_tests): h = self.hash_lookup[test[0]] msg = test[1] k = int(test[2], 16) r = int(test[3], 16) s = int(test[4], 16) self.assertEqual(k, RFC6979(msg, x, q, h).gen_nonce()) self.assertEqual((r, s), sign(msg, x, curve=P224, hashfunc=h)) def test_p256_rfc6979_ecdsa(self): curve_tests = findall(r'curve: NIST P-256(.*)curve: NIST P-384', self.rfc6979_text, flags=DOTALL)[0] q = int(findall(r'q = ([0-9A-F]*)', curve_tests)[0], 16) x = int(findall(r'x = ([0-9A-F]*)', curve_tests)[0], 16) test_regex = r'With SHA-(\d+), message = "([a-zA-Z]*)":\n' \ r'\s*k = ([0-9A-F]*)\n' \ r'\s*r = ([0-9A-F]*)\n' \ r'\s*s = ([0-9A-F]*)\n' for test in findall(test_regex, curve_tests): h = self.hash_lookup[test[0]] msg = test[1] k = int(test[2], 16) r = int(test[3], 16) s = int(test[4], 16) self.assertEqual(k, RFC6979(msg, x, q, h).gen_nonce()) self.assertEqual((r, s), sign(msg, x, curve=P256, hashfunc=h)) def test_p384_rfc6979_ecdsa(self): curve_tests = findall(r'curve: NIST P-384(.*)curve: NIST P-521', self.rfc6979_text, flags=DOTALL)[0] q_parts = findall(r'q = ([0-9A-F]*)\n\s*([0-9A-F]*)', curve_tests)[0] q = int(q_parts[0] + q_parts[1], 16) x_parts = findall(r'x = ([0-9A-F]*)\n\s*([0-9A-F]*)', curve_tests)[0] x = int(x_parts[0] + x_parts[1], 16) test_regex = r'With SHA-(\d+), message = "([a-zA-Z]*)":\n' \ r'\s*k = ([0-9A-F]*)\n\s*([0-9A-F]*)\n' \ r'\s*r = ([0-9A-F]*)\n\s*([0-9A-F]*)\n' \ r'\s*s = ([0-9A-F]*)\n\s*([0-9A-F]*)\n' for test in findall(test_regex, curve_tests): h = self.hash_lookup[test[0]] msg = test[1] k = int(test[2] + test[3], 16) r = int(test[4] + test[5], 16) s = int(test[6] + test[7], 16) self.assertEqual(k, RFC6979(msg, x, q, h).gen_nonce()) self.assertEqual((r, s), sign(msg, x, curve=P384, hashfunc=h)) def test_p521_rfc6979_ecdsa(self): curve_tests = findall(r'curve: NIST P-521(.*)curve: NIST K-163', self.rfc6979_text, flags=DOTALL)[0] q_parts = findall(r'q = ([0-9A-F]*)\n\s*([0-9A-F]*)\n\s*([0-9A-F]*)', curve_tests)[0] q = int(q_parts[0] + q_parts[1] + q_parts[2], 16) x_parts = findall(r'x = ([0-9A-F]*)\n\s*([0-9A-F]*)\n\s*([0-9A-F]*)', curve_tests)[0] x = int(x_parts[0] + x_parts[1] + x_parts[2], 16) test_regex = r'With SHA-(\d+), message = "([a-zA-Z]*)":\n' \ r'\s*k = ([0-9A-F]*)\n\s*([0-9A-F]*)\n\s*([0-9A-F]*)\n' \ r'\s*r = ([0-9A-F]*)\n\s*([0-9A-F]*)\n\s*([0-9A-F]*)\n' \ r'\s*s = ([0-9A-F]*)\n\s*([0-9A-F]*)\n\s*([0-9A-F]*)\n' for test in findall(test_regex, curve_tests): h = self.hash_lookup[test[0]] msg = test[1] k = int(test[2] + test[3] + test[4], 16) r = int(test[5] + test[6] + test[7], 16) s = int(test[8] + test[9] + test[10], 16) self.assertEqual(k, RFC6979(msg, x, q, h).gen_nonce()) self.assertEqual((r, s), sign(msg, x, curve=P521, hashfunc=h))
41.137405
108
0.485804
867
5,389
2.931949
0.10842
0.047207
0.062943
0.059009
0.746656
0.738002
0.738002
0.738002
0.738002
0.738002
0
0.100237
0.29653
5,389
130
109
41.453846
0.570298
0
0
0.480392
0
0.078431
0.211728
0.067174
0
0
0
0
0.098039
1
0.058824
false
0
0.068627
0
0.137255
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
8363d154166ecc1c41f4d47f257f5f03a4214eb0
47
py
Python
bin/og.py
ccwoolfolk/optimalgroups
6da560abe0e04526f8b57bb9fa6f0b51abbd6f98
[ "BlueOak-1.0.0" ]
null
null
null
bin/og.py
ccwoolfolk/optimalgroups
6da560abe0e04526f8b57bb9fa6f0b51abbd6f98
[ "BlueOak-1.0.0" ]
null
null
null
bin/og.py
ccwoolfolk/optimalgroups
6da560abe0e04526f8b57bb9fa6f0b51abbd6f98
[ "BlueOak-1.0.0" ]
null
null
null
from optimalgroups import main main.optimize()
15.666667
30
0.829787
6
47
6.5
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.106383
47
2
31
23.5
0.928571
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
55cac653f3286c724124d33185d1ac981ee642e4
110
py
Python
vectordash/__init__.py
MaskRay/vectordash-cli
63f95c341181080dafd8ca6f9f31ee3b4bfea7c1
[ "Apache-2.0" ]
null
null
null
vectordash/__init__.py
MaskRay/vectordash-cli
63f95c341181080dafd8ca6f9f31ee3b4bfea7c1
[ "Apache-2.0" ]
null
null
null
vectordash/__init__.py
MaskRay/vectordash-cli
63f95c341181080dafd8ca6f9f31ee3b4bfea7c1
[ "Apache-2.0" ]
null
null
null
API_URL = "https://vectordash.com/api/list_machines/" TOKEN_URL = "https://vectordash.com/edit/verification/"
36.666667
55
0.763636
15
110
5.4
0.666667
0.197531
0.444444
0.518519
0
0
0
0
0
0
0
0
0.054545
110
2
56
55
0.778846
0
0
0
0
0
0.745455
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
55d67914e4ab04f4b8c981363edddca08ffc800b
163
py
Python
cake/errors.py
alexcepoi/cake
0fde58dfea1fdbfd632816d5850b47cb0f9ece64
[ "MIT" ]
1
2017-05-20T16:10:54.000Z
2017-05-20T16:10:54.000Z
cake/errors.py
alexcepoi/cake
0fde58dfea1fdbfd632816d5850b47cb0f9ece64
[ "MIT" ]
null
null
null
cake/errors.py
alexcepoi/cake
0fde58dfea1fdbfd632816d5850b47cb0f9ece64
[ "MIT" ]
null
null
null
#! /usr/bin/env python # -*- coding: utf-8 -*- class CakeError(Exception): def __init__(self, name): self.name = name def __str__(self): return self.name
14.818182
27
0.656442
23
163
4.304348
0.695652
0.242424
0
0
0
0
0
0
0
0
0
0.007463
0.177914
163
10
28
16.3
0.731343
0.263804
0
0
0
0
0
0
0
0
0
0
0
1
0.4
false
0
0
0.2
0.8
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
55d6bcde02b781641fef43913ce51f17d5df12f5
2,486
py
Python
auth0_client/commands/custom_domains.py
rubelw/auth0_client
51e68239babcf7c40e40491d1aaa3f8547a67f63
[ "MIT" ]
2
2020-10-08T21:42:56.000Z
2021-03-21T08:17:52.000Z
auth0_client/commands/custom_domains.py
rubelw/auth0_client
51e68239babcf7c40e40491d1aaa3f8547a67f63
[ "MIT" ]
null
null
null
auth0_client/commands/custom_domains.py
rubelw/auth0_client
51e68239babcf7c40e40491d1aaa3f8547a67f63
[ "MIT" ]
null
null
null
import click from auth0_client.Auth0Client import Auth0Client from auth0_client.cli_util import ( get_config_dict, group, highlight) @group(short_help='Custom Domains') def custom_domains(): """ Connections """ custom_domains.help = highlight(custom_domains.help, ['Create:', 'Delete:', 'Update:'], 'green') @custom_domains.command() @click.option('--ini', '-i', help='INI file with needed information', required=True) @click.option('--debug', help='Turn on debugging', required=False, is_flag=True) def get_custom_domain_configurations( ini, debug ): client = Auth0Client(get_config_dict(ini, debug)) print(client.get_custom_domains()) @custom_domains.command() @click.option('--ini', '-i', help='INI file with needed information', required=True) @click.option('--body', '-b', help='body', required=True) @click.option('--debug', help='Turn on debugging', required=False, is_flag=True) def configure_new_custom_domain( ini, body, debug ): client = Auth0Client(get_config_dict(ini, debug)) print(client.create_new_custom_domain(body=body)) @custom_domains.command() @click.option('--ini', '-i', help='INI file with needed information', required=True) @click.option('--domain-id', '-d', help='domain id', required=True) @click.option('--debug', help='Turn on debugging', required=False, is_flag=True) def get_custom_domain_configuration( ini, domain_id, debug ): client = Auth0Client(get_config_dict(ini, debug)) print(client.get_custom_domain(id=domain_id)) @custom_domains.command() @click.option('--ini', '-i', help='INI file with needed information', required=True) @click.option('--domain-id', '-d', help='domain id', required=True) @click.option('--debug', help='Turn on debugging', required=False, is_flag=True) def delete_custom_domain_configuration( ini, domain_id, debug ): client = Auth0Client(get_config_dict(ini, debug)) print(client.delete_custom_domain(id=domain_id)) @custom_domains.command() @click.option('--ini', '-i', help='INI file with needed information', required=True) @click.option('--domain-id', '-d', help='domain id', required=True) @click.option('--debug', help='Turn on debugging', required=False, is_flag=True) def verify_a_custom_domain( ini, domain_id, debug ): client = Auth0Client(get_config_dict(ini, debug)) print(client.verify_custom_domain(id=domain_id))
32.285714
96
0.695093
326
2,486
5.113497
0.159509
0.071986
0.091782
0.124175
0.782244
0.769046
0.769046
0.769046
0.769046
0.769046
0
0.004247
0.147627
2,486
76
97
32.710526
0.782445
0.004425
0
0.694915
0
0
0.175588
0
0
0
0
0
0
1
0.101695
false
0
0.050847
0
0.152542
0.084746
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
55d866c9d665407ffbf55319aab1c9721b7991f6
105
py
Python
Contest/ABC049/c/main.py
mpses/AtCoder
9c101fcc0a1394754fcf2385af54b05c30a5ae2a
[ "CC0-1.0" ]
null
null
null
Contest/ABC049/c/main.py
mpses/AtCoder
9c101fcc0a1394754fcf2385af54b05c30a5ae2a
[ "CC0-1.0" ]
null
null
null
Contest/ABC049/c/main.py
mpses/AtCoder
9c101fcc0a1394754fcf2385af54b05c30a5ae2a
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python3 import re print("YES" if re.fullmatch("(eraser?|dream(er)?)+", input()) else "NO")
35
72
0.657143
17
105
4.058824
0.941176
0
0
0
0
0
0
0
0
0
0
0.010417
0.085714
105
3
72
35
0.708333
0.2
0
0
0
0
0.309524
0.25
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
1
0
5
360077205ffd416c18fa3c57a03ed69f31ce9ebc
3,888
py
Python
src/examples/pin/callback_signals.py
flokli/Triton
db520a9da012b28f23321ff082aa810e1f1552ff
[ "Apache-2.0" ]
1
2018-10-09T12:08:55.000Z
2018-10-09T12:08:55.000Z
src/examples/pin/callback_signals.py
flokli/Triton
db520a9da012b28f23321ff082aa810e1f1552ff
[ "Apache-2.0" ]
null
null
null
src/examples/pin/callback_signals.py
flokli/Triton
db520a9da012b28f23321ff082aa810e1f1552ff
[ "Apache-2.0" ]
1
2018-10-09T12:08:44.000Z
2018-10-09T12:08:44.000Z
from triton import ARCH, SYMEXPR from pintool import * # Output # # $ ./build/triton ./src/examples/pin/callback_signals.py ./src/samples/others/signals # Signal 11 received on thread 0. # ========================== DUMP ========================== # rax: 0x00000000000000 ((_ zero_extend 32) (_ bv234 32)) # rbx: 0x00000000000000 UNSET # rcx: 0x00000000001ba4 ((_ zero_extend 32) ((_ extract 31 0) #81)) # rdx: 0x0000000000000b ((_ sign_extend 32) ((_ extract 31 0) #34)) # rdi: 0x00000000001ba4 ((_ sign_extend 32) ((_ extract 31 0) #83)) # rsi: 0x00000000001ba4 ((_ sign_extend 32) ((_ extract 31 0) #90)) # rbp: 0x007fff097e3540 ((_ extract 63 0) #0) # rsp: 0x007fff097e3528 (bvsub ((_ extract 63 0) #47) (_ bv8 64)) # rip: 0x007f3fa0735ea7 (_ bv139911251582629 64) # r8: 0x007f3fa0a94c80 UNSET # r9: 0x007f3fb671b120 UNSET # r10: 0x00000000000000 UNSET # r11: 0x007f3fa0735e70 UNSET # r12: 0x00000000400460 UNSET # r13: 0x007fff097e3620 UNSET # r14: 0x00000000000000 UNSET # r15: 0x00000000000000 UNSET # xmm0: 0x000000ff000000 UNSET # xmm1: 0x2f2f2f2f2f2f2f2f2f2f2f2f2f2f2f2f UNSET # xmm2: 0x00000000000000 UNSET # xmm3: 0x00ff000000ff00 UNSET # xmm4: 0x000000000000ff UNSET # xmm5: 0x00000000000000 UNSET # xmm6: 0x00000000000000 UNSET # xmm7: 0x00000000000000 UNSET # xmm8: 0x00000000000000 UNSET # xmm9: 0x00000000000000 UNSET # xmm10: 0x00000000000000 UNSET # xmm11: 0x00000000000000 UNSET # xmm12: 0x00000000000000 UNSET # xmm13: 0x00000000000000 UNSET # xmm14: 0x00000000000000 UNSET # xmm15: 0x00000000000000 UNSET # af: 0x00000000000000 (ite (= (_ bv16 64) (bvand (_ bv16 64) (bvxor #12 (bvxor ((_ extract 63 0) #0) (_ bv16 64))))) (_ bv1 1) (_ bv0 1)) # cf: 0x00000000000000 (_ bv0 1) # df: 0x00000000000000 UNSET # if: 0x00000000000001 UNSET # of: 0x00000000000000 (_ bv0 1) # pd: 0x00000000000001 (ite (= (parity_flag ((_ extract 7 0) #73)) (_ bv0 1)) (_ bv1 1) (_ bv0 1)) # sf: 0x00000000000000 (ite (= ((_ extract 31 31) #73) (_ bv1 1)) (_ bv1 1) (_ bv0 1)) # tf: 0x00000000000000 UNSET # zf: 0x00000000000001 (ite (= #73 (_ bv0 32)) (_ bv1 1) (_ bv0 1)) def signals(threadId, sig): print 'Signal %d received on thread %d.' %(sig, threadId) print '========================== DUMP ==========================' regs = getTritonContext().getParentRegisters() for reg in regs: value = getCurrentRegisterValue(reg) expr = getTritonContext().getSymbolicRegister(reg) print '%s:\t%#016x\t%s' %(reg.getName(), value, (expr.getAst() if expr is not None else 'UNSET')) return if __name__ == '__main__': # Start the symbolic analysis from the Entry point startAnalysisFromEntry() # Add a callback. insertCall(signals, INSERT_POINT.SIGNALS) # Run the instrumentation - Never returns runProgram()
51.84
166
0.488169
315
3,888
5.869841
0.488889
0.204435
0.03245
0.036777
0.072472
0.053002
0.041103
0
0
0
0
0.323694
0.404064
3,888
74
167
52.540541
0.47432
0.803755
0
0
0
0
0.168571
0.074286
0
0
0
0
0
0
null
null
0
0.133333
null
null
0.2
0
0
0
null
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
1
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
5
368b8cae68c5fa001ad3c622f628db835a878f6d
78
py
Python
pettingzoo/butterfly/pistonball_v6.py
RedTachyon/PettingZoo
0c4be0ca0de5a11bf8eff3f7b87976edcacd093e
[ "Apache-2.0" ]
846
2020-05-12T05:55:00.000Z
2021-10-08T19:38:40.000Z
pettingzoo/butterfly/pistonball_v6.py
RedTachyon/PettingZoo
0c4be0ca0de5a11bf8eff3f7b87976edcacd093e
[ "Apache-2.0" ]
237
2020-04-27T06:01:39.000Z
2021-10-13T02:55:54.000Z
pettingzoo/butterfly/pistonball_v6.py
RedTachyon/PettingZoo
0c4be0ca0de5a11bf8eff3f7b87976edcacd093e
[ "Apache-2.0" ]
126
2020-05-29T04:20:29.000Z
2021-10-13T05:31:12.000Z
from .pistonball.pistonball import env, manual_control, parallel_env, raw_env
39
77
0.846154
11
78
5.727273
0.727273
0
0
0
0
0
0
0
0
0
0
0
0.089744
78
1
78
78
0.887324
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
36901edccb1750fe738d89842b3a4d734738dbf2
120
py
Python
py_misc/py_2.py
StanLepunK/PYTHON_basics
da803bd72824de281677f3ba4c5d7bd44a7460fb
[ "MIT" ]
null
null
null
py_misc/py_2.py
StanLepunK/PYTHON_basics
da803bd72824de281677f3ba4c5d7bd44a7460fb
[ "MIT" ]
null
null
null
py_misc/py_2.py
StanLepunK/PYTHON_basics
da803bd72824de281677f3ba4c5d7bd44a7460fb
[ "MIT" ]
null
null
null
a = -1 if a > 0: print("a c'est mieux que zéro") elif a == 0: print("a c'est null") else: print("la tete sous l'eau")
17.142857
32
0.591667
27
120
2.62963
0.666667
0.056338
0.197183
0.225352
0.338028
0.338028
0
0
0
0
0
0.031915
0.216667
120
7
33
17.142857
0.723404
0
0
0
0
0
0.429752
0
0
0
0
0
0
1
0
false
0
0
0
0
0.428571
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
369d57894641b7ab1e6f1196cb6c24b2ec162b65
74
py
Python
eeyore/integrators/__init__.py
papamarkou/eeyore
4cd9b5a619cd095035aa93f348d1c937629aa8a3
[ "MIT" ]
6
2020-04-22T18:56:46.000Z
2021-09-09T15:57:48.000Z
eeyore/integrators/__init__.py
papamarkou/eeyore
4cd9b5a619cd095035aa93f348d1c937629aa8a3
[ "MIT" ]
19
2019-11-14T21:22:21.000Z
2020-10-31T16:18:36.000Z
eeyore/integrators/__init__.py
scidom/eeyore
4cd9b5a619cd095035aa93f348d1c937629aa8a3
[ "MIT" ]
null
null
null
from .integrator import Integrator from .mcintegrator import MCIntegrator
24.666667
38
0.864865
8
74
8
0.5
0
0
0
0
0
0
0
0
0
0
0
0.108108
74
2
39
37
0.969697
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
36a3163c28e81dc1d9e5110f0ad168ab80a9545b
1,281
py
Python
codewars/4kyu/dinamuh/SudokuSolutionValidator/test.py
dinamuh/Training_one
d18e8fb12608ce1753162c20252ca928c4df97ab
[ "MIT" ]
null
null
null
codewars/4kyu/dinamuh/SudokuSolutionValidator/test.py
dinamuh/Training_one
d18e8fb12608ce1753162c20252ca928c4df97ab
[ "MIT" ]
2
2019-01-22T10:53:42.000Z
2019-01-31T08:02:48.000Z
codewars/4kyu/dinamuh/SudokuSolutionValidator/test.py
dinamuh/Training_one
d18e8fb12608ce1753162c20252ca928c4df97ab
[ "MIT" ]
13
2019-01-22T10:37:42.000Z
2019-01-25T13:30:43.000Z
from main import validSolution def test_areYouPlayingBanjo(benchmark): assert benchmark(validSolution, [[5, 3, 4, 6, 7, 8, 9, 1, 2], [6, 7, 2, 1, 9, 5, 3, 4, 8], [1, 9, 8, 3, 4, 2, 5, 6, 7], [8, 5, 9, 7, 6, 1, 4, 2, 3], [4, 2, 6, 8, 5, 3, 7, 9, 1], [7, 1, 3, 9, 2, 4, 8, 5, 6], [9, 6, 1, 5, 3, 7, 2, 8, 4], [2, 8, 7, 4, 1, 9, 6, 3, 5], [3, 4, 5, 2, 8, 6, 1, 7, 9]]) == True assert benchmark(validSolution, [[5, 3, 4, 6, 7, 8, 9, 1, 2], [6, 7, 2, 1, 9, 0, 3, 4, 9], [1, 0, 0, 3, 4, 2, 5, 6, 0], [8, 5, 9, 7, 6, 1, 0, 2, 0], [4, 2, 6, 8, 5, 3, 7, 9, 1], [7, 1, 3, 9, 2, 4, 8, 5, 6], [9, 0, 1, 5, 3, 7, 2, 1, 4], [2, 8, 7, 4, 1, 9, 6, 3, 5], [3, 0, 0, 4, 8, 1, 1, 7, 9]]) == False
53.375
75
0.225605
178
1,281
1.617978
0.117978
0.0625
0.041667
0.201389
0.611111
0.541667
0.5
0.5
0.5
0.5
0
0.322709
0.608119
1,281
23
76
55.695652
0.250996
0
0
0.4
0
0
0
0
0
0
0
0
0.1
1
0.05
false
0
0.05
0
0.1
0
0
0
1
null
0
0
1
0
0
0
0
0
0
0
1
1
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
5