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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9bee3a9f162a2d7f5f31dde5176e04edbaf46018
| 224
|
py
|
Python
|
src/apps/streaming_plots/tests.py
|
MarcSkovMadsen/awesome-panel-starter
|
b76854882a041c7b955a59785d08e167ffef07af
|
[
"Apache-2.0"
] | 5
|
2021-01-04T16:39:09.000Z
|
2021-08-03T15:26:49.000Z
|
src/apps/streaming_plots/tests.py
|
MarcSkovMadsen/awesome-panel-starter
|
b76854882a041c7b955a59785d08e167ffef07af
|
[
"Apache-2.0"
] | 6
|
2020-12-28T03:28:25.000Z
|
2021-09-11T13:07:51.000Z
|
src/apps/streaming_plots/tests.py
|
MarcSkovMadsen/awesome-panel-starter
|
b76854882a041c7b955a59785d08e167ffef07af
|
[
"Apache-2.0"
] | 1
|
2021-09-15T20:08:44.000Z
|
2021-09-15T20:08:44.000Z
|
"""Test of the App"""
# pylint: disable=redefined-outer-name,protected-access
# pylint: disable=missing-function-docstring,missing-module-docstring,missing-class-docstring
from .app import view
def test_view():
view()
| 24.888889
| 93
| 0.763393
| 30
| 224
| 5.666667
| 0.666667
| 0.152941
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.102679
| 224
| 8
| 94
| 28
| 0.845771
| 0.723214
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| true
| 0
| 0.333333
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
9bf895c7e61e393fefcc70bdafeeeeeea43e1b77
| 38
|
py
|
Python
|
json2oraparser/MetadataController/__init__.py
|
ntpythondev/json2oraparser
|
d03e31a13dbafb8650ebeec0fc1560ead488193c
|
[
"MIT"
] | 1
|
2019-10-23T11:12:13.000Z
|
2019-10-23T11:12:13.000Z
|
json2oraparser/MetadataController/__init__.py
|
ntpythondev/testpypi2019
|
e9b767d4353e09861a6f7408613bb18bdbd4df04
|
[
"MIT"
] | null | null | null |
json2oraparser/MetadataController/__init__.py
|
ntpythondev/testpypi2019
|
e9b767d4353e09861a6f7408613bb18bdbd4df04
|
[
"MIT"
] | null | null | null |
from MetadataList import MetadataList
| 19
| 37
| 0.894737
| 4
| 38
| 8.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 38
| 1
| 38
| 38
| 1
| 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
|
5020c49a6228a0c024e59e76628f82f6e0a56327
| 200
|
py
|
Python
|
object_detection2/modeling/semantic_heads/build.py
|
vghost2008/wml
|
d0c5a1da6c228e321ae59a563e9ac84aa66266ff
|
[
"MIT"
] | 6
|
2019-12-10T17:18:56.000Z
|
2022-03-01T01:00:35.000Z
|
object_detection2/modeling/semantic_heads/build.py
|
vghost2008/wml
|
d0c5a1da6c228e321ae59a563e9ac84aa66266ff
|
[
"MIT"
] | 2
|
2021-08-25T16:16:01.000Z
|
2022-02-10T05:21:19.000Z
|
object_detection2/modeling/semantic_heads/build.py
|
vghost2008/wml
|
d0c5a1da6c228e321ae59a563e9ac84aa66266ff
|
[
"MIT"
] | 2
|
2019-12-07T09:57:35.000Z
|
2021-09-06T04:58:10.000Z
|
from thirdparty.registry import Registry
SEMANTIC_HEAD = Registry("SEMANTIC_HEAD")
def build_semantic_head(name, *args, **kwargs):
head = SEMANTIC_HEAD.get(name)(*args, **kwargs)
return head
| 28.571429
| 51
| 0.75
| 26
| 200
| 5.576923
| 0.5
| 0.331034
| 0.275862
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.13
| 200
| 7
| 52
| 28.571429
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0.064677
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
505bd841d2e43ba264420c986298e2a2ce68b49e
| 127
|
py
|
Python
|
ffmpeg_db/all.py
|
audo-ai/ffmpeg-db
|
1f82aaf366950a9d5f9b086503ce1976a47456c4
|
[
"MIT"
] | null | null | null |
ffmpeg_db/all.py
|
audo-ai/ffmpeg-db
|
1f82aaf366950a9d5f9b086503ce1976a47456c4
|
[
"MIT"
] | null | null | null |
ffmpeg_db/all.py
|
audo-ai/ffmpeg-db
|
1f82aaf366950a9d5f9b086503ce1976a47456c4
|
[
"MIT"
] | null | null | null |
from ffmpeg_db import ext_to_codecs_json, codec_info_json
ext_to_codecs = ext_to_codecs_json()
codec_info = codec_info_json()
| 25.4
| 57
| 0.850394
| 23
| 127
| 4.086957
| 0.434783
| 0.159574
| 0.351064
| 0.319149
| 0.510638
| 0.510638
| 0
| 0
| 0
| 0
| 0
| 0
| 0.094488
| 127
| 4
| 58
| 31.75
| 0.817391
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 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
|
aca5b9b4c5b6609d4273b8f280502b447ceff4be
| 645
|
py
|
Python
|
pyplumio/helpers/product_info.py
|
denpamusic/PyPlumIO
|
16e8049977cbfbb1bd6c830beb751e65ee270295
|
[
"MIT"
] | 1
|
2022-03-24T21:44:59.000Z
|
2022-03-24T21:44:59.000Z
|
pyplumio/helpers/product_info.py
|
denpamusic/PyPlumIO
|
16e8049977cbfbb1bd6c830beb751e65ee270295
|
[
"MIT"
] | null | null | null |
pyplumio/helpers/product_info.py
|
denpamusic/PyPlumIO
|
16e8049977cbfbb1bd6c830beb751e65ee270295
|
[
"MIT"
] | null | null | null |
"""Contains product info representation."""
from dataclasses import dataclass
from typing import Optional
@dataclass
class ProductInfo:
"""Represents product info provided by UID response."""
type: int = 0
product: int = 0
uid: Optional[str] = None
logo: int = 0
image: int = 0
model: Optional[str] = None
@dataclass
class ConnectedModules:
"""Represents firmware version info."""
module_a: Optional[str] = None
module_b: Optional[str] = None
module_c: Optional[str] = None
module_lambda: Optional[str] = None
module_ecoster: Optional[str] = None
module_panel: Optional[str] = None
| 22.241379
| 59
| 0.682171
| 79
| 645
| 5.493671
| 0.443038
| 0.202765
| 0.276498
| 0.241935
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007921
| 0.217054
| 645
| 28
| 60
| 23.035714
| 0.851485
| 0.187597
| 0
| 0.111111
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.111111
| 0
| 0.888889
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
acaf28016be03c5e7ffa364036452c6688cdf3c2
| 109
|
py
|
Python
|
supermoto/helpers.py
|
vivainio/supermoto
|
7cc4c15df960dcc4182295c7407428a67e8c0dff
|
[
"MIT"
] | 1
|
2021-04-21T12:36:24.000Z
|
2021-04-21T12:36:24.000Z
|
supermoto/helpers.py
|
vivainio/supermoto
|
7cc4c15df960dcc4182295c7407428a67e8c0dff
|
[
"MIT"
] | null | null | null |
supermoto/helpers.py
|
vivainio/supermoto
|
7cc4c15df960dcc4182295c7407428a67e8c0dff
|
[
"MIT"
] | null | null | null |
def generate_instance_identity_document(instance):
return {
"instanceId": instance.id,
}
| 21.8
| 51
| 0.66055
| 10
| 109
| 6.9
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.247706
| 109
| 4
| 52
| 27.25
| 0.841463
| 0
| 0
| 0
| 1
| 0
| 0.095238
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0.25
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
acbf70c418a55d1dc799f1c9e90ddd65d1ea35e6
| 980
|
py
|
Python
|
fbgemm_gpu/fbgemm_gpu/split_embedding_codegen_lookup_invokers.py
|
garroud/FBGEMM
|
a0c9ea3bbcbd8516ff6a9124d11c47267c714abc
|
[
"BSD-3-Clause"
] | 792
|
2018-10-30T22:04:06.000Z
|
2022-03-31T10:56:18.000Z
|
fbgemm_gpu/fbgemm_gpu/split_embedding_codegen_lookup_invokers.py
|
garroud/FBGEMM
|
a0c9ea3bbcbd8516ff6a9124d11c47267c714abc
|
[
"BSD-3-Clause"
] | 922
|
2018-11-05T07:03:04.000Z
|
2022-03-31T20:02:30.000Z
|
fbgemm_gpu/fbgemm_gpu/split_embedding_codegen_lookup_invokers.py
|
garroud/FBGEMM
|
a0c9ea3bbcbd8516ff6a9124d11c47267c714abc
|
[
"BSD-3-Clause"
] | 255
|
2018-10-30T22:04:24.000Z
|
2022-03-31T17:42:28.000Z
|
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import python.lookup_adagrad as lookup_adagrad # noqa: F401
import python.lookup_adam as lookup_adam # noqa: F401
import python.lookup_approx_rowwise_adagrad as lookup_approx_rowwise_adagrad # noqa: F401
import python.lookup_approx_sgd as lookup_approx_sgd # noqa: F401
import python.lookup_args as lookup_args # noqa: F401
import python.lookup_lamb as lookup_lamb # noqa: F401
import python.lookup_lars_sgd as lookup_lars_sgd # noqa: F401
import python.lookup_partial_rowwise_adam as lookup_partial_rowwise_adam # noqa: F401
import python.lookup_partial_rowwise_lamb as lookup_partial_rowwise_lamb # noqa: F401
import python.lookup_rowwise_adagrad as lookup_rowwise_adagrad # noqa: F401
import python.lookup_sgd as lookup_sgd # noqa: F401
| 51.578947
| 90
| 0.818367
| 154
| 980
| 4.948052
| 0.298701
| 0.173228
| 0.259843
| 0.262467
| 0.468504
| 0.434383
| 0.209974
| 0
| 0
| 0
| 0
| 0.039906
| 0.130612
| 980
| 18
| 91
| 54.444444
| 0.85446
| 0.344898
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
acf5c268298d28cf3e7bda6752a5c789b04aadc1
| 130
|
py
|
Python
|
nso_jsonrpc_requester/__init__.py
|
btr1975/nso_jsonrpc_requester
|
63362045b998e1b7a2235804c55da151b781c0bd
|
[
"MIT"
] | null | null | null |
nso_jsonrpc_requester/__init__.py
|
btr1975/nso_jsonrpc_requester
|
63362045b998e1b7a2235804c55da151b781c0bd
|
[
"MIT"
] | null | null | null |
nso_jsonrpc_requester/__init__.py
|
btr1975/nso_jsonrpc_requester
|
63362045b998e1b7a2235804c55da151b781c0bd
|
[
"MIT"
] | null | null | null |
"""
This exports the main Classes to use NSO JSON-RPC
"""
from .config import NsoJsonRpcConfig
from .comet import NsoJsonRpcComet
| 21.666667
| 49
| 0.784615
| 18
| 130
| 5.666667
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.146154
| 130
| 5
| 50
| 26
| 0.918919
| 0.376923
| 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
|
4a12d152b952cca441858cf920ad0cddd658aee5
| 75
|
py
|
Python
|
ultimatetictactoe/game/__init__.py
|
stoimenoff/ultimate-tic-tac-tie
|
1d6980dcf51c020edef5edd2a1772cd96c003fd0
|
[
"MIT"
] | 4
|
2016-11-02T19:00:29.000Z
|
2019-12-05T10:38:20.000Z
|
ultimatetictactoe/game/__init__.py
|
stoimenoff/ultimate-tic-tac-tie
|
1d6980dcf51c020edef5edd2a1772cd96c003fd0
|
[
"MIT"
] | null | null | null |
ultimatetictactoe/game/__init__.py
|
stoimenoff/ultimate-tic-tac-tie
|
1d6980dcf51c020edef5edd2a1772cd96c003fd0
|
[
"MIT"
] | 3
|
2016-05-26T17:38:57.000Z
|
2019-05-05T17:29:29.000Z
|
from . import boards
from . import players
__all__ = ['boards', 'players']
| 18.75
| 31
| 0.706667
| 9
| 75
| 5.444444
| 0.555556
| 0.408163
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16
| 75
| 3
| 32
| 25
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0.173333
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 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
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
4a17b4e4e3feecbed6ebdd61d39feab3bfc5a0dc
| 233
|
py
|
Python
|
Python/code case/code case 220.py
|
amazing-2020/pdf
|
8cd3f5f510a1c1ed89b51b1354f4f8c000c5b24d
|
[
"Apache-2.0"
] | 3
|
2021-01-01T13:08:24.000Z
|
2021-02-03T09:27:56.000Z
|
Python/code case/code case 220.py
|
amazing-2020/pdf
|
8cd3f5f510a1c1ed89b51b1354f4f8c000c5b24d
|
[
"Apache-2.0"
] | null | null | null |
Python/code case/code case 220.py
|
amazing-2020/pdf
|
8cd3f5f510a1c1ed89b51b1354f4f8c000c5b24d
|
[
"Apache-2.0"
] | null | null | null |
for i in range(1, 5):
print(" "*(4-i), end="")
for j in range(1, 2*i):
print("*", end="")
print()
for i in range(1, 4):
print(" "*(i), end="")
for j in range(7-2*i):
print("*", end="")
print()
| 21.181818
| 28
| 0.424893
| 39
| 233
| 2.538462
| 0.307692
| 0.282828
| 0.242424
| 0.222222
| 0.848485
| 0.30303
| 0
| 0
| 0
| 0
| 0
| 0.055556
| 0.304721
| 233
| 10
| 29
| 23.3
| 0.555556
| 0
| 0
| 0.4
| 0
| 0
| 0.017167
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.6
| 0
| 0
| 0
| null | 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
4a181452ac41a30ad622005bf73d418e82777492
| 56
|
py
|
Python
|
pyit/lint.py
|
ysv/pyit
|
681535dd162613ee4ab8bb55216f0770e596f82e
|
[
"MIT"
] | null | null | null |
pyit/lint.py
|
ysv/pyit
|
681535dd162613ee4ab8bb55216f0770e596f82e
|
[
"MIT"
] | null | null | null |
pyit/lint.py
|
ysv/pyit
|
681535dd162613ee4ab8bb55216f0770e596f82e
|
[
"MIT"
] | null | null | null |
class Lint:
def __init__(self, file):
pass
| 11.2
| 29
| 0.571429
| 7
| 56
| 4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.339286
| 56
| 4
| 30
| 14
| 0.756757
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0.333333
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
c59f089bbe50da5ddddb4edf7c3fa0b371866c21
| 485
|
py
|
Python
|
hocort/pipelines/__init__.py
|
ignasrum/hocort
|
5bf137ecaf8816cc8d951bb5168588eb87811097
|
[
"MIT"
] | null | null | null |
hocort/pipelines/__init__.py
|
ignasrum/hocort
|
5bf137ecaf8816cc8d951bb5168588eb87811097
|
[
"MIT"
] | null | null | null |
hocort/pipelines/__init__.py
|
ignasrum/hocort
|
5bf137ecaf8816cc8d951bb5168588eb87811097
|
[
"MIT"
] | null | null | null |
from hocort.pipelines.bowtie2 import Bowtie2
from hocort.pipelines.bowtie2_hisat2 import Bowtie2HISAT2
from hocort.pipelines.bowtie2_bowtie2 import Bowtie2Bowtie2
from hocort.pipelines.bwa_mem2 import BWA_MEM2
from hocort.pipelines.hisat2 import HISAT2
from hocort.pipelines.minimap2 import Minimap2
from hocort.pipelines.star import STAR
from hocort.pipelines.kraken2 import Kraken2
from hocort.pipelines.kraken2_bowtie2 import Kraken2Bowtie2
from hocort.pipelines.bbmap import BBMap
| 44.090909
| 59
| 0.876289
| 65
| 485
| 6.461538
| 0.230769
| 0.238095
| 0.452381
| 0.185714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.049438
| 0.082474
| 485
| 10
| 60
| 48.5
| 0.894382
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
a860e4256354323882c2f18267d7068e9cf50126
| 3,844
|
py
|
Python
|
tank/lod.py
|
woailuoli993/ksxingtest
|
09d861d076a1ff03152e27f5fb29e5c90144d0d1
|
[
"WTFPL"
] | null | null | null |
tank/lod.py
|
woailuoli993/ksxingtest
|
09d861d076a1ff03152e27f5fb29e5c90144d0d1
|
[
"WTFPL"
] | 2
|
2021-03-31T18:39:09.000Z
|
2021-12-13T19:44:48.000Z
|
tank/lod.py
|
woailuoli993/ksxingtest
|
09d861d076a1ff03152e27f5fb29e5c90144d0d1
|
[
"WTFPL"
] | null | null | null |
# -*- coding: utf-8 -*-
from copy import deepcopy
directions = {
0: (1, 0),
1: (-1, 0),
2: (0, 1),
3: (0, -1)
}
OBSTACLE = '1'
game_map = [["1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1"], ["1", "2", "2", "2", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1"], ["1", "2", "0", "1", "0", "0", "0", "0", "0", "1", "0", "0", "0", "0", "0", "0", "0", "0", "1"], ["1", "1", "1", "1", "0", "0", "0", "0", "0", "1", "0", "0", "0", "0", "0", "0", "0", "0", "1"], ["1", "0", "0", "0", "0", "0", "0", "0", "0", "1", "0", "0", "0", "0", "0", "0", "0", "0", "1"], ["1", "0", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "1"], ["1", "0", "0", "0", "0", "2", "2", "1", "2", "2", "2", "2", "2", "2", "0", "0", "0", "0", "1"], ["1", "0", "0", "0", "0", "2", "2", "1", "2", "2", "2", "2", "2", "2", "0", "0", "0", "0", "1"], ["1", "0", "0", "0", "0", "2", "2", "2", "2", "2", "2", "2", "2", "2", "0", "0", "0", "0", "1"], ["1", "0", "0", "0", "0", "2", "2", "2", "2", "2", "2", "2", "2", "2", "0", "0", "0", "0", "1"], ["1", "0", "0", "0", "0", "2", "2", "2", "2", "2", "2", "2", "2", "2", "0", "0", "0", "0", "1"], ["1", "0", "0", "0", "0", "2", "2", "2", "2", "2", "2", "1", "2", "2", "0", "0", "0", "0", "1"], ["1", "0", "0", "0", "0", "2", "2", "2", "2", "2", "2", "1", "2", "2", "0", "0", "0", "0", "1"], ["1", "0", "0", "0", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "0", "1"], ["1", "0", "0", "0", "0", "0", "0", "0", "0", "1", "0", "0", "0", "0", "0", "0", "0", "0", "1"], ["1", "0", "0", "0", "0", "0", "0", "0", "0", "1", "0", "0", "0", "0", "0", "1", "1", "1", "1"], ["1", "0", "0", "0", "0", "0", "0", "0", "0", "1", "0", "0", "0", "0", "0", "1", "0", "2", "1"], ["1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "2", "2", "2", "1"], ["1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1"]]
def move(node, direction, d):
return node[0] + direction[0], node[1]+ direction[1], d
def movable(node):
x, y = node[0], node[1]
if x < 0 or y < 0:
return False
if game_map[x][y] == OBSTACLE:
return False
return True
def h(node, dest):
return max(abs(dest[0] - node[0]), abs(dest[1] - node[1]))
def find_path(start_node, dest_node):
g = {}
f = {}
parent = {}
close_list = []
open_list = []
open_list.append(start_node)
cur_node = start_node
g[start_node] = 0
f[start_node] = 0
while not (cur_node[0] == dest_node[0] and cur_node[1] == dest_node[1]):
open_list = sorted(open_list)
cur_node = open_list.pop()
for d, direction in directions.items():
next_node = move(cur_node, direction, d)
if not movable(next_node) or next_node in close_list:
continue
if next_node[2] == cur_node[2]:
ggg = g[cur_node] + 1
else:
ggg = g[cur_node] + 2
fff = ggg + h(next_node, dest_node)
if next_node not in open_list:
f[next_node] = fff
g[next_node] = ggg
parent[next_node] = cur_node
open_list.append(next_node)
elif next_node in open_list and f[next_node] > fff:
f[next_node] = fff
g[next_node] = ggg
parent[next_node] = cur_node
close_list.append(cur_node)
while cur_node != start_node:
cur_map = deepcopy(game_map)
cur_map[cur_node[0]][cur_node[1]] = '*'
lo_map = ''
for y in cur_map:
lo_map += ' '.join(y)
lo_map += '\n'
cur_node = parent[cur_node]
if __name__ == '__main__':
find_path((1, 1, 0), (10, 10, 0))
| 45.223529
| 1,854
| 0.365765
| 651
| 3,844
| 2.050691
| 0.096774
| 0.221723
| 0.260674
| 0.257678
| 0.33633
| 0.33633
| 0.33633
| 0.331835
| 0.331835
| 0.330337
| 0
| 0.145878
| 0.274194
| 3,844
| 84
| 1,855
| 45.761905
| 0.332616
| 0.005463
| 0
| 0.129032
| 0
| 0
| 0.097931
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.064516
| false
| 0
| 0.016129
| 0.032258
| 0.16129
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a883eeace941bee2dafdf97296d509d2d2904de1
| 131
|
py
|
Python
|
autox/__init__.py
|
OneToolsCollection/4paradigm-AutoX
|
f8e838021354de17f5bb9bc44e9d68d12dda6427
|
[
"Apache-2.0"
] | null | null | null |
autox/__init__.py
|
OneToolsCollection/4paradigm-AutoX
|
f8e838021354de17f5bb9bc44e9d68d12dda6427
|
[
"Apache-2.0"
] | null | null | null |
autox/__init__.py
|
OneToolsCollection/4paradigm-AutoX
|
f8e838021354de17f5bb9bc44e9d68d12dda6427
|
[
"Apache-2.0"
] | null | null | null |
from .autox import AutoX
from .autots import AutoTS
from .autoxserver import AutoXServer
from .autoxrecommend import AutoXRecommend
| 32.75
| 42
| 0.854962
| 16
| 131
| 7
| 0.375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.114504
| 131
| 4
| 42
| 32.75
| 0.965517
| 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
|
a8840f6f56ecaa2fb24725f1ebcf4f57895fb9a9
| 56
|
py
|
Python
|
DataLoader/__init__.py
|
Rawan19/HMNet
|
2aa8de20558412c1adb15fac69f18f50d6f59227
|
[
"MIT"
] | 49
|
2021-01-04T22:39:19.000Z
|
2022-03-19T13:08:30.000Z
|
DataLoader/__init__.py
|
Rawan19/HMNet
|
2aa8de20558412c1adb15fac69f18f50d6f59227
|
[
"MIT"
] | 7
|
2021-03-02T18:25:11.000Z
|
2022-02-01T16:27:36.000Z
|
DataLoader/__init__.py
|
Rawan19/HMNet
|
2aa8de20558412c1adb15fac69f18f50d6f59227
|
[
"MIT"
] | 19
|
2021-03-07T17:28:19.000Z
|
2021-12-16T02:14:41.000Z
|
from .infinibatch.infinibatch import datasets, iterators
| 56
| 56
| 0.875
| 6
| 56
| 8.166667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 56
| 1
| 56
| 56
| 0.942308
| 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
|
a898144f284de14d0f4f6ce9285e7d86235966c2
| 12,828
|
py
|
Python
|
esper/controllers/pipeline/pipeline.py
|
pallavigopi/esper-cli
|
83c3536088031fd6a9e5e6e7ae8f18e3e82eeb78
|
[
"Apache-2.0"
] | 7
|
2019-05-17T06:56:37.000Z
|
2022-03-18T16:54:48.000Z
|
esper/controllers/pipeline/pipeline.py
|
pallavigopi/esper-cli
|
83c3536088031fd6a9e5e6e7ae8f18e3e82eeb78
|
[
"Apache-2.0"
] | 5
|
2019-07-29T17:55:33.000Z
|
2022-01-19T02:01:45.000Z
|
esper/controllers/pipeline/pipeline.py
|
pallavigopi/esper-cli
|
83c3536088031fd6a9e5e6e7ae8f18e3e82eeb78
|
[
"Apache-2.0"
] | 9
|
2019-08-22T06:15:39.000Z
|
2021-10-04T09:08:50.000Z
|
from enum import Enum
from cement import Controller, ex
from clint.textui import prompt
from esper.controllers.enums import OutputFormat
from esper.ext.db_wrapper import DBWrapper
from esper.ext.pipeline_api import get_pipeline_url, create_pipeline, edit_pipeline, list_pipelines, fetch_pipelines, \
APIException, render_single_dict, delete_api
from esper.ext.utils import validate_creds_exists
class TriggerEventType(Enum):
NEW_APP_VERSION_EVENT = "NewAppVersionEvent"
DEVICE_COMMAND_COMPLETE_EVENT = "DeviceCommandCompleteEvent"
GROUP_COMMAND_COMPLETE_EVENT = "GroupCommandCompleteEvent"
MANUAL_PIPELINE_START_EVENT = "StartPipelineEvent"
class Pipeline(Controller):
class Meta:
label = 'pipeline'
# text displayed at the top of --help output
description = 'Pipeline commands'
# text displayed at the bottom of --help output
epilog = 'Usage: espercli pipeline'
stacked_type = 'nested'
stacked_on = 'base'
@ex(
help='Create a pipeline',
arguments=[
(['-n', '--name'],
{'help': 'Name of the Pipeline',
'action': 'store',
'dest': 'name',
'default': None}),
(['--desc'],
{'help': 'Pipeline Description',
'action': 'store',
'dest': 'desc',
'default': None})
]
)
def create(self):
validate_creds_exists(self.app)
db = DBWrapper(self.app.creds)
environment = db.get_configure().get("environment")
enterprise_id = db.get_enterprise_id()
name = self.app.pargs.name
if not name:
name = prompt.query("Name of the Pipeline: ")
desc = self.app.pargs.desc
if not desc:
desc = input("Description for this Pipeline [optional]: ")
# Setup Trigger
trigger = prompt.options(
"What type of trigger do you want for your Pipeline?",
options=[
{"selector": 1, "prompt": TriggerEventType.NEW_APP_VERSION_EVENT.value,
"return": TriggerEventType.NEW_APP_VERSION_EVENT.name},
{"selector": 2, "prompt": "Skip for now...", "return": "skip"}
])
if trigger != "skip":
if trigger == TriggerEventType.NEW_APP_VERSION_EVENT.name:
app_name = input("Enter the Application name: ")
package_name = input("Enter the Package name: ")
trigger = {
"trigger_event": TriggerEventType.NEW_APP_VERSION_EVENT.value,
"pre_conditions": {
"application_name": app_name,
"package_name": package_name
}
}
else:
trigger = None
# Calling Pipeline Graphs API
url = get_pipeline_url(environment, enterprise_id)
api_key = db.get_configure().get("api_key")
try:
self.app.log.debug("Creating Pipeline...")
response = create_pipeline(url, api_key, name, desc, trigger)
except APIException:
self.app.render("ERROR in connecting to Environment!\n")
return
if not response.ok:
self.app.log.debug(f"Response not OK. Status Code: {response.status_code}")
self.app.log.debug(f"Response not OK. Response: {response.json()}")
if response.status_code == 400:
errors = response.json().get('meta', {}).get('non_field_errors')
if errors:
self.app.log.error(f"Validation Error: {errors}")
if response.json().get("errors"):
self.app.log.error(f"Validation Error: {response.json().get('errors')}")
if response.status_code == 404:
self.app.log.error("Pipeline URL not found!")
if response.status_code == 500:
self.app.log.error(f"Internal Server Error! {response.json()}")
return
# Rendering table with populated values
data = render_single_dict(response.json())
self.app.render(f"Created Pipeline Successfully! Details: \n")
self.app.render(data, format=OutputFormat.TABULATED.value, headers="keys", tablefmt="plain")
@ex(
help='Edit a pipeline(s)',
arguments=[
(['-n', '--name'],
{'help': 'Name of the Pipeline',
'action': 'store',
'dest': 'name',
'default': None}),
(['--desc'],
{'help': 'Pipeline Description',
'action': 'store',
'dest': 'desc',
'default': None}),
(['-p, --pipeline-id'],
{'help': 'Pipeline ID',
'action': 'store',
'dest': 'pipeline_id',
'default': None})
]
)
def edit(self):
validate_creds_exists(self.app)
db = DBWrapper(self.app.creds)
environment = db.get_configure().get("environment")
enterprise_id = db.get_enterprise_id()
name = self.app.pargs.name
if not name:
name = input("Change the name of the Pipeline: ")
desc = self.app.pargs.desc
if not desc:
desc = input("Change the description for this Pipeline [optional]: ")
pipeline_id = self.app.pargs.pipeline_id
if not pipeline_id:
pipeline_id = prompt.query("Enter the Pipeline ID: ")
# Setup Trigger
trigger = prompt.options(
"What type of trigger do you want for your Pipeline?",
options=[
{"selector": 1, "prompt": TriggerEventType.NEW_APP_VERSION_EVENT.value,
"return": TriggerEventType.NEW_APP_VERSION_EVENT.name},
{"selector": 2, "prompt": "Skip for now...", "return": "skip"}
])
if trigger != "skip":
if trigger == TriggerEventType.NEW_APP_VERSION_EVENT.name:
app_name = input("Enter the Application name: ")
package_name = input("Enter the Package name: ")
trigger = {
"trigger_event": TriggerEventType.NEW_APP_VERSION_EVENT.value,
"pre_conditions": {
"application_name": app_name,
"package_name": package_name
}
}
else:
trigger = None
if not name and not desc and not trigger:
self.app.render("No changes requested. Exiting app!\n")
return
# Calling Pipeline Graphs API
url = get_pipeline_url(environment, enterprise_id, pipeline_id=pipeline_id)
api_key = db.get_configure().get("api_key")
try:
self.app.log.debug("Editing Pipeline...")
response = edit_pipeline(url, api_key, name, desc, trigger)
except APIException:
self.app.render("ERROR in connecting to Environment!\n")
return
if not response.ok:
self.app.log.debug(f"Response not OK. Status Code: {response.status_code}")
self.app.log.debug(f"Response not OK. Response: {response.json()}")
if response.status_code == 400:
errors = response.json().get('meta', {}).get('non_field_errors')
if errors:
self.app.log.error(f"Validation Error: {errors}")
if response.json().get("errors"):
self.app.log.error(f"Validation Error: {response.json().get('errors')}")
if response.status_code == 404:
self.app.log.error("Pipeline URL not found!")
if response.status_code == 500:
self.app.log.error(f"Internal Server Error! {response.json()}")
return
# Rendering table with populated values
data = render_single_dict(response.json())
self.app.render(f"Edited Pipeline Successfully! Details: \n")
self.app.render(data, format=OutputFormat.TABULATED.value, headers="keys", tablefmt="plain")
@ex(
help='List or Fetch a pipeline(s)',
arguments=[
(['-p', '--pipeline-id'],
{'help': 'Name of the Pipeline',
'action': 'store',
'dest': 'pipeline_id',
'default': None})
]
)
def show(self):
validate_creds_exists(self.app)
db = DBWrapper(self.app.creds)
environment = db.get_configure().get("environment")
enterprise_id = db.get_enterprise_id()
pipeline_id = self.app.pargs.pipeline_id
# Calling Pipeline Graphs API
url = get_pipeline_url(environment, enterprise_id, pipeline_id=pipeline_id)
api_key = db.get_configure().get("api_key")
try:
self.app.log.debug("Listing Pipeline...")
if pipeline_id:
response = fetch_pipelines(url, api_key)
else:
response = list_pipelines(url, api_key)
except APIException:
self.app.render("ERROR in connecting to Environment!\n")
return
if not response.ok:
self.app.log.debug(f"Response not OK. url: {response.url}")
self.app.log.debug(f"Response not OK. Status Code: {response.status_code}")
self.app.log.debug(f"Response not OK. Response: {response.json()}")
if response.status_code == 400:
errors = response.json().get('meta', {}).get('non_field_errors')
if errors:
self.app.log.error(f"Validation Error: {errors}")
if response.json().get("errors"):
self.app.log.error(f"Validation Error: {response.json().get('errors')}")
if response.status_code == 404:
self.app.log.error("Pipeline URL not found!")
if response.status_code == 500:
self.app.log.error(f"Internal Server Error! {response.json()}")
return
# Rendering table with populated values
if not pipeline_id:
data = response.json().get("results")
else:
data = [response.json()]
render_data = []
for pipeline in data:
trigger_app = None
trigger_name = None
trigger = pipeline.get("trigger", None)
if trigger:
trigger_name = trigger.get("trigger_event")
trigger_app = trigger.get("pre_conditions")
if trigger_app:
trigger_app = trigger_app.get("application_name")
render_pipeline = {
"ID": pipeline.get("id"),
"NAME": pipeline.get("name"),
"DESCRIPTION": pipeline.get("description"),
"STAGES": len(pipeline.get("stages")),
"VERSION": pipeline.get("version"),
"TRIGGER": trigger_name,
"TRIGGER-APP": trigger_app
}
render_data.append(render_pipeline)
self.app.render(f"Listing Pipeline! Details: \n")
self.app.render(render_data, format=OutputFormat.TABULATED.value, headers="keys", tablefmt="plain")
@ex(
help='Remove a Pipeline',
arguments=[
(['-p', '--pipeline-id'],
{'help': 'Pipeline ID',
'action': 'store',
'dest': 'pipeline_id',
'default': None})
]
)
def remove(self):
validate_creds_exists(self.app)
db = DBWrapper(self.app.creds)
environment = db.get_configure().get("environment")
enterprise_id = db.get_enterprise_id()
pipeline_id = self.app.pargs.pipeline_id
if not pipeline_id:
pipeline_id = prompt.query("Enter the Pipeline ID: ")
# Calling Pipeline Graphs API
url = get_pipeline_url(environment, enterprise_id, pipeline_id=pipeline_id)
api_key = db.get_configure().get("api_key")
try:
self.app.log.debug("Removing Pipeline...")
response = delete_api(url, api_key)
except APIException:
self.app.render("ERROR in connecting to Environment!\n")
return
if not response.ok:
self.app.log.debug(f"Response not OK. Status Code: {response.status_code}")
self.app.log.debug(f"Response not OK. Response: {response.json()}")
if response.status_code == 404:
self.app.log.error("Pipeline not found!")
if response.status_code == 500:
self.app.log.error(f"Internal Server Error! {response.json()}")
return
self.app.render(f"Removed Pipeline Successfully! \n")
| 37.290698
| 119
| 0.558154
| 1,382
| 12,828
| 5.044863
| 0.130246
| 0.054217
| 0.038726
| 0.03012
| 0.759036
| 0.742111
| 0.742111
| 0.742111
| 0.733505
| 0.733505
| 0
| 0.004263
| 0.323355
| 12,828
| 343
| 120
| 37.399417
| 0.798963
| 0.02666
| 0
| 0.684783
| 0
| 0
| 0.232724
| 0.018599
| 0
| 0
| 0
| 0
| 0
| 1
| 0.014493
| false
| 0
| 0.025362
| 0
| 0.097826
| 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
|
76cd33be6c5289cc2fbdf6a08e5b4c8248721d92
| 82
|
py
|
Python
|
catalyst/dl/runner/__init__.py
|
balakhonoff/catalyst
|
82d904aee97045efbaef3963e36c2ce5173ddac4
|
[
"Apache-2.0"
] | null | null | null |
catalyst/dl/runner/__init__.py
|
balakhonoff/catalyst
|
82d904aee97045efbaef3963e36c2ce5173ddac4
|
[
"Apache-2.0"
] | null | null | null |
catalyst/dl/runner/__init__.py
|
balakhonoff/catalyst
|
82d904aee97045efbaef3963e36c2ce5173ddac4
|
[
"Apache-2.0"
] | null | null | null |
# flake8: noqa
from .core import Runner
from .supervised import SupervisedRunner
| 16.4
| 40
| 0.804878
| 10
| 82
| 6.6
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014286
| 0.146341
| 82
| 4
| 41
| 20.5
| 0.928571
| 0.146341
| 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
|
4f123b04430dbf91bf451681c11ad723e6e3b437
| 155
|
py
|
Python
|
utils/testoval.py
|
justchris1/scap-security-guide
|
030097afa80041fcdffc537a49c09896efedadca
|
[
"BSD-3-Clause"
] | 1
|
2021-09-24T07:49:08.000Z
|
2021-09-24T07:49:08.000Z
|
utils/testoval.py
|
justchris1/scap-security-guide
|
030097afa80041fcdffc537a49c09896efedadca
|
[
"BSD-3-Clause"
] | 5
|
2019-05-30T15:47:50.000Z
|
2020-09-14T11:00:22.000Z
|
utils/testoval.py
|
justchris1/scap-security-guide
|
030097afa80041fcdffc537a49c09896efedadca
|
[
"BSD-3-Clause"
] | 1
|
2019-01-24T18:08:45.000Z
|
2019-01-24T18:08:45.000Z
|
#!/usr/bin/env python
import sys
import os
import ssg.oval
# always use shared/testoval_module.py version
if __name__ == "__main__":
ssg.oval.main()
| 15.5
| 46
| 0.729032
| 24
| 155
| 4.333333
| 0.791667
| 0.134615
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.154839
| 155
| 9
| 47
| 17.222222
| 0.793893
| 0.419355
| 0
| 0
| 0
| 0
| 0.090909
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.6
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
4f21001becfd9476ad6b20a4c27f4f5c7622f70a
| 92
|
py
|
Python
|
src/setup.py
|
SandroWissmann/Bricks-Py
|
640140f9fd4a947b175a090563113108cc047f89
|
[
"MIT"
] | null | null | null |
src/setup.py
|
SandroWissmann/Bricks-Py
|
640140f9fd4a947b175a090563113108cc047f89
|
[
"MIT"
] | null | null | null |
src/setup.py
|
SandroWissmann/Bricks-Py
|
640140f9fd4a947b175a090563113108cc047f89
|
[
"MIT"
] | null | null | null |
from setuptools import setup, find_packages
setup(name="bricks", packages=find_packages())
| 23
| 46
| 0.804348
| 12
| 92
| 6
| 0.666667
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.086957
| 92
| 3
| 47
| 30.666667
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0.065217
| 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
|
4f38bfe2ab7f45e8e4286ad4df5e57ffefe56884
| 213
|
py
|
Python
|
mnemon/services/scheduler.py
|
papagr/mnemon
|
e51787cea3d0d1a2d5e6b8b02211c2335ff73a11
|
[
"BSD-3-Clause"
] | 1
|
2020-11-22T20:38:46.000Z
|
2020-11-22T20:38:46.000Z
|
mnemon/services/scheduler.py
|
papagr/mnemon
|
e51787cea3d0d1a2d5e6b8b02211c2335ff73a11
|
[
"BSD-3-Clause"
] | null | null | null |
mnemon/services/scheduler.py
|
papagr/mnemon
|
e51787cea3d0d1a2d5e6b8b02211c2335ff73a11
|
[
"BSD-3-Clause"
] | null | null | null |
import atexit # @UnresolvedImport
from apscheduler.scheduler import Scheduler
def init_scheduler():
scheduler = Scheduler()
atexit.register(lambda: scheduler.shutdown(wait=False))
return scheduler
| 21.3
| 59
| 0.765258
| 22
| 213
| 7.363636
| 0.636364
| 0.222222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15493
| 213
| 9
| 60
| 23.666667
| 0.9
| 0.079812
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
4f3c4164ca14ecff093688ade0a2d250a2375849
| 92
|
py
|
Python
|
enthought/mayavi/core/lut_manager.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | 3
|
2016-12-09T06:05:18.000Z
|
2018-03-01T13:00:29.000Z
|
enthought/mayavi/core/lut_manager.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | 1
|
2020-12-02T00:51:32.000Z
|
2020-12-02T08:48:55.000Z
|
enthought/mayavi/core/lut_manager.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | null | null | null |
# proxy module
from __future__ import absolute_import
from mayavi.core.lut_manager import *
| 23
| 38
| 0.836957
| 13
| 92
| 5.461538
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.119565
| 92
| 3
| 39
| 30.666667
| 0.876543
| 0.130435
| 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
|
4f513992950c9270a6faf28c644444263538c6d6
| 116
|
py
|
Python
|
ckanpackager/lib/utils.py
|
NaturalHistoryMuseum/ckanpackager
|
7c2172b966fd0b5e0b2933c8c7af66355472de00
|
[
"CC-BY-4.0"
] | 7
|
2015-11-11T02:21:07.000Z
|
2020-11-12T00:38:33.000Z
|
ckanpackager/lib/utils.py
|
NaturalHistoryMuseum/ckanpackager
|
7c2172b966fd0b5e0b2933c8c7af66355472de00
|
[
"CC-BY-4.0"
] | 36
|
2015-01-12T12:43:13.000Z
|
2021-12-13T19:41:02.000Z
|
ckanpackager/lib/utils.py
|
NaturalHistoryMuseum/ckanpackager
|
7c2172b966fd0b5e0b2933c8c7af66355472de00
|
[
"CC-BY-4.0"
] | 3
|
2018-09-10T23:49:11.000Z
|
2021-09-08T19:42:51.000Z
|
"""General utilities"""
class BadRequestError(Exception):
pass
class NotAuthorizedError(Exception):
pass
| 12.888889
| 36
| 0.732759
| 10
| 116
| 8.5
| 0.7
| 0.305882
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.163793
| 116
| 9
| 37
| 12.888889
| 0.876289
| 0.146552
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
4f8c6647fdbbbd8aaa3b35f4d168ce49af6908e4
| 44
|
py
|
Python
|
elfrewriter/errors.py
|
enthought/elfrewriter
|
7e2339fc21a045adbfd70c48900e6d29f4858062
|
[
"BSD-3-Clause"
] | 1
|
2016-05-07T18:05:55.000Z
|
2016-05-07T18:05:55.000Z
|
elfrewriter/errors.py
|
enthought/elfrewriter
|
7e2339fc21a045adbfd70c48900e6d29f4858062
|
[
"BSD-3-Clause"
] | null | null | null |
elfrewriter/errors.py
|
enthought/elfrewriter
|
7e2339fc21a045adbfd70c48900e6d29f4858062
|
[
"BSD-3-Clause"
] | 1
|
2015-04-14T10:04:44.000Z
|
2015-04-14T10:04:44.000Z
|
class ELFRewriterError(Exception):
pass
| 14.666667
| 34
| 0.772727
| 4
| 44
| 8.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.159091
| 44
| 2
| 35
| 22
| 0.918919
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
96f502644d04025c059702b1cfa7363d6b4ccbce
| 3,994
|
py
|
Python
|
exercises/practice/dot-dsl/dot_dsl_test.py
|
Stigjb/python
|
cfb620d1603eb9b08511f96f00f872c67cac0d05
|
[
"MIT"
] | 1,177
|
2017-06-21T20:24:06.000Z
|
2022-03-29T02:30:55.000Z
|
exercises/practice/dot-dsl/dot_dsl_test.py
|
Stigjb/python
|
cfb620d1603eb9b08511f96f00f872c67cac0d05
|
[
"MIT"
] | 1,890
|
2017-06-18T20:06:10.000Z
|
2022-03-31T18:35:51.000Z
|
exercises/practice/dot-dsl/dot_dsl_test.py
|
Stigjb/python
|
cfb620d1603eb9b08511f96f00f872c67cac0d05
|
[
"MIT"
] | 1,095
|
2017-06-26T23:06:19.000Z
|
2022-03-29T03:25:38.000Z
|
import unittest
from dot_dsl import Graph, Node, Edge, NODE, EDGE, ATTR
class DotDslTest(unittest.TestCase):
def test_empty_graph(self):
g = Graph()
self.assertEqual(g.nodes, [])
self.assertEqual(g.edges, [])
self.assertEqual(g.attrs, {})
def test_graph_with_one_node(self):
g = Graph([
(NODE, "a", {})
])
self.assertEqual(g.nodes, [Node("a", {})])
self.assertEqual(g.edges, [])
self.assertEqual(g.attrs, {})
def test_graph_with_one_node_with_keywords(self):
g = Graph([
(NODE, "a", {"color": "green"})
])
self.assertEqual(g.nodes, [Node("a", {"color": "green"})])
self.assertEqual(g.edges, [])
self.assertEqual(g.attrs, {})
def test_graph_with_one_edge(self):
g = Graph([
(EDGE, "a", "b", {})
])
self.assertEqual(g.nodes, [])
self.assertEqual(g.edges, [Edge("a", "b", {})])
self.assertEqual(g.attrs, {})
def test_graph_with_one_attribute(self):
g = Graph([
(ATTR, "foo", "1")
])
self.assertEqual(g.nodes, [])
self.assertEqual(g.edges, [])
self.assertEqual(g.attrs, {"foo": "1"})
def test_graph_with_attributes(self):
g = Graph([
(ATTR, "foo", "1"),
(ATTR, "title", "Testing Attrs"),
(NODE, "a", {"color": "green"}),
(NODE, "c", {}),
(NODE, "b", {"label": "Beta!"}),
(EDGE, "b", "c", {}),
(EDGE, "a", "b", {"color": "blue"}),
(ATTR, "bar", "true")
])
self.assertEqual(g.nodes, [Node("a", {"color": "green"}),
Node("c", {}),
Node("b", {"label": "Beta!"})])
self.assertEqual(g.edges, [Edge("b", "c", {}),
Edge("a", "b", {"color": "blue"})])
self.assertEqual(g.attrs, {
"foo": "1",
"title": "Testing Attrs",
"bar": "true"
})
def test_malformed_graph(self):
with self.assertRaises(TypeError) as err:
Graph(1)
self.assertEqual(type(err.exception), TypeError)
self.assertEqual(err.exception.args[0], "Graph data malformed")
with self.assertRaises(TypeError) as err:
Graph("problematic")
self.assertEqual(type(err.exception), TypeError)
self.assertEqual(err.exception.args[0], "Graph data malformed")
def test_malformed_graph_item(self):
with self.assertRaises(TypeError) as err:
Graph([()])
self.assertEqual(type(err.exception), TypeError)
self.assertEqual(err.exception.args[0], "Graph item incomplete")
with self.assertRaises(TypeError) as err:
Graph([(ATTR, )])
self.assertEqual(type(err.exception), TypeError)
self.assertEqual(err.exception.args[0], "Graph item incomplete")
def test_malformed_attr(self):
with self.assertRaises(ValueError) as err:
Graph([(ATTR, 1, 2, 3)])
self.assertEqual(type(err.exception), ValueError)
self.assertEqual(err.exception.args[0], "Attribute is malformed")
def test_malformed_node(self):
with self.assertRaises(ValueError) as err:
Graph([(NODE, 1, 2, 3)])
self.assertEqual(type(err.exception), ValueError)
self.assertEqual(err.exception.args[0], "Node is malformed")
def test_malformed_EDGE(self):
with self.assertRaises(ValueError) as err:
Graph([(EDGE, 1, 2)])
self.assertEqual(type(err.exception), ValueError)
self.assertEqual(err.exception.args[0], "Edge is malformed")
def test_unknown_item(self):
with self.assertRaises(ValueError) as err:
Graph([(99, 1, 2)])
self.assertEqual(type(err.exception), ValueError)
self.assertEqual(err.exception.args[0], "Unknown item")
| 32.737705
| 73
| 0.544316
| 440
| 3,994
| 4.856818
| 0.134091
| 0.238652
| 0.134768
| 0.082358
| 0.820777
| 0.770239
| 0.72204
| 0.678521
| 0.489939
| 0.471221
| 0
| 0.008809
| 0.289434
| 3,994
| 121
| 74
| 33.008264
| 0.744186
| 0
| 0
| 0.431579
| 0
| 0
| 0.081873
| 0
| 0
| 0
| 0
| 0
| 0.442105
| 1
| 0.126316
| false
| 0
| 0.021053
| 0
| 0.157895
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
8c04498aa5a93bda3ce01b0171cdb285f063a073
| 159
|
py
|
Python
|
spambayes/scripts/sb_chkopts.py
|
alexeip0/spambayes
|
0c7d12cf4702ef82974ab16d2a36fa9ccedf185a
|
[
"PSF-2.0"
] | 13
|
2015-07-03T06:53:47.000Z
|
2021-02-19T13:21:56.000Z
|
spambayes/scripts/sb_chkopts.py
|
alexeip0/spambayes
|
0c7d12cf4702ef82974ab16d2a36fa9ccedf185a
|
[
"PSF-2.0"
] | 5
|
2015-07-16T07:33:46.000Z
|
2021-04-05T20:27:52.000Z
|
spambayes/scripts/sb_chkopts.py
|
alexeip0/spambayes
|
0c7d12cf4702ef82974ab16d2a36fa9ccedf185a
|
[
"PSF-2.0"
] | 20
|
2015-05-16T22:42:14.000Z
|
2021-09-18T17:46:40.000Z
|
#!/usr/bin/env python
"""
Trivial script to check that the user's options file doesn't contain any
old-style option names.
"""
from spambayes import Options
| 17.666667
| 72
| 0.748428
| 26
| 159
| 4.576923
| 0.961538
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157233
| 159
| 8
| 73
| 19.875
| 0.88806
| 0.735849
| 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
|
8c123afd00f33c6d0adba1c564465da2226cd2e8
| 3,691
|
py
|
Python
|
macholib_tests/test_framework.py
|
pombredanne/bitbucket.org-pombredanne-macholib
|
7be0501117777714ab27464d62c580fdff06b016
|
[
"MIT"
] | 3
|
2015-06-05T00:32:44.000Z
|
2017-01-06T15:44:32.000Z
|
macholib_tests/test_framework.py
|
pombredanne/bitbucket.org-pombredanne-macholib
|
7be0501117777714ab27464d62c580fdff06b016
|
[
"MIT"
] | null | null | null |
macholib_tests/test_framework.py
|
pombredanne/bitbucket.org-pombredanne-macholib
|
7be0501117777714ab27464d62c580fdff06b016
|
[
"MIT"
] | null | null | null |
from macholib import framework
import sys
if sys.version_info[:2] <= (2,6):
import unittest2 as unittest
else:
import unittest
class TestFramework (unittest.TestCase):
def test_framework(self):
self.assertEqual(
framework.framework_info('Location/Name.framework/Versions/SomeVersion/Name_Suffix'),
dict(
location='Location',
name='Name.framework/Versions/SomeVersion/Name_Suffix',
shortname='Name',
version='SomeVersion',
suffix='Suffix',
))
self.assertEqual(
framework.framework_info('Location/Name.framework/Versions/SomeVersion/Name'),
dict(
location='Location',
name='Name.framework/Versions/SomeVersion/Name',
shortname='Name',
version='SomeVersion',
suffix=None,
))
self.assertEqual(
framework.framework_info('Location/Name.framework/Name_Suffix'),
dict(
location='Location',
name='Name.framework/Name_Suffix',
shortname='Name',
version=None,
suffix='Suffix',
))
self.assertEqual(
framework.framework_info('Location/Name.framework/Name'),
dict(
location='Location',
name='Name.framework/Name',
shortname='Name',
version=None,
suffix=None
))
self.assertEqual(
framework.framework_info('Location/Name.framework.disabled/Name'),
None
)
self.assertEqual(
framework.framework_info('Location/Name.framework/Versions/A/B/Name'),
None
)
self.assertEqual(
framework.framework_info('Location/Name.framework/Versions/A'),
None
)
self.assertEqual(
framework.framework_info('Location/Name.framework/Versions/A/Name/_debug'),
None
)
def test_interal_tests(self):
# Ported over from the source file
def d(location=None, name=None, shortname=None, version=None, suffix=None):
return dict(
location=location,
name=name,
shortname=shortname,
version=version,
suffix=suffix
)
self.assertEqual(framework.framework_info('completely/invalid'), None)
self.assertEqual(framework.framework_info('completely/invalid/_debug'), None)
self.assertEqual(framework.framework_info('P/F.framework'), None)
self.assertEqual(framework.framework_info('P/F.framework/_debug'), None)
self.assertEqual(framework.framework_info('P/F.framework/F'), d('P', 'F.framework/F', 'F'))
self.assertEqual(framework.framework_info('P/F.framework/F_debug'), d('P', 'F.framework/F_debug', 'F', suffix='debug'))
self.assertEqual(framework.framework_info('P/F.framework/Versions'), None)
self.assertEqual(framework.framework_info('P/F.framework/Versions/A'), None)
self.assertEqual(framework.framework_info('P/F.framework/Versions/A/F'), d('P', 'F.framework/Versions/A/F', 'F', 'A'))
self.assertEqual(framework.framework_info('P/F.framework/Versions/A/F_debug'), d('P', 'F.framework/Versions/A/F_debug', 'F', 'A', 'debug'))
if __name__ == "__main__":
unittest.main()
| 41.47191
| 147
| 0.55405
| 350
| 3,691
| 5.725714
| 0.134286
| 0.134731
| 0.215569
| 0.296407
| 0.818363
| 0.737026
| 0.723553
| 0.614271
| 0.58982
| 0.447106
| 0
| 0.001611
| 0.327283
| 3,691
| 88
| 148
| 41.943182
| 0.805477
| 0.00867
| 0
| 0.419753
| 0
| 0
| 0.2379
| 0.175827
| 0
| 0
| 0
| 0
| 0.222222
| 1
| 0.037037
| false
| 0
| 0.049383
| 0.012346
| 0.111111
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
8c2dc7ad58ccf127100980700ae8b847c5bab2d2
| 39
|
py
|
Python
|
oscar/lib/python2.7/site-packages/isort/__main__.py
|
sainjusajan/django-oscar
|
466e8edc807be689b0a28c9e525c8323cc48b8e1
|
[
"BSD-3-Clause"
] | null | null | null |
oscar/lib/python2.7/site-packages/isort/__main__.py
|
sainjusajan/django-oscar
|
466e8edc807be689b0a28c9e525c8323cc48b8e1
|
[
"BSD-3-Clause"
] | null | null | null |
oscar/lib/python2.7/site-packages/isort/__main__.py
|
sainjusajan/django-oscar
|
466e8edc807be689b0a28c9e525c8323cc48b8e1
|
[
"BSD-3-Clause"
] | null | null | null |
from isort.main import main
main()
| 9.75
| 28
| 0.692308
| 6
| 39
| 4.5
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.230769
| 39
| 3
| 29
| 13
| 0.9
| 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
|
8c46355bb0a216aea63e0df7d138748af595ef6d
| 254
|
py
|
Python
|
sleepi/exceptions.py
|
brianlich/sleepi
|
08ad5f9b08afa8a8c844a6b4fa3208ba766e079c
|
[
"MIT"
] | null | null | null |
sleepi/exceptions.py
|
brianlich/sleepi
|
08ad5f9b08afa8a8c844a6b4fa3208ba766e079c
|
[
"MIT"
] | null | null | null |
sleepi/exceptions.py
|
brianlich/sleepi
|
08ad5f9b08afa8a8c844a6b4fa3208ba766e079c
|
[
"MIT"
] | null | null | null |
"""Exceptions for Sleepi."""
class SleepiError(Exception):
"""Generic Sleepi exception."""
class SleepiConnectionError(SleepiError):
"""Sleepi connection exception."""
class SleepiGenericError(Exception):
"""Generic Sleepi exception."""
| 19.538462
| 41
| 0.716535
| 21
| 254
| 8.666667
| 0.47619
| 0.175824
| 0.241758
| 0.340659
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137795
| 254
| 13
| 42
| 19.538462
| 0.83105
| 0.405512
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
8c5dbe1007cce325bfce78bf198b272b9794be29
| 11,765
|
py
|
Python
|
competitor/synth-action-seq/models/german/actions.py
|
ppnaumann/CSCF
|
ea8af1f2fdec3a90a041324a32893d5dadc7e14b
|
[
"MIT"
] | null | null | null |
competitor/synth-action-seq/models/german/actions.py
|
ppnaumann/CSCF
|
ea8af1f2fdec3a90a041324a32893d5dadc7e14b
|
[
"MIT"
] | null | null | null |
competitor/synth-action-seq/models/german/actions.py
|
ppnaumann/CSCF
|
ea8af1f2fdec3a90a041324a32893d5dadc7e14b
|
[
"MIT"
] | null | null | null |
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
import numpy as np
from actions.action import Action
import actions.condition_ops as cond
# WaitYears
class WaitYears(Action):
def __init__(self, features):
super().__init__(name='WaitYears',
description='Wait x amount of years',
type='Numeric',
features=features,
target_features=['age_in_years'],
init_p=[0])
def apply(self, instance, p, use_tensor=True):
param = self.get_param(p, use_tensor)
return self.features['age_in_years'].change_feature_value(instance, param, use_tensor)
def get_cost(self, instance, new_instance, use_tensor=True):
new_age = self.features['age_in_years'].get_feature_value(new_instance, use_tensor,
space='x')
old_age = self.features['age_in_years'].get_feature_value(instance, use_tensor, space='x')
cost = tf.abs(new_age - old_age) if use_tensor else np.abs(new_age - old_age)
return self.return_cost(instance, new_instance, cost, use_tensor)
def postcondition(self, instance, new_instance, use_tensor=True):
new_age = self.features['age_in_years'].get_feature_value(new_instance, use_tensor,
space='x')
old_age = self.features['age_in_years'].get_feature_value(instance, use_tensor, space='x')
return cond.op_and(cond.op_gt(new_age, old_age, use_tensor, scale=100.),
cond.op_lt(new_age, 120, use_tensor, scale=100.), use_tensor)
# Categorical Action
class Naturalize(Action):
def __init__(self, features):
super().__init__(name='Naturalize',
description='Become citizen',
type='Categoric',
num_params=0,
features=features,
target_features=['foreign_worker'],
init_p=[])
def apply(self, instance, p, use_tensor=True):
return self.features['foreign_worker'].change_feature_value(instance, 1, use_tensor)
def get_cost(self, instance, new_instance, use_tensor=True):
return self.return_cost(instance, new_instance, 5., use_tensor)
def precondition(self, instance, use_tensor=True):
return cond.op_neq(self.features['foreign_worker'].get_feature_value(instance, use_tensor),
1., use_tensor)
class GetUnskilledJob(Action):
def __init__(self, features):
super().__init__(name='GetUnskilledJob',
description='Get an unskilled job',
type='Categoric',
num_params=0,
features=features,
target_features=['job'],
init_p=[])
def apply(self, instance, p, use_tensor=True):
return self.features['job'].change_feature_value(instance, 1, use_tensor)
def get_cost(self, instance, new_instance, use_tensor=True):
return self.return_cost(instance, new_instance, 5., use_tensor)
def precondition(self, instance, use_tensor=True):
# Must be unemployeed
return cond.op_and(
cond.op_and(cond.op_neq(self.features['job'].get_feature_value(instance, use_tensor),
1., use_tensor),
cond.op_neq(self.features['job'].get_feature_value(instance, use_tensor),
2., use_tensor),
use_tensor),
cond.op_neq(self.features['job'].get_feature_value(instance, use_tensor),
3., use_tensor),
use_tensor)
# Categorical Action
class GetGuarantor(Action):
def __init__(self, features):
super().__init__(name='GetGuarantor',
description='Get a guarantor',
type='Categoric',
num_params=0,
features=features,
target_features=['other_debtors_guarantors'],
init_p=[])
def apply(self, instance, p, use_tensor=True):
return self.features['other_debtors_guarantors'].change_feature_value(instance, 2,
use_tensor)
def get_cost(self, instance, new_instance, use_tensor=True):
return self.return_cost(instance, new_instance, 5., use_tensor)
def precondition(self, instance, use_tensor=True):
return cond.op_neq(
self.features['other_debtors_guarantors'].get_feature_value(instance, use_tensor),
2., use_tensor)
class ChangeCreditAmount(Action):
def __init__(self, features):
super().__init__(name='ChangeCreditAmount',
description='Changes Requested Loan Amount',
type='Numeric',
features=features,
target_features=['credit_amount'],
init_p=[0])
def apply(self, instance, p, use_tensor=True):
param = self.get_param(p, use_tensor)
return self.features['credit_amount'].change_feature_value(instance, param, use_tensor)
def get_cost(self, instance, new_instance, use_tensor=True):
new_credit = self.features['credit_amount'].get_feature_value(new_instance, use_tensor,
space='x')
old_credit = self.features['credit_amount'].get_feature_value(instance, use_tensor,
space='x')
change = (new_credit - old_credit) / old_credit
cost = tf.reduce_sum(tf.square(change)) if use_tensor else np.square(change)
return self.return_cost(instance, new_instance, cost, use_tensor)
def precondition(self, instance, use_tensor=True):
age = self.features['age_in_years'].get_feature_value(instance, use_tensor, space='x')
return cond.op_gt(age, 15, use_tensor)
def postcondition(self, instance, new_instance, use_tensor=True):
new_credit = self.features['credit_amount'].get_feature_value(new_instance, use_tensor,
space='x')
return cond.op_and(cond.op_gt(new_credit, 0, use_tensor, scale=100000.),
cond.op_lt(new_credit, 100000, use_tensor, scale=100000.),
use_tensor)
class ChangeLoanPeriod(Action):
def __init__(self, features):
super().__init__(name='ChangeLoanPeriod',
description='Changes Loan Period',
type='Numeric',
features=features,
target_features=['loan_duration'],
init_p=[0])
def apply(self, instance, p, use_tensor=True):
param = self.get_param(p, use_tensor)
return self.features['loan_duration'].change_feature_value(instance, param, use_tensor)
def get_cost(self, instance, new_instance, use_tensor=True):
new_period = self.features['loan_duration'].get_feature_value(new_instance, use_tensor,
space='x')
old_period = self.features['loan_duration'].get_feature_value(instance, use_tensor,
space='x')
change = (new_period - old_period) / old_period
cost = tf.reduce_sum(tf.square(change)) if use_tensor else np.square(change)
return self.return_cost(instance, new_instance, cost, use_tensor)
def postcondition(self, instance, new_instance, use_tensor=True):
new_period = self.features['loan_duration'].get_feature_value(new_instance, use_tensor,
space='x')
return cond.op_and(cond.op_gt(new_period, 0, use_tensor, scale=100.),
cond.op_lt(new_period, 120, use_tensor, scale=100.),
use_tensor)
class AdjustLoanPeriod(Action):
def __init__(self, features):
super().__init__(name='AdjustLoanPeriod',
description='Changes Loan Period but keeps total loan / period same',
type='Numeric',
features=features,
target_features=['credit_amount', 'loan_duration'],
init_p=[0])
def apply(self, instance, p, use_tensor=True):
old_credit_x = self.features['credit_amount'].get_feature_value(instance, use_tensor,
space='x')
old_period_x = self.features['loan_duration'].get_feature_value(instance, use_tensor,
space='x')
change_in_credit_z = self.get_param(p, use_tensor)
change_in_credit_x = self.features['credit_amount'].ztox(change_in_credit_z, add_mean=False)
change_in_period_x = old_period_x * (old_credit_x + change_in_credit_x) / old_credit_x
change_in_period_z = self.features['loan_duration'].xtoz(change_in_period_x, add_mean=False)
instance = self.features['credit_amount'].change_feature_value(instance, change_in_credit_z,
use_tensor)
return self.features['loan_duration'].change_feature_value(instance, change_in_period_z,
use_tensor)
def get_cost(self, instance, new_instance, use_tensor=True):
new_credit = self.features['credit_amount'].get_feature_value(new_instance, use_tensor)
old_credit = self.features['credit_amount'].get_feature_value(instance, use_tensor)
change = (new_credit - old_credit) / old_credit
cost = tf.reduce_sum(tf.square(change)) if use_tensor else np.square(change)
return self.return_cost(instance, new_instance, cost, use_tensor)
def precondition(self, instance, use_tensor=True):
old_credit_x = self.features['credit_amount'].get_feature_value(instance, use_tensor,
space='x')
return cond.op_gt(old_credit_x, 1000, use_tensor, scale=100000.)
def postcondition(self, instance, new_instance, use_tensor=True):
new_period_x = self.features['loan_duration'].get_feature_value(new_instance, use_tensor,
space='x')
new_credit_x = self.features['credit_amount'].get_feature_value(new_instance, use_tensor,
space='x')
return cond.op_and(cond.op_and(cond.op_gt(new_period_x, 0, use_tensor, scale=100.),
cond.op_lt(new_period_x, 120, use_tensor, scale=100.),
use_tensor),
cond.op_and(cond.op_gt(new_credit_x, 0, use_tensor, scale=100000.),
cond.op_lt(new_credit_x, 100000, use_tensor, scale=100000.),
use_tensor),
use_tensor)
actions = [
WaitYears,
Naturalize,
ChangeCreditAmount,
ChangeLoanPeriod,
AdjustLoanPeriod,
GetGuarantor,
GetUnskilledJob,
]
| 50.06383
| 100
| 0.570166
| 1,287
| 11,765
| 4.871795
| 0.090909
| 0.134928
| 0.105742
| 0.063796
| 0.830303
| 0.805423
| 0.775279
| 0.749761
| 0.667305
| 0.619139
| 0
| 0.01266
| 0.335317
| 11,765
| 234
| 101
| 50.277778
| 0.78913
| 0.005695
| 0
| 0.547368
| 0
| 0
| 0.072864
| 0.006158
| 0
| 0
| 0
| 0
| 0
| 1
| 0.157895
| false
| 0
| 0.021053
| 0.047368
| 0.336842
| 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
|
4fcd93fe2858e15428cefc08dd1561a7d0968c48
| 2,114
|
py
|
Python
|
src/pyrin/api/schema/manager.py
|
wilsonGmn/pyrin
|
25dbe3ce17e80a43eee7cfc7140b4c268a6948e0
|
[
"BSD-3-Clause"
] | null | null | null |
src/pyrin/api/schema/manager.py
|
wilsonGmn/pyrin
|
25dbe3ce17e80a43eee7cfc7140b4c268a6948e0
|
[
"BSD-3-Clause"
] | null | null | null |
src/pyrin/api/schema/manager.py
|
wilsonGmn/pyrin
|
25dbe3ce17e80a43eee7cfc7140b4c268a6948e0
|
[
"BSD-3-Clause"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
schema manager module.
"""
import pyrin.converters.serializer.services as serializer_services
from pyrin.api.schema import SchemaPackage
from pyrin.core.structs import Manager
class SchemaManager(Manager):
"""
schema manager class.
"""
package_class = SchemaPackage
def get_computed_entity_columns(self, entity, result_schema=None, **options):
"""
gets a dict containing all computed columns to be added to the result.
if `result_schema` is not provided, it returns an empty dict.
note that the result dict should not contain any `BaseEntity` or
`ROW_RESULT` values, otherwise a max recursion error may occur.
:param BaseEntity entity: the actual entity to be processed.
:param ResultSchema result_schema: result schema to be used for computation.
:rtype: dict
"""
if result_schema is None:
return {}
result = result_schema.get_computed_entity_columns(entity, **options)
if result is None:
return {}
options.update(result_schema=result_schema)
result = serializer_services.serialize(result, **options)
return result
def get_computed_row_columns(self, row, result_schema=None, **options):
"""
gets a dict containing all computed columns to be added to the result.
if `result_schema` is not provided, it returns an empty dict.
note that the result dict should not contain any `BaseEntity` or
`ROW_RESULT` values, otherwise a max recursion error may occur.
:param ROW_RESULT row: the actual row result to be processed.
:param ResultSchema result_schema: result schema to be used for computation.
:rtype: dict
"""
if result_schema is None:
return {}
result = result_schema.get_computed_row_columns(row, **options)
if result is None:
return {}
options.update(result_schema=result_schema)
result = serializer_services.serialize(result, **options)
return result
| 31.088235
| 84
| 0.667928
| 261
| 2,114
| 5.283525
| 0.275862
| 0.139231
| 0.078318
| 0.04641
| 0.719362
| 0.719362
| 0.719362
| 0.719362
| 0.719362
| 0.719362
| 0
| 0.00064
| 0.261116
| 2,114
| 67
| 85
| 31.552239
| 0.882202
| 0.425733
| 0
| 0.608696
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.086957
| false
| 0
| 0.130435
| 0
| 0.565217
| 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
|
4fe774254238dc20abba9ad9fe2e540c5e04f63b
| 128
|
py
|
Python
|
scriptcore/console/asciimatics/widgets/divider.py
|
LowieHuyghe/scriptcore
|
0c9d94b353d4d149db9492eb4ae0aa87cc1e082c
|
[
"Apache-2.0"
] | null | null | null |
scriptcore/console/asciimatics/widgets/divider.py
|
LowieHuyghe/scriptcore
|
0c9d94b353d4d149db9492eb4ae0aa87cc1e082c
|
[
"Apache-2.0"
] | 6
|
2017-02-23T13:22:31.000Z
|
2018-07-06T04:51:06.000Z
|
scriptcore/console/asciimatics/widgets/divider.py
|
LowieHuyghe/scriptcore
|
0c9d94b353d4d149db9492eb4ae0aa87cc1e082c
|
[
"Apache-2.0"
] | null | null | null |
from __future__ import absolute_import
from asciimatics.widgets import Divider as ADivider
class Divider(ADivider):
pass
| 16
| 51
| 0.8125
| 16
| 128
| 6.1875
| 0.6875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15625
| 128
| 7
| 52
| 18.285714
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.25
| 0.5
| 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
| 1
| 1
| 0
| 0
| 0
|
0
| 5
|
4ff75793b340ae2ce10d1b844b88e55c50e19602
| 138
|
py
|
Python
|
BitManipulation/PowerOfThree.py
|
PK-100/Competitive_Programming
|
d0863feaaa99462b2999e85dcf115f7a6c08bb8d
|
[
"MIT"
] | 70
|
2018-06-25T21:20:15.000Z
|
2022-03-24T03:55:17.000Z
|
BitManipulation/PowerOfThree.py
|
An3sha/Competitive_Programming
|
ee7eadf51939a360d0b004d787ebabda583e92f0
|
[
"MIT"
] | 4
|
2018-09-04T13:12:20.000Z
|
2021-06-20T08:29:12.000Z
|
BitManipulation/PowerOfThree.py
|
An3sha/Competitive_Programming
|
ee7eadf51939a360d0b004d787ebabda583e92f0
|
[
"MIT"
] | 24
|
2018-12-26T05:15:32.000Z
|
2022-01-23T23:04:54.000Z
|
threePow19 = 1162261467 # 3**19
class Solution:
def isPowerOfThree(self, n: int) -> bool:
return n>0 and not (threePow19 % n)
| 27.6
| 45
| 0.652174
| 19
| 138
| 4.736842
| 0.842105
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.169811
| 0.231884
| 138
| 4
| 46
| 34.5
| 0.679245
| 0.036232
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0.25
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
8c9017a4b03aa970db7b5209c4b8e27ba9fe065d
| 20,230
|
py
|
Python
|
airavata/model/application/io/ttypes.py
|
isururanawaka/airavata-django-portal
|
5be3f3eeb6c42fabd0aca6f92821a5629ac1b3cc
|
[
"Apache-2.0"
] | null | null | null |
airavata/model/application/io/ttypes.py
|
isururanawaka/airavata-django-portal
|
5be3f3eeb6c42fabd0aca6f92821a5629ac1b3cc
|
[
"Apache-2.0"
] | null | null | null |
airavata/model/application/io/ttypes.py
|
isururanawaka/airavata-django-portal
|
5be3f3eeb6c42fabd0aca6f92821a5629ac1b3cc
|
[
"Apache-2.0"
] | null | null | null |
#
# Autogenerated by Thrift Compiler (0.10.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py
#
from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
from thrift.protocol.TProtocol import TProtocolException
import sys
import airavata.model.appcatalog.computeresource.ttypes
from thrift.transport import TTransport
class DataType(object):
"""
Data Types supported in Airavata. The primitive data types
"""
STRING = 0
INTEGER = 1
FLOAT = 2
URI = 3
URI_COLLECTION = 4
STDOUT = 5
STDERR = 6
_VALUES_TO_NAMES = {
0: "STRING",
1: "INTEGER",
2: "FLOAT",
3: "URI",
4: "URI_COLLECTION",
5: "STDOUT",
6: "STDERR",
}
_NAMES_TO_VALUES = {
"STRING": 0,
"INTEGER": 1,
"FLOAT": 2,
"URI": 3,
"URI_COLLECTION": 4,
"STDOUT": 5,
"STDERR": 6,
}
class InputDataObjectType(object):
"""
Application Inputs. The paramters describe how inputs are passed to the application.
name:
Name of the parameter.
value:
Value of the parameter. A default value could be set during registration.
type:
Data type of the parameter
applicationArguement:
The argument flag sent to the application. Such as -p pressure.
standardInput:
When this value is set, the parameter is sent as standard input rather than a parameter.
Typically this is passed using redirection operator ">".
userFriendlyDescription:
Description to be displayed at the user interface.
metaData:
Any metadat. This is typically ignore by Airavata and is used by gateways for application configuration.
Attributes:
- name
- value
- type
- applicationArgument
- standardInput
- userFriendlyDescription
- metaData
- inputOrder
- isRequired
- requiredToAddedToCommandLine
- dataStaged
- storageResourceId
- isReadOnly
"""
thrift_spec = (
None, # 0
(1, TType.STRING, 'name', 'UTF8', None, ), # 1
(2, TType.STRING, 'value', 'UTF8', None, ), # 2
(3, TType.I32, 'type', None, None, ), # 3
(4, TType.STRING, 'applicationArgument', 'UTF8', None, ), # 4
(5, TType.BOOL, 'standardInput', None, None, ), # 5
(6, TType.STRING, 'userFriendlyDescription', 'UTF8', None, ), # 6
(7, TType.STRING, 'metaData', 'UTF8', None, ), # 7
(8, TType.I32, 'inputOrder', None, None, ), # 8
(9, TType.BOOL, 'isRequired', None, None, ), # 9
(10, TType.BOOL, 'requiredToAddedToCommandLine', None, None, ), # 10
(11, TType.BOOL, 'dataStaged', None, None, ), # 11
(12, TType.STRING, 'storageResourceId', 'UTF8', None, ), # 12
(13, TType.BOOL, 'isReadOnly', None, None, ), # 13
)
def __init__(self, name=None, value=None, type=None, applicationArgument=None, standardInput=None, userFriendlyDescription=None, metaData=None, inputOrder=None, isRequired=None, requiredToAddedToCommandLine=None, dataStaged=None, storageResourceId=None, isReadOnly=None,):
self.name = name
self.value = value
self.type = type
self.applicationArgument = applicationArgument
self.standardInput = standardInput
self.userFriendlyDescription = userFriendlyDescription
self.metaData = metaData
self.inputOrder = inputOrder
self.isRequired = isRequired
self.requiredToAddedToCommandLine = requiredToAddedToCommandLine
self.dataStaged = dataStaged
self.storageResourceId = storageResourceId
self.isReadOnly = isReadOnly
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
return
iprot.readStructBegin()
while True:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
if fid == 1:
if ftype == TType.STRING:
self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRING:
self.value = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.I32:
self.type = iprot.readI32()
else:
iprot.skip(ftype)
elif fid == 4:
if ftype == TType.STRING:
self.applicationArgument = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 5:
if ftype == TType.BOOL:
self.standardInput = iprot.readBool()
else:
iprot.skip(ftype)
elif fid == 6:
if ftype == TType.STRING:
self.userFriendlyDescription = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 7:
if ftype == TType.STRING:
self.metaData = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 8:
if ftype == TType.I32:
self.inputOrder = iprot.readI32()
else:
iprot.skip(ftype)
elif fid == 9:
if ftype == TType.BOOL:
self.isRequired = iprot.readBool()
else:
iprot.skip(ftype)
elif fid == 10:
if ftype == TType.BOOL:
self.requiredToAddedToCommandLine = iprot.readBool()
else:
iprot.skip(ftype)
elif fid == 11:
if ftype == TType.BOOL:
self.dataStaged = iprot.readBool()
else:
iprot.skip(ftype)
elif fid == 12:
if ftype == TType.STRING:
self.storageResourceId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 13:
if ftype == TType.BOOL:
self.isReadOnly = iprot.readBool()
else:
iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
iprot.readStructEnd()
def write(self, oprot):
if oprot._fast_encode is not None and self.thrift_spec is not None:
oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('InputDataObjectType')
if self.name is not None:
oprot.writeFieldBegin('name', TType.STRING, 1)
oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name)
oprot.writeFieldEnd()
if self.value is not None:
oprot.writeFieldBegin('value', TType.STRING, 2)
oprot.writeString(self.value.encode('utf-8') if sys.version_info[0] == 2 else self.value)
oprot.writeFieldEnd()
if self.type is not None:
oprot.writeFieldBegin('type', TType.I32, 3)
oprot.writeI32(self.type)
oprot.writeFieldEnd()
if self.applicationArgument is not None:
oprot.writeFieldBegin('applicationArgument', TType.STRING, 4)
oprot.writeString(self.applicationArgument.encode('utf-8') if sys.version_info[0] == 2 else self.applicationArgument)
oprot.writeFieldEnd()
if self.standardInput is not None:
oprot.writeFieldBegin('standardInput', TType.BOOL, 5)
oprot.writeBool(self.standardInput)
oprot.writeFieldEnd()
if self.userFriendlyDescription is not None:
oprot.writeFieldBegin('userFriendlyDescription', TType.STRING, 6)
oprot.writeString(self.userFriendlyDescription.encode('utf-8') if sys.version_info[0] == 2 else self.userFriendlyDescription)
oprot.writeFieldEnd()
if self.metaData is not None:
oprot.writeFieldBegin('metaData', TType.STRING, 7)
oprot.writeString(self.metaData.encode('utf-8') if sys.version_info[0] == 2 else self.metaData)
oprot.writeFieldEnd()
if self.inputOrder is not None:
oprot.writeFieldBegin('inputOrder', TType.I32, 8)
oprot.writeI32(self.inputOrder)
oprot.writeFieldEnd()
if self.isRequired is not None:
oprot.writeFieldBegin('isRequired', TType.BOOL, 9)
oprot.writeBool(self.isRequired)
oprot.writeFieldEnd()
if self.requiredToAddedToCommandLine is not None:
oprot.writeFieldBegin('requiredToAddedToCommandLine', TType.BOOL, 10)
oprot.writeBool(self.requiredToAddedToCommandLine)
oprot.writeFieldEnd()
if self.dataStaged is not None:
oprot.writeFieldBegin('dataStaged', TType.BOOL, 11)
oprot.writeBool(self.dataStaged)
oprot.writeFieldEnd()
if self.storageResourceId is not None:
oprot.writeFieldBegin('storageResourceId', TType.STRING, 12)
oprot.writeString(self.storageResourceId.encode('utf-8') if sys.version_info[0] == 2 else self.storageResourceId)
oprot.writeFieldEnd()
if self.isReadOnly is not None:
oprot.writeFieldBegin('isReadOnly', TType.BOOL, 13)
oprot.writeBool(self.isReadOnly)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.name is None:
raise TProtocolException(message='Required field name is unset!')
return
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.items()]
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
def __eq__(self, other):
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
def __ne__(self, other):
return not (self == other)
class OutputDataObjectType(object):
"""
Application Outputs. The paramters describe how outputs generated by the application.
name:
Name of the parameter.
value:
Value of the parameter.
type:
Data type of the parameter
applicationArguement:
The argument flag sent to the application. Such as -p pressure.
standardInput:
When this value is set, the parameter is sent as standard input rather than a parameter.
Typically this is passed using redirection operator ">".
userFriendlyDescription:
Description to be displayed at the user interface.
metaData:
Any metadat. This is typically ignore by Airavata and is used by gateways for application configuration.
Attributes:
- name
- value
- type
- applicationArgument
- isRequired
- requiredToAddedToCommandLine
- dataMovement
- location
- searchQuery
- outputStreaming
- storageResourceId
- metaData
"""
thrift_spec = (
None, # 0
(1, TType.STRING, 'name', 'UTF8', None, ), # 1
(2, TType.STRING, 'value', 'UTF8', None, ), # 2
(3, TType.I32, 'type', None, None, ), # 3
(4, TType.STRING, 'applicationArgument', 'UTF8', None, ), # 4
(5, TType.BOOL, 'isRequired', None, None, ), # 5
(6, TType.BOOL, 'requiredToAddedToCommandLine', None, None, ), # 6
(7, TType.BOOL, 'dataMovement', None, None, ), # 7
(8, TType.STRING, 'location', 'UTF8', None, ), # 8
(9, TType.STRING, 'searchQuery', 'UTF8', None, ), # 9
(10, TType.BOOL, 'outputStreaming', None, None, ), # 10
(11, TType.STRING, 'storageResourceId', 'UTF8', None, ), # 11
(12, TType.STRING, 'metaData', 'UTF8', None, ), # 12
)
def __init__(self, name=None, value=None, type=None, applicationArgument=None, isRequired=None, requiredToAddedToCommandLine=None, dataMovement=None, location=None, searchQuery=None, outputStreaming=None, storageResourceId=None, metaData=None,):
self.name = name
self.value = value
self.type = type
self.applicationArgument = applicationArgument
self.isRequired = isRequired
self.requiredToAddedToCommandLine = requiredToAddedToCommandLine
self.dataMovement = dataMovement
self.location = location
self.searchQuery = searchQuery
self.outputStreaming = outputStreaming
self.storageResourceId = storageResourceId
self.metaData = metaData
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
return
iprot.readStructBegin()
while True:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
if fid == 1:
if ftype == TType.STRING:
self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRING:
self.value = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.I32:
self.type = iprot.readI32()
else:
iprot.skip(ftype)
elif fid == 4:
if ftype == TType.STRING:
self.applicationArgument = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 5:
if ftype == TType.BOOL:
self.isRequired = iprot.readBool()
else:
iprot.skip(ftype)
elif fid == 6:
if ftype == TType.BOOL:
self.requiredToAddedToCommandLine = iprot.readBool()
else:
iprot.skip(ftype)
elif fid == 7:
if ftype == TType.BOOL:
self.dataMovement = iprot.readBool()
else:
iprot.skip(ftype)
elif fid == 8:
if ftype == TType.STRING:
self.location = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 9:
if ftype == TType.STRING:
self.searchQuery = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 10:
if ftype == TType.BOOL:
self.outputStreaming = iprot.readBool()
else:
iprot.skip(ftype)
elif fid == 11:
if ftype == TType.STRING:
self.storageResourceId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 12:
if ftype == TType.STRING:
self.metaData = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
iprot.readStructEnd()
def write(self, oprot):
if oprot._fast_encode is not None and self.thrift_spec is not None:
oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('OutputDataObjectType')
if self.name is not None:
oprot.writeFieldBegin('name', TType.STRING, 1)
oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name)
oprot.writeFieldEnd()
if self.value is not None:
oprot.writeFieldBegin('value', TType.STRING, 2)
oprot.writeString(self.value.encode('utf-8') if sys.version_info[0] == 2 else self.value)
oprot.writeFieldEnd()
if self.type is not None:
oprot.writeFieldBegin('type', TType.I32, 3)
oprot.writeI32(self.type)
oprot.writeFieldEnd()
if self.applicationArgument is not None:
oprot.writeFieldBegin('applicationArgument', TType.STRING, 4)
oprot.writeString(self.applicationArgument.encode('utf-8') if sys.version_info[0] == 2 else self.applicationArgument)
oprot.writeFieldEnd()
if self.isRequired is not None:
oprot.writeFieldBegin('isRequired', TType.BOOL, 5)
oprot.writeBool(self.isRequired)
oprot.writeFieldEnd()
if self.requiredToAddedToCommandLine is not None:
oprot.writeFieldBegin('requiredToAddedToCommandLine', TType.BOOL, 6)
oprot.writeBool(self.requiredToAddedToCommandLine)
oprot.writeFieldEnd()
if self.dataMovement is not None:
oprot.writeFieldBegin('dataMovement', TType.BOOL, 7)
oprot.writeBool(self.dataMovement)
oprot.writeFieldEnd()
if self.location is not None:
oprot.writeFieldBegin('location', TType.STRING, 8)
oprot.writeString(self.location.encode('utf-8') if sys.version_info[0] == 2 else self.location)
oprot.writeFieldEnd()
if self.searchQuery is not None:
oprot.writeFieldBegin('searchQuery', TType.STRING, 9)
oprot.writeString(self.searchQuery.encode('utf-8') if sys.version_info[0] == 2 else self.searchQuery)
oprot.writeFieldEnd()
if self.outputStreaming is not None:
oprot.writeFieldBegin('outputStreaming', TType.BOOL, 10)
oprot.writeBool(self.outputStreaming)
oprot.writeFieldEnd()
if self.storageResourceId is not None:
oprot.writeFieldBegin('storageResourceId', TType.STRING, 11)
oprot.writeString(self.storageResourceId.encode('utf-8') if sys.version_info[0] == 2 else self.storageResourceId)
oprot.writeFieldEnd()
if self.metaData is not None:
oprot.writeFieldBegin('metaData', TType.STRING, 12)
oprot.writeString(self.metaData.encode('utf-8') if sys.version_info[0] == 2 else self.metaData)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.name is None:
raise TProtocolException(message='Required field name is unset!')
return
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.items()]
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
def __eq__(self, other):
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
def __ne__(self, other):
return not (self == other)
| 40.541082
| 276
| 0.579881
| 2,100
| 20,230
| 5.511429
| 0.09619
| 0.031104
| 0.025661
| 0.041991
| 0.777259
| 0.711595
| 0.704942
| 0.690081
| 0.674702
| 0.674702
| 0
| 0.019958
| 0.316411
| 20,230
| 498
| 277
| 40.62249
| 0.816979
| 0.09916
| 0
| 0.710526
| 1
| 0
| 0.055983
| 0.008819
| 0
| 0
| 0
| 0
| 0
| 1
| 0.036842
| false
| 0
| 0.013158
| 0.010526
| 0.118421
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
8cb39f1bba1b86c648fc1db090c2f4c4e9f06277
| 159
|
py
|
Python
|
emat/model/core_files/__init__.py
|
tlumip/tmip-emat
|
55cca13e004a2844bef1f6afd09338852c61e1f1
|
[
"BSD-3-Clause"
] | null | null | null |
emat/model/core_files/__init__.py
|
tlumip/tmip-emat
|
55cca13e004a2844bef1f6afd09338852c61e1f1
|
[
"BSD-3-Clause"
] | null | null | null |
emat/model/core_files/__init__.py
|
tlumip/tmip-emat
|
55cca13e004a2844bef1f6afd09338852c61e1f1
|
[
"BSD-3-Clause"
] | null | null | null |
from .core_files import FilesCoreModel
from .gbnrtc_model import GBNRTCModel
from .ODOT_model import ODOTModel
from .parsers import TableParser, FileParser
| 19.875
| 44
| 0.842767
| 20
| 159
| 6.55
| 0.65
| 0.167939
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125786
| 159
| 7
| 45
| 22.714286
| 0.942446
| 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
|
8cc1700c3dac79faa754808b57c172cb16991b0d
| 96
|
py
|
Python
|
venv/lib/python3.8/site-packages/setuptools/_vendor/packaging/_manylinux.py
|
Retraces/UkraineBot
|
3d5d7f8aaa58fa0cb8b98733b8808e5dfbdb8b71
|
[
"MIT"
] | 2
|
2022-03-13T01:58:52.000Z
|
2022-03-31T06:07:54.000Z
|
venv/lib/python3.8/site-packages/setuptools/_vendor/packaging/_manylinux.py
|
DesmoSearch/Desmobot
|
b70b45df3485351f471080deb5c785c4bc5c4beb
|
[
"MIT"
] | 19
|
2021-11-20T04:09:18.000Z
|
2022-03-23T15:05:55.000Z
|
venv/lib/python3.8/site-packages/setuptools/_vendor/packaging/_manylinux.py
|
DesmoSearch/Desmobot
|
b70b45df3485351f471080deb5c785c4bc5c4beb
|
[
"MIT"
] | null | null | null |
/home/runner/.cache/pip/pool/5d/c6/e2/5c1faa723bf76dca21a7a37df1332938fe3f8f79be88e03ca6d2b61966
| 96
| 96
| 0.895833
| 9
| 96
| 9.555556
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.385417
| 0
| 96
| 1
| 96
| 96
| 0.510417
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
8cdccb8366221aec63076adc2979425ada9d0b78
| 98
|
py
|
Python
|
__init__.py
|
jb262/completewasteoftime
|
1a4d378e5cf077e81ee5e269c451bec5c3ea4926
|
[
"MIT"
] | 6
|
2019-09-10T04:30:52.000Z
|
2022-01-08T18:14:32.000Z
|
__init__.py
|
jb262/completewasteoftime
|
1a4d378e5cf077e81ee5e269c451bec5c3ea4926
|
[
"MIT"
] | null | null | null |
__init__.py
|
jb262/completewasteoftime
|
1a4d378e5cf077e81ee5e269c451bec5c3ea4926
|
[
"MIT"
] | null | null | null |
from websites.gamefaqs.model import GameFAQs
from websites.gamerankings.model import Gamerankings
| 32.666667
| 52
| 0.877551
| 12
| 98
| 7.166667
| 0.5
| 0.27907
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081633
| 98
| 2
| 53
| 49
| 0.955556
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
507c65f8e7d3c0a1f7b6a86dafa1678078c7f263
| 118
|
py
|
Python
|
openmdao.test/src/openmdao/test/__init__.py
|
mjfwest/OpenMDAO-Framework
|
a5521f47ad7686c25b203de74e1c7dff5fd7a52b
|
[
"Apache-2.0"
] | 69
|
2015-01-02T19:10:08.000Z
|
2021-11-14T04:42:28.000Z
|
openmdao.test/src/openmdao/test/__init__.py
|
jcchin/OpenMDAO-Framework
|
038e89b06da1c74f00918f4c6fbd8bd365e25657
|
[
"Apache-2.0"
] | 3
|
2015-01-15T23:08:18.000Z
|
2015-03-11T16:57:35.000Z
|
openmdao.test/src/openmdao/test/__init__.py
|
jcchin/OpenMDAO-Framework
|
038e89b06da1c74f00918f4c6fbd8bd365e25657
|
[
"Apache-2.0"
] | 31
|
2015-09-16T00:37:35.000Z
|
2022-01-10T06:27:55.000Z
|
"""
This package contains classes and modules that are used to test openmdao.
"""
from releaseinfo import __version__
| 23.6
| 73
| 0.788136
| 16
| 118
| 5.5625
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.152542
| 118
| 4
| 74
| 29.5
| 0.89
| 0.618644
| 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
|
509754ccc3a17ae7ab1d8dc021ff2f1df1c0f606
| 3,673
|
py
|
Python
|
src/super_gradients/common/decorators/deci_logger.py
|
Deci-AI/super-gradients
|
658f638389654668a085e23c3b19622241fd9267
|
[
"Apache-2.0"
] | 308
|
2021-12-30T10:14:30.000Z
|
2022-03-30T19:05:31.000Z
|
src/super_gradients/common/decorators/deci_logger.py
|
karndeepsingh/super-gradients
|
bfed440ecaf485af183570bf965eb5b74cb9f832
|
[
"Apache-2.0"
] | 24
|
2022-01-10T08:05:37.000Z
|
2022-03-30T18:49:06.000Z
|
src/super_gradients/common/decorators/deci_logger.py
|
karndeepsingh/super-gradients
|
bfed440ecaf485af183570bf965eb5b74cb9f832
|
[
"Apache-2.0"
] | 26
|
2021-12-31T06:04:07.000Z
|
2022-03-21T09:51:44.000Z
|
def deci_func_logger(_func=None, *, name: str = 'abstract_decorator'):
"""
This decorator is used to wrap our functions with logs.
It will log every enter and exit of the functon with the equivalent parameters as extras.
It will also log exceptions that raises in the function.
It will also log the exception time of the function.
How it works:`
First it will check if the decorator called with name keyword.
If so it will return a new decorator that its logger is the name parameter.
If not it will return a new decorator that its logger is the wrapped function name.
Then the return decorator will return a new function that warps the original function with the new logs.
For further understanding advise real-python "fancy decorators documentation"
Args:
_func (): used when called without name specify. dont pass it directly
name (): The name of the logger to save logs by.
Returns:
a decorator that wraps function with logs logic.
"""
# TODO: Not Working - Breaks the code, tests does not pass (s3 connector, platform...)
# TODO: Fix problem with ExplicitParamValidation error (arguments not passed)
# TODO: Run ALL test suite of deci2 (NOT circieCI test suite, but ALL the tests under tests folders)
# TODO: Delete/Update all failing tests.
# def deci_logger_decorator(fn):
#
# @functools.wraps(fn)
# def wrapper_func(*args, **kwargs):
# try:
#
# try:
# logger.debug(f"Start: {fn.__name__}", extra={"args": args, "kwargs": kwargs})
# time1 = time.perf_counter()
# except Exception:
# # failed to write log - continue.
# pass
#
# result = fn(*args, **kwargs)
#
# try:
# time2 = time.perf_counter()
# logger.debug(f"End: {fn.__name__}",
# extra={'duration': (time2 - time1) * 1000.0, 'return_value': result})
# except Exception:
# # failed to write log - continue.
# pass
#
# return result
#
# except Exception as ex:
# # This exception was raised from inside the function call
# logger.error(f"Exception: {ex}", exc_info=ex)
# raise ex
#
# return wrapper_func
# if _func is None:
# logger = get_logger(name)
# return deci_logger_decorator
# else:
# logger = get_logger(_func.__name__)
# return deci_logger_decorator(_func)
return _func
def deci_class_logger():
"""
This decorator wraps every class method with deci_func_logger decorator.
It works by checking if class method is callable and if so it will set a new decorated method as the same method name.
"""
def wrapper(cls):
# TODO: Not Working - Breaks the code, tests does not pass (s3 connector, platform...)
# TODO: Fix problem with ExplicitParamValidation error (arguments not passed)
# TODO: Run ALL test suite of deci2 (NOT circieCI test suite, but ALL the tests under tests folders)
# TODO: Delete/Update all failing tests.
# for attr in cls.__dict__:
# if callable(getattr(cls, attr)) and attr != '__init__':
# decorated_function = deci_func_logger(name=cls.__name__)(getattr(cls, attr))
# if type(cls.__dict__[attr]) is staticmethod:
# decorated_function = staticmethod(decorated_function)
# setattr(cls, attr, decorated_function)
return cls
return wrapper
| 41.269663
| 122
| 0.619112
| 461
| 3,673
| 4.800434
| 0.336226
| 0.018979
| 0.018979
| 0.018979
| 0.315409
| 0.2892
| 0.2892
| 0.2892
| 0.250339
| 0.250339
| 0
| 0.005076
| 0.30275
| 3,673
| 88
| 123
| 41.738636
| 0.859039
| 0.828478
| 0
| 0
| 0
| 0
| 0.037037
| 0
| 0
| 0
| 0
| 0.022727
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.166667
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
50acd8893553538047b26e74753839f1be2c53fb
| 131
|
py
|
Python
|
abacusai/__init__.py
|
Ankit-RealityEngines/api-python
|
3627048d31df5972c5777de2a1c1211ea06a8804
|
[
"MIT"
] | null | null | null |
abacusai/__init__.py
|
Ankit-RealityEngines/api-python
|
3627048d31df5972c5777de2a1c1211ea06a8804
|
[
"MIT"
] | null | null | null |
abacusai/__init__.py
|
Ankit-RealityEngines/api-python
|
3627048d31df5972c5777de2a1c1211ea06a8804
|
[
"MIT"
] | null | null | null |
from .client import ApiClient, ApiException, ClientOptions
from .prediction_client import PredictionClient
__version__ = "0.32.4"
| 26.2
| 58
| 0.824427
| 15
| 131
| 6.866667
| 0.8
| 0.23301
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.034188
| 0.10687
| 131
| 4
| 59
| 32.75
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0.045802
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 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
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
0fa2905d652a2bd480bcb6b8c90043b98870a186
| 270
|
py
|
Python
|
pyxplr/__init__.py
|
UBC-MDS/pyxplr
|
7e0d94316bce7b3ed343a6a6b5c3afce5c71afd8
|
[
"MIT"
] | 1
|
2020-02-25T23:47:18.000Z
|
2020-02-25T23:47:18.000Z
|
pyxplr/__init__.py
|
UBC-MDS/pyxplr
|
7e0d94316bce7b3ed343a6a6b5c3afce5c71afd8
|
[
"MIT"
] | 46
|
2020-02-25T23:43:52.000Z
|
2020-03-27T01:24:24.000Z
|
pyxplr/__init__.py
|
UBC-MDS/pyxplr
|
7e0d94316bce7b3ed343a6a6b5c3afce5c71afd8
|
[
"MIT"
] | null | null | null |
__version__ = '0.4.14'
from pyxplr.explore_feature_map import explore_feature_map # noqa
from pyxplr.explore_missing import explore_missing # noqa
from pyxplr.explore_summary import explore_summary # noqa
from pyxplr.explore_outliers import explore_outliers # noqa
| 38.571429
| 66
| 0.833333
| 38
| 270
| 5.552632
| 0.368421
| 0.189573
| 0.322275
| 0.298578
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016807
| 0.118519
| 270
| 6
| 67
| 45
| 0.869748
| 0.07037
| 0
| 0
| 0
| 0
| 0.02439
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.8
| 0
| 0.8
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
0fad4468028c1e18cdfa6ec12c739c61bccd22ad
| 3,755
|
py
|
Python
|
library/source1/bsp/lumps/vertex_lump.py
|
BlenderAddonsArchive/SourceIO
|
7e29de15e7b9a3db538bcdf805547d1781fce3c9
|
[
"MIT"
] | 199
|
2019-04-02T02:30:58.000Z
|
2022-03-30T21:29:49.000Z
|
source1/bsp/lumps/vertex_lump.py
|
syborg64/SourceIO
|
e4ba86d801f518e192260af08ef533759c2e1cc3
|
[
"MIT"
] | 113
|
2019-03-03T19:36:25.000Z
|
2022-03-31T19:44:05.000Z
|
source1/bsp/lumps/vertex_lump.py
|
syborg64/SourceIO
|
e4ba86d801f518e192260af08ef533759c2e1cc3
|
[
"MIT"
] | 38
|
2019-05-15T16:49:30.000Z
|
2022-03-22T03:40:43.000Z
|
import numpy as np
from .. import Lump, lump_tag
@lump_tag(3, 'LUMP_VERTICES')
class VertexLump(Lump):
def __init__(self, bsp, lump_id):
super().__init__(bsp, lump_id)
self.vertices = np.array([])
def parse(self):
reader = self.reader
self.vertices = np.frombuffer(reader.read(), np.float32)
self.vertices = self.vertices.reshape((-1, 3))
return self
@lump_tag(0x47, 'LUMP_UNLITVERTEX', bsp_version=29)
class UnLitVertexLump(Lump):
_dtype = np.dtype(
[
('vpi', np.uint32, (1,)),
('vni', np.uint32, (1,)),
('uv', np.float32, (2,)),
('unk', np.int32, (1,)),
]
)
def __init__(self, bsp, lump_id):
super().__init__(bsp, lump_id)
self.vertex_info = np.array([])
def parse(self):
reader = self.reader
self.vertex_info = np.frombuffer(reader.read(), self._dtype)
return self
@lump_tag(0x49, 'LUMP_BUMPLITVERTEX', bsp_version=29)
class BumpLitVertexLump(Lump):
_dtype = np.dtype(
[
('vpi', np.uint32, (1,)),
('vni', np.uint32, (1,)),
('uv', np.float32, (2,)),
('unk1', np.int32, (1,)),
('uv_lm', np.float32, (2,)),
('uv1', np.float32, (2,)),
('unk2', np.uint32, (2,)),
]
)
def __init__(self, bsp, lump_id):
super().__init__(bsp, lump_id)
self.vertex_info = np.array([])
def parse(self):
reader = self.reader
self.vertex_info = np.frombuffer(reader.read(), self._dtype)
return self
@lump_tag(0x4a, 'LUMP_UNLITTSVERTEX', bsp_version=29)
class UnlitTSVertexLump(Lump):
_dtype = np.dtype(
[
('vpi', np.uint32, (3,)),
('vni', np.uint32, (1,)),
('uv', np.float32, (2,)),
]
)
def __init__(self, bsp, lump_id):
super().__init__(bsp, lump_id)
self.vertex_info = np.array([])
def parse(self):
reader = self.reader
self.vertex_info = np.frombuffer(reader.read(), self._dtype)
return self
@lump_tag(0x4B, 'LUMP_BLINNPHONGVERTEX', bsp_version=29)
class BlinnPhongVertexLump(Lump):
_dtype = np.dtype(
[
('vpi', np.uint32, (3,)),
('vni', np.uint32, (1,)),
('unk', np.uint32, (2,)),
]
)
def __init__(self, bsp, lump_id):
super().__init__(bsp, lump_id)
self.vertex_info = np.array([])
def parse(self):
reader = self.reader
self.vertex_info = np.frombuffer(reader.read(), self._dtype)
return self
@lump_tag(0x4C, 'LUMP_R5VERTEX', bsp_version=29)
class R5VertexLump(Lump):
_dtype = np.dtype(
[
('vpi', np.uint32, (3,)),
('vni', np.uint32, (1,)),
('unk', np.uint32, (2,)),
('uv', np.float32, (2,)),
('uv_lm', np.float32, (2,)),
]
)
def __init__(self, bsp, lump_id):
super().__init__(bsp, lump_id)
self.vertex_info = np.array([])
def parse(self):
reader = self.reader
self.vertex_info = np.frombuffer(reader.read(), self._dtype)
return self
@lump_tag(0x4E, 'LUMP_R7VERTEX', bsp_version=29)
class R7VertexLump(Lump):
_dtype = np.dtype(
[
('vpi', np.uint32, (3,)),
('vni', np.uint32, (1,)),
('uv', np.float32, (2,)),
('neg_one', np.int32, (1,)),
]
)
def __init__(self, bsp, lump_id):
super().__init__(bsp, lump_id)
self.vertex_info = np.array([])
def parse(self):
reader = self.reader
self.vertex_info = np.frombuffer(reader.read(), self._dtype)
return self
| 25.896552
| 68
| 0.528628
| 444
| 3,755
| 4.204955
| 0.13964
| 0.064274
| 0.067488
| 0.102839
| 0.71398
| 0.704339
| 0.704339
| 0.704339
| 0.704339
| 0.683449
| 0
| 0.044174
| 0.300666
| 3,755
| 144
| 69
| 26.076389
| 0.666794
| 0
| 0
| 0.637931
| 0
| 0
| 0.051931
| 0.005593
| 0
| 0
| 0.006391
| 0
| 0
| 1
| 0.12069
| false
| 0
| 0.017241
| 0
| 0.310345
| 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
|
0fbfa59d802bd263b050e5e86e46429a7a1996cc
| 173
|
py
|
Python
|
py_moysklad/entities/discounts/discount.py
|
upmarket-cc/py_moysklad
|
e026e611344c38f8a8d4f428781fcfb315aaaa60
|
[
"MIT"
] | null | null | null |
py_moysklad/entities/discounts/discount.py
|
upmarket-cc/py_moysklad
|
e026e611344c38f8a8d4f428781fcfb315aaaa60
|
[
"MIT"
] | null | null | null |
py_moysklad/entities/discounts/discount.py
|
upmarket-cc/py_moysklad
|
e026e611344c38f8a8d4f428781fcfb315aaaa60
|
[
"MIT"
] | null | null | null |
from typing import List
from py_moysklad.entities.meta_entity import MetaEntity
class Discount(MetaEntity):
active: bool
allAgents: bool
agentTags: List[str]
| 17.3
| 55
| 0.763006
| 22
| 173
| 5.909091
| 0.772727
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.179191
| 173
| 9
| 56
| 19.222222
| 0.915493
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
ba0a883f8c09146d1f43c4ad8326192598b99b22
| 67
|
py
|
Python
|
Random-Programs/util/clear_screen.py
|
naumoff0/Archive
|
d4ad2da89abb1576dd5a7c72ded6bf9b45c3f610
|
[
"MIT"
] | null | null | null |
Random-Programs/util/clear_screen.py
|
naumoff0/Archive
|
d4ad2da89abb1576dd5a7c72ded6bf9b45c3f610
|
[
"MIT"
] | null | null | null |
Random-Programs/util/clear_screen.py
|
naumoff0/Archive
|
d4ad2da89abb1576dd5a7c72ded6bf9b45c3f610
|
[
"MIT"
] | null | null | null |
def clearScreen():
# emulate ctrl l
print(chr(27) + "[2J")
| 22.333333
| 27
| 0.567164
| 9
| 67
| 4.222222
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.06
| 0.253731
| 67
| 3
| 27
| 22.333333
| 0.7
| 0.208955
| 0
| 0
| 0
| 0
| 0.057692
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| true
| 0
| 0
| 0
| 0.5
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
ba1810aa58e236475f11af4d18af23439b5653cd
| 19
|
py
|
Python
|
cloudmesh/openapi/__version__.py
|
cloudmesh/cloudmesh.openapi
|
c866c4cbdad3adfdf3fe31591906ced8d71352ef
|
[
"Apache-2.0"
] | 7
|
2020-02-29T14:53:19.000Z
|
2021-01-17T17:08:44.000Z
|
cloudmesh/openapi/__version__.py
|
cloudmesh/cloudmesh.openapi
|
c866c4cbdad3adfdf3fe31591906ced8d71352ef
|
[
"Apache-2.0"
] | 27
|
2020-02-29T13:38:11.000Z
|
2020-09-02T20:24:59.000Z
|
cloudmesh/openapi/__version__.py
|
cloudmesh/cloudmesh.openapi
|
c866c4cbdad3adfdf3fe31591906ced8d71352ef
|
[
"Apache-2.0"
] | 6
|
2020-03-02T17:09:14.000Z
|
2020-10-30T22:48:01.000Z
|
version = "4.0.20"
| 9.5
| 18
| 0.578947
| 4
| 19
| 2.75
| 1
| 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
|
ba1c444e0c5137f845b4ebb0795039e9e77228c2
| 3,916
|
py
|
Python
|
poker/poker_env/betsizes.py
|
MorGriffiths/PokerAI
|
a68400f4918f10dde82574ad19654243c9a65024
|
[
"MIT"
] | 2
|
2020-05-24T12:21:36.000Z
|
2022-02-08T03:02:17.000Z
|
poker/poker_env/betsizes.py
|
MorGriffiths/PokerAI
|
a68400f4918f10dde82574ad19654243c9a65024
|
[
"MIT"
] | 3
|
2017-04-28T00:25:18.000Z
|
2018-03-18T20:51:20.000Z
|
poker/poker_env/betsizes.py
|
C5ipo7i/PokerAI
|
a68400f4918f10dde82574ad19654243c9a65024
|
[
"MIT"
] | 2
|
2020-11-05T11:57:04.000Z
|
2021-03-17T17:57:24.000Z
|
import poker_env.datatypes as pdt
class Betsizes():
LIMIT_MAP = {
pdt.LimitTypes.NO_LIMIT: return_nolimit_betsize,
pdt.LimitTypes.POT_LIMIT: return_potlimit_betsize,
pdt.LimitTypes.LIMIT: return_limit_betsize
}
def __init__(self,limit):
self.return_betsize = self.LIMIT_MAP[limit]
@staticmethod
def return_limit_betsize(env,action,betsize_category):
"""TODO Betsizes should be indexed by street"""
if action == pdt.Globals.REVERSE_ACTION_ORDER[pdt.Actions.CALL]: # Call
betsize = min(env.players[env.current_player].stack,env.players[env.last_aggressor.key].street_total - env.players[env.current_player].street_total)
elif action == pdt.Globals.REVERSE_ACTION_ORDER[pdt.Actions.BET]: # Bet
betsize = min(1,env.players[env.current_player].stack)
elif action == pdt.Globals.REVERSE_ACTION_ORDER[pdt.Actions.RAISE]: # Raise can be more than 2 with multiple people
betsize = min(env.players[env.last_aggressor.key].street_total+1,env.players[env.current_player].stack) - env.players[env.current_player].street_total
else: # fold or check
betsize = 0
return betsize
## NO LIMIT ##
def return_nolimit_betsize(self,action,betsize_category):
"""
TODO
Betsize_category would make the most sense if it represented percentages of pot on the first portion.
And percentages of stack or simply an allin option as the last action.
"""
if action == pdt.Globals.REVERSE_ACTION_ORDER[pdt.Actions.CALL]:
betsize = min(self.players[self.last_aggressor.key].street_total - self.players[self.current_index.key].street_total,self.players[self.current_player].stack)
elif action == pdt.Globals.REVERSE_ACTION_ORDER[pdt.Actions.BET]: # Bet
betsize_value = self.betsizes[betsize_category] * self.pot
betsize = min(max(1,betsize_value),self.players[self.current_player].stack)
elif action == pdt.Globals.REVERSE_ACTION_ORDER[pdt.Actions.RAISE]: # Raise
max_raise = (2 * self.players[self.last_aggressor.key].street_total) + (self.pot - self.players[self.current_index.key].street_total)
betsize_value = self.betsizes[betsize_category] * max_raise
previous_bet = self.players[self.last_aggressor.key].street_total - self.players[self.current_index.key].street_total
betsize = min(max(previous_bet * 2,betsize_value),self.players[self.current_player].stack)
else:
betsize = 0
return betsize
## POT LIMIT
def return_potlimit_betsize(self,action,betsize_category):
"""TODO Betsize_category in POTLIMIT is a float [0,1] representing fraction of pot"""
if action == pdt.Globals.REVERSE_ACTION_ORDER[pdt.Actions.CALL]:
betsize = min(self.players[self.last_aggressor.key].street_total - self.players[self.current_index.key].street_total,self.players[self.current_player].stack)
elif action == pdt.Globals.REVERSE_ACTION_ORDER[pdt.Actions.BET]: # Bet
betsize_value = self.betsizes[betsize_category] * self.pot
betsize = min(max(1,betsize_value),self.players[self.current_player].stack)
elif action == pdt.Globals.REVERSE_ACTION_ORDER[pdt.Actions.RAISE]: # Raise
max_raise = (2 * self.players[self.last_aggressor.key].street_total) + (self.pot - self.players[self.current_index.key].street_total)
betsize_value = (self.betsizes[betsize_category] * max_raise) - self.players[self.current_index.key].street_total
previous_bet = self.players[self.last_aggressor.key].street_total - self.players[self.current_index.key].street_total
betsize = min(max(previous_bet * 2,betsize_value),self.players[self.current_player].stack)
else:
betsize = 0
return betsize
| 64.196721
| 169
| 0.701736
| 519
| 3,916
| 5.086705
| 0.16763
| 0.079167
| 0.107955
| 0.108333
| 0.771591
| 0.764015
| 0.764015
| 0.735227
| 0.655682
| 0.622348
| 0
| 0.004428
| 0.192543
| 3,916
| 61
| 170
| 64.196721
| 0.830487
| 0.104443
| 0
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04918
| 0
| 1
| 0.083333
| false
| 0
| 0.020833
| 0
| 0.208333
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
2cef32b9bc05fe8f3cb58de2df2c323820cc2856
| 103
|
py
|
Python
|
pyexplain/attach/links/admin.py
|
LucasMagnum/pyexplain
|
ca7a91df8519f576c21d5ede4b4f779fabfd5cbe
|
[
"MIT"
] | 6
|
2018-03-20T19:50:47.000Z
|
2021-11-21T12:59:01.000Z
|
pyexplain/attach/links/admin.py
|
LucasMagnum/pyexplain
|
ca7a91df8519f576c21d5ede4b4f779fabfd5cbe
|
[
"MIT"
] | 1
|
2015-10-30T22:01:28.000Z
|
2015-11-03T23:07:52.000Z
|
pyexplain/attach/links/admin.py
|
LucasMagnum/pyexplain
|
ca7a91df8519f576c21d5ede4b4f779fabfd5cbe
|
[
"MIT"
] | 1
|
2015-12-18T12:53:59.000Z
|
2015-12-18T12:53:59.000Z
|
# coding: utf-8
from django.contrib import admin
from .models import Link
admin.site.register(Link)
| 12.875
| 32
| 0.76699
| 16
| 103
| 4.9375
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011364
| 0.145631
| 103
| 7
| 33
| 14.714286
| 0.886364
| 0.126214
| 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
|
2cf762680f07e4c1c3663e742528c1fc4c0666f3
| 195
|
py
|
Python
|
study/w3resource/exercises/python-basic/001 - 030/python-basic - 024.py
|
gustavomarquezinho/python
|
e36779aa5c4bfaf88c587f05db5bd447fd41e4a2
|
[
"MIT"
] | null | null | null |
study/w3resource/exercises/python-basic/001 - 030/python-basic - 024.py
|
gustavomarquezinho/python
|
e36779aa5c4bfaf88c587f05db5bd447fd41e4a2
|
[
"MIT"
] | null | null | null |
study/w3resource/exercises/python-basic/001 - 030/python-basic - 024.py
|
gustavomarquezinho/python
|
e36779aa5c4bfaf88c587f05db5bd447fd41e4a2
|
[
"MIT"
] | null | null | null |
# 024 - Write a Python program to test whether a passed letter is a vowel or not.
def vowelLetter(pLetter):
return pLetter.upper() in 'AEIOU'
print(vowelLetter('A'))
print(vowelLetter('B'))
| 27.857143
| 81
| 0.723077
| 30
| 195
| 4.7
| 0.766667
| 0.22695
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018293
| 0.158974
| 195
| 7
| 82
| 27.857143
| 0.841463
| 0.405128
| 0
| 0
| 0
| 0
| 0.06087
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0.25
| 0.5
| 0.5
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 1
|
0
| 5
|
fa00fc7d1639244400abb47ad56b197bfeb824fa
| 111
|
py
|
Python
|
python-lib/config/__init__.py
|
dataiku/dss-plugin-nlp-analysis
|
ff9dce56500dc8f28f83158afbdf7db01074ee38
|
[
"Apache-2.0"
] | 1
|
2021-03-12T10:45:53.000Z
|
2021-03-12T10:45:53.000Z
|
python-lib/config/__init__.py
|
dataiku/dss-plugin-nlp-analysis
|
ff9dce56500dc8f28f83158afbdf7db01074ee38
|
[
"Apache-2.0"
] | 22
|
2021-03-01T18:49:54.000Z
|
2021-06-08T15:16:30.000Z
|
python-lib/config/__init__.py
|
dataiku/dss-plugin-nlp-analysis
|
ff9dce56500dc8f28f83158afbdf7db01074ee38
|
[
"Apache-2.0"
] | 1
|
2021-02-22T15:19:43.000Z
|
2021-02-22T15:19:43.000Z
|
from .custom_check import CustomCheck
from .dku_config import DkuConfig
from .dss_parameter import DSSParameter
| 37
| 39
| 0.873874
| 15
| 111
| 6.266667
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.099099
| 111
| 3
| 39
| 37
| 0.94
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
fa329c14dcf078f8e9d094af4d2d65b3ce83883e
| 209
|
py
|
Python
|
venv/lib/python3.7/site-packages/allauth/socialaccount/providers/vimeo_oauth2/urls.py
|
vikram0207/django-rest
|
eafec575999dce6859dc7b99177cff339b2bcbdd
|
[
"MIT"
] | 6,342
|
2015-01-01T07:40:30.000Z
|
2022-03-31T04:18:30.000Z
|
venv/lib/python3.7/site-packages/allauth/socialaccount/providers/vimeo_oauth2/urls.py
|
vikram0207/django-rest
|
eafec575999dce6859dc7b99177cff339b2bcbdd
|
[
"MIT"
] | 2,198
|
2015-01-02T15:17:45.000Z
|
2022-03-28T10:20:43.000Z
|
venv/lib/python3.7/site-packages/allauth/socialaccount/providers/vimeo_oauth2/urls.py
|
vikram0207/django-rest
|
eafec575999dce6859dc7b99177cff339b2bcbdd
|
[
"MIT"
] | 2,928
|
2015-01-01T10:44:13.000Z
|
2022-03-31T03:20:16.000Z
|
"""URLs for Patreon Provider"""
from allauth.socialaccount.providers.oauth2.urls import default_urlpatterns
from .provider import VimeoOAuth2Provider
urlpatterns = default_urlpatterns(VimeoOAuth2Provider)
| 23.222222
| 75
| 0.842105
| 21
| 209
| 8.285714
| 0.619048
| 0.206897
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.015789
| 0.090909
| 209
| 8
| 76
| 26.125
| 0.9
| 0.119617
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 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
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
fa6f63f59a80ec1c268d5dedb22afe0021d126ae
| 83,183
|
py
|
Python
|
aula05_estruturas_condicionais(Gabriel).py
|
Glightman/estruturas-condicionais
|
c90958ee04797a65af58c6dcb08cc04e25b7801d
|
[
"MIT"
] | null | null | null |
aula05_estruturas_condicionais(Gabriel).py
|
Glightman/estruturas-condicionais
|
c90958ee04797a65af58c6dcb08cc04e25b7801d
|
[
"MIT"
] | null | null | null |
aula05_estruturas_condicionais(Gabriel).py
|
Glightman/estruturas-condicionais
|
c90958ee04797a65af58c6dcb08cc04e25b7801d
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# coding: utf-8
# # **Estruturas de controle condicionais**
#
# > São estruturas para controlar o fluxo do programa
#
# Vamos utilizar os famosos SE e SENÃO.
#
# Em Python a estrutura é bem simples, comparado a outras linguagens, mas antes considere esse fluxograma:
#
# 
#
# **Vamos transcrever ele em Python**
# In[ ]:
# SE em Python é if
# SENÃO em Python é else
n1 = float(input('Digite a primeira nota: '))
n2 = float(input('Digite a segunda nota: '))
media = (n1 + n2) / 2
if media >= 6: #Retornar True ou False
print(f'Aluno aprovado com a média: {media}')
else:
print(f'Aluno reprovado com a média: {media}')
print('Fim do programa!')
# # **Exercícios**
# ## Exercício 01
#
# Faça um programa que pergunte ao usuário um número e valide se o numero é par ou impar:
#
# * Crie uma variável para receber o valor, com conversão para int
# * Para um número ser par, a divisão dele por 2 tem que dar resto 0
# In[ ]:
# Resposta
numero = int(input('Digite o numero: '))
if numero % 2 == 0:
print('Numero par')
else:
print('Numero impar')
# ## Exercício 02
#
# > Parte 1
#
# Faça um script que peça um valor e mostre na tela se o valor é positivo ou negativo.
#
# > Parte 2
#
# Agora implemente a funcionalidade de não aceitar o número 0, no input.
# In[ ]:
# Resposta Parte 1
valor = int(input('Valor: '))
if valor > 0:
print('Valor positivo')
else:
print('Valor negativo')
# In[ ]:
# Resposta Parte 2
valor = int(input('Digite o valor: '))
if valor == 0:
print('Número inválido!')
else:
if valor > 0:
print('Numero positivo')
else:
print('Numero negativo')
print('Programa finalizado!')
# # **IF aninhado**
#
# Nesse último exercício a gente precisou utilizar dois if e else para resolver nosso problema, isso se chama If aninhado, vamos continuar treinando esse tipo de if com os exercícios abaixo:
# # **Exercícios**
# ## Exercício 03
#
# Faça um programa que peça dois números, imprima o maior deles ou imprima "Numeros iguais" se os números forem iguais.
# In[ ]:
num1 = int(input('Digite o primeiro numero: '))
num2 = int(input('Digite o segundo numero: '))
if num1 > num2:
print(f'O numero {num1} é o maior')
else:
if num1 == num2:
print("Os numeros são iguais!")
else:
print(f'O numero {num2} é o maior')
# ## Exercício 04
#
# Crie um programa que verifique se uma letra digitada é "F" ou "M". Conforme a letra escrever: F - Feminino, M - Masculino, caso escreva outra letra: Sexo Inválido.
#
# In[ ]:
resposta = input('Digite M ou F: ').upper()
if resposta == 'M':
print('Masculino')
else:
if resposta == 'F':
print('Feminino')
else:
print('Você não digitou as letras correta!')
# # **ELIF**
#
# > O If serve para verificar uma condição e o elif serve para verificar outra condição caso a condição do If seja falsa. No código não há muita diferença, o elif vai garantir que aquela condição seja verificada caso o If seja falso, diferente dos dois If que são 'fluxos' independentes.
#
# Vamos refazer o exemplo da média adicionando a condição de "Aluno em recuperação"
# In[ ]:
n1 = float(input('Digite a primeira nota: '))
n2 = float(input('Digite a segunda nota: '))
media = (n1 + n2) / 2
if media >= 6:
print(f'Aluno aprovado com a média {media}')
elif media >= 4 and media < 6:
print(f'Aluno está de recuperação com a média {media}')
else:
print(f'Aluno reprovado com a média {media}')
# # **Exercícios**
# ## Exercício 05
#
# Crie um programa em Python que peça a nota do aluno, que deve ser um float entre 0.00 e 10.0
#
# * Se a nota for menor que 6.0, deve exibir a nota F.
#
# * Se a nota for de 6.0 até 7.0, deve exibir a nota D.
#
# * Se a nota for entre 7.0 e 8.0, deve exibir a nota C.
#
# * Se a nota for entre 8.0 e 9.0, deve exibir a nota B.
#
# * Por fim, se for entre 9.0 e 10.0, deve exibir um belo de um A.
# In[ ]:
nota = float(input('Qual a nota [0.0 - 10.00]: '))
if nota >= 0 and nota <= 10:
if nota < 6:
print('Nota F')
elif nota < 7:
print('Nota D')
elif nota < 8:
print('Nota C')
elif nota < 9:
print('Nota B')
else:
print('Nota A')
else:
print('Nota inválida!')
# # *Projetos*
# ## **PROJETO 01**
#
# * Escreva um programa que receba uma string digitada pelo usuário;
# * Caso a string seja "medieval", exiba no console "espada";
# * Caso contrário, se a string for "futurista", exiba no console "sabre de luz";
# * Caso contrário, exiba no console "Tente novamente"
# In[ ]:
# Resposta:
arma = input('Que tipo de arma vc quer usar? Medieval ou Futurista?').upper()
if arma == ('MEDIEVAL'):
print ('Você usará uma ESPADA como arma. BOA SORTE!')
else:
if arma == ('FUTURISTA'):
print ('Você usará um SABRE DE LUZ como arma. BOA SORTE!')
else:
print('Você digitou uma opção inválida :[. TENTE DE NOVO!')
# ## **PROJETO 02**
#
# * Escreva um programa que receba um ataque de espada ou sabre digitada pelo usuário;
#
# * Caso o ataque seja "espada", exiba no console "VOCÊ AINDA NÃO MATOU O CHEFÃO";
#
# * Caso contrário, se o ataque for "sabre", exiba no console "VOCÊ DERROTOU O CHEFÃO COM O SABRE DE LUZ";
#
# * Caso contrário, exiba no console "ATAQUE NOVAMENTE"
# In[ ]:
# Resposta:
arma = input('Qual arma vc quer usar? Espada ou Sabre de Luz?').upper()
if arma == ('ESPADA'):
print ('VOCÊ AINDA NÃO MATOU O CHEFÃO :[')
else:
if arma == ('SABRE DE LUZ'):
print ('VOCÊ DERROTOU O CHEFÃO COM O SABRE DE LUZ')
else:
print('ATAQUE NOVAMENTE')
# ## **PROJETO 03 - DESAFIO**
#
# As empresas @.com resolveram dar um aumento de salário aos seus colaboradores e lhe contrataram para desenvolver o programa que calculará os reajustes.
#
# Faça um programa que recebe o salário de um colaborador e o reajuste segundo o seguinte critério, baseado no salário atual:
# * salários até R$ 280,00 (incluindo) : aumento de 20%
#
# * salários entre R\$ 280,00 e R$ 700,00 : aumento de 15%
#
# * salários entre R\$ 700,00 e R$ 1500,00 : aumento de 10%
#
# * salários de R$ 1500,00 em diante : aumento de 5%
#
# Após o aumento ser realizado, informe na tela:
# * o salário antes do reajuste;
#
# * o percentual de aumento aplicado;
#
# * o valor do aumento;
#
# * o novo salário, após o aumento."
# In[11]:
# Resposta:
salário = float(input('Digite o valor do seu salário:'))
if salário <= 280:
percent1 = 20/100
cal1 = salário*percent1
n1 = salário+cal1
print(f'Seu salário antes do reajuste é: R${salário}')
print('o percentual de aumento aplicado foi de 20%')
print(f'o valor do aumento foi de: R${cal1}')
print(f'o novo salário, após o aumento será de: R${n1}')
else:
if salário > 280 and salário <= 700:
percent2 = 15/100
cal2 = salário*percent2
n2 = salário+cal2
print(f'Seu salário antes do reajuste é: R${salário}')
print('o percentual de aumento aplicado foi de 15%')
print(f'o valor do aumento foi de: R${cal2}')
print(f'o novo salário, após o aumento será de: R${n2}')
else:
if salário > 700 and salário <= 1500:
percent3 = 10/100
cal3 = salário*percent3
n3 = salário+cal3
print(f'Seu salário antes do reajuste é: R${salário}')
print('o percentual de aumento aplicado foi de 10%')
print(f'o valor do aumento foi de: R${cal3}')
print(f'o novo salário, após o aumento será de: R${n3}')
else:
if salário > 1500:
percent4 = 5/100
cal4 = salário*percent4
n4 = salário+cal4
print(f'Seu salário antes do reajuste é: R${salário}')
print('o percentual de aumento aplicado foi de 5%')
print(f'o valor do aumento foi de: R${cal4}')
print(f'o novo salário, após o aumento será de: R${n4}')
# ## **PROJETO 04 - DESAFIO**
#
# Faça um Programa para um caixa eletrônico. O programa deverá perguntar ao usuário a valor do saque e depois informar quantas notas de cada valor serão fornecidas. As notas disponíveis serão as de 1, 5, 10, 50 e 100 reais. O valor mínimo é de 10 reais e o máximo de 600 reais. O programa não deve se preocupar com a quantidade de notas existentes na máquina.
#
# * Exemplo 1: Para sacar a quantia de 256 reais, o programa fornece duas notas de 100, uma nota de 50, uma nota de 5 e uma nota de 1;
#
# * Exemplo 2: Para sacar a quantia de 399 reais, o programa fornece três notas de 100, uma nota de 50, quatro notas de 10, uma nota de 5 e quatro notas de 1.
# In[9]:
#ORIGINAL
print('As notas disponíveis são: 1, 5, 10, 50 e 100')
print('Valor minimo: R$ 10. Valor máximo: R$ 600.')
valor = int(input('Valor do saque: R$ '))
if valor == 600:
print('6 notas de R$ 100')
elif valor < 600 and valor >= 100:
cal1 = valor//100
resto1 = valor%100
if resto1 == 0:
print(f'{cal1} nota(s) de R$ 100')
else:
cal2 = resto1//50
resto2 = resto1%50
if resto2 == 0:
print(f'{cal1} nota(s) de R$ 100')
print(f'{cal2} nota(s) de R$ 50')
else:
cal3 = resto2//10
resto3 = resto2%10
if resto3 == 0:
print(f'{cal1} nota(s) de R$ 100')
if cal2 >0:
print(f'{cal2} nota(s) de R$ 50')
print(f'{cal3} nota(s) de R$ 10')
else:
cal4 = resto3//5
resto4 = resto3%5
if resto4 == 0:
print(f'{cal1} nota(s) de R$ 100')
print(f'{cal2} nota(s) de R$ 50')
print(f'{cal3} nota(s) de R$ 10')
print(f'{cal4} nota(s) de R$ 5')
else:
cal5 = resto4//1
resto5 = resto4%1
if resto5 == 0:
print(f'{cal1} nota(s) de R$ 100')
if cal2>0:
print(f'{cal2} nota(s) de R$ 50')
if cal3 >0:
print(f'{cal3} nota(s) de R$ 10')
if cal4 >0:
print(f'{cal4} nota(s) de R$ 5')
if cal5>0:
print(f'{cal5} nota(s) de R$ 1')
elif valor < 100 and valor >= 50:
cal1 = valor//50
resto1 = valor%50
if resto1 == 0:
print(f'{cal1} nota(s) de 50 R$')
else:
cal2 = resto1//10
resto2 = resto1%10
if resto2 == 0:
print(f'{cal1} nota(s) de R$ 50')
print(f'{cal2} nota(s) de R$ 10')
else:
cal3 = resto2//5
resto3 = resto2%5
if resto3 == 0:
print(f'{cal1} nota(s) de R$ 50')
print(f'{cal2} nota(s) de R$ 10')
print(f'{cal3} nota(s) de R$ 5')
else:
cal4 = resto3//1
resto4 = resto3%1
if resto4 == 0:
print(f'{cal1} nota(s) de R$ 50')
if cal2 >0:
print(f'{cal2} nota(s) de R$ 10')
if cal3 >0:
print(f'{cal3} nota(s) de R$ 5')
if cal4>0:
print(f'{cal4} nota(s) de R$ 1')
elif valor <50 and valor >= 10:
cal1 = valor//10
resto1 = valor%10
if resto1 == 0:
print(f'{cal1} nota(s) de R$ 10')
else:
cal2 = resto1//5
resto2 = resto1%5
if resto2 == 0:
print(f'{cal1} nota(s) de R$ 10')
print(f'{cal2} nota(s) de R$ 5')
else:
cal3 = resto2//1
resto3 = resto2%1
if resto3 == 0:
print(f'{cal1} nota(s) de R$ 10')
if cal2 >0:
print(f'{cal2} nota(s) de R$ 5')
if cal3 >0:
print(f'{cal3} nota(s) de R$ 1')
elif valor <10 and valor >=5:
cal1 = valor//5
resto1 = valor%5
if resto1 == 0:
print(f'{cal1} nota(s) de R$ 5')
else:
cal2 = resto1//1
resto2 = resto1%1
if resto2 == 0:
print(f'{cal1} nota(s) de R$ 5')
print(f'{cal2} nota(s) de R$ 1')
# In[ ]:
| 189.482916
| 70,945
| 0.912374
| 3,837
| 83,183
| 19.779515
| 0.529841
| 0.00419
| 0.003136
| 0.003479
| 0.224919
| 0.211822
| 0.210214
| 0.195496
| 0.193125
| 0.190318
| 0
| 0.130046
| 0.044709
| 83,183
| 438
| 70,946
| 189.915525
| 0.825028
| 0.905065
| 0
| 0.419643
| 0
| 0
| 0.345776
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.379464
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
d7077d0304168b676f15ed5545300f9a46769448
| 78
|
py
|
Python
|
xbout/tests/test_init.py
|
BuildJet/xBOUT
|
523a78c8fa62cc390cfb9e434fc152c51ba9db7c
|
[
"Apache-2.0"
] | 15
|
2018-12-08T15:57:58.000Z
|
2022-03-22T11:40:25.000Z
|
xbout/tests/test_init.py
|
BuildJet/xBOUT
|
523a78c8fa62cc390cfb9e434fc152c51ba9db7c
|
[
"Apache-2.0"
] | 210
|
2018-12-07T19:12:14.000Z
|
2022-03-28T13:06:05.000Z
|
xbout/tests/test_init.py
|
BuildJet/xBOUT
|
523a78c8fa62cc390cfb9e434fc152c51ba9db7c
|
[
"Apache-2.0"
] | 13
|
2019-02-12T14:39:19.000Z
|
2021-09-07T18:54:30.000Z
|
def test_version():
from xbout import __version__
assert __version__
| 15.6
| 33
| 0.74359
| 9
| 78
| 5.444444
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.217949
| 78
| 4
| 34
| 19.5
| 0.803279
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0.333333
| 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
| 1
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
d7158befb6b8f0814dcdec3a0ddb26a48d1b1698
| 15
|
py
|
Python
|
AHS/__init__.py
|
yujunjiex/AHSSpider
|
be233dfef5478a56652426974a8f96500542c7c0
|
[
"MIT"
] | 6
|
2019-09-30T13:13:31.000Z
|
2021-09-27T00:28:17.000Z
|
AHS/loggers/__init__.py
|
yujunjiex/AHSSpider
|
be233dfef5478a56652426974a8f96500542c7c0
|
[
"MIT"
] | 2
|
2021-03-24T09:16:29.000Z
|
2021-12-13T20:18:35.000Z
|
AHS/loggers/__init__.py
|
yujunjiex/AHSSpider
|
be233dfef5478a56652426974a8f96500542c7c0
|
[
"MIT"
] | 2
|
2019-11-22T03:25:17.000Z
|
2021-09-27T00:28:19.000Z
|
# coding: UTF-8
| 15
| 15
| 0.666667
| 3
| 15
| 3.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.076923
| 0.133333
| 15
| 1
| 15
| 15
| 0.692308
| 0.866667
| 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
|
d7404e0c3b2e5756d6a15d90cd99d382c9811ae8
| 24,652
|
py
|
Python
|
src/transbigdata/tests/test_busdata.py
|
cirno1w/transport
|
f088b4111992dd5ec6371db71cf1d26689cf8c26
|
[
"BSD-3-Clause"
] | 1
|
2022-03-06T00:15:19.000Z
|
2022-03-06T00:15:19.000Z
|
src/transbigdata/tests/test_busdata.py
|
anitagraser/transbigdata
|
0eb972c78f9154c0a3f780f197ef9af406b2bb71
|
[
"BSD-3-Clause"
] | null | null | null |
src/transbigdata/tests/test_busdata.py
|
anitagraser/transbigdata
|
0eb972c78f9154c0a3f780f197ef9af406b2bb71
|
[
"BSD-3-Clause"
] | null | null | null |
import transbigdata as tbd
import numpy as np
import pandas as pd
import geopandas as gpd
from shapely.geometry import Polygon
class TestBikedata:
def setup_method(self):
self.data = pd.DataFrame([['沪D-R7103', '2019-01-16 23:59:59', 121.3308582912764,
31.175129076427655],
['沪D-R7103', '2019-01-17 12:40:20', 121.33049311941906,
31.175065802450753],
['沪D-R7103', '2019-01-17 13:05:32', 121.33049311941906,
31.175065802450753],
['沪D-R7103', '2019-01-17 13:05:52', 121.33036738445367,
31.175279932303557],
['沪D-R7103', '2019-01-17 13:06:07', 121.32967297800323,
31.17497940724048],
['沪D-R7103', '2019-01-17 13:06:22', 121.33008305045536,
31.174995618170627],
['沪D-R7103', '2019-01-17 13:06:42', 121.33029256851628,
31.17510216522793],
['沪D-R7103', '2019-01-17 16:24:05', 121.33029256851628,
31.17510216522793],
['沪D-R7103', '2019-01-17 16:24:30', 121.33093714049436,
31.174819084849073],
['沪D-R7103', '2019-01-17 16:25:00', 121.33119656323854,
31.174744630573823],
['沪D-R7103', '2019-01-17 16:25:35', 121.3313133039642,
31.17470742816974],
['沪D-R7103', '2019-01-17 16:34:29', 121.3313133039642,
31.17470742816974],
['沪D-R7103', '2019-01-17 16:34:54', 121.33121258219445,
31.17410692572959],
['沪D-R7103', '2019-01-17 16:35:20', 121.32927503207796,
31.173189080128747],
['沪D-R7103', '2019-01-17 16:35:45', 121.32774259804339,
31.17211555668083],
['沪D-R7103', '2019-01-17 16:36:05', 121.32828742144076,
31.171421870458047],
['沪D-R7103', '2019-01-17 16:36:35', 121.32889308056538,
31.171053902452424],
['沪D-R7103', '2019-01-17 16:37:00', 121.33147515535293,
31.172212396845183],
['沪D-R7103', '2019-01-17 16:37:25', 121.33256465354401,
31.17289898466245],
['沪D-R7103', '2019-01-17 16:38:35', 121.33256465354401,
31.17289898466245],
['沪D-R7103', '2019-01-17 16:39:01', 121.33345761253085,
31.17344502270766],
['沪D-R7103', '2019-01-17 16:39:21', 121.33442839412734,
31.17413784648959],
['沪D-R7103', '2019-01-17 16:39:46', 121.33490830097844,
31.17448277252849],
['沪D-R7103', '2019-01-17 16:40:12', 121.33624028223001,
31.175424811168998],
['沪D-R7103', '2019-01-17 16:40:42', 121.33855210267679,
31.176992750548038],
['沪D-R7103', '2019-01-17 16:41:07', 121.33912682562804,
31.177395495654412],
['沪D-R7103', '2019-01-17 16:41:12', 121.33912682562804,
31.177395495654412],
['沪D-R7103', '2019-01-17 16:41:32', 121.33984722140025,
31.178022866403307],
['沪D-R7103', '2019-01-17 16:41:57', 121.34230283289175,
31.17997546117461],
['沪D-R7103', '2019-01-17 16:42:17', 121.34406503104313,
31.18139063132967],
['沪D-R7103', '2019-01-17 16:42:37', 121.34565267426674,
31.182475320933605],
['沪D-R7103', '2019-01-17 16:43:03', 121.34695897571785,
31.183092769036772],
['沪D-R7103', '2019-01-17 16:44:13', 121.34695897571785,
31.183092769036772],
['沪D-R7103', '2019-01-17 16:44:38', 121.34771044680997,
31.183373352784702],
['沪D-R7103', '2019-01-17 16:44:58', 121.34986914233515,
31.18401142963308],
['沪D-R7103', '2019-01-17 16:45:24', 121.35271164978475,
31.184866403422394],
['沪D-R7103', '2019-01-17 16:45:44', 121.35296916183509,
31.18495395177752],
['沪D-R7103', '2019-01-17 16:46:50', 121.35296916183509,
31.18495395177752],
['沪D-R7103', '2019-01-17 16:47:10', 121.35310590274719,
31.185008708410415],
['沪D-R7103', '2019-01-17 16:47:35', 121.35506825574805,
31.185636343326177],
['沪D-R7103', '2019-01-17 16:47:55', 121.35622514959864,
31.186098356723118],
['沪D-R7103', '2019-01-17 16:48:16', 121.35660148846878,
31.1860708068457],
['沪D-R7103', '2019-01-17 16:48:46', 121.3605496684798,
31.18750939452662],
['沪D-R7103', '2019-01-17 16:49:06', 121.36308454783347,
31.188574433939618],
['沪D-R7103', '2019-01-17 16:49:27', 121.36374253432413,
31.18862454957953],
['沪D-R7103', '2019-01-17 16:49:47', 121.36475999015713,
31.188787165079752],
['沪D-R7103', '2019-01-17 16:50:12', 121.36528119368472,
31.189100353278842],
['沪D-R7103', '2019-01-17 16:50:32', 121.36799531701536,
31.189494880357508],
['沪D-R7103', '2019-01-17 16:51:03', 121.37051893150148,
31.19027066127662],
['沪D-R7103', '2019-01-17 16:51:43', 121.37233468156712,
31.190505638967373]], columns=['VehicleId', 'GPSDateTime', 'lon', 'lat'])
self.line = gpd.read_file('{"type": "FeatureCollection", "features": [{"id": "0", "type": "Feature", "properties": {"Id": 0, "name": "71\\u8def(\\u5ef6\\u5b89\\u4e1c\\u8def\\u5916\\u6ee9-\\u7533\\u6606\\u8def\\u67a2\\u7ebd\\u7ad9)"}, "geometry": {"type": "LineString", "coordinates": [[121.48680833406775, 31.23479712221373, 0.0], [121.48654212047136, 31.234694676029786, 0.0], [121.48640321578763, 31.2344335165597, 0.0], [121.48620424418269, 31.234332091432126, 0.0], [121.48570963449876, 31.23407338399259, 0.0], [121.48520746843946, 31.233845822266794, 0.0], [121.48473939391056, 31.23371324838625, 0.0], [121.48435071992188, 31.233602809110284, 0.0], [121.48382747488549, 31.233252131305267, 0.0], [121.48358667235713, 31.23313436404436, 0.0], [121.4830110244368, 31.233081954943895, 0.0], [121.48159212474732, 31.233197283736708, 0.0], [121.48081840120713, 31.233175997627082, 0.0], [121.48046555948812, 31.233141592052398, 0.0], [121.4792684569557, 31.23294431959499, 0.0], [121.47728773381367, 31.23219022228969, 0.0], [121.47650938696911, 31.23182638081955, 0.0], [121.47615549794644, 31.231646740130707, 0.0], [121.47467923815317, 31.230790112644126, 0.0], [121.47396374247927, 31.23041805989505, 0.0], [121.4723546525761, 31.22946394254198, 0.0], [121.4718447208883, 31.22916120530873, 0.0], [121.47162507708418, 31.229063043002803, 0.0], [121.46971148882133, 31.228210311091555, 0.0], [121.46934522194101, 31.22804592028437, 0.0], [121.46895218140925, 31.22786892438538, 0.0], [121.46659610091696, 31.226897254621516, 0.0], [121.4649631794914, 31.226282609517412, 0.0], [121.46414113119387, 31.226039232240876, 0.0], [121.46346858001557, 31.225907738094904, 0.0], [121.4632085414404, 31.22585738171055, 0.0], [121.46201595667192, 31.22581602366564, 0.0], [121.46012337207506, 31.22589498094655, 0.0], [121.45964966243406, 31.225915179689988, 0.0], [121.45916931421996, 31.225933771603817, 0.0], [121.4584299334602, 31.225930994026747, 0.0], [121.45670394588448, 31.225917687177848, 0.0], [121.4562159201628, 31.225940340782877, 0.0], [121.45501414547563, 31.225896830409198, 0.0], [121.45313994909115, 31.225877546623256, 0.0], [121.45198747372488, 31.22586577680014, 0.0], [121.45067409831796, 31.225764124081973, 0.0], [121.45013850323112, 31.225696215249084, 0.0], [121.44963708616434, 31.22557417609614, 0.0], [121.44901469032412, 31.225393738760786, 0.0], [121.44838360085095, 31.22514849979612, 0.0], [121.44733265578334, 31.224768283214516, 0.0], [121.44611255033824, 31.22427423667348, 0.0], [121.44522256893964, 31.22391460749898, 0.0], [121.44452308747704, 31.22366370977997, 0.0], [121.44330864322482, 31.223290418495207, 0.0], [121.44112481042458, 31.22284394379711, 0.0], [121.43995086003079, 31.22265595116455, 0.0], [121.43965682754218, 31.22253773889234, 0.0], [121.43945583227031, 31.22246385732158, 0.0], [121.4377312910728, 31.22154875294891, 0.0], [121.43731636796971, 31.221405388725636, 0.0], [121.43603949285581, 31.221201287427256, 0.0], [121.43544581995262, 31.221071991941535, 0.0], [121.4348990684986, 31.22088608524194, 0.0], [121.43467425490213, 31.22071853108778, 0.0], [121.43383491280504, 31.219963604435318, 0.0], [121.43326810046672, 31.21956834228496, 0.0], [121.43271638663167, 31.21918489418819, 0.0], [121.4316242046651, 31.218552154482637, 0.0], [121.4308966230824, 31.21807088028686, 0.0], [121.42957690517412, 31.216984930602006, 0.0], [121.4287944923989, 31.2164177309201, 0.0], [121.42754314953099, 31.21585282823901, 0.0], [121.42734229008948, 31.21574291740339, 0.0], [121.42697681035582, 31.21554354789749, 0.0], [121.4262466534029, 31.214981151520842, 0.0], [121.42558822887514, 31.214198238106412, 0.0], [121.42498521028006, 31.213265073587262, 0.0], [121.42483922435368, 31.21309406726119, 0.0], [121.42458790302874, 31.212812951144944, 0.0], [121.42418302050427, 31.21257030804461, 0.0], [121.42380162839086, 31.212413702711984, 0.0], [121.42260278406569, 31.212177678103608, 0.0], [121.42175472319029, 31.21201013082237, 0.0], [121.41921253702968, 31.211508499065935, 0.0], [121.4187520573609, 31.21141803206741, 0.0], [121.4177502886381, 31.211121267547774, 0.0], [121.41536255685529, 31.210488005340114, 0.0], [121.41055823761425, 31.209352239123884, 0.0], [121.41006286819932, 31.209240779911678, 0.0], [121.408752749836, 31.208764570795754, 0.0], [121.40792185625311, 31.208235633945765, 0.0], [121.40689238792147, 31.207375895820764, 0.0], [121.40644113863621, 31.207040030048116, 0.0], [121.40335924078863, 31.204750029737966, 0.0], [121.4031127555595, 31.20460193270769, 0.0], [121.40268724211523, 31.20434458544406, 0.0], [121.40242295664385, 31.204185568754575, 0.0], [121.40191716595808, 31.203915584462763, 0.0], [121.40060518142528, 31.20337304738282, 0.0], [121.39968316268123, 31.20311153188489, 0.0], [121.39933123295673, 31.203012464510756, 0.0], [121.39873589558302, 31.202852168932246, 0.0], [121.39577650199107, 31.20205852958135, 0.0], [121.39509665023105, 31.201877658368137, 0.0], [121.39441015274966, 31.201649190619534, 0.0], [121.3940099837958, 31.201595740961917, 0.0], [121.3937718338187, 31.201482267093606, 0.0], [121.39298554970689, 31.200972737710618, 0.0], [121.3921855673392, 31.200597019045237, 0.0], [121.39026247388, 31.199540859206092, 0.0], [121.38996352795702, 31.199361005226017, 0.0], [121.38973187287756, 31.19922188072922, 0.0], [121.3882033554104, 31.198303687682014, 0.0], [121.3873974991391, 31.19781975360552, 0.0], [121.3868071526136, 31.197468809667487, 0.0], [121.38530162233323, 31.19657311156674, 0.0], [121.38431896985206, 31.195989530430772, 0.0], [121.38370690194671, 31.195624736822428, 0.0], [121.38335723534193, 31.195416964809528, 0.0], [121.38282183665989, 31.195098846977537, 0.0], [121.38238950410006, 31.194841400301573, 0.0], [121.38116048667693, 31.194107916831754, 0.0], [121.37956513571578, 31.19315746376731, 0.0], [121.37895990223895, 31.19287560196964, 0.0], [121.3772327786018, 31.192109490422816, 0.0], [121.37638770701506, 31.19173548103986, 0.0], [121.37596314767956, 31.191593924088796, 0.0], [121.37533303364798, 31.19138224863976, 0.0], [121.37441403604866, 31.191075411329503, 0.0], [121.37390440707601, 31.19090497257139, 0.0], [121.37350823172538, 31.190772731116017, 0.0], [121.37289122488428, 31.19056616016392, 0.0], [121.37263384980437, 31.19048039724518, 0.0], [121.37177233442036, 31.190207377985715, 0.0], [121.37015676569357, 31.189696531392993, 0.0], [121.36866289419575, 31.189225060507134, 0.0], [121.36805301851211, 31.18903196337387, 0.0], [121.36741267528593, 31.18882949729654, 0.0], [121.36713568710604, 31.18874130190273, 0.0], [121.36545918023688, 31.188211731534693, 0.0], [121.36427592822677, 31.187837451059956, 0.0], [121.36348112963613, 31.187594245160383, 0.0], [121.35960127617719, 31.186410680311965, 0.0], [121.35810148825273, 31.185993102692862, 0.0], [121.35784282994241, 31.18592152968835, 0.0], [121.35756087542264, 31.18581898477854, 0.0], [121.35565082386277, 31.185124726907542, 0.0], [121.35530640152558, 31.1849626468292, 0.0], [121.35428047015459, 31.184510732410818, 0.0], [121.35317311540628, 31.1840935443074, 0.0], [121.3527491330305, 31.183934015897815, 0.0], [121.35172236895487, 31.18362994201332, 0.0], [121.35142551117141, 31.183542155343932, 0.0], [121.34892765280848, 31.182803307385363, 0.0], [121.3484304605845, 31.182656931034103, 0.0], [121.34803300048519, 31.182538890449415, 0.0], [121.34749112698373, 31.182378726523886, 0.0], [121.34687421145703, 31.182194224406967, 0.0], [121.34614413837573, 31.181922018971626, 0.0], [121.34534688607388, 31.181573091491334, 0.0], [121.34494250164147, 31.181346816658316, 0.0], [121.34415808853373, 31.18090773418931, 0.0], [121.34366146976991, 31.180529650875503, 0.0], [121.34296025184004, 31.17999571895842, 0.0], [121.34219840514724, 31.179416525263225, 0.0], [121.34192201654791, 31.179206100416227, 0.0], [121.34143955204493, 31.17883883921868, 0.0], [121.33937970212246, 31.177271930382528, 0.0], [121.3390253936204, 31.176999658284107, 0.0], [121.33873935903235, 31.17678044295161, 0.0], [121.33831308857619, 31.17648439328463, 0.0], [121.33753628037235, 31.17594366146003, 0.0], [121.33604789800422, 31.17497203682833, 0.0], [121.33495675278324, 31.174259650219373, 0.0], [121.33462195194231, 31.174037199940333, 0.0], [121.33270025695657, 31.172760813025707, 0.0], [121.33118423301782, 31.171754317896283, 0.0], [121.32987961299621, 31.171128931445935, 0.0], [121.32936757297823, 31.170915817469155, 0.0], [121.32871072365552, 31.170641854595385, 0.0], [121.32808295962585, 31.170381012393694, 0.0], [121.32694229666748, 31.171535181527215, 0.0], [121.32949486297333, 31.1727777609417, 0.0]]}}]}')
self.stop = gpd.read_file('{"type": "FeatureCollection", "features": [{"id": "0", "type": "Feature", "properties": {"lat": 31.232760281, "linename": "71\\u8def(\\u5ef6\\u5b89\\u4e1c\\u8def\\u5916\\u6ee9-\\u7533\\u6606\\u8def\\u67a2\\u7ebd\\u7ad9)", "lon": 121.483251722, "stopname": "\\u5ef6\\u5b89\\u4e1c\\u8def\\u5916\\u6ee9"}, "geometry": {"type": "Point", "coordinates": [121.48688469316784, 31.23484102475723]}}, {"id": "1", "type": "Feature", "properties": {"lat": 31.228843235, "linename": "71\\u8def(\\u5ef6\\u5b89\\u4e1c\\u8def\\u5916\\u6ee9-\\u7533\\u6606\\u8def\\u67a2\\u7ebd\\u7ad9)", "lon": 121.471204173, "stopname": "\\u897f\\u85cf\\u4e2d\\u8def"}, "geometry": {"type": "Point", "coordinates": [121.47468505225578, 31.230783624070586]}}, {"id": "2", "type": "Feature", "properties": {"lat": 31.2262890815, "linename": "71\\u8def(\\u5ef6\\u5b89\\u4e1c\\u8def\\u5916\\u6ee9-\\u7533\\u6606\\u8def\\u67a2\\u7ebd\\u7ad9)", "lon": 121.46620721, "stopname": "\\u9ec4\\u9642\\u5317\\u8def"}, "geometry": {"type": "Point", "coordinates": [121.46970615320824, 31.22822013538774]}}, {"id": "3", "type": "Feature", "properties": {"lat": 31.2241692712, "linename": "71\\u8def(\\u5ef6\\u5b89\\u4e1c\\u8def\\u5916\\u6ee9-\\u7533\\u6606\\u8def\\u67a2\\u7ebd\\u7ad9)", "lon": 121.460679191, "stopname": "\\u6210\\u90fd\\u5317\\u8def"}, "geometry": {"type": "Point", "coordinates": [121.46413649158545, 31.226052872297608]}}, {"id": "4", "type": "Feature", "properties": {"lat": 31.2242450755, "linename": "71\\u8def(\\u5ef6\\u5b89\\u4e1c\\u8def\\u5916\\u6ee9-\\u7533\\u6606\\u8def\\u67a2\\u7ebd\\u7ad9)", "lon": 121.453549153, "stopname": "\\u8302\\u540d\\u5317\\u8def"}, "geometry": {"type": "Point", "coordinates": [121.45670741736707, 31.225919681700777]}}, {"id": "5", "type": "Feature", "properties": {"lat": 31.2236712033, "linename": "71\\u8def(\\u5ef6\\u5b89\\u4e1c\\u8def\\u5916\\u6ee9-\\u7533\\u6606\\u8def\\u67a2\\u7ebd\\u7ad9)", "lon": 121.445507471, "stopname": "\\u4e0a\\u6d77\\u5c55\\u89c8\\u4e2d\\u5fc3"}, "geometry": {"type": "Point", "coordinates": [121.44838602968272, 31.2251447687407]}}, {"id": "6", "type": "Feature", "properties": {"lat": 31.2218815305, "linename": "71\\u8def(\\u5ef6\\u5b89\\u4e1c\\u8def\\u5916\\u6ee9-\\u7533\\u6606\\u8def\\u67a2\\u7ebd\\u7ad9)", "lon": 121.440473777, "stopname": "\\u5e38\\u5fb7\\u8def"}, "geometry": {"type": "Point", "coordinates": [121.44330213951724, 31.22330447998906]}}, {"id": "7", "type": "Feature", "properties": {"lat": 31.221176291, "linename": "71\\u8def(\\u5ef6\\u5b89\\u4e1c\\u8def\\u5916\\u6ee9-\\u7533\\u6606\\u8def\\u67a2\\u7ebd\\u7ad9)", "lon": 121.436915266, "stopname": "\\u534e\\u5c71\\u8def"}, "geometry": {"type": "Point", "coordinates": [121.4396592559502, 31.222534008422322]}}, {"id": "8", "type": "Feature", "properties": {"lat": 31.2182418106, "linename": "71\\u8def(\\u5ef6\\u5b89\\u4e1c\\u8def\\u5916\\u6ee9-\\u7533\\u6606\\u8def\\u67a2\\u7ebd\\u7ad9)", "lon": 121.430528141, "stopname": "\\u9547\\u5b81\\u8def"}, "geometry": {"type": "Point", "coordinates": [121.43326636585115, 31.219570192858782]}}, {"id": "9", "type": "Feature", "properties": {"lat": 31.2141768618, "linename": "71\\u8def(\\u5ef6\\u5b89\\u4e1c\\u8def\\u5916\\u6ee9-\\u7533\\u6606\\u8def\\u67a2\\u7ebd\\u7ad9)", "lon": 121.424153694, "stopname": "\\u6c5f\\u82cf\\u8def"}, "geometry": {"type": "Point", "coordinates": [121.4269853525943, 31.21553571707035]}}, {"id": "10", "type": "Feature", "properties": {"lat": 31.2116776284, "linename": "71\\u8def(\\u5ef6\\u5b89\\u4e1c\\u8def\\u5916\\u6ee9-\\u7533\\u6606\\u8def\\u67a2\\u7ebd\\u7ad9)", "lon": 121.421873542, "stopname": "\\u756a\\u79ba\\u8def"}, "geometry": {"type": "Point", "coordinates": [121.42482985887163, 31.213102348709608]}}, {"id": "11", "type": "Feature", "properties": {"lat": 31.2098105223, "linename": "71\\u8def(\\u5ef6\\u5b89\\u4e1c\\u8def\\u5916\\u6ee9-\\u7533\\u6606\\u8def\\u67a2\\u7ebd\\u7ad9)", "lon": 121.414911763, "stopname": "\\u5b9a\\u897f\\u8def"}, "geometry": {"type": "Point", "coordinates": [121.41774554724684, 31.21113323304618]}}, {"id": "12", "type": "Feature", "properties": {"lat": 31.208161334, "linename": "71\\u8def(\\u5ef6\\u5b89\\u4e1c\\u8def\\u5916\\u6ee9-\\u7533\\u6606\\u8def\\u67a2\\u7ebd\\u7ad9)", "lon": 121.40784817, "stopname": "\\u51ef\\u65cb\\u8def"}, "geometry": {"type": "Point", "coordinates": [121.41053622161131, 31.209367641295568]}}, {"id": "13", "type": "Feature", "properties": {"lat": 31.2017646283, "linename": "71\\u8def(\\u5ef6\\u5b89\\u4e1c\\u8def\\u5916\\u6ee9-\\u7533\\u6606\\u8def\\u67a2\\u7ebd\\u7ad9)", "lon": 121.396563628, "stopname": "\\u5a04\\u5c71\\u5173\\u8def"}, "geometry": {"type": "Point", "coordinates": [121.39934723279329, 31.202982794937725]}}, {"id": "14", "type": "Feature", "properties": {"lat": 31.1966784182, "linename": "71\\u8def(\\u5ef6\\u5b89\\u4e1c\\u8def\\u5916\\u6ee9-\\u7533\\u6606\\u8def\\u67a2\\u7ebd\\u7ad9)", "lon": 121.384656058, "stopname": "\\u6c34\\u57ce\\u5357\\u8def"}, "geometry": {"type": "Point", "coordinates": [121.38739524533014, 31.197821587877485]}}, {"id": "15", "type": "Feature", "properties": {"lat": 31.1939698263, "linename": "71\\u8def(\\u5ef6\\u5b89\\u4e1c\\u8def\\u5916\\u6ee9-\\u7533\\u6606\\u8def\\u67a2\\u7ebd\\u7ad9)", "lon": 121.380070188, "stopname": "\\u8679\\u8bb8\\u8def"}, "geometry": {"type": "Point", "coordinates": [121.38285770202909, 31.19512353567959]}}, {"id": "16", "type": "Feature", "properties": {"lat": 31.1917115341, "linename": "71\\u8def(\\u5ef6\\u5b89\\u4e1c\\u8def\\u5916\\u6ee9-\\u7533\\u6606\\u8def\\u67a2\\u7ebd\\u7ad9)", "lon": 121.376140027, "stopname": "\\u8679\\u6885\\u8def"}, "geometry": {"type": "Point", "coordinates": [121.37896345371097, 31.192870959745306]}}, {"id": "17", "type": "Feature", "properties": {"lat": 31.189365838, "linename": "71\\u8def(\\u5ef6\\u5b89\\u4e1c\\u8def\\u5916\\u6ee9-\\u7533\\u6606\\u8def\\u67a2\\u7ebd\\u7ad9)", "lon": 121.369870201, "stopname": "\\u5251\\u6cb3\\u8def"}, "geometry": {"type": "Point", "coordinates": [121.37264120880835, 31.1904682766765]}}, {"id": "18", "type": "Feature", "properties": {"lat": 31.1868269216, "linename": "71\\u8def(\\u5ef6\\u5b89\\u4e1c\\u8def\\u5916\\u6ee9-\\u7533\\u6606\\u8def\\u67a2\\u7ebd\\u7ad9)", "lon": 121.361545646, "stopname": "\\u8679\\u4e95\\u8def"}, "geometry": {"type": "Point", "coordinates": [121.36419682256896, 31.18782342514133]}}, {"id": "19", "type": "Feature", "properties": {"lat": 31.1840846357, "linename": "71\\u8def(\\u5ef6\\u5b89\\u4e1c\\u8def\\u5916\\u6ee9-\\u7533\\u6606\\u8def\\u67a2\\u7ebd\\u7ad9)", "lon": 121.352767681, "stopname": "\\u5916\\u73af\\u8def"}, "geometry": {"type": "Point", "coordinates": [121.35529817330725, 31.184972846336553]}}, {"id": "20", "type": "Feature", "properties": {"lat": 31.181572874, "linename": "71\\u8def(\\u5ef6\\u5b89\\u4e1c\\u8def\\u5916\\u6ee9-\\u7533\\u6606\\u8def\\u67a2\\u7ebd\\u7ad9)", "lon": 121.345073283, "stopname": "\\u822a\\u4e1c\\u8def"}, "geometry": {"type": "Point", "coordinates": [121.347507406901, 31.182371829399024]}}, {"id": "21", "type": "Feature", "properties": {"lat": 31.1764410431, "linename": "71\\u8def(\\u5ef6\\u5b89\\u4e1c\\u8def\\u5916\\u6ee9-\\u7533\\u6606\\u8def\\u67a2\\u7ebd\\u7ad9)", "lon": 121.336834516, "stopname": "\\u822a\\u65b0\\u8def"}, "geometry": {"type": "Point", "coordinates": [121.33937857556569, 31.177272847089057]}}, {"id": "22", "type": "Feature", "properties": {"lat": 31.1733903453, "linename": "71\\u8def(\\u5ef6\\u5b89\\u4e1c\\u8def\\u5916\\u6ee9-\\u7533\\u6606\\u8def\\u67a2\\u7ebd\\u7ad9)", "lon": 121.332337755, "stopname": "\\u5434\\u5b9d\\u8def"}, "geometry": {"type": "Point", "coordinates": [121.33496359737327, 31.174253204731254]}}, {"id": "23", "type": "Feature", "properties": {"lat": 31.1723921945, "linename": "71\\u8def(\\u5ef6\\u5b89\\u4e1c\\u8def\\u5916\\u6ee9-\\u7533\\u6606\\u8def\\u67a2\\u7ebd\\u7ad9)", "lon": 121.326950253, "stopname": "\\u7533\\u6606\\u8def\\u67a2\\u7ebd\\u7ad9"}, "geometry": {"type": "Point", "coordinates": [121.32944223863883, 31.17315254936537]}}]}')
def test_busgps_arriveinfo(self):
arriveinfo = tbd.busgps_arriveinfo(self.data, self.line, self.stop)
assert len(arriveinfo) == 9
assert len(tbd.busgps_arriveinfo(self.data, self.line, self.stop,method='dislimit'))==7
onewaytime = tbd.busgps_onewaytime(arriveinfo,
start='剑河路',
end='航新路', col=['VehicleId', 'stopname','arrivetime','leavetime'])
assert onewaytime['duration'].iloc[0] == 562.0
| 202.065574
| 8,650
| 0.60916
| 2,739
| 24,652
| 5.479737
| 0.263965
| 0.023986
| 0.059631
| 0.043307
| 0.343194
| 0.296622
| 0.250316
| 0.20008
| 0.196482
| 0.190752
| 0
| 0.572803
| 0.194873
| 24,652
| 121
| 8,651
| 203.735537
| 0.183394
| 0
| 0
| 0.119658
| 0
| 0.017094
| 0.733479
| 0.149243
| 0
| 0
| 0
| 0
| 0.025641
| 1
| 0.017094
| false
| 0
| 0.042735
| 0
| 0.068376
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
d75a2c9cec7a42cc207289931da5cd5d981ef86e
| 146
|
py
|
Python
|
Instructions/starter_code/api_keys.py
|
fmkaramloo/python-api-challenge
|
900271c220de9465ebfb6981fb51c322ac1c4367
|
[
"ADSL"
] | null | null | null |
Instructions/starter_code/api_keys.py
|
fmkaramloo/python-api-challenge
|
900271c220de9465ebfb6981fb51c322ac1c4367
|
[
"ADSL"
] | null | null | null |
Instructions/starter_code/api_keys.py
|
fmkaramloo/python-api-challenge
|
900271c220de9465ebfb6981fb51c322ac1c4367
|
[
"ADSL"
] | null | null | null |
# OpenWeatherMap API Key
weather_api_key = "972fc242a771ca44611f48d634a9e967"
# Google API Key
g_key = "AIzaSyCWD-Z7WINc53d-5orJ46Zg3qVZN1UK0ho"
| 24.333333
| 52
| 0.828767
| 15
| 146
| 7.866667
| 0.666667
| 0.152542
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.244275
| 0.10274
| 146
| 5
| 53
| 29.2
| 0.656489
| 0.253425
| 0
| 0
| 0
| 0
| 0.669811
| 0.669811
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
ad1233af780254c29cdd21eef490a1f4b6a8e71e
| 130
|
py
|
Python
|
helpers/IndexTools.py
|
GigliOneiric/ElliotWave
|
5d0fc166530a57132dce4e4c00ecb33cb8101aaa
|
[
"Apache-2.0"
] | null | null | null |
helpers/IndexTools.py
|
GigliOneiric/ElliotWave
|
5d0fc166530a57132dce4e4c00ecb33cb8101aaa
|
[
"Apache-2.0"
] | null | null | null |
helpers/IndexTools.py
|
GigliOneiric/ElliotWave
|
5d0fc166530a57132dce4e4c00ecb33cb8101aaa
|
[
"Apache-2.0"
] | null | null | null |
def last_index(pattern):
wave_list = pattern.wave_list
number_of_elements = len(wave_list)
return number_of_elements
| 21.666667
| 39
| 0.761538
| 19
| 130
| 4.789474
| 0.578947
| 0.263736
| 0.32967
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176923
| 130
| 5
| 40
| 26
| 0.850467
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
ad240b5b7da24b5a7e4b11b3b6042cba0965098e
| 72
|
py
|
Python
|
mistos-backend/src/app/api/napari_widgets.py
|
Maddonix/mistos_2
|
4bd9f45ad9e49f4178c0b8bb1a177d7db5349c34
|
[
"MIT"
] | 1
|
2021-03-22T10:57:01.000Z
|
2021-03-22T10:57:01.000Z
|
mistos-backend/src/app/api/napari_widgets.py
|
Maddonix/mistos_2
|
4bd9f45ad9e49f4178c0b8bb1a177d7db5349c34
|
[
"MIT"
] | 44
|
2021-02-17T15:07:17.000Z
|
2021-04-05T07:07:09.000Z
|
mistos-backend/src/app/api/napari_widgets.py
|
Maddonix/mistos_2
|
4bd9f45ad9e49f4178c0b8bb1a177d7db5349c34
|
[
"MIT"
] | null | null | null |
from magicgui import magicgui
from app.api import utils_transformations
| 24
| 41
| 0.875
| 10
| 72
| 6.2
| 0.7
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 72
| 2
| 42
| 36
| 0.96875
| 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
|
ad3535931f60c3b61c4997c6ed7e371daf06e341
| 48
|
py
|
Python
|
nordlys/nordlys/logic/query/__init__.py
|
medtray/MultiEm-RGCN
|
11c7978273d57242090fa3715207ba18732d7f38
|
[
"MIT"
] | 34
|
2017-03-22T10:49:51.000Z
|
2022-03-15T07:20:14.000Z
|
nordlys/nordlys/logic/query/__init__.py
|
medtray/MultiEm-RGCN
|
11c7978273d57242090fa3715207ba18732d7f38
|
[
"MIT"
] | 33
|
2017-11-08T11:11:34.000Z
|
2021-11-15T15:39:51.000Z
|
nordlys/nordlys/logic/query/__init__.py
|
medtray/MultiEm-RGCN
|
11c7978273d57242090fa3715207ba18732d7f38
|
[
"MIT"
] | 19
|
2017-03-22T17:48:42.000Z
|
2021-03-10T20:52:04.000Z
|
"""
Query
=====
This is the query package.
"""
| 6.857143
| 26
| 0.541667
| 6
| 48
| 4.333333
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.208333
| 48
| 6
| 27
| 8
| 0.684211
| 0.8125
| 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
|
ad64f3dc2915f4b43a3c400c5a454bbac5e2bcb7
| 150
|
py
|
Python
|
winter/drf/body_with_context.py
|
EvgenySmekalin/winter
|
24b6a02f958478547a4a120324823743a1f7e1a1
|
[
"MIT"
] | 1
|
2020-03-28T14:54:28.000Z
|
2020-03-28T14:54:28.000Z
|
winter/drf/body_with_context.py
|
EvgenySmekalin/winter
|
24b6a02f958478547a4a120324823743a1f7e1a1
|
[
"MIT"
] | null | null | null |
winter/drf/body_with_context.py
|
EvgenySmekalin/winter
|
24b6a02f958478547a4a120324823743a1f7e1a1
|
[
"MIT"
] | null | null | null |
from typing import Any
from typing import Dict
from dataclasses import dataclass
@dataclass
class BodyWithContext:
body: Any
context: Dict
| 13.636364
| 33
| 0.773333
| 19
| 150
| 6.105263
| 0.578947
| 0.172414
| 0.275862
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 150
| 10
| 34
| 15
| 0.966667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.428571
| 0
| 0.857143
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a8ec08e8701f0032894433df382eeb2b7bc0bc67
| 130
|
py
|
Python
|
ml/__init__.py
|
ruberVulpes/a-discord-bot
|
0996a39b01917bf4f1a9b2a33ca46033ca2c9eb5
|
[
"MIT"
] | null | null | null |
ml/__init__.py
|
ruberVulpes/a-discord-bot
|
0996a39b01917bf4f1a9b2a33ca46033ca2c9eb5
|
[
"MIT"
] | 2
|
2021-02-22T05:08:30.000Z
|
2021-04-06T20:29:39.000Z
|
ml/__init__.py
|
ruberVulpes/a-discord-bot
|
0996a39b01917bf4f1a9b2a33ca46033ca2c9eb5
|
[
"MIT"
] | null | null | null |
cutoff = 20
decision_cutoff = .25
model_path = 'ml/overwatch_messages.model'
vectorizer_path = 'ml/overwatch_messages.vectorizer'
| 26
| 52
| 0.807692
| 17
| 130
| 5.882353
| 0.588235
| 0.12
| 0.3
| 0.46
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.033898
| 0.092308
| 130
| 4
| 53
| 32.5
| 0.813559
| 0
| 0
| 0
| 0
| 0
| 0.453846
| 0.453846
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 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
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
d1132d5444be5af40ed9f2221b9471e94728b833
| 74
|
py
|
Python
|
04_exploration/solutions/titanic_missing_age_21.py
|
glemaitre/x_exed_10_2018
|
72289925ddcac02ca36c003faa6f9de680313227
|
[
"CC0-1.0"
] | 1
|
2019-01-11T14:45:55.000Z
|
2019-01-11T14:45:55.000Z
|
04_exploration/solutions/titanic_missing_age_21.py
|
glemaitre/smob_paristech_12_2018
|
b669206f204a3e57e71efb3dd22e2ffbc4e0a309
|
[
"CC0-1.0"
] | 4
|
2019-02-22T21:37:20.000Z
|
2019-03-12T13:20:29.000Z
|
04_exploration/solutions/titanic_missing_age_21.py
|
glemaitre/smob_paristech_12_2018
|
b669206f204a3e57e71efb3dd22e2ffbc4e0a309
|
[
"CC0-1.0"
] | 1
|
2018-10-18T06:57:59.000Z
|
2018-10-18T06:57:59.000Z
|
without_age = data[data.Age.isnull()]
with_age = data[~data.Age.isnull()]
| 24.666667
| 37
| 0.716216
| 12
| 74
| 4.25
| 0.416667
| 0.27451
| 0.431373
| 0.54902
| 0.784314
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081081
| 74
| 2
| 38
| 37
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
d12f6bc14acd8d9ae78b1f3375a7c3f727262b32
| 181
|
py
|
Python
|
web/jobmatchings/admin.py
|
MattYu/django-docker-nginx-postgres-letsEncrypt-jobBoard
|
a59d4c3d8adf38eaa986eaf5efc21f774010aa2a
|
[
"MIT"
] | 1
|
2020-06-03T02:10:30.000Z
|
2020-06-03T02:10:30.000Z
|
jobmatchings/admin.py
|
MattYu/ConcordiaAce
|
35eff7614652eb548e532dcf00e3a7296855285c
|
[
"MIT"
] | 34
|
2020-04-05T01:14:31.000Z
|
2022-03-12T00:23:02.000Z
|
jobmatchings/admin.py
|
MattYu/ConcordiaAce
|
35eff7614652eb548e532dcf00e3a7296855285c
|
[
"MIT"
] | 1
|
2020-10-29T03:09:08.000Z
|
2020-10-29T03:09:08.000Z
|
from django.contrib import admin
from jobmatchings.models import MatchingHistory, Match
# Register your models here.
admin.site.register(Match)
admin.site.register(MatchingHistory)
| 30.166667
| 54
| 0.839779
| 23
| 181
| 6.608696
| 0.565217
| 0.118421
| 0.223684
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.088398
| 181
| 6
| 55
| 30.166667
| 0.921212
| 0.143646
| 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
|
d16e81d6c4e5dc05c80f118526526d5449d81efe
| 174
|
py
|
Python
|
tests/test_io_spec.py
|
JBorrow/pageplot
|
8abad574fda476d26a59fc8b7d36da2838f2c11e
|
[
"MIT"
] | null | null | null |
tests/test_io_spec.py
|
JBorrow/pageplot
|
8abad574fda476d26a59fc8b7d36da2838f2c11e
|
[
"MIT"
] | null | null | null |
tests/test_io_spec.py
|
JBorrow/pageplot
|
8abad574fda476d26a59fc8b7d36da2838f2c11e
|
[
"MIT"
] | null | null | null |
"""
Tests basic understanding of pydantic.
"""
from pageplot.io.spec import IOSpecification
def test_IOSpecification():
io_spec = IOSpecification(filename="test.csv")
| 17.4
| 50
| 0.758621
| 20
| 174
| 6.5
| 0.75
| 0.092308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.132184
| 174
| 9
| 51
| 19.333333
| 0.860927
| 0.218391
| 0
| 0
| 0
| 0
| 0.0625
| 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
|
0f2e0e71d28a8e69036155605aaeb715ec760718
| 786
|
py
|
Python
|
lizardanalysis/__init__.py
|
JojoReikun/ClimbingLizardDLCAnalysis
|
6cc38090217a3ffd4860ef6d06ba7967d3c10b7c
|
[
"MIT"
] | 1
|
2021-03-09T19:12:44.000Z
|
2021-03-09T19:12:44.000Z
|
lizardanalysis/__init__.py
|
JojoReikun/ClimbingLizardDLCAnalysis
|
6cc38090217a3ffd4860ef6d06ba7967d3c10b7c
|
[
"MIT"
] | null | null | null |
lizardanalysis/__init__.py
|
JojoReikun/ClimbingLizardDLCAnalysis
|
6cc38090217a3ffd4860ef6d06ba7967d3c10b7c
|
[
"MIT"
] | null | null | null |
"""
LizardDLCAnalysis Toolbox
© Jojo S.
Licensed under MIT License
"""
# TODO: complete as going along
import os
DEBUG = True and 'DEBUG' in os.environ and os.environ['DEBUG']
from lizardanalysis import DEBUG
from lizardanalysis import start_new_analysis
from lizardanalysis.start_new_analysis import create_new_project
from lizardanalysis.utils import auxiliaryfunctions
from lizardanalysis import calculations
from lizardanalysis.calculations.read_in_files import analyze_files, initialize
from lizardanalysis.calculations.write_result_files import summarize_results
from lizardanalysis.calculations.lizard_morphometrics import calc_morphometrics
from lizardanalysis.calculations.step_wise_summary import summarize_stepwise
from lizardanalysis.version import __version__, VERSION
| 34.173913
| 79
| 0.86514
| 97
| 786
| 6.804124
| 0.484536
| 0.272727
| 0.181818
| 0.087879
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.094148
| 786
| 22
| 80
| 35.727273
| 0.925562
| 0.118321
| 0
| 0
| 0
| 0
| 0.014599
| 0
| 0
| 0
| 0
| 0.045455
| 0
| 1
| 0
| false
| 0
| 0.916667
| 0
| 0.916667
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
7e22e81524acb013749b13dcc9a75c538e4fac05
| 63
|
py
|
Python
|
inference/params/190212_minnie_mip4_render.py
|
emitch/SEAMLeSS
|
cae21c67316ed36529fdc2e470a105a9f847975c
|
[
"MIT"
] | 4
|
2018-12-17T18:45:57.000Z
|
2021-04-29T16:30:42.000Z
|
inference/params/190212_minnie_mip4_render.py
|
emitch/SEAMLeSS
|
cae21c67316ed36529fdc2e470a105a9f847975c
|
[
"MIT"
] | 19
|
2019-01-02T19:09:12.000Z
|
2020-12-14T18:50:47.000Z
|
inference/params/190212_minnie_mip4_render.py
|
emitch/SEAMLeSS
|
cae21c67316ed36529fdc2e470a105a9f847975c
|
[
"MIT"
] | 2
|
2020-03-18T01:24:03.000Z
|
2022-01-06T06:19:58.000Z
|
A11,A12,A13,A21,A22,A23,z_start,z_stop
1,0,-32,0,1,-32,1,28000
| 21
| 38
| 0.714286
| 18
| 63
| 2.388889
| 0.722222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.42623
| 0.031746
| 63
| 2
| 39
| 31.5
| 0.278689
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
7e47df40f2dd568f1cea6d73d309a89a05eb2224
| 354
|
py
|
Python
|
nsd1802/python/day07/myclass.py
|
MrWangwf/nsd1806
|
069e993b0bb64cb21adc2a25aa56f6da674453bc
|
[
"Apache-2.0"
] | null | null | null |
nsd1802/python/day07/myclass.py
|
MrWangwf/nsd1806
|
069e993b0bb64cb21adc2a25aa56f6da674453bc
|
[
"Apache-2.0"
] | null | null | null |
nsd1802/python/day07/myclass.py
|
MrWangwf/nsd1806
|
069e993b0bb64cb21adc2a25aa56f6da674453bc
|
[
"Apache-2.0"
] | null | null | null |
class A:
def foo(self):
print('in A foo')
def hello(self):
print('A hello')
class B:
def bar(self):
print('in B bar')
def hello(self):
print('B hello')
class C(B, A):
pass
# def hello(self):
# print('C hello')
if __name__ == '__main__':
c = C()
c.foo()
c.bar()
c.hello()
| 15.391304
| 26
| 0.477401
| 52
| 354
| 3.096154
| 0.288462
| 0.279503
| 0.223602
| 0.31677
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.353107
| 354
| 22
| 27
| 16.090909
| 0.703057
| 0.10452
| 0
| 0.117647
| 0
| 0
| 0.121019
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.235294
| false
| 0.058824
| 0
| 0
| 0.411765
| 0.235294
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
7e4ddaae72f374866e52dd98ada8aff03307716e
| 164
|
py
|
Python
|
day2/and.py
|
alqmy/The-Garage-Summer-Of-Code
|
af310d5e5194a62962db2fc1e601099468251efa
|
[
"MIT"
] | null | null | null |
day2/and.py
|
alqmy/The-Garage-Summer-Of-Code
|
af310d5e5194a62962db2fc1e601099468251efa
|
[
"MIT"
] | null | null | null |
day2/and.py
|
alqmy/The-Garage-Summer-Of-Code
|
af310d5e5194a62962db2fc1e601099468251efa
|
[
"MIT"
] | null | null | null |
print(1 == 2 and 1 == 1) # False
print(1 == 1 and 2 == 2) # True
print(5 > 2 and True) # True
print(False and True)
print(False and False)
print(True and True)
| 14.909091
| 32
| 0.621951
| 32
| 164
| 3.1875
| 0.21875
| 0.264706
| 0.27451
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.079365
| 0.231707
| 164
| 11
| 33
| 14.909091
| 0.730159
| 0.091463
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
7e598ec383c9d2ec4538155bf748fd9583b20bc3
| 30
|
py
|
Python
|
PythonCurso01/aula121_docstrings/exemplo03/main.py
|
AlissonAnjos21/Aprendendo
|
9454d9e53ef9fb8bc61bf481b6592164f5bf8695
|
[
"MIT"
] | null | null | null |
PythonCurso01/aula121_docstrings/exemplo03/main.py
|
AlissonAnjos21/Aprendendo
|
9454d9e53ef9fb8bc61bf481b6592164f5bf8695
|
[
"MIT"
] | null | null | null |
PythonCurso01/aula121_docstrings/exemplo03/main.py
|
AlissonAnjos21/Aprendendo
|
9454d9e53ef9fb8bc61bf481b6592164f5bf8695
|
[
"MIT"
] | null | null | null |
import funcoes
help(funcoes)
| 7.5
| 14
| 0.8
| 4
| 30
| 6
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.133333
| 30
| 3
| 15
| 10
| 0.923077
| 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
|
7e6e0b59caa97c2a83c5da36efccd565fae29e6c
| 154
|
py
|
Python
|
fizzbuzz/fizzbuzz.py
|
varikvalefor/Equivalent-Computer-Programs
|
868c97b8305dc78e7a2eda94f4eaf4f26effe2cc
|
[
"BSD-3-Clause"
] | null | null | null |
fizzbuzz/fizzbuzz.py
|
varikvalefor/Equivalent-Computer-Programs
|
868c97b8305dc78e7a2eda94f4eaf4f26effe2cc
|
[
"BSD-3-Clause"
] | 4
|
2021-09-08T20:30:03.000Z
|
2021-09-10T00:58:05.000Z
|
fizzbuzz/fizzbuzz.py
|
varikvalefor/Equivalent-Computer-Programs
|
868c97b8305dc78e7a2eda94f4eaf4f26effe2cc
|
[
"BSD-3-Clause"
] | null | null | null |
a = 0
while(1):
a = a+1
if(a%15 == 0): print("FIZZ BUZZ")
elif(a%5 == 0): print("BUZZ")
elif(a%3 == 0): print("FIZZ")
else: print(a)
| 19.25
| 36
| 0.467532
| 29
| 154
| 2.482759
| 0.448276
| 0.25
| 0.277778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09009
| 0.279221
| 154
| 7
| 37
| 22
| 0.558559
| 0
| 0
| 0
| 0
| 0
| 0.11039
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.571429
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
0e4d7a9ee0828734f7c04d5ac284e08205839e40
| 123
|
py
|
Python
|
qtpynodeeditor/examples/__init__.py
|
tfarago/qtpynodeeditor
|
513301cfdb65be14bed428be1ef6b815d5873b63
|
[
"BSD-3-Clause"
] | 100
|
2019-03-23T20:32:45.000Z
|
2022-03-30T17:50:23.000Z
|
qtpynodeeditor/examples/__init__.py
|
tfarago/qtpynodeeditor
|
513301cfdb65be14bed428be1ef6b815d5873b63
|
[
"BSD-3-Clause"
] | 30
|
2019-03-17T14:12:05.000Z
|
2021-04-15T17:30:19.000Z
|
qtpynodeeditor/examples/__init__.py
|
tfarago/qtpynodeeditor
|
513301cfdb65be14bed428be1ef6b815d5873b63
|
[
"BSD-3-Clause"
] | 36
|
2019-05-22T06:27:00.000Z
|
2022-01-11T06:53:50.000Z
|
from . import calculator, connection_colors, image, style
__all__ = ['calculator', 'style', 'connection_colors', 'image']
| 30.75
| 63
| 0.739837
| 13
| 123
| 6.538462
| 0.615385
| 0.376471
| 0.494118
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.113821
| 123
| 3
| 64
| 41
| 0.779817
| 0
| 0
| 0
| 0
| 0
| 0.300813
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
0e9640042763021ab9069eb583d7fb8d39bf7347
| 122
|
py
|
Python
|
SDALib-CPP/SDALib-Python/Driver.py
|
red-panda-productions/SDALib
|
ff5505b3454374792589529de1c45308c4d119e7
|
[
"MIT"
] | null | null | null |
SDALib-CPP/SDALib-Python/Driver.py
|
red-panda-productions/SDALib
|
ff5505b3454374792589529de1c45308c4d119e7
|
[
"MIT"
] | null | null | null |
SDALib-CPP/SDALib-Python/Driver.py
|
red-panda-productions/SDALib
|
ff5505b3454374792589529de1c45308c4d119e7
|
[
"MIT"
] | null | null | null |
class SDADriver:
def InitAI(self):
return
def UpdateAI(self,SDAData):
return (0.4, 0.2, 0.5, 1)
| 15.25
| 33
| 0.557377
| 18
| 122
| 3.777778
| 0.722222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 0.311475
| 122
| 8
| 33
| 15.25
| 0.72619
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0
| 0.4
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
7d2075ef1b2f083294b6b85ea8bf06d0688c6a91
| 1,278
|
py
|
Python
|
tests/test_execute.py
|
mwouts/papermill_jupytext
|
133dd38e76145e77c477522114b87284ab687a21
|
[
"MIT"
] | 14
|
2019-05-22T05:02:59.000Z
|
2021-11-08T11:46:43.000Z
|
tests/test_execute.py
|
mwouts/papermill_jupytext
|
133dd38e76145e77c477522114b87284ab687a21
|
[
"MIT"
] | 1
|
2019-07-21T20:15:24.000Z
|
2019-07-21T20:15:24.000Z
|
tests/test_execute.py
|
mwouts/papermill_jupytext
|
133dd38e76145e77c477522114b87284ab687a21
|
[
"MIT"
] | 2
|
2019-06-20T17:51:01.000Z
|
2019-10-22T22:23:21.000Z
|
import os
import nbformat
import papermill as pm
def test_execute_markdown(tmpdir):
tmp_md = str(tmpdir.join('markdown.md'))
tmp_ipynb = str(tmpdir.join('executed.ipynb'))
with open(tmp_md, 'w') as fp:
fp.write("""```python tags=["parameters"]
# This cell defines the default value for parameters
integer = 1
text = "default"
```
```python
print('Parameters are {}'.format({'integer': integer, 'text': text}))
```
""")
pm.execute_notebook(
'txt://' + tmp_md,
tmp_ipynb,
parameters=dict(integer=2)
)
assert os.path.isfile(tmp_ipynb)
nb = nbformat.read(tmp_ipynb, as_version=4)
assert len(nb.cells) == 3
def test_execute_script(tmpdir):
tmp_py = str(tmpdir.join('script.py'))
tmp_ipynb = str(tmpdir.join('executed.ipynb'))
with open(tmp_py, 'w') as fp:
fp.write("""# %% {"tags": ["parameters"]}
# This cell defines the default value for parameters
integer = 1
text = "default"
# %%
print('Parameters are {}'.format({'integer': integer, 'text': text}))
""")
pm.execute_notebook(
'txt://' + tmp_py,
tmp_ipynb,
parameters=dict(integer=2)
)
assert os.path.isfile(tmp_ipynb)
nb = nbformat.read(tmp_ipynb, as_version=4)
assert len(nb.cells) == 3
| 22.821429
| 69
| 0.62989
| 172
| 1,278
| 4.552326
| 0.313953
| 0.081737
| 0.066411
| 0.043423
| 0.784163
| 0.753512
| 0.753512
| 0.753512
| 0.753512
| 0.753512
| 0
| 0.007882
| 0.20579
| 1,278
| 55
| 70
| 23.236364
| 0.763547
| 0
| 0
| 0.604651
| 0
| 0
| 0.352895
| 0.034429
| 0
| 0
| 0
| 0
| 0.093023
| 1
| 0.046512
| false
| 0
| 0.069767
| 0
| 0.116279
| 0.046512
| 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
|
adf1b14193567eb5f56aac6b95823392a1e10ef0
| 76
|
py
|
Python
|
CodeWars/Python/5 kyu/Not very secure/main.py
|
opastushkov/codewars-solutions
|
0132a24259a4e87f926048318332dcb4d94858ca
|
[
"MIT"
] | null | null | null |
CodeWars/Python/5 kyu/Not very secure/main.py
|
opastushkov/codewars-solutions
|
0132a24259a4e87f926048318332dcb4d94858ca
|
[
"MIT"
] | null | null | null |
CodeWars/Python/5 kyu/Not very secure/main.py
|
opastushkov/codewars-solutions
|
0132a24259a4e87f926048318332dcb4d94858ca
|
[
"MIT"
] | null | null | null |
def alphanumeric(s):
return all([x.isalpha() or x.isdigit() for x in s])
| 38
| 55
| 0.657895
| 14
| 76
| 3.571429
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.171053
| 76
| 2
| 55
| 38
| 0.793651
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
bc0c7522d70df5f3bcddc440b0d5a5080b65cea6
| 5,578
|
py
|
Python
|
brawl_api/core.py
|
sebastianmarines/bst
|
52d76e9c421b7b74dea00f5a5bee051e6b6b2ef0
|
[
"MIT"
] | 1
|
2021-09-17T22:57:05.000Z
|
2021-09-17T22:57:05.000Z
|
brawl_api/core.py
|
sebastianmarines/bst
|
52d76e9c421b7b74dea00f5a5bee051e6b6b2ef0
|
[
"MIT"
] | 2
|
2021-09-18T22:55:52.000Z
|
2021-09-21T02:41:34.000Z
|
brawl_api/core.py
|
sebastianmarines/brawl_api
|
52d76e9c421b7b74dea00f5a5bee051e6b6b2ef0
|
[
"MIT"
] | null | null | null |
from typing import Generic, Type, TypeVar
from aiohttp.client_reqrep import ClientResponse
from pydantic.main import BaseModel
import requests
import aiohttp
from requests.sessions import Session
from requests import Response
from brawl_api.utils import API, format_tag
from brawl_api.models import Battlelog, Player, Club, MemberList
T = TypeVar('T', Player, Club, Battlelog, MemberList)
R = TypeVar('R', Response, ClientResponse)
class ClientBase:
def _check_request_error(self, request: R) -> R:
# TODO
return request
class Client(ClientBase):
"""Client class
"""
session: Session
def __init__(self, token: str) -> None:
self.session = requests.Session()
self.headers = {
'Authorization': f'Bearer {token}',
}
def _request(self, route: str) -> dict:
with self.session as session:
response = session.get(API.base + route, headers=self.headers)
response = self._check_request_error(response)
return response.json()
def _get_x(self, model: Type[T], url: str) -> T:
resp = self._request(url)
return model.parse_obj(resp)
def get_player(self, player_tag) -> Player:
"""Get player
Args:
player_tag (str): Brawl stars player tag
Returns:
Player: A Player object
"""
player_tag = format_tag(player_tag)
return self._get_x(Player, f"{API.players}/{player_tag}")
# json_resp = self._request(f"{API.players}/{player_tag}")
# return Player.parse_obj(json_resp)
def get_player_battlelog(self, player_tag: str) -> Battlelog:
"""Get player's battlelog
Args:
player_tag (str): Brawl stars player tag
Returns:
Battlelog: A Battlelog object
"""
player_tag = format_tag(player_tag)
return self._get_x(Battlelog, f"{API.players}/{player_tag}/battlelog")
# json_resp = self._request(f"{API.players}/{player_tag}/battlelog")
# return Battlelog.parse_obj(json_resp["items"])
def get_club(self, club_tag: str) -> Club:
"""Get club information
Args:
club_tag (str): Brawl Stars club tag
Returns:
Club: A Club object
"""
club_tag = format_tag(club_tag)
return self._get_x(Club, f"{API.club}/{club_tag}")
# json_resp = self._request(f"{API.club}/{club_tag}")
# return Club.parse_obj(json_resp)
def get_club_members(self, club_tag: str) -> MemberList:
"""Get club members
Args:
club_tag (str): Brawl Stars club tag
Returns:
MemberList: A MemberList object
"""
club_tag = format_tag(club_tag)
return self._get_x(MemberList, f"{API.club}/{club_tag}/members")
# json_resp = self._request(f"{API.club}/{club_tag}/members")
# return MemberList.parse_obj(json_resp["items"])
class AsyncClient(ClientBase):
session: aiohttp.ClientSession
def __init__(self, token: str) -> None:
self.session = aiohttp.ClientSession()
self.headers = {
'Authorization': f'Bearer {token}',
}
async def _request(self, route: str):
async with self.session.get(API.base + route,
headers=self.headers) as response:
response = self._check_request_error(response)
return await response.json()
async def _get_x(self, model: Type[T], url: str) -> T:
resp = await self._request(url)
return model.parse_obj(resp)
async def get_player(self, player_tag: str) -> Player:
"""Get player
Args:
player_tag (str): Brawl stars player tag
Returns:
Player: A Player object
"""
player_tag = format_tag(player_tag)
return await self._get_x(Player, f"{API.players}/{player_tag}")
# json_resp = await self._request(f"{API.players}/{player_tag}")
# return Player.parse_obj(json_resp)
async def get_player_battlelog(self, player_tag: str) -> Battlelog:
"""Get player's battlelog
Args:
player_tag (str): Brawl stars player tag
Returns:
Battlelog: A Battlelog object
"""
player_tag = format_tag(player_tag)
return await self._get_x(Battlelog,
f"{API.players}/{player_tag}/battlelog")
# json_resp = await self._request(f"{API.players}/{player_tag}/battlelog"
# )
# return Battlelog.parse_obj(json_resp["items"])
async def get_club(self, club_tag: str) -> Club:
"""Get club information
Args:
club_tag (str): Brawl Stars club tag
Returns:
Club: A Club object
"""
club_tag = format_tag(club_tag)
return await self._get_x(Club, f"{API.club}/{club_tag}")
# json_resp = await self._request(f"{API.club}/{club_tag}")
# return Club.parse_obj(json_resp)
async def get_club_members(self, club_tag: str) -> MemberList:
"""Get club members
Args:
club_tag (str): Brawl Stars club tag
Returns:
MemberList: A MemberList object
"""
club_tag = format_tag(club_tag)
return await self._get_x(MemberList, f"{API.club}/{club_tag}/members")
# json_resp = await self._request(f"{API.club}/{club_tag}/members")
# return MemberList.parse_obj(json_resp["items"])
| 31.693182
| 81
| 0.605056
| 682
| 5,578
| 4.733138
| 0.107038
| 0.078067
| 0.027261
| 0.039653
| 0.795229
| 0.78005
| 0.742255
| 0.712515
| 0.643742
| 0.643742
| 0
| 0
| 0.284511
| 5,578
| 176
| 82
| 31.693182
| 0.80882
| 0.23521
| 0
| 0.26087
| 0
| 0
| 0.081348
| 0.065078
| 0
| 0
| 0
| 0.005682
| 0
| 1
| 0.130435
| false
| 0
| 0.130435
| 0.014493
| 0.521739
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
bc11a9dafce7108046bb49574b6f5d8fb928cc53
| 84
|
py
|
Python
|
ec2ssh/__main__.py
|
akx/ec2ssh
|
3709f886de74b1def88c0b7ff8d83279c1b3b7d7
|
[
"MIT"
] | null | null | null |
ec2ssh/__main__.py
|
akx/ec2ssh
|
3709f886de74b1def88c0b7ff8d83279c1b3b7d7
|
[
"MIT"
] | null | null | null |
ec2ssh/__main__.py
|
akx/ec2ssh
|
3709f886de74b1def88c0b7ff8d83279c1b3b7d7
|
[
"MIT"
] | null | null | null |
from ec2ssh.main import wrapped_main
if __name__ == '__main__':
wrapped_main()
| 16.8
| 36
| 0.738095
| 11
| 84
| 4.727273
| 0.636364
| 0.423077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014286
| 0.166667
| 84
| 4
| 37
| 21
| 0.728571
| 0
| 0
| 0
| 0
| 0
| 0.095238
| 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
|
bc251d0a692477a7dfebe4d75fe5cadc5641db74
| 55
|
py
|
Python
|
tifa/apps/user/__init__.py
|
twocucao/tifa
|
f703fd27f54000e7d51f06d2456d09cc79e0ab72
|
[
"MIT"
] | 71
|
2020-04-16T04:28:45.000Z
|
2022-03-31T22:45:11.000Z
|
tifa/apps/user/__init__.py
|
twocucao/tifa
|
f703fd27f54000e7d51f06d2456d09cc79e0ab72
|
[
"MIT"
] | 6
|
2021-05-13T06:32:38.000Z
|
2022-03-04T01:18:34.000Z
|
tifa/apps/user/__init__.py
|
twocucao/tifa
|
f703fd27f54000e7d51f06d2456d09cc79e0ab72
|
[
"MIT"
] | 12
|
2021-05-01T08:43:11.000Z
|
2022-03-29T00:58:54.000Z
|
from .router import bp
from .checkout import * # noqa
| 18.333333
| 31
| 0.727273
| 8
| 55
| 5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 55
| 2
| 32
| 27.5
| 0.909091
| 0.072727
| 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
|
cb231e80a4264acd5b77b537ee8e416a9ae73667
| 42
|
py
|
Python
|
utils/__init__.py
|
paulo-henrique-ph/flask_restplus_tutorial
|
2072be87a25605e4a5596f9bd7701142edd7ea3d
|
[
"MIT"
] | null | null | null |
utils/__init__.py
|
paulo-henrique-ph/flask_restplus_tutorial
|
2072be87a25605e4a5596f9bd7701142edd7ea3d
|
[
"MIT"
] | 1
|
2021-06-01T23:46:04.000Z
|
2021-06-01T23:46:04.000Z
|
utils/__init__.py
|
paulo-henrique-ph/flask_restplus_tutorial
|
2072be87a25605e4a5596f9bd7701142edd7ea3d
|
[
"MIT"
] | null | null | null |
from .exemplo_utilitario import Utilitario
| 42
| 42
| 0.904762
| 5
| 42
| 7.4
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 42
| 1
| 42
| 42
| 0.948718
| 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
|
cb30a205ba2f6feff5633e9ba83d4b877cfccfdc
| 505
|
py
|
Python
|
ProgettoLube/WebInspector/venv/Lib/site-packages/tensorflow/_api/v2/compat/v1/train/queue_runner/__init__.py
|
Lube-Project/ProgettoLube
|
cbf33971e2c2e865783ec1a2302625539186a338
|
[
"MIT"
] | 2
|
2020-09-30T00:11:09.000Z
|
2021-10-04T13:00:38.000Z
|
ProgettoLube/WebInspector/venv/Lib/site-packages/tensorflow/_api/v2/compat/v1/train/queue_runner/__init__.py
|
Lube-Project/ProgettoLube
|
cbf33971e2c2e865783ec1a2302625539186a338
|
[
"MIT"
] | null | null | null |
ProgettoLube/WebInspector/venv/Lib/site-packages/tensorflow/_api/v2/compat/v1/train/queue_runner/__init__.py
|
Lube-Project/ProgettoLube
|
cbf33971e2c2e865783ec1a2302625539186a338
|
[
"MIT"
] | 1
|
2021-01-28T01:57:41.000Z
|
2021-01-28T01:57:41.000Z
|
# This file is MACHINE GENERATED! Do not edit.
# Generated by: tensorflow/python/tools/api/generator/create_python_api.py script.
"""Public API for tf.train.queue_runner namespace.
"""
from __future__ import print_function as _print_function
import sys as _sys
from tensorflow.python.training.queue_runner_impl import QueueRunner
from tensorflow.python.training.queue_runner_impl import add_queue_runner
from tensorflow.python.training.queue_runner_impl import start_queue_runners
del _print_function
| 33.666667
| 82
| 0.845545
| 74
| 505
| 5.459459
| 0.513514
| 0.136139
| 0.148515
| 0.207921
| 0.363861
| 0.363861
| 0.363861
| 0.363861
| 0
| 0
| 0
| 0
| 0.09505
| 505
| 14
| 83
| 36.071429
| 0.884026
| 0.344554
| 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
| 0
| 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
| 1
| 0
|
0
| 5
|
cb3fed21221487b9f7711ffff9e9f6e7723b92d9
| 11,732
|
py
|
Python
|
ProjectHelper/items/operations/models.py
|
MirrorChu/SUSTech-Project-Helper
|
7a3dad7f9ccc92adee411384057089fe89994d0a
|
[
"MIT"
] | 1
|
2021-05-14T13:28:51.000Z
|
2021-05-14T13:28:51.000Z
|
ProjectHelper/items/operations/models.py
|
MirrorChu/SUSTech-Project-Helper
|
7a3dad7f9ccc92adee411384057089fe89994d0a
|
[
"MIT"
] | null | null | null |
ProjectHelper/items/operations/models.py
|
MirrorChu/SUSTech-Project-Helper
|
7a3dad7f9ccc92adee411384057089fe89994d0a
|
[
"MIT"
] | null | null | null |
from datetime import datetime
from django.db import models
from django.contrib.auth import get_user_model
from items.users.models import BaseModel
from items.groups.models import GroupOrg
from items.courses.models import Course
from items.projects.models import Project
UserProfile = get_user_model()
class Tag(BaseModel):
tag = models.CharField(verbose_name="标签", max_length=50, default="")
# 加分项:不同类型的标签相应的颜色不同
type = models.CharField(verbose_name="属性", max_length=50, default="")
class Meta:
verbose_name = "标签清单"
verbose_name_plural = verbose_name
def __str__(self):
return self.tag
# 以下记录的都是多对多的关系
# 记录每个人都有上哪些课
class UserCourse(BaseModel):
user_name = models.ForeignKey(UserProfile, on_delete=models.CASCADE, verbose_name="用户名称")
course_name = models.ForeignKey(Course, on_delete=models.CASCADE, verbose_name="所在课程的名称")
lab = models.CharField(verbose_name="实验班名称", max_length=1)
class Meta:
verbose_name = "课程清单"
verbose_name_plural = verbose_name
def __str__(self):
return self.user_name
# 记录每个队有谁评论了什么,队伍成员也能在评论区发表内容
class UserComment(BaseModel):
user_name = models.ForeignKey(UserProfile, on_delete=models.CASCADE, verbose_name="评论用户的名称")
group_name = models.ForeignKey(GroupOrg, on_delete=models.CASCADE, verbose_name="被评论队伍的名称")
comments = models.CharField(max_length=200, verbose_name="评论内容")
class Meta:
verbose_name = "队伍评论"
verbose_name_plural = verbose_name
def __str__(self):
return self.group_name
# 记录所有用户组队的信息,还没实现:限制一门课只能组一个队
class UserGroup(BaseModel):
user_name = models.ForeignKey(UserProfile, on_delete=models.CASCADE, verbose_name="用户的名称")
group_name = models.ForeignKey(GroupOrg, on_delete=models.CASCADE, verbose_name="已加入队伍的名称")
class Meta:
verbose_name = "组队情况"
verbose_name_plural = verbose_name
def __str__(self):
return self.group_name
class UserTag(BaseModel):
user_name = models.ForeignKey(UserProfile, on_delete=models.CASCADE, verbose_name="用户名称")
tag = models.ForeignKey(Tag, on_delete=models.CASCADE, verbose_name="标签")
visibility = models.IntegerField(verbose_name="可见度", default=1)
class Meta:
verbose_name = "用户拥有的标签"
verbose_name_plural = verbose_name
def __str__(self):
return self.user_name
class UserLikeTag(BaseModel):
user_name = models.ForeignKey(UserProfile, on_delete=models.CASCADE, verbose_name="用户名称")
tag = models.ForeignKey(UserTag, on_delete=models.CASCADE, verbose_name="标签")
class Meta:
verbose_name = "用户点赞的标签"
verbose_name_plural = verbose_name
def __str__(self):
return self.user_name
# 记录每个项目发布页面下有谁评论了什么
class ProjectComment(BaseModel):
user_name = models.ForeignKey(UserProfile, on_delete=models.CASCADE, verbose_name="评论用户的名称")
project_name = models.ForeignKey(Project, on_delete=models.CASCADE, verbose_name="被评论项目的名称")
comments = models.CharField(max_length=200, verbose_name="评论内容", default="")
floor = models.CharField(max_length=200, verbose_name="类型", default="")
class Meta:
verbose_name = "项目评论"
verbose_name_plural = verbose_name
def __str__(self):
return self.project_name
class Event(BaseModel):
publish_user = models.ForeignKey(UserProfile, on_delete=models.CASCADE, verbose_name="用户")
project = models.ForeignKey(Project, on_delete=models.CASCADE, verbose_name="项目")
type = models.CharField(max_length=200, verbose_name="类型", default="")
parameter = models.TextField(max_length=65535, verbose_name="参数", default="")
end_time = models.DateTimeField(default=datetime.now, verbose_name="截止日期")
start_time = models.DateTimeField(default=datetime.now, verbose_name="开始日期")
detail = models.TextField(max_length=65535, verbose_name="简介", default="")
title = models.CharField(max_length=200, verbose_name="标题", default="")
class Meta:
verbose_name = "组件"
verbose_name_plural = verbose_name
def __str__(self):
return self.project_id
# 记录每个项目有什么附件
class ProjectAttachment(BaseModel):
project = models.ForeignKey(Project, on_delete=models.CASCADE, verbose_name="项目")
user = models.ForeignKey(UserProfile, on_delete=models.CASCADE, verbose_name="用户")
group = models.ForeignKey(GroupOrg, on_delete=models.CASCADE, verbose_name="队伍")
event = models.ForeignKey(Event, on_delete=models.CASCADE, verbose_name="组件")
file_path = models.CharField(max_length=200, verbose_name="文件路径", default="")
class Meta:
verbose_name = "项目附件"
verbose_name_plural = verbose_name
def __str__(self):
return self.project
class Key(BaseModel):
key_word = models.CharField(max_length=200, verbose_name="批次识别码", default="")
class Meta:
verbose_name = "老师上传项目附件key"
verbose_name_plural = verbose_name
def __str__(self):
return self.project
class ProjectFile(BaseModel):
project = models.ForeignKey(Project, on_delete=models.CASCADE, verbose_name="项目")
file_path = models.CharField(max_length=200, verbose_name="文件路径", default="")
class Meta:
verbose_name = "老师上传项目附件"
verbose_name_plural = verbose_name
def __str__(self):
return self.project
class EventGrades(BaseModel):
event = models.ForeignKey(Event, on_delete=models.CASCADE, verbose_name="组件")
user = models.ForeignKey(UserProfile, on_delete=models.CASCADE, verbose_name="用户")
grade = models.FloatField(verbose_name="成绩", default=0)
comment = models.TextField(verbose_name="评论", default="", max_length=65535)
class Meta:
verbose_name = "项目成绩"
verbose_name_plural = verbose_name
def __str__(self):
return self.project
class ProjectGrades(BaseModel):
event = models.ForeignKey(Event, on_delete=models.CASCADE, verbose_name="组件")
group = models.ForeignKey(GroupOrg, on_delete=models.CASCADE, verbose_name="队伍")
grade = models.FloatField(verbose_name="成绩", default=0)
comment = models.TextField(verbose_name="评论", default="", max_length=65535)
class Meta:
verbose_name = "小组项目成绩"
verbose_name_plural = verbose_name
def __str__(self):
return self.project
# class ProjectDDL(BaseModel):
# project = models.ForeignKey(Project, on_delete=models.CASCADE, verbose_name="项目")
# ddl = models.DateTimeField(default=datetime.now, verbose_name="截止日期")
# type = models.CharField(max_length=200, verbose_name="类型", default="")
#
# class Meta:
# verbose_name = "项目截止日期"
# verbose_name_plural = verbose_name
#
# def __str__(self):
# return self.project
class ChooseEvent(BaseModel):
event_id = models.ForeignKey(Event, on_delete=models.CASCADE, verbose_name="组件")
choice = models.TextField(max_length=65535, verbose_name="选择", default="")
group = models.ForeignKey(GroupOrg, on_delete=models.CASCADE, verbose_name="队伍")
class Meta:
verbose_name = "选择组件"
verbose_name_plural = verbose_name
def __str__(self):
return self.event_id
class ParticipantEvent(BaseModel):
event_id = models.ForeignKey(Event, on_delete=models.CASCADE, verbose_name="组件")
end_time = models.DateTimeField(default=datetime.now, verbose_name="截止日期")
start_time = models.DateTimeField(default=datetime.now, verbose_name="开始日期")
group = models.ForeignKey(GroupOrg, on_delete=models.CASCADE, verbose_name="队伍")
class Meta:
verbose_name = "时间选择组件"
verbose_name_plural = verbose_name
def __str__(self):
return self.event_id
class Authority(BaseModel):
type = models.CharField(max_length=200, verbose_name="类型", default="")
end_time = models.DateTimeField(default=datetime.now, verbose_name="截止日期")
start_time = models.DateTimeField(default=datetime.now, verbose_name="开始日期")
user = models.ForeignKey(UserProfile, on_delete=models.CASCADE, verbose_name="用户")
course = models.ForeignKey(Course, on_delete=models.CASCADE, verbose_name="课程")
class Meta:
verbose_name = "权限"
verbose_name_plural = verbose_name
def __str__(self):
return self.type
class Annexation(BaseModel):
a = models.CharField(max_length=200, verbose_name="a", default="")
b = models.CharField(max_length=200, verbose_name="b", default="")
c = models.CharField(max_length=200, verbose_name="c", default="")
d = models.CharField(max_length=200, verbose_name="d", default="")
e = models.CharField(max_length=200, verbose_name="e", default="")
f = models.CharField(max_length=200, verbose_name="f", default="")
g = models.CharField(max_length=200, verbose_name="g", default="")
h = models.CharField(max_length=200, verbose_name="h", default="")
i = models.CharField(max_length=200, verbose_name="i", default="")
j = models.CharField(max_length=200, verbose_name="j", default="")
class Meta:
verbose_name = "Annexation"
verbose_name_plural = verbose_name
def __str__(self):
return self.a
# # 记录谁向另一个人发送了聊天消息
# class UserMessage(BaseModel):
# receiver = models.ForeignKey(UserProfile, on_delete=models.CASCADE, verbose_name="接收方", default="")
# sender = models.ForeignKey(UserProfile, on_delete=models.CASCADE, verbose_name="发送方", default="")
# receiver_is_read = models.BooleanField(default=False, verbose_name="接收方是否已读")
# sender_is_read = models.BooleanField(default=False, verbose_name="发送方是否已读")
# content = models.TextField(verbose_name="内容", default="", max_length=65535)
# send_time = models.DateTimeField(verbose_name="发送时间")
#
# class Meta:
# verbose_name = "聊天消息"
# verbose_name_plural = verbose_name
#
# def __str__(self):
# return self.receiver
#
#
# # 记录每个队都有谁申请加入
# class UserAsk(BaseModel):
# receiver_group = models.ForeignKey(GroupOrg, on_delete=models.CASCADE, verbose_name="接收申请的队伍")
# sender = models.ForeignKey(UserProfile, on_delete=models.CASCADE, verbose_name="发出申请的用户")
#
# receiver_group_is_read = models.BooleanField(default=False, verbose_name="接收方是否已读")
# sender_is_read = models.BooleanField(default=False, verbose_name="发送方是否已读")
# is_accepted = models.BooleanField(default=False, verbose_name="是否已接受")
#
# request_send_time = models.DateTimeField(verbose_name="申请发送时间")
# request_receive_time = models.DateTimeField(verbose_name="申请接收时间")
#
# reply_send_time = models.DateTimeField(verbose_name="申请回复发送时间")
# reply_receive_time = models.DateTimeField(verbose_name="申请回复接收时间")
#
# class Meta:
# verbose_name = "组队申请"
# verbose_name_plural = verbose_name
#
# def __str__(self):
# return self.receiver_group
#
#
# # 记录每个队都有谁申请加入
# class UserInvite(BaseModel):
# receiver = models.ForeignKey(UserProfile, on_delete=models.CASCADE, verbose_name="接收邀请的用户")
# sender_group = models.ForeignKey(GroupOrg, on_delete=models.CASCADE, verbose_name="发出邀请的用户")
#
# receiver_is_read = models.BooleanField(default=False, verbose_name="接收方是否已读")
# sender_group_is_read = models.BooleanField(default=False, verbose_name="发送方是否已读")
# is_accepted = models.BooleanField(default=False, verbose_name="是否已接受")
#
# request_send_time = models.DateTimeField(verbose_name="邀请发送时间")
# request_receive_time = models.DateTimeField(verbose_name="邀请接收时间")
#
# reply_send_time = models.DateTimeField(verbose_name="申请回复发送时间")
# reply_receive_time = models.DateTimeField(verbose_name="申请回复接收时间")
#
# class Meta:
# verbose_name = "组队邀请"
# verbose_name_plural = verbose_name
#
# def __str__(self):
# return self.receiver
| 35.659574
| 105
| 0.717354
| 1,416
| 11,732
| 5.663842
| 0.133475
| 0.212594
| 0.062843
| 0.094264
| 0.807107
| 0.788404
| 0.783666
| 0.691397
| 0.684913
| 0.650873
| 0
| 0.010028
| 0.166979
| 11,732
| 329
| 106
| 35.659574
| 0.810601
| 0.258353
| 0
| 0.554286
| 0
| 0
| 0.032486
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.097143
| false
| 0
| 0.04
| 0.097143
| 0.8
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
cb6f369a891a417f3ad45d57a8600daf86e53969
| 30
|
py
|
Python
|
fairways/io/asyn/__init__.py
|
dan-win/fairways_py
|
771623c6f9ec40e8016b5cebb7951613d01e31f7
|
[
"Apache-2.0"
] | null | null | null |
fairways/io/asyn/__init__.py
|
dan-win/fairways_py
|
771623c6f9ec40e8016b5cebb7951613d01e31f7
|
[
"Apache-2.0"
] | null | null | null |
fairways/io/asyn/__init__.py
|
dan-win/fairways_py
|
771623c6f9ec40e8016b5cebb7951613d01e31f7
|
[
"Apache-2.0"
] | null | null | null |
# from ..generic.dbi import *
| 15
| 29
| 0.666667
| 4
| 30
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 30
| 1
| 30
| 30
| 0.8
| 0.9
| 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
|
cb8801e95a6a86303309f2fa07eaee12771e99f9
| 39
|
py
|
Python
|
src/crud/__init__.py
|
superb-dev/mermaid-test
|
bb63a375a68923b35008d75290f55b67b529bfd5
|
[
"MIT"
] | 3
|
2021-03-04T07:44:04.000Z
|
2021-12-06T03:45:58.000Z
|
src/crud/__init__.py
|
superb-dev/wallet-fastapi-dynamodb
|
bb63a375a68923b35008d75290f55b67b529bfd5
|
[
"MIT"
] | 2
|
2021-02-13T06:37:47.000Z
|
2021-02-13T13:17:56.000Z
|
src/crud/__init__.py
|
superb-dev/wallet-fastapi-dynamodb
|
bb63a375a68923b35008d75290f55b67b529bfd5
|
[
"MIT"
] | null | null | null |
from crud.wallet import Wallet # noqa
| 19.5
| 38
| 0.769231
| 6
| 39
| 5
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.179487
| 39
| 1
| 39
| 39
| 0.9375
| 0.102564
| 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
|
cbd0c1257fac12edaf2145737b32b2625c935f41
| 102
|
py
|
Python
|
Python Codewars Answers/sum of intervals.py
|
OreOlad/github-slideshow
|
6c4ef5df6971e3dbd79c9ef7cbb141b2ff682006
|
[
"MIT"
] | null | null | null |
Python Codewars Answers/sum of intervals.py
|
OreOlad/github-slideshow
|
6c4ef5df6971e3dbd79c9ef7cbb141b2ff682006
|
[
"MIT"
] | 4
|
2020-05-14T15:28:52.000Z
|
2021-09-28T02:43:53.000Z
|
Python Codewars Answers/sum of intervals.py
|
OreOlad/github-slideshow
|
6c4ef5df6971e3dbd79c9ef7cbb141b2ff682006
|
[
"MIT"
] | null | null | null |
def sum_of_intervals(intervals):
return len(set(i for x in intervals for i in range(x[0], x[1])))
| 34
| 68
| 0.696078
| 21
| 102
| 3.285714
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.023529
| 0.166667
| 102
| 2
| 69
| 51
| 0.788235
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
cbd3641007499681a5536e76412abbc415606f22
| 236
|
py
|
Python
|
state_machine.py
|
smirok/Deadline-helper-bot
|
1dd33b234c0ad1b1955c4eefc63306c9b3fb3e49
|
[
"MIT"
] | 1
|
2022-03-28T10:14:06.000Z
|
2022-03-28T10:14:06.000Z
|
state_machine.py
|
smirok/Deadline-helper-bot
|
1dd33b234c0ad1b1955c4eefc63306c9b3fb3e49
|
[
"MIT"
] | null | null | null |
state_machine.py
|
smirok/Deadline-helper-bot
|
1dd33b234c0ad1b1955c4eefc63306c9b3fb3e49
|
[
"MIT"
] | null | null | null |
from aiogram.dispatcher.filters.state import State, StatesGroup
class StateMachine(StatesGroup):
waiting_for_subject = State()
waiting_for_task = State()
waiting_for_old_record = State()
waiting_for_new_date = State()
| 26.222222
| 63
| 0.762712
| 29
| 236
| 5.862069
| 0.586207
| 0.235294
| 0.264706
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15678
| 236
| 8
| 64
| 29.5
| 0.854271
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.166667
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
1db1c8ea059567d135db65d8ce774039bc1959d4
| 47
|
py
|
Python
|
mmskeleton/__init__.py
|
Hunkzer/mmskeleton
|
551e3b4fa01330b23caab5815a40fbd848400b15
|
[
"Apache-2.0"
] | null | null | null |
mmskeleton/__init__.py
|
Hunkzer/mmskeleton
|
551e3b4fa01330b23caab5815a40fbd848400b15
|
[
"Apache-2.0"
] | null | null | null |
mmskeleton/__init__.py
|
Hunkzer/mmskeleton
|
551e3b4fa01330b23caab5815a40fbd848400b15
|
[
"Apache-2.0"
] | null | null | null |
from .datasets.skeleton import skeleton_process
| 47
| 47
| 0.893617
| 6
| 47
| 6.833333
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.06383
| 47
| 1
| 47
| 47
| 0.931818
| 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
|
1db3ddfb49a2c8a0ef616f59e3fa94e6e990aab6
| 94
|
py
|
Python
|
webnovel/api/__init__.py
|
mHaisham/webnovelscraper
|
c094b21014fe538a36d28722291174549de8ca54
|
[
"Apache-2.0"
] | 6
|
2020-12-09T08:30:38.000Z
|
2021-05-11T20:30:56.000Z
|
webnovel/api/__init__.py
|
mHaisham/webnovelscraper
|
c094b21014fe538a36d28722291174549de8ca54
|
[
"Apache-2.0"
] | 1
|
2022-02-22T17:11:09.000Z
|
2022-02-22T17:11:09.000Z
|
webnovel/api/__init__.py
|
mHaisham/webnovelscraper
|
c094b21014fe538a36d28722291174549de8ca54
|
[
"Apache-2.0"
] | 1
|
2021-02-23T15:46:28.000Z
|
2021-02-23T15:46:28.000Z
|
from .base import BaseApi
from .html import HtmlApi
from .parsed import UnlockType, ParsedApi
| 23.5
| 41
| 0.819149
| 13
| 94
| 5.923077
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.138298
| 94
| 3
| 42
| 31.333333
| 0.950617
| 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
|
1dc1bc8a26238d0ed03f995b269f6232955a068f
| 225
|
py
|
Python
|
omnizart/transcribe_all.py
|
nicolasanjoran/omnizart
|
b0e74af39b2e3a312ef32dbf0837626b2e043cb6
|
[
"MIT"
] | 1,145
|
2020-11-13T10:07:47.000Z
|
2022-03-29T17:35:36.000Z
|
omnizart/transcribe_all.py
|
nicolasanjoran/omnizart
|
b0e74af39b2e3a312ef32dbf0837626b2e043cb6
|
[
"MIT"
] | 44
|
2020-12-29T04:51:16.000Z
|
2022-03-15T06:52:04.000Z
|
omnizart/transcribe_all.py
|
nicolasanjoran/omnizart
|
b0e74af39b2e3a312ef32dbf0837626b2e043cb6
|
[
"MIT"
] | 61
|
2020-12-19T09:09:42.000Z
|
2022-03-23T01:26:22.000Z
|
# import pretty_midi
# from omnizart.music import app as music_app
# from omnizart.drum import app as drum_app
# from omnizart.chord import app as chord_app
def process(input_audio, model_path=None, output="./"):
pass
| 22.5
| 55
| 0.76
| 36
| 225
| 4.583333
| 0.527778
| 0.218182
| 0.2
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16
| 225
| 9
| 56
| 25
| 0.873016
| 0.657778
| 0
| 0
| 0
| 0
| 0.027778
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0.5
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
1df0f076e8edaf914d87c670e4935a922c169ebf
| 96
|
py
|
Python
|
olive/devices/error/sensor.py
|
liuyenting/olive-core
|
b532b29e29fe9f167369f66b8d922f5f644f9309
|
[
"Apache-2.0"
] | null | null | null |
olive/devices/error/sensor.py
|
liuyenting/olive-core
|
b532b29e29fe9f167369f66b8d922f5f644f9309
|
[
"Apache-2.0"
] | null | null | null |
olive/devices/error/sensor.py
|
liuyenting/olive-core
|
b532b29e29fe9f167369f66b8d922f5f644f9309
|
[
"Apache-2.0"
] | null | null | null |
from .base import DeviceError
class SensorError(DeviceError):
"""Generic sensor error."""
| 16
| 31
| 0.729167
| 10
| 96
| 7
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15625
| 96
| 5
| 32
| 19.2
| 0.864198
| 0.21875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
38003e6eb1c58071214754a06b1d21cb6da769d6
| 188
|
py
|
Python
|
registration/urls.py
|
allenallen/intered-web
|
1dfed88081f38df6cef2d873cd3c6f6fee31dffd
|
[
"MIT"
] | null | null | null |
registration/urls.py
|
allenallen/intered-web
|
1dfed88081f38df6cef2d873cd3c6f6fee31dffd
|
[
"MIT"
] | null | null | null |
registration/urls.py
|
allenallen/intered-web
|
1dfed88081f38df6cef2d873cd3c6f6fee31dffd
|
[
"MIT"
] | null | null | null |
from django.conf.urls import url
from django.urls import path, include
from . import views
# urlpatterns = [
# path('register/<str:uuid>', views.registration, name='register'),
# ]
| 18.8
| 71
| 0.702128
| 24
| 188
| 5.5
| 0.625
| 0.151515
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.159574
| 188
| 9
| 72
| 20.888889
| 0.835443
| 0.462766
| 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
|
380256299ca76cf835a62dcc278203f1f0d6c1d4
| 5,209
|
py
|
Python
|
src/test/test_sources.py
|
RLReed/unotran
|
b317107e1a39490dda732f86a731872f5207a167
|
[
"MIT"
] | null | null | null |
src/test/test_sources.py
|
RLReed/unotran
|
b317107e1a39490dda732f86a731872f5207a167
|
[
"MIT"
] | null | null | null |
src/test/test_sources.py
|
RLReed/unotran
|
b317107e1a39490dda732f86a731872f5207a167
|
[
"MIT"
] | 3
|
2019-12-02T23:01:24.000Z
|
2022-01-26T04:48:41.000Z
|
import sys
sys.path.append('../')
import unittest
import pydgm
import numpy as np
class TestSOURCES(unittest.TestCase):
def setUp(self):
# Set the variables for the test
pydgm.control.spatial_dimension = 1
pydgm.control.fine_mesh_x = [1]
pydgm.control.coarse_mesh_x = [0.0, 1.0]
pydgm.control.material_map = [1]
pydgm.control.xs_name = 'test/3gXS.anlxs'.ljust(256)
pydgm.control.angle_order = 2
pydgm.control.angle_option = pydgm.angle.gl
pydgm.control.boundary_east = 1.0
pydgm.control.boundary_west = 1.0
pydgm.control.boundary_type = [1.0, 1.0]
pydgm.control.allow_fission = True
pydgm.control.outer_print = False
pydgm.control.outer_tolerance = 1e-14
pydgm.control.equation_type = 'DD'
pydgm.control.lamb = 1.0
pydgm.control.store_psi = False
pydgm.control.solver_type = 'fixed'.ljust(256)
pydgm.control.source_value = 1.0
pydgm.control.scatter_leg_order = 0
pydgm.control.use_dgm = False
# Initialize the dependancies
pydgm.solver.initialize_solver()
def test_compute_source(self):
test = [0.652227008050471, 0.500051646579093, 0.5]
pydgm.sources.compute_source()
for g in range(3):
with self.subTest(g=g):
source = pydgm.state.mg_source[g]
np.testing.assert_array_almost_equal(source, test[g], 12, 'Failed for g={}'.format(g + 1))
def tearDown(self):
pydgm.solver.finalize_solver()
pydgm.control.finalize_control()
class TestSOURCES_2D(unittest.TestCase):
def setUp(self):
# Set the variables for the test
pydgm.control.spatial_dimension = 2
pydgm.control.fine_mesh_x = [1]
pydgm.control.fine_mesh_y = [1]
pydgm.control.coarse_mesh_x = [0.0, 1.0]
pydgm.control.coarse_mesh_y = [0.0, 1.0]
pydgm.control.material_map = [1]
pydgm.control.xs_name = 'test/1gXS.anlxs'.ljust(256)
pydgm.control.boundary_east = 0.0
pydgm.control.boundary_west = 0.0
pydgm.control.boundary_north = 0.0
pydgm.control.boundary_south = 0.0
pydgm.control.angle_order = 2
pydgm.control.angle_option = pydgm.angle.gl
pydgm.control.allow_fission = True
pydgm.control.outer_print = False
pydgm.control.outer_tolerance = 1e-14
pydgm.control.equation_type = 'DD'
pydgm.control.lamb = 1.0
pydgm.control.store_psi = False
pydgm.control.solver_type = 'fixed'.ljust(256)
pydgm.control.source_value = 1.0
pydgm.control.scatter_leg_order = 1
pydgm.control.use_dgm = False
# Initialize the dependancies
pydgm.solver.initialize_solver()
def test_compute_source(self):
test = [(1.0 + 0.5) / (2 * np.pi)]
pydgm.sources.compute_source()
source = pydgm.state.mg_source[0]
np.testing.assert_array_almost_equal(source, test, 12)
test = np.array([0.3, 0.2, 0.2, 0.2]) / (2 * np.pi)
np.testing.assert_array_almost_equal(pydgm.state.sigphi.flatten(), test, 12)
def tearDown(self):
pydgm.solver.finalize_solver()
pydgm.control.finalize_control()
class TestSOURCESdgm(unittest.TestCase):
def setUp(self):
# Set the variables for the test
pydgm.control.spatial_dimension = 1
pydgm.control.fine_mesh_x = [1]
pydgm.control.coarse_mesh_x = [0.0, 1.0]
pydgm.control.material_map = [1]
pydgm.control.angle_order = 2
pydgm.control.angle_option = pydgm.angle.gl
pydgm.control.boundary_type = [1.0, 1.0]
pydgm.control.allow_fission = True
pydgm.control.outer_print = False
pydgm.control.inner_print = False
pydgm.control.outer_tolerance = 1e-14
pydgm.control.inner_tolerance = 1e-14
pydgm.control.equation_type = 'DD'
pydgm.control.lamb = 1.0
pydgm.control.store_psi = True
pydgm.control.solver_type = 'fixed'.ljust(256)
pydgm.control.source_value = 1.0
pydgm.control.scatter_leg_order = 0
pydgm.control.use_dgm = True
pydgm.control.xs_name = 'test/4gXS.anlxs'.ljust(256)
pydgm.control.energy_group_map = [1, 1, 2, 2]
pydgm.control.dgm_basis_name = 'test/4gbasis'.ljust(256)
# Initialize the dependancies
pydgm.dgmsolver.initialize_dgmsolver()
pydgm.dgmsolver.compute_flux_moments()
pydgm.state.mg_phi = pydgm.dgm.phi_m[0]
pydgm.dgmsolver.compute_xs_moments()
pydgm.dgmsolver.slice_xs_moments(0)
pydgm.state.update_fission_density()
def test_compute_source(self):
test = [0.727975095456, 0.707343815354]
pydgm.sources.compute_source()
for g in range(2):
with self.subTest(g=g):
source = pydgm.state.mg_source[g]
np.testing.assert_array_almost_equal(source, test[g], 12, 'Failed for g={}'.format(g + 1))
def tearDown(self):
pydgm.dgmsolver.finalize_dgmsolver()
pydgm.control.finalize_control()
if __name__ == '__main__':
unittest.main()
| 34.959732
| 106
| 0.64043
| 693
| 5,209
| 4.630592
| 0.17316
| 0.254285
| 0.081022
| 0.061078
| 0.791212
| 0.724213
| 0.714553
| 0.705204
| 0.659395
| 0.659395
| 0
| 0.049847
| 0.248992
| 5,209
| 148
| 107
| 35.195946
| 0.77045
| 0.033788
| 0
| 0.612069
| 0
| 0
| 0.023677
| 0
| 0
| 0
| 0
| 0
| 0.034483
| 1
| 0.077586
| false
| 0
| 0.034483
| 0
| 0.137931
| 0.034483
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
38286ea6443f3fb0de3e1f677a331ec145d24889
| 344
|
py
|
Python
|
flask_atomic/orm/mixins/columns.py
|
kmjbyrne/flask-kbpc
|
859ea26146ea69cfff7699c75a0612388b84c756
|
[
"MIT"
] | null | null | null |
flask_atomic/orm/mixins/columns.py
|
kmjbyrne/flask-kbpc
|
859ea26146ea69cfff7699c75a0612388b84c756
|
[
"MIT"
] | 3
|
2020-05-29T01:28:25.000Z
|
2021-04-30T21:05:42.000Z
|
flask_atomic/orm/mixins/columns.py
|
kmjbyrne/flask-kbpc
|
859ea26146ea69cfff7699c75a0612388b84c756
|
[
"MIT"
] | null | null | null |
from sqlalchemy import Column
from sqlalchemy import Integer
from sqlalchemy import DateTime
from sqlalchemy import func
class PrimaryKeyMixin:
id = Column(Integer, primary_key=True)
class CreationTimestampMixin:
created = Column(DateTime, default=func.now())
class UpdateMixin:
updated = Column(DateTime, default=func.now())
| 20.235294
| 50
| 0.77907
| 40
| 344
| 6.675
| 0.475
| 0.209738
| 0.299625
| 0.187266
| 0.209738
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.151163
| 344
| 16
| 51
| 21.5
| 0.914384
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
384c6a9d8631ba2c2242a8885677dca37dbff362
| 223
|
py
|
Python
|
testing/slides/examples/fixtures/test_fixtures.py
|
ramosmaria/school2021
|
3e162a05767bbc8fa6ce3f92c858d1bd639fee16
|
[
"MIT"
] | 252
|
2021-05-18T11:58:17.000Z
|
2022-03-12T06:48:52.000Z
|
testing/slides/examples/fixtures/test_fixtures.py
|
ramosmaria/school2021
|
3e162a05767bbc8fa6ce3f92c858d1bd639fee16
|
[
"MIT"
] | 44
|
2021-05-21T14:28:34.000Z
|
2021-07-12T22:36:06.000Z
|
testing/slides/examples/fixtures/test_fixtures.py
|
ramosmaria/school2021
|
3e162a05767bbc8fa6ce3f92c858d1bd639fee16
|
[
"MIT"
] | 128
|
2021-05-24T18:32:54.000Z
|
2022-03-26T11:24:16.000Z
|
import pytest
@pytest.fixture(scope='session')
def some_data():
return [1, 2, 3]
def test_using_fixture(some_data):
assert len(some_data) == 3
def test_also_using_fixture(some_data):
assert some_data[0] == 1
| 18.583333
| 39
| 0.713004
| 36
| 223
| 4.138889
| 0.5
| 0.268456
| 0.107383
| 0.268456
| 0.348993
| 0
| 0
| 0
| 0
| 0
| 0
| 0.032086
| 0.161435
| 223
| 11
| 40
| 20.272727
| 0.764706
| 0
| 0
| 0
| 0
| 0
| 0.03139
| 0
| 0
| 0
| 0
| 0
| 0.25
| 1
| 0.375
| false
| 0
| 0.125
| 0.125
| 0.625
| 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
|
698f0d389ad7717244da51971a9ca95ac873c40f
| 38
|
py
|
Python
|
cupy_alias/sparse/dia.py
|
fixstars/clpy
|
693485f85397cc110fa45803c36c30c24c297df0
|
[
"BSD-3-Clause"
] | 142
|
2018-06-07T07:43:10.000Z
|
2021-10-30T21:06:32.000Z
|
cupy_alias/sparse/dia.py
|
fixstars/clpy
|
693485f85397cc110fa45803c36c30c24c297df0
|
[
"BSD-3-Clause"
] | 282
|
2018-06-07T08:35:03.000Z
|
2021-03-31T03:14:32.000Z
|
cupy_alias/sparse/dia.py
|
fixstars/clpy
|
693485f85397cc110fa45803c36c30c24c297df0
|
[
"BSD-3-Clause"
] | 19
|
2018-06-19T11:07:53.000Z
|
2021-05-13T20:57:04.000Z
|
from clpy.sparse.dia import * # NOQA
| 19
| 37
| 0.710526
| 6
| 38
| 4.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.184211
| 38
| 1
| 38
| 38
| 0.870968
| 0.105263
| 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
|
69a39d45576a3fcd6c58f9b4405f784682b4edd8
| 70
|
py
|
Python
|
{{cookiecutter.repo_name}}/{{cookiecutter.module_name}}/{{cookiecutter.module_name}}.py
|
mpgomez/python_package_cookiecutter
|
a6152fb0fedf8f54d2427c975cdabef9aaff27f3
|
[
"Apache-2.0"
] | 1
|
2019-10-09T18:32:27.000Z
|
2019-10-09T18:32:27.000Z
|
{{cookiecutter.repo_name}}/{{cookiecutter.module_name}}/{{cookiecutter.module_name}}.py
|
mpgomez/python_package_cookiecutter
|
a6152fb0fedf8f54d2427c975cdabef9aaff27f3
|
[
"Apache-2.0"
] | 4
|
2019-10-09T18:29:50.000Z
|
2020-10-12T08:25:59.000Z
|
{{cookiecutter.repo_name}}/{{cookiecutter.module_name}}/{{cookiecutter.module_name}}.py
|
mpgomez/python_package_cookiecutter
|
a6152fb0fedf8f54d2427c975cdabef9aaff27f3
|
[
"Apache-2.0"
] | null | null | null |
import sys
def main():
print("Run arguments: {}", sys.argv[1:])
| 11.666667
| 44
| 0.585714
| 10
| 70
| 4.1
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017857
| 0.2
| 70
| 5
| 45
| 14
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0.242857
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| true
| 0
| 0.333333
| 0
| 0.666667
| 0.333333
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
69a6c45f193f842b8e440a9e98814d1d3f26459d
| 202
|
py
|
Python
|
otello/__init__.py
|
hysds/otello
|
c32cb7c3c85039bf476ff6002206764ded8e6fc7
|
[
"Apache-2.0"
] | null | null | null |
otello/__init__.py
|
hysds/otello
|
c32cb7c3c85039bf476ff6002206764ded8e6fc7
|
[
"Apache-2.0"
] | 4
|
2021-01-27T07:48:38.000Z
|
2021-09-15T17:56:31.000Z
|
otello/__init__.py
|
hysds/otello
|
c32cb7c3c85039bf476ff6002206764ded8e6fc7
|
[
"Apache-2.0"
] | null | null | null |
import urllib3
from otello.ci import CI
from otello.mozart import Mozart, Job, JobType, JobSet
from otello.client import initialize
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
| 25.25
| 67
| 0.846535
| 26
| 202
| 6.538462
| 0.576923
| 0.176471
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016484
| 0.09901
| 202
| 7
| 68
| 28.857143
| 0.917582
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.8
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
69aaf65ec788f5b7622f0910bbde1df809481b4e
| 369
|
py
|
Python
|
__init__.py
|
Michany/pycing
|
761c3cd1a887d6a168909abc107c6ea0d80992d3
|
[
"MIT"
] | null | null | null |
__init__.py
|
Michany/pycing
|
761c3cd1a887d6a168909abc107c6ea0d80992d3
|
[
"MIT"
] | 1
|
2020-02-12T15:12:41.000Z
|
2020-02-12T15:13:34.000Z
|
__init__.py
|
Michany/pycing
|
761c3cd1a887d6a168909abc107c6ea0d80992d3
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
-----------------------
@Author Michael Wang
@GitHub Michany
@Website michany.xyz
-----------------------
Created on Tue Jul 2 22:17:10 2019
"""
from .core.simulator import Simulator
from .core.derivative import Derivative
from pycing.option.european import *
from pycing.option.asian import *
from pycing.option.barrier import *
| 21.705882
| 39
| 0.636856
| 45
| 369
| 5.222222
| 0.644444
| 0.12766
| 0.204255
| 0.187234
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.038095
| 0.146341
| 369
| 16
| 40
| 23.0625
| 0.707937
| 0.466125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
69d2bf80798236da705fa3d980fdb6e3b58cb177
| 95
|
py
|
Python
|
jybase/__init__.py
|
cnds/wxdemo
|
a445ea19ccd0b47caf6ea94e1ddec2ce3faf7d5e
|
[
"MIT"
] | null | null | null |
jybase/__init__.py
|
cnds/wxdemo
|
a445ea19ccd0b47caf6ea94e1ddec2ce3faf7d5e
|
[
"MIT"
] | null | null | null |
jybase/__init__.py
|
cnds/wxdemo
|
a445ea19ccd0b47caf6ea94e1ddec2ce3faf7d5e
|
[
"MIT"
] | null | null | null |
from .database import MongoBase, RedisBase
from .authentication_base import AuthenticationBase
| 31.666667
| 51
| 0.873684
| 10
| 95
| 8.2
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.094737
| 95
| 2
| 52
| 47.5
| 0.953488
| 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
|
3856160d49204db6d0d2e2e73b98029625d2b4f8
| 131
|
py
|
Python
|
my_module.py
|
njmiska/ibl_code_camp_tutorials
|
7f79dd0a1a81afcaa468d6af58fa681cc510c6c3
|
[
"MIT"
] | null | null | null |
my_module.py
|
njmiska/ibl_code_camp_tutorials
|
7f79dd0a1a81afcaa468d6af58fa681cc510c6c3
|
[
"MIT"
] | null | null | null |
my_module.py
|
njmiska/ibl_code_camp_tutorials
|
7f79dd0a1a81afcaa468d6af58fa681cc510c6c3
|
[
"MIT"
] | null | null | null |
print('Hello World!')
print("Here's something interesting:\n")
# Add lines here, let's make this script do something ineterting!!
| 32.75
| 67
| 0.740458
| 20
| 131
| 4.85
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.129771
| 131
| 3
| 68
| 43.666667
| 0.850877
| 0.48855
| 0
| 0
| 0
| 0
| 0.671875
| 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
|
385e1480eb436fc4af7587811d3838718171d54b
| 129
|
py
|
Python
|
1024 Pair and Triples.py
|
ansabgillani/binarysearchcomproblems
|
12fe8632f8cbb5058c91a55bae53afa813a3247e
|
[
"MIT"
] | 1
|
2020-12-29T21:17:26.000Z
|
2020-12-29T21:17:26.000Z
|
1024 Pair and Triples.py
|
ansabgillani/binarysearchcomproblems
|
12fe8632f8cbb5058c91a55bae53afa813a3247e
|
[
"MIT"
] | null | null | null |
1024 Pair and Triples.py
|
ansabgillani/binarysearchcomproblems
|
12fe8632f8cbb5058c91a55bae53afa813a3247e
|
[
"MIT"
] | 4
|
2021-09-09T17:42:43.000Z
|
2022-03-18T04:54:03.000Z
|
class Solution:
def solve(self, s):
return sum(3 if count%3 == 1 else count%3 for count in Counter(s).values()) == 2
| 32.25
| 88
| 0.620155
| 23
| 129
| 3.478261
| 0.782609
| 0.15
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.05102
| 0.24031
| 129
| 3
| 89
| 43
| 0.765306
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0.333333
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
385e7f6c5a1de0865a7ecbeaffe40bcdab410798
| 66
|
py
|
Python
|
07_moduly_i_pakiety/rocket/funkcje/stats.py
|
krakowiakpawel9/python_kurs
|
7e532a6acb135c352834e03d34512270538ec209
|
[
"MIT"
] | 17
|
2020-04-08T11:20:57.000Z
|
2022-03-15T16:49:37.000Z
|
07_moduly_i_pakiety/rocket/funkcje/stats.py
|
brownmilleryt/python_kurs
|
7e532a6acb135c352834e03d34512270538ec209
|
[
"MIT"
] | null | null | null |
07_moduly_i_pakiety/rocket/funkcje/stats.py
|
brownmilleryt/python_kurs
|
7e532a6acb135c352834e03d34512270538ec209
|
[
"MIT"
] | 19
|
2019-12-08T18:59:44.000Z
|
2022-03-02T19:09:48.000Z
|
# -*- coding: utf-8 -*-
def mean(x):
return sum(x) / len(x)
| 11
| 26
| 0.484848
| 11
| 66
| 2.909091
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.020408
| 0.257576
| 66
| 5
| 27
| 13.2
| 0.632653
| 0.318182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
38b50b053d432d3e2b605efbfd1d097ff2e59c7e
| 138
|
py
|
Python
|
mechroutines/pf/ktp/__init__.py
|
sjklipp/mechdriver
|
17c3d9bc82116954b331955e87a60e9adc5e1de9
|
[
"Apache-2.0"
] | null | null | null |
mechroutines/pf/ktp/__init__.py
|
sjklipp/mechdriver
|
17c3d9bc82116954b331955e87a60e9adc5e1de9
|
[
"Apache-2.0"
] | null | null | null |
mechroutines/pf/ktp/__init__.py
|
sjklipp/mechdriver
|
17c3d9bc82116954b331955e87a60e9adc5e1de9
|
[
"Apache-2.0"
] | null | null | null |
""" rate stuff
"""
from mechroutines.pf.ktp import rates
from mechroutines.pf.ktp import label
__all__ = [
'rates',
'label',
]
| 11.5
| 37
| 0.652174
| 17
| 138
| 5.058824
| 0.588235
| 0.372093
| 0.418605
| 0.488372
| 0.627907
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.210145
| 138
| 11
| 38
| 12.545455
| 0.788991
| 0.072464
| 0
| 0
| 0
| 0
| 0.083333
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
2a0f4a5db472cfe3cb81e0ad5ba0462d95bc8a38
| 180
|
py
|
Python
|
app/user/views.py
|
joiller/flask_blog
|
c7eb2846a63ede03a83b46bd59f463da4393a9f1
|
[
"Apache-2.0"
] | null | null | null |
app/user/views.py
|
joiller/flask_blog
|
c7eb2846a63ede03a83b46bd59f463da4393a9f1
|
[
"Apache-2.0"
] | null | null | null |
app/user/views.py
|
joiller/flask_blog
|
c7eb2846a63ede03a83b46bd59f463da4393a9f1
|
[
"Apache-2.0"
] | null | null | null |
# 针对用户业务逻辑处理的视图和路由的定义
from flask import render_template
from . import user
from .. import db
from ..models import *
@user.route('/user')
def user_index():
return '这是user的首页'
| 16.363636
| 33
| 0.733333
| 23
| 180
| 5.652174
| 0.608696
| 0.153846
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.161111
| 180
| 10
| 34
| 18
| 0.860927
| 0.105556
| 0
| 0
| 0
| 0
| 0.08805
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| true
| 0
| 0.571429
| 0.142857
| 0.857143
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 1
| 1
| 0
|
0
| 5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.