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
f98794c5de420ea8b8bf082e75a34db43b866731
92
py
Python
__init__.py
edmw/python-app
df18c3fc949f6f5407cc96e2af80073217a6c358
[ "MIT" ]
null
null
null
__init__.py
edmw/python-app
df18c3fc949f6f5407cc96e2af80073217a6c358
[ "MIT" ]
null
null
null
__init__.py
edmw/python-app
df18c3fc949f6f5407cc96e2af80073217a6c358
[ "MIT" ]
null
null
null
# coding: utf-8 __version__ = "1.0.0" from .script import Script from .error import Error
13.142857
26
0.717391
15
92
4.133333
0.666667
0
0
0
0
0
0
0
0
0
0
0.052632
0.173913
92
6
27
15.333333
0.763158
0.141304
0
0
0
0
0.064935
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
f9a5c9a53223e83bbc34026586a75629cc223b52
318
py
Python
viberbot/api/bot_configuration.py
TeamCodeCreator/ViberBot
aefd6742ddab47546698f8a2a17a21a32a3a417d
[ "Apache-2.0" ]
169
2016-12-01T00:06:23.000Z
2022-03-30T02:55:09.000Z
viberbot/api/bot_configuration.py
TeamCodeCreator/ViberBot
aefd6742ddab47546698f8a2a17a21a32a3a417d
[ "Apache-2.0" ]
2
2017-05-24T08:11:02.000Z
2020-12-30T12:25:17.000Z
viberbot/api/bot_configuration.py
Micuk/viber-bot-python
c090e40a2270f3fec5b5cd34f83334a5797d2bdd
[ "Apache-2.0" ]
80
2017-01-16T15:35:01.000Z
2022-01-26T22:11:32.000Z
class BotConfiguration(object): def __init__(self, auth_token, name, avatar): self._auth_token = auth_token self._name = name self._avatar = avatar @property def name(self): return self._name @property def avatar(self): return self._avatar @property def auth_token(self): return self._auth_token
17.666667
46
0.738994
44
318
5
0.272727
0.204545
0.177273
0
0
0
0
0
0
0
0
0
0.166667
318
17
47
18.705882
0.830189
0
0
0.214286
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0
0.214286
0.571429
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
1
1
0
0
4
f9acbc7dcee90f890e1512dc0aa3cc5ca2980834
145
py
Python
src/nodes/arithmetics/MULModel.py
LukasTinnes/Grim
dcb4ea8db4644e43e35c5dc40bf6c28a529016af
[ "Unlicense" ]
2
2021-05-27T00:56:23.000Z
2021-06-19T04:08:30.000Z
src/nodes/arithmetics/MULModel.py
LukasTinnes/Grim
dcb4ea8db4644e43e35c5dc40bf6c28a529016af
[ "Unlicense" ]
null
null
null
src/nodes/arithmetics/MULModel.py
LukasTinnes/Grim
dcb4ea8db4644e43e35c5dc40bf6c28a529016af
[ "Unlicense" ]
null
null
null
from nodes.arithmetics.BaseDataModel import BaseDataModel class MULModel(BaseDataModel): name = "Mul" def compute(self): pass
16.111111
57
0.710345
15
145
6.866667
0.866667
0
0
0
0
0
0
0
0
0
0
0
0.213793
145
8
58
18.125
0.903509
0
0
0
0
0
0.02069
0
0
0
0
0
0
1
0.2
false
0.2
0.2
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
4
f9b2c209b645c96bd794590949d1f2b0a0989fab
7,928
py
Python
evalml/tests/utils_tests/test_woodwork_utils.py
RG4421/evalml
33c62abe6d107d1da2f54e9e44a90f18aaf916a9
[ "BSD-3-Clause" ]
null
null
null
evalml/tests/utils_tests/test_woodwork_utils.py
RG4421/evalml
33c62abe6d107d1da2f54e9e44a90f18aaf916a9
[ "BSD-3-Clause" ]
13
2021-03-04T19:29:09.000Z
2022-03-07T01:00:43.000Z
evalml/tests/utils_tests/test_woodwork_utils.py
RG4421/evalml
33c62abe6d107d1da2f54e9e44a90f18aaf916a9
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import pandas as pd import woodwork as ww from evalml.utils import _convert_woodwork_types_wrapper, infer_feature_types def test_convert_woodwork_types_wrapper_with_nan(): y = _convert_woodwork_types_wrapper(pd.Series([1, 2, None], dtype="Int64")) pd.testing.assert_series_equal(y, pd.Series([1, 2, np.nan], dtype="float64")) y = _convert_woodwork_types_wrapper(pd.array([1, 2, None], dtype="Int64")) pd.testing.assert_series_equal(y, pd.Series([1, 2, np.nan], dtype="float64")) y = _convert_woodwork_types_wrapper(pd.Series(["a", "b", None], dtype="string")) pd.testing.assert_series_equal(y, pd.Series(["a", "b", np.nan], dtype="object")) y = _convert_woodwork_types_wrapper(pd.array(["a", "b", None], dtype="string")) pd.testing.assert_series_equal(y, pd.Series(["a", "b", np.nan], dtype="object")) y = _convert_woodwork_types_wrapper(pd.Series([True, False, None], dtype="boolean")) pd.testing.assert_series_equal(y, pd.Series([True, False, np.nan])) y = _convert_woodwork_types_wrapper(pd.array([True, False, None], dtype="boolean")) pd.testing.assert_series_equal(y, pd.Series([True, False, np.nan])) def test_convert_woodwork_types_wrapper(): y = _convert_woodwork_types_wrapper(pd.Series([1, 2, 3], dtype="Int64")) pd.testing.assert_series_equal(y, pd.Series([1, 2, 3], dtype="int64")) y = _convert_woodwork_types_wrapper(pd.array([1, 2, 3], dtype="Int64")) pd.testing.assert_series_equal(y, pd.Series([1, 2, 3], dtype="int64")) y = _convert_woodwork_types_wrapper(pd.Series(["a", "b", "a"], dtype="string")) pd.testing.assert_series_equal(y, pd.Series(["a", "b", "a"], dtype="object")) y = _convert_woodwork_types_wrapper(pd.array(["a", "b", "a"], dtype="string")) pd.testing.assert_series_equal(y, pd.Series(["a", "b", "a"], dtype="object")) y = _convert_woodwork_types_wrapper(pd.Series([True, False, True], dtype="boolean")) pd.testing.assert_series_equal(y, pd.Series([True, False, True], dtype="bool")) y = _convert_woodwork_types_wrapper(pd.array([True, False, True], dtype="boolean")) pd.testing.assert_series_equal(y, pd.Series([True, False, True], dtype="bool")) def test_convert_woodwork_types_wrapper_series_name(): name = "my series name" series_with_name = pd.Series([1, 2, 3], name=name) y = _convert_woodwork_types_wrapper(series_with_name) assert y.name == name def test_convert_woodwork_types_wrapper_dataframe(): X = pd.DataFrame({"Int series": pd.Series([1, 2, 3], dtype="Int64"), "Int array": pd.array([1, 2, 3], dtype="Int64"), "Int series with nan": pd.Series([1, 2, None], dtype="Int64"), "Int array with nan": pd.array([1, 2, None], dtype="Int64"), "string series": pd.Series(["a", "b", "a"], dtype="string"), "string array": pd.array(["a", "b", "a"], dtype="string"), "string series with nan": pd.Series(["a", "b", None], dtype="string"), "string array with nan": pd.array(["a", "b", None], dtype="string"), "boolean series": pd.Series([True, False, True], dtype="boolean"), "boolean array": pd.array([True, False, True], dtype="boolean"), "boolean series with nan": pd.Series([True, False, None], dtype="boolean"), "boolean array with nan": pd.array([True, False, None], dtype="boolean") }) X_expected = pd.DataFrame({"Int series": pd.Series([1, 2, 3], dtype="int64"), "Int array": pd.array([1, 2, 3], dtype="int64"), "Int series with nan": pd.Series([1, 2, np.nan], dtype="float64"), "Int array with nan": pd.array([1, 2, np.nan], dtype="float64"), "string series": pd.Series(["a", "b", "a"], dtype="object"), "string array": pd.array(["a", "b", "a"], dtype="object"), "string series with nan": pd.Series(["a", "b", np.nan], dtype="object"), "string array with nan": pd.array(["a", "b", np.nan], dtype="object"), "boolean series": pd.Series([True, False, True], dtype="bool"), "boolean array": pd.array([True, False, True], dtype="bool"), "boolean series with nan": pd.Series([True, False, np.nan], dtype="object"), "boolean array with nan": pd.array([True, False, np.nan], dtype="object") }) pd.testing.assert_frame_equal(X_expected, _convert_woodwork_types_wrapper(X)) def testinfer_feature_types(): X_dt = ww.DataTable(pd.DataFrame([[1, 2], [3, 4]])) pd.testing.assert_frame_equal(X_dt.to_dataframe(), infer_feature_types(X_dt).to_dataframe()) X_dc = ww.DataColumn(pd.Series([1, 2, 3, 4])) pd.testing.assert_series_equal(X_dc.to_series(), infer_feature_types(X_dc).to_series()) X_pd = pd.DataFrame({0: pd.Series([1, 2], dtype="Int64"), 1: pd.Series([3, 4], dtype="Int64")}) pd.testing.assert_frame_equal(X_pd, infer_feature_types(X_pd).to_dataframe()) X_pd = pd.Series([1, 2, 3, 4], dtype="Int64") pd.testing.assert_series_equal(X_pd, infer_feature_types(X_pd).to_series()) X_list = [1, 2, 3, 4] X_expected = ww.DataColumn(pd.Series(X_list)) pd.testing.assert_series_equal(X_expected.to_series(), infer_feature_types(X_list).to_series()) assert X_list == [1, 2, 3, 4] X_np = np.array([1, 2, 3, 4]) X_expected = ww.DataColumn(pd.Series(X_np)) pd.testing.assert_series_equal(X_expected.to_series(), infer_feature_types(X_np).to_series()) assert np.array_equal(X_np, np.array([1, 2, 3, 4])) X_np = np.array([[1, 2], [3, 4]]) X_expected = ww.DataTable(pd.DataFrame(X_np)) pd.testing.assert_frame_equal(X_expected.to_dataframe(), infer_feature_types(X_np).to_dataframe()) assert np.array_equal(X_np, np.array([[1, 2], [3, 4]])) def testinfer_feature_types_series_name(): name = "column with name" X_pd = pd.Series([1, 2, 3, 4], dtype="Int64", name=name) X_dc = infer_feature_types(X_pd) assert X_dc.name == name pd.testing.assert_series_equal(X_pd, X_dc.to_series()) def test_infer_feature_types_dataframe(): X_pd = pd.DataFrame({0: pd.Series([1, 2]), 1: pd.Series([3, 4])}) pd.testing.assert_frame_equal(X_pd, infer_feature_types(X_pd).to_dataframe(), check_dtype=False) X_pd = pd.DataFrame({0: pd.Series([1, 2], dtype="Int64"), 1: pd.Series([3, 4], dtype="Int64")}) pd.testing.assert_frame_equal(X_pd, infer_feature_types(X_pd).to_dataframe()) X_expected = X_pd.copy() X_expected[0] = X_expected[0].astype("category") pd.testing.assert_frame_equal(X_expected, infer_feature_types(X_pd, {0: "categorical"}).to_dataframe()) pd.testing.assert_frame_equal(X_expected, infer_feature_types(X_pd, {0: ww.logical_types.Categorical}).to_dataframe()) def test_infer_feature_types_series(): X_pd = pd.Series([1, 2, 3, 4]) X_expected = X_pd.astype("Int64") pd.testing.assert_series_equal(X_expected, infer_feature_types(X_pd).to_series()) X_pd = pd.Series([1, 2, 3, 4], dtype="Int64") pd.testing.assert_series_equal(X_pd, infer_feature_types(X_pd).to_series()) X_pd = pd.Series([1, 2, 3, 4], dtype="Int64") X_expected = X_pd.astype("category") pd.testing.assert_series_equal(X_expected, infer_feature_types(X_pd, "categorical").to_series()) X_pd = pd.Series([1, 2, 3, 4], dtype="Int64") X_expected = X_pd.astype("category") pd.testing.assert_series_equal(X_expected, infer_feature_types(X_pd, ww.logical_types.Categorical).to_series())
51.816993
122
0.625757
1,167
7,928
4.005141
0.054841
0.078733
0.093068
0.044929
0.878477
0.831836
0.760804
0.704964
0.570817
0.525888
0
0.027339
0.201816
7,928
152
123
52.157895
0.711283
0
0
0.245614
0
0
0.104188
0
0
0
0
0
0.298246
1
0.070175
false
0
0.035088
0
0.105263
0
0
0
0
null
0
0
0
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
f9d3fbf562a501b99215b9a5b620bbc804612b11
35
py
Python
tests.py
nightlxight/delightfully
e48d3ddfab555195fa0a35c4b14c63c9ebc94be2
[ "MIT" ]
null
null
null
tests.py
nightlxight/delightfully
e48d3ddfab555195fa0a35c4b14c63c9ebc94be2
[ "MIT" ]
null
null
null
tests.py
nightlxight/delightfully
e48d3ddfab555195fa0a35c4b14c63c9ebc94be2
[ "MIT" ]
null
null
null
x = 10 print(x) """ tests here """
5.833333
10
0.514286
6
35
3
0.833333
0
0
0
0
0
0
0
0
0
0
0.074074
0.228571
35
6
11
5.833333
0.592593
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
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
1
0
4
dda33bc1bc8944486466c39abfdb88938c236caa
321
py
Python
IMLearn/learners/regressors/__init__.py
roeykelner/IML.HUJI
ce818fed67dc0f34b0474030f062374481967b38
[ "MIT" ]
null
null
null
IMLearn/learners/regressors/__init__.py
roeykelner/IML.HUJI
ce818fed67dc0f34b0474030f062374481967b38
[ "MIT" ]
null
null
null
IMLearn/learners/regressors/__init__.py
roeykelner/IML.HUJI
ce818fed67dc0f34b0474030f062374481967b38
[ "MIT" ]
null
null
null
from .linear_regression import LinearRegression from .polynomial_fitting import PolynomialFitting from .ridge_regression import RidgeRegression from .lasso_regression import LassoRegression __all__ = ["LinearRegression", "PolynomialFitting", "RidgeRegression", "LassoRegression"]
35.666667
50
0.747664
25
321
9.28
0.52
0.206897
0
0
0
0
0
0
0
0
0
0
0.196262
321
9
51
35.666667
0.899225
0
0
0
0
0
0.200637
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
ddae756c181d468345752bb0e72066e92ae88441
251
py
Python
flashcards/admin.py
YellowAndGreen/Anki2
53165465b94ce4d27f3683e030564c8f4289f57f
[ "MIT" ]
null
null
null
flashcards/admin.py
YellowAndGreen/Anki2
53165465b94ce4d27f3683e030564c8f4289f57f
[ "MIT" ]
null
null
null
flashcards/admin.py
YellowAndGreen/Anki2
53165465b94ce4d27f3683e030564c8f4289f57f
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Card # Register your models here. @admin.register(Card) class CardAdmin(admin.ModelAdmin): list_display = ['id', 'group', 'question'] # prepopulated_fields = {'slug': ('title',)}
25.1
49
0.681275
29
251
5.827586
0.758621
0
0
0
0
0
0
0
0
0
0
0
0.179283
251
9
50
27.888889
0.820388
0.2749
0
0
0
0
0.088235
0
0
0
0
0
0
1
0
false
0
0.4
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
ddb618a1fbd6d56ff06549c89e7caf661f63d3c3
1,410
gyp
Python
test/napi/binding.gyp
legendecas/ShadowNode
02047fc9eca51aef5974d95c5ec58f2ea89983fe
[ "Apache-2.0" ]
1,144
2018-12-18T09:46:47.000Z
2022-03-07T14:51:46.000Z
test/napi/binding.gyp
yorkie/fringejs
b03929d5500fd0823fdc3bc37c9b82ba88cc3f6d
[ "Apache-2.0" ]
281
2018-02-13T18:50:54.000Z
2019-01-26T06:17:56.000Z
test/napi/binding.gyp
yorkie/fringejs
b03929d5500fd0823fdc3bc37c9b82ba88cc3f6d
[ "Apache-2.0" ]
129
2018-12-18T09:46:50.000Z
2022-03-30T07:30:13.000Z
{ "targets": [ { "target_name": "napi_test", "sources": [ "napi.test.c" ] }, { "target_name": "napi_arguments", "sources": [ "napi_arguments.c" ] }, { "target_name": "napi_async", "sources": [ "napi_async.cc" ] }, { "target_name": "napi_construct", "sources": [ "napi_construct.c" ] }, { "target_name": "napi_error", "sources": [ "napi_error.c" ] }, { "target_name": "napi_fatal_error", "sources": [ "napi_fatal_error.c" ] }, { "target_name": "napi_make_callback_recurse", "sources": [ "napi_make_callback_recurse.cc" ] }, { "target_name": "napi_make_callback", "sources": [ "napi_make_callback.c" ] }, { "target_name": "napi_object_wrap", "sources": [ "napi_object_wrap.c" ] }, { "target_name": "napi_reference", "sources": [ "napi_reference.c" ] }, { "target_name": "napi_new_target", "sources": [ "napi_new_target.c" ] }, { "target_name": "napi_string", "sources": [ "napi_string.c" ] }, { "target_name": "napi_thread_safe", "sources": [ "napi_thread_safe.c" ] }, { "target_name": "napi_tsfn", "sources": [ "napi_tsfn.c" ] }, { "target_name": "napi_typedarray", "sources": [ "napi_typedarray.c" ] } ] }
21.692308
52
0.509929
135
1,410
4.896296
0.185185
0.226929
0.3177
0.272315
0.118003
0
0
0
0
0
0
0
0.304255
1,410
64
53
22.03125
0.673802
0
0
0
0
0
0.521277
0.039007
0
0
0
0
0
1
0
true
0
0
0
0
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
1
0
0
0
0
0
0
4
ddb7fdc6374ab3cb1a7ddcb785b6ca2e792c41a8
176
py
Python
backend/sourcebans/forms.py
b3none/Tensor
6c70c7d3ade6eabe4162d0b9eef0923c79ea1eba
[ "MIT" ]
null
null
null
backend/sourcebans/forms.py
b3none/Tensor
6c70c7d3ade6eabe4162d0b9eef0923c79ea1eba
[ "MIT" ]
null
null
null
backend/sourcebans/forms.py
b3none/Tensor
6c70c7d3ade6eabe4162d0b9eef0923c79ea1eba
[ "MIT" ]
3
2021-09-06T18:01:52.000Z
2021-10-18T02:49:53.000Z
from django import forms from .models import SbProtests, SbBans class BanProtest(forms.Form): reason = forms.CharField(widget=forms.Textarea) email = forms.EmailField()
22
49
0.772727
23
176
5.956522
0.73913
0
0
0
0
0
0
0
0
0
0
0
0.130682
176
7
50
25.142857
0.888889
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0.4
null
null
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
4
ddd8942144a5ccd72bbefdbc4ff5b0c0d15cfc8c
944
py
Python
moteur/models.py
fideledegni/eeia-moteur-recherche
7db64c3a8decb04cf92ac32ba473cd92eb1136bb
[ "MIT" ]
null
null
null
moteur/models.py
fideledegni/eeia-moteur-recherche
7db64c3a8decb04cf92ac32ba473cd92eb1136bb
[ "MIT" ]
null
null
null
moteur/models.py
fideledegni/eeia-moteur-recherche
7db64c3a8decb04cf92ac32ba473cd92eb1136bb
[ "MIT" ]
null
null
null
from django.db import models from datetime import timedelta from django.utils import timezone class Search(models.Model): search_text = models.CharField(max_length=200) search_date = models.DateTimeField('search date') clicked_article_1 = models.CharField(max_length=200) clicked_article_2 = models.CharField(max_length=200) clicked_article_3 = models.CharField(max_length=200) def was_searched_recently(self): return self.search_date >= timezone.now() - timedelta(days=1) def __str__(self): return self.search_text # def default_top_search_texts(): # return [] class Article(models.Model): name = models.CharField(max_length=200) image_name = models.CharField(max_length=50) description = models.CharField(max_length=500) def get_top_search_texts(self): st = Search.objects.filter(clicked_article_1=self.name) return list(s.search_text for s in st) def __str__(self): return self.name
29.5
65
0.762712
135
944
5.059259
0.362963
0.153734
0.18448
0.245974
0.34407
0.120059
0.120059
0
0
0
0
0.030788
0.139831
944
31
66
30.451613
0.810345
0.045551
0
0.090909
0
0
0.012249
0
0
0
0
0
0
1
0.181818
false
0
0.136364
0.136364
0.954545
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
4
fb1ae75bc728fbb7f8ce7ce360309a76aa954a2d
162
py
Python
exercicios-python/curso-python/ex024.py
PabloLanza/curso-python3
34cf44a2467fa239ba4019e085833002ad9b76a1
[ "MIT" ]
null
null
null
exercicios-python/curso-python/ex024.py
PabloLanza/curso-python3
34cf44a2467fa239ba4019e085833002ad9b76a1
[ "MIT" ]
null
null
null
exercicios-python/curso-python/ex024.py
PabloLanza/curso-python3
34cf44a2467fa239ba4019e085833002ad9b76a1
[ "MIT" ]
null
null
null
num = int(input('Digite um número: ')) n = num % 2 if n == 0: print('O número {} é par.'.format(num)) else: print('O número {} é ímpar.'.format(num))
23.142857
45
0.555556
27
162
3.333333
0.62963
0.133333
0.266667
0.288889
0
0
0
0
0
0
0
0.016129
0.234568
162
7
46
23.142857
0.709677
0
0
0
0
0
0.343558
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
fb1c137100f61c8469bd4863a381ade4a38b57cc
2,895
py
Python
vector_common/vector_ros/src/vector_joint_interface/angles.py
si-machines/vector_v1
6a9111e0d8eb00827c8a97878f939509a433194b
[ "BSD-3-Clause" ]
null
null
null
vector_common/vector_ros/src/vector_joint_interface/angles.py
si-machines/vector_v1
6a9111e0d8eb00827c8a97878f939509a433194b
[ "BSD-3-Clause" ]
null
null
null
vector_common/vector_ros/src/vector_joint_interface/angles.py
si-machines/vector_v1
6a9111e0d8eb00827c8a97878f939509a433194b
[ "BSD-3-Clause" ]
1
2020-12-29T21:17:20.000Z
2020-12-29T21:17:20.000Z
"""-------------------------------------------------------------------- COPYRIGHT 2016 Stanley Innovation Inc. Software License Agreement: The software supplied herewith by Stanley Innovation Inc. (the "Company") for its licensed SI Vector Platform is intended and supplied to you, the Company's customer, for use solely and exclusively with Stanley Innovation products. The software is owned by the Company and/or its supplier, and is protected under applicable copyright laws. All rights are reserved. Any use in violation of the foregoing restrictions may subject the user to criminal sanctions under applicable laws, as well as to civil liability for the breach of the terms and conditions of this license. The Company may immediately terminate this Agreement upon your use of the software with any products that are not Stanley Innovation products. The software was written using Python programming language. Your use of the software is therefore subject to the terms and conditions of the OSI- approved open source license viewable at http://www.python.org/. You are solely responsible for ensuring your compliance with the Python open source license. You shall indemnify, defend and hold the Company harmless from any claims, demands, liabilities or expenses, including reasonable attorneys fees, incurred by the Company as a result of any claim or proceeding against the Company arising out of or based upon: (i) The combination, operation or use of the software by you with any hardware, products, programs or data not supplied or approved in writing by the Company, if such claim or proceeding would have been avoided but for such combination, operation or use. (ii) The modification of the software by or on behalf of you (iii) Your use of the software. THIS SOFTWARE IS PROVIDED IN AN "AS IS" CONDITION. NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. \file angles.py \brief This module contains a collection of angle operations for rotational calculations \Platform: Linux/ROS Indigo --------------------------------------------------------------------""" import math M_PI = math.pi def deg_to_rad(degrees): return degrees * (M_PI / 180.0) def rad_to_deg(rads): return rads * (180.0 / M_PI) def wrap_angle(angle_rad): ret = ( angle_rad + math.pi) % (2 * math.pi ) - math.pi return ret def get_smallest_difference_to_cont_angle(des_norm,pres_cont): present =( pres_cont + math.pi) % (2 * math.pi ) desired =( des_norm + math.pi) % (2 * math.pi ) return round(wrap_angle(desired-present),4)
38.6
83
0.724007
424
2,895
4.896226
0.45283
0.043353
0.03131
0.030829
0.104528
0
0
0
0
0
0
0.006757
0.182038
2,895
74
84
39.121622
0.869932
0.828325
0
0
0
0
0
0
0
0
0
0
0
1
0.307692
false
0
0.076923
0.153846
0.692308
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
1
0
0
4
fb392949dbfa1ed4d25cf9f9b09a91bc82bb43f6
354
py
Python
gravpy/noise.py
transientlunatic/grasshopper
1d3822427970d200341ff9d2823949fb4b27e001
[ "0BSD" ]
3
2020-09-26T01:27:13.000Z
2020-09-30T05:47:42.000Z
gravpy/noise.py
transientlunatic/gravpy
1d3822427970d200341ff9d2823949fb4b27e001
[ "0BSD" ]
null
null
null
gravpy/noise.py
transientlunatic/gravpy
1d3822427970d200341ff9d2823949fb4b27e001
[ "0BSD" ]
null
null
null
import astropy.units as u import astropy.constants as c import matplotlib.pyplot as plt import numpy as np from scipy import interpolate import scipy.integrate as integrate import numpy.linalg as la import os class NoiseSource(object): """ This is the base class for all noise sources which we might want to define or plot. """ pass
18.631579
87
0.751412
56
354
4.75
0.696429
0.097744
0
0
0
0
0
0
0
0
0
0
0.206215
354
18
88
19.666667
0.946619
0.234463
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.1
0.8
0
0.9
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
1
0
0
4
3485348ee803bcd90af8b5d66b7662ef0ffadb21
1,978
py
Python
2019/10/test_part1.py
maguesse/adventofcode
126f0baac4cf35bbfc31f1306682586cf0e5883e
[ "MIT" ]
null
null
null
2019/10/test_part1.py
maguesse/adventofcode
126f0baac4cf35bbfc31f1306682586cf0e5883e
[ "MIT" ]
null
null
null
2019/10/test_part1.py
maguesse/adventofcode
126f0baac4cf35bbfc31f1306682586cf0e5883e
[ "MIT" ]
null
null
null
import main def solve(data): obj = main.Day10(data) return obj.solve_part1() def test_field1(): data = ['.#..#', '.....', '#####', '....#', '...##'] assert ((3,4), 8) == solve(data) def test_field2(): data = ['......#.#.', '#..#.#....', '..#######.', '.#.#.###..', '.#..#.....', '..#....#.#', '#..#....#.', '.##.#..###', '##...#..#.', '.#....####',] assert ((5,8), 33) == solve(data) def test_field3(): data = ['#.#...#.#.', '.###....#.', '.#....#...', '##.#.#.#.#', '....#.#.#.', '.##..###.#', '..#...##..', '..##....##', '......#...', '.####.###.'] assert ((1,2), 35) == solve(data) def test_field4(): data = ['.#..#..###', '####.###.#', '....###.#.', '..###.##.#', '##.##.#.#.', '....###..#', '..#.#..#.#', '#..#.#.###', '.##...##.#', '.....#.#..',] assert ((6,3), 41) == solve(data) def test_field5(): data = ['.#..##.###...#######', '##.############..##.', '.#.######.########.#', '.###.#######.####.#.', '#####.##.#.##.###.##', '..#####..#.#########', '####################', '#.####....###.#.#.##', '##.#################', '#####.##.###..####..', '..######..##.#######', '####.##.####...##..#', '.#####..#.######.###', '##...#.##########...', '#.##########.#######', '.####.#.###.###.#.##', '....##.##.###..#####', '.#.#.###########.###', '#.#.#.#####.####.###', '###.##.####.##.#..##',] assert ((11,13), 210) == solve(data)
25.037975
40
0.123862
63
1,978
3.793651
0.460317
0.225941
0.200837
0.267782
0
0
0
0
0
0
0
0.02453
0.381699
1,978
78
41
25.358974
0.170891
0
0
0
0
0
0.366532
0
0
0
0
0
0.073529
1
0.088235
false
0
0.014706
0
0.117647
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
34efb8fb61ed89d53b2d533188f6d50e7ae8df7a
283
py
Python
linode/objects/account/__init__.py
awiddersheim/linode-api-python
4bb0dba0cc76321b9ca760e85d164b750cc95fa6
[ "BSD-3-Clause" ]
null
null
null
linode/objects/account/__init__.py
awiddersheim/linode-api-python
4bb0dba0cc76321b9ca760e85d164b750cc95fa6
[ "BSD-3-Clause" ]
null
null
null
linode/objects/account/__init__.py
awiddersheim/linode-api-python
4bb0dba0cc76321b9ca760e85d164b750cc95fa6
[ "BSD-3-Clause" ]
null
null
null
from .user import User from .event import Event from .oauth_client import OAuthClient from .settings import AccountSettings from .user_grant import UserGrants from .invoice import Invoice from .invoiceitem import InvoiceItem from .payment import Payment from .account import Account
28.3
37
0.840989
38
283
6.210526
0.394737
0.067797
0
0
0
0
0
0
0
0
0
0
0.127208
283
9
38
31.444444
0.955466
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
1
0
0
4
34f95d5f4ec63200909c903f0bc32d2a93e94c4f
218
py
Python
coinpayments/admin.py
unilot/pre-ico
6d4bd6648b3a1fbc169bd3e331385736d3974046
[ "MIT" ]
1
2018-08-03T03:32:32.000Z
2018-08-03T03:32:32.000Z
coinpayments/admin.py
unilot/pre-ico
6d4bd6648b3a1fbc169bd3e331385736d3974046
[ "MIT" ]
8
2020-02-11T21:44:14.000Z
2022-01-13T00:33:35.000Z
coinpayments/admin.py
unilot/pre-ico
6d4bd6648b3a1fbc169bd3e331385736d3974046
[ "MIT" ]
1
2018-02-17T12:52:46.000Z
2018-02-17T12:52:46.000Z
from django.contrib import admin from . import models class TransactionAdmin(admin.ModelAdmin): list_display = ('txn_id', 'user', 'currency', 'amount',) admin.site.register(models.Transaction, TransactionAdmin)
24.222222
60
0.761468
25
218
6.56
0.76
0
0
0
0
0
0
0
0
0
0
0
0.114679
218
8
61
27.25
0.849741
0
0
0
0
0
0.110092
0
0
0
0
0
0
1
0
false
0
0.4
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
9b67cfec47cfcc38b2a4a0ce2940de7243bc2895
229
py
Python
tests/backends/base/test_features.py
ni-ning/django
2e7ba6057cfc82a15a22b6021cd60cf307152e2d
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
61,676
2015-01-01T00:05:13.000Z
2022-03-31T20:37:54.000Z
tests/backends/base/test_features.py
ni-ning/django
2e7ba6057cfc82a15a22b6021cd60cf307152e2d
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
8,884
2015-01-01T00:12:05.000Z
2022-03-31T19:53:11.000Z
tests/backends/base/test_features.py
mustafa0x/django
d7394cfa13a4d1a02356e3a83e10ec100fbb9948
[ "BSD-3-Clause", "0BSD" ]
33,143
2015-01-01T02:04:52.000Z
2022-03-31T19:42:46.000Z
from django.db import connection from django.test import SimpleTestCase class TestDatabaseFeatures(SimpleTestCase): def test_nonexistent_feature(self): self.assertFalse(hasattr(connection.features, 'nonexistent'))
25.444444
69
0.799127
24
229
7.541667
0.666667
0.110497
0
0
0
0
0
0
0
0
0
0
0.126638
229
8
70
28.625
0.905
0
0
0
0
0
0.048035
0
0
0
0
0
0.2
1
0.2
false
0
0.4
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
9b8a25f6fef9889562d72bbff5889eb9aacee087
87
py
Python
photeo/apps.py
AjayRajNelapudi/Voteo
3d7d742b5e4a99b7b67068ca3a3baf7796bb6012
[ "MIT" ]
null
null
null
photeo/apps.py
AjayRajNelapudi/Voteo
3d7d742b5e4a99b7b67068ca3a3baf7796bb6012
[ "MIT" ]
8
2020-02-12T03:18:58.000Z
2021-06-10T19:37:39.000Z
photeo/apps.py
AjayRajNelapudi/Voteo
3d7d742b5e4a99b7b67068ca3a3baf7796bb6012
[ "MIT" ]
null
null
null
from django.apps import AppConfig class PhoteoConfig(AppConfig): name = 'photeo'
14.5
33
0.747126
10
87
6.5
0.9
0
0
0
0
0
0
0
0
0
0
0
0.172414
87
5
34
17.4
0.902778
0
0
0
0
0
0.068966
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
9ba25ce33306bf432ea64144dadb380bf07c9f49
1,067
py
Python
Chapter3/exercise8.py
ion-training/python-practical-programming
1b048da3c681ba534a6f0a8e3e1c3dc89f73694c
[ "MIT" ]
null
null
null
Chapter3/exercise8.py
ion-training/python-practical-programming
1b048da3c681ba534a6f0a8e3e1c3dc89f73694c
[ "MIT" ]
null
null
null
Chapter3/exercise8.py
ion-training/python-practical-programming
1b048da3c681ba534a6f0a8e3e1c3dc89f73694c
[ "MIT" ]
null
null
null
# Complete the examples in the docstring and then write the body of the following function: # The Questions # Q1. What do you name the function? # Q2. What are the parameters, and what types of information do they refer to? # Q3. What calculations are you doing with that information? # Q4. What information does the function return? # Q5. Does it work like you expect it to? # Implementation # 1 Examples and function name # 2 Header: Decide param names and types, and return type. Write header of the func. # 3 Description: short description of the function for others to read # 4 Body: write body of the function # 5 Test: run examples to make sure you function body is correct import math def weeks_elapsed(day1, day2): """ (int, int) -> int day1 and day2 are days in the same year. Return the number of full weeks that have elapsed between the two days. >>> weeks_elapsed(3, 20) 2 >>> weeks_elapsed(20, 3) 2 >>> weeks_elapsed(8, 5) 0 >>> weeks_elapsed(40, 61) 3 """ return math.floor(abs(day2 - day1) / 7)
32.333333
91
0.701968
173
1,067
4.300578
0.49711
0.080645
0.024194
0
0
0
0
0
0
0
0
0.039807
0.223055
1,067
32
92
33.34375
0.85766
0.837863
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
4
9baeb2257997a0577914c527f314dc3bab93266e
245
py
Python
lego/utils/decorators.py
ollfkaih/lego
b15aacaf09efe90e7f984d25b0e7bddbe12647e8
[ "MIT" ]
45
2017-10-24T12:09:06.000Z
2021-11-03T21:21:03.000Z
lego/utils/decorators.py
ollfkaih/lego
b15aacaf09efe90e7f984d25b0e7bddbe12647e8
[ "MIT" ]
980
2017-10-24T12:29:07.000Z
2022-03-31T04:04:31.000Z
lego/utils/decorators.py
wahello/lego
a0b02f3abc997fe96326e9c9c05b49847170041b
[ "MIT" ]
23
2018-04-11T16:34:22.000Z
2021-11-23T12:28:30.000Z
from django.utils.functional import cached_property class abakus_cached_property(cached_property): def __init__(self, func, name=None, delete_on_save=True): super().__init__(func, name) self.delete_on_save = delete_on_save
30.625
61
0.759184
34
245
4.941176
0.588235
0.25
0.214286
0
0
0
0
0
0
0
0
0
0.155102
245
7
62
35
0.811594
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.6
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
fd04123f405555fd4d327f0b477d463988896922
93
py
Python
Task/Loops-Continue/Python/loops-continue.py
mullikine/RosettaCodeData
4f0027c6ce83daa36118ee8b67915a13cd23ab67
[ "Info-ZIP" ]
5
2021-01-29T20:08:05.000Z
2022-03-22T06:16:05.000Z
Task/Loops-Continue/Python/loops-continue.py
seanwallawalla-forks/RosettaCodeData
9ad63ea473a958506c041077f1d810c0c7c8c18d
[ "Info-ZIP" ]
null
null
null
Task/Loops-Continue/Python/loops-continue.py
seanwallawalla-forks/RosettaCodeData
9ad63ea473a958506c041077f1d810c0c7c8c18d
[ "Info-ZIP" ]
1
2021-04-13T04:19:31.000Z
2021-04-13T04:19:31.000Z
for i in xrange(1,11): if i % 5 == 0: print i continue print i, ",",
15.5
22
0.430108
15
93
2.666667
0.733333
0.3
0
0
0
0
0
0
0
0
0
0.09434
0.430108
93
5
23
18.6
0.660377
0
0
0
0
0
0.010753
0
0
0
0
0
0
0
null
null
0
0
null
null
0.4
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
fd27e36bab45ebb879ec07ac91cfe06f75aa813b
208
py
Python
watch/core/apps.py
ResonantGeoData/RD-WATCH
d40b3d7927b9c999b9809291ee97f27d361c4c3a
[ "Apache-2.0" ]
2
2022-01-24T21:43:47.000Z
2022-01-28T05:22:12.000Z
watch/core/apps.py
ResonantGeoData/RD-WATCH
d40b3d7927b9c999b9809291ee97f27d361c4c3a
[ "Apache-2.0" ]
42
2021-07-01T20:12:50.000Z
2022-03-22T17:38:30.000Z
watch/core/apps.py
ResonantGeoData/RD-WATCH
d40b3d7927b9c999b9809291ee97f27d361c4c3a
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class CoreConfig(AppConfig): name = 'watch.core' verbose_name = 'ResonantGeoData WATCH: Core' def ready(self): import watch.core.signals # noqa: F401
20.8
48
0.692308
25
208
5.72
0.72
0.188811
0
0
0
0
0
0
0
0
0
0.018405
0.216346
208
9
49
23.111111
0.858896
0.048077
0
0
0
0
0.188776
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
fd391650bba99a22d3fd3f7a8a55b5d27a3bc7ac
2,085
py
Python
hwtLib/tests/pyUtils/fileUtils_test.py
optical-o/hwtLib
edad621f5ad4cdbea20a5751ff4468979afe2f77
[ "MIT" ]
24
2017-02-23T10:00:50.000Z
2022-01-28T12:20:21.000Z
hwtLib/tests/pyUtils/fileUtils_test.py
optical-o/hwtLib
edad621f5ad4cdbea20a5751ff4468979afe2f77
[ "MIT" ]
32
2017-04-28T10:29:34.000Z
2021-04-27T09:16:43.000Z
hwtLib/tests/pyUtils/fileUtils_test.py
optical-o/hwtLib
edad621f5ad4cdbea20a5751ff4468979afe2f77
[ "MIT" ]
8
2019-09-19T03:34:36.000Z
2022-01-21T06:56:58.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import errno import os from os.path import join from tempfile import TemporaryDirectory import unittest from hwt.pyUtils.fileHelpers import find_files class FileUtilsTC(unittest.TestCase): def mkFile(self, d, fileName): fileName = join(d, fileName) if not os.path.exists(os.path.dirname(fileName)): try: os.makedirs(os.path.dirname(fileName)) except OSError as exc: # Guard against race condition if exc.errno != errno.EEXIST: raise open(fileName, 'w').close() return fileName def assertFound(self, directory, pattern, fileNames, recursive=True): f = set(find_files(directory, pattern, recursive=recursive)) self.assertEqual(f, set(fileNames)) def test_basic(self): with TemporaryDirectory() as d: self.assertFound(d, "*", {}) a = self.mkFile(d, "a.a") self.assertFound(d, "*", {a}) self.assertFound(d, "*.a", {a}) self.assertFound(d, "*.*", {a}) self.assertFound(d, "a.*", {a}) self.assertFound(d, "b.*", {}) self.assertFound(d, "*.b", {}) self.assertFound(d, "", {}) a2 = self.mkFile(d, "a2.a") self.assertFound(d, "*", {a, a2}) self.assertFound(d, "*.a", {a, a2}) self.assertFound(d, "*.*", {a, a2}) self.assertFound(d, "a.*", {a}) a3 = self.mkFile(d, join("a", "b", "c", "d.a")) self.assertFound(d, "*", {a, a2, a3}) self.assertFound(d, "*.a", {a, a2, a3}) self.assertFound(d, "*.*", {a, a2, a3}) self.assertFound(d, "a.*", {a}) self.assertFound(d, "*", {a, a2}, recursive=False) if __name__ == "__main__": suite = unittest.TestSuite() # suite.addTest(FrameTmplTC('test_sWithStartPadding')) suite.addTest(unittest.makeSuite(FileUtilsTC)) runner = unittest.TextTestRunner(verbosity=3) runner.run(suite)
32.578125
73
0.543885
237
2,085
4.734177
0.337553
0.227273
0.242424
0.212121
0.28877
0.270053
0.263815
0.229947
0.229947
0.214795
0
0.010774
0.28777
2,085
63
74
33.095238
0.744781
0.059952
0
0.06383
0
0
0.030675
0
0
0
0
0
0.404255
1
0.06383
false
0
0.12766
0
0.234043
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
4
fd4de65b282992f7c10fe53ba0b9068648a93a33
276
py
Python
ubcs_auxiliary/threading.py
vstadnytskyi/auxiliary
3916af3a147f72071388278385d484b9eacbc66b
[ "BSD-3-Clause" ]
null
null
null
ubcs_auxiliary/threading.py
vstadnytskyi/auxiliary
3916af3a147f72071388278385d484b9eacbc66b
[ "BSD-3-Clause" ]
1
2019-10-16T16:40:27.000Z
2019-10-16T16:40:27.000Z
ubcs_auxiliary/threading.py
vstadnytskyi/auxiliary
3916af3a147f72071388278385d484b9eacbc66b
[ "BSD-3-Clause" ]
1
2020-01-18T05:57:41.000Z
2020-01-18T05:57:41.000Z
from .multithreading import * import warnings warnings.simplefilter('always', DeprecationWarning) warnings.warn("The 'ubcs_auxiliary.threading' class was renamed to 'ubcs_auxiliary.multithreading' to make room for 'multithreading' and 'multiprocessing'", DeprecationWarning )
55.2
177
0.826087
30
276
7.533333
0.7
0.115044
0
0
0
0
0
0
0
0
0
0
0.086957
276
4
178
69
0.896825
0
0
0
0
0.25
0.525362
0.206522
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
fd4eb1176b36c3448731abb909b438f0f69fa2df
119
py
Python
templates/_app_name_/manage/stores.py
opreaalex/skeletout
5cd9772ddc7062c0d1fb02bc1a9b0a97b7ef68d9
[ "MIT" ]
null
null
null
templates/_app_name_/manage/stores.py
opreaalex/skeletout
5cd9772ddc7062c0d1fb02bc1a9b0a97b7ef68d9
[ "MIT" ]
null
null
null
templates/_app_name_/manage/stores.py
opreaalex/skeletout
5cd9772ddc7062c0d1fb02bc1a9b0a97b7ef68d9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ _app_name_.manage.stores ~~~~~~~~~~~~~~~~~~~~~~ store management commands """
14.875
29
0.462185
10
119
5.2
1
0
0
0
0
0
0
0
0
0
0
0.010638
0.210084
119
7
30
17
0.542553
0.815126
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
b5d2bf02f820e4daf26db95dccfc0adc9ba806b8
166
py
Python
tests/test_minifigs.py
Brickster/brickset-cli
b3f3bebe81e0b65547046d88250a0d32e5348749
[ "MIT" ]
null
null
null
tests/test_minifigs.py
Brickster/brickset-cli
b3f3bebe81e0b65547046d88250a0d32e5348749
[ "MIT" ]
null
null
null
tests/test_minifigs.py
Brickster/brickset-cli
b3f3bebe81e0b65547046d88250a0d32e5348749
[ "MIT" ]
1
2021-06-29T03:50:56.000Z
2021-06-29T03:50:56.000Z
import unittest class TestMinifigs(unittest.TestCase): def test_getMinifigs(self): self.fail() def test_updateMinifigs(self): self.fail()
15.090909
38
0.674699
18
166
6.111111
0.611111
0.127273
0.218182
0
0
0
0
0
0
0
0
0
0.228916
166
10
39
16.6
0.859375
0
0
0.333333
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.166667
0
0.666667
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
b5f09dff3feaefe53a976b2c34afdd253de3da06
610
py
Python
tests/multivariate/test_necessary_conditional_entropy.py
Ejjaffe/dit
c9d206f03d1de5a0a298b1d0ea9d79ea5e789ee1
[ "BSD-3-Clause" ]
1
2020-03-13T10:30:11.000Z
2020-03-13T10:30:11.000Z
tests/multivariate/test_necessary_conditional_entropy.py
Ejjaffe/dit
c9d206f03d1de5a0a298b1d0ea9d79ea5e789ee1
[ "BSD-3-Clause" ]
null
null
null
tests/multivariate/test_necessary_conditional_entropy.py
Ejjaffe/dit
c9d206f03d1de5a0a298b1d0ea9d79ea5e789ee1
[ "BSD-3-Clause" ]
null
null
null
""" Tests for dit.multivariate.necessary_conditional_entropy. """ import pytest from dit.distconst import uniform from dit.multivariate.necessary_conditional_entropy import necessary_conditional_entropy def test_1(): """ """ d = uniform(['0000', '0001', '0010', '0100', '0101', '1000', '1001', '1010']) assert necessary_conditional_entropy(d, [0, 1], [2, 3]) == pytest.approx(0.68872187554086695) assert necessary_conditional_entropy(d, [2, 3], [0, 1]) == pytest.approx(0.68872187554086695) assert necessary_conditional_entropy(d, [1], [2, 3]) == pytest.approx(0.68872187554086695)
33.888889
97
0.711475
75
610
5.613333
0.4
0.285036
0.384798
0.235154
0.698337
0.617577
0.389549
0.304038
0.304038
0
0
0.184906
0.131148
610
17
98
35.882353
0.609434
0.093443
0
0
0
0
0.059925
0
0
0
0
0
0.375
1
0.125
false
0
0.375
0
0.5
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
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
0
0
0
4
bd0eac843078a4dfd46377d3f10b07d9b5c3c164
127
py
Python
__init__.py
andyceo/pylibs
df2eec6f9903e27ab02a82688378207eedb1b419
[ "MIT" ]
1
2019-10-28T08:56:41.000Z
2019-10-28T08:56:41.000Z
__init__.py
andyceo/pylibs
df2eec6f9903e27ab02a82688378207eedb1b419
[ "MIT" ]
null
null
null
__init__.py
andyceo/pylibs
df2eec6f9903e27ab02a82688378207eedb1b419
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import os import sys sys.path.append(os.path.dirname(os.path.abspath(__file__))) from config import config
18.142857
59
0.779528
21
127
4.52381
0.619048
0.126316
0
0
0
0
0
0
0
0
0
0.008621
0.086614
127
6
60
21.166667
0.810345
0.133858
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.75
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
bd46b4804cb59f1e89481b70d7da0b3aa44630c4
125
py
Python
30-Days-Of-Python/30-Days-Of-Python/my_module.py
zhaobingwang/python-samples
d59f84d2b967cc793cb9b8999f8cdef349fd6fd5
[ "MIT" ]
null
null
null
30-Days-Of-Python/30-Days-Of-Python/my_module.py
zhaobingwang/python-samples
d59f84d2b967cc793cb9b8999f8cdef349fd6fd5
[ "MIT" ]
null
null
null
30-Days-Of-Python/30-Days-Of-Python/my_module.py
zhaobingwang/python-samples
d59f84d2b967cc793cb9b8999f8cdef349fd6fd5
[ "MIT" ]
null
null
null
def generate_full_name(firstname, lastname): space = ' ' fullname = firstname + space + lastname return fullname
25
44
0.696
13
125
6.538462
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.224
125
4
45
31.25
0.876289
0
0
0
1
0
0.008
0
0
0
0
0
0
1
0.25
false
0
0
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
9520815fc23c2cd96ae0cc285b907dd88c922aa2
31
py
Python
mihifepe/fdr/__init__.py
cloudbopper/feature-importance-analysis
7f03e4413d1e42e9265d790cb64c41f34dbea5ab
[ "MIT" ]
1
2019-11-01T12:31:45.000Z
2019-11-01T12:31:45.000Z
mihifepe/fdr/__init__.py
cloudbopper/feature-importance-analysis
7f03e4413d1e42e9265d790cb64c41f34dbea5ab
[ "MIT" ]
10
2018-11-14T17:44:39.000Z
2020-01-02T03:25:14.000Z
mihifepe/fdr/__init__.py
cloudbopper/mihifepe
7f03e4413d1e42e9265d790cb64c41f34dbea5ab
[ "MIT" ]
3
2018-11-14T04:17:17.000Z
2020-01-04T20:32:00.000Z
"""Hierarchical FDR control"""
15.5
30
0.709677
3
31
7.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.096774
31
1
31
31
0.785714
0.774194
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
953462eaa8b3d03e1f053ecc9a8d6ecf62e1d004
143
py
Python
webgen/testing123.py
francis-chris5/Useful-Python-Tools
122ae3d8db02ccc9dacfd0262fc1b7c3c4357326
[ "MIT" ]
null
null
null
webgen/testing123.py
francis-chris5/Useful-Python-Tools
122ae3d8db02ccc9dacfd0262fc1b7c3c4357326
[ "MIT" ]
null
null
null
webgen/testing123.py
francis-chris5/Useful-Python-Tools
122ae3d8db02ccc9dacfd0262fc1b7c3c4357326
[ "MIT" ]
null
null
null
x = 3 y = 4 def Double(x): return 2 * x def Product(x, y): return x * y def SayHi(): print("Hello World!!!")
8.9375
28
0.454545
22
143
2.954545
0.590909
0.061538
0
0
0
0
0
0
0
0
0
0.034884
0.398601
143
15
29
9.533333
0.72093
0
0
0
0
0
0.110236
0
0
0
0
0
0
1
0.375
false
0
0
0.25
0.625
0.125
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
1f191d86b7669f2865e1bdd6b93169c000cd9c03
19,542
py
Python
utils.py
nishiwen1214/electra4zero-shot
c4af8dad0854c9e309081e102158fc65e50f802a
[ "MIT" ]
1
2022-03-23T11:13:20.000Z
2022-03-23T11:13:20.000Z
utils.py
nishiwen1214/electra4zero-shot
c4af8dad0854c9e309081e102158fc65e50f802a
[ "MIT" ]
null
null
null
utils.py
nishiwen1214/electra4zero-shot
c4af8dad0854c9e309081e102158fc65e50f802a
[ "MIT" ]
null
null
null
#! /usr/bin/env python # -*- coding: utf-8 -*- # __author__ = "Shiwen Ni" # Date: 2021/12/12 import csv import json import random class Datasets(): def __init__(self, dataset_name=""): self.dataset_name = dataset_name self.patterns = [] self.train_path, self.dev_path, self.test_path = "", "", "" if (dataset_name == 'SST-2'): self.train_path = r"./datasets/GLUE/SST-2/train.tsv" self.dev_path = r"./datasets/GLUE/SST-2/train.tsv" self.test_path = r"./datasets/GLUE/SST-2/dev.tsv" self.metric = 'Acc' self.label_texts = ['terrible','great'] self.templates = ["This movie is [label]!!"] self.patterns = [[template.replace('[label]', label) for label in self.label_texts] for template in self.templates] elif (dataset_name == 'CoLA'): self.train_path = r"./datasets/GLUE/CoLA/train.tsv" self.dev_path = r"./datasets/GLUE/CoLA/train.tsv" self.test_path = r"./datasets/GLUE/CoLA/dev.tsv" self.metric = 'Matthews' self.label_texts = ["wrong", "correct"] self.templates = ["The grammar of the following sentence is [label],"] self.patterns = [[template.replace('[label]', label) for label in self.label_texts] for template in self.templates] elif (dataset_name == 'MR'): self.train_path = r"./datasets/others/MR/train.csv" self.dev_path = r"./datasets/others/MR/train.csv" self.test_path = r"./datasets/others/MR/test.csv" self.metric = 'Acc' self.label_texts = ["terrible", "great"] self.templates = ["It was [label]!"] self.patterns = [[template.replace('[label]', label) for label in self.label_texts] for template in self.templates] elif (dataset_name == 'CR'): self.train_path = r"./datasets/others/CR/train.csv" self.dev_path = r"./datasets/others/CR/train.csv" self.test_path = r"./datasets/others/CR/test.csv" self.metric = 'Acc' self.label_texts = ["hate", "love"] self.templates = ["I really [label] this product."] self.patterns = [[template.replace('[label]', label) for label in self.label_texts] for template in self.templates] elif (dataset_name == 'MPQA'): self.train_path = r"./datasets/others/MPQA/train.csv" self.dev_path = r"./datasets/others/MPQA/train.csv" self.test_path = r"./datasets/others/MPQA/test.csv" self.metric = 'Acc' self.label_texts = ["not", "really"] self.templates = ["[label] good,"] self.patterns = [[template.replace('[label]', label) for label in self.label_texts] for template in self.templates] elif (dataset_name == 'Subj'): self.train_path = r"./datasets/others/Subj/train.csv" self.dev_path = r"./datasets/others/Subj/train.csv" self.test_path = r"./datasets/others/Subj/test.csv" self.metric = 'Acc' self.label_texts = ['Objectively',"Subjectively"] self.templates = ["[label] speaking."] self.patterns = [[template.replace('[label]', label) for label in self.label_texts] for template in self.templates] elif (dataset_name == 'TREC'): self.train_path = r"./datasets/others/TREC/train.csv" self.dev_path = r"./datasets/others/TREC/train.csv" self.test_path = r"./datasets/others/TREC/test.csv" self.metric = 'Acc' self.label_texts = ["definition", "entity", "meaning", "person", "place", "number"] self.templates = ["The answer is about a [label],"] self.patterns = [[template.replace('[label]', label) for label in self.label_texts] for template in self.templates] elif (dataset_name == 'SST-5'): self.train_path = r"./datasets/others/SST-5/train.csv" self.dev_path = r"./datasets/others/SST-5/train.csv" self.test_path = r"./datasets/others/SST-5/test.csv" self.metric = 'Acc' self.label_texts = ["terrible", "bad", "okay", "good", "perfect"] self.templates = ["This movie is [label]."] self.patterns = [[template.replace('[label]', label) for label in self.label_texts] for template in self.templates] elif (dataset_name == "QQP"): self.train_path = r"./datasets/GLUE/QQP/train.tsv" self.dev_path = r"./datasets/GLUE/QQP/train.tsv" self.test_path = r"./datasets/GLUE/QQP/dev.tsv" self.labels = [0, 1] self.metric = 'F1' self.label_texts = ["no", "yes"] self.templates = ["? [label],"] self.patterns = [[template.replace('[label]', label) for label in self.label_texts] for template in self.templates] elif (dataset_name == "MRPC"): self.train_path = r"./datasets/GLUE/MRPC/msr_paraphrase_train.txt" self.dev_path = r"./datasets/GLUE/MRPC/msr_paraphrase_train.txt" self.test_path = r"./datasets/GLUE/MRPC/msr_paraphrase_test.txt" self.labels = [0, 1] self.metric = 'F1' self.label_texts = ["no", "yes"] self.templates = ["[label],"] self.patterns = [[template.replace('[label]', label) for label in self.label_texts] for template in self.templates] elif (dataset_name == "QNLI"): self.train_path = r"./datasets/GLUE/QNLI/train.tsv" self.dev_path = r"./datasets/GLUE/QNLI/train.tsv" self.test_path = r"./datasets/GLUE/QNLI/dev.tsv" self.metric = 'Acc' self.text2id = {"not_entailment": 0, "entailment": 1} self.labels = [0, 1] self.label_texts = ["no", "yes"] self.templates = ["? [label]!"] self.patterns = [[template.replace('[label]', label) for label in self.label_texts] for template in self.templates] elif (dataset_name == "WNLI"): self.train_path = r"./datasets/GLUE/WNLI/train.tsv" self.dev_path = r"./datasets/GLUE/WNLI/train.tsv" self.test_path = r"./datasets/GLUE/WNLI/dev.tsv" self.metric = 'Acc' self.labels = [0, 1] self.label_texts = ["no", "yes"] self.templates = ["? [label],"] self.patterns = [[template.replace('[label]', label) for label in self.label_texts] for template in self.templates] elif (dataset_name == "MNLI-mm"): self.train_path = r"./datasets/GLUE/MNLI/train.tsv" self.dev_path = r"./datasets/GLUE/MNLI/dev_matched.tsv" self.test_path = r"./datasets/GLUE/MNLI/dev_matched.tsv" self.metric = 'Acc' self.text2id = {"contradiction": 0, "neutral": 1, "entailment": 2} self.labels = [0, 1, 2] self.label_texts = ["no", "maybe", "yes"] self.templates = ["? [label],"] self.patterns = [[template.replace('[label]', label) for label in self.label_texts] for template in self.templates] elif (dataset_name == "MNLI"): self.train_path = r"./datasets/GLUE/MNLI/train.tsv" self.dev_path = r"./datasets/GLUE/MNLI/dev_mismatched.tsv" self.test_path = r"./datasets/GLUE/MNLI/dev_mismatched.tsv" self.metric = 'Acc' self.text2id = {"contradiction": 0, "neutral": 1, "entailment": 2} self.labels = [0, 1, 2] self.label_texts = ["no", "maybe", "yes"] self.templates = ["? [label],"] self.patterns = [[template.replace('[label]', label) for label in self.label_texts] for template in self.templates] elif (dataset_name == "SNLI"): self.train_path = r"./datasets/others/SNLI/train.tsv" self.dev_path = r"./datasets/others/SNLI/dev.tsv" self.test_path = r"./datasets/others/SNLI/test.tsv" self.metric = 'Acc' self.text2id = {"contradiction": 0, "neutral": 1, "entailment": 2} self.labels = [0, 1, 2] self.label_texts = ["no", "maybe", "yes"] self.templates = ["? [label],"] self.patterns = [[template.replace('[label]', label) for label in self.label_texts] for template in self.templates] elif (dataset_name == "RTE"): self.train_path = r"./datasets/GLUE/RTE/train.tsv" self.dev_path = r"./datasets/GLUE/RTE/train.tsv" self.test_path = r"./datasets/GLUE/RTE/dev.tsv" self.metric = 'Acc' self.text2id = { "not_entailment": 0, "entailment": 1} self.labels = [0, 1] self.label_texts = ["no", "yes"] self.templates = ["? [label]!"] self.patterns = [[template.replace('[label]', label) for label in self.label_texts] for template in self.templates] elif (dataset_name == "STS-B"): self.train_path = r"./datasets/GLUE/STS-B/train.tsv" self.dev_path = r"./datasets/GLUE/STS-B/train.tsv" self.test_path = r"./datasets/GLUE/STS-B/dev.tsv" self.metric = 'Pear' self.label_texts = ["no"] self.templates = ["? [label]!!"] self.patterns = [[template.replace('[label]', label) for label in self.label_texts] for template in self.templates] def load_data(self, filename, sample_num=-1, is_train=False, is_shuffle=False): D = [] if (self.dataset_name == "QQP"): with open(filename, encoding='utf-8') as f: for i, l in enumerate(f.readlines()): if (i == 0): continue rows = l.strip().split('\t') text_a = rows[-3] text_b = rows[-2] label = rows[-1] text_a = text_a D.append((text_a + "[SEP]" + text_b, int(label))) elif (self.dataset_name == "MRPC"): with open(filename, encoding='utf-8') as f: for i, l in enumerate(f.readlines()): if (i == 0): continue rows = l.strip().split('\t') text_a = rows[-1] text_b = rows[-2] label = rows[0] text_a = text_a D.append((text_a + "[SEP]" + text_b, int(label))) elif (self.dataset_name == "QNLI"): with open(filename, encoding='utf-8') as f: for i, l in enumerate(f.readlines()): if (i == 0): continue rows = l.strip().split('\t') text_a = rows[-3] text_b = rows[-2] label = rows[-1] text_a = text_a D.append((text_a + "[SEP]" + text_b, self.text2id[label] )) elif (self.dataset_name == "WNLI"): with open(filename, encoding='utf-8') as f: for i, l in enumerate(f.readlines()): if (i == 0): continue rows = l.strip().split('\t') text_a = rows[-3] text_b = rows[-2] label = rows[-1] D.append(("Sentence 1:" +text_a + "[SEP]" + "Sentence 2:" +text_b, int(label))) elif (self.dataset_name == "MNLI"): with open(filename, encoding='utf-8') as f: for i, l in enumerate(f.readlines()): if (i == 0): continue rows = l.strip().split('\t') text_a = rows[-8] text_b = rows[-7] label = rows[-1] text_a = text_a D.append(( text_a + "[SEP]"+ text_b, self.text2id[label])) elif (self.dataset_name == "MNLI-mm"): with open(filename, encoding='utf-8') as f: for i, l in enumerate(f.readlines()): if (i == 0): continue rows = l.strip().split('\t') text_a = rows[-8] text_b = rows[-7] label = rows[-1] text_a = text_a D.append((text_a + "[SEP]" + text_b, self.text2id[label])) elif (self.dataset_name == "SNLI"): with open(filename, encoding='utf-8') as f: for i, l in enumerate(f.readlines()): if (i == 0): continue rows = l.strip().split('\t') text_a = rows[-8] text_b = rows[-7] label = rows[-1] text_a = text_a D.append((text_a + "[SEP]" + text_b, self.text2id[label])) elif (self.dataset_name == "RTE"): with open(filename, encoding='utf-8') as f: for i, l in enumerate(f.readlines()): if (i == 0): continue rows = l.strip().split('\t') text_a = rows[-3] text_b = rows[-2] label = rows[-1] D.append((text_a + "[SEP]" + text_b , self.text2id[label])) elif (self.dataset_name == "CoLA"): with open(filename, encoding='utf-8') as f: for i, l in enumerate(f.readlines()): if (i == 0): continue rows = l.strip().split('\t') text = rows[-1] label = rows[-3] D.append((text, int(label))) elif (self.dataset_name == "STS-B"): with open(filename, encoding='utf-8') as f: for i, l in enumerate(f.readlines()): if (i == 0): continue rows = l.strip().split('\t') text_a = rows[-3] text_b = rows[-2] score = rows[-1] text_a = text_a D.append((text_a + "[SEP]" + text_b, float(score))) elif (self.dataset_name == "SST-2"): with open(filename, encoding='utf-8') as f: for i, l in enumerate(f.readlines()): if (i == 0): continue rows = l.strip().split('\t') text = rows[-2] label = rows[-1] D.append((text, int(label))) elif (self.dataset_name == "SST-5"): with open(filename, encoding='utf-8') as f: for i, l in enumerate(f.readlines()): text = l[2:] label = l[0] D.append((text, int(label))) elif (self.dataset_name == "MR"): with open(filename, encoding='utf-8') as f: for i, l in enumerate(f.readlines()): text = l[2:] text = text.lstrip('"').rstrip('"') label = l[0] D.append((text, int(label))) elif (self.dataset_name == "CR"): with open(filename, encoding='utf-8') as f: for i, l in enumerate(f.readlines()): text = l[2:] text = text.lstrip('"').rstrip('"') label = l[0] D.append((text, int(label))) elif (self.dataset_name == "MPQA"): with open(filename, encoding='utf-8') as f: for i, l in enumerate(f.readlines()): text = l[2:] text = text.lstrip('"').rstrip('"') label = l[0] D.append((text, int(label))) elif (self.dataset_name == "Subj"): with open(filename, encoding='utf-8') as f: for i, l in enumerate(f.readlines()): text = l[2:] text = text.lstrip('"').rstrip('"') label = l[0] D.append((text, int(label))) elif (self.dataset_name == "TREC"): with open(filename, encoding='utf-8') as f: for i, l in enumerate(f.readlines()): text = l[2:] text = text.lstrip('"').rstrip('"') label = l[0] D.append((text, int(label))) # Shuffle the dataset. if (is_shuffle): random.seed(1) random.shuffle(D) # Set the number of samples. if (sample_num == -1): # -1 for all the samples return D else: return D[:sample_num + 1] class Model(): def __init__(self, model_name=""): self.model_name = model_name self.config_path, self.checkpoint_path, self.dict_path = "", "", "" if (model_name == 'electra-small'): self.config_path = './models/electra_small/small_discriminator_config.json' self.checkpoint_path = './models/electra_small/electra_small' self.dict_path = './models/electra_small/vocab.txt' elif (model_name == 'electra-base'): self.config_path = './models/electra_base/base_discriminator_config.json' self.checkpoint_path = './models/electra_base/electra_base' self.dict_path = './models/electra_base/vocab.txt' elif (model_name == 'electra-large'): self.config_path = './models/electra_large/large_discriminator_config.json' self.checkpoint_path = './models/electra_large/electra_large' self.dict_path = './models/electra_large/vocab.txt' def read_labels(label_file_path): labels_text = [] text2id = {} with open(label_file_path, 'r', encoding='utf-8') as f: for index, line in enumerate(f.readlines()): label = line.strip('\n') labels_text.append(label) text2id[label] = index return labels_text, text2id def sample_dataset(data: list, k_shot: int, label_num=-1): if(k_shot==-1): return data label_set = set() label2samples = {} for d in data: (text, label) = d label_set.add(label) if (label in label2samples): label2samples[label].append(d) else: label2samples[label] = [d] if (label_num != -1): assert len(label_set) == label_num new_data = [] for label in label_set: if (isinstance(label, float)): random.seed(0) new_data = random.sample(data, k_shot) random.shuffle(new_data) return new_data random.seed(0) new_data += random.sample(label2samples[label], k_shot) random.seed(0) random.shuffle(new_data) return new_data
44.013514
111
0.496009
2,253
19,542
4.182867
0.07945
0.027589
0.070352
0.054117
0.824597
0.800509
0.764962
0.745013
0.603565
0.557831
0
0.0125
0.361376
19,542
443
112
44.112867
0.742628
0.007983
0
0.561538
0
0
0.162134
0.101914
0
0
0
0
0.002564
1
0.012821
false
0
0.007692
0
0.041026
0
0
0
0
null
0
0
0
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
1f2b7592d36799c1d3fd4acf167b3f3b12ce6737
77
py
Python
Lib/site-packages/pyvel/games/__init__.py
raychorn/svn_Python-2.5.1
425005b1b489ba44ec0bb989e077297e8953d9be
[ "PSF-2.0" ]
null
null
null
Lib/site-packages/pyvel/games/__init__.py
raychorn/svn_Python-2.5.1
425005b1b489ba44ec0bb989e077297e8953d9be
[ "PSF-2.0" ]
null
null
null
Lib/site-packages/pyvel/games/__init__.py
raychorn/svn_Python-2.5.1
425005b1b489ba44ec0bb989e077297e8953d9be
[ "PSF-2.0" ]
null
null
null
r"""This package contains sample game handlers for PyVel""" import tictactoe
19.25
32
0.792208
11
77
5.545455
1
0
0
0
0
0
0
0
0
0
0
0
0.12987
77
3
33
25.666667
0.910448
0.675325
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
1f619e165346a19503b9e12ff64729e2ebcadf5a
125
py
Python
CRUD_Django/crudapp/admin.py
chandansau/CRUD-Django
a4ee0fb9d3bb91d62ec951c96a56cab01fb76f16
[ "MIT" ]
1
2019-01-19T06:53:15.000Z
2019-01-19T06:53:15.000Z
CRUD_Django/crudapp/admin.py
chandansau/CRUD-Django
a4ee0fb9d3bb91d62ec951c96a56cab01fb76f16
[ "MIT" ]
null
null
null
CRUD_Django/crudapp/admin.py
chandansau/CRUD-Django
a4ee0fb9d3bb91d62ec951c96a56cab01fb76f16
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import products # Register your models here. admin.site.register(products)
25
33
0.792
17
125
5.823529
0.647059
0
0
0
0
0
0
0
0
0
0
0
0.144
125
4
34
31.25
0.925234
0.208
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
1f70626b71a172c53996cb63f24a27129652f722
624
py
Python
sdk/python/pulumi_k0s/config/vars.py
ydkn/pulumi-k0s
e562e26fba6a7ceb33d8b0da71543ac5b9215b49
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_k0s/config/vars.py
ydkn/pulumi-k0s
e562e26fba6a7ceb33d8b0da71543ac5b9215b49
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_k0s/config/vars.py
ydkn/pulumi-k0s
e562e26fba6a7ceb33d8b0da71543ac5b9215b49
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by pulumigen. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities import types __config__ = pulumi.Config('k0s') class _ExportableConfig(types.ModuleType): @property def no_drain(self) -> Optional[bool]: return __config__.get_bool('noDrain') @property def skip_downgrade_check(self) -> Optional[bool]: return __config__.get_bool('skipDowngradeCheck')
24.96
80
0.722756
79
624
5.468354
0.683544
0.055556
0.074074
0.101852
0.162037
0.162037
0.162037
0
0
0
0
0.003876
0.173077
624
24
81
26
0.833333
0.233974
0
0.142857
1
0
0.059197
0
0
0
0
0
0
1
0.142857
false
0
0.428571
0.142857
0.785714
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
1
1
0
0
4
1f813a18cdb1ae587107cf0ec026a8a841b5bc17
145
py
Python
main.py
zguangyu/epen
e7d7c3cbac546af1fa8556ea2d1859a4c9507097
[ "MIT" ]
1
2015-11-01T13:00:41.000Z
2015-11-01T13:00:41.000Z
main.py
zguangyu/epen
e7d7c3cbac546af1fa8556ea2d1859a4c9507097
[ "MIT" ]
null
null
null
main.py
zguangyu/epen
e7d7c3cbac546af1fa8556ea2d1859a4c9507097
[ "MIT" ]
null
null
null
from epen import app from flask.ext.script import Manager app.debug = True manager = Manager(app) if __name__ == '__main__': manager.run()
16.111111
36
0.724138
21
145
4.619048
0.666667
0.206186
0
0
0
0
0
0
0
0
0
0
0.172414
145
8
37
18.125
0.808333
0
0
0
0
0
0.055172
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
2f26c296ff02f8db95b067cc396cc7baa3148840
824
py
Python
test.py
AlcindoSchleder/flaskWeb
1f9ba3a3ac8546c24126124d4c34335825b94df9
[ "MIT" ]
null
null
null
test.py
AlcindoSchleder/flaskWeb
1f9ba3a3ac8546c24126124d4c34335825b94df9
[ "MIT" ]
null
null
null
test.py
AlcindoSchleder/flaskWeb
1f9ba3a3ac8546c24126124d4c34335825b94df9
[ "MIT" ]
1
2019-08-16T23:42:05.000Z
2019-08-16T23:42:05.000Z
# -*- coding: utf-8 -*- from unittest import TestCase from workspaces.home.service import ValidationInput as VI class TestInput(TestCase): def test_CheckStringValue(self): vi = VI() self.assertEqual(vi.CheckStringValue('121426')['status'], 401) self.assertEqual(vi.CheckStringValue('523563')['status'], 200) self.assertEqual(vi.CheckStringValue('552523')['status'], 401) self.assertEqual(vi.CheckStringValue('112233')['status'], 200) self.assertEqual(vi.CheckStringValue('AG7688')['status'], 401) self.assertEqual(vi.CheckStringValue('543F67')['status'], 401) self.assertEqual(vi.CheckStringValue('1987878')['status'], 401) self.assertEqual(vi.CheckStringValue('002398')['status'], 401) # run test if __name__ == '__main__': unittest.main()
39.238095
71
0.682039
87
824
6.356322
0.402299
0.216998
0.245931
0.477396
0.531646
0.531646
0
0
0
0
0
0.102158
0.156553
824
21
72
39.238095
0.693525
0.036408
0
0
0
0
0.132576
0
0
0
0
0
0.533333
1
0.066667
false
0
0.133333
0
0.266667
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
4
2f5d40423aecdf0792b97f9d59d64a3b5e86254d
145
py
Python
week8/practice8_5.py
INYEONGKIM/programming-fundamentals
498fda3cd6cabf5eb3dcc6d8f098d5584bfdddb5
[ "MIT" ]
null
null
null
week8/practice8_5.py
INYEONGKIM/programming-fundamentals
498fda3cd6cabf5eb3dcc6d8f098d5584bfdddb5
[ "MIT" ]
null
null
null
week8/practice8_5.py
INYEONGKIM/programming-fundamentals
498fda3cd6cabf5eb3dcc6d8f098d5584bfdddb5
[ "MIT" ]
null
null
null
def more(message): answer = input(message) while not (answer=="y" or answer=="n"): answer = input(message) return answer=="y"
29
43
0.6
19
145
4.578947
0.578947
0.252874
0.413793
0
0
0
0
0
0
0
0
0
0.234483
145
5
44
29
0.783784
0
0
0.4
0
0
0.020548
0
0
0
0
0
0
1
0.2
false
0
0
0
0.4
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
2f7f4a12ae26841128c1d281fce651932f3cb713
76
py
Python
learn2learn/text/datasets/__init__.py
Brikwerk/learn2learn
7997c13c26ec627d13ce77ba98427260df78ada8
[ "MIT" ]
1,774
2019-09-05T20:41:16.000Z
2022-03-30T09:49:02.000Z
learn2learn/text/datasets/__init__.py
Kostis-S-Z/learn2learn
c0b7c088f15986880b136ec27059644ac513db60
[ "MIT" ]
196
2019-09-05T08:11:31.000Z
2022-03-31T12:08:25.000Z
learn2learn/text/datasets/__init__.py
Kostis-S-Z/learn2learn
c0b7c088f15986880b136ec27059644ac513db60
[ "MIT" ]
266
2019-09-13T10:17:54.000Z
2022-03-28T07:17:21.000Z
#!/usr/bin/env python3 from .news_classification import NewsClassification
19
51
0.828947
9
76
6.888889
1
0
0
0
0
0
0
0
0
0
0
0.014493
0.092105
76
3
52
25.333333
0.884058
0.276316
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
2f966187086e68a3077dfb79b701a86578035579
770
py
Python
lec4.py
csalette/isat252
cb9a0938b652ac0bf366f7b22a6ec662840bfcbb
[ "MIT" ]
null
null
null
lec4.py
csalette/isat252
cb9a0938b652ac0bf366f7b22a6ec662840bfcbb
[ "MIT" ]
null
null
null
lec4.py
csalette/isat252
cb9a0938b652ac0bf366f7b22a6ec662840bfcbb
[ "MIT" ]
null
null
null
""" Lecture 4 """ #my_tuple = 'a','b','c','d','e' #print(my_tuple) #print(my_tuple[1]) # using index numbers to find the letters we want #print(my_tuple[0:3]) # using slicing to find multiple letters at once #print(my_tuple[:]) #my_2nd_tuple = ('a','b','c','d','e') #as long as you have he commas, it is a tuple. #print(my_2nd_tuple) #test = ('a',) #print(type(test,)) #my_car = { #'color':'red', #'maker':'toyota', #'year':2015 #} #print(my_car) #print(my_car['year']) #print(my_car['color']) #print(my_car.items()) #print(my_car.keys()) #print(my_car.values()) #print(my_car.get('year')) #my_car['model']='corolla' #print(my_car) #my_car['year']='2020' #print(my_car) #print(len(my_car)) #print('color' in my_car)
22
84
0.605195
128
770
3.460938
0.414063
0.221219
0.20316
0.036117
0.045147
0.045147
0
0
0
0
0
0.021705
0.162338
770
35
85
22
0.665116
0.848052
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
2f9b98d36c82b795929ec96534a9ee7da37e5c3a
4,225
py
Python
tests/test_device.py
dmulcahey/aioflo
0c7e2befc1bc38cd4274f5e75627e4b8b516a93a
[ "MIT" ]
9
2020-05-21T02:31:00.000Z
2021-10-21T21:24:06.000Z
tests/test_device.py
dmulcahey/aioflo
0c7e2befc1bc38cd4274f5e75627e4b8b516a93a
[ "MIT" ]
48
2020-01-16T17:22:47.000Z
2022-03-01T18:06:20.000Z
tests/test_device.py
dmulcahey/aioflo
0c7e2befc1bc38cd4274f5e75627e4b8b516a93a
[ "MIT" ]
1
2020-07-24T11:41:52.000Z
2020-07-24T11:41:52.000Z
"""Define tests for device-related endpoints.""" import json import aiohttp import pytest from aioflo import async_get_api from .common import TEST_DEVICE_ID, TEST_EMAIL_ADDRESS, TEST_PASSWORD, load_fixture @pytest.mark.asyncio async def test_get_device_info(aresponses, auth_success_response): """Test successfully retrieving device info.""" aresponses.add( "api.meetflo.com", "/api/v1/users/auth", "post", aresponses.Response(text=json.dumps(auth_success_response), status=200), ) aresponses.add( "api-gw.meetflo.com", "/api/v2/devices/98765", "get", aresponses.Response(text=load_fixture("device_info_response.json"), status=200), ) async with aiohttp.ClientSession() as session: api = await async_get_api(TEST_EMAIL_ADDRESS, TEST_PASSWORD, session=session) device_info = await api.device.get_info(TEST_DEVICE_ID) assert device_info["fwVersion"] == "6.1.1" assert device_info["isConnected"] is True assert device_info["macAddress"] == "111111111111" assert device_info["nickname"] == "Smart Water Shutoff" @pytest.mark.asyncio async def test_device_run_health_test(aresponses, auth_success_response): """Test successfully running a health test.""" aresponses.add( "api.meetflo.com", "/api/v1/users/auth", "post", aresponses.Response(text=json.dumps(auth_success_response), status=200), ) aresponses.add( "api-gw.meetflo.com", "/api/v2/devices/98765/healthTest/run", "post", aresponses.Response(text=load_fixture("health_test_response.json"), status=200), ) async with aiohttp.ClientSession() as session: api = await async_get_api(TEST_EMAIL_ADDRESS, TEST_PASSWORD, session=session) health_test_response = await api.device.run_health_test(TEST_DEVICE_ID) assert health_test_response["roundId"] == "123456789-369258147" assert health_test_response["deviceId"] == "xxxxx" assert health_test_response["status"] == "pending" assert health_test_response["type"] == "manual" @pytest.mark.asyncio async def test_device_valve_open(aresponses, auth_success_response): """Test successfully opening the valve.""" aresponses.add( "api.meetflo.com", "/api/v1/users/auth", "post", aresponses.Response(text=json.dumps(auth_success_response), status=200), ) aresponses.add( "api-gw.meetflo.com", "/api/v2/devices/98765", "post", aresponses.Response( text=load_fixture("device_open_valve_response.json"), status=200 ), ) async with aiohttp.ClientSession() as session: api = await async_get_api(TEST_EMAIL_ADDRESS, TEST_PASSWORD, session=session) device_info = await api.device.open_valve(TEST_DEVICE_ID) assert device_info["isConnected"] is True assert device_info["macAddress"] == "111111111111" assert device_info["nickname"] == "Smart Water Shutoff" assert device_info["valve"]["target"] == "open" assert device_info["valve"]["lastKnown"] == "closed" @pytest.mark.asyncio async def test_device_valve_close(aresponses, auth_success_response): """Test successfully closing the valve.""" aresponses.add( "api.meetflo.com", "/api/v1/users/auth", "post", aresponses.Response(text=json.dumps(auth_success_response), status=200), ) aresponses.add( "api-gw.meetflo.com", "/api/v2/devices/98765", "post", aresponses.Response( text=load_fixture("device_close_valve_response.json"), status=200 ), ) async with aiohttp.ClientSession() as session: api = await async_get_api(TEST_EMAIL_ADDRESS, TEST_PASSWORD, session=session) device_info = await api.device.close_valve(TEST_DEVICE_ID) assert device_info["isConnected"] is True assert device_info["macAddress"] == "111111111111" assert device_info["nickname"] == "Smart Water Shutoff" assert device_info["valve"]["target"] == "closed" assert device_info["valve"]["lastKnown"] == "open"
36.422414
88
0.670296
501
4,225
5.431138
0.173653
0.073502
0.082323
0.066887
0.807056
0.774715
0.659684
0.646821
0.61742
0.61742
0
0.032547
0.207337
4,225
115
89
36.73913
0.779934
0.009941
0
0.621053
0
0
0.19325
0.053
0
0
0
0
0.189474
1
0
false
0.052632
0.052632
0
0.052632
0
0
0
0
null
0
0
0
1
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4
85ccc4830462844d174058a44140747f6376b581
457
py
Python
src/btmonitor/auth/rsa_utils.py
uudisaru/btmonitor
2c32476d1e589a5689054da0906447252ac0868c
[ "MIT" ]
null
null
null
src/btmonitor/auth/rsa_utils.py
uudisaru/btmonitor
2c32476d1e589a5689054da0906447252ac0868c
[ "MIT" ]
null
null
null
src/btmonitor/auth/rsa_utils.py
uudisaru/btmonitor
2c32476d1e589a5689054da0906447252ac0868c
[ "MIT" ]
null
null
null
from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import serialization def is_encrypted_rsa_key(private_key: str) -> bool: return 'RSA' in private_key and 'ENCRYPTED' in private_key def decrypt_private_key(private_key: str, enc_pwd: str): return serialization.load_pem_private_key( bytes(private_key, 'utf-8'), password=bytes(enc_pwd, 'utf-8'), backend=default_backend(), )
30.466667
62
0.746171
62
457
5.225806
0.467742
0.216049
0.135802
0.098765
0
0
0
0
0
0
0
0.005222
0.161926
457
14
63
32.642857
0.840731
0
0
0
0
0
0.04814
0
0
0
0
0
0
1
0.2
false
0.1
0.2
0.2
0.6
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
1
1
0
0
4
85de4a2d9e779ad3304e8b9af95a481de36be036
175
py
Python
tests/conftest.py
estevaoreis25/lispy
a1ae65d5862bc9f8a32940e9a9d50d4664f66a26
[ "MIT" ]
5
2019-11-01T20:07:50.000Z
2020-10-06T17:40:47.000Z
tests/conftest.py
estevaoreis25/lispy
a1ae65d5862bc9f8a32940e9a9d50d4664f66a26
[ "MIT" ]
5
2019-10-28T20:16:51.000Z
2019-10-28T20:51:55.000Z
tests/conftest.py
GabrielTiveron/lispy
12cc0a382151be75249e152e52ead2cb34d38ac4
[ "MIT" ]
34
2019-10-22T17:25:53.000Z
2020-10-06T17:40:41.000Z
import pytest from pathlib import Path examples_path = Path(__file__).parent / 'examples' @pytest.fixture def example(): return lambda p: open(examples_path / p).read()
19.444444
51
0.742857
24
175
5.166667
0.666667
0.193548
0
0
0
0
0
0
0
0
0
0
0.148571
175
9
51
19.444444
0.832215
0
0
0
0
0
0.045455
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0.166667
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
0
0
0
4
85df6a022411e66d190b2a33e8d9a560b5ffd0f0
95
py
Python
tests/unit/all_Unit.py
cmontellanob/PruebasIntegracioncmb
d27fa8bca2d108b93b019af7f1603c9de9e00b2f
[ "Apache-2.0" ]
null
null
null
tests/unit/all_Unit.py
cmontellanob/PruebasIntegracioncmb
d27fa8bca2d108b93b019af7f1603c9de9e00b2f
[ "Apache-2.0" ]
null
null
null
tests/unit/all_Unit.py
cmontellanob/PruebasIntegracioncmb
d27fa8bca2d108b93b019af7f1603c9de9e00b2f
[ "Apache-2.0" ]
null
null
null
import nose import sys argv = sys.argv[:] argv.insert(1, "--verbosity=2") nose.main(argv=argv)
15.833333
31
0.705263
16
95
4.1875
0.5625
0.208955
0
0
0
0
0
0
0
0
0
0.023529
0.105263
95
6
32
15.833333
0.764706
0
0
0
0
0
0.135417
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
85e6737066b2e379055bb225e4e293925837a1f0
271
py
Python
photos/models.py
Nightlyanon/PortfolioAPI
dde8f2dd72ec57765dad2803db05c3ee59e2592c
[ "MIT" ]
null
null
null
photos/models.py
Nightlyanon/PortfolioAPI
dde8f2dd72ec57765dad2803db05c3ee59e2592c
[ "MIT" ]
null
null
null
photos/models.py
Nightlyanon/PortfolioAPI
dde8f2dd72ec57765dad2803db05c3ee59e2592c
[ "MIT" ]
null
null
null
from django.db import models class Photo(models.Model): name = models.CharField(max_length=100) message = models.CharField(max_length=100, blank=True) art = models.ImageField(blank=False, null=False) created_at = models.DateTimeField(auto_now_add=True)
30.111111
58
0.752768
38
271
5.236842
0.684211
0.150754
0.180905
0.241206
0.271357
0
0
0
0
0
0
0.025751
0.140221
271
8
59
33.875
0.828326
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.166667
0
1
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
1
0
0
4
85e7bcadf6279ee2d748dc3683556fd67cd71567
122
py
Python
tests/base.py
anfema/django-questionnaire-core
82151cf14d00b5a83cb478cc07f9143fd57382c9
[ "MIT" ]
null
null
null
tests/base.py
anfema/django-questionnaire-core
82151cf14d00b5a83cb478cc07f9143fd57382c9
[ "MIT" ]
2
2019-01-30T16:05:15.000Z
2021-06-10T14:45:57.000Z
tests/base.py
anfema/django-questionnaire-core
82151cf14d00b5a83cb478cc07f9143fd57382c9
[ "MIT" ]
2
2019-01-17T12:09:47.000Z
2019-01-30T15:59:01.000Z
from django.test import TestCase # Create your tests here. class TestCaseBase(TestCase): fixtures = ('test1.json',)
17.428571
32
0.729508
15
122
5.933333
0.933333
0
0
0
0
0
0
0
0
0
0
0.009804
0.163934
122
6
33
20.333333
0.862745
0.188525
0
0
0
0
0.103093
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
c82b1ab92ec09b77676d639843eec68448e3eefc
183
py
Python
functions/retorno_valor_simples.py
Brunokrk/Learning-Python
36a3b1c4782dbb21af189760a451fd2e9c083bb6
[ "MIT" ]
null
null
null
functions/retorno_valor_simples.py
Brunokrk/Learning-Python
36a3b1c4782dbb21af189760a451fd2e9c083bb6
[ "MIT" ]
null
null
null
functions/retorno_valor_simples.py
Brunokrk/Learning-Python
36a3b1c4782dbb21af189760a451fd2e9c083bb6
[ "MIT" ]
null
null
null
def get_formated_name (first_name, last_name): full_name = first_name + " "+last_name return full_name.title() musician = get_formated_name('jimi', 'hendrix') print(musician)
30.5
47
0.743169
26
183
4.846154
0.5
0.174603
0.238095
0.269841
0.333333
0
0
0
0
0
0
0
0.136612
183
6
48
30.5
0.797468
0
0
0
0
0
0.065217
0
0
0
0
0
0
1
0.2
false
0
0
0
0.4
0.2
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
c8306bbaf5465aee17785404d69ae3d11d8e8693
235
py
Python
colosseumrl/__init__.py
carletonz/colosseumrl
878f0459731511d716672aee8a5adafcb96cf0a7
[ "MIT" ]
8
2019-06-04T00:22:30.000Z
2022-02-14T15:27:17.000Z
colosseumrl/__init__.py
carletonz/colosseumrl
878f0459731511d716672aee8a5adafcb96cf0a7
[ "MIT" ]
1
2019-07-23T03:32:59.000Z
2019-07-23T06:16:35.000Z
colosseumrl/__init__.py
carletonz/colosseumrl
878f0459731511d716672aee8a5adafcb96cf0a7
[ "MIT" ]
3
2020-01-13T08:09:27.000Z
2021-11-14T01:30:25.000Z
name = "colosseumrl" from .BaseEnvironment import BaseEnvironment from .ClientEnvironment import ClientEnvironment from .config import get_environment, available_environments from .RLApp import RLApp, create_rl_agent, launch_rl_agent
33.571429
59
0.859574
27
235
7.259259
0.592593
0.071429
0
0
0
0
0
0
0
0
0
0
0.097872
235
6
60
39.166667
0.924528
0
0
0
0
0
0.046809
0
0
0
0
0
0
1
0
false
0
0.8
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
c83a6f0ddefed2fc1383dae3ad9425a4eba1b58d
827
py
Python
pcoll/ordered_dict.py
thorwhalen/ut
353a4629c35a2cca76ef91a4d5209afe766433b4
[ "MIT" ]
4
2016-12-17T20:06:10.000Z
2021-11-19T04:45:29.000Z
pcoll/ordered_dict.py
thorwhalen/ut
353a4629c35a2cca76ef91a4d5209afe766433b4
[ "MIT" ]
11
2021-01-06T05:35:11.000Z
2022-03-11T23:28:31.000Z
pcoll/ordered_dict.py
thorwhalen/ut
353a4629c35a2cca76ef91a4d5209afe766433b4
[ "MIT" ]
3
2015-06-12T10:44:16.000Z
2021-07-26T18:39:47.000Z
__author__ = 'thor' import collections from collections import OrderedDict def sort_by_keys(d, reverse=False): return OrderedDict(sorted(list(d.items()), key=lambda t: t[0], reverse=reverse)) def sort_by_value(d, reverse=False): return OrderedDict(sorted(list(d.items()), key=lambda t: t[1], reverse=reverse)) def sort_by_function(d, fun, reverse=False): return OrderedDict(sorted(list(d.items()), key=fun, reverse=reverse)) def ordered_counter(x, sort_by=None, reverse=False): d = OrderedDict(collections.Counter(x)) if sort_by is not None: if sort_by == 'count': d = sort_by_keys(d, reverse=reverse) elif sort_by == 'value': d = sort_by_value(d, reverse=reverse) else: d = sort_by_function(d, fun=sort_by, reverse=reverse) return d
28.517241
84
0.673519
121
827
4.421488
0.289256
0.123364
0.050467
0.162617
0.542056
0.302804
0.302804
0.302804
0.302804
0.213084
0
0.003017
0.198307
827
28
85
29.535714
0.803922
0
0
0
0
0
0.016929
0
0
0
0
0
0
1
0.210526
false
0
0.105263
0.157895
0.526316
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
c8404cf600f95e818397cbf96cea0d5d707a390c
87
py
Python
weigth/apps.py
MarioDavidov/heroku_workout
50727305f7e6f05527d3a5fff5e8d27843435985
[ "MIT" ]
null
null
null
weigth/apps.py
MarioDavidov/heroku_workout
50727305f7e6f05527d3a5fff5e8d27843435985
[ "MIT" ]
null
null
null
weigth/apps.py
MarioDavidov/heroku_workout
50727305f7e6f05527d3a5fff5e8d27843435985
[ "MIT" ]
null
null
null
from django.apps import AppConfig class WeigthConfig(AppConfig): name = 'weigth'
14.5
33
0.747126
10
87
6.5
0.9
0
0
0
0
0
0
0
0
0
0
0
0.172414
87
5
34
17.4
0.902778
0
0
0
0
0
0.068966
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
c85ca39087bcc2189d190f20b1946675e6b74e74
1,968
py
Python
django/researchdata/serializers.py
linguindic/linguindic-website
545c64bc55b9502ef3db8ac00172d6240495b526
[ "MIT" ]
1
2020-09-22T10:07:52.000Z
2020-09-22T10:07:52.000Z
django/researchdata/serializers.py
linguindic/linguindic-website
545c64bc55b9502ef3db8ac00172d6240495b526
[ "MIT" ]
null
null
null
django/researchdata/serializers.py
linguindic/linguindic-website
545c64bc55b9502ef3db8ac00172d6240495b526
[ "MIT" ]
null
null
null
from rest_framework import serializers from . import models # Select List models class SlLinguisticTraditionGroupSerializer(serializers.ModelSerializer): class Meta: model = models.SlLinguisticTraditionGroup fields = '__all__' class SlReferencePublisherSerializer(serializers.ModelSerializer): class Meta: model = models.SlReferencePublisher fields = '__all__' class SlReferenceTypeSerializer(serializers.ModelSerializer): class Meta: model = models.SlReferenceType fields = '__all__' class SlTextGroupSerializer(serializers.ModelSerializer): class Meta: model = models.SlTextGroup fields = '__all__' class SlTextTypeSerializer(serializers.ModelSerializer): class Meta: model = models.SlTextType fields = '__all__' # Main models class AuthorSerializer(serializers.ModelSerializer): class Meta: model = models.Author fields = '__all__' class LinguisticFieldSerializer(serializers.ModelSerializer): class Meta: model = models.LinguisticField fields = '__all__' class LinguisticNotionSerializer(serializers.ModelSerializer): class Meta: model = models.LinguisticNotion fields = '__all__' class LinguisticTraditionSerializer(serializers.ModelSerializer): class Meta: model = models.LinguisticTradition fields = '__all__' class ReferenceSerializer(serializers.ModelSerializer): class Meta: model = models.Reference fields = '__all__' class SanskritWordSerializer(serializers.ModelSerializer): class Meta: model = models.SanskritWord fields = '__all__' class TextSerializer(serializers.ModelSerializer): class Meta: model = models.Text fields = '__all__' class TextPassageSerializer(serializers.ModelSerializer): class Meta: model = models.TextPassage fields = '__all__'
19.68
72
0.704776
156
1,968
8.551282
0.262821
0.253373
0.302099
0.341079
0.448276
0.448276
0
0
0
0
0
0
0.227642
1,968
99
73
19.878788
0.877632
0.015244
0
0.481481
0
0
0.047028
0
0
0
0
0
0
1
0
false
0.037037
0.037037
0
0.518519
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
1
0
0
4
c85ef4bd89feab210e6b90670912ed7c5edfbb41
191
py
Python
mlir/dialects/__init__.py
paul-tqh-nguyen/pymlir
f61817351a191d9edcfb675653d7fcc5d3b0fe77
[ "BSD-3-Clause" ]
3
2021-03-08T18:41:50.000Z
2021-08-06T20:27:20.000Z
mlir/dialects/__init__.py
paul-tqh-nguyen/pymlir
f61817351a191d9edcfb675653d7fcc5d3b0fe77
[ "BSD-3-Clause" ]
4
2021-03-03T18:59:13.000Z
2021-05-11T23:43:04.000Z
mlir/dialects/__init__.py
paul-tqh-nguyen/pymlir
f61817351a191d9edcfb675653d7fcc5d3b0fe77
[ "BSD-3-Clause" ]
5
2021-03-03T15:45:29.000Z
2021-08-06T20:27:28.000Z
from .affine import affine from .standard import standard from .loop import loop from .linalg import linalg from .llvm import llvm STANDARD_DIALECTS = [affine, standard, loop, linalg, llvm]
23.875
58
0.790576
27
191
5.555556
0.296296
0
0
0
0
0
0
0
0
0
0
0
0.146597
191
7
59
27.285714
0.920245
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.833333
0
0.833333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
c0922ca2ce7e14a8d6daca7f10f714f195de6643
46
py
Python
apicem_config.py
ralfraij/apicem-ll-sample-code
adb0988af7b506610b218db7136ec58354572f4b
[ "Apache-2.0" ]
1
2018-06-28T00:11:16.000Z
2018-06-28T00:11:16.000Z
apicem_config.py
ralfraij/apicem-ll-sample-code
adb0988af7b506610b218db7136ec58354572f4b
[ "Apache-2.0" ]
null
null
null
apicem_config.py
ralfraij/apicem-ll-sample-code
adb0988af7b506610b218db7136ec58354572f4b
[ "Apache-2.0" ]
null
null
null
# Define apic-em ip apicem_ip = '10.10.20.55'
15.333333
25
0.673913
10
46
3
0.8
0
0
0
0
0
0
0
0
0
0
0.205128
0.152174
46
2
26
23
0.564103
0.369565
0
0
0
0
0.407407
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
c0a57f543d52ac757c6c93dd8028c81587e4a3fb
14,210
py
Python
test/test_matrix.py
knowledge-technologies/spyct
058e7380f353a06bf312613472e82fc5abd65315
[ "BSD-3-Clause" ]
2
2020-11-27T15:05:52.000Z
2021-10-14T16:01:25.000Z
test/test_matrix.py
knowledge-technologies/spyct
058e7380f353a06bf312613472e82fc5abd65315
[ "BSD-3-Clause" ]
null
null
null
test/test_matrix.py
knowledge-technologies/spyct
058e7380f353a06bf312613472e82fc5abd65315
[ "BSD-3-Clause" ]
null
null
null
import pytest import numpy as np from hypothesis import given, assume, note, settings, HealthCheck import utils import spyct._matrix as smatrix @given(utils.real_ndarrays_nan(utils.random_matrix_shapes())) def test_ndarray_to_DMatrix_to_ndarray(matrix): result = smatrix.ndarray_to_DMatrix(matrix).to_ndarray() note('original: {}'.format(matrix)) note('result: {}'.format(result)) np.testing.assert_equal(result, matrix) @given(utils.real_ndarrays(utils.random_matrix_shapes())) def test_csr_to_SMatrix_to_csr(matrix): csr = utils.make_csr(matrix) result = smatrix.csr_to_SMatrix(csr).to_csr() np.testing.assert_equal(result.data, csr.data) np.testing.assert_equal(result.indptr, csr.indptr) np.testing.assert_equal(result.indices, csr.indices) @given(utils.matrix_vector_pair()) def test_multiply_sparse_sparse(pair): matrix, vector = pair n = vector.shape[0] indices = np.random.choice(n, size=n//2, replace=False).astype(np.intp) indices.sort() smat = utils.make_csr(matrix) svec = np.zeros_like(vector) svec[indices] = vector[indices] target = np.matmul(smat.A, svec) note('matrix: {}'.format(smat.A)) note('vector: {}'.format(vector)) note('indices: {}'.format(indices)) note('target: {}'.format(target)) scores = np.empty(matrix.shape[0], dtype='f') smatrix.multiply_sparse_sparse(smatrix.csr_to_SMatrix(smat), smatrix.memview_to_SMatrix(vector[indices], n, indices), scores) note('scores: {}'.format(scores)) assert utils.arrays_almost_equal(target, scores) ### DMatrix tests ################################################################ @given(utils.real_ndarrays_nan(utils.random_matrix_shapes())) def test_DMatrix_copy(matrix): copy = smatrix.ndarray_to_DMatrix(matrix).copy().to_ndarray() np.testing.assert_equal(matrix, copy) @settings(suppress_health_check=[HealthCheck.filter_too_much]) @given(utils.matrix_slice(0)) def test_DMatrix_take_rows(matrix_rows): matrix, rows = matrix_rows result = smatrix.ndarray_to_DMatrix(matrix).take_rows(rows).to_ndarray() note('target: {}'.format(matrix[rows])) note('result: {}'.format(result)) np.testing.assert_equal(matrix[rows], result) @given(utils.matrix_slice(1)) def test_DMatrix_take_columns(matrix_columns): matrix, columns = matrix_columns result = smatrix.ndarray_to_DMatrix(matrix).take_columns(columns).to_ndarray() note('target: {}'.format(matrix[:, columns])) note('result: {}'.format(result)) np.testing.assert_equal(matrix[:, columns], result) @given(utils.matrix_vector_pair()) def test_DMatrix_self_dot_vector(pair): matrix, vector = pair result = np.empty(shape=matrix.shape[0], dtype='f') smatrix.ndarray_to_DMatrix(matrix).self_dot_vector(vector, result) note('result: {} target:{}'.format(result, matrix.dot(vector))) assert utils.arrays_almost_equal(result, matrix.dot(vector)) @given(utils.vector_matrix_pair()) def test_DMatrix_vector_dot_self(pair): vector, matrix = pair result = np.empty(shape=matrix.shape[1], dtype='f') smatrix.ndarray_to_DMatrix(matrix).vector_dot_self(vector, result) note('result: {} target:{}'.format(result, vector.dot(matrix))) assert utils.arrays_almost_equal(result, vector.dot(matrix)) @pytest.mark.filterwarnings('ignore::RuntimeWarning') @given(utils.real_ndarrays_nan(utils.random_matrix_shapes())) def test_DMatrix_column_means_nan(matrix): matrix = utils.clip_matrix_values(matrix) means = np.empty(shape=matrix.shape[1], dtype='f') smatrix.ndarray_to_DMatrix(matrix).column_means_nan(means) matrix = matrix.astype('d') target_means = np.nan_to_num(np.nanmean(matrix, axis=0)) note('real: {} target: {}'.format(means, target_means)) assert utils.arrays_almost_equal(means, target_means, eps=1e-2) @pytest.mark.filterwarnings('ignore::RuntimeWarning') @given(utils.real_ndarrays(utils.random_matrix_shapes())) def test_DMatrix_column_means(matrix): means = np.empty(shape=matrix.shape[1], dtype='f') smatrix.ndarray_to_DMatrix(matrix).column_means(means) matrix = matrix.astype('d') target_means = np.mean(matrix, axis=0) note('real: {} target: {}'.format(means, target_means)) assert utils.arrays_almost_equal(means, target_means, eps=1e-2) @pytest.mark.filterwarnings('ignore::RuntimeWarning') @given(utils.real_ndarrays_nan(utils.random_matrix_shapes())) def test_DMatrix_column_stds_nan(matrix): matrix = utils.clip_matrix_values(matrix) means = np.empty(shape=matrix.shape[1], dtype='f') stds = np.empty(shape=matrix.shape[1], dtype='f') smatrix.ndarray_to_DMatrix(matrix).column_stds_nan(0, means, stds) matrix = matrix.astype('d') target_means = np.nan_to_num(np.nanmean(matrix, axis=0)) target_stds = np.nan_to_num(np.nanstd(matrix, axis=0)) note('means real: {} target: {}'.format(means, target_means)) note('stds real: {} target: {}'.format(stds, target_stds)) assert utils.arrays_almost_equal(means, target_means, eps=1e-2) assert utils.arrays_almost_equal(stds, target_stds, eps=1e-2) @pytest.mark.filterwarnings('ignore::RuntimeWarning') @given(utils.real_ndarrays(utils.random_matrix_shapes())) def test_DMatrix_column_stds(matrix): means = np.empty(shape=matrix.shape[1], dtype='f') stds = np.empty(shape=matrix.shape[1], dtype='f') smatrix.ndarray_to_DMatrix(matrix).column_stds(0, means, stds) matrix = matrix.astype('d') note('means real: {} target: {}'.format(means, np.mean(matrix, axis=0))) note('stds real: {} target: {}'.format(stds, np.std(matrix, axis=0))) assert utils.arrays_almost_equal(means, np.mean(matrix, axis=0), eps=1e-2) assert utils.arrays_almost_equal(stds, np.std(matrix, axis=0), eps=1e-2) @given(utils.real_ndarrays_nan(utils.random_matrix_shapes())) def test_DMatrix_impute_missing(matrix): target = np.nan_to_num(matrix, nan=10) result = smatrix.ndarray_to_DMatrix(matrix) result.impute_missing(10) result = result.to_ndarray() assert utils.arrays_almost_equal(target, result) @given(utils.real_ndarrays_nan(utils.random_matrix_shapes())) def test_DMatrix_nonmissing_matrix(matrix): target = (~np.isnan(matrix)).astype('f') result = smatrix.ndarray_to_DMatrix(matrix).nonmissing_matrix().to_ndarray() assert utils.arrays_almost_equal(target, result) @given(utils.real_ndarrays(utils.random_matrix_shapes())) def test_DMatrix_unstandardize_inverts_standardize(matrix): means = np.empty(shape=matrix.shape[1], dtype='f') stds = np.empty(shape=matrix.shape[1], dtype='f') m = smatrix.ndarray_to_DMatrix(matrix) m.column_stds(1, means, stds) m.standardize_columns(means, stds) m.unstandardize_columns(means, stds) result = m.to_ndarray() note('result: {}'.format(result)) assert utils.arrays_almost_equal(matrix, result) @given(utils.real_ndarrays_nan(utils.random_matrix_shapes())) def test_DMatrix_min_nonnan_in_column(matrix): result = smatrix.ndarray_to_DMatrix(matrix).min_nonnan_in_column() target = matrix.shape[0] - np.isnan(matrix).sum(axis=0).max() note('result: {} target: {}'.format(result, target)) assert utils.values_almost_equal(result, target) @given(utils.real_ndarrays_nan(utils.random_matrix_shapes())) def test_DMatrix_row_vector(matrix): m = smatrix.ndarray_to_DMatrix(matrix) for row in range(matrix.shape[0]): assert utils.arrays_almost_equal(np.asarray(m.row_vector(row)), matrix[row]) @given(utils.real_ndarrays(utils.random_matrix_shapes())) def test_DMatrix_cluster_rows_mse(matrix): assume(matrix.shape[0] >= 2) c0 = matrix[0] c1 = matrix[1] d0 = np.sqrt(np.sum((matrix - c0) * (matrix - c0), axis=1)) d1 = np.sqrt(np.sum((matrix - c1) * (matrix - c1), axis=1)) target = (d1 < d0).astype('f') target[d1 == d0] = -1. result = np.empty(matrix.shape[0], dtype='f') smatrix.ndarray_to_DMatrix(matrix).cluster_rows_mse(c0, c1, result) note('result: {}'.format(result)) note('target: {}'.format(target)) assert utils.arrays_almost_equal(target, result) @given(utils.real_ndarrays(utils.random_matrix_shapes())) def test_DMatrix_cluster_rows_dot(matrix): assume(matrix.shape[0] >= 2) c0 = matrix[0] c1 = matrix[1] s0 = matrix.dot(c0) / (np.linalg.norm(c0) + 1e-8) s1 = matrix.dot(c1) / (np.linalg.norm(c1) + 1e-8) target = (s1 >= s0).astype('f') note(str(s0)) note(str(s1)) result = np.empty(matrix.shape[0], dtype='f') smatrix.ndarray_to_DMatrix(matrix).cluster_rows_dot(c0, c1, result, 1e-4, np.empty(matrix.shape[0], dtype='f')) note('result: {}'.format(result)) note('target: {}'.format(target)) assert utils.arrays_almost_equal(target, result) ### SMatrix tests ################################################################ @given(utils.real_ndarrays_nan(utils.random_matrix_shapes())) def test_SMatrix_copy(matrix): csr = utils.make_csr(matrix) copy = smatrix.csr_to_SMatrix(csr).copy().to_csr() np.testing.assert_equal(csr.A, copy.A) @settings(suppress_health_check=[HealthCheck.filter_too_much]) @given(utils.matrix_slice(0)) def test_SMatrix_take_rows(matrix_rows): matrix, rows = matrix_rows matrix = utils.make_csr(matrix) result = smatrix.csr_to_SMatrix(matrix).take_rows(rows).to_csr() note('target: {}'.format(matrix[rows].A)) note('result: {}'.format(result.A)) np.testing.assert_equal(matrix[rows].A, result.A) @given(utils.matrix_slice(1)) def test_SMatrix_take_columns(matrix_columns): matrix, columns = matrix_columns matrix = utils.make_csr(matrix) result = smatrix.csr_to_SMatrix(matrix).take_columns(columns).to_csr() note('target: {}'.format(matrix[:, columns].A)) note('result: {}'.format(result.A)) np.testing.assert_equal(matrix[:, columns].A, result.A) @given(utils.matrix_vector_pair()) def test_SMatrix_self_dot_vector(pair): matrix, vector = pair matrix = utils.make_csr(matrix) result = np.empty(shape=matrix.shape[0], dtype='f') smatrix.csr_to_SMatrix(matrix).self_dot_vector(vector, result) target = matrix.A.dot(vector) note('result: {} target:{}'.format(result, target)) assert utils.arrays_almost_equal(result, target) @given(utils.vector_matrix_pair()) def test_SMatrix_vector_dot_self(pair): vector, matrix = pair matrix = utils.make_csr(matrix) result = np.empty(shape=matrix.shape[1], dtype='f') smatrix.csr_to_SMatrix(matrix).vector_dot_self(vector, result) target = vector.dot(matrix.A) note('result: {} target:{}'.format(result, target)) assert utils.arrays_almost_equal(result, target) @pytest.mark.filterwarnings('ignore::RuntimeWarning') @given(utils.real_ndarrays(utils.random_matrix_shapes())) def test_SMatrix_column_means(matrix): matrix = utils.make_csr(matrix) means = np.empty(shape=matrix.shape[1], dtype='f') smatrix.csr_to_SMatrix(matrix).column_means(means) matrix = matrix.A.astype('d') target_means = np.mean(matrix, axis=0) note('real: {} target: {}'.format(means, target_means)) assert utils.arrays_almost_equal(means, target_means, eps=1e-2) @pytest.mark.filterwarnings('ignore::RuntimeWarning') @given(utils.real_ndarrays(utils.random_matrix_shapes())) def test_SMatrix_column_stds(matrix): means = np.empty(shape=matrix.shape[1], dtype='f') stds = np.empty(shape=matrix.shape[1], dtype='f') matrix = utils.make_csr(matrix) smatrix.csr_to_SMatrix(matrix).column_stds(0, means, stds) matrix = matrix.A.astype('d') note('means real: {} target: {}'.format(means, np.mean(matrix, axis=0))) note('stds real: {} target: {}'.format(stds, np.std(matrix, axis=0))) assert utils.arrays_almost_equal(means, np.mean(matrix, axis=0), eps=1e-2) assert utils.arrays_almost_equal(stds, np.std(matrix, axis=0), eps=1e-2) @given(utils.real_ndarrays(utils.random_matrix_shapes())) def test_SMatrix_unstandardize_inverts_standardize(matrix): matrix = utils.make_csr(matrix) means = np.empty(shape=matrix.shape[1], dtype='f') stds = np.empty(shape=matrix.shape[1], dtype='f') m = smatrix.csr_to_SMatrix(matrix) m.column_stds(1, means, stds) m.standardize_columns(means, stds) m.unstandardize_columns(means, stds) result = m.to_csr() note('result: {}'.format(result.A)) assert utils.arrays_almost_equal(matrix.A, result.A) @given(utils.real_ndarrays_nan(utils.random_matrix_shapes())) def test_SMatrix_row_vector(matrix): matrix = utils.make_csr(matrix) dense = matrix.A m = smatrix.csr_to_SMatrix(matrix) for row in range(matrix.shape[0]): assert utils.arrays_almost_equal(np.asarray(m.row_vector(row)), dense[row]) @given(utils.real_ndarrays(utils.random_matrix_shapes())) def test_SMatrix_cluster_rows_mse(matrix): assume(matrix.shape[0] >= 2) matrix = utils.make_csr(matrix) dense = matrix.A c0 = dense[0] c1 = dense[1] d0 = np.sqrt(np.sum((dense - c0) * (dense - c0), axis=1)) d1 = np.sqrt(np.sum((dense - c1) * (dense - c1), axis=1)) target = (d1 < d0).astype('f') target[d1 == d0] = -1. result = np.empty(matrix.shape[0], dtype='f') smatrix.csr_to_SMatrix(matrix).cluster_rows_mse(c0, c1, result) note('result: {}'.format(result)) note('target: {}'.format(target)) assert utils.arrays_almost_equal(target, result) @given(utils.real_ndarrays(utils.random_matrix_shapes())) def test_DMatrix_cluster_rows_dot(matrix): assume(matrix.shape[0] >= 2) matrix = utils.make_csr(matrix) dense = matrix.A c0 = dense[0] c1 = dense[1] s0 = dense.dot(c0) / (np.linalg.norm(c0) + 1e-8) s1 = dense.dot(c1) / (np.linalg.norm(c1) + 1e-8) target = (s1 >= s0).astype('f') note(str(s0)) note(str(s1)) result = np.empty(matrix.shape[0], dtype='f') smatrix.csr_to_SMatrix(matrix).cluster_rows_dot(c0, c1, result, 1e-4, np.empty(matrix.shape[0], dtype='f')) note('result: {}'.format(result)) note('target: {}'.format(target)) assert utils.arrays_almost_equal(target, result)
38.198925
115
0.702674
2,022
14,210
4.726508
0.065282
0.035681
0.042691
0.057759
0.85665
0.825154
0.741551
0.679083
0.631684
0.605525
0
0.01333
0.134201
14,210
371
116
38.301887
0.763472
0.00197
0
0.592466
0
0
0.052264
0.009399
0
0
0
0
0.119863
1
0.10274
false
0
0.017123
0
0.119863
0
0
0
0
null
0
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
c0f399404616cbba7be88cee28892789ce335429
257
py
Python
bot.py
msujithk/Binance-Zerodha-Bot
ce979905550ebdb0f0e5403a7941e11c8dc41415
[ "MIT" ]
null
null
null
bot.py
msujithk/Binance-Zerodha-Bot
ce979905550ebdb0f0e5403a7941e11c8dc41415
[ "MIT" ]
null
null
null
bot.py
msujithk/Binance-Zerodha-Bot
ce979905550ebdb0f0e5403a7941e11c8dc41415
[ "MIT" ]
null
null
null
from break_out_strategy import BreakOutStrategy class Bot: def __init__(self, adapter): self.break_out_strategy = BreakOutStrategy(adapter) def start_publish(self): raise NotImplementedError("start_publish method not implemented")
28.555556
73
0.762646
29
257
6.413793
0.655172
0.086022
0.172043
0
0
0
0
0
0
0
0
0
0.175097
257
8
74
32.125
0.877358
0
0
0
0
0
0.140625
0
0
0
0
0
0
1
0.333333
false
0
0.166667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
23b189ae57118d80dcc0e247c5b39bc160930e89
92
py
Python
alunos/apps.py
lslopes/SchoolProjetobackand
099517566b0948ba19f31427ed9caf441bf5d696
[ "Apache-2.0" ]
null
null
null
alunos/apps.py
lslopes/SchoolProjetobackand
099517566b0948ba19f31427ed9caf441bf5d696
[ "Apache-2.0" ]
10
2020-03-24T17:01:46.000Z
2022-03-11T23:46:25.000Z
alunos/apps.py
lslopes/SchoolProjetobackand
099517566b0948ba19f31427ed9caf441bf5d696
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class AlunosConfig(AppConfig): name = 'alunos'
15.333333
34
0.706522
10
92
6.5
0.9
0
0
0
0
0
0
0
0
0
0
0
0.217391
92
5
35
18.4
0.902778
0
0
0
0
0
0.068966
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
23e30de97b738bcd962feb2c603694f120dec2c1
315
py
Python
py_moysklad/entities/attached_file.py
upmarket-cc/py_moysklad
e026e611344c38f8a8d4f428781fcfb315aaaa60
[ "MIT" ]
null
null
null
py_moysklad/entities/attached_file.py
upmarket-cc/py_moysklad
e026e611344c38f8a8d4f428781fcfb315aaaa60
[ "MIT" ]
null
null
null
py_moysklad/entities/attached_file.py
upmarket-cc/py_moysklad
e026e611344c38f8a8d4f428781fcfb315aaaa60
[ "MIT" ]
null
null
null
import typing from dataclasses import dataclass from datetime import datetime from py_moysklad.entities.attachment import Attachment if typing.TYPE_CHECKING: from py_moysklad.entities.agents.employee import Employee @dataclass class AttachedFile(Attachment): created: datetime createdBy: "Employee"
21
61
0.815873
37
315
6.864865
0.513514
0.047244
0.110236
0.173228
0
0
0
0
0
0
0
0
0.136508
315
14
62
22.5
0.933824
0
0
0
0
0
0.025397
0
0
0
0
0
0
1
0
true
0
0.5
0
0.8
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
1
0
1
0
0
4
23ed2d3be27920cfb16311d9436c5d170993d041
542
py
Python
config.py
HankChen7773/Wedding_Bot_imgUpload
386baf2674cbae7ef2736cf95b40eb13bd608f44
[ "MIT" ]
null
null
null
config.py
HankChen7773/Wedding_Bot_imgUpload
386baf2674cbae7ef2736cf95b40eb13bd608f44
[ "MIT" ]
null
null
null
config.py
HankChen7773/Wedding_Bot_imgUpload
386baf2674cbae7ef2736cf95b40eb13bd608f44
[ "MIT" ]
null
null
null
# imgur key client_id = '3cb7dabd0f805d6' client_secret = '30a9fb858f64bf4acc1651988e2fbc62e4fedaed' album_id = 'LeVFO62' album_id_lucky = '2aAnwnt' access_token = '52945d677b3e985c5e82ba7d1fbd96f52648a1bb' refresh_token = '46d87ffac8daa7d8ecd34c85b9db4c64dbc2c582' # line bot key line_channel_access_token = 'ozBtsH1AXPn/0cgAA2HymGPHm5Hx4QYECJ1jU3VuvTOttBCLZe1cwh5DBf8kJBI4H53gH4nIy8fdm1JYHPFRI8+BvNieQ8CcPiMsiv3dz4XKyRFRF2HsCLrH2rs7IIokniUSUL3rgJ2vAL4uNwuglgdB04t89/1O/w1cDnyilFU=' line_channel_secret = 'd5f3e8acb95897d9414f807fa60a1204'
45.166667
202
0.883764
37
542
12.621622
0.675676
0.029979
0
0
0
0
0
0
0
0
0
0.24902
0.059041
542
11
203
49.272727
0.666667
0.04059
0
0
0
0
0.682785
0.626692
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
23faccc5fc96a95edc45dd99e482b7dfd5d7e93d
25,515
py
Python
main.py
soniyanaik1177/Virtua-Try-On-
d104003a33dfc82083e5956804632cf1a83eeb79
[ "MIT" ]
8
2021-05-29T11:11:20.000Z
2022-02-17T04:38:41.000Z
main.py
chefpr7/Try-First
efaf7636cc0ff06dcec70ee300462d931c4e9d5c
[ "MIT" ]
14
2021-05-28T05:53:39.000Z
2022-03-12T01:05:21.000Z
main.py
chefpr7/Try-First
efaf7636cc0ff06dcec70ee300462d931c4e9d5c
[ "MIT" ]
9
2021-05-20T09:05:57.000Z
2022-02-17T04:38:47.000Z
import os import urllib.request import time import glob import cv2 from app import app from app2 import app2 from flask import Flask, flash, request, redirect, url_for, render_template, send_from_directory from werkzeug.utils import secure_filename from flask_caching import Cache from PIL import Image from script import predict from evaluate import execute from pose_parser import pose_parse from wsize import women_size_predict from wsize1 import women_size_predict1 from msize import men_size_predict import mask_the_face # from mask_the_face import execu0te_mask_face #================ALLOWED FORMATS FOR IMAGE UPLOADS=========== ALLOWED_EXTENSIONS = set(['png', 'jpg', 'jpeg', 'gif']) cache = Cache() def allowed_file(filename): return '.' in filename and filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS # ============ REDIRECT HOME PAGE========================== @app.route('/') def index(): return render_template('index.html') # ============ REDIRECT ABOUT PAGE========================= @app.route('/about/') def about(): return render_template('about.html') # ============ REDIRECT SERVICE: TRY-ON==================== @app.route('/services_tryon/') def services_tryon(): return render_template('services_tryon.html') # ============ REDIRECT BLOG=============================== @app.route('/blog/') def blog(): return render_template('blog.html') # ============ REDIRECT CONTACT=========================== @app.route('/contact/') def contact(): return render_template('contact.html') # ========================================================================================================================================================================== # ============================================================================ REDIRECT SERVICE: SIZE PREDICTOR============================================================= @app.route('/services_sizep/') def services_sizep(): GO = "False" return render_template('services_sizep.html') # ============ FUNCTION TO INPUT & PROCESS SIZE PREDICTION =========== @app.route("/process_size", methods=['GET','POST']) def your_size(): if request.method=="POST": if 'file' not in request.files: flash('No file part') return redirect({{url_for('services_sizep')}}) file = request.files['file'] gender = request.form.get('gender') height = request.form['height'] unit = request.form.get('unit') Go = "False" if file.filename == '': flash('No image selected for uploading') return redirect(request.url) if file and allowed_file(file.filename) and gender and height and unit: filename = secure_filename(file.filename) file.save(os.path.join(app.config['UPLOAD_FOLDER2'], filename)) i_path = 'static/size/' file_path = os.path.join(i_path,filename) if gender == 'Female': size = women_size_predict(file_path, height, unit) else: size = men_size_predict(file_path, height, unit) return render_template('services_sizep.html', size=size) else: flash('Allowed image types are -> png, jpg, jpeg, gif') return redirect(url_for('services_sizep')) # size=None Go = "True" return redirect(url_for('services_sizep')) # =============fUNCTION TO DISPLAY SIZE===================== @app.route('/display_size/<size>') def display_size(size): if Go == "True": GO = "True" # time.sleep(5) return str(size) # ================================================================================================================================================================ # ======================================================1. REDIRECT CASUALS ====================================================================================== @app.route('/casuals/') def casuals(): text = "none" fish = glob.glob('./output/second/TOM/val/*') for f in fish: os.remove(f) fish = glob.glob('./static/outputs/output_f/*') for f in fish: os.remove(f) cloth = ['Casual-Yellow', 'Casual-Pink', 'Casual-Violet', 'Casual-White', 'Dark_ORANGE', 'Flowers-White', 'Grey_North' , 'Multicolo-White', 'Pine-Grey', 'Sky_Blue', 'TheNORTHface', 'Yellow62'] for i in range(len(cloth)): cloth[i] = (str(cloth[i])+".jpg") return render_template('casuals.html', casuals = cloth, text=text) # ============1. FUNCTION TO DISPALY CASUALS ================= @app.route('/static/Database/val/cloth/<casuals>') def display_casuals(casuals): # time.wait(10) return send_from_directory(app2.config['OUTPUT_FOLDER2'], casuals) # ============1. FUNCTION TO INPUT AND PROCESS TRY ON ========== @app.route('/casual_form', methods=['POST']) def upload_image(): cache.init_app(app2) with app2.app_context(): cache.clear() fish = glob.glob('./static/Database/val/person/*') for f in fish: os.remove(f) fish = glob.glob('./static/size/*') for f in fish: os.remove(f) cloth = ['Casual-Yellow', 'Casual-Pink', 'Casual-Violet', 'Casual-White', 'Dark_ORANGE', 'Flowers-White', 'Grey_North' , 'Light-Pink', 'Multicolo-White', 'Sky_Blue', 'TheNORTHface', 'Yellow62'] for i in range(len(cloth)): cloth[i] = (str(cloth[i])+".jpg") if request.method=="POST": if 'file' not in request.files: flash('No file part') return redirect(request.url) text = "casualss" file = request.files['file'] height = request.form['height'] unit = request.form.get('unit') if file.filename == '': flash('No image selected for uploading') return redirect(request.url) if file and allowed_file(file.filename) and text and height and unit: filename = secure_filename(file.filename) file.save(os.path.join(app.config['UPLOAD_FOLDER2'], filename)) i_path = 'static/size/' file_path = os.path.join(i_path,filename) size, file = women_size_predict1(file_path, height, unit) file = Image.fromarray(file, 'RGB') # file.save(os.path.join(app.config['UPLOAD_FOLDER1'], filename)) i_path = 'static/Database/val/person/' input_img = text+'.jpg' os.rename(i_path+filename , i_path+input_img) filename = text+'.jpg' o_path = './output/second/TOM/val' # fish = glob.glob('./output/second/TOM/val/*') fish = glob.glob('./static/outputs/output_f/*') for f in fish: os.remove(f) time.sleep(10) # # # # pose_parse(text) valpair_file = 'static/Database/val_pairs.txt' for i in range(len(cloth)): with open(valpair_file , "w") as f: f.write(text+'.jpg '+ cloth[i] ) f.close() predict() im = Image.open(os.path.join(o_path,cloth[i])) width, height = im.size left = width / 3 top = 2 * height / 3 right = 2 * width / 3 bottom = height im = im.crop((left, top, right, bottom)) newsize = (200, 270) im = im.resize(newsize) im.save(os.path.join(app2.config['OUTPUT_FOLDER3'],cloth[i])) # # # return render_template('casuals.html', casuals=cloth, text= text, size = size) else: flash('Allowed image types are -> png, jpg, jpeg, gif') return redirect(request.url) return render_template('casuals.html') # =================1. OUTPUT CASUALS TRYON====================== @app.route('/static/outputs/output_f/<casuals>') def display_output1(casuals): return send_from_directory(app2.config['OUTPUT_FOLDER3'], casuals) # ============================================================================================================================================================================= # =================================================================================2. REDIRECT SPORTS ========================================================================= @app.route('/sports/') def sports(): cache.init_app(app2) with app2.app_context(): cache.clear() text = "none" fish = glob.glob('./output/second/TOM/val/*') for f in fish: os.remove(f) fish = glob.glob('./static/outputs/output_f/*') for f in fish: os.remove(f) sport_cloth = ['ADIDAS-BW', 'ADIDAS_Black', 'FILA_grey', 'FILA-Pink', 'IVY-Black', 'NIKE-grey' ] for i in range(len(sport_cloth)): sport_cloth[i] = (str(sport_cloth[i])+".jpg") return render_template('sports.html', sports = sport_cloth, text=text) # ============2. FUNCTION TO DISPALY SPORTS ================= @app.route('/static/Database/val/cloth/<sports>') def display_sports(sports): return send_from_directory(app2.config['OUTPUT_FOLDER2'], sports) # ===========2.FUNCTION TO INPUT AND PROCESS TRY ON ========== @app.route('/sports_form', methods=['POST']) def upload_image2(): cache.init_app(app2) with app2.app_context(): cache.clear() fish = glob.glob('./static/Database/val/person/*') for f in fish: os.remove(f) fish = glob.glob('./static/size/*') for f in fish: os.remove(f) sport_cloth = ['ADIDAS-BW', 'ADIDAS_Black', 'FILA_grey', 'FILA-Pink', 'IVY-Black', 'NIKE-grey' ] for i in range(len(sport_cloth)): sport_cloth[i] = (str(sport_cloth[i])+".jpg") if request.method=="POST": if 'file' not in request.files: flash('No file part') return redirect(request.url) text = "sportss" file = request.files['file'] height = request.form['height'] unit = request.form.get('unit') Go = "False" if file.filename == '': flash('No image uploaded for size prediction.') return redirect(request.url) if file and allowed_file(file.filename) and height and unit: filename = secure_filename(file.filename) file.save(os.path.join(app.config['UPLOAD_FOLDER2'], filename)) i_path = 'static/size/' file_path = os.path.join(i_path,filename) size, file = women_size_predict1(file_path, height, unit) file = Image.fromarray(file, 'RGB') # file.save(os.path.join(app.config['UPLOAD_FOLDER1'], filename)) i_path = 'static/Database/val/person/' input_img = text+'.jpg' os.rename(i_path+filename , i_path+input_img) filename = text+'.jpg' o_path = './output/second/TOM/val' # fish = glob.glob('./output/second/TOM/val/*') fish = glob.glob('./static/outputs/output_f/*') for f in fish: os.remove(f) time.sleep(10) # # # # pose_parse(text) valpair_file = 'static/Database/val_pairs.txt' for i in range(len(sport_cloth)): with open(valpair_file , "w") as f: f.write(text+'.jpg '+ sport_cloth[i] ) f.close() predict() im = Image.open(os.path.join(o_path,sport_cloth[i])) width, height = im.size left = width / 3 top = 2 * height / 3 right = 2 * width / 3 bottom = height im = im.crop((left, top, right, bottom)) newsize = (200, 270) im = im.resize(newsize) im.save(os.path.join(app2.config['OUTPUT_FOLDER3'],sport_cloth[i])) # # # return render_template('sports.html', sports=sport_cloth, text= text, size=size) else: flash('Allowed image types are -> png, jpg, jpeg, gif') return redirect(request.url) return render_template('sports.html') # =================2. OUTPUT SPORTS TRYON====================== @app.route('/static/outputs/output_f/<sports>') def display_output2(sports): return send_from_directory(app2.config['OUTPUT_FOLDER3'], sports) # ======================================================================================================================================================================= # ===========================================================3. REDIRECT BRANDS ========================================================================================= @app.route('/brands/') def brands(): text = "none" fish = glob.glob('./output/second/TOM/val/*') for f in fish: os.remove(f) fish = glob.glob('./static/outputs/output_f/*') for f in fish: os.remove(f) brand_cloth = ['Pink-Flayrd', 'Blue-flayrd', 'Flayerd-Yellow', 'Bluish-Flayrd','NIKE-black', 'RED-Flayrd']#' for i in range(len(brand_cloth)): brand_cloth[i] = (str(brand_cloth[i])+".jpg") return render_template('brands.html', brands = brand_cloth, text=text) # ============3. FUNCTION TO DISPALY BRANDS ================= @app.route('/static/Database/val/cloth/<brands>') def display_brands(brands): # time.wait(10) return send_from_directory(app2.config['OUTPUT_FOLDER2'], brands) # ===========3.FUNCTION TO INPUT AND PROCESS TRY ON ========== @app.route('/brands_form', methods=['POST']) def upload_image3(): cache.init_app(app2) with app2.app_context(): cache.clear() fish = glob.glob('./static/Database/val/person/*') for f in fish: os.remove(f) fish = glob.glob('./static/size/*') for f in fish: os.remove(f) brand_cloth = ['Pink-Flayrd', 'Blue-flayrd', 'Flayerd-Yellow', 'Bluish-Flayrd','NIKE-black', 'RED-Flayrd']#' for i in range(len(brand_cloth)): brand_cloth[i] = (str(brand_cloth[i])+".jpg") if request.method=="POST": text = "brandss" file = request.files['file'] height = request.form['height'] unit = request.form.get('unit') if file.filename == '': flash('No image selected for uploading') return redirect(request.url) if file and allowed_file(file.filename) and height and unit: filename = secure_filename(file.filename) file.save(os.path.join(app.config['UPLOAD_FOLDER2'], filename)) i_path = 'static/size/' file_path = os.path.join(i_path,filename) size, file = women_size_predict1(file_path, height, unit) file = Image.fromarray(file, 'RGB') # file.save(os.path.join(app.config['UPLOAD_FOLDER1'], filename)) i_path = 'static/Database/val/person/' input_img = text+'.jpg' os.rename(i_path+filename , i_path+input_img) filename = text+'.jpg' o_path = './output/second/TOM/val' # fish = glob.glob('./output/second/TOM/val/*') fish = glob.glob('./static/outputs/output_f/*') for f in fish: os.remove(f) time.sleep(10) # # # # pose_parse(text) valpair_file = 'static/Database/val_pairs.txt' for i in range(len(brand_cloth)): with open(valpair_file , "w") as f: f.write(text+'.jpg '+ brand_cloth[i] ) f.close() predict() im = Image.open(os.path.join(o_path,brand_cloth[i])) width, height = im.size left = width / 3 top = 2 * height / 3 right = 2 * width / 3 bottom = height im = im.crop((left, top, right, bottom)) newsize = (200, 270) im = im.resize(newsize) im.save(os.path.join(app2.config['OUTPUT_FOLDER3'],brand_cloth[i])) # # # return render_template('brands.html', brands=brand_cloth, text= text, size=size) else: flash('Allowed image types are -> png, jpg, jpeg, gif') return redirect(request.url) return render_template('brands.html') # =================3. OUTPUT BRANDS TRYON====================== @app.route('/static/outputs/output_f/<brands>') def display_output3(brands): return send_from_directory(app2.config['OUTPUT_FOLDER3'], brands) # ========================================================================================================================================================================= # =====================================================================4. REDIRECT PARTY ================================================================================== @app.route('/party/') def party(): cache.init_app(app2) with app2.app_context(): cache.clear() text = "none" fish = glob.glob('./output/second/TOM/val/*') for f in fish: os.remove(f) fish = glob.glob('./static/outputs/output_f/*') for f in fish: os.remove(f) party = ['Orach-Flayrd', 'MultiColor', 'Butterfly_p','Waved-Black' ,'Shimm' ,'Wavy-Red','Wavy-Pink', 'Reddish-KNOTS'] for i in range(len(party)): party[i] = (str(party[i])+".jpg") return render_template('party_wear.html', party = party, text=text) # ===================================================4. FUNCTION TO DISPALY PARTY ========================================================== @app.route('/static/Database/val/cloth/<party>') def display_party(party): time.wait(10) return send_from_directory(app2.config['OUTPUT_FOLDER2'], party) # =================================================4. FUNCTION TO INPUT AND PROCESS TRY ON =================================================== @app.route('/party_form', methods=['POST']) def upload_image4(): cache.init_app(app2) with app2.app_context(): cache.clear() fish = glob.glob('./static/Database/val/person/*') for f in fish: os.remove(f) fish = glob.glob('./static/size/*') for f in fish: os.remove(f) party = ['Orach-Flayrd', 'MultiColor', 'Butterfly_p','Waved-Black' ,'Shimm', 'Wavy-Red','Wavy-Pink', 'Reddish-KNOTS'] for i in range(len(party)): party[i] = (str(party[i])+".jpg") if request.method=="POST": text = "palty" file = request.files['file'] height = request.form['height'] unit = request.form.get('unit') Go = "False" if file.filename == '': flash('No image uploaded for trying clothes.') return redirect(request.url) if file and allowed_file(file.filename) and height and unit and text: filename = secure_filename(file.filename) file.save(os.path.join(app.config['UPLOAD_FOLDER2'], filename)) i_path = 'static/size/' file_path = os.path.join(i_path,filename) size, file = women_size_predict1(file_path, height, unit) file = Image.fromarray(file, 'RGB') # file.save(os.path.join(app.config['UPLOAD_FOLDER1'], filename)) i_path = 'static/Database/val/person/' input_img = text+'.jpg' os.rename(i_path+filename , i_path+input_img) filename = text+'.jpg' o_path = './output/second/TOM/val' # fish = glob.glob('./output/second/TOM/val/*') fish = glob.glob('./static/outputs/output_f/*') for f in fish: os.remove(f) time.sleep(10) # # # # pose_parse(text) valpair_file = 'static/Database/val_pairs.txt' for i in range(len(party)): with open(valpair_file , "w") as f: f.write(text+'.jpg '+ party[i] ) f.close() predict() im = Image.open(os.path.join(o_path,party[i])) width, height = im.size left = width / 3 top = 2 * height / 3 right = 2 * width / 3 bottom = height im = im.crop((left, top, right, bottom)) newsize = (200, 270) im = im.resize(newsize) im.save(os.path.join(app2.config['OUTPUT_FOLDER3'],party[i])) # # # ## ## return render_template('party_wear.html', party=party, text= text, size=size) else: flash('Allowed image types are -> png, jpg, jpeg, gif') return redirect(request.url) return render_template('party_wear.html') # =====================================================4. OUTPUT PARTY TRYON================================================================= @app.route('/static/output/<party>') def display_output4(party): time.sleep(10) return send_from_directory(app2.config['OUTPUT_FOLDER3'], party) #------------------------------------------------------------------------------------------------------------------------------------------ #----------------------------------------------------5. T-Shirt Form----------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------------------------------------------------- @app.route('/tshirt/') def tshirt(): cache.init_app(app2) with app2.app_context(): cache.clear() text = "none" fish = glob.glob('./output/second/TOM/val/*') for f in fish: os.remove(f) fish = glob.glob('./static/outputs/output_f/*') for f in fish: os.remove(f) tshirt = ['POLO_Black', 'POLO-blue', 'POLO-Blue', 'POLO-BLue', 'POLO-orach', 'POLO-Violet'] for i in range(len(tshirt)): tshirt[i] = (str(tshirt[i])+".jpg") return render_template('tshirt.html', tshirt = tshirt, text=text) # ===================================================5. FUNCTION TO DISPALY T-shirt ========================================================== @app.route('/static/Database/val/cloth/<tshirt>') def display_tshirt(tshirt): time.wait(5) return send_from_directory(app2.config['OUTPUT_FOLDER2'], tshirt) # =================================================5. FUNCTION TO INPUT AND PROCESS TRY ON =================================================== @app.route('/tshirt_form', methods=['POST']) def upload_image5(): cache.init_app(app2) with app2.app_context(): cache.clear() fish = glob.glob('./static/Database/val/person/*') for f in fish: os.remove(f) fish = glob.glob('./static/size/*') for f in fish: os.remove(f) tshirt = ['POLO_Black', 'POLO-blue', 'POLO-Blue', 'POLO-BLue', 'POLO-orach', 'POLO-Violet'] for i in range(len(tshirt)): tshirt[i] = (str(tshirt[i])+".jpg") if request.method=="POST": text = "tshirtss" file = request.files['file'] file1 = request.files['file1'] height = request.form['height'] unit = request.form.get('unit') Go = "False" if file.filename == '': flash('No image uploaded for size prediction.') return redirect(request.url) if file1.filename == '': flash('No image uploaded for trying clothes.') return redirect(request.url) if file and allowed_file(file.filename) and file1 and allowed_file(file1.filename) and height and unit and text: filename = secure_filename(file.filename) filename1 = secure_filename(file1.filename) file1.save(os.path.join(app.config['UPLOAD_FOLDER2'], filename1)) i_path = 'static/size/' file_path = os.path.join(i_path,filename1) size = women_size_predict(file_path, height, unit) # file.save(os.path.join(app.config['UPLOAD_FOLDER1'], filename)) i_path = 'static/Database/val/person/' input_img = text+'.jpg' os.rename(i_path+filename , i_path+input_img) filename = text+'.jpg' o_path = './output/second/TOM/val' # time.sleep(10) # # # # pose_parse(text) valpair_file = 'static/Database/val_pairs.txt' for i in range(len(tshirt)): with open(valpair_file , "w") as f: f.write(text+'.jpg '+ tshirt[i] ) f.close() predict() im = Image.open(os.path.join(o_path,tshirt[i])) width, height = im.size left = width / 3 top = 2 * height / 3 right = 2 * width / 3 bottom = height im = im.crop((left, top, right, bottom)) newsize = (200, 270) im = im.resize(newsize) im.save(os.path.join(app2.config['OUTPUT_FOLDER3'],tshirt[i])) # # # ## ## return render_template('tshirt.html', tshirt=tshirt, text=text, size=size) else: flash('Allowed image types are -> png, jpg, jpeg, gif') return redirect(request.url) return render_template('tshirt.html') # =====================================================5. T-SHIRT TRYON================================================================= @app.route('/static/outputs/output_f/<tshirt>') def display_output5(tshirt): time.sleep(5) return send_from_directory(app2.config['OUTPUT_FOLDER3'], tshirt) #------------------------------------------------------ Mask the Face ------------------------------------------------------------------------- @app.route('/faceMask/') def facemask(): cache.init_app(app2) with app2.app_context(): cache.clear() text = "none" fish = glob.glob('./static/outputs/output_mask/*') for f in fish: os.remove(f) fish = glob.glob('MaskTheFace/data/*') for f in fish: os.remove(f) return render_template('facemask.html', text=text) @app.route('/facemask_form', methods=['POST']) def upload_image6(): cache.init_app(app2) with app2.app_context(): cache.clear() fish = glob.glob('./static/outputs/output_mask/*') for f in fish: os.remove(f) fish = glob.glob('MaskTheFace/data/*') for f in fish: os.remove(f) if request.method=="POST": text = "Face-Mask" file = request.files['file'] if file.filename == '': flash('No image uploaded for size prediction.') return redirect(request.url) if file and allowed_file(file.filename) and text: filename = secure_filename(file.filename) file.save(os.path.join(app.config['UPLOAD_FOLDER3'], filename)) # i_path = 'MaskTheFace/data/' input_img = text+'.jpg' os.rename(i_path+filename , i_path+input_img) zpath = os.path.join(i_path, input_img) print(i_path) # time.sleep(10) # # opath = 'static/outputs/output_mask/' mask_type = ['N95', 'surgical', 'cloth', 'N95', 'surgical', 'cloth', 'N95', 'surgical', 'cloth', 'N95', 'surgical', 'cloth', 'cloth'] mask_color = ["#fc1c1a","#177ABC","#94B6D2","#A5AB81","#DD8047","#6b425e","#e26d5a","#c92c48","#6a506d","#ffc900","#ffffff","#000000","#49ff00"] out_files = [] for i in range(13): mask_the_face.run_function(zpath, mask_type[i], '', '0', mask_color[i], '0','', 'verbose', 'write_original_image') out_files.append(text+"_" + str(mask_type[i])+'.jpg') im = Image.open(os.path.join(i_path,out_files[-1])) im.save(os.path.join(app2.config['OUTPUT_FOLDER4'],out_files[-1])) new_name = text + str(i) + '.jpg' os.rename(opath+out_files[-1], opath+new_name) out_files[-1] = new_name return render_template('facemask.html', text=text, out_files = out_files) else: flash('Allowed image types are -> png, jpg, jpeg, gif') return redirect(request.url) return render_template('facemask.html') @app.route('/static/outputs/output_mask/<out_files>') def display_output6(out_files): time.sleep(50) return send_from_directory(app2.config['OUTPUT_FOLDER4'], out_files) # ====================================================== FLASK APP RUN & DEBUG=================================================================== if __name__ == "__main__": app.run(debug=True, use_reloader=True)
33.440367
195
0.575661
3,198
25,515
4.475922
0.085679
0.011527
0.026827
0.019561
0.792441
0.769317
0.741442
0.718388
0.684714
0.654324
0
0.012076
0.146463
25,515
762
196
33.484252
0.645192
0.17962
0
0.670251
0
0
0.221289
0.065729
0
0
0
0
0
1
0.057348
false
0
0.032258
0.021505
0.191756
0.001792
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
9b02d6fe015d4aaa881b0a0e7b3238abcf387618
108
py
Python
.idea/fileTemplates/internal/Python Script.py
AbbieZ/Fraudiscern
ae30c58a62129e05e219ad48309ceb7f5d944bba
[ "Apache-2.0" ]
2
2021-07-28T15:11:22.000Z
2022-02-19T03:12:36.000Z
.idea/fileTemplates/internal/Python Script.py
AbbieZ/Fraudiscern
ae30c58a62129e05e219ad48309ceb7f5d944bba
[ "Apache-2.0" ]
null
null
null
.idea/fileTemplates/internal/Python Script.py
AbbieZ/Fraudiscern
ae30c58a62129e05e219ad48309ceb7f5d944bba
[ "Apache-2.0" ]
2
2021-07-05T15:22:08.000Z
2021-07-08T01:54:10.000Z
# !/usr/bin/env python # -*- coding: utf-8 -*- """ @author: @file: ${NAME}.py @time: ${DATE} @version: """
12
23
0.518519
14
108
4
1
0
0
0
0
0
0
0
0
0
0
0.010989
0.157407
108
9
24
12
0.604396
0.888889
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
9b10e096ca3401393f59084889ced4e2a1d32af2
83
py
Python
core/srlegacy/__init__.py
MakuZo/nutrigo
e50e10d497bcf9e01294565d42012d777f5c98d0
[ "MIT" ]
30
2019-03-28T18:01:58.000Z
2022-02-26T02:19:28.000Z
core/srlegacy/__init__.py
MakuZo/nutrigo
e50e10d497bcf9e01294565d42012d777f5c98d0
[ "MIT" ]
8
2019-06-06T19:33:08.000Z
2022-02-10T13:10:34.000Z
core/srlegacy/__init__.py
MakuZo/nutrigo
e50e10d497bcf9e01294565d42012d777f5c98d0
[ "MIT" ]
10
2019-04-04T19:19:28.000Z
2021-06-05T05:29:40.000Z
""" Contains scripts that were used to import USDA's Standard Legacy database. """
20.75
74
0.746988
12
83
5.166667
1
0
0
0
0
0
0
0
0
0
0
0
0.156627
83
3
75
27.666667
0.885714
0.891566
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
9b1d9256d4c04bb11138e2a4b40c9a9956c32d2e
335
py
Python
rklearn/__init__.py
rejux/rklearn-lib
56bc4f087a8c971cb545d65b0c1f9bafaaec3d67
[ "MIT" ]
null
null
null
rklearn/__init__.py
rejux/rklearn-lib
56bc4f087a8c971cb545d65b0c1f9bafaaec3d67
[ "MIT" ]
null
null
null
rklearn/__init__.py
rejux/rklearn-lib
56bc4f087a8c971cb545d65b0c1f9bafaaec3d67
[ "MIT" ]
null
null
null
################## ## __init__.py ## ################## # Import the python top file/modules for this package # When this package is loaded, we want the following modules to be # automatically imported import rklearn.perceptron import rklearn.adaline import rklearn.plotters import rklearn.opendata_loaders import rklearn.tfoo_v1
20.9375
66
0.713433
42
335
5.547619
0.690476
0.27897
0
0
0
0
0
0
0
0
0
0.003448
0.134328
335
15
67
22.333333
0.8
0.456716
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
f196895b0ab310bfbc203ece7aa7d2bd8beb582c
78
py
Python
thirdparty/stylegan3_ops/__init__.py
STomoya/animeface
37b3cd26097d7874559d4c152e41e5712b7a1a42
[ "MIT" ]
61
2020-06-06T08:25:09.000Z
2022-03-28T13:30:10.000Z
thirdparty/stylegan3_ops/ops/__init__.py
OrigamiXx/animeface
8724006df99ba7ef369e837d8294350ea733611b
[ "MIT" ]
13
2020-07-02T02:41:14.000Z
2021-05-09T14:24:58.000Z
thirdparty/stylegan3_ops/ops/__init__.py
OrigamiXx/animeface
8724006df99ba7ef369e837d8294350ea733611b
[ "MIT" ]
8
2020-10-03T18:51:16.000Z
2022-02-05T18:18:01.000Z
# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
39
77
0.74359
10
78
5.9
1
0
0
0
0
0
0
0
0
0
0
0.060606
0.153846
78
1
78
78
0.818182
0.948718
0
null
0
null
0
0
null
0
0
0
null
0
null
null
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
f1bf7f456c0b963980275559ec00f3f3ff524134
172
py
Python
pyweibo/__init__.py
YIDAMU/pyweibo
60c944ac5db7de090c607551c8004bb645c0cfdd
[ "MIT" ]
null
null
null
pyweibo/__init__.py
YIDAMU/pyweibo
60c944ac5db7de090c607551c8004bb645c0cfdd
[ "MIT" ]
null
null
null
pyweibo/__init__.py
YIDAMU/pyweibo
60c944ac5db7de090c607551c8004bb645c0cfdd
[ "MIT" ]
null
null
null
from .client import Client, UploadClient from .auth import Auth from .reader import LocalFileReader, AppInfoInputReader, TokenInputReader from .token import Token, AppInfo
34.4
73
0.837209
20
172
7.2
0.55
0
0
0
0
0
0
0
0
0
0
0
0.116279
172
4
74
43
0.947368
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
f1f5331fad13c0c12983d5dd006b73b18ff07f06
53
py
Python
exam_grading/initialize_notebook.py
valgarf/exam-grading
ae6f62fb71c40a16ede6297c8c59d6fb2521b1d7
[ "MIT" ]
null
null
null
exam_grading/initialize_notebook.py
valgarf/exam-grading
ae6f62fb71c40a16ede6297c8c59d6fb2521b1d7
[ "MIT" ]
null
null
null
exam_grading/initialize_notebook.py
valgarf/exam-grading
ae6f62fb71c40a16ede6297c8c59d6fb2521b1d7
[ "MIT" ]
null
null
null
from . import exam_data data = exam_data.ExamData()
13.25
27
0.754717
8
53
4.75
0.625
0.421053
0
0
0
0
0
0
0
0
0
0
0.150943
53
3
28
17.666667
0.844444
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
7b16093f5831e373f522687d0fa6629fb723f377
5,395
py
Python
contrib/pc3/info/ipaw/pc3/LoadSql.py
celiafish/VisTrails
d8cb575b8b121941de190fe608003ad1427ef9f6
[ "BSD-3-Clause" ]
83
2015-01-05T14:50:50.000Z
2021-09-17T19:45:26.000Z
contrib/pc3/info/ipaw/pc3/LoadSql.py
celiafish/VisTrails
d8cb575b8b121941de190fe608003ad1427ef9f6
[ "BSD-3-Clause" ]
254
2015-01-02T20:39:19.000Z
2018-11-28T17:16:44.000Z
contrib/pc3/info/ipaw/pc3/LoadSql.py
celiafish/VisTrails
d8cb575b8b121941de190fe608003ad1427ef9f6
[ "BSD-3-Clause" ]
40
2015-04-17T16:46:36.000Z
2021-09-28T22:43:24.000Z
class LoadSql(object): CREATE_DETECTION_TABLE = \ """ CREATE TABLE P2Detection( `objID` bigint NOT NULL, detectID bigint NOT NULL, ippObjID bigint NOT NULL, ippDetectID bigint NOT NULL, filterID smallint NOT NULL, imageID bigint NOT NULL, obsTime float NOT NULL DEFAULT -999, xPos real NOT NULL DEFAULT -999, yPos real NOT NULL DEFAULT -999, xPosErr real NOT NULL DEFAULT -999, yPosErr real NOT NULL DEFAULT -999, instFlux real NOT NULL DEFAULT -999, instFluxErr real NOT NULL DEFAULT -999, psfWidMajor real NOT NULL DEFAULT -999, psfWidMinor real NOT NULL DEFAULT -999, psfTheta real NOT NULL DEFAULT -999, psfLikelihood real NOT NULL DEFAULT -999, psfCf real NOT NULL DEFAULT -999, infoFlag int NOT NULL DEFAULT -999, htmID float NOT NULL DEFAULT -999, zoneID float NOT NULL DEFAULT -999, assocDate date NOT NULL DEFAULT '28881231', modNum smallint NOT NULL DEFAULT 0, ra float NOT NULL, `dec` float NOT NULL, raErr real NOT NULL DEFAULT 0, decErr real NOT NULL DEFAULT 0, cx float NOT NULL DEFAULT -999, cy float NOT NULL DEFAULT -999, cz float NOT NULL DEFAULT -999, peakFlux real NOT NULL DEFAULT -999, calMag real NOT NULL DEFAULT -999, calMagErr real NOT NULL DEFAULT -999, calFlux real NOT NULL DEFAULT -999, calFluxErr real NOT NULL DEFAULT -999, calColor real NOT NULL DEFAULT -999, calColorErr real NOT NULL DEFAULT -999, sky real NOT NULL DEFAULT -999, skyErr real NOT NULL DEFAULT -999, sgSep real NOT NULL DEFAULT -999, dataRelease smallint NOT NULL, CONSTRAINT PK_P2Detection_objID_detectID PRIMARY KEY ( `objID`, detectID )) """ CREATE_FRAME_META_TABLE = \ """ CREATE TABLE P2FrameMeta( frameID int NOT NULL PRIMARY KEY, surveyID smallint NOT NULL, filterID smallint NOT NULL, cameraID smallint NOT NULL, telescopeID smallint NOT NULL, analysisVer smallint NOT NULL, p1Recip smallint NOT NULL DEFAULT -999, p2Recip smallint NOT NULL DEFAULT -999, p3Recip smallint NOT NULL DEFAULT -999, nP2Images smallint NOT NULL DEFAULT -999, astroScat real NOT NULL DEFAULT -999, photoScat real NOT NULL DEFAULT -999, nAstRef int NOT NULL DEFAULT -999, nPhoRef int NOT NULL DEFAULT -999, expStart float NOT NULL DEFAULT -999, expTime real NOT NULL DEFAULT -999, airmass real NOT NULL DEFAULT -999, raBore float NOT NULL DEFAULT -999, decBore float NOT NULL DEFAULT -999 ) """ CREATE_IMAGE_META_TABLE = \ """ CREATE TABLE P2ImageMeta( imageID bigint NOT NULL PRIMARY KEY, frameID int NOT NULL, ccdID smallint NOT NULL, photoCalID int NOT NULL, filterID smallint NOT NULL, bias real NOT NULL DEFAULT -999, biasScat real NOT NULL DEFAULT -999, sky real NOT NULL DEFAULT -999, skyScat real NOT NULL DEFAULT -999, nDetect int NOT NULL DEFAULT -999, magSat real NOT NULL DEFAULT -999, completMag real NOT NULL DEFAULT -999, astroScat real NOT NULL DEFAULT -999, photoScat real NOT NULL DEFAULT -999, nAstRef int NOT NULL DEFAULT -999, nPhoRef int NOT NULL DEFAULT -999, nx smallint NOT NULL DEFAULT -999, ny smallint NOT NULL DEFAULT -999, psfFwhm real NOT NULL DEFAULT -999, psfModelID int NOT NULL DEFAULT -999, psfSigMajor real NOT NULL DEFAULT -999, psfSigMinor real NOT NULL DEFAULT -999, psfTheta real NOT NULL DEFAULT -999, psfExtra1 real NOT NULL DEFAULT -999, psfExtra2 real NOT NULL DEFAULT -999, apResid real NOT NULL DEFAULT -999, dapResid real NOT NULL DEFAULT -999, detectorID smallint NOT NULL DEFAULT -999, qaFlags int NOT NULL DEFAULT -999, detrend1 bigint NOT NULL DEFAULT -999, detrend2 bigint NOT NULL DEFAULT -999, detrend3 bigint NOT NULL DEFAULT -999, detrend4 bigint NOT NULL DEFAULT -999, detrend5 bigint NOT NULL DEFAULT -999, detrend6 bigint NOT NULL DEFAULT -999, detrend7 bigint NOT NULL DEFAULT -999, detrend8 bigint NOT NULL DEFAULT -999, photoZero real NOT NULL DEFAULT -999, photoColor real NOT NULL DEFAULT -999, projection1 varchar(8000) NOT NULL DEFAULT '-999', projection2 varchar(8000) NOT NULL DEFAULT '-999', crval1 float NOT NULL DEFAULT -999, crval2 float NOT NULL DEFAULT -999, crpix1 float NOT NULL DEFAULT -999, crpix2 float NOT NULL DEFAULT -999, pc001001 float NOT NULL DEFAULT -999, pc001002 float NOT NULL DEFAULT -999, pc002001 float NOT NULL DEFAULT -999, pc002002 float NOT NULL DEFAULT -999, polyOrder int NOT NULL DEFAULT -999, pca1x3y0 float NOT NULL DEFAULT -999, pca1x2y1 float NOT NULL DEFAULT -999, pca1x1y2 float NOT NULL DEFAULT -999, pca1x0y3 float NOT NULL DEFAULT -999, pca1x2y0 float NOT NULL DEFAULT -999, pca1x1y1 float NOT NULL DEFAULT -999, pca1x0y2 float NOT NULL DEFAULT -999, pca2x3y0 float NOT NULL DEFAULT -999, pca2x2y1 float NOT NULL DEFAULT -999, pca2x1y2 float NOT NULL DEFAULT -999, pca2x0y3 float NOT NULL DEFAULT -999, pca2x2y0 float NOT NULL DEFAULT -999, pca2x1y1 float NOT NULL DEFAULT -999, pca2x0y2 float NOT NULL DEFAULT -999 ) """
36.452703
55
0.685449
742
5,395
4.969003
0.19407
0.235422
0.394901
0.461079
0.649308
0.162191
0.122593
0.122593
0.122593
0.122593
0
0.102971
0.263763
5,395
147
56
36.70068
0.825277
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
7b18efbc785ed3ae684ae7ed423b42a40f49686d
424
py
Python
Bio/motifs/applications/__init__.py
bioinf-mcb/biopython
1a1f4a7ee4e0efba517d3d607c56c27e72e399cc
[ "BSD-3-Clause" ]
2
2021-03-04T16:57:06.000Z
2021-08-11T01:42:29.000Z
Bio/motifs/applications/__init__.py
cosign070128/biopython
2f02e34ba76306e9c27eec9e051809bec2cece9b
[ "BSD-3-Clause" ]
14
2021-03-26T20:54:22.000Z
2021-04-06T17:18:53.000Z
Bio/motifs/applications/__init__.py
cosign070128/biopython
2f02e34ba76306e9c27eec9e051809bec2cece9b
[ "BSD-3-Clause" ]
3
2020-05-17T19:43:05.000Z
2020-06-04T20:44:38.000Z
# Copyright 2009 by Bartek Wilczynski. All rights reserved. # Revisions copyright 2009 by Peter Cock. # # This file is part of the Biopython distribution and governed by your # choice of the "Biopython License Agreement" or the "BSD 3-Clause License". # Please see the LICENSE file that should have been included as part of this # package. """Motif command line tool wrappers.""" from ._xxmotif import XXmotifCommandline
35.333333
76
0.773585
62
424
5.274194
0.758065
0.079511
0.091743
0
0
0
0
0
0
0
0
0.025496
0.167453
424
11
77
38.545455
0.90085
0.851415
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
9e4eff7b8cf0a0bbeff3ca989880d9c84a991088
1,437
py
Python
respyabc/tests/test_respyabc.py
manuhuth/respyabc
1da7478775099028249983d2e098f7b3fcd562bb
[ "MIT" ]
null
null
null
respyabc/tests/test_respyabc.py
manuhuth/respyabc
1da7478775099028249983d2e098f7b3fcd562bb
[ "MIT" ]
null
null
null
respyabc/tests/test_respyabc.py
manuhuth/respyabc
1da7478775099028249983d2e098f7b3fcd562bb
[ "MIT" ]
2
2021-05-07T12:58:07.000Z
2021-09-16T11:48:34.000Z
"""Tests to check if :func:`respyabc.respyabc()` function runs.""" from respyabc.tools import prepare_test_respyabc from respyabc.tools import prepare_test_respyabc_model_selection def test_delta_choice_frequencies(): parameter_true = {"delta_delta": 0.95} prepare_test_respyabc( parameter_true=parameter_true, prior_low=0.9, prior_size=0.09, descriptives="choice_frequencies", ) def test_wage_a_constant_choice_frequencies(): parameter_true = {"wage_a_constant": 9.21} prepare_test_respyabc( parameter_true=parameter_true, prior_low=9, prior_size=0.9, descriptives="choice_frequencies", ) def test_delta_wage_moments(): parameter_true = {"delta_delta": 0.95} prepare_test_respyabc( parameter_true=parameter_true, prior_low=0.9, prior_size=0.09, descriptives="wage_moments", ) def test_wage_a_constant_wage_moments(): parameter_true = {"wage_a_constant": 9.21} prepare_test_respyabc( parameter_true=parameter_true, prior_low=9, prior_size=0.9, descriptives="wage_moments", ) def test_delta_choice_frequencies_model_selection(): parameter_true = {"delta_delta": 0.95} prepare_test_respyabc_model_selection( parameter_true=parameter_true, prior_low=0.9, prior_size=0.09, descriptives="choice_frequencies", )
26.127273
66
0.693807
178
1,437
5.174157
0.191011
0.211726
0.144408
0.141151
0.887079
0.700326
0.700326
0.609121
0.609121
0.560261
0
0.03183
0.212944
1,437
54
67
26.611111
0.782493
0.041754
0
0.690476
0
0
0.102845
0
0
0
0
0
0
1
0.119048
false
0
0.047619
0
0.166667
0
0
0
0
null
1
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
9e60173a382ab3ecafd358dc7a6e09c387bb9fe5
3,246
py
Python
freezing/kaa_freeze.py
tnhung2011/kaa
e6a8819a5ecba04b7db8303bd5736b5a7c9b822d
[ "Unlicense" ]
82
2015-01-26T15:34:03.000Z
2021-12-03T14:34:23.000Z
freezing/kaa_freeze.py
tnhung2011/kaa
e6a8819a5ecba04b7db8303bd5736b5a7c9b822d
[ "Unlicense" ]
34
2015-02-09T08:13:05.000Z
2021-04-08T08:19:05.000Z
freezing/kaa_freeze.py
tnhung2011/kaa
e6a8819a5ecba04b7db8303bd5736b5a7c9b822d
[ "Unlicense" ]
15
2015-05-21T07:41:17.000Z
2021-10-16T13:33:22.000Z
# check issue 11824 and issue 16047 to use freeze. # ~/python332/bin/python3 ~/python332/Tools/freeze/freeze.py -o build -m kaa.py import encodings import encodings.aliases import encodings.ascii import encodings.base64_codec import encodings.big5 import encodings.big5hkscs import encodings.bz2_codec import encodings.charmap import encodings.cp037 import encodings.cp1006 import encodings.cp1026 import encodings.cp1140 import encodings.cp1250 import encodings.cp1251 import encodings.cp1252 import encodings.cp1253 import encodings.cp1254 import encodings.cp1255 import encodings.cp1256 import encodings.cp1257 import encodings.cp1258 import encodings.cp424 import encodings.cp437 import encodings.cp500 import encodings.cp720 import encodings.cp737 import encodings.cp775 import encodings.cp850 import encodings.cp852 import encodings.cp855 import encodings.cp856 import encodings.cp857 import encodings.cp858 import encodings.cp860 import encodings.cp861 import encodings.cp862 import encodings.cp863 import encodings.cp864 import encodings.cp865 import encodings.cp866 import encodings.cp869 import encodings.cp874 import encodings.cp875 import encodings.cp932 import encodings.cp949 import encodings.cp950 import encodings.euc_jis_2004 import encodings.euc_jisx0213 import encodings.euc_jp import encodings.euc_kr import encodings.gb18030 import encodings.gb2312 import encodings.gbk import encodings.hex_codec import encodings.hp_roman8 import encodings.hz import encodings.idna import encodings.iso2022_jp import encodings.iso2022_jp_1 import encodings.iso2022_jp_2 import encodings.iso2022_jp_2004 import encodings.iso2022_jp_3 import encodings.iso2022_jp_ext import encodings.iso2022_kr import encodings.iso8859_1 import encodings.iso8859_10 import encodings.iso8859_11 import encodings.iso8859_13 import encodings.iso8859_14 import encodings.iso8859_15 import encodings.iso8859_16 import encodings.iso8859_2 import encodings.iso8859_3 import encodings.iso8859_4 import encodings.iso8859_5 import encodings.iso8859_6 import encodings.iso8859_7 import encodings.iso8859_8 import encodings.iso8859_9 import encodings.johab import encodings.koi8_r import encodings.koi8_u import encodings.latin_1 import encodings.mac_arabic import encodings.mac_centeuro import encodings.mac_croatian import encodings.mac_cyrillic import encodings.mac_farsi import encodings.mac_greek import encodings.mac_iceland import encodings.mac_latin2 import encodings.mac_roman import encodings.mac_romanian import encodings.mac_turkish import encodings.palmos import encodings.ptcp154 import encodings.punycode import encodings.quopri_codec import encodings.raw_unicode_escape import encodings.rot_13 import encodings.shift_jis import encodings.shift_jis_2004 import encodings.shift_jisx0213 import encodings.tis_620 import encodings.undefined import encodings.unicode_escape import encodings.unicode_internal import encodings.utf_16 import encodings.utf_16_be import encodings.utf_16_le import encodings.utf_32 import encodings.utf_32_be import encodings.utf_32_le import encodings.utf_7 import encodings.utf_8 import encodings.utf_8_sig import encodings.uu_codec import encodings.zlib_codec import kaa.cui.main import sys del sys.path[:] kaa.cui.main.run()
25.359375
79
0.874615
465
3,246
5.939785
0.301075
0.64084
0.119479
0.052136
0
0
0
0
0
0
0
0.106269
0.081023
3,246
127
80
25.559055
0.819645
0.038817
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.983607
0
0.983607
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
9e67ccf03651a3730bf608835cc7550f845219d1
16
py
Python
htmlq/version.py
dealfonso/htmlq
e5028841dc65bc24f3719d3ac44da245912b25ed
[ "Apache-2.0" ]
null
null
null
htmlq/version.py
dealfonso/htmlq
e5028841dc65bc24f3719d3ac44da245912b25ed
[ "Apache-2.0" ]
null
null
null
htmlq/version.py
dealfonso/htmlq
e5028841dc65bc24f3719d3ac44da245912b25ed
[ "Apache-2.0" ]
null
null
null
VERSION="0.1.8"
8
15
0.625
4
16
2.5
1
0
0
0
0
0
0
0
0
0
0
0.2
0.0625
16
1
16
16
0.466667
0
0
0
0
0
0.3125
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
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
9e6b0aa2a40be3ccf8e035026648d9db484440a7
132
py
Python
grout_server/apps.py
azavea/ashlar-server
4a9a6cb87b082845c30da0d2aa0cfc97f985d820
[ "Apache-2.0" ]
1
2018-07-13T20:13:34.000Z
2018-07-13T20:13:34.000Z
grout_server/apps.py
azavea/grout-server
4a9a6cb87b082845c30da0d2aa0cfc97f985d820
[ "Apache-2.0" ]
22
2018-07-17T17:13:33.000Z
2018-08-23T19:37:29.000Z
grout-server/grout_server/apps.py
jeancochrane/philly-fliers
2f2e3b9f4511933dbf1501701b54754ee524a1e6
[ "MIT" ]
null
null
null
from django.apps import AppConfig class GroutServerConfig(AppConfig): name = 'grout_server' verbose_name = 'Grout Server'
18.857143
35
0.75
15
132
6.466667
0.733333
0.185567
0.309278
0
0
0
0
0
0
0
0
0
0.174242
132
6
36
22
0.889908
0
0
0
0
0
0.181818
0
0
0
0
0
0
1
0
false
0
0.25
0
1
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
9eaacf0aa06c187da67be7fbb03c576b7a47ed29
384
py
Python
starkit/evolutionkit/base.py
dchu808/starkit
1940683ef231cee54be2c703d4a7611a3991d8b7
[ "BSD-3-Clause" ]
12
2018-05-15T14:59:27.000Z
2022-01-11T16:44:43.000Z
starkit/evolutionkit/base.py
dchu808/starkit
1940683ef231cee54be2c703d4a7611a3991d8b7
[ "BSD-3-Clause" ]
27
2018-03-13T10:45:38.000Z
2020-08-03T20:47:31.000Z
starkit/evolutionkit/base.py
dchu808/starkit
1940683ef231cee54be2c703d4a7611a3991d8b7
[ "BSD-3-Clause" ]
17
2018-03-13T10:06:53.000Z
2019-06-27T02:02:10.000Z
from astropy import modeling class GridConnector(modeling.Model): inputs = tuple('teff', 'logg', 'mh', 'radius') outputs = ('wavelength', 'flux') def __init__(self, grid, **kwargs): super(GridConnector, self).__init__(**kwargs) self.grid = grid def evaluate(self, teff, logg, mh, radius): return self.grid.evaluate(teff, logg, mh, radius)
25.6
57
0.640625
45
384
5.288889
0.533333
0.10084
0.12605
0.201681
0
0
0
0
0
0
0
0
0.210938
384
14
58
27.428571
0.785479
0
0
0
0
0
0.078329
0
0
0
0
0
0
1
0.222222
false
0
0.111111
0.111111
0.777778
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
7b46be6b074b191714c94badd36174b22f1d020a
623
py
Python
ds_discovery/__init__.py
project-hadron/discovery-transition-ds
08229ca3b7617b42ce2dd8e47ff93876c0843810
[ "BSD-3-Clause" ]
2
2020-09-21T17:24:16.000Z
2021-05-28T18:02:54.000Z
ds_discovery/__init__.py
project-hadron/discovery-transition-ds
08229ca3b7617b42ce2dd8e47ff93876c0843810
[ "BSD-3-Clause" ]
null
null
null
ds_discovery/__init__.py
project-hadron/discovery-transition-ds
08229ca3b7617b42ce2dd8e47ff93876c0843810
[ "BSD-3-Clause" ]
1
2021-07-23T13:52:04.000Z
2021-07-23T13:52:04.000Z
# bring definitions to the top level from ds_discovery.components.synthetic_builder import SyntheticBuilder from ds_discovery.components.transitioning import Transition from ds_discovery.components.wrangling import Wrangle from ds_discovery.components.feature_catalog import FeatureCatalog from ds_discovery.components.event_book_portfolio import EventBookPortfolio from ds_discovery.components.data_drift import DataDrift from ds_discovery.components.models_builder import ModelsBuilder from ds_discovery.components.controller import Controller # release version number picked up in the setup.py __version__ = "3.02.085"
47.923077
75
0.87801
81
623
6.530864
0.518519
0.090737
0.226843
0.378072
0
0
0
0
0
0
0
0.010508
0.083467
623
12
76
51.916667
0.915937
0.133226
0
0
0
0
0.014898
0
0
0
0
0
0
1
0
false
0
0.888889
0
0.888889
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
7b69cf826ee02104f743976bc184e7309f0c62e9
27
py
Python
wdmtoolbox/__init__.py
JLisin/wdmtoolbox
3a61fa935627c7a451920a6c039370d57c53bdbc
[ "BSD-3-Clause" ]
null
null
null
wdmtoolbox/__init__.py
JLisin/wdmtoolbox
3a61fa935627c7a451920a6c039370d57c53bdbc
[ "BSD-3-Clause" ]
null
null
null
wdmtoolbox/__init__.py
JLisin/wdmtoolbox
3a61fa935627c7a451920a6c039370d57c53bdbc
[ "BSD-3-Clause" ]
null
null
null
"""Package __init__.py."""
13.5
26
0.62963
3
27
4.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.074074
27
1
27
27
0.52
0.740741
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
7b7f4ccb03dfbc1a4f52aff4f12e63ea17fb00dc
1,287
py
Python
integrationtest/vm/simulator/suite_setup.py
hyhhui/zstack-woodpecker
ac36ae033cc521e2f877763de3ff55e4762e3ae0
[ "Apache-2.0" ]
2
2016-03-23T08:45:44.000Z
2017-06-26T02:40:46.000Z
integrationtest/vm/simulator/suite_setup.py
KevinDavidMitnick/zstack-woodpecker
96257faaf3c362168d008bdb47002025ad669b24
[ "Apache-2.0" ]
null
null
null
integrationtest/vm/simulator/suite_setup.py
KevinDavidMitnick/zstack-woodpecker
96257faaf3c362168d008bdb47002025ad669b24
[ "Apache-2.0" ]
2
2020-03-12T03:11:28.000Z
2021-07-26T01:57:58.000Z
''' @author: Frank ''' from zstackwoodpecker import test_util import os.path from zstacklib.utils import linux from zstacklib.utils import http from zstacktestagent.plugins import host as host_plugin from zstacktestagent import testagent import zstackwoodpecker.operations.deploy_operations as deploy_operations import zstackwoodpecker.operations.config_operations as config_operations import zstackwoodpecker.test_lib as test_lib def test(): #This vlan creation is not a must, if testing is under nested virt env. But it is required on physical host without enough physcial network devices and your test execution machine is not the same one as Host machine. #linux.create_vlan_eth("eth0", 10, "10.0.0.200", "255.255.255.0") #linux.create_vlan_eth("eth0", 11, "10.0.1.200", "255.255.255.0") #If test execution machine is not the same one as Host machine, deploy work is needed to separated to 2 steps(deploy_test_agent, execute_plan_without_deploy_test_agent). And it can not directly call SetupAction.run() test_lib.setup_plan.deploy_test_agent() test_lib.setup_plan.execute_plan_without_deploy_test_agent() deploy_operations.deploy_initial_database(test_lib.deploy_config) test_util.test_pass('Suite Setup Success')
44.37931
222
0.78244
195
1,287
4.974359
0.425641
0.036082
0.061856
0.049485
0.239175
0.16701
0.098969
0.098969
0.098969
0.098969
0
0.037443
0.149184
1,287
28
223
45.964286
0.848402
0.445998
0
0
0
0
0.028274
0
0
0
0
0
0
1
0.071429
true
0.071429
0.642857
0
0.714286
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
1
0
0
4
7b8b281402aaf0a10dc7b67619d5fa0ddc5842d9
106
py
Python
fastNLP/modules/decoder/__init__.py
h00Jiang/fastNLP
79ddb469d81946c87a3d066122a8a3aba6e40f3a
[ "Apache-2.0" ]
1
2019-04-10T03:37:18.000Z
2019-04-10T03:37:18.000Z
fastNLP/modules/decoder/__init__.py
TTTREE/fastNLP
ef82c1f10000752db32a5fa323668b94bcb940a1
[ "Apache-2.0" ]
1
2018-09-30T13:30:51.000Z
2018-09-30T13:30:51.000Z
fastNLP/modules/decoder/__init__.py
TTTREE/fastNLP
ef82c1f10000752db32a5fa323668b94bcb940a1
[ "Apache-2.0" ]
null
null
null
from .CRF import ConditionalRandomField from .MLP import MLP __all__ = ["ConditionalRandomField", "MLP"]
21.2
43
0.783019
11
106
7.181818
0.545455
0
0
0
0
0
0
0
0
0
0
0
0.122642
106
4
44
26.5
0.849462
0
0
0
0
0
0.235849
0.207547
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
7bb5692bd2ff291bc423963670a1c02e2b7dc2ba
219
py
Python
exercicios/exer003.py
franklinperseuDS/Python
16a8545ce3aa873f5e758e3db5f04f60887f9dfc
[ "MIT" ]
null
null
null
exercicios/exer003.py
franklinperseuDS/Python
16a8545ce3aa873f5e758e3db5f04f60887f9dfc
[ "MIT" ]
null
null
null
exercicios/exer003.py
franklinperseuDS/Python
16a8545ce3aa873f5e758e3db5f04f60887f9dfc
[ "MIT" ]
null
null
null
#Adicionar dois números e mostrar a soma print("==========Exercicio 3 ==========") numero1 = int(input("Digite um número: ")) numero2 = int(input("Digite outro número: ")) print(numero1,"+",numero2,"=",numero1+numero2)
36.5
46
0.648402
27
219
5.259259
0.666667
0.112676
0.197183
0
0
0
0
0
0
0
0
0.035714
0.105023
219
6
46
36.5
0.688776
0.178082
0
0
0
0
0.405556
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
c8de8b2a21f6ef5adbaa8f341317e751c4886c35
55
py
Python
lib/TermColors.py
Monofraps/Mocca
0f4a1f5690fad457aaf4ea26d3d0271b34c6e187
[ "MIT" ]
null
null
null
lib/TermColors.py
Monofraps/Mocca
0f4a1f5690fad457aaf4ea26d3d0271b34c6e187
[ "MIT" ]
4
2015-01-09T18:02:51.000Z
2015-01-10T01:06:58.000Z
lib/TermColors.py
Monofraps/Mocca
0f4a1f5690fad457aaf4ea26d3d0271b34c6e187
[ "MIT" ]
null
null
null
INFO = '\033[94m' FAIL = '\033[91;1m' ENDC = '\033[0m'
13.75
19
0.545455
10
55
3
0.8
0
0
0
0
0
0
0
0
0
0
0.326087
0.163636
55
3
20
18.333333
0.326087
0
0
0
0
0
0.454545
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
cdc6a885a6d2e755390d469a46ad8c5b25ec2097
76
py
Python
deepinpy/forwards/mcmri/__init__.py
han20192019/deepinpy
0fbdfc9cd81f4d698bb1d5e361ef1223a2c8dd1d
[ "MIT" ]
30
2020-03-07T04:36:03.000Z
2021-12-15T06:28:12.000Z
deepinpy/forwards/mcmri/__init__.py
han20192019/deepinpy
0fbdfc9cd81f4d698bb1d5e361ef1223a2c8dd1d
[ "MIT" ]
13
2020-03-14T06:12:20.000Z
2021-05-20T04:33:58.000Z
deepinpy/forwards/mcmri/__init__.py
han20192019/deepinpy
0fbdfc9cd81f4d698bb1d5e361ef1223a2c8dd1d
[ "MIT" ]
22
2020-02-28T18:20:54.000Z
2022-02-16T11:21:58.000Z
""" Deep inverse problems in Python Multi-channel MRI forward operator """
12.666667
34
0.75
10
76
5.7
1
0
0
0
0
0
0
0
0
0
0
0
0.157895
76
5
35
15.2
0.890625
0.881579
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
a82819a923245cf8fbe6948928525a66448497f3
143
py
Python
office365/sharepoint/request_context.py
juguerre/Office365-REST-Python-Client
dbadaddb14e7bad199499c898cdef1ada9694fc9
[ "MIT" ]
null
null
null
office365/sharepoint/request_context.py
juguerre/Office365-REST-Python-Client
dbadaddb14e7bad199499c898cdef1ada9694fc9
[ "MIT" ]
null
null
null
office365/sharepoint/request_context.py
juguerre/Office365-REST-Python-Client
dbadaddb14e7bad199499c898cdef1ada9694fc9
[ "MIT" ]
null
null
null
from office365.runtime.client_object import ClientObject class RequestContext(ClientObject): def get_remote_context(self): pass
17.875
56
0.776224
16
143
6.75
0.9375
0
0
0
0
0
0
0
0
0
0
0.02521
0.167832
143
7
57
20.428571
0.882353
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0.25
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
4
b52c22fb5a68932a3b86b5f58a7a0f21fd90d955
50
py
Python
tests/__init__.py
SamuelMarks/runtime-type-checker
bf4a06701acc07f3aa547aa71467f1bd595fbe8b
[ "MIT" ]
4
2021-02-25T12:47:28.000Z
2021-12-22T08:04:01.000Z
tests/__init__.py
SamuelMarks/runtime-type-checker
bf4a06701acc07f3aa547aa71467f1bd595fbe8b
[ "MIT" ]
3
2020-10-25T13:36:20.000Z
2021-06-15T11:03:41.000Z
tests/__init__.py
SamuelMarks/runtime-type-checker
bf4a06701acc07f3aa547aa71467f1bd595fbe8b
[ "MIT" ]
1
2020-10-23T00:55:21.000Z
2020-10-23T00:55:21.000Z
"""Unit test package for runtime_type_checker."""
25
49
0.76
7
50
5.142857
1
0
0
0
0
0
0
0
0
0
0
0
0.1
50
1
50
50
0.8
0.86
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
b53278efee843a04498d898aabd17a825f902596
225
py
Python
main/extensions.py
Curiouspaul1/Ecolead
1c5008b9ad9a6611b76bf61539ae3af9da06afc5
[ "MIT" ]
null
null
null
main/extensions.py
Curiouspaul1/Ecolead
1c5008b9ad9a6611b76bf61539ae3af9da06afc5
[ "MIT" ]
null
null
null
main/extensions.py
Curiouspaul1/Ecolead
1c5008b9ad9a6611b76bf61539ae3af9da06afc5
[ "MIT" ]
null
null
null
from flask_sqlalchemy import SQLAlchemy from flask_marshmallow import Marshmallow from flask_bcrypt import Bcrypt from flask_migrate import Migrate ma = Marshmallow() db = SQLAlchemy() bcrypt_ = Bcrypt() migrate = Migrate()
22.5
41
0.817778
28
225
6.392857
0.321429
0.201117
0
0
0
0
0
0
0
0
0
0
0.128889
225
9
42
25
0.913265
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
b565b5308c6468e57ec2d70b663f90a8d585d365
177
py
Python
seedstar_casestudy_one/emaillist/forms.py
elayira/seedstar_casestudy_one
a1ed30f464546f1d9de5c1eb353585a720990bc2
[ "MIT" ]
null
null
null
seedstar_casestudy_one/emaillist/forms.py
elayira/seedstar_casestudy_one
a1ed30f464546f1d9de5c1eb353585a720990bc2
[ "MIT" ]
null
null
null
seedstar_casestudy_one/emaillist/forms.py
elayira/seedstar_casestudy_one
a1ed30f464546f1d9de5c1eb353585a720990bc2
[ "MIT" ]
null
null
null
from django.forms import ModelForm from .models import EmailList class EmailListForm(ModelForm): class Meta: model = EmailList fields = ['name', 'email']
17.7
34
0.677966
19
177
6.315789
0.736842
0
0
0
0
0
0
0
0
0
0
0
0.237288
177
9
35
19.666667
0.888889
0
0
0
0
0
0.050847
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
b57931e2d2dee7d225fcdc2fa9ee448d21ae0eb8
572
py
Python
gweld/__init__.py
ieuanjones/gweld
903cd5619822f8448dd3b071dbbdeb5ff89b76aa
[ "MIT" ]
null
null
null
gweld/__init__.py
ieuanjones/gweld
903cd5619822f8448dd3b071dbbdeb5ff89b76aa
[ "MIT" ]
null
null
null
gweld/__init__.py
ieuanjones/gweld
903cd5619822f8448dd3b071dbbdeb5ff89b76aa
[ "MIT" ]
2
2020-04-18T11:17:57.000Z
2020-04-18T11:20:19.000Z
from gweld.data import Data from gweld.data_set import DataSet from gweld.style.text_style import TextStyle from gweld.style.circle_text_style import CircleTextStyle from gweld.style.style import Style from gweld.elements.vis_element import VisElement from gweld.elements.text_element import TextElement from gweld.elements.axis_element import AxisElement from gweld.elements.bg_element import BGElement from gweld.charts.chart import Chart from gweld.charts.bar import Bar from gweld.charts.pie import Pie from gweld.charts.line import Line from gweld.vis import Vis
30.105263
57
0.851399
89
572
5.382022
0.280899
0.263048
0.141962
0
0
0
0
0
0
0
0
0
0.104895
572
18
58
31.777778
0.935547
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
b5910c3e61f752a72eef40f121c2ce1aacda79d3
76
py
Python
example_snippets/multimenus_snippets/Snippets/NumPy/Pretty printing/Print $N$ elements at each end of a summary.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
null
null
null
example_snippets/multimenus_snippets/Snippets/NumPy/Pretty printing/Print $N$ elements at each end of a summary.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
null
null
null
example_snippets/multimenus_snippets/Snippets/NumPy/Pretty printing/Print $N$ elements at each end of a summary.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
1
2021-02-04T04:51:48.000Z
2021-02-04T04:51:48.000Z
with printoptions(threshold=5, edgeitems=4): print(np.random.random(10))
38
44
0.75
11
76
5.181818
0.909091
0
0
0
0
0
0
0
0
0
0
0.057971
0.092105
76
2
45
38
0.768116
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
b5a9c66b94d0c7027220e3333efdb755dfe9e90b
284
py
Python
grb/defense/base.py
Stanislas0/grb
96fc521f57fdb06ab6a3c442fcf4a8bc97894829
[ "MIT" ]
null
null
null
grb/defense/base.py
Stanislas0/grb
96fc521f57fdb06ab6a3c442fcf4a8bc97894829
[ "MIT" ]
null
null
null
grb/defense/base.py
Stanislas0/grb
96fc521f57fdb06ab6a3c442fcf4a8bc97894829
[ "MIT" ]
null
null
null
from abc import ABCMeta, abstractmethod class Defense(metaclass=ABCMeta): @abstractmethod def defense(self, model, adj, features, **kwargs): """ :param model: :param features: :param adj: :param kwargs: :return: """
17.75
54
0.56338
26
284
6.153846
0.615385
0.2625
0
0
0
0
0
0
0
0
0
0
0.327465
284
15
55
18.933333
0.837696
0.232394
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
a93f19338fdf1a1d68df0c34c709ad504c3dd257
382
py
Python
phare/quefaire/views.py
decaruju/phare
7b17806a6ed9ec1e5863fd65b39391a7a8d9b219
[ "MIT" ]
null
null
null
phare/quefaire/views.py
decaruju/phare
7b17806a6ed9ec1e5863fd65b39391a7a8d9b219
[ "MIT" ]
null
null
null
phare/quefaire/views.py
decaruju/phare
7b17806a6ed9ec1e5863fd65b39391a7a8d9b219
[ "MIT" ]
null
null
null
from django.shortcuts import render_to_response, render from django.template import RequestContext from django.http import HttpResponse from ressources.models import Ressource # Create your views here. def que_faire(request): return render(request, 'que_faire.html') def que_faire_detail(request, sujet): if(sujet=='innondation'): return render(request, 'innondation.html')
25.466667
55
0.803665
51
382
5.901961
0.54902
0.099668
0.07309
0
0
0
0
0
0
0
0
0
0.109948
382
14
56
27.285714
0.885294
0.060209
0
0
0
0
0.114846
0
0
0
0
0
0
1
0.222222
false
0
0.444444
0.111111
0.888889
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
4
a955c6158d635760ce39f427d85c3039834e8548
315
py
Python
tests/clipping_area/model_test.py
tyrasd/osmaxx
da4454083d17b2ef8b0623cad62e39992b6bd52a
[ "MIT" ]
27
2015-03-30T14:17:26.000Z
2022-02-19T17:30:44.000Z
tests/clipping_area/model_test.py
tyrasd/osmaxx
da4454083d17b2ef8b0623cad62e39992b6bd52a
[ "MIT" ]
483
2015-03-09T16:58:03.000Z
2022-03-14T09:29:06.000Z
tests/clipping_area/model_test.py
tyrasd/osmaxx
da4454083d17b2ef8b0623cad62e39992b6bd52a
[ "MIT" ]
6
2015-04-07T07:38:30.000Z
2020-04-01T12:45:53.000Z
import pytest @pytest.mark.django_db() def test_osmosis_polygon_file_string_property_returns_osmosis_polygon_file(persisted_valid_clipping_area): # this actually assures we are testing the asserts in persisted_valid_clipping_area, if # at some point that fixture should be unused at other places pass
35
106
0.825397
47
315
5.191489
0.808511
0.114754
0.147541
0.213115
0
0
0
0
0
0
0
0
0.139683
315
8
107
39.375
0.900369
0.460317
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0.25
0.25
0
0.5
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
4
8d94aee4f83b63b4268b40e16d3f3525c439153d
97
py
Python
models/__init__.py
dduarte-odoogap/license_white_list
2877b27213f64a4c8884437fd9e7e720dace3706
[ "Adobe-Glyph" ]
null
null
null
models/__init__.py
dduarte-odoogap/license_white_list
2877b27213f64a4c8884437fd9e7e720dace3706
[ "Adobe-Glyph" ]
null
null
null
models/__init__.py
dduarte-odoogap/license_white_list
2877b27213f64a4c8884437fd9e7e720dace3706
[ "Adobe-Glyph" ]
null
null
null
# Copyright 2021 OdooGAP (http://www.odoogap.com) # @author Diogo Duarte from . import ir_module
24.25
49
0.752577
14
97
5.142857
0.928571
0
0
0
0
0
0
0
0
0
0
0.047619
0.134021
97
3
50
32.333333
0.809524
0.701031
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
a5ce4658a4584ed69e7cf2a1e94a7d2bb3a059d2
26
py
Python
08_String/Step01/8_1_sang.py
StudyForCoding/BEAKJOON
84e1c5e463255e919ccf6b6a782978c205420dbf
[ "MIT" ]
null
null
null
08_String/Step01/8_1_sang.py
StudyForCoding/BEAKJOON
84e1c5e463255e919ccf6b6a782978c205420dbf
[ "MIT" ]
3
2020-11-04T05:38:53.000Z
2021-03-02T02:15:19.000Z
08_String/Step01/8_1_sang.py
StudyForCoding/BEAKJOON
84e1c5e463255e919ccf6b6a782978c205420dbf
[ "MIT" ]
null
null
null
s = input() print(ord(s))
8.666667
13
0.576923
5
26
3
0.8
0
0
0
0
0
0
0
0
0
0
0
0.153846
26
2
14
13
0.681818
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
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
1
0
4
a5dffb2965d0d02672663a7b60b6478a1afd25e2
63
py
Python
tests/test.py
notfresh/md2
8db851e3662e87d6bb428a4f789da0e0aac02124
[ "MIT" ]
null
null
null
tests/test.py
notfresh/md2
8db851e3662e87d6bb428a4f789da0e0aac02124
[ "MIT" ]
null
null
null
tests/test.py
notfresh/md2
8db851e3662e87d6bb428a4f789da0e0aac02124
[ "MIT" ]
null
null
null
from md_helper import md if __name__ == '__main__': md()
10.5
26
0.650794
9
63
3.555556
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.238095
63
5
27
12.6
0.666667
0
0
0
0
0
0.129032
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
a5e03e43be1a255f600b41c0cd3bde08fcdb4bb7
98
py
Python
haproxy/datadog_checks/haproxy/__init__.py
Siecje/integrations-core
b2f3ea4145b25394be0b274093d1f0723e8f968d
[ "BSD-3-Clause" ]
1
2020-08-08T02:01:01.000Z
2020-08-08T02:01:01.000Z
haproxy/datadog_checks/haproxy/__init__.py
Siecje/integrations-core
b2f3ea4145b25394be0b274093d1f0723e8f968d
[ "BSD-3-Clause" ]
null
null
null
haproxy/datadog_checks/haproxy/__init__.py
Siecje/integrations-core
b2f3ea4145b25394be0b274093d1f0723e8f968d
[ "BSD-3-Clause" ]
1
2019-03-06T14:30:52.000Z
2019-03-06T14:30:52.000Z
from . import haproxy HAProxy = haproxy.HAProxy __all__ = [ '__version__', 'HAProxy' ]
9.8
25
0.642857
9
98
6.111111
0.555556
0.763636
0.763636
0
0
0
0
0
0
0
0
0
0.244898
98
9
26
10.888889
0.743243
0
0
0
0
0
0.183673
0
0
0
0
0
0
1
0
false
0
0.166667
0
0.166667
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
570c6d9a7c3251f611254eb8281999d12001f753
370
py
Python
db/fields.py
hnzlmnn/dora
1c7375491af03d3ea8557e68b18afc6f916f65d7
[ "BSD-3-Clause" ]
6
2020-03-10T14:57:42.000Z
2021-05-19T19:14:54.000Z
db/fields.py
hnzlmnn/dora
1c7375491af03d3ea8557e68b18afc6f916f65d7
[ "BSD-3-Clause" ]
null
null
null
db/fields.py
hnzlmnn/dora
1c7375491af03d3ea8557e68b18afc6f916f65d7
[ "BSD-3-Clause" ]
3
2020-03-08T16:02:11.000Z
2020-07-24T10:56:01.000Z
import binascii from peewee import CharField class BytesField(CharField): field_type = 'char' def __init__(self, max_length, *args, **kwargs): super().__init__(*args, max_length=max_length * 2, **kwargs) def db_value(self, value): return binascii.b2a_hex(value) def python_value(self, value): return binascii.a2b_hex(value)
21.764706
68
0.681081
48
370
4.916667
0.541667
0.114407
0.118644
0.169492
0.237288
0
0
0
0
0
0
0.010239
0.208108
370
16
69
23.125
0.795222
0
0
0
0
0
0.010811
0
0
0
0
0
0
1
0.3
false
0
0.2
0.2
0.9
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
572e638885682ff76f28054ce61a522c7288540a
96
py
Python
applications/events_news/apps.py
samay-rgb/alumni
f147ca04c3b9e24307321df5f26e9f7db26fefe3
[ "MIT" ]
5
2019-10-15T14:48:39.000Z
2022-02-19T05:14:51.000Z
applications/events_news/apps.py
samay-rgb/alumni
f147ca04c3b9e24307321df5f26e9f7db26fefe3
[ "MIT" ]
10
2019-12-14T06:08:30.000Z
2022-03-13T16:01:05.000Z
applications/events_news/apps.py
samay-rgb/alumni
f147ca04c3b9e24307321df5f26e9f7db26fefe3
[ "MIT" ]
10
2019-10-06T13:45:25.000Z
2022-02-10T17:33:39.000Z
from django.apps import AppConfig class EventsNewsConfig(AppConfig): name = 'events_news'
16
34
0.770833
11
96
6.636364
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.15625
96
5
35
19.2
0.901235
0
0
0
0
0
0.114583
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
5743ebc74351b5f8b99d80c57ea36a68c8871573
180
py
Python
Alerts.py
aycabozyell/WARMON
faeb3e1879be43591b0d6c3137e04e3b6b9d5fe9
[ "MIT" ]
null
null
null
Alerts.py
aycabozyell/WARMON
faeb3e1879be43591b0d6c3137e04e3b6b9d5fe9
[ "MIT" ]
null
null
null
Alerts.py
aycabozyell/WARMON
faeb3e1879be43591b0d6c3137e04e3b6b9d5fe9
[ "MIT" ]
null
null
null
class Alerts: def _init_ (self,Alert_Id, Alert_Name, Alert_Code): self.Alert_Id= AlertId self.Alert_Name = Alert_Name self.Alert_Code = Alert_Code
25.714286
55
0.661111
25
180
4.36
0.4
0.330275
0.201835
0
0
0
0
0
0
0
0
0
0.266667
180
6
56
30
0.825758
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0
0
0.4
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
938c3ad3fed24bedfcab1d1e49f3c1cf5eb82bb7
151
py
Python
exercícios/EX_CursoEmVideo/ex005.py
jose-carlos-code/CursoEmvideo-python
8c9b82db2c2b906f6d8f2359a680b9b3af25da43
[ "MIT" ]
1
2021-01-11T15:10:36.000Z
2021-01-11T15:10:36.000Z
exercícios/EX_CursoEmVideo/ex005.py
jose-carlos-code/CursoEmvideo-python
8c9b82db2c2b906f6d8f2359a680b9b3af25da43
[ "MIT" ]
null
null
null
exercícios/EX_CursoEmVideo/ex005.py
jose-carlos-code/CursoEmvideo-python
8c9b82db2c2b906f6d8f2359a680b9b3af25da43
[ "MIT" ]
null
null
null
n = int(input('me diga um numero: ')) s = n + 1 a = n - 1 print ('o sucessor de {} e {}'. format(n, s)) print ('o antecessor de {} e {}'.format(n, a))
25.166667
46
0.536424
29
151
2.793103
0.586207
0.049383
0.222222
0.246914
0
0
0
0
0
0
0
0.017094
0.225166
151
5
47
30.2
0.675214
0
0
0
0
0
0.417219
0
0
0
0
0
0
1
0
false
0
0
0
0
0.4
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
938c4415d5369522a7601e22e521ee80617d3db0
175
py
Python
ocp_resources/console_plugin.py
dshchedr/openshift-python-wrapper
b3f743e33e3bde4bbc24247776a77aefdbd4061d
[ "Apache-2.0" ]
null
null
null
ocp_resources/console_plugin.py
dshchedr/openshift-python-wrapper
b3f743e33e3bde4bbc24247776a77aefdbd4061d
[ "Apache-2.0" ]
null
null
null
ocp_resources/console_plugin.py
dshchedr/openshift-python-wrapper
b3f743e33e3bde4bbc24247776a77aefdbd4061d
[ "Apache-2.0" ]
null
null
null
from ocp_resources.resource import Resource class ConsolePlugin(Resource): """ ConsolePlugin object. """ api_group = Resource.ApiGroup.CONSOLE_OPENSHIFT_IO
17.5
54
0.737143
18
175
6.944444
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.182857
175
9
55
19.444444
0.874126
0.12
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
939ba73bd6abdd8b2e050cf3eebcc7e9298e7a61
1,091
py
Python
database/postgres/detect.py
Relintai/rcpp_framework
6416ecc5e0c88115f209cd63945a29c0e16a8e99
[ "MIT" ]
1
2020-11-27T21:35:43.000Z
2020-11-27T21:35:43.000Z
database/postgres/detect.py
Relintai/rcpp_framework
6416ecc5e0c88115f209cd63945a29c0e16a8e99
[ "MIT" ]
null
null
null
database/postgres/detect.py
Relintai/rcpp_framework
6416ecc5e0c88115f209cd63945a29c0e16a8e99
[ "MIT" ]
1
2020-12-28T07:43:09.000Z
2020-12-28T07:43:09.000Z
import os import platform import sys def is_active(): return True def get_name(): return "pgsql" def can_build(): if os.name == "posix" or sys.platform == "darwin": x11_error = os.system("pkg-config --version > /dev/null") if x11_error: return False libpg_error = os.system("pkg-config libpq --modversion --silence-errors > /dev/null ") if libpg_error: print("postgres not found!") return False print("postgres found!") return True #todo return False def get_opts(): from SCons.Variables import BoolVariable, EnumVariable return [ EnumVariable("debug_symbols", "Add debugging symbols to release/release_debug builds", "yes", ("yes", "no")), ] def get_flags(): return [] def configure(env): env.ParseConfig("pkg-config libpq --cflags --libs") env.Append(CPPDEFINES=["PGSQL_PRESENT"]) # Link those statically for portability #if env["use_static_cpp"]: #env.Append(LINKFLAGS=["-static-libgcc", "-static-libstdc++"])
19.482143
117
0.618698
130
1,091
5.084615
0.553846
0.027231
0.039334
0.048412
0.066566
0
0
0
0
0
0
0.004908
0.252979
1,091
55
118
19.836364
0.806135
0.117324
0
0.172414
0
0
0.271116
0.021898
0
0
0
0.018182
0
1
0.206897
false
0
0.137931
0.103448
0.62069
0.068966
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
1
1
0
0
4
f52c94c594613ecb40affc00f75bbc97ce2f6373
5,839
py
Python
hiku/types.py
popravich/hiku
4ce6b46302de61fc17016ddf3af3f378b3fce119
[ "BSD-3-Clause" ]
null
null
null
hiku/types.py
popravich/hiku
4ce6b46302de61fc17016ddf3af3f378b3fce119
[ "BSD-3-Clause" ]
null
null
null
hiku/types.py
popravich/hiku
4ce6b46302de61fc17016ddf3af3f378b3fce119
[ "BSD-3-Clause" ]
1
2022-01-20T17:03:23.000Z
2022-01-20T17:03:23.000Z
from abc import abstractmethod, ABCMeta from collections import OrderedDict from .compat import with_metaclass class GenericMeta(type): def __repr__(cls): return cls.__name__ def __eq__(cls, other): return (cls.__class__ is other.__class__ and cls.__dict__ == other.__dict__) def __ne__(cls, other): return not cls.__eq__(other) def accept(cls, visitor): raise NotImplementedError(type(cls)) class AnyMeta(GenericMeta): def accept(cls, visitor): return visitor.visit_any(cls) class Any(with_metaclass(AnyMeta, object)): pass class BooleanMeta(GenericMeta): def accept(cls, visitor): return visitor.visit_boolean(cls) class Boolean(with_metaclass(BooleanMeta, object)): pass class StringMeta(GenericMeta): def accept(cls, visitor): return visitor.visit_string(cls) class String(with_metaclass(StringMeta, object)): pass class IntegerMeta(GenericMeta): def accept(cls, visitor): return visitor.visit_integer(cls) class Integer(with_metaclass(IntegerMeta, object)): pass class FloatMeta(GenericMeta): def accept(cls, visitor): return visitor.visit_float(cls) class Float(with_metaclass(FloatMeta, object)): pass class TypingMeta(GenericMeta): __final__ = False def __cls_init__(cls, *args): raise NotImplementedError(type(cls)) def __cls_repr__(cls): raise NotImplementedError(type(cls)) def __getitem__(cls, parameters): if cls.__final__: raise TypeError('Cannot substitute parameters in {!r}'.format(cls)) type_ = cls.__class__(cls.__name__, cls.__bases__, dict(cls.__dict__)) type_.__cls_init__(parameters) type_.__final__ = True return type_ def __repr__(self): if self.__final__: return self.__cls_repr__() else: return super(TypingMeta, self).__repr__() class OptionalMeta(TypingMeta): def __cls_init__(cls, type_): cls.__type__ = type_ def __cls_repr__(self): return '{}[{!r}]'.format(self.__name__, self.__type__) def accept(cls, visitor): return visitor.visit_optional(cls) class Optional(with_metaclass(OptionalMeta, object)): pass class SequenceMeta(TypingMeta): def __cls_init__(cls, item_type): cls.__item_type__ = item_type def __cls_repr__(self): return '{}[{!r}]'.format(self.__name__, self.__item_type__) def accept(cls, visitor): return visitor.visit_sequence(cls) class Sequence(with_metaclass(SequenceMeta, object)): pass class MappingMeta(TypingMeta): def __cls_init__(cls, params): cls.__key_type__, cls.__value_type__ = params def __cls_repr__(self): return '{}[{!r}, {!r}]'.format(self.__name__, self.__key_type__, self.__value_type__) def accept(cls, visitor): return visitor.visit_mapping(cls) class Mapping(with_metaclass(MappingMeta, object)): pass class RecordMeta(TypingMeta): def __cls_init__(cls, field_types): cls.__field_types__ = OrderedDict(field_types) def __cls_repr__(self): return '{}[{!r}]'.format(self.__name__, dict(self.__field_types__)) def accept(cls, visitor): return visitor.visit_record(cls) class Record(with_metaclass(RecordMeta, object)): pass class CallableMeta(TypingMeta): def __cls_init__(cls, arg_types): cls.__arg_types__ = arg_types def __cls_repr__(self): return '{}[{}]'.format(self.__name__, ', '.join(map(repr, self.__arg_types__))) def accept(cls, visitor): return visitor.visit_callable(cls) class Callable(with_metaclass(CallableMeta, object)): pass class TypeRefMeta(TypingMeta): def __cls_init__(cls, name): cls.__type_name__ = name def __cls_repr__(self): return '{}[{!r}]'.format(self.__name__, self.__type_name__) def accept(cls, visitor): return visitor.visit_typeref(cls) class TypeRef(with_metaclass(TypeRefMeta, object)): pass class AbstractTypeVisitor(with_metaclass(ABCMeta, object)): def visit(self, obj): return obj.accept(self) @abstractmethod def visit_any(self, obj): pass @abstractmethod def visit_boolean(self, obj): pass @abstractmethod def visit_string(self, obj): pass @abstractmethod def visit_integer(self, obj): pass @abstractmethod def visit_float(self, obj): pass @abstractmethod def visit_typeref(self, obj): pass @abstractmethod def visit_optional(self, obj): pass @abstractmethod def visit_sequence(self, obj): pass @abstractmethod def visit_mapping(self, obj): pass @abstractmethod def visit_record(self, obj): pass @abstractmethod def visit_callable(self, obj): pass class TypeVisitor(AbstractTypeVisitor): def visit_any(self, obj): pass def visit_boolean(self, obj): pass def visit_string(self, obj): pass def visit_integer(self, obj): pass def visit_float(self, obj): pass def visit_typeref(self, obj): pass def visit_optional(self, obj): self.visit(obj.__type__) def visit_sequence(self, obj): self.visit(obj.__item_type__) def visit_mapping(self, obj): self.visit(obj.__key_type__) self.visit(obj.__value_type__) def visit_record(self, obj): for value_type in obj.__field_types__.values(): self.visit(value_type) def visit_callable(self, obj): for arg_type in obj.__arg_types__: self.visit(arg_type)
20.705674
79
0.653194
675
5,839
5.142222
0.128889
0.053011
0.053875
0.065687
0.47191
0.351772
0.18669
0.17603
0.048401
0.038317
0
0
0.246275
5,839
281
80
20.779359
0.788684
0
0
0.471264
0
0
0.015414
0
0
0
0
0
0
1
0.310345
false
0.16092
0.017241
0.12069
0.62069
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
4
f530538e3383fecefabfbfc99cba284ed0051169
231
py
Python
vidgear_noperm/gears/asyncio/__init__.py
egeakman/vidgearnoperm
3483b1fd813a93494dcec4f2919a23371e47277f
[ "Apache-2.0" ]
4
2021-07-14T00:55:18.000Z
2022-01-30T10:26:56.000Z
vidgear_noperm/gears/asyncio/__init__.py
Antalya-ISAS/vidgear_noperm
3483b1fd813a93494dcec4f2919a23371e47277f
[ "Apache-2.0" ]
null
null
null
vidgear_noperm/gears/asyncio/__init__.py
Antalya-ISAS/vidgear_noperm
3483b1fd813a93494dcec4f2919a23371e47277f
[ "Apache-2.0" ]
1
2021-07-19T20:33:45.000Z
2021-07-19T20:33:45.000Z
from .webgear import WebGear from .webgear_rtc import WebGear_RTC from .netgear_async import NetGear_Async __all__ = ["WebGear", "NetGear_Async", "WebGear_RTC"] __author__ = "Ege Akman (@egeakman) <egeakmanegeakman@hotmail.com>"
28.875
67
0.787879
29
231
5.793103
0.482759
0.178571
0
0
0
0
0
0
0
0
0
0
0.108225
231
7
68
33
0.815534
0
0
0
0
0
0.359307
0.12987
0
0
0
0
0
1
0
false
0
0.6
0
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4