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
8320fac728a80d85b1e519630dfc970c9c911d4e
660
py
Python
tensorflow_addons/conftest.py
dkamotsky/addons
56ff850785c6caa8c18c2859e32a32c8902defea
[ "Apache-2.0" ]
null
null
null
tensorflow_addons/conftest.py
dkamotsky/addons
56ff850785c6caa8c18c2859e32a32c8902defea
[ "Apache-2.0" ]
null
null
null
tensorflow_addons/conftest.py
dkamotsky/addons
56ff850785c6caa8c18c2859e32a32c8902defea
[ "Apache-2.0" ]
null
null
null
from tensorflow_addons.utils.test_utils import maybe_run_functions_eagerly # noqa: F401 from tensorflow_addons.utils.test_utils import cpu_and_gpu # noqa: F401 from tensorflow_addons.utils.test_utils import data_format # noqa: F401 from tensorflow_addons.utils.test_utils import set_seeds # noqa: F401 from tensorflow_addons.utils.test_utils import pytest_addoption # noqa: F401 from tensorflow_addons.utils.test_utils import set_global_variables # noqa: F401 # fixtures present in this file will be available # when running tests and can be referenced with strings # https://docs.pytest.org/en/latest/fixture.html#conftest-py-sharing-fixture-functions
60
88
0.831818
100
660
5.27
0.48
0.159393
0.227704
0.28463
0.542695
0.542695
0.542695
0.466793
0.466793
0.193548
0
0.030508
0.106061
660
10
89
66
0.862712
0.380303
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
8361581bc89f8f89fba16c75843d99dfd02123a6
95
py
Python
atgtasks/__init__.py
seba-1511/atg
8f0b135d1a32c613f6726c7b28d165b8fd63c94c
[ "MIT" ]
null
null
null
atgtasks/__init__.py
seba-1511/atg
8f0b135d1a32c613f6726c7b28d165b8fd63c94c
[ "MIT" ]
null
null
null
atgtasks/__init__.py
seba-1511/atg
8f0b135d1a32c613f6726c7b28d165b8fd63c94c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from ._version import __version__ from .benchmarks import get_tasksets
19
36
0.810526
13
95
5.461538
0.769231
0
0
0
0
0
0
0
0
0
0
0.011905
0.115789
95
4
37
23.75
0.833333
0.221053
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
55e93b479382635978a236df6c9f2565640e840c
4,287
py
Python
tools/pot/openvino/tools/pot/statistics/functions/activations.py
pazamelin/openvino
b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48
[ "Apache-2.0" ]
2,406
2020-04-22T15:47:54.000Z
2022-03-31T10:27:37.000Z
tools/pot/openvino/tools/pot/statistics/functions/activations.py
thomas-yanxin/openvino
031e998a15ec738c64cc2379d7f30fb73087c272
[ "Apache-2.0" ]
4,948
2020-04-22T15:12:39.000Z
2022-03-31T18:45:42.000Z
tools/pot/openvino/tools/pot/statistics/functions/activations.py
thomas-yanxin/openvino
031e998a15ec738c64cc2379d7f30fb73087c272
[ "Apache-2.0" ]
991
2020-04-23T18:21:09.000Z
2022-03-31T18:40:57.000Z
# Copyright (C) 2020-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 from functools import partial import numpy as np from ..function_selector import ACTIVATIONS_STATS_FN, PERTENSOR, PERCHANNEL compute_act_stats_fn_per_tensor = ACTIVATIONS_STATS_FN['compute_statistic'][PERTENSOR] compute_act_stats_fn_per_channel = ACTIVATIONS_STATS_FN['compute_statistic'][PERCHANNEL] get_act_stats_fn_per_tensor = ACTIVATIONS_STATS_FN['statistic_in_graph'][PERTENSOR] get_act_stats_fn_per_channel = ACTIVATIONS_STATS_FN['statistic_in_graph'][PERCHANNEL] # helper functions to calculate statistics for activations def calculate_per_channel_stats(acts, fn, axis=1): """ Calculates per-channel statistics for activations using a specific function :param act: activation :param fn: function to calculate per-channel statistics :return statistics generated by fn for each activation in the batch """ if len(acts.shape) < 3: return acts acts = np.moveaxis(acts, axis, 1) t = acts.reshape(acts.shape[0], acts.shape[1], -1) return fn(t, axis=2) def calculate_per_tensor_stats(acts, fn): """ Calculates statistics by whole tensor for activations using a specific function :param act: activation :param fn: function to calculate per-tensor statistics :return statistics generated by fn for each activation in the batch """ if len(acts.shape) < 2: return np.atleast_1d(fn(acts)) t = acts.reshape(acts.shape[0], -1) return fn(t, axis=1) @compute_act_stats_fn_per_tensor.register('max') def max_per_tensor(acts, **_): return calculate_per_tensor_stats(acts, np.max) @compute_act_stats_fn_per_tensor.register('min') def min_per_tensor(acts, **_): return calculate_per_tensor_stats(acts, np.min) @compute_act_stats_fn_per_tensor.register('abs_max') def abs_max_per_tensor(acts, **_): return max_per_tensor(np.abs(acts)) @compute_act_stats_fn_per_tensor.register('quantile') def quantile_per_tensor(acts, q, **_): return calculate_per_tensor_stats(acts, partial(np.quantile, q=q)) @compute_act_stats_fn_per_tensor.register('abs_quantile') def abs_quantile_per_tensor(acts, q, **_): return quantile_per_tensor(np.abs(acts), q) @compute_act_stats_fn_per_channel.register('mean') def mean_per_channel(acts, **_): return calculate_per_channel_stats(acts, np.mean) @compute_act_stats_fn_per_channel.register('mean_axis') def mean_per_channel_axis(acts, layer_key=None, **kwargs): axis = kwargs.get('channel', {}).get(layer_key, 1) return calculate_per_channel_stats(acts, np.mean, axis=axis) @compute_act_stats_fn_per_channel.register('quantile') def quantile_per_channel(acts, q, **_): return calculate_per_channel_stats(acts, partial(np.quantile, q=q)) @compute_act_stats_fn_per_channel.register('max') def max_per_channel(acts, **_): return calculate_per_channel_stats(acts, np.max) @compute_act_stats_fn_per_channel.register('min') def min_per_channel(acts, **_): return calculate_per_channel_stats(acts, np.min) @compute_act_stats_fn_per_channel.register('abs_max') def abs_max_per_channel(acts, **_): return max_per_channel(np.abs(acts)) @compute_act_stats_fn_per_channel.register('abs_quantile') def abs_quantile_per_channel(acts, q, **_): return quantile_per_channel(np.abs(acts), q) @get_act_stats_fn_per_tensor.register('max') def get_max_per_tensor(acts, **_): return np.atleast_1d(acts) @get_act_stats_fn_per_tensor.register('min') def get_min_per_tensor(acts, **_): return np.atleast_1d(acts) @get_act_stats_fn_per_tensor.register('abs_max') def get_abs_max_per_tensor(acts, **_): return np.atleast_1d(acts) @get_act_stats_fn_per_channel.register('mean') def get_mean_per_channel(acts, **_): return np.atleast_1d(acts) @get_act_stats_fn_per_channel.register('mean_axis') def get_mean_per_channel_axis(acts, _, **__): return np.atleast_1d(acts) @get_act_stats_fn_per_channel.register('max') def get_max_per_channel(acts, **_): return np.atleast_1d(acts) @get_act_stats_fn_per_channel.register('min') def get_min_per_channel(acts, **_): return np.atleast_1d(acts) @get_act_stats_fn_per_channel.register('abs_max') def get_abs_max_per_channel(acts, **_): return np.atleast_1d(acts)
30.190141
88
0.770002
660
4,287
4.590909
0.118182
0.118812
0.079208
0.10297
0.841254
0.750495
0.659406
0.617492
0.453135
0.372607
0
0.008205
0.118731
4,287
141
89
30.404255
0.793806
0.136226
0
0.101266
0
0
0.053366
0
0
0
0
0
0
1
0.278481
false
0
0.037975
0.240506
0.620253
0
0
0
0
null
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
3602bac78caa3b147315792011cd1f1ddbebec28
169
py
Python
pobx/__init__.py
nardi/pobx
91a0ce371def5ba8622c41faae5faa1199f16118
[ "MIT" ]
2
2021-01-31T06:45:59.000Z
2021-02-01T01:20:10.000Z
pobx/__init__.py
nardi/pobx
91a0ce371def5ba8622c41faae5faa1199f16118
[ "MIT" ]
null
null
null
pobx/__init__.py
nardi/pobx
91a0ce371def5ba8622c41faae5faa1199f16118
[ "MIT" ]
null
null
null
from .observables import observable, observables, autorun from .actions import run_in_action, action from .computeds import computed, computedproperty, computed_property
56.333333
68
0.857988
20
169
7.1
0.65
0
0
0
0
0
0
0
0
0
0
0
0.094675
169
3
68
56.333333
0.928105
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
360e57b661a6b3129ac369b9f19565ee7b1f9f78
475
py
Python
BootstrapProject/BootstrapApp/models.py
cs-fullstack-2019-spring/django-bootstrap-grid-ic-PorcheWooten
4cc8e247b723f76ace5718943fc74308caccb4fd
[ "Apache-2.0" ]
null
null
null
BootstrapProject/BootstrapApp/models.py
cs-fullstack-2019-spring/django-bootstrap-grid-ic-PorcheWooten
4cc8e247b723f76ace5718943fc74308caccb4fd
[ "Apache-2.0" ]
null
null
null
BootstrapProject/BootstrapApp/models.py
cs-fullstack-2019-spring/django-bootstrap-grid-ic-PorcheWooten
4cc8e247b723f76ace5718943fc74308caccb4fd
[ "Apache-2.0" ]
null
null
null
from django.db import models # Create your models here. class SignInModel(models.Model): USERNAME = models.CharField(max_length=200, default="") PASSWORD = models.CharField(max_length=200, default="") class SignUpModel(models.Model): USERNAME = models.CharField(max_length=200, default="") EMAIL = models.EmailField(default="") PASSWORD = models.CharField(max_length=200, default="") CONFIRM_PASSWORD = models.CharField(max_length=200, default="")
33.928571
67
0.734737
57
475
6.017544
0.385965
0.218659
0.262391
0.349854
0.696793
0.696793
0.696793
0.574344
0.309038
0
0
0.036408
0.132632
475
13
68
36.538462
0.796117
0.050526
0
0.444444
0
0
0
0
0
0
0
0
0
1
0
false
0.333333
0.111111
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
1
0
0
1
0
0
5
369c482fbbcfd29b92a95bd4a25f0dddd294f98c
141
py
Python
tests/helpers/__init__.py
KronosKoderS/py-pushover
4ebec97a6917f32ddb4b41cd8778ee6fd0ace322
[ "MIT" ]
10
2015-08-25T03:07:47.000Z
2015-11-14T13:42:47.000Z
tests/helpers/__init__.py
KronoSKoderS/pypushover
4ebec97a6917f32ddb4b41cd8778ee6fd0ace322
[ "MIT" ]
46
2018-01-04T16:56:29.000Z
2022-03-29T11:09:10.000Z
tests/helpers/__init__.py
KronosKoderS/py-pushover
4ebec97a6917f32ddb4b41cd8778ee6fd0ace322
[ "MIT" ]
3
2018-11-02T15:54:04.000Z
2022-02-20T21:11:58.000Z
from tests.helpers.keys import user_key, group_key, app_key, device_id __all__ = ['user_key', 'group_key', 'app_key', 'secret', 'device_id']
47
70
0.744681
23
141
4.043478
0.565217
0.150538
0.258065
0.322581
0.451613
0.451613
0
0
0
0
0
0
0.099291
141
3
71
47
0.732283
0
0
0
0
0
0.274648
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
36ac63443269f5ce11e1e7b9ec4c8ce122fc9349
400
py
Python
petl/__init__.py
vishalbelsare/petl
012cc7faf79d2fa8147a2cfe3a8b39b110f77051
[ "MIT" ]
495
2018-08-07T18:24:57.000Z
2022-03-31T14:57:57.000Z
petl/__init__.py
vishalbelsare/petl
012cc7faf79d2fa8147a2cfe3a8b39b110f77051
[ "MIT" ]
204
2018-07-25T12:44:14.000Z
2022-03-28T07:52:54.000Z
petl/__init__.py
vishalbelsare/petl
012cc7faf79d2fa8147a2cfe3a8b39b110f77051
[ "MIT" ]
103
2015-01-13T11:13:59.000Z
2018-06-06T03:41:29.000Z
from __future__ import absolute_import, print_function, division from petl.version import version as __version__ from petl import comparison from petl.comparison import Comparable from petl import util from petl.util import * from petl import io from petl.io import * from petl import transform from petl.transform import * from petl import config from petl import errors from petl.errors import *
25
64
0.825
60
400
5.333333
0.283333
0.3
0.2625
0.1875
0
0
0
0
0
0
0
0
0.145
400
15
65
26.666667
0.935673
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0.076923
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
36be30390553bc09eb1b266eb3ea5133f5b231d0
1,140
py
Python
torchsketch/utils/svg_specific_utils/__init__.py
songyzh/torchsketch
42bca1b31ab9699d9b6d77a102b1f46bba82fb33
[ "MIT" ]
182
2020-03-25T01:59:11.000Z
2022-03-29T08:58:47.000Z
torchsketch/utils/svg_specific_utils/__init__.py
songyzh/torchsketch
42bca1b31ab9699d9b6d77a102b1f46bba82fb33
[ "MIT" ]
5
2020-03-25T13:16:50.000Z
2022-02-19T09:51:39.000Z
torchsketch/utils/svg_specific_utils/__init__.py
songyzh/torchsketch
42bca1b31ab9699d9b6d77a102b1f46bba82fb33
[ "MIT" ]
17
2020-03-25T12:40:49.000Z
2022-03-28T06:34:40.000Z
from torchsketch.utils.svg_specific_utils.convert_colors_4_svg import convert_colors_4_svg from torchsketch.utils.svg_specific_utils.convert_colors_4_svgs import convert_colors_4_svgs from torchsketch.utils.svg_specific_utils.convert_stroke_width_4_svg import convert_stroke_width_4_svg from torchsketch.utils.svg_specific_utils.convert_stroke_width_4_svgs import convert_stroke_width_4_svgs from torchsketch.utils.svg_specific_utils.convert_svg_2_accumulative_svgs import convert_svg_2_accumulative_svgs from torchsketch.utils.svg_specific_utils.convert_svg_2_gif import convert_svg_2_gif from torchsketch.utils.svg_specific_utils.convert_svg_2_pdf import convert_svg_2_pdf from torchsketch.utils.svg_specific_utils.convert_svg_2_png import convert_svg_2_png from torchsketch.utils.svg_specific_utils.convert_svgs_2_pdfs import convert_svgs_2_pdfs from torchsketch.utils.svg_specific_utils.convert_svgs_2_pngs import convert_svgs_2_pngs from torchsketch.utils.svg_specific_utils.count_strokes_4_svg import count_strokes_4_svg from torchsketch.utils.svg_specific_utils.mark_longest_strokes_4_svg import mark_longest_strokes_4_svg
95
113
0.917544
188
1,140
5.010638
0.12234
0.191083
0.254777
0.292994
0.774947
0.62845
0.590234
0.590234
0.547771
0.225053
0
0.022181
0.050877
1,140
12
114
95
0.848429
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
36f0584f8be8682d7f74fa5359c290549b1adf2c
148
py
Python
uploads/models.py
ghcis/forum
35c10ae373b7af710b10fc63d0b9d6c684d54836
[ "Apache-2.0" ]
null
null
null
uploads/models.py
ghcis/forum
35c10ae373b7af710b10fc63d0b9d6c684d54836
[ "Apache-2.0" ]
null
null
null
uploads/models.py
ghcis/forum
35c10ae373b7af710b10fc63d0b9d6c684d54836
[ "Apache-2.0" ]
null
null
null
from django.db import models class File(models.Model): file = models.FileField() def __str__(self) -> str: return str(self.file)
16.444444
29
0.655405
20
148
4.65
0.65
0.215054
0
0
0
0
0
0
0
0
0
0
0.22973
148
8
30
18.5
0.815789
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.2
0.2
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
1
1
0
0
5
7fda4417d485a5e1304e18b69e4425610f3ee921
712
py
Python
tests/model/test_res2net.py
hankyul2/pytorch-image-classification
2da942aaf806de961941d57e9daa0b9a37798530
[ "Apache-2.0" ]
null
null
null
tests/model/test_res2net.py
hankyul2/pytorch-image-classification
2da942aaf806de961941d57e9daa0b9a37798530
[ "Apache-2.0" ]
null
null
null
tests/model/test_res2net.py
hankyul2/pytorch-image-classification
2da942aaf806de961941d57e9daa0b9a37798530
[ "Apache-2.0" ]
null
null
null
import torch from pic.model import create_model def test_res2net34_18w_4s(): x = torch.rand([2, 3, 224, 224]) model = create_model('res2net34_18w_4s') y = model(x) assert list(y.shape) == [2, 1000] def test_res2net50_18w_4s(): x = torch.rand([2, 3, 224, 224]) model = create_model('res2net50_18w_4s') y = model(x) assert list(y.shape) == [2, 1000] def test_seres2net(): x = torch.rand([2, 3, 224, 224]) model = create_model('seres2net50_26w_4s') y = model(x) assert list(y.shape) == [2, 1000] def test_seres2next(): x = torch.rand([2, 3, 224, 224]) model = create_model('seres2net50_26w_4s') y = model(x) assert list(y.shape) == [2, 1000]
22.25
46
0.623596
112
712
3.776786
0.232143
0.130024
0.094563
0.104019
0.758865
0.758865
0.758865
0.758865
0.758865
0.758865
0
0.16158
0.217697
712
31
47
22.967742
0.597846
0
0
0.636364
0
0
0.095506
0
0
0
0
0
0.181818
1
0.181818
false
0
0.090909
0
0.272727
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
7fe1ce1460d6992ee948d8601a13935b4ccc6067
177
py
Python
digits/extensions/view/rawData/forms.py
ojmakhura/DIGITS
f34e62c245054b51ea51fcb8949d2ca777f162d1
[ "BSD-3-Clause" ]
null
null
null
digits/extensions/view/rawData/forms.py
ojmakhura/DIGITS
f34e62c245054b51ea51fcb8949d2ca777f162d1
[ "BSD-3-Clause" ]
null
null
null
digits/extensions/view/rawData/forms.py
ojmakhura/DIGITS
f34e62c245054b51ea51fcb8949d2ca777f162d1
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. from digits.utils import subclass from flask_wtf import Form @subclass class ConfigForm(Form): pass
16.090909
68
0.762712
24
177
5.583333
0.833333
0
0
0
0
0
0
0
0
0
0
0.054422
0.169492
177
10
69
17.7
0.857143
0.372881
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.2
0.4
0
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
1
0
0
5
e9e95e5b0737173f435cdf97425d916c2759a27c
272
py
Python
sentences/base_sentence.py
kelltrill/scifibot
e9dfc55b63a6ff40e9fa268f620ff811c88862a3
[ "MIT" ]
5
2020-03-17T17:04:53.000Z
2020-03-27T12:10:44.000Z
sentences/base_sentence.py
kelltrill/scifibot
e9dfc55b63a6ff40e9fa268f620ff811c88862a3
[ "MIT" ]
null
null
null
sentences/base_sentence.py
kelltrill/scifibot
e9dfc55b63a6ff40e9fa268f620ff811c88862a3
[ "MIT" ]
null
null
null
# parent class # common functionality that every sentence will need class base_sentence(object): sentence_name = "" def __init__(self, sentence_name): self.sentence_name = sentence_name def get_name(self): return self.sentence_name
24.727273
53
0.691176
33
272
5.363636
0.515152
0.338983
0.271186
0
0
0
0
0
0
0
0
0
0.242647
272
11
54
24.727273
0.859223
0.231618
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0.166667
0.833333
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
1
1
0
0
5
e9ec66e2ca160e18d20b55935451b9038c5452a0
22
py
Python
storage/team16/BusinessLayer/tuple-module.py
strickergt128/tytus
93216dd9481ea0775da1d2967dc27be66872537f
[ "MIT" ]
null
null
null
storage/team16/BusinessLayer/tuple-module.py
strickergt128/tytus
93216dd9481ea0775da1d2967dc27be66872537f
[ "MIT" ]
null
null
null
storage/team16/BusinessLayer/tuple-module.py
strickergt128/tytus
93216dd9481ea0775da1d2967dc27be66872537f
[ "MIT" ]
null
null
null
class Tuple: pass
7.333333
12
0.636364
3
22
4.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.318182
22
2
13
11
0.933333
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
180ceae00163f7d950060571d42390ee4ae05f96
202
py
Python
hydraclient/contrib/django/hydraclient/settings.py
ericmoritz/hydra-python-client
a4f5564600e074ff0e835fe34ce6cb16fb31193d
[ "BSD-3-Clause" ]
1
2016-08-28T08:08:07.000Z
2016-08-28T08:08:07.000Z
hydraclient/contrib/django/hydraclient/settings.py
ericmoritz/hydra-python-client
a4f5564600e074ff0e835fe34ce6cb16fb31193d
[ "BSD-3-Clause" ]
null
null
null
hydraclient/contrib/django/hydraclient/settings.py
ericmoritz/hydra-python-client
a4f5564600e074ff0e835fe34ce6cb16fb31193d
[ "BSD-3-Clause" ]
null
null
null
from hydraclient.core.settings import DEFAULT_JSONLD_CONTEXT from django.conf import settings DEFAULT_JSONLD_CONTEXT = getattr( settings, "DEFAULT_JSONLD_CONTEXT", DEFAULT_JSONLD_CONTEXT )
22.444444
60
0.811881
24
202
6.5
0.458333
0.333333
0.512821
0.358974
0
0
0
0
0
0
0
0
0.138614
202
8
61
25.25
0.896552
0
0
0
0
0
0.108911
0.108911
0
0
0
0
0
1
0
false
0
0.285714
0
0.285714
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
181188e5744881cc7ece1caa71bb979c1872bbfc
133
py
Python
Colours.py
b4ggio-su/PoshC2_Python
add66426534c524f1340f751945b61352bdd8c81
[ "BSD-3-Clause" ]
3
2020-05-04T22:27:00.000Z
2021-03-18T01:43:35.000Z
Colours.py
b4ggio-su/PoshC2_Python
add66426534c524f1340f751945b61352bdd8c81
[ "BSD-3-Clause" ]
null
null
null
Colours.py
b4ggio-su/PoshC2_Python
add66426534c524f1340f751945b61352bdd8c81
[ "BSD-3-Clause" ]
2
2019-08-30T04:57:35.000Z
2021-03-09T16:14:10.000Z
#!/usr/bin/python class Colours: BLUE = '\033[94m' GREEN = '\033[92m' RED = '\033[91m' END = '\033[0m' YELLOW = '\033[93m'
16.625
21
0.556391
20
133
3.7
0.8
0
0
0
0
0
0
0
0
0
0
0.228571
0.210526
133
8
21
16.625
0.47619
0.120301
0
0
0
0
0.333333
0
0
0
0
0
0
1
0
false
0
0
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
5
1827acf86b5da62aa64ffbacd13ff4b54dc760ec
95
py
Python
bioimageio/spec/model/nodes.py
esgomezm/spec-bioimage-io
2bc3f8177d5346ac94bf8a771ed619e076c6e935
[ "MIT" ]
null
null
null
bioimageio/spec/model/nodes.py
esgomezm/spec-bioimage-io
2bc3f8177d5346ac94bf8a771ed619e076c6e935
[ "MIT" ]
null
null
null
bioimageio/spec/model/nodes.py
esgomezm/spec-bioimage-io
2bc3f8177d5346ac94bf8a771ed619e076c6e935
[ "MIT" ]
null
null
null
# Auto-generated by generate_passthrough_modules.py - do not modify from .v0_3.nodes import *
23.75
67
0.789474
15
95
4.8
1
0
0
0
0
0
0
0
0
0
0
0.02439
0.136842
95
3
68
31.666667
0.853659
0.684211
0
0
1
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
1
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
1849922374c9e916b2690eb78b4f51413a4fc74b
111
py
Python
Tools/gen_table_data.py
fuliufuliu/UnitySocketProtobuf3Demo
3a07104d6fa2707fd73751dca52b1e03736e22ea
[ "MIT" ]
2
2020-07-21T07:59:22.000Z
2020-07-21T07:59:25.000Z
Tools/gen_table_data.py
fuliufuliu/UnitySocketProtobuf3Demo
3a07104d6fa2707fd73751dca52b1e03736e22ea
[ "MIT" ]
null
null
null
Tools/gen_table_data.py
fuliufuliu/UnitySocketProtobuf3Demo
3a07104d6fa2707fd73751dca52b1e03736e22ea
[ "MIT" ]
null
null
null
from TableCode.excel import excel_start excel_start(isOutClient=False, isOutServer=True) print("finished...")
22.2
48
0.810811
14
111
6.285714
0.785714
0.227273
0
0
0
0
0
0
0
0
0
0
0.072072
111
5
49
22.2
0.854369
0
0
0
0
0
0.098214
0
0
0
0
0
0
1
0
true
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
1
0
1
0
0
0
0
5
184b5a41df5e971af7c169a2f2bfbb51f56a8460
88
py
Python
test_code/boj/bronze5/1001.py
yjinheon/solve
f47cd19d3c81d0b16586159c754deb2ffcb31ca0
[ "Apache-2.0" ]
null
null
null
test_code/boj/bronze5/1001.py
yjinheon/solve
f47cd19d3c81d0b16586159c754deb2ffcb31ca0
[ "Apache-2.0" ]
null
null
null
test_code/boj/bronze5/1001.py
yjinheon/solve
f47cd19d3c81d0b16586159c754deb2ffcb31ca0
[ "Apache-2.0" ]
null
null
null
a ,b =map(int,input().split()) def subtract(a,b): return a-b print(subtract(a,b))
12.571429
30
0.613636
17
88
3.176471
0.588235
0.148148
0.37037
0
0
0
0
0
0
0
0
0
0.159091
88
6
31
14.666667
0.72973
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0.25
0.5
0.25
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
5
1862190bda0360756e03951fe619dd0ffb9686d4
2,708
py
Python
database/tests/test_views.py
Amrithasuresh/BPPRC
6ee01914a612d65f7084db7ce377da3bab682e66
[ "BSD-3-Clause" ]
2
2020-01-10T18:36:37.000Z
2020-01-10T18:42:41.000Z
database/tests/test_views.py
bpprc/database
6e8302729793ddf840630840bd08c96ddd35a52e
[ "BSD-3-Clause" ]
12
2020-06-05T23:39:18.000Z
2022-03-12T00:48:18.000Z
database/tests/test_views.py
bpprc/database
6e8302729793ddf840630840bd08c96ddd35a52e
[ "BSD-3-Clause" ]
null
null
null
# from django.test import TestCase, Client # from django.urls import reverse # from database.models import PesticidalProteinDatabase, Description # import json # # # class TestViews(TestCase): # # def setUp(self): # self.client = Client() # self.statistics_url = reverse('statistics') # self.categorize_database_url = reverse( # 'categorize_database', args=['Cry']) # self.protein_description = Description.objects.create( # name='Cry', # description='Mnemonic retained for 3-domain proteins' # ) # self.protein_example = PesticidalProteinDatabase.objects.create( # name='Cry1Aa1', # oldname='Cry1Aa1', # othernames='Cry1A(a)', # accession='AAA22353', # year='1985', # sequence=""" # MDNNPNINECIPYNCLSNPEVEVLGGERIETGYTPIDISLSLTQFLLSEFVPGAGFVLGLVDIIWGIFGPSQWDAFPVQIEQLINQRIEEFARNQAISRLEGLSNLYQIYAESFREWEADPTNPALREEMRIQFNDMNSALTTAIPLLAVQNYQVPLLSVYVQAANLHLSVLRDVSVFGQRWGFDAATINSRYNDLTRLIGNYTDYAVRWYNTGLERVWGPDSRDWVRYNQFRRELTLTVLDIVALFSNYDSRRYPIRTVSQLTREIYTNPVLENFDGSFRGMAQRIEQNIRQPHLMDILNSITIYTDVHRGFNYWSGHQITASPVGFSGPEFAFPLFGNAGNAAPPVLVSLTGLGIFRTLSSPLYRRIILGSGPNNQELFVLDGTEFSFASLTTNLPSTIYRQRGTVDSLDVIPPQDNSVPPRAGFSHRLSHVTMLSQAAGAVYTLRAPTFSWQHRSAEFNNIIPSSQITQIPLTKSTNLGSGTSVVKGPGFTGGDILRRTSPGQISTLRVNITAPLSQRYRVRIRYASTTNLQFHTSIDGRPINQGNFSATMSSGSNLQSGSFRTVGFTTPFNFSNGSSVFTLSAHVFNSGNEVYIDRIEFVPAEVTFEAEYDLERAQKAVNELFTSSNQIGLKTDVTDYHIDQVSNLVECLSDEFCLDEKQELSEKVKHAKRLSDERNLLQDPNFRGINRQLDRGWRGSTDITIQGGDDVFKENYVTLLGTFDECYPTYLYQKIDESKLKAYTRYQLRGYIEDSQDLEIYLIRYNAKHETVNVPGTGSLWPLSAQSPIGKCGEPNRCAPHLEWNPDLDCSCRDGEKCAHHSHHFSLDIDVGCTDLNEDLGVWVIFKIKTQDGHARLGNLEFLEEKPLVGEALARVKRAEKKWRDKREKLEWETNIVYKEAKESVDALFVNSQYDQLQADTNIAMIHAADKRVHSIREAYLPELSVIPGVNAAIFEELEGRIFTAFSLYDARNVIKNGDFNNGLSCWNVKGHVDVEEQNNQRSVLVLPEWEAEVSQEVRVCPGRGYILRVTAYKEGYGEGCVTIHEIENNTDELKFSNCVEEEIYPNNTVTCNDYTVNQEEYGGAYTSRNRGYNEAPSVPADYASVYEEKSYTDGRRENPCEFNRGYRDYTPLPVGYVTKELEYFPETDKVWIEIGETEGTFIVDSVELLLMEE # """, # ) # # def test_categorize_database(self): # # response = self.client.get(self.categorize_database_url) # print("response", response.status_code) # # self.assertEquals(response.status_code, 200) # self.assertTemplateUsed( # response, 'database/category_display_update.html') # # # def test_statistics(self): # # # # response = self.client.get(self.statistics_url) # # print("response", response.status_code) # # # # self.assertEquals(response.status_code, 200) # # self.assertTemplateUsed(response, 'database/statistics.html')
60.177778
1,190
0.767725
136
2,708
15.154412
0.419118
0.034935
0.034935
0.02426
0.133916
0.133916
0.105774
0.105774
0.105774
0.105774
0
0.009255
0.162112
2,708
44
1,191
61.545455
0.899074
0.964549
0
null
0
null
0
0
null
1
0
0
null
1
null
true
0
0
null
null
null
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
null
1
0
0
0
0
0
1
0
0
0
0
0
0
5
186b8c3ce86f3e30efbf61bb34780dab9f16c662
184
py
Python
src/app/repositories/user/__init__.py
dieisabel/cypherman
06d8678b79b18aa256a79ec6967d68274f088dbc
[ "MIT" ]
null
null
null
src/app/repositories/user/__init__.py
dieisabel/cypherman
06d8678b79b18aa256a79ec6967d68274f088dbc
[ "MIT" ]
43
2021-12-02T21:26:01.000Z
2022-02-21T08:51:06.000Z
src/app/repositories/user/__init__.py
dieisabel/cypherman
06d8678b79b18aa256a79ec6967d68274f088dbc
[ "MIT" ]
null
null
null
__all__ = [ 'IUserRepository', 'UserRepository', ] from repositories.user.iuser_repository import IUserRepository from repositories.user.user_repository import UserRepository
23
62
0.804348
17
184
8.352941
0.529412
0.225352
0.28169
0
0
0
0
0
0
0
0
0
0.125
184
7
63
26.285714
0.881988
0
0
0
0
0
0.157609
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
1882927e68491e245c456930a1825cab5d73c13e
190
py
Python
detect_spines/admin.py
LakshyaKhatri/Bookshelf-Reader-API
7bd1e130fcd22cdd18b12bcc63bd412d25780b54
[ "MIT" ]
16
2019-04-25T18:28:26.000Z
2022-03-08T14:39:23.000Z
detect_spines/admin.py
imranansari/Bookshelf-Reader-API
5b9058c7c74ceb3e84dbde681a702015c7ad7138
[ "MIT" ]
4
2021-01-14T13:44:52.000Z
2021-11-27T15:53:44.000Z
detect_spines/admin.py
imranansari/Bookshelf-Reader-API
5b9058c7c74ceb3e84dbde681a702015c7ad7138
[ "MIT" ]
6
2019-06-29T11:22:55.000Z
2022-02-05T19:10:42.000Z
from django.contrib import admin from .models import Bookshelf, Spine, Book # Register your models here. admin.site.register(Bookshelf) admin.site.register(Spine) admin.site.register(Book)
23.75
42
0.805263
27
190
5.666667
0.481481
0.176471
0.333333
0
0
0
0
0
0
0
0
0
0.1
190
7
43
27.142857
0.894737
0.136842
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
a11e7b83a2c3ba9206a37c645fc4e3ee53de411a
52
py
Python
flo/tasks/__init__.py
deanmalmgren/flo
40ba3ce29a03cecb74bf809e40061e5e5c9d6a6b
[ "MIT" ]
15
2015-03-26T07:45:24.000Z
2019-09-09T13:07:29.000Z
flo/tasks/__init__.py
deanmalmgren/flo
40ba3ce29a03cecb74bf809e40061e5e5c9d6a6b
[ "MIT" ]
3
2015-09-16T09:33:30.000Z
2016-08-24T06:39:56.000Z
flo/tasks/__init__.py
deanmalmgren/flo
40ba3ce29a03cecb74bf809e40061e5e5c9d6a6b
[ "MIT" ]
4
2016-07-07T18:32:56.000Z
2020-06-19T07:24:11.000Z
from .task import Task from .graph import TaskGraph
17.333333
28
0.807692
8
52
5.25
0.625
0
0
0
0
0
0
0
0
0
0
0
0.153846
52
2
29
26
0.954545
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
a123e07cfa0ac07ceee5500b5a4d82f9a89afa92
62
py
Python
osmABTS/paths.py
ZSSVE/osmABTS
c833aa61740cca557674b3531a33096674e8e711
[ "MIT" ]
1
2020-03-13T05:38:11.000Z
2020-03-13T05:38:11.000Z
osmABTS/paths.py
ZSSVE/osmABTS
c833aa61740cca557674b3531a33096674e8e711
[ "MIT" ]
null
null
null
osmABTS/paths.py
ZSSVE/osmABTS
c833aa61740cca557674b3531a33096674e8e711
[ "MIT" ]
null
null
null
""" Shortest path computation ========================= """
8.857143
25
0.370968
3
62
7.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.129032
62
6
26
10.333333
0.425926
0.822581
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
a133f0a2d8773da3b00ed950e6258c1c3422793b
951
py
Python
tasks/password_validator/05_Viktoriya_Vasileva/test_password.py
valentinvarbanov/software_engineering_2021
33ece7d1e4889840621626e30f975d6cfd370b38
[ "MIT" ]
7
2021-10-05T14:54:55.000Z
2022-02-16T06:07:12.000Z
tasks/password_validator/05_Viktoriya_Vasileva/test_password.py
valentinvarbanov/software_engineering_2021
33ece7d1e4889840621626e30f975d6cfd370b38
[ "MIT" ]
2
2021-12-04T10:49:46.000Z
2022-02-28T06:09:06.000Z
tasks/password_validator/05_Viktoriya_Vasileva/test_password.py
valentinvarbanov/software_engineering_2021
33ece7d1e4889840621626e30f975d6cfd370b38
[ "MIT" ]
null
null
null
from password import weak_passwords, letters_password, special_letters_password, size_password def test_weak_password_true(): weak_pass = ['12345', 'qwerty', 'password', 'asdf'] for weak in weak_pass: assert weak_passwords(weak) == True def test_letters_password(): assert letters_password("a") == True assert letters_password("asdfghj") == True assert letters_password("zkjhgfvh") == True assert letters_password("1232") == False assert letters_password("elsys") == True def test_special_letters_password(): assert special_letters_password("a") == False assert special_letters_password("!") == True assert special_letters_password("afgh*") == True assert special_letters_password("el$y$") == True def test_size_password(): assert size_password("adfghjsdfghjkjhgfd") == True assert size_password("abcdiefs") == False assert size_password("a") == False # def test_all() # assert
35.222222
94
0.71714
114
951
5.675439
0.263158
0.301391
0.204019
0.173107
0.098918
0
0
0
0
0
0
0.011307
0.162986
951
27
95
35.222222
0.801508
0.026288
0
0
0
0
0.094258
0
0
0
0
0
0.65
1
0.2
false
1
0.05
0
0.25
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
1
0
0
0
0
0
5
a14cccc41528757e3de087f76761a7ad73288609
62
py
Python
Section 01-03/demo.py
tonymanpro/Python
f7072063004a71b0b7ea33e76df79c20cb8b803c
[ "MIT" ]
null
null
null
Section 01-03/demo.py
tonymanpro/Python
f7072063004a71b0b7ea33e76df79c20cb8b803c
[ "MIT" ]
null
null
null
Section 01-03/demo.py
tonymanpro/Python
f7072063004a71b0b7ea33e76df79c20cb8b803c
[ "MIT" ]
null
null
null
print("Fisrt Line!") print("Second Line!") print("Last Line!")
20.666667
21
0.677419
9
62
4.666667
0.555556
0.428571
0
0
0
0
0
0
0
0
0
0
0.080645
62
3
22
20.666667
0.736842
0
0
0
0
0
0.52381
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
a14fb6f862609b88f93cd1ac48bf1da3cd700965
59
py
Python
bouncer/api/models/__init__.py
ikechuku/bouncer_rest_api
ca3f21a68c445fa3023168d2ecd3b38001554779
[ "MIT" ]
null
null
null
bouncer/api/models/__init__.py
ikechuku/bouncer_rest_api
ca3f21a68c445fa3023168d2ecd3b38001554779
[ "MIT" ]
null
null
null
bouncer/api/models/__init__.py
ikechuku/bouncer_rest_api
ca3f21a68c445fa3023168d2ecd3b38001554779
[ "MIT" ]
null
null
null
from .product import Product from .category import Category
29.5
30
0.847458
8
59
6.25
0.5
0
0
0
0
0
0
0
0
0
0
0
0.118644
59
2
30
29.5
0.961538
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
a15867d8ef0ac45cd6429a681793de2bed2a77fc
13,266
py
Python
python/tests/spatial_operator/test_join_query_correctness.py
Tianhao0916/CPT-581-Project-Sedona
a0ed49da0b62ce591d858e5dccd5cebb69a8e695
[ "Apache-2.0" ]
null
null
null
python/tests/spatial_operator/test_join_query_correctness.py
Tianhao0916/CPT-581-Project-Sedona
a0ed49da0b62ce591d858e5dccd5cebb69a8e695
[ "Apache-2.0" ]
null
null
null
python/tests/spatial_operator/test_join_query_correctness.py
Tianhao0916/CPT-581-Project-Sedona
a0ed49da0b62ce591d858e5dccd5cebb69a8e695
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. from pyspark import StorageLevel from shapely.geometry import Point, Polygon, LineString from shapely.geometry.base import BaseGeometry from sedona.core.SpatialRDD import LineStringRDD, PolygonRDD, CircleRDD, PointRDD from sedona.core.SpatialRDD.spatial_rdd import SpatialRDD from sedona.core.enums import IndexType, GridType from sedona.core.serde.geom_factory import serializers from sedona.core.spatialOperator import JoinQuery from sedona.utils.spatial_rdd_parser import GeoData from tests.test_base import TestBase class TestJoinQueryCorrectness(TestBase): def test_initial(self): self.once_before_all() def test_inside_point_join_correctness(self): self.once_before_all() window_rdd = PolygonRDD(self.sc.parallelize(self.test_polygon_window_set)) object_rdd = PointRDD(self.sc.parallelize(self.test_inside_point_set)) self.prepare_rdd(object_rdd, window_rdd, GridType.QUADTREE) result = JoinQuery.SpatialJoinQuery(object_rdd, window_rdd, True, False).collect() self.verify_join_result(result) result_no_index = JoinQuery.SpatialJoinQuery(object_rdd, window_rdd, False, False).collect() self.verify_join_result(result_no_index) def test_on_boundary_point_join_correctness(self): window_rdd = PolygonRDD(self.sc.parallelize(self.test_polygon_window_set), StorageLevel.MEMORY_ONLY) object_rdd = PointRDD(self.sc.parallelize(self.test_on_boundary_point_set), StorageLevel.MEMORY_ONLY) self.prepare_rdd(object_rdd, window_rdd, GridType.QUADTREE) result = JoinQuery.SpatialJoinQuery(object_rdd, window_rdd, True, False).collect() self.verify_join_result(result) result_no_index = JoinQuery.SpatialJoinQuery(object_rdd, window_rdd, False, False).collect() self.verify_join_result(result_no_index) def test_outside_point_join_correctness(self): self.once_before_all() window_rdd = PolygonRDD(self.sc.parallelize(self.test_polygon_window_set), StorageLevel.MEMORY_ONLY) object_rdd = PointRDD(self.sc.parallelize(self.test_outside_point_set), StorageLevel.MEMORY_ONLY) self.prepare_rdd(object_rdd, window_rdd, GridType.QUADTREE) result = JoinQuery.SpatialJoinQuery(object_rdd, window_rdd, True, False).collect() assert 0 == result.__len__() result_no_index = JoinQuery.SpatialJoinQuery(object_rdd, window_rdd, False, False).collect() assert 0 == result_no_index.__len__() def test_inside_linestring_join_correctness(self): window_rdd = PolygonRDD( self.sc.parallelize(self.test_polygon_window_set), StorageLevel.MEMORY_ONLY ) object_rdd = LineStringRDD(self.sc.parallelize(self.test_inside_linestring_set), StorageLevel.MEMORY_ONLY) self.prepare_rdd(object_rdd, window_rdd, GridType.QUADTREE) result = JoinQuery.SpatialJoinQuery(object_rdd, window_rdd, True, False).collect() self.verify_join_result(result) result_no_index = JoinQuery.SpatialJoinQuery(object_rdd, window_rdd, False, False).collect() self.verify_join_result(result_no_index) def test_overlapped_linestring_join_correctness(self): window_rdd = PolygonRDD(self.sc.parallelize(self.test_polygon_window_set), StorageLevel.MEMORY_ONLY) object_rdd = LineStringRDD(self.sc.parallelize(self.test_overlapped_linestring_set), StorageLevel.MEMORY_ONLY) self.prepare_rdd(object_rdd, window_rdd, GridType.QUADTREE) result = JoinQuery.SpatialJoinQuery(object_rdd, window_rdd, True, True).collect() self.verify_join_result(result) result_no_index = JoinQuery.SpatialJoinQuery(object_rdd, window_rdd, False, True).collect() self.verify_join_result(result_no_index) def test_outside_line_string_join_correctness(self): window_rdd = PolygonRDD(self.sc.parallelize(self.test_polygon_window_set), StorageLevel.MEMORY_ONLY) object_rdd = LineStringRDD(self.sc.parallelize(self.test_outside_linestring_set), StorageLevel.MEMORY_ONLY) self.prepare_rdd(object_rdd, window_rdd, GridType.QUADTREE) result = JoinQuery.SpatialJoinQuery(object_rdd, window_rdd, True, False).collect() assert 0 == result.__len__() result_no_index = JoinQuery.SpatialJoinQuery(object_rdd, window_rdd, False, False).collect() assert 0 == result_no_index.__len__() def test_inside_polygon_join_correctness(self): window_rdd = PolygonRDD(self.sc.parallelize(self.test_polygon_window_set), StorageLevel.MEMORY_ONLY) object_rdd = PolygonRDD(self.sc.parallelize(self.test_inside_polygon_set), StorageLevel.MEMORY_ONLY) self.prepare_rdd(object_rdd, window_rdd, GridType.QUADTREE) result = JoinQuery.SpatialJoinQuery(object_rdd, window_rdd, True, False).collect() self.verify_join_result(result) result_no_index = JoinQuery.SpatialJoinQuery(object_rdd, window_rdd, False, False).collect() self.verify_join_result(result_no_index) def test_overlapped_polygon_join_correctness(self): window_rdd = PolygonRDD(self.sc.parallelize(self.test_polygon_window_set), StorageLevel.MEMORY_ONLY) object_rdd = PolygonRDD(self.sc.parallelize(self.test_overlapped_polygon_set), StorageLevel.MEMORY_ONLY) self.prepare_rdd(object_rdd, window_rdd, GridType.QUADTREE) result = JoinQuery.SpatialJoinQuery(object_rdd, window_rdd, True, True).collect() self.verify_join_result(result) result_no_index = JoinQuery.SpatialJoinQuery(object_rdd, window_rdd, False, True).collect() self.verify_join_result(result_no_index) def test_outside_polygon_join_correctness(self): window_rdd = PolygonRDD(self.sc.parallelize(self.test_polygon_window_set), StorageLevel.MEMORY_ONLY) object_rdd = PolygonRDD(self.sc.parallelize(self.test_outside_polygon_set), StorageLevel.MEMORY_ONLY) self.prepare_rdd(object_rdd, window_rdd, GridType.QUADTREE) result = JoinQuery.SpatialJoinQuery(object_rdd, window_rdd, True, False).collect() assert 0 == result.__len__() result_no_index = JoinQuery.SpatialJoinQuery(object_rdd, window_rdd, False, False).collect() assert 0 == result_no_index.__len__() def test_inside_polygon_distance_join_correctness(self): center_geometry_rdd = PolygonRDD(self.sc.parallelize(self.test_polygon_window_set), StorageLevel.MEMORY_ONLY) window_rdd = CircleRDD(center_geometry_rdd, 0.1) object_rdd = PolygonRDD(self.sc.parallelize(self.test_inside_polygon_set), StorageLevel.MEMORY_ONLY) self.prepare_rdd(object_rdd, window_rdd, GridType.QUADTREE) result = JoinQuery.DistanceJoinQuery(object_rdd, window_rdd, True, False).collect() self.verify_join_result(result) result_no_index = JoinQuery.DistanceJoinQuery(object_rdd, window_rdd, False, False).collect() self.verify_join_result(result_no_index) def test_overlapped_polygon_distance_join_correctness(self): center_geometry_rdd = PolygonRDD(self.sc.parallelize(self.test_polygon_window_set), StorageLevel.MEMORY_ONLY) window_rdd = CircleRDD(center_geometry_rdd, 0.1) object_rdd = PolygonRDD(self.sc.parallelize(self.test_overlapped_polygon_set), StorageLevel.MEMORY_ONLY) self.prepare_rdd(object_rdd, window_rdd, GridType.QUADTREE) result = JoinQuery.DistanceJoinQuery(object_rdd, window_rdd, True, True).collect() self.verify_join_result(result) result_no_index = JoinQuery.DistanceJoinQuery(object_rdd, window_rdd, False, True).collect() self.verify_join_result(result_no_index) def test_outside_polygon_distance_join_correctness(self): center_geometry_rdd = PolygonRDD(self.sc.parallelize(self.test_polygon_window_set), StorageLevel.MEMORY_ONLY) window_rdd = CircleRDD(center_geometry_rdd, 0.1) object_rdd = PolygonRDD(self.sc.parallelize(self.test_outside_polygon_set), StorageLevel.MEMORY_ONLY) self.prepare_rdd(object_rdd, window_rdd, GridType.QUADTREE) result = JoinQuery.DistanceJoinQuery(object_rdd, window_rdd, True, True).collect() assert 0 == result.__len__() result_no_index = JoinQuery.DistanceJoinQuery(object_rdd, window_rdd, False, True).collect() assert 0 == result_no_index.__len__() def prepare_rdd(self, object_rdd: SpatialRDD, window_rdd: SpatialRDD, grid_type: GridType): object_rdd.analyze() window_rdd.analyze() object_rdd.rawSpatialRDD.repartition(4) object_rdd.spatialPartitioning(grid_type) object_rdd.buildIndex(IndexType.RTREE, True) window_rdd.spatialPartitioning(object_rdd.getPartitioner()) @classmethod def verify_join_result(cls, result): assert result.__len__() == 200 @classmethod def make_square(cls, minx: float, miny: float, side: float) -> Polygon: coordinates = [(minx, miny), (minx + side, miny), (minx + side, miny + side), (minx, miny + side)] polygon = Polygon(coordinates) return polygon @classmethod def make_square_line(cls, minx: float, miny: float, side: float): coordinates = [(minx, miny), (minx + side, miny), (minx + side, miny + side)] return LineString(coordinates) @classmethod def make_point(cls, x: float, y: float): return Point(x, y) @classmethod def wrap(cls, geom: BaseGeometry, user_data: str): return GeoData(geom=geom, userData=user_data, serde=serializers[cls.serializer_type]) @classmethod def once_before_all(cls): cls.test_polygon_window_set = [] cls.test_inside_polygon_set = [] cls.test_overlapped_polygon_set = [] cls.test_outside_polygon_set = [] cls.test_inside_linestring_set = [] cls.test_overlapped_linestring_set = [] cls.test_outside_linestring_set = [] cls.test_inside_point_set = [] cls.test_on_boundary_point_set = [] cls.test_outside_point_set = [] for base_x in range(0, 100, 10): for base_y in range(0, 100, 10): id = str(base_x) + ":" + str(base_y) a = "a:" + id b = "b:" + id cls.test_polygon_window_set.append(cls.wrap(cls.make_square(base_x, base_y, 5), a)) cls.test_polygon_window_set.append(cls.wrap(cls.make_square(base_x, base_y, 5), b)) cls.test_inside_polygon_set.append(cls.wrap(cls.make_square(base_x + 2, base_y + 2, 2), a)) cls.test_inside_polygon_set.append(cls.wrap(cls.make_square(base_x + 2, base_y + 2, 2), b)) cls.test_overlapped_polygon_set.append(cls.wrap(cls.make_square(base_x + 3, base_y + 3, 3), a)) cls.test_overlapped_polygon_set.append(cls.wrap(cls.make_square(base_x + 3, base_y + 3, 3), b)) cls.test_outside_polygon_set.append(cls.wrap(cls.make_square(base_x + 6, base_y + 6, 3), a)) cls.test_outside_polygon_set.append(cls.wrap(cls.make_square(base_x + 6, base_y + 6, 3), b)) cls.test_inside_linestring_set.append(cls.wrap(cls.make_square_line(base_x + 2, base_y + 2, 2), a)) cls.test_inside_linestring_set.append(cls.wrap(cls.make_square_line(base_x + 2, base_y + 2, 2), b)) cls.test_overlapped_linestring_set.append(cls.wrap(cls.make_square_line(base_x + 3, base_y + 3, 3), a)) cls.test_overlapped_linestring_set.append(cls.wrap(cls.make_square_line(base_x + 3, base_y + 3, 3), b)) cls.test_outside_linestring_set.append(cls.wrap(cls.make_square_line(base_x + 6, base_y + 6, 3), a)) cls.test_outside_linestring_set.append(cls.wrap(cls.make_square_line(base_x + 6, base_y + 6, 3), b)) cls.test_inside_point_set.append(cls.wrap(cls.make_point(base_x + 2.5, base_y + 2.5), a)) cls.test_inside_point_set.append(cls.wrap(cls.make_point(base_x + 2.5, base_y + 2.5), b)) cls.test_on_boundary_point_set.append(cls.wrap(cls.make_point(base_x + 5, base_y + 5), a)) cls.test_on_boundary_point_set.append(cls.wrap(cls.make_point(base_x + 5, base_y + 5), b)) cls.test_outside_point_set.append(cls.wrap(cls.make_point(base_x + 6, base_y + 6), a)) cls.test_outside_point_set.append(cls.wrap(cls.make_point(base_x + 6, base_y + 6), b))
51.023077
119
0.72584
1,772
13,266
5.10553
0.103837
0.053719
0.059688
0.071626
0.796065
0.765116
0.757931
0.751299
0.743782
0.742014
0
0.00807
0.177974
13,266
259
120
51.220077
0.82155
0.057666
0
0.483146
0
0
0.000401
0
0
0
0
0
0.050562
1
0.11236
false
0
0.05618
0.011236
0.196629
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
a1a856b6220e094edcb28bff73cf2a32be3d3a37
195
py
Python
third_party/pytools/pytools/legacy/pytorch/__init__.py
Kipsora/docker-curator
46dc43861fe23b8e4429707adcf9978cfde27aa5
[ "MIT" ]
1
2020-07-26T14:26:18.000Z
2020-07-26T14:26:18.000Z
third_party/pytools/pytools/legacy/pytorch/__init__.py
Kipsora/docker-curator
46dc43861fe23b8e4429707adcf9978cfde27aa5
[ "MIT" ]
null
null
null
third_party/pytools/pytools/legacy/pytorch/__init__.py
Kipsora/docker-curator
46dc43861fe23b8e4429707adcf9978cfde27aa5
[ "MIT" ]
null
null
null
from .curator import curator from .helpers import * from . import engines from . import datasets from . import networks from . import criterion from . import optimizers from . import schedulers
19.5
28
0.784615
25
195
6.12
0.4
0.392157
0
0
0
0
0
0
0
0
0
0
0.169231
195
9
29
21.666667
0.944444
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
a1b9f9a2a0a740ad0cd2c9939264b9ea1046edbf
125
py
Python
tests/prepare.py
yasfmy/attention_model
330c64878a783b2e294adb502a1eb030de346bf0
[ "MIT" ]
1
2016-11-09T13:38:52.000Z
2016-11-09T13:38:52.000Z
tests/prepare.py
yasfmy/attention_model
330c64878a783b2e294adb502a1eb030de346bf0
[ "MIT" ]
null
null
null
tests/prepare.py
yasfmy/attention_model
330c64878a783b2e294adb502a1eb030de346bf0
[ "MIT" ]
null
null
null
import sys import os sys.path.append('..') sys.path.append('../lib/') path = os.path.dirname(__file__) sys.path.append(path)
17.857143
32
0.704
20
125
4.2
0.4
0.25
0.464286
0
0
0
0
0
0
0
0
0
0.08
125
6
33
20.833333
0.730435
0
0
0
0
0
0.072
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
a1f192362d87a3da879bdcfd9e6c5e1172537914
1,056
py
Python
abcd/abcd.py
aollio/toys
1f796f80dae022eee2db03f92b55fb3158c762fd
[ "MIT" ]
null
null
null
abcd/abcd.py
aollio/toys
1f796f80dae022eee2db03f92b55fb3158c762fd
[ "MIT" ]
null
null
null
abcd/abcd.py
aollio/toys
1f796f80dae022eee2db03f92b55fb3158c762fd
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import requests import json # text # U2FsdGVkX1+oinYiLwBHFWqde8jgZ1EKAIHgAVIjvG8duKGVrHRS51GA/IJllXw8V2Jej9olWjWUFPIDDk2t4KQcRtfU3bCwkpREdULuRgE9YK96A43tz4XeJ81jROK5GuGwGtOuQa6Fy63SMlz0sfANIzzlWJnEe6ftwqhOnC82q7+HIbeJghayfNZXlIcH5+8g+PP0VzGE1SCITGnPDdGHfGkg9CCzaQU3oZspSChyjHZVKgtitJkx+sfHPXLlL4f/ImSRekG6w2rjuZS6+s/v26MZb2ih/WTiTeUaQ0edn5xUmtgnMLng3ng9rxpU2Ias0HOzczs2yT/mMFTsul0YcGAIDUQXBGbSbmuGe9EtQ6eEBbcm6PjSNeOv4lj8oPFdwoI2l2gxqaxIJUw8YbpYtH/npKLzjk/o33nPM+Obi8X7NUQlsQ6XXtT14RKSc9HAzZwRJlD3jPU6bA5VOZf4miGmNCjgUezXp9Hgdi33U5PSWhAmUMM6pPMam22drJ/b8D5Fi1aMktUq098ljWlAGk7OVUaSrfpVvNSpoyU+Uu0SxzF2TiqiPlLuixwiAVHE/0phvBpUW6HoyhusB5FWpByTVXJNIYQYn2skUcS9lkHccoVCpwUTtH/3/bYUTulNseGYS+vQfShJmzGi++2lIVlmxPYFdr9DWldGGHiEFuhFCXx6eSSKqUNDkToFE0SjDTJKYFH79ouuLtur0T9QylCBz7rQSgZHEArxiEg= # window.serialNumber + "@" + window.seller) # C02SDDLEFVH3@yezi md5-> fb5832d83b3399a42cb50b8e1941641a if __name__ == '__main__': data = requests.get('http://password.aollio.com') accounts = json.loads(data.text) print(accounts)
66
750
0.892045
56
1,056
16.678571
0.875
0
0
0
0
0
0
0
0
0
0
0.127976
0.045455
1,056
15
751
70.4
0.798611
0.829545
0
0
0
0
0.194286
0
0
1
0
0
0
1
0
false
0.166667
0.333333
0
0.333333
0.166667
0
0
1
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
1
0
0
0
0
0
0
1
1
0
0
0
0
5
a1fe5abbf8978e066af3fafd884f1c1b81679d49
198
py
Python
examples/mailbox_api/app/routes.py
pussbb/pymaillib
002a916494591e31ec9a0c2dbef66427a72bc036
[ "WTFPL" ]
null
null
null
examples/mailbox_api/app/routes.py
pussbb/pymaillib
002a916494591e31ec9a0c2dbef66427a72bc036
[ "WTFPL" ]
null
null
null
examples/mailbox_api/app/routes.py
pussbb/pymaillib
002a916494591e31ec9a0c2dbef66427a72bc036
[ "WTFPL" ]
null
null
null
# -*- coding: utf-8 -*- """ """ from app.controller.mailbox import MailboxController from app.controller.welcome import WelcomeController WelcomeController.register() MailboxController.register()
19.8
52
0.777778
19
198
8.105263
0.631579
0.090909
0.220779
0
0
0
0
0
0
0
0
0.005587
0.09596
198
9
53
22
0.854749
0.106061
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
62b49657b1421093faa746f42a59b5e0d0420420
72
py
Python
simuvex/simuvex/s_errors.py
Ruide/angr-dev
964dc80c758e25c698c2cbcc454ef5954c5fa0a0
[ "BSD-2-Clause" ]
86
2015-08-06T23:25:07.000Z
2022-02-17T14:58:22.000Z
simuvex/simuvex/s_errors.py
Ruide/angr-dev
964dc80c758e25c698c2cbcc454ef5954c5fa0a0
[ "BSD-2-Clause" ]
132
2015-09-10T19:06:59.000Z
2018-10-04T20:36:45.000Z
simuvex/simuvex/s_errors.py
Ruide/angr-dev
964dc80c758e25c698c2cbcc454ef5954c5fa0a0
[ "BSD-2-Clause" ]
80
2015-08-07T10:30:20.000Z
2020-03-21T14:45:28.000Z
print '... Importing simuvex/s_errors.py ...' from angr.errors import *
24
45
0.708333
10
72
5
0.9
0
0
0
0
0
0
0
0
0
0
0
0.125
72
2
46
36
0.793651
0
0
0
0
0
0.513889
0
0
0
0
0
0
0
null
null
0
1
null
null
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
1
0
0
0
1
0
0
1
0
5
62e094c88794294f4716ac0e18ab63610a5e61b2
39
py
Python
Attendance/migrations/__init__.py
prtk1910/Attendance-System-Web
e391c29ccd79acbcc1be9c6f679c6a50cce05974
[ "MIT" ]
1
2019-02-11T12:43:18.000Z
2019-02-11T12:43:18.000Z
Attendance/migrations/__init__.py
prtk1910/Attendance-System-Web
e391c29ccd79acbcc1be9c6f679c6a50cce05974
[ "MIT" ]
23
2018-12-22T21:15:55.000Z
2022-03-07T07:23:08.000Z
Attendance/migrations/__init__.py
prtk1910/Attendance-System-Web
e391c29ccd79acbcc1be9c6f679c6a50cce05974
[ "MIT" ]
16
2019-01-03T07:37:04.000Z
2020-10-25T10:55:07.000Z
#This is empty .py for initialisation
19.5
38
0.769231
6
39
5
1
0
0
0
0
0
0
0
0
0
0
0
0.179487
39
1
39
39
0.9375
0.923077
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
62e811446a7ce3c3bbb7b940f4440a66568ee0c0
234
py
Python
src/proto/__init__.py
joekottke/python-grpc-ssl
d05e60d6263f1b85f1434aec741b6934db902892
[ "MIT" ]
21
2018-12-07T11:30:30.000Z
2021-12-21T09:27:08.000Z
src/proto/__init__.py
rvpanchani/python-grpc-ssl
d05e60d6263f1b85f1434aec741b6934db902892
[ "MIT" ]
null
null
null
src/proto/__init__.py
rvpanchani/python-grpc-ssl
d05e60d6263f1b85f1434aec741b6934db902892
[ "MIT" ]
8
2018-06-30T01:02:23.000Z
2022-02-03T06:49:17.000Z
# Generated *pb2.py and *pb2_grpc.py files go here with the following command # run at the top level of the repo: # # python -m grpc_tools.protoc -I./protos --python_out=./src/proto --grpc_python_out=./src/proto/ ./protos/namer.proto
46.8
117
0.739316
41
234
4.097561
0.682927
0.107143
0.142857
0.202381
0
0
0
0
0
0
0
0.009804
0.128205
234
4
118
58.5
0.813725
0.961538
0
null
1
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
1
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
62fa442a64ae649c1f1d43802ecb78bdacdbb507
968
py
Python
python/pymei/Modules/__init__.py
Breakend/libmei
c031be79a2775e8bb9b47e1057e1398232d4b293
[ "MIT" ]
null
null
null
python/pymei/Modules/__init__.py
Breakend/libmei
c031be79a2775e8bb9b47e1057e1398232d4b293
[ "MIT" ]
null
null
null
python/pymei/Modules/__init__.py
Breakend/libmei
c031be79a2775e8bb9b47e1057e1398232d4b293
[ "MIT" ]
1
2021-02-23T21:13:47.000Z
2021-02-23T21:13:47.000Z
__all__ = ["cmn", "cmnornaments", "corpus", "critapp", "edittrans", "facsimile", "figtable", "harmony", "header", "linkalign", "lyrics", "mensural", "midi", "namesdates", "neumes", "performance", "ptrref", "shared", "text", "usersymbols"] from pymei.Modules.cmn import * from pymei.Modules.cmnornaments import * from pymei.Modules.corpus import * from pymei.Modules.critapp import * from pymei.Modules.edittrans import * from pymei.Modules.facsimile import * from pymei.Modules.figtable import * from pymei.Modules.harmony import * from pymei.Modules.header import * from pymei.Modules.linkalign import * from pymei.Modules.lyrics import * from pymei.Modules.mensural import * from pymei.Modules.midi import * from pymei.Modules.namesdates import * from pymei.Modules.neumes import * from pymei.Modules.performance import * from pymei.Modules.ptrref import * from pymei.Modules.shared import * from pymei.Modules.text import * from pymei.Modules.usersymbols import *
42.086957
238
0.767562
121
968
6.107438
0.206612
0.243572
0.433018
0.565629
0
0
0
0
0
0
0
0
0.106405
968
22
239
44
0.854335
0
0
0
0
0
0.152893
0
0
0
0
0
0
1
0
false
0
0.952381
0
0.952381
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
1a04d32cf057196716d736f7a0017d5316ed4738
5,991
py
Python
server/tests/api_stats_test.py
khoahoang1891999/website
abf5c31502eace8cb01ffda16ea7606572f55a98
[ "Apache-2.0" ]
null
null
null
server/tests/api_stats_test.py
khoahoang1891999/website
abf5c31502eace8cb01ffda16ea7606572f55a98
[ "Apache-2.0" ]
null
null
null
server/tests/api_stats_test.py
khoahoang1891999/website
abf5c31502eace8cb01ffda16ea7606572f55a98
[ "Apache-2.0" ]
null
null
null
import json import unittest from unittest import mock from main import app from services import datacommons as dc class TestApiGetStatsValue(unittest.TestCase): @mock.patch('services.datacommons.send_request') def test_api_get_stats_value(self, send_request): def side_effect(req_url, req_json={}, compress=False, post=True, has_payload=True): if req_url == dc.API_ROOT + "/stat/value" and req_json == { 'place': 'geoId/06', 'stat_var': 'Count_Person_Male', 'date': None, 'measurement_method': None, 'observation_period': None, 'unit': None, 'scaling_factor': None } and not post and not has_payload: return {'value': 19640794} send_request.side_effect = side_effect response = app.test_client().get( '/api/stats/value?place=geoId/06&stat_var=Count_Person_Male') assert response.status_code == 200 assert json.loads(response.data) == {"value": 19640794} class TestApiGetStatSetWithinPlace(unittest.TestCase): def test_required_predicates(self): """Failure if required fields are not present.""" no_parent_place = app.test_client().get( '/api/stats/within-place?child_type=City&stat_vars=Count_Person') assert no_parent_place.status_code == 400 no_child_type = app.test_client().get( '/api/stats/within-place?parent_place=country/USA&stat_vars=Count_Person' ) assert no_child_type.status_code == 400 no_stat_var = app.test_client().get( '/api/stats/within-place?parent_place=country/USA&child_type=City') assert no_stat_var.status_code == 400 @mock.patch('services.datacommons.send_request') def test_api_get_stats_set_within_place(self, send_request): result = { "data": { "Count_Person_Male": { "val": { "geoId/10001": 84271, "geoId/10003": 268870, "geoId/10005": 106429 }, "measurementMethod": "CensusACS5yrSurvey", "importName": "CensusACS5YearSurvey", "provenanceUrl": "https://www.census.gov/" }, "Count_Person": { "val": { "geoId/10001": 178540, "geoId/10003": 557550, "geoId/10005": 229389 }, "measurementMethod": "CensusPEPSurvey", "importName": "CensusPEP", "provenanceUrl": "https://www.census.gov/programs-surveys/popest.html" } } } def side_effect(req_url, req_json={}, compress=False, post=True, has_payload=True): if req_url == dc.API_ROOT + "/stat/set/within-place" and req_json == { 'parent_place': 'geoId/10', 'child_type': 'County', 'date': '2018', 'stat_vars': ['Count_Person', 'Count_Person_Male'] } and post and not has_payload: return result send_request.side_effect = side_effect response = app.test_client().get( '/api/stats/within-place?parent_place=geoId/10&child_type=County' '&date=2018&stat_vars=Count_Person&stat_vars=Count_Person_Male') assert response.status_code == 200 assert json.loads(response.data) == result['data'] @mock.patch('services.datacommons.send_request') def test_api_get_stat_set_within_place_no_date(self, send_request): result = { "data": { "Count_Person_Male": { "val": { "geoId/10001": 84271, "geoId/10003": 268870, "geoId/10005": 106429 }, "measurementMethod": "CensusACS5yrSurvey", "importName": "CensusACS5YearSurvey", "provenanceUrl": "https://www.census.gov/" }, "Count_Person": { "val": { "geoId/10001": 178540, "geoId/10003": 557550, "geoId/10005": 229389 }, "measurementMethod": "CensusPEPSurvey", "importName": "CensusPEP", "provenanceUrl": "https://www.census.gov/programs-surveys/popest.html" } } } def side_effect(req_url, req_json={}, compress=False, post=True, has_payload=True): print(req_url) print(req_json) if req_url == dc.API_ROOT + "/stat/set/within-place" and req_json == { 'parent_place': 'geoId/10', 'child_type': 'County', 'date': None, 'stat_vars': ['Count_Person', 'Count_Person_Male'] } and post and not has_payload: return result send_request.side_effect = side_effect response = app.test_client().get( '/api/stats/within-place?parent_place=geoId/10&child_type=County' '&stat_vars=Count_Person&stat_vars=Count_Person_Male') assert response.status_code == 200 assert json.loads(response.data) == result['data']
38.159236
85
0.493741
549
5,991
5.143898
0.205829
0.062323
0.042493
0.053824
0.788952
0.788952
0.760623
0.760623
0.729462
0.729462
0
0.052485
0.402103
5,991
156
86
38.403846
0.735902
0.007177
0
0.639706
0
0
0.263043
0.107035
0
0
0
0
0.066176
1
0.051471
false
0
0.066176
0
0.154412
0.014706
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
c53d9078367be758432f7f074f45ca099ca999fa
273
py
Python
sample_config.py
HappyBoy05/TelegramFilestoCloud
7f577909f2f86fa2b2eb5a93c8c8244d1cad6773
[ "MIT" ]
37
2021-05-25T00:42:56.000Z
2022-01-06T06:37:50.000Z
sample_config.py
HappyBoy05/TelegramFilestoCloud
7f577909f2f86fa2b2eb5a93c8c8244d1cad6773
[ "MIT" ]
9
2021-06-05T16:21:26.000Z
2021-07-08T15:27:39.000Z
sample_config.py
HappyBoy05/TelegramFilestoCloud
7f577909f2f86fa2b2eb5a93c8c8244d1cad6773
[ "MIT" ]
45
2021-05-15T12:12:34.000Z
2022-03-13T11:52:06.000Z
class Config: BOT_USE = False BOT_TOKEN = '' # from @botfather APP_ID = # from https://my.telegram.org/apps API_HASH = '' # from https://my.telegram.org/apps AUTH_USERS = []
39
78
0.443223
27
273
4.296296
0.703704
0.155172
0.189655
0.327586
0.448276
0.448276
0
0
0
0
0
0
0.454212
273
6
79
45.5
0.778523
0.304029
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
0
0
5
c5557c725ab1e88199c7c09b2d9dd263abf84517
57
py
Python
quit.py
IshanGupta09/Face-Recognition-Attendance-System-by-Ishan
b41c09627c240552ef63ec1f1001a98f30d39955
[ "MIT" ]
2
2021-09-03T18:14:57.000Z
2021-09-19T17:54:27.000Z
quit.py
IshanGupta09/Face-Recognition-Attendance-System-by-Ishan
b41c09627c240552ef63ec1f1001a98f30d39955
[ "MIT" ]
null
null
null
quit.py
IshanGupta09/Face-Recognition-Attendance-System-by-Ishan
b41c09627c240552ef63ec1f1001a98f30d39955
[ "MIT" ]
null
null
null
import cv2 class release: cv2.destroyAllWindows()
7.125
25
0.719298
6
57
6.833333
0.833333
0
0
0
0
0
0
0
0
0
0
0.044444
0.210526
57
7
26
8.142857
0.866667
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
c5683d38f2fb052cb33bd5eb054edd85051e9239
207
py
Python
views/__init__.py
alvarofpp/ufrn-imd1155-brazil-air-traffic-network-analysis
41b9b24a238110c17c09e2a4e2df542c6bcbce1b
[ "MIT" ]
null
null
null
views/__init__.py
alvarofpp/ufrn-imd1155-brazil-air-traffic-network-analysis
41b9b24a238110c17c09e2a4e2df542c6bcbce1b
[ "MIT" ]
null
null
null
views/__init__.py
alvarofpp/ufrn-imd1155-brazil-air-traffic-network-analysis
41b9b24a238110c17c09e2a4e2df542c6bcbce1b
[ "MIT" ]
null
null
null
from .AirportsView import AirportsView from .CoreDecompositionView import CoreDecompositionView from .GraphView import GraphView from .IntroView import IntroView from .NodeRankingView import NodeRankingView
34.5
56
0.879227
20
207
9.1
0.35
0
0
0
0
0
0
0
0
0
0
0
0.096618
207
5
57
41.4
0.973262
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
3d717df2203884078f0e69929fe5098010412cf4
81
py
Python
pipert/utils/visualizer/__init__.py
rotemtzaban/PipeRT
19969056ed392c8783e11b192f7789bfcfe1450a
[ "MIT" ]
10
2020-01-20T16:00:55.000Z
2020-05-13T12:48:40.000Z
pipert/utils/visualizer/__init__.py
rotemtzaban/PipeRT
19969056ed392c8783e11b192f7789bfcfe1450a
[ "MIT" ]
97
2020-01-11T22:05:50.000Z
2020-06-25T13:43:13.000Z
pipert/utils/visualizer/__init__.py
rotemtzaban/PipeRT
19969056ed392c8783e11b192f7789bfcfe1450a
[ "MIT" ]
8
2020-01-14T20:54:19.000Z
2020-04-07T22:59:17.000Z
from .visualizer import Visualizer from .video_visualizer import VideoVisualizer
27
45
0.876543
9
81
7.777778
0.555556
0.457143
0
0
0
0
0
0
0
0
0
0
0.098765
81
2
46
40.5
0.958904
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
3dadf13f8a60429390b03a60d99c7e3b147fdea0
299
py
Python
{{cookiecutter.first_app}}/models.py
nyimbi/ultimate
6334965faf86d9fa16ffef3f2e85177cb7d8a8a1
[ "BSD-3-Clause" ]
1
2018-04-06T10:25:38.000Z
2018-04-06T10:25:38.000Z
{{cookiecutter.first_app}}/models.py
nyimbi/ultimate
6334965faf86d9fa16ffef3f2e85177cb7d8a8a1
[ "BSD-3-Clause" ]
null
null
null
{{cookiecutter.first_app}}/models.py
nyimbi/ultimate
6334965faf86d9fa16ffef3f2e85177cb7d8a8a1
[ "BSD-3-Clause" ]
null
null
null
# coding: utf-8 from django.db import models from . import managers # class MasterPlan(models.Model): # name = models.CharField(max_length=100) # other_name = models.CharField(max_length=200) # test_entry = models.FileField() # # # def __str__(self): # return self.name
17.588235
51
0.672241
38
299
5.078947
0.684211
0.103627
0.196891
0.227979
0.290155
0
0
0
0
0
0
0.029661
0.210702
299
16
52
18.6875
0.788136
0.745819
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
9a7eb4287bf11a667871993d28186c26bffc25de
98
py
Python
Uche Clare/Phase 1/Python Basic 1/Day 11/Task 96.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
6
2020-05-23T19:53:25.000Z
2021-05-08T20:21:30.000Z
Uche Clare/Phase 1/Python Basic 1/Day 11/Task 96.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
8
2020-05-14T18:53:12.000Z
2020-07-03T00:06:20.000Z
Uche Clare/Phase 1/Python Basic 1/Day 11/Task 96.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
39
2020-05-10T20:55:02.000Z
2020-09-12T17:40:59.000Z
import traceback def t_b(): return abc() def abc(): traceback.print_stack() t_b() print()
12.25
27
0.653061
15
98
4.066667
0.6
0.065574
0
0
0
0
0
0
0
0
0
0
0.193878
98
8
28
12.25
0.772152
0
0
0
0
0
0
0
0
0
0
0
0
1
0.285714
true
0
0.142857
0.142857
0.571429
0.285714
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
1
0
0
0
5
9a87a3f1fc63a1db1fe78038b252a4824bfebb97
495
py
Python
period_iterator/tests/test_period_timezone.py
chonla/period-iterator
13b3a85174cb2c9827db75ccf032f6cc015c4773
[ "MIT" ]
null
null
null
period_iterator/tests/test_period_timezone.py
chonla/period-iterator
13b3a85174cb2c9827db75ccf032f6cc015c4773
[ "MIT" ]
null
null
null
period_iterator/tests/test_period_timezone.py
chonla/period-iterator
13b3a85174cb2c9827db75ccf032f6cc015c4773
[ "MIT" ]
null
null
null
from ..period_timezone import period_timezone class test_period_timezone(): def test_period_timezone_format_2_positive_digits(self): tzfmt = period_timezone() assert tzfmt.format('+07') == '+07:00' def test_period_timezone_format_2_negative_digits(self): tzfmt = period_timezone() assert tzfmt.format('-07') == '-07:00' def test_period_timezone_format_default(self): tzfmt = period_timezone() assert tzfmt.format('-07aa') == '-07aa'
35.357143
60
0.690909
61
495
5.229508
0.311475
0.394984
0.225705
0.197492
0.711599
0.711599
0.62069
0.495298
0.495298
0.495298
0
0.045
0.191919
495
14
61
35.357143
0.7525
0
0
0.272727
0
0
0.056452
0
0
0
0
0
0.272727
1
0.272727
false
0
0.090909
0
0.454545
0
0
0
0
null
1
1
1
0
1
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
5
9a933e0d8e4eacb53ccb85fa930447db993b1313
9,241
py
Python
tests/managers/event_log_tests.py
erick-sapp/softlayer-python
c0553f41ffcb27d899065a6ebe225392e690aed5
[ "MIT" ]
null
null
null
tests/managers/event_log_tests.py
erick-sapp/softlayer-python
c0553f41ffcb27d899065a6ebe225392e690aed5
[ "MIT" ]
2
2019-02-18T18:35:51.000Z
2019-06-30T15:36:44.000Z
tests/managers/event_log_tests.py
erick-sapp/softlayer-python
c0553f41ffcb27d899065a6ebe225392e690aed5
[ "MIT" ]
null
null
null
""" SoftLayer.tests.managers.event_log_tests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :license: MIT, see LICENSE for more details. """ import SoftLayer from SoftLayer import fixtures from SoftLayer import testing class EventLogTests(testing.TestCase): def set_up(self): self.event_log = SoftLayer.EventLogManager(self.client) def test_get_event_logs(self): result = self.event_log.get_event_logs(None) expected = fixtures.SoftLayer_Event_Log.getAllObjects self.assertEqual(expected, result) def test_get_event_log_types(self): result = self.event_log.get_event_log_types() expected = fixtures.SoftLayer_Event_Log.getAllEventObjectNames self.assertEqual(expected, result) def test_get_event_logs_by_type(self): expected = [ { 'accountId': 100, 'eventCreateDate': '2017-10-23T14:22:36.221541-05:00', 'eventName': 'Disable Port', 'ipAddress': '192.168.0.1', 'label': 'test.softlayer.com', 'metaData': '', 'objectId': 300, 'objectName': 'CCI', 'traceId': '100', 'userId': '', 'userType': 'SYSTEM' } ] mock = self.set_mock('SoftLayer_Event_Log', 'getAllObjects') mock.return_value = expected result = self.event_log.get_event_logs_by_type('CCI') self.assertEqual(expected, result) def test_get_event_logs_by_event_name(self): expected = [ { 'accountId': 100, 'eventCreateDate': '2017-10-18T09:40:32.238869-05:00', 'eventName': 'Security Group Added', 'ipAddress': '192.168.0.1', 'label': 'test.softlayer.com', 'metaData': '{"securityGroupId":"200",' '"securityGroupName":"test_SG",' '"networkComponentId":"100",' '"networkInterfaceType":"public",' '"requestId":"96c9b47b9e102d2e1d81fba"}', 'objectId': 300, 'objectName': 'CCI', 'traceId': '59e767e03a57e', 'userId': 400, 'userType': 'CUSTOMER', 'username': 'user' } ] mock = self.set_mock('SoftLayer_Event_Log', 'getAllObjects') mock.return_value = expected result = self.event_log.get_event_logs_by_event_name('Security Group Added') self.assertEqual(expected, result) def test_build_filter_no_args(self): result = self.event_log.build_filter(None, None, None, None, None, None) self.assertEqual(result, None) def test_build_filter_min_date(self): expected = { 'eventCreateDate': { 'operation': 'greaterThanDate', 'options': [ { 'name': 'date', 'value': [ '2017-10-30T00:00:00.000000+00:00' ] } ] } } result = self.event_log.build_filter('10/30/2017', None, None, None, None, None) self.assertEqual(expected, result) def test_build_filter_max_date(self): expected = { 'eventCreateDate': { 'operation': 'lessThanDate', 'options': [ { 'name': 'date', 'value': [ '2017-10-31T00:00:00.000000+00:00' ] } ] } } result = self.event_log.build_filter(None, '10/31/2017', None, None, None, None) self.assertEqual(expected, result) def test_build_filter_min_max_date(self): expected = { 'eventCreateDate': { 'operation': 'betweenDate', 'options': [ { 'name': 'startDate', 'value': [ '2017-10-30T00:00:00.000000+00:00' ] }, { 'name': 'endDate', 'value': [ '2017-10-31T00:00:00.000000+00:00' ] } ] } } result = self.event_log.build_filter('10/30/2017', '10/31/2017', None, None, None, None) self.assertEqual(expected, result) def test_build_filter_min_date_pos_utc(self): expected = { 'eventCreateDate': { 'operation': 'greaterThanDate', 'options': [ { 'name': 'date', 'value': [ '2017-10-30T00:00:00.000000+05:00' ] } ] } } result = self.event_log.build_filter('10/30/2017', None, None, None, None, '+0500') self.assertEqual(expected, result) def test_build_filter_max_date_pos_utc(self): expected = { 'eventCreateDate': { 'operation': 'lessThanDate', 'options': [ { 'name': 'date', 'value': [ '2017-10-31T00:00:00.000000+05:00' ] } ] } } result = self.event_log.build_filter(None, '10/31/2017', None, None, None, '+0500') self.assertEqual(expected, result) def test_build_filter_min_max_date_pos_utc(self): expected = { 'eventCreateDate': { 'operation': 'betweenDate', 'options': [ { 'name': 'startDate', 'value': [ '2017-10-30T00:00:00.000000+05:00' ] }, { 'name': 'endDate', 'value': [ '2017-10-31T00:00:00.000000+05:00' ] } ] } } result = self.event_log.build_filter('10/30/2017', '10/31/2017', None, None, None, '+0500') self.assertEqual(expected, result) def test_build_filter_min_date_neg_utc(self): expected = { 'eventCreateDate': { 'operation': 'greaterThanDate', 'options': [ { 'name': 'date', 'value': [ '2017-10-30T00:00:00.000000-03:00' ] } ] } } result = self.event_log.build_filter('10/30/2017', None, None, None, None, '-0300') self.assertEqual(expected, result) def test_build_filter_max_date_neg_utc(self): expected = { 'eventCreateDate': { 'operation': 'lessThanDate', 'options': [ { 'name': 'date', 'value': [ '2017-10-31T00:00:00.000000-03:00' ] } ] } } result = self.event_log.build_filter(None, '10/31/2017', None, None, None, '-0300') self.assertEqual(expected, result) def test_build_filter_min_max_date_neg_utc(self): expected = { 'eventCreateDate': { 'operation': 'betweenDate', 'options': [ { 'name': 'startDate', 'value': [ '2017-10-30T00:00:00.000000-03:00' ] }, { 'name': 'endDate', 'value': [ '2017-10-31T00:00:00.000000-03:00' ] } ] } } result = self.event_log.build_filter('10/30/2017', '10/31/2017', None, None, None, '-0300') self.assertEqual(expected, result) def test_build_filter_name(self): expected = {'eventName': {'operation': 'Add Security Group'}} result = self.event_log.build_filter(None, None, 'Add Security Group', None, None, None) self.assertEqual(expected, result) def test_build_filter_id(self): expected = {'objectId': {'operation': 1}} result = self.event_log.build_filter(None, None, None, 1, None, None) self.assertEqual(expected, result) def test_build_filter_type(self): expected = {'objectName': {'operation': 'CCI'}} result = self.event_log.build_filter(None, None, None, None, 'CCI', None) self.assertEqual(expected, result)
31.219595
99
0.442376
770
9,241
5.123377
0.153247
0.07706
0.069962
0.077567
0.812928
0.764259
0.753359
0.706971
0.671483
0.659569
0
0.100058
0.437615
9,241
295
100
31.325424
0.659034
0.013527
0
0.440678
0
0
0.201407
0.065963
0
0
0
0
0.072034
1
0.076271
false
0
0.012712
0
0.09322
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
9ae3630e94c70fa648a6bdca1e704c880394baca
67
py
Python
src/meltano/core/job/__init__.py
siilats/meltano
404605c83f441c3fc2b729e26416c6caa8b0ed0b
[ "MIT" ]
122
2021-06-21T17:30:29.000Z
2022-03-25T06:21:38.000Z
src/meltano/core/job/__init__.py
siilats/meltano
404605c83f441c3fc2b729e26416c6caa8b0ed0b
[ "MIT" ]
null
null
null
src/meltano/core/job/__init__.py
siilats/meltano
404605c83f441c3fc2b729e26416c6caa8b0ed0b
[ "MIT" ]
21
2021-06-22T10:08:15.000Z
2022-03-18T08:57:02.000Z
from .finder import JobFinder from .job import Job, Payload, State
22.333333
36
0.791045
10
67
5.3
0.7
0
0
0
0
0
0
0
0
0
0
0
0.149254
67
2
37
33.5
0.929825
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
b1250ac85143bcbc8815e4e17b5e25d5a885a4a7
97
py
Python
kpruss/__init__.py
kprussing/kpruss
b9c196490fecc02ed6467d96327e5ae96dccf808
[ "BSD-2-Clause" ]
null
null
null
kpruss/__init__.py
kprussing/kpruss
b9c196490fecc02ed6467d96327e5ae96dccf808
[ "BSD-2-Clause" ]
null
null
null
kpruss/__init__.py
kprussing/kpruss
b9c196490fecc02ed6467d96327e5ae96dccf808
[ "BSD-2-Clause" ]
null
null
null
import pathlib def setup(app): app.add_html_theme("kpruss", pathlib.Path(__file__).parent)
16.166667
63
0.742268
14
97
4.714286
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.123711
97
5
64
19.4
0.776471
0
0
0
0
0
0.061856
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
5
b162c75fb0ffdfa03755889a143b36e915f49a17
840
py
Python
src/dimstore/providers/meta_manager/meta_manager_base.py
neoworth/dimstore
d00243f7af4759f3a1d90e68325172330c649f20
[ "MIT" ]
4
2020-05-01T15:50:11.000Z
2021-04-15T17:52:42.000Z
src/dimstore/providers/meta_manager/meta_manager_base.py
neoworth/dimstore
d00243f7af4759f3a1d90e68325172330c649f20
[ "MIT" ]
null
null
null
src/dimstore/providers/meta_manager/meta_manager_base.py
neoworth/dimstore
d00243f7af4759f3a1d90e68325172330c649f20
[ "MIT" ]
1
2021-05-12T17:46:48.000Z
2021-05-12T17:46:48.000Z
""" base class of meta manager class """ class MetaManagerBase(): def __init__(self, config): pass def register(self, feature): raise NotImplementedError('Meta Manager register method implementation error!') def lookup(self, name, namespace='default', **kwargs): raise NotImplementedError('Meta Manager lookup method implementation error!') def list_features(self, namespace='default', match_child=True, **kwargs): raise NotImplementedError('Meta Manager list_features method implementation error!') def inspect_feature(self, uid, **kwargs): raise NotImplementedError('Meta Manager inspect_feature method implementation error!') def remove_feature(self, uid, **kwargs): raise NotImplementedError('Meta Manager remove_feature method implementation error!')
33.6
94
0.722619
89
840
6.696629
0.348315
0.110738
0.234899
0.293624
0.322148
0.184564
0.184564
0.184564
0
0
0
0
0.183333
840
24
95
35
0.868805
0.038095
0
0
0
0
0.351759
0
0
0
0
0
0
1
0.461538
false
0.076923
0
0
0.538462
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
5
b1754aa1f57bb5ce1c73677a1a820f6ff02c3a89
141
py
Python
py/calc_vheight.py
Shirling-VT/Tdiff_Validation
a19c5c8b62b09d0cd60749154c4d744f1f56dfeb
[ "MIT" ]
null
null
null
py/calc_vheight.py
Shirling-VT/Tdiff_Validation
a19c5c8b62b09d0cd60749154c4d744f1f56dfeb
[ "MIT" ]
null
null
null
py/calc_vheight.py
Shirling-VT/Tdiff_Validation
a19c5c8b62b09d0cd60749154c4d744f1f56dfeb
[ "MIT" ]
null
null
null
""" calc_vheight.py ============== Author: S. Chakraborty This file is a v_Height estimator """ def calculate_vHeight(): return
17.625
36
0.609929
17
141
4.882353
0.941176
0
0
0
0
0
0
0
0
0
0
0
0.205674
141
8
37
17.625
0.741071
0.617021
0
0
0
0
0
0
0
0
0
0
0
1
0.5
true
0
0
0.5
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
1
0
0
0
5
490d23b61d62df0daf939b6a6d613f5cf804550c
20,600
py
Python
himalaya/kernel_ridge/tests/test_sklearn_api_kernel.py
mvdoc/himalaya
7e3866287b835e2cc0a5c9848331e19c14896309
[ "BSD-3-Clause" ]
29
2021-09-14T14:55:26.000Z
2022-03-27T22:32:56.000Z
himalaya/kernel_ridge/tests/test_sklearn_api_kernel.py
mvdoc/himalaya
7e3866287b835e2cc0a5c9848331e19c14896309
[ "BSD-3-Clause" ]
15
2021-11-11T03:55:11.000Z
2022-03-11T20:20:37.000Z
himalaya/kernel_ridge/tests/test_sklearn_api_kernel.py
mvdoc/himalaya
7e3866287b835e2cc0a5c9848331e19c14896309
[ "BSD-3-Clause" ]
3
2021-09-13T19:10:54.000Z
2022-02-10T17:56:42.000Z
import warnings import pytest import sklearn.kernel_ridge import sklearn.utils.estimator_checks from himalaya.backend import set_backend from himalaya.backend import get_backend from himalaya.backend import ALL_BACKENDS from himalaya.utils import assert_array_almost_equal from himalaya.ridge import Ridge from himalaya.ridge import RidgeCV from himalaya.kernel_ridge import KernelRidge from himalaya.kernel_ridge import KernelRidgeCV from himalaya.kernel_ridge import MultipleKernelRidgeCV from himalaya.kernel_ridge import WeightedKernelRidge def _create_dataset(backend): n_samples, n_targets = 30, 3 Xs = [ backend.asarray(backend.randn(n_samples, n_features), backend.float64) for n_features in [100, 200] ] Ks = backend.stack([backend.matmul(X, X.T) for X in Xs]) Y = backend.asarray(backend.randn(n_samples, n_targets), backend.float64) return Xs, Ks, Y @pytest.mark.parametrize('kernel', [ 'linear', 'polynomial', 'poly', 'rbf', 'sigmoid', 'cosine', 'precomputed' ]) @pytest.mark.parametrize('multitarget', [True, False]) @pytest.mark.parametrize('backend', ALL_BACKENDS) def test_kernel_ridge_vs_scikit_learn(backend, multitarget, kernel): backend = set_backend(backend) Xs, Ks, Y = _create_dataset(backend) if not multitarget: Y = Y[:, 0] if kernel == "precomputed": X = Ks[0] else: X = Xs[0] for alpha in backend.asarray_like(backend.logspace(0, 3, 7), Ks): model = KernelRidge(alpha=alpha, kernel=kernel) model.fit(X, Y) reference = sklearn.kernel_ridge.KernelRidge( alpha=backend.to_numpy(alpha), kernel=kernel) reference.fit(backend.to_numpy(X), backend.to_numpy(Y)) assert model.dual_coef_.shape == Y.shape assert_array_almost_equal(model.dual_coef_, reference.dual_coef_) assert_array_almost_equal(model.predict(X), reference.predict(backend.to_numpy(X))) assert_array_almost_equal( model.score(X, Y).mean(), reference.score(backend.to_numpy(X), backend.to_numpy(Y))) @pytest.mark.parametrize('fit_intercept', [False, True]) @pytest.mark.parametrize('backend', ALL_BACKENDS) def test_kernel_ridge_vs_ridge(backend, fit_intercept): # useful to test the intercept as well backend = set_backend(backend) Xs, _, Y = _create_dataset(backend) X = Xs[0] if fit_intercept: Y += 10 X += 1 # torch with cuda has more limited precision in mean decimal = 3 if backend.name == "torch_cuda" else 6 for alpha in backend.asarray_like(backend.logspace(0, 3, 7), X): model = KernelRidge(alpha=alpha, fit_intercept=fit_intercept) model.fit(X, Y) reference = Ridge(alpha=alpha, fit_intercept=fit_intercept) reference.fit(backend.to_numpy(X), backend.to_numpy(Y)) assert_array_almost_equal(model.predict(X), reference.predict(X), decimal=decimal) @pytest.mark.parametrize('fit_intercept', [False, True]) @pytest.mark.parametrize('backend', ALL_BACKENDS) def test_kernel_ridge_cv_vs_ridge_cv(backend, fit_intercept): # useful to test the intercept as well backend = set_backend(backend) Xs, _, Y = _create_dataset(backend) X = Xs[0] if fit_intercept: Y += 10 Xs[0] += 1 alphas = backend.asarray_like(backend.logspace(-2, 3, 21), Y) # XXX # torch with cuda has more limited precision in mean decimal = 4 if backend.name == "torch_cuda" else 6 model = KernelRidgeCV(alphas=alphas, fit_intercept=fit_intercept) model.fit(X, Y) reference = RidgeCV(alphas=alphas, fit_intercept=fit_intercept) reference.fit(X, Y) assert_array_almost_equal(model.best_alphas_, reference.best_alphas_, decimal=5) assert_array_almost_equal(model.predict(X), reference.predict(X), decimal=decimal) @pytest.mark.parametrize( 'kernel', ['linear', 'polynomial', 'poly', 'rbf', 'sigmoid', 'cosine']) @pytest.mark.parametrize('format', ['coo', 'csr', 'csc']) @pytest.mark.parametrize('backend', ALL_BACKENDS) def test_kernel_ridge_vs_scikit_learn_sparse(backend, kernel, format): backend = set_backend(backend) Xs, _, Y = _create_dataset(backend) try: import scipy.sparse except ImportError: pytest.skip("Scipy is not installed.") with warnings.catch_warnings(): warnings.simplefilter('ignore', scipy.sparse.SparseEfficiencyWarning) X = scipy.sparse.rand(*Xs[0].shape, density=0.1, format=format) for alpha in backend.asarray_like(backend.logspace(0, 3, 7), Y): model = KernelRidge(alpha=alpha, kernel=kernel) model.fit(X, Y) reference = sklearn.kernel_ridge.KernelRidge( alpha=backend.to_numpy(alpha), kernel=kernel) reference.fit(X, backend.to_numpy(Y)) assert model.dual_coef_.shape == Y.shape assert_array_almost_equal(model.dual_coef_, reference.dual_coef_) assert_array_almost_equal(model.predict(X), reference.predict(X)) assert_array_almost_equal( model.score(X, Y).mean(), reference.score(X, backend.to_numpy(Y))) @pytest.mark.parametrize('backend', ALL_BACKENDS) def test_kernel_ridge_precomputed(backend): backend = set_backend(backend) Xs, Ks, Y = _create_dataset(backend) for alpha in backend.asarray_like(backend.logspace(-2, 3, 7), Ks): model_1 = KernelRidge(alpha=alpha, kernel="linear") model_1.fit(Xs[0], Y) model_2 = KernelRidge(alpha=alpha, kernel="precomputed") model_2.fit(Ks[0], Y) assert_array_almost_equal(model_1.dual_coef_, model_2.dual_coef_) assert_array_almost_equal(model_1.predict(Xs[0]), model_2.predict(Ks[0])) @pytest.mark.parametrize('backend', ALL_BACKENDS) def test_kernel_ridge_get_primal_coef(backend): backend = set_backend(backend) Xs, Ks, Y = _create_dataset(backend) model = KernelRidge(kernel="linear") model.fit(Xs[0], Y) primal_coef = model.get_primal_coef() predictions_primal = Xs[0] @ backend.asarray(primal_coef) predictions_dual = model.predict(Xs[0]) assert_array_almost_equal(predictions_primal, predictions_dual) model = KernelRidge(kernel="precomputed") model.fit(Ks[0], Y) primal_coef = model.get_primal_coef(X_fit=Xs[0]) predictions_primal = Xs[0] @ backend.asarray(primal_coef) predictions_dual = model.predict(Ks[0]) assert_array_almost_equal(predictions_primal, predictions_dual) model = KernelRidge(kernel="precomputed") model.fit(Ks[0], Y) with pytest.raises(ValueError): model.get_primal_coef(X_fit=None) model = KernelRidge(kernel="poly") model.fit(Xs[0], Y) with pytest.raises(ValueError): model.get_primal_coef() @pytest.mark.parametrize('backend', ALL_BACKENDS) def test_weighted_kernel_ridge_get_primal_coef(backend): backend = set_backend(backend) Xs, Ks, Y = _create_dataset(backend) model = WeightedKernelRidge(kernels="precomputed") model.fit(Ks, Y) with pytest.raises(ValueError): primal_coef = model.get_primal_coef(Xs_fit=None) primal_coef = model.get_primal_coef(Xs_fit=Xs) predictions_primal = backend.stack( [X @ backend.asarray(w) for X, w in zip(Xs, primal_coef)]).sum(0) predictions_dual = model.predict(Ks) assert_array_almost_equal(predictions_primal, predictions_dual) @pytest.mark.parametrize( 'solver', ['eigenvalues', 'conjugate_gradient', 'gradient_descent']) @pytest.mark.parametrize('backend', ALL_BACKENDS) def test_kernel_ridge_solvers(solver, backend): backend = set_backend(backend) Xs, _, Y = _create_dataset(backend) kernel = "linear" X = Xs[0] if solver == "eigenvalues": solver_params = dict() elif solver == "conjugate_gradient": solver_params = dict(max_iter=300, tol=1e-6) elif solver == "gradient_descent": solver_params = dict(max_iter=300, tol=1e-6) for alpha in backend.asarray_like(backend.logspace(0, 3, 7), Y): model = KernelRidge(alpha=alpha, kernel=kernel, solver=solver, solver_params=solver_params) model.fit(X, Y) reference = sklearn.kernel_ridge.KernelRidge( alpha=backend.to_numpy(alpha), kernel=kernel) reference.fit(backend.to_numpy(X), backend.to_numpy(Y)) assert model.dual_coef_.shape == Y.shape assert_array_almost_equal(model.dual_coef_, reference.dual_coef_) assert_array_almost_equal(model.predict(X), reference.predict(backend.to_numpy(X)), decimal=5) @pytest.mark.parametrize('backend', ALL_BACKENDS) def test_kernel_ridge_wrong_solver(backend): backend = set_backend(backend) Xs, _, Y = _create_dataset(backend) X = Xs[0] model = KernelRidge(solver="wrong") with pytest.raises(ValueError, match="Unknown solver"): model.fit(X, Y) @pytest.mark.parametrize('solver', ['eigenvalues']) @pytest.mark.parametrize('backend', ALL_BACKENDS) def test_kernel_ridge_cv_precomputed(backend, solver): backend = set_backend(backend) Xs, Ks, Y = _create_dataset(backend) model_1 = KernelRidgeCV(kernel="linear") model_1.fit(Xs[0], Y) model_2 = KernelRidgeCV(kernel="precomputed") model_2.fit(Ks[0], Y) assert_array_almost_equal(model_1.dual_coef_, model_2.dual_coef_) assert_array_almost_equal(model_1.predict(Xs[0]), model_2.predict(Ks[0])) @pytest.mark.parametrize('solver', ['random_search', 'hyper_gradient']) @pytest.mark.parametrize('backend', ALL_BACKENDS) def test_multiple_kernel_ridge_cv_precomputed(backend, solver): backend = set_backend(backend) Xs, Ks, Y = _create_dataset(backend) if solver == "random_search": kwargs = dict(solver="random_search", random_state=0, solver_params=dict(n_iter=2, progress_bar=False)) elif solver == "hyper_gradient": kwargs = dict(solver="hyper_gradient", random_state=0, solver_params=dict(max_iter=2, progress_bar=False)) model_1 = MultipleKernelRidgeCV(kernels=["linear"], **kwargs) model_1.fit(Xs[0], Y) model_2 = MultipleKernelRidgeCV(kernels="precomputed", **kwargs) model_2.fit(Ks[0][None], Y) assert_array_almost_equal(model_1.dual_coef_, model_2.dual_coef_) assert_array_almost_equal(model_1.predict(Xs[0]), model_2.predict(Ks[0][None])) @pytest.mark.parametrize('solver', ['conjugate_gradient', 'gradient_descent']) @pytest.mark.parametrize('backend', ALL_BACKENDS) def test_weighted_kernel_ridge_precomputed(backend, solver): backend = set_backend(backend) Xs, Ks, Y = _create_dataset(backend) model_1 = WeightedKernelRidge(kernels=["linear"]) model_1.fit(Xs[0], Y) model_2 = WeightedKernelRidge(kernels="precomputed") model_2.fit(Ks[0][None], Y) assert_array_almost_equal(model_1.dual_coef_, model_2.dual_coef_) assert_array_almost_equal(model_1.predict(Xs[0]), model_2.predict(Ks[0][None])) @pytest.mark.parametrize('Estimator', [WeightedKernelRidge, MultipleKernelRidgeCV]) @pytest.mark.parametrize('backend', ALL_BACKENDS) def test_weighted_kernel_ridge_split_predict(backend, Estimator): backend = set_backend(backend) Xs, Ks, Y = _create_dataset(backend) # multiple targets model = Estimator(kernels="precomputed") model.fit(Ks, Y) Y_pred = model.predict(Ks) Y_pred_split = model.predict(Ks, split=True) assert Y_pred.shape == Y.shape assert_array_almost_equal(Y_pred, Y_pred_split.sum(0)) # single targets model = Estimator(kernels="precomputed") model.fit(Ks, Y[:, 0]) Y_pred = model.predict(Ks) Y_pred_split = model.predict(Ks, split=True) assert Y_pred.shape == Y[:, 0].shape assert_array_almost_equal(Y_pred, Y_pred_split.sum(0)) @pytest.mark.parametrize('Estimator', [WeightedKernelRidge, MultipleKernelRidgeCV]) @pytest.mark.parametrize('backend', ALL_BACKENDS) def test_weighted_kernel_ridge_split_score(backend, Estimator): backend = set_backend(backend) Xs, Ks, Y = _create_dataset(backend) if issubclass(Estimator, MultipleKernelRidgeCV): solver_params = dict(n_iter=2, progress_bar=False) else: solver_params = dict() # multiple targets model = Estimator(kernels="precomputed", solver_params=solver_params) model.fit(Ks, Y) score = model.score(Ks, Y) score_split = model.score(Ks, Y, split=True) assert score_split.shape == (len(Ks), Y.shape[1]) assert_array_almost_equal(score, score_split.sum(0), decimal=4) # single targets model = Estimator(kernels="precomputed", solver_params=solver_params) model.fit(Ks, Y[:, 0]) score = model.score(Ks, Y[:, 0]) score_split = model.score(Ks, Y[:, 0], split=True) assert score_split.shape == (len(Ks), ) assert_array_almost_equal(score, score_split.sum(0), decimal=4) @pytest.mark.parametrize('backend', ALL_BACKENDS) def test_duplicate_solver_parameters(backend): backend = set_backend(backend) Xs, _, Y = _create_dataset(backend) model = KernelRidge(solver_params=dict(alpha=1)) with pytest.raises(ValueError): model.fit(Xs[0], Y) @pytest.mark.parametrize('backend', ALL_BACKENDS) def test_kernel_ridge_cv_predict(backend): backend = set_backend(backend) Xs, Ks, Y = _create_dataset(backend) n_iter = backend.ones_like(Ks, shape=(1, Ks.shape[0])) alphas = backend.logspace(1, 2, 3) model_0 = KernelRidgeCV(kernel="precomputed", alphas=alphas).fit(Ks.sum(0), Y) model_1 = MultipleKernelRidgeCV( kernels="precomputed", solver_params=dict(n_iter=n_iter, alphas=alphas)).fit(Ks, Y) assert_array_almost_equal(model_0.predict(Ks.sum(0)), model_1.predict(Ks)) @pytest.mark.parametrize('solver', ['eigenvalues']) @pytest.mark.parametrize('backend', ALL_BACKENDS) def test_kernel_ridge_cv_Y_in_cpu(backend, solver): backend = set_backend(backend) Xs, Ks, Y = _create_dataset(backend) model_1 = KernelRidgeCV(solver=solver, Y_in_cpu=True) model_1.fit(Xs[0], Y) model_2 = KernelRidgeCV(solver=solver, Y_in_cpu=False) model_2.fit(Xs[0], Y) assert_array_almost_equal(model_1.dual_coef_, model_2.dual_coef_) assert_array_almost_equal(model_1.predict(Xs[0]), model_2.predict(Xs[0])) @pytest.mark.parametrize('solver', ['random_search', 'hyper_gradient']) @pytest.mark.parametrize('backend', ALL_BACKENDS) def test_multiple_kernel_ridge_cv_Y_in_cpu(backend, solver): backend = set_backend(backend) Xs, Ks, Y = _create_dataset(backend) model_1 = MultipleKernelRidgeCV(kernels="precomputed", solver=solver, Y_in_cpu=True, random_state=0) model_1.fit(Ks, Y) model_2 = MultipleKernelRidgeCV(kernels="precomputed", solver=solver, Y_in_cpu=False, random_state=0) model_2.fit(Ks, Y) assert_array_almost_equal(model_1.dual_coef_, model_2.dual_coef_) assert_array_almost_equal(model_1.predict(Ks), model_2.predict(Ks)) @pytest.mark.parametrize('backend', ALL_BACKENDS) def test_weighted_kernel_ridge_cv_array_deltas(backend): backend = set_backend(backend) Xs, Ks, Y = _create_dataset(backend) # correct deltas array deltas = backend.zeros_like(Ks, shape=(len(Ks), )) model_1 = WeightedKernelRidge(kernels="precomputed", deltas=deltas, random_state=0) model_1.fit(Ks, Y) # wrong number of kernels deltas = backend.zeros_like(Ks, shape=(len(Ks) + 1, )) model_1 = WeightedKernelRidge(kernels="precomputed", deltas=deltas, random_state=0) with pytest.raises(ValueError, match="Inconsistent number of kernels"): model_1.fit(Ks, Y) # wrong number of targets deltas = backend.zeros_like(Ks, shape=(len(Ks), Y.shape[1] + 1)) model_1 = WeightedKernelRidge(kernels="precomputed", deltas=deltas, random_state=0) with pytest.raises(ValueError, match="Inconsistent number of targets"): model_1.fit(Ks, Y) ############################################################################### ############################################################################### ############################################################################### # scikit-learn.utils.estimator_checks class KernelRidge_(KernelRidge): """Cast predictions to numpy arrays, to be used in scikit-learn tests. Used for testing only. """ def predict(self, X): backend = get_backend() return backend.to_numpy(super().predict(X)) def score(self, X, y): from himalaya.validation import check_array from himalaya.scoring import r2_score backend = get_backend() y_pred = super().predict(X) y_true = check_array(y, dtype=self.dtype_, ndim=self.dual_coef_.ndim) if y_true.ndim == 1: return backend.to_numpy( r2_score(y_true[:, None], y_pred[:, None])[0]) else: return backend.to_numpy(r2_score(y_true, y_pred)) class KernelRidgeCV_(KernelRidgeCV): """Cast predictions to numpy arrays, to be used in scikit-learn tests. Used for testing only. """ def __init__(self, alphas=(0.1, 1), kernel="linear", kernel_params=None, solver="eigenvalues", solver_params=None, cv=2): super().__init__(alphas=alphas, kernel=kernel, kernel_params=kernel_params, solver=solver, solver_params=solver_params, cv=cv) def predict(self, X): backend = get_backend() return backend.to_numpy(super().predict(X)) def score(self, X, y): from himalaya.validation import check_array from himalaya.scoring import r2_score backend = get_backend() y_pred = super().predict(X) y_true = check_array(y, dtype=self.dtype_, ndim=self.dual_coef_.ndim) if y_true.ndim == 1: return backend.to_numpy( r2_score(y_true[:, None], y_pred[:, None])[0]) else: return backend.to_numpy(r2_score(y_true, y_pred)) class MultipleKernelRidgeCV_(MultipleKernelRidgeCV): """Cast predictions to numpy arrays, to be used in scikit-learn tests. Used for testing only. """ def __init__(self, kernels=("linear", "polynomial"), kernels_params=None, solver="hyper_gradient", solver_params=None, cv=2, random_state=None): super().__init__(kernels=kernels, kernels_params=kernels_params, solver=solver, solver_params=solver_params, cv=cv, random_state=random_state) def predict(self, X, split=False): backend = get_backend() return backend.to_numpy(super().predict(X, split=split)) def score(self, X, y, split=False): backend = get_backend() return backend.to_numpy(super().score(X, y, split=split)) class WeightedKernelRidge_(WeightedKernelRidge): """Cast predictions to numpy arrays, to be used in scikit-learn tests. Used for testing only. """ def __init__(self, alpha=1., deltas="zeros", kernels=("linear", "polynomial"), kernels_params=None, solver="conjugate_gradient", solver_params=None, random_state=None): super().__init__(alpha=alpha, deltas=deltas, kernels=kernels, kernels_params=kernels_params, solver=solver, solver_params=solver_params, random_state=random_state) def predict(self, X, split=False): backend = get_backend() return backend.to_numpy(super().predict(X, split=split)) def score(self, X, y, split=False): backend = get_backend() return backend.to_numpy(super().score(X, y, split=split)) @sklearn.utils.estimator_checks.parametrize_with_checks([ KernelRidge_(), KernelRidgeCV_(), MultipleKernelRidgeCV_(), WeightedKernelRidge_(), ]) @pytest.mark.parametrize('backend', ALL_BACKENDS) def test_check_estimator(estimator, check, backend): backend = set_backend(backend) check(estimator)
36.33157
79
0.668447
2,632
20,600
4.981003
0.073708
0.025934
0.054462
0.053699
0.818612
0.769718
0.729977
0.710755
0.65164
0.614111
0
0.012376
0.203738
20,600
566
80
36.39576
0.786868
0.034806
0
0.562347
0
0
0.054043
0
0
0
0
0
0.095355
1
0.07824
false
0
0.0489
0
0.163814
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
490dec0dae999e2167345fcead79b3d13d5bc3d2
234
py
Python
test/com/facebook/buck/features/python/testdata/python_test/test_failure.py
Unknoob/buck
2dfc734354b326f2f66896dde7746a11965d5a13
[ "Apache-2.0" ]
8,027
2015-01-02T05:31:44.000Z
2022-03-31T07:08:09.000Z
test/com/facebook/buck/features/python/testdata/python_test/test_failure.py
Unknoob/buck
2dfc734354b326f2f66896dde7746a11965d5a13
[ "Apache-2.0" ]
2,355
2015-01-01T15:30:53.000Z
2022-03-30T20:21:16.000Z
test/com/facebook/buck/features/python/testdata/python_test/test_failure.py
Unknoob/buck
2dfc734354b326f2f66896dde7746a11965d5a13
[ "Apache-2.0" ]
1,280
2015-01-09T03:29:04.000Z
2022-03-30T15:14:14.000Z
import unittest class Test(unittest.TestCase): def test_that_passes(self): pass def test_that_fails(self): self.fail("failure") class Test2(unittest.TestCase): def test_that_passes(self): pass
15.6
31
0.666667
30
234
5
0.466667
0.14
0.22
0.306667
0.546667
0.546667
0.546667
0.546667
0
0
0
0.005618
0.239316
234
14
32
16.714286
0.837079
0
0
0.444444
0
0
0.029915
0
0
0
0
0
0
1
0.333333
false
0.444444
0.111111
0
0.666667
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
5
493c86063fe0ff64126c5d73cfa7073c5ee1b465
72
py
Python
tests/test.py
Hydrapse/pytorch-template
d7ea2f19bbdc032b8663ca432c1ef9012fe6180b
[ "MIT", "Unlicense" ]
null
null
null
tests/test.py
Hydrapse/pytorch-template
d7ea2f19bbdc032b8663ca432c1ef9012fe6180b
[ "MIT", "Unlicense" ]
null
null
null
tests/test.py
Hydrapse/pytorch-template
d7ea2f19bbdc032b8663ca432c1ef9012fe6180b
[ "MIT", "Unlicense" ]
null
null
null
import sys sys.path.append('/home/xhh/notebooks/GNN/pytorch-template')
18
59
0.777778
11
72
5.090909
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.055556
72
3
60
24
0.823529
0
0
0
0
0
0.56338
0.56338
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
1
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
493e49bc1ea56ff918a6a540f39d6c339934f322
11,674
py
Python
tests/test_protocol_objects.py
tempodb/tempodb-python
8ce45231bd728c6c97ef799cf0f1513ea3a9a7d3
[ "MIT" ]
4
2015-02-04T14:05:37.000Z
2018-03-01T09:46:34.000Z
tests/test_protocol_objects.py
tempodb/tempodb-python
8ce45231bd728c6c97ef799cf0f1513ea3a9a7d3
[ "MIT" ]
2
2022-01-30T22:45:34.000Z
2022-01-30T22:45:42.000Z
tests/test_protocol_objects.py
tempodb/tempodb-python
8ce45231bd728c6c97ef799cf0f1513ea3a9a7d3
[ "MIT" ]
1
2018-04-16T13:55:50.000Z
2018-04-16T13:55:50.000Z
import unittest import datetime import json from tempodb.protocol.objects import JSONSerializable from tempodb.protocol.objects import DataPoint, MultiPoint, DataPointFound from tempodb.protocol.objects import SingleValue, SeriesSummary class TestProtocolObjects(unittest.TestCase): def test_json_serializable_constructor_with_text(self): JSONSerializable.properties = ['foo'] json_text = json.dumps({'foo': 'bar'}) o = JSONSerializable(json_text, None) JSONSerializable.properties = [] self.assertEquals(o.foo, 'bar') def test_json_serializable_constructor_with_obj(self): JSONSerializable.properties = ['foo'] json_text = {'foo': 'bar'} o = JSONSerializable(json_text, None) JSONSerializable.properties = [] self.assertEquals(o.foo, 'bar') def test_json_serializable_constructor_with_invalid_obj(self): JSONSerializable.properties = ['baz'] json_text = {'foo': 'bar'} self.assertRaises(ValueError, JSONSerializable, json_text, None) JSONSerializable.properties = [] def test_json_serializable_to_json(self): JSONSerializable.properties = ['foo'] json_text = {'foo': 'bar'} o = JSONSerializable(json_text, None) j = o.to_json() self.assertEquals(j, json.dumps(json_text)) JSONSerializable.properties = [] def test_json_serializable_to_dict(self): JSONSerializable.properties = ['foo'] json_text = {'foo': 'bar'} o = JSONSerializable(json_text, None) j = o.to_dictionary() self.assertEquals(j, json_text) JSONSerializable.properties = [] def test_data_point_from_data_valid(self): t = datetime.datetime.now() v = 1.0 series_id = 'foo' key = 'bar' d = DataPoint.from_data(t, v, series_id, key) self.assertEquals(d.v, 1.0) self.assertEquals(d.id, 'foo') self.assertEquals(d.key, 'bar') def test_data_point_from_data_with_tz(self): t = '2013-12-18T00:00:00' v = 1.0 series_id = 'foo' key = 'bar' d = DataPoint.from_data(t, v, series_id, key, tz='US/Eastern') j = d.to_dictionary() self.assertEquals(j['t'], '2013-12-18T00:00:00-05:00') self.assertEquals(d.v, 1.0) self.assertEquals(d.id, 'foo') self.assertEquals(d.key, 'bar') def test_data_point_from_data_invalid(self): t = datetime.datetime.now() v = '1.0aas' series_id = 'foo' key = 'bar' self.assertRaises(ValueError, DataPoint.from_data, t, v, series_id, key) def test_data_point_from_json(self): d = {'t': '1', 'v': 1.0} d = DataPoint(d, None) self.assertEquals(d.v, 1.0) def test_data_point_from_json_with_optional_params(self): d = {'t': '1', 'v': 1.0, 'key': 'foo', 'id': 'bar'} d = DataPoint(d, None) self.assertEquals(d.v, 1.0) self.assertEquals(d.key, 'foo') self.assertEquals(d.id, 'bar') def test_data_point_to_json(self): d = {'t': '2013-12-18T00:00:00', 'v': 1.0} d = DataPoint(d, None) j = json.loads(d.to_json()) self.assertEquals(j['t'], '2013-12-18T00:00:00') self.assertEquals(j['v'], 1.0) def test_data_point_to_json_with_tz(self): d = {'t': '2013-12-18T00:00:00', 'v': 1.0} d = DataPoint(d, None, tz='US/Eastern') j = json.loads(d.to_json()) self.assertEquals(j['t'], '2013-12-18T00:00:00-05:00') self.assertEquals(j['v'], 1.0) def test_data_point_to_json_with_optional_params(self): d = {'t': '2013-12-18T00:00:00', 'v': 1.0, 'key': 'foo', 'id': 'bar'} d = DataPoint(d, None) j = json.loads(d.to_json()) self.assertEquals(j['t'], '2013-12-18T00:00:00') self.assertEquals(j['v'], 1.0) self.assertEquals(j['key'], 'foo') self.assertEquals(j['id'], 'bar') def test_data_point_to_dictionary(self): d = {'t': '2013-12-18T00:00:00', 'v': 1.0} d = DataPoint(d, None) j = d.to_dictionary() self.assertEquals(j['t'], '2013-12-18T00:00:00') self.assertEquals(j['v'], 1.0) def test_data_point_to_dictionary_with_tz(self): d = {'t': '2013-12-18T00:00:00', 'v': 1.0} d = DataPoint(d, None, tz='US/Eastern') j = d.to_dictionary() self.assertEquals(j['t'], '2013-12-18T00:00:00-05:00') self.assertEquals(j['v'], 1.0) def test_data_point_to_dictionary_with_optional_params(self): d = {'t': '2013-12-18T00:00:00', 'v': 1.0, 'key': 'foo', 'id': 'bar'} d = DataPoint(d, None) j = d.to_dictionary() self.assertEquals(j['t'], '2013-12-18T00:00:00') self.assertEquals(j['v'], 1.0) self.assertEquals(j['key'], 'foo') self.assertEquals(j['id'], 'bar') def test_data_point_found_to_dictionary(self): d = {'found': {'t': '2013-12-18T00:00:00', 'v': 1.0}, 'interval': {'start': '2013-12-01T00:00:00', 'end': '2013-12-31T23:59:59'}} d = DataPointFound(d, None) j = d.to_dictionary() self.assertEquals(j['found']['t'], '2013-12-18T00:00:00') self.assertEquals(j['found']['v'], 1.0) self.assertEquals(j['interval']['start'], '2013-12-01T00:00:00') self.assertEquals(j['interval']['end'], '2013-12-31T23:59:59') def test_data_point_found_to_dictionary_with_tz(self): d = {'found': {'t': '2013-12-18T00:00:00', 'v': 1.0}, 'interval': {'start': '2013-12-01T00:00:00', 'end': '2013-12-31T23:59:59'}} d = DataPointFound(d, None, tz='US/Eastern') j = d.to_dictionary() self.assertEquals(j['found']['t'], '2013-12-18T00:00:00-05:00') self.assertEquals(j['found']['v'], 1.0) self.assertEquals(j['interval']['start'], '2013-12-01T00:00:00-05:00') self.assertEquals(j['interval']['end'], '2013-12-31T23:59:59-05:00') def test_data_point_found_to_json(self): d = {'found': {'t': '2013-12-18T00:00:00', 'v': 1.0}, 'interval': {'start': '2013-12-01T00:00:00', 'end': '2013-12-31T23:59:59'}} df = DataPointFound(d, None) j = df.to_json() self.assertEquals(j, json.dumps(d)) def test_multi_point_with_tz(self): d = {'t': '2013-12-18T00:00:00', 'v': {'foo': 1.0, 'bar': 3.0}} mp = MultiPoint(d, None, tz='US/Eastern') self.assertEquals(mp.t.isoformat(), '2013-12-18T00:00:00-05:00') def test_multi_point_get_valid_key(self): d = {'t': '2013-12-18T00:00:00', 'v': {'foo': 1.0, 'bar': 3.0}} mp = MultiPoint(d, None, tz='US/Eastern') self.assertEquals(mp.get('foo'), 1.0) def test_multi_point_get_invalid_key(self): d = {'t': '2013-12-18T00:00:00', 'v': {'foo': 1.0, 'bar': 3.0}} mp = MultiPoint(d, None, tz='US/Eastern') self.assertEquals(mp.get('baz'), None) def test_single_value(self): d = {"data": { "t": "2013-12-31T23:00:00.000Z", "v": 35.8872769971233 }, "series": { "attributes": { "project": "perftest1" }, "id": "fake", "key": "foo", "name": "", "tags": [ "subset" ] } } sv = SingleValue(d, None) self.assertEquals(sv.data.t.month, 12) self.assertEquals(sv.series.key, 'foo') def test_single_value_to_dictionary(self): d = {"data": { "t": "2013-12-31T23:00:00.000Z", "v": 35.8872769971233 }, "series": { "attributes": { "project": "perftest1" }, "id": "fake", "key": "foo", "name": "", "tags": [ "subset" ] } } sv = SingleValue(d, None) j = sv.to_dictionary() self.assertEquals(j['data']['t'], '2013-12-31T23:00:00+00:00') self.assertEquals(j['series']['key'], 'foo') def test_single_value_to_json(self): d = {"data": { "t": "2013-12-31T23:00:00.000Z", "v": 35.8872769971233 }, "series": { "attributes": { "project": "perftest1" }, "id": "fake", "key": "foo", "name": "", "tags": [ "subset" ] } } sv = SingleValue(d, None) j = sv.to_json() dj = json.loads(j) #these are serialized differently or not at all del d['series']['id'] d['data']['t'] = '2013-12-31T23:00:00+00:00' d1 = json.loads(json.dumps(d)) self.assertEqual(dj, d1) def test_series_summary(self): d = {"series": {"id": "foo", "key": "stuff", "name": "", "tags": [], "attributes": {}}, "tz": "UTC", "end": "2012-01-02T00:00:00.000Z", "start": "2012-01-01T00:00:00.000Z", "summary": {"count": 1440, "mean": 24.81055812507774, "min": 0.05106735242182414, "max": 49.96047239524747, "stddev": 14.518747713268956, "sum": 35727.203700111946} } ss = SeriesSummary(d, None) self.assertEquals(ss.series.key, 'stuff') self.assertEquals(ss.summary.count, 1440) def test_series_summary_to_dictionary(self): d = {"series": {"id": "foo", "key": "stuff", "name": "", "tags": [], "attributes": {}}, "tz": "UTC", "end": "2012-01-02T00:00:00.000Z", "start": "2012-01-01T00:00:00.000Z", "summary": {"count": 1440, "mean": 24.81055812507774, "min": 0.05106735242182414, "max": 49.96047239524747, "stddev": 14.518747713268956, "sum": 35727.203700111946} } ss = SeriesSummary(d, None) di = ss.to_dictionary() self.assertEquals(di['series']['key'], 'stuff') self.assertEquals(di['summary']['count'], 1440) def test_series_summary_to_json(self): d = {"series": {"id": "foo", "key": "stuff", "name": "", "tags": [], "attributes": {}}, "tz": "UTC", "end": "2012-01-02T00:00:00.000Z", "start": "2012-01-01T00:00:00.000Z", "summary": {"count": 1440, "mean": 24.81055812507774, "min": 0.05106735242182414, "max": 49.96047239524747, "stddev": 14.518747713268956, "sum": 35727.203700111946} } ss = SeriesSummary(d, None) j = ss.to_json() dj = json.loads(j) d['start'] = '2012-01-01T00:00:00+00:00' d['end'] = '2012-01-02T00:00:00+00:00' del d['series']['id'] self.maxDiff = None self.assertEqual(dj, d)
35.92
78
0.50514
1,395
11,674
4.103226
0.091756
0.142558
0.089099
0.052236
0.871419
0.821803
0.766597
0.70283
0.672956
0.658805
0
0.140375
0.324482
11,674
324
79
36.030864
0.585468
0.00394
0
0.642612
0
0
0.165133
0.042229
0
0
0
0
0.189003
1
0.09622
false
0
0.020619
0
0.120275
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
495a39f9f68cdf16942e649d6dd19a9774e4ba96
23
py
Python
login.py
fuguobin/flask01
37ef242b8ec0690c52a947ed3d257bb9c53a091b
[ "MIT" ]
1
2019-07-02T12:42:42.000Z
2019-07-02T12:42:42.000Z
login.py
fuguobin/flask01
37ef242b8ec0690c52a947ed3d257bb9c53a091b
[ "MIT" ]
null
null
null
login.py
fuguobin/flask01
37ef242b8ec0690c52a947ed3d257bb9c53a091b
[ "MIT" ]
null
null
null
num1 = 10 num2 = 333
5.75
11
0.565217
4
23
3.25
1
0
0
0
0
0
0
0
0
0
0
0.466667
0.347826
23
3
12
7.666667
0.4
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
495f5a8c9a33beb6d07345806ca13c6d1079c656
92
py
Python
models/__init__.py
Pavelrst/ScopeFlow
fb7780eef118e2ecf2de839c5b15d7f3d99eb8ec
[ "Apache-2.0" ]
null
null
null
models/__init__.py
Pavelrst/ScopeFlow
fb7780eef118e2ecf2de839c5b15d7f3d99eb8ec
[ "Apache-2.0" ]
null
null
null
models/__init__.py
Pavelrst/ScopeFlow
fb7780eef118e2ecf2de839c5b15d7f3d99eb8ec
[ "Apache-2.0" ]
null
null
null
from . import IRR_PWC_V2 from . import raft IRR_PWC_V2 = IRR_PWC_V2.PWCNet raft = raft.RAFT
18.4
30
0.782609
18
92
3.666667
0.388889
0.272727
0.363636
0
0
0
0
0
0
0
0
0.038462
0.152174
92
5
31
18.4
0.807692
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
b8fe6519b8dd691e2ae6ef17ad7ac9f0896c930a
116
py
Python
blog/blogp/admin.py
prashantsagar73/blogapp
98e812295c090f8b05e6d822d0175a77b8aa9899
[ "MIT" ]
1
2021-11-15T14:47:32.000Z
2021-11-15T14:47:32.000Z
blog/blogp/admin.py
prashantsagar73/blogapp
98e812295c090f8b05e6d822d0175a77b8aa9899
[ "MIT" ]
1
2021-05-31T18:43:11.000Z
2021-05-31T18:43:11.000Z
blog/blogp/admin.py
prashantsagar73/blogapp
98e812295c090f8b05e6d822d0175a77b8aa9899
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import post # Register your models here. admin.site.register((post))
23.2
32
0.784483
17
116
5.352941
0.647059
0
0
0
0
0
0
0
0
0
0
0
0.12931
116
5
33
23.2
0.90099
0.224138
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
91f4c8d98cbdb689f4a30839f21524746d62aaff
129
py
Python
profiles/admin.py
UB-ES-2021-A1/wannasell-backend
84360b2985fc28971867601373697f39303e396b
[ "Unlicense" ]
1
2017-08-03T01:40:12.000Z
2017-08-03T01:40:12.000Z
profiles/admin.py
sunilsm7/django_resto
b7698653093af7e6f26dd0d0c7b8d6046b402ea4
[ "MIT" ]
62
2021-11-22T21:52:44.000Z
2021-12-17T15:07:02.000Z
profiles/admin.py
sunilsm7/django_resto
b7698653093af7e6f26dd0d0c7b8d6046b402ea4
[ "MIT" ]
null
null
null
from django.contrib import admin from profiles.models import Profile # Register your models here. admin.site.register(Profile)
18.428571
35
0.813953
18
129
5.833333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.124031
129
6
36
21.5
0.929204
0.20155
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
6228cd0a4c8287ba1cac91197e0a8b141c246994
6,832
py
Python
tests/test_lm_filter.py
radinplaid/OpusFilter
e3ee0628d88ea5d632bda238049165a915adaaed
[ "MIT" ]
57
2020-02-15T00:41:26.000Z
2022-03-23T13:55:57.000Z
tests/test_lm_filter.py
radinplaid/OpusFilter
e3ee0628d88ea5d632bda238049165a915adaaed
[ "MIT" ]
26
2020-02-19T10:22:49.000Z
2022-02-28T07:17:09.000Z
tests/test_lm_filter.py
radinplaid/OpusFilter
e3ee0628d88ea5d632bda238049165a915adaaed
[ "MIT" ]
11
2020-05-21T02:02:24.000Z
2022-01-15T14:01:47.000Z
import argparse import logging import os import tempfile import unittest from opusfilter import lm try: import varikn except ImportError: logging.warning("Could not load varikn, language model filtering not supported") @unittest.skipIf('varikn' not in globals(), 'varikn package not installed') class TestLMFilter(unittest.TestCase): def setUp(self): self.lmdatafile1 = tempfile.mkstemp()[1] self.lmfile1 = tempfile.mkstemp()[1] with open(self.lmdatafile1, 'w') as lmdatafile: for line in range(10): lmdatafile.write('<s> <w> %s</s>\n' % ('a b <w> ' * (line + 1))) self.lmdatafile2 = tempfile.mkstemp()[1] self.lmfile2 = tempfile.mkstemp()[1] with open(self.lmdatafile2, 'w') as lmdatafile: for line in range(10): lmdatafile.write('<s> <w> %s</s>\n' % ('A B <w> ' * (line + 1))) lm.train(self.lmdatafile1, self.lmfile1) lm.train(self.lmdatafile2, self.lmfile2) logging.info(self.lmfile1) with open(self.lmfile1, 'r') as fobj: for line in fobj: logging.info(line.strip()) logging.info(self.lmfile2) with open(self.lmfile2, 'r') as fobj: for line in fobj: logging.info(line.strip()) def tearDown(self): os.remove(self.lmdatafile1) os.remove(self.lmfile1) os.remove(self.lmdatafile2) os.remove(self.lmfile2) def test_filter_entropy(self): src_lm_params = {'filename': self.lmfile1} tgt_lm_params = {'filename': self.lmfile2} cefilter = lm.CrossEntropyFilter( score_type='entropy', thresholds=[10, 10], diff_threshold=5, lm_params=[src_lm_params, tgt_lm_params]) inputs = [('ab', 'AB'), ('abbb abbb', 'AB'), ('ab', 'BAA'), ('abbb', 'BA'), ('abbb', 'AB')] scores = [] bools = [] for score in cefilter.score(inputs): scores.append(score) bools.append(cefilter.accept(score)) logging.info(scores) self.assertSequenceEqual(bools, [True, False, False, True, False]) def test_filter_entropy_low(self): src_lm_params = {'filename': self.lmfile1} tgt_lm_params = {'filename': self.lmfile2} cefilter = lm.CrossEntropyFilter( score_type='entropy', thresholds=[10, 10], low_thresholds=[2, 2], diff_threshold=5, lm_params=[src_lm_params, tgt_lm_params]) inputs = [('ab', 'AB'), ('abbb abbb', 'AB'), ('ab', 'BAA'), ('abbb', 'BA'), ('abbb', 'AB')] scores = [] bools = [] for score in cefilter.score(inputs): scores.append(score) bools.append(cefilter.accept(score)) logging.info(scores) self.assertSequenceEqual(bools, [False, False, False, True, False]) def test_filter_perplexity(self): src_lm_params = {'filename': self.lmfile1} tgt_lm_params = {'filename': self.lmfile2} cefilter = lm.CrossEntropyFilter( score_type='perplexity', thresholds=[1000, 1000], diff_threshold=100, lm_params=[src_lm_params, tgt_lm_params]) inputs = [('ab', 'AB'), ('abbb abbb', 'AB'), ('ab', 'BAA'), ('abbb', 'BA'), ('abbb', 'AB')] scores = [] bools = [] for score in cefilter.score(inputs): scores.append(score) bools.append(cefilter.accept(score)) logging.info(scores) self.assertSequenceEqual(bools, [True, False, False, False, False]) def test_filter_logprob(self): src_lm_params = {'filename': self.lmfile1} tgt_lm_params = {'filename': self.lmfile2} cefilter = lm.CrossEntropyFilter( score_type='logprob', thresholds=[20, 20], diff_threshold=5, lm_params=[src_lm_params, tgt_lm_params]) inputs = [('ab', 'AB'), ('abbb abbb', 'AB'), ('ab', 'BAA'), ('abbb', 'BA'), ('abbb', 'AB')] scores = [] bools = [] for score in cefilter.score(inputs): scores.append(score) bools.append(cefilter.accept(score)) logging.info(scores) self.assertSequenceEqual(bools, [True, False, False, True, False]) def test_filter_empty_default(self): src_lm_params = {'filename': self.lmfile1} tgt_lm_params = {'filename': self.lmfile2} cefilter = lm.CrossEntropyFilter( score_type='entropy', thresholds=[3, 3], diff_threshold=5, lm_params=[src_lm_params, tgt_lm_params]) inputs = [('ab', 'AB'), ('', '')] scores = [] bools = [] for score in cefilter.score(inputs): scores.append(score) bools.append(cefilter.accept(score)) logging.info(scores) self.assertSequenceEqual(bools, [True, False]) def test_filter_empty_pass(self): src_lm_params = {'filename': self.lmfile1} tgt_lm_params = {'filename': self.lmfile2} cefilter = lm.CrossEntropyFilter( score_type='entropy', thresholds=[3, 3], diff_threshold=5, score_for_empty=0, lm_params=[src_lm_params, tgt_lm_params]) inputs = [('ab', 'AB'), ('', '')] scores = [] bools = [] for score in cefilter.score(inputs): scores.append(score) bools.append(cefilter.accept(score)) logging.info(scores) self.assertSequenceEqual(bools, [True, True]) def test_filter_entropy_difference(self): id_lm_params = [{'filename': self.lmfile1}] nd_lm_params = [{'filename': self.lmfile2}] cefilter = lm.CrossEntropyDifferenceFilter( id_lm_params=id_lm_params, nd_lm_params=nd_lm_params, thresholds=[0, 0], pass_empty=False) inputs = [('ab',), ('ab ab',), ('Ab ab',), ('Ab Ab',), ('aB Ab',), ('AB',), ('',)] scores = [] bools = [] for score in cefilter.score(inputs): scores.append(score) bools.append(cefilter.accept(score)) logging.info(scores) self.assertSequenceEqual(bools, [True, True, True, False, False, False, False]) def test_filter_entropy_difference_pass_empty(self): id_lm_params = [{'filename': self.lmfile1}] nd_lm_params = [{'filename': self.lmfile2}] cefilter = lm.CrossEntropyDifferenceFilter( id_lm_params=id_lm_params, nd_lm_params=nd_lm_params, thresholds=[0, 0], score_for_empty=-1) inputs = [('ab',), ('AB',), ('',)] scores = [] bools = [] for score in cefilter.score(inputs): scores.append(score) bools.append(cefilter.accept(score)) logging.info(scores) self.assertSequenceEqual(bools, [True, False, True])
39.72093
99
0.583577
776
6,832
4.984536
0.131443
0.086867
0.066184
0.08273
0.784126
0.770165
0.749741
0.741468
0.725957
0.72182
0
0.016834
0.269614
6,832
171
100
39.953216
0.758317
0
0
0.628205
0
0
0.070853
0
0
0
0
0
0.051282
1
0.064103
false
0.019231
0.051282
0
0.121795
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
6230deb4bd6cac2a3b4068b1b9ea2a74d765d9e1
2,484
py
Python
memberportal/access/urls.py
kodaxx/MemberMatters
880655bb3201441985a88a2f7750ad65cc781052
[ "MIT" ]
18
2020-02-03T12:38:53.000Z
2022-02-08T00:44:35.000Z
memberportal/access/urls.py
kodaxx/MemberMatters
880655bb3201441985a88a2f7750ad65cc781052
[ "MIT" ]
111
2020-02-02T05:02:01.000Z
2022-03-28T04:46:27.000Z
memberportal/access/urls.py
kodaxx/MemberMatters
880655bb3201441985a88a2f7750ad65cc781052
[ "MIT" ]
15
2020-02-03T11:03:30.000Z
2021-12-05T00:33:02.000Z
from django.urls import path from . import views urlpatterns = [ path("api/door/<int:door_id>/unlock/", views.bump_door, name="bump_door"), path("api/door/<int:door_id>/reboot/", views.reboot_door, name="reboot_door"), path( "api/door/<int:door_id>/check/<int:rfid_code>/", views.check_door_access, name="check_access", ), path( "api/door/check/<int:rfid_code>/", views.check_door_access, name="check_access" ), path( "api/door/<int:door>/authorised/", views.authorised_door_tags, name="authorised_tags", ), path("api/door/authorised/", views.authorised_door_tags, name="authorised_tags"), path("api/door/<int:door>/checkin/", views.door_checkin, name="door_checkin"), path("api/door/checkin/", views.door_checkin, name="door_checkin"), path( "api/door/reset-default-access", views.reset_default_door_access, name="reset_default_access", ), path( "api/interlock/<int:interlock_id>/check/<int:rfid_code>/", views.check_interlock_access, name="check_interlock_access", ), path( "api/interlock/check/<int:rfid_code>/", views.check_interlock_access, name="check_interlock_access", ), path( "api/interlock/session/<uuid:session_id>/heartbeat/", views.check_interlock_access, name="check_interlock_access", ), path( "api/interlock/session/<uuid:session_id>/end/", views.end_interlock_session, name="end_interlock_session", ), path( "api/interlock/session/<uuid:session_id>/end/<int:rfid>/", views.end_interlock_session, name="end_interlock_session", ), path( "api/interlock/<int:interlock>/checkin/", views.interlock_checkin, name="interlock_checkin", ), path("api/interlock/checkin/", views.interlock_checkin, name="interlock_checkin"), path( "api/interlock/authorised/", views.authorised_interlock_tags, name="authorised_interlock_tags", ), path( "api/interlock/<int:interlock>/authorised/", views.authorised_interlock_tags, name="authorised_interlock_tags", ), path( "api/interlock/reset-default-access/", views.reset_default_interlock_access, name="reset_default_interlock_access", ), path("cron/interlock/", views.interlock_cron, name="interlock_cron"), ]
32.684211
87
0.640499
283
2,484
5.353357
0.106007
0.087789
0.105611
0.046205
0.832343
0.805941
0.746535
0.713531
0.69637
0.69637
0
0
0.212158
2,484
75
88
33.12
0.774144
0
0
0.540541
0
0
0.415056
0.327295
0
0
0
0
0
1
0
false
0
0.027027
0
0.027027
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
62315b3f00e084152d5031ee470a7ec6baea9c1b
73
py
Python
tests/src/TNB/mklaren/__init__.py
bellwethers-in-se/issueCloseTime
e5e00c9625da0793dc8e7985fd88b0ca0b35f7d3
[ "MIT" ]
9
2017-07-27T10:32:48.000Z
2021-07-01T11:51:51.000Z
tests/src/TNB/mklaren/__init__.py
bellwethers-in-se/issueCloseTime
e5e00c9625da0793dc8e7985fd88b0ca0b35f7d3
[ "MIT" ]
11
2016-03-15T16:27:47.000Z
2019-09-05T02:25:08.000Z
tests/src/TNB/mklaren/__init__.py
bellwethers-in-se/issueCloseTime
e5e00c9625da0793dc8e7985fd88b0ca0b35f7d3
[ "MIT" ]
5
2017-01-28T22:45:34.000Z
2019-12-04T13:15:10.000Z
import kernel import mkl import projection import regression import util
12.166667
17
0.863014
10
73
6.3
0.6
0
0
0
0
0
0
0
0
0
0
0
0.136986
73
5
18
14.6
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
62499a6487cbe6c7bcbf7d2b96723aba19fc0a10
55
py
Python
enthought/pyface/workbench/i_editor.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
3
2016-12-09T06:05:18.000Z
2018-03-01T13:00:29.000Z
enthought/pyface/workbench/i_editor.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
1
2020-12-02T00:51:32.000Z
2020-12-02T08:48:55.000Z
enthought/pyface/workbench/i_editor.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
null
null
null
# proxy module from pyface.workbench.i_editor import *
18.333333
39
0.8
8
55
5.375
1
0
0
0
0
0
0
0
0
0
0
0
0.127273
55
2
40
27.5
0.895833
0.218182
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
62879c91d0f864dc16c6c092e14ab623fc94ca67
4,931
py
Python
tests/unit/language/ast/test_inline_fragment.py
matt-koevort/tartiflette
5777866b133d846ce4f8aa03f735fa81832896cd
[ "MIT" ]
530
2019-06-04T11:45:36.000Z
2022-03-31T09:29:56.000Z
tests/unit/language/ast/test_inline_fragment.py
matt-koevort/tartiflette
5777866b133d846ce4f8aa03f735fa81832896cd
[ "MIT" ]
242
2019-06-04T11:53:08.000Z
2022-03-28T07:06:27.000Z
tests/unit/language/ast/test_inline_fragment.py
matt-koevort/tartiflette
5777866b133d846ce4f8aa03f735fa81832896cd
[ "MIT" ]
36
2019-06-21T06:40:27.000Z
2021-11-04T13:11:16.000Z
import pytest from tartiflette.language.ast import InlineFragmentNode def test_inlinefragmentnode__init__(): inline_fragment_node = InlineFragmentNode( selection_set="inlineFragmentSelectionSet", type_condition="inlineFragmentTypeCondition", directives="inlineFragmentDirectives", location="inlineFragmentLocation", ) assert inline_fragment_node.selection_set == "inlineFragmentSelectionSet" assert inline_fragment_node.type_condition == "inlineFragmentTypeCondition" assert inline_fragment_node.directives == "inlineFragmentDirectives" assert inline_fragment_node.location == "inlineFragmentLocation" @pytest.mark.parametrize( "inline_fragment_node,other,expected", [ ( InlineFragmentNode( selection_set="inlineFragmentSelectionSet", type_condition="inlineFragmentTypeCondition", directives="inlineFragmentDirectives", location="inlineFragmentLocation", ), Ellipsis, False, ), ( InlineFragmentNode( selection_set="inlineFragmentSelectionSet", type_condition="inlineFragmentTypeCondition", directives="inlineFragmentDirectives", location="inlineFragmentLocation", ), InlineFragmentNode( selection_set="inlineFragmentSelectionSetBis", type_condition="inlineFragmentTypeCondition", directives="inlineFragmentDirectives", location="inlineFragmentLocation", ), False, ), ( InlineFragmentNode( selection_set="inlineFragmentSelectionSet", type_condition="inlineFragmentTypeCondition", directives="inlineFragmentDirectives", location="inlineFragmentLocation", ), InlineFragmentNode( selection_set="inlineFragmentSelectionSet", type_condition="inlineFragmentTypeConditionBis", directives="inlineFragmentDirectives", location="inlineFragmentLocation", ), False, ), ( InlineFragmentNode( selection_set="inlineFragmentSelectionSet", type_condition="inlineFragmentTypeCondition", directives="inlineFragmentDirectives", location="inlineFragmentLocation", ), InlineFragmentNode( selection_set="inlineFragmentSelectionSet", type_condition="inlineFragmentTypeCondition", directives="inlineFragmentDirectivesBis", location="inlineFragmentLocation", ), False, ), ( InlineFragmentNode( selection_set="inlineFragmentSelectionSet", type_condition="inlineFragmentTypeCondition", directives="inlineFragmentDirectives", location="inlineFragmentLocation", ), InlineFragmentNode( selection_set="inlineFragmentSelectionSet", type_condition="inlineFragmentTypeCondition", directives="inlineFragmentDirectives", location="inlineFragmentLocationBis", ), False, ), ( InlineFragmentNode( selection_set="inlineFragmentSelectionSet", type_condition="inlineFragmentTypeCondition", directives="inlineFragmentDirectives", location="inlineFragmentLocation", ), InlineFragmentNode( selection_set="inlineFragmentSelectionSet", type_condition="inlineFragmentTypeCondition", directives="inlineFragmentDirectives", location="inlineFragmentLocation", ), True, ), ], ) def test_inlinefragmentnode__eq__(inline_fragment_node, other, expected): assert (inline_fragment_node == other) is expected @pytest.mark.parametrize( "inline_fragment_node,expected", [ ( InlineFragmentNode( selection_set="inlineFragmentSelectionSet", type_condition="inlineFragmentTypeCondition", directives="inlineFragmentDirectives", location="inlineFragmentLocation", ), "InlineFragmentNode(" "type_condition='inlineFragmentTypeCondition', " "directives='inlineFragmentDirectives', " "selection_set='inlineFragmentSelectionSet', " "location='inlineFragmentLocation')", ) ], ) def test_inlinefragmentnode__repr__(inline_fragment_node, expected): assert inline_fragment_node.__repr__() == expected
37.075188
79
0.607179
247
4,931
11.834008
0.153846
0.061581
0.182005
0.222374
0.781389
0.724598
0.697913
0.684229
0.684229
0.684229
0
0
0.317785
4,931
132
80
37.356061
0.868906
0
0
0.696
0
0
0.333401
0.328939
0
0
0
0
0.048
1
0.024
false
0
0.016
0
0.04
0
0
0
1
null
0
1
1
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
6572d1b85151aa63e3adbd544f1e465c7751da6b
103
py
Python
src/__init__.py
mjarsma/player-data-gen
170bf1bfe136dc4cf06be2ea1ddb1e8498201974
[ "MIT" ]
null
null
null
src/__init__.py
mjarsma/player-data-gen
170bf1bfe136dc4cf06be2ea1ddb1e8498201974
[ "MIT" ]
null
null
null
src/__init__.py
mjarsma/player-data-gen
170bf1bfe136dc4cf06be2ea1ddb1e8498201974
[ "MIT" ]
null
null
null
from src.generate_player_data import Player from src.db import connect __all__ = ['Player', 'connect']
25.75
43
0.786408
15
103
5
0.6
0.186667
0
0
0
0
0
0
0
0
0
0
0.116505
103
4
44
25.75
0.824176
0
0
0
1
0
0.125
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
1
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
65b0e5309015789bd7418a4474cfc32b0ebb33b5
82
py
Python
src/PDMS/setup.py
Berni1557/PDMSPython
4b5f3e7d0c37906fcd72f90814ec82fceedb705c
[ "BSD-3-Clause" ]
null
null
null
src/PDMS/setup.py
Berni1557/PDMSPython
4b5f3e7d0c37906fcd72f90814ec82fceedb705c
[ "BSD-3-Clause" ]
null
null
null
src/PDMS/setup.py
Berni1557/PDMSPython
4b5f3e7d0c37906fcd72f90814ec82fceedb705c
[ "BSD-3-Clause" ]
null
null
null
from distutils.core import setup import py2exe setup(console=['main_search.py'])
27.333333
33
0.792683
12
82
5.333333
0.833333
0
0
0
0
0
0
0
0
0
0
0.013514
0.097561
82
3
34
27.333333
0.851351
0
0
0
0
0
0.17284
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
65dfff9e1ddc7834219b02071f1787e974631193
24
py
Python
docassemble/juvenilesealing/__init__.py
berit/docassemble-juvenilesealing
001e17f838b84193ea019f6d04e7927bb746c630
[ "MIT" ]
null
null
null
docassemble/juvenilesealing/__init__.py
berit/docassemble-juvenilesealing
001e17f838b84193ea019f6d04e7927bb746c630
[ "MIT" ]
null
null
null
docassemble/juvenilesealing/__init__.py
berit/docassemble-juvenilesealing
001e17f838b84193ea019f6d04e7927bb746c630
[ "MIT" ]
null
null
null
__version__ = '0.0.107'
12
23
0.666667
4
24
3
0.75
0
0
0
0
0
0
0
0
0
0
0.238095
0.125
24
1
24
24
0.333333
0
0
0
0
0
0.291667
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
65e2113ba2cd51473d99f063ac64470133e661ee
5,321
py
Python
modules/case/generator.py
naskya/testcase-generator
02765184a275152e1d8c177f2028ca8db315cfee
[ "MIT" ]
4
2020-09-23T07:11:41.000Z
2022-02-02T09:08:21.000Z
modules/case/generator.py
naskya/testcase-generator
02765184a275152e1d8c177f2028ca8db315cfee
[ "MIT" ]
5
2021-08-29T18:23:01.000Z
2021-11-20T03:53:19.000Z
modules/case/generator.py
naskya/testcase-generator
02765184a275152e1d8c177f2028ca8db315cfee
[ "MIT" ]
null
null
null
from __future__ import annotations from modules.utility.exit_failure import exit_failure from modules.utility.printer import error from modules.variable.definition import ( Graph, Number, NumberArray, NumberMatrix, String, StringArray, Variable ) def generate_case(variables: dict[str, Variable], generated_values: list[list], format: list[list[str]]) -> str: result = '' for line in format: number_of_rows = -1 # determine the number of rows for variable_name in line: if variable_name in variables: if isinstance(variables[variable_name], (NumberArray, StringArray)): if variables[variable_name].is_printed_horizontally: if number_of_rows == -1: number_of_rows = 1 elif number_of_rows != 1: error(f'The number of rows in {", ".join(line)} do not match.') exit_failure() else: if number_of_rows == -1: number_of_rows = len(generated_values[variables[variable_name].id]) elif number_of_rows != len(generated_values[variables[variable_name].id]): error(f'The number of rows in {", ".join(line)} do not match.') exit_failure() else: if number_of_rows == -1: number_of_rows = len(generated_values[variables[variable_name].id]) elif number_of_rows != len(generated_values[variables[variable_name].id]): error(f'The number of rows in {", ".join(line)} do not match.') exit_failure() if number_of_rows == -1: number_of_rows = 1 # format for i in range(number_of_rows): for variable_name in line: if variable_name in variables: if isinstance(variables[variable_name], Number): if variables[variable_name].float_digits == 0: result += f'{generated_values[variables[variable_name].id][0]} ' else: d = variables[variable_name].float_digits result += f'{generated_values[variables[variable_name].id][0]:.{d}f} ' elif isinstance(variables[variable_name], String): result += f'{"".join(generated_values[variables[variable_name].id][0])} ' elif isinstance(variables[variable_name], NumberArray): if variables[variable_name].element.float_digits == 0: if variables[variable_name].is_printed_horizontally: result += ' '.join(map(str, generated_values[variables[variable_name].id])) result += ' ' else: result += f'{generated_values[variables[variable_name].id][i]} ' else: d = variables[variable_name].element.float_digits if variables[variable_name].is_printed_horizontally: result += ' '.join(map(lambda x: f'{x:.{d}f}', generated_values[variables[variable_name].id])) result += ' ' else: result += f'{generated_values[variables[variable_name].id][i]:.{d}f} ' elif isinstance(variables[variable_name], StringArray): if variables[variable_name].is_printed_horizontally: for s_i_as_list_of_char in generated_values[variables[variable_name].id]: result += ''.join(s_i_as_list_of_char) result += ' ' else: result += f'{"".join(generated_values[variables[variable_name].id][i])} ' elif isinstance(variables[variable_name], NumberMatrix): if variables[variable_name].element.float_digits == 0: result += ' '.join(map(str, generated_values[variables[variable_name].id][i])) result += ' ' else: d = variables[variable_name].element.float_digits result += ' '.join(map(lambda x: f'{x:.{d}f}', generated_values[variables[variable_name].id][i])) result += ' ' elif isinstance(variables[variable_name], Graph): u, v = generated_values[variables[variable_name].id][i] result += f'{u} {v} ' else: result += ' '.join(map(str, generated_values[variables[variable_name].id])) result += ' ' else: result += f'{variable_name} ' if (len(result) > 0) and (result[-1] == ' '): result = result[:-1] + '\n' else: result += '\n' return result
51.163462
126
0.496711
512
5,321
4.933594
0.136719
0.185273
0.28266
0.21536
0.803642
0.726049
0.714964
0.667458
0.532462
0.435075
0
0.005344
0.40218
5,321
103
127
51.660194
0.788746
0.006578
0
0.51087
0
0
0.104675
0.062465
0
0
0
0
0
1
0.01087
false
0
0.043478
0
0.065217
0.054348
0
0
0
null
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
02af440b5545462d1c02d22ca2c83e95fb42da2a
302
py
Python
python/sklk_widgets/__init__.py
skylarkwireless/sklk-demos
9de3c05377f46576186a61035497fcf2a2ced324
[ "Apache-2.0" ]
2
2019-05-12T02:57:58.000Z
2021-06-18T08:54:59.000Z
python/sklk_widgets/__init__.py
skylarkwireless/sklk-demos
9de3c05377f46576186a61035497fcf2a2ced324
[ "Apache-2.0" ]
null
null
null
python/sklk_widgets/__init__.py
skylarkwireless/sklk-demos
9de3c05377f46576186a61035497fcf2a2ced324
[ "Apache-2.0" ]
3
2020-04-13T21:16:07.000Z
2021-03-24T17:52:39.000Z
from . DeviceSelectionDialog import DeviceSelectionDialog from . FreqEntryWidget import FreqEntryWidget from . LineEditCustom import LineEditCustom from . StringValueComboBox import StringValueComboBox from . ArbitrarySettingsWidget import ArbitrarySettingsWidget from . LogPowerFFT import LogPowerFFT
43.142857
61
0.880795
24
302
11.083333
0.333333
0
0
0
0
0
0
0
0
0
0
0
0.099338
302
6
62
50.333333
0.977941
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
02c07f02854a6c60a6ceb898af77a508d3f4a816
175
py
Python
src/backend/common/firebase.py
guineawheek/ftc-data-take-2
337bff2077eadb3bd6bbebd153cbb6181c99516f
[ "MIT" ]
266
2015-01-04T00:10:48.000Z
2022-03-28T18:42:05.000Z
src/backend/common/firebase.py
guineawheek/ftc-data-take-2
337bff2077eadb3bd6bbebd153cbb6181c99516f
[ "MIT" ]
2,673
2015-01-01T20:14:33.000Z
2022-03-31T18:17:16.000Z
src/backend/common/firebase.py
guineawheek/ftc-data-take-2
337bff2077eadb3bd6bbebd153cbb6181c99516f
[ "MIT" ]
230
2015-01-04T00:10:48.000Z
2022-03-26T18:12:04.000Z
import firebase_admin def app() -> firebase_admin.App: try: return firebase_admin.get_app() except Exception: return firebase_admin.initialize_app()
19.444444
46
0.697143
21
175
5.52381
0.52381
0.448276
0.327586
0
0
0
0
0
0
0
0
0
0.222857
175
8
47
21.875
0.852941
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
true
0
0.166667
0
0.666667
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
02d6725bc5a132764bead0abac6a770723c57bb9
101
py
Python
src/pyProtein/__init__.py
AlexanderSouthan/pyProtein
868e26a6d8fa7cfa863fe510e60e6fb5d904cd44
[ "MIT" ]
null
null
null
src/pyProtein/__init__.py
AlexanderSouthan/pyProtein
868e26a6d8fa7cfa863fe510e60e6fb5d904cd44
[ "MIT" ]
null
null
null
src/pyProtein/__init__.py
AlexanderSouthan/pyProtein
868e26a6d8fa7cfa863fe510e60e6fb5d904cd44
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from .protein import protein from .amino_acid_properties import amino_acids
20.2
46
0.752475
14
101
5.214286
0.714286
0
0
0
0
0
0
0
0
0
0
0.011494
0.138614
101
4
47
25.25
0.827586
0.207921
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
02fc2e28bed15712b304ba251e4eb7f046b6fb44
63
py
Python
zstackwoodpecker/zstackwoodpecker/header/header.py
hyhhui/zstack-woodpecker
ac36ae033cc521e2f877763de3ff55e4762e3ae0
[ "Apache-2.0" ]
null
null
null
zstackwoodpecker/zstackwoodpecker/header/header.py
hyhhui/zstack-woodpecker
ac36ae033cc521e2f877763de3ff55e4762e3ae0
[ "Apache-2.0" ]
null
null
null
zstackwoodpecker/zstackwoodpecker/header/header.py
hyhhui/zstack-woodpecker
ac36ae033cc521e2f877763de3ff55e4762e3ae0
[ "Apache-2.0" ]
2
2020-03-12T03:11:28.000Z
2021-07-26T01:57:58.000Z
class ZstackObject(object): def update(self): pass
15.75
27
0.634921
7
63
5.714286
1
0
0
0
0
0
0
0
0
0
0
0
0.269841
63
3
28
21
0.869565
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0.333333
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
1
0
0
1
0
0
5
f310cd98901a16073acc70b6e8e2bbadd4789284
29
py
Python
common_utils/adv_file_utils/__init__.py
cm107/common_utils
4b911efe9f8cdec16ecb2a983e16f772be05076c
[ "MIT" ]
null
null
null
common_utils/adv_file_utils/__init__.py
cm107/common_utils
4b911efe9f8cdec16ecb2a983e16f772be05076c
[ "MIT" ]
null
null
null
common_utils/adv_file_utils/__init__.py
cm107/common_utils
4b911efe9f8cdec16ecb2a983e16f772be05076c
[ "MIT" ]
null
null
null
from .adv_file_utils import *
29
29
0.827586
5
29
4.4
1
0
0
0
0
0
0
0
0
0
0
0
0.103448
29
1
29
29
0.846154
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
b82d58c67e7a25abe0a5d8d84a279fc8a7680d83
2,021
py
Python
tests/test_batch/test_batch_tags_job_definition.py
symroe/moto
4e106995af6f2820273528fca8a4e9ee288690a5
[ "Apache-2.0" ]
null
null
null
tests/test_batch/test_batch_tags_job_definition.py
symroe/moto
4e106995af6f2820273528fca8a4e9ee288690a5
[ "Apache-2.0" ]
1
2022-03-07T07:39:03.000Z
2022-03-07T07:39:03.000Z
tests/test_batch/test_batch_tags_job_definition.py
symroe/moto
4e106995af6f2820273528fca8a4e9ee288690a5
[ "Apache-2.0" ]
null
null
null
from . import _get_clients import sure # noqa # pylint: disable=unused-import from moto import mock_batch from uuid import uuid4 container_properties = { "image": "busybox", "command": ["sleep", "1"], "memory": 128, "vcpus": 1, } @mock_batch def test_list_tags_with_job_definition(): _, _, _, _, batch_client = _get_clients() definition_name = str(uuid4())[0:6] job_def_arn = batch_client.register_job_definition( jobDefinitionName=definition_name, type="container", containerProperties=container_properties, tags={"foo": "123", "bar": "456"}, )["jobDefinitionArn"] my_queue = batch_client.list_tags_for_resource(resourceArn=job_def_arn) my_queue.should.have.key("tags").equals({"foo": "123", "bar": "456"}) @mock_batch def test_tag_job_definition(): _, _, _, _, batch_client = _get_clients() definition_name = str(uuid4())[0:6] job_def_arn = batch_client.register_job_definition( jobDefinitionName=definition_name, type="container", containerProperties=container_properties, )["jobDefinitionArn"] batch_client.tag_resource(resourceArn=job_def_arn, tags={"k1": "v1", "k2": "v2"}) my_queue = batch_client.list_tags_for_resource(resourceArn=job_def_arn) my_queue.should.have.key("tags").equals({"k1": "v1", "k2": "v2"}) @mock_batch def test_untag_job_queue(): _, _, _, _, batch_client = _get_clients() definition_name = str(uuid4())[0:6] job_def_arn = batch_client.register_job_definition( jobDefinitionName=definition_name, type="container", containerProperties=container_properties, tags={"k1": "v1", "k2": "v2"}, )["jobDefinitionArn"] batch_client.tag_resource(resourceArn=job_def_arn, tags={"k3": "v3"}) batch_client.untag_resource(resourceArn=job_def_arn, tagKeys=["k2"]) my_queue = batch_client.list_tags_for_resource(resourceArn=job_def_arn) my_queue.should.have.key("tags").equals({"k1": "v1", "k3": "v3"})
29.720588
85
0.686294
248
2,021
5.193548
0.258065
0.102484
0.062888
0.11646
0.756988
0.722826
0.722826
0.722826
0.722826
0.722826
0
0.027348
0.167739
2,021
67
86
30.164179
0.738407
0.017318
0
0.5625
0
0
0.093293
0
0
0
0
0
0
1
0.0625
false
0
0.083333
0
0.145833
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
b8508bf45bb72b315a8393c3e73bc876d73452ea
20
py
Python
privacy_evaluator/models/tf/__init__.py
mariesig/privacy-evaluator
4e6ced65cc71bb661aef4518192517e23e22595e
[ "MIT" ]
null
null
null
privacy_evaluator/models/tf/__init__.py
mariesig/privacy-evaluator
4e6ced65cc71bb661aef4518192517e23e22595e
[ "MIT" ]
null
null
null
privacy_evaluator/models/tf/__init__.py
mariesig/privacy-evaluator
4e6ced65cc71bb661aef4518192517e23e22595e
[ "MIT" ]
null
null
null
from .dcti import *
10
19
0.7
3
20
4.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.2
20
1
20
20
0.875
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
b879d1e8f7a77fefecf6be3ceba9d9d191b43a41
232
py
Python
twitterInterface.py
gerardtorres/twitterBotNetwork
71565a42789b4c626b0639f6b6e619bf06c0f8c9
[ "MIT" ]
null
null
null
twitterInterface.py
gerardtorres/twitterBotNetwork
71565a42789b4c626b0639f6b6e619bf06c0f8c9
[ "MIT" ]
null
null
null
twitterInterface.py
gerardtorres/twitterBotNetwork
71565a42789b4c626b0639f6b6e619bf06c0f8c9
[ "MIT" ]
null
null
null
import twitter api = twitter.Api(consumer_key=[consumer key], consumer_secret=[consumer secret], access_token_key=[access token], access_token_secret=[access token secret])
38.666667
60
0.607759
24
232
5.625
0.333333
0.325926
0.281481
0
0
0
0
0
0
0
0
0
0.310345
232
6
60
38.666667
0.84375
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0.2
null
null
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
5
b896bc69d22f895a80316d96e1eb2e7618c7bd9b
145
py
Python
Courses/HSEPython/2 week/7.py
searayeah/sublime-snippets
deff53a06948691cd5e5d7dcfa85515ddd8fab0b
[ "MIT" ]
null
null
null
Courses/HSEPython/2 week/7.py
searayeah/sublime-snippets
deff53a06948691cd5e5d7dcfa85515ddd8fab0b
[ "MIT" ]
null
null
null
Courses/HSEPython/2 week/7.py
searayeah/sublime-snippets
deff53a06948691cd5e5d7dcfa85515ddd8fab0b
[ "MIT" ]
null
null
null
lol = [int(input()), int(input()), int(input())] a = len(set(lol)) if a == 3: print("0") if a == 2: print("2") if a == 1: print("3")
16.111111
48
0.462069
26
145
2.576923
0.461538
0.358209
0.328358
0.477612
0
0
0
0
0
0
0
0.054545
0.241379
145
8
49
18.125
0.554545
0
0
0
0
0
0.02069
0
0
0
0
0
0
1
0
false
0
0
0
0
0.375
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
b89f4b898beed991053315774b896f8850dac1b1
81
py
Python
tests/regressiontests/admin_scripts/simple_app/models.py
kix/django
5262a288df07daa050a0e17669c3f103f47a8640
[ "BSD-3-Clause" ]
790
2015-01-03T02:13:39.000Z
2020-05-10T19:53:57.000Z
AppServer/lib/django-1.5/tests/regressiontests/admin_scripts/simple_app/models.py
nlake44/appscale
6944af660ca4cb772c9b6c2332ab28e5ef4d849f
[ "Apache-2.0" ]
1,361
2015-01-08T23:09:40.000Z
2020-04-14T00:03:04.000Z
AppServer/lib/django-1.5/tests/regressiontests/admin_scripts/simple_app/models.py
nlake44/appscale
6944af660ca4cb772c9b6c2332ab28e5ef4d849f
[ "Apache-2.0" ]
155
2015-01-08T22:59:31.000Z
2020-04-08T08:01:53.000Z
from __future__ import absolute_import from ..complex_app.models.bar import Bar
20.25
40
0.839506
12
81
5.166667
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.111111
81
3
41
27
0.861111
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
b8a97ff154e66e8e2b1d56d24e0d0edea9ffb7d9
61
py
Python
httprunner/__init__.py
QiChangYin/MultipleInterfaceManager
0732cbd2dc9065aa4947ab3243136450874579a4
[ "MIT" ]
null
null
null
httprunner/__init__.py
QiChangYin/MultipleInterfaceManager
0732cbd2dc9065aa4947ab3243136450874579a4
[ "MIT" ]
null
null
null
httprunner/__init__.py
QiChangYin/MultipleInterfaceManager
0732cbd2dc9065aa4947ab3243136450874579a4
[ "MIT" ]
1
2019-07-04T12:46:20.000Z
2019-07-04T12:46:20.000Z
# encoding: utf-8 from httprunner.task import HttpRunner
15.25
39
0.754098
8
61
5.75
0.875
0
0
0
0
0
0
0
0
0
0
0.02
0.180328
61
3
40
20.333333
0.9
0.245902
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
b288379b4d65b8e846d0de87cb1dcde4ea3fee3d
9,734
py
Python
tests/test_config.py
btr1975/nso_jsonrpc_requester
63362045b998e1b7a2235804c55da151b781c0bd
[ "MIT" ]
null
null
null
tests/test_config.py
btr1975/nso_jsonrpc_requester
63362045b998e1b7a2235804c55da151b781c0bd
[ "MIT" ]
null
null
null
tests/test_config.py
btr1975/nso_jsonrpc_requester
63362045b998e1b7a2235804c55da151b781c0bd
[ "MIT" ]
null
null
null
import pytest import os import sys base_path = os.path.join(os.path.abspath(os.path.dirname(__name__))) sys.path.append(os.path.join(base_path)) from nso_jsonrpc_requester import NsoJsonRpcConfig def test_config_init_bad_data(request_data_login_get_trans): test_obj = NsoJsonRpcConfig('http', 'example.com', '8080', 'admin', 'admin', ssl_verify=False) test_obj.new_trans(mode='read_write') with pytest.raises(TypeError): test_obj.show_config(path=1, result_as='string', with_oper=False, max_size=0) with pytest.raises(KeyError): test_obj.show_config(path='/services/path', result_as='test', with_oper=False, max_size=0) with pytest.raises(TypeError): test_obj.show_config(path='/services/path', result_as='string', with_oper=1, max_size=0) with pytest.raises(TypeError): test_obj.show_config(path='/services/path', result_as='string', with_oper=False, max_size='test') with pytest.raises(TypeError): test_obj.deref(path=1, result_as='paths') with pytest.raises(KeyError): test_obj.deref(path='/services/path', result_as='test') with pytest.raises(TypeError): test_obj.get_leafref_values(path=1, skip_grouping=False, keys=None) with pytest.raises(TypeError): test_obj.get_leafref_values(path='/services/path', skip_grouping='test', keys=None) with pytest.raises(TypeError): test_obj.get_leafref_values(path='/services/path', skip_grouping=False, keys='test') with pytest.raises(TypeError): test_obj.run_action(path=1, input_data=None) with pytest.raises(TypeError): test_obj.run_action(path='/services/path', input_data='test') with pytest.raises(TypeError): test_obj.get_schema(path=1) with pytest.raises(TypeError): test_obj.get_list_keys(path=1) with pytest.raises(TypeError): test_obj.get_value(path=1, check_default=False) with pytest.raises(TypeError): test_obj.get_value(path='/services/path', check_default='test') with pytest.raises(TypeError): test_obj.get_values(path=1, leafs=['test'], check_default=False) with pytest.raises(TypeError): test_obj.get_values(path='/services/path', leafs='test', check_default=False) with pytest.raises(TypeError): test_obj.get_values(path='/services/path', leafs=['test'], check_default='test') with pytest.raises(TypeError): test_obj.create(path=1) with pytest.raises(TypeError): test_obj.exists(path=1) with pytest.raises(TypeError): test_obj.get_case(path=1, choice='test') with pytest.raises(TypeError): test_obj.get_case(path='/services/path', choice=1) with pytest.raises(TypeError): test_obj.load(data=5, path='/', data_format='xml', mode='merge') with pytest.raises(TypeError): test_obj.load(data='test', path=1, data_format='xml', mode='merge') with pytest.raises(KeyError): test_obj.load(data='test', path='/', data_format='test', mode='merge') with pytest.raises(KeyError): test_obj.load(data='test', path='/', data_format='xml', mode='test') with pytest.raises(TypeError): test_obj.set_value(path=1, value='test', dry_run=False) with pytest.raises(TypeError): test_obj.set_value(path='/services/path', value='test', dry_run='test') with pytest.raises(TypeError): test_obj.commit(dry_run='test', output='cli', reverse=False) with pytest.raises(KeyError): test_obj.commit(dry_run=False, output='test', reverse=False) with pytest.raises(TypeError): test_obj.commit(dry_run=False, output='cli', reverse='test') with pytest.raises(TypeError): test_obj.delete(path=1) with pytest.raises(TypeError): test_obj.get_template_variables(name=1) with pytest.raises(TypeError): test_obj.query(xpath_expr=1, result_as='string') with pytest.raises(ValueError): test_obj.query(xpath_expr='/services/path', result_as='test') with pytest.raises(ValueError): test_obj.start_query(xpath_expr=None, path=None, selection=None, chunk_size=None, initial_offset=None, sort=None, sort_order=None, include_total=True, context_node=None, result_as='string') with pytest.raises(TypeError): test_obj.start_query(xpath_expr=1, path=None, selection=None, chunk_size=None, initial_offset=None, sort=None, sort_order=None, include_total=True, context_node=None, result_as='string') with pytest.raises(TypeError): test_obj.start_query(xpath_expr=None, path=1, selection=None, chunk_size=None, initial_offset=None, sort=None, sort_order=None, include_total=True, context_node=None, result_as='string') with pytest.raises(TypeError): test_obj.start_query(xpath_expr='/services/path', path=None, selection=1, chunk_size=None, initial_offset=None, sort=None, sort_order=None, include_total=True, context_node=None, result_as='string') with pytest.raises(TypeError): test_obj.start_query(xpath_expr='/services/path', path=None, selection=None, chunk_size='test', initial_offset=None, sort=None, sort_order=None, include_total=True, context_node=None, result_as='string') with pytest.raises(TypeError): test_obj.start_query(xpath_expr='/services/path', path=None, selection=None, chunk_size=None, initial_offset='test', sort=None, sort_order=None, include_total=True, context_node=None, result_as='string') with pytest.raises(TypeError): test_obj.start_query(xpath_expr='/services/path', path=None, selection=None, chunk_size=None, initial_offset=None, sort='test', sort_order=None, include_total=True, context_node=None, result_as='string') with pytest.raises(ValueError): test_obj.start_query(xpath_expr='/services/path', path=None, selection=None, chunk_size=None, initial_offset=None, sort=None, sort_order='test', include_total=True, context_node=None, result_as='string') with pytest.raises(TypeError): test_obj.start_query(xpath_expr='/services/path', path=None, selection=None, chunk_size=None, initial_offset=None, sort=None, sort_order=None, include_total='test', context_node=None, result_as='string') with pytest.raises(TypeError): test_obj.start_query(xpath_expr='/services/path', path=None, selection=None, chunk_size=None, initial_offset=None, sort=None, sort_order=None, include_total=True, context_node=1, result_as='string') with pytest.raises(ValueError): test_obj.start_query(xpath_expr='/services/path', path=None, selection=None, chunk_size=None, initial_offset=None, sort=None, sort_order=None, include_total=False, context_node=None, result_as='test') with pytest.raises(TypeError): test_obj.run_query(qh='test') with pytest.raises(TypeError): test_obj.reset_query(qh='test') with pytest.raises(TypeError): test_obj.stop_query(qh='test') test_obj.new_trans() with pytest.raises(ValueError): test_obj.create(path='/services/path') with pytest.raises(ValueError): test_obj.load(data='test') with pytest.raises(ValueError): test_obj.set_value(path='/services/path', value='test') with pytest.raises(ValueError): test_obj.validate_commit() with pytest.raises(ValueError): test_obj.commit() with pytest.raises(ValueError): test_obj.delete(path='/services/path') def test_config_init(request_data_login_get_trans): test_obj = NsoJsonRpcConfig('http', 'example.com', '8080', 'admin', 'admin', ssl_verify=False) test_obj.new_trans(mode='read_write') test_obj.show_config(path='/services/path') test_obj.deref(path='/services/path') test_obj.get_leafref_values(path='/services/path') test_obj.get_leafref_values(path='/services/path', keys=['test']) test_obj.run_action(path='/services/path', input_data=None) test_obj.run_action(path='/services/path', input_data={'test': 'test'}) test_obj.get_schema(path='/services/path') test_obj.get_list_keys(path='/services/path') test_obj.get_value(path='/services/path') test_obj.get_values(path='/services/path', leafs=['test']) test_obj.create(path='/services/path') test_obj.exists(path='/services/path') test_obj.get_case(path='/services/path', choice='test') test_obj.load(data='test') test_obj.set_value(path='/services/path', value='test') test_obj.validate_commit() test_obj.commit() test_obj.commit(output='native', reverse=True) test_obj.delete(path='/services/path') test_obj.get_service_points() test_obj.get_template_variables(name='test') test_obj.query(xpath_expr='/services/path') test_obj.start_query(xpath_expr='/services/path', selection=['test'], chunk_size=10, initial_offset=10, sort=['test'], sort_order='descending', include_total=False, context_node='/thing', result_as='string') test_obj.start_query(path='/services/path') test_obj.run_query(qh=5) test_obj.reset_query(qh=5) test_obj.stop_query(qh=5)
41.421277
107
0.667043
1,286
9,734
4.811042
0.088647
0.098432
0.142234
0.161629
0.901891
0.863585
0.800226
0.728948
0.670115
0.50299
0
0.005258
0.198993
9,734
234
108
41.598291
0.788252
0
0
0.528736
0
0
0.102322
0
0
0
0
0
0
1
0.011494
false
0
0.022989
0
0.034483
0
0
0
0
null
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
b28f87fbcf272794bbec501162f64d169e200b6b
661
py
Python
machine_translation_vision/layers/__init__.py
wonderseen/OVC-MMT
b982038ea1295cc038b8dcbca11aa81d318f7a49
[ "MIT" ]
5
2021-02-25T03:12:01.000Z
2022-03-04T15:17:45.000Z
machine_translation_vision/layers/__init__.py
wonderseen/OVC-MMT
b982038ea1295cc038b8dcbca11aa81d318f7a49
[ "MIT" ]
1
2021-02-25T05:42:31.000Z
2022-01-02T17:54:16.000Z
machine_translation_vision/layers/__init__.py
wonderseen/OVC-MMT
b982038ea1295cc038b8dcbca11aa81d318f7a49
[ "MIT" ]
null
null
null
from .Position_Embedding import PositionEmbedding from .Encoder import LIUMCVC_Encoder, LIUMCVC_Encoder2 from .LIUMCVC_Decoder import LIUMCVC_Decoder from .NMT_Decoder import NMT_Decoder from .NMT_Decoder_V2 import NMT_Decoder_V2 from .NMT_Decoder_V3 import NMT_Decoder_V3 from .ff import FF from .VSE_Imagine import VSE_Imagine from .VSE_Imagine_Mean import VSE_Imagine_Mean from .VSE_Imagine_Im import VSE_Imagine_Im from .VSE_Imagine_Text import VSE_Imagine_Text from .VSE_Imagine_Enc_Dec import VSE_Imagine_Enc_Dec from .VSE_Imagine_Enc_Dec_V2 import VSE_Imagine_Enc_Dec_V2 from .VSE_Imagine_Enc import VSE_Imagine_Enc, VSE_Imagine_Enc_bta, ImagineAttn_bta
44.066667
82
0.885023
110
661
4.854545
0.2
0.280899
0.183521
0.11985
0.164794
0
0
0
0
0
0
0.011628
0.089259
661
14
83
47.214286
0.875415
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
b298d8507db8d36e534151b0d4b0ca382f497194
34
py
Python
version.py
jundoll/bs-playlist-by-tag
91438ee7f50bf5221aebc80e93b1165f6a7c6993
[ "MIT" ]
null
null
null
version.py
jundoll/bs-playlist-by-tag
91438ee7f50bf5221aebc80e93b1165f6a7c6993
[ "MIT" ]
null
null
null
version.py
jundoll/bs-playlist-by-tag
91438ee7f50bf5221aebc80e93b1165f6a7c6993
[ "MIT" ]
null
null
null
VERSION="bs-playlist-by-tag/0.1.1"
34
34
0.735294
8
34
3.125
0.875
0
0
0
0
0
0
0
0
0
0
0.088235
0
34
1
34
34
0.647059
0
0
0
0
0
0.685714
0.685714
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
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
a28d426b49d36f8e1adcd87e626b45b56c3e2ee0
178
py
Python
app/api/v2/user/__init__.py
salma-nyagaka/FastFoodFastApi
5b7be1079b7422ba4e510c73d0eb4dfeeb4f73f7
[ "MIT" ]
null
null
null
app/api/v2/user/__init__.py
salma-nyagaka/FastFoodFastApi
5b7be1079b7422ba4e510c73d0eb4dfeeb4f73f7
[ "MIT" ]
null
null
null
app/api/v2/user/__init__.py
salma-nyagaka/FastFoodFastApi
5b7be1079b7422ba4e510c73d0eb4dfeeb4f73f7
[ "MIT" ]
4
2018-09-13T17:56:40.000Z
2019-06-23T13:52:18.000Z
'''module imports''' from flask import Blueprint from .users import GetOrders, PlaceOrder, GetAllMenu, GetNewOrders, DeleteOrder USER_BLUEPRINT = Blueprint('user', __name__)
19.777778
79
0.780899
19
178
7.052632
0.736842
0
0
0
0
0
0
0
0
0
0
0
0.123596
178
8
80
22.25
0.858974
0.078652
0
0
0
0
0.025316
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0.666667
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
1
0
5
a29ba0c45407c86a596a72c0191409383b678a1a
1,312
py
Python
examples/ex01_basics/incr_test.py
kevinyuan/pymtl3
5949e6a4acc625c0ccbbb25be3af1d0db683df3c
[ "BSD-3-Clause" ]
152
2020-06-03T02:34:11.000Z
2022-03-30T04:16:45.000Z
examples/ex01_basics/incr_test.py
kevinyuan/pymtl3
5949e6a4acc625c0ccbbb25be3af1d0db683df3c
[ "BSD-3-Clause" ]
139
2019-05-29T00:37:09.000Z
2020-05-17T16:49:26.000Z
examples/ex01_basics/incr_test.py
kevinyuan/pymtl3
5949e6a4acc625c0ccbbb25be3af1d0db683df3c
[ "BSD-3-Clause" ]
22
2020-05-18T13:42:05.000Z
2022-03-11T08:37:51.000Z
""" ========================================================================== incr_test.py ========================================================================== An increment python function that uses PyMTL bits. Author : Yanghui Ou Date : June 17, 2019 """ from pymtl3 import * # ''' TUTORIAL TASK '''''''''''''''''''''''''''''''''''''''''''''''''''''' # Implement the incr_8bit function and a corresponding unit test # ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\/ #; The incr_8bit function should take as input an 8-bit value, increment #; it by one, and return the result. Try writing two unit tests. The #; first unit test should verify basic functionality, and the second unit #; test should verify overflow. #------------------------------------------------------------------------- # An 8-bit increment function #------------------------------------------------------------------------- def incr_8bit( x ): return b8(x) + b8(1) #------------------------------------------------------------------------- # Directed tests for the incr_8bit function #------------------------------------------------------------------------- def test_incr_8bit_simple(): assert incr_8bit( b8(2) ) == b8(3) def test_incr_8bit_overflow(): assert incr_8bit( b8(0xff) ) == b8(0)
36.444444
74
0.40625
119
1,312
4.369748
0.537815
0.123077
0.063462
0.109615
0
0
0
0
0
0
0
0.023952
0.108994
1,312
35
75
37.485714
0.420873
0.816311
0
0
0
0
0
0
0
0
0.0181
0
0.285714
1
0.428571
false
0
0.142857
0.142857
0.714286
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
a2bb9021aebedecef080792ab93e79bf98cd506f
184
py
Python
models/tfidf/__init__.py
Semen52/nlp4u
06d30b9d37d2d8d1e1b96d825b91c0731b67ab04
[ "MIT" ]
null
null
null
models/tfidf/__init__.py
Semen52/nlp4u
06d30b9d37d2d8d1e1b96d825b91c0731b67ab04
[ "MIT" ]
null
null
null
models/tfidf/__init__.py
Semen52/nlp4u
06d30b9d37d2d8d1e1b96d825b91c0731b67ab04
[ "MIT" ]
1
2020-04-15T22:39:22.000Z
2020-04-15T22:39:22.000Z
#!/usr/bin/ python # -*- coding: utf-8 -*- # *************************************** # # # Author: Semen Budenkov # Date: 27/02/2016 # # *************************************** #
23
43
0.288043
13
184
4.076923
1
0
0
0
0
0
0
0
0
0
0
0.057325
0.146739
184
8
44
23
0.280255
0.902174
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
a2dc4a4cd17f33eacf128624b072f79d21f22cc1
68
py
Python
polyaxon/polyaxon/config_settings/monitor_resources/__init__.py
elyase/polyaxon
1c19f059a010a6889e2b7ea340715b2bcfa382a0
[ "MIT" ]
null
null
null
polyaxon/polyaxon/config_settings/monitor_resources/__init__.py
elyase/polyaxon
1c19f059a010a6889e2b7ea340715b2bcfa382a0
[ "MIT" ]
null
null
null
polyaxon/polyaxon/config_settings/monitor_resources/__init__.py
elyase/polyaxon
1c19f059a010a6889e2b7ea340715b2bcfa382a0
[ "MIT" ]
null
null
null
from polyaxon.config_settings.spawner import * from .apps import *
17
46
0.794118
9
68
5.888889
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.132353
68
3
47
22.666667
0.898305
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
a2e1ef724f8921ead8ef4d6035f9ef6f740531ee
2,197
py
Python
src/tests/dao_test/guild_role_categories_dao_test.py
Veloxization/likahbot
24e22711f514fc0878cf6fb9e516ad44425ea6a7
[ "MIT" ]
null
null
null
src/tests/dao_test/guild_role_categories_dao_test.py
Veloxization/likahbot
24e22711f514fc0878cf6fb9e516ad44425ea6a7
[ "MIT" ]
null
null
null
src/tests/dao_test/guild_role_categories_dao_test.py
Veloxization/likahbot
24e22711f514fc0878cf6fb9e516ad44425ea6a7
[ "MIT" ]
null
null
null
import unittest import os from dao.guild_role_categories_dao import GuildRoleCategoriesDAO class TestGuildRoleCategoriesDAO(unittest.TestCase): def setUp(self): self.db_addr = "database/test_db.db" os.popen(f"sqlite3 {self.db_addr} < database/schema.sql") self.guild_role_categories_dao = GuildRoleCategoriesDAO(self.db_addr) def tearDown(self): self.guild_role_categories_dao.clear_guild_role_categories_table() def test_guild_role_categories_are_added_correctly(self): categories = self.guild_role_categories_dao.get_all_guild_role_categories(1234) self.assertEqual(len(categories), 0) self.guild_role_categories_dao.add_guild_role_category(1234, "TEST") categories = self.guild_role_categories_dao.get_all_guild_role_categories(1234) self.assertEqual(len(categories), 1) def test_guild_role_categories_are_removed_correctly(self): self.guild_role_categories_dao.add_guild_role_category(1234, "TEST") categories = self.guild_role_categories_dao.get_all_guild_role_categories(1234) self.assertEqual(len(categories), 1) self.guild_role_categories_dao.remove_guild_role_category(categories[0]["id"]) categories = self.guild_role_categories_dao.get_all_guild_role_categories(1234) self.assertEqual(len(categories), 0) def test_all_guild_role_categories_are_removed_correctly(self): self.guild_role_categories_dao.add_guild_role_category(1234, "TEST") categories1 = self.guild_role_categories_dao.get_all_guild_role_categories(1234) self.assertEqual(len(categories1), 1) self.guild_role_categories_dao.add_guild_role_category(2345, "TEST") categories2 = self.guild_role_categories_dao.get_all_guild_role_categories(2345) self.assertEqual(len(categories2), 1) self.guild_role_categories_dao.remove_all_guild_role_categories(1234) categories1 = self.guild_role_categories_dao.get_all_guild_role_categories(1234) self.assertEqual(len(categories1), 0) categories2 = self.guild_role_categories_dao.get_all_guild_role_categories(2345) self.assertEqual(len(categories2), 1)
53.585366
88
0.776969
289
2,197
5.460208
0.155709
0.19962
0.361217
0.237009
0.781369
0.748416
0.705957
0.665399
0.665399
0.636248
0
0.037175
0.142922
2,197
40
89
54.925
0.80085
0
0
0.485714
0
0
0.036868
0
0
0
0
0
0.228571
1
0.142857
false
0
0.085714
0
0.257143
0
0
0
0
null
0
1
1
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
0c04196f383725288cf2c04f9b476eded51f8f3f
345
py
Python
codes_/0643_Maximum_Average_Subarray_I.py
SaitoTsutomu/leetcode
4656d66ab721a5c7bc59890db9a2331c6823b2bf
[ "MIT" ]
null
null
null
codes_/0643_Maximum_Average_Subarray_I.py
SaitoTsutomu/leetcode
4656d66ab721a5c7bc59890db9a2331c6823b2bf
[ "MIT" ]
null
null
null
codes_/0643_Maximum_Average_Subarray_I.py
SaitoTsutomu/leetcode
4656d66ab721a5c7bc59890db9a2331c6823b2bf
[ "MIT" ]
null
null
null
# %% [643. *Maximum Average Subarray I](https://leetcode.com/problems/maximum-average-subarray-i/) # 問題:長さkの連続する部分リストの平均の最大を求めよ # 解法:itertools.accumulateを用いる class Solution: def findMaxAverage(self, nums: List[int], k: int) -> float: a = [0] + list(itertools.accumulate(nums)) return max(j - i for i, j in zip(a, a[k:])) / k
43.125
98
0.669565
48
345
4.8125
0.6875
0.121212
0.190476
0.199134
0
0
0
0
0
0
0
0.013937
0.168116
345
7
99
49.285714
0.790941
0.437681
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.75
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
1
0
0
0
0
1
0
0
5
0c1906b8868e58dd0bb9ff8f9e771adc977a9ac3
112
py
Python
app/models/generic/empty_response.py
vaibhav2408/video-registry
9ef440bb8094ca8c989db19995e1d1f6afa4ce30
[ "Apache-2.0" ]
null
null
null
app/models/generic/empty_response.py
vaibhav2408/video-registry
9ef440bb8094ca8c989db19995e1d1f6afa4ce30
[ "Apache-2.0" ]
null
null
null
app/models/generic/empty_response.py
vaibhav2408/video-registry
9ef440bb8094ca8c989db19995e1d1f6afa4ce30
[ "Apache-2.0" ]
null
null
null
from pydantic import BaseModel class EmptyResponse(BaseModel): """ Wrapper for empty response """
14
31
0.6875
11
112
7
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.232143
112
7
32
16
0.895349
0.232143
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
0c39dae5502e25ab8b0c9c5262910ce2e2e8d836
8,744
py
Python
study_sample/eh_batch_del_keys.py
dantefung/Python-Codebase
7e154100a1016ad79ec5d6adc7c11f096ec1966b
[ "MIT" ]
null
null
null
study_sample/eh_batch_del_keys.py
dantefung/Python-Codebase
7e154100a1016ad79ec5d6adc7c11f096ec1966b
[ "MIT" ]
5
2021-04-30T21:18:36.000Z
2022-03-12T00:55:18.000Z
study_sample/eh_batch_del_keys.py
dantefung/Python-Codebase
7e154100a1016ad79ec5d6adc7c11f096ec1966b
[ "MIT" ]
null
null
null
import requests import json key_set_url = 'https://xxx.yyyy.com/hhh/app/taskqueue/keymap' del_key_url = 'https://xxx.yyyy.com/hhh/app/taskqueue/deleteKey' token = 'xxxxxxxxx' class HttpHelper: # 声明私有成员变量 __url = 'http://www.baidu.com/app/abc' __token = 'xxxyyyzzz' def __init__(self): pass def post(self, url, data, token): header = { "Content-Type": "application/json", "X-OS-KERNEL-TOKEN": token } # 使fiddler可以抓包. # proxies = { # "http": "http://10.10.25.12:8888", # "https": "http://10.10.25.12:8888", # } # res = requests.post(url=url, data=json.dumps(data), headers=header, proxies=proxies) res = requests.post(url=url, data=json.dumps(data), headers=header) print(res.text) return res def getUrl(self): return self.__url def getToken(self): return self.__token httpKit = HttpHelper() data = { } print(data) def main(keyPattern): keySetUrl = key_set_url + '?key=' + keyPattern + '*' res = httpKit.post(keySetUrl, data, token) # print(res) # print(res.content.decode('utf-8')) r''' {"code":0,"success":true,"message":"","result":{"EHR_RESULT_IMPORT_EMPLOYEENO:GT000178":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002752":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002755":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002756":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT009948":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT057233":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056026":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT008974":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT006311":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056824":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056706":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT000170":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056707":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT010372":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT057186":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT057185":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002767":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT057066":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT007774":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT008181":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056935":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056816":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002659":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002652":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT007029":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002655":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002656":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002657":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT008353":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT008111":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT007384":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002770":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT007026":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056950 ":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056802":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT010608":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT010729":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056803":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056804":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056806":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT010568":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002945":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT004849":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002704":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002705":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002706":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002708":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT009617":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002662":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT010390":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT004726":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056230":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056473":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002944":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT007837":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002823":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056595":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT010278":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056597":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056994":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT005013":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056511":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056875":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002660":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056635":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002661":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT010712":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002717":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002673":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002675":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT009505":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002677":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002679":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT003361":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056741":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056742":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT010582":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056743":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT003363":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002670":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056624":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056228":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT000492":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT000096":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056627":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056628":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT008373":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT009583":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT006470":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT009580":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT008426":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002720":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT000944":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT057144":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT057022":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056452":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT057145":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056058":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002680":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT057029":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT003890":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056611":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056579":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT007454":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002683":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT055008":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056616":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT000260":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002737":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT003707":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT008319":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002731":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002735":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT057016":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT057015":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT009765":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056970 ":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT008273":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT010769":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT008272":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002749":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT000566":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT000168":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT000045":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT000166":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT001771":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT009539":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056272":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002744":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT057122":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002745":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT007518":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT002746":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT009653":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT055342":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056951":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056038":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056159":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056558":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT010514":"1","EHR_RESULT_IMPORT_EMPLOYEENO:GT056838":"1"},"timestamp":1628062838680} ''' r''' {"code":0,"success":true,"message":"EHR_RESULT_IMPORT_EMPLOYEENO:GT056838","timestamp":1628062952337} ''' resDict = json.loads(res.content.decode('utf-8')) print('code:', resDict['code']) if resDict['code'] == 0: result = resDict['result'] # print('result:', resDict['result']) if result: for key in result: print('try to delete ', key, ' , please take a break!') delKeyUrl = del_key_url + '?key=' + key r = httpKit.post(delKeyUrl, data, token) rDict = json.loads(r.content.decode('utf-8')) if rDict['code'] == 0 and rDict['success']: print('Congratulations, ', rDict['message'], ' was deleted successfully!!') elif not result: print('result is empty!!') # def test(): # delKeyUrl = del_key_url + '?key=EHR_RESULT_IMPORT_EMPLOYEENO:GT002759'; # r = httpKit.post(delKeyUrl, data, token) # print(r.content.decode("utf-8")) # rDict = json.loads(r.content.decode('utf-8')) # if rDict['code'] == 0 and rDict['success']: # print('Congratulations, ',rDict['message'],' was deleted successfully!!'); # # test(); main('EHR_RESULT_IMPORT_EMPLOYEENO')
101.674419
6,285
0.76441
1,144
8,744
5.445804
0.208916
0.208026
0.346709
0.577849
0.692616
0.085714
0.063242
0.063242
0.052648
0.052648
0
0.130708
0.073422
8,744
85
6,286
102.870588
0.638237
0.073422
0
0
0
0
0.221223
0.016787
0
0
0
0
0
1
0.108696
false
0.021739
0.065217
0.043478
0.304348
0.130435
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
0c3ebbaa150889a8c9661083db7ae49b80ec8da1
1,323
py
Python
terrascript/okta/d.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
507
2017-07-26T02:58:38.000Z
2022-01-21T12:35:13.000Z
terrascript/okta/d.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
135
2017-07-20T12:01:59.000Z
2021-10-04T22:25:40.000Z
terrascript/okta/d.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
81
2018-02-20T17:55:28.000Z
2022-01-31T07:08:40.000Z
# terrascript/okta/d.py # Automatically generated by tools/makecode.py () import warnings warnings.warn( "using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2 ) import terrascript class okta_app(terrascript.Data): pass class okta_app_metadata_saml(terrascript.Data): pass class okta_app_oauth(terrascript.Data): pass class okta_app_saml(terrascript.Data): pass class okta_auth_server(terrascript.Data): pass class okta_auth_server_policy(terrascript.Data): pass class okta_auth_server_scopes(terrascript.Data): pass class okta_default_policies(terrascript.Data): pass class okta_default_policy(terrascript.Data): pass class okta_everyone_group(terrascript.Data): pass class okta_group(terrascript.Data): pass class okta_groups(terrascript.Data): pass class okta_idp_metadata_saml(terrascript.Data): pass class okta_idp_oidc(terrascript.Data): pass class okta_idp_saml(terrascript.Data): pass class okta_idp_social(terrascript.Data): pass class okta_policy(terrascript.Data): pass class okta_user(terrascript.Data): pass class okta_user_profile_mapping_source(terrascript.Data): pass class okta_user_type(terrascript.Data): pass class okta_users(terrascript.Data): pass
14.074468
79
0.758125
172
1,323
5.587209
0.267442
0.19667
0.415193
0.49948
0.725286
0.667014
0.241415
0
0
0
0
0.000904
0.164021
1,323
93
80
14.225806
0.867993
0.052154
0
0.446809
1
0
0.031175
0
0
0
0
0
0
1
0
true
0.446809
0.042553
0
0.489362
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
1
1
0
0
0
0
0
5
0c5ead334df61414cb15efed85f2674cfa7aaeb5
31
py
Python
config.py
PavelSimon/KryptoEvidencia
7516a4fc3697398f63efc48a98e5af2d596ac90b
[ "CC0-1.0" ]
null
null
null
config.py
PavelSimon/KryptoEvidencia
7516a4fc3697398f63efc48a98e5af2d596ac90b
[ "CC0-1.0" ]
null
null
null
config.py
PavelSimon/KryptoEvidencia
7516a4fc3697398f63efc48a98e5af2d596ac90b
[ "CC0-1.0" ]
null
null
null
PORT = 8002 HOST = "127.0.0.1"
10.333333
18
0.580645
7
31
2.571429
0.857143
0
0
0
0
0
0
0
0
0
0
0.4
0.193548
31
2
19
15.5
0.32
0
0
0
0
0
0.290323
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
a78c318ee1b8d271c8f6f05ce21e5075de0613a7
39
py
Python
cargan/loss/__init__.py
mdc202002/cargan
5bfb44a1d8c2de8126e8053bed6078ad2e20819c
[ "MIT" ]
72
2021-10-20T01:17:54.000Z
2022-02-22T07:40:35.000Z
cargan/loss/__init__.py
mdc202002/cargan
5bfb44a1d8c2de8126e8053bed6078ad2e20819c
[ "MIT" ]
7
2021-10-21T21:44:00.000Z
2022-03-17T18:24:42.000Z
cargan/loss/__init__.py
mdc202002/cargan
5bfb44a1d8c2de8126e8053bed6078ad2e20819c
[ "MIT" ]
16
2021-10-20T02:07:46.000Z
2022-03-16T08:18:37.000Z
from .pitch import CREPEPerceptualLoss
19.5
38
0.871795
4
39
8.5
1
0
0
0
0
0
0
0
0
0
0
0
0.102564
39
1
39
39
0.971429
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
a7a2de5cf07e850d9602648fad0f8b0f0b93e653
660
py
Python
backend/core/inputs.py
vkmrishad/django-graphql-cookiecutter
47ec56334f3558dd89c82d445024c606f1bc2a19
[ "MIT" ]
1
2022-03-02T00:26:23.000Z
2022-03-02T00:26:23.000Z
backend/core/inputs.py
vkmrishad/django-graphql-cookiecutter
47ec56334f3558dd89c82d445024c606f1bc2a19
[ "MIT" ]
null
null
null
backend/core/inputs.py
vkmrishad/django-graphql-cookiecutter
47ec56334f3558dd89c82d445024c606f1bc2a19
[ "MIT" ]
null
null
null
from graphene import ID, Int, String class ForgotPasswordInput: email = String(required=True) class ResetPasswordInput: key = String(required=True) password = String(required=True) confirm_password = String(required=True) class RegisterInput: password = String(required=True) username = String(required=True) class VerifyUserInput: user_id = ID(required=True) token = String(required=True) class RequestOTPInput: phone = String(required=True) class CreateUploadInput: kind = Int(required=True) name = String(required=True) mimetype = String(required=True) class IDInput: id = ID(required=True)
18.333333
44
0.718182
74
660
6.378378
0.364865
0.330508
0.381356
0.292373
0
0
0
0
0
0
0
0
0.189394
660
35
45
18.857143
0.882243
0
0
0.095238
0
0
0
0
0
0
0
0
0
1
0
false
0.238095
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
1
0
0
1
0
0
5
a7c9200d4ca9fd1f49716a64fc423b875a1e8384
2,271
py
Python
tests/caps/test_capfile.py
devgi/bpf
4522c7afc3d6aae00a8fe03456dc1b84fc539c11
[ "MIT" ]
null
null
null
tests/caps/test_capfile.py
devgi/bpf
4522c7afc3d6aae00a8fe03456dc1b84fc539c11
[ "MIT" ]
1
2015-03-25T10:28:13.000Z
2015-03-25T20:19:35.000Z
tests/caps/test_capfile.py
devgi/bpf
4522c7afc3d6aae00a8fe03456dc1b84fc539c11
[ "MIT" ]
null
null
null
import pytest from caps.capfile import CapReader, CapWriter @pytest.fixture def temp_cap_file(tmpdir): return tmpdir.join("temp_cap.cap").strpath @pytest.mark.parametrize(("gz"), [True, False], ids=["compressed", "regular"]) @pytest.mark.parametrize(("endianness"), [">", "<", ""], ids=["big-endian", "little-endian", "default-enidan"]) @pytest.mark.parametrize(("sync"), [True, False], ids=["sync", "no-sync"]) def test_cap_write_read(temp_cap_file, gz, endianness, sync): cap_writer = CapWriter(temp_cap_file, gz=gz, endianness=endianness, sync=sync) # write 3 dummy packets. cap_writer.write("A") cap_writer.write("B") cap_writer.write("C") # close the cap writer. cap_writer.close() cap_reader = CapReader(temp_cap_file) packets = cap_reader.read_all_packets() assert packets == ["A", "B", "C"] cap_reader.close() @pytest.mark.parametrize(("gz"), [True, False], ids=["compressed", "regular"]) @pytest.mark.parametrize(("endianness"), [">", "<", ""], ids=["big-endian", "little-endian", "default-enidan"]) @pytest.mark.parametrize(("sync"), [True, False], ids=["sync", "no-sync"]) def test_cap_write_append_read(temp_cap_file, gz, endianness, sync): cap_writer = CapWriter(temp_cap_file, gz=gz, endianness=endianness, sync=sync) cap_writer.write("A") cap_writer.write("B") cap_writer.close() cap_writer2 = CapWriter(temp_cap_file, gz=gz, endianness=endianness, sync=sync, append=True) cap_writer2.write("C") cap_writer2.write("D") cap_writer2.close() cap_reader = CapReader(temp_cap_file) packets = cap_reader.read_all_packets() assert packets == ["A", "B", "C", "D"] cap_reader.close() def test_cap_reader_reset(temp_cap_file): cap_writer = CapWriter(temp_cap_file) cap_writer.write("A") cap_writer.write("B") cap_writer.close() cap_reader = CapReader(temp_cap_file) assert cap_reader.read_all_packets() == ["A", "B"] assert cap_reader.read_all_packets() == ["A", "B"]
32.442857
79
0.603258
276
2,271
4.721014
0.184783
0.0967
0.092863
0.049885
0.790484
0.782041
0.759785
0.759785
0.712203
0.685342
0
0.00289
0.238221
2,271
69
80
32.913043
0.750289
0.019375
0
0.653846
0
0
0.089029
0
0
0
0
0
0.076923
1
0.076923
false
0
0.038462
0.019231
0.134615
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
38eb07bb9572eeb636ca2a8aeda78371c50f7f5f
1,032
py
Python
08_Taidetta.py
mikkokotola/pythonkoodausta
cbf4c4c1f19ed4ef304526a304968262c6539b88
[ "MIT" ]
null
null
null
08_Taidetta.py
mikkokotola/pythonkoodausta
cbf4c4c1f19ed4ef304526a304968262c6539b88
[ "MIT" ]
null
null
null
08_Taidetta.py
mikkokotola/pythonkoodausta
cbf4c4c1f19ed4ef304526a304968262c6539b88
[ "MIT" ]
null
null
null
# Tehtävä 8 # Tässä on ohjelmapohja, joka piirtää kuviota kuvaruudulle. Kokeile ensin miten se toimii. # Ei haittaa, vaikka et ymmärrä ihan kaikkea koodia. Kokeile sitten mitä tapahtuu jos laitat # muuttujan 'odotus' arvoksi 0.5. Entä jos odotus on 0.02? Muokkaa sitten ohjelmaa siten, että # piirrettävä kuvio muuttuu jotenkin. # Otetaan käyttöön komento odottamiselle from time import sleep odotus = 0.02 i = 1 while i <= 10: print('*') # Odotetaan jokaisen tulostuksen jälkeen 0 sleep(odotus) print(' *') sleep(odotus) print(' *') sleep(odotus) print(' *') sleep(odotus) print(' *') sleep(odotus) print(' *') sleep(odotus) print(' *') sleep(odotus) print(' *') sleep(odotus) print(' *') sleep(odotus) print(' *') sleep(odotus) print(' *') sleep(odotus) print(' *') sleep(odotus) print(' *') sleep(odotus) print(' *') sleep(odotus) print(' *') sleep(odotus) print(' *') sleep(odotus) print('*') i = i + 1
20.64
95
0.613372
121
1,032
5.231405
0.487603
0.295419
0.404423
0.49763
0.404423
0.404423
0.404423
0.404423
0.404423
0.404423
0
0.017995
0.246124
1,032
49
96
21.061224
0.79563
0.387597
0
0.868421
0
0
0.129808
0
0
0
0
0
0
1
0
false
0
0.026316
0
0.026316
0.447368
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
ac022bd519cb4510f21c7936d46b200c895ffc85
43
py
Python
entry/__init__.py
philos123/PyBacktesting
1046e52899461003ba7e563445d7acfe1b459189
[ "MIT" ]
52
2020-12-13T23:01:03.000Z
2022-03-09T05:54:32.000Z
entry/__init__.py
philos123/PyBacktesting
1046e52899461003ba7e563445d7acfe1b459189
[ "MIT" ]
null
null
null
entry/__init__.py
philos123/PyBacktesting
1046e52899461003ba7e563445d7acfe1b459189
[ "MIT" ]
26
2021-03-05T12:39:39.000Z
2022-02-21T02:32:03.000Z
""" Techniques used to enter the market """
14.333333
35
0.697674
6
43
5
1
0
0
0
0
0
0
0
0
0
0
0
0.162791
43
3
36
14.333333
0.833333
0.813953
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
ac187d3e516032e011da30562d85d5384b7bbcd9
137
py
Python
sample1/level2/problem2/test2.py
Zim95/foorbar
955c7bfda7ff7583dbdb0a8f029cc39c18ea2b52
[ "MIT" ]
null
null
null
sample1/level2/problem2/test2.py
Zim95/foorbar
955c7bfda7ff7583dbdb0a8f029cc39c18ea2b52
[ "MIT" ]
null
null
null
sample1/level2/problem2/test2.py
Zim95/foorbar
955c7bfda7ff7583dbdb0a8f029cc39c18ea2b52
[ "MIT" ]
null
null
null
from unittest import TestCase from solution2 import solution class TestSalutations(TestCase): def test_string(self): pass
15.222222
32
0.751825
16
137
6.375
0.8125
0
0
0
0
0
0
0
0
0
0
0.009174
0.20438
137
8
33
17.125
0.926606
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0.2
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
1
1
0
1
0
0
5
ac8c6145c17c110f97d378e739c201f7c93ce780
10
py
Python
settings/ms_shutter_settings.py
bopopescu/Lauecollect
60ae2b05ea8596ba0decf426e37aeaca0bc8b6be
[ "MIT" ]
null
null
null
settings/ms_shutter_settings.py
bopopescu/Lauecollect
60ae2b05ea8596ba0decf426e37aeaca0bc8b6be
[ "MIT" ]
1
2019-10-22T21:28:31.000Z
2019-10-22T21:39:12.000Z
settings/ms_shutter_settings.py
bopopescu/Lauecollect
60ae2b05ea8596ba0decf426e37aeaca0bc8b6be
[ "MIT" ]
2
2019-06-06T15:06:46.000Z
2020-07-20T02:03:22.000Z
dt = 0.008
10
10
0.6
3
10
2
1
0
0
0
0
0
0
0
0
0
0
0.5
0.2
10
1
10
10
0.25
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
3bac5e7ec1f1378a2541a62fa47fc88d432de012
9,207
py
Python
standalone-templates/3nic/template.py
citrix/citrix-adc-gdm-templates
2bcfaf1703d3cc3746da60b5768eb8cfe79c4ff3
[ "RSA-MD" ]
2
2020-06-03T00:57:03.000Z
2020-12-07T06:07:41.000Z
standalone-templates/3nic/template.py
citrix/citrix-adc-gdm-templates
2bcfaf1703d3cc3746da60b5768eb8cfe79c4ff3
[ "RSA-MD" ]
null
null
null
standalone-templates/3nic/template.py
citrix/citrix-adc-gdm-templates
2bcfaf1703d3cc3746da60b5768eb8cfe79c4ff3
[ "RSA-MD" ]
3
2019-02-05T17:33:30.000Z
2021-01-05T06:35:32.000Z
"""Creates Citrix ADC Three NIC deployment""" COMPUTE_URL_BASE = 'https://www.googleapis.com/compute/v1/' def GenerateConfig(context): if(context.properties['assign_public_ip'] == 'yes'): access_configs1 = [{ 'name': 'Management NAT', 'type': 'ONE_TO_ONE_NAT', 'natIP': '$(ref.static-external-mgmt-ip-' + context.env['deployment'] + '.address)' }] access_configs2 = [{ 'name': 'Management NAT', 'type': 'ONE_TO_ONE_NAT', 'natIP': '$(ref.static-external-traffic-ip-' + context.env['deployment'] + '.address)' }] elif(context.properties['assign_public_ip'] == 'no'): access_configs1 = [] access_configs2 = [] network_interfaces = [{ 'network': ''.join([COMPUTE_URL_BASE, 'projects/', context.env['project'], '/global/networks/', context.properties['mgmt_network']]), 'subnetwork': ''.join([COMPUTE_URL_BASE, 'projects/', context.env['project'], '/regions/', context.properties['region'], '/subnetworks/', context.properties['mgmt_subnet']]), 'networkIP': '$(ref.static-internal-mgmt-ip-' + context.env['deployment'] + '.address)', 'accessConfigs': access_configs1 }, { 'network': ''.join([COMPUTE_URL_BASE, 'projects/', context.env['project'], '/global/networks/', context.properties['client_network']]), 'subnetwork': ''.join([COMPUTE_URL_BASE, 'projects/', context.env['project'], '/regions/', context.properties['region'], '/subnetworks/', context.properties['client_subnet']]), 'networkIP': '$(ref.static-internal-client-ip-' + context.env['deployment'] + '.address)', 'accessConfigs': access_configs2 }, { 'network': ''.join([COMPUTE_URL_BASE, 'projects/', context.env['project'], '/global/networks/', context.properties['server_network']]), 'subnetwork': ''.join([COMPUTE_URL_BASE, 'projects/', context.env['project'], '/regions/', context.properties['region'], '/subnetworks/', context.properties['server_subnet']]), 'networkIP': '$(ref.static-internal-server-ip-' + context.env['deployment'] + '.address)', 'accessConfigs': [] }] if(context.properties['service_account'] != ""): service_accounts = [{ 'email': context.properties['service_account'] }] else: service_accounts = [] if(context.properties['ssh_public_key'] != ""): ssh_keys = [{ 'key': 'ssh-keys', 'value':context.properties['ssh_public_key'] }] else: ssh_keys = [] resources = [{ 'name': 'citrix-adc-' + context.env['deployment'], 'type': 'compute.v1.instance', 'properties': { 'zone': context.properties['google_zone'], 'machineType': ''.join([COMPUTE_URL_BASE, 'projects/', context.env['project'], '/zones/', context.properties['google_zone'], '/machineTypes/', context.properties['instance_type']]), 'serviceAccounts': service_accounts, 'disks': [{ 'deviceName': 'boot', 'type': 'PERSISTENT', 'boot': True, 'autoDelete': True, 'initializeParams': { 'sourceImage': ''.join([COMPUTE_URL_BASE, 'projects/' + context.properties['image_project_id'], '/global/images/', context.properties['image_name'], ]) } }], 'networkInterfaces': network_interfaces, 'metadata': { 'items': ssh_keys }, 'tags': { 'items': ['mgmt-firewall-' + context.env['deployment'], 'client-firewall-' + context.env['deployment'], 'server-firewall-' + context.env['deployment']] } } }, { 'name': 'mgmt-firewall-' + context.env['deployment'], 'type': 'compute.v1.firewall', 'properties': { 'network': ''.join([COMPUTE_URL_BASE, 'projects/', context.env['project'], '/global/networks/', context.properties['mgmt_network']]), 'sourceRanges': ['0.0.0.0/0'], 'allowed': [{ 'IPProtocol': 'tcp', 'ports': context.properties['mgmt_ports'] }], 'direction': 'INGRESS', 'priority': 1000 } }, { 'name': 'client-firewall-' + context.env['deployment'], 'type': 'compute.v1.firewall', 'properties': { 'network': ''.join([COMPUTE_URL_BASE, 'projects/', context.env['project'], '/global/networks/', context.properties['client_network']]), 'sourceRanges': ['0.0.0.0/0'], 'allowed': [{ 'IPProtocol': 'tcp', 'ports': context.properties['traffic_ports'] }], 'direction': 'INGRESS', 'priority': 1000 } }, { 'name': 'server-firewall-' + context.env['deployment'], 'type': 'compute.v1.firewall', 'properties': { 'network': ''.join([COMPUTE_URL_BASE, 'projects/', context.env['project'], '/global/networks/', context.properties['server_network']]), 'sourceRanges': ['0.0.0.0/0'], 'allowed': [{ 'IPProtocol': 'tcp', 'ports': context.properties['traffic_ports'] }], 'direction': 'INGRESS', 'priority': 1000 } }, { 'name': 'static-internal-mgmt-ip-' + context.env['deployment'], 'type': 'compute.v1.addresses', 'properties': { 'addressType': 'INTERNAL', 'region': context.properties['region'], 'subnetwork': ''.join([COMPUTE_URL_BASE, 'projects/', context.env['project'], '/regions/', context.properties['region'], '/subnetworks/', context.properties['mgmt_subnet']]) } }, { 'name': 'static-internal-client-ip-' + context.env['deployment'], 'type': 'compute.v1.addresses', 'properties': { 'addressType': 'INTERNAL', 'region': context.properties['region'], 'subnetwork': ''.join([COMPUTE_URL_BASE, 'projects/', context.env['project'], '/regions/', context.properties['region'], '/subnetworks/', context.properties['client_subnet']]) } }, { 'name': 'static-internal-server-ip-' + context.env['deployment'], 'type': 'compute.v1.addresses', 'properties': { 'addressType': 'INTERNAL', 'region': context.properties['region'], 'subnetwork': ''.join([COMPUTE_URL_BASE, 'projects/', context.env['project'], '/regions/', context.properties['region'], '/subnetworks/', context.properties['server_subnet']]) } }] if(context.properties['assign_public_ip'] == 'yes'): resources.extend([{ 'name': 'static-external-mgmt-ip-' + context.env['deployment'], 'type': 'compute.v1.addresses', 'properties': { 'addressType': 'EXTERNAL', 'region': context.properties['region'] } }, { 'name': 'static-external-traffic-ip-' + context.env['deployment'], 'type': 'compute.v1.addresses', 'properties': { 'addressType': 'EXTERNAL', 'region': context.properties['region'] } }]) outputs = [{ 'name': 'citrx-adc-mgmt-ip', 'value': '$(ref.citrix-adc-' + context.env['deployment'] + '.networkInterfaces[0].accessConfigs[0].natIP)' }, { 'name': 'citrix-adc-client-ip', 'value': '$(ref.citrix-adc-' + context.env['deployment'] + '.networkInterfaces[1].accessConfigs[0].natIP)' }, { 'name': 'citrix-adc-server-ip', 'value': '$(ref.citrix-adc-' + context.env['deployment'] + '.networkInterfaces[2].networkIP)' }] elif(context.properties['assign_public_ip'] == 'no'): outputs = [{ 'name': 'citrx-adc-mgmt-ip', 'value': '$(ref.citrix-adc-' + context.env['deployment'] + '.networkInterfaces[0].networkIP)' }, { 'name': 'citrx-adc-client-ip', 'value': '$(ref.citrix-adc-' + context.env['deployment'] + '.networkInterfaces[1].networkIP)' }, { 'name': 'citrx-adc-server-ip', 'value': '$(ref.citrix-adc-' + context.env['deployment'] + '.networkInterfaces[2].networkIP)' }] return {'resources': resources, "outputs": outputs}
39.515021
114
0.503639
737
9,207
6.176391
0.149254
0.14565
0.101054
0.05536
0.818761
0.769112
0.727812
0.625439
0.615993
0.615993
0
0.008091
0.315412
9,207
232
115
39.685345
0.714104
0.004236
0
0.486486
1
0
0.351997
0.054792
0
0
0
0
0
1
0.004505
false
0
0
0
0.009009
0
0
0
0
null
0
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
3bb6bcdbb2911f00adf3f82006b58700586c43d1
35
py
Python
python_binding/unittests_cgnsfile/run.py
kskinoue0612/iriclib_v4
8d6212247f43bb0b34dc99678a3cc028d6f9fc3a
[ "MIT" ]
null
null
null
python_binding/unittests_cgnsfile/run.py
kskinoue0612/iriclib_v4
8d6212247f43bb0b34dc99678a3cc028d6f9fc3a
[ "MIT" ]
15
2021-07-10T20:47:34.000Z
2022-01-27T21:30:36.000Z
python_binding/unittests_cgnsfile/run.py
kskinoue0612/iriclib_v4
8d6212247f43bb0b34dc99678a3cc028d6f9fc3a
[ "MIT" ]
2
2021-07-06T04:33:56.000Z
2021-08-30T03:50:02.000Z
import unittests unittests.main()
8.75
16
0.8
4
35
7
0.75
0
0
0
0
0
0
0
0
0
0
0
0.114286
35
3
17
11.666667
0.903226
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
ce08b8f37201f8e7bfc56a09e25b2f548f191644
322
py
Python
shapeworld/world/__init__.py
ProKil/ShapeWorld
c68379dca207b6e3bf0ea38eba61895cf6f4e5a2
[ "MIT" ]
52
2017-02-07T12:02:11.000Z
2022-03-09T10:35:52.000Z
shapeworld/world/__init__.py
ProKil/ShapeWorld
c68379dca207b6e3bf0ea38eba61895cf6f4e5a2
[ "MIT" ]
30
2017-11-29T15:18:48.000Z
2021-12-12T10:27:08.000Z
shapeworld/world/__init__.py
ProKil/ShapeWorld
c68379dca207b6e3bf0ea38eba61895cf6f4e5a2
[ "MIT" ]
27
2017-04-18T21:14:29.000Z
2021-07-08T14:14:00.000Z
from shapeworld.world.point import Point from shapeworld.world.shape import Shape from shapeworld.world.color import Color from shapeworld.world.texture import Texture from shapeworld.world.entity import Entity from shapeworld.world.world import World __all__ = ['Point', 'Shape', 'Color', 'Texture', 'Entity', 'World']
32.2
67
0.795031
43
322
5.860465
0.232558
0.333333
0.452381
0
0
0
0
0
0
0
0
0
0.10559
322
9
68
35.777778
0.875
0
0
0
0
0
0.102484
0
0
0
0
0
0
1
0
false
0
0.857143
0
0.857143
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
ce2f1e4b5c2797a2c255d7776fe226deeb24afe8
10,486
py
Python
nuitka/nodes/shapes/BuiltinTypeShapes.py
augustand/Nuitka
b7b9dd50b60505a309f430ce17cad36fb7d75048
[ "Apache-2.0" ]
null
null
null
nuitka/nodes/shapes/BuiltinTypeShapes.py
augustand/Nuitka
b7b9dd50b60505a309f430ce17cad36fb7d75048
[ "Apache-2.0" ]
null
null
null
nuitka/nodes/shapes/BuiltinTypeShapes.py
augustand/Nuitka
b7b9dd50b60505a309f430ce17cad36fb7d75048
[ "Apache-2.0" ]
null
null
null
# Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # """ Shapes for Python built-in types. """ from nuitka.PythonVersions import python_version from .StandardShapes import ShapeBase, ShapeIterator class ShapeTypeNoneType(ShapeBase): @staticmethod def getTypeName(): return "NoneType" @staticmethod def hasShapeSlotLen(): return False @staticmethod def hasShapeSlotInt(): return False @staticmethod def hasShapeSlotIter(): return False @staticmethod def hasShapeSlotNext(): return False class ShapeTypeBool(ShapeBase): @staticmethod def getTypeName(): return "bool" @staticmethod def hasShapeSlotLen(): return False @staticmethod def hasShapeSlotInt(): return True @staticmethod def hasShapeSlotIter(): return False @staticmethod def hasShapeSlotNext(): return False class ShapeTypeInt(ShapeBase): @staticmethod def getTypeName(): return "int" @staticmethod def hasShapeSlotLen(): return False @staticmethod def hasShapeSlotInt(): return True @staticmethod def hasShapeSlotIter(): return False @staticmethod def hasShapeSlotNext(): return False class ShapeTypeLong(ShapeBase): @staticmethod def getTypeName(): return "long" @staticmethod def hasShapeSlotLen(): return False @staticmethod def hasShapeSlotInt(): return True @staticmethod def hasShapeSlotIter(): return False @staticmethod def hasShapeSlotNext(): return False if python_version < 300: class ShapeTypeIntOrLong(ShapeBase): @staticmethod def hasShapeSlotLen(): return False @staticmethod def hasShapeSlotInt(): return True @staticmethod def hasShapeSlotIter(): return False @staticmethod def hasShapeSlotNext(): return False else: ShapeTypeIntOrLong = ShapeTypeInt class ShapeTypeFloat(ShapeBase): @staticmethod def getTypeName(): return "float" @staticmethod def hasShapeSlotLen(): return False @staticmethod def hasShapeSlotInt(): return True @staticmethod def hasShapeSlotIter(): return False @staticmethod def hasShapeSlotNext(): return False class ShapeTypeTuple(ShapeBase): @staticmethod def getTypeName(): return "tuple" @staticmethod def hasShapeSlotLen(): return True @staticmethod def hasShapeSlotInt(): return False @staticmethod def hasShapeSlotIter(): return True @staticmethod def hasShapeSlotNext(): return False @staticmethod def getShapeIter(): return ShapeTypeTupleIterator class ShapeTypeTupleIterator(ShapeIterator): @staticmethod def getTypeName(): return "tupleiterator" if python_version < 300 else "tuple_iterator" @staticmethod def hasShapeSlotLen(): return False class ShapeTypeList(ShapeBase): @staticmethod def getTypeName(): return "list" @staticmethod def hasShapeSlotLen(): return True @staticmethod def hasShapeSlotInt(): return False @staticmethod def hasShapeSlotIter(): return True @staticmethod def hasShapeSlotNext(): return False @staticmethod def getShapeIter(): return ShapeTypeListIterator class ShapeTypeListIterator(ShapeIterator): @staticmethod def getTypeName(): return "listiterator" if python_version < 300 else "list_iterator" @staticmethod def hasShapeSlotLen(): return False class ShapeTypeSet(ShapeBase): @staticmethod def getTypeName(): return "set" @staticmethod def hasShapeSlotLen(): return True @staticmethod def hasShapeSlotInt(): return False @staticmethod def hasShapeSlotNext(): return False @staticmethod def hasShapeSlotIter(): return True @staticmethod def getShapeIter(): return ShapeTypeSetIterator class ShapeTypeSetIterator(ShapeIterator): @staticmethod def getTypeName(): return "setiterator" if python_version < 300 else "set_iterator" @staticmethod def hasShapeSlotLen(): return False class ShapeTypeDict(ShapeBase): @staticmethod def getTypeName(): return "dict" @staticmethod def hasShapeSlotLen(): return True @staticmethod def hasShapeSlotInt(): return False @staticmethod def hasShapeSlotIter(): return True @staticmethod def hasShapeSlotNext(): return False @staticmethod def getShapeIter(): return ShapeTypeDictIterator class ShapeTypeDictIterator(ShapeIterator): @staticmethod def getTypeName(): return "dictionary-keyiterator" if python_version < 300 else "dictkey_iterator" @staticmethod def hasShapeSlotLen(): return False class ShapeTypeStr(ShapeBase): @staticmethod def getTypeName(): return "str" @staticmethod def hasShapeSlotLen(): return True @staticmethod def hasShapeSlotInt(): return False @staticmethod def hasShapeSlotIter(): return True @staticmethod def hasShapeSlotNext(): return False @staticmethod def getShapeIter(): return ShapeTypeStrIterator class ShapeTypeStrIterator(ShapeIterator): @staticmethod def getTypeName(): return "iterator" if python_version < 300 else "str_iterator" @staticmethod def hasShapeSlotLen(): return False if python_version < 300: class ShapeTypeUnicode(ShapeBase): @staticmethod def getTypeName(): return "unicode" @staticmethod def hasShapeSlotLen(): return True @staticmethod def hasShapeSlotInt(): return False @staticmethod def hasShapeSlotIter(): return True @staticmethod def hasShapeSlotNext(): return False @staticmethod def getShapeIter(): return ShapeTypeUnicodeIterator class ShapeTypeUnicodeIterator(ShapeIterator): @staticmethod def getTypeName(): return "iterator" @staticmethod def hasShapeSlotLen(): return False else: ShapeTypeUnicode = ShapeTypeStr ShapeTypeUnicodeIterator = ShapeTypeStrIterator if python_version < 300: class ShapeTypeStrOrUnicode(ShapeBase): @staticmethod def hasShapeSlotLen(): return True @staticmethod def hasShapeSlotInt(): return False @staticmethod def hasShapeSlotIter(): return True @staticmethod def hasShapeSlotNext(): return False else: ShapeTypeStrOrUnicode = ShapeTypeStr if python_version >= 300: class ShapeTypeBytes(ShapeBase): @staticmethod def getTypeName(): return "bytes" @staticmethod def hasShapeSlotLen(): return True @staticmethod def hasShapeSlotInt(): return False @staticmethod def hasShapeSlotIter(): return True @staticmethod def hasShapeSlotNext(): return False @staticmethod def getShapeIter(): return ShapeTypeBytesIterator class ShapeTypeBytesIterator(ShapeIterator): @staticmethod def getTypeName(): return "bytes_iterator" @staticmethod def hasShapeSlotLen(): return False else: ShapeTypeBytes = ShapeTypeStr ShapeTypeBytesIterator = ShapeTypeStrIterator class ShapeTypeEllipsisType(ShapeBase): @staticmethod def getTypeName(): return "ellipsis" @staticmethod def hasShapeSlotLen(): return False @staticmethod def hasShapeSlotInt(): return False @staticmethod def hasShapeSlotIter(): return False @staticmethod def hasShapeSlotNext(): return False class ShapeTypeSlice(ShapeBase): @staticmethod def getTypeName(): return "slice" @staticmethod def hasShapeSlotLen(): return False @staticmethod def hasShapeSlotInt(): return False @staticmethod def hasShapeSlotIter(): return False @staticmethod def hasShapeSlotNext(): return False class ShapeTypeXrange(ShapeBase): @staticmethod def getTypeName(): return "xrange" if python_version < 300 else "range" @staticmethod def hasShapeSlotLen(): return True @staticmethod def hasShapeSlotInt(): return False @staticmethod def hasShapeSlotIter(): return True @staticmethod def hasShapeSlotNext(): return False @staticmethod def getShapeIter(): return ShapeTypeXrangeIterator class ShapeTypeXrangeIterator(ShapeIterator): @staticmethod def getTypeName(): return "rangeiterator" if python_version < 300 else "range_iterator" @staticmethod def hasShapeSlotLen(): return False class ShapeTypeType(ShapeBase): @staticmethod def hasShapeSlotLen(): return False @staticmethod def hasShapeSlotInt(): return False @staticmethod def hasShapeSlotIter(): return False @staticmethod def hasShapeSlotNext(): return False
19.673546
87
0.637994
847
10,486
7.876033
0.181818
0.249588
0.134463
0.152001
0.742018
0.583121
0.55344
0.486134
0.486134
0.476091
0
0.005569
0.297921
10,486
532
88
19.710526
0.900571
0.074385
0
0.824
0
0
0.02696
0.002272
0
0
0
0
0
1
0.296
false
0
0.005333
0.296
0.666667
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5