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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7251646cf461bf0c300a8ea920d9b86aae0147b2
| 714
|
py
|
Python
|
util/config_util.py
|
Bilal-A-Qureshi/Point-GNN
|
401eba8f7afaaa811ee1d001f38405629071a42a
|
[
"MIT"
] | 418
|
2020-02-29T16:48:37.000Z
|
2022-03-29T03:07:27.000Z
|
util/config_util.py
|
Bilal-A-Qureshi/Point-GNN
|
401eba8f7afaaa811ee1d001f38405629071a42a
|
[
"MIT"
] | 91
|
2020-03-13T08:25:52.000Z
|
2022-03-10T01:56:52.000Z
|
util/config_util.py
|
Bilal-A-Qureshi/Point-GNN
|
401eba8f7afaaa811ee1d001f38405629071a42a
|
[
"MIT"
] | 120
|
2020-03-04T16:21:30.000Z
|
2022-03-11T08:20:52.000Z
|
"""This file implements configuration functions. """
import json
def load_config(filename):
"""Load a configuration file."""
with open(filename, 'r') as f:
config = json.load(f)
return config
def save_config(filename, config):
"""Save a configuration file. """
with open(filename, 'w') as f:
json.dump(config, f, sort_keys=True, indent=4)
def load_train_config(filename):
"""Load a configuration file."""
with open(filename, 'r') as f:
config = json.load(f)
return config
def save_train_config(filename, train_config):
"""Save a configuration file. """
with open(filename, 'w') as f:
json.dump(train_config, f, sort_keys=True, indent=4)
| 27.461538
| 60
| 0.652661
| 99
| 714
| 4.606061
| 0.272727
| 0.122807
| 0.157895
| 0.192982
| 0.754386
| 0.754386
| 0.754386
| 0.640351
| 0.640351
| 0.640351
| 0
| 0.003552
| 0.211485
| 714
| 25
| 61
| 28.56
| 0.806394
| 0.217087
| 0
| 0.533333
| 0
| 0
| 0.007519
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.266667
| false
| 0
| 0.066667
| 0
| 0.466667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
9d00141e4d320788f466528cff487ce7d7ecc28d
| 150
|
py
|
Python
|
arris_dcx960/exceptions.py
|
ratty76/arris_dcx960-python
|
27b8f80e760a1f6017d9fce94d6770aba7d25a43
|
[
"MIT"
] | null | null | null |
arris_dcx960/exceptions.py
|
ratty76/arris_dcx960-python
|
27b8f80e760a1f6017d9fce94d6770aba7d25a43
|
[
"MIT"
] | null | null | null |
arris_dcx960/exceptions.py
|
ratty76/arris_dcx960-python
|
27b8f80e760a1f6017d9fce94d6770aba7d25a43
|
[
"MIT"
] | null | null | null |
"""Python client for Arris DCX960."""
class ArrisDCX960ConnectionError(Exception):
pass
class ArrisDCX960AuthenticationError(Exception):
pass
| 25
| 48
| 0.786667
| 13
| 150
| 9.076923
| 0.769231
| 0.220339
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.068702
| 0.126667
| 150
| 6
| 49
| 25
| 0.832061
| 0.206667
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
9d5ff9080bb9489e65513695dcade42928905ef4
| 51
|
py
|
Python
|
goto_cloud/remote_host_command/public.py
|
jdepoix/goto_cloud
|
59bb9923026e1b1dc6e8e08fb6b21300c8e8854a
|
[
"MIT"
] | 2
|
2018-02-04T23:22:17.000Z
|
2019-04-15T12:06:04.000Z
|
goto_cloud/remote_host_command/public.py
|
jdepoix/goto_cloud
|
59bb9923026e1b1dc6e8e08fb6b21300c8e8854a
|
[
"MIT"
] | null | null | null |
goto_cloud/remote_host_command/public.py
|
jdepoix/goto_cloud
|
59bb9923026e1b1dc6e8e08fb6b21300c8e8854a
|
[
"MIT"
] | null | null | null |
from .remote_host_command import RemoteHostCommand
| 25.5
| 50
| 0.901961
| 6
| 51
| 7.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.078431
| 51
| 1
| 51
| 51
| 0.93617
| 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
|
19dd37acb76e71058c8465cce9607429d3b9c3a0
| 169
|
py
|
Python
|
portal_src/ext/renderbug/bin/nodes/nodes_display.py
|
bug00r/portal-py
|
388067bb571455f0249daffd04bb51606dc46194
|
[
"MIT"
] | null | null | null |
portal_src/ext/renderbug/bin/nodes/nodes_display.py
|
bug00r/portal-py
|
388067bb571455f0249daffd04bb51606dc46194
|
[
"MIT"
] | null | null | null |
portal_src/ext/renderbug/bin/nodes/nodes_display.py
|
bug00r/portal-py
|
388067bb571455f0249daffd04bb51606dc46194
|
[
"MIT"
] | null | null | null |
from ext.renderbug.bin.nodes.node_base import BaseNode
class TextureDisplayNode(BaseNode):
"""
{
"name": ["Display", "Texture"]
}
"""
pass
| 15.363636
| 54
| 0.591716
| 16
| 169
| 6.1875
| 0.9375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.260355
| 169
| 10
| 55
| 16.9
| 0.792
| 0.224852
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
c215cea128ae7d0a5ae972db52df885b12642af2
| 873
|
py
|
Python
|
my_library/models/__init__.py
|
handsomezebra/nlp
|
cb9fdedc4bc685cefb0829ed65cf39ba2826439c
|
[
"MIT"
] | 6
|
2018-09-15T01:31:02.000Z
|
2019-09-30T03:07:18.000Z
|
my_library/models/__init__.py
|
handsomezebra/nlp
|
cb9fdedc4bc685cefb0829ed65cf39ba2826439c
|
[
"MIT"
] | 5
|
2018-08-05T14:28:24.000Z
|
2021-08-09T15:23:05.000Z
|
my_library/models/__init__.py
|
handsomezebra/nlp
|
cb9fdedc4bc685cefb0829ed65cf39ba2826439c
|
[
"MIT"
] | 3
|
2018-08-07T05:06:06.000Z
|
2019-11-06T14:03:35.000Z
|
from my_library.models.para_classification import ParaClassification
from my_library.models.para_cosine import ParaCosine
from my_library.models.esim_cosine import ESIMCosine
from my_library.models.contrastive_loss import ContrastiveLoss, CosineContrastiveLoss
from my_library.models.self_attentive_lstm import SelfAttentiveLstm, MaskedMultiHeadSelfAttention
from my_library.models.transformer import Transformer
from my_library.models.transformer2 import Transformer2
from my_library.models.bert_embedder import BertEmbedder
from my_library.models.bert_embedder2 import BertEmbedder2
from my_library.models.bert_embedder3 import BertEmbedder3
from my_library.models.sequence_classification import SequenceClassification
from my_library.models.csv_file_reader import CsvFileDatasetReader
from my_library.models.simple_classifier_predictor import SimpleClassifierPredictor
| 58.2
| 97
| 0.904926
| 107
| 873
| 7.130841
| 0.373832
| 0.102228
| 0.221494
| 0.323722
| 0.150721
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007335
| 0.063001
| 873
| 14
| 98
| 62.357143
| 0.925428
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
c2283dea0debc5f5971bcd79520f5b8ad37b699c
| 101
|
py
|
Python
|
enthought/appscripting/action/api.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | 3
|
2016-12-09T06:05:18.000Z
|
2018-03-01T13:00:29.000Z
|
enthought/appscripting/action/api.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | 1
|
2020-12-02T00:51:32.000Z
|
2020-12-02T08:48:55.000Z
|
enthought/appscripting/action/api.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | null | null | null |
# proxy module
from __future__ import absolute_import
from apptools.appscripting.action.api import *
| 25.25
| 46
| 0.841584
| 13
| 101
| 6.153846
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108911
| 101
| 3
| 47
| 33.666667
| 0.888889
| 0.118812
| 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
|
c23bd727ee14a9f3c04aac3b24c67d585714229e
| 211
|
py
|
Python
|
tests/test_web3.py
|
lgloege/web3storage
|
702e423a92e4ecd746f86ce2b3f3aeb405f1781f
|
[
"MIT"
] | 1
|
2022-03-26T03:15:49.000Z
|
2022-03-26T03:15:49.000Z
|
tests/test_web3.py
|
lgloege/web3storage
|
702e423a92e4ecd746f86ce2b3f3aeb405f1781f
|
[
"MIT"
] | 3
|
2022-03-26T03:28:36.000Z
|
2022-03-30T17:07:02.000Z
|
tests/test_web3.py
|
lgloege/web3storage
|
702e423a92e4ecd746f86ce2b3f3aeb405f1781f
|
[
"MIT"
] | null | null | null |
import web3storage
# import pytest
# use this when using pytest
# import os
# ACCESS_TOKEN = os.getenv('ACCESS_TOKEN')
# hardcode token
# ACCESS_TOKEN = ''
def test_client():
web3 = web3storage.Client()
| 15.071429
| 42
| 0.71564
| 27
| 211
| 5.444444
| 0.592593
| 0.22449
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017341
| 0.180095
| 211
| 13
| 43
| 16.230769
| 0.83237
| 0.587678
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
dfd3f31b9edbca7c4bc3f0679ef8e20b513f4ec3
| 234
|
py
|
Python
|
lib/world/__init__.py
|
defgsus/thegame
|
38a627d9108f1418b94b08831fd640dd87fbba83
|
[
"MIT"
] | 1
|
2021-11-05T11:49:26.000Z
|
2021-11-05T11:49:26.000Z
|
lib/world/__init__.py
|
defgsus/thegame
|
38a627d9108f1418b94b08831fd640dd87fbba83
|
[
"MIT"
] | null | null | null |
lib/world/__init__.py
|
defgsus/thegame
|
38a627d9108f1418b94b08831fd640dd87fbba83
|
[
"MIT"
] | null | null | null |
from .TiledImport import TiledImport
from .Tileset import Tileset
from .VoxelDistanceField import VoxelDistanceField
from .WorldChunk import WorldChunk
from .WorldEngine import WorldEngine
from .WorldProjection import WorldProjection
| 33.428571
| 50
| 0.871795
| 24
| 234
| 8.5
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.102564
| 234
| 6
| 51
| 39
| 0.971429
| 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
|
dfefe277e3d2fd17a9b81d3c4cadd8fb4532db55
| 213
|
py
|
Python
|
print_model.py
|
Numb523/FastSpeech2_emotion
|
a541ce89ddf66625ee57c0a294d0bec1ae701f0c
|
[
"MIT"
] | null | null | null |
print_model.py
|
Numb523/FastSpeech2_emotion
|
a541ce89ddf66625ee57c0a294d0bec1ae701f0c
|
[
"MIT"
] | null | null | null |
print_model.py
|
Numb523/FastSpeech2_emotion
|
a541ce89ddf66625ee57c0a294d0bec1ae701f0c
|
[
"MIT"
] | null | null | null |
from model import FastSpeech2, ScheduledOptim
from utils.tools import get_configs_of
preprocess_config, model_config, train_config = get_configs_of("AISHELL3")
print(FastSpeech2(preprocess_config, model_config))
| 35.5
| 74
| 0.85446
| 28
| 213
| 6.178571
| 0.535714
| 0.115607
| 0.138728
| 0.312139
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.015306
| 0.079812
| 213
| 6
| 75
| 35.5
| 0.867347
| 0
| 0
| 0
| 0
| 0
| 0.037383
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0.25
| 1
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
5f27f31def7c7317ad0085d63e7df21b42309000
| 15
|
py
|
Python
|
src/vimpdb/tests/scripts/wrongserverlist.py
|
bheadmaster/vimpdb
|
fd82405619ce430995f6ad3ec262a40c563a4e20
|
[
"MIT"
] | null | null | null |
src/vimpdb/tests/scripts/wrongserverlist.py
|
bheadmaster/vimpdb
|
fd82405619ce430995f6ad3ec262a40c563a4e20
|
[
"MIT"
] | null | null | null |
src/vimpdb/tests/scripts/wrongserverlist.py
|
bheadmaster/vimpdb
|
fd82405619ce430995f6ad3ec262a40c563a4e20
|
[
"MIT"
] | null | null | null |
print("WRONG")
| 7.5
| 14
| 0.666667
| 2
| 15
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.066667
| 15
| 1
| 15
| 15
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
a078a04ec35bf8b6e81f90541758aae34cee166d
| 126
|
py
|
Python
|
ood_samplefree/experiments/__init__.py
|
jm-begon/ood_samplefree
|
2c659fa8f2d15487f78c811c3fdeded1b1cfe91c
|
[
"BSD-3-Clause"
] | 2
|
2021-09-14T12:54:30.000Z
|
2021-10-24T02:23:39.000Z
|
ood_samplefree/experiments/__init__.py
|
jm-begon/ood_samplefree
|
2c659fa8f2d15487f78c811c3fdeded1b1cfe91c
|
[
"BSD-3-Clause"
] | null | null | null |
ood_samplefree/experiments/__init__.py
|
jm-begon/ood_samplefree
|
2c659fa8f2d15487f78c811c3fdeded1b1cfe91c
|
[
"BSD-3-Clause"
] | null | null | null |
from .base import stream_ood_features, OODStreamerWithSummaries
__all__ = ["stream_ood_features", "OODStreamerWithSummaries"]
| 42
| 63
| 0.849206
| 12
| 126
| 8.25
| 0.666667
| 0.181818
| 0.343434
| 0.828283
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 126
| 3
| 64
| 42
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0.338583
| 0.188976
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
2602cc57e2949b8f10e332cca4cbacd33acbccfb
| 2,591
|
py
|
Python
|
Mongo.py
|
miketineo/places
|
94adaf7f8e5c8f5909f0407207019e9a0651ebbe
|
[
"MIT"
] | null | null | null |
Mongo.py
|
miketineo/places
|
94adaf7f8e5c8f5909f0407207019e9a0651ebbe
|
[
"MIT"
] | null | null | null |
Mongo.py
|
miketineo/places
|
94adaf7f8e5c8f5909f0407207019e9a0651ebbe
|
[
"MIT"
] | null | null | null |
from flask import Flask, request, json, Response
from pymongo import MongoClient
import logging as log
import os
from MongoAPI import MongoAPI
app = Flask(__name__)
HOST = os.environ.get('DOCKER_HOST_IP', 'localhost')
PORT = os.environ.get('MONGO_PORT', '5000')
@app.route('/')
def base():
return Response(response=json.dumps({"Status": "UP"}),
status=200,
mimetype='application/json')
@app.route('/mongodb', methods=['GET'])
def mongo_read():
data = request.json
if data is None or data == {}:
return Response(response=json.dumps({"Error": "Please provide connection information"}),
status=400,
mimetype='application/json')
obj1 = MongoAPI(data)
response = obj1.read()
return Response(response=json.dumps(response),
status=200,
mimetype='application/json')
@app.route('/mongodb', methods=['POST'])
def mongo_write():
data = request.json
if data is None or data == {} or 'Document' not in data:
log.info(data)
return Response(response=json.dumps({"Error": "Please provide connection information"}),
status=400,
mimetype='application/json')
obj1 = MongoAPI(data)
response = obj1.write(data)
return Response(response=json.dumps(response),
status=200,
mimetype='application/json')
@app.route('/mongodb', methods=['PUT'])
def mongo_update():
data = request.json
if data is None or data == {} or 'Filter' not in data:
return Response(response=json.dumps({"Error": "Please provide connection information"}),
status=400,
mimetype='application/json')
obj1 = MongoAPI(data)
response = obj1.update()
return Response(response=json.dumps(response),
status=200,
mimetype='application/json')
@app.route('/mongodb', methods=['DELETE'])
def mongo_delete():
data = request.json
if data is None or data == {} or 'Filter' not in data:
return Response(response=json.dumps({"Error": "Please provide connection information"}),
status=400,
mimetype='application/json')
obj1 = MongoAPI(data)
response = obj1.delete(data)
return Response(response=json.dumps(response),
status=200,
mimetype='application/json')
if __name__ == '__main__':
app.run(debug=True, port=5001, host='0.0.0.0')
| 33.649351
| 96
| 0.59012
| 285
| 2,591
| 5.298246
| 0.22807
| 0.083444
| 0.131126
| 0.154967
| 0.751656
| 0.731126
| 0.731126
| 0.731126
| 0.731126
| 0.676159
| 0
| 0.025215
| 0.280587
| 2,591
| 76
| 97
| 34.092105
| 0.784871
| 0
| 0
| 0.5625
| 0
| 0
| 0.170205
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.078125
| false
| 0
| 0.078125
| 0.015625
| 0.296875
| 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
|
261a7dc7db439fd748cb6ed9dec753ff9b9e6369
| 30
|
py
|
Python
|
tests/__init__.py
|
AvalonPlex/avalonplex-core
|
3b3aa263edf5c22e8dec3430ecafa28504a48435
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
AvalonPlex/avalonplex-core
|
3b3aa263edf5c22e8dec3430ecafa28504a48435
|
[
"MIT"
] | 1
|
2018-01-22T07:02:27.000Z
|
2018-01-22T07:02:36.000Z
|
tests/__init__.py
|
AvalonPlex/avalonplex-core
|
3b3aa263edf5c22e8dec3430ecafa28504a48435
|
[
"MIT"
] | null | null | null |
from tests.serialize import *
| 15
| 29
| 0.8
| 4
| 30
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.133333
| 30
| 1
| 30
| 30
| 0.923077
| 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
|
268b719e40e39b84a32bf028763cc90695fbd80b
| 108
|
py
|
Python
|
nsvision/__init__.py
|
challengerinteractive/nsvision
|
e7870f21c23987bf3ca833857e60463efe511703
|
[
"MIT"
] | null | null | null |
nsvision/__init__.py
|
challengerinteractive/nsvision
|
e7870f21c23987bf3ca833857e60463efe511703
|
[
"MIT"
] | null | null | null |
nsvision/__init__.py
|
challengerinteractive/nsvision
|
e7870f21c23987bf3ca833857e60463efe511703
|
[
"MIT"
] | null | null | null |
from ._version import version as __version__
from .image_utils import *
from .video_utils import live_video
| 27
| 44
| 0.833333
| 16
| 108
| 5.125
| 0.5
| 0.268293
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12963
| 108
| 3
| 45
| 36
| 0.87234
| 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
|
cd083be42638e60bcda9c9323f35b35c73801f94
| 204
|
py
|
Python
|
main.py
|
Baltsat/text_processing
|
088b130fbf21a4bf4e19dfb68ba3ea33152ce85e
|
[
"MIT"
] | null | null | null |
main.py
|
Baltsat/text_processing
|
088b130fbf21a4bf4e19dfb68ba3ea33152ce85e
|
[
"MIT"
] | null | null | null |
main.py
|
Baltsat/text_processing
|
088b130fbf21a4bf4e19dfb68ba3ea33152ce85e
|
[
"MIT"
] | null | null | null |
from processing import filter
from analyzing import analyze
# Text Pre-processing
filter('SiriusData.csv', 'Processed_text.txt')
# Text Analyzing and Report
analyze('Processed_text.txt', 'report.txt')
| 20.4
| 46
| 0.784314
| 27
| 204
| 5.851852
| 0.518519
| 0.164557
| 0.202532
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.112745
| 204
| 9
| 47
| 22.666667
| 0.872928
| 0.220588
| 0
| 0
| 0
| 0
| 0.387097
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
cd1373791ce7325e0a0581b8cf36063d974b5139
| 24
|
py
|
Python
|
knight/__init__.py
|
hackerkid/knight
|
4d0d53046f972e522061fb339778a3d10da3b759
|
[
"MIT"
] | 1
|
2018-11-10T10:02:34.000Z
|
2018-11-10T10:02:34.000Z
|
knight/__init__.py
|
hackerkid/knight
|
4d0d53046f972e522061fb339778a3d10da3b759
|
[
"MIT"
] | null | null | null |
knight/__init__.py
|
hackerkid/knight
|
4d0d53046f972e522061fb339778a3d10da3b759
|
[
"MIT"
] | null | null | null |
from .knight import app
| 12
| 23
| 0.791667
| 4
| 24
| 4.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 24
| 1
| 24
| 24
| 0.95
| 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
|
cd25a03a8d4319a983bcdb23d03e2076d5a7f556
| 235
|
py
|
Python
|
backend/backend/files/admin.py
|
Phantom-Troupe-CS251/RedPlag
|
6c6d7a26fcc5d23cf5bea26d3d1596a87f8dda7c
|
[
"MIT"
] | null | null | null |
backend/backend/files/admin.py
|
Phantom-Troupe-CS251/RedPlag
|
6c6d7a26fcc5d23cf5bea26d3d1596a87f8dda7c
|
[
"MIT"
] | 7
|
2021-04-08T20:12:18.000Z
|
2021-06-10T20:19:13.000Z
|
backend/backend/files/admin.py
|
Phantom-Troupe-CS251/RedPlag
|
6c6d7a26fcc5d23cf5bea26d3d1596a87f8dda7c
|
[
"MIT"
] | 1
|
2022-01-15T21:57:16.000Z
|
2022-01-15T21:57:16.000Z
|
from django.contrib import admin
from .models import UploadFile, OutputFile, HeatMapFile, HistogramFile
admin.site.register(UploadFile)
admin.site.register(OutputFile)
admin.site.register(HeatMapFile)
admin.site.register(HistogramFile)
| 39.166667
| 70
| 0.851064
| 28
| 235
| 7.142857
| 0.428571
| 0.18
| 0.34
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.059574
| 235
| 6
| 71
| 39.166667
| 0.904977
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 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
|
cd561fd94668ce7f62e7986e57571ba66a1c223a
| 112
|
py
|
Python
|
RPiserver/scripts/alarm02.py
|
Chathura-Rathnayake/SoteriaX-RaspberryPi
|
292797a40c0ef3593bd2b3ea200d5664b5d2c3c6
|
[
"MIT"
] | null | null | null |
RPiserver/scripts/alarm02.py
|
Chathura-Rathnayake/SoteriaX-RaspberryPi
|
292797a40c0ef3593bd2b3ea200d5664b5d2c3c6
|
[
"MIT"
] | null | null | null |
RPiserver/scripts/alarm02.py
|
Chathura-Rathnayake/SoteriaX-RaspberryPi
|
292797a40c0ef3593bd2b3ea200d5664b5d2c3c6
|
[
"MIT"
] | null | null | null |
import os
os.system('mpg321 /home/pi/RPiserver/alarms/2.mp3')
print("Alarm02 played successfully")
# play sound
| 22.4
| 51
| 0.767857
| 17
| 112
| 5.058824
| 0.941176
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.068627
| 0.089286
| 112
| 4
| 52
| 28
| 0.77451
| 0.089286
| 0
| 0
| 0
| 0
| 0.65
| 0.31
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
cd7872446413dff6c9773c3c8fc86115f0167893
| 54
|
py
|
Python
|
tests/tt2.py
|
yuanjia-open-source/sniff-code
|
421d0898986fcb114e0b36e1a9dee87c49412c03
|
[
"MIT"
] | null | null | null |
tests/tt2.py
|
yuanjia-open-source/sniff-code
|
421d0898986fcb114e0b36e1a9dee87c49412c03
|
[
"MIT"
] | null | null | null |
tests/tt2.py
|
yuanjia-open-source/sniff-code
|
421d0898986fcb114e0b36e1a9dee87c49412c03
|
[
"MIT"
] | null | null | null |
class A(object):
pass
class B(object):
pass
| 7.714286
| 16
| 0.592593
| 8
| 54
| 4
| 0.625
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.296296
| 54
| 6
| 17
| 9
| 0.842105
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
cd969077e0f8d70e4f7376673e9b506920b83600
| 87
|
py
|
Python
|
python/testData/paramInfo/KwdFunction.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 2
|
2019-04-28T07:48:50.000Z
|
2020-12-11T14:18:08.000Z
|
python/testData/paramInfo/KwdFunction.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 173
|
2018-07-05T13:59:39.000Z
|
2018-08-09T01:12:03.000Z
|
python/testData/paramInfo/KwdFunction.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 2
|
2020-03-15T08:57:37.000Z
|
2020-04-07T04:48:14.000Z
|
def foo(a, b, **c):
pass
foo(<arg1>1, <arg2>2, <arg3>x=3, <arg4>**{'y':4}, <arg5>)
| 14.5
| 57
| 0.482759
| 18
| 87
| 2.333333
| 0.944444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.123288
| 0.16092
| 87
| 5
| 58
| 17.4
| 0.452055
| 0
| 0
| 0
| 0
| 0
| 0.011628
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0.333333
| 0
| null | null | 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
26b9a17b23653a43ad1ffb0659d1cea657eaedf1
| 1,211
|
py
|
Python
|
openapi-python-client/openapi_client/api/__init__.py
|
yanavasileva/camunda-bpm-examples
|
051f8f28c62845e68ce4059ab64264c5a0bdc009
|
[
"Apache-2.0"
] | null | null | null |
openapi-python-client/openapi_client/api/__init__.py
|
yanavasileva/camunda-bpm-examples
|
051f8f28c62845e68ce4059ab64264c5a0bdc009
|
[
"Apache-2.0"
] | null | null | null |
openapi-python-client/openapi_client/api/__init__.py
|
yanavasileva/camunda-bpm-examples
|
051f8f28c62845e68ce4059ab64264c5a0bdc009
|
[
"Apache-2.0"
] | null | null | null |
from __future__ import absolute_import
# flake8: noqa
# import apis into api package
from openapi_client.api.condition_api import ConditionApi
from openapi_client.api.deployment_api import DeploymentApi
from openapi_client.api.engine_api import EngineApi
from openapi_client.api.event_subscription_api import EventSubscriptionApi
from openapi_client.api.external_task_api import ExternalTaskApi
from openapi_client.api.message_api import MessageApi
from openapi_client.api.metrics_api import MetricsApi
from openapi_client.api.process_definition_api import ProcessDefinitionApi
from openapi_client.api.process_instance_api import ProcessInstanceApi
from openapi_client.api.schema_log_api import SchemaLogApi
from openapi_client.api.signal_api import SignalApi
from openapi_client.api.task_api import TaskApi
from openapi_client.api.task_attachment_api import TaskAttachmentApi
from openapi_client.api.task_comment_api import TaskCommentApi
from openapi_client.api.task_identity_link_api import TaskIdentityLinkApi
from openapi_client.api.task_local_variable_api import TaskLocalVariableApi
from openapi_client.api.task_variable_api import TaskVariableApi
from openapi_client.api.version_api import VersionApi
| 50.458333
| 75
| 0.895954
| 168
| 1,211
| 6.142857
| 0.309524
| 0.19186
| 0.296512
| 0.348837
| 0.19186
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00089
| 0.071841
| 1,211
| 23
| 76
| 52.652174
| 0.91726
| 0.033856
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
26fa63a999028cb7ae6379010c337a88fbea2cf3
| 145
|
py
|
Python
|
comvex/utils/helpers/__init__.py
|
shrenik-jain/ComVEX
|
93622de3a4771cda13b14f8bba52990eb47c2409
|
[
"Apache-2.0"
] | 29
|
2021-06-14T08:27:43.000Z
|
2022-02-07T13:40:27.000Z
|
comvex/utils/helpers/__init__.py
|
shrenik-jain/ComVEX
|
93622de3a4771cda13b14f8bba52990eb47c2409
|
[
"Apache-2.0"
] | 3
|
2021-11-23T16:11:51.000Z
|
2021-12-21T17:24:36.000Z
|
comvex/utils/helpers/__init__.py
|
shrenik-jain/ComVEX
|
93622de3a4771cda13b14f8bba52990eb47c2409
|
[
"Apache-2.0"
] | 3
|
2021-06-27T08:18:57.000Z
|
2021-12-17T07:29:59.000Z
|
from .functions import name_with_msg, config_pop_argument, get_attr_if_exists, get_act_fnc, get_conv_layer, get_norm_layer
from .classes import *
| 72.5
| 122
| 0.862069
| 25
| 145
| 4.48
| 0.76
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.082759
| 145
| 2
| 123
| 72.5
| 0.842105
| 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
|
f832381687aea247941c5f054b80e625db3fbff0
| 98
|
py
|
Python
|
5200_flask_app/app/config.py
|
F-Zainab/SWArch
|
e9b5638d0287278f78b21428b2bc5bcfba417585
|
[
"MIT"
] | null | null | null |
5200_flask_app/app/config.py
|
F-Zainab/SWArch
|
e9b5638d0287278f78b21428b2bc5bcfba417585
|
[
"MIT"
] | 1
|
2020-02-17T19:32:28.000Z
|
2020-02-17T20:20:23.000Z
|
5200_flask_app/app/config.py
|
F-Zainab/SWArch
|
e9b5638d0287278f78b21428b2bc5bcfba417585
|
[
"MIT"
] | 3
|
2020-01-31T05:10:30.000Z
|
2020-03-04T03:02:56.000Z
|
import os
class Config():
SECRET_KEY = os.environ.get('SECRET_KEY') or 'a-not-that-secret-key'
| 32.666667
| 72
| 0.714286
| 17
| 98
| 4
| 0.705882
| 0.397059
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122449
| 98
| 3
| 72
| 32.666667
| 0.790698
| 0
| 0
| 0
| 0
| 0
| 0.313131
| 0.212121
| 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
|
f89ee74b125a9526ea284a3e472adc57effef34c
| 313
|
py
|
Python
|
Scripts/Basics/04_if.py
|
MMMahmoodian/fundamental-arcpy
|
09ad1da8467e6181ad8f86fcbe00e4b7e3c52375
|
[
"MIT"
] | null | null | null |
Scripts/Basics/04_if.py
|
MMMahmoodian/fundamental-arcpy
|
09ad1da8467e6181ad8f86fcbe00e4b7e3c52375
|
[
"MIT"
] | null | null | null |
Scripts/Basics/04_if.py
|
MMMahmoodian/fundamental-arcpy
|
09ad1da8467e6181ad8f86fcbe00e4b7e3c52375
|
[
"MIT"
] | null | null | null |
x = 5
if x > 100:
print "bigger than 100"
if x > 50 and x < 100:
print "bigger than 50"
if x > 10:
print "bigger than 10"
if x > 40:
print "bigger"
else:
print "less"
if x > 100:
print "bigger than 100"
elif x > 50:
print "bigger than 50"
elif x > 10:
print "bigger than 10"
| 13.041667
| 27
| 0.56869
| 55
| 313
| 3.236364
| 0.254545
| 0.432584
| 0.505618
| 0.252809
| 0.601124
| 0.494382
| 0.269663
| 0
| 0
| 0
| 0
| 0.161137
| 0.325879
| 313
| 23
| 28
| 13.608696
| 0.682464
| 0
| 0
| 0.470588
| 0
| 0
| 0.307692
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.470588
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
f8ad63c24c45b8dfef7c5ec9679e2f9b5f14275e
| 83
|
py
|
Python
|
Mundo01/Python/aula08b.py
|
molonti/CursoemVideo---Python
|
4f6a7af648f7f619d11e95fa3dc7a33b28fcfa11
|
[
"MIT"
] | null | null | null |
Mundo01/Python/aula08b.py
|
molonti/CursoemVideo---Python
|
4f6a7af648f7f619d11e95fa3dc7a33b28fcfa11
|
[
"MIT"
] | null | null | null |
Mundo01/Python/aula08b.py
|
molonti/CursoemVideo---Python
|
4f6a7af648f7f619d11e95fa3dc7a33b28fcfa11
|
[
"MIT"
] | null | null | null |
import emoji
print(emoji.emojize("olá, Mundo :earth_americas:", use_aliases=True))
| 27.666667
| 69
| 0.783133
| 12
| 83
| 5.25
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.072289
| 83
| 2
| 70
| 41.5
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0.325301
| 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
|
6ef7197051a2f7342d34e4983627a0f99ea486be
| 85
|
py
|
Python
|
redbox/config/types/__init__.py
|
cytopia/prometheus-redbox_exporter
|
cfef30d9b705cc0176b74c7a527709a27937ce25
|
[
"MIT"
] | 3
|
2021-02-27T13:40:32.000Z
|
2021-03-18T18:44:07.000Z
|
redbox/config/types/__init__.py
|
cytopia/prometheus-redbox_exporter
|
cfef30d9b705cc0176b74c7a527709a27937ce25
|
[
"MIT"
] | null | null | null |
redbox/config/types/__init__.py
|
cytopia/prometheus-redbox_exporter
|
cfef30d9b705cc0176b74c7a527709a27937ce25
|
[
"MIT"
] | null | null | null |
"""Module Imports."""
from .ds_config import DsConfig
from ...types import DsTarget
| 17
| 31
| 0.741176
| 11
| 85
| 5.636364
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.129412
| 85
| 4
| 32
| 21.25
| 0.837838
| 0.176471
| 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
|
3e2ff8191906ffb2617cceb141885adfafb4240f
| 412
|
py
|
Python
|
y2018/day14/day14_test.py
|
ammarnajjar/adventofcode
|
d8c6416cdad9ca4a254c4888422fa3ce29524685
|
[
"MIT"
] | null | null | null |
y2018/day14/day14_test.py
|
ammarnajjar/adventofcode
|
d8c6416cdad9ca4a254c4888422fa3ce29524685
|
[
"MIT"
] | 7
|
2019-11-20T10:04:49.000Z
|
2022-03-18T00:19:12.000Z
|
y2018/day14/day14_test.py
|
ammarnajjar/adventofcode
|
d8c6416cdad9ca4a254c4888422fa3ce29524685
|
[
"MIT"
] | null | null | null |
from day14 import part1
from day14 import part2
def test_part1():
assert part1('37', 5) == '0124515891'
assert part1('37', 9) == '5158916779'
assert part1('37', 18) == '9251071085'
assert part1('37', 2018) == '5941429882'
def test_part2():
assert part2('37', '51589') == 9
assert part2('37', '01245') == 5
assert part2('37', '92510') == 18
assert part2('37', '59414') == 2018
| 24.235294
| 44
| 0.597087
| 54
| 412
| 4.518519
| 0.388889
| 0.180328
| 0.213115
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 0.213592
| 412
| 16
| 45
| 25.75
| 0.419753
| 0
| 0
| 0
| 0
| 0
| 0.184466
| 0
| 0
| 0
| 0
| 0
| 0.666667
| 1
| 0.166667
| true
| 0
| 0.166667
| 0
| 0.333333
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
3e3c2fe9e697fb836e76bfe1215c570f6e3ac1ce
| 4,906
|
py
|
Python
|
hikyuu/test/Signal.py
|
kknet/hikyuu
|
650814c3e1d32894ccc1263a0fecd6693028d2e3
|
[
"MIT"
] | 1
|
2021-11-21T08:42:35.000Z
|
2021-11-21T08:42:35.000Z
|
hikyuu/test/Signal.py
|
kknet/hikyuu
|
650814c3e1d32894ccc1263a0fecd6693028d2e3
|
[
"MIT"
] | null | null | null |
hikyuu/test/Signal.py
|
kknet/hikyuu
|
650814c3e1d32894ccc1263a0fecd6693028d2e3
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python
# -*- coding: utf8 -*-
# gb18030
#===============================================================================
# 作者:fasiondog
# 历史:1)20130321, Added by fasiondog
#===============================================================================
import unittest
from test_init import *
class SignalPython(SignalBase):
def __init__(self):
super(SignalPython, self).__init__("SignalPython")
self._x = 0
self.set_param("test", 30)
def _reset(self):
self._x = 0
def _clone(self):
p = SignalPython()
p._x = self._x
return p
def _calculate(self):
self._add_buy_signal(Datetime(201201210000))
self._add_sell_signal(Datetime(201201300000))
class SignalTest(unittest.TestCase):
def test_SignalBase(self):
p = SignalPython()
self.assertEqual(p.name, "SignalPython")
p.name = "SignalPythonTest"
self.assertEqual(p.name, "SignalPythonTest")
self.assertEqual(p.should_buy(Datetime(201201210000)), False)
self.assertEqual(p.should_sell(Datetime(201201300000)), False)
k = sm['sh000001'].get_kdata(Query(-100))
self.assertEqual(k.empty(), False)
p.to = k
self.assertEqual(p.should_buy(Datetime(201201210000)), True)
self.assertEqual(p.should_sell(Datetime(201201300000)), True)
self.assertEqual(p.should_buy(Datetime(200101010000)), False)
p._add_buy_signal(Datetime(200101010000))
self.assertEqual(p.should_buy(Datetime(200101010000)), True)
self.assertEqual(p.should_sell(Datetime(200101030000)), False)
p._add_sell_signal(Datetime(200101030000))
self.assertEqual(p.should_sell(Datetime(200101030000)), True)
d = p.get_buy_signal()
for i in range(len(d)):
self.assertIn(d[i], [Datetime(201201210000), Datetime(200101010000)])
d = p.get_sell_signal()
for i in range(len(d)):
self.assertIn(d[i], [Datetime(201201300000), Datetime(200101030000)])
p_clone = p.clone()
d = p_clone.get_buy_signal()
for i in range(len(d)):
self.assertIn(d[i], [Datetime(201201210000), Datetime(200101010000)])
d = p_clone.get_sell_signal()
for i in range(len(d)):
self.assertIn(d[i], [Datetime(201201300000), Datetime(200101030000)])
self.assertEqual(p._x, 0)
p._x = 10
self.assertEqual(p._x, 10)
p.reset()
self.assertEqual(p._x, 0)
p._x = 20
p_clone = p.clone()
self.assertEqual(p_clone._x, 20)
p.reset()
self.assertEqual(p._x, 0)
self.assertEqual(p_clone._x, 20)
self.assertEqual(p.get_param("test"), 30)
self.assertEqual(p_clone.get_param("test"), 30)
p.set_param("test", 10)
self.assertEqual(p.get_param("test"), 10)
self.assertEqual(p_clone.get_param("test"), 30)
def testSignal(self):
self._add_buy_signal(Datetime(201201210000))
self._add_sell_signal(Datetime(201201300000))
class TestCrtSG(unittest.TestCase):
def test_crtSG(self):
p = crtSG(testSignal, params={'test': 30}, name='SG_TEST')
self.assertEqual(p.name, "SG_TEST")
p.name = "SignalPythonTest"
self.assertEqual(p.name, "SignalPythonTest")
self.assertEqual(p.should_buy(Datetime(201201210000)), False)
self.assertEqual(p.should_sell(Datetime(201201300000)), False)
k = sm['sh000001'].get_kdata(Query(-100))
self.assertEqual(k.empty(), False)
p.to = k
self.assertEqual(p.should_buy(Datetime(201201210000)), True)
self.assertEqual(p.should_sell(Datetime(201201300000)), True)
self.assertEqual(p.should_buy(Datetime(200101010000)), False)
p._add_buy_signal(Datetime(200101010000))
self.assertEqual(p.should_buy(Datetime(200101010000)), True)
self.assertEqual(p.should_sell(Datetime(200101030000)), False)
p._add_sell_signal(Datetime(200101030000))
self.assertEqual(p.should_sell(Datetime(200101030000)), True)
d = p.get_buy_signal()
for i in range(len(d)):
self.assertIn(d[i], [Datetime(201201210000), Datetime(200101010000)])
d = p.get_sell_signal()
for i in range(len(d)):
self.assertIn(d[i], [Datetime(201201300000), Datetime(200101030000)])
p_clone = p.clone()
d = p_clone.get_buy_signal()
for i in range(len(d)):
self.assertIn(d[i], [Datetime(201201210000), Datetime(200101010000)])
d = p_clone.get_sell_signal()
for i in range(len(d)):
self.assertIn(d[i], [Datetime(201201300000), Datetime(200101030000)])
def suite():
return unittest.TestLoader().loadTestsFromTestCase(SignalTest)
def suiteTestCrtSG():
return unittest.TestLoader().loadTestsFromTestCase(TestCrtSG)
| 33.60274
| 81
| 0.621688
| 581
| 4,906
| 5.072289
| 0.134251
| 0.162878
| 0.162878
| 0.119444
| 0.778758
| 0.778758
| 0.739057
| 0.715304
| 0.691551
| 0.691551
| 0
| 0.140706
| 0.214839
| 4,906
| 145
| 82
| 33.834483
| 0.624351
| 0.050958
| 0
| 0.718447
| 0
| 0
| 0.031405
| 0
| 0
| 0
| 0
| 0
| 0.38835
| 1
| 0.087379
| false
| 0
| 0.019417
| 0.019417
| 0.165049
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
3e68e3187a39cd693b6614a513e62762ce4ab4cc
| 83
|
py
|
Python
|
nemo/nemo/backends/pytorch/tutorials/__init__.py
|
petermartigny/NeMo
|
b20821e637314940e36b63d32c601c43d1b74051
|
[
"Apache-2.0"
] | 10
|
2020-03-17T08:32:06.000Z
|
2021-04-19T19:03:50.000Z
|
nemo/nemo/backends/pytorch/tutorials/__init__.py
|
petermartigny/NeMo
|
b20821e637314940e36b63d32c601c43d1b74051
|
[
"Apache-2.0"
] | 3
|
2020-11-13T17:45:41.000Z
|
2022-03-12T00:28:59.000Z
|
nemo/nemo/backends/pytorch/tutorials/__init__.py
|
petermartigny/NeMo
|
b20821e637314940e36b63d32c601c43d1b74051
|
[
"Apache-2.0"
] | 3
|
2020-03-10T05:10:07.000Z
|
2020-12-08T01:33:35.000Z
|
# Copyright (c) 2019 NVIDIA Corporation
from .chatbot import *
from .toys import *
| 20.75
| 39
| 0.746988
| 11
| 83
| 5.636364
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.057971
| 0.168675
| 83
| 3
| 40
| 27.666667
| 0.84058
| 0.445783
| 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
|
3e7bb0c11d68253beefde7709d98ae60c1ff992a
| 1,881
|
py
|
Python
|
dbks/cluster/api.py
|
vincentlam/dbks
|
a6dedd6281100666b0e8eb6a5a838362d3260fc5
|
[
"MIT"
] | null | null | null |
dbks/cluster/api.py
|
vincentlam/dbks
|
a6dedd6281100666b0e8eb6a5a838362d3260fc5
|
[
"MIT"
] | null | null | null |
dbks/cluster/api.py
|
vincentlam/dbks
|
a6dedd6281100666b0e8eb6a5a838362d3260fc5
|
[
"MIT"
] | null | null | null |
from dbks.client import Client
class ClusterAPI:
def __init__(self, client=Client()):
self.client = client
def create(self, params=None, json=None):
return self.client.call("POST", "/clusters/create", json=json)
def edit(self, params=None, json=None):
return self.client.call("POST", "/clusters/edit", json=json)
def start(self, params=None, json=None):
return self.client.call("POST", "/clusters/start", json=json)
def restart(self, params=None, json=None):
return self.client.call("POST", "/clusters/restart", json=json)
def resize(self, params=None, json=None):
return self.client.call("POST", "/clusters/resize", json=json)
def terminate(self, params=None, json=None):
return self.client.call("POST", "/clusters/delete", json=json)
def delete(self, params=None, json=None):
return self.client.call("POST", "/clusters/permanent-delete", json=json)
def get(self, params=None, json=None):
return self.client.call("GET", "/clusters/get", params=params)
def pin(self, params=None, json=None):
return self.client.call("POST", "/clusters/pin", json=json)
def unpin(self, params=None, json=None):
return self.client.call("POST", "/clusters/unpin", json=json)
def list(self, params=None, json=None):
return self.client.call("GET", "/clusters/list")
def list_node_types(self, params=None, json=None):
return self.client.call("GET", "/clusters/list-node-types")
def runtime_versions(self, params=None, json=None):
return self.client.call("GET", "/clusters/spark-versions")
def list_zones(self, params=None, json=None):
return self.client.call("GET", "/clusters/list-zones")
def events(self, params=None, json=None):
return self.client.call("POST", "/clusters/events", json=json)
| 36.173077
| 80
| 0.657097
| 256
| 1,881
| 4.796875
| 0.136719
| 0.138436
| 0.17101
| 0.21987
| 0.665309
| 0.665309
| 0.665309
| 0.665309
| 0.665309
| 0.665309
| 0
| 0
| 0.17916
| 1,881
| 51
| 81
| 36.882353
| 0.795337
| 0
| 0
| 0
| 0
| 0
| 0.167464
| 0.039872
| 0
| 0
| 0
| 0
| 0
| 1
| 0.470588
| false
| 0
| 0.029412
| 0.441176
| 0.970588
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
e444f2ef1e83bcc5cb76f830fe4bd8ed585f0bb1
| 126
|
py
|
Python
|
tests/basic/ex_kwargs_args.py
|
rooshm/steinerpy
|
777b55fa94527365322ba5fa675c8be090333715
|
[
"MIT"
] | 3
|
2021-06-10T16:46:20.000Z
|
2022-02-11T14:24:15.000Z
|
tests/basic/ex_kwargs_args.py
|
rooshm/steinerpy
|
777b55fa94527365322ba5fa675c8be090333715
|
[
"MIT"
] | 12
|
2021-03-31T03:31:24.000Z
|
2021-11-18T21:51:18.000Z
|
tests/basic/ex_kwargs_args.py
|
rooshm/steinerpy
|
777b55fa94527365322ba5fa675c8be090333715
|
[
"MIT"
] | 1
|
2021-06-13T15:01:24.000Z
|
2021-06-13T15:01:24.000Z
|
def test_args_kwargs(*args, **kwargs):
for k in kwargs.keys():
print(k)
test_args_kwargs(fire="hot", ice="cold")
| 21
| 40
| 0.642857
| 20
| 126
| 3.85
| 0.65
| 0.38961
| 0.363636
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.18254
| 126
| 6
| 40
| 21
| 0.747573
| 0
| 0
| 0
| 0
| 0
| 0.055118
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0
| 0.25
| 0.25
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
e46e2822578a70b745a6cecde0f2562f4ef8c415
| 31,261
|
py
|
Python
|
astrobase/lcproc/lcsfeatures.py
|
pierfra-ro/astrobase
|
b9f62c59a3ab9cdc1388d409fa281c26f1e6db6c
|
[
"MIT"
] | 45
|
2017-03-09T19:08:44.000Z
|
2022-03-24T00:36:28.000Z
|
astrobase/lcproc/lcsfeatures.py
|
pierfra-ro/astrobase
|
b9f62c59a3ab9cdc1388d409fa281c26f1e6db6c
|
[
"MIT"
] | 92
|
2016-12-21T19:01:20.000Z
|
2022-01-03T15:28:45.000Z
|
astrobase/lcproc/lcsfeatures.py
|
pierfra-ro/astrobase
|
b9f62c59a3ab9cdc1388d409fa281c26f1e6db6c
|
[
"MIT"
] | 20
|
2016-12-20T23:01:29.000Z
|
2021-03-07T16:24:15.000Z
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# starfeatures.py - Waqas Bhatti (wbhatti@astro.princeton.edu) - Feb 2019
'''
This contains functions to obtain various star magnitude and color features for
large numbers of light curves. Useful later for variable star classification.
'''
#############
## LOGGING ##
#############
import logging
from astrobase import log_sub, log_fmt, log_date_fmt
DEBUG = False
if DEBUG:
level = logging.DEBUG
else:
level = logging.INFO
LOGGER = logging.getLogger(__name__)
logging.basicConfig(
level=level,
style=log_sub,
format=log_fmt,
datefmt=log_date_fmt,
)
LOGDEBUG = LOGGER.debug
LOGINFO = LOGGER.info
LOGWARNING = LOGGER.warning
LOGERROR = LOGGER.error
LOGEXCEPTION = LOGGER.exception
#############
## IMPORTS ##
#############
import pickle
import os
import os.path
import glob
import multiprocessing as mp
from concurrent.futures import ProcessPoolExecutor
from tornado.escape import squeeze
# to turn a list of keys into a dict address
# from https://stackoverflow.com/a/14692747
from functools import reduce
from operator import getitem
def _dict_get(datadict, keylist):
return reduce(getitem, keylist, datadict)
import numpy as np
try:
from tqdm import tqdm
TQDM = True
except Exception:
TQDM = False
pass
############
## CONFIG ##
############
NCPUS = mp.cpu_count()
###################
## LOCAL IMPORTS ##
###################
from astrobase.varclass import starfeatures
from astrobase.lcproc import get_lcformat
###################
## STAR FEATURES ##
###################
def get_starfeatures(lcfile,
outdir,
kdtree,
objlist,
lcflist,
neighbor_radius_arcsec,
deredden=True,
custom_bandpasses=None,
lcformat='hat-sql',
lcformatdir=None):
'''This runs the functions from :py:func:`astrobase.varclass.starfeatures`
on a single light curve file.
Parameters
----------
lcfile : str
This is the LC file to extract star features for.
outdir : str
This is the directory to write the output pickle to.
kdtree: scipy.spatial.cKDTree
This is a `scipy.spatial.KDTree` or `cKDTree` used to calculate neighbor
proximity features. This is for the light curve catalog this object is
in.
objlist : np.array
This is a Numpy array of object IDs in the same order as the
`kdtree.data` np.array. This is for the light curve catalog this object
is in.
lcflist : np.array
This is a Numpy array of light curve filenames in the same order as
`kdtree.data`. This is for the light curve catalog this object is in.
neighbor_radius_arcsec : float
This indicates the radius in arcsec to search for neighbors for this
object using the light curve catalog's `kdtree`, `objlist`, `lcflist`,
and in GAIA.
deredden : bool
This controls if the colors and any color classifications will be
dereddened using 2MASS DUST.
custom_bandpasses : dict or None
This is a dict used to define any custom bandpasses in the
`in_objectinfo` dict you want to make this function aware of and
generate colors for. Use the format below for this dict::
{
'<bandpass_key_1>':{'dustkey':'<twomass_dust_key_1>',
'label':'<band_label_1>'
'colors':[['<bandkey1>-<bandkey2>',
'<BAND1> - <BAND2>'],
['<bandkey3>-<bandkey4>',
'<BAND3> - <BAND4>']]},
.
...
.
'<bandpass_key_N>':{'dustkey':'<twomass_dust_key_N>',
'label':'<band_label_N>'
'colors':[['<bandkey1>-<bandkey2>',
'<BAND1> - <BAND2>'],
['<bandkey3>-<bandkey4>',
'<BAND3> - <BAND4>']]},
}
Where:
`bandpass_key` is a key to use to refer to this bandpass in the
`objectinfo` dict, e.g. 'sdssg' for SDSS g band
`twomass_dust_key` is the key to use in the 2MASS DUST result table for
reddening per band-pass. For example, given the following DUST result
table (using http://irsa.ipac.caltech.edu/applications/DUST/)::
|Filter_name|LamEff |A_over_E_B_V_SandF|A_SandF|A_over_E_B_V_SFD|A_SFD|
|char |float |float |float |float |float|
| |microns| |mags | |mags |
CTIO U 0.3734 4.107 0.209 4.968 0.253
CTIO B 0.4309 3.641 0.186 4.325 0.221
CTIO V 0.5517 2.682 0.137 3.240 0.165
.
.
...
The `twomass_dust_key` for 'vmag' would be 'CTIO V'. If you want to
skip DUST lookup and want to pass in a specific reddening magnitude
for your bandpass, use a float for the value of
`twomass_dust_key`. If you want to skip DUST lookup entirely for
this bandpass, use None for the value of `twomass_dust_key`.
`band_label` is the label to use for this bandpass, e.g. 'W1' for
WISE-1 band, 'u' for SDSS u, etc.
The 'colors' list contains color definitions for all colors you want
to generate using this bandpass. this list contains elements of the
form::
['<bandkey1>-<bandkey2>','<BAND1> - <BAND2>']
where the the first item is the bandpass keys making up this color,
and the second item is the label for this color to be used by the
frontends. An example::
['sdssu-sdssg','u - g']
lcformat : str
This is the `formatkey` associated with your light curve format, which
you previously passed in to the `lcproc.register_lcformat`
function. This will be used to look up how to find and read the light
curves specified in `basedir` or `use_list_of_filenames`.
lcformatdir : str or None
If this is provided, gives the path to a directory when you've stored
your lcformat description JSONs, other than the usual directories lcproc
knows to search for them in. Use this along with `lcformat` to specify
an LC format JSON file that's not currently registered with lcproc.
Returns
-------
str
Path to the output pickle containing all of the star features for this
object.
'''
try:
formatinfo = get_lcformat(lcformat,
use_lcformat_dir=lcformatdir)
if formatinfo:
(dfileglob, readerfunc,
dtimecols, dmagcols, derrcols,
magsarefluxes, normfunc) = formatinfo
else:
LOGERROR("can't figure out the light curve format")
return None
except Exception:
LOGEXCEPTION("can't figure out the light curve format")
return None
try:
# get the LC into a dict
lcdict = readerfunc(lcfile)
# this should handle lists/tuples being returned by readerfunc
# we assume that the first element is the actual lcdict
# FIXME: figure out how to not need this assumption
if ( (isinstance(lcdict, (list, tuple))) and
(isinstance(lcdict[0], dict)) ):
lcdict = lcdict[0]
resultdict = {'objectid':lcdict['objectid'],
'info':lcdict['objectinfo'],
'lcfbasename':os.path.basename(lcfile)}
# run the coord features first
coordfeat = starfeatures.coord_features(lcdict['objectinfo'])
# next, run the color features
colorfeat = starfeatures.color_features(
lcdict['objectinfo'],
deredden=deredden,
custom_bandpasses=custom_bandpasses
)
# run a rough color classification
colorclass = starfeatures.color_classification(colorfeat,
coordfeat)
# finally, run the neighbor features
nbrfeat = starfeatures.neighbor_gaia_features(lcdict['objectinfo'],
kdtree,
neighbor_radius_arcsec)
# get the objectids of the neighbors found if any
if nbrfeat['nbrindices'].size > 0:
nbrfeat['nbrobjectids'] = objlist[nbrfeat['nbrindices']]
nbrfeat['closestnbrobjectid'] = objlist[
nbrfeat['closestdistnbrind']
]
nbrfeat['closestnbrlcfname'] = lcflist[
nbrfeat['closestdistnbrind']
]
else:
nbrfeat['nbrobjectids'] = np.array([])
nbrfeat['closestnbrobjectid'] = np.array([])
nbrfeat['closestnbrlcfname'] = np.array([])
# update the result dict
resultdict.update(coordfeat)
resultdict.update(colorfeat)
resultdict.update(colorclass)
resultdict.update(nbrfeat)
outfile = os.path.join(outdir,
'starfeatures-%s.pkl' %
squeeze(resultdict['objectid']).replace(' ','-'))
with open(outfile, 'wb') as outfd:
pickle.dump(resultdict, outfd, protocol=4)
return outfile
except Exception as e:
LOGEXCEPTION('failed to get star features for %s because: %s' %
(os.path.basename(lcfile), e))
return None
def _starfeatures_worker(task):
'''
This wraps starfeatures.
'''
try:
(lcfile, outdir, kdtree, objlist,
lcflist, neighbor_radius_arcsec,
deredden, custom_bandpasses, lcformat, lcformatdir) = task
return get_starfeatures(lcfile, outdir,
kdtree, objlist, lcflist,
neighbor_radius_arcsec,
deredden=deredden,
custom_bandpasses=custom_bandpasses,
lcformat=lcformat,
lcformatdir=lcformatdir)
except Exception:
return None
def serial_starfeatures(lclist,
outdir,
lc_catalog_pickle,
neighbor_radius_arcsec,
maxobjects=None,
deredden=True,
custom_bandpasses=None,
lcformat='hat-sql',
lcformatdir=None):
'''This drives the `get_starfeatures` function for a collection of LCs.
Parameters
----------
lclist : list of str
The list of light curve file names to process.
outdir : str
The output directory where the results will be placed.
lc_catalog_pickle : str
The path to a catalog containing at a dict with least:
- an object ID array accessible with `dict['objects']['objectid']`
- an LC filename array accessible with `dict['objects']['lcfname']`
- a `scipy.spatial.KDTree` or `cKDTree` object to use for finding
neighbors for each object accessible with `dict['kdtree']`
A catalog pickle of the form needed can be produced using
:py:func:`astrobase.lcproc.catalogs.make_lclist` or
:py:func:`astrobase.lcproc.catalogs.filter_lclist`.
neighbor_radius_arcsec : float
This indicates the radius in arcsec to search for neighbors for this
object using the light curve catalog's `kdtree`, `objlist`, `lcflist`,
and in GAIA.
maxobjects : int
The number of objects to process from `lclist`.
deredden : bool
This controls if the colors and any color classifications will be
dereddened using 2MASS DUST.
custom_bandpasses : dict or None
This is a dict used to define any custom bandpasses in the
`in_objectinfo` dict you want to make this function aware of and
generate colors for. Use the format below for this dict::
{
'<bandpass_key_1>':{'dustkey':'<twomass_dust_key_1>',
'label':'<band_label_1>'
'colors':[['<bandkey1>-<bandkey2>',
'<BAND1> - <BAND2>'],
['<bandkey3>-<bandkey4>',
'<BAND3> - <BAND4>']]},
.
...
.
'<bandpass_key_N>':{'dustkey':'<twomass_dust_key_N>',
'label':'<band_label_N>'
'colors':[['<bandkey1>-<bandkey2>',
'<BAND1> - <BAND2>'],
['<bandkey3>-<bandkey4>',
'<BAND3> - <BAND4>']]},
}
Where:
`bandpass_key` is a key to use to refer to this bandpass in the
`objectinfo` dict, e.g. 'sdssg' for SDSS g band
`twomass_dust_key` is the key to use in the 2MASS DUST result table for
reddening per band-pass. For example, given the following DUST result
table (using http://irsa.ipac.caltech.edu/applications/DUST/)::
|Filter_name|LamEff |A_over_E_B_V_SandF|A_SandF|A_over_E_B_V_SFD|A_SFD|
|char |float |float |float |float |float|
| |microns| |mags | |mags |
CTIO U 0.3734 4.107 0.209 4.968 0.253
CTIO B 0.4309 3.641 0.186 4.325 0.221
CTIO V 0.5517 2.682 0.137 3.240 0.165
.
.
...
The `twomass_dust_key` for 'vmag' would be 'CTIO V'. If you want to
skip DUST lookup and want to pass in a specific reddening magnitude
for your bandpass, use a float for the value of
`twomass_dust_key`. If you want to skip DUST lookup entirely for
this bandpass, use None for the value of `twomass_dust_key`.
`band_label` is the label to use for this bandpass, e.g. 'W1' for
WISE-1 band, 'u' for SDSS u, etc.
The 'colors' list contains color definitions for all colors you want
to generate using this bandpass. this list contains elements of the
form::
['<bandkey1>-<bandkey2>','<BAND1> - <BAND2>']
where the the first item is the bandpass keys making up this color,
and the second item is the label for this color to be used by the
frontends. An example::
['sdssu-sdssg','u - g']
lcformat : str
This is the `formatkey` associated with your light curve format, which
you previously passed in to the `lcproc.register_lcformat`
function. This will be used to look up how to find and read the light
curves specified in `basedir` or `use_list_of_filenames`.
lcformatdir : str or None
If this is provided, gives the path to a directory when you've stored
your lcformat description JSONs, other than the usual directories lcproc
knows to search for them in. Use this along with `lcformat` to specify
an LC format JSON file that's not currently registered with lcproc.
Returns
-------
list of str
A list of all star features pickles produced.
'''
# make sure to make the output directory if it doesn't exist
if not os.path.exists(outdir):
os.makedirs(outdir)
if maxobjects:
lclist = lclist[:maxobjects]
# read in the kdtree pickle
with open(lc_catalog_pickle, 'rb') as infd:
kdt_dict = pickle.load(infd)
kdt = kdt_dict['kdtree']
objlist = kdt_dict['objects']['objectid']
objlcfl = kdt_dict['objects']['lcfname']
tasks = [(x, outdir, kdt, objlist, objlcfl,
neighbor_radius_arcsec,
deredden, custom_bandpasses,
lcformat, lcformatdir) for x in lclist]
for task in tqdm(tasks):
result = _starfeatures_worker(task)
return result
def parallel_starfeatures(lclist,
outdir,
lc_catalog_pickle,
neighbor_radius_arcsec,
maxobjects=None,
deredden=True,
custom_bandpasses=None,
lcformat='hat-sql',
lcformatdir=None,
nworkers=NCPUS):
'''This runs `get_starfeatures` in parallel for all light curves in `lclist`.
Parameters
----------
lclist : list of str
The list of light curve file names to process.
outdir : str
The output directory where the results will be placed.
lc_catalog_pickle : str
The path to a catalog containing at a dict with least:
- an object ID array accessible with `dict['objects']['objectid']`
- an LC filename array accessible with `dict['objects']['lcfname']`
- a `scipy.spatial.KDTree` or `cKDTree` object to use for finding
neighbors for each object accessible with `dict['kdtree']`
A catalog pickle of the form needed can be produced using
:py:func:`astrobase.lcproc.catalogs.make_lclist` or
:py:func:`astrobase.lcproc.catalogs.filter_lclist`.
neighbor_radius_arcsec : float
This indicates the radius in arcsec to search for neighbors for this
object using the light curve catalog's `kdtree`, `objlist`, `lcflist`,
and in GAIA.
maxobjects : int
The number of objects to process from `lclist`.
deredden : bool
This controls if the colors and any color classifications will be
dereddened using 2MASS DUST.
custom_bandpasses : dict or None
This is a dict used to define any custom bandpasses in the
`in_objectinfo` dict you want to make this function aware of and
generate colors for. Use the format below for this dict::
{
'<bandpass_key_1>':{'dustkey':'<twomass_dust_key_1>',
'label':'<band_label_1>'
'colors':[['<bandkey1>-<bandkey2>',
'<BAND1> - <BAND2>'],
['<bandkey3>-<bandkey4>',
'<BAND3> - <BAND4>']]},
.
...
.
'<bandpass_key_N>':{'dustkey':'<twomass_dust_key_N>',
'label':'<band_label_N>'
'colors':[['<bandkey1>-<bandkey2>',
'<BAND1> - <BAND2>'],
['<bandkey3>-<bandkey4>',
'<BAND3> - <BAND4>']]},
}
Where:
`bandpass_key` is a key to use to refer to this bandpass in the
`objectinfo` dict, e.g. 'sdssg' for SDSS g band
`twomass_dust_key` is the key to use in the 2MASS DUST result table for
reddening per band-pass. For example, given the following DUST result
table (using http://irsa.ipac.caltech.edu/applications/DUST/)::
|Filter_name|LamEff |A_over_E_B_V_SandF|A_SandF|A_over_E_B_V_SFD|A_SFD|
|char |float |float |float |float |float|
| |microns| |mags | |mags |
CTIO U 0.3734 4.107 0.209 4.968 0.253
CTIO B 0.4309 3.641 0.186 4.325 0.221
CTIO V 0.5517 2.682 0.137 3.240 0.165
.
.
...
The `twomass_dust_key` for 'vmag' would be 'CTIO V'. If you want to
skip DUST lookup and want to pass in a specific reddening magnitude
for your bandpass, use a float for the value of
`twomass_dust_key`. If you want to skip DUST lookup entirely for
this bandpass, use None for the value of `twomass_dust_key`.
`band_label` is the label to use for this bandpass, e.g. 'W1' for
WISE-1 band, 'u' for SDSS u, etc.
The 'colors' list contains color definitions for all colors you want
to generate using this bandpass. this list contains elements of the
form::
['<bandkey1>-<bandkey2>','<BAND1> - <BAND2>']
where the the first item is the bandpass keys making up this color,
and the second item is the label for this color to be used by the
frontends. An example::
['sdssu-sdssg','u - g']
lcformat : str
This is the `formatkey` associated with your light curve format, which
you previously passed in to the `lcproc.register_lcformat`
function. This will be used to look up how to find and read the light
curves specified in `basedir` or `use_list_of_filenames`.
lcformatdir : str or None
If this is provided, gives the path to a directory when you've stored
your lcformat description JSONs, other than the usual directories lcproc
knows to search for them in. Use this along with `lcformat` to specify
an LC format JSON file that's not currently registered with lcproc.
nworkers : int
The number of parallel workers to launch.
Returns
-------
dict
A dict with key:val pairs of the input light curve filename and the
output star features pickle for each LC processed.
'''
try:
formatinfo = get_lcformat(lcformat,
use_lcformat_dir=lcformatdir)
if formatinfo:
(dfileglob, readerfunc,
dtimecols, dmagcols, derrcols,
magsarefluxes, normfunc) = formatinfo
else:
LOGERROR("can't figure out the light curve format")
return None
except Exception:
LOGEXCEPTION("can't figure out the light curve format")
return None
# make sure to make the output directory if it doesn't exist
if not os.path.exists(outdir):
os.makedirs(outdir)
if maxobjects:
lclist = lclist[:maxobjects]
# read in the kdtree pickle
with open(lc_catalog_pickle, 'rb') as infd:
kdt_dict = pickle.load(infd)
kdt = kdt_dict['kdtree']
objlist = kdt_dict['objects']['objectid']
objlcfl = kdt_dict['objects']['lcfname']
tasks = [(x, outdir, kdt, objlist, objlcfl,
neighbor_radius_arcsec,
deredden, custom_bandpasses, lcformat) for x in lclist]
with ProcessPoolExecutor(max_workers=nworkers) as executor:
resultfutures = executor.map(_starfeatures_worker, tasks)
results = list(resultfutures)
resdict = {os.path.basename(x):y for (x,y) in zip(lclist, results)}
return resdict
def parallel_starfeatures_lcdir(lcdir,
outdir,
lc_catalog_pickle,
neighbor_radius_arcsec,
fileglob=None,
maxobjects=None,
deredden=True,
custom_bandpasses=None,
lcformat='hat-sql',
lcformatdir=None,
nworkers=NCPUS,
recursive=True):
'''This runs parallel star feature extraction for a directory of LCs.
Parameters
----------
lcdir : list of str
The directory to search for light curves.
outdir : str
The output directory where the results will be placed.
lc_catalog_pickle : str
The path to a catalog containing at a dict with least:
- an object ID array accessible with `dict['objects']['objectid']`
- an LC filename array accessible with `dict['objects']['lcfname']`
- a `scipy.spatial.KDTree` or `cKDTree` object to use for finding
neighbors for each object accessible with `dict['kdtree']`
A catalog pickle of the form needed can be produced using
:py:func:`astrobase.lcproc.catalogs.make_lclist` or
:py:func:`astrobase.lcproc.catalogs.filter_lclist`.
neighbor_radius_arcsec : float
This indicates the radius in arcsec to search for neighbors for this
object using the light curve catalog's `kdtree`, `objlist`, `lcflist`,
and in GAIA.
fileglob : str
The UNIX file glob to use to search for the light curves in `lcdir`. If
None, the default value for the light curve format specified will be
used.
maxobjects : int
The number of objects to process from `lclist`.
deredden : bool
This controls if the colors and any color classifications will be
dereddened using 2MASS DUST.
custom_bandpasses : dict or None
This is a dict used to define any custom bandpasses in the
`in_objectinfo` dict you want to make this function aware of and
generate colors for. Use the format below for this dict::
{
'<bandpass_key_1>':{'dustkey':'<twomass_dust_key_1>',
'label':'<band_label_1>'
'colors':[['<bandkey1>-<bandkey2>',
'<BAND1> - <BAND2>'],
['<bandkey3>-<bandkey4>',
'<BAND3> - <BAND4>']]},
.
...
.
'<bandpass_key_N>':{'dustkey':'<twomass_dust_key_N>',
'label':'<band_label_N>'
'colors':[['<bandkey1>-<bandkey2>',
'<BAND1> - <BAND2>'],
['<bandkey3>-<bandkey4>',
'<BAND3> - <BAND4>']]},
}
Where:
`bandpass_key` is a key to use to refer to this bandpass in the
`objectinfo` dict, e.g. 'sdssg' for SDSS g band
`twomass_dust_key` is the key to use in the 2MASS DUST result table for
reddening per band-pass. For example, given the following DUST result
table (using http://irsa.ipac.caltech.edu/applications/DUST/)::
|Filter_name|LamEff |A_over_E_B_V_SandF|A_SandF|A_over_E_B_V_SFD|A_SFD|
|char |float |float |float |float |float|
| |microns| |mags | |mags |
CTIO U 0.3734 4.107 0.209 4.968 0.253
CTIO B 0.4309 3.641 0.186 4.325 0.221
CTIO V 0.5517 2.682 0.137 3.240 0.165
.
.
...
The `twomass_dust_key` for 'vmag' would be 'CTIO V'. If you want to
skip DUST lookup and want to pass in a specific reddening magnitude
for your bandpass, use a float for the value of
`twomass_dust_key`. If you want to skip DUST lookup entirely for
this bandpass, use None for the value of `twomass_dust_key`.
`band_label` is the label to use for this bandpass, e.g. 'W1' for
WISE-1 band, 'u' for SDSS u, etc.
The 'colors' list contains color definitions for all colors you want
to generate using this bandpass. this list contains elements of the
form::
['<bandkey1>-<bandkey2>','<BAND1> - <BAND2>']
where the the first item is the bandpass keys making up this color,
and the second item is the label for this color to be used by the
frontends. An example::
['sdssu-sdssg','u - g']
lcformat : str
This is the `formatkey` associated with your light curve format, which
you previously passed in to the `lcproc.register_lcformat`
function. This will be used to look up how to find and read the light
curves specified in `basedir` or `use_list_of_filenames`.
lcformatdir : str or None
If this is provided, gives the path to a directory when you've stored
your lcformat description JSONs, other than the usual directories lcproc
knows to search for them in. Use this along with `lcformat` to specify
an LC format JSON file that's not currently registered with lcproc.
nworkers : int
The number of parallel workers to launch.
Returns
-------
dict
A dict with key:val pairs of the input light curve filename and the
output star features pickle for each LC processed.
'''
try:
formatinfo = get_lcformat(lcformat,
use_lcformat_dir=lcformatdir)
if formatinfo:
(dfileglob, readerfunc,
dtimecols, dmagcols, derrcols,
magsarefluxes, normfunc) = formatinfo
else:
LOGERROR("can't figure out the light curve format")
return None
except Exception:
LOGEXCEPTION("can't figure out the light curve format")
return None
if not fileglob:
fileglob = dfileglob
# now find the files
LOGINFO('searching for %s light curves in %s ...' % (lcformat, lcdir))
if recursive is False:
matching = glob.glob(os.path.join(lcdir, fileglob))
else:
matching = glob.glob(os.path.join(lcdir,
'**',
fileglob),
recursive=True)
# now that we have all the files, process them
if matching and len(matching) > 0:
LOGINFO('found %s light curves, getting starfeatures...' %
len(matching))
return parallel_starfeatures(matching,
outdir,
lc_catalog_pickle,
neighbor_radius_arcsec,
deredden=deredden,
custom_bandpasses=custom_bandpasses,
maxobjects=maxobjects,
lcformat=lcformat,
lcformatdir=lcformatdir,
nworkers=nworkers)
else:
LOGERROR('no light curve files in %s format found in %s' % (lcformat,
lcdir))
return None
| 36.864387
| 83
| 0.552414
| 3,587
| 31,261
| 4.733203
| 0.124338
| 0.014725
| 0.01979
| 0.018377
| 0.761103
| 0.759218
| 0.754741
| 0.75109
| 0.740723
| 0.730828
| 0
| 0.019146
| 0.366783
| 31,261
| 847
| 84
| 36.90791
| 0.838545
| 0.634689
| 0
| 0.493724
| 0
| 0
| 0.078869
| 0
| 0
| 0
| 0
| 0.001181
| 0
| 1
| 0.025105
| false
| 0.046025
| 0.062762
| 0.004184
| 0.150628
| 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
|
e47d54aef24aaf56473055dc571b616717890f3d
| 27
|
py
|
Python
|
em_site/apps/store/api/views/__init__.py
|
RohanJnr/enlighten-me--SpaceJam
|
3e49701489fe0400d947ef5104a4beb264ab0d2c
|
[
"MIT"
] | null | null | null |
em_site/apps/store/api/views/__init__.py
|
RohanJnr/enlighten-me--SpaceJam
|
3e49701489fe0400d947ef5104a4beb264ab0d2c
|
[
"MIT"
] | null | null | null |
em_site/apps/store/api/views/__init__.py
|
RohanJnr/enlighten-me--SpaceJam
|
3e49701489fe0400d947ef5104a4beb264ab0d2c
|
[
"MIT"
] | null | null | null |
from .bundle_offer import *
| 27
| 27
| 0.814815
| 4
| 27
| 5.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 27
| 1
| 27
| 27
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
e4b5e6e05339b587ceb4e6a6d8384c8ad3b8aba6
| 866
|
py
|
Python
|
create_game.py
|
Lyniat/dungeon-hop
|
e8d19b2c933feb6665935f37f73785626698ea09
|
[
"MIT"
] | null | null | null |
create_game.py
|
Lyniat/dungeon-hop
|
e8d19b2c933feb6665935f37f73785626698ea09
|
[
"MIT"
] | null | null | null |
create_game.py
|
Lyniat/dungeon-hop
|
e8d19b2c933feb6665935f37f73785626698ea09
|
[
"MIT"
] | null | null | null |
import time
import re
import os
version = time.time()
print "actual version will be: "+str(version)
lines = []
with open('./main/client/GameInstance.js') as infile:
for line in infile:
line = re.sub('GAME_VERSION.*,','GAME_VERSION = '+str(version)+',',line)
lines.append(line)
infile.close()
print "new content will be: "+str(lines)
with open('./main/client/GameInstance.js', 'w') as outfile:
for line in lines:
outfile.write(line)
outfile.close()
lines = []
with open('./server/server.js') as infile:
for line in infile:
line = re.sub('GAME_VERSION.*,','GAME_VERSION = '+str(version)+',',line)
lines.append(line)
infile.close()
print "new content will be: "+str(lines)
with open('./server/server.js', 'w') as outfile:
for line in lines:
outfile.write(line)
outfile.close()
os.system('sh ./obfuscate.sh')
| 21.65
| 73
| 0.655889
| 125
| 866
| 4.512
| 0.28
| 0.06383
| 0.092199
| 0.060284
| 0.829787
| 0.829787
| 0.764184
| 0.663121
| 0.663121
| 0.663121
| 0
| 0
| 0.170901
| 866
| 39
| 74
| 22.205128
| 0.785515
| 0
| 0
| 0.642857
| 0
| 0
| 0.278291
| 0.066975
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.107143
| null | null | 0.107143
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
e4da68672de11eb443b1792ff3858004d85bdcef
| 22
|
py
|
Python
|
src/sact/epoch/tests/__init__.py
|
0k/sact.epoch
|
6b0a47068992ff6a73f0f1da36090affad7c8be0
|
[
"BSD-3-Clause"
] | null | null | null |
src/sact/epoch/tests/__init__.py
|
0k/sact.epoch
|
6b0a47068992ff6a73f0f1da36090affad7c8be0
|
[
"BSD-3-Clause"
] | null | null | null |
src/sact/epoch/tests/__init__.py
|
0k/sact.epoch
|
6b0a47068992ff6a73f0f1da36090affad7c8be0
|
[
"BSD-3-Clause"
] | null | null | null |
# Package placeholder
| 11
| 21
| 0.818182
| 2
| 22
| 9
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136364
| 22
| 1
| 22
| 22
| 0.947368
| 0.863636
| 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
|
900fd7d9a200d1ffbe0c9e2b56254302a567445c
| 66
|
py
|
Python
|
backend/lextool/views/enwords/__init__.py
|
Lmineor/Tools
|
cbf58baa84524e763ba6c2bd0c796de912d3f690
|
[
"MIT"
] | 1
|
2020-05-18T13:23:35.000Z
|
2020-05-18T13:23:35.000Z
|
backend/lextool/views/enwords/__init__.py
|
Lmineor/Tools
|
cbf58baa84524e763ba6c2bd0c796de912d3f690
|
[
"MIT"
] | null | null | null |
backend/lextool/views/enwords/__init__.py
|
Lmineor/Tools
|
cbf58baa84524e763ba6c2bd0c796de912d3f690
|
[
"MIT"
] | null | null | null |
from flask import Blueprint
words = Blueprint('words', __name__)
| 16.5
| 36
| 0.772727
| 8
| 66
| 5.875
| 0.75
| 0.595745
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136364
| 66
| 3
| 37
| 22
| 0.824561
| 0
| 0
| 0
| 0
| 0
| 0.075758
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 1
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
|
0
| 5
|
901658fbc30fa0739e35a23f936febfdc1c93c64
| 22
|
py
|
Python
|
api/app/modelnet/__init__.py
|
Stevencibambo/face-detection-based-web
|
9e7d2d37977f242ef1ec8701ef61e8b79a64941b
|
[
"MIT"
] | null | null | null |
api/app/modelnet/__init__.py
|
Stevencibambo/face-detection-based-web
|
9e7d2d37977f242ef1ec8701ef61e8b79a64941b
|
[
"MIT"
] | null | null | null |
api/app/modelnet/__init__.py
|
Stevencibambo/face-detection-based-web
|
9e7d2d37977f242ef1ec8701ef61e8b79a64941b
|
[
"MIT"
] | null | null | null |
# modelnet/__init__.py
| 22
| 22
| 0.818182
| 3
| 22
| 4.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.045455
| 22
| 1
| 22
| 22
| 0.666667
| 0.909091
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
902892fe378fbeb3d62ab20a7216cc1ec8de696c
| 99
|
py
|
Python
|
senpy/config.py
|
antoniofll/sefarad4.0-testing
|
1b50f479ee503e5e23345ab0388eb6c2608ab73d
|
[
"Apache-2.0"
] | 7
|
2016-09-30T12:42:07.000Z
|
2021-06-13T15:34:31.000Z
|
senpy/config.py
|
antoniofll/sefarad4.0-testing
|
1b50f479ee503e5e23345ab0388eb6c2608ab73d
|
[
"Apache-2.0"
] | null | null | null |
senpy/config.py
|
antoniofll/sefarad4.0-testing
|
1b50f479ee503e5e23345ab0388eb6c2608ab73d
|
[
"Apache-2.0"
] | 2
|
2016-10-06T19:36:26.000Z
|
2017-02-24T08:38:14.000Z
|
import os
SERVER_PORT = os.environ.get("SERVER_PORT", 5000)
DEBUG = os.environ.get("DEBUG", True)
| 19.8
| 49
| 0.727273
| 16
| 99
| 4.375
| 0.5625
| 0.285714
| 0.342857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.045455
| 0.111111
| 99
| 4
| 50
| 24.75
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0.161616
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
902f8b24480bd6b0eddbd51c5a7cd964970758b5
| 300
|
py
|
Python
|
models/user.py
|
vexy/flask-auth-template
|
0538232fe5158b070a52305cd7c8e94f299c68e6
|
[
"MIT"
] | 13
|
2020-03-01T12:52:49.000Z
|
2022-03-13T21:21:35.000Z
|
models/user.py
|
salvatore287/flask-auth-template
|
27ad1d1994830b4fad644f2dafb30cd38faa731f
|
[
"MIT"
] | null | null | null |
models/user.py
|
salvatore287/flask-auth-template
|
27ad1d1994830b4fad644f2dafb30cd38faa731f
|
[
"MIT"
] | 2
|
2021-03-13T12:44:57.000Z
|
2021-05-27T01:01:12.000Z
|
# -*- coding: utf-8 -*-
class User():
def __init__(self, username = "", password = "", email = ""):
self.username = username
self.password = password
self.email = email
def __str__(self):
return f"[{self.username}] - [pwd:{self.password} eml:{self.email}]"
| 27.272727
| 76
| 0.563333
| 33
| 300
| 4.878788
| 0.484848
| 0.223602
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004484
| 0.256667
| 300
| 10
| 77
| 30
| 0.717489
| 0.07
| 0
| 0
| 0
| 0
| 0.209386
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0.428571
| 0
| 0.142857
| 0.571429
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 5
|
5f49305274da7a9bee3eb3cb66a1df994ea7ab8b
| 271
|
py
|
Python
|
server/wellClusterShares.py
|
kdinkla/ProtoMPDA
|
08ec7de3a24ea07da19062b009ca81a0f5a9c924
|
[
"MIT"
] | 3
|
2017-12-07T19:11:24.000Z
|
2020-07-03T07:51:09.000Z
|
server/wellClusterShares.py
|
kdinkla/Screenit
|
08ec7de3a24ea07da19062b009ca81a0f5a9c924
|
[
"MIT"
] | null | null | null |
server/wellClusterShares.py
|
kdinkla/Screenit
|
08ec7de3a24ea07da19062b009ca81a0f5a9c924
|
[
"MIT"
] | null | null | null |
import tangelo
tangelo.paths(".")
import compute
@tangelo.types(dataSet=compute.dataSet, features=compute.featureSet, exemplars=compute.exemplarDict)
def run(dataSet, features, exemplars):
return compute.wellClusterSharesFlat(dataSet, features, exemplars).to_json()
| 33.875
| 100
| 0.808118
| 30
| 271
| 7.266667
| 0.533333
| 0.206422
| 0.220183
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.077491
| 271
| 7
| 101
| 38.714286
| 0.872
| 0
| 0
| 0
| 0
| 0
| 0.00369
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0.166667
| 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
| 1
| 0
| 0
|
0
| 5
|
5f52e51df660a9dbf8a9907f66708e3597ed4197
| 152
|
py
|
Python
|
bflib/items/weapons/melee/base.py
|
ChrisLR/BasicDungeonRL
|
b293d40bd9a0d3b7aec41b5e1d58441165997ff1
|
[
"MIT"
] | 3
|
2017-10-28T11:28:38.000Z
|
2018-09-12T09:47:00.000Z
|
bflib/items/weapons/melee/base.py
|
ChrisLR/BasicDungeonRL
|
b293d40bd9a0d3b7aec41b5e1d58441165997ff1
|
[
"MIT"
] | null | null | null |
bflib/items/weapons/melee/base.py
|
ChrisLR/BasicDungeonRL
|
b293d40bd9a0d3b7aec41b5e1d58441165997ff1
|
[
"MIT"
] | null | null | null |
from bflib.items import listing
from bflib.items.weapons.base import Weapon
@listing.register_type
class MeleeWeapon(Weapon):
melee_damage = None
| 19
| 43
| 0.802632
| 21
| 152
| 5.714286
| 0.714286
| 0.15
| 0.233333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131579
| 152
| 7
| 44
| 21.714286
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
395ffc199b0817ea5d72f702aab954939ca9920b
| 55
|
py
|
Python
|
swin_transformer/swint/__init__.py
|
satokiyo/AdelaiDet
|
b051ca48eeef7468ca6e55b9c529453cfb069c74
|
[
"BSD-2-Clause"
] | 120
|
2021-04-14T09:00:12.000Z
|
2022-03-29T07:09:29.000Z
|
swin_transformer/swint/__init__.py
|
satokiyo/AdelaiDet
|
b051ca48eeef7468ca6e55b9c529453cfb069c74
|
[
"BSD-2-Clause"
] | 19
|
2021-04-15T06:11:54.000Z
|
2022-03-27T03:31:21.000Z
|
swin_transformer/swint/__init__.py
|
satokiyo/AdelaiDet
|
b051ca48eeef7468ca6e55b9c529453cfb069c74
|
[
"BSD-2-Clause"
] | 26
|
2021-04-15T02:59:19.000Z
|
2022-03-29T21:24:46.000Z
|
from .swin_transformer import *
from .config import *
| 18.333333
| 32
| 0.763636
| 7
| 55
| 5.857143
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.163636
| 55
| 2
| 33
| 27.5
| 0.891304
| 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
|
399bff97ee8de5d59fb7969af12bc8e913e27293
| 271
|
py
|
Python
|
core/data_structure/exception.py
|
HuynhThanhQuan/graph-network
|
e429a641e7baecad9765700cac580cfbdedbe1bd
|
[
"MIT"
] | null | null | null |
core/data_structure/exception.py
|
HuynhThanhQuan/graph-network
|
e429a641e7baecad9765700cac580cfbdedbe1bd
|
[
"MIT"
] | 11
|
2020-11-13T18:29:37.000Z
|
2022-02-10T00:25:15.000Z
|
core/data_structure/exception.py
|
HuynhThanhQuan/graph-network
|
e429a641e7baecad9765700cac580cfbdedbe1bd
|
[
"MIT"
] | null | null | null |
class GraphDataStructureException(Exception):
def __init__(self, message):
super().__init__(message)
class UninitializedGraph(GraphDataStructureException):
def __init__(self, message='Graph object is not initialized'):
super().__init__(message)
| 30.111111
| 66
| 0.745387
| 25
| 271
| 7.44
| 0.56
| 0.075269
| 0.11828
| 0.193548
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.154982
| 271
| 8
| 67
| 33.875
| 0.812227
| 0
| 0
| 0.333333
| 0
| 0
| 0.114391
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
39c42bd87c6f19a416294001dc95bc4a82218919
| 219
|
py
|
Python
|
tests/easy/test_merge_sorted_array_88.py
|
ahmet9cengiz/leetCode
|
9e9a61f059072d7791dd19706b7a3e0d0a446669
|
[
"MIT"
] | null | null | null |
tests/easy/test_merge_sorted_array_88.py
|
ahmet9cengiz/leetCode
|
9e9a61f059072d7791dd19706b7a3e0d0a446669
|
[
"MIT"
] | null | null | null |
tests/easy/test_merge_sorted_array_88.py
|
ahmet9cengiz/leetCode
|
9e9a61f059072d7791dd19706b7a3e0d0a446669
|
[
"MIT"
] | null | null | null |
from src.easy import merge_sorted_array_88
def test_merge_sorted_array():
s = merge_sorted_array_88.Solution()
assert s.merge_sorted_array()
assert s.merge_sorted_array()
assert s.merge_sorted_array()
| 24.333333
| 42
| 0.771689
| 34
| 219
| 4.529412
| 0.382353
| 0.428571
| 0.623377
| 0.441558
| 0.448052
| 0.448052
| 0.448052
| 0.448052
| 0.448052
| 0.448052
| 0
| 0.021505
| 0.150685
| 219
| 8
| 43
| 27.375
| 0.806452
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0.166667
| false
| 0
| 0.166667
| 0
| 0.333333
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
39d7feedd0e28334beeef2f60c44bce2fb06d0ff
| 413
|
py
|
Python
|
test/core/test_workspace.py
|
sixty-north/structurizr-python
|
856d0476935952c256981f3628663915768ee85e
|
[
"Apache-2.0"
] | 15
|
2017-07-20T20:43:40.000Z
|
2021-11-12T11:25:01.000Z
|
test/core/test_workspace.py
|
sixty-north/structurizr-python
|
856d0476935952c256981f3628663915768ee85e
|
[
"Apache-2.0"
] | 2
|
2017-06-05T17:41:05.000Z
|
2018-09-11T08:18:07.000Z
|
test/core/test_workspace.py
|
sixty-north/structurizr-python
|
856d0476935952c256981f3628663915768ee85e
|
[
"Apache-2.0"
] | 7
|
2017-08-16T19:51:24.000Z
|
2020-09-24T09:47:35.000Z
|
import pytest
class TestWorkspace:
@pytest.mark.xfail(reason="Not yet implemented")
def test_set_source_does_not_throw_an_exception_when_a_none_url_is_specified(self, workspace):
workspace.set_source(None)
@pytest.mark.xfail(reason="Not yet implemented")
def test_set_source_does_not_throw_an_exception_when_an_empty_url_is_specified(self, workspace):
workspace.set_source("")
| 31.769231
| 100
| 0.789346
| 59
| 413
| 5.050847
| 0.457627
| 0.120805
| 0.100671
| 0.14094
| 0.845638
| 0.845638
| 0.845638
| 0.845638
| 0.543624
| 0.543624
| 0
| 0
| 0.130751
| 413
| 12
| 101
| 34.416667
| 0.830084
| 0
| 0
| 0.25
| 0
| 0
| 0.09201
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.125
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
39e4ab530071a380126b617bfbaa889dc10555dc
| 2,058
|
py
|
Python
|
fytnet/migrations/0005_auto_20210315_1702.py
|
Code-Institute-Submissions/danielboots-fytletic
|
67c3000a4b681d7f76255ab11db841a7f2ba613e
|
[
"OLDAP-2.3"
] | 1
|
2021-03-31T18:54:25.000Z
|
2021-03-31T18:54:25.000Z
|
fytnet/migrations/0005_auto_20210315_1702.py
|
Code-Institute-Submissions/danielboots-fytletic
|
67c3000a4b681d7f76255ab11db841a7f2ba613e
|
[
"OLDAP-2.3"
] | null | null | null |
fytnet/migrations/0005_auto_20210315_1702.py
|
Code-Institute-Submissions/danielboots-fytletic
|
67c3000a4b681d7f76255ab11db841a7f2ba613e
|
[
"OLDAP-2.3"
] | 1
|
2021-03-31T11:00:11.000Z
|
2021-03-31T11:00:11.000Z
|
# Generated by Django 3.1.6 on 2021-03-15 17:02
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('fytnet', '0004_auto_20210315_1552'),
]
operations = [
migrations.AddField(
model_name='fighter',
name='draw',
field=models.IntegerField(default=0),
),
migrations.AddField(
model_name='fighter',
name='email',
field=models.CharField(default='DEFAULT VALUE', max_length=50),
),
migrations.AddField(
model_name='fighter',
name='facebook',
field=models.URLField(blank=True, max_length=1024, null=True),
),
migrations.AddField(
model_name='fighter',
name='instagram',
field=models.URLField(blank=True, max_length=1024, null=True),
),
migrations.AddField(
model_name='fighter',
name='is_verified',
field=models.BooleanField(default=False),
),
migrations.AddField(
model_name='fighter',
name='loss',
field=models.IntegerField(default=0),
),
migrations.AddField(
model_name='fighter',
name='twitter',
field=models.URLField(blank=True, max_length=1024, null=True),
),
migrations.AddField(
model_name='fighter',
name='video',
field=models.URLField(blank=True, null=True),
),
migrations.AddField(
model_name='fighter',
name='web',
field=models.URLField(blank=True, max_length=1024, null=True),
),
migrations.AddField(
model_name='fighter',
name='whatsapp',
field=models.CharField(default='DEFAULT VALUE', max_length=50),
),
migrations.AddField(
model_name='fighter',
name='win',
field=models.IntegerField(default=0),
),
]
| 29.826087
| 75
| 0.541302
| 192
| 2,058
| 5.692708
| 0.302083
| 0.181153
| 0.231473
| 0.271729
| 0.771272
| 0.717292
| 0.647758
| 0.647758
| 0.605672
| 0.605672
| 0
| 0.039589
| 0.337221
| 2,058
| 68
| 76
| 30.264706
| 0.76173
| 0.021866
| 0
| 0.677419
| 1
| 0
| 0.098956
| 0.011437
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.016129
| 0
| 0.064516
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
f2d07ec872be66cc3029d7de191b5b45afa75f3f
| 126
|
py
|
Python
|
prebuild/jupyter-caf-kernel/jupyter_caf_kernel/__main__.py
|
sourceryinstitute/jupyter-CAF-kernel
|
d09464d7c02107d6e9779962619d70a11011d32d
|
[
"MIT"
] | 57
|
2017-06-16T00:00:24.000Z
|
2022-02-13T02:30:59.000Z
|
prebuild/jupyter-caf-kernel/jupyter_caf_kernel/__main__.py
|
ZhouHaoNB/jupyterNotebookDemo
|
95617939032acfd0e4cdbc2dfa9330ac00208993
|
[
"MIT"
] | 5
|
2017-09-06T16:22:39.000Z
|
2022-01-24T04:40:42.000Z
|
prebuild/jupyter-caf-kernel/jupyter_caf_kernel/__main__.py
|
ZhouHaoNB/jupyterNotebookDemo
|
95617939032acfd0e4cdbc2dfa9330ac00208993
|
[
"MIT"
] | 12
|
2017-09-07T13:56:12.000Z
|
2022-01-24T19:03:53.000Z
|
from ipykernel.kernelapp import IPKernelApp
from .kernel import CafKernel
IPKernelApp.launch_instance(kernel_class=CafKernel)
| 31.5
| 51
| 0.880952
| 15
| 126
| 7.266667
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 126
| 3
| 52
| 42
| 0.931624
| 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
|
f2de4259fb783ad06ec9b0a2683ab1b365f14174
| 244
|
py
|
Python
|
magma/types/__init__.py
|
leonardt/magma
|
d3e8c9500ec3b167df8ed067e0c0305781c94ab6
|
[
"MIT"
] | 167
|
2017-10-08T00:59:22.000Z
|
2022-02-08T00:14:39.000Z
|
magma/types/__init__.py
|
leonardt/magma
|
d3e8c9500ec3b167df8ed067e0c0305781c94ab6
|
[
"MIT"
] | 719
|
2017-08-29T17:58:28.000Z
|
2022-03-31T23:39:18.000Z
|
magma/types/__init__.py
|
leonardt/magma
|
d3e8c9500ec3b167df8ed067e0c0305781c94ab6
|
[
"MIT"
] | 14
|
2017-09-01T03:25:16.000Z
|
2021-11-05T13:30:24.000Z
|
from .bit_pattern import BitPattern
from .valid import Valid
from .ready_valid import (ReadyValid, Producer, Consumer, Decoupled, EnqIO,
DeqIO, Irrevocable, Monitor, is_producer,
is_consumer)
| 40.666667
| 75
| 0.643443
| 25
| 244
| 6.12
| 0.64
| 0.143791
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.29918
| 244
| 5
| 76
| 48.8
| 0.894737
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.6
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
f2f88dc774c0ee1564a96d4960199e5001d4f45c
| 143
|
py
|
Python
|
kew/handlers/stdout.py
|
smpio/kube-event-watcher
|
ede19ba04c8b847a28170808f57c5751c3729ff8
|
[
"MIT"
] | null | null | null |
kew/handlers/stdout.py
|
smpio/kube-event-watcher
|
ede19ba04c8b847a28170808f57c5751c3729ff8
|
[
"MIT"
] | null | null | null |
kew/handlers/stdout.py
|
smpio/kube-event-watcher
|
ede19ba04c8b847a28170808f57c5751c3729ff8
|
[
"MIT"
] | 2
|
2018-07-09T16:35:40.000Z
|
2018-12-12T15:40:19.000Z
|
def stdout_handler(config):
def handle(event):
print('>', event._formatted)
print(event.message.strip())
return handle
| 23.833333
| 36
| 0.636364
| 16
| 143
| 5.5625
| 0.6875
| 0.224719
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.230769
| 143
| 5
| 37
| 28.6
| 0.809091
| 0
| 0
| 0
| 0
| 0
| 0.006993
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0
| 0
| 0.6
| 0.4
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
8404485500c2a4ca8cb2653e82ead5edaffc8f67
| 12,662
|
py
|
Python
|
pyBoard v1.1(STM32F405)/3.拓展实验/3.LCD液晶屏显示/2.4_ILI9341/fonts/veram_14.py
|
01studio-lab/MicroPython_Examples
|
f06a1bee398674ceafebed2aac88d8413cc8abad
|
[
"MIT"
] | 73
|
2020-05-02T13:48:27.000Z
|
2022-03-26T13:15:10.000Z
|
pyBoard v1.1(STM32F405)/3.拓展实验/3.LCD液晶屏显示/2.4_ILI9341/fonts/veram_14.py
|
01studio-lab/MicroPython_Examples
|
f06a1bee398674ceafebed2aac88d8413cc8abad
|
[
"MIT"
] | null | null | null |
pyBoard v1.1(STM32F405)/3.拓展实验/3.LCD液晶屏显示/2.4_ILI9341/fonts/veram_14.py
|
01studio-lab/MicroPython_Examples
|
f06a1bee398674ceafebed2aac88d8413cc8abad
|
[
"MIT"
] | 50
|
2020-05-15T13:57:28.000Z
|
2022-03-30T14:03:33.000Z
|
# Created from VeraMono.ttf with freetype-generator.
# freetype-generator created by Meurisse D ( MCHobby.be ).
VeraMono_14 = {
'width' : 0x9,
'height' : 0xf,
32:(),
33:( 0xe7e0,),
34:( 0xf800, 0x8000, 0xf800),
35:( 0x8800, 0xe900, 0x9f00, 0x89e0, 0xf900, 0x8f80, 0x89e0, 0x8100),
36:( 0x88e0, 0x9190, 0x9110, 0xfffc, 0x9110, 0x9310, 0x8e20),
37:( 0x80c0, 0x8920, 0x8520, 0x84c0, 0xb200, 0xca00, 0xc900, 0xb000),
38:( 0xbc00, 0xe3c0, 0xc320, 0xc420, 0xd820, 0xa000, 0xdc00),
39:( 0xf800,),
40:( 0x8fc0, 0xb038, 0xc008),
41:( 0xc008, 0xf030, 0x8fc0),
42:( 0xa400, 0xa800, 0x9800, 0xfe00, 0x9800, 0xa800, 0xa400),
43:( 0x8800, 0x8800, 0x8800, 0xff00, 0x8800, 0x8800, 0x8800),
44:( 0xc000, 0xb800, 0x9800),
45:( 0xc000, 0xc000, 0xc000, 0xc000),
46:( 0xe000, 0xe000),
47:( 0xc000, 0xb800, 0x8600, 0x8180, 0x8070, 0x8008),
48:( 0x9f80, 0xa040, 0xc020, 0xc220, 0xc020, 0xa040, 0x9f80),
49:( 0xc040, 0xc020, 0xffe0, 0xc000, 0xc000),
50:( 0xc040, 0xe020, 0xd020, 0xc820, 0xcc20, 0xc660, 0xc1c0),
51:( 0xa040, 0xc020, 0xc220, 0xc220, 0xc220, 0xe520, 0xbdc0),
52:( 0x8c00, 0x8a00, 0x8980, 0x88c0, 0x8820, 0xffe0, 0x8800),
53:( 0xa3e0, 0xc120, 0xc120, 0xc120, 0xc120, 0xa220, 0x9c00),
54:( 0x9f80, 0xa4c0, 0xc260, 0xc220, 0xc220, 0xe620, 0xbc40),
55:( 0x8020, 0xc020, 0xb020, 0x8c20, 0x8320, 0x80e0, 0x8060),
56:( 0xbdc0, 0xe620, 0xc220, 0xc220, 0xc220, 0xe620, 0xbdc0),
57:( 0xa3c0, 0xc660, 0xc420, 0xc420, 0xe420, 0xb240, 0x9f80),
58:( 0xe300, 0xe300),
59:( 0xc000, 0xb8c0, 0x98c0),
60:( 0x8800, 0x9400, 0x9400, 0xb600, 0xa200, 0xa200, 0xc100),
61:( 0xc800, 0xc800, 0xc800, 0xc800, 0xc800, 0xc800, 0xc800),
62:( 0xc100, 0xa200, 0xa200, 0xb600, 0x9400, 0x9400, 0x8800),
63:( 0x8040, 0x8020, 0xee20, 0x8320, 0x81c0),
64:( 0x8fc0, 0xb030, 0xa018, 0xc788, 0xc848, 0xc858, 0x8ff0),
65:( 0xe000, 0x9c00, 0x8bc0, 0x8820, 0x8bc0, 0x9c00, 0xe000),
66:( 0xffe0, 0xc220, 0xc220, 0xc220, 0xc220, 0xe620, 0xbdc0),
67:( 0x9f80, 0xa040, 0xc020, 0xc020, 0xc020, 0xc020, 0xa040),
68:( 0xffe0, 0xc020, 0xc020, 0xc020, 0xc020, 0xa040, 0x9f80),
69:( 0xffe0, 0xc220, 0xc220, 0xc220, 0xc220, 0xc220, 0xc220),
70:( 0xffe0, 0x8220, 0x8220, 0x8220, 0x8220, 0x8220, 0x8220),
71:( 0x9f80, 0xa040, 0xc020, 0xc020, 0xc020, 0xc420, 0xbc40),
72:( 0xffe0, 0x8200, 0x8200, 0x8200, 0x8200, 0x8200, 0xffe0),
73:( 0xc020, 0xc020, 0xffe0, 0xc020, 0xc020),
74:( 0xa000, 0xc000, 0xc020, 0xc020, 0xe020, 0xbfe0),
75:( 0xffe0, 0x8200, 0x8300, 0x8c80, 0x9840, 0xa020, 0xc000),
76:( 0xffe0, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000),
77:( 0xffe0, 0x8060, 0x8380, 0x8400, 0x8380, 0x8060, 0xffe0),
78:( 0xffe0, 0x8060, 0x8180, 0x8600, 0x9800, 0xe000, 0xffe0),
79:( 0x9f80, 0xa040, 0xc020, 0xc020, 0xc020, 0xa040, 0x9f80),
80:( 0xffe0, 0x8420, 0x8420, 0x8420, 0x8420, 0x8660, 0x83c0),
81:( 0x87e0, 0x8810, 0x9008, 0x9008, 0xb008, 0xf810, 0x87e0),
82:( 0xffe0, 0x8420, 0x8420, 0x8420, 0x8420, 0x8a60, 0xb3c0, 0xc000),
83:( 0xa1c0, 0xc240, 0xc220, 0xc420, 0xc420, 0xe420, 0xb840),
84:( 0x8020, 0x8020, 0x8020, 0xffe0, 0x8020, 0x8020, 0x8020),
85:( 0xbfe0, 0xe000, 0xc000, 0xc000, 0xc000, 0xe000, 0xbfe0),
86:( 0x8060, 0x8380, 0xbc00, 0xc000, 0xbc00, 0x8380, 0x8060),
87:( 0x81e0, 0x8e00, 0xf000, 0x8f00, 0x8f00, 0xf000, 0x8e00, 0x81e0, 0x8000),
88:( 0xc020, 0xb040, 0x8d80, 0x8200, 0x8d80, 0xb040, 0xc020),
89:( 0x8020, 0x80c0, 0x8300, 0xfe00, 0x8300, 0x80c0, 0x8020),
90:( 0xe020, 0xf020, 0xc820, 0xc620, 0xc120, 0xc0e0, 0xc060),
91:( 0xfff8, 0xc008, 0xc008),
92:( 0x8008, 0x8070, 0x8180, 0x8600, 0xb800, 0xc000),
93:( 0xc008, 0xc008, 0xfff8),
94:( 0xc000, 0xe000, 0x9000, 0x8800, 0x9000, 0xe000, 0xc000),
95:( 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000),
96:( 0x9000, 0xb000, 0xc000),
97:( 0xb800, 0xc500, 0xc480, 0xc480, 0xa480, 0xff00),
98:( 0xfff0, 0xa180, 0xc080, 0xc080, 0xe180, 0x9e00),
99:( 0x9e00, 0xa100, 0xc080, 0xc080, 0xc080, 0xa100),
100:( 0x9e00, 0xe180, 0xc080, 0xc080, 0xa180, 0xfff0),
101:( 0x9e00, 0xa580, 0xc480, 0xc480, 0xc580, 0xa700),
102:( 0x8080, 0x8080, 0xffe0, 0x8090, 0x8090, 0x8090),
103:( 0x83c0, 0xac30, 0xc810, 0xc810, 0xc420, 0xbff0),
104:( 0xfff0, 0x8100, 0x8080, 0x8080, 0x8080, 0xff00),
105:( 0xc000, 0xc080, 0xc080, 0xffb0, 0xc000, 0xc000, 0xc000),
106:( 0xc000, 0xc010, 0xc010, 0xbff6),
107:( 0xfff0, 0x8400, 0x8600, 0x9900, 0xa080, 0xc000),
108:( 0x8010, 0x8010, 0x8010, 0xbff0, 0xc000, 0xc000, 0xc000),
109:( 0xff80, 0x8080, 0x8080, 0xff80, 0x8080, 0x8080, 0xff00),
110:( 0xff80, 0x8100, 0x8080, 0x8080, 0x8080, 0xff00),
111:( 0xbf00, 0xe180, 0xc080, 0xc080, 0xe180, 0xbf00),
112:( 0xfff0, 0x8c20, 0x8810, 0x8810, 0x8c30, 0x83c0),
113:( 0x83c0, 0x8c30, 0x8810, 0x8810, 0x8420, 0xfff0),
114:( 0xff80, 0x8180, 0x8080, 0x8080, 0x8100),
115:( 0xa700, 0xc480, 0xc480, 0xc880, 0xc880, 0xb900),
116:( 0x8080, 0x8080, 0xbfe0, 0xc080, 0xc080, 0xc080),
117:( 0xbf80, 0xc000, 0xc000, 0xc000, 0xa000, 0xff80),
118:( 0x8180, 0x8e00, 0xf000, 0xf000, 0x8e00, 0x8180),
119:( 0x8180, 0x9e00, 0xe000, 0x9e00, 0x9e00, 0xe000, 0x9e00, 0x8180),
120:( 0xc080, 0xb100, 0x8e00, 0x8e00, 0xb100, 0xc080),
121:( 0x8010, 0xc0e0, 0xe300, 0x9e00, 0x81c0, 0x8030),
122:( 0xe080, 0xd080, 0xc880, 0xc480, 0xc280, 0xc180),
123:( 0x8100, 0x8100, 0xbef8, 0xc004, 0xc004),
124:( 0xfffe,),
125:( 0xc004, 0xc004, 0xbef8, 0x8100, 0x8100),
126:( 0xc000, 0xa000, 0xa000, 0xa000, 0xc000, 0xc000, 0xa000),
127:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
128:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
129:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
130:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
131:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
132:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
133:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
134:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
135:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
136:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
137:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
138:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
139:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
140:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
141:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
142:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
143:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
144:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
145:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
146:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
147:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
148:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
149:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
150:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
151:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
152:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
153:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
154:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
155:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
156:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
157:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
158:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
159:( 0xfff8, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xfff8),
161:( 0xfe60,),
162:( 0x8780, 0x8840, 0x9020, 0xfff8, 0x9020, 0x8840),
163:( 0xc000, 0xc400, 0xffc0, 0xc460, 0xc420, 0xc420, 0xc040),
164:( 0xc100, 0xbe00, 0xa200, 0xa200, 0xa200, 0xbe00, 0xc100),
165:( 0x8520, 0x8540, 0x8580, 0xfe00, 0x8580, 0x8540, 0x8520),
166:( 0xfcf8,),
167:( 0xc360, 0xc4d0, 0xcc90, 0xc890, 0xd910, 0xb710),
168:( 0xc000, 0x8000, 0xc000),
169:( 0x9e00, 0xa100, 0xcc80, 0xd280, 0xd280, 0xd280, 0xa100, 0x9e00),
170:( 0xcc80, 0xd280, 0xd280, 0xca80, 0xdf00),
171:( 0x9800, 0xbc00, 0xe600, 0x9800, 0xbc00, 0xe600),
172:( 0x9000, 0x9000, 0x9000, 0x9000, 0x9000, 0x9000, 0xf000),
173:( 0xc000, 0xc000, 0xc000, 0xc000),
174:( 0x9e00, 0xa100, 0xde80, 0xca80, 0xda80, 0xd680, 0xa100, 0x9e00),
175:( 0xc000, 0xc000, 0xc000, 0xc000),
176:( 0xb000, 0xc800, 0xc800, 0xb000),
177:( 0xc200, 0xc200, 0xc200, 0xcf80, 0xc200, 0xc200, 0xc200),
178:( 0xc200, 0xe200, 0xd200, 0xcc00),
179:( 0xc200, 0xca00, 0xca00, 0xb600),
180:( 0xc000, 0xb000, 0x9000),
181:( 0xfff0, 0x8800, 0x8800, 0x8800, 0x8c00, 0x8ff0, 0x8800),
182:( 0x81e0, 0x81e0, 0x83f0, 0x83f0, 0xfff0, 0x8010, 0xfff0),
183:( 0xe000, 0xe000),
184:( 0xc000, 0xd000, 0xe000),
185:( 0xc200, 0xfe00, 0xc000),
186:( 0xcf00, 0xd080, 0xd080, 0xd080, 0xcf00),
187:( 0xe600, 0xbc00, 0x9800, 0xe600, 0xbc00, 0x9800),
188:( 0x8200, 0x8284, 0x81fc, 0xb180, 0xa900, 0xa680, 0xfe80, 0xa000),
189:( 0x8200, 0x8284, 0x81fc, 0xc380, 0xe300, 0xd280, 0xcc80),
190:( 0x8284, 0x8294, 0x8194, 0xb16c, 0xa900, 0xa680, 0xfe80, 0xa000),
191:( 0xb800, 0xcc00, 0xc760, 0xc000, 0xa000),
192:( 0xe000, 0x9c04, 0x8bcc, 0x8828, 0x8bc0, 0x9c00, 0xe000),
193:( 0xe000, 0x9c00, 0x8bc8, 0x882c, 0x8bc4, 0x9c00, 0xe000),
194:( 0xe000, 0x9c08, 0x8bc4, 0x8824, 0x8bc8, 0x9c00, 0xe000),
195:( 0xe000, 0x9c0c, 0x8bc4, 0x882c, 0x8bc8, 0x9c0c, 0xe000),
196:( 0xe000, 0x9c00, 0x8bc8, 0x8820, 0x8bc8, 0x9c00, 0xe000),
197:( 0xe000, 0xbc00, 0x8b9c, 0x8864, 0x8b9c, 0xbc00, 0xe000),
198:( 0xe000, 0x9e00, 0x89e0, 0x8820, 0xffe0, 0xc220, 0xc220, 0xc220),
199:( 0x83f0, 0x8408, 0x8804, 0xc804, 0xd804, 0xe804, 0x8408),
200:( 0xffe0, 0xc224, 0xc22c, 0xc228, 0xc220, 0xc220, 0xc220),
201:( 0xffe0, 0xc220, 0xc228, 0xc22c, 0xc224, 0xc220, 0xc220),
202:( 0xffe0, 0xc228, 0xc224, 0xc224, 0xc228, 0xc220, 0xc220),
203:( 0xffe0, 0xc220, 0xc228, 0xc220, 0xc228, 0xc220, 0xc220),
204:( 0xc024, 0xc02c, 0xffe8, 0xc020, 0xc020),
205:( 0xc020, 0xc028, 0xffec, 0xc024, 0xc020),
206:( 0xc028, 0xc024, 0xffe4, 0xc028, 0xc020),
207:( 0xc020, 0xc028, 0xffe0, 0xc028, 0xc020),
208:( 0x8200, 0xffe0, 0xc220, 0xc220, 0xc020, 0xc020, 0xa040, 0x9f80),
209:( 0xffe0, 0x806c, 0x8184, 0x860c, 0x9808, 0xe00c, 0xffe0),
210:( 0x9f80, 0xa044, 0xc02c, 0xc028, 0xc020, 0xa040, 0x9f80),
211:( 0x9f80, 0xa040, 0xc028, 0xc02c, 0xc024, 0xa040, 0x9f80),
212:( 0x9f80, 0xa048, 0xc024, 0xc024, 0xc028, 0xa040, 0x9f80),
213:( 0x9f80, 0xa04c, 0xc024, 0xc02c, 0xc028, 0xa04c, 0x9f80),
214:( 0x9f80, 0xa040, 0xc028, 0xc020, 0xc028, 0xa040, 0x9f80),
215:( 0xc200, 0xa400, 0x9800, 0x9800, 0xa400, 0xc200),
216:( 0xc000, 0xbf80, 0xf840, 0xcc20, 0xc620, 0xc320, 0xa0e0, 0x9fe0, 0x8000),
217:( 0xbfe0, 0xe004, 0xc00c, 0xc008, 0xc000, 0xe000, 0xbfe0),
218:( 0xbfe0, 0xe000, 0xc008, 0xc00c, 0xc004, 0xe000, 0xbfe0),
219:( 0xbfe0, 0xe008, 0xc004, 0xc004, 0xc008, 0xe000, 0xbfe0),
220:( 0xbfe0, 0xe000, 0xc008, 0xc000, 0xc008, 0xe000, 0xbfe0),
221:( 0x8020, 0x80c0, 0x8308, 0xfe0c, 0x8304, 0x80c0, 0x8020),
222:( 0xffe0, 0x8840, 0x8840, 0x8840, 0x8840, 0x8cc0, 0x8780),
223:( 0xffe0, 0x8010, 0xc710, 0xc490, 0xcc60, 0xb800),
224:( 0xb800, 0xc508, 0xc498, 0xc4a0, 0xa480, 0xff00),
225:( 0xb800, 0xc500, 0xc4a0, 0xc498, 0xa488, 0xff00),
226:( 0xb800, 0xc520, 0xc498, 0xc498, 0xa4a0, 0xff00),
227:( 0xb800, 0xc530, 0xc490, 0xc4b0, 0xa4a0, 0xff30),
228:( 0xb800, 0xc500, 0xc4a0, 0xc480, 0xa4a0, 0xff00),
229:( 0xb800, 0xc518, 0xc4a4, 0xc4a4, 0xa498, 0xff00),
230:( 0xf880, 0xc480, 0xbf00, 0xc480, 0xc480, 0xc700),
231:( 0x83c0, 0x8420, 0x8810, 0xc810, 0xd810, 0xe420),
232:( 0x9e00, 0xa588, 0xc498, 0xc4a0, 0xc580, 0xa700),
233:( 0x9e00, 0xa580, 0xc4a0, 0xc498, 0xc588, 0xa700),
234:( 0x9e00, 0xa5a0, 0xc498, 0xc498, 0xc5a0, 0xa700),
235:( 0x9e00, 0xa580, 0xc4a0, 0xc480, 0xc5a0, 0xa700),
236:( 0xc000, 0xc088, 0xc098, 0xffa0, 0xc000, 0xc000, 0xc000),
237:( 0xc000, 0xc080, 0xc0a0, 0xff98, 0xc008, 0xc000, 0xc000),
238:( 0xc000, 0xc0a0, 0xc098, 0xff98, 0xc020, 0xc000, 0xc000),
239:( 0xc000, 0xc080, 0xc0a0, 0xff80, 0xc020, 0xc000, 0xc000),
240:( 0x9e00, 0xe1b0, 0xc0b0, 0xc0e0, 0xe1a0, 0xbf00),
241:( 0xff80, 0x8130, 0x8090, 0x80b0, 0x80a0, 0xff30),
242:( 0xbf00, 0xe188, 0xc098, 0xc0a0, 0xe180, 0xbf00),
243:( 0xbf00, 0xe180, 0xc0a0, 0xc098, 0xe188, 0xbf00),
244:( 0xbf00, 0xe1a0, 0xc098, 0xc098, 0xe1a0, 0xbf00),
245:( 0xbf00, 0xe1b0, 0xc090, 0xc0b0, 0xe1a0, 0xbf30),
246:( 0xbf00, 0xe180, 0xc0a0, 0xc080, 0xe1a0, 0xbf00),
247:( 0x8800, 0x8800, 0x8800, 0xeb00, 0xeb00, 0x8800, 0x8800, 0x8800),
248:( 0x8000, 0xff00, 0xf180, 0xc880, 0xc480, 0xe380, 0x9f80, 0x8000),
249:( 0xbf80, 0xc008, 0xc018, 0xc020, 0xa000, 0xff80),
250:( 0xbf80, 0xc000, 0xc020, 0xc018, 0xa008, 0xff80),
251:( 0xbf80, 0xc020, 0xc018, 0xc018, 0xa020, 0xff80),
252:( 0xbf80, 0xc000, 0xc020, 0xc000, 0xa020, 0xff80),
253:( 0x8010, 0xc0e0, 0xe304, 0x9e03, 0x81c1, 0x8030),
254:( 0xfffe, 0x8c20, 0x8810, 0x8810, 0x8c30, 0x83c0),
255:( 0x8010, 0xc0e0, 0xe304, 0x9e00, 0x81c4, 0x8030)
}
| 54.813853
| 78
| 0.708103
| 1,619
| 12,662
| 5.537369
| 0.336628
| 0.179364
| 0.198773
| 0.176687
| 0.225544
| 0.167987
| 0.154601
| 0
| 0
| 0
| 0
| 0.531443
| 0.128416
| 12,662
| 230
| 79
| 55.052174
| 0.280899
| 0.00845
| 0
| 0
| 0
| 0
| 0.000876
| 0
| 0
| 0
| 0.657744
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
840ae83ea8ac447934c8d87fa2716fef26a13fc9
| 134
|
py
|
Python
|
topi/python/topi/image/__init__.py
|
mingwayzhang/tvm
|
3b287c4d4e6d83e6fd30db47ffa3d5481a332a63
|
[
"Apache-2.0"
] | 64
|
2021-05-02T14:42:34.000Z
|
2021-05-06T01:35:03.000Z
|
topi/python/topi/image/__init__.py
|
clhne/tvm
|
d59320c764bd09474775e1b292f3c05c27743d24
|
[
"Apache-2.0"
] | 23
|
2019-07-29T05:21:52.000Z
|
2020-08-31T18:51:42.000Z
|
topi/python/topi/image/__init__.py
|
clhne/tvm
|
d59320c764bd09474775e1b292f3c05c27743d24
|
[
"Apache-2.0"
] | 51
|
2019-07-12T05:10:25.000Z
|
2021-07-28T16:19:06.000Z
|
# pylint: disable=wildcard-import
"""IMAGE network operators"""
from __future__ import absolute_import as _abs
from .resize import *
| 22.333333
| 46
| 0.783582
| 17
| 134
| 5.823529
| 0.764706
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.126866
| 134
| 5
| 47
| 26.8
| 0.846154
| 0.41791
| 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
|
8411bff17218639e51ca9252506ceb43baf0954e
| 100
|
py
|
Python
|
bunq_bot/commands/commandos/stop.py
|
OGKevin/ComBunqWebApp
|
25bc6118427f3b369fb61ba0bd38c977be05644f
|
[
"MIT"
] | 32
|
2017-04-08T21:02:16.000Z
|
2021-04-02T10:23:24.000Z
|
bunq_bot/commands/commandos/stop.py
|
OGKevin/ComBunqWebApp
|
25bc6118427f3b369fb61ba0bd38c977be05644f
|
[
"MIT"
] | 139
|
2017-04-05T21:06:07.000Z
|
2021-06-08T19:34:34.000Z
|
bunq_bot/commands/commandos/stop.py
|
OGKevin/ComBunqWebApp
|
25bc6118427f3b369fb61ba0bd38c977be05644f
|
[
"MIT"
] | 7
|
2017-04-13T15:22:10.000Z
|
2018-03-21T06:03:44.000Z
|
def stop():
with open('bunq_bot/responses/commands/stop.md', 'r') as f:
return f.read()
| 25
| 63
| 0.61
| 16
| 100
| 3.75
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.21
| 100
| 3
| 64
| 33.333333
| 0.759494
| 0
| 0
| 0
| 0
| 0
| 0.36
| 0.35
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| true
| 0
| 0
| 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
| 1
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
84274eac6ee80c74bf44729e79aa0d2f22ec1c72
| 60
|
py
|
Python
|
Random-Programs/dev/games/misc/joe.py
|
naumoff0/Archive
|
d4ad2da89abb1576dd5a7c72ded6bf9b45c3f610
|
[
"MIT"
] | null | null | null |
Random-Programs/dev/games/misc/joe.py
|
naumoff0/Archive
|
d4ad2da89abb1576dd5a7c72ded6bf9b45c3f610
|
[
"MIT"
] | null | null | null |
Random-Programs/dev/games/misc/joe.py
|
naumoff0/Archive
|
d4ad2da89abb1576dd5a7c72ded6bf9b45c3f610
|
[
"MIT"
] | null | null | null |
from computeryshite import computerFailure
computerFailure()
| 30
| 42
| 0.9
| 5
| 60
| 10.8
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.066667
| 60
| 2
| 43
| 30
| 0.964286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
84604d580a90b4dade10e41d81c36986ff7458ee
| 15,343
|
py
|
Python
|
brightcove/Analytics.py
|
asha-bc/BrightcovePY
|
52e220e8e95221745b4de52ba94689509d27c072
|
[
"MIT"
] | 3
|
2020-12-14T23:08:09.000Z
|
2021-08-05T05:44:19.000Z
|
brightcove/Analytics.py
|
asha-bc/BrightcovePY
|
52e220e8e95221745b4de52ba94689509d27c072
|
[
"MIT"
] | null | null | null |
brightcove/Analytics.py
|
asha-bc/BrightcovePY
|
52e220e8e95221745b4de52ba94689509d27c072
|
[
"MIT"
] | 2
|
2021-10-19T15:24:28.000Z
|
2022-03-08T08:17:30.000Z
|
"""
Implements wrapper class and methods to work with Brightcove's Analytics API.
See: https://apis.support.brightcove.com/analytics/index.html
"""
from dataclasses import dataclass
from requests.models import Response
from .Base import Base
from .OAuth import OAuth
from .utils import QueryStringDataclassBase
VALID_DIMENSIONS = ('account', 'city', 'country', 'region', 'date', 'date-time', 'device_os', 'device_type',
'player', 'referrer_domain', 'destination_domain', 'search_terms', 'social_platform',
'source_type', 'video', 'viewer')
@dataclass
class AnalyticsQueryParameters(QueryStringDataclassBase):
"""
Dataclass defining URL query parameters for Analytics calls.
"""
accounts: str = '' # One or more account ids, separated by commas
dimensions: str = '' # Enum: "account" "city" "country" "region" "date" "date-time"
# "device_os" "device_type" "player" "referrer_domain" "destination_domain"
# "search_terms" "social_platform" "source_type" "video"
# One or more dimensions to report on; see Multiple Dimensions or
# which combined dimensions are supported.
limit: int = 10 # Number of items to return.
offset: int = 0 # Number of items to skip.
sort: str = 'video_view' # Field to sort results by (prefix with - for descending order).
fields: str = '' # Default: "`video_view` + others (varies by dimension)"
# Fields to return - available fields varies according to the dimensions -
# see the Overview: Analytics API for more details.
where: str = '' # Enum: "account" "city" "country" "region" "date" "date-time" "device_os"
# "device_type" "player" "referrer_domain" "destination_domain" "search_terms"
# "social_platform" "source_type" "video"
# One or more 'dimension==value' pairs to filter the results; see Where Filters
# for details; note that you can also limit the video set returned by filtering
# on video properties.
from_: str = '' # Start time for the period covered by the report — epoch time in milliseconds
# (1535654206775) or a date in the format yyyy-mm-dd (such as 2013-09-26)
to: str = 'now' # End time for the period covered by the report — now or epoch time in milliseconds
# (1535654206775) or a date in the format yyyy-mm-dd (such as 2013-09-26)
format: str = '' # Enum: "csv" "json" "xlxs"
# Format to return the results in.
reconciled: bool = True # If True, only reconciled data is returned; if False, only realtime data is
# returned; if not present, both reconciled and realtime data are returned.
def __post_init__(self):
"""
Add data validation information.
"""
self.fix_data(
{
'from_': 'from'
}
)
self.valid_data(
{
'dimensions': VALID_DIMENSIONS,
'where': VALID_DIMENSIONS,
'format': ('csv', 'json', 'xlxs')
}
)
@dataclass
class AnalyticsLiveQueryParameters(QueryStringDataclassBase):
"""
Dataclass defining URL query parameters for Live Analytics calls.
"""
dimensions_for_live_analytics: str = '' # Enum: "account" "city" "country" "region" "date"
# "date-time" "device_os" "device_type" "player"
# "referrer_domain" "destination_domain" "search_terms"
# "social_platform" "source_type" "video"
# Example: dimensions for live analytics=account
# One or more dimensions to report on for Live Analytics requests Dimensions.
bucket_limit: int = 0 # Max number of points to be returned for a time-series
bucket_duration: str = '' # Intervals duration in the form of an integer plus m (minutes), h (hours), or d (days)
metrics: str = '' # Enum: "video_impression" "video_view" "video_seconds_viewed"
# "alive_ss_ad_start" "fingerprint_count" "ccu"
# Data metrics to return for live analytics requests.
where: str = '' # Enum: "account" "city" "country" "region" "date" "date-time"
# "device_os" "device_type" "player" "referrer_domain" "destination_domain"
# "search_terms" "social_platform" "source_type" "video"
# One or more 'dimension==value' pairs to filter the results;
# see Where Filters for details; note that you can also limit the video
# set returned by filtering on video properties
from_: str = '' # Start time for the period covered by the report — epoch time in milliseconds
# (1535654206775) or a date in the format yyyy-mm-dd (such as 2013-09-26)
to: str = 'now' # End time for the period covered by the report — now or epoch time in milliseconds
# (1535654206775) or a date in the format yyyy-mm-dd (such as 2013-09-26)
def __post_init__(self):
self.fix_data(
{
'from_': 'from',
'dimensions_for_live_analytics': 'dimensions%20for%20live%20analytics'
}
)
self.valid_data(
{
'dimensions%20for%20live%20analytics': VALID_DIMENSIONS,
'where': VALID_DIMENSIONS,
'metrics':
('video_impression', 'video_view', 'video_seconds_viewed', 'alive_ss_ad_start',
'fingerprint_count', 'ccu'),
}
)
class Analytics(Base):
"""
Class to wrap the Brightcove Analytics API calls. Inherits from Base.
Attributes:
-----------
base_url (str)
Base URL for API calls.
Methods:
--------
GetAccountEngagement(self, account_id: str='') -> Response
Get a summary report of engagement for the account.
GetPlayerEngagement(self, player_id: str, account_id: str='') -> Response
Get a summary report of engagement for a player.
GetVideoEngagement(self, video_id: str, account_id: str='') -> Response
Get a summary report of engagement for a video.
GetAnalyticsReport(self, query_parameters: AnalyticsQueryParameters) -> Response
Get an analytics report on one or more dimensions.
GetAvailableDateRange(self, query_parameters: AnalyticsQueryParameters) -> Response
Get the date range for which reconciled data is available for any Analytics API report.
GetAlltimeVideoViews(self, video_id: str, account_id: str='') -> Response
Returns the total alltime video views for a video.
GetLiveAnalyticsTimeSeries(self, query_parameters: AnalyticsLiveQueryParameters, account_id: str='') -> Response
Returns a list of timestamp-value pairs representing samples of a variable (metric).
GetLiveAnalyticsEvent(self, query_parameters: AnalyticsLiveQueryParameters, account_id: str='') -> Response
Provides a summary of analytics data collected for a live stream.
"""
# base URL for all API calls
base_url = 'https://analytics.api.brightcove.com/v1'
def __init__(self, oauth: OAuth) -> None:
"""
Args:
oauth (OAuth): OAuth instance to use for the API calls.
"""
super().__init__(oauth=oauth)
#region Engagement Report
def GetAccountEngagement(self, account_id: str='') -> Response:
"""
Get a summary report of engagement for the account. Note: Engagement reports are only available
for periods within the past 32 days. Requests outside that range will return an error The only
parameters supported for Engagement reports are from and to Engagement reports are available
for single accounts only - reports on multiple accounts will not work.
Args:
account_id (str, optional): Brightcove Account ID. Defaults to ''.
Returns:
Response: API response as requests Response object.
"""
account_id = account_id or self.oauth.account_id
url = f'{self.base_url}/engagement/accounts/{account_id}'
return self.session.get(url, headers=self.oauth.headers)
def GetPlayerEngagement(self, player_id: str, account_id: str='') -> Response:
"""
Get a summary report of engagement for a player. Note: Engagement reports are only available
for periods within the past 32 days. Requests outside that range will return an error The
only parameters supported for Engagement reports are from and to Engagement reports are
available for single accounts only - reports on multiple accounts will not work.
Args:
player_id (str): Video Cloud player ID.
account_id (str, optional): Brightcove Account ID. Defaults to ''.
Returns:
Response: API response as requests Response object.
"""
account_id = account_id or self.oauth.account_id
url = f'{self.base_url}/engagement/accounts/{account_id}/players/{player_id}'
return self.session.get(url, headers=self.oauth.headers)
def GetVideoEngagement(self, video_id: str, account_id: str='') -> Response:
"""
Get a summary report of engagement for a video. Note: Engagement reports are only available
for periods within the past 32 days. Requests outside that range will return an error The only
parameters supported for Engagement reports are from and to Engagement reports are available
for single accounts only - reports on multiple accounts will not work.
Args:
video_id (str): Video Cloud video ID.
account_id (str, optional): Brightcove Account ID. Defaults to ''.
Returns:
Response: API response as requests Response object.
"""
account_id = account_id or self.oauth.account_id
url = f'{self.base_url}/engagement/accounts/{account_id}/videos/{video_id}'
return self.session.get(url, headers=self.oauth.headers)
#endregion
#region Analytics Report
def GetAnalyticsReport(self, query_parameters: AnalyticsQueryParameters) -> Response:
"""
Get an analytics report on one or more dimensions. Note that the fields returned in the response
will vary according to the dimension(s) requested and the fields specified in the fields parameter.
See the API Overview and the dimension guides for details.
Args:
query_parameters (AnalyticsQueryParameters): Query parameters as AnalyticsQueryParameters object.
Returns:
Response: API response as requests Response object.
"""
url = f'{self.base_url}/data{query_parameters}'
return self.session.get(url, headers=self.oauth.headers)
def GetAvailableDateRange(self, query_parameters: AnalyticsQueryParameters) -> Response:
"""
Get the date range for which reconciled data is available for any Analytics API report. All parameters
are allowed, but only account, dimensions, and where affect the result - all others are ignored. Note
that date range for this request must fall within the available date range for the dimensions requested.
Args:
query_parameters (AnalyticsQueryParameters): Query parameters as AnalyticsQueryParameters object.
Returns:
Response: API response as requests Response object.
"""
url = f'{self.base_url}/data/status{query_parameters}'
return self.session.get(url, headers=self.oauth.headers)
#endregion
#region Video Data
def GetAlltimeVideoViews(self, video_id: str, account_id: str='') -> Response:
"""
Returns the total alltime video views for a video. This is a low-latency endpoint appropriate
for use by client-side apps such as the Brightcove Player.
Args:
video_id (str): Video Cloud video ID.
account_id (str, optional): Brightcove Account ID. Defaults to ''.
Returns:
Response: API response as requests Response object.
"""
account_id = account_id or self.oauth.account_id
url = f'{self.base_url}/alltime/accounts/{account_id}/videos/{video_id}'
return self.session.get(url, headers=self.oauth.headers)
#endregion
#region Live Analytics
def GetLiveAnalyticsTimeSeries(self, query_parameters: AnalyticsLiveQueryParameters, account_id: str='') -> Response:
"""
A time-series is defined as a an list of timestamp-value pairs representing samples of a
variable (metric). The time-series API intends to allow the user to return a time-series
for the set of metrics requested in the query.
Args:
query_parameters (AnalyticsLiveQueryParameters): Query parameters as AnalyticsLiveQueryParameters object.
account_id (str, optional): Brightcove Account ID. Defaults to ''.
Returns:
Response: API response as requests Response object.
"""
account_id = account_id or self.oauth.account_id
url = f'{self.base_url}/timeseries/accounts/{account_id}{query_parameters}'
return self.session.get(url, headers=self.oauth.headers)
def GetLiveAnalyticsEvent(self, query_parameters: AnalyticsLiveQueryParameters, account_id: str='') -> Response:
"""
Provides a summary of analytics data collected for a live stream.
Args:
query_parameters (AnalyticsLiveQueryParameters): Query parameters as AnalyticsLiveQueryParameters object.
account_id (str, optional): Brightcove Account ID. Defaults to ''.
Returns:
Response: API response as requests Response object.
"""
account_id = account_id or self.oauth.account_id
url = f'{self.base_url}/events/accounts/{account_id}{query_parameters}'
return self.session.get(url, headers=self.oauth.headers)
#endregion
| 51.834459
| 135
| 0.602555
| 1,682
| 15,343
| 5.396552
| 0.164685
| 0.047593
| 0.023796
| 0.02644
| 0.733172
| 0.720502
| 0.720502
| 0.701443
| 0.701443
| 0.680952
| 0
| 0.010265
| 0.320602
| 15,343
| 295
| 136
| 52.010169
| 0.86013
| 0.540181
| 0
| 0.322581
| 0
| 0
| 0.145232
| 0.089559
| 0
| 0
| 0
| 0
| 0
| 1
| 0.11828
| false
| 0
| 0.053763
| 0
| 0.494624
| 0.010753
| 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
|
0832cac710bea701505d5597bdecb57ddbcaa51a
| 189
|
py
|
Python
|
three/__init__.py
|
Countdown369/three
|
1869ab1ad0948e5cdf416f1c06c176700805984d
|
[
"BSD-3-Clause"
] | 15
|
2015-02-28T22:55:07.000Z
|
2019-03-05T03:04:27.000Z
|
three/__init__.py
|
Countdown369/three
|
1869ab1ad0948e5cdf416f1c06c176700805984d
|
[
"BSD-3-Clause"
] | 5
|
2016-04-22T17:20:53.000Z
|
2020-06-01T15:24:46.000Z
|
three/__init__.py
|
Countdown369/three
|
1869ab1ad0948e5cdf416f1c06c176700805984d
|
[
"BSD-3-Clause"
] | 11
|
2015-08-19T11:34:06.000Z
|
2021-10-29T18:48:49.000Z
|
from . import core
from .api import (key, city, cities, dev, discovery, post, request,
requests, services, token)
from .cities import CityNotFound
from .core import Three
| 31.5
| 67
| 0.693122
| 24
| 189
| 5.458333
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.227513
| 189
| 5
| 68
| 37.8
| 0.89726
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.8
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
083d718685c201c64d8d9cdf09eee3ba9b2820bd
| 191
|
py
|
Python
|
paver/cog/__init__.py
|
jrossi/paver
|
db4ea25ed1c986c766fd3424aeae34d9b28ac937
|
[
"BSD-3-Clause"
] | 1
|
2015-02-09T19:59:44.000Z
|
2015-02-09T19:59:44.000Z
|
paver/cog/__init__.py
|
jrossi/paver
|
db4ea25ed1c986c766fd3424aeae34d9b28ac937
|
[
"BSD-3-Clause"
] | null | null | null |
paver/cog/__init__.py
|
jrossi/paver
|
db4ea25ed1c986c766fd3424aeae34d9b28ac937
|
[
"BSD-3-Clause"
] | null | null | null |
""" Cog code generation tool.
http://nedbatchelder.com/code/cog
Copyright 2004-2005, Ned Batchelder.
"""
# $Id: __init__.py 110 2005-08-27 22:35:20Z ned $
from cogapp import *
| 19.1
| 49
| 0.664921
| 28
| 191
| 4.392857
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.163399
| 0.198953
| 191
| 9
| 50
| 21.222222
| 0.640523
| 0.764398
| 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
|
084830c7e00320a274d6146d14d5773073501167
| 24
|
py
|
Python
|
code/python/forward_euler/forward_euler.py
|
fcooper8472/algorithms
|
1966edae1f34dead0954ea75995e44342bb3f1c4
|
[
"MIT"
] | null | null | null |
code/python/forward_euler/forward_euler.py
|
fcooper8472/algorithms
|
1966edae1f34dead0954ea75995e44342bb3f1c4
|
[
"MIT"
] | null | null | null |
code/python/forward_euler/forward_euler.py
|
fcooper8472/algorithms
|
1966edae1f34dead0954ea75995e44342bb3f1c4
|
[
"MIT"
] | null | null | null |
print('Forward Euler!')
| 12
| 23
| 0.708333
| 3
| 24
| 5.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 24
| 1
| 24
| 24
| 0.772727
| 0
| 0
| 0
| 0
| 0
| 0.583333
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
f28160d222b9f9a01d295247154c95c3767291c0
| 154
|
py
|
Python
|
galaxy/common/context_processors.py
|
pabelanger/galaxy
|
9df6634bffb3440ba633e40f99e2f4bb80b1f0da
|
[
"Apache-2.0"
] | 904
|
2016-10-11T13:35:19.000Z
|
2022-03-25T09:29:09.000Z
|
galaxy/common/context_processors.py
|
pabelanger/galaxy
|
9df6634bffb3440ba633e40f99e2f4bb80b1f0da
|
[
"Apache-2.0"
] | 1,866
|
2016-10-15T21:28:09.000Z
|
2022-03-29T18:09:20.000Z
|
galaxy/common/context_processors.py
|
pabelanger/galaxy
|
9df6634bffb3440ba633e40f99e2f4bb80b1f0da
|
[
"Apache-2.0"
] | 368
|
2016-10-11T13:44:08.000Z
|
2022-03-30T02:23:12.000Z
|
import secrets
import base64
def template_metadata(request):
return {
'csp_nonce': base64.b64encode(secrets.token_bytes(32)).decode()
}
| 17.111111
| 71
| 0.701299
| 18
| 154
| 5.833333
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.064
| 0.188312
| 154
| 8
| 72
| 19.25
| 0.776
| 0
| 0
| 0
| 0
| 0
| 0.058442
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0.166667
| 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
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 5
|
f2bccd195e9185229349fda80cd47c3facd4ef0a
| 448
|
py
|
Python
|
introducao-a-linguagem-com-python/construindo-metodos-funcoes-e-classes-em-python/metodos-funcoes-classes/main.py
|
ImGabreuw/digital-innovation-one
|
8782ce57358fc879f5527a837f452a75539ed97f
|
[
"MIT"
] | 3
|
2021-06-23T15:22:59.000Z
|
2021-07-05T08:05:49.000Z
|
introducao-a-linguagem-com-python/construindo-metodos-funcoes-e-classes-em-python/metodos-funcoes-classes/main.py
|
ImGabreuw/digital-innovation-one
|
8782ce57358fc879f5527a837f452a75539ed97f
|
[
"MIT"
] | 1
|
2021-12-26T19:45:30.000Z
|
2021-12-26T19:45:30.000Z
|
introducao-a-linguagem-com-python/construindo-metodos-funcoes-e-classes-em-python/metodos-funcoes-classes/main.py
|
ImGabreuw/digital-innovation-one
|
8782ce57358fc879f5527a837f452a75539ed97f
|
[
"MIT"
] | null | null | null |
class Calculadora:
def soma(self, num1, num2):
return num1 + num2
def subtracao(self, num1, num2):
return num1 - num2
def multiplicacao(self, num1, num2):
return num1 * num2
def divisao(self, num1, num2):
return num1 / num2
calculadora = Calculadora()
print(calculadora.soma(10, 2))
print(calculadora.subtracao(5, 3))
print(calculadora.multiplicacao(100, 2))
print(calculadora.divisao(20, 4))
| 20.363636
| 40
| 0.660714
| 56
| 448
| 5.285714
| 0.339286
| 0.216216
| 0.162162
| 0.243243
| 0.381757
| 0.381757
| 0.293919
| 0
| 0
| 0
| 0
| 0.08046
| 0.223214
| 448
| 21
| 41
| 21.333333
| 0.770115
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0
| 0.285714
| 0.642857
| 0.285714
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
4b30751ac69ab5c475997a64ec1554908267fa32
| 85
|
py
|
Python
|
dist/11.py
|
HunTrue/WXBot-IntelligentResponse
|
036dbc56469feb44f1833aac4602e97f7ed3f036
|
[
"Apache-2.0"
] | 17
|
2018-01-22T10:14:30.000Z
|
2021-11-26T02:48:33.000Z
|
dist/11.py
|
HunTrue/WXBot-IntelligentResponse
|
036dbc56469feb44f1833aac4602e97f7ed3f036
|
[
"Apache-2.0"
] | null | null | null |
dist/11.py
|
HunTrue/WXBot-IntelligentResponse
|
036dbc56469feb44f1833aac4602e97f7ed3f036
|
[
"Apache-2.0"
] | 5
|
2018-03-03T16:01:09.000Z
|
2021-02-12T10:27:26.000Z
|
from distutils.core import setup
import py2exe
setup(console=["bot.py","wxbot.py"])
| 21.25
| 37
| 0.752941
| 13
| 85
| 4.923077
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012987
| 0.094118
| 85
| 3
| 38
| 28.333333
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0.164706
| 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
|
4b915f9d188d61ab0446e0572e858c04b14aa506
| 33
|
py
|
Python
|
isl/loss/__init__.py
|
HenryLee97/isl
|
0eb357bd45c5ce3ab3ef060deb84707975049d37
|
[
"MIT"
] | 2
|
2021-12-14T10:43:53.000Z
|
2021-12-14T12:46:50.000Z
|
isl/loss/__init__.py
|
HenryLee97/isl
|
0eb357bd45c5ce3ab3ef060deb84707975049d37
|
[
"MIT"
] | null | null | null |
isl/loss/__init__.py
|
HenryLee97/isl
|
0eb357bd45c5ce3ab3ef060deb84707975049d37
|
[
"MIT"
] | null | null | null |
from isl.loss.mlp import MLPLoss
| 16.5
| 32
| 0.818182
| 6
| 33
| 4.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121212
| 33
| 1
| 33
| 33
| 0.931034
| 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
|
29c778723e7e67108e2832c79df99bb08dcac5b5
| 151
|
py
|
Python
|
{{cookiecutter.module_name}}/src/bio2bel_{{ cookiecutter.module_name }}/parser.py
|
deeenes/bio2bel-cookiecutter
|
8464a34faf3e645de20fb098ced4ec31666dd10a
|
[
"MIT"
] | null | null | null |
{{cookiecutter.module_name}}/src/bio2bel_{{ cookiecutter.module_name }}/parser.py
|
deeenes/bio2bel-cookiecutter
|
8464a34faf3e645de20fb098ced4ec31666dd10a
|
[
"MIT"
] | 1
|
2019-03-06T16:22:28.000Z
|
2019-03-06T16:22:28.000Z
|
{{cookiecutter.module_name}}/src/bio2bel_{{ cookiecutter.module_name }}/parser.py
|
deeenes/bio2bel-cookiecutter
|
8464a34faf3e645de20fb098ced4ec31666dd10a
|
[
"MIT"
] | 1
|
2019-02-28T14:01:14.000Z
|
2019-02-28T14:01:14.000Z
|
# -*- coding: utf-8 -*-
"""Parsers and downloaders for Bio2BEL {{ cookiecutter.module_stylized }}."""
from bio2bel.downloading import make_df_getter
| 25.166667
| 77
| 0.728477
| 18
| 151
| 5.944444
| 0.944444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.022727
| 0.125828
| 151
| 5
| 78
| 30.2
| 0.787879
| 0.622517
| 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
|
29cec94ecbdd80d3ddc0edb885cc7c5a877318df
| 253
|
py
|
Python
|
local_modules/calculate.py
|
reysmerwvr/python-playgrounds
|
1e039639d96044986ba5cc894a210180cc2b08e0
|
[
"MIT"
] | null | null | null |
local_modules/calculate.py
|
reysmerwvr/python-playgrounds
|
1e039639d96044986ba5cc894a210180cc2b08e0
|
[
"MIT"
] | null | null | null |
local_modules/calculate.py
|
reysmerwvr/python-playgrounds
|
1e039639d96044986ba5cc894a210180cc2b08e0
|
[
"MIT"
] | null | null | null |
from operations import *
a, b, c, d = (10, 5, 0, 'Hello')
print("{} + {} = {}".format(a, b, sums(a, b)))
print("{} - {} = {}".format(b, d, diff(b, d)))
print("{} * {} = {}".format(b, b, times(b, b)))
print("{} / {} = {}".format(a, c, division(a, c)))
| 28.111111
| 50
| 0.450593
| 39
| 253
| 2.923077
| 0.435897
| 0.385965
| 0.210526
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019417
| 0.185771
| 253
| 8
| 51
| 31.625
| 0.533981
| 0
| 0
| 0
| 0
| 0
| 0.209486
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.166667
| 0
| 0.166667
| 0.666667
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
29fcf008dc324d17fe6c2789dead4a9fde5c1ca9
| 385
|
py
|
Python
|
gramat/parsing/read_context.py
|
gramat-lang/python-gramat
|
c3edb7cf045b109596bb4cfdf43d58e04763ac19
|
[
"MIT"
] | null | null | null |
gramat/parsing/read_context.py
|
gramat-lang/python-gramat
|
c3edb7cf045b109596bb4cfdf43d58e04763ac19
|
[
"MIT"
] | null | null | null |
gramat/parsing/read_context.py
|
gramat-lang/python-gramat
|
c3edb7cf045b109596bb4cfdf43d58e04763ac19
|
[
"MIT"
] | null | null | null |
from typing import List
from gramat.errors import GramatError
from gramat.parsing.source import Source
class ReadContext:
def __init__(self, source: Source):
self.source = source
self.stop_marks: List[str] = []
def error(self, message: str) -> GramatError:
return self.source.error(message)
# TODO implement literal and char predicate caching
| 22.647059
| 55
| 0.706494
| 48
| 385
| 5.5625
| 0.5625
| 0.11236
| 0.11985
| 0.149813
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.215584
| 385
| 16
| 56
| 24.0625
| 0.884106
| 0.127273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0625
| 0
| 1
| 0.222222
| false
| 0
| 0.333333
| 0.111111
| 0.777778
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 5
|
4b0965feea7b3b5ad8f5fdcc5a86696a57905de3
| 590
|
py
|
Python
|
orb_simulator/other_language/testing_ast/__init__.py
|
dmguezjaviersnet/IA-Sim-Comp-Project
|
8165b9546efc45f98091a3774e2dae4f45942048
|
[
"MIT"
] | 1
|
2022-01-19T22:49:09.000Z
|
2022-01-19T22:49:09.000Z
|
orb_simulator/other_language/testing_ast/__init__.py
|
dmguezjaviersnet/IA-Sim-Comp-Project
|
8165b9546efc45f98091a3774e2dae4f45942048
|
[
"MIT"
] | 15
|
2021-11-10T14:25:02.000Z
|
2022-02-12T19:17:11.000Z
|
orb_simulator/other_language/testing_ast/__init__.py
|
dmguezjaviersnet/IA-Sim-Comp-Project
|
8165b9546efc45f98091a3774e2dae4f45942048
|
[
"MIT"
] | null | null | null |
from other_language.testing_ast.BinaryExpression import BinaryExpression
from other_language.testing_ast.Div import Div
from other_language.testing_ast.Expression import Expression
from other_language.testing_ast.Mul import Mul
from other_language.testing_ast.Node import Node
from other_language.testing_ast.Not import Not
from other_language.testing_ast.Number import Number
from other_language.testing_ast.Rule import Rule
from other_language.testing_ast.Sub import Sub
from other_language.testing_ast.Sum import Sum
from other_language.testing_ast.UnaryExpression import UnaryExpression
| 53.636364
| 72
| 0.889831
| 88
| 590
| 5.715909
| 0.193182
| 0.196819
| 0.371769
| 0.524851
| 0.590457
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.072881
| 590
| 11
| 73
| 53.636364
| 0.919561
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
d99abf416259bee947ebbf097e2e71cdfd75f34c
| 65
|
py
|
Python
|
src/hdfviewer/__init__.py
|
scimax/ipy-hdf-viewer
|
fdb1de494a59be526e140876fd5a7b2b95544892
|
[
"MIT"
] | null | null | null |
src/hdfviewer/__init__.py
|
scimax/ipy-hdf-viewer
|
fdb1de494a59be526e140876fd5a7b2b95544892
|
[
"MIT"
] | null | null | null |
src/hdfviewer/__init__.py
|
scimax/ipy-hdf-viewer
|
fdb1de494a59be526e140876fd5a7b2b95544892
|
[
"MIT"
] | null | null | null |
#
# Package information
#
from .__pkginfo__ import __version__
| 9.285714
| 36
| 0.769231
| 6
| 65
| 7
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.169231
| 65
| 6
| 37
| 10.833333
| 0.777778
| 0.292308
| 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
|
d9d0138c9c155cc8f2e588a273d944c6177145a2
| 16,819
|
py
|
Python
|
Geometry/ForwardCommonData/python/totemTest2019XML_cfi.py
|
nistefan/cmssw
|
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
|
[
"Apache-2.0"
] | 1
|
2019-08-09T08:42:11.000Z
|
2019-08-09T08:42:11.000Z
|
Geometry/ForwardCommonData/python/totemTest2019XML_cfi.py
|
nistefan/cmssw
|
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
|
[
"Apache-2.0"
] | null | null | null |
Geometry/ForwardCommonData/python/totemTest2019XML_cfi.py
|
nistefan/cmssw
|
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
|
[
"Apache-2.0"
] | 1
|
2019-03-19T13:44:54.000Z
|
2019-03-19T13:44:54.000Z
|
import FWCore.ParameterSet.Config as cms
## 2015 + new phase 1 pixel detector
XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource",
geomXMLFiles = cms.vstring(
'Geometry/CMSCommonData/data/materials.xml',
'Geometry/CMSCommonData/data/rotations.xml',
'Geometry/CMSCommonData/data/extend/v2/cmsextent.xml',
'Geometry/CMSCommonData/data/cms/2019/v3/cms.xml',
'Geometry/CMSCommonData/data/cmsMother.xml',
'Geometry/CMSCommonData/data/eta3/etaMax.xml',
'Geometry/CMSCommonData/data/cmsTracker.xml',
'Geometry/CMSCommonData/data/caloBase/2017/v1/caloBase.xml',
'Geometry/CMSCommonData/data/cmsCalo.xml',
'Geometry/CMSCommonData/data/muonBase/2017/v1/muonBase.xml',
'Geometry/CMSCommonData/data/cmsMuon.xml',
'Geometry/CMSCommonData/data/mgnt.xml',
'Geometry/CMSCommonData/data/beampipe/2023/v1/beampipe.xml',
'Geometry/CMSCommonData/data/cmsBeam/2023/v1/cmsBeam.xml',
'Geometry/CMSCommonData/data/muonMB.xml',
'Geometry/CMSCommonData/data/muonMagnet.xml',
'Geometry/CMSCommonData/data/cavern/2017/v2/cavern.xml',
'Geometry/CMSCommonData/data/cavernData/2017/v1/cavernData.xml',
'Geometry/CMSCommonData/data/cavernFloor/2017/v1/cavernFloor.xml',
'Geometry/TrackerCommonData/data/PhaseI/trackerParameters.xml',
'Geometry/TrackerCommonData/data/PhaseI/pixfwdMaterials.xml',
'Geometry/TrackerCommonData/data/pixfwdCommon.xml',
'Geometry/TrackerCommonData/data/PhaseI/pixfwdCylinder.xml',
'Geometry/TrackerCommonData/data/PhaseI/pixfwd.xml',
'Geometry/TrackerCommonData/data/PhaseI/pixfwdDisks.xml',
'Geometry/TrackerCommonData/data/PhaseI/pixfwdSupportRingParameters.xml',
'Geometry/TrackerCommonData/data/PhaseI/pixfwdInnerDiskZplus.xml',
'Geometry/TrackerCommonData/data/PhaseI/pixfwdInnerDiskZminus.xml',
'Geometry/TrackerCommonData/data/PhaseI/pixfwdOuterDiskZplus.xml',
'Geometry/TrackerCommonData/data/PhaseI/pixfwdOuterDiskZminus.xml',
'Geometry/TrackerCommonData/data/PhaseI/pixfwdbladeInnerZplus.xml',
'Geometry/TrackerCommonData/data/PhaseI/pixfwdbladeInnerZminus.xml',
'Geometry/TrackerCommonData/data/PhaseI/pixfwdbladeOuterZplus.xml',
'Geometry/TrackerCommonData/data/PhaseI/pixfwdbladeOuterZminus.xml',
'Geometry/TrackerCommonData/data/PhaseI/pixbarmaterial.xml',
'Geometry/TrackerCommonData/data/PhaseI/pixbarladder.xml',
'Geometry/TrackerCommonData/data/PhaseI/pixbarladderfull0.xml',
'Geometry/TrackerCommonData/data/PhaseI/pixbarladderfull1.xml',
'Geometry/TrackerCommonData/data/PhaseI/pixbarladderfull2.xml',
'Geometry/TrackerCommonData/data/PhaseI/pixbarladderfull3.xml',
'Geometry/TrackerCommonData/data/PhaseI/pixbarlayer.xml',
'Geometry/TrackerCommonData/data/PhaseI/pixbarlayer0.xml',
'Geometry/TrackerCommonData/data/PhaseI/pixbarlayer1.xml',
'Geometry/TrackerCommonData/data/PhaseI/pixbarlayer2.xml',
'Geometry/TrackerCommonData/data/PhaseI/pixbarlayer3.xml',
'Geometry/TrackerCommonData/data/PhaseI/pixbar.xml',
'Geometry/TrackerCommonData/data/Run2/trackerpatchpannel.xml',
'Geometry/TrackerCommonData/data/Run2/trackerpixelnose.xml',
'Geometry/TrackerCommonData/data/tibtidcommonmaterial.xml',
'Geometry/TrackerCommonData/data/tibmaterial.xml',
'Geometry/TrackerCommonData/data/tibmodpar.xml',
'Geometry/TrackerCommonData/data/tibmodule0.xml',
'Geometry/TrackerCommonData/data/tibmodule0a.xml',
'Geometry/TrackerCommonData/data/tibmodule0b.xml',
'Geometry/TrackerCommonData/data/tibmodule2.xml',
'Geometry/TrackerCommonData/data/tibstringpar.xml',
'Geometry/TrackerCommonData/data/tibstring0ll.xml',
'Geometry/TrackerCommonData/data/tibstring0lr.xml',
'Geometry/TrackerCommonData/data/tibstring0ul.xml',
'Geometry/TrackerCommonData/data/tibstring0ur.xml',
'Geometry/TrackerCommonData/data/tibstring0.xml',
'Geometry/TrackerCommonData/data/tibstring1ll.xml',
'Geometry/TrackerCommonData/data/tibstring1lr.xml',
'Geometry/TrackerCommonData/data/tibstring1ul.xml',
'Geometry/TrackerCommonData/data/tibstring1ur.xml',
'Geometry/TrackerCommonData/data/tibstring1.xml',
'Geometry/TrackerCommonData/data/tibstring2ll.xml',
'Geometry/TrackerCommonData/data/tibstring2lr.xml',
'Geometry/TrackerCommonData/data/tibstring2ul.xml',
'Geometry/TrackerCommonData/data/tibstring2ur.xml',
'Geometry/TrackerCommonData/data/tibstring2.xml',
'Geometry/TrackerCommonData/data/tibstring3ll.xml',
'Geometry/TrackerCommonData/data/tibstring3lr.xml',
'Geometry/TrackerCommonData/data/tibstring3ul.xml',
'Geometry/TrackerCommonData/data/tibstring3ur.xml',
'Geometry/TrackerCommonData/data/tibstring3.xml',
'Geometry/TrackerCommonData/data/tiblayerpar.xml',
'Geometry/TrackerCommonData/data/tiblayer0.xml',
'Geometry/TrackerCommonData/data/tiblayer1.xml',
'Geometry/TrackerCommonData/data/tiblayer2.xml',
'Geometry/TrackerCommonData/data/tiblayer3.xml',
'Geometry/TrackerCommonData/data/tib.xml',
'Geometry/TrackerCommonData/data/tidmaterial.xml',
'Geometry/TrackerCommonData/data/tidmodpar.xml',
'Geometry/TrackerCommonData/data/tidmodule0.xml',
'Geometry/TrackerCommonData/data/tidmodule0r.xml',
'Geometry/TrackerCommonData/data/tidmodule0l.xml',
'Geometry/TrackerCommonData/data/tidmodule1.xml',
'Geometry/TrackerCommonData/data/tidmodule1r.xml',
'Geometry/TrackerCommonData/data/tidmodule1l.xml',
'Geometry/TrackerCommonData/data/tidmodule2.xml',
'Geometry/TrackerCommonData/data/tidringpar.xml',
'Geometry/TrackerCommonData/data/tidring0.xml',
'Geometry/TrackerCommonData/data/tidring0f.xml',
'Geometry/TrackerCommonData/data/tidring0b.xml',
'Geometry/TrackerCommonData/data/tidring1.xml',
'Geometry/TrackerCommonData/data/tidring1f.xml',
'Geometry/TrackerCommonData/data/tidring1b.xml',
'Geometry/TrackerCommonData/data/tidring2.xml',
'Geometry/TrackerCommonData/data/tid.xml',
'Geometry/TrackerCommonData/data/tidf.xml',
'Geometry/TrackerCommonData/data/tidb.xml',
'Geometry/TrackerCommonData/data/tibtidservices.xml',
'Geometry/TrackerCommonData/data/tibtidservicesf.xml',
'Geometry/TrackerCommonData/data/tibtidservicesb.xml',
'Geometry/TrackerCommonData/data/tobmaterial.xml',
'Geometry/TrackerCommonData/data/tobmodpar.xml',
'Geometry/TrackerCommonData/data/tobmodule0.xml',
'Geometry/TrackerCommonData/data/tobmodule2.xml',
'Geometry/TrackerCommonData/data/tobmodule4.xml',
'Geometry/TrackerCommonData/data/tobrodpar.xml',
'Geometry/TrackerCommonData/data/tobrod0c.xml',
'Geometry/TrackerCommonData/data/tobrod0l.xml',
'Geometry/TrackerCommonData/data/tobrod0h.xml',
'Geometry/TrackerCommonData/data/tobrod0.xml',
'Geometry/TrackerCommonData/data/tobrod1l.xml',
'Geometry/TrackerCommonData/data/tobrod1h.xml',
'Geometry/TrackerCommonData/data/tobrod1.xml',
'Geometry/TrackerCommonData/data/tobrod2c.xml',
'Geometry/TrackerCommonData/data/tobrod2l.xml',
'Geometry/TrackerCommonData/data/tobrod2h.xml',
'Geometry/TrackerCommonData/data/tobrod2.xml',
'Geometry/TrackerCommonData/data/tobrod3l.xml',
'Geometry/TrackerCommonData/data/tobrod3h.xml',
'Geometry/TrackerCommonData/data/tobrod3.xml',
'Geometry/TrackerCommonData/data/tobrod4c.xml',
'Geometry/TrackerCommonData/data/tobrod4l.xml',
'Geometry/TrackerCommonData/data/tobrod4h.xml',
'Geometry/TrackerCommonData/data/tobrod4.xml',
'Geometry/TrackerCommonData/data/tobrod5l.xml',
'Geometry/TrackerCommonData/data/tobrod5h.xml',
'Geometry/TrackerCommonData/data/tobrod5.xml',
'Geometry/TrackerCommonData/data/v2/tob.xml',
'Geometry/TrackerCommonData/data/tecmaterial.xml',
'Geometry/TrackerCommonData/data/tecmodpar.xml',
'Geometry/TrackerCommonData/data/tecmodule0.xml',
'Geometry/TrackerCommonData/data/tecmodule0r.xml',
'Geometry/TrackerCommonData/data/tecmodule0s.xml',
'Geometry/TrackerCommonData/data/tecmodule1.xml',
'Geometry/TrackerCommonData/data/tecmodule1r.xml',
'Geometry/TrackerCommonData/data/tecmodule1s.xml',
'Geometry/TrackerCommonData/data/tecmodule2.xml',
'Geometry/TrackerCommonData/data/tecmodule3.xml',
'Geometry/TrackerCommonData/data/tecmodule4.xml',
'Geometry/TrackerCommonData/data/tecmodule4r.xml',
'Geometry/TrackerCommonData/data/tecmodule4s.xml',
'Geometry/TrackerCommonData/data/tecmodule5.xml',
'Geometry/TrackerCommonData/data/tecmodule6.xml',
'Geometry/TrackerCommonData/data/tecpetpar.xml',
'Geometry/TrackerCommonData/data/tecring0.xml',
'Geometry/TrackerCommonData/data/tecring1.xml',
'Geometry/TrackerCommonData/data/tecring2.xml',
'Geometry/TrackerCommonData/data/tecring3.xml',
'Geometry/TrackerCommonData/data/tecring4.xml',
'Geometry/TrackerCommonData/data/tecring5.xml',
'Geometry/TrackerCommonData/data/tecring6.xml',
'Geometry/TrackerCommonData/data/tecring0f.xml',
'Geometry/TrackerCommonData/data/tecring1f.xml',
'Geometry/TrackerCommonData/data/tecring2f.xml',
'Geometry/TrackerCommonData/data/tecring3f.xml',
'Geometry/TrackerCommonData/data/tecring4f.xml',
'Geometry/TrackerCommonData/data/tecring5f.xml',
'Geometry/TrackerCommonData/data/tecring6f.xml',
'Geometry/TrackerCommonData/data/tecring0b.xml',
'Geometry/TrackerCommonData/data/tecring1b.xml',
'Geometry/TrackerCommonData/data/tecring2b.xml',
'Geometry/TrackerCommonData/data/tecring3b.xml',
'Geometry/TrackerCommonData/data/tecring4b.xml',
'Geometry/TrackerCommonData/data/tecring5b.xml',
'Geometry/TrackerCommonData/data/tecring6b.xml',
'Geometry/TrackerCommonData/data/tecpetalf.xml',
'Geometry/TrackerCommonData/data/tecpetalb.xml',
'Geometry/TrackerCommonData/data/tecpetal0.xml',
'Geometry/TrackerCommonData/data/tecpetal0f.xml',
'Geometry/TrackerCommonData/data/tecpetal0b.xml',
'Geometry/TrackerCommonData/data/tecpetal3.xml',
'Geometry/TrackerCommonData/data/tecpetal3f.xml',
'Geometry/TrackerCommonData/data/tecpetal3b.xml',
'Geometry/TrackerCommonData/data/tecpetal6f.xml',
'Geometry/TrackerCommonData/data/tecpetal6b.xml',
'Geometry/TrackerCommonData/data/tecpetal8f.xml',
'Geometry/TrackerCommonData/data/tecpetal8b.xml',
'Geometry/TrackerCommonData/data/tecwheel.xml',
'Geometry/TrackerCommonData/data/tecwheela.xml',
'Geometry/TrackerCommonData/data/tecwheelb.xml',
'Geometry/TrackerCommonData/data/tecwheelc.xml',
'Geometry/TrackerCommonData/data/tecwheeld.xml',
'Geometry/TrackerCommonData/data/tecwheel6.xml',
'Geometry/TrackerCommonData/data/tecservices.xml',
'Geometry/TrackerCommonData/data/tecbackplate.xml',
'Geometry/TrackerCommonData/data/tec.xml',
'Geometry/TrackerCommonData/data/Run2/trackermaterial.xml',
'Geometry/TrackerCommonData/data/Run2/tracker.xml',
'Geometry/TrackerCommonData/data/trackerpixbar.xml',
'Geometry/TrackerCommonData/data/PhaseI/trackerpixfwd.xml',
'Geometry/TrackerCommonData/data/trackertibtidservices.xml',
'Geometry/TrackerCommonData/data/trackertib.xml',
'Geometry/TrackerCommonData/data/trackertid.xml',
'Geometry/TrackerCommonData/data/trackertob.xml',
'Geometry/TrackerCommonData/data/trackertec.xml',
'Geometry/TrackerCommonData/data/v2/trackerbulkhead.xml',
'Geometry/TrackerCommonData/data/trackerother.xml',
'Geometry/EcalCommonData/data/Run2/eregalgo.xml',
'Geometry/EcalCommonData/data/ebalgo.xml',
'Geometry/EcalCommonData/data/ebcon.xml',
'Geometry/EcalCommonData/data/ebrot.xml',
'Geometry/EcalCommonData/data/eecon.xml',
'Geometry/EcalCommonData/data/eefixed.xml',
'Geometry/EcalCommonData/data/eehier.xml',
'Geometry/EcalCommonData/data/eealgo.xml',
'Geometry/EcalCommonData/data/escon.xml',
'Geometry/EcalCommonData/data/esalgo.xml',
'Geometry/EcalCommonData/data/eeF.xml',
'Geometry/EcalCommonData/data/eeB.xml',
'Geometry/EcalCommonData/data/ectkcable.xml',
'Geometry/HcalCommonData/data/hcalrotations.xml',
'Geometry/HcalCommonData/data/hcal/PhaseI/hcalalgo.xml',
'Geometry/HcalCommonData/data/hcalcablealgo.xml',
'Geometry/HcalCommonData/data/hcalbarrelalgo.xml',
'Geometry/HcalCommonData/data/hcalendcap/PhaseI/hcalendcapalgo.xml',
'Geometry/HcalCommonData/data/hcalouteralgo.xml',
'Geometry/HcalCommonData/data/hcalforwardalgo.xml',
'Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml',
'Geometry/HcalCommonData/data/hcalSimNumbering/2019/hcalSimNumbering.xml',
'Geometry/HcalCommonData/data/hcalRecNumbering/2019/hcalRecNumbering.xml',
'Geometry/MuonCommonData/data/mbCommon/2017/v2/mbCommon.xml',
'Geometry/MuonCommonData/data/mb1/2015/v1/mb1.xml',
'Geometry/MuonCommonData/data/mb2/2015/v1/mb2.xml',
'Geometry/MuonCommonData/data/mb3/2015/v1/mb3.xml',
'Geometry/MuonCommonData/data/mb4/2015/v1/mb4.xml',
'Geometry/MuonCommonData/data/design/muonYoke.xml',
'Geometry/MuonCommonData/data/mf/2017/v2/mf.xml',
'Geometry/MuonCommonData/data/rpcf/2015/v1/rpcf.xml',
'Geometry/MuonCommonData/data/gemf/TDR_BaseLine/gemf.xml',
'Geometry/MuonCommonData/data/gem11/TDR_BaseLine/gem11.xml',
'Geometry/MuonCommonData/data/csc/2015/v1/csc.xml',
'Geometry/MuonCommonData/data/mfshield/2017/v1/mfshield.xml',
'Geometry/ForwardCommonData/data/forwardshield/2017/v1/forwardshield.xml',
'Geometry/ForwardCommonData/data/PostLS2/forward.xml',
'Geometry/ForwardCommonData/data/PostLS2/bcml2.xml',
'Geometry/ForwardCommonData/data/brmrotations.xml',
'Geometry/ForwardCommonData/data/PostLS2/brm.xml',
'Geometry/ForwardCommonData/data/totemTest/2019/totemTest.xml',
'Geometry/ForwardCommonData/data/zdcmaterials.xml',
'Geometry/ForwardCommonData/data/lumimaterials.xml',
'Geometry/ForwardCommonData/data/zdcrotations.xml',
'Geometry/ForwardCommonData/data/lumirotations.xml',
'Geometry/ForwardCommonData/data/zdc.xml',
'Geometry/ForwardCommonData/data/zdclumi.xml',
'Geometry/ForwardCommonData/data/cmszdc.xml')+cms.vstring(
'Geometry/MuonCommonData/data/muonNumbering/2019/v2/muonNumbering.xml',
'Geometry/TrackerCommonData/data/PhaseI/trackerStructureTopology.xml',
'Geometry/TrackerSimData/data/PhaseI/trackersens.xml',
'Geometry/TrackerRecoData/data/PhaseI/trackerRecoMaterial.xml',
'Geometry/EcalSimData/data/ecalsens.xml',
'Geometry/HcalCommonData/data/hcalsenspmf.xml',
'Geometry/HcalSimData/data/hf.xml',
'Geometry/HcalSimData/data/hfpmt.xml',
'Geometry/HcalSimData/data/hffibrebundle.xml',
'Geometry/HcalSimData/data/CaloUtil.xml',
'Geometry/MuonSimData/data/v2/muonSens.xml',
'Geometry/DTGeometryBuilder/data/dtSpecsFilter.xml',
'Geometry/CSCGeometryBuilder/data/cscSpecsFilter.xml',
'Geometry/CSCGeometryBuilder/data/cscSpecs.xml',
'Geometry/RPCGeometryBuilder/data/RPCSpecs.xml',
'Geometry/GEMGeometryBuilder/data/v4/GEMSpecs.xml',
'Geometry/ForwardCommonData/data/brmsens.xml',
'Geometry/ForwardSimData/data/zdcsens.xml',
'Geometry/HcalSimData/data/HcalProdCuts.xml',
'Geometry/EcalSimData/data/EcalProdCuts.xml',
'Geometry/EcalSimData/data/ESProdCuts.xml',
'Geometry/TrackerSimData/data/PhaseI/trackerProdCuts.xml',
'Geometry/TrackerSimData/data/trackerProdCutsBEAM.xml',
'Geometry/MuonSimData/data/muonProdCuts.xml',
'Geometry/ForwardSimData/data/zdcProdCuts.xml',
'Geometry/ForwardSimData/data/ForwardShieldProdCuts.xml',
'Geometry/CMSCommonData/data/FieldParameters.xml'),
rootNodeName = cms.string('cms:OCMS')
)
| 58.399306
| 83
| 0.724894
| 1,532
| 16,819
| 7.956919
| 0.21671
| 0.248154
| 0.422642
| 0.483019
| 0.120016
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018072
| 0.151198
| 16,819
| 287
| 84
| 58.602787
| 0.835808
| 0.001962
| 0
| 0
| 0
| 0
| 0.790835
| 0.790358
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.003546
| 0
| 0.003546
| 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
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
8a292b71ab13cb8e0f9a1e210b2ba52ae74af2a7
| 113,282
|
py
|
Python
|
src/bot_data/bestbot.py
|
PolarisVoid/EvoAI
|
7a7cacd4b4382613b5fb56a389a47677d8d476b3
|
[
"MIT"
] | null | null | null |
src/bot_data/bestbot.py
|
PolarisVoid/EvoAI
|
7a7cacd4b4382613b5fb56a389a47677d8d476b3
|
[
"MIT"
] | null | null | null |
src/bot_data/bestbot.py
|
PolarisVoid/EvoAI
|
7a7cacd4b4382613b5fb56a389a47677d8d476b3
|
[
"MIT"
] | null | null | null |
bestbot_wieght_layer_one = [[0.5083356940068343, 0.6413884327387512, 0.12597500318803512, 0.409734240278669, 0.5238183286955302, 0.24756818387086588, 0.07996951671732211, 0.8661360538895999, 0.021330280161349524, 0.48867128687465466, 0.7091463179823605, 0.5510191844939321, 0.1511562255369685, 0.9902045558754771, 0.5598235194641445, 0.2987502784350923, 0.9133580328077606, 0.4319790167215327, 0.882638956669701, 0.13396400586064428, 0.5643936240773798, 0.45469444818099747, 0.013877091194470448, 0.30127467531838115, 0.6204798693485853, 0.9386592224383452, 0.4552674682341863, 0.8203134724421871, 0.0504241302759324, 0.3832716960261172, 0.13184975835300283, 0.7861721990440431, 0.7526183690226589, 0.029002338307896225, 0.6560216350691683, 0.49514280423939194, 0.6217197103438309, 0.004327317921587359, 0.2521185323453553, 0.5907112823388861, 0.5497697510443235, 0.4613798337357624, 0.21456228189162663, 0.2058328696752405, 0.8863315411442563, 0.3762121412385343, 0.1013654256158173, 0.8491711500788556, 0.5870530550189083, 0.7964419636832196, 0.40173700830758763, 0.351487524580257, 0.36777868950638914, 0.9849354865126682, 0.04781850787993458, 0.4616792821527781, 0.46740282149223256, 0.25756439233302864, 0.8131119081403727, 0.5218949597774837, 0.13094125319802608, 0.8539380075167886, 0.8544594558969093, 0.1518290350001379, 0.640633900557939, 0.7068761411643191, 0.9739796168337547, 0.4622412786905581, 0.7256496658788288, 0.67627411251782, 0.5045871202599759, 0.4474291422984228, 0.004440617927931267, 0.11736018137648419, 0.10853358842653726, 0.9060757587000742, 0.9999276197491352, 0.7179598402634598, 0.7929235330635965, 0.8750969279668221, 0.08245325011131854, 0.4581163235514889, 0.6940880112439268, 0.027251461294989565, 0.7989178095681376, 0.52614741391192, 0.16961900204276792, 0.8079041114221676, 0.09686607906592415], [0.44732060686240427, 0.5965458737068393, 0.49079692122973395, 0.6734995764904032, 0.011269344688713767, 0.7743814639448289, 0.21285898252564772, 0.7239251236968279, 0.5193778769353926, 0.02097501315742656, 0.7360527461419282, 0.342980190097963, 0.8952019602043025, 0.9538053276143122, 0.449148374416259, 0.04924934963011929, 0.6040520111142427, 0.9379069278863937, 0.7034729455964114, 0.5295926311054755, 0.333028709636071, 0.4797660644809155, 0.9946543507329271, 0.7219456161941203, 0.009073670127202949, 0.16317582954639953, 0.2348125693340265, 0.16035214133902664, 0.4453506900798563, 0.1337409415389904, 0.31749215340711867, 0.5303403511582013, 0.6286113604723674, 0.21698217659846475, 0.965557926212913, 0.9531015008543482, 0.26777967202351327, 0.7448616363072315, 0.7469316179704107, 0.17652175164361372, 0.9842598238468006, 0.6448334244973555, 0.465212276135632, 0.4579262384921249, 0.2304670593021676, 0.2583964383327617, 0.9175312502155607, 0.6366347711155572, 0.9172830689671416, 0.41446334300675625, 0.5527499956017332, 0.12790797334976522, 0.5683021014837767, 0.8932188487952264, 0.07000465153632307, 0.04433442104191443, 0.6257670380265532, 0.029623107954036665, 0.3375955946864595, 0.4111744908740558, 0.014873841964081591, 0.46029107434913497, 0.9062490722494158, 0.47797584189807485, 0.4459623180311395, 0.6705693719833891, 0.035889609633035446, 0.598888046228321, 0.09957663411102102, 0.1833471680058394, 0.9338478764511818, 0.0018323283567314164, 0.4226807646821895, 0.6207281651922394, 0.4453112092781921, 0.9670298945216684, 0.5112983368364218, 0.18275653679362747, 0.08633305238863986, 0.924077053371721, 0.25097402357147014, 0.6771503445013011, 0.6241074536800665, 0.03395333079263585, 0.22288115103463368, 0.3424511922372696, 0.44661767651765993, 0.7361811838899964, 0.8249165559305982], [0.02018048717651222, 0.7581818414998046, 0.16758461478611442, 0.7486157774767164, 0.29456782374703183, 0.6412877574017902, 0.8511183002299005, 0.3700032872643265, 0.9594038328678093, 0.04629838704844247, 0.6749723386112758, 0.6498901087215712, 0.4201797853376934, 0.34376810403053704, 0.7609770811264756, 0.9898496155208767, 0.12475482629134282, 0.681193566143118, 0.779361773422472, 0.4466306809515591, 0.13945509362194486, 0.16325939143154333, 0.006279431856545559, 0.18077558354404255, 0.043684117916898746, 0.09394637717907595, 0.3591363926546901, 0.9594923450699729, 0.9383644767347549, 0.6091042717229864, 0.7553225222057758, 0.2858946231139712, 0.8248065334361011, 0.8690829081693856, 0.03915174835811519, 0.7160297371106641, 0.36126269500361663, 0.46096171879557135, 0.7559482030585145, 0.08215375659909063, 0.41996586115079326, 0.04954589959185407, 0.5008440112510776, 0.6153363516455316, 0.5781016922474963, 0.45342709076675625, 0.7428673891877775, 0.9312020387671791, 0.14668336861356712, 0.1694250299555362, 0.7207157844237642, 0.5521856155366568, 0.07075483793889314, 0.9910432031980071, 0.7040715348637976, 0.5220291151478094, 0.6929448856705775, 0.44414099581903876, 0.2242373351424114, 0.7821128482900072, 0.6950348439604672, 0.10789052812607225, 0.3573202171278591, 0.8560470926419935, 0.26240541515931504, 0.3245155985021979, 0.32268179913450745, 0.4795316305356606, 0.6149531739869545, 0.3811116828085209, 0.31578804905213564, 0.37830356500453877, 0.6819283485620643, 0.42698727471751174, 0.34367358618613764, 0.5303212664640963, 0.3646672700868582, 0.1375414766440729, 0.18326170750642268, 0.3540176108462342, 0.27220542567376216, 0.9743846783430218, 0.316176357620815, 0.41767781631096124, 0.7565891510521163, 0.5537559164163394, 0.5486275576679056, 0.19817553634203922, 0.7105006440260081], [0.5604291114935926, 0.9714702726660814, 0.4783542784922493, 0.12186031130295194, 0.6763584337208685, 0.26925611953740014, 0.30938282665722006, 0.4772046940217263, 0.20917939939628905, 0.947053820436586, 0.6213563819168169, 0.7442803834667624, 0.9092261498830413, 0.3645496800149608, 0.099152422844758, 0.2899809700795474, 0.1734450934526327, 0.3663702672209701, 0.8364051081459092, 0.5790296381553229, 0.8142411469657191, 0.4197085736874142, 0.5495026293879369, 0.00899381215719719, 0.7777307095515558, 0.19301578448020862, 0.9453196017574236, 0.39049740078934003, 0.4654767923104478, 0.019448366340949375, 0.6736295241274275, 0.6390073140952494, 0.8272355453699698, 0.6462747207028589, 0.92018881484142, 0.733073867004477, 0.2552100467357008, 0.7636681660230787, 0.4151215385724719, 0.5343787418811972, 0.19812266603318818, 0.44471443079441697, 0.01473312077745903, 0.534304712437915, 0.7601571764901264, 0.2051267865837324, 0.4823357652299445, 0.292212323571831, 0.6797251932656161, 0.11035587392085722, 0.07485185318858767, 0.7422971944240869, 0.9756044837529667, 0.2085643036567203, 0.8030520152008666, 0.6808938381588522, 0.5534725929257401, 0.9393871136078871, 0.30264289436005365, 0.954528691287696, 0.5685704547523369, 0.24456220410066554, 0.19056549230139685, 0.965243082838079, 0.2133492481773912, 0.7468069376698039, 0.3835535400184409, 0.1416306963306171, 0.9546089268542084, 0.9531622239555476, 0.2398728955160424, 0.28866002862887197, 0.9767865334413385, 0.6340254354729454, 0.7218959082091733, 0.48895975785022283, 0.12905543358395677, 0.3759789376760465, 0.39400929375898386, 0.9177015562703543, 0.15373417527131117, 0.25901357540664993, 0.9957034681770154, 0.48225292732002567, 0.13002819994059145, 0.09535273405929268, 0.00940031625561033, 0.6626831302395553, 0.8633050751016679], [0.3923217130381551, 0.927631325432574, 0.16534526517274328, 0.346184935958203, 0.6349002165933239, 0.34025760208838796, 0.49814759173950696, 0.4166214121575721, 0.3932153386012387, 0.38262945421127115, 0.7417609752768413, 0.6612630965413642, 0.9734486384182732, 0.1883243003633983, 0.3771597423260351, 0.2795413322252783, 0.5529629221431348, 0.5798809905604083, 0.6143461952584212, 0.09241495701398483, 0.1923554703412439, 0.20843619060912855, 0.4034773303445617, 0.8209875421506904, 0.5440545358072746, 0.1454528865875302, 0.15435000024924295, 0.7427197868544537, 0.6890800511216496, 0.17319020957535336, 0.5033738328564605, 0.4320320588088812, 0.28901183685765397, 0.7826154315673387, 0.5891230333389987, 0.09153152511481377, 0.21779875657267267, 0.07834026125303806, 0.5661249880412732, 0.11411386267928891, 0.07027582313149527, 0.6803188867449569, 0.715096816277777, 0.5790460004712493, 0.36154779310024443, 0.09593393499590075, 0.6665031581535927, 0.2971855419056406, 0.7882750981113863, 0.4951412673681359, 0.8858502278523562, 0.9214860235311498, 0.8836924892595962, 0.43031868937072826, 0.9577787292061967, 0.08153700721769985, 0.7306300225948283, 0.340820387563048, 0.8928369014841465, 0.5171150292093225, 0.662441940335801, 0.7909134289029212, 0.6959364325249491, 0.922618390039394, 0.6563929459693805, 0.6874097274368116, 0.23477832521463293, 0.059873425167410566, 0.5112630823146588, 0.7716719473111209, 0.6727402940928368, 0.9317161785917387, 0.6309376596731346, 0.9670332633035303, 0.38170124739072053, 0.014815308871163224, 0.9859908064684962, 0.10606247061714869, 0.7958463638460447, 0.15034380447400786, 0.717060467016927, 0.9927663907022335, 0.8452912167568905, 0.7888484710445776, 0.6357609149400777, 0.15389456412316482, 0.995316271075813, 0.27972915468060433, 0.12158849543526973], [0.5481533069373333, 0.23631378876285947, 0.3492203901350259, 0.2644264178993718, 0.45150902134430193, 0.3073042158386923, 0.7412790568837891, 0.38464543089409964, 0.2318684443034824, 0.9471640690596532, 0.9245116105986637, 0.9226443727476606, 0.564512045879707, 0.949935038791364, 0.727958554360541, 0.3195395662452377, 0.6891297063219118, 0.45083719211605044, 0.9616543617925624, 0.5331387301996496, 0.847960980115698, 0.13631221203682664, 0.09517919403562969, 0.5085866426540181, 0.9196713241255481, 0.8180614474780438, 0.9384916970585654, 0.8901537478146938, 0.05294492779640558, 0.7535318874587119, 0.5229679798775425, 0.4044413937375968, 0.29509075336011126, 0.8458947120588866, 0.18633867487515887, 0.35611573038047106, 0.7230920992621691, 0.8945127782713984, 0.35082581356409615, 0.17792370802025226, 0.18172512973039767, 0.8541219255386225, 0.23103152819149386, 0.734155672416717, 0.034174731804771485, 0.22661674500476892, 0.2947734663729794, 0.40332429582403706, 0.5897060959456316, 0.37718118696239944, 0.9979820569493603, 0.2302472454108886, 0.988471561590019, 0.7150657350528221, 0.8535686247960939, 0.2629604367564524, 0.6137112413027493, 0.6040737944586351, 0.1938783570573086, 0.03546311450509143, 0.6009647538543609, 0.6956821887746525, 0.6743963899159551, 0.21016851839873563, 0.5063436354735312, 0.4088666609080279, 0.5521974070288524, 0.16779755465296764, 0.8258702689498507, 0.5171214949760935, 0.20611183101291408, 0.27555419835036277, 0.9111685543432454, 0.33816458798856885, 0.6197221528205438, 0.5430286690461754, 0.5211978635981385, 0.22842980297598603, 0.14264547763922109, 0.5905914865934847, 0.3443746390484872, 0.249785711348522, 0.08499004068749616, 0.5208403993111295, 0.27984635012793657, 0.5391002577028009, 0.37177723746676383, 0.9011936419841998, 0.8813985460829622], [0.49749287030201017, 0.8806484662506301, 0.3123787800986494, 0.010675508978881476, 0.7583754710116958, 0.8538441087024782, 0.6660385764842573, 0.7761137372712323, 0.9113765160676802, 0.7430385555247789, 0.9534446480685707, 0.02117671519328579, 0.47779150426863803, 0.106502080001872, 0.6226058843910565, 0.3840442454694871, 0.9778996961774052, 0.46129424527277907, 0.07881832190882465, 0.8103012999205798, 0.6389488548804214, 0.4325340777455502, 0.7301522048374846, 0.6167074510390562, 0.899511823246406, 0.6531385352612927, 0.7101964176730838, 0.04633977086489238, 0.10835396676484044, 0.7610495394273518, 0.9764973016382477, 0.5472568662835272, 0.49932259165825, 0.014871991701850495, 0.22161969069259724, 0.18845139323200089, 0.44093997187305, 0.8331773656567366, 0.14260771810664452, 0.07608655962278676, 0.789324113279971, 0.584217525739802, 0.55271873259416, 0.5867751455665335, 0.1553668939999442, 0.7657148350930969, 0.5337113854250222, 0.9654581142706308, 0.16545560389959457, 0.07197658596149625, 0.4471436812249129, 0.6777683423691677, 0.10774311021470073, 0.04324551754608874, 0.7355192242717465, 0.2768102872381152, 0.7196390260572773, 0.4528390882061746, 0.8624930676017196, 0.5844613593835437, 0.573586556897275, 0.657867693541677, 0.32071299649704277, 0.14919265362173417, 0.038889951239786336, 0.9755667018328213, 0.4358513008088849, 0.5451073695761851, 0.05098914406619037, 0.42426434360046106, 0.2747019771794337, 0.899041271737255, 0.44074378381506596, 0.7603858277363232, 0.9453072185053668, 0.6159874306862407, 0.8034410152539377, 0.5431486072159538, 0.03605853050327301, 0.38207065107123184, 0.7065146104262882, 0.5386760407478592, 0.516397798364354, 0.23675149294556175, 0.5558613824833031, 0.7846894336601646, 0.640463651757786, 0.30959903110624387, 0.9280831684225038], [0.7590757481388752, 0.35651185795644824, 0.9700645627185762, 0.896423355149134, 0.7826515190669003, 0.39947552492061245, 0.5098402384431973, 0.8883777987628296, 0.7915110566140199, 0.6115967559106664, 0.6843448009526619, 0.9000934133938591, 0.7174626880009486, 0.07713899217862219, 0.8047418132465363, 0.2907609440990606, 0.27464707237363983, 0.8308056112146716, 0.027733627049628118, 0.5087271094755709, 0.5457228795439921, 0.9776143113657889, 0.5252309614453342, 0.35213097384951153, 0.788360860855954, 0.2715677838244013, 0.23143100074700118, 0.04645618486838754, 0.7755280971792913, 0.5274312223994543, 0.14471385811326787, 0.37404439062408035, 0.3588071355954635, 0.5697557088871302, 0.8597828141486259, 0.3052954083781333, 0.6023798000660952, 0.03543974834561192, 0.6931108501277893, 0.9909070804146383, 0.19491285439885098, 0.8165343317842357, 0.5304706645262651, 0.7184235837872515, 0.6878890383398776, 0.2132392071544046, 0.14826120363013717, 0.6127269913175553, 0.5034112807318785, 0.4900432087991048, 0.5440432598444073, 0.2790645487646475, 0.7626224420725121, 0.22403874901166232, 0.7276053205015847, 0.9202150087656388, 0.2902934536952425, 0.8310766254747931, 0.48444738371294505, 0.3183569331036785, 0.6236914986936526, 0.34433533560552587, 0.2631015709259663, 0.16978140572115163, 0.9511429688039958, 0.6543496309663372, 0.649545354730402, 0.4149395132765845, 0.24669856246567712, 0.3842468087902172, 0.7510563521320146, 0.9771731029200398, 0.9229920858696089, 0.44162325010726167, 0.710331425477846, 0.6186221233207561, 0.434985735035499, 0.19388464730108756, 0.43678822746836143, 0.053567114953948725, 0.021381776415262843, 0.7484780427544864, 0.19888154212873888, 0.036701502581397594, 0.8615166500119606, 0.804988256255883, 0.13840711808686068, 0.6862150148218841, 0.7108805259473682], [0.24422852573481058, 0.006471156278194723, 0.4545575092023676, 0.554780251242209, 0.04618290049049356, 0.6337946716470784, 0.7370403909826088, 0.6026201996879458, 0.2751326751512695, 0.9460673572580429, 0.6960829801298273, 0.17232129149232622, 0.4147791189171395, 0.2745951568036985, 0.8321144573588158, 0.9790809345266869, 0.5052904777626952, 0.986693671190374, 0.29099573470951623, 0.8316427114391294, 0.6403971819355102, 0.07736077331225644, 0.7880510901258688, 0.8079509024263442, 0.6539833716698277, 0.35264936454932394, 0.7132965511680092, 0.7621180454499857, 0.6832177970932624, 0.9480946550557159, 0.9872821661867269, 0.8337084873428051, 0.144759396258466, 0.16623771334297477, 0.20108168882587396, 0.9302344161907148, 0.27989275319884355, 0.46436422034053304, 0.581594248865586, 0.9016659327231978, 0.4406007052155857, 0.7097569657292843, 0.1687663702643205, 0.779780577638187, 0.18345074556814644, 0.39755095844369703, 0.6878275129230587, 0.6010237660027191, 0.43126490044382104, 0.07658480863449602, 0.6105120876226189, 0.09189985064004735, 0.28392099796864256, 0.3398375355041131, 0.5342615565406676, 0.2371699692811351, 0.9156405923538632, 0.30607483870376395, 0.14872485694261706, 0.8445046477316465, 0.5276599175751828, 0.8138034283087676, 0.15663718309903663, 0.8432053429874451, 0.15679096056993536, 0.1757857223346908, 0.8958395094856639, 0.33301400616513455, 0.08234792361306853, 0.3895221588790051, 0.9310878321966409, 0.4236818580544027, 0.22885435823633082, 0.5244951258906083, 0.5376013641077403, 0.9381527132392921, 0.42931812835951544, 0.4626951074604865, 0.3986520566044164, 0.2724519892467828, 0.2562812529015652, 0.3785575396443923, 0.2443464422600291, 0.05950171895720735, 0.026057394412939527, 0.6263992407790135, 0.028326225239745817, 0.07478585324510811, 0.28069192394466846], [0.18823468115713027, 0.9491037808088497, 0.5394430766727812, 0.4241607402202975, 0.2532759726281082, 0.8294273532137544, 0.8461596201023514, 0.3826869434643777, 0.21401185248911747, 0.13251081927869068, 0.22090587060548883, 0.1603205748283799, 0.053692338677290286, 0.9352761875344486, 0.39185769515915436, 0.9190320125691411, 0.007007167963013261, 0.7098486172289845, 0.20153131491255238, 0.3721649778909898, 0.7696426010739107, 0.8948207868022702, 0.03406617929364375, 0.9299567936058805, 0.3905953340501672, 0.5435452129674673, 0.5569530395016932, 0.7010094723279858, 0.5897323647954261, 0.699487237939866, 0.6623240690266253, 0.7331290972429266, 0.02350525722352581, 0.2195641180406831, 0.28857757479066026, 0.5409626281389746, 0.5171579285134347, 0.5687859582357003, 0.7977540582629684, 0.9396251633640327, 0.8093088011998308, 0.31906199836108196, 0.7293495271346923, 0.7815214589247351, 0.1404444399628677, 0.5288733893100297, 0.38001386334092746, 0.6151060663899255, 0.9952364273274766, 0.05284728402188099, 0.6457222307148748, 0.8934500107462447, 0.507989019852049, 0.729733257897206, 0.6340030082808558, 0.10899790287218325, 0.0010721906349568933, 0.17954741245557382, 0.8656397731985678, 0.11703667021150421, 0.6944572342391326, 0.7301856221304919, 0.2322903505522509, 0.07540299291658581, 0.3304214175713349, 0.6533853864004865, 0.8670346208732284, 0.0806691482422689, 0.1232422684251322, 0.614771573703666, 0.5297904381557776, 0.28731389927039874, 0.653563688143571, 0.8936405541337771, 0.13096700432946362, 0.6625121515143407, 0.7088210123059913, 0.30068338379017745, 0.17341135652430462, 0.7353327102176788, 0.7898023763320853, 0.20337324432305726, 0.3315162049266144, 0.6939781726451612, 0.6583362116605304, 0.027645802733869962, 0.6613321163801427, 0.26252694930593123, 0.10051248687517222], [0.8964203114506818, 0.4155228944947629, 0.7304343627579893, 0.3900972299794411, 0.32118782261683165, 0.8930901873526546, 0.7632301414457996, 0.7236936568354294, 0.7084412067973798, 0.6328978025149183, 0.0379538962996685, 0.8283831490292473, 0.05162170339641281, 0.5375067045005237, 0.24193659764722786, 0.2453026811716016, 0.7527644424353007, 0.1675814149911775, 0.7459972703925971, 0.09509785592893893, 0.23411441827830515, 0.3710732545846137, 0.4474130797232422, 0.5976703774749869, 0.687984142959812, 0.3958282917086057, 0.5118151144710239, 0.07811074144543562, 0.33502631551468987, 0.0716635836109748, 0.9433775389532101, 0.036967883895142384, 0.22018807592253398, 0.46031471190370377, 0.7611412350309279, 0.11316557083059942, 0.9399451542496825, 0.04493543104864617, 0.19663936080265731, 0.35367852080737106, 0.35856769488252005, 0.0670571944445213, 0.18902751915664007, 0.7179148531520697, 0.7250185708155055, 0.4028993868344244, 0.8115875821477581, 0.686193375834604, 0.7877347380067876, 0.6060694759604733, 0.8719931918658241, 0.05457966083971899, 0.6852512481495083, 0.07120839711632654, 0.8630827219655653, 0.6380363422161449, 0.9091449535107198, 0.19060929094661705, 0.2728093385615721, 0.9808729991552015, 0.31064446633420606, 0.0666827962393618, 0.22946482647682354, 0.14853755036427108, 0.23028028062400785, 0.24474902266405418, 0.0037941936245361463, 0.7831311997988423, 0.9656414937949173, 0.2738905155397804, 0.7354279240693473, 0.16858611563807413, 0.49890789441885464, 0.4004157432083634, 0.45925875687826123, 0.6820835430878356, 0.6113241921929073, 0.3481492737953592, 0.8055751518853811, 0.9143379463675634, 0.10230462219619274, 0.9887857747391088, 0.8993873655133435, 0.22024997083839648, 0.8993785981845989, 0.32598334492773695, 0.028806202726770924, 0.6841493928724225, 0.18576090419951996], [0.7444158556675533, 0.33277537425925907, 0.5726299153850932, 0.051147772480777176, 0.5720382107642586, 0.5278810194140121, 0.5515810937670799, 0.12559649314940036, 0.90256935446683, 0.645947126122254, 0.36831805084294156, 0.4151438174790215, 0.780986344009323, 0.7095399284588982, 0.9307982861043583, 0.5689234952550919, 0.03949876188628143, 0.0009322296640986716, 0.7908928747012787, 0.02473256066175411, 0.5812447881605401, 0.567019369662427, 0.1437916087983636, 0.5978069690162937, 0.6312251070621067, 0.4068633726318144, 0.8555835365228809, 0.8646688495360867, 0.6600746327402812, 0.8083403392136894, 0.6010211144299099, 0.45592068293654187, 0.6101896584458981, 0.41474431856458427, 0.08653560279881445, 0.8625038414495085, 0.3071778219006206, 0.5986901442396391, 0.1776986216549612, 0.4334811253306433, 0.6910543589097559, 0.6649757095242201, 0.08954848292752782, 0.6094261233043601, 0.1607180915555193, 0.7221139075176337, 0.9407998347316802, 0.010307535856809324, 0.7951404685392367, 0.5203265059204001, 0.7381691754290488, 0.7165030494147232, 0.6912572298372374, 0.4627292188145756, 0.381669721888074, 0.022263729288099166, 0.7771443232311819, 0.9255555722412235, 0.4537065740221169, 0.3876196505242817, 0.3545508668715259, 0.10907516709052822, 0.4525464366437765, 0.6380863554353794, 0.05564728702267108, 0.11804225346429231, 0.07178781355219188, 0.6871187289534805, 0.09624332022403981, 0.08864956380343014, 0.7764473108674925, 0.27240957988422254, 0.3922899735606147, 0.4638411269685878, 0.992987551187826, 0.7614974909980091, 0.48311386247375376, 0.08356688434532611, 0.9267339734444079, 0.7263119145311155, 0.6545251521059269, 0.2813371791553273, 0.7296320624324217, 0.41247442859811423, 0.4187486893225574, 0.7499389620680762, 0.692501150131849, 0.5703524115189047, 0.7288850347996408], [0.5300842736522037, 0.15911172784795247, 0.02523475488648408, 0.8462948845452729, 0.6621144196223673, 0.09010457083430823, 0.5112439220387288, 0.8167956886429564, 0.3388562260163789, 0.21079751078595121, 0.29537488127391254, 0.604217086143981, 0.0023685393975936275, 0.0511083275721983, 0.8691548619011095, 0.5245320270190045, 0.8780948832493888, 0.0014645702978953734, 0.8944888495736151, 0.8600029504748401, 0.5280905505566222, 0.9707665505518203, 0.620518125136259, 0.9700502000610653, 0.4482377158911731, 0.24322563672761155, 0.459360731977264, 0.29803119724241556, 0.6202705807310491, 0.8540168534889723, 0.22123557107492242, 0.4994116816390477, 0.09980821033266585, 0.857382967747352, 0.5336385496800874, 0.2352197555394555, 0.6657438810763245, 0.21921776230849188, 0.5117657090175658, 0.2553050946165867, 0.04642459406024524, 0.41264652354805187, 0.9984831732163528, 0.5085443441303589, 0.38935827378298193, 0.3693647205057493, 0.28147605728240266, 0.477687480324108, 0.6388142416198467, 0.45610956172528627, 0.8716773114822415, 0.11998824147379028, 0.6235289619339974, 0.7710135159676185, 0.004468665534012373, 0.6132338200972024, 0.22917699421630355, 0.36306360630052126, 0.0030452545476826742, 0.18395092919420641, 0.15562483919593662, 0.08591267816342407, 0.28391210038272885, 0.2624041550056829, 0.72268096118249, 0.5390805239115407, 0.59045122602472, 0.6656810593425632, 0.8341162083097048, 0.8734644282144448, 0.20419495537141985, 0.021726084143916302, 0.03340952676405384, 0.23613756938435748, 0.9851165066002994, 0.46359152311274276, 0.248557076861189, 0.7569806262258035, 0.09197112697122001, 0.3007561803709221, 0.15964956013254317, 0.1795816466203426, 0.14160380889257163, 0.7781537232849116, 0.8975641938815586, 0.09627481771028612, 0.39533288894888263, 0.38794643407351603, 0.8616020826149468], [0.8036384632357606, 0.7813560658345995, 0.5252938942314784, 0.6387950940454501, 0.47611667732743057, 0.9358064185341112, 0.32466258696417083, 0.8867591548506321, 0.534197850527223, 0.9690784000413339, 0.9970263433080558, 0.964408683609245, 0.6603730287619533, 0.6568436193126512, 0.5867900473944757, 0.4580239803485735, 0.39713907577775776, 0.26284276276283725, 0.15404312547494847, 0.30087928421701415, 0.27846858489161264, 0.6028792247824881, 0.08044156582855588, 0.7056677468645595, 0.5802086554061933, 0.4482464729028468, 0.45403290899783433, 0.9599966820011484, 0.6549768056744975, 0.5557066002150709, 0.09547794432147305, 0.05311208837612946, 0.2716009746385808, 0.5453482698754698, 0.4782073233278402, 0.3981612619860063, 0.8193924302825799, 0.7098046197309278, 0.6109107467935093, 0.8758432407526267, 0.0914314022485857, 0.1854603388830851, 0.10654767823285982, 0.5278623661759452, 0.7741123100075629, 0.11150017091604492, 0.34214387478440533, 0.707015866102185, 0.7552171829848745, 0.6939445838266439, 0.20403860404219765, 0.8265399751820237, 0.37658763747507706, 0.3224398186412283, 0.2383816334048906, 0.7013756831486916, 0.638238309465348, 0.9854321062802776, 0.13529535100500734, 0.8266123218787874, 0.8342155974746734, 0.5814996208572147, 0.3142878021795339, 0.7774674506085555, 0.8024993885718317, 0.2673943828433146, 0.41558415181974306, 0.20145235057725597, 0.06934083255693013, 0.47652976469904484, 0.006235609927141339, 0.637679286235198, 0.7091346130573684, 0.3991606997578656, 0.5869499744157783, 0.26668465404877495, 0.39367228731235926, 0.8750442091361377, 0.12464866067398439, 0.6753036668332404, 0.10900892907386683, 0.7625259725313387, 0.25177345052923006, 0.6892841205291551, 0.9327285667981486, 0.793514485602992, 0.19910864473790346, 0.7554410430783325, 0.052377825287903024], [0.31137480919263405, 0.6226377424685919, 0.8749670954771877, 0.78592022726606, 0.2344844898598707, 0.879473470777731, 0.5080989409346055, 0.42323940360929524, 0.3136259450755432, 0.1231088885949857, 0.028580643534441563, 0.4967787301863239, 0.5927483549676422, 0.054283455264466984, 0.63896995501571, 0.8647046223409477, 0.3407253668400374, 0.4077575337101439, 0.1409418166091927, 0.292432328858091, 0.41769020221804753, 0.0744617013692398, 0.4153631181653621, 0.0237097208360616, 0.7432570861516532, 0.22862701022799115, 0.3073095690955524, 0.5831242876445631, 0.7070142985878227, 0.13624072978535884, 0.4042267905806306, 0.5666812456316136, 0.36112315724886423, 0.06083228728736878, 0.9483910070444965, 0.8059658467046689, 0.6170681518313095, 0.24967689002277937, 0.49294403794594366, 0.7583449402151623, 0.6315445767659864, 0.5245873925649044, 0.17839555679964425, 0.28002444637025914, 0.519645062597835, 0.08415026209451104, 0.14419844330257958, 0.5820541756795268, 0.2072761875331698, 0.2688313872896446, 0.5029118447723182, 0.03414159281153595, 0.0907618217434919, 0.01586709354692828, 0.7251282744901322, 0.21118781857546431, 0.27696141361642435, 0.6272751017797898, 0.05502804091934854, 0.22792176572961254, 0.3679035899669688, 0.547337207063888, 0.08484254902536448, 0.45314675432864215, 0.30202399625346266, 0.005577969772632474, 0.8041258442027728, 0.2230724171680072, 0.22961991751908029, 0.8201451731184614, 0.09026872418780651, 0.041385266741023496, 0.8707670112493031, 0.2203238085369933, 0.9532610615285676, 0.8952545216622078, 0.9967169120764059, 0.2777972635628436, 0.4827659091141693, 0.23079207559658965, 0.3158216784700333, 0.9587555246509798, 0.8569314373848461, 0.5856030988772146, 0.8079382491034034, 0.03711060720656012, 0.5072650203072291, 0.5848690143180288, 0.2499150454315966], [0.4339808455941968, 0.350089642699117, 0.342799335713287, 0.655859242843662, 0.8710916758254631, 0.07407077863375877, 0.3523053724555736, 0.5105076226868375, 0.13619635640011163, 0.20629578532140502, 0.37114563290690505, 0.7323689560176843, 0.4841956549428511, 0.8616314606300992, 0.028984524766886177, 0.9984476508573245, 0.011753260879154404, 0.35774307236255376, 0.8093106714148124, 0.8539298271819595, 0.950718721885755, 0.005090945113746859, 0.35284499882357845, 0.48243333937680843, 0.5092304583063791, 0.2683430281975513, 0.7800588125270387, 0.7021390479938092, 0.8202790221492176, 0.7508111033968533, 0.6099097588195139, 0.6668718527037458, 0.36484286078530337, 0.1659237261156412, 0.3906089567372817, 0.3348425227232461, 0.8366565307514481, 0.02724295736859228, 0.9118425974423203, 0.023904939631345434, 0.8013366596788586, 0.668580231179745, 0.26845443528194546, 0.6016964874996759, 0.009092046711597357, 0.13872660889965083, 0.40421733412479766, 0.5822236917768133, 0.3481119991202013, 0.47976779916925605, 0.45605932510137015, 0.8195207079905796, 0.9070856756475777, 0.13506136842324978, 0.6244158927675381, 0.5974917545491538, 0.5650872455145792, 0.9477470964393672, 0.5124609996870103, 0.200914907858194, 0.7805965310892062, 0.7409284249660274, 0.3411516750172705, 0.8741558955960527, 0.36251060776843314, 0.8468571766138953, 0.38370845355492167, 0.19015016310395483, 0.35226235031244413, 0.39458781825001366, 0.11583413308338808, 0.047022600368743395, 0.9724865275903337, 0.4777173379643618, 0.41371535970921247, 0.4182004592221371, 0.7118780706482365, 0.3273556477462152, 0.4371514015442238, 0.7677019709419538, 0.9034686610898418, 0.9742005631079736, 0.4635296039542729, 0.7592758884373619, 0.0664095302519756, 0.07943643730982175, 0.3046229674643155, 0.5782451039415206, 0.48872146916453874], [0.5731277681743266, 0.9799944144909762, 0.748873969586653, 0.058841158244454905, 0.6015598371806125, 0.0512796530879851, 0.07256971229742049, 0.33905660861976405, 0.5830566221218539, 0.04588029001319538, 0.9328409004204281, 0.23173452772491465, 0.5699668009947322, 0.2807684352222337, 0.5059049964439954, 0.35733469255126293, 0.47701319456558056, 0.8726215538229094, 0.9819460973587776, 0.6587196029899671, 0.027712100784727967, 0.434346102480061, 0.9079742340303463, 0.9615672023026689, 0.43351588273817443, 0.7555766307486304, 0.6365388961328707, 0.05967293973591792, 0.8542446078647888, 0.7155663138785128, 0.4222379954619181, 0.009415610382688122, 0.5513385078214544, 0.20233166399823022, 0.4794855363374153, 0.9640752645468916, 0.6764578771275013, 0.9664800320491893, 0.014592370150111611, 0.9479162667109047, 0.4509543119875138, 0.5491135801901043, 0.04737011706069616, 0.7130429300193906, 0.3506200040424361, 0.4686625386536115, 0.548001298402958, 0.9455588031915649, 0.26294508255537064, 0.6576703620272911, 0.9834287218013543, 0.42629725619210823, 0.8499283691724154, 0.08695690043738935, 0.7069034203818694, 0.6577486482116758, 0.9583550318000763, 0.1060335795872076, 0.2682898160549685, 0.5823577688373937, 0.357150183943173, 0.012479613476363505, 0.7245810288632574, 0.6627951004702015, 0.000778608505367484, 0.3986804366043045, 0.8492326534831751, 0.0674089409648908, 0.397876209050143, 0.9228610512854366, 0.4204814460712032, 0.007051435849977694, 0.6848576022758677, 0.263065673022412, 0.6152952264017657, 0.7744020796574602, 0.7886148048733611, 0.9813751069059203, 0.2644883199699424, 0.7645109099338296, 0.7932997399842986, 0.12010107429161487, 0.24226199019569827, 0.5023309931031, 0.027839122786633808, 0.2365143324703345, 0.1399435145675323, 0.45673511520636556, 0.11526658284787927], [0.024782007687611185, 0.5949395280089175, 0.0818697461825394, 0.26029461628156747, 0.1630758446228543, 0.017048169321333573, 0.8132674895603739, 0.6078368426242051, 0.6390644970000111, 0.577961085945345, 0.9680179760837857, 0.1694074944516315, 0.9593132243477316, 0.44725855925103364, 0.6462659089621571, 0.9899763775930824, 0.9052905840592265, 0.7986329342946072, 0.7359399387665242, 0.19470501347904434, 0.8135617711303548, 0.2744665219488065, 0.38627136610966817, 0.19712845371078103, 0.9970295536868102, 0.590402807132197, 0.17224073400406803, 0.6380728375254797, 0.28459915983496065, 0.6310252669089027, 0.8437600665381695, 0.004814081883608989, 0.4616274090251813, 0.24914854090743666, 0.10109050348291848, 0.7194238710654072, 0.3515917256159976, 0.9231167649216641, 0.9187596617879966, 0.8429956023859805, 0.1961422591428068, 0.12557003468933536, 0.5426202586927066, 0.22385945628140358, 0.5164952231690545, 0.5658554269055253, 0.7059381229760436, 0.713058608897446, 0.41804030931662917, 0.9790418145254527, 0.283408876237095, 0.35296025297504496, 0.4730000558252785, 0.5402880656232539, 0.6557231737146768, 0.14261627815054256, 0.9050567578288762, 0.15719409174053633, 0.09642534538180925, 0.4328883897402568, 0.4421051949050583, 0.03025910208721394, 0.14064200393139736, 0.36925998651826275, 0.0036815961072517167, 0.7372277979844685, 0.6847014075276082, 0.532302131709902, 0.425970632508215, 0.07519870045988186, 0.9604442393233819, 0.4328543192029455, 0.372409674062099, 0.9098335878017744, 0.6843792157200405, 0.4678150813940455, 0.6775729744306439, 0.2465710104060438, 0.12800709217931594, 0.09821685287165716, 0.9904613204720981, 0.9250952410652252, 0.8142895002420386, 0.059705828754975876, 0.0686543864531255, 0.25326579113361136, 0.22143000345416664, 0.027244568753273746, 0.4437288709165945], [0.9910444876140012, 0.13593179668730737, 0.7697952839832312, 0.8163855225553633, 0.7955281081814463, 0.9304636231971082, 0.7309945875491135, 0.5372521864476734, 0.7042188318548507, 0.9978434051612891, 0.8807804598788855, 0.7845050507620499, 0.7769829772913288, 0.20283506700065146, 0.32466340420171313, 0.2701183037061674, 0.7134203091673187, 0.6835226695619995, 0.4532133934712418, 0.8908989582115157, 0.0276176546895176, 0.6911339034532809, 0.3303772050756265, 0.5007622018730625, 0.9244235593852732, 0.45311153829774264, 0.21569143803188828, 0.8740766973065061, 0.6547323018070471, 0.9440903398389767, 0.3444751685247329, 0.4139836466751501, 0.4054536300286231, 0.825291183080295, 0.32515629288028713, 0.10515331231685088, 0.3070561389704871, 0.274370734265432, 0.014721968909487404, 0.565290425837733, 0.04991492145138676, 0.5630188912790951, 0.2596956620683212, 0.12064350259528689, 0.9854733434343769, 0.6966427298259159, 0.19793473381269167, 0.8394334344265384, 0.8436385641135575, 0.8994651130207748, 0.9713213591372538, 0.6298121472100827, 0.656644064915045, 0.8817439227429119, 0.029810242479515248, 0.29006221581699065, 0.7199632795167191, 0.6871453118420856, 0.2230831974947486, 0.7807872252374943, 0.015495117338736764, 0.10637825983364335, 0.6570512764372828, 0.706648882473201, 0.48589541681995574, 0.9758648278751433, 0.3370423757587161, 0.05856262454959549, 0.3069536391092561, 0.9117527499170854, 0.5298452632351212, 0.38469592138890873, 0.49531149425069865, 0.314120442664649, 0.8720918507369113, 0.17772630584114957, 0.7217356220825568, 0.6636944702393319, 0.14877940881577945, 0.9226744304585768, 0.32294793352742723, 0.7993344272813354, 0.24149438710762905, 0.7005346766526559, 0.22178606508554144, 0.5872236459899303, 0.7429354164950133, 0.876653509029902, 0.4396629426746498], [0.7977610458325066, 0.47475304498270576, 0.680447210885485, 0.8347886246750696, 0.5412116986482808, 0.7339284080358889, 0.7168697103658885, 0.009126683957614845, 0.6522489102475107, 0.8163950784450958, 0.6509981619380985, 0.06901144772210754, 0.26638839415417126, 0.33475225889512783, 0.042317564815807285, 0.07243963168521728, 0.11317231658809668, 0.7309484113499586, 0.03503981140728307, 0.17346910461092813, 0.6851061747222975, 0.14582922464729886, 0.591489968772159, 0.7663305910483013, 0.3344230003155617, 0.9186605187517585, 0.7004517793925138, 0.7311394129479714, 0.29644529498998373, 0.5504535587599276, 0.400508657220784, 0.4068464398175049, 0.6438751428805257, 0.7068022935750758, 0.6637134641887413, 0.24755422335661437, 0.6320880048275163, 0.26053526785220515, 0.553218503149715, 0.819285392920947, 0.8074908333488258, 0.24287251322910297, 0.6900971219228119, 0.8536475976869048, 0.9949584781977272, 0.12740923049659902, 0.48886593317633686, 0.05865779411494643, 0.6059995451522792, 0.25052098858960603, 0.14027406540807263, 0.2885239041326142, 0.41539101861673033, 0.5980730722158051, 0.7160130222561625, 0.5740809453179908, 0.20542535226662295, 0.7312877694990018, 0.01954044709234648, 0.10901041610122197, 0.05898419837097746, 0.7360737729035404, 0.45400133337738524, 0.24582177759120494, 0.32329043994069373, 0.4617174137806509, 0.7499069442797278, 0.9465863295755628, 0.8397552624905145, 0.46897383146674454, 0.06536223552938158, 0.5294882343157632, 0.9994073125560144, 0.9018497710017166, 0.5245845024019926, 0.5204141844400172, 0.7313434193484138, 0.9034736258063991, 0.34934193688246307, 0.28066362353661367, 0.18773564862247794, 0.4032660033660175, 0.6863725649458481, 0.7910161292768558, 0.25197546036114815, 0.8833805036109578, 0.699131141549144, 0.36749815693212406, 0.3106705146246437], [0.7555276209019475, 0.5533269935759182, 0.10869197755793336, 0.8195546590278455, 0.7629636895766898, 0.6975034546421137, 0.6657915205525372, 0.3432403958249569, 0.682773184439969, 0.3095731440984545, 0.7873836430944589, 0.5864329994364916, 0.7893866653662471, 0.4317935861928004, 0.3965118298874031, 0.7010427797916987, 0.037226313030488956, 0.7642101262551741, 0.3384904209018982, 0.2703962259497106, 0.9128561985839772, 0.8748066568396454, 0.22143905167093503, 0.09774359454998738, 0.041735479926022, 0.9509843493499023, 0.5078612890837672, 0.15543630775860906, 0.9980207547886256, 0.6176485960018642, 0.5295240636741426, 0.6540229951851204, 0.3448779955529131, 0.3659978870506819, 0.3614810481736257, 0.6145075986782208, 0.9878837626795582, 0.5212454968977848, 0.6869709461021724, 0.5111080598259617, 0.13042618326689304, 0.4708432688479882, 0.7617905753734999, 0.8337193503916859, 0.06572483315106958, 0.23238254191101437, 0.21337041625938258, 0.09127856537856327, 0.761151321036068, 0.7454935414307755, 0.8598316992378116, 0.2332711236897994, 0.7521432137474063, 0.11873029444194505, 0.4403983784439425, 0.1935548212852044, 0.6358250581882386, 0.8693274207576848, 0.5951071479273656, 0.5285747186821996, 0.24124524583343487, 0.04642334617212451, 0.9844625949983071, 0.6839073743130715, 0.7024298659986564, 0.13085382870087914, 0.4580130522772162, 0.10858824613936913, 0.3637484052461447, 0.09743332375220937, 0.5434007843560033, 0.8483616628279441, 0.3154936398819359, 0.2448692990185285, 0.2742100884484058, 0.8763280112608726, 0.2108909473730567, 0.06044523115342493, 0.2274932700100456, 0.7437304376803173, 0.1145190604531553, 0.9022365066691949, 0.05286797824417211, 0.41289008502670554, 0.8280298664518734, 0.6294411858554857, 0.41714844771966597, 0.8780000749838247, 0.6782351259037342], [0.7986718122079719, 0.6700682534682193, 0.26401522461370475, 0.8504863000014167, 0.8532284653967979, 0.9465742706996321, 0.5374357240268072, 0.17467573103653888, 0.03285860731881851, 0.9743980617527356, 0.013247742163721266, 0.595400851665467, 0.8737040491023218, 0.5684350958254173, 0.4475984088729619, 0.5529560890253833, 0.4754664422649635, 0.4353469396198515, 0.3792046188465239, 0.9119829620958267, 0.8839842176810467, 0.07100054977676018, 0.3319286334309399, 0.14002215286774022, 0.6904803544188934, 0.8479205731600423, 0.8067022236025868, 0.6986556593662497, 0.7787549429756222, 0.4160408805835073, 0.8571319341419279, 0.5085108423771417, 0.7845983044705868, 0.5870480169251879, 0.49486963147196805, 0.7573856912287966, 0.424147248264367, 0.28499097620884195, 0.41118148477344385, 0.5974072026032421, 0.0028679773460196234, 0.8045735646346852, 0.9254609017790706, 0.3321269880054323, 0.5316160961515112, 0.8475412492003771, 0.29855342105361315, 0.9346509920388903, 0.787896296849044, 0.12287935406029538, 0.7111035974997437, 0.4741475864563143, 0.4818352341337243, 0.41885781088897645, 0.5175255472771408, 0.5258498627919934, 0.9386030533388483, 0.42509726717630136, 0.37042795941895656, 0.20783631622037346, 0.013813081680840278, 0.724776319433286, 0.1713552673610491, 0.9552921104550114, 0.8519169603110456, 0.4381445911835631, 0.5617843783230814, 0.7470085840958922, 0.9066079173735384, 0.30371356792861537, 0.21586917145137696, 0.13341580796701813, 0.7253572578941556, 0.49568331651878783, 0.31233733675256703, 0.17583428692630032, 0.72386205378527, 0.27102558104587704, 0.7000120899735304, 0.4504528627160662, 0.10224349428822166, 0.05463518546454238, 0.5087088219054562, 0.12232853679751976, 0.6242083831566766, 0.09142132659423785, 0.6112203692585263, 0.7531213597829778, 0.8471727009785444], [0.9732444743207518, 0.9224237738009133, 0.261920937670558, 0.7832058607159472, 0.6973833257811934, 0.34400555300699065, 0.5619992179656218, 0.7516339155771612, 0.7320216900984313, 0.1800546823834661, 0.7778938245152588, 0.5422787800075112, 0.206501012942649, 0.614668625529387, 0.9799164886889162, 0.02695582249206918, 0.07585354864663851, 0.07148624641009149, 0.5282873015601135, 0.2099055048714339, 0.5506832127266764, 0.32238407771123356, 0.11875995711622578, 0.06238260779169591, 0.7115592544072796, 0.2876780332161172, 0.8700892087191799, 0.23816164489799874, 0.2681494077864066, 0.15243238588038355, 0.5911164873659775, 0.2537334851496905, 0.33493508610240863, 0.5133174827828298, 0.4082510451875432, 0.8115577928621721, 0.3721791366755276, 0.03745838680659508, 0.6136229924808483, 0.16065283611784842, 0.014447471390863553, 0.13003958567427143, 0.5712032893030634, 0.35867955051605327, 0.9373382650989762, 0.22214021583416954, 0.8713758017966349, 0.8108167736917421, 0.9170002743782854, 0.15995152281783886, 0.9777703808009217, 0.5788722384220256, 0.343744599131073, 0.31358211798497393, 0.471006187094823, 0.6967674046025036, 0.21709833853626714, 0.37958326113245844, 0.2047527860942322, 0.5632783726023051, 0.6519091774139574, 0.2988240463904457, 0.49344362863659874, 0.05579964499846368, 0.8587057716310517, 0.4584678876628936, 0.11071031087526473, 0.2839183315251592, 0.5986452740398926, 0.3683296899318067, 0.9263837644113403, 0.8681374344805772, 0.7340997531384368, 0.08883548087464099, 0.9985364594784177, 0.9951967488783371, 0.23042528318775013, 0.07284975530150561, 0.5889081965863264, 0.37926621986773223, 0.7140251233478645, 0.4760054036188244, 0.4802380936249522, 0.8245098435587257, 0.6339339429918819, 0.7087571731033078, 0.9269963185560959, 0.526575081480813, 0.5967509612468758], [0.7259011083750604, 0.14142260880200896, 0.9212295187955757, 0.927138927490917, 0.5679986319143668, 0.14529755035966085, 0.8862800364966736, 0.1767005205823461, 0.26960302848528495, 0.08589169121794904, 0.596376672917052, 0.5310048117340398, 0.8167614576913077, 0.49803711420549146, 0.6199323207395718, 0.24813313349518795, 0.5811330652880882, 0.8429672784481768, 0.5356994089928074, 0.8320998402049422, 0.4368022244503078, 0.8211227888056873, 0.8641626355830726, 0.2024329481498286, 0.13802323262671878, 0.08551649142193374, 0.9977620850763886, 0.60517384833988, 0.7648018547125578, 0.5893075670602161, 0.17263529228742824, 0.32274994838508064, 0.4494493129755489, 0.2599161601819382, 0.5816169550055462, 0.7278569739333888, 0.11805347511914843, 0.3183833451508673, 0.7918769608988162, 0.8885706046734833, 0.7512861481849321, 0.4804720796243783, 0.8835720982117782, 0.4358803770188515, 0.43121808174412335, 0.3816083899724969, 0.822125666197932, 0.1862385793700827, 0.1539291721278946, 0.2554267101706855, 0.46243339241689563, 0.0032650907833018383, 0.5048201805756077, 0.9690891004793267, 0.2588916679019506, 0.08860370557976238, 0.879743336650591, 0.8242238754778852, 0.18534740528945415, 0.9728182968346787, 0.5473217644412818, 0.6905931381641687, 0.41990744347910003, 0.08093377733167051, 0.11327992400037923, 0.9565820346498779, 0.14912100265235084, 0.7774233850125017, 0.7047689472032331, 0.8511664966617567, 0.41242920264888816, 0.07246816388853128, 0.3113062455078681, 0.8430507719747429, 0.7118667520658277, 0.8999255070046422, 0.93033521566686, 0.5795233756611039, 0.6980334305831162, 0.7422812630001493, 0.7949701770508627, 0.09395236897040771, 0.4854087645430645, 0.5793117621109821, 0.505004563008032, 0.514107415222552, 0.21029584832520876, 0.05943245887063464, 0.13249518225694124], [0.592813956008291, 0.10900856349765908, 0.8005737339444575, 0.5205964574265699, 0.6330419756636962, 0.32792442071454686, 0.25232959759173335, 0.7590947165703863, 0.5279208561513478, 0.3564805654369887, 0.1963017025777306, 0.17523583173502866, 0.6814389720862352, 0.9945404950133735, 0.8360450348622938, 0.5252422321285094, 0.9114019296665568, 0.7368502992201783, 0.6313221650415253, 0.6059894738535816, 0.323117010473601, 0.18291883971672918, 0.8396911181004679, 0.6428026339211409, 0.06739046598256082, 0.37737072096717605, 0.06885879814007057, 0.009776457723259302, 0.8338688663222052, 0.9670323635299283, 0.8336436104582186, 0.22776291648696778, 0.5272775846878, 0.042315143643868125, 0.7955596785597624, 0.5578445189468235, 0.10185776832199311, 0.29109834199502216, 0.7958080410676549, 0.16292634355949798, 0.6311917016884748, 0.4425134580630309, 0.9063810775909102, 0.8607853661837835, 0.8795074678247751, 0.3095488755401077, 0.9202861587797205, 0.7197092706421101, 0.17070675767535626, 0.5760325289568969, 0.39219541929895085, 0.6989545652694198, 0.1797539675708475, 0.38605846852174885, 0.855774475528614, 0.1785721922166853, 0.9674341225260454, 0.06230512226460383, 0.17733926361320562, 0.19196914979553525, 0.500207000204239, 0.6245846033436976, 0.7900037538757256, 0.9441741313183324, 0.9859457483080861, 0.7457553666175105, 0.2943112477769777, 0.6193249516544136, 0.7862715764070405, 0.6800906213548182, 0.43605223517363667, 0.06124238398205839, 0.45598475233141844, 0.03665540399640976, 0.8516700129319256, 0.21458300549484732, 0.47105982075269115, 0.6666357886372191, 0.47624451440262106, 0.825406794070691, 0.7077513600009059, 0.05061325729809818, 0.6195822273242008, 0.2870961378321283, 0.5019149565799935, 0.7346725203989362, 0.5494122845743514, 0.06637488087190213, 0.10403804685531459], [0.3306457981169134, 0.7558519253439727, 0.9830273707308532, 0.09399347469372776, 0.6886272834195672, 0.6842506102044058, 0.3614299297483491, 0.6447931510144744, 0.1303533407609947, 0.6667708025439109, 0.44572319036600694, 0.9219636555508793, 0.19687686959653694, 0.7836916391447601, 0.5125566576267843, 0.04243254199013746, 0.6464107749083321, 0.851571743584667, 0.6345978788015394, 0.6409319692752078, 0.6054725751563781, 0.7412194838765694, 0.06739526317777234, 0.37042133251922693, 0.4528076892576135, 0.6063410419744251, 0.5621973509249397, 0.9747684845024488, 0.9414575659120928, 0.9504502913139968, 0.5500225856968127, 0.34622378063737536, 0.007681620737153616, 0.6039285446572789, 0.6880744372006857, 0.2506272297640214, 0.611513271448149, 0.5784146132449681, 0.43282293490048096, 0.8604151317254067, 0.8649338009108107, 0.8776447849087533, 0.027441404621110665, 0.038835745378461684, 0.821725599174164, 0.03935076521215797, 0.6681288300094825, 0.337446294260354, 0.26461995927333626, 0.925969689379439, 0.3850399659408871, 0.35651018777569143, 0.24138278259397694, 0.3509304890567718, 0.6264988122455284, 0.32114111028105685, 0.08996236398005097, 0.332590858020798, 0.07603955374955584, 0.736942490682193, 0.42216740802260233, 0.20967675496558835, 0.2106415596978084, 0.714928853253648, 0.3731007056707015, 0.3735126392738486, 0.1254893487926021, 0.9709501161539615, 0.04234567099258191, 0.37451193588550125, 0.02104349327860011, 0.9570852852202157, 0.34668231570410313, 0.46217765450223847, 0.46462057216149355, 0.6561843150624905, 0.9822323976357247, 0.7602513165374623, 0.22232286742986163, 0.26883074514592986, 0.7592084461728145, 0.6572566988145008, 0.565491485819599, 0.9386098521797211, 0.8678354093776668, 0.7020423908865847, 0.8309198525532474, 0.7876354978882807, 0.3957417149188891], [0.9459264204448119, 0.8616156720595031, 0.6386716365681767, 0.9201986748667063, 0.20203758630159574, 0.2420791868914266, 0.731224556821161, 0.060849754966268765, 0.0509526307921353, 0.8624131891320718, 0.821112600717831, 0.7333423542473579, 0.6730200538067841, 0.3757307233821179, 0.977703907605466, 0.9719374736604255, 0.5032502999295444, 0.39864856639225865, 0.6197508878291993, 0.02969192986080449, 0.6319661033966084, 0.9753755890575261, 0.8179508548861547, 0.0286585850337997, 0.32902705020832623, 0.28182256449210197, 0.7637771097113524, 0.10611648274031438, 0.9666600796589382, 0.8716358968303786, 0.027337550772313368, 0.8614472004551547, 0.05902538069001351, 0.3987608640371113, 0.6190013670000991, 0.3066206230521502, 0.021452714596081224, 0.11792656695458958, 0.8429685171307635, 0.7604499721526559, 0.4425010107657058, 0.9552357034650683, 0.6282477772809734, 0.7873772900067624, 0.41626530605690126, 0.2954731465878987, 0.31571007418101893, 0.08187726838548282, 0.1395383864441292, 0.6883738596662757, 0.9033071081582882, 0.27647477348560345, 0.04507869853748103, 0.7329365696386304, 0.7419902022296786, 0.6612147529649649, 0.4802491651879548, 0.7032274225767543, 0.015397204307988632, 0.7471084505817588, 0.1710095022779865, 0.8119396236600525, 0.3495678445361313, 0.7952012262473598, 0.24274281835850087, 0.01381252563935731, 0.29442056122928784, 0.874713122069753, 0.9025729425739412, 0.006061728669588318, 0.5329429445950915, 0.022641306077631707, 0.9903882269493299, 0.1425692961122983, 0.45302432003257775, 0.7224994099898124, 0.9750592228970606, 0.7780706687706046, 0.30258898088054165, 0.9006309000632154, 0.0025399620605089934, 0.31779024361888475, 0.5224062452890609, 0.6164963121376917, 0.5112144273868257, 0.07246311999371546, 0.9877126552603654, 0.21042297544298272, 0.6679956130917062], [0.22796197474444502, 0.9938810751612469, 0.2065664309618993, 0.3180708066648015, 0.8355265638464344, 0.023017168901470764, 0.1299275790721809, 0.8564551833029246, 0.9651642569277536, 0.08446728967963524, 0.043075542427086, 0.4325935089651376, 0.22252407702311516, 0.30389516233007197, 0.23414548431366755, 0.24014734696184292, 0.7821791200052538, 0.5463448895440027, 0.6731483754849713, 0.29537638541117506, 0.25063897819419345, 0.4503251443319968, 0.37964948919901953, 0.7070843519361155, 0.7130215335117043, 0.32852639313611687, 0.6357453528983406, 0.23162987286571102, 0.7717389006585811, 0.15295483451142444, 0.698559647576509, 0.45814009391316246, 0.5564025350935493, 0.4485136559752184, 0.19164735969673852, 0.357994810116924, 0.5487501280217874, 0.576785379306412, 0.4772561193196091, 0.5180346038230909, 0.7307184417302317, 0.5542227851692234, 0.8736540982857796, 0.13913873649267117, 0.1849189010369099, 0.06225459384356846, 0.12846111743677147, 0.026848144779398897, 0.8657176615351285, 0.5131893761802674, 0.39192055914430535, 0.8474511151293586, 0.5377005003787905, 0.52545627536694, 0.6211990418111789, 0.7608427174312107, 0.05189038136625235, 0.0423807569375958, 0.33650657443045395, 0.43125929151539455, 0.97955821472083, 0.16867276633178652, 0.4560861923296853, 0.7974458299985934, 0.27291850999953726, 0.9056870322171681, 0.3637012659390576, 0.6342653744378496, 0.41430928636723985, 0.58541258288383, 0.8901374499874871, 0.9987442443818566, 0.7537336474167129, 0.5962813010171235, 0.4979996366750632, 0.6567301544560625, 0.8700852622255534, 0.34579108685930915, 0.8888005150018261, 0.035910829138393385, 0.09680626453295971, 0.35900461639376147, 0.43759352977094956, 0.5942399926117719, 0.9546866902350349, 0.41516610729899606, 0.11188231881141131, 0.43235374053255116, 0.8657826911369555], [0.2910503726971375, 0.6408860752521527, 0.42442270860366293, 0.20702892468025558, 0.7922677587325105, 0.10808437578744667, 0.07690471770452789, 0.4931047617904494, 0.6879164216859053, 0.8690524217524459, 0.2611194007316321, 0.7843519477958426, 0.36414307532270385, 0.9924242442592466, 0.22779829330175283, 0.21860929393293205, 0.007349380091883462, 0.11045326944115041, 0.07240525701278089, 0.8922794838287037, 0.7693344273177735, 0.0018861055168551966, 0.4399218776040732, 0.24939193154413763, 0.6270155917143814, 0.7111746558801708, 0.2093686510075502, 0.9549654441768411, 0.340041859701521, 0.9478671712971668, 0.45744749043566213, 0.21687050111638984, 0.06431031565264744, 0.08463017445204646, 0.6656796122461592, 0.26965687757096046, 0.3741040764928518, 0.676908458867534, 0.302891376997106, 0.1421135458063022, 0.984961793254127, 0.19183601870247258, 0.19578433150599506, 0.9916964411711611, 0.3113542830354191, 0.7039202643141599, 0.48945248047644974, 0.2575376688899149, 0.35821434047796974, 0.9089453166546443, 0.07118710434702313, 0.2468065243821036, 0.6223067345081164, 0.8006178389492656, 0.2985227787273802, 0.12815932367906258, 0.003160932161117347, 0.6337457073440476, 0.5998362615788793, 0.9433524470448524, 0.005791436404514738, 0.31741686697482785, 0.5308712272544037, 0.49638360834026574, 0.9445919372079514, 0.799144101051607, 0.723397203759775, 0.974411160148471, 0.8541409615936101, 0.4686661580082798, 0.6563403032506117, 0.8514674677738044, 0.06199569839896779, 0.7026446491132965, 0.47134941641429007, 0.43508559819875003, 0.4956443774360062, 0.41260549092923293, 0.36294123238023857, 0.7760476527229221, 0.7204459290755828, 0.9983000215737238, 0.3406407832500521, 0.09556301626398989, 0.8430806935175711, 0.8282329762301891, 0.34661436478803676, 0.7787190364049786, 0.3694438255012802], [0.6368418806173609, 0.8177845401421623, 0.00696396398037058, 0.4387967955430777, 0.4181039174099809, 0.006932288182362023, 0.2617151770013456, 0.8405162870664785, 0.8131120053466552, 0.9809672257669408, 0.4298696225913381, 0.5928304454986566, 0.021998814290265734, 0.42316418606568407, 0.11272337802262611, 0.6425648088261647, 0.14478476677058938, 0.9930963171365207, 0.6062284900012627, 0.4659808456966913, 0.742723190386684, 0.6497474312513434, 0.07172176837921307, 0.9344111455913541, 0.06724447663906896, 0.18759000610924947, 0.7908252605376686, 0.7326995985766116, 0.4228416133588264, 0.4694736994899924, 0.5422131846211089, 0.8027776682587393, 0.4111440105806121, 0.15863733775229916, 0.47142842510471583, 0.20670899809431786, 0.8486132626810363, 0.1893380771198735, 0.3568032191631285, 0.6637292663316005, 0.9561015086148933, 0.7682545704622837, 0.27439280371020436, 0.32006866825050695, 0.25236702276403256, 0.238820180406617, 0.37812888509405795, 0.32019541701015386, 0.3794253359240811, 0.13182702669444513, 0.5741482103580362, 0.2832302481905721, 0.16439756032401476, 0.8009984531907556, 0.6084865001575482, 0.49949524382720045, 0.517542697841107, 0.21092801793481442, 0.7461756025079589, 0.9025428641818922, 0.1716023681138087, 0.3054673296329041, 0.3889148847021442, 0.9394138794996211, 0.28368343401416896, 0.15021895814382846, 0.059348369793633005, 0.3197094673458729, 0.8777182466540803, 0.2095171436202551, 0.2977002033391146, 0.9759516493132913, 0.9376230779380027, 0.33731167344952406, 0.8178776663428357, 0.21908506828949414, 0.6078514591302322, 0.9684721209795791, 0.7232110346359623, 0.17587541046931554, 0.13066843437685483, 0.9876219250834961, 0.1625088320974295, 0.8073275576781461, 0.4555401684658321, 0.064958212364566, 0.3134874093749165, 0.7958812633800265, 0.6737444271628701], [0.4527819111541086, 0.8715757623955432, 0.5159106037413833, 0.8272350823750324, 0.30387357080764477, 0.25653996430078096, 0.960287319043134, 0.09398385311021518, 0.12890321485863832, 0.07597093054596649, 0.2804010105117274, 0.12885503475260185, 0.4537848598680708, 0.999840572653075, 0.9606361671415681, 0.4454039015518392, 0.3181098010381007, 0.5915428556554538, 0.5459181520460291, 0.3550393302577878, 0.8172075597229305, 0.48926530399142687, 0.560610408572006, 0.2863530099159497, 0.25286710210709107, 0.6474157437742017, 0.6917187435459505, 0.06303805991310862, 0.004569949049430533, 0.6236511892489472, 0.9524736977662994, 0.353976966104972, 0.10615165684029404, 0.758399818837753, 0.7846585038696656, 0.13944895713622174, 0.48749203036431776, 0.4935777486866021, 0.829671545795688, 0.17131935892958639, 0.2839727971988285, 0.5444818500642041, 0.9225589049232495, 0.26081969864176346, 0.0611584819003651, 0.35162957555654006, 0.436724479776446, 0.24760364465314033, 0.8560939513288465, 0.37383035649746477, 0.17109395320868392, 0.9652133911401589, 0.6141187160535398, 0.2132162656275951, 0.3556395046859532, 0.4380135111763962, 0.6584722443966091, 0.3507395725334682, 0.48866004027326426, 0.9490540111052245, 0.09073466210906966, 0.20192360569448642, 0.7786236245083727, 0.022275735207445413, 0.4971688595937013, 0.520128417095031, 0.7520092335325312, 0.6553413231037476, 0.3194690599045086, 0.39168742353568375, 0.3499887992297879, 0.9446757091077005, 0.06681255443641376, 0.6443102290957397, 0.5266194766341105, 0.9909359306891188, 0.7002847254990655, 0.25620485792381464, 0.4070466704876141, 0.30561587275739677, 0.32051776569641466, 0.999773251065679, 0.294439597181409, 0.32115811989388876, 0.8120594391534289, 0.45975176414208474, 0.2614575095851869, 0.11989691589229434, 0.7104142596155735], [0.21060764110186547, 0.7415831608602376, 0.2853450778780684, 0.6210213030446752, 0.18478986444700485, 0.3783691022527913, 0.6646637867459618, 0.8672212819794209, 0.29706874096516034, 0.18451577785544415, 0.4392504592901799, 0.8040860379802636, 0.916416093500695, 0.09410261725681102, 0.07678502283485622, 0.43783582036637847, 0.6190397570924363, 0.01554446944239296, 0.39526619648428285, 0.793778027994534, 0.43819231427812977, 0.5212494351863272, 0.5451162295258376, 0.8011654764232152, 0.8569829314068946, 0.44019990863866876, 0.3847472806713307, 0.6419221688663757, 0.9634918645892001, 0.4827952847898147, 0.8969930520379044, 0.23010012024050586, 0.5122774858721572, 0.3224244410688405, 0.6845642722428802, 0.7377386298013913, 0.6819611344668856, 0.29926010932961855, 0.34412869975812554, 0.8965946594202727, 0.2619922815242489, 0.7263209443296339, 0.6524802904944095, 0.398880334207773, 0.17317081159810555, 0.851310001979001, 0.5034783342076603, 0.42036377309085526, 0.83657689738968, 0.5834920069552141, 0.5666896281460503, 0.4080471136239736, 0.6187912947881546, 0.8688025439931042, 0.07726416255629476, 0.12378844446471671, 0.6279893235410852, 0.6909204116341784, 0.6017845783634144, 0.2037546019060852, 0.1509967660681245, 0.8863604940692985, 0.3574005405867172, 0.14749643983166927, 0.28163553423320464, 0.28636747825352205, 0.6466468835037997, 0.5149129027831048, 0.8050709398353444, 0.22987455554952574, 0.5228295676364006, 0.3460335642922151, 0.41640896938703653, 0.5306446181066766, 0.13011388791284906, 0.7770395412639131, 0.6365319881494483, 0.23507458221864075, 0.44936200547504646, 0.724275270742083, 0.9837593159722923, 0.5573713456303401, 0.057628582223284375, 0.6699177789891936, 0.20554474377213405, 0.37624534941279575, 0.79807447827325, 0.21218673646863384, 0.21819263716038861], [0.03897265403220185, 0.21837339331630878, 0.05743071063016192, 0.8486905283031274, 0.7540911291500133, 0.6312002353257942, 0.877286497071858, 0.45360060543446934, 0.8300371007699713, 0.8378465772187004, 0.5373160696173089, 0.7825561665571132, 0.14234457427295633, 0.9351834049982952, 0.17261899447197793, 0.43283647918926915, 0.08311848929224575, 0.5246522031774474, 0.06177199219873841, 0.27163921490738996, 0.4594812031286738, 0.2738369112101098, 0.44438613953567707, 0.3863751094326945, 0.9854853486663929, 0.252868881541247, 0.6930137130714704, 0.9996536592023392, 0.7215651772334943, 0.08755039557267141, 0.8989159251411527, 0.3018894149898663, 0.02167422499427829, 0.24487480023373176, 0.020754038029450195, 0.37683373167687206, 0.5736047501334764, 0.39830851209990326, 0.01876525645812388, 0.4082245122366406, 0.6642033521495321, 0.12414618095219165, 0.5632547207340673, 0.8338796332805194, 0.7411245677234046, 0.9801677744757704, 0.5063729308456013, 0.06167367540400892, 0.14844419810276555, 0.5925530228807603, 0.8149923858953618, 0.4184830796325928, 0.6322888800709894, 0.9944057508979397, 0.8059951104932292, 0.15442113154909043, 0.4197311279090594, 0.1530599538620121, 0.17205193026920762, 0.02076570194186733, 0.0668791677369609, 0.7287764052430625, 0.5950408013103938, 0.1509620645269304, 0.653247449898774, 0.25466870801019437, 0.20752088266429147, 0.32324470226571844, 0.3906636613340726, 0.8218240487077931, 0.8813081474566011, 0.14652066893442728, 0.061210224052202444, 0.7189162414259302, 0.7703488392683, 0.19155079277561116, 0.8824721137727224, 0.6100442021098781, 0.12260311253191747, 0.20386968031168318, 0.44880002788766127, 0.4667368563755401, 0.0336662943825522, 0.43390355522238067, 0.9768183458235397, 0.42638917478245697, 0.911662019832323, 0.19216997042663164, 0.173769849413564], [0.9335605563242012, 0.6598116868014728, 0.8721353566036596, 0.6253024485732454, 0.5055517186930002, 0.1442117474942175, 0.430735642303923, 0.4020867805655749, 0.7914444628006547, 0.18504903809768014, 0.32239387497736793, 0.8013324856361865, 0.17479888518602116, 0.5853084096312409, 0.2794471757642931, 0.004425974898687013, 0.5634024212624583, 0.4670819218793518, 0.19375839210263957, 0.1391399403998601, 0.8808472851079598, 0.02638924416989763, 0.38585228732683274, 0.5782782800238279, 0.012228722589827767, 0.04668735420525838, 0.07062423102770865, 0.3789472315955198, 0.7507877894765567, 0.2141391643730799, 0.44921082837287296, 0.43971807748742975, 0.6802827701751664, 0.22329878505503764, 0.6174624520500084, 0.7612134483894734, 0.7997215566005024, 0.25662141951145767, 0.8887899521856379, 0.5066158698970209, 0.7468208449841978, 0.706768812429827, 0.5910478329139676, 0.5056204247927089, 0.471466078717234, 0.6026486025258868, 0.6746795327641194, 0.7978597177677198, 0.46366936756852184, 0.5708294473362321, 0.1745150981282787, 0.9747973934980959, 0.8621707911546693, 0.6093439657383446, 0.42093462479241195, 0.8696373789475678, 0.8118749923563103, 0.815491874555964, 0.7986199022400321, 0.18398286112329598, 0.48512773645676466, 0.11681632768509032, 0.4471988473684836, 0.587106232097867, 0.8949148055021465, 0.5846911867331699, 0.2685114734064511, 0.6981001580073379, 0.5866039620137343, 0.07473819557986872, 0.586567475508251, 0.6443244287060016, 0.7505759790808784, 0.13472756206995484, 0.5886558668629618, 0.18238959203783744, 0.476890884139228, 0.5604077554650705, 0.3498494911389153, 0.20788986781414043, 0.8431218991153971, 0.08472203612897089, 0.22490007627286968, 0.5097159118786063, 0.9878557535934923, 0.5395514798847911, 0.4321036127760305, 0.47364026251464253, 0.20331273101267833], [0.008059794056416214, 0.2689966293614756, 0.21756567723594655, 0.6121826313093088, 0.16264639197969954, 0.07848049939378055, 0.36239028819243435, 0.5530268926746639, 0.2679866724532659, 0.6484026370820766, 0.040208942299870376, 0.7447877409222344, 0.07244013343472477, 0.3947181198142342, 0.23879134723160222, 0.5060764880840276, 0.7423321093556767, 0.15772263930337738, 0.25594302192182816, 0.17546599729810342, 0.06689163422908839, 0.1649265637969527, 0.15099620751948417, 0.17090449335209967, 0.3470933345180659, 0.9700380832889224, 0.9962023209938331, 0.9226432072979627, 0.5280636157553512, 0.9478117742811465, 0.2843195286495388, 0.011096290074303794, 0.3312380535974284, 0.4669900086657094, 0.4681697632220263, 0.24984365186770985, 0.570925632352598, 0.7999240897394274, 0.3191903944458844, 0.5762546461399842, 0.5491644348961474, 0.6842919443174558, 0.045987634338641836, 0.7739332460737307, 0.5602510524330804, 0.9938374807128662, 0.7383663270961339, 0.705578755004088, 0.16586521972035084, 0.8519979701444903, 0.7748430033280501, 0.7651384239008664, 0.43851380058967315, 0.15955955343005457, 0.3838842138767081, 0.0767388506111607, 0.3889528530187114, 0.4298144387613865, 0.11817159778736308, 0.35957051490945147, 0.055040179769533126, 0.40121896869828777, 0.24318238709141582, 0.27975206219332405, 0.7192791179025902, 0.043367836805397464, 0.3833049761275067, 0.6134653417915039, 0.17368205753277677, 0.22051142779700483, 0.9124593256381482, 0.6552853867436924, 0.9858618773300353, 0.6997763531227771, 0.9357752712501595, 0.6646686526880289, 0.8896683889113776, 0.93435678011018, 0.362625495694906, 0.8805548419917437, 0.3637874296332464, 0.3406579212236359, 0.9641970133072908, 0.6715745192301191, 0.268186253756331, 0.10897351573604475, 0.6605825011452706, 0.8938972799784266, 0.5469545451432484], [0.24931091306606656, 0.08632126885037916, 0.63217963235398, 0.8794264593228627, 0.6084017656518549, 0.29717108937610826, 0.5260034781367878, 0.8876290812366867, 0.2283954173966395, 0.5779385367319128, 0.45364635824123567, 0.606821821015322, 0.9830530461186576, 0.5777833893121679, 0.23226323626742684, 0.16350928662830166, 0.5776600131669574, 0.16342763642228764, 0.7848384959370958, 0.11485268809917126, 0.586771033801774, 0.7801756869886156, 0.1289312338537496, 0.9352901733176092, 0.41359365618209254, 0.10816417329444461, 0.8926788220985895, 0.3025075424209511, 0.09937284258039103, 0.5440307598158252, 0.5437672710783027, 0.44774577687556205, 0.9491613835702378, 0.34772650909570557, 0.21795480930597833, 0.9610732922481453, 0.6229291385421578, 0.14561325584614315, 0.03851708579983404, 0.5311941648917505, 0.15190360063855135, 0.7844769493052893, 0.28835110928095964, 0.7819502920572318, 0.7115456149374937, 0.05465913947012002, 0.7551263756956227, 0.10788736251997988, 0.044732429162066656, 0.7664657964782744, 0.2042844106013154, 0.7086778135631298, 0.0017317630709575704, 0.8071660132692985, 0.2060568229267996, 0.10818035297393935, 0.0828041856454298, 0.46137026361555145, 0.5086650810071789, 0.757317525646086, 0.4678916636740953, 0.54731524866817, 0.24925834815013448, 0.2439384351452497, 0.1719633793142613, 0.9355794971112409, 0.1052676484426055, 0.2244243451132193, 0.20056184480773187, 0.23359399234842615, 0.8968528998706028, 0.23952624852041515, 0.27405066031494574, 0.8479351078573081, 0.06864943335312912, 0.28862174879952707, 0.38114527727420966, 0.8217216306950439, 0.33911625393509226, 0.9805321593130507, 0.44415829977185484, 0.3572506196557792, 0.36416860792180605, 0.5391468318446765, 0.35996442763945924, 0.8830284194247717, 0.4595681796738317, 0.49690117902396314, 0.6634423984371042], [0.5944534418532013, 0.1906677349973649, 0.19841666312833128, 0.7614812908592914, 0.25827047608401543, 0.03919940071003036, 0.5224180462970743, 0.2503395524311317, 0.735134947318893, 0.5967637308977931, 0.5018510901388931, 0.19668063902468647, 0.04859988753925626, 0.34167429087078627, 0.6616819354240795, 0.05454556215512785, 0.8483352876626105, 0.2489454813490426, 0.6475787440120399, 0.28716529783753275, 0.054438952077878744, 0.012307986568561136, 0.05143725614836914, 0.06492454735841324, 0.6827431302429035, 0.801781762363605, 0.6134130194181976, 0.7703892245141851, 0.40999423202182095, 0.6029820413797186, 0.7259480282432128, 0.9191190851799816, 0.7975605011277966, 0.44956279031712987, 0.8369707581082857, 0.6574053151023319, 0.679824607034044, 0.7946673350190977, 0.21349438190465797, 0.1257522848544551, 0.6670176194230084, 0.5354021687388455, 0.028894790858679298, 0.28943800636560546, 0.8731952218840087, 0.8068633438924437, 0.11836164050779219, 0.20792787392287737, 0.7943404790743571, 0.7316773649544869, 0.20164398342827738, 0.331114241581869, 0.9897343069777569, 0.517707213291915, 0.43759627014346425, 0.14611634023778763, 0.4440728565722064, 0.06029335960445803, 0.4247466905729915, 0.9385927260415945, 0.5255550498301961, 0.3955409228272335, 0.6115229148336624, 0.5367185173425656, 0.8557792910834777, 0.9417322478556718, 0.11592202980335664, 0.03392060689322407, 0.30866795256443214, 0.671685211574287, 0.7493743090356727, 0.584760876064559, 0.982082093429524, 0.08351482082926309, 0.449010251856486, 0.8872015638840163, 0.12284385455211144, 0.6864589066297511, 0.2048899732599727, 0.5182929124556228, 0.4488454326722291, 0.94255673102708, 0.9954277674552197, 0.7886591005288821, 0.34875667217064965, 0.0828794131240761, 0.1437173879411887, 0.667284909210653, 0.25714573586822764], [0.0423598172586922, 0.11114231185120327, 0.6326677677941293, 0.5706118690931616, 0.006596026967960578, 0.04456162594335644, 0.8861032365997162, 0.786900370654286, 0.28870505412743785, 0.46003384898564614, 0.6127827670435486, 0.14963353811295932, 0.49212028374215855, 0.7801701148199575, 0.9329833033076246, 0.46823758709079366, 0.26113185452503096, 0.4818031429827708, 0.7942604233396481, 0.9009683292362827, 0.7172198951585735, 0.8401435954773689, 0.7642848824180932, 0.6272079994306909, 0.9583983958065073, 0.38637678770681083, 0.4861215030678335, 0.9379996454594821, 0.16851994984091334, 0.14171647955048017, 0.5881745385425683, 0.1661508892971285, 0.3562846699100264, 0.6673450280341893, 0.5569317729040572, 0.5962998561478923, 0.9822783561017524, 0.5090693889915073, 0.8841436723741447, 0.3814347201281083, 0.47245431318049536, 0.39081890419840215, 0.08473865990916885, 0.34624790766496905, 0.25609675881392313, 0.546979670792693, 0.7169249683022555, 0.9453755862495012, 0.1943830747902423, 0.9729067532529695, 0.7815296355075649, 0.20039259183622837, 0.21979032465863835, 0.08904427285853822, 0.3026089899227974, 0.24803538333468667, 0.09318206149799135, 0.31521886905676333, 0.6372638806484195, 0.11772308163959344, 0.9671102568001427, 0.20177757897294302, 0.7104486151387214, 0.6265859360632278, 0.5396586191023491, 0.8431068605180381, 0.6575540322368831, 0.053881948043698835, 0.7864061523668802, 0.7751952182347419, 0.6533031321762528, 0.30018655804332595, 0.271698812524204, 0.2715861750587486, 0.03631488319046883, 0.7790196301348221, 0.5058076476783613, 0.5786981040228415, 0.6266181613431104, 0.07370192769086825, 0.4836268507250392, 0.7900494787732302, 0.6030899453543832, 0.9899180338817218, 0.782276188809181, 0.748922928449791, 0.3142503884939696, 0.42644402226524647, 0.6293198406119814], [0.04549870455572136, 0.38194315850743144, 0.16269634025983648, 0.8807983888261588, 0.4871047553650868, 0.8503368854785109, 0.48608322635227164, 0.2506969628887358, 0.43785963208501555, 0.5338072116544336, 0.6419540752483325, 0.7311905594666033, 0.4521632810299433, 0.11501249058768503, 0.09820422832728115, 0.021932346874150577, 0.24285100167273743, 0.6486262631861986, 0.8791726740636366, 0.07968528413748854, 0.11971536102054814, 0.4076584841793949, 0.9033528079418093, 0.11383465406408655, 0.6147811676908085, 0.2911447716358929, 0.3377012359828908, 0.5541393517513642, 0.3501016926866827, 0.30238641582824355, 0.758491739877139, 0.6782434287136418, 0.6944371239028787, 0.48309884018188143, 0.3220044320690434, 0.9818968120142737, 0.49782316159249096, 0.04180437467239273, 0.9614479218586822, 0.886278805955894, 0.5979756493884999, 0.7954137377638766, 0.6358928494642062, 0.26241514867674, 0.07456245888861301, 0.9188653102567758, 0.9364391008977029, 0.6420624052577114, 0.36063376118002843, 0.8979146830880372, 0.7526586197409194, 0.8963587105998275, 0.8961733264239976, 0.3785078639120233, 0.8404353059834183, 0.36451413480566064, 0.24395241764930786, 0.5701920434984148, 0.7582109689244765, 0.20779654246655765, 0.3251723076861739, 0.33153958122512184, 0.5180217925191019, 0.6439524873063933, 0.7130990072113416, 0.8531192974352391, 0.99764783093527, 0.37001265805693495, 0.4458089197268127, 0.9153464085833602, 0.19436010342934318, 0.18868141756105938, 0.5309804976012027, 0.07724686333573327, 0.8052068729772963, 0.1654107817183228, 0.4238707121484523, 0.562847350611082, 0.8510141173523572, 0.5552761738500299, 0.7061505914357654, 0.6975310729789946, 0.5920434121028548, 0.2456797953881179, 0.48188688511953526, 0.7710195124344102, 0.9582949703556664, 0.8891282291931689, 0.8677495546857988], [0.9442287403741365, 0.424431475190559, 0.09778968754183803, 0.8565200796172927, 0.38231503477518913, 0.4313115506747617, 0.9138793928015005, 0.3931734127651625, 0.2422518380394182, 0.6722144712116231, 0.18742588954877726, 0.3341915660638598, 0.33647520535235964, 0.8373924509964246, 0.0789171663284115, 0.03340003547040238, 0.06969822832802608, 0.11147719933670341, 0.5031205126366368, 0.4571414955704345, 0.5099509919665213, 0.830865540626445, 0.2153139093971127, 0.8031303065437225, 0.682141173138206, 0.02083384331138194, 0.006724324391275349, 0.29726901371582004, 0.8175002987697042, 0.5577745571140922, 0.7078037773824121, 0.7595415329045907, 0.39672635940157597, 0.9657265485949282, 0.5976497718888204, 0.4082449481679744, 0.01327497816751888, 0.17204758852543756, 0.7477174599726728, 0.48027803484749, 0.5363560169576529, 0.9252541540263103, 0.7088180603919747, 0.5624397958062738, 0.27669016728765394, 0.5738465033588692, 0.5833801306290324, 0.37556663880066, 0.057625941240925904, 0.4794842709654358, 0.9551797462562338, 0.062391497859238365, 0.4496892517628045, 0.6906931022879625, 0.05052814908773784, 0.4558135174651663, 0.2324808322821823, 0.2857314333121409, 0.34694703286473827, 0.07174397189102788, 0.4737595908955422, 0.49914405685239827, 0.9970860347976724, 0.7405201072768433, 0.856640048094733, 0.2924163440474702, 0.9661863813185472, 0.032348551980201146, 0.4164442799077962, 0.48880278555558054, 0.2846932066364478, 0.10179905419235336, 0.810247001378036, 0.5648758097585349, 0.9185101036038891, 0.42440550250095765, 0.6493451819561473, 0.07727096471321271, 0.27314696555935136, 0.9317702113026586, 0.3295741431063546, 0.8807232023841852, 0.4413066018327889, 0.6513398498681242, 0.7691211577304075, 0.29169499085188966, 0.49418352602207716, 0.7682008380079949, 0.008151727641101725]]
bestbot_bias_layer_one = [[0.5869843034155573, 0.01726293549357827, 0.32380919370482575, 0.40209337128900813, 0.45948066522322073, 0.4829439721932879, 0.7498779412575997, 0.02497271688713465, 0.5690014229514194, 0.9928415031515031, 0.04658496066654971, 0.5524711228900091, 0.4388660741853295, 0.8151349330576652, 0.45540200943386244, 0.2296308502845923, 0.7136723473512485, 0.6125239583178802, 0.9405895428130282, 0.4012770939207424, 0.04403679777529812, 0.8570470164313635, 0.5308449794457709, 0.3038421285197491, 0.5478259579857355, 0.5323509316557327, 0.3061410541508941, 0.9287235677642257, 0.49550475770904867, 0.2919305294198272, 0.7696823206009715, 0.656734312783879, 0.6122544061735317, 0.6717905362776706, 0.833437410272183, 0.06404973304007389, 0.5927207372591844, 0.19700520826216372, 0.8168207311629369, 0.5142057646812788], [0.7051590064353349, 0.6934937521213669, 0.3154485022882898, 0.38293013023364064, 0.6637383497201229, 0.13952811525972464, 0.1713271385770827, 0.7067805226167707, 0.7654389134462866, 0.2758511525899614, 0.7410253515702949, 0.8616194100925286, 0.10045205599351836, 0.6997586996288497, 0.9745272111651245, 0.4239580452690247, 0.11172328846339163, 0.5077749348439146, 0.16337172320940785, 0.9377808439396493, 0.3920148610903501, 0.8777463155809128, 0.28179476322162966, 0.8812919165841336, 0.0405447119055099, 0.7285547918484994, 0.5982901621163246, 0.5620726178740193, 0.29689373580984146, 0.6445213724875892, 0.3192100958353604, 0.1304954719651492, 0.9150972312594478, 0.9280214670727516, 0.9182621546449449, 0.513648875845493, 0.8939820449964189, 0.020880256238280603, 0.22028833518776358, 0.7331562905218973], [0.3393691299324336, 0.014332818739899666, 0.464028862489536, 0.8358516990149437, 0.3985419794254623, 0.7290713579391268, 0.6002536383507754, 0.4609455359636261, 0.8798832053143857, 0.3181491465624823, 0.32611263214266784, 0.9289808687231027, 0.5556289057149086, 0.11556529209770061, 0.4691440708367196, 0.516967526910564, 0.5292291673590227, 0.4264067071423141, 0.8716303620321492, 0.11699488564221405, 0.034883215070566465, 0.5080181390118121, 0.2831004745679889, 0.4572227091853506, 0.9640974720368808, 0.348776550472335, 0.7288359281916602, 0.606271564479506, 0.09038069869059884, 0.3714452102425114, 0.526953459838478, 0.7083871656356846, 0.3975791615581482, 0.19342139560043936, 0.2890950524811138, 0.43380701439151803, 0.7315398100039177, 0.513291662838563, 0.07670622431656826, 0.032274287252976985], [0.32463614250333694, 0.4411024637566179, 0.6452128604323639, 0.839340841875141, 0.49301281131871466, 0.1008424838510864, 0.5748186968373075, 0.5723008753475625, 0.730141667954161, 0.791320007984113, 0.5726067292340237, 0.05862818562872152, 0.9705135519965542, 0.11062058713422984, 0.8016929399081717, 0.33004472014526165, 0.38248302431200853, 0.5167332960226184, 0.4284582131331556, 0.26296626162275816, 0.5979194636801236, 0.4032296235281183, 0.6865163020094032, 0.5458912727723548, 0.6321587499718764, 0.9821950602990837, 0.6331033297573513, 0.46325215509895934, 0.3070285232626587, 0.16647548954801328, 0.8637386145660525, 0.2565376111417671, 0.5233959625225358, 0.9397112659380477, 0.8609354123769875, 0.25747373397395046, 0.5884762994933592, 0.9392496773564102, 0.42581820825190286, 0.47652570859942667], [0.12490589524504891, 0.4046967358011444, 0.509899534263223, 0.613416322304062, 0.744337998284888, 0.4274397129835258, 0.4724800199609962, 0.5954743268005194, 0.9467516014114231, 0.5701427475970856, 0.6263496344148853, 0.21966891003734101, 0.6477762609605933, 0.2388461389328277, 0.6940268605289682, 0.8786978242517444, 0.8683497773110876, 0.7493635615145222, 0.9120697645678426, 0.07916368028913978, 0.7805007988062088, 0.863182038230432, 0.30112214860331943, 0.7989251079987345, 0.3639688181179338, 0.7678341055597983, 0.29862445247509173, 0.5672472739442507, 0.47713603947715044, 0.5446246928070916, 0.024312055777480746, 0.8197679517587939, 0.28882237120120346, 0.37957110552072637, 0.792059016910262, 0.4721643168663515, 0.7031740435023112, 0.9587976098317011, 0.37190866825563407, 0.8207651582618248], [0.9848849587136944, 0.428300836198624, 0.970977051134408, 0.06098431153892625, 0.21862261138693972, 0.5192349883960562, 0.8454122594069349, 0.7571328568749341, 0.3399860511220323, 0.7071905633098727, 0.6445547280925873, 0.39527001744739554, 0.7075523052055807, 0.2822366413550136, 0.7792269530886707, 0.3376946879421936, 0.4634172847320447, 0.1956691474008313, 0.09644303983788483, 0.16069057476756832, 0.32070525403009686, 0.4364128384629794, 0.6916745743000224, 0.5299961749044829, 0.7816236114075538, 0.4132312457240688, 0.9232874092474268, 0.012963529720940503, 0.19279508001038925, 0.1160569609668256, 0.43826898293609917, 0.3179253863280015, 0.6580908508443628, 0.1905785948583365, 0.941868381753341, 0.615818732019937, 0.4157750629552086, 0.6009037440719381, 0.75363752149783, 0.48220946860123237], [0.8412658477838035, 0.5096408456417326, 0.0038681652077868778, 0.9360891863547243, 0.5659062587498304, 0.0928152000629, 0.2583477156946534, 0.9731505664769442, 0.0038494045076241656, 0.08559400050769317, 0.3661157792618094, 0.24586800922038143, 0.3303760234996247, 0.5489843098238874, 0.6462864603202875, 0.754081717104515, 0.911400116377411, 0.7158050867465208, 0.059750006910185616, 0.8441492149130284, 0.39066832655259, 0.44903332250519323, 0.27608239958053316, 0.8434382475608068, 0.04333080864471095, 0.4121095834090096, 0.7261882287776862, 0.7171735853874578, 0.586338528838428, 0.8533801946817883, 0.6467847736893537, 0.23912847654442715, 0.5757660250312258, 0.77111741958121, 0.19857057360579633, 0.14936794272330656, 0.44310795941241854, 0.5898066973855092, 0.2756171724753069, 0.2547503144302793], [0.5374750638681309, 0.5991376854232124, 0.7891857285223945, 0.16670912607877264, 0.7356536210332838, 0.5387056848225406, 0.17525136407944963, 0.28397745905237015, 0.0667180374620232, 0.6849578372664762, 0.8683768550364402, 0.671695768163775, 0.38769299711260063, 0.12264852691284267, 0.9667166829050429, 0.06395858926817388, 0.10283987408265183, 0.899841434391164, 0.24365253646024088, 0.0489692482398465, 0.9765363196643393, 0.7921057127578887, 0.26232246668236403, 0.25778439429787037, 0.5685312178802286, 0.812510029449445, 0.08681766343167352, 0.4704466392229436, 0.7594448474806748, 0.5438335309354643, 0.6632132961469417, 0.7549269779471378, 0.3113626416775641, 0.9663423124107762, 0.4814928089280477, 0.7891729221847982, 0.9281282280064231, 0.917886872510553, 0.29219574614373667, 0.8496826237249925], [0.4274473944056766, 0.8997329631674615, 0.7333051506314315, 0.246924590343653, 0.7552156796772141, 0.737030027821469, 0.44671303063396073, 0.12721986879693337, 0.7598894602386473, 0.6021055442621218, 0.40031377419350334, 0.7526173285634752, 0.8179647954234609, 0.4666872885200545, 0.9769826721882346, 0.6076842245670706, 0.008521031609271756, 0.30612303490940307, 0.5133997133764433, 0.46550050468358595, 0.9063827493573432, 0.5931215755431828, 0.8942470810413261, 0.1339347627591133, 0.7495786228067004, 0.13027788800103401, 0.619920264238309, 0.9859550633455454, 0.6020190018685244, 0.5919542397033075, 0.02438656520720328, 0.25228384623347677, 0.7533853088378498, 0.7292329178761787, 0.17874249976225798, 0.9024743328395708, 0.45874128192060815, 0.5444267916161052, 0.20215971319764636, 0.9491172142489701], [0.4613020571859725, 0.9370377411692619, 0.5607839057045216, 0.5649287472772042, 0.2846767329456714, 0.2025854986748986, 0.11938661219434321, 0.09330858796558028, 0.573843870955233, 0.8692234327088826, 0.13134665670167367, 0.2621675800369411, 0.8783956005809461, 0.7779308981453649, 0.9996952779192133, 0.5593853836115266, 0.43287344900859426, 0.712798919953591, 0.43473946459808455, 0.19236184035186732, 0.31006854086500657, 0.6680375710948333, 0.9574045687785544, 0.9139548363306833, 0.3251766802902898, 0.9345151189986184, 0.0837839998518285, 0.3644143036515509, 0.49739620485943925, 0.3951614057286681, 0.27559213504357993, 0.39065558163256453, 0.8484411300852319, 0.40777932241669446, 0.21126699489791645, 0.6145489300534415, 0.9393258466947169, 0.13463686603192138, 0.7781373563585937, 0.7877891439685033], [0.7414685453521099, 0.5416800817687003, 0.8676296827997173, 0.588707727776239, 0.8007724530358384, 0.4523377458112253, 0.20185882010984713, 0.4262493233681528, 0.9403291463804849, 0.6431347331366793, 0.8101623596483081, 0.07105465905166142, 0.7102942689289995, 0.9238716983218968, 0.046669197109809435, 0.36091738378517924, 0.11848039236890529, 0.6490903684697422, 0.21334878218840025, 0.7455893714925231, 0.5282834579122047, 0.8427291230423946, 0.6080356352364318, 0.8046495086954177, 0.9290737345368922, 0.8267382648249895, 0.237197567863353, 0.038854949201064914, 0.8739044743161059, 0.4722592877382664, 0.20018393922444977, 0.7025359405528611, 0.7290149460503391, 0.841300253261586, 0.8512492429136496, 0.2041166528514614, 0.3869285821405517, 0.9015384421598049, 0.9029779388320561, 0.8141421118673502], [0.020202180869545838, 0.38797821461924664, 0.3623214731466442, 0.5782749332140563, 0.9408949876357316, 0.2553750738897531, 0.9694417032259485, 0.32765494835836295, 0.9066494099561891, 0.9139164252343521, 0.4986021089534436, 0.8639697443236954, 0.20668705955450384, 0.23685200999711953, 0.4524460942487034, 0.29560781547894566, 0.11476132768103031, 0.2986366910153374, 0.5103328863070767, 0.9304949306315848, 0.992995629083381, 0.13639559787461375, 0.7596335581591659, 0.004992460913428309, 0.7769131363299036, 0.44303876754749094, 0.05291721090267121, 0.7818331182700626, 0.22181416220916605, 0.2518270628393636, 0.5816065193771636, 0.7900925785205721, 0.3695639926216171, 0.06597735212175004, 0.631898853102541, 0.9899191370370066, 0.892833288016897, 0.39983978132167064, 0.5473716432083893, 0.6156362590194197], [0.08911333772521057, 0.35349357566857875, 0.24211392098757678, 0.23936012439813248, 0.26350084131779905, 0.14670575974402322, 0.6893655541300804, 0.4374496612349118, 0.5119766957467426, 0.11433001448498159, 0.44380803977778227, 0.23291076001673205, 0.13291434603854435, 0.5545262555313976, 0.7491703162488016, 0.27783545039075674, 0.404246392786738, 0.3798403010532527, 0.19416399432320008, 0.8333253561304906, 0.25846487613766644, 0.9161500731770728, 0.4985393782962515, 0.6841402889019856, 0.43615318621549815, 0.5953761994363032, 0.929849610277857, 0.39946811603357235, 0.6130755217354221, 0.7382591013682536, 0.8707838556533436, 0.7285710016503628, 0.8862683185603776, 0.49357959328259915, 0.3094664224245718, 0.7820204421802692, 0.14886076931388192, 0.5064585737247733, 0.19772510101740604, 0.3943024810012682], [0.45665916345570234, 0.1298534997704135, 0.042635149150170304, 0.9994510501742617, 0.8780828221332965, 0.07900541119947513, 0.23787898040801836, 0.7444854316679634, 0.602428755735753, 0.6851752063625743, 0.3085950236382101, 0.5887434165185164, 0.5266029056423681, 0.4139542058084372, 0.20724327106017448, 0.3817708484258113, 0.8954430887145242, 0.06984804909460962, 0.35380935023009763, 0.2691695688233855, 0.7625927049396838, 0.7136849129944668, 0.4683650399010443, 0.31967112400070086, 0.43330208593596775, 0.3640846871804764, 0.9525064737843258, 0.5322585324136816, 0.9534357318010117, 0.6531543699359696, 0.9805638849415415, 0.6635948285460564, 0.0870515039900368, 0.48150310411852404, 0.5321581938406069, 0.43913241596401287, 0.9808991741278246, 0.3986904391336823, 0.9079479591592143, 0.07644121110820135], [0.4428567027828717, 0.7740969394845598, 0.04319618406852832, 0.8819081008821954, 0.42073692956555964, 0.5007537440050366, 0.328631739223059, 0.2546241111014359, 0.16192601858329603, 0.25482492429481574, 0.3936133582069675, 0.36458331550336, 0.9053958251836952, 0.9501048771650369, 0.7214709720732838, 0.8906379137515107, 0.6369268451658008, 0.7246365156540054, 0.22494970064919806, 0.717651699438425, 0.3756904730256009, 0.828587113441086, 0.4279868417029875, 0.11038917734974996, 0.9972249891346358, 0.03368301446789679, 0.3682504088133972, 0.31647749153920435, 0.718608242984337, 0.024112090582382284, 0.27009017472454677, 0.43176776256576277, 0.09276625047216247, 0.05988917034910102, 0.15540431554611656, 0.5647604362403398, 0.19715440645937699, 0.3789819213100236, 0.4056862064386054, 0.24715329519020213], [0.4527154403367496, 0.3651389804209568, 0.5607530493793982, 0.554340443258823, 0.7172137005003486, 0.9850024296060819, 0.33312245759615955, 0.27821728471212137, 0.11155170812014292, 0.7451018910059583, 0.6629820132862455, 0.1459252806936625, 0.8407749362603466, 0.45551100876444506, 0.38109074460284964, 0.5164225404670663, 0.5424201100892742, 0.1368468760759931, 0.09863877857160008, 0.22175613956377294, 0.9745012886725058, 0.8916701482890335, 0.8821016362323871, 0.3083788151416924, 0.8024465448701531, 0.07030029057288978, 0.3068742783704477, 0.24717600565983044, 0.33599025939454175, 0.9246604930154034, 0.9011759381978862, 0.2529597049707154, 0.8696296247404111, 0.455503642772774, 0.5080998848519652, 0.44832785536694886, 0.16127035496386422, 0.6330914473665068, 0.778388537753675, 0.06589970808498402], [0.812762306918621, 0.7223491658228666, 0.5682850230979652, 0.7747584413091316, 0.47284023514066387, 0.3645320366948047, 0.3282780347884945, 0.1829743125906842, 0.8415911553322436, 0.09275671681114128, 0.6602020643536536, 0.05554807848566179, 0.21305328327066142, 0.1377881539533008, 0.805621501696826, 0.5139016140001019, 0.14179295255459634, 0.9048977630459515, 0.14598817995905944, 0.10583083082485656, 0.6161589807822411, 0.7714108121904788, 0.7778313412342784, 0.057925915083303914, 0.3077995677432387, 0.36070291124593135, 0.9744846308865732, 0.5242613674381889, 0.9876900725909675, 0.9362356412051699, 0.28844044213790254, 0.6641906900149369, 0.8017977640053372, 0.08311929608697777, 0.4455463571283733, 0.9238944255006494, 0.082291669991153, 0.1736780345307264, 0.15409875533280826, 0.2543396570321348], [0.704456900223904, 0.8851957990331072, 0.518698968202288, 0.051111554136491155, 0.46247721142637566, 0.09980941182687819, 0.1943310971083011, 0.5212278201665913, 0.2792265648430513, 0.5876561525275132, 0.5326340586337494, 0.18290388852472605, 0.17750722230579663, 0.5552381324090908, 0.9376381973511447, 0.5085662472941733, 0.7724846772912071, 0.03825562839595953, 0.0461069218230743, 0.49651372787226966, 0.8350660303955126, 0.7606167116630606, 0.44356329826270247, 0.5481385653167135, 0.5006405586533574, 0.3278396411243928, 0.4986431902682743, 0.6756435389873457, 0.522264399841206, 0.7245196035877904, 0.3654642452965594, 0.22888341356645425, 0.4586138235157109, 0.276699406118493, 0.35178800866291016, 0.38745019373182377, 0.05667878537934967, 0.8655714765185204, 0.4894319935438127, 0.15382772401170353], [0.898086871754162, 0.362282433758625, 0.12332957980555914, 0.6289171368228548, 0.6231123196707952, 0.017016010660653502, 0.6273766045339223, 0.9846845502458803, 0.6659240213827896, 0.034895166618286066, 0.09269824416462003, 0.016591215810755955, 0.1266758186552206, 0.2968558801529636, 0.8656440147313851, 0.010348947621789395, 0.8890587473295494, 0.6966310323309339, 0.6978157347923427, 0.04453371933023864, 0.4354247519118124, 0.38283233346735024, 0.34744540163864646, 0.8895459644228261, 0.9329303596650262, 0.44973033099791915, 0.27762203272145736, 0.5648447349430736, 0.3546553519086677, 0.1556277248314385, 0.2940764939877004, 0.3551051392991206, 0.5016808132209193, 0.36668789365768784, 0.0464872547866686, 0.6075960646122247, 0.9570546262975064, 0.24792399572730917, 0.9800793386624602, 0.8869208474492485], [0.07073848191624277, 0.15075196675304425, 0.8068540810870977, 0.9719907603602065, 0.2560998501680254, 0.7706158474911176, 0.6036335229961499, 0.31667982201820966, 0.8024238048249457, 0.5566149989458918, 0.8904103383588189, 0.27567104159001166, 0.2101074187973756, 0.12267286924710974, 0.8069188996338025, 0.5419059370814713, 0.6642006782329984, 0.6697657215604117, 0.3181006070004798, 0.8418471805026915, 0.4997607937886659, 0.2556717932425927, 0.6643911952882033, 0.33535113422356044, 0.20555015019493106, 0.9255137629732839, 0.20703104356990487, 0.7349007433324666, 0.5787345967612136, 0.5205223223065745, 0.34500404261810436, 0.6335763927251006, 0.9474468354572864, 0.7179575853964196, 0.2885253575899184, 0.9336900279036989, 0.24434000235129805, 0.9099959861179732, 0.5630590359805082, 0.5592659060005903], [0.3799824591388602, 0.4291129197203155, 0.6639706059776933, 0.13662070256851344, 0.902018349564977, 0.9226029351314309, 0.7584136846731687, 0.6477977090214923, 0.7227828296968941, 0.9562300272004937, 0.6001729881924865, 0.44247225667503765, 0.7617240685506587, 0.425863488703795, 0.3752030120365024, 0.010937002951755925, 0.8028219807598993, 0.513203916061168, 0.6862750888553341, 0.44544745444694567, 0.9963684094007372, 0.2014082734127507, 0.9749912120311305, 0.5535976121925623, 0.08952736649519688, 0.1600329614123972, 0.2689841586774082, 0.04773215928772212, 0.5694282319305862, 0.8459799223697663, 0.498982096015296, 0.4901008300819264, 0.40258580050290516, 0.1864242267599825, 0.5969301970231615, 0.6232836029966629, 0.5638976887056755, 0.3658724932704486, 0.6321261017858146, 0.655341801238754], [0.7627845125404704, 0.16174019918624827, 0.2676012020510773, 0.5279457681956321, 0.7549396715191978, 0.06781537411180849, 0.5718388025958564, 0.14960397917075885, 0.9594095046505506, 0.04907649729581143, 0.8251972382965918, 0.6251759918402042, 0.24072078594774404, 0.6134833805433879, 0.8633963858680415, 0.8233964359492462, 0.4650499247967036, 0.5581241249399843, 0.3928997572541675, 0.4853642085182337, 0.17041771111676418, 0.7700096572377916, 0.14456245454632966, 0.058268896071947296, 0.008914804246149655, 0.9892242436793406, 0.5312666074444914, 0.8179147410350498, 0.0002972092772499657, 0.640898555637924, 0.943779629382228, 0.20886330093171157, 0.7960164383309857, 0.4321354073094925, 0.843125538095342, 0.6862124382788999, 0.664514592122937, 0.07921168836849579, 0.23877529146727583, 0.6831560763517076], [0.10294458663241068, 0.34915963722960985, 0.6500406922575035, 0.9926623331249472, 0.7401615715276249, 0.5607061935733381, 0.9817655807966149, 0.48109778691983074, 0.4131340899240127, 0.5748303829751821, 0.021790520820264114, 0.6947455069716936, 0.21395697690699134, 0.7427019232176143, 0.0372711310257956, 0.5541849561761505, 0.013080239761535939, 0.8141967507002528, 0.0016558643991879674, 0.19543986522163703, 0.287091824847474, 0.5193633630736615, 0.6354893919808746, 0.9220633077555119, 0.23576637454089788, 0.5977821799089824, 0.8488554996948792, 0.2752969331347549, 0.4715306128494109, 0.5835827809230765, 0.8487466994216012, 0.2743276162117124, 0.29968054916980735, 0.6945360099477116, 0.16882261230639228, 0.4380528807427069, 0.3103235578960779, 0.04950246682300352, 0.2428426174649213, 0.07693295609842554], [0.8323665710533417, 0.030267119528524233, 0.20403868427902105, 0.3706916630031948, 0.9341529973111321, 0.08696455662071467, 0.5330905294265774, 0.11071303651428532, 0.5007547580765618, 0.6319040771701337, 0.08473622194156838, 0.09950288139828745, 0.7376877069625386, 0.2970657941271011, 0.4852509326384511, 0.6848245487588422, 0.33857605334183116, 0.14052868778573047, 0.5427089052744156, 0.8511075779117464, 0.523089953653095, 0.42110345551244366, 0.3148021204024134, 0.5631125939272442, 0.27596332570090654, 0.7697289302725636, 0.5959055976011175, 0.537888898396601, 0.4784405842063788, 0.5109125209261537, 0.9805525069013622, 0.5694832681400323, 0.027393968431952076, 0.07731911712472772, 0.0536202696491479, 0.8033968085924381, 0.6727098101763138, 0.5787098501404687, 0.6903574296335616, 0.788285947060284], [0.7789823202543318, 0.9337472837397733, 0.39203918199677135, 0.38410531747375143, 0.7911178769959133, 0.17697983856722788, 0.3193030028459558, 0.6438870965332472, 0.7653517958833503, 0.11034399935355732, 0.6681815215332754, 0.12878053175629667, 0.5576889189037992, 0.9909151610899432, 0.8902267571481761, 0.9379307004627212, 0.6100725298455365, 0.49795763738813137, 0.7532267162755735, 0.6040945640584581, 0.7213024766491897, 0.37399117622146905, 0.9368795243098074, 0.35702143360245053, 0.4260776298360005, 0.01106945368825396, 0.961767968557568, 0.12984914886410248, 0.35320192759155533, 0.08074337482550664, 0.5772930817551868, 0.8624644863100733, 0.24187404283255487, 0.3447021876280565, 0.7656421475736108, 0.24327357761901336, 0.7659168651707687, 0.02582868540519556, 0.6045961742725618, 0.3043125221961249], [0.471316028579023, 0.9884880162314554, 0.9041714590238618, 0.7675545335849712, 0.4296789782866268, 0.3436390365103541, 0.03879363230324662, 0.9438092716296573, 0.07876151042501878, 0.38642104253241427, 0.6694224498574612, 0.18286152885037277, 0.9816674222431858, 0.743727577985447, 0.21287068143183252, 0.008669272439345121, 0.6653788553668887, 0.09180155232522635, 0.9502185639966334, 0.26634903362463824, 0.5118620890477107, 0.002902732488722859, 0.43690397384728463, 0.8340053903550922, 0.3887429984611569, 0.7183656315219423, 0.20150515709550076, 0.909085862308593, 0.5443694690584463, 0.8412607926240531, 0.33677180766798787, 0.9543387426470175, 0.9340797912743674, 0.5108335367488216, 0.7155782382501017, 0.8426833387972662, 0.3631187550096251, 0.33154161670252214, 0.8738433676078716, 0.5716413069016604], [0.07880085853584051, 0.811433024988757, 0.5962203390809151, 0.2758494231090458, 0.22970508343668983, 0.10597543750207894, 0.4768601001752877, 0.5688123034509933, 0.5899578106487994, 0.14633610521426643, 0.2554670886403364, 0.7903840251369308, 0.14234483887405414, 0.7109907913153878, 0.8998146082703748, 0.5021894814461506, 0.5447404263704758, 0.7535248014229952, 0.4973719283900113, 0.19820278050249962, 0.4093591208777565, 0.5770559675142553, 0.12542139345189207, 0.15986586771398437, 0.33949103513738765, 0.9319829612194332, 0.41206083237062796, 0.9973883867917578, 0.9883611173915734, 0.790718010120937, 0.2625720411703888, 0.02354590950359836, 0.559506430364891, 0.8151882878519414, 0.24635488059043276, 0.8944315523876605, 0.6047891993495771, 0.6581339207110963, 0.25072101398168967, 0.943615975512352], [0.16719322894310062, 0.847501385844308, 0.157546430827322, 0.6525884428930617, 0.06802069997503124, 0.8528127656896984, 0.2788911052916879, 0.20746857628699034, 0.6850248529202584, 0.14545153442558822, 0.8898678776273622, 0.9824012439891887, 0.6449250404283502, 0.9066508373654687, 0.2274278968909702, 0.30986813814020464, 0.5915744390730722, 0.5614134180762353, 0.0638335916760796, 0.6924986793891867, 0.09197310158018157, 0.5883178987052563, 0.6171893949325614, 0.11817656649430863, 0.03370778017085552, 0.5911483830184704, 0.9055763029988504, 0.6246112525081156, 0.11522517824141909, 0.8140705752929128, 0.05012879539561266, 0.27233539067749646, 0.6544005722018764, 0.9790713057801116, 0.15310302992072056, 0.45820118276087485, 0.8343584616982185, 0.7739143351290958, 0.3255120155417599, 0.6385359295382186], [0.56477301308494, 0.31555315792536387, 0.5504412334066751, 0.06823676426935221, 0.932220604962686, 0.6361401730941487, 0.4240865047992889, 0.9456767042196388, 0.1997090233845472, 0.03372892955197293, 0.2987064867381857, 0.3961303953581089, 0.5345062559926338, 0.24000511667467506, 0.4288267437192379, 0.1995775982889586, 0.9875888931662052, 0.4966872800265748, 0.08977446506377751, 0.8181517286173426, 0.6040314844503067, 0.036457119201727006, 0.7135094601679203, 0.5069255398243558, 0.04668527967192726, 0.9200541710999917, 0.753260689005333, 0.4101534674190217, 0.2672727636990614, 0.4718960619186017, 0.49072264874503413, 0.6876338250940602, 0.6628496593552341, 0.011850377867909545, 0.3730537450902438, 0.968833394750598, 0.010089567678673639, 0.6241745537489809, 0.2722499886226999, 0.8410418445907003], [0.309333797322051, 0.15286568084574292, 0.751658199519775, 0.20318777453967374, 0.7665484807325488, 0.5178526842334534, 0.905953253588598, 0.21722785756762109, 0.33869925758593245, 0.16631333287226158, 0.8748064596806273, 0.7376329263771274, 0.30579915502331745, 0.47485384160700406, 0.20955611846117517, 0.890684640270709, 0.6294641266457797, 0.2874266589289648, 0.9582631611647808, 0.7842454375087925, 0.005943076848931916, 0.6589115990345344, 0.4786654655173769, 0.6299502602155869, 0.8718746099347955, 0.6529410200913339, 0.1674744637714165, 0.17224181171658703, 0.45185877605903235, 0.29614195778542274, 0.8431241186227195, 0.4497341489905967, 0.9429318254900839, 0.36739852558568253, 0.9432503303273098, 0.45158037618114266, 0.38069509875327423, 0.4432456751822892, 0.6531753541292484, 0.25818535523412944], [0.11638093181056575, 0.8999744556528811, 0.4202291957119406, 0.5552129301856581, 0.9198197737420941, 0.2806302253981402, 0.38793000350328855, 0.8290349206594864, 0.2691744225486129, 0.106518463893849, 0.89766322805086, 0.412588035859913, 0.8340559516244067, 0.12438095302826002, 0.9169674291674732, 0.7510010960512259, 0.15418382377579476, 0.7465786328099228, 0.6456954714529791, 0.558419671954236, 0.21077594103927533, 0.7029062329738186, 0.21103098587389013, 0.011557298175641884, 0.26494964544677857, 0.720594916189021, 0.13878464453338502, 0.5336049384190266, 0.2525675516948397, 0.6530751602451345, 0.7048534826144928, 0.6471619219202784, 0.5797547636147298, 0.8704719091862013, 0.24335309598524846, 0.2451038912551211, 0.2964620514363787, 0.8849244960392766, 0.3017606511826272, 0.8029907113191791], [0.9947987376446243, 0.37751980944941166, 0.7839384957786899, 0.6827328268634208, 0.3134544102043185, 0.06466551621982186, 0.7304139211019084, 0.7113177228650772, 0.09152591112449926, 0.6841114193602037, 0.07856298533392192, 0.760153756143896, 0.27524151658899243, 0.37767879790021475, 0.8419063901470719, 0.11261551325314179, 0.2133079173060789, 0.587597378619917, 0.9479452662153942, 0.40191061634010883, 0.18909996718347777, 0.906739286997658, 0.49604985915261335, 0.6732912050417671, 0.5579313256451405, 0.010911315492148188, 0.8465055211494473, 0.542593260392574, 0.556450476683373, 0.9854010391347514, 0.5889986102472585, 0.09726052123265716, 0.2711737719139431, 0.9582102575547544, 0.08271044576821718, 0.48628054031239076, 0.6945285297669778, 0.5463925213037752, 0.3703904099053078, 0.664101603051181], [0.29010754751686385, 0.8027021367960877, 0.038883972146420254, 0.8618917861682355, 0.48175674186509576, 0.9112753337196801, 0.41334967238777287, 0.5599863920078669, 0.8293696793176534, 0.18291947025884703, 0.8304631306346058, 0.5036848878582375, 0.6197817030966754, 0.263712479782358, 0.15898794821027684, 0.37664205004701323, 0.2403078618624348, 0.773518462262316, 0.027545394948941482, 0.22241096458119358, 0.05611275708551022, 0.10273632431625324, 0.9774907443176027, 0.20670168701962133, 0.12814722697740244, 0.18275424623759517, 0.8124585944381127, 0.8048066809292118, 0.007009212511789653, 0.40272147000152325, 0.19578392668077638, 0.759082831306003, 0.6276141192929524, 0.1044431713169719, 0.7545548745318413, 0.8796912434260803, 0.6935746015419721, 0.2887361426092485, 0.09358616890052696, 0.10763425443571517], [0.6840080223824859, 0.9246791017865741, 0.41882092418451267, 0.24427422478142358, 0.590633130430664, 0.4182214722676054, 0.8461316777622254, 0.3073913246801041, 0.023131975161298723, 0.6909509140423208, 0.7475258641124181, 0.11575350467483658, 0.3377038941470222, 0.5374690016895896, 0.741996954261171, 0.2279053636785362, 0.8628640722110315, 0.4859404990888986, 0.0538797980559762, 0.27221744067010045, 0.6713635354075653, 0.648778645837501, 0.8443339925675096, 0.12807256179883642, 0.2362913834604412, 0.41549267576259585, 0.7080280350869839, 0.7847851376771691, 0.6312329952812126, 0.1860337197002332, 0.593336022475037, 0.27609223211721345, 0.7572986376219942, 0.7006041629581932, 0.43800007984914946, 0.36858517450950046, 0.8100861572694547, 0.22691136400038026, 0.7139292491776245, 0.12583913408557246], [0.5435782160705133, 0.6651070084452423, 0.674296195050896, 0.1699274491902074, 0.09363621864483873, 0.9525630136010766, 0.7144583682397998, 0.7119419465408064, 0.8803715125424625, 0.94920178060598, 0.027211716690207943, 0.9384580050690037, 0.1596464222417594, 0.6590773366157616, 0.032581730834572054, 0.3758635565538273, 0.4279248401456821, 0.7873511895680749, 0.41255083634634493, 0.923405565461025, 0.6267501013505629, 0.2693188564888137, 0.9944006022348744, 0.3031905175467965, 0.9878902591037929, 0.9495140286545042, 0.43021619137960343, 0.86784319939201, 0.4681416144217797, 0.5572232945596475, 0.6658506624656504, 0.12761520474056154, 0.28908302511970596, 0.9558229158157677, 0.7898531724514024, 0.9538711119691223, 0.10231844988743954, 0.012717344993310897, 0.03206922800686696, 0.1792878306660013], [0.16792963961212937, 0.7639078350903677, 0.8700397989092892, 0.8113735959471841, 0.9200194391769506, 0.7338193270479004, 0.4580741470279459, 0.8226535121281003, 0.8067222764504312, 0.6375868031756078, 0.7957453978340264, 0.553650511526864, 0.6739975181801647, 0.8639452623810935, 0.986543945684671, 0.20122898822505353, 0.7556143688913779, 0.2816729760293486, 0.8343674971361319, 0.1805616436607813, 0.43842201199166453, 0.7612855575634678, 0.26093583316712454, 0.4734936746166627, 0.5453823823838573, 0.7766437712787306, 0.28569030994687783, 0.8902302525625133, 0.6346683384570895, 0.23189212288030725, 0.677462232147979, 0.5993123122691657, 0.13931938666401433, 0.21027995278150047, 0.23372064375654045, 0.14904657257706733, 0.29968730145198663, 0.38726387051853295, 0.5875925172321653, 0.5815320402749569], [0.29954801032519573, 0.36877334414265117, 0.830562692020493, 0.529464007505296, 0.9021218759298741, 0.4444958537060476, 0.3508165965531568, 0.8445962624616489, 0.745386976069418, 0.7147990006978449, 0.4086678584385415, 0.20061106835772835, 0.5669332239664587, 0.1668957950343226, 0.9163190191857554, 0.2808248882676585, 0.6877894408034828, 0.5100148351369542, 0.3415238229229428, 0.4700670980541267, 0.7768282998816709, 0.08309911288283622, 0.41815556699461265, 0.9754494393889072, 0.8018202590819976, 0.3973599145630099, 0.2953763509462073, 0.903796953108554, 0.8939153900561937, 0.916133019254577, 0.586399372033927, 0.8784038587948075, 0.07255883529372698, 0.0747375281971937, 0.2861398898741916, 0.21393470708698148, 0.9349242071584837, 0.9210250259632038, 0.018725873291935535, 0.9511353804989896], [0.8953166911912535, 0.9483828653151093, 0.24657876872210083, 0.8458253049599157, 0.3219515453769952, 0.6154108447905102, 0.5286978967495845, 0.945840241810976, 0.3472400406276498, 0.17508492481556004, 0.44104487886886223, 0.1622723476275928, 0.995397787666822, 0.7647253446388574, 0.2818770887845923, 0.5750948369656338, 0.529584110481206, 0.59328554234041, 0.9491490737995181, 0.2993853383793801, 0.8237376140892244, 0.6666258628371888, 0.5824193839991827, 0.6721911206371148, 0.310330047739537, 0.44556140414337375, 0.56448962555816, 0.26682152565543493, 0.49157564299488377, 0.9969974439019924, 0.1983975253123974, 0.5805545344607684, 0.05788102001223394, 0.680827428486303, 0.4152771055783526, 0.6677654231169946, 0.052272175433518364, 0.658582164210725, 0.7934911477368203, 0.2963128386305919], [0.2307614446647871, 0.16461622006551324, 0.875241716018483, 0.9192621480354913, 0.44205425377169383, 0.19662851193392383, 0.07750859334575977, 0.8628593513552557, 0.2287415927397234, 0.6252228730724826, 0.6554949620226828, 0.8047214003574278, 0.2765050742763584, 0.3770017730731028, 0.8123332259644706, 0.27061969804342434, 0.45700147091342636, 0.5803607976693109, 0.21614514772813298, 0.05967505435154308, 0.12047188128263486, 0.5617913827281413, 0.771369256949991, 0.954950428652477, 0.6194093107180039, 0.5846271202213753, 0.13465778890928148, 0.2802748576448355, 0.5044687553833174, 0.2761708094972388, 0.6161190627869806, 0.1796620165465025, 0.1776170304618725, 0.38034301399113457, 0.9476279027698198, 0.8883978519939408, 0.5809178758676368, 0.42765434226257804, 0.017578285966486806, 0.19715728283493061], [0.07204976196888724, 0.5250651754548347, 0.0332473170717178, 0.7874945898299603, 0.5550139234030446, 0.49861564367987987, 0.3469298131806767, 0.3214794780332515, 0.7423312105598974, 0.8592446512495201, 0.5085671088252588, 0.8522287679986624, 0.2309272092668534, 0.18903124727331966, 0.812984019940139, 0.1878278167313353, 0.7470536447561795, 0.8735533386258447, 0.7074438835689082, 0.13319896182845614, 0.27390676651738, 0.11029227407892239, 0.8961797012173804, 0.5341297994324944, 0.007886891637712612, 0.582236527359727, 0.7886155079065753, 0.4372514179416863, 0.6144665333244853, 0.678072332325488, 0.9013452672067328, 0.8387457672102363, 0.05997655845859973, 0.6679778133979024, 0.21886500163468647, 0.6488934413585218, 0.5574593031943001, 0.247221316494727, 0.20833556643273077, 0.23101314047019395]]
bestbot_wieght_layer_two = [[0.30199007532965794, 0.649863105352778, 0.07878158775346522, 0.06856096919859667, 0.76046627826131, 0.07606874616309922, 0.48067353545347624, 0.906419553291269, 0.6130598594271559, 0.7530499643730484, 0.9478302902575031, 0.742621561376834, 0.12466256748538873, 0.16085360090320344, 0.7723968892846171, 0.481059750830778, 0.14972987640754976, 0.8502267272553916, 0.5199717706135193, 0.5397813469926318, 0.7224665033348465, 0.6861790993283774, 0.8294890346688684, 0.03172395424362573, 0.6474494743442335, 0.5960715786575665, 0.7794929513154084, 0.42179845814354344, 0.8340220511600775, 0.635096375778871, 0.011792203019839631, 0.000404970996905174, 0.45501980906341877, 0.4815650824463289, 0.40657542009530434, 0.7353209880998934, 0.07300481533185332, 0.7468558263386845, 0.16633966137854672, 0.9273107454758274], [0.2618178857268575, 0.8059084234258315, 0.3892084515954918, 0.511425530101818, 0.6135316018336275, 0.24982217100203064, 0.2788063288494209, 0.43000546627953307, 0.011234929906502766, 0.5809835186151234, 0.32580129362398236, 0.8865222933902184, 0.3099329326384538, 0.12846719943449825, 0.1524013705430074, 0.833596970322699, 0.02414604468786785, 0.5032346068132045, 0.7889147356767268, 0.6928956277427352, 0.4620860245781534, 0.5521223508460003, 0.09752133174572442, 0.0032384154012790045, 0.05049091296997188, 0.6643820021817466, 0.26909235842231305, 0.4408982078145355, 0.7909139358729895, 0.5055657611496549, 0.8653460603889427, 0.6799849834394638, 0.28746034379881025, 0.8263364896388539, 0.6613305761772941, 0.08864229732273066, 0.7752914086740953, 0.7769131553279733, 0.008139334692245481, 0.6787269967816101], [0.40549204636687985, 0.09749009484529148, 0.796917574080154, 0.0692577868925911, 0.4607639455089301, 0.8076256422519743, 0.30653879202651424, 0.2913278269126577, 0.8195224252203727, 0.13071693362849757, 0.450900211323079, 0.456545806339301, 0.5193310874942899, 0.16956834058997683, 0.2825963343701784, 0.6721450498857677, 0.3845750877926719, 0.17353498070381113, 0.6446663409766525, 0.2965408777370334, 0.7963391990149843, 0.16315473676558534, 0.2608672296463287, 0.45818188190224063, 0.42917714684840813, 0.021771310429737345, 0.9946149155530009, 0.30748779963032236, 0.5746881614128814, 0.011378595329325503, 0.37639180886785717, 0.20069063013978106, 0.45362862143770666, 0.5701661014929003, 0.39253085338283056, 0.9625584977440659, 0.96315720738013, 0.9711995383324793, 0.8254858670754297, 0.05317353524078405], [0.758513153926303, 0.13854105206337652, 0.754148353980734, 0.8426939218196244, 0.11797879318419091, 0.14894744905122792, 0.3413929920066687, 0.3833902085419426, 0.3074167647363677, 0.12897398981153885, 0.06654716200533295, 0.2434709793937161, 0.6169772433522663, 0.6216801878676474, 0.04635059657909579, 0.9241691426785392, 0.3911018499647718, 0.5972343977635788, 0.5684640592190692, 0.6809736370532699, 0.7493632013926423, 0.7107635245899753, 0.19264725243338976, 0.7235997787825806, 0.9926829661049967, 0.24426437050200056, 0.04231147066952712, 0.5470011668632949, 0.16943954754147172, 0.48883412065698517, 0.45512980911402445, 0.39851146770179613, 0.8408568853667081, 0.2489080109515388, 0.6766596308600638, 0.6289016578609256, 0.23288801076985866, 0.11204672737653643, 0.6020279738825397, 0.13380224979508393], [0.6627551001388462, 0.4547118785711002, 0.2321241269566422, 0.3241938323082708, 0.8245621170775675, 0.1240039691337309, 0.45083267257231396, 0.5525099736268062, 0.8229132542591093, 0.8615000993242417, 0.9263441508796036, 0.29402957472463054, 0.9435578570136944, 0.6257185003209204, 0.8602015732404901, 0.8489832996771431, 0.9818416090522923, 0.2409822864456611, 0.2903063412396688, 0.8604701195768565, 0.5178716013807514, 0.11760078250400852, 0.39123661619969485, 0.04982302342347622, 0.6584967064677989, 0.21650287574210325, 0.2351023303537475, 0.0052012439993269766, 0.5929583784960885, 0.9486169225935627, 0.9300804405465859, 0.864337032596597, 0.4762397096102663, 0.6559404194863174, 0.6110239777937657, 0.8392289065326435, 0.1696824372979353, 0.12212104814386848, 0.3414830737010782, 0.4489663924315944], [0.3629593520656984, 0.17457933702016637, 0.05149031836549356, 0.18576687075613285, 0.6686604536472496, 0.8526794247296627, 0.7270124564932968, 0.17456129523764452, 0.6273163733006182, 0.34905624279725256, 0.5824721842854241, 0.7182099695918125, 0.36953623835078053, 0.37194973679533805, 0.8661626866865706, 0.08684765547602669, 0.6410873824747795, 0.42773385507948203, 0.07685724399429672, 0.04274241088572861, 0.15832164476101385, 0.007791874857678072, 0.37450642615765006, 0.15978862657695425, 0.6706323510290298, 0.14934231259209074, 0.6597962011204804, 0.828071299458373, 0.19595988795978525, 0.8942515069066316, 0.5898243676223468, 0.40549518028025944, 0.6806402456027594, 0.15424719059011505, 0.33799227540260557, 0.44815730424060396, 0.8678636572775412, 0.9591369119574622, 0.24401049029339916, 0.8738465819727226], [0.1690472868848456, 0.15982775656362325, 0.889349749676769, 0.1193452637747332, 0.010094463839263268, 0.7117303185165009, 0.6688553177203382, 0.9495513899038759, 0.6985782771165809, 0.341294936748468, 0.07117612450072275, 0.5993553414826165, 0.7237370311103261, 0.64548837853116, 0.7770484483999378, 0.14452353236823912, 0.6881781255295636, 0.64509511826331, 0.9059985517976321, 0.02644992029072124, 0.6878235580597813, 0.8051918199616186, 0.1824185654598801, 0.29228543268980534, 0.9598098860972485, 0.2804224247848738, 0.42891885556852016, 0.9882816442142877, 0.022497795243496044, 0.84583571568372, 0.2649880893907317, 0.07036995549724268, 0.6528533580457601, 0.7782244601533626, 0.7578169324352917, 0.4619772576802913, 0.6039864146789575, 0.5498813980980128, 0.8749956641813113, 0.5522943842175541], [0.3177093275545816, 0.9691897196803771, 0.8696711091197302, 0.08766665694143672, 0.8486678217730139, 0.81970091482655, 0.7203714054613719, 0.03472934257779081, 0.5607158617256353, 0.7765179838652718, 0.21019735186973387, 0.3372156595933161, 0.37867149635258956, 0.6861111728145721, 0.8915652103857217, 0.04264506577341598, 0.09080113452771876, 0.1911262054406635, 0.38187720772999956, 0.3474113095879102, 0.7324654566658749, 0.42966948430863383, 0.7082816839535698, 0.659897870254417, 0.4783141545537971, 0.8644156379291156, 0.5116403695294546, 0.6029999864785116, 0.6553678973496069, 0.39182456217094885, 0.48409638222416485, 0.9659888096081811, 0.7680208091475625, 0.2572600687057246, 0.7572855222841322, 0.19625289842302496, 0.9807709530608029, 0.8091585978943232, 0.26971744998534153, 0.8004207787455574]]
bestbot_bias_layer_two = [0.7236707838124047, 0.5469334677476838, 0.11561437612681269, 0.5821607110044735, 0.45871832125546574, 0.8552296092962862, 0.007646318172703559, 0.2720926735806478, 0.05806296272320988, 0.6629829785768987, 0.8143311942135837, 0.5648823713708742, 0.3992116579674766, 0.8515349919465708, 0.9016721554683195, 0.11641065253486149, 0.45501842872990517, 0.881829583883305, 0.08493463605949203, 0.5790171406725497, 0.10712502740359742, 0.9241950512926693, 0.9334346247203467, 0.38159813438654233, 0.9430263691706117, 0.18113409534523284, 0.021094432956666465, 0.026373663005672454, 0.4801327108765785, 0.5849999008307452, 0.8816674242640268, 0.10171777930599624, 0.850009256861808, 0.366869022748592, 0.35460458589602895, 0.2516281059216402, 0.1320042290107568, 0.40728268154862224, 0.21170983886597594, 0.3660064095362576]
bestbot_wieght_layer_three = [0.06480433624230608, 0.9667029783113225, 0.3916478474327115, 0.27727796299577, 0.5346227874678943, 0.7027078882811499, 0.6300996254734779, 0.8832495456573777, 0.514668152396727, 0.7587983629552989, 0.08605372440328218, 0.579410066184372, 0.0016391077459979586, 0.33214408605564716, 0.7835458423749675, 0.11671668680627967, 0.060741289244867214, 0.9783051760770657, 0.38138874019505964, 0.8916233584096597, 0.2880026943412871, 0.08917480201264472, 0.46464817342507114, 0.34289554474290385, 0.11864272278461341, 0.6353764944671949, 0.10166444017817244, 0.27861090986625714, 0.4028054942221707, 0.20828621916567047, 0.42462866175880887, 0.9939057256125428, 0.29623919762354056, 0.08533685705533767, 0.14564121957995468, 0.7607408335869575, 0.4890451481022672, 0.8374620187614255, 0.3891534352530499, 0.10356785122945955]
bestbot_bias_layer_three = [0.1480601550921955, 0.6215676624975024, 0.23126579264775105, 0.8622107364366359, 0.7764421152072524, 0.2275928381685819, 0.4847569567867478, 0.35511664364325524]
bestbot_fitness = 78.68742684241911
| 14,160.25
| 72,330
| 0.850674
| 11,164
| 113,282
| 8.63015
| 0.499731
| 0.000405
| 0.00056
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.893372
| 0.049346
| 113,282
| 7
| 72,331
| 16,183.142857
| 0.001281
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
8a35d37b3b96ee741ea3fb2d2601e9506971e334
| 135
|
py
|
Python
|
abc/139/A.py
|
tonko2/AtCoder
|
5d617072517881d226d7c8af09cb88684d41af7e
|
[
"Xnet",
"X11",
"CECILL-B"
] | 2
|
2022-01-22T07:56:58.000Z
|
2022-01-24T00:29:37.000Z
|
abc/139/A.py
|
tonko2/AtCoder
|
5d617072517881d226d7c8af09cb88684d41af7e
|
[
"Xnet",
"X11",
"CECILL-B"
] | null | null | null |
abc/139/A.py
|
tonko2/AtCoder
|
5d617072517881d226d7c8af09cb88684d41af7e
|
[
"Xnet",
"X11",
"CECILL-B"
] | null | null | null |
S = input()
T = input()
cnt = 0
if S[0] == T[0]:
cnt += 1
if S[1] == T[1]:
cnt += 1
if S[2] == T[2]:
cnt += 1
print(cnt)
| 10.384615
| 16
| 0.4
| 29
| 135
| 1.862069
| 0.310345
| 0.166667
| 0.222222
| 0.259259
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 0.333333
| 135
| 12
| 17
| 11.25
| 0.488889
| 0
| 0
| 0.3
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.1
| 1
| 0
| 1
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
8a7c9d9a39a5d3fbf0e35a2ecfb4b84745476062
| 26
|
py
|
Python
|
intro/part04-37_neighbours_in_list/src/neighbours_in_list.py
|
Hannah-Abi/python-pro-21
|
2ce32c4bf118054329d19afdf83c50561be1ada8
|
[
"MIT"
] | null | null | null |
intro/part04-37_neighbours_in_list/src/neighbours_in_list.py
|
Hannah-Abi/python-pro-21
|
2ce32c4bf118054329d19afdf83c50561be1ada8
|
[
"MIT"
] | null | null | null |
intro/part04-37_neighbours_in_list/src/neighbours_in_list.py
|
Hannah-Abi/python-pro-21
|
2ce32c4bf118054329d19afdf83c50561be1ada8
|
[
"MIT"
] | null | null | null |
# Write your solution here
| 26
| 26
| 0.807692
| 4
| 26
| 5.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153846
| 26
| 1
| 26
| 26
| 0.954545
| 0.923077
| 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
|
8a8e8fc17ce499ce6e6d41c7a9729b9857e73243
| 12,187
|
py
|
Python
|
tensorboard/data/provider_test.py
|
SamuelMarks/tensorboard
|
78c919738f228265b9a06b86e1e5c5daa2135a0d
|
[
"Apache-2.0"
] | null | null | null |
tensorboard/data/provider_test.py
|
SamuelMarks/tensorboard
|
78c919738f228265b9a06b86e1e5c5daa2135a0d
|
[
"Apache-2.0"
] | null | null | null |
tensorboard/data/provider_test.py
|
SamuelMarks/tensorboard
|
78c919738f228265b9a06b86e1e5c5daa2135a0d
|
[
"Apache-2.0"
] | null | null | null |
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Unit tests for `tensorboard.data.provider`."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import six
from tensorboard import test as tb_test
from tensorboard.data import provider
class DataProviderTest(tb_test.TestCase):
def test_abstract(self):
with six.assertRaisesRegex(self, TypeError, "abstract class"):
provider.DataProvider()
class RunTest(tb_test.TestCase):
def test_eq(self):
a1 = provider.Run(run_id="a", run_name="aa", start_time=1.25)
a2 = provider.Run(run_id="a", run_name="aa", start_time=1.25)
b = provider.Run(run_id="b", run_name="bb", start_time=-1.75)
self.assertEqual(a1, a2)
self.assertNotEqual(a1, b)
self.assertNotEqual(b, object())
def test_repr(self):
x = provider.Run(run_id="alpha", run_name="bravo", start_time=1.25)
repr_ = repr(x)
self.assertIn(repr(x.run_id), repr_)
self.assertIn(repr(x.run_name), repr_)
self.assertIn(repr(x.start_time), repr_)
class ScalarTimeSeriesTest(tb_test.TestCase):
def test_repr(self):
x = provider.ScalarTimeSeries(
max_step=77,
max_wall_time=1234.5,
plugin_content=b"AB\xCD\xEF!\x00",
description="test test",
display_name="one two",
)
repr_ = repr(x)
self.assertIn(repr(x.max_step), repr_)
self.assertIn(repr(x.max_wall_time), repr_)
self.assertIn(repr(x.plugin_content), repr_)
self.assertIn(repr(x.description), repr_)
self.assertIn(repr(x.display_name), repr_)
def test_eq(self):
x1 = provider.ScalarTimeSeries(77, 1234.5, b"\x12", "one", "two")
x2 = provider.ScalarTimeSeries(77, 1234.5, b"\x12", "one", "two")
x3 = provider.ScalarTimeSeries(66, 4321.0, b"\x7F", "hmm", "hum")
self.assertEqual(x1, x2)
self.assertNotEqual(x1, x3)
self.assertNotEqual(x1, object())
def test_hash(self):
x1 = provider.ScalarTimeSeries(77, 1234.5, b"\x12", "one", "two")
x2 = provider.ScalarTimeSeries(77, 1234.5, b"\x12", "one", "two")
x3 = provider.ScalarTimeSeries(66, 4321.0, b"\x7F", "hmm", "hum")
self.assertEqual(hash(x1), hash(x2))
# The next check is technically not required by the `__hash__`
# contract, but _should_ pass; failure on this assertion would at
# least warrant some scrutiny.
self.assertNotEqual(hash(x1), hash(x3))
class ScalarDatumTest(tb_test.TestCase):
def test_repr(self):
x = provider.ScalarDatum(step=123, wall_time=234.5, value=-0.125)
repr_ = repr(x)
self.assertIn(repr(x.step), repr_)
self.assertIn(repr(x.wall_time), repr_)
self.assertIn(repr(x.value), repr_)
def test_eq(self):
x1 = provider.ScalarDatum(step=12, wall_time=0.25, value=1.25)
x2 = provider.ScalarDatum(step=12, wall_time=0.25, value=1.25)
x3 = provider.ScalarDatum(step=23, wall_time=3.25, value=-0.5)
self.assertEqual(x1, x2)
self.assertNotEqual(x1, x3)
self.assertNotEqual(x1, object())
def test_hash(self):
x1 = provider.ScalarDatum(step=12, wall_time=0.25, value=1.25)
x2 = provider.ScalarDatum(step=12, wall_time=0.25, value=1.25)
x3 = provider.ScalarDatum(step=23, wall_time=3.25, value=-0.5)
self.assertEqual(hash(x1), hash(x2))
# The next check is technically not required by the `__hash__`
# contract, but _should_ pass; failure on this assertion would at
# least warrant some scrutiny.
self.assertNotEqual(hash(x1), hash(x3))
class TensorTimeSeriesTest(tb_test.TestCase):
def test_repr(self):
x = provider.TensorTimeSeries(
max_step=77,
max_wall_time=1234.5,
plugin_content=b"AB\xCD\xEF!\x00",
description="test test",
display_name="one two",
)
repr_ = repr(x)
self.assertIn(repr(x.max_step), repr_)
self.assertIn(repr(x.max_wall_time), repr_)
self.assertIn(repr(x.plugin_content), repr_)
self.assertIn(repr(x.description), repr_)
self.assertIn(repr(x.display_name), repr_)
def test_eq(self):
x1 = provider.TensorTimeSeries(77, 1234.5, b"\x12", "one", "two")
x2 = provider.TensorTimeSeries(77, 1234.5, b"\x12", "one", "two")
x3 = provider.TensorTimeSeries(66, 4321.0, b"\x7F", "hmm", "hum")
self.assertEqual(x1, x2)
self.assertNotEqual(x1, x3)
self.assertNotEqual(x1, object())
def test_hash(self):
x1 = provider.TensorTimeSeries(77, 1234.5, b"\x12", "one", "two")
x2 = provider.TensorTimeSeries(77, 1234.5, b"\x12", "one", "two")
x3 = provider.TensorTimeSeries(66, 4321.0, b"\x7F", "hmm", "hum")
self.assertEqual(hash(x1), hash(x2))
# The next check is technically not required by the `__hash__`
# contract, but _should_ pass; failure on this assertion would at
# least warrant some scrutiny.
self.assertNotEqual(hash(x1), hash(x3))
class TensorDatumTest(tb_test.TestCase):
def test_repr(self):
x = provider.TensorDatum(
step=123, wall_time=234.5, numpy=np.array(-0.25)
)
repr_ = repr(x)
self.assertIn(repr(x.step), repr_)
self.assertIn(repr(x.wall_time), repr_)
self.assertIn(repr(x.numpy), repr_)
def test_eq(self):
nd = np.array
x1 = provider.TensorDatum(step=12, wall_time=0.25, numpy=nd([1.0, 2.0]))
x2 = provider.TensorDatum(step=12, wall_time=0.25, numpy=nd([1.0, 2.0]))
x3 = provider.TensorDatum(
step=23, wall_time=3.25, numpy=nd([-0.5, -2.5])
)
self.assertEqual(x1, x2)
self.assertNotEqual(x1, x3)
self.assertNotEqual(x1, object())
def test_eq_with_rank0_tensor(self):
x1 = provider.TensorDatum(
step=12, wall_time=0.25, numpy=np.array([1.25])
)
x2 = provider.TensorDatum(
step=12, wall_time=0.25, numpy=np.array([1.25])
)
x3 = provider.TensorDatum(
step=23, wall_time=3.25, numpy=np.array([1.25])
)
self.assertEqual(x1, x2)
self.assertNotEqual(x1, x3)
self.assertNotEqual(x1, object())
def test_hash(self):
x = provider.TensorDatum(
step=12, wall_time=0.25, numpy=np.array([1.25])
)
with six.assertRaisesRegex(self, TypeError, "unhashable type"):
hash(x)
class BlobSequenceTimeSeriesTest(tb_test.TestCase):
def test_repr(self):
x = provider.BlobSequenceTimeSeries(
max_step=77,
max_wall_time=1234.5,
latest_max_index=6,
plugin_content=b"AB\xCD\xEF!\x00",
description="test test",
display_name="one two",
)
repr_ = repr(x)
self.assertIn(repr(x.max_step), repr_)
self.assertIn(repr(x.max_wall_time), repr_)
self.assertIn(repr(x.latest_max_index), repr_)
self.assertIn(repr(x.plugin_content), repr_)
self.assertIn(repr(x.description), repr_)
self.assertIn(repr(x.display_name), repr_)
def test_eq(self):
x1 = provider.BlobSequenceTimeSeries(
77, 1234.5, 6, b"\x12", "one", "two"
)
x2 = provider.BlobSequenceTimeSeries(
77, 1234.5, 6, b"\x12", "one", "two"
)
x3 = provider.BlobSequenceTimeSeries(
66, 4321.0, 7, b"\x7F", "hmm", "hum"
)
self.assertEqual(x1, x2)
self.assertNotEqual(x1, x3)
self.assertNotEqual(x1, object())
def test_hash(self):
x1 = provider.BlobSequenceTimeSeries(
77, 1234.5, 6, b"\x12", "one", "two"
)
x2 = provider.BlobSequenceTimeSeries(
77, 1234.5, 6, b"\x12", "one", "two"
)
x3 = provider.BlobSequenceTimeSeries(
66, 4321.0, 7, b"\x7F", "hmm", "hum"
)
self.assertEqual(hash(x1), hash(x2))
# The next check is technically not required by the `__hash__`
# contract, but _should_ pass; failure on this assertion would at
# least warrant some scrutiny.
self.assertNotEqual(hash(x1), hash(x3))
class BlobReferenceTest(tb_test.TestCase):
def test_repr(self):
x = provider.BlobReference(url="foo", blob_key="baz")
repr_ = repr(x)
self.assertIn(repr(x.url), repr_)
self.assertIn(repr(x.blob_key), repr_)
def test_eq(self):
x1 = provider.BlobReference(url="foo", blob_key="baz")
x2 = provider.BlobReference(url="foo", blob_key="baz")
x3 = provider.BlobReference(url="foo", blob_key="qux")
self.assertEqual(x1, x2)
self.assertNotEqual(x1, x3)
self.assertNotEqual(x1, object())
def test_hash(self):
x1 = provider.BlobReference(url="foo", blob_key="baz")
x2 = provider.BlobReference(url="foo", blob_key="baz")
x3 = provider.BlobReference(url="foo", blob_key="qux")
self.assertEqual(hash(x1), hash(x2))
# The next check is technically not required by the `__hash__`
# contract, but _should_ pass; failure on this assertion would at
# least warrant some scrutiny.
self.assertNotEqual(hash(x1), hash(x3))
class BlobSequenceDatumTest(tb_test.TestCase):
def test_repr(self):
x = provider.BlobSequenceDatum(
step=123, wall_time=234.5, values=("foo", "bar", "baz")
)
repr_ = repr(x)
self.assertIn(repr(x.step), repr_)
self.assertIn(repr(x.wall_time), repr_)
self.assertIn(repr(x.values), repr_)
def test_eq(self):
x1 = provider.BlobSequenceDatum(
step=12, wall_time=0.25, values=("foo", "bar", "baz")
)
x2 = provider.BlobSequenceDatum(
step=12, wall_time=0.25, values=("foo", "bar", "baz")
)
x3 = provider.BlobSequenceDatum(
step=23, wall_time=3.25, values=("qux",)
)
self.assertEqual(x1, x2)
self.assertNotEqual(x1, x3)
self.assertNotEqual(x1, object())
def test_hash(self):
x1 = provider.BlobSequenceDatum(
step=12, wall_time=0.25, values=("foo", "bar", "baz")
)
x2 = provider.BlobSequenceDatum(
step=12, wall_time=0.25, values=("foo", "bar", "baz")
)
x3 = provider.BlobSequenceDatum(
step=23, wall_time=3.25, values=("qux",)
)
self.assertEqual(hash(x1), hash(x2))
# The next check is technically not required by the `__hash__`
# contract, but _should_ pass; failure on this assertion would at
# least warrant some scrutiny.
self.assertNotEqual(hash(x1), hash(x3))
class RunTagFilterTest(tb_test.TestCase):
def test_defensive_copy(self):
runs = ["r1"]
tags = ["t1"]
f = provider.RunTagFilter(runs, tags)
runs.append("r2")
tags.pop()
self.assertEqual(frozenset(f.runs), frozenset(["r1"]))
self.assertEqual(frozenset(f.tags), frozenset(["t1"]))
def test_repr(self):
x = provider.RunTagFilter(runs=["one", "two"], tags=["three", "four"])
repr_ = repr(x)
self.assertIn(repr(x.runs), repr_)
self.assertIn(repr(x.tags), repr_)
if __name__ == "__main__":
tb_test.main()
| 37.383436
| 80
| 0.60983
| 1,584
| 12,187
| 4.550505
| 0.132576
| 0.028441
| 0.071032
| 0.075472
| 0.787875
| 0.752358
| 0.736404
| 0.723779
| 0.711709
| 0.674806
| 0
| 0.05354
| 0.249036
| 12,187
| 325
| 81
| 37.498462
| 0.734047
| 0.133503
| 0
| 0.64
| 0
| 0
| 0.042478
| 0
| 0
| 0
| 0
| 0
| 0.3
| 1
| 0.108
| false
| 0
| 0.028
| 0
| 0.176
| 0.004
| 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
|
8abc2371b09e8589c8903e0bd7aec7b41b5e2dc5
| 131,968
|
py
|
Python
|
third_party/blink/tools/blinkpy/web_tests/run_web_tests_unittest.py
|
Ron423c/chromium
|
2edf7b980065b648f8b2a6e52193d83832fe36b7
|
[
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 575
|
2015-06-18T23:58:20.000Z
|
2022-03-23T09:32:39.000Z
|
third_party/blink/tools/blinkpy/web_tests/run_web_tests_unittest.py
|
Ron423c/chromium
|
2edf7b980065b648f8b2a6e52193d83832fe36b7
|
[
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 113
|
2015-05-04T09:58:14.000Z
|
2022-01-31T19:35:03.000Z
|
third_party/blink/tools/blinkpy/web_tests/run_web_tests_unittest.py
|
iridium-browser/iridium-browser
|
907e31cf5ce5ad14d832796e3a7c11e496828959
|
[
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 52
|
2015-07-14T10:40:50.000Z
|
2022-03-15T01:11:49.000Z
|
# Copyright (C) 2010 Google Inc. All rights reserved.
# Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged
# Copyright (C) 2011 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import json
import os
import re
import StringIO
import sys
import unittest
from blinkpy.common import exit_codes
from blinkpy.common import path_finder
from blinkpy.common.host import Host
from blinkpy.common.host_mock import MockHost
from blinkpy.common.path_finder import WEB_TESTS_LAST_COMPONENT
from blinkpy.common.system.path import abspath_to_uri
from blinkpy.common.system.system_host import SystemHost
from blinkpy.w3c.wpt_manifest import MANIFEST_NAME
from blinkpy.web_tests import run_web_tests
from blinkpy.web_tests.models import test_expectations
from blinkpy.web_tests.models import test_failures
from blinkpy.web_tests.models.typ_types import ResultType
from blinkpy.web_tests.port import test
from blinkpy.web_tests.views.printing import Printer
import mock # pylint: disable=wrong-import-position
def parse_args(extra_args=None, tests_included=False):
extra_args = extra_args or []
args = []
if not '--platform' in extra_args:
args.extend(['--platform', 'test'])
if not {'--jobs', '-j', '--child-processes'}.intersection(set(args)):
args.extend(['--jobs', 1])
args.extend(extra_args)
if not tests_included:
# We use the glob to test that globbing works.
args.extend(
['passes', 'http/tests', 'websocket/tests', 'failures/expected/*'])
return run_web_tests.parse_args(args)
def passing_run(extra_args=None,
port_obj=None,
tests_included=False,
host=None,
shared_port=True):
options, parsed_args = parse_args(extra_args, tests_included)
if not port_obj:
host = host or MockHost()
port_obj = host.port_factory.get(
port_name=options.platform, options=options)
if shared_port:
port_obj.host.port_factory.get = lambda *args, **kwargs: port_obj
printer = Printer(host, options, StringIO.StringIO())
run_details = run_web_tests.run(port_obj, options, parsed_args, printer)
return run_details.exit_code == 0
def logging_run(extra_args=None,
port_obj=None,
tests_included=False,
host=None,
shared_port=True):
options, parsed_args = parse_args(
extra_args=extra_args, tests_included=tests_included)
host = host or MockHost()
if not port_obj:
port_obj = host.port_factory.get(
port_name=options.platform, options=options)
run_details, output = run_and_capture(port_obj, options, parsed_args,
shared_port)
return (run_details, output, host.user)
def run_and_capture(port_obj, options, parsed_args, shared_port=True):
if shared_port:
port_obj.host.port_factory.get = lambda *args, **kwargs: port_obj
logging_stream = StringIO.StringIO()
printer = Printer(port_obj.host, options, logging_stream)
run_details = run_web_tests.run(port_obj, options, parsed_args, printer)
return (run_details, logging_stream)
def get_tests_run(args, host=None, port_obj=None):
results = get_test_results(args, host=host, port_obj=port_obj)
return [result.test_name for result in results]
def get_test_batches(args, host=None):
results = get_test_results(args, host)
batches = []
batch = []
current_pid = None
for result in results:
if batch and result.pid != current_pid:
batches.append(batch)
batch = []
batch.append(result.test_name)
if batch:
batches.append(batch)
return batches
def get_test_results(args, host=None, port_obj=None):
options, parsed_args = parse_args(args, tests_included=True)
host = host or MockHost()
port_obj = port_obj or host.port_factory.get(
port_name=options.platform, options=options)
printer = Printer(host, options, StringIO.StringIO())
run_details = run_web_tests.run(port_obj, options, parsed_args, printer)
all_results = []
if run_details.initial_results:
all_results.extend(run_details.initial_results.all_results)
for retry_results in run_details.all_retry_results:
all_results.extend(retry_results.all_results)
return all_results
def parse_full_results(full_results_text):
json_to_eval = full_results_text.replace('ADD_RESULTS(', '').replace(
');', '')
compressed_results = json.loads(json_to_eval)
return compressed_results
class StreamTestingMixin(object):
def assert_contains(self, stream, string):
self.assertIn(string, stream.getvalue())
def assert_not_empty(self, stream):
self.assertTrue(stream.getvalue())
class RunTest(unittest.TestCase, StreamTestingMixin):
def setUp(self):
# A real PlatformInfo object is used here instead of a
# MockPlatformInfo because we need to actually check for
# Windows and Mac to skip some tests.
self._platform = SystemHost().platform
def test_basic(self):
options, args = parse_args(
extra_args=[
'--json-failing-test-results',
'/tmp/json_failing_test_results.json'
],
tests_included=True)
logging_stream = StringIO.StringIO()
host = MockHost()
port_obj = host.port_factory.get(options.platform, options)
printer = Printer(host, options, logging_stream)
details = run_web_tests.run(port_obj, options, args, printer)
# These numbers will need to be updated whenever we add new tests.
self.assertEqual(details.initial_results.total, test.TOTAL_TESTS)
self.assertEqual(details.initial_results.expected_skips,
test.TOTAL_SKIPS)
self.assertEqual(
len(details.initial_results.unexpected_results_by_name),
test.UNEXPECTED_PASSES + test.UNEXPECTED_FAILURES)
self.assertEqual(details.exit_code, test.UNEXPECTED_FAILURES)
self.assertEqual(details.all_retry_results[0].total,
test.UNEXPECTED_FAILURES)
expected_tests = (
details.initial_results.total -
details.initial_results.expected_skips - len(
details.initial_results.unexpected_results_by_name))
expected_summary_str = ''
if details.initial_results.expected_failures > 0:
expected_summary_str = " (%d passed, %d didn't)" % (
expected_tests - details.initial_results.expected_failures,
details.initial_results.expected_failures)
one_line_summary = "%d tests ran as expected%s, %d didn't:\n" % (
expected_tests, expected_summary_str,
len(details.initial_results.unexpected_results_by_name))
self.assertIn(one_line_summary, logging_stream.buflist)
# Ensure the results were summarized properly.
self.assertEqual(details.summarized_failing_results['num_regressions'],
details.exit_code)
# Ensure the results were written out and displayed.
failing_results_text = host.filesystem.read_text_file(
'/tmp/layout-test-results/failing_results.json')
json_to_eval = failing_results_text.replace('ADD_RESULTS(',
'').replace(');', '')
self.assertEqual(
json.loads(json_to_eval), details.summarized_failing_results)
full_results_text = host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json')
self.assertEqual(
json.loads(full_results_text), details.summarized_full_results)
self.assertEqual(host.user.opened_urls, [
abspath_to_uri(MockHost().platform,
'/tmp/layout-test-results/results.html')
])
def test_max_locked_shards(self):
# Tests for the default of using one locked shard even in the case of more than one child process.
_, regular_output, _ = logging_run(
['--debug-rwt-logging', '--jobs', '2'], shared_port=False)
self.assertTrue(
any('1 locked' in line for line in regular_output.buflist))
def test_child_processes_2(self):
_, regular_output, _ = logging_run(
['--debug-rwt-logging', '--jobs', '2'], shared_port=False)
self.assertTrue(
any(['Running 2 ' in line for line in regular_output.buflist]))
def test_child_processes_min(self):
_, regular_output, _ = logging_run([
'--debug-rwt-logging', '--jobs', '2', '-i',
'passes/virtual_passes', 'passes'
],
tests_included=True,
shared_port=False)
self.assertTrue(
any(['Running 1 ' in line for line in regular_output.buflist]))
def test_dryrun(self):
tests_run = get_tests_run(['--dry-run'])
self.assertEqual(tests_run, [])
tests_run = get_tests_run(['-n'])
self.assertEqual(tests_run, [])
def test_enable_sanitizer(self):
self.assertTrue(
passing_run([
'--enable-sanitizer', '--order', 'natural',
'failures/expected/text.html'
]))
def test_exception_raised(self):
# Exceptions raised by a worker are treated differently depending on
# whether they are in-process or out. inline exceptions work as normal,
# which allows us to get the full stack trace and traceback from the
# worker. The downside to this is that it could be any error, but this
# is actually useful in testing.
#
# Exceptions raised in a separate process are re-packaged into
# WorkerExceptions (a subclass of BaseException), which have a string capture of the stack which can
# be printed, but don't display properly in the unit test exception handlers.
with self.assertRaises(BaseException):
logging_run(['failures/expected/exception.html', '--jobs', '1'],
tests_included=True)
with self.assertRaises(BaseException):
logging_run([
'--jobs', '2', '--skipped=ignore',
'failures/expected/exception.html', 'passes/text.html'
],
tests_included=True,
shared_port=False)
def test_device_failure(self):
# Test that we handle a device going offline during a test properly.
host = MockHost()
details, regular_output, _ = logging_run(
['passes/text.html',
'failures/expected/device_failure.html',
'--ignore-default-expectations', '--order=none'], tests_included=True,
host=host)
self.assertEqual(details.exit_code, exit_codes.EARLY_EXIT_STATUS)
output = regular_output.getvalue()
self.assertIn('failed unexpectedly (skipped due to early exit)', output)
self.assertIn('worker/0 has failed', output)
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
self.assertEqual(results['num_regressions'], 1)
test_results = results['tests']['failures']['expected']['device_failure.html']
self.assertEqual(test_results['actual'], 'SKIP')
self.assertEqual(test_results['is_regression'], True)
self.assertIn('All workers have device failures. Exiting.', output)
self.assertEqual(results['tests']['passes']['text.html']['actual'], 'PASS')
def test_keyboard_interrupt(self):
# Note that this also tests running a test marked as SKIP if
# you specify it explicitly.
details, _, _ = logging_run(
['failures/expected/keyboard.html', '--jobs', '1'],
tests_included=True)
self.assertEqual(details.exit_code, exit_codes.INTERRUPTED_EXIT_STATUS)
_, regular_output, _ = logging_run([
'failures/expected/keyboard.html', 'passes/text.html', '--jobs',
'2', '--skipped=ignore'
],
tests_included=True,
shared_port=False)
self.assertTrue(
any([
'Interrupted, exiting' in line
for line in regular_output.buflist
]))
def test_no_tests_found(self):
details, err, _ = logging_run(['resources'], tests_included=True)
self.assertEqual(details.exit_code, exit_codes.NO_TESTS_EXIT_STATUS)
self.assert_contains(err, 'No tests to run.\n')
def test_no_tests_found_2(self):
details, err, _ = logging_run(['foo'], tests_included=True)
self.assertEqual(details.exit_code, exit_codes.NO_TESTS_EXIT_STATUS)
self.assert_contains(err, 'No tests to run.\n')
def test_no_tests_found_3(self):
details, err, _ = logging_run(
['--shard-index', '4', '--total-shards', '400', 'foo/bar.html'],
tests_included=True)
self.assertEqual(details.exit_code, exit_codes.NO_TESTS_EXIT_STATUS)
self.assert_contains(err, 'No tests to run.\n')
def test_no_tests_found_with_ok_flag(self):
details, err, _ = logging_run(
['resources', '--zero-tests-executed-ok'], tests_included=True)
self.assertEqual(details.exit_code, exit_codes.OK_EXIT_STATUS)
self.assert_contains(err, 'No tests to run.\n')
def test_no_tests_found_with_ok_flag_shards(self):
details, err, _ = logging_run([
'--shard-index', '4', '--total-shards', '40', 'foo/bar.html',
'--zero-tests-executed-ok'
],
tests_included=True)
self.assertEqual(details.exit_code, exit_codes.OK_EXIT_STATUS)
self.assert_contains(err, 'No tests to run.\n')
def test_natural_order(self):
tests_to_run = [
'passes/audio.html', 'failures/expected/text.html',
'failures/unexpected/missing_text.html', 'passes/args.html'
]
tests_run = get_tests_run(['--order=natural'] + tests_to_run)
self.assertEqual([
'failures/expected/text.html',
'failures/unexpected/missing_text.html', 'passes/args.html',
'passes/audio.html'
], tests_run)
def test_natural_order_test_specified_multiple_times(self):
tests_to_run = [
'passes/args.html', 'passes/audio.html', 'passes/audio.html',
'passes/args.html'
]
tests_run = get_tests_run(['--order=natural'] + tests_to_run)
# because of deduping the test list, they should be run once.
self.assertEqual([
'passes/args.html', 'passes/audio.html'
], tests_run)
def test_random_order(self):
tests_to_run = [
'passes/audio.html', 'failures/expected/text.html',
'failures/unexpected/missing_text.html', 'passes/args.html'
]
tests_run = get_tests_run(['--order=random'] + tests_to_run)
self.assertEqual(sorted(tests_to_run), sorted(tests_run))
def test_random_order_with_seed(self):
tests_to_run = [
'failures/expected/text.html',
'failures/unexpected/missing_text.html',
'passes/args.html',
'passes/audio.html',
]
tests_run = get_tests_run(['--order=random', '--seed=5'] +
sorted(tests_to_run))
expected_order = [
'failures/expected/text.html',
'failures/unexpected/missing_text.html',
'passes/audio.html',
'passes/args.html',
]
self.assertEqual(tests_run, expected_order)
def test_random_order_with_timestamp_seed(self):
tests_to_run = sorted([
'failures/unexpected/missing_text.html',
'failures/expected/text.html',
'passes/args.html',
'passes/audio.html',
])
run_1 = get_tests_run(
['--order=random'] + tests_to_run,
host=MockHost(time_return_val=10))
run_2 = get_tests_run(
['--order=random'] + tests_to_run,
host=MockHost(time_return_val=10))
self.assertEqual(run_1, run_2)
run_3 = get_tests_run(
['--order=random'] + tests_to_run,
host=MockHost(time_return_val=20))
self.assertNotEqual(run_1, run_3)
def test_random_order_test_specified_multiple_times(self):
tests_to_run = [
'passes/args.html', 'passes/audio.html', 'passes/audio.html',
'passes/args.html'
]
tests_run = get_tests_run(['--order=random'] + tests_to_run)
# because of deduping the test list, they should be run once.
self.assertEqual(tests_run.count('passes/audio.html'), 1)
self.assertEqual(tests_run.count('passes/args.html'), 1)
def test_no_order(self):
tests_to_run = [
'passes/audio.html', 'failures/expected/text.html',
'failures/unexpected/missing_text.html', 'passes/args.html'
]
tests_run = get_tests_run(['--order=none'] + tests_to_run)
self.assertEqual(tests_to_run, tests_run)
def test_no_order_test_specified_multiple_times(self):
tests_to_run = [
'passes/args.html', 'passes/audio.html', 'passes/audio.html',
'passes/args.html'
]
tests_run = get_tests_run(['--order=none'] + tests_to_run)
# because of deduping the test list, they should be run once.
self.assertEqual(['passes/args.html', 'passes/audio.html'], tests_run)
def test_no_order_with_directory_entries_in_natural_order(self):
tests_to_run = ['http/tests/ssl', 'perf/foo', 'http/tests/passes']
tests_run = get_tests_run(['--order=none'] + tests_to_run)
self.assertEqual(tests_run, [
'http/tests/ssl/text.html', 'perf/foo/test.html',
'http/tests/passes/image.html', 'http/tests/passes/text.html'
])
def test_repeat_each(self):
tests_to_run = ['passes/image.html', 'passes/text.html']
tests_run = get_tests_run(
['--repeat-each', '2', '--order', 'natural'] + tests_to_run)
self.assertEqual(tests_run, [
'passes/image.html', 'passes/image.html', 'passes/text.html',
'passes/text.html'
])
def test_gtest_repeat(self):
tests_to_run = ['passes/image.html', 'passes/text.html']
tests_run = get_tests_run(
['--gtest_repeat', '2', '--order', 'natural'] + tests_to_run)
self.assertEqual(tests_run, [
'passes/image.html', 'passes/text.html', 'passes/image.html',
'passes/text.html'
])
def test_gtest_repeat_overrides_iterations(self):
tests_to_run = ['passes/image.html', 'passes/text.html']
tests_run = get_tests_run(
['--iterations', '4', '--gtest_repeat', '2', '--order', 'natural'
] + tests_to_run)
self.assertEqual(tests_run, [
'passes/image.html', 'passes/text.html', 'passes/image.html',
'passes/text.html'
])
def test_ignore_flag(self):
# Note that passes/image.html is expected to be run since we specified it directly.
tests_run = get_tests_run(['-i', 'passes', 'passes/image.html'])
self.assertNotIn('passes/text.html', tests_run)
self.assertIn('passes/image.html', tests_run)
def test_skipped_flag(self):
tests_run = get_tests_run(['passes'])
self.assertNotIn('passes/skipped/skip.html', tests_run)
num_tests_run_by_default = len(tests_run)
# Check that nothing changes when we specify skipped=default.
self.assertEqual(
len(get_tests_run(['--skipped=default', 'passes'])),
num_tests_run_by_default)
# Now check that we run one more test (the skipped one).
tests_run = get_tests_run(['--skipped=ignore', 'passes'])
self.assertIn('passes/skipped/skip.html', tests_run)
self.assertEqual(len(tests_run), num_tests_run_by_default + 1)
# Now check that we only run the skipped test.
self.assertEqual(
get_tests_run(['--skipped=only', 'passes']),
['passes/skipped/skip.html'])
# Now check that we don't run anything.
self.assertEqual(
get_tests_run(['--skipped=always', 'passes/skipped/skip.html']),
[])
def test_isolated_script_test_also_run_disabled_tests(self):
self.assertEqual(
sorted(
get_tests_run([
'--isolated-script-test-also-run-disabled-tests', 'passes'
])), sorted(get_tests_run(['--skipped=ignore', 'passes'])))
def test_gtest_also_run_disabled_tests(self):
self.assertEqual(
sorted(
get_tests_run(['--gtest_also_run_disabled_tests', 'passes'])),
sorted(get_tests_run(['--skipped=ignore', 'passes'])))
def test_iterations(self):
tests_to_run = ['passes/image.html', 'passes/text.html']
tests_run = get_tests_run(['--iterations', '2', '--order', 'natural'] +
tests_to_run)
self.assertEqual(tests_run, [
'passes/image.html', 'passes/text.html', 'passes/image.html',
'passes/text.html'
])
def test_repeat_each_iterations_num_tests(self):
# The total number of tests should be: number_of_tests *
# repeat_each * iterations
host = MockHost()
_, err, _ = logging_run([
'--iterations', '2', '--repeat-each', '4', '--debug-rwt-logging',
'passes/text.html', 'failures/expected/text.html'
],
tests_included=True,
host=host)
self.assert_contains(
err, "All 16 tests ran as expected (8 passed, 8 didn't).\n")
def test_skip_failing_tests(self):
# This tests that we skip both known failing and known flaky tests. Because there are
# no known flaky tests in the default test_expectations, we add additional expectations.
host = MockHost()
host.filesystem.write_text_file(
'/tmp/additional.txt',
'# results: [ Failure Pass ]\npasses/image.html [ Failure Pass ]\n'
)
batches = get_test_batches([
'--skip-failing-tests',
'--additional-expectation=/tmp/additional.txt',
],
host=host)
has_passes_text = False
for batch in batches:
self.assertNotIn('failures/expected/text.html', batch)
self.assertNotIn('passes/image.html', batch)
has_passes_text = has_passes_text or ('passes/text.html' in batch)
self.assertTrue(has_passes_text)
def test_single_file(self):
tests_run = get_tests_run(['passes/text.html'])
self.assertEqual(tests_run, ['passes/text.html'])
def test_single_file_with_prefix(self):
tests_run = get_tests_run(
[WEB_TESTS_LAST_COMPONENT + '/passes/text.html'])
self.assertEqual(['passes/text.html'], tests_run)
def test_no_flag_specific_files_json_results(self):
host = MockHost()
port = host.port_factory.get('test-win-win7')
host.filesystem.write_text_file(
'/tmp/additional.txt',
'# results: [ Timeout ]\nfailures/expected/text.html [ Timeout ]')
self.assertTrue(
logging_run([
'--order=natural',
'--num-retries=1',
'--additional-driver-flag=--composite-after-paint',
'--additional-expectations=/tmp/additional.txt',
'failures/expected/text.html',
],
tests_included=True,
host=host))
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
test_results = results['tests']['failures']['expected']['text.html']
self.assertNotIn('flag_name', results)
self.assertNotIn('flag_expectations', test_results)
self.assertNotIn('base_expectations', test_results)
def test_no_flag_expectations_found_json_results(self):
host = MockHost()
port = host.port_factory.get('test-win-win7')
flag_exp_path = host.filesystem.join(
port.web_tests_dir(), 'FlagExpectations', 'composite-after-paint')
host.filesystem.write_text_file(
'/tmp/additional.txt',
'# results: [ Timeout ]\nfailures/expected/text.html [ Timeout ]')
host.filesystem.write_text_file(flag_exp_path, '')
self.assertTrue(
logging_run([
'--order=natural',
'--num-retries=1',
'--additional-driver-flag=--composite-after-paint',
'--additional-expectations=/tmp/additional.txt',
'failures/expected/text.html',
],
tests_included=True,
host=host))
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
test_results = results['tests']['failures']['expected']['text.html']
self.assertEqual(results['flag_name'], '/composite-after-paint')
self.assertNotIn('flag_expectations', test_results)
self.assertNotIn('base_expectations', test_results)
def test_pass_flag_expectations_in_json_results(self):
host = MockHost()
port = host.port_factory.get('test-win-win7')
flag_exp_path = host.filesystem.join(
port.web_tests_dir(), 'FlagExpectations', 'composite-after-paint')
host.filesystem.write_text_file(
'/tmp/additional.txt',
'# results: [ Timeout ]\nfailures/expected/text.html [ Timeout ]')
host.filesystem.write_text_file(
flag_exp_path,
'# results: [ Slow Pass ]\nfailures/expected/text.html [ Pass ]\n')
self.assertTrue(
logging_run([
'--order=natural',
'--num-retries=1',
'--additional-driver-flag=--composite-after-paint',
'--additional-expectations=/tmp/additional.txt',
'failures/expected/text.html',
],
tests_included=True,
host=host))
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
self.assertEqual(results['flag_name'], '/composite-after-paint')
test_results = results['tests']['failures']['expected']['text.html']
self.assertEqual(test_results['expected'], 'PASS')
self.assertEqual(test_results['flag_expectations'], ['PASS'])
self.assertEqual(test_results['base_expectations'],
['FAIL', 'TIMEOUT'])
def test_slow_flag_expectations_in_json_results(self):
host = MockHost()
port = host.port_factory.get('test-win-win7')
flag_exp_path = host.filesystem.join(port.web_tests_dir(),
'FlagExpectations',
'composite-after-paint')
host.filesystem.write_text_file(
'/tmp/additional.txt', '# results: [ Timeout Crash ]\n'
'failures/expected/text.html [ Timeout ]\n'
'failures/expected/image.html [ Crash ]')
host.filesystem.write_text_file(
flag_exp_path, '# results: [ Slow Pass ]\n'
'failures/expected/text.html [ Slow ]\n'
'failures/expected/image.html [ Pass Slow ]')
self.assertTrue(
logging_run([
'--order=natural',
'--num-retries=1',
'--additional-driver-flag=--composite-after-paint',
'--additional-expectations=/tmp/additional.txt',
'failures/expected/text.html',
'failures/expected/image.html',
],
tests_included=True,
host=host))
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
self.assertEqual(results['flag_name'], '/composite-after-paint')
text_results = results['tests']['failures']['expected']['text.html']
# A single [ Slow ] just indicates the test is slow, but doesn't create
# an explicit [ Pass ] expectation.
self.assertNotIn('flag_expectations', text_results)
self.assertNotIn('base_expectations', text_results)
self.assertEqual(text_results['expected'], 'FAIL TIMEOUT')
image_results = results['tests']['failures']['expected']['image.html']
self.assertEqual(image_results['expected'], 'PASS')
self.assertEqual(image_results['flag_expectations'], ['PASS'])
self.assertEqual(image_results['base_expectations'], ['FAIL', 'CRASH'])
def test_flag_and_base_expectations_in_json_results(self):
host = MockHost()
port = host.port_factory.get('test-win-win7')
flag_exp_path = host.filesystem.join(
port.web_tests_dir(), 'FlagExpectations', 'composite-after-paint')
host.filesystem.write_text_file(
'/tmp/additional.txt',
'# results: [ Timeout ]\nfailures/expected/text.html [ Timeout ]')
host.filesystem.write_text_file(
flag_exp_path,
'# results: [ Crash Failure ]\nfailures/expected/text.html [ Crash Failure ]'
)
self.assertTrue(
logging_run([
'--order=natural',
'--num-retries=1',
'--additional-driver-flag=--composite-after-paint',
'--additional-expectations=/tmp/additional.txt',
'failures/expected/text.html',
],
tests_included=True,
host=host))
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
test_results = results['tests']['failures']['expected']['text.html']
self.assertEqual(results['flag_name'], '/composite-after-paint')
self.assertEqual(test_results['expected'], 'FAIL CRASH')
self.assertEqual(test_results['flag_expectations'], ['FAIL', 'CRASH'])
self.assertEqual(test_results['base_expectations'],
['FAIL', 'TIMEOUT'])
def test_flag_and_default_base_expectations_in_json_results(self):
host = MockHost()
port = host.port_factory.get('test-win-win7')
flag_exp_path = host.filesystem.join(
port.web_tests_dir(), 'FlagExpectations', 'composite-after-paint')
host.filesystem.write_text_file(
flag_exp_path,
'# results: [ Failure ]\npasses/args.html [ Failure ]')
self.assertTrue(
logging_run([
'--order=natural',
'--num-retries=1',
'--additional-driver-flag=--composite-after-paint',
'passes/args.html',
],
tests_included=True,
host=host))
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
test_results = results['tests']['passes']['args.html']
self.assertEqual(results['flag_name'], '/composite-after-paint')
self.assertEqual(test_results['expected'], 'FAIL')
self.assertEqual(test_results['flag_expectations'], ['FAIL'])
self.assertEqual(test_results['base_expectations'], ['PASS'])
def test_stderr_is_saved(self):
host = MockHost()
self.assertTrue(passing_run(host=host))
self.assertEqual(
host.filesystem.read_text_file(
'/tmp/layout-test-results/passes/error-stderr.txt'),
'stuff going to stderr')
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
test_results = results['tests']['passes']['error.html']
self.assertEqual(test_results['artifacts']['stderr'],
['layout-test-results/passes/error-stderr.txt'])
def test_crash_log_is_saved(self):
host = MockHost()
self.assertTrue(
logging_run([
'--order', 'natural', 'failures/unexpected/crash.html',
'--num-retries', '1'
],
tests_included=True,
host=host))
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
self.assertEqual(
host.filesystem.read_text_file(
'/tmp/layout-test-results/failures/unexpected/crash-crash-log.txt'
), 'crash log')
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
test_results = results['tests']['failures']['unexpected']['crash.html']
self.assertEqual(test_results['artifacts']['crash_log'], [
'layout-test-results/failures/unexpected/crash-crash-log.txt',
'layout-test-results/retry_1/failures/unexpected/crash-crash-log.txt'
])
def test_crash_log_is_saved_after_delay(self):
host = MockHost()
self.assertTrue(
logging_run([
'--order', 'natural',
'failures/unexpected/crash-with-delayed-log.html',
'--num-retries', '1'
],
tests_included=True,
host=host))
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
self.assertEqual(
host.filesystem.read_text_file(
'/tmp/layout-test-results/failures/unexpected/crash-with-delayed-log-crash-log.txt'
), 'delayed crash log')
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
test_results = results['tests']['failures']['unexpected'][
'crash-with-delayed-log.html']
self.assertEqual(test_results['artifacts']['crash_log'], [
'layout-test-results/failures/unexpected/crash-with-delayed-log-crash-log.txt',
'layout-test-results/retry_1/failures/unexpected/crash-with-delayed-log-crash-log.txt'
])
def test_reftest_mismatch_with_text_mismatch_only_writes_stderr_once(self):
# test that there is no exception when two failure types, FailureTextMismatch and
# FailureReftestMismatch both have the same stderr to print out.
host = MockHost()
self.assertTrue(
logging_run([
'--order',
'natural',
'failures/unexpected/reftest-mismatch-with-text-mismatch-with-stderr.html',
],
tests_included=True,
host=host))
@unittest.skip('Need to make subprocesses use mock filesystem')
def test_crash_log_is_saved_after_delay_using_multiple_jobs(self):
# TODO(rmhasan): When web_test_runner.run() spawns multiple jobs it uses
# the non mock file system. We should figure out how to make all subprocesses
# use the mock file system.
host = MockHost()
self.assertTrue(
logging_run([
'--order', 'natural',
'failures/unexpected/crash-with-delayed-log.html',
'passes/args.html', '-j', '2'
],
tests_included=True,
host=host))
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
test_results = results['tests']['failures']['unexpected'][
'crash-with-delayed-log.html']
self.assertEqual(
test_results['artifacts']['crash_log'],
['failures/unexpected/crash-with-delayed-log-crash-log.txt'])
def test_crash_sample_file_is_saved(self):
host = MockHost()
self.assertTrue(
logging_run([
'--order', 'natural',
'failures/unexpected/crash-with-sample.html', '--num-retries',
'1'
],
tests_included=True,
host=host))
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
self.assertEqual(
host.filesystem.read_text_file(
'/tmp/layout-test-results/failures/unexpected/crash-with-sample-sample.txt'
), 'crash sample file')
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
test_results = results['tests']['failures']['unexpected'][
'crash-with-sample.html']
self.assertEqual(test_results['artifacts']['sample_file'], [
'layout-test-results/failures/unexpected/crash-with-sample-sample.txt',
'layout-test-results/retry_1/failures/unexpected/crash-with-sample-sample.txt'
])
@unittest.skip('Need to make subprocesses use mock filesystem')
def test_crash_sample_file_is_saved_multiple_jobs(self):
host = MockHost()
self.assertTrue(
logging_run([
'--order', 'natural',
'failures/unexpected/crash-with-sample.html',
'passes/image.html', '--num-retries', '1', '-j', '2'
],
tests_included=True,
host=host))
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
test_results = results['tests']['failures']['unexpected'][
'crash-with-sample.html']
self.assertEqual(test_results['artifacts']['sample_file'], [
'layout-test-results/failures/unexpected/crash-with-sample-sample.txt',
'layout-test-results/retry_1/failures/unexpected/crash-with-sample-sample.txt'
])
def test_reftest_crash_log_is_saved(self):
host = MockHost()
self.assertTrue(
logging_run([
'--order', 'natural', 'failures/unexpected/crash-reftest.html',
'--num-retries', '1'
],
tests_included=True,
host=host))
self.assertEqual(
host.filesystem.read_text_file(
'/tmp/layout-test-results/failures/unexpected/crash-reftest-crash-log.txt'
), 'reftest crash log')
self.assertEqual(
host.filesystem.read_text_file(
'/tmp/layout-test-results/retry_1/failures/unexpected/crash-reftest-crash-log.txt'
), 'reftest crash log')
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
test_results = results['tests']['failures']['unexpected'][
'crash-reftest.html']
self.assertEqual(test_results['artifacts']['crash_log'], [
'layout-test-results/failures/unexpected/crash-reftest-crash-log.txt',
'layout-test-results/retry_1/failures/unexpected/crash-reftest-crash-log.txt'
])
def test_test_list(self):
host = MockHost()
filename = '/tmp/foo.txt'
test_list = 'passes/text.html'
host.filesystem.write_text_file(filename, test_list)
tests_run = get_tests_run(['--test-list=%s' % filename], host=host)
self.assertEqual([test_list], tests_run)
host.filesystem.remove(filename)
# After the end of the with, the file is deleted.
details, err, _ = logging_run(['--test-list=%s' % filename],
tests_included=True,
host=host)
self.assertEqual(details.exit_code, exit_codes.NO_TESTS_EXIT_STATUS)
self.assert_not_empty(err)
def test_test_list_filter_glob(self):
host = MockHost()
filename = '/tmp/foo.txt'
host.filesystem.write_text_file(filename, '-passes/t*')
args = ['passes/text.html', 'passes/image.html']
tests_run = get_tests_run(['--test-list=%s' % filename] + args,
host=host)
self.assertEqual(tests_run, ['passes/image.html'])
def test_test_list_filter(self):
host = MockHost()
filename = '/tmp/foo.txt'
host.filesystem.write_text_file(filename, '-passes/image.html')
args = ['passes/text.html', 'passes/image.html']
tests_run = get_tests_run(['--test-list=%s' % filename] + args,
host=host)
self.assertEqual(tests_run, ['passes/text.html'])
def test_test_list_union(self):
host = MockHost()
filename1 = '/tmp/foo1.txt'
filename2 = '/tmp/foo2.txt'
test_list1 = 'passes/text.html'
test_list2 = 'passes/image.html'
host.filesystem.write_text_file(filename1, test_list1)
host.filesystem.write_text_file(filename2, test_list2)
# host and host2 are the same
tests_run = get_tests_run(
['--test-list=%s' % filename1,
'--test-list=%s' % filename2],
host=host)
self.assertEqual(tests_run, [test_list1, test_list2])
def test_test_list_with_prefix(self):
host = MockHost()
filename = '/tmp/foo.txt'
host.filesystem.write_text_file(
filename, WEB_TESTS_LAST_COMPONENT + '/passes/text.html')
tests_run = get_tests_run(['--test-list=%s' % filename], host=host)
self.assertEqual(['passes/text.html'], tests_run)
def test_isolated_script_test_filter(self):
host = MockHost()
tests_run = get_tests_run([
'--isolated-script-test-filter=passes/text.html::passes/image.html',
'passes/error.html'
],
host=host)
self.assertEqual(sorted(tests_run), [])
tests_run = get_tests_run([
'--isolated-script-test-filter=passes/error.html::passes/image.html',
'passes/error.html'
],
host=host)
self.assertEqual(sorted(tests_run), ['passes/error.html'])
tests_run = get_tests_run([
'--isolated-script-test-filter=-passes/error.html::passes/image.html'
],
host=host)
self.assertEqual(sorted(tests_run), ['passes/image.html'])
tests_run = get_tests_run([
'--isolated-script-test-filter=passes/error.html::passes/image.html',
'--isolated-script-test-filter=-passes/error.html'
],
host=host)
self.assertEqual(sorted(tests_run), ['passes/image.html'])
def test_gtest_filter(self):
host = MockHost()
tests_run = get_tests_run([
'--gtest_filter=passes/text.html:passes/image.html',
'passes/error.html'
],
host=host)
self.assertEqual(
sorted(tests_run),
['passes/error.html', 'passes/image.html', 'passes/text.html'])
def test_sharding_even(self):
# Test that we actually select the right part
tests_to_run = [
'passes/error.html', 'passes/image.html',
'passes/platform_image.html', 'passes/text.html'
]
with mock.patch('__builtin__.hash', len):
# Shard 0 of 2
tests_run = get_tests_run([
'--shard-index', '0', '--total-shards', '2', '--order',
'natural'
] + tests_to_run)
self.assertEqual(
tests_run, ['passes/platform_image.html', 'passes/text.html'])
# Shard 1 of 2
tests_run = get_tests_run([
'--shard-index', '1', '--total-shards', '2', '--order',
'natural'
] + tests_to_run)
self.assertEqual(tests_run,
['passes/error.html', 'passes/image.html'])
def test_sharding_uneven(self):
tests_to_run = [
'passes/error.html', 'passes/image.html',
'passes/platform_image.html', 'passes/text.html',
'perf/foo/test.html'
]
with mock.patch('__builtin__.hash', len):
# Shard 0 of 3
tests_run = get_tests_run([
'--shard-index', '0', '--total-shards', '3', '--order',
'natural'
] + tests_to_run)
self.assertEqual(tests_run, ['perf/foo/test.html'])
# Shard 1 of 3
tests_run = get_tests_run([
'--shard-index', '1', '--total-shards', '3', '--order',
'natural'
] + tests_to_run)
self.assertEqual(tests_run, ['passes/text.html'])
# Shard 2 of 3
tests_run = get_tests_run([
'--shard-index', '2', '--total-shards', '3', '--order',
'natural'
] + tests_to_run)
self.assertEqual(tests_run, [
'passes/error.html', 'passes/image.html',
'passes/platform_image.html'
])
def test_sharding_incorrect_arguments(self):
with self.assertRaises(ValueError):
get_tests_run(['--shard-index', '3'])
with self.assertRaises(ValueError):
get_tests_run(['--total-shards', '3'])
with self.assertRaises(ValueError):
get_tests_run(['--shard-index', '3', '--total-shards', '3'])
def test_sharding_environ(self):
tests_to_run = [
'passes/error.html', 'passes/image.html',
'passes/platform_image.html', 'passes/text.html'
]
host = MockHost()
with mock.patch('__builtin__.hash', len):
host.environ['GTEST_SHARD_INDEX'] = '0'
host.environ['GTEST_TOTAL_SHARDS'] = '2'
shard_0_tests_run = get_tests_run(
['--order', 'natural'] + tests_to_run, host=host)
self.assertEqual(
shard_0_tests_run,
['passes/platform_image.html', 'passes/text.html'])
host.environ['GTEST_SHARD_INDEX'] = '1'
host.environ['GTEST_TOTAL_SHARDS'] = '2'
shard_1_tests_run = get_tests_run(
['--order', 'natural'] + tests_to_run, host=host)
self.assertEqual(shard_1_tests_run,
['passes/error.html', 'passes/image.html'])
def test_smoke_test(self):
host = MockHost()
smoke_test_filename = test.WEB_TEST_DIR + '/SmokeTests'
host.filesystem.write_text_file(smoke_test_filename,
'passes/text.html\n')
# Test the default smoke testing.
tests_run = get_tests_run(['--smoke', '--order', 'natural'], host=host)
self.assertEqual(['passes/text.html'], tests_run)
# Test running the smoke tests plus some manually-specified tests.
tests_run = get_tests_run(
['--smoke', 'passes/image.html', '--order', 'natural'], host=host)
self.assertEqual(['passes/image.html', 'passes/text.html'], tests_run)
# Test running the smoke tests plus some manually-specified tests.
tests_run = get_tests_run(
['--no-smoke', 'passes/image.html', '--order', 'natural'],
host=host)
self.assertEqual(['passes/image.html'], tests_run)
# Test that we don't run just the smoke tests by default on a normal test port.
tests_run = get_tests_run(['--order', 'natural'], host=host)
self.assertNotEqual(['passes/text.html'], tests_run)
# Create a port that does run only the smoke tests by default, and verify that works as expected.
port_obj = host.port_factory.get('test')
port_obj.default_smoke_test_only = lambda: True
tests_run = get_tests_run(['--order', 'natural'],
host=host,
port_obj=port_obj)
self.assertEqual(['passes/text.html'], tests_run)
# Verify that --no-smoke continues to work on a smoke-by-default port.
tests_run = get_tests_run(
['--no-smoke', 'passes/image.html', '--order', 'natural'],
host=host,
port_obj=port_obj)
self.assertNotIn('passes/text.html', tests_run)
def test_smoke_test_default_retry(self):
host = MockHost()
smoke_test_filename = test.WEB_TEST_DIR + '/SmokeTests'
host.filesystem.write_text_file(
smoke_test_filename,
'failures/unexpected/text-image-checksum.html\n')
# Retry if additional tests are given.
_, err, __ = logging_run(['--smoke', 'passes/image.html'],
host=host,
tests_included=True)
self.assertIn('Retrying', err.getvalue())
def test_results_json(self):
# Test that we update expectations in place. If the expectation
# is missing, update the expected generic location.
host = MockHost()
details, _, _ = logging_run([
'--no-show-results',
'failures/unexpected/missing_text.html',
'failures/unexpected/text-image-checksum.html',
'passes/slow.html',
],
tests_included=True,
host=host)
self.assertEqual(details.exit_code, 2)
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
results['tests']['failures']['unexpected'][
'text-image-checksum.html'].pop('artifacts')
self.assertEqual(
results['tests']['failures']['unexpected']
['text-image-checksum.html'], {
'expected': 'PASS',
'actual': 'FAIL',
'is_unexpected': True,
'is_regression': True,
'text_mismatch': 'general text mismatch',
})
results['tests']['failures']['unexpected']['missing_text.html'].pop(
'artifacts')
self.assertEqual(
results['tests']['failures']['unexpected']['missing_text.html'], {
'expected': 'PASS',
'actual': 'FAIL',
'is_unexpected': True,
'is_regression': True,
'is_missing_text': True,
})
self.assertEqual(results['tests']['passes']['slow.html'], {
'expected': 'PASS',
'actual': 'PASS',
'is_slow_test': True,
})
self.assertEqual(results['num_passes'], 1)
self.assertEqual(results['num_regressions'], 2)
self.assertEqual(results['num_flaky'], 0)
def test_different_failure_on_retry(self):
# This tests that if a test fails two different ways -- both unexpected
# -- we treat it as a failure rather than a flaky result. We use the
# initial failure for simplicity and consistency w/ the flakiness
# dashboard, even if the second failure is worse.
details, _, _ = logging_run(
['--num-retries=3', 'failures/unexpected/text_then_crash.html'],
tests_included=True)
self.assertEqual(details.exit_code, 1)
self.assertEqual(
details.summarized_failing_results['tests']['failures']
['unexpected']['text_then_crash.html']['actual'],
'FAIL CRASH CRASH CRASH')
# If we get a test that fails two different ways -- but the second one is expected --
# we should treat it as a flaky result and report the initial unexpected failure type
# to the dashboard. However, the test should be considered passing.
details, _, _ = logging_run(
['--num-retries=3', 'failures/expected/crash_then_text.html'],
tests_included=True)
self.assertEqual(details.exit_code, 0)
self.assertEqual(
details.summarized_failing_results['tests']['failures']['expected']
['crash_then_text.html']['actual'], 'CRASH FAIL')
def test_watch(self):
host = MockHost()
host.user.set_canned_responses(['r', 'r', 'q'])
_, output, _ = logging_run(
['--watch', 'failures/unexpected/text.html'],
tests_included=True,
host=host)
output_string = output.getvalue()
self.assertIn(
'Link to pretty diff:\nfile:///tmp/layout-test-results/failures/unexpected/text-pretty-diff.html',
output_string)
self.assertEqual(
output_string.count(
'[1/1] failures/unexpected/text.html failed unexpectedly (text diff)'
), 3)
def test_crash_with_stderr(self):
host = MockHost()
logging_run(['failures/unexpected/crash-with-stderr.html'],
tests_included=True,
host=host)
full_results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
self.assertEqual(
full_results['tests']['failures']['unexpected']
['crash-with-stderr.html']['has_stderr'], True)
def test_no_image_failure_with_image_diff(self):
host = MockHost()
logging_run(['failures/unexpected/checksum-with-matching-image.html'],
tests_included=True,
host=host)
self.assertTrue(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json').find(
'"num_regressions":0') != -1)
def test_exit_after_n_failures_upload(self):
host = MockHost()
details, regular_output, _ = logging_run([
'failures/unexpected/text-image-checksum.html', 'passes/text.html',
'--exit-after-n-failures', '1', '--order', 'natural'
],
tests_included=True,
host=host)
# By returning False, we know that the incremental results were generated and then deleted.
self.assertFalse(
host.filesystem.exists(
'/tmp/layout-test-results/incremental_results.json'))
self.assertEqual(details.exit_code, exit_codes.EARLY_EXIT_STATUS)
# This checks that passes/text.html is considered Skip-ped.
self.assertIn(
'"skipped":1',
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
# This checks that we told the user we bailed out.
self.assertTrue('Exiting early after 1 failures. 1 tests run.\n' in
regular_output.getvalue())
# This checks that neither test ran as expected.
# FIXME: This log message is confusing; tests that were skipped should be called out separately.
self.assertTrue('0 tests ran as expected, 2 didn\'t:\n' in
regular_output.getvalue())
def test_exit_after_n_failures(self):
# Unexpected failures should result in tests stopping.
tests_run = get_tests_run([
'failures/unexpected/text-image-checksum.html', 'passes/text.html',
'--exit-after-n-failures', '1', '--order', 'natural'
])
self.assertEqual(['failures/unexpected/text-image-checksum.html'],
tests_run)
# But we'll keep going for expected ones.
tests_run = get_tests_run([
'failures/expected/text.html', 'passes/text.html',
'--exit-after-n-failures', '1', '--order', 'natural'
])
self.assertEqual(['failures/expected/text.html', 'passes/text.html'],
tests_run)
def test_exit_after_n_crashes(self):
# Unexpected crashes should result in tests stopping.
tests_run = get_tests_run([
'--order', 'natural', 'failures/unexpected/crash.html',
'passes/text.html', '--exit-after-n-crashes-or-timeouts', '1'
])
self.assertEqual(['failures/unexpected/crash.html'], tests_run)
# Same with timeouts.
tests_run = get_tests_run([
'failures/unexpected/timeout.html', 'passes/text.html',
'--exit-after-n-crashes-or-timeouts', '1', '--order', 'natural'
])
self.assertEqual(['failures/unexpected/timeout.html'], tests_run)
# But we'll keep going for expected ones.
tests_run = get_tests_run([
'failures/expected/crash.html', 'passes/text.html',
'--exit-after-n-crashes-or-timeouts', '1', '--order', 'natural'
])
self.assertEqual(['failures/expected/crash.html', 'passes/text.html'],
tests_run)
def test_results_directory_absolute(self):
# We run a configuration that should fail, to generate output, then
# look for what the output results url was.
host = MockHost()
with host.filesystem.mkdtemp() as tmpdir:
_, _, user = logging_run(
['--results-directory=' + str(tmpdir), '--order', 'natural'],
tests_included=True,
host=host)
self.assertEqual(user.opened_urls, [
abspath_to_uri(
host.platform,
host.filesystem.join(tmpdir, 'layout-test-results',
'results.html'))
])
def test_results_directory_default(self):
# We run a configuration that should fail, to generate output, then
# look for what the output results url was.
# This is the default location.
_, _, user = logging_run(tests_included=True)
self.assertEqual(user.opened_urls, [
abspath_to_uri(MockHost().platform,
'/tmp/layout-test-results/results.html')
])
def test_results_directory_relative(self):
# We run a configuration that should fail, to generate output, then
# look for what the output results url was.
host = MockHost()
host.filesystem.maybe_make_directory('/tmp/cwd')
host.filesystem.chdir('/tmp/cwd')
_, _, user = logging_run(['--results-directory=foo'],
tests_included=True,
host=host)
self.assertEqual(user.opened_urls, [
abspath_to_uri(host.platform,
'/tmp/cwd/foo/layout-test-results/results.html')
])
def test_retrying_default_value(self):
# Do not retry when the test list is explicit.
host = MockHost()
details, err, _ = logging_run(
['failures/unexpected/text-image-checksum.html'],
tests_included=True,
host=host)
self.assertEqual(details.exit_code, 1)
self.assertNotIn('Retrying', err.getvalue())
# Retry 3 times by default when the test list is not explicit.
host = MockHost()
details, err, _ = logging_run(['failures/unexpected'],
tests_included=True,
host=host)
self.assertEqual(details.exit_code,
test.UNEXPECTED_NON_VIRTUAL_FAILURES)
self.assertIn('Retrying', err.getvalue())
self.assertTrue(
host.filesystem.exists(
'/tmp/layout-test-results/retry_1/failures/unexpected/text-image-checksum-actual.txt'
))
self.assertTrue(
host.filesystem.exists(
'/tmp/layout-test-results/retry_2/failures/unexpected/text-image-checksum-actual.txt'
))
self.assertTrue(
host.filesystem.exists(
'/tmp/layout-test-results/retry_3/failures/unexpected/text-image-checksum-actual.txt'
))
def test_retrying_default_value_test_list(self):
host = MockHost()
filename = '/tmp/foo.txt'
host.filesystem.write_text_file(
filename,
'failures/unexpected/text-image-checksum.html\nfailures/unexpected/crash.html'
)
details, err, _ = logging_run(
['--test-list=%s' % filename, '--order', 'natural'],
tests_included=True,
host=host)
self.assertEqual(details.exit_code, 2)
self.assertIn('Retrying', err.getvalue())
host = MockHost()
filename = '/tmp/foo.txt'
host.filesystem.write_text_file(filename, 'failures')
details, err, _ = logging_run(['--test-list=%s' % filename],
tests_included=True,
host=host)
self.assertEqual(details.exit_code,
test.UNEXPECTED_NON_VIRTUAL_FAILURES)
self.assertIn('Retrying', err.getvalue())
def test_retrying_and_flaky_tests(self):
host = MockHost()
details, err, _ = logging_run(['--num-retries=3', 'failures/flaky'],
tests_included=True,
host=host)
self.assertEqual(details.exit_code, 0)
self.assertIn('Retrying', err.getvalue())
self.assertTrue(
host.filesystem.exists(
'/tmp/layout-test-results/failures/flaky/text-actual.txt'))
self.assertFalse(
host.filesystem.exists(
'/tmp/layout-test-results/retry_1/failures/flaky/text-actual.txt'
))
self.assertFalse(
host.filesystem.exists(
'/tmp/layout-test-results/retry_2/failures/flaky/text-actual.txt'
))
self.assertFalse(
host.filesystem.exists(
'/tmp/layout-test-results/retry_3/failures/flaky/text-actual.txt'
))
def test_retrying_crashed_tests(self):
host = MockHost()
details, err, _ = logging_run(
['--num-retries=3', 'failures/unexpected/crash.html'],
tests_included=True,
host=host)
self.assertEqual(details.exit_code, 1)
self.assertIn('Retrying', err.getvalue())
def test_retrying_leak_tests(self):
host = MockHost()
details, err, _ = logging_run(
['--num-retries=1', 'failures/unexpected/leak.html'],
tests_included=True,
host=host)
self.assertEqual(details.exit_code, 1)
self.assertIn('Retrying', err.getvalue())
self.assertEqual(
host.filesystem.read_text_file(
'/tmp/layout-test-results/failures/unexpected/leak-leak-log.txt'
), 'leak detected')
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
test_results = results['tests']['failures']['unexpected']['leak.html']
self.assertEqual(test_results['artifacts']['leak_log'], [
'layout-test-results/failures/unexpected/leak-leak-log.txt',
'layout-test-results/retry_1/failures/unexpected/leak-leak-log.txt'
])
def test_unexpected_text_mismatch(self):
host = MockHost()
details, _, _ = logging_run([
'--num-retries=1', 'failures/unexpected/text-mismatch-overlay.html'
],
tests_included=True,
host=host)
self.assertEqual(details.exit_code, 1)
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
test_results = results['tests']['failures']['unexpected'][
'text-mismatch-overlay.html']
self.assertEqual(test_results['artifacts']['actual_text'], [
'layout-test-results/failures/unexpected/text-mismatch-overlay-actual.txt',
'layout-test-results/retry_1/failures/unexpected/text-mismatch-overlay-actual.txt'
])
self.assertEqual(test_results['artifacts']['expected_text'], [
'layout-test-results/failures/unexpected/text-mismatch-overlay-expected.txt',
'layout-test-results/retry_1/failures/unexpected/text-mismatch-overlay-expected.txt'
])
self.assertEqual(test_results['artifacts']['text_diff'], [
'layout-test-results/failures/unexpected/text-mismatch-overlay-diff.txt',
'layout-test-results/retry_1/failures/unexpected/text-mismatch-overlay-diff.txt'
])
self.assertEqual(test_results['artifacts']['pretty_text_diff'], [
'layout-test-results/failures/unexpected/text-mismatch-overlay-pretty-diff.html',
'layout-test-results/retry_1/failures/unexpected/text-mismatch-overlay-pretty-diff.html'
])
self.assertEqual(test_results['artifacts']['overlay'], [
'layout-test-results/failures/unexpected/text-mismatch-overlay-overlay.html',
'layout-test-results/retry_1/failures/unexpected/text-mismatch-overlay-overlay.html'
])
def test_unexpected_no_text_baseline(self):
host = MockHost()
details, _, _ = logging_run(
['--num-retries=1', 'failures/unexpected/no-text-baseline.html'],
tests_included=True,
host=host)
self.assertEqual(details.exit_code, 1)
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
test_results = results['tests']['failures']['unexpected'][
'no-text-baseline.html']
self.assertEqual(test_results['artifacts']['actual_text'], [
'layout-test-results/failures/unexpected/no-text-baseline-actual.txt',
'layout-test-results/retry_1/failures/unexpected/no-text-baseline-actual.txt'
])
self.assertNotIn('expected_text', test_results['artifacts'])
self.assertEqual(test_results['artifacts']['text_diff'], [
'layout-test-results/failures/unexpected/no-text-baseline-diff.txt',
'layout-test-results/retry_1/failures/unexpected/no-text-baseline-diff.txt'
])
self.assertEqual(test_results['artifacts']['pretty_text_diff'], [
'layout-test-results/failures/unexpected/no-text-baseline-pretty-diff.html',
'layout-test-results/retry_1/failures/unexpected/no-text-baseline-pretty-diff.html'
])
self.assertNotIn('overlay', test_results['artifacts'])
def test_unexpected_no_text_generated(self):
host = MockHost()
details, _, _ = logging_run(
['--num-retries=1', 'failures/unexpected/no-text-generated.html'],
tests_included=True,
host=host)
self.assertEqual(details.exit_code, 1)
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
test_results = results['tests']['failures']['unexpected'][
'no-text-generated.html']
self.assertEqual(test_results['artifacts']['expected_text'], [
'layout-test-results/failures/unexpected/no-text-generated-expected.txt',
'layout-test-results/retry_1/failures/unexpected/no-text-generated-expected.txt'
])
self.assertNotIn('actual_text', test_results['artifacts'])
self.assertEqual(test_results['artifacts']['text_diff'], [
'layout-test-results/failures/unexpected/no-text-generated-diff.txt',
'layout-test-results/retry_1/failures/unexpected/no-text-generated-diff.txt'
])
self.assertEqual(test_results['artifacts']['pretty_text_diff'], [
'layout-test-results/failures/unexpected/no-text-generated-pretty-diff.html',
'layout-test-results/retry_1/failures/unexpected/no-text-generated-pretty-diff.html'
])
self.assertNotIn('overlay', test_results['artifacts'])
def test_reftest_mismatching_image(self):
host = MockHost()
details, _, _ = logging_run(
['--num-retries=1', 'failures/unexpected/reftest.html'],
tests_included=True,
host=host)
self.assertEqual(details.exit_code, 1)
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
test_results = results['tests']['failures']['unexpected'][
'reftest.html']
self.assertEqual(test_results['artifacts']['actual_image'], [
'layout-test-results/failures/unexpected/reftest-actual.png',
'layout-test-results/retry_1/failures/unexpected/reftest-actual.png'
])
self.assertEqual(test_results['artifacts']['expected_image'], [
'layout-test-results/failures/unexpected/reftest-expected.png',
'layout-test-results/retry_1/failures/unexpected/reftest-expected.png'
])
self.assertEqual(test_results['artifacts']['image_diff'], [
'layout-test-results/failures/unexpected/reftest-diff.png',
'layout-test-results/retry_1/failures/unexpected/reftest-diff.png'
])
self.assertEqual(test_results['artifacts']['pretty_image_diff'], [
'layout-test-results/failures/unexpected/reftest-diffs.html',
'layout-test-results/retry_1/failures/unexpected/reftest-diffs.html'
])
self.assertEqual(test_results['artifacts']['reference_file_mismatch'], [
'layout-test-results/failures/unexpected/reftest-expected.html',
'layout-test-results/retry_1/failures/unexpected/reftest-expected.html'
])
def test_reftest_failure_matching_image(self):
host = MockHost()
details, _, _ = logging_run(['failures/unexpected/mismatch.html'],
tests_included=True,
host=host)
self.assertEqual(details.exit_code, 1)
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
test_results = results['tests']['failures']['unexpected'][
'mismatch.html']
self.assertIn('reference_file_match', test_results['artifacts'])
self.assertEqual(test_results['artifacts']['reference_file_match'], [
'layout-test-results/failures/unexpected/mismatch-expected-mismatch.html'
])
def test_unexpected_image_mismatch(self):
host = MockHost()
details, _, _ = logging_run(
['--num-retries=1', 'failures/unexpected/image-mismatch.html'],
tests_included=True,
host=host)
self.assertEqual(details.exit_code, 1)
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
test_results = results['tests']['failures']['unexpected'][
'image-mismatch.html']
self.assertEqual(test_results['artifacts']['actual_image'], [
'layout-test-results/failures/unexpected/image-mismatch-actual.png',
'layout-test-results/retry_1/failures/unexpected/image-mismatch-actual.png'
])
self.assertEqual(test_results['artifacts']['expected_image'], [
'layout-test-results/failures/unexpected/image-mismatch-expected.png',
'layout-test-results/retry_1/failures/unexpected/image-mismatch-expected.png'
])
self.assertEqual(test_results['artifacts']['image_diff'], [
'layout-test-results/failures/unexpected/image-mismatch-diff.png',
'layout-test-results/retry_1/failures/unexpected/image-mismatch-diff.png'
])
self.assertEqual(test_results['artifacts']['pretty_image_diff'], [
'layout-test-results/failures/unexpected/image-mismatch-diffs.html',
'layout-test-results/retry_1/failures/unexpected/image-mismatch-diffs.html'
])
def test_unexpected_no_image_generated(self):
host = MockHost()
details, _, _ = logging_run(
['--num-retries=1', 'failures/unexpected/no-image-generated.html'],
tests_included=True,
host=host)
self.assertEqual(details.exit_code, 1)
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
test_results = results['tests']['failures']['unexpected'][
'no-image-generated.html']
self.assertNotIn('actual_image', test_results['artifacts'])
self.assertEqual(test_results['artifacts']['expected_image'], [
'layout-test-results/failures/unexpected/no-image-generated-expected.png',
'layout-test-results/retry_1/failures/unexpected/no-image-generated-expected.png'
])
self.assertNotIn('image_diff', test_results['artifacts'])
self.assertNotIn('pretty_image_diff', test_results['artifacts'])
def test_unexpected_no_image_baseline(self):
host = MockHost()
details, _, _ = logging_run(
['--num-retries=1', 'failures/unexpected/no-image-baseline.html'],
tests_included=True,
host=host)
self.assertEqual(details.exit_code, 1)
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
test_results = results['tests']['failures']['unexpected'][
'no-image-baseline.html']
self.assertNotIn('expected_image', test_results['artifacts'])
self.assertEqual(test_results['artifacts']['actual_image'], [
'layout-test-results/failures/unexpected/no-image-baseline-actual.png',
'layout-test-results/retry_1/failures/unexpected/no-image-baseline-actual.png'
])
self.assertNotIn('image_diff', test_results['artifacts'])
self.assertNotIn('pretty_image_diff', test_results['artifacts'])
def test_unexpected_audio_mismatch(self):
host = MockHost()
details, _, _ = logging_run(
['--num-retries=1', 'failures/unexpected/audio-mismatch.html'],
tests_included=True,
host=host)
self.assertEqual(details.exit_code, 1)
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
test_results = results['tests']['failures']['unexpected'][
'audio-mismatch.html']
self.assertEqual(test_results['artifacts']['actual_audio'], [
'layout-test-results/failures/unexpected/audio-mismatch-actual.wav',
'layout-test-results/retry_1/failures/unexpected/audio-mismatch-actual.wav'
])
self.assertEqual(test_results['artifacts']['expected_audio'], [
'layout-test-results/failures/unexpected/audio-mismatch-expected.wav',
'layout-test-results/retry_1/failures/unexpected/audio-mismatch-expected.wav'
])
def test_unexpected_audio_missing_baseline(self):
host = MockHost()
details, _, _ = logging_run(
['--num-retries=1', 'failures/unexpected/no-audio-baseline.html'],
tests_included=True,
host=host)
self.assertEqual(details.exit_code, 1)
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
test_results = results['tests']['failures']['unexpected'][
'no-audio-baseline.html']
self.assertEqual(test_results['artifacts']['actual_audio'], [
'layout-test-results/failures/unexpected/no-audio-baseline-actual.wav',
'layout-test-results/retry_1/failures/unexpected/no-audio-baseline-actual.wav'
])
def test_unexpected_no_audio_generated(self):
host = MockHost()
details, _, _ = logging_run(
['--num-retries=1', 'failures/unexpected/no-audio-generated.html'],
tests_included=True,
host=host)
self.assertEqual(details.exit_code, 1)
results = json.loads(
host.filesystem.read_text_file(
'/tmp/layout-test-results/full_results.json'))
test_results = results['tests']['failures']['unexpected'][
'no-audio-generated.html']
self.assertEqual(test_results['artifacts']['expected_audio'], [
'layout-test-results/failures/unexpected/no-audio-generated-expected.wav',
'layout-test-results/retry_1/failures/unexpected/no-audio-generated-expected.wav'
])
def test_retrying_uses_retry_directories(self):
host = MockHost()
details, _, _ = logging_run([
'--num-retries=3', 'failures/unexpected/text-image-checksum.html'
],
tests_included=True,
host=host)
self.assertEqual(details.exit_code, 1)
self.assertTrue(
host.filesystem.exists(
'/tmp/layout-test-results/failures/unexpected/text-image-checksum-actual.txt'
))
self.assertTrue(
host.filesystem.exists(
'/tmp/layout-test-results/retry_1/failures/unexpected/text-image-checksum-actual.txt'
))
self.assertTrue(
host.filesystem.exists(
'/tmp/layout-test-results/retry_2/failures/unexpected/text-image-checksum-actual.txt'
))
self.assertTrue(
host.filesystem.exists(
'/tmp/layout-test-results/retry_3/failures/unexpected/text-image-checksum-actual.txt'
))
def test_retrying_alias_flag(self):
host = MockHost()
_, err, __ = logging_run([
'--test-launcher-retry-limit=3', 'failures/unexpected/crash.html'
],
tests_included=True,
host=host)
self.assertIn('Retrying', err.getvalue())
def test_clobber_old_results(self):
host = MockHost()
details, _, _ = logging_run([
'--num-retries=3', 'failures/unexpected/text-image-checksum.html'
],
tests_included=True,
host=host)
# See tests above for what files exist at this point.
# Now we test that --clobber-old-results does remove the old retries.
details, err, _ = logging_run([
'--no-retry-failures', '--clobber-old-results',
'failures/unexpected/text-image-checksum.html'
],
tests_included=True,
host=host)
self.assertEqual(details.exit_code, 1)
self.assertTrue('Clobbering old results' in err.getvalue())
self.assertIn('failures/unexpected/text-image-checksum.html',
err.getvalue())
self.assertTrue(
host.filesystem.exists(
'/tmp/layout-test-results/failures/unexpected/text-image-checksum-actual.txt'
))
self.assertFalse(
host.filesystem.exists('/tmp/layout-test-results/retry_1'))
self.assertFalse(
host.filesystem.exists('/tmp/layout-test-results/retry_2'))
self.assertFalse(
host.filesystem.exists('/tmp/layout-test-results/retry_3'))
def test_run_order__inline(self):
# These next tests test that we run the tests in ascending alphabetical
# order per directory. HTTP tests are sharded separately from other tests,
# so we have to test both.
tests_run = get_tests_run(
['--order', 'natural', '-i', 'passes/virtual_passes', 'passes'])
self.assertEqual(tests_run, sorted(tests_run))
tests_run = get_tests_run(['--order', 'natural', 'http/tests/passes'])
self.assertEqual(tests_run, sorted(tests_run))
def test_virtual(self):
self.assertTrue(
passing_run([
'--order', 'natural', 'passes/text.html', 'passes/args.html',
'virtual/passes/text.html', 'virtual/passes/args.html'
]))
def test_virtual_warns_when_wildcard_used(self):
virtual_test_warning_msg = (
'WARNING: Wildcards in paths are not supported for '
'virtual test suites.')
run_details, err, _ = logging_run(
['passes/args.html', 'virtual/passes/'], tests_included=True)
self.assertEqual(
len(run_details.summarized_full_results['tests']['passes'].keys()),
1)
self.assertFalse(virtual_test_warning_msg in err.getvalue())
run_details, err, _ = logging_run(
['passes/args.html', 'virtual/passes/*'], tests_included=True)
self.assertEqual(
len(run_details.summarized_full_results['tests']['passes'].keys()),
1)
self.assertTrue(virtual_test_warning_msg in err.getvalue())
def test_reftest_run(self):
tests_run = get_tests_run(['passes/reftest.html'])
self.assertEqual(['passes/reftest.html'], tests_run)
def test_reftest_expected_html_should_be_ignored(self):
tests_run = get_tests_run(['passes/reftest-expected.html'])
self.assertEqual([], tests_run)
def test_reftest_driver_should_run_expected_html(self):
tests_run = get_test_results(['passes/reftest.html'])
self.assertEqual(tests_run[0].references,
['passes/reftest-expected.html'])
def test_reftest_driver_should_run_expected_mismatch_html(self):
tests_run = get_test_results(['passes/mismatch.html'])
self.assertEqual(tests_run[0].references,
['passes/mismatch-expected-mismatch.html'])
def test_reftest_crash(self):
test_results = get_test_results(
['failures/unexpected/crash-reftest.html'])
# The list of references should be empty since the test crashed and we didn't run any references.
self.assertEqual(test_results[0].references, [])
def test_reftest_with_virtual_reference(self):
_, err, _ = logging_run(
['--details', 'virtual/virtual_passes/passes/reftest.html'],
tests_included=True)
self.assertTrue(
'ref: virtual/virtual_passes/passes/reftest-expected.html' in err.
getvalue())
self.assertTrue(
re.search(r'args: --virtual-arg\s*ref:', err.getvalue()))
def test_reftest_matching_text_expectation(self):
test_name = 'passes/reftest-with-text.html'
host = MockHost()
run_details, _, _ = logging_run([test_name],
tests_included=True,
host=host)
self.assertEqual(run_details.exit_code, 0)
self.assertEqual(run_details.initial_results.total, 1)
test_result = run_details.initial_results.all_results[0]
self.assertEqual(test_result.test_name, test_name)
self.assertEqual(len(test_result.failures), 0)
def test_reftest_mismatching_text_expectation(self):
test_name = 'failures/unexpected/reftest-with-mismatching-text.html'
host = MockHost()
run_details, _, _ = logging_run([test_name],
tests_included=True,
host=host)
self.assertNotEqual(run_details.exit_code, 0)
self.assertEqual(run_details.initial_results.total, 1)
test_result = run_details.initial_results.all_results[0]
self.assertEqual(test_result.test_name, test_name)
self.assertEqual(len(test_result.failures), 1)
self.assertEqual(test_result.type, ResultType.Failure)
def test_reftest_mismatching_pixel_matching_text(self):
test_name = 'failures/unexpected/reftest-with-matching-text.html'
host = MockHost()
run_details, _, _ = logging_run([test_name],
tests_included=True,
host=host)
self.assertNotEqual(run_details.exit_code, 0)
self.assertEqual(run_details.initial_results.total, 1)
test_result = run_details.initial_results.all_results[0]
self.assertEqual(test_result.test_name, test_name)
self.assertEqual(len(test_result.failures), 1)
self.assertEqual(test_result.type, ResultType.Failure)
def test_reftest_mismatching_both_text_and_pixel(self):
test_name = 'failures/unexpected/reftest.html'
host = MockHost()
host.filesystem.write_text_file(
test.WEB_TEST_DIR + '/failures/unexpected/reftest-expected.txt',
'mismatch')
run_details, _, _ = logging_run([test_name],
tests_included=True,
host=host)
self.assertNotEqual(run_details.exit_code, 0)
self.assertEqual(run_details.initial_results.total, 1)
test_result = run_details.initial_results.all_results[0]
self.assertEqual(test_result.test_name, test_name)
self.assertEqual(len(test_result.failures), 2)
self.assertEqual(test_result.type, ResultType.Failure)
def test_extra_baselines(self):
host = MockHost()
extra_txt = test.WEB_TEST_DIR + '/passes/image-expected.txt'
host.filesystem.write_text_file(extra_txt, 'Extra txt')
extra_wav = test.WEB_TEST_DIR + '/passes/image-expected.wav'
host.filesystem.write_text_file(extra_wav, 'Extra wav')
test_name = 'passes/image.html'
run_details, log_stream, _ = logging_run([test_name],
tests_included=True,
host=host)
self.assertNotEqual(run_details.exit_code, 0)
self.assertEqual(run_details.initial_results.total, 1)
test_result = run_details.initial_results.all_results[0]
self.assertEqual(test_result.test_name, test_name)
self.assertEqual(len(test_result.failures), 2)
self.assertTrue(
test_failures.has_failure_type(
test_failures.FailureTextNotGenerated, test_result.failures))
self.assertTrue(
test_failures.has_failure_type(
test_failures.FailureAudioNotGenerated, test_result.failures))
self.assert_contains(log_stream, 'Please remove %s' % extra_txt)
self.assert_contains(log_stream, 'Please remove %s' % extra_wav)
def test_empty_overriding_baselines(self):
host = MockHost()
base_baseline = test.WEB_TEST_DIR + '/passes/image-expected.txt'
host.filesystem.write_text_file(base_baseline, 'Non-empty')
platform_baseline = test.WEB_TEST_DIR + '/platform/test-mac-mac10.10/passes/image-expected.txt'
host.filesystem.write_text_file(platform_baseline, '')
test_name = 'passes/image.html'
run_details, log_stream, _ = logging_run([test_name],
tests_included=True,
host=host)
self.assertEqual(run_details.exit_code, 0)
self.assertEqual(run_details.initial_results.total, 1)
test_result = run_details.initial_results.all_results[0]
self.assertEqual(test_result.test_name, test_name)
self.assertEqual(len(test_result.failures), 0)
self.assertNotIn('Please remove', log_stream)
def test_reftest_extra_baselines(self):
host = MockHost()
extra_png = test.WEB_TEST_DIR + '/passes/reftest-expected.png'
host.filesystem.write_text_file(extra_png, 'Extra png')
extra_wav = test.WEB_TEST_DIR + '/passes/reftest-expected.wav'
host.filesystem.write_text_file(extra_wav, 'Extra wav')
test_name = 'passes/reftest.html'
run_details, log_stream, _ = logging_run([test_name],
tests_included=True,
host=host)
self.assertNotEqual(run_details.exit_code, 0)
self.assertEqual(run_details.initial_results.total, 1)
test_result = run_details.initial_results.all_results[0]
self.assertEqual(test_result.test_name, test_name)
self.assertEqual(len(test_result.failures), 1)
self.assertTrue(
test_failures.has_failure_type(
test_failures.FailureAudioNotGenerated, test_result.failures))
# For now extra png baseline is only reported in an error message.
self.assert_contains(log_stream, 'Please remove %s' % extra_png)
self.assert_contains(log_stream, 'Please remove %s' % extra_wav)
def test_reftest_with_text_extra_baselines(self):
host = MockHost()
extra_png = test.WEB_TEST_DIR + '/passes/reftest-with-text-expected.png'
host.filesystem.write_text_file(extra_png, 'Extra png')
extra_wav = test.WEB_TEST_DIR + '/passes/reftest-with-text-expected.wav'
host.filesystem.write_text_file(extra_wav, 'Extra wav')
test_name = 'passes/reftest-with-text.html'
run_details, log_stream, _ = logging_run([test_name],
tests_included=True,
host=host)
self.assertNotEqual(run_details.exit_code, 0)
self.assertEqual(run_details.initial_results.total, 1)
test_result = run_details.initial_results.all_results[0]
self.assertEqual(test_result.test_name, test_name)
self.assertEqual(len(test_result.failures), 1)
self.assertTrue(
test_failures.has_failure_type(
test_failures.FailureAudioNotGenerated, test_result.failures))
# For now extra png baseline is only reported in an error message.
self.assert_contains(log_stream, 'Please remove %s' % extra_png)
self.assert_contains(log_stream, 'Please remove %s' % extra_wav)
def test_reftest_extra_png_baseline(self):
host = MockHost()
extra_png = test.WEB_TEST_DIR + '/passes/reftest-expected.png'
host.filesystem.write_text_file(extra_png, 'Extra png')
test_name = 'passes/reftest.html'
run_details, log_stream, _ = logging_run([test_name],
tests_included=True,
host=host)
self.assertEqual(run_details.exit_code, 0)
# For now extra png baseline is only reported in an error message.
self.assert_contains(log_stream, 'Please remove %s' % extra_png)
def test_passing_testharness_extra_baselines(self):
host = MockHost()
extra_png = test.WEB_TEST_DIR + '/passes/testharness-expected.png'
host.filesystem.write_text_file(extra_png, 'Extra png')
extra_txt = test.WEB_TEST_DIR + '/passes/testharness-expected.txt'
host.filesystem.write_text_file(
extra_txt,
'This is a testharness.js-based test.\nPASS: bah\nHarness: the test ran to completion.'
)
extra_wav = test.WEB_TEST_DIR + '/passes/testharness-expected.wav'
host.filesystem.write_text_file(extra_wav, 'Extra wav')
test_name = 'passes/testharness.html'
run_details, log_stream, _ = logging_run([test_name],
tests_included=True,
host=host)
self.assertNotEqual(run_details.exit_code, 0)
self.assertEqual(run_details.initial_results.total, 1)
test_result = run_details.initial_results.all_results[0]
self.assertEqual(test_result.test_name, test_name)
self.assertEqual(len(test_result.failures), 2)
self.assertTrue(
test_failures.has_failure_type(
test_failures.FailureImageHashNotGenerated,
test_result.failures))
self.assertTrue(
test_failures.has_failure_type(
test_failures.FailureAudioNotGenerated, test_result.failures))
# For now extra txt baseline for all-pass testharness test is only reported in an error message.
self.assert_contains(log_stream, 'Please remove %s' % extra_png)
self.assert_contains(log_stream, 'Please remove %s' % extra_txt)
self.assert_contains(log_stream, 'Please remove %s' % extra_wav)
def test_passing_testharness_extra_txt_baseline(self):
host = MockHost()
extra_txt = test.WEB_TEST_DIR + '/passes/testharness-expected.txt'
host.filesystem.write_text_file(
extra_txt,
'This is a testharness.js-based test.\nPASS: bah\nHarness: the test ran to completion.'
)
test_name = 'passes/testharness.html'
run_details, log_stream, _ = logging_run([test_name],
tests_included=True,
host=host)
self.assertEqual(run_details.exit_code, 0)
# For now extra txt baseline for all-pass testharness test is only reported in an error message.
self.assert_contains(log_stream, 'Please remove %s' % extra_txt)
def test_passing_testharness_extra_mismatching_txt_baseline(self):
host = MockHost()
extra_txt = test.WEB_TEST_DIR + '/passes/testharness-expected.txt'
host.filesystem.write_text_file(
extra_txt,
'This is a testharness.js-based test.\nFAIL: bah\nHarness: the test ran to completion.'
)
test_name = 'passes/testharness.html'
run_details, log_stream, _ = logging_run([test_name],
tests_included=True,
host=host)
self.assertNotEqual(run_details.exit_code, 0)
self.assertEqual(run_details.initial_results.total, 1)
test_result = run_details.initial_results.all_results[0]
self.assertEqual(test_result.test_name, test_name)
self.assertEqual(len(test_result.failures), 1)
self.assertTrue(
test_failures.has_failure_type(test_failures.FailureTextMismatch,
test_result.failures))
self.assert_contains(log_stream, 'Please remove %s' % extra_txt)
def test_passing_testharness_overriding_baseline(self):
# An all-pass testharness text baseline is necessary when it overrides a fallback baseline.
host = MockHost()
# The base baseline expects a failure.
base_baseline = test.WEB_TEST_DIR + '/passes/testharness-expected.txt'
host.filesystem.write_text_file(base_baseline, 'Failure')
platform_baseline = test.WEB_TEST_DIR + '/platform/test-mac-mac10.10/passes/testharness-expected.txt'
host.filesystem.write_text_file(
platform_baseline,
'This is a testharness.js-based test.\nPASS: bah\nHarness: the test ran to completion.'
)
run_details, log_stream, _ = logging_run(['passes/testharness.html'],
tests_included=True,
host=host)
self.assertEqual(run_details.exit_code, 0)
self.assertNotIn('Please remove', log_stream.getvalue())
def test_additional_platform_directory(self):
self.assertTrue(
passing_run([
'--additional-platform-directory', '/tmp/foo', '--order',
'natural'
]))
self.assertTrue(
passing_run([
'--additional-platform-directory', '/tmp/../foo', '--order',
'natural'
]))
self.assertTrue(
passing_run([
'--additional-platform-directory', '/tmp/foo',
'--additional-platform-directory', '/tmp/bar', '--order',
'natural'
]))
self.assertTrue(
passing_run([
'--additional-platform-directory', 'foo', '--order', 'natural'
]))
def test_additional_expectations(self):
host = MockHost()
host.filesystem.write_text_file(
'/tmp/additional.txt',
'# results: [ Failure ]\nfailures/unexpected/mismatch.html [ Failure ]\n'
)
self.assertTrue(
passing_run([
'--additional-expectations=/tmp/additional.txt',
'failures/unexpected/mismatch.html'
],
tests_included=True,
host=host))
def test_platform_directories_ignored_when_searching_for_tests(self):
tests_run = get_tests_run(['--platform', 'test-mac-mac10.10'])
self.assertNotIn('platform/test-mac-mac10.10/http/test.html',
tests_run)
self.assertNotIn('platform/test-win-win7/http/test.html', tests_run)
def test_platform_directories_not_searched_for_additional_tests(self):
tests_run = get_tests_run(['--platform', 'test-mac-mac10.10', 'http'])
self.assertNotIn('platform/test-mac-mac10.10/http/test.html',
tests_run)
self.assertNotIn('platform/test-win-win7/http/test.html', tests_run)
def test_output_diffs(self):
host = MockHost()
logging_run(['failures/unexpected/text-image-checksum.html'],
tests_included=True,
host=host)
written_files = host.filesystem.written_files
self.assertTrue(
any(path.endswith('-diff.txt') for path in written_files.keys()))
self.assertTrue(
any(
path.endswith('-pretty-diff.html')
for path in written_files.keys()))
self.assertFalse(
any(path.endswith('-wdiff.html') for path in written_files))
def test_unsupported_platform(self):
stderr = StringIO.StringIO()
res = run_web_tests.main(['--platform', 'foo'], stderr)
self.assertEqual(res, exit_codes.UNEXPECTED_ERROR_EXIT_STATUS)
self.assertTrue('unsupported platform' in stderr.getvalue())
def test_verbose_in_child_processes(self):
# When we actually run multiple processes, we may have to reconfigure logging in the
# child process (e.g., on win32) and we need to make sure that works and we still
# see the verbose log output. However, we can't use logging_run() because using
# output_capture to capture stderr latter results in a nonpicklable host.
options, parsed_args = parse_args([
'--verbose', '--fully-parallel', '--jobs', '2', 'passes/text.html',
'passes/image.html'
],
tests_included=True)
host = MockHost()
port_obj = host.port_factory.get(
port_name=options.platform, options=options)
logging_stream = StringIO.StringIO()
printer = Printer(host, options, logging_stream)
run_web_tests.run(port_obj, options, parsed_args, printer)
self.assertTrue('text.html passed' in logging_stream.getvalue())
self.assertTrue('image.html passed' in logging_stream.getvalue())
def disabled_test_driver_logging(self):
# FIXME: Figure out how to either use a mock-test port to
# get output or mack mock ports work again.
host = Host()
_, err, _ = logging_run([
'--platform', 'mock-win', '--driver-logging',
'fast/harness/results.html'
],
tests_included=True,
host=host)
self.assertIn('OUT:', err.getvalue())
def _check_json_test_results(self, host, details):
self.assertEqual(details.exit_code, 0)
self.assertTrue(host.filesystem.exists('/tmp/json_results.json'))
json_failing_test_results = host.filesystem.read_text_file(
'/tmp/json_results.json')
self.assertEqual(
json.loads(json_failing_test_results),
details.summarized_full_results)
def test_json_test_results(self):
host = MockHost()
details, _, _ = logging_run(
['--json-test-results', '/tmp/json_results.json'], host=host)
self._check_json_test_results(host, details)
def test_json_test_results_alias_write_full_results_to(self):
host = MockHost()
details, _, _ = logging_run(
['--write-full-results-to', '/tmp/json_results.json'], host=host)
self._check_json_test_results(host, details)
def test_json_test_results_alias_isolated_script_test_output(self):
host = MockHost()
details, _, _ = logging_run(
['--isolated-script-test-output', '/tmp/json_results.json'],
host=host)
self._check_json_test_results(host, details)
def test_json_failing_test_results(self):
host = MockHost()
details, _, _ = logging_run(
['--json-failing-test-results', '/tmp/json_failing_results.json'],
host=host)
self.assertEqual(details.exit_code, 0)
self.assertTrue(
host.filesystem.exists('/tmp/json_failing_results.json'))
json_failing_test_results = host.filesystem.read_text_file(
'/tmp/json_failing_results.json')
self.assertEqual(
json.loads(json_failing_test_results),
details.summarized_failing_results)
def test_no_default_expectations(self):
self.assertFalse(
passing_run([
'--ignore-default-expectations', 'failures/expected/text.html'
]))
class RebaselineTest(unittest.TestCase, StreamTestingMixin):
"""Tests for flags which cause new baselines to be written.
When running web tests, there are several flags which write new
baselines. This is separate from the "blink_tool.py rebaseline" commands,
which fetch new baselines from elsewhere rather than generating them.
"""
def assert_baselines(self, written_files, log_stream, expected_file_base,
expected_extensions):
"""Asserts that the written_files contains baselines for one test.
Args:
written_files: from FileSystem.written_files.
log_stream: The log stream from the run.
expected_file_base: Relative path to the baseline,
without the extension, from the web test directory.
expected_extensions: Expected extensions which should be written.
"""
for ext in expected_extensions:
baseline = '%s-expected%s' % (expected_file_base, ext)
baseline_full_path = '%s/%s' % (test.WEB_TEST_DIR, baseline)
self.assertIsNotNone(written_files.get(baseline_full_path))
baseline_message = 'Writing new baseline "%s"\n' % baseline
self.assert_contains(log_stream, baseline_message)
# Assert that baselines with other extensions were not written.
for ext in ({'.png', '.txt', '.wav'} - set(expected_extensions)):
baseline = '%s-expected%s' % (expected_file_base, ext)
baseline_full_path = '%s/%s' % (test.WEB_TEST_DIR, baseline)
self.assertIsNone(written_files.get(baseline_full_path))
def assert_wpt_manifests_not_written(self, host, written_files):
external_manifest = host.filesystem.join(test.WEB_TEST_DIR,
'external/wpt', MANIFEST_NAME)
internal_manifest = host.filesystem.join(test.WEB_TEST_DIR,
'wpt_internal', MANIFEST_NAME)
self.assertNotIn(external_manifest, written_files)
self.assertNotIn(internal_manifest, written_files)
def test_reset_results_basic(self):
# Test that we update baselines in place when the test fails
# (text and image mismatch).
host = MockHost()
details, log_stream, _ = logging_run([
'--reset-results', 'failures/unexpected/text-image-checksum.html'
],
tests_included=True,
host=host)
written_files = host.filesystem.written_files
# The run exit code is 0, indicating success; since we're resetting
# baselines, it's OK for actual results to not match baselines.
self.assertEqual(details.exit_code, 0)
self.assertEqual(len(written_files.keys()), 7)
self.assert_wpt_manifests_not_written(host, written_files)
self.assert_baselines(
written_files,
log_stream,
'failures/unexpected/text-image-checksum',
expected_extensions=['.txt', '.png'])
def test_no_baselines_are_written_with_no_reset_results_flag(self):
# This test checks that we're *not* writing baselines when we're not
# supposed to be (when there's no --reset-results flag).
host = MockHost()
details, log_stream, _ = logging_run(
['failures/unexpected/text-image-checksum.html'],
tests_included=True,
host=host)
written_files = host.filesystem.written_files
# In a normal test run where actual results don't match baselines, the
# exit code indicates failure.
self.assertEqual(details.exit_code, 1)
self.assert_baselines(
written_files,
log_stream,
'failures/unexpected/text-image-checksum',
expected_extensions=[])
def test_reset_results_missing_results(self):
# Test that we create new baselines at the generic location for
# if we are missing baselines.
host = MockHost()
details, log_stream, _ = logging_run([
'--reset-results', 'failures/unexpected/missing_text.html',
'failures/unexpected/missing_image.html',
'failures/unexpected/missing_render_tree_dump.html'
],
tests_included=True,
host=host)
written_files = host.filesystem.written_files
self.assertEqual(details.exit_code, 0)
self.assertEqual(len(written_files.keys()), 8)
self.assert_baselines(written_files, log_stream,
'failures/unexpected/missing_text', ['.txt'])
self.assert_baselines(written_files, log_stream,
'failures/unexpected/missing_image', ['.png'])
self.assert_baselines(
written_files,
log_stream,
'failures/unexpected/missing_render_tree_dump',
expected_extensions=['.txt'])
def test_reset_results_testharness_no_baseline(self):
# Tests that we create new result for a failing testharness test without
# baselines, but don't create one for a passing one.
host = MockHost()
details, log_stream, _ = logging_run([
'--reset-results', 'failures/unexpected/testharness.html',
'passes/testharness.html'
],
tests_included=True,
host=host)
written_files = host.filesystem.written_files
self.assertEqual(details.exit_code, 0)
self.assertEqual(len(written_files.keys()), 6)
self.assert_baselines(written_files, log_stream,
'failures/unexpected/testharness', ['.txt'])
self.assert_baselines(written_files, log_stream, 'passes/testharness',
[])
def test_reset_results_testharness_existing_baseline(self):
# Tests that we update existing baseline for a testharness test.
host = MockHost()
host.filesystem.write_text_file(
test.WEB_TEST_DIR +
'/failures/unexpected/testharness-expected.txt', 'foo')
details, log_stream, _ = logging_run(
['--reset-results', 'failures/unexpected/testharness.html'],
tests_included=True,
host=host)
self.assertEqual(details.exit_code, 0)
written_files = host.filesystem.written_files
self.assertEqual(len(written_files.keys()), 6)
self.assert_baselines(written_files, log_stream,
'failures/unexpected/testharness', ['.txt'])
def test_reset_results_image_only(self):
# Tests that we don't create new text results for an image-only test.
host = MockHost()
details, log_stream, _ = logging_run([
'--reset-results',
'failures/unexpected/image-only.html',
],
tests_included=True,
host=host)
self.assertEqual(details.exit_code, 0)
written_files = host.filesystem.written_files
self.assertEqual(len(written_files.keys()), 6)
self.assert_baselines(written_files, log_stream,
'failures/unexpected/image-only', ['.png'])
def test_copy_baselines(self):
# Test that we update the baselines in the version-specific directories
# if the new baseline is different from the fallback baseline.
host = MockHost()
host.filesystem.write_text_file(
test.WEB_TEST_DIR +
'/failures/unexpected/text-image-checksum-expected.txt',
# This value is the same as actual text result of the test defined
# in blinkpy.web_tests.port.test. This is added so that we also
# check that the text baseline isn't written if it matches.
'text-image-checksum_fail-txt')
details, log_stream, _ = logging_run([
'--copy-baselines', 'failures/unexpected/text-image-checksum.html'
],
tests_included=True,
host=host)
written_files = host.filesystem.written_files
self.assertEqual(details.exit_code, 1)
self.assertEqual(len(written_files.keys()), 11)
self.assert_contains(
log_stream,
'Copying baseline to "platform/test-mac-mac10.10/failures/unexpected/text-image-checksum-expected.png"'
)
self.assert_contains(
log_stream,
'Not copying baseline to "platform/test-mac-mac10.10/failures/unexpected/text-image-checksum-expected.txt"'
)
def test_reset_results_with_copy_baselines(self):
# Test that we update the baselines in the version-specific directories
# if the new baseline is different from the fallback baseline.
host = MockHost()
host.filesystem.write_text_file(
test.WEB_TEST_DIR +
'/failures/unexpected/text-image-checksum-expected.txt',
# This value is the same as actual text result of the test defined
# in blinkpy.web_tests.port.test. This is added so that we also
# check that the text baseline isn't written if it matches.
'text-image-checksum_fail-txt')
details, log_stream, _ = logging_run([
'--reset-results', '--copy-baselines',
'failures/unexpected/text-image-checksum.html'
],
tests_included=True,
host=host)
written_files = host.filesystem.written_files
self.assertEqual(details.exit_code, 0)
self.assertEqual(len(written_files.keys()), 7)
self.assert_baselines(
written_files,
log_stream,
'platform/test-mac-mac10.10/failures/unexpected/text-image-checksum',
expected_extensions=['.png'])
def test_reset_results_reftest(self):
# Test rebaseline of reference tests.
# Reference tests don't have baselines, so they should be ignored.
host = MockHost()
details, log_stream, _ = logging_run(
['--reset-results', 'passes/reftest.html'],
tests_included=True,
host=host)
written_files = host.filesystem.written_files
self.assertEqual(details.exit_code, 0)
self.assertEqual(len(written_files.keys()), 5)
self.assert_baselines(
written_files,
log_stream,
'passes/reftest',
expected_extensions=[])
def test_reset_results_reftest_with_text(self):
# In this case, there is a text baseline present; a new baseline is
# written even though this is a reference test.
host = MockHost()
details, log_stream, _ = logging_run([
'--reset-results',
'failures/unexpected/reftest-with-mismatching-text.html'
],
tests_included=True,
host=host)
written_files = host.filesystem.written_files
self.assertEqual(details.exit_code, 0)
self.assertEqual(len(written_files.keys()), 6)
self.assert_baselines(
written_files,
log_stream,
'failures/unexpected/reftest-with-mismatching-text',
expected_extensions=['.txt'])
def test_reset_results_remove_extra_baselines(self):
host = MockHost()
extra_txt = test.WEB_TEST_DIR + '/failures/unexpected/image-only-expected.txt'
host.filesystem.write_text_file(extra_txt, 'Extra txt')
extra_wav = test.WEB_TEST_DIR + '/failures/unexpected/image-only-expected.wav'
host.filesystem.write_text_file(extra_wav, 'Extra wav')
details, log_stream, _ = logging_run(
['--reset-results', 'failures/unexpected/image-only.html'],
tests_included=True,
host=host)
written_files = host.filesystem.written_files
self.assertEqual(details.exit_code, 0)
self.assertEqual(len(written_files.keys()), 8)
self.assertIsNone(written_files[extra_txt])
self.assertIsNone(written_files[extra_wav])
self.assert_baselines(
written_files,
log_stream,
'failures/unexpected/image-only',
expected_extensions=['.png'])
def test_reset_results_reftest_remove_extra_baselines(self):
host = MockHost()
extra_png = test.WEB_TEST_DIR + '/passes/reftest-expected.png'
host.filesystem.write_text_file(extra_png, 'Extra png')
extra_wav = test.WEB_TEST_DIR + '/passes/reftest-expected.wav'
host.filesystem.write_text_file(extra_wav, 'Extra wav')
extra_txt = test.WEB_TEST_DIR + '/passes/reftest-expected.txt'
host.filesystem.write_text_file(extra_txt, 'reftest')
details, _, _ = logging_run(['--reset-results', 'passes/reftest.html'],
tests_included=True,
host=host)
written_files = host.filesystem.written_files
self.assertEqual(details.exit_code, 0)
self.assertEqual(len(written_files.keys()), 8)
self.assertIsNone(written_files[extra_png])
self.assertIsNone(written_files[extra_wav])
self.assertIsNone(written_files[extra_txt])
def test_reset_results_reftest_with_text_remove_extra_baselines(self):
host = MockHost()
extra_png = test.WEB_TEST_DIR + '/passes/reftest-with-text-expected.png'
host.filesystem.write_text_file(extra_png, 'Extra png')
extra_wav = test.WEB_TEST_DIR + '/passes/reftest-with-text-expected.wav'
host.filesystem.write_text_file(extra_wav, 'Extra wav')
details, _, _ = logging_run(
['--reset-results', 'passes/reftest-with-text.html'],
tests_included=True,
host=host)
written_files = host.filesystem.written_files
self.assertEqual(details.exit_code, 0)
self.assertEqual(len(written_files.keys()), 7)
self.assertIsNone(written_files[extra_png])
self.assertIsNone(written_files[extra_wav])
self.assertNotIn(
test.WEB_TEST_DIR + '/passes/reftest-with-text-expected.txt',
written_files)
def test_reset_results_passing_testharness_remove_extra_baselines(self):
host = MockHost()
extra_png = test.WEB_TEST_DIR + '/passes/testharness-expected.png'
host.filesystem.write_text_file(extra_png, 'Extra png')
extra_txt = test.WEB_TEST_DIR + '/passes/testharness-expected.txt'
host.filesystem.write_text_file(extra_txt, 'Extra txt')
details, log_stream, _ = logging_run(
['--reset-results', 'passes/testharness.html'],
tests_included=True,
host=host)
written_files = host.filesystem.written_files
self.assertEqual(details.exit_code, 0)
self.assertEqual(len(written_files.keys()), 7)
self.assertIsNone(written_files[extra_png])
self.assertIsNone(written_files[extra_txt])
self.assert_baselines(
written_files,
log_stream,
'passes/testharness',
expected_extensions=[])
def test_reset_results_failing_testharness(self):
host = MockHost()
details, log_stream, _ = logging_run(
['--reset-results', 'failures/unexpected/testharness.html'],
tests_included=True,
host=host)
written_files = host.filesystem.written_files
self.assertEqual(details.exit_code, 0)
self.assertEqual(len(written_files.keys()), 6)
self.assert_baselines(
written_files,
log_stream,
'failures/unexpected/testharness',
expected_extensions=['.txt'])
def test_new_flag_specific_baseline(self):
# Test writing new baselines under flag-specific directory if the actual
# results are different from the current baselines.
host = MockHost()
host.filesystem.write_text_file(
test.WEB_TEST_DIR +
'/failures/unexpected/text-image-checksum-expected.txt',
# This value is the same as actual text result of the test defined
# in blinkpy.web_tests.port.test. This is added so that we also
# check that the text baseline isn't written if it matches.
'text-image-checksum_fail-txt')
details, log_stream, _ = logging_run([
'--additional-driver-flag=--flag', '--reset-results',
'failures/unexpected/text-image-checksum.html'
],
tests_included=True,
host=host)
written_files = host.filesystem.written_files
self.assertEqual(details.exit_code, 0)
self.assertEqual(len(written_files.keys()), 7)
# We should create new image baseline only.
self.assert_baselines(
written_files,
log_stream,
'flag-specific/flag/failures/unexpected/text-image-checksum',
expected_extensions=['.png'])
def test_copy_flag_specific_baseline(self):
# Test writing new baselines under flag-specific directory if the actual
# results are different from the current baselines.
host = MockHost()
host.filesystem.write_text_file(
test.WEB_TEST_DIR +
'/failures/unexpected/text-image-checksum-expected.txt',
# This value is the same as actual text result of the test defined
# in blinkpy.web_tests.port.test. This is added so that we also
# check that the text baseline isn't written if it matches.
'text-image-checksum_fail-txt')
details, log_stream, _ = logging_run([
'--additional-driver-flag=--flag', '--copy-baselines',
'failures/unexpected/text-image-checksum.html'
],
tests_included=True,
host=host)
written_files = host.filesystem.written_files
self.assertEqual(details.exit_code, 1)
self.assertEqual(len(written_files.keys()), 11)
self.assert_contains(
log_stream,
'Copying baseline to "flag-specific/flag/failures/unexpected/text-image-checksum-expected.png"'
)
self.assert_contains(
log_stream,
'Not copying baseline to "flag-specific/flag/failures/unexpected/text-image-checksum-expected.txt"'
)
def test_new_flag_specific_baseline_optimize(self):
# Test removing existing baselines under flag-specific directory if the
# actual results are the same as the fallback baselines.
host = MockHost()
host.filesystem.write_text_file(
test.WEB_TEST_DIR +
'/failures/unexpected/text-image-checksum-expected.txt',
# This value is the same as actual text result of the test defined
# in blinkpy.web_tests.port.test. This is added so that we check
# that the flag-specific text baseline is removed if the actual
# result is the same as this fallback baseline.
'text-image-checksum_fail-txt')
flag_specific_baseline_txt = (
test.WEB_TEST_DIR +
'/flag-specific/flag/failures/unexpected/text-image-checksum-expected.txt'
)
host.filesystem.write_text_file(
flag_specific_baseline_txt,
'existing-baseline-different-from-fallback')
details, log_stream, _ = logging_run([
'--additional-driver-flag=--flag', '--reset-results',
'failures/unexpected/text-image-checksum.html'
],
tests_included=True,
host=host)
self.assertEqual(details.exit_code, 0)
self.assertFalse(host.filesystem.exists(flag_specific_baseline_txt))
written_files = host.filesystem.written_files
self.assertEqual(len(written_files.keys()), 8)
# We should create new image baseline only.
self.assert_baselines(
written_files,
log_stream,
'flag-specific/flag/failures/unexpected/text-image-checksum',
expected_extensions=['.png'])
def test_new_virtual_baseline(self):
# Test writing new baselines under virtual test directory if the actual
# results are different from the current baselines.
host = MockHost()
host.filesystem.write_text_file(
test.WEB_TEST_DIR +
'/failures/unexpected/text-image-checksum-expected.txt',
# This value is the same as actual text result of the test defined
# in blinkpy.web_tests.port.test. This is added so that we also
# check that the text baseline isn't written if it matches.
'text-image-checksum_fail-txt')
details, log_stream, _ = logging_run([
'--reset-results',
'virtual/virtual_failures/failures/unexpected/text-image-checksum.html'
],
tests_included=True,
host=host)
written_files = host.filesystem.written_files
self.assertEqual(details.exit_code, 0)
self.assertEqual(len(written_files.keys()), 7)
# We should create new image baseline only.
self.assert_baselines(
written_files,
log_stream,
'virtual/virtual_failures/failures/unexpected/text-image-checksum',
expected_extensions=['.png'])
def test_new_platform_baseline_with_fallback(self):
# Test that we update the existing baseline in the platform-specific
# directory if the new baseline is different, with existing fallback
# baseline (which should not matter).
host = MockHost()
host.filesystem.write_text_file(
test.WEB_TEST_DIR +
'/platform/test-mac-mac10.10/failures/unexpected/text-image-checksum-expected.png',
'wrong-png-baseline')
details, log_stream, _ = logging_run([
'--reset-results', 'failures/unexpected/text-image-checksum.html'
],
tests_included=True,
host=host)
written_files = host.filesystem.written_files
self.assertEqual(details.exit_code, 0)
self.assertEqual(len(written_files.keys()), 7)
# We should reset the platform image baseline.
self.assert_baselines(
written_files,
log_stream,
'platform/test-mac-mac10.10/failures/unexpected/text-image-checksum',
expected_extensions=['.png'])
def test_new_platform_baseline_without_fallback(self):
# Test that we update the existing baseline in the platform-specific
# directory if the new baseline is different, without existing fallback
# baseline (which should not matter).
host = MockHost()
host.filesystem.write_text_file(
test.WEB_TEST_DIR +
'/platform/test-mac-mac10.10/failures/unexpected/text-image-checksum-expected.png',
'wrong-png-baseline')
host.filesystem.remove(
test.WEB_TEST_DIR +
'/failures/unexpected/text-image-checksum-expected.png')
details, log_stream, _ = logging_run([
'--reset-results', 'failures/unexpected/text-image-checksum.html'
],
tests_included=True,
host=host)
written_files = host.filesystem.written_files
self.assertEqual(details.exit_code, 0)
self.assertEqual(len(written_files.keys()), 8)
# We should reset the platform image baseline.
self.assert_baselines(
written_files,
log_stream,
'platform/test-mac-mac10.10/failures/unexpected/text-image-checksum',
expected_extensions=['.png'])
def test_new_virtual_baseline_optimize(self):
# Test removing existing baselines under flag-specific directory if the
# actual results are the same as the fallback baselines.
host = MockHost()
host.filesystem.write_text_file(
test.WEB_TEST_DIR +
'/failures/unexpected/text-image-checksum-expected.txt',
# This value is the same as actual text result of the test defined
# in blinkpy.web_tests.port.test. This is added so that we check
# that the flag-specific text baseline is removed if the actual
# result is the same as this fallback baseline.
'text-image-checksum_fail-txt')
virtual_baseline_txt = (
test.WEB_TEST_DIR +
'/virtual/virtual_failures/failures/unexpected/text-image-checksum-expected.txt'
)
host.filesystem.write_text_file(
virtual_baseline_txt, 'existing-baseline-different-from-fallback')
details, log_stream, _ = logging_run([
'--reset-results',
'virtual/virtual_failures/failures/unexpected/text-image-checksum.html'
],
tests_included=True,
host=host)
self.assertEqual(details.exit_code, 0)
self.assertFalse(host.filesystem.exists(virtual_baseline_txt))
written_files = host.filesystem.written_files
self.assertEqual(len(written_files.keys()), 8)
self.assert_wpt_manifests_not_written(host, written_files)
# We should create new image baseline only.
self.assert_baselines(
written_files,
log_stream,
'virtual/virtual_failures/failures/unexpected/text-image-checksum',
expected_extensions=['.png'])
class MainTest(unittest.TestCase):
def test_exception_handling(self):
orig_run_fn = run_web_tests.run
# pylint: disable=unused-argument
def interrupting_run(port, options, args, printer):
raise KeyboardInterrupt
def successful_run(port, options, args, printer):
class FakeRunDetails(object):
exit_code = exit_codes.UNEXPECTED_ERROR_EXIT_STATUS
return FakeRunDetails()
def exception_raising_run(port, options, args, printer):
assert False
stderr = StringIO.StringIO()
try:
run_web_tests.run = interrupting_run
res = run_web_tests.main([], stderr)
self.assertEqual(res, exit_codes.INTERRUPTED_EXIT_STATUS)
run_web_tests.run = successful_run
res = run_web_tests.main(['--platform', 'test'], stderr)
self.assertEqual(res, exit_codes.UNEXPECTED_ERROR_EXIT_STATUS)
run_web_tests.run = exception_raising_run
res = run_web_tests.main([], stderr)
self.assertEqual(res, exit_codes.UNEXPECTED_ERROR_EXIT_STATUS)
finally:
run_web_tests.run = orig_run_fn
| 45.647873
| 119
| 0.608193
| 14,658
| 131,968
| 5.261495
| 0.052258
| 0.051736
| 0.028656
| 0.023145
| 0.801149
| 0.762068
| 0.72138
| 0.679888
| 0.655343
| 0.620826
| 0
| 0.004102
| 0.279613
| 131,968
| 2,890
| 120
| 45.663668
| 0.807138
| 0.091121
| 0
| 0.64147
| 0
| 0.004957
| 0.254022
| 0.157489
| 0
| 0
| 0
| 0.000346
| 0.192069
| 1
| 0.06898
| false
| 0.096241
| 0.008674
| 0
| 0.083437
| 0.005783
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
8acf6eddff13fbf4e31ca06b151c2a870e82bb0d
| 182
|
py
|
Python
|
mirumon/domain/core/enums.py
|
mirumon/mirumon-backend
|
9b4d914b67dcc839ed8264f470e822dc22c98ad7
|
[
"MIT"
] | 19
|
2020-01-25T22:52:09.000Z
|
2022-03-20T13:45:10.000Z
|
mirumon/domain/core/enums.py
|
mirumon/mirumon-backend
|
9b4d914b67dcc839ed8264f470e822dc22c98ad7
|
[
"MIT"
] | 15
|
2019-10-07T18:18:40.000Z
|
2020-10-17T15:47:39.000Z
|
mirumon/domain/core/enums.py
|
mirumon/mirumon-backend
|
9b4d914b67dcc839ed8264f470e822dc22c98ad7
|
[
"MIT"
] | 1
|
2020-01-20T14:16:29.000Z
|
2020-01-20T14:16:29.000Z
|
from enum import Enum
class StrEnum(str, Enum): # noqa: WPS600
"""Base class for string enums."""
def __str__(self) -> str: # pragma: no cover
return self.value
| 20.222222
| 49
| 0.631868
| 25
| 182
| 4.44
| 0.76
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.022059
| 0.252747
| 182
| 8
| 50
| 22.75
| 0.794118
| 0.324176
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0.25
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
76d5fb09d13781af9af2086eb80bdbacfe49c036
| 1,808
|
py
|
Python
|
server/models.py
|
ncvescera/D.D_Mega_Du2
|
dcf1faa1bba900d90f7fdefe3eb1d93f1ca7d149
|
[
"Apache-2.0"
] | null | null | null |
server/models.py
|
ncvescera/D.D_Mega_Du2
|
dcf1faa1bba900d90f7fdefe3eb1d93f1ca7d149
|
[
"Apache-2.0"
] | 10
|
2021-07-14T13:37:42.000Z
|
2021-07-18T08:08:39.000Z
|
server/models.py
|
ncvescera/D.D_Mega_Du2
|
dcf1faa1bba900d90f7fdefe3eb1d93f1ca7d149
|
[
"Apache-2.0"
] | null | null | null |
from app import db
class Serie(db.Model):
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
nome = db.Column(db.String(80), nullable=False, unique=True)
descrizione = db.Column(db.Text)
tag = db.Column(db.String(80))
def as_dict(self):
return {
'id': self.id,
'nome': str(self.nome),
'descrizione': str(self.descrizione),
'tag': str(self.tag)
}
class Stagione(db.Model):
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
nome = db.Column(db.String(80), nullable=False)
descrizione = db.Column(db.Text)
tag = db.Column(db.String(80))
serie_id = db.Column(db.Integer, db.ForeignKey('serie.id'), nullable=False)
__table_args__ = (db.UniqueConstraint('nome', 'serie_id', name='_stagione_uc_'),)
def as_dict(self):
return {
'id': self.id,
'nome': str(self.nome),
'descrizione': str(self.descrizione),
'tag': str(self.tag),
'serie_id': self.serie_id
}
class Episodio(db.Model):
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
nome = db.Column(db.String(80), nullable=False)
descrizione = db.Column(db.Text)
tag = db.Column(db.String(80))
path = db.Column(db.String(100), unique=True ,nullable=False)
stagione_id = db.Column(db.Integer, db.ForeignKey('stagione.id'), nullable=False)
__table_args__ = (db.UniqueConstraint('nome', 'stagione_id', name='_episodio_uc'),)
def as_dict(self):
return {
'id': self.id,
'nome': str(self.nome),
'descrizione': str(self.descrizione),
'tag': str(self.tag),
'path': str(self.path),
'stagione_id': self.stagione_id
}
| 33.481481
| 87
| 0.599558
| 233
| 1,808
| 4.527897
| 0.167382
| 0.113744
| 0.14218
| 0.106161
| 0.781043
| 0.781043
| 0.781043
| 0.722275
| 0.635071
| 0.635071
| 0
| 0.010981
| 0.244469
| 1,808
| 54
| 88
| 33.481481
| 0.761347
| 0
| 0
| 0.622222
| 0
| 0
| 0.08513
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.066667
| false
| 0
| 0.022222
| 0.066667
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 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
| 1
| 0
|
0
| 5
|
76fe286440caa294d1e4964c0e6755c0ace4ebc3
| 202
|
py
|
Python
|
v2_processing/structures/blocks/__init__.py
|
CN-TU/ntarc-spec
|
c92bc98d7affa46ce9cc66b4e2aab220bb584bf8
|
[
"MIT"
] | null | null | null |
v2_processing/structures/blocks/__init__.py
|
CN-TU/ntarc-spec
|
c92bc98d7affa46ce9cc66b4e2aab220bb584bf8
|
[
"MIT"
] | 15
|
2018-02-15T21:18:33.000Z
|
2018-11-28T13:13:52.000Z
|
v2_processing/structures/blocks/__init__.py
|
CN-TU/ntarc-spec
|
c92bc98d7affa46ce9cc66b4e2aab220bb584bf8
|
[
"MIT"
] | 1
|
2022-01-07T16:23:50.000Z
|
2022-01-07T16:23:50.000Z
|
from .reference import Reference
from .data import Data
from .preprocessing import Preprocessing
from .analysis_method import AnalysisMethod
from .evaluation import Evaluation
from .result import Result
| 33.666667
| 43
| 0.856436
| 25
| 202
| 6.88
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.113861
| 202
| 6
| 44
| 33.666667
| 0.960894
| 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
|
0a0fdb8535c4691473cb03f332f71630e68044f2
| 62
|
py
|
Python
|
honeygrove/geoip/__init__.py
|
ekaxis/honeygrove
|
15009edbc39c83bac4585441fc0ac09c86d1de46
|
[
"MIT"
] | 1
|
2020-09-09T15:34:44.000Z
|
2020-09-09T15:34:44.000Z
|
honeygrove/geoip/__init__.py
|
ekaxis/honeygrove
|
15009edbc39c83bac4585441fc0ac09c86d1de46
|
[
"MIT"
] | null | null | null |
honeygrove/geoip/__init__.py
|
ekaxis/honeygrove
|
15009edbc39c83bac4585441fc0ac09c86d1de46
|
[
"MIT"
] | null | null | null |
from .geoip import geoip
from .geolocation import Geolocation
| 20.666667
| 36
| 0.83871
| 8
| 62
| 6.5
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.129032
| 62
| 2
| 37
| 31
| 0.962963
| 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
|
0a103260606cbef76212b7d9d473067eb63824c8
| 879
|
py
|
Python
|
service1frontend/tests/test_frontend.py
|
dkthecoder/Cards-Against-Humanity-Docker-Containers
|
d907655389746c2a128828a5d66b98cdd367edb3
|
[
"Unlicense"
] | null | null | null |
service1frontend/tests/test_frontend.py
|
dkthecoder/Cards-Against-Humanity-Docker-Containers
|
d907655389746c2a128828a5d66b98cdd367edb3
|
[
"Unlicense"
] | null | null | null |
service1frontend/tests/test_frontend.py
|
dkthecoder/Cards-Against-Humanity-Docker-Containers
|
d907655389746c2a128828a5d66b98cdd367edb3
|
[
"Unlicense"
] | null | null | null |
from app import app
from flask import url_for
from flask_testing import TestCase
import pytest
class TestBase(TestCase):
def create_app(self):
return app
def test_home_repsonce(self):
response = self.client.get(url_for('index'))
self.assertEqual(response.status_code, 200)
def test_play_repsonce(self):
response = self.client.get(url_for('play'))
self.assertEqual(response.status_code, 200)
def test_home_repsonce(self):
response = self.client.get(url_for('rules'))
self.assertEqual(response.status_code, 200)
def test_home_repsonce(self):
response = self.client.get(url_for('black_cards'))
self.assertEqual(response.status_code, 200)
def test_home_repsonce(self):
response = self.client.get(url_for('white_cards'))
self.assertEqual(response.status_code, 200)
| 29.3
| 58
| 0.698521
| 117
| 879
| 5.034188
| 0.264957
| 0.061121
| 0.169779
| 0.203735
| 0.740238
| 0.740238
| 0.740238
| 0.662139
| 0.52292
| 0.52292
| 0
| 0.021277
| 0.197952
| 879
| 29
| 59
| 30.310345
| 0.814184
| 0
| 0
| 0.409091
| 0
| 0
| 0.040956
| 0
| 0
| 0
| 0
| 0
| 0.227273
| 1
| 0.272727
| false
| 0
| 0.181818
| 0.045455
| 0.545455
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
0a21fc4aec4e1b2e16ef512d63d0063db839faf3
| 65
|
py
|
Python
|
heppy/modules/contact_hm.py
|
hiqdev/epypy
|
364fdcc0bef96e079e10b8bae7173e14da28da37
|
[
"BSD-3-Clause"
] | 20
|
2016-06-02T20:29:29.000Z
|
2022-01-31T07:47:02.000Z
|
heppy/modules/contact_hm.py
|
hiqdev/epypy
|
364fdcc0bef96e079e10b8bae7173e14da28da37
|
[
"BSD-3-Clause"
] | 1
|
2018-10-09T16:09:24.000Z
|
2018-10-10T08:17:42.000Z
|
heppy/modules/contact_hm.py
|
hiqdev/epypy
|
364fdcc0bef96e079e10b8bae7173e14da28da37
|
[
"BSD-3-Clause"
] | 7
|
2018-04-11T16:05:06.000Z
|
2020-01-28T16:30:40.000Z
|
from contact import contact
class contact_hm(contact):
pass
| 13
| 27
| 0.769231
| 9
| 65
| 5.444444
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.184615
| 65
| 4
| 28
| 16.25
| 0.924528
| 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
|
0a2bbb224cfe4e6195fa9e7de8e91b01b2b7e281
| 13
|
py
|
Python
|
mock/five.py
|
kevinghst/UDA_sup
|
c970622370d5de6b8c48b458cb8b4fe59e37effb
|
[
"Apache-2.0"
] | null | null | null |
mock/five.py
|
kevinghst/UDA_sup
|
c970622370d5de6b8c48b458cb8b4fe59e37effb
|
[
"Apache-2.0"
] | null | null | null |
mock/five.py
|
kevinghst/UDA_sup
|
c970622370d5de6b8c48b458cb8b4fe59e37effb
|
[
"Apache-2.0"
] | null | null | null |
print("five")
| 13
| 13
| 0.692308
| 2
| 13
| 4.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 13
| 1
| 13
| 13
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0.285714
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
0a52934c9f88c97c13ae08bc692192ad1128002a
| 99
|
py
|
Python
|
elementary/nearest_value.py
|
NigrumAquila/py_checkio
|
df437c2c3ad325d84714665000e3299a70e91f32
|
[
"MIT"
] | null | null | null |
elementary/nearest_value.py
|
NigrumAquila/py_checkio
|
df437c2c3ad325d84714665000e3299a70e91f32
|
[
"MIT"
] | null | null | null |
elementary/nearest_value.py
|
NigrumAquila/py_checkio
|
df437c2c3ad325d84714665000e3299a70e91f32
|
[
"MIT"
] | null | null | null |
def nearest_value(values: set, one: int) -> int:
return min((abs(n-one), n) for n in values)[1]
| 49.5
| 50
| 0.646465
| 19
| 99
| 3.315789
| 0.736842
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012195
| 0.171717
| 99
| 2
| 50
| 49.5
| 0.756098
| 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
|
6a5f0979a22599e6a4bf9b91cb8bb383a94dd72f
| 28,857
|
py
|
Python
|
trainer.py
|
yuangan/A2L
|
8cbc9b5f368924c8c75cbab53e9bb10dcf265c7e
|
[
"MIT"
] | null | null | null |
trainer.py
|
yuangan/A2L
|
8cbc9b5f368924c8c75cbab53e9bb10dcf265c7e
|
[
"MIT"
] | null | null | null |
trainer.py
|
yuangan/A2L
|
8cbc9b5f368924c8c75cbab53e9bb10dcf265c7e
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
import os
import os.path as osp
import sys
import time
from collections import defaultdict
import numpy as np
import torch
from torch import nn
from PIL import Image
from tqdm import tqdm
from losses import compute_pcalmk_d_loss, compute_pcalmk_g_loss, compute_lmk_g_loss, compute_lmk_d_loss
from functions import cv_draw_landmark_pca
import imageio
import logging
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
class Trainer(object):
def __init__(self,
args,
model=None,
model_ema=None,
model_mot = None,
optimizer1=None,
optimizer2=None,
scheduler=None,
config={},
device=torch.device("cpu"),
logger=logger,
train_dataloader=None,
val_dataloader=None,
initial_steps=0,
initial_epochs=0,
fp16_run=False
):
self.args = args
#print(args.prefix)
self.steps = initial_steps
self.epochs = initial_epochs
self.model = model
self.model_ema = model_ema
self.model_mot = model_mot
self.optimizer1 = optimizer1
self.optimizer2 = optimizer2
self.scheduler = scheduler
self.train_dataloader = train_dataloader
self.val_dataloader = val_dataloader
self.config = config
self.device = device
self.finish_train = False
self.logger = logger
self.fp16_run = fp16_run
self.mean_mead = torch.from_numpy(np.load('./PCA/mean_mead.npy').astype(np.float32)).cuda()
self.U = torch.from_numpy(np.load('./PCA/U_mead.npy').astype(np.float32))[:,:32].cuda()
def _train_epoch(self):
"""Train model one epoch."""
raise NotImplementedError
@torch.no_grad()
def _eval_epoch(self):
"""Evaluate model one epoch."""
pass
def save_checkpoint(self, checkpoint_path):
"""Save checkpoint.
Args:
checkpoint_path (str): Checkpoint path to be saved.
"""
state_dict = {
"optimizer1": self.optimizer1.state_dict(),
"optimizer2": self.optimizer2.state_dict(),
"schedulers1": {},
"schedulers2": {},
"steps": self.steps,
"epochs": self.epochs,
"model": {key: self.model[key].state_dict() for key in self.model}
}
for s in self.optimizer1.schedulers:
state_dict['schedulers1'][s] = self.optimizer1.schedulers[s].state_dict()
for s in self.optimizer2.schedulers:
state_dict['schedulers1'][s] = self.optimizer2.schedulers[s].state_dict()
# state_dict['schedulers'].append(s.state_dict())
if self.model_ema is not None:
state_dict['model_ema'] = {key: self.model_ema[key].state_dict() for key in self.model_ema}
if self.model_mot is not None:
state_dict['model_mot'] = {key: self.model_mot[key].state_dict() for key in self.model_mot}
if not os.path.exists(os.path.dirname(checkpoint_path)):
os.makedirs(os.path.dirname(checkpoint_path))
torch.save(state_dict, checkpoint_path)
def load_checkpoint(self, checkpoint_path, load_only_params=False):
"""Load checkpoint.
Args:
checkpoint_path (str): Checkpoint path to be loaded.
load_only_params (bool): Whether to load only model parameters.
"""
state_dict = torch.load(checkpoint_path, map_location="cpu")
for key in self.model:
self._load(state_dict["model"][key], self.model[key])
if self.model_ema is not None:
for key in self.model_ema:
self._load(state_dict["model_ema"][key], self.model_ema[key])
if 'model_mot' in state_dict.keys():
print('trainer 100: load model_mot')
for key in self.model_mot:
self._load(state_dict["model_mot"][key], self.model_mot[key])
if not load_only_params:
self.steps = state_dict["steps"]
self.epochs = state_dict["epochs"]
self.optimizer1.load_state_dict(state_dict["optimizer1"])
self.optimizer2.load_state_dict(state_dict["optimizer2"])
if 'schedulers1' in state_dict.keys():
for key in state_dict['schedulers1']:
self.optimizer1.schedulers[key].load_state_dict(state_dict['schedulers1'][key])
for key in state_dict['schedulers2']:
self.optimizer2.schedulers[key].load_state_dict(state_dict['schedulers2'][key])
def _load(self, states, model, force_load=True):
model_states = model.state_dict()
for key, val in states.items():
try:
if key not in model_states:
continue
if isinstance(val, nn.Parameter):
val = val.data
if val.shape != model_states[key].shape:
self.logger.info("%s does not have same shape" % key)
print(val.shape, model_states[key].shape)
if not force_load:
continue
min_shape = np.minimum(np.array(val.shape), np.array(model_states[key].shape))
slices = [slice(0, min_index) for min_index in min_shape]
model_states[key][slices].copy_(val[slices])
else:
model_states[key].copy_(val)
except:
self.logger.info("not exist :%s" % key)
print("not exist ", key)
@staticmethod
def get_gradient_norm(model):
total_norm = 0
for p in model.parameters():
param_norm = p.grad.data.norm(2)
total_norm += param_norm.item() ** 2
total_norm = np.sqrt(total_norm)
return total_norm
@staticmethod
def length_to_mask(lengths):
mask = torch.arange(lengths.max()).unsqueeze(0).expand(lengths.shape[0], -1).type_as(lengths)
mask = torch.gt(mask+1, lengths.unsqueeze(1))
return mask
def _get_lr(self):
for param_group in self.optimizer1.param_groups:
# [print(v.param_groups[0]['lr']) for v in self.optimizer1.optimizer1s.values()]
lr = param_group['lr']
break
# print(lr)
# assert(0)
return lr
@staticmethod
def moving_average(model, model_test, beta=0.999):
for param, param_test in zip(model.parameters(), model_test.parameters()):
param_test.data = torch.lerp(param.data, param_test.data, beta)
# def _train_epoch(self):
# self.epochs += 1
# train_losses = defaultdict(list)
# _ = [self.model[k].train() for k in self.model]
# scaler = torch.cuda.amp.GradScaler() if (('cuda' in str(self.device)) and self.fp16_run) else None
# use_con_reg = (self.epochs >= self.args.con_reg_epoch)
# use_adv_cls = (self.epochs >= self.args.adv_cls_epoch)
# for train_steps_per_epoch, batch in enumerate(tqdm(self.train_dataloader, desc="[train]"), 1):
# ### load data
# batch = [b.to(self.device) for b in batch]
# x_real, y_org, x_ref, x_ref2, y_trg, z_trg, z_trg2, inits, mots = batch
# # train the discriminator (by random reference)
# self.optimizer1.zero_grad()
# if scaler is not None:
# with torch.cuda.amp.autocast():
# d_loss, d_losses_latent = compute_d_loss(self.model, self.args.d_loss, x_real, y_org, y_trg, z_trg=z_trg, use_adv_cls=use_adv_cls, use_con_reg=use_con_reg)
# scaler.scale(d_loss).backward()
# else:
# d_loss, d_losses_latent = compute_d_loss(self.model, self.args.d_loss, x_real, y_org, y_trg, z_trg=z_trg, use_adv_cls=use_adv_cls, use_con_reg=use_con_reg)
# d_loss.backward()
# self.optimizer1.step('discriminator', scaler=scaler)
# # train the discriminator (by target reference)
# self.optimizer1.zero_grad()
# if scaler is not None:
# with torch.cuda.amp.autocast():
# d_loss, d_losses_ref = compute_d_loss(self.model, self.args.d_loss, x_real, y_org, y_trg, x_ref=x_ref, use_adv_cls=use_adv_cls, use_con_reg=use_con_reg)
# scaler.scale(d_loss).backward()
# else:
# d_loss, d_losses_ref = compute_d_loss(self.model, self.args.d_loss, x_real, y_org, y_trg, x_ref=x_ref, use_adv_cls=use_adv_cls, use_con_reg=use_con_reg)
# d_loss.backward()
# self.optimizer1.step('discriminator', scaler=scaler)
# # train the generator (by random reference)
# self.optimizer1.zero_grad()
# if scaler is not None:
# with torch.cuda.amp.autocast():
# g_loss, g_losses_latent = compute_g_loss(
# self.model, self.args.g_loss, x_real, y_org, y_trg, z_trgs=[z_trg, z_trg2], use_adv_cls=use_adv_cls)
# scaler.scale(g_loss).backward()
# else:
# g_loss, g_losses_latent = compute_g_loss(
# self.model, self.args.g_loss, x_real, y_org, y_trg, z_trgs=[z_trg, z_trg2], use_adv_cls=use_adv_cls)
# g_loss.backward()
# self.optimizer1.step('generator', scaler=scaler)
# self.optimizer1.step('mapping_network', scaler=scaler)
# self.optimizer1.step('style_encoder', scaler=scaler)
# # train the generator (by target reference)
# self.optimizer1.zero_grad()
# if scaler is not None:
# with torch.cuda.amp.autocast():
# g_loss, g_losses_ref = compute_g_loss(
# self.model, self.args.g_loss, x_real, y_org, y_trg, x_refs=[x_ref, x_ref2], use_adv_cls=use_adv_cls)
# scaler.scale(g_loss).backward()
# else:
# g_loss, g_losses_ref = compute_g_loss(
# self.model, self.args.g_loss, x_real, y_org, y_trg, x_refs=[x_ref, x_ref2], use_adv_cls=use_adv_cls)
# g_loss.backward()
# self.optimizer1.step('generator', scaler=scaler)
# # compute moving average of network parameters
# self.moving_average(self.model.generator, self.model_ema.generator, beta=0.999)
# self.moving_average(self.model.mapping_network, self.model_ema.mapping_network, beta=0.999)
# self.moving_average(self.model.style_encoder, self.model_ema.style_encoder, beta=0.999)
# self.optimizer1.scheduler()
# for key in d_losses_latent:
# train_losses["train/%s" % key].append(d_losses_latent[key])
# for key in g_losses_latent:
# train_losses["train/%s" % key].append(g_losses_latent[key])
# train_losses = {key: np.mean(value) for key, value in train_losses.items()}
# return train_losses
# @torch.no_grad()
# def _eval_epoch(self):
# use_adv_cls = (self.epochs >= self.args.adv_cls_epoch)
# eval_losses = defaultdict(list)
# eval_images = defaultdict(list)
# _ = [self.model[k].eval() for k in self.model]
# for eval_steps_per_epoch, batch in enumerate(tqdm(self.val_dataloader, desc="[eval]"), 1):
# ### load data
# batch = [b.to(self.device) for b in batch]
# x_real, y_org, x_ref, x_ref2, y_trg, z_trg, z_trg2 = batch
# # train the discriminator
# d_loss, d_losses_latent = compute_d_loss(
# self.model, self.args.d_loss, x_real, y_org, y_trg, z_trg=z_trg, use_r1_reg=False, use_adv_cls=use_adv_cls)
# d_loss, d_losses_ref = compute_d_loss(
# self.model, self.args.d_loss, x_real, y_org, y_trg, x_ref=x_ref, use_r1_reg=False, use_adv_cls=use_adv_cls)
# # train the generator
# g_loss, g_losses_latent = compute_g_loss(
# self.model, self.args.g_loss, x_real, y_org, y_trg, z_trgs=[z_trg, z_trg2], use_adv_cls=use_adv_cls)
# g_loss, g_losses_ref = compute_g_loss(
# self.model, self.args.g_loss, x_real, y_org, y_trg, x_refs=[x_ref, x_ref2], use_adv_cls=use_adv_cls)
# for key in d_losses_latent:
# eval_losses["eval/%s" % key].append(d_losses_latent[key])
# for key in g_losses_latent:
# eval_losses["eval/%s" % key].append(g_losses_latent[key])
# # if eval_steps_per_epoch % 10 == 0:
# # # generate x_fake
# # s_trg = self.model_ema.style_encoder(x_ref, y_trg)
# # F0 = self.model.f0_model.get_feature_GAN(x_real)
# # x_fake = self.model_ema.generator(x_real, s_trg, masks=None, F0=F0)
# # # generate x_recon
# # s_real = self.model_ema.style_encoder(x_real, y_org)
# # F0_fake = self.model.f0_model.get_feature_GAN(x_fake)
# # x_recon = self.model_ema.generator(x_fake, s_real, masks=None, F0=F0_fake)
# # eval_images['eval/image'].append(
# # ([x_real[0, 0].cpu().numpy(),
# # x_fake[0, 0].cpu().numpy(),
# # x_recon[0, 0].cpu().numpy()]))
# eval_losses = {key: np.mean(value) for key, value in eval_losses.items()}
# eval_losses.update(eval_images)
# return eval_losses
def _train_lmk_epoch(self):
self.epochs += 1
train_losses = defaultdict(list)
_ = [self.model[k].train() for k in self.model]
scaler = torch.cuda.amp.GradScaler() if (('cuda' in str(self.device)) and self.fp16_run) else None
use_adv_cls = (self.epochs >= 1501)
use_adv = (self.epochs >=251)
for train_steps_per_epoch, batch in enumerate(tqdm(self.train_dataloader, desc="[train]"), 1):
### load data
batch = [b.to(self.device) for b in batch]
x_real, y_org, x_ref, x_ref2, y_trg, z_trg, z_trg2, inits, mots, length_mots, input_lmks = batch
if use_adv:
# train the discriminator (by random reference)
self.optimizer1.zero_grad()
self.optimizer2.zero_grad()
if scaler is not None:
with torch.cuda.amp.autocast():
d_loss, lmk_d_losses_latent = compute_lmk_d_loss(self.model, self.model_mot, inits, mots, length_mots, input_lmks, x_real, y_org, y_trg, z_trg=z_trg)
scaler.scale(d_loss).backward()
else:
d_loss, lmk_d_losses_latent = compute_lmk_d_loss(self.model, self.model_mot, inits, mots, length_mots, input_lmks, x_real, y_org, y_trg, z_trg=z_trg)
d_loss.backward()
self.optimizer1.step('discriminator_mot', scaler=scaler)
# train the discriminator (by random reference)
self.optimizer1.zero_grad()
if scaler is not None:
with torch.cuda.amp.autocast():
d_loss, lmk_d_losses_latent = compute_lmk_d_loss(self.model, self.model_mot, inits, mots, length_mots, input_lmks, x_real, y_org, y_trg, x_ref=x_ref)
scaler.scale(d_loss).backward()
else:
d_loss, lmk_d_losses_latent = compute_lmk_d_loss(self.model, self.model_mot, inits, mots, length_mots, input_lmks, x_real, y_org, y_trg, x_ref=x_ref)
d_loss.backward()
self.optimizer1.step('discriminator_mot', scaler=scaler)
# train the generator (by target reference)
self.optimizer1.zero_grad()
if scaler is not None:
with torch.cuda.amp.autocast():
lmk_loss, lmk_losses_latent = compute_lmk_g_loss(
self.model, self.model_mot, inits, mots, length_mots, input_lmks, x_real, y_org, y_trg, x_refs=[x_ref, x_ref2], use_adv=use_adv)
scaler.scale(lmk_loss).backward()
else:
lmk_loss, lmk_losses_latent = compute_lmk_g_loss(
self.model, self.model_mot, inits, mots, length_mots, input_lmks, x_real, y_org, y_trg, x_refs=[x_ref, x_ref2], use_adv=use_adv)
lmk_loss.backward()
self.optimizer1.step('lmk_encoder', scaler=scaler)
self.optimizer1.step('mot_decoder', scaler=scaler)
# train the discriminator (by self reference)
self.optimizer1.zero_grad()
if scaler is not None:
with torch.cuda.amp.autocast():
lmk_loss, lmk_g_losses_latent = compute_lmk_g_loss(self.model, self.model_mot, inits, mots, length_mots, input_lmks, x_real, y_org, y_trg, z_trgs=[z_trg, z_trg2], use_adv=use_adv)
scaler.scale(lmk_loss).backward()
else:
lmk_loss, lmk_g_losses_latent = compute_lmk_g_loss(self.model, self.model_mot, inits, mots, length_mots, input_lmks, x_real, y_org, y_trg, z_trgs=[z_trg, z_trg2], use_adv=use_adv)
lmk_loss.backward()
self.optimizer1.step('lmk_encoder', scaler=scaler)
self.optimizer1.step('mot_decoder', scaler=scaler)
# compute moving average of network parameters
self.optimizer1.scheduler()
if use_adv:
for key in lmk_d_losses_latent:
train_losses["train/%s" % key].append(lmk_d_losses_latent[key])
for key in lmk_g_losses_latent:
train_losses["train/%s" % key].append(lmk_g_losses_latent[key])
train_losses = {key: np.mean(value) for key, value in train_losses.items()}
return train_losses
@torch.no_grad()
def _eval_lmk_epoch(self):
eval_losses = defaultdict(list)
eval_images = defaultdict(list)
_ = [self.model[k].eval() for k in self.model]
use_adv = (self.epochs >=251)
for eval_steps_per_epoch, batch in enumerate(tqdm(self.val_dataloader, desc="[eval]"), 1):
### load data
batch = [b.to(self.device) for b in batch]
x_real, y_org, x_ref, x_ref2, y_trg, z_trg, z_trg2, inits, mots, length_mots, input_lmks= batch
# eval the discriminator
d_loss, lmk_d_losses_latent = compute_lmk_d_loss(self.model, self.model_mot, inits, mots, length_mots, input_lmks, x_real, y_org, y_trg, z_trg=z_trg)
# eval the generator
lmk_loss, lmk_g_losses_latent = compute_lmk_g_loss(self.model, self.model_mot, inits, mots, length_mots, input_lmks, x_real, y_org, y_trg, z_trgs=[z_trg, z_trg2], use_adv=use_adv)
for key in lmk_d_losses_latent:
eval_losses["eval/%s" % key].append(lmk_d_losses_latent[key])
for key in lmk_g_losses_latent:
eval_losses["eval/%s" % key].append(lmk_g_losses_latent[key])
# if eval_steps_per_epoch % 10 == 0:
# # generate x_fake
# s_trg = self.model_ema.style_encoder(x_ref, y_trg)
# F0 = self.model.f0_model.get_feature_GAN(x_real)
# x_fake = self.model_ema.generator(x_real, s_trg, masks=None, F0=F0)
# # generate x_recon
# s_real = self.model_ema.style_encoder(x_real, y_org)
# F0_fake = self.model.f0_model.get_feature_GAN(x_fake)
# x_recon = self.model_ema.generator(x_fake, s_real, masks=None, F0=F0_fake)
# eval_images['eval/image'].append(
# ([x_real[0, 0].cpu().numpy(),
# x_fake[0, 0].cpu().numpy(),
# x_recon[0, 0].cpu().numpy()]))
eval_losses = {key: np.mean(value) for key, value in eval_losses.items()}
eval_losses.update(eval_images)
return eval_losses
def _train_lmk_pca_epoch(self):
self.epochs += 1
train_losses = defaultdict(list)
_ = [self.model[k].train() for k in self.model]
scaler = torch.cuda.amp.GradScaler() if (('cuda' in str(self.device)) and self.fp16_run) else None
use_adv_cls = (self.epochs >= self.args.use_adv_cls_epoch)
use_adv = (self.epochs >=self.args.use_adv_epoch)
for train_steps_per_epoch, batch in enumerate(tqdm(self.train_dataloader, desc="[train]"), 1):
### load data
batch = [b.to(self.device) for b in batch]
x_real, y_org, x_ref, x_ref2, y_trg, z_trg, z_trg2, inits, mots, length_mots, input_lmks = batch
if use_adv:
# train the discriminator (by random reference)
self.optimizer1.zero_grad()
self.optimizer2.zero_grad()
if scaler is not None:
with torch.cuda.amp.autocast():
d_loss, lmk_d_losses_latent = compute_pcalmk_d_loss(self.model, self.model_mot, inits, mots, length_mots, input_lmks, x_real, y_org, y_trg, z_trg=z_trg, use_adv_cls=use_adv_cls)
scaler.scale(d_loss).backward()
else:
d_loss, lmk_d_losses_latent = compute_pcalmk_d_loss(self.model, self.model_mot, inits, mots, length_mots, input_lmks, x_real, y_org, y_trg, z_trg=z_trg, use_adv_cls=use_adv_cls)
d_loss.backward()
self.optimizer1.step('discriminator_mot', scaler=scaler)
# train the discriminator (by random reference)
self.optimizer1.zero_grad()
if scaler is not None:
with torch.cuda.amp.autocast():
d_loss, lmk_d_losses_latent = compute_pcalmk_d_loss(self.model, self.model_mot, inits, mots, length_mots, input_lmks, x_real, y_org, y_trg, x_ref=x_ref, use_adv_cls=use_adv_cls)
scaler.scale(d_loss).backward()
else:
d_loss, lmk_d_losses_latent = compute_pcalmk_d_loss(self.model, self.model_mot, inits, mots, length_mots, input_lmks, x_real, y_org, y_trg, x_ref=x_ref, use_adv_cls=use_adv_cls)
d_loss.backward()
self.optimizer1.step('discriminator_mot', scaler=scaler)
# train the generator (by target reference)
self.optimizer1.zero_grad()
if scaler is not None:
with torch.cuda.amp.autocast():
lmk_loss, lmk_losses_latent = compute_pcalmk_g_loss(
self.model, self.model_mot, inits, mots, length_mots, input_lmks, x_real, y_org, y_trg, x_refs=[x_ref, x_ref2], use_adv=use_adv)
scaler.scale(lmk_loss).backward()
else:
lmk_loss, lmk_losses_latent = compute_pcalmk_g_loss(
self.model, self.model_mot, inits, mots, length_mots, input_lmks, x_real, y_org, y_trg, x_refs=[x_ref, x_ref2], use_adv=use_adv)
lmk_loss.backward()
self.optimizer1.step('lmk_encoder', scaler=scaler)
self.optimizer1.step('mot_decoder', scaler=scaler)
self.optimizer2.step('generator', scaler=scaler)
self.optimizer2.step('mapping_network', scaler=scaler)
self.optimizer2.step('style_encoder', scaler=scaler)
# train the discriminator (by self reference)
self.optimizer1.zero_grad()
self.optimizer2.zero_grad()
if scaler is not None:
with torch.cuda.amp.autocast():
lmk_loss, lmk_g_losses_latent = compute_pcalmk_g_loss(self.model, self.model_mot, inits, mots, length_mots, input_lmks, x_real, y_org, y_trg, z_trgs=[z_trg, z_trg2], use_adv=use_adv)
scaler.scale(lmk_loss).backward()
else:
lmk_loss, lmk_g_losses_latent = compute_pcalmk_g_loss(self.model, self.model_mot, inits, mots, length_mots, input_lmks, x_real, y_org, y_trg, z_trgs=[z_trg, z_trg2], use_adv=use_adv)
lmk_loss.backward()
self.optimizer1.step('lmk_encoder', scaler=scaler)
self.optimizer1.step('mot_decoder', scaler=scaler)
self.optimizer2.step('generator', scaler=scaler)
self.optimizer2.step('mapping_network', scaler=scaler)
self.optimizer2.step('style_encoder', scaler=scaler)
# compute moving average of network parameters
self.optimizer1.scheduler()
self.optimizer2.scheduler()
if use_adv:
for key in lmk_d_losses_latent:
train_losses["train/%s" % key].append(lmk_d_losses_latent[key])
for key in lmk_g_losses_latent:
train_losses["train/%s" % key].append(lmk_g_losses_latent[key])
train_losses = {key: np.mean(value) for key, value in train_losses.items()}
return train_losses
def visualize(self, fake_pca, length_mots, y):
def pca2lmk(pca, U, mean):
b, l, d = pca.shape
pca = pca.reshape(b*l, d)
lmk = torch.mm(pca, U.t())
lmk = lmk + mean.expand_as(lmk)
lmk = lmk.reshape(b, l, -1).reshape(b, l, 468, 2)
return lmk
def visual_landmarks(fl, writer):
heatmap = 255*np.ones((256, 256, 3), dtype=np.uint8)
fl[:, :, 0:2] = fl[:, :, 0:2] - [-0.5,-0.4]
fl[:,:,0:2] = fl[:,:,0:2]*200
fl = np.transpose(fl, (0, 2, 1))
for l in fl:
img_draw = cv_draw_landmark_pca(heatmap, l)
writer.append_data(img_draw[:, :, ::-1])
writer.close()
return fl
lmk = pca2lmk(fake_pca[0].unsqueeze(0), self.U, self.mean_mead)
writer = imageio.get_writer(f'./lmk_result/{self.args.prefix["name"]}_{y[0]}_{self.epochs}.mp4', fps=30)
visual_landmarks(lmk[0, :length_mots[0], :, :].cpu().numpy(), writer)
return None
@torch.no_grad()
def _eval_lmk_pca_epoch(self):
eval_losses = defaultdict(list)
eval_images = defaultdict(list)
_ = [self.model[k].eval() for k in self.model]
use_adv = (self.epochs >=self.args.use_adv_epoch)
use_adv_cls = (self.epochs >= self.args.use_adv_cls_epoch)
for eval_steps_per_epoch, batch in enumerate(tqdm(self.val_dataloader, desc="[eval]"), 1):
### load data
batch = [b.to(self.device) for b in batch]
x_real, y_org, x_ref, x_ref2, y_trg, z_trg, z_trg2, inits, mots, length_mots, input_lmks= batch
# eval the discriminator
d_loss, lmk_d_losses_latent = compute_pcalmk_d_loss(self.model, self.model_mot, inits, mots, length_mots, input_lmks, x_real, y_org, y_trg, z_trg=z_trg, use_adv_cls=use_adv_cls)
# eval the generator
lmk_loss, lmk_g_losses_latent, fake_pca = compute_pcalmk_g_loss(self.model, self.model_mot, inits, mots, length_mots, input_lmks, x_real, y_org, y_trg, z_trgs=[z_trg, z_trg2], use_adv=use_adv, eval=True)
for key in lmk_d_losses_latent:
eval_losses["eval/%s" % key].append(lmk_d_losses_latent[key])
for key in lmk_g_losses_latent:
eval_losses["eval/%s" % key].append(lmk_g_losses_latent[key])
# if eval_steps_per_epoch % 10 == 0:
# # generate x_fake
# s_trg = self.model_ema.style_encoder(x_ref, y_trg)
# F0 = self.model.f0_model.get_feature_GAN(x_real)
# x_fake = self.model_ema.generator(x_real, s_trg, masks=None, F0=F0)
# # generate x_recon
# s_real = self.model_ema.style_encoder(x_real, y_org)
# F0_fake = self.model.f0_model.get_feature_GAN(x_fake)
# x_recon = self.model_ema.generator(x_fake, s_real, masks=None, F0=F0_fake)
# eval_images['eval/image'].append(
# ([x_real[0, 0].cpu().numpy(),
# x_fake[0, 0].cpu().numpy(),
# x_recon[0, 0].cpu().numpy()]))
if self.epochs % self.args.prefix['ep'] == 0:
if not use_adv:
self.visualize(fake_pca, length_mots, y_org)
else:
self.visualize(fake_pca, length_mots, y_trg)
eval_losses = {key: np.mean(value) for key, value in eval_losses.items()}
eval_losses.update(eval_images)
return eval_losses
| 47.935216
| 215
| 0.592716
| 3,932
| 28,857
| 4.051628
| 0.069685
| 0.059883
| 0.023162
| 0.023162
| 0.771703
| 0.74967
| 0.727136
| 0.712699
| 0.703032
| 0.672211
| 0
| 0.013409
| 0.297051
| 28,857
| 601
| 216
| 48.014975
| 0.77195
| 0.320997
| 0
| 0.502994
| 0
| 0.002994
| 0.037583
| 0.003313
| 0
| 0
| 0
| 0
| 0
| 1
| 0.050898
| false
| 0.002994
| 0.041916
| 0
| 0.125749
| 0.008982
| 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
|
6a8124562629ccfe66d02f5b88adafdb15648aa8
| 64
|
py
|
Python
|
test_sample.py
|
ityuhui/flask-rest
|
398e544ed70effd384d27a7e4f371a128a920acf
|
[
"Apache-2.0"
] | null | null | null |
test_sample.py
|
ityuhui/flask-rest
|
398e544ed70effd384d27a7e4f371a128a920acf
|
[
"Apache-2.0"
] | null | null | null |
test_sample.py
|
ityuhui/flask-rest
|
398e544ed70effd384d27a7e4f371a128a920acf
|
[
"Apache-2.0"
] | null | null | null |
def func(x):
return x+1
def test_func():
assert func(3) == 4
| 12.8
| 20
| 0.625
| 13
| 64
| 3
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.058824
| 0.203125
| 64
| 5
| 20
| 12.8
| 0.705882
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.25
| 1
| 0.5
| false
| 0
| 0
| 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
|
6a8322733e0fbbdfee92207dc7632585a2fd4897
| 126
|
py
|
Python
|
imperium/errors.py
|
DSRetro/imperium
|
12b44677903493b0e506ad07d119e6d5c2717c35
|
[
"MIT"
] | null | null | null |
imperium/errors.py
|
DSRetro/imperium
|
12b44677903493b0e506ad07d119e6d5c2717c35
|
[
"MIT"
] | null | null | null |
imperium/errors.py
|
DSRetro/imperium
|
12b44677903493b0e506ad07d119e6d5c2717c35
|
[
"MIT"
] | null | null | null |
class Error(Exception):
pass
class ArgumentError(Error):
def __init__(self, message):
self.message = message
| 18
| 32
| 0.68254
| 14
| 126
| 5.857143
| 0.642857
| 0.268293
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.222222
| 126
| 6
| 33
| 21
| 0.836735
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0.2
| 0
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
6aa5eaa9a7406f4bf1087a445c088cae983ea606
| 1,551
|
py
|
Python
|
tests/test_metrics/test_hmean_iou.py
|
yuexy/mmocr
|
82488024db159266e66ea6b0d6f84a5a18e87362
|
[
"Apache-2.0"
] | 2,261
|
2021-04-08T03:45:41.000Z
|
2022-03-31T23:37:46.000Z
|
tests/test_metrics/test_hmean_iou.py
|
yuexy/mmocr
|
82488024db159266e66ea6b0d6f84a5a18e87362
|
[
"Apache-2.0"
] | 789
|
2021-04-08T05:40:13.000Z
|
2022-03-31T09:42:39.000Z
|
tests/test_metrics/test_hmean_iou.py
|
yuexy/mmocr
|
82488024db159266e66ea6b0d6f84a5a18e87362
|
[
"Apache-2.0"
] | 432
|
2021-04-08T03:56:16.000Z
|
2022-03-30T18:44:43.000Z
|
# Copyright (c) OpenMMLab. All rights reserved.
"""Test hmean_iou."""
import pytest
import mmocr.core.evaluation.hmean_iou as hmean_iou
def test_eval_hmean_iou():
pred_boxes = []
gt_boxes = []
gt_ignored_boxes = []
iou_thr = 0.5
precision_thr = 0.5
# test invalid arguments.
with pytest.raises(AssertionError):
hmean_iou.eval_hmean_iou([1], gt_boxes, gt_ignored_boxes, iou_thr,
precision_thr)
with pytest.raises(AssertionError):
hmean_iou.eval_hmean_iou(pred_boxes, [1], gt_ignored_boxes, iou_thr,
precision_thr)
with pytest.raises(AssertionError):
hmean_iou.eval_hmean_iou(pred_boxes, gt_boxes, [1], iou_thr,
precision_thr)
with pytest.raises(AssertionError):
hmean_iou.eval_hmean_iou(pred_boxes, gt_boxes, gt_ignored_boxes, 1.1,
precision_thr)
with pytest.raises(AssertionError):
hmean_iou.eval_hmean_iou(pred_boxes, gt_boxes, gt_ignored_boxes,
iou_thr, 1.1)
pred_boxes = [[[0, 0, 1, 0, 1, 1, 0, 1], [2, 0, 3, 0, 3, 1, 2, 1]]]
gt_boxes = [[[0, 0, 1, 0, 1, 1, 0, 1], [2, 0, 3, 0, 3, 1, 2, 1]]]
gt_ignored_boxes = [[]]
results = hmean_iou.eval_hmean_iou(pred_boxes, gt_boxes, gt_ignored_boxes,
iou_thr, precision_thr)
assert results[1][0]['recall'] == 1
assert results[1][0]['precision'] == 1
assert results[1][0]['hmean'] == 1
| 36.928571
| 78
| 0.588008
| 213
| 1,551
| 3.981221
| 0.169014
| 0.150943
| 0.099057
| 0.113208
| 0.75
| 0.712264
| 0.712264
| 0.712264
| 0.712264
| 0.630896
| 0
| 0.047316
| 0.291425
| 1,551
| 41
| 79
| 37.829268
| 0.724295
| 0.055448
| 0
| 0.290323
| 0
| 0
| 0.013717
| 0
| 0
| 0
| 0
| 0
| 0.258065
| 1
| 0.032258
| false
| 0
| 0.064516
| 0
| 0.096774
| 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
|
0a870e93d20600b13f1848149e8dbb95d0fd597b
| 942
|
py
|
Python
|
tests/kyu_8_tests/test_sum_without_highest_and_lowest_number.py
|
the-zebulan/CodeWars
|
1eafd1247d60955a5dfb63e4882e8ce86019f43a
|
[
"MIT"
] | 40
|
2016-03-09T12:26:20.000Z
|
2022-03-23T08:44:51.000Z
|
tests/kyu_8_tests/test_sum_without_highest_and_lowest_number.py
|
akalynych/CodeWars
|
1eafd1247d60955a5dfb63e4882e8ce86019f43a
|
[
"MIT"
] | null | null | null |
tests/kyu_8_tests/test_sum_without_highest_and_lowest_number.py
|
akalynych/CodeWars
|
1eafd1247d60955a5dfb63e4882e8ce86019f43a
|
[
"MIT"
] | 36
|
2016-11-07T19:59:58.000Z
|
2022-03-31T11:18:27.000Z
|
import unittest
from katas.kyu_8.sum_without_highest_and_lowest_number import sum_array
class SumArrayTestCase(unittest.TestCase):
def test_equal_1(self):
self.assertEqual(sum_array(None), 0)
def test_equal_2(self):
self.assertEqual(sum_array([]), 0)
def test_equal_3(self):
self.assertEqual(sum_array([3]), 0)
def test_equal_4(self):
self.assertEqual(sum_array([-3]), 0)
def test_equal_5(self):
self.assertEqual(sum_array([3, 5]), 0)
def test_equal_6(self):
self.assertEqual(sum_array([-3, -5]), 0)
def test_equal_7(self):
self.assertEqual(sum_array([6, 2, 1, 8, 10]), 16)
def test_equal_8(self):
self.assertEqual(sum_array([6, 0, 1, 10, 10]), 17)
def test_equal_9(self):
self.assertEqual(sum_array([-6, -20, -1, -10, -12]), -28)
def test_equal_10(self):
self.assertEqual(sum_array([-6, 20, -1, 10, -12]), 3)
| 26.166667
| 71
| 0.636943
| 146
| 942
| 3.856164
| 0.253425
| 0.156306
| 0.213144
| 0.390764
| 0.614565
| 0.51865
| 0.419183
| 0.419183
| 0.419183
| 0.419183
| 0
| 0.080645
| 0.210191
| 942
| 35
| 72
| 26.914286
| 0.676075
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.434783
| 1
| 0.434783
| false
| 0
| 0.086957
| 0
| 0.565217
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
0aa6ef07e18f895571a5f7cb10a1f67dc95346e8
| 21,312
|
py
|
Python
|
src/MAT/test/mat_bootstrap_unittest.py
|
wake-forest-ctsi/mist-toolkit
|
857e91976fa3b75ef2cad08612fa79cf2f743615
|
[
"BSD-3-Clause"
] | 2
|
2019-10-18T18:19:09.000Z
|
2020-10-23T17:38:15.000Z
|
scrubber/MIST_2_0_4/src/MAT/test/mat_bootstrap_unittest.py
|
manaswini18/DmD
|
dd1e865ddb7b43c8478b2b5733385143b1980951
|
[
"Apache-2.0"
] | null | null | null |
scrubber/MIST_2_0_4/src/MAT/test/mat_bootstrap_unittest.py
|
manaswini18/DmD
|
dd1e865ddb7b43c8478b2b5733385143b1980951
|
[
"Apache-2.0"
] | 9
|
2016-12-17T22:50:37.000Z
|
2020-09-26T01:08:06.000Z
|
# Copyright (C) 2007 - 2009 The MITRE Corporation. See the toplevel
# file LICENSE for license terms.
from mat_unittest_resources import PluginContextTestCase
import MAT
import os, shutil
# Testing the simpler bootstrapper.
class BootstrapBasicTestCase(PluginContextTestCase):
def setUp(self):
PluginContextTestCase.setUp(self)
self.expDir = os.path.join(self.testContext["TMPDIR"], "sample_ne_exp_in_code")
os.makedirs(self.expDir)
def tearDown(self):
PluginContextTestCase.tearDown(self)
shutil.rmtree(self.expDir)
class SimpleBootstrapTestCase(BootstrapBasicTestCase):
def testSimple(self):
# I'm going to do a simple boostrap, constructed from objects.
patternDir = os.path.join(self.testContext["MAT_PKG_HOME"], "sample", "ne", "resources", "data", "json")
from MAT.Bootstrap import Bootstrapper, DocumentSet, TrainingRun, TestRun
e = Bootstrapper(dir = self.expDir, task = self.task,
corpora = [DocumentSet("test", partitions = [("train", 4), ("test", 1)],
filePats = ["*.json"], prefix = patternDir)],
models = [TrainingRun("test", trainingCorpora = [("test", "train")])],
runs = [TestRun("test", model = "test", testCorpora = [("test", "test")],
engineOptions = {"steps": "zone,tokenize,tag", "workflow": "Demo"})])
e.run()
# OK, now we need to make sure that there's a model, and that in the
# run input and the hyp input, there are two files each, whose names are
# the prefix of the test slice of the test corpus.
self.assertTrue(len(e.getModel("test").allInstances) == 1)
m = e.getModel("test").allInstances[0]
self.assertTrue(os.path.exists(os.path.join(m.modelDir, "model")))
files = e.corporaTable["test"].getFiles(partition = "test")
self.assertEqual(len(files), 2)
self.assertEqual(len(m.trainingSet.getFiles()), 8)
self.assertTrue(len(e.runTable["test"].allInstances) == 1)
r = e.runTable["test"].allInstances[0]
runDir = r.runDir
for file in files:
self.assertTrue(os.path.exists(os.path.join(runDir, "hyp", os.path.basename(file)) + ".prepped.tag.json"))
self.assertTrue(os.path.exists(os.path.join(runDir, "run_input", os.path.basename(file)) + ".prepped"))
def testFiveWay(self):
# I'm going to do a simple boostrap, constructed from objects.
patternDir = os.path.join(self.testContext["MAT_PKG_HOME"], "sample", "ne", "resources", "data", "json")
from MAT.Bootstrap import Bootstrapper, DocumentSet, TrainingRun, TestRun
e = Bootstrapper(dir = self.expDir, task = self.task,
corpora = [DocumentSet("test",
partitions = [("s1", 1), ("s2", 1), ("s3", 1), ("s4", 1), ("s5", 1)],
filePats = ["*.json"], prefix = patternDir)],
models = [TrainingRun("s1234", trainingCorpora = [("test", "s1"),
("test", "s2"),
("test", "s3"),
("test", "s4")]),
TrainingRun("s1235", trainingCorpora = [("test", "s1"),
("test", "s2"),
("test", "s3"),
("test", "s5")]),
TrainingRun("s1245", trainingCorpora = [("test", "s1"),
("test", "s2"),
("test", "s4"),
("test", "s5")]),
TrainingRun("s1345", trainingCorpora = [("test", "s1"),
("test", "s3"),
("test", "s4"),
("test", "s5")]),
TrainingRun("s2345", trainingCorpora = [("test", "s2"),
("test", "s3"),
("test", "s4"),
("test", "s5")])],
runs = [TestRun("s1", model = "s2345", testCorpora = [("test", "s1")],
engineOptions = {"steps": "zone,tokenize,tag", "workflow": "Demo"}),
TestRun("s2", model = "s1345", testCorpora = [("test", "s2")],
engineOptions = {"steps": "zone,tokenize,tag", "workflow": "Demo"}),
TestRun("s3", model = "s1245", testCorpora = [("test", "s3")],
engineOptions = {"steps": "zone,tokenize,tag", "workflow": "Demo"}),
TestRun("s4", model = "s1235", testCorpora = [("test", "s4")],
engineOptions = {"steps": "zone,tokenize,tag", "workflow": "Demo"}),
TestRun("s5", model = "s1234", testCorpora = [("test", "s5")],
engineOptions = {"steps": "zone,tokenize,tag", "workflow": "Demo"})])
e.run()
# OK, now we need to make sure that there's a model, and that in the
# run input and the hyp input, there are two files each, whose names are
# the prefix of the test slice of the test corpus.
for m, mTemplate in e.modelSetTable.items():
self.assertTrue(len(mTemplate.allInstances) == 1)
self.assertTrue(os.path.exists(os.path.join(e.getModelDir(mTemplate.allInstances[0]), "model")))
self.assertEqual(len(mTemplate.allInstances[0].trainingSet.getFiles()), 8)
for p in ["s1", "s2", "s3", "s4", "s5"]:
files = e.corporaTable["test"].getFiles(partition = p)
self.assertEqual(len(files), 2)
r = e.runTable[p]
self.assertTrue(len(r.allInstances) == 1)
runDir = r.allInstances[0].runDir
for file in files:
self.assertTrue(os.path.exists(os.path.join(runDir, "hyp", os.path.basename(file)) + ".prepped.tag.json"))
self.assertTrue(os.path.exists(os.path.join(runDir, "run_input", os.path.basename(file)) + ".prepped"))
class BootstrapIncrementTestCase(BootstrapBasicTestCase):
def testIncrement(self):
patternDir = os.path.join(self.testContext["MAT_PKG_HOME"], "sample", "ne", "resources", "data", "json")
from MAT.Bootstrap import Bootstrapper, DocumentSet, TrainingRun, TestRun, IncrementIterator
e = Bootstrapper(dir = self.expDir, task = self.task,
corpora = [DocumentSet("test", partitions = [("train", 4), ("test", 1)],
filePats = ["*.json"], prefix = patternDir)],
models = [TrainingRun("test", trainingCorpora = [("test", "train")],
iterators = [IncrementIterator("engineSettings", "max_iterations",
4, 8, 2)])],
runs = [TestRun("test", model = "test", testCorpora = [("test", "test")],
engineOptions = {"steps": "zone,tokenize,tag", "workflow": "Demo"})])
e.run()
# OK, this works. There should be a subdirectory for each model.
self.assertTrue(len(e.getModel("test").allInstances) == 3)
for m in e.getModel("test").allInstances:
self.assertTrue(os.path.exists(os.path.join(m.modelDir, "model")))
self.assertEqual(len(m.trainingSet.getFiles()), 8)
self.assertEqual([m.engineSettings["max_iterations"] for m in e.getModel("test").allInstances], [4, 6, 8])
self.assertEqual([m.modelSubdir for m in e.getModel("test").allInstances],
["test_max_iterations_4", "test_max_iterations_6", "test_max_iterations_8"])
files = e.corporaTable["test"].getFiles(partition = "test")
self.assertEqual(len(files), 2)
self.assertTrue(len(e.runTable["test"].allInstances) == 3)
for r in e.runTable["test"].allInstances:
runDir = r.runDir
for file in files:
self.assertTrue(os.path.exists(os.path.join(runDir, "hyp", os.path.basename(file)) + ".prepped.tag.json"))
self.assertTrue(os.path.exists(os.path.join(runDir, "run_input", os.path.basename(file)) + ".prepped"))
self.assertEqual([os.path.basename(r.runDir) for r in e.runTable["test"].allInstances],
["test_max_iterations_4", "test_max_iterations_6", "test_max_iterations_8"])
def testIncrementNoLastStep(self):
# There should be a difference between forceLast and not forceLast.
patternDir = os.path.join(self.testContext["MAT_PKG_HOME"], "sample", "ne", "resources", "data", "json")
from MAT.Bootstrap import Bootstrapper, DocumentSet, TrainingRun, TestRun, IncrementIterator
e = Bootstrapper(dir = self.expDir, task = self.task,
corpora = [DocumentSet("test", partitions = [("train", 4), ("test", 1)],
filePats = ["*.json"], prefix = patternDir)],
models = [TrainingRun("test", trainingCorpora = [("test", "train")],
iterators = [IncrementIterator("engineSettings", "max_iterations",
4, 7, 2)])])
e.run()
# OK, this works. There should be a subdirectory for each model.
self.assertTrue(len(e.getModel("test").allInstances) == 2)
def testIncrementLastStep(self):
# There should be a difference between forceLast and not forceLast.
patternDir = os.path.join(self.testContext["MAT_PKG_HOME"], "sample", "ne", "resources", "data", "json")
from MAT.Bootstrap import Bootstrapper, DocumentSet, TrainingRun, TestRun, IncrementIterator
e = Bootstrapper(dir = self.expDir, task = self.task,
corpora = [DocumentSet("test", partitions = [("train", 4), ("test", 1)],
filePats = ["*.json"], prefix = patternDir)],
models = [TrainingRun("test", trainingCorpora = [("test", "train")],
iterators = [IncrementIterator("engineSettings", "max_iterations",
4, 7, 2, forceLast = True)])])
e.run()
# OK, this works. There should be a subdirectory for each model.
self.assertTrue(len(e.getModel("test").allInstances) == 3)
def testDoubleModelIncrement(self):
# Forcing last here because of float rounding.
patternDir = os.path.join(self.testContext["MAT_PKG_HOME"], "sample", "ne", "resources", "data", "json")
from MAT.Bootstrap import Bootstrapper, DocumentSet, TrainingRun, TestRun, IncrementIterator
e = Bootstrapper(dir = self.expDir, task = self.task,
corpora = [DocumentSet("test", partitions = [("train", 4), ("test", 1)],
filePats = ["*.json"], prefix = patternDir)],
models = [TrainingRun("test", trainingCorpora = [("test", "train")],
engineSettings = {"l1": True},
iterators = [IncrementIterator("engineSettings", "max_iterations",
4, 8, 2),
IncrementIterator("engineSettings", "l1_c",
0.1, 0.3, .1, forceLast = True)])])
e.run()
self.assertTrue(len(e.getModel("test").allInstances) == 9)
self.assertEqual([m.engineSettings["max_iterations"] for m in e.getModel("test").allInstances],
[4, 4, 4, 6, 6, 6, 8, 8, 8])
self.assertEqual([str(m.engineSettings["l1_c"]) for m in e.getModel("test").allInstances],
['0.1', '0.2', '0.3','0.1', '0.2', '0.3','0.1', '0.2', '0.3'])
self.assertEqual([m.engineSettings["l1"] for m in e.getModel("test").allInstances],
[True] * 9)
self.assertEqual([m.modelSubdir for m in e.getModel("test").allInstances],
["test_max_iterations_4_l1_c_0_1", "test_max_iterations_4_l1_c_0_2",
"test_max_iterations_4_l1_c_0_3",
"test_max_iterations_6_l1_c_0_1", "test_max_iterations_6_l1_c_0_2",
"test_max_iterations_6_l1_c_0_3",
"test_max_iterations_8_l1_c_0_1", "test_max_iterations_8_l1_c_0_2",
"test_max_iterations_8_l1_c_0_3"])
def testModelPlusRunIncrement(self):
patternDir = os.path.join(self.testContext["MAT_PKG_HOME"], "sample", "ne", "resources", "data", "json")
from MAT.Bootstrap import Bootstrapper, DocumentSet, TrainingRun, TestRun, IncrementIterator
e = Bootstrapper(dir = self.expDir, task = self.task,
corpora = [DocumentSet("test", partitions = [("train", 4), ("test", 1)],
filePats = ["*.json"], prefix = patternDir)],
models = [TrainingRun("test", trainingCorpora = [("test", "train")],
iterators = [IncrementIterator("engineSettings", "max_iterations",
4, 8, 2)])],
runs = [TestRun("test", model = "test", testCorpora = [("test", "test")],
engineOptions = {"steps": "zone,tokenize,tag", "workflow": "Demo"},
iterators = [IncrementIterator("engineOptions", "prior_adjust",
-1, 1, 1)])])
e.run()
# OK, this works. There should be a subdirectory for each model.
self.assertTrue(len(e.getModel("test").allInstances) == 3)
self.assertEqual([m.engineSettings["max_iterations"] for m in e.getModel("test").allInstances], [4, 6, 8])
self.assertEqual([m.modelSubdir for m in e.getModel("test").allInstances],
["test_max_iterations_4", "test_max_iterations_6", "test_max_iterations_8"])
self.assertTrue(len(e.runTable["test"].allInstances) == 9)
# Interleaved, so model dominant.
self.assertEqual([(os.path.basename(os.path.dirname(r.runDir)), os.path.basename(r.runDir))
for r in e.runTable["test"].allInstances],
[("test_prior_adjust__1", "test_max_iterations_4"),
("test_prior_adjust_0", "test_max_iterations_4"),
("test_prior_adjust_1", "test_max_iterations_4"),
("test_prior_adjust__1", "test_max_iterations_6"),
("test_prior_adjust_0", "test_max_iterations_6"),
("test_prior_adjust_1", "test_max_iterations_6"),
("test_prior_adjust__1", "test_max_iterations_8"),
("test_prior_adjust_0", "test_max_iterations_8"),
("test_prior_adjust_1", "test_max_iterations_8")])
class CorpusSizeTestCase(BootstrapBasicTestCase):
def testCorpusSizeSimple(self):
# There should be a difference between forceLast and not forceLast.
patternDir = os.path.join(self.testContext["MAT_PKG_HOME"], "sample", "ne", "resources", "data", "json")
from MAT.Bootstrap import Bootstrapper, DocumentSet, TrainingRun, TestRun, CorpusSizeIterator
e = Bootstrapper(dir = self.expDir, task = self.task,
corpora = [DocumentSet("test", partitions = [("train", 4), ("test", 1)],
filePats = ["*.json"], prefix = patternDir)],
models = [TrainingRun("test", trainingCorpora = [("test", "train")],
iterators = [CorpusSizeIterator(2)])])
e.run()
# OK, this works. There should be a subdirectory for each model.
allInstances = e.getModel("test").allInstances
self.assertEqual(len(allInstances), 4)
self.assertEqual([len(m.trainingSet.getFiles()) for m in allInstances],
[2, 4, 6, 8])
self.assertTrue(set(allInstances[0].trainingSet.getFiles()) < set(allInstances[1].trainingSet.getFiles()))
self.assertTrue(set(allInstances[1].trainingSet.getFiles()) < set(allInstances[2].trainingSet.getFiles()))
self.assertTrue(set(allInstances[2].trainingSet.getFiles()) < set(allInstances[3].trainingSet.getFiles()))
class DocumentRandomizationTestCase(BootstrapBasicTestCase):
# The order of documents in both the partitioned and nonpartitioned cases should be
# random. The chances of this test failing by accident are 1 in 10 million.
def testDocumentSetRandomization(self):
patternDir = os.path.join(self.testContext["MAT_PKG_HOME"], "sample", "ne", "resources", "data", "json")
from MAT.Bootstrap import DocumentSet
fList = [DocumentSet("test", filePats = ["*.json"], prefix = patternDir).files[0] for i in range(8)]
self.assertNotEqual(fList, [fList[0]] * 8)
def testDocumentSetPartitionRandomization(self):
patternDir = os.path.join(self.testContext["MAT_PKG_HOME"], "sample", "ne", "resources", "data", "json")
from MAT.Bootstrap import DocumentSet
dList = [DocumentSet("test", partitions = [("train", 4), ("test", 1)],
filePats = ["*.json"], prefix = patternDir) for i in range(8)]
self.assertNotEqual([d.getFiles("train") for d in dList],
[dList[0].getFiles("train")] * 8)
self.assertNotEqual([d.getFiles("test") for d in dList],
[dList[0].getFiles("test")] * 8)
class FixedBootstrapTestCase(BootstrapBasicTestCase):
def testSimple(self):
# I'm going to do a simple boostrap, constructed from objects.
patternDir = os.path.join(self.testContext["MAT_PKG_HOME"], "sample", "ne", "resources", "data", "json")
from MAT.Bootstrap import Bootstrapper, DocumentSet, TrainingRun, TestRun
e = Bootstrapper(dir = self.expDir, task = self.task,
corpora = [DocumentSet("test", partitions = [("train", 3),
("test", DocumentSet.FIXED_PARTITION_REMAINDER)],
partitionIsFixed = True,
filePats = ["*.json"], prefix = patternDir)],
models = [TrainingRun("test", trainingCorpora = [("test", "train")])],
runs = [TestRun("test", model = "test", testCorpora = [("test", "test")],
engineOptions = {"steps": "zone,tokenize,tag", "workflow": "Demo"})])
e.run()
# OK, now we need to make sure that there's a model, and that in the
# run input and the hyp input, there are two files each, whose names are
# the prefix of the test slice of the test corpus.
self.assertTrue(len(e.getModel("test").allInstances) == 1)
m = e.getModel("test").allInstances[0]
self.assertTrue(os.path.exists(os.path.join(m.modelDir, "model")))
files = e.corporaTable["test"].getFiles(partition = "test")
self.assertEqual(len(files), 7)
self.assertEqual(len(m.trainingSet.getFiles()), 3)
self.assertTrue(len(e.runTable["test"].allInstances) == 1)
r = e.runTable["test"].allInstances[0]
runDir = r.runDir
for file in files:
self.assertTrue(os.path.exists(os.path.join(runDir, "hyp", os.path.basename(file)) + ".prepped.tag.json"))
self.assertTrue(os.path.exists(os.path.join(runDir, "run_input", os.path.basename(file)) + ".prepped"))
| 70.569536
| 122
| 0.516986
| 2,061
| 21,312
| 5.25279
| 0.102863
| 0.026603
| 0.042398
| 0.043876
| 0.807778
| 0.780898
| 0.75448
| 0.700536
| 0.652041
| 0.652041
| 0
| 0.020545
| 0.3468
| 21,312
| 301
| 123
| 70.803987
| 0.75713
| 0.07606
| 0
| 0.565737
| 0
| 0
| 0.139195
| 0.034023
| 0
| 0
| 0
| 0
| 0.203187
| 1
| 0.051793
| false
| 0
| 0.055777
| 0
| 0.131474
| 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
|
0abdd140b804d6ef1c5e38db81835d4ebeb0c459
| 102
|
py
|
Python
|
diffios/__init__.py
|
devendrav1987/diffios
|
2afb3e759a6bd7c7f13d955cb29d2ac434f77510
|
[
"MIT"
] | 30
|
2017-03-31T09:17:21.000Z
|
2022-03-17T16:55:00.000Z
|
diffios/__init__.py
|
devendrav1987/diffios
|
2afb3e759a6bd7c7f13d955cb29d2ac434f77510
|
[
"MIT"
] | 17
|
2017-01-27T19:00:20.000Z
|
2017-05-05T15:44:33.000Z
|
diffios/__init__.py
|
devendrav1987/diffios
|
2afb3e759a6bd7c7f13d955cb29d2ac434f77510
|
[
"MIT"
] | 18
|
2018-07-11T16:36:58.000Z
|
2022-02-03T06:50:40.000Z
|
from diffios.config import Config
from diffios.compare import Compare
from diffios.constants import *
| 25.5
| 35
| 0.843137
| 14
| 102
| 6.142857
| 0.428571
| 0.383721
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 102
| 3
| 36
| 34
| 0.955556
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 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
|
0ac4b0af64f8d26f09df145c566900fc763a1da4
| 68
|
py
|
Python
|
madrona/installer/files/_project/_app/forms.py
|
movermeyer/madrona
|
fcdced0a03408754b88a3d88f416e04d500c32d4
|
[
"BSD-3-Clause"
] | 9
|
2015-03-09T11:04:21.000Z
|
2022-01-16T09:45:36.000Z
|
madrona/installer/files/_project/_app/forms.py
|
movermeyer/madrona
|
fcdced0a03408754b88a3d88f416e04d500c32d4
|
[
"BSD-3-Clause"
] | 1
|
2020-04-24T14:38:43.000Z
|
2020-04-24T14:38:43.000Z
|
madrona/installer/files/_project/_app/forms.py
|
movermeyer/madrona
|
fcdced0a03408754b88a3d88f416e04d500c32d4
|
[
"BSD-3-Clause"
] | 2
|
2016-12-06T15:31:35.000Z
|
2018-03-04T20:04:44.000Z
|
from madrona.features.forms import FeatureForm, SpatialFeatureForm
| 22.666667
| 66
| 0.867647
| 7
| 68
| 8.428571
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.088235
| 68
| 2
| 67
| 34
| 0.951613
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
0acebdd1542c3517f0b1cafec953f30570248560
| 24
|
py
|
Python
|
src/training/__init__.py
|
askarum/CS547project
|
73e8da0d4113f9ec3be374958da9dc165212d722
|
[
"MIT"
] | 12
|
2021-07-27T07:18:24.000Z
|
2022-03-09T13:52:20.000Z
|
src/training/__init__.py
|
askarum/CS547project
|
73e8da0d4113f9ec3be374958da9dc165212d722
|
[
"MIT"
] | 3
|
2021-05-15T03:15:45.000Z
|
2021-05-15T03:16:36.000Z
|
src/training/__init__.py
|
askarum/CS547project
|
73e8da0d4113f9ec3be374958da9dc165212d722
|
[
"MIT"
] | 3
|
2021-11-18T14:46:40.000Z
|
2022-01-03T15:47:23.000Z
|
from .samplers import *
| 12
| 23
| 0.75
| 3
| 24
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 24
| 1
| 24
| 24
| 0.9
| 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
|
0ad7a914bddd2b861ba86c7ea1df05f23e0270d3
| 92
|
py
|
Python
|
channel/admin.py
|
theju/dtwt
|
0e29e37d17a2e5a704885df87019ff0cdf006b8b
|
[
"MIT"
] | 8
|
2015-02-19T19:15:18.000Z
|
2022-01-02T03:51:56.000Z
|
channel/admin.py
|
theju/dtwt
|
0e29e37d17a2e5a704885df87019ff0cdf006b8b
|
[
"MIT"
] | null | null | null |
channel/admin.py
|
theju/dtwt
|
0e29e37d17a2e5a704885df87019ff0cdf006b8b
|
[
"MIT"
] | 1
|
2022-01-02T03:52:03.000Z
|
2022-01-02T03:52:03.000Z
|
from django.contrib import admin
from .models import Channel
admin.site.register(Channel)
| 15.333333
| 32
| 0.815217
| 13
| 92
| 5.769231
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.119565
| 92
| 5
| 33
| 18.4
| 0.925926
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
0af205e9b103a1f15934739c82bf8d18c9829550
| 172
|
py
|
Python
|
examples/notebooks/1_deploy_notebooks/notebooks/sample2.py
|
leaferrara/terraform-databricks-workspace-management
|
c446de6838d5a790f32fb8a4dde5becceefb4ea9
|
[
"Apache-2.0"
] | 5
|
2021-05-04T13:15:05.000Z
|
2022-02-01T15:39:12.000Z
|
examples/notebooks/1_deploy_notebooks/notebooks/sample2.py
|
leaferrara/terraform-databricks-workspace-management
|
c446de6838d5a790f32fb8a4dde5becceefb4ea9
|
[
"Apache-2.0"
] | 1
|
2021-09-06T21:10:10.000Z
|
2021-09-06T21:10:10.000Z
|
examples/notebooks/1_deploy_notebooks/notebooks/sample2.py
|
leaferrara/terraform-databricks-workspace-management
|
c446de6838d5a790f32fb8a4dde5becceefb4ea9
|
[
"Apache-2.0"
] | 3
|
2021-08-17T16:42:04.000Z
|
2022-02-22T05:22:18.000Z
|
token = dbutils.secrets.get('${databricks_secret_scope.this.name}', '${databricks_secret.token.key}')
print(f'This should be recacted: {token}')
print(f'Hello world pong')
| 43
| 101
| 0.75
| 25
| 172
| 5.04
| 0.72
| 0.253968
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.069767
| 172
| 3
| 102
| 57.333333
| 0.7875
| 0
| 0
| 0
| 0
| 0
| 0.662791
| 0.383721
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
0afbcef50ccc7de8e740111526d1ebb1241d1ea3
| 6,938
|
py
|
Python
|
main.py
|
regro/conda-forge-sparta
|
1d55095a931da893507037f1bcc696ad3ed94bae
|
[
"BSD-3-Clause"
] | null | null | null |
main.py
|
regro/conda-forge-sparta
|
1d55095a931da893507037f1bcc696ad3ed94bae
|
[
"BSD-3-Clause"
] | null | null | null |
main.py
|
regro/conda-forge-sparta
|
1d55095a931da893507037f1bcc696ad3ed94bae
|
[
"BSD-3-Clause"
] | null | null | null |
import os
import requests
import threading
import gc
from fastapi import FastAPI, HTTPException
from fastapi.responses import RedirectResponse
# https://stackoverflow.com/questions/12435211/python-threading-timer-repeat-function-every-n-seconds
def setInterval(interval):
def decorator(function):
def wrapper(*args, **kwargs):
stopped = threading.Event()
def loop(): # executed in another thread
while not stopped.wait(interval): # until stopped
function(*args, **kwargs)
t = threading.Thread(target=loop)
t.daemon = True # stop if the program exits
t.start()
return stopped
return wrapper
return decorator
LINKS = requests.get(
"https://github.com/regro/repodata/releases/latest/download/links.json"
).json()
@setInterval(300) # every 5 minutes
def _update_links():
print("************* RELOADING LINKS *************")
global LINKS
new_links = requests.get(
"https://github.com/regro/repodata/releases/latest/download/links.json"
).json()
LINKS = new_links
gc.collect()
_stop_update_links = _update_links()
app = FastAPI()
@app.get("/")
async def root():
return {"message": "this is the index!"}
################################################################################
# labels
################################################################################
@app.get("/conda-forge-sparta/label/{label}")
async def root_label(label):
return {"message": "this is the index!"}
# return RedirectResponse(
# f"https://regro.github.io/repodata/label/{label}/index.html"
# )
@app.get("/conda-forge-sparta/label/{label}/channeldata.json")
async def channeldata_label(label):
return RedirectResponse(
"https://github.com/regro/repodata/releases/latest/download/"
f"channeldata_{label}.json"
)
@app.get("/conda-forge-sparta/label/{label}/{subdir}/")
async def subdir_root_label(label, subdir):
return {"message": "this is the index!"}
# return RedirectResponse(
# f"https://regro.github.io/repodata/label/{label}/{subdir}/index.html"
# )
@app.get("/conda-forge-sparta/label/{label}/{subdir}/repodata.json")
async def subdir_repodatadata_label(label, subdir):
return RedirectResponse(
"https://github.com/regro/repodata/releases/latest/download/"
f"repodata_{subdir}_{label}.json"
)
@app.get("/conda-forge-sparta/label/{label}/{subdir}/repodata.json.bz2")
async def subdir_repodatadatabz2_label(label, subdir):
return RedirectResponse(
"https://github.com/regro/repodata/releases/latest/download/"
f"repodata_{subdir}_{label}.json.bz2"
)
@app.get("/conda-forge-sparta/label/{label}/{subdir}/repodata_from_packages.json")
async def subdir_repodatadata_pkgs_label(label, subdir):
return RedirectResponse(
"https://github.com/regro/repodata/releases/latest/download/"
f"repodata_{subdir}_{label}.json"
)
@app.get("/conda-forge-sparta/label/{label}/{subdir}/repodata_from_packages.json.bz2")
async def subdir_repodatadatabz2_pkgs_label(label, subdir):
return RedirectResponse(
"https://github.com/regro/repodata/releases/latest/download/"
f"repodata_{subdir}_{label}.json.bz2"
)
@app.get("/conda-forge-sparta/label/{label}/{subdir}/current_repodata.json")
async def subdir_repodatadata_curr_label(label, subdir):
return RedirectResponse(
"https://github.com/regro/repodata/releases/latest/download/"
f"repodata_{subdir}_{label}.json"
)
@app.get("/conda-forge-sparta/label/{label}/{subdir}/current_repodata.json.bz2")
async def subdir_repodatadatabz2_curr_label(label, subdir):
return RedirectResponse(
"https://github.com/regro/repodata/releases/latest/download/"
f"repodata_{subdir}_{label}.json.bz2"
)
@app.get("/conda-forge-sparta/label/{label}/{subdir}/{pkg}")
async def subdir_pkg_label(label, subdir, pkg):
subdir_pkg = os.path.join(subdir, pkg)
url = LINKS[label].get(subdir_pkg, None)
if url is None:
raise HTTPException(
status_code=404, detail=f"label/{label}/{subdir_pkg} not found!"
)
return RedirectResponse(url)
################################################################################
# main
################################################################################
@app.get("/conda-forge-sparta/")
async def root_main():
return {"message": "this is the index!"}
# return RedirectResponse("https://regro.github.io/repodata/label/main/index.html")
@app.get("/conda-forge-sparta/channeldata.json")
async def channeldata():
return RedirectResponse(
"https://github.com/regro/repodata/releases/latest/download/"
"channeldata_main.json"
)
@app.get("/conda-forge-sparta/{subdir}/")
async def subdir_root(subdir):
return {"message": "this is the index!"}
# return RedirectResponse(
# f"https://regro.github.io/repodata/label/main/{subdir}/index.html"
# )
@app.get("/conda-forge-sparta/{subdir}/repodata.json")
async def subdir_repodatadata(subdir):
return RedirectResponse(
"https://github.com/regro/repodata/releases/latest/download/"
f"repodata_{subdir}_main.json"
)
@app.get("/conda-forge-sparta/{subdir}/repodata.json.bz2")
async def subdir_repodatadatabz2(subdir):
return RedirectResponse(
"https://github.com/regro/repodata/releases/latest/download/"
f"repodata_{subdir}_main.json.bz2"
)
@app.get("/conda-forge-sparta/{subdir}/repodata_from_packages.json")
async def subdir_repodatadata_pkgs(subdir):
return RedirectResponse(
"https://github.com/regro/repodata/releases/latest/download/"
f"repodata_{subdir}_main.json"
)
@app.get("/conda-forge-sparta/{subdir}/repodata_from_packages.json.bz2")
async def subdir_repodatadatabz2_pkgs(subdir):
return RedirectResponse(
"https://github.com/regro/repodata/releases/latest/download/"
f"repodata_{subdir}_main.json.bz2"
)
@app.get("/conda-forge-sparta/{subdir}/current_repodata.json")
async def subdir_repodatadata_curr(subdir):
return RedirectResponse(
"https://github.com/regro/repodata/releases/latest/download/"
f"repodata_{subdir}_main.json"
)
@app.get("/conda-forge-sparta/{subdir}/current_repodata.json.bz2")
async def subdir_repodatadatabz2_curr(subdir):
return RedirectResponse(
"https://github.com/regro/repodata/releases/latest/download/"
f"repodata_{subdir}_main.json.bz2"
)
@app.get("/conda-forge-sparta/{subdir}/{pkg}")
async def subdir_pkg(subdir, pkg):
subdir_pkg = os.path.join(subdir, pkg)
url = LINKS["main"].get(subdir_pkg, None)
if url is None:
raise HTTPException(status_code=404, detail=f"{subdir_pkg} not found!")
return RedirectResponse(url)
| 31.112108
| 101
| 0.656529
| 807
| 6,938
| 5.532838
| 0.130112
| 0.051512
| 0.049272
| 0.071669
| 0.831355
| 0.803136
| 0.78813
| 0.734826
| 0.686898
| 0.659798
| 0
| 0.006132
| 0.153791
| 6,938
| 222
| 102
| 31.252252
| 0.754386
| 0.081724
| 0
| 0.371622
| 0
| 0
| 0.431129
| 0.233715
| 0
| 0
| 0
| 0
| 0
| 1
| 0.033784
| false
| 0
| 0.040541
| 0
| 0.236486
| 0.006757
| 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
|
e40baf433f853651a34a979a26d16b7e3a14289c
| 27
|
py
|
Python
|
tests/molecular/molecules/molecule/fixtures/cof/__init__.py
|
stevenbennett96/stk
|
6e5af87625b83e0bfc7243bc42d8c7a860cbeb76
|
[
"MIT"
] | 21
|
2018-04-12T16:25:24.000Z
|
2022-02-14T23:05:43.000Z
|
tests/molecular/molecules/molecule/fixtures/cof/__init__.py
|
stevenbennett96/stk
|
6e5af87625b83e0bfc7243bc42d8c7a860cbeb76
|
[
"MIT"
] | 8
|
2019-03-19T12:36:36.000Z
|
2020-11-11T12:46:00.000Z
|
tests/molecular/molecules/molecule/fixtures/cof/__init__.py
|
stevenbennett96/stk
|
6e5af87625b83e0bfc7243bc42d8c7a860cbeb76
|
[
"MIT"
] | 5
|
2018-08-07T13:00:16.000Z
|
2021-11-01T00:55:10.000Z
|
from .cof import * # noqa
| 13.5
| 26
| 0.62963
| 4
| 27
| 4.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.259259
| 27
| 1
| 27
| 27
| 0.85
| 0.148148
| 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
|
7c27294a115cc83b1ec1b79310b0689a1023f540
| 118
|
py
|
Python
|
agenda/admin.py
|
wellingtonsilva04/agenda_web
|
aa83b7a0c1310a4266fb9b0ccf09c35c639af05f
|
[
"MIT"
] | null | null | null |
agenda/admin.py
|
wellingtonsilva04/agenda_web
|
aa83b7a0c1310a4266fb9b0ccf09c35c639af05f
|
[
"MIT"
] | null | null | null |
agenda/admin.py
|
wellingtonsilva04/agenda_web
|
aa83b7a0c1310a4266fb9b0ccf09c35c639af05f
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Contato
# Register your models here.
admin.site.register(Contato)
| 29.5
| 32
| 0.822034
| 17
| 118
| 5.705882
| 0.647059
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.110169
| 118
| 4
| 33
| 29.5
| 0.92381
| 0.220339
| 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
|
7c3406d30040228e9d5e9a333ee56e9459605eb2
| 224
|
py
|
Python
|
sdk/pam/lib/libpam_arvados.py
|
coolmaksat/arvados
|
5f571760d4b52426e39ae39d0ce5cb9b7cfb0add
|
[
"Apache-2.0"
] | 1
|
2017-11-15T13:16:38.000Z
|
2017-11-15T13:16:38.000Z
|
sdk/pam/lib/libpam_arvados.py
|
coolmaksat/arvados
|
5f571760d4b52426e39ae39d0ce5cb9b7cfb0add
|
[
"Apache-2.0"
] | null | null | null |
sdk/pam/lib/libpam_arvados.py
|
coolmaksat/arvados
|
5f571760d4b52426e39ae39d0ce5cb9b7cfb0add
|
[
"Apache-2.0"
] | 1
|
2020-09-02T08:37:54.000Z
|
2020-09-02T08:37:54.000Z
|
# Copyright (C) The Arvados Authors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
import sys
sys.path.append('/usr/share/python2.7/dist/libpam-arvados/lib/python2.7/site-packages')
from arvados_pam import *
| 28
| 87
| 0.767857
| 35
| 224
| 4.885714
| 0.828571
| 0.093567
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.029557
| 0.09375
| 224
| 7
| 88
| 32
| 0.812808
| 0.40625
| 0
| 0
| 0
| 0.333333
| 0.527132
| 0.527132
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
7c372f29b18b28c66e0f421346374bd713b8ef9a
| 651
|
py
|
Python
|
amqpstorm/__init__.py
|
getaroom/amqpstorm
|
c7692518197fd145cb499dc260b5ab3038c5d673
|
[
"MIT"
] | null | null | null |
amqpstorm/__init__.py
|
getaroom/amqpstorm
|
c7692518197fd145cb499dc260b5ab3038c5d673
|
[
"MIT"
] | 1
|
2020-09-07T03:01:58.000Z
|
2020-09-07T03:01:58.000Z
|
amqpstorm/__init__.py
|
getaroom/amqpstorm
|
c7692518197fd145cb499dc260b5ab3038c5d673
|
[
"MIT"
] | null | null | null |
"""AMQPStorm."""
__version__ = '2.8.1' # noqa
__author__ = 'eandersson' # noqa
import logging
logging.getLogger('amqpstorm').addHandler(logging.NullHandler())
from amqpstorm.channel import Channel # noqa
from amqpstorm.connection import Connection # noqa
from amqpstorm.uri_connection import UriConnection # noqa
from amqpstorm.message import Message # noqa
from amqpstorm.exception import AMQPError # noqa
from amqpstorm.exception import AMQPChannelError # noqa
from amqpstorm.exception import AMQPMessageError # noqa
from amqpstorm.exception import AMQPConnectionError # noqa
from amqpstorm.exception import AMQPInvalidArgument # noqa
| 36.166667
| 64
| 0.803379
| 72
| 651
| 7.138889
| 0.347222
| 0.227626
| 0.264591
| 0.252918
| 0.311284
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005272
| 0.12596
| 651
| 17
| 65
| 38.294118
| 0.898067
| 0.101382
| 0
| 0
| 0
| 0
| 0.042179
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.769231
| 0
| 0.769231
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
7c3fffae7295b68003f22449543debe9ade79ff4
| 15,148
|
py
|
Python
|
tests/pytests/test_profile.py
|
He-YuFei/RediSearch
|
5f08c2ad22ad2501124d6319dffdf34a3e30c878
|
[
"Apache-2.0",
"Ruby",
"BSD-3-Clause",
"MIT"
] | 1
|
2018-08-23T22:10:15.000Z
|
2018-08-23T22:10:15.000Z
|
tests/pytests/test_profile.py
|
eubide/RediSearch
|
3038e45bac9fe6746af6b5b36106a85e328ed6d8
|
[
"BSD-3-Clause",
"Ruby",
"Apache-2.0",
"MIT"
] | null | null | null |
tests/pytests/test_profile.py
|
eubide/RediSearch
|
3038e45bac9fe6746af6b5b36106a85e328ed6d8
|
[
"BSD-3-Clause",
"Ruby",
"Apache-2.0",
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
import unittest
from includes import *
from common import getConnectionByEnv, waitForIndex, sortedResults, toSortedFlatList, server_version_less_than, server_version_at_least
from time import sleep
from RLTest import Env
def testProfileSearch(env):
env.skipOnCluster()
conn = getConnectionByEnv(env)
env.cmd('FT.CONFIG', 'SET', '_PRINT_PROFILE_CLOCK', 'false')
env.cmd('ft.create', 'idx', 'SCHEMA', 't', 'text')
conn.execute_command('hset', '1', 't', 'hello')
conn.execute_command('hset', '2', 't', 'world')
env.expect('ft.profile', 'profile', 'idx', '*', 'nocontent').error().contains('No `SEARCH` or `AGGREGATE` provided')
# test WILDCARD
actual_res = conn.execute_command('ft.profile', 'idx', 'search', 'query', '*', 'nocontent')
env.assertEqual(actual_res[1][3], ['Iterators profile', ['Type', 'WILDCARD', 'Counter', 2L]])
# test EMPTY
actual_res = conn.execute_command('ft.profile', 'idx', 'search', 'query', 'redis', 'nocontent')
env.assertEqual(actual_res[1][3], ['Iterators profile', ['Type', 'EMPTY', 'Counter', 0L]])
# test single term
actual_res = conn.execute_command('ft.profile', 'idx', 'search', 'query', 'hello', 'nocontent')
env.assertEqual(actual_res[1][3], ['Iterators profile', ['Type', 'TEXT', 'Term', 'hello', 'Counter', 1L, 'Size', 1L]])
# test UNION
actual_res = conn.execute_command('ft.profile', 'idx', 'search', 'query', 'hello|world', 'nocontent')
expected_res = ['Iterators profile', ['Type', 'UNION', 'Query type', 'UNION', 'Counter', 2L, 'Child iterators',
['Type', 'TEXT', 'Term', 'hello', 'Counter', 1L, 'Size', 1L],
['Type', 'TEXT', 'Term', 'world', 'Counter', 1L, 'Size', 1L]]]
env.assertEqual(actual_res[1][3], expected_res)
# test INTERSECT
actual_res = conn.execute_command('ft.profile', 'idx', 'search', 'query', 'hello world', 'nocontent')
expected_res = ['Iterators profile', ['Type', 'INTERSECT', 'Counter', 0L, 'Child iterators',
['Type', 'TEXT', 'Term', 'hello', 'Counter', 1L, 'Size', 1L],
['Type', 'TEXT', 'Term', 'world', 'Counter', 1L, 'Size', 1L]]]
env.assertEqual(actual_res[1][3], expected_res)
# test NOT
actual_res = conn.execute_command('ft.profile', 'idx', 'search', 'query', '-hello', 'nocontent')
expected_res = ['Iterators profile', ['Type', 'NOT', 'Counter', 1L, 'Child iterator',
['Type', 'TEXT', 'Term', 'hello', 'Counter', 1L, 'Size', 1L]]]
env.assertEqual(actual_res[1][3], expected_res)
# test OPTIONAL
actual_res = conn.execute_command('ft.profile', 'idx', 'search', 'query', '~hello', 'nocontent')
expected_res = ['Iterators profile', ['Type', 'OPTIONAL', 'Counter', 2L, 'Child iterator',
['Type', 'TEXT', 'Term', 'hello', 'Counter', 1L, 'Size', 1L]]]
env.assertEqual(actual_res[1][3], expected_res)
# test PREFIX
actual_res = conn.execute_command('ft.profile', 'idx', 'search', 'query', 'hel*', 'nocontent')
expected_res = ['Iterators profile', ['Type', 'UNION', 'Query type', 'PREFIX - hel', 'Counter', 1L, 'Child iterators',
['Type', 'TEXT', 'Term', 'hello', 'Counter', 1L, 'Size', 1L]]]
env.assertEqual(actual_res[1][3], expected_res)
# test FUZZY
actual_res = conn.execute_command('ft.profile', 'idx', 'search', 'query', '%%hel%%', 'nocontent')
expected_res = ['Iterators profile', ['Type', 'UNION', 'Query type', 'FUZZY - hel', 'Counter', 1L, 'Child iterators',
['Type', 'TEXT', 'Term', 'hello', 'Counter', 1L, 'Size', 1L]]]
env.assertEqual(actual_res[1][3], expected_res)
# test ID LIST iter with INKEYS
actual_res = conn.execute_command('ft.profile', 'idx', 'search', 'query', 'hello', 'inkeys', 1, '1')
expected_res = ['Iterators profile', ['Type', 'INTERSECT', 'Counter', 1L, 'Child iterators',
['Type', 'ID-LIST', 'Counter', 1L],
['Type', 'TEXT', 'Term', 'hello', 'Counter', 1L, 'Size', 1L]]]
env.assertEqual(actual_res[1][3], expected_res)
# test no crash on reaching deep reply array
actual_res = conn.execute_command('ft.profile', 'idx', 'search', 'query', 'hello(hello(hello(hello(hello))))', 'nocontent')
expected_res = ['Iterators profile', ['Type', 'INTERSECT', 'Counter', 1L, 'Child iterators',
['Type', 'TEXT', 'Term', 'hello', 'Counter', 1L, 'Size', 1L],
['Type', 'INTERSECT', 'Counter', 1L, 'Child iterators',
['Type', 'TEXT', 'Term', 'hello', 'Counter', 1L, 'Size', 1L],
['Type', 'INTERSECT', 'Counter', 1L, 'Child iterators',
['Type', 'TEXT', 'Term', 'hello', 'Counter', 1L, 'Size', 1L],
['Type', 'INTERSECT', 'Counter', 1L, 'Child iterators',
['Type', 'TEXT', 'Term', 'hello', 'Counter', 1L, 'Size', 1L],
['Type', 'TEXT', 'Term', 'hello', 'Counter', 1L, 'Size', 1L]]]]]]
env.assertEqual(actual_res[1][3], expected_res)
if server_version_less_than(env, '6.2.0'):
return
actual_res = env.execute_command('ft.profile', 'idx', 'search', 'query', 'hello(hello(hello(hello(hello(hello)))))', 'nocontent')
expected_res = ['Iterators profile',
['Type', 'INTERSECT', 'Counter', 1L, 'Child iterators',
['Type', 'TEXT', 'Term', 'hello', 'Counter', 1L, 'Size', 1L],
['Type', 'INTERSECT', 'Counter', 1L, 'Child iterators',
['Type', 'TEXT', 'Term', 'hello', 'Counter', 1L, 'Size', 1L],
['Type', 'INTERSECT', 'Counter', 1L, 'Child iterators',
['Type', 'TEXT', 'Term', 'hello', 'Counter', 1L, 'Size', 1L],
['Type', 'INTERSECT', 'Counter', 1L, 'Child iterators',
['Type', 'TEXT', 'Term', 'hello', 'Counter', 1L, 'Size', 1L],
['Type', 'INTERSECT', 'Counter', 1L, 'Child iterators',
['Type', 'TEXT', 'Term', 'hello', 'Counter', 1L, 'Size', 1L],
['Type', 'TEXT', 'Term', 'hello', 'Counter', 1L, 'Size', 1L]]]]]]]
env.assertEqual(actual_res[1][3], expected_res)
def testProfileSearchLimited(env):
env.skipOnCluster()
conn = getConnectionByEnv(env)
env.cmd('FT.CONFIG', 'SET', '_PRINT_PROFILE_CLOCK', 'false')
env.cmd('ft.create', 'idx', 'SCHEMA', 't', 'text')
conn.execute_command('hset', '1', 't', 'hello')
conn.execute_command('hset', '2', 't', 'hell')
conn.execute_command('hset', '3', 't', 'help')
conn.execute_command('hset', '4', 't', 'helowa')
actual_res = conn.execute_command('ft.profile', 'idx', 'search', 'limited', 'query', '%hell% hel*')
expected_res = ['Iterators profile', ['Type', 'INTERSECT', 'Counter', 3L, 'Child iterators',
['Type', 'UNION', 'Query type', 'FUZZY - hell', 'Counter', 3L, 'Child iterators', 'The number of iterators in the union is 3'],
['Type', 'UNION', 'Query type', 'PREFIX - hel', 'Counter', 3L, 'Child iterators', 'The number of iterators in the union is 4']]]
env.assertEqual(actual_res[1][3], expected_res)
def testProfileAggregate(env):
env.skipOnCluster()
conn = getConnectionByEnv(env)
env.cmd('FT.CONFIG', 'SET', '_PRINT_PROFILE_CLOCK', 'false')
env.cmd('ft.create', 'idx', 'SCHEMA', 't', 'text')
conn.execute_command('hset', '1', 't', 'hello')
conn.execute_command('hset', '2', 't', 'world')
expected_res = ['Result processors profile',
['Type', 'Index', 'Counter', 1L],
['Type', 'Loader', 'Counter', 1L],
['Type', 'Grouper', 'Counter', 1L]]
actual_res = conn.execute_command('ft.profile', 'idx', 'aggregate', 'query', 'hello',
'groupby', 1, '@t',
'REDUCE', 'count', '0', 'as', 'sum')
env.assertEqual(actual_res[1][4], expected_res)
expected_res = ['Result processors profile',
['Type', 'Index', 'Counter', 2L],
['Type', 'Loader', 'Counter', 2L],
['Type', 'Projector - Function startswith', 'Counter', 2L]]
actual_res = env.cmd('ft.profile', 'idx', 'aggregate', 'query', '*',
'load', 1, 't',
'apply', 'startswith(@t, "hel")', 'as', 'prefix')
env.assertEqual(actual_res[1][4], expected_res)
def testProfileCursor(env):
conn = getConnectionByEnv(env)
env.cmd('ft.create', 'idx', 'SCHEMA', 't', 'text')
env.expect('ft.profile', 'idx', 'aggregate', 'query', '*', 'WITHCURSOR').error().contains('FT.PROFILE does not support cursor')
def testProfileErrors(env):
conn = getConnectionByEnv(env)
env.cmd('ft.create', 'idx', 'SCHEMA', 't', 'text')
# missing args
env.expect('ft.profile', 'idx').error().contains("wrong number of arguments for 'ft.profile'")
env.expect('ft.profile', 'idx', 'SEARCH').error().contains("wrong number of arguments for 'ft.profile'")
env.expect('ft.profile', 'idx', 'SEARCH', 'QUERY').error().contains("wrong number of arguments for 'ft.profile'")
# wrong `query` type
env.expect('ft.profile', 'idx', 'redis', 'QUERY', '*').error().contains('No `SEARCH` or `AGGREGATE` provided')
# miss `QUERY` keyword
if not env.isCluster():
env.expect('ft.profile', 'idx', 'SEARCH', 'FIND', '*').error().contains('The QUERY keyward is expected')
def testProfileNumeric(env):
env.skipOnCluster()
conn = getConnectionByEnv(env)
env.cmd('FT.CONFIG', 'SET', '_PRINT_PROFILE_CLOCK', 'false')
env.cmd('ft.create', 'idx', 'SCHEMA', 'n', 'numeric')
conn.execute_command('hset', '1', 'n', '1.2')
conn.execute_command('hset', '2', 'n', '1.5')
conn.execute_command('hset', '3', 'n', '8.2')
conn.execute_command('hset', '4', 'n', '6.7')
conn.execute_command('hset', '5', 'n', '-14')
actual_res = conn.execute_command('ft.profile', 'idx', 'search', 'query', '@n:[0,100]', 'nocontent')
expected_res = ['Iterators profile', ['Type', 'UNION', 'Query type', 'NUMERIC', 'Counter', 4L, 'Child iterators',
['Type', 'NUMERIC', 'Term', '-14 - 1.35', 'Counter', 1L, 'Size', 2L],
['Type', 'NUMERIC', 'Term', '1.35 - 8.2', 'Counter', 3L, 'Size', 3L]]]
env.assertEqual(actual_res[1][3], expected_res)
def testProfileTag(env):
env.skipOnCluster()
conn = getConnectionByEnv(env)
env.cmd('FT.CONFIG', 'SET', '_PRINT_PROFILE_CLOCK', 'false')
env.cmd('ft.create', 'idx', 'SCHEMA', 't', 'tag')
conn.execute_command('hset', '1', 't', 'foo,bar')
conn.execute_command('hset', '2', 't', 'food,bag')
conn.execute_command('hset', '3', 't', 'foo')
# tag profile
actual_res = conn.execute_command('ft.profile', 'idx', 'search', 'query', '@t:{foo}', 'nocontent')
env.assertEqual(actual_res[1][3], ['Iterators profile', ['Type', 'TAG', 'Term', 'foo', 'Counter', 2L, 'Size', 2L]])
def testProfileVector(env):
env.skipOnCluster()
conn = getConnectionByEnv(env)
env.cmd('FT.CONFIG', 'SET', '_PRINT_PROFILE_CLOCK', 'false')
env.expect('FT.CREATE idx SCHEMA v VECTOR HNSW 6 TYPE FLOAT32 DIM 2 DISTANCE_METRIC L2 t TEXT').ok()
conn.execute_command('hset', '1', 'v', 'abababab', 't', "hello")
conn.execute_command('hset', '2', 'v', 'babababa', 't', "hello")
conn.execute_command('hset', '3', 'v', 'aabbaabb', 't', "hello")
conn.execute_command('hset', '4', 'v', 'bbaabbaa', 't', "hello world")
conn.execute_command('hset', '5', 'v', 'aaaabbbb', 't', "hello world")
actual_res = conn.execute_command('ft.profile', 'idx', 'search', 'query', '*=>[TOP_K 3 @v $vec]', 'PARAMS', '2', 'vec', 'aaaaaaaa', 'nocontent')
expected_iterators_res = ['Iterators profile', ['Type', 'VECTOR', 'Counter', 3L]]
expected_vecsim_rp_res = ['Type', 'Vector Similarity Scores Loader', 'Counter', 3L]
env.assertEqual(actual_res[0], [3L, '1', '2', '4'])
env.assertEqual(actual_res[1][3], expected_iterators_res)
env.assertEqual(actual_res[1][4][3], expected_vecsim_rp_res)
# Test with hybrid query
actual_res = conn.execute_command('ft.profile', 'idx', 'search', 'query', '(@t:hello world)=>[TOP_K 3 @v $vec]', 'PARAMS', '2', 'vec', 'aaaaaaaa', 'nocontent')
expected_iterators_res = ['Iterators profile', ['Type', 'VECTOR', 'Counter', 2L, 'Child iterator', ['Type', 'INTERSECT', 'Counter', 4L, 'Child iterators', ['Type', 'TEXT', 'Term', 'world', 'Counter', 4L, 'Size', 2L], ['Type', 'TEXT', 'Term', 'hello', 'Counter', 4L, 'Size', 5L]]]]
expected_vecsim_rp_res = ['Type', 'Vector Similarity Scores Loader', 'Counter', 2L]
env.assertEqual(actual_res[0], [2L, '4', '5'])
env.assertEqual(actual_res[1][3], expected_iterators_res)
env.assertEqual(actual_res[1][4][3], expected_vecsim_rp_res)
def testResultProcessorCounter(env):
env.skipOnCluster()
conn = getConnectionByEnv(env)
env.cmd('FT.CONFIG', 'SET', '_PRINT_PROFILE_CLOCK', 'false')
env.cmd('ft.create', 'idx', 'SCHEMA', 't', 'text')
conn.execute_command('hset', '1', 't', 'foo')
conn.execute_command('hset', '2', 't', 'bar')
actual_res = conn.execute_command('ft.profile', 'idx', 'search', 'query', 'foo|bar', 'limit', '0', '0')
env.assertEqual(actual_res[0], [2L])
res = ['Result processors profile',
['Type', 'Index', 'Counter', 2L],
['Type', 'Counter', 'Counter', 1L]]
env.assertEqual(actual_res[1][4], res)
def testProfileMaxPrefixExpansion(env):
env.skipOnCluster()
conn = getConnectionByEnv(env)
env.cmd('FT.CONFIG', 'SET', 'MAXPREFIXEXPANSIONS', 2)
env.cmd('FT.CONFIG', 'SET', '_PRINT_PROFILE_CLOCK', 'false')
env.cmd('ft.create', 'idx', 'SCHEMA', 't', 'text')
conn.execute_command('hset', '1', 't', 'foo1')
conn.execute_command('hset', '2', 't', 'foo2')
conn.execute_command('hset', '3', 't', 'foo3')
actual_res = conn.execute_command('ft.profile', 'idx', 'search', 'query', 'foo*', 'limit', '0', '0')
env.assertEqual(actual_res[1][3][1][6:8], ['Warning', 'Max prefix expansion reached'])
env.cmd('FT.CONFIG', 'SET', 'MAXPREFIXEXPANSIONS', 200)
def testNotIterator(env):
env.skipOnCluster()
conn = getConnectionByEnv(env)
env.cmd('FT.CONFIG', 'SET', 'MAXPREFIXEXPANSIONS', 2)
env.cmd('FT.CONFIG', 'SET', '_PRINT_PROFILE_CLOCK', 'false')
conn.execute_command('FT.CREATE', 'idx', 'SCHEMA', 't', 'text')
conn.execute_command('HSET', '1', 't', 'foo')
conn.execute_command('HSET', '2', 't', 'bar')
#before the fix, we would not get an empty iterator
res = [[1L, '1', ['t', 'foo']],
[['Total profile time'],
['Parsing time'],
['Pipeline creation time'],
['Iterators profile',
['Type', 'INTERSECT', 'Counter', 1L, 'Child iterators',
['Type', 'TEXT', 'Term', 'foo', 'Counter', 1L, 'Size', 1L],
['Type', 'NOT', 'Counter', 1L, 'Child iterator',
['Type', 'EMPTY', 'Counter', 0L]]]],
['Result processors profile',
['Type', 'Index', 'Counter', 1L],
['Type', 'Scorer', 'Counter', 1L],
['Type', 'Sorter', 'Counter', 1L], ['Type',
'Loader', 'Counter', 1L]]]]
env.expect('ft.profile', 'idx', 'search', 'query', 'foo -@t:baz').equal(res)
| 52.597222
| 282
| 0.591629
| 1,827
| 15,148
| 4.80624
| 0.114943
| 0.078123
| 0.098394
| 0.070151
| 0.807539
| 0.75037
| 0.711309
| 0.670539
| 0.640246
| 0.601868
| 0
| 0.019877
| 0.186295
| 15,148
| 287
| 283
| 52.780488
| 0.69252
| 0.022841
| 0
| 0.427928
| 0
| 0
| 0.353717
| 0.004938
| 0
| 0
| 0
| 0
| 0.117117
| 0
| null | null | 0
| 0.022523
| null | null | 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
7c5175f1c34bf8b38af7ff777d4ee6be44ccabec
| 36
|
py
|
Python
|
playground.py
|
stefantaubert/deepvoice3_pytorch
|
0b9a65757446c2fb54db199612752e0a1a58a9d2
|
[
"MIT"
] | 267
|
2018-10-24T05:28:04.000Z
|
2019-12-24T19:06:14.000Z
|
playground.py
|
stefantaubert/deepvoice3_pytorch
|
0b9a65757446c2fb54db199612752e0a1a58a9d2
|
[
"MIT"
] | 275
|
2021-01-06T20:53:21.000Z
|
2021-04-22T14:03:09.000Z
|
playground.py
|
stefantaubert/deepvoice3_pytorch
|
0b9a65757446c2fb54db199612752e0a1a58a9d2
|
[
"MIT"
] | 83
|
2018-10-23T15:37:54.000Z
|
2019-12-24T19:06:21.000Z
|
import nltk
nltk.download('punkt')
| 9
| 22
| 0.75
| 5
| 36
| 5.4
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 36
| 3
| 23
| 12
| 0.84375
| 0
| 0
| 0
| 0
| 0
| 0.138889
| 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
|
7c6c52cc87e9e5e628a69bf3d2716e4989d1857e
| 376
|
py
|
Python
|
lang_base_classes/english_language.py
|
clean-code-craft-tcq-2/simple-monitor-in-py-Shivam6033
|
b0a1c9062c4818fe39f4fe59abf48d8fb6541010
|
[
"MIT"
] | null | null | null |
lang_base_classes/english_language.py
|
clean-code-craft-tcq-2/simple-monitor-in-py-Shivam6033
|
b0a1c9062c4818fe39f4fe59abf48d8fb6541010
|
[
"MIT"
] | null | null | null |
lang_base_classes/english_language.py
|
clean-code-craft-tcq-2/simple-monitor-in-py-Shivam6033
|
b0a1c9062c4818fe39f4fe59abf48d8fb6541010
|
[
"MIT"
] | null | null | null |
from abstract_classes.language_service import LanguageService
class EnglishLanguage(LanguageService):
def get_out_of_range_message(self):
return 'out of Range!!'
def get_approaching_charge_peak_message(self):
return 'Warning: Approaching discharge'
def get_approaching_discharge_message(self):
return 'Warning: Approaching charge-peak'
| 28.923077
| 61
| 0.765957
| 43
| 376
| 6.395349
| 0.511628
| 0.065455
| 0.185455
| 0.174545
| 0.254545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.170213
| 376
| 12
| 62
| 31.333333
| 0.88141
| 0
| 0
| 0
| 0
| 0
| 0.202128
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.375
| false
| 0
| 0.125
| 0.375
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
7c7999999076a53281ed7d47ed7bf8acf6d30d3b
| 535
|
py
|
Python
|
allennlp/data/__init__.py
|
nadgeri14/allennlp
|
2eefffaf71612263a1c20e8ce4107849cfd5efe3
|
[
"Apache-2.0"
] | 2
|
2021-04-27T19:56:28.000Z
|
2021-08-19T05:34:37.000Z
|
allennlp/data/__init__.py
|
nadgeri14/allennlp
|
2eefffaf71612263a1c20e8ce4107849cfd5efe3
|
[
"Apache-2.0"
] | 5
|
2021-05-03T14:40:33.000Z
|
2021-05-03T14:40:34.000Z
|
allennlp/data/__init__.py
|
nadgeri14/allennlp
|
2eefffaf71612263a1c20e8ce4107849cfd5efe3
|
[
"Apache-2.0"
] | 1
|
2021-02-04T08:42:23.000Z
|
2021-02-04T08:42:23.000Z
|
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
from allennlp.data.fields.field import DataArray, Field
from allennlp.data.fields.text_field import TextFieldTensors
from allennlp.data.instance import Instance
from allennlp.data.iterators.data_iterator import DataIterator
from allennlp.data.token_indexers.token_indexer import TokenIndexer, IndexedTokenList
from allennlp.data.tokenizers.token import Token
from allennlp.data.tokenizers.tokenizer import Tokenizer
from allennlp.data.vocabulary import Vocabulary
| 53.5
| 85
| 0.878505
| 69
| 535
| 6.724638
| 0.362319
| 0.232759
| 0.310345
| 0.094828
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071028
| 535
| 9
| 86
| 59.444444
| 0.933602
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.