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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
35eff07ab69c1593248ead9c8d441f4fe92b87d2
| 334
|
py
|
Python
|
instagram_api/response/review_preference.py
|
Yuego/instagram_api
|
b53f72db36c505a2eb24ebac1ba8267a0cc295bb
|
[
"MIT"
] | 13
|
2019-08-07T21:24:34.000Z
|
2020-12-12T12:23:50.000Z
|
instagram_api/response/review_preference.py
|
Yuego/instagram_api
|
b53f72db36c505a2eb24ebac1ba8267a0cc295bb
|
[
"MIT"
] | null | null | null |
instagram_api/response/review_preference.py
|
Yuego/instagram_api
|
b53f72db36c505a2eb24ebac1ba8267a0cc295bb
|
[
"MIT"
] | null | null | null |
from .mapper import ApiResponse, ApiResponseInterface
from .mapper.types import Timestamp, AnyType
from .model import User
__all__ = ['ReviewPreferenceResponse']
class ReviewPreferenceResponseInterface(ApiResponseInterface):
user: User
class ReviewPreferenceResponse(ApiResponse, ReviewPreferenceResponseInterface):
pass
| 23.857143
| 79
| 0.829341
| 27
| 334
| 10.111111
| 0.555556
| 0.07326
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.113772
| 334
| 13
| 80
| 25.692308
| 0.922297
| 0
| 0
| 0
| 0
| 0
| 0.071856
| 0.071856
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.125
| 0.375
| 0
| 0.75
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
35fd80e4afe58ab4bb2c3a4c705ca0d3912d74aa
| 76
|
py
|
Python
|
anyway/parsers/cbs/s3/__init__.py
|
warik21/anyway
|
8c4a40fd2613cc67ed6e0cdae75443e8fa90b65e
|
[
"MIT"
] | null | null | null |
anyway/parsers/cbs/s3/__init__.py
|
warik21/anyway
|
8c4a40fd2613cc67ed6e0cdae75443e8fa90b65e
|
[
"MIT"
] | null | null | null |
anyway/parsers/cbs/s3/__init__.py
|
warik21/anyway
|
8c4a40fd2613cc67ed6e0cdae75443e8fa90b65e
|
[
"MIT"
] | null | null | null |
from .data_retriever import S3DataRetriever
from .uploader import S3Uploader
| 38
| 43
| 0.881579
| 9
| 76
| 7.333333
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028986
| 0.092105
| 76
| 2
| 44
| 38
| 0.927536
| 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
|
c42ca06a1ce1744693e76c12a760e498ff0521d6
| 77
|
py
|
Python
|
analyzers/rolaguard_base_analyzer/__init__.py
|
Argeniss-Software/rolaguard_engine
|
cec4af736097daae23864e6d7c4990a68f269f72
|
[
"Apache-2.0"
] | null | null | null |
analyzers/rolaguard_base_analyzer/__init__.py
|
Argeniss-Software/rolaguard_engine
|
cec4af736097daae23864e6d7c4990a68f269f72
|
[
"Apache-2.0"
] | null | null | null |
analyzers/rolaguard_base_analyzer/__init__.py
|
Argeniss-Software/rolaguard_engine
|
cec4af736097daae23864e6d7c4990a68f269f72
|
[
"Apache-2.0"
] | null | null | null |
from analyzers.rolaguard_base_analyzer.BaseAnalyzerMain import process_packet
| 77
| 77
| 0.935065
| 9
| 77
| 7.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.038961
| 77
| 1
| 77
| 77
| 0.932432
| 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
|
c46396ef362425ce3c1f85cd45203da7f1f1e0fd
| 33
|
py
|
Python
|
benchmarks/src/garage_benchmarks/experiments/__init__.py
|
fangqyi/garage
|
ddafba385ef005f46f913ab352f9638760e5b412
|
[
"MIT"
] | 1
|
2021-03-02T08:43:20.000Z
|
2021-03-02T08:43:20.000Z
|
benchmarks/src/garage_benchmarks/experiments/__init__.py
|
fangqyi/garage
|
ddafba385ef005f46f913ab352f9638760e5b412
|
[
"MIT"
] | null | null | null |
benchmarks/src/garage_benchmarks/experiments/__init__.py
|
fangqyi/garage
|
ddafba385ef005f46f913ab352f9638760e5b412
|
[
"MIT"
] | null | null | null |
"""Benchmarking experiments."""
| 16.5
| 32
| 0.69697
| 2
| 33
| 11.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.090909
| 33
| 1
| 33
| 33
| 0.766667
| 0.757576
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 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
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
c467853aa5cc4105b42f20850f94dd2b443e3d31
| 1,096
|
py
|
Python
|
IMU/VTK-6.2.0/Utilities/vtkTclTest2Py/mccases.py
|
timkrentz/SunTracker
|
9a189cc38f45e5fbc4e4c700d7295a871d022795
|
[
"MIT"
] | 4
|
2019-05-30T01:52:12.000Z
|
2021-09-29T21:12:13.000Z
|
IMU/VTK-6.2.0/Utilities/vtkTclTest2Py/mccases.py
|
timkrentz/SunTracker
|
9a189cc38f45e5fbc4e4c700d7295a871d022795
|
[
"MIT"
] | null | null | null |
IMU/VTK-6.2.0/Utilities/vtkTclTest2Py/mccases.py
|
timkrentz/SunTracker
|
9a189cc38f45e5fbc4e4c700d7295a871d022795
|
[
"MIT"
] | 2
|
2019-08-30T23:36:13.000Z
|
2019-11-08T16:52:01.000Z
|
"""This is python equivalent of Wrapping/Tcl/vtktesting/mccases.tcl.
Used for setting vertex values for clipping, cutting, and contouring tests.
This script is used while running python tests translated from Tcl."""
def case1 ( scalars, IN, OUT, caseLabel ):
scalars.InsertValue(0,IN )
scalars.InsertValue(1,OUT)
scalars.InsertValue(2,OUT)
scalars.InsertValue(3,OUT)
scalars.InsertValue(4,OUT)
scalars.InsertValue(5,OUT)
scalars.InsertValue(6,OUT)
scalars.InsertValue(7,OUT)
if IN == 1:
caseLabel.SetText("Case 1 - 00000001")
else :
caseLabel.SetText("Case 1c - 11111110")
pass
def case2 ( scalars, IN, OUT, caseLabel ):
scalars.InsertValue(0,IN)
scalars.InsertValue(1,IN)
scalars.InsertValue(2,OUT)
scalars.InsertValue(3,OUT)
scalars.InsertValue(4,OUT)
scalars.InsertValue(5,OUT)
scalars.InsertValue(6,OUT)
scalars.InsertValue(7,OUT)
if IN == 1:
caseLabel.SetText("Case 2 - 00000011")
else:
caseLabel.SetText("Case 2c - 11111100")
pass
| 30.444444
| 76
| 0.660584
| 138
| 1,096
| 5.246377
| 0.369565
| 0.39779
| 0.319061
| 0.058011
| 0.60221
| 0.60221
| 0.60221
| 0.60221
| 0.60221
| 0.60221
| 0
| 0.066116
| 0.22719
| 1,096
| 35
| 77
| 31.314286
| 0.788666
| 0.190693
| 0
| 0.714286
| 0
| 0
| 0.082938
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.071429
| false
| 0.071429
| 0
| 0
| 0.071429
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
c4832cd4aad173faddf89f6f6ab7413a1ce8615a
| 224
|
py
|
Python
|
tests/application_service/elements.py
|
nadirhamid/protean
|
d31bc634e05c9221e82136bf18c2ceaa0982c1c8
|
[
"BSD-3-Clause"
] | null | null | null |
tests/application_service/elements.py
|
nadirhamid/protean
|
d31bc634e05c9221e82136bf18c2ceaa0982c1c8
|
[
"BSD-3-Clause"
] | null | null | null |
tests/application_service/elements.py
|
nadirhamid/protean
|
d31bc634e05c9221e82136bf18c2ceaa0982c1c8
|
[
"BSD-3-Clause"
] | null | null | null |
# Protean
from protean.core.application_service import BaseApplicationService
class DummyApplicationService(BaseApplicationService):
def do_application_process(self):
print("Performing application process...")
| 28
| 67
| 0.808036
| 20
| 224
| 8.9
| 0.75
| 0.202247
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.120536
| 224
| 7
| 68
| 32
| 0.903553
| 0.03125
| 0
| 0
| 0
| 0
| 0.153488
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.75
| 0.25
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
675ed74424b10f79d98f8b441d43055f64ab106b
| 120
|
py
|
Python
|
chan/__init__.py
|
Kthulhuk/pychan
|
fe495c9a3ab64c8675915da2e578eac19aadbf0e
|
[
"BSD-3-Clause"
] | 2
|
2017-11-23T20:10:53.000Z
|
2021-01-06T17:36:47.000Z
|
chan/__init__.py
|
Kthulhuk/pychan
|
fe495c9a3ab64c8675915da2e578eac19aadbf0e
|
[
"BSD-3-Clause"
] | null | null | null |
chan/__init__.py
|
Kthulhuk/pychan
|
fe495c9a3ab64c8675915da2e578eac19aadbf0e
|
[
"BSD-3-Clause"
] | 1
|
2017-11-23T15:07:11.000Z
|
2017-11-23T15:07:11.000Z
|
from .chan import Error, ChanClosed, Timeout
from .chan import Chan, select
from .chan import go
__version__ = '0.3.1'
| 20
| 44
| 0.75
| 19
| 120
| 4.526316
| 0.631579
| 0.27907
| 0.488372
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.029703
| 0.158333
| 120
| 5
| 45
| 24
| 0.821782
| 0
| 0
| 0
| 0
| 0
| 0.041667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
6794420ec29c3fca11920d821ce8afaff6e9d60a
| 176
|
py
|
Python
|
atlas/foundations_rest_api/src/foundations_rest_api/config/configs.py
|
DeepLearnI/atlas
|
8aca652d7e647b4e88530b93e265b536de7055ed
|
[
"Apache-2.0"
] | 296
|
2020-03-16T19:55:00.000Z
|
2022-01-10T19:46:05.000Z
|
atlas/foundations_rest_api/src/foundations_rest_api/config/configs.py
|
DeepLearnI/atlas
|
8aca652d7e647b4e88530b93e265b536de7055ed
|
[
"Apache-2.0"
] | 57
|
2020-03-17T11:15:57.000Z
|
2021-07-10T14:42:27.000Z
|
atlas/foundations_rest_api/src/foundations_rest_api/config/configs.py
|
DeepLearnI/atlas
|
8aca652d7e647b4e88530b93e265b536de7055ed
|
[
"Apache-2.0"
] | 38
|
2020-03-17T21:06:05.000Z
|
2022-02-08T03:19:34.000Z
|
import yaml
import os
import pathlib
ATLAS = yaml.load(open(os.getenv('AUTH_CLIENT_CONFIG_PATH', pathlib.Path(os.path.abspath(__file__)).parent / 'auth_client_config.yaml')))
| 29.333333
| 137
| 0.789773
| 27
| 176
| 4.814815
| 0.555556
| 0.153846
| 0.246154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.073864
| 176
| 5
| 138
| 35.2
| 0.797546
| 0
| 0
| 0
| 0
| 0
| 0.261364
| 0.261364
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
67a9e0ed7b9c787830f1b99cc0132a14bbcaee43
| 31
|
py
|
Python
|
se3_transformer/data_loading/__init__.py
|
RosettaCommons/RFDesign
|
b404b8b2c57f89c047529c30259aeeb8f6012b61
|
[
"MIT"
] | 45
|
2022-01-12T04:39:36.000Z
|
2022-03-25T12:33:36.000Z
|
se3_transformer/data_loading/__init__.py
|
RosettaCommons/RFDesign
|
b404b8b2c57f89c047529c30259aeeb8f6012b61
|
[
"MIT"
] | 6
|
2022-01-15T16:48:39.000Z
|
2022-03-15T16:20:34.000Z
|
se3_transformer/data_loading/__init__.py
|
RosettaCommons/RFDesign
|
b404b8b2c57f89c047529c30259aeeb8f6012b61
|
[
"MIT"
] | 10
|
2022-01-12T11:28:03.000Z
|
2022-03-30T11:36:41.000Z
|
from .qm9 import QM9DataModule
| 15.5
| 30
| 0.83871
| 4
| 31
| 6.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.074074
| 0.129032
| 31
| 1
| 31
| 31
| 0.888889
| 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
|
67c609b5dcb7eb644fed624f69dd3eecf56c75a8
| 22
|
py
|
Python
|
__init__.py
|
NattieRavid/Crawler
|
e46a3fcef3d63d9d7e5a5bd7a3798757a8c7555e
|
[
"Apache-2.0"
] | null | null | null |
__init__.py
|
NattieRavid/Crawler
|
e46a3fcef3d63d9d7e5a5bd7a3798757a8c7555e
|
[
"Apache-2.0"
] | null | null | null |
__init__.py
|
NattieRavid/Crawler
|
e46a3fcef3d63d9d7e5a5bd7a3798757a8c7555e
|
[
"Apache-2.0"
] | null | null | null |
from . import crawler
| 11
| 21
| 0.772727
| 3
| 22
| 5.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.181818
| 22
| 1
| 22
| 22
| 0.944444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
67ce4b52b9ae0d101351d923f5b8eef6e2aa0bec
| 80
|
py
|
Python
|
wong_kolter/version0point2/__init__.py
|
mo-arvan/robust-verify-benchmark
|
cc8ea4ffe13cd5d70a70f8c98da891907635738a
|
[
"MIT"
] | 36
|
2019-05-04T00:20:03.000Z
|
2022-03-24T22:57:15.000Z
|
wong_kolter/version0point2/__init__.py
|
mo-arvan/robust-verify-benchmark
|
cc8ea4ffe13cd5d70a70f8c98da891907635738a
|
[
"MIT"
] | 1
|
2021-12-08T06:44:03.000Z
|
2021-12-12T15:20:20.000Z
|
wong_kolter/version0point2/__init__.py
|
mo-arvan/robust-verify-benchmark
|
cc8ea4ffe13cd5d70a70f8c98da891907635738a
|
[
"MIT"
] | 6
|
2019-11-24T11:57:54.000Z
|
2022-03-07T22:35:47.000Z
|
from .dual import DualNetBounds, robust_loss, Affine, AffineTranspose, full_bias
| 80
| 80
| 0.85
| 10
| 80
| 6.6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0875
| 80
| 1
| 80
| 80
| 0.90411
| 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
|
67d943702219436d1813b10796437209c801975b
| 71
|
py
|
Python
|
tabnet/schedules/__init__.py
|
ostamand/tensorflow-tabnet
|
cc676d75a5879df61d3b154ea783fbc364caf2a2
|
[
"MIT"
] | 44
|
2020-08-24T08:47:28.000Z
|
2022-03-30T21:07:38.000Z
|
tabnet/schedules/__init__.py
|
MarkusSagen/tensorflow-tabnet
|
b519ca7ee057d618c5aeabbca4d7f5e7edcae9fc
|
[
"MIT"
] | 6
|
2020-08-24T06:23:30.000Z
|
2021-07-20T16:08:28.000Z
|
tabnet/schedules/__init__.py
|
MarkusSagen/tensorflow-tabnet
|
b519ca7ee057d618c5aeabbca4d7f5e7edcae9fc
|
[
"MIT"
] | 16
|
2020-09-29T01:49:00.000Z
|
2022-01-26T02:01:40.000Z
|
from tabnet.schedules.decay_with_warmup import DecayWithWarmupSchedule
| 35.5
| 70
| 0.915493
| 8
| 71
| 7.875
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.056338
| 71
| 1
| 71
| 71
| 0.940299
| 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
|
67fd425cc2555cc14acc9037419adb2ac4b32edf
| 253
|
py
|
Python
|
orb_simulator/orbsim_language/orbsim_ast/attribute_declr_node.py
|
dmguezjaviersnet/IA-Sim-Comp-Project
|
8165b9546efc45f98091a3774e2dae4f45942048
|
[
"MIT"
] | 1
|
2022-01-19T22:49:09.000Z
|
2022-01-19T22:49:09.000Z
|
orb_simulator/orbsim_language/orbsim_ast/attribute_declr_node.py
|
dmguezjaviersnet/IA-Sim-Comp-Project
|
8165b9546efc45f98091a3774e2dae4f45942048
|
[
"MIT"
] | 15
|
2021-11-10T14:25:02.000Z
|
2022-02-12T19:17:11.000Z
|
orb_simulator/orbsim_language/orbsim_ast/attribute_declr_node.py
|
dmguezjaviersnet/IA-Sim-Comp-Project
|
8165b9546efc45f98091a3774e2dae4f45942048
|
[
"MIT"
] | null | null | null |
from dataclasses import dataclass
from orbsim_language.orbsim_ast.expression_node import ExpressionNode
from orbsim_language.orbsim_ast.statement_node import StatementNode
@dataclass
class AttributeDeclrNode(StatementNode):
name: str
type: str
| 28.111111
| 69
| 0.849802
| 30
| 253
| 6.966667
| 0.566667
| 0.095694
| 0.172249
| 0.229665
| 0.258373
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.110672
| 253
| 9
| 70
| 28.111111
| 0.928889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.428571
| 0
| 0.857143
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
db0ae30e2ab657ae98820fcc1b2af1c863cf8fb8
| 141
|
py
|
Python
|
src/olympia/migrations/817-reindex-addons.py
|
atiqueahmedziad/addons-server
|
6e1cc00bf15d245fbcdddf618286bba943731e45
|
[
"BSD-3-Clause"
] | 10
|
2018-08-16T04:55:06.000Z
|
2022-01-08T16:09:39.000Z
|
src/olympia/migrations/817-reindex-addons.py
|
atiqueahmedziad/addons-server
|
6e1cc00bf15d245fbcdddf618286bba943731e45
|
[
"BSD-3-Clause"
] | 171
|
2018-05-20T00:27:59.000Z
|
2022-03-21T13:34:27.000Z
|
src/olympia/migrations/817-reindex-addons.py
|
atiqueahmedziad/addons-server
|
6e1cc00bf15d245fbcdddf618286bba943731e45
|
[
"BSD-3-Clause"
] | 12
|
2018-08-01T16:46:09.000Z
|
2022-01-08T16:09:46.000Z
|
"""Reindex add-ons to fix stale data left by changes to the post_save
handler."""
from addons.cron import reindex_addons
reindex_addons()
| 17.625
| 69
| 0.77305
| 23
| 141
| 4.608696
| 0.782609
| 0.245283
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148936
| 141
| 7
| 70
| 20.142857
| 0.883333
| 0.531915
| 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
|
db2cd515466d08f2f3ea5d411118a09f0f4ab09c
| 249
|
py
|
Python
|
ocrd_models/ocrd_page_user_methods/get_UnorderedGroupChildren.py
|
hnesk/core
|
5a79220bc31572410e705d13ca178cf284cdc9fb
|
[
"Apache-2.0"
] | 91
|
2018-05-23T12:52:11.000Z
|
2022-03-19T20:43:49.000Z
|
ocrd_models/ocrd_page_user_methods/get_UnorderedGroupChildren.py
|
hnesk/core
|
5a79220bc31572410e705d13ca178cf284cdc9fb
|
[
"Apache-2.0"
] | 636
|
2018-04-23T15:57:31.000Z
|
2022-03-31T11:46:11.000Z
|
ocrd_models/ocrd_page_user_methods/get_UnorderedGroupChildren.py
|
hnesk/core
|
5a79220bc31572410e705d13ca178cf284cdc9fb
|
[
"Apache-2.0"
] | 25
|
2018-05-22T11:53:09.000Z
|
2021-07-20T13:07:43.000Z
|
def get_UnorderedGroupChildren(self):
"""
List all non-metadata children of an :py:class:`UnorderedGroupType`
"""
# TODO: should not change order
return self.get_RegionRef() + self.get_OrderedGroup() + self.get_UnorderedGroup()
| 31.125
| 85
| 0.710843
| 29
| 249
| 5.965517
| 0.793103
| 0.121387
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176707
| 249
| 7
| 86
| 35.571429
| 0.843902
| 0.393574
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 0
| 1
| 0.5
| false
| 0
| 0
| 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
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
e1e22fb2c703f09a7bdb1e870bdcdcb4532c6afc
| 208
|
py
|
Python
|
autograd/numpy/__init__.py
|
EnjoyLifeFund/py36pkgs
|
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
|
[
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | 4
|
2021-01-12T22:02:57.000Z
|
2021-04-02T15:24:18.000Z
|
autograd/numpy/__init__.py
|
EnjoyLifeFund/py36pkgs
|
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
|
[
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null |
autograd/numpy/__init__.py
|
EnjoyLifeFund/py36pkgs
|
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
|
[
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | 1
|
2017-07-30T23:49:27.000Z
|
2017-07-30T23:49:27.000Z
|
from __future__ import absolute_import
from . import numpy_wrapper
from . import numpy_grads
from . import numpy_extra
from .numpy_wrapper import *
from . import linalg
from . import fft
from . import random
| 23.111111
| 38
| 0.807692
| 30
| 208
| 5.3
| 0.366667
| 0.377358
| 0.283019
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153846
| 208
| 8
| 39
| 26
| 0.903409
| 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
| 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
|
e1ee7ebc93f821de5cbd6ee3c1686af7d1683c5b
| 46
|
py
|
Python
|
keras_targeted_dropout/__init__.py
|
guglielmocamporese/keras-targeted-dropout
|
c1dd1aced01f89f73f98e6894996045dcdbf9cfc
|
[
"MIT"
] | 8
|
2018-11-29T01:02:31.000Z
|
2020-12-12T14:21:01.000Z
|
keras_targeted_dropout/__init__.py
|
guglielmocamporese/keras-targeted-dropout
|
c1dd1aced01f89f73f98e6894996045dcdbf9cfc
|
[
"MIT"
] | 3
|
2019-03-18T17:52:34.000Z
|
2019-06-29T20:43:18.000Z
|
keras_targeted_dropout/__init__.py
|
guglielmocamporese/keras-targeted-dropout
|
c1dd1aced01f89f73f98e6894996045dcdbf9cfc
|
[
"MIT"
] | 4
|
2018-11-29T01:02:33.000Z
|
2019-11-25T05:12:30.000Z
|
from .targeted_dropout import TargetedDropout
| 23
| 45
| 0.891304
| 5
| 46
| 8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.086957
| 46
| 1
| 46
| 46
| 0.952381
| 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
|
c001df042176eed6678452940d4aa7f9d6801017
| 104
|
py
|
Python
|
code/python/30_seconds_of_py/compact.py
|
AlexMapley/Scanner
|
d286fc969d540d9599dad487e6e6d9b3734ade0c
|
[
"Unlicense"
] | 2
|
2019-07-03T17:49:24.000Z
|
2019-10-24T02:18:59.000Z
|
code/python/30_seconds_of_py/compact.py
|
AlexMapley/Scanner
|
d286fc969d540d9599dad487e6e6d9b3734ade0c
|
[
"Unlicense"
] | 7
|
2019-07-03T17:46:53.000Z
|
2019-11-14T23:37:30.000Z
|
code/python/30_seconds_of_py/compact.py
|
AlexMapley/workstation
|
d286fc969d540d9599dad487e6e6d9b3734ade0c
|
[
"Unlicense"
] | null | null | null |
def compact(lst):
return list(filter(bool,lst))
print(compact([0,1,False,True,2,'',3,'a','s',34]))
| 20.8
| 50
| 0.625
| 19
| 104
| 3.421053
| 0.894737
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.06383
| 0.096154
| 104
| 4
| 51
| 26
| 0.62766
| 0
| 0
| 0
| 0
| 0
| 0.019231
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0.333333
| 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
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
c0029d8432e378eff27c3ae8884fcca5e4fdf723
| 60
|
py
|
Python
|
src/array_diff.py
|
tylorschafer/code-katas
|
831fb6f37c1fa3ddb85f939b25ab4cea873ec6c6
|
[
"MIT"
] | null | null | null |
src/array_diff.py
|
tylorschafer/code-katas
|
831fb6f37c1fa3ddb85f939b25ab4cea873ec6c6
|
[
"MIT"
] | null | null | null |
src/array_diff.py
|
tylorschafer/code-katas
|
831fb6f37c1fa3ddb85f939b25ab4cea873ec6c6
|
[
"MIT"
] | null | null | null |
def array_diff(n, x):
return [n for n in n if [n] != x]
| 20
| 37
| 0.55
| 14
| 60
| 2.285714
| 0.642857
| 0.125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.283333
| 60
| 2
| 38
| 30
| 0.744186
| 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
|
c00c4587c4685d8c04a1139f1b7907c352cf4461
| 236
|
py
|
Python
|
routers/api/biometrics/__init__.py
|
ArnolFokam/dna-gate-backend
|
1501a3a1d1a18645a309c012c8210045c61274c9
|
[
"Apache-2.0"
] | null | null | null |
routers/api/biometrics/__init__.py
|
ArnolFokam/dna-gate-backend
|
1501a3a1d1a18645a309c012c8210045c61274c9
|
[
"Apache-2.0"
] | null | null | null |
routers/api/biometrics/__init__.py
|
ArnolFokam/dna-gate-backend
|
1501a3a1d1a18645a309c012c8210045c61274c9
|
[
"Apache-2.0"
] | null | null | null |
from fastapi import APIRouter
from routers.api.biometrics import keys, metrics, info
router = APIRouter(prefix="/biometrics")
router.include_router(keys.router)
router.include_router(metrics.router)
router.include_router(info.router)
| 26.222222
| 54
| 0.826271
| 31
| 236
| 6.193548
| 0.419355
| 0.203125
| 0.296875
| 0.260417
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.076271
| 236
| 8
| 55
| 29.5
| 0.880734
| 0
| 0
| 0
| 0
| 0
| 0.04661
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
c0250b5e5d6182871a861d0c86f3b61103dab377
| 1,578
|
py
|
Python
|
modules/message_log.py
|
Iangecko/arbys
|
5b2e4b4e511d5721d6a1cc447b8fbf9be43fa909
|
[
"MIT"
] | 9
|
2018-10-01T05:57:17.000Z
|
2019-11-10T22:46:26.000Z
|
modules/message_log.py
|
Iangecko/arbys
|
5b2e4b4e511d5721d6a1cc447b8fbf9be43fa909
|
[
"MIT"
] | 7
|
2018-09-25T14:30:24.000Z
|
2019-07-26T02:30:15.000Z
|
modules/message_log.py
|
Iangecko/arbys
|
5b2e4b4e511d5721d6a1cc447b8fbf9be43fa909
|
[
"MIT"
] | 8
|
2018-09-25T21:06:26.000Z
|
2019-07-24T17:15:56.000Z
|
from client import client
import discord
import log
do_not_log_channels = [
]
@client.message()
async def log_messages(message: discord.Message):
if not client.log_all_messages:
return
if message.channel.id in do_not_log_channels:
return
if not message.attachments: # no attachments
try:
log.msg(
f"[{message.guild.name} - {message.guild.id}] "
f"[#{message.channel.name} - {message.channel.id}] "
f"[message id: {message.id}] "
f"[{message.author.name}#{message.author.discriminator} - {message.author.id}] "
f"{message.author.display_name}: {message.system_content}",
ts=message.created_at)
except AttributeError:
log.msg(
f"[DM] "
f"[message id: {message.id}] "
f"[{message.author.name}#{message.author.discriminator} - {message.author.id}] "
f"{message.system_content}",
ts=message.created_at)
else:
try:
log.msg(
f"[{message.guild.name} - {message.guild.id}] "
f"[#{message.channel.name} - {message.channel.id}] "
f"[message id: {message.id}] "
f"[{message.author.name}#{message.author.discriminator} - {message.author.id}] "
f"{message.author.display_name}: {message.system_content} "
f"{' '.join([x.url for x in message.attachments])}",
ts=message.created_at)
except AttributeError:
log.msg(
f"[DM] "
f"[message id: {message.id}] "
f"[{message.author.name}#{message.author.discriminator} - {message.author.id}] "
f"{message.system_content} "
f"{' '.join([x.url for x in message.attachments])}",
ts=message.created_at)
| 31.56
| 85
| 0.655894
| 209
| 1,578
| 4.861244
| 0.196172
| 0.125984
| 0.11811
| 0.094488
| 0.777559
| 0.777559
| 0.777559
| 0.759843
| 0.759843
| 0.759843
| 0
| 0
| 0.17237
| 1,578
| 49
| 86
| 32.204082
| 0.777948
| 0.008872
| 0
| 0.666667
| 0
| 0.088889
| 0.555698
| 0.348271
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.066667
| 0
| 0.111111
| 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
|
c03a3ab3e7a40f937a0a9208184af5bafaf07603
| 162
|
py
|
Python
|
data_utils.py
|
windhxs/zju_cst_ai_security
|
c201fceee6d13e658cd7a381b792a244094c58f9
|
[
"MIT"
] | null | null | null |
data_utils.py
|
windhxs/zju_cst_ai_security
|
c201fceee6d13e658cd7a381b792a244094c58f9
|
[
"MIT"
] | null | null | null |
data_utils.py
|
windhxs/zju_cst_ai_security
|
c201fceee6d13e658cd7a381b792a244094c58f9
|
[
"MIT"
] | null | null | null |
from torch.utils.data import Dataset
import torchvision
# cifar10 = torchvision.datasets.CIFAR10(
# root='data',
# train=True,
# download=False
# )
| 16.2
| 41
| 0.685185
| 18
| 162
| 6.166667
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030769
| 0.197531
| 162
| 9
| 42
| 18
| 0.823077
| 0.574074
| 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
|
fbf15bb5f015e87a016ea64f2aa471f50014b29f
| 162
|
py
|
Python
|
novel/admin.py
|
wzl1368611/quanshu
|
db6409a99849ed3bbbd098210336f61851e31a45
|
[
"MIT"
] | 1
|
2021-05-18T05:10:43.000Z
|
2021-05-18T05:10:43.000Z
|
novel/admin.py
|
wzl1368611/quanshu
|
db6409a99849ed3bbbd098210336f61851e31a45
|
[
"MIT"
] | null | null | null |
novel/admin.py
|
wzl1368611/quanshu
|
db6409a99849ed3bbbd098210336f61851e31a45
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
# Register your models here.
from novel.models import Charpter, Novel
admin.site.register(Charpter)
admin.site.register(Novel)
| 20.25
| 40
| 0.808642
| 23
| 162
| 5.695652
| 0.521739
| 0.137405
| 0.259542
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 162
| 7
| 41
| 23.142857
| 0.909722
| 0.160494
| 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
|
220cdd2fa6ef25d7ed67bf5ee522b59862697aae
| 50
|
py
|
Python
|
phonenumberchecker/__init__.py
|
i9k/phonenumberchecker
|
b40db740cbdde541e9cd333ed7a671446b405b27
|
[
"MIT"
] | null | null | null |
phonenumberchecker/__init__.py
|
i9k/phonenumberchecker
|
b40db740cbdde541e9cd333ed7a671446b405b27
|
[
"MIT"
] | null | null | null |
phonenumberchecker/__init__.py
|
i9k/phonenumberchecker
|
b40db740cbdde541e9cd333ed7a671446b405b27
|
[
"MIT"
] | null | null | null |
from .phonenumberchecker import PhoneNumberChecker
| 50
| 50
| 0.92
| 4
| 50
| 11.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.06
| 50
| 1
| 50
| 50
| 0.978723
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 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
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
2246970fd0e5f231195db5b63baeb1c63eafdfd9
| 151
|
py
|
Python
|
asetk/__init__.py
|
ltalirz/asetk
|
bdb31934a5eb49d601e492fc98078d27f5dd2ebd
|
[
"MIT"
] | 18
|
2017-02-07T21:35:21.000Z
|
2021-09-02T13:44:36.000Z
|
asetk/__init__.py
|
ltalirz/asetk
|
bdb31934a5eb49d601e492fc98078d27f5dd2ebd
|
[
"MIT"
] | 4
|
2016-10-20T21:23:23.000Z
|
2020-05-07T07:35:31.000Z
|
asetk/__init__.py
|
ltalirz/asetk
|
bdb31934a5eb49d601e492fc98078d27f5dd2ebd
|
[
"MIT"
] | 11
|
2016-10-20T21:17:20.000Z
|
2021-04-13T15:23:47.000Z
|
"""Atomistic ToolKit (ATK)
Some useful tools in the daily life of atomistic simulations.
Maintained by Leopold Talirz (leopold.talirz@gmail.com)
"""
| 21.571429
| 61
| 0.768212
| 21
| 151
| 5.52381
| 0.857143
| 0.224138
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.139073
| 151
| 6
| 62
| 25.166667
| 0.892308
| 0.940397
| 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
|
226eef33f68be7f5a7203b06fb1353f45e591e4d
| 316
|
py
|
Python
|
module20_project7.py
|
Abhyudyabajpai/Machine_Learning_Projects
|
1f339584d242121ef1b2fbf8a17c173cecdd87ea
|
[
"Apache-2.0"
] | null | null | null |
module20_project7.py
|
Abhyudyabajpai/Machine_Learning_Projects
|
1f339584d242121ef1b2fbf8a17c173cecdd87ea
|
[
"Apache-2.0"
] | null | null | null |
module20_project7.py
|
Abhyudyabajpai/Machine_Learning_Projects
|
1f339584d242121ef1b2fbf8a17c173cecdd87ea
|
[
"Apache-2.0"
] | null | null | null |
import numpy as np
#P(answers correctly | knows the material)* P(knows the material) OR (+)
#P(answerws correctly | does not know the material)* P(does not know the material)
#P(A|B) =P(B|A)*P(A)/P(B)
p_knows_the_material_given_answers_correctly = 0.85*.6/0.59
print(p_knows_the_material_given_answers_correctly)
| 31.6
| 82
| 0.759494
| 59
| 316
| 3.864407
| 0.389831
| 0.289474
| 0.280702
| 0.223684
| 0.535088
| 0.535088
| 0.333333
| 0
| 0
| 0
| 0
| 0.02509
| 0.117089
| 316
| 9
| 83
| 35.111111
| 0.792115
| 0.556962
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0.333333
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
2271a8e8651086d1b90a074eab1156702429f6c9
| 220
|
py
|
Python
|
modules/scipy/special/setup.py
|
avogel88/compare-VAE-GAE
|
aa3419c41a58ca6c1a9c1031c0aed7e07c3d4f90
|
[
"MIT"
] | null | null | null |
modules/scipy/special/setup.py
|
avogel88/compare-VAE-GAE
|
aa3419c41a58ca6c1a9c1031c0aed7e07c3d4f90
|
[
"MIT"
] | null | null | null |
modules/scipy/special/setup.py
|
avogel88/compare-VAE-GAE
|
aa3419c41a58ca6c1a9c1031c0aed7e07c3d4f90
|
[
"MIT"
] | null | null | null |
from numpy.distutils.misc_util import Configuration
def configuration(parent_package='', top_path=None):
config = Configuration('special', parent_package, top_path)
config.add_data_dir('tests')
return config
| 36.666667
| 63
| 0.777273
| 28
| 220
| 5.857143
| 0.714286
| 0.158537
| 0.195122
| 0.243902
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122727
| 220
| 6
| 64
| 36.666667
| 0.849741
| 0
| 0
| 0
| 0
| 0
| 0.054299
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
2276a782faf978c385569904dd6d1527fe2cd8d5
| 55
|
py
|
Python
|
examples/example_expanduser.py
|
juancarlospaco/thatlib
|
37403983c228521b992ad592231957a1c7af01f2
|
[
"MIT"
] | 31
|
2021-05-12T16:54:34.000Z
|
2022-02-17T12:36:52.000Z
|
examples/example_expanduser.py
|
juancarlospaco/thatlib
|
37403983c228521b992ad592231957a1c7af01f2
|
[
"MIT"
] | 1
|
2021-07-23T02:58:07.000Z
|
2021-09-03T21:53:29.000Z
|
examples/example_expanduser.py
|
juancarlospaco/thatlib
|
37403983c228521b992ad592231957a1c7af01f2
|
[
"MIT"
] | 1
|
2021-05-12T22:12:20.000Z
|
2021-05-12T22:12:20.000Z
|
from thatlib import expanduser
print(expanduser("~/"))
| 18.333333
| 30
| 0.763636
| 6
| 55
| 7
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.090909
| 55
| 2
| 31
| 27.5
| 0.84
| 0
| 0
| 0
| 0
| 0
| 0.036364
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
|
0
| 5
|
97d8955e20ae215a1f89169663d0a6a7c09649e2
| 10,693
|
py
|
Python
|
temp-uplift-submission/sparkml/feature_eng_spark.py
|
damslab/reproducibility
|
f7804b2513859f7e6f14fa7842d81003d0758bf8
|
[
"Apache-2.0"
] | 4
|
2021-12-10T17:20:26.000Z
|
2021-12-27T14:38:40.000Z
|
temp-uplift-submission/sparkml/feature_eng_spark.py
|
damslab/reproducibility
|
f7804b2513859f7e6f14fa7842d81003d0758bf8
|
[
"Apache-2.0"
] | null | null | null |
temp-uplift-submission/sparkml/feature_eng_spark.py
|
damslab/reproducibility
|
f7804b2513859f7e6f14fa7842d81003d0758bf8
|
[
"Apache-2.0"
] | null | null | null |
import sys
import time
import numpy as np
import scipy as sp
from scipy.sparse import csr_matrix
import scipy
import pandas as pd
from pyspark.sql import SparkSession
from pyspark.sql.functions import col
from pyspark import StorageLevel
from pyspark.sql.types import DoubleType
from pyspark.ml.feature import Normalizer, StringIndexer
from pyspark.ml.feature import OneHotEncoder, QuantileDiscretizer
from pyspark.ml.feature import VectorAssembler, FeatureHasher
from pyspark.ml import Pipeline
from pyspark.ml.classification import NaiveBayes
from pyspark.ml.evaluation import MulticlassClassificationEvaluator
import math
import warnings
def readNprep():
# Read the dataset
criteo = spark.read.options(inferSchema='True', delimiter=',') \
.csv("file:/home/aphani/datasets/criteo_day21_5M_cleaned")
#print(criteo.printSchema())
print("#partitions: ", criteo.rdd.getNumPartitions())
criteo.persist(StorageLevel.MEMORY_ONLY)
#print((criteo.count(), len(criteo.columns)))
return criteo
def applyFTset1(criteo, nBins):
# Bin the numerical columns
outCols = ['{0}_bin'.format(out) for out in criteo.columns[1:14]]
newCols = outCols
binner = QuantileDiscretizer(inputCols=criteo.columns[1:14], \
outputCols=outCols, handleInvalid="skip", numBuckets=nBins)
# Recode the categorical columns
outCols = ['{0}_rc'.format(out) for out in criteo.columns[14:40]]
newCols = newCols + outCols
indexer = StringIndexer(inputCols=criteo.columns[14:40], outputCols=outCols, handleInvalid="skip")
# Assemble the encoded columns the for the downstream trainer
assembler = VectorAssembler(inputCols=newCols, outputCol='features', handleInvalid="keep")
# Make a pipeline and apply
pipe = Pipeline(stages=[binner, indexer, assembler])
assembled = pipe.fit(criteo).transform(criteo)
# Split the data into train and test
splits = assembled.randomSplit([0.8, 0.2], 1234)
train = splits[0]
test = splits[1]
# Train with Naive Bayes
t1 = time.time()
nb = NaiveBayes(smoothing=1.0, modelType="multinomial", featuresCol='features', labelCol='_c0')
model = nb.fit(train)
predictions = model.transform(test)
# Calculate accuracy
evaluator = MulticlassClassificationEvaluator(labelCol='_c0', predictionCol='prediction',
metricName="accuracy")
accuracy = evaluator.evaluate(predictions)
print("Test set accuracy = " + str(accuracy))
print("Elapsed time for NB prediction = %s sec" % (time.time() - t1))
def applyFTset2(criteo, nBins):
# Bin the numerical columns
outCols = ['{0}_bin'.format(out) for out in criteo.columns[1:14]]
newCols = outCols
binner = QuantileDiscretizer(inputCols=criteo.columns[1:14], \
outputCols=outCols, handleInvalid="skip", numBuckets=nBins)
# Recode and dummycode the categorical columns
outCols = ['{0}_rc'.format(out) for out in criteo.columns[14:40]]
newCols = newCols + outCols
indexer = StringIndexer(inputCols=criteo.columns[14:40], outputCols=outCols, handleInvalid="skip")
outCols = ['{0}_dc'.format(out) for out in indexer.getOutputCols()]
newCols = newCols + outCols
one_hot = OneHotEncoder(dropLast=False, inputCols=indexer.getOutputCols(), outputCols=outCols)
# Assemble the encoded columns the for the downstream trainer
assembler = VectorAssembler(inputCols=newCols, outputCol='features', handleInvalid="keep")
# Make a pipeline and apply
pipe = Pipeline(stages=[binner, indexer, one_hot, assembler])
assembled = pipe.fit(criteo).transform(criteo)
# Split the data into train and test
splits = assembled.randomSplit([0.8, 0.2], 1234)
train = splits[0]
test = splits[1]
# Train with Naive Bayes
t1 = time.time()
nb = NaiveBayes(smoothing=1.0, modelType="multinomial", featuresCol='features', labelCol='_c0')
model = nb.fit(train)
predictions = model.transform(test)
# Calculate accuracy
evaluator = MulticlassClassificationEvaluator(labelCol='_c0', predictionCol='prediction',
metricName="accuracy")
accuracy = evaluator.evaluate(predictions)
print("Test set accuracy = " + str(accuracy))
print("Elapsed time for NB prediction = %s sec" % (time.time() - t1))
def applyFTset3(criteo, nBins):
# Bin the numerical columns
outCols = ['{0}_bin'.format(out) for out in criteo.columns[1:14]]
newCols = outCols
binner = QuantileDiscretizer(inputCols=criteo.columns[1:14], \
outputCols=outCols, handleInvalid="skip", numBuckets=nBins)
# Feature hash the categorical columns
newCols = newCols + ["hashed"]
hasher = FeatureHasher(numFeatures=1000, inputCols=criteo.columns[14:40], outputCol="hashed")
# Assemble the encoded columns the for the downstream trainer
assembler = VectorAssembler(inputCols=newCols, outputCol='features', handleInvalid="keep")
# Make a pipeline and apply
pipe = Pipeline(stages=[binner, hasher, assembler])
assembled = pipe.fit(criteo).transform(criteo)
# Split the data into train and test
splits = assembled.randomSplit([0.8, 0.2], 1234)
train = splits[0]
test = splits[1]
# Train with Naive Bayes
t1 = time.time()
nb = NaiveBayes(smoothing=1.0, modelType="multinomial", featuresCol='features', labelCol='_c0')
model = nb.fit(train)
predictions = model.transform(test)
# Calculate accuracy
evaluator = MulticlassClassificationEvaluator(labelCol='_c0', predictionCol='prediction',
metricName="accuracy")
accuracy = evaluator.evaluate(predictions)
print("Test set accuracy = " + str(accuracy))
print("Elapsed time for NB prediction = %s sec" % (time.time() - t1))
def applyFTset4(criteo, nBins):
# Bin the numerical columns
outCols = ['{0}_bin'.format(out) for out in criteo.columns[1:14]]
newCols = outCols
binner = QuantileDiscretizer(inputCols=criteo.columns[1:14], \
outputCols=outCols, handleInvalid="skip", numBuckets=nBins)
# Recode and dummycode the binned and recoded columns
outCols = ['{0}_rc'.format(out) for out in criteo.columns[14:40]]
newCols = newCols + outCols
indexer = StringIndexer(inputCols=criteo.columns[14:40], outputCols=outCols, handleInvalid="skip")
inCols = binner.getOutputCols() + indexer.getOutputCols()
outCols = ['{0}_dc'.format(out) for out in inCols]
newCols = newCols + outCols
one_hot = OneHotEncoder(dropLast=False, inputCols=inCols, outputCols=outCols)
# Assemble the encoded columns the for the downstream trainer
assembler = VectorAssembler(inputCols=newCols, outputCol='features', handleInvalid="keep")
# Make a pipeline and apply
pipe = Pipeline(stages=[binner, indexer, one_hot, assembler])
assembled = pipe.fit(criteo).transform(criteo)
# Split the data into train and test
splits = assembled.randomSplit([0.8, 0.2], 1234)
train = splits[0]
test = splits[1]
# Train with Naive Bayes
t1 = time.time()
nb = NaiveBayes(smoothing=1.0, modelType="multinomial", featuresCol='features', labelCol='_c0')
model = nb.fit(train)
predictions = model.transform(test)
# Calculate accuracy
evaluator = MulticlassClassificationEvaluator(labelCol='_c0', predictionCol='prediction',
metricName="accuracy")
accuracy = evaluator.evaluate(predictions)
print("Test set accuracy = " + str(accuracy))
print("Elapsed time for NB prediction = %s sec" % (time.time() - t1))
def applyFTset5(criteo, nBins):
# Bin the numerical columns
outCols = ['{0}_bin'.format(out) for out in criteo.columns[1:14]]
newCols = outCols
binner = QuantileDiscretizer(inputCols=criteo.columns[1:14], \
outputCols=outCols, handleInvalid="skip", numBuckets=nBins)
# Recode and Feature hash the categorical columns
outCols = ['{0}_rc'.format(out) for out in criteo.columns[14:26]]
newCols = newCols + outCols
indexer = StringIndexer(inputCols=criteo.columns[14:26], outputCols=outCols, handleInvalid="skip")
newCols = newCols + ["hashed"]
hasher = FeatureHasher(numFeatures=1000, inputCols=criteo.columns[26:40], outputCol="hashed")
# Assemble the encoded columns the for the downstream trainer
assembler = VectorAssembler(inputCols=newCols, outputCol='features', handleInvalid="keep")
# Make a pipeline and apply
pipe = Pipeline(stages=[binner, indexer, hasher, assembler])
assembled = pipe.fit(criteo).transform(criteo)
# Split the data into train and test
splits = assembled.randomSplit([0.8, 0.2], 1234)
train = splits[0]
test = splits[1]
# Train with Naive Bayes
t1 = time.time()
nb = NaiveBayes(smoothing=1.0, modelType="multinomial", featuresCol='features', labelCol='_c0')
model = nb.fit(train)
predictions = model.transform(test)
# Calculate accuracy
evaluator = MulticlassClassificationEvaluator(labelCol='_c0', predictionCol='prediction',
metricName="accuracy")
accuracy = evaluator.evaluate(predictions)
print("Test set accuracy = " + str(accuracy))
print("Elapsed time for NB prediction = %s sec" % (time.time() - t1))
# NOTE: single-threaded execution takes 3.7x more time
spark = SparkSession\
.builder\
.master("local[*]")\
.config("spark.driver.memory", "110g")\
.config("spark.kryoserializer.buffer.max", "1024m")\
.config("spark.sql.execution.arrow.pyspark.enabled", "true")\
.appName("KddByMLlib")\
.getOrCreate()
spark.sparkContext.setLogLevel('ERROR')
criteo = readNprep()
# Bin(13) w/ 10 bins, RC(26) --> Total: 92.3s, NB: 62s
t1 = time.time()
applyFTset1(criteo, 10)
print("Elapsed time for fe1 = %s sec" % (time.time() - t1))
# Bin(13) w/ 5 bins, RC(26) --> Total: 81.5s, NB: 66s
t1 = time.time()
applyFTset1(criteo, 5)
print("Elapsed time for fe2 = %s sec" % (time.time() - t1))
# Bin(13) w/ 5 bins, DC(26) --> Total: 348.5s, NB: 320s
t1 = time.time()
applyFTset2(criteo, 5)
print("Elapsed time for fe4 = %s sec" % (time.time() - t1))
# Bin(13) w/ 10 bins, FH(26) --> Total: 27.5s, NB: 22s
t1 = time.time()
applyFTset3(criteo, 10)
print("Elapsed time for fe3 = %s sec" % (time.time() - t1))
# Bin(13) w/ 5 bins, DC(39) --> Total: 333s, NB: 301.3s
t1 = time.time()
applyFTset4(criteo, 5)
print("Elapsed time for fe6 = %s sec" % (time.time() - t1))
# Bin(13) w/ 5 bins, RC(12), FH(14) --> Total: 51.2s, NB: 40.6s
t1 = time.time()
applyFTset5(criteo, 5)
print("Elapsed time for fe5 = %s sec" % (time.time() - t1))
# NOTE: 1) Individual calls take longer. Spark is caching intermediates?
# 2) Fusing NB with transformations doesn't reduce time by much? Caching FT output?
| 44.369295
| 102
| 0.698775
| 1,317
| 10,693
| 5.650721
| 0.179195
| 0.02365
| 0.017737
| 0.022171
| 0.794007
| 0.769417
| 0.74523
| 0.74523
| 0.735286
| 0.70989
| 0
| 0.032729
| 0.174226
| 10,693
| 240
| 103
| 44.554167
| 0.810079
| 0.166371
| 0
| 0.636364
| 0
| 0
| 0.120686
| 0.01376
| 0
| 0
| 0
| 0
| 0
| 1
| 0.034091
| false
| 0
| 0.107955
| 0
| 0.147727
| 0.096591
| 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
|
97d8bcbb0176d2b6a2b12ab155b757be646b7ffd
| 19,075
|
py
|
Python
|
project_4_multifactor_model/project_tests.py
|
shawlu95/Artificial_Intelligence_for_Trading
|
53c0d50c00cc736145390c52f527ba1283638491
|
[
"Apache-2.0"
] | 3
|
2019-05-05T01:54:05.000Z
|
2020-04-30T03:15:40.000Z
|
project_4_multifactor_model/project_tests.py
|
shawlu95/AI-for-Trading
|
53c0d50c00cc736145390c52f527ba1283638491
|
[
"Apache-2.0"
] | null | null | null |
project_4_multifactor_model/project_tests.py
|
shawlu95/AI-for-Trading
|
53c0d50c00cc736145390c52f527ba1283638491
|
[
"Apache-2.0"
] | 2
|
2019-02-15T14:42:16.000Z
|
2019-03-21T16:07:34.000Z
|
from collections import OrderedDict
import cvxpy as cvx
import numpy as np
import pandas as pd
from unittest.mock import patch
from sklearn.decomposition import PCA
from zipline.data import bundles
from zipline.pipeline import Pipeline
from zipline.pipeline.factors import AverageDollarVolume
from zipline.utils.calendars import get_calendar
import project_helper
from tests import assert_output, project_test, generate_random_dates, assert_structure, does_data_match
def get_assets(ticker_count):
bundle = bundles.load('eod-quotemedia')
return bundle.asset_finder.retrieve_all(bundle.asset_finder.sids[:ticker_count])
@project_test
def test_fit_pca(fn):
dates = generate_random_dates(4)
assets = get_assets(3)
fn_inputs = {
'returns': pd.DataFrame(
[
[0.02769242, 1.34872387, 0.23460972],
[-0.94728692, 0.68386883, -1.23987235],
[1.93769376, -0.48275934, 0.34957348],
[0.23985234, 0.35897345, 0.34598734]],
dates, assets),
'num_factor_exposures': 2,
'svd_solver': 'full'}
fn_correct_values = {
'PCA': PCA(),
'PCA.components_': np.array([
[0.81925896, -0.40427891, 0.40666118],
[-0.02011128, 0.68848693, 0.72496985]])}
pca_fit = PCA.fit
with patch.object(PCA, 'fit', autospec=True) as mock_fit:
mock_fit.side_effect = pca_fit
fn_return_value = fn(**fn_inputs)
assert_structure(fn_return_value, fn_correct_values['PCA'], 'PCA')
try:
fn_return_value.fit.assert_called()
except AssertionError:
raise Exception('Test Failure: PCA.fit not called')
try:
fn_return_value.fit.assert_called_with(self=fn_return_value, X=fn_inputs['returns'])
except Exception:
raise Exception('Test Failure: PCA.fit called with the wrong arguments')
assert_structure(fn_return_value.components_, fn_correct_values['PCA.components_'], 'PCA.components_')
if not does_data_match(fn_return_value.components_, fn_correct_values['PCA.components_']):
raise Exception('Test Failure: PCA not fitted correctly\n\n'
'PCA.components_:\n'
'{}\n\n'
'Expected PCA.components_:\n'
'{}'.format(fn_return_value.components_, fn_correct_values['PCA.components_']))
@project_test
def test_factor_betas(fn):
n_components = 3
dates = generate_random_dates(4)
assets = get_assets(3)
pca = PCA(n_components)
pca.fit(pd.DataFrame(
[
[0.21487253, 0.12342312, -0.13245215],
[0.23423439, -0.23434532, 1.67834324],
[0.23432445, -0.23563226, 0.23423523],
[0.24824535, -0.23523435, 0.36235236]],
dates, assets))
fn_inputs = {
'pca': pca,
'factor_beta_indices': np.array(assets),
'factor_beta_columns': np.arange(n_components)}
fn_correct_outputs = OrderedDict([
(
'factor_betas', pd.DataFrame(
[
[ 0.00590170, -0.07759542, 0.99696746],
[-0.13077609, 0.98836246, 0.07769983],
[ 0.99139436, 0.13083807, 0.00431461]],
fn_inputs['factor_beta_indices'],
fn_inputs['factor_beta_columns']))])
assert_output(fn, fn_inputs, fn_correct_outputs, check_parameter_changes=False)
@project_test
def test_factor_returns(fn):
n_components = 3
dates = generate_random_dates(4)
assets = get_assets(3)
pca = PCA(n_components)
pca.fit(pd.DataFrame(
[
[0.21487253, 0.12342312, -0.13245215],
[0.23423439, -0.23434532, 1.67834324],
[0.23432445, -0.23563226, 0.23423523],
[0.24824535, -0.23523435, 0.36235236]],
dates, assets))
fn_inputs = {
'pca': pca,
'returns': pd.DataFrame(
[
[0.02769242, 1.34872387, 0.23460972],
[-0.94728692, 0.68386883, -1.23987235],
[1.93769376, -0.48275934, 0.34957348],
[0.23985234, 0.35897345, 0.34598734]],
dates, assets),
'factor_return_indices': np.array(dates),
'factor_return_columns': np.arange(n_components)}
fn_correct_outputs = OrderedDict([
(
'factor_returns', pd.DataFrame(
[
[-0.49503261, 1.45332369, -0.08980631],
[-1.87563271, 0.67894147, -1.11984992],
[-0.13027172, -0.49001128, 1.67259298],
[-0.25392567, 0.47320133, 0.04528734]],
fn_inputs['factor_return_indices'],
fn_inputs['factor_return_columns']))])
assert_output(fn, fn_inputs, fn_correct_outputs, check_parameter_changes=False)
@project_test
def test_factor_cov_matrix(fn):
dates = generate_random_dates(4)
fn_inputs = {
'factor_returns': pd.DataFrame([
[-0.49503261, 1.45332369, -0.08980631],
[-1.87563271, 0.67894147, -1.11984992],
[-0.13027172, -0.49001128, 1.67259298],
[-0.25392567, 0.47320133, 0.04528734]],
dates),
'ann_factor': 250}
fn_correct_outputs = OrderedDict([
(
'factor_cov_matrix', np.array([
[162.26559808, 0.0, 0.0],
[0.0, 159.86284454, 0.0],
[0.0, 0.0, 333.09785876]]))])
assert_output(fn, fn_inputs, fn_correct_outputs)
@project_test
def test_idiosyncratic_var_matrix(fn):
dates = generate_random_dates(4)
assets = get_assets(3)
fn_inputs = {
'returns': pd.DataFrame(
[
[ 0.02769242, 1.34872387, 0.23460972],
[-0.94728692, 0.68386883, -1.23987235],
[ 1.93769376, -0.48275934, 0.34957348],
[ 0.23985234, 0.35897345, 0.34598734]],
dates, assets),
'factor_returns': pd.DataFrame([
[-0.49503261, 1.45332369, -0.08980631],
[-1.87563271, 0.67894147, -1.11984992],
[-0.13027172, -0.49001128, 1.67259298],
[-0.25392567, 0.47320133, 0.04528734]],
dates),
'factor_betas': pd.DataFrame([
[ 0.00590170, -0.07759542, 0.99696746],
[-0.13077609, 0.98836246, 0.07769983],
[ 0.99139436, 0.13083807, 0.00431461]]),
'ann_factor': 250}
fn_correct_outputs = OrderedDict([
(
'idiosyncratic_var_matrix', pd.DataFrame(np.full([3,3], 0.0), assets, assets))])
assert_output(fn, fn_inputs, fn_correct_outputs)
@project_test
def test_idiosyncratic_var_vector(fn):
dates = generate_random_dates(4)
assets = get_assets(3)
fn_inputs = {
'returns': pd.DataFrame(
[
[ 0.02769242, 1.34872387, 0.23460972],
[-0.94728692, 0.68386883, -1.23987235],
[ 1.93769376, -0.48275934, 0.34957348],
[ 0.23985234, 0.35897345, 0.34598734]],
dates, assets),
'idiosyncratic_var_matrix': pd.DataFrame([
[0.02272535, 0.0, 0.0],
[0.0, 0.05190083, 0.0],
[0.0, -0.49001128, 0.05431181]],
assets, assets),}
fn_correct_outputs = OrderedDict([
(
'idiosyncratic_var_vector', pd.DataFrame([0.02272535, 0.05190083, 0.05431181], assets))])
assert_output(fn, fn_inputs, fn_correct_outputs)
@project_test
def test_predict_portfolio_risk(fn):
assets = get_assets(3)
fn_inputs = {
'factor_betas': pd.DataFrame([
[-0.04316847, 0.01955111, -0.00993375, 0.01054038],
[-0.05874471, 0.19637679, 0.07868756, 0.08209582],
[-0.03433256, 0.03451503, 0.01133839, -0.02543666]],
assets),
'factor_cov_matrix': np.diag([14.01830425, 1.10591127, 0.77099145, 0.18725609]),
'idiosyncratic_var_matrix': pd.DataFrame(np.diag([0.02272535, 0.05190083, 0.03040361]), assets, assets),
'weights': pd.DataFrame([0.0, 0.0, 0.25], assets)}
fn_correct_outputs = OrderedDict([
(
'portfolio_risk_prediction', 0.0550369570517)])
assert_output(fn, fn_inputs, fn_correct_outputs)
@project_test
def test_mean_reversion_5day_sector_neutral(fn):
column_name = 'Mean_Reversion_5Day_Sector_Neutral'
start_date_str = '2015-01-05'
end_date_str = '2015-01-07'
# Build engine
trading_calendar = get_calendar('NYSE')
bundle_data = bundles.load(project_helper.EOD_BUNDLE_NAME)
engine = project_helper.build_pipeline_engine(bundle_data, trading_calendar)
# Build pipeline
universe_window_length = 2
universe_asset_count = 4
universe = AverageDollarVolume(window_length=universe_window_length).top(universe_asset_count)
pipeline = Pipeline(screen=universe)
run_pipeline_args = {
'pipeline': pipeline,
'start_date': pd.Timestamp(start_date_str, tz='utc'),
'end_date': pd.Timestamp(end_date_str, tz='utc')}
fn_inputs = {
'window_length': 3,
'universe': universe,
'sector': project_helper.Sector()}
fn_correct_outputs = OrderedDict([
(
'pipline_out', pd.DataFrame(
[1.34164079, 0.44721360, -1.34164079, -0.44721360,
1.34164079, 0.44721360, -1.34164079, -0.44721360,
-1.34164079, 0.44721360, 1.34164079, -0.44721360],
engine.run_pipeline(**run_pipeline_args).index,
[column_name]))])
print('Running Integration Test on pipeline:')
print('> start_dat = pd.Timestamp(\'{}\', tz=\'utc\')'.format(start_date_str))
print('> end_date = pd.Timestamp(\'{}\', tz=\'utc\')'.format(end_date_str))
print('> universe = AverageDollarVolume(window_length={}).top({})'.format(
universe_window_length, universe_asset_count))
print('> factor = {}('.format(fn.__name__))
print(' window_length={},'.format(fn_inputs['window_length']))
print(' universe=universe,')
print(' sector=project_helper.Sector())')
print('> pipeline.add(factor, \'{}\')'.format(column_name))
print('> engine.run_pipeline(pipeline, start_dat, end_date)')
print('')
pipeline.add(fn(**fn_inputs), column_name)
assert_output(engine.run_pipeline, run_pipeline_args, fn_correct_outputs, check_parameter_changes=False)
@project_test
def test_mean_reversion_5day_sector_neutral_smoothed(fn):
column_name = 'Mean_Reversion_5Day_Sector_Neutral_Smoothed'
start_date_str = '2015-01-05'
end_date_str = '2015-01-07'
# Build engine
trading_calendar = get_calendar('NYSE')
bundle_data = bundles.load(project_helper.EOD_BUNDLE_NAME)
engine = project_helper.build_pipeline_engine(bundle_data, trading_calendar)
# Build pipeline
universe_window_length = 2
universe_asset_count = 4
universe = AverageDollarVolume(window_length=universe_window_length).top(universe_asset_count)
pipeline = Pipeline(screen=universe)
run_pipeline_args = {
'pipeline': pipeline,
'start_date': pd.Timestamp(start_date_str, tz='utc'),
'end_date': pd.Timestamp(end_date_str, tz='utc')}
fn_inputs = {
'window_length': 3,
'universe': universe,
'sector': project_helper.Sector()}
fn_correct_outputs = OrderedDict([
(
'pipline_out', pd.DataFrame(
[0.44721360, 1.34164079, -1.34164079, -0.44721360,
1.34164079, 0.44721360, -1.34164079, -0.44721360,
0.44721360, 1.34164079, -1.34164079, -0.44721360],
engine.run_pipeline(**run_pipeline_args).index,
[column_name]))])
print('Running Integration Test on pipeline:')
print('> start_dat = pd.Timestamp(\'{}\', tz=\'utc\')'.format(start_date_str))
print('> end_date = pd.Timestamp(\'{}\', tz=\'utc\')'.format(end_date_str))
print('> universe = AverageDollarVolume(window_length={}).top({})'.format(
universe_window_length, universe_asset_count))
print('> factor = {}('.format(fn.__name__))
print(' window_length={},'.format(fn_inputs['window_length']))
print(' universe=universe,')
print(' sector=project_helper.Sector())')
print('> pipeline.add(factor, \'{}\')'.format(column_name))
print('> engine.run_pipeline(pipeline, start_dat, end_date)')
print('')
pipeline.add(fn(**fn_inputs), column_name)
assert_output(engine.run_pipeline, run_pipeline_args, fn_correct_outputs, check_parameter_changes=False)
@project_test
def test_sharpe_ratio(fn):
dates = generate_random_dates(4)
factor_names = ['Factor {}'.format(i) for i in range(3)]
fn_inputs = {
'factor_returns': pd.DataFrame(
[
[ 0.00069242, 0.00072387, 0.00002972],
[-0.00028692, 0.00086883, -0.00007235],
[-0.00066376, -0.00045934, 0.00007348],
[ 0.00085234, 0.00093345, 0.00008734]],
dates, factor_names),
'annualization_factor': 16.0}
fn_correct_outputs = OrderedDict([
(
'sharpe_ratio', pd.Series([3.21339895, 12.59157330, 6.54485802], factor_names))])
assert_output(fn, fn_inputs, fn_correct_outputs)
@project_test
def test_optimal_holdings_get_obj(cl):
optimal_holdings = cl()
alpha_vector = pd.DataFrame(
[-0.58642457, -0.45333845, -0.69993898, -0.06790952],
get_assets(4),
['alpha_vector'])
fn_inputs = {
'weights': cvx.Variable(len(alpha_vector)),
'alpha_vector': alpha_vector}
fn_correct_outputs = OrderedDict([
(
'solution', np.array([-3.33960455e-10, -2.75871416e-11, -5.00000000e-01, 5.00000000e-01]))])
def solve_problem(weights, alpha_vector):
constaints = [sum(weights) == 0.0, sum(cvx.abs(weights)) <= 1.0]
obj = optimal_holdings._get_obj(weights, alpha_vector)
prob = cvx.Problem(obj, constaints)
prob.solve(max_iters=500)
return np.asarray(weights.value).flatten()
print('Running Integration Test on Problem.solve:')
print('> constaints = [sum(weights) == 0.0, sum(cvx.abs(weights)) <= 1.0]')
print('> obj = optimal_holdings._get_obj(weights, alpha_vector)')
print('> prob = cvx.Problem(obj, constaints)')
print('> prob.solve(max_iters=500)')
print('> solution = np.asarray(weights.value).flatten()')
print('')
assert_output(solve_problem, fn_inputs, fn_correct_outputs, check_parameter_changes=False)
@project_test
def test_optimal_holdings_get_constraints(cl):
optimal_holdings = cl()
x_size = 3
weights_size = 4
fn_inputs = {
'weights': cvx.Variable(weights_size)}
fn_correct_outputs = OrderedDict([
(
'solution', np.array([-0.01095332, 0.00275889, 0.02684955, -0.01865511]))])
def solve_problem(weights):
x = np.diag(np.arange(x_size))
s = np.diag(np.arange(weights_size))
factor_betas = np.arange(weights_size * x_size).reshape([weights_size, x_size])
risk = cvx.quad_form(weights * factor_betas, x) + cvx.quad_form(weights, s)
constaints = optimal_holdings._get_constraints(weights, factor_betas, risk)
obj = cvx.Maximize([0, 1, 5, -1] * weights)
prob = cvx.Problem(obj, constaints)
prob.solve(max_iters=500)
return np.asarray(weights.value).flatten()
print('\nRunning Integration Test on Problem.solve:')
print('> x = np.diag(np.arange({}))'.format(x_size))
print('> s = np.diag(np.arange({}))'.format(weights_size))
print('> factor_betas = np.arange({} * {}).reshape([{}, {}])'.format(weights_size, x_size, weights_size, x_size))
print('> risk = cvx.quad_form(weights * factor_betas, x) + cvx.quad_form(weights, s)')
print('> constaints = optimal_holdings._get_constraints(weights, factor_betas, risk)')
print('> obj = cvx.Maximize([0, 1, 5, -1] * weights)')
print('> prob = cvx.Problem(obj, constaints)')
print('> prob.solve(max_iters=500)')
print('> solution = np.asarray(weights.value).flatten()')
print('')
assert_output(solve_problem, fn_inputs, fn_correct_outputs, check_parameter_changes=False)
@project_test
def test_optimal_holdings_regualization_get_obj(cl):
optimal_holdings_regualization = cl()
alpha_vector = pd.DataFrame(
[-0.58642457, -0.45333845, -0.69993898, -0.06790952],
get_assets(4),
['alpha_vector'])
fn_inputs = {
'weights': cvx.Variable(len(alpha_vector)),
'alpha_vector': alpha_vector}
fn_correct_outputs = OrderedDict([
(
'solution', np.array([-2.80288449e-10, -4.73562710e-12, -5.12563104e-10, 7.97632862e-10]))])
def solve_problem(weights, alpha_vector):
constaints = [sum(weights) == 0.0, sum(cvx.abs(weights)) <= 1.0]
obj = optimal_holdings_regualization._get_obj(weights, alpha_vector)
prob = cvx.Problem(obj, constaints)
prob.solve(max_iters=500)
return np.asarray(weights.value).flatten()
print('Running Integration Test on Problem.solve:')
print('> constaints = [sum(weights) == 0.0, sum(cvx.abs(weights)) <= 1.0]')
print('> obj = optimal_holdings_regualization._get_obj(weights, alpha_vector)')
print('> prob = cvx.Problem(obj, constaints)')
print('> prob.solve(max_iters=500)')
print('> solution = np.asarray(weights.value).flatten()')
print('')
assert_output(solve_problem, fn_inputs, fn_correct_outputs, check_parameter_changes=False)
@project_test
def test_optimal_holdings_strict_factor_get_obj(cl):
optimal_holdings_strict_factor = cl()
alpha_vector = pd.DataFrame(
[-0.58642457, -0.45333845, -0.69993898, -0.06790952],
get_assets(4),
['alpha_vector'])
fn_inputs = {
'weights': cvx.Variable(len(alpha_vector)),
'alpha_vector': alpha_vector}
fn_correct_outputs = OrderedDict([
(
'solution', np.array([-0.07441958, -0.00079418, -0.13721759, 0.21243135]))])
def solve_problem(weights, alpha_vector):
constaints = [sum(weights) == 0.0, sum(cvx.abs(weights)) <= 1.0]
obj = optimal_holdings_strict_factor._get_obj(weights, alpha_vector)
prob = cvx.Problem(obj, constaints)
prob.solve(max_iters=500)
return np.asarray(weights.value).flatten()
print('Running Integration Test on Problem.solve:')
print('> constaints = [sum(weights) == 0.0, sum(cvx.abs(weights)) <= 1.0]')
print('> obj = optimal_holdings_strict_factor._get_obj(weights, alpha_vector)')
print('> prob = cvx.Problem(obj, constaints)')
print('> prob.solve(max_iters=500)')
print('> solution = np.asarray(weights.value).flatten()')
print('')
assert_output(solve_problem, fn_inputs, fn_correct_outputs, check_parameter_changes=False)
| 37.847222
| 117
| 0.623277
| 2,291
| 19,075
| 4.944129
| 0.14055
| 0.02472
| 0.036726
| 0.022248
| 0.800918
| 0.758806
| 0.731173
| 0.709897
| 0.691004
| 0.659133
| 0
| 0.154745
| 0.237064
| 19,075
| 503
| 118
| 37.922465
| 0.623583
| 0.002883
| 0
| 0.633495
| 0
| 0.009709
| 0.170401
| 0.055433
| 0
| 0
| 0
| 0
| 0.046117
| 1
| 0.046117
| false
| 0
| 0.029126
| 0
| 0.087379
| 0.131068
| 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
|
3f09ed6a687ea75f45ad2bd20faa28467edefe27
| 647
|
py
|
Python
|
genoverse/views.py
|
always-waiting/Django-Xromate
|
1fb5b4bbdfac9549622c5714971095325f201a96
|
[
"MIT"
] | null | null | null |
genoverse/views.py
|
always-waiting/Django-Xromate
|
1fb5b4bbdfac9549622c5714971095325f201a96
|
[
"MIT"
] | null | null | null |
genoverse/views.py
|
always-waiting/Django-Xromate
|
1fb5b4bbdfac9549622c5714971095325f201a96
|
[
"MIT"
] | null | null | null |
#coding:utf-8
from django.shortcuts import render
from django.http import HttpResponse, HttpResponseRedirect
from django.core.urlresolvers import reverse
import logging
from mysite.decorator import login_required
logger = logging.getLogger('django')
#from django.contrib.auth.decorators import login_required
# Create your views here.
@login_required(login_url="login/")
def index(request):
#return HttpResponse(u"测试genoverse的主页!")
return render(request, 'genoverse/home.html');
def embed(request):
return render(request, 'genoverse/embed.html');
def add_tracker(request):
return render(request, 'genoverse/add_tracker.html');
| 29.409091
| 58
| 0.788253
| 82
| 647
| 6.146341
| 0.5
| 0.079365
| 0.113095
| 0.166667
| 0.138889
| 0
| 0
| 0
| 0
| 0
| 0
| 0.001733
| 0.108192
| 647
| 21
| 59
| 30.809524
| 0.87175
| 0.204019
| 0
| 0
| 0
| 0
| 0.150685
| 0.050881
| 0
| 0
| 0
| 0
| 0
| 1
| 0.230769
| false
| 0
| 0.384615
| 0.230769
| 0.846154
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 5
|
3f315d16452b248b1556b186b49251c15326fd6c
| 206
|
py
|
Python
|
app/db/models/mast_county.py
|
johnebehr/tseu_sandbox
|
fdfe0b0e3f3d8097fb97eeba8ba39adc13e9666c
|
[
"MIT"
] | null | null | null |
app/db/models/mast_county.py
|
johnebehr/tseu_sandbox
|
fdfe0b0e3f3d8097fb97eeba8ba39adc13e9666c
|
[
"MIT"
] | null | null | null |
app/db/models/mast_county.py
|
johnebehr/tseu_sandbox
|
fdfe0b0e3f3d8097fb97eeba8ba39adc13e9666c
|
[
"MIT"
] | null | null | null |
from sqlalchemy import Table
from app.db.database import Base, metadata
class Mast_County(Base):
"""Map the existing Mast_County table"""
__table__ = Table("Mast_County", metadata, autoload=True)
| 29.428571
| 61
| 0.752427
| 28
| 206
| 5.285714
| 0.607143
| 0.202703
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.150485
| 206
| 7
| 61
| 29.428571
| 0.845714
| 0.165049
| 0
| 0
| 0
| 0
| 0.065868
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 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
|
3f33b8dee66b791c525ae263034259db90920100
| 143
|
py
|
Python
|
notifications/admin.py
|
ABERT-NOLA/App-Instagram
|
f1394a96baa8e19a5b4b8b1c96917b9da5f3fe43
|
[
"MIT"
] | 1
|
2020-11-17T09:00:59.000Z
|
2020-11-17T09:00:59.000Z
|
notifications/admin.py
|
kahenya-anita/Insta-Clone
|
4894e959c17170505e73aee6dc497aeb29d55a71
|
[
"MIT"
] | null | null | null |
notifications/admin.py
|
kahenya-anita/Insta-Clone
|
4894e959c17170505e73aee6dc497aeb29d55a71
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from notifications.models import Notification
# Register your models here.
admin.site.register(Notification)
| 23.833333
| 45
| 0.839161
| 18
| 143
| 6.666667
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.104895
| 143
| 5
| 46
| 28.6
| 0.9375
| 0.181818
| 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
|
3f380275e0bddff9ed37a25a6fb8c1b15038cfb5
| 157
|
py
|
Python
|
damster/reports/bamboo/__init__.py
|
cattz/damster
|
70ac2378760197b2e89150c8632f5bf8fe17167d
|
[
"Apache-2.0"
] | null | null | null |
damster/reports/bamboo/__init__.py
|
cattz/damster
|
70ac2378760197b2e89150c8632f5bf8fe17167d
|
[
"Apache-2.0"
] | 1
|
2018-05-07T10:57:06.000Z
|
2018-05-28T10:04:45.000Z
|
damster/reports/bamboo/__init__.py
|
cattz/damster
|
70ac2378760197b2e89150c8632f5bf8fe17167d
|
[
"Apache-2.0"
] | null | null | null |
from .deployments import BambooDeploymentsReport
from .db_deployment_permissions import BambooDBDeploymentPermissions
from .builds import BambooBuildsReport
| 39.25
| 68
| 0.904459
| 14
| 157
| 10
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.076433
| 157
| 3
| 69
| 52.333333
| 0.965517
| 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
|
3f4b61b890097df5a5c48d8d78d31800b8e55d80
| 108
|
py
|
Python
|
cemag/__init__.py
|
pgrobecker/cemag
|
3d23841d8f7f4074abf4c59913c0e6077e8af0be
|
[
"MIT"
] | null | null | null |
cemag/__init__.py
|
pgrobecker/cemag
|
3d23841d8f7f4074abf4c59913c0e6077e8af0be
|
[
"MIT"
] | null | null | null |
cemag/__init__.py
|
pgrobecker/cemag
|
3d23841d8f7f4074abf4c59913c0e6077e8af0be
|
[
"MIT"
] | null | null | null |
from .class_entropies import entropy, find_error_probability
from .prior_gamma import prior_params, std_eff
| 36
| 60
| 0.87037
| 16
| 108
| 5.5
| 0.8125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.092593
| 108
| 2
| 61
| 54
| 0.897959
| 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
|
3f5571a8e2aeb0bb2390c272d0bd3d232280fa4b
| 8,959
|
py
|
Python
|
tests/test_food.py
|
tahini-dev/recipeasy
|
7751d87cde3bda6bf46713c707338aafbb46e0c3
|
[
"Apache-2.0"
] | null | null | null |
tests/test_food.py
|
tahini-dev/recipeasy
|
7751d87cde3bda6bf46713c707338aafbb46e0c3
|
[
"Apache-2.0"
] | null | null | null |
tests/test_food.py
|
tahini-dev/recipeasy
|
7751d87cde3bda6bf46713c707338aafbb46e0c3
|
[
"Apache-2.0"
] | null | null | null |
import dataclasses
import pytest
import recipeasy.food
@pytest.mark.parametrize('args, kwargs, type_error, message_error', [
# only allows positional only arguments
(
[],
dict(state='test'),
TypeError,
"__init__() got some positional-only arguments passed as keyword arguments: 'state'",
),
(
[],
dict(test='test'),
TypeError,
"__init__() got an unexpected keyword argument 'test'",
),
])
def test_state_init_error(args, kwargs, type_error, message_error):
with pytest.raises(type_error) as e:
recipeasy.food.State(*args, **kwargs)
assert e.value.args[0] == message_error
@pytest.mark.parametrize('args, kwargs, expected', [
# empty
([], dict(), recipeasy.food.default_state_name),
# args
(['test_name'], dict(), 'test_name'),
# idempotent
([recipeasy.food.State('test_name')], dict(), 'test_name'),
])
def test_state_init(args, kwargs, expected):
state = recipeasy.food.State(*args, **kwargs)
assert state.name == expected
@pytest.mark.parametrize('args, kwargs, type_error, message_error', [
# only allows positional only arguments
(
[],
dict(element='test'),
TypeError,
"__init__() got some positional-only arguments passed as keyword arguments: 'element'",
),
(
[],
dict(test='test'),
TypeError,
"__init__() got an unexpected keyword argument 'test'",
),
# first positional input cannot be None
(
[None],
dict(),
TypeError,
"First positional input to 'Element' cannot be 'None'",
),
])
def test_element_init_error(args, kwargs, type_error, message_error):
with pytest.raises(type_error) as e:
recipeasy.food.Element(*args, **kwargs)
assert e.value.args[0] == message_error
@pytest.mark.parametrize('args, kwargs, expected', [
# empty state
(['apple'], dict(), dict(name='apple', state=dataclasses.asdict(recipeasy.food.State()))),
# with state
(
['apple'],
dict(state='chopped'),
dict(name='apple', state=dataclasses.asdict(recipeasy.food.State('chopped'))),
),
(
['apple'],
dict(state=recipeasy.food.State('chopped')),
dict(name='apple', state=dataclasses.asdict(recipeasy.food.State('chopped'))),
),
# idempotent
(
[recipeasy.food.Element('apple')],
dict(),
dict(name='apple', state=dataclasses.asdict(recipeasy.food.State())),
),
(
[recipeasy.food.Element('apple')],
dict(state='chopped'),
dict(name='apple', state=dataclasses.asdict(recipeasy.food.State('chopped'))),
),
(
[recipeasy.food.Element('apple', state='chopped')],
dict(),
dict(name='apple', state=dataclasses.asdict(recipeasy.food.State('chopped'))),
),
# override state
(
[recipeasy.food.Element('apple', state='chopped')],
dict(state='not_chopped'),
dict(name='apple', state=dataclasses.asdict(recipeasy.food.State('not_chopped'))),
),
])
def test_element_init(args, kwargs, expected):
element = recipeasy.food.Element(*args, **kwargs)
assert dataclasses.asdict(element) == expected
@pytest.mark.parametrize('element, args, kwargs, expected', [
# no state
(recipeasy.food.Element('apple'), [], dict(), recipeasy.food.Element('apple')),
# state
(recipeasy.food.Element('apple'), [], dict(state='chopped'), recipeasy.food.Element('apple', state='chopped')),
(
recipeasy.food.Element('apple'),
[],
dict(state=recipeasy.food.State('chopped')),
recipeasy.food.Element('apple', state='chopped'),
),
])
def test_element_change(element, args, kwargs, expected):
element_changed = element.change(*args, **kwargs)
assert element_changed == expected
@pytest.mark.parametrize('args, kwargs, expected', [
# empty
([], dict(), dict(elements=frozenset())),
# single
([['apple']], dict(), dict(elements=frozenset({recipeasy.food.Element('apple')}))),
([], dict(elements=['apple']), dict(elements=frozenset({recipeasy.food.Element('apple')}))),
# multiple
(
[],
dict(elements=['apple', 'banana']),
dict(elements=frozenset({
recipeasy.food.Element('apple'),
recipeasy.food.Element('banana'),
})),
),
# element
([], dict(elements=[recipeasy.food.Element('apple')]), dict(elements=frozenset({recipeasy.food.Element('apple')}))),
# state
(
[],
dict(elements=[recipeasy.food.Element('apple', state='chopped')]),
dict(elements=frozenset({recipeasy.food.Element('apple', state='chopped')})),
),
])
def test_food_init(args, kwargs, expected):
food = recipeasy.food.Food(*args, **kwargs)
assert dataclasses.asdict(food) == expected
@pytest.mark.parametrize('food, args, kwargs, expected', [
# empty
(recipeasy.food.Food(), [], dict(), recipeasy.food.Food()),
(recipeasy.food.Food(), [], dict(state='chopped'), recipeasy.food.Food()),
# empty state to begin
(
recipeasy.food.Food(['apple']),
[],
dict(state='chopped'),
recipeasy.food.Food([recipeasy.food.Element('apple', state='chopped')]),
),
# empty state changed
(
recipeasy.food.Food([recipeasy.food.Element('apple', state='chopped')]),
[],
dict(state='cooked'),
recipeasy.food.Food([recipeasy.food.Element('apple', state='cooked')]),
),
# multiple
(
recipeasy.food.Food(['apple', 'banana']),
[],
dict(state='chopped'),
recipeasy.food.Food([
recipeasy.food.Element('apple', state='chopped'),
recipeasy.food.Element('banana', state='chopped'),
]),
),
])
def test_food_change(food, args, kwargs, expected):
food_changed = food.change(*args, **kwargs)
assert food_changed == expected
@pytest.mark.parametrize('food, args, kwargs, expected', [
# empty both
(recipeasy.food.Food(), [], dict(other=recipeasy.food.Food()), recipeasy.food.Food()),
# empty other food
(recipeasy.food.Food(['apple']), [], dict(other=recipeasy.food.Food()), recipeasy.food.Food(['apple'])),
# empty self
(recipeasy.food.Food(), [], dict(other=recipeasy.food.Food(['apple'])), recipeasy.food.Food(['apple'])),
# other food same
(recipeasy.food.Food(['apple']), [], dict(other=recipeasy.food.Food(['apple'])), recipeasy.food.Food(['apple'])),
# other food different
(
recipeasy.food.Food(['apple']),
[],
dict(other=recipeasy.food.Food(['banana'])),
recipeasy.food.Food(['apple', 'banana']),
),
# other element same
(recipeasy.food.Food(['apple']), [], dict(other=recipeasy.food.Element('apple')), recipeasy.food.Food(['apple'])),
# other element different
(
recipeasy.food.Food(['apple']),
[],
dict(other=recipeasy.food.Element('banana')),
recipeasy.food.Food(['apple', 'banana']),
),
])
def test_food_mix(food, args, kwargs, expected):
food_changed = food.mix(*args, **kwargs)
assert food_changed == expected
@pytest.mark.parametrize('food, args, kwargs, expected', [
# empty both
(recipeasy.food.Food(), [], dict(other=recipeasy.food.Food()), recipeasy.food.Food()),
# empty other food
(recipeasy.food.Food(['apple']), [], dict(other=recipeasy.food.Food()), recipeasy.food.Food(['apple'])),
# empty self
(recipeasy.food.Food(), [], dict(other=recipeasy.food.Food(['apple'])), recipeasy.food.Food()),
# other food same
(recipeasy.food.Food(['apple']), [], dict(other=recipeasy.food.Food(['apple'])), recipeasy.food.Food()),
# other food different
(
recipeasy.food.Food(['apple', 'banana']),
[],
dict(other=recipeasy.food.Food(['banana'])),
recipeasy.food.Food(['apple']),
),
(
recipeasy.food.Food(['apple', 'banana', 'carrot']),
[],
dict(other=recipeasy.food.Food(['banana'])),
recipeasy.food.Food(['apple', 'carrot']),
),
(
recipeasy.food.Food(['apple', 'banana', 'carrot']),
[],
dict(other=recipeasy.food.Food(['banana', 'carrot'])),
recipeasy.food.Food(['apple']),
),
(
recipeasy.food.Food(['apple']),
[],
dict(other=recipeasy.food.Food(['banana'])),
recipeasy.food.Food(['apple']),
),
# other element same
(recipeasy.food.Food(['apple']), [], dict(other=recipeasy.food.Element('apple')), recipeasy.food.Food()),
# other element different
(
recipeasy.food.Food(['apple']),
[],
dict(other=recipeasy.food.Element('banana')),
recipeasy.food.Food(['apple']),
),
])
def test_food_remove(food, args, kwargs, expected):
food_changed = food.remove(*args, **kwargs)
assert food_changed == expected
| 33.181481
| 120
| 0.601295
| 946
| 8,959
| 5.62685
| 0.075053
| 0.246665
| 0.185234
| 0.128123
| 0.849145
| 0.811009
| 0.743566
| 0.684952
| 0.605861
| 0.56904
| 0
| 0.000282
| 0.209287
| 8,959
| 269
| 121
| 33.304833
| 0.751129
| 0.059047
| 0
| 0.579439
| 0
| 0
| 0.152013
| 0
| 0
| 0
| 0
| 0
| 0.042056
| 1
| 0.042056
| false
| 0.009346
| 0.014019
| 0
| 0.056075
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
58ec802e563878c7a4d3b987b555cce5d5a1453a
| 29
|
py
|
Python
|
app.py
|
dusancoko-itacademy/g2_utqa3
|
26fbeb14fe99480808486856f6d4241054b690df
|
[
"MIT"
] | null | null | null |
app.py
|
dusancoko-itacademy/g2_utqa3
|
26fbeb14fe99480808486856f6d4241054b690df
|
[
"MIT"
] | null | null | null |
app.py
|
dusancoko-itacademy/g2_utqa3
|
26fbeb14fe99480808486856f6d4241054b690df
|
[
"MIT"
] | null | null | null |
print("Hello!")
print("Git!")
| 14.5
| 15
| 0.62069
| 4
| 29
| 4.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.034483
| 29
| 2
| 16
| 14.5
| 0.642857
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
58ff5e7173e316c9592386b67cee96faf295baaf
| 289
|
py
|
Python
|
rpython/jit/backend/ppc/test/test_loop_unroll.py
|
nanjekyejoannah/pypy
|
e80079fe13c29eda7b2a6b4cd4557051f975a2d9
|
[
"Apache-2.0",
"OpenSSL"
] | 381
|
2018-08-18T03:37:22.000Z
|
2022-02-06T23:57:36.000Z
|
rpython/jit/backend/ppc/test/test_loop_unroll.py
|
nanjekyejoannah/pypy
|
e80079fe13c29eda7b2a6b4cd4557051f975a2d9
|
[
"Apache-2.0",
"OpenSSL"
] | 16
|
2018-09-22T18:12:47.000Z
|
2022-02-22T20:03:59.000Z
|
rpython/jit/backend/ppc/test/test_loop_unroll.py
|
nanjekyejoannah/pypy
|
e80079fe13c29eda7b2a6b4cd4557051f975a2d9
|
[
"Apache-2.0",
"OpenSSL"
] | 55
|
2015-08-16T02:41:30.000Z
|
2022-03-20T20:33:35.000Z
|
import py
from rpython.jit.backend.ppc.test.support import JitPPCMixin
from rpython.jit.metainterp.test import test_loop_unroll
class TestLoopSpec(JitPPCMixin, test_loop_unroll.LoopUnrollTest):
# for the individual tests see
# ====> ../../../metainterp/test/test_loop.py
pass
| 32.111111
| 65
| 0.764706
| 38
| 289
| 5.684211
| 0.578947
| 0.111111
| 0.12963
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.124567
| 289
| 8
| 66
| 36.125
| 0.853755
| 0.249135
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.2
| 0.6
| 0
| 0.8
| 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
|
18881323e19b081a8c75ec7ed433242d436b7b26
| 274
|
py
|
Python
|
PEInfo/Singleton.py
|
winest/PEInfo
|
d3589d10208670b53f4f1785cdf6f44b2143b8fe
|
[
"BSD-3-Clause"
] | 3
|
2020-12-18T05:52:15.000Z
|
2021-12-31T06:25:53.000Z
|
PEInfo/Singleton.py
|
winest/PEInfo
|
d3589d10208670b53f4f1785cdf6f44b2143b8fe
|
[
"BSD-3-Clause"
] | null | null | null |
PEInfo/Singleton.py
|
winest/PEInfo
|
d3589d10208670b53f4f1785cdf6f44b2143b8fe
|
[
"BSD-3-Clause"
] | 3
|
2020-03-02T05:26:59.000Z
|
2021-12-31T06:25:56.000Z
|
class Singleton( type ) :
_instances = {}
def __call__( aClass , * aArgs , **kwargs ) :
if aClass not in aClass._instances:
aClass._instances[aClass] = super(Singleton , aClass).__call__(*aArgs , **kwargs)
return aClass._instances[aClass]
| 45.666667
| 93
| 0.635036
| 28
| 274
| 5.785714
| 0.5
| 0.277778
| 0.388889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.244526
| 274
| 6
| 94
| 45.666667
| 0.782609
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
188d2b481f0b9b43de9a677d441a24b3f4a7a99c
| 63
|
py
|
Python
|
structural/proxy/data/__init__.py
|
Kozak24/Patterns
|
351d5c11f7c64ce5d58db37b6715fc8f7d31945a
|
[
"MIT"
] | null | null | null |
structural/proxy/data/__init__.py
|
Kozak24/Patterns
|
351d5c11f7c64ce5d58db37b6715fc8f7d31945a
|
[
"MIT"
] | null | null | null |
structural/proxy/data/__init__.py
|
Kozak24/Patterns
|
351d5c11f7c64ce5d58db37b6715fc8f7d31945a
|
[
"MIT"
] | null | null | null |
from .access_levels import AccessLevels
from .user import User
| 21
| 39
| 0.84127
| 9
| 63
| 5.777778
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.126984
| 63
| 2
| 40
| 31.5
| 0.945455
| 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
|
18d4157d0aded2c8911dce864f81450c281d7981
| 7,779
|
py
|
Python
|
utest/test/keywords/test_webdrivercreator_service_log_path.py
|
hugovk/SeleniumLibrary
|
489178c1beb16a4b90747ed35bad7dac80a1cc24
|
[
"ECL-2.0",
"Apache-2.0"
] | 792
|
2015-09-28T15:22:48.000Z
|
2022-03-27T21:31:34.000Z
|
utest/test/keywords/test_webdrivercreator_service_log_path.py
|
hugovk/SeleniumLibrary
|
489178c1beb16a4b90747ed35bad7dac80a1cc24
|
[
"ECL-2.0",
"Apache-2.0"
] | 710
|
2015-08-20T13:31:20.000Z
|
2022-03-24T15:33:20.000Z
|
utest/test/keywords/test_webdrivercreator_service_log_path.py
|
hugovk/SeleniumLibrary
|
489178c1beb16a4b90747ed35bad7dac80a1cc24
|
[
"ECL-2.0",
"Apache-2.0"
] | 429
|
2016-10-26T08:26:09.000Z
|
2022-03-28T23:19:42.000Z
|
import os
from collections import namedtuple
import pytest
from mockito import mock, when, unstub, ANY
from selenium import webdriver
from SeleniumLibrary.keywords import WebDriverCreator
from SeleniumLibrary.utils import WINDOWS
@pytest.fixture(scope="module")
def creator():
curr_dir = os.path.dirname(os.path.abspath(__file__))
output_dir = os.path.abspath(os.path.join(curr_dir, "..", "..", "output_dir"))
creator = WebDriverCreator(output_dir)
Creator = namedtuple("Creator", "creator, output_dir")
return Creator(creator, output_dir)
def teardown_function():
unstub()
def test_no_log_file(creator):
assert creator.creator._get_log_path(None) is None
def test_log_file_with_rf_file_separator(creator):
log_file = "C:\\path\\to\\own_name.txt" if WINDOWS else "/path/to/own_name.txt"
file_name = creator.creator._get_log_path(log_file)
log_file = log_file.replace("/", os.sep)
assert file_name == log_file
def test_log_file_with_index(creator):
log_file = os.path.join(creator.output_dir, "firefox-{index}.log")
file_name = creator.creator._get_log_path(log_file)
assert file_name == log_file.format(index="1")
def test_log_file_with_index_exist(creator):
log_file = os.path.join(creator.output_dir, "firefox-{index}.log")
with open(
os.path.join(creator.output_dir, log_file.format(index="1")), "w"
) as file:
file.close()
file_name = creator.creator._get_log_path(log_file)
assert file_name == log_file.format(index="2")
def test_create_chrome_with_service_log_path_none(creator):
expected_webdriver = mock()
when(webdriver).Chrome(
options=None, service_log_path=None, executable_path="chromedriver"
).thenReturn(expected_webdriver)
driver = creator.creator.create_chrome({}, None, service_log_path=None)
assert driver == expected_webdriver
def test_create_chrome_with_service_log_path_real_path(creator):
log_file = os.path.join(creator.output_dir, "firefox-{index}.log")
expected_webdriver = mock()
when(webdriver).Chrome(
options=None, service_log_path=log_file, executable_path="chromedriver"
).thenReturn(expected_webdriver)
driver = creator.creator.create_chrome({}, None, service_log_path=log_file)
assert driver == expected_webdriver
def test_create_headlesschrome_with_service_log_path_real_path(creator):
log_file = os.path.join(creator.output_dir, "firefox-{index}.log")
expected_webdriver = mock()
options = mock()
when(webdriver).ChromeOptions().thenReturn(options)
when(webdriver).Chrome(
options=options, service_log_path=log_file, executable_path="chromedriver"
).thenReturn(expected_webdriver)
driver = creator.creator.create_headless_chrome({}, None, service_log_path=log_file)
assert driver == expected_webdriver
def test_create_firefox_with_service_log_path_none(creator):
log_file = os.path.join(creator.output_dir, "geckodriver-1.log")
expected_webdriver = mock()
profile = mock()
when(webdriver).FirefoxProfile().thenReturn(profile)
when(webdriver).Firefox(
options=None,
firefox_profile=profile,
executable_path="geckodriver",
service_log_path=log_file,
).thenReturn(expected_webdriver)
driver = creator.creator.create_firefox({}, None, None, service_log_path=None)
assert driver == expected_webdriver
def test_create_firefox_with_service_log_path_real_path(creator):
log_file = os.path.join(creator.output_dir, "firefox-{index}.log")
expected_webdriver = mock()
profile = mock()
when(webdriver).FirefoxProfile().thenReturn(profile)
when(webdriver).Firefox(
options=None,
firefox_profile=profile,
executable_path="geckodriver",
service_log_path=log_file,
).thenReturn(expected_webdriver)
driver = creator.creator.create_firefox(
{}, None, ff_profile_dir=None, service_log_path=log_file
)
assert driver == expected_webdriver
def test_create_headlessfirefox_with_service_log_path_real_path(creator):
log_file = os.path.join(creator.output_dir, "firefox-{index}.log")
expected_webdriver = mock()
profile = mock()
when(webdriver).FirefoxProfile().thenReturn(profile)
options = mock()
when(webdriver).FirefoxOptions().thenReturn(options)
when(webdriver).Firefox(
options=options,
firefox_profile=profile,
service_log_path=log_file,
executable_path="geckodriver",
).thenReturn(expected_webdriver)
driver = creator.creator.create_headless_firefox(
{}, None, ff_profile_dir=None, service_log_path=log_file
)
assert driver == expected_webdriver
def test_create_firefox_from_create_driver(creator):
log_file = os.path.join(creator.output_dir, "firefox-1.log")
expected_webdriver = mock()
profile = mock()
when(webdriver).FirefoxProfile().thenReturn(profile)
options = mock()
when(webdriver).FirefoxOptions().thenReturn(options)
executable_path = "geckodriver"
when(creator.creator)._get_executable_path(ANY).thenReturn(executable_path)
when(webdriver).Firefox(
options=None,
firefox_profile=profile,
service_log_path=log_file,
executable_path=executable_path,
).thenReturn(expected_webdriver)
driver = creator.creator.create_driver(
"firefox ", {}, remote_url=None, profile_dir=None, service_log_path=log_file
)
assert driver == expected_webdriver
def test_create_ie_with_service_log_path_real_path(creator):
log_file = os.path.join(creator.output_dir, "ie-1.log")
expected_webdriver = mock()
when(webdriver).Ie(
options=None, service_log_path=log_file, executable_path="IEDriverServer.exe"
).thenReturn(expected_webdriver)
driver = creator.creator.create_ie({}, None, service_log_path=log_file)
assert driver == expected_webdriver
def test_create_edge_with_service_log_path_real_path(creator):
executable_path = "MicrosoftWebDriver.exe"
log_file = os.path.join(creator.output_dir, "ie-1.log")
expected_webdriver = mock()
when(creator.creator)._has_options(ANY).thenReturn(False)
when(webdriver).Edge(
service_log_path=log_file, executable_path=executable_path
).thenReturn(expected_webdriver)
driver = creator.creator.create_edge({}, None, service_log_path=log_file)
assert driver == expected_webdriver
def test_create_opera_with_service_log_path_real_path(creator):
executable_path = "operadriver"
log_file = os.path.join(creator.output_dir, "ie-1.log")
expected_webdriver = mock()
when(webdriver).Opera(
options=None, service_log_path=log_file, executable_path=executable_path
).thenReturn(expected_webdriver)
driver = creator.creator.create_opera({}, None, service_log_path=log_file)
assert driver == expected_webdriver
def test_create_safari_no_support_for_service_log_path(creator):
log_file = os.path.join(creator.output_dir, "ie-1.log")
expected_webdriver = mock()
executable_path = "/usr/bin/safaridriver"
when(webdriver).Safari(executable_path=executable_path).thenReturn(
expected_webdriver
)
driver = creator.creator.create_safari({}, None, service_log_path=log_file)
assert driver == expected_webdriver
def test_create_phantomjs_with_service_log_path_real_path(creator):
log_file = os.path.join(creator.output_dir, "ie-1.log")
expected_webdriver = mock()
executable_path = "phantomjs"
when(webdriver).PhantomJS(
service_log_path=log_file, executable_path=executable_path
).thenReturn(expected_webdriver)
driver = creator.creator.create_phantomjs({}, None, service_log_path=log_file)
assert driver == expected_webdriver
| 37.220096
| 88
| 0.742512
| 987
| 7,779
| 5.515704
| 0.101317
| 0.061719
| 0.087436
| 0.059148
| 0.790779
| 0.76892
| 0.752939
| 0.743204
| 0.716936
| 0.674688
| 0
| 0.001513
| 0.150405
| 7,779
| 208
| 89
| 37.399038
| 0.822212
| 0
| 0
| 0.514793
| 0
| 0
| 0.057977
| 0.01157
| 0
| 0
| 0
| 0
| 0.094675
| 1
| 0.106509
| false
| 0
| 0.04142
| 0
| 0.153846
| 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
|
18e898bc83d9c630f240c789dccc825125a178fa
| 83
|
py
|
Python
|
test/unit/_2020/test_day11.py
|
Justintime50/adventofcode-2020
|
c0d68e7b43c9cbc71dc5c19891c63489087124a6
|
[
"MIT"
] | 2
|
2020-12-05T13:25:36.000Z
|
2020-12-06T21:59:05.000Z
|
test/unit/_2020/test_day11.py
|
Justintime50/adventofcode-2020
|
c0d68e7b43c9cbc71dc5c19891c63489087124a6
|
[
"MIT"
] | 1
|
2021-12-06T08:06:37.000Z
|
2021-12-28T21:45:23.000Z
|
test/unit/_2020/test_day11.py
|
Justintime50/adventofcode-2020
|
c0d68e7b43c9cbc71dc5c19891c63489087124a6
|
[
"MIT"
] | 1
|
2020-12-08T22:45:44.000Z
|
2020-12-08T22:45:44.000Z
|
# from adventofcode._2020.day11.challenge import main
def test_input():
pass
| 13.833333
| 53
| 0.746988
| 11
| 83
| 5.454545
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.086957
| 0.168675
| 83
| 5
| 54
| 16.6
| 0.782609
| 0.614458
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
18f09138a695f76e3bb462381519744fd08033ff
| 82
|
py
|
Python
|
python/projects/coin/coin2.py
|
BharathC15/NielitChennai
|
c817aaf63b741eb7a8e4c1df16b5038a0b4f0df7
|
[
"MIT"
] | null | null | null |
python/projects/coin/coin2.py
|
BharathC15/NielitChennai
|
c817aaf63b741eb7a8e4c1df16b5038a0b4f0df7
|
[
"MIT"
] | null | null | null |
python/projects/coin/coin2.py
|
BharathC15/NielitChennai
|
c817aaf63b741eb7a8e4c1df16b5038a0b4f0df7
|
[
"MIT"
] | 1
|
2020-06-11T08:04:43.000Z
|
2020-06-11T08:04:43.000Z
|
import numpy as np
from scipy.stats import binom
print(binom.pmf(k=2,n=6,p=0.5))
| 16.4
| 31
| 0.731707
| 19
| 82
| 3.157895
| 0.894737
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.055556
| 0.121951
| 82
| 4
| 32
| 20.5
| 0.777778
| 0
| 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
|
18f28ac9f49ec5d5bc758577f8869b1a42f8bb1b
| 45
|
py
|
Python
|
tests/data_loader/__init__.py
|
usert5432/vlne
|
e3cafd30ecce3a2dbc4a37cc4257d07fb1a1785d
|
[
"MIT"
] | null | null | null |
tests/data_loader/__init__.py
|
usert5432/vlne
|
e3cafd30ecce3a2dbc4a37cc4257d07fb1a1785d
|
[
"MIT"
] | null | null | null |
tests/data_loader/__init__.py
|
usert5432/vlne
|
e3cafd30ecce3a2dbc4a37cc4257d07fb1a1785d
|
[
"MIT"
] | null | null | null |
"""Various `vlne.data.data_loader` tests"""
| 15
| 43
| 0.688889
| 6
| 45
| 5
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.088889
| 45
| 2
| 44
| 22.5
| 0.731707
| 0.822222
| 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
|
18ff5363796ad52bb9cd3cf3aa86a535beb59de8
| 23
|
py
|
Python
|
example_problems/tutorial/bit_edit_to_zero/old/gen/valida.py
|
DottaPaperella/TALight
|
580322c3121c9acde9827f996fd4e39e31d93a6f
|
[
"MIT"
] | 409
|
2015-01-12T22:02:01.000Z
|
2022-03-29T06:17:05.000Z
|
example_problems/tutorial/bit_edit_to_zero/old/gen/valida.py
|
DottaPaperella/TALight
|
580322c3121c9acde9827f996fd4e39e31d93a6f
|
[
"MIT"
] | 1,269
|
2015-01-02T22:42:25.000Z
|
2022-03-08T13:31:46.000Z
|
example_problems/tutorial/bit_edit_to_zero/old/gen/valida.py
|
DottaPaperella/TALight
|
580322c3121c9acde9827f996fd4e39e31d93a6f
|
[
"MIT"
] | 193
|
2015-01-14T16:21:27.000Z
|
2022-03-19T22:47:02.000Z
|
#!/usr/bin/env python2
| 11.5
| 22
| 0.695652
| 4
| 23
| 4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.047619
| 0.086957
| 23
| 1
| 23
| 23
| 0.714286
| 0.913043
| 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
|
7a03d2266430fd012a98d189887f865a3796a2fd
| 9,573
|
py
|
Python
|
pipeline/BMRS_helpers.py
|
desenk/Electricity-Data-Pipeline
|
ab4a7d47ceb107829f14e19919b647464ebdfb72
|
[
"CC-BY-4.0"
] | 3
|
2021-02-02T17:14:12.000Z
|
2021-04-20T16:42:14.000Z
|
pipeline/BMRS_helpers.py
|
desenk/Electricity-Data-Pipeline
|
ab4a7d47ceb107829f14e19919b647464ebdfb72
|
[
"CC-BY-4.0"
] | 2
|
2021-02-03T12:52:15.000Z
|
2021-05-17T16:26:37.000Z
|
pipeline/BMRS_helpers.py
|
desenk/Electricity-Data-Pipeline
|
ab4a7d47ceb107829f14e19919b647464ebdfb72
|
[
"CC-BY-4.0"
] | null | null | null |
import urllib.request
import pandas as pd
import numpy as np
from lxml import objectify
import matplotlib.pyplot as plt
import datetime
def get_APIKey(filename="api_key.txt"):
"""Reads the user API from the api_key.txt file"""
try:
with open(filename, "r") as f:
return f.read().strip()
except FileNotFoundError:
print(
"<api_key.txt> file not found! Please create a txt file called <api_key.txt> and paste your API key in there."
)
def import_data(**kwargs):
"""Imports data from the BMRS API. Report name and API Key are essential, all other keywords (mentioned in the BMRS API Guide) are optional"""
API_key = get_APIKey()
url = "https://api.bmreports.com/BMRS/{report}/v1?APIKey={APIkey}&ServiceType=xml".format(
APIkey=API_key, **kwargs
)
for key, value in kwargs.items():
if key not in ["report"]:
additional = "&%s=%s" % (key, value)
url = url + additional
xml = objectify.parse(urllib.request.urlopen(url))
return xml
def make_dataframe(**kwargs):
"""Returns a pandas dataframe using the BMRS XML output"""
headers = []
for entry in import_data(**kwargs).findall("./responseBody/responseList/item/"):
headers.append(entry.tag)
header_dict = dict.fromkeys(headers)
body = []
for entry in import_data(**kwargs).findall("./responseBody/responseList/item"):
data = entry.getchildren()
body.append(data)
try:
df = pd.DataFrame(body, columns=header_dict)
except:
df = pd.DataFrame(body, columns=list(header_dict)[: len(body[0])])
return df
def extract_data1(report_name, start_date, end_date):
"""v1:extracts data from BMRS using report_name, start_date and end_Date"""
df = make_dataframe(report=report_name, FromDate=start_date, ToDate=end_date)
return df
def extract_data2(report_name, start_date, end_date):
"""v2:extracts data from BMRS using report_name, start_date and end_Date"""
df = make_dataframe(
report=report_name, FromSettlementDate=start_date, ToSettlementDate=end_date
)
return df
def extract_data3(report_name, start_date, end_date):
"""v3:extracts data from BMRS using report_name, start_date and end_Date"""
df = make_dataframe(
report=report_name,
FromDatetime=start_date + "%2000:00:00",
ToDatetime=end_date + "%2000:00:00",
)
return df
def extract_data4(report_name, start_date, end_date):
"""v3:extracts data from BMRS using report_name, start_date and end_Date"""
df = make_dataframe(report=report_name, SettlementDate=start_date, Period="1")
return df
def extract_data(report_name, start_date, end_date):
"""Extracts BMRS data regardless of the date formats. report_name follows the BMRS API guide."""
for func in [extract_data3, extract_data2, extract_data1, extract_data4]:
try:
df = func(report_name, start_date, end_date)
break
except Exception as err:
print(err)
continue
return df
def demand(start_date="2020-03-24", end_date="2020-03-25", save_to_csv=False):
"""System demand data, inputs are start_date and end_date. Option to save as CSV"""
report_name = "ROLSYSDEM"
df = make_dataframe(
report=report_name,
FromDateTime=(start_date + "%2000:00:00"),
ToDateTime=(end_date + "%2000:00:00"),
)
if save_to_csv == True:
df.to_csv(report_name + "_" + start_date + "_" + end_date + ".csv")
print("saved " + report_name + "_" + start_date + "_" + end_date + ".csv")
return df
def temperature(start_date="2020-03-24", end_date="2020-03-25", save_to_csv=False):
"""Daily average tempature in Britain, inputs are start_date and end_date. Option to save as CSV"""
report_name = "TEMP"
df = make_dataframe(report=report_name, FromDate=start_date, ToDate=end_date)
if save_to_csv == True:
df.to_csv(report_name + "_" + start_date + "_" + end_date + ".csv")
print("saved " + report_name + "_" + start_date + "_" + end_date + ".csv")
return df
def generation(start_date="2020-03-24", end_date="2020-03-24", save_to_csv=False):
"""Generation data by fuel type, inputs are start_date and end_date. Option to save as CSV"""
report_name = "FUELHH"
df = make_dataframe(report=report_name, FromDate=start_date, ToDate=end_date)
if save_to_csv == True:
df.to_csv(report_name + "_" + start_date + "_" + end_date + ".csv")
print("saved " + report_name + "_" + start_date + "_" + end_date + ".csv")
return df
def loss_of_load(start_date="2020-03-24", end_date="2020-03-24", save_to_csv=False):
"""Loss of Load data, inputs are start_date and end_date. Option to save as CSV"""
report_name = "LOLPDRM"
df = make_dataframe(
report=report_name,
FromSettlementDate=start_date,
ToSettlementDate=end_date,
recordType="LOLP",
)
if save_to_csv == True:
df.to_csv(report_name + "_" + start_date + "_" + end_date + ".csv")
print("saved " + report_name + "_" + start_date + "_" + end_date + ".csv")
return df
def initial_demand_national(
start_date="2020-03-24", end_date="2020-03-24", save_to_csv=False
):
"""Initial demand data on transmission and national level, inputs are start_date and end_date. Option to save as CSV"""
report_name = "INDOITSDO"
df = make_dataframe(report=report_name, FromDate=start_date, ToDate=end_date)
df = df[df["recordType"] == "INDO"]
if save_to_csv == True:
df.to_csv(report_name + "_" + start_date + "_" + end_date + ".csv")
print("saved " + report_name + "_" + start_date + "_" + end_date + ".csv")
return df
def initial_demand_transmission(
start_date="2020-03-24", end_date="2020-03-24", save_to_csv=False
):
"""Initial demand data on transmission and national level, inputs are start_date and end_date. Option to save as CSV"""
report_name = "INDOITSDO"
df = make_dataframe(report=report_name, FromDate=start_date, ToDate=end_date)
df = df[df["recordType"] == "ITSDO"]
if save_to_csv == True:
df.to_csv(report_name + "_" + start_date + "_" + end_date + ".csv")
print("saved " + report_name + "_" + start_date + "_" + end_date + ".csv")
return df
def frequency(start_date="2020-03-24", end_date="2020-03-25", save_to_csv=False):
"""System frequency data, inputs are start_date and end_date. Option to save as CSV"""
report_name = "FREQ"
df = make_dataframe(
report=report_name,
FromDateTime=(start_date + "%2000:00:00"),
ToDateTime=(end_date + "%2000:00:00"),
)
if save_to_csv == True:
df.to_csv(report_name + "_" + start_date + "_" + end_date + ".csv")
print("saved " + report_name + "_" + start_date + "_" + end_date + ".csv")
return df
def demand_forecast_national(
start_date="2020-03-24", end_date="2020-03-24", save_to_csv=False
):
"""National day-ahead demand forecast data, inputs are start_date and end_date. Option to save as CSV"""
report_name = "FORDAYDEM"
df = make_dataframe(report=report_name, FromDate=(start_date), ToDate=(end_date))
df = df[df["recordType"] == "DANF"]
if save_to_csv == True:
df.to_csv(report_name + "_" + start_date + "_" + end_date + ".csv")
print("saved " + report_name + "_" + start_date + "_" + end_date + ".csv")
return df
def demand_forecast_transmission(
start_date="2020-03-24", end_date="2020-03-24", save_to_csv=False
):
"""National day-ahead demand forecast data, inputs are start_date and end_date. Option to save as CSV"""
report_name = "FORDAYDEM"
df = make_dataframe(report=report_name, FromDate=(start_date), ToDate=(end_date))
df = df[df["recordType"] == "DATF"]
if save_to_csv == True:
df.to_csv(report_name + "_" + start_date + "_" + end_date + ".csv")
print("saved " + report_name + "_" + start_date + "_" + end_date + ".csv")
return df
def imbalance_volume(start_date="2020-03-24", period="1", save_to_csv=False):
"""Imbalance volume data from BMRS using report_name, start_date and period"""
report_name = "B1780"
df = make_dataframe(report=report_name, SettlementDate=start_date, Period=period)
if save_to_csv == True:
df.to_csv(report_name + "_" + start_date + ".csv")
print("saved " + report_name + "_" + start_date + ".csv")
return df
def imbalance_price(start_date="2020-03-24", period="1", save_to_csv=False):
"""Imbalance volume data from BMRS using report_name, start_date and period"""
report_name = "B1770"
df = make_dataframe(report=report_name, SettlementDate=start_date, Period=period)
if save_to_csv == True:
df.to_csv(report_name + "_" + start_date + ".csv")
print("saved " + report_name + "_" + start_date + ".csv")
return df
def derived_system_data(start_date="2020-03-24", end_date="2020-03-24", save_to_csv=False):
"""Derived system data, inputs are start_date and end_date. Option to save as CSV"""
report_name = "DERSYSDATA"
df = make_dataframe(
report=report_name,
FromSettlementDate=start_date,
ToSettlementDate=end_date,
SettlementPeriod='*',
# recordType="DERSYSDATA",
)
if save_to_csv == True:
df.to_csv(report_name + "_" + start_date + "_" + end_date + ".csv")
print("saved " + report_name + "_" + start_date + "_" + end_date + ".csv")
return df
| 39.557851
| 146
| 0.658832
| 1,341
| 9,573
| 4.43475
| 0.139448
| 0.111989
| 0.090802
| 0.115016
| 0.758029
| 0.749958
| 0.72339
| 0.72339
| 0.72339
| 0.72339
| 0
| 0.03295
| 0.210592
| 9,573
| 241
| 147
| 39.721992
| 0.754003
| 0.178418
| 0
| 0.538889
| 0
| 0.011111
| 0.118496
| 0.008372
| 0
| 0
| 0
| 0
| 0
| 1
| 0.111111
| false
| 0
| 0.05
| 0
| 0.272222
| 0.077778
| 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
|
7a0a3dbcb74546623a199f04fd820b72605c5562
| 194
|
py
|
Python
|
tests/check_framework/urls/beginning_with_slash.py
|
Yoann-Vie/esgi-hearthstone
|
115d03426c7e8e80d89883b78ac72114c29bed12
|
[
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null |
tests/check_framework/urls/beginning_with_slash.py
|
Yoann-Vie/esgi-hearthstone
|
115d03426c7e8e80d89883b78ac72114c29bed12
|
[
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null |
tests/check_framework/urls/beginning_with_slash.py
|
Yoann-Vie/esgi-hearthstone
|
115d03426c7e8e80d89883b78ac72114c29bed12
|
[
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null |
from django.conf.urls import url
from django.urls import path
urlpatterns = [
path('/path-starting-with-slash/', lambda x: x),
url(r'/url-starting-with-slash/$', lambda x: x),
]
| 24.25
| 53
| 0.654639
| 29
| 194
| 4.37931
| 0.482759
| 0.15748
| 0.267717
| 0.362205
| 0.393701
| 0.393701
| 0
| 0
| 0
| 0
| 0
| 0
| 0.185567
| 194
| 7
| 54
| 27.714286
| 0.803797
| 0
| 0
| 0
| 0
| 0
| 0.278075
| 0.278075
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
7a1e5792766be6c548841f863c26745290951ada
| 2,594
|
py
|
Python
|
rlagents.py
|
Hankl227/Klotski
|
1e6f65e7b82c77d58a97a4a08dc475e199f9841e
|
[
"Apache-2.0"
] | null | null | null |
rlagents.py
|
Hankl227/Klotski
|
1e6f65e7b82c77d58a97a4a08dc475e199f9841e
|
[
"Apache-2.0"
] | 7
|
2020-09-14T20:33:28.000Z
|
2020-10-23T23:43:18.000Z
|
rlagents.py
|
Hankl227/Klotski
|
1e6f65e7b82c77d58a97a4a08dc475e199f9841e
|
[
"Apache-2.0"
] | 1
|
2020-11-24T03:12:23.000Z
|
2020-11-24T03:12:23.000Z
|
# Author: Shway Wang
# Date: 2020, November 1st
# Location: China Ningxia Yinchuan
import numpy as np
class Agent(object):
def __init__(self, alpha, gamma, epsilon = 0):
self.alpha = alpha
self.gamma = gamma
self.epsilon = epsilon
def optimal_states(self, state_options):
# state_options is a dictionary with:
# key: state pointer
# value: return, i.e. Q(s,a)
ans = []
temp = max(state_options, key = state_options.get)
for i in state_options:
if state_options[i] == state_options[temp]:
ans.append(i)
return ans
class Sarsa_Agent(Agent):
def selectAction(self, state_options):
# this is en epsilon-greey action selection
# state_options is a dictionary with:
# key: state pointer
# value: return, i.e. Q(s,a)
opt_option = np.random.choice(self.optimal_states(state_options)) # random tie breaking
p = np.random.rand() # returns random decimal between 0 and 1
if p < self.epsilon: # do random action
return np.random.choice(list(state_options.keys()))
else: # do optimal option
return opt_option
def updateActionValue(self, savt, cur_state, cur_action, next_state, next_action, ret):
# i.e Q(s,a) <- Q(s,a) + alpha[ret + gamma*Q(s',a') - Q(s,a)]
cur_stateActionValue = savt.getStateActionValue(cur_state, cur_action)
next_stateActionValue = savt.getStateActionValue(next_state, next_action)
td_error = ret + self.gamma * next_stateActionValue - cur_stateActionValue
new_value = cur_stateActionValue + self.alpha * td_error
savt.setStateActionValue(cur_state, cur_action, new_value)
class Q_Learning_Agent(Agent):
def selectAction(self, state_options):
# this is en epsilon-greey action selection
# state_options is a dictionary with:
# key: state pointer
# value: return, i.e. Q(s,a)
opt_option = np.random.choice(self.optimal_states(state_options)) # random tie breaking
p = np.random.rand() # returns random decimal between 0 and 1
if p < self.epsilon: # do random action
return np.random.choice(list(state_options.keys()))
else: # do optimal option
return opt_option
def updateActionValue(self, savt, cur_state, cur_action, opt_next_state, opt_next_action, ret):
# i.e Q(s,a) <- Q(s,a) + alpha[ret + gamma * max(Q(s',a')) - Q(s,a)]
cur_stateActionValue = savt.getStateActionValue(cur_state, cur_action)
opt_next_stateActionValue = savt.getStateActionValue(opt_next_state, opt_next_action)
td_error = ret + self.gamma * opt_next_stateActionValue - cur_stateActionValue
new_value = cur_stateActionValue + self.alpha * td_error
savt.setStateActionValue(cur_state, cur_action, new_value)
| 40.53125
| 96
| 0.739399
| 388
| 2,594
| 4.755155
| 0.219072
| 0.097561
| 0.017886
| 0.055285
| 0.766938
| 0.762602
| 0.742547
| 0.711111
| 0.711111
| 0.711111
| 0
| 0.004556
| 0.153817
| 2,594
| 63
| 97
| 41.174603
| 0.835991
| 0.277949
| 0
| 0.487805
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.146341
| false
| 0
| 0.02439
| 0
| 0.365854
| 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
|
e17590705b26dd9cde2adfea468f808084c5668d
| 6,659
|
py
|
Python
|
python/jittor/test/test_conv_tuner.py
|
Exusial/jittor
|
eca21d5bba5098bce4f492fa44908677b6e76588
|
[
"Apache-2.0"
] | 2,571
|
2020-03-20T03:38:35.000Z
|
2022-03-31T08:20:05.000Z
|
python/jittor/test/test_conv_tuner.py
|
Exusial/jittor
|
eca21d5bba5098bce4f492fa44908677b6e76588
|
[
"Apache-2.0"
] | 197
|
2020-03-20T04:11:47.000Z
|
2022-03-31T10:14:24.000Z
|
python/jittor/test/test_conv_tuner.py
|
Exusial/jittor
|
eca21d5bba5098bce4f492fa44908677b6e76588
|
[
"Apache-2.0"
] | 284
|
2020-03-20T03:53:15.000Z
|
2022-03-28T07:20:32.000Z
|
# ***************************************************************
# Copyright (c) 2021 Jittor. All Rights Reserved.
# Maintainers:
# Guoye Yang <498731903@qq.com>
# Dun Liang <randonlang@gmail.com>.
#
# This file is subject to the terms and conditions defined in
# file 'LICENSE.txt', which is part of this source code package.
# ***************************************************************
import unittest
import jittor as jt
import os
import numpy as np
from jittor import compile_extern
# TODO: compare with pytorch
from jittor.test.test_log import find_log_with_re
if jt.has_cuda:
from jittor.compile_extern import cublas_ops, cudnn_ops
else:
cublas_ops = cudnn_ops = None
def conv_nchw(x, in_planes, out_planes, kernel_size, padding, stride = 1, dilation=1, init_method=None, w_ = None):
Kw = kernel_size
Kh = kernel_size
_C = in_planes
Kc = out_planes
N,C,H,W = x.shape
assert C==_C
if w_ is None:
assert 0
else:
w = w_
oh = (H-Kh*dilation+dilation-1+padding*2)//stride+1
ow = (W-Kw*dilation+dilation-1+padding*2)//stride+1
xx = x.reindex([N,Kc,C,oh,ow,Kh,Kw], [
'i0', # Nid
'i2', # Cid
f'i3*{stride}-{padding}+i5*{dilation}', # Hid+Khid
f'i4*{stride}-{padding}+i6*{dilation}', # Wid+KWid
])
ww = w.broadcast(xx.shape, [0,3,4])
yy = xx*ww
y = yy.sum([2,5,6]) # C, Kh, Kw
return y
def conv_nhwc(x, in_planes, out_planes, kernel_size, padding, stride = 1, dilation=1, init_method=None, w_ = None):
Kw = kernel_size
Kh = kernel_size
_C = in_planes
Kc = out_planes
N,H,W,C = x.shape
assert C==_C
if w_ is None:
assert 0
else:
w = w_
oh = (H-Kh*dilation+dilation-1+padding*2)//stride+1
ow = (W-Kw*dilation+dilation-1+padding*2)//stride+1
xx = x.reindex([N,Kc,C,oh,ow,Kh,Kw], [
'i0', # Nid
f'i3*{stride}-{padding}+i5*{dilation}', # Hid+Khid
f'i4*{stride}-{padding}+i6*{dilation}', # Wid+KWid
'i2', # Cid
])
ww = w.broadcast(xx.shape, [0,3,4])
yy = xx*ww
y = yy.sum([2,5,6]) # C, Kh, Kw
return y
def test_nhwc(x, w, stride, padding, dilation):
out_planes, in_planes, kernel_size, _ = w.shape
return conv_nhwc(x, in_planes, out_planes, kernel_size, padding, stride=stride, dilation=dilation, w_=w)
def test_nchw(x, w, stride, padding, dilation):
out_planes, in_planes, kernel_size, _ = w.shape
return conv_nchw(x, in_planes, out_planes, kernel_size, padding, stride=stride, dilation=dilation, w_=w)
def check_forward(xshape, wshape, stride, padding, dilation, use_cuda, nhwc):
if nhwc:
test_func = test_nhwc
else:
test_func = test_nchw
if use_cuda == 1:
op_name = "cudnn_conv"
else:
op_name = "mkl_conv"
with jt.log_capture_scope(use_cuda=use_cuda, enable_tuner=1,
log_v=0, log_vprefix="op.cc=100,conv_tuner=1000", compile_options={"test":266}
) as raw_log:
x = jt.random(xshape)
w = jt.random(wshape)
y = test_func(x, w, stride, padding, dilation)
y.sync()
with jt.flag_scope(use_cuda=0, enable_tuner=0,
compile_options={"test":255}):
cy = test_func(x, w, stride, padding, dilation)
cy.sync()
logs = find_log_with_re(raw_log, "(Jit op key (not )?found: " + op_name + ".*)")
assert len(logs)==1 and "oihw" in logs[0][0], logs
assert np.allclose(y.data, cy.data)
def check_backward(xshape, wshape, stride, padding, dilation, use_cuda, nhwc):
if nhwc:
test_func = test_nhwc
else:
test_func = test_nchw
if use_cuda == 1:
op_name = "cudnn_conv"
else:
op_name = "mkl_conv"
with jt.log_capture_scope(use_cuda=use_cuda, enable_tuner=1,
log_v=1, log_vprefix="op.cc=1000,exe=1000,conv_t=1000", compile_options={"test":244}
) as raw_log:
x = jt.random(xshape)
w = jt.random(wshape)
y = test_func(x, w, stride, padding, dilation)
loss = y.mean()
dx, dw = jt.grad(loss, [x, w])
jt.sync([y, loss, dx, dw])
with jt.flag_scope(use_cuda=0, enable_tuner=0, compile_options={"test":233}):
cy = test_func(x, w, stride, padding, dilation)
closs = cy.mean()
cdx, cdw = jt.grad(closs, [x, w])
jt.sync([cy, closs, cdx, cdw])
logs = find_log_with_re(raw_log, "(Jit op key (not )?found: " + op_name + ".*)")
assert len(logs)==3 and "oihw" in logs[0][0], (logs)
assert np.allclose(y.data, cy.data, 1e-3)
assert np.allclose(dw.data, cdw.data, 1e-3), (dw.data, cdw.data)
assert np.allclose(dx.data, cdx.data, 1e-3), (dx.data, cdx.data, np.abs(cdx.data).max(), np.abs(dx.data - cdx.data).max())
class TestConvTuner(unittest.TestCase):
def test_forward(self):
for dilation in [1,2,3]:
check_forward([10,100,100,3], [5,3,3,3], 2, 0, dilation, 0, True)
check_forward([10,40,50,4], [5,4,5,5], 1, 1, dilation, 0, True)
check_forward([10,40,50,4], [5,4,4,4], 3, 1, dilation, 0, True)
check_forward([10,3,100,100], [5,3,3,3], 2, 0, dilation, 0, False)
check_forward([10,4,40,50], [5,4,5,5], 1, 1, dilation, 0, False)
check_forward([10,4,40,50], [5,4,4,4], 3, 1, dilation, 0, False)
def test_backward(self):
for dilation in [1,2,3]:
check_backward([10,3,100,100], [5,3,3,3], 2, 0, dilation, 0, False)
check_backward([10,4,40,50], [5,4,5,5], 1, 1, dilation, 0, False)
check_backward([10,4,40,50], [5,4,4,4], 3, 1, dilation, 0, False)
@unittest.skipIf(not jt.compiler.has_cuda, "No CUDA found")
def test_forward_cuda(self):
for dilation in [1,2,3]:
check_forward([10,100,100,3], [5,3,3,3], 2, 0, dilation, 1, True)
check_forward([10,40,50,4], [5,4,5,5], 1, 1, dilation, 1, True)
check_forward([10,40,50,4], [5,4,4,4], 3, 1, dilation, 1, True)
check_forward([10,3,100,100], [5,3,3,3], 2, 0, dilation, 1, False)
check_forward([10,4,40,50], [5,4,5,5], 1, 1, dilation, 1, False)
check_forward([10,4,40,50], [5,4,4,4], 3, 1, dilation, 1, False)
@unittest.skipIf(not jt.compiler.has_cuda, "No CUDA found")
def test_backward_cuda(self):
for dilation in [1,2,3]:
check_backward([10,3,100,100], [5,3,3,3], 2, 0, dilation, 1, False)
check_backward([10,4,40,50], [5,4,5,5], 1, 1, dilation, 1, False)
check_backward([10,4,40,50], [5,4,4,4], 3, 1, dilation, 1, False)
if __name__ == "__main__":
unittest.main()
| 38.491329
| 126
| 0.585824
| 1,089
| 6,659
| 3.438017
| 0.164371
| 0.036058
| 0.044872
| 0.014957
| 0.752137
| 0.752137
| 0.752137
| 0.752137
| 0.733974
| 0.731838
| 0
| 0.075383
| 0.23502
| 6,659
| 172
| 127
| 38.715116
| 0.6596
| 0.072984
| 0
| 0.5625
| 0
| 0
| 0.057867
| 0.03186
| 0
| 0
| 0
| 0.005814
| 0.069444
| 1
| 0.069444
| false
| 0
| 0.048611
| 0
| 0.152778
| 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
|
e1b6b67dab285e74a79376da266adf53dc1b4ea3
| 152
|
py
|
Python
|
relax/relax/__init__.py
|
jtristan/FormalML
|
b9f54593c7f2badde15953de876ee214e23b34a0
|
[
"Apache-2.0"
] | 4
|
2020-07-15T07:57:28.000Z
|
2021-02-22T11:10:19.000Z
|
relax/relax/__init__.py
|
jtristan/FormalML
|
b9f54593c7f2badde15953de876ee214e23b34a0
|
[
"Apache-2.0"
] | null | null | null |
relax/relax/__init__.py
|
jtristan/FormalML
|
b9f54593c7f2badde15953de876ee214e23b34a0
|
[
"Apache-2.0"
] | null | null | null |
# Copyright © 2020, Oracle and/or its affiliates. All rights reserved.
from pyro import sample
from pyro.distributions import (Beta,Uniform,Binomial)
| 25.333333
| 70
| 0.789474
| 22
| 152
| 5.5
| 0.863636
| 0.132231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030534
| 0.138158
| 152
| 5
| 71
| 30.4
| 0.885496
| 0.447368
| 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
|
e1c69f155a92d856b2335dba1508b8ebf02d3ab0
| 1,169
|
py
|
Python
|
ckb_toolkit/core/test_header.py
|
duanyytop/ckb-sdk-python
|
4c7b1676fbb130abfe795290ebba32c1d6d97a08
|
[
"MIT"
] | 1
|
2021-09-17T06:05:20.000Z
|
2021-09-17T06:05:20.000Z
|
ckb_toolkit/core/test_header.py
|
duanyytop/ckb-sdk-python
|
4c7b1676fbb130abfe795290ebba32c1d6d97a08
|
[
"MIT"
] | null | null | null |
ckb_toolkit/core/test_header.py
|
duanyytop/ckb-sdk-python
|
4c7b1676fbb130abfe795290ebba32c1d6d97a08
|
[
"MIT"
] | null | null | null |
from unittest import TestCase
from .header import header_hash, pow_hash
TEST_HEADER = {'compact_target': '0x1a08a97e',
'dao': '0x920c75d0a1a8a12e071127fb0b8723003947ac75871c000000a3e044a53bff06', 'epoch': '0x6cf0417000000',
'hash': '0xc3ffedc5143d516ab35993667a8e243491b879ae19b8605d74b20f08a4b72b52',
'nonce': '0x87829506000005a10000000001470500', 'number': '0x417',
'parent_hash': '0x664ff8295293522f79db8e421f919aab35f72ce1cd60e7b93e5f1d27977010ee',
'proposals_hash': '0x0000000000000000000000000000000000000000000000000000000000000000',
'timestamp': '0x16e783b79fd',
'transactions_root': '0x445dc8adada6feaf5275f9e31a1e9044588de0eaf73e8afdc21cbf07f79bf87f',
'uncles_hash': '0x0000000000000000000000000000000000000000000000000000000000000000', 'version': '0x0'}
class HeaderTest(TestCase):
def test_header_hash(self):
self.assertEqual(header_hash(TEST_HEADER), TEST_HEADER['hash'])
def test_pow_hash(self):
self.assertEqual(pow_hash(TEST_HEADER), '0x633dd3a34be2355055b020ea49fe01d8666a4756bda4aac0b6f02746fcdf398e')
| 53.136364
| 119
| 0.745937
| 71
| 1,169
| 12.042254
| 0.535211
| 0.05848
| 0.049123
| 0.039766
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.411282
| 0.165954
| 1,169
| 21
| 120
| 55.666667
| 0.465641
| 0
| 0
| 0
| 0
| 0
| 0.557742
| 0.424294
| 0
| 0
| 0.463644
| 0
| 0.125
| 1
| 0.125
| false
| 0
| 0.125
| 0
| 0.3125
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
bedd98718ea93ee35c16aa4cd449a2d3fc3e1111
| 290
|
py
|
Python
|
pyrobolearn/exploration/actions/__init__.py
|
Pandinosaurus/pyrobolearn
|
9cd7c060723fda7d2779fa255ac998c2c82b8436
|
[
"Apache-2.0"
] | 2
|
2021-01-21T21:08:30.000Z
|
2022-03-29T16:45:49.000Z
|
pyrobolearn/exploration/actions/__init__.py
|
Pandinosaurus/pyrobolearn
|
9cd7c060723fda7d2779fa255ac998c2c82b8436
|
[
"Apache-2.0"
] | null | null | null |
pyrobolearn/exploration/actions/__init__.py
|
Pandinosaurus/pyrobolearn
|
9cd7c060723fda7d2779fa255ac998c2c82b8436
|
[
"Apache-2.0"
] | 1
|
2020-09-29T21:25:39.000Z
|
2020-09-29T21:25:39.000Z
|
# -*- coding: utf-8 -*-
# import action exploration
from .action_exploration import *
# import discrete action exploration
from .discrete import *
from .eps_greedy import *
from .boltzmann import *
# import continuous action exploration
from .continuous import *
from .gaussian import *
| 20.714286
| 38
| 0.758621
| 34
| 290
| 6.411765
| 0.382353
| 0.311927
| 0.288991
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004098
| 0.158621
| 290
| 13
| 39
| 22.307692
| 0.889344
| 0.410345
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
beeb54720fdce2d0d53f0d55e89c46e149f26a69
| 43
|
py
|
Python
|
HelloWorld/hello.py
|
yoshi1125hisa/python3-competition-programming
|
a5a3f72ec17d64abc79f50dfaede7b2ae6aa3eb1
|
[
"MIT"
] | null | null | null |
HelloWorld/hello.py
|
yoshi1125hisa/python3-competition-programming
|
a5a3f72ec17d64abc79f50dfaede7b2ae6aa3eb1
|
[
"MIT"
] | null | null | null |
HelloWorld/hello.py
|
yoshi1125hisa/python3-competition-programming
|
a5a3f72ec17d64abc79f50dfaede7b2ae6aa3eb1
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8
print("Hello, World!")
| 14.333333
| 22
| 0.581395
| 6
| 43
| 4.166667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.027027
| 0.139535
| 43
| 2
| 23
| 21.5
| 0.648649
| 0.395349
| 0
| 0
| 0
| 0
| 0.541667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
835aee98569d47f86f4d35ce25c4f2fd9d366126
| 51
|
py
|
Python
|
src/pimpmydb/statement_generator/__init__.py
|
gurgy11/PimpMyDB
|
8ebc6cf153172bead500eb7caacbe885b3e08b3a
|
[
"MIT"
] | null | null | null |
src/pimpmydb/statement_generator/__init__.py
|
gurgy11/PimpMyDB
|
8ebc6cf153172bead500eb7caacbe885b3e08b3a
|
[
"MIT"
] | null | null | null |
src/pimpmydb/statement_generator/__init__.py
|
gurgy11/PimpMyDB
|
8ebc6cf153172bead500eb7caacbe885b3e08b3a
|
[
"MIT"
] | null | null | null |
from .statement_generator import StatementGenerator
| 51
| 51
| 0.921569
| 5
| 51
| 9.2
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.058824
| 51
| 1
| 51
| 51
| 0.958333
| 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
|
8362f63653c59b6d408c90e59892223456944967
| 330
|
pyde
|
Python
|
Processing/Section 5/Listing10/Listing10.pyde
|
Grigory526/2019-fall-polytech-cs
|
1e87472fa128f6d69a3b99118e04ce4cce9ac70a
|
[
"MIT"
] | 1
|
2019-09-16T19:30:49.000Z
|
2019-09-16T19:30:49.000Z
|
Processing/Section 5/Listing10/Listing10.pyde
|
Grigory526/2019-fall-polytech-cs
|
1e87472fa128f6d69a3b99118e04ce4cce9ac70a
|
[
"MIT"
] | null | null | null |
Processing/Section 5/Listing10/Listing10.pyde
|
Grigory526/2019-fall-polytech-cs
|
1e87472fa128f6d69a3b99118e04ce4cce9ac70a
|
[
"MIT"
] | null | null | null |
def setup():
size(500, 500)
smooth()
noLoop()
def draw():
background(100)
stroke(142,36,197)
strokeWeight(110)
line(100, 150, 400, 150)
stroke(203,29,163)
strokeWeight(60)
line(100, 250, 400, 250)
stroke(204,27,27)
strokeWeight(110)
line(100, 350, 400, 350)
| 16.5
| 28
| 0.554545
| 44
| 330
| 4.159091
| 0.590909
| 0.114754
| 0.20765
| 0.240437
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.329004
| 0.3
| 330
| 19
| 29
| 17.368421
| 0.463203
| 0
| 0
| 0.133333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.133333
| true
| 0
| 0
| 0
| 0.133333
| 0
| 0
| 0
| 0
| null | 0
| 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
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
55ee3679989f1e0d10fed691278b257405db3e58
| 153
|
py
|
Python
|
web/website/admin.py
|
mnahinkhan/rnpfind
|
5aa956ddd528ab9ebd9588be845f78c449915b78
|
[
"MIT"
] | 3
|
2021-06-08T03:55:03.000Z
|
2021-06-15T07:33:08.000Z
|
web/website/admin.py
|
mnahinkhan/RNPFind
|
8b561e087f943421c847dcb708ee386ee6439fa5
|
[
"MIT"
] | 1
|
2022-02-24T15:34:24.000Z
|
2022-03-04T09:59:10.000Z
|
web/website/admin.py
|
mnahinkhan/RNPFind
|
8b561e087f943421c847dcb708ee386ee6439fa5
|
[
"MIT"
] | 1
|
2021-07-22T04:13:34.000Z
|
2021-07-22T04:13:34.000Z
|
"""
Autogenerated by Django - used for admin site settings
"""
# uncomment when needed
# from django.contrib import admin
# Register your models here.
| 17
| 54
| 0.745098
| 20
| 153
| 5.7
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176471
| 153
| 8
| 55
| 19.125
| 0.904762
| 0.895425
| 0
| null | 1
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
55f8d9aef4fa2b85fe6db4908c3dad5a91c21923
| 58
|
py
|
Python
|
libs/std_py/__init__.py
|
cgpipline/strack-python-event
|
28cac81d8c11ab67262ae55c6f98fdd1c1f0d0d0
|
[
"Apache-2.0"
] | null | null | null |
libs/std_py/__init__.py
|
cgpipline/strack-python-event
|
28cac81d8c11ab67262ae55c6f98fdd1c1f0d0d0
|
[
"Apache-2.0"
] | null | null | null |
libs/std_py/__init__.py
|
cgpipline/strack-python-event
|
28cac81d8c11ab67262ae55c6f98fdd1c1f0d0d0
|
[
"Apache-2.0"
] | 1
|
2022-03-20T20:00:02.000Z
|
2022-03-20T20:00:02.000Z
|
# coding=utf8
from implant_method import implant_method
| 11.6
| 41
| 0.827586
| 8
| 58
| 5.75
| 0.75
| 0.565217
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02
| 0.137931
| 58
| 4
| 42
| 14.5
| 0.9
| 0.189655
| 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
|
36030f0b34144bbef8c77d516488eb379be56906
| 225
|
py
|
Python
|
api/users/models.py
|
mmvo91/series-tracker
|
747f124c3996ce47fe8465fcfc23d199c1f9c888
|
[
"MIT"
] | 1
|
2020-11-20T22:07:37.000Z
|
2020-11-20T22:07:37.000Z
|
api/users/models.py
|
mmvo91/series-tracker
|
747f124c3996ce47fe8465fcfc23d199c1f9c888
|
[
"MIT"
] | 2
|
2021-04-30T08:45:54.000Z
|
2021-04-30T08:49:24.000Z
|
api/users/models.py
|
mmvo91/series-tracker
|
747f124c3996ce47fe8465fcfc23d199c1f9c888
|
[
"MIT"
] | null | null | null |
from api.extensions import sql
class User(sql.Model):
__tablename__ = 'users'
id = sql.Column(sql.Integer, primary_key=True)
username = sql.Column(sql.String, unique=True)
password = sql.Column(sql.String)
| 22.5
| 50
| 0.706667
| 31
| 225
| 4.967742
| 0.645161
| 0.175325
| 0.233766
| 0.233766
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.173333
| 225
| 9
| 51
| 25
| 0.827957
| 0
| 0
| 0
| 0
| 0
| 0.022222
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.166667
| 0.166667
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
3666021990cae9046927e479319099d663e6315a
| 73
|
py
|
Python
|
hub_scraper/models/article_author.py
|
dmitriiweb/hub-scraper
|
b6817e216f75a9835f3d9cd304f62611defbe458
|
[
"MIT"
] | null | null | null |
hub_scraper/models/article_author.py
|
dmitriiweb/hub-scraper
|
b6817e216f75a9835f3d9cd304f62611defbe458
|
[
"MIT"
] | null | null | null |
hub_scraper/models/article_author.py
|
dmitriiweb/hub-scraper
|
b6817e216f75a9835f3d9cd304f62611defbe458
|
[
"MIT"
] | null | null | null |
from pydantic import BaseModel
class Author(BaseModel):
alias: str
| 12.166667
| 30
| 0.753425
| 9
| 73
| 6.111111
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.191781
| 73
| 5
| 31
| 14.6
| 0.932203
| 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
|
36676471132136246bf428cfb4ca8048eac3ed6f
| 110
|
py
|
Python
|
py_tdlib/constructors/passport_element_email_address.py
|
Mr-TelegramBot/python-tdlib
|
2e2d21a742ebcd439971a32357f2d0abd0ce61eb
|
[
"MIT"
] | 24
|
2018-10-05T13:04:30.000Z
|
2020-05-12T08:45:34.000Z
|
py_tdlib/constructors/passport_element_email_address.py
|
MrMahdi313/python-tdlib
|
2e2d21a742ebcd439971a32357f2d0abd0ce61eb
|
[
"MIT"
] | 3
|
2019-06-26T07:20:20.000Z
|
2021-05-24T13:06:56.000Z
|
py_tdlib/constructors/passport_element_email_address.py
|
MrMahdi313/python-tdlib
|
2e2d21a742ebcd439971a32357f2d0abd0ce61eb
|
[
"MIT"
] | 5
|
2018-10-05T14:29:28.000Z
|
2020-08-11T15:04:10.000Z
|
from ..factory import Type
class passportElementEmailAddress(Type):
email_address = None # type: "string"
| 18.333333
| 40
| 0.763636
| 12
| 110
| 6.916667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145455
| 110
| 5
| 41
| 22
| 0.882979
| 0.127273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.333333
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
368305cee3250bf87956586365e926345dc55689
| 63
|
py
|
Python
|
Python/Py Access WebData 11-15/week1/week1.py
|
peasfrog/coursera
|
78a7c113ba474b4a64b6ba5449df4e12fd6efec4
|
[
"MIT"
] | null | null | null |
Python/Py Access WebData 11-15/week1/week1.py
|
peasfrog/coursera
|
78a7c113ba474b4a64b6ba5449df4e12fd6efec4
|
[
"MIT"
] | null | null | null |
Python/Py Access WebData 11-15/week1/week1.py
|
peasfrog/coursera
|
78a7c113ba474b4a64b6ba5449df4e12fd6efec4
|
[
"MIT"
] | null | null | null |
print ('Master, I await your next world dominating command.')
| 31.5
| 62
| 0.746032
| 9
| 63
| 5.222222
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15873
| 63
| 1
| 63
| 63
| 0.886792
| 0
| 0
| 0
| 0
| 0
| 0.822581
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
368aeeda41a9736ac0b43dddfd4604393fd28e98
| 123
|
py
|
Python
|
disnake_components/__init__.py
|
LOCUS-TEAM/py-cord-components
|
117302809482dfdcdfec0cfd9a7fa4fb1eb45671
|
[
"MIT"
] | 351
|
2021-04-27T07:01:06.000Z
|
2022-03-24T17:27:52.000Z
|
distons/__init__.py
|
discordenjoyer/distons
|
821596537089ace7c9720e60409f3aa2d465f45f
|
[
"MIT"
] | 58
|
2021-05-02T11:08:29.000Z
|
2021-11-25T14:22:28.000Z
|
distons/__init__.py
|
discordenjoyer/distons
|
821596537089ace7c9720e60409f3aa2d465f45f
|
[
"MIT"
] | 72
|
2021-05-02T00:31:37.000Z
|
2022-03-18T06:12:18.000Z
|
from .client import *
from .interaction import *
from .component import *
from .dpy_overrides import *
from .http import *
| 20.5
| 28
| 0.756098
| 16
| 123
| 5.75
| 0.5
| 0.434783
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.162602
| 123
| 5
| 29
| 24.6
| 0.893204
| 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
|
369af639ee634c87a5816da4b23cd98a36f64e39
| 42
|
py
|
Python
|
daceml/onnx/shape_inference/__init__.py
|
manuelburger/daceml
|
501a05b0531bcf208b43816eeaba998feb83feb5
|
[
"BSD-3-Clause"
] | 30
|
2020-09-09T21:13:36.000Z
|
2022-03-15T01:58:10.000Z
|
daceml/onnx/shape_inference/__init__.py
|
manuelburger/daceml
|
501a05b0531bcf208b43816eeaba998feb83feb5
|
[
"BSD-3-Clause"
] | 83
|
2020-09-05T11:45:06.000Z
|
2021-09-28T14:21:44.000Z
|
daceml/onnx/shape_inference/__init__.py
|
manuelburger/daceml
|
501a05b0531bcf208b43816eeaba998feb83feb5
|
[
"BSD-3-Clause"
] | 7
|
2020-09-03T13:28:45.000Z
|
2021-12-12T02:53:22.000Z
|
from .shape_inference import infer_shapes
| 21
| 41
| 0.880952
| 6
| 42
| 5.833333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.095238
| 42
| 1
| 42
| 42
| 0.921053
| 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
|
36f40493a2801a407c6fb690b02714c6c0ba5314
| 116
|
py
|
Python
|
rcnn/setup.py
|
kpzaolod6000/wfm
|
f20fb81f5ac0210818ff073f197ad187340d70d5
|
[
"MIT"
] | 3
|
2022-01-14T07:54:52.000Z
|
2022-02-08T19:55:00.000Z
|
rcnn/setup.py
|
kpzaolod6000/wfm
|
f20fb81f5ac0210818ff073f197ad187340d70d5
|
[
"MIT"
] | null | null | null |
rcnn/setup.py
|
kpzaolod6000/wfm
|
f20fb81f5ac0210818ff073f197ad187340d70d5
|
[
"MIT"
] | 3
|
2021-12-26T03:05:06.000Z
|
2022-01-14T07:54:56.000Z
|
from setuptools import setup, find_packages
setup(name='FaceMaskDetection', version='1.0', packages=find_packages())
| 58
| 72
| 0.810345
| 15
| 116
| 6.133333
| 0.733333
| 0.26087
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018349
| 0.060345
| 116
| 2
| 72
| 58
| 0.825688
| 0
| 0
| 0
| 0
| 0
| 0.17094
| 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
|
36fba87f3456e558f7d43a2dddcfe5a8a6c748d4
| 66
|
py
|
Python
|
library/logging/__init__.py
|
danyanyam/ftx
|
32076bc1135e5a1e2bc800f4fff8dff9d7da18f1
|
[
"MIT"
] | 2
|
2021-09-23T22:59:24.000Z
|
2021-09-24T05:49:35.000Z
|
library/logging/__init__.py
|
danyanyam/ftx
|
32076bc1135e5a1e2bc800f4fff8dff9d7da18f1
|
[
"MIT"
] | null | null | null |
library/logging/__init__.py
|
danyanyam/ftx
|
32076bc1135e5a1e2bc800f4fff8dff9d7da18f1
|
[
"MIT"
] | null | null | null |
from .logger import Logger, debug, info, warning, critical, error
| 33
| 65
| 0.772727
| 9
| 66
| 5.666667
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136364
| 66
| 1
| 66
| 66
| 0.894737
| 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
|
7fdbb8c21b2a01d7d6cb12bdeee947b3d13d2f85
| 75
|
py
|
Python
|
tests/__init__.py
|
ramiro/flourish
|
17fa65e874dae80c8f36a955dcd85406a3c1266e
|
[
"MIT"
] | 12
|
2015-02-09T23:18:47.000Z
|
2021-07-21T10:40:36.000Z
|
tests/__init__.py
|
ramiro/flourish
|
17fa65e874dae80c8f36a955dcd85406a3c1266e
|
[
"MIT"
] | 16
|
2016-06-22T17:45:41.000Z
|
2021-11-30T05:31:15.000Z
|
tests/__init__.py
|
ramiro/flourish
|
17fa65e874dae80c8f36a955dcd85406a3c1266e
|
[
"MIT"
] | 2
|
2016-06-22T15:49:06.000Z
|
2021-11-21T17:35:40.000Z
|
import pytest
pytest.register_assert_rewrite('tests.compare_directories')
| 18.75
| 59
| 0.866667
| 9
| 75
| 6.888889
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.053333
| 75
| 3
| 60
| 25
| 0.873239
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 0.333333
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
7ff6fb5f70050fd6c9ae9adb5eb2c13e67e6f212
| 151
|
py
|
Python
|
sources/events/on_member_unban.py
|
PierreDubosq/discord-bot-python-template
|
a75cb2752350c18c5cb14e8a570db12bafbb3c24
|
[
"MIT"
] | null | null | null |
sources/events/on_member_unban.py
|
PierreDubosq/discord-bot-python-template
|
a75cb2752350c18c5cb14e8a570db12bafbb3c24
|
[
"MIT"
] | null | null | null |
sources/events/on_member_unban.py
|
PierreDubosq/discord-bot-python-template
|
a75cb2752350c18c5cb14e8a570db12bafbb3c24
|
[
"MIT"
] | null | null | null |
from discord import Guild, User
from ..client import client
@client.event
async def on_member_unban(guild: Guild, user: User) -> None:
pass
| 21.571429
| 61
| 0.715232
| 22
| 151
| 4.818182
| 0.636364
| 0.169811
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.198676
| 151
| 6
| 62
| 25.166667
| 0.876033
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.2
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
|
0
| 5
|
3d23e6d1b3bfd9750b7cb8babb8655b5fb28867e
| 99
|
py
|
Python
|
polymorphic_auth/usertypes/email/admin.py
|
ixc/django-polymorphic-auth
|
690c5e78846b328ca1b60bd0e099fe622d40892d
|
[
"MIT"
] | 6
|
2015-08-09T11:34:49.000Z
|
2019-11-21T22:15:19.000Z
|
polymorphic_auth/usertypes/email/admin.py
|
ixc/django-polymorphic-auth
|
690c5e78846b328ca1b60bd0e099fe622d40892d
|
[
"MIT"
] | 7
|
2015-08-19T05:07:04.000Z
|
2017-03-27T11:21:02.000Z
|
polymorphic_auth/usertypes/email/admin.py
|
ixc/django-polymorphic-auth
|
690c5e78846b328ca1b60bd0e099fe622d40892d
|
[
"MIT"
] | 5
|
2015-09-21T07:11:11.000Z
|
2022-03-30T01:16:04.000Z
|
from polymorphic_auth.admin import UserChildAdmin
class EmailUserAdmin(UserChildAdmin):
pass
| 16.5
| 49
| 0.828283
| 10
| 99
| 8.1
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131313
| 99
| 5
| 50
| 19.8
| 0.94186
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
|
0
| 5
|
3d3db117aa87758fed6fbe051cd27bf85e5f53ea
| 107
|
py
|
Python
|
minggu-03/src/data_tupple.py
|
hadihammurabi/workshop-python
|
84f5f614b8ed55aa793698aaa4ccbefe12a785f8
|
[
"MIT"
] | null | null | null |
minggu-03/src/data_tupple.py
|
hadihammurabi/workshop-python
|
84f5f614b8ed55aa793698aaa4ccbefe12a785f8
|
[
"MIT"
] | null | null | null |
minggu-03/src/data_tupple.py
|
hadihammurabi/workshop-python
|
84f5f614b8ed55aa793698aaa4ccbefe12a785f8
|
[
"MIT"
] | null | null | null |
# membuat tupple
buah = ('anggur', 'jeruk', 'mangga')
print(buah) # output: ('anggur', 'jeruk', 'mangga')
| 21.4
| 51
| 0.616822
| 12
| 107
| 5.5
| 0.666667
| 0.333333
| 0.515152
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.140187
| 107
| 4
| 52
| 26.75
| 0.717391
| 0.485981
| 0
| 0
| 0
| 0
| 0.326923
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 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
|
3d4c86e10a19a75834d9755500d6fdcd5fd57079
| 81
|
py
|
Python
|
__init__.py
|
hguandl/dgs2utils
|
ab01ff7a143d7210c41d5400235cea502f42b73d
|
[
"Apache-2.0"
] | null | null | null |
__init__.py
|
hguandl/dgs2utils
|
ab01ff7a143d7210c41d5400235cea502f42b73d
|
[
"Apache-2.0"
] | null | null | null |
__init__.py
|
hguandl/dgs2utils
|
ab01ff7a143d7210c41d5400235cea502f42b73d
|
[
"Apache-2.0"
] | null | null | null |
from . import gfd
from . import gmd
from . import tex
__all__ = [gfd, gmd, tex]
| 13.5
| 25
| 0.679012
| 13
| 81
| 3.923077
| 0.461538
| 0.588235
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.222222
| 81
| 5
| 26
| 16.2
| 0.809524
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
181a015e551230a5dbd45e53b90a24e9159fdfb3
| 128
|
py
|
Python
|
src/energenie/crypto_test.py
|
Achronite/pyenergenie
|
80d79b93939d1532b08f545e9c4affe4ee1bc8f1
|
[
"MIT"
] | 91
|
2015-12-21T13:31:45.000Z
|
2022-03-10T21:20:51.000Z
|
pyenergenie/energenie/crypto_test.py
|
Silvian/wirelab-client
|
7892e14c0f02a43cc1a66b918f80a87c9b58814d
|
[
"MIT"
] | 124
|
2015-10-03T13:51:40.000Z
|
2022-03-31T15:04:20.000Z
|
pyenergenie/energenie/crypto_test.py
|
Silvian/wirelab-client
|
7892e14c0f02a43cc1a66b918f80a87c9b58814d
|
[
"MIT"
] | 57
|
2015-10-07T22:04:07.000Z
|
2022-03-31T14:11:49.000Z
|
# crypto_test.py 21/05/2016 D.J.Whale
#
# Placeholder for test harness for crypto.py
#TODO:
print("no tests defined")
# END
| 14.222222
| 44
| 0.703125
| 22
| 128
| 4.045455
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.075472
| 0.171875
| 128
| 8
| 45
| 16
| 0.764151
| 0.695313
| 0
| 0
| 0
| 0
| 0.484848
| 0
| 0
| 0
| 0
| 0.125
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
185a284cf8a090edeb2d383ade7b17086b9d73e8
| 121
|
py
|
Python
|
idm/commands/ping.py
|
PAVELNEDELKO1100/idmduty.github.io
|
9b3e78912f2c4ed0e314693db0eff29f6780d21b
|
[
"MIT"
] | 24
|
2020-05-11T19:14:06.000Z
|
2022-02-22T10:08:34.000Z
|
idm/commands/ping.py
|
PAVELNEDELKO1100/idmduty.github.io
|
9b3e78912f2c4ed0e314693db0eff29f6780d21b
|
[
"MIT"
] | 13
|
2020-05-10T00:45:33.000Z
|
2022-01-31T11:59:06.000Z
|
idm/commands/ping.py
|
PAVELNEDELKO1100/idmduty.github.io
|
9b3e78912f2c4ed0e314693db0eff29f6780d21b
|
[
"MIT"
] | 18
|
2020-05-02T07:47:01.000Z
|
2022-03-13T18:54:58.000Z
|
from ..objects import dp, Event
@dp.event_handle(dp.Methods.PING)
def ping(event: Event) -> str:
return "ok"
| 17.285714
| 34
| 0.652893
| 18
| 121
| 4.333333
| 0.666667
| 0.179487
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.206612
| 121
| 6
| 35
| 20.166667
| 0.8125
| 0
| 0
| 0
| 0
| 0
| 0.017391
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0.25
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
18707eb8a4666cf621ae3f8d98473cc3d8937e12
| 436
|
py
|
Python
|
Problems/Stack/Easy/CrawlerLogFolder/test_crawler_log_folder.py
|
dolong2110/Algorithm-By-Problems-Python
|
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
|
[
"MIT"
] | 1
|
2021-08-16T14:52:05.000Z
|
2021-08-16T14:52:05.000Z
|
Problems/Stack/Easy/CrawlerLogFolder/test_crawler_log_folder.py
|
dolong2110/Algorithm-By-Problems-Python
|
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
|
[
"MIT"
] | null | null | null |
Problems/Stack/Easy/CrawlerLogFolder/test_crawler_log_folder.py
|
dolong2110/Algorithm-By-Problems-Python
|
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
|
[
"MIT"
] | null | null | null |
from unittest import TestCase
from crawler_log_folder import minOperations
class Test(TestCase):
def test_min_operations(self):
self.assertEqual(minOperations(["d1/", "d2/", "../", "d21/", "./"]), 2)
self.assertEqual(minOperations(["d1/", "d2/", "./", "d3/", "../", "d31/"]), 3)
self.assertEqual(minOperations(["d1/", "../", "../", "../"]), 0)
self.assertEqual(minOperations(["./", "../", "./"]), 0)
| 48.444444
| 86
| 0.559633
| 42
| 436
| 5.714286
| 0.547619
| 0.25
| 0.466667
| 0.375
| 0.266667
| 0
| 0
| 0
| 0
| 0
| 0
| 0.038251
| 0.16055
| 436
| 9
| 87
| 48.444444
| 0.617486
| 0
| 0
| 0
| 0
| 0
| 0.118993
| 0
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0.125
| false
| 0
| 0.25
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
187093df61aea7ef912e45ae3864837fec98acbc
| 40
|
py
|
Python
|
src/constants/connections.py
|
josejorgers/bobo-script
|
02641c420ec3f7eca7031d789b3638bde0f7fd1d
|
[
"MIT"
] | 1
|
2021-10-20T20:53:24.000Z
|
2021-10-20T20:53:24.000Z
|
src/constants/connections.py
|
josejorgers/bobo-script
|
02641c420ec3f7eca7031d789b3638bde0f7fd1d
|
[
"MIT"
] | null | null | null |
src/constants/connections.py
|
josejorgers/bobo-script
|
02641c420ec3f7eca7031d789b3638bde0f7fd1d
|
[
"MIT"
] | null | null | null |
LOCAL = "localhost" # "10.113.36.208" #
| 40
| 40
| 0.6
| 6
| 40
| 4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.294118
| 0.15
| 40
| 1
| 40
| 40
| 0.411765
| 0.375
| 0
| 0
| 0
| 0
| 0.428571
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
187f5f09492a2cc683c53832096944a757e4fafa
| 2,857
|
py
|
Python
|
beatmap_reader/unit_tests/test_beatmap.py
|
abraker95/osu_beatmap_reader
|
c3b1025e05c76d2f506f521000b034ccc4a6d513
|
[
"MIT"
] | null | null | null |
beatmap_reader/unit_tests/test_beatmap.py
|
abraker95/osu_beatmap_reader
|
c3b1025e05c76d2f506f521000b034ccc4a6d513
|
[
"MIT"
] | 1
|
2022-01-07T06:20:58.000Z
|
2022-01-13T15:46:32.000Z
|
beatmap_reader/unit_tests/test_beatmap.py
|
abraker95/osu_beatmap_reader
|
c3b1025e05c76d2f506f521000b034ccc4a6d513
|
[
"MIT"
] | 1
|
2022-01-06T22:27:16.000Z
|
2022-01-06T22:27:16.000Z
|
import unittest
from ..beatmapIO import BeatmapIO
class TestBeatmap(unittest.TestCase):
def test_beatmap_loading_mania(self):
beatmap = BeatmapIO.open_beatmap('beatmap_reader\\unit_tests\\maps\\mania\\Camellia - GHOST (qqqant) [Collab PHANTASM [MX]].osu')
# Test metadata
self.assertEqual(beatmap.metadata.beatmap_format, 14)
self.assertEqual(beatmap.metadata.title, 'GHOST')
self.assertEqual(beatmap.metadata.artist, 'Camellia')
self.assertEqual(beatmap.metadata.version, 'Collab PHANTASM [MX]')
self.assertEqual(beatmap.metadata.creator, 'qqqant')
# Test timing points
self.assertEqual(len(beatmap.timing_points), 179)
self.assertEqual(beatmap.timing_points[0].offset, 8527)
self.assertEqual(beatmap.timing_points[0].beat_interval, 272.727272727273)
self.assertEqual(beatmap.timing_points[0].meter, 4)
self.assertEqual(beatmap.timing_points[0].inherited, False)
self.assertEqual(beatmap.timing_points[178].offset, 316163)
self.assertEqual(beatmap.timing_points[178].beat_interval, -125)
self.assertEqual(beatmap.timing_points[178].meter, 4)
self.assertEqual(beatmap.timing_points[178].inherited, True)
# Test hitobjects
self.assertEqual(max(beatmap.data()[:, 1]), 3)
self.assertEqual(len(beatmap.data())/2, 3004)
# TODO: test hitobjects
def test_beatmap_loading_std(self):
beatmap = BeatmapIO.open_beatmap('beatmap_reader\\unit_tests\\maps\\osu\\Mutsuhiko Izumi - Red Goose (nold_1702) [ERT Basic].osu')
# Test metadata
self.assertEqual(beatmap.metadata.beatmap_format, 9)
self.assertEqual(beatmap.metadata.title, 'Red Goose')
self.assertEqual(beatmap.metadata.artist, 'Mutsuhiko Izumi')
self.assertEqual(beatmap.metadata.version, 'ERT Basic')
self.assertEqual(beatmap.metadata.creator, 'nold_1702')
# Test timing points
self.assertEqual(len(beatmap.timing_points), 23)
self.assertEqual(beatmap.timing_points[0].offset, -401)
self.assertEqual(beatmap.timing_points[0].beat_interval, 300)
self.assertEqual(beatmap.timing_points[0].meter, 4)
self.assertEqual(beatmap.timing_points[0].inherited, False)
self.assertEqual(beatmap.timing_points[22].offset, 117799)
self.assertEqual(beatmap.timing_points[22].beat_interval, -100)
self.assertEqual(beatmap.timing_points[22].meter, 4)
self.assertEqual(beatmap.timing_points[22].inherited, True)
# Test hitobjects
self.assertEqual(len(beatmap.hitobjects), 102)
# TODO: test hitobjects
def test_beatmap_loading_custom(self):
beatmap = BeatmapIO.open_beatmap('beatmap_reader\\unit_tests\\maps\\osu\\abraker - unknown (abraker) [250ms].osu')
| 41.405797
| 138
| 0.701435
| 334
| 2,857
| 5.868263
| 0.242515
| 0.237245
| 0.291837
| 0.228571
| 0.770918
| 0.622959
| 0.50051
| 0.378061
| 0.330102
| 0.216837
| 0
| 0.04435
| 0.179209
| 2,857
| 69
| 139
| 41.405797
| 0.791471
| 0.049352
| 0
| 0.1
| 0
| 0.05
| 0.12777
| 0.052807
| 0
| 0
| 0
| 0.014493
| 0.775
| 1
| 0.075
| false
| 0
| 0.05
| 0
| 0.15
| 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
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a1088e8332e6d3eddb01b1da48df06a8c3a0230d
| 17
|
py
|
Python
|
alphastarmini/core/sl/__init__.py
|
liuruoze/Raw-vs-Human-in-AlphaStar
|
99acae772eb5c93000dca87b78d6acdf7699f331
|
[
"Apache-2.0"
] | 3
|
2021-09-07T11:13:34.000Z
|
2021-09-07T13:05:26.000Z
|
alphastarmini/core/sl/__init__.py
|
liuruoze/Raw-vs-Human-in-AlphaStar
|
99acae772eb5c93000dca87b78d6acdf7699f331
|
[
"Apache-2.0"
] | null | null | null |
alphastarmini/core/sl/__init__.py
|
liuruoze/Raw-vs-Human-in-AlphaStar
|
99acae772eb5c93000dca87b78d6acdf7699f331
|
[
"Apache-2.0"
] | null | null | null |
print("sl init")
| 8.5
| 16
| 0.647059
| 3
| 17
| 3.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 17
| 1
| 17
| 17
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0.411765
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
a169fe6b1f4f8873d1c05362b4aaa300d49f4a74
| 154
|
py
|
Python
|
OOD_analysis/models/__init__.py
|
peterbhase/ExplanationSearch
|
faeaf72b41b9edf9f13f7a04eda35109758ea275
|
[
"MIT"
] | 8
|
2021-08-09T14:12:09.000Z
|
2022-03-15T09:56:44.000Z
|
OOD_analysis/models/__init__.py
|
peterbhase/ExplanationSearch
|
faeaf72b41b9edf9f13f7a04eda35109758ea275
|
[
"MIT"
] | null | null | null |
OOD_analysis/models/__init__.py
|
peterbhase/ExplanationSearch
|
faeaf72b41b9edf9f13f7a04eda35109758ea275
|
[
"MIT"
] | null | null | null |
# from .modeling_bert_with_adaptors import BertForSequenceClassification
# from .modeling_roberta_with_adaptors import RobertaForSequenceClassification
| 51.333333
| 79
| 0.896104
| 14
| 154
| 9.428571
| 0.642857
| 0.181818
| 0.272727
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.077922
| 154
| 2
| 80
| 77
| 0.929577
| 0.954545
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 1
| 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
|
a17b0b00274efd828ad21b4ef0f002b26bea428e
| 263
|
py
|
Python
|
config-temp.py
|
sudheesh001/Cove-Services
|
758a2d6a53af75a35b40a438446f57650caf8b16
|
[
"MIT"
] | null | null | null |
config-temp.py
|
sudheesh001/Cove-Services
|
758a2d6a53af75a35b40a438446f57650caf8b16
|
[
"MIT"
] | null | null | null |
config-temp.py
|
sudheesh001/Cove-Services
|
758a2d6a53af75a35b40a438446f57650caf8b16
|
[
"MIT"
] | null | null | null |
# Database Config
config = {
'MYSQL_DATABASE_USER' : 'root', #Username for mysql
'MYSQL_DATABASE_DB' : 'CoveServices',
'MYSQL_DATABASE_PASSWORD' : 'root', # Password to connect to mysql
'MYSQL_DATABASE_HOST' : 'localhost',
'USERNAME' : '',
'USERID' :'',
}
| 26.3
| 67
| 0.688213
| 29
| 263
| 5.965517
| 0.517241
| 0.300578
| 0.208092
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.152091
| 263
| 10
| 68
| 26.3
| 0.775785
| 0.235741
| 0
| 0
| 0
| 0
| 0.611111
| 0.116162
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.125
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
a182ab3357a1e2c2b82517e15536834eff4767ec
| 281
|
py
|
Python
|
Exercicios/Ex31.py
|
angeloridolfi/Python-CEV
|
fd11b7ea0725f83c84336b99304c50f183514245
|
[
"MIT"
] | null | null | null |
Exercicios/Ex31.py
|
angeloridolfi/Python-CEV
|
fd11b7ea0725f83c84336b99304c50f183514245
|
[
"MIT"
] | null | null | null |
Exercicios/Ex31.py
|
angeloridolfi/Python-CEV
|
fd11b7ea0725f83c84336b99304c50f183514245
|
[
"MIT"
] | null | null | null |
km = float(input('Digite a distância da sua viagem: '))
if km <= 200:
print(f'Como a sua viagem é de {km} o preço da sua passagem será R${0.5*km}')
else:
print(f'Como a sua viagem é mais longa que 200km, o preço da sua passagem sera de R${0.45*km}')
print('Boa Viagem!')
| 31.222222
| 99
| 0.661922
| 57
| 281
| 3.263158
| 0.54386
| 0.080645
| 0.107527
| 0.11828
| 0.430108
| 0.225806
| 0.225806
| 0
| 0
| 0
| 0
| 0.049107
| 0.202847
| 281
| 8
| 100
| 35.125
| 0.78125
| 0
| 0
| 0
| 0
| 0.333333
| 0.701068
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.333333
| 0
| 0
| 0
| 0.5
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
|
0
| 5
|
a18c1d4cbfba9173de8810b50c611afb9251acef
| 553
|
py
|
Python
|
CodingInterview2/04_FindInPartiallySortedMatrix/test_find_in_partially_sorted_matrix.py
|
hscspring/TheAlgorithms-Python
|
5c2faea1d2d25a9a81a4786e053b0cc58ab46c6f
|
[
"MIT"
] | 10
|
2020-07-06T11:00:58.000Z
|
2022-01-29T09:25:24.000Z
|
CodingInterview2/04_FindInPartiallySortedMatrix/test_find_in_partially_sorted_matrix.py
|
hscspring/TheAlgorithms-Python
|
5c2faea1d2d25a9a81a4786e053b0cc58ab46c6f
|
[
"MIT"
] | null | null | null |
CodingInterview2/04_FindInPartiallySortedMatrix/test_find_in_partially_sorted_matrix.py
|
hscspring/TheAlgorithms-Python
|
5c2faea1d2d25a9a81a4786e053b0cc58ab46c6f
|
[
"MIT"
] | 3
|
2020-07-13T06:39:23.000Z
|
2020-08-15T16:29:48.000Z
|
from find_in_partially_sorted_matrix import find
def test_pass():
matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 100]]
assert find(matrix, 3) == True
assert find(matrix, 8) == True
assert find(matrix, 0) == False
assert find(matrix, 10) == False
assert find(matrix, 101) == False
def test_irregularly_matrix():
matrix = [[1, 2, 3], [4, 5, 9]]
assert find(matrix, 2) == True
assert find(matrix, 7) == False
assert find(matrix, 10) == False
def test_blank_matrix():
matrix = [[]]
assert find(matrix, 0) == False
| 27.65
| 48
| 0.609403
| 82
| 553
| 4
| 0.341463
| 0.27439
| 0.439024
| 0.182927
| 0.356707
| 0.237805
| 0
| 0
| 0
| 0
| 0
| 0.070588
| 0.231465
| 553
| 20
| 49
| 27.65
| 0.701176
| 0
| 0
| 0.25
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.5625
| 1
| 0.1875
| false
| 0.0625
| 0.0625
| 0
| 0.25
| 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
|
b807abf130bcb2b61c1e73fcc32e8f0487a2e71a
| 13,429
|
py
|
Python
|
etl/parsers/etw/Microsoft_Windows_NlaSvc.py
|
IMULMUL/etl-parser
|
76b7c046866ce0469cd129ee3f7bb3799b34e271
|
[
"Apache-2.0"
] | 104
|
2020-03-04T14:31:31.000Z
|
2022-03-28T02:59:36.000Z
|
etl/parsers/etw/Microsoft_Windows_NlaSvc.py
|
IMULMUL/etl-parser
|
76b7c046866ce0469cd129ee3f7bb3799b34e271
|
[
"Apache-2.0"
] | 7
|
2020-04-20T09:18:39.000Z
|
2022-03-19T17:06:19.000Z
|
etl/parsers/etw/Microsoft_Windows_NlaSvc.py
|
IMULMUL/etl-parser
|
76b7c046866ce0469cd129ee3f7bb3799b34e271
|
[
"Apache-2.0"
] | 16
|
2020-03-05T18:55:59.000Z
|
2022-03-01T10:19:28.000Z
|
# -*- coding: utf-8 -*-
"""
Microsoft-Windows-NlaSvc
GUID : 63b530f8-29c9-4880-a5b4-b8179096e7b8
"""
from construct import Int8sl, Int8ul, Int16ul, Int16sl, Int32sl, Int32ul, Int64sl, Int64ul, Bytes, Double, Float32l, Struct
from etl.utils import WString, CString, SystemTime, Guid
from etl.dtyp import Sid
from etl.parsers.etw.core import Etw, declare, guid
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4001, version=0)
class Microsoft_Windows_NlaSvc_4001_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"CurrentOrNextState" / Int8ul
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4002, version=0)
class Microsoft_Windows_NlaSvc_4002_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"CurrentOrNextState" / Int8ul
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4101, version=0)
class Microsoft_Windows_NlaSvc_4101_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"AdapterName" / WString
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4102, version=0)
class Microsoft_Windows_NlaSvc_4102_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"AdapterName" / WString
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4103, version=0)
class Microsoft_Windows_NlaSvc_4103_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"MibNotificationType" / Int32ul
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4104, version=0)
class Microsoft_Windows_NlaSvc_4104_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"MibNotificationType" / Int32ul
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4203, version=0)
class Microsoft_Windows_NlaSvc_4203_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"GatewayIpAddress" / WString
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4204, version=0)
class Microsoft_Windows_NlaSvc_4204_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"GatewayIpAddress" / WString,
"ErrorCode" / Int32ul,
"NlnsState" / Int32ul,
"MacAddrLen" / Int16ul,
"MacAddr" / Bytes(lambda this: this.MacAddrLen)
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4205, version=0)
class Microsoft_Windows_NlaSvc_4205_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"GatewayIpAddress" / WString,
"ErrorCode" / Int32ul
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4251, version=0)
class Microsoft_Windows_NlaSvc_4251_0(Etw):
pattern = Struct(
"PluginName" / WString,
"EntityName" / WString,
"IndicatedRowCount" / Int16ul,
"RowsWithInterfacesIndicatedCount" / Int16ul,
"RowInterfaceGuid" / Guid
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4261, version=0)
class Microsoft_Windows_NlaSvc_4261_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"NlaState" / Int32ul
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4311, version=0)
class Microsoft_Windows_NlaSvc_4311_0(Etw):
pattern = Struct(
"DnsSuffix" / WString,
"Flags" / Int32ul,
"ErrorCode" / Int32ul,
"RetrievedDomain" / WString,
"RetrievedForest" / WString
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4312, version=0)
class Microsoft_Windows_NlaSvc_4312_0(Etw):
pattern = Struct(
"DnsSuffix" / WString,
"Flags" / Int32ul,
"ErrorCode" / Int32ul,
"RetrievedDomain" / WString,
"RetrievedForest" / WString
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4313, version=0)
class Microsoft_Windows_NlaSvc_4313_0(Etw):
pattern = Struct(
"DnsSuffix" / WString,
"Flags" / Int32ul,
"ErrorCode" / Int32ul,
"RetrievedDomain" / WString,
"RetrievedForest" / WString
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4321, version=0)
class Microsoft_Windows_NlaSvc_4321_0(Etw):
pattern = Struct(
"DnsSuffix" / WString,
"Flags" / Int32ul,
"ErrorCode" / Int32ul,
"RetrievedDomain" / WString,
"RetrievedForest" / WString
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4322, version=0)
class Microsoft_Windows_NlaSvc_4322_0(Etw):
pattern = Struct(
"DnsSuffix" / WString,
"Flags" / Int32ul,
"ErrorCode" / Int32ul,
"RetrievedDomain" / WString,
"RetrievedForest" / WString
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4323, version=0)
class Microsoft_Windows_NlaSvc_4323_0(Etw):
pattern = Struct(
"DnsSuffix" / WString,
"Flags" / Int32ul,
"ErrorCode" / Int32ul,
"RetrievedDomain" / WString,
"RetrievedForest" / WString
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4331, version=0)
class Microsoft_Windows_NlaSvc_4331_0(Etw):
pattern = Struct(
"DnsSuffix" / WString,
"Flags" / Int32ul,
"ErrorCode" / Int32ul,
"RetrievedDomain" / WString,
"RetrievedForest" / WString
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4332, version=0)
class Microsoft_Windows_NlaSvc_4332_0(Etw):
pattern = Struct(
"DnsSuffix" / WString,
"Flags" / Int32ul,
"ErrorCode" / Int32ul,
"RetrievedDomain" / WString,
"RetrievedForest" / WString
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4333, version=0)
class Microsoft_Windows_NlaSvc_4333_0(Etw):
pattern = Struct(
"DnsSuffix" / WString,
"Flags" / Int32ul,
"ErrorCode" / Int32ul,
"RetrievedDomain" / WString,
"RetrievedForest" / WString
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4341, version=0)
class Microsoft_Windows_NlaSvc_4341_0(Etw):
pattern = Struct(
"InterfaceName" / WString,
"Addresses" / WString,
"TryCount" / Int32ul,
"ErrorCode" / Int32ul
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4342, version=0)
class Microsoft_Windows_NlaSvc_4342_0(Etw):
pattern = Struct(
"InterfaceName" / WString,
"Addresses" / WString,
"TryCount" / Int32ul,
"ErrorCode" / Int32ul
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4343, version=0)
class Microsoft_Windows_NlaSvc_4343_0(Etw):
pattern = Struct(
"InterfaceName" / WString,
"Addresses" / WString,
"TryCount" / Int32ul,
"ErrorCode" / Int32ul
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4351, version=0)
class Microsoft_Windows_NlaSvc_4351_0(Etw):
pattern = Struct(
"Addresses" / WString,
"DcName" / WString,
"TryNumber" / Int32ul,
"TryCount" / Int32ul,
"ErrorCode" / Int32ul
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4352, version=0)
class Microsoft_Windows_NlaSvc_4352_0(Etw):
pattern = Struct(
"Addresses" / WString,
"DcName" / WString,
"TryNumber" / Int32ul,
"TryCount" / Int32ul,
"ErrorCode" / Int32ul
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4353, version=0)
class Microsoft_Windows_NlaSvc_4353_0(Etw):
pattern = Struct(
"Addresses" / WString,
"DcName" / WString,
"TryNumber" / Int32ul,
"TryCount" / Int32ul,
"ErrorCode" / Int32ul
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4354, version=0)
class Microsoft_Windows_NlaSvc_4354_0(Etw):
pattern = Struct(
"Addresses" / WString,
"DcName" / WString,
"TryNumber" / Int32ul,
"TryCount" / Int32ul,
"ErrorCode" / Int32ul
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4355, version=0)
class Microsoft_Windows_NlaSvc_4355_0(Etw):
pattern = Struct(
"Addresses" / WString,
"DcName" / WString,
"TryNumber" / Int32ul,
"TryCount" / Int32ul,
"ErrorCode" / Int32ul
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4356, version=0)
class Microsoft_Windows_NlaSvc_4356_0(Etw):
pattern = Struct(
"Addresses" / WString,
"DcName" / WString,
"TryNumber" / Int32ul,
"TryCount" / Int32ul,
"ErrorCode" / Int32ul
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4401, version=0)
class Microsoft_Windows_NlaSvc_4401_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"SignatureLength" / Int16ul,
"Signature" / Bytes(lambda this: this.SignatureLength),
"SignatureSource" / Int32ul
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4402, version=0)
class Microsoft_Windows_NlaSvc_4402_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"SignatureLength" / Int16ul,
"Signature" / Bytes(lambda this: this.SignatureLength),
"SignatureSource" / Int32ul
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4403, version=0)
class Microsoft_Windows_NlaSvc_4403_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"SignatureLength" / Int16ul,
"Signature" / Bytes(lambda this: this.SignatureLength),
"SignatureSource" / Int32ul
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4404, version=0)
class Microsoft_Windows_NlaSvc_4404_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"SignatureLength" / Int16ul,
"Signature" / Bytes(lambda this: this.SignatureLength),
"SignatureSource" / Int32ul
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4405, version=0)
class Microsoft_Windows_NlaSvc_4405_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"SignatureLength" / Int16ul,
"Signature" / Bytes(lambda this: this.SignatureLength),
"SignatureSource" / Int32ul
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4407, version=0)
class Microsoft_Windows_NlaSvc_4407_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"AdapterName" / WString
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4408, version=0)
class Microsoft_Windows_NlaSvc_4408_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"AdapterName" / WString
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4409, version=0)
class Microsoft_Windows_NlaSvc_4409_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"AdapterName" / WString
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4410, version=0)
class Microsoft_Windows_NlaSvc_4410_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"SignatureLength" / Int16ul,
"Signature" / Bytes(lambda this: this.SignatureLength),
"SignatureSource" / Int32ul
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4411, version=0)
class Microsoft_Windows_NlaSvc_4411_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"SignatureLength" / Int16ul,
"Signature" / Bytes(lambda this: this.SignatureLength),
"SignatureSource" / Int32ul
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=4451, version=0)
class Microsoft_Windows_NlaSvc_4451_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"AuthCapUnlikelyReason" / Int32ul,
"SpeculativeTimeout" / Int32ul
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=5001, version=0)
class Microsoft_Windows_NlaSvc_5001_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"NlaState" / Int32ul
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=5002, version=0)
class Microsoft_Windows_NlaSvc_5002_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"SignatureSource" / Int32ul,
"SignatureCharacteristics" / Int32ul
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=6101, version=0)
class Microsoft_Windows_NlaSvc_6101_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"AdapterName" / WString
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=6102, version=0)
class Microsoft_Windows_NlaSvc_6102_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"AdapterName" / WString
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=6103, version=0)
class Microsoft_Windows_NlaSvc_6103_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"AdapterName" / WString
)
@declare(guid=guid("63b530f8-29c9-4880-a5b4-b8179096e7b8"), event_id=6104, version=0)
class Microsoft_Windows_NlaSvc_6104_0(Etw):
pattern = Struct(
"InterfaceGuid" / Guid,
"AdapterName" / WString
)
| 29.579295
| 123
| 0.666394
| 1,427
| 13,429
| 6.110021
| 0.085494
| 0.086248
| 0.118592
| 0.107811
| 0.897695
| 0.897695
| 0.701113
| 0.701113
| 0.689414
| 0.689414
| 0
| 0.163914
| 0.206344
| 13,429
| 453
| 124
| 29.644592
| 0.654157
| 0.006776
| 0
| 0.56338
| 0
| 0
| 0.267387
| 0.130017
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.011268
| 0
| 0.270423
| 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
|
62ad98738271720c75b3b85fc7db1036b5215b9e
| 7,830
|
py
|
Python
|
tests/api/endpoints/admin/test_libraries.py
|
MJochim/seahub
|
66fcc6772511d43346a2980613576c5fdb4c4945
|
[
"Apache-2.0"
] | null | null | null |
tests/api/endpoints/admin/test_libraries.py
|
MJochim/seahub
|
66fcc6772511d43346a2980613576c5fdb4c4945
|
[
"Apache-2.0"
] | 6
|
2019-12-13T09:55:45.000Z
|
2022-03-11T23:47:29.000Z
|
tests/api/endpoints/admin/test_libraries.py
|
MJochim/seahub
|
66fcc6772511d43346a2980613576c5fdb4c4945
|
[
"Apache-2.0"
] | 1
|
2019-05-16T06:58:16.000Z
|
2019-05-16T06:58:16.000Z
|
import json
from django.core.urlresolvers import reverse
from seahub.test_utils import BaseTestCase
from tests.common.utils import randstring
from seahub.share.models import FileShare, UploadLinkShare
class AdminLibrariesTest(BaseTestCase):
def setUp(self):
self.libraries_url = reverse('api-v2.1-admin-libraries')
def tearDown(self):
self.remove_repo()
def test_can_get(self):
self.login_as(self.admin)
resp = self.client.get(self.libraries_url)
json_resp = json.loads(resp.content)
assert len(json_resp['repos']) > 0
def test_can_search_by_name(self):
self.login_as(self.admin)
repo_name = self.repo.repo_name
searched_args = repo_name[0:1]
url = self.libraries_url + '?name=%s' % searched_args
resp = self.client.get(url)
json_resp = json.loads(resp.content)
assert json_resp['name'] == searched_args
assert searched_args in json_resp['repos'][0]['name']
def test_get_with_invalid_user_permission(self):
self.login_as(self.user)
resp = self.client.get(self.libraries_url)
self.assertEqual(403, resp.status_code)
def test_can_create(self):
self.login_as(self.admin)
repo_name = randstring(6)
repo_owner = self.user.username
data = {
'name': repo_name,
'owner': repo_owner,
}
resp = self.client.post(self.libraries_url, data)
self.assertEqual(200, resp.status_code)
json_resp = json.loads(resp.content)
assert json_resp['name'] == repo_name
assert json_resp['owner'] == repo_owner
self.remove_repo(json_resp['id'])
def test_can_create_without_owner_parameter(self):
self.login_as(self.admin)
repo_name = randstring(6)
data = {
'name': repo_name,
}
resp = self.client.post(self.libraries_url, data)
self.assertEqual(200, resp.status_code)
json_resp = json.loads(resp.content)
assert json_resp['name'] == repo_name
assert json_resp['owner'] == self.admin.username
self.remove_repo(json_resp['id'])
def test_create_with_invalid_user_permission(self):
self.login_as(self.user)
repo_name = randstring(6)
repo_owner = self.user.username
data = {
'name': repo_name,
'owner': repo_owner,
}
resp = self.client.post(self.libraries_url, data)
self.assertEqual(403, resp.status_code)
def test_create_with_invalid_name_parameter(self):
self.login_as(self.admin)
repo_name = randstring(6)
repo_owner = self.user.username
data = {
'invalid_name': repo_name,
'owner': repo_owner,
}
resp = self.client.post(self.libraries_url, data)
self.assertEqual(400, resp.status_code)
def test_create_with_unexisted_user(self):
self.login_as(self.admin)
repo_name = randstring(6)
repo_owner = '%s@email.com' % randstring(6)
data = {
'name': repo_name,
'owner': repo_owner,
}
resp = self.client.post(self.libraries_url, data)
self.assertEqual(404, resp.status_code)
class AdminLibraryTest(BaseTestCase):
def setUp(self):
self.user_name = self.user.username
self.admin_name = self.admin.username
self.repo_id= self.repo.repo_id
self.library_url = reverse('api-v2.1-admin-library', args=[self.repo_id])
self.fs_share = FileShare.objects.create_dir_link(self.user.username,
self.repo_id, self.folder, None, None)
self.fs_upload = UploadLinkShare.objects.create_upload_link_share(self.user.username,
self.repo_id, self.folder, None, None)
def test_can_update_status_to_read_only(self):
self.login_as(self.admin)
data = 'status=%s' % 'read-only'
resp = self.client.put(self.library_url, data, 'application/x-www-form-urlencoded')
self.assertEqual(200, resp.status_code)
json_resp = json.loads(resp.content)
assert json_resp['status'] == 'read-only'
data = 'status=%s' % 'normal'
resp = self.client.put(self.library_url, data, 'application/x-www-form-urlencoded')
self.assertEqual(200, resp.status_code)
json_resp = json.loads(resp.content)
assert json_resp['status'] == 'normal'
def test_update_status_with_invalid_args(self):
self.login_as(self.admin)
data = 'status=%s' % 'invalid_args'
resp = self.client.put(self.library_url, data, 'application/x-www-form-urlencoded')
self.assertEqual(400, resp.status_code)
def test_can_get(self):
self.login_as(self.admin)
resp = self.client.get(self.library_url)
self.assertEqual(200, resp.status_code)
json_resp = json.loads(resp.content)
assert json_resp['owner'] == self.user_name
assert json_resp['name'] == self.repo.repo_name
assert json_resp['status'] == 'normal'
def test_get_with_invalid_user_permission(self):
self.login_as(self.user)
resp = self.client.get(self.library_url)
self.assertEqual(403, resp.status_code)
def test_can_not_transfer_library_to_owner(self):
self.login_as(self.admin)
data = 'owner=%s' % self.user_name
resp = self.client.put(self.library_url, data, 'application/x-www-form-urlencoded')
self.assertEqual(400, resp.status_code)
def test_can_transfer(self):
self.login_as(self.admin)
data = 'owner=%s' % self.admin_name
resp = self.client.put(self.library_url, data, 'application/x-www-form-urlencoded')
self.assertEqual(200, resp.status_code)
json_resp = json.loads(resp.content)
assert json_resp['owner'] == self.admin_name
def test_transfer_group_invalid_user_permission(self):
self.login_as(self.user)
data = 'owner=%s' % self.admin_name
resp = self.client.put(self.library_url, data, 'application/x-www-form-urlencoded')
self.assertEqual(403, resp.status_code)
def test_transfer_group_invalid_args(self):
self.login_as(self.admin)
# new owner not exist
data = 'owner=invalid@email.com'
resp = self.client.put(self.library_url, data, 'application/x-www-form-urlencoded')
self.assertEqual(404, resp.status_code)
def test_can_delete(self):
self.login_as(self.admin)
resp = self.client.delete(self.library_url)
self.assertEqual(200, resp.status_code)
json_resp = json.loads(resp.content)
assert json_resp['success'] is True
def test_delete_with_invalid_user_permission(self):
self.login_as(self.user)
resp = self.client.delete(self.library_url)
self.assertEqual(403, resp.status_code)
def test_reshare_to_share_links_after_transfer_repo(self):
self.login_as(self.admin)
assert len(UploadLinkShare.objects.all()) == 1
data = 'owner=%s' % self.admin_name
resp = self.client.put(self.library_url, data, 'application/x-www-form-urlencoded')
self.assertEqual(200, resp.status_code)
json_resp = json.loads(resp.content)
assert json_resp['owner'] == self.admin_name
def test_reshare_to_upload_links_after_transfer_repo(self):
self.login_as(self.admin)
assert len(UploadLinkShare.objects.all()) == 1
data = 'owner=%s' % self.admin_name
resp = self.client.put(self.library_url, data, 'application/x-www-form-urlencoded')
self.assertEqual(200, resp.status_code)
json_resp = json.loads(resp.content)
assert json_resp['owner'] == self.admin_name
| 30.826772
| 93
| 0.651596
| 1,031
| 7,830
| 4.71872
| 0.103783
| 0.047688
| 0.060432
| 0.061665
| 0.806783
| 0.775334
| 0.750257
| 0.73443
| 0.682631
| 0.648921
| 0
| 0.012175
| 0.234227
| 7,830
| 253
| 94
| 30.948617
| 0.799199
| 0.002427
| 0
| 0.666667
| 0
| 0
| 0.081701
| 0.046869
| 0
| 0
| 0
| 0
| 0.216374
| 1
| 0.134503
| false
| 0
| 0.02924
| 0
| 0.175439
| 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
|
62cfe287c873fea5b3e8377d007108e85cd81270
| 33
|
py
|
Python
|
ngym/__init__.py
|
d5555/NeuralGym
|
a71825d74954ae9ff47d0009e1ff6c0e4b5dfbb6
|
[
"MIT"
] | 45
|
2019-04-29T19:58:16.000Z
|
2022-03-17T23:28:31.000Z
|
ngym/__init__.py
|
d5555/NeuralGym
|
a71825d74954ae9ff47d0009e1ff6c0e4b5dfbb6
|
[
"MIT"
] | 5
|
2019-12-27T16:53:34.000Z
|
2021-05-09T00:02:00.000Z
|
ngym/__init__.py
|
d5555/NeuralGym
|
a71825d74954ae9ff47d0009e1ff6c0e4b5dfbb6
|
[
"MIT"
] | 9
|
2019-07-25T21:41:29.000Z
|
2022-02-24T09:54:53.000Z
|
from .__main__ import main
main()
| 16.5
| 26
| 0.787879
| 5
| 33
| 4.4
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121212
| 33
| 2
| 27
| 16.5
| 0.758621
| 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
|
62eeadf548f6620d7dca5737ff93ee2e1df854e7
| 153
|
py
|
Python
|
tests/conftest.py
|
ocfgaldino/flask_climate_app
|
d21b791e16efbc0ae9621941bed0372bb24bd1de
|
[
"Unlicense"
] | null | null | null |
tests/conftest.py
|
ocfgaldino/flask_climate_app
|
d21b791e16efbc0ae9621941bed0372bb24bd1de
|
[
"Unlicense"
] | null | null | null |
tests/conftest.py
|
ocfgaldino/flask_climate_app
|
d21b791e16efbc0ae9621941bed0372bb24bd1de
|
[
"Unlicense"
] | null | null | null |
import pytest
from climate.app import create_app
@pytest.fixture(scope="module")
def app():
"""Instance of Main Flask APP"""
return create_app()
| 21.857143
| 36
| 0.718954
| 22
| 153
| 4.909091
| 0.681818
| 0.166667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.156863
| 153
| 7
| 37
| 21.857143
| 0.837209
| 0.169935
| 0
| 0
| 0
| 0
| 0.04918
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| true
| 0
| 0.4
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
62f4aa5d66656c909f4dba550188c9925ad88249
| 494
|
py
|
Python
|
src/waldur_ansible/playbook_jobs/tests/unittests/test_models.py
|
opennode/waldur-ansible
|
c81c5f0491be02fa9a55a6d5bf9d845750fd1ba9
|
[
"MIT"
] | 1
|
2017-09-05T08:09:47.000Z
|
2017-09-05T08:09:47.000Z
|
src/waldur_ansible/playbook_jobs/tests/unittests/test_models.py
|
opennode/waldur-ansible
|
c81c5f0491be02fa9a55a6d5bf9d845750fd1ba9
|
[
"MIT"
] | null | null | null |
src/waldur_ansible/playbook_jobs/tests/unittests/test_models.py
|
opennode/waldur-ansible
|
c81c5f0491be02fa9a55a6d5bf9d845750fd1ba9
|
[
"MIT"
] | 3
|
2017-09-24T03:13:19.000Z
|
2018-08-12T07:44:38.000Z
|
from django.db import IntegrityError
from django.test import TestCase
from ..factories import PlaybookFactory, PlaybookParameterFactory
class PlaybookParameterTest(TestCase):
def setUp(self):
self.playbook = PlaybookFactory()
def test_cannot_create_parameters_with_same_name_for_same_playbook(self):
param = PlaybookParameterFactory(playbook=self.playbook)
self.assertRaises(IntegrityError, PlaybookParameterFactory, playbook=self.playbook, name=param.name)
| 35.285714
| 108
| 0.801619
| 51
| 494
| 7.588235
| 0.490196
| 0.124031
| 0.186047
| 0.22739
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131579
| 494
| 13
| 109
| 38
| 0.902098
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 1
| 0.222222
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
62f605babe4df899bd7d9e56f57f29d1d7641d44
| 491
|
py
|
Python
|
mycrypt/__init__.py
|
Zeyecx/myCrypt
|
24bfa0f6874d2abd964aed6146ae3552168392ed
|
[
"MIT"
] | null | null | null |
mycrypt/__init__.py
|
Zeyecx/myCrypt
|
24bfa0f6874d2abd964aed6146ae3552168392ed
|
[
"MIT"
] | null | null | null |
mycrypt/__init__.py
|
Zeyecx/myCrypt
|
24bfa0f6874d2abd964aed6146ae3552168392ed
|
[
"MIT"
] | null | null | null |
# Ceaser Crypt
from mycrypt.ceaser import ceaser_encrypt_string
from mycrypt.ceaser import ceaser_decrypt_string
from mycrypt.ceaser import ceaser_decrypt_file
from mycrypt.ceaser import ceaser_encrypt_file
# Analyse
from mycrypt.analyse import frequency_long
from mycrypt.analyse import frequency_short
# Output
from mycrypt.output import frequency_short_output
from mycrypt.output import frequency_long_output
# RSA
from mycrypt.rsa import export_key
from mycrypt.rsa import get_key
| 23.380952
| 49
| 0.85947
| 71
| 491
| 5.71831
| 0.253521
| 0.270936
| 0.167488
| 0.226601
| 0.758621
| 0.633005
| 0.455665
| 0.248768
| 0.248768
| 0
| 0
| 0
| 0.112016
| 491
| 20
| 50
| 24.55
| 0.931193
| 0.063136
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
1a2719a8daa17fea56393aa2c79dd66dbe42f8c7
| 142
|
py
|
Python
|
code/web/blueprints/__init__.py
|
Dvlv/flask-peewee-pytest
|
2b2084984c7745d6d77e64479cbeef20ed612b08
|
[
"CC-BY-4.0"
] | null | null | null |
code/web/blueprints/__init__.py
|
Dvlv/flask-peewee-pytest
|
2b2084984c7745d6d77e64479cbeef20ed612b08
|
[
"CC-BY-4.0"
] | null | null | null |
code/web/blueprints/__init__.py
|
Dvlv/flask-peewee-pytest
|
2b2084984c7745d6d77e64479cbeef20ed612b08
|
[
"CC-BY-4.0"
] | null | null | null |
from flask import Blueprint
site_blueprint = Blueprint("site", __name__)
admin_blueprint = Blueprint("admin", __name__, url_prefix="/admin")
| 28.4
| 67
| 0.78169
| 17
| 142
| 5.882353
| 0.529412
| 0.26
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.098592
| 142
| 4
| 68
| 35.5
| 0.78125
| 0
| 0
| 0
| 0
| 0
| 0.105634
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 1
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
|
0
| 5
|
a7f2cee0d0c7cc63042a4265a864c5b7c58983c8
| 110
|
py
|
Python
|
BAEKJOON/Python/2753.py
|
cmsong111/NJ_code
|
2df6176d179e168a2789a825ddeb977a82eb8d97
|
[
"MIT"
] | null | null | null |
BAEKJOON/Python/2753.py
|
cmsong111/NJ_code
|
2df6176d179e168a2789a825ddeb977a82eb8d97
|
[
"MIT"
] | null | null | null |
BAEKJOON/Python/2753.py
|
cmsong111/NJ_code
|
2df6176d179e168a2789a825ddeb977a82eb8d97
|
[
"MIT"
] | null | null | null |
a= int(input())
if (a%4 == 0) and (a%100 != 0):
print(1)
elif a%400 ==0:
print(1)
else:
print(0)
| 12.222222
| 31
| 0.481818
| 22
| 110
| 2.409091
| 0.590909
| 0.226415
| 0.264151
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1625
| 0.272727
| 110
| 8
| 32
| 13.75
| 0.5
| 0
| 0
| 0.285714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.428571
| 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
|
c5201b0a533daa9ed33050325d7fd8f15eb73845
| 118
|
py
|
Python
|
__init__.py
|
BenBarker/mpyr
|
15f37a0072559817a11ff2e88b62e075864a2a25
|
[
"Apache-2.0"
] | 11
|
2019-11-12T08:07:08.000Z
|
2021-12-31T07:28:21.000Z
|
__init__.py
|
BenBarker/mpyr
|
15f37a0072559817a11ff2e88b62e075864a2a25
|
[
"Apache-2.0"
] | 4
|
2019-02-24T16:30:40.000Z
|
2019-05-06T20:32:23.000Z
|
__init__.py
|
BenBarker/mpyr
|
15f37a0072559817a11ff2e88b62e075864a2a25
|
[
"Apache-2.0"
] | null | null | null |
'''rig pipeline prototype
by Ben Barker, copyright (c) 2015
ben.barker@gmail.com
for license info see license.txt
'''
| 19.666667
| 33
| 0.754237
| 19
| 118
| 4.684211
| 0.842105
| 0.202247
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.039216
| 0.135593
| 118
| 6
| 34
| 19.666667
| 0.833333
| 0.940678
| 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
|
c53cab62c78e6aba3d390646e0d5c629e3ba7f72
| 13
|
py
|
Python
|
python2/main.py
|
d3jota/git-test
|
16c7ce60796cc4a26bdaf095bedc8f4032e13ef6
|
[
"MIT"
] | null | null | null |
python2/main.py
|
d3jota/git-test
|
16c7ce60796cc4a26bdaf095bedc8f4032e13ef6
|
[
"MIT"
] | null | null | null |
python2/main.py
|
d3jota/git-test
|
16c7ce60796cc4a26bdaf095bedc8f4032e13ef6
|
[
"MIT"
] | null | null | null |
print("Oie")
| 6.5
| 12
| 0.615385
| 2
| 13
| 4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.076923
| 13
| 1
| 13
| 13
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0.230769
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
c56d5533bcf652021a90088435d840fbad491df3
| 143
|
py
|
Python
|
apply_defaults/__init__.py
|
bcb/apply_defaults
|
102591dc8b08d3e4f96d49e618c471b07b2331d9
|
[
"MIT"
] | 1
|
2021-07-21T06:13:50.000Z
|
2021-07-21T06:13:50.000Z
|
apply_defaults/__init__.py
|
bcb/apply_defaults
|
102591dc8b08d3e4f96d49e618c471b07b2331d9
|
[
"MIT"
] | 5
|
2018-09-22T02:01:45.000Z
|
2020-06-06T07:27:36.000Z
|
apply_defaults/__init__.py
|
bcb/apply_defaults
|
102591dc8b08d3e4f96d49e618c471b07b2331d9
|
[
"MIT"
] | 1
|
2020-01-17T00:47:23.000Z
|
2020-01-17T00:47:23.000Z
|
"""We alias the imports so mypy considers them re-exported."""
from .decorators import apply_self as apply_self, apply_config as apply_config
| 35.75
| 78
| 0.797203
| 23
| 143
| 4.782609
| 0.73913
| 0.163636
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.132867
| 143
| 3
| 79
| 47.666667
| 0.887097
| 0.391608
| 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
|
3d9a974ae77ffa153bd255b4b0e4e99271da763d
| 65
|
py
|
Python
|
src/dl/models/models_impl/__init__.py
|
okunator/Dippa
|
dcbb7056511dd6f66bcc7b095716c385d0b0a8bb
|
[
"MIT"
] | 13
|
2021-01-25T07:47:03.000Z
|
2022-01-20T16:02:51.000Z
|
src/dl/models/models_impl/__init__.py
|
okunator/Dippa
|
dcbb7056511dd6f66bcc7b095716c385d0b0a8bb
|
[
"MIT"
] | 1
|
2022-02-12T15:03:23.000Z
|
2022-02-12T15:03:23.000Z
|
src/dl/models/models_impl/__init__.py
|
okunator/Dippa
|
dcbb7056511dd6f66bcc7b095716c385d0b0a8bb
|
[
"MIT"
] | null | null | null |
from src.dl.models.models_impl.unet3plus.model import Unet3pMulti
| 65
| 65
| 0.876923
| 10
| 65
| 5.6
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.032258
| 0.046154
| 65
| 1
| 65
| 65
| 0.870968
| 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
|
3daf61d91fb7db4558770e59c1ca75faf8bba7cc
| 91
|
py
|
Python
|
transparentai/models/classification/__init__.py
|
Nathanlauga/transparentai
|
9c21c60fe68170f46ba4455173ce80493e3b3bb5
|
[
"MIT"
] | 7
|
2020-01-20T09:59:51.000Z
|
2021-11-06T07:10:27.000Z
|
transparentai/models/classification/__init__.py
|
Nathanlauga/transparentai
|
9c21c60fe68170f46ba4455173ce80493e3b3bb5
|
[
"MIT"
] | 8
|
2020-03-24T14:28:50.000Z
|
2020-07-31T14:55:06.000Z
|
transparentai/models/classification/__init__.py
|
Nathanlauga/transparentai
|
9c21c60fe68170f46ba4455173ce80493e3b3bb5
|
[
"MIT"
] | null | null | null |
from .metrics import (compute_metrics)
from .classification_plots import (plot_performance)
| 45.5
| 52
| 0.857143
| 11
| 91
| 6.818182
| 0.727273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.076923
| 91
| 2
| 52
| 45.5
| 0.892857
| 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
|
3dbb231d84b275b69124f3f6c42a347555b5038d
| 101
|
py
|
Python
|
test-crates/pyo3-ffi-pure/check_installed/check_installed.py
|
Contextualist/maturin
|
fbf595863c41983263f79820159f9425bf84b2e5
|
[
"Apache-2.0",
"MIT"
] | 135
|
2018-07-21T23:51:51.000Z
|
2019-08-29T04:07:22.000Z
|
test-crates/pyo3-ffi-pure/check_installed/check_installed.py
|
Contextualist/maturin
|
fbf595863c41983263f79820159f9425bf84b2e5
|
[
"Apache-2.0",
"MIT"
] | 105
|
2018-07-21T23:33:12.000Z
|
2019-08-30T17:13:33.000Z
|
test-crates/pyo3-ffi-pure/check_installed/check_installed.py
|
aganders3/maturin
|
6b5c8735bfae8c05091d71cf2ca8a09aa7c0a587
|
[
"Apache-2.0",
"MIT"
] | 19
|
2018-07-22T23:31:14.000Z
|
2019-08-29T04:08:34.000Z
|
#!/usr/bin/env python3
import pyo3_ffi_pure
assert pyo3_ffi_pure.sum(2, 40) == 42
print("SUCCESS")
| 14.428571
| 37
| 0.732673
| 18
| 101
| 3.888889
| 0.833333
| 0.2
| 0.314286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.089888
| 0.118812
| 101
| 6
| 38
| 16.833333
| 0.696629
| 0.207921
| 0
| 0
| 0
| 0
| 0.088608
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0.333333
| 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
|
3dbfc77da76a778509ee35d9929d323c79f7d9f5
| 61
|
py
|
Python
|
Language Skills/Python/Unit 02 Strings and Console Output/02 Date and Time/2-Getting the current date and time.py
|
rhyep/Python_tutorials
|
f5c8a64b91802b005dfe7dd9035f8d8daae8c3e3
|
[
"MIT"
] | 346
|
2016-02-22T20:21:10.000Z
|
2022-01-27T20:55:53.000Z
|
Language Skills/Python/Unit 2/2-Date and Time/2-Getting the current date and time.py
|
vpstudios/Codecademy-Exercise-Answers
|
ebd0ee8197a8001465636f52c69592ea6745aa0c
|
[
"MIT"
] | 55
|
2016-04-07T13:58:44.000Z
|
2020-06-25T12:20:24.000Z
|
Language Skills/Python/Unit 2/2-Date and Time/2-Getting the current date and time.py
|
vpstudios/Codecademy-Exercise-Answers
|
ebd0ee8197a8001465636f52c69592ea6745aa0c
|
[
"MIT"
] | 477
|
2016-02-21T06:17:02.000Z
|
2021-12-22T10:08:01.000Z
|
from datetime import datetime
now = datetime.now()
print now
| 15.25
| 29
| 0.786885
| 9
| 61
| 5.333333
| 0.555556
| 0.458333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.147541
| 61
| 3
| 30
| 20.333333
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.333333
| null | null | 0.333333
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
9ab45f1810a80f76fd17c02ddcb206458ddfa90c
| 191
|
py
|
Python
|
app/config/__init__.py
|
kaczmarj/grand-challenge.org
|
8dc8a2170e51072354f7e94f2a22578805a67b94
|
[
"Apache-2.0"
] | 101
|
2018-04-11T14:48:04.000Z
|
2022-03-28T00:29:48.000Z
|
app/config/__init__.py
|
kaczmarj/grand-challenge.org
|
8dc8a2170e51072354f7e94f2a22578805a67b94
|
[
"Apache-2.0"
] | 1,733
|
2018-03-21T11:56:16.000Z
|
2022-03-31T14:58:30.000Z
|
app/config/__init__.py
|
kaczmarj/grand-challenge.org
|
8dc8a2170e51072354f7e94f2a22578805a67b94
|
[
"Apache-2.0"
] | 42
|
2018-06-08T05:49:07.000Z
|
2022-03-29T08:43:01.000Z
|
from django.conf import settings
from config.celery import celery_app
__all__ = ["celery_app"]
def toolbar_callback(*_, **__):
return settings.DEBUG and settings.ENABLE_DEBUG_TOOLBAR
| 19.1
| 59
| 0.780105
| 25
| 191
| 5.48
| 0.64
| 0.131387
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136126
| 191
| 9
| 60
| 21.222222
| 0.830303
| 0
| 0
| 0
| 0
| 0
| 0.052356
| 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
|
9ab6fb5c7510326dd2e1b6563839101cce4278d8
| 42
|
py
|
Python
|
Djtube/Djtube/settings/partials/__init__.py
|
2044smile/Djtube
|
fee5061e6f83bb516f9e017cee52e2b41395c8ba
|
[
"MIT"
] | null | null | null |
Djtube/Djtube/settings/partials/__init__.py
|
2044smile/Djtube
|
fee5061e6f83bb516f9e017cee52e2b41395c8ba
|
[
"MIT"
] | 2
|
2020-01-28T09:59:31.000Z
|
2020-02-05T14:15:02.000Z
|
Djtube/Djtube/settings/partials/__init__.py
|
2044smile/Djtube
|
fee5061e6f83bb516f9e017cee52e2b41395c8ba
|
[
"MIT"
] | null | null | null |
from .base import *
from .auth import *
| 14
| 20
| 0.666667
| 6
| 42
| 4.666667
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.238095
| 42
| 2
| 21
| 21
| 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
|
9ac6c7832d2d3f6068b65502eca06381e41b50c7
| 1,813
|
py
|
Python
|
app/parser/core/gpx_handlers.py
|
key/gpslogparser
|
158ea1721463e6a28d4097d5bd34c79114592dda
|
[
"MIT"
] | null | null | null |
app/parser/core/gpx_handlers.py
|
key/gpslogparser
|
158ea1721463e6a28d4097d5bd34c79114592dda
|
[
"MIT"
] | 42
|
2015-03-25T05:55:45.000Z
|
2021-06-25T15:22:37.000Z
|
app/parser/core/gpx_handlers.py
|
key/gpslogparser
|
158ea1721463e6a28d4097d5bd34c79114592dda
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
from xml.sax import ContentHandler
class TrackPointHandler(ContentHandler):
def __init__(self):
self.results = []
self.initialize()
def startElement(self, name, attrs):
if name == 'trkpt':
self.initialize()
self.lon = attrs['lon']
self.lat = attrs['lat']
elif name == 'time':
self.inTime = True
elif name == 'ele':
self.inEle = True
def endElement(self, name):
if name == 'trkpt':
self.results.append([self.time, self.lon, self.lat, self.ele])
elif name == 'time':
self.inTime = False
elif name == 'ele':
self.inEle = False
def characters(self, content):
if self.inTime:
self.time += content.strip()
if self.inEle:
self.ele += content.strip()
def initialize(self):
self.lon = ''
self.lat = ''
self.time = ''
self.ele = ''
self.inEle = False
self.inTime = False
class WayPointHandler(ContentHandler):
def __init__(self):
self.results = []
self.initialize()
def startElement(self, name, attrs):
if name == 'wpt':
self.initialize()
self.lon = attrs['lon']
self.lat = attrs['lat']
elif name == 'ele':
self.inEle = True
def endElement(self, name):
if name == 'wpt':
self.results.append([None, self.lon, self.lat, self.ele])
elif name == 'ele':
self.inEle = False
def characters(self, content):
if self.inEle:
self.ele += content.strip()
def initialize(self):
self.lon = ''
self.lat = ''
self.ele = ''
self.inEle = False
| 24.835616
| 74
| 0.508549
| 193
| 1,813
| 4.735751
| 0.19171
| 0.078775
| 0.065646
| 0.065646
| 0.78337
| 0.714442
| 0.71116
| 0.71116
| 0.656455
| 0.656455
| 0
| 0.000858
| 0.357419
| 1,813
| 73
| 75
| 24.835616
| 0.783691
| 0.011583
| 0
| 0.842105
| 0
| 0
| 0.026801
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.175439
| false
| 0
| 0.017544
| 0
| 0.22807
| 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
|
9add1e809013d31678a9bc96c1bd06a2ff3a117d
| 1,036
|
py
|
Python
|
python/anyascii/_data/_06c.py
|
casept/anyascii
|
d4f426b91751254b68eaa84c6cd23099edd668e6
|
[
"ISC"
] | null | null | null |
python/anyascii/_data/_06c.py
|
casept/anyascii
|
d4f426b91751254b68eaa84c6cd23099edd668e6
|
[
"ISC"
] | null | null | null |
python/anyascii/_data/_06c.py
|
casept/anyascii
|
d4f426b91751254b68eaa84c6cd23099edd668e6
|
[
"ISC"
] | null | null | null |
b='Lu Mu Mao Tong Rong Chang Pu Lu Zhan Sao Zhan Meng Lu Qu Die Shi Di Min Jue Mang Qi Pie Nai Qi Dao Xian Chuan Fen Yang Nei Bin Fu Shen Dong Qing Qi Yin Xi Hai Yang An Ya Ke Qing Ya Dong Dan Lu Qing Yang Yun Yun Shui Shui Zheng Bing Yong Dang Shui Le Ni Tun Fan Gui Ting Zhi Qiu Bin Ze Mian Cuan Hui Diao Han Cha Zhuo Chuan Wan Fan Da Xi Tuo Mang Qiu Qi Shan Pin Han Qian Wu Wu Xun Si Ru Gong Jiang Chi Wu Tu Jiu Tang Zhi Zhi Qian Mi Gu Wang Jing Jing Rui Jun Hong Tai Quan Ji Bian Bian Gan Wen Zhong Fang Xiong Jue Hu Niu Qi Fen Xu Xu Qin Yi Wo Yun Yuan Hang Yan Chen Chen Dan You Dun Hu Huo Qi Mu Nu Mei Da Mian Mi Chong Pang Bi Sha Zhi Pei Pan Zhui Za Gou Liu Mei Ze Feng Ou Li Lun Cang Feng Wei Hu Mo Mei Shu Ju Za Tuo Tuo Tuo He Li Mi Yi Fa Fei You Tian Zhi Zhao Gu Zhan Yan Si Kuang Jiong Ju Xie Qiu Yi Jia Zhong Quan Po Hui Mi Ben Ze Zhu Le You Gu Hong Gan Fa Mao Si Hu Ping Ci Fan Zhi Su Ning Cheng Ling Pao Bo Qi Si Ni Ju Sa Zhu Sheng Lei Xuan Jue Fu Pan Min Tai Yang Ji Yong Guan Beng Xue Long Lu Dan Luo Xie Po Ze Jing Yin'
| 1,036
| 1,036
| 0.750965
| 257
| 1,036
| 3.027237
| 0.607004
| 0.015424
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.246139
| 1,036
| 1
| 1,036
| 1,036
| 0.996159
| 0
| 0
| 0
| 0
| 1
| 0.995178
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
b105bd4fcbb16be81bfcc8d686187ace0bff35ce
| 55
|
py
|
Python
|
acq4/drivers/SutterMP285/__init__.py
|
ablot/acq4
|
ba7cd340d9d0282640adb501d3788f8c0837e4c4
|
[
"MIT"
] | null | null | null |
acq4/drivers/SutterMP285/__init__.py
|
ablot/acq4
|
ba7cd340d9d0282640adb501d3788f8c0837e4c4
|
[
"MIT"
] | null | null | null |
acq4/drivers/SutterMP285/__init__.py
|
ablot/acq4
|
ba7cd340d9d0282640adb501d3788f8c0837e4c4
|
[
"MIT"
] | null | null | null |
from mp285 import SutterMP285, TimeoutError, MP285Error
| 55
| 55
| 0.872727
| 6
| 55
| 8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.18
| 0.090909
| 55
| 1
| 55
| 55
| 0.78
| 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
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.