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
b04126aec382056b8ff923a8a5c7063f9303c757
164
py
Python
status/statusapp/views/__init__.py
dcalderon/TorStatus
4b57f21e51a10e6a8b376b4eadf8004252f7843c
[ "BSD-3-Clause" ]
1
2019-03-24T03:07:42.000Z
2019-03-24T03:07:42.000Z
status/statusapp/views/__init__.py
alienth/torstatus
af49f3a1f0e885dcb6b5b6be1d9aa686ad0760d3
[ "BSD-3-Clause" ]
null
null
null
status/statusapp/views/__init__.py
alienth/torstatus
af49f3a1f0e885dcb6b5b6be1d9aa686ad0760d3
[ "BSD-3-Clause" ]
null
null
null
""" Views for statusapp. Views are divided into views that dynamically draw graphs, views that create .csv files, and views that render a webpage to response. """
23.428571
68
0.762195
25
164
5
0.76
0.216
0
0
0
0
0
0
0
0
0
0
0.170732
164
6
69
27.333333
0.919118
0.945122
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
c6c201996fe0de454691888026445b141ed721d8
186
py
Python
src/ykfan_utils/__init__.py
fanyongkang87/ykfan_utils
de4d27218ddeaaa2dcf5b2434bdc8fb2646ba431
[ "MIT" ]
1
2019-06-06T10:17:05.000Z
2019-06-06T10:17:05.000Z
src/ykfan_utils/__init__.py
fanyongkang87/ykfan_utils
de4d27218ddeaaa2dcf5b2434bdc8fb2646ba431
[ "MIT" ]
null
null
null
src/ykfan_utils/__init__.py
fanyongkang87/ykfan_utils
de4d27218ddeaaa2dcf5b2434bdc8fb2646ba431
[ "MIT" ]
null
null
null
from .directory.dir_utils import clear_dir from .time.time_utils import time_compute, time_avg_compute __all__ = ['clear_dir', 'time_compute', 'time_avg_compute'] name = 'ykfan_utils'
26.571429
59
0.795699
28
186
4.75
0.428571
0.165414
0.225564
0.270677
0.37594
0
0
0
0
0
0
0
0.102151
186
6
60
31
0.796407
0
0
0
0
0
0.258065
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
c6c8b79325699b36c8a0e5fc5fc8dee4fc78b34c
27
py
Python
Todoism/todoism/apis/v1/errors.py
authetic-x/Flask_Practice
90ca69467cd6de8eb41669d2a87ab072fc11e1c8
[ "MIT" ]
1
2020-07-29T16:46:32.000Z
2020-07-29T16:46:32.000Z
Todoism/todoism/apis/v1/errors.py
authetic-x/Flask_Practice
90ca69467cd6de8eb41669d2a87ab072fc11e1c8
[ "MIT" ]
null
null
null
Todoism/todoism/apis/v1/errors.py
authetic-x/Flask_Practice
90ca69467cd6de8eb41669d2a87ab072fc11e1c8
[ "MIT" ]
null
null
null
def api_abort(a): pass
9
17
0.62963
5
27
3.2
1
0
0
0
0
0
0
0
0
0
0
0
0.259259
27
3
18
9
0.8
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
5
05e5809710b789246d54ac703e2dd3a5a0886ac0
103
py
Python
autoanysrc/sphinxcontrib/analyzers/__init__.py
justagist/sphinx-contrib
6ee6c6832036798ba5929521df3602e3acd230f9
[ "BSD-2-Clause" ]
18
2017-03-02T20:12:11.000Z
2022-03-11T02:38:38.000Z
autoanysrc/sphinxcontrib/analyzers/__init__.py
justagist/sphinx-contrib
6ee6c6832036798ba5929521df3602e3acd230f9
[ "BSD-2-Clause" ]
7
2019-02-26T04:11:49.000Z
2019-09-16T05:43:17.000Z
autoanysrc/sphinxcontrib/analyzers/__init__.py
justagist/sphinx-contrib
6ee6c6832036798ba5929521df3602e3acd230f9
[ "BSD-2-Clause" ]
19
2017-08-18T04:11:25.000Z
2022-03-11T02:38:43.000Z
from .base import BaseAnalyzer, BaseCommentAnalyzer # noqa from .javascript import JSAnalyzer # noqa
34.333333
59
0.805825
11
103
7.545455
0.727273
0
0
0
0
0
0
0
0
0
0
0
0.145631
103
2
60
51.5
0.943182
0.087379
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
05ea8658570cda9f05fff4964a977cb41bdf7fbc
140
py
Python
pyleus/compat.py
earthmine/pyleus
4d9c14c9df470be6ff544f2ad82985f37e582d80
[ "Apache-2.0" ]
166
2015-01-14T16:06:37.000Z
2021-11-15T12:17:11.000Z
pyleus/compat.py
WenbinTan/pyleus
8ab87e2d18b8b6a7e0471ceefdbb3ff23a576cce
[ "Apache-2.0" ]
105
2015-01-16T19:59:06.000Z
2016-05-13T19:40:45.000Z
pyleus/compat.py
WenbinTan/pyleus
8ab87e2d18b8b6a7e0471ceefdbb3ff23a576cce
[ "Apache-2.0" ]
62
2015-01-19T07:42:24.000Z
2021-06-05T21:02:09.000Z
from six.moves import configparser, cStringIO as StringIO from six import BytesIO assert configparser and StringIO and BytesIO # pyflakes
28
57
0.828571
19
140
6.105263
0.631579
0.12069
0
0
0
0
0
0
0
0
0
0
0.15
140
4
58
35
0.97479
0.057143
0
0
0
0
0
0
0
0
0
0
0.333333
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
af6aa1df80b339741689942f942062f889d05ae8
8,733
py
Python
Liquid-optimizer/rf.py
PasaLab/YAO
2e70203197cd79f9522d65731ee5dc0eb236b005
[ "Apache-2.0" ]
2
2021-08-30T14:12:09.000Z
2022-01-20T02:14:22.000Z
Liquid-optimizer/rf.py
PasaLab/YAO
2e70203197cd79f9522d65731ee5dc0eb236b005
[ "Apache-2.0" ]
null
null
null
Liquid-optimizer/rf.py
PasaLab/YAO
2e70203197cd79f9522d65731ee5dc0eb236b005
[ "Apache-2.0" ]
null
null
null
# _*_coding:utf-8_*_ import numpy as np import pandas as pd import os def load_data(trainfile, testfile): traindata = pd.read_csv(trainfile) testdata = pd.read_csv(testfile) feature_data = traindata.iloc[:, 1:-1] label_data = traindata.iloc[:, -1] test_feature = testdata.iloc[:, 1:-1] test_label = testdata.iloc[:, -1] return feature_data, label_data, test_feature, test_label def random_forest_train(feature_data, label_data, test_feature): from sklearn.ensemble import RandomForestRegressor from sklearn.model_selection import train_test_split from sklearn.metrics import mean_squared_error X_train, X_test, y_train, y_test = train_test_split(feature_data, label_data, test_size=0.01) params = { 'n_estimators': 70, 'max_depth': 13, 'min_samples_split': 10, 'min_samples_leaf': 5, # 10 'max_features': len(X_train.columns) } # print(X_test) model = RandomForestRegressor(**params) model.fit(X_train, y_train) # 对测试集进行预测 y_pred = model.predict(X_test) # 计算准确率 MSE = mean_squared_error(y_test, y_pred) RMSE = np.sqrt(MSE) # print(abs(y_test - y_pred) / y_test) # print(RMSE) ''' submit = pd.read_csv(submitfile) print(submit) submit['CPU'] = model.predict(test_feature) submit.to_csv('my_random_forest_prediction1.csv', index=False) print(submit) print(model.predict(test_feature)) ''' return model.predict(test_feature) def linear_regression_train(feature_data, label_data, test_feature): from sklearn.linear_model import LinearRegression from sklearn.model_selection import train_test_split from sklearn.metrics import mean_squared_error X_train, X_test, y_train, y_test = train_test_split(feature_data, label_data, test_size=0.01) params = {} # print(X_test) model = LinearRegression(**params) model.fit(X_train, y_train) # 对测试集进行预测 y_pred = model.predict(X_test) # 计算准确率 MSE = mean_squared_error(y_test, y_pred) RMSE = np.sqrt(MSE) # print(abs(y_test - y_pred) / y_test) # print(RMSE) return model.predict(test_feature) def adaboost_train(feature_data, label_data, test_feature): from sklearn.ensemble import AdaBoostRegressor from sklearn.model_selection import train_test_split from sklearn.metrics import mean_squared_error X_train, X_test, y_train, y_test = train_test_split(feature_data, label_data, test_size=0.01) params = {} # print(X_test) model = AdaBoostRegressor(**params) model.fit(X_train, y_train) # 对测试集进行预测 y_pred = model.predict(X_test) # 计算准确率 MSE = mean_squared_error(y_test, y_pred) RMSE = np.sqrt(MSE) # print(abs(y_test - y_pred) / y_test) # print(RMSE) return model.predict(test_feature) def gbdt_train(feature_data, label_data, test_feature): from sklearn.ensemble import GradientBoostingRegressor from sklearn.model_selection import train_test_split from sklearn.metrics import mean_squared_error X_train, X_test, y_train, y_test = train_test_split(feature_data, label_data, test_size=0.01) params = { 'loss': 'ls', 'n_estimators': 70, 'max_depth': 13, 'min_samples_split': 10, 'min_samples_leaf': 5, # 10 'max_features': len(X_train.columns) } # print(X_test) model = GradientBoostingRegressor(**params) model.fit(X_train, y_train) # 对测试集进行预测 y_pred = model.predict(X_test) # 计算准确率 MSE = mean_squared_error(y_test, y_pred) RMSE = np.sqrt(MSE) # print(abs(y_test - y_pred) / y_test) # print(RMSE) return model.predict(test_feature) def decision_tree_train(feature_data, label_data, test_feature): from sklearn.tree import DecisionTreeRegressor from sklearn.model_selection import train_test_split from sklearn.metrics import mean_squared_error X_train, X_test, y_train, y_test = train_test_split(feature_data, label_data, test_size=0.01) params = { 'max_depth': 13, } # print(X_test) model = DecisionTreeRegressor(**params) model.fit(X_train, y_train) # 对测试集进行预测 y_pred = model.predict(X_test) # 计算准确率 MSE = mean_squared_error(y_test, y_pred) RMSE = np.sqrt(MSE) # print(abs(y_test - y_pred) / y_test) # print(RMSE) return model.predict(test_feature) def random_forest_parameter_tuning1(feature_data, label_data): from sklearn.ensemble import RandomForestRegressor from sklearn.model_selection import train_test_split from sklearn.metrics import mean_squared_error from sklearn.model_selection import GridSearchCV X_train, X_test, y_train, y_test = train_test_split(feature_data, label_data, test_size=0.01) param_test1 = { 'n_estimators': range(10, 71, 10) } model = GridSearchCV(estimator=RandomForestRegressor( min_samples_split=100, min_samples_leaf=20, max_depth=8, max_features='sqrt', random_state=10), param_grid=param_test1, cv=5 ) model.fit(X_train, y_train) # 对测试集进行预测 y_pred = model.predict(X_test) # 计算准确率 MSE = mean_squared_error(y_test, y_pred) RMSE = np.sqrt(MSE) print(RMSE) return model.best_score_, model.best_params_ def random_forest_parameter_tuning2(feature_data, label_data): from sklearn.ensemble import RandomForestRegressor from sklearn.model_selection import train_test_split from sklearn.metrics import mean_squared_error from sklearn.model_selection import GridSearchCV X_train, X_test, y_train, y_test = train_test_split(feature_data, label_data, test_size=0.01) param_test2 = { 'max_depth': range(3, 14, 2), 'min_samples_split': range(50, 201, 20) } model = GridSearchCV(estimator=RandomForestRegressor( n_estimators=70, min_samples_leaf=20, max_features='sqrt', oob_score=True, random_state=10), param_grid=param_test2, cv=5 ) model.fit(X_train, y_train) # 对测试集进行预测 y_pred = model.predict(X_test) # 计算准确率 MSE = mean_squared_error(y_test, y_pred) RMSE = np.sqrt(MSE) print(RMSE) return model.best_score_, model.best_params_ def random_forest_parameter_tuning3(feature_data, label_data, test_feature): from sklearn.ensemble import RandomForestRegressor from sklearn.model_selection import train_test_split from sklearn.metrics import mean_squared_error from sklearn.model_selection import GridSearchCV X_train, X_test, y_train, y_test = train_test_split(feature_data, label_data, test_size=0.01) param_test3 = { 'min_samples_split': range(10, 90, 20), 'min_samples_leaf': range(10, 60, 10), } model = GridSearchCV(estimator=RandomForestRegressor( n_estimators=70, max_depth=13, max_features='sqrt', oob_score=True, random_state=10), param_grid=param_test3, cv=5 ) model.fit(X_train, y_train) # 对测试集进行预测 y_pred = model.predict(X_test) # 计算准确率 MSE = mean_squared_error(y_test, y_pred) RMSE = np.sqrt(MSE) print(RMSE) return model.best_score_, model.best_params_ def random_forest_parameter_tuning4(feature_data, label_data, test_feature): from sklearn.ensemble import RandomForestRegressor from sklearn.model_selection import train_test_split from sklearn.metrics import mean_squared_error from sklearn.model_selection import GridSearchCV X_train, X_test, y_train, y_test = train_test_split(feature_data, label_data, test_size=0.01) param_test4 = { 'max_features': range(3, 9, 2) } model = GridSearchCV(estimator=RandomForestRegressor( n_estimators=70, max_depth=13, min_samples_split=10, min_samples_leaf=10, oob_score=True, random_state=10), param_grid=param_test4, cv=5 ) model.fit(X_train, y_train) # 对测试集进行预测 y_pred = model.predict(X_test) # 计算准确率 MSE = mean_squared_error(y_test, y_pred) RMSE = np.sqrt(MSE) print(RMSE) return model.best_score_, model.best_params_ if __name__ == '__main__': algorithm = os.getenv('algorithm', 'rf') trainfile = 'data/train.csv' testfile = 'data/test.csv' feature_data, label_data, test_feature, test_label = load_data(trainfile, testfile) if algorithm == 'lr': y_pred = linear_regression_train(feature_data, label_data, test_feature) elif algorithm == 'ada': y_pred = adaboost_train(feature_data, label_data, test_feature) elif algorithm == 'gbdt': y_pred = gbdt_train(feature_data, label_data, test_feature) elif algorithm == 'dt': y_pred = decision_tree_train(feature_data, label_data, test_feature) else: y_pred = random_forest_train(feature_data, label_data, test_feature) from sklearn.metrics import mean_squared_error MSE = mean_squared_error(test_label, y_pred) RMSE = np.sqrt(MSE) var = np.var(test_label) r2 = 1 - MSE / var # print(abs(test_label - y_pred) / test_label) print(RMSE, r2) display_diff = os.getenv('display_diff', '0') if display_diff == '1': for i in range(20): print("{},{},{}".format(test_label[i], y_pred[i], (y_pred[i] - test_label[i]) / test_label[i]))
32.830827
99
0.746708
1,301
8,733
4.678709
0.106841
0.057828
0.065714
0.082142
0.794644
0.780516
0.767866
0.753245
0.736159
0.675045
0
0.018868
0.150349
8,733
265
100
32.954717
0.801482
0.05943
0
0.566138
0
0
0.041721
0
0
0
0
0
0
1
0.05291
false
0
0.185185
0
0.291005
0.031746
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
afbcbef3e30219f7160ba3f0e13c244b0b80a69e
179
py
Python
exceptions.py
diveshkapoor/access_control
0b7a18fc419f564aa240bb2e1773be3c7617bc22
[ "Apache-2.0" ]
2
2019-07-02T14:30:04.000Z
2020-03-07T12:10:35.000Z
exceptions.py
luckykadam/rbac
41f89a4c99389ab158943d4c742a479c33d9d1fb
[ "Apache-2.0" ]
null
null
null
exceptions.py
luckykadam/rbac
41f89a4c99389ab158943d4c742a479c33d9d1fb
[ "Apache-2.0" ]
null
null
null
class UnknownUser(Exception): pass class UnknownRole(Exception): pass class UnknownAccessLevel(Exception): pass class UserNotAssignedToRole(Exception): pass
11.933333
39
0.743017
16
179
8.3125
0.4375
0.390977
0.406015
0
0
0
0
0
0
0
0
0
0.189944
179
14
40
12.785714
0.917241
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
afc067b5efb2fcf46984bc533de6ec5949afda18
11,074
py
Python
integration-test/677-waterfall.py
rinnyB/vector-datasource
024909ed8245a4ad4a25c908413ba3602de6c335
[ "MIT" ]
null
null
null
integration-test/677-waterfall.py
rinnyB/vector-datasource
024909ed8245a4ad4a25c908413ba3602de6c335
[ "MIT" ]
2
2021-03-31T20:22:37.000Z
2021-12-13T20:50:11.000Z
integration-test/677-waterfall.py
rinnyB/vector-datasource
024909ed8245a4ad4a25c908413ba3602de6c335
[ "MIT" ]
null
null
null
# -*- encoding: utf-8 -*- from shapely.wkt import loads as wkt_loads import dsl from . import FixtureTest class Waterfall(FixtureTest): def test_more_than_300m(self): # Upper Yosemite Falls, because it's so tall at 550 meters, more than # 300 meters self.generate_fixtures(dsl.way(2389658224, wkt_loads('POINT (-119.596768770024 37.7569711773355)'), {u'FIPS_C': u'06043', u'wikipedia:en': u'Yosemite_Falls', u'height': u'550', u'FIPSCO': u'043', u'wikidata': u'Q491677', u'waterway': u'waterfall', u'TOPOMAP': u'Yosemite Falls', u'wikipedia': u'en:Yosemite Falls', u'ele': u'1599', u'source': u'openstreetmap.org', u'name:zh': u'\u4e0a\u4f18\u80dc\u7f8e\u5730\u5927\u7011\u5e03', u'CLASS': u'Falls', u'DATE_CREAT': u'01/19/1981', u'ELEV_FEET': u'5246', u'GNISID': u'236934', u'LONGITUDE': u'-119.59683', u'STATE': u'CA', u'tourism': u'attraction', u'LAYER': u'Unknown Point Feature', u'name': u'Upper Yosemite Fall', u'COUNTYNAME': u'Mariposa', u'LATITUDE': u'37.75631', u'FIPSST': u'06'})) # noqa self.assert_has_feature( 12, 687, 1583, 'pois', {'kind': 'waterfall', 'min_zoom': 12, 'height': 550}) def test_more_than_50m(self): # Middle Yosemite Falls, 206 meters, more than 50 meters self.generate_fixtures(dsl.way(2384221575, wkt_loads('POINT (-119.597269131638 37.7542908234491)'), {u'gnis:state_id': u'06', u'name': u'Middle Cascades', u'wikipedia:en': u'Yosemite_Falls', u'wikipedia': u'en:Yosemite Falls', u'gnis:county_id': u'043', u'height': u'206', u'source': u'openstreetmap.org', u'wikidata': u'Q491677', u'alt_name': u'Yosemite Falls', u'waterway': u'waterfall', u'name:zh': u'\u4e2d\u4f18\u80dc\u7f8e\u5730\u5927\u7011\u5e03', u'gnis:feature_id': u'252230'})) # noqa self.assert_has_feature( 13, 1374, 3166, 'pois', {'kind': 'waterfall', 'min_zoom': 13}) def test_98m_fall(self): # Lower Yosemite Falls, only 98 meters self.generate_fixtures(dsl.way(2389657981, wkt_loads('POINT (-119.597140672552 37.7514441683717)'), {u'FIPS_C': u'06043', u'wikipedia:en': u'Yosemite_Falls', u'height': u'98', u'FIPSCO': u'043', u'wikidata': u'Q491677', u'waterway': u'waterfall', u'TOPOMAP': u'Yosemite Falls', u'ELEVATION': u'1368', u'wikipedia': u'en:Yosemite Falls', u'ele': u'1368', u'source': u'openstreetmap.org', u'name:zh': u'\u4e0b\u4f18\u80dc\u7f8e\u5730\u5927\u7011\u5e03', u'CLASS': u'Falls', u'DATE_CREAT': u'01/19/1981', u'ELEV_FEET': u'4488', u'GNISID': u'227800', u'LONGITUDE': u'-119.59655', u'STATE': u'CA', u'tourism': u'attraction', u'LAYER': u'Unknown Point Feature', u'name': u'Lower Yosemite Fall', u'COUNTYNAME': u'Mariposa', u'LATITUDE': u'37.75131', u'FIPSST': u'06'})) # noqa self.assert_has_feature( 13, 1374, 3167, 'pois', {'kind': 'waterfall', 'min_zoom': 13}) def test_niagara_horseshoe_falls(self): # Niagara Falls (Horseshoe Falls) self.generate_fixtures(dsl.way(708267915, wkt_loads('POINT (-79.0749682492429 43.07726879171867)'), {u'source': u'openstreetmap.org', u'waterway': u'waterfall', u'name': u'Horseshoe Falls'}),dsl.way(56539663, wkt_loads('POLYGON ((-79.07843574623961 43.07866567353248, -79.07828932084828 43.0787116036259, -79.0780856727734 43.07887609869209, -79.0779867682606 43.0789579195677, -79.0780519859503 43.0788946675131, -79.07810327975299 43.07884211051748, -79.0781084899816 43.0788032012521, -79.07806537084799 43.07872459527459, -79.07802189238831 43.0786557657507, -79.0779498475025 43.07858418033929, -79.07738624449318 43.07786031655819, -79.07667280249461 43.07745881518491, -79.07650454804178 43.07748571763081, -79.07638677890809 43.07738729399088, -79.0760357172951 43.07727607508761, -79.07587878161489 43.0771374940831, -79.0757711634439 43.07712640496459, -79.07542522222801 43.07715940984989, -79.07533709749859 43.07719175855728, -79.0749682492429 43.07726879171867, -79.07464620321359 43.07737915762959, -79.0746119774012 43.07760376017429, -79.07456068359851 43.0777241646468, -79.0744870217452 43.07779739144738, -79.07440240044551 43.07793656149649, -79.07445207728068 43.0779794738382, -79.07440033432029 43.07829048899488, -79.0744692351026 43.0783231651793, -79.07450139478979 43.0783898954052, -79.07450399990411 43.07843687554028, -79.07456571416408 43.078521059128, -79.0746167384723 43.07862099008008, -79.07465958811129 43.07864060880989, -79.0746515931053 43.0786759093849, -79.07468375279248 43.07871120993948, -79.0746945325759 43.07875615578359, -79.0747427721066 43.0787933591069, -79.07477232667949 43.07882478835189, -79.07475076711269 43.0788639600605, -79.07476963173359 43.07890510016968, -79.07479640152908 43.07895017709977, -79.07477762673962 43.078979572227, -79.0748393409997 43.07902458348829, -79.07489027547629 43.07905988384198, -79.07489827048229 43.07910686346348, -79.0748955755365 43.0791480034096, -79.0748500309515 43.07918527210889, -79.0748124813727 43.07921269870759, -79.07481787126439 43.07924399650988, -79.0748447308914 43.0793048204949, -79.07485542084329 43.07937916083899, -79.07485542084329 43.0794536979337, -79.07484203594549 43.0794810587987, -79.07479640152908 43.07951439048349, -79.07471061241948 43.07953197490829, -79.07471860742548 43.07956340377441, -79.0747642418419 43.07957901978118, -79.07475076711269 43.07962606461799, -79.0747562468359 43.0796691726166, -79.07472130237132 43.07968865978408, -79.074726692263 43.07971812017037, -79.07477232667949 43.079743578132, -79.07478840652308 43.07976516490038, -79.07474537722101 43.07978471765058, -79.07472399731718 43.07981798355699, -79.0747427721066 43.07984547548568, -79.07477232667949 43.0798572202438, -79.07474537722101 43.07988070975338, -79.0747615468961 43.0799139756076, -79.07467566795491 43.079935562316, -79.07465958811129 43.07996685974889, -79.0745640971966 43.07994140188008, -79.07449807102319 43.07992841048939, -79.07449357944679 43.07975945654601, -79.07449896933851 43.07966549826789, -79.074552598761 43.07952436373999, -79.07450974912189 43.07935599920568, -79.07445611969939 43.0792579722528, -79.0743649406981 43.07910515750021, -79.07431122144412 43.07874861013318, -79.07412877360989 43.0783685706113, -79.07381768702699 43.07794929084869, -79.07341542144279 43.07787088062158, -79.07313110465539 43.0778042810612, -79.0732919929228 43.0776161615179, -79.07367287860319 43.07759660807559, -79.07396249545079 43.0775926711402, -79.07416785032478 43.0772596054865, -79.0742736718653 43.077083295177, -79.07465994743738 43.07690311299668, -79.07500319370749 43.07682470143089, -79.0755021180163 43.07684432073589, -79.0760546717476 43.07711859664909, -79.07673586422749 43.0773340795438, -79.07732066747748 43.07758879982008, -79.07766400357899 43.07787488315448, -79.0779053808959 43.0783097797565, -79.078152237936 43.0785841147248, -79.07843574623961 43.07866567353248))'), {u'name:sl': u'Niagarski slapov', u'name:sk': u'Niagarsk\xe9 vodop\xe1dy', u'name': u'Horseshoe Falls', u'wikipedia': u'en:Horseshoe Falls', u'way_area': u'40670.9', u'name:cs': u'Niagarsk\xe9 vodop\xe1dy', u'natural': u'cliff', u'source': u'openstreetmap.org', u'name:fr': u'Chutes du Niagara', u'wikidata': u'Q1373778', u'alt_name': u'Niagara Falls', u'name:ru': u'\u0412\u043e\u0434\u043e\u043f\u0430\u0434 "\u041f\u043e\u0434\u043a\u043e\u0432\u0430"', u'waterway': u'waterfall', u'tourism': u'attraction'})) # noqa self.assert_has_feature( 12, 1148, 1503, 'pois', {'kind': 'waterfall', 'min_zoom': 12}) # We had considered this for label_placement:yes, # but there are only 19 in all of North America self.assert_no_matching_feature( 12, 1148, 1503, 'water', {'kind': 'waterfall'}) def test_height_missing(self): # Alamere Falls (no height) # Assume falls are important, show at zoom 14 default self.generate_fixtures(dsl.way(2375445789, wkt_loads('POINT (-122.783122278043 37.95391767741348)'), {u'wikipedia': u'en:Alamere Falls', u'waterway': u'waterfall', u'wikidata': u'Q37957', u'name': u'Alamere Falls', u'source': u'openstreetmap.org'})) # noqa self.assert_has_feature( 14, 2604, 6322, 'pois', {'kind': 'waterfall', 'min_zoom': 14}) # Lower Chilnualna Fall, no height self.generate_fixtures(dsl.way(1247873121, wkt_loads('POINT (-119.631362801784 37.55080207032658)'), {u'source': u'openstreetmap.org', u'natural': u'waterfall', u'name': u'Lower Chilnualna Fall'})) # noqa self.assert_has_feature( 14, 2747, 6345, 'pois', {'kind': 'waterfall', 'min_zoom': 14}) # https://www.openstreetmap.org/node/1247872815 # Chilnualna Creek Cascades, no height self.generate_fixtures(dsl.way(1247872815, wkt_loads('POINT (-119.612561242551 37.56504890695991)'), {u'note': u'Series of cascades on Chilnualna Creek. Not technically part of Chilnualna Falls, but part of the same system', u'source': u'openstreetmap.org', u'natural': u'waterfall', u'name': u'Chilnualna Creek Cascades'})) # noqa self.assert_has_feature( 14, 2748, 6344, 'pois', {'kind': 'waterfall', 'min_zoom': 14}) def test_less_than_8m(self): # Abrigo Falls, 4.5 meters (less than 8 meters) # Allow short waterfalls to be suppressed a zoom self.generate_fixtures(dsl.way(3257658773, wkt_loads('POINT (-122.153388082347 37.94552742279537)'), {u'source': u'openstreetmap.org', u'waterway': u'waterfall', u'name': u'Abrigo Falls', u'height': u'4.5'})) # noqa self.assert_has_feature( 15, 5265, 12645, 'pois', {'kind': 'waterfall', 'min_zoom': 15}) def test_unit_conversion_height(self): # Rainbow Falls - height 150ft = 45m self.generate_fixtures(dsl.way(877270365, wkt_loads('POINT (-82.96562582334471 35.09064146759331)'), {u'source': u'openstreetmap.org', u'waterway': u'waterfall', u'name': u'Rainbow Falls', u'height': u'150 ft'})) # noqa self.assert_has_feature( 14, 4416, 6484, 'pois', {'kind': 'waterfall', 'min_zoom': 14, 'height': 45.72}) # Toccoa Falls - height 186' = 56.6929m self.generate_fixtures(dsl.way(404574988, wkt_loads('POINT (-83.3606066994399 34.59619179112848)'), {u'source': u'openstreetmap.org', u'waterway': u'waterfall', u'natural': u'cliff', u'name': u'Toccoa Falls', u'height': u"186'"})) # noqa self.assert_has_feature( 13, 2199, 3256, 'pois', {'kind': 'waterfall', 'min_zoom': 13, 'height': 56.6928}) # Eternal Flame Falls - height 9m (with unit) self.generate_fixtures(dsl.way(3647404249, wkt_loads('POINT (-78.7516626920262 42.70175278571357)'), {u'natural': u'cliff', u'name': u'Eternal Flame Falls', u'height': u'9 m', u'source': u'openstreetmap.org', u'waterway': u'waterfall', u'tourism': u'attraction'})) # noqa self.assert_has_feature( 15, 9215, 12077, 'pois', {'kind': 'waterfall', 'min_zoom': 15, 'height': 9})
109.643564
4,448
0.713563
1,471
11,074
5.307274
0.32291
0.015371
0.016908
0.032279
0.309978
0.277187
0.198156
0.174587
0.161522
0.140131
0
0.421513
0.133646
11,074
100
4,449
110.74
0.392224
0.070345
0
0.275862
0
0.034483
0.648807
0.022406
0
0
0
0
0.206897
1
0.12069
false
0
0.051724
0
0.189655
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
1
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
bb71ba461ca00c3c20bd9e3b830d54c95cfd10cd
153
py
Python
ddb/service/__init__.py
gfi-centre-ouest/docker-devbox-ddb
1597d85ef6e9e8322cce195a454de54186ce9ec7
[ "MIT" ]
4
2020-06-11T20:54:47.000Z
2020-09-22T13:07:17.000Z
ddb/service/__init__.py
gfi-centre-ouest/docker-devbox-ddb
1597d85ef6e9e8322cce195a454de54186ce9ec7
[ "MIT" ]
113
2019-11-07T00:40:36.000Z
2021-01-18T12:50:16.000Z
ddb/service/__init__.py
inetum-orleans/docker-devbox-ddb
20c713cf7bfcaf289226a17a9648c17d16003b4d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from .service import Service from ..registry import Registry services = Registry(Service, "Service") # type: Registry[Service]
25.5
66
0.712418
18
153
6.055556
0.5
0.275229
0
0
0
0
0
0
0
0
0
0.007634
0.143791
153
5
67
30.6
0.824427
0.294118
0
0
0
0
0.066667
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
bb7fb8307cfda86b0e5b7566ac42507beac2c772
248
py
Python
tweetcollector/credentials.py
jaybfn/Twitter_Sentiment_Analysis
b2d94f244d73a2f67414ca9e74bb6222ec750be0
[ "MIT" ]
null
null
null
tweetcollector/credentials.py
jaybfn/Twitter_Sentiment_Analysis
b2d94f244d73a2f67414ca9e74bb6222ec750be0
[ "MIT" ]
1
2022-01-26T22:14:15.000Z
2022-01-26T22:14:15.000Z
tweetcollector/credentials.py
jaybfn/Twitter_Sentiment_Analysis
b2d94f244d73a2f67414ca9e74bb6222ec750be0
[ "MIT" ]
null
null
null
#Twitter credentials # API_KEY = "**************" # API_KEY_SECRET = "***************************" # ACCESS_TOKEN = "*************************" # ACCESS_TOKEN_SECRET = "**************************" # BEARER_TOKEN = "******************************"
31
52
0.330645
14
248
5.357143
0.571429
0.16
0
0
0
0
0
0
0
0
0
0
0.092742
248
7
53
35.428571
0.333333
0.947581
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
1
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
bb8e5267211a2e8e7a310e4bd222289b54386daf
88
py
Python
test/__init__.py
youkim005/protogen
0cdeff9e244560188e127438d7b9b090858906d7
[ "Unlicense" ]
2
2022-01-05T12:15:41.000Z
2022-03-25T12:29:39.000Z
test/__init__.py
youkim005/protogen
0cdeff9e244560188e127438d7b9b090858906d7
[ "Unlicense" ]
1
2021-12-12T09:17:59.000Z
2021-12-12T09:17:59.000Z
test/__init__.py
youkim005/protogen
0cdeff9e244560188e127438d7b9b090858906d7
[ "Unlicense" ]
null
null
null
from pathlib import Path from sys import path path.append(str(Path("src").absolute()))
17.6
40
0.75
14
88
4.714286
0.642857
0.30303
0
0
0
0
0
0
0
0
0
0
0.113636
88
4
41
22
0.846154
0
0
0
0
0
0.034091
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
bba40ad8d11912b34ea4039c09a0e834d5d62f73
153
py
Python
providers/gcp/__init__.py
stunn3r/matos
34c03d56c8eb358682edfc991434163cbab102e6
[ "RSA-MD" ]
null
null
null
providers/gcp/__init__.py
stunn3r/matos
34c03d56c8eb358682edfc991434163cbab102e6
[ "RSA-MD" ]
null
null
null
providers/gcp/__init__.py
stunn3r/matos
34c03d56c8eb358682edfc991434163cbab102e6
[ "RSA-MD" ]
null
null
null
# -*- coding: utf-8 -*- from .resources.resource_manager import GCPResourceManager # noqa # from .metrics.gcp_observation import GCPObservation # noqa
38.25
66
0.764706
17
153
6.764706
0.823529
0
0
0
0
0
0
0
0
0
0
0.007519
0.130719
153
3
67
51
0.857143
0.555556
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
bbc0061cf759a1b45915fb33beddf0dcb460d05f
424
py
Python
desicos/cppot/__init__.py
saullocastro/desicos
922db8ac4fb0fb4d09df18ce2a14011f207f6fa8
[ "BSD-3-Clause" ]
1
2020-10-22T22:15:24.000Z
2020-10-22T22:15:24.000Z
desicos/cppot/__init__.py
saullocastro/desicos
922db8ac4fb0fb4d09df18ce2a14011f207f6fa8
[ "BSD-3-Clause" ]
1
2020-10-09T12:42:02.000Z
2020-10-09T12:42:02.000Z
desicos/cppot/__init__.py
saullocastro/desicos
922db8ac4fb0fb4d09df18ce2a14011f207f6fa8
[ "BSD-3-Clause" ]
2
2020-07-14T07:45:31.000Z
2020-12-29T00:22:41.000Z
r""" ======================================================= Cone Ply Piece Optimization Tool (:mod:`desicos.cppot`) ======================================================= .. currentmodule:: desicos.cppot Please, refer to the :ref:`CPPOT tutorial <cppot_tutorial>` for more details about how to use this module. .. automodule:: desicos.cppot.core :members: .. automodule:: desicos.cppot.gui :members: """ pass
22.315789
76
0.521226
41
424
5.365854
0.707317
0.218182
0.2
0
0
0
0
0
0
0
0
0
0.120283
424
18
77
23.555556
0.589812
0.962264
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0
0
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
1
0
0
0
0
0
5
bbecfc02065a524267f8890bcdb6af9877e752f9
55
py
Python
tests/test_maya_com.py
josephkirk/qt_crossApps
1462d145902e6c7d0b06b91a82ff30da6b2635bb
[ "MIT" ]
null
null
null
tests/test_maya_com.py
josephkirk/qt_crossApps
1462d145902e6c7d0b06b91a82ff30da6b2635bb
[ "MIT" ]
1
2018-10-02T12:18:02.000Z
2018-10-02T12:18:02.000Z
tests/test_maya_com.py
josephkirk/qt_crossApps
1462d145902e6c7d0b06b91a82ff30da6b2635bb
[ "MIT" ]
null
null
null
def test_openmaya(): assert False , "maya not open"
27.5
34
0.690909
8
55
4.625
1
0
0
0
0
0
0
0
0
0
0
0
0.2
55
2
34
27.5
0.840909
0
0
0
0
0
0.232143
0
0
0
0
0
0.5
1
0.5
true
0
0
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
1
0
0
0
0
0
0
5
a5452cc041d1c125dc92381bfec388e6c29b6350
206
py
Python
apps/odoo/bin/vba_extract.py
gtfarng/Odoo_migrade
9cc28fae4c379e407645248a29d22139925eafe7
[ "Apache-2.0" ]
1
2019-12-19T01:53:13.000Z
2019-12-19T01:53:13.000Z
python/bin/vba_extract.py
gtfarng/Odoo_migrade
9cc28fae4c379e407645248a29d22139925eafe7
[ "Apache-2.0" ]
null
null
null
python/bin/vba_extract.py
gtfarng/Odoo_migrade
9cc28fae4c379e407645248a29d22139925eafe7
[ "Apache-2.0" ]
null
null
null
#!/opt/bitnami/python/bin/python # EASY-INSTALL-SCRIPT: 'XlsxWriter==0.9.3','vba_extract.py' __requires__ = 'XlsxWriter==0.9.3' __import__('pkg_resources').run_script('XlsxWriter==0.9.3', 'vba_extract.py')
41.2
77
0.737864
32
206
4.375
0.59375
0.235714
0.257143
0.278571
0.442857
0.442857
0.442857
0.442857
0
0
0
0.045685
0.043689
206
4
78
51.5
0.664975
0.432039
0
0
0
0
0.530435
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
a5674eb74be4a34bf8a413725e3cf4b76aa34d92
27
py
Python
src/model/__init__.py
atick-faisal/PyTorch-Starter
031f8e4f2a8b22ba4254ce0730598791d0b1673d
[ "MIT" ]
null
null
null
src/model/__init__.py
atick-faisal/PyTorch-Starter
031f8e4f2a8b22ba4254ce0730598791d0b1673d
[ "MIT" ]
null
null
null
src/model/__init__.py
atick-faisal/PyTorch-Starter
031f8e4f2a8b22ba4254ce0730598791d0b1673d
[ "MIT" ]
null
null
null
from .cnn import SimpleCNN
13.5
26
0.814815
4
27
5.5
1
0
0
0
0
0
0
0
0
0
0
0
0.148148
27
1
27
27
0.956522
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
a57228c3be36e5c00643fc61ff039f14c61904c9
1,976
py
Python
tests/test_ProtocolService/test_ProtocolService_3389.py
danilocgsilva/awsinstances
c0ab6ae42b3bfbe94735f7ba4741b3facec271ce
[ "MIT" ]
null
null
null
tests/test_ProtocolService/test_ProtocolService_3389.py
danilocgsilva/awsinstances
c0ab6ae42b3bfbe94735f7ba4741b3facec271ce
[ "MIT" ]
null
null
null
tests/test_ProtocolService/test_ProtocolService_3389.py
danilocgsilva/awsinstances
c0ab6ae42b3bfbe94735f7ba4741b3facec271ce
[ "MIT" ]
null
null
null
import unittest import sys sys.path.insert(2, "..") from awsec2instances_includes.ProtocolService import ProtocolService class test_ProtocolService_3389(unittest.TestCase): def test_get_one_element(self): protocolService = ProtocolService("with-desktop") self.assertEqual(1, len(protocolService.get_ports())) def test_port_from_desktop(self): protocolService = ProtocolService("with-desktop") self.assertEqual(3389, protocolService.get_ports()[0]) def test_is_have_desktop_true(self): protocolService = ProtocolService("with-http,with-desktop") self.assertTrue(protocolService.is_have_desktop()) def test_is_have_desktop_true_2(self): protocolService = ProtocolService("with-desktop") self.assertTrue(protocolService.is_have_desktop()) def test_ensure_3389_is_not_empty(self): protocolService = ProtocolService(None) protocolService.ensure_port_3389() self.assertTrue(protocolService.is_not_empty()) def test_ensure_3389(self): protocolService = ProtocolService() protocolService.ensure_port_3389() self.assertTrue(3389 in protocolService.get_ports()) def test_ensure_3389_2(self): protocolService = ProtocolService("with-desktop") protocolService.ensure_port_3389() self.assertTrue(3389 in protocolService.get_ports()) def test_ensure_3389_3(self): protocolService = ProtocolService("with-desktop") protocolService.ensure_port_3389() self.assertTrue(3389 in protocolService.get_ports()) def test_ensure_3389_4(self): protocolService = ProtocolService("with-http,with-ssh") protocolService.ensure_port_3389() self.assertTrue(3389 in protocolService.get_ports()) def test_ensure_3389_5(self): protocolService = ProtocolService("") protocolService.ensure_port_3389() self.assertTrue(3389 in protocolService.get_ports())
38
68
0.730263
214
1,976
6.453271
0.191589
0.260681
0.246198
0.192614
0.770456
0.748733
0.598117
0.511224
0.511224
0.511224
0
0.052211
0.176113
1,976
52
69
38
0.796069
0
0
0.439024
0
0
0.051593
0.011128
0
0
0
0
0.243902
1
0.243902
false
0
0.073171
0
0.341463
0
0
0
0
null
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
5
a58c78ec19e4bd971d5b27e1d03b6e45265233a3
54
py
Python
nbgrader/server_extensions/formgrader/__init__.py
FrattisUC/nbgrader
f6402dcbb875e41ee3317be9e7af518afda9f72c
[ "BSD-3-Clause-Clear" ]
1,116
2015-01-20T19:22:24.000Z
2022-03-31T22:05:10.000Z
nbgrader/server_extensions/formgrader/__init__.py
jld23/nbgrader
07a38cd8ed12ab33870bdd42f0bf35aa1252b0db
[ "BSD-3-Clause" ]
1,166
2015-01-08T21:50:31.000Z
2022-03-31T05:15:01.000Z
nbgrader/server_extensions/formgrader/__init__.py
jld23/nbgrader
07a38cd8ed12ab33870bdd42f0bf35aa1252b0db
[ "BSD-3-Clause" ]
337
2015-02-06T01:28:00.000Z
2022-03-29T06:52:38.000Z
from .formgrader import load_jupyter_server_extension
27
53
0.907407
7
54
6.571429
1
0
0
0
0
0
0
0
0
0
0
0
0.074074
54
1
54
54
0.92
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
a59c58fc909a08486f18b07455ca5c62e379020c
213
py
Python
acq4/util/Canvas/__init__.py
aleonlein/acq4
4b1fcb9ad2c5e8d4595a2b9cf99d50ece0c0f555
[ "MIT" ]
1
2020-06-04T17:04:53.000Z
2020-06-04T17:04:53.000Z
acq4/util/Canvas/__init__.py
aleonlein/acq4
4b1fcb9ad2c5e8d4595a2b9cf99d50ece0c0f555
[ "MIT" ]
24
2016-09-27T17:25:24.000Z
2017-03-02T21:00:11.000Z
acq4/util/Canvas/__init__.py
sensapex/acq4
9561ba73caff42c609bd02270527858433862ad8
[ "MIT" ]
4
2016-10-19T06:39:36.000Z
2019-09-30T21:06:45.000Z
## Extend canvas to add some new canvasItem classes from __future__ import print_function from acq4.pyqtgraph.canvas import * from .Canvas import Canvas from .items import itemTypes, getItemType, registerItemType
35.5
59
0.830986
28
213
6.142857
0.678571
0.139535
0
0
0
0
0
0
0
0
0
0.005376
0.126761
213
5
60
42.6
0.919355
0.225352
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0.25
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
a5af107ec938f2fb8de20d580525ae5845cd0452
993
py
Python
BCPNN/backend/numpy_backend.py
KTH-HPC/StreamBrain
37b16e7c8e02e6d2800bcf89630a0f4419e90cd4
[ "BSD-2-Clause" ]
4
2020-10-20T22:15:25.000Z
2022-02-10T10:25:24.000Z
BCPNN/backend/numpy_backend.py
KTH-HPC/StreamBrain
37b16e7c8e02e6d2800bcf89630a0f4419e90cd4
[ "BSD-2-Clause" ]
1
2020-12-16T10:46:50.000Z
2020-12-16T10:46:50.000Z
BCPNN/backend/numpy_backend.py
KTH-HPC/StreamBrain
37b16e7c8e02e6d2800bcf89630a0f4419e90cd4
[ "BSD-2-Clause" ]
1
2020-10-20T22:15:29.000Z
2020-10-20T22:15:29.000Z
from . import _cpu_base_backend as B from ._cpu_base_backend import Network from ._kernels import kernels_numpy class DenseLayer(B.DenseLayer): _update_state = staticmethod(kernels_numpy.update_state) _softmax_minicolumns = staticmethod(kernels_numpy.softmax_minicolumns) _update_counters = staticmethod(kernels_numpy.update_counters) _update_weights = staticmethod(kernels_numpy.update_weights) _update_bias = staticmethod(kernels_numpy.update_bias) class StructuralPlasticityLayer(B.StructuralPlasticityLayer): _update_state = staticmethod(kernels_numpy.update_state) _softmax_minicolumns = staticmethod(kernels_numpy.softmax_minicolumns) _update_counters = staticmethod(kernels_numpy.update_counters) _update_weights = staticmethod(kernels_numpy.update_weights) _update_bias = staticmethod(kernels_numpy.update_bias_regularized) _update_mask = staticmethod(kernels_numpy.update_mask) _apply_mask = staticmethod(kernels_numpy.apply_mask)
43.173913
74
0.83283
111
993
6.936937
0.216216
0.202597
0.374026
0.350649
0.654545
0.654545
0.654545
0.654545
0.654545
0.654545
0
0
0.107754
993
22
75
45.136364
0.869074
0
0
0.470588
0
0
0
0
0
0
0
0
0
1
0
false
0
0.176471
0
1
0
0
0
0
null
1
1
1
0
0
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
0
0
0
1
0
0
5
a5af6c0ce2e69540230f8212a70815a1f85ad977
2,158
py
Python
rapport/models.py
amineadmane/AutoCare
f4339cdc2d78c985b77b7b1cc469bae67728086b
[ "MIT" ]
null
null
null
rapport/models.py
amineadmane/AutoCare
f4339cdc2d78c985b77b7b1cc469bae67728086b
[ "MIT" ]
null
null
null
rapport/models.py
amineadmane/AutoCare
f4339cdc2d78c985b77b7b1cc469bae67728086b
[ "MIT" ]
null
null
null
from django.db import models from mission.models import Vehicule, Conducteur from users.models import User # Create your models here. class RapportSignalProbleme(models.Model): description = models.TextField(null=False, blank=False) vehicule = models.ForeignKey(Vehicule,on_delete=models.CASCADE, null=False) date = models.DateField(auto_now=False,auto_now_add=False, null=False, blank=False) redacteur = models.ForeignKey(User,on_delete=models.CASCADE, null=False) GRAVITE_CHOICES = ( ('FAIBLE', 'FAIBLE'), ('MOYEN', 'MOYEN'), ('FORT', 'FORT'), ('CRITIQUE', 'CRITIQUE'), ) gravite = models.CharField(max_length=20,choices=GRAVITE_CHOICES) TYPE_PROBLEME_CHOICES = ( ('PANNE', 'PANNE'), ('JCP', 'JCP'), ) type_probleme = models.CharField(max_length=30,choices=TYPE_PROBLEME_CHOICES) confirmed = models.BooleanField(default=None,null=True) class RapportSignalChauffeur(models.Model): description = models.TextField(null=False, blank=False) conducteur = models.ForeignKey(Conducteur,on_delete=models.CASCADE, null=False) date = models.DateField(auto_now=False,auto_now_add=False, null=False, blank=False) redacteur = models.ForeignKey(User,on_delete=models.CASCADE, null=False) GRAVITE_CHOICES = ( ('FAIBLE', 'FAIBLE'), ('MOYEN', 'MOYEN'), ('FORT', 'FORT'), ('CRITIQUE', 'CRITIQUE'), ) gravite = models.CharField(max_length=20,choices=GRAVITE_CHOICES) class RapportSignalSinistre(models.Model): description = models.TextField(null=False, blank=False) vehicule = models.ForeignKey(Vehicule,on_delete=models.CASCADE, null=False) conducteur = models.ForeignKey(Conducteur,on_delete=models.CASCADE, null=False) date = models.DateField(auto_now=False,auto_now_add=False, null=False, blank=False) redacteur = models.ForeignKey(User,on_delete=models.CASCADE, null=False) GRAVITE_CHOICES = ( ('FAIBLE', 'FAIBLE'), ('MOYEN', 'MOYEN'), ('FORT', 'FORT'), ('CRITIQUE', 'CRITIQUE'), ) gravite = models.CharField(max_length=20,choices=GRAVITE_CHOICES)
39.236364
87
0.696478
247
2,158
5.959514
0.214575
0.079484
0.066576
0.099864
0.773098
0.773098
0.773098
0.773098
0.773098
0.738451
0
0.004452
0.167285
2,158
54
88
39.962963
0.814691
0.011121
0
0.673913
0
0
0.072233
0
0
0
0
0
0
1
0
false
0
0.065217
0
0.608696
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
3c2165682b524bc912e19863793c6534f1d6b5d5
80
py
Python
calm/dsl/decompile/__init__.py
tuxtof/calm-dsl
5af67435d8304b97e170a690068f2d5975e9bfe6
[ "Apache-2.0" ]
37
2019-12-23T15:23:20.000Z
2022-03-15T11:12:11.000Z
calm/dsl/decompile/__init__.py
gabybeitler/calm-dsl
bac453413cfcf800eef95d89d5a7323c83654a93
[ "Apache-2.0" ]
144
2020-03-09T11:22:09.000Z
2022-03-28T21:34:09.000Z
calm/dsl/decompile/__init__.py
gabybeitler/calm-dsl
bac453413cfcf800eef95d89d5a7323c83654a93
[ "Apache-2.0" ]
46
2020-01-23T14:28:04.000Z
2022-03-09T04:17:10.000Z
from .main import init_decompile_context __all__ = ["init_decompile_context"]
16
40
0.8125
10
80
5.7
0.7
0.45614
0.701754
0
0
0
0
0
0
0
0
0
0.1125
80
4
41
20
0.802817
0
0
0
0
0
0.275
0.275
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
3c503335c57d2e1e89cb29f54b46cb837b48d934
118
py
Python
IOCFramework/__init__.py
Dino16m/iocframework
a724923d3835554711017986d2bea04b0bc33232
[ "MIT" ]
1
2020-08-27T07:57:02.000Z
2020-08-27T07:57:02.000Z
build/lib/IOCFramework/__init__.py
Dino16m/iocframework
a724923d3835554711017986d2bea04b0bc33232
[ "MIT" ]
null
null
null
build/lib/IOCFramework/__init__.py
Dino16m/iocframework
a724923d3835554711017986d2bea04b0bc33232
[ "MIT" ]
null
null
null
from .src import App, resolve_obj, get_app from .exceptions import BindingResolutionException, NameResolutionException
59
75
0.872881
13
118
7.769231
0.769231
0
0
0
0
0
0
0
0
0
0
0
0.084746
118
2
75
59
0.935185
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
3c79d02622c8420f8029aa64722a3288feffa36d
150
py
Python
apps/resources/forms.py
OpenSprites/OpenSprites-django
7d3f2c52218360629448c2ed85bd3c950d9438ab
[ "Unlicense", "MIT" ]
null
null
null
apps/resources/forms.py
OpenSprites/OpenSprites-django
7d3f2c52218360629448c2ed85bd3c950d9438ab
[ "Unlicense", "MIT" ]
2
2016-07-02T12:48:48.000Z
2016-07-02T16:07:53.000Z
apps/resources/forms.py
OpenSprites/OpenSprites-django
7d3f2c52218360629448c2ed85bd3c950d9438ab
[ "Unlicense", "MIT" ]
null
null
null
from django import forms # http://stackoverflow.com/questions/7183830/django-multiple-file-upload class ResourceUploadForm(forms.ModelForm): pass
30
72
0.813333
18
150
6.777778
0.888889
0
0
0
0
0
0
0
0
0
0
0.051095
0.086667
150
5
73
30
0.839416
0.466667
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.333333
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
1
1
1
0
0
0
0
5
3c8b9358f852872f957b338344865e3f03c23193
3,595
py
Python
test.py
abestic/Roman-Numeral
ce2104d87528225a44bd58c8abf12badd0c60179
[ "MIT" ]
null
null
null
test.py
abestic/Roman-Numeral
ce2104d87528225a44bd58c8abf12badd0c60179
[ "MIT" ]
null
null
null
test.py
abestic/Roman-Numeral
ce2104d87528225a44bd58c8abf12badd0c60179
[ "MIT" ]
null
null
null
import unittest from roman import convert class RomanNumeralConverterTest(unittest.TestCase): def test_convert_one(self): self.assertEqual(convert(1), "I") def test_convert_two(self): self.assertEqual(convert(2), "II") def test_convert_three(self): self.assertEqual(convert(3), "III") def test_convert_four(self): self.assertEqual(convert(4), "IV") def test_convert_five(self): self.assertEqual(convert(5), "V") def test_convert_six(self): self.assertEqual(convert(6), "VI") def test_convert_seven(self): self.assertEqual(convert(7), "VII") def test_convert_eight(self): self.assertEqual(convert(8), "VIII") def test_convert_nine(self): self.assertEqual(convert(9), "IX") def test_convert_ten(self): self.assertEqual(convert(10), "X") def test_convert_eleven(self): self.assertEqual(convert(11), "XI") def test_convert_fourteen(self): self.assertEqual(convert(14), "XIV") def test_convert_fifteen(self): self.assertEqual(convert(15), "XV") def test_convert_sixteen(self): self.assertEqual(convert(16), "XVI") def test_convert_sixteen(self): self.assertEqual(convert(19), "XIX") def test_convert_twenty(self): self.assertEqual(convert(20), "XX") def test_convert_twenty_four(self): self.assertEqual(convert(24), "XXIV") def test_convert_thirty(self): self.assertEqual(convert(30), "XXX") def test_convert_thirty_nine(self): self.assertEqual(convert(39), "XXXIX") def test_convert_forty(self): self.assertEqual(convert(40), "XL") def test_convert_forty_six(self): self.assertEqual(convert(46), "XLVI") def test_convert_fifty(self): self.assertEqual(convert(50), "L") def test_convert_fifty_eight(self): self.assertEqual(convert(58), "LVIII") def test_convert_sixty(self): self.assertEqual(convert(60), "LX") def test_convert_seventy(self): self.assertEqual(convert(70), "LXX") def test_convert_eighty(self): self.assertEqual(convert(80), "LXXX") def test_convert_ninety(self): self.assertEqual(convert(90), "XC") def test_convert_one_hundred(self): self.assertEqual(convert(100), "C") def test_convert_one_hundred_fifty(self): self.assertEqual(convert(150), "CL") def test_convert_two_hundred(self): self.assertEqual(convert(200), "CC") def test_convert_three_hundred(self): self.assertEqual(convert(300), "CCC") def test_convert_four_hundred(self): self.assertEqual(convert(400), "CD") def test_convert_four_hundred_ninety_nine(self): self.assertEqual(convert(499), "CDXCIX") def test_convert_five_hundred(self): self.assertEqual(convert(500), "D") def test_convert_five_hundred_forty_nine(self): self.assertEqual(convert(549), "DXLIX") def test_convert_six_hundred_twenty_two(self): self.assertEqual(convert(622), "DCXXII") def test_convert_seven_hundred_eighty_eight(self): self.assertEqual(convert(788), "DCCLXXXVIII") def test_convert_eight_hundred_five(self): self.assertEqual(convert(805), "DCCCV") def test_convert_nine_hundred_sixty_three(self): #failing test self.assertEqual(convert(963), "CMLXIII") def test_convert_one_thousand(self): self.assertEqual(convert(1000), "M") def test_convert_two_thousand(self): self.assertEqual(convert(2000), "MM") def test_convert_three_thousand(self): self.assertEqual(convert(3000), "MMM") def test_convert_three_thousand_nine_hundred_ninety_nine(self): self.assertEqual(convert(3999), "MMMCMXCIX") if __name__ == '__main__': unittest.main()
26.433824
65
0.727399
483
3,595
5.144928
0.26087
0.121127
0.242254
0.439437
0.440241
0.072435
0.072435
0.037827
0
0
0
0.03128
0.137413
3,595
136
66
26.433824
0.770074
0.003338
0
0.021978
0
0
0.040469
0
0
0
0
0
0.472527
1
0.472527
false
0
0.021978
0
0.505495
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
1
0
1
0
0
0
0
1
0
0
5
b1b68d48d75c500636003e99c3c7ed187827be00
38
py
Python
lib/models/autorf/__init__.py
pprp/pytorch-cifar-model-zoo
e7e68d8162a77aee2161bcd3cd70c20ddd7ef7ab
[ "MIT" ]
23
2021-12-16T02:08:51.000Z
2022-03-31T00:21:22.000Z
lib/models/autorf/__init__.py
pprp/pytorch-cifar-tricks
e7e68d8162a77aee2161bcd3cd70c20ddd7ef7ab
[ "MIT" ]
3
2021-12-26T13:28:01.000Z
2022-03-21T08:31:15.000Z
lib/models/autorf/__init__.py
pprp/pytorch-cifar-tricks
e7e68d8162a77aee2161bcd3cd70c20ddd7ef7ab
[ "MIT" ]
5
2022-01-03T14:53:59.000Z
2022-02-10T02:24:51.000Z
from .models import build_auto_network
38
38
0.894737
6
38
5.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.078947
38
1
38
38
0.914286
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
59076a05ea01f23dbb50e9af7611ff9573ecd177
49
py
Python
python/testData/copyPaste/SingleLine.dst.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/copyPaste/SingleLine.dst.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/copyPaste/SingleLine.dst.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
def x(): print "bar" <caret> print "xyzzy"
16.333333
24
0.55102
7
49
3.857143
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.265306
49
3
24
16.333333
0.75
0
0
0
0
0
0.16
0
0
0
0
0
0
0
null
null
0
0
null
null
0.666667
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
5
a73405238b6310f081fd05c1c56375f12b2e0b4b
25
py
Python
view/steam.py
Marreco202/myChess
179693d2d40754fedd55da76f153145e94b8cd4a
[ "MIT" ]
null
null
null
view/steam.py
Marreco202/myChess
179693d2d40754fedd55da76f153145e94b8cd4a
[ "MIT" ]
null
null
null
view/steam.py
Marreco202/myChess
179693d2d40754fedd55da76f153145e94b8cd4a
[ "MIT" ]
null
null
null
#Interface import pygame
8.333333
13
0.84
3
25
7
1
0
0
0
0
0
0
0
0
0
0
0
0.12
25
2
14
12.5
0.954545
0.36
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
ab7a5143e6e67131c17c2cff74a35496546edab1
103
py
Python
wiske/interface/__init__.py
jthistle/wiskesynth
b2132c7edf79c9f52b0a67779ae77a8d427ae712
[ "MIT" ]
null
null
null
wiske/interface/__init__.py
jthistle/wiskesynth
b2132c7edf79c9f52b0a67779ae77a8d427ae712
[ "MIT" ]
null
null
null
wiske/interface/__init__.py
jthistle/wiskesynth
b2132c7edf79c9f52b0a67779ae77a8d427ae712
[ "MIT" ]
null
null
null
from .interface import AudioInterface from .config import AudioConfig from .buffer import CustomBuffer
25.75
37
0.854369
12
103
7.333333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.116505
103
3
38
34.333333
0.967033
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
abb422a81cd151967287fa0abf2b285ed9340243
231
py
Python
model/orion/tests/test_integration.py
coddiw0mple/dffml
2b9d0794aa2b041231dcf58d5540107594a22a91
[ "MIT" ]
null
null
null
model/orion/tests/test_integration.py
coddiw0mple/dffml
2b9d0794aa2b041231dcf58d5540107594a22a91
[ "MIT" ]
null
null
null
model/orion/tests/test_integration.py
coddiw0mple/dffml
2b9d0794aa2b041231dcf58d5540107594a22a91
[ "MIT" ]
null
null
null
from dffml import AsyncTestCase, run_consoletest from dffml_model_orion.orion_model import OrionModel class TestIntegrationOrionModel(AsyncTestCase): async def test_docstring(self): await run_consoletest(OrionModel)
25.666667
52
0.822511
26
231
7.076923
0.653846
0.097826
0
0
0
0
0
0
0
0
0
0
0.134199
231
8
53
28.875
0.92
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.4
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
1
0
1
0
1
0
0
5
abbf879deade00241575159938ffda9ccbb7c83e
24
py
Python
hello_worlds.py
jarvisbeach/testpy
667af51e673c744ca7f2358239df98afd8602bb9
[ "Apache-2.0" ]
null
null
null
hello_worlds.py
jarvisbeach/testpy
667af51e673c744ca7f2358239df98afd8602bb9
[ "Apache-2.0" ]
null
null
null
hello_worlds.py
jarvisbeach/testpy
667af51e673c744ca7f2358239df98afd8602bb9
[ "Apache-2.0" ]
null
null
null
print('hello worlds!')
8
22
0.666667
3
24
5.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.125
24
2
23
12
0.761905
0
0
0
0
0
0.565217
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
f9faa4fa3666fb8b5409bdafd86fffcdde47588d
57
py
Python
sfaira/unit_tests/tests_by_submodule/estimators/__init__.py
johnmous/sfaira
c50240a74530e614ab7681bf9c63b04cb815b361
[ "BSD-3-Clause" ]
110
2020-09-08T07:47:15.000Z
2022-03-29T03:33:56.000Z
sfaira/unit_tests/tests_by_submodule/estimators/__init__.py
johnmous/sfaira
c50240a74530e614ab7681bf9c63b04cb815b361
[ "BSD-3-Clause" ]
405
2020-09-15T15:05:46.000Z
2022-03-16T14:44:23.000Z
sfaira/unit_tests/tests_by_submodule/estimators/__init__.py
johnmous/sfaira
c50240a74530e614ab7681bf9c63b04cb815b361
[ "BSD-3-Clause" ]
20
2021-03-30T15:30:14.000Z
2022-03-07T12:52:58.000Z
from .test_estimator import TARGETS, HelperEstimatorBase
28.5
56
0.877193
6
57
8.166667
1
0
0
0
0
0
0
0
0
0
0
0
0.087719
57
1
57
57
0.942308
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
e616a9717ccd46511dbd950a92cc85efd639af34
86
py
Python
MaixBit_uPy_Attempts1/boot.py
f-caro/MAIXbit_kit_nncase_testing
ef0d0cdca551908369e36b606f76c9226871e9ef
[ "MIT" ]
null
null
null
MaixBit_uPy_Attempts1/boot.py
f-caro/MAIXbit_kit_nncase_testing
ef0d0cdca551908369e36b606f76c9226871e9ef
[ "MIT" ]
null
null
null
MaixBit_uPy_Attempts1/boot.py
f-caro/MAIXbit_kit_nncase_testing
ef0d0cdca551908369e36b606f76c9226871e9ef
[ "MIT" ]
null
null
null
from fpioa_manager import * import os, Maix, lcd, image from Maix import FPIOA, GPIO
17.2
28
0.767442
14
86
4.642857
0.642857
0
0
0
0
0
0
0
0
0
0
0
0.174419
86
4
29
21.5
0.915493
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
e6228a2b56c431df6affaf98b43eb670ece49f4f
78
py
Python
src/post.py
peicap/shadowads
d49fa962013e6cc136a24e7720f0c97bdb40cc63
[ "MIT" ]
null
null
null
src/post.py
peicap/shadowads
d49fa962013e6cc136a24e7720f0c97bdb40cc63
[ "MIT" ]
null
null
null
src/post.py
peicap/shadowads
d49fa962013e6cc136a24e7720f0c97bdb40cc63
[ "MIT" ]
null
null
null
print('Looking for high school students na gustong mag part time. Pm me fast')
78
78
0.782051
14
78
4.357143
1
0
0
0
0
0
0
0
0
0
0
0
0.153846
78
1
78
78
0.924242
0
0
0
0
0
0.873418
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
c6fd74c27d42c4ce8d241e1d23eeb148aacce813
177
py
Python
transport/__init__.py
c-thaler/opat
b7cb40572c8566e2791d2c7c54c55c4504de311f
[ "MIT" ]
3
2021-09-03T10:21:39.000Z
2021-12-17T22:42:56.000Z
transport/__init__.py
c-thaler/opat
b7cb40572c8566e2791d2c7c54c55c4504de311f
[ "MIT" ]
2
2021-06-23T09:19:59.000Z
2021-11-19T21:02:39.000Z
transport/__init__.py
c-thaler/opat
b7cb40572c8566e2791d2c7c54c55c4504de311f
[ "MIT" ]
null
null
null
from .transport import Transport from .req_quick_setup import RequestQuickSetup from .req_wifi_scan_info import RequestWifiScanInfo from .req_set_qs_info import RequestSetQsInfo
44.25
51
0.892655
24
177
6.25
0.583333
0.14
0
0
0
0
0
0
0
0
0
0
0.084746
177
4
52
44.25
0.925926
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
053b1194b3dd48404c4f2426d7dbf369d380a4e9
220
py
Python
chemsys/__init__.py
tjczec01/symbolgen
e360810e872bb0041407d6d2f252683ea3b0c52d
[ "MIT" ]
null
null
null
chemsys/__init__.py
tjczec01/symbolgen
e360810e872bb0041407d6d2f252683ea3b0c52d
[ "MIT" ]
null
null
null
chemsys/__init__.py
tjczec01/symbolgen
e360810e872bb0041407d6d2f252683ea3b0c52d
[ "MIT" ]
null
null
null
from . import cs from . import cspdf from .cs import * from .cspdf import * __all__ = ["cs", "cspdf"] # __all__.extend(cs.__all__) # __all__.extend(cspdf.__all__) #__all__.extend(chemsystest.__all__)
14.666667
37
0.663636
27
220
4.37037
0.259259
0.228814
0.20339
0
0
0
0
0
0
0
0
0
0.204545
220
14
38
15.714286
0.674286
0.413636
0
0
0
0
0.063636
0
0
0
0
0
0
1
0
false
0
0.8
0
0.8
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
0555793c8bd6c866fbf9f16c3e4c9fb3dfedd002
905
py
Python
city_housing_index/contacts/models.py
Sinope-Nanto/city_house
73589bb07c415b1deecf8a0618b79d376d5a6e88
[ "MIT" ]
null
null
null
city_housing_index/contacts/models.py
Sinope-Nanto/city_house
73589bb07c415b1deecf8a0618b79d376d5a6e88
[ "MIT" ]
null
null
null
city_housing_index/contacts/models.py
Sinope-Nanto/city_house
73589bb07c415b1deecf8a0618b79d376d5a6e88
[ "MIT" ]
1
2021-05-05T13:13:56.000Z
2021-05-05T13:13:56.000Z
from django.contrib.auth.models import User from django.db import models class Contact(models.Model): creator = models.ForeignKey(User, on_delete=models.SET_NULL, null=True) name = models.CharField(default="", max_length=200, blank=True, null=False) mobile = models.CharField(default="", max_length=100, blank=True, null=False) position = models.CharField(default="", max_length=200, blank=True, null=False) department = models.CharField(default="", max_length=200, blank=True, null=True) leader = models.CharField(default="", max_length=200, blank=True, null=True) tel = models.CharField(default="", max_length=200, blank=True, null=True) qq = models.CharField(default="", max_length=200, blank=True, null=True) email = models.CharField(default="", max_length=200, blank=True, null=True) fax = models.CharField(default="", max_length=200, blank=True, null=True)
56.5625
84
0.729282
126
905
5.150794
0.277778
0.208012
0.305085
0.346687
0.679507
0.631741
0.631741
0.631741
0.631741
0.631741
0
0.034005
0.122652
905
15
85
60.333333
0.783375
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.153846
0
1
0
0
0
0
null
1
1
1
0
0
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
0
0
0
1
0
0
5
05712f0a9dacbb905523fc3908c8f93c792d82cb
163
py
Python
Django/tasking-and-analysis-system-django/tasking-and-analysis-system/apps/authentication/config.py
Yeva9/ITC-projects
19e967d656c86c64f04cc1ffbe03540f97c6eb34
[ "MIT" ]
null
null
null
Django/tasking-and-analysis-system-django/tasking-and-analysis-system/apps/authentication/config.py
Yeva9/ITC-projects
19e967d656c86c64f04cc1ffbe03540f97c6eb34
[ "MIT" ]
null
null
null
Django/tasking-and-analysis-system-django/tasking-and-analysis-system/apps/authentication/config.py
Yeva9/ITC-projects
19e967d656c86c64f04cc1ffbe03540f97c6eb34
[ "MIT" ]
null
null
null
from django.apps import AppConfig class AuthConfig(AppConfig): name = 'apps.authentication' def ready(self): import apps.authentication.signals
18.111111
42
0.723926
18
163
6.555556
0.722222
0.305085
0
0
0
0
0
0
0
0
0
0
0.196319
163
8
43
20.375
0.900763
0
0
0
0
0
0.116564
0
0
0
0
0
0
1
0.2
false
0
0.4
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
555a8a385ebded3062c46b742c96c372427e4972
193
py
Python
Pacote-download/aulas_python_cev/ex_74_sorteador.py
HLAvieira/Curso-em-Video-Python3
04b9fa08acd1f70e39c6671e48330a445e2a77f8
[ "MIT" ]
null
null
null
Pacote-download/aulas_python_cev/ex_74_sorteador.py
HLAvieira/Curso-em-Video-Python3
04b9fa08acd1f70e39c6671e48330a445e2a77f8
[ "MIT" ]
null
null
null
Pacote-download/aulas_python_cev/ex_74_sorteador.py
HLAvieira/Curso-em-Video-Python3
04b9fa08acd1f70e39c6671e48330a445e2a77f8
[ "MIT" ]
null
null
null
from random import randint nums = (randint(0, 10), randint(0, 10), randint(0, 10), randint(0, 10), randint(0, 10)) print(nums) print(f'o maior número é {max(nums)}, e o menor é {min(nums)}')
27.571429
87
0.658031
36
193
3.527778
0.472222
0.314961
0.393701
0.535433
0.393701
0.393701
0.393701
0.393701
0.393701
0.393701
0
0.091463
0.150259
193
6
88
32.166667
0.682927
0
0
0
0
0
0.277487
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0.5
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
55745d2d50783e0982042db8b842436649389963
187
py
Python
audit_log/decorators.py
FairWindCo/django-audit-log
267234b231e623884125b1bbb8557ad98a8ca5bb
[ "BSD-3-Clause" ]
null
null
null
audit_log/decorators.py
FairWindCo/django-audit-log
267234b231e623884125b1bbb8557ad98a8ca5bb
[ "BSD-3-Clause" ]
null
null
null
audit_log/decorators.py
FairWindCo/django-audit-log
267234b231e623884125b1bbb8557ad98a8ca5bb
[ "BSD-3-Clause" ]
null
null
null
from django.utils.decorators import decorator_from_middleware from audit_log.middleware import UserLoggingMiddleware log_current_user = decorator_from_middleware(UserLoggingMiddleware)
31.166667
67
0.898396
21
187
7.666667
0.571429
0.161491
0.285714
0
0
0
0
0
0
0
0
0
0.069519
187
5
68
37.4
0.925287
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
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
1
0
1
0
0
5
5591ba91f096eeba06a0b4d8b31914a66eabbe93
137
bzl
Python
docs/rules_proto_stub/proto/defs.bzl
agentydragon/rules_rust
bbbfcddfae73ad51d2520719f8ff6acdc9342ff1
[ "Apache-2.0" ]
3
2020-11-30T15:35:37.000Z
2022-01-06T14:17:18.000Z
docs/rules_proto_stub/proto/defs.bzl
agentydragon/rules_rust
bbbfcddfae73ad51d2520719f8ff6acdc9342ff1
[ "Apache-2.0" ]
54
2020-06-23T17:34:04.000Z
2022-03-31T02:04:06.000Z
docs/rules_proto_stub/proto/defs.bzl
agentydragon/rules_rust
bbbfcddfae73ad51d2520719f8ff6acdc9342ff1
[ "Apache-2.0" ]
12
2020-07-14T23:59:57.000Z
2022-03-22T09:59:18.000Z
# buildifier: disable=module-docstring # buildifier: disable=provider-params ProtoInfo = provider() def proto_library(**args): pass
19.571429
38
0.759124
15
137
6.866667
0.8
0.330097
0
0
0
0
0
0
0
0
0
0
0.124088
137
6
39
22.833333
0.858333
0.525547
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0.333333
0
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
1
0
1
0
0
0
0
0
5
e9ce1ecf447f97a4ef04570fc63342a9bcf59977
66
py
Python
hello-world-Riofa-Gean-F.py
egriswol/astr-119-section-assignments
6cbeb0397b6a1a9102e8efa771e8d9ed1d3fab18
[ "MIT" ]
2
2018-09-28T18:46:05.000Z
2018-09-28T19:00:27.000Z
hello-world-Riofa-Gean-F.py
egriswol/astr-119-section-assignments
6cbeb0397b6a1a9102e8efa771e8d9ed1d3fab18
[ "MIT" ]
67
2018-09-26T06:39:43.000Z
2018-10-03T15:32:12.000Z
hello-world-Riofa-Gean-F.py
egriswol/astr-119-section-assignments
6cbeb0397b6a1a9102e8efa771e8d9ed1d3fab18
[ "MIT" ]
62
2018-09-27T20:12:32.000Z
2018-10-03T23:53:47.000Z
#!/usr/bin/env python3 print("Hello from Riofa-Gean Fernandez.")
16.5
41
0.727273
10
66
4.8
1
0
0
0
0
0
0
0
0
0
0
0.016949
0.106061
66
3
42
22
0.79661
0.318182
0
0
0
0
0.727273
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
759fac4e12534708d69a97d93722d369d74368c1
363
py
Python
src/the_tale/the_tale/common/utils/fake.py
al-arz/the-tale
542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5
[ "BSD-3-Clause" ]
85
2017-11-21T12:22:02.000Z
2022-03-27T23:07:17.000Z
src/the_tale/the_tale/common/utils/fake.py
al-arz/the-tale
542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5
[ "BSD-3-Clause" ]
545
2017-11-04T14:15:04.000Z
2022-03-27T14:19:27.000Z
src/the_tale/the_tale/common/utils/fake.py
al-arz/the-tale
542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5
[ "BSD-3-Clause" ]
45
2017-11-11T12:36:30.000Z
2022-02-25T06:10:44.000Z
class FakeLogger(object): def debug(self, *argv, **kwargs): pass def info(self, *argv, **kwargs): pass def warn(self, *argv, **kwargs): pass def error(self, *argv, **kwargs): pass class FakeWorkerCommand(object): def __init__(self): self.commands = [] def __call__(self, *args): self.commands.append(tuple(args))
17.285714
42
0.61708
44
363
4.909091
0.431818
0.148148
0.259259
0.333333
0.291667
0
0
0
0
0
0
0
0.22865
363
20
43
18.15
0.771429
0
0
0
0
0
0
0
0
0
0
0
0
1
0.6
false
0.4
0
0
0.8
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
5
75f946407e55a30eac903481a80a6a5dd7ac8698
3,806
py
Python
tests/web/indicator_api_test.py
yeti-platform/TibetanBrownBear
8ab520bd199a63e404b3a6a5b49a29f277384e8e
[ "Apache-2.0" ]
9
2018-01-15T22:44:24.000Z
2021-05-28T11:13:03.000Z
tests/web/indicator_api_test.py
yeti-platform/TibetanBrownBear
8ab520bd199a63e404b3a6a5b49a29f277384e8e
[ "Apache-2.0" ]
140
2018-01-12T10:07:47.000Z
2021-08-02T23:03:49.000Z
tests/web/indicator_api_test.py
yeti-platform/TibetanBrownBear
8ab520bd199a63e404b3a6a5b49a29f277384e8e
[ "Apache-2.0" ]
11
2018-01-16T19:49:35.000Z
2022-01-18T16:30:34.000Z
"""Tests for the Indicator API.""" import json import pytest @pytest.mark.usefixtures('clean_db', 'populate_regex') def test_regex_filter(authenticated_client): json_data = {'name': '', 'type': 'x-regex'} rv = authenticated_client.post( '/api/indicators/filter/', data=json.dumps(json_data), content_type='application/json', ) response = json.loads(rv.data) assert rv.status_code == 200 assert len(response) == 2 for item in response: assert item['id'].startswith('x-regex--') @pytest.mark.usefixtures('clean_db', 'populate_regex') def test_regex_filter_on_name(authenticated_client): json_data = {'name': 'Zeus', 'type': 'x-regex'} rv = authenticated_client.post( '/api/indicators/filter/', data=json.dumps(json_data), content_type='application/json', ) response = json.loads(rv.data) assert rv.status_code == 200 assert len(response) == 1 item = response[0] assert item['name'] == 'Zeus C2' assert item['id'].startswith('x-regex--') @pytest.mark.usefixtures('clean_db') def test_regex_new(authenticated_client): json_data = { 'type': 'x-regex', 'name': 'New regex', 'labels': ['test1'], 'description': 'Random description', 'pattern': '^regex$', 'valid_from': '2018-10-03T09:32:00.000Z', 'valid_until': '2018-10-05T09:32:00.000Z', 'kill_chain_phases': [ { 'kill_chain_name': 'lockheed-martin-cyber-kill-chain', 'phase_name': 'reconnaissance', } ], } rv = authenticated_client.post( '/api/indicators/', data=json.dumps(json_data), content_type='application/json', ) response = json.loads(rv.data) assert rv.status_code == 200 assert response['name'] == 'New regex' assert response['id'].startswith('x-regex--') @pytest.mark.usefixtures('clean_db') def test_regex_invalid(authenticated_client): json_data = { 'type': 'x-regex', 'name': 'New regex', 'labels': ['test1'], 'description': 'Random description', 'pattern': '^regex$', 'valid_until': '2018-10-05T09:32:00.000Z', 'kill_chain_phases': [ { 'kill_chain_name': 'lockheed-martin-cyber-kill-chain', 'phase_name': 'reconnaissance', } ], } rv = authenticated_client.post( '/api/indicators/', data=json.dumps(json_data), content_type='application/json', ) response = json.loads(rv.data) assert rv.status_code == 400 assert 'ValidationError' in response assert 'valid_from' in response['ValidationError'] assert 'No values for required properties' in response['ValidationError'] @pytest.mark.usefixtures('clean_db') def test_indicator_update(authenticated_client, populate_regex): """Tests updating an indicator.""" regex = populate_regex[0] rv = authenticated_client.put( '/api/indicators/{0:s}/'.format(regex.id), data=json.dumps({'name': 'NewName'}), content_type='application/json') assert rv.status_code == 200 response = json.loads(rv.data) assert response['name'] == 'NewName' @pytest.mark.usefixtures('clean_db') def test_bad_indicator_update(authenticated_client, populate_regex): """Tests updating an indicator.""" regex = populate_regex[0] rv = authenticated_client.put( '/api/indicators/{0:s}/'.format(regex.id), data=json.dumps({'pattern': r'['}), content_type='application/json') assert rv.status_code == 400 response = json.loads(rv.data) assert 'ValidationError' in response assert 'not a valid regular expression' in response['ValidationError']
32.529915
77
0.624277
438
3,806
5.257991
0.205479
0.099001
0.054711
0.067738
0.843682
0.783326
0.758142
0.727746
0.689535
0.689535
0
0.026771
0.224645
3,806
116
78
32.810345
0.753643
0.022596
0
0.666667
0
0
0.269708
0.061015
0
0
0
0
0.186275
1
0.058824
false
0
0.019608
0
0.078431
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
f97f8f6d3672fe5ae570f95ca2f9b49e51cf7f30
39
py
Python
python/testData/intentions/PyAnnotateVariableTypeIntentionTest/notSuggestedForUnresolvedAugmentedAssignmentTarget.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/intentions/PyAnnotateVariableTypeIntentionTest/notSuggestedForUnresolvedAugmentedAssignmentTarget.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/intentions/PyAnnotateVariableTypeIntentionTest/notSuggestedForUnresolvedAugmentedAssignmentTarget.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
def func(): var += 1 v<caret>ar
13
14
0.487179
7
39
2.714286
1
0
0
0
0
0
0
0
0
0
0
0.038462
0.333333
39
3
14
13
0.692308
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
true
0
0
0
0.333333
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
0
0
0
5
f9bd14696d6012c96e36a8401cad320546d7b8c4
464
py
Python
main.py
pedro-abritta/exercicio1_C214-L2
5b1ac4d7ed8f7f65610027b69adb1edd7ddc4575
[ "MIT" ]
null
null
null
main.py
pedro-abritta/exercicio1_C214-L2
5b1ac4d7ed8f7f65610027b69adb1edd7ddc4575
[ "MIT" ]
null
null
null
main.py
pedro-abritta/exercicio1_C214-L2
5b1ac4d7ed8f7f65610027b69adb1edd7ddc4575
[ "MIT" ]
null
null
null
class Calc: def __init__(self, mensagem): self.mensagem = mensagem def soma(num1, num2): return num1 + num2 def mult(num1, num2): return num1 * num2 def sub(num1, num2): return num1 - num2 def div(num1, num2): return num1 / num2 def mensagem_designP(self): print(self.mensagem) def altera_mensagem_designP(self, nova): self.mensagem = nova c1 = Calc("Mensagem teste 1!")
17.846154
44
0.594828
58
464
4.637931
0.344828
0.237918
0.208178
0.267658
0.371747
0.371747
0
0
0
0
0
0.056075
0.30819
464
25
45
18.56
0.781931
0
0
0
0
0
0.036797
0
0
0
0
0
0
1
0.4375
false
0
0
0.25
0.75
0.0625
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
5
f9d72bb54298419fae7f2615a4ca08d7b35d2a8f
251
py
Python
wykop/api/requesters/__init__.py
krasnoludkolo/wykop-sdk
c6d8d8d2569249f3e2ededc53c4afe604045a19a
[ "BSD-3-Clause" ]
38
2015-02-07T00:57:10.000Z
2021-11-01T13:55:29.000Z
wykop/api/requesters/__init__.py
msinfo32/wykop-sdk
c6d8d8d2569249f3e2ededc53c4afe604045a19a
[ "BSD-3-Clause" ]
8
2016-05-14T17:55:14.000Z
2020-11-25T17:27:40.000Z
wykop/api/requesters/__init__.py
msinfo32/wykop-sdk
c6d8d8d2569249f3e2ededc53c4afe604045a19a
[ "BSD-3-Clause" ]
16
2015-03-28T17:57:39.000Z
2020-11-24T10:44:27.000Z
# try requests module try: import requests from wykop.api.requesters.requests import RequestsRequester as Requester except ImportError: from wykop.api.requesters.urllib import UrllibRequester as Requester default_requester = Requester()
25.1
76
0.800797
29
251
6.896552
0.551724
0.09
0.12
0.22
0
0
0
0
0
0
0
0
0.151394
251
9
77
27.888889
0.938967
0.075697
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
f9d91fbeb5364df2ccc405a1278ef506715f125b
52
py
Python
asteroid/filterbanks/analytic_free_fb.py
julien-c/asteroid
77d1b744017408b8bf4f1812e949c3c3aa4b16d3
[ "MIT" ]
1
2021-02-22T21:55:40.000Z
2021-02-22T21:55:40.000Z
asteroid/filterbanks/analytic_free_fb.py
julien-c/asteroid
77d1b744017408b8bf4f1812e949c3c3aa4b16d3
[ "MIT" ]
null
null
null
asteroid/filterbanks/analytic_free_fb.py
julien-c/asteroid
77d1b744017408b8bf4f1812e949c3c3aa4b16d3
[ "MIT" ]
1
2021-05-10T08:58:35.000Z
2021-05-10T08:58:35.000Z
from asteroid_filterbanks.analytic_free_fb import *
26
51
0.884615
7
52
6.142857
1
0
0
0
0
0
0
0
0
0
0
0
0.076923
52
1
52
52
0.895833
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
ddb6a55b81391a81c87b1f30b43a564d28558695
2,807
py
Python
test/test_aes_encryptor.py
mmontagna/generic-encryptors
8a9a6a3b96d6cf5ccef6e4f0cc7d117bb2ae00ad
[ "MIT" ]
null
null
null
test/test_aes_encryptor.py
mmontagna/generic-encryptors
8a9a6a3b96d6cf5ccef6e4f0cc7d117bb2ae00ad
[ "MIT" ]
null
null
null
test/test_aes_encryptor.py
mmontagna/generic-encryptors
8a9a6a3b96d6cf5ccef6e4f0cc7d117bb2ae00ad
[ "MIT" ]
null
null
null
import unittest from generic_encryptors import AesEncryptor from generic_encryptors.encryptors.exceptions import HmacMissMatch class TestAesEncryptor(unittest.TestCase): def test_aes_encryptor_encode_decode(self): encryptor = AesEncryptor(key=('1' * 32).encode('ascii')) msg = b'123in0i1n 0in\x10\x00\x00\x00\x94\xd0z\xa6\xac\x95\xb2\xf5\x10\xfa\xd7\x9c\xf9\x9a\x8a\xd5 \x00\x00\x00\x89K\x9bGuxf8|\xf5\x93\xb6-\xbf\xab\xd0\x15\x99\xae}cu\xceWnE\xfdj7\xb3X_hc\xdao>0\x86\xcf\xecSI^\xe5<\xcfh' self.assertEqual(msg, encryptor.decode(encryptor.encode(msg))) def test_aes_encryptor_aborts_on_invalid_hmac_single_char_edit(self): encryptor = AesEncryptor(key=('1' * 32).encode('ascii')) msg = b'123in0i1n 0in\x10\x00\x00\x00\x94\xd0z\xa6\xac\x95\xb2\xf5\x10\xfa\xd7\x9c\xf9\x9a\x8a\xd5 \x00\x00\x00\x89K\x9bGuxf8|\xf5\x93\xb6-\xbf\xab\xd0\x15\x99\xae}cu\xceWnE\xfdj7\xb3X_hc\xdao>0\x86\xcf\xecSI^\xe5<\xcfh' encrypted_msg = encryptor.encode(msg) encrypted_msg = encrypted_msg[0:20] + b'a' + encrypted_msg[21:] with self.assertRaises(HmacMissMatch) as context: encryptor.decode(encrypted_msg) def test_aes_encryptor_aborts_on_invalid_hmac_appended_data(self): encryptor = AesEncryptor(key=('1' * 32).encode('ascii')) msg = b'123in0i1n 0in\x10\x00\x00\x00\x94\xd0z\xa6\xac\x95\xb2\xf5\x10\xfa\xd7\x9c\xf9\x9a\x8a\xd5 \x00\x00\x00\x89K\x9bGuxf8|\xf5\x93\xb6-\xbf\xab\xd0\x15\x99\xae}cu\xceWnE\xfdj7\xb3X_hc\xdao>0\x86\xcf\xecSI^\xe5<\xcfh' encrypted_msg = encryptor.encode(msg) + b'a' with self.assertRaises(HmacMissMatch) as context: encryptor.decode(encrypted_msg) def test_aes_encryptor_fails_with_invalid_key(self): encryptor1 = AesEncryptor(key=('1' * 32).encode('ascii')) encryptor2 = AesEncryptor(key=('2' * 32).encode('ascii')) msg = b'123in0i1n 0in\x10\x00\x00\x00\x94\xd0z\xa6\xac\x95\xb2\xf5\x10\xfa\xd7\x9c\xf9\x9a\x8a\xd5 \x00\x00\x00\x89K\x9bGuxf8|\xf5\x93\xb6-\xbf\xab\xd0\x15\x99\xae}cu\xceWnE\xfdj7\xb3X_hc\xdao>0\x86\xcf\xecSI^\xe5<\xcfh' encrypted_msg = encryptor1.encode(msg) with self.assertRaises(HmacMissMatch) as context: encryptor2.decode(encrypted_msg) def test_different_aes_encryptors_suceed_with_same_key(self): encryptor1 = AesEncryptor(key=('1' * 32).encode('ascii')) encryptor2 = AesEncryptor(key=('1' * 32).encode('ascii')) msg = b'123in0i1n 0in\x10\x00\x00\x00\x94\xd0z\xa6\xac\x95\xb2\xf5\x10\xfa\xd7\x9c\xf9\x9a\x8a\xd5 \x00\x00\x00\x89K\x9bGuxf8|\xf5\x93\xb6-\xbf\xab\xd0\x15\x99\xae}cu\xceWnE\xfdj7\xb3X_hc\xdao>0\x86\xcf\xecSI^\xe5<\xcfh' encrypted_msg = encryptor1.encode(msg) self.assertEqual(msg, encryptor2.decode(encrypted_msg)) if __name__ == '__main__': unittest.main()
59.723404
226
0.723548
444
2,807
4.439189
0.207207
0.060883
0.045662
0.054795
0.781329
0.768645
0.747336
0.747336
0.747336
0.716895
0
0.124547
0.116138
2,807
47
227
59.723404
0.669891
0
0
0.459459
0
0.135135
0.394231
0.356125
0
0
0
0
0.135135
1
0.135135
false
0
0.081081
0
0.243243
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
ddead8b0d533491ae3342348e4ffcd095eb76386
28
py
Python
python/testData/codeInsight/smartEnter/multilineListLiteralInsideItem_after.py
alexey-anufriev/intellij-community
ffcd46f14e630acdefcc76e2bfc7c43d2449013a
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/codeInsight/smartEnter/multilineListLiteralInsideItem_after.py
alexey-anufriev/intellij-community
ffcd46f14e630acdefcc76e2bfc7c43d2449013a
[ "Apache-2.0" ]
1
2020-07-30T19:04:47.000Z
2020-07-30T19:04:47.000Z
python/testData/codeInsight/smartEnter/multilineListLiteralInsideItem_after.py
bradleesand/intellij-community
750ff9c10333c9c1278c00dbe8d88c877b1b9749
[ "Apache-2.0" ]
1
2020-10-15T05:56:42.000Z
2020-10-15T05:56:42.000Z
xs = [ 42, <caret> ]
7
11
0.321429
3
28
3
1
0
0
0
0
0
0
0
0
0
0
0.133333
0.464286
28
4
12
7
0.466667
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
5
fb10a4a8c3a4a727641edf5143356ee495651216
90
py
Python
email1/__init__.py
owen-kuai/upload
a92b49c3ceaa2f5221893854312c60716e189c9e
[ "MIT" ]
null
null
null
email1/__init__.py
owen-kuai/upload
a92b49c3ceaa2f5221893854312c60716e189c9e
[ "MIT" ]
null
null
null
email1/__init__.py
owen-kuai/upload
a92b49c3ceaa2f5221893854312c60716e189c9e
[ "MIT" ]
null
null
null
"""fdasfefasfdasf""" from .email_test import send_email_test, check_smtp_conn, SMTPClient
30
68
0.822222
12
90
5.75
0.833333
0.26087
0
0
0
0
0
0
0
0
0
0
0.077778
90
2
69
45
0.831325
0.155556
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
fb1dd62429c0233ffaa0cfb95c7790891251ccf1
192
py
Python
shop/admin.py
koyoo-maxwel/sudoPay
afc6e7fa67815c643659fd30cbdab8e25eb0c0ae
[ "MIT" ]
null
null
null
shop/admin.py
koyoo-maxwel/sudoPay
afc6e7fa67815c643659fd30cbdab8e25eb0c0ae
[ "MIT" ]
null
null
null
shop/admin.py
koyoo-maxwel/sudoPay
afc6e7fa67815c643659fd30cbdab8e25eb0c0ae
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Goodie , Category # Register your models here. admin.site.register (Goodie) # admin.site.register(Quantity) admin.site.register(Category)
24
37
0.796875
26
192
5.884615
0.5
0.176471
0.333333
0
0
0
0
0
0
0
0
0
0.109375
192
7
38
27.428571
0.894737
0.291667
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
3492a1c0e941ee7dc871919a4d98f845f935572b
158
py
Python
buck/stack/services/s3/types/datetime.py
tombulled/python-buck
1b3f6d0951d48b9b71227a630c0a26fe5c7e2cf5
[ "MIT" ]
null
null
null
buck/stack/services/s3/types/datetime.py
tombulled/python-buck
1b3f6d0951d48b9b71227a630c0a26fe5c7e2cf5
[ "MIT" ]
null
null
null
buck/stack/services/s3/types/datetime.py
tombulled/python-buck
1b3f6d0951d48b9b71227a630c0a26fe5c7e2cf5
[ "MIT" ]
null
null
null
import arrow import datetime class DateTime(arrow.Arrow, datetime.datetime): def __repr__(self): return f'<{self.__class__.__name__}: {self!s}>'
22.571429
55
0.708861
20
158
5
0.55
0
0
0
0
0
0
0
0
0
0
0
0.158228
158
6
56
26.333333
0.75188
0
0
0
0
0
0.234177
0.170886
0
0
0
0
0
1
0.2
false
0
0.4
0.2
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
1
0
0
5
34a67684ea797b3f584a3a67ca6a18e3a8c9a681
59
py
Python
Storylines/storyline_runs/__init__.py
Komanawa-Solutions-Ltd/SLMACC-2020-CSRA
914b6912c5f5b522107aa9406fb3d823e61c2ebe
[ "Apache-2.0" ]
null
null
null
Storylines/storyline_runs/__init__.py
Komanawa-Solutions-Ltd/SLMACC-2020-CSRA
914b6912c5f5b522107aa9406fb3d823e61c2ebe
[ "Apache-2.0" ]
null
null
null
Storylines/storyline_runs/__init__.py
Komanawa-Solutions-Ltd/SLMACC-2020-CSRA
914b6912c5f5b522107aa9406fb3d823e61c2ebe
[ "Apache-2.0" ]
null
null
null
""" Author: Matt Hanson Created: 16/02/2021 12:55 PM """
14.75
29
0.627119
10
59
3.7
1
0
0
0
0
0
0
0
0
0
0
0.25
0.186441
59
4
30
14.75
0.520833
0.813559
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
1
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
34c2a8645c0ad51e599e1af2832d6501d1095e14
182
py
Python
networkapi/usuario/admin/__init__.py
vinicius-marinho/GloboNetworkAPI
94651d3b4dd180769bc40ec966814f3427ccfb5b
[ "Apache-2.0" ]
73
2015-04-13T17:56:11.000Z
2022-03-24T06:13:07.000Z
networkapi/usuario/admin/__init__.py
leopoldomauricio/GloboNetworkAPI
3b5b2e336d9eb53b2c113977bfe466b23a50aa29
[ "Apache-2.0" ]
99
2015-04-03T01:04:46.000Z
2021-10-03T23:24:48.000Z
networkapi/usuario/admin/__init__.py
shildenbrand/GloboNetworkAPI
515d5e961456cee657c08c275faa1b69b7452719
[ "Apache-2.0" ]
64
2015-08-05T21:26:29.000Z
2022-03-22T01:06:28.000Z
# -*- coding: utf-8 -*- from django.contrib import admin from .usuario import UsuarioAdmin from networkapi.usuario.models import Usuario admin.site.register(Usuario, UsuarioAdmin)
22.75
45
0.785714
23
182
6.217391
0.608696
0
0
0
0
0
0
0
0
0
0
0.006211
0.115385
182
7
46
26
0.881988
0.115385
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
1
0
0
5
550474027a5fd370cf614c2af2754595ad101387
203
py
Python
setup.py
clnrp/cyphon
96019a2112cabc2e243320fd0d5c7924af4bccfb
[ "MIT" ]
null
null
null
setup.py
clnrp/cyphon
96019a2112cabc2e243320fd0d5c7924af4bccfb
[ "MIT" ]
null
null
null
setup.py
clnrp/cyphon
96019a2112cabc2e243320fd0d5c7924af4bccfb
[ "MIT" ]
null
null
null
from distutils.core import setup from Cython.Build import cythonize setup(ext_modules = cythonize('test_cy.pyx')) # python setup.py build_ext --inplace # /usr/bin/python3.8 setup.py build_ext --inplace
29
49
0.783251
32
203
4.84375
0.625
0.090323
0.154839
0.193548
0.283871
0
0
0
0
0
0
0.01105
0.108374
203
7
49
29
0.845304
0.408867
0
0
0
0
0.09322
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
5521feb6f986c2078f140ae8d6216a58edc652bd
115
py
Python
apps/asynctask/tasks/base.py
zjjott/html
68429832d8b022602915a267a62051f4869f430f
[ "MIT" ]
null
null
null
apps/asynctask/tasks/base.py
zjjott/html
68429832d8b022602915a267a62051f4869f430f
[ "MIT" ]
null
null
null
apps/asynctask/tasks/base.py
zjjott/html
68429832d8b022602915a267a62051f4869f430f
[ "MIT" ]
null
null
null
# coding=utf-8 from __future__ import unicode_literals from celery import Task class MLBaseTask(Task): pass
12.777778
39
0.773913
16
115
5.25
0.8125
0
0
0
0
0
0
0
0
0
0
0.010526
0.173913
115
8
40
14.375
0.873684
0.104348
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.25
0.5
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
0
0
0
5
9b3b1623abfbdebe7c00981d5f681ab4201c336c
1,532
py
Python
tests/test_with.py
abraha2d/PyVirtualDisplay
0cfb84b1e3abb6cf75bf9edaa3547fa8728969d5
[ "BSD-2-Clause" ]
409
2015-02-06T05:10:20.000Z
2022-03-29T22:05:17.000Z
tests/test_with.py
abraha2d/PyVirtualDisplay
0cfb84b1e3abb6cf75bf9edaa3547fa8728969d5
[ "BSD-2-Clause" ]
64
2015-08-09T19:49:15.000Z
2022-03-15T22:43:09.000Z
tests/test_with.py
abraha2d/PyVirtualDisplay
0cfb84b1e3abb6cf75bf9edaa3547fa8728969d5
[ "BSD-2-Clause" ]
71
2015-02-12T22:05:49.000Z
2022-02-12T16:49:07.000Z
from pyvirtualdisplay import Display from tutil import has_xvnc, rfbport def test_with_xvfb(): with Display(size=(800, 600)) as vd: assert vd.is_alive() assert vd._backend == "xvfb" assert vd.return_code == 0 assert not vd.is_alive() with Display(visible=False, size=(800, 600)) as vd: assert vd.is_alive() assert vd._backend == "xvfb" assert vd.return_code == 0 assert not vd.is_alive() with Display(backend="xvfb", size=(800, 600)) as vd: assert vd.is_alive() assert vd._backend == "xvfb" assert vd.return_code == 0 assert not vd.is_alive() def test_with_xephyr(): with Display() as vd: with Display(visible=True, size=(800, 600)) as vd: assert vd.is_alive() assert vd._backend == "xephyr" assert vd.return_code == 0 assert not vd.is_alive() with Display(backend="xephyr", size=(800, 600)) as vd: assert vd.is_alive() assert vd._backend == "xephyr" assert vd.return_code == 0 assert not vd.is_alive() if has_xvnc(): def test_with_xvnc(): with Display(backend="xvnc", size=(800, 600), rfbport=rfbport()) as vd: assert vd.is_alive() assert vd._backend == "xvnc" assert vd.return_code == 0 assert not vd.is_alive() def test_dpi(): with Display(backend="xvfb", size=(800, 600), dpi=99) as vd: assert vd.is_alive() assert vd.return_code == 0 assert not vd.is_alive()
27.854545
79
0.603133
219
1,532
4.054795
0.146119
0.18018
0.141892
0.094595
0.73536
0.73536
0.73536
0.69482
0.673423
0.635135
0
0.045905
0.274804
1,532
54
80
28.37037
0.753375
0
0
0.619048
0
0
0.030026
0
0
0
0
0
0.642857
1
0.095238
true
0
0.047619
0
0.142857
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
1
0
0
0
0
0
0
5
9b58d77b736b7759ed0a5b961c38ada8be4122f0
191
py
Python
contract/serializers.py
YangWanjun/ebusiness
03d92908b4db1a305c8cb99fc27700fd4dc972bd
[ "Apache-2.0" ]
null
null
null
contract/serializers.py
YangWanjun/ebusiness
03d92908b4db1a305c8cb99fc27700fd4dc972bd
[ "Apache-2.0" ]
3
2020-02-11T22:59:47.000Z
2021-03-19T22:03:11.000Z
contract/serializers.py
YangWanjun/ebusiness
03d92908b4db1a305c8cb99fc27700fd4dc972bd
[ "Apache-2.0" ]
null
null
null
from . import models from utils.rest_base import BaseModelSerializer class MemberSerializer(BaseModelSerializer): class Meta: model = models.VMember fields = '__all__'
19.1
47
0.727749
19
191
7.052632
0.736842
0.358209
0
0
0
0
0
0
0
0
0
0
0.21466
191
9
48
21.222222
0.893333
0
0
0
0
0
0.036649
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
9b8f027b94fc2f0c7d816ab205928186e0dec81a
64
py
Python
spike/tools/__init__.py
spikeio/lang
33be3b51eaf22f873ddc94f2f9e381f605a2499f
[ "BSD-2-Clause" ]
1
2020-06-15T07:38:12.000Z
2020-06-15T07:38:12.000Z
spike/tools/__init__.py
spikeio/lang
33be3b51eaf22f873ddc94f2f9e381f605a2499f
[ "BSD-2-Clause" ]
1
2021-11-12T11:01:45.000Z
2021-11-12T11:01:45.000Z
spike/tools/__init__.py
spikeio/lang
33be3b51eaf22f873ddc94f2f9e381f605a2499f
[ "BSD-2-Clause" ]
null
null
null
from Assembler import Assembler from Compiler import Compiler
12.8
31
0.84375
8
64
6.75
0.5
0
0
0
0
0
0
0
0
0
0
0
0.15625
64
4
32
16
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
9b99aede7fe1ce176acc63715659aa9190a44bbc
8,474
py
Python
mhs/common/mhs_common/routing/tests/test_routing_reliability.py
tomzo/integration-adaptors
d4f296d3e44475df6f69a78a27fac6ed5b67513b
[ "Apache-2.0" ]
15
2019-08-06T16:08:12.000Z
2021-05-24T13:14:39.000Z
mhs/common/mhs_common/routing/tests/test_routing_reliability.py
tomzo/integration-adaptors
d4f296d3e44475df6f69a78a27fac6ed5b67513b
[ "Apache-2.0" ]
75
2019-04-25T13:59:02.000Z
2021-09-15T06:05:36.000Z
mhs/common/mhs_common/routing/tests/test_routing_reliability.py
tomzo/integration-adaptors
d4f296d3e44475df6f69a78a27fac6ed5b67513b
[ "Apache-2.0" ]
7
2019-11-12T15:26:34.000Z
2021-04-11T07:23:56.000Z
import unittest from unittest import mock from tornado import httpclient from utilities import test_utilities from mhs_common.routing import routing_reliability BASE_URL = "https://example.com" ROUTING_PATH = "routing" RELIABILITY_PATH = "reliability" SPINE_ORG_CODE = "SPINE ORG CODE" CLIENT_CERT_PATH = "client/cert/path" CLIENT_KEY_PATH = "client/key/path" CA_CERTS_PATH = "ca/certs/path" HTTP_PROXY_HOST = "proxy.example.com" HTTP_PROXY_PORT = 42 HTTP_METHOD = "GET" ORG_CODE = "ORG CODE" SERVICE_ID = "SERVICE ID" JSON_RESPONSE = '{"one": 1, "two": "2"}' EXPECTED_RESPONSE = {"one": 1, "two": "2"} class TestRoutingAndReliability(unittest.TestCase): def setUp(self) -> None: # Mock the httpclient.AsyncHTTPClient() constructor patcher = unittest.mock.patch.object(httpclient, "AsyncHTTPClient") mock_http_client_constructor = patcher.start() self.addCleanup(patcher.stop) # Mock the AsyncHTTPClient client class itself self.mock_http_client = unittest.mock.MagicMock() mock_http_client_constructor.return_value = self.mock_http_client @test_utilities.async_test async def test_should_retrieve_endpoint_details_if_given_org_code(self): self.routing = routing_reliability.RoutingAndReliability(BASE_URL, SPINE_ORG_CODE) self._given_http_client_returns_a_json_response() endpoint_details = await self.routing.get_end_point(SERVICE_ID, ORG_CODE) self.assertEqual(EXPECTED_RESPONSE, endpoint_details) expected_url = self._build_url(path=ROUTING_PATH) self._assert_http_client_called_with_expected_args(expected_url) @test_utilities.async_test async def test_should_retrieve_endpoint_details_with_default_org_code(self): self.routing = routing_reliability.RoutingAndReliability(BASE_URL, SPINE_ORG_CODE) self._given_http_client_returns_a_json_response() endpoint_details = await self.routing.get_end_point(SERVICE_ID) self.assertEqual(EXPECTED_RESPONSE, endpoint_details) expected_url = self._build_url(path=ROUTING_PATH, org_code=SPINE_ORG_CODE) self._assert_http_client_called_with_expected_args(expected_url) @test_utilities.async_test async def test_should_pass_through_exception_if_raised_when_retrieving_endpoint_details(self): self.routing = routing_reliability.RoutingAndReliability(BASE_URL, SPINE_ORG_CODE) self.mock_http_client.fetch.side_effect = IOError("Something went wrong!") with self.assertRaises(IOError): await self.routing.get_end_point(SERVICE_ID, ORG_CODE) @test_utilities.async_test async def test_should_use_certificate_details_if_provided_when_retrieving_endpoint_details(self): self.routing = routing_reliability.RoutingAndReliability(BASE_URL, SPINE_ORG_CODE, client_cert=CLIENT_CERT_PATH, client_key=CLIENT_KEY_PATH, ca_certs=CA_CERTS_PATH) self._given_http_client_returns_a_json_response() await self.routing.get_end_point(SERVICE_ID, ORG_CODE) expected_url = self._build_url(path=ROUTING_PATH) self._assert_http_client_called_with_expected_args(expected_url, client_cert=CLIENT_CERT_PATH, client_key=CLIENT_KEY_PATH, ca_certs=CA_CERTS_PATH) @test_utilities.async_test async def test_should_use_proxy_if_provided_when_retrieving_endpoint_details(self): self.routing = routing_reliability.RoutingAndReliability(BASE_URL, SPINE_ORG_CODE, http_proxy_host=HTTP_PROXY_HOST, http_proxy_port=HTTP_PROXY_PORT) self._given_http_client_returns_a_json_response() await self.routing.get_end_point(SERVICE_ID, ORG_CODE) expected_url = self._build_url(path=ROUTING_PATH) self._assert_http_client_called_with_expected_args(expected_url, proxy_host=HTTP_PROXY_HOST, proxy_port=HTTP_PROXY_PORT) @test_utilities.async_test async def test_should_retrieve_reliability_details_if_given_org_code(self): self.routing = routing_reliability.RoutingAndReliability(BASE_URL, SPINE_ORG_CODE) self._given_http_client_returns_a_json_response() endpoint_details = await self.routing.get_reliability(SERVICE_ID, ORG_CODE) self.assertEqual(EXPECTED_RESPONSE, endpoint_details) expected_url = self._build_url(path=RELIABILITY_PATH) self._assert_http_client_called_with_expected_args(expected_url) @test_utilities.async_test async def test_should_retrieve_reliability_details_with_default_org_code(self): self.routing = routing_reliability.RoutingAndReliability(BASE_URL, SPINE_ORG_CODE) self._given_http_client_returns_a_json_response() endpoint_details = await self.routing.get_reliability(SERVICE_ID) self.assertEqual(EXPECTED_RESPONSE, endpoint_details) expected_url = self._build_url(path=RELIABILITY_PATH, org_code=SPINE_ORG_CODE) self._assert_http_client_called_with_expected_args(expected_url) @test_utilities.async_test async def test_should_pass_through_exception_if_raised_when_retrieving_reliability_details(self): self.routing = routing_reliability.RoutingAndReliability(BASE_URL, SPINE_ORG_CODE) self.mock_http_client.fetch.side_effect = IOError("Something went wrong!") with self.assertRaises(IOError): await self.routing.get_reliability(SERVICE_ID, ORG_CODE) @test_utilities.async_test async def test_should_use_certificate_details_if_provided_when_retrieving_reliability_details(self): self.routing = routing_reliability.RoutingAndReliability(BASE_URL, SPINE_ORG_CODE, client_cert=CLIENT_CERT_PATH, client_key=CLIENT_KEY_PATH, ca_certs=CA_CERTS_PATH) self._given_http_client_returns_a_json_response() await self.routing.get_reliability(SERVICE_ID, ORG_CODE) expected_url = self._build_url(path=RELIABILITY_PATH) self._assert_http_client_called_with_expected_args(expected_url, client_cert=CLIENT_CERT_PATH, client_key=CLIENT_KEY_PATH, ca_certs=CA_CERTS_PATH) @test_utilities.async_test async def test_should_use_proxy_if_provided_when_retrieving_reliability_details(self): self.routing = routing_reliability.RoutingAndReliability(BASE_URL, SPINE_ORG_CODE, http_proxy_host=HTTP_PROXY_HOST, http_proxy_port=HTTP_PROXY_PORT) self._given_http_client_returns_a_json_response() await self.routing.get_reliability(SERVICE_ID, ORG_CODE) expected_url = self._build_url(path=RELIABILITY_PATH) self._assert_http_client_called_with_expected_args(expected_url, proxy_host=HTTP_PROXY_HOST, proxy_port=HTTP_PROXY_PORT) def _given_http_client_returns_a_json_response(self): mock_response = mock.Mock() mock_response.body = JSON_RESPONSE self.mock_http_client.fetch.return_value = test_utilities.awaitable(mock_response) def _assert_http_client_called_with_expected_args(self, expected_url, client_cert=None, client_key=None, ca_certs=None, proxy_host=None, proxy_port=None): self.mock_http_client.fetch.assert_called_with(expected_url, raise_error=True, method=HTTP_METHOD, body=None, headers=None, client_cert=client_cert, client_key=client_key, ca_certs=ca_certs, validate_cert=True, proxy_host=proxy_host, proxy_port=proxy_port) @staticmethod def _build_url(path: str, org_code: str = ORG_CODE) -> str: return BASE_URL + "/" + path + "?org-code=" + org_code + "&service-id=" + SERVICE_ID
51.357576
116
0.695893
1,011
8,474
5.328388
0.106825
0.04418
0.031186
0.040839
0.798775
0.77093
0.77093
0.757379
0.745498
0.743456
0
0.000933
0.241208
8,474
164
117
51.670732
0.836858
0.011093
0
0.548387
0
0
0.028889
0
0
0
0
0
0.129032
1
0.032258
false
0.016129
0.040323
0.008065
0.08871
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
9bb564b30dac6650236b62df0d993a1ed5c90c4b
622
py
Python
08_function/make_pizzas.py
Story5/python-crash-course
9e4e663db83ea9821c1dac83f02106eef7a9a14d
[ "Apache-2.0" ]
null
null
null
08_function/make_pizzas.py
Story5/python-crash-course
9e4e663db83ea9821c1dac83f02106eef7a9a14d
[ "Apache-2.0" ]
null
null
null
08_function/make_pizzas.py
Story5/python-crash-course
9e4e663db83ea9821c1dac83f02106eef7a9a14d
[ "Apache-2.0" ]
null
null
null
# import pizza # pizza.make_pizza(16,"pepperoni") # pizza.make_pizza(12,"mushrooms", "green pepers", "extra cheese") # 使用as给模块制定别名 # import pizza as p # p.make_pizza(16,"pepperoni") # p.make_pizza(12,"mushrooms", "green pepers", "extra cheese") # 导入特定的函数 # from pizza import make_pizza # make_pizza(16,"pepperoni") # make_pizza(12,"mushrooms", "green pepers", "extra cheese") # 使用as给函数制定别名 # from pizza import make_pizza as mp # mp(16,"pepperoni") # mp(12,"mushrooms", "green pepers", "extra cheese") # 导入模块中所有函数 from pizza import * make_pizza(16,"pepperoni") make_pizza(12,"mushrooms", "green pepers", "extra cheese")
27.043478
66
0.720257
87
622
5.034483
0.218391
0.205479
0.182648
0.251142
0.751142
0.550228
0.474886
0.474886
0.283105
0.283105
0
0.03643
0.117363
622
23
67
27.043478
0.761384
0.771704
0
0
0
0
0.333333
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
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
1
0
0
0
0
5
9bbe56100615b5f14e542820637f37d11bb43820
88
py
Python
skill/admin.py
lazypunky/makeportfolio
010ed282d5b954e16b225d8c61737a0e744aaef1
[ "MIT" ]
null
null
null
skill/admin.py
lazypunky/makeportfolio
010ed282d5b954e16b225d8c61737a0e744aaef1
[ "MIT" ]
null
null
null
skill/admin.py
lazypunky/makeportfolio
010ed282d5b954e16b225d8c61737a0e744aaef1
[ "MIT" ]
1
2020-09-15T09:30:13.000Z
2020-09-15T09:30:13.000Z
from django.contrib import admin from .models import Skill admin.site.register(Skill)
14.666667
32
0.806818
13
88
5.461538
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.125
88
5
33
17.6
0.922078
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
9bbfd9dde6ea66cbdc97f32cd58dcf0bd1a4e784
5,695
py
Python
practice/codewars/codewars_py/spec/sixkyu/test_packet_delivery_enforcing_constrains.py
lonelyhentai/workspace
2a996af58d6b9be5d608ed040267398bcf72403b
[ "MIT" ]
2
2021-04-26T16:37:38.000Z
2022-03-15T01:26:19.000Z
practice/codewars/codewars_py/spec/sixkyu/test_packet_delivery_enforcing_constrains.py
lonelyhentai/workspace
2a996af58d6b9be5d608ed040267398bcf72403b
[ "MIT" ]
null
null
null
practice/codewars/codewars_py/spec/sixkyu/test_packet_delivery_enforcing_constrains.py
lonelyhentai/workspace
2a996af58d6b9be5d608ed040267398bcf72403b
[ "MIT" ]
1
2022-03-15T01:26:23.000Z
2022-03-15T01:26:23.000Z
import unittest from codewars.sixkyu.packet_delivery_enforcing_constrains import Package, \ DimensionsOutOfBoundError class TestPackage(unittest.TestCase): def test_bundle(self): allowed_inputs = [ [20, 30, 10, 10], [0.2, 0.2, 0.2, 0.02], [350, 300, 150, 40], [99, 99, 99, 40] ] for inp in allowed_inputs: p = Package(*inp) self.assertEqual(p.length, inp[0]) self.assertEqual(p.width, inp[1]) self.assertEqual(p.height, inp[2]) self.assertEqual(p.weight, inp[3]) inputs = (0.2, 0.2, 0.2, 0.2) p = Package(*inputs) p.length = 2 self.assertEqual(p.length, 2) p.width = 100 self.assertEqual(p.width, 100) p.height = 149 self.assertEqual(p.height, 149) p.weight = 40 self.assertEqual(p.weight, 40) inputs = (0.2, 0.2, 0.2, 0.2) p = Package(*inputs) try: p.length = -20 self.assertEqual( True, False, "Should have raised DimensionsOutOfBoundError") except DimensionsOutOfBoundError as e: self.assertEqual( str(e), "Package length==-20 out of bounds, should be: 0 < length <= 350") try: p.length = 2000 self.assertEqual( True, False, "Should have raised DimensionsOutOfBoundError") except DimensionsOutOfBoundError as e: self.assertEqual( str(e), "Package length==2000 out of bounds, should be: 0 < length <= 350") try: p.width = -20 self.assertEqual( True, False, "Should have raised DimensionsOutOfBoundError") except DimensionsOutOfBoundError as e: self.assertEqual( str(e), "Package width==-20 out of bounds, should be: 0 < width <= 300") try: p.width = 2000 self.assertEqual( True, False, "Should have raised DimensionsOutOfBoundError") except DimensionsOutOfBoundError as e: self.assertEqual( str(e), "Package width==2000 out of bounds, should be: 0 < width <= 300") try: p.height = -20 self.assertEqual( True, False, "Should have raised DimensionsOutOfBoundError") except DimensionsOutOfBoundError as e: self.assertEqual( str(e), "Package height==-20 out of bounds, should be: 0 < height <= 150") try: p.height = 2000 self.assertEqual( True, False, "Should have raised DimensionsOutOfBoundError") except DimensionsOutOfBoundError as e: self.assertEqual( str(e), "Package height==2000 out of bounds, should be: 0 < height <= 150") try: p.weight = -20 self.assertEqual( True, False, "Should have raised DimensionsOutOfBoundError") except DimensionsOutOfBoundError as e: self.assertEqual( str(e), "Package weight==-20 out of bounds, should be: 0 < weight <= 40") try: p.weight = 2000 self.assertEqual( True, False, "Should have raised DimensionsOutOfBoundError") except DimensionsOutOfBoundError as e: self.assertEqual( str(e), "Package weight==2000 out of bounds, should be: 0 < weight <= 40") try: p = Package(*[-20, 30, 10, 10]) self.assertEqual( True, False, "Should have raised DimensionsOutOfBoundError") except DimensionsOutOfBoundError as e: self.assertEqual( str(e), "Package length==-20 out of bounds, should be: 0 < length <= 350") try: p = Package(*[351, 30, 10, 10]) self.assertEqual( True, False, "Should have raised DimensionsOutOfBoundError") except DimensionsOutOfBoundError as e: self.assertEqual( str(e), "Package length==351 out of bounds, should be: 0 < length <= 350") try: p = Package(*[20, -30, 10, 10]) self.assertEqual( True, False, "Should have raised DimensionsOutOfBoundError") except DimensionsOutOfBoundError as e: self.assertEqual(str(e), "Package width==-30 out of bounds, should be: " "0 < width <= 300") try: p = Package(*[20, 301, 10, 10]) self.assertEqual( True, False, "Should have raised DimensionsOutOfBoundError") except DimensionsOutOfBoundError as e: self.assertEqual(str(e), "Package width==301 out of bounds, should be: " "0 < width <= 300") try: p = Package(*[20, 30, -10, 10]) self.assertEqual( True, False, "Should have raised DimensionsOutOfBoundError") except DimensionsOutOfBoundError as e: self.assertEqual( str(e), "Package height==-10 out of bounds, should be: 0 < height <= 150") try: p = Package(*[20, 10, 151, 10]) self.assertEqual( True, False, "Should have raised DimensionsOutOfBoundError") except DimensionsOutOfBoundError as e: self.assertEqual( str(e), "Package height==151 out of bounds, should be: 0 < height <= 150") p = Package(10, 12, 13, 20) self.assertEqual(p.volume, 10 * 12 * 13) p.length = 24 self.assertEqual(p.volume, 24 * 12 * 13)
37.467105
91
0.544162
605
5,695
5.112397
0.109091
0.184287
0.086001
0.108632
0.797931
0.797931
0.797931
0.788555
0.779179
0.779179
0
0.071837
0.354697
5,695
151
92
37.715232
0.769796
0
0
0.580153
0
0
0.261984
0.061457
0
0
0
0
0.290076
1
0.007634
false
0
0.015267
0
0.030534
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
32db6bdbf550cdac5304aa296ae7d5e5091abff3
126
py
Python
lsystem/model/__init__.py
A-Bak/l-system
b8e60feb0c68c4d99b5e5aa64c2cc985f86d03d2
[ "MIT" ]
null
null
null
lsystem/model/__init__.py
A-Bak/l-system
b8e60feb0c68c4d99b5e5aa64c2cc985f86d03d2
[ "MIT" ]
null
null
null
lsystem/model/__init__.py
A-Bak/l-system
b8e60feb0c68c4d99b5e5aa64c2cc985f86d03d2
[ "MIT" ]
null
null
null
from . import alphabet from . import grammar from . import rule from . import ruleset from . import symbol from . import word
18
22
0.761905
18
126
5.333333
0.444444
0.625
0
0
0
0
0
0
0
0
0
0
0.190476
126
6
23
21
0.941176
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
32e0e52867529526c7c9739a75f6946197385142
124
py
Python
ex012.py
noahbarros/Python-Exercises
fafda898473bc984280e201ed11d8ad76cc8624a
[ "MIT" ]
1
2021-07-13T21:41:00.000Z
2021-07-13T21:41:00.000Z
ex012.py
noahbarros/Python-Exercises
fafda898473bc984280e201ed11d8ad76cc8624a
[ "MIT" ]
null
null
null
ex012.py
noahbarros/Python-Exercises
fafda898473bc984280e201ed11d8ad76cc8624a
[ "MIT" ]
null
null
null
p = float(input('Digite o preço do produto: R$')) print(f'Recebendo 5% de desconto, o valor total fica: {p-(p*5/100):.2f}')
62
73
0.66129
24
124
3.416667
0.833333
0
0
0
0
0
0
0
0
0
0
0.056075
0.137097
124
2
73
62
0.71028
0
0
0
0
0.5
0.741935
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
fd06d9d777f1c97a71db8f4b66602af9cba0599a
48,043
py
Python
appengine/findit/test/findit_api_test.py
asdfghjjklllllaaa/infra
8f63af54e46194cd29291813f2790ff6e986804d
[ "BSD-3-Clause" ]
1
2020-11-11T06:25:13.000Z
2020-11-11T06:25:13.000Z
appengine/findit/test/findit_api_test.py
asdfghjjklllllaaa/infra
8f63af54e46194cd29291813f2790ff6e986804d
[ "BSD-3-Clause" ]
21
2020-09-06T02:41:05.000Z
2022-03-02T04:40:01.000Z
appengine/findit/test/findit_api_test.py
asdfghjjklllllaaa/infra
8f63af54e46194cd29291813f2790ff6e986804d
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import logging import mock import pickle import re from google.appengine.api import taskqueue import webtest from testing_utils import testing from common import exceptions from common.waterfall import failure_type import endpoint_api from findit_v2.model.messages import findit_result from gae_libs import appengine_util from libs import analysis_status from model import analysis_approach_type from model.base_build_model import BaseBuildModel from model.base_suspected_cl import RevertCL from model.wf_analysis import WfAnalysis from model.wf_suspected_cl import WfSuspectedCL from model.wf_swarming_task import WfSwarmingTask from model.wf_try_job import WfTryJob from waterfall import suspected_cl_util from waterfall import waterfall_config # pylint:disable=unused-argument, unused-variable # https://crbug.com/947753 class FinditApiTest(testing.EndpointsTestCase): api_service_cls = endpoint_api.FindItApi def setUp(self): super(FinditApiTest, self).setUp() self.taskqueue_requests = [] def Mocked_taskqueue_add(**kwargs): self.taskqueue_requests.append(kwargs) self.mock(taskqueue, 'add', Mocked_taskqueue_add) def _MockMasterIsSupported(self, supported): def MockMasterIsSupported(*_): return supported self.mock(waterfall_config, 'MasterIsSupported', MockMasterIsSupported) @mock.patch.object( endpoint_api.acl, 'ValidateOauthUserForNewAnalysis', side_effect=exceptions.UnauthorizedException) def testValidateOauthUserForAuthorizedUser(self, _): with self.assertRaises(endpoint_api.endpoints.UnauthorizedException): endpoint_api._ValidateOauthUser() @mock.patch.object( endpoint_api, '_ValidateOauthUser', return_value=('email', False)) def testUnrecognizedMasterUrl(self, _): builds = { 'builds': [{ 'master_url': 'https://not a master url', 'builder_name': 'a', 'build_number': 1 }] } expected_results = [] self._MockMasterIsSupported(supported=True) response = self.call_api('AnalyzeBuildFailures', body=builds) self.assertEqual(200, response.status_int) self.assertEqual(expected_results, response.json_body.get('results', [])) @mock.patch.object( endpoint_api, '_ValidateOauthUser', return_value=('email', False)) def testMasterIsNotSupported(self, _): builds = { 'builds': [{ 'master_url': 'https://build.chromium.org/p/a', 'builder_name': 'a', 'build_number': 1 }] } expected_results = [] self._MockMasterIsSupported(supported=False) response = self.call_api('AnalyzeBuildFailures', body=builds) self.assertEqual(200, response.status_int) self.assertEqual(expected_results, response.json_body.get('results', [])) @mock.patch.object( endpoint_api, '_ValidateOauthUser', return_value=('email', False)) def testNothingIsReturnedWhenNoAnalysisWasRun(self, _): master_name = 'm' builder_name = 'b' build_number = 1 master_url = 'https://build.chromium.org/p/%s' % master_name builds = { 'builds': [{ 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number }] } expected_result = [] self._MockMasterIsSupported(supported=True) response = self.call_api('AnalyzeBuildFailures', body=builds) self.assertEqual(200, response.status_int) self.assertEqual(expected_result, response.json_body.get('results', [])) @mock.patch.object( endpoint_api, '_ValidateOauthUser', return_value=('email', False)) @mock.patch.object(appengine_util, 'IsStaging', return_Value=True) @mock.patch.object(endpoint_api, '_AsyncProcessFailureAnalysisRequests') def testNoAnalysisTriggeredOnStaging(self, mock_trigger_analysis, *_): master_name = 'm' builder_name = 'b' build_number = 2 master_url = 'https://build.chromium.org/p/%s' % master_name builds = { 'builds': [{ 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number }] } analysis = WfAnalysis.Create(master_name, builder_name, build_number) analysis.status = analysis_status.COMPLETED analysis.result = { 'failures': [{ 'step_name': 'test', 'first_failure': 3, 'last_pass': 1, 'supported': True, 'suspected_cls': [{ 'repo_name': 'chromium', 'revision': 'git_hash', 'commit_position': 123, }] }] } analysis.put() expected_result = [] self._MockMasterIsSupported(supported=True) response = self.call_api('AnalyzeBuildFailures', body=builds) self.assertEqual(200, response.status_int) self.assertEqual(expected_result, response.json_body.get('results', [])) self.assertFalse(mock_trigger_analysis.called) @mock.patch.object( endpoint_api, '_ValidateOauthUser', return_value=('email', False)) def testFailedAnalysisIsNotReturnedEvenWhenItHasResults(self, _): master_name = 'm' builder_name = 'b' build_number = 5 master_url = 'https://build.chromium.org/p/%s' % master_name builds = { 'builds': [{ 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number }] } analysis = WfAnalysis.Create(master_name, builder_name, build_number) analysis.status = analysis_status.ERROR analysis.result = { 'failures': [{ 'step_name': 'test', 'first_failure': 3, 'last_pass': 1, 'supported': True, 'suspected_cls': [{ 'repo_name': 'chromium', 'revision': 'git_hash', 'commit_position': 123, }] }] } analysis.put() expected_result = [] self._MockMasterIsSupported(supported=True) response = self.call_api('AnalyzeBuildFailures', body=builds) self.assertEqual(200, response.status_int) self.assertEqual(expected_result, response.json_body.get('results', [])) @mock.patch.object( endpoint_api, '_ValidateOauthUser', return_value=('email', False)) def testResultIsReturnedWhenNoAnalysisIsCompleted(self, _): master_name = 'm' builder_name = 'b' build_number = 3 master_url = 'https://build.chromium.org/p/%s' % master_name builds = { 'builds': [{ 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number }] } analysis = WfAnalysis.Create(master_name, builder_name, build_number) analysis.status = analysis_status.RUNNING analysis.result = None analysis.put() expected_result = [] self._MockMasterIsSupported(supported=True) response = self.call_api('AnalyzeBuildFailures', body=builds) self.assertEqual(200, response.status_int) self.assertEqual(expected_result, response.json_body.get('results', [])) @mock.patch.object( endpoint_api, '_ValidateOauthUser', return_value=('email', False)) def testPreviousAnalysisResultIsReturnedWhileANewAnalysisIsRunning(self, _): master_name = 'm' builder_name = 'b' build_number = 4 master_url = 'https://build.chromium.org/p/%s' % master_name builds = { 'builds': [{ 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number, 'failed_steps': ['a', 'b'] }] } self._MockMasterIsSupported(supported=True) analysis_result = { 'failures': [{ 'step_name': 'a', 'first_failure': 23, 'last_pass': 22, 'supported': True, 'suspected_cls': [{ 'repo_name': 'chromium', 'revision': 'git_hash', 'commit_position': 123, }] }] } expected_results = [ { 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number, 'step_name': 'a', 'is_sub_test': False, 'first_known_failed_build_number': 23, 'suspected_cls': [{ 'repo_name': 'chromium', 'revision': 'git_hash', 'commit_position': 123, 'analysis_approach': 'HEURISTIC' }], 'analysis_approach': 'HEURISTIC', 'try_job_status': 'FINISHED', 'is_flaky_test': False, 'has_findings': True, 'is_finished': True, 'is_supported': True, }, { 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number, 'step_name': 'b', 'is_sub_test': False, 'analysis_approach': 'HEURISTIC', 'is_flaky_test': False, 'has_findings': False, 'is_finished': False, 'is_supported': True, }, ] analysis = WfAnalysis.Create(master_name, builder_name, build_number) analysis.status = analysis_status.RUNNING analysis.result = analysis_result analysis.put() response = self.call_api('AnalyzeBuildFailures', body=builds) self.assertEqual(200, response.status_int) self.assertEqual( sorted(expected_results), sorted(response.json_body['results'])) @mock.patch.object( endpoint_api, '_ValidateOauthUser', return_value=('email', False)) def testAnalysisFindingNoSuspectedCLsIsNotReturned(self, _): master_name = 'm' builder_name = 'b' build_number = 6 master_url = 'https://build.chromium.org/p/%s' % master_name builds = { 'builds': [{ 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number, 'failed_steps': ['test'] }] } analysis = WfAnalysis.Create(master_name, builder_name, build_number) analysis.status = analysis_status.COMPLETED analysis.result = { 'failures': [{ 'step_name': 'test', 'first_failure': 3, 'last_pass': 1, 'supported': True, 'suspected_cls': [] }] } analysis.put() expected_result = [{ 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number, 'step_name': 'test', 'is_sub_test': False, 'first_known_failed_build_number': 3, 'analysis_approach': 'HEURISTIC', 'try_job_status': 'FINISHED', 'is_flaky_test': False, 'has_findings': False, 'is_finished': True, 'is_supported': True, }] self._MockMasterIsSupported(supported=True) response = self.call_api('AnalyzeBuildFailures', body=builds) self.assertEqual(200, response.status_int) self.assertEqual(expected_result, response.json_body.get('results', [])) @mock.patch.object( endpoint_api, '_ValidateOauthUser', return_value=('email', False)) def testAnalysisFindingSuspectedCLsIsReturned(self, _): master_name = 'm' builder_name = 'b' build_number = 7 master_url = 'https://build.chromium.org/p/%s' % master_name builds = { 'builds': [{ 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number }] } analysis = WfAnalysis.Create(master_name, builder_name, build_number) analysis.status = analysis_status.COMPLETED analysis.result = { 'failures': [{ 'step_name': 'test', 'first_failure': 3, 'last_pass': 1, 'supported': True, 'suspected_cls': [{ 'build_number': 2, 'repo_name': 'chromium', 'revision': 'git_hash1', 'commit_position': 234, 'score': 11, 'hints': { 'add a/b/x.cc': 5, 'delete a/b/y.cc': 5, 'modify e/f/z.cc': 1, } }, { 'build_number': 3, 'repo_name': 'chromium', 'revision': 'git_hash2', 'commit_position': 288, 'score': 1, 'hints': { 'modify d/e/f.cc': 1, } }] }] } analysis.put() expected_results = [{ 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number, 'step_name': 'test', 'is_sub_test': False, 'first_known_failed_build_number': 3, 'suspected_cls': [{ 'repo_name': 'chromium', 'revision': 'git_hash1', 'commit_position': 234, 'analysis_approach': 'HEURISTIC' }, { 'repo_name': 'chromium', 'revision': 'git_hash2', 'commit_position': 288, 'analysis_approach': 'HEURISTIC' }], 'analysis_approach': 'HEURISTIC', 'is_flaky_test': False, 'try_job_status': 'FINISHED', 'has_findings': True, 'is_finished': True, 'is_supported': True, }] self._MockMasterIsSupported(supported=True) response = self.call_api('AnalyzeBuildFailures', body=builds) self.assertEqual(200, response.status_int) self.assertEqual(expected_results, response.json_body.get('results')) @mock.patch.object( endpoint_api, '_ValidateOauthUser', return_value=('email', False)) def testTryJobResultReturnedForCompileFailure(self, _): master_name = 'm' builder_name = 'b' build_number = 8 master_url = 'https://build.chromium.org/p/%s' % master_name builds = { 'builds': [{ 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number, 'failed_steps': ['compile'] }] } try_job = WfTryJob.Create(master_name, builder_name, 3) try_job.status = analysis_status.COMPLETED try_job.compile_results = [{ 'culprit': { 'compile': { 'repo_name': 'chromium', 'revision': 'r3', 'commit_position': 3, 'url': None, }, }, }] try_job.put() analysis = WfAnalysis.Create(master_name, builder_name, build_number) analysis.status = analysis_status.COMPLETED analysis.build_failure_type = failure_type.COMPILE analysis.failure_result_map = { 'compile': '/'.join([master_name, builder_name, '3']), } analysis.result = { 'failures': [{ 'step_name': 'compile', 'first_failure': 3, 'last_pass': 1, 'supported': True, 'suspected_cls': [{ 'build_number': 3, 'repo_name': 'chromium', 'revision': 'git_hash2', 'commit_position': 288, 'score': 1, 'hints': { 'modify d/e/f.cc': 1, } }] }] } analysis.put() culprit = WfSuspectedCL.Create('chromium', 'r3', 3) culprit.revert_submission_status = analysis_status.COMPLETED revert = RevertCL() revert.revert_cl_url = 'revert_cl_url' culprit.revert_cl = revert culprit.put() expected_results = [{ 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number, 'step_name': 'compile', 'is_sub_test': False, 'first_known_failed_build_number': 3, 'suspected_cls': [{ 'repo_name': 'chromium', 'revision': 'r3', 'commit_position': 3, 'analysis_approach': 'TRY_JOB', 'revert_cl_url': 'revert_cl_url', 'revert_committed': True },], 'analysis_approach': 'TRY_JOB', 'is_flaky_test': False, 'try_job_status': 'FINISHED', 'has_findings': True, 'is_finished': True, 'is_supported': True, }] self._MockMasterIsSupported(supported=True) response = self.call_api('AnalyzeBuildFailures', body=builds) self.assertEqual(200, response.status_int) self.assertEqual(expected_results, response.json_body.get('results')) @mock.patch.object( endpoint_api, '_ValidateOauthUser', return_value=('email', False)) def testTryJobIsRunning(self, _): master_name = 'm' builder_name = 'b' build_number = 9 master_url = 'https://build.chromium.org/p/%s' % master_name builds = { 'builds': [{ 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number, 'failed_steps': ['compile'] }] } try_job = WfTryJob.Create(master_name, builder_name, 3) try_job.status = analysis_status.RUNNING try_job.put() analysis = WfAnalysis.Create(master_name, builder_name, build_number) analysis.status = analysis_status.COMPLETED analysis.build_failure_type = failure_type.COMPILE analysis.failure_result_map = { 'compile': '/'.join([master_name, builder_name, '3']), } analysis.result = { 'failures': [{ 'step_name': 'compile', 'first_failure': 3, 'last_pass': 1, 'supported': True, 'suspected_cls': [{ 'build_number': 3, 'repo_name': 'chromium', 'revision': 'git_hash2', 'commit_position': 288, 'score': 1, 'hints': { 'modify d/e/f.cc': 1, } }] }] } analysis.put() expected_results = [{ 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number, 'step_name': 'compile', 'is_sub_test': False, 'first_known_failed_build_number': 3, 'suspected_cls': [{ 'repo_name': 'chromium', 'revision': 'git_hash2', 'commit_position': 288, 'analysis_approach': 'HEURISTIC' },], 'analysis_approach': 'HEURISTIC', 'is_flaky_test': False, 'try_job_status': 'RUNNING', 'has_findings': True, 'is_finished': False, 'is_supported': True, }] self._MockMasterIsSupported(supported=True) response = self.call_api('AnalyzeBuildFailures', body=builds) self.assertEqual(200, response.status_int) self.assertEqual(expected_results, response.json_body.get('results')) @mock.patch.object( endpoint_api, '_ValidateOauthUser', return_value=('email', False)) def testTestIsFlaky(self, _): master_name = 'm' builder_name = 'b' build_number = 10 master_url = 'https://build.chromium.org/p/%s' % master_name builds = { 'builds': [{ 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number, 'failed_steps': ['b on platform'] }] } task = WfSwarmingTask.Create(master_name, builder_name, 3, 'b on platform') task.tests_statuses = { 'Unittest3.Subtest1': { 'total_run': 4, 'SUCCESS': 2, 'FAILURE': 2 }, 'Unittest3.Subtest2': { 'total_run': 4, 'SUCCESS': 2, 'FAILURE': 2 } } task.put() analysis = WfAnalysis.Create(master_name, builder_name, build_number) analysis.status = analysis_status.COMPLETED analysis.failure_result_map = { 'b on platform': { 'Unittest3.Subtest1': '/'.join([master_name, builder_name, '3']), 'Unittest3.Subtest2': '/'.join([master_name, builder_name, '3']), }, } analysis.result = { 'failures': [{ 'step_name': 'b on platform', 'first_failure': 3, 'last_pass': 2, 'supported': True, 'suspected_cls': [], 'tests': [{ 'test_name': 'Unittest3.Subtest1', 'first_failure': 3, 'last_pass': 2, 'suspected_cls': [] }, { 'test_name': 'Unittest3.Subtest2', 'first_failure': 3, 'last_pass': 2, 'suspected_cls': [] }] }] } analysis.put() expected_results = [{ 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number, 'step_name': 'b on platform', 'is_sub_test': True, 'test_name': 'Unittest3.Subtest1', 'first_known_failed_build_number': 3, 'analysis_approach': 'HEURISTIC', 'is_flaky_test': True, 'try_job_status': 'FINISHED', 'has_findings': True, 'is_finished': True, 'is_supported': True, }, { 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number, 'step_name': 'b on platform', 'is_sub_test': True, 'test_name': 'Unittest3.Subtest2', 'first_known_failed_build_number': 3, 'analysis_approach': 'HEURISTIC', 'is_flaky_test': True, 'try_job_status': 'FINISHED', 'has_findings': True, 'is_finished': True, 'is_supported': True, }] self._MockMasterIsSupported(supported=True) response = self.call_api('AnalyzeBuildFailures', body=builds) self.assertEqual(200, response.status_int) self.assertEqual(expected_results, response.json_body.get('results')) @mock.patch.object( endpoint_api, '_ValidateOauthUser', return_value=('email', False)) @mock.patch.object(suspected_cl_util, 'GetSuspectedCLConfidenceScoreAndApproach') def testTestLevelResultIsReturned(self, mock_fn, _): master_name = 'm' builder_name = 'b' build_number = 11 master_url = 'https://build.chromium.org/p/%s' % master_name builds = { 'builds': [{ 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number, 'failed_steps': ['a', 'b on platform'] }] } task = WfSwarmingTask.Create(master_name, builder_name, 4, 'b on platform') task.parameters['ref_name'] = 'b' task.status = analysis_status.COMPLETED task.put() try_job = WfTryJob.Create(master_name, builder_name, 4) try_job.status = analysis_status.COMPLETED try_job.test_results = [{ 'culprit': { 'a': { 'repo_name': 'chromium', 'revision': 'r4_2', 'commit_position': 42, 'url': None, }, 'b': { 'tests': { 'Unittest3.Subtest1': { 'repo_name': 'chromium', 'revision': 'r4_10', 'commit_position': 410, 'url': None, }, } } }, }] try_job.put() analysis = WfAnalysis.Create(master_name, builder_name, build_number) analysis.status = analysis_status.COMPLETED analysis.failure_result_map = { 'a': '/'.join([master_name, builder_name, '4']), 'b on platform': { 'Unittest1.Subtest1': '/'.join([master_name, builder_name, '3']), 'Unittest2.Subtest1': '/'.join([master_name, builder_name, '4']), 'Unittest3.Subtest1': '/'.join([master_name, builder_name, '4']), }, } analysis.result = { 'failures': [ { 'step_name': 'a', 'first_failure': 4, 'last_pass': 3, 'supported': True, 'suspected_cls': [{ 'build_number': 4, 'repo_name': 'chromium', 'revision': 'r4_2_failed', 'commit_position': None, 'url': None, 'score': 2, 'hints': { 'modified f4_2.cc (and it was in log)': 2, }, }], }, { 'step_name': 'b on platform', 'first_failure': 3, 'last_pass': 2, 'supported': True, 'suspected_cls': [ { 'build_number': 3, 'repo_name': 'chromium', 'revision': 'r3_1', 'commit_position': None, 'url': None, 'score': 5, 'hints': { 'added x/y/f3_1.cc (and it was in log)': 5, }, }, { 'build_number': 4, 'repo_name': 'chromium', 'revision': 'r4_1', 'commit_position': None, 'url': None, 'score': 2, 'hints': { 'modified f4.cc (and it was in log)': 2, }, } ], 'tests': [ { 'test_name': 'Unittest1.Subtest1', 'first_failure': 3, 'last_pass': 2, 'suspected_cls': [{ 'build_number': 2, 'repo_name': 'chromium', 'revision': 'r2_1', 'commit_position': None, 'url': None, 'score': 5, 'hints': { 'added x/y/f99_1.cc (and it was in log)': 5, }, }] }, { 'test_name': 'Unittest2.Subtest1', 'first_failure': 4, 'last_pass': 2, 'suspected_cls': [{ 'build_number': 2, 'repo_name': 'chromium', 'revision': 'r2_1', 'commit_position': None, 'url': None, 'score': 5, 'hints': { 'added x/y/f99_1.cc (and it was in log)': 5, }, }] }, { 'test_name': 'Unittest3.Subtest1', 'first_failure': 4, 'last_pass': 2, 'suspected_cls': [] } ] }, { 'step_name': 'c', 'first_failure': 4, 'last_pass': 3, 'supported': False, 'suspected_cls': [], } ] } analysis.put() suspected_cl_42 = WfSuspectedCL.Create('chromium', 'r4_2', 42) suspected_cl_42.builds = { BaseBuildModel.CreateBuildKey(master_name, builder_name, 5): { 'approaches': [analysis_approach_type.TRY_JOB] } } suspected_cl_42.put() suspected_cl_21 = WfSuspectedCL.Create('chromium', 'r2_1', None) suspected_cl_21.builds = { BaseBuildModel.CreateBuildKey(master_name, builder_name, 3): { 'approaches': [analysis_approach_type.HEURISTIC], 'top_score': 5 }, BaseBuildModel.CreateBuildKey(master_name, builder_name, 4): { 'approaches': [analysis_approach_type.HEURISTIC], 'top_score': 5 }, BaseBuildModel.CreateBuildKey(master_name, builder_name, build_number): { 'approaches': [analysis_approach_type.HEURISTIC], 'top_score': 5 } } suspected_cl_21.put() suspected_cl_410 = WfSuspectedCL.Create('chromium', 'r4_10', None) suspected_cl_410.builds = { BaseBuildModel.CreateBuildKey(master_name, builder_name, 4): { 'approaches': [ analysis_approach_type.HEURISTIC, analysis_approach_type.TRY_JOB ], 'top_score': 5 }, BaseBuildModel.CreateBuildKey(master_name, builder_name, build_number): { 'approaches': [analysis_approach_type.HEURISTIC], 'top_score': 5 } } revert_cl = RevertCL() revert_cl.revert_cl_url = 'revert_cl_url' suspected_cl_410.revert_cl = revert_cl suspected_cl_410.put() def confidence_side_effect(_, build_info, first_build_info): if (first_build_info and first_build_info.get('approaches') == [ analysis_approach_type.HEURISTIC, analysis_approach_type.TRY_JOB ]): return 100, analysis_approach_type.TRY_JOB if build_info and build_info.get('top_score'): return 90, analysis_approach_type.HEURISTIC return 98, analysis_approach_type.TRY_JOB mock_fn.side_effect = confidence_side_effect expected_results = [{ 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number, 'step_name': 'a', 'is_sub_test': False, 'first_known_failed_build_number': 4, 'suspected_cls': [{ 'repo_name': 'chromium', 'revision': 'r4_2', 'commit_position': 42, 'confidence': 98, 'analysis_approach': 'TRY_JOB', 'revert_committed': False }], 'analysis_approach': 'TRY_JOB', 'is_flaky_test': False, 'try_job_status': 'FINISHED', 'has_findings': True, 'is_finished': True, 'is_supported': True, }, { 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number, 'step_name': 'b on platform', 'is_sub_test': True, 'test_name': 'Unittest1.Subtest1', 'first_known_failed_build_number': 3, 'suspected_cls': [{ 'repo_name': 'chromium', 'revision': 'r2_1', 'confidence': 90, 'analysis_approach': 'HEURISTIC', 'revert_committed': False }], 'analysis_approach': 'HEURISTIC', 'is_flaky_test': False, 'try_job_status': 'FINISHED', 'has_findings': True, 'is_finished': True, 'is_supported': True, }, { 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number, 'step_name': 'b on platform', 'is_sub_test': True, 'test_name': 'Unittest2.Subtest1', 'first_known_failed_build_number': 4, 'suspected_cls': [{ 'repo_name': 'chromium', 'revision': 'r2_1', 'confidence': 90, 'analysis_approach': 'HEURISTIC', 'revert_committed': False }], 'analysis_approach': 'HEURISTIC', 'is_flaky_test': False, 'try_job_status': 'FINISHED', 'has_findings': True, 'is_finished': True, 'is_supported': True, }, { 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number, 'step_name': 'b on platform', 'is_sub_test': True, 'test_name': 'Unittest3.Subtest1', 'first_known_failed_build_number': 4, 'suspected_cls': [{ 'repo_name': 'chromium', 'revision': 'r4_10', 'commit_position': 410, 'analysis_approach': 'TRY_JOB', 'confidence': 100, 'revert_cl_url': 'revert_cl_url', 'revert_committed': False }], 'analysis_approach': 'TRY_JOB', 'is_flaky_test': False, 'try_job_status': 'FINISHED', 'has_findings': True, 'is_finished': True, 'is_supported': True, }, { 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number, 'step_name': 'c', 'is_sub_test': False, 'analysis_approach': 'HEURISTIC', 'is_flaky_test': False, 'has_findings': False, 'is_finished': True, 'is_supported': False, }] self._MockMasterIsSupported(supported=True) response = self.call_api('AnalyzeBuildFailures', body=builds) self.assertEqual(200, response.status_int) self.assertItemsEqual(expected_results, response.json_body.get('results')) @mock.patch.object( endpoint_api, '_ValidateOauthUser', return_value=('email', False)) def testAnalysisRequestQueuedAsExpected(self, _): master_name = 'm' builder_name = 'b' build_number = 12 master_url = 'https://build.chromium.org/p/%s' % master_name builds = { 'builds': [{ 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number }] } expected_result = [] self._MockMasterIsSupported(supported=True) response = self.call_api('AnalyzeBuildFailures', body=builds) self.assertEqual(200, response.status_int) self.assertEqual(expected_result, response.json_body.get('results', [])) self.assertEqual(1, len(self.taskqueue_requests)) expected_payload_json = { 'builds': [{ 'master_name': master_name, 'builder_name': builder_name, 'build_number': build_number, 'failed_steps': [], },] } self.assertEqual(expected_payload_json, json.loads(self.taskqueue_requests[0].get('payload'))) @mock.patch.object( endpoint_api, '_ValidateOauthUser', side_effect=endpoint_api.endpoints.UnauthorizedException()) @mock.patch.object(endpoint_api, 'AsyncProcessFlakeReport', return_value=None) def testUnauthorizedRequestToAnalyzeFlake(self, mocked_func, _): flake = { 'name': 'suite.test', 'is_step': False, 'bug_id': 123, 'build_steps': [{ 'master_name': 'm', 'builder_name': 'b', 'build_number': 456, 'step_name': 'name (with patch) on Windows-7-SP1', }] } self.assertRaisesRegexp( webtest.app.AppError, re.compile('.*401 Unauthorized.*', re.MULTILINE | re.DOTALL), self.call_api, 'AnalyzeFlake', body=flake) self.assertFalse(mocked_func.called) @mock.patch.object( endpoint_api, '_ValidateOauthUser', return_value=('email', False)) def testFlakeAnalysisRequestWithoutBugId(self, _): flake = { 'name': 'suite.test', 'is_step': False, 'bug_id': None, 'build_steps': [{ 'master_name': 'm', 'builder_name': 'b', 'build_number': 456, 'step_name': 'name (with patch) on Windows-7-SP1', }] } response = self.call_api('AnalyzeFlake', body=flake) self.assertEqual(200, response.status_int) self.assertTrue(response.json_body.get('queued')) self.assertEqual(1, len(self.taskqueue_requests)) @mock.patch.object( endpoint_api, '_ValidateOauthUser', return_value=('email', False)) @mock.patch.object( endpoint_api, 'AsyncProcessFlakeReport', side_effect=Exception()) def testAuthorizedRequestToAnalyzeFlakeNotQueued(self, mocked_func, _): flake = { 'name': 'suite.test', 'is_step': False, 'bug_id': 123, 'build_steps': [{ 'master_name': 'm', 'builder_name': 'b', 'build_number': 456, 'step_name': 'name (with patch) on Windows-7-SP1', }] } response = self.call_api('AnalyzeFlake', body=flake) self.assertEqual(200, response.status_int) self.assertFalse(response.json_body.get('queued')) self.assertEqual(1, mocked_func.call_count) self.assertEqual(0, len(self.taskqueue_requests)) @mock.patch.object( endpoint_api, '_ValidateOauthUser', return_value=('email', False)) def testAuthorizedRequestToAnalyzeFlakeQueued(self, _): flake = { 'name': 'suite.test', 'is_step': False, 'bug_id': 123, 'build_steps': [{ 'master_name': 'm', 'builder_name': 'b', 'build_number': 456, 'step_name': 'name (with patch) on Windows-7-SP1', }] } response = self.call_api('AnalyzeFlake', body=flake) self.assertEqual(200, response.status_int) self.assertTrue(response.json_body.get('queued')) self.assertEqual(1, len(self.taskqueue_requests)) request, user_email, is_admin = pickle.loads( self.taskqueue_requests[0]['payload']) self.assertEqual('suite.test', request.name) self.assertFalse(request.is_step) self.assertEqual(123, request.bug_id) self.assertEqual(1, len(request.build_steps)) self.assertEqual('m', request.build_steps[0].master_name) self.assertEqual('b', request.build_steps[0].builder_name) self.assertEqual(456, request.build_steps[0].build_number) self.assertEqual('name (with patch) on Windows-7-SP1', request.build_steps[0].step_name) self.assertEqual('email', user_email) self.assertFalse(is_admin) def testGetStatusAndCulpritFromTryJobSwarmingTaskIsRunning(self): swarming_task = WfSwarmingTask.Create('m', 'b', 123, 'step') swarming_task.put() status, culprit = endpoint_api.FindItApi()._GetStatusAndCulpritFromTryJob( None, swarming_task, None, 'step', None) self.assertEqual(status, endpoint_api._TryJobStatus.RUNNING) self.assertIsNone(culprit) def testGetStatusAndCulpritFromTryJobTryJobFailed(self): try_job = WfTryJob.Create('m', 'b', 123) try_job.status = analysis_status.ERROR try_job.put() status, culprit = endpoint_api.FindItApi()._GetStatusAndCulpritFromTryJob( try_job, None, None, None, None) self.assertEqual(status, endpoint_api._TryJobStatus.FINISHED) self.assertIsNone(culprit) @mock.patch.object( endpoint_api, '_ValidateOauthUser', return_value=('email', False)) def testAnalysisIsStillRunning(self, _): master_name = 'm' builder_name = 'b' build_number = 13 master_url = 'https://build.chromium.org/p/%s' % master_name builds = { 'builds': [{ 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number, 'failed_steps': ['a'] }] } self._MockMasterIsSupported(supported=True) expected_results = [{ 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number, 'step_name': 'a', 'analysis_approach': 'HEURISTIC', 'is_sub_test': False, 'is_flaky_test': False, 'has_findings': False, 'is_finished': False, 'is_supported': True, }] analysis = WfAnalysis.Create(master_name, builder_name, build_number) analysis.status = analysis_status.RUNNING analysis.result = None analysis.put() response = self.call_api('AnalyzeBuildFailures', body=builds) self.assertEqual(200, response.status_int) self.assertEqual(expected_results, response.json_body['results']) @mock.patch.object( endpoint_api, '_ValidateOauthUser', side_effect=endpoint_api.endpoints.UnauthorizedException('Unauthorized.')) @mock.patch.object(endpoint_api, '_AsyncProcessFailureAnalysisRequests') def testUserNotAuthorized(self, mocked_func, _): master_name = 'm' builder_name = 'b' build_number = 14 master_url = 'https://build.chromium.org/p/%s' % master_name builds = { 'builds': [{ 'master_url': master_url, 'builder_name': builder_name, 'build_number': build_number, 'failed_steps': ['a'] }] } self.assertRaisesRegexp( webtest.app.AppError, re.compile('.*401 Unauthorized.*', re.MULTILINE | re.DOTALL), self.call_api, 'AnalyzeBuildFailures', body=builds) self.assertFalse(mocked_func.called) @mock.patch.object(logging, 'error') def testGetSwarmingTaskAndTryJobForFailureInfoMismatch(self, mock_log): failure_result_map = {'s': {'t': 'm/b/1'}} self.assertEqual( (None, None, None), endpoint_api.FindItApi()._GetSwarmingTaskAndTryJobForFailure( 's', None, failure_result_map, None, None)) # mock_log.assert_called_once_with( # 'Try_job_key in wrong format - failure_result_map: %s; step_name: %s;' # ' test_name: %s.', json.dumps(failure_result_map, default=str), 's', # None) @mock.patch.object( endpoint_api, '_ValidateOauthUser', return_value=('email', False)) @mock.patch.object(logging, 'info') @mock.patch( 'endpoint_api.findit_v2_api.OnBuildFailureAnalysisResultRequested') def testAnalyzeLuciBuildFailures(self, mock_api, mock_logging, _): api_input = { 'requests': [ { 'build_id': 8000000000123, 'failed_steps': ['a'] }, { 'build_alternative_id': { 'project': 'chromium', 'bucket': 'ci', 'builder': 'Luci Tests', 'number': 124 }, 'failed_steps': ['compile'] }, ] } mock_api.side_effect = [ [], [ findit_result.BuildFailureAnalysisResponse( build_alternative_id=findit_result.BuildIdentifierByNumber( project='chromium', bucket='ci', builder='Luci Tests', number=124), is_finished=False, ) ] ] response = self.call_api('AnalyzeLuciBuildFailures', body=api_input) self.assertEqual(200, response.status_int) mock_logging.assert_called_once_with( '%d build failure(s), while findit_v2 can provide results for%d.', 2, 1)
32.682313
80
0.503611
4,119
48,043
5.578781
0.080845
0.053614
0.039166
0.036555
0.76992
0.753775
0.741198
0.701641
0.671787
0.635406
0
0.01539
0.385988
48,043
1,469
81
32.704561
0.763585
0.008742
0
0.731835
0
0
0.202802
0.01298
0
0
0
0
0.048689
1
0.022472
false
0.011985
0.017228
0.000749
0.044195
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
b5bc18acf42a6fd4e804260e0e5708ac4a97ae87
23
py
Python
apps/leg_nutations.py
praneethnamburi/blender-ScriptViz
95554873ecebc0aa6b151d90d2ecf952be4b8880
[ "MIT" ]
10
2020-06-12T06:39:11.000Z
2022-02-03T00:24:28.000Z
apps/leg_nutations.py
praneethnamburi/blender-ScriptViz
95554873ecebc0aa6b151d90d2ecf952be4b8880
[ "MIT" ]
null
null
null
apps/leg_nutations.py
praneethnamburi/blender-ScriptViz
95554873ecebc0aa6b151d90d2ecf952be4b8880
[ "MIT" ]
1
2021-04-13T01:55:16.000Z
2021-04-13T01:55:16.000Z
from bpn_init import *
11.5
22
0.782609
4
23
4.25
1
0
0
0
0
0
0
0
0
0
0
0
0.173913
23
1
23
23
0.894737
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
bd2ec264cd1dbd3890e0482ac171e68dcbf8c1ab
169
py
Python
python/7kyu/descending_order.py
Sigmanificient/codewars
b34df4bf55460d312b7ddf121b46a707b549387a
[ "MIT" ]
3
2021-06-08T01:57:13.000Z
2021-06-26T10:52:47.000Z
python/7kyu/descending_order.py
Sigmanificient/codewars
b34df4bf55460d312b7ddf121b46a707b549387a
[ "MIT" ]
null
null
null
python/7kyu/descending_order.py
Sigmanificient/codewars
b34df4bf55460d312b7ddf121b46a707b549387a
[ "MIT" ]
2
2021-06-10T21:20:13.000Z
2021-06-30T10:13:26.000Z
"""Kata url: https://www.codewars.com/kata/5467e4d82edf8bbf40000155.""" def descending_order(num: int) -> int: return int(''.join(sorted(str(num), reverse=True)))
28.166667
71
0.698225
22
169
5.318182
0.818182
0
0
0
0
0
0
0
0
0
0
0.105263
0.100592
169
5
72
33.8
0.664474
0.384615
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
bd4e7d5f8c2e63fac7c17f5b6807cf1e5a95d4da
174
py
Python
day-01/part-1/benterris.py
TPXP/adventofcode-2019
ee653d6bfb510d14f2c2b3efc730d328c16b3f71
[ "MIT" ]
8
2019-12-01T08:56:46.000Z
2019-12-05T21:21:12.000Z
day-01/part-1/benterris.py
TPXP/adventofcode-2019
ee653d6bfb510d14f2c2b3efc730d328c16b3f71
[ "MIT" ]
10
2019-11-25T09:56:20.000Z
2021-05-10T19:57:48.000Z
day-01/part-1/benterris.py
TPXP/adventofcode-2019
ee653d6bfb510d14f2c2b3efc730d328c16b3f71
[ "MIT" ]
5
2019-12-01T08:19:57.000Z
2020-11-23T09:50:19.000Z
from tool.runners.python import SubmissionPy class BenterrisSubmission(SubmissionPy): def run(self, s): return sum([int(int(x)/3) - 2 for x in s.split("\n")])
21.75
62
0.672414
26
174
4.5
0.846154
0
0
0
0
0
0
0
0
0
0
0.014085
0.183908
174
7
63
24.857143
0.809859
0
0
0
0
0
0.011494
0
0
0
0
0
0
1
0.25
false
0
0.25
0.25
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
1fcbcd70332f6afd870fa0b51bc70a1dfe81ed55
126
py
Python
test.py
yuanmu97/nvselector
8d53c7f0d7db11a5dc9b3bad26975b1a31b597cf
[ "MIT" ]
3
2021-05-28T01:05:44.000Z
2022-03-30T03:24:03.000Z
test.py
yuanmu97/nvselector
8d53c7f0d7db11a5dc9b3bad26975b1a31b597cf
[ "MIT" ]
null
null
null
test.py
yuanmu97/nvselector
8d53c7f0d7db11a5dc9b3bad26975b1a31b597cf
[ "MIT" ]
null
null
null
from nvselector import autoset_nvgpu import os autoset_nvgpu(metric="memory", k=2) print(os.environ["CUDA_VISIBLE_DEVICES"])
25.2
41
0.809524
19
126
5.157895
0.789474
0.244898
0
0
0
0
0
0
0
0
0
0.008621
0.079365
126
5
41
25.2
0.836207
0
0
0
0
0
0.204724
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0.25
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
1fd8209432152ceac25009a2b2d0542c8ac58fd7
205
py
Python
tests/test_domain_model.py
ndegroot/gaudi
80babc541f8097efa3aeed7d5406e8fba327727d
[ "MIT" ]
7
2018-10-31T04:30:36.000Z
2021-10-11T00:13:18.000Z
tests/test_domain_model.py
ndegroot/gaudi
80babc541f8097efa3aeed7d5406e8fba327727d
[ "MIT" ]
1
2020-12-12T22:29:17.000Z
2020-12-14T12:31:29.000Z
tests/test_domain_model.py
ndegroot/gaudi
80babc541f8097efa3aeed7d5406e8fba327727d
[ "MIT" ]
1
2020-11-22T10:52:59.000Z
2020-11-22T10:52:59.000Z
from gaudi import domain_model def test_domain_model_instance(): class MyModel: pass domain_model.DomainModel.register(MyModel) assert issubclass(MyModel, domain_model.DomainModel)
18.636364
56
0.760976
24
205
6.25
0.625
0.293333
0.293333
0
0
0
0
0
0
0
0
0
0.180488
205
10
57
20.5
0.892857
0
0
0
0
0
0
0
0
0
0
0
0.166667
1
0.166667
true
0.166667
0.166667
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
952a8a1d7169aa9a5bf04cbf4ee35d54870f3d20
182
py
Python
FreeTAKServer/model/FTSModelVariables/PointVariables.py
logikal/FreeTakServer
c0916ce65781b5c60079d6440e52db8fc6ee0467
[ "MIT" ]
27
2020-05-01T01:45:59.000Z
2020-07-03T00:17:13.000Z
FreeTAKServer/model/FTSModelVariables/PointVariables.py
logikal/FreeTakServer
c0916ce65781b5c60079d6440e52db8fc6ee0467
[ "MIT" ]
34
2020-04-26T11:25:52.000Z
2020-07-03T21:06:34.000Z
FreeTAKServer/model/FTSModelVariables/PointVariables.py
logikal/FreeTakServer
c0916ce65781b5c60079d6440e52db8fc6ee0467
[ "MIT" ]
15
2020-05-01T01:46:07.000Z
2020-07-03T12:14:04.000Z
class PointVariables: def __init__(self): self.LE = "9999999.0" self.CE = "9999999.0" self.HAE = "9999999.0" self.LON = "0" self.LAT = "0"
26
30
0.510989
23
182
3.869565
0.521739
0.224719
0.404494
0
0
0
0
0
0
0
0
0.216667
0.340659
182
7
31
26
0.525
0
0
0
0
0
0.15847
0
0
0
0
0
0
1
0.142857
false
0
0
0
0.285714
0
1
0
0
null
1
1
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
5
20f87b866f712b7db43b55768c661c1aa7f76374
96
py
Python
venv/lib/python3.8/site-packages/poetry/core/utils/helpers.py
Retraces/UkraineBot
3d5d7f8aaa58fa0cb8b98733b8808e5dfbdb8b71
[ "MIT" ]
2
2022-03-13T01:58:52.000Z
2022-03-31T06:07:54.000Z
venv/lib/python3.8/site-packages/poetry/core/utils/helpers.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
19
2021-11-20T04:09:18.000Z
2022-03-23T15:05:55.000Z
venv/lib/python3.8/site-packages/poetry/core/utils/helpers.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
null
null
null
/home/runner/.cache/pip/pool/ea/b3/14/5c6f2d450d451c7e5c935bf995edbcdd9ece752ba6fdb3ea26047bae76
96
96
0.895833
9
96
9.555556
1
0
0
0
0
0
0
0
0
0
0
0.34375
0
96
1
96
96
0.552083
0
0
0
0
0
0
0
0
1
0
0
0
0
null
null
0
0
null
null
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
null
1
0
0
0
1
0
0
0
0
0
0
0
0
5
1f00295300a854f31b590360f69a7d6f3a1566ce
105
py
Python
bootcamp/feeds/admin.py
mohammed00101/newSignet
ddde897f3d01a6d91cf679f37d1eedf7b19944e9
[ "MIT" ]
null
null
null
bootcamp/feeds/admin.py
mohammed00101/newSignet
ddde897f3d01a6d91cf679f37d1eedf7b19944e9
[ "MIT" ]
null
null
null
bootcamp/feeds/admin.py
mohammed00101/newSignet
ddde897f3d01a6d91cf679f37d1eedf7b19944e9
[ "MIT" ]
null
null
null
from django.contrib import admin from bootcamp.feeds.models import Feed admin.site.register(Feed)
17.5
39
0.780952
15
105
5.466667
0.733333
0
0
0
0
0
0
0
0
0
0
0
0.152381
105
5
40
21
0.921348
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
1f0d9330ae6af055b313ce080e95b56a628cc84f
1,965
py
Python
src/ml/returns/tests/test_manager.py
WLM1ke/PortfolioOptimizer
477430951984e9018143ce09b01ea96aa490ea40
[ "Unlicense" ]
7
2018-04-06T07:51:31.000Z
2018-11-02T02:43:37.000Z
src/ml/returns/tests/test_manager.py
WLM1ke/poptimizer_old
477430951984e9018143ce09b01ea96aa490ea40
[ "Unlicense" ]
58
2018-02-23T08:31:33.000Z
2018-06-01T14:21:27.000Z
src/ml/returns/tests/test_manager.py
WLM1ke/PortfolioOptimizer
477430951984e9018143ce09b01ea96aa490ea40
[ "Unlicense" ]
3
2018-04-06T07:51:31.000Z
2018-11-02T02:43:22.000Z
import copy import pandas as pd import pytest from ml.returns import manager, model def test_new_manager(): positions = ('LSRG', 'VSMO', 'AKRN', 'GCHE', 'MTSS') date = pd.Timestamp('2018-10-12') data = manager.ReturnsMLDataManager(positions, date) assert data.value.params == model.ReturnsModel(positions, date).params assert data.value.positions == positions assert data.value.date == date def test_manager_change_positions(): positions = ('LSRG', 'VSMO', 'AKRN', 'GCHE', 'MTSS') date = pd.Timestamp('2018-10-12') data = manager.ReturnsMLDataManager(positions, date) assert data.value.params == model.ReturnsModel(positions, date).params assert data.value.positions == positions assert data.value.date == date def test_manager_change_date(): positions = ('LSRG', 'VSMO', 'MSRS', 'GCHE', 'MTSS') date = pd.Timestamp('2018-10-11') data = manager.ReturnsMLDataManager(positions, date) assert data.value.params == model.ReturnsModel(positions, date).params assert data.value.positions == positions assert data.value.date == date def test_manager_change_params(monkeypatch): fake_params = copy.deepcopy(model.ReturnsModel.PARAMS) fake_params['data']['returns_lags'] += 1 monkeypatch.setattr(model.ReturnsModel, 'PARAMS', fake_params) positions = ('LSRG', 'VSMO', 'MSRS', 'GCHE', 'MTSS') date = pd.Timestamp('2018-10-11') data = manager.ReturnsMLDataManager(positions, date) assert data.value.params == model.ReturnsModel(positions, date).params assert data.value.params['data']['returns_lags'] == fake_params['data']['returns_lags'] assert data.value.positions == positions assert data.value.date == date def test_download_update(): positions = ('LSRG', 'VSMO', 'MSRS', 'GCHE', 'MTSS') date = pd.Timestamp('2018-10-11') with pytest.raises(NotImplementedError): manager.ReturnsMLDataManager(positions, date).download_update()
36.388889
91
0.701272
236
1,965
5.75
0.190678
0.0958
0.143699
0.051584
0.792926
0.714812
0.714812
0.714812
0.714812
0.714812
0
0.024654
0.15369
1,965
53
92
37.075472
0.791341
0
0
0.634146
0
0
0.103817
0
0
0
0
0
0.317073
1
0.121951
false
0
0.097561
0
0.219512
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
1f7df294160813e25451b86d8663f25901f9a819
520
py
Python
sdk/python/pulumi_rundeck/__init__.py
alexhwoods/pulumi-rundeck
779a6cf242d55e65914ab43a1f19218602c47e31
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_rundeck/__init__.py
alexhwoods/pulumi-rundeck
779a6cf242d55e65914ab43a1f19218602c47e31
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_rundeck/__init__.py
alexhwoods/pulumi-rundeck
779a6cf242d55e65914ab43a1f19218602c47e31
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** # Export this package's modules as members: from .provider import * from .rundeck_acl_policy import * from .rundeck_job import * from .rundeck_private_key import * from .rundeck_project import * from .rundeck_public_key import * from ._inputs import * from . import outputs # Make subpackages available: from . import ( config, )
27.368421
87
0.738462
75
520
5
0.666667
0.186667
0.226667
0
0
0
0
0
0
0
0
0.00232
0.171154
520
18
88
28.888889
0.867749
0.475
0
0
1
0
0
0
0
0
0
0
0
1
0
true
0
0.818182
0
0.818182
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
1f8501aa26b77465fd36e565ad009ea35bf24275
114
py
Python
venv/lib/python3.8/site-packages/jupyterlab_server/_version.py
hongcuongnguyen/SearchEngine
2cb53999aac1d41aaae3e130bd018d29c9818e60
[ "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/jupyterlab_server/_version.py
hongcuongnguyen/SearchEngine
2cb53999aac1d41aaae3e130bd018d29c9818e60
[ "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/jupyterlab_server/_version.py
hongcuongnguyen/SearchEngine
2cb53999aac1d41aaae3e130bd018d29c9818e60
[ "MIT" ]
null
null
null
version_info = (2, 4, 0) __version__ = '.'.join(map(str, version_info[:3])) + ''.join(map(str, version_info[3:]))
38
88
0.631579
18
114
3.611111
0.5
0.507692
0.307692
0.523077
0.676923
0.676923
0
0
0
0
0
0.04902
0.105263
114
2
89
57
0.588235
0
0
0
0
0
0.008772
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
2f7f2d9d51521b360220466d1497ab38927aead3
816
py
Python
chapter/views.py
ElderMicrobe889/Opal-Health
ebe0e4c88157ddbe8e56afcc43e4097ca8c4bd49
[ "MIT" ]
null
null
null
chapter/views.py
ElderMicrobe889/Opal-Health
ebe0e4c88157ddbe8e56afcc43e4097ca8c4bd49
[ "MIT" ]
null
null
null
chapter/views.py
ElderMicrobe889/Opal-Health
ebe0e4c88157ddbe8e56afcc43e4097ca8c4bd49
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.template.loader import render_to_string from django.http import HttpResponse def chapterHome(request): return render(request, 'chapterHome.html') def programs(request): return render(request, 'education.html') def activities(request): return render(request, 'activities.html') def about(request): return render(request, 'about.html') def map(request): return render(request, 'chapterMap.html') def info(request): return render(request, 'chapterInfo.html') def chapterManifest(request): renderedManifest = render_to_string("chapter-manifest.json") return HttpResponse(renderedManifest, content_type="application/manifest+json") def paperwork(request): return render(request, "paperwork.html")
21.473684
65
0.735294
92
816
6.467391
0.358696
0.152941
0.223529
0.305882
0
0
0
0
0
0
0
0
0.160539
816
37
66
22.054054
0.868613
0
0
0
0
0
0.178922
0.056373
0
0
0
0
0
1
0.380952
false
0
0.142857
0.333333
0.904762
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
c81a501a22b9ede054b95ac42bdcd5d99b0e8037
326
py
Python
tests/unit/shared/test_free_all_vars.py
lingyunan0510/VIC
dbc00a813b5df5a88027d1dc57a7805e9a464436
[ "MIT" ]
1
2022-01-18T01:23:47.000Z
2022-01-18T01:23:47.000Z
tests/unit/shared/test_free_all_vars.py
yusheng-wang/VIC
8f6cc0661bdc67c4f6caabdd4dcd0b8782517435
[ "MIT" ]
null
null
null
tests/unit/shared/test_free_all_vars.py
yusheng-wang/VIC
8f6cc0661bdc67c4f6caabdd4dcd0b8782517435
[ "MIT" ]
null
null
null
import pytest from vic.vic import ffi from vic import lib as vic_lib # TODO: get this to work # @pytest.fixture() # def all_vars(scope='function'): # return vic_lib.make_all_vars(12) # def test_free_all_vars(): # all_vars_p = ffi.new('all_vars_struct *') # assert vic_lib.free_all_vars(all_vars_p, 12) is None
21.733333
58
0.717791
58
326
3.741379
0.5
0.225806
0.101382
0.129032
0.175115
0.175115
0
0
0
0
0
0.014815
0.171779
326
14
59
23.285714
0.788889
0.730061
0
0
0
0
0
0
0
0
0
0.071429
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
1
0
0
0
1
0
1
0
1
0
0
5
c81d3e2487e562635011b4f8d7d2673e51b7ba42
62
py
Python
user/user.py
stevej2608/dash-spa
aaf79e1df1af4f3afc2efcdc2b92a7dcaf74f673
[ "MIT" ]
27
2019-09-24T18:31:14.000Z
2022-03-01T16:44:21.000Z
user/user.py
stevej2608/dash-spa
aaf79e1df1af4f3afc2efcdc2b92a7dcaf74f673
[ "MIT" ]
1
2021-12-31T08:29:08.000Z
2022-02-18T06:49:51.000Z
user/user.py
stevej2608/dash-spa
aaf79e1df1af4f3afc2efcdc2b92a7dcaf74f673
[ "MIT" ]
4
2019-09-26T19:21:39.000Z
2022-02-12T18:51:20.000Z
from dash_spa import Blueprint blueprint = Blueprint('user')
15.5
30
0.790323
8
62
6
0.75
0.75
0
0
0
0
0
0
0
0
0
0
0.129032
62
3
31
20.666667
0.888889
0
0
0
0
0
0.064516
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
1
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
1
0
5
c8228338db508bc025868c7b9ce7b68dfcd13619
297
py
Python
lightning_transformers/core/nlp/__init__.py
maksym-taranukhin/lightning-transformers
aa7202657973b5b65c3c36eb745621043859ebc4
[ "Apache-2.0" ]
451
2021-04-21T15:53:59.000Z
2022-03-29T10:39:45.000Z
lightning_transformers/core/nlp/__init__.py
mathemusician/lightning-transformers
b2ef06113433e6a178ce4d3c9df7ede8064e247f
[ "Apache-2.0" ]
92
2021-04-21T18:42:58.000Z
2022-03-30T05:29:54.000Z
lightning_transformers/core/nlp/__init__.py
mathemusician/lightning-transformers
b2ef06113433e6a178ce4d3c9df7ede8064e247f
[ "Apache-2.0" ]
51
2021-04-22T05:35:28.000Z
2022-03-17T13:08:12.000Z
from lightning_transformers.core.nlp.config import ( # noqa: F401 HFBackboneConfig, HFTokenizerConfig, HFTransformerDataConfig, ) from lightning_transformers.core.nlp.data import HFDataModule # noqa: F401 from lightning_transformers.core.nlp.model import HFTransformer # noqa: F401
37.125
77
0.79798
32
297
7.3125
0.5
0.166667
0.320513
0.371795
0.410256
0
0
0
0
0
0
0.035019
0.13468
297
7
78
42.428571
0.875486
0.107744
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.428571
0
0.428571
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
1
0
1
0
0
0
0
5
c074d283119c068d2c094b219559b6982ff2fb3e
99
py
Python
scripts/core/utils/__init__.py
hcngdaniel/home_service_robot
18cc376097b33b5cab9efcd8f63c38a6bdc4b5c2
[ "MIT" ]
null
null
null
scripts/core/utils/__init__.py
hcngdaniel/home_service_robot
18cc376097b33b5cab9efcd8f63c38a6bdc4b5c2
[ "MIT" ]
null
null
null
scripts/core/utils/__init__.py
hcngdaniel/home_service_robot
18cc376097b33b5cab9efcd8f63c38a6bdc4b5c2
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from .PoseDict import PoseDict from .geometry import * from .PID import PID
19.8
30
0.767677
15
99
5.066667
0.6
0
0
0
0
0
0
0
0
0
0
0.011765
0.141414
99
4
31
24.75
0.882353
0.212121
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
c097217862c8d32e7615b800b583af13d056a132
173
py
Python
myapp/main/__init__.py
btkarthick/python-shopping-cart
c0d1d9b8e12af2d804253859fb9f1f190be11924
[ "MIT" ]
1
2021-09-20T22:08:18.000Z
2021-09-20T22:08:18.000Z
myapp/main/__init__.py
btkarthick/python-shopping-cart
c0d1d9b8e12af2d804253859fb9f1f190be11924
[ "MIT" ]
4
2021-06-08T20:58:44.000Z
2022-03-12T00:16:17.000Z
myapp/main/__init__.py
btkarthick/python-shopping-cart
c0d1d9b8e12af2d804253859fb9f1f190be11924
[ "MIT" ]
null
null
null
""" ****************************************** init file - to tell python that this folder is a package. Left blank for now. ****************************************** """
19.222222
43
0.34104
15
173
3.933333
1
0
0
0
0
0
0
0
0
0
0
0
0.121387
173
9
44
19.222222
0.388158
0.947977
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
1
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
238ca3ab7b7ddecfbb8a3a1cbd27811f0fa3337d
272
py
Python
src/pytest_factoryboy_state/__init__.py
hrother/pytest-factoryboy-state
66661a0f608d2174e3996a0ccb6c3a27bf35284f
[ "MIT" ]
1
2021-06-15T21:17:30.000Z
2021-06-15T21:17:30.000Z
src/pytest_factoryboy_state/__init__.py
hrother/pytest-factoryboy-state
66661a0f608d2174e3996a0ccb6c3a27bf35284f
[ "MIT" ]
2
2022-03-20T22:45:57.000Z
2022-03-21T00:06:07.000Z
src/pytest_factoryboy_state/__init__.py
hrother/pytest-factoryboy-state
66661a0f608d2174e3996a0ccb6c3a27bf35284f
[ "MIT" ]
null
null
null
from pytest_factoryboy_state.plugin import pytest_addoption from pytest_factoryboy_state.plugin import pytest_sessionstart from pytest_factoryboy_state.plugin import pytest_terminal_summary __all__ = ["pytest_addoption", "pytest_terminal_summary", "pytest_sessionstart"]
45.333333
80
0.882353
33
272
6.727273
0.333333
0.135135
0.27027
0.337838
0.581081
0.581081
0.581081
0
0
0
0
0
0.066176
272
5
81
54.4
0.874016
0
0
0
0
0
0.213235
0.084559
0
0
0
0
0
1
0
false
0
0.75
0
0.75
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
1
0
1
0
0
5
239671a05a334b60098421caa33c231f8adafc50
253
py
Python
twitter_data_analysis.py
AT1980/data-analysis
cdebece2f2aea8928b4e93743afb08259dfbd62f
[ "BSD-3-Clause" ]
null
null
null
twitter_data_analysis.py
AT1980/data-analysis
cdebece2f2aea8928b4e93743afb08259dfbd62f
[ "BSD-3-Clause" ]
null
null
null
twitter_data_analysis.py
AT1980/data-analysis
cdebece2f2aea8928b4e93743afb08259dfbd62f
[ "BSD-3-Clause" ]
null
null
null
consumer_key = 'hD98CV5uD4rFVsYuBk8xAzpLd' consumer_secret = ' 3jrN58VAI6ZuyAmicMReMdmOPjM2o0WKaBz1FWzhFQ8TfNblkS' access_token = '81300781-vHqEdU2fgJLalyrFzsRscRAgb9zEZYC9giIzQgnoZ' access_token_secret = 'uliqVE0Ofv8sWfWGu97jUHKceLpQm8Ky4waVwKO5KzV2E'
50.6
71
0.897233
14
253
15.857143
0.714286
0.099099
0
0
0
0
0
0
0
0
0
0.133333
0.051383
253
4
72
63.25
0.791667
0
0
0
0
0
0.675889
0.671937
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
23c77cbde69c7adfe048dec9d5f19da37a079ae0
33
py
Python
simple_menu/reset.py
mexclub/simple_menu
9e37b2101c74f451270ceab0f50e19457562d20a
[ "MIT" ]
null
null
null
simple_menu/reset.py
mexclub/simple_menu
9e37b2101c74f451270ceab0f50e19457562d20a
[ "MIT" ]
null
null
null
simple_menu/reset.py
mexclub/simple_menu
9e37b2101c74f451270ceab0f50e19457562d20a
[ "MIT" ]
3
2020-01-07T14:36:31.000Z
2021-01-04T15:37:30.000Z
import machine machine.reset()
11
15
0.757576
4
33
6.25
0.75
0
0
0
0
0
0
0
0
0
0
0
0.151515
33
3
16
11
0.892857
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
23db2e1c09aa6c2d371aa9249919954ddacd0f1c
43
py
Python
test2.py
ksinghnote/Dummy_projects1
cf1d85e9329a438cc84efd4f5d70d965786832f0
[ "Apache-2.0" ]
null
null
null
test2.py
ksinghnote/Dummy_projects1
cf1d85e9329a438cc84efd4f5d70d965786832f0
[ "Apache-2.0" ]
null
null
null
test2.py
ksinghnote/Dummy_projects1
cf1d85e9329a438cc84efd4f5d70d965786832f0
[ "Apache-2.0" ]
null
null
null
print("Welcome to Github") print("Hello")
10.75
26
0.697674
6
43
5
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.116279
43
3
27
14.333333
0.789474
0
0
0
0
0
0.52381
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
23e54c2df2df910d9cab102d32140b9926f7a2cf
41
py
Python
sbm/__init__.py
pmacg/pysbm
e2f6ceeb4fff903b53a4d3c05694411026a084c3
[ "MIT" ]
1
2021-09-17T12:37:34.000Z
2021-09-17T12:37:34.000Z
sbm/__init__.py
pmacg/pysbm
e2f6ceeb4fff903b53a4d3c05694411026a084c3
[ "MIT" ]
null
null
null
sbm/__init__.py
pmacg/pysbm
e2f6ceeb4fff903b53a4d3c05694411026a084c3
[ "MIT" ]
null
null
null
from sbm.stochastic_block_model import *
20.5
40
0.853659
6
41
5.5
1
0
0
0
0
0
0
0
0
0
0
0
0.097561
41
1
41
41
0.891892
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
9b0dd5ae1b8ed036648aeb778840b1114f81446e
66
py
Python
led-matrix-backend/modules/utils/converter.py
robineco/led-matrix-display
d9ef00205882cdfba9152a6aca050d31e0b516af
[ "MIT" ]
1
2022-01-13T11:48:56.000Z
2022-01-13T11:48:56.000Z
led-matrix-backend/modules/utils/converter.py
robineco/led-matrix-display
d9ef00205882cdfba9152a6aca050d31e0b516af
[ "MIT" ]
null
null
null
led-matrix-backend/modules/utils/converter.py
robineco/led-matrix-display
d9ef00205882cdfba9152a6aca050d31e0b516af
[ "MIT" ]
null
null
null
def rgb_to_hex(rgb): return '#%02x%02x%02x' % tuple(rgb)
16.5
39
0.590909
11
66
3.363636
0.636364
0.324324
0
0
0
0
0
0
0
0
0
0.117647
0.227273
66
4
40
16.5
0.607843
0
0
0
0
0
0.19697
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
5
f1f92073998e07f961d6aaa85e659cacfe9d7c5f
234
py
Python
raha/__init__.py
adrianlut/raha
027ebeaf0ac4b524dc49df94e7bbc7be4391213d
[ "Apache-2.0" ]
30
2019-07-05T12:03:45.000Z
2022-03-07T07:44:58.000Z
raha/__init__.py
adrianlut/raha
027ebeaf0ac4b524dc49df94e7bbc7be4391213d
[ "Apache-2.0" ]
1
2019-07-05T12:52:58.000Z
2019-07-23T09:49:12.000Z
raha/__init__.py
adrianlut/raha
027ebeaf0ac4b524dc49df94e7bbc7be4391213d
[ "Apache-2.0" ]
16
2019-04-21T12:28:33.000Z
2022-02-28T06:42:36.000Z
from .dataset import * from .detection import * from .correction import * from .baselines import * from .utilities import * from .benchmark import * from .tools.KATARA.katara import * from .tools.dBoost.dboost.imported_dboost import *
29.25
50
0.777778
30
234
6.033333
0.4
0.38674
0.165746
0
0
0
0
0
0
0
0
0
0.132479
234
8
50
29.25
0.891626
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
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
9e467eb55e46915e18c7f32b4c4cfdf82015197e
25
py
Python
d4pg/actors/__init__.py
yeshg/apex
90ad6529b056d34fed06e40200d55b5aa79fbb4d
[ "MIT" ]
1
2019-10-30T04:14:07.000Z
2019-10-30T04:14:07.000Z
d4pg/actors/__init__.py
yeshg/apex
90ad6529b056d34fed06e40200d55b5aa79fbb4d
[ "MIT" ]
null
null
null
d4pg/actors/__init__.py
yeshg/apex
90ad6529b056d34fed06e40200d55b5aa79fbb4d
[ "MIT" ]
null
null
null
from .test_actor import *
25
25
0.8
4
25
4.75
1
0
0
0
0
0
0
0
0
0
0
0
0.12
25
1
25
25
0.863636
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
9e490a79dbeba21d166217e7134c4eb07dfd3765
344
py
Python
pcan/models/mot/__init__.py
SysCV/pcan
06416f1c96b7a86754828582d9a95b9ce0d327ba
[ "Apache-2.0" ]
271
2021-11-24T16:57:54.000Z
2022-03-31T02:00:38.000Z
pcan/models/mot/__init__.py
msg4rajesh/pcan
5328f42349e19ff1acaccd2c776804df972b9afe
[ "Apache-2.0" ]
10
2021-11-28T10:48:13.000Z
2022-03-11T09:59:30.000Z
pcan/models/mot/__init__.py
msg4rajesh/pcan
5328f42349e19ff1acaccd2c776804df972b9afe
[ "Apache-2.0" ]
36
2021-11-25T07:43:05.000Z
2022-03-08T04:08:48.000Z
from .quasi_dense import QuasiDenseFasterRCNN from .quasi_dense_pcan import EMQuasiDenseFasterRCNN from .quasi_dense_pcan_seg import QuasiDenseMaskRCNN from .quasi_dense_pcan_seg_refine import EMQuasiDenseMaskRCNNRefine __all__ = ['QuasiDenseFasterRCNN', 'EMQuasiDenseFasterRCNN','QuasiDenseMaskRCNN', 'EMQuasiDenseMaskRCNNRefine']
43
81
0.851744
31
344
9
0.387097
0.129032
0.200717
0.193548
0.150538
0
0
0
0
0
0
0
0.09593
344
7
82
49.142857
0.897106
0
0
0
0
0
0.25
0.139535
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
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
1
0
1
0
0
5
9e70d166c2780d2f42597951094ec63f0a844b8a
84
py
Python
blockchain_charts/admin.py
1asset/assignment2-djangoapp
3db8018bdbc73c297f4f321f9429cdf549de4f2c
[ "CC0-1.0" ]
null
null
null
blockchain_charts/admin.py
1asset/assignment2-djangoapp
3db8018bdbc73c297f4f321f9429cdf549de4f2c
[ "CC0-1.0" ]
null
null
null
blockchain_charts/admin.py
1asset/assignment2-djangoapp
3db8018bdbc73c297f4f321f9429cdf549de4f2c
[ "CC0-1.0" ]
1
2022-02-11T05:56:26.000Z
2022-02-11T05:56:26.000Z
from django.contrib import admin from .models import Top admin.site.register(Top)
14
32
0.797619
13
84
5.153846
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.130952
84
5
33
16.8
0.917808
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
9e74552224ca11dd6b18ab834415b19c207239ff
140
py
Python
etc/types.py
rob-dalton/json-to-psql
3b57fafc701960344ca4c358fc19d311ca77881b
[ "MIT" ]
null
null
null
etc/types.py
rob-dalton/json-to-psql
3b57fafc701960344ca4c358fc19d311ca77881b
[ "MIT" ]
null
null
null
etc/types.py
rob-dalton/json-to-psql
3b57fafc701960344ca4c358fc19d311ca77881b
[ "MIT" ]
null
null
null
from typing import TypeVar PsycopgConnection = TypeVar('psycopg2._psycopg.connection') PsycopgCursor = TypeVar('psycopg2._psycopg.cursor')
28
59
0.821429
14
140
8.071429
0.714286
0.265487
0.389381
0
0
0
0
0
0
0
0
0.015504
0.078571
140
4
60
35
0.860465
0
0
0
0
0
0.371429
0.371429
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
9ec1fe9d08b173d88ee27e86a46c4d44f76e611b
450
py
Python
django_project/apps.py
kunalsharma05/django-project
2fb8b5a5e5583518a46d3994a8bf1c48fb531443
[ "BSD-3-Clause" ]
5
2016-03-03T23:45:04.000Z
2021-08-19T18:18:43.000Z
django_project/apps.py
kunalsharma05/django-project
2fb8b5a5e5583518a46d3994a8bf1c48fb531443
[ "BSD-3-Clause" ]
null
null
null
django_project/apps.py
kunalsharma05/django-project
2fb8b5a5e5583518a46d3994a8bf1c48fb531443
[ "BSD-3-Clause" ]
1
2016-05-26T06:12:19.000Z
2016-05-26T06:12:19.000Z
from __future__ import unicode_literals from django.apps import AppConfig # from django.contrib.auth.models import User class Django_projectConfig(AppConfig): name = 'django_project' def ready(self): from actstream import registry registry.register(self.get_model('Project')) # registry.register(self.get_model('MediaUpload')) # registry.register(self.get_model('TaskUI')) # registry.register('User')
34.615385
58
0.72
52
450
6.038462
0.5
0.203822
0.191083
0.219745
0.267516
0
0
0
0
0
0
0
0.177778
450
13
59
34.615385
0.848649
0.36
0
0
0
0
0.073944
0
0
0
0
0
0
1
0.142857
false
0
0.428571
0
0.857143
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
7b3a22ff2c400d82588a34f8c5449f16465226ea
360
py
Python
elegy/losses/__init__.py
srcolinas/elegy
f147f59572891519ab5de4357f972f56496573fb
[ "Apache-2.0" ]
null
null
null
elegy/losses/__init__.py
srcolinas/elegy
f147f59572891519ab5de4357f972f56496573fb
[ "Apache-2.0" ]
null
null
null
elegy/losses/__init__.py
srcolinas/elegy
f147f59572891519ab5de4357f972f56496573fb
[ "Apache-2.0" ]
null
null
null
from .loss import Loss, Reduction from .categorical_crossentropy import CategoricalCrossentropy from .mean_squared_error import MeanSquaredError, mean_squared_error from .sparse_categorical_crossentropy import ( SparseCategoricalCrossentropy, sparse_categorical_crossentropy, ) from .mean_absolute_error import MeanAbsoluteError, mean_absolute_error
32.727273
71
0.866667
37
360
8.081081
0.405405
0.230769
0.19398
0
0
0
0
0
0
0
0
0
0.1
360
10
72
36
0.92284
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.625
0
0.625
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
7b4d41adb155f11987a6dd16e7c726c426a011be
152
py
Python
sveske/sources/12_Testing/test_simple.py
milica325/unibl_radionica
34a753a663f9ad6a3f1031cd6755748526046376
[ "BSD-3-Clause" ]
2
2019-09-18T19:21:44.000Z
2019-09-19T00:00:25.000Z
sveske/sources/12_Testing/test_simple.py
milica325/unibl_radionica
34a753a663f9ad6a3f1031cd6755748526046376
[ "BSD-3-Clause" ]
null
null
null
sveske/sources/12_Testing/test_simple.py
milica325/unibl_radionica
34a753a663f9ad6a3f1031cd6755748526046376
[ "BSD-3-Clause" ]
34
2019-09-18T14:39:38.000Z
2019-09-20T06:45:07.000Z
"A simple set of tests" def testTrue(): "Thruth-iness test" assert True == 1 def testFalse(): "Fact-brication test" assert False == 0
15.2
25
0.625
21
152
4.52381
0.857143
0.210526
0
0
0
0
0
0
0
0
0
0.017699
0.256579
152
9
26
16.888889
0.823009
0.388158
0
0
0
0
0.375
0
0
0
0
0
0.285714
1
0.285714
true
0
0
0
0.285714
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
0
0
0
5
7ba91acd496b879dde9bf562b145d0ce8c97197b
40
py
Python
PDA/extra_assignments/2.1. Numbers_ Two digits/solution/main.py
EMbeDS-education/StatsAndComputing20212022
971e418882b206a1b5606d15d222cef1a5a04834
[ "MIT" ]
2
2022-02-24T09:35:15.000Z
2022-03-14T20:34:33.000Z
PDA/extra_assignments/2.1. Numbers_ Two digits/solution/main.py
GeorgiosArg/StatsAndComputing20212022
798d39af6aa5ef5eef49d5d6f43191351e8a49f3
[ "MIT" ]
null
null
null
PDA/extra_assignments/2.1. Numbers_ Two digits/solution/main.py
GeorgiosArg/StatsAndComputing20212022
798d39af6aa5ef5eef49d5d6f43191351e8a49f3
[ "MIT" ]
2
2022-03-15T21:40:35.000Z
2022-03-26T14:51:31.000Z
a = int(input()) print(a // 10, a % 10)
13.333333
22
0.5
8
40
2.5
0.625
0.3
0
0
0
0
0
0
0
0
0
0.129032
0.225
40
2
23
20
0.516129
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
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
c870bec0ec182275deae4b278798b3044e0b02f7
158
py
Python
BMW ConnectedDrive.indigoPlugin/Contents/Server Plugin/bimmer_connected/__init__.py
FlyingDiver/Indigo-BMW-CD
7b6d32585c12c94508cef7da9c0f263a022f63cd
[ "MIT" ]
null
null
null
BMW ConnectedDrive.indigoPlugin/Contents/Server Plugin/bimmer_connected/__init__.py
FlyingDiver/Indigo-BMW-CD
7b6d32585c12c94508cef7da9c0f263a022f63cd
[ "MIT" ]
9
2020-01-02T21:07:22.000Z
2021-05-16T21:34:27.000Z
BMW ConnectedDrive.indigoPlugin/Contents/Server Plugin/bimmer_connected/__init__.py
FlyingDiver/Indigo-BMW-CD
7b6d32585c12c94508cef7da9c0f263a022f63cd
[ "MIT" ]
null
null
null
"""Init file for bimmer_connected.""" #import pkg_resources # part of setuptools #__version__ = pkg_resources.get_distribution("bimmer_connected").version
26.333333
73
0.791139
19
158
6.105263
0.736842
0.258621
0
0
0
0
0
0
0
0
0
0
0.101266
158
5
74
31.6
0.816901
0.917722
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5