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
beec5c42019bf790f7eff3d7e22e90a1e3ff9437
6,463
py
Python
tests/test_layer.py
deppen8/prospect
fbde75e57fef967643ca0f4c43fe53004d11da70
[ "MIT" ]
null
null
null
tests/test_layer.py
deppen8/prospect
fbde75e57fef967643ca0f4c43fe53004d11da70
[ "MIT" ]
9
2021-02-02T03:40:32.000Z
2021-09-10T13:35:05.000Z
tests/test_layer.py
deppen8/prospect
fbde75e57fef967643ca0f4c43fe53004d11da70
[ "MIT" ]
null
null
null
import pytest from geopandas import GeoDataFrame import prospect def test_returns_Layer(a_layer): assert isinstance(a_layer, prospect.Layer) def test_has_desired_attributes(a_layer): for a in ["name", "input_features", "df"]: assert hasattr(a_layer, a) def test_name_attribute_str(a_layer): assert isinstance(a_layer.name, str) def test_input_features_attribute_List_Features(a_layer): assert isinstance(a_layer.input_features, list) assert all( isinstance(feature, prospect.Feature) for feature in a_layer.input_features ) def test_df_attribute_gdf(a_layer): assert isinstance(a_layer.df, GeoDataFrame) def test_from_shapefile_returns_Layer(a_area_layer_shapefile_path_pair): area = prospect.Area.from_shapefile( name="test_area_from_shapefile", path=a_area_layer_shapefile_path_pair[0] ) layer = prospect.Layer.from_shapefile( path=a_area_layer_shapefile_path_pair[1], name="test_layer_from_shapefile", area=area, ) assert isinstance(layer, prospect.Layer) def test_from_shapefile_has_desired_attributes(a_layer_from_shapefile): for a in ["name", "input_features", "df"]: assert hasattr(a_layer_from_shapefile, a) def test_from_shapefile_name_attribute_str(a_layer_from_shapefile): assert isinstance(a_layer_from_shapefile.name, str) def test_from_shapefile_input_features_attribute_List_Features(a_layer_from_shapefile): assert isinstance(a_layer_from_shapefile.input_features, list) assert all( isinstance(feature, prospect.Feature) for feature in a_layer_from_shapefile.input_features ) def test_from_shapefile_df_attribute_gdf(a_layer_from_shapefile): assert isinstance(a_layer_from_shapefile.df, GeoDataFrame) def test_from_pseudorandom_pts_returns_Layer(an_area_from_shapefile): layer = prospect.Layer.from_pseudorandom_points( n=25, name="layer_from_pseudorandom_pts", area=an_area_from_shapefile ) assert isinstance(layer, prospect.Layer) def test_from_pseudorandom_pts_has_desired_attributes(a_layer_from_pseudorandom_points): for a in ["name", "input_features", "df"]: assert hasattr(a_layer_from_pseudorandom_points, a) def test_from_pseudorandom_pts_name_attribute_str(a_layer_from_pseudorandom_points): assert isinstance(a_layer_from_pseudorandom_points.name, str) def test_from_pseudorandom_pts_input_features_attribute_List_Features( a_layer_from_pseudorandom_points, ): assert isinstance(a_layer_from_pseudorandom_points.input_features, list) assert all( isinstance(feature, prospect.Feature) for feature in a_layer_from_pseudorandom_points.input_features ) def test_from_pseudorandom_pts_creates_expected_25_points( a_layer_from_pseudorandom_points, ): assert len(a_layer_from_pseudorandom_points.input_features) == 25 assert a_layer_from_pseudorandom_points.df.shape[0] == 25 def test_from_pseudorandom_pts_df_attribute_gdf(a_layer_from_pseudorandom_points): assert isinstance(a_layer_from_pseudorandom_points.df, GeoDataFrame) def test_from_poisson_pts_returns_Layer(an_area_from_shapefile): layer = prospect.Layer.from_poisson_points( rate=0.001, name="layer_from_poisson_pts", area=an_area_from_shapefile ) assert isinstance(layer, prospect.Layer) def test_from_poisson_pts_has_desired_attributes(a_layer_from_poisson_points): for a in ["name", "input_features", "df"]: assert hasattr(a_layer_from_poisson_points, a) def test_from_poisson_pts_name_attribute_str(a_layer_from_poisson_points): assert isinstance(a_layer_from_poisson_points.name, str) def test_from_poisson_pts_input_features_attribute_List_Features( a_layer_from_poisson_points, ): assert isinstance(a_layer_from_poisson_points.input_features, list) assert all( isinstance(feature, prospect.Feature) for feature in a_layer_from_poisson_points.input_features ) def test_from_poisson_pts_df_attribute_gdf(a_layer_from_poisson_points): assert isinstance(a_layer_from_poisson_points.df, GeoDataFrame) def test_from_thomas_pts_returns_Layer(an_area_from_shapefile): layer = prospect.Layer.from_thomas_points( parent_rate=0.001, child_rate=1, gauss_var=5, name="layer_from_thomas_pts", area=an_area_from_shapefile, ) assert isinstance(layer, prospect.Layer) def test_from_thomas_pts_has_desired_attributes(a_layer_from_thomas_points): for a in ["name", "input_features", "df"]: assert hasattr(a_layer_from_thomas_points, a) def test_from_thomas_pts_name_attribute_str(a_layer_from_thomas_points): assert isinstance(a_layer_from_thomas_points.name, str) def test_from_thomas_pts_input_features_attribute_List_Features( a_layer_from_thomas_points, ): assert isinstance(a_layer_from_thomas_points.input_features, list) assert all( isinstance(feature, prospect.Feature) for feature in a_layer_from_thomas_points.input_features ) def test_from_thomas_pts_df_attribute_gdf(a_layer_from_thomas_points): assert isinstance(a_layer_from_thomas_points.df, GeoDataFrame) def test_from_matern_pts_returns_Layer(an_area_from_shapefile): layer = prospect.Layer.from_matern_points( parent_rate=0.001, child_rate=1, radius=5, name="layer_from_matern_pts", area=an_area_from_shapefile, ) assert isinstance(layer, prospect.Layer) def test_from_matern_pts_has_desired_attributes(a_layer_from_matern_points): for a in ["name", "input_features", "df"]: assert hasattr(a_layer_from_matern_points, a) def test_from_matern_pts_name_attribute_str(a_layer_from_matern_points): assert isinstance(a_layer_from_matern_points.name, str) def test_from_matern_pts_input_features_attribute_List_Features( a_layer_from_matern_points, ): assert isinstance(a_layer_from_matern_points.input_features, list) assert all( isinstance(feature, prospect.Feature) for feature in a_layer_from_matern_points.input_features ) def test_from_matern_pts_df_attribute_gdf(a_layer_from_matern_points): assert isinstance(a_layer_from_matern_points.df, GeoDataFrame) def test_from_rectangles_raises_NotImplementedError(an_area_from_shapefile): with pytest.raises(NotImplementedError): prospect.Layer.from_rectangles(an_area_from_shapefile, n=25)
31.222222
88
0.792511
911
6,463
5.107574
0.065862
0.07608
0.103159
0.089835
0.863959
0.762949
0.656566
0.556845
0.526972
0.476252
0
0.005221
0.140647
6,463
206
89
31.373786
0.832553
0
0
0.257353
0
0
0.040229
0.021662
0
0
0
0
0.279412
1
0.235294
false
0
0.022059
0
0.257353
0
0
0
0
null
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
3
bef3255483f7d18f6ac80553cda527235082821e
370
py
Python
sigfeat/base/result.py
SiggiGue/sigfeat
86bb94200dcd4b33c21de1abc01814bf85f97b38
[ "BSD-3-Clause" ]
8
2017-01-30T08:26:52.000Z
2021-02-25T07:00:38.000Z
sigfeat/base/result.py
SiggiGue/sigfeat
86bb94200dcd4b33c21de1abc01814bf85f97b38
[ "BSD-3-Clause" ]
1
2017-03-10T16:10:11.000Z
2017-03-10T16:10:11.000Z
sigfeat/base/result.py
SiggiGue/sigfeat
86bb94200dcd4b33c21de1abc01814bf85f97b38
[ "BSD-3-Clause" ]
5
2017-08-05T02:26:00.000Z
2019-09-11T13:06:28.000Z
class Result(dict): """Result dict. Behaves 'immutable' to the Feature.process method. Just a simple dict to hold the results from features. """ __slots__ = () def __setitem__(self, *args): raise TypeError('`Result` object does not support item assignment.') def _setitem(self, key, value): dict.__setitem__(self, key, value)
26.428571
76
0.659459
46
370
5.021739
0.695652
0.142857
0.121212
0.164502
0
0
0
0
0
0
0
0
0.232432
370
13
77
28.461538
0.81338
0.318919
0
0
0
0
0.207627
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.666667
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
3
bef4c0a269b4217ad30f786b0205e1ed1a85c404
1,431
py
Python
mak/libs/pyxx/cxx/grammar/expression/compound/unary/general.py
bugengine/BugEngine
1b3831d494ee06b0bd74a8227c939dd774b91226
[ "BSD-3-Clause" ]
4
2015-05-13T16:28:36.000Z
2017-05-24T15:34:14.000Z
mak/libs/pyxx/cxx/grammar/expression/compound/unary/general.py
bugengine/BugEngine
1b3831d494ee06b0bd74a8227c939dd774b91226
[ "BSD-3-Clause" ]
null
null
null
mak/libs/pyxx/cxx/grammar/expression/compound/unary/general.py
bugengine/BugEngine
1b3831d494ee06b0bd74a8227c939dd774b91226
[ "BSD-3-Clause" ]
1
2017-03-21T08:28:07.000Z
2017-03-21T08:28:07.000Z
""" unary-expression: postfix-expression unary-operator cast-expression ++ cast-expression -- cast-expression await-expression sizeof unary-expression sizeof ( type-id ) sizeof ... ( identifier ) alignof ( type-id ) noexcept-expression new-expression delete-expression unary-operator: one of * & + - ! ~ """ import glrp from .....parser import cxx98 from be_typing import TYPE_CHECKING @glrp.rule('unary-expression : postfix-expression') @glrp.rule('unary-expression : unary-operator cast-expression') @glrp.rule('unary-expression : "++" cast-expression') @glrp.rule('unary-expression : "--" cast-expression') @glrp.rule('unary-expression : await-expression') @glrp.rule('unary-expression : "sizeof" unary-expression') @glrp.rule('unary-expression : "sizeof" "(" type-id ")"') @glrp.rule('unary-expression : "sizeof" "..." "(" identifier ")"') @glrp.rule('unary-expression : "alignof" "(" type-id ")"') @glrp.rule('unary-expression : noexcept-expression') @glrp.rule('unary-expression : new-expression') @glrp.rule('unary-expression : delete-expression') @cxx98 def unary_expression(self, p): # type: (CxxParser, glrp.Production) -> None pass @glrp.rule('unary-operator : "*" | "&" | "+" | "-" | "!" | "~"') @cxx98 def unary_operator(self, p): # type: (CxxParser, glrp.Production) -> None pass if TYPE_CHECKING: from .....parser import CxxParser
27.519231
66
0.66457
159
1,431
5.949686
0.207547
0.2537
0.178647
0.291755
0.538055
0.345666
0.201903
0.201903
0.117336
0.117336
0
0.004971
0.156534
1,431
51
67
28.058824
0.77879
0.310273
0
0.166667
0
0
0.551125
0
0
0
0
0
0
1
0.083333
false
0.083333
0.166667
0
0.25
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
3
83081bf6f3aebf340e6cf5d826b30b2617d638d4
207
py
Python
setup.py
Kiikurage/bash_with_display
614ed6cd7f73e143a8f3aae491eeefdfd230d713
[ "MIT" ]
1
2017-07-06T23:24:03.000Z
2017-07-06T23:24:03.000Z
setup.py
Kiikurage/bash_with_display
614ed6cd7f73e143a8f3aae491eeefdfd230d713
[ "MIT" ]
null
null
null
setup.py
Kiikurage/bash_with_display
614ed6cd7f73e143a8f3aae491eeefdfd230d713
[ "MIT" ]
null
null
null
from setuptools import setup setup( name='bash_with_display', version='0.0.1', author='Yuichiro Kikura', author_email='y.kikura@gmail.com', license='MIT', install_requires=['IPython'] )
20.7
47
0.681159
27
207
5.074074
0.851852
0
0
0
0
0
0
0
0
0
0
0.017341
0.164251
207
9
48
23
0.774566
0
0
0
0
0
0.31401
0
0
0
0
0
0
1
0
true
0
0.125
0
0.125
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
0
0
0
0
0
3
832fbb1d2eb003c1aa9ac4462f586cdd3fce574d
657
py
Python
testdriven-app/services/users/project/api/users/crud.py
felkost/flask_microservice
46d8d14fc79bc6cbb457b56cb621c50c066a979b
[ "MIT" ]
null
null
null
testdriven-app/services/users/project/api/users/crud.py
felkost/flask_microservice
46d8d14fc79bc6cbb457b56cb621c50c066a979b
[ "MIT" ]
5
2021-04-08T21:59:04.000Z
2022-02-10T14:19:59.000Z
testdriven-app/services/users/project/api/users/crud.py
felkost/flask_microservice
46d8d14fc79bc6cbb457b56cb621c50c066a979b
[ "MIT" ]
null
null
null
from project import db from project.api.users.models import User def get_all_users(): return User.query.all() def get_user_by_id(user_id): return User.query.filter_by(id=user_id).first() def get_user_by_email(email): return User.query.filter_by(email=email).first() def add_user(username, email): user = User(username=username, email=email) db.session.add(user) db.session.commit() return user def update_user(user, username, email): user.username = username user.email = email db.session.commit() return user def delete_user(user): db.session.delete(user) db.session.commit() return user
18.771429
52
0.707763
99
657
4.545455
0.242424
0.133333
0.1
0.14
0.3
0.197778
0
0
0
0
0
0
0.179604
657
34
53
19.323529
0.834879
0
0
0.272727
0
0
0
0
0
0
0
0
0
1
0.272727
false
0
0.090909
0.136364
0.636364
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
8335b3c0f664e05554ef2fd147b47d0f1be8a68a
139
py
Python
login/urls.py
Arpppit/data_leakage_detection
2fa96782feda5b31efd15a25c1366865ccdca952
[ "BSD-3-Clause" ]
6
2020-05-03T12:03:21.000Z
2020-09-07T08:33:58.000Z
login/urls.py
Arpppit/data_leakage_detection
2fa96782feda5b31efd15a25c1366865ccdca952
[ "BSD-3-Clause" ]
3
2020-04-17T06:50:44.000Z
2022-01-13T02:16:48.000Z
login/urls.py
shrey-c/DataLeakageDjango
a827c5a09e5501921f9fb97b656755671238dd63
[ "BSD-3-Clause" ]
null
null
null
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.login_form), url(r'^assign', views.login_assign), ]
23.166667
37
0.71223
21
139
4.619048
0.571429
0.082474
0
0
0
0
0
0
0
0
0
0
0.122302
139
6
38
23.166667
0.795082
0
0
0
0
0
0.064286
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
833cdcf98c09c582e98951d74d4bfe6a5d0d1c16
5,483
py
Python
q13/q13_large_sum.py
vesteny77/proj_euler
d12d6c6a6e6c717b5ab9d0415005945d983eea53
[ "MIT" ]
1
2021-12-27T22:18:51.000Z
2021-12-27T22:18:51.000Z
q13/q13_large_sum.py
vesteny77/proj_euler
d12d6c6a6e6c717b5ab9d0415005945d983eea53
[ "MIT" ]
null
null
null
q13/q13_large_sum.py
vesteny77/proj_euler
d12d6c6a6e6c717b5ab9d0415005945d983eea53
[ "MIT" ]
null
null
null
# Work out the first ten digits of the sum of # the following one-hundred 50-digit numbers. num_str = "37107287533902102798797998220837590246510135740250\ 46376937677490009712648124896970078050417018260538\ 74324986199524741059474233309513058123726617309629\ 91942213363574161572522430563301811072406154908250\ 23067588207539346171171980310421047513778063246676\ 89261670696623633820136378418383684178734361726757\ 28112879812849979408065481931592621691275889832738\ 44274228917432520321923589422876796487670272189318\ 47451445736001306439091167216856844588711603153276\ 70386486105843025439939619828917593665686757934951\ 62176457141856560629502157223196586755079324193331\ 64906352462741904929101432445813822663347944758178\ 92575867718337217661963751590579239728245598838407\ 58203565325359399008402633568948830189458628227828\ 80181199384826282014278194139940567587151170094390\ 35398664372827112653829987240784473053190104293586\ 86515506006295864861532075273371959191420517255829\ 71693888707715466499115593487603532921714970056938\ 54370070576826684624621495650076471787294438377604\ 53282654108756828443191190634694037855217779295145\ 36123272525000296071075082563815656710885258350721\ 45876576172410976447339110607218265236877223636045\ 17423706905851860660448207621209813287860733969412\ 81142660418086830619328460811191061556940512689692\ 51934325451728388641918047049293215058642563049483\ 62467221648435076201727918039944693004732956340691\ 15732444386908125794514089057706229429197107928209\ 55037687525678773091862540744969844508330393682126\ 18336384825330154686196124348767681297534375946515\ 80386287592878490201521685554828717201219257766954\ 78182833757993103614740356856449095527097864797581\ 16726320100436897842553539920931837441497806860984\ 48403098129077791799088218795327364475675590848030\ 87086987551392711854517078544161852424320693150332\ 59959406895756536782107074926966537676326235447210\ 69793950679652694742597709739166693763042633987085\ 41052684708299085211399427365734116182760315001271\ 65378607361501080857009149939512557028198746004375\ 35829035317434717326932123578154982629742552737307\ 94953759765105305946966067683156574377167401875275\ 88902802571733229619176668713819931811048770190271\ 25267680276078003013678680992525463401061632866526\ 36270218540497705585629946580636237993140746255962\ 24074486908231174977792365466257246923322810917141\ 91430288197103288597806669760892938638285025333403\ 34413065578016127815921815005561868836468420090470\ 23053081172816430487623791969842487255036638784583\ 11487696932154902810424020138335124462181441773470\ 63783299490636259666498587618221225225512486764533\ 67720186971698544312419572409913959008952310058822\ 95548255300263520781532296796249481641953868218774\ 76085327132285723110424803456124867697064507995236\ 37774242535411291684276865538926205024910326572967\ 23701913275725675285653248258265463092207058596522\ 29798860272258331913126375147341994889534765745501\ 18495701454879288984856827726077713721403798879715\ 38298203783031473527721580348144513491373226651381\ 34829543829199918180278916522431027392251122869539\ 40957953066405232632538044100059654939159879593635\ 29746152185502371307642255121183693803580388584903\ 41698116222072977186158236678424689157993532961922\ 62467957194401269043877107275048102390895523597457\ 23189706772547915061505504953922979530901129967519\ 86188088225875314529584099251203829009407770775672\ 11306739708304724483816533873502340845647058077308\ 82959174767140363198008187129011875491310547126581\ 97623331044818386269515456334926366572897563400500\ 42846280183517070527831839425882145521227251250327\ 55121603546981200581762165212827652751691296897789\ 32238195734329339946437501907836945765883352399886\ 75506164965184775180738168837861091527357929701337\ 62177842752192623401942399639168044983993173312731\ 32924185707147349566916674687634660915035914677504\ 99518671430235219628894890102423325116913619626622\ 73267460800591547471830798392868535206946944540724\ 76841822524674417161514036427982273348055556214818\ 97142617910342598647204516893989422179826088076852\ 87783646182799346313767754307809363333018982642090\ 10848802521674670883215120185883543223812876952786\ 71329612474782464538636993009049310363619763878039\ 62184073572399794223406235393808339651327408011116\ 66627891981488087797941876876144230030984490851411\ 60661826293682836764744779239180335110989069790714\ 85786944089552990653640447425576083659976645795096\ 66024396409905389607120198219976047599490197230297\ 64913982680032973156037120041377903785566085089252\ 16730939319872750275468906903707539413042652315011\ 94809377245048795150954100921645863754710598436791\ 78639167021187492431995700641917969777599028300699\ 15368713711936614952811305876380278410754449733078\ 40789923115535562561142322423255033685442488917353\ 44889911501440648020369068063960672322193204149535\ 41503128880339536053299340368006977710650566631954\ 81234880673210146739058568557934581403627822703280\ 82616570773948327592232845941706525094512325230608\ 22918802058777319719839450180888072429661980811197\ 77158542502016545090413245809786882778948721859617\ 72107838435069186155435662884062257473692284509516\ 20849603980134001723930671666823555245252804609722\ 53503534226472524250874054075591789781264330331690" def large_sum(): s = 0 for i in range(100): s += int(num_str[(i * 50):(i * 50 + 50)]) return str(s)[:10] if __name__ == "__main__": print(large_sum())
47.678261
62
0.94255
148
5,483
34.837838
0.891892
0.001939
0
0
0
0
0
0
0
0
0
0.944256
0.031552
5,483
114
63
48.096491
0.026742
0.015867
0
0
0
0
0.001483
0
0
0
0
0
0
1
0.009346
false
0
0
0
0.018692
0.009346
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
8341b3fe0559496b4dde48fd334b03e214b5089a
224
py
Python
python/exception.py
gajubadge11/hackerrank-3
132a5019b7ed21507bb95b5063fa66c446b0eff7
[ "MIT" ]
21
2015-02-09T18:08:38.000Z
2021-11-08T15:00:48.000Z
python/exception.py
gajubadge11/hackerrank-3
132a5019b7ed21507bb95b5063fa66c446b0eff7
[ "MIT" ]
7
2020-04-12T23:00:19.000Z
2021-01-30T23:44:24.000Z
python/exception.py
gajubadge11/hackerrank-3
132a5019b7ed21507bb95b5063fa66c446b0eff7
[ "MIT" ]
27
2015-07-22T18:08:12.000Z
2022-02-28T19:50:26.000Z
number_of_test_cases = int(input().strip()) for _ in range(number_of_test_cases): try: a, b = map(int, input().strip().split(" ")) print(a // b) except Exception as e: print("Error Code:", e)
28
51
0.580357
33
224
3.727273
0.666667
0.130081
0.195122
0.276423
0
0
0
0
0
0
0
0
0.25
224
7
52
32
0.732143
0
0
0
0
0
0.053571
0
0
0
0
0
0
1
0
false
0
0
0
0
0.285714
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
835d245c3b08e0b280e276fdab31c8205b782158
528
py
Python
pyoptix/__init__.py
juhyeonkim95/PyOptiX
e439e9bfeb1541720d254af2e062fd4940a784bf
[ "MIT" ]
50
2016-06-24T23:48:54.000Z
2021-11-08T16:10:46.000Z
pyoptix/__init__.py
LongerVision/PyOptiX
c7510ee9d967fe6c22fddcdcdd3b0127e075c8ba
[ "MIT" ]
4
2017-02-04T18:48:49.000Z
2018-10-02T14:13:45.000Z
pyoptix/__init__.py
LongerVision/PyOptiX
c7510ee9d967fe6c22fddcdcdd3b0127e075c8ba
[ "MIT" ]
8
2018-04-19T11:37:11.000Z
2021-03-04T19:16:47.000Z
from .acceleration import Acceleration from .buffer import Buffer from .compiler import Compiler from .context import Context, current_context from .entry_point import EntryPoint from .geometry import Geometry from .geometry_group import GeometryGroup from .geometry_instance import GeometryInstance from .group import Group from .material import Material from .program import Program from .selector import Selector from .texture_sampler import TextureSampler from .transform import Transform from ._driver import OPTIX_VERSION
33
47
0.854167
67
528
6.626866
0.373134
0.081081
0
0
0
0
0
0
0
0
0
0
0.11553
528
15
48
35.2
0.950749
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
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
3
835dfc9afc14a562f07f04330d4af2c585f0bd5f
1,518
py
Python
Beat-Ai/BeatSaber-AI/BeatSaber-AI/phase2/createEvents.py
Codingmace/BeatSaber-AI
1978c68ac983320996eb9161b603ab12be868d0c
[ "MIT" ]
null
null
null
Beat-Ai/BeatSaber-AI/BeatSaber-AI/phase2/createEvents.py
Codingmace/BeatSaber-AI
1978c68ac983320996eb9161b603ab12be868d0c
[ "MIT" ]
null
null
null
Beat-Ai/BeatSaber-AI/BeatSaber-AI/phase2/createEvents.py
Codingmace/BeatSaber-AI
1978c68ac983320996eb9161b603ab12be868d0c
[ "MIT" ]
null
null
null
# TODO # Have not even started one bit but easy once get the other part done # https://bsmg.wiki/mapping/map-format.html#events-2 # Get the Melograph # Translate the graph to the events # Write the results to the file # Onset Can create a idea of where to put the beats # https://librosa.org/doc/latest/generated/librosa.beat.beat_track.html?msclkid=bd66166baebe11ecabf9d7d7420bed35 # Pitches used for the movement going through # https://librosa.org/doc/latest/generated/librosa.decompose.nn_filter.html # https://github.com/ItsOrius/LiteMapper#readme ''' You may be wondering, how do we manage to incentivize more creative mapping? Rather than just placing events based on time and location, we run a multitude of different checks to decide on where to place our events. Beats with a high pace (more than 1 block per beat) receive a red center light, beats with a medium pace (at least 2 block per two beats) receive a blue center light, and beats with a slow pace (one block or less per two beats) receive a fading blue center light. A change in pace results in a ring zoom. Timestamps with more than one block at a time results in a ring rotation. Beats with more than one block per two beats receive a ring light every beat. Any-direction blocks and bombs result in the back lights turning on and the center lights turning off. The laser opposite of the last (starting on the left) will flash, but the other laser will deactivate. Both lasers activate on double notes with two beats or more of padding '''
52.344828
263
0.783926
264
1,518
4.5
0.526515
0.030303
0.025253
0.045455
0.153199
0.107744
0.06734
0
0
0
0
0.014173
0.163373
1,518
29
264
52.344828
0.92126
0.974967
0
null
0
null
0
0
null
0
0
0.034483
null
1
null
true
0
0
null
null
null
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
1
0
0
0
1
0
0
0
0
0
0
3
360ace8875cd29af2d5d4fc3b540dc758c14d22f
6,741
py
Python
tests/util/chem/test_chem_core.py
KarrLab/wc_utilities
a4c0e2e8b9bd88356729e38faf5c0d09d61ff921
[ "MIT" ]
1
2019-12-12T15:49:32.000Z
2019-12-12T15:49:32.000Z
tests/util/chem/test_chem_core.py
KarrLab/wc_utilities
a4c0e2e8b9bd88356729e38faf5c0d09d61ff921
[ "MIT" ]
36
2017-03-14T18:59:21.000Z
2019-12-18T04:08:43.000Z
tests/util/chem/test_chem_core.py
KarrLab/wc_utilities
a4c0e2e8b9bd88356729e38faf5c0d09d61ff921
[ "MIT" ]
1
2019-10-16T10:30:42.000Z
2019-10-16T10:30:42.000Z
""" Tests of the chemistry utilities :Author: Jonathan Karr <jonrkarr@gmail.com> :Date: 2018-02-07 :Copyright: 2018, Karr Lab :License: MIT """ from wc_utils.util import chem import attrdict import openbabel import unittest class EmpiricalFormulaTestCase(unittest.TestCase): def test_EmpiricalFormula_constructor(self): f = chem.EmpiricalFormula() self.assertEqual(f, {}) f = chem.EmpiricalFormula('H') self.assertEqual(f, {'H': 1}) f = chem.EmpiricalFormula('H2') self.assertEqual(f, {'H': 2}) f = chem.EmpiricalFormula('H2.5') self.assertEqual(f, {'H': 2.5}) f = chem.EmpiricalFormula('H2.5e3') self.assertEqual(f, {'H': 2.5e3}) f = chem.EmpiricalFormula('H-2.5e3') self.assertEqual(f, {'H': -2.5e3}) f = chem.EmpiricalFormula('H2.5e+3') self.assertEqual(f, {'H': 2.5e3}) f = chem.EmpiricalFormula('H2.5e-3') self.assertEqual(f, {'H': 2.5e-3}) f = chem.EmpiricalFormula('He2') self.assertEqual(f, {'He': 2}) f = chem.EmpiricalFormula('He-2') self.assertEqual(f, {'He': -2}) f = chem.EmpiricalFormula('He-20') self.assertEqual(f, {'He': -20}) f = chem.EmpiricalFormula('H2O') self.assertEqual(f, {'H': 2, 'O': 1}) f = chem.EmpiricalFormula('He-20He30') self.assertEqual(f, {'He': 10}) f = chem.EmpiricalFormula('RaRb') self.assertEqual(f, {'Ra': 1, 'Rb': 1}) f = chem.EmpiricalFormula(attrdict.AttrDict({'Ra': 1, 'Rb': 1})) self.assertEqual(f, {'Ra': 1, 'Rb': 1}) f = chem.EmpiricalFormula(attrdict.AttrDefault(int, {'Ra': 1, 'Rb': 1})) self.assertEqual(f, {'Ra': 1, 'Rb': 1}) f = chem.EmpiricalFormula(chem.EmpiricalFormula('RaRb')) self.assertEqual(f, {'Ra': 1, 'Rb': 1}) with self.assertRaisesRegex(ValueError, 'not a valid formula'): chem.EmpiricalFormula('Hee2') with self.assertRaisesRegex(ValueError, 'not a valid formula'): chem.EmpiricalFormula('h2') def test_EmpiricalFormula_get_attr(self): f = chem.EmpiricalFormula() self.assertEqual(f.C, 0) self.assertEqual(f['C'], 0) def test_EmpiricalFormula___setitem__(self): f = chem.EmpiricalFormula() f.C = 0 self.assertEqual(f, {}) self.assertEqual(dict(f), {}) self.assertEqual(str(f), '') f = chem.EmpiricalFormula() f.A = 1 self.assertEqual(f, {'A': 1}) f.A = 0 self.assertEqual(f, {}) self.assertEqual(dict(f), {}) self.assertEqual(str(f), '') f.A = 1.5 self.assertEqual(f, {'A': 1.5}) f = chem.EmpiricalFormula() with self.assertRaisesRegex(ValueError, 'Coefficient must be a float'): f.A = 'a' f = chem.EmpiricalFormula() with self.assertRaisesRegex(ValueError, 'Element must be a one or two letter string'): f.Aaa = 1 def test_EmpiricalFormula_get_molecular_weight(self): f = chem.EmpiricalFormula('H2O') self.assertAlmostEqual(f.get_molecular_weight(), 18.015) def test_EmpiricalFormula___add__(self): f = chem.EmpiricalFormula('H2O') g = chem.EmpiricalFormula('HO') self.assertEqual(str(f + g), 'H3O2') self.assertEqual(str(f + 'HO'), 'H3O2') def test_EmpiricalFormula___sub__(self): f = chem.EmpiricalFormula('H2O') g = chem.EmpiricalFormula('HO') self.assertEqual(str(f - g), 'H') self.assertEqual(str(f - 'HO'), 'H') def test_EmpiricalFormula___mul__(self): f = chem.EmpiricalFormula('H2O') self.assertEqual(str(f * 2), 'H4O2') def test_EmpiricalFormula___truediv__(self): f = chem.EmpiricalFormula('H4O2') self.assertEqual(f / 2, chem.EmpiricalFormula({'H': 2, 'O': 1})) def test_EmpiricalFormula___str__(self): f = chem.EmpiricalFormula('H2O') self.assertEqual(str(f), 'H2O') f = chem.EmpiricalFormula('OH2') self.assertEqual(str(f), 'H2O') f = chem.EmpiricalFormula('N0OH2') self.assertEqual(str(f), 'H2O') f = chem.EmpiricalFormula('H2O1.1') self.assertEqual(str(f), 'H2O1.1') f = chem.EmpiricalFormula('H2O1.1e-3') self.assertEqual(str(f), 'H2O0.0011') f = chem.EmpiricalFormula('H2O1.1e+3') self.assertEqual(str(f), 'H2O1100') f = chem.EmpiricalFormula('H2O-1.1e+3') self.assertEqual(str(f), 'H2O-1100') def test_EmpiricalFormula___contains__(self): f = chem.EmpiricalFormula('H2O') self.assertIn('H', f) self.assertIn('C', f) self.assertNotIn('Ccc', f) def test_EmpiricalFormula___hash__(self): f = chem.EmpiricalFormula('H2O') g = chem.EmpiricalFormula('H2O') h = chem.EmpiricalFormula('H') self.assertIn(f, [g]) self.assertIn(f, set([g])) self.assertIn(f, {g: True}) self.assertNotIn(f, [h]) self.assertNotIn(f, set([h])) self.assertNotIn(f, {h: True}) class OpenBabelUtilsTestCase(unittest.TestCase): def test_get_formula(self): gly_inchi = 'InChI=1S/C2H5NO2/c3-1-2(4)5/h1,3H2,(H,4,5)' gly_formula = 'C2H5NO2' mol = openbabel.OBMol() conversion = openbabel.OBConversion() conversion.SetInFormat('inchi') conversion.ReadString(mol, gly_inchi) self.assertEqual(chem.OpenBabelUtils.get_formula(mol), chem.EmpiricalFormula('C2H5NO2')) def test_get_inchi(self): gly_inchi = 'InChI=1S/C2H5NO2/c3-1-2(4)5/h1,3H2,(H,4,5)' mol = openbabel.OBMol() conversion = openbabel.OBConversion() conversion.SetInFormat('inchi') conversion.ReadString(mol, gly_inchi) self.assertEqual(chem.OpenBabelUtils.get_inchi(mol), gly_inchi) def test_export(self): gly_smiles = 'C([N+])C([O-])=O' mol = openbabel.OBMol() conversion = openbabel.OBConversion() conversion.SetInFormat('can') conversion.ReadString(mol, gly_smiles) self.assertEqual(chem.OpenBabelUtils.export(mol, 'smi'), 'C([N+])C(=O)[O-]') self.assertEqual(chem.OpenBabelUtils.export(mol, 'smi', options=('c',)), '[O-]C(=O)C[N+]') gly_inchi = 'InChI=1S/C2H5NO2/c3-1-2(4)5/h1,3H2,(H,4,5)' mol = openbabel.OBMol() conversion = openbabel.OBConversion() conversion.SetInFormat('inchi') conversion.ReadString(mol, gly_inchi) self.assertEqual(chem.OpenBabelUtils.export(mol, 'inchi'), gly_inchi) self.assertTrue(chem.OpenBabelUtils.export(mol, 'mol', options='m').endswith('END'))
32.723301
98
0.601098
806
6,741
4.930521
0.171216
0.226472
0.190237
0.066935
0.601661
0.568445
0.529693
0.458228
0.400856
0.356064
0
0.038551
0.238095
6,741
205
99
32.882927
0.735202
0.020175
0
0.342282
0
0.020134
0.088828
0.0191
0
0
0
0
0.402685
1
0.09396
false
0
0.026846
0
0.134228
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
1
0
0
0
0
0
0
0
0
0
3
361fcbc7922fe3ede148316d44de3c2b5071f839
1,622
py
Python
tests/test_mappings.py
Naassila/bioptim
511e7ba315de5ca8c3bdcc85decd43bac30676b9
[ "MIT" ]
34
2020-12-14T17:09:41.000Z
2022-03-31T17:03:37.000Z
tests/test_mappings.py
Naassila/bioptim
511e7ba315de5ca8c3bdcc85decd43bac30676b9
[ "MIT" ]
229
2020-09-30T16:53:40.000Z
2022-03-29T21:11:46.000Z
tests/test_mappings.py
fbailly/bioptim
3a5473ee7c39d645d960611596a45b044e8ccf58
[ "MIT" ]
15
2020-11-20T12:32:59.000Z
2022-01-22T22:59:08.000Z
import pytest import numpy as np from bioptim import Mapping, BiMapping def test_mapping(): obj_to_map = np.array([[0, 1, 2], [3, 4, 5], [6, 7, 8], [9, 10, 11]]) np.testing.assert_almost_equal(Mapping([0, 2]).map(obj_to_map), [[0, 1, 2], [6, 7, 8]]) np.testing.assert_almost_equal(Mapping([None, 2, None]).map(obj_to_map), [[0, 0, 0], [6, 7, 8], [0, 0, 0]]) np.testing.assert_almost_equal( Mapping([None, 2, 1], oppose=[1, 2]).map(obj_to_map), [[0, 0, 0], [-6, -7, -8], [-3, -4, -5]] ) np.testing.assert_almost_equal(Mapping([None, 0], oppose=1).map(obj_to_map), [[0, 0, 0], [0, -1, -2]]) def test_bidirectional_mapping(): mapping = BiMapping([0, 1, 2], [3, 4, 5]) np.testing.assert_almost_equal(len(mapping.to_first), 3) np.testing.assert_almost_equal(mapping.to_first.map_idx, [3, 4, 5]) np.testing.assert_almost_equal(mapping.to_second.map_idx, [0, 1, 2]) np.testing.assert_almost_equal(mapping.to_second.map_idx, [0, 1, 2]) mapping_with_oppose = BiMapping([0, 1, 2], [3, 4, 5], 1, [1, 2]) np.testing.assert_almost_equal(mapping_with_oppose.to_second.map_idx, [0, 1, 2]) np.testing.assert_almost_equal(mapping_with_oppose.to_second.oppose, [1, -1, 1]) np.testing.assert_almost_equal(mapping_with_oppose.to_first.map_idx, [3, 4, 5]) np.testing.assert_almost_equal(mapping_with_oppose.to_first.oppose, [1, -1, -1]) with pytest.raises(RuntimeError, match="to_second must be a Mapping class"): BiMapping(1, [3, 4, 5]) with pytest.raises(RuntimeError, match="to_first must be a Mapping class"): BiMapping([0, 1, 2], 3)
45.055556
111
0.658446
282
1,622
3.567376
0.163121
0.107356
0.178926
0.250497
0.769384
0.765408
0.587475
0.50994
0.405567
0.369781
0
0.071533
0.155364
1,622
35
112
46.342857
0.662774
0
0
0.076923
0
0
0.040074
0
0
0
0
0
0.461538
1
0.076923
false
0
0.115385
0
0.192308
0
0
0
0
null
0
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
3
362ec1f1ef00c47c15c61341104964e23324789f
566
py
Python
breadcrumbs/namedobject.py
hgrecco/breadcrumbs
e7fc4f8e9181b8140a0a4e8c533c415dc19e6f3f
[ "BSD-3-Clause" ]
1
2021-11-17T04:04:02.000Z
2021-11-17T04:04:02.000Z
breadcrumbs/namedobject.py
hgrecco/breadcrumbs
e7fc4f8e9181b8140a0a4e8c533c415dc19e6f3f
[ "BSD-3-Clause" ]
null
null
null
breadcrumbs/namedobject.py
hgrecco/breadcrumbs
e7fc4f8e9181b8140a0a4e8c533c415dc19e6f3f
[ "BSD-3-Clause" ]
null
null
null
""" breadcrumbs.namedobject ~~~~~~~~~~~~~~~~~~~~~~~ Sentinels with good representation. :copyright: 2021 by breadcrumbs Authors, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ class NamedObject(object): """A class to construct named sentinels.""" def __init__(self, name): self.name = name def __repr__(self): return self.name def __str__(self): return self.name def __hash__(self): return id(self) def __deepcopy__(self, memo): return self
19.517241
74
0.609541
63
566
5.15873
0.52381
0.098462
0.086154
0.110769
0.129231
0
0
0
0
0
0
0.009592
0.263251
566
28
75
20.214286
0.769784
0.422261
0
0.181818
0
0
0
0
0
0
0
0
0
1
0.454545
false
0
0
0.363636
0.909091
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
364a72b4e08e4de25012926b7cc0b093581ceb33
275
py
Python
lfs/utils/views.py
michael-hahn/django-lfs
26c3471a8f8d88269c84f714f507b952dfdb6397
[ "BSD-3-Clause" ]
345
2015-01-03T19:19:27.000Z
2022-03-20T11:00:50.000Z
lfs/utils/views.py
michael-hahn/django-lfs
26c3471a8f8d88269c84f714f507b952dfdb6397
[ "BSD-3-Clause" ]
73
2015-01-06T14:54:02.000Z
2022-03-11T23:11:34.000Z
lfs/utils/views.py
michael-hahn/django-lfs
26c3471a8f8d88269c84f714f507b952dfdb6397
[ "BSD-3-Clause" ]
148
2015-01-07T16:30:08.000Z
2022-03-25T21:20:58.000Z
from django.http import HttpResponse from django.shortcuts import render def test(request): return render(request, "test.html") def upload_test(request): if request.method == "GET": return render(request, "testuploadform.html") return HttpResponse()
19.642857
53
0.72
33
275
5.969697
0.515152
0.101523
0.192893
0
0
0
0
0
0
0
0
0
0.178182
275
13
54
21.153846
0.871681
0
0
0
0
0
0.112727
0
0
0
0
0
0
1
0.25
false
0
0.25
0.125
0.875
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
3
365398e1f12ba599573c90a12216ab43d7f69f9b
419
py
Python
gramat/expressions/_true.py
gramat-lang/python-gramat
c3edb7cf045b109596bb4cfdf43d58e04763ac19
[ "MIT" ]
null
null
null
gramat/expressions/_true.py
gramat-lang/python-gramat
c3edb7cf045b109596bb4cfdf43d58e04763ac19
[ "MIT" ]
null
null
null
gramat/expressions/_true.py
gramat-lang/python-gramat
c3edb7cf045b109596bb4cfdf43d58e04763ac19
[ "MIT" ]
null
null
null
from __future__ import annotations from typing import List from ._expression import Expression from ._expression import EvalContext class TrueExp(Expression): def eval(self, ctx: EvalContext) -> bool: return True @property def children(self) -> List[Expression]: return [] def optimize(self) -> Expression: return self def __str__(self) -> str: return 'True'
18.217391
45
0.668258
46
419
5.869565
0.456522
0.103704
0.148148
0
0
0
0
0
0
0
0
0
0.250597
419
22
46
19.045455
0.859873
0
0
0
0
0
0.009547
0
0
0
0
0
0
1
0.285714
false
0
0.285714
0.285714
0.928571
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
36580042b222fa33af5ee3a3ea888b71f5ab157b
73
py
Python
src/lib/HTMLParser.py
timmartin/skulpt
2e3a3fbbaccc12baa29094a717ceec491a8a6750
[ "MIT" ]
10
2015-11-13T17:02:40.000Z
2021-02-09T23:21:05.000Z
src/lib/HTMLParser.py
timmartin/skulpt
2e3a3fbbaccc12baa29094a717ceec491a8a6750
[ "MIT" ]
43
2015-06-03T17:59:23.000Z
2021-09-17T10:45:21.000Z
src/lib/HTMLParser.py
timmartin/skulpt
2e3a3fbbaccc12baa29094a717ceec491a8a6750
[ "MIT" ]
13
2017-07-02T03:16:46.000Z
2021-07-05T14:53:56.000Z
raise NotImplementedError("HTMLParser is not yet implemented in Skulpt")
36.5
72
0.835616
9
73
6.777778
1
0
0
0
0
0
0
0
0
0
0
0
0.109589
73
1
73
73
0.938462
0
0
0
0
0
0.589041
0
0
0
0
0
0
1
0
true
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
366620816f8f19ebd63ab581b51dc9672e6d07ec
332
py
Python
output/models/nist_data/atomic/non_negative_integer/schema_instance/nistschema_sv_iv_atomic_non_negative_integer_max_exclusive_2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/nist_data/atomic/non_negative_integer/schema_instance/nistschema_sv_iv_atomic_non_negative_integer_max_exclusive_2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/nist_data/atomic/non_negative_integer/schema_instance/nistschema_sv_iv_atomic_non_negative_integer_max_exclusive_2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.nist_data.atomic.non_negative_integer.schema_instance.nistschema_sv_iv_atomic_non_negative_integer_max_exclusive_2_xsd.nistschema_sv_iv_atomic_non_negative_integer_max_exclusive_2 import NistschemaSvIvAtomicNonNegativeIntegerMaxExclusive2 __all__ = [ "NistschemaSvIvAtomicNonNegativeIntegerMaxExclusive2", ]
55.333333
257
0.918675
36
332
7.722222
0.583333
0.097122
0.183453
0.258993
0.366906
0.366906
0.366906
0.366906
0.366906
0.366906
0
0.012579
0.042169
332
5
258
66.4
0.861635
0
0
0
0
0
0.153614
0.153614
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
3679edd926a02ae42dcea31726e5e217b8265ea2
401
py
Python
ProgramsToRead/ExercisesFromClasses/ex001agosto26.py
ItanuRomero/PythonStudyPrograms
2b784b2af068b34e65ddf817ca8d99c1ca3a710e
[ "MIT" ]
null
null
null
ProgramsToRead/ExercisesFromClasses/ex001agosto26.py
ItanuRomero/PythonStudyPrograms
2b784b2af068b34e65ddf817ca8d99c1ca3a710e
[ "MIT" ]
null
null
null
ProgramsToRead/ExercisesFromClasses/ex001agosto26.py
ItanuRomero/PythonStudyPrograms
2b784b2af068b34e65ddf817ca8d99c1ca3a710e
[ "MIT" ]
null
null
null
vogais = { 'a': 0, 'e': 0, 'i': 0, 'o': 0, 'u': 0 } texto = str(input('insira um texto: ')).strip().lower() for letra in texto: if letra in 'a': vogais['a'] += 1 elif letra in 'e': vogais['e'] += 1 elif letra in 'i': vogais['i'] += 1 elif letra in 'o': vogais['o'] += 1 elif letra in 'u': vogais['u'] += 1 print(vogais)
18.227273
55
0.438903
60
401
2.933333
0.35
0.238636
0.227273
0.272727
0
0
0
0
0
0
0
0.038462
0.351621
401
21
56
19.095238
0.638462
0
0
0
0
0
0.08
0
0
0
0
0
0
1
0
false
0
0
0
0
0.05
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
367c7da870575b7776f56633757247388d4b4b70
794
py
Python
film_details_searcher/tests/scrappers/test_filmweb_movie_service.py
tomaszkyc/film_details_searcher
e8e12bc739990324f6ab4110fdd363e6ef207f1a
[ "MIT" ]
null
null
null
film_details_searcher/tests/scrappers/test_filmweb_movie_service.py
tomaszkyc/film_details_searcher
e8e12bc739990324f6ab4110fdd363e6ef207f1a
[ "MIT" ]
null
null
null
film_details_searcher/tests/scrappers/test_filmweb_movie_service.py
tomaszkyc/film_details_searcher
e8e12bc739990324f6ab4110fdd363e6ef207f1a
[ "MIT" ]
null
null
null
import pytest from film_details_searcher.models.movie import Movie from film_details_searcher.scrappers.filmweb_movie_service import FilmwebMovieService from film_details_searcher.scrappers.movie_service import MovieService @pytest.fixture def movie_service(): return FilmwebMovieService() @pytest.fixture def valid_movie_link(): return r'https://www.filmweb.pl/film/Green+Book-2018-809630' def test_should_find_film_by_correct_link(valid_movie_link, movie_service: MovieService): movie: Movie = movie_service.get_movie(valid_movie_link) assert movie is not None assert len(movie.details) > 0 def test_should_raise_exception_if_movie_link_has_incorrect_type(movie_service: MovieService): with pytest.raises(TypeError) as e: movie_service.get_movie(None)
30.538462
94
0.81864
111
794
5.522523
0.441441
0.137031
0.073409
0.112561
0.104405
0
0
0
0
0
0
0.015603
0.112091
794
26
95
30.538462
0.853901
0
0
0.117647
0
0
0.062893
0
0
0
0
0
0.117647
1
0.235294
false
0
0.235294
0.117647
0.588235
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
368215c6fa360572b047c6c68b30aa2130b61391
2,623
py
Python
src/web/backend/__init__.py
SubOptimal/seascope
8a669e0e333801477c4624883bd1ab1823b71bbb
[ "BSD-3-Clause" ]
8
2015-03-29T01:29:17.000Z
2020-05-10T18:45:43.000Z
src/web/backend/__init__.py
SubOptimal/seascope
8a669e0e333801477c4624883bd1ab1823b71bbb
[ "BSD-3-Clause" ]
5
2015-12-04T10:53:35.000Z
2021-01-03T05:39:55.000Z
src/web/backend/__init__.py
SubOptimal/seascope
8a669e0e333801477c4624883bd1ab1823b71bbb
[ "BSD-3-Clause" ]
9
2016-09-06T15:53:51.000Z
2020-12-15T16:32:48.000Z
# Copyright (c) 2010 Anil Kumar # All rights reserved. # # License: BSD import os import sys import re backend_plugins = [] backend_dict = {} def _load_plugins(module, directory): pluginImports = __import__(module, globals(), locals()) print('Scanning for backend plugins...') plist = [] pdict = {} for i in sorted(os.listdir(directory)): path = os.path.join( directory, i, '__init__.py' ) if os.path.isfile( path ): p = __import__( '%s.%s' % (module, i), globals(), locals(), ['*'] ) plist.append(p) pdict[p.name()] = p if not hasattr(p, 'priority'): p.priority = 0 plist = sorted(plist, key=lambda p: p.priority, reverse=True) for p in plist: print('\t', p.name()) return (plist, pdict) def load_plugins(): global backend_plugins, backend_dict (backend_plugins, backend_dict) = _load_plugins('backend.plugins', 'backend/plugins') def plugin_list(): return backend_plugins def plugin_guess(proj_path): bi = [] for p in backend_plugins: if p.is_your_prj(proj_path): bi.append(p.name()) return bi class BProject: def __init__(self): self.prj = None def proj_new_open_app_cb(self): self.prj.prj_feature_setup() def proj_close_app_cb(self): pass def _proj_new_open(self): self.proj_new_open_app_cb() def proj_new(self, bname, proj_args): b = backend_dict[bname] assert not self.prj prj = b.project_class().prj_new(proj_args) if prj: _proj_new_open() return self.prj != None def proj_open(self, proj_path, proj_type): b = backend_dict[proj_type] self.prj = b.project_class().prj_open(proj_path) if self.prj: self._proj_new_open() return self.prj != None def proj_close(self): self.prj.prj_close() self.prj = None from .plugins import CtagsCache CtagsCache.flush() self.proj_close_app_cb() def proj_is_open(self): return self.prj != None def proj_name(self): return self.prj.prj_name() if self.prj else None def proj_dir(self): return self.prj.prj_dir() if self.prj else None def proj_src_files(self): return self.prj.prj_src_files() def proj_conf(self): return self.prj.prj_conf() def proj_settings_get(self): return self.prj.prj_settings_get() def proj_settings_update(proj_args): return self.prj.prj_settings_update(proj_args) def proj_is_ready(self): return self.prj.prj_is_ready() def proj_query(self, rquery): return self.prj.prj_query(rquery) def proj_rebuild(self): return self.prj.prj_rebuild() def proj_query_fl(self): return self.prj.prj_query_fl() def proj_type(self): return self.prj.prj_type() def proj_feature(self): return self.prj.prj_feature()
20.984
86
0.711399
416
2,623
4.211538
0.230769
0.09589
0.085616
0.109589
0.276256
0.08105
0.067352
0.039954
0.039954
0
0
0.002269
0.159741
2,623
124
87
21.153226
0.79265
0.024018
0
0.057471
0
0
0.034456
0
0
0
0
0
0.011494
1
0.275862
false
0.011494
0.068966
0.16092
0.563218
0.022989
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
36bc098a6276572944d43f25a44dfbc1c45b71d5
179
py
Python
settings.py
dmitriypru/VK2TL
f662c9478928ca8d793592b69ade5a0d07e9b1de
[ "MIT" ]
null
null
null
settings.py
dmitriypru/VK2TL
f662c9478928ca8d793592b69ade5a0d07e9b1de
[ "MIT" ]
null
null
null
settings.py
dmitriypru/VK2TL
f662c9478928ca8d793592b69ade5a0d07e9b1de
[ "MIT" ]
null
null
null
class SETTINGS: __slots__ = ("TOKEN","DB_NAME") def __init__(self): self.TOKEN = '415193750:AAFNBxqmF5ow24TwzuJlzYKpYSPmt_K5p_A' self.DB_NAME = 'vk2tl.db'
29.833333
68
0.670391
20
179
5.4
0.7
0.111111
0
0
0
0
0
0
0
0
0
0.098592
0.206704
179
5
69
35.8
0.661972
0
0
0
0
0
0.363128
0.251397
0
0
0
0
0
1
0.2
false
0
0
0
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
3
36ec2dc9e70d8727f25924d1ea377ed7fd2a3ac7
2,409
py
Python
talleres_y_practicas/TAREA02-Patrones_estructurales/decorator.py
GabrielJHR/UADER_ISII_RAMOS
380aac6759750330a18d114d213d717a898538d0
[ "MIT" ]
null
null
null
talleres_y_practicas/TAREA02-Patrones_estructurales/decorator.py
GabrielJHR/UADER_ISII_RAMOS
380aac6759750330a18d114d213d717a898538d0
[ "MIT" ]
null
null
null
talleres_y_practicas/TAREA02-Patrones_estructurales/decorator.py
GabrielJHR/UADER_ISII_RAMOS
380aac6759750330a18d114d213d717a898538d0
[ "MIT" ]
null
null
null
#*-------------------------------------------------- #* decorator.py #* excerpt from https://refactoring.guru/design-patterns/decorator/python/example #* ejemplo obtenido desde el canal de youtube BettaTech: https://www.youtube.com/watch?v=Ab9HxiPLryg #*-------------------------------------------------- # COMPONENTE class Enemy(): def take_damage(self) -> float: pass def movement_speed(self) -> float: pass # Componente concreto enemigo base class BaseEnemy(Enemy): def take_damage(self) -> float: return 10 def movement_speed(self) -> float: return 10 # Componente enemigo invencible (enemigo que no recibe daño) class InvencibleEnemy(Enemy): def take_damage(self) -> float: return 0 def movement_speed(self): return 0 # Clase decorator class EnemyDecorator(Enemy): _enemy: Enemy = None def __init__(self, enemy: Enemy) -> None: self._enemy = enemy @property def enemy(self) -> Enemy: return self._enemy def take_damage(self) -> float: return self._enemy.take_damage() def movement_speed(self) -> float: return self._enemy.movement_speed() # Concrete decorators class HelmetDecorator(EnemyDecorator): def take_damage(self) -> float: return self.enemy.take_damage() * 0.5 # Concrete decorators class BootsDecorator(EnemyDecorator): def take_damage(self) -> float: return self._enemy.take_damage() * 0.2 def movement_speed(self) -> float: return self._enemy.movement_speed() * 2 if __name__ == "__main__": # Crear un enemigo base base_enemy = BaseEnemy() print(f"Damage dealt to base enemy: ", base_enemy.take_damage()) print(f"Movement speed of the base enemy: ", enemy_with_helmet.movement_speed()) print() # Le agrega un casco al enemigo enemy_with_helmet = HelmetDecorator(base_enemy) print(f"Damage dealt to the enemy with helmet: ", enemy_with_helmet.take_damage()) print(f"Movement speed of the enemy with helmet and boots: ", enemy_with_helmet.movement_speed()) print() # Le agrega botas al enemigo enemy_with_boots_helmet = BootsDecorator(enemy_with_helmet) print(f"Damage dealt to the enemy with boots and helmet: ", enemy_with_boots_helmet.take_damage()) print(f"Movement speed of the enemy with helmet and boots: ", enemy_with_boots_helmet.movement_speed())
30.884615
107
0.669572
302
2,409
5.13245
0.261589
0.109032
0.077419
0.065806
0.492258
0.463871
0.426452
0.380645
0.271613
0.271613
0
0.006189
0.195102
2,409
77
108
31.285714
0.793192
0.221254
0
0.391304
0
0
0.139635
0
0
0
0
0
0
1
0.282609
false
0.043478
0
0.217391
0.652174
0.173913
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
7feda00daae9b8843ed2775a8157d87f8ef8c221
6,088
py
Python
PackGrid/categoryAdjacent/T_C_AmmBeen.py
whitegreen/PackingDone
b7f1d2966f1d62a052ca9c96ce70b314d694c9f1
[ "MIT" ]
null
null
null
PackGrid/categoryAdjacent/T_C_AmmBeen.py
whitegreen/PackingDone
b7f1d2966f1d62a052ca9c96ce70b314d694c9f1
[ "MIT" ]
null
null
null
PackGrid/categoryAdjacent/T_C_AmmBeen.py
whitegreen/PackingDone
b7f1d2966f1d62a052ca9c96ce70b314d694c9f1
[ "MIT" ]
null
null
null
# the same results by categoryAdjacent/T_C_AmmBeen.java import gurobipy as gp from gurobipy import GRB, LinExpr import M DM = 4 P = [(-3, -3, -2, 0), (-3, -3, -2, 1), (-3, -3, -1, 1), (-3, -3, -1, 2), (-3, -3, 0, 2), (-3, -2, -1, 1), (-3, -2, -1, 2), (-3, -2, 0, 1), (-3, -2, 0, 2), (-3, -2, 0, 3), (-3, -2, 1, 2), (-3, -2, 1, 3), (-3, -1, 0, 2), (-3, -1, 1, 2), (-3, -1, 1, 3), (-3, -1, 2, 3), (-3, 0, 2, 3), (-2, -3, -3, -1), (-2, -3, -3, 0), (-2, -3, -2, -1), (-2, -3, -2, 0), (-2, -3, -2, 1), (-2, -3, -1, 0), (-2, -3, -1, 1), (-2, -2, -2, 0), (-2, -2, -1, 0), (-2, -2, -1, 1), (-2, -2, 0, 1), (-2, -2, 0, 2), (-2, -1, -1, 1), (-2, -1, 0, 1), (-2, -1, 0, 2), (-2, -1, 1, 1), (-2, -1, 1, 2), (-2, -1, 1, 3), (-2, -1, 2, 3), (-2, 0, 1, 2), (-2, 0, 1, 3), (-2, 0, 2, 2), (-2, 0, 2, 3), (-2, 0, 3, 3), (-2, 1, 2, 3), (-2, 1, 3, 3), (-1, -3, -3, -2), (-1, -3, -3, -1), (-1, -3, -2, -1), (-1, -3, -2, 0), (-1, -2, -3, -2), (-1, -2, -3, -1), (-1, -2, -2, -1), (-1, -2, -2, 0), (-1, -2, -1, -1), (-1, -2, -1, 0), (-1, -2, -1, 1), (-1, -1, -2, -1), (-1, -1, -1, -1), (-1, -1, -1, 0), (-1, -1, -1, 1), (-1, -1, 0, 0), (-1, -1, 0, 1), (-1, -1, 1, 1), (-1, -1, 1, 2), (-1, 0, 0, 0), (-1, 0, 0, 1), (-1, 0, 1, 1), (-1, 0, 1, 2), (-1, 0, 2, 2), (-1, 0, 2, 3), (-1, 1, 1, 1), (-1, 1, 1, 2), (-1, 1, 2, 1), (-1, 1, 2, 2), (-1, 1, 2, 3), (-1, 1, 3, 2), (-1, 1, 3, 3), (-1, 2, 3, 2), (-1, 2, 3, 3), (0, -3, -3, -2), (0, -2, -3, -3), (0, -2, -3, -2), (0, -2, -3, -1), (0, -2, -2, -2), (0, -2, -2, -1), (0, -1, -3, -2), (0, -1, -2, -2), (0, -1, -2, -1), (0, -1, -1, -1), (0, -1, -1, 0), (0, -1, 0, 0), (0, 0, -1, -1), (0, 0, -1, 0), (0, 0, 0, -1), (0, 0, 0, 0), (0, 0, 0, 1), (0, 0, 1, 0), (0, 0, 1, 1), (0, 1, 0, 0), (0, 1, 1, 0), (0, 1, 1, 1), (0, 1, 2, 1), (0, 1, 2, 2), (0, 1, 3, 2), (0, 2, 2, 1), (0, 2, 2, 2), (0, 2, 3, 1), (0, 2, 3, 2), (0, 2, 3, 3), (0, 3, 3, 2), (1, -2, -3, -3), (1, -2, -3, -2), (1, -1, -3, -3), (1, -1, -3, -2), (1, -1, -2, -3), (1, -1, -2, -2), (1, -1, -2, -1), (1, -1, -1, -2), (1, -1, -1, -1), (1, 0, -2, -3), (1, 0, -2, -2), (1, 0, -1, -2), (1, 0, -1, -1), (1, 0, 0, -1), (1, 0, 0, 0), (1, 1, -1, -2), (1, 1, -1, -1), (1, 1, 0, -1), (1, 1, 0, 0), (1, 1, 1, -1), (1, 1, 1, 0), (1, 1, 1, 1), (1, 1, 2, 1), (1, 2, 1, -1), (1, 2, 1, 0), (1, 2, 1, 1), (1, 2, 2, 0), (1, 2, 2, 1), (1, 2, 3, 1), (1, 2, 3, 2), (1, 3, 2, 0), (1, 3, 2, 1), (1, 3, 3, 1), (1, 3, 3, 2), (2, -1, -3, -3), (2, -1, -2, -3), (2, 0, -3, -3), (2, 0, -2, -3), (2, 0, -2, -2), (2, 0, -1, -3), (2, 0, -1, -2), (2, 1, -2, -3), (2, 1, -1, -3), (2, 1, -1, -2), (2, 1, -1, -1), (2, 1, 0, -2), (2, 1, 0, -1), (2, 1, 1, -1), (2, 2, 0, -2), (2, 2, 0, -1), (2, 2, 1, -1), (2, 2, 1, 0), (2, 2, 2, 0), (2, 3, 1, -1), (2, 3, 1, 0), (2, 3, 2, -1), (2, 3, 2, 0), (2, 3, 2, 1), (2, 3, 3, 0), (2, 3, 3, 1), (3, 0, -2, -3), (3, 1, -2, -3), (3, 1, -1, -3), (3, 1, -1, -2), (3, 1, 0, -2), (3, 2, -1, -3), (3, 2, -1, -2), (3, 2, 0, -3), (3, 2, 0, -2), (3, 2, 0, -1), (3, 2, 1, -2), (3, 2, 1, -1), (3, 3, 0, -2), (3, 3, 1, -2), (3, 3, 1, -1), (3, 3, 2, -1), (3, 3, 2, 0)] assert (185 == len(P)) # en=7 # ************************************************************************************ K = DM + 3 * DM + 4 A = [] A.append([(-1, 0, 0, 0), (0, 0, 0, 0), (1, 0, 0, 0)]) A.append([(0, -1, 0, 0), (0, 0, 0, 0), (0, 1, 0, 0)]) A.append([(0, 0, -1, 0), (0, 0, 0, 0), (0, 0, 1, 0)]) A.append([(0, 0, 0, -1), (0, 0, 0, 0), (0, 0, 0, 1)]) for i in range(DM): for j in range(3): A.append([A[i][0], (0, 0, 0, 0), A[(i + j + 1) % DM][2]]) A.append([(0, 0, 0, 0), (1, 0, 0, 0)]) # 2 - straight A.append([(0, 0, 0, 0), (0, 1, 0, 0)]) A.append([(0, 0, 0, 0), (0, 0, 1, 0)]) A.append([(0, 0, 0, 0), (0, 0, 0, 1)]) assert (K == len(A)) # for tmp in A: # st = '' # for p in tmp: # st = st + str(p[0])+ ','+str(p[1])+','+str(p[2])+ ','+str(p[3])+" " # print(st) _P_ = M.expand(P, DM) print(len(P), len(_P_)) keyType = 0 def optimize(): try: m = gp.Model("Type-Category Adjacent") X = [m.addVars(P, vtype=GRB.BINARY) for k in range(K)] oe = LinExpr() for k in range(K): oe.add(X[k].sum(), len(A[k])) m.setObjective(oe, GRB.MAXIMIZE) for v in P: le = LinExpr() for k in range(K): Akv = [M.sub(v, tp) for tp in A[k]] for u in Akv: if u in P: le.add(X[k][u]) m.addConstr(le <= 1) for v in _P_: for k in range(K): le = LinExpr() Akv = [M.sub(v, tp) for tp in A[k]] for u in Akv: if u in P: le.add(X[k][u]) m.addConstr(le == 0) le = LinExpr() for k in range(16, 20): le.add(X[k].sum()) m.addConstr(le <= 20) # sum of type 16-19 <= threshold # *********************************** adjacency *********************************** tj = keyType for v in P: le = LinExpr() for ti in range(4, 16): AA = M.calAA4((ti, tj), A) for pa in AA: u = M.add(v, pa) if u in P: le.add(X[ti][u]) m.addConstr(le >= X[tj][v]) # given a keyType patch, at least a (4,15)-patch around ti = keyType for tj in range(4, 16): AA = M.calAA4((ti, tj), A) for v in P: le = LinExpr() for pa in AA: u = M.add(v, pa) if u in P: le.add(X[ti][u]) m.addConstr(le >= X[tj][v]) # given a (4,15)-patch, at least one keyType patch around m.optimize() for k in range(K): for i in range(len(P)): if 0.5 < X[k][P[i]].x: print(k, i) except gp.GurobiError as er: print(' ****** error ******') optimize()
47.937008
119
0.315867
1,222
6,088
1.567103
0.074468
0.125326
0.086162
0.071018
0.667363
0.648564
0.606266
0.54047
0.476762
0.398433
0
0.215046
0.336235
6,088
126
120
48.31746
0.258847
0.084428
0
0.304762
0
0
0.007554
0
0
0
0
0
0.019048
1
0.009524
false
0
0.028571
0
0.038095
0.028571
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
3d0c488ae9755a8d7e9479fe1e8f67fdbd016c84
121
py
Python
30_days_of_code/Day-7: Arrays.py
haneefnani/hackerrank
795e4d1db0637baf610632aea5e9dd6b44777365
[ "MIT" ]
null
null
null
30_days_of_code/Day-7: Arrays.py
haneefnani/hackerrank
795e4d1db0637baf610632aea5e9dd6b44777365
[ "MIT" ]
null
null
null
30_days_of_code/Day-7: Arrays.py
haneefnani/hackerrank
795e4d1db0637baf610632aea5e9dd6b44777365
[ "MIT" ]
null
null
null
n = int(input()) arr = list(map(int, input().rstrip().split())) arr.reverse() for num in arr: print(num , end=" ")
15.125
46
0.578512
19
121
3.684211
0.736842
0.228571
0
0
0
0
0
0
0
0
0
0
0.181818
121
7
47
17.285714
0.707071
0
0
0
0
0
0.008264
0
0
0
0
0
0
1
0
false
0
0
0
0
0.2
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
3d10757799c62ba9c65059f2ccc61b3e9a6e6a56
87
py
Python
warmup_scheduler/__init__.py
seo-95/pytorch-gradual-warmup-lr
99ce139a003d117b256fe72b0d5f33f0597f771a
[ "MIT" ]
803
2019-01-16T09:59:08.000Z
2022-03-31T03:36:51.000Z
warmup_scheduler/__init__.py
seo-95/pytorch-gradual-warmup-lr
99ce139a003d117b256fe72b0d5f33f0597f771a
[ "MIT" ]
20
2019-03-09T04:04:48.000Z
2021-11-24T09:10:00.000Z
warmup_scheduler/__init__.py
seo-95/pytorch-gradual-warmup-lr
99ce139a003d117b256fe72b0d5f33f0597f771a
[ "MIT" ]
120
2019-01-18T13:39:35.000Z
2022-03-30T11:40:24.000Z
from warmup_scheduler.scheduler import GradualWarmupScheduler __version__ = '0.3.2'
14.5
61
0.816092
10
87
6.6
0.9
0
0
0
0
0
0
0
0
0
0
0.038961
0.114943
87
5
62
17.4
0.818182
0
0
0
0
0
0.05814
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
3d1839f7928cc8f1097ec5b2cf25dbbab7da65bb
701
py
Python
Bite_77/uncommon.py
alehpineda/bitesofpy
bfd319a606cd0b7b9bfb85a3e8942872a2d43c48
[ "MIT" ]
null
null
null
Bite_77/uncommon.py
alehpineda/bitesofpy
bfd319a606cd0b7b9bfb85a3e8942872a2d43c48
[ "MIT" ]
2
2020-09-24T11:25:29.000Z
2021-06-25T15:43:35.000Z
Bite_77/uncommon.py
alehpineda/bitesofpy
bfd319a606cd0b7b9bfb85a3e8942872a2d43c48
[ "MIT" ]
null
null
null
""" You want to find people who have as much exposure to different cultures as yourself. Complete the uncommon_cities helper that takes the cities you have visited (my_cities) and the cities the other person has visited (other_cities) and returns the number of cities that both sequences do NOT have in common. So given [A B C] and [B C D] it should return 2 because only A and D are different. You can loop through both sequences but maybe there is a more concise way to do it? """ def uncommon_cities(my_cities, other_cities): """Compare my_cities and other_cities and return the number of different cities between the two""" return len(list(set(my_cities) ^ set(other_cities)))
43.8125
221
0.761769
122
701
4.295082
0.532787
0.061069
0.041985
0
0
0
0
0
0
0
0
0.001751
0.185449
701
15
222
46.733333
0.915937
0.813124
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
3
3d369882a105ff68b47b9d8f2e1286596bee8328
134
py
Python
src/zbdb.py
ZigAnon/babadook
c27ba32681d2d6933408952b0496faf37a3eda58
[ "MIT" ]
null
null
null
src/zbdb.py
ZigAnon/babadook
c27ba32681d2d6933408952b0496faf37a3eda58
[ "MIT" ]
null
null
null
src/zbdb.py
ZigAnon/babadook
c27ba32681d2d6933408952b0496faf37a3eda58
[ "MIT" ]
null
null
null
#!/usr/local/bin/python3.6 def is_ztest(m): if int(m.author.id) == int(zigID): return True else: return False
19.142857
38
0.58209
21
134
3.666667
0.857143
0
0
0
0
0
0
0
0
0
0
0.020408
0.268657
134
6
39
22.333333
0.765306
0.186567
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0
0
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
3
3d4403a2a1ba241e034f26570268a6d4a611eb8b
228
py
Python
ProcessingReviewAnalyse/viewInBoxSizes.py
RubberDuckDestroyer/enron
748df96ee63bce98d9b566ed797a7cb7e32a1714
[ "MIT" ]
2
2020-04-27T11:48:26.000Z
2020-04-27T11:58:57.000Z
ProcessingReviewAnalyse/viewInBoxSizes.py
RubberDuckDestroyer/enron
748df96ee63bce98d9b566ed797a7cb7e32a1714
[ "MIT" ]
null
null
null
ProcessingReviewAnalyse/viewInBoxSizes.py
RubberDuckDestroyer/enron
748df96ee63bce98d9b566ed797a7cb7e32a1714
[ "MIT" ]
null
null
null
import os from email.parser import Parser rootdir = "C:\\Users\\maxfr\\Desktop\\2020-Enron-Journal\\maildir\\lay-k" for directory, subdirectory, filenames in os.walk(rootdir): print(directory, subdirectory, len(filenames))
32.571429
73
0.758772
31
228
5.580645
0.774194
0.242775
0
0
0
0
0
0
0
0
0
0.019512
0.100877
228
7
74
32.571429
0.82439
0
0
0
0
0
0.266376
0.266376
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0.2
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
e9e47d30f365685a79b97e14ad9f2e66a2c6b956
1,357
py
Python
ravenframework/Databases/__init__.py
dgarrett622/raven
f36cc108f7500b0e2717df4832b69b801b43960d
[ "Apache-2.0" ]
null
null
null
ravenframework/Databases/__init__.py
dgarrett622/raven
f36cc108f7500b0e2717df4832b69b801b43960d
[ "Apache-2.0" ]
null
null
null
ravenframework/Databases/__init__.py
dgarrett622/raven
f36cc108f7500b0e2717df4832b69b801b43960d
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """ The Databases module includes efficient ways to serialize data to file. """ from __future__ import absolute_import from ..utils import InputData from .Database import DateBase as Database from .HDF5 import HDF5 from .NetCDF import NetCDF from .Factory import factory class DatabasesCollection(InputData.ParameterInput): """ Class for reading in a collection of databases """ DatabasesCollection.createClass("Databases") DatabasesCollection.addSub(HDF5.getInputSpecification()) DatabasesCollection.addSub(NetCDF.getInputSpecification()) def returnInputParameter(): """ Returns the input specs for the desired classes @ In, None @ Out, returnInputParameter, InputData.ParameterInput, parsing class """ return DatabasesCollection()
30.840909
74
0.775239
173
1,357
6.052023
0.589595
0.057307
0.024833
0.030564
0
0
0
0
0
0
0
0.009582
0.154016
1,357
43
75
31.55814
0.902439
0.596905
0
0
0
0
0.01833
0
0
0
0
0
0
1
0.083333
true
0
0.5
0
0.75
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
3
e9e63e975777f45769bdc25dfb5de68dccd19186
70
py
Python
titanic data.py
ransherraj/Predictions-using-Titanic-Dataset-
0bc175d9f85615489beab134fde039bda1c335b8
[ "Apache-2.0" ]
null
null
null
titanic data.py
ransherraj/Predictions-using-Titanic-Dataset-
0bc175d9f85615489beab134fde039bda1c335b8
[ "Apache-2.0" ]
null
null
null
titanic data.py
ransherraj/Predictions-using-Titanic-Dataset-
0bc175d9f85615489beab134fde039bda1c335b8
[ "Apache-2.0" ]
null
null
null
import pandas as pd df = pd.read_csv('titanic.csv') print(df.head())
23.333333
32
0.7
13
70
3.692308
0.769231
0
0
0
0
0
0
0
0
0
0
0
0.128571
70
3
33
23.333333
0.786885
0
0
0
0
0
0.15942
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0.333333
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
e9fe5fa1b2d2c6cc461959149d8a65a6435a5779
145
py
Python
app/data/schema/pydantic/token.py
lokaimoma/Bugza
93ffe344cb0be7dc4c45965f52798e02d05d320b
[ "Unlicense" ]
2
2022-02-14T23:53:00.000Z
2022-03-24T12:19:49.000Z
app/data/schema/pydantic/token.py
lokaimoma/Bugza
93ffe344cb0be7dc4c45965f52798e02d05d320b
[ "Unlicense" ]
null
null
null
app/data/schema/pydantic/token.py
lokaimoma/Bugza
93ffe344cb0be7dc4c45965f52798e02d05d320b
[ "Unlicense" ]
null
null
null
# Created by Kelvin_Clark on 1/31/2022, 12:42 PM from pydantic import BaseModel class TokenData(BaseModel): username: str user_id: int
18.125
48
0.737931
23
145
4.565217
0.956522
0
0
0
0
0
0
0
0
0
0
0.094017
0.193103
145
7
49
20.714286
0.803419
0.317241
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.25
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
0
0
0
0
0
3
180194eb7dce0c8168d47f447cf4eb4f25c278ca
253
py
Python
server/configure.py
shayanray/Memoirs
c0377b3467e79b7c653e04f47aca099ec53ac8a5
[ "CNRI-Python" ]
1
2018-09-15T14:57:57.000Z
2018-09-15T14:57:57.000Z
server/configure.py
shayanray/Memoirs
c0377b3467e79b7c653e04f47aca099ec53ac8a5
[ "CNRI-Python" ]
null
null
null
server/configure.py
shayanray/Memoirs
c0377b3467e79b7c653e04f47aca099ec53ac8a5
[ "CNRI-Python" ]
null
null
null
from flask import Flask import os FLASK_NAME = os.environ.get("FLASK_NAME") FLASK_SECRET_KEY = os.environ.get("FLASK_SECRET_KEY") def create_app(): app = Flask(FLASK_NAME) app.secret_key = FLASK_SECRET_KEY return app app = create_app()
16.866667
53
0.735178
40
253
4.35
0.325
0.206897
0.241379
0.195402
0
0
0
0
0
0
0
0
0.166008
253
14
54
18.071429
0.824645
0
0
0
0
0
0.102767
0
0
0
0
0
0
1
0.111111
false
0
0.222222
0
0.444444
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
1822d9592112b5a3c272c252e66ed9f1db7d8db6
98
py
Python
app.py
ijafri26/dashi
2b21f166b0897ac25b2b4127391db17f9d33b80c
[ "MIT" ]
null
null
null
app.py
ijafri26/dashi
2b21f166b0897ac25b2b4127391db17f9d33b80c
[ "MIT" ]
7
2019-06-06T13:42:08.000Z
2019-06-06T17:43:08.000Z
dashi/app.py
slazicoicr/dashi
ede0cebbd2c3490e9f8c4b56ba3f2e04b6576997
[ "MIT" ]
null
null
null
import dash app = dash.Dash() server = app.server app.config.suppress_callback_exceptions = True
16.333333
46
0.785714
14
98
5.357143
0.642857
0.24
0
0
0
0
0
0
0
0
0
0
0.122449
98
5
47
19.6
0.872093
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
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
3
1823214ec67111fb5e46a3d97c7acfe6d290c211
363
py
Python
2020/05/16/Adding Extra Fields On Many-To-Many Relationships in Django/many_to_many_extra/many_to_many_extra/example/migrations/0003_auto_20200516_1759.py
kenjitagawa/youtube_video_code
ef3c48b9e136b3745d10395d94be64cb0a1f1c97
[ "Unlicense" ]
492
2019-06-25T12:54:31.000Z
2022-03-30T12:38:28.000Z
2020/05/16/Adding Extra Fields On Many-To-Many Relationships in Django/many_to_many_extra/many_to_many_extra/example/migrations/0003_auto_20200516_1759.py
kenjitagawa/youtube_video_code
ef3c48b9e136b3745d10395d94be64cb0a1f1c97
[ "Unlicense" ]
23
2019-10-01T01:36:08.000Z
2022-02-10T12:46:16.000Z
2020/05/16/Adding Extra Fields On Many-To-Many Relationships in Django/many_to_many_extra/many_to_many_extra/example/migrations/0003_auto_20200516_1759.py
kenjitagawa/youtube_video_code
ef3c48b9e136b3745d10395d94be64cb0a1f1c97
[ "Unlicense" ]
1,734
2019-06-03T06:25:13.000Z
2022-03-31T23:57:53.000Z
# Generated by Django 3.0.6 on 2020-05-16 17:59 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('example', '0002_course_students'), ] operations = [ migrations.DeleteModel( name='Course', ), migrations.DeleteModel( name='Student', ), ]
18.15
47
0.570248
35
363
5.857143
0.771429
0.204878
0.243902
0
0
0
0
0
0
0
0
0.076613
0.316804
363
19
48
19.105263
0.75
0.123967
0
0.307692
1
0
0.126582
0
0
0
0
0
0
1
0
false
0
0.076923
0
0.307692
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
182e06cef46a285d9a2d1ce99a77ccd40f9009ad
156
py
Python
config/api_keys.py
rupakc/Positron
99c8a34d565b812411e5f26b3a60baffb512a1f2
[ "Unlicense" ]
null
null
null
config/api_keys.py
rupakc/Positron
99c8a34d565b812411e5f26b3a60baffb512a1f2
[ "Unlicense" ]
null
null
null
config/api_keys.py
rupakc/Positron
99c8a34d565b812411e5f26b3a60baffb512a1f2
[ "Unlicense" ]
null
null
null
CURRENT_NEWS_API_KEY = '' # Replace with your news.org API keys news = { 'api_key': '', 'base_everything_url': 'https://newsapi.org/v2/everything' }
31.2
63
0.679487
22
156
4.545455
0.681818
0.14
0.2
0
0
0
0
0
0
0
0
0.007634
0.160256
156
5
64
31.2
0.755725
0.224359
0
0
0
0
0.491667
0
0
0
0
0
0
1
0
false
0
0
0
0
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
0
0
0
0
0
0
0
3
1845f462a7da2df21023bb7b8ed75fa7a5a9ee3b
323
py
Python
AutoDL_sample_code_submission/at_speech/__init__.py
dianjixz/AutoDL
48db4eb04d55ce69e93d4a3bdc24592bdb34a868
[ "Apache-2.0" ]
1,044
2020-04-19T04:48:24.000Z
2022-03-24T07:38:43.000Z
AutoDL_sample_code_submission/at_speech/__init__.py
dianjixz/AutoDL
48db4eb04d55ce69e93d4a3bdc24592bdb34a868
[ "Apache-2.0" ]
39
2020-05-02T01:19:20.000Z
2021-09-11T21:32:12.000Z
AutoDL_sample_code_submission/at_speech/__init__.py
dianjixz/AutoDL
48db4eb04d55ce69e93d4a3bdc24592bdb34a868
[ "Apache-2.0" ]
203
2020-04-07T11:06:39.000Z
2022-03-11T02:49:06.000Z
import os from at_speech.data_space import DNpAugPreprocessor, MixupGenerator, TTAGenerator from at_speech.backbones.thinresnet34 import build_tr34_model from at_speech.data_space.examples_gen_maker import DataGenerator as Tr34DataGenerator from at_speech.classifier import SLLRLiblinear, SLLRSag, ThinResnet34Classifier
40.375
86
0.888545
40
323
6.925
0.625
0.086643
0.173285
0.115523
0.151625
0
0
0
0
0
0
0.026936
0.080495
323
7
87
46.142857
0.905724
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
3
185a2863dde4a3d7e7f7d3ac618b13d805eda0f1
166
py
Python
config.py
bandham-manikanta/latest-ipo-subscription-details-streamlit
51ec999dcc6db807543b5576f9ec44fe770f68f2
[ "MIT" ]
null
null
null
config.py
bandham-manikanta/latest-ipo-subscription-details-streamlit
51ec999dcc6db807543b5576f9ec44fe770f68f2
[ "MIT" ]
null
null
null
config.py
bandham-manikanta/latest-ipo-subscription-details-streamlit
51ec999dcc6db807543b5576f9ec44fe770f68f2
[ "MIT" ]
null
null
null
ENV='development' DEBUG=True SQLALCHEMY_DATABASE_URI='sqlite:///data_base.db' #SQLALCHEMY_ECHO=True SQLALCHEMY_TRACK_MODIFICATIONS=False SCHEDULER_API_ENABLED = True
23.714286
48
0.855422
22
166
6.090909
0.818182
0.208955
0
0
0
0
0
0
0
0
0
0
0.048193
166
6
49
27.666667
0.848101
0.120482
0
0
0
0
0.227586
0.151724
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
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
185d42a8695b7744f91ba6169ec2fe7bdc4fb73e
2,931
py
Python
scripts/cli_rebalance.py
ramalingam-cb/testrunner
81cea7a5a493cf0c67fca7f97c667cd3c6ad2142
[ "Apache-2.0" ]
null
null
null
scripts/cli_rebalance.py
ramalingam-cb/testrunner
81cea7a5a493cf0c67fca7f97c667cd3c6ad2142
[ "Apache-2.0" ]
null
null
null
scripts/cli_rebalance.py
ramalingam-cb/testrunner
81cea7a5a493cf0c67fca7f97c667cd3c6ad2142
[ "Apache-2.0" ]
null
null
null
import getopt import copy import logging import sys from threading import Thread from datetime import datetime import socket import Queue sys.path = [".", "lib"] + sys.path import testconstants import time from builds.build_query import BuildQuery import logging.config from membase.api.exception import ServerUnavailableException from membase.api.rest_client import RestConnection, RestHelper from remote.remote_util import RemoteMachineShellConnection, RemoteUtilHelper from membase.helper.cluster_helper import ClusterOperationHelper from testconstants import MV_LATESTBUILD_REPO from testconstants import SHERLOCK_BUILD_REPO from testconstants import COUCHBASE_REPO import TestInput logging.config.fileConfig("scripts.logging.conf") log = logging.getLogger() def usage(): print "Please provide ini file" def main(): log_install_failed = "some nodes were not install successfully!" try: (opts, args) = getopt.getopt(sys.argv[1:], 'hi:p:', []) for o, a in opts: if o == "-h": usage() if len(sys.argv) <= 1: usage() input = TestInput.TestInputParser.get_test_input(sys.argv) if not input.servers: usage("ERROR: no servers specified. Please use the -i parameter.") except IndexError: usage() except getopt.GetoptError, err: usage("ERROR: " + str(err)) print input cli_command = "rebalance" if "rebalance_in" in input.test_params: # add upgraded nodes in the cluster # Assumption 4 nodes in ini file and add nodes from last node upwards remote_client = RemoteMachineShellConnection(input.servers[0]) for server in input.servers[2:]: print server.ip options = "--server-add={0}:8091".format(server.ip) + " --server-add-username=Administrator --server-add-password=password" output, error = remote_client.execute_couchbase_cli(cli_command, options=options, cluster_host=input.servers[0].ip, cluster_port=server.port, user=server.rest_username, password=server.rest_password) print output, error time.sleep(5) if "rebalance_out" in input.test_params: # remove old build nodes out from the cluster # Assumption 4 nodes and remove nodes from the top cli_command = "rebalance" remote_client = RemoteMachineShellConnection(input.servers[2]) for server in input.servers[:2]: print server.ip options = "--server-remove={0}:8091".format(server.ip) + " --server-add-username=Administrator --server-add-password=password" output, error = remote_client.execute_couchbase_cli(cli_command, options=options, cluster_host=input.servers[2].ip, cluster_port=server.port, user=server.rest_username, password=server.rest_password) print output, error time.sleep(5) if __name__ == "__main__": main()
36.185185
211
0.700102
364
2,931
5.513736
0.346154
0.041854
0.025909
0.026906
0.38864
0.310912
0.310912
0.310912
0.310912
0.310912
0
0.009475
0.207779
2,931
80
212
36.6375
0.854866
0.066189
0
0.177419
0
0
0.142439
0.064079
0
0
0
0
0
0
null
null
0.064516
0.322581
null
null
0.096774
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
1
1
0
0
0
0
3
185f1f449d6c6421dfa20d0eb34750c98ef71817
24,420
py
Python
adversarial regularization/training_code/purchase_defended.py
inspire-group/membership-inference-evaluation
daa4b0c88a7eda36536abe5b9a2650623243a3c5
[ "MIT" ]
66
2020-03-25T06:10:23.000Z
2022-03-29T13:27:32.000Z
adversarial regularization/training_code/purchase_defended.py
wjw950224/membership-inference-evaluation
daa4b0c88a7eda36536abe5b9a2650623243a3c5
[ "MIT" ]
5
2020-06-04T12:53:19.000Z
2021-11-24T15:57:24.000Z
adversarial regularization/training_code/purchase_defended.py
wjw950224/membership-inference-evaluation
daa4b0c88a7eda36536abe5b9a2650623243a3c5
[ "MIT" ]
11
2020-09-02T22:16:05.000Z
2022-02-08T08:34:12.000Z
# coding: utf-8 # In[8]: from __future__ import print_function import argparse import os os.environ['CUDA_DEVICE_ORDER']="PCI_BUS_ID" os.environ['CUDA_VISIBLE_DEVICES']='7' import shutil import time import random import torch.nn.functional as F import torch import pickle import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim as optim import torch.utils.data as data import torchvision.transforms as transforms import torchvision.datasets as datasets from utils import Logger, AverageMeter, accuracy, mkdir_p, savefig import numpy as np import tarfile from sklearn.cluster import KMeans from sklearn import datasets import urllib use_cuda = torch.cuda.is_available() DATASET_PATH='../datasets/purchase' DATASET_NAME= 'dataset_purchase' if not os.path.isdir(DATASET_PATH): mkdir_p(DATASET_PATH) DATASET_FILE = os.path.join(DATASET_PATH,DATASET_NAME) if not os.path.isfile(DATASET_FILE): print("Dowloading the dataset...") urllib.request.urlretrieve("https://www.comp.nus.edu.sg/~reza/files/dataset_purchase.tgz",os.path.join(DATASET_PATH,'tmp.tgz')) print('Dataset Dowloaded') tar = tarfile.open(os.path.join(DATASET_PATH,'tmp.tgz')) tar.extractall(path=DATASET_PATH) data_set =np.genfromtxt(DATASET_FILE,delimiter=',') X = data_set[:,1:].astype(np.float64) Y = (data_set[:,0]).astype(np.int32)-1 print(X.shape, Y.shape) class PurchaseClassifier(nn.Module): def __init__(self,num_classes=100): super(PurchaseClassifier, self).__init__() self.features = nn.Sequential( nn.Linear(600,1024), nn.Tanh(), nn.Linear(1024,512), nn.Tanh(), nn.Linear(512,256), nn.Tanh(), nn.Linear(256,128), nn.Tanh(), ) self.classifier = nn.Linear(128,num_classes) # for key in self.state_dict(): # if key.split('.')[-1] == 'weight': # nn.init.normal(self.state_dict()[key], std=0.01) # print (key) # elif key.split('.')[-1] == 'bias': # self.state_dict()[key][...] = 0 def forward(self,x): hidden_out = self.features(x) return self.classifier(hidden_out),hidden_out # In[16]: class InferenceAttack_HZ(nn.Module): def __init__(self,num_classes): self.num_classes=num_classes super(InferenceAttack_HZ, self).__init__() self.features=nn.Sequential( nn.Linear(100,1024), nn.ReLU(), nn.Linear(1024,512), nn.ReLU(), nn.Linear(512,64), nn.ReLU(), ) self.labels=nn.Sequential( nn.Linear(num_classes,128), nn.ReLU(), nn.Linear(128,64), nn.ReLU(), ) self.combine=nn.Sequential( nn.Linear(64*2,512), nn.ReLU(), nn.Linear(512,256), nn.ReLU(), nn.Linear(256,128), nn.ReLU(), nn.Linear(128,64), nn.ReLU(), nn.Linear(64,1), ) for key in self.state_dict(): print (key) if key.split('.')[-1] == 'weight': nn.init.normal(self.state_dict()[key], std=0.01) print (key) elif key.split('.')[-1] == 'bias': self.state_dict()[key][...] = 0 self.output= nn.Sigmoid() def forward(self,x1,x2,l): #print (l.size(),x.size()) out_x1 = self.features(x1) out_l = self.labels(l) is_member =self.combine( torch.cat((out_x1,out_l),1)) return self.output(is_member) # In[17]: len_train =len(X) ################################################################### ################################################################### r = np.load('../dataset_shuffle/random_r_purchase100.npy') X=X[r] Y=Y[r] train_classifier_ratio, train_attack_ratio = 0.1,0.15 train_classifier_data = X[:int(train_classifier_ratio*len_train)] train_attack_data = X[int(train_classifier_ratio*len_train):int((train_classifier_ratio+train_attack_ratio)*len_train)] test_data = X[int((train_classifier_ratio+train_attack_ratio)*len_train):] train_classifier_label = Y[:int(train_classifier_ratio*len_train)] train_attack_label = Y[int(train_classifier_ratio*len_train):int((train_classifier_ratio+train_attack_ratio)*len_train)] test_label = Y[int((train_classifier_ratio+train_attack_ratio)*len_train):] # In[18]: def train(train_data,labels, model, criterion, optimizer, epoch, use_cuda,num_batchs=999999): # switch to train mode model.train() batch_time = AverageMeter() data_time = AverageMeter() losses = AverageMeter() top1 = AverageMeter() top5 = AverageMeter() end = time.time() len_t = (len(train_data)//batch_size)-1 for ind in range(len_t): if ind > num_batchs: break # measure data loading time inputs = train_data[ind*batch_size:(ind+1)*batch_size] targets = labels[ind*batch_size:(ind+1)*batch_size] data_time.update(time.time() - end) if use_cuda: inputs, targets = inputs.cuda(), targets.cuda(async=True) inputs, targets = torch.autograd.Variable(inputs), torch.autograd.Variable(targets) # compute output outputs,_ = model(inputs) loss = criterion(outputs, targets) # measure accuracy and record loss prec1, prec5 = accuracy(outputs.data, targets.data, topk=(1, 5)) losses.update(loss.data, inputs.size()[0]) top1.update(prec1, inputs.size()[0]) top5.update(prec5, inputs.size()[0]) # compute gradient and do SGD step optimizer.zero_grad() loss.backward() optimizer.step() # measure elapsed time batch_time.update(time.time() - end) end = time.time() # plot progress if ind%100==0: print ('({batch}/{size}) Data: {data:.3f}s | Batch: {bt:.3f}s | | Loss: {loss:.4f} | top1: {top1: .4f} | top5: {top5: .4f}'.format( batch=ind + 1, size=len_t, data=data_time.avg, bt=batch_time.avg, loss=losses.avg, top1=top1.avg, top5=top5.avg, )) return (losses.avg, top1.avg) return # In[19]: def test(test_data,labels, model, criterion, epoch, use_cuda): batch_time = AverageMeter() data_time = AverageMeter() losses = AverageMeter() top1 = AverageMeter() top5 = AverageMeter() # switch to evaluate mode model.eval() end = time.time() len_t = (len(test_data)//batch_size)-1 for ind in range(len_t): # measure data loading time inputs = test_data[ind*batch_size:(ind+1)*batch_size] targets = labels[ind*batch_size:(ind+1)*batch_size] data_time.update(time.time() - end) if use_cuda: inputs, targets = inputs.cuda(), targets.cuda() inputs, targets = torch.autograd.Variable(inputs, volatile=True), torch.autograd.Variable(targets) # compute output outputs,_ = model(inputs) loss = criterion(outputs, targets) # measure accuracy and record loss prec1, prec5 = accuracy(outputs.data, targets.data, topk=(1, 5)) losses.update(loss.data, inputs.size()[0]) top1.update(prec1, inputs.size()[0]) top5.update(prec5, inputs.size()[0]) # measure elapsed time batch_time.update(time.time() - end) end = time.time() # plot progress # if ind % 100==0: # print ('({batch}/{size}) Data: {data:.3f}s | Batch: {bt:.3f}s | Loss: {loss:.4f} | top1: {top1: .4f} | top5: {top5: .4f}'.format( # batch=ind + 1, # size=len(test_data), # data=data_time.avg, # bt=batch_time.avg, # loss=losses.avg, # top1=top1.avg, # top5=top5.avg, # )) return (losses.avg, top1.avg) # In[20]: def train_privatly(train_data,labels, model,inference_model, criterion, optimizer, epoch, use_cuda,num_batchs=10000,skip_batch=0,alpha=0.5): # switch to train mode model.train() inference_model.eval() batch_time = AverageMeter() data_time = AverageMeter() losses = AverageMeter() top1 = AverageMeter() top5 = AverageMeter() end = time.time() len_t = (len(train_data)//batch_size)-1 for ind in range(skip_batch,len_t): if ind >= skip_batch+num_batchs: break # measure data loading time #print (ind) inputs = train_data[ind*batch_size:(ind+1)*batch_size] targets = labels[ind*batch_size:(ind+1)*batch_size] data_time.update(time.time() - end) if use_cuda: inputs, targets = inputs.cuda(), targets.cuda(async=True) inputs, targets = torch.autograd.Variable(inputs), torch.autograd.Variable(targets) # compute output outputs,h_layer = model(inputs) one_hot_tr = torch.from_numpy((np.zeros((outputs.size()[0],outputs.size(1))))).cuda().type(torch.cuda.FloatTensor) target_one_hot_tr = one_hot_tr.scatter_(1, targets.type(torch.cuda.LongTensor).view([-1,1]).data,1) infer_input_one_hot = torch.autograd.Variable(target_one_hot_tr) inference_output = inference_model ( outputs,h_layer,infer_input_one_hot) #print (inference_output.mean()) relu = nn.ReLU() loss = criterion(outputs, targets) + ((alpha)*(torch.mean((inference_output ))-0.5)) # measure accuracy and record loss prec1, prec5 = accuracy(outputs.data, targets.data, topk=(1, 5)) losses.update(loss.data, inputs.size()[0]) top1.update(prec1, inputs.size()[0]) top5.update(prec5, inputs.size()[0]) # compute gradient and do SGD step optimizer.zero_grad() loss.backward() optimizer.step() # measure elapsed time batch_time.update(time.time() - end) end = time.time() # plot progress if ind%100==0: print (alpha, '({batch}/{size}) Data: {data:.3f}s | Batch: {bt:.3f}s | | Loss: {loss:.4f} | top1: {top1: .4f} | top5: {top5: .4f}'.format( batch=ind + 1, size=len_t, data=data_time.avg, bt=batch_time.avg, loss=losses.avg, top1=top1.avg, top5=top5.avg, )) return (losses.avg, top1.avg) # In[ ]: # In[21]: def save_checkpoint(state, is_best, checkpoint='./models/purchase_defended', filename='checkpoint.pth.tar'): if not os.path.isdir(checkpoint): mkdir_p(checkpoint) filepath = os.path.join(checkpoint, filename) torch.save(state, filepath) if is_best: shutil.copyfile(filepath, os.path.join(checkpoint, 'model_best.pth.tar')) # In[22]: def train_attack(train_data,labels,attack_data,attack_label, model,attack_model, criterion,attack_criterion, optimizer,attack_optimizer, epoch, use_cuda,num_batchs=100000,skip_batch=0): # switch to train mode model.eval() attack_model.train() batch_time = AverageMeter() data_time = AverageMeter() losses = AverageMeter() top1 = AverageMeter() top5 = AverageMeter() end = time.time() len_t = min((len(attack_data)//batch_size) ,(len(train_data)//batch_size))-1 #print (skip_batch, len_t) for ind in range(skip_batch, len_t): if ind >= skip_batch+num_batchs: break # measure data loading time inputs = train_data[ind*batch_size:(ind+1)*batch_size] targets = labels[ind*batch_size:(ind+1)*batch_size] inputs_attack = attack_data[ind*batch_size:(ind+1)*batch_size] targets_attack = attack_label[ind*batch_size:(ind+1)*batch_size] #print ( len(targets_attack), len(targets)) data_time.update(time.time() - end) if use_cuda: inputs, targets = inputs.cuda(), targets.cuda(async=True) inputs_attack , targets_attack = inputs_attack.cuda(), targets_attack.cuda(async=True) inputs, targets = torch.autograd.Variable(inputs), torch.autograd.Variable(targets) inputs_attack , targets_attack = torch.autograd.Variable(inputs_attack), torch.autograd.Variable(targets_attack) # compute output outputs, h_layer = model(inputs) outputs_non, h_layer_non = model(inputs_attack) classifier_input = torch.cat((inputs,inputs_attack)) comb_inputs_h = torch.cat((h_layer,h_layer_non)) comb_inputs = torch.cat((outputs,outputs_non)) if use_cuda: comb_targets= torch.cat((targets,targets_attack)).view([-1,1]).type(torch.cuda.FloatTensor) else: comb_targets= torch.cat((targets,targets_attack)).view([-1,1]).type(torch.FloatTensor) #print (comb_inputs.size(),comb_targets.size()) attack_input = comb_inputs #torch.cat((comb_inputs,comb_targets),1) one_hot_tr = torch.from_numpy((np.zeros((attack_input.size()[0],outputs.size(1))))).cuda().type(torch.cuda.FloatTensor) target_one_hot_tr = one_hot_tr.scatter_(1, torch.cat((targets,targets_attack)).type(torch.cuda.LongTensor).view([-1,1]).data,1) infer_input_one_hot = torch.autograd.Variable(target_one_hot_tr) # sf= nn.Softmax(dim=0) # att_inp=torch.stack([attack_input, infer_input_one_hot],1) # att_inp = att_inp.view([attack_input.size()[0],1,2,attack_input.size(1)]) #attack_output = attack_model(att_inp).view([-1]) attack_output = attack_model(attack_input,comb_inputs_h,infer_input_one_hot).view([-1]) #attack_output = attack_model(attack_input).view([-1]) att_labels = np.zeros((inputs.size()[0]+inputs_attack.size()[0])) att_labels [:inputs.size()[0]] =1.0 att_labels [inputs.size()[0]:] =0.0 is_member_labels = torch.from_numpy(att_labels).type(torch.FloatTensor) if use_cuda: is_member_labels = is_member_labels.cuda() v_is_member_labels = torch.autograd.Variable(is_member_labels) classifier_targets = comb_targets.clone().view([-1]).type(torch.cuda.LongTensor) loss_attack = attack_criterion(attack_output, v_is_member_labels) # measure accuracy and record loss #prec1,p5 = accuracy(attack_output.data, v_is_member_labels.data, topk=(1,2)) prec1=np.mean(np.equal((attack_output.data.cpu().numpy() >0.5),(v_is_member_labels.data.cpu().numpy()> 0.5))) losses.update(loss_attack.data, attack_input.size()[0]) top1.update(prec1, attack_input.size()[0]) #print ( attack_output.data.cpu().numpy(),v_is_member_labels.data.cpu().numpy() ,attack_input.data.cpu().numpy()) #raise # compute gradient and do SGD step attack_optimizer.zero_grad() loss_attack.backward() attack_optimizer.step() # measure elapsed time batch_time.update(time.time() - end) end = time.time() # plot progress if ind%100==0: print ('({batch}/{size}) Data: {data:.3f}s | Batch: {bt:.3f}s | | Loss: {loss:.4f} | top1: {top1: .4f} '.format( batch=ind + 1, size=len_t, data=data_time.avg, bt=batch_time.avg, loss=losses.avg, top1=top1.avg, )) return (losses.avg, top1.avg) # In[23]: def test_attack(train_data,labels,attack_data,attack_label, model,attack_model, criterion,attack_criterion, optimizer,attack_optimizer, epoch, use_cuda): model.eval() attack_model.eval() batch_time = AverageMeter() data_time = AverageMeter() losses = AverageMeter() top1 = AverageMeter() top5 = AverageMeter() end = time.time() len_t = min((len(attack_data)//batch_size) ,(len(train_data)//batch_size))-1 member_prob = np.zeros((len_t+1)*batch_size) nonmember_prob = np.zeros((len_t+1)*batch_size) for ind in range(len_t): # measure data loading time inputs = train_data[ind*batch_size:(ind+1)*batch_size] targets = labels[ind*batch_size:(ind+1)*batch_size] inputs_attack = attack_data[ind*batch_size:(ind+1)*batch_size] targets_attack = attack_label[ind*batch_size:(ind+1)*batch_size] #print ( len(targets_attack), len(targets)) data_time.update(time.time() - end) if use_cuda: inputs, targets = inputs.cuda(), targets.cuda(async=True) inputs_attack , targets_attack = inputs_attack.cuda(), targets_attack.cuda(async=True) inputs, targets = torch.autograd.Variable(inputs), torch.autograd.Variable(targets) inputs_attack , targets_attack = torch.autograd.Variable(inputs_attack), torch.autograd.Variable(targets_attack) # compute output outputs,h_layer = model(inputs) outputs_non,h_layer_non = model(inputs_attack) comb_inputs_h = torch.cat((h_layer,h_layer_non)) comb_inputs = torch.cat((outputs,outputs_non)) if use_cuda: comb_targets= torch.cat((targets,targets_attack)).view([-1,1]).type(torch.cuda.FloatTensor) else: comb_targets= torch.cat((targets,targets_attack)).view([-1,1]).type(torch.FloatTensor) #print (comb_inputs.size(),comb_targets.size()) attack_input = comb_inputs #torch.cat((comb_inputs,comb_targets),1) one_hot_tr = torch.from_numpy((np.zeros((attack_input.size()[0],outputs.size(1))))).cuda().type(torch.cuda.FloatTensor) target_one_hot_tr = one_hot_tr.scatter_(1, torch.cat((targets,targets_attack)).type(torch.cuda.LongTensor).view([-1,1]).data,1) infer_input_one_hot = torch.autograd.Variable(target_one_hot_tr) #attack_output = attack_model(att_inp).view([-1]) attack_output = attack_model(attack_input,comb_inputs_h,infer_input_one_hot).view([-1]) #attack_output = attack_model(attack_input).view([-1]) att_labels = np.zeros((inputs.size()[0]+inputs_attack.size()[0])) att_labels [:inputs.size()[0]] =1.0 att_labels [inputs.size()[0]:] =0.0 is_member_labels = torch.from_numpy(att_labels).type(torch.FloatTensor) if use_cuda: is_member_labels = is_member_labels.cuda() v_is_member_labels = torch.autograd.Variable(is_member_labels) loss = attack_criterion(attack_output, v_is_member_labels) # measure accuracy and record loss #prec1,p5 = accuracy(attack_output.data, v_is_member_labels.data, topk=(1,2)) member_prob[ind*batch_size:(ind+1)*batch_size]= attack_output.data.cpu().numpy()[:batch_size] nonmember_prob[ind*batch_size:(ind+1)*batch_size]= attack_output.data.cpu().numpy()[batch_size:] prec1=np.mean(np.equal((attack_output.data.cpu().numpy() >0.5),(v_is_member_labels.data.cpu().numpy()> 0.5))) losses.update(loss.data, attack_input.size()[0]) top1.update(prec1, attack_input.size()[0]) #raise # compute gradient and do SGD step # measure elapsed time batch_time.update(time.time() - end) end = time.time() # plot progress if ind%100==0: print ('({batch}/{size}) Data: {data:.3f}s | Batch: {bt:.3f}s | | Loss: {loss:.4f} | top1: {top1: .4f} '.format( batch=ind + 1, size=len_t, data=data_time.avg, bt=batch_time.avg, loss=losses.avg, top1=top1.avg, )) return (losses.avg, top1.avg,member_prob,nonmember_prob) return # In[24]: def find_alpha(acc): return 3.0 # In[29]: best_acc = 0.0 epochs=20 batch_size=128 # In[36]: attack_model = InferenceAttack_HZ(100) attack_model = torch.nn.DataParallel(attack_model).cuda() attack_criterion = nn.MSELoss() attack_optimizer = optim.Adam(attack_model.parameters(),lr=0.0001) model = PurchaseClassifier() model = torch.nn.DataParallel(model).cuda() criterion = nn.CrossEntropyLoss() optimizer = optim.Adam(model.parameters(), lr=0.001) # In[37]: for epoch in range(epochs): r= np.arange(len(train_classifier_data)) np.random.shuffle(r) train_classifier_data = train_classifier_data[r] train_classifier_label = train_classifier_label[r] train_classifier_data_tensor = torch.from_numpy(train_classifier_data).type(torch.FloatTensor) train_classifier_label_tensor = torch.from_numpy(train_classifier_label).type(torch.LongTensor) r= np.arange(len(train_attack_data)) np.random.shuffle(r) train_attack_data = train_attack_data[r] train_attack_label = train_attack_label[r] train_attack_data_tensor = torch.from_numpy(train_attack_data).type(torch.FloatTensor) train_attack_label_tensor = torch.from_numpy(train_attack_label).type(torch.LongTensor) test_data_tensor = torch.from_numpy(test_data).type(torch.FloatTensor) test_label_tensor = torch.from_numpy(test_label).type(torch.LongTensor) test_loss, test_acc = test(test_data_tensor,test_label_tensor, model, criterion, epoch, use_cuda) #privacy_loss, privacy_acc = privacy_train(trainloader,testloader,model,inferenece_model,criterion_attack,optimizer_mem,epoch,use_cuda) print('\nEpoch: [%d | %d]' % (epoch + 1, epochs)) if epoch == 0: train_loss, train_acc = train(train_classifier_data_tensor,train_classifier_label_tensor, model, criterion, optimizer, epoch, use_cuda) for i in range(5): train_attack(train_classifier_data_tensor,train_classifier_label_tensor ,train_attack_data_tensor,train_attack_label_tensor,model,attack_model,criterion,attack_criterion,optimizer,attack_optimizer,epoch,use_cuda) else: for i in range(76): at_loss,at_acc = train_attack(train_classifier_data_tensor,train_classifier_label_tensor ,train_attack_data_tensor,train_attack_label_tensor,model,attack_model,criterion,attack_criterion,optimizer,attack_optimizer,epoch,use_cuda,52,(i*52)%150) tr_loss,tr_acc=train_privatly(train_classifier_data_tensor,train_classifier_label_tensor, model,attack_model, criterion, optimizer, epoch, use_cuda,2,(2*i)%152,3.0) test_loss, test_acc = test(test_data_tensor,test_label_tensor, model, criterion, epoch, use_cuda) #privacy_loss, privacy_acc = privacy_train(trainloader,testloader,model,inferenece_model,criterion_attack,optimizer_mem,epoch,use_cuda) print ('test acc',test_acc, at_acc,at_loss,best_acc) # append logger file # save model is_best = test_acc>best_acc best_acc = max(test_acc, best_acc) save_checkpoint({ 'epoch': epoch + 1, 'state_dict': model.state_dict(), 'acc': test_acc, 'best_acc': best_acc, 'optimizer' : optimizer.state_dict(), }, is_best,filename='Depoch%d'%epoch)
31.632124
203
0.6043
3,071
24,420
4.577662
0.098339
0.03137
0.028382
0.017072
0.750747
0.718025
0.678688
0.663181
0.638071
0.619434
0
0.02468
0.264947
24,420
771
204
31.673152
0.758496
0.12068
0
0.576355
0
0.009852
0.037888
0.003248
0
0
0
0
0
0
null
null
0
0.054187
null
null
0.029557
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
3
1865e2523008915367fdfb329906864ecba89d3d
283
py
Python
Commander-Rank/DAY-6/88A.py
rohansaini886/Peer-Programming-Hub-CP-Winter_Camp
d27fb6aa7e726e6d2cb95270c9e644d38d64dd1c
[ "MIT" ]
2
2021-12-09T18:07:46.000Z
2022-01-26T16:51:18.000Z
Commander-Rank/DAY-6/88A.py
rohansaini886/Peer-Programming-Hub-CP-Winter_Camp
d27fb6aa7e726e6d2cb95270c9e644d38d64dd1c
[ "MIT" ]
null
null
null
Commander-Rank/DAY-6/88A.py
rohansaini886/Peer-Programming-Hub-CP-Winter_Camp
d27fb6aa7e726e6d2cb95270c9e644d38d64dd1c
[ "MIT" ]
null
null
null
n = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'B', 'H'] i = sorted(n.index(x) for x in input().split()) c = (i[1] - i[0], i[2] - i[1]) if c in ((4, 3), (3, 5), (5, 4)): print('major') elif c in ((3, 4), (4, 5), (5, 3)): print('minor') else: print('strange')
28.3
68
0.39576
57
283
1.964912
0.526316
0.035714
0
0
0
0
0
0
0
0
0
0.072727
0.222615
283
9
69
31.444444
0.436364
0
0
0
0
0
0.116608
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
187791d447dccbca890d596b06b38a232e1237e1
905
py
Python
lifepath/__init__.py
jyurkiw/py_cyberpunk_2020_rest_api
f423761622c11b6f91556560a309697144a166a5
[ "MIT" ]
null
null
null
lifepath/__init__.py
jyurkiw/py_cyberpunk_2020_rest_api
f423761622c11b6f91556560a309697144a166a5
[ "MIT" ]
null
null
null
lifepath/__init__.py
jyurkiw/py_cyberpunk_2020_rest_api
f423761622c11b6f91556560a309697144a166a5
[ "MIT" ]
null
null
null
# __all__ from .lifepath import LifepathRandomOriginsApi from .lifepath import LifepathRandomFamilyApi from .lifepath import LifepathRandomMotivationsApi from .lifepath import LifepathRandomLifeEventsApi from .lifepath import LifepathRandomCompleteApi from .lifepath import LifepathRandomStyleAndMotivationsApi from .lifepath import LifepathRandomFamilyAndEventsApi __all__ = [ "LifepathRandomOriginsApi", "LifepathRandomFamilyApi", "LifepathRandomMotivationsApi", "LifepathRandomLifeEventsApi", "LifepathRandomCompleteApi", "LifepathRandomStyleAndMotivationsApi", "LifepathRandomFamilyAndEventsApi", ] # Remainder from .lifepath_util import getLifepath from .lifepath_util import originsAndPersonalStyleStart from .lifepath_util import familyBackgroundStart from .lifepath_util import motivationsStart from .lifepath_util import lifeEventsStart
32.321429
59
0.823204
63
905
11.619048
0.285714
0.196721
0.172131
0.150273
0
0
0
0
0
0
0
0
0.134807
905
27
60
33.518519
0.934866
0.018785
0
0
0
0
0.227273
0.227273
0
0
0
0
0
1
0
false
0
0.571429
0
0.571429
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
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
3
188376b6c2ef959e2c76d0f0fa90c2fd56f7318b
284
py
Python
ex14plus.py
Allwillcome/LearnPythontheHardWay
e974cd5dec37b9819fb324f4e66166160518277a
[ "PSF-2.0" ]
null
null
null
ex14plus.py
Allwillcome/LearnPythontheHardWay
e974cd5dec37b9819fb324f4e66166160518277a
[ "PSF-2.0" ]
null
null
null
ex14plus.py
Allwillcome/LearnPythontheHardWay
e974cd5dec37b9819fb324f4e66166160518277a
[ "PSF-2.0" ]
null
null
null
from sys import argv # import moudle script, user_name = argv prompt = '>' # define prompt print "Hi %s, I am the %s script." %(user_name, script) #import user_name print "I'd like to ask you a few questions." print "Do you like me %s?" % user_name likes = raw_input(prompt)
28.4
74
0.68662
49
284
3.877551
0.591837
0.168421
0.147368
0
0
0
0
0
0
0
0
0
0.204225
284
9
75
31.555556
0.840708
0.151408
0
0
0
0
0.355263
0
0
0
0
0
0
0
null
null
0
0.142857
null
null
0.428571
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
3
43f00c97acf7c2d65ccdd1e74ab76a1a2caa016d
16
py
Python
constants.py
tomwhross/budget
c6382d1e03d2264df6306145563fc390c8def30f
[ "MIT" ]
null
null
null
constants.py
tomwhross/budget
c6382d1e03d2264df6306145563fc390c8def30f
[ "MIT" ]
2
2020-11-10T00:50:30.000Z
2020-11-10T14:35:52.000Z
constants.py
tomwhross/budget
c6382d1e03d2264df6306145563fc390c8def30f
[ "MIT" ]
null
null
null
DB = "budget.db"
16
16
0.625
3
16
3.333333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.125
16
1
16
16
0.714286
0
0
0
0
0
0.529412
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
43f60a6723df437e84bd0266edfd5a7f5557c4be
369
py
Python
dynamicserialize/dstypes/com/raytheon/uf/common/auth/resp/UserNotAuthorized.py
srcarter3/python-awips
d981062662968cf3fb105e8e23d955950ae2497e
[ "BSD-3-Clause" ]
33
2016-03-17T01:21:18.000Z
2022-02-08T10:41:06.000Z
dynamicserialize/dstypes/com/raytheon/uf/common/auth/resp/UserNotAuthorized.py
srcarter3/python-awips
d981062662968cf3fb105e8e23d955950ae2497e
[ "BSD-3-Clause" ]
15
2016-04-19T16:34:08.000Z
2020-09-09T19:57:54.000Z
dynamicserialize/dstypes/com/raytheon/uf/common/auth/resp/UserNotAuthorized.py
Unidata/python-awips
8459aa756816e5a45d2e5bea534d23d5b1dd1690
[ "BSD-3-Clause" ]
20
2016-03-12T01:46:58.000Z
2022-02-08T06:53:22.000Z
from dynamicserialize.dstypes.com.raytheon.uf.common.auth.resp import AbstractFailedResponse class UserNotAuthorized(AbstractFailedResponse): def __init__(self): super(UserNotAuthorized, self).__init__() self.message = None def getMessage(self): return self.message def setMessage(self, message): self.message = message
24.6
92
0.720867
37
369
6.972973
0.594595
0.170543
0
0
0
0
0
0
0
0
0
0
0.195122
369
14
93
26.357143
0.868687
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.111111
0.111111
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
43fda8679ba7e215e4c59c298f4fddbf8481bf91
6,075
py
Python
fillinblankgame.py
jaewrek/Fill-In-The-Blanks
ccd06dca48d9444459fe233b316dcdfadc2d934a
[ "Unlicense" ]
null
null
null
fillinblankgame.py
jaewrek/Fill-In-The-Blanks
ccd06dca48d9444459fe233b316dcdfadc2d934a
[ "Unlicense" ]
null
null
null
fillinblankgame.py
jaewrek/Fill-In-The-Blanks
ccd06dca48d9444459fe233b316dcdfadc2d934a
[ "Unlicense" ]
null
null
null
# IPND Stage 2 Final Project # Jerrik Neri # Intro to Programming ND # Udacity # Strings for different quiz levels easy = """Heroes of the Storm is a game made by __1__ Entertainment. __1__ Entertainment is owned by their parent company __2__. Heroes of the Storm, or HotS for short, is a __3__ type game, like DOTA2 and League of Legends. __3__s actually started in WC3 as user made map mods, that eventually gained popularity and became their own game. __1__ Entertainment makes various other games like the Starcraft series, the (for now) Diablo trilogy, and their most well-known game __4__, the most successful MMORPG of all time. """ medium = """World of Warcraft, or WoW for short, is Blizzard Entertainment's most popular and successful game. The two main factions that are constantly at war are the __1__, consisting of the Humans, Night Elves, Dranei, Gnomes, Worgen, and Dwarves, and the __2__, made up of the war-driven Orcs, displaced Trolls, nature-seeking Tauren, magic-enriched Blood Elves, and money-hungry Goblins. There is also a newly added netural race known as the __3__. Fun fact, the __3__ were actually subtetly joked at in WC3 in an April Fool's video and gained enough popularity to become reality! This game released in 2004 and at it's peak had over 12 million players. The game itself takes place in the world of __4__ a few years after thelore of WarCraft 3 The Frozen Throne. Throughout the years, Blizzard Entertainment has added several expansions, including more levels, zones, and even other planets!""" hard = """Blizzard Entertainment has not released a new IP for almost over a decade. They have continued on with their Starcraft, Diablo, and Warcraft series. They have just recently stepped foot into the FPS scene with their latest and extremely successful game, __1__. __1__ is set in a futuristic world where Humans and robots known as Omnics, were once at war. A team of heroes named __1__ was created to help win the war against the Omnics, and eventually find peace for the world. One of the most well known heroes from this game is __2__, with her ability to bend time at her will, flashing forward, slowing it down, or recalling back in time altogether. This game was released in 2016 and in just 2 weeks, gained over 10 million players and generated over 280 million dollars of revenue. It quickly knocked out League of Legends as the most played game in __3__, a country well known for dominating the competitive electronic gaming market. __1__ in some ways is the redemption game for Blizzard Entertainment. It is not well-known that for almost a decade they were working on another IP called __4__ that never came to fruition. In fact, __2__'s abilities are taken from one of the characters meant to be in __4__. In the height of success from WoW, they believed they could create another very successful MOBA, the never released __4__. It is both fortunate and unfortunate that they were able to fail and yet persever through and create another wildly successful game like __1__!""" answer_key = ["__1__", "__2__", "__3__", "__4__"] easy_answers = ["Blizzard", "Activision", "MOBA", "World of Warcraft"] medium_answers = ["Alliance", "Horde", "Pandaren", "Azeroth" ] hard_answers = ["Overwatch", "Tracer", "South Korea", "Titan"] """def correct_answer takes in which string difficulty to use as string difficulty, the list of answers, and what index quiz currently is in loops through every word changing blanks to correct answer and returning string """ def correct_answer(stringdifficulty, answers_list, index): splitquiz = stringdifficulty.split() replaced = [] # for every word in splitquiz check if answer key index, ex. __1__ is in that word # if it is equal, replace with answer of corresponding index for word in splitquiz: if answer_key[index] in word: word = word.replace(answer_key[index], answers_list[index]) replaced.append(word) else: replaced.append(word) replaced = " ".join(replaced) return replaced def show_intro_message(): print "\nSo you think you're a " + game_difficulty +"?!?! EH?!\n" print "You get 5 lives ADVENTURER, I hope you know your games!\n" # Runs the game taking in the string and answer set as parameters # Prints out to user to interact with them # Answer Key index to ensure the blanks and answer set are coordinated def play_game(quizstring, answers): lives, answer_key_index = 5, 0 show_intro_message() while lives > 0: print quizstring + "\n" guess = raw_input("ADVENTURER, what is the answer for "+answer_key[answer_key_index]+"? \n") if guess == answers[answer_key_index]: print "\nGRATZ ADVENTURER! That's the correct answer. You advance! DING!\n" lives = 5 quizstring = correct_answer(quizstring, answers, answer_key_index) answer_key_index+=1 else: lives-=1 print "\nIncorrect ADVENTURER, try again! You have "+str(lives)+" lives remaining! Tread carefully!" if lives == 0: print "\nGAME OVER ADVENTURER!!! You've run out of lives.\n" if answer_key_index == len(answer_key): print quizstring + "\n\nCONGRATULATONS ADVENTURER. GG YOU'VE WON!\n" break print "\nHELLO, welcome to my game about GAMES!\n" game_difficulty = "unselected" #Loop through until difficulty level typed appropriately while game_difficulty == "unselected": game_difficulty = raw_input("What kind of adventurer are you?! Please enter below: (NOVICE, INTERMEDIATE, VETERAN) \n").lower() if game_difficulty == "novice": play_game(easy, easy_answers) break if game_difficulty == "intermediate": play_game(medium, medium_answers) break if game_difficulty == "veteran": play_game(hard, hard_answers) break else: print "\nAdventurer! Please provide correct difficulty level!\n" game_difficulty = "unselected"
55.733945
162
0.727572
907
6,075
4.699008
0.401323
0.027452
0.032848
0.011262
0.013139
0
0
0
0
0
0
0.01184
0.207572
6,075
108
163
56.25
0.873494
0.07786
0
0.146667
0
0.24
0.677293
0
0
0
0
0
0
0
null
null
0
0
null
null
0.12
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
3
a101f1fa346a8ed0cfbbf1810589145730e11a83
120
py
Python
Python Fundamentals/Functions/Lab/Task07.py
IvanTodorovBG/SoftUni
7b667f6905d9f695ab1484efbb02b6715f6d569e
[ "MIT" ]
1
2022-03-16T10:23:04.000Z
2022-03-16T10:23:04.000Z
Python Fundamentals/Functions/Lab/Task07.py
IvanTodorovBG/SoftUni
7b667f6905d9f695ab1484efbb02b6715f6d569e
[ "MIT" ]
null
null
null
Python Fundamentals/Functions/Lab/Task07.py
IvanTodorovBG/SoftUni
7b667f6905d9f695ab1484efbb02b6715f6d569e
[ "MIT" ]
null
null
null
def rounding(numbers): num = [round(float(x)) for x in numbers] return num print(rounding(input().split(" ")))
20
44
0.641667
17
120
4.529412
0.764706
0
0
0
0
0
0
0
0
0
0
0
0.183333
120
6
45
20
0.785714
0
0
0
0
0
0.008264
0
0
0
0
0
0
1
0.25
false
0
0
0
0.5
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
0
0
0
0
0
3
a10f47d5cede993d17b9822d0ccfb27a8574f423
61
py
Python
sykepic/__init__.py
veot/syke-pic
c2bbf5f87b64348122fb7014ab4e19294ee90009
[ "MIT" ]
null
null
null
sykepic/__init__.py
veot/syke-pic
c2bbf5f87b64348122fb7014ab4e19294ee90009
[ "MIT" ]
null
null
null
sykepic/__init__.py
veot/syke-pic
c2bbf5f87b64348122fb7014ab4e19294ee90009
[ "MIT" ]
null
null
null
from pathlib import Path APP_DIR = Path.home() / ".sykepic"
15.25
34
0.704918
9
61
4.666667
0.888889
0
0
0
0
0
0
0
0
0
0
0
0.163934
61
3
35
20.333333
0.823529
0
0
0
0
0
0.131148
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
a114b10892cb4660be2dd372938e1b6346ae6a14
302
py
Python
guanabara/Exercicios/mundo 1 _ aulas 01 a 12/006.py
pbittencourt/datasciencestudies
85f0b2a4366fe7c6daa5628ed4bd2994355963c0
[ "MIT" ]
null
null
null
guanabara/Exercicios/mundo 1 _ aulas 01 a 12/006.py
pbittencourt/datasciencestudies
85f0b2a4366fe7c6daa5628ed4bd2994355963c0
[ "MIT" ]
null
null
null
guanabara/Exercicios/mundo 1 _ aulas 01 a 12/006.py
pbittencourt/datasciencestudies
85f0b2a4366fe7c6daa5628ed4bd2994355963c0
[ "MIT" ]
null
null
null
# DOBRO, TRIPLO E RAIZ QUADRADA """Lê um número e exibe seu dobro, seu triplo e sua raiz quadrada""" n = float(input('Digite um número: _ ')) print('O dobro de {} é {:.2f}'.format(n, n * 2)) print('O triplo de {} é {:.2f}'.format(n, n * 3)) print('A raiz quadrada de {} é {:.2f}'.format(n, n ** 0.5))
37.75
68
0.60596
56
302
3.25
0.464286
0.197802
0.082418
0.181319
0.214286
0.214286
0
0
0
0
0
0.02834
0.182119
302
7
69
43.142857
0.708502
0.307947
0
0
0
0
0.46798
0
0
0
0
0
0
1
0
false
0
0
0
0
0.75
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
3
a145f86b68f18596fb9ef4335d0248cddab180eb
402
py
Python
bot/entry.py
shauncameron/ChatBot
0b3168204788e3e44369c0a96f8e0321f74790ad
[ "Unlicense" ]
null
null
null
bot/entry.py
shauncameron/ChatBot
0b3168204788e3e44369c0a96f8e0321f74790ad
[ "Unlicense" ]
null
null
null
bot/entry.py
shauncameron/ChatBot
0b3168204788e3e44369c0a96f8e0321f74790ad
[ "Unlicense" ]
null
null
null
import datetime class Entry: def __repr__(self): return f'Entry @ {self.created}: {self.message}' def __init__(self, message): self.__message__ = message self.__created__ = datetime.datetime.now() self.read = False @property def message(self): return self.__message__ @property def created(self): return self.__created__
16.75
56
0.621891
43
402
5.255814
0.372093
0.19469
0.123894
0
0
0
0
0
0
0
0
0
0.283582
402
24
57
16.75
0.784722
0
0
0.142857
0
0
0.094293
0
0
0
0
0
0
1
0.285714
false
0
0.071429
0.214286
0.642857
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
a151a2b3a001b7432600b86d8fb1602274c6796a
124
py
Python
codeforces/a2oj/evenOdd.py
atpk/CP
0eee3af02bb0466c85aeb8dd86cf3620567a354c
[ "MIT" ]
null
null
null
codeforces/a2oj/evenOdd.py
atpk/CP
0eee3af02bb0466c85aeb8dd86cf3620567a354c
[ "MIT" ]
null
null
null
codeforces/a2oj/evenOdd.py
atpk/CP
0eee3af02bb0466c85aeb8dd86cf3620567a354c
[ "MIT" ]
null
null
null
s=input() s=s.split(" ") n=int(s[0]) k=int(s[1]) m=n//2 if n%2==1: m+=1 if k<=m: print(2*k-1) else: k=k-m print(2*k)
10.333333
14
0.491935
36
124
1.694444
0.361111
0.131148
0.229508
0.262295
0.295082
0
0
0
0
0
0
0.088235
0.177419
124
12
15
10.333333
0.509804
0
0
0
0
0
0.008
0
0
0
0
0
0
1
0
false
0
0
0
0
0.166667
0
0
1
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
a1669e10646a8341826e9f3515292f93a953b835
566
py
Python
python/0013. romanToInt.py
whtahy/leetcode
a2955123d203b155455ceefe38514fd0077d6db9
[ "CC0-1.0" ]
1
2017-12-09T05:37:51.000Z
2017-12-09T05:37:51.000Z
python/0013. romanToInt.py
whtahy/leetcode
a2955123d203b155455ceefe38514fd0077d6db9
[ "CC0-1.0" ]
null
null
null
python/0013. romanToInt.py
whtahy/leetcode
a2955123d203b155455ceefe38514fd0077d6db9
[ "CC0-1.0" ]
null
null
null
class Solution: d = { 'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000, 'IV': 4, 'IX': 9, 'XL': 40, 'XC': 90, 'CD': 400, 'CM': 900 } def romanToInt(self, s): n,i = 0,0 while i < len(s): if i + 1 < len(s) and s[i: i + 2] in Solution.d: n += Solution.d[s[i: i + 2]] i += 2 else: n += Solution.d.get(s[i], 0) i += 1 return n
20.214286
60
0.289753
75
566
2.186667
0.573333
0.219512
0.036585
0.04878
0
0
0
0
0
0
0
0.136882
0.535336
566
27
61
20.962963
0.486692
0
0
0
0
0
0.033569
0
0
0
0
0
0
1
0.038462
false
0
0
0
0.153846
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
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
3
a18dda3f1d90d769fc71afd09617c5546df88079
3,684
py
Python
misc/spathy_run_calibration.py
LukeEcomod/SpaFHy_v1_Pallas
bc8937a6aa72683a765506fc8f967916f81e0f12
[ "MIT" ]
3
2019-04-26T02:43:06.000Z
2020-10-10T21:49:53.000Z
misc/spathy_run_calibration.py
LukeEcomod/SpaFHy_v1_Pallas
bc8937a6aa72683a765506fc8f967916f81e0f12
[ "MIT" ]
null
null
null
misc/spathy_run_calibration.py
LukeEcomod/SpaFHy_v1_Pallas
bc8937a6aa72683a765506fc8f967916f81e0f12
[ "MIT" ]
6
2019-06-19T12:12:29.000Z
2022-01-14T22:05:03.000Z
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Wed Mar 22 13:48:49 2017 @author: MG """ import os import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from spathy_calibration import sve_calibrations # import matplotlib.lines as mlines # import matplotlib.gridspec as gridspec # from src import analysis as at # from scipy.stats import lognorm # from datetime import datetime, timedelta # from iotools import read_setup, create_catchment, read_SVE_runoff,read_FMI_weather,read_AsciiGrid, read_climate_prj # spathy_path = os.path.join(os.path.expanduser('~'),'projects','spathy') #path to spathy folder eps = np.finfo(float).eps spathy_path = os.path.join('c:', 'c:\datat\spathydata') results_path = os.path.join(spathy_path, 'Results', 'Cal') setupfile = os.path.join(r'c:\repositories\spathy\ini', 'spathy_default.ini') Nreps = 50 chm=[['1', '2013-01-01', '2015-12-31', '2013-12-31'], # lompolojanganoja 514 ha ['2', '2006-01-01', '2009-12-31', '2006-12-31'], # liuhapuro 170 ha ['3', '2008-01-01', '2015-12-31', '2008-12-31'], # porkkavaara 72 ha ['10', '2011-01-01', '2013-12-31', '2011-12-31'], # kelopuro 74 ha. 2014 gappy, 2015 runoff is low ['11', '2014-01-01', '2015-12-31', '2014-12-31'], # hauklammenoja 137 ha ['13', '2014-01-01', '2015-12-31', '2014-12-31'], # rudbacken 436 ha ['14', '2011-01-01', '2015-12-31', '2011-12-31'], # paunulanpuro 154 ha ['16', '2011-01-01', '2015-12-31', '2011-12-31'], # huhtisuonoja 500 ha. very flat, large fraction is drained peatlands ['17', '2006-01-01', '2009-12-31', '2006-12-31'], # kesselinpuro 2100 ha # ['18','2011-01-01', '2015-12-31', '2011-12-31'], # korpijoki, area 12200 ha so not suitable ['19', '2011-01-01', '2015-12-31', '2011-12-31'], # pahkaoja 2344 ha ['20', '2011-01-01', '2015-12-31', '2011-12-31'], # vaarajoki 1900 ha ['21', '2011-01-01', '2015-12-31', '2011-12-31'], # myllypuro 1053 ha ['22', '2011-01-01', '2015-12-31', '2011-12-31'], # vaha-askanjoki 1600 ha # [ '23','2011-01-01', '2015-12-31', '2011-12-31'], # ylijoki 5600 ha, very large and slow ['24', '2011-01-01', '2015-12-31', '2011-12-31'], # kotioja 1800 ha ['25', '2011-01-01', '2015-12-31', '2011-12-31'], # kohisevanpuro 1070 ha ['26', '2011-01-01', '2015-12-31', '2011-12-31'], # iittovuoma 1160 ha ['27', '2011-01-01', '2015-12-31', '2011-12-31'], # laanioja 1362 ha ['28', '2013-01-01', '2015-12-31', '2013-12-31'], # kroopinsuo 179 ha ['29', '2012-01-01', '2015-12-31', '2012-12-31'], # surnui 71 ha, poor data quality ['30', '2011-01-01', '2015-12-31', '2011-12-31'], # pakopirtti 795 ha, uncertain catchment boundaries ['31', '2011-01-01', '2015-12-31', '2011-12-31'], # ojakorpi 33 ha ['32', '2011-01-01', '2015-12-31', '2011-12-31'], # rantainrahka 38 ha ['33', '2011-01-01', '2012-12-31', '2011-12-31'], # kivipuro 54 ha ] #subset = [0,1,2,3,4,5,6,7,8,11,13,14,15,16,17,20,21,22]# subset = [9, 10, 12, 18, 19] # these were missing! # marker = ['o','.',',','v','>','*','h','s','D','p','o','.',',','v','>','*','h','s','D','p'] # ids = np.empty(len(subset)) # subset = [1]# , 2, 3, 4, 6] #subset = [0, 1, 2, 3, 4, 5, 6, 7, 17, 18, 20, 21, 22] #subset = range(0, len(chm)) for k in subset: print chm[k] cid = chm[k][0] start = chm[k][1] end = chm[k][2] spinup_end = chm[k][3] # run full calibration spot, res = sve_calibrations(setupfile, cid, start, end, spinup_end, reps=Nreps) # # run only topmodel calibration # _, _ = sve_topmodel_calibration(fn, cid, start, end, spinup_end, reps=Nreps)
46.05
125
0.604235
617
3,684
3.568882
0.358185
0.090827
0.076294
0.095368
0.313352
0.273388
0.267938
0.241599
0.241599
0
0
0.266667
0.169381
3,684
79
126
46.632911
0.452941
0.435668
0
0
0
0
0.409736
0.013185
0
0
0
0
0
0
null
null
0
0.139535
null
null
0.023256
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
3
a1af0a5ad52f745ee4051a899c71c2dfdbddf09b
153
py
Python
pcdet/models/backbones_3d/__init__.py
TillBeemelmanns/OpenPCDet
b7553c879d0ba36477931efe07a55adbc39823b9
[ "Apache-2.0" ]
184
2021-03-09T12:19:49.000Z
2022-03-31T09:19:05.000Z
pcdet/models/backbones_3d/__init__.py
TillBeemelmanns/OpenPCDet
b7553c879d0ba36477931efe07a55adbc39823b9
[ "Apache-2.0" ]
36
2021-03-23T08:42:38.000Z
2022-03-31T09:14:41.000Z
pcdet/models/backbones_3d/__init__.py
TillBeemelmanns/OpenPCDet
b7553c879d0ba36477931efe07a55adbc39823b9
[ "Apache-2.0" ]
22
2021-03-10T09:32:27.000Z
2022-03-28T05:01:45.000Z
from .spconv_backbone import VoxelBackBone8x from .spconv_unet import UNetV2 __all__ = { 'VoxelBackBone8x': VoxelBackBone8x, 'UNetV2': UNetV2 }
19.125
44
0.75817
15
153
7.333333
0.533333
0.181818
0
0
0
0
0
0
0
0
0
0.046875
0.163399
153
7
45
21.857143
0.8125
0
0
0
0
0
0.137255
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
a1b70102540f2ab980982842d6c947c41c36a7ec
5,059
py
Python
tests/test_csv.py
philippeitis/jc
d96b3a65a98bc135d21d4feafc0a43317b5a11fa
[ "MIT" ]
null
null
null
tests/test_csv.py
philippeitis/jc
d96b3a65a98bc135d21d4feafc0a43317b5a11fa
[ "MIT" ]
null
null
null
tests/test_csv.py
philippeitis/jc
d96b3a65a98bc135d21d4feafc0a43317b5a11fa
[ "MIT" ]
null
null
null
import os import json import unittest import jc.parsers.csv THIS_DIR = os.path.dirname(os.path.abspath(__file__)) class MyTests(unittest.TestCase): def setUp(self): # input with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-biostats.csv'), 'r') as f: self.generic_csv_biostats = f.read() with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-cities.csv'), 'r') as f: self.generic_csv_cities = f.read() with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-deniro.csv'), 'r') as f: self.generic_csv_deniro = f.read() with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-example.csv'), 'r') as f: self.generic_csv_example = f.read() with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-flyrna.tsv'), 'r') as f: self.generic_csv_flyrna = f.read() with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-flyrna2.tsv'), 'r') as f: self.generic_csv_flyrna2 = f.read() with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-homes-pipe.csv'), 'r') as f: self.generic_csv_homes_pipe = f.read() with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-homes.csv'), 'r') as f: self.generic_csv_homes = f.read() with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-insurance.csv'), 'r') as f: self.generic_csv_insurance = f.read() # output with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-biostats.json'), 'r') as f: self.generic_csv_biostats_json = json.loads(f.read()) with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-cities.json'), 'r') as f: self.generic_csv_cities_json = json.loads(f.read()) with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-deniro.json'), 'r') as f: self.generic_csv_deniro_json = json.loads(f.read()) with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-example.json'), 'r') as f: self.generic_csv_example_json = json.loads(f.read()) with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-flyrna.json'), 'r') as f: self.generic_csv_flyrna_json = json.loads(f.read()) with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-flyrna2.json'), 'r') as f: self.generic_csv_flyrna2_json = json.loads(f.read()) with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-homes-pipe.json'), 'r') as f: self.generic_csv_homes_pipe_json = json.loads(f.read()) with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-homes.json'), 'r') as f: self.generic_csv_homes_json = json.loads(f.read()) with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-insurance.json'), 'r') as f: self.generic_csv_insurance_json = json.loads(f.read()) def test_csv_biostats(self): """ Test 'biostats.csv' file """ self.assertEqual(jc.parsers.csv.parse(self.generic_csv_biostats, quiet=True), self.generic_csv_biostats_json) def test_csv_cities(self): """ Test 'cities.csv' file """ self.assertEqual(jc.parsers.csv.parse(self.generic_csv_cities, quiet=True), self.generic_csv_cities_json) def test_csv_deniro(self): """ Test 'deniro.csv' file """ self.assertEqual(jc.parsers.csv.parse(self.generic_csv_deniro, quiet=True), self.generic_csv_deniro_json) def test_csv_example(self): """ Test 'example.csv' file """ self.assertEqual(jc.parsers.csv.parse(self.generic_csv_example, quiet=True), self.generic_csv_example_json) def test_csv_flyrna(self): """ Test 'flyrna.tsv' file """ self.assertEqual(jc.parsers.csv.parse(self.generic_csv_flyrna, quiet=True), self.generic_csv_flyrna_json) def test_csv_flyrna2(self): """ Test 'flyrna2.tsv' file """ self.assertEqual(jc.parsers.csv.parse(self.generic_csv_flyrna2, quiet=True), self.generic_csv_flyrna2_json) def test_csv_homes_pipe(self): """ Test 'homes-pipe.csv' file """ self.assertEqual(jc.parsers.csv.parse(self.generic_csv_homes_pipe, quiet=True), self.generic_csv_homes_pipe_json) def test_csv_homes(self): """ Test 'homes.csv' file """ self.assertEqual(jc.parsers.csv.parse(self.generic_csv_homes, quiet=True), self.generic_csv_homes_json) def test_csv_insurance(self): """ Test 'insurance.csv' file """ self.assertEqual(jc.parsers.csv.parse(self.generic_csv_insurance, quiet=True), self.generic_csv_insurance_json) if __name__ == '__main__': unittest.main()
40.472
121
0.650721
734
5,059
4.288828
0.069482
0.171537
0.160102
0.080051
0.850064
0.756671
0.736341
0.609593
0.57338
0.57338
0
0.001988
0.204388
5,059
124
122
40.798387
0.780124
0.045464
0
0
0
0
0.156061
0.150433
0
0
0
0
0.142857
1
0.15873
false
0
0.063492
0
0.238095
0
0
0
0
null
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
a1ba4b682f35bf2e560b067d04b8487c386bd186
417
py
Python
okl4_kernel/okl4_2.1.1-patch.9/tools/magpie/magpie/targets/nicta/generic_biguuid_n2_noabi_compat_target.py
CyberQueenMara/baseband-research
e1605537e10c37e161fff1a3416b908c9894f204
[ "MIT" ]
77
2018-12-31T22:12:09.000Z
2021-12-31T22:56:13.000Z
okl4_kernel/okl4_2.1.1-patch.9/tools/magpie/magpie/targets/nicta/generic_biguuid_n2_noabi_compat_target.py
CyberQueenMara/baseband-research
e1605537e10c37e161fff1a3416b908c9894f204
[ "MIT" ]
null
null
null
okl4_kernel/okl4_2.1.1-patch.9/tools/magpie/magpie/targets/nicta/generic_biguuid_n2_noabi_compat_target.py
CyberQueenMara/baseband-research
e1605537e10c37e161fff1a3416b908c9894f204
[ "MIT" ]
24
2019-01-20T15:51:52.000Z
2021-12-25T18:29:13.000Z
from magpie.targets.nicta import generic_n2_target as nictageneric_n2 from magpie.targets.idl4 import generic_biguuid_l4v4_target as idl4_biguuid Generator = nictageneric_n2.Generator class Templates(nictageneric_n2.Templates, idl4_biguuid.Templates): client_function_body = 'v4nicta_generic/client_function_body_noabi.template.c' service_function = 'v4nicta_generic/service_function_backcompat_noabi.template.h'
46.333333
82
0.8753
56
417
6.142857
0.464286
0.122093
0.098837
0
0
0
0
0
0
0
0
0.028278
0.067146
417
8
83
52.125
0.856041
0
0
0
0
0
0.270983
0.270983
0
0
0
0
0
1
0
false
0
0.333333
0
0.833333
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
3
a1d3396357adf0e73d684e9ffb2d4777cb1bffe8
43,705
py
Python
bindings/python/capstone/x86_const.py
zchee/capstone
f278de39c1e8a9fca977b8dfeed99d6d1f8b82bf
[ "BSD-3-Clause" ]
127
2017-08-29T17:32:53.000Z
2022-03-31T16:58:44.000Z
bindings/python/capstone/x86_const.py
zchee/capstone
f278de39c1e8a9fca977b8dfeed99d6d1f8b82bf
[ "BSD-3-Clause" ]
90
2017-08-31T04:44:38.000Z
2022-03-31T15:58:29.000Z
bindings/python/capstone/x86_const.py
zchee/capstone
f278de39c1e8a9fca977b8dfeed99d6d1f8b82bf
[ "BSD-3-Clause" ]
48
2017-08-29T11:34:01.000Z
2022-03-31T15:39:28.000Z
# For Capstone Engine. AUTO-GENERATED FILE, DO NOT EDIT [x86_const.py] X86_REG_INVALID = 0 X86_REG_AH = 1 X86_REG_AL = 2 X86_REG_AX = 3 X86_REG_BH = 4 X86_REG_BL = 5 X86_REG_BP = 6 X86_REG_BPL = 7 X86_REG_BX = 8 X86_REG_CH = 9 X86_REG_CL = 10 X86_REG_CS = 11 X86_REG_CX = 12 X86_REG_DH = 13 X86_REG_DI = 14 X86_REG_DIL = 15 X86_REG_DL = 16 X86_REG_DS = 17 X86_REG_DX = 18 X86_REG_EAX = 19 X86_REG_EBP = 20 X86_REG_EBX = 21 X86_REG_ECX = 22 X86_REG_EDI = 23 X86_REG_EDX = 24 X86_REG_EFLAGS = 25 X86_REG_EIP = 26 X86_REG_EIZ = 27 X86_REG_ES = 28 X86_REG_ESI = 29 X86_REG_ESP = 30 X86_REG_FPSW = 31 X86_REG_FS = 32 X86_REG_GS = 33 X86_REG_IP = 34 X86_REG_RAX = 35 X86_REG_RBP = 36 X86_REG_RBX = 37 X86_REG_RCX = 38 X86_REG_RDI = 39 X86_REG_RDX = 40 X86_REG_RIP = 41 X86_REG_RIZ = 42 X86_REG_RSI = 43 X86_REG_RSP = 44 X86_REG_SI = 45 X86_REG_SIL = 46 X86_REG_SP = 47 X86_REG_SPL = 48 X86_REG_SS = 49 X86_REG_CR0 = 50 X86_REG_CR1 = 51 X86_REG_CR2 = 52 X86_REG_CR3 = 53 X86_REG_CR4 = 54 X86_REG_CR5 = 55 X86_REG_CR6 = 56 X86_REG_CR7 = 57 X86_REG_CR8 = 58 X86_REG_CR9 = 59 X86_REG_CR10 = 60 X86_REG_CR11 = 61 X86_REG_CR12 = 62 X86_REG_CR13 = 63 X86_REG_CR14 = 64 X86_REG_CR15 = 65 X86_REG_DR0 = 66 X86_REG_DR1 = 67 X86_REG_DR2 = 68 X86_REG_DR3 = 69 X86_REG_DR4 = 70 X86_REG_DR5 = 71 X86_REG_DR6 = 72 X86_REG_DR7 = 73 X86_REG_DR8 = 74 X86_REG_DR9 = 75 X86_REG_DR10 = 76 X86_REG_DR11 = 77 X86_REG_DR12 = 78 X86_REG_DR13 = 79 X86_REG_DR14 = 80 X86_REG_DR15 = 81 X86_REG_FP0 = 82 X86_REG_FP1 = 83 X86_REG_FP2 = 84 X86_REG_FP3 = 85 X86_REG_FP4 = 86 X86_REG_FP5 = 87 X86_REG_FP6 = 88 X86_REG_FP7 = 89 X86_REG_K0 = 90 X86_REG_K1 = 91 X86_REG_K2 = 92 X86_REG_K3 = 93 X86_REG_K4 = 94 X86_REG_K5 = 95 X86_REG_K6 = 96 X86_REG_K7 = 97 X86_REG_MM0 = 98 X86_REG_MM1 = 99 X86_REG_MM2 = 100 X86_REG_MM3 = 101 X86_REG_MM4 = 102 X86_REG_MM5 = 103 X86_REG_MM6 = 104 X86_REG_MM7 = 105 X86_REG_R8 = 106 X86_REG_R9 = 107 X86_REG_R10 = 108 X86_REG_R11 = 109 X86_REG_R12 = 110 X86_REG_R13 = 111 X86_REG_R14 = 112 X86_REG_R15 = 113 X86_REG_ST0 = 114 X86_REG_ST1 = 115 X86_REG_ST2 = 116 X86_REG_ST3 = 117 X86_REG_ST4 = 118 X86_REG_ST5 = 119 X86_REG_ST6 = 120 X86_REG_ST7 = 121 X86_REG_XMM0 = 122 X86_REG_XMM1 = 123 X86_REG_XMM2 = 124 X86_REG_XMM3 = 125 X86_REG_XMM4 = 126 X86_REG_XMM5 = 127 X86_REG_XMM6 = 128 X86_REG_XMM7 = 129 X86_REG_XMM8 = 130 X86_REG_XMM9 = 131 X86_REG_XMM10 = 132 X86_REG_XMM11 = 133 X86_REG_XMM12 = 134 X86_REG_XMM13 = 135 X86_REG_XMM14 = 136 X86_REG_XMM15 = 137 X86_REG_XMM16 = 138 X86_REG_XMM17 = 139 X86_REG_XMM18 = 140 X86_REG_XMM19 = 141 X86_REG_XMM20 = 142 X86_REG_XMM21 = 143 X86_REG_XMM22 = 144 X86_REG_XMM23 = 145 X86_REG_XMM24 = 146 X86_REG_XMM25 = 147 X86_REG_XMM26 = 148 X86_REG_XMM27 = 149 X86_REG_XMM28 = 150 X86_REG_XMM29 = 151 X86_REG_XMM30 = 152 X86_REG_XMM31 = 153 X86_REG_YMM0 = 154 X86_REG_YMM1 = 155 X86_REG_YMM2 = 156 X86_REG_YMM3 = 157 X86_REG_YMM4 = 158 X86_REG_YMM5 = 159 X86_REG_YMM6 = 160 X86_REG_YMM7 = 161 X86_REG_YMM8 = 162 X86_REG_YMM9 = 163 X86_REG_YMM10 = 164 X86_REG_YMM11 = 165 X86_REG_YMM12 = 166 X86_REG_YMM13 = 167 X86_REG_YMM14 = 168 X86_REG_YMM15 = 169 X86_REG_YMM16 = 170 X86_REG_YMM17 = 171 X86_REG_YMM18 = 172 X86_REG_YMM19 = 173 X86_REG_YMM20 = 174 X86_REG_YMM21 = 175 X86_REG_YMM22 = 176 X86_REG_YMM23 = 177 X86_REG_YMM24 = 178 X86_REG_YMM25 = 179 X86_REG_YMM26 = 180 X86_REG_YMM27 = 181 X86_REG_YMM28 = 182 X86_REG_YMM29 = 183 X86_REG_YMM30 = 184 X86_REG_YMM31 = 185 X86_REG_ZMM0 = 186 X86_REG_ZMM1 = 187 X86_REG_ZMM2 = 188 X86_REG_ZMM3 = 189 X86_REG_ZMM4 = 190 X86_REG_ZMM5 = 191 X86_REG_ZMM6 = 192 X86_REG_ZMM7 = 193 X86_REG_ZMM8 = 194 X86_REG_ZMM9 = 195 X86_REG_ZMM10 = 196 X86_REG_ZMM11 = 197 X86_REG_ZMM12 = 198 X86_REG_ZMM13 = 199 X86_REG_ZMM14 = 200 X86_REG_ZMM15 = 201 X86_REG_ZMM16 = 202 X86_REG_ZMM17 = 203 X86_REG_ZMM18 = 204 X86_REG_ZMM19 = 205 X86_REG_ZMM20 = 206 X86_REG_ZMM21 = 207 X86_REG_ZMM22 = 208 X86_REG_ZMM23 = 209 X86_REG_ZMM24 = 210 X86_REG_ZMM25 = 211 X86_REG_ZMM26 = 212 X86_REG_ZMM27 = 213 X86_REG_ZMM28 = 214 X86_REG_ZMM29 = 215 X86_REG_ZMM30 = 216 X86_REG_ZMM31 = 217 X86_REG_R8B = 218 X86_REG_R9B = 219 X86_REG_R10B = 220 X86_REG_R11B = 221 X86_REG_R12B = 222 X86_REG_R13B = 223 X86_REG_R14B = 224 X86_REG_R15B = 225 X86_REG_R8D = 226 X86_REG_R9D = 227 X86_REG_R10D = 228 X86_REG_R11D = 229 X86_REG_R12D = 230 X86_REG_R13D = 231 X86_REG_R14D = 232 X86_REG_R15D = 233 X86_REG_R8W = 234 X86_REG_R9W = 235 X86_REG_R10W = 236 X86_REG_R11W = 237 X86_REG_R12W = 238 X86_REG_R13W = 239 X86_REG_R14W = 240 X86_REG_R15W = 241 X86_REG_BND0 = 242 X86_REG_BND1 = 243 X86_REG_BND2 = 244 X86_REG_BND3 = 245 X86_REG_ENDING = 246 X86_EFLAGS_MODIFY_AF = 1<<0 X86_EFLAGS_MODIFY_CF = 1<<1 X86_EFLAGS_MODIFY_SF = 1<<2 X86_EFLAGS_MODIFY_ZF = 1<<3 X86_EFLAGS_MODIFY_PF = 1<<4 X86_EFLAGS_MODIFY_OF = 1<<5 X86_EFLAGS_MODIFY_TF = 1<<6 X86_EFLAGS_MODIFY_IF = 1<<7 X86_EFLAGS_MODIFY_DF = 1<<8 X86_EFLAGS_MODIFY_NT = 1<<9 X86_EFLAGS_MODIFY_RF = 1<<10 X86_EFLAGS_PRIOR_OF = 1<<11 X86_EFLAGS_PRIOR_SF = 1<<12 X86_EFLAGS_PRIOR_ZF = 1<<13 X86_EFLAGS_PRIOR_AF = 1<<14 X86_EFLAGS_PRIOR_PF = 1<<15 X86_EFLAGS_PRIOR_CF = 1<<16 X86_EFLAGS_PRIOR_TF = 1<<17 X86_EFLAGS_PRIOR_IF = 1<<18 X86_EFLAGS_PRIOR_DF = 1<<19 X86_EFLAGS_PRIOR_NT = 1<<20 X86_EFLAGS_RESET_OF = 1<<21 X86_EFLAGS_RESET_CF = 1<<22 X86_EFLAGS_RESET_DF = 1<<23 X86_EFLAGS_RESET_IF = 1<<24 X86_EFLAGS_RESET_SF = 1<<25 X86_EFLAGS_RESET_AF = 1<<26 X86_EFLAGS_RESET_TF = 1<<27 X86_EFLAGS_RESET_NT = 1<<28 X86_EFLAGS_RESET_PF = 1<<29 X86_EFLAGS_SET_CF = 1<<30 X86_EFLAGS_SET_DF = 1<<31 X86_EFLAGS_SET_IF = 1<<32 X86_EFLAGS_TEST_OF = 1<<33 X86_EFLAGS_TEST_SF = 1<<34 X86_EFLAGS_TEST_ZF = 1<<35 X86_EFLAGS_TEST_PF = 1<<36 X86_EFLAGS_TEST_CF = 1<<37 X86_EFLAGS_TEST_NT = 1<<38 X86_EFLAGS_TEST_DF = 1<<39 X86_EFLAGS_UNDEFINED_OF = 1<<40 X86_EFLAGS_UNDEFINED_SF = 1<<41 X86_EFLAGS_UNDEFINED_ZF = 1<<42 X86_EFLAGS_UNDEFINED_PF = 1<<43 X86_EFLAGS_UNDEFINED_AF = 1<<44 X86_EFLAGS_UNDEFINED_CF = 1<<45 X86_EFLAGS_RESET_RF = 1<<46 X86_EFLAGS_TEST_RF = 1<<47 X86_EFLAGS_TEST_IF = 1<<48 X86_EFLAGS_TEST_TF = 1<<49 X86_EFLAGS_TEST_AF = 1<<50 X86_EFLAGS_RESET_ZF = 1<<51 X86_EFLAGS_SET_OF = 1<<52 X86_EFLAGS_SET_SF = 1<<53 X86_EFLAGS_SET_ZF = 1<<54 X86_EFLAGS_SET_AF = 1<<55 X86_EFLAGS_SET_PF = 1<<56 X86_EFLAGS_RESET_0F = 1<<57 X86_EFLAGS_RESET_AC = 1<<58 X86_FPU_FLAGS_MODIFY_C0 = 1<<0 X86_FPU_FLAGS_MODIFY_C1 = 1<<1 X86_FPU_FLAGS_MODIFY_C2 = 1<<2 X86_FPU_FLAGS_MODIFY_C3 = 1<<3 X86_FPU_FLAGS_RESET_C0 = 1<<4 X86_FPU_FLAGS_RESET_C1 = 1<<5 X86_FPU_FLAGS_RESET_C2 = 1<<6 X86_FPU_FLAGS_RESET_C3 = 1<<7 X86_FPU_FLAGS_SET_C0 = 1<<8 X86_FPU_FLAGS_SET_C1 = 1<<9 X86_FPU_FLAGS_SET_C2 = 1<<10 X86_FPU_FLAGS_SET_C3 = 1<<11 X86_FPU_FLAGS_UNDEFINED_C0 = 1<<12 X86_FPU_FLAGS_UNDEFINED_C1 = 1<<13 X86_FPU_FLAGS_UNDEFINED_C2 = 1<<14 X86_FPU_FLAGS_UNDEFINED_C3 = 1<<15 X86_FPU_FLAGS_TEST_C0 = 1<<16 X86_FPU_FLAGS_TEST_C1 = 1<<17 X86_FPU_FLAGS_TEST_C2 = 1<<18 X86_FPU_FLAGS_TEST_C3 = 1<<19 X86_OP_INVALID = 0 X86_OP_REG = 1 X86_OP_IMM = 2 X86_OP_MEM = 3 X86_XOP_CC_INVALID = 0 X86_XOP_CC_LT = 1 X86_XOP_CC_LE = 2 X86_XOP_CC_GT = 3 X86_XOP_CC_GE = 4 X86_XOP_CC_EQ = 5 X86_XOP_CC_NEQ = 6 X86_XOP_CC_FALSE = 7 X86_XOP_CC_TRUE = 8 X86_AVX_BCAST_INVALID = 0 X86_AVX_BCAST_2 = 1 X86_AVX_BCAST_4 = 2 X86_AVX_BCAST_8 = 3 X86_AVX_BCAST_16 = 4 X86_SSE_CC_INVALID = 0 X86_SSE_CC_EQ = 1 X86_SSE_CC_LT = 2 X86_SSE_CC_LE = 3 X86_SSE_CC_UNORD = 4 X86_SSE_CC_NEQ = 5 X86_SSE_CC_NLT = 6 X86_SSE_CC_NLE = 7 X86_SSE_CC_ORD = 8 X86_AVX_CC_INVALID = 0 X86_AVX_CC_EQ = 1 X86_AVX_CC_LT = 2 X86_AVX_CC_LE = 3 X86_AVX_CC_UNORD = 4 X86_AVX_CC_NEQ = 5 X86_AVX_CC_NLT = 6 X86_AVX_CC_NLE = 7 X86_AVX_CC_ORD = 8 X86_AVX_CC_EQ_UQ = 9 X86_AVX_CC_NGE = 10 X86_AVX_CC_NGT = 11 X86_AVX_CC_FALSE = 12 X86_AVX_CC_NEQ_OQ = 13 X86_AVX_CC_GE = 14 X86_AVX_CC_GT = 15 X86_AVX_CC_TRUE = 16 X86_AVX_CC_EQ_OS = 17 X86_AVX_CC_LT_OQ = 18 X86_AVX_CC_LE_OQ = 19 X86_AVX_CC_UNORD_S = 20 X86_AVX_CC_NEQ_US = 21 X86_AVX_CC_NLT_UQ = 22 X86_AVX_CC_NLE_UQ = 23 X86_AVX_CC_ORD_S = 24 X86_AVX_CC_EQ_US = 25 X86_AVX_CC_NGE_UQ = 26 X86_AVX_CC_NGT_UQ = 27 X86_AVX_CC_FALSE_OS = 28 X86_AVX_CC_NEQ_OS = 29 X86_AVX_CC_GE_OQ = 30 X86_AVX_CC_GT_OQ = 31 X86_AVX_CC_TRUE_US = 32 X86_AVX_RM_INVALID = 0 X86_AVX_RM_RN = 1 X86_AVX_RM_RD = 2 X86_AVX_RM_RU = 3 X86_AVX_RM_RZ = 4 X86_PREFIX_LOCK = 0xf0 X86_PREFIX_REP = 0xf3 X86_PREFIX_REPE = 0xf3 X86_PREFIX_REPNE = 0xf2 X86_PREFIX_CS = 0x2e X86_PREFIX_SS = 0x36 X86_PREFIX_DS = 0x3e X86_PREFIX_ES = 0x26 X86_PREFIX_FS = 0x64 X86_PREFIX_GS = 0x65 X86_PREFIX_OPSIZE = 0x66 X86_PREFIX_ADDRSIZE = 0x67 X86_INS_INVALID = 0 X86_INS_AAA = 1 X86_INS_AAD = 2 X86_INS_AAM = 3 X86_INS_AAS = 4 X86_INS_FABS = 5 X86_INS_ADC = 6 X86_INS_ADCX = 7 X86_INS_ADD = 8 X86_INS_ADDPD = 9 X86_INS_ADDPS = 10 X86_INS_ADDSD = 11 X86_INS_ADDSS = 12 X86_INS_ADDSUBPD = 13 X86_INS_ADDSUBPS = 14 X86_INS_FADD = 15 X86_INS_FIADD = 16 X86_INS_ADOX = 17 X86_INS_AESDECLAST = 18 X86_INS_AESDEC = 19 X86_INS_AESENCLAST = 20 X86_INS_AESENC = 21 X86_INS_AESIMC = 22 X86_INS_AESKEYGENASSIST = 23 X86_INS_AND = 24 X86_INS_ANDN = 25 X86_INS_ANDNPD = 26 X86_INS_ANDNPS = 27 X86_INS_ANDPD = 28 X86_INS_ANDPS = 29 X86_INS_ARPL = 30 X86_INS_BEXTR = 31 X86_INS_BLCFILL = 32 X86_INS_BLCI = 33 X86_INS_BLCIC = 34 X86_INS_BLCMSK = 35 X86_INS_BLCS = 36 X86_INS_BLENDPD = 37 X86_INS_BLENDPS = 38 X86_INS_BLENDVPD = 39 X86_INS_BLENDVPS = 40 X86_INS_BLSFILL = 41 X86_INS_BLSI = 42 X86_INS_BLSIC = 43 X86_INS_BLSMSK = 44 X86_INS_BLSR = 45 X86_INS_BNDCL = 46 X86_INS_BNDCN = 47 X86_INS_BNDCU = 48 X86_INS_BNDLDX = 49 X86_INS_BNDMK = 50 X86_INS_BNDMOV = 51 X86_INS_BNDSTX = 52 X86_INS_BOUND = 53 X86_INS_BSF = 54 X86_INS_BSR = 55 X86_INS_BSWAP = 56 X86_INS_BT = 57 X86_INS_BTC = 58 X86_INS_BTR = 59 X86_INS_BTS = 60 X86_INS_BZHI = 61 X86_INS_CALL = 62 X86_INS_CBW = 63 X86_INS_CDQ = 64 X86_INS_CDQE = 65 X86_INS_FCHS = 66 X86_INS_CLAC = 67 X86_INS_CLC = 68 X86_INS_CLD = 69 X86_INS_CLDEMOTE = 70 X86_INS_CLFLUSH = 71 X86_INS_CLFLUSHOPT = 72 X86_INS_CLGI = 73 X86_INS_CLI = 74 X86_INS_CLRSSBSY = 75 X86_INS_CLTS = 76 X86_INS_CLWB = 77 X86_INS_CLZERO = 78 X86_INS_CMC = 79 X86_INS_CMOVA = 80 X86_INS_CMOVAE = 81 X86_INS_CMOVB = 82 X86_INS_CMOVBE = 83 X86_INS_FCMOVBE = 84 X86_INS_FCMOVB = 85 X86_INS_CMOVE = 86 X86_INS_FCMOVE = 87 X86_INS_CMOVG = 88 X86_INS_CMOVGE = 89 X86_INS_CMOVL = 90 X86_INS_CMOVLE = 91 X86_INS_FCMOVNBE = 92 X86_INS_FCMOVNB = 93 X86_INS_CMOVNE = 94 X86_INS_FCMOVNE = 95 X86_INS_CMOVNO = 96 X86_INS_CMOVNP = 97 X86_INS_FCMOVNU = 98 X86_INS_FCMOVNP = 99 X86_INS_CMOVNS = 100 X86_INS_CMOVO = 101 X86_INS_CMOVP = 102 X86_INS_FCMOVU = 103 X86_INS_CMOVS = 104 X86_INS_CMP = 105 X86_INS_CMPPD = 106 X86_INS_CMPPS = 107 X86_INS_CMPSB = 108 X86_INS_CMPSD = 109 X86_INS_CMPSQ = 110 X86_INS_CMPSS = 111 X86_INS_CMPSW = 112 X86_INS_CMPXCHG16B = 113 X86_INS_CMPXCHG = 114 X86_INS_CMPXCHG8B = 115 X86_INS_COMISD = 116 X86_INS_COMISS = 117 X86_INS_FCOMP = 118 X86_INS_FCOMPI = 119 X86_INS_FCOMI = 120 X86_INS_FCOM = 121 X86_INS_FCOS = 122 X86_INS_CPUID = 123 X86_INS_CQO = 124 X86_INS_CRC32 = 125 X86_INS_CVTDQ2PD = 126 X86_INS_CVTDQ2PS = 127 X86_INS_CVTPD2DQ = 128 X86_INS_CVTPD2PS = 129 X86_INS_CVTPS2DQ = 130 X86_INS_CVTPS2PD = 131 X86_INS_CVTSD2SI = 132 X86_INS_CVTSD2SS = 133 X86_INS_CVTSI2SD = 134 X86_INS_CVTSI2SS = 135 X86_INS_CVTSS2SD = 136 X86_INS_CVTSS2SI = 137 X86_INS_CVTTPD2DQ = 138 X86_INS_CVTTPS2DQ = 139 X86_INS_CVTTSD2SI = 140 X86_INS_CVTTSS2SI = 141 X86_INS_CWD = 142 X86_INS_CWDE = 143 X86_INS_DAA = 144 X86_INS_DAS = 145 X86_INS_DATA16 = 146 X86_INS_DEC = 147 X86_INS_DIV = 148 X86_INS_DIVPD = 149 X86_INS_DIVPS = 150 X86_INS_FDIVR = 151 X86_INS_FIDIVR = 152 X86_INS_FDIVRP = 153 X86_INS_DIVSD = 154 X86_INS_DIVSS = 155 X86_INS_FDIV = 156 X86_INS_FIDIV = 157 X86_INS_FDIVP = 158 X86_INS_DPPD = 159 X86_INS_DPPS = 160 X86_INS_ENCLS = 161 X86_INS_ENCLU = 162 X86_INS_ENCLV = 163 X86_INS_ENDBR32 = 164 X86_INS_ENDBR64 = 165 X86_INS_ENTER = 166 X86_INS_EXTRACTPS = 167 X86_INS_EXTRQ = 168 X86_INS_F2XM1 = 169 X86_INS_LCALL = 170 X86_INS_LJMP = 171 X86_INS_JMP = 172 X86_INS_FBLD = 173 X86_INS_FBSTP = 174 X86_INS_FCOMPP = 175 X86_INS_FDECSTP = 176 X86_INS_FDISI8087_NOP = 177 X86_INS_FEMMS = 178 X86_INS_FENI8087_NOP = 179 X86_INS_FFREE = 180 X86_INS_FFREEP = 181 X86_INS_FICOM = 182 X86_INS_FICOMP = 183 X86_INS_FINCSTP = 184 X86_INS_FLDCW = 185 X86_INS_FLDENV = 186 X86_INS_FLDL2E = 187 X86_INS_FLDL2T = 188 X86_INS_FLDLG2 = 189 X86_INS_FLDLN2 = 190 X86_INS_FLDPI = 191 X86_INS_FNCLEX = 192 X86_INS_FNINIT = 193 X86_INS_FNOP = 194 X86_INS_FNSTCW = 195 X86_INS_FNSTSW = 196 X86_INS_FPATAN = 197 X86_INS_FSTPNCE = 198 X86_INS_FPREM = 199 X86_INS_FPREM1 = 200 X86_INS_FPTAN = 201 X86_INS_FRNDINT = 202 X86_INS_FRSTOR = 203 X86_INS_FNSAVE = 204 X86_INS_FSCALE = 205 X86_INS_FSETPM = 206 X86_INS_FSINCOS = 207 X86_INS_FNSTENV = 208 X86_INS_FXAM = 209 X86_INS_FXRSTOR = 210 X86_INS_FXRSTOR64 = 211 X86_INS_FXSAVE = 212 X86_INS_FXSAVE64 = 213 X86_INS_FXTRACT = 214 X86_INS_FYL2X = 215 X86_INS_FYL2XP1 = 216 X86_INS_GETSEC = 217 X86_INS_GF2P8AFFINEINVQB = 218 X86_INS_GF2P8AFFINEQB = 219 X86_INS_GF2P8MULB = 220 X86_INS_HADDPD = 221 X86_INS_HADDPS = 222 X86_INS_HLT = 223 X86_INS_HSUBPD = 224 X86_INS_HSUBPS = 225 X86_INS_IDIV = 226 X86_INS_FILD = 227 X86_INS_IMUL = 228 X86_INS_IN = 229 X86_INS_INC = 230 X86_INS_INCSSPD = 231 X86_INS_INCSSPQ = 232 X86_INS_INSB = 233 X86_INS_INSERTPS = 234 X86_INS_INSERTQ = 235 X86_INS_INSD = 236 X86_INS_INSW = 237 X86_INS_INT = 238 X86_INS_INT1 = 239 X86_INS_INT3 = 240 X86_INS_INTO = 241 X86_INS_INVD = 242 X86_INS_INVEPT = 243 X86_INS_INVLPG = 244 X86_INS_INVLPGA = 245 X86_INS_INVPCID = 246 X86_INS_INVVPID = 247 X86_INS_IRET = 248 X86_INS_IRETD = 249 X86_INS_IRETQ = 250 X86_INS_FISTTP = 251 X86_INS_FIST = 252 X86_INS_FISTP = 253 X86_INS_JAE = 254 X86_INS_JA = 255 X86_INS_JBE = 256 X86_INS_JB = 257 X86_INS_JCXZ = 258 X86_INS_JECXZ = 259 X86_INS_JE = 260 X86_INS_JGE = 261 X86_INS_JG = 262 X86_INS_JLE = 263 X86_INS_JL = 264 X86_INS_JNE = 265 X86_INS_JNO = 266 X86_INS_JNP = 267 X86_INS_JNS = 268 X86_INS_JO = 269 X86_INS_JP = 270 X86_INS_JRCXZ = 271 X86_INS_JS = 272 X86_INS_KADDB = 273 X86_INS_KADDD = 274 X86_INS_KADDQ = 275 X86_INS_KADDW = 276 X86_INS_KANDB = 277 X86_INS_KANDD = 278 X86_INS_KANDNB = 279 X86_INS_KANDND = 280 X86_INS_KANDNQ = 281 X86_INS_KANDNW = 282 X86_INS_KANDQ = 283 X86_INS_KANDW = 284 X86_INS_KMOVB = 285 X86_INS_KMOVD = 286 X86_INS_KMOVQ = 287 X86_INS_KMOVW = 288 X86_INS_KNOTB = 289 X86_INS_KNOTD = 290 X86_INS_KNOTQ = 291 X86_INS_KNOTW = 292 X86_INS_KORB = 293 X86_INS_KORD = 294 X86_INS_KORQ = 295 X86_INS_KORTESTB = 296 X86_INS_KORTESTD = 297 X86_INS_KORTESTQ = 298 X86_INS_KORTESTW = 299 X86_INS_KORW = 300 X86_INS_KSHIFTLB = 301 X86_INS_KSHIFTLD = 302 X86_INS_KSHIFTLQ = 303 X86_INS_KSHIFTLW = 304 X86_INS_KSHIFTRB = 305 X86_INS_KSHIFTRD = 306 X86_INS_KSHIFTRQ = 307 X86_INS_KSHIFTRW = 308 X86_INS_KTESTB = 309 X86_INS_KTESTD = 310 X86_INS_KTESTQ = 311 X86_INS_KTESTW = 312 X86_INS_KUNPCKBW = 313 X86_INS_KUNPCKDQ = 314 X86_INS_KUNPCKWD = 315 X86_INS_KXNORB = 316 X86_INS_KXNORD = 317 X86_INS_KXNORQ = 318 X86_INS_KXNORW = 319 X86_INS_KXORB = 320 X86_INS_KXORD = 321 X86_INS_KXORQ = 322 X86_INS_KXORW = 323 X86_INS_LAHF = 324 X86_INS_LAR = 325 X86_INS_LDDQU = 326 X86_INS_LDMXCSR = 327 X86_INS_LDS = 328 X86_INS_FLDZ = 329 X86_INS_FLD1 = 330 X86_INS_FLD = 331 X86_INS_LEA = 332 X86_INS_LEAVE = 333 X86_INS_LES = 334 X86_INS_LFENCE = 335 X86_INS_LFS = 336 X86_INS_LGDT = 337 X86_INS_LGS = 338 X86_INS_LIDT = 339 X86_INS_LLDT = 340 X86_INS_LLWPCB = 341 X86_INS_LMSW = 342 X86_INS_LOCK = 343 X86_INS_LODSB = 344 X86_INS_LODSD = 345 X86_INS_LODSQ = 346 X86_INS_LODSW = 347 X86_INS_LOOP = 348 X86_INS_LOOPE = 349 X86_INS_LOOPNE = 350 X86_INS_RETF = 351 X86_INS_RETFQ = 352 X86_INS_LSL = 353 X86_INS_LSS = 354 X86_INS_LTR = 355 X86_INS_LWPINS = 356 X86_INS_LWPVAL = 357 X86_INS_LZCNT = 358 X86_INS_MASKMOVDQU = 359 X86_INS_MAXPD = 360 X86_INS_MAXPS = 361 X86_INS_MAXSD = 362 X86_INS_MAXSS = 363 X86_INS_MFENCE = 364 X86_INS_MINPD = 365 X86_INS_MINPS = 366 X86_INS_MINSD = 367 X86_INS_MINSS = 368 X86_INS_CVTPD2PI = 369 X86_INS_CVTPI2PD = 370 X86_INS_CVTPI2PS = 371 X86_INS_CVTPS2PI = 372 X86_INS_CVTTPD2PI = 373 X86_INS_CVTTPS2PI = 374 X86_INS_EMMS = 375 X86_INS_MASKMOVQ = 376 X86_INS_MOVD = 377 X86_INS_MOVQ = 378 X86_INS_MOVDQ2Q = 379 X86_INS_MOVNTQ = 380 X86_INS_MOVQ2DQ = 381 X86_INS_PABSB = 382 X86_INS_PABSD = 383 X86_INS_PABSW = 384 X86_INS_PACKSSDW = 385 X86_INS_PACKSSWB = 386 X86_INS_PACKUSWB = 387 X86_INS_PADDB = 388 X86_INS_PADDD = 389 X86_INS_PADDQ = 390 X86_INS_PADDSB = 391 X86_INS_PADDSW = 392 X86_INS_PADDUSB = 393 X86_INS_PADDUSW = 394 X86_INS_PADDW = 395 X86_INS_PALIGNR = 396 X86_INS_PANDN = 397 X86_INS_PAND = 398 X86_INS_PAVGB = 399 X86_INS_PAVGW = 400 X86_INS_PCMPEQB = 401 X86_INS_PCMPEQD = 402 X86_INS_PCMPEQW = 403 X86_INS_PCMPGTB = 404 X86_INS_PCMPGTD = 405 X86_INS_PCMPGTW = 406 X86_INS_PEXTRW = 407 X86_INS_PHADDD = 408 X86_INS_PHADDSW = 409 X86_INS_PHADDW = 410 X86_INS_PHSUBD = 411 X86_INS_PHSUBSW = 412 X86_INS_PHSUBW = 413 X86_INS_PINSRW = 414 X86_INS_PMADDUBSW = 415 X86_INS_PMADDWD = 416 X86_INS_PMAXSW = 417 X86_INS_PMAXUB = 418 X86_INS_PMINSW = 419 X86_INS_PMINUB = 420 X86_INS_PMOVMSKB = 421 X86_INS_PMULHRSW = 422 X86_INS_PMULHUW = 423 X86_INS_PMULHW = 424 X86_INS_PMULLW = 425 X86_INS_PMULUDQ = 426 X86_INS_POR = 427 X86_INS_PSADBW = 428 X86_INS_PSHUFB = 429 X86_INS_PSHUFW = 430 X86_INS_PSIGNB = 431 X86_INS_PSIGND = 432 X86_INS_PSIGNW = 433 X86_INS_PSLLD = 434 X86_INS_PSLLQ = 435 X86_INS_PSLLW = 436 X86_INS_PSRAD = 437 X86_INS_PSRAW = 438 X86_INS_PSRLD = 439 X86_INS_PSRLQ = 440 X86_INS_PSRLW = 441 X86_INS_PSUBB = 442 X86_INS_PSUBD = 443 X86_INS_PSUBQ = 444 X86_INS_PSUBSB = 445 X86_INS_PSUBSW = 446 X86_INS_PSUBUSB = 447 X86_INS_PSUBUSW = 448 X86_INS_PSUBW = 449 X86_INS_PUNPCKHBW = 450 X86_INS_PUNPCKHDQ = 451 X86_INS_PUNPCKHWD = 452 X86_INS_PUNPCKLBW = 453 X86_INS_PUNPCKLDQ = 454 X86_INS_PUNPCKLWD = 455 X86_INS_PXOR = 456 X86_INS_MONITORX = 457 X86_INS_MONITOR = 458 X86_INS_MONTMUL = 459 X86_INS_MOV = 460 X86_INS_MOVABS = 461 X86_INS_MOVAPD = 462 X86_INS_MOVAPS = 463 X86_INS_MOVBE = 464 X86_INS_MOVDDUP = 465 X86_INS_MOVDIR64B = 466 X86_INS_MOVDIRI = 467 X86_INS_MOVDQA = 468 X86_INS_MOVDQU = 469 X86_INS_MOVHLPS = 470 X86_INS_MOVHPD = 471 X86_INS_MOVHPS = 472 X86_INS_MOVLHPS = 473 X86_INS_MOVLPD = 474 X86_INS_MOVLPS = 475 X86_INS_MOVMSKPD = 476 X86_INS_MOVMSKPS = 477 X86_INS_MOVNTDQA = 478 X86_INS_MOVNTDQ = 479 X86_INS_MOVNTI = 480 X86_INS_MOVNTPD = 481 X86_INS_MOVNTPS = 482 X86_INS_MOVNTSD = 483 X86_INS_MOVNTSS = 484 X86_INS_MOVSB = 485 X86_INS_MOVSD = 486 X86_INS_MOVSHDUP = 487 X86_INS_MOVSLDUP = 488 X86_INS_MOVSQ = 489 X86_INS_MOVSS = 490 X86_INS_MOVSW = 491 X86_INS_MOVSX = 492 X86_INS_MOVSXD = 493 X86_INS_MOVUPD = 494 X86_INS_MOVUPS = 495 X86_INS_MOVZX = 496 X86_INS_MPSADBW = 497 X86_INS_MUL = 498 X86_INS_MULPD = 499 X86_INS_MULPS = 500 X86_INS_MULSD = 501 X86_INS_MULSS = 502 X86_INS_MULX = 503 X86_INS_FMUL = 504 X86_INS_FIMUL = 505 X86_INS_FMULP = 506 X86_INS_MWAITX = 507 X86_INS_MWAIT = 508 X86_INS_NEG = 509 X86_INS_NOP = 510 X86_INS_NOT = 511 X86_INS_OR = 512 X86_INS_ORPD = 513 X86_INS_ORPS = 514 X86_INS_OUT = 515 X86_INS_OUTSB = 516 X86_INS_OUTSD = 517 X86_INS_OUTSW = 518 X86_INS_PACKUSDW = 519 X86_INS_PAUSE = 520 X86_INS_PAVGUSB = 521 X86_INS_PBLENDVB = 522 X86_INS_PBLENDW = 523 X86_INS_PCLMULQDQ = 524 X86_INS_PCMPEQQ = 525 X86_INS_PCMPESTRI = 526 X86_INS_PCMPESTRM = 527 X86_INS_PCMPGTQ = 528 X86_INS_PCMPISTRI = 529 X86_INS_PCMPISTRM = 530 X86_INS_PCONFIG = 531 X86_INS_PDEP = 532 X86_INS_PEXT = 533 X86_INS_PEXTRB = 534 X86_INS_PEXTRD = 535 X86_INS_PEXTRQ = 536 X86_INS_PF2ID = 537 X86_INS_PF2IW = 538 X86_INS_PFACC = 539 X86_INS_PFADD = 540 X86_INS_PFCMPEQ = 541 X86_INS_PFCMPGE = 542 X86_INS_PFCMPGT = 543 X86_INS_PFMAX = 544 X86_INS_PFMIN = 545 X86_INS_PFMUL = 546 X86_INS_PFNACC = 547 X86_INS_PFPNACC = 548 X86_INS_PFRCPIT1 = 549 X86_INS_PFRCPIT2 = 550 X86_INS_PFRCP = 551 X86_INS_PFRSQIT1 = 552 X86_INS_PFRSQRT = 553 X86_INS_PFSUBR = 554 X86_INS_PFSUB = 555 X86_INS_PHMINPOSUW = 556 X86_INS_PI2FD = 557 X86_INS_PI2FW = 558 X86_INS_PINSRB = 559 X86_INS_PINSRD = 560 X86_INS_PINSRQ = 561 X86_INS_PMAXSB = 562 X86_INS_PMAXSD = 563 X86_INS_PMAXUD = 564 X86_INS_PMAXUW = 565 X86_INS_PMINSB = 566 X86_INS_PMINSD = 567 X86_INS_PMINUD = 568 X86_INS_PMINUW = 569 X86_INS_PMOVSXBD = 570 X86_INS_PMOVSXBQ = 571 X86_INS_PMOVSXBW = 572 X86_INS_PMOVSXDQ = 573 X86_INS_PMOVSXWD = 574 X86_INS_PMOVSXWQ = 575 X86_INS_PMOVZXBD = 576 X86_INS_PMOVZXBQ = 577 X86_INS_PMOVZXBW = 578 X86_INS_PMOVZXDQ = 579 X86_INS_PMOVZXWD = 580 X86_INS_PMOVZXWQ = 581 X86_INS_PMULDQ = 582 X86_INS_PMULHRW = 583 X86_INS_PMULLD = 584 X86_INS_POP = 585 X86_INS_POPAW = 586 X86_INS_POPAL = 587 X86_INS_POPCNT = 588 X86_INS_POPF = 589 X86_INS_POPFD = 590 X86_INS_POPFQ = 591 X86_INS_PREFETCH = 592 X86_INS_PREFETCHNTA = 593 X86_INS_PREFETCHT0 = 594 X86_INS_PREFETCHT1 = 595 X86_INS_PREFETCHT2 = 596 X86_INS_PREFETCHW = 597 X86_INS_PREFETCHWT1 = 598 X86_INS_PSHUFD = 599 X86_INS_PSHUFHW = 600 X86_INS_PSHUFLW = 601 X86_INS_PSLLDQ = 602 X86_INS_PSRLDQ = 603 X86_INS_PSWAPD = 604 X86_INS_PTEST = 605 X86_INS_PTWRITE = 606 X86_INS_PUNPCKHQDQ = 607 X86_INS_PUNPCKLQDQ = 608 X86_INS_PUSH = 609 X86_INS_PUSHAW = 610 X86_INS_PUSHAL = 611 X86_INS_PUSHF = 612 X86_INS_PUSHFD = 613 X86_INS_PUSHFQ = 614 X86_INS_RCL = 615 X86_INS_RCPPS = 616 X86_INS_RCPSS = 617 X86_INS_RCR = 618 X86_INS_RDFSBASE = 619 X86_INS_RDGSBASE = 620 X86_INS_RDMSR = 621 X86_INS_RDPID = 622 X86_INS_RDPKRU = 623 X86_INS_RDPMC = 624 X86_INS_RDRAND = 625 X86_INS_RDSEED = 626 X86_INS_RDSSPD = 627 X86_INS_RDSSPQ = 628 X86_INS_RDTSC = 629 X86_INS_RDTSCP = 630 X86_INS_REPNE = 631 X86_INS_REP = 632 X86_INS_RET = 633 X86_INS_REX64 = 634 X86_INS_ROL = 635 X86_INS_ROR = 636 X86_INS_RORX = 637 X86_INS_ROUNDPD = 638 X86_INS_ROUNDPS = 639 X86_INS_ROUNDSD = 640 X86_INS_ROUNDSS = 641 X86_INS_RSM = 642 X86_INS_RSQRTPS = 643 X86_INS_RSQRTSS = 644 X86_INS_RSTORSSP = 645 X86_INS_SAHF = 646 X86_INS_SAL = 647 X86_INS_SALC = 648 X86_INS_SAR = 649 X86_INS_SARX = 650 X86_INS_SAVEPREVSSP = 651 X86_INS_SBB = 652 X86_INS_SCASB = 653 X86_INS_SCASD = 654 X86_INS_SCASQ = 655 X86_INS_SCASW = 656 X86_INS_SETAE = 657 X86_INS_SETA = 658 X86_INS_SETBE = 659 X86_INS_SETB = 660 X86_INS_SETE = 661 X86_INS_SETGE = 662 X86_INS_SETG = 663 X86_INS_SETLE = 664 X86_INS_SETL = 665 X86_INS_SETNE = 666 X86_INS_SETNO = 667 X86_INS_SETNP = 668 X86_INS_SETNS = 669 X86_INS_SETO = 670 X86_INS_SETP = 671 X86_INS_SETSSBSY = 672 X86_INS_SETS = 673 X86_INS_SFENCE = 674 X86_INS_SGDT = 675 X86_INS_SHA1MSG1 = 676 X86_INS_SHA1MSG2 = 677 X86_INS_SHA1NEXTE = 678 X86_INS_SHA1RNDS4 = 679 X86_INS_SHA256MSG1 = 680 X86_INS_SHA256MSG2 = 681 X86_INS_SHA256RNDS2 = 682 X86_INS_SHL = 683 X86_INS_SHLD = 684 X86_INS_SHLX = 685 X86_INS_SHR = 686 X86_INS_SHRD = 687 X86_INS_SHRX = 688 X86_INS_SHUFPD = 689 X86_INS_SHUFPS = 690 X86_INS_SIDT = 691 X86_INS_FSIN = 692 X86_INS_SKINIT = 693 X86_INS_SLDT = 694 X86_INS_SLWPCB = 695 X86_INS_SMSW = 696 X86_INS_SQRTPD = 697 X86_INS_SQRTPS = 698 X86_INS_SQRTSD = 699 X86_INS_SQRTSS = 700 X86_INS_FSQRT = 701 X86_INS_STAC = 702 X86_INS_STC = 703 X86_INS_STD = 704 X86_INS_STGI = 705 X86_INS_STI = 706 X86_INS_STMXCSR = 707 X86_INS_STOSB = 708 X86_INS_STOSD = 709 X86_INS_STOSQ = 710 X86_INS_STOSW = 711 X86_INS_STR = 712 X86_INS_FST = 713 X86_INS_FSTP = 714 X86_INS_SUB = 715 X86_INS_SUBPD = 716 X86_INS_SUBPS = 717 X86_INS_FSUBR = 718 X86_INS_FISUBR = 719 X86_INS_FSUBRP = 720 X86_INS_SUBSD = 721 X86_INS_SUBSS = 722 X86_INS_FSUB = 723 X86_INS_FISUB = 724 X86_INS_FSUBP = 725 X86_INS_SWAPGS = 726 X86_INS_SYSCALL = 727 X86_INS_SYSENTER = 728 X86_INS_SYSEXIT = 729 X86_INS_SYSEXITQ = 730 X86_INS_SYSRET = 731 X86_INS_SYSRETQ = 732 X86_INS_T1MSKC = 733 X86_INS_TEST = 734 X86_INS_TPAUSE = 735 X86_INS_FTST = 736 X86_INS_TZCNT = 737 X86_INS_TZMSK = 738 X86_INS_UCOMISD = 739 X86_INS_UCOMISS = 740 X86_INS_FUCOMPI = 741 X86_INS_FUCOMI = 742 X86_INS_FUCOMPP = 743 X86_INS_FUCOMP = 744 X86_INS_FUCOM = 745 X86_INS_UD0 = 746 X86_INS_UD1 = 747 X86_INS_UD2 = 748 X86_INS_UMONITOR = 749 X86_INS_UMWAIT = 750 X86_INS_UNPCKHPD = 751 X86_INS_UNPCKHPS = 752 X86_INS_UNPCKLPD = 753 X86_INS_UNPCKLPS = 754 X86_INS_V4FMADDPS = 755 X86_INS_V4FMADDSS = 756 X86_INS_V4FNMADDPS = 757 X86_INS_V4FNMADDSS = 758 X86_INS_VADDPD = 759 X86_INS_VADDPS = 760 X86_INS_VADDSD = 761 X86_INS_VADDSS = 762 X86_INS_VADDSUBPD = 763 X86_INS_VADDSUBPS = 764 X86_INS_VAESDECLAST = 765 X86_INS_VAESDEC = 766 X86_INS_VAESENCLAST = 767 X86_INS_VAESENC = 768 X86_INS_VAESIMC = 769 X86_INS_VAESKEYGENASSIST = 770 X86_INS_VALIGND = 771 X86_INS_VALIGNQ = 772 X86_INS_VANDNPD = 773 X86_INS_VANDNPS = 774 X86_INS_VANDPD = 775 X86_INS_VANDPS = 776 X86_INS_VBLENDMPD = 777 X86_INS_VBLENDMPS = 778 X86_INS_VBLENDPD = 779 X86_INS_VBLENDPS = 780 X86_INS_VBLENDVPD = 781 X86_INS_VBLENDVPS = 782 X86_INS_VBROADCASTF128 = 783 X86_INS_VBROADCASTF32X2 = 784 X86_INS_VBROADCASTF32X4 = 785 X86_INS_VBROADCASTF32X8 = 786 X86_INS_VBROADCASTF64X2 = 787 X86_INS_VBROADCASTF64X4 = 788 X86_INS_VBROADCASTI128 = 789 X86_INS_VBROADCASTI32X2 = 790 X86_INS_VBROADCASTI32X4 = 791 X86_INS_VBROADCASTI32X8 = 792 X86_INS_VBROADCASTI64X2 = 793 X86_INS_VBROADCASTI64X4 = 794 X86_INS_VBROADCASTSD = 795 X86_INS_VBROADCASTSS = 796 X86_INS_VCMP = 797 X86_INS_VCMPPD = 798 X86_INS_VCMPPS = 799 X86_INS_VCMPSD = 800 X86_INS_VCMPSS = 801 X86_INS_VCOMISD = 802 X86_INS_VCOMISS = 803 X86_INS_VCOMPRESSPD = 804 X86_INS_VCOMPRESSPS = 805 X86_INS_VCVTDQ2PD = 806 X86_INS_VCVTDQ2PS = 807 X86_INS_VCVTPD2DQ = 808 X86_INS_VCVTPD2PS = 809 X86_INS_VCVTPD2QQ = 810 X86_INS_VCVTPD2UDQ = 811 X86_INS_VCVTPD2UQQ = 812 X86_INS_VCVTPH2PS = 813 X86_INS_VCVTPS2DQ = 814 X86_INS_VCVTPS2PD = 815 X86_INS_VCVTPS2PH = 816 X86_INS_VCVTPS2QQ = 817 X86_INS_VCVTPS2UDQ = 818 X86_INS_VCVTPS2UQQ = 819 X86_INS_VCVTQQ2PD = 820 X86_INS_VCVTQQ2PS = 821 X86_INS_VCVTSD2SI = 822 X86_INS_VCVTSD2SS = 823 X86_INS_VCVTSD2USI = 824 X86_INS_VCVTSI2SD = 825 X86_INS_VCVTSI2SS = 826 X86_INS_VCVTSS2SD = 827 X86_INS_VCVTSS2SI = 828 X86_INS_VCVTSS2USI = 829 X86_INS_VCVTTPD2DQ = 830 X86_INS_VCVTTPD2QQ = 831 X86_INS_VCVTTPD2UDQ = 832 X86_INS_VCVTTPD2UQQ = 833 X86_INS_VCVTTPS2DQ = 834 X86_INS_VCVTTPS2QQ = 835 X86_INS_VCVTTPS2UDQ = 836 X86_INS_VCVTTPS2UQQ = 837 X86_INS_VCVTTSD2SI = 838 X86_INS_VCVTTSD2USI = 839 X86_INS_VCVTTSS2SI = 840 X86_INS_VCVTTSS2USI = 841 X86_INS_VCVTUDQ2PD = 842 X86_INS_VCVTUDQ2PS = 843 X86_INS_VCVTUQQ2PD = 844 X86_INS_VCVTUQQ2PS = 845 X86_INS_VCVTUSI2SD = 846 X86_INS_VCVTUSI2SS = 847 X86_INS_VDBPSADBW = 848 X86_INS_VDIVPD = 849 X86_INS_VDIVPS = 850 X86_INS_VDIVSD = 851 X86_INS_VDIVSS = 852 X86_INS_VDPPD = 853 X86_INS_VDPPS = 854 X86_INS_VERR = 855 X86_INS_VERW = 856 X86_INS_VEXP2PD = 857 X86_INS_VEXP2PS = 858 X86_INS_VEXPANDPD = 859 X86_INS_VEXPANDPS = 860 X86_INS_VEXTRACTF128 = 861 X86_INS_VEXTRACTF32X4 = 862 X86_INS_VEXTRACTF32X8 = 863 X86_INS_VEXTRACTF64X2 = 864 X86_INS_VEXTRACTF64X4 = 865 X86_INS_VEXTRACTI128 = 866 X86_INS_VEXTRACTI32X4 = 867 X86_INS_VEXTRACTI32X8 = 868 X86_INS_VEXTRACTI64X2 = 869 X86_INS_VEXTRACTI64X4 = 870 X86_INS_VEXTRACTPS = 871 X86_INS_VFIXUPIMMPD = 872 X86_INS_VFIXUPIMMPS = 873 X86_INS_VFIXUPIMMSD = 874 X86_INS_VFIXUPIMMSS = 875 X86_INS_VFMADD132PD = 876 X86_INS_VFMADD132PS = 877 X86_INS_VFMADD132SD = 878 X86_INS_VFMADD132SS = 879 X86_INS_VFMADD213PD = 880 X86_INS_VFMADD213PS = 881 X86_INS_VFMADD213SD = 882 X86_INS_VFMADD213SS = 883 X86_INS_VFMADD231PD = 884 X86_INS_VFMADD231PS = 885 X86_INS_VFMADD231SD = 886 X86_INS_VFMADD231SS = 887 X86_INS_VFMADDPD = 888 X86_INS_VFMADDPS = 889 X86_INS_VFMADDSD = 890 X86_INS_VFMADDSS = 891 X86_INS_VFMADDSUB132PD = 892 X86_INS_VFMADDSUB132PS = 893 X86_INS_VFMADDSUB213PD = 894 X86_INS_VFMADDSUB213PS = 895 X86_INS_VFMADDSUB231PD = 896 X86_INS_VFMADDSUB231PS = 897 X86_INS_VFMADDSUBPD = 898 X86_INS_VFMADDSUBPS = 899 X86_INS_VFMSUB132PD = 900 X86_INS_VFMSUB132PS = 901 X86_INS_VFMSUB132SD = 902 X86_INS_VFMSUB132SS = 903 X86_INS_VFMSUB213PD = 904 X86_INS_VFMSUB213PS = 905 X86_INS_VFMSUB213SD = 906 X86_INS_VFMSUB213SS = 907 X86_INS_VFMSUB231PD = 908 X86_INS_VFMSUB231PS = 909 X86_INS_VFMSUB231SD = 910 X86_INS_VFMSUB231SS = 911 X86_INS_VFMSUBADD132PD = 912 X86_INS_VFMSUBADD132PS = 913 X86_INS_VFMSUBADD213PD = 914 X86_INS_VFMSUBADD213PS = 915 X86_INS_VFMSUBADD231PD = 916 X86_INS_VFMSUBADD231PS = 917 X86_INS_VFMSUBADDPD = 918 X86_INS_VFMSUBADDPS = 919 X86_INS_VFMSUBPD = 920 X86_INS_VFMSUBPS = 921 X86_INS_VFMSUBSD = 922 X86_INS_VFMSUBSS = 923 X86_INS_VFNMADD132PD = 924 X86_INS_VFNMADD132PS = 925 X86_INS_VFNMADD132SD = 926 X86_INS_VFNMADD132SS = 927 X86_INS_VFNMADD213PD = 928 X86_INS_VFNMADD213PS = 929 X86_INS_VFNMADD213SD = 930 X86_INS_VFNMADD213SS = 931 X86_INS_VFNMADD231PD = 932 X86_INS_VFNMADD231PS = 933 X86_INS_VFNMADD231SD = 934 X86_INS_VFNMADD231SS = 935 X86_INS_VFNMADDPD = 936 X86_INS_VFNMADDPS = 937 X86_INS_VFNMADDSD = 938 X86_INS_VFNMADDSS = 939 X86_INS_VFNMSUB132PD = 940 X86_INS_VFNMSUB132PS = 941 X86_INS_VFNMSUB132SD = 942 X86_INS_VFNMSUB132SS = 943 X86_INS_VFNMSUB213PD = 944 X86_INS_VFNMSUB213PS = 945 X86_INS_VFNMSUB213SD = 946 X86_INS_VFNMSUB213SS = 947 X86_INS_VFNMSUB231PD = 948 X86_INS_VFNMSUB231PS = 949 X86_INS_VFNMSUB231SD = 950 X86_INS_VFNMSUB231SS = 951 X86_INS_VFNMSUBPD = 952 X86_INS_VFNMSUBPS = 953 X86_INS_VFNMSUBSD = 954 X86_INS_VFNMSUBSS = 955 X86_INS_VFPCLASSPD = 956 X86_INS_VFPCLASSPS = 957 X86_INS_VFPCLASSSD = 958 X86_INS_VFPCLASSSS = 959 X86_INS_VFRCZPD = 960 X86_INS_VFRCZPS = 961 X86_INS_VFRCZSD = 962 X86_INS_VFRCZSS = 963 X86_INS_VGATHERDPD = 964 X86_INS_VGATHERDPS = 965 X86_INS_VGATHERPF0DPD = 966 X86_INS_VGATHERPF0DPS = 967 X86_INS_VGATHERPF0QPD = 968 X86_INS_VGATHERPF0QPS = 969 X86_INS_VGATHERPF1DPD = 970 X86_INS_VGATHERPF1DPS = 971 X86_INS_VGATHERPF1QPD = 972 X86_INS_VGATHERPF1QPS = 973 X86_INS_VGATHERQPD = 974 X86_INS_VGATHERQPS = 975 X86_INS_VGETEXPPD = 976 X86_INS_VGETEXPPS = 977 X86_INS_VGETEXPSD = 978 X86_INS_VGETEXPSS = 979 X86_INS_VGETMANTPD = 980 X86_INS_VGETMANTPS = 981 X86_INS_VGETMANTSD = 982 X86_INS_VGETMANTSS = 983 X86_INS_VGF2P8AFFINEINVQB = 984 X86_INS_VGF2P8AFFINEQB = 985 X86_INS_VGF2P8MULB = 986 X86_INS_VHADDPD = 987 X86_INS_VHADDPS = 988 X86_INS_VHSUBPD = 989 X86_INS_VHSUBPS = 990 X86_INS_VINSERTF128 = 991 X86_INS_VINSERTF32X4 = 992 X86_INS_VINSERTF32X8 = 993 X86_INS_VINSERTF64X2 = 994 X86_INS_VINSERTF64X4 = 995 X86_INS_VINSERTI128 = 996 X86_INS_VINSERTI32X4 = 997 X86_INS_VINSERTI32X8 = 998 X86_INS_VINSERTI64X2 = 999 X86_INS_VINSERTI64X4 = 1000 X86_INS_VINSERTPS = 1001 X86_INS_VLDDQU = 1002 X86_INS_VLDMXCSR = 1003 X86_INS_VMASKMOVDQU = 1004 X86_INS_VMASKMOVPD = 1005 X86_INS_VMASKMOVPS = 1006 X86_INS_VMAXPD = 1007 X86_INS_VMAXPS = 1008 X86_INS_VMAXSD = 1009 X86_INS_VMAXSS = 1010 X86_INS_VMCALL = 1011 X86_INS_VMCLEAR = 1012 X86_INS_VMFUNC = 1013 X86_INS_VMINPD = 1014 X86_INS_VMINPS = 1015 X86_INS_VMINSD = 1016 X86_INS_VMINSS = 1017 X86_INS_VMLAUNCH = 1018 X86_INS_VMLOAD = 1019 X86_INS_VMMCALL = 1020 X86_INS_VMOVQ = 1021 X86_INS_VMOVAPD = 1022 X86_INS_VMOVAPS = 1023 X86_INS_VMOVDDUP = 1024 X86_INS_VMOVD = 1025 X86_INS_VMOVDQA32 = 1026 X86_INS_VMOVDQA64 = 1027 X86_INS_VMOVDQA = 1028 X86_INS_VMOVDQU16 = 1029 X86_INS_VMOVDQU32 = 1030 X86_INS_VMOVDQU64 = 1031 X86_INS_VMOVDQU8 = 1032 X86_INS_VMOVDQU = 1033 X86_INS_VMOVHLPS = 1034 X86_INS_VMOVHPD = 1035 X86_INS_VMOVHPS = 1036 X86_INS_VMOVLHPS = 1037 X86_INS_VMOVLPD = 1038 X86_INS_VMOVLPS = 1039 X86_INS_VMOVMSKPD = 1040 X86_INS_VMOVMSKPS = 1041 X86_INS_VMOVNTDQA = 1042 X86_INS_VMOVNTDQ = 1043 X86_INS_VMOVNTPD = 1044 X86_INS_VMOVNTPS = 1045 X86_INS_VMOVSD = 1046 X86_INS_VMOVSHDUP = 1047 X86_INS_VMOVSLDUP = 1048 X86_INS_VMOVSS = 1049 X86_INS_VMOVUPD = 1050 X86_INS_VMOVUPS = 1051 X86_INS_VMPSADBW = 1052 X86_INS_VMPTRLD = 1053 X86_INS_VMPTRST = 1054 X86_INS_VMREAD = 1055 X86_INS_VMRESUME = 1056 X86_INS_VMRUN = 1057 X86_INS_VMSAVE = 1058 X86_INS_VMULPD = 1059 X86_INS_VMULPS = 1060 X86_INS_VMULSD = 1061 X86_INS_VMULSS = 1062 X86_INS_VMWRITE = 1063 X86_INS_VMXOFF = 1064 X86_INS_VMXON = 1065 X86_INS_VORPD = 1066 X86_INS_VORPS = 1067 X86_INS_VP4DPWSSDS = 1068 X86_INS_VP4DPWSSD = 1069 X86_INS_VPABSB = 1070 X86_INS_VPABSD = 1071 X86_INS_VPABSQ = 1072 X86_INS_VPABSW = 1073 X86_INS_VPACKSSDW = 1074 X86_INS_VPACKSSWB = 1075 X86_INS_VPACKUSDW = 1076 X86_INS_VPACKUSWB = 1077 X86_INS_VPADDB = 1078 X86_INS_VPADDD = 1079 X86_INS_VPADDQ = 1080 X86_INS_VPADDSB = 1081 X86_INS_VPADDSW = 1082 X86_INS_VPADDUSB = 1083 X86_INS_VPADDUSW = 1084 X86_INS_VPADDW = 1085 X86_INS_VPALIGNR = 1086 X86_INS_VPANDD = 1087 X86_INS_VPANDND = 1088 X86_INS_VPANDNQ = 1089 X86_INS_VPANDN = 1090 X86_INS_VPANDQ = 1091 X86_INS_VPAND = 1092 X86_INS_VPAVGB = 1093 X86_INS_VPAVGW = 1094 X86_INS_VPBLENDD = 1095 X86_INS_VPBLENDMB = 1096 X86_INS_VPBLENDMD = 1097 X86_INS_VPBLENDMQ = 1098 X86_INS_VPBLENDMW = 1099 X86_INS_VPBLENDVB = 1100 X86_INS_VPBLENDW = 1101 X86_INS_VPBROADCASTB = 1102 X86_INS_VPBROADCASTD = 1103 X86_INS_VPBROADCASTMB2Q = 1104 X86_INS_VPBROADCASTMW2D = 1105 X86_INS_VPBROADCASTQ = 1106 X86_INS_VPBROADCASTW = 1107 X86_INS_VPCLMULQDQ = 1108 X86_INS_VPCMOV = 1109 X86_INS_VPCMP = 1110 X86_INS_VPCMPB = 1111 X86_INS_VPCMPD = 1112 X86_INS_VPCMPEQB = 1113 X86_INS_VPCMPEQD = 1114 X86_INS_VPCMPEQQ = 1115 X86_INS_VPCMPEQW = 1116 X86_INS_VPCMPESTRI = 1117 X86_INS_VPCMPESTRM = 1118 X86_INS_VPCMPGTB = 1119 X86_INS_VPCMPGTD = 1120 X86_INS_VPCMPGTQ = 1121 X86_INS_VPCMPGTW = 1122 X86_INS_VPCMPISTRI = 1123 X86_INS_VPCMPISTRM = 1124 X86_INS_VPCMPQ = 1125 X86_INS_VPCMPUB = 1126 X86_INS_VPCMPUD = 1127 X86_INS_VPCMPUQ = 1128 X86_INS_VPCMPUW = 1129 X86_INS_VPCMPW = 1130 X86_INS_VPCOM = 1131 X86_INS_VPCOMB = 1132 X86_INS_VPCOMD = 1133 X86_INS_VPCOMPRESSB = 1134 X86_INS_VPCOMPRESSD = 1135 X86_INS_VPCOMPRESSQ = 1136 X86_INS_VPCOMPRESSW = 1137 X86_INS_VPCOMQ = 1138 X86_INS_VPCOMUB = 1139 X86_INS_VPCOMUD = 1140 X86_INS_VPCOMUQ = 1141 X86_INS_VPCOMUW = 1142 X86_INS_VPCOMW = 1143 X86_INS_VPCONFLICTD = 1144 X86_INS_VPCONFLICTQ = 1145 X86_INS_VPDPBUSDS = 1146 X86_INS_VPDPBUSD = 1147 X86_INS_VPDPWSSDS = 1148 X86_INS_VPDPWSSD = 1149 X86_INS_VPERM2F128 = 1150 X86_INS_VPERM2I128 = 1151 X86_INS_VPERMB = 1152 X86_INS_VPERMD = 1153 X86_INS_VPERMI2B = 1154 X86_INS_VPERMI2D = 1155 X86_INS_VPERMI2PD = 1156 X86_INS_VPERMI2PS = 1157 X86_INS_VPERMI2Q = 1158 X86_INS_VPERMI2W = 1159 X86_INS_VPERMIL2PD = 1160 X86_INS_VPERMILPD = 1161 X86_INS_VPERMIL2PS = 1162 X86_INS_VPERMILPS = 1163 X86_INS_VPERMPD = 1164 X86_INS_VPERMPS = 1165 X86_INS_VPERMQ = 1166 X86_INS_VPERMT2B = 1167 X86_INS_VPERMT2D = 1168 X86_INS_VPERMT2PD = 1169 X86_INS_VPERMT2PS = 1170 X86_INS_VPERMT2Q = 1171 X86_INS_VPERMT2W = 1172 X86_INS_VPERMW = 1173 X86_INS_VPEXPANDB = 1174 X86_INS_VPEXPANDD = 1175 X86_INS_VPEXPANDQ = 1176 X86_INS_VPEXPANDW = 1177 X86_INS_VPEXTRB = 1178 X86_INS_VPEXTRD = 1179 X86_INS_VPEXTRQ = 1180 X86_INS_VPEXTRW = 1181 X86_INS_VPGATHERDD = 1182 X86_INS_VPGATHERDQ = 1183 X86_INS_VPGATHERQD = 1184 X86_INS_VPGATHERQQ = 1185 X86_INS_VPHADDBD = 1186 X86_INS_VPHADDBQ = 1187 X86_INS_VPHADDBW = 1188 X86_INS_VPHADDDQ = 1189 X86_INS_VPHADDD = 1190 X86_INS_VPHADDSW = 1191 X86_INS_VPHADDUBD = 1192 X86_INS_VPHADDUBQ = 1193 X86_INS_VPHADDUBW = 1194 X86_INS_VPHADDUDQ = 1195 X86_INS_VPHADDUWD = 1196 X86_INS_VPHADDUWQ = 1197 X86_INS_VPHADDWD = 1198 X86_INS_VPHADDWQ = 1199 X86_INS_VPHADDW = 1200 X86_INS_VPHMINPOSUW = 1201 X86_INS_VPHSUBBW = 1202 X86_INS_VPHSUBDQ = 1203 X86_INS_VPHSUBD = 1204 X86_INS_VPHSUBSW = 1205 X86_INS_VPHSUBWD = 1206 X86_INS_VPHSUBW = 1207 X86_INS_VPINSRB = 1208 X86_INS_VPINSRD = 1209 X86_INS_VPINSRQ = 1210 X86_INS_VPINSRW = 1211 X86_INS_VPLZCNTD = 1212 X86_INS_VPLZCNTQ = 1213 X86_INS_VPMACSDD = 1214 X86_INS_VPMACSDQH = 1215 X86_INS_VPMACSDQL = 1216 X86_INS_VPMACSSDD = 1217 X86_INS_VPMACSSDQH = 1218 X86_INS_VPMACSSDQL = 1219 X86_INS_VPMACSSWD = 1220 X86_INS_VPMACSSWW = 1221 X86_INS_VPMACSWD = 1222 X86_INS_VPMACSWW = 1223 X86_INS_VPMADCSSWD = 1224 X86_INS_VPMADCSWD = 1225 X86_INS_VPMADD52HUQ = 1226 X86_INS_VPMADD52LUQ = 1227 X86_INS_VPMADDUBSW = 1228 X86_INS_VPMADDWD = 1229 X86_INS_VPMASKMOVD = 1230 X86_INS_VPMASKMOVQ = 1231 X86_INS_VPMAXSB = 1232 X86_INS_VPMAXSD = 1233 X86_INS_VPMAXSQ = 1234 X86_INS_VPMAXSW = 1235 X86_INS_VPMAXUB = 1236 X86_INS_VPMAXUD = 1237 X86_INS_VPMAXUQ = 1238 X86_INS_VPMAXUW = 1239 X86_INS_VPMINSB = 1240 X86_INS_VPMINSD = 1241 X86_INS_VPMINSQ = 1242 X86_INS_VPMINSW = 1243 X86_INS_VPMINUB = 1244 X86_INS_VPMINUD = 1245 X86_INS_VPMINUQ = 1246 X86_INS_VPMINUW = 1247 X86_INS_VPMOVB2M = 1248 X86_INS_VPMOVD2M = 1249 X86_INS_VPMOVDB = 1250 X86_INS_VPMOVDW = 1251 X86_INS_VPMOVM2B = 1252 X86_INS_VPMOVM2D = 1253 X86_INS_VPMOVM2Q = 1254 X86_INS_VPMOVM2W = 1255 X86_INS_VPMOVMSKB = 1256 X86_INS_VPMOVQ2M = 1257 X86_INS_VPMOVQB = 1258 X86_INS_VPMOVQD = 1259 X86_INS_VPMOVQW = 1260 X86_INS_VPMOVSDB = 1261 X86_INS_VPMOVSDW = 1262 X86_INS_VPMOVSQB = 1263 X86_INS_VPMOVSQD = 1264 X86_INS_VPMOVSQW = 1265 X86_INS_VPMOVSWB = 1266 X86_INS_VPMOVSXBD = 1267 X86_INS_VPMOVSXBQ = 1268 X86_INS_VPMOVSXBW = 1269 X86_INS_VPMOVSXDQ = 1270 X86_INS_VPMOVSXWD = 1271 X86_INS_VPMOVSXWQ = 1272 X86_INS_VPMOVUSDB = 1273 X86_INS_VPMOVUSDW = 1274 X86_INS_VPMOVUSQB = 1275 X86_INS_VPMOVUSQD = 1276 X86_INS_VPMOVUSQW = 1277 X86_INS_VPMOVUSWB = 1278 X86_INS_VPMOVW2M = 1279 X86_INS_VPMOVWB = 1280 X86_INS_VPMOVZXBD = 1281 X86_INS_VPMOVZXBQ = 1282 X86_INS_VPMOVZXBW = 1283 X86_INS_VPMOVZXDQ = 1284 X86_INS_VPMOVZXWD = 1285 X86_INS_VPMOVZXWQ = 1286 X86_INS_VPMULDQ = 1287 X86_INS_VPMULHRSW = 1288 X86_INS_VPMULHUW = 1289 X86_INS_VPMULHW = 1290 X86_INS_VPMULLD = 1291 X86_INS_VPMULLQ = 1292 X86_INS_VPMULLW = 1293 X86_INS_VPMULTISHIFTQB = 1294 X86_INS_VPMULUDQ = 1295 X86_INS_VPOPCNTB = 1296 X86_INS_VPOPCNTD = 1297 X86_INS_VPOPCNTQ = 1298 X86_INS_VPOPCNTW = 1299 X86_INS_VPORD = 1300 X86_INS_VPORQ = 1301 X86_INS_VPOR = 1302 X86_INS_VPPERM = 1303 X86_INS_VPROLD = 1304 X86_INS_VPROLQ = 1305 X86_INS_VPROLVD = 1306 X86_INS_VPROLVQ = 1307 X86_INS_VPRORD = 1308 X86_INS_VPRORQ = 1309 X86_INS_VPRORVD = 1310 X86_INS_VPRORVQ = 1311 X86_INS_VPROTB = 1312 X86_INS_VPROTD = 1313 X86_INS_VPROTQ = 1314 X86_INS_VPROTW = 1315 X86_INS_VPSADBW = 1316 X86_INS_VPSCATTERDD = 1317 X86_INS_VPSCATTERDQ = 1318 X86_INS_VPSCATTERQD = 1319 X86_INS_VPSCATTERQQ = 1320 X86_INS_VPSHAB = 1321 X86_INS_VPSHAD = 1322 X86_INS_VPSHAQ = 1323 X86_INS_VPSHAW = 1324 X86_INS_VPSHLB = 1325 X86_INS_VPSHLDD = 1326 X86_INS_VPSHLDQ = 1327 X86_INS_VPSHLDVD = 1328 X86_INS_VPSHLDVQ = 1329 X86_INS_VPSHLDVW = 1330 X86_INS_VPSHLDW = 1331 X86_INS_VPSHLD = 1332 X86_INS_VPSHLQ = 1333 X86_INS_VPSHLW = 1334 X86_INS_VPSHRDD = 1335 X86_INS_VPSHRDQ = 1336 X86_INS_VPSHRDVD = 1337 X86_INS_VPSHRDVQ = 1338 X86_INS_VPSHRDVW = 1339 X86_INS_VPSHRDW = 1340 X86_INS_VPSHUFBITQMB = 1341 X86_INS_VPSHUFB = 1342 X86_INS_VPSHUFD = 1343 X86_INS_VPSHUFHW = 1344 X86_INS_VPSHUFLW = 1345 X86_INS_VPSIGNB = 1346 X86_INS_VPSIGND = 1347 X86_INS_VPSIGNW = 1348 X86_INS_VPSLLDQ = 1349 X86_INS_VPSLLD = 1350 X86_INS_VPSLLQ = 1351 X86_INS_VPSLLVD = 1352 X86_INS_VPSLLVQ = 1353 X86_INS_VPSLLVW = 1354 X86_INS_VPSLLW = 1355 X86_INS_VPSRAD = 1356 X86_INS_VPSRAQ = 1357 X86_INS_VPSRAVD = 1358 X86_INS_VPSRAVQ = 1359 X86_INS_VPSRAVW = 1360 X86_INS_VPSRAW = 1361 X86_INS_VPSRLDQ = 1362 X86_INS_VPSRLD = 1363 X86_INS_VPSRLQ = 1364 X86_INS_VPSRLVD = 1365 X86_INS_VPSRLVQ = 1366 X86_INS_VPSRLVW = 1367 X86_INS_VPSRLW = 1368 X86_INS_VPSUBB = 1369 X86_INS_VPSUBD = 1370 X86_INS_VPSUBQ = 1371 X86_INS_VPSUBSB = 1372 X86_INS_VPSUBSW = 1373 X86_INS_VPSUBUSB = 1374 X86_INS_VPSUBUSW = 1375 X86_INS_VPSUBW = 1376 X86_INS_VPTERNLOGD = 1377 X86_INS_VPTERNLOGQ = 1378 X86_INS_VPTESTMB = 1379 X86_INS_VPTESTMD = 1380 X86_INS_VPTESTMQ = 1381 X86_INS_VPTESTMW = 1382 X86_INS_VPTESTNMB = 1383 X86_INS_VPTESTNMD = 1384 X86_INS_VPTESTNMQ = 1385 X86_INS_VPTESTNMW = 1386 X86_INS_VPTEST = 1387 X86_INS_VPUNPCKHBW = 1388 X86_INS_VPUNPCKHDQ = 1389 X86_INS_VPUNPCKHQDQ = 1390 X86_INS_VPUNPCKHWD = 1391 X86_INS_VPUNPCKLBW = 1392 X86_INS_VPUNPCKLDQ = 1393 X86_INS_VPUNPCKLQDQ = 1394 X86_INS_VPUNPCKLWD = 1395 X86_INS_VPXORD = 1396 X86_INS_VPXORQ = 1397 X86_INS_VPXOR = 1398 X86_INS_VRANGEPD = 1399 X86_INS_VRANGEPS = 1400 X86_INS_VRANGESD = 1401 X86_INS_VRANGESS = 1402 X86_INS_VRCP14PD = 1403 X86_INS_VRCP14PS = 1404 X86_INS_VRCP14SD = 1405 X86_INS_VRCP14SS = 1406 X86_INS_VRCP28PD = 1407 X86_INS_VRCP28PS = 1408 X86_INS_VRCP28SD = 1409 X86_INS_VRCP28SS = 1410 X86_INS_VRCPPS = 1411 X86_INS_VRCPSS = 1412 X86_INS_VREDUCEPD = 1413 X86_INS_VREDUCEPS = 1414 X86_INS_VREDUCESD = 1415 X86_INS_VREDUCESS = 1416 X86_INS_VRNDSCALEPD = 1417 X86_INS_VRNDSCALEPS = 1418 X86_INS_VRNDSCALESD = 1419 X86_INS_VRNDSCALESS = 1420 X86_INS_VROUNDPD = 1421 X86_INS_VROUNDPS = 1422 X86_INS_VROUNDSD = 1423 X86_INS_VROUNDSS = 1424 X86_INS_VRSQRT14PD = 1425 X86_INS_VRSQRT14PS = 1426 X86_INS_VRSQRT14SD = 1427 X86_INS_VRSQRT14SS = 1428 X86_INS_VRSQRT28PD = 1429 X86_INS_VRSQRT28PS = 1430 X86_INS_VRSQRT28SD = 1431 X86_INS_VRSQRT28SS = 1432 X86_INS_VRSQRTPS = 1433 X86_INS_VRSQRTSS = 1434 X86_INS_VSCALEFPD = 1435 X86_INS_VSCALEFPS = 1436 X86_INS_VSCALEFSD = 1437 X86_INS_VSCALEFSS = 1438 X86_INS_VSCATTERDPD = 1439 X86_INS_VSCATTERDPS = 1440 X86_INS_VSCATTERPF0DPD = 1441 X86_INS_VSCATTERPF0DPS = 1442 X86_INS_VSCATTERPF0QPD = 1443 X86_INS_VSCATTERPF0QPS = 1444 X86_INS_VSCATTERPF1DPD = 1445 X86_INS_VSCATTERPF1DPS = 1446 X86_INS_VSCATTERPF1QPD = 1447 X86_INS_VSCATTERPF1QPS = 1448 X86_INS_VSCATTERQPD = 1449 X86_INS_VSCATTERQPS = 1450 X86_INS_VSHUFF32X4 = 1451 X86_INS_VSHUFF64X2 = 1452 X86_INS_VSHUFI32X4 = 1453 X86_INS_VSHUFI64X2 = 1454 X86_INS_VSHUFPD = 1455 X86_INS_VSHUFPS = 1456 X86_INS_VSQRTPD = 1457 X86_INS_VSQRTPS = 1458 X86_INS_VSQRTSD = 1459 X86_INS_VSQRTSS = 1460 X86_INS_VSTMXCSR = 1461 X86_INS_VSUBPD = 1462 X86_INS_VSUBPS = 1463 X86_INS_VSUBSD = 1464 X86_INS_VSUBSS = 1465 X86_INS_VTESTPD = 1466 X86_INS_VTESTPS = 1467 X86_INS_VUCOMISD = 1468 X86_INS_VUCOMISS = 1469 X86_INS_VUNPCKHPD = 1470 X86_INS_VUNPCKHPS = 1471 X86_INS_VUNPCKLPD = 1472 X86_INS_VUNPCKLPS = 1473 X86_INS_VXORPD = 1474 X86_INS_VXORPS = 1475 X86_INS_VZEROALL = 1476 X86_INS_VZEROUPPER = 1477 X86_INS_WAIT = 1478 X86_INS_WBINVD = 1479 X86_INS_WBNOINVD = 1480 X86_INS_WRFSBASE = 1481 X86_INS_WRGSBASE = 1482 X86_INS_WRMSR = 1483 X86_INS_WRPKRU = 1484 X86_INS_WRSSD = 1485 X86_INS_WRSSQ = 1486 X86_INS_WRUSSD = 1487 X86_INS_WRUSSQ = 1488 X86_INS_XABORT = 1489 X86_INS_XACQUIRE = 1490 X86_INS_XADD = 1491 X86_INS_XBEGIN = 1492 X86_INS_XCHG = 1493 X86_INS_FXCH = 1494 X86_INS_XCRYPTCBC = 1495 X86_INS_XCRYPTCFB = 1496 X86_INS_XCRYPTCTR = 1497 X86_INS_XCRYPTECB = 1498 X86_INS_XCRYPTOFB = 1499 X86_INS_XEND = 1500 X86_INS_XGETBV = 1501 X86_INS_XLATB = 1502 X86_INS_XOR = 1503 X86_INS_XORPD = 1504 X86_INS_XORPS = 1505 X86_INS_XRELEASE = 1506 X86_INS_XRSTOR = 1507 X86_INS_XRSTOR64 = 1508 X86_INS_XRSTORS = 1509 X86_INS_XRSTORS64 = 1510 X86_INS_XSAVE = 1511 X86_INS_XSAVE64 = 1512 X86_INS_XSAVEC = 1513 X86_INS_XSAVEC64 = 1514 X86_INS_XSAVEOPT = 1515 X86_INS_XSAVEOPT64 = 1516 X86_INS_XSAVES = 1517 X86_INS_XSAVES64 = 1518 X86_INS_XSETBV = 1519 X86_INS_XSHA1 = 1520 X86_INS_XSHA256 = 1521 X86_INS_XSTORE = 1522 X86_INS_XTEST = 1523 X86_INS_ENDING = 1524 X86_GRP_INVALID = 0 X86_GRP_JUMP = 1 X86_GRP_CALL = 2 X86_GRP_RET = 3 X86_GRP_INT = 4 X86_GRP_IRET = 5 X86_GRP_PRIVILEGE = 6 X86_GRP_BRANCH_RELATIVE = 7 X86_GRP_VM = 128 X86_GRP_3DNOW = 129 X86_GRP_AES = 130 X86_GRP_ADX = 131 X86_GRP_AVX = 132 X86_GRP_AVX2 = 133 X86_GRP_AVX512 = 134 X86_GRP_BMI = 135 X86_GRP_BMI2 = 136 X86_GRP_CMOV = 137 X86_GRP_F16C = 138 X86_GRP_FMA = 139 X86_GRP_FMA4 = 140 X86_GRP_FSGSBASE = 141 X86_GRP_HLE = 142 X86_GRP_MMX = 143 X86_GRP_MODE32 = 144 X86_GRP_MODE64 = 145 X86_GRP_RTM = 146 X86_GRP_SHA = 147 X86_GRP_SSE1 = 148 X86_GRP_SSE2 = 149 X86_GRP_SSE3 = 150 X86_GRP_SSE41 = 151 X86_GRP_SSE42 = 152 X86_GRP_SSE4A = 153 X86_GRP_SSSE3 = 154 X86_GRP_PCLMUL = 155 X86_GRP_XOP = 156 X86_GRP_CDI = 157 X86_GRP_ERI = 158 X86_GRP_TBM = 159 X86_GRP_16BITMODE = 160 X86_GRP_NOT64BITMODE = 161 X86_GRP_SGX = 162 X86_GRP_DQI = 163 X86_GRP_BWI = 164 X86_GRP_PFI = 165 X86_GRP_VLX = 166 X86_GRP_SMAP = 167 X86_GRP_NOVLX = 168 X86_GRP_FPU = 169 X86_GRP_ENDING = 170
21.962312
70
0.814667
8,188
43,705
3.842819
0.418051
0.290799
0.00839
0.002161
0.00089
0.00089
0
0
0
0
0
0.290392
0.136277
43,705
1,989
71
21.973353
0.54314
0.001556
0
0
1
0
0
0
0
0
0.0011
0
0
1
0
false
0
0
0
0
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
a1e78a56fa6aa6ef2c6170fad57b77f5ea9d8689
66
py
Python
Tensor.py
robbierobinette/rcv-tensorflow
984852902f465bb6f61ba863e4b76092249911d0
[ "MIT" ]
null
null
null
Tensor.py
robbierobinette/rcv-tensorflow
984852902f465bb6f61ba863e4b76092249911d0
[ "MIT" ]
null
null
null
Tensor.py
robbierobinette/rcv-tensorflow
984852902f465bb6f61ba863e4b76092249911d0
[ "MIT" ]
null
null
null
import tensorflow as tf Tensor = tf.types.experimental.TensorLike
22
41
0.833333
9
66
6.111111
0.888889
0
0
0
0
0
0
0
0
0
0
0
0.106061
66
2
42
33
0.932203
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
a1eab458ad0c6e5268522cdacc0dd3d8014517ef
319
py
Python
spec/construct/test_zlib_surrounded.py
generalmimon/kaitai_struct_tests
d6baf92e1e47404fcb904c698d627450ebe9b314
[ "MIT" ]
null
null
null
spec/construct/test_zlib_surrounded.py
generalmimon/kaitai_struct_tests
d6baf92e1e47404fcb904c698d627450ebe9b314
[ "MIT" ]
null
null
null
spec/construct/test_zlib_surrounded.py
generalmimon/kaitai_struct_tests
d6baf92e1e47404fcb904c698d627450ebe9b314
[ "MIT" ]
null
null
null
# Autogenerated from KST: please remove this line if doing any edits by hand! import unittest from zlib_surrounded import _schema class TestZlibSurrounded(unittest.TestCase): def test_zlib_surrounded(self): r = _schema.parse_file('src/zlib_surrounded.bin') self.assertEqual(r.zlib.inflated, -1)
26.583333
77
0.755486
43
319
5.44186
0.744186
0.179487
0
0
0
0
0
0
0
0
0
0.003759
0.166144
319
11
78
29
0.87594
0.23511
0
0
1
0
0.095041
0.095041
0
0
0
0
0.166667
1
0.166667
false
0
0.333333
0
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
3
a1fc1fd7c54c70c42b70a8ca154892bcd2ec8bdc
99
py
Python
tests/test_find_forks/__init__.py
ivan2kh/find_forks
409251282a85da48445afc03c5a1797df393ca95
[ "MIT" ]
41
2015-05-15T14:37:42.000Z
2022-02-05T01:52:00.000Z
tests/test_find_forks/__init__.py
ivan2kh/find_forks
409251282a85da48445afc03c5a1797df393ca95
[ "MIT" ]
12
2015-05-15T22:10:36.000Z
2021-12-05T14:21:58.000Z
tests/test_find_forks/__init__.py
ivan2kh/find_forks
409251282a85da48445afc03c5a1797df393ca95
[ "MIT" ]
16
2015-05-15T14:44:33.000Z
2020-11-18T00:54:18.000Z
# coding: utf-8 """Dummy.""" from os import path BASEPATH = path.abspath(path.dirname(__file__))
14.142857
47
0.69697
14
99
4.642857
0.857143
0
0
0
0
0
0
0
0
0
0
0.011628
0.131313
99
6
48
16.5
0.744186
0.212121
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
a1fe67272a9d8d60a3dd0a101ed388dbc262f480
171
py
Python
yatsm/algorithms/__init__.py
bullocke/yatsm_nrt
b0ded56032bf9f9dcdf6b7b749f6554ade56de1e
[ "MIT" ]
2
2018-04-25T02:10:30.000Z
2021-07-30T03:57:49.000Z
yatsm/algorithms/__init__.py
bullocke/yatsm_nrt
b0ded56032bf9f9dcdf6b7b749f6554ade56de1e
[ "MIT" ]
null
null
null
yatsm/algorithms/__init__.py
bullocke/yatsm_nrt
b0ded56032bf9f9dcdf6b7b749f6554ade56de1e
[ "MIT" ]
1
2017-04-01T16:11:52.000Z
2017-04-01T16:11:52.000Z
""" Submodule for YATSM algorithms Algorithms currently include: - :py:class:`ccdc.CCDCesque` """ from .ccdc import CCDCesque # noqa available = ['CCDCesque'] #:
17.1
35
0.690058
18
171
6.555556
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.175439
171
9
36
19
0.836879
0.590643
0
0
0
0
0.15
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
b8062423f11b39f515f2542a845f269ad75bd7c2
99
py
Python
gentelaadmin/apps.py
xuhairmeer/school-management
36394c841a61e46bc00e1dc21bcfcdd5fa6f6918
[ "bzip2-1.0.6" ]
null
null
null
gentelaadmin/apps.py
xuhairmeer/school-management
36394c841a61e46bc00e1dc21bcfcdd5fa6f6918
[ "bzip2-1.0.6" ]
9
2021-03-19T08:15:07.000Z
2022-03-12T00:13:19.000Z
gentelaadmin/apps.py
muhammadzuhair95/school-management
36394c841a61e46bc00e1dc21bcfcdd5fa6f6918
[ "bzip2-1.0.6" ]
null
null
null
from django.apps import AppConfig class GentelaadminConfig(AppConfig): name = 'gentelaadmin'
16.5
36
0.777778
10
99
7.7
0.9
0
0
0
0
0
0
0
0
0
0
0
0.151515
99
5
37
19.8
0.916667
0
0
0
0
0
0.121212
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
b809b4a12bddd7da35b7380d74eb18575ad6ea9f
14,479
py
Python
res/res/pub/database/models.py
onap/vfc-gvnfm-vnfres
2ff32469650ac5b6dc6b65d99cc27f3f7aab4161
[ "Apache-2.0" ]
1
2021-10-15T15:26:31.000Z
2021-10-15T15:26:31.000Z
res/res/pub/database/models.py
onap/vfc-gvnfm-vnfres
2ff32469650ac5b6dc6b65d99cc27f3f7aab4161
[ "Apache-2.0" ]
null
null
null
res/res/pub/database/models.py
onap/vfc-gvnfm-vnfres
2ff32469650ac5b6dc6b65d99cc27f3f7aab4161
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 ZTE Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from django.db import models class NfInstModel(models.Model): class Meta: db_table = 'NFINST' nfinstid = models.CharField(db_column='NFINSTID', max_length=200, primary_key=True) nf_name = models.CharField(db_column='NFNAME', max_length=100, blank=True, null=True) # CreateVnfRequest.vnfInstanceName package_id = models.CharField(db_column='PACKAGEID', max_length=200, blank=True, null=True) status = models.CharField(db_column='STATUS', max_length=20, blank=True, null=True) flavour_id = models.CharField(db_column='FLAVOURID', max_length=200, blank=True, null=True) # InstantiateVnfRequest.flavourId location = models.CharField(db_column='LOCATION', max_length=200, blank=True, null=True) version = models.CharField(db_column='VERSION', max_length=255, null=True) vendor = models.CharField(db_column='VENDOR', max_length=255, null=True, blank=True) netype = models.CharField(db_column='NETYPE', max_length=255, null=True) vnfd_model = models.TextField(db_column='VNFDMODEL', max_length=20000, blank=True, null=True) input_params = models.TextField(db_column='INPUTPARAMS', max_length=2000, blank=True, null=True) # InstantiateVnfRequest.additionalParams create_time = models.CharField(db_column='CREATETIME', max_length=200, null=True, blank=True) lastuptime = models.CharField(db_column='LASTUPTIME', max_length=200, blank=True, null=True) nf_desc = models.CharField(db_column='VNFINSTANCEDESC', max_length=200, blank=True, null=True) vnfdid = models.CharField(db_column='VNFDID', max_length=200, blank=True, null=True) vnfSoftwareVersion = models.CharField(db_column='VNFSOFTWAREVER', max_length=200, blank=True, null=True) vnfConfigurableProperties = models.TextField(db_column='VNFCONFIGURABLEPROPERTIES', max_length=20000, blank=True, null=True) localizationLanguage = models.CharField(db_column='LOCALIZATIONLANGUAGE', max_length=255, null=True) class CPInstModel(models.Model): class Meta: db_table = 'CPINST' cpinstanceid = models.CharField(db_column='CPINSTANCEID', max_length=255, primary_key=True) cpdid = models.CharField(db_column='CPDID', max_length=255) cpinstancename = models.CharField(db_column='CPINSTANCENAME', max_length=255) vlinstanceid = models.CharField(db_column='VLINSTANCEID', max_length=255) ownertype = models.IntegerField(db_column='OWNERTYPE') ownerid = models.CharField(db_column='OWNERID', max_length=255) relatedtype = models.IntegerField(db_column='RELATEDTYPE') relatedvl = models.CharField(db_column='RELATEDVL', max_length=255, blank=True, null=True) relatedcp = models.CharField(db_column='RELATEDCP', max_length=255, blank=True, null=True) relatedport = models.CharField(db_column='RELATEDPORT', max_length=255, blank=True, null=True) class StorageInstModel(models.Model): class Meta: db_table = 'STORAGEINST' storageid = models.CharField(db_column='STORAGEID', primary_key=True, max_length=255) vimid = models.CharField(db_column='VIMID', max_length=255) resouceid = models.CharField(db_column='RESOURCEID', max_length=255) insttype = models.IntegerField(db_column='INSTTYPE') instid = models.CharField(db_column='INSTID', max_length=255) name = models.CharField(db_column='NAME', max_length=255, null=True) storagetype = models.CharField(db_column='STORAGETYPE', max_length=255) size = models.CharField(db_column='SIZE', max_length=255) # rdmaenabled = models.IntegerField(db_column='RDMAENABLED', null=True) # disktype = models.CharField(db_column='DISKTYPE', max_length=255) # ownerid = models.CharField(db_column='OWNERID', max_length=255, null=True) # zoneid = models.CharField(db_column='ZONEID', max_length=255, null=True) # hostid = models.CharField(db_column='HOSTID', max_length=255, null=True) # operationalstate = models.CharField(db_column='OPERATIONALSTATE', max_length=255, null=True) tenant = models.CharField(db_column='TENANT', max_length=50, null=True) is_predefined = models.IntegerField(db_column='ISPREDEFINED', default=0, null=True) create_time = models.CharField(db_column='CREATETIME', max_length=200, null=True, blank=True) nodeId = models.CharField(db_column='NODEID', max_length=255, null=True) class NetworkInstModel(models.Model): class Meta: db_table = 'NETWORKINST' networkid = models.CharField(db_column='NETWORKID', primary_key=True, max_length=255) vimid = models.CharField(db_column='VIMID', max_length=255) resouceid = models.CharField(db_column='RESOURCEID', max_length=255) insttype = models.IntegerField(db_column='INSTTYPE') instid = models.CharField(db_column='INSTID', max_length=255) name = models.CharField(db_column='NAME', max_length=255) tenant = models.CharField(db_column='TENANT', max_length=255, null=True) is_predefined = models.IntegerField(db_column='ISPREDEFINED', default=0, null=True) desc = models.CharField(db_column='DESC', max_length=255, null=True) vendor = models.CharField(db_column='VENDOR', max_length=255, null=True) bandwidth = models.IntegerField(db_column='BANDWIDTH', null=True) mtu = models.IntegerField(db_column='MTU', null=True) network_type = models.CharField(db_column='NETWORKTYPE', max_length=255, null=True) segmentid = models.CharField(db_column='SEGMENTID', max_length=255, null=True) networkqos = models.CharField(db_column='NETWORKQOS', max_length=255, null=True) create_time = models.CharField(db_column='CREATETIME', max_length=200, null=True, blank=True) physicalNetwork = models.CharField(db_column='PHYNETWORK', max_length=255, null=True) is_shared = models.IntegerField(db_column='ISSHARED', default=0, null=True) vlantrans = models.IntegerField(db_column='VLANTRANS', null=True) routerExternal = models.IntegerField(db_column='ROUTEREXTERNAL', default=0, null=True) nodeId = models.CharField(db_column='NODEID', max_length=255, null=True) class SubNetworkInstModel(models.Model): class Meta: db_table = 'SUBNETWORKINST' subnetworkid = models.CharField(db_column='SUBNETWORKID', primary_key=True, max_length=255) vimid = models.CharField(db_column='VIMID', max_length=255) resouceid = models.CharField(db_column='RESOURCEID', max_length=255) networkid = models.CharField(db_column='NETWORKID', max_length=255) insttype = models.IntegerField(db_column='INSTTYPE') instid = models.CharField(db_column='INSTID', max_length=255) name = models.CharField(db_column='NAME', max_length=255) ipversion = models.IntegerField(db_column='IPVERSION', null=True) gatewayip = models.CharField(db_column='GATEWAYIP', max_length=255, null=True) isdhcpenabled = models.IntegerField(db_column='ISDHCPENABLED', null=True) cidr = models.CharField(db_column='CIDR', max_length=255) vdsname = models.CharField(db_column='VDSNAME', max_length=255, null=True) operationalstate = models.CharField(db_column='OPERATIONALSTATE', max_length=255, null=True) tenant = models.CharField(db_column='TENANT', max_length=255, null=True) is_predefined = models.IntegerField(db_column='ISPREDEFINED', default=0, null=True) create_time = models.CharField(db_column='CREATETIME', max_length=200, null=True, blank=True) dnsNameservers = models.TextField(db_column='DNSNAMESERVERS', max_length=1024) hostRoutes = models.TextField(db_column='HOSTROUTES', max_length=1024) allocationPools = models.TextField(db_column='ALLOCATIONPOOLS', max_length=1024) class PortInstModel(models.Model): class Meta: db_table = 'PORTINST' portid = models.CharField(db_column='PORTID', primary_key=True, max_length=255) networkid = models.CharField(db_column='NETWORKID', max_length=255) subnetworkid = models.CharField(db_column='SUBNETWORKID', max_length=255, null=True) vimid = models.CharField(db_column='VIMID', max_length=255) resouceid = models.CharField(db_column='RESOURCEID', max_length=255) name = models.CharField(db_column='NAME', max_length=255, null=True) insttype = models.IntegerField(db_column='INSTTYPE') instid = models.CharField(db_column='INSTID', max_length=255) cpinstanceid = models.CharField(db_column='CPINSTANCEID', max_length=255, null=True) bandwidth = models.CharField(db_column='BANDWIDTH', max_length=255, null=True) operationalstate = models.CharField(db_column='OPERATIONALSTATE', max_length=255, null=True) ipaddress = models.CharField(db_column='IPADDRESS', max_length=255) macaddress = models.CharField(db_column='MACADDRESS', max_length=255) nicorder = models.CharField(db_column='NICORDER', max_length=255) floatipaddress = models.CharField(db_column='FLOATIPADDRESS', max_length=255, null=True) serviceipaddress = models.CharField(db_column='SERVICEIPADDRESS', max_length=255, null=True) typevirtualnic = models.CharField(db_column='TYPEVIRTUALNIC', max_length=255, null=True) sfcencapsulation = models.CharField(db_column='SFCENCAPSULATION', max_length=255, null=True) direction = models.CharField(db_column='DIRECTION', max_length=255, null=True) tenant = models.CharField(db_column='TENANT', max_length=255, null=True) interfacename = models.CharField(db_column='INTERFACENAME', max_length=255, blank=True, null=True) vmid = models.CharField(db_column='VMID', max_length=255, blank=True, null=True) create_time = models.CharField(db_column='CREATETIME', max_length=200, null=True, blank=True) securityGroups = models.CharField(db_column='SECURITYGROUPS', max_length=255) is_predefined = models.IntegerField(db_column='ISPREDEFINED', default=0, null=True) nodeId = models.CharField(db_column='NODEID', max_length=255, null=True) class VmInstModel(models.Model): class Meta: db_table = 'VMINST' vmid = models.CharField(db_column='VMID', primary_key=True, max_length=255) vimid = models.CharField(db_column='VIMID', max_length=255) tenant = models.CharField(db_column='TENANT', max_length=255, null=True) resouceid = models.CharField(db_column='RESOURCEID', max_length=255) vmname = models.CharField(db_column='VMNAME', max_length=255) nic_array = models.CharField(db_column='NICARRAY', max_length=255) metadata = models.CharField(db_column='METADATA', max_length=255) volume_array = models.CharField(db_column='VOLUMEARRAY', max_length=255) server_group = models.CharField(db_column='SERVERGROUP', max_length=255) availability_zone = models.CharField(db_column='AVAILABILITYZONE', max_length=255) flavor_id = models.CharField(db_column='FLAVORID', max_length=255) security_groups = models.CharField(db_column='SECURITYGROUPS', max_length=255) operationalstate = models.CharField(db_column='OPERATIONALSTATE', max_length=255, null=True) insttype = models.IntegerField(db_column='INSTTYPE') is_predefined = models.IntegerField(db_column='ISPREDEFINED', default=0, null=True) create_time = models.CharField(db_column='CREATETIME', max_length=200, null=True, blank=True) instid = models.CharField(db_column='INSTID', max_length=255) nodeId = models.CharField(db_column='NODEID', max_length=255, null=True) class VLInstModel(models.Model): class Meta: db_table = 'VLINST' vlinstanceid = models.CharField(db_column='VLINSTANCEID', max_length=255, primary_key=True) vldid = models.CharField(db_column='VLDID', max_length=255) vlinstancename = models.CharField(db_column='VLINSTANCENAME', max_length=255, blank=True, null=True) ownertype = models.IntegerField(db_column='OWNERTYPE') ownerid = models.CharField(db_column='OWNERID', max_length=255) relatednetworkid = models.CharField(db_column='RELATEDNETWORKID', max_length=255, blank=True, null=True) relatedsubnetworkid = models.CharField(db_column='RELATEDSUBNETWORKID', max_length=255, blank=True, null=True) vltype = models.IntegerField(db_column='VLTYPE', default=0) vimid = models.CharField(db_column='VIMID', max_length=255) tenant = models.CharField(db_column='TENANT', max_length=50) class VNFCInstModel(models.Model): class Meta: db_table = 'VNFCINST' vnfcinstanceid = models.CharField(db_column='VNFCINSTANCEID', max_length=255, primary_key=True) vduid = models.CharField(db_column='VDUID', max_length=255) vdutype = models.CharField(db_column='VDUTYPE', max_length=255) instid = models.CharField(db_column='NFINSTID', max_length=255) vmid = models.CharField(db_column='VMID', max_length=255) is_predefined = models.IntegerField(db_column='ISPREDEFINED', default=0, null=True) class FlavourInstModel(models.Model): class Meta: db_table = 'FLAVOURINST' flavourid = models.CharField(db_column='FLAVOURID', max_length=255, primary_key=True) vimid = models.CharField(db_column='VIMID', max_length=255) resouceid = models.CharField(db_column='RESOURCEID', max_length=255) name = models.CharField(db_column='NAME', max_length=255) tenant = models.CharField(db_column='TENANT', max_length=255, null=True) vcpu = models.IntegerField(db_column='VCPU', null=True) memory = models.IntegerField(db_column='MEMORY', null=True) disk = models.IntegerField(db_column='DISK', null=True) ephemeral = models.IntegerField(db_column='EPHEMERAL', null=True) swap = models.IntegerField(db_column='SWAP', null=True) isPublic = models.IntegerField(db_column='ISPUBLIC', null=True) extraspecs = models.TextField(db_column='EXTRASPECS', max_length=4096) instid = models.CharField(db_column='INSTID', max_length=255) create_time = models.CharField(db_column='CREATETIME', max_length=200, null=True, blank=True) is_predefined = models.IntegerField(db_column='ISPREDEFINED', default=0, null=True) def __unicode__(self): return '%s' % self.name
60.078838
142
0.754541
1,865
14,479
5.673458
0.131367
0.121728
0.199225
0.26954
0.575749
0.53133
0.478027
0.414895
0.406767
0.358473
0
0.032775
0.121279
14,479
240
143
60.329167
0.798868
0.076732
0
0.37766
0
0
0.111727
0.001873
0
0
0
0
0
1
0.005319
false
0
0.005319
0.005319
0.946809
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
3
62adceeecfdd77a88bff6b8d206582291a0569cc
8,407
py
Python
branches/old/python/ansi-C-generator/build_executables_a4d.py
jeffhammond/spaghetty
e2dbe2dd2621110b899b21dff590906a579e8bf5
[ "BSD-2-Clause" ]
1
2018-01-05T16:13:08.000Z
2018-01-05T16:13:08.000Z
branches/old/python/ansi-C-generator/build_executables_a4d.py
jeffhammond/spaghetty
e2dbe2dd2621110b899b21dff590906a579e8bf5
[ "BSD-2-Clause" ]
null
null
null
branches/old/python/ansi-C-generator/build_executables_a4d.py
jeffhammond/spaghetty
e2dbe2dd2621110b899b21dff590906a579e8bf5
[ "BSD-2-Clause" ]
null
null
null
import fileinput import string import sys import os c_compiler = 'icc' c_link_flags = '-g -O1 -xT -march=core2 -mtune=core2 -align -strict-ansi' c_opt_flags = '-g -O3 -xT -march=core2 -mtune=core2 -funroll-loops -align -strict-ansi' #fortran_compiler = 'ifort' #fortran_link_flags = '-g -O1 -xT -march=core2 -mtune=core2 -align ' #fortran_opt_flags = '-g -O3 -xT -march=core2 -mtune=core2 -funroll-loops -align ' src_dir = '/home/jeff/code/spaghetty/trunk/source/ansi-C/' exe_dir = '/home/jeff/code/spaghetty/trunk/binary/ansi-C/' modlabel = 'a4d' lib_name = 'tce_sort_'+modlabel+'.a' count = '20' rank = '8' ranks = [rank,rank,rank,rank] size = int(ranks[0])*int(ranks[1])*int(ranks[2])*int(ranks[3]) sizechar = str(size) cind = ' ' ctab = ' ' def perm(l): sz = len(l) if sz <= 1: return [l] return [p[:i]+[l[0]]+p[i:] for i in xrange(sz) for p in perm(l[1:])] indices = ['1','2','3','4'] #indices = ['4','3','2','1'] transpose_list = [indices] #transpose_list = perm(indices) loop_list = [indices] #loop_list = perm(indices) for transpose_order in transpose_list: dummy = 0 A = transpose_order[0] B = transpose_order[1] C = transpose_order[2] D = transpose_order[3] driver_name = 'trans_a4d_'+A+B+C+D+'_'+modlabel print driver_name source_name = driver_name+'_driver.c' source_file = open(source_name,'w') source_file.write(cind+'#include <stdio.h>\n') source_file.write(cind+'#include <stdlib.h>\n') source_file.write(cind+'#include <math.h>\n') source_file.write(cind+'#include <time.h>\n\n') #source_file.write(cind+'#define MIN(X,Y) ((X) < (Y) ? : (X) : (Y))\n\n') #source_file.write(cind+'void main(){\n\n') source_file.write(cind+'int main(int argc, char **argv){\n\n') source_file.write(cind+'double before['+ranks[0]+']['+ranks[0]+']['+ranks[0]+']['+ranks[0]+'];\n') source_file.write(cind+'double after_jeff['+ranks[0]+']['+ranks[0]+']['+ranks[0]+']['+ranks[0]+'];\n') source_file.write(cind+'double after_hirata['+ranks[0]+']['+ranks[0]+']['+ranks[0]+']['+ranks[0]+'];\n') source_file.write(cind+'double factor;\n') source_file.write(cind+'clock_t Tstart,Tfinish;\n') source_file.write(cind+'double Thirata,Tjeff,Tspeedup,Tbest;\n') source_file.write(cind+'unsigned int i,j,k,l;\n') source_file.write(cind+'unsigned int aSize[4];\n') source_file.write(cind+'unsigned int perm[4];\n') source_file.write(cind+'unsigned int fastest[4];\n\n') source_file.write(cind+'aSize[0] = '+ranks[0]+';\n') source_file.write(cind+'aSize[1] = '+ranks[1]+';\n') source_file.write(cind+'aSize[2] = '+ranks[2]+';\n') source_file.write(cind+'aSize[3] = '+ranks[3]+';\n\n') source_file.write(cind+'perm[0] = '+A+';\n') source_file.write(cind+'perm[1] = '+B+';\n') source_file.write(cind+'perm[2] = '+C+';\n') source_file.write(cind+'perm[3] = '+D+';\n\n') source_file.write(cind+0*ctab+'for( i=0; i<'+ranks[0]+'; i++) {\n') source_file.write(cind+1*ctab+'for( j=0; j<'+ranks[1]+'; j++) {\n') source_file.write(cind+2*ctab+'for( k=0; k<'+ranks[2]+'; k++) {\n') source_file.write(cind+3*ctab+'for( l=0; l<'+ranks[3]+'; l++) {\n') source_file.write(cind+4*ctab+'before[i][j][k][l] = (double)(l + k*10 + j*100 + i*1000);\n') source_file.write(cind+3*ctab+'}\n') source_file.write(cind+2*ctab+'}\n') source_file.write(cind+1*ctab+'}\n') source_file.write(cind+0*ctab+'}\n\n') source_file.write(cind+0*ctab+'for( i=0; i<'+ranks[0]+'; i++) {\n') source_file.write(cind+1*ctab+'for( j=0; j<'+ranks[1]+'; j++) {\n') source_file.write(cind+2*ctab+'for( k=0; k<'+ranks[2]+'; k++) {\n') source_file.write(cind+3*ctab+'for( l=0; l<'+ranks[3]+'; l++) {\n') source_file.write(cind+4*ctab+'printf("before[i][j][k][l] = %f\\n",before[i][j][k][l]);\n') source_file.write(cind+3*ctab+'}\n') source_file.write(cind+2*ctab+'}\n') source_file.write(cind+1*ctab+'}\n') source_file.write(cind+0*ctab+'}\n\n') source_file.write(cind+'factor = 1.0;\n') source_file.write(cind+'Tbest=999999.0;\n') source_file.write(cind+'Tstart=clock();\n\n') source_file.write(cind+'for( i=0; i<'+count+'; i++) {\n') #source_file.write(cind+' CALL tce_sort_4(before, after_hirata,\n') #source_file.write(cind+' aSize(1), aSize(2), aSize(3), aSize(4),\n') #source_file.write(cind+' perm(1), perm(2), perm(3), perm(4), factor)\n') source_file.write(cind+'}\n\n') source_file.write(cind+'Tfinish=clock();\n') source_file.write(cind+'Thirata=(double)(Tfinish-Tstart);\n\n') source_file.write(cind+'printf("TESTING TRANPOSE TYPE '+A+B+C+D+'\\n");\n') source_file.write(cind+'printf("===================\\n");\n') source_file.write(cind+'printf("The compilation flags were:\\n");\n') for option in range(0,len(c_opt_flags.split())): source_file.write(cind+'printf("'+c_opt_flags.split()[option]+'\\n");\n') source_file.write(cind+'printf("===================\\n");\n\n') source_file.write(cind+'printf("Hirata Reference = %f seconds\\n",Thirata);\n') source_file.write(cind+'printf("Algorithm Jeff Speedup Best Best Speedup\\n");\n') for loop_order in loop_list: dummy = dummy+1 a = loop_order[0] b = loop_order[1] c = loop_order[2] d = loop_order[3] subroutine_name = 'trans_a4d_'+A+B+C+D+'_loop_'+a+b+c+d+'_' source_file.write(cind+'Tstart=clock();\n\n') #source_file.write(cind+'printf("*** START TIMING THE SUBROUTINE ***\\n");\n') source_file.write(cind+'for( i=0; i<'+count+'; i++) {\n') source_file.write(cind+1*ctab+subroutine_name+'(before, after_jeff,\n') source_file.write(cind+7*ctab+'aSize[1], aSize[1], aSize[2], aSize[3],\n') source_file.write(cind+7*ctab+'&factor);\n') source_file.write(cind+'}\n\n') #source_file.write(cind+'printf("*** FINISHED TIMING THE SUBROUTINE ***\\n");\n') source_file.write(cind+'Tfinish=clock();\n') source_file.write(cind+'Tjeff=(double)(Tfinish-Tstart);\n') source_file.write(cind+'Tspeedup=Thirata/Tjeff;\n\n') #source_file.write(cind+'Tbest=MIN(Tjeff,Tbest);\n') source_file.write(cind+'if(Tjeff == Tbest){ \n') source_file.write(cind+' fastest[0]='+a+';\n') source_file.write(cind+' fastest[1]='+b+';\n') source_file.write(cind+' fastest[2]='+c+';\n') source_file.write(cind+' fastest[3]='+d+';\n') source_file.write(cind+'}\n\n') if 0 < dummy < 10: nice_dummy=cind+''+str(dummy) if 9 < dummy < 100: nice_dummy=' '+str(dummy) if 99 < dummy < 999: nice_dummy=''+str(dummy) source_file.write(cind+'printf("'+nice_dummy+' Loop '+a+b+c+d+' %f %f %f %f\\n",Tjeff,Tspeedup,Tbest,Thirata/Tbest);\n\n') ###source_file.write(cind+0*ctab+'for( i=0; i<'+ranks[0]+'; i++) {\n') ###source_file.write(cind+1*ctab+'for( j=0; j<'+ranks[1]+'; j++) {\n') ###source_file.write(cind+2*ctab+'for( k=0; k<'+ranks[2]+'; k++) {\n') ###source_file.write(cind+3*ctab+'for( l=0; l<'+ranks[3]+'; l++) {\n') ###source_file.write(cind+4*ctab+'if (after_jeff[i][j][k][l] != after_hirata[i][j][k][l]) {\n') ###source_file.write(cind+5*ctab+'printf("jeff error %d %d %d %d %f %f\\n",i,j,k,l,after_jeff[i][j][k][l], after_hirata[i][j][k][l]);\n') ###source_file.write(cind+4*ctab+'}\n') ###source_file.write(cind+3*ctab+'}\n') ###source_file.write(cind+2*ctab+'}\n') ###source_file.write(cind+1*ctab+'}\n') ###source_file.write(cind+0*ctab+'}\n\n') source_file.write(cind+'printf("The best loop order is: %d%d%d%d\\n",fastest[0],fastest[1],fastest[2],fastest[3]);\n') source_file.write(cind+'printf("The best time is: %f\\n",Tbest);\n') source_file.write(cind+'printf("The best speedup is: %f\\n",Thirata/Tbest);\n\n') source_file.write(cind+'return 0;\n\n') source_file.write(cind+'}\n') source_file.close() print c_compiler+' '+c_link_flags+' '+' '+source_name+' '+lib_name+' '+' -o '+exe_dir+driver_name+'.x' os.system(c_compiler+' '+c_link_flags+' '+' '+source_name+' '+lib_name+' '+' -o '+exe_dir+driver_name+'.x') os.system('mv '+source_name+' '+src_dir)
49.163743
145
0.59843
1,367
8,407
3.549378
0.114119
0.199918
0.293693
0.372012
0.692498
0.663232
0.564303
0.448681
0.396538
0.370981
0
0.025479
0.15499
8,407
170
146
49.452941
0.657517
0.177709
0
0.207692
0
0.038462
0.310706
0.07327
0
0
0
0
0
0
null
null
0
0.030769
null
null
0.107692
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
1
0
0
0
0
0
0
0
0
3
62b112bfb912a435311d45858a5ef39209bd771c
100
py
Python
countdigit.py
Hrushabhs/My-Pycode
c27549b89a7848827117e42d324d383732adfac5
[ "Apache-2.0" ]
null
null
null
countdigit.py
Hrushabhs/My-Pycode
c27549b89a7848827117e42d324d383732adfac5
[ "Apache-2.0" ]
null
null
null
countdigit.py
Hrushabhs/My-Pycode
c27549b89a7848827117e42d324d383732adfac5
[ "Apache-2.0" ]
null
null
null
n=int(input("Enetr number: ")) count=0 while(n>0): dig=n%10 count+=1 n=n/10 print count
12.5
30
0.59
20
100
2.95
0.6
0.101695
0
0
0
0
0
0
0
0
0
0.089744
0.22
100
7
31
14.285714
0.666667
0
0
0
0
0
0.14
0
0
0
0
0
0
0
null
null
0
0
null
null
0.142857
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
0
0
0
0
0
3
62da902e73beced86891224544cc228868991ddd
315
py
Python
src/restfx/util/md5.py
hyjiacan/restfx
8ba70bc099e6ace0c9b3afe8909ea61a5ff82dec
[ "MIT", "BSD-3-Clause" ]
5
2021-01-25T11:09:41.000Z
2021-04-28T07:17:21.000Z
src/restfx/util/md5.py
mgbin088/restfx
86a499a9a4396829e2c40428feb8b2ee13406d52
[ "MIT", "BSD-3-Clause" ]
null
null
null
src/restfx/util/md5.py
mgbin088/restfx
86a499a9a4396829e2c40428feb8b2ee13406d52
[ "MIT", "BSD-3-Clause" ]
1
2021-01-28T00:53:37.000Z
2021-01-28T00:53:37.000Z
import hashlib def hash_bytes(s: (str, bytes)) -> bytes: if isinstance(s, str): s = s.encode(encoding='utf8') return hashlib.md5(s).digest() def hash_str(s: (str, bytes)) -> str: if isinstance(s, str): s = s.encode(encoding='utf8') return hashlib.md5(s).hexdigest()
22.5
42
0.584127
44
315
4.136364
0.363636
0.087912
0.098901
0.175824
0.582418
0.582418
0.582418
0.582418
0.582418
0.582418
0
0.016949
0.250794
315
13
43
24.230769
0.754237
0
0
0.444444
0
0
0.02649
0
0
0
0
0
0
1
0.222222
false
0
0.111111
0
0.555556
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
3
62ff9078ea75c4139cf4fc59de6c0cad0c865a2d
714
py
Python
python/403.py
kylekanos/project-euler-1
af7089356a4cea90f8ef331cfdc65e696def6140
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
python/403.py
kylekanos/project-euler-1
af7089356a4cea90f8ef331cfdc65e696def6140
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
python/403.py
kylekanos/project-euler-1
af7089356a4cea90f8ef331cfdc65e696def6140
[ "BSD-2-Clause-FreeBSD" ]
1
2019-09-17T00:55:58.000Z
2019-09-17T00:55:58.000Z
#!/usr/bin/env python N=10**12 R=int(N**.5) mod = 10**8 def s(r,h): return (h**3 + 3*h*r**2 + r**3 + (3*h**2 + 5)*r + 5*h + 6)//6%mod def f(r,ph,qh): return (-4*(ph - qh - 1)*r**3 - ph**4 + 2*ph**3 - 11*ph**2 + \ qh**4 - 6*(ph**2 - qh**2 - ph - qh)*r**2 + 2*qh**3 - 2*(2*ph**3 - 3*ph**2 - \ 2*qh**3 - 3*qh**2 + 11*ph - 11*qh - 10)*r + 11*qh**2 - 14*ph + 34*qh + 24)//24 % mod total = (f(0,1,N) + f(-1,0,N-1))%mod for r in xrange(1,R): total = (total + f(r,r+1,N//r))%mod for r in xrange(-R,-1): total = (total + f(r, -r+1, N//abs(r)))%mod total = (total + s(r,-r)%mod)%mod total = 2*total%mod for r in xrange(0,R+1): total = (total + s(r,r)%mod)%mod print total
28.56
96
0.462185
169
714
1.952663
0.207101
0.024242
0.063636
0.081818
0.342424
0.206061
0.206061
0
0
0
0
0.132597
0.239496
714
24
97
29.75
0.475138
0.028011
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0.052632
0
0
1
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
1
0
0
0
0
0
0
0
0
3
1a2694058b0cd5e5a084ac2d4c13b8e15e9cc4d1
2,062
py
Python
tests/test_single_file.py
alepuzio/listfiles
cddc329cf773016a4703946c338a6e16d81380f5
[ "MIT" ]
null
null
null
tests/test_single_file.py
alepuzio/listfiles
cddc329cf773016a4703946c338a6e16d81380f5
[ "MIT" ]
null
null
null
tests/test_single_file.py
alepuzio/listfiles
cddc329cf773016a4703946c338a6e16d81380f5
[ "MIT" ]
1
2021-06-13T12:44:31.000Z
2021-06-13T12:44:31.000Z
import os import unittest from os.path import splitext from list_files.physical_data import PhysicalData from list_files.physical_data import PhysicalDataFake from .test_filename import Filename class SingleFile: def __init__(self, new_physical_data): self.physical = new_physical_data self.filename = Filename(new_physical_data) def directory(self): """ @return the path of the file """ dirs = self.physical.path().split(os.sep) #print(">SingleFile.directory") value = str( os.sep.join(dirs[0:len(dirs) -1 ] ) ) #print("<SingleFile.directory") return value def dimension(self): """ @return the number of bytes of the file """ return self.physical.data().st_size def timestamp(self): """ @return the timestamp of the last modifiy or creation of the file """ return self.physical.data().st_atime def name(self): """ @return the name of the file """ return self.filename def __iter__(self): return iter(self.name) def __lt__(self, other): return len(self.filename) > len(other.filename) def __eq__(self, other): return self.name().name() == other.name().name() and self.dimension() == other.dimension() def __hash__(self): return hash(self.filename) def __str__(self): return "SingleFile:{0};{1}-{2}".format ( self.name().name(), self.name().extension(), str(self.dimension()) ) def __repr__(self): return "SingleFile:{0};{1}".format (self.physical, self.filename) def test_eq(): one = SingleFile ( PhysicalDataFake( "nome.txt", "C:\\path\\") ) two = SingleFile ( PhysicalDataFake( "nome.txt", "C:\\path\\") ) print (one) print (two) assert(one.name() == two.name()) def test_not_eq(): one = SingleFile ( PhysicalDataFake( "nome.txt", "C:\\path\\") ) two = SingleFile ( PhysicalDataFake( "nome1.txt", "C:\\path\\") ) assert(one != two)
27.493333
117
0.608632
249
2,062
4.863454
0.261044
0.066061
0.04294
0.037159
0.28654
0.234517
0.17341
0.17341
0.11891
0.11891
0
0.005171
0.249758
2,062
74
118
27.864865
0.777634
0.108632
0
0.047619
0
0
0.064868
0.012629
0
0
0
0
0.047619
1
0.309524
false
0
0.142857
0.142857
0.714286
0.047619
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
1a289619d08881edaf8f3c451d2b461d1329acc8
224
py
Python
pages/themes/beginners/unicodeTopics/examples/unicode_escapes_in_strings.py
ProgressBG-Python-Course/ProgressBG-VC2-Python
03b892a42ee1fad3d4f97e328e06a4b1573fd356
[ "MIT" ]
null
null
null
pages/themes/beginners/unicodeTopics/examples/unicode_escapes_in_strings.py
ProgressBG-Python-Course/ProgressBG-VC2-Python
03b892a42ee1fad3d4f97e328e06a4b1573fd356
[ "MIT" ]
null
null
null
pages/themes/beginners/unicodeTopics/examples/unicode_escapes_in_strings.py
ProgressBG-Python-Course/ProgressBG-VC2-Python
03b892a42ee1fad3d4f97e328e06a4b1573fd356
[ "MIT" ]
null
null
null
# Unicode symbol in string: print("Ѣ") # Using the character name: print("\N{Cyrillic Capital Letter Yat}") # Using a 16-bit hex value code point: print("\u0462") # Using a 32-bit hex value code point: print("\U00000462")
20.363636
40
0.705357
36
224
4.388889
0.694444
0.075949
0.139241
0.189873
0.316456
0.316456
0
0
0
0
0
0.084656
0.15625
224
11
41
20.363636
0.751323
0.558036
0
0
0
0
0.505263
0
0
0
0
0
0
1
0
true
0
0
0
0
1
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
3
a7e30c19b82191d01543661cf87f800e6cda8984
2,244
py
Python
tests/test_walk.py
asherf/flake8-os-walk
ba76c88783d3cb01bc25b497a2413ae2c8366790
[ "MIT" ]
1
2020-06-04T05:12:12.000Z
2020-06-04T05:12:12.000Z
tests/test_walk.py
asherf/flake8-os-walk
ba76c88783d3cb01bc25b497a2413ae2c8366790
[ "MIT" ]
null
null
null
tests/test_walk.py
asherf/flake8-os-walk
ba76c88783d3cb01bc25b497a2413ae2c8366790
[ "MIT" ]
null
null
null
from ast import parse from sys import version_info from textwrap import dedent from flake8_os_walk.checker import OsWalkVisitor def test_os_walk_func_bad_usage(): tree = parse( dedent( """\ import os def hello_jerry(): for dir in os.walk('this-is-bad'): print(dir) """ ) ) visitor = OsWalkVisitor() visitor.visit(tree) violations = visitor.violations assert len(violations) == 1 assert ( violations[0][1] == "OW100 usage of os.walk() without an onerror param detected" ) node = violations[0][0] assert node.lineno == 4 assert node.col_offset == 13 def test_os_walk_func_onerror_none(): tree = parse( dedent( """\ import os def hello_jerry(): for dir in os.walk('this-is-bad', onerror=None): print(dir) """ ) ) visitor = OsWalkVisitor() visitor.visit(tree) violations = visitor.violations assert len(violations) == 1 assert ( violations[0][1] == "OW100 usage of os.walk() without an onerror param detected" ) node = violations[0][0] assert node.lineno == 4 assert node.col_offset == 13 def test_os_walk_func(): tree = parse( dedent( """\ import os def _handle_error(error): raise Exception("no soup for you.") def hello_jerry(): for dir in os.walk('this-is-bad', onerror=_handle_error): print(dir) """ ) ) visitor = OsWalkVisitor() visitor.visit(tree) assert len(visitor.violations) == 0 def test_os_walk_method_bad_usage(): tree = parse( dedent( """\ import os class Festivus: def tinsel(self): for dir in os.walk('this-is-bad'): print(dir) """ ) ) visitor = OsWalkVisitor() visitor.visit(tree) violations = visitor.violations assert len(violations) == 1 assert ( violations[0][1] == "OW100 usage of os.walk() without an onerror param detected" ) node = violations[0][0] assert node.lineno == 5 assert node.col_offset == 19
21.786408
88
0.561497
262
2,244
4.69084
0.240458
0.058584
0.029292
0.042311
0.780309
0.766477
0.745321
0.677787
0.677787
0.677787
0
0.023256
0.329323
2,244
102
89
22
0.793355
0
0
0.614035
0
0
0.110196
0
0
0
0
0
0.22807
1
0.070175
false
0
0.070175
0
0.140351
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
a7e725954870b4ba9822c55d980736a0d2de89f2
36
py
Python
tests/__init__.py
mosquito/python-lsm
a46cf4b6c661a4944dd61470e76fb6442352e501
[ "Apache-2.0" ]
6
2021-06-09T09:35:37.000Z
2021-11-24T23:09:57.000Z
tests/__init__.py
mosquito/python-lsm
a46cf4b6c661a4944dd61470e76fb6442352e501
[ "Apache-2.0" ]
1
2021-11-15T15:52:10.000Z
2021-11-16T16:40:56.000Z
tests/__init__.py
mosquito/python-lsm
a46cf4b6c661a4944dd61470e76fb6442352e501
[ "Apache-2.0" ]
1
2021-07-25T21:30:22.000Z
2021-07-25T21:30:22.000Z
comp_algo = ["none", "lz4", "zstd"]
18
35
0.555556
5
36
3.8
1
0
0
0
0
0
0
0
0
0
0
0.032258
0.138889
36
1
36
36
0.580645
0
0
0
0
0
0.305556
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
a7ef665f1ec6c10f7fa4fbcb59e0f9eef71b4aff
646
py
Python
dalme_app/utils/__init__.py
DALME/dalme
46f9a0011fdb75c5098b552104fc73b1062e16e9
[ "BSD-3-Clause" ]
6
2019-05-07T01:06:04.000Z
2021-02-19T20:45:09.000Z
dalme_app/utils/__init__.py
DALME/dalme
46f9a0011fdb75c5098b552104fc73b1062e16e9
[ "BSD-3-Clause" ]
23
2018-09-14T18:01:42.000Z
2021-12-29T17:25:18.000Z
dalme_app/utils/__init__.py
DALME/dalme
46f9a0011fdb75c5098b552104fc73b1062e16e9
[ "BSD-3-Clause" ]
1
2020-02-10T16:20:57.000Z
2020-02-10T16:20:57.000Z
from .async_middleware import AsyncMiddleware # NOQA from .dalme_saml_processor import SAMLProcessor # NOQA from .database_router import ModelDatabaseRouter # NOQA from .date_time_helpers import FormatDalmeDate, round_timesince # NOQA from .domain_middleware import SubdomainRedirectMiddleware # NOQA from .dynamic_preferences import JSONPreferenceSerializer, JSONPreference # NOQA from .menu_compiler import DALMEMenus # NOQA from .messaging import send_message # NOQA from .offline_context_generator import offline_context_generator # NOQA from .paginated_formsets import formset_factory # NOQA from .search import Search, SearchContext # NOQA
53.833333
80
0.854489
75
646
7.133333
0.533333
0.149533
0.085981
0
0
0
0
0
0
0
0
0
0.106811
646
11
81
58.727273
0.92721
0.083591
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
3
a7f6da8a7e6cc5f49f760883f09f74d397fe571c
2,444
py
Python
Modules/text.py
DaMuffinDev/ezruh
7c57b8b77f01674c1f46c0adad661f234584e024
[ "MIT" ]
null
null
null
Modules/text.py
DaMuffinDev/ezruh
7c57b8b77f01674c1f46c0adad661f234584e024
[ "MIT" ]
null
null
null
Modules/text.py
DaMuffinDev/ezruh
7c57b8b77f01674c1f46c0adad661f234584e024
[ "MIT" ]
null
null
null
from Resources.required_modules import pymodules pymodules.install(pymodules.presets.modules("text")) from pyautogui import typewrite, press from keyboard import is_pressed from time import sleep as wait import random inf = -1 def enter(): press("enter") def spam_text_file_contents(text_file, delay, repeat_delay, repeat_amount=inf, hotkey="q"): """ :param text - The sentence or word to repeat :param delay - The delay before the word spamming happens :param repeat_delay - The delay between each loop call :param repeat_amount - The amount of times before the scripts (If inf it will stop when the for loop reaches the end of the file's contents) :param hotkey - The key to stop the script """ wait(delay) with open(text_file, "r") as file: for index, word in enumerate(file): if is_pressed(hotkey) or index >= repeat_amount: break typewrite(word) enter() wait(repeat_delay) def repeat_random_text_file_contents(text_file, delay, repeat_delay, repeat_amount=inf, hotkey="q"): """ :param text - The sentence or word to repeat :param delay - The delay before the word spamming happens :param repeat_delay - The delay between each loop call :param repeat_amount - The amount of times before the scripts (If inf it will stop when the for loop reaches the end of the file's contents) :param hotkey - The key to stop the script """ with open(text_file, "r") as file: file_words = [] for word in file: file_words.append(word) wait(delay) for index in range(0, repeat_amount, 1): if is_pressed(hotkey): break typewrite(random.choice(file_words)) enter() wait(repeat_delay) def repeat_sentence(text, delay, repeat_delay, repeat_amount=inf, hotkey="q"): """ :param text - The sentence or word to repeat :param delay - The delay before the word spamming happens :param repeat_delay - The delay between each loop call :param repeat_amount - The amount of times before the scripts (If inf it will stop when the for loop reaches the end of the file's contents) :param hotkey - The key to stop the script """ wait(delay) for index in range(0, repeat_amount, 1): if is_pressed(hotkey): break typewrite(text) enter() wait(repeat_delay)
35.941176
100
0.671031
354
2,444
4.525424
0.200565
0.061798
0.048689
0.041199
0.752185
0.752185
0.71598
0.687266
0.687266
0.687266
0
0.002746
0.25491
2,444
68
101
35.941176
0.876991
0.425532
0
0.416667
0
0
0.010778
0
0
0
0
0
0
1
0.111111
false
0
0.138889
0
0.25
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
c50d9d31149a7b960c17e4041c2ab4d64c738cff
1,332
py
Python
Algorithms_easy/0944. Delete Columns to Make Sorted.py
VinceW0/Leetcode_Python_solutions
09e9720afce21632372431606ebec4129eb79734
[ "Xnet", "X11" ]
4
2020-08-11T20:45:15.000Z
2021-03-12T00:33:34.000Z
Algorithms_easy/0944. Delete Columns to Make Sorted.py
VinceW0/Leetcode_Python_solutions
09e9720afce21632372431606ebec4129eb79734
[ "Xnet", "X11" ]
null
null
null
Algorithms_easy/0944. Delete Columns to Make Sorted.py
VinceW0/Leetcode_Python_solutions
09e9720afce21632372431606ebec4129eb79734
[ "Xnet", "X11" ]
null
null
null
""" 0944. Delete Columns to Make Sorted Easy We are given an array A of N lowercase letter strings, all of the same length. Now, we may choose any set of deletion indices, and for each string, we delete all the characters in those indices. For example, if we have an array A = ["abcdef","uvwxyz"] and deletion indices {0, 2, 3}, then the final array after deletions is ["bef", "vyz"], and the remaining columns of A are ["b","v"], ["e","y"], and ["f","z"]. (Formally, the c-th column is [A[0][c], A[1][c], ..., A[A.length-1][c]]). Suppose we chose a set of deletion indices D such that after deletions, each remaining column in A is in non-decreasing sorted order. Return the minimum possible value of D.length. Example 1: Input: A = ["cba","daf","ghi"] Output: 1 Explanation: After choosing D = {1}, each column ["c","d","g"] and ["a","f","i"] are in non-decreasing sorted order. If we chose D = {}, then a column ["b","a","h"] would not be in non-decreasing sorted order. Example 2: Input: A = ["a","b"] Output: 0 Explanation: D = {} Example 3: Input: A = ["zyx","wvu","tsr"] Output: 3 Explanation: D = {0, 1, 2} Constraints: 1 <= A.length <= 100 1 <= A[i].length <= 1000 """ class Solution: def minDeletionSize(self, A: List[str]) -> int: return sum(list(col) != sorted(col) for col in zip(*A))
27.75
291
0.65015
233
1,332
3.716738
0.450644
0.051963
0.051963
0.072748
0.090069
0
0
0
0
0
0
0.026777
0.186937
1,332
47
292
28.340426
0.772853
0.891141
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0.333333
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
3
c5262761e5f3b58f60b2ce79889d60ea4397312d
64
py
Python
wrds2postgres/__init__.py
seanxwzhang/wrds2pg
770bf6df20e3fbec8101f0dfc3da69a512683b0f
[ "MIT" ]
null
null
null
wrds2postgres/__init__.py
seanxwzhang/wrds2pg
770bf6df20e3fbec8101f0dfc3da69a512683b0f
[ "MIT" ]
null
null
null
wrds2postgres/__init__.py
seanxwzhang/wrds2pg
770bf6df20e3fbec8101f0dfc3da69a512683b0f
[ "MIT" ]
null
null
null
name = "wrds2postgres" from wrds2postgres import wrds2postgres
16
39
0.828125
6
64
8.833333
0.666667
0
0
0
0
0
0
0
0
0
0
0.053571
0.125
64
3
40
21.333333
0.892857
0
0
0
0
0
0.203125
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
c52700780a73e91f57ce0e59ed0294f200ccc532
158
py
Python
Python/parking.py
mimseyedi/Kattis
a99ea2112544e89cc466feb7d81ffe6eb017f7e2
[ "MIT" ]
null
null
null
Python/parking.py
mimseyedi/Kattis
a99ea2112544e89cc466feb7d81ffe6eb017f7e2
[ "MIT" ]
null
null
null
Python/parking.py
mimseyedi/Kattis
a99ea2112544e89cc466feb7d81ffe6eb017f7e2
[ "MIT" ]
null
null
null
n = int(input()) for _ in range(n): store = int(input()) loc = list(map(int, input().split())) dist = 2 * (max(loc) - min(loc)) print(dist)
17.555556
41
0.525316
24
158
3.416667
0.666667
0.292683
0
0
0
0
0
0
0
0
0
0.008475
0.253165
158
8
42
19.75
0.686441
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.166667
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
c53c4261965061481b197c48ebf397cf3c40f347
551
py
Python
core/test/rule/naming_task.py
bogonets/answer
57f892a9841980bcbc35fa1e27521b34cd94bc25
[ "MIT" ]
3
2021-06-20T02:24:10.000Z
2022-01-26T23:55:33.000Z
core/test/rule/naming_task.py
bogonets/answer
57f892a9841980bcbc35fa1e27521b34cd94bc25
[ "MIT" ]
null
null
null
core/test/rule/naming_task.py
bogonets/answer
57f892a9841980bcbc35fa1e27521b34cd94bc25
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from unittest import TestCase, main from recc.rule.naming_task import naming_task, naming_task_volume, naming_task_network class NamingTaskTestCase(TestCase): def test_naming_task(self): self.assertEqual("answer.container", naming_task("", "", "")) def test_naming_task_volume(self): self.assertEqual("answer.volume", naming_task_volume("", "")) def test_naming_task_network(self): self.assertEqual("answer.network", naming_task_network("", "")) if __name__ == "__main__": main()
27.55
86
0.702359
66
551
5.454545
0.363636
0.277778
0.133333
0.141667
0
0
0
0
0
0
0
0.002151
0.15608
551
19
87
29
0.772043
0.038113
0
0
0
0
0.096591
0
0
0
0
0
0.272727
1
0.272727
false
0
0.181818
0
0.545455
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
3
c53c66e62fc2199bd0a8605bbf2edf22ea4026c6
152
py
Python
locale/pot/api/utilities/_autosummary/pyvista-lines_from_points-1.py
tkoyama010/pyvista-doc-translations
23bb813387b7f8bfe17e86c2244d5dd2243990db
[ "MIT" ]
4
2020-08-07T08:19:19.000Z
2020-12-04T09:51:11.000Z
locale/pot/api/utilities/_autosummary/pyvista-lines_from_points-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/helpers-3.py
tkoyama010/pyvista-doc-translations
23bb813387b7f8bfe17e86c2244d5dd2243990db
[ "MIT" ]
1
2021-03-09T07:50:40.000Z
2021-03-09T07:50:40.000Z
import numpy as np import pyvista points = np.array([[0, 0, 0], [1, 0, 0], [1, 1, 0]]) poly = pyvista.lines_from_points(points) poly.plot(line_width=5)
25.333333
52
0.677632
29
152
3.448276
0.551724
0.06
0.06
0
0
0
0
0
0
0
0
0.076336
0.138158
152
5
53
30.4
0.687023
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
c5416b818e6ca2407ccaa04271bad3a8b35151a4
971
py
Python
utils/checks.py
Proxymiity/Alter
9e31a5f89f5b7ad464255399de9312691c895635
[ "Apache-2.0" ]
3
2020-11-18T11:33:27.000Z
2020-12-24T01:51:03.000Z
utils/checks.py
Proxymiity/Alter
9e31a5f89f5b7ad464255399de9312691c895635
[ "Apache-2.0" ]
5
2021-02-16T13:00:22.000Z
2021-03-05T23:42:12.000Z
utils/checks.py
Proxymiity/Alter
9e31a5f89f5b7ad464255399de9312691c895635
[ "Apache-2.0" ]
null
null
null
import discord from discord.ext import commands from utils.dataIO import dataIO bot_owner_id = dataIO.load_json("data/config.json")["owner"] def bot_owner(): return commands.check(bot_owner_raw) def bot_owner_raw(ctx): return ctx.message.author.id == bot_owner_id def server_owner(): return commands.check(server_owner_raw) def server_owner_raw(ctx): if ctx.message.guild is None: return False guild = ctx.message.guild if ctx.message.author.id == guild.owner_id: return True else: return False def permissions(**perms): def check(ctx): return server_perms(ctx, discord.Permissions(**perms)) return commands.check(check) def server_perms(ctx, perms): if bot_owner_raw(ctx): return True elif server_owner_raw(ctx): return True elif not perms: return False resolved = ctx.message.channel.permissions_for(ctx.message.author) return perms <= resolved
22.068182
70
0.697219
136
971
4.808824
0.264706
0.073395
0.067278
0.077982
0.111621
0.076453
0
0
0
0
0
0
0.209063
971
43
71
22.581395
0.851563
0
0
0.193548
0
0
0.021627
0
0
0
0
0
0
1
0.225806
false
0
0.096774
0.129032
0.709677
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
c549d98d89c1141a2a21b7216219b1baeff55407
1,490
py
Python
addon/import_vcap/amulet_nbt/amulet_nbt_py/nbt_types/string.py
Sam54123/mc-world-export
b82632d76f012121de389276880ddb2eed9e6661
[ "MIT" ]
2
2021-11-30T20:59:36.000Z
2022-03-09T18:43:23.000Z
addon/import_vcap/amulet_nbt/amulet_nbt_py/nbt_types/string.py
Sam54123/mc-world-export
b82632d76f012121de389276880ddb2eed9e6661
[ "MIT" ]
2
2021-11-04T03:45:42.000Z
2022-03-27T00:23:16.000Z
addon/import_vcap/amulet_nbt/amulet_nbt_py/nbt_types/string.py
Sam54123/mc-world-export
b82632d76f012121de389276880ddb2eed9e6661
[ "MIT" ]
null
null
null
from __future__ import annotations from typing import ClassVar, BinaryIO from ..const import SNBTType from .value import BaseImmutableTag class TAG_String(BaseImmutableTag): tag_id: ClassVar[int] = 8 _value: str _data_type: ClassVar = str @classmethod def load_from(cls, context: BinaryIO, little_endian: bool) -> TAG_String: return cls(cls.load_string(context, little_endian)) def write_value(self, buffer: BinaryIO, little_endian=False): self.write_string(buffer, self._value, little_endian) def _to_snbt(self) -> SNBTType: return f'"{self.escape(self._value)}"' @staticmethod def escape(string: str): return string.replace("\\", "\\\\").replace('"', '\\"') @staticmethod def unescape(string: str): return string.replace('\\"', '"').replace("\\\\", "\\") def __len__(self) -> int: return len(self._value) def __getitem__(self, item): return self._value.__getitem__(item) def __add__(self, other): return self._value + self.get_primitive(other) def __radd__(self, other): return self.get_primitive(other) + self._value def __iadd__(self, other): return self.__class__(self + other) def __mul__(self, other): return self._value * self.get_primitive(other) def __rmul__(self, other): return self.get_primitive(other) * self._value def __imul__(self, other): return self.__class__(self * other)
27.090909
77
0.658389
177
1,490
5.112994
0.293785
0.079558
0.099448
0.125967
0.362431
0.362431
0.285083
0.212155
0.212155
0.212155
0
0.000855
0.215436
1,490
54
78
27.592593
0.773311
0
0
0.054054
0
0
0.032215
0.018792
0
0
0
0
0
1
0.351351
false
0
0.108108
0.324324
0.891892
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
c556fa6151eae3eacaa2d66a7bfce7ab898ba4d3
472
py
Python
checkov/terraform/checks/data/aws/IAMCredentialsExposure.py
antonblr/checkov
9415c6593c537945c08f7a19f28bdd8b96966f67
[ "Apache-2.0" ]
3
2021-04-19T17:17:21.000Z
2021-09-06T06:31:09.000Z
checkov/terraform/checks/data/aws/IAMCredentialsExposure.py
antonblr/checkov
9415c6593c537945c08f7a19f28bdd8b96966f67
[ "Apache-2.0" ]
16
2021-03-09T07:38:38.000Z
2021-06-09T03:53:55.000Z
checkov/terraform/checks/data/aws/IAMCredentialsExposure.py
antonblr/checkov
9415c6593c537945c08f7a19f28bdd8b96966f67
[ "Apache-2.0" ]
1
2022-01-06T08:04:56.000Z
2022-01-06T08:04:56.000Z
from checkov.terraform.checks.data.BaseCloudsplainingIAMCheck import BaseCloudsplainingIAMCheck class CloudSplainingCredentialsExposure(BaseCloudsplainingIAMCheck): def __init__(self): name = "Ensure IAM policies does not allow credentials exposure" id = "CKV_AWS_107" super().__init__(name=name, id=id) def cloudsplaining_analysis(self, policy): return policy.credentials_exposure check = CloudSplainingCredentialsExposure()
29.5
95
0.769068
44
472
7.977273
0.704545
0.108262
0
0
0
0
0
0
0
0
0
0.007595
0.163136
472
15
96
31.466667
0.881013
0
0
0
0
0
0.139831
0
0
0
0
0
0
1
0.222222
false
0
0.111111
0.111111
0.555556
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
c55e0eda4e3e64446f0960b972543e6cf72327d9
102
py
Python
Python Fundamentals/8. Text Processing/Exercise/05. Emoticon Finder.py
a-shiro/SoftUni-Courses
7d0ca6401017a28b5ff7e7fa3e5df8bba8ddbe77
[ "MIT" ]
null
null
null
Python Fundamentals/8. Text Processing/Exercise/05. Emoticon Finder.py
a-shiro/SoftUni-Courses
7d0ca6401017a28b5ff7e7fa3e5df8bba8ddbe77
[ "MIT" ]
null
null
null
Python Fundamentals/8. Text Processing/Exercise/05. Emoticon Finder.py
a-shiro/SoftUni-Courses
7d0ca6401017a28b5ff7e7fa3e5df8bba8ddbe77
[ "MIT" ]
null
null
null
text = input() for i in range(len(text)): if text[i] == ":": print(text[i] + text[i + 1])
20.4
36
0.490196
17
102
2.941176
0.588235
0.3
0
0
0
0
0
0
0
0
0
0.013514
0.27451
102
5
36
20.4
0.662162
0
0
0
0
0
0.009709
0
0
0
0
0
0
1
0
false
0
0
0
0
0.25
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
3d7be59d3294497e1fe93058b832653c3e9260cd
433
py
Python
Inventario/cmp/migrations/0029_auto_20190926_2044.py
SYS0xWord/InventarioDjango_Udemy
073b3edbf3495289251d3edf4d0437a813f5cfb4
[ "MIT" ]
null
null
null
Inventario/cmp/migrations/0029_auto_20190926_2044.py
SYS0xWord/InventarioDjango_Udemy
073b3edbf3495289251d3edf4d0437a813f5cfb4
[ "MIT" ]
null
null
null
Inventario/cmp/migrations/0029_auto_20190926_2044.py
SYS0xWord/InventarioDjango_Udemy
073b3edbf3495289251d3edf4d0437a813f5cfb4
[ "MIT" ]
null
null
null
# Generated by Django 2.2.2 on 2019-09-27 02:44 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('cmp', '0028_registro_lote'), ] operations = [ migrations.RemoveField( model_name='lote', name='loteventa', ), migrations.RemoveField( model_name='registro_lote', name='loteventa', ), ]
19.681818
47
0.561201
42
433
5.666667
0.619048
0.016807
0.218487
0.252101
0
0
0
0
0
0
0
0.065068
0.325635
433
21
48
20.619048
0.75
0.103926
0
0.4
1
0
0.145078
0
0
0
0
0
0
1
0
false
0
0.066667
0
0.266667
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
0
0
0
0
0
3
3da9bd10811a51cfe8654f9d77c60db67a78ca6f
23
py
Python
Lib/idlelib/idlever.py
deadsnakes/python2.3
0b4a6871ca57123c10aa48cc2a5d2b7c0ee3c849
[ "PSF-2.0" ]
null
null
null
Lib/idlelib/idlever.py
deadsnakes/python2.3
0b4a6871ca57123c10aa48cc2a5d2b7c0ee3c849
[ "PSF-2.0" ]
null
null
null
Lib/idlelib/idlever.py
deadsnakes/python2.3
0b4a6871ca57123c10aa48cc2a5d2b7c0ee3c849
[ "PSF-2.0" ]
null
null
null
IDLE_VERSION = "1.0.7"
11.5
22
0.652174
5
23
2.8
1
0
0
0
0
0
0
0
0
0
0
0.15
0.130435
23
1
23
23
0.55
0
0
0
0
0
0.217391
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
3dbb319a62a4ca69b922a3261d5a6e7a46d792fd
687
py
Python
20170111.py
JaeGyu/PythonEx_1
e67053db6ca7431c3dd66351c190c53229e3f141
[ "MIT" ]
null
null
null
20170111.py
JaeGyu/PythonEx_1
e67053db6ca7431c3dd66351c190c53229e3f141
[ "MIT" ]
null
null
null
20170111.py
JaeGyu/PythonEx_1
e67053db6ca7431c3dd66351c190c53229e3f141
[ "MIT" ]
null
null
null
import re p = re.compile("[a-z]") m = p.match("zaa") m2 = p.match("4") print(m) print(m2) if m: print("매치 됨 : ", m.group()) else: print("매치 안됨") p = re.compile("[abc]") print(p.match("a")) print(p.match("before")) print(p.match("dude")) print("-" * 60) p = re.compile("[1-3]") print(p.match("aa")) print(p.match("345")) print("-" * 60) p = re.compile("[^0-9]") print(p.match("123")) print(p.match("for")) print("-"*60) p=re.compile("[\d]") #숫자 print(p.match("123")) print("-"*60) p = re.compile("[\D]") #숫자가 아닌거 print(p.match("123")) print("-"*60) p = re.compile("a.b") print(p.match("a123b")) print("-"*60) p = re.compile("a.b") print(p.match("asbc")) print("-"*60)
14.3125
31
0.55313
123
687
3.089431
0.300813
0.205263
0.318421
0.157895
0.465789
0.326316
0.276316
0.276316
0.276316
0.157895
0
0.06
0.126638
687
47
32
14.617021
0.573333
0.0131
0
0.342857
0
0
0.14095
0
0
0
0
0
0
1
0
false
0
0.028571
0
0.028571
0.628571
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
3
3dc509f4fba3a63a57bd67d52b225b53eff175b5
1,123
py
Python
glhe/profiles/constant_temp.py
stianchris/GLHE
80c3eecca81ffd50d5077f87027c9441292452f5
[ "MIT" ]
2
2018-11-06T08:04:04.000Z
2020-10-09T14:52:36.000Z
glhe/profiles/constant_temp.py
stianchris/GLHE
80c3eecca81ffd50d5077f87027c9441292452f5
[ "MIT" ]
68
2018-03-27T01:43:22.000Z
2019-09-09T12:05:44.000Z
glhe/profiles/constant_temp.py
mitchute/GLHE
80c3eecca81ffd50d5077f87027c9441292452f5
[ "MIT" ]
4
2018-05-24T03:02:44.000Z
2021-08-16T13:54:09.000Z
from glhe.input_processor.component_types import ComponentTypes from glhe.input_processor.input_processor import InputProcessor from glhe.interface.entry import SimulationEntryPoint from glhe.interface.response import SimulationResponse from glhe.output_processor.output_processor import OutputProcessor from glhe.output_processor.report_types import ReportTypes class ConstantTemp(SimulationEntryPoint): Type = ComponentTypes.ConstantTemp def __init__(self, inputs: dict, ip: InputProcessor, op: OutputProcessor): SimulationEntryPoint.__init__(self, inputs) self.temperature = inputs['value'] self.ip = ip self.op = op self.inlet_temperature = ip.init_temp() def simulate_time_step(self, inputs: SimulationResponse): return SimulationResponse(inputs.time, inputs.time_step, inputs.flow_rate, self.temperature) def report_outputs(self): return {'{:s}:{:s}:{:s}'.format(self.Type, self.name, ReportTypes.InletTemp): self.inlet_temperature, '{:s}:{:s}:{:s}'.format(self.Type, self.name, ReportTypes.OutletTemp): self.temperature}
41.592593
109
0.753339
128
1,123
6.421875
0.34375
0.058394
0.03163
0.053528
0.087591
0.087591
0.087591
0.087591
0.087591
0
0
0
0.147818
1,123
26
110
43.192308
0.858934
0
0
0
0
0
0.029386
0
0
0
0
0
0
1
0.157895
false
0
0.315789
0.105263
0.684211
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
1
0
0
3
3dd3eeed55c5c54386f3543577c68e3b155b1308
321
py
Python
dit/utils/__init__.py
Ejjaffe/dit
c9d206f03d1de5a0a298b1d0ea9d79ea5e789ee1
[ "BSD-3-Clause" ]
1
2020-03-13T10:30:11.000Z
2020-03-13T10:30:11.000Z
dit/utils/__init__.py
Ejjaffe/dit
c9d206f03d1de5a0a298b1d0ea9d79ea5e789ee1
[ "BSD-3-Clause" ]
null
null
null
dit/utils/__init__.py
Ejjaffe/dit
c9d206f03d1de5a0a298b1d0ea9d79ea5e789ee1
[ "BSD-3-Clause" ]
null
null
null
""" Module providing miscellaneous functionality. """ from .bindargs import bindcallargs from .context import cd, named_tempfile, tempdir from .misc import * from .latexarray import to_latex as pmf_to_latex, to_pdf as pmf_to_pdf from .logger import basic_logger from .table import build_table from .units import unitful
26.75
70
0.813084
47
321
5.361702
0.553191
0.055556
0.055556
0
0
0
0
0
0
0
0
0
0.130841
321
11
71
29.181818
0.903226
0.140187
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
3
3ddded32bf52b633e3b0fc82177ada2e0b5635e2
27,727
py
Python
plug-ins/_mpynode/_openmaya.py
mpynode/node-designer
ec620f1388337bc0a4e5664d80e1ea6ade8b410e
[ "Unlicense" ]
63
2019-03-18T03:44:28.000Z
2021-12-31T07:51:09.000Z
plug-ins/_mpynode/_openmaya.py
mpynode/node-designer
ec620f1388337bc0a4e5664d80e1ea6ade8b410e
[ "Unlicense" ]
2
2019-03-19T10:39:02.000Z
2020-02-25T06:39:12.000Z
plug-ins/_mpynode/_openmaya.py
mpynode/node-designer
ec620f1388337bc0a4e5664d80e1ea6ade8b410e
[ "Unlicense" ]
19
2019-03-18T08:05:05.000Z
2022-01-11T08:37:45.000Z
""" This module is for adding functionality to existing Maya API classes """ import maya.api.OpenMaya as om class MAngle(om.MAngle): """ Override of the Maya API class of the same name to make the data within the class 'picklable' """ def __init__(self, *args): super(MAngle, self).__init__(*args) def __reduce__(self): return (MAngle, (self.asRadians(), MAngle.kRadians)) def __reduce_ex__(self, protocol): return self.__reduce__() def __repr__(self): return super(MAngle, self).__repr__().replace("maya.api.OpenMaya.", "MPyNode.") class MColor(om.MColor): """ Override of the Maya API class of the same name to make the data within the class 'picklable' """ def __init__(self, clr=None, model=om.MColor.kRGB, dataType=om.MColor.kFloat): self._model = model self._data_type = dataType if clr: super(MColor, self).__init__(clr, model=model, dataType=dataType) else: super(MColor, self).__init__() def __reduce__(self): return (MColor, ((self.r, self.g, self.b, self.a), self._model, self._data_type)) def __reduce_ex__(self, protocol): return self.__reduce__() def __add__(self, y): return MColor(super(MColor, self).__add__(y)) def __radd__(self, y): return MColor(super(MColor, self).__radd__(y)) def __iadd__(self, y): return MColor(super(MColor, self).__iadd__(y)) def __mul__(self, y): return MColor(super(MColor, self).__mul__(y)) def __rmul__(self, y): return MColor(super(MColor, self).__rmul__(y)) def __imul__(self, y): return MColor(super(MColor, self).__imul__(y)) def __div__(self, y): return MColor(super(MVector, self).__div__(y)) def __idiv__(self, y): return MColor(super(MVector, self).__idiv__(y)) def __rdiv__(self, y): return MColor(super(MVector, self).__rdiv__(y)) def __str__(self): return str((self.r, self.g, self.b, self.a)) def __repr__(self): return super(MColor, self).__repr__().replace("maya.api.OpenMaya.", "MPyNode.") def setColor(self, clr, model=om.MColor.kRGB, dataType=om.MColor.kFloat): """ Override of the base class version to add functionality """ self._model = model self._data_type = dataType super(MColor, self).setColor(clr, model=model, dataType=dataType) def getColorModel(self): """ Returns the color model used by this MColor object *RETURNS* *int* representing the color model type such as MColor.kRGB """ return self._model def getDataType(self): """ Returns the color data type used by this MColor object *RETURNS* *int* representing the color data type such as MColor.kFloat """ return self._data_type class MColorArray(om.MColorArray): """ Override of the Maya API class of the same name to make the data within the class 'picklable' """ def __init__(self, *args): super(MColorArray, self).__init__(*args) def __reduce__(self): return (MColorArray, (tuple([tuple(clr) for clr in self]),)) def __reduce_ex__(self, protocol): return self.__reduce__() def __getitem__(self, i): return MColor(super(MColorArray, self).__getitem__(i)) def __getslice__(self, i, j): return MColorArray(super(MVectorArray, self).__getslice__(i, j)) def __repr__(self): return super(MColorArray, self).__repr__().replace("maya.api.OpenMaya.", "MPyNode.") def __str__(self): return super(MColorArray, self).__str__().replace("maya.api.OpenMaya.", "MPyNode.") class MEulerRotation(om.MEulerRotation): """ Override of the Maya API class of the same name to make the data within the class 'picklable' """ def __init__(self, *args, **kargs): super(MEulerRotation, self).__init__(*args, **kargs) def __reduce__(self): return (MEulerRotation, (self.x, self.y, self.z, self.order)) def __reduce_ex__(self, protocol): return self.__reduce__() def __str__(self): return str((self.x, self.y, self.z)) def __repr__(self): return super(MEulerRotation, self).__repr__().replace("maya.api.OpenMaya.", "MPyNode.") def __add__(self, y): return MEulerRotation(super(MEulerRotation, self).__add__(y)) def __radd__(self, y): return MEulerRotation(super(MEulerRotation, self).__radd__(y)) def __iadd__(self, y): return MEulerRotation(super(MEulerRotation, self).__iadd__(y)) def __sub__(self, y): return MEulerRotation(super(MEulerRotation, self).__sub__(y)) def __rsub__(self, y): return MEulerRotation(super(MEulerRotation, self).__rsub__(y)) def __isub__(self, y): return MEulerRotation(super(MEulerRotation, self).__isub__(y)) def __mul__(self, y): return MEulerRotation(super(MEulerRotation, self).__mul__(y)) def __rmul__(self, y): return MEulerRotation(super(MEulerRotation, self).__rmul__(y)) def __imul__(self, y): return MEulerRotation(super(MEulerRotation, self).__imul__(y)) def alternateSolution(self): return MEulerRotation(super(MEulerRotation, self).alternateSolution()) def asMatrix(self): return MMatrix(super(MEulerRotation, self).asMatrix()) def asQuaternion(self): return MQuaternion(super(MEulerRotation, self).asQuaternion()) def asVector(self): return MVector(super(MEulerRotation, self).asVector()) def bound(self): return MEulerRotation(super(MEulerRotation, self).bound()) def closestCut(self, target): return MEulerRotation(super(MEulerRotation, self).closestCut(target)) def closestSolution(self, target): return MEulerRotation(super(MEulerRotation, self).closestSolution(target)) @staticmethod def computeAlternateSolution(rot): return MEulerRotation(om.MEulerRotation.computeAlternateSolution(rot)) @staticmethod def computeBound(rot): return MEulerRotation(om.MEulerRotation.computeBound(rot)) @staticmethod def computeClosestCut(src, target): return MEulerRotation(om.MEulerRotation.computeClosestCut(src, target)) @staticmethod def computeClosestSolution(src, target): return MEulerRotation(om.MEulerRotation.computeClosestSolution(src, target)) @staticmethod def decompose(matrix, order): return MEulerRotation(om.MEulerRotation.decompose(matrix, order)) def inverse(self): return MEulerRotation(super(MEulerRotation, self).inverse()) def reorder(self, order): return MEulerRotation(super(MEulerRotation, self).reorder(order)) class MFnMesh(om.MFnMesh): """ Override of the Maya API class of the same name to make the data within the class 'picklable' """ def __init__(self, *args, **kargs): super(MFnMesh, self).__init__(*args, **kargs) def getPoints(self, space=om.MSpace.kObject): return MPointArray(super(MFnMesh, self).getPoints(space)) class MFnNurbsCurve(om.MFnNurbsCurve): """ Override of the Maya API class of the same name to make the data within the class 'picklable' """ def __init__(self, *args, **kargs): super(MFnNurbsCurve, self).__init__(*args, **kargs) def closestPoint(self, test_pnt, guess=None, tolerance=om.MFnNurbsCurve.kPointTolerance, space=om.MSpace.kObject): pnt, param = super(MFnNurbsCurve, self).closestPoint(test_pnt, guess, tolerance, space) return MPoint(pnt), param def cvPosition(self, index, space=om.MSpace.kObject): return MPoint(super(MFnNurbsCurve, self).cvPosition(index, space)) def cvPositions(self, space=om.MSpace.kObject): return MPointArray(super(MFnNurbsCurve, self).cvPositions(space)) def getDerivativesAtParam(self, param, space=om.MSpace.kObject, dUU=False): result = super(MFnNurbsCurve, self).getDerivativesAtParam(param, space=space, dUU=dUU) if len(result) < 3: return MPoint(result[0]), MVector(result[1]) else: return MPoint(result[0]), MVector(result[1]), MVector(result[2]) def getPointAtParam(self, param, space=om.MSpace.kObject): return MPoint(super(MFnNurbsCurve, self).getPointAtParam(param, space)) def normal(self, param, space=om.MSpace.kObject): return MVector(super(MFnNurbsCurve, self).normal(param, space)) def tangent(self, param, space=om.MSpace.kObject): return MVector(super(MFnNurbsCurve, self).tangent(param, space)) class MMatrix(om.MMatrix): """ Override of the Maya API class of the same name to make the data within the class 'picklable' """ def __init__(self, *args): super(MMatrix, self).__init__(*args) def __reduce__(self): return (MMatrix, (tuple(self),)) def __reduce_ex__(self, protocol): return self.__reduce__() def __add__(self, y): return MMatrix(super(MMatrix, self).__add__(y)) def __radd__(self, y): return MMatrix(super(MMatrix, self).__radd__(y)) def __iadd__(self, y): return MMatrix(super(MMatrix, self).__iadd__(y)) def __sub__(self, y): return MMatrix(super(MMatrix, self).__sub__(y)) def __rsub__(self, y): return MMatrix(super(MMatrix, self).__rsub__(y)) def __isub__(self, y): return MMatrix(super(MMatrix, self).__isub__(y)) def __mul__(self, y): result = super(MMatrix, self).__mul__(y) if result is NotImplemented: return NotImplemented return MMatrix(result) def __rmul__(self, y): return MMatrix(super(MMatrix, self).__rmul__(y)) def __imul__(self, y): return MMatrix(super(MMatrix, self).__imul__(y)) def adjoint(self): """ Returns a new matrix containing this matrix's adjoint. """ return MMatrix(super(MMatrix, self).adjoint()) def homogenize(self): """ Returns a new matrix containing the homogenized version of this matrix. """ return MMatrix(super(MMatrix, self).homogenize()) def inverse(self): """ Returns a new matrix containing this matrix's inverse. """ return MMatrix(super(MMatrix, self).inverse()) def transpose(self): """ Returns a new matrix containing this matrix's inverse. """ return MMatrix(super(MMatrix, self).transpose()) class MMatrixArray(om.MMatrixArray): """ Override of the Maya API class of the same name to make the data within the class 'picklable' """ def __init__(self, *args): super(MMatrixArray, self).__init__(*args) def __reduce__(self): return (MMatrixArray, (tuple([tuple(mat) for mat in self]),)) def __reduce_ex__(self, protocol): return self.__reduce__() def __getitem__(self, i): return MMatrix(super(MMatrixArray, self).__getitem__(i)) def __getslice__(self, i, j): return MMatrixArray(super(MMatrixArray, self).__getslice__(i, j)) def __repr__(self): return super(MMatrixArray, self).__repr__().replace("maya.api.OpenMaya.", "MPyNode.") def __str__(self): return super(MMatrixArray, self).__str__().replace("maya.api.OpenMaya.", "MPyNode.") class MPoint(om.MPoint): """ Override of the Maya API class of the same name to make the data within the class 'picklable' """ def __init__(self, *args): super(MPoint, self).__init__(*args) def __reduce__(self): return (MPoint, (self.x, self.y, self.z, self.w)) def __reduce_ex__(self, protocol): return self.__reduce__() def __add__(self, y): return MPoint(super(MPoint, self).__add__(y)) def __radd__(self, y): return MPoint(super(MPoint, self).__radd__(y)) def __iadd__(self, y): return MPoint(super(MPoint, self).__iadd__(y)) def __mul__(self, y): return MPoint(super(MPoint, self).__mul__(y)) def __rmul__(self, y): return MPoint(super(MPoint, self).__rmul__(y)) def __imul__(self, y): return MPoint(super(MPoint, self).__imul__(y)) def __div__(self, y): return MPoint(super(MPoint, self).__div__(y)) def __rdiv__(self, y): return MPoint(super(MPoint, self).__rdiv__(y)) def __sub__(self, y): diff = super(MPoint, self).__sub__(y) if type(diff) == om.MVector: return MVector(diff) return MPoint(diff) def __rsub__(self, y): diff = super(MPoint, self).__rsub__(y) if type(diff) == om.MVector: return MVector(diff) return MPoint(diff) def __isub__(self, y): """ In-place subtract """ return MPoint(super(MPoint, self).__isub__(y)) def __str__(self): return str((self.x, self.y, self.z, self.w)) def __repr__(self): return super(MPoint, self).__repr__().replace("maya.api.OpenMaya.", "MPyNode.") class MPointArray(om.MPointArray): """ Override of the Maya API class of the same name to make the data within the class 'picklable' """ def __init__(self, *args): super(MPointArray, self).__init__(*args) def __reduce__(self): return (MPointArray, (tuple([tuple(pnt) for pnt in self]),)) def __reduce_ex__(self, protocol): return self.__reduce__() def __add__(self, y): ##---some reason calling __add__ directly on the parent class causes a crash (WTF?)----## return MPointArray(om.MPointArray(self) + y) def __iadd__(self, y): return MPointArray(super(MVectorArray, self).__iadd__(y)) def __getitem__(self, i): return MPoint(super(MPointArray, self).__getitem__(i)) def __getslice__(self, i, j): return MPointArray(super(MPointArray, self).__getslice__(i, j)) def __repr__(self): return super(MPointArray, self).__repr__().replace("maya.api.OpenMaya.", "MPyNode.") def __str__(self): return super(MPointArray, self).__str__().replace("maya.api.OpenMaya.", "MPyNode.") class MQuaternion(om.MQuaternion): """ Override of the Maya API class of the same name to make the data within the class 'picklable' """ def __init__(self, *args): super(MQuaternion, self).__init__(*args) def __reduce__(self): return (MQuaternion, (self.x, self.y, self.z, self.w)) def __reduce_ex__(self, protocol): return self.__reduce__() def __str__(self): return str((self.x, self.y, self.z, self.w)) def __repr__(self): return super(MQuaternion, self).__repr__().replace("maya.api.OpenMaya.", "MPyNode.") def __add__(self, y): return MQuaternion(super(MQuaternion, self).__add__(y)) def __radd__(self, y): return MQuaternion(super(MQuaternion, self).__radd__(y)) def __sub__(self, y): return MQuaternion(super(MQuaternion, self).__sub__(y)) def __rsub__(self, y): return MQuaternion(super(MQuaternion, self).__rsub__(y)) def __mul__(self, y): return MQuaternion(super(MQuaternion, self).__mul__(y)) def __rmul__(self, y): return MQuaternion(super(MQuaternion, self).__rmul__(y)) def __imul__(self, y): return MQuaternion(super(MQuaternion, self).__imul__(y)) def __neg__(self): """ Component-by-component negation """ return MQuaternion(super(MQuaternion, self).__neg__()) def asAxisAngle(self): """ Returns the rotation as a tuple containing an axis vector and an angle in radians about that axis. """ vect, angle = super(MQuaternion, self).asAxisAngle() return MVector(vect), angle def asEulerRotation(self): """ Returns the rotation as an equivalent MEulerRotation. """ return MEulerRotation(super(MQuaternion, self).asEulerRotation()) def asMatrix(self): """ Returns the rotation as an equivalent rotation matrix. """ return MMatrix(super(MQuaternion, self).asMatrix()) def conjugate(self): """ Returns the conjugate of this quaternion (i.e. x, y and z components negated). """ return MQuaternion(super(MQuaternion, self).conjugate()) def exp(self): """ Returns a new quaternion containing the exponent of this one. """ return MQuaternion(super(MQuaternion, self).exp()) def inverse(self): """ Returns a new quaternion containing the inverse of this one. """ return MQuaternion(super(MQuaternion, self).inverse()) def log(self): """ Returns a new quaternion containing the log of this one. """ return MQuaternion(super(MQuaternion, self).log()) def normal(self): """ Returns a new quaternion containing the normalized version of this one (i.e. scaled to unit length). """ return MQuaternion(super(MQuaternion, self).normal()) @staticmethod def slerp(p, q, t, spin): """ Spherical interpolation of unit quaternions. Returns a quaternion along the shortest path (in quaternion space) between p and q, at interpolation value t. Thus a value of 0.0 will return p while a value of 1.0 will return q. spin gives the number of complete rotations about the axis which must occur when going from p to q. """ return MQuaternion(om.MQuaternion.slerp(p, q, t, spin)) @staticmethod def squad(p, a, b, q, t, spin=0): """ Interpolation along a cubic curve segment in quaternion space. Returns a quaternion along the cubic curve segment which interpolates p and q, at interpolation value t. Thus a value of 0.0 will return p while a value of 1.0 will return q. The curve is C1 continuous with a and b as intermediate points. spins gives the number of complete rotations about the axis which must occur when going from p to q. """ return MQuaternion(om.MQuaternion.squad(p, a, b, q, t, spin)) @staticmethod def squadPt(q0, q1, q2): """ Returns a new quaternion representing an intermediate point (in quaternion space) which when used with squad() will produce a C1 continuous spline. """ return MQuaternion(om.MQuaternion.squadPt(q0, q1, q2)) class MTime(om.MTime): """ Override of the Maya API class of the same name to make the data within the class 'picklable' """ def __init__(self, *args, **kargs): super(MTime, self).__init__(*args, **kargs) def __reduce__(self): return (MTime, (self.value, self.unit)) def __reduce_ex__(self, protocol): return self.__reduce__() def __str__(self): return super(MTime, self).__str__() def __repr__(self): return super(MTime, self).__repr__().replace("maya.api.OpenMaya.", "MPyNode.") class MTimeArray(om.MTimeArray): """ Override of the Maya API class of the same name to make the data within the class 'picklable' """ def __init__(self, *args): in_times = None if args: ##---init from anoth MtimeArray---## if type(args[0]) in (list, tuple): in_times = args[0] args = () super(MTimeArray, self).__init__(*args) if in_times: for time_args in in_times: if isinstance(time_args, MTime): self.append(MTime(time_args)) else: self.append(MTime(*time_args)) def __reduce__(self): return (MTimeArray, (tuple([(time.value, time.unit) for time in self]),)) def __reduce_ex__(self, protocol): return self.__reduce__() def __getitem__(self, i): return MTime(super(MTimeArray, self).__getitem__(i)) def __getslice__(self, i, j): return MTimeArray(super(MTimeArray, self).__getslice__(i, j)) def __str__(self): return super(MTimeArray, self).__str__().replace("maya.api.OpenMaya.", "MPyNode.") def __repr__(self): return super(MTimeArray, self).__repr__().replace("maya.api.OpenMaya.", "MPyNode.") class MVector(om.MVector): """ Override of the Maya API class of the same name to make the data within the class 'picklable' """ def __init__(self, *args): super(MVector, self).__init__(*args) def __reduce__(self): return (MVector, (self.x, self.y, self.z)) def __reduce_ex__(self, protocol): return self.__reduce__() def __add__(self, y): return MVector(super(MVector, self).__add__(y)) def __radd__(self, y): return MVector(super(MVector, self).__radd__(y)) def __iadd__(self, y): return MVector(super(MVector, self).__iadd__(y)) def __sub__(self, y): return MVector(super(MVector, self).__sub__(y)) def __rsub__(self, y): return MVector(super(MVector, self).__rsub__(y)) def __isub__(self, y): """ In-place subtract """ return MVector(super(MVector, self).__isub__(y)) def __xor__(self, y): """ Cross product """ return MVector(super(MVector, self).__xor__(y)) def __rxor__(self, y): """ Reverse cross product """ return MVector(super(MVector, self).__rxor__(y)) def __mul__(self, y): result = super(MVector, self).__mul__(y) if type(result) == om.MVector: return MVector(result) return result def __rmul__(self, y): result = super(MVector, self).__rmul__(y) if type(result) == om.MVector: return MVector(result) return result def __imul__(self, y): result = super(MVector, self).__imul__(y) if type(result) == om.MVector: return MVector(result) return result def __div__(self, y): return MVector(super(MVector, self).__div__(y)) def __idiv__(self, y): return MVector(super(MVector, self).__idiv__(y)) def __rdiv__(self, y): return MVector(super(MVector, self).__rdiv__(y)) def __neg__(self): """ New vector which is the negative if the given vector. """ return MVector(super(MVector, self).__neg__()) def __str__(self): return str((self.x, self.y, self.z)) def __repr__(self): return super(MVector, self).__repr__().replace("maya.api.OpenMaya.", "MPyNode.") def normal(self): """ Returns a new vector containing the normalized version of this one. **RETURNS** *MVector* >>> new_v = v.normal() """ return MVector(super(MVector, self).normal()) def normalize(self): """ Normalizes this vector in-place and returns a new reference to it. **RETURNS** *MVector* >>> v.normalize() """ return MVector(super(MVector, self).normalize()) def rotateBy(self, *args): """ Returns the vector resulting from rotating this one by the given amount. **args** single *MQuaternion* or *MEulerRotation*, or an axis identifier constant and a *float* angle **RETURNS** *MVector* >>> ##---rotate by MQuaternion or MEulerRotation---## >>> new_v = v.rotateBy(rot) >>> >>> ##---rotate by angle radians about the specified axis---## >>> new_v = v.rotateBy(MVector.kXaxis, 5.0) """ return MVector(super(MVector, self).rotateBy(*args)) def rotateTo(self, target): """ Returns the quaternion which will rotate this vector into another. **target** *MVector* **RETURNS** *MQuaternion* >>> q = v.rotateTo(MVector(1.0, 0.0, 0.0)) """ return MQuaternion(super(MVector, self).rotateTo(target)) def transformAsNormal(self, matrix): """ Returns a new vector which is calculated by postmultiplying this vector by the transpose of the given matrix's inverse and then normalizing the result. **matrix** *MMatrix* **RETURNS** *MVector* >>> matrix = MMatrix() >>> new_v = v.transformAsNormal(matrix) """ return MVector(super(MVector, self).transformAsNormal(matrix)) class MVectorArray(om.MVectorArray): """ Override of the Maya API class of the same name to make the data within the class 'picklable' The MVectorArray class provides an array of MVector elements using a common array interface and reference semantics. See Working with M*Array Classes for more details. Trying to override muliply functionality causes Maya to crash. If user multiplys this array by a int value it will return base version of OpenMaya.MVectorArray as a result. """ def __init__(self, *args): super(MVectorArray, self).__init__(*args) def __reduce__(self): return (MVectorArray, (tuple([tuple(vect) for vect in self]),)) def __reduce_ex__(self, protocol): return self.__reduce__() def __getitem__(self, i): return MVector(super(MVectorArray, self).__getitem__(i)) def __getslice__(self, i, j): return MVectorArray(super(MVectorArray, self).__getslice__(i, j)) def __repr__(self): return super(MVectorArray, self).__repr__().replace("maya.api.OpenMaya.", "MPyNode.") def __str__(self): return super(MVectorArray, self).__str__().replace("maya.api.OpenMaya.", "MPyNode.") def __add__(self, y): ##---some reason calling __add__ directly on the parent class causes a crash (WTF?)----## return MVectorArray(om.MVectorArray(self) + y) def __iadd__(self, y): return MVectorArray(super(MVectorArray, self).__iadd__(y))
22.306516
160
0.598298
3,150
27,727
4.92254
0.095238
0.023539
0.03618
0.02412
0.66155
0.586483
0.555011
0.410422
0.296272
0.266091
0
0.001672
0.288203
27,727
1,242
161
22.324477
0.783999
0.190681
0
0.437788
0
0
0.022022
0
0
0
0
0
0
1
0.423963
false
0
0.002304
0.304147
0.864055
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
3dfce6795d8180bb46d58bc36fe37426104cb5c5
551
py
Python
bdi/result.py
keishinkickback/batch-document-inference
3529810b02d596dd3cb76df2068682919f2f1857
[ "MIT" ]
null
null
null
bdi/result.py
keishinkickback/batch-document-inference
3529810b02d596dd3cb76df2068682919f2f1857
[ "MIT" ]
null
null
null
bdi/result.py
keishinkickback/batch-document-inference
3529810b02d596dd3cb76df2068682919f2f1857
[ "MIT" ]
null
null
null
import abc from typing import TypeVar Result = TypeVar("Result") class Result(metaclass=abc.ABCMeta): @abc.abstractmethod def __add__(self, new_result: Result) -> Result: pass @abc.abstractmethod def add(self) -> None: pass @abc.abstractmethod def to_dict(self) -> dict: pass def __repr__(self) -> str: lines = [f" {k}={v}" for k, v in self.to_dict().items()] str_lines = ",\n".join(lines) string = f"""{type(self).__name__}(\n{str_lines}\n)""" return string
21.192308
65
0.591652
71
551
4.352113
0.464789
0.165049
0.194175
0.148867
0.174757
0
0
0
0
0
0
0
0.261343
551
25
66
22.04
0.759214
0
0
0.333333
0
0
0.101633
0.068966
0
0
0
0
0
1
0.222222
false
0.166667
0.111111
0
0.444444
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
3
9a7d1f2922512aacf7b45f9c182c5653fdfccfe4
4,476
py
Python
tests/test__replacer.py
vsvandelik/cubbitt-fixer
eacab30975b9087b7f1a987402dc70bedb16c4bf
[ "MIT" ]
null
null
null
tests/test__replacer.py
vsvandelik/cubbitt-fixer
eacab30975b9087b7f1a987402dc70bedb16c4bf
[ "MIT" ]
null
null
null
tests/test__replacer.py
vsvandelik/cubbitt-fixer
eacab30975b9087b7f1a987402dc70bedb16c4bf
[ "MIT" ]
null
null
null
from fixer._finder import NumberUnitFinderResult from fixer._languages import Languages from fixer._replacer import Replacer from fixer._units import units def test_replace_unit_after_space(): result = Replacer.replace_unit( "I went over the handlebars and flew a good 300 yards on the ground.", NumberUnitFinderResult(300, units.get_unit_by_word("metrů", Languages.CS), False, "300 metrů"), NumberUnitFinderResult(300, units.get_unit_by_word("yards", Languages.EN), False, "300 yards"), units.get_unit_by_word("metres", Languages.EN), Languages.EN) assert result == "I went over the handlebars and flew a good 300 metres on the ground." def test_replace_unit_after_no_space(): result = Replacer.replace_unit( "Abc def 300°F ghch ijk.", NumberUnitFinderResult(300, units.get_unit_by_word("°C", Languages.CS), False, "300°C"), NumberUnitFinderResult(300, units.get_unit_by_word("°F", Languages.EN), False, "300°F"), units.get_unit_by_word("°C", Languages.EN), Languages.EN) assert result == "Abc def 300°C ghch ijk." def test_replace_unit_before(): result = Replacer.replace_unit( "Abc def 300 dollars ghch ijk.", NumberUnitFinderResult(300, units.get_unit_by_word("korun", Languages.CS), False, "300 korun"), NumberUnitFinderResult(300, units.get_unit_by_word("dollars", Languages.EN), False, "300 dollars"), units.get_unit_by_word("CZK", Languages.EN), Languages.EN) assert result == "Abc def CZK 300 ghch ijk." def test_replace_unit_before_no_space(): result = Replacer.replace_unit( "Abc def 300 dollars ghch ijk.", NumberUnitFinderResult(300, units.get_unit_by_word("korun", Languages.CS), False, "300 korun"), NumberUnitFinderResult(300, units.get_unit_by_word("dollars", Languages.EN), False, "300 dollars"), units.get_unit_by_word("$", Languages.EN), Languages.EN) assert result == "Abc def $300 ghch ijk." def test_replace_number(): result = Replacer.replace_number( "Abc def 300 dollars ghch ijk.", NumberUnitFinderResult(500, units.get_unit_by_word("dolarů", Languages.CS), False, "500 dolarů"), NumberUnitFinderResult(300, units.get_unit_by_word("dollars", Languages.EN), False, "300 dollars"), Languages.EN, "300" ) assert result == "Abc def 500 dollars ghch ijk." def test_replace_number_with_scaling(): n = NumberUnitFinderResult(123456.789, units.get_unit_by_word("dolarů", Languages.CS), False, "123 456 789 dolarů") n.add_scaling(1000) result = Replacer.replace_number( "Abc def 500.1 dollars ghch ijk.", n, NumberUnitFinderResult(500.1, units.get_unit_by_word("dollars", Languages.EN), False, "500.1 dollars"), Languages.EN, "500.1" ) assert result == "Abc def 123,456.789 thousand dollars ghch ijk." def test_replace_unit_number_cs(): result = Replacer.replace_unit_number( "Abc def 500,1 korun ghch ijk.", NumberUnitFinderResult(500.1, units.get_unit_by_word("crowns", Languages.EN), False, "500.1 crowns"), NumberUnitFinderResult(500.1, units.get_unit_by_word("korun", Languages.CS), False, "500,1 korun"), 1234.123, units.get_unit_by_word("dolarů", Languages.CS), Languages.CS ) assert result == "Abc def 1 234,1 dolarů ghch ijk." def test_replace_unit_number(): result = Replacer.replace_unit_number( "Abc def 500.1 crowns ghch ijk.", NumberUnitFinderResult(500.1, units.get_unit_by_word("korun", Languages.CS), False, "500,1 korun"), NumberUnitFinderResult(500.1, units.get_unit_by_word("crowns", Languages.EN), False, "500.1 crowns"), 123456789, units.get_unit_by_word("dollars", Languages.EN), Languages.EN ) assert result == "Abc def 123,460,000 dollars ghch ijk." def test_replace_unit_number_scaling(): n = NumberUnitFinderResult(500.1, units.get_unit_by_word("korun", Languages.CS), False, "500,1 korun") n.add_scaling(1) result = Replacer.replace_unit_number( "Abc def 500.1 crowns ghch ijk.", n, NumberUnitFinderResult(500.1, units.get_unit_by_word("crowns", Languages.EN), False, "500.1 crowns"), 123456789, units.get_unit_by_word("dollars", Languages.EN), Languages.EN ) assert result == "Abc def 123.46 million dollars ghch ijk."
41.444444
119
0.685433
615
4,476
4.793496
0.113821
0.067843
0.101764
0.118725
0.817503
0.77578
0.722185
0.646201
0.569539
0.457938
0
0.06798
0.194817
4,476
107
120
41.831776
0.748058
0
0
0.431818
0
0
0.211126
0
0
0
0
0
0.102273
1
0.102273
false
0
0.045455
0
0.147727
0
0
0
0
null
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
9a96e88736adeb2502586e8f473b85cf6acfc011
895
py
Python
userauth/models.py
houston-igpp/pdsppi-review-website
49a40d7b3b866008195259e8ccd27b62fd0210da
[ "Apache-2.0" ]
null
null
null
userauth/models.py
houston-igpp/pdsppi-review-website
49a40d7b3b866008195259e8ccd27b62fd0210da
[ "Apache-2.0" ]
null
null
null
userauth/models.py
houston-igpp/pdsppi-review-website
49a40d7b3b866008195259e8ccd27b62fd0210da
[ "Apache-2.0" ]
null
null
null
from django.db import models from django.contrib.auth.models import AbstractUser from django.core.validators import RegexValidator from django.utils.translation import gettext_lazy as _ from django.urls import reverse # Create your models here. class CustomUser (AbstractUser): display_name = models.CharField(verbose_name=_("Display name"), max_length=30, help_text=_("Will be shown e.g. when commenting"), default=("")) addtl_info = models.CharField(verbose_name=_("Additional information"), max_length=4096, blank=True, null=True) photo = models.ImageField(verbose_name=_("Photo"), upload_to='photos/', default='photos/default-user-avatar.png') class Meta: ordering = ['last_name'] def get_absolute_url(self): return reverse('account_profile') def __str__(self): return f"{self.username}: {self.first_name} {self.last_name}"
37.291667
148
0.731844
116
895
5.431034
0.612069
0.079365
0.069841
0.08254
0
0
0
0
0
0
0
0.007905
0.151955
895
23
149
38.913043
0.822134
0.026816
0
0
0
0
0.213134
0.034562
0
0
0
0
0
1
0.133333
false
0
0.333333
0.133333
0.933333
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
1
0
0
3
9a9c4aadc145f60bf2228e12490f7b8739f7d96b
1,240
py
Python
bitboards/masks.py
martinogden/chessval
8e50f247e0b620bf1d216ab3865074d32575aba9
[ "MIT" ]
null
null
null
bitboards/masks.py
martinogden/chessval
8e50f247e0b620bf1d216ab3865074d32575aba9
[ "MIT" ]
null
null
null
bitboards/masks.py
martinogden/chessval
8e50f247e0b620bf1d216ab3865074d32575aba9
[ "MIT" ]
null
null
null
FULL = 0xFFFFFFFFFFFFFFFFL A1A8 = 0x00000000000000FFL A1H1 = 0x0101010101010101L A8H8 = 0x8080808080808080L A1H8 = 0x8040201008040201L A8H1 = 0x0102040810204080L B1B8 = 0x0202020202020202L C2H7 = 0x0080402010080400L C7H2 = 0x0004081020408000L A4H4 = 0x00000000FF000000L A5H5 = 0x000000FF00000000L RANK_MASK = ( A1A8, A1A8 << (8 * 1), A1A8 << (8 * 2), A1A8 << (8 * 3), A1A8 << (8 * 4), A1A8 << (8 * 5), A1A8 << (8 * 6), A1A8 << (8 * 7), ) FILE_MASK = ( A1H1, A1H1 << 1, A1H1 << 2, A1H1 << 3, A1H1 << 4, A1H1 << 5, A1H1 << 6, A1H1 << 7, ) DIAG_MASK = ( A1H8 >> (8 * 7), A1H8 >> (8 * 6), A1H8 >> (8 * 5), A1H8 >> (8 * 4), A1H8 >> (8 * 3), A1H8 >> (8 * 2), A1H8 >> (8 * 1), A1H8, A1H8 << (8 * 1), A1H8 << (8 * 2), A1H8 << (8 * 3), A1H8 << (8 * 4), A1H8 << (8 * 5), A1H8 << (8 * 6), A1H8 << (8 * 7), ) ADIAG_MASK = ( A8H1 >> (8 * 7), A8H1 >> (8 * 6), A8H1 >> (8 * 5), A8H1 >> (8 * 4), A8H1 >> (8 * 3), A8H1 >> (8 * 2), A8H1 >> (8 * 1), A8H1, A8H1 << (8 * 1), A8H1 << (8 * 2), A8H1 << (8 * 3), A8H1 << (8 * 4), A8H1 << (8 * 5), A8H1 << (8 * 6), A8H1 << (8 * 7), )
17.222222
26
0.444355
153
1,240
3.575163
0.228758
0.127971
0.021938
0.036563
0.255942
0
0
0
0
0
0
0.437577
0.347581
1,240
71
27
17.464789
0.238566
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
3
9aa2dedfd56beaa17f7c8f96a2692ad82fb51a04
101
gyp
Python
binding.gyp
digitalbazaar/node-posix
33b25a191135872a52169ebc710390793e20a3bf
[ "MIT" ]
null
null
null
binding.gyp
digitalbazaar/node-posix
33b25a191135872a52169ebc710390793e20a3bf
[ "MIT" ]
null
null
null
binding.gyp
digitalbazaar/node-posix
33b25a191135872a52169ebc710390793e20a3bf
[ "MIT" ]
null
null
null
{ "targets": [ { "target_name": "posix", "sources": [ "src/posix.cc" ] } ] }
11.222222
35
0.39604
8
101
4.875
0.875
0
0
0
0
0
0
0
0
0
0
0
0.366337
101
8
36
12.625
0.609375
0
0
0
0
0
0.415842
0
0
0
0
0
0
1
0
true
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
9ad1b69f509e21f739495a7ac1a27711e7f5afdc
413
py
Python
mock/employees/static.py
vyahello/fake-data-parser
be04dedca8239282aa216e4d8ab927d708d0d250
[ "MIT" ]
1
2021-04-20T05:25:22.000Z
2021-04-20T05:25:22.000Z
mock/employees/static.py
vyahello/fake-data-parser
be04dedca8239282aa216e4d8ab927d708d0d250
[ "MIT" ]
2
2019-09-19T10:09:22.000Z
2020-11-07T08:51:54.000Z
mock/employees/static.py
vyahello/fake-data-parser
be04dedca8239282aa216e4d8ab927d708d0d250
[ "MIT" ]
null
null
null
from dataclasses import dataclass @dataclass(frozen=True) class Endpoint: """The class represents WEB endpoint for API.""" address: str = "0.0.0.0" port: int = 7777 debug: bool = False @dataclass(frozen=True) class Route: """The class represents API routes.""" home: str = "/" search_by_keyword: str = "/api/search/{keyword}" search_by_id: str = "/api/employee/{identifier}"
20.65
52
0.656174
54
413
4.944444
0.574074
0.022472
0.142322
0.179775
0
0
0
0
0
0
0
0.024316
0.20339
413
19
53
21.736842
0.787234
0.181598
0
0.181818
0
0
0.168196
0.143731
0
0
0
0
0
1
0
true
0
0.090909
0
0.818182
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
1
0
0
3
9ae0be019efe0fc3ae9e36d5d9749e28afaf23d7
1,048
py
Python
stardist/__init__.py
mmvih/stardist
810dec4727e8e8bf05bd9620f91a3a0dd70de289
[ "BSD-3-Clause" ]
null
null
null
stardist/__init__.py
mmvih/stardist
810dec4727e8e8bf05bd9620f91a3a0dd70de289
[ "BSD-3-Clause" ]
null
null
null
stardist/__init__.py
mmvih/stardist
810dec4727e8e8bf05bd9620f91a3a0dd70de289
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import, print_function import warnings import pathlib def format_Warning(message, category, filename, lineno, line=''): return f"{pathlib.Path(filename).name} ({lineno}): {message}\n" warnings.formatwarning = format_Warning from .version import __version__ # TODO: which functions to expose here? all? from .nms import non_maximum_suppression, non_maximum_suppression_3d, non_maximum_suppression_3d_sparse from .utils import edt_prob, fill_label_holes, sample_points, calculate_extents, export_imagej_rois, gputools_available from .geometry import star_dist, polygons_to_label, relabel_image_stardist, ray_angles, dist_to_coord from .geometry import star_dist3D, polyhedron_to_label, relabel_image_stardist3D from .plot.plot import random_label_cmap, draw_polygons, _draw_polygons from .plot.render import render_label, render_label_pred from .rays3d import rays_from_json, Rays_Cartesian, Rays_SubDivide, Rays_Tetra, Rays_Octo, Rays_GoldenSpiral, Rays_Explicit from .sample_patches import sample_patches
52.4
123
0.842557
146
1,048
5.636986
0.547945
0.036452
0.076549
0.055893
0
0
0
0
0
0
0
0.005269
0.094466
1,048
19
124
55.157895
0.86196
0.040076
0
0
0
0
0.052789
0.028884
0
0
0
0.052632
0
1
0.066667
false
0
0.8
0.066667
0.933333
0.066667
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
0
0
1
0
1
0
0
3
b1074e35726499c0f9eeb395c227e1f0ebd034da
143
py
Python
server/server/chat/routing.py
Shadowsych/matchus
b66241a873ae6bf12b8b7380c42c9920de9c2110
[ "AML" ]
1
2021-01-10T04:46:12.000Z
2021-01-10T04:46:12.000Z
server/server/chat/routing.py
Shadowsych/matchus
b66241a873ae6bf12b8b7380c42c9920de9c2110
[ "AML" ]
null
null
null
server/server/chat/routing.py
Shadowsych/matchus
b66241a873ae6bf12b8b7380c42c9920de9c2110
[ "AML" ]
null
null
null
from django.urls import path from . import consumers websocket_urlpatterns = [ path('ws/chat-room/<int:id>', consumers.ChatRoomConsumer) ]
23.833333
61
0.755245
18
143
5.944444
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.125874
143
6
62
23.833333
0.856
0
0
0
0
0
0.145833
0.145833
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
b110d1f21969520b70132fce580dfcc89fcfd27f
430
py
Python
opendata/tests/test_flotteurs.py
entrepreneur-interet-general/predisauvetage
4d985ee79355652709da322db48daffb3e5a895a
[ "MIT" ]
6
2018-02-16T15:07:17.000Z
2020-10-09T09:34:29.000Z
opendata/tests/test_flotteurs.py
entrepreneur-interet-general/predisauvetage
4d985ee79355652709da322db48daffb3e5a895a
[ "MIT" ]
107
2018-03-29T14:55:33.000Z
2021-12-13T19:44:50.000Z
opendata/tests/test_flotteurs.py
entrepreneur-interet-general/predisauvetage
4d985ee79355652709da322db48daffb3e5a895a
[ "MIT" ]
1
2021-03-03T21:02:33.000Z
2021-03-03T21:02:33.000Z
# -*- coding: utf-8 -*- from transformers.flotteurs import FlotteursTransformer from base import BaseTest class TestFlotteursTransformer(BaseTest): def test_basic_file(self): in_file = self.filepath("tests/files/flotteurs.csv") expected_file = self.filepath("tests/files/expected_flotteurs.csv") self.run_for_files(in_file, expected_file) def subject(self): return FlotteursTransformer
28.666667
75
0.734884
50
430
6.14
0.54
0.078176
0.104235
0.136808
0.169381
0
0
0
0
0
0
0.002801
0.169767
430
14
76
30.714286
0.857143
0.048837
0
0
0
0
0.144963
0.144963
0
0
0
0
0
1
0.222222
false
0
0.222222
0.111111
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
b116784531827f5854ca5c5b2d99d3b281cf88e4
447
py
Python
tool/models.py
zzattack/ccmaps-web
b431074219a82a4bf51336568aa0589ffa914169
[ "MIT", "Unlicense" ]
null
null
null
tool/models.py
zzattack/ccmaps-web
b431074219a82a4bf51336568aa0589ffa914169
[ "MIT", "Unlicense" ]
null
null
null
tool/models.py
zzattack/ccmaps-web
b431074219a82a4bf51336568aa0589ffa914169
[ "MIT", "Unlicense" ]
null
null
null
from django.db import models class ProgramVersion(models.Model): version = models.CharField(max_length=100, unique=True) release_date = models.DateField(auto_now_add=True) release_notes = models.CharField(max_length=100, unique=True) version = models.CharField(max_length=100, unique=True) file = models.FileField(upload_to='versions') def __unicode__(self): return 'Version ' + self.version.__str__() class Admin: pass
29.8
63
0.753915
59
447
5.440678
0.576271
0.140187
0.168224
0.224299
0.389408
0.389408
0.389408
0.274143
0
0
0
0.023316
0.136465
447
14
64
31.928571
0.80829
0
0
0.2
0
0
0.036952
0
0
0
0
0
0
1
0.1
false
0.1
0.1
0.1
1
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
3
b116a1087ef968005cd6487abec57ccc007cb80d
3,081
py
Python
AS2101_Labwork/3.Trials-References/Task 3/Submission Codes/Bisection Method/bsm_plot/bsm_plot.py
kirtan2605/Coursework_Codes
3455496e8ec0ae3a576cb3fc3b2ed01a055149c5
[ "MIT" ]
null
null
null
AS2101_Labwork/3.Trials-References/Task 3/Submission Codes/Bisection Method/bsm_plot/bsm_plot.py
kirtan2605/Coursework_Codes
3455496e8ec0ae3a576cb3fc3b2ed01a055149c5
[ "MIT" ]
null
null
null
AS2101_Labwork/3.Trials-References/Task 3/Submission Codes/Bisection Method/bsm_plot/bsm_plot.py
kirtan2605/Coursework_Codes
3455496e8ec0ae3a576cb3fc3b2ed01a055149c5
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt from values_bsm import * """ 1. f : The function whose roots we want to find 2. a : lower bound on the root 3. b : upper bound on the root 4. e : permissible error in the value of root obtained 5. N_max : maximum number of iterations after which function stops. """ """Function 1""" # for range 1 : {-3,0}, error = 0.0001 root = 0 f1_N_R1 = [] f1_Roots_R1 = [] for i in range(1,11): #print() #print("N_Max = {}".format(i)) root = bisection(func_num = 1,a = -3,b = 0,e = 0.001,N_Max = i) f1_N_R1.append(i) f1_Roots_R1.append(root) # for range 2 : {-5,5}, error = 0.0001 root = 0 f1_N_R2 = [] f1_Roots_R2 = [] for i in range(1,11): #print() #print("N_Max = {}".format(i)) root = bisection(func_num = 1, a = -5,b = 5,e = 0.001,N_Max = i) f1_N_R2.append(i) f1_Roots_R2.append(root) #print(f1_N_R2) #print(f1_Roots_R2) #print() """Function 2""" # for range 1 : {-3,0}, error = 0.0001 root = 0 f2_N_R1 = [] f2_Roots_R1 = [] for i in range(1,11): #print() #print("N_Max = {}".format(i)) root = bisection(func_num = 2, a = -3,b = 0,e = 0.001,N_Max = i) f2_N_R1.append(i) f2_Roots_R1.append(root) # for range 2 : {-5,5}, error = 0.0001 root = 0 f2_N_R2 = [] f2_Roots_R2 = [] for i in range(1,11): #print() #print("N_Max = {}".format(i)) root = bisection(func_num = 2, a = -5,b = 5,e = 0.001,N_Max = i) f2_N_R2.append(i) f2_Roots_R2.append(root) func = np.vectorize(f) f1_value_at_roots_R1 = func(1,f1_Roots_R1) f1_value_at_roots_R2 = func(1,f1_Roots_R2) f2_value_at_roots_R1 = func(2,f2_Roots_R1) f2_value_at_roots_R2 = func(2,f2_Roots_R2) """ # change the data and use the following code # to plot and save for both the Functions plt.plot(f2_N_R1,f2_value_at_roots_R1,'.-',label = 'initial Limit : {-3,0}') plt.plot(f2_N_R2,f2_value_at_roots_R2,'.-',label = 'initial Limit : {-5,5}') plt.xlabel('N',fontsize = 10) plt.ylabel('Function Value at Root',fontsize = 10) plt.xticks(fontsize = 8) plt.yticks(fontsize = 8) plt.title('Bisection Method - Function2 - permissible error : 0.0001') plt.grid(linestyle = '--') plt.legend() plt.savefig('bsm-f2.png') plt.show() """ # Plotting Absolute Values f1_value_at_roots_R1_ABS = [abs(ele) for ele in f1_value_at_roots_R1] f1_value_at_roots_R2_ABS = [abs(ele) for ele in f1_value_at_roots_R2] f2_value_at_roots_R1_ABS = [abs(ele) for ele in f2_value_at_roots_R1] f2_value_at_roots_R2_ABS = [abs(ele) for ele in f2_value_at_roots_R2] # change the data and use the following code # to plot and save for both the Functions ABSOLUTE VALUES plt.plot(f2_N_R1,f2_value_at_roots_R1_ABS,'.-',label = 'initial Limit : {-3,0}') plt.plot(f2_N_R2,f2_value_at_roots_R2_ABS,'.-',label = 'initial Limit : {-5,5}') plt.xlabel('N',fontsize = 10) plt.ylabel('Function Value at Root',fontsize = 10) plt.xticks(fontsize = 8) plt.yticks(fontsize = 8) plt.title('Bisection Method - Function2 Absolute Value - permissible error : 0.001') plt.grid(linestyle = '--') plt.legend() plt.savefig('bsm-f2-abs.png') plt.show()
27.508929
84
0.676728
577
3,081
3.377816
0.169844
0.064649
0.098512
0.071832
0.735762
0.718317
0.715239
0.667522
0.661365
0.620318
0
0.079408
0.16618
3,081
111
85
27.756757
0.679253
0.147355
0
0.156863
0
0
0.087341
0
0
0
0
0
0
1
0
false
0
0.058824
0
0.058824
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
b12ecc6608a4386c8f3b148789042e9e19e1b1ca
152
py
Python
py_pivot/pivotexample.py
mutazag/misc
dfef362cdd835ef4efd1f2d02e13ff5297ccfc0f
[ "MIT" ]
null
null
null
py_pivot/pivotexample.py
mutazag/misc
dfef362cdd835ef4efd1f2d02e13ff5297ccfc0f
[ "MIT" ]
null
null
null
py_pivot/pivotexample.py
mutazag/misc
dfef362cdd835ef4efd1f2d02e13ff5297ccfc0f
[ "MIT" ]
null
null
null
#%% import pandas as pd df = pd.read_csv('df1.csv') # %% df.melt(id_vars=['Index']).value.notna() # %% df.melt(id_vars=['Index']).value.dropna() # %%
13.818182
41
0.598684
24
152
3.666667
0.625
0.136364
0.181818
0.272727
0.5
0.5
0
0
0
0
0
0.007463
0.118421
152
10
42
15.2
0.649254
0.072368
0
0
0
0
0.124088
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
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
0
0
0
0
0
0
0
3
b150bc49db0ae27fc279c250bb282c701190234e
4,789
py
Python
design/migrations/0016_customerorderinfo_customerorderproduct.py
pincoin/iclover
890fcbd836ebffa0de8cf9fbabee55f068b3bc8b
[ "MIT" ]
1
2019-07-20T09:51:53.000Z
2019-07-20T09:51:53.000Z
design/migrations/0016_customerorderinfo_customerorderproduct.py
pincoin/iclover
890fcbd836ebffa0de8cf9fbabee55f068b3bc8b
[ "MIT" ]
11
2019-07-26T02:23:52.000Z
2022-03-11T23:41:09.000Z
design/migrations/0016_customerorderinfo_customerorderproduct.py
pincoin/iclover
890fcbd836ebffa0de8cf9fbabee55f068b3bc8b
[ "MIT" ]
1
2019-07-26T02:16:49.000Z
2019-07-26T02:16:49.000Z
# Generated by Django 2.1.7 on 2019-09-30 06:52 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import model_utils.fields class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('design', '0015_auto_20190927_1846'), ] operations = [ migrations.CreateModel( name='CustomerOrderInfo', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), ('name', models.CharField(blank=True, max_length=255, null=True, verbose_name='회사명')), ('uuid', models.CharField(blank=True, max_length=255, null=True, verbose_name='uuid')), ('code', models.IntegerField(blank=True, null=True, verbose_name='사업자번호')), ('phone', models.CharField(blank=True, max_length=255, verbose_name='폰 번호')), ('address', models.CharField(blank=True, max_length=255, verbose_name='주소')), ('address2', models.CharField(blank=True, max_length=255, verbose_name='주소2')), ('address_detail', models.CharField(blank=True, max_length=255, verbose_name='상세주소')), ('address_option', models.CharField(blank=True, max_length=255, verbose_name='주소 참고')), ('bill_select', models.IntegerField(blank=True, choices=[(0, '세금계산서'), (1, '사업자 지출증빙'), (2, '현금 영수증'), (3, '미발행')], null=True, verbose_name='사업자 상태')), ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='고객')), ], options={ 'verbose_name': '고객 주문 기본 정보', 'verbose_name_plural': '고객 주문 기본 정보', }, ), migrations.CreateModel( name='CustomerOrderProduct', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), ('size', models.CharField(blank=True, max_length=255, null=True, verbose_name='규격 size')), ('size_value', models.CharField(blank=True, max_length=255, null=True, verbose_name='규격 size value')), ('paper', models.CharField(blank=True, max_length=255, null=True, verbose_name='용지 paper')), ('paper_value', models.CharField(blank=True, max_length=255, null=True, verbose_name='용지 paper value')), ('side', models.CharField(blank=True, max_length=255, null=True, verbose_name='인쇄 side')), ('side_value', models.CharField(blank=True, max_length=255, null=True, verbose_name='인쇄 side value')), ('deal', models.CharField(blank=True, max_length=255, null=True, verbose_name='수량 deal')), ('deal_value', models.CharField(blank=True, max_length=255, null=True, verbose_name='수량 deal value')), ('option1', models.CharField(blank=True, max_length=255, null=True, verbose_name='옵션1 option1')), ('option1_value', models.CharField(blank=True, max_length=255, null=True, verbose_name='옵션1 option1 value')), ('option2', models.CharField(blank=True, max_length=255, null=True, verbose_name='옵션1 option2')), ('option2_value', models.CharField(blank=True, max_length=255, null=True, verbose_name='옵션1 option2 value')), ('supplier', models.CharField(blank=True, max_length=255, null=True, verbose_name='매입')), ('sell', models.DecimalField(blank=True, decimal_places=4, default=0, max_digits=11, verbose_name='sell')), ('sell_opposition', models.DecimalField(blank=True, decimal_places=4, default=0, max_digits=11, verbose_name='buy')), ('sectors_category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='design.CustomerOrderInfo', verbose_name='고객 주문 정보')), ], options={ 'verbose_name': '고객 주문 품목', 'verbose_name_plural': '고객 주문 품목', }, ), ]
69.405797
181
0.638755
569
4,789
5.210896
0.221441
0.133558
0.134907
0.161889
0.716358
0.687352
0.687352
0.687352
0.687352
0.639798
0
0.031034
0.212779
4,789
68
182
70.426471
0.755438
0.009397
0
0.258065
1
0
0.145297
0.009911
0
0
0
0
0
1
0
false
0
0.080645
0
0.129032
0
0
0
0
null
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3