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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
91f3269258d7455253140aae9c0d3dfe9fdb683f
| 324
|
py
|
Python
|
art/defences/__init__.py
|
yalechang/adversarial-robustness-toolbox
|
df4efc86c3ed963c82687b3ab8cd5cdbd5fe5c57
|
[
"MIT"
] | 1
|
2022-03-02T19:05:12.000Z
|
2022-03-02T19:05:12.000Z
|
art/defences/__init__.py
|
yalechang/adversarial-robustness-toolbox
|
df4efc86c3ed963c82687b3ab8cd5cdbd5fe5c57
|
[
"MIT"
] | null | null | null |
art/defences/__init__.py
|
yalechang/adversarial-robustness-toolbox
|
df4efc86c3ed963c82687b3ab8cd5cdbd5fe5c57
|
[
"MIT"
] | null | null | null |
"""
Module implementing multiple types of defenses against adversarial attacks.
"""
from art.defences.adversarial_trainer import AdversarialTrainer
from art.defences.feature_squeezing import FeatureSqueezing
from art.defences.label_smoothing import LabelSmoothing
from art.defences.spatial_smoothing import SpatialSmoothing
| 40.5
| 75
| 0.87037
| 37
| 324
| 7.513514
| 0.621622
| 0.100719
| 0.215827
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 324
| 7
| 76
| 46.285714
| 0.936027
| 0.231481
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
62058fcb30e34040b461efc186008bf9f9b970ee
| 100
|
py
|
Python
|
recipes/bamr/run_test.py
|
corneliusroemer/bioconda-recipes
|
e1eced9063e15f6a97ab2b8e42cf3e38af4c93ba
|
[
"MIT"
] | null | null | null |
recipes/bamr/run_test.py
|
corneliusroemer/bioconda-recipes
|
e1eced9063e15f6a97ab2b8e42cf3e38af4c93ba
|
[
"MIT"
] | null | null | null |
recipes/bamr/run_test.py
|
corneliusroemer/bioconda-recipes
|
e1eced9063e15f6a97ab2b8e42cf3e38af4c93ba
|
[
"MIT"
] | null | null | null |
import bamr
from bamr.bamr import SamFlags
if __name__ == "__main__":
assert SamFlags.PAIRED == 1
| 16.666667
| 30
| 0.75
| 14
| 100
| 4.785714
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011905
| 0.16
| 100
| 5
| 31
| 20
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0.08
| 0
| 0
| 0
| 0
| 0
| 0.25
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
620d9cf34298264fbaedb24791e1b405b9341b30
| 97
|
py
|
Python
|
regularTour/apps.py
|
irfanmaulananasution/guidian
|
b5224c58d320c81bb085a89bcc011e020207a1f2
|
[
"MIT"
] | 1
|
2021-09-09T02:34:59.000Z
|
2021-09-09T02:34:59.000Z
|
regularTour/apps.py
|
irfanmaulananasution/guidian
|
b5224c58d320c81bb085a89bcc011e020207a1f2
|
[
"MIT"
] | null | null | null |
regularTour/apps.py
|
irfanmaulananasution/guidian
|
b5224c58d320c81bb085a89bcc011e020207a1f2
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class RegulartourConfig(AppConfig):
name = 'regularTour'
| 16.166667
| 35
| 0.773196
| 10
| 97
| 7.5
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.154639
| 97
| 5
| 36
| 19.4
| 0.914634
| 0
| 0
| 0
| 0
| 0
| 0.113402
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
6217445f6925d4f9f6bf1419063399018c2ef191
| 2,465
|
py
|
Python
|
plugins/dbnd-luigi/tests/conftest.py
|
ipattarapong/dbnd
|
7bd65621c46c73e078eb628f994127ad4c7dbd1a
|
[
"Apache-2.0"
] | null | null | null |
plugins/dbnd-luigi/tests/conftest.py
|
ipattarapong/dbnd
|
7bd65621c46c73e078eb628f994127ad4c7dbd1a
|
[
"Apache-2.0"
] | null | null | null |
plugins/dbnd-luigi/tests/conftest.py
|
ipattarapong/dbnd
|
7bd65621c46c73e078eb628f994127ad4c7dbd1a
|
[
"Apache-2.0"
] | null | null | null |
import datetime
import os
import luigi
import pytest
from luigi.date_interval import Custom
from tests.luigi_examples.complex_foo import Foo as ComplexFoo
from tests.luigi_examples.foo import Foo as SimpleFoo
from tests.luigi_examples.multiple_input_output import (
MyWrapperTask,
MyWrapperTaskOutputFails,
MyWrapperTaskRequiresFail,
MyWrapperTaskRunFail,
TaskB,
TaskC,
)
from tests.luigi_examples.top_artists import (
Streams,
Top10Artists,
Top10ArtistsOutputException,
Top10ArtistsRequiresException,
Top10ArtistsRunException,
)
def delete_task_output(luigi_task):
outputs = luigi.task.flatten(luigi_task.output())
all_deps = luigi_task.deps()
for d in all_deps:
outputs += luigi.task.flatten(d.output())
for t in outputs:
if t.exists():
os.remove(t.path)
@pytest.fixture(autouse=True)
def date_a():
return datetime.date(year=2019, month=1, day=1)
@pytest.fixture(autouse=True)
def date_b(date_a):
return datetime.date(year=2019, month=1, day=3)
@pytest.fixture(autouse=True)
def date_interval(date_a, date_b):
return Custom(date_a, date_b)
@pytest.fixture(autouse=True)
def streams(date_a):
t = Streams(date=date_a)
return t
@pytest.fixture(autouse=True)
def top10_artists(date_interval):
return Top10Artists(date_interval=date_interval)
@pytest.fixture(autouse=True)
def simple_foo():
return SimpleFoo()
@pytest.fixture(autouse=True)
def complex_foo():
return ComplexFoo()
@pytest.fixture(autouse=True)
def top10_artists_run_error(date_interval):
return Top10ArtistsRunException(date_interval=date_interval)
@pytest.fixture(autouse=True)
def top10_artists_requires_error(date_interval):
return Top10ArtistsRequiresException(date_interval=date_interval)
@pytest.fixture(autouse=True)
def top10_artists_output_error(date_interval):
return Top10ArtistsOutputException(date_interval=date_interval)
@pytest.fixture(autouse=True)
def task_c():
return TaskC()
@pytest.fixture(autouse=True)
def task_b():
return TaskB()
@pytest.fixture(autouse=True)
def wrapper_task():
return MyWrapperTask()
@pytest.fixture(autouse=True)
def wrapper_task_run_fail():
return MyWrapperTaskRunFail()
@pytest.fixture(autouse=True)
def wrapper_task_requires_fail():
return MyWrapperTaskRequiresFail()
@pytest.fixture(autouse=True)
def wrapper_task_output_fail():
return MyWrapperTaskOutputFails()
| 21.068376
| 69
| 0.761866
| 309
| 2,465
| 5.877023
| 0.216828
| 0.114537
| 0.176211
| 0.211454
| 0.394273
| 0.364537
| 0.296256
| 0.169604
| 0.169604
| 0.113436
| 0
| 0.017013
| 0.141582
| 2,465
| 116
| 70
| 21.25
| 0.84121
| 0
| 0
| 0.202532
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.21519
| false
| 0
| 0.113924
| 0.189873
| 0.531646
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
621a4f8dd0d012ae0406f00fbd0374f449c8206a
| 28,805
|
py
|
Python
|
venv/lib/python3.6/site-packages/ansible_collections/cisco/iosxr/plugins/modules/iosxr_prefix_lists.py
|
usegalaxy-no/usegalaxy
|
75dad095769fe918eb39677f2c887e681a747f3a
|
[
"MIT"
] | 1
|
2020-01-22T13:11:23.000Z
|
2020-01-22T13:11:23.000Z
|
venv/lib/python3.6/site-packages/ansible_collections/cisco/iosxr/plugins/modules/iosxr_prefix_lists.py
|
usegalaxy-no/usegalaxy
|
75dad095769fe918eb39677f2c887e681a747f3a
|
[
"MIT"
] | 12
|
2020-02-21T07:24:52.000Z
|
2020-04-14T09:54:32.000Z
|
venv/lib/python3.6/site-packages/ansible_collections/cisco/iosxr/plugins/modules/iosxr_prefix_lists.py
|
usegalaxy-no/usegalaxy
|
75dad095769fe918eb39677f2c887e681a747f3a
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2021 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""
The module file for iosxr_prefix_lists
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = """
module: iosxr_prefix_lists
short_description: Prefix-Lists resource module.
description:
- This module manages prefix-lists configuration on devices running Cisco IOSXR.
version_added: 2.3.0
notes:
- Tested against IOSXR 7.0.2.
- This module works with connection C(network_cli).
author: Ashwini Mhatre (@amhatre)
options:
running_config:
description:
- This option is used only with state I(parsed).
- The value of this option should be the output received from the Iosxr device by
executing the command B(show running-config prefix-list).
- The state I(parsed) reads the configuration from C(running_config) option and
transforms it into Ansible structured data as per the resource module's argspec
and the value is then returned in the I(parsed) key within the result.
type: str
config:
description: A list of prefix-lists configuration.
type: list
elements: dict
suboptions:
afi:
description:
- The Address Family Identifier (AFI) for the prefix-lists.
type: str
choices: ["ipv4", "ipv6"]
prefix_lists:
description: List of prefix-list configurations.
type: list
elements: dict
suboptions:
name:
description: Name of the prefix-list.
type: str
entries:
description: List of configurations for the specified prefix-list
type: list
elements: dict
suboptions:
sequence:
description: Sequence Number.
type: int
action:
description: Prefix-List permit or deny.
type: str
choices: ["permit", "deny", "remark"]
description:
description: Description of the prefix list. only applicable for action "remark".
type: str
prefix:
description: IP or IPv6 prefix in A.B.C.D/LEN or A:B::C:D/LEN format. only applicable for action "permit" and "deny"
type: str
state:
description:
- The state the configuration should be left in.
- Refer to examples for more details.
- With state I(replaced), for the listed prefix-lists,
sequences that are in running-config but not in the task are negated.
- With state I(overridden), all prefix-lists that are in running-config but
not in the task are negated.
- Please refer to examples for more details.
type: str
choices:
- merged
- replaced
- overridden
- deleted
- parsed
- gathered
- rendered
default: merged
"""
EXAMPLES = """
# Using merged
# Before state
#RP/0/0/CPU0:10#show running-config
#Thu Feb 4 09:38:36.245 UTC
#% No such configuration item(s)
#RP/0/0/CPU0:10#
#
- name: Merge the provided configuration with the existing running configuration
cisco.iosxr.iosxr_prefix_lists:
state: merged
config:
- afi: ipv6
prefix_lists:
- name: pl_1
entries:
- prefix: 2001:db8:1234::/48
action: deny
sequence: 1
- name: pl_2
entries:
- sequence: 2
action: remark
description: TEST_PL_2_REMARK
- afi: ipv4
prefix_lists:
- name: pl1
entries:
- sequence: 3
action: remark
description: TEST_PL1_2_REMARK
- sequence: 4
action: permit
prefix: 10.0.0.0/24
- name: pl2
entries:
- sequence: 5
action: remark
description: TEST_PL2_REMARK
#
# After state:
#
#RP/0/0/CPU0:10#show running-config
# ipv6 prefix-list pl_1
# 1 deny 2001:db8:1234::/48
# !
# ipv6 prefix-list pl_2
# 2 remark TEST_PL_2_REMARK
# !
# ipv4 prefix-list pl1
# 3 remark TEST_PL1_2_REMARK
# 4 permit 10.0.0.0/24
# !
# ipv4 prefix-list pl2
# 5 remark TEST_PL2_REMARK
# !
#Module execution
#
# "after": [
# {
# "afi": "ipv6",
# "prefix_lists": [
# {
# "entries": [
# {
# "action": "deny",
# "prefix": "2001:db8:1234::/48",
# "sequence": 1
# }
# ],
# "name": "pl_1"
# },
# {
# "entries": [
# {
# "action": "remark",
# "description": "TEST_PL_2_REMARK",
# "sequence": 2
# }
# ],
# "name": "pl_2"
# }
# ]
# },
# {
# "afi": "ipv4",
# "prefix_lists": [
# {
# "entries": [
# {
# "action": "remark",
# "description": "TEST_PL1_2_REMARK",
# "sequence": 3
# },
# {
# "action": "permit",
# "prefix": "10.0.0.0/24",
# "sequence": 4
# }
# ],
# "name": "pl1"
# },
# {
# "entries": [
# {
# "action": "remark",
# "description": "TEST_PL2_REMARK",
# "sequence": 5
# }
# ],
# "name": "pl2"
# }
# ]
# }
# ],
# "before": [],
# "changed": true,
# "commands": [
# "ipv6 prefix-list pl_1 1 deny 2001:db8:1234::/48",
# "ipv6 prefix-list pl_2 2 remark TEST_PL_2_REMARK",
# "ipv4 prefix-list pl1 3 remark TEST_PL1_2_REMARK",
# "ipv4 prefix-list pl1 4 permit 10.0.0.0/24",
# "ipv4 prefix-list pl2 5 remark TEST_PL2_REMARK"
# ]
#-----------------------------------------------------------------------
# Using replaced:
# --------------
# Before state
#RP/0/0/CPU0:10#show running-config
#
# ipv6 prefix-list pl_1
# 1 deny 2001:db8:1234::/48
# !
# ipv6 prefix-list pl_2
# 2 remark TEST_PL_2_REMARK
# !
# ipv4 prefix-list pl1
# 3 remark TEST_PL1_2_REMARK
# 4 permit 10.0.0.0/24
# !
# ipv4 prefix-list pl2
# 5 remark TEST_PL2_REMARK
# !
#
#
- name: Replace device configurations of listed prefix lists with provided configurations
register: result
cisco.iosxr.iosxr_prefix_lists: &id001
config:
- afi: ipv4
prefix_lists:
- name: pl1
entries:
- sequence: 3
action: permit
prefix: 10.0.0.0/24
- afi: ipv6
prefix_lists:
- name: pl_1
entries:
- prefix: 2001:db8:1234::/48
action: permit
sequence: 1
- name: pl_2
entries:
- sequence: 2
action: remark
description: TEST_PL1_2
state: replaced
# After state:
#RP/0/0/CPU0:10#show running-config
#
# ipv6 prefix-list pl_1
# 1 deny 2001:db8:1234::/48
# !
# ipv6 prefix-list pl_2
# 2 remark TEST_PL1_2
# !
# ipv4 prefix-list pl1
# 3 permit 10.0.0.0/24
# !
# ipv4 prefix-list pl2
# 5 remark TEST_PL2_REMARK
#
# Module Execution:
#
# "after": [
# {
# "afi": "ipv6",
# "prefix_lists": [
# {
# "entries": [
# {
# "action": "deny",
# "prefix": "2001:db8:1234::/48",
# "sequence": 1
# }
# ],
# "name": "pl_1"
# },
# {
# "entries": [
# {
# "action": "remark",
# "description": "TEST_PL1_2",
# "sequence": 2
# }
# ],
# "name": "pl_2"
# }
# ]
# },
# {
# "afi": "ipv4",
# "prefix_lists": [
# {
# "entries": [
# {
# "action": "permit",
# "prefix": "10.0.0.0/24",
# "sequence": 3
# }
# ],
# "name": "pl1"
# },
# {
# "entries": [
# {
# "action": "remark",
# "description": "TEST_PL2_REMARK",
# "sequence": 5
# }
# ],
# "name": "pl2"
# }
# ]
# }
# ],
# "before": [
# {
# "afi": "ipv6",
# "prefix_lists": [
# {
# "entries": [
# {
# "action": "deny",
# "prefix": "2001:db8:1234::/48",
# "sequence": 1
# }
# ],
# "name": "pl_1"
# },
# {
# "entries": [
# {
# "action": "remark",
# "description": "TEST_PL_2_REMARK",
# "sequence": 2
# }
# ],
# "name": "pl_2"
# }
# ]
# },
# {
# "afi": "ipv4",
# "prefix_lists": [
# {
# "entries": [
# {
# "action": "remark",
# "description": "TEST_PL1_2_REMARK",
# "sequence": 3
# },
# {
# "action": "permit",
# "prefix": "10.0.0.0/24",
# "sequence": 4
# }
# ],
# "name": "pl1"
# },
# {
# "entries": [
# {
# "action": "remark",
# "description": "TEST_PL2_REMARK",
# "sequence": 5
# }
# ],
# "name": "pl2"
# }
# ]
# }
# ],
# "changed": true,
# "commands": [
# "no ipv4 prefix-list pl1 3 remark TEST_PL1_2_REMARK",
# "no ipv4 prefix-list pl1 4 permit 10.0.0.0/24",
# "ipv4 prefix-list pl1 3 permit 10.0.0.0/24",
# "ipv6 prefix-list pl_2 2 remark TEST_PL1_2"
# ],
# "invocation": {
# "module_args": {
# "config": [
# {
# "afi": "ipv4",
# "prefix_lists": [
# {
# "entries": [
# {
# "action": "permit",
# "description": null,
# "prefix": "10.0.0.0/24",
# "sequence": 3
# }
# ],
# "name": "pl1"
# }
# ]
# },
# {
# "afi": "ipv6",
# "prefix_lists": [
# {
# "entries": [
# {
# "action": "permit",
# "description": null,
# "prefix": "2001:db8:1234::/48",
# "sequence": 1
# }
# ],
# "name": "pl_1"
# },
# {
# "entries": [
# {
# "action": "remark",
# "description": "TEST_PL1_2",
# "prefix": null,
# "sequence": 2
# }
# ],
# "name": "pl_2"
# }
# ]
# }
# ],
# "running_config": null,
# "state": "replaced"
# }
# }
# }
#------------------------------------------------------------------
# Using deleted:
# -------------
# Before state:
#RP/0/0/CPU0:10#show running-config
#
# ipv6 prefix-list pl_1
# 1 deny 2001:db8:1234::/48
# !
# ipv6 prefix-list pl_2
# 2 remark TEST_PL_2_REMARK
# !
# ipv4 prefix-list pl1
# 3 remark TEST_PL1_2_REMARK
# 4 permit 10.0.0.0/24
# !
# ipv4 prefix-list pl2
# 5 remark TEST_PL2_REMARK
- name: Delete all prefix-lists from the device
cisco.iosxr.iosxr_prefix_lists:
state: deleted
# After state:
#RP/0/0/CPU0:10#show running-config
#
#
# Module Execution:
#
# "after": [],
# "before": [
# {
# "afi": "ipv6",
# "prefix_lists": [
# {
# "entries": [
# {
# "action": "deny",
# "prefix": "2001:db8:1234::/48",
# "sequence": 1
# }
# ],
# "name": "pl_1"
# },
# {
# "entries": [
# {
# "action": "remark",
# "description": "TEST_PL1_2",
# "sequence": 2
# }
# ],
# "name": "pl_2"
# }
# ]
# },
# {
# "afi": "ipv4",
# "prefix_lists": [
# {
# "entries": [
# {
# "action": "permit",
# "prefix": "10.0.0.0/24",
# "sequence": 3
# }
# ],
# "name": "pl1"
# },
# {
# "entries": [
# {
# "action": "remark",
# "description": "TEST_PL2_REMARK",
# "sequence": 5
# }
# ],
# "name": "pl2"
# }
# ]
# }
# ],
# "changed": true,
# "commands": [
# "no ipv6 prefix-list pl_1",
# "no ipv6 prefix-list pl_2",
# "no ipv4 prefix-list pl1",
# "no ipv4 prefix-list pl2"
# ],
# "invocation": {
# "module_args": {
# "config": null,
# "running_config": null,
# "state": "deleted"
# }
# }
# }
#---------------------------------------------------------------------------------
#
# using gathered:
# --------------
# Before state:
#RP/0/0/CPU0:10#show running-config
#
# ipv6 prefix-list pl_1
# 1 deny 2001:db8:1234::/48
# !
# ipv6 prefix-list pl_2
# 2 remark TEST_PL_2_REMARK
# !
# ipv4 prefix-list pl1
# 3 remark TEST_PL1_2_REMARK
# 4 permit 10.0.0.0/24
# !
# ipv4 prefix-list pl2
# 5 remark TEST_PL2_REMARK
#
- name: Gather ACL interfaces facts using gathered state
cisco.iosxr.iosxr_prefix_lists:
state: gathered
#
# Module Execution:
#
# "gathered": [
# {
# "afi": "ipv6",
# "prefix_lists": [
# {
# "entries": [
# {
# "action": "deny",
# "prefix": "2001:db8:1234::/48",
# "sequence": 1
# }
# ],
# "name": "pl_1"
# },
# {
# "entries": [
# {
# "action": "remark",
# "description": "TEST_PL_2_REMARK",
# "sequence": 2
# }
# ],
# "name": "pl_2"
# }
# ]
# },
# {
# "afi": "ipv4",
# "prefix_lists": [
# {
# "entries": [
# {
# "action": "remark",
# "description": "TEST_PL1_2_REMARK",
# "sequence": 3
# },
# {
# "action": "permit",
# "prefix": "10.0.0.0/24",
# "sequence": 4
# }
# ],
# "name": "pl1"
# },
# {
# "entries": [
# {
# "action": "remark",
# "description": "TEST_PL2_REMARK",
# "sequence": 5
# }
# ],
# "name": "pl2"
# }
# ]
# }
# ],
# "changed": false,
#--------------------------------------------------------------------------
# Using parsed:
# --------------
#
# parsed.cfg
#------------------------------
# ipv6 prefix-list pl_1
# 1 deny 2001:db8:1234::/48
# !
# ipv6 prefix-list pl_2
# 2 remark TEST_PL_2_REMARK
# !
# ipv4 prefix-list pl1
# 3 remark TEST_PL1_2_REMARK
# 4 permit 10.0.0.0/24
# !
# ipv4 prefix-list pl2
# 5 remark TEST_PL2_REMARK
#
#
- name: Parse externally provided Prefix_lists config to agnostic model
cisco.iosxr.iosxr_prefix_lists:
running_config: "{{ lookup('file', './fixtures/parsed.cfg') }}"
state: parsed
#
# Module execution:
#"parsed": [
# {
# "afi": "ipv6",
# "prefix_lists": [
# {
# "entries": [
# {
# "action": "deny",
# "prefix": "2001:db8:1234::/48",
# "sequence": 1
# }
# ],
# "name": "pl_1"
# },
# {
# "entries": [
# {
# "action": "remark",
# "description": "TEST_PL_2_REMARK",
# "sequence": 2
# }
# ],
# "name": "pl_2"
# }
# ]
# },
# {
# "afi": "ipv4",
# "prefix_lists": [
# {
# "entries": [
# {
# "action": "remark",
# "description": "TEST_PL1_2_REMARK",
# "sequence": 3
# },
# {
# "action": "permit",
# "prefix": "10.0.0.0/24",
# "sequence": 4
# }
# ],
# "name": "pl1"
# },
# {
# "entries": [
# {
# "action": "remark",
# "description": "TEST_PL2_REMARK",
# "sequence": 5
# }
# ],
# "name": "pl2"
# }
# ]
# }
# ]
#
#----------------------------------------------------------------------------
# Using rendered:
# --------------
#
- name: Render platform specific commands from task input using rendered state
register: result
cisco.iosxr.iosxr_prefix_lists:
config:
- afi: ipv6
prefix_lists:
- name: pl_1
entries:
- prefix: 2001:db8:1234::/48
action: deny
sequence: 1
- name: pl_2
entries:
- sequence: 2
action: remark
description: TEST_PL_2_REMARK
- afi: ipv4
prefix_lists:
- name: pl1
entries:
- sequence: 3
action: remark
description: TEST_PL1_2_REMARK
- sequence: 4
action: permit
prefix: 10.0.0.0/24
- name: pl2
entries:
- sequence: 5
action: remark
description: TEST_PL2_REMARK
state: rendered
# After state:
# Module Execution:
# "rendered": [
# "ipv6 prefix-list pl_1 1 deny 2001:db8:1234::/48",
# "ipv6 prefix-list pl_2 2 remark TEST_PL_2_REMARK",
# "ipv4 prefix-list pl1 3 remark TEST_PL1_2_REMARK",
# "ipv4 prefix-list pl1 4 permit 10.0.0.0/24",
# "ipv4 prefix-list pl2 5 remark TEST_PL2_REMARK"
# ]
#
#---------------------------------------------------------------------------------
# Using overridden:
# --------------
# Before state:
#RP/0/0/CPU0:10#show running-config
#
# ipv6 prefix-list pl_1
# 1 deny 2001:db8:1234::/48
# !
# ipv6 prefix-list pl_2
# 2 remark TEST_PL_2_REMARK
# !
# ipv4 prefix-list pl1
# 3 remark TEST_PL1_2_REMARK
# 4 permit 10.0.0.0/24
# !
# ipv4 prefix-list pl2
# 5 remark TEST_PL2_REMARK
#
- name: Overridde all Prefix_lists configuration with provided configuration
cisco.iosxr.iosxr_prefix_lists:
config:
- afi: ipv4
prefix_lists:
- name: pl3
entries:
- sequence: 3
action: remark
description: TEST_PL1_3_REMARK
- sequence: 4
action: permit
prefix: 10.0.0.0/24
state: overridden
# After state:
#RP/0/0/CPU0:10#show running-config
#
#ipv4 prefix-list pl3
# 3 remark TEST_PL1_3_REMARK
# 4 permit 10.0.0.0/24
#!
# # Module Execution:
# "after": [
# {
# "afi": "ipv4",
# "prefix_lists": [
# {
# "entries": [
# {
# "action": "remark",
# "description": "TEST_PL1_3_REMARK",
# "sequence": 3
# },
# {
# "action": "permit",
# "prefix": "10.0.0.0/24",
# "sequence": 4
# }
# ],
# "name": "pl3"
# }
# ]
# }
# ],
# "before": [
# {
# "afi": "ipv6",
# "prefix_lists": [
# {
# "entries": [
# {
# "action": "deny",
# "prefix": "2001:db8:1234::/48",
# "sequence": 1
# }
# ],
# "name": "pl_1"
# },
# {
# "entries": [
# {
# "action": "remark",
# "description": "TEST_PL_2_REMARK",
# "sequence": 2
# }
# ],
# "name": "pl_2"
# }
# ]
# },
# {
# "afi": "ipv4",
# "prefix_lists": [
# {
# "entries": [
# {
# "action": "remark",
# "description": "TEST_PL1_2_REMARK",
# "sequence": 3
# },
# {
# "action": "permit",
# "prefix": "10.0.0.0/24",
# "sequence": 4
# }
# ],
# "name": "pl1"
# },
# {
# "entries": [
# {
# "action": "remark",
# "description": "TEST_PL2_REMARK",
# "sequence": 5
# }
# ],
# "name": "pl2"
# }
# ]
# }
# ],
# "changed": true,
# "commands": [
# "no ipv6 prefix-list pl_1",
# "no ipv6 prefix-list pl_2",
# "no ipv4 prefix-list pl1",
# "no ipv4 prefix-list pl2",
# "ipv4 prefix-list pl3 3 remark TEST_PL1_3_REMARK",
# "ipv4 prefix-list pl3 4 permit 10.0.0.0/24"
# ],
# "invocation": {
# "module_args": {
# "config": [
# {
# "afi": "ipv4",
# "prefix_lists": [
# {
# "entries": [
# {
# "action": "remark",
# "description": "TEST_PL1_3_REMARK",
# "prefix": null,
# "sequence": 3
# },
# {
# "action": "permit",
# "description": null,
# "prefix": "10.0.0.0/24",
# "sequence": 4
# }
# ],
# "name": "pl3"
# }
# ]
# }
# ],
# "running_config": null,
# "state": "overridden"
# }
# }
# }
#
"""
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.prefix_lists.prefix_lists import (
Prefix_listsArgs,
)
from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.config.prefix_lists.prefix_lists import (
Prefix_lists,
)
def main():
"""
Main entry point for module execution
:returns: the result form module invocation
"""
module = AnsibleModule(
argument_spec=Prefix_listsArgs.argument_spec,
mutually_exclusive=[["config", "running_config"]],
required_if=[
["state", "merged", ["config"]],
["state", "replaced", ["config"]],
["state", "overridden", ["config"]],
["state", "rendered", ["config"]],
["state", "parsed", ["running_config"]],
],
supports_check_mode=True,
)
result = Prefix_lists(module).execute_module()
module.exit_json(**result)
if __name__ == "__main__":
main()
| 30.162304
| 132
| 0.339698
| 2,128
| 28,805
| 4.457237
| 0.115132
| 0.013495
| 0.072746
| 0.085398
| 0.682657
| 0.665999
| 0.636373
| 0.622773
| 0.611597
| 0.611597
| 0
| 0.063138
| 0.527131
| 28,805
| 954
| 133
| 30.19392
| 0.633213
| 0.009512
| 0
| 0.817691
| 0
| 0.001079
| 0.967298
| 0.031404
| 0
| 0
| 0
| 0
| 0
| 1
| 0.001079
| false
| 0
| 0.004315
| 0
| 0.005394
| 0.001079
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
622e209dad974f6d52e64bfba122117adf524560
| 7,580
|
py
|
Python
|
messaging/tests/webhook_tests.py
|
ChrisMarsh82/iogt
|
8141421a79b73bd038880a3be92fa6809adced13
|
[
"BSD-2-Clause"
] | 20
|
2021-04-29T12:36:25.000Z
|
2022-03-27T12:17:41.000Z
|
messaging/tests/webhook_tests.py
|
ChrisMarsh82/iogt
|
8141421a79b73bd038880a3be92fa6809adced13
|
[
"BSD-2-Clause"
] | 892
|
2021-02-02T13:56:06.000Z
|
2022-03-31T11:25:44.000Z
|
messaging/tests/webhook_tests.py
|
ChrisMarsh82/iogt
|
8141421a79b73bd038880a3be92fa6809adced13
|
[
"BSD-2-Clause"
] | 28
|
2021-02-19T19:28:37.000Z
|
2022-03-11T11:46:00.000Z
|
from base64 import b64encode
from django.core import management
from django.test import override_settings
from django.urls import reverse
from rest_framework.test import APITestCase
from home.models import User
from messaging.factories import ThreadFactory
from messaging.models import Message, Attachment
class RapidProWebhookTest(APITestCase):
@override_settings(RAPIDPRO_BOT_USER_USERNAME='rb1', RAPIDPRO_BOT_USER_PASSWORD='rapidpassword1')
def setUp(self) -> None:
management.call_command('sync_rapidpro_bot_user')
self.bot_user = User.objects.first()
self.client.credentials(HTTP_AUTHORIZATION="Basic {}".format(
b64encode(bytes(f"rb1:rapidpassword1", "utf-8")).decode("ascii")
))
@override_settings(
RAPIDPRO_BOT_USER_USERNAME='rb1',
RAPIDPRO_BOT_USER_PASSWORD='rapidpassword1',
RAPIDPRO_BOT_USER_ID=1
)
def test_webhook_stitches_messages(self):
thread = ThreadFactory()
rapidpro_data_list = [
{
"id": "1",
"text": "Some message with the first part of text. First part ends at the exclamation mark!",
"to": str(thread.uuid),
"from": "abcd",
"channel": "bd3577c6-65b1-4bb7-9611-306c11b1dcc5",
"quick_replies": [
"Baby (0 to 23 months old)", "Young child (2 to 9 years)", "Teenager (10 to 17 years)"
]
},
{
"id": "1",
"text": "The second part starts here",
"to": str(thread.uuid),
"from": "abcd",
"channel": "bd3577c6-65b1-4bb7-9611-306c11b1dcc5",
"quick_replies": [
"Baby (0 to 23 months old)", "Young child (2 to 9 years)", "Teenager (10 to 17 years)"
]
},
]
for data in rapidpro_data_list:
response = self.client.post(path=reverse('messaging:api:rapidpro_webhook'), data=data, format='json')
message = Message.objects.first()
self.assertEqual(response.status_code, 200)
self.assertEqual(Message.objects.count(), 1)
self.assertEqual(message.text, 'Some message with the first part of text.'
' First part ends at the exclamation mark!The second part starts here')
self.assertEqual(len(message.quick_replies), 3)
@override_settings(
RAPIDPRO_BOT_USER_USERNAME='rb1',
RAPIDPRO_BOT_USER_PASSWORD='rapidpassword1',
RAPIDPRO_BOT_USER_ID=1
)
def test_webhook_parses_attachments(self):
thread = ThreadFactory()
rapidpro_data = {
"id": "1",
"text": "Some message with attachment.\nhttps://rapidpro.idems.international/media/attachments/43/"
"15890/steps/3de4f80a-1eab-42db-8b7e-d7c35edecd06.bin",
"to": str(thread.uuid),
"from": "abcd",
"channel": "bd3577c6-65b1-4bb7-9611-306c11b1dcc5",
"quick_replies": [
"Baby (0 to 23 months old)", "Young child (2 to 9 years)", "Teenager (10 to 17 years)"]}
response = self.client.post(path=reverse('messaging:api:rapidpro_webhook'), data=rapidpro_data, format='json')
message = thread.get_renderable_messages().first()
attachment = message.attachments.all()[0]
self.assertEqual(response.status_code, 200)
self.assertEqual(Message.objects.count(), 1)
self.assertEqual(message.attachments.all().count(), 1)
self.assertEqual(message.text, 'Some message with attachment.')
self.assertEqual(attachment.external_link,
'https://rapidpro.idems.international/media/attachments/43/15890/steps/'
'3de4f80a-1eab-42db-8b7e-d7c35edecd06.bin')
self.assertIsNotNone(attachment.file)
@override_settings(
RAPIDPRO_BOT_USER_USERNAME='rb1',
RAPIDPRO_BOT_USER_PASSWORD='rapidpassword1',
RAPIDPRO_BOT_USER_ID=1
)
def test_stitched_attachment_parsing(self):
thread = ThreadFactory()
rapidpro_data_list = [
{
"id": "1",
"text": "Some message with a stitched url.\nhttp://www.internet.com/12345",
"to": str(thread.uuid),
"from": "abcd",
"channel": "bd3577c6-65b1-4bb7-9611-306c11b1dcc5",
"quick_replies": [
"Baby (0 to 23 months old)", "Young child (2 to 9 years)", "Teenager (10 to 17 years)"
]
},
{
"id": "1",
"text": "678910.jpg",
"to": str(thread.uuid),
"from": "abcd",
"channel": "bd3577c6-65b1-4bb7-9611-306c11b1dcc5",
"quick_replies": [
"Baby (0 to 23 months old)", "Young child (2 to 9 years)", "Teenager (10 to 17 years)"
]
},
]
for data in rapidpro_data_list:
response = self.client.post(path=reverse('messaging:api:rapidpro_webhook'), data=data, format='json')
message = thread.get_renderable_messages().first()
attachment = message.attachments.first()
self.assertEqual(response.status_code, 200)
self.assertEqual(Message.objects.count(), 1)
self.assertEqual(message.text, 'Some message with a stitched url.')
self.assertEqual(message.attachments.count(), 1)
self.assertEqual(attachment.external_link, 'http://www.internet.com/12345678910.jpg')
self.assertEqual(len(message.quick_replies), 3)
@override_settings(
RAPIDPRO_BOT_USER_USERNAME='rb1',
RAPIDPRO_BOT_USER_PASSWORD='rapidpassword1',
RAPIDPRO_BOT_USER_ID=1
)
def test_single_download(self):
thread = ThreadFactory()
rapidpro_data_list = [
{
"id": "1",
"text": "Some message with attachment \nhttps://via.placeholder.com/200",
"to": str(thread.uuid),
"from": "abcd",
"channel": "bd3577c6-65b1-4bb7-9611-306c11b1dcc5",
"quick_replies": [
"Baby (0 to 23 months old)", "Young child (2 to 9 years)", "Teenager (10 to 17 years)"
]
},
{
"id": "2",
"text": "Another message with the same attachment \nhttps://via.placeholder.com/200",
"to": str(thread.uuid),
"from": "abcd",
"channel": "bd3577c6-65b1-4bb7-9611-306c11b1dcc5",
"quick_replies": [
"Baby (0 to 23 months old)", "Young child (2 to 9 years)", "Teenager (10 to 17 years)"
]
},
]
for data in rapidpro_data_list:
response = self.client.post(path=reverse('messaging:api:rapidpro_webhook'), data=data, format='json')
messages = thread.get_renderable_messages()
self.assertEqual(response.status_code, 200)
self.assertEqual(len(messages), 2)
self.assertEqual(messages[0].text, 'Another message with the same attachment ')
self.assertEqual(messages[1].text, 'Some message with attachment ')
self.assertEqual(Attachment.objects.count(), 1)
attachment = Attachment.objects.first()
self.assertEqual('https://via.placeholder.com/200', attachment.external_link)
self.assertIsNotNone(attachment.image)
| 39.072165
| 118
| 0.583377
| 810
| 7,580
| 5.328395
| 0.190123
| 0.072984
| 0.052132
| 0.035218
| 0.77595
| 0.745829
| 0.745598
| 0.724282
| 0.68304
| 0.67215
| 0
| 0.06331
| 0.297757
| 7,580
| 193
| 119
| 39.274611
| 0.747511
| 0
| 0
| 0.503145
| 0
| 0
| 0.290672
| 0.064125
| 0
| 0
| 0
| 0
| 0.144654
| 1
| 0.031447
| false
| 0.037736
| 0.050314
| 0
| 0.08805
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6231a08296d5cba51f00e80b98aac829abec79a7
| 914
|
py
|
Python
|
stubs/micropython-v1_11-esp8266/framebuf.py
|
mattytrentini/micropython-stubs
|
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
|
[
"MIT"
] | null | null | null |
stubs/micropython-v1_11-esp8266/framebuf.py
|
mattytrentini/micropython-stubs
|
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
|
[
"MIT"
] | null | null | null |
stubs/micropython-v1_11-esp8266/framebuf.py
|
mattytrentini/micropython-stubs
|
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
|
[
"MIT"
] | null | null | null |
"""
Module: 'framebuf' on esp8266 v1.11
"""
# MCU: (sysname='esp8266', nodename='esp8266', release='2.2.0-dev(9422289)', version='v1.11-8-g48dcbbe60 on 2019-05-29', machine='ESP module with ESP8266')
# Stubber: 1.1.0 - updated
from typing import Any
class FrameBuffer:
""""""
def blit(self, *args) -> Any:
pass
def fill(self, *args) -> Any:
pass
def fill_rect(self, *args) -> Any:
pass
def hline(self, *args) -> Any:
pass
def line(self, *args) -> Any:
pass
def pixel(self, *args) -> Any:
pass
def rect(self, *args) -> Any:
pass
def scroll(self, *args) -> Any:
pass
def text(self, *args) -> Any:
pass
def vline(self, *args) -> Any:
pass
def FrameBuffer1(*args) -> Any:
pass
GS2_HMSB = 5
GS4_HMSB = 2
GS8 = 6
MONO_HLSB = 3
MONO_HMSB = 4
MONO_VLSB = 0
MVLSB = 0
RGB565 = 1
| 16.618182
| 155
| 0.559081
| 129
| 914
| 3.914729
| 0.457364
| 0.152475
| 0.239604
| 0.29703
| 0.388119
| 0.174257
| 0
| 0
| 0
| 0
| 0
| 0.096923
| 0.28884
| 914
| 54
| 156
| 16.925926
| 0.68
| 0.23523
| 0
| 0.34375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.34375
| false
| 0.34375
| 0.03125
| 0
| 0.40625
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
655d7301d9eb614889370189306e8c4bb3e6aa82
| 121
|
py
|
Python
|
bsync/__main__.py
|
spacetelescope/bsync
|
ea95061c7d71300e82128d13418f7d87ef960fe0
|
[
"Apache-2.0"
] | null | null | null |
bsync/__main__.py
|
spacetelescope/bsync
|
ea95061c7d71300e82128d13418f7d87ef960fe0
|
[
"Apache-2.0"
] | null | null | null |
bsync/__main__.py
|
spacetelescope/bsync
|
ea95061c7d71300e82128d13418f7d87ef960fe0
|
[
"Apache-2.0"
] | null | null | null |
import sys
from bsync.cli import bsync
if __name__ == '__main__':
bsync.main(sys.argv[1:], standalone_mode=False)
| 15.125
| 51
| 0.719008
| 18
| 121
| 4.333333
| 0.722222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009804
| 0.157025
| 121
| 7
| 52
| 17.285714
| 0.754902
| 0
| 0
| 0
| 0
| 0
| 0.066116
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
656addc62b1dfabaed39d3c13be1b2397c94fc3a
| 266
|
py
|
Python
|
combine/files/template.py
|
rohan-pednekar/combine
|
23206e1a7a34800acd34beedeea018fb48591633
|
[
"MIT"
] | 5
|
2021-01-25T19:40:04.000Z
|
2022-01-02T13:45:45.000Z
|
combine/files/template.py
|
rohan-pednekar/combine
|
23206e1a7a34800acd34beedeea018fb48591633
|
[
"MIT"
] | 14
|
2018-07-06T17:19:33.000Z
|
2021-12-22T18:05:57.000Z
|
combine/files/template.py
|
rohan-pednekar/combine
|
23206e1a7a34800acd34beedeea018fb48591633
|
[
"MIT"
] | 3
|
2019-02-12T10:05:45.000Z
|
2021-11-16T04:32:43.000Z
|
from ..jinja.references import get_references_in_path
from .ignored import IgnoredFile
class TemplateFile(IgnoredFile):
def _render_to_output(self, output_path, jinja_environment):
self.references = get_references_in_path(self.path, jinja_environment)
| 33.25
| 78
| 0.81203
| 34
| 266
| 6
| 0.5
| 0.127451
| 0.147059
| 0.186275
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.120301
| 266
| 7
| 79
| 38
| 0.871795
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0
| 0.8
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
65717f2082c42be4a95cb0b4387492dfa2cd932c
| 353
|
py
|
Python
|
filter2.py
|
WillSmithTE/arl-eegmodels
|
08cd6e98592abb8a12425cbfc2cd2d05ef1476d3
|
[
"CC0-1.0"
] | null | null | null |
filter2.py
|
WillSmithTE/arl-eegmodels
|
08cd6e98592abb8a12425cbfc2cd2d05ef1476d3
|
[
"CC0-1.0"
] | null | null | null |
filter2.py
|
WillSmithTE/arl-eegmodels
|
08cd6e98592abb8a12425cbfc2cd2d05ef1476d3
|
[
"CC0-1.0"
] | null | null | null |
from eeg_filters.upload import prepare_data
from eeg_filters.filters import show_plot
sample_rate, list_times, list_ticks, list_out = prepare_data('input/data.txt')
show_plot(list_times,list_ticks,list_out,[1, 200],sample_rate,3,2,0.003)
show_plot(list_times,list_ticks,list_out,[1, 200],sample_rate,max_region=[0.08,0.104],min_region=[0.105,0.14])
| 35.3
| 110
| 0.8017
| 67
| 353
| 3.910448
| 0.447761
| 0.091603
| 0.148855
| 0.206107
| 0.454198
| 0.454198
| 0.358779
| 0.358779
| 0.358779
| 0.358779
| 0
| 0.084592
| 0.062323
| 353
| 9
| 111
| 39.222222
| 0.706949
| 0
| 0
| 0
| 0
| 0
| 0.03966
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.4
| 0
| 0.4
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
65ea30a6a7206e91ebeb66c079784234033a4f3e
| 179
|
py
|
Python
|
database/engineers.py
|
xod442/argus
|
e13bf4be756b9084a554754e33b61cf2098a2887
|
[
"Apache-2.0"
] | null | null | null |
database/engineers.py
|
xod442/argus
|
e13bf4be756b9084a554754e33b61cf2098a2887
|
[
"Apache-2.0"
] | null | null | null |
database/engineers.py
|
xod442/argus
|
e13bf4be756b9084a554754e33b61cf2098a2887
|
[
"Apache-2.0"
] | null | null | null |
from mongoengine import signals
from flask import url_for
import os
from application import db
class Engineers(db.Document):
name = db.IntField(db_field="n", required=True)
| 19.888889
| 51
| 0.782123
| 27
| 179
| 5.111111
| 0.703704
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145251
| 179
| 8
| 52
| 22.375
| 0.901961
| 0
| 0
| 0
| 0
| 0
| 0.005587
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
029eb1c4a56892936f00b18b213b711422eedc05
| 174
|
py
|
Python
|
factory_method/database.py
|
rlelito/DesignPatterns
|
4e59442a10c1407ed4d9cdceea790263c30223b3
|
[
"MIT"
] | null | null | null |
factory_method/database.py
|
rlelito/DesignPatterns
|
4e59442a10c1407ed4d9cdceea790263c30223b3
|
[
"MIT"
] | null | null | null |
factory_method/database.py
|
rlelito/DesignPatterns
|
4e59442a10c1407ed4d9cdceea790263c30223b3
|
[
"MIT"
] | null | null | null |
from abc import ABC
from abc import abstractmethod
class DataBase(ABC):
@staticmethod
@abstractmethod
def execute_select(spec_query: str) -> None:
pass
| 17.4
| 48
| 0.706897
| 21
| 174
| 5.761905
| 0.714286
| 0.115702
| 0.214876
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.229885
| 174
| 9
| 49
| 19.333333
| 0.902985
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0.142857
| 0.285714
| 0
| 0.571429
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
02b2cd8d0a4f7f3fb5e8976bf802baba172bb20c
| 498
|
py
|
Python
|
sumo/symmetry/__init__.py
|
pzarabadip/sumo
|
c6b4bf85aafd537601a679334848941089bbf540
|
[
"MIT"
] | 108
|
2018-04-21T16:58:18.000Z
|
2022-03-29T06:44:29.000Z
|
sumo/symmetry/__init__.py
|
pzarabadip/sumo
|
c6b4bf85aafd537601a679334848941089bbf540
|
[
"MIT"
] | 148
|
2018-04-17T12:29:09.000Z
|
2022-03-21T15:30:37.000Z
|
sumo/symmetry/__init__.py
|
pzarabadip/sumo
|
c6b4bf85aafd537601a679334848941089bbf540
|
[
"MIT"
] | 57
|
2018-05-10T00:51:44.000Z
|
2022-02-28T05:37:59.000Z
|
# Copyright (c) Scanlon Materials Theory Group
# Distributed under the terms of the MIT License.
"""
Package containing functions for symmetry and k-point paths.
"""
from sumo.symmetry.kpath import Kpath # isort:skip
from sumo.symmetry.brad_crack_kpath import BradCrackKpath
from sumo.symmetry.custom_kpath import CustomKpath
from sumo.symmetry.latimer_munro_kpath import LatimerKpath
from sumo.symmetry.pymatgen_kpath import PymatgenKpath
from sumo.symmetry.seekpath_kpath import SeekpathKpath
| 35.571429
| 60
| 0.835341
| 68
| 498
| 6.014706
| 0.588235
| 0.117359
| 0.234719
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.110442
| 498
| 13
| 61
| 38.307692
| 0.923251
| 0.331325
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
02d2ffd267bee188ece752cf402fd52f9ef75d24
| 47
|
py
|
Python
|
wealthbot/client/__init__.py
|
jliev/wealthbot_chatterbot
|
f6681da8e5f833990ccd321e166994f31253353f
|
[
"MIT"
] | 1
|
2019-04-22T07:20:31.000Z
|
2019-04-22T07:20:31.000Z
|
wealthbot/client/__init__.py
|
jliev/wealthbot_chatterbot
|
f6681da8e5f833990ccd321e166994f31253353f
|
[
"MIT"
] | null | null | null |
wealthbot/client/__init__.py
|
jliev/wealthbot_chatterbot
|
f6681da8e5f833990ccd321e166994f31253353f
|
[
"MIT"
] | null | null | null |
default_app_config = 'client.apps.ClientConfig'
| 47
| 47
| 0.851064
| 6
| 47
| 6.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.042553
| 47
| 1
| 47
| 47
| 0.844444
| 0
| 0
| 0
| 0
| 0
| 0.5
| 0.5
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
02dad1ea4b949ab007cbcff3a976e0246152cd12
| 317
|
py
|
Python
|
certleak/actions/__init__.py
|
d-Rickyy-b/certleak
|
377f6e7215e3d540f1e137163f1128991aaac07d
|
[
"MIT"
] | null | null | null |
certleak/actions/__init__.py
|
d-Rickyy-b/certleak
|
377f6e7215e3d540f1e137163f1128991aaac07d
|
[
"MIT"
] | null | null | null |
certleak/actions/__init__.py
|
d-Rickyy-b/certleak
|
377f6e7215e3d540f1e137163f1128991aaac07d
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
from .basicaction import BasicAction
from .databaseaction import DatabaseAction
from .logaction import LogAction
from .savefileaction import SaveFileAction
from .savejsonaction import SaveJSONAction
__all__ = ["BasicAction", "LogAction", "DatabaseAction", "SaveFileAction", "SaveJSONAction"]
| 35.222222
| 92
| 0.798107
| 29
| 317
| 8.586207
| 0.37931
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003521
| 0.104101
| 317
| 8
| 93
| 39.625
| 0.873239
| 0.066246
| 0
| 0
| 0
| 0
| 0.210884
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.833333
| 0
| 0.833333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
02e6493123a8c2b8288636162c9f7c84440fef2d
| 336
|
py
|
Python
|
fSendCtrlCForProcessId.py
|
SkyLined/mWindowsAPI
|
d64d57bbf87d2a7b33cf7de89263553793484a84
|
[
"CC-BY-4.0"
] | 7
|
2017-10-09T14:32:22.000Z
|
2021-01-30T07:25:50.000Z
|
fSendCtrlCForProcessId.py
|
SkyLined/mWindowsAPI
|
d64d57bbf87d2a7b33cf7de89263553793484a84
|
[
"CC-BY-4.0"
] | 2
|
2017-12-12T02:53:18.000Z
|
2019-02-19T09:23:18.000Z
|
fSendCtrlCForProcessId.py
|
SkyLined/mWindowsAPI
|
d64d57bbf87d2a7b33cf7de89263553793484a84
|
[
"CC-BY-4.0"
] | 1
|
2017-12-12T02:42:18.000Z
|
2017-12-12T02:42:18.000Z
|
from mWindowsSDK import *;
from .fThrowLastError import fThrowLastError;
def fSendCtrlCForProcessId(uProcessId):
oKernel32 = foLoadKernel32DLL();
if not oKernel32.GenerateConsoleCtrlEvent(CTRL_BREAK_EVENT, uProcessId):
fThrowLastError("GenerateConsoleCtrlEvent(0x%08X, %d/0x%X)" % (CTRL_BREAK_EVENT, uProcessId, uProcessId,));
| 42
| 111
| 0.803571
| 32
| 336
| 8.3125
| 0.59375
| 0.067669
| 0.105263
| 0.180451
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.032895
| 0.095238
| 336
| 7
| 112
| 48
| 0.842105
| 0
| 0
| 0
| 1
| 0
| 0.122024
| 0.095238
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
f3139c1fda47d39a42a3b6f311f1d825657009eb
| 300
|
py
|
Python
|
Project_2/preprocessors/sparse_to_dense.py
|
TitoGrine/IART_Project
|
a387cface38473fa90e132207847887b43a69cec
|
[
"MIT"
] | null | null | null |
Project_2/preprocessors/sparse_to_dense.py
|
TitoGrine/IART_Project
|
a387cface38473fa90e132207847887b43a69cec
|
[
"MIT"
] | null | null | null |
Project_2/preprocessors/sparse_to_dense.py
|
TitoGrine/IART_Project
|
a387cface38473fa90e132207847887b43a69cec
|
[
"MIT"
] | null | null | null |
from sklearn.base import BaseEstimator, TransformerMixin
class SparseToDense(BaseEstimator, TransformerMixin):
def fit(self, X, y=None):
return self
def inverse_transform(self, X):
return [" ".join(doc) for doc in X]
def transform(self, X):
return X.toarray()
| 23.076923
| 56
| 0.67
| 37
| 300
| 5.405405
| 0.594595
| 0.075
| 0.14
| 0.2
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.23
| 300
| 12
| 57
| 25
| 0.865801
| 0
| 0
| 0
| 0
| 0
| 0.003333
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.375
| false
| 0
| 0.125
| 0.375
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
f31d500e49fa08500603a5ae701392e3acbaa7ae
| 33
|
py
|
Python
|
data/studio21_generated/introductory/4420/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/introductory/4420/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/introductory/4420/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
def mult_primefactor_sum(a, b):
| 16.5
| 31
| 0.757576
| 6
| 33
| 3.833333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121212
| 33
| 2
| 32
| 16.5
| 0.793103
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b838407b86162c7a9d8da7c6a1838723dbfe8484
| 96
|
py
|
Python
|
src/0319.bulb-switcher/bulb-switcher.py
|
lyphui/Just-Code
|
e0c3c3ecb67cb805080ff686e88522b2bffe7741
|
[
"MIT"
] | 782
|
2019-11-19T08:20:49.000Z
|
2022-03-25T06:59:09.000Z
|
src/0319.bulb-switcher/bulb-switcher.py
|
Heitao5200/Just-Code
|
5bb3ee485a103418e693b7ec8e26dc84f3691c79
|
[
"MIT"
] | 1
|
2021-03-04T12:21:01.000Z
|
2021-03-05T01:23:54.000Z
|
src/0319.bulb-switcher/bulb-switcher.py
|
Heitao5200/Just-Code
|
5bb3ee485a103418e693b7ec8e26dc84f3691c79
|
[
"MIT"
] | 155
|
2019-11-20T08:20:42.000Z
|
2022-03-19T07:28:09.000Z
|
class Solution:
def bulbSwitch(self, n: int) -> int:
return math.floor(math.sqrt(n))
| 32
| 40
| 0.635417
| 14
| 96
| 4.357143
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.21875
| 96
| 3
| 41
| 32
| 0.813333
| 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
| 0
| 0
|
0
| 4
|
b849b63dcaef2fc742646f637863a658710dc7ed
| 659
|
py
|
Python
|
v8_7_5/test/wasm-spec-tests/testcfg.py
|
wenfeifei/miniblink49
|
2ed562ff70130485148d94b0e5f4c343da0c2ba4
|
[
"Apache-2.0"
] | 5,964
|
2016-09-27T03:46:29.000Z
|
2022-03-31T16:25:27.000Z
|
v8_7_5/test/wasm-spec-tests/testcfg.py
|
w4454962/miniblink49
|
b294b6eacb3333659bf7b94d670d96edeeba14c0
|
[
"Apache-2.0"
] | 459
|
2016-09-29T00:51:38.000Z
|
2022-03-07T14:37:46.000Z
|
v8_7_5/test/wasm-spec-tests/testcfg.py
|
w4454962/miniblink49
|
b294b6eacb3333659bf7b94d670d96edeeba14c0
|
[
"Apache-2.0"
] | 1,006
|
2016-09-27T05:17:27.000Z
|
2022-03-30T02:46:51.000Z
|
# Copyright 2017 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from testrunner.local import testsuite
from testrunner.objects import testcase
class TestLoader(testsuite.JSTestLoader):
pass
class TestSuite(testsuite.TestSuite):
def _test_loader_class(self):
return TestLoader
def _test_class(self):
return TestCase
class TestCase(testcase.D8TestCase):
def _get_files_params(self):
return [os.path.join(self.suite.root, self.path + self._get_suffix())]
def GetSuite(*args, **kwargs):
return TestSuite(*args, **kwargs)
| 22.724138
| 74
| 0.760243
| 92
| 659
| 5.336957
| 0.608696
| 0.0611
| 0.0611
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010753
| 0.153263
| 659
| 28
| 75
| 23.535714
| 0.869176
| 0.23824
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.266667
| false
| 0.066667
| 0.2
| 0.266667
| 0.933333
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
b8bdbd61e7a4a1651754c7d2b64ef9e57283e751
| 87
|
py
|
Python
|
download.py
|
Zachary-zk/bCrawler
|
db29631d523905a9b41b3b094dbc5a26504c09c2
|
[
"Apache-2.0"
] | null | null | null |
download.py
|
Zachary-zk/bCrawler
|
db29631d523905a9b41b3b094dbc5a26504c09c2
|
[
"Apache-2.0"
] | null | null | null |
download.py
|
Zachary-zk/bCrawler
|
db29631d523905a9b41b3b094dbc5a26504c09c2
|
[
"Apache-2.0"
] | null | null | null |
def download(url, path):
sys.argv = ['you-get', '-o', path, url]
you_get.main()
| 29
| 43
| 0.574713
| 14
| 87
| 3.5
| 0.714286
| 0.244898
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.195402
| 87
| 3
| 44
| 29
| 0.7
| 0
| 0
| 0
| 0
| 0
| 0.102273
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b237151332774d930825fbf829962229760fd5eb
| 299
|
py
|
Python
|
cloudy-crocodiles/django/djangocities/cities/models.py
|
patryk-tech/summer-code-jam-2020
|
361fecf3a0f72a92d26d934cbda880cb44058e7b
|
[
"MIT"
] | 40
|
2020-08-02T07:38:22.000Z
|
2021-07-26T01:46:50.000Z
|
cloudy-crocodiles/django/djangocities/cities/models.py
|
patryk-tech/summer-code-jam-2020
|
361fecf3a0f72a92d26d934cbda880cb44058e7b
|
[
"MIT"
] | 134
|
2020-07-31T12:15:45.000Z
|
2020-12-13T04:42:19.000Z
|
cloudy-crocodiles/django/djangocities/cities/models.py
|
patryk-tech/summer-code-jam-2020
|
361fecf3a0f72a92d26d934cbda880cb44058e7b
|
[
"MIT"
] | 101
|
2020-07-31T12:00:47.000Z
|
2021-11-01T09:06:58.000Z
|
from django.db import models
class City(models.Model):
class Meta:
verbose_name_plural = "cities"
name = models.CharField(max_length=30, unique=True)
description = models.CharField(max_length=500)
slug = models.SlugField()
def __str__(self):
return self.slug
| 21.357143
| 55
| 0.685619
| 38
| 299
| 5.184211
| 0.710526
| 0.152284
| 0.182741
| 0.243655
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021368
| 0.217391
| 299
| 13
| 56
| 23
| 0.820513
| 0
| 0
| 0
| 0
| 0
| 0.020067
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.111111
| false
| 0
| 0.111111
| 0.111111
| 0.888889
| 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
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
b24c1e4f389af735f85e9f600d3ba865ade23051
| 185
|
py
|
Python
|
malcolm/modules/pandablocks/blocks/__init__.py
|
dinojugosloven/pymalcolm
|
0b856ee1113efdb42f2f3b15986f8ac5f9e1b35a
|
[
"Apache-2.0"
] | null | null | null |
malcolm/modules/pandablocks/blocks/__init__.py
|
dinojugosloven/pymalcolm
|
0b856ee1113efdb42f2f3b15986f8ac5f9e1b35a
|
[
"Apache-2.0"
] | null | null | null |
malcolm/modules/pandablocks/blocks/__init__.py
|
dinojugosloven/pymalcolm
|
0b856ee1113efdb42f2f3b15986f8ac5f9e1b35a
|
[
"Apache-2.0"
] | null | null | null |
from malcolm.yamlutil import make_block_creator, check_yaml_names
panda_manager_block = make_block_creator(__file__, "panda_manager_block.yaml")
__all__ = check_yaml_names(globals())
| 30.833333
| 78
| 0.848649
| 26
| 185
| 5.269231
| 0.576923
| 0.131387
| 0.233577
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.075676
| 185
| 5
| 79
| 37
| 0.80117
| 0
| 0
| 0
| 0
| 0
| 0.12973
| 0.12973
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
a22a8a10257b4c13f2724ea3efc5a513b8eeba61
| 479
|
py
|
Python
|
gym_open_ai/__init__.py
|
TomaszOdrzygozdz/gym-splendor
|
aeb00605e105628188143a4bbd6280e9eb41c4f9
|
[
"MIT"
] | 1
|
2020-03-09T18:56:01.000Z
|
2020-03-09T18:56:01.000Z
|
gym_open_ai/__init__.py
|
TomaszOdrzygozdz/gym-splendor
|
aeb00605e105628188143a4bbd6280e9eb41c4f9
|
[
"MIT"
] | null | null | null |
gym_open_ai/__init__.py
|
TomaszOdrzygozdz/gym-splendor
|
aeb00605e105628188143a4bbd6280e9eb41c4f9
|
[
"MIT"
] | 1
|
2019-10-25T13:09:40.000Z
|
2019-10-25T13:09:40.000Z
|
import distutils.version
import os
import sys
import warnings
from gym_open_ai import error
from gym_open_ai.version import VERSION as __version__
from gym_open_ai.core import Env, GoalEnv, Wrapper, ObservationWrapper, ActionWrapper, RewardWrapper
from gym_open_ai.spaces import Space
from gym_open_ai.envs.registration import make, spec, register
from gym_open_ai import logger
from gym_open_ai import vector
__all__ = ["Env", "Space", "Wrapper", "make", "spec", "register"]
| 29.9375
| 100
| 0.814196
| 72
| 479
| 5.111111
| 0.402778
| 0.133152
| 0.209239
| 0.247283
| 0.154891
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.11691
| 479
| 15
| 101
| 31.933333
| 0.869976
| 0
| 0
| 0
| 0
| 0
| 0.064718
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.916667
| 0
| 0.916667
| 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
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
a22fba7ba1fa5b1676fc7bf8c0c361ab6b68977e
| 36,566
|
py
|
Python
|
ixcom/messages.py
|
imar-navigation/ixcom-python
|
4c6d6de65f7942fb65b8a21d62e1be9767b48c30
|
[
"MIT"
] | 4
|
2019-08-12T13:20:55.000Z
|
2021-12-20T09:48:36.000Z
|
ixcom/messages.py
|
imar-navigation/ixcom-python
|
4c6d6de65f7942fb65b8a21d62e1be9767b48c30
|
[
"MIT"
] | 1
|
2020-04-23T19:04:49.000Z
|
2020-04-23T19:04:49.000Z
|
ixcom/messages.py
|
imar-navigation/ixcom-python
|
4c6d6de65f7942fb65b8a21d62e1be9767b48c30
|
[
"MIT"
] | 4
|
2019-08-13T09:36:54.000Z
|
2022-01-21T12:58:34.000Z
|
import struct
from .protocol import message, ProtocolPayload, MessageID, PayloadItem, Message
@message(MessageID.RESPONSE)
class ResponsePayload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'responseID', dimension = 1, datatype = 'H'),
PayloadItem(name = 'repsonseLength', dimension = 1, datatype = 'H'),
])
def __init__(self, msgLength):
self.message_description = Message([
PayloadItem(name = 'responseID', dimension = 1, datatype = 'H'),
PayloadItem(name = 'repsonseLength', dimension = 1, datatype = 'H'),
PayloadItem(name = 'responseText', dimension = msgLength-24, datatype = 's'),
])
super().__init__()
@message(0x40)
class POSTPROC_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'acc', dimension = 3, datatype = 'f', unit = 'm/s²', description = 'Specific force'),
PayloadItem(name = 'omg', dimension = 3, datatype = 'f', unit = 'rad/s', description = 'Angular rate'),
PayloadItem(name = 'delta_theta', dimension = 12, datatype = 'f'),
PayloadItem(name = 'delta_v', dimension = 12, datatype = 'f'),
PayloadItem(name = 'q_nb', dimension = 4, datatype = 'd'),
PayloadItem(name = 'pos', dimension = 3, datatype = 'd'),
PayloadItem(name = 'vel', dimension = 3, datatype = 'd', unit = 'm/s', description = 'NED Velocity'),
PayloadItem(name = 'sysStat', dimension = 1, datatype = 'I'),
PayloadItem(name = 'ekfStat', dimension = 2, datatype = 'I'),
PayloadItem(name = 'odoSpeed', dimension = 1, datatype = 'f'),
PayloadItem(name = 'odoTicks', dimension = 1, datatype = 'i'),
PayloadItem(name = 'odoInterval', dimension = 1, datatype = 'I'),
PayloadItem(name = 'odoTrigEvent', dimension = 1, datatype = 'I'),
PayloadItem(name = 'odoNextEvent', dimension = 1, datatype = 'I'),
])
@message(0x03)
class INSSOL_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'acc', dimension = 3, datatype = 'f', unit = 'm/s²', description = 'Acceleration'),
PayloadItem(name = 'omg', dimension = 3, datatype = 'f', unit = 'rad/s', description = 'Specific force'),
PayloadItem(name = 'rpy', dimension = 3, datatype = 'f', unit = 'rad', description = 'Angle'),
PayloadItem(name = 'vel', dimension = 3, datatype = 'f', unit = 'm/s', description = 'Velocity'),
PayloadItem(name = 'lon', dimension = 1, datatype = 'd', unit = 'rad', description = 'Longitude'),
PayloadItem(name = 'lat', dimension = 1, datatype = 'd', unit = 'rad', description = 'Latitude'),
PayloadItem(name = 'alt', dimension = 1, datatype = 'f', unit = 'm', description = 'Altitude'),
PayloadItem(name = 'undulation', dimension = 1, datatype = 'h', unit = 'cm', description = 'Undulation'),
PayloadItem(name = 'DatSel', dimension = 1, datatype = 'H'),
])
@message(0x47)
class INSSOLECEF_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'acc', dimension = 3, datatype = 'f'),
PayloadItem(name = 'omg', dimension = 3, datatype = 'f'),
PayloadItem(name = 'pos_ecef', dimension = 3, datatype = 'd'),
PayloadItem(name = 'vel_ecef', dimension = 3, datatype = 'f'),
PayloadItem(name = 'q_nb', dimension = 4, datatype = 'f'),
])
@message(0x48)
class EKFSTDDEVECEF_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'Pos', dimension = 3, datatype = 'f'),
PayloadItem(name = 'Vel', dimension = 3, datatype = 'f'),
PayloadItem(name = 'Rpy', dimension = 3, datatype = 'f'),
PayloadItem(name = 'BiasAcc', dimension = 3, datatype = 'f'),
PayloadItem(name = 'BiasOmg', dimension = 3, datatype = 'f'),
PayloadItem(name = 'MaAcc', dimension = 9, datatype = 'f'),
PayloadItem(name = 'MaOmg', dimension = 9, datatype = 'f'),
PayloadItem(name = 'ScfOdo', dimension = 1, datatype = 'f'),
PayloadItem(name = 'MaOdo', dimension = 2, datatype = 'f'),
])
@message(0x49)
class LOADFACTOR_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'LoadFactor', dimension = 3, datatype = 'f'),
])
@message(0x50)
class OMGDOT_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'AngAcc', dimension = 3, datatype = 'f'),
])
@message(0x56)
class IMU_FILTERED_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'Omg', dimension = 3, datatype = 'f'),
PayloadItem(name = 'Acc', dimension = 3, datatype = 'f'),
])
@message(0x65)
class MAGDATA2_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name='rawx', dimension=1, datatype='i'),
PayloadItem(name='rawy', dimension=1, datatype='i'),
PayloadItem(name='rawz', dimension=1, datatype='i'),
PayloadItem(name='bit_error', dimension=1, datatype='B'),
PayloadItem(name='reserved', dimension=3, datatype='B'),
])
@message(0x66)
class IPST_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name='omg', dimension=3, datatype='f'),
PayloadItem(name='acc', dimension=3, datatype='f'),
PayloadItem(name='system_status', dimension=1, datatype='I'),
PayloadItem(name='fpga_status', dimension=1, datatype='I'),
PayloadItem(name='odo_0_ticks', dimension=1, datatype='i'),
PayloadItem(name='odo_0_event', dimension=1, datatype='I'),
PayloadItem(name='odo_0_event_next', dimension=1, datatype='I'),
PayloadItem(name='odo_1_ticks', dimension=1, datatype='i'),
PayloadItem(name='odo_1_event', dimension=1, datatype='I'),
PayloadItem(name='odo_1_event_next', dimension=1, datatype='I'),
PayloadItem(name='odo_2_ticks', dimension=1, datatype='i'),
PayloadItem(name='odo_2_event', dimension=1, datatype='I'),
PayloadItem(name='odo_2_event_next', dimension=1, datatype='I'),
])
class IMU_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'acc', dimension = 3, datatype = 'f'),
PayloadItem(name = 'omg', dimension = 3, datatype = 'f'),
])
@message(0x00)
class IMURAW_Payload(IMU_Payload):
pass
@message(0x01)
class IMUCORR_Payload(IMU_Payload):
pass
@message(0x02)
class IMUCOMP_Payload(IMU_Payload):
pass
@message(0x0D)
class INSROTTEST_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'accNED', dimension = 3, datatype = 'd'),
])
@message(0x20)
class STATFPGA_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'usParID', dimension = 1, datatype = 'H'),
PayloadItem(name = 'uReserved', dimension = 1, datatype = 'B'),
PayloadItem(name = 'ucAction', dimension = 1, datatype = 'B'),
PayloadItem(name = 'uiPowerStatLower', dimension = 1, datatype = 'I'),
PayloadItem(name = 'uiPowerStatUpper', dimension = 1, datatype = 'I'),
PayloadItem(name = 'usFpgaStatus', dimension = 1, datatype = 'H'),
PayloadItem(name = 'usSupervisorStatus', dimension = 1, datatype = 'H'),
PayloadItem(name = 'ucImuStatus', dimension = 1, datatype = 'B'),
PayloadItem(name = 'ucTempStatus', dimension = 1, datatype = 'B'),
PayloadItem(name = 'usRes', dimension = 1, datatype = 'H'),
])
@message(0x63)
class PASSTHROUGH_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'port', dimension = 1, datatype = 'B'),
PayloadItem(name = 'reserved', dimension = 3, datatype = 'B'),
PayloadItem(name='passthroughdata', dimension=256, datatype='B')
])
def from_bytes(self, inBytes):
item_list = [
PayloadItem(name = 'port', dimension = 1, datatype = 'B'),
PayloadItem(name = 'reserved', dimension = 3, datatype = 'B'),
]
item_list += [PayloadItem(name='passthroughdata', dimension=len(inBytes[4:]), datatype='B')]
#item_list += self._get_payload(port)
#item_list += passthrough_data
self.message_description = Message(item_list)
super().from_bytes(inBytes)
def _get_payload(self, stat_mode):
item_list = []
if(stat_mode & (1 << 0)):
item_list += [PayloadItem(name = 'imuStat', dimension = 1, datatype = 'I')]
if(stat_mode & (1 << 1)):
item_list += [PayloadItem(name = 'gnssStat', dimension = 1, datatype = 'I')]
if(stat_mode & (1 << 2)):
item_list += [PayloadItem(name = 'magStat', dimension = 1, datatype = 'I')]
if(stat_mode & (1 << 3)):
item_list += [PayloadItem(name = 'madcStat', dimension = 1, datatype = 'I')]
if(stat_mode & (1 << 4)):
item_list += [PayloadItem(name = 'ekfStat', dimension = 2, datatype = 'I')]
if(stat_mode & (1 << 5)):
item_list += [PayloadItem(name = 'ekfGeneralStat', dimension = 1, datatype = 'I')]
if(stat_mode & (1 << 6)):
item_list += [PayloadItem(name = 'addStat', dimension = 4, datatype = 'I')]
if(stat_mode & (1 << 7)):
item_list += [PayloadItem(name = 'serviceStat', dimension = 1, datatype = 'I')]
if(stat_mode & (1 << 8)):
item_list += [PayloadItem(name = 'remainingAlignTime', dimension = 1, datatype = 'f')]
return item_list
@message(0x19)
class SYSSTAT_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'statMode', dimension = 1, datatype = 'I'),
PayloadItem(name = 'sysStat', dimension = 1, datatype = 'I'),
])
def _get_varsize_message_description(self, stat_mode):
_item_list = [
PayloadItem(name = 'statMode', dimension = 1, datatype = 'I'),
PayloadItem(name = 'sysStat', dimension = 1, datatype = 'I')
]
if(stat_mode & (1 << 0)):
_item_list += [PayloadItem(name = 'imuStat', dimension = 1, datatype = 'I')]
if(stat_mode & (1 << 1)):
_item_list += [PayloadItem(name = 'gnssStat', dimension = 1, datatype = 'I')]
if(stat_mode & (1 << 2)):
_item_list += [PayloadItem(name = 'magStat', dimension = 1, datatype = 'I')]
if(stat_mode & (1 << 3)):
_item_list += [PayloadItem(name = 'madcStat', dimension = 1, datatype = 'I')]
if(stat_mode & (1 << 4)):
_item_list += [PayloadItem(name = 'ekfStat', dimension = 2, datatype = 'I')]
if(stat_mode & (1 << 5)):
_item_list += [PayloadItem(name = 'ekfGeneralStat', dimension = 1, datatype = 'I')]
if(stat_mode & (1 << 6)):
_item_list += [PayloadItem(name = 'addStat', dimension = 4, datatype = 'I')]
if(stat_mode & (1 << 7)):
_item_list += [PayloadItem(name = 'serviceStat', dimension = 1, datatype = 'I')]
if(stat_mode & (1 << 8)):
_item_list += [PayloadItem(name = 'remainingAlignTime', dimension = 1, datatype = 'f')]
self.message_description = Message(_item_list)
self.item_list = _item_list
self._structString = None
def from_bytes(self, inBytes):
item_list = [
PayloadItem(name = 'statMode', dimension = 1, datatype = 'I'),
PayloadItem(name = 'sysStat', dimension = 1, datatype = 'I'),
]
stat_mode = struct.unpack('I', inBytes[:4])[0]
item_list += self._get_payload(stat_mode)
_msg = Message(item_list)
self.data = _msg.data
self.message_description = _msg
self.struct_inst = _msg.struct_inst
self._structString = _msg.struct_inst.format
super().from_bytes(inBytes)
# def to_bytes(self):
# item_list = [
# PayloadItem(name = 'statMode', dimension = 1, datatype = 'I'),
# PayloadItem(name = 'sysStat', dimension = 1, datatype = 'I'),
# ]
# item_list += self._get_payload(self.data['statMode'])
# _msg = Message(item_list)
# self.data = _msg.data
# self.message_description = _msg
# self.struct_inst = _msg.struct_inst
# self._structString = _msg.struct_inst.format
# return super().to_bytes()
def _get_payload(self, stat_mode):
item_list = []
if(stat_mode & (1 << 0)):
item_list += [PayloadItem(name = 'imuStat', dimension = 1, datatype = 'I')]
if(stat_mode & (1 << 1)):
item_list += [PayloadItem(name = 'gnssStat', dimension = 1, datatype = 'I')]
if(stat_mode & (1 << 2)):
item_list += [PayloadItem(name = 'magStat', dimension = 1, datatype = 'I')]
if(stat_mode & (1 << 3)):
item_list += [PayloadItem(name = 'madcStat', dimension = 1, datatype = 'I')]
if(stat_mode & (1 << 4)):
item_list += [PayloadItem(name = 'ekfStat', dimension = 2, datatype = 'I')]
if(stat_mode & (1 << 5)):
item_list += [PayloadItem(name = 'ekfGeneralStat', dimension = 1, datatype = 'I')]
if(stat_mode & (1 << 6)):
item_list += [PayloadItem(name = 'addStat', dimension = 4, datatype = 'I')]
if(stat_mode & (1 << 7)):
item_list += [PayloadItem(name = 'serviceStat', dimension = 1, datatype = 'I')]
if(stat_mode & (1 << 8)):
item_list += [PayloadItem(name = 'remainingAlignTime', dimension = 1, datatype = 'f')]
return item_list
@message(0x1a)
class MAGHDG_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'MagHdg', dimension = 1, datatype = 'f'),
PayloadItem(name = 'MagCOG', dimension = 1, datatype = 'f'),
PayloadItem(name = 'Deviation', dimension = 1, datatype = 'f'),
])
@message(0x04)
class INSRPY_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'rpy', dimension = 3, datatype = 'f'),
])
@message(0x05)
class INSDCM_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'DCM', dimension = 9, datatype = 'f'),
])
@message(0x06)
class INSQUAT_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'quat', dimension = 4, datatype = 'f'),
])
@message(0x0A)
class INSPOSLLH_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'lon', dimension = 1, datatype = 'd'),
PayloadItem(name = 'lat', dimension = 1, datatype = 'd'),
PayloadItem(name = 'alt', dimension = 1, datatype = 'f'),
])
@message(0x0C)
class INSPOSUTM_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'zone', dimension = 1, datatype = 'i'),
PayloadItem(name = 'easting', dimension = 1, datatype = 'd'),
PayloadItem(name = 'northing', dimension = 1, datatype = 'd'),
PayloadItem(name = 'height', dimension = 1, datatype = 'f'),
])
@message(0x0B)
class INSPOSECEF_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'pos', dimension = 3, datatype = 'd'),
])
class INSVEL_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'vel', dimension = 3, datatype = 'f'),
])
@message(0x07)
class INSVELNED_Payload(INSVEL_Payload):
pass
@message(0x08)
class INSVELECEF_Payload(INSVEL_Payload):
pass
@message(0x09)
class INSVELBODY_Payload(INSVEL_Payload):
pass
@message(0x23)
class INSVELENU_Payload(INSVEL_Payload):
pass
@message(0x18)
class MAGDATA_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'field', dimension = 3, datatype = 'f'),
PayloadItem(name = 'magHdg', dimension = 1, datatype = 'f'),
PayloadItem(name = 'magBank', dimension = 1, datatype = 'f'),
PayloadItem(name = 'magElevation', dimension = 1, datatype = 'f'),
PayloadItem(name = 'magDeviation', dimension = 1, datatype = 'f'),
PayloadItem(name = 'status', dimension = 1, datatype = 'I'),
])
@message(0x17)
class AIRDATA_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'TAS', dimension = 1, datatype = 'f'),
PayloadItem(name = 'IAS', dimension = 1, datatype = 'f'),
PayloadItem(name = 'baroAlt', dimension = 1, datatype = 'f'),
PayloadItem(name = 'baroAltRate', dimension = 1, datatype = 'f'),
PayloadItem(name = 'Pd', dimension = 1, datatype = 'f'),
PayloadItem(name = 'Ps', dimension = 1, datatype = 'f'),
PayloadItem(name = 'OAT', dimension = 1, datatype = 'f'),
PayloadItem(name = 'estBias', dimension = 1, datatype = 'f'),
PayloadItem(name = 'estScaleFactor', dimension = 1, datatype = 'f'),
PayloadItem(name = 'estBiasStdDev', dimension = 1, datatype = 'f'),
PayloadItem(name = 'estScaleFactorStdDev', dimension = 1, datatype = 'f'),
PayloadItem(name = 'status', dimension = 1, datatype = 'I'),
])
@message(0x0e)
class INSTRACKACC_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'AccACV', dimension = 3, datatype = 'f'),
])
@message(0x0F)
class EKFSTDDEV_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'pos', dimension = 3, datatype = 'f'),
PayloadItem(name = 'vel', dimension = 3, datatype = 'f'),
PayloadItem(name = 'tilt', dimension = 3, datatype = 'f'),
PayloadItem(name = 'biasAcc', dimension = 3, datatype = 'f'),
PayloadItem(name = 'biasOmg', dimension = 3, datatype = 'f'),
PayloadItem(name = 'scfAcc', dimension = 3, datatype = 'f'),
PayloadItem(name = 'scfOmg', dimension = 3, datatype = 'f'),
PayloadItem(name = 'scfOdo', dimension = 1, datatype = 'f'),
])
@message(0x28)
class EKFSTDDEV2_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'pos', dimension = 3, datatype = 'f'),
PayloadItem(name = 'vel', dimension = 3, datatype = 'f'),
PayloadItem(name = 'rpy', dimension = 3, datatype = 'f'),
PayloadItem(name = 'biasAcc', dimension = 3, datatype = 'f'),
PayloadItem(name = 'biasOmg', dimension = 3, datatype = 'f'),
PayloadItem(name = 'fMaAcc', dimension = 9, datatype = 'f'),
PayloadItem(name = 'fMaOmg', dimension = 9, datatype = 'f'),
PayloadItem(name = 'scfOdo', dimension = 1, datatype = 'f'),
PayloadItem(name = 'fMaOdo', dimension = 2, datatype = 'f'),
])
@message(0x27)
class EKFERROR2_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'biasAcc', dimension = 3, datatype = 'f'),
PayloadItem(name = 'biasOmg', dimension = 3, datatype = 'f'),
PayloadItem(name = 'fMaAcc', dimension = 9, datatype = 'f'),
PayloadItem(name = 'fMaOmg', dimension = 9, datatype = 'f'),
PayloadItem(name = 'scfOdo', dimension = 1, datatype = 'f'),
PayloadItem(name = 'maOdo', dimension = 2, datatype = 'f'),
])
@message(0x10)
class EKFERROR_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'biasAcc', dimension = 3, datatype = 'f'),
PayloadItem(name = 'biasOmg', dimension = 3, datatype = 'f'),
PayloadItem(name = 'scfAcc', dimension = 3, datatype = 'f'),
PayloadItem(name = 'scfOmg', dimension = 3, datatype = 'f'),
PayloadItem(name = 'scfOdo', dimension = 1, datatype = 'f'),
PayloadItem(name = 'maOdo', dimension = 2, datatype = 'f'),
])
@message(0x11)
class EKFTIGHTLY_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'ucSatsAvailablePSR', dimension = 1, datatype = 'B'),
PayloadItem(name = 'ucSatsUsedPSR', dimension = 1, datatype = 'B'),
PayloadItem(name = 'ucSatsAvailableRR', dimension = 1, datatype = 'B'),
PayloadItem(name = 'ucSatsUsedRR', dimension = 1, datatype = 'B'),
PayloadItem(name = 'ucSatsAvailableTDCP', dimension = 1, datatype = 'B'),
PayloadItem(name = 'ucSatsUsedTDCP', dimension = 1, datatype = 'B'),
PayloadItem(name = 'ucRefSatTDCP', dimension = 1, datatype = 'B'),
PayloadItem(name = 'usReserved', dimension = 1, datatype = 'B'),
PayloadItem(name = 'uiUsedSatsPSR_GPS', dimension = 1, datatype = 'I'),
PayloadItem(name = 'uiOutlierSatsPSR_GPS', dimension = 1, datatype = 'I'),
PayloadItem(name = 'uiUsedSatsPSR_GLONASS', dimension = 1, datatype = 'I'),
PayloadItem(name = 'uiOutlierSatsPSR_GLONASS', dimension = 1, datatype = 'I'),
PayloadItem(name = 'uiUsedSatsRR_GPS', dimension = 1, datatype = 'I'),
PayloadItem(name = 'uiOutlierSatsRR_GPS', dimension = 1, datatype = 'I'),
PayloadItem(name = 'uiUsedSatsRR_GLONASS', dimension = 1, datatype = 'I'),
PayloadItem(name = 'uiOutlierSatsRR_GLONASS', dimension = 1, datatype = 'I'),
PayloadItem(name = 'uiUsedSatsTDCP_GPS', dimension = 1, datatype = 'I'),
PayloadItem(name = 'uiOutlierSatsTDCP_GPS', dimension = 1, datatype = 'I'),
PayloadItem(name = 'uiUsedSatsTDCP_GLONASS', dimension = 1, datatype = 'I'),
PayloadItem(name = 'uiOutlierSatsTDCP_GLONASS', dimension = 1, datatype = 'I'),
])
@message(0x29)
class EKFPOSCOVAR_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'fPosCovar', dimension = 9, datatype = 'f'),
])
@message(0x21)
class POWER_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'power', dimension = 32, datatype = 'f'),
])
@message(0x22)
class TEMP_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'temp_power_pcb', dimension = 1, datatype = 'f'),
PayloadItem(name = 'temp_switcher', dimension = 1, datatype = 'f'),
PayloadItem(name = 'temp_oem628', dimension = 1, datatype = 'f'),
PayloadItem(name = 'temp_oem615', dimension = 1, datatype = 'f'),
PayloadItem(name = 'temp_cpu', dimension = 1, datatype = 'f'),
PayloadItem(name = 'temp_acc', dimension = 3, datatype = 'f'),
PayloadItem(name = 'temp_omg', dimension = 3, datatype = 'f'),
PayloadItem(name = 'temp_other', dimension = 5, datatype = 'f'),
])
@message(0x1F)
class HEAVE_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'StatFiltPos', dimension = 1, datatype = 'd'),
PayloadItem(name = 'AppliedFreqHz', dimension = 1, datatype = 'd'),
PayloadItem(name = 'AppliedAmplMeter', dimension = 1, datatype = 'd'),
PayloadItem(name = 'AppliedSigWaveHeightMeter', dimension = 1, datatype = 'd'),
PayloadItem(name = 'PZpos', dimension = 1, datatype = 'd'),
PayloadItem(name = 'ZDpos', dimension = 1, datatype = 'd'),
PayloadItem(name = 'ZDvel', dimension = 1, datatype = 'd'),
PayloadItem(name = 'AccZnavDown', dimension = 1, datatype = 'd'),
PayloadItem(name = 'HeavePosVelDown', dimension = 2, datatype = 'd'),
PayloadItem(name = 'HeaveAlgoStatus1', dimension = 1, datatype = 'I'),
PayloadItem(name = 'HeaveAlgoStatus2', dimension = 1, datatype = 'I'),
])
@message(0x24)
class CANSTAT_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'uiErrorMask', dimension = 1, datatype = 'I'),
PayloadItem(name = 'ucControllerStatus', dimension = 1, datatype = 'B'),
PayloadItem(name = 'ucTransceiverStatus', dimension = 1, datatype = 'B'),
PayloadItem(name = 'ucProtocolStatus', dimension = 1, datatype = 'B'),
PayloadItem(name = 'ucProtocolLocation', dimension = 1, datatype = 'B'),
])
@message(0x1D)
class ARINC429STAT_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'uiStatus', dimension = 1, datatype = 'I'),
])
@message(0x26)
class TIME_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'sysTime', dimension = 1, datatype = 'd'),
PayloadItem(name = 'ImuInterval', dimension = 1, datatype = 'd'),
PayloadItem(name = 'TimeSincePPS', dimension = 1, datatype = 'd'),
PayloadItem(name = 'PPS_IMUtime', dimension = 1, datatype = 'd'),
PayloadItem(name = 'PPS_GNSStime', dimension = 1, datatype = 'd'),
PayloadItem(name = 'GNSSbias', dimension = 1, datatype = 'd'),
PayloadItem(name = 'GNSSbiasSmoothed', dimension = 1, datatype = 'd'),
])
@message(0x12)
class GNSSSOL_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'lon', dimension = 1, datatype = 'd'),
PayloadItem(name = 'lat', dimension = 1, datatype = 'd'),
PayloadItem(name = 'alt', dimension = 1, datatype = 'f'),
PayloadItem(name = 'undulation', dimension = 1, datatype = 'f'),
PayloadItem(name = 'velNED', dimension = 3, datatype = 'f'),
PayloadItem(name = 'stdDevPos', dimension = 3, datatype = 'f'),
PayloadItem(name = 'stdDevVel', dimension = 3, datatype = 'f'),
PayloadItem(name = 'solStatus', dimension = 1, datatype = 'H'),
PayloadItem(name = 'posType', dimension = 1, datatype = 'H'),
PayloadItem(name = 'pdop', dimension = 1, datatype = 'f'),
PayloadItem(name = 'satsUsed', dimension = 1, datatype = 'B'),
PayloadItem(name = 'solTracked', dimension = 1, datatype = 'B'),
PayloadItem(name = 'baseID', dimension = 1, datatype = 'H'),
PayloadItem(name = 'diffAge', dimension = 1, datatype = 'f'),
PayloadItem(name = 'solAge', dimension = 1, datatype = 'f'),
PayloadItem(name = 'gnssStatus', dimension = 1, datatype = 'I'),
])
@message(0x13)
class INSGNDSPEED_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'SOG', dimension = 1, datatype = 'f'),
PayloadItem(name = 'COG', dimension = 1, datatype = 'f'),
PayloadItem(name = 'VDown', dimension = 1, datatype = 'f'),
])
@message(0x14)
class GNSSTIME_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'utcOffset', dimension = 1, datatype = 'd'),
PayloadItem(name = 'offset', dimension = 1, datatype = 'd'),
PayloadItem(name = 'year', dimension = 1, datatype = 'I'),
PayloadItem(name = 'month', dimension = 1, datatype = 'B'),
PayloadItem(name = 'day', dimension = 1, datatype = 'B'),
PayloadItem(name = 'hour', dimension = 1, datatype = 'B'),
PayloadItem(name = 'minute', dimension = 1, datatype = 'B'),
PayloadItem(name = 'millisec', dimension = 1, datatype = 'I'),
PayloadItem(name = 'status', dimension = 1, datatype = 'I'),
])
@message(0x15)
class GNSSSOLCUST_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'dLon', dimension = 1, datatype = 'd'),
PayloadItem(name = 'dLat', dimension = 1, datatype = 'd'),
PayloadItem(name = 'fAlt', dimension = 1, datatype = 'f'),
PayloadItem(name = 'fUndulation', dimension = 1, datatype = 'f'),
PayloadItem(name = 'fStdDev_Pos', dimension = 3, datatype = 'f'),
PayloadItem(name = 'fVned', dimension = 3, datatype = 'f'),
PayloadItem(name = 'fStdDev_Vel', dimension = 3, datatype = 'f'),
PayloadItem(name = 'fDisplacement', dimension = 3, datatype = 'f'),
PayloadItem(name = 'fStdDev_Displacement', dimension = 3, datatype = 'f'),
PayloadItem(name = 'usSolStatus', dimension = 1, datatype = 'H'),
PayloadItem(name = 'fDOP', dimension = 2, datatype = 'f'),
PayloadItem(name = 'ucSatsPos', dimension = 1, datatype = 'B'),
PayloadItem(name = 'ucSatsVel', dimension = 1, datatype = 'B'),
PayloadItem(name = 'ucSatsDisplacement', dimension = 1, datatype = 'B'),
PayloadItem(name = 'usReserved', dimension = 1, datatype = 'H'),
PayloadItem(name = 'fDiffAge', dimension = 1, datatype = 'f'),
PayloadItem(name = 'fSolAge', dimension = 1, datatype = 'f'),
PayloadItem(name = 'uiGnssStatus', dimension = 1, datatype = 'I'),
])
@message(0x33)
class GNSSHDG_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'hdg', dimension = 1, datatype = 'f'),
PayloadItem(name = 'stdDevHdg', dimension = 1, datatype = 'f'),
PayloadItem(name = 'pitch', dimension = 1, datatype = 'f'),
PayloadItem(name = 'stdDevPitch', dimension = 1, datatype = 'f'),
PayloadItem(name = 'solStat', dimension = 1, datatype = 'H'),
PayloadItem(name = 'solType', dimension = 1, datatype = 'H'),
PayloadItem(name = 'res', dimension = 1, datatype = 'H'),
PayloadItem(name = 'satsUsed', dimension = 1, datatype = 'B'),
PayloadItem(name = 'satsTracked', dimension = 1, datatype = 'B'),
PayloadItem(name = 'gnssStatus', dimension = 1, datatype = 'I'),
])
@message(0x1B)
class GNSSLEVERARM_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'primary', dimension = 3, datatype = 'f'),
PayloadItem(name = 'stdDevPrimary', dimension = 3, datatype = 'f'),
PayloadItem(name = 'relative', dimension = 3, datatype = 'f'),
PayloadItem(name = 'stdDevRelative', dimension = 3, datatype = 'f'),
])
@message(0x1C)
class GNSSVOTER_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'ucSatsUsed_INT', dimension = 1, datatype = 'B'),
PayloadItem(name = 'ucSatsUsed_EXT', dimension = 1, datatype = 'B'),
PayloadItem(name = 'usReserved', dimension = 1, datatype = 'H'),
PayloadItem(name = 'fStdDevHDG_INT', dimension = 1, datatype = 'f'),
PayloadItem(name = 'fStdDevHDG_EXT', dimension = 1, datatype = 'f'),
PayloadItem(name = 'fStdDevPOS_INT', dimension = 1, datatype = 'f'),
PayloadItem(name = 'fStdDevPOS_EXT', dimension = 1, datatype = 'f'),
PayloadItem(name = 'uiStatus', dimension = 1, datatype = 'I'),
])
@message(0x1E)
class GNSSHWMON_Payload(ProtocolPayload):
message_description = Message([])
def __init__(self):
if type(self).message_description is None:
item_list = []
for idx in range(0, 16):
item_list += [PayloadItem(name = 'val %d' % idx, dimension = 1, datatype = 'f'),
PayloadItem(name = 'status %d' % idx, dimension = 1, datatype = 'I')]
type(self).message_description = Message(item_list)
@message(0x38)
class GNSSALIGNBSL_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'east', dimension = 1, datatype = 'd'),
PayloadItem(name = 'north', dimension = 1, datatype = 'd'),
PayloadItem(name = 'up', dimension = 1, datatype = 'd'),
PayloadItem(name = 'eastStddev', dimension = 1, datatype = 'f'),
PayloadItem(name = 'northStddev', dimension = 1, datatype = 'f'),
PayloadItem(name = 'upStddev', dimension = 1, datatype = 'f'),
PayloadItem(name = 'solStatus', dimension = 1, datatype = 'H'),
PayloadItem(name = 'posVelType', dimension = 1, datatype = 'H'),
PayloadItem(name = 'satsTracked', dimension = 1, datatype = 'B'),
PayloadItem(name = 'satsUsedInSolution', dimension = 1, datatype = 'B'),
PayloadItem(name = 'extSolStat', dimension = 1, datatype = 'B'),
PayloadItem(name = 'reserved', dimension = 1, datatype = 'B'),
])
@message(0x16)
class WHEELDATA_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'odoSpeed', dimension = 1, datatype = 'f'),
PayloadItem(name = 'ticks', dimension = 1, datatype = 'i'),
])
@message(0x32)
class WHEELDATADBG_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'odoSpeed', dimension = 1, datatype = 'f'),
PayloadItem(name = 'ticks', dimension = 1, datatype = 'i'),
PayloadItem(name = 'interval', dimension = 1, datatype = 'I'),
PayloadItem(name = 'trigEvent', dimension = 1, datatype = 'I'),
PayloadItem(name = 'trigNextEvent', dimension = 1, datatype = 'I'),
])
@message(0x34)
class EVENTTIME_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'dGpsTime_EVENT_0', dimension = 1, datatype = 'd'),
PayloadItem(name = 'dGpsTime_EVENT_1', dimension = 1, datatype = 'd'),
])
@message(0x35)
class OMGINT_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'omgINT', dimension = 3, datatype = 'f'),
PayloadItem(name = 'omgINTtime', dimension = 1, datatype = 'f'),
])
@message(0x36)
class ADC24STATUS_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'uiRRidx', dimension = 4, datatype = 'I'),
PayloadItem(name = 'uiRRvalue', dimension = 4, datatype = 'I'),
])
@message(0x37)
class ADC24DATA_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'acc', dimension = 3, datatype = 'I'),
PayloadItem(name = 'frameCounter', dimension = 1, datatype = 'H'),
PayloadItem(name = 'temperature', dimension = 1, datatype = 'h'),
PayloadItem(name = 'errorStatus', dimension = 1, datatype = 'B'),
PayloadItem(name = 'intervalCounter', dimension = 3, datatype = 'B'),
])
@message(0x42)
class CSACDATA_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'status', dimension = 1, datatype = 'I'),
PayloadItem(name = 'alarm', dimension = 1, datatype = 'I'),
PayloadItem(name = 'serialNum', dimension = 32, datatype = 's'),
PayloadItem(name = 'mode', dimension = 1, datatype = 'I'),
PayloadItem(name = 'contrast', dimension = 1, datatype = 'I'),
PayloadItem(name = 'laserCurrent', dimension = 1, datatype = 'f'),
PayloadItem(name = 'tcx0', dimension = 1, datatype = 'f'),
PayloadItem(name = 'heatP', dimension = 1, datatype = 'f'),
PayloadItem(name = 'sig', dimension = 1, datatype = 'f'),
PayloadItem(name = 'temperature', dimension = 1, datatype = 'f'),
PayloadItem(name = 'steer', dimension = 1, datatype = 'i'),
PayloadItem(name = 'atune', dimension = 1, datatype = 'f'),
PayloadItem(name = 'phase', dimension = 1, datatype = 'i'),
PayloadItem(name = 'discOk', dimension = 1, datatype = 'I'),
PayloadItem(name = 'timeSincePowerOn', dimension = 1, datatype = 'I'),
PayloadItem(name = 'timeSinceLock', dimension = 1, datatype = 'I'),
PayloadItem(name = 'dataValid', dimension = 1, datatype = 'B'),
PayloadItem(name = 'reserved', dimension = 1, datatype = 'B'),
PayloadItem(name = 'fwStatus', dimension = 1, datatype = 'H'),
])
@message(0x46)
class INSMGRS_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'Error Code', dimension = 1, datatype = 'I'),
PayloadItem(name = 'MGRS Position', dimension = 64, datatype = 's'),
])
@message(0x57)
class TAG_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'tag', dimension = 128, datatype = 's')
])
@message(0x25)
class GNSSSATINFO_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'SvID', dimension = 1, datatype = 'I'),
PayloadItem(name = 'PositionECEF', dimension = 3, datatype = 'd'),
PayloadItem(name = 'VelocityECEF', dimension = 3, datatype = 'd'),
PayloadItem(name = 'CN0', dimension = 3, datatype = 'f'),
PayloadItem(name = 'ClockError', dimension = 1, datatype = 'f'),
PayloadItem(name = 'IonoError', dimension = 1, datatype = 'f'),
PayloadItem(name = 'TropoError', dimension = 1, datatype = 'f'),
PayloadItem(name = 'Elevation', dimension = 1, datatype = 'f'),
PayloadItem(name = 'Azimuth', dimension = 1, datatype = 'f'),
])
@message(0x45)
class NTRIPSTAT_Payload(ProtocolPayload):
message_description = Message([
PayloadItem(name = 'NtripStatus', dimension = 1, datatype = 'I'),
PayloadItem(name = 'LastErrorMsg', dimension = 256, datatype = 's'),
PayloadItem(name = 'ErrorCounter', dimension = 1, datatype = 'I'),
])
| 45.087546
| 113
| 0.613876
| 3,690
| 36,566
| 5.988889
| 0.125474
| 0.250464
| 0.211774
| 0.127065
| 0.818227
| 0.76551
| 0.545726
| 0.357075
| 0.344088
| 0.303362
| 0
| 0.022992
| 0.230433
| 36,566
| 810
| 114
| 45.14321
| 0.762331
| 0.015178
| 0
| 0.382138
| 0
| 0
| 0.103845
| 0.004473
| 0
| 0
| 0.00689
| 0
| 0
| 1
| 0.010249
| false
| 0.014641
| 0.002928
| 0
| 0.196193
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a237fc8404188599625ede254e7dd3321159c7bb
| 33,398
|
py
|
Python
|
pygsti/algorithms/mirroring.py
|
maij/pyGSTi
|
70e83e05fa689f53550feb3914c4fac40ca4a943
|
[
"Apache-2.0"
] | 73
|
2016-01-28T05:02:05.000Z
|
2022-03-30T07:46:33.000Z
|
pygsti/algorithms/mirroring.py
|
00mjk/pyGSTi
|
4f8bf5337b01b7afcb7b0580b717b5d1fe281be4
|
[
"Apache-2.0"
] | 113
|
2016-02-25T15:32:18.000Z
|
2022-03-31T13:18:13.000Z
|
pygsti/algorithms/mirroring.py
|
00mjk/pyGSTi
|
4f8bf5337b01b7afcb7b0580b717b5d1fe281be4
|
[
"Apache-2.0"
] | 41
|
2016-03-15T19:32:07.000Z
|
2022-02-16T10:22:05.000Z
|
"""
circuit mirroring functions.
"""
#***************************************************************************************************
# Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
# Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government retains certain rights
# in this software.
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0 or in the LICENSE file in the root pyGSTi directory.
#***************************************************************************************************
import numpy as _np
import copy as _copy
import random as _random
from pygsti.circuits import circuit as _cir
from pygsti.baseobjs import label as _lbl
from pygsti.tools import symplectic as _symp
from pygsti.tools import compilationtools as _comp
from . import randomcircuit as _rc
# ### TODO: THIS IS TIMS OLD CODE WHICH SHOULD PERHAPS ALSO BE AN OPTION IN THE `CREATE_MIRROR_CIRCUIT` FUNCTION
# def create_mirror_circuit(circ, pspec, circtype='Clifford+Gzr', pauli_labels=None, pluspi_prob=0.):
# """
# *****************************************************************
# Function currently has the following limitations that need fixing:
# - A layer contains only Clifford or Gzr gates on ALL the qubits.
# - all of the Clifford gates are self inverse
# - The qubits are labelled "Q0" through "Qn-1" -- THIS SHOULD NOW BE FIXED!
# - Pauli's are labelled by "Gi", "Gxpi", "Gypi" and "Gzpi".
# - There's no option for randomized prep/meas
# - There's no option for randomly adding +/-pi to the Z rotation angles.
# - There's no option for adding "barriers"
# - There's no test that the 'Gzr' gate has the "correct" convention for a rotation angle
# (a rotation by pi must be a Z gate) or that it's a rotation around Z.
# *****************************************************************
# """
# assert(circtype == 'Clifford+Gzr' or circtype == 'Clifford')
# n = circ.width
# d = circ.depth
# if pauli_labels is None: pauli_labels = ['Gi', 'Gxpi', 'Gypi', 'Gzpi']
# qubits = circ.line_labels
# identity = _np.identity(2 * n, int)
# zrotname = 'Gzr'
# # qubit_labels = ['G{}'.format(i) for i in range(n)]
# _, gate_inverse = pspec.compute_one_qubit_gate_relations()
# gate_inverse.update(pspec.compute_multiqubit_inversion_relations()) # add multiQ inverses
# quasi_inverse_circ = []
# central_pauli_circ = _cir.Circuit([[_lbl.Label(pauli_labels[_np.random.randint(0, 4)], q) for q in qubits]])
# #telescoping_pauli = central_pauli_layer.copy()
# # The telescoping Pauli in the symplectic rep.
# telp_s, telp_p = _symp.symplectic_rep_of_clifford_circuit(central_pauli_circ, pspec=pspec)
# assert(_np.sum(_np.abs(telp_s - identity)) <= 1e-8) # Check that it's a Pauli.
# for d_ind in range(d):
# layer = circ.layer(d - d_ind - 1)
# if layer[0].name == zrotname:
# quasi_inverse_layer = []
# for gate in layer:
# q_int = qubits.index(gate.qubits[0])
# angle = float(gate.args[0])
# if telp_p[n + q_int] == 0: rotation_sign = -1. # If the Pauli is Z or I.
# else: rotation_sign = +1 # If the Pauli is X or Y.
# # Sets the quasi inversion angle to + or - the original angle, depending on the Paul
# quasi_inverse_angle = rotation_sign * angle
# # Decides whether to add with to add +/- pi to the rotation angle.
# if _np.random.binomial(1, pluspi_prob) == 1:
# quasi_inverse_angle += _np.pi * (-1)**_np.random.binomial(1, 0.5)
# quasi_inverse_angle = _comp.mod_2pi(quasi_inverse_angle)
# # Updates the telescoping Pauli (in the symplectic rep_, to include this added pi-rotation,
# # as we need to include it as we keep collapsing the circuit down.
# telp_p[q_int] = (telp_p[q_int] + 2) % 4
# # Constructs the quasi-inverse gate.
# quasi_inverse_gate = _lbl.Label(zrotname, gate.qubits, args=(str(quasi_inverse_angle),))
# quasi_inverse_layer.append(quasi_inverse_gate)
# # We don't have to update the telescoping Pauli as it's unchanged, but when we update
# # this it'll need to change.
# #telp_p = telp_p
# else:
# quasi_inverse_layer = [_lbl.Label(gate_inverse[gate.name], gate.qubits) for gate in layer]
# telp_layer = _symp.find_pauli_layer(telp_p, pauli_labels, qubits)
# conjugation_circ = _cir.Circuit([layer, telp_layer, quasi_inverse_layer])
# # We calculate what the new telescoping Pauli is, in the symplectic rep.
# telp_s, telp_p = _symp.symplectic_rep_of_clifford_circuit(conjugation_circ, pspec=pspec)
# # Check that the layer -- pauli -- quasi-inverse circuit implements a Pauli.
# assert(_np.sum(_np.abs(telp_s - identity)) <= 1e-10)
# # Add the quasi inverse layer that we've constructed to the end of the quasi inverse circuit.
# quasi_inverse_circ.append(quasi_inverse_layer)
# # now that we've completed the quasi inverse circuit we convert it to a Circuit object
# quasi_inverse_circ = _cir.Circuit(quasi_inverse_circ)
# # Calculate the bit string that this mirror circuit should output, from the final telescoped Pauli.
# target_bitstring = ''.join(['1' if p == 2 else '0' for p in telp_p[n:]])
# mirror_circuit = circ + central_pauli_circ + quasi_inverse_circ
# return mirror_circuit, target_bitstring
def create_mirror_circuit(circ, pspec, circ_type='clifford+zxzxz'):
"""
circ_type : clifford+zxzxz, cz(theta)+zxzxz
"""
n = circ.width
d = circ.depth
pauli_labels = ['I', 'X', 'Y', 'Z']
qubits = circ.line_labels
_, gate_inverse = pspec.compute_one_qubit_gate_relations()
gate_inverse.update(pspec.compute_multiqubit_inversion_relations()) # add multiQ inverse
assert(circ_type in ('clifford+zxzxz', 'cz(theta)+zxzxz'))
def compute_gate_inverse(gate_label):
if gate_label.name in gate_inverse.keys():
return _lbl.Label(gate_inverse[gate_label.name], gate_label.qubits)
else:
if gate_label.name == 'Gzr' or gate_label.name == 'Gczr':
return _lbl.Label(gate_label.name, gate_label.qubits, args=(str(-1 * float(gate_label.args[0])),))
else:
raise ValueError("Cannot invert gate with name {}".format(gate_label.name))
srep_dict = _symp.compute_internal_gate_symplectic_representations(gllist=['I', 'X', 'Y', 'Z'])
# the `callable` part is a workaround to remove gates with args, defined by functions.
srep_dict.update(pspec.compute_clifford_symplectic_reps(tuple((gn for gn, u in pspec.gate_unitaries.items()
if not callable(u)))))
if 'Gxpi2' in pspec.gate_names:
xname = 'Gxpi2'
elif 'Gc16' in pspec.gate_names:
xname = 'Gc16'
else:
raise ValueError(("There must be an X(pi/2) gate in the processor spec's gate set,"
" and it must be called Gxpi2 or Gc16!"))
assert('Gzr' in pspec.gate_names), \
"There must be an Z(theta) gate in the processor spec's gate set, and it must be called Gzr!"
zrotname = 'Gzr'
if circ_type == 'cz(theta)+zxzxz':
assert('Gczr' in pspec.gate_names), \
"There must be an controlled-Z(theta) gate in the processor spec's gate set, and it must be called Gczr!"
czrotname = 'Gczr'
Xpi2layer = [_lbl.Label(xname, q) for q in qubits]
#make an editable copy of the circuit to add the inverse on to
c = circ.copy(editable=True)
#build the inverse
d_ind = 0
while d_ind < d:
layer = circ.layer(d - d_ind - 1)
if len(layer) > 0 and layer[0].name == zrotname: # ask if it's a Zrot layer.
# It's necessary for the whole layer to have Zrot gates
#get the entire arbitrary 1q unitaries: Zrot-Xpi/2-Zrot-Xpi/2-Zrot
current_layers = circ[d - d_ind - 5: d - d_ind]
#recompile inverse of current layer
for i in range(n):
if n == 1:
old_params = [(float(current_layers[0].args[0]), float(current_layers[2].args[0]),
float(current_layers[4].args[0])) for i in range(n)]
else:
old_params = [(float(current_layers[0][i].args[0]), float(current_layers[2][i].args[0]),
float(current_layers[4][i].args[0])) for i in range(n)]
layer_new_params = [_comp.inv_recompile_unitary(*p) for p in old_params]
theta1_layer = [_lbl.Label(zrotname, qubits[i], args=(str(layer_new_params[i][0]),))
for i in range(len(layer_new_params))]
theta2_layer = [_lbl.Label(zrotname, qubits[i], args=(str(layer_new_params[i][1]),))
for i in range(len(layer_new_params))]
theta3_layer = [_lbl.Label(zrotname, qubits[i], args=(str(layer_new_params[i][2]),))
for i in range(len(layer_new_params))]
#add to mirror circuit
c.append_circuit_inplace(_cir.Circuit([theta3_layer], line_labels=circ.line_labels))
c.append_circuit_inplace(_cir.Circuit([Xpi2layer], line_labels=circ.line_labels))
c.append_circuit_inplace(_cir.Circuit([theta2_layer], line_labels=circ.line_labels))
c.append_circuit_inplace(_cir.Circuit([Xpi2layer], line_labels=circ.line_labels))
c.append_circuit_inplace(_cir.Circuit([theta1_layer], line_labels=circ.line_labels))
d_ind += 5
else:
inverse_layer = [compute_gate_inverse(gate_label) for gate_label in layer]
c.append_circuit_inplace(_cir.Circuit([inverse_layer], line_labels=circ.line_labels))
d_ind += 1
#now that we've built the simple mirror circuit, let's add pauli frame randomization
d_ind = 0
mc = []
net_paulis = {q: 0 for q in qubits}
d = c.depth
correction_angles = {q: 0 for q in qubits} # corrections used in the cz(theta) case, which do nothing otherwise.
while d_ind < d:
layer = c.layer(d_ind)
if len(layer) > 0 and layer[0].name == zrotname: # ask if it's a Zrot layer.
#It's necessary for the whole layer to have Zrot gates
#if the layer is 1Q unitaries, pauli randomize
current_layers = c[d_ind:d_ind + 5]
#generate random pauli
new_paulis = {q: _np.random.randint(0, 4) for q in qubits}
new_paulis_as_layer = [_lbl.Label(pauli_labels[new_paulis[q]], q) for q in qubits]
net_paulis_as_layer = [_lbl.Label(pauli_labels[net_paulis[q]], q) for q in qubits]
#compute new net pauli based on previous pauli
net_pauli_numbers = _symp.find_pauli_number(_symp.symplectic_rep_of_clifford_circuit(
_cir.Circuit(new_paulis_as_layer + net_paulis_as_layer, line_labels=circ.line_labels),
srep_dict=srep_dict)[1])
# THIS WAS THE (THETA) VERSIONS
#net_paulis_as_layer = [_lbl.Label(pauli_labels[net_paulis[q]], q) for q in qubits]
#net_pauli_numbers = _symp.find_pauli_number(_symp.symplectic_rep_of_clifford_circuit(_cir.Circuit(
# new_paulis_as_layer+net_paulis_as_layer), pspec=pspec)[1])
net_paulis = {qubits[i]: net_pauli_numbers[i] for i in range(n)}
#depending on what the net pauli before the U gate is, might need to change parameters on the U gate
# to commute the pauli through
#recompile current layer to account for this and recompile with these paulis
if n == 1:
old_params_and_paulis = [(float(current_layers[0].args[0]), float(current_layers[2].args[0]),
float(current_layers[4].args[0]), net_paulis[qubits[i]],
new_paulis[qubits[i]]) for i in range(n)]
else:
old_params_and_paulis = [(float(current_layers[0][i].args[0]), float(current_layers[2][i].args[0]),
float(current_layers[4][i].args[0]), net_paulis[qubits[i]],
new_paulis[qubits[i]]) for i in range(n)]
layer_new_params = [_comp.pauli_frame_randomize_unitary(*p) for p in old_params_and_paulis]
#recompile any zrotation corrections from the previous Czr into the first zr of this layer. This correction
# will be zero if there are no Czr gates (when it's clifford+zxzxz)
theta1_layer = [_lbl.Label(zrotname, qubits[i],
args=(str(layer_new_params[i][0] + correction_angles[qubits[i]]),))
for i in range(len(layer_new_params))]
theta2_layer = [_lbl.Label(zrotname, qubits[i], args=(str(layer_new_params[i][1]),))
for i in range(len(layer_new_params))]
theta3_layer = [_lbl.Label(zrotname, qubits[i], args=(str(layer_new_params[i][2]),))
for i in range(len(layer_new_params))]
#add to mirror circuit
mc.append([theta1_layer])
mc.append([Xpi2layer])
mc.append([theta2_layer])
mc.append([Xpi2layer])
mc.append([theta3_layer])
d_ind += 5
# reset the correction angles.
correction_angles = {q: 0 for q in qubits}
else:
if circ_type == 'clifford+zxzxz':
net_paulis_as_layer = [_lbl.Label(pauli_labels[net_paulis[qubits[i]]], qubits[i]) for i in range(n)]
circ_sandwich = _cir.Circuit([layer, net_paulis_as_layer, layer], line_labels=circ.line_labels)
net_paulis = {qubits[i]: pn
for i, pn in enumerate(_symp.find_pauli_number(_symp.symplectic_rep_of_clifford_circuit(
circ_sandwich, srep_dict=srep_dict)[1]))}
mc.append(layer)
#we need to account for how the net pauli changes when it gets passed through the clifford layers
if circ_type == 'cz(theta)+zxzxz':
quasi_inv_layer = []
#recompile layer taking into acount paulis
for g in layer:
if g.name == czrotname:
#get the qubits, figure out net pauli on those qubits
gate_qubits = g.qubits
net_paulis_for_gate = (net_paulis[gate_qubits[0]], net_paulis[gate_qubits[1]])
theta = float(g.args[0])
if ((net_paulis_for_gate[0] % 3 != 0 and net_paulis_for_gate[1] % 3 == 0)
or (net_paulis_for_gate[0] % 3 == 0 and net_paulis_for_gate[1] % 3 != 0)):
theta *= -1
quasi_inv_layer.append(_lbl.Label(czrotname, gate_qubits, args=(str(theta),)))
#for each X or Y, do a Zrotation by -theta on the other qubit after the 2Q gate.
for q in gate_qubits:
if net_paulis[q] == 1 or net_paulis[q] == 2:
for q2 in gate_qubits:
if q2 != q:
correction_angles[q2] += -1 * theta
else:
quasi_inv_layer.append(_lbl.Label(compute_gate_inverse(g)))
#add to circuit
mc.append([quasi_inv_layer])
#increment position in circuit
d_ind += 1
#update the target pauli
#pauli_layer = [_lbl.Label(pauli_labels[net_paulis[i]], qubits[i]) for i in range(len(qubits))]
# The version from (THETA)
pauli_layer = [_lbl.Label(pauli_labels[net_paulis[q]], q) for q in qubits]
conjugation_circ = _cir.Circuit([pauli_layer], line_labels=circ.line_labels)
telp_s, telp_p = _symp.symplectic_rep_of_clifford_circuit(conjugation_circ, srep_dict=srep_dict)
# Calculate the bit string that this mirror circuit should output, from the final telescoped Pauli.
target_bitstring = ''.join(['1' if p == 2 else '0' for p in telp_p[n:]])
mirror_circuit = _cir.Circuit(mc, line_labels=circ.line_labels)
return mirror_circuit, target_bitstring
# #generate mirror circuits with pauli frame randomization. no random +pi needed
# #as we construct the quasi-inverse, we generate random pauli layers, and compile them into the unitaries
# #we'll need to recompute the angles needed for the z rotations
# def create_nc_mirror_circuit(circ, pspec, circtype='Clifford+Gzr'):
# assert(circtype == 'Clifford+Gzr' or circtype == 'Clifford')
# n = circ.width
# d = circ.depth
# pauli_labels = ['I', 'X', 'Y', 'Z']
# qubits = circ.line_labels
# identity = _np.identity(2 * n, int)
# zrotname = 'Gzr'
# # qubit_labels = ['G{}'.format(i) for i in range(n)]
# _, gate_inverse = pspec.compute_one_qubit_gate_relations()
# gate_inverse.update(pspec.compute_multiqubit_inversion_relations()) # add multiQ inverses
# #for gname in pspec.gate_names:
# # assert(gname in gate_inverse), \
# # "%s gate does not have an inverse in the gate-set! MRB is not possible!" % gname
# quasi_inverse_circ = []
# Xpi2layer = [_lbl.Label('Gc16', qubits[t]) for t in range(n)]
# c = circ.copy(editable=True)
# #build the inverse
# d_ind = 0
# while d_ind<d:
# layer = circ.layer(d - d_ind - 1)
# if layer[0].name == zrotname: #ask if it's a Zrot layer. It's necessary for the whole layer to have Zrot gates
# current_layers = circ[d-d_ind-5:d-d_ind]
# #recompile inverse of current layer
# for i in range(n):
# #print((i, float(current_layers[0][i].args[0]), float(current_layers[2][i].args[0]),
# # float(current_layers[4][i].args[0])))
# if n==1:
# old_params = [(float(current_layers[0].args[0]), float(current_layers[2].args[0]),
# float(current_layers[4].args[0])) for i in range(n)]
# else:
# old_params = [(float(current_layers[0][i].args[0]), float(current_layers[2][i].args[0]),
# float(current_layers[4][i].args[0])) for i in range(n)]
# layer_new_params = [_comp.inv_recompile_unitary(*p) for p in old_params] #need to write this function
# theta1_layer = [_lbl.Label(zrotname, qubits[i], args=(str(layer_new_params[i][0]),))
# for i in range(len(layer_new_params))]
# theta2_layer = [_lbl.Label(zrotname, qubits[i], args=(str(layer_new_params[i][1]),))
# for i in range(len(layer_new_params))]
# theta3_layer = [_lbl.Label(zrotname, qubits[i], args=(str(layer_new_params[i][2]),))
# for i in range(len(layer_new_params))]
# #add to mirror circuit
# c.append_circuit_inplace(_cir.Circuit([theta3_layer]))
# c.append_circuit_inplace(_cir.Circuit([Xpi2layer]))
# c.append_circuit_inplace(_cir.Circuit([theta2_layer]))
# c.append_circuit_inplace(_cir.Circuit([Xpi2layer]))
# c.append_circuit_inplace(_cir.Circuit([theta1_layer]))
# d_ind += 5
# else:
# inverse_layer = [_lbl.Label(gate_inverse[gate.name], gate.qubits) for gate in layer]
# #create quasi-inverse. Right now, it's ust inverting every gate in the original layer, so a simple inverse
# # Add the inverse layer that we've constructed to the end of the circuit
# c.append_circuit_inplace(_cir.Circuit([inverse_layer]))
# d_ind += 1
# #now that we've built the simple mirror circuit, let's add pauli frame randomization
# d_ind = 0
# mc = []
# net_paulis = [0 for q in qubits]
# d = c.depth
# srep_dict = _symp.compute_internal_gate_symplectic_representations(gllist=['I', 'X', 'Y', 'Z'])
# # the `callable` part is a workaround to remove gates with args, defined by functions.
# srep_dict.update(pspec.compute_clifford_symplectic_reps([gn for gn, u in pspec.gate_unitaries.items()
# if not callable(u)]))
# while d_ind<d:
# layer = c.layer(d_ind)
# if layer[0].name == zrotname: #ask if it's a Zrot layer. It's necessary for the whole layer to have Zrot gates
# #if the layer is 1Q unitaries, pauli randomize
# current_layers = c[d_ind:d_ind+5]
# #generate random pauli
# new_paulis = [_np.random.randint(0, 4) for q in qubits]
# new_paulis_as_layer = [_lbl.Label(pauli_labels[new_paulis[i]], qubits[i]) for i in range(n)]
# #compute new net pauli based on previous pauli
# net_paulis_as_layer = [_lbl.Label(pauli_labels[net_paulis[i]], qubits[i]) for i in range(n)]
# net_paulis = _symp.find_pauli_number(_symp.symplectic_rep_of_clifford_circuit(_cir.Circuit(
# new_paulis_as_layer+net_paulis_as_layer), srep_dict=srep_dict)[1])
# #depending on what the net pauli before the U gate is, might need to change parameters on the U gate to
# # commute the pauli through
# #recompile current layer to account for this and recompile with these paulis
# if n == 1:
# old_params_and_paulis = [(float(current_layers[0].args[0]), float(current_layers[2].args[0]),
# float(current_layers[4].args[0]), net_paulis[i], new_paulis[i])
# for i in range(n)]
# else:
# old_params_and_paulis = [(float(current_layers[0][i].args[0]), float(current_layers[2][i].args[0]),
# float(current_layers[4][i].args[0]), net_paulis[i], new_paulis[i])
# for i in range(n)]
# layer_new_params = [_comp.pauli_frame_randomize_unitary(*p) for p in old_params_and_paulis]
# theta1_layer = [_lbl.Label(zrotname, qubits[i], args=(str(layer_new_params[i][0]),))
# for i in range(len(layer_new_params))]
# theta2_layer = [_lbl.Label(zrotname, qubits[i], args=(str(layer_new_params[i][1]),))
# for i in range(len(layer_new_params))]
# theta3_layer = [_lbl.Label(zrotname, qubits[i], args=(str(layer_new_params[i][2]),))
# for i in range(len(layer_new_params))]
# #add to mirror circuit
# mc.append([theta1_layer])
# mc.append([Xpi2layer])
# mc.append([theta2_layer])
# mc.append([Xpi2layer])
# mc.append([theta3_layer])
# d_ind += 5
# else:
# net_paulis_as_layer = [_lbl.Label(pauli_labels[net_paulis[i]], qubits[i]) for i in range(n)]
# net_paulis = _symp.find_pauli_number(_symp.symplectic_rep_of_clifford_circuit(_cir.Circuit([layer
# , net_paulis_as_layer, layer]), srep_dict=srep_dict)[1])
# mc.append(layer)
# #we need to account for how the net pauli changes when it gets passed through the clifford layers
# d_ind += 1
# #update the target pauli
# pauli_layer = [_lbl.Label(pauli_labels[net_paulis[i]], qubits[i]) for i in range(len(qubits))]
# conjugation_circ = _cir.Circuit([pauli_layer])
# telp_s, telp_p = _symp.symplectic_rep_of_clifford_circuit(conjugation_circ, srep_dict=srep_dict)
# # Calculate the bit string that this mirror circuit should output, from the final telescoped Pauli.
# target_bitstring = ''.join(['1' if p == 2 else '0' for p in telp_p[n:]])
# mirror_circuit = _cir.Circuit(mc)
# return mirror_circuit, target_bitstring
# #
# def create_cz_mirror_circuit(circ, pspec, circtype='GCzr+Gzr', pauli_labels=None):
# '''
# Makes a mirror circuit with Pauli frame randomization from a forward circuits consisting of only Haar-random 1Q
# unitary layers and CZRot layers
# The 1Q unitaries must be decomposed as Zr-Xpi/2-Zr-Xpi/2-Zr
# The CZRot layers must contain only Gc0/Gi and Gczr gates
# '''
# assert(circtype == 'GCzr+Gzr')
# n = circ.width
# d = circ.depth
# if pauli_labels is None: pauli_labels = ['Gc0', 'Gc3', 'Gc6', 'Gc9']
# qubits = circ.line_labels
# zrotname = 'Gzr'
# czrotname = 'Gczr'
# Xpi2layer = [_lbl.Label('Gc16', q) for q in qubits]
# #make an editable copy of the circuit to add the inverse on to
# c = circ.copy(editable=True)
# #build the inverse
# d_ind = 0
# while d_ind<d:
# layer = circ.layer(d - d_ind - 1)
# if layer[0].name == zrotname: #ask if it's a Zrot layer. It's necessary for the whole layer to have Zrot gates
# #get the entire arbitrary 1q unitaries: Zrot-Xpi/2-Zrot-Xpi/2-Zrot
# current_layers = circ[d-d_ind-5:d-d_ind]
# #recompile inverse of current layer
# for i in range(n):
# if n==1:
# old_params = [(float(current_layers[0].args[0]), float(current_layers[2].args[0]),
# float(current_layers[4].args[0])) for i in range(n)]
# else:
# old_params = [(float(current_layers[0][i].args[0]), float(current_layers[2][i].args[0]),
# float(current_layers[4][i].args[0])) for i in range(n)]
# layer_new_params = [_comp.inv_recompile_unitary(*p) for p in old_params] #generates parameters for
# # the inverse of this layer
# theta1_layer = [_lbl.Label(zrotname, qubits[i], args=(str(layer_new_params[i][0]),))
# for i in range(len(layer_new_params))]
# theta2_layer = [_lbl.Label(zrotname, qubits[i], args=(str(layer_new_params[i][1]),))
# for i in range(len(layer_new_params))]
# theta3_layer = [_lbl.Label(zrotname, qubits[i], args=(str(layer_new_params[i][2]),))
# for i in range(len(layer_new_params))]
# #add to mirror circuit
# c.append_circuit_inplace(_cir.Circuit([theta3_layer]))
# c.append_circuit_inplace(_cir.Circuit([Xpi2layer]))
# c.append_circuit_inplace(_cir.Circuit([theta2_layer]))
# c.append_circuit_inplace(_cir.Circuit([Xpi2layer]))
# c.append_circuit_inplace(_cir.Circuit([theta1_layer]))
# d_ind += 5
# if layer[0].name == czrotname or layer[0].name == 'Gc0':
# invlayer = []
# for g in layer:
# if g.name == czrotname:
# gate_qubits = g.qubits
# #get gate args
# theta = float(g.args[0])
# invlayer.append(_lbl.Label(czrotname, gate_qubits, args=(str(-1*theta),)))
# else:
# invlayer.append(g)
# c.append_circuit_inplace(_cir.Circuit([invlayer]))
# d_ind += 1
# #now that we've built the simple mirror circuit, let's add pauli frame randomization
# d_ind = 0
# mc = []
# net_paulis = {q:0 for q in qubits} #dictionary keeping track of the random paulis
# d = c.depth
# correction_angles = {q: 0 for q in qubits}
# while d_ind<d:
# layer = c.layer(d_ind)
# if layer[0].name == zrotname:
# #if the layer is 1Q unitaries, pauli randomize
# current_layers = c[d_ind:d_ind+5]
# #generate random pauli
# new_paulis = {q: _np.random.randint(0, 4) for q in qubits}
# new_paulis_as_layer = [_lbl.Label(pauli_labels[new_paulis[q]], q) for q in qubits]
# #compute new net pauli based on previous pauli
# net_paulis_as_layer = [_lbl.Label(pauli_labels[net_paulis[q]], q) for q in qubits]
# net_pauli_numbers = _symp.find_pauli_number(_symp.symplectic_rep_of_clifford_circuit(_cir.Circuit(
# new_paulis_as_layer+net_paulis_as_layer), pspec=pspec)[1])
# net_paulis = {qubits[i]: net_pauli_numbers[i] for i in range(n)}
# #depending on what the net pauli before the U gate is, might need to change parameters on the U gate to
# # commute the pauli through
# #recompile current layer to account for this and recompile with these paulis
# if n == 1:
# old_params_and_paulis = [(float(current_layers[0].args[0]), float(current_layers[2].args[0]),
# float(current_layers[4].args[0]), net_paulis[qubits[i]], new_paulis[qubits[i]]) for i in range(n)]
# else:
# #problem:ordering of qubits in the layer isn't always consistent
# old_params_and_paulis = [(float(current_layers[0][i].args[0]), float(current_layers[2][i].args[0]),
# float(current_layers[4][i].args[0]), net_paulis[qubits[i]],
# new_paulis[qubits[i]]) for i in range(n)]
# layer_new_params = [_comp.pauli_frame_randomize_unitary(*p) for p in old_params_and_paulis] #need to write
# # this function
# #recompile any zrotation corrections from the previous Czr into the first zr of this layer
# theta1_layer = [_lbl.Label(zrotname, qubits[i],
# args=(str(layer_new_params[i][0]+correction_angles[qubits[i]]),)) for i in range(len(layer_new_params))]
# theta2_layer = [_lbl.Label(zrotname, qubits[i], args=(str(layer_new_params[i][1]),))
# for i in range(len(layer_new_params))]
# theta3_layer = [_lbl.Label(zrotname, qubits[i], args=(str(layer_new_params[i][2]),))
# for i in range(len(layer_new_params))]
# #add to mirror circuit
# mc.append([theta1_layer])
# mc.append([Xpi2layer])
# mc.append([theta2_layer])
# mc.append([Xpi2layer])
# mc.append([theta3_layer])
# correction_angles = {q: 0 for q in qubits}
# d_ind += 5
# if layer[0].name == czrotname or layer[0].name == 'Gc0':
# quasi_inv_layer = []
# #recompile layer taking into acount paulis
# for g in layer:
# if g.name == czrotname:
# #get the qubits, figure out net pauli on those qubits
# gate_qubits = g.qubits
# net_paulis_for_gate = (net_paulis[gate_qubits[0]], net_paulis[gate_qubits[1]])
# theta = float(g.args[0])
# if ((net_paulis_for_gate[0] % 3 != 0 and net_paulis_for_gate[1] % 3 == 0)
# or (net_paulis_for_gate[0] % 3 == 0 and net_paulis_for_gate[1] % 3 != 0)):
# theta *= -1
# quasi_inv_layer.append(_lbl.Label(czrotname, gate_qubits, args=(str(theta),)))
# #for each X or Y, do a Zrotation by -theta on the other qubit after the 2Q gate.
# for q in gate_qubits:
# if net_paulis[q] == 1 or net_paulis[q] == 2:
# for q2 in gate_qubits:
# if q2 != q:
# correction_angles[q2] += -1*theta
# else:
# gate_qubit = g.qubits
# quasi_inv_layer.append(_lbl.Label('Gc0', gate_qubit))
# #add to circuit
# mc.append([quasi_inv_layer])
# #increment position in circuit
# d_ind += 1
# #update the target pauli
# pauli_layer = [_lbl.Label(pauli_labels[net_paulis[q]], q) for q in qubits]
# conjugation_circ = _cir.Circuit([pauli_layer]) #conjugation_circ = _cir.Circuit([random_stateprep_layer,
# pauli_layer, random_meas_layer])
# telp_s, telp_p = _symp.symplectic_rep_of_clifford_circuit(conjugation_circ, pspec=pspec)
# # Calculate the bit string that this mirror circuit should output, from the final Pauli.
# target_bitstring = ''.join(['1' if p == 2 else '0' for p in telp_p[n:]])
# mirror_circuit = _cir.Circuit(mc)
# return mirror_circuit, target_bitstring
| 54.042071
| 120
| 0.586323
| 4,505
| 33,398
| 4.137625
| 0.090788
| 0.026073
| 0.013841
| 0.025376
| 0.778273
| 0.749839
| 0.73235
| 0.717221
| 0.693509
| 0.689109
| 0
| 0.015078
| 0.295048
| 33,398
| 617
| 121
| 54.12966
| 0.776631
| 0.695102
| 0
| 0.275862
| 0
| 0.013793
| 0.047526
| 0
| 0
| 0
| 0
| 0.001621
| 0.02069
| 1
| 0.013793
| false
| 0
| 0.055172
| 0
| 0.089655
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a24002ceaae927f83c59be3f7e52a69ad1e52916
| 85
|
py
|
Python
|
emsite/emapp/apps.py
|
thejeshpr/ExpenseManager
|
a3c452a87c9287a814247434ebb4039e164d7936
|
[
"MIT"
] | null | null | null |
emsite/emapp/apps.py
|
thejeshpr/ExpenseManager
|
a3c452a87c9287a814247434ebb4039e164d7936
|
[
"MIT"
] | null | null | null |
emsite/emapp/apps.py
|
thejeshpr/ExpenseManager
|
a3c452a87c9287a814247434ebb4039e164d7936
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class EmappConfig(AppConfig):
name = 'emapp'
| 14.166667
| 33
| 0.741176
| 10
| 85
| 6.3
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176471
| 85
| 5
| 34
| 17
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0.058824
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
a241e4ad1259674b74165154c4bebdc249f08146
| 8,054
|
py
|
Python
|
tests/test_crud.py
|
omnivector-solutions/flexlm-simulator
|
c661e22a9ff07700285ed36fbf1668f11653cfdd
|
[
"MIT"
] | 5
|
2020-10-30T01:53:37.000Z
|
2022-02-22T23:37:57.000Z
|
tests/test_crud.py
|
omnivector-solutions/flexlm-simulator
|
c661e22a9ff07700285ed36fbf1668f11653cfdd
|
[
"MIT"
] | 2
|
2021-09-01T18:36:08.000Z
|
2022-03-31T20:33:33.000Z
|
tests/test_crud.py
|
omnivector-solutions/license-manager-simulator
|
e670d17e8dd748bc384204cecc59977993295b67
|
[
"MIT"
] | null | null | null |
import pytest
from sqlalchemy import select
from sqlalchemy.exc import IntegrityError
from license_manager_simulator import crud
from license_manager_simulator.models import License, LicenseInUse
from license_manager_simulator.schemas import LicenseInUseCreate, LicenseRow
def test_create_license(one_license, session):
created_license = crud.create_license(session, one_license)
assert created_license.id
assert created_license.name == one_license.name
assert created_license.total == one_license.total
licenses_in_db = session.execute(select(License)).scalars().all()
assert len(licenses_in_db) == 1
assert licenses_in_db[0].id == created_license.id
assert licenses_in_db[0].name == one_license.name
assert licenses_in_db[0].total == one_license.total
# ignoring warning about double rollback
@pytest.mark.filterwarnings("ignore::RuntimeWarning")
def test_create_license_duplicate(one_license, session):
"""Test that an exception is thrown if a duplicate license entry is created."""
crud.create_license(session, one_license)
with pytest.raises(IntegrityError):
crud.create_license(session, one_license)
def test_get_licenses_empty(session):
licenses = crud.get_licenses(session)
assert len(licenses) == 0
def test_get_licenses(session):
session.add(License(id=1, name="name1", total=10))
session.add(License(id=2, name="name2", total=10))
session.commit()
licenses_response = crud.get_licenses(session)
assert len(licenses_response) == 2
assert licenses_response[0].id == 1
assert licenses_response[0].name == "name1"
assert licenses_response[0].total == 10
assert licenses_response[1].id == 2
assert licenses_response[1].name == "name2"
assert licenses_response[1].total == 10
def test_get_licenses_in_use(session, one_license, one_license_in_use):
session.add(License(**one_license.dict()))
session.add(LicenseInUse(**one_license_in_use.dict(), id=1))
session.commit()
licenses_in_use = crud.get_licenses_in_use(session)
assert len(licenses_in_use) == 1
assert licenses_in_use[0].id == 1
assert licenses_in_use[0].quantity == one_license_in_use.quantity
assert licenses_in_use[0].user_name == one_license_in_use.user_name
assert licenses_in_use[0].lead_host == one_license_in_use.lead_host
assert licenses_in_use[0].license_name == one_license_in_use.license_name
def test_get_licenses_in_use_empty(session):
licenses_in_use = crud.get_licenses_in_use(session)
assert len(licenses_in_use) == 0
def test_get_licenses_in_use_from_name(session, one_license, one_license_in_use):
session.add(License(**one_license.dict()))
session.add(LicenseInUse(**one_license_in_use.dict(), id=1))
session.commit()
licenses_in_use = crud.get_licenses_in_use_from_name(session, one_license.name)
assert len(licenses_in_use) == 1
assert licenses_in_use[0].id == 1
assert licenses_in_use[0].quantity == one_license_in_use.quantity
assert licenses_in_use[0].user_name == one_license_in_use.user_name
assert licenses_in_use[0].lead_host == one_license_in_use.lead_host
assert licenses_in_use[0].license_name == one_license_in_use.license_name
def test_get_licenses_in_use_from_name_empty(session):
licenses_in_use = crud.get_licenses_in_use_from_name(session, "name")
assert len(licenses_in_use) == 0
def test_create_license_in_use(session, one_license_in_use):
session.add(License(id=1, name="test_name", total=10))
session.commit()
created_license_in_use = crud.create_license_in_use(session, one_license_in_use)
assert created_license_in_use.id
assert created_license_in_use.quantity == one_license_in_use.quantity
assert created_license_in_use.user_name == one_license_in_use.user_name
assert created_license_in_use.lead_host == one_license_in_use.lead_host
assert created_license_in_use.license_name == one_license_in_use.license_name
license_in_use_in_db = session.execute(select(LicenseInUse)).scalars().all()
assert len(license_in_use_in_db) == 1
assert license_in_use_in_db[0].id == created_license_in_use.id
assert license_in_use_in_db[0].quantity == one_license_in_use.quantity
assert license_in_use_in_db[0].user_name == one_license_in_use.user_name
assert license_in_use_in_db[0].lead_host == one_license_in_use.lead_host
assert license_in_use_in_db[0].license_name == one_license_in_use.license_name
def test_create_license_in_use_correctly_updates_license_in_use(session):
session.add(License(id=1, name="test_name", total=30))
session.commit()
crud.create_license_in_use(
session,
LicenseInUseCreate(
quantity=10,
user_name="user1",
lead_host="host1",
license_name="test_name",
),
)
crud.create_license_in_use(
session,
LicenseInUseCreate(
quantity=20,
user_name="user1",
lead_host="host1",
license_name="test_name",
),
)
licenses_in_db = session.execute(select(License)).scalars().all()
assert LicenseRow.from_orm(licenses_in_db[0]).in_use == 30
@pytest.mark.filterwarnings("ignore::RuntimeWarning")
def test_create_license_in_use_duplicate(session, one_license_in_use):
"""Test that an exception is thrown if a duplicate in use license entry is created."""
session.add(License(id=1, name="test_name", total=100))
session.commit()
crud.create_license_in_use(session, one_license_in_use)
with pytest.raises(IntegrityError):
crud.create_license_in_use(session, one_license_in_use)
def test_create_license_in_use_not_available(session, one_license_in_use):
session.add(License(id=1, name="test_name", total=0))
session.commit()
with pytest.raises(crud.NotEnoughLicenses):
crud.create_license_in_use(session, one_license_in_use)
def test_create_license_in_use_empty(session, one_license_in_use):
with pytest.raises(crud.LicenseNotFound):
crud.create_license_in_use(session, one_license_in_use)
def test_delete_license_in_use(session, one_license, one_license_in_use):
session.add(License(**one_license.dict()))
session.add(LicenseInUse(**one_license_in_use.dict(), id=1))
session.commit()
ids = crud.delete_license_in_use(
session,
one_license_in_use.lead_host,
one_license_in_use.user_name,
one_license_in_use.quantity,
one_license_in_use.license_name,
)
assert len(ids) == 1
license_in_use_in_db = session.execute(select(LicenseInUse)).scalars().all()
assert len(license_in_use_in_db) == 0
def test_delete_license_in_use_not_found(session, one_license, one_license_in_use):
session.add(License(**one_license.dict()))
session.add(LicenseInUse(**one_license_in_use.dict(), id=1))
session.commit()
with pytest.raises(crud.LicenseNotFound):
crud.delete_license_in_use(
session,
"wrong_lead_host",
one_license_in_use.user_name,
one_license_in_use.quantity,
one_license_in_use.license_name,
)
license_in_use_in_db = session.execute(select(LicenseInUse)).scalars().all()
assert len(license_in_use_in_db) == 1
def test_delete_license_in_use_correctly_updates_license_in_use(session, one_license_in_use):
session.add(License(id=1, name="test_name", total=30))
session.add(LicenseInUse(**one_license_in_use.dict(), id=1))
session.commit()
licenses_in_db = session.execute(select(License)).scalars().all()
assert LicenseRow.from_orm(licenses_in_db[0]).in_use == one_license_in_use.quantity
crud.delete_license_in_use(
session,
one_license_in_use.lead_host,
one_license_in_use.user_name,
one_license_in_use.quantity,
one_license_in_use.license_name,
)
licenses_in_db = session.execute(select(License)).scalars().all()
assert LicenseRow.from_orm(licenses_in_db[0]).in_use == 0
| 38.352381
| 93
| 0.747082
| 1,184
| 8,054
| 4.672297
| 0.072635
| 0.103941
| 0.184382
| 0.12744
| 0.835683
| 0.795553
| 0.732646
| 0.680224
| 0.623644
| 0.541215
| 0
| 0.012762
| 0.153588
| 8,054
| 209
| 94
| 38.535885
| 0.798738
| 0.024087
| 0
| 0.546584
| 0
| 0
| 0.021149
| 0.005606
| 0
| 0
| 0
| 0
| 0.285714
| 1
| 0.099379
| false
| 0
| 0.037267
| 0
| 0.136646
| 0
| 0
| 0
| 0
| null | 0
| 1
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a24c913d4734585a0b48fe0cbb1edf4dca7cc7a8
| 5,991
|
py
|
Python
|
tests/lib/test_date_time.py
|
AlexTalker/iml-common
|
5617e9c89a3a5d2f02f499a3497035faf942bf1d
|
[
"MIT"
] | null | null | null |
tests/lib/test_date_time.py
|
AlexTalker/iml-common
|
5617e9c89a3a5d2f02f499a3497035faf942bf1d
|
[
"MIT"
] | null | null | null |
tests/lib/test_date_time.py
|
AlexTalker/iml-common
|
5617e9c89a3a5d2f02f499a3497035faf942bf1d
|
[
"MIT"
] | null | null | null |
import datetime
import mock
from django.utils import unittest
from iml_common.lib.date_time import IMLDateTime
from iml_common.lib.date_time import FixedOffset
from iml_common.lib.date_time import LocalOffset
class TestIMLDateTime(unittest.TestCase):
def test_prase(self):
for str, date_time in [("2016/10/09T19:20:21+1000",
IMLDateTime(year=2016, month=10, day=9, hour=19, minute=20, second=21, microsecond=0,
tzinfo=FixedOffset(600))),
("2016/10/09T19:20:21.12345+1000",
IMLDateTime(year=2016, month=10, day=9, hour=19, minute=20, second=21, microsecond=123450,
tzinfo=FixedOffset(600))),
("2016-10-09 19:20:21-1000",
IMLDateTime(year=2016, month=10, day=9, hour=19, minute=20, second=21, microsecond=0,
tzinfo=FixedOffset(-600))),
("2016-10-09 19:20:21.12345-1000",
IMLDateTime(year=2016, month=10, day=9, hour=19, minute=20, second=21, microsecond=123450,
tzinfo=FixedOffset(-600))),
("19:20:21-1000 2016-10/09",
IMLDateTime(year=2016, month=10, day=9, hour=19, minute=20, second=21, microsecond=0,
tzinfo=FixedOffset(-600))),
("19:20:21.12345-0000 2016/10-09",
IMLDateTime(year=2016, month=10, day=9, hour=19, minute=20, second=21, microsecond=123450,
tzinfo=FixedOffset(0))),
(" 19:20:21.12345 -1000 2016/10-09 ",
IMLDateTime(year=2016, month=10, day=9, hour=19, minute=20, second=21, microsecond=123450,
tzinfo=FixedOffset(-600))),
("2016/10-09",
IMLDateTime(year=2016, month=10, day=9, tzinfo=FixedOffset(0))),
("19:20:21.12345-0000",
IMLDateTime(year=1900, month=1, day=1, hour=19, minute=20, second=21, microsecond=123450,
tzinfo=FixedOffset(0))),
("19:20:21-0500",
IMLDateTime(year=1900, month=1, day=1, hour=19, minute=20, second=21, microsecond=0,
tzinfo=FixedOffset(-300)))
]:
self.assertEqual(IMLDateTime.parse(str), date_time)
class TestFixedOffset(unittest.TestCase):
def test_properties_negative(self):
fixed_offset = FixedOffset(-300)
self.assertEqual(fixed_offset.offset, datetime.timedelta(days=-1, hours=19))
self.assertEqual(fixed_offset.utcoffset(), datetime.timedelta(days=-1, hours=19))
self.assertEqual(fixed_offset.tzname(), '<-1 day, 19:00:00>')
self.assertEqual(fixed_offset.dst(), datetime.timedelta(seconds=0))
self.assertEqual(str(fixed_offset), '-0500')
def test_properties_positive(self):
fixed_offset = FixedOffset(567)
self.assertEqual(fixed_offset.offset, datetime.timedelta(hours=9, minutes=27))
self.assertEqual(fixed_offset.utcoffset(), datetime.timedelta(hours=9, minutes=27))
self.assertEqual(fixed_offset.tzname(), '<9:27:00>')
self.assertEqual(fixed_offset.dst(), datetime.timedelta(seconds=0))
self.assertEqual(str(fixed_offset), '0927')
class TestLocalOffset(unittest.TestCase):
class MockDateTime(datetime.datetime):
now_time = None
utc_time = None
@classmethod
def now(cls, tz=None):
return cls.now_time
@classmethod
def utcnow(cls):
return cls.utc_time
def setUp(self):
self.MockDateTime.utc_time = datetime.datetime(year=2010, month=4, day=20, hour=20, minute=13, second=2)
self.MockDateTime.now_time = datetime.datetime(year=2010, month=4, day=20, hour=21, minute=13, second=2)
mock.patch('iml_common.lib.date_time.datetime', self.MockDateTime).start()
def test_properties_gmt(self):
local_offset = LocalOffset()
self.assertEqual(local_offset.offset, datetime.timedelta(hours=1, minutes=0))
self.assertEqual(local_offset.utcoffset(), datetime.timedelta(hours=1, minutes=0))
self.assertEqual(local_offset.tzname(), '<1:00:00>')
self.assertEqual(local_offset.dst(), datetime.timedelta(seconds=0))
self.assertEqual(str(local_offset), '0100')
def test_properties_cst(self):
self.MockDateTime.now_time = datetime.datetime(year=2010, month=4, day=20, hour=13, minute=13, second=2)
local_offset = LocalOffset()
self.assertEqual(local_offset.offset, datetime.timedelta(days=-1, hours=17, minutes=0))
self.assertEqual(local_offset.utcoffset(), datetime.timedelta(days=-1, hours=17, minutes=0))
self.assertEqual(local_offset.tzname(), '<-1 day, 17:00:00>')
self.assertEqual(local_offset.dst(), datetime.timedelta(seconds=0))
self.assertEqual(str(local_offset), '-0700')
def test_properties_ist(self):
self.MockDateTime.now_time = datetime.datetime(year=2010, month=4, day=21, hour=01, minute=43, second=2)
local_offset = LocalOffset()
self.assertEqual(local_offset.offset, datetime.timedelta(hours=5, minutes=30))
self.assertEqual(local_offset.utcoffset(), datetime.timedelta(hours=5, minutes=30))
self.assertEqual(local_offset.tzname(), '<5:30:00>')
self.assertEqual(local_offset.dst(), datetime.timedelta(seconds=0))
self.assertEqual(str(local_offset), '0530')
| 52.552632
| 122
| 0.580204
| 685
| 5,991
| 4.988321
| 0.145985
| 0.114135
| 0.070237
| 0.091308
| 0.780217
| 0.760609
| 0.757097
| 0.69681
| 0.690079
| 0.683055
| 0
| 0.117494
| 0.293941
| 5,991
| 113
| 123
| 53.017699
| 0.690307
| 0
| 0
| 0.274725
| 0
| 0
| 0.064931
| 0.014522
| 0
| 0
| 0
| 0
| 0.285714
| 0
| null | null | 0
| 0.065934
| null | null | 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a25c49d7fc9908aac0451e58d3f0a10ff87779e3
| 91
|
py
|
Python
|
magulbot/rawpages/apps.py
|
magul/magulbot
|
8a1c78d0ec8dfd8f7730ffd0647b9f139c2c806e
|
[
"MIT"
] | null | null | null |
magulbot/rawpages/apps.py
|
magul/magulbot
|
8a1c78d0ec8dfd8f7730ffd0647b9f139c2c806e
|
[
"MIT"
] | null | null | null |
magulbot/rawpages/apps.py
|
magul/magulbot
|
8a1c78d0ec8dfd8f7730ffd0647b9f139c2c806e
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class RawpagesConfig(AppConfig):
name = 'rawpages'
| 15.166667
| 33
| 0.758242
| 10
| 91
| 6.9
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.164835
| 91
| 5
| 34
| 18.2
| 0.907895
| 0
| 0
| 0
| 0
| 0
| 0.087912
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
a27573d00cdc9f325f469d25bd79ea060526ec03
| 263
|
py
|
Python
|
atendimento/forms.py
|
alantinoco/django-crmsmart
|
f8bd3404e0dfdf4a2976ec8bbdaee27a012f9981
|
[
"MIT"
] | null | null | null |
atendimento/forms.py
|
alantinoco/django-crmsmart
|
f8bd3404e0dfdf4a2976ec8bbdaee27a012f9981
|
[
"MIT"
] | null | null | null |
atendimento/forms.py
|
alantinoco/django-crmsmart
|
f8bd3404e0dfdf4a2976ec8bbdaee27a012f9981
|
[
"MIT"
] | null | null | null |
from django import forms
from .models import Contato, Venda
class ContatoForm(forms.ModelForm):
class Meta:
model = Contato
fields = '__all__'
class VendaForm(forms.ModelForm):
class Meta:
model = Venda
fields = '__all__'
| 21.916667
| 35
| 0.657795
| 29
| 263
| 5.689655
| 0.517241
| 0.169697
| 0.230303
| 0.278788
| 0.339394
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.26616
| 263
| 12
| 36
| 21.916667
| 0.854922
| 0
| 0
| 0.4
| 0
| 0
| 0.05303
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.6
| 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
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
a289370bdcdcb13a4d97ac9d7777419844c906ff
| 30
|
py
|
Python
|
tests/__init__.py
|
Landcross/xbox-webapi-python
|
0e3f01254907d929fc52f843a5f3bf53ef2ba876
|
[
"MIT"
] | 122
|
2018-03-17T05:20:35.000Z
|
2022-03-30T23:30:14.000Z
|
tests/__init__.py
|
Landcross/xbox-webapi-python
|
0e3f01254907d929fc52f843a5f3bf53ef2ba876
|
[
"MIT"
] | 62
|
2018-03-27T14:17:11.000Z
|
2022-03-30T16:36:03.000Z
|
tests/__init__.py
|
Landcross/xbox-webapi-python
|
0e3f01254907d929fc52f843a5f3bf53ef2ba876
|
[
"MIT"
] | 38
|
2018-05-09T19:17:48.000Z
|
2022-02-03T06:55:04.000Z
|
"""Tests for XBox Web API."""
| 15
| 29
| 0.6
| 5
| 30
| 3.6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 30
| 1
| 30
| 30
| 0.72
| 0.766667
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a2a6ad3c5809420ec7b8a0d2d9cbf1e7955c0b2f
| 948
|
py
|
Python
|
ChessEngine/hist_movement_manager.py
|
PavelLebed20/chess_classic
|
72f7d08cadae8db9c65d61411bcdc8c79bfa04c3
|
[
"Apache-2.0"
] | 1
|
2019-06-04T11:08:55.000Z
|
2019-06-04T11:08:55.000Z
|
ChessEngine/hist_movement_manager.py
|
PavelLebed20/chess_classic
|
72f7d08cadae8db9c65d61411bcdc8c79bfa04c3
|
[
"Apache-2.0"
] | 115
|
2019-03-02T08:02:50.000Z
|
2019-06-02T16:28:00.000Z
|
ChessEngine/hist_movement_manager.py
|
PavelLebed20/chess_classic
|
72f7d08cadae8db9c65d61411bcdc8c79bfa04c3
|
[
"Apache-2.0"
] | null | null | null |
class HistMovementManager:
def __init__(self):
self.boards_hist = []
self.cur_board = -1
self.offset = 0
def make_screen(self, board):
if self.cur_board != -1 and self.boards_hist[self.cur_board] == board:
return
self.boards_hist.append(board)
self.cur_board += 1
def get_prev(self):
if self.cur_board + self.offset > 0:
self.offset -= 1
return self.boards_hist[self.cur_board + self.offset]
def get_next(self):
if self.offset < 0:
self.offset += 1
return self.boards_hist[self.cur_board + self.offset]
def clear(self):
self.boards_hist = []
self.cur_board = -1
self.offset = 0
def get_hist_board(self):
return self.boards_hist[self.cur_board + self.offset]
def up_to_date(self):
return self.offset == 0
def reset_offset(self):
self.offset = 0
| 25.621622
| 78
| 0.590717
| 129
| 948
| 4.124031
| 0.20155
| 0.206767
| 0.203008
| 0.203008
| 0.577068
| 0.554511
| 0.505639
| 0.505639
| 0.505639
| 0.505639
| 0
| 0.018209
| 0.304852
| 948
| 36
| 79
| 26.333333
| 0.789074
| 0
| 0
| 0.357143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0
| 0.071429
| 0.5
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a2d42908c2389ed06bad834874371e7a96ecdb26
| 670
|
py
|
Python
|
houdini/scripts/OnDeleted.py
|
Hengle/Houdini-Toolbox
|
a1fd7d3dd73d3fc4cea78e29aeff1d190c41bae3
|
[
"MIT"
] | 136
|
2015-01-03T04:03:23.000Z
|
2022-02-07T11:08:57.000Z
|
houdini/scripts/OnDeleted.py
|
Hengle/Houdini-Toolbox
|
a1fd7d3dd73d3fc4cea78e29aeff1d190c41bae3
|
[
"MIT"
] | 11
|
2017-02-09T20:05:04.000Z
|
2021-01-24T22:25:59.000Z
|
houdini/scripts/OnDeleted.py
|
Hengle/Houdini-Toolbox
|
a1fd7d3dd73d3fc4cea78e29aeff1d190c41bae3
|
[
"MIT"
] | 26
|
2015-08-18T12:11:02.000Z
|
2020-12-19T01:53:31.000Z
|
"""Perform tasks when a Houdini node is deleted."""
# =============================================================================
# IMPORTS
# =============================================================================
# Houdini Toolbox
from ht.events import NodeEvents, run_event
# =============================================================================
# FUNCTIONS
# =============================================================================
def main():
"""Main function."""
run_event(NodeEvents.OnDeleted, kwargs) # pylint: disable=undefined-variable
# =============================================================================
main()
| 29.130435
| 81
| 0.285075
| 33
| 670
| 5.727273
| 0.818182
| 0.084656
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.085075
| 670
| 22
| 82
| 30.454545
| 0.30832
| 0.776119
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0.25
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a2e82129a99d14050d9c32772d3d649a952fd01b
| 1,191
|
py
|
Python
|
datatypes.py
|
dhh1128/yaval
|
030849240d475027fe1d711c213fb5e80db28fa5
|
[
"MIT"
] | null | null | null |
datatypes.py
|
dhh1128/yaval
|
030849240d475027fe1d711c213fb5e80db28fa5
|
[
"MIT"
] | null | null | null |
datatypes.py
|
dhh1128/yaval
|
030849240d475027fe1d711c213fb5e80db28fa5
|
[
"MIT"
] | null | null | null |
float_type = type(1.0)
int_type = type(1)
string_type = type('')
date_type = 'iso8601'
unicode_type = type(u'')
bool_type = type(True)
map_type = type({})
seq_type = type([])
tuple_type = type(())
def is_string(obj):
t = type(obj)
return t is string_type or t is unicode_type
def is_int(obj):
return type(obj) is int_type
def is_float(obj):
return type(obj) is float_type
def is_number(obj):
t = type(obj)
return t is int_type or t is float_type
def is_map(obj):
return type(obj) is map_type
def is_seq(obj):
return type(obj) is seq_type
def is_tuple(obj):
return type(obj) is tuple_type
def is_bool(obj):
return type(obj) is bool_type
def is_scalar(obj):
t = type(obj)
return not (t is map_type or t is seq_type or t is tuple_type)
def get_simple_type_name(obj):
if is_string(obj):
return 'str'
if is_map(obj):
return 'map'
if is_seq(obj):
return 'seq'
if is_tuple(obj):
return 'tuple'
if is_int(obj):
return 'int'
if is_float(obj):
return 'float'
if is_bool(obj):
return 'bool'
if obj is None:
return 'null'
return str(type(obj))
| 19.85
| 66
| 0.633081
| 207
| 1,191
| 3.444444
| 0.149758
| 0.201964
| 0.113604
| 0.134642
| 0.273492
| 0.056101
| 0.056101
| 0
| 0
| 0
| 0
| 0.007892
| 0.255248
| 1,191
| 59
| 67
| 20.186441
| 0.795941
| 0
| 0
| 0.0625
| 0
| 0
| 0.031092
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.208333
| false
| 0
| 0
| 0.125
| 0.583333
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
0c19d6c8d8201ce7578c57fa5302f686d9648588
| 2,109
|
py
|
Python
|
test/test_plugins/test_gif.py
|
uilab-github/slask
|
aded42ac86484e24cd4fa437d8f0ce54fe738695
|
[
"MIT"
] | 30
|
2016-02-25T15:41:59.000Z
|
2021-01-24T21:37:24.000Z
|
test/test_plugins/test_gif.py
|
uilab-github/slask
|
aded42ac86484e24cd4fa437d8f0ce54fe738695
|
[
"MIT"
] | 4
|
2016-02-26T15:10:38.000Z
|
2017-09-19T06:49:54.000Z
|
test/test_plugins/test_gif.py
|
uilab-github/slask
|
aded42ac86484e24cd4fa437d8f0ce54fe738695
|
[
"MIT"
] | 9
|
2016-02-23T17:49:15.000Z
|
2017-07-06T21:42:03.000Z
|
# -*- coding: UTF-8 -*-
import os
import sys
from nose.tools import eq_
import vcr
DIR = os.path.dirname(os.path.realpath(__file__))
sys.path.insert(0, os.path.join(DIR, '../../limbo/plugins'))
from gif import on_message
# The set of valid gifs given the bananas fixture
bananas_gifs = ['http://byt.wpengine.netdna-cdn.com/wp-content/uploads/2014/09/banana-dolphin-and-boy.gif', 'http://joedale.typepad.com/photos/uncategorized/2008/05/29/bananas.gif', 'http://orig04.deviantart.net/a8fc/f/2012/269/a/b/i_heart_banana_by_mnrart-d5fyx04.gif', 'http://images2.wikia.nocookie.net/illogicopedia/images/3/31/Dancing_Banana.gif', 'http://media.giphy.com/media/PlwtdKszlxyLK/giphy.gif', 'https://s-media-cache-ak0.pinimg.com/originals/81/36/86/813686513bb0ea580e9891fc15ec7678.jpg', 'http://www.webweaver.nu/clipart/img/misc/food/fruit/bunch-of-bananas.gif', 'http://www.animatedimages.org/data/media/330/animated-banana-image-0039.gif', 'http://www.rockinghamremembered.com/images/bananas.gif', 'http://ak-hdl.buzzfed.com/static/2015-09/11/13/imagebuzz/webdr07/anigif_optimized-6124-1441992418-1.gif', 'http://www.picgifs.com/graphics/b/bananas/graphics-bananas-761495.gif', 'http://volweb.utk.edu/SCHOOL/sweetwjh/dancing%20banana.gif', 'http://i.imgur.com/LQzD19d.gif', 'http://media.giphy.com/media/LldwJVCUlhRmg/giphy.gif', 'http://images5.fanpop.com/image/photos/30600000/Banana-gif-bananas-30667445-140-140.gif', 'http://www.sevenoaksart.co.uk/images/banana2.gif', 'http://ww2.valdosta.edu/~kabehland/gobananas.gif', 'http://www.comevisit.com/chuckali/bananas.gif', 'http://media.giphy.com/media/1MqvxsrhMHrGw/giphy.gif', 'https://strengthandsweets.files.wordpress.com/2014/01/bananadance.gif']
def test_gif():
with vcr.use_cassette('test/fixtures/gif_bananas.yaml'):
ret = on_message({"text": u"!gif bananas"}, None)
assert ret in bananas_gifs, "{0} not in {1}".format(ret, bananas_gifs)
def test_unicode():
with vcr.use_cassette('test/fixtures/gif_unicode.yaml'):
ret = on_message({"text": u"!gif Mötörhead"}, None)
# not blowing up == success, for our purposes
| 84.36
| 1,422
| 0.746799
| 322
| 2,109
| 4.819876
| 0.549689
| 0.072165
| 0.032216
| 0.032861
| 0.121778
| 0.121778
| 0.073454
| 0
| 0
| 0
| 0
| 0.071646
| 0.066856
| 2,109
| 24
| 1,423
| 87.875
| 0.716972
| 0.05358
| 0
| 0
| 0
| 0.666667
| 0.72992
| 0.03012
| 0
| 0
| 0
| 0
| 0.066667
| 1
| 0.133333
| false
| 0
| 0.333333
| 0
| 0.466667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0c1dc1bd2e55c75a1d8431fedf25236f9147fa81
| 181
|
py
|
Python
|
homeassistant/components/automate/const.py
|
Andrew55529/core
|
c440a30aff0d8f573d8aa0d949068702dd36c386
|
[
"Apache-2.0"
] | 10
|
2021-05-26T20:43:32.000Z
|
2022-03-28T05:30:46.000Z
|
homeassistant/components/automate/const.py
|
flexy2dd/core
|
1019ee22ff13e5f542e868179d791e6a0d87369a
|
[
"Apache-2.0"
] | 58
|
2021-01-04T08:20:32.000Z
|
2022-03-31T06:05:13.000Z
|
homeassistant/components/automate/const.py
|
flexy2dd/core
|
1019ee22ff13e5f542e868179d791e6a0d87369a
|
[
"Apache-2.0"
] | 5
|
2020-09-15T07:56:20.000Z
|
2021-05-09T09:22:47.000Z
|
"""Constants for the Automate Pulse Hub v2 integration."""
DOMAIN = "automate"
AUTOMATE_HUB_UPDATE = "automate_hub_update_{}"
AUTOMATE_ENTITY_REMOVE = "automate_entity_remove_{}"
| 25.857143
| 58
| 0.78453
| 22
| 181
| 6
| 0.545455
| 0.166667
| 0.257576
| 0.378788
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006173
| 0.104972
| 181
| 6
| 59
| 30.166667
| 0.808642
| 0.287293
| 0
| 0
| 0
| 0
| 0.447154
| 0.382114
| 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
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0c2e4d5e7b0ee2f9c4ed047eaa53e0e5882e2c87
| 901
|
py
|
Python
|
gsr/gs/tests/__init__.py
|
Green-Resilience/wfRunner
|
df5cff4e51484ac8b8a0fbdb4ec3ad6d05586817
|
[
"Apache-2.0"
] | null | null | null |
gsr/gs/tests/__init__.py
|
Green-Resilience/wfRunner
|
df5cff4e51484ac8b8a0fbdb4ec3ad6d05586817
|
[
"Apache-2.0"
] | null | null | null |
gsr/gs/tests/__init__.py
|
Green-Resilience/wfRunner
|
df5cff4e51484ac8b8a0fbdb4ec3ad6d05586817
|
[
"Apache-2.0"
] | null | null | null |
#-------------------------------------------------------------------------------
# Name: __init__.py
# Purpose: Green Scale Tool UnitTests (init test)
#
# Author: Holly Tina Ferguson
#
# Created: 15/09/2013
# Copyright: (c) Holly Tina Ferguson 2013
# Licence: The University of Notre Dame
#-------------------------------------------------------------------------------
from weatherTest import *
from gbxmlTest import *
from mainTest import *
from spaceTest import *
from surfaceTest import *
from openingTest import *
from temperatureTest import *
from transmittedSoalrTest import *
from ShadowTest import *
from heatCalculationTest import *
from orientationTestB import *
from orientationTestA import *
from mainGreenScaleV1Test import *
from GreenscaleSpaceTest import *
from GreenscaleSurfaceTest import *
from GreenscaleEETest import *
| 30.033333
| 81
| 0.602664
| 78
| 901
| 6.910256
| 0.551282
| 0.278293
| 0.06308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017568
| 0.17869
| 901
| 29
| 82
| 31.068966
| 0.710811
| 0.417314
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
a74f15f3eba269326ba55ddc49832f0f8ccb9258
| 429
|
py
|
Python
|
rootfs/api/migrations/0013_auto_20210525_0140.py
|
jianxiaoguo/manager
|
148e9d14dcf472750d3eb637794cdabb2a2edeea
|
[
"Apache-2.0"
] | null | null | null |
rootfs/api/migrations/0013_auto_20210525_0140.py
|
jianxiaoguo/manager
|
148e9d14dcf472750d3eb637794cdabb2a2edeea
|
[
"Apache-2.0"
] | null | null | null |
rootfs/api/migrations/0013_auto_20210525_0140.py
|
jianxiaoguo/manager
|
148e9d14dcf472750d3eb637794cdabb2a2edeea
|
[
"Apache-2.0"
] | null | null | null |
# Generated by Django 2.2.18 on 2021-05-25 01:40
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('api', '0012_auto_20210330_0827'),
]
operations = [
migrations.RemoveField(
model_name='cluster',
name='admin',
),
migrations.RemoveField(
model_name='cluster',
name='passwd',
),
]
| 19.5
| 48
| 0.55711
| 42
| 429
| 5.571429
| 0.714286
| 0.179487
| 0.222222
| 0.25641
| 0.350427
| 0.350427
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 0.328671
| 429
| 21
| 49
| 20.428571
| 0.701389
| 0.107226
| 0
| 0.4
| 1
| 0
| 0.133858
| 0.060367
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.066667
| 0.066667
| 0
| 0.266667
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
a757e77a6eb5c8ba44db226a60db8e966c25db4f
| 91
|
py
|
Python
|
demo/glo2.py
|
Bunrning-Bear/secret_project
|
8ec68f13fd733643d7f0ea7631a14d938dc5d194
|
[
"Apache-2.0"
] | 8
|
2017-10-09T02:06:03.000Z
|
2020-03-05T12:13:52.000Z
|
demo/glo2.py
|
Bunrning-Bear/secret_project
|
8ec68f13fd733643d7f0ea7631a14d938dc5d194
|
[
"Apache-2.0"
] | 1
|
2022-03-11T07:19:58.000Z
|
2022-03-14T09:40:47.000Z
|
demo/glo2.py
|
xionghuichen/cellular-automaton-for-auto-driver
|
8ec68f13fd733643d7f0ea7631a14d938dc5d194
|
[
"Apache-2.0"
] | 5
|
2017-09-01T08:36:28.000Z
|
2020-01-16T07:03:57.000Z
|
# glo2.py
from glo1 import obj
obj.a = 10
print obj.a
from glo3 import test
test()
test()
| 10.111111
| 21
| 0.703297
| 18
| 91
| 3.555556
| 0.611111
| 0.125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.068493
| 0.197802
| 91
| 9
| 22
| 10.111111
| 0.808219
| 0.076923
| 0
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.333333
| null | null | 0.166667
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
a75da12f22ac2b4f00e23154601d96ca2728868f
| 88
|
py
|
Python
|
tapis_cli/__init__.py
|
bpachev/tapis-cli
|
c3128fb5b63ef74e06b737bbd95ef28fb24f0d32
|
[
"BSD-3-Clause"
] | 8
|
2020-10-18T22:48:23.000Z
|
2022-01-10T09:16:14.000Z
|
tapis_cli/__init__.py
|
bpachev/tapis-cli
|
c3128fb5b63ef74e06b737bbd95ef28fb24f0d32
|
[
"BSD-3-Clause"
] | 238
|
2019-09-04T14:37:54.000Z
|
2020-04-15T16:24:24.000Z
|
tapis_cli/__init__.py
|
bpachev/tapis-cli
|
c3128fb5b63ef74e06b737bbd95ef28fb24f0d32
|
[
"BSD-3-Clause"
] | 5
|
2019-09-20T04:23:49.000Z
|
2020-01-16T17:45:14.000Z
|
import logging
from .__about__ import About
from . import utils
PKG_NAME = 'tapis_cli'
| 14.666667
| 28
| 0.784091
| 13
| 88
| 4.846154
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.159091
| 88
| 5
| 29
| 17.6
| 0.851351
| 0
| 0
| 0
| 0
| 0
| 0.102273
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
a7ccc9e8bc52a324a7d19a2de30ebbb1ce8bfbe7
| 218
|
py
|
Python
|
day02/ex00/ft_map.py
|
elbourki1/Python-bootcamp-42
|
7739a3c92050526f0e4bdafbbc1358f0ae721936
|
[
"Apache-2.0"
] | null | null | null |
day02/ex00/ft_map.py
|
elbourki1/Python-bootcamp-42
|
7739a3c92050526f0e4bdafbbc1358f0ae721936
|
[
"Apache-2.0"
] | null | null | null |
day02/ex00/ft_map.py
|
elbourki1/Python-bootcamp-42
|
7739a3c92050526f0e4bdafbbc1358f0ae721936
|
[
"Apache-2.0"
] | null | null | null |
def ft_map(function_to_apply, list_of_inputs):
return [function_to_apply(x) for x in list_of_inputs]
c = [0,1,2,3,4,5]
def add1(t):
return t+1
print(list(map(lambda x: x+1,c)))
print(ft_map(lambda x: x+1,c))
| 21.8
| 57
| 0.688073
| 49
| 218
| 2.857143
| 0.489796
| 0.071429
| 0.214286
| 0.157143
| 0.185714
| 0.185714
| 0
| 0
| 0
| 0
| 0
| 0.053763
| 0.146789
| 218
| 10
| 58
| 21.8
| 0.698925
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0
| 0.285714
| 0.571429
| 0.285714
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
a7d09ed7a4c40852cb1e1dd82433da624e6383e5
| 289
|
py
|
Python
|
main.py
|
Odaboy09/summer-of-qode
|
414f99ec3b0e7b4f57b666ca1036c825e56a27ce
|
[
"MIT"
] | 14
|
2021-05-30T08:18:59.000Z
|
2021-06-08T14:28:18.000Z
|
main.py
|
Odaboy09/summer-of-qode
|
414f99ec3b0e7b4f57b666ca1036c825e56a27ce
|
[
"MIT"
] | 3
|
2021-06-02T15:26:16.000Z
|
2021-06-06T10:17:39.000Z
|
main.py
|
Odaboy09/summer-of-qode
|
414f99ec3b0e7b4f57b666ca1036c825e56a27ce
|
[
"MIT"
] | 47
|
2021-05-26T14:59:12.000Z
|
2021-06-12T12:01:57.000Z
|
print ("Assignment 1")
print ("odd or even?")
import Assignment_1
print ("Assignment 2")
print ("how many chocolates would you like?")
import Assignment_2
print ("Final Assignment, Assignment 3")
print ("we will figure out if your given number falls in our range")
import Assignment_3
| 20.642857
| 68
| 0.750865
| 44
| 289
| 4.863636
| 0.636364
| 0.224299
| 0.149533
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02459
| 0.155709
| 289
| 13
| 69
| 22.230769
| 0.852459
| 0
| 0
| 0
| 0
| 0
| 0.554007
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0.666667
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
|
0
| 4
|
38ea979ca341d47bad24079f76bcf4910cf5a922
| 94
|
py
|
Python
|
setup.py
|
thetallgrassnet/pokedex
|
95d08557108a6580a2195dad886089fbdd81bba6
|
[
"MIT"
] | 10
|
2020-08-31T23:11:21.000Z
|
2022-03-20T18:27:58.000Z
|
setup.py
|
thetallgrassnet/pokedex
|
95d08557108a6580a2195dad886089fbdd81bba6
|
[
"MIT"
] | 16
|
2018-09-14T18:38:15.000Z
|
2021-06-25T15:15:53.000Z
|
setup.py
|
Serene-Arc/podcast-downloader
|
361776a85f3cc671ecac71325ae67a12b85995b8
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
import setuptools
setuptools.setup(setup_requires=['pbr'], pbr=True)
| 15.666667
| 50
| 0.755319
| 13
| 94
| 5.384615
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011628
| 0.085106
| 94
| 5
| 51
| 18.8
| 0.802326
| 0.223404
| 0
| 0
| 0
| 0
| 0.041667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
ac10aed8113c7b08a977882cd522254e4af1b181
| 127
|
py
|
Python
|
moda/error.py
|
xyla-io/moda
|
956d4a63c4f713debd2ba5e3fad0ce7a7071e17b
|
[
"MIT"
] | null | null | null |
moda/error.py
|
xyla-io/moda
|
956d4a63c4f713debd2ba5e3fad0ce7a7071e17b
|
[
"MIT"
] | null | null | null |
moda/error.py
|
xyla-io/moda
|
956d4a63c4f713debd2ba5e3fad0ce7a7071e17b
|
[
"MIT"
] | null | null | null |
class ModaError(Exception):
pass
class ModaTimeoutError(ModaError):
pass
class ModaCannotInteractError(ModaError):
pass
| 15.875
| 41
| 0.80315
| 12
| 127
| 8.5
| 0.5
| 0.176471
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125984
| 127
| 8
| 42
| 15.875
| 0.918919
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 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
| 4
|
ac397028f4e973a2a9d2afc87a9fc8f0faafece3
| 113
|
py
|
Python
|
applications/office_module/apps.py
|
nitagr/Fusion
|
2818d042988f15942cf44d6f02f46a7c2312d398
|
[
"bzip2-1.0.6"
] | 1
|
2020-03-23T16:40:33.000Z
|
2020-03-23T16:40:33.000Z
|
applications/office_module/apps.py
|
nitagr/Fusion
|
2818d042988f15942cf44d6f02f46a7c2312d398
|
[
"bzip2-1.0.6"
] | null | null | null |
applications/office_module/apps.py
|
nitagr/Fusion
|
2818d042988f15942cf44d6f02f46a7c2312d398
|
[
"bzip2-1.0.6"
] | null | null | null |
from django.apps import AppConfig
class OfficeModuleConfig(AppConfig):
name = 'applications.office_module'
| 18.833333
| 39
| 0.79646
| 12
| 113
| 7.416667
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.132743
| 113
| 5
| 40
| 22.6
| 0.908163
| 0
| 0
| 0
| 0
| 0
| 0.230089
| 0.230089
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ac411748db895636459482d7d3a38f1b809f8100
| 341
|
py
|
Python
|
0_PythonFundamental/2_01_listandtuple2.py
|
hnwarid/DQLabAcademy
|
e03d82f97536ae103b6abc65db0ae16520fb68c7
|
[
"MIT"
] | null | null | null |
0_PythonFundamental/2_01_listandtuple2.py
|
hnwarid/DQLabAcademy
|
e03d82f97536ae103b6abc65db0ae16520fb68c7
|
[
"MIT"
] | null | null | null |
0_PythonFundamental/2_01_listandtuple2.py
|
hnwarid/DQLabAcademy
|
e03d82f97536ae103b6abc65db0ae16520fb68c7
|
[
"MIT"
] | null | null | null |
bulan_pembelian = ('Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember')
pertengahan_tahun = bulan_pembelian[4:8]
print(pertengahan_tahun)
awal_tahun = bulan_pembelian[:5]
print(awal_tahun)
akhir_tahun = bulan_pembelian[8:]
print(akhir_tahun)
print(bulan_pembelian[-4:-1])
| 42.625
| 141
| 0.739003
| 44
| 341
| 5.477273
| 0.522727
| 0.290456
| 0.236515
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019048
| 0.076246
| 341
| 8
| 142
| 42.625
| 0.746032
| 0
| 0
| 0
| 0
| 0
| 0.219298
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
ac60bb944d6faf1a19b4336beb5982ec2acf9b47
| 188
|
py
|
Python
|
pyroon/__init__.py
|
kittsville/Pyroon
|
4ce3f4503c1515cca05328cfdc095c36fc02de25
|
[
"MIT"
] | null | null | null |
pyroon/__init__.py
|
kittsville/Pyroon
|
4ce3f4503c1515cca05328cfdc095c36fc02de25
|
[
"MIT"
] | 15
|
2016-12-18T23:26:18.000Z
|
2017-01-23T00:10:37.000Z
|
pyroon/__init__.py
|
kittsville/Pyroon
|
4ce3f4503c1515cca05328cfdc095c36fc02de25
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
Pyroon
IT'S PYROON
The Switch-a-roo graphing library
"""
# Import everything here you want available outside of the centi package
from .main import Pyroon
| 13.428571
| 72
| 0.707447
| 28
| 188
| 4.75
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006536
| 0.18617
| 188
| 13
| 73
| 14.461538
| 0.862745
| 0.787234
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ac82ee03ca118864f13bbd9cb311b2c83e9dbd5f
| 193
|
py
|
Python
|
ffclub/event/forms.py
|
elin-moco/ffclub
|
7e2d707e9319b6401025a349c9c11faf937d1b55
|
[
"BSD-3-Clause"
] | null | null | null |
ffclub/event/forms.py
|
elin-moco/ffclub
|
7e2d707e9319b6401025a349c9c11faf937d1b55
|
[
"BSD-3-Clause"
] | null | null | null |
ffclub/event/forms.py
|
elin-moco/ffclub
|
7e2d707e9319b6401025a349c9c11faf937d1b55
|
[
"BSD-3-Clause"
] | null | null | null |
from django.forms import ModelForm
from ffclub.event.models import Event
class EventForm(ModelForm):
class Meta:
model = Event
fields = ('title', 'location', 'num_of_ppl')
| 24.125
| 52
| 0.689119
| 24
| 193
| 5.458333
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.212435
| 193
| 7
| 53
| 27.571429
| 0.861842
| 0
| 0
| 0
| 0
| 0
| 0.119171
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 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
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
3ba4d200a4c1d3d15bd664ab2abd1bddcf437479
| 97
|
py
|
Python
|
Taller_de_Estructuras_de_Control_Repeticion/5.py
|
juandab07/Algoritmos-y-programacion
|
f3c10f5c4620b15432ecfe2b9f5831437a49ace9
|
[
"MIT"
] | null | null | null |
Taller_de_Estructuras_de_Control_Repeticion/5.py
|
juandab07/Algoritmos-y-programacion
|
f3c10f5c4620b15432ecfe2b9f5831437a49ace9
|
[
"MIT"
] | null | null | null |
Taller_de_Estructuras_de_Control_Repeticion/5.py
|
juandab07/Algoritmos-y-programacion
|
f3c10f5c4620b15432ecfe2b9f5831437a49ace9
|
[
"MIT"
] | null | null | null |
k=1
suma=(k**2+1)/k
cont=0
while cont<1000:
cont+=suma
print(k)
k+=1
suma=(k**2+1)/k
| 10.777778
| 18
| 0.536082
| 23
| 97
| 2.26087
| 0.391304
| 0.076923
| 0.230769
| 0.269231
| 0.384615
| 0.384615
| 0.384615
| 0
| 0
| 0
| 0
| 0.144737
| 0.216495
| 97
| 8
| 19
| 12.125
| 0.539474
| 0
| 0
| 0.25
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.125
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3bae631dbce2226c26fd2396b44a5e2796c41be4
| 77
|
py
|
Python
|
scripts/deploy_esp/seo/__init__.py
|
smart-edge-open/open-developer-experience-kits
|
e33837157ff9b8f255be946e6c24e51bc76d8c88
|
[
"Apache-2.0"
] | 3
|
2021-11-23T06:30:33.000Z
|
2022-02-23T08:50:55.000Z
|
scripts/deploy_esp/seo/__init__.py
|
smart-edge-open/open-developer-experience-kits
|
e33837157ff9b8f255be946e6c24e51bc76d8c88
|
[
"Apache-2.0"
] | 7
|
2021-10-13T02:59:30.000Z
|
2022-03-14T13:06:36.000Z
|
scripts/deploy_esp/seo/__init__.py
|
smart-edge-open/open-developer-experience-kits
|
e33837157ff9b8f255be946e6c24e51bc76d8c88
|
[
"Apache-2.0"
] | 7
|
2021-12-04T04:44:29.000Z
|
2022-03-20T02:11:33.000Z
|
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2021 Intel Corporation
| 25.666667
| 38
| 0.766234
| 11
| 77
| 5.363636
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.088235
| 0.116883
| 77
| 2
| 39
| 38.5
| 0.779412
| 0.935065
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3bc97cdcc3d4f0a8dd0906309cfd9a39a7aa1d4a
| 160
|
py
|
Python
|
allauth/socialaccount/providers/noa/urls.py
|
Supratix/django-allauth
|
1f41094386b619f3e904787e3a64fa4f89899121
|
[
"MIT"
] | null | null | null |
allauth/socialaccount/providers/noa/urls.py
|
Supratix/django-allauth
|
1f41094386b619f3e904787e3a64fa4f89899121
|
[
"MIT"
] | null | null | null |
allauth/socialaccount/providers/noa/urls.py
|
Supratix/django-allauth
|
1f41094386b619f3e904787e3a64fa4f89899121
|
[
"MIT"
] | null | null | null |
from allauth.socialaccount.providers.oauth2.urls import default_urlpatterns
from .provider import NoaProvider
urlpatterns = default_urlpatterns(NoaProvider)
| 22.857143
| 75
| 0.8625
| 17
| 160
| 8
| 0.647059
| 0.264706
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006849
| 0.0875
| 160
| 6
| 76
| 26.666667
| 0.924658
| 0
| 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
| 0
| 0
|
0
| 4
|
ce1f444cf5135c99d4bf0a9f5d33251fcea04221
| 8,611
|
py
|
Python
|
libs/train_graph/train_graph/utility/ribbonwidgets/style.py
|
denglihong2007/Parsing_12306
|
55eaf93c281d0d0fc923199d3b9fe9df9be89d29
|
[
"MIT"
] | 1
|
2022-03-11T16:24:39.000Z
|
2022-03-11T16:24:39.000Z
|
libs/train_graph/train_graph/utility/ribbonwidgets/style.py
|
denglihong2007/Parsing_12306
|
55eaf93c281d0d0fc923199d3b9fe9df9be89d29
|
[
"MIT"
] | null | null | null |
libs/train_graph/train_graph/utility/ribbonwidgets/style.py
|
denglihong2007/Parsing_12306
|
55eaf93c281d0d0fc923199d3b9fe9df9be89d29
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.14.1)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x01\x52\
\x00\
\x00\x05\x6a\x78\x9c\xad\x93\x41\x6f\x82\x30\x14\xc7\xef\x24\x7c\
\x87\x2e\x5e\x1c\x99\xc1\x21\x5c\xba\x9b\xee\xba\xc3\x16\x93\x9d\
\x5b\x78\x42\x33\x6c\x49\x29\xd3\xc4\xec\xbb\xaf\x05\xc4\x4e\x61\
\x6e\xc1\x36\x94\xf2\x78\xfc\xde\x3f\xaf\x7f\x7c\x4f\x32\x4a\x05\
\xf7\x7c\xd7\x79\x7d\xab\xb7\xef\x2c\x49\x41\xa1\x83\xeb\x20\x3d\
\xa8\x90\x09\x48\x8c\xe6\xc5\xfe\xa9\x89\x6c\x89\x4c\x19\xb7\x23\
\x94\xc4\x1f\xa9\x14\x15\x4f\x66\xb1\xc8\x85\xce\x96\x29\x9d\x06\
\xe1\xfc\x01\x1d\x97\x7b\x9d\xfa\xe5\x3a\xae\xe3\x7b\xcb\x4a\x29\
\xc1\xd1\x96\xe9\x8b\xec\x51\x9c\x8b\x12\x4c\xf9\x35\x53\x39\xb4\
\x2f\x0f\xbf\x80\xc9\x34\x88\x22\x0d\xed\x96\x1a\x7e\xa9\xb5\x2e\
\x67\x41\x71\x26\x3e\x41\x0e\xa3\x27\xcf\x73\x3d\x1f\xff\xc4\x9a\
\x34\xb7\x95\xd1\x7e\x9d\xbb\x08\xc2\x20\x6c\xb9\x6d\x70\x97\x31\
\x05\xc3\xa5\xba\x2e\xd5\x35\x9b\x13\xe9\x7a\x74\x76\x40\xb7\xe9\
\x51\x03\x1d\xdd\x23\x23\x7d\x4d\xe8\x0b\xf0\x6a\x49\xa4\x91\xdc\
\x6e\xfb\xfd\x54\x7f\xd3\x66\xe0\x82\x70\x18\xb6\x5d\x8f\x98\x4d\
\x3d\x4e\xa5\x75\x61\xc3\xc1\x8a\xd0\x23\x47\xbb\x6c\xb6\x63\x89\
\xca\x30\x8a\x2c\x0b\xeb\x68\x06\x2c\xcd\x14\x46\x0b\xbb\x13\x27\
\x00\x2e\x21\x87\x58\x41\x32\x42\x51\x1f\xee\xac\xc3\xe3\xa0\x77\
\xd7\x45\x8e\xfb\x5b\xed\x62\xff\x17\xde\x99\xa5\xf5\xf4\x4a\x48\
\x0e\xb2\x71\xb6\xb1\x86\xfd\x7c\x3b\x3b\xdb\xd4\xd1\x7e\xfe\x01\
\x2b\x24\x94\x25\x24\xc3\x34\xba\x31\xb3\x9f\xf6\x0d\x64\x1c\x8d\
\x25\
\x00\x00\x05\x54\
\x00\
\x00\x1a\x31\x78\x9c\xdd\x59\xdb\x6e\xe3\x36\x10\x7d\x0f\x90\x7f\
\x60\xe1\x97\xdd\xc0\xde\xe8\xe2\x8b\xcc\x3c\xe9\xba\xfb\xd0\x45\
\xbb\xdd\x16\x7d\x96\x25\xc6\x16\x56\x11\x55\x4a\x6e\x1c\x04\xf9\
\xb2\x3e\xf4\x93\xfa\x0b\x25\x75\xb1\x49\x91\x94\x13\x2c\x02\xa4\
\x75\x80\x20\x1e\x92\x33\x67\x38\x33\x87\x43\xe6\x9f\xbf\xfe\xbe\
\xbc\xb8\xbe\x02\x55\x1d\x93\x1a\x90\x6c\xb3\xc1\x05\xa8\x50\x7d\
\x75\xcd\xc4\x5f\xdd\x5f\x1a\x89\x17\x13\x26\xb8\xbc\xe0\x04\x8f\
\x97\x17\x00\x6c\xe2\xe4\xdb\x96\xe0\x7d\x91\xce\x12\x9c\x63\x02\
\xc1\x24\xb4\xc3\x65\xe8\xdc\x5c\x5e\x3c\xb1\x05\x9c\x8e\x7d\x5d\
\xe3\xe2\x23\x9d\x5c\xfe\x9e\xa5\xdb\xd6\x84\x76\x90\x6a\x97\x75\
\xd7\x24\x2e\xaa\x32\x26\xa8\xa8\x65\xfd\x5f\xf6\x59\xf2\xcd\x4d\
\x12\x54\x55\x1d\x5c\xf5\x48\x83\x5b\x89\x3c\x8a\x0c\xfa\xe9\x35\
\xf3\xba\xfd\x9a\xe4\x3e\x2e\xea\x38\x2b\x90\xa0\x5a\x18\xd0\x6a\
\x1e\xc5\xed\xc7\x35\xda\x62\xf2\x20\xa8\xed\x64\xf0\x16\x27\xfb\
\xaa\xd1\x8b\xf7\x75\x4e\x8d\x40\x50\xe0\x02\x31\x2d\xd4\x92\xbc\
\x40\x13\x94\xfb\x5d\x56\xa3\xd6\xf4\xc9\xf0\xd7\x9a\xce\x43\xa9\
\x1c\x0c\x61\xe0\xbc\x46\xe5\xb2\x31\xe4\x3c\x08\xb7\x2c\xf3\x2c\
\x89\xeb\xac\xcf\x01\x1e\x88\x34\xd8\xe8\x6b\x11\xb4\x00\xd8\x1e\
\x50\x78\x98\xa4\x88\x82\x32\xcb\x03\xa8\x70\x9e\xa5\x60\x32\x37\
\x97\xae\x17\x08\xe3\xb3\x1a\x97\xb3\x1c\xdd\xd6\x33\x12\xa7\xd9\
\xbe\x82\xc0\x2a\x0f\xf2\x0c\x92\x6d\x77\xca\x29\xd2\x1e\xfc\xc1\
\xdc\x8a\xc9\x96\xcd\xa5\xa1\x7d\x57\x95\x04\xc5\x29\x2c\xe3\x74\
\x0a\x0e\x26\x34\xa6\xe0\xa1\xf9\x7d\xb0\x9a\xbf\x2d\x68\x4e\x2b\
\x6a\x01\x1a\x14\xde\x72\x15\x79\xc1\x14\xb4\xdf\x3f\x2c\xc0\xc4\
\x72\x17\x91\xeb\x4f\x7b\x81\x09\x26\xa6\x3b\x37\x1c\xa7\x9b\x63\
\x32\x97\xd6\xae\x1f\xbd\xef\x33\x48\xbb\x49\x10\xee\xf0\x9f\x34\
\x1b\x5f\x01\xf6\xca\xf3\xac\xd0\xe3\x61\xcf\x57\xab\xd0\x0f\x04\
\xd8\xe6\x3c\xf4\xa3\x13\x6c\xc7\x08\xcd\x88\xc2\x66\x70\xce\x01\
\xa7\x48\xaa\x0a\xa5\xaf\x01\x9d\xee\xb8\xe7\x09\xd0\xad\x68\x69\
\xbb\xa1\x00\xdd\x9f\xdb\x8e\x7b\x82\x6e\x2f\x1c\xcf\x5f\x77\xd0\
\xd9\xaf\x31\xf0\xa3\x09\xcf\xa7\xfc\xaf\xf1\x66\x40\x50\xad\xe4\
\x25\xf4\x21\xae\x84\xb0\x8e\x37\xa0\x5b\xdf\x2e\x9a\xcc\x9b\xcf\
\x4d\xa7\xb3\x2d\x90\x0e\x8f\x68\x65\xa8\x9f\x8d\xde\xd1\x3d\xce\
\x0a\x56\x0e\x10\x18\xb4\x02\x04\x69\x53\x20\x0a\x39\x2b\x2d\x08\
\x96\x43\xf1\x06\xd3\xed\xb9\x13\xe6\x53\xe9\x7d\x96\xd6\x3b\xb8\
\xe4\x95\x1c\x3a\xa1\x65\x88\x53\x77\xa8\x31\x68\x8b\x73\x65\x29\
\xcd\x82\x34\x2b\xb6\x2d\x0e\x53\x12\xb7\xb0\x65\x79\x13\x6b\x49\
\xda\xa1\x6e\x07\x74\x5b\x0e\x2b\x94\xa3\xa4\x46\x34\xfb\xbe\xf0\
\xe2\xa6\xfe\xc0\xe3\x59\xee\x39\xcb\x3c\xcf\x30\x2d\x46\xdd\x30\
\xba\x23\x8c\x8b\x3a\x4f\x8b\x9e\xeb\xaf\x03\x4f\x91\x03\x3d\x9f\
\x9f\xd6\x75\x5b\xc0\x9d\x8e\xec\x33\x06\xa9\x71\x1b\xfe\x30\x40\
\xa6\x40\x11\xfa\x9e\x6f\x07\x37\x3c\x72\x70\x82\xae\xd5\x7f\xd4\
\xdc\xa7\xba\x9c\xa6\x83\x52\xfb\x91\x96\x61\x98\x66\xc2\xe9\xd6\
\xcb\x80\x1e\x9f\x6f\xf8\x96\x3f\x57\xec\xd2\xa4\xdd\x01\x26\x6e\
\xb1\xd0\xf2\x9f\x29\x3a\x89\x35\xa5\x9a\x68\x25\xcd\xe4\x5c\x55\
\xd0\x02\xc6\xb9\x7c\x04\x9e\xa4\x8f\xba\x52\x56\x16\xfc\x10\x93\
\xc4\x21\xb2\x81\x13\xfd\x9e\x25\x12\x7e\xb3\xa2\xc8\x8b\xec\x50\
\x67\xf7\x7b\x28\x3b\x0a\xc2\xc0\xb5\x8f\x94\x6d\x5a\x8e\xc5\x84\
\x81\xbd\x74\x7b\xd6\x76\x6c\xdb\xa6\x32\x3f\x58\xac\xfc\x13\x6f\
\x47\x01\x5d\xea\xbd\xd7\x3b\x9a\xec\x10\x6b\x55\x5e\xe6\xe8\xad\
\x95\xc4\x0b\xe7\x95\x1c\x0d\x3d\xd9\xd1\x90\x1d\x46\x03\x47\xc3\
\x85\xf3\x12\x47\x3b\x26\x7a\x11\x47\xbc\x75\x3f\x85\xe6\x99\xf6\
\xde\x44\x55\x37\xc2\x80\xba\x87\x1d\x1e\x7b\xfd\x56\x1c\x4b\x6b\
\x98\x17\x4f\x1a\xf5\x93\x5e\xfa\x31\xce\x73\x44\x1e\x5a\xe9\x6f\
\xe5\x54\x3d\x10\xe0\xfb\x42\x33\xf4\x19\x13\xf4\xa8\xe9\x68\x8f\
\xa4\x74\x16\x06\x25\xcc\x4f\x59\x8a\x7e\x8e\x8b\x02\x09\x3b\x20\
\x3a\xa8\xd3\x23\xf2\xc0\x78\x82\xbc\xc1\xf4\xd0\xf8\xc4\x97\xfc\
\xff\xc5\x27\xae\xba\xff\x5b\x2e\x01\xe9\x86\xfd\x19\x15\x7b\xbe\
\x7e\xd9\x77\xd0\xdd\x03\x64\x7e\x56\x5d\xde\x7d\xf6\xa3\xbf\x10\
\x3a\xf3\xb5\xe5\x2e\xfb\x5b\x08\x6f\x06\x42\xda\xfa\xdc\xf5\xc6\
\xba\x06\x10\x82\x05\x5d\x6b\xb1\x5f\xfd\x1f\x1a\xcb\x3c\x8d\x68\
\xb5\xc3\x53\xeb\x02\x5e\xe1\x72\x13\x85\xd1\x3a\x9a\x1f\x43\x62\
\x3b\x4d\x40\x0c\xef\x78\x31\xb3\xd7\xec\xa0\xf6\xc3\xe5\x9a\x0b\
\x07\xfd\x84\xab\x41\x86\x71\x90\x35\x67\xc7\x68\x27\xb0\x6a\x3b\
\x1b\xfe\x69\xa2\xd3\x98\x74\x24\x24\x5c\x16\x16\xaa\xa6\xad\xe5\
\xad\x9f\x4a\xf5\x9b\x80\x3c\x0a\x34\x4f\x14\x43\x7e\x57\xd0\xf9\
\x98\xda\x63\x79\xbd\x46\xbc\xbe\xb7\x84\xc4\x34\xe7\x7a\xdf\xa1\
\x47\x7a\xf8\x7d\x43\xaf\x51\x35\x8c\x87\x1c\x03\xdd\xbe\x9f\x6e\
\x0a\xa3\x6a\xbb\x83\x8f\xd7\xdb\x89\xf4\x98\xd5\x21\x05\x02\x35\
\x8c\x9f\x9c\x0a\x04\xcd\xab\xa3\x02\x46\x23\xef\xb1\x54\x3b\x7c\
\x3f\x4b\x51\x82\x49\x73\xe7\x9f\xf5\xf5\x4c\x0d\x3d\x83\x17\x94\
\x58\x9f\xd4\x16\x15\x84\xf1\x36\xf3\x6f\x1c\xbf\x58\x3c\x5d\x50\
\x2c\x8e\x2c\x1a\x08\xaa\x8e\xee\x6e\x83\x3d\x7c\x10\x9b\xb9\x56\
\xa6\x3d\xea\x8e\x11\x1e\x54\x75\xbf\xb0\x7b\x11\xd3\xac\x3e\x42\
\xe9\x82\x04\xc4\x2b\x9a\xa4\x0c\xd1\xdb\x63\xbc\xc9\x11\x78\x54\
\x2c\xd1\x5d\xab\x9f\x7b\x5f\x1c\xbd\x2d\x4a\x50\x60\x4a\x70\x39\
\x4b\x69\x47\xd9\x82\xa9\xf6\x9b\xa4\xed\x11\x66\x98\x64\x94\x68\
\x61\x7f\xa0\xdd\x0c\x86\x4b\x5c\x65\xcc\x0c\x4d\x54\x5c\x82\xe6\
\xe9\xa1\x99\xd2\xbe\xc1\x00\x73\x21\xbe\x4f\xb4\x7c\x7d\x6c\x8d\
\xb5\xaf\x16\x86\xb8\xac\x7b\x43\x50\xcd\x39\xe7\xd0\x99\xee\x86\
\x0b\xda\x9b\x2e\x0d\xce\x33\xea\xd4\x2c\x26\x04\xdf\xb7\x4e\x65\
\x77\xf1\x16\x41\xb0\x27\xf9\x3b\x78\xdd\x7c\xb9\xa6\x7d\x37\xde\
\x93\x04\x5d\xbb\x6c\x1a\xbb\x28\x7c\x28\x8b\xed\xfb\x13\xb9\x73\
\xaf\xf7\x88\x72\x4b\x5c\x63\xa2\x78\xbf\x17\x87\xba\x13\xfc\xfa\
\x6a\x9c\xa3\x98\x06\xcd\x3f\x46\x02\x9b\xfd\xb4\x28\xfe\x05\x8c\
\x0a\xfa\x56\
"
qt_resource_name = b"\
\x00\x11\
\x09\xda\xd9\xc3\
\x00\x51\
\x00\x52\x00\x69\x00\x62\x00\x62\x00\x6f\x00\x6e\x00\x57\x00\x69\x00\x64\x00\x67\x00\x65\x00\x74\x00\x2e\x00\x71\x00\x73\x00\x73\
\
\x00\x0b\
\x0c\xe2\x21\xa3\
\x00\x64\
\x00\x65\x00\x66\x00\x61\x00\x75\x00\x6c\x00\x74\x00\x2e\x00\x71\x00\x73\x00\x73\
"
qt_resource_struct_v1 = b"\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x02\x00\x00\x00\x01\
\x00\x00\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\
\x00\x00\x00\x28\x00\x01\x00\x00\x00\x01\x00\x00\x01\x56\
"
qt_resource_struct_v2 = b"\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x02\x00\x00\x00\x01\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\
\x00\x00\x01\x70\x4c\x1a\x80\x76\
\x00\x00\x00\x28\x00\x01\x00\x00\x00\x01\x00\x00\x01\x56\
\x00\x00\x01\x70\x4c\x34\x25\xbd\
"
qt_version = [int(v) for v in QtCore.qVersion().split('.')]
if qt_version < [5, 8, 0]:
rcc_version = 1
qt_resource_struct = qt_resource_struct_v1
else:
rcc_version = 2
qt_resource_struct = qt_resource_struct_v2
def qInitResources():
QtCore.qRegisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data)
def qCleanupResources():
QtCore.qUnregisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data)
qInitResources()
| 51.255952
| 129
| 0.726745
| 2,003
| 8,611
| 3.105342
| 0.15327
| 0.057878
| 0.054984
| 0.044373
| 0.086817
| 0.083441
| 0.073151
| 0.072669
| 0.072669
| 0.072669
| 0
| 0.293202
| 0.029613
| 8,611
| 167
| 130
| 51.562874
| 0.451173
| 0.017652
| 0
| 0.05298
| 0
| 0.754967
| 0.000118
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0.013245
| false
| 0
| 0.006623
| 0
| 0.019868
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ce21638fe41d64b192ee024f2e3c0d6e6a89b255
| 499
|
py
|
Python
|
win/devkit/other/pymel/extras/completion/py/maya/app/general/UVPropertyPanel.py
|
leegoonz/Maya-devkit
|
b81fe799b58e854e4ef16435426d60446e975871
|
[
"ADSL"
] | 10
|
2018-03-30T16:09:02.000Z
|
2021-12-07T07:29:19.000Z
|
win/devkit/other/pymel/extras/completion/py/maya/app/general/UVPropertyPanel.py
|
leegoonz/Maya-devkit
|
b81fe799b58e854e4ef16435426d60446e975871
|
[
"ADSL"
] | null | null | null |
win/devkit/other/pymel/extras/completion/py/maya/app/general/UVPropertyPanel.py
|
leegoonz/Maya-devkit
|
b81fe799b58e854e4ef16435426d60446e975871
|
[
"ADSL"
] | 9
|
2018-06-02T09:18:49.000Z
|
2021-12-20T09:24:35.000Z
|
import PySide.QtGui as _QtGui
import uuid
import maya.mel as mel
import maya.cmds as cmds
from PySide.QtCore import *
from PySide.QtGui import *
class CollapsableContainer(QFrame):
def __init__(self):
pass
def fill(self, objectName):
pass
staticMetaObject = None
class UVPropertyPanel(QDockWidget):
def __init__(self):
pass
def onTrayButtonClicked(self, objectName):
pass
staticMetaObject = None
| 14.676471
| 46
| 0.643287
| 53
| 499
| 5.886792
| 0.45283
| 0.070513
| 0.070513
| 0.096154
| 0.358974
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.298597
| 499
| 33
| 47
| 15.121212
| 0.891429
| 0
| 0
| 0.444444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| false
| 0.222222
| 0.333333
| 0
| 0.777778
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
cbeb0fdc6489d29f64917c250e5a4e9120e3b93e
| 79
|
py
|
Python
|
pmaf/alignment/_multiple/__init__.py
|
mmtechslv/PhyloMAF
|
bab43dd4a4d2812951b1fdf4f1abb83edb79ea88
|
[
"BSD-3-Clause"
] | 1
|
2021-07-02T06:24:17.000Z
|
2021-07-02T06:24:17.000Z
|
pmaf/alignment/_multiple/__init__.py
|
mmtechslv/PhyloMAF
|
bab43dd4a4d2812951b1fdf4f1abb83edb79ea88
|
[
"BSD-3-Clause"
] | 1
|
2021-06-28T12:02:46.000Z
|
2021-06-28T12:02:46.000Z
|
pmaf/alignment/_multiple/__init__.py
|
mmtechslv/PhyloMAF
|
bab43dd4a4d2812951b1fdf4f1abb83edb79ea88
|
[
"BSD-3-Clause"
] | null | null | null |
from ._aligners import MultiSequenceAligner
__all__ = ['MultiSequenceAligner']
| 26.333333
| 43
| 0.835443
| 6
| 79
| 10.166667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.088608
| 79
| 3
| 44
| 26.333333
| 0.847222
| 0
| 0
| 0
| 0
| 0
| 0.25
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0202bd6566001ff4f569286a4269bdf486b9b398
| 179
|
py
|
Python
|
Flask-demo/api/register_api.py
|
absentm/Demo
|
9d2eb6ce79763d487b5ff3936f0b0dff04514bb1
|
[
"MIT"
] | 6
|
2016-12-01T16:27:15.000Z
|
2021-07-14T11:37:13.000Z
|
Flask-demo/api/register_api.py
|
absentm/Demo
|
9d2eb6ce79763d487b5ff3936f0b0dff04514bb1
|
[
"MIT"
] | 9
|
2019-07-16T10:21:47.000Z
|
2022-02-28T01:43:46.000Z
|
Flask-demo/api/register_api.py
|
absentm/Demo
|
9d2eb6ce79763d487b5ff3936f0b0dff04514bb1
|
[
"MIT"
] | 2
|
2017-04-01T05:02:17.000Z
|
2017-07-13T08:58:50.000Z
|
# coding=utf-8
from flask import Blueprint
register_blueprint = Blueprint("register", __name__)
@register_blueprint.route('/')
def user_register():
return "register sys."
| 16.272727
| 52
| 0.743017
| 21
| 179
| 6
| 0.666667
| 0.269841
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006452
| 0.134078
| 179
| 10
| 53
| 17.9
| 0.806452
| 0.067039
| 0
| 0
| 0
| 0
| 0.133333
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0.2
| 0.6
| 0.6
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
|
0
| 4
|
02043f49126bfbb485b336b9b29064a307f686a1
| 118
|
py
|
Python
|
deploy/GCECreds.py
|
orpolaczek/astricon-2017-demos
|
1d3f24a72b19bf7ecf70831fd6b122cde59ea47b
|
[
"MIT"
] | null | null | null |
deploy/GCECreds.py
|
orpolaczek/astricon-2017-demos
|
1d3f24a72b19bf7ecf70831fd6b122cde59ea47b
|
[
"MIT"
] | null | null | null |
deploy/GCECreds.py
|
orpolaczek/astricon-2017-demos
|
1d3f24a72b19bf7ecf70831fd6b122cde59ea47b
|
[
"MIT"
] | 1
|
2018-09-14T08:32:07.000Z
|
2018-09-14T08:32:07.000Z
|
class Creds:
SERVICE_ACCOUNT = 'service_account@project.iam.gserviceaccount.com'
KEY_FILE = 'path_to_key.json'
| 39.333333
| 71
| 0.771186
| 16
| 118
| 5.375
| 0.8125
| 0.325581
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.127119
| 118
| 3
| 72
| 39.333333
| 0.834951
| 0
| 0
| 0
| 0
| 0
| 0.529412
| 0.394958
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
021c6714d2b0f1329a1dd6cb7664d36d88181b52
| 32
|
py
|
Python
|
forloops/04.py
|
mallimuondu/python-practice
|
64fce60a646032152db8b35e20df06b2edc349ae
|
[
"MIT"
] | null | null | null |
forloops/04.py
|
mallimuondu/python-practice
|
64fce60a646032152db8b35e20df06b2edc349ae
|
[
"MIT"
] | null | null | null |
forloops/04.py
|
mallimuondu/python-practice
|
64fce60a646032152db8b35e20df06b2edc349ae
|
[
"MIT"
] | null | null | null |
for x in range(6):
print(x)
| 16
| 18
| 0.5625
| 7
| 32
| 2.571429
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.043478
| 0.28125
| 32
| 2
| 19
| 16
| 0.73913
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
022e799cd016dde22fcba78eb9a9c3ee4f6ea1f1
| 865
|
py
|
Python
|
topo_processor/stac/stac_extensions.py
|
linz/processor-aerial-imagery
|
cf6425560cea381278fe7857865e3d9158b28d7e
|
[
"MIT"
] | null | null | null |
topo_processor/stac/stac_extensions.py
|
linz/processor-aerial-imagery
|
cf6425560cea381278fe7857865e3d9158b28d7e
|
[
"MIT"
] | 15
|
2020-07-21T04:56:31.000Z
|
2020-09-21T06:28:57.000Z
|
topo_processor/stac/stac_extensions.py
|
linz/processor-aerial-imagery
|
cf6425560cea381278fe7857865e3d9158b28d7e
|
[
"MIT"
] | null | null | null |
from enum import Enum
class StacExtensions(str, Enum):
linz = "https://stac.linz.govt.nz/v0.0.15/linz/schema.json"
quality = "https://stac.linz.govt.nz/v0.0.15/quality/schema.json"
historical_imagery = "https://stac.linz.govt.nz/v0.0.15/historical-imagery/schema.json"
aerial_photo = "https://stac.linz.govt.nz/v0.0.15/aerial-photo/schema.json"
camera = "https://stac.linz.govt.nz/v0.0.15/camera/schema.json"
film = "https://stac.linz.govt.nz/v0.0.15/film/schema.json"
scanning = "https://stac.linz.govt.nz/v0.0.15/scanning/schema.json"
eo = "https://stac-extensions.github.io/eo/v1.0.0/schema.json"
file = "https://stac-extensions.github.io/file/v2.0.0/schema.json"
projection = "https://stac-extensions.github.io/projection/v1.0.0/schema.json"
version = "https://stac-extensions.github.io/version/v1.0.0/schema.json"
| 54.0625
| 91
| 0.70289
| 144
| 865
| 4.208333
| 0.229167
| 0.163366
| 0.150165
| 0.19637
| 0.524752
| 0.277228
| 0.277228
| 0.277228
| 0
| 0
| 0
| 0.051348
| 0.099422
| 865
| 15
| 92
| 57.666667
| 0.726573
| 0
| 0
| 0
| 0
| 0.846154
| 0.712139
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.076923
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
0230aa13d86205f3a50ac48a61b993833a7bc51d
| 3,537
|
py
|
Python
|
tests/test_bif/test_bif_randomization.py
|
Xilinx/roast-xilinx
|
ce24becf31c90fb3c4562f4347bf0859af845c05
|
[
"MIT"
] | 1
|
2021-09-01T15:29:08.000Z
|
2021-09-01T15:29:08.000Z
|
tests/test_bif/test_bif_randomization.py
|
Xilinx/roast-xilinx
|
ce24becf31c90fb3c4562f4347bf0859af845c05
|
[
"MIT"
] | null | null | null |
tests/test_bif/test_bif_randomization.py
|
Xilinx/roast-xilinx
|
ce24becf31c90fb3c4562f4347bf0859af845c05
|
[
"MIT"
] | 1
|
2021-11-18T13:11:21.000Z
|
2021-11-18T13:11:21.000Z
|
#
# Copyright (c) 2020 Xilinx, Inc. All rights reserved.
# SPDX-License-Identifier: MIT
#
import os
import filecmp
import logging
import pytest
from roast.confParser import generate_conf
from roast.component.bif.generate import generate_bif
from roast.utils import Logger, mkdir
def get_tests(dir):
dirs = []
dirname = os.path.join(os.path.dirname(__file__), dir)
for entry in os.listdir(dirname):
if not entry.startswith("__") and os.path.isdir(os.path.join(dirname, entry)):
dirs.append(entry)
dirs.sort()
return dirs
def test_bif_no_seed(request, build_dir):
rootdir = request.config.rootdir.strpath
fspath = request.node.fspath
wsDir = build_dir
logDir = os.path.join(wsDir, "log")
workDir = os.path.join(wsDir, "work")
imagesDir = os.path.join(wsDir, "images")
overrides = [
f"buildDir={build_dir}",
f"wsDir={wsDir}",
f"logDir={logDir}",
f"workDir={workDir}",
f"imagesDir={imagesDir}",
"randomize=True",
]
config = generate_conf(
rootdir=rootdir,
test_path=fspath,
test_name="performance",
params=["003"],
overrides=overrides,
)
mkdir(workDir)
mkdir(imagesDir)
del config["seed"]
try:
generate_bif(config=config, format_type="new")
except:
assert False, f"generate_bif() raised exception"
@pytest.mark.parametrize("test", get_tests("regression"))
def test_regression_bif_randomization(request, test, build_dir):
rootdir = request.config.rootdir.strpath
fspath = request.node.fspath
wsDir = build_dir
logDir = os.path.join(wsDir, "log")
workDir = os.path.join(wsDir, "work")
imagesDir = os.path.join(wsDir, "images")
logger = Logger(logDir)
overrides = [
f"buildDir={build_dir}",
f"wsDir={wsDir}",
f"logDir={logDir}",
f"workDir={workDir}",
f"imagesDir={imagesDir}",
"randomize=True",
]
config = generate_conf(
rootdir=rootdir,
test_path=fspath,
test_name="regression",
params=[test],
overrides=overrides,
)
mkdir(workDir)
mkdir(imagesDir)
generate_bif(config=config, format_type="new")
logger.close()
test_dir = os.path.join(os.path.dirname(__file__), "regression", test)
assert filecmp.cmp(
os.path.join(config["imagesDir"], "boot.bif"),
os.path.join(test_dir, "boot.bif"),
)
@pytest.mark.parametrize("test", get_tests("performance"))
def test_performance_bif_randomization(request, test, build_dir):
rootdir = request.config.rootdir.strpath
fspath = request.node.fspath
wsDir = build_dir
logDir = os.path.join(wsDir, "log")
workDir = os.path.join(wsDir, "work")
imagesDir = os.path.join(wsDir, "images")
logger = Logger(logDir)
overrides = [
f"buildDir={build_dir}",
f"wsDir={wsDir}",
f"logDir={logDir}",
f"workDir={workDir}",
f"imagesDir={imagesDir}",
"randomize=True",
]
config = generate_conf(
rootdir=rootdir,
test_path=fspath,
test_name="performance",
params=[test],
overrides=overrides,
)
mkdir(workDir)
mkdir(imagesDir)
generate_bif(config=config, format_type="new")
logger.close()
test_dir = os.path.join(os.path.dirname(__file__), "performance", test)
assert filecmp.cmp(
os.path.join(config["imagesDir"], "boot.bif"),
os.path.join(test_dir, "boot.bif"),
)
| 28.524194
| 86
| 0.632457
| 423
| 3,537
| 5.153664
| 0.21513
| 0.057798
| 0.077982
| 0.061927
| 0.752294
| 0.752294
| 0.701835
| 0.672936
| 0.672936
| 0.672936
| 0
| 0.002568
| 0.22929
| 3,537
| 123
| 87
| 28.756098
| 0.797139
| 0.022901
| 0
| 0.672727
| 1
| 0
| 0.150681
| 0.018256
| 0
| 0
| 0
| 0
| 0.027273
| 1
| 0.036364
| false
| 0
| 0.063636
| 0
| 0.109091
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
026d64cf839020911b5ec965f05044b9bdd1b966
| 349
|
py
|
Python
|
qg-mongo-dashboard/mongo_connection.py
|
quantumgraph/qg-mongo-dashboard
|
186481bfe5aeb87038c6265e777a6f18bb65c349
|
[
"MIT"
] | null | null | null |
qg-mongo-dashboard/mongo_connection.py
|
quantumgraph/qg-mongo-dashboard
|
186481bfe5aeb87038c6265e777a6f18bb65c349
|
[
"MIT"
] | null | null | null |
qg-mongo-dashboard/mongo_connection.py
|
quantumgraph/qg-mongo-dashboard
|
186481bfe5aeb87038c6265e777a6f18bb65c349
|
[
"MIT"
] | null | null | null |
from pymongo import MongoClient
class MongoConnection(object):
__all_connections = {}
def get_connection(self, node_name, uri):
if node_name not in self.__all_connections or self.__all_connections[node_name] is None:
self.__all_connections[node_name] = MongoClient(uri)
return self.__all_connections[node_name]
| 34.9
| 96
| 0.74212
| 45
| 349
| 5.288889
| 0.511111
| 0.294118
| 0.302521
| 0.277311
| 0.327731
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.186246
| 349
| 10
| 97
| 34.9
| 0.838028
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0.142857
| 0
| 0.714286
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
65f43c6ff4bd41a50b83817ba0db12f34ecc4661
| 254
|
py
|
Python
|
common/models.py
|
easymean/ModusDRF
|
155a33a058c6b86c4b12081f589da78761d83438
|
[
"MIT"
] | null | null | null |
common/models.py
|
easymean/ModusDRF
|
155a33a058c6b86c4b12081f589da78761d83438
|
[
"MIT"
] | null | null | null |
common/models.py
|
easymean/ModusDRF
|
155a33a058c6b86c4b12081f589da78761d83438
|
[
"MIT"
] | null | null | null |
from django.db import models
class Common(models.Model):
is_active = models.BooleanField(default=True)
created = models.DateTimeField(auto_now_add=True)
updated = models.DateTimeField(auto_now=True)
class Meta:
abstract = True
| 23.090909
| 53
| 0.728346
| 32
| 254
| 5.65625
| 0.65625
| 0.209945
| 0.254144
| 0.287293
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.185039
| 254
| 10
| 54
| 25.4
| 0.874396
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.142857
| 0
| 0.857143
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
5a02f1b447327cb4984e7701f0ce7c3ec8802b0d
| 44
|
py
|
Python
|
login.py
|
timeblade/git_mutiple
|
5e2be1b4b63f0bfb626f201d61fb9e04d1ebca35
|
[
"MIT"
] | null | null | null |
login.py
|
timeblade/git_mutiple
|
5e2be1b4b63f0bfb626f201d61fb9e04d1ebca35
|
[
"MIT"
] | null | null | null |
login.py
|
timeblade/git_mutiple
|
5e2be1b4b63f0bfb626f201d61fb9e04d1ebca35
|
[
"MIT"
] | null | null | null |
num1 = 100 #teacher开发
num2 = 200 #zhouyu开发
| 11
| 21
| 0.704545
| 6
| 44
| 5.166667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.228571
| 0.204545
| 44
| 3
| 22
| 14.666667
| 0.657143
| 0.386364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
5a30efd9f2a71a89444cccb5376f15d936bad041
| 69
|
py
|
Python
|
aggcat/exceptions.py
|
djedi/python-aggcat
|
a922ee4a7eabf3714e62cbeda73c8fece511f5ca
|
[
"Unlicense"
] | 1
|
2021-01-14T21:44:09.000Z
|
2021-01-14T21:44:09.000Z
|
aggcat/exceptions.py
|
djedi/python-aggcat
|
a922ee4a7eabf3714e62cbeda73c8fece511f5ca
|
[
"Unlicense"
] | null | null | null |
aggcat/exceptions.py
|
djedi/python-aggcat
|
a922ee4a7eabf3714e62cbeda73c8fece511f5ca
|
[
"Unlicense"
] | null | null | null |
class HTTPError(Exception):
"""Http Error Exception"""
pass
| 13.8
| 30
| 0.652174
| 7
| 69
| 6.428571
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.217391
| 69
| 4
| 31
| 17.25
| 0.833333
| 0.289855
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
5a4c6aa2d10449407a5dfff4107c1e5cb3000943
| 90
|
py
|
Python
|
momo_api/apps.py
|
Foris-master/momo_server
|
874282f2ef7110bc4e0f5c3c57181ea4a10a6fc5
|
[
"MIT"
] | null | null | null |
momo_api/apps.py
|
Foris-master/momo_server
|
874282f2ef7110bc4e0f5c3c57181ea4a10a6fc5
|
[
"MIT"
] | null | null | null |
momo_api/apps.py
|
Foris-master/momo_server
|
874282f2ef7110bc4e0f5c3c57181ea4a10a6fc5
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class MomoApiConfig(AppConfig):
name = 'momo_api'
| 15
| 33
| 0.755556
| 11
| 90
| 6.090909
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 90
| 5
| 34
| 18
| 0.893333
| 0
| 0
| 0
| 0
| 0
| 0.088889
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
5a697a53be5de3e2ddd771d35d437775a3f3b6f8
| 28
|
py
|
Python
|
services/__init__.py
|
finishy1995/aws-lib
|
3d57d31a57506c02612a7726db1dd56b6821b60d
|
[
"Apache-2.0"
] | null | null | null |
services/__init__.py
|
finishy1995/aws-lib
|
3d57d31a57506c02612a7726db1dd56b6821b60d
|
[
"Apache-2.0"
] | null | null | null |
services/__init__.py
|
finishy1995/aws-lib
|
3d57d31a57506c02612a7726db1dd56b6821b60d
|
[
"Apache-2.0"
] | null | null | null |
__all__ = ['S3','DynamoDB']
| 14
| 27
| 0.607143
| 3
| 28
| 4.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04
| 0.107143
| 28
| 1
| 28
| 28
| 0.48
| 0
| 0
| 0
| 0
| 0
| 0.357143
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ce88947a3ae57f0c2f5a163d59c2bc8192fcd315
| 129
|
py
|
Python
|
gift/common/consts.py
|
YEZHIAN1996/pythonstudy
|
a8774ef97266e8ab0289484ef190d2ee55f1d37c
|
[
"Apache-2.0"
] | 1
|
2022-02-22T01:54:56.000Z
|
2022-02-22T01:54:56.000Z
|
gift/common/consts.py
|
YEZHIAN1996/pythonstudy
|
a8774ef97266e8ab0289484ef190d2ee55f1d37c
|
[
"Apache-2.0"
] | null | null | null |
gift/common/consts.py
|
YEZHIAN1996/pythonstudy
|
a8774ef97266e8ab0289484ef190d2ee55f1d37c
|
[
"Apache-2.0"
] | null | null | null |
ROLES = ['admin', 'normal']
FIRSTLEVELS = ['level1', 'level2', 'level3', 'level4']
SECONDLEVELS = ['level1', 'level2', 'level3']
| 32.25
| 54
| 0.627907
| 12
| 129
| 6.75
| 0.75
| 0.296296
| 0.444444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.061404
| 0.116279
| 129
| 4
| 55
| 32.25
| 0.649123
| 0
| 0
| 0
| 0
| 0
| 0.410853
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ce9f921f1c4d694699a851423c6f65c6b32e801b
| 1,524
|
py
|
Python
|
test/test_steps_api.py
|
go-vela/sdk-python
|
304b2c8645dc6332fd69398c8c849a3961619c29
|
[
"Apache-2.0"
] | 1
|
2020-11-18T13:31:05.000Z
|
2020-11-18T13:31:05.000Z
|
test/test_steps_api.py
|
go-vela/sdk-python
|
304b2c8645dc6332fd69398c8c849a3961619c29
|
[
"Apache-2.0"
] | 57
|
2020-04-30T19:02:47.000Z
|
2022-03-28T07:39:58.000Z
|
test/test_steps_api.py
|
go-vela/sdk-python
|
304b2c8645dc6332fd69398c8c849a3961619c29
|
[
"Apache-2.0"
] | null | null | null |
# coding: utf-8
#
# Copyright (c) 2021 Target Brands, Inc. All rights reserved.
"""
Vela server
API for the Vela server # noqa: E501
OpenAPI spec version: 0.6.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import vela
from vela.vela.steps_api import StepsApi # noqa: E501
from vela.rest import ApiException
class TestStepsApi(unittest.TestCase):
"""StepsApi unit test stubs"""
def setUp(self):
self.api = StepsApi() # noqa: E501
def tearDown(self):
pass
def test_create_step(self):
"""Test case for create_step
"""
pass
def test_create_step_log(self):
"""Test case for create_step_log
"""
pass
def test_delete_step(self):
"""Test case for delete_step
"""
pass
def test_delete_step_log(self):
"""Test case for delete_step_log
"""
pass
def test_get_step(self):
"""Test case for get_step
"""
pass
def test_get_step_log(self):
"""Test case for get_step_log
"""
pass
def test_get_steps(self):
"""Test case for get_steps
"""
pass
def test_update_step(self):
"""Test case for update_step
"""
pass
def test_update_step_log(self):
"""Test case for update_step_log
"""
pass
if __name__ == '__main__':
unittest.main()
| 16.933333
| 68
| 0.585958
| 192
| 1,524
| 4.395833
| 0.328125
| 0.074645
| 0.117299
| 0.159953
| 0.484597
| 0.303318
| 0
| 0
| 0
| 0
| 0
| 0.016346
| 0.317585
| 1,524
| 89
| 69
| 17.123596
| 0.795192
| 0.393045
| 0
| 0.333333
| 1
| 0
| 0.00949
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.366667
| false
| 0.333333
| 0.166667
| 0
| 0.566667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
cebde3b54ceaf3d3157d33e67d042d828f588ac6
| 129
|
py
|
Python
|
10. Inheritance - Exercise/zoo_02/project/bear.py
|
elenaborisova/Python-OOP
|
584882c08f84045b12322917f0716c7c7bd9befc
|
[
"MIT"
] | 1
|
2021-03-27T16:56:30.000Z
|
2021-03-27T16:56:30.000Z
|
10. Inheritance - Exercise/zoo_02/project/bear.py
|
elenaborisova/Python-OOP
|
584882c08f84045b12322917f0716c7c7bd9befc
|
[
"MIT"
] | null | null | null |
10. Inheritance - Exercise/zoo_02/project/bear.py
|
elenaborisova/Python-OOP
|
584882c08f84045b12322917f0716c7c7bd9befc
|
[
"MIT"
] | 1
|
2021-03-15T14:50:39.000Z
|
2021-03-15T14:50:39.000Z
|
from zoo_02.project.mammal import Mammal
class Bear(Mammal):
def __init__(self, name: str):
super().__init__(name)
| 18.428571
| 40
| 0.689922
| 18
| 129
| 4.444444
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019231
| 0.193798
| 129
| 6
| 41
| 21.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
cec868797df53226321c7a2ec1283519621cc3c2
| 61
|
py
|
Python
|
run.py
|
rsbyrne/dkengine
|
07e62b48bf957c8b25695eb19364a258c1d6a65d
|
[
"MIT"
] | null | null | null |
run.py
|
rsbyrne/dkengine
|
07e62b48bf957c8b25695eb19364a258c1d6a65d
|
[
"MIT"
] | null | null | null |
run.py
|
rsbyrne/dkengine
|
07e62b48bf957c8b25695eb19364a258c1d6a65d
|
[
"MIT"
] | null | null | null |
import dkpy
dkpy.start_game('knodule', username = 'rsbyrne')
| 20.333333
| 48
| 0.754098
| 8
| 61
| 5.625
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.098361
| 61
| 2
| 49
| 30.5
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0.229508
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
cedb905de47ff23305a533d188e8290065f68f35
| 88
|
py
|
Python
|
app/src/managers/__init__.py
|
avillia/weatheRESTua
|
a532d83b6ddc0f17c10820b24a539ef0541d5667
|
[
"MIT"
] | null | null | null |
app/src/managers/__init__.py
|
avillia/weatheRESTua
|
a532d83b6ddc0f17c10820b24a539ef0541d5667
|
[
"MIT"
] | null | null | null |
app/src/managers/__init__.py
|
avillia/weatheRESTua
|
a532d83b6ddc0f17c10820b24a539ef0541d5667
|
[
"MIT"
] | null | null | null |
from .city import SQLAlchemyCityManager
from .forecast import SQLAlchemyForecastManager
| 29.333333
| 47
| 0.886364
| 8
| 88
| 9.75
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.090909
| 88
| 2
| 48
| 44
| 0.975
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0c8fc978a2c91c7fc5db24c223f127c87457e3b4
| 3,127
|
py
|
Python
|
bcipy/helpers/tests/test_signal_model.py
|
sci-tab/BciPy
|
6f3aaa8cefaa198f66567f9de829c7eda5dbf686
|
[
"MIT"
] | 1
|
2020-07-28T16:59:24.000Z
|
2020-07-28T16:59:24.000Z
|
bcipy/helpers/tests/test_signal_model.py
|
sci-tab/BciPy
|
6f3aaa8cefaa198f66567f9de829c7eda5dbf686
|
[
"MIT"
] | null | null | null |
bcipy/helpers/tests/test_signal_model.py
|
sci-tab/BciPy
|
6f3aaa8cefaa198f66567f9de829c7eda5dbf686
|
[
"MIT"
] | null | null | null |
import unittest
from bcipy.helpers.signal_model import CopyPhraseWrapper
from bcipy.helpers.task import alphabet
class TestSignalModelRelated(unittest.TestCase):
"""Test CopyPhraseWrapper"""
def test_valid_letters(self):
alp = alphabet()
cp = CopyPhraseWrapper(
min_num_seq=1,
max_num_seq=50,
signal_model=None,
fs=25,
k=2,
alp=alp,
task_list=[('HELLO_WORLD', 'HE')],
is_txt_stim=True,
device_name='LSL',
evidence_names=['LM', 'ERP'],
device_channels=[
'ch1', 'ch2', 'ch3', 'ch4', 'ch5', 'ch6', 'ch7', 'ch8', 'ch9',
'ch10', 'ch11', 'ch12', 'ch13', 'ch14', 'ch15', 'ch16', 'TRG'
],
stimuli_timing=[0.5, 0.25])
triggers = [('+', 0.0), ('H', 0.5670222830376588),
('D', 0.8171830819919705), ('J', 1.0843321380089037),
('B', 1.3329724550130777), ('C', 1.5825864360085689),
('A', 1.833380013005808), ('F', 2.083211077027954),
('G', 2.333359022042714), ('I', 2.583265081048012),
('E', 2.833274284028448)]
target_info = [
'nontarget', 'nontarget', 'nontarget', 'nontarget', 'nontarget',
'nontarget', 'nontarget', 'nontarget', 'nontarget', 'nontarget',
'nontarget'
]
letters, timings, labels = cp.letter_info(triggers, target_info)
expected_letters = ['H', 'D', 'J', 'B', 'C', 'A', 'F', 'G', 'I', 'E']
expected_time = [
0.5670222830376588, 0.8171830819919705, 1.0843321380089037,
1.3329724550130777, 1.5825864360085689, 1.833380013005808,
2.083211077027954, 2.333359022042714, 2.583265081048012,
2.833274284028448
]
self.assertEqual(expected_letters, letters)
self.assertEqual(expected_time, timings)
self.assertEqual(len(letters), len(labels))
triggers = [('calibration_trigger', 0.0), ('+', 0.1), ('H', 0.5670222830376588),
('D', 0.8171830819919705), ('J', 1.0843321380089037),
('B', 1.3329724550130777), ('C', 1.5825864360085689),
('A', 1.833380013005808), ('F', 2.083211077027954),
('G', 2.333359022042714), ('I', 2.583265081048012),
('E', 2.833274284028448)]
target_info = [
'calib', 'fixation', 'nontarget', 'nontarget', 'nontarget', 'nontarget',
'nontarget', 'nontarget', 'nontarget', 'nontarget', 'nontarget',
'nontarget'
]
letters, timings, labels = cp.letter_info(triggers, target_info)
self.assertEqual(expected_letters, letters)
self.assertEqual(expected_time, timings)
self.assertEqual(['nontarget'] * (len(letters)), labels)
# Test it throws an exception when letter is outside alphabet
with self.assertRaises(Exception):
cp.letter_info([('A', 0.0), ('*', 1.0)],
['nontarget', 'nontarget'])
| 42.835616
| 88
| 0.540774
| 293
| 3,127
| 5.668942
| 0.37884
| 0.216737
| 0.27634
| 0.325105
| 0.500301
| 0.500301
| 0.500301
| 0.500301
| 0.500301
| 0.500301
| 0
| 0.246231
| 0.299968
| 3,127
| 72
| 89
| 43.430556
| 0.512563
| 0.026543
| 0
| 0.370968
| 0
| 0
| 0.118828
| 0
| 0
| 0
| 0
| 0
| 0.112903
| 1
| 0.016129
| false
| 0
| 0.048387
| 0
| 0.080645
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0cd523a0d217f58e1ff829d2a3408fe69a4d02c9
| 316
|
py
|
Python
|
string_25.py
|
Technicoryx/python_strings_inbuilt_functions
|
78892d043c6c6d65affe3bd4906ba0162c5d6604
|
[
"MIT"
] | null | null | null |
string_25.py
|
Technicoryx/python_strings_inbuilt_functions
|
78892d043c6c6d65affe3bd4906ba0162c5d6604
|
[
"MIT"
] | null | null | null |
string_25.py
|
Technicoryx/python_strings_inbuilt_functions
|
78892d043c6c6d65affe3bd4906ba0162c5d6604
|
[
"MIT"
] | null | null | null |
"""Below Python Programme demonstrate lstrip
functions in a string"""
#Example:
random_string = ' this is good '
# Leading whitepsace are removed
print(random_string.lstrip())
# Argument doesn't contain space
# No characters are removed.
print(random_string.lstrip('sti'))
print(random_string.lstrip('s ti'))
| 19.75
| 44
| 0.753165
| 43
| 316
| 5.44186
| 0.674419
| 0.205128
| 0.217949
| 0.294872
| 0.282051
| 0.282051
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136076
| 316
| 15
| 45
| 21.066667
| 0.857143
| 0.509494
| 0
| 0.5
| 0
| 0
| 0.157534
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.75
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
0cfbabd34f318d451bbab82ba1eb55bb7ccce4e2
| 137
|
py
|
Python
|
src/utils/preprocessing/__init__.py
|
chris4540/StudyMaskedLMForQG
|
2bf477b7b8cfb5d195c028db6d63aadf06af8fc5
|
[
"MIT"
] | 6
|
2020-12-09T11:30:37.000Z
|
2022-03-03T12:06:44.000Z
|
src/utils/preprocessing/__init__.py
|
chris4540/StudyMaskedLMForQG
|
2bf477b7b8cfb5d195c028db6d63aadf06af8fc5
|
[
"MIT"
] | null | null | null |
src/utils/preprocessing/__init__.py
|
chris4540/StudyMaskedLMForQG
|
2bf477b7b8cfb5d195c028db6d63aadf06af8fc5
|
[
"MIT"
] | 3
|
2021-03-23T04:56:48.000Z
|
2022-02-02T19:31:46.000Z
|
"""
This module provide all the functions or classes which help pre-processing data.
For example, splitting paragraph into sentences
"""
| 27.4
| 80
| 0.788321
| 19
| 137
| 5.684211
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145985
| 137
| 4
| 81
| 34.25
| 0.923077
| 0.934307
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0cffe950b6e189172417edd3391bff66a3cf1f72
| 660
|
py
|
Python
|
venv/Lib/site-packages/lunr/languages/trimmer.py
|
star10919/drf
|
77c005794087484d72ffc0d76612a6ac9845821e
|
[
"BSD-3-Clause"
] | 2
|
2021-06-18T07:48:14.000Z
|
2021-06-21T11:55:01.000Z
|
venv/Lib/site-packages/lunr/languages/trimmer.py
|
star10919/drf
|
77c005794087484d72ffc0d76612a6ac9845821e
|
[
"BSD-3-Clause"
] | null | null | null |
venv/Lib/site-packages/lunr/languages/trimmer.py
|
star10919/drf
|
77c005794087484d72ffc0d76612a6ac9845821e
|
[
"BSD-3-Clause"
] | null | null | null |
from __future__ import unicode_literals
import re
def generate_trimmer(word_characters):
"""Returns a trimmer function from a string of word characters.
TODO: lunr-languages ships with lists of word characters for each language
I haven't found an equivalent in Python, we may need to copy it.
"""
full_re = re.compile(r"^[^{0}]*?([{0}]+)[^{0}]*?$".format(word_characters))
def trimmer(token, i=None, tokens=None):
def trim(s, metadata=None):
match = full_re.match(s)
if match is None:
return s
return match.group(1)
return token.update(trim)
return trimmer
| 27.5
| 79
| 0.634848
| 92
| 660
| 4.445652
| 0.619565
| 0.136919
| 0.07824
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00818
| 0.259091
| 660
| 23
| 80
| 28.695652
| 0.828221
| 0.304545
| 0
| 0
| 1
| 0
| 0.059091
| 0.059091
| 0
| 0
| 0
| 0.043478
| 0
| 1
| 0.25
| false
| 0
| 0.166667
| 0
| 0.75
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
0b2a29864e8489ca4729cff4a478293485fe75a0
| 276
|
py
|
Python
|
yourenv/pythonClub/pythonClubProject/admin.py
|
oconnalla/pythonClub
|
80165458cb83c96237d074ca14d3bd5263b8c6af
|
[
"MIT"
] | null | null | null |
yourenv/pythonClub/pythonClubProject/admin.py
|
oconnalla/pythonClub
|
80165458cb83c96237d074ca14d3bd5263b8c6af
|
[
"MIT"
] | null | null | null |
yourenv/pythonClub/pythonClubProject/admin.py
|
oconnalla/pythonClub
|
80165458cb83c96237d074ca14d3bd5263b8c6af
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
# Register your models here.
from .models import Meeting, Meeting_Minutes, Resource,Event
# Register your models here.
admin.site.register(Meeting)
admin.site.register(Meeting_Minutes)
admin.site.register(Resource)
admin.site.register(Event)
| 27.6
| 60
| 0.818841
| 38
| 276
| 5.894737
| 0.368421
| 0.160714
| 0.303571
| 0.196429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09058
| 276
| 10
| 61
| 27.6
| 0.89243
| 0.192029
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0b5d318686f0063add8c0623ce8f36261e45b68b
| 174
|
py
|
Python
|
models/__init__.py
|
kyeeh/AirBnB_clone
|
7627373ed7e6daec355bf0497dee6e2915380886
|
[
"MIT"
] | null | null | null |
models/__init__.py
|
kyeeh/AirBnB_clone
|
7627373ed7e6daec355bf0497dee6e2915380886
|
[
"MIT"
] | null | null | null |
models/__init__.py
|
kyeeh/AirBnB_clone
|
7627373ed7e6daec355bf0497dee6e2915380886
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python3
''' create a unique FileStorage instance the application '''
from models.engine.file_storage import FileStorage
storage = FileStorage()
storage.reload()
| 21.75
| 60
| 0.775862
| 21
| 174
| 6.380952
| 0.809524
| 0.268657
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006494
| 0.114943
| 174
| 7
| 61
| 24.857143
| 0.863636
| 0.408046
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0b623ceb46e583895ae5a14e232ab32bc151e184
| 661
|
py
|
Python
|
pytglib/api/types/notification_group_type_messages.py
|
iTeam-co/pytglib
|
e5e75e0a85f89b77762209b32a61b0a883c0ae61
|
[
"MIT"
] | 6
|
2019-10-30T08:57:27.000Z
|
2021-02-08T14:17:43.000Z
|
pytglib/api/types/notification_group_type_messages.py
|
iTeam-co/python-telegram
|
e5e75e0a85f89b77762209b32a61b0a883c0ae61
|
[
"MIT"
] | 1
|
2021-08-19T05:44:10.000Z
|
2021-08-19T07:14:56.000Z
|
pytglib/api/types/notification_group_type_messages.py
|
iTeam-co/python-telegram
|
e5e75e0a85f89b77762209b32a61b0a883c0ae61
|
[
"MIT"
] | 5
|
2019-12-04T05:30:39.000Z
|
2021-05-21T18:23:32.000Z
|
from ..utils import Object
class NotificationGroupTypeMessages(Object):
"""
A group containing notifications of type notificationTypeNewMessage and notificationTypeNewPushMessage with ordinary unread messages
Attributes:
ID (:obj:`str`): ``NotificationGroupTypeMessages``
No parameters required.
Returns:
NotificationGroupType
Raises:
:class:`telegram.Error`
"""
ID = "notificationGroupTypeMessages"
def __init__(self, **kwargs):
pass
@staticmethod
def read(q: dict, *args) -> "NotificationGroupTypeMessages":
return NotificationGroupTypeMessages()
| 21.322581
| 136
| 0.677761
| 50
| 661
| 8.88
| 0.84
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.242057
| 661
| 30
| 137
| 22.033333
| 0.886228
| 0.450832
| 0
| 0
| 0
| 0
| 0.182965
| 0.182965
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0.125
| 0.125
| 0.125
| 0.75
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
0ba758e108e813f90af02c4004daf086d06c4572
| 1,036
|
py
|
Python
|
src/kernel/testdata/repo/oopl/python/metax/test_test/.FakeFcntlTest.py
|
metaesque/meta
|
c3e6413ca6cc6ff5456158b128070b36baf2d36a
|
[
"AML",
"TCL",
"Ruby"
] | null | null | null |
src/kernel/testdata/repo/oopl/python/metax/test_test/.FakeFcntlTest.py
|
metaesque/meta
|
c3e6413ca6cc6ff5456158b128070b36baf2d36a
|
[
"AML",
"TCL",
"Ruby"
] | 1
|
2018-10-30T03:14:34.000Z
|
2018-10-30T03:19:35.000Z
|
src/kernel/testdata/repo/oopl/python/metax/test_test/.FakeFcntlTest.py
|
metaesque/meta
|
c3e6413ca6cc6ff5456158b128070b36baf2d36a
|
[
"AML",
"TCL",
"Ruby"
] | null | null | null |
import metax.test # target=//metax/test:test
import metax.test # target=//metax/test:test
import metax.test_test # target=//metax/test_test:test_test
########## End Imports ##########
class FakeFcntlTest(metax.test.TestCase):
"""Auto-generated test class for metax.test.FakeFcntl"""
__metaclass__ = FakeFcntlTestMeta
def test___init__(self):
"""here"""
pass
def test_fcntl(self):
"""here"""
# noop
# TODO(wmh): Is there a way to verify this method does nothing?
pass
def test_ioctl(self):
"""here"""
# noop
# TODO(wmh): Is there a way to verify this method does nothing?
pass
def test_flock(self):
"""here"""
# noop
# TODO(wmh): Is there a way to verify this method does nothing?
pass
def test_lockf(self):
"""here"""
# noop
# TODO(wmh): Is there a way to verify this method does nothing?
pass
def test_meta(self):
"""here"""
# noop
pass
########## Start Harness ##########
if __name__ == '__main__':
metax.test.main()
| 21.583333
| 67
| 0.61583
| 138
| 1,036
| 4.442029
| 0.311594
| 0.132137
| 0.089723
| 0.104405
| 0.62969
| 0.59217
| 0.59217
| 0.59217
| 0.59217
| 0.59217
| 0
| 0
| 0.225869
| 1,036
| 47
| 68
| 22.042553
| 0.764339
| 0.451737
| 0
| 0.421053
| 0
| 0
| 0.016667
| 0
| 0
| 0
| 0
| 0.021277
| 0
| 1
| 0.315789
| false
| 0.315789
| 0.157895
| 0
| 0.578947
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
0bb0905cf0a2646847658c7110fb76940d84098e
| 30
|
py
|
Python
|
Python training/First steps/Ex_14.py
|
tarsic99/Python_coursera
|
2748a4f0c43cc21eb4c71b9494e86bc843c8e258
|
[
"Apache-2.0"
] | null | null | null |
Python training/First steps/Ex_14.py
|
tarsic99/Python_coursera
|
2748a4f0c43cc21eb4c71b9494e86bc843c8e258
|
[
"Apache-2.0"
] | null | null | null |
Python training/First steps/Ex_14.py
|
tarsic99/Python_coursera
|
2748a4f0c43cc21eb4c71b9494e86bc843c8e258
|
[
"Apache-2.0"
] | null | null | null |
A = int(input())
print(1 - A)
| 10
| 16
| 0.533333
| 6
| 30
| 2.666667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.041667
| 0.2
| 30
| 2
| 17
| 15
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
0bb82d4efd6e25ef6874660496c1de9c4efbe736
| 261
|
py
|
Python
|
tests/classes/simple_len.py
|
forever9717/jsonclasses
|
cc9bde67ceab220425b4855ebb59d432e6fd6ddc
|
[
"MIT"
] | 50
|
2021-08-18T08:08:04.000Z
|
2022-03-20T07:23:26.000Z
|
tests/classes/simple_len.py
|
zhichao-github/jsonclasses
|
6ee8545683b446939c9c68414fc351cbc917ad41
|
[
"MIT"
] | 1
|
2021-11-23T02:12:29.000Z
|
2021-11-23T13:35:26.000Z
|
tests/classes/simple_len.py
|
zhichao-github/jsonclasses
|
6ee8545683b446939c9c68414fc351cbc917ad41
|
[
"MIT"
] | 8
|
2021-07-01T02:39:15.000Z
|
2021-12-10T02:20:18.000Z
|
from __future__ import annotations
from typing import Optional
from jsonclasses import jsonclass, types
@jsonclass
class SimpleLen:
str: int = types.default("abcdefghoi").len.int.required
list: int = types.default([1, 2, 3, 4, 5, 6]).len.int.required
| 26.1
| 66
| 0.743295
| 37
| 261
| 5.135135
| 0.648649
| 0.084211
| 0.157895
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.027027
| 0.149425
| 261
| 9
| 67
| 29
| 0.828829
| 0
| 0
| 0
| 0
| 0
| 0.038314
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.428571
| 0
| 0.857143
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
0bbd8219ea3c2436ff163751a16a76ac1b525155
| 238
|
py
|
Python
|
python/tests/test_metadata.py
|
lambdaofgod/keepsake
|
54d3eab0f4fcfe5fbe43a50cf14983c06234d6c8
|
[
"Apache-2.0"
] | 810
|
2021-02-09T09:26:26.000Z
|
2022-03-25T14:06:13.000Z
|
python/tests/test_metadata.py
|
lambdaofgod/keepsake
|
54d3eab0f4fcfe5fbe43a50cf14983c06234d6c8
|
[
"Apache-2.0"
] | 347
|
2021-02-08T07:24:29.000Z
|
2022-03-31T23:05:29.000Z
|
python/tests/test_metadata.py
|
lambdaofgod/keepsake
|
54d3eab0f4fcfe5fbe43a50cf14983c06234d6c8
|
[
"Apache-2.0"
] | 43
|
2020-10-30T19:55:42.000Z
|
2021-01-18T22:41:49.000Z
|
import datetime
from keepsake.metadata import parse_rfc3339
def test_parse_rfc3339():
dt = parse_rfc3339("2020-10-07T22:44:06.243914Z")
assert dt == datetime.datetime(2020, 10, 7, 22, 44, 6, 243914)
assert dt.tzinfo is None
| 26.444444
| 66
| 0.726891
| 37
| 238
| 4.567568
| 0.648649
| 0.213018
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.251256
| 0.163866
| 238
| 8
| 67
| 29.75
| 0.59799
| 0
| 0
| 0
| 0
| 0
| 0.113445
| 0.113445
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0.166667
| false
| 0
| 0.333333
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
e7f5f620b85d38faf2658fc7863aef5160b71a50
| 162
|
py
|
Python
|
100 Days Python/day003/src/moduloOperation.py
|
AiseKaise/100DaysPython
|
6deba07b3b79bd4fbc11379878ba4f1c2887d315
|
[
"MIT"
] | null | null | null |
100 Days Python/day003/src/moduloOperation.py
|
AiseKaise/100DaysPython
|
6deba07b3b79bd4fbc11379878ba4f1c2887d315
|
[
"MIT"
] | null | null | null |
100 Days Python/day003/src/moduloOperation.py
|
AiseKaise/100DaysPython
|
6deba07b3b79bd4fbc11379878ba4f1c2887d315
|
[
"MIT"
] | null | null | null |
number = int(input("Which number do you want to choose"))
if number % 2 == 0:
print("This is an even number.")
else:
print("This is an odd number.")
| 27
| 58
| 0.623457
| 27
| 162
| 3.740741
| 0.703704
| 0.178218
| 0.217822
| 0.257426
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.01626
| 0.240741
| 162
| 6
| 59
| 27
| 0.804878
| 0
| 0
| 0
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.4
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e7ff7b7d527d1b79d32758e173f2ac8dba53bc2b
| 403
|
py
|
Python
|
src/backend/app/crud/address.py
|
douglasdaly/dougliz-wedding
|
da673baf3a7387c3818960c0ffa12ab7c830a89b
|
[
"MIT"
] | 5
|
2020-02-02T02:39:23.000Z
|
2021-08-17T15:50:57.000Z
|
src/backend/app/crud/address.py
|
douglasdaly/dougliz-wedding
|
da673baf3a7387c3818960c0ffa12ab7c830a89b
|
[
"MIT"
] | 4
|
2021-03-31T19:39:57.000Z
|
2022-01-22T09:29:10.000Z
|
src/backend/app/crud/address.py
|
douglasdaly/dougliz-wedding
|
da673baf3a7387c3818960c0ffa12ab7c830a89b
|
[
"MIT"
] | 1
|
2020-04-12T17:11:43.000Z
|
2020-04-12T17:11:43.000Z
|
# -*- coding: utf-8 -*-
"""
Address repository.
"""
from abc import ABCMeta
from app.crud.base import Repository
from app.crud.base import T
from app.models.address import AddressCreate
from app.models.address import AddressUpdate
class AddressRepository(
Repository[T, AddressCreate, AddressUpdate],
metaclass=ABCMeta
):
"""
Abstract base Address object repository.
"""
pass
| 19.190476
| 48
| 0.724566
| 47
| 403
| 6.212766
| 0.468085
| 0.09589
| 0.075342
| 0.10274
| 0.321918
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003012
| 0.176179
| 403
| 20
| 49
| 20.15
| 0.876506
| 0.205955
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.1
| 0.5
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
f0166def0c989fcebe4e87acf7d25ec584346e2d
| 192
|
py
|
Python
|
environment/gym-RL/gym_RL/__init__.py
|
nickplas/Internship_ESTECO
|
576039255a7f087585e19f323873f8e5dc2af39b
|
[
"Apache-2.0"
] | 2
|
2021-03-05T02:11:43.000Z
|
2021-04-23T13:18:16.000Z
|
environment/gym-RL/gym_RL/__init__.py
|
nickplas/Internship_ESTECO
|
576039255a7f087585e19f323873f8e5dc2af39b
|
[
"Apache-2.0"
] | null | null | null |
environment/gym-RL/gym_RL/__init__.py
|
nickplas/Internship_ESTECO
|
576039255a7f087585e19f323873f8e5dc2af39b
|
[
"Apache-2.0"
] | null | null | null |
from gym.envs.registration import register
register(
id='RL-v0',
entry_point='gym_RL.envs:RLEnv',
)
register(
id='RL-extrahard-v0',
entry_point='gym_RL.envs:RLExtraHardEnv',
)
| 19.2
| 45
| 0.703125
| 27
| 192
| 4.851852
| 0.518519
| 0.152672
| 0.183206
| 0.229008
| 0.320611
| 0.320611
| 0
| 0
| 0
| 0
| 0
| 0.012195
| 0.145833
| 192
| 10
| 46
| 19.2
| 0.786585
| 0
| 0
| 0.222222
| 0
| 0
| 0.326425
| 0.134715
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.111111
| 0
| 0.111111
| 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
| 0
| 0
|
0
| 4
|
f054ba1515c0446c6860f928e986db6ec4122c6a
| 615
|
py
|
Python
|
python/testData/inspections/PyTypeCheckerInspection/TypingCallableCall.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 2
|
2019-04-28T07:48:50.000Z
|
2020-12-11T14:18:08.000Z
|
python/testData/inspections/PyTypeCheckerInspection/TypingCallableCall.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 173
|
2018-07-05T13:59:39.000Z
|
2018-08-09T01:12:03.000Z
|
python/testData/inspections/PyTypeCheckerInspection/TypingCallableCall.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 2
|
2020-03-15T08:57:37.000Z
|
2020-04-07T04:48:14.000Z
|
from typing import Callable
def foo() -> Callable:
pass
def bar() -> Callable[..., str]:
pass
def baz() -> Callable[[int, str], str]:
pass
cllbl_a = foo()
cllbl_a()
cllbl_a(1)
cllbl_a(1, "2")
cllbl_b = bar()
cllbl_b()
cllbl_b(1)
cllbl_b(1, "2")
cllbl_c = baz()
cllbl_c(1, "2")
cllbl_c(1, <warning descr="Expected type 'str', got 'int' instead">2</warning>)
cllbl_c(<warning descr="Expected type 'int', got 'str' instead">"1"</warning>, "2")
cllbl_c(<warning descr="Expected type 'int', got 'list' instead">[]</warning>, <warning descr="Expected type 'str', got 'list' instead">[]</warning>)
| 18.636364
| 149
| 0.637398
| 97
| 615
| 3.907216
| 0.247423
| 0.079156
| 0.211082
| 0.253298
| 0.348285
| 0.348285
| 0.189974
| 0.189974
| 0
| 0
| 0
| 0.023077
| 0.154472
| 615
| 32
| 150
| 19.21875
| 0.705769
| 0
| 0
| 0.15
| 0
| 0
| 0.258537
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0.15
| 0.05
| null | null | 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
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
f056b6d1b32681411d35c7a1407a6064a1a5084f
| 1,986
|
py
|
Python
|
smarted/Database/serializers.py
|
harryvanroy/SmartED
|
aaa144325351f0cb3b840e9f371882bee5a347de
|
[
"MIT"
] | 2
|
2020-11-09T11:47:44.000Z
|
2020-11-24T22:39:41.000Z
|
smarted/Database/serializers.py
|
harryvanroy/SmartED
|
aaa144325351f0cb3b840e9f371882bee5a347de
|
[
"MIT"
] | 1
|
2021-08-11T07:48:59.000Z
|
2021-08-11T07:48:59.000Z
|
smarted/Database/serializers.py
|
harryvanroy/SmartED
|
aaa144325351f0cb3b840e9f371882bee5a347de
|
[
"MIT"
] | 3
|
2020-10-30T11:31:45.000Z
|
2020-11-06T07:41:16.000Z
|
from rest_framework import serializers
from .models import *
class UserSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = '__all__'
class StudentSerializer(serializers.ModelSerializer):
class Meta:
model = Student
fields = '__all__'
class StaffSerializer(serializers.ModelSerializer):
class Meta:
model = Staff
fields = '__all__'
class AnnouncementSerializer(serializers.ModelSerializer):
class Meta:
model = Announcement
fields = '__all__'
class ResourceSerializer(serializers.ModelSerializer):
class Meta:
model = Resource
fields = '__all__'
class FileSerializer(serializers.ModelSerializer):
class Meta:
model = File
fields = '__all__'
class InstitutionSerializer(serializers.ModelSerializer):
class Meta:
model = Institution
fields = '__all__'
class CourseSerializer(serializers.ModelSerializer):
class Meta:
model = Course
fields = '__all__'
class StudentCourseSerializer(serializers.ModelSerializer):
class Meta:
model = StudentCourse
fields = '__all__'
class StaffCourseSerializer(serializers.ModelSerializer):
class Meta:
model = StaffCourse
fields = '__all__'
class AssessmentSerializer(serializers.ModelSerializer):
class Meta:
model = AssessmentItem
fields = '__all__'
class StudentAssessmentSerializer(serializers.ModelSerializer):
class Meta:
model = StudentAssessment
fields = '__all__'
class CourseFeedbackSerializer(serializers.ModelSerializer):
class Meta:
model = CourseFeedback
fields = '__all__'
class CourseGoalsSerializer(serializers.ModelSerializer):
class Meta:
model = LongTermGoals
fields = '__all__'
class csrfExemptSerializer(serializers.ModelSerializer):
class Meta:
model = exemptCSRF
fields = '__all__'
| 21.824176
| 63
| 0.686304
| 158
| 1,986
| 8.240506
| 0.265823
| 0.299539
| 0.357143
| 0.403226
| 0.460829
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.244713
| 1,986
| 91
| 64
| 21.824176
| 0.868
| 0
| 0
| 0.483871
| 0
| 0
| 0.052843
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.032258
| 0
| 0.516129
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
f072e90ab56d334d8e2297b93eecef593cd77537
| 46
|
py
|
Python
|
btklog/__init__.py
|
acikogun/btklog
|
98b64ff0192d6e164c779d3c9e4ab942a2eb4bc3
|
[
"Apache-2.0"
] | 1
|
2020-06-19T12:13:25.000Z
|
2020-06-19T12:13:25.000Z
|
btklog/__init__.py
|
acikogun/btklog
|
98b64ff0192d6e164c779d3c9e4ab942a2eb4bc3
|
[
"Apache-2.0"
] | null | null | null |
btklog/__init__.py
|
acikogun/btklog
|
98b64ff0192d6e164c779d3c9e4ab942a2eb4bc3
|
[
"Apache-2.0"
] | null | null | null |
__author__ = 'Ogun Acik <acikogun@gmail.com>'
| 23
| 45
| 0.73913
| 6
| 46
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108696
| 46
| 1
| 46
| 46
| 0.731707
| 0
| 0
| 0
| 0
| 0
| 0.652174
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b2ce87db48b0898562dbc8f5de678e95c687ed48
| 221
|
py
|
Python
|
example1.py
|
mtasic85/graphene-cffi
|
fe28994c6437a26f3e1bd88ee1380841edcc3d19
|
[
"MIT"
] | null | null | null |
example1.py
|
mtasic85/graphene-cffi
|
fe28994c6437a26f3e1bd88ee1380841edcc3d19
|
[
"MIT"
] | null | null | null |
example1.py
|
mtasic85/graphene-cffi
|
fe28994c6437a26f3e1bd88ee1380841edcc3d19
|
[
"MIT"
] | null | null | null |
from graphene import graphene as lib, Graphene
a = lib.graphene_vec2_alloc()
lib.graphene_vec2_init(a, 1.0, 2.0)
lib.graphene_vec2_free(a)
b = Graphene.vec2.alloc()
Graphene.vec2.init(a, 1.0, 2.0)
Graphene.vec2.free(b)
| 22.1
| 46
| 0.751131
| 42
| 221
| 3.809524
| 0.333333
| 0.45
| 0.28125
| 0.2125
| 0.2625
| 0.2625
| 0.2625
| 0.2625
| 0
| 0
| 0
| 0.070707
| 0.104072
| 221
| 9
| 47
| 24.555556
| 0.737374
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.142857
| 0
| 0.142857
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b2f4e87f1f62bdb29286e3e662a4b78e9d38c5a0
| 422
|
py
|
Python
|
PINp/2014/Koleganov_N_S/task_1_10.py
|
YukkaSarasti/pythonintask
|
eadf4245abb65f4400a3bae30a4256b4658e009c
|
[
"Apache-2.0"
] | null | null | null |
PINp/2014/Koleganov_N_S/task_1_10.py
|
YukkaSarasti/pythonintask
|
eadf4245abb65f4400a3bae30a4256b4658e009c
|
[
"Apache-2.0"
] | null | null | null |
PINp/2014/Koleganov_N_S/task_1_10.py
|
YukkaSarasti/pythonintask
|
eadf4245abb65f4400a3bae30a4256b4658e009c
|
[
"Apache-2.0"
] | null | null | null |
# Задача 1. Вариант 10.
# Напишите программу, которая будет сообщать род деятельности и псевдоним под
# которым скрывается Ричард Дженкинс. После вывода информации программа должна
# дожидаться пока пользователь нажмет Enter для выхода.
# Колеганов Никита Сергеевич
# 29.05.2016
print("Ричард Дженкинс извествен по имени Ричард Дейл. Американсикй актер кино, театра и телевидения")
input("\n\nНажмите Enter для выхода.")
| 42.2
| 102
| 0.800948
| 56
| 422
| 6.035714
| 0.875
| 0.08284
| 0.08284
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.03022
| 0.137441
| 422
| 9
| 103
| 46.888889
| 0.898352
| 0.630332
| 0
| 0
| 0
| 0
| 0.818792
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.5
| 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
b2fab72b0d12be06e1bb052a0bd65fcb7d8fe871
| 148
|
py
|
Python
|
oxlos/templatetags/oxlos_tags.py
|
jtauber/oxlos2
|
5122a3d6407e233c0b4b0c001d66ef7c1fefd0d2
|
[
"MIT"
] | 1
|
2017-11-26T03:41:02.000Z
|
2017-11-26T03:41:02.000Z
|
oxlos/templatetags/oxlos_tags.py
|
jtauber/oxlos2
|
5122a3d6407e233c0b4b0c001d66ef7c1fefd0d2
|
[
"MIT"
] | null | null | null |
oxlos/templatetags/oxlos_tags.py
|
jtauber/oxlos2
|
5122a3d6407e233c0b4b0c001d66ef7c1fefd0d2
|
[
"MIT"
] | null | null | null |
from django import template
register = template.Library()
@register.filter
def is_member(project, user):
return project.team.is_member(user)
| 16.444444
| 39
| 0.77027
| 20
| 148
| 5.6
| 0.7
| 0.142857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.135135
| 148
| 8
| 40
| 18.5
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0.2
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
65393f3f8c70d8d01c125697716cbb312bf90aae
| 168
|
py
|
Python
|
src/huaytools/pytorch/modules/__init__.py
|
imhuay/studies-gitbook
|
69a31c20c91d131d0fafce0622f4035b9b95e93a
|
[
"MIT"
] | 100
|
2021-10-13T01:22:27.000Z
|
2022-03-31T09:52:49.000Z
|
src/huaytools/pytorch/modules/__init__.py
|
imhuay/studies-gitbook
|
69a31c20c91d131d0fafce0622f4035b9b95e93a
|
[
"MIT"
] | null | null | null |
src/huaytools/pytorch/modules/__init__.py
|
imhuay/studies-gitbook
|
69a31c20c91d131d0fafce0622f4035b9b95e93a
|
[
"MIT"
] | 27
|
2021-11-01T01:05:09.000Z
|
2022-03-31T03:32:01.000Z
|
#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
Time: 2021-10-23 9:08 下午
Author: huayang
Subject:
"""
from huaytools.pytorch.modules.advance.sim_cse import SimCSE
| 12.923077
| 60
| 0.684524
| 26
| 168
| 4.384615
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.082759
| 0.136905
| 168
| 12
| 61
| 14
| 0.703448
| 0.553571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
e8ee2c7597ae94a9969fde6e6baa28b0b6afb152
| 98
|
py
|
Python
|
imusic/music_system/apps.py
|
mbinary/music-system
|
8e1928e5659a79ac10c15b7369fd5fc50c713e15
|
[
"MIT"
] | 4
|
2019-07-04T17:25:01.000Z
|
2019-09-13T11:38:12.000Z
|
imusic/music_system/apps.py
|
mbinary-course-labs/music-system
|
8e1928e5659a79ac10c15b7369fd5fc50c713e15
|
[
"MIT"
] | null | null | null |
imusic/music_system/apps.py
|
mbinary-course-labs/music-system
|
8e1928e5659a79ac10c15b7369fd5fc50c713e15
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class MusicSystemConfig(AppConfig):
name = 'music_system'
| 16.333333
| 35
| 0.77551
| 11
| 98
| 6.818182
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153061
| 98
| 5
| 36
| 19.6
| 0.903614
| 0
| 0
| 0
| 0
| 0
| 0.122449
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
330306fe108fb59ccd9a5b42627021185760c850
| 94
|
py
|
Python
|
python_modules/dagster/dagster_tests/general_tests/grpc_tests/crashy_grpc_repo.py
|
dbatten5/dagster
|
d76e50295054ffe5a72f9b292ef57febae499528
|
[
"Apache-2.0"
] | 4,606
|
2018-06-21T17:45:20.000Z
|
2022-03-31T23:39:42.000Z
|
python_modules/dagster/dagster_tests/general_tests/grpc_tests/crashy_grpc_repo.py
|
dbatten5/dagster
|
d76e50295054ffe5a72f9b292ef57febae499528
|
[
"Apache-2.0"
] | 6,221
|
2018-06-12T04:36:01.000Z
|
2022-03-31T21:43:05.000Z
|
python_modules/dagster/dagster_tests/general_tests/grpc_tests/crashy_grpc_repo.py
|
dbatten5/dagster
|
d76e50295054ffe5a72f9b292ef57febae499528
|
[
"Apache-2.0"
] | 619
|
2018-08-22T22:43:09.000Z
|
2022-03-31T22:48:06.000Z
|
import sys
from dagster import repository
@repository
def crashy_repo():
sys.exit(123)
| 10.444444
| 30
| 0.744681
| 13
| 94
| 5.307692
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.038961
| 0.180851
| 94
| 8
| 31
| 11.75
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| true
| 0
| 0.4
| 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
| 0
| 0
|
0
| 4
|
33038ea5ed81f183c124fae18b3ac0b5f6a061a0
| 275
|
py
|
Python
|
tests/train_test.py
|
MartinThoma/sst
|
d0032c7ace8bfc2accea5ceed2a121cd1dd5e576
|
[
"MIT"
] | null | null | null |
tests/train_test.py
|
MartinThoma/sst
|
d0032c7ace8bfc2accea5ceed2a121cd1dd5e576
|
[
"MIT"
] | null | null | null |
tests/train_test.py
|
MartinThoma/sst
|
d0032c7ace8bfc2accea5ceed2a121cd1dd5e576
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import nose
def train_get_parser_test():
from sst import train
train.get_parser()
# def mfrdb_strip_end_test():
# from hwrt.datasets import mfrdb
# nose.tools.assert_equal(mfrdb.strip_end('asdf', 'df'), 'as')
| 19.642857
| 66
| 0.672727
| 41
| 275
| 4.292683
| 0.658537
| 0.090909
| 0.159091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004405
| 0.174545
| 275
| 13
| 67
| 21.153846
| 0.770925
| 0.621818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0.5
| 0
| 0.75
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
33467da4c67f146ab216f7b608102b1b8333ee30
| 237
|
py
|
Python
|
decode-encode/unicode_escape - example 2/main.py
|
whitmans-max/python-examples
|
881a8f23f0eebc76816a0078e19951893f0daaaa
|
[
"MIT"
] | 140
|
2017-02-21T22:49:04.000Z
|
2022-03-22T17:51:58.000Z
|
decode-encode/unicode_escape - example 2/main.py
|
whitmans-max/python-examples
|
881a8f23f0eebc76816a0078e19951893f0daaaa
|
[
"MIT"
] | 5
|
2017-12-02T19:55:00.000Z
|
2021-09-22T23:18:39.000Z
|
decode-encode/unicode_escape - example 2/main.py
|
whitmans-max/python-examples
|
881a8f23f0eebc76816a0078e19951893f0daaaa
|
[
"MIT"
] | 79
|
2017-01-25T10:53:33.000Z
|
2022-03-11T16:13:57.000Z
|
# date: 2019.09.24
# https://stackoverflow.com/questions/58085910/python-convert-u0048-style-unicode-to-normal-string/58086131#58086131
print('#U0048#U0045#U004C#U004C#U004F'.replace('#U', '\\u').encode().decode('raw_unicode_escape'))
| 39.5
| 116
| 0.755274
| 33
| 237
| 5.363636
| 0.848485
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.232456
| 0.037975
| 237
| 5
| 117
| 47.4
| 0.54386
| 0.548523
| 0
| 0
| 0
| 0
| 0.519608
| 0.294118
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
334a9f7fc13753dd73eb66c0e25e87cd6cf6fb17
| 182
|
py
|
Python
|
tests/conftest.py
|
roocs/rooki
|
09dd4b00e86b7d469dd52393bc3fbce61db10a6f
|
[
"BSD-3-Clause"
] | 2
|
2020-12-14T23:07:04.000Z
|
2021-01-07T18:49:50.000Z
|
tests/conftest.py
|
roocs/rook
|
036465be6fe9ff49da21aefbdce74fd8d5822d01
|
[
"BSD-3-Clause"
] | 121
|
2020-04-02T14:46:42.000Z
|
2022-03-17T19:35:24.000Z
|
tests/conftest.py
|
roocs/rook
|
036465be6fe9ff49da21aefbdce74fd8d5822d01
|
[
"BSD-3-Clause"
] | 3
|
2020-06-17T11:00:40.000Z
|
2022-03-04T09:38:03.000Z
|
import pytest
from rooki.client import Rooki
@pytest.fixture(scope="session")
def rooki():
rooki = Rooki(mode="async", verify=False, output_dir="/tmp/rooki")
return rooki
| 18.2
| 70
| 0.714286
| 25
| 182
| 5.16
| 0.68
| 0.155039
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148352
| 182
| 9
| 71
| 20.222222
| 0.832258
| 0
| 0
| 0
| 0
| 0
| 0.120879
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| 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
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
6831f636bdbb0ddb1b7cb3b9e48e36761236d2f5
| 84
|
py
|
Python
|
latent_interp.py
|
tianyu-lu/latent_ode
|
1a9e9415eda1837ed78e50009752b90eda3ca0db
|
[
"MIT"
] | null | null | null |
latent_interp.py
|
tianyu-lu/latent_ode
|
1a9e9415eda1837ed78e50009752b90eda3ca0db
|
[
"MIT"
] | null | null | null |
latent_interp.py
|
tianyu-lu/latent_ode
|
1a9e9415eda1837ed78e50009752b90eda3ca0db
|
[
"MIT"
] | null | null | null |
# Obtain latent trajectories corresponding to training examples for Implicit SInDy
| 28
| 82
| 0.845238
| 10
| 84
| 7.1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 84
| 2
| 83
| 42
| 0.986111
| 0.952381
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6858526faacce3797713dbe9b2d0a886532316a6
| 74
|
py
|
Python
|
release/stubs.min/Autodesk/Revit/DB/__init___parts/CADExportOptions.py
|
YKato521/ironpython-stubs
|
b1f7c580de48528490b3ee5791b04898be95a9ae
|
[
"MIT"
] | null | null | null |
release/stubs.min/Autodesk/Revit/DB/__init___parts/CADExportOptions.py
|
YKato521/ironpython-stubs
|
b1f7c580de48528490b3ee5791b04898be95a9ae
|
[
"MIT"
] | null | null | null |
release/stubs.min/Autodesk/Revit/DB/__init___parts/CADExportOptions.py
|
YKato521/ironpython-stubs
|
b1f7c580de48528490b3ee5791b04898be95a9ae
|
[
"MIT"
] | null | null | null |
class CADExportOptions(object):
""" Generic CAD Export options. """
| 24.666667
| 40
| 0.675676
| 7
| 74
| 7.142857
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.189189
| 74
| 2
| 41
| 37
| 0.833333
| 0.364865
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
68590396e2e74525a14b42b189748e6fdd887479
| 160
|
py
|
Python
|
altscrape/altscrape/items.py
|
5arthak01/webscraper
|
8e17a72aeade3c4393b42935e5e5d9eaea27e7e0
|
[
"Apache-2.0"
] | 1
|
2020-08-04T21:59:11.000Z
|
2020-08-04T21:59:11.000Z
|
altscrape/altscrape/items.py
|
5arthak01/webscraper
|
8e17a72aeade3c4393b42935e5e5d9eaea27e7e0
|
[
"Apache-2.0"
] | null | null | null |
altscrape/altscrape/items.py
|
5arthak01/webscraper
|
8e17a72aeade3c4393b42935e5e5d9eaea27e7e0
|
[
"Apache-2.0"
] | null | null | null |
import scrapy
class AltscrapeItem(scrapy.Item):
title = scrapy.Field()
author = scrapy.Field()
date = scrapy.Field()
content = scrapy.Field()
| 17.777778
| 33
| 0.6625
| 18
| 160
| 5.888889
| 0.555556
| 0.415094
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2125
| 160
| 8
| 34
| 20
| 0.84127
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.166667
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.