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
ac8692727ad524f2d3b0d53f9d7da9a4e636c56b
122
py
Python
mantrid/tests/__init__.py
epio/mantrid
1c699f1a4b33888b533c19cb6d025173f2160576
[ "BSD-3-Clause" ]
30
2015-01-01T00:32:47.000Z
2021-09-07T20:25:01.000Z
mantrid/tests/__init__.py
epio/mantrid
1c699f1a4b33888b533c19cb6d025173f2160576
[ "BSD-3-Clause" ]
null
null
null
mantrid/tests/__init__.py
epio/mantrid
1c699f1a4b33888b533c19cb6d025173f2160576
[ "BSD-3-Clause" ]
9
2015-05-12T05:09:12.000Z
2021-12-29T19:07:01.000Z
from .actions import ActionTests, LiveActionTests from .loadbalancer import BalancerTests from .client import ClientTests
30.5
49
0.860656
13
122
8.076923
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.106557
122
3
50
40.666667
0.963303
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
cbf77873c9a736393fe350f1ba585823269e9040
42
py
Python
tests/assets/syntaxerrorpackage/foo/one.py
mrcljx/grimp
258eee1e6aa4908fffc1962d82cd01a3f5fd395c
[ "BSD-2-Clause" ]
19
2019-01-21T09:45:00.000Z
2022-02-21T11:20:09.000Z
tests/assets/syntaxerrorpackage/foo/one.py
mrcljx/grimp
258eee1e6aa4908fffc1962d82cd01a3f5fd395c
[ "BSD-2-Clause" ]
51
2018-11-05T17:10:31.000Z
2022-01-05T18:24:18.000Z
tests/assets/syntaxerrorpackage/foo/one.py
mrcljx/grimp
258eee1e6aa4908fffc1962d82cd01a3f5fd395c
[ "BSD-2-Clause" ]
4
2021-01-16T04:16:22.000Z
2021-12-23T02:50:04.000Z
# Some comment x = 1 fromb . import two
7
18
0.642857
7
42
3.857143
1
0
0
0
0
0
0
0
0
0
0
0.033333
0.285714
42
5
19
8.4
0.866667
0.285714
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0.5
null
null
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
1
0
0
0
1
0
0
0
0
5
024290e99fbeb2e4ab9bf28ac3470f17a7ace5ce
197
py
Python
src/ciptools/metadata.py
uwcip/python-ciptools
7df1fcb98f843fe43395d04f50f38105580ddfe0
[ "Apache-2.0" ]
null
null
null
src/ciptools/metadata.py
uwcip/python-ciptools
7df1fcb98f843fe43395d04f50f38105580ddfe0
[ "Apache-2.0" ]
3
2021-08-17T17:52:26.000Z
2022-01-06T17:36:00.000Z
src/ciptools/metadata.py
uwcip/python-ciptools
7df1fcb98f843fe43395d04f50f38105580ddfe0
[ "Apache-2.0" ]
null
null
null
import importlib_metadata def version(package: str) -> str: try: return importlib_metadata.version(package) except importlib_metadata.PackageNotFoundError: return "0.0.0"
21.888889
51
0.715736
22
197
6.272727
0.545455
0.369565
0
0
0
0
0
0
0
0
0
0.019108
0.203046
197
8
52
24.625
0.859873
0
0
0
0
0
0.025381
0
0
0
0
0
0
1
0.166667
false
0
0.5
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
0260724a3f89bcf35865f0e5b7d9a5f71031e2c3
29
py
Python
src/lovely/pytest/__init__.py
angry-penguins/penguins-pytest-docker
1382f8c8af23e263f6c95441b498b900e36c5641
[ "Apache-2.0" ]
73
2018-01-10T15:21:59.000Z
2022-01-21T10:38:07.000Z
src/lovely/pytest/__init__.py
angry-penguins/penguins-pytest-docker
1382f8c8af23e263f6c95441b498b900e36c5641
[ "Apache-2.0" ]
15
2019-01-18T13:59:51.000Z
2021-12-02T12:48:31.000Z
src/lovely/pytest/__init__.py
angry-penguins/penguins-pytest-docker
1382f8c8af23e263f6c95441b498b900e36c5641
[ "Apache-2.0" ]
12
2018-08-28T13:17:13.000Z
2022-03-31T01:09:24.000Z
class Test(object): pass
9.666667
19
0.655172
4
29
4.75
1
0
0
0
0
0
0
0
0
0
0
0
0.241379
29
2
20
14.5
0.863636
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
0261444f1f253f9f97d9d848926ba704e9ed491b
210
py
Python
handlers/todo.py
makenew/serverless-python
cbfc860ab82de76c8a0a95167e5eea2fec665816
[ "MIT" ]
6
2019-04-30T16:44:20.000Z
2021-12-25T23:23:41.000Z
handlers/todo.py
makenew/serverless-python
cbfc860ab82de76c8a0a95167e5eea2fec665816
[ "MIT" ]
15
2020-03-28T20:29:38.000Z
2021-09-11T07:19:46.000Z
handlers/todo.py
makenew/serverless-python
cbfc860ab82de76c8a0a95167e5eea2fec665816
[ "MIT" ]
3
2019-11-21T08:29:14.000Z
2021-01-10T17:22:41.000Z
import json import toml version = toml.load("pyproject.toml")["tool"]["poetry"]["version"] def main(event, context): return {"statusCode": 200, "body": json.dumps({"data": "TODO", "version": version})}
21
88
0.657143
26
210
5.307692
0.730769
0
0
0
0
0
0
0
0
0
0
0.016304
0.12381
210
9
89
23.333333
0.733696
0
0
0
0
0
0.285714
0
0
0
0
0
0
1
0.2
false
0
0.4
0.2
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
1
0
0
5
65f185aff856ee6dd908d640bd49c233f6d3cdb9
119
py
Python
gaussianlog2xyz.py
lr142/UniversalMolecularSystem
5caf56b2941a287fd63dcb60664c31847624a0cb
[ "CC0-1.0" ]
null
null
null
gaussianlog2xyz.py
lr142/UniversalMolecularSystem
5caf56b2941a287fd63dcb60664c31847624a0cb
[ "CC0-1.0" ]
null
null
null
gaussianlog2xyz.py
lr142/UniversalMolecularSystem
5caf56b2941a287fd63dcb60664c31847624a0cb
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/python import UniversalMolecularSystem as UMS import sys UMS.MainAsGaussianLog2XYZ(len(sys.argv),sys.argv)
19.833333
49
0.815126
16
119
6.0625
0.6875
0.14433
0
0
0
0
0
0
0
0
0
0.009091
0.07563
119
5
50
23.8
0.872727
0.134454
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
5a03c096721dd766e86f2e48698b3b805df08dc2
177
py
Python
cairo_planning_core/config.py
cairo-robotics/planning_core_rust
9a1ff401333276ee8199c682a3968cb7070b7719
[ "MIT" ]
null
null
null
cairo_planning_core/config.py
cairo-robotics/planning_core_rust
9a1ff401333276ee8199c682a3968cb7070b7719
[ "MIT" ]
null
null
null
cairo_planning_core/config.py
cairo-robotics/planning_core_rust
9a1ff401333276ee8199c682a3968cb7070b7719
[ "MIT" ]
null
null
null
import os _ROOT = os.path.abspath(os.path.dirname(__file__)) os.environ["config_path"] = os.path.join(_ROOT, 'data/config/') CONFIG_PATH = os.path.join(_ROOT, 'data/config/')
25.285714
63
0.723164
28
177
4.25
0.392857
0.201681
0.201681
0.268908
0.571429
0.571429
0.571429
0.571429
0
0
0
0
0.084746
177
7
64
25.285714
0.734568
0
0
0
0
0
0.196629
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
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
5a2e95b8fbd18334b64cbb9cee408072bec4925f
55
py
Python
src/vak/split/__init__.py
yardencsGitHub/vak
04da97b02ded5acccab437c2538d0a1ded3bef80
[ "BSD-3-Clause" ]
26
2019-03-04T20:08:57.000Z
2022-01-22T13:40:00.000Z
src/vak/split/__init__.py
yardencsGitHub/vak
04da97b02ded5acccab437c2538d0a1ded3bef80
[ "BSD-3-Clause" ]
379
2019-03-03T12:16:05.000Z
2022-03-29T13:44:46.000Z
src/vak/split/__init__.py
yardencsGitHub/vak
04da97b02ded5acccab437c2538d0a1ded3bef80
[ "BSD-3-Clause" ]
12
2019-11-22T21:19:19.000Z
2022-03-14T17:44:59.000Z
from . import algorithms from .split import dataframe
13.75
28
0.8
7
55
6.285714
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.163636
55
3
29
18.333333
0.956522
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
5a405f47ddf21c183606ce8ddf0ced0850714ad7
57
py
Python
cyp/models/__init__.py
DaikiOnodera/pycrop-yield-prediction
335685d3aa6e609161737453c090f5c41b769213
[ "MIT" ]
93
2019-02-25T10:43:24.000Z
2022-03-29T18:58:17.000Z
cyp/models/__init__.py
hulaba/pycrop-yield-prediction
b4790dc2f87a73e8a0604e8c22466314090c5abf
[ "MIT" ]
7
2019-11-19T22:15:41.000Z
2022-01-03T19:56:00.000Z
cyp/models/__init__.py
hulaba/pycrop-yield-prediction
b4790dc2f87a73e8a0604e8c22466314090c5abf
[ "MIT" ]
47
2019-03-08T14:23:00.000Z
2022-03-30T20:24:36.000Z
from .convnet import ConvModel from .rnn import RNNModel
19
30
0.824561
8
57
5.875
0.75
0
0
0
0
0
0
0
0
0
0
0
0.140351
57
2
31
28.5
0.959184
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
5a443d02e5373cf7de134a2751bd4a657de77d26
69
py
Python
core/translator/__init__.py
zilohumberto/EcobiciStatistics
fbd6c6ef9806cb55385f8cbc1acc9ebbc32a9868
[ "MIT" ]
null
null
null
core/translator/__init__.py
zilohumberto/EcobiciStatistics
fbd6c6ef9806cb55385f8cbc1acc9ebbc32a9868
[ "MIT" ]
null
null
null
core/translator/__init__.py
zilohumberto/EcobiciStatistics
fbd6c6ef9806cb55385f8cbc1acc9ebbc32a9868
[ "MIT" ]
null
null
null
from .translator import Translator from .csv_parser import CsvParser
23
34
0.855072
9
69
6.444444
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.115942
69
2
35
34.5
0.95082
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
5a6b8c6d88980e9666d6b21182a50046df7487f4
145
py
Python
src/api/domain/models/response_model.py
DenisioMytnysiano/lodetta
b321e14df78e6af129753fa1c1ea9ba2cb72e8db
[ "MIT" ]
null
null
null
src/api/domain/models/response_model.py
DenisioMytnysiano/lodetta
b321e14df78e6af129753fa1c1ea9ba2cb72e8db
[ "MIT" ]
null
null
null
src/api/domain/models/response_model.py
DenisioMytnysiano/lodetta
b321e14df78e6af129753fa1c1ea9ba2cb72e8db
[ "MIT" ]
null
null
null
from typing import List from pydantic import BaseModel class ResponseModel(BaseModel): data: List[BaseModel] code: int message: str
18.125
31
0.744828
18
145
6
0.722222
0
0
0
0
0
0
0
0
0
0
0
0.2
145
7
32
20.714286
0.931034
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
5a7e813b4dd0bfd375e7b4ff429a8a072aca0b22
127
py
Python
Codefights/arcade/code-arcade/level-3/21.Second-Rightmost-Zero-Bit/Python/solution1.py
RevansChen/online-judge
ad1b07fee7bd3c49418becccda904e17505f3018
[ "MIT" ]
7
2017-09-20T16:40:39.000Z
2021-08-31T18:15:08.000Z
Codefights/arcade/code-arcade/level-3/21.Second-Rightmost-Zero-Bit/Python/solution1.py
RevansChen/online-judge
ad1b07fee7bd3c49418becccda904e17505f3018
[ "MIT" ]
null
null
null
Codefights/arcade/code-arcade/level-3/21.Second-Rightmost-Zero-Bit/Python/solution1.py
RevansChen/online-judge
ad1b07fee7bd3c49418becccda904e17505f3018
[ "MIT" ]
null
null
null
# Python3 # 有限制修改區域 def secondRightmostZeroBit(n): return 2 ** [i for i, b in enumerate(bin(n)[2:][::-1]) if b == '0'][1]
21.166667
74
0.590551
21
127
3.571429
0.761905
0
0
0
0
0
0
0
0
0
0
0.058252
0.188976
127
5
75
25.4
0.669903
0.11811
0
0
0
0
0.009174
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
5a7eb29517a83087f5880ce4c35ce9b42afd434a
20
py
Python
example_project/some_modules/third_modules/a95.py
Yuriy-Leonov/cython_imports_limit_issue
2f9e7c02798fb52185dabfe6ce3811c439ca2839
[ "MIT" ]
null
null
null
example_project/some_modules/third_modules/a95.py
Yuriy-Leonov/cython_imports_limit_issue
2f9e7c02798fb52185dabfe6ce3811c439ca2839
[ "MIT" ]
null
null
null
example_project/some_modules/third_modules/a95.py
Yuriy-Leonov/cython_imports_limit_issue
2f9e7c02798fb52185dabfe6ce3811c439ca2839
[ "MIT" ]
null
null
null
class A95: pass
6.666667
10
0.6
3
20
4
1
0
0
0
0
0
0
0
0
0
0
0.153846
0.35
20
2
11
10
0.769231
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
ceb8fef1cc0e6387f1648c27bd672d1a83e46b50
79
py
Python
chapter2/chapter2_type_hints_03.py
GoodMonsters/Building-Data-Science-Applications-with-FastAPI
d2218d225c5b93723ecf46c19619ed5d3f2473e6
[ "MIT" ]
107
2021-03-26T20:18:51.000Z
2022-03-26T03:38:08.000Z
chapter2/chapter2_type_hints_03.py
GoodMonsters/Building-Data-Science-Applications-with-FastAPI
d2218d225c5b93723ecf46c19619ed5d3f2473e6
[ "MIT" ]
4
2021-06-09T08:48:21.000Z
2021-12-27T09:04:43.000Z
chapter2/chapter2_type_hints_03.py
GoodMonsters/Building-Data-Science-Applications-with-FastAPI
d2218d225c5b93723ecf46c19619ed5d3f2473e6
[ "MIT" ]
58
2021-03-12T20:51:19.000Z
2022-03-27T15:49:49.000Z
from typing import List, Union l: List[Union[int, float]] = [1, 2.5, 3.14, 5]
19.75
46
0.632911
16
79
3.125
0.8125
0.36
0
0
0
0
0
0
0
0
0
0.107692
0.177215
79
3
47
26.333333
0.661538
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
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
0c765d82b8e2f527fd1612b90baa18ab761beb46
9,916
py
Python
easy_notifyer/telegram.py
Kuzyashin/easy_notifyer
340f198cd4fa8d0ced48fb5a03dd97f8f7a650e2
[ "MIT" ]
null
null
null
easy_notifyer/telegram.py
Kuzyashin/easy_notifyer
340f198cd4fa8d0ced48fb5a03dd97f8f7a650e2
[ "MIT" ]
null
null
null
easy_notifyer/telegram.py
Kuzyashin/easy_notifyer
340f198cd4fa8d0ced48fb5a03dd97f8f7a650e2
[ "MIT" ]
null
null
null
# pylint: disable=too-few-public-methods import uuid import logging from io import BytesIO from typing import BinaryIO, Dict, List, Optional, Tuple, Union from easy_notifyer.clients import AsyncRequests, Requests, Response from easy_notifyer.env import Env from easy_notifyer.utils import get_telegram_creds, run_sync logger = logging.getLogger(__name__) class TelegramBase: """Base class of telegram""" API_BASE_URL = Env.EASY_NOTIFYER_TELEGRAM_API_URL API_BASE_URL = API_BASE_URL[:-1] if API_BASE_URL.endswith('/') else API_BASE_URL def __init__( self, *, token: Optional[str] = None, chat_id: Optional[Union[int, List[int]]] = None, ): """ Args: token(str, optional): Telegram bot token. Can be use from environment variable `EASY_NOTIFYER_TELEGRAM_TOKEN`. To receive: https://core.telegram.org/bots#6-botfather. chat_id(int, list, optional): Chat ids for send message. Can be use from environment variable `EASY_NOTIFYER_TELEGRAM_CHAT_ID`. """ if token is None or chat_id is None: token, chat_id = get_telegram_creds() self._token = token self._chat_ids = [chat_id] if isinstance(chat_id, int) else chat_id self._base_api_url = f"{self.API_BASE_URL}/bot{self._token}/" @staticmethod def _response_handler(response: Response): """ Handle response from telegram api. If status code != 200 - make report to stdout by logging. Args: response(Reponse): instanse of Response """ if response.status_code != 200: logger.error('Send message to telegram error. Response: %s', response.json()) @staticmethod def _prepare_attach( *, attach: Union[bytes, str, BinaryIO, Tuple[str, Union[BinaryIO, bytes]]], filename: Optional[str] = None, ) -> Dict: """ Preparation of attach for sending to telegram Args: attach(bytes, str, binaryio, tuple): attach to send filename: filename Returns: {'document': (filename, b'file)} """ filename = filename or uuid.uuid4().hex files = {} if isinstance(attach, tuple) is True: files['document'] = attach elif isinstance(attach, bytes) is True: files['document'] = (filename, BytesIO(attach)) elif hasattr(attach, 'read') and isinstance(attach.read(0), bytes): files['document'] = (filename, attach) else: files['document'] = (filename, BytesIO(attach.encode())) return files class TelegramAsync(TelegramBase): """Async client for telegram""" def __init__( self, *, token: Optional[str] = None, chat_id: Optional[Union[int, List[int]]] = None, ): """ Args: token(str, optional): Telegram bot token. Can be use from environment variable `EASY_NOTIFYER_TELEGRAM_TOKEN`. To receive: https://core.telegram.org/bots#6-botfather. chat_id(int, list, optional): Chat ids for send message. Can be use from environment variable `EASY_NOTIFYER_TELEGRAM_CHAT_ID`. """ super().__init__(token=token, chat_id=chat_id) self._client = AsyncRequests() async def _send_post( self, *, method_api: str, params: Optional[Dict] = None, body: Optional[Dict] = None, data: Optional[Dict] = None, files: Optional[Dict] = None ) -> Response: """ Send async post request. Args: method_api(str): method of api telegram params(dict, optional): params of request. body(dict, optional): body of request. data(dict, optional): data of request. files(dict, optional): files of request in format ('filename.txt', b'filedata'). Returns: instance of Response. """ response = await self._client.post( url=self._base_api_url + method_api, params=params, body=body, data=data, files=files, ) await run_sync(self._response_handler, response) return response async def send_message(self, msg: str, **kwargs): """ Send message. Args: msg(str): text of message. **kwargs: disable_notification(bool): True to disable notification of message. disable_web_page_preview(bool): True to disable web preview for links. """ method_api = 'sendMessage' for chat_id in self._chat_ids: body = { 'chat_id': chat_id, 'text': msg, } if kwargs.get('disable_web_page_preview') is not None: body['disable_web_page_preview'] = True if kwargs.get('disable_notification') is not None: body['disable_notification'] = True await self._send_post(method_api=method_api, body=body) async def send_attach( self, attach: Union[bytes, str, BinaryIO, Tuple[str, Union[BinaryIO, bytes]]], *, msg: Optional[str] = None, filename: Optional[str] = None, **kwargs ): """ Send file. Args: attach (bytes, str, tuple): file to send. if tuple, then ('filename.txt', b'text of file'). msg (str, optional): text of message. filename(str, optional): filename if attach is string or bytes. **kwargs: disable_notification(bool): True to disable notification of message. """ method_api = 'sendDocument' files = await run_sync(self._prepare_attach, attach=attach, filename=filename) params = {} if msg is not None: params['caption'] = msg if kwargs.get('disable_notification') is not None: params['disable_notification'] = True for chat_id in self._chat_ids: params['chat_id'] = chat_id await self._send_post(method_api=method_api, params=params, files=files) class Telegram(TelegramBase): """Client of telegram""" def __init__( self, *, token: Optional[str] = None, chat_id: Optional[Union[int, List[int]]] = None, ): """ Args: token(str, optional): Telegram bot token. Can be use from environment variable `EASY_NOTIFYER_TELEGRAM_TOKEN`. To receive: https://core.telegram.org/bots#6-botfather. chat_id(int, list, optional): Chat ids for send message. Can be use from environment variable `EASY_NOTIFYER_TELEGRAM_CHAT_ID`. """ super().__init__(token=token, chat_id=chat_id) self._client = Requests() def _send_post( self, *, method_api: str, params: Optional[Dict] = None, body: Optional[Dict] = None, data: Optional[Dict] = None, files: Optional[Dict] = None, ) -> Response: """ Send post request. Args: method_api(str): method of api telegram params(dict, optional): params of request. body(dict, optional): body of request. data(dict, optional): data of request. files(dict, optional): files of request in format ('filename.txt', b'filedata'). Returns: instance of Response. """ response = self._client.post( url=self._base_api_url + method_api, params=params, body=body, data=data, files=files ) self._response_handler(response) return response def send_message(self, msg: str, **kwargs): """ Send message. Args: msg(str): text of message. **kwargs: disable_notification(bool): True to disable notification of message. disable_web_page_preview(bool): True to disable web preview for links. """ method_api = 'sendMessage' for chat_id in self._chat_ids: body = { 'chat_id': chat_id, 'text': msg, } if kwargs.get('disable_web_page_preview') is not None: body['disable_web_page_preview'] = True if kwargs.get('disable_notification') is not None: body['disable_notification'] = True self._send_post(method_api=method_api, body=body) def send_attach( self, attach: Union[bytes, str, BinaryIO, Tuple[str, Union[BinaryIO, bytes]]], *, msg: Optional[str] = None, filename: Optional[str] = None, **kwargs ): """ Send file. Args: attach (bytes, str, tuple): file to send. if tuple, then ('filename.txt', b'text of file'). msg (str, optional): text of message. filename(str, optional): filename if attach is string or bytes. **kwargs: disable_notification(bool): True to disable notification of message. """ method_api = 'sendDocument' files = self._prepare_attach(attach=attach, filename=filename) params = {} if msg is not None: params['caption'] = msg if kwargs.get('disable_notification') is not None: params['disable_notification'] = True for chat_id in self._chat_ids: params['chat_id'] = chat_id self._send_post(method_api=method_api, params=params, files=files)
35.414286
100
0.569887
1,110
9,916
4.910811
0.12973
0.033021
0.022014
0.013209
0.757109
0.740231
0.725188
0.725188
0.723354
0.709411
0
0.001807
0.330173
9,916
279
101
35.541219
0.81888
0.224687
0
0.617834
0
0
0.077315
0.021879
0
0
0
0
0
1
0.050955
false
0
0.044586
0
0.146497
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
0c80e3811dfbb8b927013576eab9eb2ddaac7877
1,081
py
Python
projects/golem_e2e/tests/test_builder_code/default_test_code.py
kangchenwei/keyautotest2
f980d46cabfc128b2099af3d33968f236923063f
[ "MIT" ]
null
null
null
projects/golem_e2e/tests/test_builder_code/default_test_code.py
kangchenwei/keyautotest2
f980d46cabfc128b2099af3d33968f236923063f
[ "MIT" ]
null
null
null
projects/golem_e2e/tests/test_builder_code/default_test_code.py
kangchenwei/keyautotest2
f980d46cabfc128b2099af3d33968f236923063f
[ "MIT" ]
null
null
null
description = 'Verify the default test code is correct' pages = ['common', 'index', 'tests', 'test_builder', 'code_editor'] def setup(data): common.access_golem(data.env.url, data.env.admin) index.create_access_project('test') common.navigate_menu('Tests') tests.create_access_random_test() click(test_builder.code_button) def test(data): code_editor.assert_line_value(0, '') code_editor.assert_line_value(1, 'description = \'\'') code_editor.assert_line_value(2, '') code_editor.assert_line_value(3, 'pages = []') code_editor.assert_line_value(4, '') code_editor.assert_line_value(5, 'def setup(data):') code_editor.assert_line_value(6, ' pass') code_editor.assert_line_value(7, '') code_editor.assert_line_value(8, 'def test(data):') code_editor.assert_line_value(9, ' pass') code_editor.assert_line_value(10, '') code_editor.assert_line_value(11, 'def teardown(data):') code_editor.assert_line_value(12, ' pass') code_editor.assert_line_value(13, '')
31.794118
60
0.683626
148
1,081
4.635135
0.324324
0.218659
0.326531
0.408163
0.571429
0.316327
0.104956
0.104956
0
0
0
0.020225
0.176688
1,081
33
61
32.757576
0.750562
0
0
0
0
0
0.172542
0
0
0
0
0
0.518519
1
0.074074
false
0.111111
0
0
0.074074
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
1
0
0
0
0
0
5
0c878f2711c657ff2b779a1c2ca7dc5bdf51b062
56
py
Python
Chem_Faiss/__init__.py
ritabratamaiti/Chem-Faiss
3793cb93c229c5042f5cf0afcb3865715fe68b97
[ "MIT" ]
9
2020-05-28T04:46:45.000Z
2022-01-02T13:24:55.000Z
Chem_Faiss/__init__.py
ritabratamaiti/Chem-Faiss
3793cb93c229c5042f5cf0afcb3865715fe68b97
[ "MIT" ]
null
null
null
Chem_Faiss/__init__.py
ritabratamaiti/Chem-Faiss
3793cb93c229c5042f5cf0afcb3865715fe68b97
[ "MIT" ]
2
2021-05-29T01:37:19.000Z
2021-09-15T03:54:25.000Z
from .pipeline import pipeline from .utils import *
14
31
0.732143
7
56
5.857143
0.571429
0
0
0
0
0
0
0
0
0
0
0
0.214286
56
3
32
18.666667
0.931818
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
0ca2556d3249ac2dad3ac15a2f94ec2e6e0a8228
158
py
Python
python/module.py
chaojie-fu/robotics_tutorial
12affebfe6cb3810cc1e8fde4c674ed077b926a5
[ "MIT" ]
1
2021-12-23T13:05:26.000Z
2021-12-23T13:05:26.000Z
python/module.py
cyoahs/robotics_tutorial
3aed846c5e95eb32dbcdeebac0b22e54cd74ea02
[ "MIT" ]
null
null
null
python/module.py
cyoahs/robotics_tutorial
3aed846c5e95eb32dbcdeebac0b22e54cd74ea02
[ "MIT" ]
1
2020-04-06T11:25:51.000Z
2020-04-06T11:25:51.000Z
import math print(math.log10(100)) import math as m print(m.log10(100)) from math import log10 print(log10(100)) from myfunc import my_func my_func(100)
12.153846
27
0.753165
29
158
4.034483
0.37931
0.205128
0.205128
0
0
0
0
0
0
0
0
0.148148
0.14557
158
12
28
13.166667
0.718519
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0.375
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
0cb90085de871932f0f61f00ab009423a27b3316
1,096
py
Python
fseutil/tests/test_lib_pd7974_1_2019.py
fsepy/fseutil
a73e6d614ce27252bcbed61661124a00a7bc6a80
[ "Apache-2.0" ]
null
null
null
fseutil/tests/test_lib_pd7974_1_2019.py
fsepy/fseutil
a73e6d614ce27252bcbed61661124a00a7bc6a80
[ "Apache-2.0" ]
7
2020-02-07T09:44:44.000Z
2020-02-20T16:58:15.000Z
fseutil/tests/test_lib_pd7974_1_2019.py
fsepy/fseutil
a73e6d614ce27252bcbed61661124a00a7bc6a80
[ "Apache-2.0" ]
null
null
null
from fseutil.libstd.pd_7974_1_2019 import _test_eq_10_virtual_origin as test_eq_10_virtual_origin from fseutil.libstd.pd_7974_1_2019 import _test_eq_14_plume_temperature as test_eq_14_plume_temperature from fseutil.libstd.pd_7974_1_2019 import _test_eq_15_plume_velocity as test_eq_15_plume_velocity from fseutil.libstd.pd_7974_1_2019 import _test_eq_22_t_squared_fire_growth as test_eq_22_t_squared_fire_growth from fseutil.libstd.pd_7974_1_2019 import _test_eq_26_axisymmetric_ceiling_jet_temperature as test_eq_26_axisymmetric_ceiling_jet_temperature from fseutil.libstd.pd_7974_1_2019 import _test_eq_27_axisymmetric_ceiling_jet_velocity as test_eq_27_axisymmetric_ceiling_jet_velocity from fseutil.libstd.pd_7974_1_2019 import _test_eq_55_activation_of_heat_detector_device as test_eq_55_activation_of_heat_detector_device test_eq_10_virtual_origin() test_eq_14_plume_temperature() test_eq_15_plume_velocity() test_eq_22_t_squared_fire_growth() test_eq_26_axisymmetric_ceiling_jet_temperature() test_eq_27_axisymmetric_ceiling_jet_velocity() test_eq_55_activation_of_heat_detector_device()
68.5
141
0.928832
195
1,096
4.507692
0.179487
0.143345
0.135381
0.151308
0.984073
0.80091
0.80091
0.484642
0.361775
0.361775
0
0.100382
0.04562
1,096
15
142
73.066667
0.739962
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
0
0
0
null
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
0cbc3da5ccf365495deac91b92884ff6f5991a5d
55
py
Python
anuvaad-etl/anuvaad-extractor/ocr-content-handler/src/repositories/__init__.py
srihari-nagaraj/anuvaad
b09b01a033a033e97db6e404c088e0e6332053e4
[ "MIT" ]
null
null
null
anuvaad-etl/anuvaad-extractor/ocr-content-handler/src/repositories/__init__.py
srihari-nagaraj/anuvaad
b09b01a033a033e97db6e404c088e0e6332053e4
[ "MIT" ]
null
null
null
anuvaad-etl/anuvaad-extractor/ocr-content-handler/src/repositories/__init__.py
srihari-nagaraj/anuvaad
b09b01a033a033e97db6e404c088e0e6332053e4
[ "MIT" ]
null
null
null
from .ocr_document import DigitalDocumentRepositories
27.5
54
0.890909
5
55
9.6
1
0
0
0
0
0
0
0
0
0
0
0
0.090909
55
2
54
27.5
0.96
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
0cfad6e0e0aa7b49971f3e37e9b72d7509fd61b1
459
py
Python
examples/python/cpu/tensors/ocean_multiply_02.py
kant/ocean-tensor-package
fb3fcff8bba7f4ef6cd8b8d02f0e1be1258da02d
[ "Apache-2.0" ]
27
2018-08-16T21:32:49.000Z
2021-11-30T10:31:08.000Z
examples/python/cpu/tensors/ocean_multiply_02.py
kant/ocean-tensor-package
fb3fcff8bba7f4ef6cd8b8d02f0e1be1258da02d
[ "Apache-2.0" ]
null
null
null
examples/python/cpu/tensors/ocean_multiply_02.py
kant/ocean-tensor-package
fb3fcff8bba7f4ef6cd8b8d02f0e1be1258da02d
[ "Apache-2.0" ]
13
2018-08-17T17:33:16.000Z
2021-11-30T10:31:09.000Z
import pyOcean_cpu as ocean A = ocean.asTensor([[0,0,1],[0,1,1],[1,0,0]],'r',ocean.bool) print("\n--------- A ---------") print(A) print("\n--------- A' ---------") print(A.T) print("\n--------- A * A ---------") print(ocean.multiply(A,A)) print("\n--------- A * A' ---------") print(ocean.multiply(A,A,'T')) print("\n--------- A' * A ---------") print(ocean.multiply(A,'T',A)) print("\n--------- A' * A' ---------") print(ocean.multiply(A,'T',A,'T'))
20.863636
60
0.43573
71
459
2.802817
0.211268
0.271357
0.211055
0.160804
0.713568
0.58794
0.58794
0.58794
0.58794
0.447236
0
0.021792
0.100218
459
21
61
21.857143
0.460048
0
0
0
0
0
0.358079
0
0
0
0
0
0
1
0
false
0
0.071429
0
0.071429
0.857143
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
0b24e36acb2a393f3754eec325e4466a42e037b4
40
py
Python
tests/components/spaceapi/__init__.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
tests/components/spaceapi/__init__.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
31,101
2020-03-02T13:00:16.000Z
2022-03-31T23:57:36.000Z
tests/components/spaceapi/__init__.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Tests for the spaceapi component."""
20
39
0.7
5
40
5.6
1
0
0
0
0
0
0
0
0
0
0
0
0.125
40
1
40
40
0.8
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
0b2e5596d928e94cc2af4863fa94d1b105b4d374
183
py
Python
app/tweet/application/dislike_tweet/command.py
NovemberOscar/my-be-architecture
4ea1945c086f655efc5dc27b47080a1d2b77c782
[ "MIT" ]
2
2021-05-16T10:44:27.000Z
2021-05-17T15:15:33.000Z
app/tweet/application/dislike_tweet/command.py
NovemberOscar/not-so-minitweet
4ea1945c086f655efc5dc27b47080a1d2b77c782
[ "MIT" ]
null
null
null
app/tweet/application/dislike_tweet/command.py
NovemberOscar/not-so-minitweet
4ea1945c086f655efc5dc27b47080a1d2b77c782
[ "MIT" ]
null
null
null
from app.common.command import Command from dataclasses import dataclass from uuid import UUID @dataclass class DislikeTweet(Command): tweet_id: UUID disliked_user_id: UUID
18.3
38
0.797814
25
183
5.72
0.56
0.083916
0
0
0
0
0
0
0
0
0
0
0.15847
183
9
39
20.333333
0.928571
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.428571
0
0.857143
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
0b516e9ff2c6a7374f3cc02f4a3e9eabd6f315d9
270
py
Python
exceptions.py
MarcMichalsky/Marvin
7f268165c58e11a40ab9e90780b0445aae40948a
[ "Apache-2.0" ]
null
null
null
exceptions.py
MarcMichalsky/Marvin
7f268165c58e11a40ab9e90780b0445aae40948a
[ "Apache-2.0" ]
null
null
null
exceptions.py
MarcMichalsky/Marvin
7f268165c58e11a40ab9e90780b0445aae40948a
[ "Apache-2.0" ]
null
null
null
class IssueStatusNotFoundException(Exception): def __init__(self, status_name: str): self.status_name = status_name def __str__(self): return f"No issue status with the name \"{self.status_name}\" could be found. Please check your config.yaml."
38.571429
117
0.718519
36
270
5.055556
0.638889
0.21978
0.230769
0
0
0
0
0
0
0
0
0
0.188889
270
6
118
45
0.83105
0
0
0
0
0
0.288889
0
0
0
0
0
0
1
0.4
false
0
0
0.2
0.8
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
5
0b756d40ca0f632cd6c2606055affe37f0cb4692
35
py
Python
111.py
Mr-zang-zero/test
52211ece95478b808c618b8e50342167f983346e
[ "Apache-2.0" ]
1
2021-02-03T02:18:05.000Z
2021-02-03T02:18:05.000Z
111.py
Mr-zang-zero/test
52211ece95478b808c618b8e50342167f983346e
[ "Apache-2.0" ]
null
null
null
111.py
Mr-zang-zero/test
52211ece95478b808c618b8e50342167f983346e
[ "Apache-2.0" ]
null
null
null
import django django.get_version()
17.5
20
0.828571
5
35
5.6
0.8
0
0
0
0
0
0
0
0
0
0
0
0.085714
35
2
20
17.5
0.875
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
0bc07b6f09f607bfeba9a6fad761d512d285bd6b
178
py
Python
tests/app/conftest.py
nphilipp/duffy
536de1f74d38ec5f3c364c682678ec374c7e3723
[ "MIT" ]
null
null
null
tests/app/conftest.py
nphilipp/duffy
536de1f74d38ec5f3c364c682678ec374c7e3723
[ "MIT" ]
12
2021-11-19T16:54:00.000Z
2021-11-24T14:23:48.000Z
tests/app/conftest.py
nphilipp/duffy
536de1f74d38ec5f3c364c682678ec374c7e3723
[ "MIT" ]
null
null
null
import pytest from fastapi.testclient import TestClient from duffy.app.main import app @pytest.fixture(scope="session") def client() -> TestClient: return TestClient(app)
17.8
41
0.769663
23
178
5.956522
0.608696
0
0
0
0
0
0
0
0
0
0
0
0.134831
178
9
42
19.777778
0.88961
0
0
0
0
0
0.039326
0
0
0
0
0
0
1
0.166667
true
0
0.5
0.166667
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
1
0
0
0
5
f01e389c45fb62ce35b78a4b7d4fc1edd645c16f
208
py
Python
Exam-Prep/Exam_19_Dec_2020/project/supply/food_supply.py
geodimitrov/PythonOOP_SoftUni
f1c6718c878b618b3ab3f174cd4d187bd178940b
[ "MIT" ]
1
2021-06-30T11:53:44.000Z
2021-06-30T11:53:44.000Z
Exam-Prep/Exam_19_Dec_2020/project/supply/food_supply.py
geodimitrov/PythonOOP_SoftUni
f1c6718c878b618b3ab3f174cd4d187bd178940b
[ "MIT" ]
null
null
null
Exam-Prep/Exam_19_Dec_2020/project/supply/food_supply.py
geodimitrov/PythonOOP_SoftUni
f1c6718c878b618b3ab3f174cd4d187bd178940b
[ "MIT" ]
null
null
null
from project.supply.supply import Supply class FoodSupply(Supply): NEEDS_INCREASE = 20 def __init__(self): super().__init__(self.NEEDS_INCREASE) def __str__(self): return "food"
20.8
45
0.682692
25
208
5.12
0.64
0.203125
0
0
0
0
0
0
0
0
0
0.012346
0.221154
208
10
46
20.8
0.777778
0
0
0
0
0
0.019139
0
0
0
0
0
0
1
0.285714
false
0
0.142857
0.142857
0.857143
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
f02fc92ecc5927c0049d9e3d33223dc2c98390f4
87
py
Python
game/admin.py
usmanfarooq619/django-tictactoe
c4220d226403acb1cdec702a9f9bd76f735e2162
[ "BSD-3-Clause" ]
18
2018-01-25T09:29:46.000Z
2021-08-02T09:58:52.000Z
game/admin.py
Vinay795-rgb/django-tictactoe
c4220d226403acb1cdec702a9f9bd76f735e2162
[ "BSD-3-Clause" ]
null
null
null
game/admin.py
Vinay795-rgb/django-tictactoe
c4220d226403acb1cdec702a9f9bd76f735e2162
[ "BSD-3-Clause" ]
16
2015-12-05T06:08:10.000Z
2021-07-29T14:46:11.000Z
from django.contrib import admin from .models import Game admin.site.register(Game)
12.428571
32
0.793103
13
87
5.307692
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.137931
87
6
33
14.5
0.92
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
f041a58d5dc0c3367242d8a7decfc3b6fe51de5b
38
py
Python
dthm4kaiako/ara_ako/__init__.py
uccser/dthm4kaiako
3a3b209a7b428a6f5bd136b6b431f49d7e8a2555
[ "MIT" ]
3
2018-12-10T07:03:02.000Z
2021-04-12T02:18:30.000Z
dthm4kaiako/ara_ako/__init__.py
uccser/dthm4kaiako
3a3b209a7b428a6f5bd136b6b431f49d7e8a2555
[ "MIT" ]
566
2018-09-30T02:54:28.000Z
2022-03-28T01:20:01.000Z
dthm4kaiako/ara_ako/__init__.py
uccser/dthm4kaiako
3a3b209a7b428a6f5bd136b6b431f49d7e8a2555
[ "MIT" ]
3
2019-04-04T19:53:39.000Z
2021-05-16T02:04:46.000Z
"""Module for Ara Ako application."""
19
37
0.684211
5
38
5.2
1
0
0
0
0
0
0
0
0
0
0
0
0.131579
38
1
38
38
0.787879
0.815789
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
b2e21267cab72fa3a8e0ddcbb56af13b67b30108
322
py
Python
helpers/__init__.py
nonjosh/acgn-bot
e0472b12b20d75389dc85f3aca154a4e3748d27c
[ "MIT" ]
1
2020-12-17T04:14:26.000Z
2020-12-17T04:14:26.000Z
helpers/__init__.py
nonjosh/acgn-bot
e0472b12b20d75389dc85f3aca154a4e3748d27c
[ "MIT" ]
null
null
null
helpers/__init__.py
nonjosh/acgn-bot
e0472b12b20d75389dc85f3aca154a4e3748d27c
[ "MIT" ]
1
2020-06-20T21:16:16.000Z
2020-06-20T21:16:16.000Z
from helpers.functions import * from helpers.tg import TgHelper from helpers.cocomanhua import CocomanhuaHelper from helpers.wutuxs import WutuxsHelper from helpers.manhuagui import ManhuaguiHelper from helpers.esjzone import EsjzoneHelper from helpers.syosetu import SyosetuHelper from helpers.qiman6 import Qiman6Helper
35.777778
47
0.872671
39
322
7.205128
0.461538
0.313167
0
0
0
0
0
0
0
0
0
0.006897
0.099379
322
8
48
40.25
0.962069
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
b2e4c6e0a218b404b31dd4eeb6126044cf2a39a5
40
py
Python
foldamers/utilities/__init__.py
shirtsgroup/foldamers
b67c164aff31cf7b6ff64d7b121059b75eaaf14c
[ "MIT" ]
1
2020-06-30T19:02:50.000Z
2020-06-30T19:02:50.000Z
foldamers/utilities/__init__.py
shirtsgroup/foldamers
b67c164aff31cf7b6ff64d7b121059b75eaaf14c
[ "MIT" ]
40
2020-01-16T00:42:58.000Z
2020-08-07T19:34:45.000Z
foldamers/utilities/__init__.py
shirtsgroup/foldamers
b67c164aff31cf7b6ff64d7b121059b75eaaf14c
[ "MIT" ]
3
2019-10-04T14:24:30.000Z
2020-05-13T16:04:46.000Z
from .util import * from .plot import *
13.333333
19
0.7
6
40
4.666667
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.2
40
2
20
20
0.875
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
653328a8f0e66b7f4391911811c5226535f1f99e
211
py
Python
easymodels/utils/constants.py
M4cs/EasyModels
4d3edfe0e678bfbcc0dcce5139ee3b5d482979d3
[ "FSFAP" ]
197
2019-08-14T05:13:13.000Z
2022-01-04T14:37:45.000Z
easymodels/utils/constants.py
M4cs/EasyModels
4d3edfe0e678bfbcc0dcce5139ee3b5d482979d3
[ "FSFAP" ]
1
2019-08-15T08:56:09.000Z
2019-08-21T00:27:02.000Z
easymodels/utils/constants.py
M4cs/EasyModels
4d3edfe0e678bfbcc0dcce5139ee3b5d482979d3
[ "FSFAP" ]
13
2019-08-14T06:40:18.000Z
2020-08-06T02:15:28.000Z
API_URL = "https://modelzoo.co/api/" HEADERS = { 'accept': 'application/json, text/plain, */*', 'referer': 'https://modelzoo.co', 'connection': 'keep-alive', 'content-type': 'application/json' }
26.375
50
0.611374
23
211
5.565217
0.73913
0.203125
0.234375
0
0
0
0
0
0
0
0
0
0.156398
211
8
51
26.375
0.719101
0
0
0
0
0
0.646226
0
0
0
0
0
0
1
0
false
0
0
0
0
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
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
653cb41c0aa07ce882e745f002a7b823e4e97a7b
263
py
Python
bua/caffe/__init__.py
RomeroBarata/bottom-up-attention.pytorch
a8ad05eaef0e75956df056588d789d595d2c4a24
[ "Apache-2.0" ]
3
2022-02-18T13:38:47.000Z
2022-03-30T11:30:35.000Z
bua/caffe/__init__.py
RomeroBarata/bottom-up-attention.pytorch
a8ad05eaef0e75956df056588d789d595d2c4a24
[ "Apache-2.0" ]
null
null
null
bua/caffe/__init__.py
RomeroBarata/bottom-up-attention.pytorch
a8ad05eaef0e75956df056588d789d595d2c4a24
[ "Apache-2.0" ]
null
null
null
from .config import add_bottom_up_attention_config from .modeling.backbone import build_bua_resnet_backbone from .modeling.rcnn import GeneralizedBUARCNN from .modeling.roi_heads import BUACaffeRes5ROIHeads from .modeling.rpn import StandardBUARPNHead, BUARPN
52.6
57
0.870722
33
263
6.69697
0.606061
0.217195
0
0
0
0
0
0
0
0
0
0.004184
0.091255
263
5
58
52.6
0.920502
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
e8ddf0c0648cab4a48dc8512fcb78b4c0936e9c5
93
py
Python
tools/Vitis-AI-Quantizer/vai_q_pytorch/pytorch_binding/pytorch_nndct/nn/__init__.py
hito0512/Vitis-AI
996459fb96cb077ed2f7e789d515893b1cccbc95
[ "Apache-2.0" ]
848
2019-12-03T00:16:17.000Z
2022-03-31T22:53:17.000Z
tools/Vitis-AI-Quantizer/vai_q_pytorch/pytorch_binding/pytorch_nndct/nn/__init__.py
wangyifan778/Vitis-AI
f61061eef7550d98bf02a171604c9a9f283a7c47
[ "Apache-2.0" ]
656
2019-12-03T00:48:46.000Z
2022-03-31T18:41:54.000Z
tools/Vitis-AI-Quantizer/vai_q_pytorch/pytorch_binding/pytorch_nndct/nn/__init__.py
wangyifan778/Vitis-AI
f61061eef7550d98bf02a171604c9a9f283a7c47
[ "Apache-2.0" ]
506
2019-12-03T00:46:26.000Z
2022-03-30T10:34:56.000Z
from pytorch_nndct.nn.modules import functional from .modules import * from .utils import *
18.6
47
0.795699
13
93
5.615385
0.615385
0.356164
0
0
0
0
0
0
0
0
0
0
0.139785
93
4
48
23.25
0.9125
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
e8e6d1fcbe5efe094dff9a190eea9e58b48c6cd7
102
py
Python
solarnet/preprocessing/__init__.py
afito-t/solar-panel-segmentation
47f681b06ac6d0931d4af8e4edab656a061f8f5b
[ "MIT" ]
null
null
null
solarnet/preprocessing/__init__.py
afito-t/solar-panel-segmentation
47f681b06ac6d0931d4af8e4edab656a061f8f5b
[ "MIT" ]
null
null
null
solarnet/preprocessing/__init__.py
afito-t/solar-panel-segmentation
47f681b06ac6d0931d4af8e4edab656a061f8f5b
[ "MIT" ]
null
null
null
from .masks import MaskMaker from .splits import ImageSplitter from .ortho_split import OrthoSplitter
25.5
38
0.852941
13
102
6.615385
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.117647
102
3
39
34
0.955556
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
333afa1e5ca2218b93af95dd93180061e7923698
194
py
Python
pflacs/__init__.py
qwilka/pflacs
b0913f22d2ad21ff25d64a108f78993da88966e3
[ "MIT" ]
null
null
null
pflacs/__init__.py
qwilka/pflacs
b0913f22d2ad21ff25d64a108f78993da88966e3
[ "MIT" ]
null
null
null
pflacs/__init__.py
qwilka/pflacs
b0913f22d2ad21ff25d64a108f78993da88966e3
[ "MIT" ]
null
null
null
"""`pflacs` means faster load-cases and parameter studies. """ from .pflacs import Premise, PflacsParam, Calc, Table, _empty from .subprocess_node import SubProc from .pyfunc_node import PyFunc
32.333333
61
0.78866
26
194
5.769231
0.730769
0.133333
0
0
0
0
0
0
0
0
0
0
0.123711
194
5
62
38.8
0.882353
0.283505
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
335033c481586c642d5661587969fa7833f67e5a
51
py
Python
services/abstract/__init__.py
tuannguyendang/montypython
c0b8ff7a8130e811ba16bfab8d5e013eac37f432
[ "Apache-2.0" ]
null
null
null
services/abstract/__init__.py
tuannguyendang/montypython
c0b8ff7a8130e811ba16bfab8d5e013eac37f432
[ "Apache-2.0" ]
null
null
null
services/abstract/__init__.py
tuannguyendang/montypython
c0b8ff7a8130e811ba16bfab8d5e013eac37f432
[ "Apache-2.0" ]
null
null
null
from .assignment_abstract_service import Assignment
51
51
0.921569
6
51
7.5
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.058824
51
1
51
51
0.9375
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
6833605810d17ea88e029ce6a8b5d5b1011b0f26
23
py
Python
src/relstorage/adapters/oracle/tests/__init__.py
enfold/relstorage
9fcd526b537cb6537cc2ae33154b63096550f210
[ "ZPL-2.1" ]
40
2015-10-08T05:35:13.000Z
2022-03-28T23:50:06.000Z
src/relstorage/adapters/oracle/tests/__init__.py
enfold/relstorage
9fcd526b537cb6537cc2ae33154b63096550f210
[ "ZPL-2.1" ]
364
2015-03-23T15:25:42.000Z
2022-03-17T08:41:34.000Z
src/relstorage/adapters/oracle/tests/__init__.py
enfold/relstorage
9fcd526b537cb6537cc2ae33154b63096550f210
[ "ZPL-2.1" ]
33
2015-06-08T23:03:22.000Z
2022-03-21T08:25:53.000Z
# Oracle test package.
11.5
22
0.73913
3
23
5.666667
1
0
0
0
0
0
0
0
0
0
0
0
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
6849914f6b3d3071ae22ea78c6897b7d07f9cab4
8,354
py
Python
blackpearl/things/hardware/outputs/matrix.py
offmessage/blackpearl
ffbba460fe7fc7fe4d7e3466f5ff13ea0c081fc5
[ "MIT" ]
null
null
null
blackpearl/things/hardware/outputs/matrix.py
offmessage/blackpearl
ffbba460fe7fc7fe4d7e3466f5ff13ea0c081fc5
[ "MIT" ]
null
null
null
blackpearl/things/hardware/outputs/matrix.py
offmessage/blackpearl
ffbba460fe7fc7fe4d7e3466f5ff13ea0c081fc5
[ "MIT" ]
null
null
null
from twisted.internet import defer from twisted.internet import reactor from .base import FlotillaOutput class Matrix(FlotillaOutput): """ Matrix There is much to do. Particularly look at .frames() """ module = "matrix" brightness = 40 pixels = [0, 0, 0, 0, 0, 0, 0, 0] scrollspeed = 0.1 status = 'STOPPED' active = None queue = [] workingframe = [] lastindex = 0 loop = False def reset(self): self.queue = [] self.brightness = 40 self.status = 'STOPPED' self.scrollspeed = 0.1 self.workingframe = [] self.lastindex = 0 self.loop = False self.steps = 1 self.pixels = [0, 0, 0, 0, 0, 0, 0, 0] self.update() def addText(self, text): for ch in text: i = ord(ch) self.queue.extend(ascii_letters[i]) def addColumn(self, column): """Bottom is 1, top is 128, we expect it bottom to top""" if isinstance(column, int): if 0 <= column <= 255: self.queue.append(column) return raise TypeError("column must be an integer between 0 and 255") if isinstance(column, list): if len(column) == 8: if set(column) in [{0},{1},{0,1}]: val = 0 for j in range(8): val = val + (2**j)*column[j] self.queue.append(val) return raise TypeError("column must be a list of len 8, consisting of {0,1}") def addFrame(self, frame): """left to right""" self.queue.extend(frame) def update(self): data = self.pixels + [self.brightness,] self.send(data) def next_frame(self): self.pixels = self.queue[:8] self.queue = self.queue[8:] self.update() def frames(self): self.scroller(steps=8) def scroll(self): self.scroller(steps=1) @defer.deferredGenerator def scroller(self, steps=1): self.steps = steps self.status = "RUNNING" finalindex = len(self.queue) - 7 while self.status == "RUNNING": for i in range(self.lastindex, len(self.queue), steps): if self.status != "RUNNING": # we are paused or stopped break self.lastindex = i chars = self.queue[i:i+8] if i == finalindex and not self.loop: self.status = "STOPPED" break if len(chars) < 8 and self.loop: chars += self.queue[:8-len(chars)] self.pixels = chars self.update() d = defer.Deferred() reactor.callLater(self.scrollspeed, d.callback, None) wfd = defer.waitForDeferred(d) yield wfd if self.status == 'RUNNING': self.broadcast({'scroller': 'step'}) if not self.loop: break if self.status == "RUNNING": self.lastindex = 0 self.broadcast({'scroller': 'loop'}) if self.status == 'STOPPED': self.broadcast({'scroller': 'finished'}) def pause(self): if self.status == "RUNNING": self.status = "PAUSED" elif self.status == "PAUSED": self.status = "RUNNING" self.scroller(self.steps) self.broadcast({'scroller': self.status.lower()}) ascii_letters = [ [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 96, 250, 250, 96, 0, 0], [0, 192, 192, 0, 192, 192, 0, 0], [40, 254, 254, 40, 254, 254, 40, 0], [36, 116, 214, 214, 92, 72, 0, 0], [98, 102, 12, 24, 48, 102, 70, 0], [12, 94, 242, 186, 236, 94, 18, 0], [32, 224, 192, 0, 0, 0, 0, 0], [0, 56, 124, 198, 130, 0, 0, 0], [0, 130, 198, 124, 56, 0, 0, 0], [16, 84, 124, 56, 56, 124, 84, 16], [16, 16, 124, 124, 16, 16, 0, 0], [0, 1, 7, 6, 0, 0, 0, 0], [16, 16, 16, 16, 16, 16, 0, 0], [0, 0, 6, 6, 0, 0, 0, 0], [6, 12, 24, 48, 96, 192, 128, 0], [124, 254, 142, 154, 178, 254, 124, 0], [2, 66, 254, 254, 2, 2, 0, 0], [70, 206, 154, 146, 246, 102, 0, 0], [68, 198, 146, 146, 254, 108, 0, 0], [24, 56, 104, 202, 254, 254, 10, 0], [228, 230, 162, 162, 190, 156, 0, 0], [60, 126, 210, 146, 158, 12, 0, 0], [192, 192, 142, 158, 240, 224, 0, 0], [108, 254, 146, 146, 254, 108, 0, 0], [96, 242, 146, 150, 252, 120, 0, 0], [0, 0, 102, 102, 0, 0, 0, 0], [0, 1, 103, 102, 0, 0, 0, 0], [16, 56, 108, 198, 130, 0, 0, 0], [36, 36, 36, 36, 36, 36, 0, 0], [0, 130, 198, 108, 56, 16, 0, 0], [64, 192, 138, 154, 240, 96, 0, 0], [124, 254, 130, 186, 186, 248, 120, 0], [62, 126, 200, 200, 126, 62, 0, 0], [130, 254, 254, 146, 146, 254, 108, 0], [56, 124, 198, 130, 130, 198, 68, 0], [130, 254, 254, 130, 198, 124, 56, 0], [130, 254, 254, 146, 186, 130, 198, 0], [130, 254, 254, 146, 184, 128, 192, 0], [56, 124, 198, 130, 138, 206, 78, 0], [254, 254, 16, 16, 254, 254, 0, 0], [0, 130, 254, 254, 130, 0, 0, 0], [12, 14, 2, 130, 254, 252, 128, 0], [130, 254, 254, 16, 56, 238, 198, 0], [130, 254, 254, 130, 2, 6, 14, 0], [254, 254, 112, 56, 112, 254, 254, 0], [254, 254, 96, 48, 24, 254, 254, 0], [56, 124, 198, 130, 198, 124, 56, 0], [130, 254, 254, 146, 144, 240, 96, 0], [120, 252, 132, 142, 254, 122, 0, 0], [130, 254, 254, 144, 152, 254, 102, 0], [100, 246, 178, 154, 206, 76, 0, 0], [192, 130, 254, 254, 130, 192, 0, 0], [254, 254, 2, 2, 254, 254, 0, 0], [248, 252, 6, 6, 252, 248, 0, 0], [254, 254, 12, 24, 12, 254, 254, 0], [194, 230, 60, 24, 60, 230, 194, 0], [224, 242, 30, 30, 242, 224, 0, 0], [226, 198, 142, 154, 178, 230, 206, 0], [0, 254, 254, 130, 130, 0, 0, 0], [128, 192, 96, 48, 24, 12, 6, 0], [0, 130, 130, 254, 254, 0, 0, 0], [16, 48, 96, 192, 96, 48, 16, 0], [1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 192, 224, 32, 0, 0, 0], [4, 46, 42, 42, 60, 30, 2, 0], [130, 254, 252, 18, 18, 30, 12, 0], [28, 62, 34, 34, 54, 20, 0, 0], [12, 30, 18, 146, 252, 254, 2, 0], [28, 62, 42, 42, 58, 24, 0, 0], [18, 126, 254, 146, 192, 64, 0, 0], [25, 61, 37, 37, 31, 62, 32, 0], [130, 254, 254, 16, 32, 62, 30, 0], [0, 34, 190, 190, 2, 0, 0, 0], [6, 7, 1, 1, 191, 190, 0, 0], [130, 254, 254, 8, 28, 54, 34, 0], [0, 130, 254, 254, 2, 0, 0, 0], [62, 62, 24, 28, 56, 62, 30, 0], [62, 62, 32, 32, 62, 30, 0, 0], [28, 62, 34, 34, 62, 28, 0, 0], [33, 63, 31, 37, 36, 60, 24, 0], [24, 60, 36, 37, 31, 63, 33, 0], [34, 62, 30, 50, 32, 56, 24, 0], [18, 58, 42, 42, 46, 36, 0, 0], [0, 32, 124, 254, 34, 36, 0, 0], [60, 62, 2, 2, 60, 62, 2, 0], [56, 60, 6, 6, 60, 56, 0, 0], [60, 62, 14, 28, 14, 62, 60, 0], [34, 54, 28, 8, 28, 54, 34, 0], [57, 61, 5, 5, 63, 62, 0, 0], [50, 38, 46, 58, 50, 38, 0, 0], [16, 16, 124, 238, 130, 130, 0, 0], [0, 0, 0, 238, 238, 0, 0, 0], [130, 130, 238, 124, 16, 16, 0, 0], [64, 192, 128, 192, 64, 192, 128, 0], [0, 0, 0, 0, 0, 0, 0, 0], ]
33.416
82
0.436079
1,429
8,354
2.547236
0.146256
0.208791
0.262912
0.320879
0.251923
0.130769
0.098626
0.096429
0.096429
0.073077
0
0.354428
0.360666
8,354
249
83
33.550201
0.327092
0.017955
0
0.213333
0
0
0.029012
0
0
0
0
0
0
1
0.044444
false
0
0.013333
0
0.115556
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
688357de164f569fe8790fcfcf905c09e822a90a
176
py
Python
py/problem_2.py
dfings/project-euler
f66389dcd8ff4e4d64fbd245cfdaebac7b9bd4ef
[ "Unlicense" ]
null
null
null
py/problem_2.py
dfings/project-euler
f66389dcd8ff4e4d64fbd245cfdaebac7b9bd4ef
[ "Unlicense" ]
null
null
null
py/problem_2.py
dfings/project-euler
f66389dcd8ff4e4d64fbd245cfdaebac7b9bd4ef
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python from fibonacci import fibonacci from itertools import takewhile print(sum(filter(lambda x: x % 2 == 0, takewhile(lambda x: x < 4000000, fibonacci()))))
25.142857
87
0.727273
26
176
4.923077
0.653846
0.109375
0.125
0
0
0
0
0
0
0
0
0.059603
0.142045
176
6
88
29.333333
0.788079
0.113636
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0.333333
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
68898e28e4b7737dad4e38ab8ce3227c2f40abc4
75
py
Python
src/pms/sensor/__init__.py
OllisGit/PyPMS
0f2a4fc591ac6f1b98fcdec387e84ae628917479
[ "MIT" ]
null
null
null
src/pms/sensor/__init__.py
OllisGit/PyPMS
0f2a4fc591ac6f1b98fcdec387e84ae628917479
[ "MIT" ]
null
null
null
src/pms/sensor/__init__.py
OllisGit/PyPMS
0f2a4fc591ac6f1b98fcdec387e84ae628917479
[ "MIT" ]
null
null
null
from .sensor import Sensor from .reader import SensorReader, MessageReader
25
47
0.84
9
75
7
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.12
75
2
48
37.5
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
688b21353e22a2ca95072fa9804ba027aded6448
278
py
Python
tests/test_config.py
lkorczowski/cleandata
dadfc2768c3b980ab0e4871ebd86eaeeb4b7eaaf
[ "MIT" ]
null
null
null
tests/test_config.py
lkorczowski/cleandata
dadfc2768c3b980ab0e4871ebd86eaeeb4b7eaaf
[ "MIT" ]
3
2020-04-11T16:59:22.000Z
2020-04-12T08:51:50.000Z
tests/test_config.py
lkorczowski/cleandata
dadfc2768c3b980ab0e4871ebd86eaeeb4b7eaaf
[ "MIT" ]
null
null
null
import pytest import os import getpass @pytest.mark.skipif(getpass.getuser()=='runner', reason="Not expecting to work in CI because data required locally") def test_Config(): from utils.config import Config assert os.path.split(Config.csv_files[0])[1].endswith('.csv')
30.888889
116
0.751799
42
278
4.928571
0.761905
0
0
0
0
0
0
0
0
0
0
0.008197
0.122302
278
9
117
30.888889
0.840164
0
0
0
0
0
0.240143
0
0
0
0
0
0.142857
1
0.142857
true
0.285714
0.571429
0
0.714286
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
1
0
0
5
68a6673897fb1f8d954d49211d307ee1ac96ddf1
363
py
Python
server/mainsite/views.py
subhajeet2107/django-vue-cli-webpack-demo
60820cc33d718053760b87b2fb0fab83fdfa8cbd
[ "MIT" ]
null
null
null
server/mainsite/views.py
subhajeet2107/django-vue-cli-webpack-demo
60820cc33d718053760b87b2fb0fab83fdfa8cbd
[ "MIT" ]
null
null
null
server/mainsite/views.py
subhajeet2107/django-vue-cli-webpack-demo
60820cc33d718053760b87b2fb0fab83fdfa8cbd
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.http import Http404 from django.http import HttpResponse, JsonResponse from django.http import HttpResponseRedirect, HttpResponsePermanentRedirect from django.shortcuts import get_object_or_404 from django.shortcuts import redirect def home(request): ctx = { } return render(request, 'mainsite/home.jinja', ctx)
33
75
0.831956
46
363
6.5
0.5
0.200669
0.190635
0.250836
0
0
0
0
0
0
0
0.018519
0.107438
363
11
76
33
0.904321
0
0
0
0
0
0.052198
0
0
0
0
0
0
1
0.1
false
0
0.6
0
0.8
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
d7bdbac98434c0964940509b14acdf446e0be8db
2,544
py
Python
python/testData/inspections/PyTypeCheckerInspection/InitializingTypingNamedTuple.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2018-12-29T09:53:39.000Z
2018-12-29T09:53:42.000Z
python/testData/inspections/PyTypeCheckerInspection/InitializingTypingNamedTuple.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/inspections/PyTypeCheckerInspection/InitializingTypingNamedTuple.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
import typing from typing import List MyTup2 = typing.NamedTuple("MyTup2", bar=int, baz=str) MyTup3 = typing.NamedTuple("MyTup2", [("bar", int), ("baz", str)]) class MyTup4(typing.NamedTuple): bar: int baz: str class MyTup5(typing.NamedTuple): bar: int baz: str foo = 5 class MyTup6(typing.NamedTuple): bar: int baz: str foo: int MyTup7 = typing.NamedTuple("MyTup7", names=List[str], ages=List[int]) # fail MyTup2(<warning descr="Expected type 'int', got 'str' instead">''</warning>, '') MyTup2(<warning descr="Expected type 'int', got 'str' instead">bar=''</warning>, baz='') MyTup2(baz='', <warning descr="Expected type 'int', got 'str' instead">bar=''</warning>) # ok MyTup2(5, '') MyTup2(bar=5, baz='') MyTup2(baz='', bar=5) # fail MyTup3(<warning descr="Expected type 'int', got 'str' instead">''</warning>, '') MyTup3(<warning descr="Expected type 'int', got 'str' instead">bar=''</warning>, baz='') MyTup3(baz='', <warning descr="Expected type 'int', got 'str' instead">bar=''</warning>) # ok MyTup3(5, '') MyTup3(bar=5, baz='') MyTup3(baz='', bar=5) # fail MyTup4(<warning descr="Expected type 'int', got 'str' instead">''</warning>, '') MyTup4(<warning descr="Expected type 'int', got 'str' instead">bar=''</warning>, baz='') MyTup4(baz='', <warning descr="Expected type 'int', got 'str' instead">bar=''</warning>) # ok MyTup4(5, '') MyTup4(bar=5, baz='') MyTup4(baz='', bar=5) # fail MyTup5(<warning descr="Expected type 'int', got 'str' instead">''</warning>, '') MyTup5(<warning descr="Expected type 'int', got 'str' instead">bar=''</warning>, baz='') MyTup5(baz='', <warning descr="Expected type 'int', got 'str' instead">bar=''</warning>) # ok MyTup5(5, '') MyTup5(bar=5, baz='') MyTup5(baz='', bar=5) # fail MyTup6(<warning descr="Expected type 'int', got 'str' instead">bar=''</warning>, baz='', <warning descr="Expected type 'int', got 'str' instead">foo=''</warning>) MyTup6(<warning descr="Expected type 'int', got 'str' instead">''</warning>, '', <warning descr="Expected type 'int', got 'str' instead">''</warning>) # ok MyTup6(bar=5, baz='', foo=5) MyTup6(5, '', 5) # fail MyTup7(<warning descr="Expected type 'List[str]', got 'str' instead">names="A"</warning>, <warning descr="Expected type 'List[int]', got 'int' instead">ages=5</warning>) MyTup7(<warning descr="Expected type 'List[str]', got 'str' instead">"A"</warning>, <warning descr="Expected type 'List[int]', got 'int' instead">5</warning>) # ok MyTup7(names=["A"], ages=[5]) MyTup7(["A"], [5])
26.778947
169
0.640723
354
2,544
4.60452
0.081921
0.147239
0.245399
0.294479
0.760123
0.753988
0.73681
0.657055
0.657055
0.422699
0
0.027928
0.127358
2,544
94
170
27.06383
0.706306
0.018475
0
0.125
0
0
0.326892
0
0
0
0
0
0
0
null
null
0
0.041667
null
null
0
0
0
0
null
0
1
1
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
5
d7f59021b96604787d7941663d2e67ca59b40ec0
76
py
Python
runner_master/runner/data/datasets/__init__.py
bigvideoresearch/SCC
f26cdb6aaf248b5112812dbdac1f1b5086aebccc
[ "MIT" ]
5
2021-09-15T21:48:55.000Z
2022-03-22T11:21:58.000Z
runner_master/runner/data/datasets/__init__.py
bigvideoresearch/SCC
f26cdb6aaf248b5112812dbdac1f1b5086aebccc
[ "MIT" ]
null
null
null
runner_master/runner/data/datasets/__init__.py
bigvideoresearch/SCC
f26cdb6aaf248b5112812dbdac1f1b5086aebccc
[ "MIT" ]
1
2021-08-20T08:40:15.000Z
2021-08-20T08:40:15.000Z
import time from .base_dataset import * from .imglist_dataset_v2 import *
12.666667
33
0.789474
11
76
5.181818
0.636364
0
0
0
0
0
0
0
0
0
0
0.015625
0.157895
76
5
34
15.2
0.875
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
d7f89bcca495dbe88eaaf0eb82ae3c128faf05d0
118
py
Python
twitter_clone/users/models/__init__.py
ag94e/Twitter_clone
037ab41b79e7c236a85bb0e9c0e892dfa3ba407a
[ "MIT" ]
null
null
null
twitter_clone/users/models/__init__.py
ag94e/Twitter_clone
037ab41b79e7c236a85bb0e9c0e892dfa3ba407a
[ "MIT" ]
null
null
null
twitter_clone/users/models/__init__.py
ag94e/Twitter_clone
037ab41b79e7c236a85bb0e9c0e892dfa3ba407a
[ "MIT" ]
null
null
null
from .fav import Fav from .profile import Profile from .reply import Reply from .rt import Rt from .tweet import Tweet
23.6
28
0.79661
20
118
4.7
0.35
0
0
0
0
0
0
0
0
0
0
0
0.161017
118
5
29
23.6
0.949495
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
0bef8285fa830efe3b043fc40f06f69f52dae8b5
870
py
Python
tests/models/test_helpers.py
thijsmie/imp_flask
2cad9f628c54572c02a5f893ef9c0cb1149b18ea
[ "MIT" ]
1
2019-06-13T07:28:02.000Z
2019-06-13T07:28:02.000Z
tests/models/test_helpers.py
k-automation/imp_flask
2cad9f628c54572c02a5f893ef9c0cb1149b18ea
[ "MIT" ]
4
2016-12-06T11:25:36.000Z
2021-04-29T07:43:14.000Z
tests/models/test_helpers.py
k-automation/imp_flask
2cad9f628c54572c02a5f893ef9c0cb1149b18ea
[ "MIT" ]
2
2017-09-06T14:26:04.000Z
2018-02-03T18:55:36.000Z
from imp_flask.extensions import db from imp_flask.models.helpers import count from imp_flask.models.pypi import Package def test_count(): Package.query.delete() db.session.commit() assert 0 == count(Package.name, '') assert 0 == count(Package.name, '%') assert 0 == count(Package.name, '%', True) db.session.add(Package(name='packageA', summary='Test Package', latest_version='1.0.0')) db.session.commit() assert 0 == count(Package.name, '%') assert 1 == count(Package.name, '%', True) db.session.add(Package(name='packageB', summary='Test Package', latest_version='1.0.0')) db.session.commit() assert 0 == count(Package.name, 'package') assert 1 == count(Package.name, 'packagea') assert 0 == count(Package.name, 'package%') assert 2 == count(Package.name, 'package%', True)
32.222222
93
0.643678
115
870
4.817391
0.252174
0.218412
0.259928
0.205776
0.669675
0.637184
0.637184
0.548736
0.548736
0.384477
0
0.021337
0.191954
870
26
94
33.461538
0.766714
0
0
0.263158
0
0
0.100711
0
0
0
0
0
0.473684
1
0.052632
true
0
0.157895
0
0.210526
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
1
0
0
0
0
0
0
5
0bf259567b89b42e80e5966707c667cd90ee14fb
267
py
Python
LearnFunction/learnFunction.py
subash-kc/2022-01-04-Python
5ce51e4265bcd860a4e62423edef6ec9cd1437b4
[ "MIT" ]
1
2022-01-14T18:03:42.000Z
2022-01-14T18:03:42.000Z
LearnFunction/learnFunction.py
subash-kc/2022-01-04-Python
5ce51e4265bcd860a4e62423edef6ec9cd1437b4
[ "MIT" ]
null
null
null
LearnFunction/learnFunction.py
subash-kc/2022-01-04-Python
5ce51e4265bcd860a4e62423edef6ec9cd1437b4
[ "MIT" ]
null
null
null
def thing_printer(): print("Print Something!!!") thing_printer() def thing_printer(first): print(first) thing_printer(1) def thing_printer(first, last): print(f"You enter the first name: {first} and last name: {last}") thing_printer("Subash", "KC")
16.6875
69
0.692884
38
267
4.710526
0.421053
0.402235
0.251397
0.223464
0
0
0
0
0
0
0
0.004444
0.157303
267
15
70
17.8
0.791111
0
0
0
0
0
0.304511
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.333333
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
0
1
0
0
0
0
0
1
0
5
0bf7304724c8eda786c29f2b22f74331343b9415
90
py
Python
parrot/parrot_exceptions.py
idptools/parrot
de4b6fe02188427de131c15e030a1ac140dbc7f4
[ "MIT" ]
7
2020-12-21T13:43:09.000Z
2022-02-08T03:05:09.000Z
parrot/parrot_exceptions.py
idptools/parrot
de4b6fe02188427de131c15e030a1ac140dbc7f4
[ "MIT" ]
null
null
null
parrot/parrot_exceptions.py
idptools/parrot
de4b6fe02188427de131c15e030a1ac140dbc7f4
[ "MIT" ]
null
null
null
class IOExceptionParrot(Exception): pass class ParrotException(Exception): pass
12.857143
35
0.755556
8
90
8.5
0.625
0.382353
0
0
0
0
0
0
0
0
0
0
0.177778
90
6
36
15
0.918919
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
1
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
04084d8489d6374294b8f337be30fc48dcaa0233
4,540
py
Python
baekjoon/python/overflow_complaint_good.py
yskang/AlgorithmPracticeWithPython
f7129bd1924a7961489198f0ee052d2cd1e9cf40
[ "MIT" ]
null
null
null
baekjoon/python/overflow_complaint_good.py
yskang/AlgorithmPracticeWithPython
f7129bd1924a7961489198f0ee052d2cd1e9cf40
[ "MIT" ]
null
null
null
baekjoon/python/overflow_complaint_good.py
yskang/AlgorithmPracticeWithPython
f7129bd1924a7961489198f0ee052d2cd1e9cf40
[ "MIT" ]
null
null
null
# Title: 민원이 넘쳐흘러 # Link: https://www.acmicpc.net/problem/17423 import sys sys.setrecursionlimit(10 ** 6) read_single_int = lambda: int(sys.stdin.readline().strip()) read_list_int = lambda: list(map(int, sys.stdin.readline().strip().split(' '))) def solution(n: int, sizes: list, speakers: list): max_volume = 99999999999999 x_sub_y_coord, x_plus_y_coord, x_coord, y_coord = [], [], [], [] for i, (x, y) in enumerate(speakers): x_sub_y_coord.append((x-y, i, x+y)) x_plus_y_coord.append((x+y, i, x-y)) x_coord.append((x, i, y)) y_coord.append((y, i, x)) x_sub_y_coord = sorted(x_sub_y_coord, key=lambda z: (z[0], z[2])) x_plus_y_coord = sorted(x_plus_y_coord, key=lambda z: (z[0], z[2])) x_coord = sorted(x_coord, key=lambda z: (z[0], z[2])) y_coord = sorted(y_coord, key=lambda z: (z[0], z[2])) sames = [] prev_pos, prev_i, _ = x_sub_y_coord[0] for current_pos, current_i, _ in x_sub_y_coord[1:]: if current_pos == prev_pos: sames.append(prev_i) elif sames: prev_i = sames[0] while sames: prev_i = sames.pop() t_max = (abs(speakers[current_i][0] - speakers[prev_i][0])+abs(speakers[current_i][1] - speakers[prev_i][1])) // (sizes[prev_i] + sizes[current_i]) t_max = max(0, t_max) max_volume = min(max_volume, t_max) sames = [] continue t_max = (abs(speakers[current_i][0] - speakers[prev_i][0])+abs(speakers[current_i][1] - speakers[prev_i][1])) // (sizes[prev_i] + sizes[current_i]) t_max = max(0, t_max) max_volume = min(max_volume, t_max) prev_i = current_i _, prev_i, _ = x_plus_y_coord[0] for _, current_i, _ in x_plus_y_coord[1:]: if current_pos == prev_pos: sames.append(prev_i) elif sames: prev_i = sames[0] while sames: prev_i = sames.pop() t_max = (abs(speakers[current_i][0] - speakers[prev_i][0])+abs(speakers[current_i][1] - speakers[prev_i][1])) // (sizes[prev_i] + sizes[current_i]) t_max = max(0, t_max) max_volume = min(max_volume, t_max) sames = [] continue t_max = (abs(speakers[current_i][0] - speakers[prev_i][0])+abs(speakers[current_i][1] - speakers[prev_i][1])) // (sizes[prev_i] + sizes[current_i]) t_max = max(0, t_max) max_volume = min(max_volume, t_max) prev_i = current_i _, prev_i, _ = x_coord[0] for _, current_i, _ in x_coord[1:]: if current_pos == prev_pos: sames.append(prev_i) elif sames: prev_i = sames[0] while sames: prev_i = sames.pop() t_max = (abs(speakers[current_i][0] - speakers[prev_i][0])+abs(speakers[current_i][1] - speakers[prev_i][1])) // (sizes[prev_i] + sizes[current_i]) t_max = max(0, t_max) max_volume = min(max_volume, t_max) sames = [] continue t_max = (abs(speakers[current_i][0] - speakers[prev_i][0])+abs(speakers[current_i][1] - speakers[prev_i][1])) // (sizes[prev_i] + sizes[current_i]) t_max = max(0, t_max) max_volume = min(max_volume, t_max) prev_i = current_i _, prev_i, _ = y_coord[0] for _, current_i, _ in y_coord[1:]: if current_pos == prev_pos: sames.append(prev_i) elif sames: prev_i = sames[0] while sames: prev_i = sames.pop() t_max = (abs(speakers[current_i][0] - speakers[prev_i][0])+abs(speakers[current_i][1] - speakers[prev_i][1])) // (sizes[prev_i] + sizes[current_i]) t_max = max(0, t_max) max_volume = min(max_volume, t_max) sames = [] continue t_max = (abs(speakers[current_i][0] - speakers[prev_i][0])+abs(speakers[current_i][1] - speakers[prev_i][1])) // (sizes[prev_i] + sizes[current_i]) t_max = max(0, t_max) max_volume = min(max_volume, t_max) prev_i = current_i return max_volume def main(): n = read_single_int() sizes = read_list_int() speakers = [] for _ in range(n): speakers.append(read_list_int()) print(solution(n, sizes, speakers)) if __name__ == '__main__': main()
38.151261
164
0.551542
668
4,540
3.423653
0.098802
0.096196
0.125929
0.132925
0.76913
0.740708
0.740708
0.714036
0.705728
0.681242
0
0.025908
0.302863
4,540
119
165
38.151261
0.696682
0.012996
0
0.642105
0
0
0.002064
0
0
0
0
0
0
1
0.021053
false
0
0.010526
0
0.042105
0.010526
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
041e1d65b20f7fcdc49857903748727cecc29a16
2,426
py
Python
numba/tests/test_byteflow.py
auderson/numba
3d67c9850ab56457f418cf40af6245fd9c337705
[ "BSD-2-Clause" ]
6,620
2015-01-04T08:51:04.000Z
2022-03-31T12:52:18.000Z
numba/tests/test_byteflow.py
auderson/numba
3d67c9850ab56457f418cf40af6245fd9c337705
[ "BSD-2-Clause" ]
6,457
2015-01-04T03:18:41.000Z
2022-03-31T17:38:42.000Z
numba/tests/test_byteflow.py
auderson/numba
3d67c9850ab56457f418cf40af6245fd9c337705
[ "BSD-2-Clause" ]
930
2015-01-25T02:33:03.000Z
2022-03-30T14:10:32.000Z
""" Test byteflow.py specific issues """ import unittest from numba.tests.support import TestCase from numba.core.compiler import run_frontend class TestByteFlowIssues(TestCase): def test_issue_5087(self): # This is an odd issue. The exact number of print below is # necessary to trigger it. Too many or too few will alter the behavior. # Also note that the function below will not be executed. The problem # occurs at compilation. The definition below is invalid for execution. # The problem occurs in the bytecode analysis. def udt(): print print print for i in range: print print print print print print print print print print print print print print print print print print for j in range: print print print print print print print for k in range: for l in range: print print print print print print print print print print if print: for n in range: print else: print run_frontend(udt) def test_issue_5097(self): # Inspired by https://github.com/numba/numba/issues/5097 def udt(): for i in range(0): if i > 0: pass a = None # noqa: F841 run_frontend(udt) def test_issue_5680(self): # From https://github.com/numba/numba/issues/5680#issuecomment-625351336 def udt(): for k in range(0): if 1 == 1: ... if 'a' == 'a': ... run_frontend(udt) if __name__ == '__main__': unittest.main()
25.536842
80
0.402721
218
2,426
4.399083
0.40367
0.354536
0.469239
0.542231
0.327424
0.327424
0.210636
0.210636
0.20438
0.160584
0
0.033976
0.551113
2,426
94
81
25.808511
0.846648
0.197444
0
0.676056
0
0
0.005179
0
0
0
0
0
0
1
0.084507
false
0.014085
0.042254
0
0.140845
0.577465
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
042a97102e36f3f37fcdf54d3ea6b908a81bfd05
214
py
Python
electronics_lab/drivers/__init__.py
Mattel/electronics_lab
41d99b8d1282d03865fc0934e6fdfdb65f9e4f90
[ "MIT" ]
2
2020-09-28T21:05:34.000Z
2021-09-29T10:10:56.000Z
electronics_lab/drivers/__init__.py
Mattel/electronics_lab
41d99b8d1282d03865fc0934e6fdfdb65f9e4f90
[ "MIT" ]
1
2021-11-15T17:49:10.000Z
2021-11-15T17:49:10.000Z
electronics_lab/drivers/__init__.py
Mattel/electronics_lab
41d99b8d1282d03865fc0934e6fdfdb65f9e4f90
[ "MIT" ]
1
2020-09-28T21:30:46.000Z
2020-09-28T21:30:46.000Z
# flake8: noqa from .driver import Driver from .rigolds1054z import RigolDS1054z from .siglentsdm3055 import SiglentSDM3055 from .siglentsdg1032x import SiglentSDG1032X from .siglentspd3303x import SiglentSPD3303X
30.571429
44
0.859813
22
214
8.363636
0.409091
0
0
0
0
0
0
0
0
0
0
0.172775
0.107477
214
6
45
35.666667
0.790576
0.056075
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
042fe7c08b1aa0223b88db67b8fda6593c243647
3,362
py
Python
src/utils/TestDataConverters.py
tvoesolncee/chess-ray-vision
9c42b8de07f2aecd077cd33ba6ff1ede0e74ca99
[ "WTFPL" ]
5
2020-10-13T20:16:57.000Z
2021-12-30T11:20:06.000Z
src/utils/TestDataConverters.py
tvoesolncee/chess-ray-vision
9c42b8de07f2aecd077cd33ba6ff1ede0e74ca99
[ "WTFPL" ]
null
null
null
src/utils/TestDataConverters.py
tvoesolncee/chess-ray-vision
9c42b8de07f2aecd077cd33ba6ff1ede0e74ca99
[ "WTFPL" ]
3
2020-10-13T20:17:02.000Z
2022-02-09T20:12:58.000Z
import unittest from label_converters import * class BasicTests(unittest.TestCase): # executed prior to each test def setUp(self): self.bstate1 = 'r1bk3r/p2pBpNp/n4n2/1p1NP2P/6P1/3P4/P1P1K3/q5b1' self.bstate2 = '3k3r/p2pBpNp/n4n2/1p1NP2P/6P1/3P4/P1P1K3/q5b1' self.bstate3 = 'rnbqkbnr-pppppppp-8-8-8-8-PPPPPPPP-RNBQKBNR' self.bstate4 = 'rnbqkbnr.?.pppppppp.?.8.?.8.?.8.?.8.?.PPPPPPPP.?.RNBQKBNR' # executed after each test def tearDown(self): pass def test_input1(self): delimiter='/' flat = convert_FEN_to_2d_char_array(self.bstate1, delimiter=delimiter) three_d = convert_to_3d_one_hot_array(flat, null_char = delimiter) back2flat = convert_one_hot_array_to_3d(three_d, null_char = delimiter) back_to_ef = convert_2d_char_array_to_FEN(back2flat, null_char = delimiter) self.assertEqual(str(flat), str(back2flat)) self.assertEqual(str(self.bstate1), str(back_to_ef)) def test_input2(self): delimiter='/' flat = convert_FEN_to_2d_char_array(self.bstate2, delimiter=delimiter) three_d = convert_to_3d_one_hot_array(flat, null_char = delimiter) back2flat = convert_one_hot_array_to_3d(three_d, null_char = delimiter) back_to_ef = convert_2d_char_array_to_FEN(back2flat, null_char = delimiter) self.assertEqual(str(flat), str(back2flat)) self.assertEqual(str(self.bstate2), str(back_to_ef)) def test_input3(self): delimiter='-' flat = convert_FEN_to_2d_char_array(self.bstate3, delimiter=delimiter) three_d = convert_to_3d_one_hot_array(flat, null_char = delimiter) back2flat = convert_one_hot_array_to_3d(three_d, null_char = delimiter) back_to_ef = convert_2d_char_array_to_FEN(back2flat, null_char = delimiter) self.assertEqual(str(flat), str(back2flat)) self.assertEqual(str(self.bstate3), str(back_to_ef)) def test_input4(self): delimiter='.?.' flat = convert_FEN_to_2d_char_array(self.bstate4, delimiter=delimiter) three_d = convert_to_3d_one_hot_array(flat, null_char = delimiter) back2flat = convert_one_hot_array_to_3d(three_d, null_char = delimiter) back_to_ef = convert_2d_char_array_to_FEN(back2flat, null_char = delimiter) self.assertEqual(str(flat), str(back2flat)) self.assertEqual(str(self.bstate4), str(back_to_ef)) def test_bad_inputs(self): self.assertRaises(AssertionError, convert_FEN_to_2d_char_array, 'a') self.assertRaises(ValueError, convert_FEN_to_2d_char_array, 'r1bk3r/p2pBpNp/n4n2/1p1NP2P/6P1/3P4/P1P1K3/q5b') self.assertRaises(ValueError, convert_FEN_to_2d_char_array, 'r1bk3r/p2pBp/n4n2/1p1NP2P/6P1/3P4/P1P1K3/q5b1') if __name__ == "__main__": unittest.main()
46.694444
82
0.600833
392
3,362
4.780612
0.173469
0.051227
0.108858
0.052295
0.815368
0.815368
0.750267
0.731057
0.652081
0.652081
0
0.052609
0.310232
3,362
72
83
46.694444
0.755498
0.015467
0
0.491803
0
0
0.090085
0.08555
0
0
0
0
0.180328
1
0.114754
false
0.016393
0.032787
0
0.163934
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
043d6b1969c077f835bb0ccc334ab5b390bd490c
4,142
py
Python
DSA/Python/src/dsa/lib/utils/tests/lists/test_copy.py
JackieMa000/problems
c521558830a0bbf67f94109af92d7be4397d0a43
[ "BSD-3-Clause" ]
null
null
null
DSA/Python/src/dsa/lib/utils/tests/lists/test_copy.py
JackieMa000/problems
c521558830a0bbf67f94109af92d7be4397d0a43
[ "BSD-3-Clause" ]
1
2020-10-23T04:06:56.000Z
2020-10-23T04:06:56.000Z
DSA/Python/src/dsa/lib/utils/tests/lists/test_copy.py
JackieMa000/problems
c521558830a0bbf67f94109af92d7be4397d0a43
[ "BSD-3-Clause" ]
null
null
null
from dsa.lib.utils import lists from dsa.lib.utils.tests.fixture import ListTestCase class CopyTestCase(ListTestCase): @staticmethod def copy(src, src_pos, des, des_pos, n): lists.copy(src, src_pos, des, des_pos, n) def test_illegalArgument(self): x = [1] y = [0] * len(x) self.assertRaises(IndexError, self.copy, x, 1, y, 0, len(x)) def test_copy0Elements_nothingChanged(self): x = [1] y = [0] * len(x) self.copy(x, 0, y, 0, 0) self.assertEqual([0], y) def test_empty_nothingChanged(self): x = [] y = [] self.copy(x, 0, y, 0, 0) self.assertEqual([], y) def test_oneElement(self): x = [1] y = [0] * len(x) self.copy(x, 0, y, 0, 1) self.assertEqual([1], y) def assertCopy(self, expected, src, src_pos, des, des_pos, n): self.copy(src, src_pos, des, des_pos, n) self.assertEqual(expected, des) def test_copy_all(self): x = [0, 1] y = [0] * len(x) self.copy(x, 0, y, 0, len(x)) self.assertEqual(x, y) self.assertIsNot(x, y) def test_copy_sublist(self): x = [1, 2] y = [0] self.copy(x, 0, y, 0, 1) self.assertEqual(x[:1], y) self.assertIsNot(x[:1], y) def test_recursive_copy(self): x = [[1], [2]] y = [[0], [0]] self.copy(x, 0, y, 0, 2) self.assertEqual(x, y) self.assertIsNot(x, y) self.assertEqual(x[0], y[0]) self.assertIsNot(x[0], y[0]) def test_object_list(self): x = [self.C(1), self.C(2)] y = [0] * len(x) self.copy(x, 0, y, 0, 2) self.assertEqual(x, y) self.assertAllIsNot(x, y) class CopyOfTestCase(ListTestCase): def test_illegalArgument(self): x = [1] self.assertRaises(IndexError, lists.copyOf, x, 2) def test_copy0Elements_returnEmptyList(self): x = [1] y = lists.copyOf(x, 0) self.assertEqual([], y) def test_empty(self): x = [] y = lists.copyOf(x, len(x)) self.assertEqual(x, y) self.assertIsNot(x, y) def test_oneElement(self): x = [1] y = lists.copyOf(x, len(x)) self.assertEqual(x, y) self.assertIsNot(x, y) def test_copy_all(self): x = [1, 2] y = lists.copyOf(x, len(x)) self.assertEqual(x, y) self.assertIsNot(x, y) def test_copy_sublist(self): x = [1, 2] y = lists.copyOf(x, 1) self.assertEqual(x[:1], y) self.assertIsNot(x[:1], y) def test_recursive_copy(self): x = [[1], [2]] y = lists.copyOf(x, 2) self.assertEqual(x, y) self.assertIsNot(x, y) self.assertEqual(x[0], y[0]) self.assertIsNot(x[0], y[0]) def test_object_list(self): x = [self.C(1), self.C(2)] y = lists.copyOf(x, 2) self.assertEqual(x, y) self.assertAllIsNot(x, y) class CopyOfRangeTestCase(ListTestCase): def test_illegalArgument(self): x = [1, 2, 3] self.assertRaises(IndexError, lists.copyOfRange, x, 2, 1) def test_copy0Elements_returnEmptyList(self): x = [1] y = lists.copyOfRange(x, 0, 0) self.assertEqual([], y) def test_oneElement(self): x = [1] y = lists.copyOfRange(x, 0, 1) self.assertEqual(x, y) self.assertIsNot(x, y) def test_copy_all(self): x = [1, 2] y = lists.copyOfRange(x, 0, len(x)) self.assertEqual(x, y) self.assertIsNot(x, y) def test_copy_sublist(self): x = [1, 2] y = lists.copyOfRange(x, 0, 1) self.assertEqual(x[:1], y) self.assertIsNot(x[:1], y) def test_recursive_copy(self): x = [[1], [2]] y = lists.copyOfRange(x, 0, len(x)) self.assertEqual(x, y) self.assertIsNot(x, y) def test_object_list(self): x = [self.C(1), self.C(2)] y = lists.copyOfRange(x, 0, 2) self.assertEqual(x, y) self.assertAllIsNot(x, y)
23.534091
68
0.529937
589
4,142
3.646859
0.08489
0.024209
0.047486
0.094972
0.815177
0.815177
0.77514
0.733706
0.672719
0.581937
0
0.035689
0.316755
4,142
175
69
23.668571
0.723322
0
0
0.771654
0
0
0
0
0
0
0
0
0.346457
1
0.19685
false
0
0.015748
0
0.23622
0
0
0
0
null
0
0
0
1
1
1
1
0
0
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
f0a6f6ea2fe66eacc419eb43d227400c5a4fdab4
61
py
Python
ceol/player/models/__init__.py
pythify/backend-pithify
ac845bd96769d3cda1e32ea5c141598f0529db19
[ "MIT" ]
null
null
null
ceol/player/models/__init__.py
pythify/backend-pithify
ac845bd96769d3cda1e32ea5c141598f0529db19
[ "MIT" ]
null
null
null
ceol/player/models/__init__.py
pythify/backend-pithify
ac845bd96769d3cda1e32ea5c141598f0529db19
[ "MIT" ]
null
null
null
from .catalogues import Artist, Album from .songs import Song
30.5
37
0.819672
9
61
5.555556
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.131148
61
2
38
30.5
0.943396
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
f0db8e1f235d388095fcc18cc52dc40e4cec32d6
156
py
Python
14_Tran_An_Thien/ManagementStudents/student/admin.py
lpython2006e/exercies
84343eae57d86708a7984aa02f77183a4688a508
[ "MIT" ]
null
null
null
14_Tran_An_Thien/ManagementStudents/student/admin.py
lpython2006e/exercies
84343eae57d86708a7984aa02f77183a4688a508
[ "MIT" ]
null
null
null
14_Tran_An_Thien/ManagementStudents/student/admin.py
lpython2006e/exercies
84343eae57d86708a7984aa02f77183a4688a508
[ "MIT" ]
8
2020-07-10T14:13:54.000Z
2020-08-03T08:17:50.000Z
from django.contrib import admin from .models import Class, Students # Register your models here. admin.site.register(Class) admin.site.register(Students)
22.285714
35
0.807692
22
156
5.727273
0.545455
0.142857
0.269841
0
0
0
0
0
0
0
0
0
0.108974
156
6
36
26
0.906475
0.166667
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
0b1bee2605d1bbface2f6abcb133f4725ae44f16
1,535
py
Python
benchmark.py
nKolja/SIKE-zero-value-attacks
f53496b382740a02556e07df2e1afd4c62f03ddb
[ "MIT" ]
null
null
null
benchmark.py
nKolja/SIKE-zero-value-attacks
f53496b382740a02556e07df2e1afd4c62f03ddb
[ "MIT" ]
null
null
null
benchmark.py
nKolja/SIKE-zero-value-attacks
f53496b382740a02556e07df2e1afd4c62f03ddb
[ "MIT" ]
null
null
null
import os import subprocess import math import random subprocess.call(['make', '-silent', 'clean']) for p in [434, 503, 610, 751]: subprocess.call(['make', '-silent', 'PRIME_SIZE='.strip() + str(p), 'tests']) print("!=!=!=!=!=!=!=!=!=!=!=!=!!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=! ") print("!=!=!=!=!=!=!=!=!=! PRIME_SIZE=".strip() + str(p).strip() + " !=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=! ") print("!=!=!=!=!=!=!=!=!=!=!=!=!=!!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=! ") print("\n\n") print("!=!=!=!=!=!=!=!=!=!=!=!=!=!!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=! ") print("!=!=!=!=!=!=!=!=!=! COUNTERMEASURE OFF !=!=!=!=!=!=!=!=!=!=! ") print("!=!=!=!=!=!=!=!=!=!=!=!=!=!=!!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=! ") subprocess.call(['./sike'.strip() + str(p).strip() + '/test_SIKE']) subprocess.call(['./sidh'.strip() + str(p).strip() + '/test_SIDH']) subprocess.call(['make', '-silent', 'clean']) subprocess.call(['make', '-silent', 'PRIME_SIZE='.strip() + str(p), 'tests', 'COUNTERMEASURE=YES']) print("\n\n") print("!=!=!=!=!=!=!=!=!=!=!=!=!=!=!!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=! ") print("!=!=!=!=!=!=!=!=!=!=! COUNTERMEASURE ON !=!=!=!=!=!=!=!=!=! ") print("!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!!=!=!=!=!=!=!=!=!=!=!=!=!=!=! ") subprocess.call(['./sike'.strip() + str(p).strip() + '/test_SIKE']) subprocess.call(['./sidh'.strip() + str(p).strip() + '/test_SIDH']) subprocess.call(['make', '-silent', 'clean']) print("\n\n")
40.394737
121
0.358958
116
1,535
4.689655
0.258621
0.231618
0.115809
0.220588
0.792279
0.705882
0.591912
0.591912
0.591912
0.591912
0
0.008889
0.120521
1,535
38
122
40.394737
0.394074
0
0
0.461538
0
0
0.521824
0.317264
0
0
0
0
0
1
0
false
0
0.153846
0
0.153846
0.461538
0
0
0
null
1
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
9bd6dc1ff097bd4577ef1ec097561b6610bc7545
212
py
Python
spirit/comment/poll/apps.py
Ke-xueting/Spirit
346d9a0db125ee8995ba5d0ab0fd8b43aa8c5dc7
[ "MIT" ]
974
2015-01-02T12:56:00.000Z
2022-03-24T00:01:54.000Z
spirit/comment/poll/apps.py
Ke-xueting/Spirit
346d9a0db125ee8995ba5d0ab0fd8b43aa8c5dc7
[ "MIT" ]
247
2015-01-07T02:59:26.000Z
2022-02-23T08:27:57.000Z
spirit/comment/poll/apps.py
BinaryTree0/fer3
85c3bbf2f328e69ad4d7c01b6e2c8d4ef1d9e0a3
[ "MIT" ]
366
2015-01-08T10:22:25.000Z
2022-02-21T12:58:31.000Z
# -*- coding: utf-8 -*- from django.apps import AppConfig class SpiritCommentPollConfig(AppConfig): name = 'spirit.comment.poll' verbose_name = "Spirit Comment Poll" label = 'spirit_comment_poll'
19.272727
41
0.707547
24
212
6.125
0.666667
0.265306
0.346939
0.285714
0
0
0
0
0
0
0
0.005747
0.179245
212
10
42
21.2
0.83908
0.099057
0
0
0
0
0.301587
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
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
5
50018dc65ebe90d6d227998401be2dd1ce79a2b9
143
py
Python
logical/converter/qiskit/transpiler/_transpilererror.py
malcolmregan/GateCircuit-to-AnnealerEmbedding
33a1a4ea2ebd707ade0677e0df468d5120a861db
[ "Apache-2.0" ]
null
null
null
logical/converter/qiskit/transpiler/_transpilererror.py
malcolmregan/GateCircuit-to-AnnealerEmbedding
33a1a4ea2ebd707ade0677e0df468d5120a861db
[ "Apache-2.0" ]
1
2019-04-09T02:22:38.000Z
2019-04-09T02:22:38.000Z
logical/converter/qiskit/transpiler/_transpilererror.py
malcolmregan/GateCircuit-to-AnnealerEmbedding
33a1a4ea2ebd707ade0677e0df468d5120a861db
[ "Apache-2.0" ]
null
null
null
from converter.qiskit import QISKitError class TranspilerError(QISKitError): pass class TranspilerAccessError(QISKitError): pass
11.916667
41
0.783217
13
143
8.615385
0.692308
0.267857
0
0
0
0
0
0
0
0
0
0
0.167832
143
11
42
13
0.941176
0
0
0.4
0
0
0
0
0
0
0
0
0
1
0
true
0.4
0.2
0
0.6
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
1
0
0
1
0
0
5
5024d06d7fc727642b606dd88c21a7cfd9d49a8a
90
py
Python
t40.py
tarunagarwal99/python
13dbf4c4226430a3436d91d60f234827a05a6e0e
[ "MIT" ]
null
null
null
t40.py
tarunagarwal99/python
13dbf4c4226430a3436d91d60f234827a05a6e0e
[ "MIT" ]
null
null
null
t40.py
tarunagarwal99/python
13dbf4c4226430a3436d91d60f234827a05a6e0e
[ "MIT" ]
null
null
null
str="tarun" print(str[0:3]) print(str[1: ]) print(str[1:-1]) print(str[-4: ]) print
12.857143
17
0.566667
17
90
3
0.411765
0.627451
0.352941
0
0
0
0
0
0
0
0
0.078947
0.155556
90
6
18
15
0.592105
0
0
0
0
0
0.059524
0
0
0
0
0
0
1
0
false
0
0
0
0
0.833333
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
5035ffa71944dc392a12d2fa841e4afb439bb800
25
py
Python
lib/shp/shp.py
nayas360/terminal_emulator
ffce98ce55aad7034c103547847e9f6c835df7e6
[ "MIT" ]
1
2022-03-09T19:29:44.000Z
2022-03-09T19:29:44.000Z
lib/shp/shp.py
nayas360/terminal_emulator
ffce98ce55aad7034c103547847e9f6c835df7e6
[ "MIT" ]
null
null
null
lib/shp/shp.py
nayas360/terminal_emulator
ffce98ce55aad7034c103547847e9f6c835df7e6
[ "MIT" ]
2
2018-01-18T21:54:11.000Z
2021-09-06T19:32:41.000Z
# Shell script processor
12.5
24
0.8
3
25
6.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.16
25
1
25
25
0.952381
0.88
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
ac8e06df822ee76429eac648062642972674ea76
115
py
Python
coolkit.py
srbcheema1/CoolKit
7b27c59767609f3b2f2297bd67925b346215e7a7
[ "MIT" ]
13
2018-02-10T06:54:43.000Z
2019-03-09T09:12:31.000Z
coolkit.py
srbcheema1/CoolKit
7b27c59767609f3b2f2297bd67925b346215e7a7
[ "MIT" ]
5
2018-10-02T23:17:49.000Z
2021-06-01T22:39:42.000Z
coolkit.py
srbcheema1/CoolKit
7b27c59767609f3b2f2297bd67925b346215e7a7
[ "MIT" ]
11
2018-02-04T11:12:19.000Z
2019-06-18T05:00:37.000Z
#!/usr/bin/env python3 # PYTHON_ARGCOMPLETE_OK from coolkit import main if(__name__=="__main__"): main.main()
16.428571
25
0.730435
16
115
4.625
0.8125
0.216216
0
0
0
0
0
0
0
0
0
0.01
0.130435
115
6
26
19.166667
0.73
0.373913
0
0
0
0
0.114286
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
acab0c2aa76ee8cf983abce998916e8ad67b5173
100
py
Python
Kamii_Sinogi/Face/source/tempCodeRunnerFile.py
wangao0824/Intelligent-Door-Lock
ee757f65048946b9b480234cbbf9bed4de60738d
[ "MIT" ]
2
2020-06-03T05:48:15.000Z
2020-06-03T07:34:08.000Z
Kamii_Sinogi/Face/source/tempCodeRunnerFile.py
wangao0824/Intelligent-Door-Lock
ee757f65048946b9b480234cbbf9bed4de60738d
[ "MIT" ]
null
null
null
Kamii_Sinogi/Face/source/tempCodeRunnerFile.py
wangao0824/Intelligent-Door-Lock
ee757f65048946b9b480234cbbf9bed4de60738d
[ "MIT" ]
1
2020-06-06T15:20:03.000Z
2020-06-06T15:20:03.000Z
if type(light_set["status"]) == unicode: light_set["status"]=status[light_set["status"]]
50
55
0.64
13
100
4.692308
0.461538
0.393443
0.688525
0
0
0
0
0
0
0
0
0
0.16
100
2
55
50
0.72619
0
0
0
0
0
0.178218
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
0
0
5
ace5cd895db32cd2ce64bd1e88e593e6018b187e
81
py
Python
adventofcode/2015/1/which_floor/__init__.py
bneradt/toy
982e80ec98f4e951f7275e5f22cb0197f8f86c08
[ "Apache-2.0" ]
null
null
null
adventofcode/2015/1/which_floor/__init__.py
bneradt/toy
982e80ec98f4e951f7275e5f22cb0197f8f86c08
[ "Apache-2.0" ]
null
null
null
adventofcode/2015/1/which_floor/__init__.py
bneradt/toy
982e80ec98f4e951f7275e5f22cb0197f8f86c08
[ "Apache-2.0" ]
null
null
null
from .which_floor import description_to_final_floor, get_first_basement_position
40.5
80
0.91358
12
81
5.583333
0.916667
0
0
0
0
0
0
0
0
0
0
0
0.061728
81
1
81
81
0.881579
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
4a10e61a1019e510eace17bf367128f30d23ba14
48
py
Python
First_Test_File.py
technicSupFan/Network_Scanner_Python
0d4a64209835c98cf28ca301abf493101f1c7898
[ "CC0-1.0" ]
null
null
null
First_Test_File.py
technicSupFan/Network_Scanner_Python
0d4a64209835c98cf28ca301abf493101f1c7898
[ "CC0-1.0" ]
null
null
null
First_Test_File.py
technicSupFan/Network_Scanner_Python
0d4a64209835c98cf28ca301abf493101f1c7898
[ "CC0-1.0" ]
null
null
null
import time print("Hello World") time.sleep(1)
9.6
20
0.729167
8
48
4.375
0.875
0
0
0
0
0
0
0
0
0
0
0.02381
0.125
48
4
21
12
0.809524
0
0
0
0
0
0.229167
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0.333333
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
4a164ec7c129376f5fb83e072b0dc5a660562daa
167
py
Python
general-practice/Exercises solved/w3resource/basic/Exercise52.py
lugabrielbueno/Projeto
f012c5bb9ce6f6d7c9e8196cc7986127dba3eba0
[ "MIT" ]
null
null
null
general-practice/Exercises solved/w3resource/basic/Exercise52.py
lugabrielbueno/Projeto
f012c5bb9ce6f6d7c9e8196cc7986127dba3eba0
[ "MIT" ]
null
null
null
general-practice/Exercises solved/w3resource/basic/Exercise52.py
lugabrielbueno/Projeto
f012c5bb9ce6f6d7c9e8196cc7986127dba3eba0
[ "MIT" ]
null
null
null
#Write a Python program to print to stderr import sys def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) eprint("abc", "efg", "xyz", sep="--")
20.875
43
0.646707
25
167
4.32
0.72
0
0
0
0
0
0
0
0
0
0
0
0.155689
167
8
44
20.875
0.765957
0.245509
0
0
0
0
0.087302
0
0
0
0
0
0
1
0.25
true
0
0.25
0
0.5
0.75
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
1
0
0
0
0
1
0
5
c58a23a0275485edbc9ce3ae7cd2bc0175215cc2
47
py
Python
commonlibs/dict_tools/__init__.py
floatingstarZ/loc_cls_exp
8b971db671753d3571914aaa760cc13ac47018e8
[ "Apache-2.0" ]
null
null
null
commonlibs/dict_tools/__init__.py
floatingstarZ/loc_cls_exp
8b971db671753d3571914aaa760cc13ac47018e8
[ "Apache-2.0" ]
null
null
null
commonlibs/dict_tools/__init__.py
floatingstarZ/loc_cls_exp
8b971db671753d3571914aaa760cc13ac47018e8
[ "Apache-2.0" ]
null
null
null
from commonlibs.dict_tools.coco_dicts import *
23.5
46
0.851064
7
47
5.428571
1
0
0
0
0
0
0
0
0
0
0
0
0.085106
47
1
47
47
0.883721
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
c5d12769c151509676c5d1dee032ec1a263b85eb
163
py
Python
l5kit/l5kit/dataset/__init__.py
stefaniespeichert/l5kit
e7ef272b80d71c5080891b27f478c6d3e001774e
[ "Apache-2.0" ]
null
null
null
l5kit/l5kit/dataset/__init__.py
stefaniespeichert/l5kit
e7ef272b80d71c5080891b27f478c6d3e001774e
[ "Apache-2.0" ]
null
null
null
l5kit/l5kit/dataset/__init__.py
stefaniespeichert/l5kit
e7ef272b80d71c5080891b27f478c6d3e001774e
[ "Apache-2.0" ]
null
null
null
from .ego import EgoDataset from .agent import AgentDataset from .utilities import build_dataloader __all__ = ["EgoDataset", "AgentDataset", "build_dataloader"]
23.285714
60
0.797546
18
163
6.888889
0.555556
0.241935
0
0
0
0
0
0
0
0
0
0
0.116564
163
6
61
27.166667
0.861111
0
0
0
0
0
0.233129
0
0
0
0
0
0
1
0
false
0
0.75
0
0.75
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
c5fb1c0247dd6c7ab629d57cd958be26ef0e0e03
253
py
Python
Python/PythonExercicios/ex021.py
felizardo27/Python
965d56f4956eb7b6a68c0b1cbd74d363dd2a223c
[ "MIT" ]
null
null
null
Python/PythonExercicios/ex021.py
felizardo27/Python
965d56f4956eb7b6a68c0b1cbd74d363dd2a223c
[ "MIT" ]
null
null
null
Python/PythonExercicios/ex021.py
felizardo27/Python
965d56f4956eb7b6a68c0b1cbd74d363dd2a223c
[ "MIT" ]
null
null
null
print('====== EX 021 ======') # Faça um programa em python que abra e reproduza o audio de um arquivo MP3. import pygame pygame.mixer.init() pygame.mixer.music.load('buttercup21.mp3') pygame.mixer.music.play() while(pygame.mixer.music.get_busy()): pass
31.625
76
0.72332
40
253
4.55
0.725
0.241758
0.263736
0
0
0
0
0
0
0
0
0.030973
0.106719
253
7
77
36.142857
0.774336
0.29249
0
0
0
0
0.19774
0
0
0
0
0
0
1
0
true
0.166667
0.166667
0
0.166667
0.166667
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
1
1
0
0
0
0
0
5
a846a7b4e26c69e14d3f209af805d1890740a932
186
py
Python
tests/test_example.py
stradivari96/modern-python-template
ad94a9dfb64ccc0d41af8c64d6a32475c06495b7
[ "MIT" ]
1
2021-05-13T06:19:49.000Z
2021-05-13T06:19:49.000Z
tests/test_example.py
stradivari96/modern-python-template
ad94a9dfb64ccc0d41af8c64d6a32475c06495b7
[ "MIT" ]
21
2021-06-08T08:50:04.000Z
2022-03-21T03:06:48.000Z
tests/test_example.py
stradivari96/modern-python-template
ad94a9dfb64ccc0d41af8c64d6a32475c06495b7
[ "MIT" ]
null
null
null
from my_package.example import hello def test_hello(): """Example test with parametrization.""" assert hello("Bob") == "Hello Bob!" assert hello("Alice") == "Hello Alice!"
23.25
44
0.66129
23
186
5.26087
0.565217
0.181818
0
0
0
0
0
0
0
0
0
0
0.182796
186
7
45
26.571429
0.796053
0.182796
0
0
0
0
0.205479
0
0
0
0
0
0.5
1
0.25
true
0
0.25
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
1
0
0
0
0
0
0
5
a88aad9ed775999889734a11fb4622773e37a59a
91
py
Python
metasearch/repos/CDCS/__init__.py
mdi-community/metasearch
4b3d983ab096e06b162f7e4c1da9930a27c495d5
[ "MIT" ]
null
null
null
metasearch/repos/CDCS/__init__.py
mdi-community/metasearch
4b3d983ab096e06b162f7e4c1da9930a27c495d5
[ "MIT" ]
null
null
null
metasearch/repos/CDCS/__init__.py
mdi-community/metasearch
4b3d983ab096e06b162f7e4c1da9930a27c495d5
[ "MIT" ]
null
null
null
from .cdcsquery import CDCSQuery, DEFAULT_BASE_URL from .cdcsresult import CDCSQueryResult
30.333333
50
0.868132
11
91
7
0.727273
0
0
0
0
0
0
0
0
0
0
0
0.098901
91
2
51
45.5
0.939024
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
763dede9c23fbe31abdd3e2074d87824a246b5d0
80
py
Python
src/lybica/actions/__init__.py
protone/lybica-runner
185b3fc4ffc7a6e066baa6c2f030e109db97b4b1
[ "MIT" ]
null
null
null
src/lybica/actions/__init__.py
protone/lybica-runner
185b3fc4ffc7a6e066baa6c2f030e109db97b4b1
[ "MIT" ]
3
2015-11-04T09:43:35.000Z
2015-11-12T09:41:21.000Z
src/lybica/actions/__init__.py
protone/lybica-runner
185b3fc4ffc7a6e066baa6c2f030e109db97b4b1
[ "MIT" ]
null
null
null
from .builtin import * from .robotframework import * from .user_script import *
20
29
0.775
10
80
6.1
0.6
0.327869
0
0
0
0
0
0
0
0
0
0
0.15
80
3
30
26.666667
0.897059
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
76bd7ac486fa0677f21e91c31b946668de5bcb7f
9,372
py
Python
tests/test_0593-preserve-nullability-in-arrow-and-parquet.py
BioGeek/awkward-1.0
0cfb4e43c41d5c7d9830cc7b1d750485c0a93eb2
[ "BSD-3-Clause" ]
519
2019-10-17T12:36:22.000Z
2022-03-26T23:28:19.000Z
tests/test_0593-preserve-nullability-in-arrow-and-parquet.py
BioGeek/awkward-1.0
0cfb4e43c41d5c7d9830cc7b1d750485c0a93eb2
[ "BSD-3-Clause" ]
924
2019-11-03T21:05:01.000Z
2022-03-31T22:44:30.000Z
tests/test_0593-preserve-nullability-in-arrow-and-parquet.py
BioGeek/awkward-1.0
0cfb4e43c41d5c7d9830cc7b1d750485c0a93eb2
[ "BSD-3-Clause" ]
56
2019-12-17T15:49:22.000Z
2022-03-09T20:34:06.000Z
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE from __future__ import absolute_import import os import pytest # noqa: F401 import numpy as np # noqa: F401 import awkward as ak # noqa: F401 pytest.importorskip("pyarrow") def test_list_to_arrow(): ak_array = ak.Array([[1.1, 2.2, 3.3], [], [4.4, 5.5]]) pa_array = ak.to_arrow(ak_array) assert str(pa_array.type) == "large_list<item: double not null>" assert pa_array.to_pylist() == [[1.1, 2.2, 3.3], [], [4.4, 5.5]] ak_array = ak.Array( ak.layout.ListOffsetArray64( ak_array.layout.offsets, ak.layout.UnmaskedArray(ak_array.layout.content) ) ) pa_array = ak.to_arrow(ak_array) assert str(pa_array.type) == "large_list<item: double>" assert pa_array.to_pylist() == [[1.1, 2.2, 3.3], [], [4.4, 5.5]] ak_array = ak.Array([[1.1, 2.2, None], [], [4.4, 5.5]]) pa_array = ak.to_arrow(ak_array) assert str(pa_array.type) == "large_list<item: double>" assert pa_array.to_pylist() == [[1.1, 2.2, None], [], [4.4, 5.5]] def test_record_to_arrow(): x_content = ak.Array([1.1, 2.2, 3.3, 4.4, 5.5]).layout z_content = ak.Array([1, 2, 3, None, 5]).layout ak_array = ak.Array( ak.layout.RecordArray( [ x_content, ak.layout.UnmaskedArray(x_content), z_content, ], ["x", "y", "z"], ) ) pa_array = ak.to_arrow(ak_array) assert str(pa_array.type) == "struct<x: double not null, y: double, z: int64>" assert pa_array.to_pylist() == [ {"x": 1.1, "y": 1.1, "z": 1}, {"x": 2.2, "y": 2.2, "z": 2}, {"x": 3.3, "y": 3.3, "z": 3}, {"x": 4.4, "y": 4.4, "z": None}, {"x": 5.5, "y": 5.5, "z": 5}, ] def test_union_to_arrow(): ak_array = ak.Array([1.1, 2.2, None, [1, 2, 3], "hello"]) pa_array = ak.to_arrow(ak_array) assert ( str(pa_array.type) == "dense_union<0: double=0, 1: large_list<item: int64 not null>=1, 2: string=2>" ) assert pa_array.to_pylist() == [1.1, 2.2, None, [1, 2, 3], "hello"] ak_array = ak.Array( ak.layout.UnmaskedArray(ak.Array([1.1, 2.2, [1, 2, 3], "hello"]).layout) ) pa_array = ak.to_arrow(ak_array) assert ( str(pa_array.type) == "dense_union<0: double=0, 1: large_list<item: int64 not null>=1, 2: string=2>" ) assert pa_array.to_pylist() == [1.1, 2.2, [1, 2, 3], "hello"] ak_array = ak.Array([1.1, 2.2, [1, 2, 3], "hello"]) pa_array = ak.to_arrow(ak_array) assert ( str(pa_array.type) == "dense_union<0: double not null=0, 1: large_list<item: int64 not null> not null=1, 2: string not null=2>" ) assert pa_array.to_pylist() == [1.1, 2.2, [1, 2, 3], "hello"] def test_list_from_arrow(): original = ak.Array([[1.1, 2.2, 3.3], [], [4.4, 5.5]]) pa_array = ak.to_arrow(original) reconstituted = ak.from_arrow(pa_array) assert str(reconstituted.type) == "3 * var * float64" assert reconstituted.tolist() == [[1.1, 2.2, 3.3], [], [4.4, 5.5]] original = ak.Array([[1.1, 2.2, None], [], [4.4, 5.5]]) pa_array = ak.to_arrow(original) reconstituted = ak.from_arrow(pa_array) assert str(reconstituted.type) == "3 * var * ?float64" assert reconstituted.tolist() == [[1.1, 2.2, None], [], [4.4, 5.5]] original = ak.Array([[1.1, 2.2, 3.3], [], None, [4.4, 5.5]]) pa_array = ak.to_arrow(original) reconstituted = ak.from_arrow(pa_array) assert str(reconstituted.type) == "4 * option[var * float64]" assert reconstituted.tolist() == [[1.1, 2.2, 3.3], [], None, [4.4, 5.5]] original = ak.Array([[1.1, 2.2, None], [], None, [4.4, 5.5]]) pa_array = ak.to_arrow(original) reconstituted = ak.from_arrow(pa_array) assert str(reconstituted.type) == "4 * option[var * ?float64]" assert reconstituted.tolist() == [[1.1, 2.2, None], [], None, [4.4, 5.5]] def test_record_from_arrow(): x_content = ak.Array([1.1, 2.2, 3.3, 4.4, 5.5]).layout z_content = ak.Array([1, 2, 3, None, 5]).layout original = ak.Array( ak.layout.RecordArray( [ x_content, ak.layout.UnmaskedArray(x_content), z_content, ], ["x", "y", "z"], ) ) pa_array = ak.to_arrow(original) reconstituted = ak.from_arrow(pa_array) assert str(reconstituted.type) == '5 * {"x": float64, "y": ?float64, "z": ?int64}' assert reconstituted.tolist() == [ {"x": 1.1, "y": 1.1, "z": 1}, {"x": 2.2, "y": 2.2, "z": 2}, {"x": 3.3, "y": 3.3, "z": 3}, {"x": 4.4, "y": 4.4, "z": None}, {"x": 5.5, "y": 5.5, "z": 5}, ] original = ak.Array( ak.layout.ByteMaskedArray( ak.layout.Index8(np.array([False, True, False, False, False], np.int8)), original.layout, valid_when=False, ) ) pa_array = ak.to_arrow(original) reconstituted = ak.from_arrow(pa_array) assert str(reconstituted.type) == '5 * ?{"x": float64, "y": ?float64, "z": ?int64}' assert reconstituted.tolist() == [ {"x": 1.1, "y": 1.1, "z": 1}, None, {"x": 3.3, "y": 3.3, "z": 3}, {"x": 4.4, "y": 4.4, "z": None}, {"x": 5.5, "y": 5.5, "z": 5}, ] def test_union_from_arrow(): original = ak.Array([1.1, 2.2, [1, 2, 3], "hello"]) pa_array = ak.to_arrow(original) reconstituted = ak.from_arrow(pa_array) assert str(reconstituted.type) == "4 * union[float64, var * int64, string]" assert reconstituted.tolist() == [1.1, 2.2, [1, 2, 3], "hello"] original = ak.Array([1.1, 2.2, None, [1, 2, 3], "hello"]) pa_array = ak.to_arrow(original) reconstituted = ak.from_arrow(pa_array) assert ( str(reconstituted.type) == "5 * union[?float64, option[var * int64], option[string]]" ) assert reconstituted.tolist() == [1.1, 2.2, None, [1, 2, 3], "hello"] def test_to_arrow_table(): assert ak.from_arrow( ak.to_arrow_table( ak.Array([[{"x": 1.1, "y": [1]}], [], [{"x": 2.2, "y": [1, 2]}]]), explode_records=True, ) ).tolist() == [ {"x": [1.1], "y": [[1]]}, {"x": [], "y": []}, {"x": [2.2], "y": [[1, 2]]}, ] assert ak.from_arrow( ak.to_arrow_table(ak.Array([{"x": 1.1, "y": [1]}, {"x": 2.2, "y": [1, 2]}])) ).tolist() == [{"x": 1.1, "y": [1]}, {"x": 2.2, "y": [1, 2]}] pytest.importorskip("pyarrow.parquet") def test_to_parquet(tmp_path): original = ak.Array( [ [{"x": 1, "y": 1.1}, {"x": 2, "y": 2.2}, {"x": 3, "y": 3.3}], [], [{"x": 4, "y": 4.4}, {"x": 5, "y": 5.5}], [], [], [ {"x": 6, "y": 6.6}, {"x": 7, "y": 7.7}, {"x": 8, "y": 8.8}, {"x": 9, "y": 9.9}, ], ] ) ak.to_parquet(original, os.path.join(tmp_path, "data.parquet")) reconstituted = ak.from_parquet(os.path.join(tmp_path, "data.parquet")) assert reconstituted.tolist() == [ [{"x": 1, "y": 1.1}, {"x": 2, "y": 2.2}, {"x": 3, "y": 3.3}], [], [{"x": 4, "y": 4.4}, {"x": 5, "y": 5.5}], [], [], [ {"x": 6, "y": 6.6}, {"x": 7, "y": 7.7}, {"x": 8, "y": 8.8}, {"x": 9, "y": 9.9}, ], ] assert str(reconstituted.type) == '6 * var * {"x": int64, "y": float64}' def test_to_parquet_2(tmp_path): array = ak.Array( [ [{"x": 0.0, "y": []}, {"x": 1.1, "y": [1]}, {"x": 2.2, "y": None}], [], [{"x": 3.3, "y": [1, 2, 3]}, None, {"x": 4.4, "y": [1, 2, 3, 4]}], ] ) assert str(array.type) == '3 * var * ?{"x": float64, "y": option[var * int64]}' ak.to_parquet(array, os.path.join(tmp_path, "complicated-example.parquet")) array2 = ak.from_parquet(os.path.join(tmp_path, "complicated-example.parquet")) assert str(array2.type) == str(array.type) assert array2.tolist() == array.tolist() def test_to_table_2(): array = ak.Array( [ [{"x": 0.0, "y": []}, {"x": 1.1, "y": [1]}, {"x": 2.2, "y": None}], [], [{"x": 3.3, "y": [1, 2, 3]}, None, {"x": 4.4, "y": [1, 2, 3, 4]}], ] ) assert str(array.type) == '3 * var * ?{"x": float64, "y": option[var * int64]}' pa_table = ak.to_arrow_table(array) array2 = ak.from_arrow(pa_table) assert str(array2.type) == str(array.type) assert array2.tolist() == array.tolist() def test_from_buffers(): array = ak.Array( [ [{"x": 0.0, "y": []}, {"x": 1.1, "y": [1]}, {"x": 2.2, "y": None}], [], [{"x": 3.3, "y": [1, 2, 3]}, None, {"x": 4.4, "y": [1, 2, 3, 4]}], ] ) assert str(array.type) == '3 * var * ?{"x": float64, "y": option[var * int64]}' pa_table = ak.to_arrow_table(array) awkward_array = ak.from_arrow(pa_table) form, length, container = ak.to_buffers(awkward_array) reconstituted = ak.from_buffers(form, length, container, lazy=True) assert reconstituted[2].tolist() == [ {"x": 3.3, "y": [1, 2, 3]}, None, {"x": 4.4, "y": [1, 2, 3, 4]}, ]
33.833935
116
0.497653
1,436
9,372
3.129526
0.068245
0.023142
0.016689
0.022252
0.809524
0.771028
0.76146
0.748776
0.685803
0.672007
0
0.078589
0.270913
9,372
276
117
33.956522
0.579101
0.012591
0
0.519149
0
0.012766
0.122392
0.005838
0
0
0
0
0.178723
1
0.046809
false
0
0.029787
0
0.076596
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
76ccaf9bba69ad12c03cd9fc420cc560d4f94e09
131
py
Python
xport/__init__.py
ChrisSuess/xport
1328ef6b400df3ea80ffefbc3c23e9474b1a6e1e
[ "MIT" ]
null
null
null
xport/__init__.py
ChrisSuess/xport
1328ef6b400df3ea80ffefbc3c23e9474b1a6e1e
[ "MIT" ]
null
null
null
xport/__init__.py
ChrisSuess/xport
1328ef6b400df3ea80ffefbc3c23e9474b1a6e1e
[ "MIT" ]
1
2019-05-15T12:40:10.000Z
2019-05-15T12:40:10.000Z
from flask import Flask from xport.config import Config app = Flask(__name__) app.config.from_object(Config) import xport.routes
16.375
31
0.80916
20
131
5.05
0.45
0.237624
0
0
0
0
0
0
0
0
0
0
0.122137
131
7
32
18.714286
0.878261
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.6
0
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
1
0
1
0
0
5
4f1ba886a2cda61a8692c9279052d953b74d1cfa
66
py
Python
scripts/build.py
jaumecapdevila/jetbrains
fc920dc712a5a302d8752738e6c8e643f71f8ebe
[ "MIT" ]
null
null
null
scripts/build.py
jaumecapdevila/jetbrains
fc920dc712a5a302d8752738e6c8e643f71f8ebe
[ "MIT" ]
null
null
null
scripts/build.py
jaumecapdevila/jetbrains
fc920dc712a5a302d8752738e6c8e643f71f8ebe
[ "MIT" ]
null
null
null
if __name__ == '__main__': import readme import changelog
16.5
26
0.681818
7
66
5.285714
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.242424
66
3
27
22
0.74
0
0
0
0
0
0.121212
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
4f3952484d1779e071842e697fb71164ed466bb9
50,279
py
Python
tests/integration_test/chat_service_test.py
rit1200/kairon
674a491f6deeae4800825ca93e0726e4fb6e0866
[ "Apache-2.0" ]
null
null
null
tests/integration_test/chat_service_test.py
rit1200/kairon
674a491f6deeae4800825ca93e0726e4fb6e0866
[ "Apache-2.0" ]
null
null
null
tests/integration_test/chat_service_test.py
rit1200/kairon
674a491f6deeae4800825ca93e0726e4fb6e0866
[ "Apache-2.0" ]
null
null
null
import asyncio import json import os from urllib.parse import urlencode, quote_plus from mock import patch from mongoengine import connect from rasa.core.agent import Agent from tornado.test.testing_test import AsyncHTTPTestCase from kairon.api.models import RegisterAccount from kairon.chat.agent.agent import KaironAgent from kairon.chat.server import make_app from kairon.shared.account.processor import AccountProcessor from kairon.shared.auth import Authentication from kairon.shared.chat.processor import ChatDataProcessor from kairon.shared.data.constant import TOKEN_TYPE, INTEGRATION_STATUS from kairon.shared.data.processor import MongoProcessor from kairon.shared.end_user_metrics.processor import EndUserMetricsProcessor from kairon.shared.live_agent.processor import LiveAgentsProcessor from kairon.shared.utils import Utility from kairon.train import start_training import responses os.environ["system_file"] = "./tests/testing_data/system.yaml" os.environ['ASYNC_TEST_TIMEOUT'] = "3600" Utility.load_environment() connect(**Utility.mongoengine_connection()) loop = asyncio.new_event_loop() loop.run_until_complete(AccountProcessor.account_setup(RegisterAccount(**{"email": "test@chat.com", "first_name": "Test", "last_name": "Chat", "password": "testChat@12", "confirm_password": "testChat@12", "account": "ChatTesting"}).dict())) token = Authentication.authenticate("test@chat.com", "testChat@12") token_type = "Bearer" user = AccountProcessor.get_complete_user_details("test@chat.com") bot = user['bots']['account_owned'][0]['_id'] start_training(bot, "test@chat.com") bot2 = AccountProcessor.add_bot("testChat2", user['account'], "test@chat.com")['_id'].__str__() loop.run_until_complete(MongoProcessor().save_from_path( "template/use-cases/Hi-Hello", bot2, user="test@chat.com" )) start_training(bot2, "test@chat.com") bot3 = AccountProcessor.add_bot("testChat3", user['account'], "test@chat.com")['_id'].__str__() ChatDataProcessor.save_channel_config({"connector_type": "slack", "config": { "bot_user_oAuth_token": "xoxb-801939352912-801478018484-v3zq6MYNu62oSs8vammWOY8K", "slack_signing_secret": "79f036b9894eef17c064213b90d1042b"}}, bot, user="test@chat.com") responses.start() encoded_url = urlencode({'url': f"https://test@test.com/api/bot/telegram/{bot}/test"}, quote_via=quote_plus) responses.add("GET", json={"result": True}, url=f"https://api.telegram.org/botxoxb-801939352912-801478018484/setWebhook?{encoded_url}") Utility.environment['model']['agent']['url'] = 'https://test@test.com/api/bot/telegram/tests/test' def __mock_endpoint(*args): return f"https://test@test.com/api/bot/telegram/{bot}/test" with patch('kairon.shared.data.utils.DataUtility.get_channel_endpoint', __mock_endpoint): ChatDataProcessor.save_channel_config({"connector_type": "telegram", "config": { "access_token": "xoxb-801939352912-801478018484", "username_for_bot": "test"}}, bot, user="test@chat.com") ChatDataProcessor.save_channel_config({"connector_type": "hangouts", "config": { "project_id": "1234568"} }, bot, user="test@chat.com") ChatDataProcessor.save_channel_config({"connector_type": "messenger", "config": { "app_secret": "cdb69bc72e2ccb7a869f20cbb6b0229a", "page_access_token": "EAAGa50I7D7cBAJ4AmXOhYAeOOZAyJ9fxOclQmn52hBwrOJJWBOxuJNXqQ2uN667z4vLekSEqnCQf41hcxKVZAe2pAZBrZCTENEj1IBe1CHEcG7J33ZApED9Tj9hjO5tE13yckNa8lP3lw2IySFqeg6REJR3ZCJUvp2h03PQs4W5vNZBktWF3FjQYz5vMEXLPzAFIJcZApBtq9wZDZD", "verify_token": "kairon-messenger-token", } }, bot, user="test@chat.com") responses.stop() class TestChatServer(AsyncHTTPTestCase): def get_app(self): return make_app() def empty_store(self, *args, **kwargs): return None def mock_agent_response(self, *args, **kwargs): return {'nlu': {'text': '!@#$%^&*()', 'intent': {'name': 'nlu_fallback', 'confidence': 0.7}, 'entities': [], 'intent_ranking': [{'name': 'nlu_fallback', 'confidence': 0.7}, {'id': 7699795435555413769, 'name': 'bot_challenge', 'confidence': 0.3011210560798645}, {'id': -8614851775639803374, 'name': 'mood_unhappy', 'confidence': 0.28137511014938354}, {'id': -7686226624851022724, 'name': 'deny', 'confidence': 0.2647826075553894}, {'id': -963050110453472522, 'name': 'affirm', 'confidence': 0.0759304016828537}, {'id': -4665925488010208305, 'name': 'goodbye', 'confidence': 0.028776828199625015}, {'id': -8510124799033185183, 'name': 'mood_great', 'confidence': 0.025189757347106934}, {'id': 7378347921649253395, 'name': 'greet', 'confidence': 0.022824246436357498}], 'response_selector': {'all_retrieval_intents': [], 'default': { 'response': {'id': None, 'responses': None, 'response_templates': None, 'confidence': 0.0, 'intent_response_key': None, 'utter_action': 'utter_None', 'template_name': 'utter_None'}, 'ranking': []}}, 'slots': ['kairon_action_response: None', 'bot: 6275ebcba06e09a1b818c70a', 'session_started_metadata: None']}, 'action': ['utter_please_rephrase', 'action_listen'], 'response': [{'recipient_id': 'test@chat.com', 'text': "I'm sorry, I didn't quite understand that. Could you rephrase?"}], 'events': None} def test_index(self): response = self.fetch("/") self.assertEqual(response.code, 200) self.assertEqual(response.body.decode("utf8"), 'Kairon Server Running') def test_chat(self): with patch.object(Utility, "get_local_mongo_store") as mocked: mocked.side_effect = self.empty_store patch.dict(Utility.environment['action'], {"url": None}) response = self.fetch( f"/api/bot/{bot}/chat", method="POST", body=json.dumps({"data": "Hi"}).encode('utf-8'), headers={"Authorization": token_type + " " + token}, connect_timeout=0, request_timeout=0 ) actual = json.loads(response.body.decode("utf8")) self.assertEqual(response.code, 200) assert actual["success"] assert actual["error_code"] == 0 assert actual["data"] assert Utility.check_empty_string(actual["message"]) headers = list(response.headers.get_all()) assert headers[0] == ('Server', 'Secure') assert headers[1] == ('Content-Type', 'application/json') assert headers[3] == ('Access-Control-Allow-Origin', '*') assert headers[4] == ('Access-Control-Allow-Headers', 'x-requested-with') assert headers[5] == ('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS') assert headers[6] == ('Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload') assert headers[7] == ('Content-Security-Policy', "default-src 'self'; frame-ancestors 'self'; form-action 'self';") assert headers[8] == ('X-Content-Type-Options', 'no-sniff') assert headers[9] == ('Referrer-Policy', 'origin') assert headers[10] == ('Permissions-Policy', 'accelerometer=(self), ambient-light-sensor=(self), autoplay=(self), battery=(self), camera=(self), cross-origin-isolated=(self), display-capture=(self), document-domain=(self), encrypted-media=(self), execution-while-not-rendered=(self), execution-while-out-of-viewport=(self), fullscreen=(self), geolocation=(self), gyroscope=(self), keyboard-map=(self), magnetometer=(self), microphone=(self), midi=(self), navigation-override=(self), payment=(self), picture-in-picture=(self), publickey-credentials-get=(self), screen-wake-lock=(self), sync-xhr=(self), usb=(self), web-share=(self), xr-spatial-tracking=(self)') assert headers[11] == ('Cache-Control', 'no-store') def test_chat_with_user(self): with patch.object(Utility, "get_local_mongo_store") as mocked: mocked.side_effect = self.empty_store patch.dict(Utility.environment['action'], {"url": None}) response = self.fetch( f"/api/bot/{bot}/chat", method="POST", body=json.dumps({"data": "Hi"}).encode("utf8"), headers={"Authorization": token_type + " " + token}, ) actual = json.loads(response.body.decode("utf8")) self.assertEqual(response.code, 200) assert actual["success"] assert actual["error_code"] == 0 assert actual["data"] assert Utility.check_empty_string(actual["message"]) def test_chat_fetch_from_cache(self): with patch.object(Utility, "get_local_mongo_store") as mocked: mocked.side_effect = self.empty_store patch.dict(Utility.environment['action'], {"url": None}) response = self.fetch( f"/api/bot/{bot}/chat", method="POST", body=json.dumps({"data": "Hi"}).encode("utf8"), headers={"Authorization": token_type + " " + token}, ) actual = json.loads(response.body.decode("utf8")) self.assertEqual(response.code, 200) assert actual["success"] assert actual["error_code"] == 0 assert actual["data"] assert Utility.check_empty_string(actual["message"]) def test_chat_model_not_trained(self): response = self.fetch( f"/api/bot/{bot3}/chat", method="POST", body=json.dumps({"data": "Hi"}).encode("utf8"), headers={ "Authorization": f"{token_type} {token}" }, ) actual = json.loads(response.body.decode("utf8")) self.assertEqual(response.code, 200) assert not actual["success"] assert actual["error_code"] == 422 assert actual["data"] is None assert actual["message"] == "Bot has not been trained yet!" def test_chat_with_different_bot_not_allowed(self): response = self.fetch( f"/api/bot/test/chat", method="POST", body=json.dumps({"data": "Hi"}).encode("utf8"), headers={ "Authorization": token_type + " " + token }, ) actual = json.loads(response.body.decode("utf8")) self.assertEqual(response.code, 200) assert not actual["success"] assert actual["error_code"] == 422 assert actual["data"] is None assert actual["message"] == "Access to bot is denied" def test_chat_with_different_bot_using_token_for_different_bot(self): access_token = Authentication.generate_integration_token( bot, "test@chat.com", name='integration_token_for_chat_service') response = self.fetch( f"/api/bot/{bot2}/chat", method="POST", body=json.dumps({"data": "Hi"}).encode("utf8"), headers={"Authorization": token_type + " " + access_token}, connect_timeout=0, request_timeout=0 ) actual = json.loads(response.body.decode("utf8")) self.assertEqual(response.code, 200) assert not actual["success"] assert actual["error_code"] == 422 assert not actual["data"] assert actual["message"] == 'Access to bot is denied' def test_chat_with_bot_using_deleted_token(self): access_token = Authentication.generate_integration_token(bot, "test@chat.com", name='integration_token_1') Authentication.update_integration_token('integration_token_1', bot, "test@chat.com", INTEGRATION_STATUS.DELETED.value) response = self.fetch( f"/api/bot/{bot}/chat", method="POST", body=json.dumps({"data": "Hi"}).encode("utf8"), headers={"Authorization": token_type + " " + access_token}, connect_timeout=0, request_timeout=0 ) actual = json.loads(response.body.decode("utf8")) self.assertEqual(response.code, 200) assert not actual["success"] assert actual["error_code"] == 422 assert not actual["data"] assert actual["message"] == 'Access to bot is denied' def test_chat_different_bot(self): with patch.object(Utility, "get_local_mongo_store") as mocked: mocked.side_effect = self.empty_store patch.dict(Utility.environment['action'], {"url": None}) response = self.fetch( f"/api/bot/{bot2}/chat", method="POST", body=json.dumps({"data": "Hi"}).encode("utf8"), headers={"Authorization": token_type + " " + token}, connect_timeout=0, request_timeout=0 ) actual = json.loads(response.body.decode("utf8")) self.assertEqual(response.code, 200) assert actual["success"] assert actual["error_code"] == 0 assert actual["data"] assert Utility.check_empty_string(actual["message"]) def test_chat_with_limited_access(self): access_token = Authentication.generate_integration_token( bot2, "test@chat.com", expiry=5, access_limit=['/api/bot/.+/chat'], name="integration token" ) response = self.fetch( f"/api/bot/{bot2}/chat", method="POST", body=json.dumps({"data": "Hi"}).encode("utf8"), headers={ "Authorization": f"{token_type} {access_token}", 'X-USER': 'testUser' }, ) actual = json.loads(response.body.decode("utf8")) self.assertEqual(response.code, 200) assert actual['data']['response'] response = self.fetch( f"/api/bot/{bot2}/chat", method="POST", body=json.dumps({"data": "Hi"}).encode("utf8"), headers={ "Authorization": f"{token_type} {access_token}" }, ) actual = json.loads(response.body.decode("utf8")) self.assertEqual(response.code, 200) assert actual['message'] == 'Alias user missing for integration' def test_chat_with_limited_access_without_integration(self): access_token = Authentication.create_access_token( data={"sub": "test@chat.com", 'access-limit': ['/api/bot/.+/chat']}, ) response = self.fetch( f"/api/bot/{bot2}/chat", method="POST", body=json.dumps({"data": "Hi"}).encode("utf8"), headers={ "Authorization": f"{token_type} {access_token}", 'X-USER': 'testUser' }, ) actual = json.loads(response.body.decode("utf8")) self.assertEqual(response.code, 200) assert actual['data']['response'] def test_chat_limited_access_prevent_chat(self): access_token = Authentication.create_access_token( data={"sub": "test@chat.com", 'access-limit': ['/api/bot/.+/intent']}, token_type=TOKEN_TYPE.INTEGRATION.value ) response = self.fetch( f"/api/bot/{bot}/chat", method="POST", body=json.dumps({"data": "Hi"}).encode("utf8"), headers={ "Authorization": f"{token_type} {access_token}", 'X-USER': "testUser" }, ) actual = json.loads(response.body.decode("utf8")) assert actual["message"] == "Access denied for this endpoint" def test_reload(self): response = self.fetch( f"/api/bot/{bot}/reload", method="GET", headers={ "Authorization": token_type + " " + token }, ) actual = json.loads(response.body.decode("utf8")) self.assertEqual(response.code, 200) assert actual["success"] assert actual["error_code"] == 0 assert actual["data"] is None assert actual["message"] == "Reloading Model!" headers = list(response.headers.get_all()) assert headers[0] == ('Server', 'Secure') assert headers[1] == ('Content-Type', 'application/json') assert headers[3] == ('Access-Control-Allow-Origin', '*') assert headers[4] == ('Access-Control-Allow-Headers', 'x-requested-with') assert headers[5] == ('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS') assert headers[6] == ('Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload') assert headers[7] == ('Content-Security-Policy', "default-src 'self'; frame-ancestors 'self'; form-action 'self';") assert headers[8] == ('X-Content-Type-Options', 'no-sniff') assert headers[9] == ('Referrer-Policy', 'origin') assert headers[10] == ('Permissions-Policy', 'accelerometer=(self), ambient-light-sensor=(self), autoplay=(self), battery=(self), camera=(self), cross-origin-isolated=(self), display-capture=(self), document-domain=(self), encrypted-media=(self), execution-while-not-rendered=(self), execution-while-out-of-viewport=(self), fullscreen=(self), geolocation=(self), gyroscope=(self), keyboard-map=(self), magnetometer=(self), microphone=(self), midi=(self), navigation-override=(self), payment=(self), picture-in-picture=(self), publickey-credentials-get=(self), screen-wake-lock=(self), sync-xhr=(self), usb=(self), web-share=(self), xr-spatial-tracking=(self)') assert headers[11] == ('Cache-Control', 'no-store') def test_reload_exception(self): response = self.fetch( f"/api/bot/{bot}/reload", method="GET" ) actual = json.loads(response.body.decode("utf8")) self.assertEqual(response.code, 200) assert not actual["success"] assert actual["error_code"] == 422 assert actual["data"] is None assert actual["message"] == "Could not validate credentials" @patch('kairon.chat.handlers.channels.slack.SlackHandler.is_request_from_slack_authentic') @patch('kairon.shared.utils.Utility.get_local_mongo_store') def test_slack_auth_bot_challenge(self, mock_store, mock_slack): mock_store.return_value = self.empty_store mock_slack.return_value = True headers = {'User-Agent': 'Slackbot 1.0 (+https://api.slack.com/robots)', 'Content-Length': 826, 'Accept': '*/*', 'Accept-Encoding': 'gzip,deflate', 'Cache-Control': 'max-age=259200', 'Content-Type': 'application/json', 'X-Forwarded-For': '3.237.67.113', 'X-Forwarded-Proto': 'http', 'X-Slack-Request-Timestamp': '1644676934', 'X-Slack-Retry-Reason': 'http_error', 'X-Slack-Signature': 'v0=65e62a2a81ebac3825a7aeec1f7033977e31f6ccff988ec11aaf06884553834a'} patch.dict(Utility.environment['action'], {"url": None}) response = self.fetch( f"/api/bot/slack/{bot}/{token}", method="POST", headers=headers, body=json.dumps({"token": "RrNd3SaNJNaP28TTauAYCmJw", "challenge": "sjYDB2ccaT5wpcGyawz6BTDbiujZCBiVwSQR87t3Q3yqgoHFkkTy", "type": "url_verification"}, ) ) actual = response.body.decode("utf8") self.assertEqual(response.code, 200) assert actual == "sjYDB2ccaT5wpcGyawz6BTDbiujZCBiVwSQR87t3Q3yqgoHFkkTy" def test_slack_invalid_auth(self): headers = {'User-Agent': 'Slackbot 1.0 (+https://api.slack.com/robots)', 'Content-Length': 826, 'Accept': '*/*', 'Accept-Encoding': 'gzip,deflate', 'Cache-Control': 'max-age=259200', 'Content-Type': 'application/json', 'X-Forwarded-For': '3.237.67.113', 'X-Forwarded-Proto': 'http', 'X-Slack-Request-Timestamp': '1644676934', 'X-Slack-Retry-Num': '1', 'X-Slack-Retry-Reason': 'http_error', 'X-Slack-Signature': 'v0=65e62a2a81ebac3825a7aeec1f7033977e31f6ccff988ec11aaf06884553834a'} patch.dict(Utility.environment['action'], {"url": None}) response = self.fetch( f"/api/bot/slack/{bot}/123", method="POST", headers=headers, body=json.dumps({"token": "RrNd3SaNJNaP28TTauAYCmJw", "team_id": "TPKTMACSU", "api_app_id": "APKTXRPMK", "event": {"client_msg_id": "77eafc15-4e7a-46d1-b03f-bf953fa801dc", "type": "message", "text": "Hi", "user": "UPKTMK5BJ", "ts": "1644670603.521219", "team": "TPKTMACSU", "blocks": [{"type": "rich_text", "block_id": "ssu6", "elements": [{"type": "rich_text_section", "elements": [{"type": "text", "text": "Hi"}]}]}], "channel": "DPKTY81UM", "event_ts": "1644670603.521219", "channel_type": "im"}, "type": "event_callback", "event_id": "Ev032U6W5N1G", "event_time": 1644670603, "authed_users": ["UPKE20JE8"], "authorizations": [ {"enterprise_id": None, "team_id": "TPKTMACSU", "user_id": "UPKE20JE8", "is_bot": True, "is_enterprise_install": False}], "is_ext_shared_channel": False, "event_context": "4-eyJldCI6Im1lc3NhZ2UiLCJ0aWQiOiJUUEtUTUFDU1UiLCJhaWQiOiJBUEtUWFJQTUsiLCJjaWQiOiJEUEtUWTgxVU0ifQ"}) ) actual = response.body.decode("utf8") self.assertEqual(response.code, 422) assert actual == '{"data": null, "success": false, "error_code": 401, "message": "Could not validate credentials"}' @patch('kairon.chat.handlers.channels.telegram.TelegramOutput') @patch('kairon.shared.utils.Utility.get_local_mongo_store') def test_telegram_auth_failed_telegram_verify(self, mock_store, mock_telegram_out): mock_store.return_value = self.empty_store mock_telegram_out.get_me.return_value = "test" patch.dict(Utility.environment['action'], {"url": None}) response = self.fetch( f"/api/bot/telegram/{bot}/{token}", method="POST", body=json.dumps({"update_id": 483117514, "message": {"message_id": 14, "from": {"id": 1422280657, "is_bot": False, "first_name": "Fahad Ali", "language_code": "en"}, "chat": {"id": 1422280657, "first_name": "Fahad Ali", "type": "private"}, "date": 1645433258, "text": "hi"}}) ) actual = response.body.decode("utf8") self.assertEqual(response.code, 200) assert actual == "failed" def test_hangout_invalid_auth(self): patch.dict(Utility.environment['action'], {"url": None}) response = self.fetch( f"/api/bot/hangouts/{bot}/123", method="POST", body=json.dumps({ "type": "MESSAGE", "message": { "sender": { "displayName": "Test" }, "text": "Hello!" }, "space": { "type": "ROOM" } })) actual = response.body.decode("utf8") self.assertEqual(response.code, 422) assert actual == '{"data": null, "success": false, "error_code": 401, "message": "Could not validate credentials"}' @patch('kairon.shared.utils.Utility.get_local_mongo_store') def test_hangout_auth_failed_hangout_verify(self, mock_store): mock_store.return_value = self.empty_store patch.dict(Utility.environment['action'], {"url": None}) response = self.fetch( f"/api/bot/hangouts/{bot}/{token}", method="POST", headers={"Authorization": "Bearer Test"}, body=json.dumps({ "type": "MESSAGE", "message": { "sender": { "displayName": "Test" }, "text": "Hello!" }, "space": { "type": "ROOM" } })) actual = response.body.decode("utf8") self.assertEqual(response.code, 422) def test_messenger_invalid_auth(self): patch.dict(Utility.environment['action'], {"url": None}) response = self.fetch( f"/api/bot/messenger/{bot}/123", headers={"X-Hub-Signature": "invalid"}, method="POST", body=json.dumps({ "object": "page", "entry": [{ "id": "104610528288640", "time": 1646648478575, "messaging": [{ "sender": { "id": "4237571439620831" }, "recipient": { "id": "104610528288640" }, "timestamp": 1646647205156, "message": { "mid": "m_J-gcviaJSGp427f7jzL2PBygi_iiuvCXf2eCu2qb-kr9onZGEYfSoC7TctL84humv0mbtH7GsQ0vmELAGS74Ew", "text": "hi", "nlp": { "intents": [], "entities": { "wit$location:location": [{ "id": "624173841772436", "name": "wit$location", "role": "location", "start": 0, "end": 2, "body": "hi", "confidence": 0.3146, "entities": [], "suggested": True, "value": "hi", "type": "value" }] }, "traits": { "wit$sentiment": [{ "id": "5ac2b50a-44e4-466e-9d49-bad6bd40092c", "value": "positive", "confidence": 0.7336 }], "wit$greetings": [{ "id": "5900cc2d-41b7-45b2-b21f-b950d3ae3c5c", "value": "true", "confidence": 0.9999 }] }, "detected_locales": [{ "locale": "mr_IN", "confidence": 0.7365 }] } } }] }] })) actual = response.body.decode("utf8") self.assertEqual(response.code, 422) assert actual == '{"data": null, "success": false, "error_code": 401, "message": "Could not validate credentials"}' def test_instagram_invalid_auth(self): patch.dict(Utility.environment['action'], {"url": None}) response = self.fetch( f"/api/bot/instagram/{bot}/123", headers={"X-Hub-Signature": "invalid"}, method="POST", body=json.dumps({ "object": "page", "entry": [{ "id": "104610528288640", "time": 1646648478575, "messaging": [{ "sender": { "id": "4237571439620831" }, "recipient": { "id": "104610528288640" }, "timestamp": 1646647205156, "message": { "mid": "m_J-gcviaJSGp427f7jzL2PBygi_iiuvCXf2eCu2qb-kr9onZGEYfSoC7TctL84humv0mbtH7GsQ0vmELAGS74Ew", "text": "hi", "nlp": { "intents": [], "entities": { "wit$location:location": [{ "id": "624173841772436", "name": "wit$location", "role": "location", "start": 0, "end": 2, "body": "hi", "confidence": 0.3146, "entities": [], "suggested": True, "value": "hi", "type": "value" }] }, "traits": { "wit$sentiment": [{ "id": "5ac2b50a-44e4-466e-9d49-bad6bd40092c", "value": "positive", "confidence": 0.7336 }], "wit$greetings": [{ "id": "5900cc2d-41b7-45b2-b21f-b950d3ae3c5c", "value": "true", "confidence": 0.9999 }] }, "detected_locales": [{ "locale": "mr_IN", "confidence": 0.7365 }] } } }] }] })) actual = response.body.decode("utf8") self.assertEqual(response.code, 422) assert actual == '{"data": null, "success": false, "error_code": 401, "message": "Could not validate credentials"}' @staticmethod def add_live_agent_config(bot_id, email): config = { "agent_type": "chatwoot", "config": {"account_id": "12", "api_access_token": "asdfghjklty67"}, "override_bot": False, "trigger_on_intents": ["nlu_fallback"], "trigger_on_actions": ["action_default_fallback"] } responses.reset() responses.start() responses.add( "GET", f"https://app.chatwoot.com/public/api/v1/accounts/{config['config']['account_id']}/inboxes", json={"payload": []} ) responses.add( "POST", f"https://app.chatwoot.com/public/api/v1/accounts/{config['config']['account_id']}/inboxes", json={"inbox_identifier": "tSaxZWrxyFowmFHzWwhMwi5y"} ) LiveAgentsProcessor.save_config(config, bot_id, email) responses.stop() def test_chat_with_chatwoot_agent_fallback(self): self.add_live_agent_config(bot, user["email"]) responses.reset() responses.start() responses.add( "POST", 'https://app.chatwoot.com/public/api/v1/inboxes/tSaxZWrxyFowmFHzWwhMwi5y/contacts', json={ "source_id": "09c15b5f-c4a4-4d15-ba45-ce99bc7b1e71", "pubsub_token": "M31nmFCfo2wc5FonU3qGjonB", "id": 16951464, "name": 'test@chat.com', "email": None } ) responses.add( "POST", 'https://app.chatwoot.com/public/api/v1/inboxes/tSaxZWrxyFowmFHzWwhMwi5y/contacts/09c15b5f-c4a4-4d15-ba45-ce99bc7b1e71/conversations', json={ "id": 2, "inbox_id": 14036, "contact_last_seen_at": 0, "status": "open", "agent_last_seen_at": 0, "messages": [], "contact": { "id": 16951464, "name": "test@chat.com", "email": None, "phone_number": None, "account_id": 69469, "created_at": "2022-05-04T15:40:58.190Z", "updated_at": "2022-05-04T15:40:58.190Z", "additional_attributes": {}, "identifier": None, "custom_attributes": {}, "last_activity_at": None, "label_list": [] } } ) responses.add( "POST", 'https://app.chatwoot.com/public/api/v1/accounts/12/conversations/2/messages', json={ "id": 7487848, "content": "hello", "inbox_id": 14036, "conversation_id": 2, "message_type": 0, "content_type": "text", "content_attributes": {}, "created_at": 1651679560, "private": False, "source_id": None, "sender": { "additional_attributes": {}, "custom_attributes": {}, "email": None, "id": 16951464, "identifier": None, "name": "test@chat.com", "phone_number": None, "thumbnail": "", "type": "contact" } } ) with patch.object(Utility, "get_local_mongo_store") as mocked: mocked.side_effect = self.empty_store patch.dict(Utility.environment['action'], {"url": None}) with patch.object(Agent, "handle_text") as mock_agent: mock_agent.side_effect = self.mock_agent_response response = self.fetch( f"/api/bot/{bot}/chat", method="POST", body=json.dumps({"data": "!@#$%^&*()"}).encode('utf-8'), headers={"Authorization": token_type + " " + token}, connect_timeout=0, request_timeout=0 ) responses.stop() actual = json.loads(response.body.decode("utf8")) self.assertEqual(response.code, 200) assert actual["success"] assert actual["error_code"] == 0 assert actual["data"] assert Utility.check_empty_string(actual["message"]) assert isinstance(actual["data"]["nlu"], dict) assert actual["data"]["nlu"]["intent"] assert actual["data"]["nlu"]["entities"] == [] assert actual["data"]["nlu"]["intent_ranking"] assert actual["data"]["nlu"]["response_selector"] assert actual["data"]["nlu"]["slots"] assert isinstance(actual["data"]["action"], list) assert actual["data"]["response"] assert actual["data"]["agent_handoff"] == {'initiate': True, 'type': 'chatwoot', 'additional_properties': { 'destination': 2, 'pubsub_token': 'M31nmFCfo2wc5FonU3qGjonB' }} assert len(EndUserMetricsProcessor.get_logs(bot)) == 1 def test_chat_with_chatwoot_agent_fallback_existing_contact(self): with patch.object(Utility, "get_local_mongo_store") as mocked: mocked.side_effect = self.empty_store patch.dict(Utility.environment['action'], {"url": None}) with patch.object(KaironAgent, "handle_text") as mock_agent: mock_agent.side_effect = self.mock_agent_response responses.reset() responses.start() responses.add( "POST", 'https://app.chatwoot.com/public/api/v1/inboxes/tSaxZWrxyFowmFHzWwhMwi5y/contacts/09c15b5f-c4a4-4d15-ba45-ce99bc7b1e71/conversations', json={ "id": 3, "inbox_id": 14036, "contact_last_seen_at": 0, "status": "open", "agent_last_seen_at": 0, "messages": [], "contact": { "id": 16951464, "name": "test@chat.com", "email": None, "phone_number": None, "account_id": 69469, "created_at": "2022-05-04T15:40:58.190Z", "updated_at": "2022-05-04T15:40:58.190Z", "additional_attributes": {}, "identifier": None, "custom_attributes": {}, "last_activity_at": None, "label_list": [] } } ) responses.add( "POST", 'https://app.chatwoot.com/public/api/v1/accounts/12/conversations/3/messages', json={ "id": 7487848, "content": "who can i contact?", "inbox_id": 14036, "conversation_id": 3, "message_type": 0, "content_type": "text", "content_attributes": {}, "created_at": 1651679560, "private": False, "source_id": None, "sender": { "additional_attributes": {}, "custom_attributes": {}, "email": None, "id": 16951464, "identifier": None, "name": "test@chat.com", "phone_number": None, "thumbnail": "", "type": "contact" } } ) response = self.fetch( f"/api/bot/{bot}/chat", method="POST", body=json.dumps({"data": "@#$%^&*()_"}).encode('utf-8'), headers={"Authorization": token_type + " " + token}, connect_timeout=0, request_timeout=0 ) responses.stop() actual = json.loads(response.body.decode("utf8")) self.assertEqual(response.code, 200) assert actual["success"] assert actual["error_code"] == 0 assert actual["data"] assert Utility.check_empty_string(actual["message"]) assert isinstance(actual["data"]["nlu"], dict) assert actual["data"]["nlu"]["intent"] assert actual["data"]["nlu"]["entities"] == [] assert actual["data"]["nlu"]["intent_ranking"] assert actual["data"]["nlu"]["response_selector"] assert actual["data"]["nlu"]["slots"] assert isinstance(actual["data"]["action"], list) assert actual["data"]["response"] assert actual["data"]["agent_handoff"] == {'initiate': True, 'type': 'chatwoot', 'additional_properties': { 'destination': 3, 'pubsub_token': 'M31nmFCfo2wc5FonU3qGjonB' }} assert len(EndUserMetricsProcessor.get_logs(bot)) == 2 def test_chat_with_live_agent(self): responses.reset() responses.start() responses.add( "POST", 'https://app.chatwoot.com/public/api/v1/accounts/12/conversations/2/messages', json={ "id": 7487848, "content": "hello, please resolve my ticket", "inbox_id": 14036, "conversation_id": 2, "message_type": 0, "content_type": "text", "content_attributes": {}, "created_at": 1651679560, "private": False, "source_id": None, "sender": { "additional_attributes": {}, "custom_attributes": {}, "email": None, "id": 16951464, "identifier": None, "name": "test@chat.com", "phone_number": None, "thumbnail": "", "type": "contact" } } ) response = self.fetch( f"/api/bot/{bot}/agent/live/2", method="POST", body=json.dumps({"data": "hello, please resolve my ticket"}).encode('utf-8'), headers={"Authorization": token_type + " " + token}, connect_timeout=0, request_timeout=0 ) actual = json.loads(response.body.decode("utf8")) self.assertEqual(response.code, 200) assert actual["success"] assert actual["error_code"] == 0 assert actual["data"] assert Utility.check_empty_string(actual["message"]) responses.stop() def test_chat_with_live_agent_failed_to_send_message(self): responses.reset() responses.start() responses.add( "POST", 'https://app.chatwoot.com/public/api/v1/accounts/12/conversations/2/messages', status=503, body="Temporarily unable to handle a request" ) response = self.fetch( f"/api/bot/{bot}/agent/live/2", method="POST", body=json.dumps({"data": "need help"}).encode('utf-8'), headers={"Authorization": token_type + " " + token}, connect_timeout=0, request_timeout=0 ) actual = json.loads(response.body.decode("utf8")) self.assertEqual(response.code, 200) assert not actual["success"] assert actual["error_code"] == 422 assert actual["data"] is None assert actual["message"] == "Failed to send message: Service Unavailable" responses.stop() def test_chat_with_live_agent_with_integration_token(self): access_token = Authentication.generate_integration_token( bot, "test@chat.com", expiry=5, access_limit=['/api/bot/.+/agent/live/.+'], name="integration token for live agent chat" ) responses.reset() responses.start() responses.add( "POST", 'https://app.chatwoot.com/public/api/v1/accounts/12/conversations/2/messages', json={ "id": 7487848, "content": "need help", "inbox_id": 14036, "conversation_id": 2, "message_type": 0, "content_type": "text", "content_attributes": {}, "created_at": 1651679560, "private": False, "source_id": None, "sender": { "additional_attributes": {}, "custom_attributes": {}, "email": None, "id": 16951464, "identifier": None, "name": "test@chat.com", "phone_number": None, "thumbnail": "", "type": "contact" } } ) response = self.fetch( f"/api/bot/{bot}/agent/live/2", method="POST", body=json.dumps({"data": "need help"}).encode('utf-8'), headers={"Authorization": token_type + " " + access_token, "X-USER": "test@chat.com"}, connect_timeout=0, request_timeout=0 ) actual = json.loads(response.body.decode("utf8")) self.assertEqual(response.code, 200) assert actual["success"] assert actual["error_code"] == 0 assert actual["data"] assert Utility.check_empty_string(actual["message"]) responses.stop() def test_chat_with_chatwoot_agent_fallback_failed_to_initiate(self): with patch.object(Utility, "get_local_mongo_store") as mocked: mocked.side_effect = self.empty_store patch.dict(Utility.environment['action'], {"url": None}) with patch.object(KaironAgent, "handle_text") as mock_agent: mock_agent.side_effect = self.mock_agent_response responses.reset() responses.start() responses.add( "POST", 'https://app.chatwoot.com/public/api/v1/inboxes/tSaxZWrxyFowmFHzWwhMwi5y/contacts/09c15b5f-c4a4-4d15-ba45-ce99bc7b1e71/conversations', status=503, body="Temporarily unable to handle a request" ) response = self.fetch( f"/api/bot/{bot}/chat", method="POST", body=json.dumps({"data": "!@#$%^&*()"}).encode('utf-8'), headers={"Authorization": token_type + " " + token}, connect_timeout=0, request_timeout=0 ) actual = json.loads(response.body.decode("utf8")) self.assertEqual(response.code, 200) assert actual["success"] assert actual["error_code"] == 0 assert actual["data"] assert Utility.check_empty_string(actual["message"]) assert isinstance(actual["data"]["nlu"], dict) assert actual["data"]["nlu"]["intent"] assert actual["data"]["nlu"]["entities"] == [] assert actual["data"]["nlu"]["intent_ranking"] assert actual["data"]["nlu"]["response_selector"] assert actual["data"]["nlu"]["slots"] assert isinstance(actual["data"]["action"], list) assert actual["data"]["response"] assert actual["data"]["agent_handoff"] == {'initiate': False, 'type': 'chatwoot', 'additional_properties': None} responses.reset() responses.stop() logs = EndUserMetricsProcessor.get_logs(bot) assert len(logs) == 3 assert logs[0]['exception'] == 'Failed to create conversation: Service Unavailable'
49.052683
650
0.484536
4,284
50,279
5.547386
0.133053
0.039386
0.027604
0.02592
0.756575
0.74332
0.727919
0.717442
0.709825
0.692363
0
0.054938
0.383102
50,279
1,024
651
49.100586
0.711255
0
0
0.687885
0
0.016427
0.280455
0.074624
0
0
0
0
0.159138
1
0.032854
false
0.002053
0.021561
0.004107
0.059548
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
4f3bdaec5edcf181ecf1333b8ebb1accd06a94cf
170
py
Python
mobie/htm/__init__.py
platybrowser/mobie-python
43341cd92742016a3a0d602325bb93b94c3b4c36
[ "MIT" ]
null
null
null
mobie/htm/__init__.py
platybrowser/mobie-python
43341cd92742016a3a0d602325bb93b94c3b4c36
[ "MIT" ]
1
2020-02-28T20:43:33.000Z
2020-02-28T20:43:33.000Z
mobie/htm/__init__.py
platybrowser/mobie-python
43341cd92742016a3a0d602325bb93b94c3b4c36
[ "MIT" ]
null
null
null
from .data_import import add_images, add_segmentations from .grid_views import add_plate_grid_view, get_merged_plate_grid_view from .utils import compute_contrast_limits
42.5
71
0.888235
27
170
5.111111
0.592593
0.130435
0.188406
0
0
0
0
0
0
0
0
0
0.082353
170
3
72
56.666667
0.884615
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
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
4f5d283b7fa2f671004975bd05690f8c82e7e2ae
61
py
Python
katas/kyu_7/first_class_function_factory.py
the-zebulan/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
40
2016-03-09T12:26:20.000Z
2022-03-23T08:44:51.000Z
katas/kyu_7/first_class_function_factory.py
akalynych/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
null
null
null
katas/kyu_7/first_class_function_factory.py
akalynych/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
36
2016-11-07T19:59:58.000Z
2022-03-31T11:18:27.000Z
def factory(x): return lambda b: map(lambda a: a * x, b)
20.333333
44
0.606557
12
61
3.083333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.245902
61
2
45
30.5
0.804348
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
4f7d71bfc1b372db4b579e9eeff92a4baf48edc9
90
py
Python
ratings/admin.py
AleenaShibu/movie_review
94342fa87d1f71ae519bf40f160274f972657df8
[ "MIT" ]
null
null
null
ratings/admin.py
AleenaShibu/movie_review
94342fa87d1f71ae519bf40f160274f972657df8
[ "MIT" ]
6
2020-06-05T23:37:42.000Z
2021-06-09T18:37:27.000Z
ratings/admin.py
AleenaShibu/movie_review
94342fa87d1f71ae519bf40f160274f972657df8
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Ratings admin.site.register(Ratings)
30
32
0.833333
13
90
5.769231
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.1
90
3
33
30
0.925926
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
4fa9711c2a11aa2fa4fcb27cbfbf75c4811abca4
41
py
Python
judger/test-code/A+B(DSG).py
ShadowIterator/2018SE_THSSOJ
5bc9a1dc9d7d65c3159c8c4727db3b904e0efa6a
[ "MIT" ]
null
null
null
judger/test-code/A+B(DSG).py
ShadowIterator/2018SE_THSSOJ
5bc9a1dc9d7d65c3159c8c4727db3b904e0efa6a
[ "MIT" ]
1
2019-01-17T08:59:56.000Z
2019-01-18T09:18:36.000Z
judger/test-code/A+B(DSG).py
ShadowIterator/2018SE_THSSOJ
5bc9a1dc9d7d65c3159c8c4727db3b904e0efa6a
[ "MIT" ]
null
null
null
import os os.system("shutdown -s -t 1 ")
20.5
31
0.658537
8
41
3.375
0.875
0
0
0
0
0
0
0
0
0
0
0.029412
0.170732
41
2
31
20.5
0.764706
0
0
0
0
0
0.428571
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
4faed31fce97625907ea01a06ee972d9d45ce52d
106
py
Python
kinesisconsumer/__init__.py
adriangalera/dynamodb-timeseries
6ab72cc92c8bf2c8808959f2490f63e22e76e777
[ "MIT" ]
16
2019-08-17T06:40:36.000Z
2021-01-28T15:58:02.000Z
kinesisconsumer/__init__.py
adriangalera/dynamodb-timeseries
6ab72cc92c8bf2c8808959f2490f63e22e76e777
[ "MIT" ]
4
2021-03-10T03:50:17.000Z
2022-02-18T18:17:41.000Z
kinesisconsumer/__init__.py
adriangalera/dynamodb-timeseries
6ab72cc92c8bf2c8808959f2490f63e22e76e777
[ "MIT" ]
1
2019-11-27T15:40:53.000Z
2019-11-27T15:40:53.000Z
"""This module is the one that consumes messages from the Kinesis stream and inserts into the DynamoDB"""
53
105
0.783019
17
106
4.882353
0.882353
0
0
0
0
0
0
0
0
0
0
0
0.160377
106
1
106
106
0.932584
0.933962
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
8c1f3d9088c53b54803065dc68783565d4d059e8
52
py
Python
src/identity_number_validator/countries/__init__.py
DavidArmendariz/identity-number-validator-python
f79b53c1511db155c8babc580c0c7542e88731be
[ "MIT" ]
null
null
null
src/identity_number_validator/countries/__init__.py
DavidArmendariz/identity-number-validator-python
f79b53c1511db155c8babc580c0c7542e88731be
[ "MIT" ]
null
null
null
src/identity_number_validator/countries/__init__.py
DavidArmendariz/identity-number-validator-python
f79b53c1511db155c8babc580c0c7542e88731be
[ "MIT" ]
null
null
null
from .ecuador import ecuadorian_identifier_validator
52
52
0.923077
6
52
7.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.057692
52
1
52
52
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
8c6008dc9c4d7929524eaee5773e1b9e0f7e3628
217
py
Python
app/admin.py
kennedybabu/my-hood
cd5b2f45385f41ece77b5786429f20b758a86703
[ "Unlicense" ]
null
null
null
app/admin.py
kennedybabu/my-hood
cd5b2f45385f41ece77b5786429f20b758a86703
[ "Unlicense" ]
null
null
null
app/admin.py
kennedybabu/my-hood
cd5b2f45385f41ece77b5786429f20b758a86703
[ "Unlicense" ]
null
null
null
from django.contrib import admin from .models import Hood, Location,Post, User # Register your models here. admin.site.register(User) admin.site.register(Hood) admin.site.register(Location) admin.site.register(Post)
24.111111
45
0.801843
32
217
5.4375
0.4375
0.206897
0.390805
0
0
0
0
0
0
0
0
0
0.092166
217
8
46
27.125
0.883249
0.119816
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
8b3e87bf7873fdcad1569b317f89855e9ad95d27
125
py
Python
empleados/admin.py
amgdark/SAM
e1a3a6a9cdced6c0496d9ef8480b43981272a0ea
[ "MIT" ]
null
null
null
empleados/admin.py
amgdark/SAM
e1a3a6a9cdced6c0496d9ef8480b43981272a0ea
[ "MIT" ]
null
null
null
empleados/admin.py
amgdark/SAM
e1a3a6a9cdced6c0496d9ef8480b43981272a0ea
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Area, Empleado admin.site.register(Area) admin.site.register(Empleado)
20.833333
34
0.816
18
125
5.666667
0.555556
0.176471
0.333333
0
0
0
0
0
0
0
0
0
0.096
125
6
35
20.833333
0.902655
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
8c73f8fa58d5c32b80b030549ab36a3eb2b0ae52
143
py
Python
installer.py
GTortorelli/BotClicker
1eb14729f2bb03384595097b9010bc5b06572082
[ "MIT" ]
1
2020-10-19T17:38:44.000Z
2020-10-19T17:38:44.000Z
installer.py
GTortorelli/BotClicker
1eb14729f2bb03384595097b9010bc5b06572082
[ "MIT" ]
null
null
null
installer.py
GTortorelli/BotClicker
1eb14729f2bb03384595097b9010bc5b06572082
[ "MIT" ]
null
null
null
import os os.system('pip3 install pipenv') os.system('pipenv --python 3.8') os.system('pipenv install pyautogui') os.system('pipenv shell')
15.888889
37
0.727273
22
143
4.727273
0.5
0.307692
0.403846
0
0
0
0
0
0
0
0
0.023622
0.111888
143
9
38
15.888889
0.795276
0
0
0
0
0
0.513889
0
0
0
0
0
0
1
0
true
0
0.2
0
0.2
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
1
0
0
0
0
0
0
5
8c898bb817fd94a95000ab95939d1f4ae06491fa
156
py
Python
scenarios/event_show/executable.py
timgates42/balanced-python
1df86b45c36a97ec2e214480c6806c4df3c79860
[ "MIT" ]
12
2015-04-12T06:18:33.000Z
2021-03-03T23:54:19.000Z
scenarios/event_show/executable.py
takwas/balanced-python
1df86b45c36a97ec2e214480c6806c4df3c79860
[ "MIT" ]
1
2021-11-24T20:10:19.000Z
2021-11-24T20:10:19.000Z
scenarios/event_show/executable.py
takwas/balanced-python
1df86b45c36a97ec2e214480c6806c4df3c79860
[ "MIT" ]
14
2015-03-23T17:52:06.000Z
2021-11-24T11:04:15.000Z
import balanced balanced.configure('ak-test-2eKlj1ZDfAcZSARMf3NMhBHywDej0avSY') event = balanced.Event.fetch('/events/EVc7cbc12497ae11e48e4606debca797bb')
31.2
74
0.852564
13
156
10.230769
0.769231
0
0
0
0
0
0
0
0
0
0
0.14094
0.044872
156
5
74
31.2
0.751678
0
0
0
0
0
0.528662
0.528662
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
8cb14e177492d0c3dd626a7648620f755882301c
146
py
Python
Weather.py/api_keys.py
DanyCh093/Python-Api-Challenge
2432d065b81339874afc671d4caf1f79854824a9
[ "ADSL" ]
null
null
null
Weather.py/api_keys.py
DanyCh093/Python-Api-Challenge
2432d065b81339874afc671d4caf1f79854824a9
[ "ADSL" ]
null
null
null
Weather.py/api_keys.py
DanyCh093/Python-Api-Challenge
2432d065b81339874afc671d4caf1f79854824a9
[ "ADSL" ]
null
null
null
# OpenWeatherMap API Key weather_api_key = "632bef0b951137f086df74071753c3bf" # Google API Key g_key = "AIzaSyDgfZd6Dou_WWL5PMTmJMZC75_e1Bw7ndA"
24.333333
52
0.842466
15
146
7.866667
0.666667
0.152542
0
0
0
0
0
0
0
0
0
0.21374
0.10274
146
5
53
29.2
0.687023
0.253425
0
0
0
0
0.669811
0.669811
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
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
507cee55242a75d73032fb25d9bfcad914505b0a
179
py
Python
src/elchempy/indexer/__init__.py
MyPyDavid/ECpy
b74842b64eca86d2181067fdb22bfa8fa4b2c8bb
[ "MIT" ]
3
2022-01-04T09:06:15.000Z
2022-03-05T08:24:01.000Z
src/elchempy/indexer/__init__.py
MyPyDavid/ECpy
b74842b64eca86d2181067fdb22bfa8fa4b2c8bb
[ "MIT" ]
null
null
null
src/elchempy/indexer/__init__.py
MyPyDavid/ECpy
b74842b64eca86d2181067fdb22bfa8fa4b2c8bb
[ "MIT" ]
1
2022-03-05T12:17:49.000Z
2022-03-05T12:17:49.000Z
# from .. import FolderOps # from .RunEC_classifier import * # from .ExtraInfo import * # from prepare_input import * # import FileHelper # __all__ = (RunEC_classifier.__all__)
19.888889
38
0.743017
20
179
6.1
0.5
0.245902
0
0
0
0
0
0
0
0
0
0
0.162011
179
8
39
22.375
0.813333
0.916201
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
507df6ce6b60ab34dc118a7242be21d3d972f6d4
288
py
Python
20-fs-ias-lec/groups/05-loraLink/src/old/Feed_Sender_release3/Feed_Sender_1/lib/lora_test_sensor_layer.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
8
2020-03-17T21:12:18.000Z
2021-12-12T15:55:54.000Z
20-fs-ias-lec/groups/05-loraLink/src/old/Feed_Sender_release3/Feed_Sender_1/lib/lora_test_sensor_layer.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
2
2021-07-19T06:18:43.000Z
2022-02-10T12:17:58.000Z
20-fs-ias-lec/groups/05-loraLink/src/old/Feed_Sender_release3/Feed_Sender_1/lib/lora_test_sensor_layer.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
25
2020-03-20T09:32:45.000Z
2021-07-18T18:12:59.000Z
from lora_feed_layer import Lora_Feed_Layer class Lora_Test_Sensor_Layer: def __init__(self, feed_layer): self.feed_layer = feed_layer self.feed_layer.subscribe(self.callback_new_events, 1) def callback_new_events(self, wired): print(wired)
24
63
0.708333
40
288
4.625
0.45
0.291892
0.210811
0.183784
0.237838
0
0
0
0
0
0
0.004484
0.225694
288
11
64
26.181818
0.825112
0
0
0
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0.142857
0
0.571429
0.142857
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
5
50c262526920c72d2f9e80dc9951dff10594a041
64
py
Python
verygoodpackage/subpackage_a/__init__.py
BiAPoL/example-repo-sphinx
a3fac607f47f1e68adb35f5409e8477824114224
[ "BSD-3-Clause" ]
null
null
null
verygoodpackage/subpackage_a/__init__.py
BiAPoL/example-repo-sphinx
a3fac607f47f1e68adb35f5409e8477824114224
[ "BSD-3-Clause" ]
null
null
null
verygoodpackage/subpackage_a/__init__.py
BiAPoL/example-repo-sphinx
a3fac607f47f1e68adb35f5409e8477824114224
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from ._operations import add, subtract
16
38
0.65625
8
64
5.125
1
0
0
0
0
0
0
0
0
0
0
0.018868
0.171875
64
3
39
21.333333
0.754717
0.328125
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
50ca80f40b0379fab1082666702038dcb608ce39
3,499
py
Python
app/models.py
beedev-services/portfolio
8e27b89a3b4c9d79307fb2ef0ebcb83c88cb0a6e
[ "MIT" ]
null
null
null
app/models.py
beedev-services/portfolio
8e27b89a3b4c9d79307fb2ef0ebcb83c88cb0a6e
[ "MIT" ]
null
null
null
app/models.py
beedev-services/portfolio
8e27b89a3b4c9d79307fb2ef0ebcb83c88cb0a6e
[ "MIT" ]
null
null
null
from django.db import models STATUS = [ {"id": 0, "status": "Current"}, {"id": 1, "status": "Past"} ] TYPE = [ {"id": 0, "type": "Front End"}, {"id": 1, "type": "Back End"}, {"id": 2, "type": "Full Stack"}, {"id": 3, "type": "Organization"} ] UPDATETYPE = [ {"id": 0, "updateType": "Current"}, {"id": 1, "updateType": "Past"}, {"id": 2, "updateType": "Full Stack"}, {"id": 3, "updateType": "Resume"}, {"id": 4, "updateType": "Contact"}, {"id": 5, "updateType": "Organization"}, {"id": 6, "updateType": "Front End"}, {"id": 7, "updateType": "Back End"} ] class UserManager(models.Manager): def validate(self, form): errors = {} usernameCheck = self.filter(username=form['username']) if usernameCheck: errors['username'] ='Sorry that username has been taken please chose a different one' if len(form['password']) < 5: errors['password'] = 'Password must be at least 5 characters long' if form['password'] != form['confirm']: errors['password'] = 'Password do not match' return errors class User(models.Model): username = models.CharField(max_length=45) password = models.CharField(max_length=45) objects = UserManager() class Contact(models.Model): email = models.CharField(max_length=100) linkedIn = models.CharField(max_length=255) github = models.CharField(max_length=255) class CurrentProject(models.Model): currName = models.CharField(max_length=255) currDesc = models.CharField(max_length=255) currImg = models.CharField(max_length=255) currSource = models.CharField(max_length=255, blank=True) currLink = models.CharField(max_length=255, blank=True) cOrder = models.IntegerField() class PastProject(models.Model): pastName = models.CharField(max_length=255) pastDesc = models.CharField(max_length=255) pastImg = models.CharField(max_length=255) pastSource = models.CharField(max_length=255, blank=True) pastLink = models.CharField(max_length=255, blank=True) pOrder = models.IntegerField() class Skill(models.Model): skillName = models.CharField(max_length=50, unique=True) class Work(models.Model): position = models.CharField(max_length=255) company = models.CharField(max_length=255) dates = models.CharField(max_length=255) jobDesc01 = models.CharField(max_length=100) jobDesc02 = models.CharField(max_length=100, blank=True) jobDesc03 = models.CharField(max_length=100, blank=True) jobDesc04 = models.CharField(max_length=100, blank=True) wOrder = models.IntegerField() class Education(models.Model): school = models.CharField(max_length=255) gradDate = models.CharField(max_length=50) course = models.CharField(max_length=255) eOrder = models.IntegerField() class Updated(models.Model): whyUpdate = models.CharField(max_length=255) updateType = models.IntegerField(choices=UPDATETYPE, default=0) updatedAt = models.DateField(auto_now=True) class AllProjects(models.Model): projName = models.CharField(max_length=255) projDesc = models.CharField(max_length=255, blank=True) projSource = models.CharField(max_length=255, blank=True) projLink = models.CharField(max_length=255, blank=True) projOrg = models.CharField(max_length=255, blank=True) theType = models.IntegerField(choices=TYPE, default=0) theStatus = models.IntegerField(choices=STATUS, default=0)
35.343434
97
0.68048
421
3,499
5.577197
0.296912
0.204429
0.245315
0.327087
0.408433
0.168654
0.168654
0
0
0
0
0.041291
0.176336
3,499
98
98
35.704082
0.773421
0
0
0
0
0
0.123178
0
0
0
0
0
0
1
0.012195
false
0.060976
0.012195
0
0.658537
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
0fa502696ed971392528b05226f9611f81e7c150
49
py
Python
_/0349_04_Code/02.py
paullewallencom/javascript-978-1-8495-1034-9
7e539d042c644931a9ef2418f66d260a1c6892eb
[ "Apache-2.0" ]
null
null
null
_/0349_04_Code/02.py
paullewallencom/javascript-978-1-8495-1034-9
7e539d042c644931a9ef2418f66d260a1c6892eb
[ "Apache-2.0" ]
null
null
null
_/0349_04_Code/02.py
paullewallencom/javascript-978-1-8495-1034-9
7e539d042c644931a9ef2418f66d260a1c6892eb
[ "Apache-2.0" ]
null
null
null
class ExtensionField(models.TextField): pass
16.333333
39
0.77551
5
49
7.6
1
0
0
0
0
0
0
0
0
0
0
0
0.142857
49
2
40
24.5
0.904762
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
0fc5d1595f747c6a3ae9f9d6eea17809a0ed242e
245
py
Python
test/static_analysis/descriptors.py
rosslannen/jedi
b8d2757cdbe8ece6778031d0536a759b3273d15e
[ "MIT" ]
4,213
2015-01-02T15:43:22.000Z
2022-03-31T16:15:01.000Z
test/static_analysis/descriptors.py
rosslannen/jedi
b8d2757cdbe8ece6778031d0536a759b3273d15e
[ "MIT" ]
1,392
2015-01-02T18:43:39.000Z
2022-03-27T18:43:59.000Z
test/static_analysis/descriptors.py
PeterJCLaw/jedi
070f191f550990c23220d7f209df076178307cf6
[ "MIT" ]
525
2015-01-02T19:07:31.000Z
2022-03-13T02:03:20.000Z
# classmethod class TarFile(): @classmethod def open(cls, name, **kwargs): return cls.taropen(name, **kwargs) @classmethod def taropen(cls, name, **kwargs): return name # should just work TarFile.open('hallo')
17.5
42
0.628571
28
245
5.5
0.5
0.194805
0.168831
0.246753
0
0
0
0
0
0
0
0
0.240816
245
13
43
18.846154
0.827957
0.114286
0
0.25
0
0
0.023364
0
0
0
0
0
0
1
0.25
false
0
0
0.25
0.625
0
1
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
e84072b621bb463008aa22accff806ea24c6a526
41
py
Python
src/compas/data/exceptions.py
funkchaser/compas
b58de8771484aa0c6068d43df78b1679503215de
[ "MIT" ]
235
2017-11-07T07:33:22.000Z
2022-03-25T16:20:00.000Z
src/compas/data/exceptions.py
funkchaser/compas
b58de8771484aa0c6068d43df78b1679503215de
[ "MIT" ]
770
2017-09-22T13:42:06.000Z
2022-03-31T21:26:45.000Z
src/compas/data/exceptions.py
funkchaser/compas
b58de8771484aa0c6068d43df78b1679503215de
[ "MIT" ]
99
2017-11-06T23:15:28.000Z
2022-03-25T16:05:36.000Z
class DecoderError(Exception): pass
10.25
30
0.731707
4
41
7.5
1
0
0
0
0
0
0
0
0
0
0
0
0.195122
41
3
31
13.666667
0.909091
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
e84a835dc13c0405fa1fa7e65fc743abf751e58f
1,172
py
Python
tests/hierarchies/test_type_validation.py
tavaresrodrigo/kopf
97e1c7a926705a79dabce2931e96a924252b61df
[ "MIT" ]
855
2020-08-19T09:40:38.000Z
2022-03-31T19:13:29.000Z
tests/hierarchies/test_type_validation.py
tavaresrodrigo/kopf
97e1c7a926705a79dabce2931e96a924252b61df
[ "MIT" ]
715
2019-12-23T14:17:35.000Z
2022-03-30T20:54:45.000Z
tests/hierarchies/test_type_validation.py
tavaresrodrigo/kopf
97e1c7a926705a79dabce2931e96a924252b61df
[ "MIT" ]
97
2019-04-25T09:32:54.000Z
2022-03-30T10:15:30.000Z
import pytest import kopf from kopf._cogs.structs.bodies import Body def test_in_owner_reference_appending(): with pytest.raises(TypeError) as e: kopf.append_owner_reference(object(), Body({})) assert "K8s object class is not supported" in str(e.value) def test_in_owner_reference_removal(): with pytest.raises(TypeError) as e: kopf.remove_owner_reference(object(), Body({})) assert "K8s object class is not supported" in str(e.value) def test_in_name_harmonization(): with pytest.raises(TypeError) as e: kopf.harmonize_naming(object(), 'x') assert "K8s object class is not supported" in str(e.value) def test_in_namepace_adjustment(): with pytest.raises(TypeError) as e: kopf.adjust_namespace(object(), 'x') assert "K8s object class is not supported" in str(e.value) def test_in_labelling(): with pytest.raises(TypeError) as e: kopf.label(object(), {}) assert "K8s object class is not supported" in str(e.value) def test_in_adopting(): with pytest.raises(TypeError) as e: kopf.adopt(object(), Body({})) assert "K8s object class is not supported" in str(e.value)
28.585366
62
0.703072
172
1,172
4.645349
0.255814
0.052566
0.067584
0.187735
0.770964
0.724656
0.724656
0.484355
0.484355
0.484355
0
0.006296
0.18686
1,172
40
63
29.3
0.832109
0
0
0.444444
0
0
0.170648
0
0
0
0
0
0.222222
1
0.222222
true
0
0.111111
0
0.333333
0
0
0
0
null
0
0
1
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
0
0
0
5
e84b4eeaee825403c0604bb494dc71ab75b667c3
53
py
Python
www/speed/benchmarks/create_function_single_pos_arg.py
raspberrypieman/brython
2cc23d1da6acda604d4a56b4c9d464eb7e374eda
[ "BSD-3-Clause" ]
5,926
2015-01-01T07:45:08.000Z
2022-03-31T12:34:38.000Z
www/speed/benchmarks/create_function_single_pos_arg.py
raspberrypieman/brython
2cc23d1da6acda604d4a56b4c9d464eb7e374eda
[ "BSD-3-Clause" ]
1,728
2015-01-01T01:09:12.000Z
2022-03-30T23:25:22.000Z
www/speed/benchmarks/create_function_single_pos_arg.py
raspberrypieman/brython
2cc23d1da6acda604d4a56b4c9d464eb7e374eda
[ "BSD-3-Clause" ]
574
2015-01-02T01:36:10.000Z
2022-03-26T10:18:48.000Z
for i in range(1000000): def f(x): pass
10.6
24
0.509434
9
53
3
1
0
0
0
0
0
0
0
0
0
0
0.212121
0.377358
53
4
25
13.25
0.606061
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0.333333
0
0
0.333333
0
1
0
0
null
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
1
0
1
0
0
0
0
0
5
e86fcdd601baefa97f77e588ca123193aff8c763
25,325
py
Python
axolotl/algorithms/tuners/custom_hps.py
tods-doc/axolotl
6fc87bedb514677db09c039d492d1d3c7864913d
[ "Apache-2.0" ]
null
null
null
axolotl/algorithms/tuners/custom_hps.py
tods-doc/axolotl
6fc87bedb514677db09c039d492d1d3c7864913d
[ "Apache-2.0" ]
null
null
null
axolotl/algorithms/tuners/custom_hps.py
tods-doc/axolotl
6fc87bedb514677db09c039d492d1d3c7864913d
[ "Apache-2.0" ]
null
null
null
import sys from collections import OrderedDict from d3m.metadata import hyperparams epsilon = sys.float_info.epsilon clf_xgboost_config = dict( n_estimators=hyperparams.UniformInt( lower=10, upper=50, default=20, description='The number of trees in the forest.', semantic_types=[ 'https://metadata.datadrivendiscovery.org/types/TuningParameter', 'https://metadata.datadrivendiscovery.org/types/ResourcesUseParameter', ], ), n_more_estimators=hyperparams.UniformInt( lower=10, upper=50, default=20, description='When continuing a fit, it controls how many more trees to add every time.', semantic_types=[ 'https://metadata.datadrivendiscovery.org/types/TuningParameter', 'https://metadata.datadrivendiscovery.org/types/ResourcesUseParameter', ], ), max_depth=hyperparams.UniformInt( lower=5, upper=50, default=30, lower_inclusive=True, upper_inclusive=True, description='The maximum depth of the tree.', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), learning_rate=hyperparams.LogUniform( lower=1e-4, upper=1e-1, default=0.05, lower_inclusive=True, upper_inclusive=True, description=r'Boosting learning rate (xgb\`s \"eta\")', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), gamma=hyperparams.Constant[float]( default=0.0, description='Minimum loss reduction required to make a further partition on a leaf node of the tree', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), min_child_weight = hyperparams.Constant[int]( default=1, description='Minimum sum of instance weight (hessian) needed in a child. If the tree partition step results ' 'in a leaf node with the sum of instance weight less than min_child_weight, then the building ' 'process will give up further partitioning ', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), # max_delta_step = hyperparams.Union[Union[int, None]]( # configuration=OrderedDict( # limit=hyperparams.Bounded[int]( # lower=1, # upper=None, # default=1, # description='Maximum delta step we allow each leaf output to be.' # ), # unlimited=hyperparams.Enumeration[int]( # values=[0], # default=0, # description='No constraint.', # ), # ), # default='unlimited', # description='Maximum delta step we allow.', # semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], # ), subsample=hyperparams.Constant[float]( default=1.0, description='Subsample ratio of the training instances,this will prevent overfitting. Subsampling will occur ' 'once in every boosting iteration.', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), colsample_bytree=hyperparams.Constant[float]( default=1.0, description='Subsample ratio of columns when constructing each tree. Subsampling will occur once in every ' 'boosting iteration', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), colsample_bylevel=hyperparams.Constant[float]( default=1.0, description='Subsample ratio of columns for each split, in each level. Subsampling will occur each time a new ' 'split is made', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), reg_alpha=hyperparams.Uniform( lower=0.1, upper=1.0, default=0.5, lower_inclusive=True, upper_inclusive=True, description='L1 regularization term on weights. Increasing this value will make model more conservative.', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), reg_lambda=hyperparams.Uniform( lower=0.1, upper=1.0, default=0.5, lower_inclusive=True, upper_inclusive=True, description='L2 regularization term on weights. Increasing this value will make model more conservative.', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), # scale_pos_weight = hyperparams.Bounded[float]( # lower=0, # upper=None, # default=1, # description='Control the balance of positive and negative weights, useful for unbalanced classes', # semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], # ), base_score=hyperparams.Bounded[float]( lower=0, upper=None, default=0.5, description='The initial prediction score of all instances, global bias.', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), ) dfs_single_tab_config = dict( max_percent_null=hyperparams.Uniform( lower=0, upper=1, default=0.9, lower_inclusive=True, upper_inclusive=True, description='The maximum allowed correlation between any two features returned. A lower value means features will be more uncorrelated', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ) ) lgbm_clf_config = dict( n_estimators=hyperparams.UniformInt( lower=10, upper=50, default=20, description='The number of trees in the forest.', semantic_types=[ 'https://metadata.datadrivendiscovery.org/types/TuningParameter', 'https://metadata.datadrivendiscovery.org/types/ResourcesUseParameter', ], ), n_more_estimators=hyperparams.UniformInt( lower=10, upper=50, default=20, description='When continuing a fit, it controls how many more trees to add every time.', semantic_types=[ 'https://metadata.datadrivendiscovery.org/types/TuningParameter', 'https://metadata.datadrivendiscovery.org/types/ResourcesUseParameter', ], ), max_depth=hyperparams.UniformInt( lower=5, upper=50, default=30, lower_inclusive=True, upper_inclusive=True, description='The maximum depth of the tree.', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), # num_leaves_base=hyperparams.Bounded[float]( # lower=1, # upper=2, # default=2, # description='Maximum tree leaves for base learners, this value is the base of the formula num_leaves_base^(max_depth)', # semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], # ), # subsample_for_bin=hyperparams.Bounded[int]( # lower=1, # upper=None, # default=200000, # description='number of data that sampled to construct histogram bins', # semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], # ), learning_rate=hyperparams.LogUniform( lower=1e-4, upper=1e-1, default=0.05, lower_inclusive=True, upper_inclusive=True, description=r'Boosting learning rate (xgb\`s \"eta\")', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), min_child_weight = hyperparams.Constant[int]( default=1, description='Minimum sum of instance weight (hessian) needed in a child. If the tree partition step results ' 'in a leaf node with the sum of instance weight less than min_child_weight, then the building ' 'process will give up further partitioning ', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), # min_child_samples=hyperparams.Bounded[int]( # lower=0, # upper=None, # default=20, # description='minimal number of data in one leaf. Can be used to deal with over-fitting', # semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], # ), # max_delta_step = hyperparams.Union[Union[int, None]]( # configuration=OrderedDict( # limit=hyperparams.Bounded[int]( # lower=1, # upper=None, # default=1, # description='Maximum delta step we allow each leaf output to be.' # ), # unlimited=hyperparams.Enumeration[int]( # values=[0], # default=0, # description='No constraint.', # ), # ), # default='unlimited', # description='Maximum delta step we allow.', # semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], # ), subsample=hyperparams.Constant[float]( default=1.0, description='Subsample ratio of the training instances,this will prevent overfitting. Subsampling will occur ' 'once in every boosting iteration.', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), subsample_freq=hyperparams.Bounded[int]( lower=0, upper=1, default=0, description='frequency for bagging', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), colsample_bytree=hyperparams.Constant[float]( default=1.0, description='Subsample ratio of columns when constructing each tree. Subsampling will occur once in every ' 'boosting iteration', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), min_split_gain=hyperparams.Bounded[float]( lower=0, upper=None, default=0, description='the minimal gain to perform split', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), reg_alpha=hyperparams.Uniform( lower=0.1, upper=1.0, default=0.5, lower_inclusive=True, upper_inclusive=True, description='L1 regularization term on weights. Increasing this value will make model more conservative.', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), reg_lambda=hyperparams.Uniform( lower=0.1, upper=1.0, default=0.5, lower_inclusive=True, upper_inclusive=True, description='L2 regularization term on weights. Increasing this value will make model more conservative.', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), ) sk_logistic_regression_config = dict( dual=hyperparams.Constant[bool]( default=False, description='Dual or primal formulation. Dual formulation is only implemented for l2 penalty with liblinear solver. Prefer dual=False when n_samples > n_features.', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'] ), penalty=hyperparams.Choice( choices={ 'l1': hyperparams.Hyperparams.define( configuration=OrderedDict({}) ), 'l2': hyperparams.Hyperparams.define( configuration=OrderedDict({}) ), 'none': hyperparams.Hyperparams.define( configuration=OrderedDict({}) ), 'elasticnet': hyperparams.Hyperparams.define( configuration=OrderedDict({ 'l1_ratio': hyperparams.Union( configuration=OrderedDict({ 'float': hyperparams.Uniform( lower=0, upper=1, default=0.001, lower_inclusive=True, upper_inclusive=True, semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), # 'l1_ratio must be between 0 and 1; got (l1_ratio=None)' # 'none': hyperparams.Constant( # default=None, # semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], # ) }), default='float', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'] ) }) ) }, default='l2', description='Used to specify the norm used in the penalization. The \'newton-cg\', \'sag\' and \'lbfgs\' solvers support only l2 penalties.', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'] ), intercept_scaling=hyperparams.Constant[float]( default=1, description='Useful only when the solver \'liblinear\' is used and self.fit_intercept is set to True. In this case, x becomes [x, self.intercept_scaling], i.e. a "synthetic" feature with constant value equal to intercept_scaling is appended to the instance vector. The intercept becomes ``intercept_scaling * synthetic_feature_weight``. Note! the synthetic feature weight is subject to l1/l2 regularization as all other features. To lessen the effect of regularization on synthetic feature weight (and therefore on the intercept) intercept_scaling has to be increased.', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'] ), ) sk_decision_tree_clf_config = dict( min_samples_split=hyperparams.Union( configuration=OrderedDict({ 'absolute': hyperparams.Constant[int]( default=2, semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), 'percent': hyperparams.Bounded[float]( default=0.25, lower=0, upper=1, lower_inclusive=False, # upper_inclusive=False, semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ) }), default='absolute', description='The minimum number of samples required to split an internal node: - If int, then consider `min_samples_split` as the minimum number. - If float, then `min_samples_split` is a percentage and `ceil(min_samples_split * n_samples)` are the minimum number of samples for each split. .. versionchanged:: 0.18 Added float values for percentages.', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'] ), max_features=hyperparams.Union( configuration=OrderedDict({ # max_features must be in (0, n_features] # 'specified_int': hyperparams.Bounded[int]( # lower=0, # upper=None, # default=0, # semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], # ), 'calculated': hyperparams.Enumeration[str]( values=['auto', 'sqrt', 'log2'], default='auto', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), 'none': hyperparams.Constant( default=None, semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), 'percent': hyperparams.Bounded[float]( default=0.25, lower=0, upper=1, lower_inclusive=False, semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ) }), default='none', description='The number of features to consider when looking for the best split: - If int, then consider `max_features` features at each split. - If float, then `max_features` is a percentage and `int(max_features * n_features)` features are considered at each split. - If "auto", then `max_features=sqrt(n_features)`. - If "sqrt", then `max_features=sqrt(n_features)`. - If "log2", then `max_features=log2(n_features)`. - If None, then `max_features=n_features`. Note: the search for a split does not stop until at least one valid partition of the node samples is found, even if it requires to effectively inspect more than ``max_features`` features.', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'] ), # 'max_leaf_nodes 0 must be either None or larger than 1' max_leaf_nodes=hyperparams.Constant( default=None, description='Grow a tree with ``max_leaf_nodes`` in best-first fashion. Best nodes are defined as relative reduction in impurity. If None then unlimited number of leaf nodes.', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'] ), ) sk_sgd_clf_config = dict( validation_fraction=hyperparams.Bounded[float]( default=0.1, lower=0, upper=0.99999999999, lower_inclusive=False, # upper_inclusive=False, description='The proportion of training data to set aside as validation set for early stopping. Must be between 0 and 1. Only used if early_stopping is True.', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'] ), # eta0 must be > 0 eta0=hyperparams.Bounded[float]( lower=0.0, upper=1.0, default=0.1, lower_inclusive=False, description='The initial learning rate for the \'constant\' or \'invscaling\' schedules. The default value is 0.0 as eta0 is not used by the default schedule \'optimal\'.', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'] ), ) sk_random_forest_clf_config = dict( max_features=hyperparams.Union( configuration=OrderedDict({ # max_features must be in (0, n_features] # 'specified_int': hyperparams.Bounded[int]( # lower=0, # upper=None, # default=0, # semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], # ), 'calculated': hyperparams.Enumeration[str]( values=['auto', 'sqrt', 'log2'], default='auto', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), 'none': hyperparams.Constant( default=None, semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), 'percent': hyperparams.Uniform( default=0.25, lower=0, upper=1, lower_inclusive=True, upper_inclusive=False, semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ) }), default='calculated', description='The number of features to consider when looking for the best split: - If int, then consider `max_features` features at each split. - If float, then `max_features` is a percentage and `int(max_features * n_features)` features are considered at each split. - If "auto", then `max_features=sqrt(n_features)`. - If "sqrt", then `max_features=sqrt(n_features)` (same as "auto"). - If "log2", then `max_features=log2(n_features)`. - If None, then `max_features=n_features`. Note: the search for a split does not stop until at least one valid partition of the node samples is found, even if it requires to effectively inspect more than ``max_features`` features.', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'] ), max_samples=hyperparams.Union( configuration=OrderedDict({ 'absolute': hyperparams.Bounded[int]( lower=0, upper=None, lower_inclusive=False, default=1, semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), 'percent': hyperparams.Bounded[float]( default=0.9, lower=0 + epsilon, upper=1, upper_inclusive=False, semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), 'none': hyperparams.Constant( default=None, semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ) }), default='none', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'] ), ) sk_extra_tree_tree_clf_config = dict( max_features=hyperparams.Union( configuration=OrderedDict({ 'calculated': hyperparams.Enumeration[str]( values=['auto', 'sqrt', 'log2'], default='auto', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), 'none': hyperparams.Constant( default=None, semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), 'percent': hyperparams.Bounded[float]( default=0.25, lower=0, upper=1, lower_inclusive=False, semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ) }), default='calculated', description='The number of features to consider when looking for the best split: - If int, then consider `max_features` features at each split. - If float, then `max_features` is a percentage and `int(max_features * n_features)` features are considered at each split. - If "auto", then `max_features=sqrt(n_features)`. - If "sqrt", then `max_features=sqrt(n_features)`. - If "log2", then `max_features=log2(n_features)`. - If None, then `max_features=n_features`. Note: the search for a split does not stop until at least one valid partition of the node samples is found, even if it requires to effectively inspect more than ``max_features`` features.', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'] ), max_samples=hyperparams.Union( configuration=OrderedDict({ 'absolute': hyperparams.Bounded[int]( lower=0, upper=None, lower_inclusive=False, default=1, semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), 'percent': hyperparams.Bounded[float]( default=0.9, lower=0 + epsilon, upper=1, upper_inclusive=False, semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ), 'none': hyperparams.Constant( default=None, semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], ) }), default='none', semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'] ) ) # To avoid the issue, https://gitlab.com/TAMU_D3M/d3m_primitives/-/issues/1 tamu_feature_selection_config = dict( percentage_selected_features=hyperparams.Uniform( default=0.5, upper=1, lower=0.25, semantic_types=['https://metadata.datadrivendiscovery.org/types/TuningParameter'], description="percentage of features to select, between 0 and 1") ) config = { 'd3m.primitives.classification.xgboost_gbtree.DataFrameCommon': clf_xgboost_config, 'd3m.primitives.feature_construction.deep_feature_synthesis.SingleTableFeaturization': dfs_single_tab_config, 'd3m.primitives.classification.light_gbm.DataFrameCommon': lgbm_clf_config, 'd3m.primitives.classification.logistic_regression.SKlearn': sk_logistic_regression_config, 'd3m.primitives.classification.decision_tree.SKlearn': sk_decision_tree_clf_config, 'd3m.primitives.classification.sgd.SKlearn': sk_sgd_clf_config, 'd3m.primitives.classification.random_forest.SKlearn': sk_random_forest_clf_config, 'd3m.primitives.classification.extra_trees.SKlearn': sk_extra_tree_tree_clf_config, 'd3m.primitives.feature_selection.skfeature.TAMU': tamu_feature_selection_config, }
47.248134
680
0.630839
2,614
25,325
5.998087
0.13466
0.05721
0.140825
0.154028
0.787997
0.749793
0.734294
0.734294
0.699407
0.640219
0
0.013252
0.264047
25,325
535
681
47.336449
0.827986
0.123672
0
0.781903
0
0.018561
0.457519
0.04221
0
0
0
0
0
1
0
false
0
0.006961
0
0.006961
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
e87eccbfdc59002e454fb9330edeafb7503bfad1
93
py
Python
rapidsms/contrib/messagelog/tests/__init__.py
AndreLesa/rapidsms
b7f7366574733388d5e59c99dcceacf59f59080e
[ "BSD-3-Clause" ]
2
2019-04-04T20:48:52.000Z
2019-11-13T09:09:07.000Z
rapidsms/contrib/messagelog/tests/__init__.py
johanneswilm/rapidsms
d10f872496da7a5516aa6bcdf0552fc2ca0aca57
[ "BSD-3-Clause" ]
null
null
null
rapidsms/contrib/messagelog/tests/__init__.py
johanneswilm/rapidsms
d10f872496da7a5516aa6bcdf0552fc2ca0aca57
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 from .app import * from .models import *
15.5
28
0.655914
19
93
3.210526
0.789474
0
0
0
0
0
0
0
0
0
0
0.04
0.193548
93
5
29
18.6
0.773333
0.505376
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
e8aa28fe779e1305b948e6593edc889a7971333f
162
py
Python
strategy/__init__.py
matthewgilbert/strategy
8993d110831ab8a2809076e5242906ec1bbaeeb2
[ "MIT" ]
6
2017-10-31T14:03:33.000Z
2020-08-02T02:19:39.000Z
strategy/__init__.py
matthewgilbert/strategy
8993d110831ab8a2809076e5242906ec1bbaeeb2
[ "MIT" ]
5
2017-12-17T01:03:32.000Z
2018-09-11T18:58:27.000Z
strategy/__init__.py
matthewgilbert/strategy
8993d110831ab8a2809076e5242906ec1bbaeeb2
[ "MIT" ]
5
2019-03-22T16:12:59.000Z
2021-08-10T13:14:55.000Z
from . import strategy from . import rebalance from . import calendar from ._version import __version__ # NOQA __all__ = ['strategy', 'rebalance', 'calendar']
20.25
47
0.740741
18
162
6.166667
0.444444
0.27027
0
0
0
0
0
0
0
0
0
0
0.160494
162
7
48
23.142857
0.816176
0.024691
0
0
0
0
0.160256
0
0
0
0
0
0
1
0
false
0
0.8
0
0.8
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
2cd2d60cb05fbd573c6c6c197b3e383c7745e91a
95
py
Python
wagtail/contrib/wagtailfrontendcache/__init__.py
balkantechnologies/BalkanCMS_core
68625199028fc96abb175e410a4a7a92c02cb261
[ "BSD-3-Clause" ]
3
2016-08-17T13:56:36.000Z
2019-04-23T19:59:25.000Z
wagtail/contrib/wagtailfrontendcache/__init__.py
balkantechnologies/BalkanCMS_core
68625199028fc96abb175e410a4a7a92c02cb261
[ "BSD-3-Clause" ]
11
2016-08-05T15:43:06.000Z
2016-12-16T13:32:23.000Z
wagtail/contrib/wagtailfrontendcache/__init__.py
balkantechnologies/BalkanCMS_core
68625199028fc96abb175e410a4a7a92c02cb261
[ "BSD-3-Clause" ]
2
2017-08-08T01:39:02.000Z
2018-05-06T06:16:10.000Z
default_app_config = 'wagtail.contrib.wagtailfrontendcache.apps.WagtailFrontendCacheAppConfig'
47.5
94
0.894737
8
95
10.375
1
0
0
0
0
0
0
0
0
0
0
0
0.031579
95
1
95
95
0.902174
0
0
0
0
0
0.747368
0.747368
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5