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
d986817c204d16654396919da3ac83f7ae530d0c
215
py
Python
src/super_gradients/common/factories/losses_factory.py
Deci-AI/super-gradients
658f638389654668a085e23c3b19622241fd9267
[ "Apache-2.0" ]
308
2021-12-30T10:14:30.000Z
2022-03-30T19:05:31.000Z
src/super_gradients/common/factories/losses_factory.py
Deci-AI/super-gradients
658f638389654668a085e23c3b19622241fd9267
[ "Apache-2.0" ]
24
2022-01-10T08:05:37.000Z
2022-03-30T18:49:06.000Z
src/super_gradients/common/factories/losses_factory.py
Deci-AI/super-gradients
658f638389654668a085e23c3b19622241fd9267
[ "Apache-2.0" ]
26
2021-12-31T06:04:07.000Z
2022-03-21T09:51:44.000Z
from super_gradients.common.factories.base_factory import BaseFactory from super_gradients.training.losses import LOSSES class LossesFactory(BaseFactory): def __init__(self): super().__init__(LOSSES)
23.888889
69
0.795349
25
215
6.4
0.64
0.1125
0.225
0
0
0
0
0
0
0
0
0
0.130233
215
8
70
26.875
0.855615
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.4
0
0.8
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
d9970fcb7792482227e2c0e206f241183225aa35
178
py
Python
bin/twigs/one-sided-tetratwigs-triangle-3.py
tiwo/puzzler
7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e
[ "Intel" ]
null
null
null
bin/twigs/one-sided-tetratwigs-triangle-3.py
tiwo/puzzler
7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e
[ "Intel" ]
null
null
null
bin/twigs/one-sided-tetratwigs-triangle-3.py
tiwo/puzzler
7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e
[ "Intel" ]
1
2022-01-02T16:54:14.000Z
2022-01-02T16:54:14.000Z
#!/usr/bin/env python # $Id$ """ 0 solutions. """ import puzzler from puzzler.puzzles.tetratwigs import OneSidedTetratwigsTriangle_3 puzzler.run(OneSidedTetratwigsTriangle_3)
14.833333
67
0.786517
20
178
6.9
0.75
0.391304
0
0
0
0
0
0
0
0
0
0.01875
0.101124
178
11
68
16.181818
0.84375
0.213483
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
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
79648c673b451c4532af325079fd6253e152903c
41
py
Python
ihashmap/__init__.py
C2Devel/ihashmap
d3b19357171ec7cfcd3f170de86c8e60d843f306
[ "MIT" ]
null
null
null
ihashmap/__init__.py
C2Devel/ihashmap
d3b19357171ec7cfcd3f170de86c8e60d843f306
[ "MIT" ]
1
2021-05-29T21:30:27.000Z
2021-05-29T21:30:27.000Z
ihashmap/__init__.py
C2Devel/ihashmap
d3b19357171ec7cfcd3f170de86c8e60d843f306
[ "MIT" ]
1
2021-08-16T12:10:08.000Z
2021-08-16T12:10:08.000Z
from . import cache, index # noqa: F401
20.5
40
0.682927
6
41
4.666667
1
0
0
0
0
0
0
0
0
0
0
0.09375
0.219512
41
1
41
41
0.78125
0.243902
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
797a2d2f7ef3a72969ff85618e9a4b30ae0f5059
12,382
py
Python
tests/test_frame.py
st-walker/tfs
7a229f4fecbf04d544c5116d79a281e4365ccd1d
[ "MIT" ]
5
2019-02-18T14:38:59.000Z
2021-12-14T15:33:50.000Z
tests/test_frame.py
st-walker/tfs
7a229f4fecbf04d544c5116d79a281e4365ccd1d
[ "MIT" ]
54
2019-02-19T14:44:36.000Z
2022-02-16T15:07:53.000Z
tests/test_frame.py
st-walker/tfs
7a229f4fecbf04d544c5116d79a281e4365ccd1d
[ "MIT" ]
4
2019-10-17T08:58:57.000Z
2022-02-15T15:55:18.000Z
import pathlib from collections import OrderedDict from functools import partial, reduce import pandas as pd import pytest from pandas._testing import assert_dict_equal from pandas.testing import assert_frame_equal import tfs from tfs.frame import TfsDataFrame, concat, merge_headers, validate CURRENT_DIR = pathlib.Path(__file__).parent class TestFailures: def test_validate_raises_on_wrong_unique_behavior(self, caplog): df = TfsDataFrame(index=["A", "B", "A"], columns=["A", "B", "A"]) with pytest.raises(KeyError): validate(df, "", non_unique_behavior="invalid") @pytest.mark.parametrize("how", ["invalid", "not_left", "not_right"]) def test_merge_headers_raises_on_invalid_how_key(self, caplog, how): headers_left = OrderedDict() headers_right = OrderedDict() with pytest.raises(ValueError): merge_headers(headers_left, headers_right, how=how) class TestHeadersMerging: @pytest.mark.parametrize("how", ["left", "LEFT", "Left", "lEfT"]) # we're case-insensitive def test_headers_merging_left(self, _tfs_file_x_pathlib, _tfs_file_y_pathlib, how): headers_left = tfs.read(_tfs_file_x_pathlib).headers headers_right = tfs.read(_tfs_file_y_pathlib).headers result = merge_headers(headers_left, headers_right, how=how) assert isinstance(result, OrderedDict) assert len(result) >= len(headers_left) and len(result) >= len(headers_right) # no key disappeared for key in result: # check that we prioritized headers_left's contents if key in headers_left and key in headers_right: assert result[key] == headers_left[key] @pytest.mark.parametrize("how", ["right", "RIGHT", "Right", "RigHt"]) # we're case-insensitive def test_headers_merging_right(self, _tfs_file_x_pathlib, _tfs_file_y_pathlib, how): headers_left = tfs.read(_tfs_file_x_pathlib).headers headers_right = tfs.read(_tfs_file_y_pathlib).headers result = merge_headers(headers_left, headers_right, how=how) assert isinstance(result, OrderedDict) assert len(result) >= len(headers_left) and len(result) >= len(headers_right) # no key disappeared for key in result: # check that we prioritized headers_right's contents if key in headers_left and key in headers_right: assert result[key] == headers_right[key] @pytest.mark.parametrize("how", [None, "none", "None", "nOnE"]) # we're case-insensitive def test_headers_merging_none_returns_empty_dict(self, _tfs_file_x_pathlib, _tfs_file_y_pathlib, how): headers_left = tfs.read(_tfs_file_x_pathlib).headers headers_right = tfs.read(_tfs_file_y_pathlib).headers result = merge_headers(headers_left, headers_right, how=how) assert result == OrderedDict() # giving None returns empty headers def test_providing_new_headers_overrides_merging(self, _tfs_file_x_pathlib, _tfs_file_y_pathlib): dframe_x = tfs.read(_tfs_file_x_pathlib) dframe_y = tfs.read(_tfs_file_y_pathlib) assert dframe_x.append(other=dframe_y, new_headers={}).headers == OrderedDict() assert dframe_y.append(other=dframe_x, new_headers={}).headers == OrderedDict() # we provide lsuffix (or rsuffix) since dframes have the same columns assert dframe_x.join(other=dframe_y, lsuffix="_l", new_headers={}).headers == OrderedDict() assert dframe_y.join(other=dframe_x, lsuffix="_l", new_headers={}).headers == OrderedDict() assert dframe_x.merge(right=dframe_y, new_headers={}).headers == OrderedDict() assert dframe_y.merge(right=dframe_x, new_headers={}).headers == OrderedDict() class TestPrinting: def test_header_print(self): headers = {"param": 3, "other": "hello"} df = TfsDataFrame(headers=headers) print_out = str(df) assert "Headers" in print_out for key, val in headers.items(): assert key in print_out assert str(val) in print_out def test_long_headers_print(self): headers = {"p1": 1, "p2": "hello", "p3": 3, "p4": 4, "p5": 5, "p6": 6, "p7": "string", "p8": "long"} df = TfsDataFrame(headers=headers) print_out = str(df) assert "Headers" in print_out # Check that the ellipsis worked assert not all(key in print_out for key in headers.keys()) assert not all(str(val) in print_out for val in headers.values()) assert "..." in print_out def test_empty_headers_print(self): print_tfs = str(TfsDataFrame()) print_df = str(pd.DataFrame()) assert print_tfs == print_df.replace(pd.DataFrame.__name__, TfsDataFrame.__name__) class TestTfsDataFrameAppending: @pytest.mark.parametrize("how_headers", [None, "left", "right"]) def test_correct_appending(self, _tfs_file_x_pathlib, _tfs_file_y_pathlib, how_headers): dframe_x = tfs.read(_tfs_file_x_pathlib) dframe_y = tfs.read(_tfs_file_y_pathlib) result = dframe_x.append(dframe_y, how_headers=how_headers) assert isinstance(result, TfsDataFrame) assert isinstance(result.headers, OrderedDict) assert_dict_equal(result.headers, merge_headers(dframe_x.headers, dframe_y.headers, how=how_headers)) assert_frame_equal(result, pd.DataFrame(dframe_x).append(pd.DataFrame(dframe_y))) @pytest.mark.parametrize("how_headers", [None, "left", "right"]) def test_appending_accepts_pandas_dataframe(self, _tfs_file_x_pathlib, _tfs_file_y_pathlib, how_headers): dframe_x = tfs.read(_tfs_file_x_pathlib) dframe_y = pd.DataFrame(tfs.read(_tfs_file_y_pathlib)) # for test, loses headers here result = dframe_x.append(dframe_y, how_headers=how_headers) assert isinstance(result, TfsDataFrame) assert isinstance(result.headers, OrderedDict) # using empty OrderedDict here as it's what dframe_y is getting when converted in the call assert_dict_equal(result.headers, merge_headers(dframe_x.headers, OrderedDict(), how=how_headers)) assert_frame_equal(result, pd.DataFrame(dframe_x).append(dframe_y)) # dframe_y already pandas class TestTfsDataFrameJoining: @pytest.mark.parametrize("how_headers", [None, "left", "right"]) @pytest.mark.parametrize("lsuffix", ["left", "_x"]) @pytest.mark.parametrize("rsuffix", ["right", "_y"]) def test_correct_joining(self, _tfs_file_x_pathlib, _tfs_file_y_pathlib, how_headers, lsuffix, rsuffix): dframe_x = tfs.read(_tfs_file_x_pathlib) dframe_y = tfs.read(_tfs_file_y_pathlib) result = dframe_x.join(dframe_y, how_headers=how_headers, lsuffix=lsuffix, rsuffix=rsuffix) assert isinstance(result, TfsDataFrame) assert isinstance(result.headers, OrderedDict) assert_dict_equal(result.headers, merge_headers(dframe_x.headers, dframe_y.headers, how=how_headers)) assert_frame_equal( result, pd.DataFrame(dframe_x).join(pd.DataFrame(dframe_y), lsuffix=lsuffix, rsuffix=rsuffix) ) @pytest.mark.parametrize("how_headers", [None, "left", "right"]) @pytest.mark.parametrize("lsuffix", ["left", "_x"]) @pytest.mark.parametrize("rsuffix", ["right", "_y"]) def test_joining_accepts_pandas_dataframe( self, _tfs_file_x_pathlib, _tfs_file_y_pathlib, how_headers, lsuffix, rsuffix ): dframe_x = tfs.read(_tfs_file_x_pathlib) dframe_y = pd.DataFrame(tfs.read(_tfs_file_y_pathlib)) # for test, loses headers here result = dframe_x.join(dframe_y, how_headers=how_headers, lsuffix=lsuffix, rsuffix=rsuffix) assert isinstance(result, TfsDataFrame) assert isinstance(result.headers, OrderedDict) # using empty OrderedDict here as it's what dframe_y is getting when converted in the call assert_dict_equal(result.headers, merge_headers(dframe_x.headers, OrderedDict(), how=how_headers)) assert_frame_equal( result, pd.DataFrame(dframe_x).join(pd.DataFrame(dframe_y), lsuffix=lsuffix, rsuffix=rsuffix) ) class TestTfsDataFrameMerging: @pytest.mark.parametrize("how_headers", [None, "left", "right"]) @pytest.mark.parametrize("how", ["left", "right", "outer", "inner"]) @pytest.mark.parametrize("on", ["NAME", "S", "NUMBER", "CO", "CORMS", "BPM_RES"]) def test_correct_merging(self, _tfs_file_x_pathlib, _tfs_file_y_pathlib, how_headers, how, on): dframe_x = tfs.read(_tfs_file_x_pathlib) dframe_y = tfs.read(_tfs_file_y_pathlib) result = dframe_x.merge(dframe_y, how_headers=how_headers, how=how, on=on) assert isinstance(result, TfsDataFrame) assert isinstance(result.headers, OrderedDict) assert_dict_equal(result.headers, merge_headers(dframe_x.headers, dframe_y.headers, how=how_headers)) assert_frame_equal(result, pd.DataFrame(dframe_x).merge(pd.DataFrame(dframe_y), how=how, on=on)) @pytest.mark.parametrize("how_headers", [None, "left", "right"]) @pytest.mark.parametrize("how", ["left", "right", "outer", "inner"]) @pytest.mark.parametrize("on", ["NAME", "S", "NUMBER", "CO", "CORMS", "BPM_RES"]) def test_merging_accepts_pandas_dataframe( self, _tfs_file_x_pathlib, _tfs_file_y_pathlib, how_headers, how, on ): dframe_x = tfs.read(_tfs_file_x_pathlib) dframe_y = pd.DataFrame(tfs.read(_tfs_file_y_pathlib)) # for test, loses headers here result = dframe_x.merge(dframe_y, how_headers=how_headers, how=how, on=on) assert isinstance(result, TfsDataFrame) assert isinstance(result.headers, OrderedDict) # using empty OrderedDict here as it's what dframe_y is getting when converted in the call assert_dict_equal(result.headers, merge_headers(dframe_x.headers, OrderedDict(), how=how_headers)) assert_frame_equal(result, pd.DataFrame(dframe_x).merge(pd.DataFrame(dframe_y), how=how, on=on)) class TestTfsDataFramesConcatenating: @pytest.mark.parametrize("how_headers", [None, "left", "right"]) @pytest.mark.parametrize("axis", [0, 1]) @pytest.mark.parametrize("join", ["inner", "outer"]) def test_correct_concatenating(self, _tfs_file_x_pathlib, _tfs_file_y_pathlib, how_headers, axis, join): dframe_x = tfs.read(_tfs_file_x_pathlib) dframe_y = tfs.read(_tfs_file_y_pathlib) objs = [dframe_x] * 4 + [dframe_y] * 4 result = concat(objs, how_headers=how_headers, axis=axis, join=join) merger = partial(merge_headers, how=how_headers) all_headers = (tfsdframe.headers for tfsdframe in objs) assert isinstance(result, TfsDataFrame) assert isinstance(result.headers, OrderedDict) assert_dict_equal(result.headers, reduce(merger, all_headers)) assert_frame_equal(result, pd.concat(objs, axis=axis, join=join)) @pytest.mark.parametrize("how_headers", [None, "left", "right"]) @pytest.mark.parametrize("axis", [0, 1]) @pytest.mark.parametrize("join", ["inner", "outer"]) def test_concatenating_accepts_pandas_dataframes( self, _tfs_file_x_pathlib, _tfs_file_y_pathlib, how_headers, axis, join ): dframe_x = tfs.read(_tfs_file_x_pathlib) dframe_y = pd.DataFrame(tfs.read(_tfs_file_y_pathlib)) # for test, loses headers here objs = [dframe_x] * 4 + [dframe_y] * 4 # now has a mix of TfsDataFrames and pandas.DataFrames result = concat(objs, how_headers=how_headers, axis=axis, join=join) merger = partial(merge_headers, how=how_headers) # all_headers = (tfsdframe.headers for tfsdframe in objs) assert isinstance(result, TfsDataFrame) assert isinstance(result.headers, OrderedDict) all_headers = [ # empty OrderedDicts here as it's what objects are getting when converted in the call dframe.headers if isinstance(dframe, TfsDataFrame) else OrderedDict() for dframe in objs ] assert_dict_equal(result.headers, reduce(merger, all_headers)) assert_frame_equal(result, pd.concat(objs, axis=axis, join=join)) # ------ Fixtures ------ # @pytest.fixture() def _tfs_file_x_pathlib() -> pathlib.Path: return CURRENT_DIR / "inputs" / "file_x.tfs" @pytest.fixture() def _tfs_file_y_pathlib() -> pathlib.Path: return CURRENT_DIR / "inputs" / "file_x.tfs"
49.330677
110
0.703279
1,655
12,382
4.9571
0.107553
0.042662
0.024378
0.045709
0.789493
0.754876
0.742808
0.737811
0.706485
0.694783
0
0.002173
0.182361
12,382
250
111
49.528
0.808179
0.077774
0
0.589474
0
0
0.047744
0
0
0
0
0
0.289474
1
0.1
false
0
0.047368
0.010526
0.194737
0.078947
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
797e57d82ca20e5f0c8f30b95fa8f768c3645d67
69
py
Python
opencv/version.py
creativeprojects/speedcam
30fbb19f30c775e5b7e048784964332b253da2f1
[ "MIT" ]
1
2018-01-02T13:29:39.000Z
2018-01-02T13:29:39.000Z
opencv/version.py
creativeprojects/speedcam
30fbb19f30c775e5b7e048784964332b253da2f1
[ "MIT" ]
null
null
null
opencv/version.py
creativeprojects/speedcam
30fbb19f30c775e5b7e048784964332b253da2f1
[ "MIT" ]
null
null
null
import cv2 print("Your OpenCV version: {}".format(cv2.__version__))
17.25
56
0.73913
9
69
5.222222
0.777778
0
0
0
0
0
0
0
0
0
0
0.032258
0.101449
69
3
57
23
0.725806
0
0
0
0
0
0.333333
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
1
0
5
798502c4305e9c38f023fb17b70056e391d5003e
70
py
Python
bulq/plugins/bulq_input_file/__init__.py
koji-m/bulq
78f97d2e57d6bcb0ec3fa2b0c7539db3ebaa104a
[ "Apache-2.0" ]
null
null
null
bulq/plugins/bulq_input_file/__init__.py
koji-m/bulq
78f97d2e57d6bcb0ec3fa2b0c7539db3ebaa104a
[ "Apache-2.0" ]
null
null
null
bulq/plugins/bulq_input_file/__init__.py
koji-m/bulq
78f97d2e57d6bcb0ec3fa2b0c7539db3ebaa104a
[ "Apache-2.0" ]
null
null
null
from . import bulq_input_file plugin = bulq_input_file.BulqInputFile
17.5
38
0.842857
10
70
5.5
0.7
0.327273
0.472727
0
0
0
0
0
0
0
0
0
0.114286
70
3
39
23.333333
0.887097
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
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
8db05c18cc1324cabbc70f6f48e6567d3d67ea30
50
py
Python
cmd2_submenu/__init__.py
karuneshChhabra/cmd2-submenu
bbb500813fbcf1d65c9fd1283ceab36f41e5137e
[ "MIT" ]
1
2018-05-08T20:50:59.000Z
2018-05-08T20:50:59.000Z
cmd2_submenu/__init__.py
karuneshChhabra/cmd2-submenu
bbb500813fbcf1d65c9fd1283ceab36f41e5137e
[ "MIT" ]
9
2018-10-14T19:00:52.000Z
2019-07-30T18:06:14.000Z
cmd2_submenu/__init__.py
karuneshChhabra/cmd2-submenu
bbb500813fbcf1d65c9fd1283ceab36f41e5137e
[ "MIT" ]
3
2018-11-18T01:24:16.000Z
2022-01-11T11:41:21.000Z
# # coding=utf-8 from .submenu import AddSubmenu
10
31
0.74
7
50
5.285714
1
0
0
0
0
0
0
0
0
0
0
0.02381
0.16
50
4
32
12.5
0.857143
0.24
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
8ddd7b13928b79c95420b092623ed9df04abb920
350
py
Python
routes/incidents.py
TubmanProject/police-data-trust
c5ef2a5806d7229f3a827feb30ccb44b685b27c4
[ "MIT" ]
null
null
null
routes/incidents.py
TubmanProject/police-data-trust
c5ef2a5806d7229f3a827feb30ccb44b685b27c4
[ "MIT" ]
null
null
null
routes/incidents.py
TubmanProject/police-data-trust
c5ef2a5806d7229f3a827feb30ccb44b685b27c4
[ "MIT" ]
3
2021-02-10T01:31:03.000Z
2021-03-28T15:38:38.000Z
from flask import Blueprint, request, jsonify from incidents import Incidents incident_routes = Blueprint("incident_routes", __name__, url_prefix="/incidents") @incident_routes.route("/", methods=["POST", "GET"]) @incident_routes.route("/<id>", methods=["PUT", "DELETE"]) def get_single_incident(id=None): return Incidents.get_delete_put_post(id)
38.888889
81
0.765714
45
350
5.644444
0.511111
0.220472
0.181102
0
0
0
0
0
0
0
0
0
0.08
350
8
82
43.75
0.78882
0
0
0
0
0
0.134286
0
0
0
0
0
0
1
0.142857
false
0
0.285714
0.142857
0.571429
0.285714
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
5
5c1319b11fd07d7011359d778bc7f6661c4cec9e
167
py
Python
my_app/templates/model.py
varshaholsambre/Whats-For-Dinner
18f5eb753a2cf1417deadfc6cdd023563e70e0e7
[ "Apache-2.0" ]
null
null
null
my_app/templates/model.py
varshaholsambre/Whats-For-Dinner
18f5eb753a2cf1417deadfc6cdd023563e70e0e7
[ "Apache-2.0" ]
null
null
null
my_app/templates/model.py
varshaholsambre/Whats-For-Dinner
18f5eb753a2cf1417deadfc6cdd023563e70e0e7
[ "Apache-2.0" ]
null
null
null
from my_app import db class Fact(db.Model): id = db.Column(db.Integer, primary_keys = True) name = db.Column(db.String(100)) value = db.Column(db.String(100))
27.833333
49
0.694611
29
167
3.931034
0.62069
0.210526
0.263158
0.280702
0.333333
0
0
0
0
0
0
0.042553
0.155689
167
6
50
27.833333
0.765957
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.2
0
1
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
5c4b9cbab27904d956f8c5b50b76ac98e0b6ae3f
11,406
py
Python
python/paddle/fluid/tests/unittests/test_cov.py
RangeKing/Paddle
2d87300809ae75d76f5b0b457d8112cb88dc3e27
[ "Apache-2.0" ]
8
2016-08-15T07:02:27.000Z
2016-08-24T09:34:00.000Z
python/paddle/fluid/tests/unittests/test_cov.py
RangeKing/Paddle
2d87300809ae75d76f5b0b457d8112cb88dc3e27
[ "Apache-2.0" ]
1
2022-01-28T07:23:22.000Z
2022-01-28T07:23:22.000Z
python/paddle/fluid/tests/unittests/test_cov.py
RangeKing/Paddle
2d87300809ae75d76f5b0b457d8112cb88dc3e27
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import paddle.fluid as fluid import unittest import numpy as np import six import paddle from paddle.fluid.framework import _test_eager_guard, in_dygraph_mode def numpy_cov(np_arr, rowvar=True, ddof=1, fweights=None, aweights=None): return np.cov(np_arr, rowvar=rowvar, ddof=int(ddof), fweights=fweights, aweights=aweights) class Cov_Test(unittest.TestCase): def setUp(self): self.shape = [20, 10] self.weightshape = [10] def func_test_tensor_cov_default(self): typelist = ['float64'] places = [fluid.CPUPlace()] if fluid.core.is_compiled_with_cuda(): places.append(fluid.CUDAPlace(0)) for idx, p in enumerate(places): if idx == 0: paddle.set_device('cpu') else: paddle.set_device('gpu') for dtype in typelist: np_arr = np.random.rand(*self.shape).astype(dtype) tensor = paddle.to_tensor(np_arr, place=p) cov = paddle.linalg.cov(tensor, rowvar=True, ddof=True, fweights=None, aweights=None) np_cov = numpy_cov( np_arr, rowvar=True, ddof=1, fweights=None, aweights=None) self.assertTrue(np.allclose(np_cov, cov.numpy())) def test_tensor_cov_default(self): with _test_eager_guard(): self.func_test_tensor_cov_default() self.func_test_tensor_cov_default() def func_test_tensor_cov_rowvar(self): typelist = ['float64'] places = [fluid.CPUPlace()] if fluid.core.is_compiled_with_cuda(): places.append(fluid.CUDAPlace(0)) for idx, p in enumerate(places): if idx == 0: paddle.set_device('cpu') else: paddle.set_device('gpu') for dtype in typelist: np_arr = np.random.rand(*self.shape).astype(dtype) tensor = paddle.to_tensor(np_arr, place=p) cov = paddle.linalg.cov(tensor, rowvar=False, ddof=True, fweights=None, aweights=None) np_cov = numpy_cov( np_arr, rowvar=False, ddof=1, fweights=None, aweights=None) self.assertTrue(np.allclose(np_cov, cov.numpy())) def test_tensor_cov_rowvar(self): with _test_eager_guard(): self.func_test_tensor_cov_rowvar() self.func_test_tensor_cov_rowvar() def func_test_tensor_cov_ddof(self): typelist = ['float64'] places = [fluid.CPUPlace()] if fluid.core.is_compiled_with_cuda(): places.append(fluid.CUDAPlace(0)) for idx, p in enumerate(places): if idx == 0: paddle.set_device('cpu') else: paddle.set_device('gpu') for dtype in typelist: np_arr = np.random.rand(*self.shape).astype(dtype) tensor = paddle.to_tensor(np_arr, place=p) cov = paddle.linalg.cov(tensor, rowvar=True, ddof=False, fweights=None, aweights=None) np_cov = numpy_cov( np_arr, rowvar=True, ddof=0, fweights=None, aweights=None) self.assertTrue(np.allclose(np_cov, cov.numpy())) def test_tensor_cov_ddof(self): with _test_eager_guard(): self.func_test_tensor_cov_ddof() self.func_test_tensor_cov_ddof() def func_test_tensor_cov_fweights(self): typelist = ['float64'] places = [fluid.CPUPlace()] if fluid.core.is_compiled_with_cuda(): places.append(fluid.CUDAPlace(0)) for idx, p in enumerate(places): if idx == 0: paddle.set_device('cpu') else: paddle.set_device('gpu') for dtype in typelist: np_arr = np.random.rand(*self.shape).astype(dtype) np_fw = np.random.randint( 10, size=self.weightshape).astype('int32') tensor = paddle.to_tensor(np_arr, place=p) fweights = paddle.to_tensor(np_fw, place=p) cov = paddle.linalg.cov(tensor, rowvar=True, ddof=True, fweights=fweights, aweights=None) np_cov = numpy_cov( np_arr, rowvar=True, ddof=1, fweights=np_fw, aweights=None) self.assertTrue(np.allclose(np_cov, cov.numpy())) def test_tensor_cov_fweights(self): with _test_eager_guard(): self.func_test_tensor_cov_fweights() self.func_test_tensor_cov_fweights() def func_test_tensor_cov_aweights(self): typelist = ['float64'] places = [fluid.CPUPlace()] if fluid.core.is_compiled_with_cuda(): places.append(fluid.CUDAPlace(0)) for idx, p in enumerate(places): if idx == 0: paddle.set_device('cpu') else: paddle.set_device('gpu') for dtype in typelist: np_arr = np.random.rand(*self.shape).astype(dtype) np_aw = np.random.randint( 10, size=self.weightshape).astype('int32') tensor = paddle.to_tensor(np_arr, place=p) aweights = paddle.to_tensor(np_aw, place=p) cov = paddle.linalg.cov(tensor, rowvar=True, ddof=True, fweights=None, aweights=aweights) np_cov = numpy_cov( np_arr, rowvar=True, ddof=1, fweights=None, aweights=np_aw) self.assertTrue(np.allclose(np_cov, cov.numpy())) def test_tensor_cov_aweights(self): with _test_eager_guard(): self.func_test_tensor_cov_aweights() self.func_test_tensor_cov_aweights() def func_test_tensor_cov_weights(self): typelist = ['float64'] places = [fluid.CPUPlace()] if fluid.core.is_compiled_with_cuda(): places.append(fluid.CUDAPlace(0)) for idx, p in enumerate(places): if idx == 0: paddle.set_device('cpu') else: paddle.set_device('gpu') for dtype in typelist: np_arr = np.random.rand(*self.shape).astype(dtype) np_fw = np.random.randint( 10, size=self.weightshape).astype('int64') np_aw = np.random.rand(*self.weightshape).astype('float64') tensor = paddle.to_tensor(np_arr, place=p) fweights = paddle.to_tensor(np_fw, place=p) aweights = paddle.to_tensor(np_aw, place=p) cov = paddle.linalg.cov(tensor, rowvar=True, ddof=True, fweights=fweights, aweights=aweights) np_cov = numpy_cov( np_arr, rowvar=True, ddof=1, fweights=np_fw, aweights=np_aw) self.assertTrue(np.allclose(np_cov, cov.numpy())) def test_tensor_cov_weights(self): with _test_eager_guard(): self.func_test_tensor_cov_weights() self.func_test_tensor_cov_weights() class Cov_Test2(Cov_Test): def setUp(self): self.shape = [10] self.weightshape = [10] # Input(x) only support N-D (1<=N<=2) tensor class Cov_Test3(unittest.TestCase): def setUp(self): self.shape = [2, 5, 10] self.fweightshape = [10] self.aweightshape = [10] self.fw_s = 1. self.aw_s = 1. def func_test_errors(self): def test_err(): np_arr = np.random.rand(*self.shape).astype('float64') np_fw = self.fw_s * np.random.rand( *self.fweightshape).astype('int32') np_aw = self.aw_s * np.random.rand( *self.aweightshape).astype('float64') tensor = paddle.to_tensor(np_arr) fweights = paddle.to_tensor(np_fw) aweights = paddle.to_tensor(np_aw) cov = paddle.linalg.cov(tensor, rowvar=True, ddof=True, fweights=fweights, aweights=aweights) self.assertRaises(ValueError, test_err) def test_errors(self): with _test_eager_guard(): self.func_test_errors() self.func_test_errors() #Input(fweights) only support N-D (N<=1) tensor class Cov_Test4(Cov_Test3): def setUp(self): self.shape = [5, 10] self.fweightshape = [2, 10] self.aweightshape = [10] self.fw_s = 1. self.aw_s = 1. #The number of Input(fweights) should equal to x's dim[1] class Cov_Test5(Cov_Test3): def setUp(self): self.shape = [5, 10] self.fweightshape = [5] self.aweightshape = [10] self.fw_s = 1. self.aw_s = 1. #The value of Input(fweights) cannot be negtive class Cov_Test6(Cov_Test3): def setUp(self): self.shape = [5, 10] self.fweightshape = [10] self.aweightshape = [10] self.fw_s = -1. self.aw_s = 1. #Input(aweights) only support N-D (N<=1) tensor class Cov_Test7(Cov_Test3): def setUp(self): self.shape = [5, 10] self.fweightshape = [10] self.aweightshape = [2, 10] self.fw_s = 1. self.aw_s = 1. #The number of Input(aweights) should equal to x's dim[1] class Cov_Test8(Cov_Test3): def setUp(self): self.shape = [5, 10] self.fweightshape = [10] self.aweightshape = [5] self.fw_s = 1. self.aw_s = 1. #The value of Input(aweights) cannot be negtive class Cov_Test9(Cov_Test3): def setUp(self): self.shape = [5, 10] self.fweightshape = [10] self.aweightshape = [10] self.fw_s = 1. self.aw_s = -1. if __name__ == '__main__': unittest.main()
35.312693
80
0.53279
1,325
11,406
4.386415
0.128302
0.041294
0.053682
0.05265
0.807983
0.780626
0.711803
0.699071
0.67894
0.65967
0
0.021229
0.36814
11,406
322
81
35.42236
0.785209
0.080835
0
0.742063
0
0
0.012138
0
0
0
0
0
0.027778
1
0.099206
false
0
0.02381
0.003968
0.162698
0
0
0
0
null
0
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
309abbd4d5febdc32ec33eb32a5b645e1b316f9c
808
py
Python
cpc/abst/Location.py
U-Ar/Cpresto
f723458fb237c9e3e8bc8a6afdf7c81858a65363
[ "BSD-3-Clause" ]
1
2021-05-09T07:10:19.000Z
2021-05-09T07:10:19.000Z
cpc/abst/Location.py
U-Ar/Cpresto
f723458fb237c9e3e8bc8a6afdf7c81858a65363
[ "BSD-3-Clause" ]
null
null
null
cpc/abst/Location.py
U-Ar/Cpresto
f723458fb237c9e3e8bc8a6afdf7c81858a65363
[ "BSD-3-Clause" ]
null
null
null
from .CprestoToken import CprestoToken class Location: def __init__(self,sourcename,token,kindname=""): self._source_name = sourcename if isinstance(token,CprestoToken): self._token = token else : self._token = CprestoToken(token,kindname) def source_name(self): return self._source_name def token(self): return self._token def lineno(self): return self._token.lineno() def column(self): return self._token.column() def line(self): return self._token.included_line() def numbered_line(self): return "line " + str(self._token.lineno()) + ": " + self.line() def to_string(self): return self._source_name + ":" + str(self._token.lineno())
26.064516
71
0.601485
89
808
5.213483
0.280899
0.155172
0.181034
0.163793
0.103448
0
0
0
0
0
0
0
0.288366
808
30
72
26.933333
0.806957
0
0
0
0
0
0.009901
0
0
0
0
0
0
1
0.363636
false
0
0.045455
0.318182
0.772727
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
30b34b0d803bd2e9500bda5d49c0d245448efe59
720
py
Python
tests/test_enum.py
ChomusukeBot/Tokki
0414ecce59c9fc321b2ccc7aab344a2f0dd54099
[ "MIT" ]
null
null
null
tests/test_enum.py
ChomusukeBot/Tokki
0414ecce59c9fc321b2ccc7aab344a2f0dd54099
[ "MIT" ]
11
2019-07-12T09:19:24.000Z
2020-03-13T06:00:09.000Z
tests/test_enum.py
ChomusukeBot/Tokki
0414ecce59c9fc321b2ccc7aab344a2f0dd54099
[ "MIT" ]
1
2019-10-01T21:05:00.000Z
2019-10-01T21:05:00.000Z
import pytest from tokki.enums import Status @pytest.mark.asyncio async def test_all_values(): assert Status.from_name("created") == Status.InProgress assert Status.from_name("received") == Status.InProgress assert Status.from_name("started") == Status.InProgress assert Status.from_name("passed") == Status.Success assert Status.from_name("failed") == Status.Failed assert Status.from_name("errored") == Status.Failed assert Status.from_name("canceled") == Status.Canceled @pytest.mark.asyncio async def test_invalid_values(): with pytest.raises(ValueError): Status.from_name("invalid_value") with pytest.raises(ValueError): Status.from_name("not_a_real_status")
32.727273
60
0.734722
92
720
5.565217
0.347826
0.175781
0.246094
0.273438
0.605469
0.605469
0.15625
0
0
0
0
0
0.144444
720
21
61
34.285714
0.831169
0
0
0.235294
0
0
0.109722
0
0
0
0
0
0.411765
1
0
true
0.058824
0.117647
0
0.117647
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
0
1
1
0
0
0
0
0
5
30dbb031d2f99af7fac6464b8813d33dd2c65818
41
py
Python
src/clearskies/input_outputs/exceptions/cli_input_error.py
cmancone/clearskies
aaa33fef6d03205faf26f123183a46adc1dbef9c
[ "MIT" ]
4
2021-04-23T18:13:06.000Z
2022-03-26T01:51:01.000Z
src/clearskies/input_outputs/exceptions/cli_input_error.py
cmancone/clearskies
aaa33fef6d03205faf26f123183a46adc1dbef9c
[ "MIT" ]
null
null
null
src/clearskies/input_outputs/exceptions/cli_input_error.py
cmancone/clearskies
aaa33fef6d03205faf26f123183a46adc1dbef9c
[ "MIT" ]
null
null
null
class CLIInputError(Exception): pass
13.666667
31
0.756098
4
41
7.75
1
0
0
0
0
0
0
0
0
0
0
0
0.170732
41
2
32
20.5
0.911765
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
30fa45013647f6f603ed360be9996d60f942d045
40
py
Python
tests/util/test_pagination.py
Justasic/Privacy.py
471e6669a1e22e539459bbeb24de4efd3b7a11e0
[ "BSD-3-Clause" ]
3
2019-11-04T16:11:36.000Z
2021-05-24T18:56:40.000Z
tests/util/test_pagination.py
Justasic/Privacy.py
471e6669a1e22e539459bbeb24de4efd3b7a11e0
[ "BSD-3-Clause" ]
9
2019-11-09T01:47:58.000Z
2022-03-30T00:19:20.000Z
tests/util/test_pagination.py
Justasic/Privacy.py
471e6669a1e22e539459bbeb24de4efd3b7a11e0
[ "BSD-3-Clause" ]
2
2020-08-12T03:22:29.000Z
2020-12-10T00:08:46.000Z
"""Tests for privacy.util.pagination"""
20
39
0.725
5
40
5.8
1
0
0
0
0
0
0
0
0
0
0
0
0.075
40
1
40
40
0.783784
0.825
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
a50344ba4b94b68fb3ddb1c02d59e6343e8d02ff
66
py
Python
social/backends/openstreetmap.py
raccoongang/python-social-auth
81c0a542d158772bd3486d31834c10af5d5f08b0
[ "BSD-3-Clause" ]
1,987
2015-01-01T16:12:45.000Z
2022-03-29T14:24:25.000Z
social/backends/openstreetmap.py
raccoongang/python-social-auth
81c0a542d158772bd3486d31834c10af5d5f08b0
[ "BSD-3-Clause" ]
731
2015-01-01T22:55:25.000Z
2022-03-10T15:07:51.000Z
virtual/lib/python3.6/site-packages/social/backends/openstreetmap.py
dennismwaniki67/awards
80ed10541f5f751aee5f8285ab1ad54cfecba95f
[ "MIT" ]
1,082
2015-01-01T16:27:26.000Z
2022-03-22T21:18:33.000Z
from social_core.backends.openstreetmap import OpenStreetMapOAuth
33
65
0.909091
7
66
8.428571
1
0
0
0
0
0
0
0
0
0
0
0
0.060606
66
1
66
66
0.951613
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
a5138f01b9e59569ba13da131df7a6c38791ee5f
170
py
Python
feline/jobposts/admin.py
Jeanluis019/feline
f802f7a57490b9425b32d88fa10d9cd7234e3a1f
[ "MIT" ]
6
2021-10-13T01:05:27.000Z
2021-11-10T03:15:15.000Z
feline/jobposts/admin.py
Jeanluis019/feline
f802f7a57490b9425b32d88fa10d9cd7234e3a1f
[ "MIT" ]
1
2022-03-30T21:26:16.000Z
2022-03-30T21:26:16.000Z
feline/jobposts/admin.py
Jeanluis019/feline
f802f7a57490b9425b32d88fa10d9cd7234e3a1f
[ "MIT" ]
1
2021-11-10T13:32:21.000Z
2021-11-10T13:32:21.000Z
from django.contrib import admin from .models import Category, Company, JobPost admin.site.register(Category) admin.site.register(Company) admin.site.register(JobPost)
21.25
46
0.817647
23
170
6.043478
0.478261
0.194245
0.366906
0
0
0
0
0
0
0
0
0
0.088235
170
7
47
24.285714
0.896774
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
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
a517487de15df9acfa81439d249bdb940a34774d
106
py
Python
enthought/envisage/developer/code_browser/klass.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
3
2016-12-09T06:05:18.000Z
2018-03-01T13:00:29.000Z
enthought/envisage/developer/code_browser/klass.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
1
2020-12-02T00:51:32.000Z
2020-12-02T08:48:55.000Z
enthought/envisage/developer/code_browser/klass.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
null
null
null
# proxy module from __future__ import absolute_import from envisage.developer.code_browser.klass import *
26.5
51
0.849057
14
106
6
0.785714
0
0
0
0
0
0
0
0
0
0
0
0.103774
106
3
52
35.333333
0.884211
0.113208
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
eb55475cead7cacf316d09a339bcf548ed480d9e
13,670
py
Python
crawler/threads.py
wvvww/youtube-video-crawler
0a40aa3a3027db89335c9c5bc928c2fb0e7ed45a
[ "MIT" ]
null
null
null
crawler/threads.py
wvvww/youtube-video-crawler
0a40aa3a3027db89335c9c5bc928c2fb0e7ed45a
[ "MIT" ]
null
null
null
crawler/threads.py
wvvww/youtube-video-crawler
0a40aa3a3027db89335c9c5bc928c2fb0e7ed45a
[ "MIT" ]
null
null
null
from .constants import * from multiprocessing import Queue from typing import Iterator from redis import Redis from time import perf_counter import socket import ssl import brotli context = ssl.create_default_context() def parse_chunked_body(data): temp = b"" while True: size, data = data.split(b"\r\n", 1) size = int(size, 16) if not size: break temp += data[:size] data = data[size+2:] temp = brotli.decompress(temp) return temp def find_channel_ids(data: bytes): ids = set() index = 0 while True: offset = data.find(b'browseId": "', index) if offset == -1: return tuple(ids) ids.add(data[offset+12:offset+36].decode()) index = offset + 24 def find_video_ids(data: bytes): ids = set() index = 0 while True: offset = data.find(b"?v=", index) if offset == -1: return tuple(ids) ids.add(data[offset+3:offset+14].decode()) index = offset + 11 def find_playlist_ids(data: bytes): ids = set() index = 0 while True: offset = data.find(b"list=", index) if offset == -1: return tuple(ids) ids.add(data[offset+5:offset+39].split(b'"', 1)[0].decode()) index = offset + 34 def crawler( crawl_queue: Queue, crawl_cache: Redis, proxy_iter: Iterator ): sock = None while True: if sock: try: sock.shutdown(2) except OSError: pass sock.close() sock = None proxy = next(proxy_iter) try: sock = socket.socket() sock.settimeout(5) sock.connect(proxy[1]) sock.sendall(f"CONNECT www.youtube.com:443 HTTP/1.1\r\nProxy-Authorization: {proxy[0]}\r\n\r\n".encode()) resp = sock.recv(1024000) if not any(resp.startswith(f"HTTP/{v} 200".encode()) for v in ("1.0", "1.1")): continue sock = context.wrap_socket(sock, False, False, False, "www.youtube.com") sock.do_handshake() except: continue while True: try: target_type, target = crawl_queue.get(True) except: continue try: if crawl_cache.get(target): continue crawl_cache.set(target, 1) if target_type == CHANNEL: # Get channel's playlists sock.sendall(( f"GET /channel/{target}/playlists HTTP/1.1\r\n" "Host: www.youtube.com\r\n" "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36\r\n" "Accept-Encoding: br\r\n" "Cookie: CONSENT=YES+cb.20211026-09-p1.en+FX+731\r\n" "\r\n" ).encode()) resp = sock.recv(1024000) if resp.startswith(b"HTTP/1.0 404"): print(f"DROPPED: Channel {target} does not exist.") continue if not resp.startswith(b"HTTP/1.1 200"): print(f"RE-ADDED: Channel {target} returned non-OK status: {resp[:50]}") crawl_cache.delete(target) crawl_queue.put((target_type, target)) break body = b"" while not body.endswith(b"0\r\n\r\n"): body += sock.recv(100000) body = parse_chunked_body(body) playlist_ids = find_playlist_ids(body) for index, cached in enumerate(crawl_cache.mget(playlist_ids)): playlist_id = playlist_ids[index] if not cached: crawl_queue.put((PLAYLIST, playlist_id)) # sock.sendall(( f"GET /channel/{target}/videos HTTP/1.1\r\n" "Host: www.youtube.com\r\n" "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36\r\n" "Accept-Encoding: br\r\n" "Cookie: CONSENT=YES+cb.20211026-09-p1.en+FX+731\r\n" "\r\n" ).encode()) resp = sock.recv(1024000) if resp.startswith(b"HTTP/1.0 404"): print(f"DROPPED: Channel {target} does not exist.") continue if not resp.startswith(b"HTTP/1.1 200"): print(f"RE-ADDED: Channel {target} returned non-OK status: {resp[:50]}") crawl_cache.delete(target) crawl_queue.put((target_type, target)) break body = b"" while not body.endswith(b"0\r\n\r\n"): body += sock.recv(100000) body = parse_chunked_body(body) video_ids = find_video_ids(body) for index, cached in enumerate(crawl_cache.mget(video_ids)): video_id = video_ids[index] if not cached: print(f"https://www.youtube.com/watch?v={video_id}") crawl_queue.put((VIDEO, video_id)) try: continuation_key = body.split(b'"token":"', 1)[1].split(b'"', 1)[0].decode() except: continue for _ in range(5): payload = '{"context":{"client":{"clientName":"WEB","clientVersion":"2.20211025.01.00"},"user":{"lockedSafetyMode":false}},"continuation":"%s"}' % continuation_key sock.sendall(( "POST /youtubei/v1/browse?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8 HTTP/1.1\r\n" "Host: www.youtube.com\r\n" "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36\r\n" "Accept-Encoding: br\r\n" f"Content-Length: {len(payload)}\r\n" "Content-Type: application/json\r\n" "Cookie: CONSENT=YES+cb.20211026-09-p1.en+FX+731\r\n" "\r\n" f"{payload}" ).encode()) resp = sock.recv(102400) if not resp.startswith(b"HTTP/1.1 200"): print(f"RE-ADDED: Video list API for channel {target} returned non-OK status: {resp[:50]}") crawl_queue.put((target_type, target)) break resp, body = resp.split(b"\r\n\r\n", 1) length = int(resp.split(b"Content-Length: ", 1)[1].split(b"\r\n", 1)[0]) while length > len(body): body += sock.recv(100000) body = brotli.decompress(body) video_ids = find_video_ids(body) for index, cached in enumerate(crawl_cache.mget(video_ids)): video_id = video_ids[index] if not cached: print(f"https://www.youtube.com/watch?v={video_id}") crawl_queue.put((VIDEO, video_id)) try: continuation_key = body.split(b'":{"token": "', 1)[1].split(b'"', 1)[0].decode() except: break elif target_type == VIDEO: sock.sendall(( f"GET /watch?v={target} HTTP/1.1\r\n" "Host: www.youtube.com\r\n" "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36\r\n" "Accept-Encoding: br\r\n" "Cookie: CONSENT=YES+cb.20211026-09-p1.en+FX+731\r\n" "\r\n" ).encode()) resp = sock.recv(1024000) if resp.startswith(b"HTTP/1.0 404"): print(f"DROPPED: Video {target} does not exist.") continue if not resp.startswith(b"HTTP/1.1 200"): print(f"RE-ADDED: Video {target} returned non-OK status: {resp[:50]}") crawl_cache.delete(target) crawl_queue.put((target_type, target)) break body = b"" while not body.endswith(b"0\r\n\r\n"): body += sock.recv(100000) body = parse_chunked_body(body) continuation_key = body.split(b'":{"token":"', 1)[1].split(b'"', 1)[0].decode() for page in range(5): payload = '{"context":{"client":{"clientName":"WEB","clientVersion":"2.20211025.01.00"},"user":{"lockedSafetyMode":false}},"continuation":"%s"}' % continuation_key sock.sendall(( "POST /youtubei/v1/next?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8 HTTP/1.1\r\n" "Host: www.youtube.com\r\n" "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36\r\n" "Accept-Encoding: br\r\n" f"Content-Length: {len(payload)}\r\n" "Content-Type: application/json\r\n" "Cookie: CONSENT=YES+cb.20211026-09-p1.en+FX+731\r\n" "\r\n" f"{payload}" ).encode()) resp = sock.recv(102400) if not resp.startswith(b"HTTP/1.1 200"): print(f"RE-ADDED: Comment API for video {target} returned non-OK status: {resp[:50]}") crawl_queue.put((target_type, target)) break resp, body = resp.split(b"\r\n\r\n", 1) length = int(resp.split(b"Content-Length: ", 1)[1].split(b"\r\n", 1)[0]) while length > len(body): body += sock.recv(100000) body = brotli.decompress(body) channel_ids = find_channel_ids(body) for index, cached in enumerate(crawl_cache.mget(channel_ids)): channel_id = channel_ids[index] if not cached: crawl_queue.put((CHANNEL, channel_id)) if not b"RELOAD_CONTINUATION_SLOT_BODY" in body: break continuation_key = body.rsplit(b'"token": "', 1)[1].split(b'"', 1)[0].decode() elif target_type == PLAYLIST: sock.sendall(( f"GET /playlist?list={target} HTTP/1.1\r\n" "Host: www.youtube.com\r\n" "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36\r\n" "Accept-Encoding: br\r\n" "Cookie: CONSENT=YES+cb.20211026-09-p1.en+FX+731\r\n" "\r\n" ).encode()) resp = sock.recv(1024000) if resp.startswith(b"HTTP/1.0 404"): print(f"DROPPED: Playlist {target} does not exist.") continue if not resp.startswith(b"HTTP/1.1 200"): print(f"RE-ADDED: Playlist {target} returned non-OK status: {resp[:50]}") crawl_cache.delete(target) crawl_queue.put((target_type, target)) break body = b"" while not body.endswith(b"0\r\n\r\n"): body += sock.recv(100000) body = parse_chunked_body(body) video_ids = find_video_ids(body) for index, cached in enumerate(crawl_cache.mget(video_ids)): video_id = video_ids[index] if not cached: print(f"https://www.youtube.com/watch?v={video_id}") crawl_queue.put((VIDEO, video_id)) except (socket.timeout, ssl.SSLError): try: crawl_cache.delete(target) except: pass break except Exception as err: print(f"{err!r}") try: crawl_cache.delete(target) except: pass break
44.819672
187
0.451939
1,509
13,670
4.018555
0.133863
0.018799
0.012863
0.008575
0.762368
0.75841
0.749175
0.749175
0.725429
0.719822
0
0.067831
0.430578
13,670
304
188
44.967105
0.711202
0.001683
0
0.679688
0
0.066406
0.239006
0.057241
0
0
0
0
0
1
0.019531
false
0.011719
0.03125
0
0.054688
0.054688
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
eb760b05f4c064d4785c72806a4cc77197786520
18
py
Python
main.py
alijangjoo/testRipo
442f9a2d58ce7827171256688b337408430090c7
[ "MIT" ]
null
null
null
main.py
alijangjoo/testRipo
442f9a2d58ce7827171256688b337408430090c7
[ "MIT" ]
null
null
null
main.py
alijangjoo/testRipo
442f9a2d58ce7827171256688b337408430090c7
[ "MIT" ]
null
null
null
print('hello ali')
18
18
0.722222
3
18
4.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.055556
18
1
18
18
0.764706
0
0
0
0
0
0.473684
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
eb91bdc76596c1c320a981751408826b8d512986
83
py
Python
app/api/__init__.py
ntorr/calendar-web-app
9228ba39ef288f329cac0d9992328db22a9eecd0
[ "MIT" ]
null
null
null
app/api/__init__.py
ntorr/calendar-web-app
9228ba39ef288f329cac0d9992328db22a9eecd0
[ "MIT" ]
null
null
null
app/api/__init__.py
ntorr/calendar-web-app
9228ba39ef288f329cac0d9992328db22a9eecd0
[ "MIT" ]
null
null
null
from .helloworld import helloworld from .auth import auth from .event import event
20.75
34
0.819277
12
83
5.666667
0.416667
0
0
0
0
0
0
0
0
0
0
0
0.144578
83
3
35
27.666667
0.957746
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
ebbb00a079152c2d447a7b71bb8ecacad5989b25
2,121
py
Python
src/matchers/structure/s_matcher_builder.py
MelvinYin/Defined_Proteins
75da20be82a47d85d27176db29580ab87d52b670
[ "BSD-3-Clause" ]
2
2021-01-05T02:55:57.000Z
2021-04-16T15:49:08.000Z
src/matchers/structure/s_matcher_builder.py
MelvinYin/Defined_Proteins
75da20be82a47d85d27176db29580ab87d52b670
[ "BSD-3-Clause" ]
null
null
null
src/matchers/structure/s_matcher_builder.py
MelvinYin/Defined_Proteins
75da20be82a47d85d27176db29580ab87d52b670
[ "BSD-3-Clause" ]
1
2021-01-05T08:12:38.000Z
2021-01-05T08:12:38.000Z
import logging import numpy as np import os import pickle from config import paths from matchers.structure.s_matcher import Matcher def load_matchers(): input_df = os.path.join(paths.DESCRS, "mg_descr.pkl") output_matcher = os.path.join(paths.MATCHERS, "mg_matcher.pkl") with open(input_df, 'rb', -1) as file: df = pickle.load(file) matcher = Matcher(cropped=False) matcher.load(df) with open(output_matcher, 'wb') as file: pickle.dump(matcher, file, -1) print("mg_descr done") input_df = os.path.join(paths.DESCRS, "efhand_descr.pkl") output_matcher = os.path.join(paths.MATCHERS, "efhand_matcher.pkl") with open(input_df, 'rb', -1) as file: df = pickle.load(file) matcher = Matcher(cropped=False) matcher.load(df) with open(output_matcher, 'wb') as file: pickle.dump(matcher, file, -1) print("efhand_descr done") input_df = os.path.join(paths.DESCRS, "GxxGxG_descr.pkl") output_matcher = os.path.join(paths.MATCHERS, "GxxGxG_matcher.pkl") with open(input_df, 'rb', -1) as file: df = pickle.load(file) matcher = Matcher(cropped=False) matcher.load(df) with open(output_matcher, 'wb') as file: pickle.dump(matcher, file, -1) print("GxxGxG_matcher done") input_df = os.path.join(paths.DESCRS, "GxGGxG_descr.pkl") output_matcher = os.path.join(paths.MATCHERS, "GxGGxG_matcher.pkl") with open(input_df, 'rb', -1) as file: df = pickle.load(file) matcher = Matcher(cropped=False) matcher.load(df) with open(output_matcher, 'wb') as file: pickle.dump(matcher, file, -1) print("GxGGxG_matcher done") input_df = os.path.join(paths.DESCRS, "GxGxxG_descr.pkl") output_matcher = os.path.join(paths.MATCHERS, "GxGxxG_matcher.pkl") with open(input_df, 'rb', -1) as file: df = pickle.load(file) matcher = Matcher(cropped=False) matcher.load(df) with open(output_matcher, 'wb') as file: pickle.dump(matcher, file, -1) print("GxGxxG_matcher done") pass if __name__ == "__main__": load_matchers()
30.73913
71
0.665724
305
2,121
4.478689
0.144262
0.051245
0.073206
0.10981
0.823572
0.823572
0.823572
0.803075
0.803075
0.530747
0
0.005886
0.198963
2,121
68
72
31.191176
0.798117
0
0
0.545455
0
0
0.130846
0
0
0
0
0
0
1
0.018182
false
0.018182
0.109091
0
0.127273
0.090909
0
0
0
null
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
ebcac291d2491ce387d6ec5ac7827b2da63cce37
510
py
Python
degmo/data/__init__.py
IcarusWizard/Deep-Generative-Models
4117c11ad944bdeff106a80adbb3642a076af64e
[ "MIT" ]
2
2019-11-21T15:50:59.000Z
2019-12-17T02:44:19.000Z
degmo/data/__init__.py
IcarusWizard/Deep-Generative-Models
4117c11ad944bdeff106a80adbb3642a076af64e
[ "MIT" ]
null
null
null
degmo/data/__init__.py
IcarusWizard/Deep-Generative-Models
4117c11ad944bdeff106a80adbb3642a076af64e
[ "MIT" ]
1
2021-07-02T05:49:29.000Z
2021-07-02T05:49:29.000Z
from .registry import add_dataset, make_dataset add_dataset('bmnist', 'degmo.data.datasets:load_bmnist') add_dataset('mnist', 'degmo.data.datasets:load_mnist') add_dataset('cifar', 'degmo.data.datasets:load_cifar') add_dataset('svhn', 'degmo.data.datasets:load_svhn') add_dataset('celeba', 'degmo.data.datasets:load_celeba') add_dataset('celeba32', 'degmo.data.datasets:load_celeba32') add_dataset('celeba64', 'degmo.data.datasets:load_celeba64') add_dataset('celeba128', 'degmo.data.datasets:load_celeba128')
51
62
0.798039
71
510
5.478873
0.253521
0.231362
0.349614
0.431877
0
0
0
0
0
0
0
0.02863
0.041176
510
10
62
51
0.766871
0
0
0
0
0
0.590998
0.491194
0
0
0
0
0
1
0
true
0
0.111111
0
0.111111
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
ccda3534f1181565bc0ad301dc1b42e1005c475b
145
py
Python
test/heat/__init__.py
franklinzhanggis/model-interoperable-engine
40b724813bec9af16f4ca95e36f8ff16be787315
[ "MIT" ]
null
null
null
test/heat/__init__.py
franklinzhanggis/model-interoperable-engine
40b724813bec9af16f4ca95e36f8ff16be787315
[ "MIT" ]
1
2018-11-21T14:13:07.000Z
2018-11-21T14:13:12.000Z
test/heat/__init__.py
franklinzhanggis/model-interoperable-engine
40b724813bec9af16f4ca95e36f8ff16be787315
[ "MIT" ]
4
2018-11-07T15:09:01.000Z
2021-05-12T09:29:27.000Z
"""Model the diffusion of heat over a 2D plate.""" from .bmi_heat import BmiHeat from .heat import solve_2d __all__ = ['BmiHeat', 'solve_2d']
18.125
50
0.717241
23
145
4.217391
0.652174
0.206186
0
0
0
0
0
0
0
0
0
0.024793
0.165517
145
7
51
20.714286
0.77686
0.303448
0
0
0
0
0.157895
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
ccee3785bb13efa5fb5b4d0918d34de21a891871
31
py
Python
TrainHelper/callbacks/__init__.py
MaLiN2223/TrainHelper
0119185c1f260d03c3c364dfeda6271a92e812ef
[ "MIT" ]
1
2018-04-01T21:47:36.000Z
2018-04-01T21:47:36.000Z
TrainHelper/callbacks/__init__.py
MaLiN2223/TrainHelper
0119185c1f260d03c3c364dfeda6271a92e812ef
[ "MIT" ]
null
null
null
TrainHelper/callbacks/__init__.py
MaLiN2223/TrainHelper
0119185c1f260d03c3c364dfeda6271a92e812ef
[ "MIT" ]
null
null
null
from .repeater import Repeater
15.5
30
0.83871
4
31
6.5
0.75
0
0
0
0
0
0
0
0
0
0
0
0.129032
31
1
31
31
0.962963
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
690d423df56b351f8d0c2fb564d3740a8e1acf78
3,178
py
Python
NLP/BERT/utils/optimizer.py
LiuHaolan/models
1639b3039237c3997c51ff87f0b6113bb2e8d236
[ "Apache-2.0" ]
43
2021-06-03T09:07:08.000Z
2022-03-31T15:21:48.000Z
NLP/BERT/utils/optimizer.py
LiuHaolan/models
1639b3039237c3997c51ff87f0b6113bb2e8d236
[ "Apache-2.0" ]
64
2021-05-31T10:34:06.000Z
2022-01-17T03:44:58.000Z
NLP/BERT/utils/optimizer.py
LiuHaolan/models
1639b3039237c3997c51ff87f0b6113bb2e8d236
[ "Apache-2.0" ]
37
2021-07-04T03:13:18.000Z
2022-03-25T07:30:47.000Z
import oneflow.nn as nn import copy import oneflow as flow from typing import List from .lamb_optimizer import LAMB def build_optimizer( optim_name: str, model: nn.Module, lr: float, weight_decay: float, weight_decay_excludes: List[str], clip_grad_max_norm: float = None, clip_grad_norm_type: float = None, ): assert optim_name in [ "adamw", "lamb", ], f"only support adamw and lamb now, but got {optim_name}" params = [] exclude_params = [] use_clip = clip_grad_max_norm is not None and clip_grad_norm_type is not None if use_clip: defaults = { "lr": lr, "clip_grad_max_norm": clip_grad_max_norm, "clip_grad_norm_type": clip_grad_norm_type, } else: defaults = {"lr": lr} hyperparameters = copy.copy(defaults) for module_name, param in model.named_parameters(): add_to_exclude = False for exclude_name in weight_decay_excludes: if module_name.find(exclude_name) != -1: exclude_params.append(param) add_to_exclude = True break if not add_to_exclude: params.append(param) all_params = [ {"params": params, "weight_decay": weight_decay, **hyperparameters,}, {"params": exclude_params, "weight_decay": 0.0, **hyperparameters,}, ] if optim_name == "adamw": return flow.optim.AdamW(all_params) elif optim_name == "lamb": return LAMB(all_params) def build_sgd_optimizer( model: nn.Module, lr: float, momentum: float, weight_decay: float, weight_decay_excludes: List[str] = [""], clip_grad_max_norm: float = None, clip_grad_norm_type: float = None, ) -> flow.optim.Optimizer: defaults = {"lr": lr, "momentum": momentum} params = [] exclude_params = [] use_clip = clip_grad_max_norm is not None and clip_grad_norm_type is not None hyperparameters = copy.copy(defaults) for module_name, param in model.named_parameters(): add_to_exclude = False for exclude_name in weight_decay_excludes: if module_name.find(exclude_name) != -1: exclude_params.append(param) add_to_exclude = True break if not add_to_exclude: params.append(param) if use_clip: all_params = [ { "params": params, "clip_grad_max_norm": clip_grad_max_norm, "clip_grad_norm_type": clip_grad_norm_type, "weight_decay": weight_decay, **hyperparameters, }, { "params": exclude_params, "clip_grad_max_norm": clip_grad_max_norm, "clip_grad_norm_type": clip_grad_norm_type, "weight_decay": 0.0, **hyperparameters, }, ] else: all_params = [ {"params": params, "weight_decay": weight_decay, **hyperparameters,}, {"params": exclude_params, "weight_decay": 0.0, **hyperparameters,}, ] return flow.optim.SGD(all_params)
30.854369
81
0.596287
378
3,178
4.677249
0.174603
0.090498
0.062217
0.084842
0.751697
0.722285
0.722285
0.722285
0.700226
0.700226
0
0.003641
0.308685
3,178
102
82
31.156863
0.801092
0
0
0.591398
0
0
0.095658
0
0
0
0
0
0.010753
1
0.021505
false
0
0.053763
0
0.107527
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
691e85318ae2703476c6c8f7f6131a1dbde97875
116
py
Python
function/function_local.py
mrgiser/helloworld-python
7af347e125e7189f4ed26c24d25e4c7664072892
[ "Apache-2.0" ]
null
null
null
function/function_local.py
mrgiser/helloworld-python
7af347e125e7189f4ed26c24d25e4c7664072892
[ "Apache-2.0" ]
null
null
null
function/function_local.py
mrgiser/helloworld-python
7af347e125e7189f4ed26c24d25e4c7664072892
[ "Apache-2.0" ]
null
null
null
x = 50 def func(x): print('x is', x) x = 2 print('Changed local x to', x) func(x) print('x is still', x)
16.571429
34
0.534483
24
116
2.583333
0.458333
0.16129
0.322581
0.354839
0.419355
0
0
0
0
0
0
0.035714
0.275862
116
7
35
16.571429
0.702381
0
0
0
0
0
0.273504
0
0
0
0
0
0
1
0.142857
false
0
0
0
0.142857
0.428571
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
695ae51d154d524aa62286f55a79b7fe82efa531
7,933
py
Python
projects/vdk-core/tests/functional/ingestion/test_ingest_chain.py
alod83/versatile-data-kit
9ca672d3929eb3dc6fe5c677e8c8a75e2a0d2be8
[ "Apache-2.0" ]
100
2021-10-04T09:32:04.000Z
2022-03-30T11:23:53.000Z
projects/vdk-core/tests/functional/ingestion/test_ingest_chain.py
alod83/versatile-data-kit
9ca672d3929eb3dc6fe5c677e8c8a75e2a0d2be8
[ "Apache-2.0" ]
208
2021-10-04T16:56:40.000Z
2022-03-31T10:41:44.000Z
projects/vdk-core/tests/functional/ingestion/test_ingest_chain.py
alod83/versatile-data-kit
9ca672d3929eb3dc6fe5c677e8c8a75e2a0d2be8
[ "Apache-2.0" ]
14
2021-10-11T14:15:13.000Z
2022-03-11T13:39:17.000Z
# Copyright 2021 VMware, Inc. # SPDX-License-Identifier: Apache-2.0 """ Functional test aiming at verifying the end-to-end operation of the ingestion plugins chaining functionality """ import logging import os from unittest import mock from click.testing import Result from vdk.plugin.test_utils.ingest_util_plugins import AddPayloadSizeAsColumn from vdk.plugin.test_utils.ingest_util_plugins import ConvertPayloadValuesToString from vdk.plugin.test_utils.ingest_util_plugins import DummyIngestionPlugin from vdk.plugin.test_utils.util_funcs import cli_assert_equal from vdk.plugin.test_utils.util_funcs import CliEntryBasedTestRunner from vdk.plugin.test_utils.util_funcs import jobs_path_from_caller_directory from vdk.plugin.test_utils.util_plugins import IngestIntoMemoryPlugin log = logging.getLogger(__name__) def get_shared_result_data(): expected_object = dict( int_key=str(42), str_key="example_str", bool_key=str(True), float_key=str(1.23), nested=str(dict(key="value")), payload_size=163, ) expected_rows_object = {"first": "two", "payload_size": 80, "second": "2"} return expected_object, expected_rows_object # INGEST_PAYLOAD_PREPROCESS_SEQUENCE="" @mock.patch.dict( os.environ, {"VDK_INGEST_METHOD_DEFAULT": "memory"}, ) def test_ingest_no_preprocessing(): ingest_plugin = IngestIntoMemoryPlugin() runner = CliEntryBasedTestRunner(ingest_plugin) result: Result = runner.invoke( ["run", jobs_path_from_caller_directory("no-ingest-method-job")] ) cli_assert_equal(0, result) expected_object = dict( int_key=42, str_key="example_str", bool_key=True, float_key=1.23, nested=dict(key="value"), ) assert ingest_plugin.payloads[0].payload[0] == expected_object assert ingest_plugin.payloads[0].destination_table == "object_table" expected_rows_object = {"first": "two", "second": 2} assert ingest_plugin.payloads[1].payload[0] == expected_rows_object assert ingest_plugin.payloads[1].destination_table == "tabular_table" # INGEST_PAYLOAD_PREPROCESS_SEQUENCE=A,B in job code method = C @mock.patch.dict( os.environ, {"VDK_INGEST_PAYLOAD_PREPROCESS_SEQUENCE": "convert-to-string," "add-payload-size"}, ) def test_chained_ingest_direct_method_passed(): pre_ingest_plugin = ConvertPayloadValuesToString() payload_size_plugin = AddPayloadSizeAsColumn() ingest_plugin = IngestIntoMemoryPlugin() runner = CliEntryBasedTestRunner( pre_ingest_plugin, payload_size_plugin, ingest_plugin ) expected_object, expected_rows_object = get_shared_result_data() # Use a sample data job, in which `method` argument is passed to ingestion # method calls. result: Result = runner.invoke( ["run", jobs_path_from_caller_directory("test-ingest-job")] ) cli_assert_equal(0, result) assert ingest_plugin.payloads[0].payload[0] == expected_object assert ingest_plugin.payloads[0].destination_table == "object_table" assert ingest_plugin.payloads[1].payload[0] == expected_rows_object assert ingest_plugin.payloads[1].destination_table == "tabular_table" # INGEST_PAYLOAD_PREPROCESS_SEQUENCE=A,B no ingest method specified @mock.patch.dict( os.environ, {"VDK_INGEST_PAYLOAD_PREPROCESS_SEQUENCE": "convert-to-string," "add-payload-size"}, ) def test_chained_ingest_no_method_passed(): pre_ingest_plugin = ConvertPayloadValuesToString() payload_size_plugin = AddPayloadSizeAsColumn() runner = CliEntryBasedTestRunner(pre_ingest_plugin, payload_size_plugin) # Use a sample data job, in which `method` argument is not passed to # ingestion method calls, thus causing an User Error to be raised. # NOTE: pre-process plugins will not be invoked. result: Result = runner.invoke( ["run", jobs_path_from_caller_directory("no-ingest-method-job")] ) cli_assert_equal(1, result) assert "User Error" in result.stdout # INGEST_PAYLOAD_PREPROCESS_SEQUENCE=A,B and VDK_INGEST_METHOD_DEFAULT=C @mock.patch.dict( os.environ, { "VDK_INGEST_PAYLOAD_PREPROCESS_SEQUENCE": "convert-to-string," "add-payload-size", "VDK_INGEST_METHOD_DEFAULT": "memory", }, ) def test_chained_ingest_no_direct_method_passed(): payload_to_string_plugin = ConvertPayloadValuesToString() payload_size_plugin = AddPayloadSizeAsColumn() ingest_plugin = IngestIntoMemoryPlugin() runner = CliEntryBasedTestRunner( payload_to_string_plugin, payload_size_plugin, ingest_plugin ) expected_object, expected_rows_object = get_shared_result_data() # Use a sample data job, in which `method` argument is not passed to # ingestion method calls. result: Result = runner.invoke( ["run", jobs_path_from_caller_directory("no-ingest-method-job")] ) cli_assert_equal(0, result) assert ingest_plugin.payloads[0].payload[0] == expected_object assert ingest_plugin.payloads[0].destination_table == "object_table" assert ingest_plugin.payloads[1].payload[0] == expected_rows_object assert ingest_plugin.payloads[1].destination_table == "tabular_table" # INGEST_PAYLOAD_PREPROCESS_SEQUENCE=A,B and VDK_INGEST_METHOD_DEFAULT=C and # job code is D @mock.patch.dict( os.environ, { "VDK_INGEST_PAYLOAD_PREPROCESS_SEQUENCE": "convert-to-string," "add-payload-size", "VDK_INGEST_METHOD_DEFAULT": "dummy-ingest", }, ) def test_chained_ingest_no_direct_method_passed(): payload_to_string_plugin = ConvertPayloadValuesToString() payload_size_plugin = AddPayloadSizeAsColumn() dummy_ingest_plugin = DummyIngestionPlugin() ingest_plugin = IngestIntoMemoryPlugin() runner = CliEntryBasedTestRunner( payload_to_string_plugin, payload_size_plugin, dummy_ingest_plugin, ingest_plugin, ) expected_object, expected_rows_object = get_shared_result_data() # Use a sample data job, in which `method` argument is not passed to # ingestion method calls. result: Result = runner.invoke( ["run", jobs_path_from_caller_directory("test-ingest-job")] ) cli_assert_equal(0, result) assert ingest_plugin.payloads[0].payload[0] == expected_object assert ingest_plugin.payloads[0].destination_table == "object_table" assert ingest_plugin.payloads[1].payload[0] == expected_rows_object assert ingest_plugin.payloads[1].destination_table == "tabular_table" # INGEST_PAYLOAD_PREPROCESS_SEQUENCE=A,B - A,B are used for pre-processing, # B is used for ingesting and post-processing. # TODO: modify add-payload-size plugin to expose the result from post-ingestion # to verify post-processor operations @mock.patch.dict( os.environ, { "VDK_INGEST_PAYLOAD_PREPROCESS_SEQUENCE": "convert-to-string," "add-payload-size", "VDK_INGEST_METHOD_DEFAULT": "add-payload-size", "VDK_INGEST_PAYLOAD_POSTPROCESS_SEQUENCE": "add-payload-size", }, ) def test_end_to_end_ingestion_capabilities(): payload_to_string_plugin = ConvertPayloadValuesToString() payload_size_plugin = AddPayloadSizeAsColumn() runner = CliEntryBasedTestRunner(payload_to_string_plugin, payload_size_plugin) expected_object, expected_rows_object = get_shared_result_data() # Use a sample data job, in which `method` argument is not passed to # ingestion method calls. result: Result = runner.invoke( ["run", jobs_path_from_caller_directory("no-ingest-method-job")] ) cli_assert_equal(0, result) assert payload_size_plugin.payloads[0].payload[0] == expected_object assert payload_size_plugin.payloads[0].destination_table == "object_table" assert payload_size_plugin.payloads[1].payload[0] == expected_rows_object assert payload_size_plugin.payloads[1].destination_table == "tabular_table"
35.895928
88
0.744989
996
7,933
5.614458
0.148594
0.064378
0.051502
0.074392
0.81706
0.769134
0.756617
0.72872
0.680079
0.620887
0
0.008864
0.160973
7,933
220
89
36.059091
0.83128
0.161099
0
0.522876
0
0
0.134491
0.04966
0
0
0
0.004545
0.183007
1
0.045752
false
0.026144
0.071895
0
0.124183
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
695c8a0a4781bd01bf87b3f36897261c56feb21e
205
py
Python
manage.py
GnomGad/KworkBrowser
34c016dd5c6d1da0773c8ae10d6f03da8f993e20
[ "MIT" ]
null
null
null
manage.py
GnomGad/KworkBrowser
34c016dd5c6d1da0773c8ae10d6f03da8f993e20
[ "MIT" ]
2
2021-03-31T19:56:35.000Z
2021-12-13T20:45:55.000Z
manage.py
GnomGad/KworkBrowser
34c016dd5c6d1da0773c8ae10d6f03da8f993e20
[ "MIT" ]
1
2021-02-24T15:29:35.000Z
2021-02-24T15:29:35.000Z
import sys from src.core import execute_from_command_line def main(): execute_from_command_line(sys.argv[1:]) #execute_from_command_line(["get","-p","0"]) if __name__ == "__main__": main()
17.083333
48
0.697561
30
205
4.2
0.566667
0.261905
0.428571
0.52381
0
0
0
0
0
0
0
0.011494
0.15122
205
12
49
17.083333
0.712644
0.209756
0
0
0
0
0.049383
0
0
0
0
0
0
1
0.166667
true
0
0.333333
0
0.5
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
15f4c628f237c49b29f3b51e444e62bb6383a0fc
215
py
Python
Week 1 In-out, int and bool/Task07.py
retverd/python_hse
cb9bfb092c1cf68ae0c53b9919ca24a71a8cbf88
[ "MIT" ]
null
null
null
Week 1 In-out, int and bool/Task07.py
retverd/python_hse
cb9bfb092c1cf68ae0c53b9919ca24a71a8cbf88
[ "MIT" ]
null
null
null
Week 1 In-out, int and bool/Task07.py
retverd/python_hse
cb9bfb092c1cf68ae0c53b9919ca24a71a8cbf88
[ "MIT" ]
null
null
null
# По закону Ома U = IR (напряжение равно произведению силы тока на сопротивление). Определите U (напряжение), если # I = 102341132412344234, R = 9876387639476324727. print(102341132412344234 * 9876387639476324727)
43
114
0.790698
23
215
7.391304
0.826087
0
0
0
0
0
0
0
0
0
0
0.397849
0.134884
215
4
115
53.75
0.516129
0.748837
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
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
15ff4bf701b509ea317a6c1c87735ea9acecf54c
10,311
py
Python
backend/tests/internal/data/conners3_self_scores.py
mkokotovich/cbcl_scoring
86d8f636a980bce45fcf5fc7eccac5dffddfd3b8
[ "MIT" ]
null
null
null
backend/tests/internal/data/conners3_self_scores.py
mkokotovich/cbcl_scoring
86d8f636a980bce45fcf5fc7eccac5dffddfd3b8
[ "MIT" ]
17
2019-12-26T16:45:10.000Z
2022-03-21T22:16:37.000Z
backend/tests/internal/data/conners3_self_scores.py
mkokotovich/testscoring
bc176caf37a2980d85a722efa919f416c9758a0e
[ "MIT" ]
null
null
null
scores = {"scores": [{"group": "IN", "score": 25.0}, {"group": "HY", "score": 13.0}, {"group": "LP", "score": 8.0}, {"group": "AG", "score": 5.0}, {"group": "FR", "score": 5.0}, {"group": "AN", "score": 26.0}, {"group": "AH", "score": 15.0}, {"group": "CD", "score": 2.0}, {"group": "OD", "score": 10.0}, {"group": "PI", "score": 0.0}, {"group": "NI", "score": 2.0}, {"group": "ADHD Inattentive Symptom Count", "score": "6 (A1a, A1b, A1c, A1g, A1h, A1i)"}, {"group": "ADHD Hyperactive Impulsive Symptom Count", "score": "3 (A2e, A2h, A2i)"}], "test": {"id": 38, "items": [{"id": 2713, "number": "1", "description": "", "score": "1", "group": "OD", "groups": ["OD"]}, {"id": 2714, "number": "2", "description": "", "score": "3", "group": "none", "groups": ["none"]}, {"id": 2715, "number": "3", "description": "", "score": "1", "group": "OD", "groups": ["OD"]}, {"id": 2716, "number": "4", "description": "", "score": "0", "group": "HY", "groups": ["HY"]}, {"id": 2717, "number": "5", "description": "", "score": "2", "group": "AN", "groups": ["AN"]}, {"id": 2718, "number": "6", "description": "", "score": "2", "group": "HY|AH", "groups": ["HY", "AH"]}, {"id": 2719, "number": "7", "description": "", "score": "1", "group": "HY|AH", "groups": ["HY", "AH"]}, {"id": 2720, "number": "8", "description": "", "score": "0", "group": "AG|CD", "groups": ["AG", "CD"]}, {"id": 2721, "number": "9", "description": "", "score": "0", "group": "HY|AH", "groups": ["HY", "AH"]}, {"id": 2722, "number": "10", "description": "", "score": "0", "group": "NI", "groups": ["NI"]}, {"id": 2723, "number": "11", "description": "", "score": "0", "group": "NI", "groups": ["NI"]}, {"id": 2724, "number": "12", "description": "", "score": "0", "group": "PI", "groups": ["PI"]}, {"id": 2725, "number": "13", "description": "", "score": "0", "group": "CD", "groups": ["CD"]}, {"id": 2726, "number": "14", "description": "", "score": "1", "group": "FR", "groups": ["FR"]}, {"id": 2727, "number": "15", "description": "", "score": "1", "group": "LP", "groups": ["LP"]}, {"id": 2728, "number": "16", "description": "", "score": "2", "group": "AG|CD", "groups": ["AG", "CD"]}, {"id": 2729, "number": "17", "description": "", "score": "2", "group": "IN|AN", "groups": ["IN", "AN"]}, {"id": 2730, "number": "18", "description": "", "score": "1", "group": "AG", "groups": ["AG"]}, {"id": 2731, "number": "19", "description": "", "score": "0", "group": "NI", "groups": ["NI"]}, {"id": 2732, "number": "20", "description": "", "score": "1", "group": "HY|AH", "groups": ["HY", "AH"]}, {"id": 2733, "number": "21", "description": "", "score": "1", "group": "AN", "groups": ["AN"]}, {"id": 2734, "number": "22", "description": "", "score": "0", "group": "AG", "groups": ["AG"]}, {"id": 2735, "number": "23", "description": "", "score": "0", "group": "FR", "groups": ["FR"]}, {"id": 2736, "number": "24", "description": "", "score": "2", "group": "OD", "groups": ["OD"]}, {"id": 2737, "number": "25", "description": "", "score": "0", "group": "CD|AG", "groups": ["CD", "AG"]}, {"id": 2738, "number": "26", "description": "", "score": "1", "group": "FR", "groups": ["FR"]}, {"id": 2739, "number": "27", "description": "", "score": "2", "group": "AH", "groups": ["AH"]}, {"id": 2740, "number": "28", "description": "", "score": "1", "group": "NI", "groups": ["NI"]}, {"id": 2741, "number": "29", "description": "", "score": "3", "group": "none", "groups": ["none"]}, {"id": 2742, "number": "30", "description": "", "score": "1", "group": "IN", "groups": ["IN"]}, {"id": 2743, "number": "31", "description": "", "score": "3", "group": "IN|AN", "groups": ["IN", "AN"]}, {"id": 2744, "number": "32", "description": "", "score": "3", "group": "AN", "groups": ["AN"]}, {"id": 2745, "number": "33", "description": "", "score": "0", "group": "AG|CD", "groups": ["AG", "CD"]}, {"id": 2746, "number": "34", "description": "", "score": "1", "group": "HY|AH", "groups": ["HY", "AH"]}, {"id": 2747, "number": "35", "description": "", "score": "0", "group": "LP", "groups": ["LP"]}, {"id": 2748, "number": "36", "description": "", "score": "2", "group": "none", "groups": ["none"]}, {"id": 2749, "number": "37", "description": "", "score": "0", "group": "PI", "groups": ["PI"]}, {"id": 2750, "number": "38", "description": "", "score": "0", "group": "AG|CD", "groups": ["AG", "CD"]}, {"id": 2751, "number": "39", "description": "", "score": "3", "group": "AN", "groups": ["AN"]}, {"id": 2752, "number": "40", "description": "", "score": "1", "group": "NI", "groups": ["NI"]}, {"id": 2753, "number": "41", "description": "", "score": "0", "group": "NI", "groups": ["NI"]}, {"id": 2754, "number": "42", "description": "", "score": "3", "group": "AN", "groups": ["AN"]}, {"id": 2755, "number": "43", "description": "", "score": "3", "group": "IN", "groups": ["IN"]}, {"id": 2756, "number": "44", "description": "", "score": "1", "group": "none", "groups": ["none"]}, {"id": 2757, "number": "45", "description": "", "score": "1", "group": "LP", "groups": ["LP"]}, {"id": 2758, "number": "46", "description": "", "score": "2", "group": "none", "groups": ["none"]}, {"id": 2759, "number": "47", "description": "", "score": "0", "group": "CD", "groups": ["CD"]}, {"id": 2760, "number": "48", "description": "", "score": "0", "group": "PI", "groups": ["PI"]}, {"id": 2761, "number": "49", "description": "", "score": "2", "group": "IN", "groups": ["IN"]}, {"id": 2762, "number": "50", "description": "", "score": "1", "group": "HY", "groups": ["HY"]}, {"id": 2763, "number": "51", "description": "", "score": "2", "group": "AN", "groups": ["AN"]}, {"id": 2764, "number": "52", "description": "", "score": "0", "group": "AG|CD", "groups": ["AG", "CD"]}, {"id": 2765, "number": "53", "description": "", "score": "0", "group": "IN", "groups": ["IN"]}, {"id": 2766, "number": "54", "description": "", "score": "0", "group": "PI", "groups": ["PI"]}, {"id": 2767, "number": "55", "description": "", "score": "3", "group": "AH", "groups": ["AH"]}, {"id": 2768, "number": "56", "description": "", "score": "0", "group": "LP", "groups": ["LP"]}, {"id": 2769, "number": "57", "description": "", "score": "1", "group": "HY", "groups": ["HY"]}, {"id": 2770, "number": "58", "description": "", "score": "2", "group": "LP", "groups": ["LP"]}, {"id": 2771, "number": "59", "description": "", "score": "0", "group": "AG|CD", "groups": ["AG", "CD"]}, {"id": 2772, "number": "60", "description": "", "score": "2", "group": "HY|AH", "groups": ["HY", "AH"]}, {"id": 2773, "number": "61", "description": "", "score": "1", "group": "AN", "groups": ["AN"]}, {"id": 2774, "number": "62", "description": "", "score": "1", "group": "AG|OD", "groups": ["AG", "OD"]}, {"id": 2775, "number": "63", "description": "", "score": "3", "group": "IN|AN", "groups": ["IN", "AN"]}, {"id": 2776, "number": "64", "description": "", "score": "1", "group": "HY|AH", "groups": ["HY", "AH"]}, {"id": 2777, "number": "65", "description": "", "score": "2", "group": "LP", "groups": ["LP"]}, {"id": 2778, "number": "66", "description": "", "score": "1", "group": "HY|AH", "groups": ["HY", "AH"]}, {"id": 2779, "number": "67", "description": "", "score": "2", "group": "OD", "groups": ["OD"]}, {"id": 2780, "number": "68", "description": "", "score": "3", "group": "none", "groups": ["none"]}, {"id": 2781, "number": "69", "description": "", "score": "1", "group": "FR", "groups": ["FR"]}, {"id": 2782, "number": "70", "description": "", "score": "0", "group": "LP", "groups": ["LP"]}, {"id": 2783, "number": "71", "description": "", "score": "2", "group": "IN", "groups": ["IN"]}, {"id": 2784, "number": "72", "description": "", "score": "0", "group": "AG|CD", "groups": ["AG", "CD"]}, {"id": 2785, "number": "73", "description": "", "score": "0", "group": "FR", "groups": ["FR"]}, {"id": 2786, "number": "74", "description": "", "score": "1", "group": "OD", "groups": ["OD"]}, {"id": 2787, "number": "75", "description": "", "score": "0", "group": "PI", "groups": ["PI"]}, {"id": 2788, "number": "76", "description": "", "score": "2", "group": "LP", "groups": ["LP"]}, {"id": 2789, "number": "77", "description": "", "score": "3", "group": "IN|AN", "groups": ["IN", "AN"]}, {"id": 2790, "number": "78", "description": "", "score": "0", "group": "CD", "groups": ["CD"]}, {"id": 2791, "number": "79", "description": "", "score": "3", "group": "IN", "groups": ["IN"]}, {"id": 2792, "number": "80", "description": "", "score": "3", "group": "none", "groups": ["none"]}, {"id": 2793, "number": "81", "description": "", "score": "3", "group": "IN", "groups": ["IN"]}, {"id": 2794, "number": "82", "description": "", "score": "0", "group": "AG|CD", "groups": ["AG", "CD"]}, {"id": 2795, "number": "83", "description": "", "score": "1", "group": "FR", "groups": ["FR"]}, {"id": 2796, "number": "84", "description": "", "score": "1", "group": "HY|AH", "groups": ["HY", "AH"]}, {"id": 2797, "number": "85", "description": "", "score": "1", "group": "FR", "groups": ["FR"]}, {"id": 2798, "number": "86", "description": "", "score": "0", "group": "AG|CD", "groups": ["AG", "CD"]}, {"id": 2799, "number": "87", "description": "", "score": "1", "group": "OD", "groups": ["OD"]}, {"id": 2800, "number": "88", "description": "", "score": "1", "group": "HY", "groups": ["HY"]}, {"id": 2801, "number": "89", "description": "", "score": "0", "group": "FR", "groups": ["FR"]}, {"id": 2802, "number": "90", "description": "", "score": "3", "group": "none", "groups": ["none"]}, {"id": 2803, "number": "91", "description": "", "score": "0", "group": "AG|CD", "groups": ["AG", "CD"]}, {"id": 2804, "number": "92", "description": "", "score": "0", "group": "HY", "groups": ["HY"]}, {"id": 2805, "number": "93", "description": "", "score": "0", "group": "PI", "groups": ["PI"]}, {"id": 2806, "number": "94", "description": "", "score": "1", "group": "AG|OD", "groups": ["AG", "OD"]}, {"id": 2807, "number": "95", "description": "", "score": "2", "group": "none", "groups": ["none"]}, {"id": 2808, "number": "96", "description": "", "score": "3", "group": "none", "groups": ["none"]}, {"id": 2809, "number": "97", "description": "", "score": "2", "group": "none", "groups": ["none"]}], "created_at": "2018-10-03T03:46:56.800074Z", "updated_at": "2018-10-03T03:46:56.800125Z", "client_number": "1917", "test_type": "conners3_self", "owner": 3}}
10,311
10,311
0.485501
1,229
10,311
4.069162
0.198535
0.310338
0.115577
0.14957
0.672266
0.629274
0.622476
0.602679
0.167167
0.167167
0
0.083656
0.123557
10,311
1
10,311
10,311
0.469736
0
0
0
0
0
0.450446
0.005237
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
c60e595ab7176fb758fea0c1ce9333da5fd788f2
57
py
Python
appengine-vmruntime/vmruntime/chainmap/__init__.py
speedplane/python-compat-runtime
743ade7e1350c790c4aaa48dd2c0893d06d80cee
[ "Apache-2.0" ]
16
2016-04-23T20:16:12.000Z
2021-10-09T16:58:25.000Z
appengine-vmruntime/vmruntime/chainmap/__init__.py
speedplane/python-compat-runtime
743ade7e1350c790c4aaa48dd2c0893d06d80cee
[ "Apache-2.0" ]
53
2016-04-06T21:10:43.000Z
2018-03-19T23:14:33.000Z
appengine-vmruntime/vmruntime/chainmap/__init__.py
speedplane/python-compat-runtime
743ade7e1350c790c4aaa48dd2c0893d06d80cee
[ "Apache-2.0" ]
23
2016-04-19T05:45:26.000Z
2021-12-31T23:22:36.000Z
from .chainmap import * from .version import __version__
19
32
0.807018
7
57
6
0.571429
0
0
0
0
0
0
0
0
0
0
0
0.140351
57
2
33
28.5
0.857143
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
c63dbc2863237eaf1838015c774cffbd3d356780
61
py
Python
flai/utils/__init__.py
deepair-io/flai
edbf74285e24f8605a625edf3a1c73ebae79a6de
[ "Apache-2.0" ]
6
2021-09-20T14:41:31.000Z
2021-12-05T03:56:09.000Z
flai/utils/__init__.py
deepair-io/flai
edbf74285e24f8605a625edf3a1c73ebae79a6de
[ "Apache-2.0" ]
null
null
null
flai/utils/__init__.py
deepair-io/flai
edbf74285e24f8605a625edf3a1c73ebae79a6de
[ "Apache-2.0" ]
1
2022-02-15T13:27:31.000Z
2022-02-15T13:27:31.000Z
from .colorize import colorize from .seeding import np_random
30.5
30
0.852459
9
61
5.666667
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.114754
61
2
31
30.5
0.944444
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
c6418ff0932b01b0f7a715f25ef41a4bc3dab8f4
71
py
Python
languages/python/oso/polar/__main__.py
connec/oso
a12d94206807b69beb6fe7a9070b9afcacdfc845
[ "Apache-2.0" ]
2,167
2020-07-28T15:49:48.000Z
2022-03-31T06:11:28.000Z
languages/python/oso/polar/__main__.py
connec/oso
a12d94206807b69beb6fe7a9070b9afcacdfc845
[ "Apache-2.0" ]
1,060
2020-07-25T18:37:07.000Z
2022-03-30T05:49:44.000Z
languages/python/oso/polar/__main__.py
connec/oso
a12d94206807b69beb6fe7a9070b9afcacdfc845
[ "Apache-2.0" ]
118
2020-08-05T19:27:14.000Z
2022-03-31T16:37:39.000Z
import sys from .polar import Polar Polar().repl(files=sys.argv[1:])
11.833333
32
0.71831
12
71
4.25
0.666667
0
0
0
0
0
0
0
0
0
0
0.016129
0.126761
71
5
33
14.2
0.806452
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
c649dd97f8ddcd91c5e233d4ab917c19e52ffdfa
730
py
Python
backend/api/permissions.py
internetfett/grocery-list
3a5cc97bba0d85469d7352447158d84748041015
[ "MIT" ]
null
null
null
backend/api/permissions.py
internetfett/grocery-list
3a5cc97bba0d85469d7352447158d84748041015
[ "MIT" ]
null
null
null
backend/api/permissions.py
internetfett/grocery-list
3a5cc97bba0d85469d7352447158d84748041015
[ "MIT" ]
null
null
null
from rest_framework import permissions class IsOwnerOrListing(permissions.BasePermission): """ Custom permission to only allow owners of an object to edit it. """ def has_permission(self, request, view): return True def has_object_permission(self, request, view, obj): return obj.user == request.user class IsRelatedOwnerOrListing(permissions.BasePermission): """ Custom permission to only allow owners of an object (via fkey) to edit it. """ def has_permission(self, request, view): return True def has_object_permission(self, request, view, obj): related_obj = getattr(obj, view.owner_related_field) return related_obj.user == request.user
27.037037
78
0.7
90
730
5.555556
0.388889
0.048
0.168
0.2
0.628
0.628
0.628
0.628
0.628
0.628
0
0
0.219178
730
26
79
28.076923
0.877193
0.189041
0
0.5
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.083333
0.25
0.916667
0
0
0
0
null
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
c65151ed2dbb1de0daaa7cee08a6911d56bf0898
13,429
py
Python
server/src/dixit/game/test/round.py
rcjsuen/dixit-online
e7a1c9b5b1a2a92160c6d90397adaa81ddcae91a
[ "MIT" ]
75
2016-08-05T10:37:32.000Z
2022-01-27T17:05:50.000Z
server/src/dixit/game/test/round.py
rcjsuen/dixit-online
e7a1c9b5b1a2a92160c6d90397adaa81ddcae91a
[ "MIT" ]
15
2020-03-19T16:27:59.000Z
2022-02-13T08:41:54.000Z
server/src/dixit/game/test/round.py
rcjsuen/dixit-online
e7a1c9b5b1a2a92160c6d90397adaa81ddcae91a
[ "MIT" ]
27
2018-02-27T13:32:46.000Z
2021-12-26T06:42:08.000Z
from django.test import TestCase from django.contrib.auth.models import User from dixit import settings from dixit.game.models.game import Game from dixit.game.models.player import Player from dixit.game.models.round import Round, RoundStatus, Play from dixit.game.models.card import Card from dixit.game.exceptions import GameInvalidPlay, GameRoundIncomplete, GameDeckExhausted class PlayTest(TestCase): fixtures = ['game_testcards.json', ] def setUp(self): self.user = User.objects.create(username='test', email='test@localhost', password='test') self.user2 = User.objects.create(username='test2', email='test2@localhost', password='test') self.user3 = User.objects.create(username='test3', email='test3@localhost', password='test') self.game = Game.new_game(name='test', user=self.user, player_name='storyteller') self.current = self.game.current_round self.player2 = self.game.add_player(self.user2, 'player2') self.player3 = self.game.add_player(self.user3, 'player3') def test_play_can_be_performed_for_round(self): story_card = self.game.storyteller._pick_card() Play.play_for_round(self.current, self.game.storyteller, story_card, 'story') self.assertEqual(self.current.plays.count(), 1) def test_storyteller_can_provide_card(self): story_play = Play(game_round=self.current, player=self.game.storyteller) story_play.provide_card(self.game.storyteller._pick_card(), 'story') self.assertEqual(self.current.plays.count(), 1) def test_players_cant_provide_card_before_storyteller(self): with self.assertRaises(GameInvalidPlay): Play.play_for_round(self.current, self.player2, self.player2._pick_card()) def test_players_can_provide_card_after_storyteller(self): Play.play_for_round(self.current, self.game.storyteller, self.game.storyteller._pick_card(), 'story') Play.play_for_round(self.current, self.player2, self.player2._pick_card()) self.assertEqual(self.current.plays.count(), 2) def test_players_can_not_provide_card_after_voting(self): # TODO pass def test_players_can_choose_played_card(self): story_card = self.game.storyteller._pick_card() story_play = Play.play_for_round(self.current, self.game.storyteller, story_card, 'story') play2 = Play.play_for_round(self.current, self.player2, self.player2._pick_card()) play3 = Play.play_for_round(self.current, self.player3, self.player3._pick_card()) self.assertEqual(self.current.status, RoundStatus.VOTING) play2.vote_card(story_card) def test_players_can_not_choose_unplayed_card(self): story_card = self.game.storyteller._pick_card() story_play = Play.play_for_round(self.current, self.game.storyteller, story_card, 'story') card2 = self.player2._pick_card() play2 = Play.play_for_round(self.current, self.player2, card2) with self.assertRaises(GameInvalidPlay): other_card = Card.objects.available_for_game(self.game)[0] play2.vote_card(other_card) def test_players_can_not_choose_own_card(self): story_card = self.game.storyteller._pick_card() story_play = Play.play_for_round(self.current, self.game.storyteller, story_card, 'story') card2 = self.player2._pick_card() play2 = Play.play_for_round(self.current, self.player2, card2) with self.assertRaises(GameInvalidPlay): play2.vote_card(card2) def test_storytellers_cant_vote_card(self): story_card = self.game.storyteller._pick_card() story_play = Play.play_for_round(self.current, self.game.storyteller, story_card, 'story') card2 = self.player2._pick_card() play2 = Play.play_for_round(self.current, self.player2, card2) with self.assertRaises(GameInvalidPlay): story_play.vote_card(card2) class RoundTest(TestCase): fixtures = ['game_testcards.json', ] def setUp(self): self.user = User.objects.create(username='test', email='test@localhost', password='test') self.user2 = User.objects.create(username='test2', email='test2@localhost', password='test') self.user3 = User.objects.create(username='test3', email='test3@localhost', password='test') self.user4 = User.objects.create(username='test4', email='test4@localhost', password='test') self.game = Game.new_game(name='test', user=self.user, player_name='storyteller') self.current = self.game.current_round self.player2 = self.game.add_player(self.user2, 'player2') self.player3 = self.game.add_player(self.user3, 'player3') def test_round_starts_new(self): self.assertEqual(self.current.status, RoundStatus.NEW) def test_round_is_new_when_only_storyteller_has_played(self): story_card = self.game.storyteller._pick_card() Play.play_for_round(self.current, self.game.storyteller, story_card, 'story') self.assertEqual(self.current.status, RoundStatus.NEW) def test_round_is_providing_until_all_players_have_provided(self): story_card = self.game.storyteller._pick_card() Play.play_for_round(self.current, self.game.storyteller, story_card, 'story') players = self.game.players.exclude(id=self.game.storyteller.id) for player in players[1:]: Play.play_for_round(self.current, player, player._pick_card()) self.assertEqual(self.current.status, RoundStatus.PROVIDING) def test_round_is_voting_when_all_players_have_provided_a_card(self): Play.play_for_round(self.current, self.game.storyteller, self.game.storyteller._pick_card(), 'story') players = self.game.players.all().exclude(id=self.game.storyteller.id) for player in players: Play.play_for_round(self.current, player, player._pick_card()) self.assertEqual(self.current.status, RoundStatus.VOTING) def test_round_is_voting_until_all_players_have_voted(self): story_card = self.current.turn._pick_card() Play.play_for_round(self.current, self.game.storyteller, story_card, 'story') players = self.game.players.all().exclude(id=self.game.storyteller.id) for player in players: Play.play_for_round(self.current, player, player._pick_card()) plays = self.current.plays.all().exclude(player=self.game.storyteller) for play in plays[1:]: play.vote_card(story_card) self.assertEqual(self.current.status, RoundStatus.VOTING) def test_round_is_complete_when_all_players_have_voted(self): story_card = self.current.turn._pick_card() Play.play_for_round(self.current, self.game.storyteller, story_card, 'story') players = self.game.players.all().exclude(id=self.game.storyteller.id) for player in players: Play.play_for_round(self.current, player, player._pick_card()) plays = self.current.plays.all().exclude(player=self.game.storyteller) for play in plays: play.vote_card(story_card) self.assertEqual(self.current.status, RoundStatus.COMPLETE) def test_round_deals_hands_once_to_players(self): game_round = Round(game=self.game, number=self.current.number + 1, turn=self.current.turn) game_round.deal() game_round.deal() game_round.deal() hand_sizes = (p.cards.count() for p in self.game.players.all()) self.assertTrue(all(s == settings.GAME_HAND_SIZE for s in hand_sizes)) def test_round_deals_system_card(self): game_round = Round(game=self.game, number=self.current.number + 1, turn=self.current.turn) game_round.deal() self.assertTrue(game_round.card is not None) def test_round_deals_system_card_once(self): game_round = Round(game=self.game, number=self.current.number + 1, turn=self.current.turn) game_round.deal() system_card = game_round.card game_round.deal() self.assertEqual(system_card, game_round.card) def test_deal_fails_when_not_enough_cards_available(self): max_players = Card.objects.count() // (settings.GAME_HAND_SIZE + 1) for i in range(max_players + 1): test_username = 'test_n_{}'.format(i) test_email = '{}@localhost'.format(test_username) user = User.objects.create(username=test_username, email=test_email, password='test') Player.objects.create(game=self.game, user=user, name='player_{}'.format(i)) new_round = Round(game=self.game, number=self.current.number + 1, turn=self.current.turn) with self.assertRaises(GameDeckExhausted): new_round.deal() def test_new_round_can_not_be_closed(self): self.assertEqual(self.current.status, RoundStatus.NEW) self.assertRaises(GameRoundIncomplete, self.current.close) def test_providing_round_can_not_be_closed(self): story_card = self.current.turn._pick_card() story_play = Play.play_for_round(self.current, self.current.turn, story_card, 'test') Play.play_for_round(self.current, self.player2, self.player2._pick_card()) self.assertEqual(self.current.status, RoundStatus.PROVIDING) self.assertRaises(GameRoundIncomplete, self.current.close) def test_voting_round_can_not_be_closed(self): story_card = self.current.turn._pick_card() Play.play_for_round(self.current, self.game.storyteller, story_card, 'story') players = self.game.players.all().exclude(id=self.game.storyteller.id) for player in players: Play.play_for_round(self.current, player, player._pick_card()) plays = self.current.plays.all().exclude(player=self.game.storyteller) for play in plays[1:]: play.vote_card(story_card) self.assertEqual(self.current.status, RoundStatus.VOTING) self.assertRaises(GameRoundIncomplete, self.current.close) def test_complete_round_can_be_closed(self): story_card = self.current.turn._pick_card() Play.play_for_round(self.current, self.game.storyteller, story_card, 'story') players = self.game.players.all().exclude(id=self.game.storyteller.id) for player in players: Play.play_for_round(self.current, player, player._pick_card()) plays = self.current.plays.all().exclude(player=self.game.storyteller) for play in plays: play.vote_card(story_card) self.assertEqual(self.current.status, RoundStatus.COMPLETE) self.current.close() def test_storyteller_scores_when_player_guessed(self): story_card = self.current.turn._pick_card() story_play = Play.play_for_round(self.current, self.current.turn, story_card, 'test') card2 = self.player2._pick_card() play2 = Play.play_for_round(self.current, self.player2, card2) card3 = self.player3._pick_card() play3 = Play.play_for_round(self.current, self.player3, card3) play2.vote_card(story_card) play3.vote_card(card2) self.current.close() self.current.turn.refresh_from_db() self.assertEqual(self.current.turn.score, settings.GAME_STORY_SCORE) def test_storyteller_doesnt_score_when_all_players_guess(self): story_card = self.current.turn._pick_card() story_play = Play.play_for_round(self.current, self.current.turn, story_card, 'test') card2 = self.player2._pick_card() play2 = Play.play_for_round(self.current, self.player2, card2) card3 = self.player3._pick_card() play3 = Play.play_for_round(self.current, self.player3, card3) play2.vote_card(story_card) play3.vote_card(story_card) self.current.close() self.current.turn.refresh_from_db() self.assertEqual(self.current.turn.score, 0) def test_players_score_when_their_card_is_chosen(self): story_card = self.current.turn._pick_card() story_play = Play.play_for_round(self.current, self.current.turn, story_card, 'test') card2 = self.player2._pick_card() play2 = Play.play_for_round(self.current, self.player2, card2) card3 = self.player3._pick_card() play3 = Play.play_for_round(self.current, self.player3, card3) play2.vote_card(card3) play3.vote_card(card2) self.current.close() self.player2.refresh_from_db() self.assertEqual(self.player2.score, settings.GAME_CONFUSED_GUESS_SCORE) def test_players_score_max_bound(self): player4 = self.game.add_player(self.user4, 'player4') story_card = self.current.turn._pick_card() story_play = Play.play_for_round(self.current, self.current.turn, story_card, 'test') card2 = self.player2._pick_card() play2 = Play.play_for_round(self.current, self.player2, card2) card3 = self.player3._pick_card() play3 = Play.play_for_round(self.current, self.player3, card3) card4 = player4._pick_card() play4 = Play.play_for_round(self.current, player4, card4) play2.vote_card(story_card) play3.vote_card(card2) play4.vote_card(card2) self.current.close() self.player2.refresh_from_db() self.assertEqual(self.player2.score, settings.GAME_MAX_ROUND_SCORE)
43.742671
109
0.704371
1,785
13,429
5.038095
0.078431
0.117425
0.056044
0.072946
0.799288
0.779273
0.76048
0.750806
0.724897
0.709107
0
0.012661
0.182441
13,429
306
110
43.885621
0.806449
0.000298
0
0.669643
0
0
0.029131
0
0
0
0
0.003268
0.129464
1
0.129464
false
0.040179
0.035714
0
0.183036
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
d6708bec6b811f0ea22ff4233419d98f21a4385c
201
py
Python
gab_toolbox/__init__.py
gbene/gab_toolbox
314d6e8f5abdaca8ae35ae68c614c96e7b77d49f
[ "MIT" ]
null
null
null
gab_toolbox/__init__.py
gbene/gab_toolbox
314d6e8f5abdaca8ae35ae68c614c96e7b77d49f
[ "MIT" ]
null
null
null
gab_toolbox/__init__.py
gbene/gab_toolbox
314d6e8f5abdaca8ae35ae68c614c96e7b77d49f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Apr 3 22:51:58 2020 @author: gabri """ from gab_toolbox import format_tools from gab_toolbox import tex_tools from gab_toolbox import mail_tools
18.272727
37
0.701493
32
201
4.21875
0.6875
0.155556
0.311111
0.444444
0.37037
0
0
0
0
0
0
0.075
0.20398
201
10
38
20.1
0.76875
0.368159
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
d6a3a7ba17ad8f620ca73f18a36d632e39fd4e7a
128
py
Python
senkuu/strategies/__init__.py
techrc/senkuu
d5651d1891ab55a46c813dd5b09341cb2068b239
[ "Apache-2.0" ]
1
2020-05-03T09:53:52.000Z
2020-05-03T09:53:52.000Z
senkuu/strategies/__init__.py
techrc/senkuu
d5651d1891ab55a46c813dd5b09341cb2068b239
[ "Apache-2.0" ]
null
null
null
senkuu/strategies/__init__.py
techrc/senkuu
d5651d1891ab55a46c813dd5b09341cb2068b239
[ "Apache-2.0" ]
null
null
null
from .activations import Activations from .losses import Losses from .metrics import Metrics from .optimizers import Optimizers
25.6
36
0.84375
16
128
6.75
0.375
0
0
0
0
0
0
0
0
0
0
0
0.125
128
4
37
32
0.964286
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
d6d71b6e94ff51b0143af188258454a2b5fe0d6e
84
py
Python
checkpoints/check01a.py
Zuzuni7/CS241
d631483ce3fe9e6cd996f13ee33642a998226050
[ "MIT" ]
1
2021-10-13T01:50:27.000Z
2021-10-13T01:50:27.000Z
checkpoints/check01a.py
Zuzuni7/CS241
d631483ce3fe9e6cd996f13ee33642a998226050
[ "MIT" ]
null
null
null
checkpoints/check01a.py
Zuzuni7/CS241
d631483ce3fe9e6cd996f13ee33642a998226050
[ "MIT" ]
3
2020-05-13T04:28:49.000Z
2021-05-14T23:13:30.000Z
""" CS241 Checkpoint 01A Written by Chad Macbeth """ print("Hello Python World!")
10.5
28
0.702381
11
84
5.363636
1
0
0
0
0
0
0
0
0
0
0
0.071429
0.166667
84
7
29
12
0.771429
0.52381
0
0
0
0
0.612903
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
d6ef986da5191c91f5d7472ac04ca6b5e398976c
200
py
Python
tagging_autocomplete/urls.py
Iv/django-tagging-autocomplete
ba645a6e5a85fe1adf6400eed24069f2b5ad4ebf
[ "MIT" ]
null
null
null
tagging_autocomplete/urls.py
Iv/django-tagging-autocomplete
ba645a6e5a85fe1adf6400eed24069f2b5ad4ebf
[ "MIT" ]
null
null
null
tagging_autocomplete/urls.py
Iv/django-tagging-autocomplete
ba645a6e5a85fe1adf6400eed24069f2b5ad4ebf
[ "MIT" ]
null
null
null
from django.conf.urls import * from tagging_autocomplete.views import list_tags urlpatterns = [ # 'tagging_autocomplete.views', url(r'^list$', list_tags, name='tagging_autocomplete-list'), ]
25
64
0.745
25
200
5.76
0.56
0.395833
0.333333
0
0
0
0
0
0
0
0
0
0.13
200
7
65
28.571429
0.827586
0.145
0
0
0
0
0.183432
0.147929
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
d6f627f1413ae2eb4487b1b587ba362009663083
175
py
Python
core/adapter.py
bhhaskin/bryans.website
d8ce350745f6f2fa1f630f0abb712f7846a5986e
[ "MIT" ]
null
null
null
core/adapter.py
bhhaskin/bryans.website
d8ce350745f6f2fa1f630f0abb712f7846a5986e
[ "MIT" ]
null
null
null
core/adapter.py
bhhaskin/bryans.website
d8ce350745f6f2fa1f630f0abb712f7846a5986e
[ "MIT" ]
null
null
null
from allauth.account.adapter import DefaultAccountAdapter class ClosedAccountAdapter(DefaultAccountAdapter): def is_open_for_signup(self, request): return False
29.166667
57
0.805714
18
175
7.666667
0.944444
0
0
0
0
0
0
0
0
0
0
0
0.142857
175
5
58
35
0.92
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0.25
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
ba833481fafacbb098e0b6a27d3bd42ad34dd56b
94
py
Python
sanic_openapi/__init__.py
AHBaber/sanic-openapi
3cdf8801836a3b31f19d8f9d19b7d27737a4257f
[ "MIT" ]
null
null
null
sanic_openapi/__init__.py
AHBaber/sanic-openapi
3cdf8801836a3b31f19d8f9d19b7d27737a4257f
[ "MIT" ]
null
null
null
sanic_openapi/__init__.py
AHBaber/sanic-openapi
3cdf8801836a3b31f19d8f9d19b7d27737a4257f
[ "MIT" ]
1
2019-09-02T03:56:47.000Z
2019-09-02T03:56:47.000Z
from .swagger import swagger_blueprint __version__ = "0.6.0" __all__ = ["swagger_blueprint"]
18.8
38
0.765957
12
94
5.166667
0.666667
0.516129
0
0
0
0
0
0
0
0
0
0.036145
0.117021
94
4
39
23.5
0.710843
0
0
0
0
0
0.234043
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0.666667
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
baaec4c92f736de5a89182feec0719efdc6229aa
65
py
Python
screens/__init__.py
AeonFlor/HYU_CSE2024
ec499fccbb93cb1497baae56e77c40d27c7d0041
[ "MIT" ]
null
null
null
screens/__init__.py
AeonFlor/HYU_CSE2024
ec499fccbb93cb1497baae56e77c40d27c7d0041
[ "MIT" ]
8
2021-09-17T06:41:07.000Z
2021-12-07T08:14:54.000Z
screens/__init__.py
AeonFlor/HYU_CSE2024
ec499fccbb93cb1497baae56e77c40d27c7d0041
[ "MIT" ]
6
2021-09-17T08:10:59.000Z
2021-12-08T14:58:01.000Z
from .contexts import * from .base import Screen, TextBaseScreen
21.666667
40
0.8
8
65
6.5
0.75
0
0
0
0
0
0
0
0
0
0
0
0.138462
65
2
41
32.5
0.928571
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
bac975aad0a38d8a2f25d8880620a171deb9fb36
192
py
Python
satchmo/apps/product/modules/downloadable/admin.py
predatell/satchmo
6ced1f845aadec240c7e433c3cbf4caca96e0d92
[ "BSD-3-Clause" ]
16
2015-03-06T14:42:27.000Z
2019-12-23T21:37:01.000Z
satchmo/apps/product/modules/downloadable/admin.py
predatell/satchmo
6ced1f845aadec240c7e433c3cbf4caca96e0d92
[ "BSD-3-Clause" ]
null
null
null
satchmo/apps/product/modules/downloadable/admin.py
predatell/satchmo
6ced1f845aadec240c7e433c3cbf4caca96e0d92
[ "BSD-3-Clause" ]
8
2015-01-28T16:02:37.000Z
2022-03-03T21:29:40.000Z
from django.contrib import admin from product.modules.downloadable.models import DownloadableProduct, DownloadLink admin.site.register(DownloadableProduct) admin.site.register(DownloadLink)
27.428571
81
0.864583
21
192
7.904762
0.619048
0.108434
0.204819
0
0
0
0
0
0
0
0
0
0.067708
192
6
82
32
0.927374
0
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
bae94588e34807c0728df6fc9641581a2c4ca95a
48
py
Python
setting.py
stereoboy/generative_adversarial
2a578848a0c70b8c0244870ca8dca99b53edcb6b
[ "MIT" ]
null
null
null
setting.py
stereoboy/generative_adversarial
2a578848a0c70b8c0244870ca8dca99b53edcb6b
[ "MIT" ]
null
null
null
setting.py
stereoboy/generative_adversarial
2a578848a0c70b8c0244870ca8dca99b53edcb6b
[ "MIT" ]
null
null
null
img_size=64 validation_ratio=0.1 test_ratio=0.1
12
20
0.833333
11
48
3.363636
0.727273
0.324324
0.378378
0
0
0
0
0
0
0
0
0.133333
0.0625
48
3
21
16
0.688889
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
2411491a856b20bb1776eeef58d092593be4c5b9
15,236
py
Python
test/aglabtest.py
fullkawa/aglab
c8d08791a515c7c1b2a99c0ce54db882222c240f
[ "MIT" ]
3
2015-05-05T13:40:26.000Z
2015-11-27T17:42:23.000Z
test/aglabtest.py
fullkawa/aglab
c8d08791a515c7c1b2a99c0ce54db882222c240f
[ "MIT" ]
9
2015-01-01T09:06:26.000Z
2015-01-18T14:21:44.000Z
test/aglabtest.py
fullkawa/aglab
c8d08791a515c7c1b2a99c0ce54db882222c240f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import unittest import math import sys import aglab from definition import test class StateTestCase(unittest.TestCase): def setUp(self): unittest.TestCase.setUp(self) self.state = aglab.State(test) #print def test__init(self): state = self.state self.assertEqual(len(state.fields), 16) self.assertEqual(len(state.components), 4) self.assertEqual(len(state.data.loc[:, 'value']), 66) self.assertEqual(state.get_value(key='$cxt-1'), 1) self.assertEqual(state.get_value(scope='public', column='unknown')[0], aglab.State.VALUE_KNOWN) self.assertEqual(state.get_value(scope='hidden', column='unknown')[0], aglab.State.VALUE_UNKNOWN) self.assertEqual(state.get_value(fkey='player-1_hand', column='unknown')[0], aglab.State.VALUE_UNKNOWN) # 初期化時点ではプレイヤーが決定して self.assertEqual(state.get_value(fkey='player-2_hand', column='unknown')[0], aglab.State.VALUE_UNKNOWN) # いないので、これでいい #print state.data #DEBUG #print """ unknown value ckey cindex propname fkey findex scope $cxt-1 NaN public 0 1.0 $player-name NaN public 0 NaN C1 0 _placed F1 0.0 hidden 1 NaN 1.0 hidden 1 NaN 2.0 hidden 1 NaN 3.0 hidden 1 NaN F2 0.0 public 0 NaN 1.0 public 0 NaN 2.0 public 0 NaN 3.0 public 0 NaN player-1_hand 0.0 private 1 NaN 1.0 private 1 NaN player-1_played 0.0 public 0 NaN 1.0 public 0 NaN player-2_hand 0.0 private 1 NaN 1.0 private 1 NaN player-2_played 0.0 public 0 NaN 1.0 public 0 NaN C2 0 _placed F1 0.0 hidden 1 NaN 1.0 hidden 1 NaN 2.0 hidden 1 NaN 3.0 hidden 1 NaN F2 0.0 public 0 NaN 1.0 public 0 NaN 2.0 public 0 NaN 3.0 public 0 NaN player-1_hand 0.0 private 1 NaN 1.0 private 1 NaN player-1_played 0.0 public 0 NaN 1.0 public 0 NaN ... ... ... 1 _placed F1 2.0 hidden 1 NaN 3.0 hidden 1 NaN F2 0.0 public 0 NaN 1.0 public 0 NaN 2.0 public 0 NaN 3.0 public 0 NaN player-1_hand 0.0 private 1 NaN 1.0 private 1 NaN player-1_played 0.0 public 0 NaN 1.0 public 0 NaN player-2_hand 0.0 private 1 NaN 1.0 private 1 NaN player-2_played 0.0 public 0 NaN 1.0 public 0 NaN 2 _placed F1 0.0 hidden 1 NaN 1.0 hidden 1 NaN 2.0 hidden 1 NaN 3.0 hidden 1 NaN F2 0.0 public 0 NaN 1.0 public 0 NaN 2.0 public 0 NaN 3.0 public 0 NaN player-1_hand 0.0 private 1 NaN 1.0 private 1 NaN player-1_played 0.0 public 0 NaN 1.0 public 0 NaN player-2_hand 0.0 private 1 NaN 1.0 private 1 NaN player-2_played 0.0 public 0 NaN 1.0 public 0 NaN """ def test_set_player(self): state = self.state p1_hand = state.get_value(propname='_placed', fkey='player-1_hand', scope='private', column='unknown') p2_hand = state.get_value(propname='_placed', fkey='player-2_hand', scope='private', column='unknown') player = state.get_value(key='$player') assert p1_hand[0] == aglab.State.VALUE_UNKNOWN assert p2_hand[0] == aglab.State.VALUE_UNKNOWN assert math.isnan(player) state.set_player(1) p1_hand = state.get_value(propname='_placed', fkey='player-1_hand', scope='private', column='unknown') p2_hand = state.get_value(propname='_placed', fkey='player-2_hand', scope='private', column='unknown') player = state.get_value(key='$player') self.assertEqual(p1_hand[0], aglab.State.VALUE_KNOWN) #自分の手札は'known'となる self.assertEqual(p2_hand[0], aglab.State.VALUE_UNKNOWN) self.assertEqual(player, 1) def test_last_1(self): """last():コンポーネントがセットされていない場合 """ index = self.state.last('P1.p') self.assertEqual(index, -1) def test_last_2(self): """last():コンポーネントがセットされている場合 """ state = self.state state.set_component('C1', ('F1', 0)) self.assertEqual(state.last('F1'), 0) state.set_component(('C2', 1), ('F1', 1)) self.assertEqual(state.last('F1'), 1) def test_set_component_1(self): """set_component():テストケース1 """ state = self.state """どこにも配置されていない状態 """ state.set_component('C1', ('F1', 0)) """ -> hiddenフィールドへ配置 """ self.assertEqual(state.VALUE_UNKNOWN, state.get_value(component='C1', field=('F1', 0), column='unknown')) self.assertEqual(state.VALUE_EXISTENT, state.get_value(component='C1', field=('F1', 0))) self.assertEqual(state.VALUE_UNKNOWN, state.get_value(component='C1', field=('F1', 1), column='unknown')) self.assertEqual(True, math.isnan(state.get_value(component='C1', field=('F1', 1)))) self.assertEqual(state.VALUE_UNKNOWN, state.get_value(component=('C2', 0), field=('F1', 0), column='unknown')) self.assertEqual(state.VALUE_NON_EXISTENT, state.get_value(component=('C2', 0), field=('F1', 0))) state.set_component(('C2', 0), ('F1', 1)) """ -> さらにもう1枚配置 """ self.assertEqual(state.VALUE_UNKNOWN, state.get_value(component=('C2', 0), field=('F1', 1), column='unknown')) self.assertEqual(state.VALUE_EXISTENT, state.get_value(component=('C2', 0), field=('F1', 1))) self.assertEqual(state.VALUE_UNKNOWN, state.get_value(component=('C2', 0), field=('F1', 2), column='unknown')) self.assertEqual(True, math.isnan(state.get_value(component=('C2', 0), field=('F1', 2)))) self.assertEqual(state.VALUE_UNKNOWN, state.get_value(component=('C2', 0), field=('F1', 0), column='unknown')) self.assertEqual(state.VALUE_NON_EXISTENT, state.get_value(component=('C2', 0), field=('F1', 0))) self.assertEqual(state.VALUE_UNKNOWN, state.get_value(component='C1', field=('F1', 1), column='unknown')) self.assertEqual(state.VALUE_NON_EXISTENT, state.get_value(component='C1', field=('F1', 1))) def _set_F1_all(self, state): state.set_component('C1', ('F1', 0)) state.set_component(('C2', 0), ('F1', 1)) state.set_component(('C2', 1), ('F1', 2)) state.set_component(('C2', 2), ('F1', 3)) def test_move_component_1(self): """set_component():テストケース1 """ state = self.state self._set_F1_all(state) """すべてF1にセットされた状態 """ state.move_component(('F1', 0), ('player-1_hand', 0)) #print state.data #DEBUG """ -> hiddenフィールドへ移動 """ self.assertEqual(state.VALUE_UNKNOWN, state.get_value(component='C1', field=('player-1_hand', 0), column='unknown')) self.assertEqual(state.VALUE_EXISTENT, state.get_value(component='C1', field=('player-1_hand', 0))) self.assertEqual(state.VALUE_UNKNOWN, state.get_value(component=('C2', 0), field=('player-1_hand', 0), column='unknown')) self.assertEqual(state.VALUE_NON_EXISTENT, state.get_value(component=('C2', 0), field=('player-1_hand', 0))) self.assertEqual(state.VALUE_UNKNOWN, state.get_value(component='C1', field=('F1', 0), column='unknown')) self.assertEqual(True, math.isnan(state.get_value(component='C1', field=('F1', 0)))) self.assertEqual(state.VALUE_UNKNOWN, state.get_value(component=('C2', 0), field=('F1', 0), column='unknown')) self.assertEqual(True, math.isnan(state.get_value(component=('C2', 0), field=('F1', 0)))) def test_index_component(self): state = self.state state.set_component('C1', ('P1.h', 1)) index = state.index_component('C1', 'P1.h') self.assertEqual(index, 1) def test_output_component_case1(self): """Case1: プレイヤー指定なし(DEBUG); 非公開状態 """ state = self.state output = state.output_component(field=('F1', 0)) self.assertEqual(' ', output) state.set_component('C1', ('F1', 1)) output = state.output_component(field=('F1', 1)) self.assertEqual('-1', output) state.set_component(('C2', 1), ('F1', 2)) output = state.output_component(field=('F1', 2)) self.assertEqual('-2', output) def test_output_component_case2(self): """Case1: プレイヤー指定なし(DEBUG); 公開状態 """ state = self.state output = state.output_component(field=('F2', 0)) self.assertEqual(' ', output) state.set_component('C1', ('F2', 1)) output = state.output_component(field=('F2', 1)) self.assertEqual(' 1', output) state.set_component(('C2', 1), ('F2', 2)) output = state.output_component(field=('F2', 2)) self.assertEqual(' 2', output) def test_output_components_case1(self): """Case1: プレイヤー指定なし(DEBUG); 非公開状態 """ state = self.state output = state.output_components(fkey='F1') self.assertEqual(4, len(output)) self.assertEqual(' ', output[0]) self.assertEqual(' ', output[3]) state.set_component('C1', ('F1', 1)) state.set_component(('C2', 1), ('F1', 2)) output = state.output_components(fkey='F1') self.assertEqual(4, len(output)) self.assertEqual(' ', output[0]) self.assertEqual('-1', output[1]) self.assertEqual('-2', output[2]) self.assertEqual(' ', output[3]) def test_output_components_case2(self): """Case2: プレイヤー指定なし(DEBUG); 公開状態 """ state = self.state output = state.output_components(fkey='F2') self.assertEqual(4, len(output)) self.assertEqual(' ', output[0]) self.assertEqual(' ', output[3]) state.set_component('C1', ('F2', 1)) state.set_component(('C2', 1), ('F2', 2)) output = state.output_components(fkey='F2') self.assertEqual(4, len(output)) self.assertEqual(' ', output[0]) self.assertEqual(' 1', output[1]) self.assertEqual(' 2', output[2]) self.assertEqual(' ', output[3]) class RewardTestCase(unittest.TestCase): def setUp(self): unittest.TestCase.setUp(self) #print def testAdd_1(self): reward = aglab.Reward() reward.add(1) self.assertEqual(0, reward.rewards[0]) self.assertEqual(1, reward.rewards[1]) def testAdd_2(self): reward = aglab.Reward(player=2, num_players=3) reward.add(1, player=1) reward.add(2, player=2) self.assertEqual(0, reward.rewards[0]) self.assertEqual(1, reward.rewards[1]) self.assertEqual(2, reward.rewards[2]) self.assertEqual(0, reward.rewards[3]) def testCollect_1(self): reward = aglab.Reward() r = reward.collect() self.assertEqual(r, 0) self.assertEqual(0, reward.rewards[0]) self.assertEqual(0, reward.rewards[1]) reward.add(1) r = reward.collect() self.assertEqual(r, 1) self.assertEqual(1, reward.rewards[0]) self.assertEqual(0, reward.rewards[1]) reward.add(2) r = reward.collect() self.assertEqual(r, 2) self.assertEqual(3, reward.rewards[0]) self.assertEqual(0, reward.rewards[1]) def testCollect_2(self): reward = aglab.Reward(player=2, num_players=3) reward.add(1, player=1) reward.add(2, player=2) r = reward.collect() self.assertEqual(r, 1.9) self.assertEqual(1.9, reward.rewards[0]) self.assertEqual(0, reward.rewards[1]) self.assertEqual(0, reward.rewards[2])
44.290698
131
0.463442
1,602
15,236
4.297753
0.066167
0.169935
0.062309
0.04793
0.839942
0.815977
0.754394
0.702832
0.652433
0.586928
0
0.05692
0.419992
15,236
343
132
44.419825
0.722191
0.027698
0
0.546392
0
0
0.059237
0
0
0
0
0
0.417526
1
0.092784
false
0
0.025773
0
0.128866
0
0
0
0
null
0
0
0
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
5
2439e83f6ad9f86afc5e82b40636a40a65f9f8c3
2,476
py
Python
migrations/versions/f8d0899cdc72_add_column_name_completed_in_table_.py
Brunoro811/api_dangels
21c064eaa4f5009412dddc9676044d6cc08a5b65
[ "MIT" ]
null
null
null
migrations/versions/f8d0899cdc72_add_column_name_completed_in_table_.py
Brunoro811/api_dangels
21c064eaa4f5009412dddc9676044d6cc08a5b65
[ "MIT" ]
null
null
null
migrations/versions/f8d0899cdc72_add_column_name_completed_in_table_.py
Brunoro811/api_dangels
21c064eaa4f5009412dddc9676044d6cc08a5b65
[ "MIT" ]
null
null
null
"""add column name_completed in table clients Revision ID: f8d0899cdc72 Revises: 3bab60dda78e Create Date: 2022-04-13 14:45:42.623262 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'f8d0899cdc72' down_revision = '3bab60dda78e' branch_labels = None depends_on = None def upgrade(): # ### commands auto generated by Alembic - please adjust! ### op.add_column('clients', sa.Column('name_complete', sa.String(length=70), nullable=False)) op.alter_column('orders_has_products', 'sale_value', existing_type=sa.REAL(), type_=sa.Float(precision=2), existing_nullable=False) op.alter_column('products', 'cost_value', existing_type=sa.REAL(), type_=sa.Float(precision=2), existing_nullable=False) op.alter_column('products', 'sale_value_varejo', existing_type=sa.REAL(), type_=sa.Float(precision=2), existing_nullable=False) op.alter_column('products', 'sale_value_atacado', existing_type=sa.REAL(), type_=sa.Float(precision=2), existing_nullable=False) op.alter_column('products', 'sale_value_promotion', existing_type=sa.REAL(), type_=sa.Float(precision=2), existing_nullable=True) # ### end Alembic commands ### def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.alter_column('products', 'sale_value_promotion', existing_type=sa.Float(precision=2), type_=sa.REAL(), existing_nullable=True) op.alter_column('products', 'sale_value_atacado', existing_type=sa.Float(precision=2), type_=sa.REAL(), existing_nullable=False) op.alter_column('products', 'sale_value_varejo', existing_type=sa.Float(precision=2), type_=sa.REAL(), existing_nullable=False) op.alter_column('products', 'cost_value', existing_type=sa.Float(precision=2), type_=sa.REAL(), existing_nullable=False) op.alter_column('orders_has_products', 'sale_value', existing_type=sa.Float(precision=2), type_=sa.REAL(), existing_nullable=False) op.drop_column('clients', 'name_complete') # ### end Alembic commands ###
35.884058
94
0.613489
279
2,476
5.200717
0.250896
0.082702
0.089593
0.137836
0.725706
0.725706
0.725706
0.725706
0.666437
0.666437
0
0.030803
0.265751
2,476
68
95
36.411765
0.767327
0.130856
0
0.8
0
0
0.149409
0
0
0
0
0
0
1
0.04
false
0
0.04
0
0.08
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
244af3d93b8f86370c442b954c5fe8c163894fc6
47
py
Python
src/windows/__init__.py
priscilafaliani/Analisis-De-Datos
247695e3e976f042fc453d02bd9d4d722fb331ff
[ "CC0-1.0" ]
6
2021-05-02T08:28:42.000Z
2021-05-07T13:18:32.000Z
src/windows/__init__.py
priscilafaliani/Analisis-De-Datos
247695e3e976f042fc453d02bd9d4d722fb331ff
[ "CC0-1.0" ]
null
null
null
src/windows/__init__.py
priscilafaliani/Analisis-De-Datos
247695e3e976f042fc453d02bd9d4d722fb331ff
[ "CC0-1.0" ]
null
null
null
"""The keeper of all the windows of the app."""
47
47
0.680851
9
47
3.555556
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.170213
47
1
47
47
0.820513
0.87234
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
246118c25308df88d92c1061cdda3967f8e56066
23
py
Python
refcount/__init__.py
jmp75/pyrefcount
89ba62977fe21d755077f43fefb01451fec3733a
[ "Net-SNMP", "Xnet", "MIT" ]
1
2021-01-12T10:35:12.000Z
2021-01-12T10:35:12.000Z
tests/__init__.py
csiro-hydroinformatics/pyrefcount
daf3a94ba33e181f2311395d345a6aa0ef001f99
[ "Net-SNMP", "Xnet", "MIT" ]
2
2019-01-02T00:53:16.000Z
2019-01-06T22:00:09.000Z
tests/__init__.py
csiro-hydroinformatics/pyrefcount
daf3a94ba33e181f2311395d345a6aa0ef001f99
[ "Net-SNMP", "Xnet", "MIT" ]
null
null
null
# required for python2
11.5
22
0.782609
3
23
6
1
0
0
0
0
0
0
0
0
0
0
0.052632
0.173913
23
1
23
23
0.894737
0.869565
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
030ab957106c3ebddec8cc6efbb56cdc2cded1eb
72
py
Python
rdfextras/utils/__init__.py
trishnaguha/rdfextras
c66b30de4a3b9cb67090add06cb8a9cf05d2c545
[ "BSD-3-Clause" ]
3
2015-05-15T02:18:21.000Z
2019-02-12T03:14:46.000Z
rdfextras/utils/__init__.py
trishnaguha/rdfextras
c66b30de4a3b9cb67090add06cb8a9cf05d2c545
[ "BSD-3-Clause" ]
1
2015-11-05T15:18:36.000Z
2015-11-05T16:44:04.000Z
rdfextras/utils/__init__.py
trishnaguha/rdfextras
c66b30de4a3b9cb67090add06cb8a9cf05d2c545
[ "BSD-3-Clause" ]
4
2015-11-05T07:24:41.000Z
2022-01-18T07:54:43.000Z
import pathutils import cmdlineutils import termutils import graphutils
14.4
19
0.888889
8
72
8
0.625
0
0
0
0
0
0
0
0
0
0
0
0.111111
72
4
20
18
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
033deee14bbb99bbb096478b73697cb2f8158290
88
py
Python
ontology/logistic_regression/sherlock/listify_circuits_k38_reverse.py
ehbeam/neuro-knowledge-engine
9dc56ade0bbbd8d14f0660774f787c3f46d7e632
[ "MIT" ]
15
2020-07-17T07:10:26.000Z
2022-02-18T05:51:45.000Z
ontology/neural_network/sherlock/listify_circuits_k38_reverse.py
YifeiCAO/neuro-knowledge-engine
9dc56ade0bbbd8d14f0660774f787c3f46d7e632
[ "MIT" ]
2
2022-01-14T09:10:12.000Z
2022-01-28T17:32:42.000Z
ontology/neural_network/sherlock/listify_circuits_k38_reverse.py
YifeiCAO/neuro-knowledge-engine
9dc56ade0bbbd8d14f0660774f787c3f46d7e632
[ "MIT" ]
4
2021-12-22T13:27:32.000Z
2022-02-18T05:51:47.000Z
#!/bin/python import listify_circuits listify_circuits.optimize_circuits(38, 'reverse')
22
49
0.829545
11
88
6.363636
0.727273
0.428571
0
0
0
0
0
0
0
0
0
0.024096
0.056818
88
4
49
22
0.819277
0.136364
0
0
0
0
0.092105
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
035c0ec03a1c071fe9bb724aff53104dc3cc5437
80
py
Python
ui/Rhino/AGS/dev/__plugin__.py
duchaoyu/compas_ags
c43bc3e02e5dbee9f368b150c0bb85e96f71d240
[ "MIT" ]
1
2021-08-14T11:14:52.000Z
2021-08-14T11:14:52.000Z
ui/Rhino/AGS/dev/__plugin__.py
duchaoyu/compas_ags
c43bc3e02e5dbee9f368b150c0bb85e96f71d240
[ "MIT" ]
null
null
null
ui/Rhino/AGS/dev/__plugin__.py
duchaoyu/compas_ags
c43bc3e02e5dbee9f368b150c0bb85e96f71d240
[ "MIT" ]
null
null
null
id = "{6971119f-8b5a-4cd2-aad8-edad37a243c9}" version = "0.1.0.0" title = "AGS"
20
45
0.6625
13
80
4.076923
0.846154
0
0
0
0
0
0
0
0
0
0
0.309859
0.1125
80
3
46
26.666667
0.43662
0
0
0
0
0
0.6
0.475
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
3005f77f91affd3e6845ffc60a739e9df1c0bd5f
44
py
Python
lib/errors.py
opensafely/nhs-covid-vaccination-coverage
61cfafdb9d023546af01ff91c0457f80a787ce7c
[ "MIT" ]
12
2021-01-27T11:49:01.000Z
2022-02-17T10:19:26.000Z
lib/errors.py
opensafely/nhs-covid-vaccination-coverage
61cfafdb9d023546af01ff91c0457f80a787ce7c
[ "MIT" ]
8
2021-02-02T16:00:55.000Z
2022-02-15T14:44:26.000Z
lib/errors.py
opensafely/nhs-covid-vaccination-coverage
61cfafdb9d023546af01ff91c0457f80a787ce7c
[ "MIT" ]
6
2021-02-16T00:58:14.000Z
2022-02-17T10:06:57.000Z
class DataCleaningError(Exception): pass
22
35
0.795455
4
44
8.75
1
0
0
0
0
0
0
0
0
0
0
0
0.136364
44
2
36
22
0.921053
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
3005fab43b56c974e13e5bf2019ca3d64d667238
1,699
py
Python
hd_ansible/models.py
Rmond/OperMge
926f00107614ed55b26ff3beac178fe955de856a
[ "Apache-2.0" ]
1
2017-08-18T07:03:34.000Z
2017-08-18T07:03:34.000Z
hd_ansible/models.py
Rmond/OperMge
926f00107614ed55b26ff3beac178fe955de856a
[ "Apache-2.0" ]
null
null
null
hd_ansible/models.py
Rmond/OperMge
926f00107614ed55b26ff3beac178fe955de856a
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals from django.db import models # Create your models here. class MysqlAduit(models.Model): username=models.CharField(max_length=32) mysqluser=models.CharField(max_length=64) mysqlhost=models.CharField(max_length=16,default="") login_host = models.CharField(max_length=16,default="localhost") pridate=models.DateTimeField(auto_now=True) pri_database = models.CharField(max_length=32,default="") pri_table = models.CharField(max_length=32,default="") privilege=models.CharField(max_length=64,default="") class OptionLog(models.Model): username=models.CharField(max_length=32) option = models.CharField(max_length=10) mysqlhost=models.CharField(max_length=16) mysqluser=models.CharField(max_length=64) pridate=models.DateTimeField(auto_now_add=True) pri_database = models.CharField(max_length=32,default="") pri_table = models.CharField(max_length=32,default="") privilege = models.CharField(max_length=48) class SidInfo(models.Model): appname = models.CharField(max_length=32) sidname=models.CharField(max_length=32) hostip=models.CharField(max_length=16) socketpath=models.CharField(max_length=64) port=models.IntegerField() data_size=models.CharField(max_length=6) buffer_pool=models.IntegerField() password=models.CharField(max_length=128) replpassword=models.CharField(max_length=128) class Software(models.Model): softname=models.CharField(max_length=16) version=models.TextField(default="") class Hostip_Port(models.Model): hostip = models.CharField(max_length=16) port = models.IntegerField(default=3306)
36.934783
68
0.752796
216
1,699
5.740741
0.282407
0.278226
0.333871
0.445161
0.648387
0.466129
0.269355
0.269355
0.196774
0.196774
0
0.034576
0.131842
1,699
46
69
36.934783
0.806102
0.014126
0
0.277778
0
0
0.005376
0
0
0
0
0
0
1
0
false
0.055556
0.055556
0
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
5
303e50ceb3434e6a15f67c8d4df69531cc93a72d
61
py
Python
src/poetry/masonry/builders/__init__.py
sivanbecker/poetry
72497bcb66b5a1cc20e3aa95973c523a22b05bfa
[ "MIT" ]
1
2020-02-01T07:13:05.000Z
2020-02-01T07:13:05.000Z
src/poetry/masonry/builders/__init__.py
sivanbecker/poetry
72497bcb66b5a1cc20e3aa95973c523a22b05bfa
[ "MIT" ]
1
2021-12-31T19:44:26.000Z
2022-03-08T20:52:13.000Z
src/poetry/masonry/builders/__init__.py
sivanbecker/poetry
72497bcb66b5a1cc20e3aa95973c523a22b05bfa
[ "MIT" ]
2
2020-12-07T04:26:21.000Z
2021-09-25T21:46:36.000Z
from poetry.masonry.builders.editable import EditableBuilder
30.5
60
0.885246
7
61
7.714286
1
0
0
0
0
0
0
0
0
0
0
0
0.065574
61
1
61
61
0.947368
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
304b40e3cc284e3d63957fd04c48894a07e610f0
164
py
Python
cannula/utils.py
rmyers/cannula
eb6fd76d2a9daed0df73b0bf389da0182f797972
[ "MIT" ]
9
2015-11-05T08:52:49.000Z
2019-11-18T10:20:58.000Z
cannula/utils.py
rmyers/cannula
eb6fd76d2a9daed0df73b0bf389da0182f797972
[ "MIT" ]
null
null
null
cannula/utils.py
rmyers/cannula
eb6fd76d2a9daed0df73b0bf389da0182f797972
[ "MIT" ]
1
2015-12-22T15:15:08.000Z
2015-12-22T15:15:08.000Z
from graphql import parse, DocumentNode def gql(schema: str) -> DocumentNode: """ Helper utility to provide help mark up """ return parse(schema)
18.222222
42
0.670732
20
164
5.5
0.85
0
0
0
0
0
0
0
0
0
0
0
0.237805
164
8
43
20.5
0.88
0.231707
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
5
3052f6eb369b83f2efd14a4f579da61a7b5bf604
183
py
Python
tests/res/apps/templatelibs_app/templatetags/django_library.py
spothero/coffin
9ea6a9173cbfed592c5b4776c489dba8d9280d52
[ "BSD-3-Clause" ]
1
2016-11-19T06:32:20.000Z
2016-11-19T06:32:20.000Z
tests/res/apps/templatelibs_app/templatetags/django_library.py
spothero/coffin
9ea6a9173cbfed592c5b4776c489dba8d9280d52
[ "BSD-3-Clause" ]
null
null
null
tests/res/apps/templatelibs_app/templatetags/django_library.py
spothero/coffin
9ea6a9173cbfed592c5b4776c489dba8d9280d52
[ "BSD-3-Clause" ]
1
2022-03-08T23:12:00.000Z
2022-03-08T23:12:00.000Z
"""Register a filter with a Django library object. """ def foo(value): return "{foo}" from django.template import Library register = Library() register.filter('foo_django', foo)
20.333333
50
0.721311
25
183
5.24
0.56
0.229008
0
0
0
0
0
0
0
0
0
0
0.147541
183
9
51
20.333333
0.839744
0.256831
0
0
0
0
0.115385
0
0
0
0
0
0
1
0.2
false
0
0.2
0.2
0.6
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
5
307591bf48ea479a905a3169de7fb456710b402f
45
py
Python
tests/__init__.py
jspaezp/jspp_imageutils
6376e274a1b0675622a7979c181b9effc125aa09
[ "Apache-2.0" ]
null
null
null
tests/__init__.py
jspaezp/jspp_imageutils
6376e274a1b0675622a7979c181b9effc125aa09
[ "Apache-2.0" ]
null
null
null
tests/__init__.py
jspaezp/jspp_imageutils
6376e274a1b0675622a7979c181b9effc125aa09
[ "Apache-2.0" ]
null
null
null
"""Unit test package for jspp_imageutils."""
22.5
44
0.733333
6
45
5.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.111111
45
1
45
45
0.8
0.844444
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
3077a83a0780ac138b20e729bbfc5e79df9402f5
33
py
Python
ts_demo/core/tasks.py
ResonantGeoData/RD-TileServerDemo
17027d0fcb79f1cc6a2780e438d9bb6e15bdf78f
[ "Apache-2.0" ]
1
2021-05-26T18:49:52.000Z
2021-05-26T18:49:52.000Z
ts_demo/core/tasks.py
ResonantGeoData/RD-TileServerDemo
17027d0fcb79f1cc6a2780e438d9bb6e15bdf78f
[ "Apache-2.0" ]
8
2021-04-29T17:25:28.000Z
2021-05-27T15:09:20.000Z
ts_demo/core/tasks.py
ResonantGeoData/RD-TileServerDemo
17027d0fcb79f1cc6a2780e438d9bb6e15bdf78f
[ "Apache-2.0" ]
null
null
null
# from celery import shared_task
16.5
32
0.818182
5
33
5.2
1
0
0
0
0
0
0
0
0
0
0
0
0.151515
33
1
33
33
0.928571
0.909091
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
3079de86d693520c5d94105846cd717bf32f327b
106
py
Python
deepar/__init__.py
NewKnowledge/deepar
f5bb8ee2a848396b78e8341eabcb42671d765580
[ "MIT" ]
3
2020-08-19T14:08:10.000Z
2021-08-30T02:30:56.000Z
deepar/__init__.py
NewKnowledge/deepar
f5bb8ee2a848396b78e8341eabcb42671d765580
[ "MIT" ]
null
null
null
deepar/__init__.py
NewKnowledge/deepar
f5bb8ee2a848396b78e8341eabcb42671d765580
[ "MIT" ]
5
2019-11-27T10:11:39.000Z
2021-05-29T03:26:14.000Z
from .dataset.time_series import TimeSeriesTrain, TimeSeriesTest from .model.learner import DeepARLearner
35.333333
64
0.867925
12
106
7.583333
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.084906
106
2
65
53
0.938144
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
307e2a80cbf19ebe7bb4f7b9762ec3db931697d0
97
py
Python
problems/sqrtx/solution-1.py
MleMoe/LeetCode-1
14f275ba3c8079b820808da17c4952fcf9c8253c
[ "MIT" ]
2
2021-03-25T01:58:55.000Z
2021-08-06T12:47:13.000Z
problems/sqrtx/solution-1.py
MleMoe/LeetCode-1
14f275ba3c8079b820808da17c4952fcf9c8253c
[ "MIT" ]
3
2019-08-27T13:25:42.000Z
2021-08-28T17:49:34.000Z
problems/sqrtx/solution-1.py
MleMoe/LeetCode-1
14f275ba3c8079b820808da17c4952fcf9c8253c
[ "MIT" ]
1
2021-08-14T08:49:39.000Z
2021-08-14T08:49:39.000Z
import math class Solution: def mySqrt(self, x: int) -> int: return int(math.sqrt(x))
24.25
36
0.628866
15
97
4.066667
0.733333
0
0
0
0
0
0
0
0
0
0
0
0.237113
97
4
37
24.25
0.824324
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0.25
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
3080f6ce66e3dfb86d98b28d1d375ee1e62dcdbf
125
py
Python
web/prowlbackend/prowlbackend/settings/__init__.py
stensjoberg/pton-prowl
2151acbe68896495c407867e241fb459b2f626a5
[ "MIT" ]
null
null
null
web/prowlbackend/prowlbackend/settings/__init__.py
stensjoberg/pton-prowl
2151acbe68896495c407867e241fb459b2f626a5
[ "MIT" ]
13
2018-06-20T15:50:12.000Z
2022-03-22T20:25:39.000Z
web/ptonprowl/ptonprowl/settings/__init__.py
stensjoberg/pton-prowl
2151acbe68896495c407867e241fb459b2f626a5
[ "MIT" ]
null
null
null
# Change dev to prod for production setting from .dev import * # WARNING: Never run in production with development settings
25
60
0.784
18
125
5.444444
0.888889
0
0
0
0
0
0
0
0
0
0
0
0.176
125
4
61
31.25
0.951456
0.8
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
062f8bc049e6fde9bc69e8fcfee112a4f49d1af3
59
py
Python
src/ROS/src/workspace/ros/semantic_slam_ws/devel/.private/ShapeColor_ObjectDetection/lib/python2.7/dist-packages/ShapeColor_ObjectDetection/msg/__init__.py
GRobled0/CenterNet
740ecf06a96897b3545249bbb239264394283565
[ "MIT" ]
null
null
null
src/ROS/src/workspace/ros/semantic_slam_ws/devel/.private/ShapeColor_ObjectDetection/lib/python2.7/dist-packages/ShapeColor_ObjectDetection/msg/__init__.py
GRobled0/CenterNet
740ecf06a96897b3545249bbb239264394283565
[ "MIT" ]
null
null
null
src/ROS/src/workspace/ros/semantic_slam_ws/devel/.private/ShapeColor_ObjectDetection/lib/python2.7/dist-packages/ShapeColor_ObjectDetection/msg/__init__.py
GRobled0/CenterNet
740ecf06a96897b3545249bbb239264394283565
[ "MIT" ]
null
null
null
from ._DetectedObjects import * from ._ObjectInfo import *
19.666667
31
0.79661
6
59
7.5
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.135593
59
2
32
29.5
0.882353
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
064f7b3d5d515976d99e924a841d0ec85929b14e
19
py
Python
ultan/strategies/__init__.py
abingham/ultan
da1785bdd18aed2974c48450b914bca8592d4dbc
[ "MIT" ]
1
2019-05-07T14:29:17.000Z
2019-05-07T14:29:17.000Z
ultan/strategies/__init__.py
abingham/ultan
da1785bdd18aed2974c48450b914bca8592d4dbc
[ "MIT" ]
2
2017-12-14T14:56:19.000Z
2017-12-14T14:58:31.000Z
ultan/strategies/__init__.py
abingham/ultan
da1785bdd18aed2974c48450b914bca8592d4dbc
[ "MIT" ]
null
null
null
# ultan.strategies
9.5
18
0.789474
2
19
7.5
1
0
0
0
0
0
0
0
0
0
0
0
0.105263
19
1
19
19
0.882353
0.842105
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
0652cde26bff900315af0290089cc058066b4094
102
py
Python
data_collection/rstools/__init__.py
bsridatta/robotfashion
594853c59a536a83e5c81d3a825dcfa72f7ac03b
[ "MIT" ]
null
null
null
data_collection/rstools/__init__.py
bsridatta/robotfashion
594853c59a536a83e5c81d3a825dcfa72f7ac03b
[ "MIT" ]
null
null
null
data_collection/rstools/__init__.py
bsridatta/robotfashion
594853c59a536a83e5c81d3a825dcfa72f7ac03b
[ "MIT" ]
null
null
null
from .rs_util import query_device_ids from .thread_util import RecordingThread, ImageProcessingThread
34
63
0.882353
13
102
6.615385
0.769231
0.232558
0
0
0
0
0
0
0
0
0
0
0.088235
102
2
64
51
0.924731
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
0681e492a5ff420b5b4f74a03069b035c5a37a06
57
py
Python
pywordle/__init__.py
agale123/py-wordle
b88924763658e2bdbdf38c248e6f70abcf534c97
[ "MIT" ]
null
null
null
pywordle/__init__.py
agale123/py-wordle
b88924763658e2bdbdf38c248e6f70abcf534c97
[ "MIT" ]
null
null
null
pywordle/__init__.py
agale123/py-wordle
b88924763658e2bdbdf38c248e6f70abcf534c97
[ "MIT" ]
null
null
null
from .game import Game, Status from .wordle import Wordle
28.5
30
0.807018
9
57
5.111111
0.555556
0
0
0
0
0
0
0
0
0
0
0
0.140351
57
2
31
28.5
0.938776
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
0691557039da437b2509075c1206a710e37320b4
462
py
Python
plaintext_data_test.py
xyhlk520/GPG-Decrypt
43efec3890b5ff9c905180eef6778a94f10bb6b0
[ "Apache-2.0" ]
null
null
null
plaintext_data_test.py
xyhlk520/GPG-Decrypt
43efec3890b5ff9c905180eef6778a94f10bb6b0
[ "Apache-2.0" ]
null
null
null
plaintext_data_test.py
xyhlk520/GPG-Decrypt
43efec3890b5ff9c905180eef6778a94f10bb6b0
[ "Apache-2.0" ]
null
null
null
out_data = b"\x1c\x91\x73\x94\xba\xfb\x3c\x30" + \ b"\x3c\x30\xac\x26\x62\x09\x74\x65" + \ b"\x73\x74\x31\x2e\x74\x78\x74\x5e" + \ b"\xc5\xf7\x32\x4c\x69\x76\x65\x20" + \ b"\x66\x72\x65\x65\x20\x6f\x72\x20" + \ b"\x64\x69\x65\x20\x68\x61\x72\x64" + \ b"\x0d\x0a\xd3\x14\x7c\x2e\x86\x89" + \ b"\x7a\x42\x58\xed\x06\x53\x9f\x15" + \ b"\xcc\xca\x7e\x7b\x37\x28\x5f\x3c"
51.333333
51
0.504329
83
462
2.795181
0.674699
0.077586
0
0
0
0
0
0
0
0
0
0.329412
0.264069
462
9
52
51.333333
0.352941
0
0
0
0
0
0.632967
0.632967
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
069f2c44fe5faf876febaac5a218eaba4e66a205
128
py
Python
SWIM-Executables/Windows/pyinstaller-2.0 for windows/support/rthooks/pyi_rth_babel.py
alexsigaras/SWIM
1a35df8acb26bdcb307a1b8f60e9feba68ed1715
[ "MIT" ]
47
2020-03-08T08:43:28.000Z
2022-03-18T18:51:55.000Z
SWIM-Executables/Windows/pyinstaller-2.0 for windows/support/rthooks/pyi_rth_babel.py
alexsigaras/SWIM
1a35df8acb26bdcb307a1b8f60e9feba68ed1715
[ "MIT" ]
null
null
null
SWIM-Executables/Windows/pyinstaller-2.0 for windows/support/rthooks/pyi_rth_babel.py
alexsigaras/SWIM
1a35df8acb26bdcb307a1b8f60e9feba68ed1715
[ "MIT" ]
16
2020-03-08T08:43:30.000Z
2022-01-10T22:05:57.000Z
import os import sys d = "localedata" d = os.path.join(sys._MEIPASS, d) import babel.localedata babel.localedata._dirname = d
14.222222
33
0.75
20
128
4.7
0.5
0.319149
0
0
0
0
0
0
0
0
0
0
0.140625
128
8
34
16
0.854545
0
0
0
0
0
0.078125
0
0
0
0
0
0
1
0
false
0.166667
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
0
0
0
5
ebfc937a02751c83a60ef0866f5d6d94d65a0b9b
37
py
Python
tpau_gtfsutilities/gtfs/gtfssingleton.py
anniekfifer/tpau-gtfsutils
a022d4c8465b7f736023ecc294ff0d7d0201b0e9
[ "BSD-3-Clause" ]
1
2021-05-25T23:33:01.000Z
2021-05-25T23:33:01.000Z
tpau_gtfsutilities/gtfs/gtfssingleton.py
anniekfifer/tpau-gtfsutils
a022d4c8465b7f736023ecc294ff0d7d0201b0e9
[ "BSD-3-Clause" ]
null
null
null
tpau_gtfsutilities/gtfs/gtfssingleton.py
anniekfifer/tpau-gtfsutils
a022d4c8465b7f736023ecc294ff0d7d0201b0e9
[ "BSD-3-Clause" ]
null
null
null
from .gtfs import GTFS gtfs = GTFS()
12.333333
22
0.702703
6
37
4.333333
0.5
0.615385
0
0
0
0
0
0
0
0
0
0
0.189189
37
3
23
12.333333
0.866667
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
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
1
0
0
0
0
5
233a286cfb63e13e871bb558adf6e9da5e6cb0e0
154
py
Python
cheetah/__init__.py
BiocomputeLab/cheetah
cf5b32e6de7af5c4bddc715817b5a9b3b3f5e658
[ "MIT" ]
null
null
null
cheetah/__init__.py
BiocomputeLab/cheetah
cf5b32e6de7af5c4bddc715817b5a9b3b3f5e658
[ "MIT" ]
null
null
null
cheetah/__init__.py
BiocomputeLab/cheetah
cf5b32e6de7af5c4bddc715817b5a9b3b3f5e658
[ "MIT" ]
1
2021-06-25T01:01:31.000Z
2021-06-25T01:01:31.000Z
""" Cheetah """ from .analyse import * from .segment import * from .data import * from .augmentation import * from .plot import * from .control import *
14
27
0.701299
19
154
5.684211
0.473684
0.462963
0
0
0
0
0
0
0
0
0
0
0.181818
154
10
28
15.4
0.857143
0.045455
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
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
234d3e15e2df59b9f6a5b1735bbf1f1e9d57ba3b
106
py
Python
src/__tests__/integration/simple/main_test.py
jest-community/jest-pytest
b197b0b31e3ca5c411202d97583cbd2d2b0b92e9
[ "MIT" ]
37
2018-05-22T07:17:26.000Z
2022-03-03T13:14:46.000Z
src/__tests__/integration/simple/main_test.py
jondot/jest-pytest
b197b0b31e3ca5c411202d97583cbd2d2b0b92e9
[ "MIT" ]
34
2018-05-22T07:19:40.000Z
2022-03-11T23:21:03.000Z
src/__tests__/integration/simple/main_test.py
jondot/jest-pytest
b197b0b31e3ca5c411202d97583cbd2d2b0b92e9
[ "MIT" ]
8
2018-05-30T20:05:26.000Z
2021-02-19T14:17:05.000Z
def test_modulemap(snapshot): snapshot.assert_match([1, 2, 4]) def test_runlist(): assert 1 == 1
17.666667
36
0.669811
16
106
4.25
0.625
0.205882
0
0
0
0
0
0
0
0
0
0.05814
0.188679
106
6
37
17.666667
0.732558
0
0
0
0
0
0
0
0
0
0
0
0.5
1
0.5
false
0
0
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
0
0
0
0
0
0
0
5
2352b1b22defc71b62fc678582cd8c4ed3ffed91
2,085
py
Python
PyMongoWrapper/mongofield.py
zhuth/PyMongoWrapper
ac0767a4e8e637fdef372e7935104b4d9678c583
[ "MIT" ]
null
null
null
PyMongoWrapper/mongofield.py
zhuth/PyMongoWrapper
ac0767a4e8e637fdef372e7935104b4d9678c583
[ "MIT" ]
null
null
null
PyMongoWrapper/mongofield.py
zhuth/PyMongoWrapper
ac0767a4e8e637fdef372e7935104b4d9678c583
[ "MIT" ]
null
null
null
from .mongobase import MongoFunction, MongoOperand from bson import ObjectId class MongoFieldFunction(MongoFunction): def __init__(self, field_name, func_name): super().__init__(func_name) self.field_name = field_name def __call__(self, *args, **kwargs): f = super().__call__(*args, **kwargs) return MongoOperand({ self.field_name: f() }) class MongoField(MongoOperand): def __init__(self, name): super().__init__(name) def __getattr__(self, fname): return MongoFieldFunction(self._literal, fname) def __neg__(self): return MongoField('-' + self()) def __ne__(self, a): return MongoOperand({self(): {'$ne': a}}) def __eq__(self, a): return MongoOperand({self(): a}) def __gt__(self, a): return MongoOperand({self(): {'$gt': a}}) def __ge__(self, a): return MongoOperand({self(): {'$gte': a}}) def __lt__(self, a): return MongoOperand({self(): {'$lt': a}}) def __le__(self, a): return MongoOperand({self(): {'$lte': a}}) def empty(self): return self.exists(0) | (self == None) | (self == '') | (self == 0) class MongoIdField(MongoField): def __init__(self): super().__init__('_id') def __eq__(self, a): return MongoOperand({'_id': ObjectId(a)}) def __ne__(self, a): return MongoOperand({'_id': {'$ne': ObjectId(a)}}) def __gt__(self, a): return MongoOperand({self(): {'$gt': ObjectId(a)}}) def __ge__(self, a): return MongoOperand({self(): {'$gte': ObjectId(a)}}) def __lt__(self, a): return MongoOperand({self(): {'$lt': ObjectId(a)}}) def __le__(self, a): return MongoOperand({self(): {'$lte': ObjectId(a)}}) class MongoOperandFactory: def __init__(self, class_): self.class_ = class_ def __getattr__(self, name): return self.class_(MongoOperand._repr(name)) def __getitem__(self, name): return self.class_(MongoOperand._repr(name))
24.244186
75
0.586091
231
2,085
4.78355
0.190476
0.211765
0.119457
0.249774
0.447059
0.436199
0.334842
0.334842
0.257014
0
0
0.00128
0.25036
2,085
85
76
24.529412
0.705694
0
0
0.259259
0
0
0.021103
0
0
0
0
0
0
1
0.407407
false
0
0.037037
0.314815
0.851852
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
88ece23a913a25c0449420f044a81b8bc3f4f151
188
py
Python
backend/home/models.py
crowdbotics-apps/demo1-28501
c995770e7fd0a9f0e7b49dc1cde281749b837806
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/home/models.py
crowdbotics-apps/demo1-28501
c995770e7fd0a9f0e7b49dc1cde281749b837806
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/home/models.py
crowdbotics-apps/demo1-28501
c995770e7fd0a9f0e7b49dc1cde281749b837806
[ "FTL", "AML", "RSA-MD" ]
null
null
null
from django.conf import settings from django.db import models class Sample1(models.Model): "Generated Model" user_id = models.BigIntegerField() password = models.TextField()
20.888889
38
0.744681
23
188
6.043478
0.695652
0.143885
0
0
0
0
0
0
0
0
0
0.00641
0.170213
188
8
39
23.5
0.884615
0.079787
0
0
1
0
0.079787
0
0
0
0
0
0
1
0
false
0.166667
0.333333
0
0.833333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
1
1
0
0
0
0
5
00164e2c49f435fadc61e34e18a17f027177306c
36
py
Python
modules/services/binance_handler/binance_api/__init__.py
vladimir2240/orders_searcher
dac5143ec882f84ba263b5dd5a5eca1891051f3e
[ "MIT" ]
null
null
null
modules/services/binance_handler/binance_api/__init__.py
vladimir2240/orders_searcher
dac5143ec882f84ba263b5dd5a5eca1891051f3e
[ "MIT" ]
null
null
null
modules/services/binance_handler/binance_api/__init__.py
vladimir2240/orders_searcher
dac5143ec882f84ba263b5dd5a5eca1891051f3e
[ "MIT" ]
null
null
null
from .binance_api import BinanceCall
36
36
0.888889
5
36
6.2
1
0
0
0
0
0
0
0
0
0
0
0
0.083333
36
1
36
36
0.939394
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
003c79b49e514f45a56efcd84f0099bd0e10c31a
261
py
Python
aiida_siesta/groups/pseudos.py
pfebrer96/aiida_siesta_plugin
ef0b086f070767921edf96ca4195176877768f69
[ "MIT" ]
3
2019-05-23T13:39:40.000Z
2020-10-30T10:09:09.000Z
aiida_siesta/groups/pseudos.py
pfebrer96/aiida_siesta_plugin
ef0b086f070767921edf96ca4195176877768f69
[ "MIT" ]
44
2017-03-08T22:23:05.000Z
2020-11-30T11:03:26.000Z
aiida_siesta/groups/pseudos.py
pfebrer96/aiida_siesta_plugin
ef0b086f070767921edf96ca4195176877768f69
[ "MIT" ]
8
2017-03-08T15:25:16.000Z
2020-06-05T09:25:12.000Z
from aiida.orm.groups import Group class PsfFamily(Group): """Group that represents a pseudo potential family containing `PsfData` nodes.""" class PsmlFamily(Group): """Group that represents a pseudo potential family containing `PsmlData` nodes."""
26.1
86
0.747126
32
261
6.09375
0.59375
0.102564
0.14359
0.246154
0.574359
0.574359
0.574359
0.574359
0.574359
0
0
0
0.153257
261
9
87
29
0.882353
0.582375
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.333333
0
1
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
ccd532adcc040961e0b2d39caaf7015cde651234
96
py
Python
venv/lib/python3.8/site-packages/numpy/random/tests/test_seed_sequence.py
GiulianaPola/select_repeats
17a0d053d4f874e42cf654dd142168c2ec8fbd11
[ "MIT" ]
2
2022-03-13T01:58:52.000Z
2022-03-31T06:07:54.000Z
venv/lib/python3.8/site-packages/numpy/random/tests/test_seed_sequence.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
19
2021-11-20T04:09:18.000Z
2022-03-23T15:05:55.000Z
venv/lib/python3.8/site-packages/numpy/random/tests/test_seed_sequence.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
null
null
null
/home/runner/.cache/pip/pool/18/d4/49/e23cb3aed7e894e343de05166a69dbbcaebe6ffa756c12bf4481b4b1f5
96
96
0.895833
9
96
9.555556
1
0
0
0
0
0
0
0
0
0
0
0.364583
0
96
1
96
96
0.53125
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
ccd6c3143a50ae1c4426e47747a6018c943283d6
143
py
Python
UVa 10361 - Automatic Poetry/sample/prototype.py
tadvi/uva
0ac0cbdf593879b4fb02a3efc09adbb031cb47d5
[ "MIT" ]
1
2020-11-24T03:17:21.000Z
2020-11-24T03:17:21.000Z
UVa 10361 - Automatic Poetry/sample/prototype.py
tadvi/uva
0ac0cbdf593879b4fb02a3efc09adbb031cb47d5
[ "MIT" ]
null
null
null
UVa 10361 - Automatic Poetry/sample/prototype.py
tadvi/uva
0ac0cbdf593879b4fb02a3efc09adbb031cb47d5
[ "MIT" ]
1
2021-04-11T16:22:31.000Z
2021-04-11T16:22:31.000Z
import re print re.split('[<>]', 'ein kind haelt seinen <schn>abel <n>ur') print 'wenn es haengt an der ...'.replace('...', '<replaced text>')
35.75
67
0.629371
22
143
4.090909
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.132867
143
3
68
47.666667
0.725806
0
0
0
0
0
0.594406
0
0
0
0
0
0
0
null
null
0
0.333333
null
null
0.666667
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
1
0
5
aeb14740cd4d165514b99dc064dac9e9c5691ac5
65
py
Python
tools/virgo_platform.py
cp16net/virgo-base
9f2e0a8fa1f5c903dbceb657b3001034bbd147a3
[ "Apache-2.0" ]
1
2015-07-01T09:57:14.000Z
2015-07-01T09:57:14.000Z
tools/virgo_platform.py
kans/birgo
d9aca7356933c4bb95f5649353acbc95e3083a57
[ "Apache-2.0" ]
null
null
null
tools/virgo_platform.py
kans/birgo
d9aca7356933c4bb95f5649353acbc95e3083a57
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import pkgutils print(pkgutils.pkg_dir())
13
25
0.753846
10
65
4.8
0.9
0
0
0
0
0
0
0
0
0
0
0
0.092308
65
4
26
16.25
0.813559
0.307692
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
1
0
5
4e24775c753ecf2d9817964a1bde16ef3710750a
2,244
py
Python
src/sage/tests/books/computational-mathematics-with-sagemath/sol/linalg_doctest.py
fchapoton/sage
765c5cb3e24dd134708eca97e4c52e0221cd94ba
[ "BSL-1.0" ]
1,742
2015-01-04T07:06:13.000Z
2022-03-30T11:32:52.000Z
src/sage/tests/books/computational-mathematics-with-sagemath/sol/linalg_doctest.py
Ivo-Maffei/sage
467fbc70a08b552b3de33d9065204ee9cbfb02c7
[ "BSL-1.0" ]
66
2015-03-19T19:17:24.000Z
2022-03-16T11:59:30.000Z
src/sage/tests/books/computational-mathematics-with-sagemath/sol/linalg_doctest.py
dimpase/sage
468f23815ade42a2192b0a9cd378de8fdc594dcd
[ "BSL-1.0" ]
495
2015-01-10T10:23:18.000Z
2022-03-24T22:06:11.000Z
## -*- encoding: utf-8 -*- """ This file (./sol/linalg_doctest.sage) was *autogenerated* from ./sol/linalg.tex, with sagetex.sty version 2011/05/27 v2.3.1. It contains the contents of all the sageexample environments from this file. You should be able to doctest this file with: sage -t ./sol/linalg_doctest.sage It is always safe to delete this file; it is not used in typesetting your document. Sage example in ./sol/linalg.tex, line 89:: sage: A = matrix(GF(7),[[0,0,3,0,0],[1,0,6,0,0],[0,1,5,0,0], ....: [0,0,0,0,5],[0,0,0,1,5]]) sage: P = A.minpoly(); P x^5 + 4*x^4 + 3*x^2 + 3*x + 1 sage: P.factor() (x^2 + 2*x + 2) * (x^3 + 2*x^2 + x + 4) Sage example in ./sol/linalg.tex, line 100:: sage: e1 = identity_matrix(GF(7),5)[0] sage: e4 = identity_matrix(GF(7),5)[3] sage: A.transpose().maxspin(e1) [(1, 0, 0, 0, 0), (0, 1, 0, 0, 0), (0, 0, 1, 0, 0)] sage: A.transpose().maxspin(e4) [(0, 0, 0, 1, 0), (0, 0, 0, 0, 1)] sage: A.transpose().maxspin(e1 + e4) [(1, 0, 0, 1, 0), (0, 1, 0, 0, 1), (0, 0, 1, 5, 5), (3, 6, 5, 4, 2), (1, 5, 3, 3, 0)] Sage example in ./sol/linalg.tex, line 168:: sage: def Similar(A, B): ....: F1, U1 = A.frobenius(2) ....: F2, U2 = B.frobenius(2) ....: if F1 == F2: ....: return True, ~U2*U1 ....: else: ....: return False, F1 - F2 sage: B = matrix(ZZ, [[0,1,4,0,4],[4,-2,0,-4,-2],[0,0,0,2,1], ....: [-4,2,2,0,-1],[-4,-2,1,2,0]]) sage: U = matrix(ZZ, [[3,3,-9,-14,40],[-1,-2,4,2,1],[2,4,-7,-1,-13], ....: [-1,0,1,4,-15],[-4,-13,26,8,30]]) sage: A = (U^-1 * B * U).change_ring(ZZ) sage: ok, V = Similar(A, B); ok True sage: V [ 1 2824643/1601680 -6818729/1601680 -43439399/11211760 73108601/11211760] [ 0 342591/320336 -695773/320336 -2360063/11211760 -10291875/2242352] [ 0 -367393/640672 673091/640672 -888723/4484704 15889341/4484704] [ 0 661457/3203360 -565971/3203360 13485411/22423520 -69159661/22423520] [ 0 -4846439/3203360 7915157/3203360 -32420037/22423520 285914347/22423520] sage: ok, V = Similar(2*A, B); ok False """
38.033898
98
0.527629
393
2,244
3
0.315522
0.054283
0.043257
0.030534
0.189143
0.106022
0.106022
0.032231
0.032231
0.02799
0
0.288014
0.252674
2,244
58
99
38.689655
0.415027
0.994207
0
null
1
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
1
0
0
1
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
4e3d256db6b3b65ecc84e8b54d8ecd042f0995aa
20
py
Python
third-file.py
deepti-anand/hello-world
494fc16c416dc8fe25600d5830052343b70f2070
[ "Apache-2.0" ]
null
null
null
third-file.py
deepti-anand/hello-world
494fc16c416dc8fe25600d5830052343b70f2070
[ "Apache-2.0" ]
null
null
null
third-file.py
deepti-anand/hello-world
494fc16c416dc8fe25600d5830052343b70f2070
[ "Apache-2.0" ]
null
null
null
print("hello third")
20
20
0.75
3
20
5
1
0
0
0
0
0
0
0
0
0
0
0
0.05
20
1
20
20
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
9d68c5221ef857912f37ab2538d579ba32babf14
136
py
Python
day-4/trio_score/trio_score/materials/__init__.py
DaviRaubach/intensive
f2abce0f888f1231d0f8da6f24d41c921ea6aca1
[ "MIT" ]
null
null
null
day-4/trio_score/trio_score/materials/__init__.py
DaviRaubach/intensive
f2abce0f888f1231d0f8da6f24d41c921ea6aca1
[ "MIT" ]
null
null
null
day-4/trio_score/trio_score/materials/__init__.py
DaviRaubach/intensive
f2abce0f888f1231d0f8da6f24d41c921ea6aca1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import abjad.system abjad.system.ImportManager.import_material_packages( __path__[0], globals(), )
17
52
0.669118
15
136
5.666667
0.8
0.258824
0
0
0
0
0
0
0
0
0
0.017857
0.176471
136
7
53
19.428571
0.741071
0.154412
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
9df0bbfd3b4a4b027015e9fde6fa3b5d9838fe05
469
py
Python
python/OpenCalc/Lib/Code/Functions/Standard.py
josephlewis42/personal_codebase
aa0fff9a908ab90bc78d24aa69d1b91163c35314
[ "Unlicense" ]
3
2015-11-24T17:06:58.000Z
2018-05-01T14:03:57.000Z
python/OpenCalc/Lib/Code/Functions/Standard.py
josephlewis42/personal_codebase
aa0fff9a908ab90bc78d24aa69d1b91163c35314
[ "Unlicense" ]
null
null
null
python/OpenCalc/Lib/Code/Functions/Standard.py
josephlewis42/personal_codebase
aa0fff9a908ab90bc78d24aa69d1b91163c35314
[ "Unlicense" ]
null
null
null
''' Description Of Module @Author = Joseph Lewis<joehms22@gmail.com> @Date = 2010-2-24 @License = GPL ==Changelog== 2010-2-24 - First version made by Joseph Lewis 2010-03-04 - Abs fixed so it will not return a string, and print an error Joseph Lewis 2010-03-17 - Abs fixed from a prior error, in which it didn't work (abs used instead of fabs) ''' #Import Statements import math import OpenCalc #Define Constants #Define Functions def abs(num): return math.fabs(num)
24.684211
93
0.744136
80
469
4.3625
0.6875
0.094556
0.040115
0.097421
0
0
0
0
0
0
0
0.081218
0.159915
469
18
94
26.055556
0.804569
0.829424
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.5
0.25
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
5
d186988bb05f80f51338732e06d446064af18473
339
py
Python
fantasy_sports/apps/boa/views/__init__.py
HowardSnable/aoe_fantasy
bca280730a71a10801a3f90df05c75c2a5279c5c
[ "MIT" ]
null
null
null
fantasy_sports/apps/boa/views/__init__.py
HowardSnable/aoe_fantasy
bca280730a71a10801a3f90df05c75c2a5279c5c
[ "MIT" ]
null
null
null
fantasy_sports/apps/boa/views/__init__.py
HowardSnable/aoe_fantasy
bca280730a71a10801a3f90df05c75c2a5279c5c
[ "MIT" ]
null
null
null
from .create_league import CreateLeague from .find_league import FindLeague from .my_leagues import MyLeagues from .display_league import DisplayLeague from .update_league import UpdateLeague from .join_league import JoinLeague from .results_view import ResultView from .market_info_view import MarketInfoView from .rules import RulesView
33.9
44
0.867257
45
339
6.333333
0.533333
0.210526
0
0
0
0
0
0
0
0
0
0
0.106195
339
9
45
37.666667
0.940594
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
d1b5ee1a574f28fdb81fc99dd7c17dec3bea20c4
40
py
Python
metamapper/instruction_selection/__init__.py
rdaly525/MetaMapper
7f8278a012435d5d05ff6b388b7c1146061d6f1c
[ "BSD-3-Clause" ]
3
2019-04-09T22:58:21.000Z
2019-08-16T18:18:12.000Z
metamapper/instruction_selection/__init__.py
rdaly525/MetaMapper
7f8278a012435d5d05ff6b388b7c1146061d6f1c
[ "BSD-3-Clause" ]
22
2019-03-13T19:42:35.000Z
2022-03-29T19:49:33.000Z
metamapper/instruction_selection/__init__.py
rdaly525/MetaMapper
7f8278a012435d5d05ff6b388b7c1146061d6f1c
[ "BSD-3-Clause" ]
1
2019-04-09T05:35:52.000Z
2019-04-09T05:35:52.000Z
from .dag_rewrite import GreedyCovering
20
39
0.875
5
40
6.8
1
0
0
0
0
0
0
0
0
0
0
0
0.1
40
1
40
40
0.944444
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
d1c4e7de9c5d5b53e103a935c5f17fcf43585c48
127
py
Python
InventorySystem/paper/admin.py
guyueming/PythonWeb
e8a38fc26c06ec78e1de61d65055dcfc480ef8f1
[ "MIT" ]
null
null
null
InventorySystem/paper/admin.py
guyueming/PythonWeb
e8a38fc26c06ec78e1de61d65055dcfc480ef8f1
[ "MIT" ]
null
null
null
InventorySystem/paper/admin.py
guyueming/PythonWeb
e8a38fc26c06ec78e1de61d65055dcfc480ef8f1
[ "MIT" ]
null
null
null
from django.contrib import admin # Register your models here. from .models import PaperModel admin.site.register(PaperModel)
18.142857
32
0.811024
17
127
6.058824
0.647059
0
0
0
0
0
0
0
0
0
0
0
0.125984
127
6
33
21.166667
0.927928
0.204724
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
ae2fa3017f9278cd6a1326bc727b40346050bc55
209
py
Python
Basics/Lesson 1 - printing and commenting/main.py
frainfreeze/teaching-python
f4e5de52bfb1d47597e6b3c748717122dab13a14
[ "BSD-2-Clause" ]
null
null
null
Basics/Lesson 1 - printing and commenting/main.py
frainfreeze/teaching-python
f4e5de52bfb1d47597e6b3c748717122dab13a14
[ "BSD-2-Clause" ]
null
null
null
Basics/Lesson 1 - printing and commenting/main.py
frainfreeze/teaching-python
f4e5de52bfb1d47597e6b3c748717122dab13a14
[ "BSD-2-Clause" ]
null
null
null
#python 2.7 print("Hello world") print "Hello world" print("Not a comment") print("Am a comment") ''' print("We are in a comment") print ("We are still in a comment") ''' print("We are out of the comment")
14.928571
35
0.665072
37
209
3.756757
0.459459
0.230216
0.374101
0.323741
0.417266
0.28777
0
0
0
0
0
0.011561
0.172249
209
13
36
16.076923
0.791908
0.047847
0
0
0
0
0.571429
0
0
0
0
0
0
0
null
null
0
0
null
null
1
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
1
0
0
0
0
0
0
1
0
5
ae442db5d852cbf993cb99bd42683b8d7aa70703
174
py
Python
torch_geometric_temporal/data/dataset/__init__.py
LFrancesco/pytorch_geometric_temporal
0964515a6041ce0cceb12e36ed640df22c046b4d
[ "MIT" ]
null
null
null
torch_geometric_temporal/data/dataset/__init__.py
LFrancesco/pytorch_geometric_temporal
0964515a6041ce0cceb12e36ed640df22c046b4d
[ "MIT" ]
null
null
null
torch_geometric_temporal/data/dataset/__init__.py
LFrancesco/pytorch_geometric_temporal
0964515a6041ce0cceb12e36ed640df22c046b4d
[ "MIT" ]
null
null
null
from .chickenpox import ChickenpoxDatasetLoader from .pedalme import PedalMeDatasetLoader from .metr_la import METRLADatasetLoader from .pems_bay import PemsBayDatasetLoader
34.8
47
0.885057
18
174
8.444444
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.091954
174
4
48
43.5
0.962025
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
ae582d8b240fb47f0d13ed06fd0475bd346d21c6
175
py
Python
runner_service/controllers/__init__.py
benthomasson/ansible-runner-service
7bbf694ff26f35dba7fdd36c74ecefdd29de2694
[ "Apache-2.0" ]
null
null
null
runner_service/controllers/__init__.py
benthomasson/ansible-runner-service
7bbf694ff26f35dba7fdd36c74ecefdd29de2694
[ "Apache-2.0" ]
null
null
null
runner_service/controllers/__init__.py
benthomasson/ansible-runner-service
7bbf694ff26f35dba7fdd36c74ecefdd29de2694
[ "Apache-2.0" ]
null
null
null
from .playbooks import ListPlaybooks, PlaybookState, StartPlaybook from .api import API from .hosts import Hosts, HostMgmt, HostUpdate from .jobs import ListEvents, GetEvent
29.166667
66
0.822857
21
175
6.857143
0.619048
0
0
0
0
0
0
0
0
0
0
0
0.125714
175
5
67
35
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
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
ae590b8618092fd584fe9295aac1815af575001d
171
py
Python
ingestion/Ingestion/__init__.py
captechconsulting/alfred
424aa5c0ce3446e091c2c935a9d593bb2731cf7c
[ "Apache-2.0" ]
11
2018-03-28T04:58:23.000Z
2021-03-16T16:29:55.000Z
ingestion/Ingestion/__init__.py
captechconsulting/alfred
424aa5c0ce3446e091c2c935a9d593bb2731cf7c
[ "Apache-2.0" ]
4
2018-06-15T18:53:41.000Z
2020-04-16T15:46:24.000Z
ingestion/Ingestion/__init__.py
captechconsulting/alfred
424aa5c0ce3446e091c2c935a9d593bb2731cf7c
[ "Apache-2.0" ]
10
2018-01-23T16:17:47.000Z
2020-03-25T17:32:33.000Z
import sys from os import path import copyToHDFS import registry as reg from loglib import setup_logging sys.path.append(path.join(path.dirname(path.realpath(__file__))))
24.428571
65
0.824561
27
171
5.037037
0.62963
0
0
0
0
0
0
0
0
0
0
0
0.099415
171
6
66
28.5
0.883117
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.833333
0
0.833333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
ae88193136fc7be6516110c930fef9a14ff49278
46
py
Python
rotterdam/test/__init__.py
lvh/rotterdam
aded889c6f763675813e4e4d271a6fd072dcee30
[ "Apache-2.0" ]
null
null
null
rotterdam/test/__init__.py
lvh/rotterdam
aded889c6f763675813e4e4d271a6fd072dcee30
[ "Apache-2.0" ]
null
null
null
rotterdam/test/__init__.py
lvh/rotterdam
aded889c6f763675813e4e4d271a6fd072dcee30
[ "Apache-2.0" ]
null
null
null
"""Tests for a bunch of otter experiments."""
23
45
0.695652
7
46
4.571429
1
0
0
0
0
0
0
0
0
0
0
0
0.152174
46
1
46
46
0.820513
0.847826
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
ae99b0e738c305894e71d17a9072ddca068b8bc4
45
py
Python
mager/copy_checker/errors.py
Frank17/Mager
aca848e201556a12ecaf0a4510241e23569d1107
[ "MIT" ]
1
2022-03-21T06:22:09.000Z
2022-03-21T06:22:09.000Z
mager/copy_checker/errors.py
Frank17/Mager
aca848e201556a12ecaf0a4510241e23569d1107
[ "MIT" ]
null
null
null
mager/copy_checker/errors.py
Frank17/Mager
aca848e201556a12ecaf0a4510241e23569d1107
[ "MIT" ]
null
null
null
class WrongValuesError(ValueError): pass
15
35
0.777778
4
45
8.75
1
0
0
0
0
0
0
0
0
0
0
0
0.155556
45
2
36
22.5
0.921053
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
881b137bff87593b0494f43ffbbe5a93bd7d52d2
52
py
Python
web_server/authors/models.py
ColeBoytinck/cmput404-group-project
133e118fe8453b13f0d5afdf7b8d625eba9e4086
[ "MIT" ]
null
null
null
web_server/authors/models.py
ColeBoytinck/cmput404-group-project
133e118fe8453b13f0d5afdf7b8d625eba9e4086
[ "MIT" ]
144
2020-02-04T04:18:54.000Z
2021-04-08T21:24:19.000Z
web_server/authors/models.py
ColeBoytinck/cmput404-group-project
133e118fe8453b13f0d5afdf7b8d625eba9e4086
[ "MIT" ]
13
2020-01-30T00:00:12.000Z
2020-04-06T05:22:04.000Z
from django.db import models from uuid import uuid4
17.333333
28
0.826923
9
52
4.777778
0.777778
0
0
0
0
0
0
0
0
0
0
0.022727
0.153846
52
2
29
26
0.954545
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
88242f2999badc907d3cde0c97101fdf0ed44c20
58
py
Python
test/Actions/addpost-link-fixture/strip.py
moroten/scons
20927b42ed4f0cb87f51287fa3b4b6cf915afcf8
[ "MIT" ]
1,403
2017-11-23T14:24:01.000Z
2022-03-30T20:59:39.000Z
test/Actions/addpost-link-fixture/strip.py
moroten/scons
20927b42ed4f0cb87f51287fa3b4b6cf915afcf8
[ "MIT" ]
3,708
2017-11-27T13:47:12.000Z
2022-03-29T17:21:17.000Z
test/Actions/addpost-link-fixture/strip.py
moroten/scons
20927b42ed4f0cb87f51287fa3b4b6cf915afcf8
[ "MIT" ]
281
2017-12-01T23:48:38.000Z
2022-03-31T15:25:44.000Z
import sys print("strip.py: %s" % " ".join(sys.argv[1:]))
19.333333
46
0.586207
10
58
3.4
0.9
0
0
0
0
0
0
0
0
0
0
0.019608
0.12069
58
2
47
29
0.647059
0
0
0
0
0
0.224138
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
1
0
5
882751ab98a78ee0b45fba433cebe125d25c5a55
61
py
Python
wordsToNumbers/word_sphere/__init__.py
VoicuTomut/Qountry
841467eca5704fd24c49000668f739cae8155b59
[ "MIT" ]
null
null
null
wordsToNumbers/word_sphere/__init__.py
VoicuTomut/Qountry
841467eca5704fd24c49000668f739cae8155b59
[ "MIT" ]
null
null
null
wordsToNumbers/word_sphere/__init__.py
VoicuTomut/Qountry
841467eca5704fd24c49000668f739cae8155b59
[ "MIT" ]
null
null
null
""" """ from .fibonacci_mapping import fibonacci_vocabulary
12.2
51
0.770492
6
61
7.5
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.114754
61
4
52
15.25
0.833333
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
88a0dce326ca72368f56bc5d90b475cc3575c96b
204
py
Python
ark/tree/__init__.py
YaserJaradeh/ARK
4ab65c81868698293fe3ffde24b9139788ab7deb
[ "MIT" ]
null
null
null
ark/tree/__init__.py
YaserJaradeh/ARK
4ab65c81868698293fe3ffde24b9139788ab7deb
[ "MIT" ]
null
null
null
ark/tree/__init__.py
YaserJaradeh/ARK
4ab65c81868698293fe3ffde24b9139788ab7deb
[ "MIT" ]
null
null
null
from .components import DTCommand, DTChance, DTChoice, DTCondition, DTExpr from .nodes import DTNode, GameNode, ChanceNode, ChoiceNode, ConditionNode from .base import BaseDecisionTree, DummyDecisionTree
51
74
0.838235
21
204
8.142857
0.809524
0
0
0
0
0
0
0
0
0
0
0
0.102941
204
3
75
68
0.934426
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
88a5d53e9a520b2e1850da9de83fa53be972b926
72
py
Python
pyautofinance/common/learn/__init__.py
webclinic017/PyAutoFinance
532cb1c5418dd9eeb07f2f08646170cde1fe0303
[ "MIT" ]
null
null
null
pyautofinance/common/learn/__init__.py
webclinic017/PyAutoFinance
532cb1c5418dd9eeb07f2f08646170cde1fe0303
[ "MIT" ]
null
null
null
pyautofinance/common/learn/__init__.py
webclinic017/PyAutoFinance
532cb1c5418dd9eeb07f2f08646170cde1fe0303
[ "MIT" ]
1
2022-02-24T09:18:13.000Z
2022-02-24T09:18:13.000Z
from pyautofinance.common.learn.ta_lib_predicter import TaLibPredicter
24
70
0.888889
9
72
6.888889
1
0
0
0
0
0
0
0
0
0
0
0
0.069444
72
2
71
36
0.925373
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
31f46409850146ed0459306d4c38fb518d991860
515
py
Python
Example5.3/dealer.py
yuishihara/ReinforcementLearningExcersices
e68b10e6cc11f30b25ceb14c9c5fd433f7ae9d5a
[ "MIT" ]
null
null
null
Example5.3/dealer.py
yuishihara/ReinforcementLearningExcersices
e68b10e6cc11f30b25ceb14c9c5fd433f7ae9d5a
[ "MIT" ]
null
null
null
Example5.3/dealer.py
yuishihara/ReinforcementLearningExcersices
e68b10e6cc11f30b25ceb14c9c5fd433f7ae9d5a
[ "MIT" ]
null
null
null
class Dealer: def __init__(self): self.__hand = None def select_action(self): if self.hand_total() < 17: return 1 else: return 0 def give_card(self, card): self.__hand.add_card(card) def revealed_card(self): cards = self.__hand.cards() return cards[0] def is_busted(self): return self.__hand.is_busted() def new_hand(self, hand): self.__hand = hand def hand(self): return self.__hand def hand_total(self): return self.__hand.total()
14.305556
34
0.638835
74
515
4.081081
0.324324
0.238411
0.139073
0.178808
0
0
0
0
0
0
0
0.012953
0.250485
515
35
35
14.714286
0.76943
0
0
0
0
0
0
0
0
0
0
0
0
1
0.380952
false
0
0
0.142857
0.714286
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
c9d071bccd51291361b428ae46c21a6394e4ab69
22
py
Python
machinelearning/knn.py
Anandsingh28/css-1
7d7685fdea311e0bfdc4e4574188cb2543b6aa71
[ "MIT" ]
null
null
null
machinelearning/knn.py
Anandsingh28/css-1
7d7685fdea311e0bfdc4e4574188cb2543b6aa71
[ "MIT" ]
null
null
null
machinelearning/knn.py
Anandsingh28/css-1
7d7685fdea311e0bfdc4e4574188cb2543b6aa71
[ "MIT" ]
null
null
null
print("ye knn.py hai")
22
22
0.681818
5
22
3
1
0
0
0
0
0
0
0
0
0
0
0
0.090909
22
1
22
22
0.75
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
c9d54bfff98ad8c16be711f92a54b8c01cc8654a
77
py
Python
ox_herd/core/utils/__init__.py
empower-capital/ox_herd
2aa77db945296c152dc8d420f42a6d6455d514fa
[ "BSD-2-Clause" ]
1
2021-11-28T20:35:31.000Z
2021-11-28T20:35:31.000Z
ox_herd/core/utils/__init__.py
empower-capital/ox_herd
2aa77db945296c152dc8d420f42a6d6455d514fa
[ "BSD-2-Clause" ]
5
2017-11-21T00:21:13.000Z
2021-06-30T19:47:54.000Z
ox_herd/core/utils/__init__.py
empower-capital/ox_herd
2aa77db945296c152dc8d420f42a6d6455d514fa
[ "BSD-2-Clause" ]
4
2021-12-17T10:58:15.000Z
2021-12-23T14:38:40.000Z
"""The ox_herd.core.utils package contains useful utilities for ox_herd. """
25.666667
72
0.766234
12
77
4.75
0.833333
0.210526
0
0
0
0
0
0
0
0
0
0
0.116883
77
2
73
38.5
0.838235
0.896104
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
c9f024dde7ed6e8fcd6679bec6b85a0625671fb9
159
py
Python
pylinear/source/__init__.py
Russell-Ryan/pyLINEAR
d68e44bc64d302b816db69d2becc4de3b15059f9
[ "MIT" ]
2
2019-08-07T19:57:04.000Z
2021-01-21T22:54:13.000Z
pylinear/source/__init__.py
Russell-Ryan/pyLINEAR
d68e44bc64d302b816db69d2becc4de3b15059f9
[ "MIT" ]
1
2019-10-02T03:18:26.000Z
2019-10-02T03:18:26.000Z
pylinear/source/__init__.py
Russell-Ryan/pyLINEAR
d68e44bc64d302b816db69d2becc4de3b15059f9
[ "MIT" ]
5
2019-09-03T17:01:10.000Z
2020-08-05T17:49:42.000Z
from .compositesource import CompositeSource from .source import Source from .sourcecollection import SourceCollection from .directimages import DirectImages
26.5
46
0.867925
16
159
8.625
0.375
0
0
0
0
0
0
0
0
0
0
0
0.106918
159
5
47
31.8
0.971831
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
4e42a885888b002674726ea10819337d3890a091
2,665
py
Python
Assignment_4/Medhi-04-03.py
pranavmedhi123/Neural-Networks
d944db015230131a19e585c509b7c735dd56e69b
[ "Apache-2.0" ]
null
null
null
Assignment_4/Medhi-04-03.py
pranavmedhi123/Neural-Networks
d944db015230131a19e585c509b7c735dd56e69b
[ "Apache-2.0" ]
null
null
null
Assignment_4/Medhi-04-03.py
pranavmedhi123/Neural-Networks
d944db015230131a19e585c509b7c735dd56e69b
[ "Apache-2.0" ]
null
null
null
# Medhi, Pranav # 1001-756-326 # 2020_04_20 # Assignment-04-03 import tensorflow as tf import tensorflow.keras as keras import pytest import numpy as np from cnn import CNN import os from tensorflow.keras import utils as np_utils import matplotlib.pyplot as plt from tensorflow.keras.datasets import mnist def test_1(): (X_train, y_train), (X_test, y_test) = mnist.load_data() X_train = X_train.reshape((X_train.shape[0], 28, 28, 1)).astype('float32') X_test = X_test.reshape((X_test.shape[0], 28, 28, 1)).astype('float32') X_train = X_train / 255 X_test = X_test / 255 tc = np_utils.to_categorical(y_test) num_classes = tc.shape[1] model=CNN() model.add_input_layer(shape=(28, 28, 1), name="input0") model.append_conv2d_layer(32, (5, 5), activation='relu') model.append_maxpooling2d_layer(pool_size=(2, 2), padding="same", strides=2, name='pooling') model.append_flatten_layer(name='flatten') model.append_dense_layer(num_nodes=128, activation='relu') model.append_dense_layer(num_nodes=10, activation='softmax') model.set_loss_function(loss="SparseCategoricalCrossentropy") model.set_optimizer(optimizer="SGD") model.set_metric('accuracy') batch_size=1000 num_epoch=10 y=model.train(X_train,y_train,batch_size=batch_size,num_epochs=num_epoch) # y=history.history['loss'] assert y[-1]<y[0] # x=y.history['acc'] x=model.accuracies assert x[-1]>x[0] def test_2(): (X_train, y_train), (X_test, y_test) = mnist.load_data() X_train = X_train.reshape((X_train.shape[0], 28, 28, 1)).astype('float32') X_test = X_test.reshape((X_test.shape[0], 28, 28, 1)).astype('float32') X_train = X_train / 255 X_test = X_test / 255 tc = np_utils.to_categorical(y_test) num_classes = tc.shape[1] model=CNN() model.add_input_layer(shape=(28, 28, 1), name="input0") model.append_conv2d_layer(32, (5, 5), activation='relu') model.append_maxpooling2d_layer(pool_size=(2, 2), padding="same", strides=2, name='pooling') model.append_flatten_layer(name='flatten') model.append_dense_layer(num_nodes=128, activation='relu') model.append_dense_layer(num_nodes=10, activation='softmax') model.set_loss_function(loss="SparseCategoricalCrossentropy") model.set_optimizer(optimizer="SGD") model.set_metric('accuracy') batch_size=1000 num_epoch=10 history=model.train(X_train,y_train,batch_size=batch_size,num_epochs=num_epoch) evaluate = model.evaluate(X_test, y_test) assert evaluate[0] < 0.35 and evaluate[1]> 0.9
35.533333
97
0.689306
407
2,665
4.27027
0.228501
0.048331
0.037975
0.027618
0.76985
0.76985
0.76985
0.76985
0.76985
0.76985
0
0.06051
0.175235
2,665
74
98
36.013514
0.730209
0.037148
0
0.678571
0
0
0.074849
0.02334
0
0
0
0
0.053571
1
0.035714
false
0
0.160714
0
0.196429
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