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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7e3a7801aca2eac534d8e43c46e63e8655c4d7cf
| 6,506
|
py
|
Python
|
test/ux/utils/test_parser.py
|
deb-intel/LPOTtest
|
f7b7524c733e581668d15192b69f9d9a7ca5222d
|
[
"Apache-2.0"
] | null | null | null |
test/ux/utils/test_parser.py
|
deb-intel/LPOTtest
|
f7b7524c733e581668d15192b69f9d9a7ca5222d
|
[
"Apache-2.0"
] | null | null | null |
test/ux/utils/test_parser.py
|
deb-intel/LPOTtest
|
f7b7524c733e581668d15192b69f9d9a7ca5222d
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
# Copyright (c) 2021 Intel Corporation
#
# 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.
"""Log parsers test."""
import unittest
from unittest.mock import MagicMock, patch
from lpot.ux.utils.parser import BenchmarkParser, TuningParser
class TestTuningParser(unittest.TestCase):
"""TuningParser tests."""
def test_parsing_empty_file_list(self) -> None:
"""Test parsing of none files."""
tuning_parser = TuningParser([])
parsed = tuning_parser.process()
self.assertEqual({}, parsed)
@patch("builtins.open", create=True)
def test_parsing_empty_files(self, mocked_open: MagicMock) -> None:
"""Test parsing of files without any lines."""
mocked_open.return_value.__enter__.return_value = []
tuning_parser = TuningParser(["file.log"])
parsed = tuning_parser.process()
self.assertEqual({}, parsed)
@patch("builtins.open", create=True)
def test_parsing_simple_file(self, mocked_open: MagicMock) -> None:
"""Test parsing of file."""
mocked_open.return_value.__enter__.return_value = [
"Foo bar baz",
"2021-04-13 13:14:00 [INFO] Best tune result is: [0.99876, 0.5432]",
"2021-04-13 13:42:00 [INFO] FP32 baseline is: [0.12344, 5.6789]",
"a b c d",
]
tuning_parser = TuningParser(["file.log"])
parsed = tuning_parser.process()
self.assertEqual(
{
"acc_fp32": 0.1234,
"acc_int8": 0.9988,
},
parsed,
)
@patch("builtins.open", create=True)
def test_parsing_file_with_duplicated_lines(self, mocked_open: MagicMock) -> None:
"""Test parsing of files without any lines."""
mocked_open.return_value.__enter__.return_value = [
"Foo bar baz",
"2021-04-13 13:14:00 [INFO] Best tune result is: [0.99876, 0.5432]",
"2021-04-13 13:42:00 [INFO] FP32 baseline is: [0.12344, 5.6789]",
"a b c d",
"2021-04-13 13:14:00 [INFO] Best tune result is: [0.1, 0.1]",
"2021-04-13 13:42:00 [INFO] FP32 baseline is: [0.2, 5.6789]",
]
tuning_parser = TuningParser(["file.log"])
parsed = tuning_parser.process()
self.assertEqual(
{
"acc_fp32": 0.2,
"acc_int8": 0.1,
},
parsed,
)
class TestBenchmarkParser(unittest.TestCase):
"""BenchmarkParser tests."""
def test_parsing_empty_file_list(self) -> None:
"""Test parsing of none files."""
benchmark_parser = BenchmarkParser([])
parsed = benchmark_parser.process()
self.assertEqual({}, parsed)
@patch("builtins.open", create=True)
def test_parsing_empty_files(self, mocked_open: MagicMock) -> None:
"""Test parsing of files without any lines."""
mocked_open.return_value.__enter__.return_value = []
benchmark_parser = BenchmarkParser(["file.log"])
parsed = benchmark_parser.process()
self.assertEqual({}, parsed)
@patch("builtins.open", create=True)
def test_parsing_simple_file(self, mocked_open: MagicMock) -> None:
"""Test parsing of file."""
mocked_open.return_value.__enter__.return_value = [
"Foo bar baz",
"performance mode benchmark result:",
"2021-04-14 05:16:09 [INFO] Accuracy is 0.1234567",
"2021-04-14 05:16:09 [INFO] Batch size = 1234",
"2021-04-14 05:16:09 [INFO] Latency: 2.34567 ms",
"2021-04-14 05:16:09 [INFO] Throughput: 123.45678 images/sec",
"2021-04-14 05:16:10 [INFO] performance mode benchmark done!",
"2021-04-14 05:16:10 [INFO]",
"performance mode benchmark result:",
"a b c d",
]
benchmark_parser = BenchmarkParser(["file.log"])
parsed = benchmark_parser.process()
self.assertEqual(
{
"perf_throughput_fp32": 123.4568,
"perf_throughput_int8": 123.4568,
"perf_latency_fp32": 2.3457,
"perf_latency_int8": 2.3457,
},
parsed,
)
@patch("builtins.open", create=True)
def test_parsing_simple_file_with_many_entries(self, mocked_open: MagicMock) -> None:
"""Test parsing of file."""
mocked_open.return_value.__enter__.return_value = [
"Foo bar baz",
"performance mode benchmark result:",
"2021-04-14 05:16:09 [INFO] Accuracy is 0.1234567",
"2021-04-14 05:16:09 [INFO] Batch size = 1234",
"2021-04-14 05:16:09 [INFO] Latency: 1.0 ms",
"2021-04-14 05:16:09 [INFO] Latency: 2.0 ms",
"2021-04-14 05:16:09 [INFO] Latency: 3.0 ms",
"2021-04-14 05:16:09 [INFO] Latency: 4.0 ms",
"2021-04-14 05:16:09 [INFO] Latency: 5.0 ms",
"2021-04-14 05:16:09 [INFO] Latency: 6.0 ms",
"2021-04-14 05:16:09 [INFO] Throughput: 1.0 images/sec",
"2021-04-14 05:16:09 [INFO] Throughput: 2.0 images/sec",
"2021-04-14 05:16:09 [INFO] Throughput: 3.0 images/sec",
"2021-04-14 05:16:09 [INFO] Throughput: 4.0 images/sec",
"2021-04-14 05:16:09 [INFO] Throughput: 5.0 images/sec",
"2021-04-14 05:16:10 [INFO] performance mode benchmark done!",
"2021-04-14 05:16:10 [INFO]",
"performance mode benchmark result:",
"a b c d",
]
benchmark_parser = BenchmarkParser(["file.log"])
parsed = benchmark_parser.process()
self.assertEqual(
{
"perf_throughput_fp32": 15.0, # SUM
"perf_throughput_int8": 15.0, # SUM
"perf_latency_fp32": 3.5, # AVG
"perf_latency_int8": 3.5, # AVG
},
parsed,
)
if __name__ == "__main__":
unittest.main()
| 36.550562
| 89
| 0.585152
| 836
| 6,506
| 4.406699
| 0.202153
| 0.043974
| 0.045603
| 0.057003
| 0.72747
| 0.72747
| 0.72747
| 0.72747
| 0.727199
| 0.69734
| 0
| 0.123361
| 0.284814
| 6,506
| 177
| 90
| 36.757062
| 0.668386
| 0.138488
| 0
| 0.557377
| 0
| 0.098361
| 0.337672
| 0
| 0
| 0
| 0
| 0
| 0.065574
| 1
| 0.065574
| false
| 0
| 0.02459
| 0
| 0.106557
| 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
|
7e467bf82f6c39d0aebb8fca5f8215bc0f142416
| 55
|
py
|
Python
|
first.py
|
shuai6liu/first-repository-in-ubuntu
|
4d42b1f3a213526a9780e585ce54d92306113bb4
|
[
"MIT"
] | null | null | null |
first.py
|
shuai6liu/first-repository-in-ubuntu
|
4d42b1f3a213526a9780e585ce54d92306113bb4
|
[
"MIT"
] | null | null | null |
first.py
|
shuai6liu/first-repository-in-ubuntu
|
4d42b1f3a213526a9780e585ce54d92306113bb4
|
[
"MIT"
] | null | null | null |
print("hello github")
print("i am first repositories")
| 18.333333
| 32
| 0.745455
| 8
| 55
| 5.125
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.109091
| 55
| 2
| 33
| 27.5
| 0.836735
| 0
| 0
| 0
| 0
| 0
| 0.636364
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
7e61b0103e8ec7e5798e5382740569a7405e3673
| 204
|
py
|
Python
|
MMSplice/modularPredictions/model.py
|
banwang27/models
|
59db29e46f76b630b78c864fb607388dd927b93c
|
[
"MIT"
] | null | null | null |
MMSplice/modularPredictions/model.py
|
banwang27/models
|
59db29e46f76b630b78c864fb607388dd927b93c
|
[
"MIT"
] | null | null | null |
MMSplice/modularPredictions/model.py
|
banwang27/models
|
59db29e46f76b630b78c864fb607388dd927b93c
|
[
"MIT"
] | null | null | null |
from kipoi.model import BaseModel
import sklearn
import numpy as np
# Directly give the modular predictions
class MMSpliceModel(BaseModel):
def predict_on_batch(self, inputs):
return inputs
| 22.666667
| 39
| 0.77451
| 27
| 204
| 5.777778
| 0.851852
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.181373
| 204
| 9
| 40
| 22.666667
| 0.934132
| 0.181373
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.5
| 0.166667
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 5
|
7e65db5c5bfc7f48e9ab00fefa6855eda89f6b5b
| 407
|
py
|
Python
|
hooks/pre_gen_project.py
|
JeyDi/Python-Skeleton
|
34c8e56c73f2b6782edbf60f967e84e4768ec618
|
[
"MIT"
] | 3
|
2022-01-29T10:26:01.000Z
|
2022-03-29T20:08:13.000Z
|
hooks/pre_gen_project.py
|
JeyDi/Python-Skeleton
|
34c8e56c73f2b6782edbf60f967e84e4768ec618
|
[
"MIT"
] | 1
|
2022-02-10T16:01:11.000Z
|
2022-02-11T08:00:17.000Z
|
hooks/pre_gen_project.py
|
JeyDi/Python-Skeleton
|
34c8e56c73f2b6782edbf60f967e84e4768ec618
|
[
"MIT"
] | null | null | null |
# def deprecation_warning():
# print("""
# =============================================================================
# *** DEPRECATION WARNING ***
# Insert here you message
# Please update any scripts/automation you have to append the `-c v1` option,
# which is available now.
# =============================================================================
# """)
# deprecation_warning()
| 22.611111
| 79
| 0.398034
| 29
| 407
| 5.517241
| 0.827586
| 0.3375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.002849
| 0.137592
| 407
| 17
| 80
| 23.941176
| 0.452991
| 0.931204
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
7e78c6c45839b76990dbd9d1141352db3802af00
| 351
|
py
|
Python
|
tests/conftest.py
|
saobao913/kubernetes-device-plugins
|
5253ebff020327762780fed65350438ddd3bd3fe
|
[
"MIT"
] | 39
|
2018-02-01T12:55:14.000Z
|
2021-03-08T12:30:13.000Z
|
tests/conftest.py
|
saobao913/kubernetes-device-plugins
|
5253ebff020327762780fed65350438ddd3bd3fe
|
[
"MIT"
] | 53
|
2018-02-01T12:57:16.000Z
|
2020-04-20T07:43:13.000Z
|
tests/conftest.py
|
saobao913/kubernetes-device-plugins
|
5253ebff020327762780fed65350438ddd3bd3fe
|
[
"MIT"
] | 28
|
2018-02-01T12:44:42.000Z
|
2021-11-26T10:09:27.000Z
|
from kubernetes import config
import pytest
import urllib3
@pytest.fixture(scope="session", autouse=True)
def disable_insecure_requests_warning():
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
@pytest.fixture(scope="session", autouse=True)
def load_local_cluster_kubeconfig():
config.load_kube_config('./kubeconfig')
| 25.071429
| 71
| 0.811966
| 41
| 351
| 6.731707
| 0.585366
| 0.094203
| 0.130435
| 0.181159
| 0.282609
| 0.282609
| 0.282609
| 0
| 0
| 0
| 0
| 0.009346
| 0.08547
| 351
| 13
| 72
| 27
| 0.850467
| 0
| 0
| 0.222222
| 0
| 0
| 0.074074
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| true
| 0
| 0.333333
| 0
| 0.555556
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
7e821253a4848b2255f416e51c7f92064727cd6b
| 163
|
wsgi
|
Python
|
src/topology.wsgi
|
deesto/topology
|
6b97f80727e5c44c6d15bb45333ec110b0b0054f
|
[
"Apache-2.0"
] | 12
|
2018-05-04T21:11:16.000Z
|
2022-03-01T16:55:53.000Z
|
src/topology.wsgi
|
deesto/topology
|
6b97f80727e5c44c6d15bb45333ec110b0b0054f
|
[
"Apache-2.0"
] | 1,032
|
2018-04-14T08:57:36.000Z
|
2022-03-28T21:08:37.000Z
|
src/topology.wsgi
|
deesto/topology
|
6b97f80727e5c44c6d15bb45333ec110b0b0054f
|
[
"Apache-2.0"
] | 203
|
2018-04-19T21:06:28.000Z
|
2022-03-09T15:51:31.000Z
|
import os, sys
os.environ['TOPOLOGY_CONFIG'] = '/etc/opt/topology/config-production.py'
sys.path.insert(0, '/opt/topology/src')
from app import app as application
| 32.6
| 72
| 0.760736
| 26
| 163
| 4.730769
| 0.692308
| 0.227642
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006711
| 0.08589
| 163
| 4
| 73
| 40.75
| 0.818792
| 0
| 0
| 0
| 0
| 0
| 0.429448
| 0.233129
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
7e8d221f1e1ba6e3bc3ab69dd3730bb815138000
| 81
|
py
|
Python
|
db_replication/kafka_pub/kafka_pub.py
|
agarwal-nitesh/db_replication
|
c412d9176fc2b633bd70a3ae2789f7fef288f1dd
|
[
"MIT"
] | 2
|
2018-08-17T15:15:01.000Z
|
2018-09-18T04:16:09.000Z
|
db_replication/kafka_pub/kafka_pub.py
|
therudite/db_replication
|
c412d9176fc2b633bd70a3ae2789f7fef288f1dd
|
[
"MIT"
] | null | null | null |
db_replication/kafka_pub/kafka_pub.py
|
therudite/db_replication
|
c412d9176fc2b633bd70a3ae2789f7fef288f1dd
|
[
"MIT"
] | 2
|
2018-10-03T09:37:36.000Z
|
2019-07-31T02:13:58.000Z
|
from pub.pub import Pub
class KafkaPub(Pub):
def send(self):
pass
| 10.125
| 23
| 0.617284
| 12
| 81
| 4.166667
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.296296
| 81
| 7
| 24
| 11.571429
| 0.877193
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0.25
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
0e2fec85c85271e3973d093dd0c2829d629ae728
| 209
|
py
|
Python
|
test/test_regex.py
|
shashirama/Regex_task
|
89498a3dd44b9dba05696f117cca43fd1945eab5
|
[
"MIT"
] | null | null | null |
test/test_regex.py
|
shashirama/Regex_task
|
89498a3dd44b9dba05696f117cca43fd1945eab5
|
[
"MIT"
] | null | null | null |
test/test_regex.py
|
shashirama/Regex_task
|
89498a3dd44b9dba05696f117cca43fd1945eab5
|
[
"MIT"
] | 5
|
2021-05-18T10:33:00.000Z
|
2022-02-22T09:04:52.000Z
|
from number_search import*
def test_number_count():
text = "article.txt"
assert(count_numbers(text) == 162)
def test_fraction_count():
text = "article.txt"
assert(count_fraction(text) == 35)
| 20.9
| 38
| 0.69378
| 28
| 209
| 4.928571
| 0.535714
| 0.101449
| 0.231884
| 0.275362
| 0.434783
| 0.434783
| 0
| 0
| 0
| 0
| 0
| 0.02907
| 0.177033
| 209
| 9
| 39
| 23.222222
| 0.773256
| 0
| 0
| 0.285714
| 0
| 0
| 0.105263
| 0
| 0
| 0
| 0
| 0
| 0.285714
| 1
| 0.285714
| false
| 0
| 0.142857
| 0
| 0.428571
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
0e33ebfb89617b08e13798856fc9af047ed498e4
| 1,773
|
py
|
Python
|
evap/evaluation/migrations/0022_gradeanswercounter_likertanswercounter.py
|
felixrindt/EvaP
|
fe65fcc511cc942695ce1edbaab170894f0d37b1
|
[
"MIT"
] | 29
|
2020-02-28T23:03:41.000Z
|
2022-02-19T09:29:36.000Z
|
evap/evaluation/migrations/0022_gradeanswercounter_likertanswercounter.py
|
felixrindt/EvaP
|
fe65fcc511cc942695ce1edbaab170894f0d37b1
|
[
"MIT"
] | 737
|
2015-01-02T17:43:25.000Z
|
2018-12-10T20:45:10.000Z
|
evap/evaluation/migrations/0022_gradeanswercounter_likertanswercounter.py
|
felixrindt/EvaP
|
fe65fcc511cc942695ce1edbaab170894f0d37b1
|
[
"MIT"
] | 83
|
2015-01-14T12:39:41.000Z
|
2018-10-29T16:36:43.000Z
|
from django.db import models, migrations
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('evaluation', '0021_django_1_8_upgrade'),
]
operations = [
migrations.CreateModel(
name='GradeAnswerCounter',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, verbose_name='ID', serialize=False)),
('answer', models.IntegerField(verbose_name='answer')),
('count', models.IntegerField(verbose_name='count', default=0)),
('contribution', models.ForeignKey(to='evaluation.Contribution', on_delete=django.db.models.deletion.CASCADE)),
('question', models.ForeignKey(to='evaluation.Question', on_delete=django.db.models.deletion.CASCADE)),
],
options={
'verbose_name_plural': 'grade answers',
'verbose_name': 'grade answer',
},
),
migrations.CreateModel(
name='LikertAnswerCounter',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, verbose_name='ID', serialize=False)),
('answer', models.IntegerField(verbose_name='answer')),
('count', models.IntegerField(verbose_name='count', default=0)),
('contribution', models.ForeignKey(to='evaluation.Contribution', on_delete=django.db.models.deletion.CASCADE)),
('question', models.ForeignKey(to='evaluation.Question', on_delete=django.db.models.deletion.CASCADE)),
],
options={
'verbose_name_plural': 'Likert answers',
'verbose_name': 'Likert answer',
},
),
]
| 43.243902
| 127
| 0.591653
| 161
| 1,773
| 6.36646
| 0.298137
| 0.107317
| 0.068293
| 0.107317
| 0.70439
| 0.70439
| 0.70439
| 0.70439
| 0.70439
| 0.70439
| 0
| 0.006192
| 0.271292
| 1,773
| 40
| 128
| 44.325
| 0.787152
| 0
| 0
| 0.555556
| 0
| 0
| 0.203046
| 0.038917
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.055556
| 0
| 0.138889
| 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
|
0e8c7d505cc26e1292591d65d15f21279d1ccc49
| 83
|
py
|
Python
|
model/__init__.py
|
Sp00nyMan/BackgroundMattingV2-TensorFlow
|
c97d93f534a4c17ec18aa437bcf8c2980652f0fb
|
[
"MIT"
] | 75
|
2020-12-15T10:49:09.000Z
|
2022-03-19T01:42:40.000Z
|
model/__init__.py
|
Sp00nyMan/BackgroundMattingV2-TensorFlow
|
c97d93f534a4c17ec18aa437bcf8c2980652f0fb
|
[
"MIT"
] | 5
|
2020-12-15T19:36:27.000Z
|
2021-04-27T01:22:27.000Z
|
model/__init__.py
|
Sp00nyMan/BackgroundMattingV2-TensorFlow
|
c97d93f534a4c17ec18aa437bcf8c2980652f0fb
|
[
"MIT"
] | 11
|
2020-12-15T10:43:43.000Z
|
2021-09-25T18:59:46.000Z
|
from .model import MattingBase, MattingRefine
from .utils import load_torch_weights
| 41.5
| 45
| 0.86747
| 11
| 83
| 6.363636
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.096386
| 83
| 2
| 46
| 41.5
| 0.933333
| 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
|
7d02cb1d0a3d7afb77b78390eba60dfd1fd1d300
| 3,069
|
py
|
Python
|
rpxdock/tests/conftest.py
|
willsheffler/tcdock
|
c7b8614221f4a94750054bfe5dfb12298e8d05b8
|
[
"Apache-2.0"
] | 6
|
2020-09-08T09:31:52.000Z
|
2022-03-29T09:53:30.000Z
|
rpxdock/tests/conftest.py
|
willsheffler/tcdock
|
c7b8614221f4a94750054bfe5dfb12298e8d05b8
|
[
"Apache-2.0"
] | 9
|
2020-04-13T21:11:50.000Z
|
2022-03-09T00:57:37.000Z
|
rpxdock/tests/conftest.py
|
willsheffler/tcdock
|
c7b8614221f4a94750054bfe5dfb12298e8d05b8
|
[
"Apache-2.0"
] | 3
|
2020-04-13T20:04:20.000Z
|
2021-12-16T22:43:50.000Z
|
import pytest, os, sys, _pickle
from os.path import join, dirname, abspath, exists
from rpxdock import data
from rpxdock.rosetta.triggers_init import get_pose_cached
from rpxdock import ResPairData, RpxHier
from rpxdock.search.result import dummy_result
# addoption doesn't work for me
# def pytest_addoption(parser):
# parser.addoption(
# "--runslow", action="store_true", default=False, help="run slow tests"
# )
#
#
# def pytest_collection_modifyitems(config, items):
# if config.getoption("--runslow"):
# # --runslow given in cli: do not skip slow tests
# return
# skip_slow = pytest.mark.skip(reason="need --runslow option to run")
# for item in items:
# if "slow" in item.keywords:
# item.add_marker(skip_slow)
@pytest.fixture(scope="session")
def datadir():
print('fixture datadir', data.datadir)
assert exists(data.datadir)
return data.datadir
@pytest.fixture(scope="session")
def pdbdir(datadir):
d = join(datadir, "pdb")
assert exists(d)
return d
@pytest.fixture(scope="session")
def C2_3hm4(pdbdir):
return get_pose_cached("C2_3hm4_1.pdb.gz", pdbdir)
@pytest.fixture(scope="session")
def C3_1nza(pdbdir):
return get_pose_cached("C3_1nza_1.pdb.gz", pdbdir)
@pytest.fixture(scope="session")
def top7(pdbdir):
return get_pose_cached("top7.pdb.gz", pdbdir)
@pytest.fixture(scope="session")
def C5_1ojx(pdbdir):
return get_pose_cached("C5_1ojx.pdb.gz", pdbdir)
@pytest.fixture(scope="session")
def respairdat(datadir):
return data.small_respairdat()
@pytest.fixture(scope="session")
def respairscore(datadir):
return data.small_respairscore()
@pytest.fixture(scope="session")
def hscore():
return data.small_hscore()
@pytest.fixture(scope="session")
def body():
return data.get_body('DHR14')
@pytest.fixture(scope="session")
def body2():
return data.get_body('top7')
@pytest.fixture(scope="session")
def plug():
return data.get_body('dhr64')
@pytest.fixture(scope="session")
def hole():
return data.get_body('small_c3_hole_sym3')
@pytest.fixture(scope="session")
def body_c3_mono():
return data.get_body('test_c3_mono')
@pytest.fixture(scope="session")
def body_cageA():
return data.get_body('T33_dn2_asymA')
@pytest.fixture(scope="session")
def body_cageB():
return data.get_body('T33_dn2_asymB')
@pytest.fixture(scope="session")
def body_cageA_extended():
return data.get_body('T33_dn2_asymA_extended')
@pytest.fixture(scope="session")
def body_cageB_extended():
return data.get_body('T33_dn2_asymB_extended')
@pytest.fixture(scope="session")
def bodyC2():
return data.get_body('C2_REFS10_1')
@pytest.fixture(scope="session")
def bodyC3():
return data.get_body('C3_1na0-1_1')
@pytest.fixture(scope="session")
def bodyC4():
return data.get_body('C4_1na0-G1_1')
@pytest.fixture(scope="session")
def bodyC6():
return data.get_body('C6_3H22')
@pytest.fixture(scope="session")
def body_tiny():
return data.get_body('tiny')
@pytest.fixture(scope="session")
def result():
return dummy_result()
| 24.75
| 80
| 0.722711
| 435
| 3,069
| 4.921839
| 0.25977
| 0.145726
| 0.201775
| 0.280243
| 0.473143
| 0.308734
| 0.202709
| 0.073797
| 0.037366
| 0
| 0
| 0.02323
| 0.130336
| 3,069
| 123
| 81
| 24.95122
| 0.778943
| 0.16129
| 0
| 0.292683
| 0
| 0
| 0.157215
| 0.017208
| 0
| 0
| 0
| 0
| 0.02439
| 1
| 0.292683
| false
| 0
| 0.073171
| 0.268293
| 0.658537
| 0.012195
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
7d178b855d327d1dc831049543facb8d477158f3
| 104
|
py
|
Python
|
01_Python_Basico_Intermediario/Aula003/aula03.py
|
Joao-Inacio/Curso-de-Python3
|
179d85f43f77dced640ffb143a87214538254cf3
|
[
"MIT"
] | 1
|
2021-07-19T12:31:49.000Z
|
2021-07-19T12:31:49.000Z
|
01_Python_Basico_Intermediario/Aula003/aula03.py
|
Joao-Inacio/Curso-de-Python3
|
179d85f43f77dced640ffb143a87214538254cf3
|
[
"MIT"
] | null | null | null |
01_Python_Basico_Intermediario/Aula003/aula03.py
|
Joao-Inacio/Curso-de-Python3
|
179d85f43f77dced640ffb143a87214538254cf3
|
[
"MIT"
] | null | null | null |
"""
str - string
"""
print('Alguma coisa')
print("Aspa duplas")
print("Essa é uma 'str' com duas aspa")
| 14.857143
| 39
| 0.644231
| 16
| 104
| 4.1875
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153846
| 104
| 6
| 40
| 17.333333
| 0.761364
| 0.115385
| 0
| 0
| 0
| 0
| 0.630952
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
7d1d242479fb997af22aa1529f1b99857a371a06
| 129
|
py
|
Python
|
django/tools/admin.py
|
svaswani/STEALTH
|
152acc470a0015e1178d4e5e2b83cfdf1329417b
|
[
"MIT"
] | null | null | null |
django/tools/admin.py
|
svaswani/STEALTH
|
152acc470a0015e1178d4e5e2b83cfdf1329417b
|
[
"MIT"
] | null | null | null |
django/tools/admin.py
|
svaswani/STEALTH
|
152acc470a0015e1178d4e5e2b83cfdf1329417b
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from tools.models import Post, Comment
admin.site.register(Post)
admin.site.register(Comment)
| 18.428571
| 38
| 0.813953
| 19
| 129
| 5.526316
| 0.578947
| 0.171429
| 0.32381
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.100775
| 129
| 6
| 39
| 21.5
| 0.905172
| 0
| 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
|
adeadca40135ba6bb089615e94f1018c01288c15
| 56
|
py
|
Python
|
datasets/__init__.py
|
jackklys/wake-sleep-modifications
|
f3e515eea8f683bf32bf3cfeed31a237bfcc2347
|
[
"MIT"
] | 2
|
2018-06-11T03:41:09.000Z
|
2019-11-25T09:39:01.000Z
|
datasets/__init__.py
|
jackklys/wake-sleep-modifications
|
f3e515eea8f683bf32bf3cfeed31a237bfcc2347
|
[
"MIT"
] | null | null | null |
datasets/__init__.py
|
jackklys/wake-sleep-modifications
|
f3e515eea8f683bf32bf3cfeed31a237bfcc2347
|
[
"MIT"
] | 3
|
2017-07-21T08:40:21.000Z
|
2020-10-04T21:15:53.000Z
|
from mnist import MNIST
from bsds import BSDS_patches
| 18.666667
| 30
| 0.821429
| 9
| 56
| 5
| 0.555556
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.178571
| 56
| 2
| 31
| 28
| 0.978261
| 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
|
adf5e2d6e082ba08f6fa510fd875c6c47396cc89
| 47
|
py
|
Python
|
tests/__init__.py
|
inecik/bioidtracker
|
b82493435ec561131c20498c629bfac953f71eb0
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
inecik/bioidtracker
|
b82493435ec561131c20498c629bfac953f71eb0
|
[
"MIT"
] | 15
|
2022-03-02T13:33:11.000Z
|
2022-03-28T12:28:23.000Z
|
tests/__init__.py
|
inecik/bioidtracker
|
b82493435ec561131c20498c629bfac953f71eb0
|
[
"MIT"
] | null | null | null |
"""Test suite for the bioidtracker package."""
| 23.5
| 46
| 0.723404
| 6
| 47
| 5.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12766
| 47
| 1
| 47
| 47
| 0.829268
| 0.851064
| 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
|
70befede14e1e8c692e9a17cf5578e37c621b5ac
| 24
|
py
|
Python
|
helo.py
|
satyam720/hello-world
|
3c3dc1a80621c1e012524198e0f92ed39fc0d2bb
|
[
"MIT"
] | 8
|
2020-10-03T15:07:19.000Z
|
2021-10-03T07:59:32.000Z
|
helo.py
|
satyam720/hello-world
|
3c3dc1a80621c1e012524198e0f92ed39fc0d2bb
|
[
"MIT"
] | 52
|
2020-10-01T19:19:50.000Z
|
2021-10-30T16:56:02.000Z
|
helo.py
|
satyam720/hello-world
|
3c3dc1a80621c1e012524198e0f92ed39fc0d2bb
|
[
"MIT"
] | 40
|
2020-10-01T19:16:31.000Z
|
2021-10-31T14:19:44.000Z
|
print("namaskar duniya")
| 24
| 24
| 0.791667
| 3
| 24
| 6.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.041667
| 24
| 1
| 24
| 24
| 0.826087
| 0
| 0
| 0
| 0
| 0
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
70cdf77411310a7d0e2b39f9c1ce90ffd7340f11
| 104
|
py
|
Python
|
transferapp/tests/__init__.py
|
AlpsRunner/money_tranfer_page
|
f9c25b8907967a7b391a1758528bdcd441e19fe4
|
[
"MIT"
] | null | null | null |
transferapp/tests/__init__.py
|
AlpsRunner/money_tranfer_page
|
f9c25b8907967a7b391a1758528bdcd441e19fe4
|
[
"MIT"
] | null | null | null |
transferapp/tests/__init__.py
|
AlpsRunner/money_tranfer_page
|
f9c25b8907967a7b391a1758528bdcd441e19fe4
|
[
"MIT"
] | 1
|
2021-02-18T00:22:28.000Z
|
2021-02-18T00:22:28.000Z
|
from .test_transfer_page import TransferPageTest
from .test_transfer_proceed import TransferProceedTest
| 34.666667
| 54
| 0.903846
| 12
| 104
| 7.5
| 0.666667
| 0.177778
| 0.355556
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.076923
| 104
| 2
| 55
| 52
| 0.9375
| 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
| 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
|
70e91244e68d5a08005d29663d4260568155a56e
| 54
|
py
|
Python
|
enthought/traits/ui/qt4/tree_editor.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | 3
|
2016-12-09T06:05:18.000Z
|
2018-03-01T13:00:29.000Z
|
enthought/traits/ui/qt4/tree_editor.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | 1
|
2020-12-02T00:51:32.000Z
|
2020-12-02T08:48:55.000Z
|
enthought/traits/ui/qt4/tree_editor.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | null | null | null |
# proxy module
from traitsui.qt4.tree_editor import *
| 18
| 38
| 0.796296
| 8
| 54
| 5.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021277
| 0.12963
| 54
| 2
| 39
| 27
| 0.87234
| 0.222222
| 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
|
cb11be11a2a8545a63f1acf903987ad0269120fd
| 106
|
py
|
Python
|
model/__init__.py
|
WingsUpete/RSODP
|
35478b02a438c9af2d5d04ee3c60ce70f7c15269
|
[
"MIT"
] | 4
|
2021-03-14T10:11:26.000Z
|
2022-01-21T05:43:20.000Z
|
model/__init__.py
|
WingsUpete/RSODP
|
35478b02a438c9af2d5d04ee3c60ce70f7c15269
|
[
"MIT"
] | 4
|
2021-11-23T00:41:14.000Z
|
2022-01-20T05:43:58.000Z
|
model/__init__.py
|
WingsUpete/RSODP
|
35478b02a438c9af2d5d04ee3c60ce70f7c15269
|
[
"MIT"
] | null | null | null |
from .Gallat import Gallat
from .GallatExt import GallatExt, GallatExtFull
from .AutoRegressive import AR
| 26.5
| 47
| 0.839623
| 13
| 106
| 6.846154
| 0.538462
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122642
| 106
| 3
| 48
| 35.333333
| 0.956989
| 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
|
cb1e35fce94fbc5cb81cd09b071a9700ef65937b
| 36
|
py
|
Python
|
dothomeassistant/custom_components/rotel_rsp1570/__init__.py
|
pp81381/hassdev
|
2615821c27f423bf731883c19e1628db147bed6c
|
[
"MIT"
] | 1
|
2021-01-31T10:42:23.000Z
|
2021-01-31T10:42:23.000Z
|
dothomeassistant/custom_components/rotel_rsp1570/__init__.py
|
pp81381/hassdev
|
2615821c27f423bf731883c19e1628db147bed6c
|
[
"MIT"
] | null | null | null |
dothomeassistant/custom_components/rotel_rsp1570/__init__.py
|
pp81381/hassdev
|
2615821c27f423bf731883c19e1628db147bed6c
|
[
"MIT"
] | null | null | null |
"""Rotel Media Player component."""
| 18
| 35
| 0.694444
| 4
| 36
| 6.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 36
| 1
| 36
| 36
| 0.78125
| 0.805556
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
cb65b457d19ac7e76fe927c0626eb5e9dc65491e
| 160
|
py
|
Python
|
tests/web_platform/css_flexbox_1/test_flex_direction_column.py
|
fletchgraham/colosseum
|
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
|
[
"BSD-3-Clause"
] | null | null | null |
tests/web_platform/css_flexbox_1/test_flex_direction_column.py
|
fletchgraham/colosseum
|
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
|
[
"BSD-3-Clause"
] | null | null | null |
tests/web_platform/css_flexbox_1/test_flex_direction_column.py
|
fletchgraham/colosseum
|
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
|
[
"BSD-3-Clause"
] | 1
|
2020-01-16T01:56:41.000Z
|
2020-01-16T01:56:41.000Z
|
from tests.utils import W3CTestCase
class TestFlexDirection_Column(W3CTestCase):
vars().update(W3CTestCase.find_tests(__file__, 'flex-direction_column'))
| 26.666667
| 76
| 0.8125
| 18
| 160
| 6.833333
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.020548
| 0.0875
| 160
| 5
| 77
| 32
| 0.821918
| 0
| 0
| 0
| 0
| 0
| 0.132075
| 0.132075
| 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
|
cb926515a52cb2ef798bcd0b651338711e6f90f7
| 120
|
py
|
Python
|
ars_lib/__init__.py
|
thanhbok26b/mujoco-rewards-landscape-visualization
|
c1a95b38a0ea03468bbbb7ce013eff37ccd67101
|
[
"MIT"
] | null | null | null |
ars_lib/__init__.py
|
thanhbok26b/mujoco-rewards-landscape-visualization
|
c1a95b38a0ea03468bbbb7ce013eff37ccd67101
|
[
"MIT"
] | null | null | null |
ars_lib/__init__.py
|
thanhbok26b/mujoco-rewards-landscape-visualization
|
c1a95b38a0ea03468bbbb7ce013eff37ccd67101
|
[
"MIT"
] | null | null | null |
from .operators import Factor
from .helpers import get_optimization_results
from tqdm import trange
import numpy as np
| 20
| 45
| 0.841667
| 18
| 120
| 5.5
| 0.722222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.141667
| 120
| 5
| 46
| 24
| 0.961165
| 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
|
cb92a5b89d755f3b95dad8c9ad9139de97be66ba
| 144
|
py
|
Python
|
src/objs/__init__.py
|
nathancohen4299/v-stream
|
2a515afe56b54cea86cb1628096f9d6216b4cb5b
|
[
"MIT"
] | null | null | null |
src/objs/__init__.py
|
nathancohen4299/v-stream
|
2a515afe56b54cea86cb1628096f9d6216b4cb5b
|
[
"MIT"
] | 6
|
2021-04-06T18:25:35.000Z
|
2022-03-01T05:29:13.000Z
|
src/objs/__init__.py
|
nathancohen4299/v-stream
|
2a515afe56b54cea86cb1628096f9d6216b4cb5b
|
[
"MIT"
] | null | null | null |
from .frame import Frame
from .frame_builder import FrameBuilder
from .metadata import Metadata
from .packet import Packet
from .ack import Ack
| 24
| 39
| 0.826389
| 21
| 144
| 5.619048
| 0.380952
| 0.152542
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.138889
| 144
| 5
| 40
| 28.8
| 0.951613
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
cb97e75ca4ddb90632b5cddda9d1b8ae6896b946
| 105
|
py
|
Python
|
src/augury/pipelines/betting/__init__.py
|
tipresias/augury
|
eaae2a7d27ee8c39796231ec55e0e2a82b59d60c
|
[
"MIT"
] | 4
|
2019-12-05T06:02:08.000Z
|
2022-02-01T23:49:23.000Z
|
src/augury/pipelines/betting/__init__.py
|
tipresias/augury
|
eaae2a7d27ee8c39796231ec55e0e2a82b59d60c
|
[
"MIT"
] | 143
|
2019-07-30T11:06:56.000Z
|
2022-03-14T19:02:39.000Z
|
src/augury/pipelines/betting/__init__.py
|
tipresias/augury
|
eaae2a7d27ee8c39796231ec55e0e2a82b59d60c
|
[
"MIT"
] | 3
|
2019-12-30T22:57:41.000Z
|
2020-12-31T02:39:07.000Z
|
"""Pipeline and nodes for loading and processing betting data."""
from .pipeline import create_pipeline
| 26.25
| 65
| 0.790476
| 14
| 105
| 5.857143
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.133333
| 105
| 3
| 66
| 35
| 0.901099
| 0.561905
| 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
|
cbbb3071c0ccf6951471006e0592a8edc011cae0
| 188
|
py
|
Python
|
app_guis.py
|
wotreeclapton/Stucom_app
|
344f7f931fa1900dd7822e18cd67ce66057a7d99
|
[
"MIT"
] | null | null | null |
app_guis.py
|
wotreeclapton/Stucom_app
|
344f7f931fa1900dd7822e18cd67ce66057a7d99
|
[
"MIT"
] | null | null | null |
app_guis.py
|
wotreeclapton/Stucom_app
|
344f7f931fa1900dd7822e18cd67ce66057a7d99
|
[
"MIT"
] | null | null | null |
#! python 3
'''
STUDENT COMMENTS APPLICATION GUIS developed by Mr Steven J walden
(Stucom)
Feb. 2020
SAMROIYOD, PRACHUAP KIRI KHAN, THAILAND
[See License.txt file]
'''
import sys
| 17.090909
| 65
| 0.718085
| 26
| 188
| 5.192308
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.033113
| 0.196809
| 188
| 10
| 66
| 18.8
| 0.860927
| 0.882979
| 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
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
1dc62ba24c5e4290c1b5b8757c6e4b86d20e2a7a
| 39
|
py
|
Python
|
toHeroku.py
|
clu8zz/info3180Project
|
e5204518aaadfc561652155468587610f276a3ac
|
[
"MIT"
] | null | null | null |
toHeroku.py
|
clu8zz/info3180Project
|
e5204518aaadfc561652155468587610f276a3ac
|
[
"MIT"
] | null | null | null |
toHeroku.py
|
clu8zz/info3180Project
|
e5204518aaadfc561652155468587610f276a3ac
|
[
"MIT"
] | null | null | null |
from dbModel import db
db.create_all()
| 13
| 22
| 0.794872
| 7
| 39
| 4.285714
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.128205
| 39
| 2
| 23
| 19.5
| 0.882353
| 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
|
1df5da6a374b96ed20ae88e23c4bd46e5efc8760
| 159
|
py
|
Python
|
bin/ominoes/pentominoes-flower-5.py
|
tiwo/puzzler
|
7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e
|
[
"Intel"
] | null | null | null |
bin/ominoes/pentominoes-flower-5.py
|
tiwo/puzzler
|
7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e
|
[
"Intel"
] | null | null | null |
bin/ominoes/pentominoes-flower-5.py
|
tiwo/puzzler
|
7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e
|
[
"Intel"
] | 1
|
2022-01-02T16:54:14.000Z
|
2022-01-02T16:54:14.000Z
|
#!/usr/bin/env python
# $Id$
"""1595 solutions"""
import puzzler
from puzzler.puzzles.pentominoes import PentominoesFlower5
puzzler.run(PentominoesFlower5)
| 15.9
| 58
| 0.779874
| 18
| 159
| 6.888889
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.041958
| 0.100629
| 159
| 9
| 59
| 17.666667
| 0.825175
| 0.251572
| 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
|
381adcfb4e31e773b106341b1911eb820f7dbd0e
| 854
|
py
|
Python
|
tests/fixtures/mocks/DataStub.py
|
martenson/RIAssigner
|
140de7cb0b1ca4807417f2c99f11bd47d846ecd7
|
[
"MIT"
] | 3
|
2021-04-20T12:44:15.000Z
|
2021-06-29T14:24:57.000Z
|
tests/fixtures/mocks/DataStub.py
|
martenson/RIAssigner
|
140de7cb0b1ca4807417f2c99f11bd47d846ecd7
|
[
"MIT"
] | 53
|
2021-04-09T14:09:41.000Z
|
2022-03-10T08:24:16.000Z
|
tests/fixtures/mocks/DataStub.py
|
martenson/RIAssigner
|
140de7cb0b1ca4807417f2c99f11bd47d846ecd7
|
[
"MIT"
] | 3
|
2021-04-09T14:06:05.000Z
|
2021-07-15T10:18:29.000Z
|
from typing import Iterable, Optional
from RIAssigner.data.Data import Data
class DataStub(Data):
""" Mock class for data. """
def __init__(self, retention_times: Iterable[float], retention_indices: Iterable[float]):
self._retention_times = retention_times
self._retention_indices = retention_indices
def read(self):
pass
def write(self, filename):
pass
@property
def filename(self):
return "mock"
@property
def retention_times(self) -> Iterable[Optional[float]]:
return self._retention_times
@property
def retention_indices(self) -> Iterable[Optional[float]]:
return self._retention_indices
@retention_indices.setter
def retention_indices(self, value: Iterable[float]):
self._retention_indices = value
| 26.6875
| 94
| 0.662763
| 92
| 854
| 5.913043
| 0.282609
| 0.235294
| 0.099265
| 0.095588
| 0.270221
| 0.161765
| 0.161765
| 0
| 0
| 0
| 0
| 0
| 0.250585
| 854
| 31
| 95
| 27.548387
| 0.85
| 0.023419
| 0
| 0.227273
| 0
| 0
| 0.005031
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.318182
| false
| 0.090909
| 0.090909
| 0.136364
| 0.590909
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 5
|
3823d8d55ae1528d667316dba61d3387cc685194
| 151
|
py
|
Python
|
example_valid_py39/example.py
|
fgrie/actions-flake8
|
53b93035976957966158756025d575cc49bdf8a6
|
[
"MIT"
] | 19
|
2019-11-30T16:43:10.000Z
|
2021-12-11T18:57:08.000Z
|
example_valid_py39/example.py
|
fgrie/actions-flake8
|
53b93035976957966158756025d575cc49bdf8a6
|
[
"MIT"
] | 12
|
2020-05-13T02:55:20.000Z
|
2021-06-29T22:06:39.000Z
|
example_valid_py39/example.py
|
fgrie/actions-flake8
|
53b93035976957966158756025d575cc49bdf8a6
|
[
"MIT"
] | 7
|
2020-05-12T13:34:11.000Z
|
2021-10-06T17:48:29.000Z
|
class Decorator:
def dec(self, func):
return func
buttons = [Decorator() for i in range(10)]
@buttons[0].dec
def good_code():
pass
| 12.583333
| 42
| 0.622517
| 22
| 151
| 4.227273
| 0.772727
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.026549
| 0.251656
| 151
| 11
| 43
| 13.727273
| 0.79646
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0.142857
| 0
| 0.142857
| 0.571429
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 5
|
383622519bad264b721c8bb386973d3756e42a6c
| 106
|
py
|
Python
|
ec2hashcat/aws/__init__.py
|
wrboyce/ec2hashcat
|
f71360ce31582f8a73021fcf5b53017cbb655b00
|
[
"Apache-2.0"
] | 24
|
2015-09-29T04:36:48.000Z
|
2020-02-19T22:50:34.000Z
|
ec2hashcat/aws/__init__.py
|
wrboyce/ec2hashcat
|
f71360ce31582f8a73021fcf5b53017cbb655b00
|
[
"Apache-2.0"
] | 4
|
2016-01-03T19:37:49.000Z
|
2018-12-18T21:51:37.000Z
|
ec2hashcat/aws/__init__.py
|
wrboyce/ec2hashcat
|
f71360ce31582f8a73021fcf5b53017cbb655b00
|
[
"Apache-2.0"
] | 9
|
2015-09-29T02:49:39.000Z
|
2019-02-13T02:17:48.000Z
|
""" Copyright 2015 Will Boyce """
from ec2 import Ec2, Ec2Instance, SecurityGroup
from s3 import S3Bucket
| 26.5
| 47
| 0.773585
| 14
| 106
| 5.857143
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 0.150943
| 106
| 3
| 48
| 35.333333
| 0.811111
| 0.235849
| 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
|
384a9d329930fff7294d9b69a79ec46f096c7741
| 95
|
py
|
Python
|
model/__init__.py
|
YunYinORG/social
|
5020e980cacd8eca39fccc36faabc584f3c3e15f
|
[
"Apache-2.0"
] | 4
|
2015-12-20T14:57:57.000Z
|
2021-01-23T12:54:20.000Z
|
model/__init__.py
|
YunYinORG/social
|
5020e980cacd8eca39fccc36faabc584f3c3e15f
|
[
"Apache-2.0"
] | 1
|
2016-03-13T15:19:02.000Z
|
2016-03-18T03:11:18.000Z
|
model/__init__.py
|
YunYinORG/social
|
5020e980cacd8eca39fccc36faabc584f3c3e15f
|
[
"Apache-2.0"
] | 4
|
2015-12-21T02:26:29.000Z
|
2016-09-03T02:57:07.000Z
|
#!/usr/bin/env python
# coding=utf-8
from user import userModel
from record import recordModel
| 19
| 30
| 0.789474
| 15
| 95
| 5
| 0.866667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012048
| 0.126316
| 95
| 4
| 31
| 23.75
| 0.891566
| 0.347368
| 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
|
698b68589d4891e514249aae5aa8b0ef5e7ddf8c
| 25
|
py
|
Python
|
loam/parts/silego/greenpak4/__init__.py
|
splhack/loam
|
10b08bd622b7cfd63eabaec4729f6238e4521b30
|
[
"MIT"
] | 14
|
2017-10-08T09:16:10.000Z
|
2021-11-27T19:12:24.000Z
|
loam/parts/silego/greenpak4/__init__.py
|
splhack/loam
|
10b08bd622b7cfd63eabaec4729f6238e4521b30
|
[
"MIT"
] | 7
|
2018-04-12T21:33:49.000Z
|
2018-08-21T22:14:20.000Z
|
loam/parts/silego/greenpak4/__init__.py
|
splhack/loam
|
10b08bd622b7cfd63eabaec4729f6238e4521b30
|
[
"MIT"
] | 3
|
2018-07-24T04:55:02.000Z
|
2019-12-30T08:12:39.000Z
|
from .greenpak4 import *
| 12.5
| 24
| 0.76
| 3
| 25
| 6.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.047619
| 0.16
| 25
| 1
| 25
| 25
| 0.857143
| 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
|
69c5102da4fd3086be1a8f93a1b676e0c4aa9039
| 18,711
|
py
|
Python
|
python/hetu/gpu_ops/Conv2d.py
|
zpxbjdx/Hetu
|
e84b6436b668e56b4e97a5fcc2ced08780f2a3c3
|
[
"Apache-2.0"
] | 82
|
2021-07-20T02:45:54.000Z
|
2022-03-14T07:08:45.000Z
|
python/hetu/gpu_ops/Conv2d.py
|
zpxbjdx/Hetu
|
e84b6436b668e56b4e97a5fcc2ced08780f2a3c3
|
[
"Apache-2.0"
] | 4
|
2021-11-25T13:39:21.000Z
|
2022-03-13T04:14:14.000Z
|
python/hetu/gpu_ops/Conv2d.py
|
zpxbjdx/Hetu
|
e84b6436b668e56b4e97a5fcc2ced08780f2a3c3
|
[
"Apache-2.0"
] | 13
|
2021-07-18T14:40:56.000Z
|
2022-03-09T06:37:42.000Z
|
from __future__ import absolute_import
import numpy as np
from .Node import Op
from .._base import DNNL_LIB
from ..cpu_links import conv2d as cpu_conv2d
from ..cpu_links import conv2d_gradient_of_data as cpu_conv2d_gradient_of_data
from ..cpu_links import conv2d_gradient_of_filter as cpu_conv2d_gradient_of_filter
from ..gpu_links import CuDNN_conv2d
from ..gpu_links import CuDNN_conv2d_gradient_of_data
from ..gpu_links import CuDNN_conv2d_gradient_of_filter
class Conv2dOp(Op):
# nodeA : x nodeB : filter
def __init__(self, node_A, node_B, padding=0, stride=1, ctx=None):
super().__init__(Conv2dOp, [node_A, node_B], ctx)
if not isinstance(padding, tuple):
assert isinstance(padding, int)
padding = (padding, padding)
self.padding = padding
if not isinstance(stride, tuple):
assert isinstance(stride, int)
stride = (stride, stride)
self.stride = stride
def im2col(self, X, filter_H, filter_W, padding, stride):
N, C, H, W = X.shape
assert (H + 2 * padding[0] - filter_H) % stride[0] == 0
assert (W + 2 * padding[1] - filter_W) % stride[1] == 0
out_H = (H + 2 * padding[0] - filter_H) // stride[0] + 1
out_W = (W + 2 * padding[1] - filter_W) // stride[1] + 1
y_row_size = C * filter_H * filter_W
y_col_size = out_H * out_W
y_shape = (N, y_row_size, y_col_size)
Y = np.empty(y_shape, dtype=X.dtype)
for batch_index in range(N):
for col_index in range(y_col_size):
out_y = col_index // out_W
out_x = col_index % out_W
in_y = out_y * stride[0] - padding[0]
in_x = out_x * stride[1] - padding[1]
row_idx = 0
for c in range(0, C):
for y in range(in_y, in_y + filter_H):
for x in range(in_x, in_x + filter_W):
if (x < 0 or x >= W or y < 0 or y >= H):
Y[batch_index, row_idx, col_index] = 0
else:
Y[batch_index, row_idx,
col_index] = X[batch_index, c, y, x]
row_idx += 1
return Y
def np_conv2d(self, X, Filter, padding=(0, 0), stride=(1, 1)):
"""Implement a conv2d as a matrix multiply after im2col."""
filter_outChannel, filter_inChannel, filter_H, filter_W = Filter.shape
N, C, H, W = X.shape
assert (H + 2 * padding[0] - filter_H) % stride[0] == 0
assert (W + 2 * padding[1] - filter_W) % stride[1] == 0
out_H = (H + 2 * padding[0] - filter_H) // stride[0] + 1
out_W = (W + 2 * padding[1] - filter_W) // stride[1] + 1
im2col_matrix = self.im2col(X, filter_H, filter_W, padding, stride)
filter_matrix = Filter.reshape(filter_outChannel, -1)
return np.matmul(filter_matrix, im2col_matrix).reshape(N, filter_outChannel, out_H, out_W)
def compute(self, input_vals, output_val, stream_handle=None):
if self.on_cpu:
if DNNL_LIB['DnnlConv2d']:
cpu_conv2d(input_vals[0], input_vals[1],
output_val, self.padding, self.stride)
else:
output_val[:] = self.np_conv2d(
input_vals[0].asnumpy(), input_vals[1].asnumpy(), self.padding, self.stride)
else:
CuDNN_conv2d(input_vals[0], input_vals[1],
output_val, self.padding, self.stride, stream_handle)
def gradient(self, output_grad):
return [conv2d_gradient_of_data_op(self.inputs[1], output_grad, self.inputs[0], self.padding, self.stride, ctx=self.raw_ctx),
conv2d_gradient_of_filter_op(self.inputs[0], output_grad, self.inputs[1], self.padding, self.stride, ctx=self.raw_ctx)]
def infer_shape(self, input_shapes):
assert len(input_shapes) == 2
N, _, H, W = input_shapes[0]
f_O, _, f_H, f_W = input_shapes[1]
padding = self.padding
stride = self.stride
filter_H = input_shapes[1][2]
filter_W = input_shapes[1][3]
out_H = (H + 2 * padding[0] - filter_H) // stride[0] + 1
out_W = (W + 2 * padding[1] - filter_W) // stride[1] + 1
return (N, f_O, out_H, out_W)
def forward_deduce_states(self, input_statuses, status, deduce_order):
assert len(input_statuses) == len(self.inputs)
l2res_map = {0: 0, 1: -1, -1: 1}
r2res_map = {-1: 0, 0: 1, 1: -1}
conv2d_forward_deduce_states(
input_statuses, status, deduce_order, l2res_map, r2res_map)
def backward_deduce_states(self, status, input_statuses, deduce_order):
assert len(input_statuses) == len(self.inputs)
l2res_map = {0: 0, 1: -1, -1: 1}
r2res_map = {-1: 0, 0: 1, 1: -1}
conv2d_backward_deduce_states(
status, input_statuses, deduce_order, l2res_map, r2res_map)
class Conv2d_Gradient_of_DataOp(Op):
# nodeA : filter nodeB : Y_gradient
def __init__(self, node_A, node_B, node_C, padding=(0, 0), stride=(1, 1), ctx=None):
super().__init__(Conv2d_Gradient_of_DataOp,
[node_A, node_B, node_C], ctx)
if not isinstance(padding, tuple):
assert isinstance(padding, int)
padding = (padding, padding)
if not isinstance(stride, tuple):
assert isinstance(stride, int)
stride = (stride, stride)
self.padding = padding
self.stride = stride
def im2col_transpose(self, N, C, H, W, filter_H, filter_W, Y, padding, stride):
assert (H + 2 * padding[0] - filter_H) % stride[0] == 0
assert (W + 2 * padding[1] - filter_W) % stride[1] == 0
out_H = (H + 2 * padding[0] - filter_H) // stride[0] + 1
out_W = (W + 2 * padding[1] - filter_W) // stride[1] + 1
_, y_row_size, y_col_size = Y.shape
der_X_shape = (N, C, H, W)
der_X = np.zeros(der_X_shape, dtype=Y.dtype)
for batch_index in range(N):
for col_index in range(y_col_size):
out_y = col_index // out_W
out_x = col_index % out_W
in_y = out_y * stride[0] - padding[0]
in_x = out_x * stride[1] - padding[1]
row_idx = 0
for c in range(0, C):
for y in range(in_y, in_y + filter_H):
for x in range(in_x, in_x + filter_W):
if (x < 0 or x >= W or y < 0 or y >= H):
Y[batch_index, row_idx, col_index] = 0
else:
der_X[batch_index, c, y,
x] += Y[batch_index, row_idx, col_index]
row_idx += 1
return der_X
def np_Conv2dGradient_data(self, X_N, X_C, X_H, X_W, Filter, Y, padding=(0, 0), stride=(1, 1)):
filter_outChannel, filter_inChannel, filter_H, filter_W = Filter.shape
Y_N, Y_C, Y_H, Y_W = Y.shape
YY = Y.reshape((Y_N, Y_C, Y_H * Y_W)) # transformed to im2col Y
F_filter = Filter.reshape((filter_outChannel, -1))
gradient_im2col_XX = np.matmul(F_filter.T, YY)
gradient_X = self.im2col_transpose(
X_N, X_C, X_H, X_W, filter_H, filter_W, gradient_im2col_XX, padding, stride) # gradient of x
return gradient_X
def compute(self, input_vals, output_val, stream_handle=None):
if self.on_cpu:
if DNNL_LIB['DnnlConv2d_Gradient_of_Data']:
cpu_conv2d_gradient_of_data(
input_vals[0], input_vals[1], output_val, self.padding, self.stride)
else:
padding = self.padding
stride = self.stride
N = input_vals[1].shape[0]
C = input_vals[0].shape[1]
H = (input_vals[1].shape[2] - 1) * stride[0] + \
input_vals[0].shape[2] - 2 * padding[0]
W = (input_vals[1].shape[3] - 1) * stride[1] + \
input_vals[0].shape[3] - 2 * padding[1]
output_val[:] = self.np_Conv2dGradient_data(
N, C, H, W, input_vals[0].asnumpy(), input_vals[1].asnumpy(), padding=self.padding, stride=self.stride)
else:
CuDNN_conv2d_gradient_of_data(
input_vals[0], input_vals[1], output_val, padding=self.padding, stride=self.stride, stream=stream_handle)
def gradient(self, output_grad):
raise NotImplementedError
def infer_shape(self, input_shapes):
assert len(input_shapes) == 3
return input_shapes[2]
def forward_deduce_states(self, input_statuses, status, deduce_order):
assert len(input_statuses) == len(self.inputs)
l2res_map = {-1: 0, 0: -1, 1: 1}
r2res_map = {-1: 1, 0: 0, 1: -1}
conv2d_forward_deduce_states(
input_statuses[:2], status, deduce_order, l2res_map, r2res_map)
def backward_deduce_states(self, status, input_statuses, deduce_order):
assert len(input_statuses) == len(self.inputs)
l2res_map = {-1: 0, 0: -1, 1: 1}
r2res_map = {-1: 1, 0: 0, 1: -1}
conv2d_backward_deduce_states(
status, input_statuses[:2], deduce_order, l2res_map, r2res_map)
class Conv2d_Gradient_of_FilterOp(Op):
# nodeA : input_x nodeB : gradient_Y
def __init__(self, input_X, gradient_Y, input_filter, padding=(0, 0), stride=(1, 1), ctx=None):
super().__init__(Conv2d_Gradient_of_FilterOp,
[input_X, gradient_Y, input_filter], ctx)
if not isinstance(padding, tuple):
assert isinstance(padding, int)
padding = (padding, padding)
if not isinstance(stride, tuple):
assert isinstance(stride, int)
stride = (stride, stride)
self.padding = padding
self.stride = stride
def im2col(self, X, filter_H, filter_W, padding, stride):
N, C, H, W = X.shape
assert (H + 2 * padding[0] - filter_H) % stride[0] == 0
assert (W + 2 * padding[1] - filter_W) % stride[1] == 0
out_H = (H + 2 * padding[0] - filter_H) // stride[0] + 1
out_W = (W + 2 * padding[1] - filter_W) // stride[1] + 1
y_row_size = C * filter_H * filter_W
y_col_size = out_H * out_W
y_shape = (N, y_row_size, y_col_size)
Y = np.empty(y_shape, dtype=X.dtype)
for batch_index in range(N):
for col_index in range(y_col_size):
out_y = col_index // out_W
out_x = col_index % out_W
in_y = out_y * stride[0] - padding[0]
in_x = out_x * stride[1] - padding[1]
row_idx = 0
for c in range(0, C):
for y in range(in_y, in_y + filter_H):
for x in range(in_x, in_x + filter_W):
if (x < 0 or x >= W or y < 0 or y >= H):
Y[batch_index, row_idx, col_index] = 0
else:
Y[batch_index, row_idx,
col_index] = X[batch_index, c, y, x]
row_idx += 1
return Y
def np_Conv2dGradient_Filter(self, filter_outChannel, filter_inChannel, filter_H, filter_W, X, Y, padding=(0, 0), stride=(1, 1)):
"""Implement a conv2d_transpose as a matrix multiply after im2col."""
X_N, X_C, X_H, X_W = X.shape
Y_N, Y_C, Y_H, Y_W = Y.shape
YY = Y.reshape((Y_N, Y_C, Y_H * Y_W)) # transformed to im2col Y
# XX = X.reshape((X_N, X_C, X_W * X_H)) # transformed to im2col X
im2col_XX = self.im2col(X, filter_H, filter_W, padding, stride)
gradient_filter = np.zeros(shape=(
filter_outChannel, filter_inChannel * filter_H * filter_W), dtype=Y.dtype)
for i in range(X_N):
gradient_filter += np.matmul(YY[i], im2col_XX[i].T)
gradient_filter = gradient_filter.reshape(
(filter_outChannel, filter_inChannel, filter_H, filter_W))
return gradient_filter
def compute(self, input_vals, output_val, stream_handle=None):
if self.on_cpu:
if DNNL_LIB['DnnlConv2d_Gradient_of_Filter']:
cpu_conv2d_gradient_of_filter(
input_vals[0], input_vals[1], output_val, self.padding, self.stride)
else:
padding = self.padding
stride = self.stride
f_N = input_vals[1].shape[1]
f_C = input_vals[0].shape[1]
f_H = input_vals[1].shape[2] + 2 * padding[0] - \
(input_vals[1].shape[2] - 1) * stride[0]
f_W = input_vals[1].shape[3] + 2 * padding[1] - \
(input_vals[1].shape[3] - 1) * stride[1]
output_val[:] = self.np_Conv2dGradient_Filter(
f_N, f_C, f_H, f_W, input_vals[0].asnumpy(), input_vals[1].asnumpy(), padding=self.padding, stride=self.stride)
else:
CuDNN_conv2d_gradient_of_filter(
input_vals[0], input_vals[1], output_val, padding=self.padding, stride=self.stride, stream=stream_handle)
def gradient(self, output_grad):
raise NotImplementedError
def infer_shape(self, input_shapes):
assert len(input_shapes) == 3
return input_shapes[2]
def forward_deduce_states(self, input_statuses, status, deduce_order):
assert len(input_statuses) == len(self.inputs)
l2res_map = {-1: 0, 0: -1, 1: 1}
r2res_map = {-1: 1, 0: -1, 1: 0}
conv2d_forward_deduce_states(
input_statuses[:2], status, deduce_order, l2res_map, r2res_map)
def backward_deduce_states(self, status, input_statuses, deduce_order):
assert len(input_statuses) == len(self.inputs)
l2res_map = {-1: 0, 0: -1, 1: 1}
r2res_map = {-1: 1, 0: -1, 1: 0}
conv2d_backward_deduce_states(
status, input_statuses[:2], deduce_order, l2res_map, r2res_map)
def conv2d_forward_deduce_states(input_statuses, status, deduce_order, l2res_map, r2res_map):
res2l_map = {v: k for k, v in l2res_map.items()}
res2r_map = {v: k for k, v in r2res_map.items()}
if deduce_order:
if input_statuses[0].valid_all():
input_statuses[0].check_state(2, deduce_order)
order = input_statuses[0].order
status.set_order(tuple(l2res_map[x] for x in order))
elif input_statuses[1].valid_all():
input_statuses[1].check_state(2, deduce_order)
order = input_statuses[1].order
status.set_order(tuple(r2res_map[x] for x in order))
else:
if input_statuses[0].valid_state():
input_statuses[0].check_state(2, deduce_order)
state, duplicate = input_statuses[0].get()
keys = dict(state)
keys[-1] = duplicate
res_state = tuple(keys.get(res2l_map[x], 1) for x in range(2))
res_duplicate = keys.get(res2l_map[-1], 1)
status.set_state(res_state, res_duplicate)
elif input_statuses[1].valid_state():
input_statuses[1].check_state(2, deduce_order)
state, duplicate = input_statuses[1].get()
keys = dict(state)
keys[-1] = duplicate
res_state = tuple(keys.get(res2r_map[x], 1) for x in range(2))
res_duplicate = keys.get(res2r_map[-1], 1)
status.set_state(res_state, res_duplicate)
def conv2d_backward_deduce_states(status, input_statuses, deduce_order, l2res_map, r2res_map):
res2l_map = {v: k for k, v in l2res_map.items()}
res2r_map = {v: k for k, v in r2res_map.items()}
if deduce_order:
if status.valid_all():
status.check_state(2, deduce_order)
res_order = tuple(res2l_map[x] for x in status.order)
input_statuses[0].set_order(res_order)
res_order = tuple(res2r_map[x] for x in status.order)
input_statuses[1].set_order(res_order)
else:
if status.valid_state():
status.check_state(2, deduce_order)
state, duplicate = status.get()
keys = dict(state)
keys[-1] = duplicate
res_state = tuple(keys.get(l2res_map[x], 1) for x in range(2))
res_duplicate = keys.get(l2res_map[-1], 1)
input_statuses[0].set_state(res_state, res_duplicate)
res_state = tuple(keys.get(r2res_map[x], 1) for x in range(2))
res_duplicate = keys.get(r2res_map[-1], 1)
input_statuses[1].set_state(res_state, res_duplicate)
else:
if input_statuses[0].state is not None:
key = res2l_map[r2res_map[-1]]
input_statuses[1].set_state(
None, input_statuses[0].state.get(key, 1))
if input_statuses[1].state is not None:
key = res2r_map[l2res_map[-1]]
input_statuses[0].set_state(
None, input_statuses[1].state.get(key, 1))
def conv2d_op(node_A, node_B, padding=0, stride=1, ctx=None):
"""Conv2d node.
Parameters:
----
node_A : Node
Input data node.
node_B : Node
Input filter node.
padding :
Padding size.
stride :
Stride size.
Returns:
----
A new Node instance created by Op.
"""
return Conv2dOp(node_A, node_B, padding, stride, ctx=ctx)
def conv2d_gradient_of_data_op(node_A, node_B, node_C, padding=0, stride=1, ctx=None):
"""Gradient node of data of conv2d.
Parameters:
----
node_A : Node
Filter node.
node_B : Node
Previous gradient node.
node_C : Node
Data node.
padding :
Padding size.
stride :
Stride size.
Returns:
----
A new Node instance created by Op.
"""
return Conv2d_Gradient_of_DataOp(node_A, node_B, node_C, padding, stride, ctx=ctx)
def conv2d_gradient_of_filter_op(input_X, gradient_Y, input_filter, padding=0, stride=1, ctx=None):
"""Gradient node of filters of conv2d.
Parameters:
----
input_X :
Input data of conv2d.
gradient_Y :
Gradient array.
input_filter :
Input filter of conv2d.
padding :
Padding size.
stride :
Stride size.
Returns:
----
A new Node instance created by Op.
"""
return Conv2d_Gradient_of_FilterOp(input_X, gradient_Y, input_filter, padding, stride, ctx=ctx)
| 42.332579
| 135
| 0.575651
| 2,647
| 18,711
| 3.800529
| 0.054779
| 0.054274
| 0.031809
| 0.018091
| 0.849702
| 0.7833
| 0.735785
| 0.712724
| 0.641849
| 0.601292
| 0
| 0.035292
| 0.31249
| 18,711
| 441
| 136
| 42.428571
| 0.746735
| 0.057506
| 0
| 0.606061
| 0
| 0
| 0.00379
| 0.003216
| 0
| 0
| 0
| 0
| 0.069697
| 1
| 0.087879
| false
| 0
| 0.030303
| 0.00303
| 0.166667
| 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
|
69cdb076e62000e4fbc2d91122119aaba85d0cc9
| 44
|
py
|
Python
|
longhaullektor/longhaullektor/__main__.py
|
verhulstm/python_long-haul-lektor
|
09a8539bc6d3fb1713104aa4638489e3a33a697a
|
[
"MIT"
] | null | null | null |
longhaullektor/longhaullektor/__main__.py
|
verhulstm/python_long-haul-lektor
|
09a8539bc6d3fb1713104aa4638489e3a33a697a
|
[
"MIT"
] | null | null | null |
longhaullektor/longhaullektor/__main__.py
|
verhulstm/python_long-haul-lektor
|
09a8539bc6d3fb1713104aa4638489e3a33a697a
|
[
"MIT"
] | null | null | null |
from longhaullektor.cli import main
main()
| 11
| 35
| 0.795455
| 6
| 44
| 5.833333
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136364
| 44
| 3
| 36
| 14.666667
| 0.921053
| 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
|
69f4c9a5fee6afcc664ba18587f055dde3d40783
| 38
|
py
|
Python
|
Cursos-Extras/Python/aula14a.py
|
talessantos49/Primeiros_Passos
|
7eac781fb3663c8cf71629611981d0ebd9f0216f
|
[
"MIT"
] | 1
|
2021-01-30T14:50:55.000Z
|
2021-01-30T14:50:55.000Z
|
aula14.py
|
eng-lenin/Python
|
6038f052b8343878760ed133dd43869927e39b3d
|
[
"MIT"
] | null | null | null |
aula14.py
|
eng-lenin/Python
|
6038f052b8343878760ed133dd43869927e39b3d
|
[
"MIT"
] | null | null | null |
c=1
while c<10:
print(c)
c=c+1
| 9.5
| 12
| 0.5
| 10
| 38
| 1.9
| 0.5
| 0.210526
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153846
| 0.315789
| 38
| 4
| 13
| 9.5
| 0.576923
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.25
| 1
| 1
| 1
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
69fde6e98efa27c4332fcf24dae1e1d983506e39
| 1,209
|
py
|
Python
|
magnetics/fixNewRawNodePtr.py
|
golfit/work-archive
|
bdd37d46fda3fde15ec2164d3335d6b4ed576bd7
|
[
"MIT"
] | null | null | null |
magnetics/fixNewRawNodePtr.py
|
golfit/work-archive
|
bdd37d46fda3fde15ec2164d3335d6b4ed576bd7
|
[
"MIT"
] | null | null | null |
magnetics/fixNewRawNodePtr.py
|
golfit/work-archive
|
bdd37d46fda3fde15ec2164d3335d6b4ed576bd7
|
[
"MIT"
] | null | null | null |
from MDSplus import *
import sys
import myTools_no_sql as myTools
sList=myTools.parseList(sys.argv[1]) #0th argument is script name; first argument is shot number. Parse integer.
#sList=[int(sys.argv[1])]
for s in sList :
#These two nodes had pointers to non-existent digitizers. Fix reference to correct digitizer inputs.
#Need to do this for all of campaign up to and including 1160520
myTree=Tree('magnetics',s)
myTree.getNode('\MAGNETICS::TOP.ACTIVE_MHD.SIGNALS:BP17_ABK:RAW').putData(Data.compile('GETNCI( \MAGNETICS::TOP.ACTIVE_MHD.SIGNALS:BP17_ABK, "ON") ? Build_Signal(Build_With_Units( \MAGNETICS::TOP.ACTIVE_MHD.DATA_ACQ.CPCI:ACQ_216_3:INPUT_10 * 1 / (\MAG_RF_COILS:CALIB[16] * 1), "Tesla/s"), *, \MAGNETICS::TOP.ACTIVE_MHD.SIGNALS:TIMEBASE3 ) : ABORT()'))
myTree.getNode('\MAGNETICS::TOP.ACTIVE_MHD.SIGNALS:BP20_GHK:RAW').putData(Data.compile('GETNCI( \MAGNETICS::TOP.ACTIVE_MHD.SIGNALS:BP20_GHK, "ON") ? Build_Signal(Build_With_Units( \MAGNETICS::TOP.ACTIVE_MHD.DATA_ACQ.CPCI:ACQ_216_3:INPUT_14 * 1 / (\MAG_RF_COILS:CALIB[49] * 1), "Tesla/s"), *, \MAGNETICS::TOP.ACTIVE_MHD.SIGNALS:TIMEBASE3 ) : ABORT()'))
print("Fixed BP17_ABK:RAW and BP20_GHK:RAW for "+str(s))
| 75.5625
| 355
| 0.741935
| 192
| 1,209
| 4.494792
| 0.473958
| 0.11124
| 0.16686
| 0.19467
| 0.570104
| 0.533024
| 0.533024
| 0.405562
| 0.405562
| 0.405562
| 0
| 0.040854
| 0.109181
| 1,209
| 15
| 356
| 80.6
| 0.760446
| 0.216708
| 0
| 0
| 0
| 0.222222
| 0.703075
| 0.525981
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0.111111
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
385e4d5267dc12d6c1ff5fb9fe04a094130acf4c
| 82
|
py
|
Python
|
bot_api/__init__.py
|
Lexparency/lexhost
|
71ad624d4ea608294ed40496e44fbdfcd11622c7
|
[
"MIT"
] | null | null | null |
bot_api/__init__.py
|
Lexparency/lexhost
|
71ad624d4ea608294ed40496e44fbdfcd11622c7
|
[
"MIT"
] | null | null | null |
bot_api/__init__.py
|
Lexparency/lexhost
|
71ad624d4ea608294ed40496e44fbdfcd11622c7
|
[
"MIT"
] | null | null | null |
from .routes import create_botapi
from .views import LatestHistories, DocumentBot
| 27.333333
| 47
| 0.853659
| 10
| 82
| 6.9
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.109756
| 82
| 2
| 48
| 41
| 0.945205
| 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
|
388d42e93d8b9fcaabe42e3c1953011996140554
| 510
|
py
|
Python
|
Plugins/UnrealEnginePython/Binaries/Win64/Lib/site-packages/tensorflow/_api/v1/keras/applications/nasnet/__init__.py
|
JustinACoder/H22-GR3-UnrealAI
|
361eb9ef1147f8a2991e5f98c4118cd823184adf
|
[
"MIT"
] | 6
|
2022-02-04T18:12:24.000Z
|
2022-03-21T23:57:12.000Z
|
Lib/site-packages/tensorflow/_api/v1/keras/applications/nasnet/__init__.py
|
shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings
|
1fa4cd6a566c8745f455fc3d2273208f21f88ced
|
[
"bzip2-1.0.6"
] | null | null | null |
Lib/site-packages/tensorflow/_api/v1/keras/applications/nasnet/__init__.py
|
shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings
|
1fa4cd6a566c8745f455fc3d2273208f21f88ced
|
[
"bzip2-1.0.6"
] | 1
|
2022-02-08T03:53:23.000Z
|
2022-02-08T03:53:23.000Z
|
# This file is MACHINE GENERATED! Do not edit.
# Generated by: tensorflow/python/tools/api/generator/create_python_api.py script.
"""NASNet-A models for Keras.
"""
from __future__ import print_function
from tensorflow.python.keras.applications import NASNetLarge
from tensorflow.python.keras.applications import NASNetMobile
from tensorflow.python.keras.applications.nasnet import decode_predictions
from tensorflow.python.keras.applications.nasnet import preprocess_input
del print_function
| 34
| 83
| 0.817647
| 65
| 510
| 6.261538
| 0.538462
| 0.19656
| 0.19656
| 0.2457
| 0.452088
| 0.452088
| 0.240786
| 0
| 0
| 0
| 0
| 0
| 0.115686
| 510
| 14
| 84
| 36.428571
| 0.902439
| 0.3
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.833333
| 0
| 0.833333
| 0.333333
| 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
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
389b389609cfaaa491bd1e186f077fd73ecd9259
| 2,129
|
py
|
Python
|
tests/integration/actions/inventory/test_direct_interactive_noee_errors.py
|
saito-hideki/ansible-navigator
|
0a15b83c2a9a548315765360bd19d6fd270862d4
|
[
"Apache-2.0"
] | null | null | null |
tests/integration/actions/inventory/test_direct_interactive_noee_errors.py
|
saito-hideki/ansible-navigator
|
0a15b83c2a9a548315765360bd19d6fd270862d4
|
[
"Apache-2.0"
] | 8
|
2021-12-13T20:56:47.000Z
|
2022-03-10T14:53:04.000Z
|
tests/integration/actions/inventory/test_direct_interactive_noee_errors.py
|
alisonlhart/ansible-navigator
|
006db536ef1ea5b38a195a21ae7c0729d995bebc
|
[
"Apache-2.0"
] | null | null | null |
"""Tests for inventory from CLI, interactive, with an EE, missing inventory."""
import pytest
from ..._interactions import Command
from ..._interactions import SearchFor
from ..._interactions import UiTestStep
from ..._interactions import add_indices
from ..._interactions import step_id
from .base import TEST_FIXTURE_DIR
from .base import BaseClass
initial_steps = (
UiTestStep(
user_input=Command(
subcommand="inventory",
cmdline="-i not_a_real_inventory.yml",
execution_environment=False,
precommand=f"cd {TEST_FIXTURE_DIR} && ",
).join(),
comment="ansible-navigator inventory command top window",
present=["Unable to parse"],
search_within_response=SearchFor.WARNING,
),
UiTestStep(
user_input="echo exited",
comment="exit",
search_within_response=SearchFor.PROMPT,
present=["exited"],
),
UiTestStep(
user_input=Command(
subcommand="inventory",
cmdline="-i broken_inventory.yml",
execution_environment=False,
precommand=f"cd {TEST_FIXTURE_DIR} && ",
).join(),
comment="ansible-navigator inventory command top window",
present=["Unable to parse"],
search_within_response=SearchFor.WARNING,
),
UiTestStep(
user_input="echo exited",
comment="exit",
search_within_response=SearchFor.PROMPT,
present=["exited"],
),
UiTestStep(
user_input=Command(
subcommand="inventory",
cmdline="-i broken_inventory.ini",
execution_environment=False,
precommand=f"cd {TEST_FIXTURE_DIR} && ",
).join(),
comment="ansible-navigator inventory command top window",
present=["Unable to parse"],
search_within_response=SearchFor.WARNING,
),
)
steps = add_indices(initial_steps)
@pytest.mark.parametrize("step", steps, ids=step_id)
class Test(BaseClass):
"""Run the tests for inventory from CLI, interactive, with an EE, missing inventory."""
UPDATE_FIXTURES = False
| 30.855072
| 91
| 0.642555
| 220
| 2,129
| 6.022727
| 0.318182
| 0.060377
| 0.083019
| 0.109434
| 0.738113
| 0.738113
| 0.738113
| 0.738113
| 0.698113
| 0.698113
| 0
| 0
| 0.249883
| 2,129
| 68
| 92
| 31.308824
| 0.829681
| 0.072804
| 0
| 0.711864
| 0
| 0
| 0.207336
| 0.012226
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.135593
| 0
| 0.169492
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
38a03cef990c9c2a6f14a6819bcbb2e721c5db5a
| 113
|
py
|
Python
|
project/apps/user/serializers.py
|
p141592/simple_fastapi
|
f0ee4340b7904586cba62bc6a38e4ad9bfa6c37b
|
[
"MIT"
] | 2
|
2020-04-21T02:20:46.000Z
|
2020-08-20T21:26:06.000Z
|
project/apps/user/serializers.py
|
p141592/simple_fastapi
|
f0ee4340b7904586cba62bc6a38e4ad9bfa6c37b
|
[
"MIT"
] | 1
|
2021-12-01T06:41:57.000Z
|
2021-12-01T06:41:57.000Z
|
project/apps/user/serializers.py
|
p141592/simple_fastapi
|
f0ee4340b7904586cba62bc6a38e4ad9bfa6c37b
|
[
"MIT"
] | null | null | null |
import uuid
from pydantic import BaseModel
class UserModel(BaseModel):
id: uuid.UUID = None
name: str
| 12.555556
| 30
| 0.716814
| 15
| 113
| 5.4
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.221239
| 113
| 8
| 31
| 14.125
| 0.920455
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.4
| 0
| 1
| 0
| 1
| 0
| 0
| null | 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
|
c7f8f903e933669ce59174f9e8feb16b0dbc934b
| 161
|
py
|
Python
|
alex/components/asr/__init__.py
|
beka-evature/alex
|
e8fdc6f2d908d7a1911b18f29c218ae58d19ed6f
|
[
"Apache-2.0"
] | 1
|
2015-10-19T17:36:27.000Z
|
2015-10-19T17:36:27.000Z
|
alex/components/asr/__init__.py
|
beka-evature/alex
|
e8fdc6f2d908d7a1911b18f29c218ae58d19ed6f
|
[
"Apache-2.0"
] | null | null | null |
alex/components/asr/__init__.py
|
beka-evature/alex
|
e8fdc6f2d908d7a1911b18f29c218ae58d19ed6f
|
[
"Apache-2.0"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This code is PEP8-compliant. See http://www.python.org/dev/peps/pep-0008.
from alex.components.asr.base import *
| 32.2
| 75
| 0.695652
| 27
| 161
| 4.148148
| 0.962963
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.041958
| 0.111801
| 161
| 5
| 76
| 32.2
| 0.741259
| 0.720497
| 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
|
2a2715fe619831edb0b4d54e47f51c007e313d23
| 47
|
py
|
Python
|
Tools/GAutomator/wpyscripts/test/__init__.py
|
HugoFang/ColaFrameWork
|
f38dd22182d4381d4d16bcbfcae5eb1d8960ad37
|
[
"MIT"
] | 1
|
2019-11-27T07:59:09.000Z
|
2019-11-27T07:59:09.000Z
|
Tools/GAutomator/wpyscripts/test/__init__.py
|
wtb521thl/ColaFrameWork
|
0a8cc589740e045ebde668a76c4a35366b38e62e
|
[
"MIT"
] | null | null | null |
Tools/GAutomator/wpyscripts/test/__init__.py
|
wtb521thl/ColaFrameWork
|
0a8cc589740e045ebde668a76c4a35366b38e62e
|
[
"MIT"
] | 1
|
2020-07-27T12:28:56.000Z
|
2020-07-27T12:28:56.000Z
|
__author__ = 'minhuaxu wukenaihesos@gmail.com'
| 23.5
| 46
| 0.808511
| 5
| 47
| 6.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.085106
| 47
| 1
| 47
| 47
| 0.790698
| 0
| 0
| 0
| 0
| 0
| 0.659574
| 0.468085
| 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
|
2a2a09bcecef3ed16c97ab43825780673f0beeea
| 170
|
py
|
Python
|
model_factory/losses/__init__.py
|
yinochaos/model_factory
|
d8ff8b049cef9b2c19d6dc303874aee6401dc5ef
|
[
"Apache-2.0"
] | null | null | null |
model_factory/losses/__init__.py
|
yinochaos/model_factory
|
d8ff8b049cef9b2c19d6dc303874aee6401dc5ef
|
[
"Apache-2.0"
] | null | null | null |
model_factory/losses/__init__.py
|
yinochaos/model_factory
|
d8ff8b049cef9b2c19d6dc303874aee6401dc5ef
|
[
"Apache-2.0"
] | null | null | null |
from __future__ import absolute_import, division, print_function
__all__ = ['seq2seq_cross_entropy_loss']
from model_factory.losses.loss import seq2seq_cross_entropy_loss
| 56.666667
| 64
| 0.876471
| 23
| 170
| 5.73913
| 0.652174
| 0.181818
| 0.287879
| 0.348485
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012658
| 0.070588
| 170
| 3
| 65
| 56.666667
| 0.822785
| 0
| 0
| 0
| 0
| 0
| 0.152047
| 0.152047
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0.333333
| 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
|
2a7d5c908bc2597e019cf3edf9efd4ea06928171
| 3,925
|
py
|
Python
|
intro/part02-16_input_validation/test/test_input_validation.py
|
Hannah-Abi/python-pro-21
|
2ce32c4bf118054329d19afdf83c50561be1ada8
|
[
"MIT"
] | null | null | null |
intro/part02-16_input_validation/test/test_input_validation.py
|
Hannah-Abi/python-pro-21
|
2ce32c4bf118054329d19afdf83c50561be1ada8
|
[
"MIT"
] | null | null | null |
intro/part02-16_input_validation/test/test_input_validation.py
|
Hannah-Abi/python-pro-21
|
2ce32c4bf118054329d19afdf83c50561be1ada8
|
[
"MIT"
] | null | null | null |
import unittest
from unittest.mock import patch
from tmc import points
from tmc.utils import load_module, reload_module, get_stdout, sanitize
from functools import reduce
from random import randint
exercise = 'src.input_validation'
def p(a):
return "\n".join(a)
@points('2.input_validation')
class InputValidationTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
with patch('builtins.input', side_effect =["0"]):
cls.module = load_module(exercise, 'en')
def test_1_termination(self):
values = "1 0".split(" ")
with patch('builtins.input', side_effect = values):
try:
reload_module(self.module)
output = get_stdout()
except:
self.assertTrue(False, f"Make sure that execution of your program stops with the input:\n{p(values)}")
def test_2_numbers_and_termination(self):
values = "9 4 16 1 0".split(" ")
correct = "3.0\n2.0\n4.0\n1.0\nExiting..."
with patch('builtins.input', side_effect = values):
reload_module(self.module)
output = get_stdout()
self.assertTrue(len(output)>0, f"Your program does not print out anything with the input\n:{p(values)}")
self.assertTrue(len(output.split("\n")) == 5, "Instead of five rows, your program's output is in {} rows\n{}\nwhen input is\n{}".format(len(output.split("\n")), output, p(values)))
self.assertTrue(sanitize(output) == sanitize(correct), "Output\n{} \ndoes not match with the correct output\n{} \nwhen input is\n{}".
format(output, correct, p(values)))
def test_3_invalid(self):
values = "-1 0".split(" ")
with patch('builtins.input', side_effect = values):
try:
reload_module(self.module)
except:
self.assertTrue(False, f"Make sure that execution of your program stops with the input:\n{p(values)}")
def test_4_numbers_invalid_number_and_termination(self):
values = "9 4 16 -1 0".split(" ")
correct = "3.0\n2.0\n4.0\nInvalid number\nExiting..."
with patch('builtins.input', side_effect = values):
try:
reload_module(self.module)
except:
self.assertTrue(False, "Make sure that execution of your program stops with the input:\n{}".format(p(values)))
output = get_stdout()
self.assertTrue(len(output)>0, f"Your program does not print out anything with the input\n:{p(values)}")
self.assertTrue(len(output.split("\n")) == 5, "Instead of printing out five rows in addition to asking for the inputs from the user, your program's print out is in {} rows:\n{}\nwhen input is\n{}".
format(len(output.split("\n")), output, p(values)))
self.assertTrue(sanitize(output) == sanitize(correct), "Output\n{} \ndoes not match with the correct output\n{} \nwhen input is\n{}".
format(output, correct, p(values)))
def test_5_termination_only(self):
values = "0".split(" ")
correct = "Exiting..."
with patch('builtins.input', side_effect = values):
reload_module(self.module)
output = get_stdout()
self.assertTrue(len(output)>0, f"Your program does not print out anything with the input {p(values)}")
self.assertTrue(len(output.split("\n")) == 1, "Instead of printing out one row in addition to asking for the inputs from the user, your program's print out is in {} rows:\n{}\nwhen input is\n{}".
format(len(output.split("\n")), output, p(values)))
self.assertTrue(sanitize(output) == sanitize(correct), "Output\n{} \ndoes not match with the correct output\n{} \nwhen input is\n{}".
format(output, correct, p(values)))
if __name__ == '__main__':
unittest.main()
| 46.72619
| 209
| 0.618344
| 527
| 3,925
| 4.518027
| 0.203036
| 0.070559
| 0.042839
| 0.055439
| 0.767745
| 0.767745
| 0.754305
| 0.748005
| 0.726165
| 0.726165
| 0
| 0.01492
| 0.248662
| 3,925
| 84
| 210
| 46.72619
| 0.792472
| 0
| 0
| 0.477612
| 0
| 0.089552
| 0.326541
| 0.013245
| 0
| 0
| 0
| 0
| 0.179104
| 1
| 0.104478
| false
| 0
| 0.089552
| 0.014925
| 0.223881
| 0.074627
| 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
|
aa4ede52c49ecbb713ba20c854577bc6dd3ebc29
| 11,403
|
py
|
Python
|
tests/test_a_message.py
|
SteveEasley/pykaleidescape
|
ffeebccd502e960ae0cdc5c416a14fbef44dd081
|
[
"MIT"
] | null | null | null |
tests/test_a_message.py
|
SteveEasley/pykaleidescape
|
ffeebccd502e960ae0cdc5c416a14fbef44dd081
|
[
"MIT"
] | 1
|
2021-11-24T13:32:33.000Z
|
2021-11-24T13:32:33.000Z
|
tests/test_a_message.py
|
SteveEasley/pykaleidescape
|
ffeebccd502e960ae0cdc5c416a14fbef44dd081
|
[
"MIT"
] | null | null | null |
"""Tests for message module."""
import pytest
from kaleidescape import const
from kaleidescape import message as messages
from kaleidescape.error import MessageParseError
from kaleidescape.message import MESSAGE_TYPE_REQUEST, MessageParser, Request, Response
def test_message_parser():
"""Test message parser."""
parsed = MessageParser("01/2/003:MESSAGE_NAME:/123")
assert parsed.device_id == "01"
assert parsed.zone == 0
assert parsed.seq == 2
assert parsed.status == 3
assert parsed.name == "MESSAGE_NAME"
assert parsed.fields == []
assert parsed.checksum == 123
def test_message_parser_with_fields():
"""Test message parser with fields."""
parsed = MessageParser("01/2/003:MESSAGE_NAME:field1:field2:/123")
assert parsed.device_id == "01"
assert parsed.zone == 0
assert parsed.seq == 2
assert parsed.status == 3
assert parsed.name == "MESSAGE_NAME"
assert parsed.fields == ["field1", "field2"]
assert parsed.checksum == 123
def test_message_parser_event():
"""Test message parse as event."""
parsed = MessageParser("01/!/003:MESSAGE_NAME:field1:field2:/123")
assert parsed.device_id == "01"
assert parsed.zone == 0
assert parsed.seq == -1
assert parsed.status == 3
assert parsed.name == "MESSAGE_NAME"
assert parsed.fields == ["field1", "field2"]
assert parsed.checksum == 123
def test_message_parser_request():
"""Test message parse when message is request."""
parsed = MessageParser("01/1/GET_MESSAGE_NAME:field1:field2:/123", True)
assert parsed.device_id == "01"
assert parsed.zone == 0
assert parsed.seq == 1
assert parsed.status == 0
assert parsed.name == "GET_MESSAGE_NAME"
assert parsed.fields == ["field1", "field2"]
assert parsed.checksum is 0
def test_message_parser_device_id():
"""Test message parser device_id."""
parsed = MessageParser("01/2/003:MESSAGE_NAME:/123")
assert parsed.device_id == "01"
assert parsed.zone == 0
parsed = MessageParser("01.02/2/003:MESSAGE_NAME:/123")
assert parsed.device_id == "01"
assert parsed.zone == 2
parsed = MessageParser("#0A123F12/2/003:MESSAGE_NAME:/123")
assert parsed.device_id == "#0A123F12"
assert parsed.zone == 0
parsed = MessageParser("#0A123F12.02/2/003:MESSAGE_NAME:/123")
assert parsed.device_id == "#0A123F12"
assert parsed.zone == 2
def test_message_parser_bad_device_id():
"""Test message parser with bad device_id."""
with pytest.raises(MessageParseError) as err:
MessageParser("1/2/003:MESSAGE_NAME:/123")
assert const.RESPONSE_ERROR[const.ERROR_INVALID_DEVICE] in str(err.value)
with pytest.raises(MessageParseError):
MessageParser("001/2/003:MESSAGE_NAME:/123")
assert const.RESPONSE_ERROR[const.ERROR_INVALID_DEVICE] in str(err.value)
with pytest.raises(MessageParseError):
MessageParser("aa/2/003:MESSAGE_NAME:/123")
assert const.RESPONSE_ERROR[const.ERROR_INVALID_DEVICE] in str(err.value)
with pytest.raises(MessageParseError):
MessageParser("/2/003:MESSAGE_NAME:/123")
assert const.RESPONSE_ERROR[const.ERROR_INVALID_DEVICE] in str(err.value)
with pytest.raises(MessageParseError):
MessageParser("01./2/003:MESSAGE_NAME:/123")
assert const.RESPONSE_ERROR[const.ERROR_INVALID_DEVICE] in str(err.value)
with pytest.raises(MessageParseError):
MessageParser("01.0a/2/003:MESSAGE_NAME:/123")
def test_message_parser_seq():
"""Test message parser seq."""
parsed = MessageParser("01/9/003:MESSAGE_NAME:/123")
assert parsed.seq == 9
parsed = MessageParser("01/!/003:MESSAGE_NAME:/123")
assert parsed.seq == -1
def test_message_parser_bad_seq():
"""Test message parser with bad seq."""
with pytest.raises(MessageParseError) as err:
MessageParser("01//003:MESSAGE_NAME:/123")
assert const.RESPONSE_ERROR[const.ERROR_INVALID_SEQ_NUMBER] in str(err.value)
with pytest.raises(MessageParseError):
MessageParser("01/22/003:MESSAGE_NAME:/123")
assert const.RESPONSE_ERROR[const.ERROR_INVALID_SEQ_NUMBER] in str(err.value)
with pytest.raises(MessageParseError):
MessageParser("01/aa/003:MESSAGE_NAME:/123")
assert const.RESPONSE_ERROR[const.ERROR_INVALID_SEQ_NUMBER] in str(err.value)
def test_message_parser_status():
"""Test message parser status."""
parsed = MessageParser("01/0/999:MESSAGE_NAME:/123")
assert parsed.status == 999
def test_message_parser_bad_status():
"""Test message parser with bad status."""
with pytest.raises(MessageParseError) as err:
MessageParser("01/2/0001:MESSAGE_NAME:/123")
assert const.RESPONSE_ERROR[const.ERROR_UNDETERMINED_ERROR] in str(err.value)
with pytest.raises(MessageParseError):
MessageParser("01/2/01:MESSAGE_NAME:/123")
assert const.RESPONSE_ERROR[const.ERROR_UNDETERMINED_ERROR] in str(err.value)
with pytest.raises(MessageParseError):
MessageParser("01/2/aaa:MESSAGE_NAME:/123")
assert const.RESPONSE_ERROR[const.ERROR_UNDETERMINED_ERROR] in str(err.value)
with pytest.raises(MessageParseError):
MessageParser("01/2/:MESSAGE_NAME:/123")
assert const.RESPONSE_ERROR[const.ERROR_UNDETERMINED_ERROR] in str(err.value)
def test_message_parser_name():
"""Test message parser name."""
parsed = MessageParser("01/2/003:MESSAGE_NAME_123:/123")
assert parsed.name == "MESSAGE_NAME_123"
def test_message_parser_bad_name():
"""Test message parser with bad name."""
with pytest.raises(MessageParseError) as err:
MessageParser("01/2/003:MESSAGE_NAME/123")
assert const.RESPONSE_ERROR[const.ERROR_INVALID_REQUEST] in str(err.value)
with pytest.raises(MessageParseError):
MessageParser("01/2//123")
assert const.RESPONSE_ERROR[const.ERROR_INVALID_REQUEST] in str(err.value)
with pytest.raises(MessageParseError):
MessageParser("01/2/:/123")
assert const.RESPONSE_ERROR[const.ERROR_INVALID_REQUEST] in str(err.value)
def test_message_parser_field_decoding():
"""Test message parser field decoding."""
parsed = MessageParser("01/2/003:MESSAGE_NAME:f\\d225ncy:/123")
assert parsed.fields == ["fáncy"]
parsed = MessageParser("01/2/003:MESSAGE_NAME:f\\\\d225ncy:/123")
assert parsed.fields == ["f\\d225ncy"]
parsed = MessageParser("01/2/003:MESSAGE_NAME:colon\\:separated:/123")
assert parsed.fields == ["colon:separated"]
parsed = MessageParser("01/2/003:MESSAGE_NAME:forward\\/slash:/123")
assert parsed.fields == ["forward/slash"]
parsed = MessageParser("01/2/003:MESSAGE_NAME:back\\\\slash:/123")
assert parsed.fields == ["back\\slash"]
parsed = MessageParser("01/2/003:MESSAGE_NAME:new\\nline:/123")
assert parsed.fields == ["new\nline"]
parsed = MessageParser("01/2/003:MESSAGE_NAME:new\\\nline:/123")
assert parsed.fields == ["new\nline"]
parsed = MessageParser("01/2/003:MESSAGE_NAME:new\\\rline:/123")
assert parsed.fields == ["new\rline"]
def test_message_parser_bad_fields():
"""Test message parser with bad fields."""
with pytest.raises(MessageParseError):
MessageParser("01/2/:MESSAGE_NAME:field/123")
def test_message_parser_empty_name():
"""Test message parser with empty name."""
parsed = MessageParser("01/2/000:/123")
assert parsed.device_id == "01"
assert parsed.zone == 0
assert parsed.seq == 2
assert parsed.status == 0
assert parsed.name == ""
assert parsed.fields == []
assert parsed.checksum == 123
def test_message_response_with_empty_name():
"""Test message response with empty name"""
message = Response(MessageParser("01/2/999:/123"))
assert message.device_id == "01"
assert message.zone == 0
assert message.seq == 2
assert message.status == 999
assert message.fields == []
assert message.is_event is False
assert message.is_error is True
assert message.error == const.RESPONSE_ERROR[message.status]
assert str(message) == "01/2/999:/123"
def test_message_response_from_command():
"""Test message response from command."""
message = Response.factory("01/2/000:AVAILABLE_DEVICES:01:02:/123")
assert isinstance(message, messages.AvailableDevices)
assert message.type == messages.MESSAGE_TYPE_RESPONSE
assert message.device_id == "01"
assert message.zone == 0
assert message.seq == 2
assert message.status == 0
assert message.name == "AVAILABLE_DEVICES"
assert message.fields == ["01", "02"]
assert message.is_event is False
assert message.is_error is False
assert str(message) == "01/2/000:AVAILABLE_DEVICES:01:02:/123"
def test_message_response_from_event():
"""Test message response from event."""
message = Response.factory("01/!/000:AVAILABLE_DEVICES:01:02:/123")
assert isinstance(message, messages.AvailableDevices)
assert message.type == messages.MESSAGE_TYPE_EVENT
assert message.device_id == "01"
assert message.zone == 0
assert message.seq == -1
assert message.status == 0
assert message.name == "AVAILABLE_DEVICES"
assert message.fields == ["01", "02"]
assert message.is_event is True
assert message.is_error is False
assert str(message) == "01/!/000:AVAILABLE_DEVICES:01:02:/123"
def test_message_response_with_error_status():
"""Test message response with error status."""
message = Response.factory("01/2/003:AVAILABLE_DEVICES:01:02:/123")
assert isinstance(message, messages.AvailableDevices)
assert message.type == messages.MESSAGE_TYPE_RESPONSE
assert message.device_id == "01"
assert message.zone == 0
assert message.seq == 2
assert message.status == 3
assert message.name == "AVAILABLE_DEVICES"
assert message.fields == ["01", "02"]
assert message.is_event is False
assert message.is_error is True
assert message.error == const.RESPONSE_ERROR[message.status]
assert str(message) == "01/2/003:AVAILABLE_DEVICES:01:02:/123"
def test_message_response_with_parse_error():
"""Test message response with parse error."""
with pytest.raises(MessageParseError) as err:
Response.factory("ERR/2/003:AVAILABLE_DEVICES:01:02:/123")
assert const.RESPONSE_ERROR[const.ERROR_INVALID_DEVICE] in str(err.value)
def test_message_request():
"""Test message request."""
message = Request("01")
assert message.device_id == "01"
assert message.zone == 0
assert message.seq == -1
assert message.status == 0
assert message.fields == []
assert message.type == MESSAGE_TYPE_REQUEST
def test_message_request_with_fields():
"""Test message request."""
message = Request("01", 0, ["field1", "field2"])
assert message.device_id == "01"
assert message.zone == 0
assert message.seq == -1
assert message.status == 0
assert message.fields == ["field1", "field2"]
assert message.type == MESSAGE_TYPE_REQUEST
def test_message_get_available_devices():
"""Test message request as GET_AVAILABLE_DEVICES."""
message = messages.GetAvailableDevices("01")
message.seq = 2
assert message.device_id == "01"
assert message.zone == 0
assert message.seq == 2
assert message.status == 0
assert message.name == "GET_AVAILABLE_DEVICES"
assert message.fields == []
assert str(message) == "01/2/GET_AVAILABLE_DEVICES:"
| 38.137124
| 87
| 0.705955
| 1,499
| 11,403
| 5.211474
| 0.058706
| 0.084485
| 0.060932
| 0.042243
| 0.8766
| 0.775858
| 0.731567
| 0.6883
| 0.65745
| 0.625448
| 0
| 0.061876
| 0.16522
| 11,403
| 298
| 88
| 38.265101
| 0.758798
| 0.069982
| 0
| 0.570796
| 0
| 0
| 0.16921
| 0.132774
| 0
| 0
| 0
| 0
| 0.588496
| 1
| 0.10177
| false
| 0
| 0.022124
| 0
| 0.123894
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
aa595cabb1b0ee509266d5444124d73ca296f1ae
| 189
|
py
|
Python
|
src/config.py
|
albertowar/locust-newrelic-sidecar
|
404c1d16a2cb22ef677c5e03606888901f8121be
|
[
"MIT"
] | 3
|
2020-06-23T12:48:25.000Z
|
2022-01-28T20:51:57.000Z
|
src/config.py
|
albertowar/locust-newrelic-sidecar
|
404c1d16a2cb22ef677c5e03606888901f8121be
|
[
"MIT"
] | null | null | null |
src/config.py
|
albertowar/locust-newrelic-sidecar
|
404c1d16a2cb22ef677c5e03606888901f8121be
|
[
"MIT"
] | 1
|
2021-06-26T20:39:41.000Z
|
2021-06-26T20:39:41.000Z
|
import os
def get_config():
return {
'LOCUST_URL': os.environ.get('LOCUST_URL', None),
'POLL_INTERVAL_SECONDS': int(os.environ.get('POLL_INTERVAL_SECONDS', 30))
}
| 21
| 81
| 0.645503
| 25
| 189
| 4.6
| 0.6
| 0.156522
| 0.208696
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013333
| 0.206349
| 189
| 8
| 82
| 23.625
| 0.753333
| 0
| 0
| 0
| 0
| 0
| 0.328042
| 0.222222
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| true
| 0
| 0.166667
| 0.166667
| 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
| 0
| 1
| 0
| 0
|
0
| 5
|
aa5a2f93b2071741d73b33f9285c88d2089cd878
| 220
|
py
|
Python
|
lib/JumpScale/grid/agentcontroller/__init__.py
|
rudecs/jumpscale_core7
|
30c03f26f1cdad3edbb9d79d50fbada8acc974f5
|
[
"Apache-2.0"
] | null | null | null |
lib/JumpScale/grid/agentcontroller/__init__.py
|
rudecs/jumpscale_core7
|
30c03f26f1cdad3edbb9d79d50fbada8acc974f5
|
[
"Apache-2.0"
] | 4
|
2016-08-25T12:08:39.000Z
|
2018-04-12T12:36:01.000Z
|
lib/JumpScale/grid/agentcontroller/__init__.py
|
rudecs/jumpscale_core7
|
30c03f26f1cdad3edbb9d79d50fbada8acc974f5
|
[
"Apache-2.0"
] | 3
|
2016-03-08T07:49:34.000Z
|
2018-10-19T13:56:43.000Z
|
from JumpScale import j
def cb():
from .AgentControllerFactory import AgentControllerFactory
return AgentControllerFactory()
j.base.loader.makeAvailable(j, 'clients')
j.clients._register('agentcontroller', cb)
| 24.444444
| 62
| 0.786364
| 23
| 220
| 7.478261
| 0.608696
| 0.093023
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.118182
| 220
| 8
| 63
| 27.5
| 0.886598
| 0
| 0
| 0
| 0
| 0
| 0.1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| 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
|
aa69d53f1185cfba4062cc9533bfec5eeafe2e30
| 2,447
|
py
|
Python
|
normality.py
|
shanecanny1/Data-Analytics-Programming-and-Scripting-Project-2018
|
90b00dc5da112a864d13eedb2c7d62b6211dd446
|
[
"Apache-2.0"
] | null | null | null |
normality.py
|
shanecanny1/Data-Analytics-Programming-and-Scripting-Project-2018
|
90b00dc5da112a864d13eedb2c7d62b6211dd446
|
[
"Apache-2.0"
] | null | null | null |
normality.py
|
shanecanny1/Data-Analytics-Programming-and-Scripting-Project-2018
|
90b00dc5da112a864d13eedb2c7d62b6211dd446
|
[
"Apache-2.0"
] | null | null | null |
import numpy as np
from scipy import stats
import matplotlib.pyplot as plt
data = np.genfromtxt('irisdata/iris.csv',delimiter=',')
SetosadataSepallength = data[0:50:,0]
SetosadataSepalwidth = data[0:50:,1]
SetosadataPetallength = data[0:50:,2]
SetosadataPetalwidth = data[0:50:,3]
k2, p = stats.normaltest(SetosadataSepallength)
alpha = 5e-2 # Setting the confidence level for alpha at 95%
print("p = {:g}".format(p))
if p < alpha: # null hypothesis: the data SetosadataSepallength follows the normal distribution
print("We can reject the null hypothesis for SetosadataSepallength the data does not follows the normal distribution")
else:
print("We can fail to reject the null hypothesis for SetosadataSepallength the data follows the normal distribution")
k2, p = stats.normaltest(SetosadataSepalwidth)
alpha = 5e-2 # Setting the confidence level for alpha at 95%
print("p = {:g}".format(p))
if p < alpha: # null hypothesis: the data SetosadataSepalwidth follows the normal distribution
print("We can reject the null hypothesis for SetosadataSepalwidth the data does not follows the normal distribution")
else:
print("We can fail to reject the null hypothesis for SetosadataSepalwidth the data follows the normal distribution")
k2, p = stats.normaltest(SetosadataPetallength)
alpha = 5e-2 # Setting the confidence level for alpha at 95%
print("p = {:g}".format(p))
if p < alpha: # null hypothesis: the data SetosadataPetallength follows the normal distribution
print("We can reject the null hypothesis for SetosadataPetallength the data does not follows the normal distribution")
else:
print("We can fail to reject the null hypothesis for SetosadataPetallength the data follows the normal distribution")
k2, p = stats.normaltest(SetosadataPetalwidth)
alpha = 5e-2 # Setting the confidence level for alpha at 95%
print("p = {:g}".format(p))
if p < alpha: # null hypothesis: the data SetosadataPetalwidth follows the normal distribution
print("We can reject the null hypothesis for SetosadataPetalwidth the data does not follows the normal distribution")
else:
print("We can fail to reject the null hypothesis for SetosadataPetalwidth the data follows the normal distribution")
# Test for Generating
plt.hist(SetosadataSepallength)
plt.title("Sepal Length")
plt.xlabel("Length")
plt.ylabel("Qty")
plt.savefig("SetosadataSepallength.png")
| 45.314815
| 124
| 0.75235
| 332
| 2,447
| 5.545181
| 0.195783
| 0.091255
| 0.104291
| 0.18251
| 0.715915
| 0.715915
| 0.700706
| 0.700706
| 0.607822
| 0.607822
| 0
| 0.017682
| 0.167961
| 2,447
| 53
| 125
| 46.169811
| 0.886542
| 0.212914
| 0
| 0.390244
| 0
| 0
| 0.516129
| 0.058602
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.073171
| 0
| 0.073171
| 0.292683
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
aac2459dc305c6295e03da1174289bc289ec6c4f
| 16
|
py
|
Python
|
Chapter 01/Chap01_Example1.164.py
|
Anancha/Programming-Techniques-using-Python
|
e80c329d2a27383909d358741a5cab03cb22fd8b
|
[
"MIT"
] | null | null | null |
Chapter 01/Chap01_Example1.164.py
|
Anancha/Programming-Techniques-using-Python
|
e80c329d2a27383909d358741a5cab03cb22fd8b
|
[
"MIT"
] | null | null | null |
Chapter 01/Chap01_Example1.164.py
|
Anancha/Programming-Techniques-using-Python
|
e80c329d2a27383909d358741a5cab03cb22fd8b
|
[
"MIT"
] | null | null | null |
print(int(1+2j))
| 16
| 16
| 0.6875
| 4
| 16
| 2.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 0
| 16
| 1
| 16
| 16
| 0.5625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
aadda7f2b62894d28ad02da1d6b3ea2d5f8ece8d
| 226
|
py
|
Python
|
etym/exceptions.py
|
conorsch/etym
|
ff2e34b6eb522582e3a71752747e7b289ef8f556
|
[
"MIT"
] | 13
|
2015-04-02T11:10:56.000Z
|
2021-12-11T19:27:20.000Z
|
etym/exceptions.py
|
ronocdh/etym
|
ff2e34b6eb522582e3a71752747e7b289ef8f556
|
[
"MIT"
] | 1
|
2021-04-11T11:14:08.000Z
|
2021-04-11T11:14:08.000Z
|
etym/exceptions.py
|
ronocdh/etym
|
ff2e34b6eb522582e3a71752747e7b289ef8f556
|
[
"MIT"
] | 4
|
2017-11-26T13:50:08.000Z
|
2021-01-28T13:49:15.000Z
|
class NoResultsFound(Exception):
def __init__(self, value: str) -> None:
self.value = "Found no hits for query '%s'." % value
def __repr__(self) -> str:
return "<NoResultsFound> {}".format(self.value)
| 32.285714
| 60
| 0.628319
| 27
| 226
| 4.962963
| 0.666667
| 0.201493
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.221239
| 226
| 6
| 61
| 37.666667
| 0.761364
| 0
| 0
| 0
| 0
| 0
| 0.212389
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0
| 0.2
| 0.8
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
2ab0b2c57951863cc1b88c4fef5da09970495e09
| 247
|
py
|
Python
|
PythonConsole.py
|
CadworkMontreal/PythonConsole
|
3b8fd56386cdecbd609c2cf9e81653b7a1075bb6
|
[
"MIT"
] | 1
|
2021-02-08T15:53:57.000Z
|
2021-02-08T15:53:57.000Z
|
PythonConsole.py
|
CadworkMontreal/PythonConsole
|
3b8fd56386cdecbd609c2cf9e81653b7a1075bb6
|
[
"MIT"
] | 5
|
2020-12-11T16:29:33.000Z
|
2022-02-07T13:26:36.000Z
|
PythonConsole.py
|
CadworkMontreal/PythonConsole
|
3b8fd56386cdecbd609c2cf9e81653b7a1075bb6
|
[
"MIT"
] | null | null | null |
# Copyright 2020 Cadwork.
# All rights reserved.
# This file is part of PythonConsole,
# and is released under the "MIT License Agreement". Please see the LICENSE
# file that should have been included as part of this package.
import idlelib.idle
| 30.875
| 75
| 0.773279
| 38
| 247
| 5.026316
| 0.815789
| 0.062827
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019608
| 0.174089
| 247
| 7
| 76
| 35.285714
| 0.916667
| 0.870445
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
6300d7b7caa773e98ec0b85931ceec56a470afd9
| 52
|
py
|
Python
|
oligo/__init__.py
|
earada/python-oligo
|
ed67a241891576ab1e9ac6ca236a8a52f63be76e
|
[
"MIT"
] | null | null | null |
oligo/__init__.py
|
earada/python-oligo
|
ed67a241891576ab1e9ac6ca236a8a52f63be76e
|
[
"MIT"
] | null | null | null |
oligo/__init__.py
|
earada/python-oligo
|
ed67a241891576ab1e9ac6ca236a8a52f63be76e
|
[
"MIT"
] | null | null | null |
from .iber import Iber
from .aioiber import AIOIber
| 17.333333
| 28
| 0.807692
| 8
| 52
| 5.25
| 0.5
| 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
|
6315ce3c22a3e1d5a5d190715b4ebb6733591db2
| 57
|
py
|
Python
|
src/1-4/bs4_version_check.py
|
kazuhitogo/qiita-sagemaker-training
|
e310b65d58732f0c70ffbd960560277bc34aebc6
|
[
"Apache-2.0"
] | null | null | null |
src/1-4/bs4_version_check.py
|
kazuhitogo/qiita-sagemaker-training
|
e310b65d58732f0c70ffbd960560277bc34aebc6
|
[
"Apache-2.0"
] | null | null | null |
src/1-4/bs4_version_check.py
|
kazuhitogo/qiita-sagemaker-training
|
e310b65d58732f0c70ffbd960560277bc34aebc6
|
[
"Apache-2.0"
] | null | null | null |
import bs4, my_module
my_module.version_check(bs4)
exit()
| 19
| 28
| 0.824561
| 10
| 57
| 4.4
| 0.7
| 0.363636
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.037736
| 0.070175
| 57
| 3
| 29
| 19
| 0.792453
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 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
|
63171d5c88fba706d13aa457caa9483dd2cb7662
| 510
|
py
|
Python
|
predicate.py
|
Zingler/Rubiks
|
ef792c92b0abacc788757b1d875528121f4c954e
|
[
"MIT"
] | null | null | null |
predicate.py
|
Zingler/Rubiks
|
ef792c92b0abacc788757b1d875528121f4c954e
|
[
"MIT"
] | null | null | null |
predicate.py
|
Zingler/Rubiks
|
ef792c92b0abacc788757b1d875528121f4c954e
|
[
"MIT"
] | null | null | null |
class Predicate:
def __init__(self, function):
self.function = function
def __call__(self, *args, **kwds):
return self.function(*args, **kwds)
def __or__(self, other):
return Predicate(lambda *args, **kwds: self(*args, **kwds) or other(*args, **kwds))
def __and__(self, other):
return Predicate(lambda *args, **kwds: self(*args, **kwds) and other(*args, **kwds))
def __invert__(self):
return Predicate(lambda *args, **kwds: not self(*args, **kwds))
| 39.230769
| 92
| 0.621569
| 63
| 510
| 4.714286
| 0.253968
| 0.26936
| 0.161616
| 0.252525
| 0.434343
| 0.3367
| 0.3367
| 0.3367
| 0.3367
| 0.3367
| 0
| 0
| 0.213725
| 510
| 12
| 93
| 42.5
| 0.740648
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.454545
| false
| 0
| 0
| 0.363636
| 0.909091
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
63187c5c814717f4beace61df3a58a4abb60839e
| 19
|
py
|
Python
|
uiautomation/version.py
|
Pythonfred/Python-UIAutomation-for-Windows
|
e165de51fca2c373d4ae16efcd2e9f655dd8ce3f
|
[
"Apache-2.0"
] | 2
|
2018-11-18T07:10:46.000Z
|
2018-11-18T07:10:52.000Z
|
uiautomation/version.py
|
Pythonfred/Python-UIAutomation-for-Windows
|
e165de51fca2c373d4ae16efcd2e9f655dd8ce3f
|
[
"Apache-2.0"
] | null | null | null |
uiautomation/version.py
|
Pythonfred/Python-UIAutomation-for-Windows
|
e165de51fca2c373d4ae16efcd2e9f655dd8ce3f
|
[
"Apache-2.0"
] | null | null | null |
VERSION = "1.1.11"
| 9.5
| 18
| 0.578947
| 4
| 19
| 2.75
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.25
| 0.157895
| 19
| 1
| 19
| 19
| 0.4375
| 0
| 0
| 0
| 0
| 0
| 0.315789
| 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
|
6329a4a61a4193e481aa4691ac23b4c6bb2f0e93
| 206
|
py
|
Python
|
django_snooze/__init__.py
|
ainmosni/django-snooze
|
d160d7dbdc744b717ac534e815b2a543f18ade16
|
[
"BSD-3-Clause"
] | null | null | null |
django_snooze/__init__.py
|
ainmosni/django-snooze
|
d160d7dbdc744b717ac534e815b2a543f18ade16
|
[
"BSD-3-Clause"
] | null | null | null |
django_snooze/__init__.py
|
ainmosni/django-snooze
|
d160d7dbdc744b717ac534e815b2a543f18ade16
|
[
"BSD-3-Clause"
] | null | null | null |
# -*- coding: utf-8 -*-
__version__ = '0.1.0'
def urls():
from django_snooze.apis import api
return api.urls
def autodiscover():
from django_snooze.apis import api
api.discover_models()
| 15.846154
| 38
| 0.665049
| 29
| 206
| 4.482759
| 0.62069
| 0.153846
| 0.246154
| 0.307692
| 0.446154
| 0.446154
| 0
| 0
| 0
| 0
| 0
| 0.02454
| 0.208738
| 206
| 12
| 39
| 17.166667
| 0.773006
| 0.101942
| 0
| 0.285714
| 0
| 0
| 0.027322
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.285714
| 0
| 0.714286
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
2dc1d62e11427edbc94cc83763f95fdb9a0160dc
| 106
|
py
|
Python
|
settings.py
|
illinoyz/Slip-Out
|
a1eee68d30711007ee3cbc07a6214068bf6c5005
|
[
"MIT"
] | null | null | null |
settings.py
|
illinoyz/Slip-Out
|
a1eee68d30711007ee3cbc07a6214068bf6c5005
|
[
"MIT"
] | null | null | null |
settings.py
|
illinoyz/Slip-Out
|
a1eee68d30711007ee3cbc07a6214068bf6c5005
|
[
"MIT"
] | null | null | null |
# -*- coding:utf-8 -*-
import pygame
import sys
class Settings():
def __init__(self):
pass
| 10.6
| 23
| 0.59434
| 13
| 106
| 4.538462
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012821
| 0.264151
| 106
| 9
| 24
| 11.777778
| 0.74359
| 0.188679
| 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
|
2dc60b901346b08c12303307ee78a62e2e779876
| 24
|
py
|
Python
|
docassemble/handover/__init__.py
|
LLAW3301/docassemble-handover
|
05d0885d31d9407e0847db675599b3497cd142c9
|
[
"MIT"
] | null | null | null |
docassemble/handover/__init__.py
|
LLAW3301/docassemble-handover
|
05d0885d31d9407e0847db675599b3497cd142c9
|
[
"MIT"
] | null | null | null |
docassemble/handover/__init__.py
|
LLAW3301/docassemble-handover
|
05d0885d31d9407e0847db675599b3497cd142c9
|
[
"MIT"
] | null | null | null |
__version__ = '2021_S1'
| 12
| 23
| 0.75
| 3
| 24
| 4.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.238095
| 0.125
| 24
| 1
| 24
| 24
| 0.380952
| 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
|
2dd4ad293f37f2ace3c876e05c1808ac68b6d011
| 58
|
pyw
|
Python
|
folder_shortcuts/hosts.pyw
|
aburakayaz/automating-the-boring-stuff
|
bd80c5a9b93f60e9008254c8b087bca0017ee199
|
[
"MIT"
] | 1
|
2018-02-05T15:42:34.000Z
|
2018-02-05T15:42:34.000Z
|
folder_shortcuts/hosts.pyw
|
aburakayaz/automating-the-boring-stuff
|
bd80c5a9b93f60e9008254c8b087bca0017ee199
|
[
"MIT"
] | null | null | null |
folder_shortcuts/hosts.pyw
|
aburakayaz/automating-the-boring-stuff
|
bd80c5a9b93f60e9008254c8b087bca0017ee199
|
[
"MIT"
] | null | null | null |
import os
os.startfile('C:\Windows\System32\drivers\etc')
| 19.333333
| 47
| 0.775862
| 9
| 58
| 5
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.036364
| 0.051724
| 58
| 2
| 48
| 29
| 0.781818
| 0
| 0
| 0
| 0
| 0
| 0.534483
| 0.534483
| 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
|
2df9120832afb86947a7151951e55800beec0560
| 87
|
py
|
Python
|
setup.py
|
nathancohen4299/poppin
|
ac1ed78495b41dc3cf4b98d33de94db6bc6950ce
|
[
"MIT"
] | 1
|
2020-01-25T06:01:45.000Z
|
2020-01-25T06:01:45.000Z
|
setup.py
|
nathancohen4299/king-of-the-geo-hill
|
ac1ed78495b41dc3cf4b98d33de94db6bc6950ce
|
[
"MIT"
] | 1
|
2021-05-11T01:30:58.000Z
|
2021-05-11T01:30:58.000Z
|
setup.py
|
najaco/king-of-the-geo-hill
|
ac1ed78495b41dc3cf4b98d33de94db6bc6950ce
|
[
"MIT"
] | null | null | null |
from setuptools import setup, find_packages
setup(package=find_packages(where="api"))
| 21.75
| 43
| 0.816092
| 12
| 87
| 5.75
| 0.75
| 0.347826
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.08046
| 87
| 3
| 44
| 29
| 0.8625
| 0
| 0
| 0
| 0
| 0
| 0.034483
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
93372609a17b59114a43008c5a9eb8f5326b567e
| 142
|
py
|
Python
|
app/adminbp/routes.py
|
mamoraes/conx
|
92f98764eee93b4b93f63a338655424421755385
|
[
"MIT"
] | null | null | null |
app/adminbp/routes.py
|
mamoraes/conx
|
92f98764eee93b4b93f63a338655424421755385
|
[
"MIT"
] | null | null | null |
app/adminbp/routes.py
|
mamoraes/conx
|
92f98764eee93b4b93f63a338655424421755385
|
[
"MIT"
] | null | null | null |
from flask_admin.contrib.sqla import ModelView
from app import admin
from app.models import *
admin.add_view(ModelView(Conexao, db.session))
| 23.666667
| 46
| 0.816901
| 22
| 142
| 5.181818
| 0.636364
| 0.122807
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105634
| 142
| 5
| 47
| 28.4
| 0.897638
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
9344129fdfc6aa26945539b0c81fb778073d4961
| 577
|
py
|
Python
|
tests/test_bubble_sort.py
|
aphawkins/useful-python
|
e5b4ffbaba1a283114133a58d9d58a3d5aebb47e
|
[
"MIT"
] | null | null | null |
tests/test_bubble_sort.py
|
aphawkins/useful-python
|
e5b4ffbaba1a283114133a58d9d58a3d5aebb47e
|
[
"MIT"
] | null | null | null |
tests/test_bubble_sort.py
|
aphawkins/useful-python
|
e5b4ffbaba1a283114133a58d9d58a3d5aebb47e
|
[
"MIT"
] | null | null | null |
import unittest
from src.bubble_sort import bubble_sort
class TestBubbleSort(unittest.TestCase):
def test_empty_array(self):
self.assertEqual(bubble_sort([]), [])
def test_one_item(self):
self.assertEqual(bubble_sort([0]), [0])
def test_two_item(self):
self.assertEqual(bubble_sort([1, 0]), [0, 1])
def test_three_item(self):
self.assertEqual(bubble_sort([2, 1, 0]), [0, 1, 2])
def test_four_item(self):
self.assertEqual(bubble_sort([3, 2, 1, 0]), [0, 1, 2, 3])
if __name__ == '__main__':
unittest.main()
| 24.041667
| 65
| 0.641248
| 83
| 577
| 4.156627
| 0.325301
| 0.202899
| 0.275362
| 0.362319
| 0.501449
| 0.417391
| 0
| 0
| 0
| 0
| 0
| 0.043478
| 0.202773
| 577
| 24
| 66
| 24.041667
| 0.706522
| 0
| 0
| 0
| 0
| 0
| 0.013841
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0.333333
| false
| 0
| 0.133333
| 0
| 0.533333
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
fa8019a27f5fd3e1474c32924b521f53bfb7321b
| 36
|
py
|
Python
|
tests/__init__.py
|
ltiao/videos
|
ba371078d107da5a4c726a957b31a29bb157664d
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
ltiao/videos
|
ba371078d107da5a4c726a957b31a29bb157664d
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
ltiao/videos
|
ba371078d107da5a4c726a957b31a29bb157664d
|
[
"MIT"
] | null | null | null |
"""Unit test package for videos."""
| 18
| 35
| 0.666667
| 5
| 36
| 4.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.138889
| 36
| 1
| 36
| 36
| 0.774194
| 0.805556
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
faa97f87f91c609d43074346716ca7292bf8c8a4
| 313
|
py
|
Python
|
use.py
|
pythontrainernag/python_7
|
eaff90ac6885f3c1e1db91d885215040b32d8f0f
|
[
"MIT"
] | null | null | null |
use.py
|
pythontrainernag/python_7
|
eaff90ac6885f3c1e1db91d885215040b32d8f0f
|
[
"MIT"
] | null | null | null |
use.py
|
pythontrainernag/python_7
|
eaff90ac6885f3c1e1db91d885215040b32d8f0f
|
[
"MIT"
] | null | null | null |
##import arth
from arth import addi as a
import arth as b
print a(10, 8)
print a(4, 8)
print a(7,6)
##print subs(10, 8)
##print MY_VAR
##print arth.addi(10, 8)
##print arth.subs(10, 8)
##print arth.mul(10, 8)
##print arth.a
##obj = arth.Myclass()
##print obj
##print arth.addi.__doc__
##print arth.__doc__
| 13.041667
| 26
| 0.661342
| 61
| 313
| 3.245902
| 0.327869
| 0.181818
| 0.20202
| 0.181818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.072797
| 0.166134
| 313
| 23
| 27
| 13.608696
| 0.685824
| 0.597444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.4
| null | null | 0.6
| 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 1
|
0
| 5
|
4f09e72b4f1e35077cfae329b0211e6d05bcfc84
| 31
|
py
|
Python
|
__init__.py
|
sroet/MA8701
|
07e83296ea365523feecbaad0478d31afe7dd6c9
|
[
"MIT"
] | 1
|
2021-01-31T16:04:17.000Z
|
2021-01-31T16:04:17.000Z
|
__init__.py
|
yr-kim90/MA8701
|
eb74c52934f61eb06121b0bd185ccefdf37a8429
|
[
"MIT"
] | 8
|
2021-01-27T10:02:34.000Z
|
2021-04-22T11:16:57.000Z
|
__init__.py
|
MartinLieber/MA8701
|
b7d65a62a5becd3bea022b3bddb6df2027280732
|
[
"MIT"
] | 3
|
2021-01-27T08:46:31.000Z
|
2021-04-14T17:09:45.000Z
|
from .extra_functions import *
| 15.5
| 30
| 0.806452
| 4
| 31
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.129032
| 31
| 1
| 31
| 31
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
8791a0675b11b5901645882ce55d739d4407d9f3
| 1,822
|
py
|
Python
|
tests/test_aiotime.py
|
arseniybanayev/aiotime
|
a41aeb3d556b26425d8015cac969b01efea57280
|
[
"MIT"
] | 3
|
2020-07-10T01:15:07.000Z
|
2021-05-02T10:39:56.000Z
|
tests/test_aiotime.py
|
arseniybanayev/aiotime
|
a41aeb3d556b26425d8015cac969b01efea57280
|
[
"MIT"
] | null | null | null |
tests/test_aiotime.py
|
arseniybanayev/aiotime
|
a41aeb3d556b26425d8015cac969b01efea57280
|
[
"MIT"
] | null | null | null |
import asyncio
import pytest
import datetime as dt
import aiotime
@pytest.mark.asyncio
async def test_asyncio_sleep():
loop = asyncio.get_event_loop()
# Try sleeping with normal loop behavior
start = dt.datetime.now()
sleep_task = asyncio.create_task(asyncio.sleep(0.25))
await sleep_task
assert dt.datetime.now() - start > dt.timedelta(seconds=0.25)
with aiotime.FastForward(loop) as ff:
# Try fast-forwarding through the sleep
start = dt.datetime.now()
sleep_task = asyncio.create_task(asyncio.sleep(0.25))
await ff(1.5) # ff more than necessary
await sleep_task
assert dt.datetime.now() - start < dt.timedelta(seconds=0.05)
# Sleep with normal loop behavior now, after context manager exits
start = dt.datetime.now()
sleep_task = asyncio.create_task(asyncio.sleep(0.25))
await sleep_task
assert dt.datetime.now() - start > dt.timedelta(seconds=0.25)
@pytest.mark.asyncio
async def test_asyncio_call_later():
loop = asyncio.get_event_loop()
with aiotime.FastForward(loop) as ff:
# Try call_later() with fast-forwarding
start = dt.datetime.now()
event = asyncio.Event()
def test():
event.set()
loop.call_later(0.25, test)
await ff(1.5) # ff more than necessary
await asyncio.wait_for(event.wait(), 2) # timeout just in case
assert dt.datetime.now() - start < dt.timedelta(seconds=0.05)
# call_later() with normal loop behavior now, after context manager exits
start = dt.datetime.now()
event = asyncio.Event()
def test():
event.set()
loop.call_later(0.25, test)
await asyncio.wait_for(event.wait(), 1) # timeout just in case
assert dt.datetime.now() - start > dt.timedelta(seconds=0.25)
| 35.038462
| 77
| 0.664654
| 258
| 1,822
| 4.600775
| 0.217054
| 0.058972
| 0.10952
| 0.075821
| 0.85257
| 0.813816
| 0.775063
| 0.658804
| 0.658804
| 0.615838
| 0
| 0.025532
| 0.226125
| 1,822
| 52
| 78
| 35.038462
| 0.816312
| 0.186059
| 0
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 1
| 0.05
| false
| 0
| 0.1
| 0
| 0.15
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
87b368119b561d6e35b07ec7854c40af4e1b9ec2
| 694
|
py
|
Python
|
pypy/module/_bisect/app_bisect.py
|
kantai/passe-pypy-taint-tracking
|
b60a3663f8fe89892dc182c8497aab97e2e75d69
|
[
"MIT"
] | 2
|
2016-07-06T23:30:20.000Z
|
2017-05-30T15:59:31.000Z
|
pypy/module/_bisect/app_bisect.py
|
benoitc/pypy
|
a3e1b12d1d01dc29056b7badc051ffc034297658
|
[
"MIT"
] | null | null | null |
pypy/module/_bisect/app_bisect.py
|
benoitc/pypy
|
a3e1b12d1d01dc29056b7badc051ffc034297658
|
[
"MIT"
] | 2
|
2020-07-09T08:14:22.000Z
|
2021-01-15T18:01:25.000Z
|
from _bisect import bisect_left, bisect_right
def insort_left(a, x, lo=0, hi=-1):
"""Insert item x in list a, and keep it sorted assuming a is sorted.
If x is already in a, insert it to the left of the leftmost x.
Optional args lo (default 0) and hi (default len(a)) bound the
slice of a to be searched."""
n = bisect_left(a, x, lo, hi)
a.insert(n, x)
def insort_right(a, x, lo=0, hi=-1):
"""Insert item x in list a, and keep it sorted assuming a is sorted.
If x is already in a, insert it to the right of the rightmost x.
Optional args lo (default 0) and hi (default len(a)) bound the
slice of a to be searched."""
n = bisect_right(a, x, lo, hi)
a.insert(n, x)
| 28.916667
| 72
| 0.67147
| 141
| 694
| 3.255319
| 0.276596
| 0.017429
| 0.034858
| 0.034858
| 0.762527
| 0.762527
| 0.762527
| 0.762527
| 0.697168
| 0.697168
| 0
| 0.011132
| 0.223343
| 694
| 23
| 73
| 30.173913
| 0.840445
| 0.638329
| 0
| 0.285714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.142857
| 0
| 0.428571
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
87ee3c07f90599b41172622f257429321b1685f8
| 177
|
py
|
Python
|
spekulatio/build_file_tree/actions/copy.py
|
iwilltry42/spekulatio
|
42d678b7d7fcc13284902be5a08fb0407d96ec4d
|
[
"MIT"
] | 10
|
2019-03-19T23:05:04.000Z
|
2022-01-19T14:08:06.000Z
|
spekulatio/build_file_tree/actions/copy.py
|
iwilltry42/spekulatio
|
42d678b7d7fcc13284902be5a08fb0407d96ec4d
|
[
"MIT"
] | 6
|
2019-03-23T08:38:44.000Z
|
2020-11-24T20:50:14.000Z
|
spekulatio/build_file_tree/actions/copy.py
|
iwilltry42/spekulatio
|
42d678b7d7fcc13284902be5a08fb0407d96ec4d
|
[
"MIT"
] | 1
|
2019-09-26T12:21:36.000Z
|
2019-09-26T12:21:36.000Z
|
import shutil
def copy(root_src_path, src_path, root_dst_path, dst_path):
"""Copy file without transformation"""
shutil.copy(src_path.absolute(), dst_path.absolute())
| 25.285714
| 59
| 0.745763
| 26
| 177
| 4.769231
| 0.461538
| 0.169355
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.129944
| 177
| 6
| 60
| 29.5
| 0.805195
| 0.180791
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 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
|
e20b43d7995e37f77c925b1e5b3ed9e0973bc45b
| 71
|
py
|
Python
|
multiqc/multiqc_plugins/multiqc_plugins/modules/pca/__init__.py
|
nicholas-owen/BABS-RNASeq
|
9e352966d833939e0c8dfc530b34d9de54ad742f
|
[
"MIT"
] | 6
|
2018-12-04T15:36:03.000Z
|
2021-09-02T19:43:56.000Z
|
multiqc/multiqc_plugins/multiqc_plugins/modules/pca/__init__.py
|
nicholas-owen/BABS-RNASeq
|
9e352966d833939e0c8dfc530b34d9de54ad742f
|
[
"MIT"
] | null | null | null |
multiqc/multiqc_plugins/multiqc_plugins/modules/pca/__init__.py
|
nicholas-owen/BABS-RNASeq
|
9e352966d833939e0c8dfc530b34d9de54ad742f
|
[
"MIT"
] | 3
|
2019-02-14T12:06:37.000Z
|
2022-01-31T13:46:43.000Z
|
from __future__ import absolute_import
from .pca import MultiqcModule
| 17.75
| 38
| 0.859155
| 9
| 71
| 6.222222
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.126761
| 71
| 3
| 39
| 23.666667
| 0.903226
| 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
|
35845b0b0f7c1ea3e03ce7d5a980b6121d902a2d
| 109
|
py
|
Python
|
src/tools.py
|
MehdiAbbanaBennani/online-dictionary-learning-for-sparse-coding
|
c4d367c968954640f91aab99d4ad92806f2714c7
|
[
"MIT"
] | 11
|
2018-11-20T05:29:21.000Z
|
2022-02-25T13:39:15.000Z
|
src/tools.py
|
MehdiAbbanaBennani/online-dictionary-learning-for-sparse-coding
|
c4d367c968954640f91aab99d4ad92806f2714c7
|
[
"MIT"
] | null | null | null |
src/tools.py
|
MehdiAbbanaBennani/online-dictionary-learning-for-sparse-coding
|
c4d367c968954640f91aab99d4ad92806f2714c7
|
[
"MIT"
] | 4
|
2019-12-28T18:09:08.000Z
|
2021-01-18T12:30:17.000Z
|
def merge(list_of_lists) :
return [sublist[i] for sublist in list_of_lists for i in range(len(sublist)) ]
| 54.5
| 82
| 0.743119
| 20
| 109
| 3.85
| 0.6
| 0.155844
| 0.285714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.155963
| 109
| 2
| 82
| 54.5
| 0.836957
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 1
| 0
| 0
| null | 0
| 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
|
3584f572568ca87cf08c1fab7ec135afd55fff6d
| 2,298
|
py
|
Python
|
Tests/testTradeCalculation.py
|
elsiehupp/traveller_pyroute
|
32a43665910894896b807576125acee56ef02797
|
[
"MIT"
] | null | null | null |
Tests/testTradeCalculation.py
|
elsiehupp/traveller_pyroute
|
32a43665910894896b807576125acee56ef02797
|
[
"MIT"
] | null | null | null |
Tests/testTradeCalculation.py
|
elsiehupp/traveller_pyroute
|
32a43665910894896b807576125acee56ef02797
|
[
"MIT"
] | null | null | null |
import unittest
import re
import sys
sys.path.append('../PyRoute')
from Star import Star
from Galaxy import Sector, Galaxy
from TradeCalculation import TradeCalculation
class testTradeCalculation(unittest.TestCase):
def test_negative_route_weight_trips_assertion(self):
expected = 'Weight of edge between Irkigkhan (Core 0103) and Irkigkhan (Core 0103) must be positive'
actual = None
try:
sector = Sector(' Core', ' 0, 0')
star1 = Star.parse_line_into_star(
"0103 Irkigkhan B9C4733-9 Fl { 0 } (E69+0) [4726] B - - 123 8 Im M2 V ",
sector, 'fixed', 'fixed')
galaxy = Galaxy(min_btn=13)
tradecalc = TradeCalculation(galaxy)
tradecalc.route_weight(star1, star1)
except AssertionError as e:
actual = str(e)
pass
self.assertEqual(expected, actual)
def test_zero_route_weight_trips_assertion(self):
expected = 'Weight of edge between Irkigkhan (Core 0103) and Irkigkhan (Core 0103) must be positive'
actual = None
try:
sector = Sector(' Core', ' 0, 0')
star1 = Star.parse_line_into_star(
"0103 Irkigkhan B9C4733-9 Fl { 0 } (E69+0) [4726] B - - 123 8 Im M2 V ",
sector, 'fixed', 'fixed')
star1.importance = 0
galaxy = Galaxy(min_btn=13)
tradecalc = TradeCalculation(galaxy)
tradecalc.route_weight(star1, star1)
except AssertionError as e:
actual = str(e)
pass
self.assertEqual(expected, actual)
def test_positive_route_weight_doesnt_trip_assertion(self):
sector = Sector(' Core', ' 0, 0')
star1 = Star.parse_line_into_star(
"0103 Irkigkhan B9C4733-9 Fl { 0 } (E69+0) [4726] B - - 123 8 Im M2 V ",
sector, 'fixed', 'fixed')
star1.importance = -1
galaxy = Galaxy(min_btn=13)
tradecalc = TradeCalculation(galaxy)
self.assertEqual(2, tradecalc.route_weight(star1, star1))
if __name__ == '__main__':
unittest.main()
| 35.353846
| 133
| 0.559182
| 252
| 2,298
| 4.944444
| 0.293651
| 0.05297
| 0.054575
| 0.040931
| 0.774478
| 0.750401
| 0.750401
| 0.750401
| 0.70947
| 0.70947
| 0
| 0.074597
| 0.35248
| 2,298
| 64
| 134
| 35.90625
| 0.762769
| 0
| 0
| 0.68
| 0
| 0.06
| 0.258486
| 0
| 0
| 0
| 0
| 0
| 0.16
| 1
| 0.06
| false
| 0.04
| 0.16
| 0
| 0.24
| 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
|
35b06fba447495f323034d66807c24cea73a5e01
| 6,223
|
py
|
Python
|
src/train.py
|
mhmdrdwn/NLweather
|
48481c813fc5000d3de280f3fedb5aa2d31e7088
|
[
"MIT"
] | null | null | null |
src/train.py
|
mhmdrdwn/NLweather
|
48481c813fc5000d3de280f3fedb5aa2d31e7088
|
[
"MIT"
] | null | null | null |
src/train.py
|
mhmdrdwn/NLweather
|
48481c813fc5000d3de280f3fedb5aa2d31e7088
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
__author__ = 'Mohamed Radwan'
from .load_data import read_raw_data, make_ready_data, make_wind_direction_data
from .data_utils import build_dataloader
from .models import LSTM, BiLinearPoolingLSTM, BiLinearPoolingAutoEncoderLSTM
from .run import run_train, run_test, run_test_direction
from .vis import results
def train_speed_data(num_epochs=10):
#read data
print('Reading Data...')
train_data, test_data, scaler = read_raw_data()
# input and output size are the number of series (cities)
output_size = 7
input_size = [7, 7]
hidden_size = 16
num_layers = 1
hours_ahead = 10 #1 Hour ahead, change to (2, 5, 10, 20...etc)
print('Hours ahead: '+str(hours_ahead)+'H')
print('Training LSTM model...')
xtrain, xval, ytrain, yval = make_ready_data(train_data, feature='speed',
gap=hours_ahead)
xtest, ytest = make_ready_data(test_data, train=False, feature='speed',
gap=hours_ahead)
train_iter, val_iter, test_iter, device = build_dataloader(xtrain, xval,
xtest, ytrain, yval, ytest)
lstm_baseline = LSTM(output_size, input_size, hidden_size, num_layers)
lstm_baseline = lstm_baseline.to(device)
lstm_baseline = run_train(lstm_baseline, train_iter, val_iter, num_epochs=num_epochs,
features_set=1)
y_true, y_preds = run_test(lstm_baseline, test_iter, scaler, features_set=1)
print('Error Metrics:')
results(y_true, y_preds,feature_name = 'speed', plots=False)
print('Training BiLinear LSTM model...')
xtrain, xval, ytrain, yval = make_ready_data(train_data,
feature='speed',gap=hours_ahead)
xtrain_temp, xval_temp, _, _ = make_ready_data(train_data,
feature='temperature', gap=hours_ahead)
xtest, ytest = make_ready_data(test_data, train=False,
feature='speed', gap=hours_ahead)
xtest_temp, _ = make_ready_data(test_data, train=False,
feature='temperature', gap=hours_ahead)
train_iter, val_iter, test_iter, device = build_dataloader(xtrain, xval,
xtest, ytrain,
yval, ytest,
xtrain_temp,
xval_temp,
xtest_temp,
add_temp=True)
lstm_model = BiLinearPoolingLSTM(output_size, input_size, hidden_size,
num_layers)
lstm_model = lstm_model.to(device)
lstm_model = run_train(lstm_model, train_iter, val_iter, num_epochs=num_epochs)
y_true, y_preds = run_test(lstm_model, test_iter, scaler)
print('Error Metrics:')
results(y_true, y_preds,feature_name = 'speed', plots=False)
print('Training AutoLSTM...')
autoenc_lstm = BiLinearPoolingAutoEncoderLSTM(output_size, input_size,
hidden_size, num_layers)
autoenc_lstm = autoenc_lstm.to(device)
autoenc_lstm = run_train(autoenc_lstm, train_iter, val_iter, num_epochs=num_epochs,
outputs_nr=3)
y_true, y_preds = run_test(autoenc_lstm, test_iter, scaler, features_set=2, outputs_nr=3)
print('Error Metrics:')
results(y_true, y_preds, feature_name = 'speed', plots=False)
def train_direction_data(num_epochs=10):
print('Reading Data...')
train_data, test_data, scaler = read_raw_data()
hours_ahead = 10
print('Hours ahead: '+str(hours_ahead)+'H')
xtrain, xval, ytrain, yval = make_wind_direction_data(train_data,
gap=hours_ahead)
xtest, ytest = make_wind_direction_data(test_data, train=False,
gap=hours_ahead)
train_iter, val_iter, test_iter, device = build_dataloader(xtrain, xval,
xtest, ytrain, yval, ytest)
"""input and output size are the number of series (cities) twice
because we ave cosine and sine direction"""
input_size = [14, 14]
output_size = 14
hidden_size = 16
num_layers = 1
print('Training LSTM...')
lstm_model = LSTM(output_size, input_size, hidden_size, num_layers)
lstm_model = lstm_model.to(device)
lstm_model = run_train(lstm_model, train_iter, val_iter, num_epochs=num_epochs,
features_set=1)
y_true, y_preds = run_test_direction(lstm_model, test_iter, scaler,
features_set=1, output_sine=True)
print('Error Metrics:')
results(y_true, y_preds, feature_name = 'direction', plots=False)
xtrain_temp, xval_temp, _, _ = make_ready_data(train_data,
feature='temperature', gap=hours_ahead)
xtest_temp, _ = make_ready_data(test_data, train=False,
feature='temperature', gap=hours_ahead)
xtrain, xval, ytrain, yval = make_wind_direction_data(train_data,
gap=hours_ahead)
xtest, ytest = make_wind_direction_data(test_data, train=False,
gap=hours_ahead)
train_iter, val_iter, test_iter, device = build_dataloader(xtrain, xval,
xtest, ytrain, yval, ytest, xtrain_temp, xval_temp, xtest_temp,
add_temp=True)
print('Training BiLinear LSTM...')
input_size = [14, 7] # cosine+sine features = 14, tempretaure features = 7
output_size = 14 # cosine+sine features = 14
lstm_model = BiLinearPoolingLSTM(output_size, input_size, hidden_size,
num_layers)
lstm_model = lstm_model.to(device)
lstm_model = run_train(lstm_model, train_iter, val_iter, num_epochs=num_epochs)
y_true, y_preds = run_test_direction(lstm_model, test_iter, scaler,
output_sine=True)
print('Error Metrics:')
results(y_true, y_preds, feature_name = 'direction', plots=False)
print('Training AutoLSTM...')
model = BiLinearPoolingAutoEncoderLSTM(output_size, input_size, hidden_size,
num_layers)
model = model.to(device)
model = run_train(model, train_iter, val_iter, num_epochs=num_epochs, outputs_nr=3)
y_true, y_preds = run_test_direction(model, test_iter, scaler, outputs_nr=3,
output_sine=True)
print('Error Metrics:')
results(y_true, y_preds, feature_name = 'direction', plots=False)
| 41.765101
| 93
| 0.66431
| 814
| 6,223
| 4.740786
| 0.127764
| 0.046644
| 0.040425
| 0.034206
| 0.776108
| 0.757191
| 0.735942
| 0.716507
| 0.716507
| 0.679969
| 0
| 0.010575
| 0.240238
| 6,223
| 148
| 94
| 42.047297
| 0.805626
| 0.033424
| 0
| 0.62069
| 0
| 0
| 0.067164
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.017241
| false
| 0
| 0.043103
| 0
| 0.060345
| 0.137931
| 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
|
ea0f46514fbddadc0aaf2721b88071850eb01589
| 47
|
py
|
Python
|
openpyxl/styles/tests/__init__.py
|
CargobaseDev/openpyxl
|
782ba90d26be452379fc06f45227e12bca9bade4
|
[
"MIT"
] | 12
|
2019-08-07T16:48:21.000Z
|
2021-12-13T02:47:22.000Z
|
openpyxl/styles/tests/__init__.py
|
CargobaseDev/openpyxl
|
782ba90d26be452379fc06f45227e12bca9bade4
|
[
"MIT"
] | 19
|
2019-12-29T05:07:36.000Z
|
2021-04-22T18:09:49.000Z
|
openpyxl/styles/tests/__init__.py
|
CargobaseDev/openpyxl
|
782ba90d26be452379fc06f45227e12bca9bade4
|
[
"MIT"
] | 6
|
2020-03-23T15:59:14.000Z
|
2021-09-18T09:54:57.000Z
|
# Unit tests for style and formatting objects.
| 23.5
| 46
| 0.787234
| 7
| 47
| 5.285714
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.170213
| 47
| 1
| 47
| 47
| 0.948718
| 0.93617
| 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
|
ea0f6e6c46e5bbfdd742c15d4dec8ddebbbbfb06
| 174
|
py
|
Python
|
apps/leaflet_ts/run.py
|
earthobservatory/displacement-ts-server
|
185d9fab9af35c863de8a12d09d9f677f03ec6f9
|
[
"Apache-2.0"
] | null | null | null |
apps/leaflet_ts/run.py
|
earthobservatory/displacement-ts-server
|
185d9fab9af35c863de8a12d09d9f677f03ec6f9
|
[
"Apache-2.0"
] | null | null | null |
apps/leaflet_ts/run.py
|
earthobservatory/displacement-ts-server
|
185d9fab9af35c863de8a12d09d9f677f03ec6f9
|
[
"Apache-2.0"
] | null | null | null |
from leaflet_ts import app
if __name__ == '__main__':
#app.run(host="0.0.0.0", port=app.config['PORT'], debug=True)
app.run(host="0.0.0.0", port=app.config['PORT'])
| 29
| 65
| 0.643678
| 32
| 174
| 3.21875
| 0.46875
| 0.116505
| 0.116505
| 0.213592
| 0.601942
| 0.601942
| 0.601942
| 0.601942
| 0.601942
| 0.601942
| 0
| 0.052632
| 0.126437
| 174
| 5
| 66
| 34.8
| 0.625
| 0.344828
| 0
| 0
| 0
| 0
| 0.168142
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 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
|
ea1bbac86aba4ed28eb909d17edc913f4d3a277c
| 173
|
py
|
Python
|
en/086/python/main.py
|
franciscogomes2020/exercises
|
8b33c4b9349a9331e4002a8225adc2a482c70024
|
[
"MIT"
] | null | null | null |
en/086/python/main.py
|
franciscogomes2020/exercises
|
8b33c4b9349a9331e4002a8225adc2a482c70024
|
[
"MIT"
] | null | null | null |
en/086/python/main.py
|
franciscogomes2020/exercises
|
8b33c4b9349a9331e4002a8225adc2a482c70024
|
[
"MIT"
] | null | null | null |
# Create a program that declares a 3x3 dimensional array and fills it with keyboard-readable values. At the end, show the matrix on the screen, with the correct formatting.
| 86.5
| 172
| 0.797688
| 29
| 173
| 4.758621
| 0.827586
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013889
| 0.16763
| 173
| 1
| 173
| 173
| 0.944444
| 0.982659
| 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
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
ea2ed36c65ffa62de3409be6bbd9e63db7b0f995
| 60
|
py
|
Python
|
braintreehttp/testutils/__init__.py
|
tiffanyrzhou/braintreehttp_python
|
5eed76751ed4de91a45e7841ab2b6947b5da19ab
|
[
"MIT"
] | 2
|
2018-04-25T17:13:05.000Z
|
2019-03-24T13:23:23.000Z
|
braintreehttp/testutils/__init__.py
|
tiffanyrzhou/braintreehttp_python
|
5eed76751ed4de91a45e7841ab2b6947b5da19ab
|
[
"MIT"
] | 5
|
2018-01-31T18:05:35.000Z
|
2019-03-15T11:01:46.000Z
|
braintreehttp/testutils/__init__.py
|
tiffanyrzhou/braintreehttp_python
|
5eed76751ed4de91a45e7841ab2b6947b5da19ab
|
[
"MIT"
] | 8
|
2018-03-31T02:06:47.000Z
|
2021-03-28T02:13:55.000Z
|
from braintreehttp.testutils.testharness import TestHarness
| 30
| 59
| 0.9
| 6
| 60
| 9
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.066667
| 60
| 1
| 60
| 60
| 0.964286
| 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
|
ea75b7c581c4f7922e654f4ab21bb279fa0d23cd
| 50
|
py
|
Python
|
mathlibpy/__init__.py
|
jackromo/mathLibPy
|
b80badd293b93da85aaf122c3d3da022f6dab361
|
[
"MIT"
] | 1
|
2020-06-09T05:43:33.000Z
|
2020-06-09T05:43:33.000Z
|
mathlibpy/__init__.py
|
jackromo/mathLibPy
|
b80badd293b93da85aaf122c3d3da022f6dab361
|
[
"MIT"
] | 15
|
2016-03-06T17:10:40.000Z
|
2016-05-28T14:06:16.000Z
|
mathlibpy/__init__.py
|
jackromo/mathLibPy
|
b80badd293b93da85aaf122c3d3da022f6dab361
|
[
"MIT"
] | null | null | null |
import functions
import matrices
import constants
| 12.5
| 16
| 0.88
| 6
| 50
| 7.333333
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12
| 50
| 3
| 17
| 16.666667
| 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
|
ea7e98f9dce568cc7abc9f06b149a40ecc5c3969
| 98
|
py
|
Python
|
preprocessors/__init__.py
|
laddie132/LW-PT
|
28b469ba68a5d4fba68b992cff5372e63ec2ed42
|
[
"MIT"
] | 9
|
2020-08-20T18:15:43.000Z
|
2022-02-10T02:54:30.000Z
|
preprocessors/__init__.py
|
laddie132/LW-PT
|
28b469ba68a5d4fba68b992cff5372e63ec2ed42
|
[
"MIT"
] | 1
|
2021-11-19T01:29:47.000Z
|
2021-11-19T09:58:38.000Z
|
preprocessors/__init__.py
|
laddie132/LW-PT
|
28b469ba68a5d4fba68b992cff5372e63ec2ed42
|
[
"MIT"
] | 3
|
2021-05-29T02:11:34.000Z
|
2021-12-14T15:43:22.000Z
|
from .rmsc_data import RMSC
from .aapd_data import AAPD, AAPDHier
from .rcv1v2_data import RCV1V2
| 24.5
| 37
| 0.826531
| 16
| 98
| 4.875
| 0.4375
| 0.384615
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.047059
| 0.132653
| 98
| 3
| 38
| 32.666667
| 0.870588
| 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
|
576179a3596ce6374ee99784d96c6f8cc606157a
| 83
|
py
|
Python
|
components/food.py
|
TheNicGard/DungeonStar
|
525aeb53217166d2ce83e4e91a3b8c1b102f0dcb
|
[
"MIT"
] | 3
|
2019-07-11T17:54:42.000Z
|
2021-03-09T10:58:13.000Z
|
components/food.py
|
BandW2011/DungeonStar
|
525aeb53217166d2ce83e4e91a3b8c1b102f0dcb
|
[
"MIT"
] | 1
|
2019-07-11T17:55:38.000Z
|
2020-05-03T06:34:56.000Z
|
components/food.py
|
TheNicGard/DungeonStar
|
525aeb53217166d2ce83e4e91a3b8c1b102f0dcb
|
[
"MIT"
] | null | null | null |
class Food:
def __init__(self, nutrition):
self.nutrition = nutrition
| 16.6
| 34
| 0.662651
| 9
| 83
| 5.666667
| 0.666667
| 0.509804
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.253012
| 83
| 4
| 35
| 20.75
| 0.822581
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
5782a9ff7b147e72667c7a7ed887c38e6ab2f678
| 843
|
py
|
Python
|
06_Transformacoes_do_Conjunto_de_Dados/6.4_Imputacao_de_Valores_Ausentes/6.4_Imputacao_de_Valores_Ausentes.py
|
BrunoBertti/Scikit_Learning
|
4b9e10ff7909f3728ac1e8bba19f5fd779340bc4
|
[
"MIT"
] | null | null | null |
06_Transformacoes_do_Conjunto_de_Dados/6.4_Imputacao_de_Valores_Ausentes/6.4_Imputacao_de_Valores_Ausentes.py
|
BrunoBertti/Scikit_Learning
|
4b9e10ff7909f3728ac1e8bba19f5fd779340bc4
|
[
"MIT"
] | null | null | null |
06_Transformacoes_do_Conjunto_de_Dados/6.4_Imputacao_de_Valores_Ausentes/6.4_Imputacao_de_Valores_Ausentes.py
|
BrunoBertti/Scikit_Learning
|
4b9e10ff7909f3728ac1e8bba19f5fd779340bc4
|
[
"MIT"
] | null | null | null |
########## 6.4. Imputação de valores ausentes ##########
# Por vários motivos, muitos conjuntos de dados do mundo real contêm valores ausentes, geralmente codificados como espaços em branco, NaNs ou outros espaços reservados. Esses conjuntos de dados, no entanto, são incompatíveis com os estimadores scikit-learn, que assumem que todos os valores em uma matriz são numéricos e que todos têm e mantêm significado. Uma estratégia básica para usar conjuntos de dados incompletos é descartar linhas e/ou colunas inteiras contendo valores ausentes. No entanto, isso tem o preço de perder dados que podem ser valiosos (mesmo que incompletos). Uma estratégia melhor é imputar os valores ausentes, ou seja, inferi-los a partir da parte conhecida dos dados. Consulte a entrada do Glossário de Termos Comuns e Elementos da API sobre imputação.
| 140.5
| 782
| 0.787663
| 129
| 843
| 5.147287
| 0.658915
| 0.090361
| 0.072289
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.002829
| 0.161329
| 843
| 5
| 783
| 168.6
| 0.936351
| 0.96204
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0.2
| null | 1
| null | true
| 0
| 0
| null | null | null | 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
57833b4acefabad3f0e8454d949035710e812d40
| 97
|
py
|
Python
|
cruiser/admin.py
|
code-md/code.md
|
d2e52a58b31484465034ea2abe209daade018a05
|
[
"MIT"
] | 1
|
2020-02-11T05:17:39.000Z
|
2020-02-11T05:17:39.000Z
|
cruiser/admin.py
|
code-md/code.md
|
d2e52a58b31484465034ea2abe209daade018a05
|
[
"MIT"
] | null | null | null |
cruiser/admin.py
|
code-md/code.md
|
d2e52a58b31484465034ea2abe209daade018a05
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Registrant
admin.site.register(Registrant)
| 19.4
| 32
| 0.835052
| 13
| 97
| 6.230769
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103093
| 97
| 4
| 33
| 24.25
| 0.931034
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
57ce1dc281c80abbc9f3f3cfa6cfce46f6259ff9
| 123
|
py
|
Python
|
nevermind/user/admin.py
|
mju-likelion/Nevermind-backend
|
1a527c28867f00a2b5809a4752dabef69d1da4b4
|
[
"MIT"
] | null | null | null |
nevermind/user/admin.py
|
mju-likelion/Nevermind-backend
|
1a527c28867f00a2b5809a4752dabef69d1da4b4
|
[
"MIT"
] | null | null | null |
nevermind/user/admin.py
|
mju-likelion/Nevermind-backend
|
1a527c28867f00a2b5809a4752dabef69d1da4b4
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import User, Session
admin.site.register(User)
admin.site.register(Session)
| 20.5
| 33
| 0.813008
| 18
| 123
| 5.555556
| 0.555556
| 0.18
| 0.34
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.097561
| 123
| 5
| 34
| 24.6
| 0.900901
| 0
| 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
|
aa0fd42186a2f96d3ffbd219b59f547eb54fc672
| 69
|
py
|
Python
|
rasa_chinese/core/__init__.py
|
wegylexy/rasa_chinese
|
76ecd8b6bc7b518b9d8c416668fa2a0ad75bdd37
|
[
"Apache-2.0"
] | 80
|
2020-12-28T06:33:01.000Z
|
2022-03-30T09:02:19.000Z
|
rasa_chinese/core/__init__.py
|
AlexAuthor7/rasa_chinese
|
76ecd8b6bc7b518b9d8c416668fa2a0ad75bdd37
|
[
"Apache-2.0"
] | 4
|
2021-08-20T10:30:22.000Z
|
2022-03-14T05:43:22.000Z
|
rasa_chinese/core/__init__.py
|
AlexAuthor7/rasa_chinese
|
76ecd8b6bc7b518b9d8c416668fa2a0ad75bdd37
|
[
"Apache-2.0"
] | 24
|
2020-12-28T08:36:17.000Z
|
2022-03-29T11:11:41.000Z
|
from rasa_chinese.core.policies import StackedBilstmTensorFlowPolicy
| 34.5
| 68
| 0.913043
| 7
| 69
| 8.857143
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.057971
| 69
| 1
| 69
| 69
| 0.953846
| 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
|
aa433084afdee825b776b336960d26127329bc76
| 104
|
py
|
Python
|
conet/dataset_utils/bengali_convert.py
|
steermomo/conet
|
21d60fcb4ab9a01a00aa4d9cd0bdee79ea35cc4b
|
[
"MIT"
] | null | null | null |
conet/dataset_utils/bengali_convert.py
|
steermomo/conet
|
21d60fcb4ab9a01a00aa4d9cd0bdee79ea35cc4b
|
[
"MIT"
] | null | null | null |
conet/dataset_utils/bengali_convert.py
|
steermomo/conet
|
21d60fcb4ab9a01a00aa4d9cd0bdee79ea35cc4b
|
[
"MIT"
] | 1
|
2020-05-18T10:05:24.000Z
|
2020-05-18T10:05:24.000Z
|
from conet.datasets.bengali_dataset import DATA_DIR
from sklearn.model_selection import StratifiedKFold
| 34.666667
| 51
| 0.894231
| 14
| 104
| 6.428571
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.076923
| 104
| 2
| 52
| 52
| 0.9375
| 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
|
a4ad3086b210d7db3c39d06bd073e93d4363fd6e
| 129
|
py
|
Python
|
SearchProductStrategy.py
|
impala69/oop_account_manager_system
|
53b39b8c8ca9774ce8f3a5d090e20ca33c626ca4
|
[
"MIT"
] | null | null | null |
SearchProductStrategy.py
|
impala69/oop_account_manager_system
|
53b39b8c8ca9774ce8f3a5d090e20ca33c626ca4
|
[
"MIT"
] | null | null | null |
SearchProductStrategy.py
|
impala69/oop_account_manager_system
|
53b39b8c8ca9774ce8f3a5d090e20ca33c626ca4
|
[
"MIT"
] | null | null | null |
class SearchProductStrategy:
def __init__(self):
pass
def searching(self, products, search_params):
pass
| 21.5
| 49
| 0.666667
| 13
| 129
| 6.230769
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.263566
| 129
| 6
| 50
| 21.5
| 0.852632
| 0
| 0
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0.4
| 0
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
a4aea1ad8f0231c4f4e1112cd11f1cf028a8ce1c
| 344
|
py
|
Python
|
yacht/config/proto/__init__.py
|
IusztinPaul/yacht
|
c68ab7c66bde860bb91534c29e97772ba328adb5
|
[
"Apache-2.0"
] | 5
|
2021-09-03T10:16:50.000Z
|
2022-02-28T07:32:43.000Z
|
yacht/config/proto/__init__.py
|
IusztinPaul/yacht
|
c68ab7c66bde860bb91534c29e97772ba328adb5
|
[
"Apache-2.0"
] | null | null | null |
yacht/config/proto/__init__.py
|
IusztinPaul/yacht
|
c68ab7c66bde860bb91534c29e97772ba328adb5
|
[
"Apache-2.0"
] | 1
|
2022-03-05T16:06:46.000Z
|
2022-03-05T16:06:46.000Z
|
from .agent_pb2 import *
from .backbone_pb2 import *
from .backtest_pb2 import *
from .config_pb2 import *
from .environment_pb2 import *
from .feature_extractor_pb2 import *
from .input_pb2 import *
from .meta_pb2 import *
from .net_architecture_pb2 import *
from .policy_pb2 import *
from .reward_schema_pb2 import *
from .train_pb2 import *
| 26.461538
| 36
| 0.790698
| 51
| 344
| 5.039216
| 0.352941
| 0.420233
| 0.55642
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.040541
| 0.139535
| 344
| 12
| 37
| 28.666667
| 0.827703
| 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
|
a4b2249de99e944b7e1f04fa7760cca582eaf702
| 55
|
py
|
Python
|
alvi/containers/list/__init__.py
|
alviproject/alvi
|
ec77919a546c11c46b178a21236792f8b0d95cbd
|
[
"MIT"
] | 10
|
2015-06-01T09:11:33.000Z
|
2018-03-02T13:52:46.000Z
|
alvi/containers/list/__init__.py
|
alviproject/alvi
|
ec77919a546c11c46b178a21236792f8b0d95cbd
|
[
"MIT"
] | null | null | null |
alvi/containers/list/__init__.py
|
alviproject/alvi
|
ec77919a546c11c46b178a21236792f8b0d95cbd
|
[
"MIT"
] | 5
|
2015-09-17T17:34:16.000Z
|
2019-09-04T10:50:29.000Z
|
from .base import List
from .cartesian import Cartesian
| 27.5
| 32
| 0.836364
| 8
| 55
| 5.75
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.127273
| 55
| 2
| 32
| 27.5
| 0.958333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
353261560096a7ecb162831fc8135944bb166cdf
| 63
|
py
|
Python
|
metul/__init__.py
|
didzislauva/metul
|
8fc9c8160bb7178024e24611149088b76f572fe0
|
[
"MIT"
] | null | null | null |
metul/__init__.py
|
didzislauva/metul
|
8fc9c8160bb7178024e24611149088b76f572fe0
|
[
"MIT"
] | null | null | null |
metul/__init__.py
|
didzislauva/metul
|
8fc9c8160bb7178024e24611149088b76f572fe0
|
[
"MIT"
] | null | null | null |
def metul():
return(u'this is the return text in nicode')
| 15.75
| 46
| 0.666667
| 11
| 63
| 3.818182
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.222222
| 63
| 3
| 47
| 21
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0.559322
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| true
| 0
| 0
| 0.5
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
1053c2cc50c5a3e6217f31d1cf680d6743edd007
| 155
|
py
|
Python
|
plugins/addition_plugin.py
|
dionisioC/python_plugin_example
|
38545c8f3c2fa1bdee03b9b399763122c7c3e760
|
[
"MIT"
] | null | null | null |
plugins/addition_plugin.py
|
dionisioC/python_plugin_example
|
38545c8f3c2fa1bdee03b9b399763122c7c3e760
|
[
"MIT"
] | null | null | null |
plugins/addition_plugin.py
|
dionisioC/python_plugin_example
|
38545c8f3c2fa1bdee03b9b399763122c7c3e760
|
[
"MIT"
] | null | null | null |
from plugins.plugin import Plugin
class AdditionPlugin(Plugin):
op = '+'
@staticmethod
def calc(num_1, num_2):
return num_1 + num_2
| 15.5
| 33
| 0.651613
| 21
| 155
| 4.619048
| 0.666667
| 0.082474
| 0.14433
| 0.164948
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.034783
| 0.258065
| 155
| 9
| 34
| 17.222222
| 0.808696
| 0
| 0
| 0
| 0
| 0
| 0.006452
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.166667
| 0.166667
| 0.833333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
108a9b2015240a790dab2eadf8071a3200c10005
| 148
|
py
|
Python
|
page_get/__init__.py
|
dachenlian/weibospider
|
4fe9e08efcca11573f485a2ddbad3b7bc422fa7c
|
[
"MIT"
] | 21
|
2020-01-02T02:19:57.000Z
|
2022-03-15T07:43:39.000Z
|
page_get/__init__.py
|
dachenlian/weibospider
|
4fe9e08efcca11573f485a2ddbad3b7bc422fa7c
|
[
"MIT"
] | 7
|
2020-02-12T03:28:48.000Z
|
2021-12-13T20:30:26.000Z
|
page_get/__init__.py
|
dachenlian/weibospider
|
4fe9e08efcca11573f485a2ddbad3b7bc422fa7c
|
[
"MIT"
] | 1
|
2018-08-02T03:08:25.000Z
|
2018-08-02T03:08:25.000Z
|
from .basic import get_page
from .status import get_cont_of_weibo
from .user import (
get_profile, get_fans_or_followers_ids, get_user_profile)
| 29.6
| 61
| 0.824324
| 25
| 148
| 4.44
| 0.6
| 0.243243
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.128378
| 148
| 4
| 62
| 37
| 0.860465
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
52b1709d89a81102358fa7722bed916183a1253f
| 133
|
py
|
Python
|
edd_utils/parsers/biolector/__init__.py
|
TeselaGen/jbei-edd
|
92792fb30bbd504143b2f75bf08d05b141a7ef6f
|
[
"BSD-3-Clause-LBNL"
] | null | null | null |
edd_utils/parsers/biolector/__init__.py
|
TeselaGen/jbei-edd
|
92792fb30bbd504143b2f75bf08d05b141a7ef6f
|
[
"BSD-3-Clause-LBNL"
] | null | null | null |
edd_utils/parsers/biolector/__init__.py
|
TeselaGen/jbei-edd
|
92792fb30bbd504143b2f75bf08d05b141a7ef6f
|
[
"BSD-3-Clause-LBNL"
] | null | null | null |
from ..util import RawImportRecord # noqa
from .parser import getRawImportRecordsAsJSON, BiolectorXMLReader, XMLImportError # noqa
| 44.333333
| 89
| 0.827068
| 12
| 133
| 9.166667
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.120301
| 133
| 2
| 90
| 66.5
| 0.940171
| 0.067669
| 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
|
52db27032f85b996d796202c035bd559d1daf0a5
| 162
|
py
|
Python
|
app/errors.py
|
bethwelkip/NewsBrief
|
ee6a81a47f3ab2a95e3d573a424fddf95f5ba551
|
[
"MIT"
] | null | null | null |
app/errors.py
|
bethwelkip/NewsBrief
|
ee6a81a47f3ab2a95e3d573a424fddf95f5ba551
|
[
"MIT"
] | null | null | null |
app/errors.py
|
bethwelkip/NewsBrief
|
ee6a81a47f3ab2a95e3d573a424fddf95f5ba551
|
[
"MIT"
] | null | null | null |
from flask import render_template
from . import main_app
@main.app_errorhandler(404)
def four_oh_four(error):
# return render_template('fourohfour.html'), 404
| 32.4
| 52
| 0.796296
| 24
| 162
| 5.125
| 0.666667
| 0.227642
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.041667
| 0.111111
| 162
| 5
| 52
| 32.4
| 0.8125
| 0.290123
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.5
| null | null | 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
52e1abf04de2ccb96fce12677c38e98861cc2b8b
| 87
|
py
|
Python
|
pbtacos/__init__.py
|
mpkocher/pbtacos
|
51fa497bbed028ad7114b77981a681f20db4d7cc
|
[
"MIT"
] | 1
|
2015-12-23T17:34:25.000Z
|
2015-12-23T17:34:25.000Z
|
pbtacos/__init__.py
|
mpkocher/pbtacos
|
51fa497bbed028ad7114b77981a681f20db4d7cc
|
[
"MIT"
] | null | null | null |
pbtacos/__init__.py
|
mpkocher/pbtacos
|
51fa497bbed028ad7114b77981a681f20db4d7cc
|
[
"MIT"
] | null | null | null |
VERSION = (0, 2, 0)
def get_version():
return ".".join([str(i) for i in VERSION])
| 17.4
| 46
| 0.586207
| 15
| 87
| 3.333333
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.043478
| 0.206897
| 87
| 5
| 46
| 17.4
| 0.681159
| 0
| 0
| 0
| 0
| 0
| 0.011364
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0.333333
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
5e179f741f905060304764541d3465ec0f313df7
| 36
|
py
|
Python
|
__init__.py
|
hubbarr/Smart_Mirror
|
04d678cf234a05684532d412f5c2a58ec77c964c
|
[
"MIT"
] | null | null | null |
__init__.py
|
hubbarr/Smart_Mirror
|
04d678cf234a05684532d412f5c2a58ec77c964c
|
[
"MIT"
] | null | null | null |
__init__.py
|
hubbarr/Smart_Mirror
|
04d678cf234a05684532d412f5c2a58ec77c964c
|
[
"MIT"
] | null | null | null |
# Needed for python 2 compatibility
| 18
| 35
| 0.805556
| 5
| 36
| 5.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.033333
| 0.166667
| 36
| 1
| 36
| 36
| 0.933333
| 0.916667
| 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
|
5e2286bda8316b4ef3fdc1eb76eb8d4286026c04
| 68
|
py
|
Python
|
orange3/Orange/canvas/help/__init__.py
|
rgschmitz1/BioDepot-workflow-builder
|
f74d904eeaf91ec52ec9b703d9fb38e9064e5a66
|
[
"MIT"
] | 54
|
2017-01-08T17:21:49.000Z
|
2021-11-02T08:46:07.000Z
|
orange3/Orange/canvas/help/__init__.py
|
Synthia-3/BioDepot-workflow-builder
|
4ee93abe2d79465755e82a145af3b6a6e1e79fd4
|
[
"MIT"
] | 22
|
2017-03-28T06:03:14.000Z
|
2021-07-28T05:43:55.000Z
|
orange3/Orange/canvas/help/__init__.py
|
Synthia-3/BioDepot-workflow-builder
|
4ee93abe2d79465755e82a145af3b6a6e1e79fd4
|
[
"MIT"
] | 21
|
2017-01-26T21:12:09.000Z
|
2022-01-31T21:34:59.000Z
|
from .provider import HelpProvider
from .manager import HelpManager
| 22.666667
| 34
| 0.852941
| 8
| 68
| 7.25
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 68
| 2
| 35
| 34
| 0.966667
| 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
|
5e2662286c4e0920b153885b796a5c6d9df6a729
| 153
|
py
|
Python
|
examples/02_sensors/replace_fs.py
|
andy040670/EmbUI_int
|
05b0dd6c7c72ac0a62f3ec6fae384843c797e92c
|
[
"MIT"
] | 36
|
2020-10-12T05:38:15.000Z
|
2022-03-14T16:34:36.000Z
|
examples/02_sensors/replace_fs.py
|
andy040670/EmbUI_int
|
05b0dd6c7c72ac0a62f3ec6fae384843c797e92c
|
[
"MIT"
] | 6
|
2020-10-19T10:14:59.000Z
|
2021-07-31T15:54:55.000Z
|
examples/02_sensors/replace_fs.py
|
andy040670/EmbUI_int
|
05b0dd6c7c72ac0a62f3ec6fae384843c797e92c
|
[
"MIT"
] | 24
|
2020-10-12T05:11:48.000Z
|
2022-02-12T19:36:17.000Z
|
Import("env")
print("Replace MKSPIFFSTOOL with mklittlefs")
# replace with .exe file for windows if required
env.Replace (MKSPIFFSTOOL = "./mklittlefs")
| 30.6
| 48
| 0.764706
| 19
| 153
| 6.157895
| 0.684211
| 0.324786
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 153
| 4
| 49
| 38.25
| 0.866667
| 0.300654
| 0
| 0
| 0
| 0
| 0.485714
| 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
|
eab45829dbfdb1f14c6f44ab067225f441f5fbfa
| 112
|
py
|
Python
|
DICOMPUTE/__init__.py
|
haehn/dicompute
|
ee4364aaa1258a370bd62bbaf6e577936bf463b3
|
[
"MIT"
] | null | null | null |
DICOMPUTE/__init__.py
|
haehn/dicompute
|
ee4364aaa1258a370bd62bbaf6e577936bf463b3
|
[
"MIT"
] | null | null | null |
DICOMPUTE/__init__.py
|
haehn/dicompute
|
ee4364aaa1258a370bd62bbaf6e577936bf463b3
|
[
"MIT"
] | null | null | null |
from .gc import GC
from .processing import Processing
from .deeplesion import DeepLesion
from .cvae import CVAE
| 22.4
| 34
| 0.821429
| 16
| 112
| 5.75
| 0.375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 112
| 4
| 35
| 28
| 0.958333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
dc36265d9cf1a05aa7c8496bc943979de398f512
| 47
|
py
|
Python
|
webandgis/__init__.py
|
ingenieroariel/webandgis
|
096813d8177328f2df51ce0a7870713ed1269652
|
[
"MIT"
] | 3
|
2015-05-05T21:47:22.000Z
|
2019-05-29T15:24:50.000Z
|
webandgis/__init__.py
|
ingenieroariel/webandgis
|
096813d8177328f2df51ce0a7870713ed1269652
|
[
"MIT"
] | null | null | null |
webandgis/__init__.py
|
ingenieroariel/webandgis
|
096813d8177328f2df51ce0a7870713ed1269652
|
[
"MIT"
] | 2
|
2017-01-25T05:39:32.000Z
|
2020-03-13T23:07:10.000Z
|
"""
Django app to manage geospatial layers
"""
| 11.75
| 38
| 0.702128
| 6
| 47
| 5.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.170213
| 47
| 3
| 39
| 15.666667
| 0.846154
| 0.808511
| 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
|
dcb118356d3c13a9721cb59aaa9ab6f3ada47c27
| 10,586
|
py
|
Python
|
src/tests/test_parser.py
|
MarcAureleCoste/sqla-filters-json
|
fad2c4fc3f52c83f2632c4190f170590eff4ef49
|
[
"MIT"
] | 1
|
2020-09-22T15:34:32.000Z
|
2020-09-22T15:34:32.000Z
|
src/tests/test_parser.py
|
MarcAureleCoste/sqla-filters-json
|
fad2c4fc3f52c83f2632c4190f170590eff4ef49
|
[
"MIT"
] | 2
|
2018-10-04T09:13:21.000Z
|
2019-02-01T11:17:36.000Z
|
src/tests/test_parser.py
|
MarcAureleCoste/sqla-filters-json
|
fad2c4fc3f52c83f2632c4190f170590eff4ef49
|
[
"MIT"
] | null | null | null |
import os
from typing import Dict
from sqla_filters.parser.json import JSONFiltersParser
from sqla_filters.nodes.logical import AndNode
from sqla_filters.nodes.operational import (
EqNode,
NotEqNode,
NullNode,
NotNullNode,
GtNode,
GteNode,
LtNode,
LteNode,
InNode,
NotInNode,
ContainsNode,
LikeNode
)
class TestParserBase(object):
_resources: Dict = {}
def _get_parser(self, key: str) -> JSONFiltersParser:
"""Return a parser instance."""
file_path = os.path.join(
os.path.dirname(__file__),
self._resources[key]
)
json_data = open(file_path).read()
return JSONFiltersParser(json_data)
class TestJsonEquality(TestParserBase):
def setup_class(self):
self._resources['eq'] = 'resources/eq/eq.json'
self._resources['noteq'] = 'resources/eq/noteq.json'
self._resources['eq_rel'] = 'resources/eq/eq_rel.json'
self._resources['noteq_rel'] = 'resources/eq/noteq_rel.json'
def test_01_eq(self):
parser = self._get_parser('eq')
assert isinstance(parser.tree.root, AndNode)
assert len(parser.tree.root.childs) == 1
assert isinstance(parser.tree.root.childs[0], EqNode)
assert parser.tree.root.childs[0].attribute == 'name'
assert parser.tree.root.childs[0].value == 'Toto'
def test_02_noteq(self):
parser = self._get_parser('noteq')
assert isinstance(parser.tree.root, AndNode)
assert len(parser.tree.root.childs) == 1
assert isinstance(parser.tree.root.childs[0], NotEqNode)
assert parser.tree.root.childs[0].attribute == 'name'
assert parser.tree.root.childs[0].value == 'Toto'
def test_03_eq_rel(self):
parser = self._get_parser('eq_rel')
assert isinstance(parser.tree.root, AndNode)
assert len(parser.tree.root.childs) == 1
assert isinstance(parser.tree.root.childs[0], EqNode)
assert parser.tree.root.childs[0].attribute == 'author.person.name'
assert parser.tree.root.childs[0].value == 'Person_1'
def test_04_noteq_rel(self):
parser = self._get_parser('eq_rel')
assert isinstance(parser.tree.root, AndNode)
assert len(parser.tree.root.childs) == 1
assert isinstance(parser.tree.root.childs[0], EqNode)
assert parser.tree.root.childs[0].attribute == 'author.person.name'
assert parser.tree.root.childs[0].value == 'Person_1'
class TestJsonNull(TestParserBase):
def setup_class(self):
self._resources['null'] = 'resources/null/null.json'
self._resources['notnull'] = 'resources/null/notnull.json'
def test_01_null(self):
parser = self._get_parser('null')
assert isinstance(parser.tree.root, AndNode)
assert len(parser.tree.root.childs) == 1
assert isinstance(parser.tree.root.childs[0], NullNode)
assert parser.tree.root.childs[0].attribute == 'average'
assert parser.tree.root.childs[0].value == None
def test_02_notnull(self):
parser = self._get_parser('notnull')
assert isinstance(parser.tree.root, AndNode)
assert len(parser.tree.root.childs) == 1
assert isinstance(parser.tree.root.childs[0], NotNullNode)
assert parser.tree.root.childs[0].attribute == 'average'
assert parser.tree.root.childs[0].value == None
class TestJsonGreater(TestParserBase):
def setup_class(self):
self._resources['gt'] = 'resources/gt/gt.json'
self._resources['gte'] = 'resources/gt/gte.json'
self._resources['gt_rel'] = 'resources/gt/gt_rel.json'
self._resources['gte_rel'] = 'resources/gt/gte_rel.json'
def test_01_gt(self):
parser = self._get_parser('gt')
assert isinstance(parser.tree.root, AndNode)
assert len(parser.tree.root.childs) == 1
assert isinstance(parser.tree.root.childs[0], GtNode)
assert parser.tree.root.childs[0].attribute == 'age'
assert parser.tree.root.childs[0].value == 21
def test_02_gte(self):
parser = self._get_parser('gte')
assert isinstance(parser.tree.root, AndNode)
assert len(parser.tree.root.childs) == 1
assert isinstance(parser.tree.root.childs[0], GteNode)
assert parser.tree.root.childs[0].attribute == 'age'
assert parser.tree.root.childs[0].value == 21
def test_03_gt_rel(self):
parser = self._get_parser('gt_rel')
assert isinstance(parser.tree.root, AndNode)
assert len(parser.tree.root.childs) == 1
assert isinstance(parser.tree.root.childs[0], GtNode)
assert parser.tree.root.childs[0].attribute == 'author.posts.pages'
assert parser.tree.root.childs[0].value == 7
def test_04_gte_rel(self):
parser = self._get_parser('gte_rel')
assert isinstance(parser.tree.root, AndNode)
assert len(parser.tree.root.childs) == 1
assert isinstance(parser.tree.root.childs[0], GteNode)
assert parser.tree.root.childs[0].attribute == 'author.posts.pages'
assert parser.tree.root.childs[0].value == 7
class TestJsonLower(TestParserBase):
def setup_class(self):
self._resources['lt'] = 'resources/lt/lt.json'
self._resources['lte'] = 'resources/lt/lte.json'
self._resources['lt_rel'] = 'resources/lt/lt_rel.json'
self._resources['lte_rel'] = 'resources/lt/lte_rel.json'
def test_01_lt(self):
parser = self._get_parser('lt')
assert isinstance(parser.tree.root, AndNode)
assert len(parser.tree.root.childs) == 1
assert isinstance(parser.tree.root.childs[0], LtNode)
assert parser.tree.root.childs[0].attribute == 'age'
assert parser.tree.root.childs[0].value == 23
def test_02_lte(self):
parser = self._get_parser('lte')
assert isinstance(parser.tree.root, AndNode)
assert len(parser.tree.root.childs) == 1
assert isinstance(parser.tree.root.childs[0], LteNode)
assert parser.tree.root.childs[0].attribute == 'age'
assert parser.tree.root.childs[0].value == 23
def test_03_lt_rel(self):
parser = self._get_parser('lt_rel')
assert isinstance(parser.tree.root, AndNode)
assert len(parser.tree.root.childs) == 1
assert isinstance(parser.tree.root.childs[0], LtNode)
assert parser.tree.root.childs[0].attribute == 'author.posts.pages'
assert parser.tree.root.childs[0].value == 4
def test_04_lte_rel(self):
parser = self._get_parser('lte_rel')
assert isinstance(parser.tree.root, AndNode)
assert len(parser.tree.root.childs) == 1
assert isinstance(parser.tree.root.childs[0], LteNode)
assert parser.tree.root.childs[0].attribute == 'author.posts.pages'
assert parser.tree.root.childs[0].value == 4
class TestJsonIn(TestParserBase):
def setup_class(self):
self._resources['in'] = 'resources/in/in.json'
self._resources['notin'] = 'resources/in/notin.json'
self._resources['in_rel'] = 'resources/in/in_rel.json'
self._resources['notin_rel'] = 'resources/in/notin_rel.json'
def test_01_in(self):
parser = self._get_parser('in')
assert isinstance(parser.tree.root, AndNode)
assert len(parser.tree.root.childs) == 1
assert isinstance(parser.tree.root.childs[0], InNode)
assert parser.tree.root.childs[0].attribute == 'name'
assert parser.tree.root.childs[0].value == ['Toto', 'Titi']
def test_02_notin(self):
parser = self._get_parser('notin')
assert isinstance(parser.tree.root, AndNode)
assert len(parser.tree.root.childs) == 1
assert isinstance(parser.tree.root.childs[0], NotInNode)
assert parser.tree.root.childs[0].attribute == 'name'
assert parser.tree.root.childs[0].value == ['Toto', 'Titi']
def test_03_in_rel(self):
parser = self._get_parser('in_rel')
assert isinstance(parser.tree.root, AndNode)
assert len(parser.tree.root.childs) == 1
assert isinstance(parser.tree.root.childs[0], InNode)
assert parser.tree.root.childs[0].attribute == 'author.person.name'
assert parser.tree.root.childs[0].value == ['Person_1', 'Person_3']
def test_04_notin_rel(self):
parser = self._get_parser('notin_rel')
assert isinstance(parser.tree.root, AndNode)
assert len(parser.tree.root.childs) == 1
assert isinstance(parser.tree.root.childs[0], NotInNode)
assert parser.tree.root.childs[0].attribute == 'author.person.name'
assert parser.tree.root.childs[0].value == ['Person_1', 'Person_3']
class TestJsonContains(TestParserBase):
def setup_class(self):
self._resources['contains'] = 'resources/contains/contains.json'
def test_01_contains(self):
parser = self._get_parser('contains')
assert isinstance(parser.tree.root, AndNode)
assert len(parser.tree.root.childs) == 1
assert isinstance(parser.tree.root.childs[0], ContainsNode)
assert parser.tree.root.childs[0].attribute == 'name'
assert parser.tree.root.childs[0].value == 'to'
class TestJsonLike(TestParserBase):
def setup_class(self):
self._resources['like_01'] = 'resources/like/like_01.json'
self._resources['like_02'] = 'resources/like/like_02.json'
self._resources['like_03'] = 'resources/like/like_03.json'
def test_01_like(self):
parser = self._get_parser('like_01')
assert isinstance(parser.tree.root, AndNode)
assert len(parser.tree.root.childs) == 1
assert isinstance(parser.tree.root.childs[0], LikeNode)
assert parser.tree.root.childs[0].attribute == 'name'
assert parser.tree.root.childs[0].value == 'Pers%'
def test_02_like(self):
parser = self._get_parser('like_02')
assert isinstance(parser.tree.root, AndNode)
assert len(parser.tree.root.childs) == 1
assert isinstance(parser.tree.root.childs[0], LikeNode)
assert parser.tree.root.childs[0].attribute == 'name'
assert parser.tree.root.childs[0].value == '%_1'
def test_03_like(self):
parser = self._get_parser('like_03')
assert isinstance(parser.tree.root, AndNode)
assert len(parser.tree.root.childs) == 1
assert isinstance(parser.tree.root.childs[0], LikeNode)
assert parser.tree.root.childs[0].attribute == 'name'
assert parser.tree.root.childs[0].value == '%son_%'
| 40.715385
| 75
| 0.658606
| 1,380
| 10,586
| 4.921014
| 0.071739
| 0.161979
| 0.226771
| 0.259167
| 0.769548
| 0.746576
| 0.694596
| 0.635547
| 0.635547
| 0.635547
| 0
| 0.020083
| 0.205082
| 10,586
| 259
| 76
| 40.872587
| 0.786928
| 0.002362
| 0
| 0.511521
| 0
| 0
| 0.100332
| 0.042823
| 0
| 0
| 0
| 0
| 0.506912
| 1
| 0.138249
| false
| 0
| 0.023041
| 0
| 0.207373
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
dcba881c655287ae3db0c33da66ef76e135c99c3
| 67
|
py
|
Python
|
knitty/tools/__init__.py
|
phlummox-patches/knitty
|
d7a5256ba9dfa4cc146681cb202343937214c0f6
|
[
"MIT"
] | 41
|
2018-06-29T17:52:14.000Z
|
2021-12-12T06:59:59.000Z
|
knitty/tools/__init__.py
|
phlummox-patches/knitty
|
d7a5256ba9dfa4cc146681cb202343937214c0f6
|
[
"MIT"
] | 26
|
2018-01-17T09:40:34.000Z
|
2022-03-22T09:44:45.000Z
|
knitty/tools/__init__.py
|
phlummox-patches/knitty
|
d7a5256ba9dfa4cc146681cb202343937214c0f6
|
[
"MIT"
] | 2
|
2021-09-20T16:20:50.000Z
|
2022-03-22T09:26:41.000Z
|
from .tools import load_yaml, get, strict_str, KnittyError # noqa
| 33.5
| 66
| 0.776119
| 10
| 67
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.149254
| 67
| 1
| 67
| 67
| 0.877193
| 0.059701
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.