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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2e6c6ab4489c9f22e64ad0b195c2d30ed130ae48
| 83
|
py
|
Python
|
jsonrpc/proxy.py
|
escrowmycoinsnet/python-monerorpc
|
8e3064e521992b55c5e43e3f782b4f9d4634c50d
|
[
"MIT"
] | 10
|
2018-10-26T14:19:41.000Z
|
2021-12-13T22:46:56.000Z
|
jsonrpc/proxy.py
|
escrowmycoinsnet/python-monerorpc
|
8e3064e521992b55c5e43e3f782b4f9d4634c50d
|
[
"MIT"
] | 5
|
2019-01-18T14:43:33.000Z
|
2022-03-10T21:57:29.000Z
|
jsonrpc/proxy.py
|
escrowmycoinsnet/python-monerorpc
|
8e3064e521992b55c5e43e3f782b4f9d4634c50d
|
[
"MIT"
] | 10
|
2018-10-16T06:05:44.000Z
|
2021-10-18T11:41:59.000Z
|
from monerorpc.authproxy import AuthServiceProxy as ServiceProxy, JSONRPCException
| 41.5
| 82
| 0.891566
| 8
| 83
| 9.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.084337
| 83
| 1
| 83
| 83
| 0.973684
| 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
|
cf02c07820ae9da8ee0ed716a8197209add9a750
| 34
|
py
|
Python
|
src/boot.py
|
wichur/Wi.Rptt.Mp
|
e4cf404a0dd1beb4832d8892a2f815c2efba93ed
|
[
"MIT"
] | null | null | null |
src/boot.py
|
wichur/Wi.Rptt.Mp
|
e4cf404a0dd1beb4832d8892a2f815c2efba93ed
|
[
"MIT"
] | null | null | null |
src/boot.py
|
wichur/Wi.Rptt.Mp
|
e4cf404a0dd1beb4832d8892a2f815c2efba93ed
|
[
"MIT"
] | null | null | null |
# boot.py - - runs on boot-up true
| 34
| 34
| 0.647059
| 7
| 34
| 3.142857
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.205882
| 34
| 1
| 34
| 34
| 0.814815
| 0.941176
| 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
|
cf1a52125dfa23085fe2185505e85cee2f264088
| 201
|
py
|
Python
|
code/python/misc.py
|
sglvt/notes
|
adeb704960d97235e8f92a1c4df79f898d5160f4
|
[
"MIT"
] | null | null | null |
code/python/misc.py
|
sglvt/notes
|
adeb704960d97235e8f92a1c4df79f898d5160f4
|
[
"MIT"
] | null | null | null |
code/python/misc.py
|
sglvt/notes
|
adeb704960d97235e8f92a1c4df79f898d5160f4
|
[
"MIT"
] | null | null | null |
import random
# Random
random.seed(3)
print(random.random())
print(random.random())
print(random.randrange(1, 10))
print(random.sample(range(100), 10))
# print with separator
print(1, 2, 3, sep='|')
| 16.75
| 36
| 0.706468
| 31
| 201
| 4.580645
| 0.483871
| 0.338028
| 0.239437
| 0.309859
| 0.316901
| 0
| 0
| 0
| 0
| 0
| 0
| 0.066667
| 0.104478
| 201
| 11
| 37
| 18.272727
| 0.722222
| 0.134328
| 0
| 0.285714
| 0
| 0
| 0.005848
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.142857
| 0
| 0.142857
| 0.714286
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
cf267c90c92ea0bf6a9205c614e3613006f6cdab
| 67
|
py
|
Python
|
src/kaa/engine.py
|
PawelRoman/kaa
|
555b8d0c06cdb1052d7adfb8f11b233e749bdda2
|
[
"MIT"
] | 1
|
2020-04-30T12:51:26.000Z
|
2020-04-30T12:51:26.000Z
|
src/kaa/engine.py
|
PawelRoman/kaa
|
555b8d0c06cdb1052d7adfb8f11b233e749bdda2
|
[
"MIT"
] | null | null | null |
src/kaa/engine.py
|
PawelRoman/kaa
|
555b8d0c06cdb1052d7adfb8f11b233e749bdda2
|
[
"MIT"
] | null | null | null |
from ._kaa import Engine, Scene, get_engine, VirtualResolutionMode
| 33.5
| 66
| 0.835821
| 8
| 67
| 6.75
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.104478
| 67
| 1
| 67
| 67
| 0.9
| 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
|
cf8821d308e51649f8afcac969c3aec67d9fc32d
| 194
|
py
|
Python
|
twobuntu/context_processors.py
|
muhiza/originarities
|
ca0a67363579e6237127386f13baa2ab7a7c2717
|
[
"Apache-2.0"
] | 16
|
2015-01-12T12:25:28.000Z
|
2021-06-22T03:23:44.000Z
|
twobuntu/context_processors.py
|
muhiza/originarities
|
ca0a67363579e6237127386f13baa2ab7a7c2717
|
[
"Apache-2.0"
] | 5
|
2015-01-02T01:23:40.000Z
|
2015-10-22T06:11:40.000Z
|
twobuntu/context_processors.py
|
muhiza/originarities
|
ca0a67363579e6237127386f13baa2ab7a7c2717
|
[
"Apache-2.0"
] | 11
|
2015-01-27T06:23:45.000Z
|
2020-05-20T11:46:12.000Z
|
from django.conf import settings
def read_only(request):
"""
Add a template variable indicating read-only mode.
"""
return {'READ_ONLY': getattr(settings, 'READ_ONLY', False)}
| 21.555556
| 63
| 0.685567
| 25
| 194
| 5.2
| 0.72
| 0.246154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.195876
| 194
| 8
| 64
| 24.25
| 0.833333
| 0.257732
| 0
| 0
| 0
| 0
| 0.140625
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 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
| 1
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
d8aa1a4d8ced245f466d11bf8e6971be1d324458
| 99
|
py
|
Python
|
office365/sharepoint/userprofiles/followedItem.py
|
wreiner/Office365-REST-Python-Client
|
476bbce4f5928a140b4f5d33475d0ac9b0783530
|
[
"MIT"
] | 544
|
2016-08-04T17:10:16.000Z
|
2022-03-31T07:17:20.000Z
|
office365/sharepoint/userprofiles/followedItem.py
|
wreiner/Office365-REST-Python-Client
|
476bbce4f5928a140b4f5d33475d0ac9b0783530
|
[
"MIT"
] | 438
|
2016-10-11T12:24:22.000Z
|
2022-03-31T19:30:35.000Z
|
office365/sharepoint/userprofiles/followedItem.py
|
wreiner/Office365-REST-Python-Client
|
476bbce4f5928a140b4f5d33475d0ac9b0783530
|
[
"MIT"
] | 202
|
2016-08-22T19:29:40.000Z
|
2022-03-30T20:26:15.000Z
|
from office365.runtime.client_value import ClientValue
class FollowedItem(ClientValue):
pass
| 16.5
| 54
| 0.818182
| 11
| 99
| 7.272727
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.034884
| 0.131313
| 99
| 5
| 55
| 19.8
| 0.895349
| 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
|
d8b3819514f5838ebc5f946ebb6d988944bc11fa
| 43
|
py
|
Python
|
cases/noglobal.py
|
minakoyang/YY_python2.7_interpreter_in_CPP
|
e949f4bbd27752e6dbfef0a887d9567345d512f4
|
[
"MIT"
] | 1
|
2019-04-30T16:27:19.000Z
|
2019-04-30T16:27:19.000Z
|
cases/noglobal.py
|
minakoyang/YY_python2.7_interpreter_in_CPP
|
e949f4bbd27752e6dbfef0a887d9567345d512f4
|
[
"MIT"
] | null | null | null |
cases/noglobal.py
|
minakoyang/YY_python2.7_interpreter_in_CPP
|
e949f4bbd27752e6dbfef0a887d9567345d512f4
|
[
"MIT"
] | null | null | null |
x = 9
def f():
# x += 11
print x
f()
| 5.375
| 11
| 0.372093
| 9
| 43
| 1.777778
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12
| 0.418605
| 43
| 7
| 12
| 6.142857
| 0.52
| 0.162791
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.25
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
d8e17709a8ae9ef1c17278827b46eb4f24a9fa59
| 178
|
py
|
Python
|
src/lib/__init__.py
|
geraldinepyh/LaTeXreport
|
ece1bee6f33eb5e7b22250aa695fd83a26912cc4
|
[
"MIT"
] | null | null | null |
src/lib/__init__.py
|
geraldinepyh/LaTeXreport
|
ece1bee6f33eb5e7b22250aa695fd83a26912cc4
|
[
"MIT"
] | 6
|
2020-01-28T22:56:13.000Z
|
2022-02-10T00:30:25.000Z
|
src/lib/__init__.py
|
geraldinepyh/LaTeXreport
|
ece1bee6f33eb5e7b22250aa695fd83a26912cc4
|
[
"MIT"
] | null | null | null |
'''Libraries used by the main program
All the libraries that will be used by the
main program will be placed here.
Contains Library with functions to create latex report.
'''
| 25.428571
| 55
| 0.769663
| 29
| 178
| 4.724138
| 0.689655
| 0.087591
| 0.131387
| 0.189781
| 0.291971
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.185393
| 178
| 7
| 56
| 25.428571
| 0.944828
| 0.960674
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 1
| 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
|
995e82f5796330ff2b2ee043fffe7be06d7af2c9
| 3,205
|
py
|
Python
|
cesium_app/tests/test_util.py
|
yaowenxi/cesium
|
b87c8bcafc8a7707877f8b9e9b111a2a99b5aeee
|
[
"BSD-3-Clause"
] | 41
|
2016-10-10T23:14:54.000Z
|
2021-07-08T19:44:14.000Z
|
cesium_app/tests/test_util.py
|
cesium-ml/cesium_web
|
6dd9977ff037982d50f740bfb62012b508eebd29
|
[
"BSD-3-Clause"
] | 200
|
2016-06-22T19:55:38.000Z
|
2022-03-22T18:42:19.000Z
|
cesium_app/tests/test_util.py
|
yaowenxi/cesium
|
b87c8bcafc8a7707877f8b9e9b111a2a99b5aeee
|
[
"BSD-3-Clause"
] | 26
|
2016-04-21T00:50:03.000Z
|
2019-11-04T20:19:53.000Z
|
from cesium_app import util
from cesium_app.ext import sklearn_models
import numpy.testing as npt
import pytest
def test_robust_literal_eval():
"""Test util.robust_literal_eval"""
params = {"n_estimators": "1000",
"max_features": "auto",
"min_weight_fraction_leaf": "0.34",
"bootstrap": "True",
"class_weight": "{'a': 0.2, 'b': 0.8}",
"max_features2": "[150.3, 20, 'auto']"}
expected = {"n_estimators": 1000,
"max_features": "auto",
"min_weight_fraction_leaf": 0.34,
"bootstrap": True,
"class_weight": {'a': 0.2, 'b': 0.8},
"max_features2": [150.3, 20, "auto"]}
params = {k: util.robust_literal_eval(v) for k, v in params.items()}
npt.assert_equal(params, expected)
def test_check_model_param_types():
"""Test sklearn_models.check_model_param_types"""
model_type = "RandomForestClassifier"
params = {"n_estimators": 1000,
"max_features": "auto",
"min_weight_fraction_leaf": 0.34,
"bootstrap": True,
"class_weight": {'a': 0.2, 'b': 0.8}}
sklearn_models.check_model_param_types(model_type, params)
params = {"n_estimators": 100.1}
pytest.raises(ValueError, sklearn_models.check_model_param_types,
model_type, params)
model_type = "RandomForestClassifier"
params = {"max_features": 150}
sklearn_models.check_model_param_types(model_type, params)
model_type = "RandomForestClassifier"
params = {"max_features": [100, 150, 200],
"n_estimators": [10, 50, 100, 1000],
"bootstrap": True}
normal, opt = sklearn_models.check_model_param_types(model_type, params)
assert normal == {"bootstrap": True}
assert opt == {"max_features": [100, 150, 200],
"n_estimators": [10, 50, 100, 1000]}
params = {"max_depth": 100.1}
pytest.raises(ValueError, sklearn_models.check_model_param_types,
model_type, params)
model_type = "RandomForestClassifier"
params = {"max_features": 150.3}
sklearn_models.check_model_param_types(model_type, params)
params = {"max_depth": False}
pytest.raises(ValueError, sklearn_models.check_model_param_types,
model_type, params)
model_type = "LinearSGDClassifier"
params = {"class_weight": {'a': 0.2, 'b': 0.8},
"average": False}
sklearn_models.check_model_param_types(model_type, params)
params = {"average": 20.3}
pytest.raises(ValueError, sklearn_models.check_model_param_types,
model_type, params)
model_type = "LinearSGDClassifier"
params = {"class_weight": "some_str",
"average": 2}
sklearn_models.check_model_param_types(model_type, params)
model_type = "RidgeClassifierCV"
params = {"alphas": [0.1, 2.1, 6.2]}
sklearn_models.check_model_param_types(model_type, params)
model_type = "RandomForestClassifier"
params = {"invalid_param_name": "some_value"}
pytest.raises(ValueError, sklearn_models.check_model_param_types,
model_type, params)
| 37.267442
| 76
| 0.629953
| 380
| 3,205
| 4.992105
| 0.202632
| 0.094887
| 0.110701
| 0.147601
| 0.753295
| 0.753295
| 0.753295
| 0.753295
| 0.727992
| 0.702688
| 0
| 0.047756
| 0.242122
| 3,205
| 85
| 77
| 37.705882
| 0.733224
| 0.022777
| 0
| 0.441176
| 0
| 0
| 0.217238
| 0.058315
| 0
| 0
| 0
| 0
| 0.044118
| 1
| 0.029412
| false
| 0
| 0.058824
| 0
| 0.088235
| 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
|
41d0a86a166224cfc6ccbafafebdaf689485c6ea
| 28
|
py
|
Python
|
test_github/test.py
|
LingD0101/git_project
|
87e6dab0b523cb5836e4e8fedf0973877ae7763d
|
[
"MIT"
] | null | null | null |
test_github/test.py
|
LingD0101/git_project
|
87e6dab0b523cb5836e4e8fedf0973877ae7763d
|
[
"MIT"
] | null | null | null |
test_github/test.py
|
LingD0101/git_project
|
87e6dab0b523cb5836e4e8fedf0973877ae7763d
|
[
"MIT"
] | null | null | null |
a = 1
b = a+10
print(b)
| 3.5
| 8
| 0.428571
| 7
| 28
| 1.714286
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176471
| 0.392857
| 28
| 7
| 9
| 4
| 0.529412
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
41f1a087dfb10bc733e835e6f036e946e543e97b
| 42
|
py
|
Python
|
inspirobot/error.py
|
divyankachaudhari/Inspirobot-Bookmarks
|
5ee47fc8262729902a8206f04078708679575065
|
[
"MIT"
] | 3
|
2021-07-11T22:29:06.000Z
|
2021-11-08T09:14:28.000Z
|
inspirobot/error.py
|
divyankachaudhari/Inspirobot-Bookmarks
|
5ee47fc8262729902a8206f04078708679575065
|
[
"MIT"
] | 2
|
2021-01-27T15:17:54.000Z
|
2021-06-01T16:21:45.000Z
|
inspirobot/error.py
|
divyankachaudhari/Inspirobot-Bookmarks
|
5ee47fc8262729902a8206f04078708679575065
|
[
"MIT"
] | 2
|
2021-08-28T21:17:44.000Z
|
2022-02-09T06:13:10.000Z
|
class InsprioBotError(Exception):
pass
| 21
| 33
| 0.785714
| 4
| 42
| 8.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 42
| 2
| 34
| 21
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
41f39ed249a09841e507ed2cdfea556cba314566
| 3,319
|
py
|
Python
|
Phase5/encapsImage.py
|
DamianoP/AdaptiveMethods
|
21a542f8e1c43a20bcce976b30b15bcf8ea91c52
|
[
"MIT"
] | 2
|
2019-01-02T17:42:02.000Z
|
2019-01-09T09:11:37.000Z
|
Phase5/results/encapsImage.py
|
DamianoP/AdaptiveMethods
|
21a542f8e1c43a20bcce976b30b15bcf8ea91c52
|
[
"MIT"
] | null | null | null |
Phase5/results/encapsImage.py
|
DamianoP/AdaptiveMethods
|
21a542f8e1c43a20bcce976b30b15bcf8ea91c52
|
[
"MIT"
] | null | null | null |
import os
print("ALL")
os.system("python imageMultiClassifier.py ALL dataset_DecisionTree_ALL dataset_RandomForest_ALL dataset_SVM_ALL dataset_Bayesian_ALL")
print("Alexnet")
os.system("python imageMultiClassifier.py Alexnet Alexnet_DecisionTree_ALL Alexnet_RandomForest_ALL Alexnet_MLP_ALL Alexnet_Bayesian_ALL Alexnet_SVM_ALL")
print("FCN-16s")
os.system("python imageMultiClassifier.py FCN-16s FCN-16s_DecisionTree_ALL FCN-16s_RandomForest_ALL FCN-16s_MLP_ALL FCN-16s_Bayesian_ALL FCN-16s_SVM_ALL")
print("inceptionV3")
os.system("python imageMultiClassifier.py inceptionV3 inceptionV3_DecisionTree_ALL inceptionV3_RandomForest_ALL inceptionV3_MLP_ALL inceptionV3_Bayesian_ALL inceptionV3_SVM_ALL")
print("Mobilenets")
os.system("python imageMultiClassifier.py Mobilenets Mobilenets_DecisionTree_ALL Mobilenets_RandomForest_ALL Mobilenets_MLP_ALL Mobilenets_Bayesian_ALL Mobilenets_SVM_ALL")
print("Network-in-Network")
os.system("python imageMultiClassifier.py Network-in-Network Network-in-Network_DecisionTree_ALL Network-in-Network_RandomForest_ALL Network-in-Network_MLP_ALL Network-in-Network_Bayesian_ALL Network-in-Network_SVM_ALL")
print("ResNet")
os.system("python imageMultiClassifier.py ResNet ResNet_DecisionTree_ALL ResNet_RandomForest_ALL ResNet_MLP_ALL ResNet_Bayesian_ALL ResNet_RandomForest_ALL ResNet_SVM_ALL")
print("VGG-16")
os.system("python imageMultiClassifier.py VGG-16 VGG-16_DecisionTree_ALL VGG-16_RandomForest_ALL VGG-16_MLP_ALL VGG-16_Bayesian_ALL VGG-16_SVM_ALL")
print("GoogLeNet")
os.system("python imageMultiClassifier.py GoogLeNet GoogLeNet_DecisionTree_ALL GoogLeNet_RandomForest_ALL GoogLeNet_MLP_ALL GoogLeNet_Bayesian_ALL GoogLeNet_SVM_ALL")
print("CV")
os.system("python imageMultiClassifier.py CV dataset_DecisionTree_CV dataset_RandomForest_CV dataset_SVM_CV dataset_Bayesian_CV")
print("Alexnet")
os.system("python imageMultiClassifier.py Alexnet Alexnet_DecisionTree_CV Alexnet_RandomForest_CV Alexnet_MLP_CV Alexnet_Bayesian_CV Alexnet_SVM_CV")
print("FCN-16s")
os.system("python imageMultiClassifier.py FCN-16s FCN-16s_DecisionTree_CV FCN-16s_RandomForest_CV FCN-16s_MLP_CV FCN-16s_Bayesian_CV FCN-16s_SVM_CV")
print("inceptionV3")
os.system("python imageMultiClassifier.py inceptionV3 inceptionV3_DecisionTree_CV inceptionV3_RandomForest_CV inceptionV3_MLP_CV inceptionV3_Bayesian_CV inceptionV3_SVM_CV")
print("Mobilenets")
os.system("python imageMultiClassifier.py Mobilenets Mobilenets_DecisionTree_CV Mobilenets_RandomForest_CV Mobilenets_MLP_CV Mobilenets_Bayesian_CV Mobilenets_SVM_CV")
print("Network-in-Network")
os.system("python imageMultiClassifier.py Network-in-Network Network-in-Network_DecisionTree_CV Network-in-Network_RandomForest_CV Network-in-Network_MLP_CV Network-in-Network_Bayesian_CV Network-in-Network_SVM_CV")
print("ResNet")
os.system("python imageMultiClassifier.py ResNet ResNet_DecisionTree_CV ResNet_RandomForest_CV ResNet_MLP_CV ResNet_Bayesian_CV ResNet_RandomForest_CV ResNet_SVM_CV")
print("VGG-16")
os.system("python imageMultiClassifier.py VGG-16 VGG-16_DecisionTree_CV VGG-16_RandomForest_CV VGG-16_MLP_CV VGG-16_Bayesian_CV VGG-16_SVM_CV")
print("GoogLeNet")
os.system("python imageMultiClassifier.py GoogLeNet GoogLeNet_DecisionTree_CV GoogLeNet_RandomForest_CV GoogLeNet_MLP_CV GoogLeNet_Bayesian_CV GoogLeNet_SVM_CV")
| 87.342105
| 221
| 0.877071
| 472
| 3,319
| 5.786017
| 0.055085
| 0.052728
| 0.092274
| 0.224094
| 0.533138
| 0.464299
| 0.464299
| 0.464299
| 0.464299
| 0.464299
| 0
| 0.022243
| 0.051823
| 3,319
| 38
| 222
| 87.342105
| 0.845567
| 0
| 0
| 0.432432
| 0
| 0.162162
| 0.866566
| 0.504518
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.027027
| 0
| 0.027027
| 0.486486
| 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
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
51092dfb49a6299ea6ecf1af47d0cd2ce7a3403f
| 104
|
py
|
Python
|
activities/admin.py
|
codyowl/activitytracker
|
c7d75a8bb24a45b34547c20eecb4de106889e7d8
|
[
"BSD-3-Clause"
] | 10
|
2017-05-05T07:04:20.000Z
|
2021-05-14T04:51:46.000Z
|
activities/admin.py
|
codyowl/activitytracker
|
c7d75a8bb24a45b34547c20eecb4de106889e7d8
|
[
"BSD-3-Clause"
] | null | null | null |
activities/admin.py
|
codyowl/activitytracker
|
c7d75a8bb24a45b34547c20eecb4de106889e7d8
|
[
"BSD-3-Clause"
] | null | null | null |
from django.contrib import admin
from activities.models import Activity
admin.site.register(Activity)
| 17.333333
| 38
| 0.836538
| 14
| 104
| 6.214286
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105769
| 104
| 5
| 39
| 20.8
| 0.935484
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
511950a9beb5270fc9910ae25bf88cb5bf63a099
| 49
|
py
|
Python
|
app/Vendor/__init__.py
|
kylezhao96/sqgh-ms-flask
|
c340e9c56d2b9bb8ed45ebb13a01d1a4000a83ca
|
[
"Apache-2.0"
] | 1
|
2019-12-11T01:26:00.000Z
|
2019-12-11T01:26:00.000Z
|
app/Vendor/__init__.py
|
huaSoftware/easy-flask-json-mvc-socketio
|
d6aec4b3e610b4cc04c1650801a061c8fb92030e
|
[
"Apache-2.0"
] | 2
|
2021-03-20T04:33:46.000Z
|
2021-12-05T13:19:13.000Z
|
app/Vendor/__init__.py
|
kylezhao96/sqgh-ms-flask
|
c340e9c56d2b9bb8ed45ebb13a01d1a4000a83ca
|
[
"Apache-2.0"
] | null | null | null |
__all__ = ['CustomErrorHandler', 'UsersAuthJWT']
| 24.5
| 48
| 0.755102
| 3
| 49
| 11
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081633
| 49
| 1
| 49
| 49
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0.612245
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
5141526b9e1dfda39c1ec7c209ec590cb61338ab
| 29
|
py
|
Python
|
moviepy/version.py
|
livingbio/moviepy
|
29351dba07587547a0c80b800cd05e8abe061215
|
[
"MIT"
] | 1
|
2016-11-21T21:03:30.000Z
|
2016-11-21T21:03:30.000Z
|
moviepy/version.py
|
livingbio/moviepy
|
29351dba07587547a0c80b800cd05e8abe061215
|
[
"MIT"
] | 10
|
2016-08-27T04:01:32.000Z
|
2017-10-30T06:43:49.000Z
|
moviepy/version.py
|
livingbio/moviepy
|
29351dba07587547a0c80b800cd05e8abe061215
|
[
"MIT"
] | null | null | null |
__version__ = "0.2.2.11.3.1"
| 14.5
| 28
| 0.62069
| 7
| 29
| 2
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.269231
| 0.103448
| 29
| 1
| 29
| 29
| 0.269231
| 0
| 0
| 0
| 0
| 0
| 0.413793
| 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
|
5aa685da8aed5246187553b1cdc4c0b883b122e9
| 175
|
py
|
Python
|
aiosnow/models/_schema/fields/boolean.py
|
michaeldcanady/aiosnow
|
db515b1560d651fc7696a184990c2a2d68db8961
|
[
"MIT"
] | 38
|
2020-08-03T17:58:48.000Z
|
2022-03-30T19:39:24.000Z
|
aiosnow/models/_schema/fields/boolean.py
|
michaeldcanady/aiosnow
|
db515b1560d651fc7696a184990c2a2d68db8961
|
[
"MIT"
] | 34
|
2020-01-20T10:11:46.000Z
|
2020-06-05T21:25:23.000Z
|
aiosnow/models/_schema/fields/boolean.py
|
michaeldcanady/aiosnow
|
db515b1560d651fc7696a184990c2a2d68db8961
|
[
"MIT"
] | 5
|
2021-03-26T19:35:20.000Z
|
2022-01-23T20:09:55.000Z
|
import marshmallow
from aiosnow.query import BooleanQueryable
from .base import BaseField
class Boolean(marshmallow.fields.Boolean, BaseField, BooleanQueryable):
pass
| 17.5
| 71
| 0.817143
| 19
| 175
| 7.526316
| 0.631579
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131429
| 175
| 9
| 72
| 19.444444
| 0.940789
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.2
| 0.6
| 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
| 1
| 1
| 0
| 0
| 0
|
0
| 5
|
5ac48713e5581e6690306bd410df51fea3911405
| 11,431
|
py
|
Python
|
wetterdienst/provider/eccc/observation/metadata/unit.py
|
waltherg/wetterdienst
|
3c5c63b5b8d3e19511ad789bb499bdaa9b1976d9
|
[
"MIT"
] | null | null | null |
wetterdienst/provider/eccc/observation/metadata/unit.py
|
waltherg/wetterdienst
|
3c5c63b5b8d3e19511ad789bb499bdaa9b1976d9
|
[
"MIT"
] | null | null | null |
wetterdienst/provider/eccc/observation/metadata/unit.py
|
waltherg/wetterdienst
|
3c5c63b5b8d3e19511ad789bb499bdaa9b1976d9
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
# Copyright (c) 2018-2021, earthobservations developers.
# Distributed under the MIT License. See LICENSE for more info.
from wetterdienst.metadata.unit import MetricUnit, OriginUnit, UnitEnum
from wetterdienst.util.parameter import DatasetTreeCore
class EcccObservationUnitOrigin(DatasetTreeCore):
class HOURLY(UnitEnum):
TEMPERATURE_AIR_200 = OriginUnit.DEGREE_CELSIUS.value
QUALITY_TEMPERATURE_AIR_200 = OriginUnit.DIMENSIONLESS
TEMPERATURE_DEW_POINT_200 = OriginUnit.DEGREE_CELSIUS.value
QUALITY_TEMPERATURE_DEW_POINT_200 = OriginUnit.DIMENSIONLESS.value
HUMIDITY = OriginUnit.PERCENT.value
QUALITY_HUMIDITY = OriginUnit.DIMENSIONLESS.value
WIND_DIRECTION = OriginUnit.WIND_DIRECTION.value
QUALITY_WIND_DIRECTION = OriginUnit.DIMENSIONLESS.value
WIND_SPEED = OriginUnit.KILOMETER_PER_HOUR.value
QUALITY_WIND_SPEED = OriginUnit.DIMENSIONLESS.value
VISIBILITY = OriginUnit.KILOMETER.value
QUALITY_VISIBILITY = OriginUnit.DIMENSIONLESS.value
PRESSURE_AIR_STATION_HEIGHT = OriginUnit.KILOPASCAL.value
QUALITY_PRESSURE_AIR_STATION_HEIGHT = OriginUnit.DIMENSIONLESS.value
HUMIDEX = OriginUnit.DIMENSIONLESS.value
QUALITY_HUMIDEX = OriginUnit.DIMENSIONLESS.value
WIND_GUST = OriginUnit.KILOMETER_PER_HOUR.value
QUALITY_WIND_GUST = OriginUnit.DIMENSIONLESS.value
WEATHER = OriginUnit.DIMENSIONLESS.value
class DAILY(UnitEnum):
# Data Quality quality of all variables?
TEMPERATURE_AIR_MAX_200 = OriginUnit.DEGREE_CELSIUS.value
QUALITY_TEMPERATURE_AIR_MAX_200 = OriginUnit.DIMENSIONLESS.value
TEMPERATURE_AIR_MIN_200 = OriginUnit.DEGREE_CELSIUS.value
QUALITY_TEMPERATURE_AIR_MIN_200 = OriginUnit.DIMENSIONLESS.value
TEMPERATURE_AIR_200 = OriginUnit.DEGREE_CELSIUS.value
QUALITY_TEMPERATURE_AIR_200 = OriginUnit.DIMENSIONLESS.value
HEATING_DEGREE_DAYS = OriginUnit.DEGREE_CELSIUS.value
QUALITY_HEATING_DEGREE_DAYS = OriginUnit.DIMENSIONLESS.value
COOLING_DEGREE_DAYS = OriginUnit.DEGREE_CELSIUS.value
QUALITY_COOLING_DEGREE_DAYS = OriginUnit.DIMENSIONLESS.value
PRECIPITATION_HEIGHT_RAIN = OriginUnit.MILLIMETER.value
QUALITY_PRECIPITATION_HEIGHT_RAIN = OriginUnit.DIMENSIONLESS.value
SNOW_DEPTH_NEW = OriginUnit.CENTIMETER.value
QUALITY_SNOW_DEPTH_NEW = OriginUnit.DIMENSIONLESS.value
PRECIPITATION_HEIGHT = OriginUnit.MILLIMETER.value
QUALITY_PRECIPITATION_HEIGHT = OriginUnit.DIMENSIONLESS.value
SNOW_DEPTH = OriginUnit.CENTIMETER.value
QUALITY_SNOW_DEPTH = OriginUnit.DIMENSIONLESS.value
WIND_DIRECTION_MAX_VELOCITY = OriginUnit.WIND_DIRECTION.value
QUALITY_WIND_DIRECTION_MAX_VELOCITY = OriginUnit.DIMENSIONLESS.value
WIND_GUST_MAX = OriginUnit.KILOMETER_PER_HOUR.value
QUALITY_WIND_GUST_MAX = OriginUnit.DIMENSIONLESS.value
class MONTHLY(UnitEnum):
TEMPERATURE_AIR_MAX_MEAN_200 = OriginUnit.DEGREE_CELSIUS.value
QUALITY_TEMPERATURE_AIR_MAX_MEAN_200 = OriginUnit.DIMENSIONLESS.value
TEMPERATURE_AIR_MIN_MEAN_200 = OriginUnit.DEGREE_CELSIUS.value
QUALITY_TEMPERATURE_AIR_MIN_MEAN_200 = OriginUnit.DIMENSIONLESS.value
TEMPERATURE_AIR_200 = OriginUnit.DEGREE_CELSIUS.value
QUALITY_TEMPERATURE_AIR_200 = OriginUnit.DIMENSIONLESS.value
TEMPERATURE_AIR_MAX_200 = OriginUnit.DEGREE_CELSIUS.value
QUALITY_TEMPERATURE_AIR_MAX_200 = OriginUnit.DIMENSIONLESS.value
TEMPERATURE_AIR_MIN_200 = OriginUnit.DEGREE_CELSIUS.value
QUALITY_TEMPERATURE_AIR_MIN_200 = OriginUnit.DIMENSIONLESS.value
PRECIPITATION_HEIGHT_RAIN = OriginUnit.MILLIMETER.value
QUALITY_PRECIPITATION_HEIGHT_RAIN = OriginUnit.DIMENSIONLESS.value
SNOW_DEPTH_NEW = OriginUnit.CENTIMETER.value
QUALITY_SNOW_DEPTH_NEW = OriginUnit.DIMENSIONLESS.value
PRECIPITATION_HEIGHT = OriginUnit.MILLIMETER.value
QUALITY_PRECIPITATION_HEIGHT = OriginUnit.DIMENSIONLESS.value
# should name include previous day? how is it measured?
SNOW_DEPTH = OriginUnit.CENTIMETER.value
QUALITY_SNOW_DEPTH = OriginUnit.DIMENSIONLESS.value
WIND_DIRECTION_MAX_VELOCITY = OriginUnit.WIND_DIRECTION.value
QUALITY_WIND_DIRECTION_MAX_VELOCITY = OriginUnit.DIMENSIONLESS.value
WIND_GUST_MAX = OriginUnit.KILOMETER_PER_HOUR.value
QUALITY_WIND_GUST_MAX = OriginUnit.DIMENSIONLESS.value
class ANNUAL(UnitEnum):
TEMPERATURE_AIR_MAX_MEAN_200 = OriginUnit.DEGREE_CELSIUS.value
TEMPERATURE_AIR_MIN_MEAN_200 = OriginUnit.DEGREE_CELSIUS.value
PRECIPITATION_FREQUENCY = OriginUnit.PERCENT.value
TEMPERATURE_AIR_MAX_200 = OriginUnit.DEGREE_CELSIUS.value
# 'highest temp.year'
# 'highest temp. period'
# 'highest temp. data quality'
TEMPERATURE_AIR_MIN_200 = OriginUnit.DEGREE_CELSIUS.value
# 'lowest temp. year'
# 'lowest temp. period'
# 'lowest temp. data quality'
PRECIPITATION_HEIGHT_MAX = OriginUnit.MILLIMETER.value
# 'greatest precip. year'
# 'greatest precip. period'
# 'greatest precip. data quality'
PRECIPITATION_HEIGHT_RAIN_MAX = OriginUnit.MILLIMETER.value
# 'greatest rainfall year'
# 'greatest rainfall period'
# 'greatest rainfall data quality'
SNOW_DEPTH_NEW_MAX = OriginUnit.CENTIMETER.value
# 'greatest snowfall year'
# 'greatest snowfall period'
# 'greatest snowfall data quality'
SNOW_DEPTH_MAX = OriginUnit.CENTIMETER.value
# 'most snow on the ground year'
# 'most snow on the ground period'
# 'most snow on the ground data quality'
class EcccObservationUnitSI(DatasetTreeCore):
class HOURLY(UnitEnum):
TEMPERATURE_AIR_200 = MetricUnit.DEGREE_KELVIN.value
QUALITY_TEMPERATURE_AIR_200 = MetricUnit.DIMENSIONLESS
TEMPERATURE_DEW_POINT_200 = MetricUnit.DEGREE_KELVIN.value
QUALITY_TEMPERATURE_DEW_POINT_200 = MetricUnit.DIMENSIONLESS.value
HUMIDITY = MetricUnit.PERCENT.value
QUALITY_HUMIDITY = MetricUnit.DIMENSIONLESS.value
WIND_DIRECTION = MetricUnit.WIND_DIRECTION.value
QUALITY_WIND_DIRECTION = MetricUnit.DIMENSIONLESS.value
WIND_SPEED = MetricUnit.METER_PER_SECOND.value
QUALITY_WIND_SPEED = MetricUnit.DIMENSIONLESS.value
VISIBILITY = MetricUnit.METER.value
QUALITY_VISIBILITY = MetricUnit.DIMENSIONLESS.value
PRESSURE_AIR_STATION_HEIGHT = MetricUnit.PASCAL.value
QUALITY_PRESSURE_AIR_STATION_HEIGHT = MetricUnit.DIMENSIONLESS.value
HUMIDEX = MetricUnit.DIMENSIONLESS.value
QUALITY_HUMIDEX = MetricUnit.DIMENSIONLESS.value
WIND_GUST = MetricUnit.METER_PER_SECOND.value
QUALITY_WIND_GUST = MetricUnit.DIMENSIONLESS.value
WEATHER = MetricUnit.DIMENSIONLESS.value
class DAILY(UnitEnum):
# Data Quality quality of all variables?
TEMPERATURE_AIR_MAX_200 = MetricUnit.DEGREE_KELVIN.value
QUALITY_TEMPERATURE_AIR_MAX_200 = MetricUnit.DIMENSIONLESS.value
TEMPERATURE_AIR_MIN_200 = MetricUnit.DEGREE_KELVIN.value
QUALITY_TEMPERATURE_AIR_MIN_200 = MetricUnit.DIMENSIONLESS.value
TEMPERATURE_AIR_200 = MetricUnit.DEGREE_KELVIN.value
QUALITY_TEMPERATURE_AIR_200 = MetricUnit.DIMENSIONLESS.value
HEATING_DEGREE_DAYS = MetricUnit.DEGREE_KELVIN.value
QUALITY_HEATING_DEGREE_DAYS = MetricUnit.DIMENSIONLESS.value
COOLING_DEGREE_DAYS = MetricUnit.DEGREE_KELVIN.value
QUALITY_COOLING_DEGREE_DAYS = MetricUnit.DIMENSIONLESS.value
PRECIPITATION_HEIGHT_RAIN = MetricUnit.KILOGRAM_PER_SQUARE_METER.value
QUALITY_PRECIPITATION_HEIGHT_RAIN = MetricUnit.DIMENSIONLESS.value
SNOW_DEPTH_NEW = MetricUnit.METER.value
QUALITY_SNOW_DEPTH_NEW = MetricUnit.DIMENSIONLESS.value
PRECIPITATION_HEIGHT = MetricUnit.KILOGRAM_PER_SQUARE_METER.value
QUALITY_PRECIPITATION_HEIGHT = MetricUnit.DIMENSIONLESS.value
SNOW_DEPTH = MetricUnit.METER.value
QUALITY_SNOW_DEPTH = MetricUnit.DIMENSIONLESS.value
WIND_DIRECTION_MAX_VELOCITY = MetricUnit.WIND_DIRECTION.value
QUALITY_WIND_DIRECTION_MAX_VELOCITY = MetricUnit.DIMENSIONLESS.value
WIND_GUST_MAX = MetricUnit.METER_PER_SECOND.value
QUALITY_WIND_GUST_MAX = MetricUnit.DIMENSIONLESS.value
class MONTHLY(UnitEnum):
TEMPERATURE_AIR_MAX_MEAN_200 = MetricUnit.DEGREE_KELVIN.value
QUALITY_TEMPERATURE_AIR_MAX_MEAN_200 = MetricUnit.DIMENSIONLESS.value
TEMPERATURE_AIR_MIN_MEAN_200 = MetricUnit.DEGREE_KELVIN.value
QUALITY_TEMPERATURE_AIR_MIN_MEAN_200 = MetricUnit.DIMENSIONLESS.value
TEMPERATURE_AIR_200 = MetricUnit.DEGREE_KELVIN.value
QUALITY_TEMPERATURE_AIR_200 = MetricUnit.DIMENSIONLESS.value
TEMPERATURE_AIR_MAX_200 = MetricUnit.DEGREE_KELVIN.value
QUALITY_TEMPERATURE_AIR_MAX_200 = MetricUnit.DIMENSIONLESS.value
TEMPERATURE_AIR_MIN_200 = MetricUnit.DEGREE_KELVIN.value
QUALITY_TEMPERATURE_AIR_MIN_200 = MetricUnit.DIMENSIONLESS.value
PRECIPITATION_HEIGHT_RAIN = MetricUnit.KILOGRAM_PER_SQUARE_METER.value
QUALITY_PRECIPITATION_HEIGHT_RAIN = MetricUnit.DIMENSIONLESS.value
SNOW_DEPTH_NEW = MetricUnit.METER.value
QUALITY_SNOW_DEPTH_NEW = MetricUnit.DIMENSIONLESS.value
PRECIPITATION_HEIGHT = MetricUnit.KILOGRAM_PER_SQUARE_METER.value
QUALITY_PRECIPITATION_HEIGHT = MetricUnit.DIMENSIONLESS.value
# should name include previous day? how is it measured?
SNOW_DEPTH = MetricUnit.METER.value
QUALITY_SNOW_DEPTH = MetricUnit.DIMENSIONLESS.value
WIND_DIRECTION_MAX_VELOCITY = MetricUnit.WIND_DIRECTION.value
QUALITY_WIND_DIRECTION_MAX_VELOCITY = MetricUnit.DIMENSIONLESS.value
WIND_GUST_MAX = MetricUnit.METER_PER_SECOND.value
QUALITY_WIND_GUST_MAX = MetricUnit.DIMENSIONLESS.value
class ANNUAL(UnitEnum):
TEMPERATURE_AIR_MAX_MEAN_200 = MetricUnit.DEGREE_KELVIN.value
TEMPERATURE_AIR_MIN_MEAN_200 = MetricUnit.DEGREE_KELVIN.value
PRECIPITATION_FREQUENCY = MetricUnit.PERCENT.value
TEMPERATURE_AIR_MAX_200 = MetricUnit.DEGREE_KELVIN.value
# 'highest temp.year'
# 'highest temp. period'
# 'highest temp. data quality'
TEMPERATURE_AIR_MIN_200 = MetricUnit.DEGREE_KELVIN.value
# 'lowest temp. year'
# 'lowest temp. period'
# 'lowest temp. data quality'
PRECIPITATION_HEIGHT_MAX = MetricUnit.KILOGRAM_PER_SQUARE_METER.value
# 'greatest precip. year'
# 'greatest precip. period'
# 'greatest precip. data quality'
PRECIPITATION_HEIGHT_RAIN_MAX = MetricUnit.KILOGRAM_PER_SQUARE_METER.value
# 'greatest rainfall year'
# 'greatest rainfall period'
# 'greatest rainfall data quality'
SNOW_DEPTH_NEW_MAX = MetricUnit.METER.value
# 'greatest snowfall year'
# 'greatest snowfall period'
# 'greatest snowfall data quality'
SNOW_DEPTH_MAX = MetricUnit.METER.value
# 'most snow on the ground year'
# 'most snow on the ground period'
# 'most snow on the ground data quality'
| 54.433333
| 82
| 0.752778
| 1,233
| 11,431
| 6.631792
| 0.087591
| 0.140883
| 0.109576
| 0.057234
| 0.873915
| 0.819616
| 0.796136
| 0.724104
| 0.699768
| 0.676409
| 0
| 0.016585
| 0.192984
| 11,431
| 209
| 83
| 54.69378
| 0.86981
| 0.115475
| 0
| 0.602564
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.012821
| 0
| 0.076923
| 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
|
5ad5f4fec2928d800779de90501aab4fb2c13204
| 165
|
py
|
Python
|
appbak/core/__init__.py
|
Linyameng/alphadata-dev
|
7a48c9ddf24442a89f3f8ab1ba78e573c8844f26
|
[
"Apache-2.0"
] | null | null | null |
appbak/core/__init__.py
|
Linyameng/alphadata-dev
|
7a48c9ddf24442a89f3f8ab1ba78e573c8844f26
|
[
"Apache-2.0"
] | null | null | null |
appbak/core/__init__.py
|
Linyameng/alphadata-dev
|
7a48c9ddf24442a89f3f8ab1ba78e573c8844f26
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
Created on 2018/7/23
@author: xing yan
"""
from flask import Blueprint
core = Blueprint('core', __name__)
from . import views, errors
| 13.75
| 34
| 0.660606
| 23
| 165
| 4.565217
| 0.826087
| 0.247619
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.058824
| 0.175758
| 165
| 11
| 35
| 15
| 0.713235
| 0.375758
| 0
| 0
| 0
| 0
| 0.042105
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0.666667
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 1
|
0
| 5
|
5186dd25bf27049adc779a96b5745bed7758545a
| 3,267
|
py
|
Python
|
src/experiments/EMNLP2019/run_ner_active_learning.py
|
edwinrobots/arxiv2018-bayesian-ensembles
|
9b6bf8c9b08aa303f04f91028296ff092ca7a911
|
[
"Apache-2.0"
] | null | null | null |
src/experiments/EMNLP2019/run_ner_active_learning.py
|
edwinrobots/arxiv2018-bayesian-ensembles
|
9b6bf8c9b08aa303f04f91028296ff092ca7a911
|
[
"Apache-2.0"
] | null | null | null |
src/experiments/EMNLP2019/run_ner_active_learning.py
|
edwinrobots/arxiv2018-bayesian-ensembles
|
9b6bf8c9b08aa303f04f91028296ff092ca7a911
|
[
"Apache-2.0"
] | null | null | null |
'''
Created on April 27, 2018
@author: Edwin Simpson
'''
from evaluation.experiment import Experiment
import data.load_data as load_data
import numpy as np
import os
gt, annos, doc_start, text, gt_nocrowd, doc_start_nocrowd, text_nocrowd, gt_val, _ = \
load_data.load_ner_data(False)
# debug with subset -------
s = 100
idxs = np.argwhere(gt!=-1)[:s, 0]
gt = gt[idxs]
annos = annos[idxs]
doc_start = doc_start[idxs]
text = text[idxs]
gt_val = gt_val[idxs]
# -------------------------
num_reps = 10
batch_frac = 0.03
AL_iters = 10
output_dir = os.path.join(load_data.output_root_dir, 'ner_al')
if not os.path.isdir(output_dir):
os.mkdir(output_dir)
# ACTIVE LEARNING WITH UNCERTAINTY SAMPLING
for rep in range(1, num_reps):
beta0_factor = 0.1
alpha0_diags = 1 # best_diags
alpha0_factor = 1 # 9 # best_factor
exp = Experiment(output_dir, 9, annos, gt, doc_start, text, annos, gt_val, doc_start, text,
alpha0_factor=alpha0_factor, alpha0_diags=alpha0_diags, beta0_factor=beta0_factor,
max_iter=20, crf_probs=True, rep=rep)
exp.methods = [
'bac_seq_integrateIF',
'HMM_crowd',
]
results, preds, probs, results_nocrowd, preds_nocrowd, probs_nocrowd = exp.run_methods(
active_learning=True, AL_batch_fraction=batch_frac, max_AL_iters=AL_iters
)
beta0_factor = 0.1
alpha0_diags = 100 # best_diags
alpha0_factor = 0.1 #9 # best_factor
exp = Experiment(output_dir, 9, annos, gt, doc_start, text, annos, gt_val, doc_start, text,
alpha0_factor=alpha0_factor, alpha0_diags=alpha0_diags, beta0_factor=beta0_factor,
max_iter=20, crf_probs=True, rep=rep)
# run all the methods that don't require tuning here
exp.methods = [
'bac_ibcc_integrateIF',
]
results, preds, probs, results_nocrowd, preds_nocrowd, probs_nocrowd = exp.run_methods(
active_learning=True, AL_batch_fraction=batch_frac, max_AL_iters=AL_iters
)
beta0_factor = 10
alpha0_diags = 1 # best_diags
alpha0_factor = 1#9 # best_factor
exp = Experiment(output_dir, 9, annos, gt, doc_start, text, annos, gt_val, doc_start, text,
alpha0_factor=alpha0_factor, alpha0_diags=alpha0_diags, beta0_factor=beta0_factor,
max_iter=20, crf_probs=True, rep=rep)
exp.methods = [
'bac_vec_integrateIF',
]
results, preds, probs, results_nocrowd, preds_nocrowd, probs_nocrowd = exp.run_methods(
active_learning=True, AL_batch_fraction=batch_frac, max_AL_iters=AL_iters
)
beta0_factor = 0.1
alpha0_diags = 1 # best_diags
alpha0_factor = 0.1#9 # best_factor
exp = Experiment(output_dir, 9, annos, gt, doc_start, text, annos, gt_val, doc_start, text,
alpha0_factor=alpha0_factor, alpha0_diags=alpha0_diags, beta0_factor=beta0_factor,
max_iter=20, crf_probs=True, rep=rep)
exp.methods = [
'ibcc',
'ds',
'majority'
]
results, preds, probs, results_nocrowd, preds_nocrowd, probs_nocrowd = exp.run_methods(
active_learning=True, AL_batch_fraction=batch_frac, max_AL_iters=AL_iters
)
| 35.129032
| 103
| 0.665136
| 459
| 3,267
| 4.416122
| 0.20915
| 0.047361
| 0.053281
| 0.041441
| 0.706956
| 0.706956
| 0.706956
| 0.706956
| 0.706956
| 0.706956
| 0
| 0.036356
| 0.233854
| 3,267
| 92
| 104
| 35.51087
| 0.773472
| 0.090603
| 0
| 0.478873
| 0
| 0
| 0.029512
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.056338
| 0
| 0.056338
| 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
|
518dfec88b868611be813fe3a4fd6e3e6ae85f69
| 402
|
py
|
Python
|
src/helpers/paths/interim.py
|
markrofail/airbnb-new-user-bookings-kaggle-
|
9e82b80e0fb514d7e0d65940bdd9880f895d3304
|
[
"MIT"
] | null | null | null |
src/helpers/paths/interim.py
|
markrofail/airbnb-new-user-bookings-kaggle-
|
9e82b80e0fb514d7e0d65940bdd9880f895d3304
|
[
"MIT"
] | 4
|
2020-03-24T17:30:39.000Z
|
2021-03-19T03:06:36.000Z
|
src/helpers/paths/interim.py
|
markrofail/airbnb-new-user-bookings-kaggle-
|
9e82b80e0fb514d7e0d65940bdd9880f895d3304
|
[
"MIT"
] | null | null | null |
from .. import paths
DATA_INTERIM_PATH = paths.DATA_PATH.joinpath('interim')
def train_dataset():
return DATA_INTERIM_PATH.joinpath("train_users_2.csv")
def test_dataset():
return DATA_INTERIM_PATH.joinpath("test_users.csv")
def session_train():
return DATA_INTERIM_PATH.joinpath("train_sessions.csv")
def session_test():
return DATA_INTERIM_PATH.joinpath("test_sessions.csv")
| 20.1
| 59
| 0.768657
| 56
| 402
| 5.160714
| 0.303571
| 0.190311
| 0.259516
| 0.290657
| 0.512111
| 0.512111
| 0
| 0
| 0
| 0
| 0
| 0.002825
| 0.119403
| 402
| 19
| 60
| 21.157895
| 0.813559
| 0
| 0
| 0
| 0
| 0
| 0.181592
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0.1
| 0.4
| 0.9
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
51b17afe37344b11d6b9c0e97b1074c3b63e0ada
| 5,065
|
py
|
Python
|
a10sdk/core/ip/ip_list.py
|
deepfield/a10sdk-python
|
bfaa58099f51f085d5e91652d1d1a3fd5c529d5d
|
[
"Apache-2.0"
] | 16
|
2015-05-20T07:26:30.000Z
|
2021-01-23T11:56:57.000Z
|
a10sdk/core/ip/ip_list.py
|
deepfield/a10sdk-python
|
bfaa58099f51f085d5e91652d1d1a3fd5c529d5d
|
[
"Apache-2.0"
] | 6
|
2015-03-24T22:07:11.000Z
|
2017-03-28T21:31:18.000Z
|
a10sdk/core/ip/ip_list.py
|
deepfield/a10sdk-python
|
bfaa58099f51f085d5e91652d1d1a3fd5c529d5d
|
[
"Apache-2.0"
] | 23
|
2015-03-29T15:43:01.000Z
|
2021-06-02T17:12:01.000Z
|
from a10sdk.common.A10BaseClass import A10BaseClass
class Ipv6PrefixConfig(A10BaseClass):
"""This class does not support CRUD Operations please use parent.
:param ipv6_prefix_to: {"type": "string", "description": "IPv6 Prefix Range End", "format": "ipv6-address-plen"}
:param count: {"description": "Number of IPv6 prefixes", "minimum": 0, "type": "number", "maximum": 2147483647, "format": "number"}
:param ipv6_addr_prefix: {"type": "string", "description": "IPv6 Prefix Range Start / IPv6 Prefix", "format": "ipv6-address-plen"}
:param DeviceProxy: The device proxy for REST operations and session handling. Refer to `common/device_proxy.py`
"""
def __init__(self, **kwargs):
self.ERROR_MSG = ""
self.b_key = "ipv6-prefix-config"
self.DeviceProxy = ""
self.ipv6_prefix_to = ""
self.count = ""
self.ipv6_addr_prefix = ""
for keys, value in kwargs.items():
setattr(self,keys, value)
class Ipv6Config(A10BaseClass):
"""This class does not support CRUD Operations please use parent.
:param ipv6_end_addr: {"type": "string", "description": "IPv6 Range End Address", "format": "ipv6-address"}
:param ipv6_start_addr: {"type": "string", "description": "IPv6 Range Start Address / IPv6 Address", "format": "ipv6-address"}
:param DeviceProxy: The device proxy for REST operations and session handling. Refer to `common/device_proxy.py`
"""
def __init__(self, **kwargs):
self.ERROR_MSG = ""
self.b_key = "ipv6-config"
self.DeviceProxy = ""
self.ipv6_end_addr = ""
self.ipv6_start_addr = ""
for keys, value in kwargs.items():
setattr(self,keys, value)
class Ipv4Config(A10BaseClass):
"""This class does not support CRUD Operations please use parent.
:param ipv4_start_addr: {"type": "string", "description": "IPv4 Range Start Address / IPv4 Address", "format": "ipv4-address"}
:param ipv4_end_addr: {"type": "string", "description": "IPv4 Range End Address", "format": "ipv4-address"}
:param DeviceProxy: The device proxy for REST operations and session handling. Refer to `common/device_proxy.py`
"""
def __init__(self, **kwargs):
self.ERROR_MSG = ""
self.b_key = "ipv4-config"
self.DeviceProxy = ""
self.ipv4_start_addr = ""
self.ipv4_end_addr = ""
for keys, value in kwargs.items():
setattr(self,keys, value)
class IpList(A10BaseClass):
"""Class Description::
Configure ip list.
Class ip-list supports CRUD Operations and inherits from `common/A10BaseClass`.
This class is the `"PARENT"` class for this module.`
:param uuid: {"description": "uuid of the object", "format": "string", "minLength": 1, "modify-not-allowed": 1, "optional": true, "maxLength": 64, "type": "string"}
:param ipv6_prefix_config: {"minItems": 1, "items": {"type": "object"}, "uniqueItems": true, "type": "array", "array": [{"properties": {"ipv6-prefix-to": {"type": "string", "description": "IPv6 Prefix Range End", "format": "ipv6-address-plen"}, "count": {"description": "Number of IPv6 prefixes", "minimum": 0, "type": "number", "maximum": 2147483647, "format": "number"}, "optional": true, "ipv6-addr-prefix": {"type": "string", "description": "IPv6 Prefix Range Start / IPv6 Prefix", "format": "ipv6-address-plen"}}}]}
:param name: {"description": "Specify name of the ip list", "format": "string-rlx", "minLength": 1, "optional": false, "maxLength": 63, "type": "string"}
:param ipv6_config: {"minItems": 1, "items": {"type": "object"}, "uniqueItems": true, "type": "array", "array": [{"properties": {"ipv6-end-addr": {"type": "string", "description": "IPv6 Range End Address", "format": "ipv6-address"}, "optional": true, "ipv6-start-addr": {"type": "string", "description": "IPv6 Range Start Address / IPv6 Address", "format": "ipv6-address"}}}]}
:param ipv4_config: {"minItems": 1, "items": {"type": "object"}, "uniqueItems": true, "type": "array", "array": [{"properties": {"ipv4-start-addr": {"type": "string", "description": "IPv4 Range Start Address / IPv4 Address", "format": "ipv4-address"}, "ipv4-end-addr": {"type": "string", "description": "IPv4 Range End Address", "format": "ipv4-address"}, "optional": true}}]}
:param DeviceProxy: The device proxy for REST operations and session handling. Refer to `common/device_proxy.py`
URL for this object::
`https://<Hostname|Ip address>//axapi/v3/ip-list/{name}`.
"""
def __init__(self, **kwargs):
self.ERROR_MSG = ""
self.required = [ "name"]
self.b_key = "ip-list"
self.a10_url="/axapi/v3/ip-list/{name}"
self.DeviceProxy = ""
self.uuid = ""
self.ipv6_prefix_config = []
self.name = ""
self.ipv6_config = []
self.ipv4_config = []
for keys, value in kwargs.items():
setattr(self,keys, value)
| 42.563025
| 524
| 0.627048
| 599
| 5,065
| 5.200334
| 0.166945
| 0.044944
| 0.080899
| 0.064205
| 0.74992
| 0.71557
| 0.71557
| 0.71557
| 0.704976
| 0.704976
| 0
| 0.028365
| 0.206515
| 5,065
| 118
| 525
| 42.923729
| 0.746703
| 0.659427
| 0
| 0.465116
| 0
| 0
| 0.048512
| 0.015524
| 0
| 0
| 0
| 0
| 0
| 1
| 0.093023
| false
| 0
| 0.023256
| 0
| 0.209302
| 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
|
51bb13a554d15bd94cf34512c25cfe936670065d
| 139
|
py
|
Python
|
view_model/tag_viewmodel.py
|
ghhernandes/brdevstreamers
|
32a0cd87943dcfe76ec8863c05b4a03d52814b96
|
[
"Apache-2.0"
] | 16
|
2022-02-15T12:11:09.000Z
|
2022-03-01T01:59:41.000Z
|
view_model/tag_viewmodel.py
|
ghhernandes/brdevstreamers
|
32a0cd87943dcfe76ec8863c05b4a03d52814b96
|
[
"Apache-2.0"
] | 2
|
2022-02-23T20:53:01.000Z
|
2022-02-28T17:22:10.000Z
|
view_model/tag_viewmodel.py
|
ghhernandes/brdevstreamers
|
32a0cd87943dcfe76ec8863c05b4a03d52814b96
|
[
"Apache-2.0"
] | 7
|
2022-02-16T17:37:13.000Z
|
2022-03-01T02:00:17.000Z
|
from typing import Optional
from pydantic import BaseModel
class TagViewModel(BaseModel):
name: Optional[str]
id: Optional[str]
| 15.444444
| 30
| 0.755396
| 17
| 139
| 6.176471
| 0.647059
| 0.209524
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.179856
| 139
| 8
| 31
| 17.375
| 0.921053
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.4
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
51f2917600d6a6670c90520f3ac865325bb10e92
| 150
|
py
|
Python
|
Test.py
|
bosstb/YGY60W
|
7d8f1848c4c43ffad546ab2bec55084ba81e24fd
|
[
"MIT"
] | null | null | null |
Test.py
|
bosstb/YGY60W
|
7d8f1848c4c43ffad546ab2bec55084ba81e24fd
|
[
"MIT"
] | null | null | null |
Test.py
|
bosstb/YGY60W
|
7d8f1848c4c43ffad546ab2bec55084ba81e24fd
|
[
"MIT"
] | null | null | null |
#coding=utf-8
from datetime import datetime
import random
#生成100个随机0,1之间的浮点数序列l
l=0.1
l = random.randint(1, 100)
l=float(l)/100
print datetime.today()
| 18.75
| 29
| 0.773333
| 26
| 150
| 4.461538
| 0.653846
| 0.241379
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 0.1
| 150
| 8
| 30
| 18.75
| 0.748148
| 0.213333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.333333
| null | null | 0.166667
| 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
|
320a7ea45be6a6aa2d6defec99d30743ed0e6ee8
| 176
|
py
|
Python
|
super_mario/utils/lists.py
|
best-doctor/Mario
|
a6c83b9f7e7558a4e71d8acb00b8d164fe8eec6f
|
[
"MIT"
] | 12
|
2020-01-30T02:19:16.000Z
|
2022-01-20T04:00:43.000Z
|
super_mario/utils/lists.py
|
best-doctor/Mario
|
a6c83b9f7e7558a4e71d8acb00b8d164fe8eec6f
|
[
"MIT"
] | 32
|
2019-12-07T14:06:05.000Z
|
2020-06-26T07:12:03.000Z
|
super_mario/utils/lists.py
|
best-doctor/Mario
|
a6c83b9f7e7558a4e71d8acb00b8d164fe8eec6f
|
[
"MIT"
] | 3
|
2020-08-21T07:54:53.000Z
|
2021-01-11T12:05:48.000Z
|
from typing import List, Iterable, TypeVar
T = TypeVar('T')
def flat(some_list: Iterable[Iterable]) -> List:
return [item for sublist in some_list for item in sublist]
| 19.555556
| 62
| 0.721591
| 27
| 176
| 4.62963
| 0.555556
| 0.192
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.181818
| 176
| 8
| 63
| 22
| 0.868056
| 0
| 0
| 0
| 0
| 0
| 0.005682
| 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
|
5c95643074b9d4a18ace3416c7a430b9a030da43
| 148
|
py
|
Python
|
core/admin.py
|
SejaMuchhal/PizzaStore
|
268ee7df8040616fc8cd6f59a74440b8428db000
|
[
"MIT"
] | 1
|
2021-04-06T17:01:52.000Z
|
2021-04-06T17:01:52.000Z
|
core/admin.py
|
SejaMuchhal/PizzaStore
|
268ee7df8040616fc8cd6f59a74440b8428db000
|
[
"MIT"
] | null | null | null |
core/admin.py
|
SejaMuchhal/PizzaStore
|
268ee7df8040616fc8cd6f59a74440b8428db000
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Topping, Pizza, PizzaSize
Models = (Topping, Pizza, PizzaSize)
admin.site.register(Models)
| 16.444444
| 45
| 0.777027
| 19
| 148
| 6.052632
| 0.578947
| 0.208696
| 0.365217
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.135135
| 148
| 8
| 46
| 18.5
| 0.898438
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
5c98323f8b526ffe7ba84f5b3e225f334900d7b5
| 368
|
py
|
Python
|
core/admin/__init__.py
|
Klexus1/Whys
|
9c7f2de803e2f2c981f06c127951225e1ed361bd
|
[
"MIT"
] | null | null | null |
core/admin/__init__.py
|
Klexus1/Whys
|
9c7f2de803e2f2c981f06c127951225e1ed361bd
|
[
"MIT"
] | 1
|
2021-04-16T09:03:02.000Z
|
2021-04-16T20:21:25.000Z
|
core/admin/__init__.py
|
Klexus1/Whys
|
9c7f2de803e2f2c981f06c127951225e1ed361bd
|
[
"MIT"
] | null | null | null |
from .AttributeAdmin import AttributeAdmin
from .AttributeNameAdmin import AttributeNameAdmin
from .AttributeValueAdmin import AttributeValueAdmin
from .CatalogAdmin import CatalogAdmin
from .ImageAdmin import ImageAdmin
from .ProductAdmin import ProductAdmin
from .ProductImageAdmin import ProductImageAdmin
from .ProductAttributesAdmin import ProductAttributesAdmin
| 40.888889
| 58
| 0.891304
| 32
| 368
| 10.25
| 0.3125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.086957
| 368
| 8
| 59
| 46
| 0.97619
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 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
| 1
| 0
|
0
| 5
|
5cb271eb08672289e5555ff8ff33bb4bb42c079e
| 27,222
|
py
|
Python
|
test/test_api/test_api.py
|
maxpark/Auto-PyTorch
|
06e67de5017b4cccad9398e24a3d9f0bd8176da3
|
[
"Apache-2.0"
] | 1
|
2022-03-02T06:57:55.000Z
|
2022-03-02T06:57:55.000Z
|
test/test_api/test_api.py
|
maxpark/Auto-PyTorch
|
06e67de5017b4cccad9398e24a3d9f0bd8176da3
|
[
"Apache-2.0"
] | null | null | null |
test/test_api/test_api.py
|
maxpark/Auto-PyTorch
|
06e67de5017b4cccad9398e24a3d9f0bd8176da3
|
[
"Apache-2.0"
] | null | null | null |
import json
import os
import pathlib
import pickle
import unittest
from test.test_api.utils import dummy_do_dummy_prediction, dummy_eval_function
import ConfigSpace as CS
from ConfigSpace.configuration_space import Configuration
import numpy as np
import pandas as pd
import pytest
import sklearn
import sklearn.datasets
from sklearn.base import BaseEstimator
from sklearn.base import clone
from sklearn.ensemble import VotingClassifier, VotingRegressor
from smac.runhistory.runhistory import RunHistory
from autoPyTorch.api.tabular_classification import TabularClassificationTask
from autoPyTorch.api.tabular_regression import TabularRegressionTask
from autoPyTorch.datasets.resampling_strategy import (
CrossValTypes,
HoldoutValTypes,
)
from autoPyTorch.optimizer.smbo import AutoMLSMBO
from autoPyTorch.pipeline.base_pipeline import BasePipeline
from autoPyTorch.pipeline.components.setup.traditional_ml.traditional_learner import _traditional_learners
from autoPyTorch.pipeline.components.training.metrics.metrics import accuracy
CV_NUM_SPLITS = 2
HOLDOUT_NUM_SPLITS = 1
# Test
# ====
@unittest.mock.patch('autoPyTorch.evaluation.train_evaluator.eval_function',
new=dummy_eval_function)
@pytest.mark.parametrize('openml_id', (40981, ))
@pytest.mark.parametrize('resampling_strategy,resampling_strategy_args',
((HoldoutValTypes.holdout_validation, None),
(CrossValTypes.k_fold_cross_validation, {'num_splits': CV_NUM_SPLITS})
))
def test_tabular_classification(openml_id, resampling_strategy, backend, resampling_strategy_args, n_samples):
# Get the data and check that contents of data-manager make sense
X, y = sklearn.datasets.fetch_openml(
data_id=int(openml_id),
return_X_y=True, as_frame=True
)
X, y = X.iloc[:n_samples], y.iloc[:n_samples]
X_train, X_test, y_train, y_test = sklearn.model_selection.train_test_split(
X, y, random_state=42)
# Search for a good configuration
estimator = TabularClassificationTask(
backend=backend,
resampling_strategy=resampling_strategy,
resampling_strategy_args=resampling_strategy_args,
seed=42,
)
with unittest.mock.patch.object(estimator, '_do_dummy_prediction', new=dummy_do_dummy_prediction):
estimator.search(
X_train=X_train, y_train=y_train,
X_test=X_test, y_test=y_test,
optimize_metric='accuracy',
total_walltime_limit=40,
func_eval_time_limit_secs=10,
enable_traditional_pipeline=False,
)
# Internal dataset has expected settings
assert estimator.dataset.task_type == 'tabular_classification'
expected_num_splits = HOLDOUT_NUM_SPLITS if resampling_strategy == HoldoutValTypes.holdout_validation \
else CV_NUM_SPLITS
assert estimator.resampling_strategy == resampling_strategy
assert estimator.dataset.resampling_strategy == resampling_strategy
assert len(estimator.dataset.splits) == expected_num_splits
# TODO: check for budget
# Check for the created files
tmp_dir = estimator._backend.temporary_directory
loaded_datamanager = estimator._backend.load_datamanager()
assert len(loaded_datamanager.train_tensors) == len(estimator.dataset.train_tensors)
expected_files = [
'smac3-output/run_42/configspace.json',
'smac3-output/run_42/runhistory.json',
'smac3-output/run_42/scenario.txt',
'smac3-output/run_42/stats.json',
'smac3-output/run_42/train_insts.txt',
'smac3-output/run_42/trajectory.json',
'.autoPyTorch/datamanager.pkl',
'.autoPyTorch/ensemble_read_preds.pkl',
'.autoPyTorch/start_time_42',
'.autoPyTorch/ensemble_history.json',
'.autoPyTorch/ensemble_read_losses.pkl',
'.autoPyTorch/true_targets_ensemble.npy',
]
for expected_file in expected_files:
assert os.path.exists(os.path.join(tmp_dir, expected_file)), "{}/{}/{}".format(
tmp_dir,
[data for data in pathlib.Path(tmp_dir).glob('*')],
expected_file,
)
# Check that smac was able to find proper models
succesful_runs = [run_value.status for run_value in estimator.run_history.data.values(
) if 'SUCCESS' in str(run_value.status)]
assert len(succesful_runs) > 1, [(k, v) for k, v in estimator.run_history.data.items()]
# Search for an existing run key in disc. A individual model might have
# a timeout and hence was not written to disc
successful_num_run = None
SUCCESS = False
for i, (run_key, value) in enumerate(estimator.run_history.data.items()):
if 'SUCCESS' in str(value.status):
run_key_model_run_dir = estimator._backend.get_numrun_directory(
estimator.seed, run_key.config_id + 1, run_key.budget)
successful_num_run = run_key.config_id + 1
if os.path.exists(run_key_model_run_dir):
# Runkey config id is different from the num_run
# more specifically num_run = config_id + 1(dummy)
SUCCESS = True
break
assert SUCCESS, f"Successful run was not properly saved for num_run: {successful_num_run}"
if resampling_strategy == HoldoutValTypes.holdout_validation:
model_file = os.path.join(run_key_model_run_dir,
f"{estimator.seed}.{successful_num_run}.{run_key.budget}.model")
assert os.path.exists(model_file), model_file
model = estimator._backend.load_model_by_seed_and_id_and_budget(
estimator.seed, successful_num_run, run_key.budget)
elif resampling_strategy == CrossValTypes.k_fold_cross_validation:
model_file = os.path.join(
run_key_model_run_dir,
f"{estimator.seed}.{successful_num_run}.{run_key.budget}.cv_model"
)
assert os.path.exists(model_file), model_file
model = estimator._backend.load_cv_model_by_seed_and_id_and_budget(
estimator.seed, successful_num_run, run_key.budget)
assert isinstance(model, VotingClassifier)
assert len(model.estimators_) == CV_NUM_SPLITS
else:
pytest.fail(resampling_strategy)
# Make sure that predictions on the test data are printed and make sense
test_prediction = os.path.join(run_key_model_run_dir,
estimator._backend.get_prediction_filename(
'test', estimator.seed, successful_num_run,
run_key.budget))
assert os.path.exists(test_prediction), test_prediction
assert np.shape(np.load(test_prediction, allow_pickle=True))[0] == np.shape(X_test)[0]
# Also, for ensemble builder, the OOF predictions should be there and match
# the Ground truth that is also physically printed to disk
ensemble_prediction = os.path.join(run_key_model_run_dir,
estimator._backend.get_prediction_filename(
'ensemble',
estimator.seed, successful_num_run,
run_key.budget))
assert os.path.exists(ensemble_prediction), ensemble_prediction
assert np.shape(np.load(ensemble_prediction, allow_pickle=True))[0] == np.shape(
estimator._backend.load_targets_ensemble()
)[0]
# Ensemble Builder produced an ensemble
estimator.ensemble_ is not None
# There should be a weight for each element of the ensemble
assert len(estimator.ensemble_.identifiers_) == len(estimator.ensemble_.weights_)
y_pred = estimator.predict(X_test)
assert np.shape(y_pred)[0] == np.shape(X_test)[0]
# Make sure that predict proba has the expected shape
probabilites = estimator.predict_proba(X_test)
assert np.shape(probabilites) == (np.shape(X_test)[0], 2)
score = estimator.score(y_pred, y_test)
assert 'accuracy' in score
# check incumbent config and results
incumbent_config, incumbent_results = estimator.get_incumbent_results()
assert isinstance(incumbent_config, Configuration)
assert isinstance(incumbent_results, dict)
assert 'opt_loss' in incumbent_results, "run history: {}, successful_num_run: {}".format(estimator.run_history.data,
successful_num_run)
assert 'train_loss' in incumbent_results
# Check that we can pickle
dump_file = os.path.join(estimator._backend.temporary_directory, 'dump.pkl')
with open(dump_file, 'wb') as f:
pickle.dump(estimator, f)
with open(dump_file, 'rb') as f:
restored_estimator = pickle.load(f)
restored_estimator.predict(X_test)
# Test refit on dummy data
estimator.refit(dataset=backend.load_datamanager())
# Make sure that a configuration space is stored in the estimator
assert isinstance(estimator.get_search_space(), CS.ConfigurationSpace)
# test fit on dummy data
assert isinstance(estimator.fit(dataset=backend.load_datamanager()), BasePipeline)
@pytest.mark.parametrize('openml_name', ("boston", ))
@unittest.mock.patch('autoPyTorch.evaluation.train_evaluator.eval_function',
new=dummy_eval_function)
@pytest.mark.parametrize('resampling_strategy,resampling_strategy_args',
((HoldoutValTypes.holdout_validation, None),
(CrossValTypes.k_fold_cross_validation, {'num_splits': CV_NUM_SPLITS})
))
def test_tabular_regression(openml_name, resampling_strategy, backend, resampling_strategy_args, n_samples):
# Get the data and check that contents of data-manager make sense
X, y = sklearn.datasets.fetch_openml(
openml_name,
return_X_y=True,
as_frame=True
)
X, y = X.iloc[:n_samples], y.iloc[:n_samples]
# normalize values
y = (y - y.mean()) / y.std()
# fill NAs for now since they are not yet properly handled
for column in X.columns:
if X[column].dtype.name == "category":
X[column] = pd.Categorical(X[column],
categories=list(X[column].cat.categories) + ["missing"]).fillna("missing")
else:
X[column] = X[column].fillna(0)
X_train, X_test, y_train, y_test = sklearn.model_selection.train_test_split(
X, y, random_state=1)
# Search for a good configuration
estimator = TabularRegressionTask(
backend=backend,
resampling_strategy=resampling_strategy,
resampling_strategy_args=resampling_strategy_args,
seed=42,
)
with unittest.mock.patch.object(estimator, '_do_dummy_prediction', new=dummy_do_dummy_prediction):
estimator.search(
X_train=X_train, y_train=y_train,
X_test=X_test, y_test=y_test,
optimize_metric='r2',
total_walltime_limit=40,
func_eval_time_limit_secs=10,
enable_traditional_pipeline=False,
)
# Internal dataset has expected settings
assert estimator.dataset.task_type == 'tabular_regression'
expected_num_splits = HOLDOUT_NUM_SPLITS if resampling_strategy == HoldoutValTypes.holdout_validation\
else CV_NUM_SPLITS
assert estimator.resampling_strategy == resampling_strategy
assert estimator.dataset.resampling_strategy == resampling_strategy
assert len(estimator.dataset.splits) == expected_num_splits
# TODO: check for budget
# Check for the created files
tmp_dir = estimator._backend.temporary_directory
loaded_datamanager = estimator._backend.load_datamanager()
assert len(loaded_datamanager.train_tensors) == len(estimator.dataset.train_tensors)
expected_files = [
'smac3-output/run_42/configspace.json',
'smac3-output/run_42/runhistory.json',
'smac3-output/run_42/scenario.txt',
'smac3-output/run_42/stats.json',
'smac3-output/run_42/train_insts.txt',
'smac3-output/run_42/trajectory.json',
'.autoPyTorch/datamanager.pkl',
'.autoPyTorch/ensemble_read_preds.pkl',
'.autoPyTorch/start_time_42',
'.autoPyTorch/ensemble_history.json',
'.autoPyTorch/ensemble_read_losses.pkl',
'.autoPyTorch/true_targets_ensemble.npy',
]
for expected_file in expected_files:
assert os.path.exists(os.path.join(tmp_dir, expected_file)), expected_file
# Check that smac was able to find proper models
succesful_runs = [run_value.status for run_value in estimator.run_history.data.values(
) if 'SUCCESS' in str(run_value.status)]
assert len(succesful_runs) >= 1, [(k, v) for k, v in estimator.run_history.data.items()]
# Search for an existing run key in disc. A individual model might have
# a timeout and hence was not written to disc
successful_num_run = None
SUCCESS = False
for i, (run_key, value) in enumerate(estimator.run_history.data.items()):
if 'SUCCESS' in str(value.status):
run_key_model_run_dir = estimator._backend.get_numrun_directory(
estimator.seed, run_key.config_id + 1, run_key.budget)
successful_num_run = run_key.config_id + 1
if os.path.exists(run_key_model_run_dir):
# Runkey config id is different from the num_run
# more specifically num_run = config_id + 1(dummy)
SUCCESS = True
break
assert SUCCESS, f"Successful run was not properly saved for num_run: {successful_num_run}"
if resampling_strategy == HoldoutValTypes.holdout_validation:
model_file = os.path.join(run_key_model_run_dir,
f"{estimator.seed}.{successful_num_run}.{run_key.budget}.model")
assert os.path.exists(model_file), model_file
model = estimator._backend.load_model_by_seed_and_id_and_budget(
estimator.seed, successful_num_run, run_key.budget)
elif resampling_strategy == CrossValTypes.k_fold_cross_validation:
model_file = os.path.join(
run_key_model_run_dir,
f"{estimator.seed}.{successful_num_run}.{run_key.budget}.cv_model"
)
assert os.path.exists(model_file), model_file
model = estimator._backend.load_cv_model_by_seed_and_id_and_budget(
estimator.seed, successful_num_run, run_key.budget)
assert isinstance(model, VotingRegressor)
assert len(model.estimators_) == CV_NUM_SPLITS
else:
pytest.fail(resampling_strategy)
# Make sure that predictions on the test data are printed and make sense
test_prediction = os.path.join(run_key_model_run_dir,
estimator._backend.get_prediction_filename(
'test', estimator.seed, successful_num_run,
run_key.budget))
assert os.path.exists(test_prediction), test_prediction
assert np.shape(np.load(test_prediction, allow_pickle=True))[0] == np.shape(X_test)[0]
# Also, for ensemble builder, the OOF predictions should be there and match
# the Ground truth that is also physically printed to disk
ensemble_prediction = os.path.join(run_key_model_run_dir,
estimator._backend.get_prediction_filename(
'ensemble',
estimator.seed, successful_num_run,
run_key.budget))
assert os.path.exists(ensemble_prediction), ensemble_prediction
assert np.shape(np.load(ensemble_prediction, allow_pickle=True))[0] == np.shape(
estimator._backend.load_targets_ensemble()
)[0]
# Ensemble Builder produced an ensemble
estimator.ensemble_ is not None
# There should be a weight for each element of the ensemble
assert len(estimator.ensemble_.identifiers_) == len(estimator.ensemble_.weights_)
y_pred = estimator.predict(X_test)
assert np.shape(y_pred)[0] == np.shape(X_test)[0]
score = estimator.score(y_pred, y_test)
assert 'r2' in score
# check incumbent config and results
incumbent_config, incumbent_results = estimator.get_incumbent_results()
assert isinstance(incumbent_config, Configuration)
assert isinstance(incumbent_results, dict)
assert 'opt_loss' in incumbent_results, "run history: {}, successful_num_run: {}".format(estimator.run_history.data,
successful_num_run)
assert 'train_loss' in incumbent_results, estimator.run_history.data
# Check that we can pickle
dump_file = os.path.join(estimator._backend.temporary_directory, 'dump.pkl')
with open(dump_file, 'wb') as f:
pickle.dump(estimator, f)
with open(dump_file, 'rb') as f:
restored_estimator = pickle.load(f)
restored_estimator.predict(X_test)
# Test refit on dummy data
estimator.refit(dataset=backend.load_datamanager())
# Make sure that a configuration space is stored in the estimator
assert isinstance(estimator.get_search_space(), CS.ConfigurationSpace)
representation = estimator.show_models()
assert isinstance(representation, str)
assert 'Weight' in representation
assert 'Preprocessing' in representation
assert 'Estimator' in representation
@pytest.mark.parametrize('openml_id', (
1590, # Adult to test NaN in categorical columns
))
def test_tabular_input_support(openml_id, backend):
"""
Make sure we can process inputs with NaN in categorical and Object columns
when the later is possible
"""
# Get the data and check that contents of data-manager make sense
X, y = sklearn.datasets.fetch_openml(
data_id=int(openml_id),
return_X_y=True, as_frame=True
)
# Make sure we are robust against objects
X[X.columns[0]] = X[X.columns[0]].astype(object)
X_train, X_test, y_train, y_test = sklearn.model_selection.train_test_split(
X, y, random_state=1)
# Search for a good configuration
estimator = TabularClassificationTask(
backend=backend,
resampling_strategy=HoldoutValTypes.holdout_validation,
ensemble_size=0,
)
estimator._do_dummy_prediction = unittest.mock.MagicMock()
with unittest.mock.patch.object(AutoMLSMBO, 'run_smbo') as AutoMLSMBOMock:
AutoMLSMBOMock.return_value = (RunHistory(), {}, 'epochs')
estimator.search(
X_train=X_train, y_train=y_train,
X_test=X_test, y_test=y_test,
optimize_metric='accuracy',
total_walltime_limit=150,
func_eval_time_limit_secs=50,
enable_traditional_pipeline=False,
load_models=False,
)
@pytest.mark.parametrize("fit_dictionary_tabular", ['classification_categorical_only'], indirect=True)
def test_do_dummy_prediction(dask_client, fit_dictionary_tabular):
backend = fit_dictionary_tabular['backend']
estimator = TabularClassificationTask(
backend=backend,
resampling_strategy=HoldoutValTypes.holdout_validation,
ensemble_size=0,
)
# Setup pre-requisites normally set by search()
estimator._create_dask_client()
estimator._metric = accuracy
estimator._logger = estimator._get_logger('test')
estimator._memory_limit = 5000
estimator._time_for_task = 60
estimator._disable_file_output = []
estimator._all_supported_metrics = False
with pytest.raises(ValueError, match=r".*Dummy prediction failed with run state.*"):
with unittest.mock.patch('autoPyTorch.evaluation.train_evaluator.eval_function') as dummy:
dummy.side_effect = MemoryError
estimator._do_dummy_prediction()
estimator._do_dummy_prediction()
# Ensure that the dummy predictions are not in the current working
# directory, but in the temporary directory.
assert not os.path.exists(os.path.join(os.getcwd(), '.autoPyTorch'))
assert os.path.exists(os.path.join(
backend.temporary_directory, '.autoPyTorch', 'runs', '1_1_50.0',
'predictions_ensemble_1_1_50.0.npy')
)
model_path = os.path.join(backend.temporary_directory,
'.autoPyTorch',
'runs', '1_1_50.0',
'1.1.50.0.model')
# Make sure the dummy model complies with scikit learn
# get/set params
assert os.path.exists(model_path)
with open(model_path, 'rb') as model_handler:
clone(pickle.load(model_handler))
estimator._close_dask_client()
estimator._clean_logger()
del estimator
@unittest.mock.patch('autoPyTorch.evaluation.train_evaluator.eval_function',
new=dummy_eval_function)
@pytest.mark.parametrize('openml_id', (40981, ))
def test_portfolio_selection(openml_id, backend, n_samples):
# Get the data and check that contents of data-manager make sense
X, y = sklearn.datasets.fetch_openml(
data_id=int(openml_id),
return_X_y=True, as_frame=True
)
X, y = X.iloc[:n_samples], y.iloc[:n_samples]
X_train, X_test, y_train, y_test = sklearn.model_selection.train_test_split(
X, y, random_state=1)
# Search for a good configuration
estimator = TabularClassificationTask(
backend=backend,
resampling_strategy=HoldoutValTypes.holdout_validation,
)
with unittest.mock.patch.object(estimator, '_do_dummy_prediction', new=dummy_do_dummy_prediction):
estimator.search(
X_train=X_train, y_train=y_train,
X_test=X_test, y_test=y_test,
optimize_metric='accuracy',
total_walltime_limit=30,
func_eval_time_limit_secs=5,
enable_traditional_pipeline=False,
portfolio_selection=os.path.join(os.path.dirname(__file__),
"../../autoPyTorch/configs/greedy_portfolio.json")
)
successful_config_ids = [run_key.config_id for run_key, run_value in estimator.run_history.data.items(
) if 'SUCCESS' in str(run_value.status)]
successful_configs = [estimator.run_history.ids_config[id].get_dictionary() for id in successful_config_ids]
portfolio_configs = json.load(open(os.path.join(os.path.dirname(__file__),
"../../autoPyTorch/configs/greedy_portfolio.json")))
# check if any configs from greedy portfolio were compatible with australian
assert any(successful_config in portfolio_configs for successful_config in successful_configs)
@unittest.mock.patch('autoPyTorch.evaluation.train_evaluator.eval_function',
new=dummy_eval_function)
@pytest.mark.parametrize('openml_id', (40981, ))
def test_portfolio_selection_failure(openml_id, backend, n_samples):
# Get the data and check that contents of data-manager make sense
X, y = sklearn.datasets.fetch_openml(
data_id=int(openml_id),
return_X_y=True, as_frame=True
)
X, y = X.iloc[:n_samples], y.iloc[:n_samples]
X_train, X_test, y_train, y_test = sklearn.model_selection.train_test_split(
X, y, random_state=1)
estimator = TabularClassificationTask(
backend=backend,
resampling_strategy=HoldoutValTypes.holdout_validation,
)
with pytest.raises(FileNotFoundError, match=r"The path: .+? provided for 'portfolio_selection' "
r"for the file containing the portfolio configurations "
r"does not exist\. Please provide a valid path"):
estimator.search(
X_train=X_train, y_train=y_train,
X_test=X_test, y_test=y_test,
optimize_metric='accuracy',
total_walltime_limit=30,
func_eval_time_limit_secs=5,
enable_traditional_pipeline=False,
portfolio_selection="random_path_to_test.json"
)
# TODO: Make faster when https://github.com/automl/Auto-PyTorch/pull/223 is incorporated
@pytest.mark.parametrize("fit_dictionary_tabular", ['classification_categorical_only'], indirect=True)
def test_do_traditional_pipeline(fit_dictionary_tabular):
backend = fit_dictionary_tabular['backend']
estimator = TabularClassificationTask(
backend=backend,
resampling_strategy=HoldoutValTypes.holdout_validation,
ensemble_size=0,
)
# Setup pre-requisites normally set by search()
estimator._create_dask_client()
estimator._metric = accuracy
estimator._logger = estimator._get_logger('test')
estimator._memory_limit = 5000
estimator._time_for_task = 60
estimator._disable_file_output = []
estimator._all_supported_metrics = False
estimator._do_traditional_prediction(time_left=60, func_eval_time_limit_secs=30)
# The models should not be on the current directory
assert not os.path.exists(os.path.join(os.getcwd(), '.autoPyTorch'))
# Then we should have fitted 5 classifiers
# Maybe some of them fail (unlikely, but we do not control external API)
# but we want to make this test robust
at_least_one_model_checked = False
for i in range(2, 7):
pred_path = os.path.join(
backend.temporary_directory, '.autoPyTorch', 'runs', f"1_{i}_50.0",
f"predictions_ensemble_1_{i}_50.0.npy"
)
if not os.path.exists(pred_path):
continue
model_path = os.path.join(backend.temporary_directory,
'.autoPyTorch',
'runs', f"1_{i}_50.0",
f"1.{i}.50.0.model")
# Make sure the dummy model complies with scikit learn
# get/set params
assert os.path.exists(model_path)
with open(model_path, 'rb') as model_handler:
model = pickle.load(model_handler)
clone(model)
assert model.config == list(_traditional_learners.keys())[i - 2]
at_least_one_model_checked = True
if not at_least_one_model_checked:
pytest.fail("Not even one single traditional pipeline was fitted")
estimator._close_dask_client()
estimator._clean_logger()
del estimator
@pytest.mark.parametrize("api_type", [TabularClassificationTask, TabularRegressionTask])
def test_unsupported_msg(api_type):
api = api_type()
with pytest.raises(ValueError, match=r".*is only supported after calling search. Kindly .*"):
api.predict(np.ones((10, 10)))
@pytest.mark.parametrize("fit_dictionary_tabular", ['classification_categorical_only'], indirect=True)
@pytest.mark.parametrize("api_type", [TabularClassificationTask, TabularRegressionTask])
def test_build_pipeline(api_type, fit_dictionary_tabular):
api = api_type()
pipeline = api.build_pipeline(fit_dictionary_tabular['dataset_properties'])
assert isinstance(pipeline, BaseEstimator)
assert len(pipeline.steps) > 0
| 42.009259
| 120
| 0.681912
| 3,353
| 27,222
| 5.265732
| 0.123472
| 0.013593
| 0.019937
| 0.015066
| 0.791855
| 0.780698
| 0.777073
| 0.774694
| 0.77073
| 0.749207
| 0
| 0.008792
| 0.231173
| 27,222
| 647
| 121
| 42.074189
| 0.834823
| 0.11296
| 0
| 0.683084
| 0
| 0
| 0.11952
| 0.074222
| 0
| 0
| 0
| 0.003091
| 0.134904
| 1
| 0.019272
| false
| 0
| 0.051392
| 0
| 0.070664
| 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
|
7a2375de2da72033f927968ea02c6bafd357fed5
| 203
|
py
|
Python
|
ngsutils/bam/tofasta.py
|
bgruening/ngsutils
|
417e90dc1918fb553dd84990f2c54bd8cea8f44d
|
[
"BSD-3-Clause"
] | 57
|
2015-03-09T01:26:45.000Z
|
2022-02-22T07:26:01.000Z
|
ngsutils/bam/tofasta.py
|
bgruening/ngsutils
|
417e90dc1918fb553dd84990f2c54bd8cea8f44d
|
[
"BSD-3-Clause"
] | 33
|
2015-02-03T23:24:46.000Z
|
2022-03-16T20:08:10.000Z
|
ngsutils/bam/tofasta.py
|
bgruening/ngsutils
|
417e90dc1918fb553dd84990f2c54bd8cea8f44d
|
[
"BSD-3-Clause"
] | 33
|
2015-01-18T16:47:47.000Z
|
2022-02-22T07:28:09.000Z
|
#!/usr/bin/env python
## category Conversion
## desc Convert BAM reads to FASTA sequences
'''
Convert BAM reads to FASTA sequences
'''
import tofastq
if __name__ == '__main__':
tofastq.main(False)
| 16.916667
| 44
| 0.719212
| 27
| 203
| 5.111111
| 0.703704
| 0.144928
| 0.217391
| 0.246377
| 0.449275
| 0.449275
| 0
| 0
| 0
| 0
| 0
| 0
| 0.167488
| 203
| 11
| 45
| 18.454545
| 0.816568
| 0.586207
| 0
| 0
| 0
| 0
| 0.111111
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
7a8d66186a0bc3dea3af73f74b4d29c15b05a3b8
| 39
|
py
|
Python
|
tests/integration/__init__.py
|
mullinix/clean-jdr
|
d7bbab4814d2d334f71e22d02940944cc6f4f635
|
[
"MIT"
] | null | null | null |
tests/integration/__init__.py
|
mullinix/clean-jdr
|
d7bbab4814d2d334f71e22d02940944cc6f4f635
|
[
"MIT"
] | 2
|
2022-01-15T16:23:26.000Z
|
2022-01-15T16:25:34.000Z
|
tests/integration/__init__.py
|
mullinix/clean-jdr
|
d7bbab4814d2d334f71e22d02940944cc6f4f635
|
[
"MIT"
] | null | null | null |
"""Integration tests for clean-jdr."""
| 19.5
| 38
| 0.692308
| 5
| 39
| 5.4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.102564
| 39
| 1
| 39
| 39
| 0.771429
| 0.820513
| 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
|
8fb6a6fb30faba12853945092d67880358f08222
| 35,337
|
py
|
Python
|
sr_test2.py
|
bpwagner/inkscape-pes
|
080269ccf623dd0efe9337b3b9f49ee098401414
|
[
"MIT"
] | 6
|
2017-06-12T13:32:51.000Z
|
2022-01-08T05:30:30.000Z
|
sr_test2.py
|
bpwagner/inkscape-pes
|
080269ccf623dd0efe9337b3b9f49ee098401414
|
[
"MIT"
] | null | null | null |
sr_test2.py
|
bpwagner/inkscape-pes
|
080269ccf623dd0efe9337b3b9f49ee098401414
|
[
"MIT"
] | 1
|
2022-01-08T05:30:33.000Z
|
2022-01-08T05:30:33.000Z
|
import numpy as np
import matplotlib.pyplot as plt
#points are in mm coming from inkscape
pts = [(88.90000000035559, 76.200000000304797), (88.90000000035559, 76.200000000304797), (88.134125089241422, 76.370194111416581), (87.145221244793021, 77.125361511419612), (86.682540489235606, 76.200000000304797), (86.562336400346226, 75.959591822526065), (86.802741755902744, 75.634056955858085), (86.682540489235606, 75.393651600301567), (86.512546755901582, 75.053664133633532), (86.046183000344172, 74.927287844744143), (85.876189267010162, 74.587300378076122), (85.695885955898333, 74.226690933630223), (86.056495400344204, 73.738387222517161), (85.876189267010162, 73.377777778071277), (85.8160900447877, 73.25757368918191), (85.568044933675594, 73.472807644738339), (85.473015067008561, 73.377777778071277), (85.377988022563741, 73.282747911404229), (85.473015067008561, 73.1089949780702), (85.473015067008561, 72.974603578069676), (85.338623667008022, 72.974603578069676), (85.164870733673979, 73.069633444736724), (85.069840867006945, 72.974603578069676), (84.974811000339898, 72.879573711402628), (85.129942911451636, 72.691630644735213), (85.069840867006945, 72.571429378068075), (84.984844000339933, 72.40143564473405), (84.751663533672328, 72.338246089178256), (84.666666667005344, 72.16825517806646), (84.606564622560654, 72.048051089177079), (84.726768711450035, 71.885282244731997), (84.666666667005344, 71.765078155842616), (84.581669800338332, 71.59508724473082), (84.397883867004268, 71.496295355841539), (84.263492467003729, 71.361903955841001), (84.129101067003205, 71.227512555840462), (84.030312000336139, 71.043726622506398), (83.860318267002128, 70.958729755839386), (83.740114178112748, 70.898627711394695), (83.552171111445347, 71.053759622506433), (83.457144067000527, 70.958729755839386), (83.362114200333465, 70.863699889172338), (83.517243289222975, 70.675759644727151), (83.457144067000527, 70.55555555583777), (83.027940511443248, 69.697154089167668), (83.07999357811012, 70.607608622504642), (82.650792844775069, 69.749207155834554), (82.442515666996457, 69.332647155832888), (83.017094711443207, 68.796173755830736), (82.247618644773468, 68.539681733607495), (81.992628044772459, 68.454684866940482), (81.696260844771274, 68.624678600274507), (81.441270244770237, 68.539681733607495), (81.080660800324338, 68.419480466940342), (80.974906489212813, 67.903327066938274), (80.634921844767007, 67.733333333604264), (80.394513666988274, 67.613129244714898), (80.068978800320295, 67.853537422493631), (79.828570622541562, 67.733333333604264), (79.658576889207538, 67.648336466937252), (79.605702555874004, 67.390261178047339), (79.425396422539961, 67.330159133602649), (79.170405822538939, 67.245162266935637), (78.874038622537753, 67.415156000269661), (78.619048022536731, 67.330159133602649), (78.438741889202689, 67.270057089157959), (78.385867555869126, 67.011981800268046), (78.215873822535116, 66.926984933601034), (78.095669733645749, 66.866882889156344), (77.932900889200653, 66.987086978045724), (77.812699622533515, 66.926984933601034), (77.472712155865494, 66.756991200267024), (77.346335866976091, 66.2906274447096), (77.00634840030807, 66.120633711375589), (76.765943044751552, 66.000432444708451), (76.440408178083587, 66.240837800264956), (76.20000000030484, 66.120633711375589), (75.860012533636819, 65.950642800263807), (75.754261044747508, 65.434489400261739), (75.39365160030161, 65.314285311372373), (75.138661000300601, 65.229288444705361), (74.848059600299422, 65.379475822483741), (74.587300378076165, 65.314285311372373), (74.295764822519445, 65.241401422483193), (74.072487533629669, 64.983995000259938), (73.780951978072935, 64.911111111370758), (73.520195578071892, 64.84592060025939), (73.224161400292942, 65.010935933593387), (72.974603578069704, 64.911111111370758), (72.524704666956794, 64.731152111370037), (72.180582644733207, 64.354063711368525), (71.765078155842644, 64.104762711367542), (71.507395155841621, 63.950152911366914), (71.227512555840491, 63.835979911366458), (70.958729755839428, 63.701588511365919), (70.421164155837275, 63.432802889142621), (69.916206511390811, 63.08529702247457), (69.346032955832968, 62.895237289140475), (68.387930844718028, 62.575871800250312), (68.613773533607826, 63.372506111364608), (67.733333333604307, 62.49206308913886), (67.638303466937245, 62.397033222471812), (67.853537422493673, 62.148990933581935), (67.733333333604307, 62.088888889137245), (67.49292515582556, 61.968684800247878), (67.195767733602153, 62.088888889137245), (66.926984933601076, 62.088888889137245), (65.986242311375094, 62.088888889137245), (65.045502511371325, 62.088888889137245), (64.10476271136757, 62.088888889137245), (63.835979911366493, 62.088888889137245), (63.553402089143141, 62.173885755804257), (63.298411489142126, 62.088888889137245), (63.11810817803029, 62.028786844692561), (63.065231022474521, 61.770711555802642), (62.89523728914051, 61.685714689135629), (62.775036022473365, 61.625612644690946), (62.612267178028269, 61.74581673358032), (62.492063089138895, 61.685714689135629), (62.322069355804878, 61.600717822468624), (62.25888262247129, 61.367537355801026), (62.08888888913728, 61.282540489134014), (61.851006600247437, 61.163597933577989), (61.156680666911328, 61.374979555801055), (60.879366289132442, 61.282540489134014), (60.594276689131298, 61.187510622466966), (60.358104666908133, 60.974393333577233), (60.073015066906997, 60.879366289132399), (59.9455211780176, 60.836866444687786), (59.80423226690592, 60.879366289132399), (59.669840866905382, 60.879366289132399), (59.266666666903767, 60.879366289132399), (58.855663622457676, 60.958433666910494), (58.460318266900543, 60.879366289132399), (58.165644400232701, 60.820429822465499), (57.94550542245404, 60.549073155797743), (57.653967044675099, 60.476189266908563), (57.336825466896059, 60.396904578019353), (55.654191178000431, 60.476189266908563), (55.234921844665429, 60.476189266908563), (53.756613622437293, 60.476189266908563), (52.278308222431377, 60.476189266908563), (50.800000000203241, 60.476189266908563), (48.918517577973489, 60.476189266908563), (47.037037977965973, 60.476189266908563), (45.155555555736221, 60.476189266908563), (44.617989955734068, 60.476189266908563), (44.080424355731921, 60.476189266908563), (43.542855933507546, 60.476189266908563), (43.274073133506469, 60.476189266908563), (42.997266755727587, 60.411001578019416), (42.736507533504323, 60.476189266908563), (42.324214733502679, 60.5792652891312), (41.939277733501136, 60.776290266909768), (41.526984933499492, 60.879366289132399), (41.396603911276742, 60.911960133576976), (41.254188933498398, 60.846769622465608), (41.123810733497876, 60.879366289132399), (40.711515111274004, 60.982439489132815), (40.326580933494689, 61.179467289133605), (39.914285311270817, 61.282540489134014), (39.450769177935626, 61.398418111356705), (38.71557464459935, 61.075547422466521), (38.301588511264363, 61.282540489134014), (38.181384422374997, 61.342642533578704), (38.396615555709189, 61.590684822468582), (38.301588511264363, 61.685714689135629), (38.111528777930268, 61.875771600247504), (37.685297022373014, 61.495654955801541), (37.495237289038919, 61.685714689135629), (37.400210244594092, 61.780744555802684), (37.590267155705966, 61.993859022470197), (37.495237289038919, 62.088888889137245), (37.400210244594092, 62.183918755804299), (37.212267177926677, 62.028786844692561), (37.092063089037303, 62.088888889137245), (36.922069355703293, 62.173885755804257), (36.858882622369698, 62.407066222471848), (36.688888889035688, 62.49206308913886), (36.568684800146322, 62.55216513358355), (36.380744555701128, 62.397033222471812), (36.285714689034073, 62.49206308913886), (36.190684822367025, 62.587092955805915), (36.380744555701128, 62.800210244695648), (36.285714689034073, 62.895237289140475), (36.073223933477671, 63.107730866919098), (35.72940388903185, 63.131719755808085), (35.47936628903085, 63.29841148914209), (34.750942266805716, 63.784028444699587), (35.401439089030532, 63.619145755810038), (34.673015066805398, 64.104762711367542), (34.422977466804397, 64.271454444701533), (34.079157422358577, 64.295446155812741), (33.866666666802175, 64.507936911369157), (33.771636800135127, 64.602966778036205), (33.866666666802175, 64.776719711370234), (33.866666666802175, 64.911111111370758), (33.597883866801098, 65.179893911371835), (33.376593422355768, 65.506608466928697), (33.060318266798951, 65.717459511373988), (32.948496177909611, 65.792008511374291), (32.752171111242163, 65.622432466929155), (32.657144066797336, 65.717459511373988), (32.562114200130289, 65.812489378041036), (32.717243289019805, 66.000432444708451), (32.657144066797336, 66.120633711375604), (32.572147200130331, 66.290627444709614), (32.338963911240512, 66.353817000265423), (32.253967044573507, 66.523810733599433), (32.193867822351038, 66.644012000266585), (32.31406908901819, 66.806780844711682), (32.253967044573507, 66.926984933601048), (32.168970177906495, 67.096978666935073), (31.9357897112389, 67.160165400268653), (31.850792844571892, 67.330159133602663), (31.790690800127209, 67.45036322249203), (31.910894889016575, 67.613129244714912), (31.850792844571892, 67.733333333604278), (31.680799111237882, 68.073320800272313), (31.214438177902679, 68.199697089161702), (31.044444444568668, 68.539681733607509), (30.984342400123985, 68.659885822496875), (31.104546489013352, 68.822654666941972), (31.044444444568668, 68.942855933609124), (30.95944757790166, 69.112849666943134), (30.70137228901174, 69.165726822498897), (30.641270244567057, 69.346032955832953), (30.556273377900052, 69.601020733611762), (30.761474333456427, 69.911973178057451), (30.641270244567057, 70.152381355836184), (30.581168200122374, 70.27258544472555), (30.298198089010128, 70.032177266946817), (30.238096044565445, 70.152381355836184), (29.997687866786709, 70.633194889171435), (30.408089777899459, 71.255099778062814), (30.238096044565445, 71.76507815584263), (30.117891955676075, 72.125690422510743), (29.601738555674011, 72.231441911400054), (29.431744822339997, 72.571429378068089), (29.27047740011713, 72.893967044736044), (29.593015066785089, 73.458411489182751), (29.431744822339997, 73.78095197807292), (29.346747955672992, 73.950945711406945), (29.113567489005394, 74.014132444740525), (29.028570622338385, 74.184126178074521), (28.908369355671237, 74.424534355853268), (29.113567489005394, 74.735486800298958), (29.028570622338385, 74.990477400299966), (28.933543577893563, 75.275564178078895), (28.720426289003822, 75.511739022524281), (28.625396422336774, 75.796825800303196), (28.540399555669769, 76.051816400304219), (28.710393289003783, 76.348183600305404), (28.625396422336774, 76.603174200306427), (28.53036655566973, 76.888260978085356), (28.295106111224342, 77.117987044752937), (28.222222222335166, 77.409522600309657), (28.093898882334649, 77.922817089200606), (28.353122533446797, 78.901789533648966), (28.222222222335166, 79.425396422539947), (28.119148740112529, 79.837692044763813), (27.922121222333963, 80.222626222543141), (27.819047740111326, 80.634921844767007), (27.64792540011064, 81.319409511436405), (28.092843371223534, 80.749261355878588), (27.819047740111326, 81.844444444771852), (27.746163568999926, 82.135980000328573), (27.488757146776674, 82.359257289218348), (27.41587297566527, 82.650792844775069), (27.350683593442788, 82.91155206699834), (27.41587297566527, 83.188358444777222), (27.41587297566527, 83.457144067000527), (27.41587297566527, 83.860318267002128), (27.41587297566527, 84.263492467003744), (27.41587297566527, 84.666666667005359), (27.41587297566527, 84.935449467006435), (27.500869560110054, 85.218024467007552), (27.41587297566527, 85.473015067008589), (27.355771213442807, 85.653321200342631), (27.0728002556639, 85.695885955898362), (27.012698493441434, 85.87618926701019), (26.927701626774429, 86.131179867011213), (27.065411113441648, 86.418975978123484), (27.012698493441434, 86.682540489235635), (26.92935234455221, 87.099269822570648), (26.712597493440235, 87.479770289238829), (26.609523728995377, 87.89206308924048), (26.516284844550558, 88.265019755908639), (26.609523728995377, 90.001058955915582), (26.609523728995377, 90.311111111472385), (26.609523728995377, 92.326984933702661), (26.609523728995377, 94.342855933710723), (26.609523728995377, 96.358729755941013), (26.609523728995377, 98.508994978171827), (26.609523728995377, 100.65926020040264), (26.609523728995377, 102.80952260041126), (26.609523728995377, 103.34709102263562), (26.609523728995377, 103.88465662263778), (26.609523728995377, 104.42222222263993), (26.609523728995377, 104.69100502264101), (26.609523728995377, 104.95978782264208), (26.609523728995377, 105.22857062264316), (26.609523728995377, 105.36296202264369), (26.567025577884095, 105.50425093375537), (26.609523728995377, 105.63174482264476), (27.54540338011023, 107.50350468931893), (26.643745713439955, 105.39968195597717), (27.012698493441434, 107.24444444487344), (27.096044642330657, 107.66117377820845), (27.355771213442804, 108.03325555598771), (27.41587297566527, 108.45396704487828), (27.491896304554462, 108.98613091154708), (27.310447735664848, 109.53954046710484), (27.41587297566527, 110.06666666710696), (27.453146628998752, 110.25303493377437), (27.758945977888867, 110.28953473377452), (27.819047740111326, 110.46984086710856), (27.819047740111326, 112.30520817822701), (27.628989417888345, 110.49289842266421), (28.222222222335166, 111.67936628933563), (28.383492466780258, 112.00190395600359), (28.060952260112298, 112.56634840045029), (28.222222222335166, 112.88888888934046), (28.392215955669176, 113.22887635600848), (28.858576889004379, 113.35525264489789), (29.028570622338389, 113.69523728934369), (29.088672666783072, 113.81544137823307), (28.986073600115997, 113.97091760045591), (29.028570622338389, 114.0984114893453), (29.123600489005437, 114.38350108934644), (29.336717777895178, 114.61967311156961), (29.431744822340001, 114.90476271157074), (29.474244666784614, 115.03225660046014), (29.389247800117609, 115.18044020046074), (29.431744822340001, 115.30793691157236), (30.405199822343896, 118.22829908936181), (29.31550877789509, 114.6722878004587), (30.238096044565449, 116.51745951157719), (30.298198089010132, 116.63766360046657), (30.177994000120766, 116.80043244491165), (30.238096044565449, 116.9206337115788), (30.323092911232457, 117.09062744491281), (30.556273377900055, 117.15381700046861), (30.64127024456706, 117.32381073380263), (30.701372289011744, 117.44401200046978), (30.64127024456706, 117.59259353380371), (30.64127024456706, 117.72698493380425), (30.775661644567599, 117.99576773380532), (30.864138311234615, 118.29292515602872), (31.044444444568672, 118.53333333380748), (31.272513866791808, 118.83742777825313), (31.622723422348763, 119.03559011158725), (31.850792844571895, 119.33968173381071), (32.031098977905948, 119.58008991158944), (32.119575644572976, 119.87724733381285), (32.253967044573507, 120.14603295603615), (32.522752666796805, 120.68359855603831), (32.762130733464431, 121.23690086715162), (33.060318266798959, 121.75872975604258), (33.300723622355477, 122.17944124493316), (33.649967977912425, 122.53485497826792), (33.866666666802182, 122.96825517826966), (33.926768711246865, 123.0884564449368), (33.806564622357499, 123.25122528938191), (33.866666666802182, 123.37142937827126), (34.045341555691785, 123.72877633382825), (34.831513889028265, 124.21393608938574), (35.07618926680702, 124.5809519782761), (35.24288382236324, 124.8309895782771), (35.266872711252226, 125.17480962272292), (35.47936628903085, 125.38730037827933), (35.574393333475676, 125.48233024494638), (35.787510622365417, 125.29227333383452), (35.882540489032465, 125.38730037827933), (36.095031244588867, 125.59979395605795), (36.105408555700016, 125.95324342272603), (36.285714689034073, 126.19365160050478), (36.513784111257209, 126.49774322272822), (36.823280289036227, 126.73121720050693), (37.092063089037296, 127.00000000050801), (37.360845889038373, 127.53756560051016), (37.565028022372523, 128.11262160051245), (37.898411489040519, 128.61269962273667), (38.211508822375102, 129.08234562273856), (38.79483957793299, 129.35257622273963), (39.107936911267579, 129.82222222274152), (39.274628644601577, 130.07225982274252), (39.41608124460214, 130.34348384496582), (39.511111111269194, 130.62857062274475), (39.553608133491579, 130.75606733385635), (39.41608124460214, 130.93671777830153), (39.511111111269194, 131.03174482274636), (39.606140977936242, 131.12677468941339), (39.819255444603755, 130.93671777830153), (39.91428531127081, 131.03174482274636), (40.009315177937857, 131.12677468941339), (39.819255444603755, 131.33989197830314), (39.91428531127081, 131.43492184497018), (40.009315177937857, 131.52994888941501), (40.222432466827591, 131.33989197830314), (40.317459511272425, 131.43492184497018), (40.412489377939472, 131.52994888941501), (40.257357466827735, 131.71789195608244), (40.317459511272425, 131.83809604497179), (40.40245637793943, 132.00808977830582), (40.586242311273494, 132.10687884497287), (40.720633711274033, 132.24127024497341), (40.855025111274571, 132.37566164497395), (40.975398533497284, 132.52571637830786), (41.123810733497876, 132.64444444497502), (41.66137633350003, 133.04761864497661), (42.198941933502169, 133.45079284497825), (42.736507533504323, 133.85396704497984), (42.870898933504861, 133.85396704497984), (43.027862466838826, 133.77942086720176), (43.139681733505938, 133.85396704497984), (43.455959711284983, 134.06481808942513), (43.677247333508092, 134.39153546720422), (43.946032955731383, 134.6603182672053), (44.080424355731921, 134.79470966720581), (44.179213422398988, 134.9784956005399), (44.349207155732998, 135.06349246720688), (44.589612511289516, 135.18369655609627), (44.965495822402126, 134.87343273387279), (45.155555555736221, 135.06349246720688), (45.250585422403269, 135.15852233387395), (45.060525689069173, 135.37163680054147), (45.155555555736221, 135.4666666672085), (45.345615289070317, 135.6567264005426), (45.706913355738429, 135.38166980054149), (45.961903955739444, 135.4666666672085), (48.882266133528901, 136.4401216672124), (45.326257666848015, 135.35043062276361), (47.171429377966504, 136.27301506721173), (47.291630644633649, 136.33311711165643), (47.454399489078739, 136.21291302276705), (47.574603577968119, 136.27301506721173), (48.804107511306363, 136.88776844499196), (46.837219000187396, 136.59263737832413), (48.784126177972951, 137.07936628943719), (49.635774066865253, 137.29227755610469), (49.63540435575414, 136.7211190449913), (50.396825800201626, 137.48254048943878), (50.49185566686868, 137.57756753388361), (50.301795933534578, 137.79068482277336), (50.396825800201626, 137.88571468944039), (50.479248800201958, 137.96813768944074), (51.44649491131694, 137.80578653388451), (51.606348400206464, 137.88571468944039), (52.835855155766936, 138.50046806722062), (50.868966644647955, 138.20533700055279), (52.815873822433524, 138.69206308944362), (53.076630222434567, 138.757253600555), (53.381814044658014, 138.57185900055424), (53.622222222436747, 138.69206308944362), (53.742426311326113, 138.7521651338883), (53.502018133547381, 139.03513524500056), (53.622222222436747, 139.09523728944524), (53.862630400215487, 139.21544137833462), (54.159787822438901, 139.09523728944524), (54.42857062243997, 139.09523728944524), (54.966136222442124, 139.09523728944524), (55.503704644666492, 139.09523728944524), (56.041270244668645, 139.09523728944524), (56.310053044669715, 139.09523728944524), (56.586862244670826, 139.03004960055608), (56.847618644671861, 139.09523728944524), (57.139154200228582, 139.16812117833439), (57.385184244674015, 139.36402008944631), (57.653967044675085, 139.49841148944682), (58.19153546689946, 139.63280288944736), (58.720095355790463, 139.81049282278141), (59.26666666690376, 139.90158851167067), (59.915543533573022, 140.00973324500444), (61.091456289133284, 139.75302391167008), (61.685714689135658, 139.90158851167067), (64.317877178035076, 140.55962913389553), (60.162451289129564, 140.1180811783382), (63.701588511365948, 140.7079369116739), (64.364401511368598, 140.81840433389655), (65.045502511371325, 140.7079369116739), (65.717459511374017, 140.7079369116739), (65.851850911374555, 140.7079369116739), (65.986242311375094, 140.7079369116739), (66.120633711375632, 140.7079369116739), (66.25502511137617, 140.7079369116739), (66.403606644710095, 140.64783486722922), (66.523810733599461, 140.7079369116739), (66.693801644711257, 140.79293377834091), (66.756991200267066, 141.02611424500853), (66.926984933601076, 141.11111111167551), (67.047186200268229, 141.17121315612019), (67.195767733602153, 141.11111111167551), (67.330159133602692, 141.11111111167551), (67.46455053360323, 141.11111111167551), (67.598941933603768, 141.11111111167551), (67.733333333604307, 141.11111111167551), (68.405290333606999, 141.11111111167551), (69.077247333609677, 141.11111111167551), (69.749207155834597, 141.11111111167551), (70.689946955838352, 141.11111111167551), (71.63068675584212, 141.11111111167551), (72.571429378068103, 141.11111111167551), (72.84021217806918, 141.11111111167551), (73.117018555848063, 141.17630162278689), (73.377777778071334, 141.11111111167551), (73.669313333628054, 141.03822722278633), (73.89259062251783, 140.78082080056308), (74.184126178074564, 140.7079369116739), (74.444885400297821, 140.64274640056252), (74.721691778076718, 140.7079369116739), (74.990477400300009, 140.7079369116739), (75.259260200301085, 140.57354551167336), (75.51173902252431, 140.39978975611712), (75.796825800303239, 140.30476271167228), (75.924319689192629, 140.26226286722766), (76.072506111415436, 140.34725973389467), (76.20000000030484, 140.30476271167228), (76.485086778083755, 140.20973284500525), (76.721261622529155, 139.9966155561155), (77.00634840030807, 139.9015885116707), (77.261339000309079, 139.81659164500368), (77.572291444754782, 140.02178977833782), (77.812699622533515, 139.9015885116707), (78.152684266979321, 139.73159477833667), (78.279060555868725, 139.26523102277926), (78.619048022536745, 139.09523728944524), (78.739252111426126, 139.03513524500056), (78.927192355871313, 139.1902671561123), (79.022222222538346, 139.09523728944524), (79.117252089205408, 139.00021024500043), (78.927192355871298, 138.78709295611068), (79.022222222538346, 138.69206308944365), (79.117252089205408, 138.59703322277659), (79.305192333650595, 138.75216513388833), (79.425396422539961, 138.69206308944365), (79.765383889207982, 138.52206935610963), (79.891760178097371, 138.05570842277442), (80.231744822543192, 137.88571468944042), (80.351948911432558, 137.82561264499572), (80.514717755877655, 137.9458167338851), (80.634921844767021, 137.88571468944042), (80.974906489212842, 137.7157209561064), (81.124992266991214, 137.29021451166025), (81.441270244770251, 137.07936628943719), (81.691307844771259, 136.91267173388096), (81.997581044772488, 136.84288382276958), (82.247618644773482, 136.67618926721335), (82.405756222551901, 136.5707651561018), (82.516401444774559, 136.40740646721227), (82.650792844775097, 136.27301506721173), (82.785184244775621, 136.13862366721119), (82.94854293366518, 136.02797844498852), (83.053967044776698, 135.86984086721012), (83.220661600332917, 135.61980326720914), (83.290449511444308, 135.31353006720789), (83.457144067000542, 135.06349246720688), (84.226270178114731, 133.9098018894245), (83.532680844778611, 135.68100033387603), (84.263492467003772, 133.85396704497984), (84.421328067004396, 133.45938086720048), (84.448015000337833, 133.00886388942089), (84.666666667005373, 132.64444444497499), (84.862235378117276, 132.3184975338626), (85.303021333674579, 132.17808068941758), (85.473015067008603, 131.83809604497176), (85.593219155897984, 131.59768786719303), (85.388018200341591, 131.28673542274734), (85.473015067008603, 131.0317448227463), (85.533117111453294, 130.85144151163448), (85.816090044787757, 130.80887675607875), (85.876189267010204, 130.62857062274472), (85.876189267010204, 128.79320613384849), (85.686132355898337, 130.60551306718907), (86.279366289234048, 129.41904802273987), (86.33946551145651, 129.29884393385049), (86.279366289234048, 129.1502652227388), (86.279366289234048, 129.01587382273826), (86.279366289234048, 128.74709102273718), (86.194369422567036, 128.46451320051384), (86.279366289234048, 128.20952260051283), (86.33946551145651, 128.029219289401), (86.597543622568665, 127.97634213384522), (86.682540489235649, 127.80634840051121), (86.843810733680755, 127.48381073384326), (86.521270244790557, 126.91936628939655), (86.682540489235649, 126.59682580050638), (86.767537355902661, 126.42683206717236), (87.000717822570266, 126.36364533383878), (87.085714689237264, 126.19365160050478), (87.20591877812663, 125.95324342272603), (86.965510600347883, 125.62770855605807), (87.085714689237264, 125.38730037827933), (87.170711555904276, 125.21730946716754), (87.403892022571867, 125.15411991161173), (87.488888889238865, 124.98412617827772), (87.609092978128245, 124.7437208227212), (87.368684800349499, 124.41818595605324), (87.488888889238865, 124.17777777827449), (87.573885755905877, 124.00778404494046), (87.831961044795804, 123.95490971160693), (87.89206308924048, 123.77460357827289), (87.977059955907478, 123.51961297827187), (87.807066222573468, 123.22324295604845), (87.89206308924048, 122.96825517826966), (87.952165133685156, 122.78794904493562), (88.210240422575083, 122.73507188937984), (88.295237289242081, 122.56507815604581), (88.355339333686771, 122.44487688937868), (88.235135244797391, 122.28210804493357), (88.295237289242081, 122.16190395604421), (88.380234155909093, 121.99191022271019), (88.613414622576698, 121.92872348937661), (88.698411489243682, 121.7587297560426), (88.758513533688372, 121.63852566715323), (88.655914467021304, 121.4830494449304), (88.698411489243682, 121.355555556041), (88.793441355910744, 121.07046877826208), (89.006558644800478, 120.8342939338167), (89.101588511467526, 120.54920715603777), (89.144085533689918, 120.42171044492615), (89.041486467022835, 120.2662342227033), (89.101588511467526, 120.14603295603617), (89.186585378134538, 119.97603922270214), (89.444660667024465, 119.92316206714638), (89.504762711469127, 119.74285593381232), (89.68825795591431, 119.19236455603235), (89.32126464480173, 117.87430211158262), (89.504762711469127, 117.32381073380265), (90.00296677813779, 115.82919853379667), (89.907936911470742, 117.81525840047128), (89.907936911470742, 116.5174595115772), (89.907936911470742, 116.35808015602102), (89.821842200359271, 114.67377793379205), (89.907936911470742, 114.50158851156914), (89.992933778137754, 114.33159477823511), (90.226114244805359, 114.26840522267932), (90.311111111472343, 114.0984114893453), (90.371213155917033, 113.97821022267816), (90.311111111472343, 113.82962868934422), (90.311111111472343, 113.69523728934369), (90.311111111472343, 113.29206308934209), (90.491417244806399, 112.84632413378473), (90.311111111472343, 112.48571468933886), (90.277820178138882, 112.41913564489415), (89.208852711467941, 112.48571468933886), (89.101588511467511, 112.48571468933886), (88.156070689241503, 112.48571468933886), (89.291645422579379, 112.3906848226718), (88.295237289242067, 112.88888888934046), (88.054831933685549, 113.00909297822984), (87.729297067017583, 112.76868480045108), (87.488888889238837, 112.88888888934046), (87.318895155904812, 112.97388575600748), (87.266020822571278, 113.2319610448974), (87.085714689237236, 113.29206308934207), (86.575733489235176, 113.46205682267609), (86.000144089232876, 113.18663897823053), (85.473015067008561, 113.29206308934207), (85.056285733673548, 113.37540895600907), (84.680221800338728, 113.61189142267668), (84.263492467003715, 113.69523728934368), (83.99992795589155, 113.74795075601055), (83.720705755890421, 113.64252664489902), (83.457144067000485, 113.69523728934368), (81.016285911435176, 114.18340835601229), (83.290096733666488, 114.09841148934528), (81.441270244770209, 114.09841148934528), (81.335961844769798, 114.09841148934528), (79.224917044761341, 114.03084748934502), (79.022222222538304, 114.09841148934528), (78.737135444759389, 114.19344135601234), (78.500960600313988, 114.40655864490208), (78.215873822535073, 114.50158851156912), (77.953409978089582, 114.58907457823615), (75.7311893780807, 114.50158851156912), (75.393651600301567, 114.50158851156912), (73.512169178071815, 114.50158851156912), (71.630686755842063, 114.50158851156912), (69.74920715583454, 114.50158851156912), (69.077247333609634, 114.50158851156912), (68.405290333606942, 114.50158851156912), (67.73333333360425, 114.50158851156912), (67.598941933603712, 114.50158851156912), (67.464550533603173, 114.50158851156912), (67.330159133602635, 114.50158851156912), (67.195767733602096, 114.50158851156912), (67.047186200268172, 114.44148646712443), (66.92698493360102, 114.50158851156912), (66.756991200267009, 114.58658537823614), (66.693801644711201, 114.81976584490374), (66.523810733599404, 114.90476271157073), (66.283402555820672, 115.02496397823788), (65.907519244708055, 114.71470297823663), (65.71745951137396, 114.90476271157073), (65.622432466929141, 114.99978975601555), (65.847115222485584, 115.3432965337947), (65.71745951137396, 115.30793691157234), (64.934140444704184, 115.09430315601593), (64.239154111368052, 114.63597991156963), (63.500000000253991, 114.30000000045719), (63.500000000253991, 114.30000000045719)]
thread_offset = 3.175
r1_ink = [80.0, 60.0]
r2_ink = [60.0, 150.0]
r1_emb = [20.0, 0.0]
r2_emb = [40.0, 180.]
def getzigzag(pts):
pts = np.array(pts)
#x, y = pts.T
# plt.plot(x, y, 'ro')
#plt.plot(x, y, 'b-')
zigzag = []
for i in range(len(pts) - 1):
d = 5.0
point1 = pts[i]
point2 = pts[i + 1]
x1, y1 = pts[i]
x2, y2 = pts[i + 1]
mid = (point1 + point2) / 2.0
mid = [mid[0], mid[1]]
perp_vector = [(y1 - y2), (x2 - x1)]
denom = np.sqrt((y1 - y2) ** 2 + (x2 - x1) ** 2)
if denom > 10000.0:
denom = 10000.0
if denom == 0:
denom = 0.000001
dist = d / denom
if dist > 10000.0:
dist = 10000.0
temp = [dist * perp_vector[0], dist * perp_vector[1]]
point3 = [point1[0] + temp[0], point1[1] + temp[1]]
point4 = [mid[0] - temp[0], mid[1] - temp[1]]
zigzag.append(point3)
zigzag.append(point4)
return zigzag
def get_theta(p1, p2):
from math import atan2, pi
dx = p2[0] - p1[0]
dy = p2[1] - p1[1]
rads = atan2(-dy, dx)
rads %= 2 * pi
return rads
r1_ink = np.array(r1_ink)
r2_ink = np.array(r2_ink)
r1_emb = np.array(r1_emb)
r2_emb = np.array(r2_emb)
pts = np.array(pts)
#plot the origianl points
x,y = pts.T
plt.plot(x, -y, 'r-')
#plot the inkscape registration points
x,y = r1_ink
plt.plot(x, -y, 'ro')
x,y = r2_ink
plt.plot(x, -y, 'r^')
#plot the embroidery registration points
x,y =np.array(r1_emb)
plt.plot(x, -y, 'mo')
x,y = np.array(r2_emb)
plt.plot(x, -y, 'm^')
#calculate length of lines
dist_1 = np.linalg.norm(r1_ink-r2_ink)
dist_2 = np.linalg.norm(r1_emb-r2_emb)
#scale should be 1...
scale_factor = dist_2/dist_1
# #scale the inkscape points
# scaled_pts = pts.copy()
# scaled_pts = scaled_pts * scale_factor
# #plot the origianl points
# x,y = scaled_pts.T
# plt.plot(x, -y, 'g-')
#find the midpoints of the registration points so we can get a true offfset
#for the translation matrix
# #midpoints
mid_1 = (r1_ink + r2_ink)/2.0
mid_2 = (r1_emb + r2_emb)/2.0
x,y =np.array(mid_1)
plt.plot(x, -y, 'ro')
x,y = np.array(mid_2)
plt.plot(x, -y, 'mo')
#translate the pts to embroidery machine points
#first move all the points to homogenius coordinates
# add a 1 column to the end of points
h_pts = np.array(pts)
temp = np.ones((len(pts),1))
h_pts = np.append(h_pts, temp, axis=1)
# identity matrix
ident = np.zeros((3,3), dtype=float)
ident[0][0]=1.0
ident[1][1]=1.0
ident[2][2]=1.0
# flipy matrix
fy = np.zeros((3,3), dtype=float)
fy[0][0]=1.0
fy[1][1]=-1.0
fy[2][2]=1
print 'flip y matrix'
print fy
# Scale Matrix
s = np.zeros((3,3), dtype=float)
s[0][0]=scale_factor
s[1][1]=scale_factor
s[2][2]=1
print 'scale matrix'
print s
# translation matrix to origin
to_dx = -mid_1[0]
to_dy = -mid_1[1]
to = np.zeros((3,3), dtype=float)
to[0][0]=1
to[0][2]=to_dx
to[1][1]=1
to[1][2]=to_dy
to[2][2]=1
# translation matrix
t_dx = mid_2[0]
t_dy = mid_2[1]
t = np.zeros((3,3), dtype=float)
t[0][0]=1
t[0][2]=t_dx
t[1][1]=1
t[1][2]=t_dy
t[2][2]=1
print 'trans matrix'
print t
r = np.zeros((3,3),dtype=float)
#find angle of first
theta_coord = get_theta(mid_1, r2_ink)
#find angle of offset
theta_offset = get_theta(mid_2, r2_emb)
#combine them and wrap around the circle
theta = (theta_coord - theta_offset) % (2 * np.pi)
print 'theta', theta
#theta = np.pi/3; #test, 60degrees
r[0][0]=np.cos(theta)
r[0][1]=-1*np.sin(theta)
r[1][0]=np.sin(theta)
r[1][1]=np.cos(theta)
r[2][2]=1
print 'rot matrix'
print r
#move points to origin
# set up like this for testing
m = ident
m = np.dot (m, to)
new_pts = []
new_h_pts = []
for h_pt in h_pts:
trans = np.reshape(h_pt,(3,1))
new_pt = np.dot(m ,trans)
pt =(new_pt[0][0]/new_pt[2][0], new_pt[1][0]/new_pt[2][0])
new_h_pt = (new_pt[0][0], new_pt[1][0], new_pt[2][0])
new_pts.append(pt)
new_h_pts.append(new_h_pt)
new_pts = np.array(new_pts)
h_pts = new_h_pts
print new_pts
x,y = new_pts.T
plt.plot(x, -y, 'y-')
#scale it at the origin
# set up like this for testing
m = ident
m = np.dot (m, s)
new_pts = []
new_h_pts = []
for h_pt in h_pts:
trans = np.reshape(h_pt,(3,1))
new_pt = np.dot(m ,trans)
pt =(new_pt[0][0]/new_pt[2][0], new_pt[1][0]/new_pt[2][0])
new_h_pt = (new_pt[0][0], new_pt[1][0], new_pt[2][0])
new_pts.append(pt)
new_h_pts.append(new_h_pt)
new_pts = np.array(new_pts)
h_pts = new_h_pts
print new_pts
x,y = new_pts.T
plt.plot(x, -y, 'y-')
#rotate it at the origin
# set up like this for testing
m = ident
m = np.dot (m, r)
new_pts = []
new_h_pts = []
for h_pt in h_pts:
trans = np.reshape(h_pt,(3,1))
new_pt = np.dot(m ,trans)
pt =(new_pt[0][0]/new_pt[2][0], new_pt[1][0]/new_pt[2][0])
new_h_pt = (new_pt[0][0], new_pt[1][0], new_pt[2][0])
new_pts.append(pt)
new_h_pts.append(new_h_pt)
new_pts = np.array(new_pts)
h_pts = new_h_pts
print new_pts
x,y = new_pts.T
plt.plot(x, -y, 'y-')
#move it to where it needs to be
# set up like this for testing
m = ident
m = np.dot (m, t)
new_pts = []
new_h_pts = []
for h_pt in h_pts:
trans = np.reshape(h_pt,(3,1))
new_pt = np.dot(m ,trans)
pt =(new_pt[0][0]/new_pt[2][0], new_pt[1][0]/new_pt[2][0])
new_h_pt = (new_pt[0][0], new_pt[1][0], new_pt[2][0])
new_pts.append(pt)
new_h_pts.append(new_h_pt)
new_pts = np.array(new_pts)
h_pts = new_h_pts
print new_pts
x,y = new_pts.T
plt.plot(x, -y, 'y-')
x,y = new_pts.T
plt.plot(x, -y, 'm-')
plt.show()
#generate and plot zigzag
# zigzag = getzigzag(new_pts)
# x,y = np.array(zigzag).T
# plt.plot(x, -y, 'b')
# #plt.plot(x, y, 'b-')
# plt.show()
| 128.032609
| 29,324
| 0.770156
| 3,999
| 35,337
| 6.75944
| 0.351338
| 0.002368
| 0.004439
| 0.00566
| 0.054789
| 0.048426
| 0.041249
| 0.039362
| 0.038252
| 0.037586
| 0
| 0.739189
| 0.080539
| 35,337
| 275
| 29,325
| 128.498182
| 0.092764
| 0.03328
| 0
| 0.370166
| 0
| 0
| 0.002246
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.016575
| null | null | 0.071823
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
8fe59fbf26f2681074c6895ad17546d3cdde9b6d
| 27
|
py
|
Python
|
tests/__init__.py
|
joesecurity/carbonblack-connector
|
040390141714ebdb92e4bc2e7938610670c83a2f
|
[
"MIT"
] | 3
|
2018-04-25T21:11:45.000Z
|
2021-04-07T06:58:42.000Z
|
tests/__init__.py
|
joesecurity/carbonblack-connector
|
040390141714ebdb92e4bc2e7938610670c83a2f
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
joesecurity/carbonblack-connector
|
040390141714ebdb92e4bc2e7938610670c83a2f
|
[
"MIT"
] | null | null | null |
from .test_bridge import *
| 13.5
| 26
| 0.777778
| 4
| 27
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148148
| 27
| 1
| 27
| 27
| 0.869565
| 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
|
8ff02bf3cb67a496d08d00a72923a6158c8facc8
| 73
|
py
|
Python
|
ntab/__init__.py
|
alexhsamuel/ntab
|
9039d0e10d0f1a86fb16a33c05c79dfb931b28ef
|
[
"MIT"
] | null | null | null |
ntab/__init__.py
|
alexhsamuel/ntab
|
9039d0e10d0f1a86fb16a33c05c79dfb931b28ef
|
[
"MIT"
] | 15
|
2017-05-10T21:46:14.000Z
|
2018-12-01T10:37:17.000Z
|
ntab/__init__.py
|
alexhsamuel/ntab
|
9039d0e10d0f1a86fb16a33c05c79dfb931b28ef
|
[
"MIT"
] | null | null | null |
from .tab import *
from . import fn
from .groupby import GroupBy
| 12.166667
| 30
| 0.671233
| 10
| 73
| 4.9
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.273973
| 73
| 5
| 31
| 14.6
| 0.924528
| 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
|
8f02c502ed9ed43d9c738699551456c9c7123470
| 41
|
py
|
Python
|
src/discordemoji/resources/__init__.py
|
PommeBleue/discord-emoji
|
af63436fc952dbeff95df34cef2a45159c91ee15
|
[
"MIT"
] | 1
|
2021-06-18T09:37:53.000Z
|
2021-06-18T09:37:53.000Z
|
src/discordemoji/resources/__init__.py
|
Tari-dev/discord-emoji
|
40548682973463a16dcf1a119992c5c8a0e84543
|
[
"MIT"
] | 1
|
2021-06-18T09:59:32.000Z
|
2021-06-23T09:03:52.000Z
|
src/discordemoji/resources/__init__.py
|
Tari-dev/discord-emoji
|
40548682973463a16dcf1a119992c5c8a0e84543
|
[
"MIT"
] | 1
|
2021-06-22T15:37:08.000Z
|
2021-06-22T15:37:08.000Z
|
from .dictionaries import emojis, sijome
| 20.5
| 40
| 0.829268
| 5
| 41
| 6.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121951
| 41
| 1
| 41
| 41
| 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
|
8f4a866241d521459606b9e1186dceeba4c8a75f
| 298
|
py
|
Python
|
cvstudio/util/__init__.py
|
haruiz/PytorchCvStudio
|
ccf79dd0cc0d61f3fd01b1b5d96f7cda7b681eef
|
[
"MIT"
] | 32
|
2019-10-31T03:10:52.000Z
|
2020-12-23T11:50:53.000Z
|
cvstudio/util/__init__.py
|
haruiz/CvStudio
|
ccf79dd0cc0d61f3fd01b1b5d96f7cda7b681eef
|
[
"MIT"
] | 19
|
2019-10-31T15:06:05.000Z
|
2020-06-15T02:21:55.000Z
|
cvstudio/util/__init__.py
|
haruiz/PytorchCvStudio
|
ccf79dd0cc0d61f3fd01b1b5d96f7cda7b681eef
|
[
"MIT"
] | 8
|
2019-10-31T03:32:50.000Z
|
2020-07-17T20:47:37.000Z
|
from .async_utilities import Worker
from .color_utilities import ColorUtilities, ColorFormat
from .file_utilities import FileUtilities
from .gui_utilities import GUIUtilities
from .img_util import ImageUtilities
from .misc_utilities import MiscUtilities
from .video_utilities import VideoUtilities
| 37.25
| 56
| 0.875839
| 36
| 298
| 7.055556
| 0.527778
| 0.354331
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.097315
| 298
| 7
| 57
| 42.571429
| 0.944238
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
8f5e5ff8e1d9ac5f64454b89aef341d22b733ed4
| 10,271
|
py
|
Python
|
tests/wrappers/test_concatenate.py
|
bosonie/aiida-optimize
|
0f05f3539078ae1ccb42ec266760f6d039af6bd2
|
[
"Apache-2.0"
] | null | null | null |
tests/wrappers/test_concatenate.py
|
bosonie/aiida-optimize
|
0f05f3539078ae1ccb42ec266760f6d039af6bd2
|
[
"Apache-2.0"
] | 22
|
2019-09-26T20:30:34.000Z
|
2021-12-08T23:32:28.000Z
|
tests/wrappers/test_concatenate.py
|
bosonie/aiida-optimize
|
0f05f3539078ae1ccb42ec266760f6d039af6bd2
|
[
"Apache-2.0"
] | 6
|
2020-08-17T05:40:32.000Z
|
2022-02-23T11:58:20.000Z
|
# -*- coding: utf-8 -*-
"""
Tests for the ConcatenateWorkChain.
"""
# pylint: disable=unused-argument,redefined-outer-name,invalid-name
import pytest
from aiida import orm
from aiida.plugins import WorkflowFactory
from aiida.engine.launch import run_get_node
from aiida_tools.process_inputs import get_fullname
from sample_processes import echo_process, Echo, EchoDictValue, EchoNestedValues # pylint: disable=import-error,useless-suppression, unused-import
def test_concatenate_basic(configure_with_daemon, echo_process):
"""
Test the ConcatenateWorkChain by chaining three basic processes.
"""
ConcatenateWorkChain = WorkflowFactory('optimize.wrappers.concatenate') # pylint: disable=invalid-name
res, node = run_get_node(
ConcatenateWorkChain,
process_labels=orm.List(
list=[
('one', get_fullname(echo_process).value),
('two', get_fullname(echo_process).value),
('three', get_fullname(echo_process).value),
]
),
process_inputs={'one': {
'x': orm.Float(1)
}},
output_input_mappings=orm.List(
list=[(('one', 'two'), {
'result': 'x'
}), (('two', 'three'), {
'result': 'x'
})]
)
)
assert node.is_finished_ok
assert 'one' in res['process_outputs']
assert 'two' in res['process_outputs']
assert 'three' in res['process_outputs']
assert 'result' in res['process_outputs']['one']
assert 'result' in res['process_outputs']['two']
assert 'result' in res['process_outputs']['three']
assert res['process_outputs']['one']['result'].value == 1
assert res['process_outputs']['two']['result'].value == 1
assert res['process_outputs']['three']['result'].value == 1
def test_concatenate_wrong_label_order(configure_with_daemon):
"""
The 'output_input_mapping' has labels in the wrong order.
"""
ConcatenateWorkChain = WorkflowFactory('optimize.wrappers.concatenate') # pylint: disable=invalid-name
with pytest.raises(ValueError) as exc:
run_get_node(
ConcatenateWorkChain,
process_labels=orm.List(
list=[
('one', get_fullname(echo_process).value),
('two', get_fullname(echo_process).value),
('three', get_fullname(echo_process).value),
]
),
process_inputs={'one': {
'x': orm.Float(1)
}},
output_input_mappings=orm.List(
list=[(('two', 'two'), {
'result': 'x'
}), (('two', 'three'), {
'result': 'x'
})]
)
)
assert 'cannot pass outputs' in str(exc.value).lower()
def test_concatenate_duplicate_label(configure_with_daemon):
"""
The 'process_labels' has a duplicate entry.
"""
ConcatenateWorkChain = WorkflowFactory('optimize.wrappers.concatenate') # pylint: disable=invalid-name
with pytest.raises(ValueError) as exc:
run_get_node(
ConcatenateWorkChain,
process_labels=orm.List(
list=[
('one', get_fullname(echo_process).value),
('one', get_fullname(echo_process).value),
('three', get_fullname(echo_process).value),
]
),
process_inputs={'one': {
'x': orm.Float(1)
}},
output_input_mappings=orm.List(
list=[(('one', 'two'), {
'result': 'x'
}), (('two', 'three'), {
'result': 'x'
})]
)
)
assert 'duplicate' in str(exc.value).lower()
assert 'process_labels' in str(exc.value).lower()
def test_concatenate_invalid_input_label(configure_with_daemon):
"""
The 'process_inputs' contains an invalid process label.
"""
ConcatenateWorkChain = WorkflowFactory('optimize.wrappers.concatenate') # pylint: disable=invalid-name
with pytest.raises(ValueError) as exc:
run_get_node(
ConcatenateWorkChain,
process_labels=orm.List(
list=[
('one', get_fullname(Echo).value),
('two', get_fullname(Echo).value),
('three', get_fullname(Echo).value),
]
),
process_inputs={
'one': {
'x': orm.Float(1)
},
'invalid_label': {
'x': orm.Float(2.)
}
},
output_input_mappings=orm.List(
list=[(('one', 'two'), {
'result': 'x'
}), (('two', 'three'), {
'result': 'x'
})]
)
)
assert "does not match any of the 'process_labels'" in str(exc.value)
def test_concatenate_invalid_mapping_label(configure_with_daemon):
"""
The 'output_input_mapping' contains an invalid process label.
"""
ConcatenateWorkChain = WorkflowFactory('optimize.wrappers.concatenate') # pylint: disable=invalid-name
with pytest.raises(ValueError) as exc:
run_get_node(
ConcatenateWorkChain,
process_labels=orm.List(
list=[
('one', get_fullname(Echo).value),
('two', get_fullname(Echo).value),
('three', get_fullname(Echo).value),
]
),
process_inputs={
'one': {
'x': orm.Float(1)
},
'two': {
'x': orm.Float(2.)
}
},
output_input_mappings=orm.List(
list=[(('one', 'two'), {
'result': 'x'
}), (('two', 'invalid_label'), {
'result': 'x'
})]
)
)
assert "process labels" in str(exc.value)
assert "do not exist" in str(exc.value)
def test_concatenate_nested_keys(configure_with_daemon):
"""Concatenate processes with nested input and output keys.
"""
ConcatenateWorkChain = WorkflowFactory('optimize.wrappers.concatenate') # pylint: disable=invalid-name
res, node = run_get_node(
ConcatenateWorkChain,
process_labels=orm.List(
list=[
('one', get_fullname(EchoNestedValues).value),
('two', get_fullname(EchoNestedValues).value),
('three', get_fullname(EchoDictValue).value),
]
),
process_inputs={
'one': {
'x': {
'y': orm.Float(1)
},
'a': {
'b': {
'c': {
'd': orm.Dict(dict=dict({'e': {
'f': 2
}}))
}
}
}
},
'three': {
'a': orm.Dict(dict={'b': {
'c': 3
}})
}
},
output_input_mappings=orm.List(
list=[
(('one', 'two'), {
'y': 'a.b.c.d:e.f',
'f': 'x.y',
}),
(('two', 'three'), {
'y': 'x',
'f': 'f.g',
}),
]
)
)
assert node.is_finished_ok
assert 'one' in res['process_outputs']
assert 'two' in res['process_outputs']
assert 'three' in res['process_outputs']
assert res['process_outputs']['one']['y'].value == 1
assert res['process_outputs']['one']['f'].value == 2
assert res['process_outputs']['two']['y'].value == 2
assert res['process_outputs']['two']['f'].value == 1
assert res['process_outputs']['three']['x'].value == 2
assert res['process_outputs']['three']['c'].value == 3
assert res['process_outputs']['three']['d']['e'].get_dict() == {'f': {'g': 1}}
def test_double_passing(configure_with_daemon):
"""Pass inputs from two preceding processes to the last one.
"""
ConcatenateWorkChain = WorkflowFactory('optimize.wrappers.concatenate') # pylint: disable=invalid-name
res, node = run_get_node(
ConcatenateWorkChain,
process_labels=orm.List(
list=[
('one', get_fullname(EchoNestedValues).value),
('two', get_fullname(EchoNestedValues).value),
('three', get_fullname(EchoDictValue).value),
]
),
process_inputs={
'one': {
'x': {
'y': orm.Float(1)
},
'a': {
'b': {
'c': {
'd': orm.Dict(dict=dict({'e': {
'f': 2
}}))
}
}
}
},
},
output_input_mappings=orm.List(
list=[
(('one', 'two'), {
'y': 'a.b.c.d:e.f',
'f': 'x.y',
}),
(('two', 'three'), {
'y': 'x',
'f': 'f.g',
}),
(('one', 'three'), {
'y': 'a:b.c'
}),
]
)
)
assert node.is_finished_ok
assert 'one' in res['process_outputs']
assert 'two' in res['process_outputs']
assert 'three' in res['process_outputs']
assert res['process_outputs']['one']['y'].value == 1
assert res['process_outputs']['one']['f'].value == 2
assert res['process_outputs']['two']['y'].value == 2
assert res['process_outputs']['two']['f'].value == 1
assert res['process_outputs']['three']['x'].value == 2
assert res['process_outputs']['three']['c'].value == 1
assert res['process_outputs']['three']['d']['e'].get_dict() == {'f': {'g': 1}}
| 31.897516
| 147
| 0.479116
| 954
| 10,271
| 4.987421
| 0.118449
| 0.06095
| 0.103615
| 0.082177
| 0.807272
| 0.796343
| 0.760404
| 0.703867
| 0.682219
| 0.682219
| 0
| 0.004678
| 0.375621
| 10,271
| 321
| 148
| 31.996885
| 0.737252
| 0.077987
| 0
| 0.691406
| 0
| 0
| 0.137916
| 0.02167
| 0
| 0
| 0
| 0
| 0.148438
| 1
| 0.027344
| false
| 0.007813
| 0.023438
| 0
| 0.050781
| 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
|
8f7f4ea8aef1da9684d4bb71223d5497ab80c3bd
| 80
|
py
|
Python
|
rlephant/__init__.py
|
axelbr/rlephant
|
d65be0b4e9d0b236368cfc215d950de2cdb73065
|
[
"MIT"
] | 2
|
2020-10-16T06:59:45.000Z
|
2020-10-25T12:54:11.000Z
|
rlephant/__init__.py
|
axelbr/rlephant
|
d65be0b4e9d0b236368cfc215d950de2cdb73065
|
[
"MIT"
] | null | null | null |
rlephant/__init__.py
|
axelbr/rlephant
|
d65be0b4e9d0b236368cfc215d950de2cdb73065
|
[
"MIT"
] | null | null | null |
from .entities import Episode, Transition
from .persistence import ReplayStorage
| 40
| 41
| 0.8625
| 9
| 80
| 7.666667
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 80
| 2
| 42
| 40
| 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
|
56bdf48d0b08639fa27d46d3cec76ae98c70a4dc
| 52
|
py
|
Python
|
aparatpy/__init__.py
|
dori-dev/aparatpy
|
42539398966ef2c30302c1b3843b9bbc19e1cb0f
|
[
"MIT"
] | 3
|
2021-12-14T19:00:04.000Z
|
2022-02-26T13:21:37.000Z
|
aparatpy/__init__.py
|
dori-dev/aparatpy
|
42539398966ef2c30302c1b3843b9bbc19e1cb0f
|
[
"MIT"
] | null | null | null |
aparatpy/__init__.py
|
dori-dev/aparatpy
|
42539398966ef2c30302c1b3843b9bbc19e1cb0f
|
[
"MIT"
] | null | null | null |
"""aparatpy init
"""
from aparatpy.main import Main
| 13
| 30
| 0.730769
| 7
| 52
| 5.428571
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134615
| 52
| 3
| 31
| 17.333333
| 0.844444
| 0.25
| 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
|
56cc3d87274535d37cc18b50ee6bdabed5732a26
| 218
|
py
|
Python
|
python/fastscore/v1/apis/__init__.py
|
modelop/fastscore-sdk
|
2206a4b9294cd83b6b8c2470193070bdc35a9061
|
[
"Apache-2.0"
] | 2
|
2018-06-05T19:14:30.000Z
|
2019-02-06T17:15:10.000Z
|
python/fastscore/v1/apis/__init__.py
|
modelop/fastscore-sdk
|
2206a4b9294cd83b6b8c2470193070bdc35a9061
|
[
"Apache-2.0"
] | 2
|
2018-02-20T21:58:43.000Z
|
2018-10-07T10:10:54.000Z
|
python/fastscore/v1/apis/__init__.py
|
modelop/fastscore-sdk
|
2206a4b9294cd83b6b8c2470193070bdc35a9061
|
[
"Apache-2.0"
] | 1
|
2017-12-29T20:38:06.000Z
|
2017-12-29T20:38:06.000Z
|
from __future__ import absolute_import
# import apis into api package
from .connect_api import ConnectApi
from .engine_api import EngineApi
from .login_api import LoginApi
from .model_manage_api import ModelManageApi
| 27.25
| 44
| 0.853211
| 31
| 218
| 5.677419
| 0.548387
| 0.204545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.123853
| 218
| 7
| 45
| 31.142857
| 0.921466
| 0.12844
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
56e09bda49ec5c32f15874eca0daf9a5610cee85
| 147
|
bzl
|
Python
|
code-examples/absl_flags_demos/third_party/common.bzl
|
storypku/storydev
|
61fbfbf665a5e6e2f1bcfdf80ce6bf21d9e28b95
|
[
"Apache-2.0"
] | 6
|
2020-06-11T08:31:48.000Z
|
2022-03-29T17:06:42.000Z
|
code-examples/absl_flags_demos/third_party/common.bzl
|
storypku/storydev
|
61fbfbf665a5e6e2f1bcfdf80ce6bf21d9e28b95
|
[
"Apache-2.0"
] | 1
|
2020-06-03T01:45:52.000Z
|
2021-07-17T14:49:53.000Z
|
code-examples/absl_flags_demos/third_party/common.bzl
|
storypku/storydev
|
61fbfbf665a5e6e2f1bcfdf80ce6bf21d9e28b95
|
[
"Apache-2.0"
] | 1
|
2022-03-30T15:41:12.000Z
|
2022-03-30T15:41:12.000Z
|
# Sanitize a dependency so that it works correctly from code that includes
# QCraft as a submodule.
def clean_dep(dep):
return str(Label(dep))
| 29.4
| 74
| 0.755102
| 24
| 147
| 4.583333
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176871
| 147
| 4
| 75
| 36.75
| 0.909091
| 0.646259
| 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
|
7102f86094b69318df0281869cc18ca0ace35b2e
| 188
|
py
|
Python
|
glove/metrics/__init__.py
|
flo3003/glove-python
|
9914dce7fa021ccd93d71074764e1aa029fce628
|
[
"Apache-2.0"
] | null | null | null |
glove/metrics/__init__.py
|
flo3003/glove-python
|
9914dce7fa021ccd93d71074764e1aa029fce628
|
[
"Apache-2.0"
] | null | null | null |
glove/metrics/__init__.py
|
flo3003/glove-python
|
9914dce7fa021ccd93d71074764e1aa029fce628
|
[
"Apache-2.0"
] | null | null | null |
from .accuracy import (read_analogy_file,
construct_analogy_test_set,
analogy_rank_score,
modified_analogy_rank_score)
| 37.6
| 51
| 0.56383
| 17
| 188
| 5.647059
| 0.705882
| 0.229167
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.404255
| 188
| 4
| 52
| 47
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.25
| 0
| 0.25
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
712993af951b64d71608d7158756c622b60e320d
| 141
|
py
|
Python
|
src/introducao/10_atributos_estaticos.py
|
SamuelPossamai/material_auxilio_conceitos_python
|
44c15e72f7409441fe0db38288dac782f0cbc94d
|
[
"MIT"
] | 1
|
2022-02-08T23:39:11.000Z
|
2022-02-08T23:39:11.000Z
|
src/introducao/10_atributos_estaticos.py
|
SamuelPossamai/material_auxilio_conceitos_python
|
44c15e72f7409441fe0db38288dac782f0cbc94d
|
[
"MIT"
] | null | null | null |
src/introducao/10_atributos_estaticos.py
|
SamuelPossamai/material_auxilio_conceitos_python
|
44c15e72f7409441fe0db38288dac782f0cbc94d
|
[
"MIT"
] | null | null | null |
class Classe:
atributo_da_classe = 0
print(Classe.atributo_da_classe)
Classe.atributo_da_classe = 5
print(Classe.atributo_da_classe)
| 14.1
| 32
| 0.801418
| 21
| 141
| 5
| 0.333333
| 0.533333
| 0.609524
| 0.838095
| 0.514286
| 0
| 0
| 0
| 0
| 0
| 0
| 0.01626
| 0.12766
| 141
| 9
| 33
| 15.666667
| 0.837398
| 0
| 0
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0.4
| 0.4
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
85ac7296a690709989167627d72b66f0c5966be9
| 61
|
py
|
Python
|
staking_bot_template/predictors/__init__.py
|
rajdua22/staking-bot-template
|
e241bae0d131a6db588eefae453b1e13b3e71b4b
|
[
"MIT"
] | null | null | null |
staking_bot_template/predictors/__init__.py
|
rajdua22/staking-bot-template
|
e241bae0d131a6db588eefae453b1e13b3e71b4b
|
[
"MIT"
] | null | null | null |
staking_bot_template/predictors/__init__.py
|
rajdua22/staking-bot-template
|
e241bae0d131a6db588eefae453b1e13b3e71b4b
|
[
"MIT"
] | null | null | null |
from staking_bot_template.predictors.example import Example
| 20.333333
| 59
| 0.885246
| 8
| 61
| 6.5
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081967
| 61
| 2
| 60
| 30.5
| 0.928571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a416eb0a7c13c4dd430e7ebde521fabfff1ae04e
| 157
|
py
|
Python
|
src/illumidesk/setup_course/constants.py
|
Abhi94N/illumidesk
|
4cf07e3bd278931ac404f7482e92a4ec35827aa9
|
[
"MIT"
] | null | null | null |
src/illumidesk/setup_course/constants.py
|
Abhi94N/illumidesk
|
4cf07e3bd278931ac404f7482e92a4ec35827aa9
|
[
"MIT"
] | null | null | null |
src/illumidesk/setup_course/constants.py
|
Abhi94N/illumidesk
|
4cf07e3bd278931ac404f7482e92a4ec35827aa9
|
[
"MIT"
] | null | null | null |
NB_GRADER_CONFIG_TEMPLATE = """
c = get_config()
c.CourseDirectory.root = '/home/{grader_name}/{course_id}'
c.CourseDirectory.course_id = '{course_id}'
"""
| 22.428571
| 58
| 0.726115
| 21
| 157
| 5.047619
| 0.571429
| 0.226415
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.089172
| 157
| 6
| 59
| 26.166667
| 0.741259
| 0
| 0
| 0
| 0
| 0
| 0.77707
| 0.522293
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 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
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a4540397fafd412a326eaf789da2331a1525fc28
| 123
|
py
|
Python
|
vega/algorithms/compression/prune_ea/__init__.py
|
qixiuai/vega
|
3e6588ea4aedb03e3594a549a97ffdb86adb88d1
|
[
"MIT"
] | 12
|
2020-12-13T08:34:24.000Z
|
2022-03-20T15:17:17.000Z
|
vega/algorithms/compression/prune_ea/__init__.py
|
JacobLee121/vega
|
19256aca4d047bfad3b461f0a927e1c2abb9eb03
|
[
"MIT"
] | 3
|
2021-03-31T20:15:40.000Z
|
2022-02-09T23:50:46.000Z
|
built-in/TensorFlow/Research/cv/image_classification/Darts_for_TensorFlow/automl/vega/algorithms/compression/prune_ea/__init__.py
|
Huawei-Ascend/modelzoo
|
df51ed9c1d6dbde1deef63f2a037a369f8554406
|
[
"Apache-2.0"
] | 2
|
2021-06-25T09:42:32.000Z
|
2021-08-06T18:00:09.000Z
|
from .prune_ea import PruneEA
from .prune_codec import PruneCodec
from .prune_trainer_callback import PruneTrainerCallback
| 30.75
| 56
| 0.878049
| 16
| 123
| 6.5
| 0.625
| 0.259615
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.097561
| 123
| 3
| 57
| 41
| 0.936937
| 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
|
a4810f511bccf14ebfab5f4d2e0f81dde0b76e0b
| 104
|
py
|
Python
|
algorithm_toolkit/views/__init__.py
|
jrmh96/algorithm_toolkit
|
4a39e26d89973c6d1e229952f46d413b93c27df9
|
[
"MIT"
] | 9
|
2019-02-25T03:41:14.000Z
|
2021-02-04T19:47:58.000Z
|
algorithm_toolkit/views/__init__.py
|
jrmh96/algorithm_toolkit
|
4a39e26d89973c6d1e229952f46d413b93c27df9
|
[
"MIT"
] | 24
|
2019-08-23T17:04:00.000Z
|
2022-03-11T23:41:08.000Z
|
algorithm_toolkit/views/__init__.py
|
jrmh96/algorithm_toolkit
|
4a39e26d89973c6d1e229952f46d413b93c27df9
|
[
"MIT"
] | 4
|
2019-03-05T02:14:20.000Z
|
2020-02-12T20:11:16.000Z
|
from flask import Blueprint
home = Blueprint('home', __name__)
manage = Blueprint('manage', __name__)
| 17.333333
| 38
| 0.75
| 12
| 104
| 5.833333
| 0.583333
| 0.371429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134615
| 104
| 5
| 39
| 20.8
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0.096154
| 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
|
a4879af7bab933b77c8aaea372c15c07c70e0afe
| 251
|
py
|
Python
|
001719StepPyStudyJr/StepPyStudyJr_lesson09_01_lists_08_pop_20210308.py
|
SafonovMikhail/python_000577
|
739f764e80f1ca354386f00b8e9db1df8c96531d
|
[
"Apache-2.0"
] | null | null | null |
001719StepPyStudyJr/StepPyStudyJr_lesson09_01_lists_08_pop_20210308.py
|
SafonovMikhail/python_000577
|
739f764e80f1ca354386f00b8e9db1df8c96531d
|
[
"Apache-2.0"
] | null | null | null |
001719StepPyStudyJr/StepPyStudyJr_lesson09_01_lists_08_pop_20210308.py
|
SafonovMikhail/python_000577
|
739f764e80f1ca354386f00b8e9db1df8c96531d
|
[
"Apache-2.0"
] | null | null | null |
students = ['Lilly', 'Olivia', 'Emily', 'Sophia']
students.pop() # ['Lilly', 'Olivia', 'Emily'] (пособие)
print(students) # ['Lilly', 'Olivia', 'Emily']
students.pop(1) # ['Lilly', 'Emily', 'Sophia'] (пособие)
print(students) # ['Lilly', 'Emily']
| 41.833333
| 57
| 0.601594
| 27
| 251
| 5.592593
| 0.333333
| 0.258278
| 0.317881
| 0.317881
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004545
| 0.123506
| 251
| 5
| 58
| 50.2
| 0.681818
| 0.498008
| 0
| 0.4
| 0
| 0
| 0.181818
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.4
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a4a4c1d37bf07c8ba604c4d2a331b77c326422b7
| 50
|
py
|
Python
|
simple_sqlite3/__init__.py
|
Ap0c/simple-sqlite3
|
c7eb98d10a4bd64e56861370f04b859d207a576f
|
[
"MIT"
] | null | null | null |
simple_sqlite3/__init__.py
|
Ap0c/simple-sqlite3
|
c7eb98d10a4bd64e56861370f04b859d207a576f
|
[
"MIT"
] | 1
|
2016-06-18T17:22:35.000Z
|
2016-06-18T17:22:35.000Z
|
simple_sqlite3/__init__.py
|
Ap0c/simple-sqlite3
|
c7eb98d10a4bd64e56861370f04b859d207a576f
|
[
"MIT"
] | null | null | null |
# ----- Imports ----- #
from .db import Database
| 12.5
| 24
| 0.54
| 5
| 50
| 5.4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 50
| 3
| 25
| 16.666667
| 0.675
| 0.38
| 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
|
f1719e245c0d0e3a3ca51f1da25c805123bd3810
| 111,476
|
py
|
Python
|
src/experiment/SeparatedVarianceSelector.py
|
MWSanders/AssociationAbacMiner
|
4792b31ea980493937db83c50f3287abf0df08b4
|
[
"Apache-2.0"
] | 2
|
2020-03-23T23:58:23.000Z
|
2022-03-16T10:26:28.000Z
|
src/experiment/SeparatedVarianceSelector.py
|
MWSanders/AssociationAbacMiner
|
4792b31ea980493937db83c50f3287abf0df08b4
|
[
"Apache-2.0"
] | null | null | null |
src/experiment/SeparatedVarianceSelector.py
|
MWSanders/AssociationAbacMiner
|
4792b31ea980493937db83c50f3287abf0df08b4
|
[
"Apache-2.0"
] | 1
|
2020-08-07T23:38:41.000Z
|
2020-08-07T23:38:41.000Z
|
import random
from collections import Counter
import pandas as pd
from sklearn.feature_extraction import DictVectorizer
from sklearn.feature_selection import *
from src.config import config
from src.job import job_utls
from src.model import RuleUtils
from pymongo import MongoClient
from src.model.ConfigurableEventNormalizer import ConfigurableEventNormalizerNg
from src.model import event_flattner
client = MongoClient('mongodb://localhost:27017', connectTimeoutMS=config.mongodb_timeout)
db = client.calp
events_collection = db.events
jobs_collection = db.abac_job_queue
possible_params2_collection = db.param_universe_info
all_fields = {'requestParameters_apigateway_createRestApiInput_description', 'requestParameters_codepipeline_pipeline_artifactStore_type', 'responseElements_group_path', 'requestParameters_ec2_customerGatewayId', 'responseElements_dBSubnetGroup_subnetGroupStatus', 'requestParameters_ec2_DescribeInstanceCreditSpecificationsRequest_InstanceId_tag', 'responseElements_image_imageId_imageTag', 'responseElements_task_desiredStatus', 'responseElements_webhookDeletedStatus', 'responseElements_userImportJob_creationDate', 'requestParameters_cognito-idp_emailVerificationSubject', 'requestParameters_waf-regional_timeWindow_endTime', 'requestParameters_ec2_instanceId', 'responseElements_group_groupName', 'responseElements_apikeyUsageplans_keyId', 'requestParameters_monitoring_alarmDescription', 'responseElements_environment_variables_bower_tmp', 'requestParameters_cognito-idp_adminCreateUserConfig_unusedAccountValidityDays', 'requestParameters_waf_nextMarker', 'requestParameters_lambda_handler', 'requestParameters_elasticloadbalancing_pageSize', 'requestParameters_ec2_domain', 'requestParameters_cognito-idp_domain', 'responseElements_repositoryMetadata_cloneUrlSsh', 'responseElements_pipelineExecution_status', 'requestParameters_ecs_count', 'responseElements_requesterId', 'requestParameters_kms_constraints_encryptionContextEquals_aws:lambda:FunctionArn', 'requestParameters_acm_maxItems', 'responseElements_deploymentUpdate_deploymentId', 'responseElements_AssociateIamInstanceProfileResponse_xmlns', 'requestParameters_ecs_serviceName', 'responseElements_methodResponses_200_methodresponseUpdate_httpMethod', 'responseElements_requestParameters_method\\u002erequest\\u002eheader\\u002eAuthorization', 'responseElements_methodResponses_200_methodresponseDelete_httpMethod', 'responseElements_group_arn', 'requestParameters_cognito-idp_clientName', 'responseElements_webACL_webACLId', 'responseElements_userPool_emailConfiguration_replyToEmailAddress', 'requestParameters_apigateway_createDomainNameInput_domainName', 'responseElements_task_taskArn', 'requestParameters_sqs_attribute_MaximumMessageSize', 'requestParameters_clouddirectory_developmentSchemaArn', 'responseElements_responseModels_application/json', 'responseElements_keyMetadata_creationDate', 'eventVersion', 'responseElements_virtualMFADevice_serialNumber', 'responseElements_pipeline_version', 'requestParameters_autoscaling_ebsOptimized', 'responseElements_methodDelete_resourceId', 'responseElements_self_apiKey', 'responseElements_userImportJob_startDate', 'responseElements_restApiId', 'requestParameters_ec2_attributeType', 'requestParameters_codepipeline_pipeline_name', 'requestParameters_rds_engineName', 'requestParameters_ec2_DescribeNatGatewaysRequest_Filter_Value_tag', 'requestParameters_lambda_environment_variables_SNS_PREFIX', 'requestParameters_elasticache_autoMinorVersionUpgrade', 'responseElements_environment_variables_ENVIRONMENT_REGION', 'responseElements_methodResponses_200_self_resourceId', 'vpcEndpointId', 'requestParameters_ec2_DeleteNatGatewayRequest_NatGatewayId', 'requestParameters_apigateway_createAuthorizerInput_type', 'requestParameters_kms_granteePrincipal', 'responseElements_functionArn', 'responseElements_integrationPut_restApiId', 'requestParameters_ec2_tenancy', 'requestParameters_cognito-idp_emailConfiguration_replyToEmailAddress', 'requestParameters_elasticmapreduce_releaseLabel', 'responseElements_sqlInjectionMatchSet_name', 'responseElements_authorizerUpdate_restApiId', 'responseElements_allocationId', 'requestParameters_kms_numberOfBytes', 'responseElements_changeToken', 'responseElements_apikeyDelete_apiKey', 'responseElements_restapiUpdate_restApiId', 'responseElements_expirationDate', 'responseElements_project_source_location', 'responseElements_methodIntegration_integrationResponses_200_integrationresponseUpdate_resourceId', 'requestParameters_monitoring_threshold', 'responseElements_integrationresponsePut_resourceId', 'additionalEventData_service', 'requestParameters_kms_encryptionContext_aws:acm:arn', 'userIdentity_accessKeyId', 'requestParameters_glue_schemaChangePolicy_deleteBehavior', 'requestParameters_glue_databaseInput_name', 'responseElements_loginProfile_userName', 'responseElements_build_buildComplete', 'responseElements_environment_variables_kmsEncryptedHookUrl', 'responseElements_keyName', 'responseElements_methodPut_restApiId', 'responseElements_mailFromDomainAttributes_DerekD@SpaceflightIndustries\\u002ecom_behaviorOnMXFailure', 'responseElements_domainName', 'responseElements_environment_variables_ROOT_PATH', 'requestParameters_ec2_gatewayId', 'responseElements_environment_variables_ES_INDEX_PREFIX', 'requestParameters_autoscaling_serviceNamespace', 'responseElements_healthCheck_healthyThreshold', 'requestParameters_sqs_attributes_VisibilityTimeout', 'requestParameters_s3_LifecycleConfiguration_Rule_Expiration_Days', 'responseElements_userImportJob_jobName', 'requestParameters_ssm_nextToken', 'requestParameters_ec2_iamInstanceProfile_name', 'responseElements_vpnConnection_customerGatewayConfiguration', 'responseElements_methodUpdate_httpMethod', 'requestParameters_lambda_environment_variables_ENVIRONMENT_REGION', 'responseElements_stageName', 'requestParameters_elasticloadbalancing_targetGroupArn', 'requestParameters_ec2_portRange_from', 'requestParameters_kms_destinationEncryptionContext_aws:acm:arn', 'requestParameters_ec2_maxResults', 'requestParameters_s3_LifecycleConfiguration_Rule_ID', 'responseElements_throttleSettings_burstLimit', 'responseElements_methodIntegration_integrationResponses_200_integrationresponseDelete_restApiId', 'responseElements_dBInstanceStatus', 'responseElements_lastModified', 'requestParameters_logs_logStreamNamePrefix', 'requestParameters_elasticmapreduce_jobFlowRole', 'requestParameters_ec2_peerVpcId', 'responseElements_location_path', 'requestParameters_rds_marker', 'requestParameters_elasticmapreduce_stepId', 'userIdentity_userName', 'requestParameters_apigateway_createDeploymentInput_stageName', 'requestParameters_lambda_memorySize', 'requestParameters_cloudformation_usePreviousTemplate', 'responseElements_methodIntegration_integrationResponses_200_integrationresponseDelete_resourceId', 'responseElements_methodDelete_restApiId', 'responseElements_methodResponses_200_self_restApiId', 'responseElements_initialCaseStatus', 'requestParameters_elasticmapreduce_instances_hadoopVersion', 'responseElements_environment_variables_REGION', 'responseElements_cacheClusterStatus', 'requestParameters_waf_metricName', 'requestParameters_ec2_subnetId', 'responseElements_distribution_distributionConfig_defaultCacheBehavior_targetOriginId', 'requestParameters_elasticache_showCacheClustersNotInReplicationGroups', 'responseElements_CreateNatGatewayResponse_natGateway_createTime', 'requestParameters_ecs_desiredStatus', 'requestParameters_cloudtrail_enableLogFileValidation', 'responseElements_taskDefinition_status', 'responseElements_usageGet_usagePlanId', 'responseElements_documentationversionByVersion_template', 'requestParameters_cloudfront_distributionConfig_webACLId', 'sourceIPAddress', 'requestParameters_apigateway_clientCertificateId', 'requestParameters_autoscaling_keyName', 'requestParameters_s3_NotificationConfiguration_TopicConfiguration_Id', 'responseElements_marker', 'requestParameters_apigateway_createDeploymentInput_description', 'requestParameters_ec2_allocationId', 'responseElements_restapiDelete_restApiId', 'requestParameters_ssm_withDecryption', 'requestParameters_support_includeResolvedCases', 'requestParameters_cloudfront_distributionConfig_logging_prefix', 'responseElements_finalCaseStatus', 'responseElements_project_description', 'requestParameters_iam_versionId', 'responseElements_service_desiredCount', 'responseElements_integrationresponseDelete_statusCode', 'requestParameters_cloudfront_invalidationBatch_paths_quantity', 'requestParameters_waf_name', 'requestParameters_ses_identityType', 'responseElements_networkAcl_networkAclId', 'responseElements_accountLimit_codeSizeUnzipped', 'requestParameters_autoscaling_defaultCooldown', 'requestParameters_lambda_environment_variables_kmsEncryptedHookUrl', 'requestParameters_cloudfront_distributionConfig_defaultRootObject', 'responseElements_vpcPeeringConnection_accepterVpcInfo_ownerId', 'requestParameters_ec2_ebsOptimized', 'responseElements_methodIntegration_self_resourceId', 'requestParameters_codepipeline_pipeline_version', 'requestParameters_config_configRule_inputParameters', 'requestParameters_ec2_imageId', 'responseElements_methodSettings_*/*_requireAuthorizationForCacheControl', 'responseElements_integrationResponses_200_integrationresponseDelete_httpMethod', 'requestParameters_apigateway_createApiKeyInput_generateDistinctId', 'responseElements_associationId', 'requestParameters_ecr_maxResults', 'responseElements_methodIntegration_integrationResponses_200_self_httpMethod', 'responseElements_stageCreate_restApiId', 'responseElements_environment_variables_bower_storage__links', 'requestParameters_config_resourceType', 'responseElements_endpoint_port', 'responseElements_gatewayresponseByType_restApiId', 'responseElements_keyMetadata_enabled', 'requestParameters_monitoring_statistic', 'requestParameters_autoscaling_nextToken', 'responseElements_methodSettings_*/*_throttlingRateLimit', 'responseElements_integrationResponses_200_statusCode', 'responseElements_project_encryptionKey', 'requestParameters_elasticache_cacheSubnetGroupDescription', 'requestParameters_kms_encryptionContext_PARAMETER_ARN', 'requestParameters_s3_ReplicationConfiguration_Role', 'requestParameters_ssm_path', 'responseElements_webACL_metricName', 'responseElements_keyFingerprint', 'requestParameters_ec2_groupId', 'requestParameters_kms_description', 'requestParameters_autoscaling_healthCheckGracePeriod', 'responseElements_healthCheck_interval', 'requestParameters_apigateway_createApiKeyInput_enabled', 'responseElements_task_launchType', 'requestParameters_apigateway_createDocumentationPartInput_location_type', 'requestParameters_cognito-idp_details_background-color', 'responseElements_deploymentDelete_restApiId', 'requestParameters_iam_serialNumber', 'responseElements_vpcPeeringConnection_vpcPeeringConnectionId', 'requestParameters_apigateway_limit', 'requestParameters_cloudfront_distributionConfig_isIPV6Enabled', 'responseElements_integrationResponses_200_integrationresponseDelete_resourceId', 'responseElements_cluster_clusterName', 'responseElements_image_repositoryName', 'requestParameters_ec2_DescribeVpcEndpointConnectionsRequest_maxResults', 'responseElements_identitySource', 'requestParameters_config_configurationRecorder_name', 'responseElements_dBSubnetGroupName', 'responseElements_dBName', 'requestParameters_kms_destinationKeyId', 'requestParameters_cloudtrail_isMultiRegionTrail', 'requestParameters_rds_allocatedStorage', 'responseElements_invalidation_invalidationBatch_callerReference', 'requestParameters_lambda_environment_variables_PRIVATE_DOMAIN', 'requestParameters_iam_policySourceArn', 'responseElements_taskDefinition_revision', 'responseElements_basepathmappingByBasePath_domainName', 'responseElements_imageId', 'responseElements_hostedZone_id', 'requestParameters_apigateway_putIntegrationInput_httpMethod', 'requestParameters_lambda_environment_variables_POD_NAME', 'responseElements_methodResponses_200_methodresponseUpdate_restApiId', 'responseElements_queryExecutionId', 'responseElements_CreateNatGatewayResponse_natGateway_state', 'responseElements_vpcPeeringConnection_accepterVpcInfo_vpcId', 'requestParameters_ecr_imageManifest', 'requestParameters_kms_constraints_encryptionContextEquals_aws:cloudfront:arn', 'responseElements_project_artifacts_packaging', 'requestParameters_iam_setAsDefault', 'requestParameters_autoscaling_minSize', 'requestParameters_clouddirectory_document', 'requestParameters_config_configRule_configRuleArn', 'requestParameters_ec2_availabilityZone', 'requestParameters_apigateway_createDomainNameInput_certificateArn', 'requestParameters_ecs_nextToken', 'responseElements_build_id', 'requestParameters_lambda_environment_variables_bower_storage__links', 'responseElements_tableDescription_tableSizeBytes', 'responseElements_dBSubnetGroup_dBSubnetGroupDescription', 'responseElements_modelByName_restApiId', 'requestParameters_cognito-idp_smsVerificationMessage', 'requestParameters_cloudfront_distributionConfig_defaultCacheBehavior_allowedMethods_cachedMethods_quantity', 'requestParameters_cloudfront_distributionConfig_enabled', 'responseElements_changeInfo_id', 'requestParameters_ses_emailAddress', 'responseElements_distribution_distributionConfig_defaultCacheBehavior_forwardedValues_cookies_forward', 'responseElements_arn', 'responseElements_subscriptionArn', 'responseElements_userImportJob_status', 'responseElements_repositoryMetadata_cloneUrlHttp', 'responseElements_ModifyVpcPeeringConnectionOptionsResponse_accepterPeeringConnectionOptions_allowDnsResolutionFromRemoteVpc', 'requestParameters_support_severityCode', 'requestParameters_ecr_force', 'requestParameters_cloudfront_distributionConfig_restrictions_geoRestriction_restrictionType', 'requestParameters_autoscaling_maxSize', 'responseElements_environment_variables_bower_storage__packages', 'requestParameters_iam_instanceProfileName', 'requestParameters_elasticloadbalancing_loadBalancerArn', 'requestParameters_events_eventPattern', 'requestParameters_apigateway_createApiKeyInput_description', 'requestParameters_elasticloadbalancing_healthCheck_interval', 'responseElements_domainnameBasepathmappings_template', 'responseElements_totalDiscoveredResources', 'requestParameters_clouddirectory_schemaArn', 'requestParameters_autoscaling_stepScalingPolicyConfiguration_adjustmentType', 'responseElements_build_sourceVersion', 'responseElements_byteMatchSet_byteMatchSetId', 'requestParameters_apigateway_createAuthorizerInput_name', 'responseElements_integrationResponses_200_integrationresponseUpdate_httpMethod', 'requestParameters_kms_targetKeyId', 'requestParameters_sqs_attributes_DelaySeconds', 'responseElements_CheckMfa', 'requestParameters_autoscaling_resourceId', 'responseElements_nextToken', 'requestParameters_ec2_routeTableId', 'responseElements_documentationpartCreate_createDocumentationPartInput_location_method', 'requestParameters_cloudfront_distributionConfig_defaultCacheBehavior_forwardedValues_cookies_forward', 'responseElements_service_serviceArn', 'requestParameters_cloudfront_distributionConfig_viewerCertificate_minimumProtocolVersion', 'requestParameters_iam_roleName', 'requestParameters_lambda_environment_variables_bower_directory', 'responseElements_vpnConnection_options_staticRoutesOnly', 'requestParameters_cloudfront_distributionConfig_comment', 'requestParameters_autoscaling_protectedFromScaleIn', 'requestParameters_waf-regional_limit', 'responseElements_usageplanById_template', 'requestParameters_cognito-idp_emailConfiguration_sourceArn', 'responseElements_internetGateway_internetGatewayId', 'responseElements_distribution_distributionConfig_defaultCacheBehavior_allowedMethods_quantity', 'responseElements_clientDownloadLandingPage', 'responseElements_integrationResponses_200_integrationresponseDelete_statusCode', 'responseElements_policyARN', 'responseElements_domainnameBasepathmappings_domainName', 'responseElements_logFileValidationEnabled', 'requestParameters_elasticmapreduce_instanceGroupId', 'responseElements_service_deploymentConfiguration_minimumHealthyPercent', 'responseElements_build_source_auth_type', 'requestParameters_ssm_resourceType', 'responseElements_distribution_distributionConfig_origins_quantity', 'responseElements_distribution_distributionConfig_defaultCacheBehavior_allowedMethods_cachedMethods_quantity', 'responseElements_userPool_id', 'requestParameters_elasticloadbalancing_healthCheckIntervalSeconds', 'responseElements_dbiResourceId', 'requestParameters_waf_xssMatchSetId', 'responseElements_pipeline_roleArn', 'requestParameters_iam_maxItems', 'requestParameters_ses_identity', 'requestParameters_ec2_noReboot', 'requestParameters_rds_numberOfLines', 'responseElements_integrationresponseUpdate_httpMethod', 'responseElements_integrationResponses_200_self_resourceId', 'requestParameters_sns_subscriptionArn', 'responseElements_cloudwatchRoleArn', 'responseElements_vpc_instanceTenancy', 'responseElements_vpcPeeringConnection_requesterVpcInfo_vpcId', 'responseElements_methodresponseDelete_statusCode', 'responseElements_userPool_name', 'requestParameters_support_attachmentId', 'responseElements_methodIntegration_integrationResponses_200_integrationresponseUpdate_statusCode', 'requestParameters_logs_limit', 'requestParameters_acm_certificateArn', 'requestParameters_datapipeline_version', 'responseElements_sparkApplicationSummary_name', 'responseElements_methodIntegration_self_restApiId', 'requestParameters_config_configurationRecorder_recordingGroup_includeGlobalResourceTypes', 'userIdentity_principalId', 'requestParameters_cognito-idp_refreshTokenValidity', 'requestParameters_apigateway_putMethodResponseInput_responseModels_image/png', 'requestParameters_ec2_instanceTenancy', 'requestParameters_config_configRule_scope_complianceResourceId', 'responseElements_build_logs_groupName', 'requestParameters_apigateway_createRestApiInput_cloneFrom', 'requestParameters_cloudtrail_trailName', 'responseElements_keyMetadata_arn', 'requestParameters_servicecatalog_pageSize', 'requestParameters_cognito-idp_adminCreateUserConfig_allowAdminCreateUserOnly', 'responseElements_distribution_distributionConfig_logging_enabled', 'responseElements_statement', 'responseElements_activity_statusCode', 'responseElements_trailARN', 'requestParameters_autoscaling_instanceId', 'responseElements_environment_variables_ES_HOST', 'requestParameters_cognito-identity_maxResults', 'responseElements_methodResponses_200_self_httpMethod', 'requestParameters_glue_databaseName', 'requestParameters_elasticloadbalancing_healthyThresholdCount', 'requestParameters_ec2_CreateNatGatewayRequest_SubnetId', 'requestParameters_cognito-idp_deviceConfiguration_challengeRequiredOnNewDevice', 'requestParameters_ssm_overwrite', 'responseElements_integrationPut_resourceId', 'requestParameters_apigateway_accepts', 'requestParameters_kms_encryptionContext_aws:s3:arn', 'responseElements_integrationResponses_200_integrationresponseUpdate_statusCode', 'requestParameters_cloudfront_ifMatch', 'requestParameters_apigateway_putIntegrationInput_requestTemplates_application/json', 'responseElements_cacheParameterGroup_cacheParameterGroupName', 'responseElements_tableDescription_provisionedThroughput_lastIncreaseDateTime', 'requestParameters_kms_requestPayer', 'requestParameters_ec2_AssociateIamInstanceProfileRequest_InstanceId', 'responseElements_apiKeyVersion', 'responseElements_stageUpdate_stageName', 'responseElements_restapiRequestValidators_restApiId', 'requestParameters_support_nextToken', 'responseElements_AssociateIamInstanceProfileResponse_iamInstanceProfileAssociation_iamInstanceProfile_id', 'responseElements_mailFromDomainAttributes_derekd@spaceflightindustries\\u002ecom_behaviorOnMXFailure', 'requestParameters_ec2_disableApiTermination_value', 'requestParameters_codepipeline_transitionType', 'requestParameters_cloudfront_distributionConfig_customErrorResponses_quantity', 'requestParameters_sqs_queueUrl', 'requestParameters_datapipeline_uniqueId', 'requestParameters_kms_keyId', 'requestParameters_ec2_associationId', 'responseElements_changeInfo_comment', 'requestParameters_logs_logStreamName', 'requestParameters_datapipeline_status', 'requestParameters_s3_WebsiteConfiguration_xmlns', 'requestParameters_route53domains_sort', 'requestParameters_route53_maxItems', 'requestParameters_s3_NotificationConfiguration_xmlns', 'requestParameters_kms_constraints_encryptionContextEquals_aws:acm:arn', 'requestParameters_waf_iPSetId', 'responseElements_ModifyVpcPeeringConnectionOptionsResponse_xmlns', 'responseElements_methodResponses_200_methodresponseDelete_restApiId', 'requestParameters_cloudfront_invalidationBatch_callerReference', 'requestParameters_ecs_family', 'eventName', 'responseElements_userPool_adminCreateUserConfig_unusedAccountValidityDays', 'requestParameters_s3_AccessControlPolicy_AccessControlList_Grant_Grantee_DisplayName', 'requestParameters_sns_nextToken', 'requestParameters_elasticmapreduce_logUri', 'requestParameters_cognito-idp_poolName', 'responseElements_methodIntegration_integrationResponses_200_statusCode', 'additionalEventData', 'responseElements_build_source_type', 'responseElements_userPoolUIConfiguration_lastModifiedDate', 'responseElements_identityPoolName', 'requestParameters_ecs_status', 'requestParameters_codebuild_payerId', 'requestParameters_ec2_DescribeSecurityGroupReferencesRequest_GroupId_tag', 'requestParameters_codepipeline_pipeline_artifactStore_location', 'responseElements_authorizerId', 'requestParameters_lambda_code_s3Bucket', 'requestParameters_elasticloadbalancing_loadBalancerAttributes_connectionDraining_enabled', 'responseElements_customerGateway_ipAddress', 'requestParameters_ec2_networkAclId', 'responseElements_accountUsage_totalCodeSize', 'responseElements_integrationResponses_200_integrationresponseUpdate_restApiId', 'responseElements_role_assumeRolePolicyDocument', 'requestParameters_lambda_functionVersion', 'responseElements_integrationUpdate_restApiId', 'responseElements_documentationpartCreate_createDocumentationPartInput_properties', 'requestParameters_lambda_environment_variables_SERVICE', 'responseElements_vpnConnection_vpnGatewayId', 'responseElements_methodIntegration_integrationUpdate_resourceId', 'requestParameters_waf_byteMatchSetId', 'responseElements_usageplanDelete_usagePlanId', 'requestParameters_waf-regional_resourceArn', 'responseElements_integrationResponses_200_responseParameters_method\\u002eresponse\\u002eheader\\u002eAccess-Control-Allow-Origin', 'responseElements_methodIntegration_integrationDelete_httpMethod', 'requestParameters_ec2_DescribeVpcEndpointServiceConfigurationsRequest_maxResults', 'requestParameters_ecs_taskDefinition', 'requestParameters_cloudtrail_nextToken', 'requestParameters_athena_maxResults', 'responseElements_distribution_distributionConfig_comment', 'requestParameters_ec2_DescribeHostsRequest_Filter_Value_content', 'requestParameters_apigateway_createDeploymentInput_stageDescription', 'responseElements_loadBalancerAttributes_connectionSettings_idleTimeout', 'requestParameters_cognito-idp_details_image-key', 'responseElements_cACertificateIdentifier', 'requestParameters_cognito-sync_identityPoolId', 'requestParameters_cloudfront_distributionConfig_defaultCacheBehavior_targetOriginId', 'responseElements_self_template', 'requestParameters_ssm_maxResults', 'requestParameters_elasticloadbalancing_protocol', 'requestParameters_lambda_environment_variables_POOLID', 'responseElements_keyMaterial', 'responseElements_integrationresponseUpdate_restApiId', 'responseElements_loadBalancerAttributes_crossZoneLoadBalancing_enabled', 'responseElements_uICustomization_lastModifiedDate', 'requestParameters_elasticache_cacheNodeType', 'requestParameters_s3_VersioningConfiguration_xmlns', 'responseElements_environment_variables_LOG_LEVEL', 'requestParameters_cognito-idp_clientId', 'requestParameters_config_deliveryChannelName', 'responseElements_basepathmappingDelete_basePath', 'responseElements_build_buildStatus', 'responseElements_environment_variables_slackChannel', 'userIdentity_type', 'requestParameters_ec2_networkInterfaceId', 'responseElements_tableDescription_provisionedThroughput_readCapacityUnits', 'requestParameters_rds_sourceType', 'responseElements_distribution_distributionConfig_webACLId', 'requestParameters_autoscaling_roleARN', 'requestParameters_apigateway_createApiKeyInput_name', 'responseElements_usageplanUpdate_usagePlanId', 'responseElements_distribution_distributionConfig_defaultCacheBehavior_compress', 'requestParameters_autoscaling_endTime', 'requestParameters_ssm_resourceId', 'responseElements_mailFromDomainAttributes_dev\\u002ealertwhere\\u002ecom_behaviorOnMXFailure', 'responseElements_methodSettings_*/*_metricsEnabled', 'requestParameters_sns_protocol', 'requestParameters_ecr_partFirstByte', 'requestParameters_rds_listSupportedCharacterSets', 'responseElements_userPool_policies_passwordPolicy_requireLowercase', 'responseElements_integrationResponses_200_responseTemplates_application/json', 'requestParameters_cloudfront_distributionConfig_viewerCertificate_certificate', 'requestParameters_elasticache_duration', 'responseElements_credentials_expiration', 'requestParameters_config_deliveryChannel_s3BucketName', 'responseElements_methodresponsePut_httpMethod', 'responseElements_methodByHttpMethod_restApiId', 'responseElements_CreateNatGatewayResponse_requestId', 'requestParameters_apigateway_createDocumentationPartInput_properties', 'requestParameters_route53_hostedZoneId', 'requestParameters_cognito-idp_jobId', 'requestParameters_ec2_DescribeSecurityGroupReferencesRequest_GroupId_content', 'requestParameters_ec2_DescribeNatGatewaysRequest_Filter_Value_content', 'responseElements_storageType', 'responseElements_build_logs_deepLink', 'responseElements_methodUpdate_resourceId', 'responseElements_pendingModifiedValues_masterUserPassword', 'responseElements_service_runningCount', 'responseElements_rule_metricName', 'responseElements_activity_details', 'responseElements_methodResponses_200_self_statusCode', 'requestParameters_rds_dBInstanceIdentifier', 'requestParameters_cloudtrail_includeGlobalServiceEvents', 'responseElements_taskDefinition_family', 'responseElements_tableDescription_tableId', 'requestParameters_logs_logGroupName', 'responseElements_activity_autoScalingGroupName', 'responseElements_methodIntegration_integrationResponses_200_integrationresponseUpdate_restApiId', 'responseElements_methodIntegration_integrationresponsePut_httpMethod', 'responseElements_preferredMaintenanceWindow', 'responseElements_task_connectivityAt', 'responseElements_stackId', 'responseElements_project_source_type', 'requestParameters_config_configRule_description', 'responseElements_authorizerUri', 'responseElements_resourceById_restApiId', 'responseElements_stageFlushAuthorizerCache_restApiId', 'responseElements_DeleteNatGatewayResponse_natGatewayId', 'responseElements_userPoolClient_clientSecret', 'responseElements_distribution_inProgressInvalidationBatches', 'responseElements_endpoint_address', 'responseElements_user_createDate', 'requestParameters_monitoring_metricName', 'responseElements_build_startTime', 'requestParameters_logs_filterName', 'responseElements_userPool_deviceConfiguration_challengeRequiredOnNewDevice', 'responseElements_path', 'requestParameters_ecs_clusterName', 'responseElements_methodIntegration_httpMethod', 'responseElements_role_createDate', 'responseElements_usageplankeyDelete_keyId', 'requestParameters_config_configRule_maximumExecutionFrequency', 'userIdentity_invokedBy', 'responseElements_ExitRole', 'responseElements_task_version', 'responseElements_requestId', 'responseElements_pipelineExecution_pipelineVersion', 'responseElements_accessKey_accessKeyId', 'responseElements_methodSettings_*/*_dataTraceEnabled', 'responseElements_ModifyVpcPeeringConnectionOptionsResponse_requesterPeeringConnectionOptions_allowDnsResolutionFromRemoteVpc', 'responseElements_restapiGatewayResponses_restApiId', 'requestParameters_elasticloadbalancing_healthCheck_healthyThreshold', 'requestParameters_config_limit', 'responseElements_dBSubnetGroup_dBSubnetGroupName', 'requestParameters_cloudformation_stackName', 'requestParameters_elasticloadbalancing_port', 'errorCode', 'requestParameters_apigateway_includeValue', 'requestParameters_elasticmapreduce_autoScalingRole', 'requestParameters_ses_snsTopic', 'responseElements_rule_ruleId', 'userIdentity_sessionContext_attributes_mfaAuthenticated', 'responseElements_ConsoleLogin', 'requestParameters_apigateway_stageName', 'requestParameters_ec2_internetGatewayId', 'responseElements_customerGateway_type', 'responseElements_task_stoppedReason', 'requestParameters_elasticloadbalancing_matcher_httpCode', 'responseElements_keyMetadata_aWSAccountId', 'requestParameters_lambda_environment_variables_bower_save', 'responseElements_cluster_clusterArn', 'responseElements_self_title', 'responseElements_basepathmappingDelete_domainName', 'requestParameters_ec2_AssociateIamInstanceProfileRequest_IamInstanceProfile_Name', 'responseElements_methodresponseDelete_resourceId', 'requestParameters_lambda_environment_variables_bower_tmp', 'responseElements_basepathmappingCreate_domainName', 'responseElements_autoMinorVersionUpgrade', 'requestParameters_kinesis_streamName', 'responseElements_repositoryId', 'responseElements_methodIntegration_integrationResponses_200_self_statusCode', 'responseElements_task_clusterArn', 'requestParameters_kms_origin', 'responseElements_environment_variables_PRIVATE_DOMAIN', 'responseElements_userPool_policies_passwordPolicy_minimumLength', 'requestParameters_lightsail_includeAvailabilityZones', 'requestParameters_apigateway_putIntegrationInput_requestParameters_integration\\u002erequest\\u002epath\\u002eproxy', 'responseElements_invalidation_id', 'responseElements_environment_variables_SNS_PREFIX', 'responseElements_integrationResponses_200_self_restApiId', 'requestParameters_elasticloadbalancing_loadBalancerAttributes_connectionSettings_idleTimeout', 'requestParameters_events_name', 'responseElements_hostedZone_resourceRecordSetCount', 'responseElements_keyMetadata_keyId', 'requestParameters_apigateway_modelName', 'requestParameters_lambda_publish', 'requestParameters_s3_NotificationConfiguration_TopicConfiguration_Topic', 'requestParameters_glue_name', 'requestID', 'responseElements_assumedRoleUser_assumedRoleId', 'responseElements_clientCertificateId', 'requestParameters_apigateway_parameters_extensions', 'responseElements_userPool_lambdaConfig_postConfirmation', 'requestParameters_sqs_attributes_ReceiveMessageWaitTimeSeconds', 'responseElements_CreateNatGatewayResponse_natGateway_subnetId', 'responseElements_repositoryName', 'responseElements_integrationResponses_200_integrationresponseUpdate_resourceId', 'responseElements_vPC_vPCId', 'responseElements_vpnConnection_customerGatewayId', 'responseElements_requestParameters_integration\\u002erequest\\u002epath\\u002eproxy', 'requestParameters_elasticmapreduce_instances_terminationProtected', 'responseElements_jobFlowId', 'responseElements_responseParameters_method\\u002eresponse\\u002eheader\\u002eAccess-Control-Allow-Headers', 'requestParameters_autoscaling_policyName', 'requestParameters_logs_retentionInDays', 'responseElements_task_createdAt', 'responseElements_methodresponseDelete_httpMethod', 'responseElements_CreateNatGatewayResponse_clientToken', 'requestParameters_iam_pathPrefix', 'requestParameters_apigateway_createUsagePlanInput_description', 'requestParameters_elasticmapreduce_marker', 'responseElements_AssociateIamInstanceProfileResponse_iamInstanceProfileAssociation_instanceId', 'responseElements_methodresponseUpdate_httpMethod', 'responseElements_pathPart', 'requestParameters_ec2_volumeId', 'responseElements_tableDescription_provisionedThroughput_lastDecreaseDateTime', 'responseElements_distribution_distributionConfig_restrictions_geoRestriction_restrictionType', 'requestParameters_dynamodb_provisionedThroughput_writeCapacityUnits', 'responseElements_networkAcl_vpcId', 'requestParameters_apigateway_body_bigEndian', 'requestParameters_ec2_vpnConnectionId', 'requestParameters_sns_endpoint', 'requestParameters_lambda_marker', 'responseElements_responseParameters_method\\u002eresponse\\u002eheader\\u002eAccess-Control-Allow-Origin', 'responseElements_uICustomization_creationDate', 'responseElements_pemEncodedCertificate', 'requestParameters_ecs_sort', 'requestParameters_rds_sourceIdentifier', 'requestParameters_athena_clientRequestToken', 'responseElements_policyVersion_isDefaultVersion', 'requestParameters_ecs_deploymentConfiguration_minimumHealthyPercent', 'requestParameters_apigateway_createAuthorizerInput_identitySource', 'requestParameters_s3_ReplicationConfiguration_Rule_Status', 'responseElements_methodSettings_*/*_cacheTtlInSeconds', 'requestParameters_ec2_userData', 'responseElements_gatewayresponseByType_template', 'responseElements_deploymentUpdate_restApiId', 'requestParameters_apigateway_createUsagePlanKeyInput_keyId', 'responseElements_sizeConstraintSet_sizeConstraintSetId', 'requestParameters_lambda_functionName', 'requestParameters_ec2_startTime', 'requestParameters_apigateway_parameters_endpointConfigurationTypes', 'requestParameters_ec2_vpnGatewayId', 'responseElements_service_status', 'responseElements_changeInfo_submittedAt', 'responseElements_build_environment_computeType', 'requestParameters_ec2_DescribeVpcEndpointConnectionNotificationsRequest_maxResults', 'responseElements_stageDelete_stageName', 'requestParameters_support_issueType', 'responseElements_statusCode', 'responseElements_userPoolClient_creationDate', 'responseElements_self_name', 'responseElements_pipelineId', 'requestParameters_waf_defaultAction_type', 'responseElements_dBInstanceClass', 'requestParameters_route53_startRecordType', 'requestParameters_ssm_description', 'responseElements_engineVersion', 'responseElements_methodResponses_200_methodresponseUpdate_resourceId', 'responseElements_instanceProfile_createDate', 'responseElements_dBSubnetGroup_vpcId', 'requestParameters_waf_sqlInjectionMatchSetId', 'requestParameters_ec2_destinationCidrBlock', 'requestParameters_events_event', 'responseElements_pipeline_artifactStore_location', 'requestParameters_elasticloadbalancing_loadBalancerName', 'requestParameters_events_state', 'requestParameters_apigateway_exportType', 'responseElements_user_userId', 'requestParameters_iam_accessKeyId', 'responseElements_self_stageName', 'requestParameters_route53_resourceType', 'responseElements_routeTable_vpcId', 'requestParameters_sns_attributeName', 'requestParameters_cognito-idp_lambdaConfig_customMessage', 'requestParameters_waf-regional_maxItems', 'requestParameters_config_deliveryChannel_s3KeyPrefix', 'responseElements_instanceProfile_arn', 'responseElements_gatewayresponsePut_template', 'responseElements_AssociateIamInstanceProfileResponse_requestId', 'responseElements_distribution_distributionConfig_viewerCertificate_sSLSupportMethod', 'requestParameters_ec2_portRange_to', 'requestParameters_sqs_attribute_ReceiveMessageWaitTimeSeconds', 'requestParameters_apigateway_putIntegrationInput_uri', 'responseElements_self_clientCertificateId', 'responseElements_environment_variables_POD_NAME', 'responseElements_dBParameterGroupArn', 'requestParameters_config_deliveryChannel_name', 'responseElements_distribution_distributionConfig_enabled', 'requestParameters_waf-regional_webACLId', 'requestParameters_ec2_fromPort', 'responseElements_methodIntegration_integrationDelete_restApiId', 'responseElements_loginProfile_passwordResetRequired', 'responseElements_methodIntegration_integrationresponsePut_restApiId', 'responseElements_userImportJob_userPoolId', 'responseElements_image_imageManifest', 'requestParameters_rds_logFileName', 'responseElements_restapiDeployments_template', 'responseElements_repositoryMetadata_repositoryId', 'requestParameters_sqs_queueName', 'requestParameters_cloudformation_roleARN', 'requestParameters_s3_ReplicationConfiguration_Rule_Destination_AccessControlTranslation_Owner', 'requestParameters_s3_ReplicationConfiguration_Rule_Destination_StorageClass', 'responseElements_distribution_distributionConfig_viewerCertificate_aCMCertificateArn', 'requestParameters_cognito-idp_adminCreateUserConfig_inviteMessageTemplate_sMSMessage', 'requestParameters_elasticache_maxRecords', 'responseElements_build_logs_streamName', 'responseElements_mailFromDomainAttributes_matts@spaceflightindustries\\u002ecom_behaviorOnMXFailure', 'requestParameters_waf-regional_xssMatchSetId', 'responseElements_task_memory', 'responseElements_resourceDelete_resourceId', 'requestParameters_ec2_natGatewayId', 'requestParameters_rds_includePublic', 'responseElements_policy_updateDate', 'responseElements_modelCreate_restApiId', 'requestParameters_support_language', 'responseElements_userPoolClient_clientId', 'requestParameters_sqs_attribute_MessageRetentionPeriod', 'requestParameters_cloudfront_distributionConfig_defaultCacheBehavior_viewerProtocolPolicy', 'awsRegion', 'requestParameters_s3_NotificationConfiguration_CloudFunctionConfiguration_Id', 'requestParameters_ecs_familyPrefix', 'requestParameters_ec2_DescribeEgressOnlyInternetGatewaysRequest_MaxResults', 'requestParameters_codebuild_userArn', 'requestParameters_glue_role', 'responseElements_runtime', 'requestParameters_ec2_attribute', 'responseElements_caseId', 'responseElements_distribution_distributionConfig_httpVersion', 'responseElements_userPoolUIConfiguration_details_ALL_image-key', 'requestParameters_lambda_tags_Environment', 'requestParameters_ec2_attachmentId', 'responseElements_task_startedAt', 'requestParameters_autoscaling_scalableDimension', 'requestParameters_ec2_groupName', 'responseElements_assumedRoleUser_arn', 'requestParameters_ecs_startedBy', 'requestParameters_codepipeline_pipelineName', 'responseElements_stageUpdate_restApiId', 'responseElements_resourceCreateChild_restApiId', 'requestParameters_s3_bucketName', 'responseElements_pipelineExecutionId', 'requestParameters_ses_domain', 'requestParameters_cognito-idp_jobName', 'requestParameters_lambda_tracingConfig_mode', 'responseElements_task_connectivity', 'requestParameters_organizations_filter_actionType', 'responseElements_vpcConfig_vpcId', 'requestParameters_autoscaling_adjustmentType', 'apiVersion', 'requestParameters_cloudfront_resource', 'requestParameters_apigateway_createResourceInput_pathPart', 'requestParameters_cognito-idp_mfaConfiguration', 'requestParameters_ec2_toPort', 'responseElements_integrationPut_httpMethod', 'requestParameters_elasticmapreduce_ebsRootVolumeSize', 'responseElements_instanceProfile_instanceProfileId', 'requestParameters_ec2_instanceInitiatedShutdownBehavior', 'responseElements_documentationversionCreate_restApiId', 'requestParameters_cloudfront_distributionConfig_viewerCertificate_sSLSupportMethod', 'requestParameters_servicecatalog_sortOrder', 'requestParameters_rds_engine', 'requestParameters_s3_ReplicationConfiguration_Rule_Destination_Account', 'responseElements_modelCreate_createModelInput_name', 'requestParameters_elasticache_showNodeGroupConfig', 'requestParameters_cognito-idp_policies_passwordPolicy_requireSymbols', 'responseElements_subnet_vpcId', 'responseElements_documentationpartUpdate_restApiId', 'requestParameters_ssm_recursive', 'responseElements_capabilitiesReason', 'responseElements_environment_variables_ENVIRONMENT_NAME', 'responseElements_lastUpdatedDate', 'requestParameters_apigateway_failOnWarnings', 'responseElements_taskDefinition_taskDefinitionArn', 'responseElements_uICustomization_cSS', 'requestParameters_cloudtrail_resourceId', 'responseElements_distribution_distributionConfig_priceClass', 'requestParameters_apigateway_parameters_failonwarnings', 'responseElements_publishedSchemaArn', 'requestParameters_s3_NotificationConfiguration_QueueConfiguration_Filter_S3Key_FilterRule_Name', 'requestParameters_route53_vPC_vPCId', 'responseElements_documentationpartCreate_createDocumentationPartInput_location_type', 'requestParameters_ec2_DescribeStaleSecurityGroupsRequest_MaxResults', 'responseElements_subnet_subnetId', 'responseElements_methodresponsePut_resourceId', 'requestParameters_ses_policyName', 'responseElements_customerGateway_bgpAsn', 'requestParameters_events_limit', 'responseElements_licenseModel', 'responseElements_id', 'requestParameters_lambda_includeDeprecatedFeaturesAccess', 'requestParameters_ec2_DescribeHostsRequest_Filter_Value_tag', 'requestParameters_acm_domainName', 'requestParameters_elasticache_showCacheNodeInfo', 'responseElements_basepathmappingByBasePath_template', 'responseElements_distribution_distributionConfig_defaultCacheBehavior_defaultTTL', 'responseElements_distribution_distributionConfig_defaultRootObject', 'requestParameters_events_description', 'responseElements_environment_variables_bower_save', 'requestParameters_apigateway_putIntegrationInput_contentHandling', 'requestParameters_config_configRule_configRuleId', 'responseElements_s3BucketName', 'responseElements_policy_policyId', 'responseElements_resourceCreateChild_parentId', 'responseElements_attachmentSetId', 'requestParameters_waf-regional_sizeConstraintSetId', 'requestParameters_waf-regional_timeWindow_startTime', 'userIdentity_arn', 'responseElements_environment_variables_BUCKET', 'responseElements_DeleteNatGatewayResponse_requestId', 'responseElements_methodResponses_200_methodresponseUpdate_statusCode', 'responseElements_project_artifacts_location', 'responseElements_methodresponseUpdate_restApiId', 'requestParameters_inspector_maxResults', 'requestParameters_autoscaling_policyType', 'responseElements_project_name', 'responseElements_pipeline_name', 'requestParameters_ecr_filter_tagStatus', 'responseElements_cluster_status', 'requestParameters_rds_dBParameterGroupFamily', 'requestParameters_elasticloadbalancing_healthCheck_timeout', 'requestParameters_apigateway_putMethodResponseInput_responseModels_application/json', 'responseElements_policyVersion_createDate', 'requestParameters_ssm_value', 'responseElements_build_initiator', 'responseElements_includeGlobalServiceEvents', 'responseElements_deploymentStages_deploymentId', 'requestParameters_codecommit_sortBy', 'requestParameters_s3_AccessControlPolicy_xmlns', 'requestParameters_support_serviceCode', 'requestParameters_ecr_imageTag', 'responseElements_documentationpartById_restApiId', 'requestParameters_datapipeline_limit', 'requestParameters_lambda_codeSha256', 'requestParameters_lambda_qualifier', 'responseElements_service_taskDefinition', 'requestParameters_dynamodb_resourceArn', 'responseElements_requestvalidatorById_template', 'responseElements_apikeyUpdate_apiKey', 'responseElements_sparkApplicationSummary_id', 'responseElements_responseParameters_method\\u002eresponse\\u002eheader\\u002eAccess-Control-Allow-Methods', 'requestParameters_iam_path', 'responseElements_cacheSubnetGroupDescription', 'requestParameters_ecr_repositoryName', 'responseElements_distribution_distributionConfig_defaultCacheBehavior_viewerProtocolPolicy', 'requestParameters_ec2_options_staticRoutesOnly', 'responseElements_methodIntegration_integrationresponsePut_template', 'responseElements_distribution_distributionConfig_viewerCertificate_certificate', 'responseElements_vpcPeeringConnection_requesterVpcInfo_ownerId', 'requestParameters_kms_destinationEncryptionContext_aws:cloudfront:arn', 'requestParameters_cloudformation_disableRollback', 'requestParameters_elasticloadbalancing_unhealthyThresholdCount', 'requestParameters_waf-regional_changeToken', 'responseElements_stageFlushAuthorizerCache_stageName', 'requestParameters_cloudtrail_startTime', 'responseElements_self_resourceId', 'responseElements_userPool_adminCreateUserConfig_allowAdminCreateUserOnly', 'requestParameters_servicecatalog_sortBy', 'requestParameters_elasticache_cacheSubnetGroupName', 'responseElements_project_environment_privilegedMode', 'requestParameters_ssm_type', 'requestParameters_lambda_environment_variables_bower_storage__registry', 'responseElements_methodIntegration_integrationResponses_200_integrationresponseDelete_httpMethod', 'responseElements_type', 'requestParameters_apigateway_apiKey', 'responseElements_invalidation_createTime', 'requestParameters_cognito-idp_policies_passwordPolicy_requireLowercase', 'requestParameters_rds_engineVersion', 'requestParameters_cognito-idp_lambdaConfig_defineAuthChallenge', 'responseElements_integrationresponsePut_template', 'responseElements_clientcertificateUpdate_clientCertificateId', 'requestParameters_elasticmapreduce_name', 'requestParameters_waf_maxItems', 'requestParameters_apigateway_body_limit', 'requestParameters_elasticloadbalancing_name', 'responseElements_vpnGateway_vpnGatewayId', 'requestParameters_lambda_code_s3Key', 'requestParameters_codepipeline_maxResults', 'responseElements_AssociateIamInstanceProfileResponse_iamInstanceProfileAssociation_iamInstanceProfile_arn', 'responseElements_project_created', 'requestParameters_ssm_keyId', 'requestParameters_apigateway_parentId', 'responseElements_integrationResponses_200_responseParameters_method\\u002eresponse\\u002eheader\\u002eAccess-Control-Allow-Methods', 'userAgent', 'responseElements_documentationversionByVersion_restApiId', 'requestParameters_ec2_DescribeHostsRequest_Filter_Name', 'responseElements_registryId', 'responseElements_isMultiRegionTrail', 'responseElements_environment_variables_DYNAMODB_PREFIX', 'responseElements_uICustomization_imageUrl', 'responseElements_policyVersion_document', 'responseElements_methodIntegration_uri', 'requestParameters_config_configRuleName', 'responseElements_AssociateIamInstanceProfileResponse_iamInstanceProfileAssociation_associationId', 'responseElements_repository_registryId', 'requestParameters_autoscaling_vPCZoneIdentifier', 'requestParameters_logs_roleArn', 'requestParameters_s3_NotificationConfiguration_QueueConfiguration_Queue', 'responseElements_dBInstanceArn', 'requestParameters_cognito-idp_imageFile_limit', 'requestParameters_lambda_runtime', 'responseElements_codeSize', 'responseElements_userPoolUIConfiguration_creationDate', 'requestParameters_route53_id', 'responseElements_authType', 'responseElements_userImportJob_jobId', 'responseElements_vpcPeeringConnection_requesterVpcInfo_cidrBlock', 'responseElements_integrationresponseDelete_restApiId', 'responseElements_clientcertificateDelete_clientCertificateId', 'responseElements_basepathmappingUpdate_basePath', 'responseElements_user_path', 'requestParameters_monitoring_alarmName', 'requestParameters_iam_userName', 'responseElements_xssMatchSet_name', 'requestParameters_apigateway_resourceId', 'responseElements_build_environment_privilegedMode', 'responseElements_repositoryMetadata_creationDate', 'additionalEventData_SwitchFrom', 'responseElements_methodResponses_200_self_title', 'responseElements_version', 'requestParameters_iam_status', 'responseElements_dNSName', 'responseElements_webACL_name', 'requestParameters_cognito-idp_cloudWatchLogsRoleArn', 'requestParameters_s3_NotificationConfiguration_CloudFunctionConfiguration_CloudFunction', 'responseElements_tableDescription_creationDateTime', 'responseElements_accountLimit_totalCodeSize', 'requestParameters_es_elasticsearchVersion', 'requestParameters_elasticmapreduce_clusterId', 'responseElements_project_cache_type', 'responseElements_methodIntegration_integrationResponses_200_self_title', 'requestParameters_cloudtrail_name', 'responseElements_methodPut_template', 'requestParameters_waf_sizeConstraintSetId', 'requestParameters_apigateway_basePath', 'responseElements_vpcPeeringConnection_status_code', 'responseElements_repository_repositoryArn', 'requestParameters_lambda_resource', 'requestParameters_lambda_environment_variables_ENVIRONMENT_NAME', 'responseElements_integrationResponses_200_responseParameters_method\\u002eresponse\\u002eheader\\u002eAccess-Control-Allow-Headers', 'responseElements_modelCreate_createModelInput_schema', 'responseElements_usageGet_startDate', 'requestParameters_cloudfront_distributionConfig_viewerCertificate_cloudFrontDefaultCertificate', 'requestParameters_waf_webAclId', 'responseElements_role_arn', 'responseElements_vPC_vPCRegion', 'requestParameters_elasticmapreduce_visibleToAllUsers', 'requestParameters_cognito-idp_maxResults', 'responseElements_deploymentDelete_deploymentId', 'responseElements_documentationpartImport_restApiId', 'requestParameters_waf-regional_webAclId', 'responseElements_integrationresponseUpdate_statusCode', 'requestParameters_waf-regional_sqlInjectionMatchSetId', 'requestParameters_autoscaling_maxResults', 'requestParameters_iam_marker', 'responseElements_vpc_vpcId', 'requestParameters_ec2_disableApiTermination', 'responseElements_DeleteNatGatewayResponse_xmlns', 'requestParameters_config_configurationRecorder_roleARN', 'requestParameters_monitoring_treatMissingData', 'requestParameters_lambda_ignored', 'requestParameters_lambda_environment_variables_HookUrl', 'responseElements_requestParameters_method\\u002erequest\\u002epath\\u002eproxy', 'requestParameters_rds_storageType', 'responseElements_tags_Environment', 'requestParameters_rds_dBParameterGroupName', 'responseElements_task_startedBy', 'requestParameters_elasticloadbalancing_healthCheck_target', 'requestParameters_apigateway_putMethodInput_authorizationType', 'requestParameters_cloudfront_distributionConfig_viewerCertificate_aCMCertificateArn', 'requestParameters_elasticmapreduce_applicationId', 'responseElements_vpnGateway_type', 'responseElements_vpc_cidrBlock', 'requestParameters_ec2_ModifyVpcPeeringConnectionOptionsRequest_RequesterPeeringConnectionOptions_AllowDnsResolutionFromRemoteVpc', 'responseElements_uICustomization_clientId', 'responseElements_methodIntegration_integrationresponsePut_resourceId', 'responseElements_role_path', 'responseElements_policy_path', 'requestParameters_elasticloadbalancing_healthCheckPath', 'requestParameters_ec2_enableDnsSupport_value', 'requestParameters_route53_recordName', 'responseElements_restapiStages_template', 'responseElements_masterUsername', 'responseElements_AssociateIamInstanceProfileResponse_iamInstanceProfileAssociation_state', 'responseElements_userPool_policies_passwordPolicy_requireUppercase', 'requestParameters_monitoring_stateValue', 'requestParameters_autoscaling_autoScalingGroupName', 'requestParameters_ec2_iamInstanceProfile_arn', 'responseElements_distribution_lastModifiedTime', 'requestParameters_ec2_dhcpOptionsId', 'additionalEventData_RedirectTo', 'requestParameters_cloudfront_id', 'responseElements_basepathmappingUpdate_domainName', 'responseElements_integrationresponseUpdate_resourceId', 'requestParameters_clouddirectory_name', 'requestParameters_health_locale', 'responseElements_byteMatchSet_name', 'responseElements_self_authorizerId', 'responseElements_stageDelete_restApiId', 'responseElements_build_environment_type', 'requestParameters_waf-regional_ruleId', 'requestParameters_route53_startRecordName', 'requestParameters_config_resourceId', 'requestParameters_autoscaling_launchConfigurationName', 'requestParameters_autoscaling_stepScalingPolicyConfiguration_metricAggregationType', 'responseElements_role_roleId', 'responseElements_dBParameterGroupFamily', 'responseElements_iPSet_iPSetId', 'requestParameters_clouddirectory_directoryArn', 'responseElements_distribution_distributionConfig_viewerCertificate_minimumProtocolVersion', 'responseElements_hostedZone_config_privateZone', 'requestParameters_cloudfront_distributionConfig_logging_bucket', 'requestParameters_cloudfront_distributionConfig_defaultCacheBehavior_forwardedValues_headers_quantity', 'responseElements_service_deploymentConfiguration_maximumPercent', 'requestParameters_waf-regional_name', 'requestParameters_apigateway_statusCode', 'responseElements_policy_policyName', 'responseElements_keyMetadata_origin', 'requestParameters_ec2_DescribeStaleSecurityGroupsRequest_VpcId', 'responseElements_mfaConfiguration', 'requestParameters_inspector_roleArn', 'requestParameters_waf_changeToken', 'requestParameters_monitoring_comparisonOperator', 'responseElements_complianceSummary_compliantResourceCount_cappedCount', 'responseElements_restapiDocumentationParts_restApiId', 'requestParameters_kms_retiringPrincipal', 'requestParameters_lambda_environment_variables_BUCKET', 'requestParameters_iam_virtualMFADeviceName', 'responseElements_snapshotWindow', 'responseElements_createdDate', 'responseElements_complianceSummary_nonCompliantResourceCount_cappedCount', 'responseElements_policyVersion_versionId', 'responseElements_complianceSummary_complianceSummaryTimestamp', 'responseElements_vpcPeeringConnection_status_message', 'requestParameters_cloudformation_onFailure', 'responseElements_vpnGateway_state', 'requestParameters_apigateway_putMethodInput_requestParameters_method\\u002erequest\\u002epath\\u002eproxy', 'responseElements_documentationpartDelete_documentationPartId', 'responseElements_userPoolClient_refreshTokenValidity', 'requestParameters_elasticache_engine', 'responseElements_partSize', 'responseElements_codeSha256', 'requestParameters_iam_serviceName', 'responseElements_restapiDeployments_restApiId', 'requestParameters_dynamodb_limit', 'responseElements_pipeline_artifactStore_type', 'requestParameters_ec2_DescribeNatGatewaysRequest_Filter_Name', 'responseElements_groupId', 'responseElements_deploymentById_restApiId', 'responseElements_eTag', 'responseElements_basepathmappingCreate_template', 'responseElements_methodIntegration_passthroughBehavior', 'responseElements_CreateNatGatewayResponse_xmlns', 'responseElements_documentationpartDelete_restApiId', '_id', 'responseElements_distribution_distributionConfig_defaultCacheBehavior_maxTTL', 'responseElements_subnetGroupStatus', 'responseElements_userImportJob_preSignedUrl', 'responseElements_build_arn', 'responseElements_self_domainName', 'responseElements_vpnConnection_vpnConnectionId', 'requestParameters_kms_encryptionContext_aws:lambda:FunctionArn', 'responseElements_build_environment_image', 'responseElements_preferredBackupWindow', 'requestParameters_sts_durationSeconds', 'responseElements_project_serviceRole', 'responseElements_mailFromDomainAttributes_adriang@spaceflightindustries\\u002ecom_behaviorOnMXFailure', 'responseElements_environment_variables_HookUrl', 'requestParameters_elasticmapreduce_instances_emrManagedSlaveSecurityGroup', 'responseElements_subnet_availabilityZone', 'requestParameters_cognito-identity_identityPoolName', 'responseElements_environment_variables_bower_storage__registry', 'requestParameters_lambda_environment_variables_ES_INDEX_PREFIX', 'responseElements_changeInfo_status', 'responseElements_healthCheck_target', 'requestParameters_waf-regional_byteMatchSetId', 'requestParameters_lambda_s3Bucket', 'requestParameters_cloudtrail_endTime', 'responseElements_attachment_state', 'requestParameters_ecs_role', 'responseElements_sizeConstraintSet_name', 'requestParameters_lambda_statementId', 'responseElements_group_groupId', 'responseElements_accountUsage_functionCount', 'responseElements_uri', 'responseElements_tableDescription_tableName', 'requestParameters_apigateway_keyId', 'userIdentity_sessionContext_attributes_creationDate', 'requestParameters_lambda_includePreviewFeatures', 'requestParameters_ecs_deploymentConfiguration_maximumPercent', 'responseElements_cacheParameterGroup_parameterApplyStatus', 'responseElements_dBSubnetGroupArn', 'requestParameters_cloudfront_maxItems', 'responseElements_loadBalancerName', 'responseElements_availabilityZone', 'requestParameters_ecr_registryId', 'requestParameters_s3_NotificationConfiguration_QueueConfiguration_Filter_S3Key_FilterRule_Value', 'responseElements_location_type', 'responseElements_self_documentationPartId', 'responseElements_task_group', 'responseElements_role_roleName', 'responseElements_service_createdAt', 'requestParameters_elasticloadbalancing_priority', 'responseElements_enabled', 'responseElements_resourceById_template', 'requestParameters_lambda_maxItems', 'responseElements_methodresponsePut_template', 'requestParameters_ssm_name', 'requestParameters_autoscaling_maxRecords', 'responseElements_ModifyVpcPeeringConnectionOptionsResponse_requesterPeeringConnectionOptions_allowEgressFromLocalClassicLinkToRemoteVpc', 'requestParameters_ec2_enableDnsHostnames_value', 'responseElements_resourceUpdate_restApiId', 'eventType', 'responseElements_ModifyVpcPeeringConnectionOptionsResponse_requestId', 'responseElements_accessKey_userName', 'responseElements_activity_startTime', 'requestParameters_ecr_nextToken', 'responseElements_responseTemplates_application/json', 'requestParameters_ec2_groupDescription', 'responseElements_environment_variables_bower_directory', 'responseElements_result', 'requestParameters_ecs_service', 'responseElements_integrationDelete_restApiId', 'responseElements_cacheClusterCreateTime', 'responseElements_integrationResponses_200_self_httpMethod', 'responseElements_project_webhook_url', 'requestParameters_apigateway_putIntegrationResponseInput_responseParameters_method\\u002eresponse\\u002eheader\\u002eAccess-Control-Allow-Headers', 'responseElements_userPool_lambdaConfig_customMessage', 'requestParameters_apigateway_putIntegrationInput_passthroughBehavior', 'requestParameters_cognito-idp_lambdaConfig_createAuthChallenge', 'requestParameters_ecr_partLastByte', 'responseElements_identityPoolId', 'responseElements_restapiResources_template', 'requestParameters_route53_callerReference', 'responseElements_task_lastStatus', 'requestParameters_cloudfront_distributionConfig_defaultCacheBehavior_maxTTL', 'requestParameters_elasticmapreduce_applicationAttemptId', 'requestParameters_apigateway_createBasePathMappingInput_stage', 'requestParameters_elasticloadbalancing_loadBalancerAttributes_connectionDraining_timeout', 'requestParameters_sns_name', 'responseElements_loadBalancerAttributes_connectionDraining_timeout', 'requestParameters_route53_recordType', 'requestParameters_elasticloadbalancing_ruleArn', 'requestParameters_iam_policyArn', 'requestParameters_ec2_description', 'responseElements_usageplanUsageplankeys_usagePlanId', 'responseElements_methodResponses_200_methodresponseDelete_statusCode', 'responseElements_iPSet_name', 'responseElements_userPool_mfaConfiguration', 'requestParameters_ec2_egress', 'responseElements_accessKey_createDate', 'responseElements_project_source_auth_type', 'requestParameters_monitoring_nextToken', 'responseElements_repository_repositoryName', 'responseElements_methodIntegration_integrationUpdate_restApiId', 'requestParameters_ec2_endTime', 'responseElements_schemaArn', 'responseElements_accessKey_status', 'requestParameters_kinesis_tags_Environment', 'responseElements_instanceCreateTime', 'responseElements_methodDelete_httpMethod', 'requestParameters_route53_changeBatch_comment', 'requestParameters_cognito-idp_emailVerificationMessage', 'responseElements_service_clusterArn', 'responseElements_project_environment_type', 'responseElements_timeoutInMillis', 'responseElements_passthroughBehavior', 'responseElements_numCacheNodes', 'responseElements_credentials_accessKeyId', 'requestParameters_rds_maxRecords', 'requestParameters_cloudfront_distributionConfig_viewerCertificate_certificateSource', 'requestParameters_datapipeline_name', 'requestParameters_monitoring_period', 'requestParameters_ecs_containerInstance', 'responseElements_authorizerUpdate_authorizerId', 'requestParameters_cognito-idp_lambdaConfig_preAuthentication', 'responseElements_basePath', 'responseElements_cacheNamespace', 'requestParameters_apigateway_createBasePathMappingInput_restApiId', 'responseElements_rule_name', 'requestParameters_cloudformation_nextToken', 'responseElements_userPool_lastModifiedDate', 'requestParameters_config_configRule_configRuleState', 'requestParameters_ec2_DescribeHostsRequest_Filter_tag', 'responseElements_routeTable_routeTableId', 'responseElements_userPool_policies_passwordPolicy_requireNumbers', 'responseElements_throttleSettings_rateLimit', 'responseElements_appliedSchemaArn', 'responseElements_ruleArn', 'requestParameters_apigateway_parameters_mode', 'requestParameters_ec2_DescribeInstanceCreditSpecificationsRequest_InstanceId_content', 'responseElements_dBInstanceIdentifier', 'requestParameters_sns_authenticateOnUnsubscribe', 'responseElements_restapiModels_restApiId', 'requestParameters_support_displayId', 'requestParameters_cloudfront_distributionConfig_origins_quantity', 'requestParameters_waf-regional_metricName', 'requestParameters_apigateway_createAuthorizerInput_authorizerUri', 'requestParameters_dynamodb_tableName', 'requestParameters_lambda_s3Key', 'requestParameters_kms_encryptionContext_aws:codecommit:id', 'responseElements_domain', 'responseElements_newAssociationId', 'requestParameters_ec2_cidrBlock', 'requestParameters_lambda_environment_variables_slackChannel', 'responseElements_subnet_availableIpAddressCount', 'responseElements_distribution_distributionConfig_aliases_quantity', 'responseElements_cacheClusterId', 'requestParameters_kinesis_shardCount', 'requestParameters_rds_applyImmediately', 'requestParameters_config_configRule_configRuleName', 'responseElements_distribution_domainName', 'requestParameters_lambda_masterRegion', 'responseElements_documentationpartCreate_createDocumentationPartInput_location_path', 'additionalEventData_SwitchTo', 'requestParameters_cognito-idp_cSS', 'requestParameters_elasticloadbalancing_type', 'requestParameters_ec2_ModifyVpcPeeringConnectionOptionsRequest_VpcPeeringConnectionId', 'requestParameters_s3_AccessControlPolicy_Owner_ID', 'responseElements_keyMetadata_keyUsage', 'requestParameters_logs_logGroupNamePrefix', 'responseElements_repositoryMetadata_repositoryName', 'responseElements_authorizerResultTtlInSeconds', 'responseElements_userPool_deviceConfiguration_deviceOnlyRememberedOnUserPrompt', 'requestParameters_cloudfront_distributionConfig_defaultCacheBehavior_allowedMethods_quantity', 'requestParameters_config_configurationRecorder_recordingGroup_allSupported', 'requestParameters_sqs_attribute_VisibilityTimeout', 'requestParameters_config_nextToken', 'responseElements_methodSettings_*/*_loggingLevel', 'responseElements_build_artifacts_location', 'responseElements_vpcPeeringConnection_expirationTime', 'responseElements_stageByName_restApiId', 'responseElements_loginProfile_createDate', 'requestParameters_s3_bucketPolicy_Id', 'requestParameters_codepipeline_name', 'readOnly', 'requestParameters_ecr_uploadId', 'userIdentity_accountId', 'requestParameters_monitoring_unit', 'responseElements_methodresponseDelete_restApiId', 'responseElements_CreateNatGatewayResponse_natGateway_natGatewayAddressSet_item_allocationId', 'responseElements_build_projectName', 'responseElements_self_restApiId', 'requestParameters_ec2_clientToken', 'requestParameters_ecs_clientToken', 'responseElements_distribution_distributionConfig_isIPV6Enabled', 'responseElements_userPool_creationDate', 'additionalEventData_MfaType', 'responseElements_activity_activityId', 'responseElements_methodIntegration_integrationUpdate_httpMethod', 'responseElements_vpnConnection_state', 'requestParameters_apigateway_putIntegrationResponseInput_responseParameters_method\\u002eresponse\\u002eheader\\u002eAccess-Control-Allow-Methods', 'responseElements_taskDefinition_taskRoleArn', 'responseElements_requestvalidatorById_restApiId', 'responseElements_integrationresponseDelete_resourceId', 'responseElements_responseModels_image/png', 'responseElements_userPoolClient_lastModifiedDate', 'responseElements_project_lastModified', 'responseElements_layerDigest', 'requestParameters_autoscaling_associatePublicIpAddress', 'responseElements_queueUrl', 'responseElements_project_artifacts_type', 'responseElements_environment_variables_POOLID', 'requestParameters_ec2_cidrIp', 'responseElements_deploymentCreate_restApiId', 'responseElements_userPoolUIConfiguration_details_ALL_image-bucket', 'responseElements_instanceProfile_instanceProfileName', 'requestParameters_iam_policyName', 'requestParameters_cloudtrail_s3BucketName', 'requestParameters_autoscaling_scalingAdjustment', 'responseElements_integrationResponses_200_integrationresponseDelete_restApiId', 'responseElements_instanceProfile_path', 'responseElements_tags_lambda-console:blueprint', 'requestParameters_monitoring_namespace', 'requestParameters_apigateway_createBasePathMappingInput_basePath', 'responseElements_userPoolUIConfiguration_details_ALL_font-color', 'responseElements_methodIntegration_integrationDelete_resourceId', 'responseElements_customerGateway_state', 'responseElements_methodResponses_200_methodresponseDelete_resourceId', 'additionalEventData_vpcEndpointId', 'responseElements_timeout', 'responseElements_gatewayresponsePut_restApiId', 'responseElements_description', 'responseElements_invalidation_invalidationBatch_paths_quantity', 'requestParameters_cognito-idp_lambdaConfig_postAuthentication', 'requestParameters_route53_vPC_vPCRegion', 'requestParameters_sns_token', 'responseElements_vpcId', 'responseElements_objectIdentifier', 'requestParameters_s3_AccessControlPolicy_AccessControlList_Grant_Grantee_xmlns:xsi', 'responseElements_methodIntegration_integrationResponses_200_integrationresponseDelete_statusCode', 'responseElements_methodIntegration_integrationResponses_200_self_restApiId', 'requestParameters_monitoring_maxRecords', 'requestParameters_elasticmapreduce_instances_serviceAccessSecurityGroup', 'responseElements_methodResponses_200_statusCode', 'responseElements_customerGateway_customerGatewayId', 'requestParameters_cognito-idp_policies_passwordPolicy_requireUppercase', 'requestParameters_iam_description', 'requestParameters_support_caseId', 'responseElements_methodresponseUpdate_resourceId', 'requestParameters_cloudtrail_maxResults', 'requestParameters_ec2_instanceType', 'requestParameters_codepipeline_reason', 'requestParameters_cloudfront_distributionConfig_aliases_quantity', 'responseElements_distribution_distributionConfig_defaultCacheBehavior_forwardedValues_queryString', 'responseElements_integrationUpdate_resourceId', 'responseElements_subnet_cidrBlock', 'responseElements_documentationpartCreate_createDocumentationPartInput_location_statusCode', 'responseElements_pipelineExecution_pipelineName', 'requestParameters_rds_finalDBSnapshotIdentifier', 'requestParameters_elasticmapreduce_instances_ec2SubnetId', 'responseElements_apiKeyRequired', 'responseElements_pipelineExecution_pipelineExecutionId', 'requestParameters_waf_webACLId', 'responseElements_CreateNatGatewayResponse_natGateway_natGatewayId', 'responseElements_distribution_distributionConfig_customErrorResponses_quantity', 'requestParameters_config_laterTime', 'requestParameters_lambda_environment_variables_ROOT_PATH', 'requestParameters_config_deliveryChannel_snsTopicARN', 'responseElements_repository_createdAt', 'requestParameters_cognito-idp_deviceConfiguration_deviceOnlyRememberedOnUserPrompt', 'requestParameters_monitoring_actionsEnabled', 'responseElements_handler', 'requestParameters_cognito-idp_policies_passwordPolicy_requireNumbers', 'requestParameters_elasticloadbalancing_healthCheck_unhealthyThreshold', 'responseElements_project_environment_computeType', 'responseElements_documentationpartImport_template', 'requestParameters_config_configRule_source_sourceIdentifier', 'requestParameters_iam_assignmentStatus', 'eventTime', 'responseElements_task_containerInstanceArn', 'requestParameters_sqs_attributes_Policy', 'requestParameters_elasticloadbalancing_loadBalancerPort', 'responseElements_methodResponses_200_responseModels_image/png', 'responseElements_healthCheck_timeout', 'responseElements_self_deploymentId', 'responseElements_restapiResources_restApiId', 'requestParameters_kinesis_limit', 'responseElements_tableDescription_provisionedThroughput_writeCapacityUnits', 'responseElements_policy_isAttachable', 'responseElements_certificateArn', 'responseElements_userPoolClient_userPoolId', 'responseElements_authorizerDelete_authorizerId', 'responseElements_methodUpdate_restApiId', 'responseElements_project_timeoutInMinutes', 'requestParameters_kms_aliasName', 'requestParameters_cognito-idp_smsAuthenticationMessage', 'responseElements_authorizerById_template', 'requestParameters_apigateway_mode', 'requestParameters_logs_orderBy', 'responseElements_distribution_status', 'requestParameters_cognito-idp_imageFile_mark', 'responseElements_methodIntegration_requestParameters_integration\\u002erequest\\u002epath\\u002eproxy', 'requestParameters_cognito-identity_roles_unauthenticated', 'responseElements_authorizerById_restApiId', 'requestParameters_kms_encryptionContext_aws:codecommit:sig-alg', 'requestParameters_athena_queryExecutionId', 'responseElements_tableDescription_tableStatus', 'requestParameters_iam_policyDocument', 'requestParameters_lambda_timeout', 'responseElements_userPoolClient_clientName', 'requestParameters_s3_bucketPolicy_Version', 'responseElements_environment_variables_bower_cwd', 'responseElements_location', 'requestParameters_ec2_aclProtocol', 'responseElements_policy_createDate', 'requestParameters_cognito-idp_details_font-color', 'requestParameters_s3_WebsiteConfiguration_IndexDocument_Suffix', 'requestParameters_glue_schemaChangePolicy_updateBehavior', 'requestParameters_rds_masterUsername', 'requestParameters_lambda_sourceArn', 'requestParameters_glacier_accountId', 'requestParameters_support_categoryCode', 'requestParameters_rds_duration', 'responseElements_distribution_id', 'responseElements_authorizationType', 'requestParameters_lambda_environment_variables_bower_cwd', 'requestParameters_autoscaling_iamInstanceProfile', 'responseElements_credentials_sessionToken', 'responseElements_role_description', 'responseElements_reservationId', 'requestParameters_datapipeline_sphere', 'responseElements_backupRetentionPeriod', 'responseElements_parentId', 'requestParameters_codepipeline_pipelineExecutionId', 'responseElements_repositoryMetadata_accountId', 'requestParameters_waf-regional_iPSetId', 'requestParameters_rds_defaultOnly', 'requestParameters_iam_assumeRolePolicyDocument', 'requestParameters_cognito-idp_lambdaConfig_postConfirmation', 'requestParameters_config_configRule_source_owner', 'responseElements_domainnameDelete_domainName', 'requestParameters_acm_idempotencyToken', 'requestParameters_ec2_DescribeVolumesModificationsRequest_MaxResults', 'requestParameters_lambda_tags_lambda-console:blueprint', 'requestParameters_cloudformation_changeSetName', 'responseElements_resourceCreate_parentId', 'requestParameters_apigateway_putIntegrationInput_type', 'responseElements_vpnConnection_category', 'requestParameters_cognito-idp_lambdaConfig_verifyAuthChallengeResponse', 'requestParameters_logs_descending', 'requestParameters_monitoring_evaluationPeriods', 'requestParameters_elasticache_aZMode', 'responseElements_lastByteReceived', 'requestParameters_config_deliveryChannel_configSnapshotDeliveryProperties_deliveryFrequency', 'responseElements_attachment_vpcId', 'responseElements_methodSettings_*/*_throttlingBurstLimit', 'responseElements_task_cpu', 'responseElements_endpointAddress', 'responseElements_subnet_state', 'responseElements_accountLimit_concurrentExecutions', 'requestParameters_events_expression', 'responseElements_vpcPeeringConnection_accepterVpcInfo_cidrBlock', 'requestParameters_autoscaling_imageId', 'responseElements_cacheClusterSize', 'requestParameters_cloudfront_distributionConfig_defaultCacheBehavior_forwardedValues_queryString', 'requestParameters_s3_NotificationConfiguration_CloudFunctionConfiguration_Event', 'responseElements_loadBalancerAttributes_connectionDraining_enabled', 'responseElements_deploymentById_template', 'requestParameters_apigateway_createUsagePlanKeyInput_keyType', 'requestParameters_sts_roleArn', 'requestParameters_route53domains_createdSince', 'responseElements_userImportJob_cloudWatchLogsRoleArn', 'responseElements_usageGet_endDate', 'requestParameters_cognito-idp_policies_passwordPolicy_minimumLength', 'requestParameters_elasticmapreduce_instances_keepJobFlowAliveWhenNoSteps', 'responseElements_topicArn', 'responseElements_integrationUpdate_httpMethod', 'responseElements_tableDescription_itemCount', 'responseElements_policyText', 'requestParameters_logs_filterNamePrefix', 'responseElements_distribution_distributionConfig_logging_prefix', 'requestParameters_elasticmapreduce_scaleDownBehavior', 'requestParameters_codepipeline_retryMode', 'requestParameters_cloudformation_logicalResourceId', 'requestParameters_codecommit_repositoryName', 'requestParameters_iam_groupName', 'requestParameters_cloudformation_templateURL', 'requestParameters_lambda_description', 'responseElements_group_createDate', 'responseElements_requestvalidatorCreate_restApiId', 'responseElements_self_statusCode', 'requestParameters_events_rule', 'responseElements_user_userName', 'requestParameters_lambda_environment_variables_REGION', 'requestParameters_cloudfront_distributionId', 'responseElements_methodSettings_*/*_unauthorizedCacheControlHeaderStrategy', 'requestParameters_ec2_name', 'requestParameters_ses_policy', 'responseElements_policy_arn', 'responseElements_certificateUploadDate', 'requestParameters_rds_tdeCredentialPassword', 'responseElements_engine', 'responseElements_build_currentPhase', 'requestParameters_elasticbeanstalk_includeDeleted', 'responseElements_integrationresponseDelete_httpMethod', 'responseElements_memorySize', 'requestParameters_cloudfront_webACLId', 'requestParameters_ec2_DescribeNatGatewaysRequest_Filter_tag', 'requestParameters_dynamodb_provisionedThroughput_readCapacityUnits', 'requestParameters_s3_AccessControlPolicy_AccessControlList_Grant_Grantee_ID', 'responseElements_properties', 'responseElements_methodresponsePut_restApiId', 'responseElements_repository_repositoryUri', 'requestParameters_ec2_keyName', 'requestParameters_apigateway_httpMethod', 'requestParameters_athena_queryExecutionContext_database', 'responseElements_SwitchRole', 'responseElements_uICustomization_userPoolId', 'responseElements_methodIntegration_type', 'requestParameters_lambda_action', 'responseElements_usageplankeyDelete_usagePlanId', 'responseElements_distribution_distributionConfig_viewerCertificate_certificateSource', 'responseElements_documentationpartById_template', 'requestParameters_cloudtrail_includeShadowTrails', 'requestParameters_events_scheduleExpression', 'responseElements_userPoolUIConfiguration_userPoolId', 'requestParameters_sqs_attribute_DelaySeconds', 'responseElements_integrationresponsePut_restApiId', 'responseElements_repositoryMetadata_arn', 'requestParameters_s3_ReplicationConfiguration_Rule_Destination_Bucket', 'responseElements_expiryTime', 'responseElements_requestTemplates_application/json', 'responseElements__return', 'requestParameters_cognito-idp_lambdaConfig_preSignUp', 'responseElements_task_stoppingAt', 'responseElements_project_source_buildspec', 'additionalEventData_LoginTo', 'requestParameters_cognito-identity_roles_authenticated', 'responseElements_self_httpMethod', 'requestParameters_autoscaling_shouldDecrementDesiredCapacity', 'requestParameters_rds_vpc', 'responseElements_methodIntegration_cacheNamespace', 'recipientAccountId', 'requestParameters_lambda_environment_variables_LOG_LEVEL', 'responseElements_self_usagePlanId', 'requestParameters_apigateway_deploymentId', 'responseElements_healthCheck_unhealthyThreshold', 'requestParameters_apigateway_putMethodInput_apiKeyRequired', 'requestParameters_cloudfront_distributionConfig_callerReference', 'responseElements_preferredAvailabilityZone', 'requestParameters_ec2_type', 'requestParameters_cloudformation_physicalResourceId', 'requestParameters_codebuild_awsActId', 'requestParameters_sqs_attributes_MessageRetentionPeriod', 'responseElements_webhook_url', 'requestParameters_autoscaling_instanceType', 'requestParameters_sqs_attribute_RedrivePolicy', 'requestParameters_apigateway_createDocumentationPartInput_location_path', 'responseElements_image_registryId', 'responseElements_deploymentId', 'responseElements_resourceUpdate_resourceId', 'requestParameters_events_targetArn', 'responseElements_distribution_aRN', 'requestParameters_route53_resourceId', 'requestParameters_athena_resultConfiguration_outputLocation', 'responseElements_sqlInjectionMatchSet_sqlInjectionMatchSetId', 'responseElements_hostedZone_name', 'sharedEventID', 'responseElements_activity_cause', 'requestParameters_elasticloadbalancing_listenerArn', 'responseElements_resourceDelete_restApiId', 'requestParameters_cognito-idp_generateSecret', 'responseElements_activity_description', 'requestParameters_ec2_ruleNumber', 'responseElements_invalidation_status', 'responseElements_service_serviceName', 'responseElements_webACL_defaultAction_type', 'requestParameters_ecs_desiredCount', 'requestParameters_cloudfront_distributionConfig_httpVersion', 'requestParameters_autoscaling_healthCheckType', 'responseElements_methodIntegration_self_httpMethod', 'requestParameters_rds_dBSubnetGroupName', 'responseElements_repositoryMetadata_lastModifiedDate', 'requestParameters_autoscaling_stepScalingPolicyConfiguration_cooldown', 'responseElements_distribution_distributionConfig_viewerCertificate_cloudFrontDefaultCertificate', 'requestParameters_route53_name', 'responseElements_keyMetadata_keyState', 'responseElements_restapiStages_restApiId', 'requestParameters_cognito-idp_userPoolId', 'requestParameters_elasticache_cacheClusterId', 'requestParameters_cloudfront_distributionConfig_defaultCacheBehavior_compress', 'responseElements_tracingConfig_mode', 'requestParameters_s3_ReplicationConfiguration_Rule_ID', 'responseElements_tableDescription_tableArn', 'requestParameters_cognito-idp_allowedOAuthFlowsUserPoolClient', 'requestParameters_cognito-idp_adminCreateUserConfig_inviteMessageTemplate_emailSubject', 'requestParameters_route53domains_maxItems', 'responseElements_ownerId', 'requestParameters_waf-regional_defaultAction_type', 'requestParameters_cloudfront_distributionConfig_logging_enabled', 'responseElements_userPool_emailConfiguration_sourceArn', 'responseElements_build_source_buildspec', 'requestParameters_apigateway_authorizerId', 'responseElements_user_arn', 'requestParameters_ecs_task', 'requestParameters_s3_NotificationConfiguration_QueueConfiguration_Id', 'responseElements_publicIp', 'responseElements_distribution_distributionConfig_defaultCacheBehavior_forwardedValues_headers_quantity', 'requestParameters_rds_masterUserPassword', 'responseElements_keyMetadata_description', 'responseElements_methodresponseUpdate_statusCode', 'requestParameters_codepipeline_version', 'requestParameters_autoscaling_forceDelete', 'responseElements_stage', 'requestParameters_logs_nextToken', 'responseElements_hostedZone_callerReference', 'responseElements_documentationpartCreate_restApiId', 'responseElements_tableDescription_provisionedThroughput_numberOfDecreasesToday', 'requestParameters_athena_queryString', 'responseElements_environment_variables_SERVICE', 'responseElements_cacheNodeType', 'requestParameters_rds_dBName', 'requestParameters_elasticache_numCacheNodes', 'responseElements_task_taskDefinitionArn', 'responseElements_domainnameUpdate_domainName', 'responseElements_methodByHttpMethod_template', 'responseElements_httpMethod', 'responseElements_policy_defaultVersionId', 'requestParameters_datapipeline_pipelineId', 'requestParameters_cognito-idp_adminCreateUserConfig_inviteMessageTemplate_emailMessage', 'requestParameters_apigateway_createAuthorizerInput_authorizerResultTtlInSeconds', 'responseElements_policy_description', 'responseElements_integrationDelete_resourceId', 'responseElements_functionName', 'requestParameters_apigateway_body_capacity', 'requestParameters_sqs_attributes_MaximumMessageSize', 'responseElements_dBSubnetGroupDescription', 'responseElements_environment_variables_ORG', 'responseElements_mailFromDomainAttributes_dev\\u002eblacksky\\u002ecom_behaviorOnMXFailure', 'requestParameters_rds_description', 'requestParameters_ec2_ruleAction', 'requestParameters_elasticloadbalancing_vpcId', 'responseElements_integrationResponses_200_self_title', 'requestParameters_ecr_policyText', 'requestParameters_rds_dBInstanceClass', 'responseElements_mailFromDomainAttributes_admin-ordering@spaceflightindustries\\u002ecom_behaviorOnMXFailure', 'eventSource', 'requestParameters_codecommit_order', 'responseElements_latestRestorableTime', 'responseElements_grantId', 'requestParameters_lambda_environment_variables_ORG', 'requestParameters_elasticmapreduce_instances_emrManagedMasterSecurityGroup', 'responseElements_verificationToken', 'requestParameters_sns_topicArn', 'responseElements_deploymentStages_restApiId', 'requestParameters_kms_keyUsage', 'requestParameters_ecs_taskRoleArn', 'responseElements_role', 'responseElements_documentationpartUpdate_documentationPartId', 'requestParameters_autoscaling_minCapacity', 'requestParameters_cognito-idp_verificationMessageTemplate_defaultEmailOption', 'requestParameters_lambda_environment_variables_URL', 'requestParameters_apigateway_createRestApiInput_name', 'requestParameters_kms_destinationEncryptionContext_aws:elasticloadbalancing:arn', 'requestParameters_directconnect_maxResults', 'requestParameters_s3_NotificationConfiguration_TopicConfiguration_Event', 'requestParameters_support_maxResults', 'responseElements_build_endTime', 'additionalEventData_MFAUsed', 'responseElements_allocatedStorage', 'requestParameters_elasticmapreduce_instances_ec2KeyName', 'responseElements_value', 'responseElements_service_roleArn', 'responseElements_integrationResponses_200_self_statusCode', 'requestParameters_ec2_vpcPeeringConnectionId', 'requestParameters_elasticloadbalancing_scheme', 'requestParameters_ec2_vpcId', 'requestParameters_autoscaling_cooldown', 'requestParameters_kms_encryptionContext_aws:codecommit:env-alg', 'requestParameters_kms_sourceEncryptionContext_aws:acm:arn', 'requestParameters_kms_limit', 'requestParameters_kms_destinationAAD', 'requestParameters_rds_dBSubnetGroupDescription', 'responseElements_uICustomization_cSSVersion', 'eventID', 'requestParameters_elasticloadbalancing_loadBalancerAttributes_crossZoneLoadBalancing_enabled', 'responseElements_ModifyVpcPeeringConnectionOptionsResponse_requesterPeeringConnectionOptions_allowEgressFromLocalVpcToRemoteClassicLink', 'requestParameters_ec2_ipAddress', 'requestParameters_ec2_DescribeHostsRequest_maxResults', 'responseElements_modelCreate_createModelInput_contentType', 'responseElements_project_arn', 'requestParameters_lambda_sourceAccount', 'additionalEventData_Note', 'responseElements_url', 'requestParameters_apigateway_putIntegrationResponseInput_responseParameters_method\\u002eresponse\\u002eheader\\u002eAccess-Control-Allow-Origin', 'responseElements_ModifyVpcPeeringConnectionOptionsResponse_accepterPeeringConnectionOptions_allowEgressFromLocalClassicLinkToRemoteVpc', 'requestParameters_firehose_limit', 'responseElements_resourceCreate_restApiId', 'requestParameters_waf_timeWindow_endTime', 'requestParameters_lambda_environment_variables_bower_storage__packages', 'responseElements_project_artifacts_namespaceType', 'responseElements_name', 'requestParameters_support_includeCommunications', 'responseElements_build_timeoutInMinutes', 'responseElements_project_environment_image', 'responseElements_ModifyVpcPeeringConnectionOptionsResponse_accepterPeeringConnectionOptions_allowEgressFromLocalVpcToRemoteClassicLink', 'requestParameters_elasticmapreduce_sourceId', 'responseElements_accountLimit_codeSizeZipped', 'responseElements_userPoolUIConfiguration_details_ALL_background-color', 'responseElements_usageplankeyCreate_usagePlanId', 'additionalEventData_MobileVersion', 'requestParameters_ses_notificationType', 'responseElements_vpc_state', 'requestParameters_ec2_includeAllInstances', 'requestParameters_apigateway_createUsagePlanInput_name', 'responseElements_integrationresponsePut_httpMethod', 'responseElements_keyMetadata_keyManager', 'responseElements_service_pendingCount', 'requestParameters_lambda_environment_variables_DYNAMODB_PREFIX', 'responseElements_image_imageId_imageDigest', 'requestParameters_rds_includeShared', 'requestParameters_s3_VersioningConfiguration_Status', 'requestParameters_es_instanceType', 'responseElements_cacheSubnetGroupName', 'responseElements_methodPut_resourceId', 'requestParameters_lambda_role', 'requestParameters_config_configurationRecorderName', 'responseElements_distribution_distributionConfig_logging_bucket', 'requestParameters_clouddirectory_version', 'requestParameters_ec2_ipProtocol', 'responseElements_methodByHttpMethod_resourceId', 'responseElements_vpc_dhcpOptionsId', 'responseElements_methodIntegration_integrationResponses_200_self_resourceId', 'requestParameters_apigateway_usagePlanId', 'requestParameters_apigateway_restApiId', 'requestParameters_sts_roleSessionName', 'requestParameters_autoscaling_desiredCapacity', 'responseElements_endpoint_hostedZoneId', 'requestParameters_cognito-idp_imageFile_bigEndian', 'responseElements_distribution_distributionConfig_callerReference', 'requestParameters_ecs_maxResults', 'requestParameters_kms_sourceAAD', 'requestParameters_kms_policy', 'responseElements_authorizerDelete_restApiId', 'responseElements_dBParameterGroupName', 'responseElements_authorizerCreate_restApiId', 'requestParameters_health_maxResults', 'requestParameters_ec2_ModifyVpcPeeringConnectionOptionsRequest_AccepterPeeringConnectionOptions_AllowDnsResolutionFromRemoteVpc', 'requestParameters_autoscaling_instanceMonitoring_enabled', 'responseElements_configSnapshotId', 'responseElements_environment_variables_URL', 'requestParameters_elasticmapreduce_serviceRole', 'requestParameters_rds_autoMinorVersionUpgrade', 'responseElements_restapiAuthorizers_restApiId', 'requestParameters_waf_limit', 'requestParameters_ds_limit', 'responseElements_project_artifacts_name', 'requestParameters_lambda_environment_variables_ES_HOST', 'requestParameters_s3_AccessControlPolicy_AccessControlList_Grant_Permission', 'requestParameters_cloudformation_exportName', 'responseElements_build_source_location', 'responseElements_methodIntegration_integrationResponses_200_integrationresponseUpdate_httpMethod', 'responseElements_stageByName_template', 'requestParameters_autoscaling_maxCapacity', 'requestParameters_logs_showSubscriptionDestinations', 'responseElements_xssMatchSet_xssMatchSetId', 'responseElements_restapiDocumentationVersions_restApiId', 'responseElements_integrationDelete_httpMethod', 'responseElements_dhcpOptions_dhcpOptionsId', 'requestParameters_sns_attributeValue', 'requestParameters_cognito-idp_details_image-bucket', 'responseElements_directoryArn', 'responseElements_self_basePath', 'requestParameters_ec2_CreateNatGatewayRequest_AllocationId', 'responseElements_modelByName_template', 'requestParameters_s3_LifecycleConfiguration_Rule_Status', 'requestParameters_ecr_layerDigest', 'requestParameters_cloudfront_distributionConfig_defaultCacheBehavior_defaultTTL', 'requestParameters_apigateway_putMethodInput_authorizerId', 'requestParameters_elasticloadbalancing_healthCheckTimeoutSeconds', 'requestParameters_glue_tableName', 'requestParameters_codepipeline_pipeline_roleArn', 'requestParameters_s3_AccessControlPolicy_Owner_DisplayName', 'requestParameters_s3_AccessControlPolicy_AccessControlList_Grant_Grantee_xsi:type', 'requestParameters_waf_timeWindow_startTime', 'responseElements_contentHandling', 'responseElements_CreateNatGatewayResponse_natGateway_vpcId', 'responseElements_self_keyId', 'requestParameters_iot_maxResults', 'requestParameters_waf_ruleId', 'requestParameters_rds_resourceName', 'requestParameters_cloudfront_distributionConfig_priceClass', 'requestParameters_apigateway_domainName', 'requestParameters_ec2_CreateNatGatewayRequest_ClientToken', 'requestParameters_kms_constraints_encryptionContextEquals_aws:elasticloadbalancing:arn', 'responseElements_distributionDomainName', 'requestParameters_lambda_principal', 'requestParameters_ecs_cluster', 'requestParameters_cognito-identity_identityPoolId', 'requestParameters_codepipeline_stageName', 'requestParameters_logs_destinationArn', 'responseElements_uploadId', 'requestParameters_cognito-idp_imageFile_capacity'}
class SeparatedVarianceSelector(object):
def __init__(self, perm_universe_query, fields_to_bin=set(), add_missing_fields=False):
self.perm_universe_query = perm_universe_query
self.fields_to_bin = fields_to_bin #{'eventTime', 'eventName', 'sourceIPAddress', 'userIdentity_accessKeyId', 'userAgent'}
self.valid_keys = set()
self.event_normalizer = ConfigurableEventNormalizerNg(use_resources=False, bin_method='eqf-6', fields_to_bin=self.fields_to_bin, valid_keys=self.valid_keys, add_missing_fields=add_missing_fields)
def calculate_variance(self, instance_sample_rate, fields_to_skip=set(), fields_to_bin=set(), filter_key=None, filter_ceiling=1.1, filter_floor=-1.0):
if fields_to_skip and fields_to_bin:
fields_to_skip = fields_to_skip.difference(fields_to_bin)
event_values = {}
total_event_count = 0
for event in events_collection.find(self.perm_universe_query):
if random.uniform(0, 1) > instance_sample_rate:
continue
flat_event = self.event_normalizer.normalized_user_op_resource_from_event(event)
for key, value in flat_event.items():
if key in fields_to_skip:
continue
if key not in event_values:
event_values[key] = []
event_values[key].append(value)
total_event_count += 1
if total_event_count % 50000 == 0:
print('%d events...' % total_event_count)
results = {}
field_instance_counter = Counter()
for key, value in event_values.items():
if key in fields_to_skip:
continue
field_instance_counter.update([key])
# print('Calculating variance for %s' % key)
vectorizor = DictVectorizer(sparse=False)
normed_events = []
for v in value:
normed_events.append({key: v})
# X = vectorizor.fit_transform(normed_events)
# selector = VarianceThreshold(0.0)
unique_value_count = len(set(event_values[key]))
e_v_2 = [s for s in event_values[key] if s is not 'NONE']
instances = len(e_v_2)#len(event_values[key])
frequency = instances / total_event_count
if instances > 0:
uniqueness = 1-(unique_value_count / instances)
else:
uniqueness = 0
try:
# result = selector.fit_transform(X)
# variances = selector.variances_
total_of_variances = 0
# for variance in variances:
# total_of_variances += variance
key_weight = 0 #(total_of_variances) * frequency
vf_score = 0 # (total_of_variances) * frequency
ivf_score = 0 #(1-total_of_variances) * frequency
uf_score = uniqueness * frequency
iuf_score = (1-uniqueness) * frequency
hkey_weight = 0 #(2 * key_weight) / (total_of_variances + frequency)
results[key] = {'variance': total_of_variances, 'instances': instances, 'frequency': frequency, 'key_weight': key_weight, 'hkey_weight': hkey_weight, 'vf_score':vf_score, 'ivf_score':ivf_score, 'uf_score': uf_score, 'iuf_score':iuf_score}
# print('%s: total: %f, instances: %d' % (key, total_of_variances, instances))
except ValueError:
# hkey_weight = (2 * frequency) / (frequency)
results[key] = {'variance': 0.0, 'instances': instances,'frequency': frequency, 'key_weight': 0.0, 'hkey_weight': 0, 'vf_score':0, 'ivf_score':0, 'uf_score':0, 'iuf_score':0}
# print('%s: total: %f, instances: %d' % (key, 0.0, instances))
print()
print('==============')
print('fieldName, variance, values, instances, frequency, vf_score, ivf_score, uf_score, iuf_score')
valid_keys = set()
over_variance_keys = set()
under_variance_keys = set()
under_frequency_keys = set()
for key, value in sorted(results.items(), key=lambda x:x[1][filter_key], reverse=True):
# if filter_key == 'variance' and value['frequency'] < 0.90:
# continue
if filter_key and value[filter_key] >= filter_ceiling:
if filter_key == 'variance' and value['frequency'] < 0.90: # When using variance, only filter out keys that are always present in the events
valid_keys.add(key)
else:
fields_to_skip.add(key)
elif filter_key and value[filter_key] <= filter_floor:
fields_to_skip.add(key)
else:
valid_keys.add(key)
print('%s, %f, %d, %d, %f, %f, %f, %f, %f' % (key, value['variance'], len(set(event_values[key])), value['instances'], value['frequency'], value['vf_score'], value['ivf_score'], value['uf_score'], value['iuf_score'])) #, value['hkey_weight']))
# print('Over variance keys (%d): %s' % (len(over_variance_keys), over_variance_keys))
# print('Under variance keys (%d): %s' % (len(under_variance_keys), under_variance_keys))
# print('Under frequency keys (%d): %s' % (len(under_frequency_keys), under_frequency_keys))
print('Keys to skip (%d): %s' % (len(fields_to_skip), fields_to_skip))
print('Valid keys (%d): %s' % (len(valid_keys), valid_keys))
return valid_keys, fields_to_skip
def print_normd_events_csv(self, instance_sample_rate, valid_keys, fields_to_bin, correlation_threshold, add_missing_fields):
keys_to_remove = {'eventTime_bin', 'eventTime_weekday', 'eventTime_weekend', 'eventName_bin', 'userIdentity_principalId', 'userIdentity_arn'}
valid_keys.difference_update(keys_to_remove)
f = open("events.csv", 'w')
header = ', '.join([k for k in sorted(valid_keys)])
print(header)
f.write(header + '\n')
for event in events_collection.find(self.job['perm_universe_query']):
if random.uniform(0, 1) > instance_sample_rate:
continue
flat_event = self.event_normalizer.normalized_user_op_resource_from_event(event)
event_line = ', '.join('{}'.format(flat_event[k]) for k in sorted(valid_keys))
print(event_line)
f.write(event_line + '\n')
f.close()
def pandas_corr_no_vect(self, record_limit, valid_keys, fields_to_bin, correlation_threshold, add_missing_fields):
valid_events = []
key_value_counter = Counter()
df = pd.DataFrame()
event_normalizer = ConfigurableEventNormalizerNg(use_resources=False, bin_method='eqf-6', fields_to_bin=fields_to_bin, valid_keys=valid_keys, add_missing_fields=add_missing_fields)
for event in events_collection.find(self.job['perm_universe_query']):
if len(valid_events) > record_limit:
break
flat_event = event_normalizer.normalized_user_op_resource_from_event(event)
valid_events.append(flat_event)
for k, v in flat_event.items():
key_value_counter.update(['%s=%s' % (k, v)])
if len(valid_events) % 50000 == 0:
print('%d events...' % len(valid_events))
# current_df = pd.DataFrame(flat_event, index=[0])
# pd.concat([df, pd.DataFrame(flat_event.items())])
total_events = len(valid_events)
dependency_exempt_fields = {}
# dependency_exempt_fields = {'eventTime_bin': ['eventTime_weekend', 'eventTime_weekday'],
# 'eventName':['eventTime_weekend', 'eventTime_weekday', 'eventTime_bin'], # 'userIdentity_invokedBy', 'userIdentity_sessionContext_attributes_mfaAuthenticated'],
# 'eventName_bin': ['eventTime_weekend', 'eventTime_weekday', 'eventTime_bin'], # 'userAgent_bin', 'userAgent_general_bin', 'userIdentity_invokedBy', 'userIdentity_sessionContext_attributes_mfaAuthenticated'],
# 'userAgent_general_bin': ['eventTime_weekend', 'eventTime_weekday', 'eventTime_bin'], #, 'sourceIPAddress_bin'],
# 'userIdentity_accessKeyId': ['eventTime_weekend', 'eventTime_weekday'], #, 'eventTime_bin', 'eventSource', 'sourceIPAddress_bin', 'userAgent_bin', 'userAgent_general_bin'],
# 'eventSource': ['eventTime_weekend', 'eventTime_weekday', 'eventTime_bin'],
# 'userIdentity_userName': ['eventTime_weekend', 'eventTime_weekday', 'eventTime_bin']}
df = pd.DataFrame(valid_events)
print('========= Correlations ===========')
# candidate_keys = set()
# factors_paired = [(i, j) for i in df.columns.values for j in df.columns.values]
# correlation_matrix = np.zeros((len(df.columns.values), len(df.columns.values)))
implied_values_counter = Counter()
implied_values_dict = {}
row_name_counter = {}
for i in range(0, len(df.columns.values)):
for j in range(len(df.columns.values)):
row_name = df.columns.values[i]
col_name = df.columns.values[j]
# if (row_name == 'userAgent_bin' and col_name == 'userIdentity_invokedBy') or (row_name == 'userIdentity_invokedBy' and col_name == 'userAgent_bin'):
# print()
row_series = df[row_name]
col_series = df[col_name]
# if col_name == 'userIdentity_invokedBy':
# print()
if i == j:
continue
key = '%s -> %s' % (row_name, col_name)
try:
confusion_matrix = pd.crosstab(df[row_name].copy(True), df[col_name].copy(True))
row_name_counter[row_name] = len(confusion_matrix.index)
# if key == 'userIdentity_accessKeyId -> userIdentity_userName' or key == 'eventTime_weekday -> eventTime_weekend' or key == 'userAgent_bin -> eventType' or key == 'eventType -> userAgent_bin' or \
# key == 'eventType -> sourceIPAddress_bin' or key =='eventType -> eventSource' or key == 'sourceIPAddress_bin -> eventType' or key == 'eventSource -> eventName' or \
# key =='eventSource -> eventType' or key == 'eventName -> eventSource' or key == 'eventName -> eventType' or key == 'userAgent_bin -> userIdentity_invokedBy':
if key == 'userAgent_bin -> userIdentity_sessionContext_attributes_mfaAuthenticated' or key == 'userAgent_general_bin -> userIdentity_accessKeyId' or key == 'eventSource -> userIdentity_accessKeyId' \
or key == 'eventVersion -> eventType': # or key == 'userAgent_general_bin -> apiVersion' or key == 'sourceIPAddress_bin -> apiVersion':
print()
self.print_conf_table(confusion_matrix, row_name, col_name)
print()
contains_multiple_possible_values = False
total_key_records = 0
for cmi in range(0, len(confusion_matrix.values)):
positive_columns = 0
possible_column_values = set()
col_idx = 0
for cmj in range(0, len(confusion_matrix.values[cmi])):
if confusion_matrix.values[cmi][cmj] > 0:
positive_columns += 1
col_idx = cmj
possible_column_values.add(confusion_matrix.columns[cmj])
total_key_records += confusion_matrix.values[cmi][cmj]
if positive_columns > 1:
contains_multiple_possible_values = True
elif positive_columns == 1:
row_value = confusion_matrix.index[cmi]
col_value = confusion_matrix.columns[col_idx]
if row_name in dependency_exempt_fields.keys():
if len(dependency_exempt_fields[row_name]) == 0 or col_name in dependency_exempt_fields[row_name]:
continue
# print('%s:%s -> %s:%s support:%d' % (row_name, confusion_matrix.index[cmi], col_name, confusion_matrix.columns[col_idx], confusion_matrix.values[cmi][col_idx]))
implied_values_counter.update([key])
# if len(possible_column_values) == 1:
# print('%s:%s -> %s:%s ' % (row_name, confusion_matrix.index[cmi], col_name, possible_column_values))
implied_values_dict[key] = total_key_records
except:
print('ERROR on : %s' % key)
correlation_dict = {}
cross_corr_dict = {}
corr_dependency_mmap = {}
for k, v in implied_values_counter.items():
k1 = k.split(' -> ')[0]
k2 = k.split(' -> ')[1]
value_count = row_name_counter[k1]
normd_value = v/float(value_count)
correlation_dict[k] = {'support': v, 'normd': normd_value}
if normd_value >= correlation_threshold:
RuleUtils.addMulti(corr_dependency_mmap, k1, k2)
# print('%s: support: %d normd: %f' % (k,v, v/float(value_count)))
print('key, support, key coverage rate')
for k, v in sorted(correlation_dict.items(), key=lambda x: x[1]['normd'], reverse=True):
k1 = k.split(' -> ')[0]
k2 = k.split(' -> ')[1]
reverse_key = '%s -> %s' % (k2, k1)
print('%s, %d, %f' % (k, v['support'], v['normd']))
if reverse_key in correlation_dict:
refl_key = '%s <-> %s' % (k1, k2)
new_v = v['normd'] * correlation_dict[reverse_key]['normd']
cross_corr_dict[refl_key] = new_v
print('{')
for k,v in corr_dependency_mmap.items():
print("'%s': %s," % (k, list(v)))
print('}')
print('==== tsort_input ====')
for k,v in corr_dependency_mmap.items():
for k2 in v:
print("%s \t %s" % (k, k2))
# print('======= 1:1 correlations ========')
# for k, v in sorted(cross_corr_dict.items(), key=lambda x: x[1], reverse=True):
# print('%s, %f' % (k, v))
# print()
# cc_input = {}
# for k1 in valid_keys: cc_input[k1] = set()
# for k1, v1 in param_dependency_mmap.items():
# print('%s: %s' % (k1, [v1.keys()]))
# for k2 in v1.keys():
# cc_input[k1].add(k2)
#
# print(self.getRoots(cc_input))
print()
def getRoots(self, aNeigh):
def findRoot(aNode, aRoot):
while aNode != aRoot[aNode][0]:
aNode = aRoot[aNode][0]
return (aNode, aRoot[aNode][1])
myRoot = {}
for myNode in aNeigh.keys():
myRoot[myNode] = (myNode, 0)
for myI in aNeigh:
for myJ in aNeigh[myI]:
(myRoot_myI, myDepthMyI) = findRoot(myI, myRoot)
(myRoot_myJ, myDepthMyJ) = findRoot(myJ, myRoot)
if myRoot_myI != myRoot_myJ:
myMin = myRoot_myI
myMax = myRoot_myJ
if myDepthMyI > myDepthMyJ:
myMin = myRoot_myJ
myMax = myRoot_myI
myRoot[myMax] = (myMax, max(myRoot[myMin][1] + 1, myRoot[myMax][1]))
myRoot[myMin] = (myRoot[myMax][0], -1)
myToRet = {}
for myI in aNeigh:
if myRoot[myI][0] == myI:
myToRet[myI] = []
for myI in aNeigh:
myToRet[findRoot(myI, myRoot)[0]].append(myI)
return myToRet
def print_conf_table(self, confusion_table, r_name, c_name):
row_names = confusion_table.index.values
col_names = confusion_table.columns.values
print('%s/%s, %s' % (r_name, c_name, ", ".join(col_names)))
for i in range(0, len(confusion_table.values)):
row = confusion_table.values[i]
print('%s, %s' % (row_names[i], ', '.join([str(i) for i in row])))
def dependencies_allow_normd_event(self, current_event, param_dependency_mmap):
for indep_key, indep_value in param_dependency_mmap.items():
for dep_key, dep_value in indep_value.items():
if indep_key not in current_event or dep_key not in current_event:
continue
user_ind = current_event[indep_key]
user_dep = current_event[dep_key]
allowed_set = dep_value[user_ind]
if user_dep not in allowed_set:
return False
return True
def set_valid_keys(self, valid_keys):
self.valid_keys = valid_keys
self.event_normalizer.valid_keys = valid_keys
def generate_all_fields_list(self, perm_universe_query):
all_fields = set()
event_count = 0
for event in events_collection.find(perm_universe_query):
fields = event_flattner.flatten(event, "_")
all_fields.update(fields)
event_count += 1
if event_count % 50000 == 0:
print('%d events...' % event_count)
return all_fields
if __name__ == "__main__":
# perm_universe_query = job_utls.replace_query_epoch_with_datetime({"eventTime": {"$gte": {"$date": 1490054400000}, "$lte": {"$date": 1500076799000}}})
perm_universe_query = job_utls.replace_query_epoch_with_datetime({"eventTime": {"$gte": {"$date": 0}, "$lte": {"$date": 1531180800000}}})
selector = SeparatedVarianceSelector(perm_universe_query, {'userAgent', 'eventName'}, add_missing_fields=False)
# all_fields = selector.generate_all_fields_list(perm_universe_query)
print(len(all_fields))
print(all_fields)
valid_keys = all_fields
fields_to_skip = set()
selector.set_valid_keys(all_fields)
# selector.test()
# print('0.01-variance')
# fields_to_skip = {'eventTime', 'eventID', 'requestID', 'userIdentity_arn', 'userIdentity_principalId', 'userIdentity_sessionContext_attributes_creationDate', 'sourceIPAddress'}
# valid_keys, fields_to_skip = selector.calculate_variance(0.01, fields_to_skip, set(), 'variance', 0.99, 0.001)
# valid_keys = {s for s in valid_keys if not s.startswith('requestParameters_')}
valid_keys.update({'sourceIPAddressLocation','sourceIPAddressInternal','sourceIPAddressBin','userAgent_bin','userAgent_general_bin', 'eventName_bin', 'eventName_crud_bin'})
# print()
# print()
filter = 'uf_score'
# print('0.1-%s' % filter)
# selector.set_valid_keys(valid_keys)
# valid_keys, new_skip_keys = selector.calculate_variance(0.1, fields_to_skip, set(), 'vf_score', 1.1, 0.01)
# valid_keys, new_skip_keys = selector.calculate_variance(0.1, fields_to_skip, set(), 'ivf_score', 1.1, 0.0003)
# valid_keys, new_skip_keys = selector.calculate_variance(0.1, fields_to_skip, set(), 'uf_score', 1.1, 0.0015)
# valid_keys, new_skip_keys = selector.calculate_variance(0.1, fields_to_skip, set(), 'vf_score', 1.1, 0.001)
# valid_keys, new_skip_keys = selector.calculate_variance(0.1, fields_to_skip, set(), 'ivf_score', 1.1, 0.0003)
# valid_keys, new_skip_keys = selector.calculate_variance(0.1, fields_to_skip, set(), 'uf_score', 1.1, 0.0015)
# fields_to_skip = fields_to_skip.union(new_skip_keys)
# print(fields_to_skip)
# print()
print()
print('1.0-%s' % filter)
selector.set_valid_keys(valid_keys)
valid_keys, fields_to_skip = selector.calculate_variance(1.0, fields_to_skip, set(), filter, 1.1, 0.000000)
# valid_keys, fields_to_skip = selector.calculate_variance(1.0, fields_to_skip, set(), 'ivf_score', 1.1, 0.000000)
# valid_keys, fields_to_skip = selector.calculate_variance(1.0, fields_to_skip, set(), 'uf_score', 1.1, 0.000000)
# print()
# print(valid_keys)
# valid_keys = {'sourceIPAddress','eventName','eventTime_weekday','eventTime_bin','eventSource','userIdentity_userName','eventName_bin',
# 'userIdentity_sessionContext_attributes_mfaAuthenticated','userAgent_bin','userIdentity_invokedBy','userAgent_general_bin','eventVersion','userIdentity_accessKeyId','requestParameters_path',
# 'requestParameters_encryptionContext_PARAMETER_ARN','sourceIPAddress_bin','requestParameters_name','requestParameters_pipelineName','eventTime_weekend','apiVersion','requestParameters_maxResults',
# 'eventType'} #'-userIdentity_arn' '-userIdentity_principalId'
selector.set_valid_keys({'sourceIPAddress', 'sourceIPAddress_trunc', 'sourceIPAddress_bin', 'eventName', 'eventName_crud_bin', 'eventSource', 'eventName_bin', 'userIdentity_sessionContext_attributes_mfaAuthenticated', 'userAgent', 'userAgent_bin', 'userAgent_general_bin',
'userIdentity_invokedBy', 'eventType', 'eventVersion', 'apiVersion', 'requestParameters_path','requestParameters_encryptionContext_PARAMETER_ARN', 'requestParameters_name',
'requestParameters_pipelineName','requestParameters_maxResults', 'userIdentity_accessKeyId', 'eventTime_weekend', 'eventTime_weekday', 'eventTime_bin', 'userIdentity_userName'
})
original_user_keys = {'userIdentity_accessKeyId', 'eventTime_weekend','eventTime_weekday', 'eventTime_bin', 'userIdentity_userName',}
original_op_keys = {"sourceIPAddress", "userIdentity_sessionContext_attributes_mfaAuthenticated", "eventType", "eventSource", "userAgent_general_bin", "userAgent_bin", "eventName"}
# log_universe_generator = LogUniverseGenerator(selector.event_normalizer, job['perm_universe_query'])
# param_info_id = log_universe_generator.build_log_universe(600000)
# event_enumerator = EventEnumerator('56531ac20e9402e22b62fa6064c69957', original_user_keys)
# for event in event_enumerator.generate_events():
# print(event)
# valid_keys = {'eventType', 'eventName', 'eventSource', 'requestParameters_path','requestParameters_encryptionContext_PARAMETER_ARN', 'requestParameters_name', 'requestParameters_pipelineName','requestParameters_maxResults'}
# selector.pandas_corr_no_vect(100000, valid_keys, {'eventTime', 'eventName', 'sourceIPAddress', 'userIdentity_accessKeyId', 'userAgent'}, 0.50, True)
# selector.build_log_universe(600000)
# selector.print_normd_events_csv(0.1, valid_keys, {'eventTime', 'eventName', 'sourceIPAddress', 'userIdentity_accessKeyId', 'userAgent'}, 0.90, True)
# selector.correlate_keys(1.0, valid_keys, {'eventTime', 'eventName', 'sourceIPAddress', 'userIdentity_accessKeyId', 'userAgent'}, 0.90, False, True)
# selector.correlate_keys(0.1, valid_keys, {'eventTime', 'eventName', 'sourceIPAddress', 'userIdentity_accessKeyId', 'userAgent'}, 0.50, True, False)
| 275.930693
| 87,591
| 0.853224
| 8,821
| 111,476
| 10.216982
| 0.159846
| 0.020416
| 0.01468
| 0.012405
| 0.147264
| 0.075418
| 0.059152
| 0.046403
| 0.037914
| 0.033321
| 0
| 0.007872
| 0.071325
| 111,476
| 404
| 87,592
| 275.930693
| 0.862681
| 0.068051
| 0
| 0.137681
| 0
| 0.003623
| 0.795631
| 0.780032
| 0
| 0
| 0
| 0
| 0
| 1
| 0.036232
| false
| 0.003623
| 0.043478
| 0
| 0.105072
| 0.119565
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
f187d7d704b1cec6eb5365b57b3a7f2a353d64d0
| 158
|
py
|
Python
|
gentelella/registeration/models.py
|
horoyoii/admin_dashboard_edgex
|
9aea5e43eeb3da17d9e9c65c3ed0337fe7694cb8
|
[
"MIT"
] | 2
|
2020-05-24T20:34:41.000Z
|
2021-08-28T07:27:45.000Z
|
dashboard/registeration/models.py
|
horoyoii/graduation_piece
|
4f907a10636e3862d09e950c6eb5f12e95b1a8e5
|
[
"MIT"
] | 5
|
2021-03-19T09:14:10.000Z
|
2021-06-10T19:54:28.000Z
|
dashboard/registeration/models.py
|
horoyoii/graduation_piece
|
4f907a10636e3862d09e950c6eb5f12e95b1a8e5
|
[
"MIT"
] | 1
|
2021-08-28T07:27:48.000Z
|
2021-08-28T07:27:48.000Z
|
from django.db import models
# Create your models here.
class Device_profile(models.Model):
device_profile_file = models.FileField(blank=True, null=True)
| 31.6
| 65
| 0.791139
| 23
| 158
| 5.304348
| 0.73913
| 0.213115
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.120253
| 158
| 5
| 65
| 31.6
| 0.877698
| 0.151899
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 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
|
f18c6dd959b69d2b2ee9d44943d0d819a5d73f26
| 80
|
py
|
Python
|
main/autogen_cached_items.py
|
mace2305/droughtidx_climatedrver_dashboard
|
3503199f8a19e1e3b0c391875c141af21952db82
|
[
"MIT"
] | null | null | null |
main/autogen_cached_items.py
|
mace2305/droughtidx_climatedrver_dashboard
|
3503199f8a19e1e3b0c391875c141af21952db82
|
[
"MIT"
] | null | null | null |
main/autogen_cached_items.py
|
mace2305/droughtidx_climatedrver_dashboard
|
3503199f8a19e1e3b0c391875c141af21952db82
|
[
"MIT"
] | null | null | null |
# to run modules without streamlit, just to generate cache for report submission
| 80
| 80
| 0.825
| 12
| 80
| 5.5
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15
| 80
| 1
| 80
| 80
| 0.970588
| 0.975
| 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
|
7431b7ac2d80d19565a778af37fab86c299faf2d
| 90
|
py
|
Python
|
docs/examples/credentials.py
|
vlastikczech/zang-python
|
980f5243071404d6838554500a6955ff7bc2a0c7
|
[
"MIT"
] | 1
|
2019-02-18T21:51:58.000Z
|
2019-02-18T21:51:58.000Z
|
docs/examples/credentials.py
|
vlastikczech/zang-python
|
980f5243071404d6838554500a6955ff7bc2a0c7
|
[
"MIT"
] | 6
|
2019-06-26T13:56:22.000Z
|
2022-02-17T16:40:48.000Z
|
docs/examples/credentials.py
|
vlastikczech/zang-python
|
980f5243071404d6838554500a6955ff7bc2a0c7
|
[
"MIT"
] | 6
|
2017-10-17T12:44:32.000Z
|
2020-02-07T20:45:00.000Z
|
sid = 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
authToken = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
| 30
| 46
| 0.866667
| 4
| 90
| 19.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.066667
| 90
| 2
| 47
| 45
| 0.928571
| 0
| 0
| 0
| 0
| 0
| 0.733333
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
745aea1cb208bf74e8d50e6db48416abbef43c47
| 40
|
py
|
Python
|
python_tutorial/passfunction.py
|
vchatchai/python101
|
c2f1c7b0f62a4600f9c64af566dc5630742580f2
|
[
"Apache-2.0"
] | null | null | null |
python_tutorial/passfunction.py
|
vchatchai/python101
|
c2f1c7b0f62a4600f9c64af566dc5630742580f2
|
[
"Apache-2.0"
] | null | null | null |
python_tutorial/passfunction.py
|
vchatchai/python101
|
c2f1c7b0f62a4600f9c64af566dc5630742580f2
|
[
"Apache-2.0"
] | null | null | null |
def function(a):
pass
function(10)
| 8
| 16
| 0.65
| 6
| 40
| 4.333333
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.064516
| 0.225
| 40
| 5
| 17
| 8
| 0.774194
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0.333333
| 0
| 0
| 0.333333
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
746be4bfc7f40cefd13d2a36be0f6fe646efa782
| 65
|
py
|
Python
|
okta/exceptions/__init__.py
|
corylevine/okta-sdk-python
|
c86b8fdc4525e84199143c27213c0aebc6b2af8f
|
[
"Apache-2.0"
] | 145
|
2017-06-13T21:54:04.000Z
|
2022-02-25T05:44:34.000Z
|
okta/exceptions/__init__.py
|
corylevine/okta-sdk-python
|
c86b8fdc4525e84199143c27213c0aebc6b2af8f
|
[
"Apache-2.0"
] | 146
|
2017-06-02T17:46:12.000Z
|
2022-03-29T15:52:15.000Z
|
okta/exceptions/__init__.py
|
corylevine/okta-sdk-python
|
c86b8fdc4525e84199143c27213c0aebc6b2af8f
|
[
"Apache-2.0"
] | 98
|
2017-06-27T03:44:51.000Z
|
2022-03-23T04:58:18.000Z
|
from . exceptions import HTTPException, OktaAPIException # noqa
| 32.5
| 64
| 0.815385
| 6
| 65
| 8.833333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.138462
| 65
| 1
| 65
| 65
| 0.946429
| 0.061538
| 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
|
749bf969cff5f780731d4fcc01e4749233adf81e
| 526
|
py
|
Python
|
tests/basics/subclass-native2.py
|
lurch/micropython
|
28dfbc2ba2ef41a7810e4e39290031eb2207a0a9
|
[
"MIT"
] | null | null | null |
tests/basics/subclass-native2.py
|
lurch/micropython
|
28dfbc2ba2ef41a7810e4e39290031eb2207a0a9
|
[
"MIT"
] | null | null | null |
tests/basics/subclass-native2.py
|
lurch/micropython
|
28dfbc2ba2ef41a7810e4e39290031eb2207a0a9
|
[
"MIT"
] | null | null | null |
class Base1:
def __init__(self, *args):
print("Base1.__init__",args)
class Clist1(Base1, list):
pass
class Ctuple1(Base1, tuple):
pass
a = Clist1()
print(len(a))
a = Clist1([1, 2, 3])
print(len(a))
a = Ctuple1()
print(len(a))
a = Ctuple1([1, 2, 3])
# TODO: Faults
#print(len(a))
print("---")
class Clist2(list, Base1):
pass
class Ctuple2(tuple, Base1):
pass
a = Clist2()
print(len(a))
a = Clist2([1, 2, 3])
print(len(a))
#a = Ctuple2()
#print(len(a))
#a = Ctuple2([1, 2, 3])
#print(len(a))
| 13.842105
| 36
| 0.589354
| 85
| 526
| 3.552941
| 0.247059
| 0.211921
| 0.238411
| 0.198676
| 0.284768
| 0.125828
| 0.086093
| 0
| 0
| 0
| 0
| 0.070755
| 0.193916
| 526
| 37
| 37
| 14.216216
| 0.641509
| 0.163498
| 0
| 0.391304
| 0
| 0
| 0.039261
| 0
| 0
| 0
| 0
| 0.027027
| 0
| 1
| 0.043478
| false
| 0.173913
| 0
| 0
| 0.26087
| 0.304348
| 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
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
77751b94cf23287ba4b0c80bf25a8e2c40f6acb0
| 112
|
py
|
Python
|
src/test/resources/python_file.py
|
ncordon/scala-client
|
d98840187815f15fc3f88d1818bccd2a833fc968
|
[
"Apache-2.0"
] | 4
|
2017-10-23T16:13:31.000Z
|
2019-07-02T03:34:10.000Z
|
src/test/resources/python_file.py
|
ncordon/scala-client
|
d98840187815f15fc3f88d1818bccd2a833fc968
|
[
"Apache-2.0"
] | 45
|
2017-09-18T13:47:32.000Z
|
2019-07-08T17:08:33.000Z
|
src/test/resources/python_file.py
|
ncordon/scala-client
|
d98840187815f15fc3f88d1818bccd2a833fc968
|
[
"Apache-2.0"
] | 9
|
2017-09-18T12:56:11.000Z
|
2019-07-08T08:53:07.000Z
|
#!/usr/bin/env python
from __future__ import print_function
if __name__ == '__main__':
print('hello world')
| 16
| 37
| 0.732143
| 15
| 112
| 4.6
| 0.933333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 112
| 6
| 38
| 18.666667
| 0.71875
| 0.178571
| 0
| 0
| 0
| 0
| 0.208791
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0.666667
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
|
0
| 5
|
77f3c5a79090df27d62c1130220cf7bba4c372e8
| 1,691
|
py
|
Python
|
codewars/6kyu/doha22/twisted_sum/bench_test.py
|
doha22/Training_one
|
0cd7cf86c7da0f6175834146296b763d1841766b
|
[
"MIT"
] | null | null | null |
codewars/6kyu/doha22/twisted_sum/bench_test.py
|
doha22/Training_one
|
0cd7cf86c7da0f6175834146296b763d1841766b
|
[
"MIT"
] | 2
|
2019-01-22T10:53:42.000Z
|
2019-01-31T08:02:48.000Z
|
codewars/6kyu/doha22/twisted_sum/bench_test.py
|
doha22/Training_one
|
0cd7cf86c7da0f6175834146296b763d1841766b
|
[
"MIT"
] | 13
|
2019-01-22T10:37:42.000Z
|
2019-01-25T13:30:43.000Z
|
from twisted_sum import compute_sum
from twisted_sum import compute_sum2
def test(benchmark):
assert benchmark(compute_sum, 1) == 1
def test2(benchmark):
assert benchmark(compute_sum2, 1) == 1
'''''''''
---------------------------------------------------------------------------------- benchmark: 2 tests ----------------------------------------------------------------------------------
Name (time in us) Min Max Mean StdDev Median IQR Outliers OPS (Kops/s) Rounds Iterations
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test 2.0526 (1.0) 596.9088 (1.32) 3.6787 (1.0) 4.1226 (1.0) 2.8737 (1.0) 1.6421 (1.0) 434;576 271.8347 (1.0) 48718 1
test2 2.8737 (1.40) 453.6343 (1.0) 5.4493 (1.48) 4.6487 (1.13) 4.1053 (1.43) 3.2842 (2.00) 1278;830 183.5095 (0.68) 83996 1
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Legend:
Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.
OPS: Operations Per Second, computed as 1 / Mean
================================================================================= 2 passed in 4.23 seconds =================================================================================
'''''
| 67.64
| 188
| 0.315789
| 147
| 1,691
| 3.591837
| 0.55102
| 0.026515
| 0.05303
| 0.075758
| 0.102273
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117779
| 0.211709
| 1,691
| 25
| 189
| 67.64
| 0.27832
| 0
| 0
| 0.111111
| 0
| 0.222222
| 0.872479
| 0.411625
| 0
| 0
| 0
| 0
| 0.111111
| 1
| 0.111111
| false
| 0.055556
| 0.111111
| 0
| 0.222222
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
7ac37a26fc0d285707f630dd3fec546e445c0228
| 4,164
|
py
|
Python
|
src/utils/utils.py
|
Basti3n/TroncheLab
|
3a73d2793d6e01df70b26b2f887eb2fd0f9dfb89
|
[
"MIT"
] | 2
|
2020-05-06T10:54:13.000Z
|
2020-05-09T04:44:27.000Z
|
src/utils/utils.py
|
Basti3n/TroncheLab
|
3a73d2793d6e01df70b26b2f887eb2fd0f9dfb89
|
[
"MIT"
] | null | null | null |
src/utils/utils.py
|
Basti3n/TroncheLab
|
3a73d2793d6e01df70b26b2f887eb2fd0f9dfb89
|
[
"MIT"
] | null | null | null |
import os
from enum import Enum
import numpy as np
from PIL import Image
from tensorflow.keras.applications.imagenet_utils import preprocess_input
from keras_preprocessing import image
from tensorflow.python.keras.models import load_model
DATASET_PATH = os.environ['DATASET_PATH']
TARGET_RESOLUTION = (64, 64)
class Classes(Enum):
CARNIVAL = 0
FACE = 1
MASK = 2
def load_dataset():
Ximgs = []
y_train = []
for file in os.listdir(f'{DATASET_PATH}/Train/Carnaval/'):
Ximgs.append(
np.array(
Image.open(f'{DATASET_PATH}/Train/Carnaval/{file}').resize(TARGET_RESOLUTION).convert('RGB')) / 255.0)
y_train.append([1, 0, 0])
for file in os.listdir(f'{DATASET_PATH}/Train/Face/'):
Ximgs.append(
np.array(Image.open(f'{DATASET_PATH}/Train/Face/{file}').resize(TARGET_RESOLUTION).convert('RGB')) / 255.0)
y_train.append([0, 1, 0])
for file in os.listdir(f'{DATASET_PATH}/Train/Mask/'):
Ximgs.append(
np.array(Image.open(f'{DATASET_PATH}/Train/Mask/{file}').resize(TARGET_RESOLUTION).convert('RGB')) / 255.0)
y_train.append([0, 0, 1])
Ximgs_test = []
y_test = []
for file in os.listdir(f'{DATASET_PATH}/Test/Carnaval/'):
Ximgs_test.append(
np.array(
Image.open(f'{DATASET_PATH}/Test/Carnaval/{file}').resize(TARGET_RESOLUTION).convert('RGB')) / 255.0)
y_test.append([1, 0, 0])
for file in os.listdir(f'{DATASET_PATH}/Test/Face/'):
Ximgs_test.append(
np.array(Image.open(f'{DATASET_PATH}/Test/Face/{file}').resize(TARGET_RESOLUTION).convert('RGB')) / 255.0)
y_test.append([0, 1, 0])
for file in os.listdir(f'{DATASET_PATH}/Test/Mask/'):
Ximgs_test.append(
np.array(Image.open(f'{DATASET_PATH}/Test/Mask/{file}').resize(TARGET_RESOLUTION).convert('RGB')) / 255.0)
y_test.append([0, 0, 1])
x_train = np.array(Ximgs)
y_train = np.array(y_train)
x_test = np.array(Ximgs_test)
y_test = np.array(y_test)
return (x_train, y_train), (x_test, y_test)
def load_linear_model(file):
model = load_model(f'./models/linear_model.keras')
# model.summary()
img = Image.open(file).resize(TARGET_RESOLUTION)
x = image.img_to_array(img)
x = np.expand_dims(x, axis=0)
images = np.vstack([x])
# print(f'Linear model : {Classes(model.predict_classes(images, batch_size=64))}')
return Classes(model.predict_classes(images, batch_size=64)).name
def load_mlp_model(file: str):
model = load_model(f'./models/mlp_model.keras')
# model.summary()
img = Image.open(file).resize(TARGET_RESOLUTION)
x = image.img_to_array(img)
x = np.expand_dims(x, axis=0)
images = np.vstack([x])
# print(f'MLP model : {Classes(model.predict_classes(images, batch_size=64))}')
return Classes(model.predict_classes(images, batch_size=64)).name
def load_cnn_model(file: str):
model = load_model(f'./models/cnn_model.keras')
# model.summary()
img = Image.open(file).resize(TARGET_RESOLUTION)
x = image.img_to_array(img)
x = np.expand_dims(x, axis=0)
images = np.vstack([x])
# print(f'CNN model : {Classes(model.predict_classes(images, batch_size=64))}')
return Classes(model.predict_classes(images, batch_size=64)).name
def load_resnet_model(file: str):
model = load_model(f'./models/resnet_model.keras')
# model.summary()
img = Image.open(file).resize(TARGET_RESOLUTION)
x = image.img_to_array(img)
x = np.expand_dims(x, axis=0)
x = preprocess_input(x)
res = model.predict(x)
return Classes(np.argmax(res, axis=1)).name
# print(f'Test Acc : {Classes(model.predict(images, batch_size=10))}')
def load_custom_model(file: str, path: str):
model = load_model(f'./models/{path}')
# model.summary()
img = Image.open(file).resize(TARGET_RESOLUTION)
x = image.img_to_array(img)
x = np.expand_dims(x, axis=0)
x = preprocess_input(x)
res = model.predict(x)
return Classes(np.argmax(res, axis=1)).name
# print(f'Test Acc : {Classes(model.predict(images, batch_size=10))}')
| 34.131148
| 119
| 0.658982
| 621
| 4,164
| 4.251208
| 0.125604
| 0.058333
| 0.054545
| 0.108333
| 0.798485
| 0.778409
| 0.769318
| 0.769318
| 0.731818
| 0.705682
| 0
| 0.021183
| 0.183718
| 4,164
| 121
| 120
| 34.413223
| 0.755516
| 0.10903
| 0
| 0.406977
| 0
| 0
| 0.136523
| 0.124358
| 0
| 0
| 0
| 0
| 0
| 1
| 0.069767
| false
| 0
| 0.081395
| 0
| 0.267442
| 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
|
7ad0637fbeb239faaf8a282ecb9d5c269955ae6a
| 38
|
py
|
Python
|
main.py
|
MatthewRobertDunn/tetrominos
|
f864f6da44e50e2ee435ad8fabef2679c1e21a8b
|
[
"MIT"
] | null | null | null |
main.py
|
MatthewRobertDunn/tetrominos
|
f864f6da44e50e2ee435ad8fabef2679c1e21a8b
|
[
"MIT"
] | null | null | null |
main.py
|
MatthewRobertDunn/tetrominos
|
f864f6da44e50e2ee435ad8fabef2679c1e21a8b
|
[
"MIT"
] | null | null | null |
import gameloop
gameloop.start_game()
| 12.666667
| 21
| 0.842105
| 5
| 38
| 6.2
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.078947
| 38
| 2
| 22
| 19
| 0.885714
| 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
|
7aea76caa20e4818789f498add82873442b7f053
| 27,582
|
py
|
Python
|
phygnn/model_interfaces/phygnn_model.py
|
leilei-help/phygnn
|
889d6abb255a984c4d02f575c39c8280fc2cb839
|
[
"BSD-3-Clause"
] | 41
|
2020-08-20T17:05:00.000Z
|
2022-03-04T12:23:50.000Z
|
phygnn/model_interfaces/phygnn_model.py
|
leilei-help/phygnn
|
889d6abb255a984c4d02f575c39c8280fc2cb839
|
[
"BSD-3-Clause"
] | 19
|
2020-08-24T17:14:04.000Z
|
2022-03-28T22:37:15.000Z
|
phygnn/model_interfaces/phygnn_model.py
|
NREL/phygnn
|
3a508ccd3efda66e851d418f9f4eda319d58a947
|
[
"BSD-3-Clause"
] | 11
|
2020-09-24T16:54:17.000Z
|
2022-02-15T00:07:58.000Z
|
# -*- coding: utf-8 -*-
"""
TensorFlow Model
"""
import json
import logging
import os
from phygnn.phygnn import PhysicsGuidedNeuralNetwork
from phygnn.model_interfaces.base_model import ModelBase
from phygnn.utilities.pre_processing import PreProcess
logger = logging.getLogger(__name__)
class PhygnnModel(ModelBase):
"""
Phygnn Model interface
"""
# Underlying model interface class. Used for loading models from disk
MODEL_CLASS = PhysicsGuidedNeuralNetwork
def __init__(self, model, feature_names=None, label_names=None,
norm_params=None, normalize=(True, False),
one_hot_categories=None):
"""
Parameters
----------
model : PhysicsGuidedNeuralNetwork
PhysicsGuidedNeuralNetwork Model instance
feature_names : list
Ordered list of feature names.
label_names : list
Ordered list of label (output) names.
norm_params : dict, optional
Dictionary mapping feature and label names (keys) to normalization
parameters (mean, stdev), by default None
normalize : bool | tuple, optional
Boolean flag(s) as to whether features and labels should be
normalized. Possible values:
- True means normalize both
- False means don't normalize either
- Tuple of flags (normalize_feature, normalize_label)
by default True
one_hot_categories : dict, optional
Features to one-hot encode using given categories, if None do
not run one-hot encoding, by default None
"""
super().__init__(model, feature_names=feature_names,
label_names=label_names, norm_params=norm_params,
normalize=normalize,
one_hot_categories=one_hot_categories)
@property
def layers(self):
"""
Model layers
Returns
-------
list
"""
return self.model.layers
@property
def weights(self):
"""
Get a list of layer weights for gradient calculations.
Returns
-------
list
"""
return self.model.weights
@property
def kernel_weights(self):
"""
Get a list of the NN kernel weights (tensors)
(can be used for kernel regularization).
Does not include input layer or dropout layers.
Does include the output layer.
Returns
-------
list
"""
return self.model.kernel_weights
@property
def bias_weights(self):
"""
Get a list of the NN bias weights (tensors)
(can be used for bias regularization).
Does not include input layer or dropout layers.
Does include the output layer.
Returns
-------
list
"""
return self.bias_weights
@property
def history(self):
"""
Model training history DataFrame (None if not yet trained)
Returns
-------
pandas.DataFrame | None
"""
return self.model.history
def train_model(self, features, labels, p, n_batch=16, n_epoch=10,
shuffle=True, validation_split=0.2, run_preflight=True,
return_diagnostics=False, p_kwargs=None,
parse_kwargs=None):
"""
Train the model with the provided features and label
Parameters
----------
features : np.ndarray | pd.DataFrame
Feature data in a >=2D array or DataFrame. If this is a DataFrame,
the index is ignored, the columns are used with self.feature_names,
and the df is converted into a numpy array for batching and passing
to the training algorithm. A 2D input should have the shape:
(n_observations, n_features). A 3D input should have the shape:
(n_observations, n_timesteps, n_features). 4D inputs have not been
tested and should be used with caution.
labels : np.ndarray | pd.DataFrame
Known output data in a 2D array or DataFrame.
Same dimension rules as features.
p : np.ndarray | pd.DataFrame
Supplemental feature data for the physics loss function in 2D array
or DataFrame. Same dimension rules as features.
n_batch : int
Number of times to update the NN weights per epoch (number of
mini-batches). The training data will be split into this many
mini-batches and the NN will train on each mini-batch, update
weights, then move onto the next mini-batch.
n_epoch : int
Number of times to iterate on the training data.
shuffle : bool
Flag to randomly subset the validation data and batch selection
from features, labels, and p.
validation_split : float
Fraction of features and labels to use for validation.
p_kwargs : None | dict
Optional kwargs for the physical loss function self._p_fun.
run_preflight : bool
Flag to run preflight checks.
return_diagnostics : bool
Flag to return training diagnostics dictionary.
parse_kwargs : dict
kwargs for cls._parse_features
norm_labels : bool, optional
Flag to normalize label, by default True
Returns
-------
diagnostics : dict, optional
Namespace of training parameters that can be used for diagnostics.
"""
if parse_kwargs is None:
parse_kwargs = {}
x = self._parse_features(features, **parse_kwargs)
y = self._parse_labels(labels)
diagnostics = self.model.fit(x, y, p,
n_batch=n_batch,
n_epoch=n_epoch,
shuffle=shuffle,
validation_split=validation_split,
p_kwargs=p_kwargs,
run_preflight=run_preflight,
return_diagnostics=return_diagnostics)
return diagnostics
def save_model(self, path):
"""
Save phygnn model to path.
Parameters
----------
path : str
Save phygnn model
"""
path = os.path.abspath(path)
if path.endswith(('.json', '.pkl')):
dir_path = os.path.dirname(path)
if path.endswith('.pkl'):
path = path.replace('.pkl', '.json')
else:
dir_path = path
path = os.path.join(dir_path, os.path.basename(path) + '.json')
if not os.path.exists(dir_path):
os.makedirs(dir_path)
model_params = {'feature_names': self.feature_names,
'label_names': self.label_names,
'norm_params': self.normalization_parameters,
'normalize': (self.normalize_features,
self.normalize_labels),
'one_hot_categories': self.one_hot_categories}
model_params = self.dict_json_convert(model_params)
with open(path, 'w') as f:
json.dump(model_params, f, indent=2, sort_keys=True)
path = path.replace('.json', '.pkl')
self.model.save(path)
def set_loss_weights(self, loss_weights):
"""Set new loss weights
Parameters
----------
loss_weights : tuple
Loss weights for the neural network y_true vs y_predicted
and for the p_fun loss, respectively. For example,
loss_weights=(0.0, 1.0) would simplify the phygnn loss function
to just the p_fun output.
"""
self.model._loss_weights = loss_weights
@classmethod
def build(cls, p_fun, feature_names, label_names,
normalize=(True, False),
one_hot_categories=None,
loss_weights=(0.5, 0.5),
hidden_layers=None,
input_layer=None,
output_layer=None,
layers_obj=None,
metric='mae',
initializer=None,
optimizer=None,
learning_rate=0.01,
history=None,
kernel_reg_rate=0.0,
kernel_reg_power=1,
bias_reg_rate=0.0,
bias_reg_power=1,
name=None):
"""
Build phygnn model from given features, layers and kwargs
Parameters
----------
p_fun : function
Physics function to guide the neural network loss function.
This fun must take (phygnn, y_true, y_predicted, p, **p_kwargs)
as arguments with datatypes (PhysicsGuidedNeuralNetwork, tf.Tensor,
np.ndarray, np.ndarray). The function must return a tf.Tensor
object with a single numeric loss value (output.ndim == 0).
feature_names : list
Ordered list of feature names.
label_names : list
Ordered list of label (output) names.
normalize : bool | tuple, optional
Boolean flag(s) as to whether features and labels should be
normalized. Possible values:
- True means normalize both
- False means don't normalize either
- Tuple of flags (normalize_feature, normalize_label)
by default True
one_hot_categories : dict, optional
Features to one-hot encode using given categories, if None do
not run one-hot encoding, by default None
loss_weights : tuple, optional
Loss weights for the neural network y_true vs y_predicted
and for the p_fun loss, respectively. For example,
loss_weights=(0.0, 1.0) would simplify the phygnn loss function
to just the p_fun output.
hidden_layers : list, optional
List of dictionaries of key word arguments for each hidden
layer in the NN. Dense linear layers can be input with their
activations or separately for more explicit control over the layer
ordering. For example, this is a valid input for hidden_layers that
will yield 8 hidden layers (10 layers including input+output):
[{'units': 64, 'activation': 'relu', 'dropout': 0.01},
{'units': 64},
{'batch_normalization': {'axis': -1}},
{'activation': 'relu'},
{'dropout': 0.01},
{'class': 'Flatten'},
]
input_layer : None | dict
Input layer. specification. Can be a dictionary similar to
hidden_layers specifying a dense / conv / lstm layer. Will
default to a keras InputLayer with input shape = n_features.
output_layer : None | list | dict
Output layer specification. Can be a list/dict similar to
hidden_layers input specifying a dense layer with activation.
For example, for a classfication problem with a single output,
output_layer should be [{'units': 1}, {'activation': 'sigmoid'}].
This defaults to a single dense layer with no activation
(best for regression problems).
layers_obj : None | phygnn.utilities.tf_layers.Layers
Optional initialized Layers object to set as the model layers
including pre-set weights. This option will override the
hidden_layers, input_layer, and output_layer arguments.
metric : str, optional
Loss metric option for the NN loss function (not the physical
loss function). Must be a valid key in phygnn.loss_metrics.METRICS
initializer : tensorflow.keras.initializers, optional
Instantiated initializer object. None defaults to GlorotUniform
optimizer : tensorflow.keras.optimizers | dict | None
Instantiated tf.keras.optimizers object or a dict optimizer config
from tf.keras.optimizers.get_config(). None defaults to Adam.
learning_rate : float, optional
Optimizer learning rate. Not used if optimizer input arg is a
pre-initialized object or if optimizer input arg is a config dict.
history : None | pd.DataFrame, optional
Learning history if continuing a training session.
kernel_reg_rate : float, optional
Kernel regularization rate. Increasing this value above zero will
add a structural loss term to the loss function that
disincentivizes large hidden layer weights and should reduce
model complexity. Setting this to 0.0 will disable kernel
regularization.
kernel_reg_power : int, optional
Kernel regularization power. kernel_reg_power=1 is L1
regularization (lasso regression), and kernel_reg_power=2 is L2
regularization (ridge regression).
bias_reg_rate : float, optional
Bias regularization rate. Increasing this value above zero will
add a structural loss term to the loss function that
disincentivizes large hidden layer biases and should reduce
model complexity. Setting this to 0.0 will disable bias
regularization.
bias_reg_power : int, optional
Bias regularization power. bias_reg_power=1 is L1
regularization (lasso regression), and bias_reg_power=2 is L2
regularization (ridge regression).
name : None | str
Optional model name for debugging.
Returns
-------
model : PhygnnModel
Initialized PhygnnModel instance
"""
if isinstance(label_names, str):
label_names = [label_names]
if one_hot_categories is not None:
check_names = feature_names + label_names
PreProcess.check_one_hot_categories(one_hot_categories,
feature_names=check_names)
feature_names = cls.make_one_hot_feature_names(feature_names,
one_hot_categories)
model = PhysicsGuidedNeuralNetwork(p_fun,
loss_weights=loss_weights,
n_features=len(feature_names),
n_labels=len(label_names),
hidden_layers=hidden_layers,
input_layer=input_layer,
output_layer=output_layer,
layers_obj=layers_obj,
metric=metric,
initializer=initializer,
optimizer=optimizer,
learning_rate=learning_rate,
history=history,
kernel_reg_rate=kernel_reg_rate,
kernel_reg_power=kernel_reg_power,
bias_reg_rate=bias_reg_rate,
bias_reg_power=bias_reg_power,
feature_names=feature_names,
output_names=label_names,
name=name)
model = cls(model, feature_names=feature_names,
label_names=label_names, normalize=normalize,
one_hot_categories=one_hot_categories)
return model
@classmethod
def build_trained(cls, p_fun, features, labels, p,
normalize=(True, False),
one_hot_categories=None,
loss_weights=(0.5, 0.5),
hidden_layers=None,
input_layer=None,
output_layer=None,
layers_obj=None,
metric='mae',
initializer=None,
optimizer=None,
learning_rate=0.01,
history=None,
kernel_reg_rate=0.0,
kernel_reg_power=1,
bias_reg_rate=0.0,
bias_reg_power=1,
n_batch=16,
n_epoch=10,
shuffle=True,
validation_split=0.2,
run_preflight=True,
return_diagnostics=False,
p_kwargs=None,
parse_kwargs=None,
save_path=None,
name=None):
"""
Build phygnn model from given features, layers and
kwargs and then train with given labels and kwargs
Parameters
----------
p_fun : function
Physics function to guide the neural network loss function.
This fun must take (phygnn, y_true, y_predicted, p, **p_kwargs)
as arguments with datatypes (PhysicsGuidedNeuralNetwork, tf.Tensor,
np.ndarray, np.ndarray). The function must return a tf.Tensor
object with a single numeric loss value (output.ndim == 0).
features : np.ndarray | pd.DataFrame
Feature data in a >=2D array or DataFrame. If this is a DataFrame,
the index is ignored, the columns are used with self.feature_names,
and the df is converted into a numpy array for batching and passing
to the training algorithm. A 2D input should have the shape:
(n_observations, n_features). A 3D input should have the shape:
(n_observations, n_timesteps, n_features). 4D inputs have not been
tested and should be used with caution.
labels : np.ndarray | pd.DataFrame
Known output data in a 2D array or DataFrame.
Same dimension rules as features.
p : np.ndarray | pd.DataFrame
Supplemental feature data for the physics loss function in 2D array
or DataFrame. Same dimension rules as features.
normalize : bool | tuple, optional
Boolean flag(s) as to whether features and labels should be
normalized. Possible values:
- True means normalize both
- False means don't normalize either
- Tuple of flags (normalize_feature, normalize_label)
by default True
one_hot_categories : dict, optional
Features to one-hot encode using given categories, if None do
not run one-hot encoding, by default None
loss_weights : tuple, optional
Loss weights for the neural network y_true vs y_predicted
and for the p_fun loss, respectively. For example,
loss_weights=(0.0, 1.0) would simplify the phygnn loss function
to just the p_fun output.
hidden_layers : list, optional
List of dictionaries of key word arguments for each hidden
layer in the NN. Dense linear layers can be input with their
activations or separately for more explicit control over the layer
ordering. For example, this is a valid input for hidden_layers that
will yield 8 hidden layers (10 layers including input+output):
[{'units': 64, 'activation': 'relu', 'dropout': 0.01},
{'units': 64},
{'batch_normalization': {'axis': -1}},
{'activation': 'relu'},
{'dropout': 0.01},
{'class': 'Flatten'},
]
input_layer : None | dict
Input layer. specification. Can be a dictionary similar to
hidden_layers specifying a dense / conv / lstm layer. Will
default to a keras InputLayer with input shape = n_features.
output_layer : None | list | dict
Output layer specification. Can be a list/dict similar to
hidden_layers input specifying a dense layer with activation.
For example, for a classfication problem with a single output,
output_layer should be [{'units': 1}, {'activation': 'sigmoid'}].
This defaults to a single dense layer with no activation
(best for regression problems).
layers_obj : None | phygnn.utilities.tf_layers.Layers
Optional initialized Layers object to set as the model layers
including pre-set weights. This option will override the
hidden_layers, input_layer, and output_layer arguments.
metric : str, optional
Loss metric option for the NN loss function (not the physical
loss function). Must be a valid key in phygnn.loss_metrics.METRICS
initializer : tensorflow.keras.initializers, optional
Instantiated initializer object. None defaults to GlorotUniform
optimizer : tensorflow.keras.optimizers | dict | None
Instantiated tf.keras.optimizers object or a dict optimizer config
from tf.keras.optimizers.get_config(). None defaults to Adam.
learning_rate : float, optional
Optimizer learning rate. Not used if optimizer input arg is a
pre-initialized object or if optimizer input arg is a config dict.
history : None | pd.DataFrame, optional
Learning history if continuing a training session.
kernel_reg_rate : float, optional
Kernel regularization rate. Increasing this value above zero will
add a structural loss term to the loss function that
disincentivizes large hidden layer weights and should reduce
model complexity. Setting this to 0.0 will disable kernel
regularization.
kernel_reg_power : int, optional
Kernel regularization power. kernel_reg_power=1 is L1
regularization (lasso regression), and kernel_reg_power=2 is L2
regularization (ridge regression).
bias_reg_rate : float, optional
Bias regularization rate. Increasing this value above zero will
add a structural loss term to the loss function that
disincentivizes large hidden layer biases and should reduce
model complexity. Setting this to 0.0 will disable bias
regularization.
bias_reg_power : int, optional
Bias regularization power. bias_reg_power=1 is L1
regularization (lasso regression), and bias_reg_power=2 is L2
regularization (ridge regression).
n_batch : int
Number of times to update the NN weights per epoch (number of
mini-batches). The training data will be split into this many
mini-batches and the NN will train on each mini-batch, update
weights, then move onto the next mini-batch.
n_epoch : int
Number of times to iterate on the training data.
shuffle : bool
Flag to randomly subset the validation data and batch selection
from features and labels.
validation_split : float
run_preflight : bool
Flag to run preflight checks.
return_diagnostics : bool
Flag to return training diagnostics dictionary.
Fraction of features and labels to use for validation.
p_kwargs : None | dict
Optional kwargs for the physical loss function self._p_fun.
parse_kwargs : dict
kwargs for cls._parse_features
norm_labels : bool, optional
Flag to normalize label, by default True
save_path : str, optional
Directory path to save model to. The tensorflow model will be
saved to the directory while the framework parameters will be
saved in json, by default None
name : None | str
Optional model name for debugging.
Returns
-------
model : TfModel
Initialized and trained TfModel obj
diagnostics : dict, optional
Namespace of training parameters that can be used for diagnostics.
"""
_, feature_names = cls._parse_data(features)
_, label_names = cls._parse_data(labels)
model = cls.build(p_fun, feature_names, label_names,
normalize=normalize,
one_hot_categories=one_hot_categories,
loss_weights=loss_weights,
hidden_layers=hidden_layers,
input_layer=input_layer,
output_layer=output_layer,
layers_obj=layers_obj,
metric=metric,
initializer=initializer,
optimizer=optimizer,
learning_rate=learning_rate,
history=history,
kernel_reg_rate=kernel_reg_rate,
kernel_reg_power=kernel_reg_power,
bias_reg_rate=bias_reg_rate,
bias_reg_power=bias_reg_power,
name=name)
diagnostics = model.train_model(features, labels, p,
n_batch=n_batch,
n_epoch=n_epoch,
shuffle=shuffle,
validation_split=validation_split,
run_preflight=run_preflight,
return_diagnostics=return_diagnostics,
p_kwargs=p_kwargs,
parse_kwargs=parse_kwargs)
if save_path is not None:
model.save_model(save_path)
if diagnostics:
return model, diagnostics
else:
return model
@classmethod
def load(cls, path):
"""
Load model from model path.
Parameters
----------
path : str
Load phygnn model from pickle file.
Returns
-------
model : PhygnnModel
Loaded PhygnnModel from disk.
"""
if not path.endswith(('.json', '.pkl')):
pkl_path = os.path.join(path, os.path.basename(path) + '.pkl')
elif path.endswith('.json'):
pkl_path = path.replace('.pkl', '.json')
elif path.endswith('.pkl'):
pkl_path = path
if not os.path.exists(pkl_path):
e = ('{} does not exist'.format(pkl_path))
logger.error(e)
raise IOError(e)
loaded = cls.MODEL_CLASS.load(pkl_path)
json_path = path.replace('.pkl', '.json')
if not os.path.exists(json_path):
e = ('{} does not exist'.format(json_path))
logger.error(e)
raise IOError(e)
with open(json_path, 'r') as f:
model_params = json.load(f)
model = cls(loaded, **model_params)
return model
| 43.164319
| 79
| 0.570771
| 3,057
| 27,582
| 5.010468
| 0.116454
| 0.009793
| 0.018803
| 0.011491
| 0.794607
| 0.782072
| 0.766207
| 0.757524
| 0.743292
| 0.737873
| 0
| 0.006906
| 0.37006
| 27,582
| 638
| 80
| 43.231975
| 0.874647
| 0.539301
| 0
| 0.466346
| 0
| 0
| 0.018397
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.057692
| false
| 0
| 0.028846
| 0
| 0.144231
| 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
|
bb38e333f21ede2ce7b03073f40e7ea272a171e3
| 29
|
py
|
Python
|
ondocker_testing/test_image/config.py
|
xpersky/one_takes
|
a69385c9698d7c83c7b38f0d5a95b9657e023af3
|
[
"MIT"
] | null | null | null |
ondocker_testing/test_image/config.py
|
xpersky/one_takes
|
a69385c9698d7c83c7b38f0d5a95b9657e023af3
|
[
"MIT"
] | null | null | null |
ondocker_testing/test_image/config.py
|
xpersky/one_takes
|
a69385c9698d7c83c7b38f0d5a95b9657e023af3
|
[
"MIT"
] | null | null | null |
machine_ip = '192.168.99.100'
| 29
| 29
| 0.724138
| 6
| 29
| 3.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.407407
| 0.068966
| 29
| 1
| 29
| 29
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0.466667
| 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
|
bb3f035ad7c61faebadc95ebf43b71dca8e6dbc8
| 53
|
py
|
Python
|
packages/plugin-braze/itly_plugin_braze/__init__.py
|
amplitude/itly-sdk-python
|
ee6b1a20a8eab901a7ff897e4980a824388df6c4
|
[
"MIT"
] | 1
|
2020-11-16T19:42:53.000Z
|
2020-11-16T19:42:53.000Z
|
packages/plugin-braze/itly_plugin_braze/__init__.py
|
iterativelyhq/itly-sdk-python
|
ee6b1a20a8eab901a7ff897e4980a824388df6c4
|
[
"MIT"
] | null | null | null |
packages/plugin-braze/itly_plugin_braze/__init__.py
|
iterativelyhq/itly-sdk-python
|
ee6b1a20a8eab901a7ff897e4980a824388df6c4
|
[
"MIT"
] | null | null | null |
from ._braze_plugin import BrazePlugin, BrazeOptions
| 26.5
| 52
| 0.867925
| 6
| 53
| 7.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09434
| 53
| 1
| 53
| 53
| 0.916667
| 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
|
bb490a233e3480f14a04df312c61768678143733
| 56
|
py
|
Python
|
Python_code/I.py
|
booyakashakawabangha/Contest2
|
087bfa320ca11948e5d04f37e8119303329e1585
|
[
"MIT"
] | null | null | null |
Python_code/I.py
|
booyakashakawabangha/Contest2
|
087bfa320ca11948e5d04f37e8119303329e1585
|
[
"MIT"
] | null | null | null |
Python_code/I.py
|
booyakashakawabangha/Contest2
|
087bfa320ca11948e5d04f37e8119303329e1585
|
[
"MIT"
] | null | null | null |
test = 706
pv = 90
print(test + pv)
print(test + pv + 2)
| 14
| 20
| 0.607143
| 11
| 56
| 3.090909
| 0.545455
| 0.529412
| 0.647059
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.139535
| 0.232143
| 56
| 4
| 20
| 14
| 0.651163
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
bb513a01eb9d5531c8df087c3a9d741027730fc1
| 9,106
|
py
|
Python
|
code/imgaug/augmenters/flip.py
|
Pandinosaurus/Recurrent-Convolutional-Fusion
|
0849b7bc43c76d4ce6538ca4c3a8a7ec6f6c9c08
|
[
"MIT"
] | 17
|
2019-07-16T16:55:12.000Z
|
2021-07-13T08:25:53.000Z
|
code/imgaug/augmenters/flip.py
|
Pandinosaurus/Recurrent-Convolutional-Fusion
|
0849b7bc43c76d4ce6538ca4c3a8a7ec6f6c9c08
|
[
"MIT"
] | 4
|
2019-08-19T14:16:30.000Z
|
2020-12-04T00:57:19.000Z
|
code/imgaug/augmenters/flip.py
|
Pandinosaurus/Recurrent-Convolutional-Fusion
|
0849b7bc43c76d4ce6538ca4c3a8a7ec6f6c9c08
|
[
"MIT"
] | 6
|
2019-08-18T08:58:50.000Z
|
2021-11-14T05:51:10.000Z
|
"""
Augmenters that apply mirroring/flipping operations to images.
Do not import directly from this file, as the categorization is not final.
Use instead
`from imgaug import augmenters as iaa`
and then e.g. ::
seq = iaa.Sequential([
iaa.Fliplr((0.0, 1.0)),
iaa.Flipud((0.0, 1.0))
])
List of augmenters:
* Fliplr
* Flipud
"""
from __future__ import print_function, division, absolute_import
from .. import imgaug as ia
# TODO replace these imports with iap.XYZ
from ..parameters import StochasticParameter, Deterministic, Binomial, Choice, DiscreteUniform, Normal, Uniform, FromLowerResolution
from .. import parameters as iap
from abc import ABCMeta, abstractmethod
import random
import numpy as np
import copy as copy_module
import re
import math
from scipy import misc, ndimage
from skimage import transform as tf, segmentation, measure
import itertools
import cv2
import six
import six.moves as sm
import types
import warnings
from .meta import Augmenter
class Fliplr(Augmenter):
"""
Flip/mirror input images horizontally.
Parameters
----------
p : int or float or StochasticParameter, optional(default=0)
Probability of each image to get flipped.
name : string, optional(default=None)
See `Augmenter.__init__()`
deterministic : bool, optional(default=False)
See `Augmenter.__init__()`
random_state : int or np.random.RandomState or None, optional(default=None)
See `Augmenter.__init__()`
Examples
--------
>>> aug = iaa.Fliplr(0.5)
would horizontally flip/mirror 50 percent of all input images.
>>> aug = iaa.Fliplr(1.0)
would horizontally flip/mirror all input images.
"""
def __init__(self, p=0, name=None, deterministic=False, random_state=None):
super(Fliplr, self).__init__(name=name, deterministic=deterministic, random_state=random_state)
if ia.is_single_number(p):
self.p = Binomial(p)
elif isinstance(p, StochasticParameter):
self.p = p
else:
raise Exception("Expected p to be int or float or StochasticParameter, got %s." % (type(p),))
def _augment_images(self, images, random_state, parents, hooks):
nb_images = len(images)
samples = self.p.draw_samples((nb_images,), random_state=random_state)
for i in sm.xrange(nb_images):
if samples[i] == 1:
images[i] = np.fliplr(images[i])
return images
def _augment_keypoints(self, keypoints_on_images, random_state, parents, hooks):
nb_images = len(keypoints_on_images)
samples = self.p.draw_samples((nb_images,), random_state=random_state)
for i, keypoints_on_image in enumerate(keypoints_on_images):
if samples[i] == 1:
width = keypoints_on_image.shape[1]
for keypoint in keypoints_on_image.keypoints:
keypoint.x = (width - 1) - keypoint.x
return keypoints_on_images
def get_parameters(self):
return [self.p]
class Flipud(Augmenter):
"""
Flip/mirror input images vertically.
Parameters
----------
p : int or float or StochasticParameter, optional(default=0)
Probability of each image to get flipped.
name : string, optional(default=None)
See `Augmenter.__init__()`
deterministic : bool, optional(default=False)
See `Augmenter.__init__()`
random_state : int or np.random.RandomState or None, optional(default=None)
See `Augmenter.__init__()`
Examples
--------
>>> aug = iaa.Flipud(0.5)
would vertically flip/mirror 50 percent of all input images.
>>> aug = iaa.Flipud(1.0)
would vertically flip/mirror all input images.
"""
def __init__(self, p=0, name=None, deterministic=False, random_state=None):
super(Flipud, self).__init__(name=name, deterministic=deterministic, random_state=random_state)
if ia.is_single_number(p):
self.p = Binomial(p)
elif isinstance(p, StochasticParameter):
self.p = p
else:
raise Exception("Expected p to be int or float or StochasticParameter, got %s." % (type(p),))
def _augment_images(self, images, random_state, parents, hooks):
nb_images = len(images)
samples = self.p.draw_samples((nb_images,), random_state=random_state)
for i in sm.xrange(nb_images):
if samples[i] == 1:
images[i] = np.flipud(images[i])
return images
def _augment_keypoints(self, keypoints_on_images, random_state, parents, hooks):
nb_images = len(keypoints_on_images)
samples = self.p.draw_samples((nb_images,), random_state=random_state)
for i, keypoints_on_image in enumerate(keypoints_on_images):
if samples[i] == 1:
height = keypoints_on_image.shape[0]
for keypoint in keypoints_on_image.keypoints:
keypoint.y = (height - 1) - keypoint.y
return keypoints_on_images
def get_parameters(self):
return [self.p]
'''
class Rettangolo(Augmenter):
def _augment_images(self, image,x,y,p_x,p_y):
# x e y saranno in percentuale (valori da 0--1) ma il limite deve essere 0.5
# p_x e p_x punto da cui parte il rettangolo (influenzeranno il limite del rettangolo)
# di x e y
x = x * 100
y = y * 100
#print ("le dim sono " , image.shape) # 256 224
lato_x = image.shape[1] #224
lato_y = image.shape[0] #256
#print ("le ascisse sono " ,lato_x)
#print ("le ordinate sono ", lato_y)
x_lunghezza = int ( round( ( x * lato_x ) / 100.0 ) )
y_lunghezza = int ( round( ( y * lato_y ) / 100.0 ) )
print x_lunghezza
if ( (p_x + x_lunghezza) >= lato_x ):
x_lunghezza = x_lunghezza - (( p_x + x_lunghezza ) - lato_x )
if ( (p_y + y_lunghezza) >= lato_y ):
y_lunghezza = y_lunghezza - (( p_y + y_lunghezza ) - lato_y )
print x_lunghezza
media = np.mean(image)
print ("media" , media)
for i in range(0,x_lunghezza):
for j in range(0,y_lunghezza):
#print image_mod.shape
image[p_y+j][p_x+i][0] = np.mean(image[:][:][0])
image[p_y+j][p_x+i][1] = np.mean(image[:][:][1])
image[p_y+j][p_x+i][2] = np.mean(image[:][:][2])
return image
'''
class Rettangolo(Augmenter):
def __init__(self, x,y,p_x,p_y, name=None, deterministic=False, random_state=None):
super(Rettangolo, self).__init__(name=name, deterministic=deterministic, random_state=random_state)
self.x = x
self.y = y
self.p_x = p_x
self.p_y = p_y
def _augment_images(self, images, random_state, parents, hooks):
# x e y saranno in percentuale (valori da 0--1) ma il limite deve essere 0.5
# p_x e p_x punto da cui parte il rettangolo (influenzeranno il limite del rettangolo)
# di x e y
x = self.x
y = self.y
p_x = self.p_x
p_y = self.p_y
nb_images = len(images)
#samples = self.p.draw_samples((nb_images,), random_state=random_state)
for i in sm.xrange(nb_images):
image = images[i]
x = x * 100
y = y * 100
#print ("le dim sono " , image.shape) # 256 224
lato_x = image.shape[1] #224
lato_y = image.shape[0] #256
#print ("le ascisse sono " ,lato_x)
#print ("le ordinate sono ", lato_y)
x_lunghezza = int ( round( ( x * lato_x ) / 100.0 ) )
y_lunghezza = int ( round( ( y * lato_y ) / 100.0 ) )
#print (x_lunghezza)
if ( (p_x + x_lunghezza) >= lato_x ):
x_lunghezza = x_lunghezza - (( p_x + x_lunghezza ) - lato_x )
if ( (p_y + y_lunghezza) >= lato_y ):
y_lunghezza = y_lunghezza - (( p_y + y_lunghezza ) - lato_y )
#print ("",x_lunghezza)
media = np.mean(image)
#print ("media" , media)
media_0 = np.mean(image[:][:][0])
media_1 = np.mean(image[:][:][1])
media_2 = np.mean(image[:][:][2])
for ii in range(0,x_lunghezza):
for j in range(0,y_lunghezza):
#print image_mod.shape
image[p_y+j][p_x+ii][0] = media_0
image[p_y+j][p_x+ii][1] = media_1
image[p_y+j][p_x+ii][2] = media_2
return images
def _augment_keypoints(self, keypoints_on_images, random_state, parents, hooks):
nb_images = len(keypoints_on_images)
samples = self.p.draw_samples((nb_images,), random_state=random_state)
for i, keypoints_on_image in enumerate(keypoints_on_images):
if samples[i] == 1:
width = keypoints_on_image.shape[1]
for keypoint in keypoints_on_image.keypoints:
keypoint.x = (width - 1) - keypoint.x
return keypoints_on_images
def get_parameters(self):
return [self.p]
| 33.112727
| 132
| 0.612453
| 1,240
| 9,106
| 4.287903
| 0.152419
| 0.059996
| 0.038368
| 0.037239
| 0.780891
| 0.755313
| 0.753056
| 0.743088
| 0.725785
| 0.716569
| 0
| 0.018527
| 0.27685
| 9,106
| 275
| 133
| 33.112727
| 0.788914
| 0.226334
| 0
| 0.512605
| 0
| 0
| 0.021809
| 0
| 0
| 0
| 0
| 0.003636
| 0
| 1
| 0.10084
| false
| 0
| 0.159664
| 0.02521
| 0.361345
| 0.008403
| 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
|
247dc2e0fad5eb4c4613e6e833876e3e595c130a
| 386
|
py
|
Python
|
tests/math/test_mat4.py
|
anibali/glip
|
50359cdab0064ce233f368039439f4ac1e39e0f9
|
[
"Apache-2.0"
] | null | null | null |
tests/math/test_mat4.py
|
anibali/glip
|
50359cdab0064ce233f368039439f4ac1e39e0f9
|
[
"Apache-2.0"
] | null | null | null |
tests/math/test_mat4.py
|
anibali/glip
|
50359cdab0064ce233f368039439f4ac1e39e0f9
|
[
"Apache-2.0"
] | null | null | null |
import numpy as np
from glip.math import mat4
def test_is_similarity():
assert mat4.is_similarity(mat4.translate(4.0, 56.7, 2.3))
assert mat4.is_similarity(mat4.rotate_axis_angle(0, 1, 0, 0.453))
assert mat4.is_similarity(mat4.scale(1, -1, 1))
assert not mat4.is_similarity(mat4.scale(2, 1, 1))
assert not mat4.is_similarity(mat4.affine(A=np.random.randn(3, 3)))
| 32.166667
| 71
| 0.717617
| 70
| 386
| 3.828571
| 0.442857
| 0.268657
| 0.298507
| 0.373134
| 0.559701
| 0.231343
| 0.231343
| 0.231343
| 0
| 0
| 0
| 0.099698
| 0.142487
| 386
| 11
| 72
| 35.090909
| 0.70997
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.625
| 1
| 0.125
| true
| 0
| 0.25
| 0
| 0.375
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
247f9cb6b4cdc5d7cc056026b475bab1202fc3dc
| 53
|
py
|
Python
|
example_SetlX_stat_code/stat_python_code/stat_exponentialCDF.py
|
leonmutschke/setlX
|
a10333405cba3d9d814d7de9e160561bd5fa4f76
|
[
"BSD-3-Clause"
] | 28
|
2015-01-14T11:12:02.000Z
|
2022-02-15T21:06:05.000Z
|
example_SetlX_stat_code/stat_python_code/stat_exponentialCDF.py
|
leonmutschke/setlX
|
a10333405cba3d9d814d7de9e160561bd5fa4f76
|
[
"BSD-3-Clause"
] | 6
|
2016-08-01T14:21:37.000Z
|
2018-06-03T17:15:00.000Z
|
example_SetlX_stat_code/stat_python_code/stat_exponentialCDF.py
|
leonmutschke/setlX
|
a10333405cba3d9d814d7de9e160561bd5fa4f76
|
[
"BSD-3-Clause"
] | 18
|
2015-02-11T21:10:18.000Z
|
2018-05-02T07:41:41.000Z
|
from scipy.stats import expon
print(expon.cdf(2,0,6))
| 26.5
| 29
| 0.773585
| 11
| 53
| 3.727273
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.061224
| 0.075472
| 53
| 2
| 30
| 26.5
| 0.77551
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
|
0
| 5
|
24bae56ca6cf1801ff1dfeac6d7d6a4f888b65f5
| 38
|
py
|
Python
|
src/pen/exceptions.py
|
pspeter/pen
|
a1016a105f2dfd196aabc8704d16afbeb5e81358
|
[
"MIT"
] | null | null | null |
src/pen/exceptions.py
|
pspeter/pen
|
a1016a105f2dfd196aabc8704d16afbeb5e81358
|
[
"MIT"
] | 1
|
2020-02-19T22:32:45.000Z
|
2020-02-19T22:32:45.000Z
|
src/pen/exceptions.py
|
pspeter/pen
|
a1016a105f2dfd196aabc8704d16afbeb5e81358
|
[
"MIT"
] | null | null | null |
class UsageError(Exception):
pass
| 12.666667
| 28
| 0.736842
| 4
| 38
| 7
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.184211
| 38
| 2
| 29
| 19
| 0.903226
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
24c18f1312e6689be4235312d3ddc223c847db59
| 118
|
py
|
Python
|
app/raspberryPiUtilities/__init__.py
|
DeschutesBrewery/brewerypi
|
5459dfc6b1ed415920c13a8a7c9a2d3d3c82099f
|
[
"MIT"
] | 27
|
2017-11-27T05:01:05.000Z
|
2020-11-14T19:52:26.000Z
|
app/raspberryPiUtilities/__init__.py
|
DeschutesBrewery/brewerypi
|
5459dfc6b1ed415920c13a8a7c9a2d3d3c82099f
|
[
"MIT"
] | 259
|
2017-11-23T00:43:26.000Z
|
2020-11-03T01:07:30.000Z
|
app/raspberryPiUtilities/__init__.py
|
DeschutesBrewery/brewerypi
|
5459dfc6b1ed415920c13a8a7c9a2d3d3c82099f
|
[
"MIT"
] | 8
|
2018-10-29T04:39:29.000Z
|
2020-10-01T22:18:12.000Z
|
from flask import Blueprint
raspberryPiUtilities = Blueprint("raspberryPiUtilities", __name__)
from . import routes
| 19.666667
| 66
| 0.822034
| 11
| 118
| 8.454545
| 0.636364
| 0.623656
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.118644
| 118
| 5
| 67
| 23.6
| 0.894231
| 0
| 0
| 0
| 0
| 0
| 0.169492
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0.666667
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
|
0
| 5
|
24c8f122314ea2ede7e784f05bfd83f131cac504
| 88
|
py
|
Python
|
src/examples/incomplete/nn_topology_object_oriented/Neuron.py
|
calebebrim/GeneticAlgorithm
|
93475adfac4bba145054e1bbb3acfad77505fa85
|
[
"MIT"
] | null | null | null |
src/examples/incomplete/nn_topology_object_oriented/Neuron.py
|
calebebrim/GeneticAlgorithm
|
93475adfac4bba145054e1bbb3acfad77505fa85
|
[
"MIT"
] | null | null | null |
src/examples/incomplete/nn_topology_object_oriented/Neuron.py
|
calebebrim/GeneticAlgorithm
|
93475adfac4bba145054e1bbb3acfad77505fa85
|
[
"MIT"
] | null | null | null |
class Neuron:
# TODO: Create abstraction of generic unsupervised neuron
pass
| 12.571429
| 61
| 0.715909
| 10
| 88
| 6.3
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.25
| 88
| 6
| 62
| 14.666667
| 0.954545
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 0
| 1
| 0
| 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
| 1
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
7044acd7ffe6361011c103b7dd7d39d175ccd47b
| 201
|
py
|
Python
|
tests/context.py
|
rtlee9/SIC-list
|
bb4b535f421320b1dfa57bc58163e2a17f9b6a4c
|
[
"Apache-2.0"
] | 7
|
2017-11-30T18:01:02.000Z
|
2022-03-07T01:44:32.000Z
|
tests/context.py
|
rtlee9/SIC-list
|
bb4b535f421320b1dfa57bc58163e2a17f9b6a4c
|
[
"Apache-2.0"
] | 1
|
2016-08-27T16:52:13.000Z
|
2016-08-27T16:52:13.000Z
|
tests/context.py
|
rtlee9/SIC-list
|
bb4b535f421320b1dfa57bc58163e2a17f9b6a4c
|
[
"Apache-2.0"
] | 4
|
2017-01-10T17:12:15.000Z
|
2020-03-30T07:41:43.000Z
|
import sys
from os import path
sys.path.insert(0, path.join(path.dirname(path.dirname(__file__)), 'src'))
import scrape_sic_sec
import scrape_sic_osha
path_test = path.dirname(path.abspath(__file__))
| 25.125
| 74
| 0.79602
| 33
| 201
| 4.454545
| 0.515152
| 0.22449
| 0.204082
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005435
| 0.084577
| 201
| 7
| 75
| 28.714286
| 0.793478
| 0
| 0
| 0
| 0
| 0
| 0.014925
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
704b0e1ea02f314f6b1994dc366ed4b556555898
| 96
|
py
|
Python
|
enthought/chaco/tools/lasso_selection.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | 3
|
2016-12-09T06:05:18.000Z
|
2018-03-01T13:00:29.000Z
|
enthought/chaco/tools/lasso_selection.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | 1
|
2020-12-02T00:51:32.000Z
|
2020-12-02T08:48:55.000Z
|
enthought/chaco/tools/lasso_selection.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | null | null | null |
# proxy module
from __future__ import absolute_import
from chaco.tools.lasso_selection import *
| 24
| 41
| 0.84375
| 13
| 96
| 5.769231
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.114583
| 96
| 3
| 42
| 32
| 0.882353
| 0.125
| 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
|
705e5a2a680d153f08e86b9b8945d937256b2c59
| 186
|
py
|
Python
|
neurotic/nlp/machine_translation/__init__.py
|
necromuralist/Neurotic-Networking
|
20f46dec5d890bd57abd802b6ebf219f0e8e7611
|
[
"MIT"
] | null | null | null |
neurotic/nlp/machine_translation/__init__.py
|
necromuralist/Neurotic-Networking
|
20f46dec5d890bd57abd802b6ebf219f0e8e7611
|
[
"MIT"
] | 3
|
2021-01-11T01:42:31.000Z
|
2021-11-10T19:44:25.000Z
|
neurotic/nlp/machine_translation/__init__.py
|
necromuralist/Neurotic-Networking
|
20f46dec5d890bd57abd802b6ebf219f0e8e7611
|
[
"MIT"
] | null | null | null |
from .data_generator import DataGenerator, MAX_LENGTH, detokenize, tokenize
from .help_me import input_encoder, pre_attention_decoder, prepare_attention_input
from .model import NMTAttn
| 46.5
| 82
| 0.865591
| 25
| 186
| 6.12
| 0.76
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.091398
| 186
| 3
| 83
| 62
| 0.905325
| 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
|
7086f74618d45bce22dc60c4c5be66d94f65a5b0
| 313
|
py
|
Python
|
service/LifeCycleApi.py
|
liorperry/fuzz
|
2d49b2ea62b59f2790797a93be6a68aae8a150f7
|
[
"MIT"
] | 1
|
2020-04-23T08:11:40.000Z
|
2020-04-23T08:11:40.000Z
|
service/LifeCycleApi.py
|
liorperry/fuzz
|
2d49b2ea62b59f2790797a93be6a68aae8a150f7
|
[
"MIT"
] | null | null | null |
service/LifeCycleApi.py
|
liorperry/fuzz
|
2d49b2ea62b59f2790797a93be6a68aae8a150f7
|
[
"MIT"
] | null | null | null |
import abc
class LifeCycleApi(abc.ABC):
@abc.abstractmethod
def run(self, command):
pass
@abc.abstractmethod
def pause(self, command):
pass
@abc.abstractmethod
def restart(self, command):
pass
@abc.abstractmethod
def stop(self, command):
pass
| 14.904762
| 31
| 0.610224
| 34
| 313
| 5.617647
| 0.382353
| 0.356021
| 0.418848
| 0.282723
| 0.549738
| 0.549738
| 0
| 0
| 0
| 0
| 0
| 0
| 0.300319
| 313
| 20
| 32
| 15.65
| 0.872146
| 0
| 0
| 0.571429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0.285714
| 0.071429
| 0
| 0.428571
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
5629bd253ae2d3929384d337cd954c562c853978
| 65
|
py
|
Python
|
CIRCUITPY/helloworld.py
|
mikepschneider/circuitpy_ms
|
1242a96171f5b436f53807b7a6893315022f292b
|
[
"MIT"
] | 1
|
2018-10-31T18:43:30.000Z
|
2018-10-31T18:43:30.000Z
|
CIRCUITPY/helloworld.py
|
mikepschneider/circuitpy_ms
|
1242a96171f5b436f53807b7a6893315022f292b
|
[
"MIT"
] | null | null | null |
CIRCUITPY/helloworld.py
|
mikepschneider/circuitpy_ms
|
1242a96171f5b436f53807b7a6893315022f292b
|
[
"MIT"
] | null | null | null |
import time
print("HELLO WORLD %sms" % (time.monotonic() / 1000))
| 32.5
| 53
| 0.692308
| 9
| 65
| 5
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.070175
| 0.123077
| 65
| 2
| 53
| 32.5
| 0.719298
| 0
| 0
| 0
| 0
| 0
| 0.242424
| 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
|
3b28da421a779cbd510e9ae6aa57cea5145ea13f
| 11,882
|
py
|
Python
|
irods/test/pool_test.py
|
trel/python-irodsclient
|
228fd6d39e1e6b5a72fb3a3301105b7bea2422a9
|
[
"Xnet",
"X11"
] | 54
|
2015-03-27T11:16:58.000Z
|
2022-03-05T03:31:49.000Z
|
irods/test/pool_test.py
|
trel/python-irodsclient
|
228fd6d39e1e6b5a72fb3a3301105b7bea2422a9
|
[
"Xnet",
"X11"
] | 316
|
2015-02-13T19:57:11.000Z
|
2022-03-31T09:50:53.000Z
|
irods/test/pool_test.py
|
trel/python-irodsclient
|
228fd6d39e1e6b5a72fb3a3301105b7bea2422a9
|
[
"Xnet",
"X11"
] | 81
|
2015-01-27T21:58:59.000Z
|
2022-02-25T08:06:56.000Z
|
#! /usr/bin/env python
from __future__ import absolute_import
import datetime
import os
import re
import sys
import time
import json
import unittest
import irods.test.helpers as helpers
# Regular expression to match common synonyms for localhost.
#
LOCALHOST_REGEX = re.compile(r"""^(127(\.\d+){1,3}|[0:]+1|(.*-)?localhost(\.\w+)?)$""",re.IGNORECASE)
USE_ONLY_LOCALHOST = False
class TestPool(unittest.TestCase):
config_extension = ".json"
test_extension = ""
preferred_parameters = {}
@classmethod
def setUpClass(cls): # generate test env files using connect data from ~/.irods environment
if USE_ONLY_LOCALHOST: return
Nonlocal_Ext = ".test"
with helpers.make_session() as session:
cls.preferred_parameters = { 'irods_host':session.host,
'irods_port':session.port,
'irods_user_name':session.username,
'irods_zone_name':session.zone }
test_configs_dir = os.path.join(irods_test_path(),"test-data")
for config in [os.path.join(test_configs_dir,f) for f in os.listdir(test_configs_dir)
if f.endswith(cls.config_extension)]:
with open(config,"r") as in_, open(config + Nonlocal_Ext,"w") as out_:
cf = json.load(in_)
cf.update(cls.preferred_parameters)
json.dump(cf, out_,indent=4)
cls.test_extension = Nonlocal_Ext
def setUp(self):
self.sess = helpers.make_session(
irods_env_file=os.path.join(irods_test_path(),"test-data","irods_environment.json" + self.test_extension))
if USE_ONLY_LOCALHOST and not LOCALHOST_REGEX.match (self.sess.host):
self.skipTest('for non-local server')
def tearDown(self):
'''Close connections
'''
self.sess.cleanup()
def test_release_connection(self):
with self.sess.pool.get_connection():
self.assertEqual(1, len(self.sess.pool.active))
self.assertEqual(0, len(self.sess.pool.idle))
self.assertEqual(0, len(self.sess.pool.active))
self.assertEqual(1, len(self.sess.pool.idle))
def test_destroy_active(self):
with self.sess.pool.get_connection() as conn:
self.assertEqual(1, len(self.sess.pool.active))
self.assertEqual(0, len(self.sess.pool.idle))
conn.release(destroy=True)
self.assertEqual(0, len(self.sess.pool.active))
self.assertEqual(0, len(self.sess.pool.idle))
def test_destroy_idle(self):
with self.sess.pool.get_connection():
self.assertEqual(1, len(self.sess.pool.active))
self.assertEqual(0, len(self.sess.pool.idle))
# cleanup all connections
self.sess.cleanup()
self.assertEqual(0, len(self.sess.pool.active))
self.assertEqual(0, len(self.sess.pool.idle))
def test_release_disconnected(self):
with self.sess.pool.get_connection() as conn:
self.assertEqual(1, len(self.sess.pool.active))
self.assertEqual(0, len(self.sess.pool.idle))
conn.disconnect()
# even though disconnected, gets put into idle
self.assertEqual(0, len(self.sess.pool.active))
self.assertEqual(1, len(self.sess.pool.idle))
# should remove all connections
self.sess.cleanup()
self.assertEqual(0, len(self.sess.pool.active))
self.assertEqual(0, len(self.sess.pool.idle))
def test_connection_create_time(self):
# Get a connection and record its object ID and create_time
# Release the connection (goes from active to idle queue)
# Again, get a connection. Should get the same connection back.
# I.e., the object IDs should match. However, the new connection
# should have a more recent 'last_used_time'
conn_obj_id_1 = None
conn_obj_id_2 = None
create_time_1 = None
create_time_2 = None
last_used_time_1 = None
last_used_time_2 = None
with self.sess.pool.get_connection() as conn:
conn_obj_id_1 = id(conn)
curr_time = datetime.datetime.now()
create_time_1 = conn.create_time
last_used_time_1 = conn.last_used_time
self.assertTrue(curr_time >= create_time_1)
self.assertTrue(curr_time >= last_used_time_1)
self.assertEqual(1, len(self.sess.pool.active))
self.assertEqual(0, len(self.sess.pool.idle))
self.sess.pool.release_connection(conn)
self.assertEqual(0, len(self.sess.pool.active))
self.assertEqual(1, len(self.sess.pool.idle))
with self.sess.pool.get_connection() as conn:
conn_obj_id_2 = id(conn)
curr_time = datetime.datetime.now()
create_time_2 = conn.create_time
last_used_time_2 = conn.last_used_time
self.assertEqual(conn_obj_id_1, conn_obj_id_2)
self.assertTrue(curr_time >= create_time_2)
self.assertTrue(curr_time >= last_used_time_2)
self.assertTrue(last_used_time_2 >= last_used_time_1)
self.assertEqual(1, len(self.sess.pool.active))
self.assertEqual(0, len(self.sess.pool.idle))
self.sess.pool.release_connection(conn)
self.assertEqual(0, len(self.sess.pool.active))
self.assertEqual(1, len(self.sess.pool.idle))
self.sess.pool.release_connection(conn, True)
self.assertEqual(0, len(self.sess.pool.active))
self.assertEqual(0, len(self.sess.pool.idle))
def test_refresh_connection(self):
# Set 'irods_connection_refresh_time' to '3' (in seconds) in
# ~/.irods/irods_environment.json file. This means any connection
# that was created more than 3 seconds ago will be dropped and
# a new connection is created/returned. This is to avoid
# issue with idle connections that are dropped.
conn_obj_id_1 = None
conn_obj_id_2 = None
create_time_1 = None
create_time_2 = None
last_used_time_1 = None
last_used_time_2 = None
with self.sess.pool.get_connection() as conn:
conn_obj_id_1 = id(conn)
curr_time = datetime.datetime.now()
create_time_1 = conn.create_time
last_used_time_1 = conn.last_used_time
self.assertTrue(curr_time >= create_time_1)
self.assertTrue(curr_time >= last_used_time_1)
self.assertEqual(1, len(self.sess.pool.active))
self.assertEqual(0, len(self.sess.pool.idle))
self.sess.pool.release_connection(conn)
self.assertEqual(0, len(self.sess.pool.active))
self.assertEqual(1, len(self.sess.pool.idle))
# Wait more than 'irods_connection_refresh_time' seconds,
# which is set to 3. Connection object should have a different
# object ID (as a new connection is created)
time.sleep(5)
with self.sess.pool.get_connection() as conn:
conn_obj_id_2 = id(conn)
curr_time = datetime.datetime.now()
create_time_2 = conn.create_time
last_used_time_2 = conn.last_used_time
self.assertTrue(curr_time >= create_time_2)
self.assertTrue(curr_time >= last_used_time_2)
self.assertNotEqual(conn_obj_id_1, conn_obj_id_2)
self.assertTrue(create_time_2 > create_time_1)
self.assertEqual(1, len(self.sess.pool.active))
self.assertEqual(0, len(self.sess.pool.idle))
self.sess.pool.release_connection(conn, True)
self.assertEqual(0, len(self.sess.pool.active))
self.assertEqual(0, len(self.sess.pool.idle))
def test_no_refresh_connection(self):
# Set 'irods_connection_refresh_time' to '3' (in seconds) in
# ~/.irods/irods_environment.json file. This means any connection
# created more than 3 seconds ago will be dropped and
# a new connection is created/returned. This is to avoid
# issue with idle connections that are dropped.
conn_obj_id_1 = None
conn_obj_id_2 = None
create_time_1 = None
create_time_2 = None
last_used_time_1 = None
last_used_time_2 = None
with self.sess.pool.get_connection() as conn:
conn_obj_id_1 = id(conn)
curr_time = datetime.datetime.now()
create_time_1 = conn.create_time
last_used_time_1 = conn.last_used_time
self.assertTrue(curr_time >= create_time_1)
self.assertTrue(curr_time >= last_used_time_1)
self.assertEqual(1, len(self.sess.pool.active))
self.assertEqual(0, len(self.sess.pool.idle))
self.sess.pool.release_connection(conn)
self.assertEqual(0, len(self.sess.pool.active))
self.assertEqual(1, len(self.sess.pool.idle))
# Wait less than 'irods_connection_refresh_time' seconds,
# which is set to 3. Connection object should have the same
# object ID (as idle time is less than 'irods_connection_refresh_time')
time.sleep(1)
with self.sess.pool.get_connection() as conn:
conn_obj_id_2 = id(conn)
curr_time = datetime.datetime.now()
create_time_2 = conn.create_time
last_used_time_2 = conn.last_used_time
self.assertTrue(curr_time >= create_time_2)
self.assertTrue(curr_time >= last_used_time_2)
self.assertEqual(conn_obj_id_1, conn_obj_id_2)
self.assertTrue(create_time_2 >= create_time_1)
self.assertEqual(1, len(self.sess.pool.active))
self.assertEqual(0, len(self.sess.pool.idle))
self.sess.pool.release_connection(conn, True)
self.assertEqual(0, len(self.sess.pool.active))
self.assertEqual(0, len(self.sess.pool.idle))
def test_get_connection_refresh_time_no_env_file_input_param(self):
connection_refresh_time = self.sess.get_connection_refresh_time(first_name="Magic", last_name="Johnson")
self.assertEqual(connection_refresh_time, -1)
def test_get_connection_refresh_time_none_existant_env_file(self):
connection_refresh_time = self.sess.get_connection_refresh_time(
irods_env_file=os.path.join(irods_test_path(),"test-data","irods_environment_non_existant.json" + self.test_extension))
self.assertEqual(connection_refresh_time, -1)
def test_get_connection_refresh_time_no_connection_refresh_field(self):
connection_refresh_time = self.sess.get_connection_refresh_time(
irods_env_file=os.path.join(irods_test_path(),"test-data","irods_environment_no_refresh_field.json" + self.test_extension))
self.assertEqual(connection_refresh_time, -1)
def test_get_connection_refresh_time_negative_connection_refresh_field(self):
connection_refresh_time = self.sess.get_connection_refresh_time(
irods_env_file=os.path.join(irods_test_path(),"test-data","irods_environment_negative_refresh_field.json" + self.test_extension))
self.assertEqual(connection_refresh_time, -1)
def test_get_connection_refresh_time(self):
default_path = os.path.join (irods_test_path(),"test-data","irods_environment.json" + self.test_extension)
connection_refresh_time = self.sess.get_connection_refresh_time(irods_env_file=default_path)
self.assertEqual(connection_refresh_time, 3)
def irods_test_path():
return os.path.dirname(__file__)
if __name__ == '__main__':
# let the tests find the parent irods lib
sys.path.insert(0, os.path.abspath('../..'))
unittest.main()
| 43.364964
| 141
| 0.65351
| 1,600
| 11,882
| 4.591875
| 0.12125
| 0.07731
| 0.099633
| 0.089833
| 0.759766
| 0.751735
| 0.746563
| 0.742752
| 0.735674
| 0.735674
| 0
| 0.014088
| 0.247265
| 11,882
| 273
| 142
| 43.52381
| 0.807357
| 0.126494
| 0
| 0.64467
| 0
| 0
| 0.036153
| 0.02059
| 0
| 0
| 0
| 0
| 0.340102
| 1
| 0.081218
| false
| 0
| 0.045685
| 0.005076
| 0.152284
| 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
|
3b4c72cd6529cbf76da62895f648e1fe7b445f19
| 150
|
py
|
Python
|
emails/app_settings.py
|
fmalina/emails
|
9bb467433e9ad8c8109d76edc894eaaaa309466d
|
[
"BSD-3-Clause"
] | 4
|
2015-04-02T11:59:32.000Z
|
2017-07-08T21:33:11.000Z
|
emails/app_settings.py
|
fmalina/django-emails
|
66f22c10e433620693d4fee67b5a49f0aecb7ea1
|
[
"BSD-3-Clause"
] | null | null | null |
emails/app_settings.py
|
fmalina/django-emails
|
66f22c10e433620693d4fee67b5a49f0aecb7ea1
|
[
"BSD-3-Clause"
] | null | null | null |
from django.conf import settings
def fix_typo_email(user, new):
pass
EMAILS_FIX_TYPOS = getattr(settings, 'EMAILS_FIX_TYPOS', fix_typo_email)
| 16.666667
| 72
| 0.78
| 23
| 150
| 4.73913
| 0.652174
| 0.12844
| 0.220183
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.14
| 150
| 8
| 73
| 18.75
| 0.844961
| 0
| 0
| 0
| 0
| 0
| 0.106667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0.25
| 0.25
| 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
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
3b657e8f4009cb48b8b072958676b9028b29346f
| 264
|
py
|
Python
|
FreeTAKServer/controllers/FilterGroupController.py
|
logikal/FreeTakServer
|
c0916ce65781b5c60079d6440e52db8fc6ee0467
|
[
"MIT"
] | 27
|
2020-05-01T01:45:59.000Z
|
2020-07-03T00:17:13.000Z
|
FreeTAKServer/controllers/FilterGroupController.py
|
logikal/FreeTakServer
|
c0916ce65781b5c60079d6440e52db8fc6ee0467
|
[
"MIT"
] | 34
|
2020-04-26T11:25:52.000Z
|
2020-07-03T21:06:34.000Z
|
FreeTAKServer/controllers/FilterGroupController.py
|
logikal/FreeTakServer
|
c0916ce65781b5c60079d6440e52db8fc6ee0467
|
[
"MIT"
] | 15
|
2020-05-01T01:46:07.000Z
|
2020-07-03T12:14:04.000Z
|
class FilterGroupController:
def __init__(self, filterGroups):
self.filterGroups = filterGroups
def sendCoT(self, CoT):
pass
def addUser(self, clientInformation):
pass
def removeUser(self, clientInformation):
pass
| 22
| 44
| 0.662879
| 24
| 264
| 7.125
| 0.5
| 0.187135
| 0.292398
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.265152
| 264
| 12
| 45
| 22
| 0.881443
| 0
| 0
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.444444
| false
| 0.333333
| 0
| 0
| 0.555556
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
8e84317db4f01cffee22de5b46798b33c3206553
| 95
|
py
|
Python
|
pylas implementation/pylas/vlrs/__init__.py
|
AJTech2002/Point-Cloud-Tiler
|
6b79371f1b4f8de0e212b75206fbbeb846484ab1
|
[
"Apache-2.0"
] | 2
|
2021-03-11T20:19:39.000Z
|
2021-08-18T08:31:49.000Z
|
pylas implementation/pylas/vlrs/__init__.py
|
AJTech2002/Point-Cloud-Tiler
|
6b79371f1b4f8de0e212b75206fbbeb846484ab1
|
[
"Apache-2.0"
] | null | null | null |
pylas implementation/pylas/vlrs/__init__.py
|
AJTech2002/Point-Cloud-Tiler
|
6b79371f1b4f8de0e212b75206fbbeb846484ab1
|
[
"Apache-2.0"
] | null | null | null |
from . import geotiff
from .known import BaseKnownVLR
from .rawvlr import VLR_HEADER_SIZE, VLR
| 23.75
| 40
| 0.821053
| 14
| 95
| 5.428571
| 0.642857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136842
| 95
| 3
| 41
| 31.666667
| 0.926829
| 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
|
d97d43ad042adf5532f5a60a64a075b9ef09e994
| 42,292
|
py
|
Python
|
apps/site/migrations/0001_initial.py
|
LocalGround/localground
|
aa5a956afe7a84a7763a3b23d62a9fd925831cd7
|
[
"Apache-2.0"
] | 9
|
2015-05-29T22:22:20.000Z
|
2022-02-01T20:39:00.000Z
|
apps/site/migrations/0001_initial.py
|
LocalGround/localground
|
aa5a956afe7a84a7763a3b23d62a9fd925831cd7
|
[
"Apache-2.0"
] | 143
|
2015-01-22T15:03:40.000Z
|
2020-06-27T01:55:29.000Z
|
apps/site/migrations/0001_initial.py
|
LocalGround/localground
|
aa5a956afe7a84a7763a3b23d62a9fd925831cd7
|
[
"Apache-2.0"
] | 5
|
2015-03-16T20:51:49.000Z
|
2017-02-07T20:48:49.000Z
|
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
import django.contrib.gis.db.models.fields
import jsonfield.fields
from django.conf import settings
import tagging_autocomplete.models
import localground.apps.lib.helpers
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
('auth', '0006_require_contenttypes_0002'),
('tagging', '0001_initial'),
#('registration', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='ProjectUser',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
],
options={
'db_table': 'v_private_projects',
'managed': False,
},
),
migrations.CreateModel(
name='Attachment',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('date_created', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds)),
('time_stamp', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds, db_column=b'last_updated')),
('host', models.CharField(max_length=255)),
('virtual_path', models.CharField(max_length=255)),
('file_name_orig', models.CharField(max_length=255)),
('content_type', models.CharField(max_length=50)),
('name', models.CharField(max_length=255, null=True, blank=True)),
('description', models.TextField(null=True, blank=True)),
('tags', tagging_autocomplete.models.TagAutocompleteField(max_length=255, null=True, blank=True)),
('file_name_new', models.CharField(max_length=255)),
('attribution', models.CharField(max_length=500, null=True, verbose_name=b'Author / Creator', blank=True)),
('uuid', models.CharField(unique=True, max_length=8)),
('file_name_thumb', models.CharField(max_length=255, null=True, blank=True)),
('file_name_scaled', models.CharField(max_length=255, null=True, blank=True)),
('scale_factor', models.FloatField(null=True, blank=True)),
('email_sender', models.CharField(max_length=255, null=True, blank=True)),
('email_subject', models.CharField(max_length=500, null=True, blank=True)),
('email_body', models.TextField(null=True, blank=True)),
('qr_rect', models.CharField(max_length=255, null=True, blank=True)),
('qr_code', models.CharField(max_length=8, null=True, blank=True)),
('is_short_form', models.BooleanField(default=False)),
('last_updated_by', models.ForeignKey(related_name='site_attachment_related', to=settings.AUTH_USER_MODEL)),
('owner', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
],
options={
'ordering': ['id'],
'verbose_name': 'attachment',
'verbose_name_plural': 'attachments',
},
),
migrations.CreateModel(
name='Audio',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('date_created', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds)),
('time_stamp', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds, db_column=b'last_updated')),
('host', models.CharField(max_length=255)),
('virtual_path', models.CharField(max_length=255)),
('file_name_orig', models.CharField(max_length=255)),
('content_type', models.CharField(max_length=50)),
('name', models.CharField(max_length=255, null=True, blank=True)),
('description', models.TextField(null=True, blank=True)),
('tags', tagging_autocomplete.models.TagAutocompleteField(max_length=255, null=True, blank=True)),
('file_name_new', models.CharField(max_length=255)),
('attribution', models.CharField(max_length=500, null=True, verbose_name=b'Author / Creator', blank=True)),
('point', django.contrib.gis.db.models.fields.PointField(srid=4326, null=True, blank=True)),
('last_updated_by', models.ForeignKey(related_name='site_audio_related', to=settings.AUTH_USER_MODEL)),
('owner', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
],
options={
'ordering': ['id'],
'verbose_name': 'audio',
'verbose_name_plural': 'audio',
},
),
migrations.CreateModel(
name='DataType',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(max_length=255)),
('sql', models.CharField(max_length=500)),
],
options={
'ordering': ['name'],
'verbose_name': 'data-type',
'verbose_name_plural': 'data-types',
},
),
migrations.CreateModel(
name='ErrorCode',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(max_length=255)),
('description', models.CharField(max_length=2000, null=True, blank=True)),
],
),
migrations.CreateModel(
name='Field',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('date_created', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds)),
('time_stamp', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds, db_column=b'last_updated')),
('col_name_db', models.CharField(max_length=255, db_column=b'col_name')),
('col_alias', models.CharField(max_length=255, verbose_name=b'column name')),
('display_width', models.IntegerField()),
('is_display_field', models.BooleanField(default=False)),
('is_printable', models.BooleanField(default=True)),
('has_snippet_field', models.BooleanField(default=True)),
('ordering', models.IntegerField()),
('data_type', models.ForeignKey(to='site.DataType')),
],
options={
'ordering': ['form__id', 'ordering'],
'verbose_name': 'field',
'verbose_name_plural': 'fields',
},
),
migrations.CreateModel(
name='FieldLayout',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('date_created', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds)),
('time_stamp', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds, db_column=b'last_updated')),
('width', models.IntegerField()),
('ordering', models.IntegerField()),
('field', models.ForeignKey(to='site.Field')),
('last_updated_by', models.ForeignKey(related_name='site_fieldlayout_related', to=settings.AUTH_USER_MODEL)),
],
options={
'ordering': ['map_print__id', 'ordering'],
'verbose_name': 'field-layout',
'verbose_name_plural': 'field-layouts',
},
),
migrations.CreateModel(
name='Form',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('date_created', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds)),
('time_stamp', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds, db_column=b'last_updated')),
('name', models.CharField(max_length=255, null=True, blank=True)),
('description', models.TextField(null=True, blank=True)),
('tags', tagging_autocomplete.models.TagAutocompleteField(max_length=255, null=True, blank=True)),
('access_key', models.CharField(max_length=16, null=True, blank=True)),
('slug', models.SlugField(help_text=b'A few words, separated by dashes "-", to be used as part of the url', max_length=100, verbose_name=b'Friendly URL')),
('table_name', models.CharField(unique=True, max_length=255)),
],
options={
'verbose_name': 'form',
'verbose_name_plural': 'forms',
},
),
migrations.CreateModel(
name='GenericAssociation',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('date_created', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds)),
('time_stamp', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds, db_column=b'last_updated')),
('ordering', models.IntegerField(default=1)),
('turned_on', models.BooleanField(default=False)),
('source_id', models.PositiveIntegerField()),
('entity_id', models.PositiveIntegerField()),
('entity_type', models.ForeignKey(related_name='site_genericassociation_related', to='contenttypes.ContentType')),
('last_updated_by', models.ForeignKey(related_name='site_genericassociation_related', to=settings.AUTH_USER_MODEL)),
('owner', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
('source_type', models.ForeignKey(to='contenttypes.ContentType')),
],
),
migrations.CreateModel(
name='ImageOpts',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('date_created', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds)),
('time_stamp', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds, db_column=b'last_updated')),
('host', models.CharField(max_length=255)),
('virtual_path', models.CharField(max_length=255)),
('file_name_orig', models.CharField(max_length=255)),
('content_type', models.CharField(max_length=50)),
('extents', django.contrib.gis.db.models.fields.PolygonField(srid=4326)),
('northeast', django.contrib.gis.db.models.fields.PointField(srid=4326)),
('southwest', django.contrib.gis.db.models.fields.PointField(srid=4326)),
('center', django.contrib.gis.db.models.fields.PointField(srid=4326)),
('zoom', models.IntegerField()),
('last_updated_by', models.ForeignKey(related_name='site_imageopts_related', to=settings.AUTH_USER_MODEL)),
('owner', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='Layer',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('date_created', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds)),
('time_stamp', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds, db_column=b'last_updated')),
('name', models.CharField(max_length=255, null=True, blank=True)),
('description', models.TextField(null=True, blank=True)),
('tags', tagging_autocomplete.models.TagAutocompleteField(max_length=255, null=True, blank=True)),
('access_key', models.CharField(max_length=16, null=True, blank=True)),
('slug', models.SlugField(help_text=b'A few words, separated by dashes "-", to be used as part of the url', max_length=100, verbose_name=b'Friendly URL')),
('symbols', jsonfield.fields.JSONField(null=True, blank=True)),
],
),
migrations.CreateModel(
name='Layout',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(max_length=255)),
('display_name', models.CharField(max_length=255, blank=True)),
('map_width_pixels', models.IntegerField()),
('map_height_pixels', models.IntegerField()),
('qr_size_pixels', models.IntegerField()),
('border_width', models.IntegerField()),
('is_active', models.BooleanField(default=True)),
('is_landscape', models.BooleanField(default=False)),
('is_data_entry', models.BooleanField(default=True))
],
options={
'ordering': ('id',),
},
),
migrations.CreateModel(
name='Marker',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('date_created', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds)),
('time_stamp', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds, db_column=b'last_updated')),
('name', models.CharField(max_length=255, null=True, blank=True)),
('description', models.TextField(null=True, blank=True)),
('tags', tagging_autocomplete.models.TagAutocompleteField(max_length=255, null=True, blank=True)),
('point', django.contrib.gis.db.models.fields.PointField(srid=4326, null=True, blank=True)),
('polyline', django.contrib.gis.db.models.fields.LineStringField(srid=4326, null=True, blank=True)),
('polygon', django.contrib.gis.db.models.fields.PolygonField(srid=4326, null=True, blank=True)),
('color', models.CharField(max_length=6)),
('last_updated_by', models.ForeignKey(related_name='site_marker_related', to=settings.AUTH_USER_MODEL)),
('owner', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
],
options={
'ordering': ['id'],
'verbose_name': 'marker',
'verbose_name_plural': 'markers',
},
),
migrations.CreateModel(
name='ObjectAuthority',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(max_length=255, blank=True)),
('description', models.CharField(max_length=1000, null=True, blank=True)),
],
),
migrations.CreateModel(
name='OverlaySource',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(max_length=255, blank=True)),
],
options={
'verbose_name': 'overlay-source',
'verbose_name_plural': 'overlay-sources',
},
),
migrations.CreateModel(
name='OverlayType',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(max_length=255, blank=True)),
('description', models.TextField(blank=True)),
],
options={
'verbose_name': 'overlay-type',
'verbose_name_plural': 'overlay-types',
},
),
migrations.CreateModel(
name='Photo',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('date_created', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds)),
('time_stamp', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds, db_column=b'last_updated')),
('host', models.CharField(max_length=255)),
('virtual_path', models.CharField(max_length=255)),
('file_name_orig', models.CharField(max_length=255)),
('content_type', models.CharField(max_length=50)),
('name', models.CharField(max_length=255, null=True, blank=True)),
('description', models.TextField(null=True, blank=True)),
('tags', tagging_autocomplete.models.TagAutocompleteField(max_length=255, null=True, blank=True)),
('file_name_new', models.CharField(max_length=255)),
('attribution', models.CharField(max_length=500, null=True, verbose_name=b'Author / Creator', blank=True)),
('point', django.contrib.gis.db.models.fields.PointField(srid=4326, null=True, blank=True)),
('file_name_large', models.CharField(max_length=255)),
('file_name_medium', models.CharField(max_length=255)),
('file_name_medium_sm', models.CharField(max_length=255)),
('file_name_small', models.CharField(max_length=255)),
('file_name_marker_lg', models.CharField(max_length=255)),
('file_name_marker_sm', models.CharField(max_length=255)),
('device', models.CharField(max_length=255, null=True, blank=True)),
('last_updated_by', models.ForeignKey(related_name='site_photo_related', to=settings.AUTH_USER_MODEL)),
('owner', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
],
options={
'ordering': ['id'],
'verbose_name': 'photo',
'verbose_name_plural': 'photos',
},
),
migrations.CreateModel(
name='Print',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('date_created', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds)),
('time_stamp', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds, db_column=b'last_updated')),
('host', models.CharField(max_length=255)),
('virtual_path', models.CharField(max_length=255)),
('file_name_orig', models.CharField(max_length=255)),
('content_type', models.CharField(max_length=50)),
('extents', django.contrib.gis.db.models.fields.PolygonField(srid=4326)),
('northeast', django.contrib.gis.db.models.fields.PointField(srid=4326)),
('southwest', django.contrib.gis.db.models.fields.PointField(srid=4326)),
('center', django.contrib.gis.db.models.fields.PointField(srid=4326)),
('zoom', models.IntegerField()),
('uuid', models.CharField(unique=True, max_length=8)),
('name', models.CharField(max_length=255, verbose_name=b'Map Title', blank=True)),
('description', models.TextField(null=True, verbose_name=b'Instructions', blank=True)),
('tags', tagging_autocomplete.models.TagAutocompleteField(max_length=255, null=True, blank=True)),
('map_width', models.IntegerField()),
('map_height', models.IntegerField()),
('map_image_path', models.CharField(max_length=255)),
('pdf_path', models.CharField(max_length=255)),
('preview_image_path', models.CharField(max_length=255)),
('form_column_widths', models.CharField(max_length=200, null=True, blank=True)),
('sorted_field_ids', models.CharField(max_length=100, null=True, db_column=b'form_column_ids', blank=True)),
('deleted', models.BooleanField(default=False)),
('form', models.ForeignKey(blank=True, to='site.Form', null=True)),
('last_updated_by', models.ForeignKey(related_name='site_print_related', to=settings.AUTH_USER_MODEL)),
('layout', models.ForeignKey(to='site.Layout')),
],
options={
'ordering': ['id'],
'verbose_name': 'print',
'verbose_name_plural': 'prints',
},
),
migrations.CreateModel(
name='Project',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('date_created', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds)),
('time_stamp', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds, db_column=b'last_updated')),
('name', models.CharField(max_length=255, null=True, blank=True)),
('description', models.TextField(null=True, blank=True)),
('tags', tagging_autocomplete.models.TagAutocompleteField(max_length=255, null=True, blank=True)),
('access_key', models.CharField(max_length=16, null=True, blank=True)),
('extents', django.contrib.gis.db.models.fields.PolygonField(srid=4326, null=True, blank=True)),
('slug', models.SlugField(help_text=b'A few words, separated by dashes "-", to be used as part of the url', max_length=100, verbose_name=b'Friendly URL')),
('access_authority', models.ForeignKey(db_column=b'view_authority', verbose_name=b'Sharing', to='site.ObjectAuthority')),
],
options={
'abstract': False,
'verbose_name': 'project',
'verbose_name_plural': 'projects',
},
),
migrations.CreateModel(
name='Scan',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('date_created', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds)),
('time_stamp', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds, db_column=b'last_updated')),
('host', models.CharField(max_length=255)),
('virtual_path', models.CharField(max_length=255)),
('file_name_orig', models.CharField(max_length=255)),
('content_type', models.CharField(max_length=50)),
('name', models.CharField(max_length=255, null=True, blank=True)),
('description', models.TextField(null=True, blank=True)),
('tags', tagging_autocomplete.models.TagAutocompleteField(max_length=255, null=True, blank=True)),
('file_name_new', models.CharField(max_length=255)),
('attribution', models.CharField(max_length=500, null=True, verbose_name=b'Author / Creator', blank=True)),
('uuid', models.CharField(unique=True, max_length=8)),
('file_name_thumb', models.CharField(max_length=255, null=True, blank=True)),
('file_name_scaled', models.CharField(max_length=255, null=True, blank=True)),
('scale_factor', models.FloatField(null=True, blank=True)),
('email_sender', models.CharField(max_length=255, null=True, blank=True)),
('email_subject', models.CharField(max_length=500, null=True, blank=True)),
('email_body', models.TextField(null=True, blank=True)),
('qr_rect', models.CharField(max_length=255, null=True, blank=True)),
('qr_code', models.CharField(max_length=8, null=True, blank=True)),
('map_rect', models.CharField(max_length=255, null=True, blank=True)),
('last_updated_by', models.ForeignKey(related_name='site_scan_related', to=settings.AUTH_USER_MODEL)),
('owner', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
('processed_image', models.ForeignKey(blank=True, to='site.ImageOpts', null=True)),
('project', models.ForeignKey(related_name='scan+', to='site.Project')),
('source_print', models.ForeignKey(blank=True, to='site.Print', null=True)),
],
options={
'ordering': ['id'],
'verbose_name': 'map-image',
'verbose_name_plural': 'map-images',
},
),
migrations.CreateModel(
name='Snapshot',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('date_created', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds)),
('time_stamp', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds, db_column=b'last_updated')),
('name', models.CharField(max_length=255, null=True, blank=True)),
('description', models.TextField(null=True, blank=True)),
('tags', tagging_autocomplete.models.TagAutocompleteField(max_length=255, null=True, blank=True)),
('access_key', models.CharField(max_length=16, null=True, blank=True)),
('extents', django.contrib.gis.db.models.fields.PolygonField(srid=4326, null=True, blank=True)),
('slug', models.SlugField(help_text=b'A few words, separated by dashes "-", to be used as part of the url', max_length=100, verbose_name=b'Friendly URL')),
('center', django.contrib.gis.db.models.fields.PointField(srid=4326)),
('zoom', models.IntegerField()),
('access_authority', models.ForeignKey(db_column=b'view_authority', verbose_name=b'Sharing', to='site.ObjectAuthority')),
],
options={
'abstract': False,
'verbose_name': 'snapshot',
'verbose_name_plural': 'snapshots',
},
),
migrations.CreateModel(
name='Snippet',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('date_created', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds)),
('time_stamp', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds, db_column=b'last_updated')),
('host', models.CharField(max_length=255)),
('virtual_path', models.CharField(max_length=255)),
('file_name_orig', models.CharField(max_length=255)),
('content_type', models.CharField(max_length=50)),
('point', django.contrib.gis.db.models.fields.PointField(srid=4326, null=True, blank=True)),
('shape_string_json', models.CharField(max_length=512, blank=True)),
('is_blank', models.BooleanField(default=False)),
('last_updated_by', models.ForeignKey(related_name='site_snippet_related', to=settings.AUTH_USER_MODEL)),
('owner', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
('source_attachment', models.ForeignKey(to='site.Attachment')),
],
options={
'ordering': ['id'],
'verbose_name': 'snippet',
'verbose_name_plural': 'snippets',
},
),
migrations.CreateModel(
name='StatusCode',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(max_length=255)),
('description', models.CharField(max_length=2000, null=True, blank=True)),
],
),
migrations.CreateModel(
name='UploadSource',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(max_length=255)),
],
),
migrations.CreateModel(
name='UploadType',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(max_length=255)),
],
),
migrations.CreateModel(
name='UserAuthority',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(max_length=255, blank=True)),
],
),
migrations.CreateModel(
name='UserAuthorityObject',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('time_stamp', models.DateTimeField(default=datetime.datetime.now)),
('object_id', models.PositiveIntegerField()),
('authority', models.ForeignKey(to='site.UserAuthority')),
('content_type', models.ForeignKey(to='contenttypes.ContentType')),
('granted_by', models.ForeignKey(related_name='site_userauthorityobject_related', to=settings.AUTH_USER_MODEL)),
('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='UserProfile',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('email_announcements', models.BooleanField(default=True)),
('default_location', django.contrib.gis.db.models.fields.PointField(help_text=b'Search map by address, or drag the marker to your home location', srid=4326, null=True, blank=True)),
('date_created', models.DateTimeField(default=datetime.datetime.now)),
('time_stamp', models.DateTimeField(default=datetime.datetime.now, db_column=b'last_updated')),
('contacts', models.ManyToManyField(related_name='site_userprofile_related', verbose_name=b"Users You're Following", to=settings.AUTH_USER_MODEL, blank=True)),
('default_view_authority', models.ForeignKey(default=1, verbose_name=b'Share Preference', to='site.ObjectAuthority', help_text=b'Your default sharing settings for your maps and media')),
('user', models.OneToOneField(related_name='profile', to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='Video',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('date_created', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds)),
('time_stamp', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds, db_column=b'last_updated')),
('host', models.CharField(max_length=255)),
('virtual_path', models.CharField(max_length=255)),
('file_name_orig', models.CharField(max_length=255)),
('content_type', models.CharField(max_length=50)),
('name', models.CharField(max_length=255, null=True, blank=True)),
('description', models.TextField(null=True, blank=True)),
('tags', tagging_autocomplete.models.TagAutocompleteField(max_length=255, null=True, blank=True)),
('file_name_new', models.CharField(max_length=255)),
('attribution', models.CharField(max_length=500, null=True, verbose_name=b'Author / Creator', blank=True)),
('point', django.contrib.gis.db.models.fields.PointField(srid=4326, null=True, blank=True)),
('last_updated_by', models.ForeignKey(related_name='site_video_related', to=settings.AUTH_USER_MODEL)),
('owner', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
('project', models.ForeignKey(related_name='video+', to='site.Project')),
],
options={
'ordering': ['id'],
'verbose_name': 'video',
'verbose_name_plural': 'videos',
},
),
migrations.CreateModel(
name='WMSOverlay',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('date_created', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds)),
('time_stamp', models.DateTimeField(default=localground.apps.lib.helpers.get_timestamp_no_milliseconds, db_column=b'last_updated')),
('name', models.CharField(max_length=255, null=True, blank=True)),
('description', models.TextField(null=True, blank=True)),
('tags', tagging_autocomplete.models.TagAutocompleteField(max_length=255, null=True, blank=True)),
('wms_url', models.CharField(max_length=500, blank=True)),
('min_zoom', models.IntegerField(default=1)),
('max_zoom', models.IntegerField(default=20)),
('extents', django.contrib.gis.db.models.fields.PolygonField(srid=4326, null=True, blank=True)),
('is_printable', models.BooleanField(default=False)),
('provider_id', models.CharField(max_length=30, blank=True)),
('auth_groups', models.ManyToManyField(to='auth.Group', blank=True)),
('last_updated_by', models.ForeignKey(related_name='site_wmsoverlay_related', to=settings.AUTH_USER_MODEL)),
('overlay_source', models.ForeignKey(to='site.OverlaySource')),
('overlay_type', models.ForeignKey(to='site.OverlayType')),
('owner', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
],
options={
'ordering': ('id',),
'verbose_name': 'tile',
'verbose_name_plural': 'tiles',
},
),
migrations.AddField(
model_name='snapshot',
name='basemap',
field=models.ForeignKey(default=12, to='site.WMSOverlay'),
),
migrations.AddField(
model_name='snapshot',
name='last_updated_by',
field=models.ForeignKey(related_name='site_snapshot_related', to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='snapshot',
name='owner',
field=models.ForeignKey(to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='scan',
name='status',
field=models.ForeignKey(to='site.StatusCode'),
),
migrations.AddField(
model_name='scan',
name='upload_source',
field=models.ForeignKey(to='site.UploadSource'),
),
migrations.AddField(
model_name='project',
name='basemap',
field=models.ForeignKey(default=12, to='site.WMSOverlay'),
),
migrations.AddField(
model_name='project',
name='last_updated_by',
field=models.ForeignKey(related_name='site_project_related', to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='project',
name='owner',
field=models.ForeignKey(to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='print',
name='map_provider',
field=models.ForeignKey(related_name='prints_print_wmsoverlays', db_column=b'fk_provider', to='site.WMSOverlay'),
),
migrations.AddField(
model_name='print',
name='owner',
field=models.ForeignKey(to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='print',
name='project',
field=models.ForeignKey(related_name='print+', to='site.Project'),
),
migrations.AddField(
model_name='photo',
name='project',
field=models.ForeignKey(related_name='photo+', to='site.Project'),
),
migrations.AddField(
model_name='marker',
name='project',
field=models.ForeignKey(to='site.Project'),
),
migrations.AddField(
model_name='layer',
name='access_authority',
field=models.ForeignKey(db_column=b'view_authority', verbose_name=b'Sharing', to='site.ObjectAuthority'),
),
migrations.AddField(
model_name='layer',
name='last_updated_by',
field=models.ForeignKey(related_name='site_layer_related', to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='layer',
name='owner',
field=models.ForeignKey(to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='imageopts',
name='source_scan',
field=models.ForeignKey(to='site.Scan'),
),
migrations.AddField(
model_name='form',
name='access_authority',
field=models.ForeignKey(db_column=b'view_authority', verbose_name=b'Sharing', to='site.ObjectAuthority'),
),
migrations.AddField(
model_name='form',
name='last_updated_by',
field=models.ForeignKey(related_name='site_form_related', to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='form',
name='owner',
field=models.ForeignKey(to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='form',
name='projects',
field=models.ManyToManyField(to='site.Project'),
),
migrations.AddField(
model_name='fieldlayout',
name='map_print',
field=models.ForeignKey(to='site.Print'),
),
migrations.AddField(
model_name='fieldlayout',
name='owner',
field=models.ForeignKey(to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='field',
name='form',
field=models.ForeignKey(to='site.Form'),
),
migrations.AddField(
model_name='field',
name='last_updated_by',
field=models.ForeignKey(related_name='site_field_related', to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='field',
name='owner',
field=models.ForeignKey(to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='audio',
name='project',
field=models.ForeignKey(related_name='audio+', to='site.Project'),
),
migrations.AddField(
model_name='attachment',
name='project',
field=models.ForeignKey(related_name='attachment+', to='site.Project'),
),
migrations.AddField(
model_name='attachment',
name='source_print',
field=models.ForeignKey(blank=True, to='site.Print', null=True),
),
migrations.AddField(
model_name='attachment',
name='status',
field=models.ForeignKey(to='site.StatusCode'),
),
migrations.AddField(
model_name='attachment',
name='upload_source',
field=models.ForeignKey(to='site.UploadSource'),
),
migrations.AlterUniqueTogether(
name='snapshot',
unique_together=set([('slug', 'owner')]),
),
migrations.AlterUniqueTogether(
name='project',
unique_together=set([('slug', 'owner')]),
),
migrations.AlterUniqueTogether(
name='layer',
unique_together=set([('slug', 'owner')]),
),
migrations.AlterUniqueTogether(
name='genericassociation',
unique_together=set([('source_type', 'source_id', 'entity_type', 'entity_id')]),
),
migrations.AlterUniqueTogether(
name='form',
unique_together=set([('slug', 'owner')]),
),
migrations.AlterUniqueTogether(
name='fieldlayout',
unique_together=set([('map_print', 'field')]),
),
migrations.AlterUniqueTogether(
name='field',
unique_together=set([('col_alias', 'form'), ('col_name_db', 'form')]),
),
]
| 56.239362
| 202
| 0.59425
| 4,258
| 42,292
| 5.691639
| 0.069281
| 0.046049
| 0.077244
| 0.102992
| 0.817495
| 0.785063
| 0.747968
| 0.71995
| 0.680132
| 0.670064
| 0
| 0.014812
| 0.265677
| 42,292
| 751
| 203
| 56.314248
| 0.765553
| 0.001277
| 0
| 0.69086
| 0
| 0
| 0.160649
| 0.00966
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.010753
| 0
| 0.014785
| 0.020161
| 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
|
7994072418f96e0ffb32410b30748db5f60fe698
| 7,538
|
py
|
Python
|
tests/test_bert.py
|
ktodorov/historical-ocr
|
d4d7bf0addf5ff98b7182c00ff716e79c97e050e
|
[
"MIT"
] | null | null | null |
tests/test_bert.py
|
ktodorov/historical-ocr
|
d4d7bf0addf5ff98b7182c00ff716e79c97e050e
|
[
"MIT"
] | null | null | null |
tests/test_bert.py
|
ktodorov/historical-ocr
|
d4d7bf0addf5ff98b7182c00ff716e79c97e050e
|
[
"MIT"
] | null | null | null |
from tests.fakes.log_service_fake import LogServiceFake
from enums.language import Language
from enums.configuration import Configuration
from enums.challenge import Challenge
from enums.ocr_output_type import OCROutputType
from enums.pretrained_model import PretrainedModel
import os
from tests.fakes.non_context_service_fake import NonContextServiceFake
from dependency_injection.ioc_container import IocContainer
import dependency_injector.providers as providers
import torch
import unittest
def initialize_container(ocr_output_type: OCROutputType = None, override_args: dict = None) -> IocContainer:
custom_args = {
'data_folder': 'data',
'challenge': Challenge.OCREvaluation,
'configuration': Configuration.BERT,
'language': Language.English,
'output_folder': os.path.join('tests', 'results'),
'ocr_output_type': ocr_output_type,
'include_pretrained_model': True,
'pretrained_weights': 'bert-base-cased',
'pretrained_model_size': 768,
'pretrained_max_length': 512,
'pretrained_model': PretrainedModel.BERT,
}
if override_args is not None:
for key, value in override_args.items():
custom_args[key] = value
container = IocContainer()
container.arguments_service.override(
providers.Factory(
NonContextServiceFake,
custom_args))
container.log_service.override(providers.Factory(LogServiceFake))
return container
class TestBERT(unittest.TestCase):
def test_embedding_matrix_english_initialization(self):
tokens = ['test', 'token', 'bert', 'vocabulary', 'units', 'python']
main_container = initialize_container()
metrics_service = main_container.metrics_service()
# Raw model
container_1 = initialize_container(ocr_output_type=OCROutputType.Raw)
tokenize_service_1 = container_1.tokenize_service()
encoded_sequences_1 = [
tokenize_service_1.encode_sequence(token) for token in tokens]
ids_1 = [torch.Tensor(ids) for ids, _, _, _ in encoded_sequences_1]
ids_tensor_1 = torch.nn.utils.rnn.pad_sequence(
ids_1, batch_first=True, padding_value=0).long()
model_1 = container_1.model()
word_evaluations_1 = model_1.get_embeddings(tokens, ids_tensor_1)
# Ground truth model
container_2 = initialize_container(
ocr_output_type=OCROutputType.GroundTruth)
tokenize_service_2 = container_2.tokenize_service()
encoded_sequences_2 = [
tokenize_service_2.encode_sequence(token) for token in tokens]
ids_2 = [torch.Tensor(ids) for ids, _, _, _ in encoded_sequences_2]
ids_tensor_2 = torch.nn.utils.rnn.pad_sequence(
ids_2, batch_first=True, padding_value=0).long()
model_2 = container_2.model()
word_evaluations_2 = model_2.get_embeddings(tokens, ids_tensor_2)
# Assert
for word_evaluation_1, word_evaluation_2 in zip(word_evaluations_1, word_evaluations_2):
self.assertEqual(word_evaluation_1.get_embeddings(
0), word_evaluation_2.get_embeddings(0))
self.assertEqual(metrics_service.calculate_cosine_distance(
word_evaluation_1.get_embeddings(0), word_evaluation_2.get_embeddings(0)), 0.0)
def test_embedding_matrix_dutch_initialization(self):
override_args = {
'language': Language.Dutch,
'pretrained_weights': 'wietsedv/bert-base-dutch-cased'
}
tokens = ['test', 'token', 'bert', 'vocabulary', 'units', 'python']
main_container = initialize_container(
override_args=override_args)
metrics_service = main_container.metrics_service()
# Raw model
container_1 = initialize_container(
ocr_output_type=OCROutputType.Raw,
override_args=override_args)
tokenize_service_1 = container_1.tokenize_service()
encoded_sequences_1 = [
tokenize_service_1.encode_sequence(token) for token in tokens]
ids_1 = [torch.Tensor(ids) for ids, _, _, _ in encoded_sequences_1]
ids_tensor_1 = torch.nn.utils.rnn.pad_sequence(
ids_1, batch_first=True, padding_value=0).long()
model_1 = container_1.model()
word_evaluations_1 = model_1.get_embeddings(tokens, ids_tensor_1)
# Ground truth model
container_2 = initialize_container(
ocr_output_type=OCROutputType.GroundTruth,
override_args=override_args)
tokenize_service_2 = container_2.tokenize_service()
encoded_sequences_2 = [
tokenize_service_2.encode_sequence(token) for token in tokens]
ids_2 = [torch.Tensor(ids) for ids, _, _, _ in encoded_sequences_2]
ids_tensor_2 = torch.nn.utils.rnn.pad_sequence(
ids_2, batch_first=True, padding_value=0).long()
model_2 = container_2.model()
word_evaluations_2 = model_2.get_embeddings(tokens, ids_tensor_2)
# Assert
for word_evaluation_1, word_evaluation_2 in zip(word_evaluations_1, word_evaluations_2):
self.assertEqual(word_evaluation_1.get_embeddings(
0), word_evaluation_2.get_embeddings(0))
self.assertEqual(metrics_service.calculate_cosine_distance(
word_evaluation_1.get_embeddings(0), word_evaluation_2.get_embeddings(0)), 0.0)
def test_embedding_matrix_same_different_seed(self):
tokens = ['test', 'token', 'bert', 'vocabulary', 'units', 'python']
main_container = initialize_container()
metrics_service = main_container.metrics_service()
# Raw model
container_1 = initialize_container(
ocr_output_type=OCROutputType.Raw,
override_args={
'seed': 13
})
tokenize_service_1 = container_1.tokenize_service()
encoded_sequences_1 = [
tokenize_service_1.encode_sequence(token) for token in tokens]
ids_1 = [torch.Tensor(ids) for ids, _, _, _ in encoded_sequences_1]
ids_tensor_1 = torch.nn.utils.rnn.pad_sequence(
ids_1, batch_first=True, padding_value=0).long()
model_1 = container_1.model()
word_evaluations_1 = model_1.get_embeddings(tokens, ids_tensor_1)
# Ground truth model
container_2 = initialize_container(
ocr_output_type=OCROutputType.Raw,
override_args={
'seed': 42
})
tokenize_service_2 = container_2.tokenize_service()
encoded_sequences_2 = [
tokenize_service_2.encode_sequence(token) for token in tokens]
ids_2 = [torch.Tensor(ids) for ids, _, _, _ in encoded_sequences_2]
ids_tensor_2 = torch.nn.utils.rnn.pad_sequence(
ids_2, batch_first=True, padding_value=0).long()
model_2 = container_2.model()
word_evaluations_2 = model_2.get_embeddings(tokens, ids_tensor_2)
# Assert
for word_evaluation_1, word_evaluation_2 in zip(word_evaluations_1, word_evaluations_2):
self.assertEqual(
word_evaluation_1.get_embeddings(0),
word_evaluation_2.get_embeddings(0))
self.assertEqual(
metrics_service.calculate_cosine_distance(
word_evaluation_1.get_embeddings(0),
word_evaluation_2.get_embeddings(0)),
0.0)
if __name__ == '__main__':
unittest.main()
| 39.673684
| 108
| 0.677633
| 888
| 7,538
| 5.359234
| 0.140766
| 0.056735
| 0.035302
| 0.041185
| 0.736499
| 0.736499
| 0.719479
| 0.719479
| 0.719479
| 0.719479
| 0
| 0.024734
| 0.238392
| 7,538
| 189
| 109
| 39.883598
| 0.804215
| 0.014195
| 0
| 0.612676
| 0
| 0
| 0.050398
| 0.012936
| 0
| 0
| 0
| 0
| 0.042254
| 1
| 0.028169
| false
| 0
| 0.084507
| 0
| 0.126761
| 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
|
79a2e42292c0477acfc9eb800d0fe7736e1daea4
| 56
|
py
|
Python
|
bip32utils/__init__.py
|
matthewdowney/bip32utils
|
dd9c541767a2a8ff60c7868c9f4b03277fabb8ba
|
[
"MIT"
] | 5
|
2018-07-31T07:37:09.000Z
|
2019-05-27T04:40:38.000Z
|
bip32utils/__init__.py
|
matthewdowney/bip32utils
|
dd9c541767a2a8ff60c7868c9f4b03277fabb8ba
|
[
"MIT"
] | 4
|
2018-08-01T11:11:54.000Z
|
2022-03-11T23:20:53.000Z
|
test_signature/bip32utils/__init__.py
|
Robin8Put/pmes
|
338bec94162098f05b75bad035417317e1252fd2
|
[
"Apache-2.0"
] | 5
|
2018-06-09T07:42:04.000Z
|
2018-12-28T21:15:52.000Z
|
from bip32utils.BIP32Key import BIP32Key, BIP32_HARDEN
| 18.666667
| 54
| 0.857143
| 7
| 56
| 6.714286
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16
| 0.107143
| 56
| 2
| 55
| 28
| 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
|
79c074c2609a8af6445c70fd7e48454fbb85518e
| 144
|
py
|
Python
|
src/analyzer/algorithm_exceptions.py
|
gutefrage/skyline
|
5b2f6321641e965080dd12a7acdbd9e96da3726b
|
[
"MIT"
] | null | null | null |
src/analyzer/algorithm_exceptions.py
|
gutefrage/skyline
|
5b2f6321641e965080dd12a7acdbd9e96da3726b
|
[
"MIT"
] | null | null | null |
src/analyzer/algorithm_exceptions.py
|
gutefrage/skyline
|
5b2f6321641e965080dd12a7acdbd9e96da3726b
|
[
"MIT"
] | null | null | null |
class TooShort(Exception):
pass
class Stale(Exception):
pass
class Incomplete(Exception):
pass
class Boring(Exception):
pass
| 12
| 28
| 0.701389
| 16
| 144
| 6.3125
| 0.4375
| 0.514851
| 0.534653
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.215278
| 144
| 11
| 29
| 13.090909
| 0.893805
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
8dded302cf6721cbe9e8413deef9cbb6880dc2ad
| 450
|
py
|
Python
|
tests/csigs/contracts/sigs.py
|
Akm0d/pop
|
77d9f6e6de8e02aa2ee5520d0aa0052fabd53243
|
[
"Apache-2.0"
] | null | null | null |
tests/csigs/contracts/sigs.py
|
Akm0d/pop
|
77d9f6e6de8e02aa2ee5520d0aa0052fabd53243
|
[
"Apache-2.0"
] | null | null | null |
tests/csigs/contracts/sigs.py
|
Akm0d/pop
|
77d9f6e6de8e02aa2ee5520d0aa0052fabd53243
|
[
"Apache-2.0"
] | null | null | null |
# Import python libs
from typing import List
def sig_first(hub, a: str, b, c: List):
pass
def sig_second(hub, **kwargs):
pass
def sig_third(hub, a, b, *args, **kwargs):
pass
def sig_four(hub, a, *args, e=7):
pass
def sig_five(hub, a: str, *args):
pass
def sig_six(hub, a, *args, **kwargs):
pass
def sig_missing():
'''
This function is missing in the module to make sure it gets picked up
'''
pass
| 13.636364
| 73
| 0.611111
| 75
| 450
| 3.573333
| 0.506667
| 0.156716
| 0.223881
| 0.179104
| 0.149254
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003003
| 0.26
| 450
| 32
| 74
| 14.0625
| 0.801802
| 0.197778
| 0
| 0.466667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.466667
| false
| 0.466667
| 0.066667
| 0
| 0.533333
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
5c3cb5d20b51552fca5bd3bc7df8ff03ff91916a
| 171
|
py
|
Python
|
sensors/samples/keytest.py
|
akesiraju/raspberrypi
|
e8ae5e535a9953631ffa2d1e7de926c9dc19f961
|
[
"MIT"
] | 2
|
2019-03-26T23:47:40.000Z
|
2020-03-28T03:23:31.000Z
|
sensors/samples/keytest.py
|
akesiraju/raspberrypi
|
e8ae5e535a9953631ffa2d1e7de926c9dc19f961
|
[
"MIT"
] | 1
|
2019-03-27T10:59:14.000Z
|
2019-03-27T10:59:14.000Z
|
sensors/samples/keytest.py
|
akesiraju/raspberrypi
|
e8ae5e535a9953631ffa2d1e7de926c9dc19f961
|
[
"MIT"
] | 1
|
2018-07-14T23:55:14.000Z
|
2018-07-14T23:55:14.000Z
|
import keyboard
print('hello')
while True:
if keyboard.is_pressed('up'):
print('up')
if keyboard.is_pressed('down'):
print('down')
break
| 15.545455
| 35
| 0.584795
| 21
| 171
| 4.666667
| 0.571429
| 0.204082
| 0.244898
| 0.387755
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.269006
| 171
| 10
| 36
| 17.1
| 0.784
| 0
| 0
| 0
| 0
| 0
| 0.099415
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.125
| 0
| 0.125
| 0.375
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
3082e838f2d13b98457eb90f8d6fc90503a9f4dc
| 46
|
py
|
Python
|
streamlitfront/tests/fake_app.py
|
i2mint/streamlitfront
|
6fbc03a42cdb7436dcda3da00fb9b42965bbb582
|
[
"Apache-2.0"
] | null | null | null |
streamlitfront/tests/fake_app.py
|
i2mint/streamlitfront
|
6fbc03a42cdb7436dcda3da00fb9b42965bbb582
|
[
"Apache-2.0"
] | 1
|
2022-02-03T15:21:57.000Z
|
2022-02-05T00:51:33.000Z
|
streamlitfront/tests/fake_app.py
|
i2mint/streamlitfront
|
6fbc03a42cdb7436dcda3da00fb9b42965bbb582
|
[
"Apache-2.0"
] | null | null | null |
import streamlit as st
st.write('fake app!')
| 11.5
| 22
| 0.717391
| 8
| 46
| 4.125
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.152174
| 46
| 3
| 23
| 15.333333
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0.195652
| 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
|
30a5ba5560c57077da4172151008fd87ff36b771
| 5,506
|
py
|
Python
|
tests/test_p_wilcoxon.py
|
odococo/bioinformatica
|
ba8f979140f1f5fc1ff95d7480f7699f3cd6614a
|
[
"MIT"
] | null | null | null |
tests/test_p_wilcoxon.py
|
odococo/bioinformatica
|
ba8f979140f1f5fc1ff95d7480f7699f3cd6614a
|
[
"MIT"
] | null | null | null |
tests/test_p_wilcoxon.py
|
odococo/bioinformatica
|
ba8f979140f1f5fc1ff95d7480f7699f3cd6614a
|
[
"MIT"
] | null | null | null |
import json
import pandas as pd
from bioinformatica.data_prediction import t_wilcoxon
def test_wilcoxon():
json_file="""[{"model": "MLP", "run_type": "train", "holdout": 0, "loss": 0.0010388237847510676, "acc": 0.9998748898506165, "auroc": 0.9998754262924194, "auprc": 0.999607264995575}, {"model": "MLP", "run_type": "test", "holdout": 0, "loss": 2.273866242170334, "acc": 0.8180862665176392, "auroc": 0.5075517892837524, "auprc": 0.11840708553791046}, {"model": "FFNN", "run_type": "train", "holdout": 0, "loss": 0.01019920933402036, "acc": 0.9965218305587769, "auroc": 0.9993396997451782, "auprc": 0.9977951049804688}, {"model": "FFNN", "run_type": "test", "holdout": 0, "loss": 2.5988604187965394, "acc": 0.8192873597145081, "auroc": 0.4977455735206604, "auprc": 0.1136908084154129}, {"model": "CNN_1", "run_type": "train", "holdout": 0, "loss": 0.10403256874364603, "acc": 0.958899974822998, "auroc": 0.9804827570915222, "auprc": 0.8997913599014282}, {"model": "CNN_1", "run_type": "test", "holdout": 0, "loss": 0.7303875654935836, "acc": 0.8159843683242798, "auroc": 0.5009350180625916, "auprc": 0.11485575884580612}, {"model": "MLP", "run_type": "train", "holdout": 1, "loss": 0.025058362495960426, "acc": 0.991917610168457, "auroc": 0.9989873170852661, "auprc": 0.9928281307220459}, {"model": "MLP", "run_type": "test", "holdout": 1, "loss": 2.589718282222748, "acc": 0.7933640480041504, "auroc": 0.5042703747749329, "auprc": 0.11626752465963364}, {"model": "FFNN", "run_type": "train", "holdout": 1, "loss": 0.03517671112469363, "acc": 0.9878389239311218, "auroc": 0.9972137808799744, "auprc": 0.9812598824501038}, {"model": "FFNN", "run_type": "test", "holdout": 1, "loss": 3.0308573603630067, "acc": 0.7955159544944763, "auroc": 0.5030602216720581, "auprc": 0.11672329902648926}, {"model": "CNN_1", "run_type": "train", "holdout": 1, "loss": 0.12551259153034103, "acc": 0.950567364692688, "auroc": 0.9716228246688843, "auprc": 0.8602519631385803}, {"model": "CNN_1", "run_type": "test", "holdout": 1, "loss": 0.6034699380397797, "acc": 0.8463616967201233, "auroc": 0.503119945526123, "auprc": 0.11953102052211761}, {"model": "MLP", "run_type": "train", "holdout": 2, "loss": 0.16693810407913917, "acc": 0.9186382293701172, "auroc": 0.9519988298416138, "auprc": 0.7153921723365784}, {"model": "MLP", "run_type": "test", "holdout": 2, "loss": 1.38182590007782, "acc": 0.8152337074279785, "auroc": 0.4941226840019226, "auprc": 0.1146460697054863}, {"model": "FFNN", "run_type": "train", "holdout": 2, "loss": 0.14347377598141375, "acc": 0.9273837208747864, "auroc": 0.9618804454803467, "auprc": 0.774202823638916}, {"model": "FFNN", "run_type": "test", "holdout": 2, "loss": 2.6986600041389464, "acc": 0.8297467827796936, "auroc": 0.4932266175746918, "auprc": 0.11171119660139084}, {"model": "CNN_1", "run_type": "train", "holdout": 2, "loss": 0.16129117849182562, "acc": 0.9370800852775574, "auroc": 0.9506946802139282, "auprc": 0.7854023575782776}, {"model": "CNN_1", "run_type": "test", "holdout": 2, "loss": 0.6019708305597306, "acc": 0.8420078158378601, "auroc": 0.49517109990119934, "auprc": 0.11495301127433777}, {"model": "MLP", "run_type": "train", "holdout": 3, "loss": 0.2418608376923286, "acc": 0.896180272102356, "auroc": 0.8724892735481262, "auprc": 0.4797278642654419}, {"model": "MLP", "run_type": "test", "holdout": 3, "loss": 1.0407809257507323, "acc": 0.871234118938446, "auroc": 0.501768171787262, "auprc": 0.11667702347040176}, {"model": "FFNN", "run_type": "train", "holdout": 3, "loss": 0.17585249491195246, "acc": 0.9070902466773987, "auroc": 0.9360558986663818, "auprc": 0.6311833262443542}, {"model": "FFNN", "run_type": "test", "holdout": 3, "loss": 2.400297749042511, "acc": 0.8637773990631104, "auroc": 0.5053181648254395, "auprc": 0.11812087893486023}, {"model": "CNN_1", "run_type": "train", "holdout": 3, "loss": 0.26259857617390503, "acc": 0.9045253992080688, "auroc": 0.8300288319587708, "auprc": 0.49783894419670105}, {"model": "CNN_1", "run_type": "test", "holdout": 3, "loss": 0.5159085839986801, "acc": 0.8625763058662415, "auroc": 0.5084909200668335, "auprc": 0.11602817475795746}, {"model": "MLP", "run_type": "train", "holdout": 4, "loss": 0.2602501786359802, "acc": 0.8898119330406189, "auroc": 0.8440986275672913, "auprc": 0.39565253257751465}, {"model": "MLP", "run_type": "test", "holdout": 4, "loss": 0.9972584307193756, "acc": 0.879091203212738, "auroc": 0.4959682524204254, "auprc": 0.1172136515378952}, {"model": "FFNN", "run_type": "train", "holdout": 4, "loss": 0.20334799086310637, "acc": 0.8927521109580994, "auroc": 0.9125803709030151, "auprc": 0.5114268064498901}, {"model": "FFNN", "run_type": "test", "holdout": 4, "loss": 2.479385268688202, "acc": 0.8777900338172913, "auroc": 0.4919617474079132, "auprc": 0.1125568374991417}, {"model": "CNN_1", "run_type": "train", "holdout": 4, "loss": 0.3123882005912464, "acc": 0.8928146958351135, "auroc": 0.6872448325157166, "auprc": 0.2788505256175995}, {"model": "CNN_1", "run_type": "test", "holdout": 4, "loss": 0.444542695581913, "acc": 0.879441499710083, "auroc": 0.4918953776359558, "auprc": 0.11384429037570953}, {"model": "MLP", "run_type": "train", "holdout": 5, "loss": 0.2369917126068032, "acc": 0.8922266364097595, "auroc": 0.8774167895317078, "auprc": 0.4552256762981415}]"""
results = json.loads(json_file)
df = pd.DataFrame(results)
models = df[
(df.run_type == "test")
]
t_wilcoxon(models[models.model == 'MLP'], models[models.model == 'FFNN'])
| 305.888889
| 5,192
| 0.686161
| 642
| 5,506
| 5.809969
| 0.250779
| 0.060054
| 0.051475
| 0.081501
| 0.271046
| 0.271046
| 0.169705
| 0
| 0
| 0
| 0
| 0.431741
| 0.091355
| 5,506
| 17
| 5,193
| 323.882353
| 0.313812
| 0
| 0
| 0
| 0
| 0.090909
| 0.941337
| 0.057392
| 0
| 0
| 0
| 0
| 0
| 1
| 0.090909
| false
| 0
| 0.272727
| 0
| 0.363636
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
30a81821eb916ac576ee43d8270fe1744e4e07bd
| 32
|
py
|
Python
|
aio_py_github/core/utils/__init__.py
|
panhaoyu/aio_py_github
|
689d21f11def75cbf12fb344a0bfb8822e65916f
|
[
"MIT"
] | null | null | null |
aio_py_github/core/utils/__init__.py
|
panhaoyu/aio_py_github
|
689d21f11def75cbf12fb344a0bfb8822e65916f
|
[
"MIT"
] | null | null | null |
aio_py_github/core/utils/__init__.py
|
panhaoyu/aio_py_github
|
689d21f11def75cbf12fb344a0bfb8822e65916f
|
[
"MIT"
] | null | null | null |
from .requester import Requester
| 32
| 32
| 0.875
| 4
| 32
| 7
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09375
| 32
| 1
| 32
| 32
| 0.965517
| 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
|
30a87e1dd2fcf8c6f6d2325121236697db16b6de
| 442
|
py
|
Python
|
src/web.py
|
abhishekpandeyIT/Virtual_Intelligent_Personal_Agent
|
786261fbcf1468bcbaee9f6d17aea3f3cc06f81e
|
[
"Apache-2.0"
] | null | null | null |
src/web.py
|
abhishekpandeyIT/Virtual_Intelligent_Personal_Agent
|
786261fbcf1468bcbaee9f6d17aea3f3cc06f81e
|
[
"Apache-2.0"
] | null | null | null |
src/web.py
|
abhishekpandeyIT/Virtual_Intelligent_Personal_Agent
|
786261fbcf1468bcbaee9f6d17aea3f3cc06f81e
|
[
"Apache-2.0"
] | null | null | null |
import webbrowser
import os
def close_browser():
os.system("taskkill /im chrome.exe /f")
def open_facebook():
webbrowser.open('https://www.facebook.com/')
def open_instagram():
webbrowser.open('https://www.instagram.com/')
def open_google():
webbrowser.open('https://www.google.com/')
def open_browser():
webbrowser.open('https://www.google.com/')
def open_youtube():
webbrowser.open("https://www.youtube.com/")
| 21.047619
| 49
| 0.692308
| 59
| 442
| 5.084746
| 0.338983
| 0.116667
| 0.316667
| 0.366667
| 0.253333
| 0.253333
| 0.253333
| 0.253333
| 0
| 0
| 0
| 0
| 0.124434
| 442
| 20
| 50
| 22.1
| 0.775194
| 0
| 0
| 0.142857
| 0
| 0
| 0.332579
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.428571
| true
| 0
| 0.142857
| 0
| 0.571429
| 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
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
30abc0c5ac8aba01726137d295a08b71468b56aa
| 30
|
py
|
Python
|
yaipopt/__init__.py
|
dimasad/python-ipopt
|
680363adcbab37ac6d76b81203d58d4b452cb495
|
[
"MIT"
] | 1
|
2018-09-20T04:26:33.000Z
|
2018-09-20T04:26:33.000Z
|
yaipopt/__init__.py
|
dimasad/python-ipopt
|
680363adcbab37ac6d76b81203d58d4b452cb495
|
[
"MIT"
] | null | null | null |
yaipopt/__init__.py
|
dimasad/python-ipopt
|
680363adcbab37ac6d76b81203d58d4b452cb495
|
[
"MIT"
] | null | null | null |
from .wrapper import Problem
| 10
| 28
| 0.8
| 4
| 30
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 30
| 2
| 29
| 15
| 0.96
| 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
|
30d300ee2a942e1eff8d7589e115ebea32357c75
| 791
|
py
|
Python
|
venv/lib/python3.6/site-packages/phonenumbers/shortdata/region_CZ.py
|
exdeam/opencrm
|
dfdcfdf99f0b42eb3959171927cb6574583f5ee0
|
[
"MIT"
] | null | null | null |
venv/lib/python3.6/site-packages/phonenumbers/shortdata/region_CZ.py
|
exdeam/opencrm
|
dfdcfdf99f0b42eb3959171927cb6574583f5ee0
|
[
"MIT"
] | null | null | null |
venv/lib/python3.6/site-packages/phonenumbers/shortdata/region_CZ.py
|
exdeam/opencrm
|
dfdcfdf99f0b42eb3959171927cb6574583f5ee0
|
[
"MIT"
] | 1
|
2020-09-08T14:45:34.000Z
|
2020-09-08T14:45:34.000Z
|
"""Auto-generated file, do not edit by hand. CZ metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_CZ = PhoneMetadata(id='CZ', country_code=None, international_prefix=None,
general_desc=PhoneNumberDesc(national_number_pattern='1\\d{2,5}', possible_length=(3, 4, 5, 6)),
toll_free=PhoneNumberDesc(national_number_pattern='1(?:1(?:2|6(?:00[06]|1(?:11|23)))|5[0568])', example_number='112', possible_length=(3, 6)),
emergency=PhoneNumberDesc(national_number_pattern='1(?:12|5[0568])', example_number='112', possible_length=(3,)),
short_code=PhoneNumberDesc(national_number_pattern='1(?:1(?:2|(?:6\\d\\d|8)\\d)|[24]\\d{3}|3\\d{3,4}|5[0568]|99)|12\\d\\d', example_number='112', possible_length=(3, 4, 5, 6)),
short_data=True)
| 79.1
| 180
| 0.713021
| 122
| 791
| 4.434426
| 0.434426
| 0.170055
| 0.214418
| 0.266174
| 0.513863
| 0.377079
| 0.280961
| 0.280961
| 0
| 0
| 0
| 0.094391
| 0.075853
| 791
| 9
| 181
| 87.888889
| 0.645691
| 0.067004
| 0
| 0
| 1
| 0.285714
| 0.199454
| 0.151639
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.142857
| 0
| 0.142857
| 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
| 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
30f37a519da98dfb00b56b0daead4b41fa951617
| 22,768
|
py
|
Python
|
tests/extension/thread_/to_thread_pool/test_thread_to_thread_pool.py
|
jesseclin/veriloggen
|
a645f2c53f04e5b88213eef17779d212192ea2b5
|
[
"Apache-2.0"
] | 232
|
2015-09-01T16:07:48.000Z
|
2022-03-28T14:53:28.000Z
|
tests/extension/thread_/to_thread_pool/test_thread_to_thread_pool.py
|
jesseclin/veriloggen
|
a645f2c53f04e5b88213eef17779d212192ea2b5
|
[
"Apache-2.0"
] | 34
|
2015-08-21T09:13:03.000Z
|
2022-03-21T23:52:44.000Z
|
tests/extension/thread_/to_thread_pool/test_thread_to_thread_pool.py
|
jesseclin/veriloggen
|
a645f2c53f04e5b88213eef17779d212192ea2b5
|
[
"Apache-2.0"
] | 46
|
2015-09-24T14:39:57.000Z
|
2022-02-23T21:59:56.000Z
|
from __future__ import absolute_import
from __future__ import print_function
import veriloggen
import thread_to_thread_pool
expected_verilog = """
module test;
reg CLK;
reg RST;
blinkled
uut
(
.CLK(CLK),
.RST(RST)
);
initial begin
CLK = 0;
forever begin
#5 CLK = !CLK;
end
end
initial begin
RST = 0;
#100;
RST = 1;
#100;
RST = 0;
#10000;
$finish;
end
endmodule
module blinkled
(
input CLK,
input RST
);
reg [8-1:0] _th_myfunc_a_0_start;
reg [32-1:0] th_blink;
localparam th_blink_init = 0;
reg signed [32-1:0] _th_blink_times_0;
reg signed [32-1:0] _th_blink_tid_1;
reg [32-1:0] th_myfunc_a_0;
localparam th_myfunc_a_0_init = 0;
reg [32-1:0] th_myfunc_a_1;
localparam th_myfunc_a_1_init = 0;
reg [32-1:0] th_myfunc_a_2;
localparam th_myfunc_a_2_init = 0;
reg [32-1:0] th_myfunc_a_3;
localparam th_myfunc_a_3_init = 0;
reg [32-1:0] th_myfunc_b_0;
localparam th_myfunc_b_0_init = 0;
reg [32-1:0] th_myfunc_b_1;
localparam th_myfunc_b_1_init = 0;
reg [32-1:0] th_myfunc_b_2;
localparam th_myfunc_b_2_init = 0;
reg [32-1:0] th_myfunc_b_3;
localparam th_myfunc_b_3_init = 0;
reg _th_myfunc_a_0_called;
reg signed [32-1:0] _th_myfunc_a_0_tid_2;
reg signed [32-1:0] _th_myfunc_a_0_tid_3;
reg signed [32-1:0] _th_myfunc_a_0_i_4;
reg signed [32-1:0] _th_myfunc_a_0_tmp_5_6;
reg _th_myfunc_a_1_called;
reg signed [32-1:0] _th_myfunc_a_1_tid_7;
reg signed [32-1:0] _th_myfunc_a_1_tid_8;
reg signed [32-1:0] _th_myfunc_a_1_i_9;
reg signed [32-1:0] _th_myfunc_a_1_tmp_10_11;
reg _th_myfunc_a_2_called;
reg signed [32-1:0] _th_myfunc_a_2_tid_12;
reg signed [32-1:0] _th_myfunc_a_2_tid_13;
reg signed [32-1:0] _th_myfunc_a_2_i_14;
reg signed [32-1:0] _th_myfunc_a_2_tmp_15_16;
reg _th_myfunc_a_3_called;
reg signed [32-1:0] _th_myfunc_a_3_tid_17;
reg signed [32-1:0] _th_myfunc_a_3_tid_18;
reg signed [32-1:0] _th_myfunc_a_3_i_19;
reg signed [32-1:0] _th_myfunc_a_3_tmp_20_21;
reg _th_myfunc_b_0_called;
reg signed [32-1:0] _th_myfunc_b_0_tid_22;
reg signed [32-1:0] _th_myfunc_b_0_tid_23;
reg signed [32-1:0] _th_myfunc_b_0_i_24;
reg signed [32-1:0] _th_myfunc_b_0_tmp_25_26;
reg _th_myfunc_b_1_called;
reg signed [32-1:0] _th_myfunc_b_1_tid_27;
reg signed [32-1:0] _th_myfunc_b_1_tid_28;
reg signed [32-1:0] _th_myfunc_b_1_i_29;
reg signed [32-1:0] _th_myfunc_b_1_tmp_30_31;
reg _th_myfunc_b_2_called;
reg signed [32-1:0] _th_myfunc_b_2_tid_32;
reg signed [32-1:0] _th_myfunc_b_2_tid_33;
reg signed [32-1:0] _th_myfunc_b_2_i_34;
reg signed [32-1:0] _th_myfunc_b_2_tmp_35_36;
reg _th_myfunc_b_3_called;
reg signed [32-1:0] _th_myfunc_b_3_tid_37;
reg signed [32-1:0] _th_myfunc_b_3_tid_38;
reg signed [32-1:0] _th_myfunc_b_3_i_39;
reg signed [32-1:0] _th_myfunc_b_3_tmp_40_41;
reg signed [32-1:0] _th_blink_sum_42;
localparam th_blink_1 = 1;
localparam th_blink_2 = 2;
localparam th_blink_3 = 3;
localparam th_blink_4 = 4;
localparam th_blink_5 = 5;
localparam th_blink_6 = 6;
localparam th_blink_7 = 7;
localparam th_blink_8 = 8;
localparam th_blink_9 = 9;
localparam th_blink_10 = 10;
localparam th_blink_11 = 11;
localparam th_blink_12 = 12;
localparam th_blink_13 = 13;
localparam th_blink_14 = 14;
always @(posedge CLK) begin
if(RST) begin
th_blink <= th_blink_init;
_th_blink_times_0 <= 0;
_th_blink_tid_1 <= 0;
_th_myfunc_a_0_start[_th_blink_tid_1] <= (0 >> _th_blink_tid_1) & 1'd1;
_th_blink_sum_42 <= 0;
end else begin
case(th_blink)
th_blink_init: begin
_th_blink_times_0 <= 20;
th_blink <= th_blink_1;
end
th_blink_1: begin
_th_blink_tid_1 <= 0;
th_blink <= th_blink_2;
end
th_blink_2: begin
if(_th_blink_tid_1 < 8) begin
th_blink <= th_blink_3;
end else begin
th_blink <= th_blink_7;
end
end
th_blink_3: begin
_th_myfunc_a_0_start[_th_blink_tid_1] <= 1;
th_blink <= th_blink_4;
end
th_blink_4: begin
th_blink <= th_blink_5;
th_blink <= th_blink_5;
th_blink <= th_blink_5;
th_blink <= th_blink_5;
th_blink <= th_blink_5;
th_blink <= th_blink_5;
th_blink <= th_blink_5;
th_blink <= th_blink_5;
end
th_blink_5: begin
_th_myfunc_a_0_start[_th_blink_tid_1] <= 0;
th_blink <= th_blink_6;
end
th_blink_6: begin
_th_blink_tid_1 <= _th_blink_tid_1 + 1;
th_blink <= th_blink_2;
end
th_blink_7: begin
_th_blink_sum_42 <= 0;
th_blink <= th_blink_8;
end
th_blink_8: begin
_th_blink_tid_1 <= 0;
th_blink <= th_blink_9;
end
th_blink_9: begin
if(_th_blink_tid_1 < 8) begin
th_blink <= th_blink_10;
end else begin
th_blink <= th_blink_13;
end
end
th_blink_10: begin
if((_th_blink_tid_1 == 0)? th_myfunc_a_0 == 7 :
(_th_blink_tid_1 == 1)? th_myfunc_a_1 == 7 :
(_th_blink_tid_1 == 2)? th_myfunc_a_2 == 7 :
(_th_blink_tid_1 == 3)? th_myfunc_a_3 == 7 :
(_th_blink_tid_1 == 4)? th_myfunc_b_0 == 7 :
(_th_blink_tid_1 == 5)? th_myfunc_b_1 == 7 :
(_th_blink_tid_1 == 6)? th_myfunc_b_2 == 7 :
(_th_blink_tid_1 == 7)? th_myfunc_b_3 == 7 : 0) begin
th_blink <= th_blink_11;
end
end
th_blink_11: begin
_th_blink_sum_42 <= _th_blink_sum_42 + ((_th_blink_tid_1 == 0)? _th_myfunc_a_0_tmp_5_6 :
(_th_blink_tid_1 == 1)? _th_myfunc_a_1_tmp_10_11 :
(_th_blink_tid_1 == 2)? _th_myfunc_a_2_tmp_15_16 :
(_th_blink_tid_1 == 3)? _th_myfunc_a_3_tmp_20_21 :
(_th_blink_tid_1 == 4)? _th_myfunc_b_0_tmp_25_26 :
(_th_blink_tid_1 == 5)? _th_myfunc_b_1_tmp_30_31 :
(_th_blink_tid_1 == 6)? _th_myfunc_b_2_tmp_35_36 :
(_th_blink_tid_1 == 7)? _th_myfunc_b_3_tmp_40_41 : 'hx);
th_blink <= th_blink_12;
end
th_blink_12: begin
_th_blink_tid_1 <= _th_blink_tid_1 + 1;
th_blink <= th_blink_9;
end
th_blink_13: begin
$display("sum = %d", _th_blink_sum_42);
th_blink <= th_blink_14;
end
endcase
end
end
localparam th_myfunc_a_0_1 = 1;
localparam th_myfunc_a_0_2 = 2;
localparam th_myfunc_a_0_3 = 3;
localparam th_myfunc_a_0_4 = 4;
localparam th_myfunc_a_0_5 = 5;
localparam th_myfunc_a_0_6 = 6;
localparam th_myfunc_a_0_7 = 7;
always @(posedge CLK) begin
if(RST) begin
th_myfunc_a_0 <= th_myfunc_a_0_init;
_th_myfunc_a_0_called <= 0;
_th_myfunc_a_0_tid_2 <= 0;
_th_myfunc_a_0_tid_3 <= 0;
_th_myfunc_a_0_i_4 <= 0;
_th_myfunc_a_0_tmp_5_6 <= 0;
end else begin
case(th_myfunc_a_0)
th_myfunc_a_0_init: begin
if(_th_myfunc_a_0_start[0] && (th_blink == 4)) begin
_th_myfunc_a_0_called <= 1;
end
if(_th_myfunc_a_0_start[0] && (th_blink == 4)) begin
_th_myfunc_a_0_tid_2 <= _th_blink_tid_1;
end
if((th_blink == 4) && _th_myfunc_a_0_start[0]) begin
th_myfunc_a_0 <= th_myfunc_a_0_1;
end
end
th_myfunc_a_0_1: begin
_th_myfunc_a_0_tid_3 <= _th_myfunc_a_0_tid_2;
th_myfunc_a_0 <= th_myfunc_a_0_2;
end
th_myfunc_a_0_2: begin
$display("myfunc_a: tid = %d", _th_myfunc_a_0_tid_3);
th_myfunc_a_0 <= th_myfunc_a_0_3;
end
th_myfunc_a_0_3: begin
_th_myfunc_a_0_i_4 <= 0;
th_myfunc_a_0 <= th_myfunc_a_0_4;
end
th_myfunc_a_0_4: begin
if(_th_myfunc_a_0_i_4 < 30 - _th_myfunc_a_0_tid_3) begin
th_myfunc_a_0 <= th_myfunc_a_0_5;
end else begin
th_myfunc_a_0 <= th_myfunc_a_0_6;
end
end
th_myfunc_a_0_5: begin
_th_myfunc_a_0_i_4 <= _th_myfunc_a_0_i_4 + 1;
th_myfunc_a_0 <= th_myfunc_a_0_4;
end
th_myfunc_a_0_6: begin
_th_myfunc_a_0_tmp_5_6 <= _th_myfunc_a_0_tid_3 + 100;
th_myfunc_a_0 <= th_myfunc_a_0_7;
end
endcase
end
end
localparam th_myfunc_a_1_1 = 1;
localparam th_myfunc_a_1_2 = 2;
localparam th_myfunc_a_1_3 = 3;
localparam th_myfunc_a_1_4 = 4;
localparam th_myfunc_a_1_5 = 5;
localparam th_myfunc_a_1_6 = 6;
localparam th_myfunc_a_1_7 = 7;
always @(posedge CLK) begin
if(RST) begin
th_myfunc_a_1 <= th_myfunc_a_1_init;
_th_myfunc_a_1_called <= 0;
_th_myfunc_a_1_tid_7 <= 0;
_th_myfunc_a_1_tid_8 <= 0;
_th_myfunc_a_1_i_9 <= 0;
_th_myfunc_a_1_tmp_10_11 <= 0;
end else begin
case(th_myfunc_a_1)
th_myfunc_a_1_init: begin
if(_th_myfunc_a_0_start[1] && (th_blink == 4)) begin
_th_myfunc_a_1_called <= 1;
end
if(_th_myfunc_a_0_start[1] && (th_blink == 4)) begin
_th_myfunc_a_1_tid_7 <= _th_blink_tid_1;
end
if((th_blink == 4) && _th_myfunc_a_0_start[1]) begin
th_myfunc_a_1 <= th_myfunc_a_1_1;
end
end
th_myfunc_a_1_1: begin
_th_myfunc_a_1_tid_8 <= _th_myfunc_a_1_tid_7;
th_myfunc_a_1 <= th_myfunc_a_1_2;
end
th_myfunc_a_1_2: begin
$display("myfunc_a: tid = %d", _th_myfunc_a_1_tid_8);
th_myfunc_a_1 <= th_myfunc_a_1_3;
end
th_myfunc_a_1_3: begin
_th_myfunc_a_1_i_9 <= 0;
th_myfunc_a_1 <= th_myfunc_a_1_4;
end
th_myfunc_a_1_4: begin
if(_th_myfunc_a_1_i_9 < 30 - _th_myfunc_a_1_tid_8) begin
th_myfunc_a_1 <= th_myfunc_a_1_5;
end else begin
th_myfunc_a_1 <= th_myfunc_a_1_6;
end
end
th_myfunc_a_1_5: begin
_th_myfunc_a_1_i_9 <= _th_myfunc_a_1_i_9 + 1;
th_myfunc_a_1 <= th_myfunc_a_1_4;
end
th_myfunc_a_1_6: begin
_th_myfunc_a_1_tmp_10_11 <= _th_myfunc_a_1_tid_8 + 100;
th_myfunc_a_1 <= th_myfunc_a_1_7;
end
endcase
end
end
localparam th_myfunc_a_2_1 = 1;
localparam th_myfunc_a_2_2 = 2;
localparam th_myfunc_a_2_3 = 3;
localparam th_myfunc_a_2_4 = 4;
localparam th_myfunc_a_2_5 = 5;
localparam th_myfunc_a_2_6 = 6;
localparam th_myfunc_a_2_7 = 7;
always @(posedge CLK) begin
if(RST) begin
th_myfunc_a_2 <= th_myfunc_a_2_init;
_th_myfunc_a_2_called <= 0;
_th_myfunc_a_2_tid_12 <= 0;
_th_myfunc_a_2_tid_13 <= 0;
_th_myfunc_a_2_i_14 <= 0;
_th_myfunc_a_2_tmp_15_16 <= 0;
end else begin
case(th_myfunc_a_2)
th_myfunc_a_2_init: begin
if(_th_myfunc_a_0_start[2] && (th_blink == 4)) begin
_th_myfunc_a_2_called <= 1;
end
if(_th_myfunc_a_0_start[2] && (th_blink == 4)) begin
_th_myfunc_a_2_tid_12 <= _th_blink_tid_1;
end
if((th_blink == 4) && _th_myfunc_a_0_start[2]) begin
th_myfunc_a_2 <= th_myfunc_a_2_1;
end
end
th_myfunc_a_2_1: begin
_th_myfunc_a_2_tid_13 <= _th_myfunc_a_2_tid_12;
th_myfunc_a_2 <= th_myfunc_a_2_2;
end
th_myfunc_a_2_2: begin
$display("myfunc_a: tid = %d", _th_myfunc_a_2_tid_13);
th_myfunc_a_2 <= th_myfunc_a_2_3;
end
th_myfunc_a_2_3: begin
_th_myfunc_a_2_i_14 <= 0;
th_myfunc_a_2 <= th_myfunc_a_2_4;
end
th_myfunc_a_2_4: begin
if(_th_myfunc_a_2_i_14 < 30 - _th_myfunc_a_2_tid_13) begin
th_myfunc_a_2 <= th_myfunc_a_2_5;
end else begin
th_myfunc_a_2 <= th_myfunc_a_2_6;
end
end
th_myfunc_a_2_5: begin
_th_myfunc_a_2_i_14 <= _th_myfunc_a_2_i_14 + 1;
th_myfunc_a_2 <= th_myfunc_a_2_4;
end
th_myfunc_a_2_6: begin
_th_myfunc_a_2_tmp_15_16 <= _th_myfunc_a_2_tid_13 + 100;
th_myfunc_a_2 <= th_myfunc_a_2_7;
end
endcase
end
end
localparam th_myfunc_a_3_1 = 1;
localparam th_myfunc_a_3_2 = 2;
localparam th_myfunc_a_3_3 = 3;
localparam th_myfunc_a_3_4 = 4;
localparam th_myfunc_a_3_5 = 5;
localparam th_myfunc_a_3_6 = 6;
localparam th_myfunc_a_3_7 = 7;
always @(posedge CLK) begin
if(RST) begin
th_myfunc_a_3 <= th_myfunc_a_3_init;
_th_myfunc_a_3_called <= 0;
_th_myfunc_a_3_tid_17 <= 0;
_th_myfunc_a_3_tid_18 <= 0;
_th_myfunc_a_3_i_19 <= 0;
_th_myfunc_a_3_tmp_20_21 <= 0;
end else begin
case(th_myfunc_a_3)
th_myfunc_a_3_init: begin
if(_th_myfunc_a_0_start[3] && (th_blink == 4)) begin
_th_myfunc_a_3_called <= 1;
end
if(_th_myfunc_a_0_start[3] && (th_blink == 4)) begin
_th_myfunc_a_3_tid_17 <= _th_blink_tid_1;
end
if((th_blink == 4) && _th_myfunc_a_0_start[3]) begin
th_myfunc_a_3 <= th_myfunc_a_3_1;
end
end
th_myfunc_a_3_1: begin
_th_myfunc_a_3_tid_18 <= _th_myfunc_a_3_tid_17;
th_myfunc_a_3 <= th_myfunc_a_3_2;
end
th_myfunc_a_3_2: begin
$display("myfunc_a: tid = %d", _th_myfunc_a_3_tid_18);
th_myfunc_a_3 <= th_myfunc_a_3_3;
end
th_myfunc_a_3_3: begin
_th_myfunc_a_3_i_19 <= 0;
th_myfunc_a_3 <= th_myfunc_a_3_4;
end
th_myfunc_a_3_4: begin
if(_th_myfunc_a_3_i_19 < 30 - _th_myfunc_a_3_tid_18) begin
th_myfunc_a_3 <= th_myfunc_a_3_5;
end else begin
th_myfunc_a_3 <= th_myfunc_a_3_6;
end
end
th_myfunc_a_3_5: begin
_th_myfunc_a_3_i_19 <= _th_myfunc_a_3_i_19 + 1;
th_myfunc_a_3 <= th_myfunc_a_3_4;
end
th_myfunc_a_3_6: begin
_th_myfunc_a_3_tmp_20_21 <= _th_myfunc_a_3_tid_18 + 100;
th_myfunc_a_3 <= th_myfunc_a_3_7;
end
endcase
end
end
localparam th_myfunc_b_0_1 = 1;
localparam th_myfunc_b_0_2 = 2;
localparam th_myfunc_b_0_3 = 3;
localparam th_myfunc_b_0_4 = 4;
localparam th_myfunc_b_0_5 = 5;
localparam th_myfunc_b_0_6 = 6;
localparam th_myfunc_b_0_7 = 7;
always @(posedge CLK) begin
if(RST) begin
th_myfunc_b_0 <= th_myfunc_b_0_init;
_th_myfunc_b_0_called <= 0;
_th_myfunc_b_0_tid_22 <= 0;
_th_myfunc_b_0_tid_23 <= 0;
_th_myfunc_b_0_i_24 <= 0;
_th_myfunc_b_0_tmp_25_26 <= 0;
end else begin
case(th_myfunc_b_0)
th_myfunc_b_0_init: begin
if(_th_myfunc_a_0_start[4] && (th_blink == 4)) begin
_th_myfunc_b_0_called <= 1;
end
if(_th_myfunc_a_0_start[4] && (th_blink == 4)) begin
_th_myfunc_b_0_tid_22 <= _th_blink_tid_1;
end
if((th_blink == 4) && _th_myfunc_a_0_start[4]) begin
th_myfunc_b_0 <= th_myfunc_b_0_1;
end
end
th_myfunc_b_0_1: begin
_th_myfunc_b_0_tid_23 <= _th_myfunc_b_0_tid_22;
th_myfunc_b_0 <= th_myfunc_b_0_2;
end
th_myfunc_b_0_2: begin
$display("myfunc_b: tid = %d", _th_myfunc_b_0_tid_23);
th_myfunc_b_0 <= th_myfunc_b_0_3;
end
th_myfunc_b_0_3: begin
_th_myfunc_b_0_i_24 <= 0;
th_myfunc_b_0 <= th_myfunc_b_0_4;
end
th_myfunc_b_0_4: begin
if(_th_myfunc_b_0_i_24 < 30 - _th_myfunc_b_0_tid_23) begin
th_myfunc_b_0 <= th_myfunc_b_0_5;
end else begin
th_myfunc_b_0 <= th_myfunc_b_0_6;
end
end
th_myfunc_b_0_5: begin
_th_myfunc_b_0_i_24 <= _th_myfunc_b_0_i_24 + 1;
th_myfunc_b_0 <= th_myfunc_b_0_4;
end
th_myfunc_b_0_6: begin
_th_myfunc_b_0_tmp_25_26 <= _th_myfunc_b_0_tid_23 + 200;
th_myfunc_b_0 <= th_myfunc_b_0_7;
end
endcase
end
end
localparam th_myfunc_b_1_1 = 1;
localparam th_myfunc_b_1_2 = 2;
localparam th_myfunc_b_1_3 = 3;
localparam th_myfunc_b_1_4 = 4;
localparam th_myfunc_b_1_5 = 5;
localparam th_myfunc_b_1_6 = 6;
localparam th_myfunc_b_1_7 = 7;
always @(posedge CLK) begin
if(RST) begin
th_myfunc_b_1 <= th_myfunc_b_1_init;
_th_myfunc_b_1_called <= 0;
_th_myfunc_b_1_tid_27 <= 0;
_th_myfunc_b_1_tid_28 <= 0;
_th_myfunc_b_1_i_29 <= 0;
_th_myfunc_b_1_tmp_30_31 <= 0;
end else begin
case(th_myfunc_b_1)
th_myfunc_b_1_init: begin
if(_th_myfunc_a_0_start[5] && (th_blink == 4)) begin
_th_myfunc_b_1_called <= 1;
end
if(_th_myfunc_a_0_start[5] && (th_blink == 4)) begin
_th_myfunc_b_1_tid_27 <= _th_blink_tid_1;
end
if((th_blink == 4) && _th_myfunc_a_0_start[5]) begin
th_myfunc_b_1 <= th_myfunc_b_1_1;
end
end
th_myfunc_b_1_1: begin
_th_myfunc_b_1_tid_28 <= _th_myfunc_b_1_tid_27;
th_myfunc_b_1 <= th_myfunc_b_1_2;
end
th_myfunc_b_1_2: begin
$display("myfunc_b: tid = %d", _th_myfunc_b_1_tid_28);
th_myfunc_b_1 <= th_myfunc_b_1_3;
end
th_myfunc_b_1_3: begin
_th_myfunc_b_1_i_29 <= 0;
th_myfunc_b_1 <= th_myfunc_b_1_4;
end
th_myfunc_b_1_4: begin
if(_th_myfunc_b_1_i_29 < 30 - _th_myfunc_b_1_tid_28) begin
th_myfunc_b_1 <= th_myfunc_b_1_5;
end else begin
th_myfunc_b_1 <= th_myfunc_b_1_6;
end
end
th_myfunc_b_1_5: begin
_th_myfunc_b_1_i_29 <= _th_myfunc_b_1_i_29 + 1;
th_myfunc_b_1 <= th_myfunc_b_1_4;
end
th_myfunc_b_1_6: begin
_th_myfunc_b_1_tmp_30_31 <= _th_myfunc_b_1_tid_28 + 200;
th_myfunc_b_1 <= th_myfunc_b_1_7;
end
endcase
end
end
localparam th_myfunc_b_2_1 = 1;
localparam th_myfunc_b_2_2 = 2;
localparam th_myfunc_b_2_3 = 3;
localparam th_myfunc_b_2_4 = 4;
localparam th_myfunc_b_2_5 = 5;
localparam th_myfunc_b_2_6 = 6;
localparam th_myfunc_b_2_7 = 7;
always @(posedge CLK) begin
if(RST) begin
th_myfunc_b_2 <= th_myfunc_b_2_init;
_th_myfunc_b_2_called <= 0;
_th_myfunc_b_2_tid_32 <= 0;
_th_myfunc_b_2_tid_33 <= 0;
_th_myfunc_b_2_i_34 <= 0;
_th_myfunc_b_2_tmp_35_36 <= 0;
end else begin
case(th_myfunc_b_2)
th_myfunc_b_2_init: begin
if(_th_myfunc_a_0_start[6] && (th_blink == 4)) begin
_th_myfunc_b_2_called <= 1;
end
if(_th_myfunc_a_0_start[6] && (th_blink == 4)) begin
_th_myfunc_b_2_tid_32 <= _th_blink_tid_1;
end
if((th_blink == 4) && _th_myfunc_a_0_start[6]) begin
th_myfunc_b_2 <= th_myfunc_b_2_1;
end
end
th_myfunc_b_2_1: begin
_th_myfunc_b_2_tid_33 <= _th_myfunc_b_2_tid_32;
th_myfunc_b_2 <= th_myfunc_b_2_2;
end
th_myfunc_b_2_2: begin
$display("myfunc_b: tid = %d", _th_myfunc_b_2_tid_33);
th_myfunc_b_2 <= th_myfunc_b_2_3;
end
th_myfunc_b_2_3: begin
_th_myfunc_b_2_i_34 <= 0;
th_myfunc_b_2 <= th_myfunc_b_2_4;
end
th_myfunc_b_2_4: begin
if(_th_myfunc_b_2_i_34 < 30 - _th_myfunc_b_2_tid_33) begin
th_myfunc_b_2 <= th_myfunc_b_2_5;
end else begin
th_myfunc_b_2 <= th_myfunc_b_2_6;
end
end
th_myfunc_b_2_5: begin
_th_myfunc_b_2_i_34 <= _th_myfunc_b_2_i_34 + 1;
th_myfunc_b_2 <= th_myfunc_b_2_4;
end
th_myfunc_b_2_6: begin
_th_myfunc_b_2_tmp_35_36 <= _th_myfunc_b_2_tid_33 + 200;
th_myfunc_b_2 <= th_myfunc_b_2_7;
end
endcase
end
end
localparam th_myfunc_b_3_1 = 1;
localparam th_myfunc_b_3_2 = 2;
localparam th_myfunc_b_3_3 = 3;
localparam th_myfunc_b_3_4 = 4;
localparam th_myfunc_b_3_5 = 5;
localparam th_myfunc_b_3_6 = 6;
localparam th_myfunc_b_3_7 = 7;
always @(posedge CLK) begin
if(RST) begin
th_myfunc_b_3 <= th_myfunc_b_3_init;
_th_myfunc_b_3_called <= 0;
_th_myfunc_b_3_tid_37 <= 0;
_th_myfunc_b_3_tid_38 <= 0;
_th_myfunc_b_3_i_39 <= 0;
_th_myfunc_b_3_tmp_40_41 <= 0;
end else begin
case(th_myfunc_b_3)
th_myfunc_b_3_init: begin
if(_th_myfunc_a_0_start[7] && (th_blink == 4)) begin
_th_myfunc_b_3_called <= 1;
end
if(_th_myfunc_a_0_start[7] && (th_blink == 4)) begin
_th_myfunc_b_3_tid_37 <= _th_blink_tid_1;
end
if((th_blink == 4) && _th_myfunc_a_0_start[7]) begin
th_myfunc_b_3 <= th_myfunc_b_3_1;
end
end
th_myfunc_b_3_1: begin
_th_myfunc_b_3_tid_38 <= _th_myfunc_b_3_tid_37;
th_myfunc_b_3 <= th_myfunc_b_3_2;
end
th_myfunc_b_3_2: begin
$display("myfunc_b: tid = %d", _th_myfunc_b_3_tid_38);
th_myfunc_b_3 <= th_myfunc_b_3_3;
end
th_myfunc_b_3_3: begin
_th_myfunc_b_3_i_39 <= 0;
th_myfunc_b_3 <= th_myfunc_b_3_4;
end
th_myfunc_b_3_4: begin
if(_th_myfunc_b_3_i_39 < 30 - _th_myfunc_b_3_tid_38) begin
th_myfunc_b_3 <= th_myfunc_b_3_5;
end else begin
th_myfunc_b_3 <= th_myfunc_b_3_6;
end
end
th_myfunc_b_3_5: begin
_th_myfunc_b_3_i_39 <= _th_myfunc_b_3_i_39 + 1;
th_myfunc_b_3 <= th_myfunc_b_3_4;
end
th_myfunc_b_3_6: begin
_th_myfunc_b_3_tmp_40_41 <= _th_myfunc_b_3_tid_38 + 200;
th_myfunc_b_3 <= th_myfunc_b_3_7;
end
endcase
end
end
endmodule
"""
def test():
veriloggen.reset()
test_module = thread_to_thread_pool.mkTest()
code = test_module.to_verilog()
from pyverilog.vparser.parser import VerilogParser
from pyverilog.ast_code_generator.codegen import ASTCodeGenerator
parser = VerilogParser()
expected_ast = parser.parse(expected_verilog)
codegen = ASTCodeGenerator()
expected_code = codegen.visit(expected_ast)
assert(expected_code == code)
| 31.622222
| 99
| 0.625571
| 4,151
| 22,768
| 2.783907
| 0.026981
| 0.346141
| 0.205607
| 0.075286
| 0.895898
| 0.838872
| 0.657494
| 0.590948
| 0.507875
| 0.318969
| 0
| 0.10042
| 0.299324
| 22,768
| 719
| 100
| 31.666203
| 0.623958
| 0
| 0
| 0.367496
| 0
| 0
| 0.973911
| 0.162597
| 0
| 0
| 0
| 0
| 0.001464
| 1
| 0.001464
| false
| 0
| 0.008785
| 0
| 0.010249
| 0.001464
| 0
| 0
| 0
| null | 1
| 1
| 0
| 1
| 1
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a514cd0c043e0b6d9bbd57cf73ee584ee3f12d2a
| 210
|
py
|
Python
|
pyfinviz/__init__.py
|
oscar0812/pyfinviz
|
aedafe4f4b0135fd2a9b85db121f41c8742d8c6c
|
[
"Apache-2.0"
] | 10
|
2021-01-22T05:19:51.000Z
|
2022-03-22T16:37:14.000Z
|
pyfinviz/__init__.py
|
oscar0812/pyfinviz
|
aedafe4f4b0135fd2a9b85db121f41c8742d8c6c
|
[
"Apache-2.0"
] | 5
|
2021-02-09T06:15:18.000Z
|
2022-03-22T17:32:39.000Z
|
pyfinviz/__init__.py
|
oscar0812/pyfinviz
|
aedafe4f4b0135fd2a9b85db121f41c8742d8c6c
|
[
"Apache-2.0"
] | 4
|
2021-06-30T04:05:59.000Z
|
2022-03-22T17:33:38.000Z
|
from pyfinviz.crypto import Crypto
from pyfinviz.groups import Groups
from pyfinviz.insider import Insider
from pyfinviz.news import News
from pyfinviz.quote import Quote
from pyfinviz.screener import Screener
| 30
| 38
| 0.857143
| 30
| 210
| 6
| 0.3
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.114286
| 210
| 6
| 39
| 35
| 0.967742
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
eb5b23b7d161d744e7957cbd37e6af124c47b408
| 59
|
py
|
Python
|
pystream/__init__.py
|
zahash/pystream
|
8bea0c2eb13d45a987ca479e3c1451e55d952455
|
[
"MIT"
] | null | null | null |
pystream/__init__.py
|
zahash/pystream
|
8bea0c2eb13d45a987ca479e3c1451e55d952455
|
[
"MIT"
] | 2
|
2022-03-13T06:35:54.000Z
|
2022-03-13T06:36:33.000Z
|
pystream/__init__.py
|
zahash/pystream
|
8bea0c2eb13d45a987ca479e3c1451e55d952455
|
[
"MIT"
] | null | null | null |
from .stream import Stream, Grouper
from .pipe import pipe
| 19.666667
| 35
| 0.79661
| 9
| 59
| 5.222222
| 0.555556
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.152542
| 59
| 2
| 36
| 29.5
| 0.94
| 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
|
eb8af50df71dee5a8438fa22830203d8a903cd35
| 201
|
py
|
Python
|
Materials/admin.py
|
Gguidini/artheart-db-explorer
|
8e854248ff799f74f2702f767e5614e154e4a7f8
|
[
"MIT"
] | null | null | null |
Materials/admin.py
|
Gguidini/artheart-db-explorer
|
8e854248ff799f74f2702f767e5614e154e4a7f8
|
[
"MIT"
] | null | null | null |
Materials/admin.py
|
Gguidini/artheart-db-explorer
|
8e854248ff799f74f2702f767e5614e154e4a7f8
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Apostila, Categoria, Project
# Register your models here.
admin.site.register(Apostila)
admin.site.register(Categoria)
admin.site.register(Project)
| 28.714286
| 48
| 0.820896
| 27
| 201
| 6.111111
| 0.481481
| 0.163636
| 0.309091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.089552
| 201
| 7
| 49
| 28.714286
| 0.901639
| 0.129353
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
ebb586cbefe9cd9ca25c5a9ea1b27357ea87f78f
| 37
|
py
|
Python
|
naislinter/__main__.py
|
chinatsu/naislinter
|
e19d113d5578745725f699f7ce3fe95d027b8c8c
|
[
"MIT"
] | null | null | null |
naislinter/__main__.py
|
chinatsu/naislinter
|
e19d113d5578745725f699f7ce3fe95d027b8c8c
|
[
"MIT"
] | null | null | null |
naislinter/__main__.py
|
chinatsu/naislinter
|
e19d113d5578745725f699f7ce3fe95d027b8c8c
|
[
"MIT"
] | null | null | null |
import naislinter
naislinter.main()
| 9.25
| 17
| 0.810811
| 4
| 37
| 7.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108108
| 37
| 3
| 18
| 12.333333
| 0.909091
| 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
|
ebd3ffbfab252aaad34ddfe1e9bfb85e2ee55f38
| 1,222
|
py
|
Python
|
src/OnlineModel/Export/ExportBase.py
|
svenreiche/OnlineModel
|
becc4211929c2a98bd80cc2fe69a5d138b073fbb
|
[
"MIT"
] | null | null | null |
src/OnlineModel/Export/ExportBase.py
|
svenreiche/OnlineModel
|
becc4211929c2a98bd80cc2fe69a5d138b073fbb
|
[
"MIT"
] | null | null | null |
src/OnlineModel/Export/ExportBase.py
|
svenreiche/OnlineModel
|
becc4211929c2a98bd80cc2fe69a5d138b073fbb
|
[
"MIT"
] | null | null | null |
class ExportBase:
"""
Base class to be inherited from other modules to export from the online model.
It just provides that in writeLine of LineContainer Module always an event handler function is called
"""
def __init__(self):
self.switch = 0
self.path = ''
self.avoidPreset = 0
self.MapIndx = []
self.MapIndxSave = []
def isType(self, key):
return 0
def demandMapID(self):
return 0
def writeLine(self, line, seq):
return
def writeDrift(self, ele):
return
def writeVacuum(self, ele):
self.writeMarker(ele)
return
def writeAlignment(self, ele):
self.writeMarker(ele)
return
def writeBend(self, ele):
return
def writeQuadrupole(self, ele):
return
def writeCorrector(self, ele):
return
def writeSextupole(self, ele):
return
def writeRF(self, ele):
return
def writeUndulator(self, ele):
return
def writeDiagnostic(self, ele):
return
def writeMarker(self, ele):
return
def writeSolenoid(self, ele):
return
def writeDechirper(self,ele):
return
| 19.709677
| 105
| 0.591653
| 135
| 1,222
| 5.325926
| 0.42963
| 0.162726
| 0.200278
| 0.222531
| 0.094576
| 0.094576
| 0.094576
| 0
| 0
| 0
| 0
| 0.004878
| 0.328969
| 1,222
| 61
| 106
| 20.032787
| 0.871951
| 0.1473
| 0
| 0.439024
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.414634
| false
| 0
| 0
| 0.341463
| 0.829268
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
ebdcbefe2b61e67663aabbd43c5e21f0af1ba466
| 179
|
py
|
Python
|
dev/pystan/compile_stan_model.py
|
luiarthur/CytofDensityEstimation
|
1f62d693c66b9e303dc8ee0cb8743dc848d9df5e
|
[
"MIT"
] | null | null | null |
dev/pystan/compile_stan_model.py
|
luiarthur/CytofDensityEstimation
|
1f62d693c66b9e303dc8ee0cb8743dc848d9df5e
|
[
"MIT"
] | 4
|
2020-10-12T18:10:36.000Z
|
2020-12-07T07:05:00.000Z
|
dev/pystan/compile_stan_model.py
|
luiarthur/CytofDensityEstimation
|
1f62d693c66b9e303dc8ee0cb8743dc848d9df5e
|
[
"MIT"
] | null | null | null |
import pickle
import pystan
# sm = pystan.StanModel("model.stan")
sm = pystan.StanModel("model_reparameterized.stan")
with open('.model.pkl', 'wb') as f:
pickle.dump(sm, f)
| 19.888889
| 51
| 0.703911
| 26
| 179
| 4.807692
| 0.576923
| 0.128
| 0.272
| 0.352
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134078
| 179
| 8
| 52
| 22.375
| 0.806452
| 0.195531
| 0
| 0
| 0
| 0
| 0.267606
| 0.183099
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.4
| 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
|
ebdd593975fe461d0b54ed5202e8311c6fb9bba0
| 63
|
py
|
Python
|
7_kyu/shortest_word.py
|
nik4nd/codewars
|
efae95f1f9fbd5f31fc62b1b4f5a7d1ee511ced0
|
[
"MIT"
] | null | null | null |
7_kyu/shortest_word.py
|
nik4nd/codewars
|
efae95f1f9fbd5f31fc62b1b4f5a7d1ee511ced0
|
[
"MIT"
] | null | null | null |
7_kyu/shortest_word.py
|
nik4nd/codewars
|
efae95f1f9fbd5f31fc62b1b4f5a7d1ee511ced0
|
[
"MIT"
] | null | null | null |
def find_short(s):
return min([len(i) for i in s.split()])
| 21
| 43
| 0.619048
| 13
| 63
| 2.923077
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.190476
| 63
| 2
| 44
| 31.5
| 0.745098
| 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
|
ccde7cc1c636da65c05eb9ccdcbe6003caafd9c1
| 36
|
py
|
Python
|
src/freeplane_tools/__init__.py
|
shollingsworth/freeplane_tools
|
4fa6bc69d79062412590b625c1f210da244489fa
|
[
"MIT"
] | null | null | null |
src/freeplane_tools/__init__.py
|
shollingsworth/freeplane_tools
|
4fa6bc69d79062412590b625c1f210da244489fa
|
[
"MIT"
] | 1
|
2021-12-03T04:23:52.000Z
|
2021-12-03T08:44:16.000Z
|
src/freeplane_tools/__init__.py
|
shollingsworth/freeplane_tools
|
4fa6bc69d79062412590b625c1f210da244489fa
|
[
"MIT"
] | null | null | null |
"""Freeplane Tools Package base."""
| 18
| 35
| 0.694444
| 4
| 36
| 6.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 36
| 1
| 36
| 36
| 0.78125
| 0.805556
| 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
|
6912ca5e190f66ca8dc86eb6266115feb8d8d628
| 242
|
py
|
Python
|
src/forums/urls/__init__.py
|
earth-emoji/august
|
065d4b449a138ead1557293bffcb20cd2db90a41
|
[
"BSD-2-Clause"
] | null | null | null |
src/forums/urls/__init__.py
|
earth-emoji/august
|
065d4b449a138ead1557293bffcb20cd2db90a41
|
[
"BSD-2-Clause"
] | 10
|
2021-03-19T10:47:13.000Z
|
2022-03-12T00:28:30.000Z
|
src/forums/urls/__init__.py
|
earth-emoji/august
|
065d4b449a138ead1557293bffcb20cd2db90a41
|
[
"BSD-2-Clause"
] | null | null | null |
from django.urls import path, include
urlpatterns = [
path('', include('forums.urls.discussions')),
path('', include('forums.urls.topics')),
path('', include('forums.urls.posts')),
path('', include('forums.urls.comments')),
]
| 30.25
| 49
| 0.644628
| 27
| 242
| 5.777778
| 0.444444
| 0.352564
| 0.435897
| 0.538462
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136364
| 242
| 8
| 50
| 30.25
| 0.746411
| 0
| 0
| 0
| 0
| 0
| 0.320988
| 0.09465
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.142857
| 0
| 0.142857
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
6941a104440406cc7baec3ac2309d5cd9f84dcc2
| 29
|
py
|
Python
|
memegen/__init__.py
|
WalterSimoncini/memegen-api
|
ddb3dfa296a46fadfd484f8479f46fcb7b6c7236
|
[
"MIT"
] | null | null | null |
memegen/__init__.py
|
WalterSimoncini/memegen-api
|
ddb3dfa296a46fadfd484f8479f46fcb7b6c7236
|
[
"MIT"
] | null | null | null |
memegen/__init__.py
|
WalterSimoncini/memegen-api
|
ddb3dfa296a46fadfd484f8479f46fcb7b6c7236
|
[
"MIT"
] | 1
|
2021-02-13T04:36:34.000Z
|
2021-02-13T04:36:34.000Z
|
from .predict import Memegen
| 14.5
| 28
| 0.827586
| 4
| 29
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137931
| 29
| 1
| 29
| 29
| 0.96
| 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
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.