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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bdcf2da7a56efda3bda793288b1028391d3c4084
| 21
|
py
|
Python
|
tests/play.py
|
airportyh/cpython
|
e3cb54bdfcafb8493a936ba50d53e496f98f9222
|
[
"0BSD"
] | null | null | null |
tests/play.py
|
airportyh/cpython
|
e3cb54bdfcafb8493a936ba50d53e496f98f9222
|
[
"0BSD"
] | null | null | null |
tests/play.py
|
airportyh/cpython
|
e3cb54bdfcafb8493a936ba50d53e496f98f9222
|
[
"0BSD"
] | null | null | null |
l = []
l.insert(1, 3)
| 10.5
| 14
| 0.47619
| 5
| 21
| 2
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 0.190476
| 21
| 2
| 14
| 10.5
| 0.470588
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
da39dd7f9fb898c28b14112f2b790918090ae509
| 625
|
py
|
Python
|
src/portal/azext_portal/generated/_client_factory.py
|
Mannan2812/azure-cli-extensions
|
e2b34efe23795f6db9c59100534a40f0813c3d95
|
[
"MIT"
] | 207
|
2017-11-29T06:59:41.000Z
|
2022-03-31T10:00:53.000Z
|
src/portal/azext_portal/generated/_client_factory.py
|
Mannan2812/azure-cli-extensions
|
e2b34efe23795f6db9c59100534a40f0813c3d95
|
[
"MIT"
] | 4,061
|
2017-10-27T23:19:56.000Z
|
2022-03-31T23:18:30.000Z
|
src/portal/azext_portal/generated/_client_factory.py
|
Mannan2812/azure-cli-extensions
|
e2b34efe23795f6db9c59100534a40f0813c3d95
|
[
"MIT"
] | 802
|
2017-10-11T17:36:26.000Z
|
2022-03-31T22:24:32.000Z
|
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
def cf_portal(cli_ctx, *_):
from azure.cli.core.commands.client_factory import get_mgmt_service_client
from ..vendored_sdks.portal import Portal
return get_mgmt_service_client(cli_ctx, Portal)
def cf_dashboard(cli_ctx, *_):
return cf_portal(cli_ctx).dashboard
| 41.666667
| 94
| 0.5456
| 64
| 625
| 5.0625
| 0.59375
| 0.074074
| 0.067901
| 0.08642
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1056
| 625
| 14
| 95
| 44.642857
| 0.579606
| 0.5376
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0.166667
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
da3de0fa6a1b85cb0598ae160cb9ea28a8438954
| 30
|
py
|
Python
|
python/testData/completion/duplicateColon.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 2
|
2019-04-28T07:48:50.000Z
|
2020-12-11T14:18:08.000Z
|
python/testData/completion/duplicateColon.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 173
|
2018-07-05T13:59:39.000Z
|
2018-08-09T01:12:03.000Z
|
python/testData/completion/duplicateColon.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 2
|
2020-03-15T08:57:37.000Z
|
2020-04-07T04:48:14.000Z
|
class C:
def __ini<caret>:
| 15
| 21
| 0.633333
| 5
| 30
| 3.4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.233333
| 30
| 2
| 21
| 15
| 0.73913
| 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
|
da4c7f5cc55854400778a4e194285cda64395dd4
| 439
|
py
|
Python
|
backend/api/migrations/0008_auto_20190324_0156.py
|
forgeno/CMPUT404-group-project
|
fa1085919995d1965613db511102569019ffe8e6
|
[
"Apache-2.0"
] | null | null | null |
backend/api/migrations/0008_auto_20190324_0156.py
|
forgeno/CMPUT404-group-project
|
fa1085919995d1965613db511102569019ffe8e6
|
[
"Apache-2.0"
] | 117
|
2019-02-08T16:44:55.000Z
|
2019-04-08T04:44:55.000Z
|
backend/api/migrations/0008_auto_20190324_0156.py
|
forgeno/CMPUT404-project-socialdistribution
|
fa1085919995d1965613db511102569019ffe8e6
|
[
"Apache-2.0"
] | 1
|
2019-01-30T20:33:35.000Z
|
2019-01-30T20:33:35.000Z
|
# Generated by Django 2.1.5 on 2019-03-24 01:56
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('api', '0007_auto_20190324_0118'),
]
operations = [
migrations.RemoveField(
model_name='serveruser',
name='password',
),
migrations.RemoveField(
model_name='serveruser',
name='username',
),
]
| 19.954545
| 47
| 0.567198
| 42
| 439
| 5.809524
| 0.738095
| 0.172131
| 0.213115
| 0.245902
| 0.360656
| 0.360656
| 0
| 0
| 0
| 0
| 0
| 0.104027
| 0.321185
| 439
| 21
| 48
| 20.904762
| 0.714765
| 0.102506
| 0
| 0.4
| 1
| 0
| 0.158163
| 0.058673
| 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
|
da53bb3ddd21e3474d56449fd2603690fb2d66d4
| 89
|
py
|
Python
|
src/fortrace/botnet/bots/skeleton/__init__.py
|
dasec/ForTrace
|
b8187522a2c83fb661e5a1a5f403da8f40a31ead
|
[
"MIT"
] | 1
|
2022-03-31T14:01:51.000Z
|
2022-03-31T14:01:51.000Z
|
src/fortrace/botnet/bots/skeleton/__init__.py
|
dasec/ForTrace
|
b8187522a2c83fb661e5a1a5f403da8f40a31ead
|
[
"MIT"
] | null | null | null |
src/fortrace/botnet/bots/skeleton/__init__.py
|
dasec/ForTrace
|
b8187522a2c83fb661e5a1a5f403da8f40a31ead
|
[
"MIT"
] | 1
|
2022-03-31T14:02:30.000Z
|
2022-03-31T14:02:30.000Z
|
"""This package contains a very basic skeleton for implementing botnet components.
"""
| 29.666667
| 83
| 0.764045
| 11
| 89
| 6.181818
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157303
| 89
| 3
| 84
| 29.666667
| 0.906667
| 0.88764
| 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
|
da674b58642f553ed5a6474e43a2b27eecbb8d77
| 216
|
py
|
Python
|
src/errors.py
|
yxtay/falcon-echo
|
a53d91ac9302041d11188a57e48b37d8d4a37131
|
[
"MIT"
] | null | null | null |
src/errors.py
|
yxtay/falcon-echo
|
a53d91ac9302041d11188a57e48b37d8d4a37131
|
[
"MIT"
] | 5
|
2019-10-28T09:21:00.000Z
|
2019-11-06T08:27:09.000Z
|
src/errors.py
|
yxtay/falcon-echo
|
a53d91ac9302041d11188a57e48b37d8d4a37131
|
[
"MIT"
] | null | null | null |
import falcon
class HTTPValidationError(falcon.HTTPError):
def __init__(self, errors):
self.errors = errors
super().__init__(falcon.HTTP_422)
def to_dict(self, obj_type=dict):
pass
| 19.636364
| 44
| 0.671296
| 26
| 216
| 5.153846
| 0.653846
| 0.149254
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018072
| 0.231481
| 216
| 10
| 45
| 21.6
| 0.789157
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0.142857
| 0.142857
| 0
| 0.571429
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
da69b4f422cd7905ca9254cfb9bd593895d99e25
| 1,610
|
py
|
Python
|
openre/device/abstract.py
|
openre/openre
|
c5969df92cac83bdafd049e1c0a3bcf56b51223a
|
[
"MIT"
] | null | null | null |
openre/device/abstract.py
|
openre/openre
|
c5969df92cac83bdafd049e1c0a3bcf56b51223a
|
[
"MIT"
] | null | null | null |
openre/device/abstract.py
|
openre/openre
|
c5969df92cac83bdafd049e1c0a3bcf56b51223a
|
[
"MIT"
] | 1
|
2016-02-14T11:20:57.000Z
|
2016-02-14T11:20:57.000Z
|
# -*- coding: utf-8 -*-
"""
Интерфейс к различным устройствам, на которых будет моделироваться сеть.
"""
class Device(object):
"""
Абстрактный класс для устройств
"""
def __init__(self, config):
self.config = config
def tick_neurons(self, domain):
"""
Проверяем нейроны на спайки.
"""
raise NotImplementedError
def tick_synapses(self, domain):
"""
Передаем сигналы от pre-нейронов, у которых наступил спайк к
post-нейронам
"""
raise NotImplementedError
def tick_transmitter_index(self, domain):
"""
Получаем спайки из устройства для нейронов с флагом IS_TRANSMITTER
"""
raise NotImplementedError
def tick_receiver_index(self, domain):
"""
Передаем в устройство спайки для нейронов с флагом IS_RECEIVER
"""
raise NotImplementedError
def create(self, data):
"""
Создает указатель на данные на устройстве для data
"""
raise NotImplementedError
def upload(self, device_data_pointer, data, is_blocking=True):
"""
Данные из data копируются на устройство и возвращается указатель
на данные на устройсте
"""
raise NotImplementedError
def download(self, data, device_data_pointer, is_blocking=True):
"""
Данные с устройства (указатель dev_data) копируются в data
"""
raise NotImplementedError
def clean(self):
"""
Правильно завершаем работу устройства, если это необходимо
"""
pass
| 25.967742
| 74
| 0.61677
| 163
| 1,610
| 5.97546
| 0.472393
| 0.172485
| 0.194045
| 0.095483
| 0.041068
| 0
| 0
| 0
| 0
| 0
| 0
| 0.000895
| 0.306211
| 1,610
| 61
| 75
| 26.393443
| 0.871083
| 0.383851
| 0
| 0.368421
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.473684
| false
| 0.052632
| 0
| 0
| 0.526316
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
da7ada1029b10a9671fed784986e230c8dd9261e
| 87
|
py
|
Python
|
RedWebhook/__init__.py
|
japandotorg/RedHook
|
c6c148d6e33f2f65b8b203c2235e4f979fa28711
|
[
"MIT"
] | null | null | null |
RedWebhook/__init__.py
|
japandotorg/RedHook
|
c6c148d6e33f2f65b8b203c2235e4f979fa28711
|
[
"MIT"
] | null | null | null |
RedWebhook/__init__.py
|
japandotorg/RedHook
|
c6c148d6e33f2f65b8b203c2235e4f979fa28711
|
[
"MIT"
] | null | null | null |
__all__ = ["RedWebhook", "DiscordEmbed"]
from .webhook import RedWebhook, DiscordEmbed
| 29
| 45
| 0.781609
| 8
| 87
| 8
| 0.75
| 0.6875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103448
| 87
| 3
| 45
| 29
| 0.820513
| 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
| 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
|
da9350f7f64aa8ab7d9c325c55e4e0a22f8183dc
| 175
|
py
|
Python
|
examples/say_hello_example.py
|
mkmenta/python-package-example
|
0750edee573858431c74286a7e8cbd1543c0c1a7
|
[
"MIT"
] | 1
|
2021-06-04T14:17:12.000Z
|
2021-06-04T14:17:12.000Z
|
examples/say_hello_example.py
|
mkmenta/python-package-example
|
0750edee573858431c74286a7e8cbd1543c0c1a7
|
[
"MIT"
] | 6
|
2020-08-30T21:04:17.000Z
|
2021-02-28T00:52:36.000Z
|
examples/say_hello_example.py
|
mkmenta/python-package-example
|
0750edee573858431c74286a7e8cbd1543c0c1a7
|
[
"MIT"
] | null | null | null |
from helloworld import say_hello
# Generate "Hello world!"
greeting = say_hello()
print(greeting)
# Generate "Hello mkmenta!"
greeting = say_hello("mkmenta")
print(greeting)
| 19.444444
| 32
| 0.765714
| 22
| 175
| 5.954545
| 0.454545
| 0.183206
| 0.244275
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12
| 175
| 9
| 33
| 19.444444
| 0.850649
| 0.28
| 0
| 0.4
| 1
| 0
| 0.056452
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.2
| 0.4
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e50493aeef6bcb889fe0889ecae04000bfc9608c
| 2,995
|
py
|
Python
|
stockmarket/stockmovements/migrations/0003_auto_20190423_1331.py
|
prabhat-123/Nepalese_stock_data_scrapping
|
c557b0fca09d8e278b5d380494436d8b207d2602
|
[
"MIT"
] | 2
|
2020-04-29T06:03:11.000Z
|
2020-07-23T05:17:41.000Z
|
stockmarket/stockmovements/migrations/0003_auto_20190423_1331.py
|
prabhat-123/Nepalese_stock_data_scrapping
|
c557b0fca09d8e278b5d380494436d8b207d2602
|
[
"MIT"
] | 7
|
2020-07-20T12:27:57.000Z
|
2021-09-22T18:56:42.000Z
|
stockmarket/stockmovements/migrations/0003_auto_20190423_1331.py
|
prabhat-123/Nepalese_stock_data_scrapping
|
c557b0fca09d8e278b5d380494436d8b207d2602
|
[
"MIT"
] | null | null | null |
# Generated by Django 2.2 on 2019-04-23 07:46
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('stockmovements', '0002_auto_20190423_0049'),
]
operations = [
migrations.RemoveField(
model_name='stockhead',
name='amount',
),
migrations.RemoveField(
model_name='stockhead',
name='closingprice',
),
migrations.RemoveField(
model_name='stockhead',
name='company',
),
migrations.RemoveField(
model_name='stockhead',
name='diff',
),
migrations.RemoveField(
model_name='stockhead',
name='index',
),
migrations.RemoveField(
model_name='stockhead',
name='maxprice',
),
migrations.RemoveField(
model_name='stockhead',
name='minprice',
),
migrations.RemoveField(
model_name='stockhead',
name='prevclosing',
),
migrations.RemoveField(
model_name='stockhead',
name='tradedshares',
),
migrations.RemoveField(
model_name='stockhead',
name='transactions',
),
migrations.AddField(
model_name='stockhead',
name='ClosingPrice',
field=models.FloatField(default=1, max_length=10),
),
migrations.AddField(
model_name='stockhead',
name='DiffRs',
field=models.FloatField(default=1, max_length=6),
),
migrations.AddField(
model_name='stockhead',
name='MaxPrice',
field=models.FloatField(default=1, max_length=15),
),
migrations.AddField(
model_name='stockhead',
name='MinPrice',
field=models.FloatField(default=1, max_length=15),
),
migrations.AddField(
model_name='stockhead',
name='NoOfTransactions',
field=models.IntegerField(default=1),
),
migrations.AddField(
model_name='stockhead',
name='PrevClosing',
field=models.FloatField(default=1, max_length=10),
),
migrations.AddField(
model_name='stockhead',
name='SNo',
field=models.IntegerField(db_column='S.No.', default=1),
),
migrations.AddField(
model_name='stockhead',
name='TradedAmount',
field=models.IntegerField(default=1),
),
migrations.AddField(
model_name='stockhead',
name='TradedCompanies',
field=models.CharField(default='Abc', max_length=60),
),
migrations.AddField(
model_name='stockhead',
name='TradedShares',
field=models.IntegerField(default=1),
),
]
| 28.798077
| 68
| 0.527212
| 240
| 2,995
| 6.454167
| 0.25
| 0.116204
| 0.232408
| 0.284054
| 0.794706
| 0.708844
| 0.353777
| 0.329245
| 0.298257
| 0.298257
| 0
| 0.025988
| 0.357596
| 2,995
| 103
| 69
| 29.07767
| 0.779106
| 0.014357
| 0
| 0.690722
| 1
| 0
| 0.14
| 0.007797
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.010309
| 0
| 0.041237
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e50e38d85e49e017fe258955953a2cdcd00ad2ea
| 184
|
py
|
Python
|
tests/list_unknown_actions.py
|
ocefpaf/trailscraper
|
1db91df5738f19d022760eda08ef310c73090b57
|
[
"Apache-2.0"
] | 497
|
2018-01-08T15:36:05.000Z
|
2022-03-30T14:11:54.000Z
|
tests/list_unknown_actions.py
|
ocefpaf/trailscraper
|
1db91df5738f19d022760eda08ef310c73090b57
|
[
"Apache-2.0"
] | 97
|
2017-11-26T13:52:20.000Z
|
2022-02-07T01:36:10.000Z
|
tests/list_unknown_actions.py
|
ocefpaf/trailscraper
|
1db91df5738f19d022760eda08ef310c73090b57
|
[
"Apache-2.0"
] | 26
|
2019-04-04T21:37:29.000Z
|
2022-02-18T10:23:07.000Z
|
#!/usr/bin/env python
from tests.cloudtrail.map_to_iam_sanity_test import unknown_actions
if __name__ == "__main__":
for action in sorted(unknown_actions()):
print action
| 26.285714
| 67
| 0.75
| 26
| 184
| 4.769231
| 0.884615
| 0.225806
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157609
| 184
| 6
| 68
| 30.666667
| 0.8
| 0.108696
| 0
| 0
| 0
| 0
| 0.04908
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.25
| null | null | 0.25
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e52339d491c7b745127b525226ccdb015566c4bb
| 187
|
py
|
Python
|
clients/urls.py
|
Boring-Mind/bank-transactions
|
e537114c0dd1402c9beb579d78c31519cb6da64b
|
[
"MIT"
] | null | null | null |
clients/urls.py
|
Boring-Mind/bank-transactions
|
e537114c0dd1402c9beb579d78c31519cb6da64b
|
[
"MIT"
] | 3
|
2021-06-04T23:47:36.000Z
|
2021-09-22T19:30:21.000Z
|
clients/urls.py
|
Boring-Mind/bank-transactions
|
e537114c0dd1402c9beb579d78c31519cb6da64b
|
[
"MIT"
] | null | null | null |
from django.urls import path
from .views import *
urlpatterns = [
path('', ClientCreateView.as_view(), name="user"),
path('<int:pk>', ClientIdView.as_view(), name="user_id"),
]
| 20.777778
| 61
| 0.663102
| 24
| 187
| 5.041667
| 0.666667
| 0.099174
| 0.165289
| 0.231405
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.149733
| 187
| 8
| 62
| 23.375
| 0.761006
| 0
| 0
| 0
| 0
| 0
| 0.101604
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
e536bc5fc5cf22b5e8132ffc6a54cb7f28ffed6d
| 555
|
py
|
Python
|
tokopedia/response.py
|
hexatester/tokopedia
|
20e46c3ec2c70de6b24460634b7c185ffdb15691
|
[
"MIT"
] | 5
|
2021-07-01T05:09:20.000Z
|
2022-03-06T10:53:07.000Z
|
tokopedia/response.py
|
hexatester/tokopedia
|
20e46c3ec2c70de6b24460634b7c185ffdb15691
|
[
"MIT"
] | null | null | null |
tokopedia/response.py
|
hexatester/tokopedia
|
20e46c3ec2c70de6b24460634b7c185ffdb15691
|
[
"MIT"
] | 1
|
2022-02-14T01:20:34.000Z
|
2022-02-14T01:20:34.000Z
|
import attr
from typing import List, Optional, Union
@attr.dataclass(slots=True)
class BaseResponseHeader:
process_time: float
messages: str
class ResponseHeader(BaseResponseHeader):
pass
@attr.dataclass(slots=True)
class ErrorResponseHeader(BaseResponseHeader):
reason: str
error_code: str
@attr.dataclass(slots=True)
class TokopediaResponse:
header: Union[ResponseHeader, ErrorResponseHeader, None]
@attr.dataclass(slots=True)
class TokopediaResponseV2:
status: Optional[str]
error_message: Optional[List[str]]
| 18.5
| 60
| 0.767568
| 60
| 555
| 7.05
| 0.483333
| 0.122931
| 0.170213
| 0.208038
| 0.255319
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00211
| 0.145946
| 555
| 29
| 61
| 19.137931
| 0.890295
| 0
| 0
| 0.210526
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.052632
| 0.105263
| 0
| 0.736842
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
e584103fa7fa48bf246b0defabbeae7693901f00
| 8,156
|
py
|
Python
|
benchmark.py
|
RolandGao/RegSeg
|
40f8c0bab7048eb5bb8bba6c76393275e61f7050
|
[
"MIT"
] | 44
|
2021-11-23T08:03:28.000Z
|
2022-03-25T04:11:00.000Z
|
benchmark.py
|
RolandGao/RegSeg
|
40f8c0bab7048eb5bb8bba6c76393275e61f7050
|
[
"MIT"
] | 10
|
2021-11-29T05:37:01.000Z
|
2022-03-19T08:58:21.000Z
|
benchmark.py
|
RolandGao/RegSeg
|
40f8c0bab7048eb5bb8bba6c76393275e61f7050
|
[
"MIT"
] | 8
|
2021-11-23T11:49:09.000Z
|
2022-03-17T10:04:42.000Z
|
# adapted from https://github.com/facebookresearch/pycls/blob/f8cd962737e33ce9e19b3083a33551da95c2d9c0/pycls/core/benchmark.py
import torch
import time
import torch.cuda.amp as amp
import torch.nn.functional
import torch.nn as nn
@torch.no_grad()
def compute_eval_time(model,device,warmup_iter,num_iter,val_input_size,mixed_precision):
model.eval()
if isinstance(val_input_size,int):
h,w=val_input_size,val_input_size*2
else:
h,w=val_input_size
x=torch.randn(1,3,h,w).to(device)
times=[]
for cur_iter in range(warmup_iter+num_iter):
if cur_iter == warmup_iter:
times.clear()
t1=time.time()
with amp.autocast(enabled=mixed_precision):
output = model(x)
torch.cuda.synchronize()
t2=time.time()
times.append(t2-t1)
return average(times)
@torch.no_grad()
def compute_eval_time2(model,x,warmup_iter,num_iter,mixed_precision):
model.eval()
times=[]
for cur_iter in range(warmup_iter+num_iter):
if cur_iter == warmup_iter:
times.clear()
t1=time.time()
with amp.autocast(enabled=mixed_precision):
output = model(x)
torch.cuda.synchronize()
t2=time.time()
times.append(t2-t1)
return average(times)
def compute_train_time2(model,x,target,warmup_iter,num_iter,mixed_precision):
model.train()
times=[]
for cur_iter in range(warmup_iter+num_iter):
if cur_iter == warmup_iter:
times.clear()
t1=time.time()
with amp.autocast(enabled=mixed_precision):
output = model(x,target)
torch.cuda.synchronize()
t2=time.time()
times.append(t2-t1)
return average(times)
def average(v):
return sum(v)/len(v)
def compute_train_time(model,warmup_iter,num_iter,train_crop_size,batch_size,num_classes,mixed_precision, loss_fun):
model.train()
if isinstance(train_crop_size,int):
crop_h,crop_w=train_crop_size,train_crop_size
else:
crop_h,crop_w=train_crop_size
x=torch.randn(batch_size, 3, crop_h,crop_w).cuda(non_blocking=False)
target=torch.randint(0,num_classes,(batch_size, crop_h,crop_w)).cuda(non_blocking=False)
fw_times=[]
bw_times=[]
scaler = amp.GradScaler(enabled=mixed_precision)
for cur_iter in range(warmup_iter+num_iter):
if cur_iter == warmup_iter:
fw_times.clear()
bw_times.clear()
t1=time.time()
with amp.autocast(enabled=mixed_precision):
output = model(x)
loss = loss_fun(output,target)
torch.cuda.synchronize()
t2=time.time()
scaler.scale(loss).backward()
torch.cuda.synchronize()
t3=time.time()
fw_times.append(t2-t1)
bw_times.append(t3-t2)
return average(fw_times),average(bw_times)
def compute_loader_time(data_loader,warmup_iter,num_iter):
times=[]
data_loader_iter=iter(data_loader)
for cur_iter in range(min(warmup_iter+num_iter,len(data_loader))):
if cur_iter == warmup_iter:
times.clear()
t1=time.time()
next(data_loader_iter)
t2=time.time()
times.append(t2-t1)
return average(times)
def memory_used(device):
x=torch.cuda.memory_allocated(device)
return round(x/1024/1024)
def max_memory_used(device):
x=torch.cuda.max_memory_allocated(device)
return round(x/1024/1024)
def memory_test_helper(model,device,train_crop_size,batch_size,num_classes,mixed_precision,loss_fun):
if isinstance(train_crop_size,int):
crop_h,crop_w=train_crop_size,train_crop_size
else:
crop_h,crop_w=train_crop_size
model.train()
torch.cuda.empty_cache()
torch.cuda.reset_peak_memory_stats(device)
scaler = amp.GradScaler(enabled=mixed_precision)
x=torch.randn(batch_size, 3, crop_h,crop_w).to(device)
target=torch.randint(0,num_classes,(batch_size,crop_h,crop_w)).to(device)
t1=memory_used(device)
with amp.autocast(enabled=mixed_precision):
output = model(x)
loss = loss_fun(output,target)
scaler.scale(loss).backward()
torch.cuda.synchronize()
t2=max_memory_used(device)
return t2-t1
def compute_memory_usage(model,device,crop_size,batch_size,num_classes,mixed_precision, loss_fun):
for p in model.parameters():
p.grad=None
try:
t=memory_test_helper(model,device,crop_size,batch_size,num_classes,mixed_precision,loss_fun)
t=memory_test_helper(model,device,crop_size,batch_size,num_classes,mixed_precision,loss_fun)
except:
t=-1
print("out of memory")
for p in model.parameters():
p.grad=None
return t
def compute_time_no_loader(model,warmup_iter,num_iter,device,crop_size,val_input_size,batch_size,num_classes,mixed_precision,loss_fun):
model=model.to(device)
print("benchmarking eval time")
eval_time=compute_eval_time(model,device,warmup_iter,num_iter,val_input_size,mixed_precision)
print("benchmarking train time")
train_fw_time,train_bw_time=compute_train_time(model,warmup_iter,num_iter,crop_size,batch_size,num_classes,mixed_precision,loss_fun)
train_time=train_fw_time+train_bw_time
print("benchmarking memory usage")
memory_usage=compute_memory_usage(model,device,crop_size,batch_size,num_classes,mixed_precision,loss_fun)
dic1={
"eval_time":eval_time,
"train_time":train_time,
"memory_usage":memory_usage
}
return dic1
def compute_time_full(model,data_loader,warmup_iter,num_iter,device,crop_size,val_input_size,batch_size,num_classes,mixed_precision,loss_fun):
model=model.to(device)
print("benchmarking eval time")
eval_time=compute_eval_time(model,device,warmup_iter,num_iter,val_input_size,mixed_precision)
print("benchmarking train time")
train_fw_time,train_bw_time=compute_train_time(model,warmup_iter,num_iter,crop_size,batch_size,num_classes,mixed_precision,loss_fun)
train_time=train_fw_time+train_bw_time
print("benchmarking memory usage")
memory_usage=compute_memory_usage(model,device,crop_size,batch_size,num_classes,mixed_precision,loss_fun)
print("benchmarking loader time")
loader_time=compute_loader_time(data_loader,warmup_iter,num_iter)
loader_overhead=max(0,loader_time-train_time)/train_time
dic1={
"eval_time":eval_time,
"train_time":train_time,
"memory_usage":memory_usage,
"loader_time":loader_time,
"loader_overhead":loader_overhead
}
dic2={
"eval_time":eval_time*len(data_loader),
"train_time":train_time*len(data_loader),
"memory_usage":memory_usage,
"loader_time":loader_time,
"loader_overhead":loader_overhead
}
return dic1
def benchmark_eval(models,x,mixed_precision):
torch.backends.cudnn.benchmark=True
device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
x=x.to(device)
ts=[]
for model in models:
model=model.to(device)
t=compute_eval_time2(model,x,10,100,mixed_precision)
model.cpu()
print(t)
ts.append(t)
return ts
def benchmark_train(models,batch_size,crop_size,mixed_precision,num_classes=19):
torch.backends.cudnn.benchmark=True
device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
loss_fun=nn.CrossEntropyLoss(weight=None,ignore_index=255)
ts=[]
for model in models:
model=model.to(device)
fw,bw=compute_train_time(model,1,3,crop_size,batch_size,num_classes,mixed_precision,loss_fun)
model.cpu()
print(fw+bw)
ts.append(fw+bw)
return ts
def benchmark_memory(models,batch_size,crop_size,mixed_precision,num_classes=19):
torch.backends.cudnn.benchmark=True
device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
loss_fun=nn.CrossEntropyLoss(ignore_index=255)
for model in models:
model=model.to(device)
memory_usage=compute_memory_usage(model,device,crop_size,batch_size,num_classes,mixed_precision,loss_fun)
print(memory_usage)
| 37.242009
| 142
| 0.71101
| 1,186
| 8,156
| 4.602867
| 0.112985
| 0.074373
| 0.040484
| 0.05294
| 0.796117
| 0.771936
| 0.735849
| 0.700311
| 0.668804
| 0.623374
| 0
| 0.015408
| 0.180358
| 8,156
| 218
| 143
| 37.412844
| 0.801197
| 0.015204
| 0
| 0.638614
| 0
| 0
| 0.042715
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.074257
| false
| 0
| 0.024752
| 0.00495
| 0.168317
| 0.054455
| 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
|
e5c2561c73908b063a9675c80a4c7c44c9cd907e
| 225
|
py
|
Python
|
home/kwatters/harry/gestures/fighter.py
|
rv8flyboy/pyrobotlab
|
4e04fb751614a5cb6044ea15dcfcf885db8be65a
|
[
"Apache-2.0"
] | 63
|
2015-02-03T18:49:43.000Z
|
2022-03-29T03:52:24.000Z
|
home/kwatters/harry/gestures/fighter.py
|
hirwaHenryChristian/pyrobotlab
|
2debb381fc2db4be1e7ea6e5252a50ae0de6f4a9
|
[
"Apache-2.0"
] | 16
|
2016-01-26T19:13:29.000Z
|
2018-11-25T21:20:51.000Z
|
home/kwatters/harry/gestures/fighter.py
|
hirwaHenryChristian/pyrobotlab
|
2debb381fc2db4be1e7ea6e5252a50ae0de6f4a9
|
[
"Apache-2.0"
] | 151
|
2015-01-03T18:55:54.000Z
|
2022-03-04T07:04:23.000Z
|
def fighter():
i01.moveHead(160,87)
i01.moveArm("left",31,75,152,10)
i01.moveArm("right",3,94,33,16)
i01.moveHand("left",161,151,133,127,107,83)
i01.moveHand("right",99,130,152,154,145,180)
i01.moveTorso(90,90,90)
| 32.142857
| 46
| 0.684444
| 43
| 225
| 3.581395
| 0.72093
| 0.12987
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.354369
| 0.084444
| 225
| 7
| 47
| 32.142857
| 0.393204
| 0
| 0
| 0
| 0
| 0
| 0.079646
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| true
| 0
| 0
| 0
| 0.142857
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e5e3700da6de7f95c812f14d10fc60c9d8ffa64a
| 285
|
py
|
Python
|
restgis/geoapi/models.py
|
davidkwast/geodjango-postgis-drf
|
13926cd9f0daa63eb1e1f4510c733894f1772969
|
[
"MIT"
] | null | null | null |
restgis/geoapi/models.py
|
davidkwast/geodjango-postgis-drf
|
13926cd9f0daa63eb1e1f4510c733894f1772969
|
[
"MIT"
] | null | null | null |
restgis/geoapi/models.py
|
davidkwast/geodjango-postgis-drf
|
13926cd9f0daa63eb1e1f4510c733894f1772969
|
[
"MIT"
] | null | null | null |
from django.contrib.gis.db import models
class Point(models.Model):
name = models.CharField(max_length=100, unique=True)
geometry = models.PointField()
class Polygon(models.Model):
name = models.CharField(max_length=100, unique=True)
geometry = models.PolygonField()
| 28.5
| 56
| 0.74386
| 37
| 285
| 5.675676
| 0.567568
| 0.104762
| 0.142857
| 0.2
| 0.628571
| 0.628571
| 0.628571
| 0.628571
| 0.628571
| 0.628571
| 0
| 0.02449
| 0.140351
| 285
| 9
| 57
| 31.666667
| 0.832653
| 0
| 0
| 0.285714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.142857
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
006d0fe400681d266a24d9f5353e8b0e6cc9c7b9
| 69
|
py
|
Python
|
__main__.py
|
NonSvizzero/CAGED-finder
|
b52120ff6a08afd1efe70883f8ac2af4f1d46a04
|
[
"MIT"
] | 2
|
2019-09-26T20:15:22.000Z
|
2020-08-30T14:42:26.000Z
|
__main__.py
|
noplus/licksterr
|
b52120ff6a08afd1efe70883f8ac2af4f1d46a04
|
[
"MIT"
] | 21
|
2018-10-21T12:39:46.000Z
|
2019-02-23T17:21:16.000Z
|
__main__.py
|
NonSvizzero/CAGED-finder
|
b52120ff6a08afd1efe70883f8ac2af4f1d46a04
|
[
"MIT"
] | null | null | null |
from licksterr import run
if __name__ == '__main__':
run.main()
| 13.8
| 26
| 0.681159
| 9
| 69
| 4.333333
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.202899
| 69
| 4
| 27
| 17.25
| 0.709091
| 0
| 0
| 0
| 0
| 0
| 0.115942
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 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
|
008640ac7147d425185983ed9ef1fa922cd1c437
| 959
|
py
|
Python
|
Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/__init__.py
|
osoco/better-ways-of-thinking-about-software
|
83e70d23c873509e22362a09a10d3510e10f6992
|
[
"MIT"
] | 3
|
2021-12-15T04:58:18.000Z
|
2022-02-06T12:15:37.000Z
|
Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/__init__.py
|
osoco/better-ways-of-thinking-about-software
|
83e70d23c873509e22362a09a10d3510e10f6992
|
[
"MIT"
] | null | null | null |
Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/__init__.py
|
osoco/better-ways-of-thinking-about-software
|
83e70d23c873509e22362a09a10d3510e10f6992
|
[
"MIT"
] | 1
|
2019-01-02T14:38:50.000Z
|
2019-01-02T14:38:50.000Z
|
"""
Celery needs to be loaded when the cms modules are so that task
registration and discovery can work correctly.
"""
# We monkey patch Kombu's entrypoints listing because scanning through this
# accounts for the majority of LMS/Studio startup time for tests, and we don't
# use custom Kombu serializers (which is what this is for). Still, this is
# pretty evil, and should be taken out when we update Celery to the next version
# where it looks like this method of custom serialization has been removed.
#
# FWIW, this is identical behavior to what happens in Kombu if pkg_resources
# isn't available.
import kombu.utils
kombu.utils.entrypoints = lambda namespace: iter([])
# This will make sure the app is always imported when Django starts so
# that shared_task will use this app, and also ensures that the celery
# singleton is always configured for the LMS.
from .celery import APP as CELERY_APP # lint-amnesty, pylint: disable=wrong-import-position
| 45.666667
| 92
| 0.779979
| 157
| 959
| 4.745223
| 0.643312
| 0.024161
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.167883
| 959
| 20
| 93
| 47.95
| 0.933584
| 0.848801
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
0086833262519a23db1ca5ec0e74c8172b439585
| 50
|
py
|
Python
|
iati/using_data/migrations/__init__.py
|
andylolz/IATI-Standard-Website
|
b781b9fe6b6430f93826e530e9560183bf8fd310
|
[
"MIT"
] | 4
|
2019-03-28T06:42:17.000Z
|
2021-06-06T13:10:51.000Z
|
iati/using_data/migrations/__init__.py
|
andylolz/IATI-Standard-Website
|
b781b9fe6b6430f93826e530e9560183bf8fd310
|
[
"MIT"
] | 177
|
2018-09-28T14:21:56.000Z
|
2022-03-30T21:45:26.000Z
|
iati/using_data/migrations/__init__.py
|
andylolz/IATI-Standard-Website
|
b781b9fe6b6430f93826e530e9560183bf8fd310
|
[
"MIT"
] | 8
|
2018-10-25T20:43:10.000Z
|
2022-03-17T14:19:27.000Z
|
"""Database migrations for the using_data app."""
| 25
| 49
| 0.74
| 7
| 50
| 5.142857
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12
| 50
| 1
| 50
| 50
| 0.818182
| 0.86
| 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
|
00e2b7473a641c99d1b3035612ed5a5fffc9bd96
| 874
|
py
|
Python
|
scicademy/captcha/test.py
|
RegaledSeer/netsecnoobie
|
d3366937ec8c67a9742f61e47698239ae693af49
|
[
"MIT"
] | null | null | null |
scicademy/captcha/test.py
|
RegaledSeer/netsecnoobie
|
d3366937ec8c67a9742f61e47698239ae693af49
|
[
"MIT"
] | null | null | null |
scicademy/captcha/test.py
|
RegaledSeer/netsecnoobie
|
d3366937ec8c67a9742f61e47698239ae693af49
|
[
"MIT"
] | null | null | null |
import requests
import json
web = "http://www.scicademy.org/addUser"
myData = {"fnm":"firstName","lnm":"lastName","grd":"12","shl":"school","eml":"fuckme@fuck.com","pwd":"password1","dte":"08/14/2017","isSum":False,"referrer":"aram"}
myHeaders = { "Host": "www.scicademy.org", "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0", "Accept": "application/json, text/javascript, */*; q=0.01", "Accept-Language": "en-US,en;q=0.5", "Content-Type": "application/json", "X-Requested-With": "XMLHttpRequest", "Referer": "http://www.scicademy.org/","Content-Length": "156", "Cookie": "_ga=GA1.2.804063011.1502758976; _gid=GA1.2.987408565.1502758976; _gat=1", "Connection": "close"}
#r = requests.post(web,data=json.dumps(myData))
#r = requests.post(web,data=json.dumps(myData),headers=myHeaders)
print(len(str(myData).replace(" ","")) + 1)
| 79.454545
| 479
| 0.685355
| 127
| 874
| 4.685039
| 0.692913
| 0.060504
| 0.07563
| 0.063866
| 0.117647
| 0.117647
| 0.117647
| 0.117647
| 0
| 0
| 0
| 0.103912
| 0.064073
| 874
| 10
| 480
| 87.4
| 0.623472
| 0.125858
| 0
| 0
| 0
| 0.333333
| 0.678478
| 0.082677
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.166667
| 0.333333
| 0
| 0.333333
| 0.166667
| 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
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
00f09a87a72517706764b07a717342bb46a2bad7
| 83
|
py
|
Python
|
gsrest/test/assertion.py
|
havardhuns/graphsense-REST
|
e2b2c851fc6fd7bba06de66a7abdb82cb76ad1d0
|
[
"MIT"
] | 14
|
2017-11-25T18:27:14.000Z
|
2022-02-22T09:42:09.000Z
|
gsrest/test/assertion.py
|
havardhuns/graphsense-REST
|
e2b2c851fc6fd7bba06de66a7abdb82cb76ad1d0
|
[
"MIT"
] | 64
|
2019-03-29T08:15:05.000Z
|
2022-02-24T10:28:34.000Z
|
gsrest/test/assertion.py
|
havardhuns/graphsense-REST
|
e2b2c851fc6fd7bba06de66a7abdb82cb76ad1d0
|
[
"MIT"
] | 12
|
2018-10-20T22:29:29.000Z
|
2022-02-16T10:12:30.000Z
|
def assertEqual(a, b):
assert a == b, "\nexpected:\n{}\ngot:\n{}".format(a, b)
| 27.666667
| 59
| 0.566265
| 14
| 83
| 3.357143
| 0.642857
| 0.12766
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.156627
| 83
| 2
| 60
| 41.5
| 0.671429
| 0
| 0
| 0
| 0
| 0
| 0.301205
| 0.301205
| 0
| 0
| 0
| 0
| 1
| 1
| 0.5
| false
| 0
| 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
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
daae8c58162561aef0c459739d7d5eaef41d157f
| 509
|
py
|
Python
|
logpy/__init__.py
|
SebastiaanBij/log.py
|
8d6c3ddcb9a2907bdaeed4869cb5b8e5d6e96252
|
[
"MIT"
] | null | null | null |
logpy/__init__.py
|
SebastiaanBij/log.py
|
8d6c3ddcb9a2907bdaeed4869cb5b8e5d6e96252
|
[
"MIT"
] | 2
|
2022-01-19T14:50:53.000Z
|
2022-01-19T14:50:57.000Z
|
logpy/__init__.py
|
SebastiaanBij/log.py
|
8d6c3ddcb9a2907bdaeed4869cb5b8e5d6e96252
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
# ||Documentation||
########################################################################################################################
"""
A basic logging library for Python with the capability to:
- save to files.
- have custom formats.
- have custom levels.
- be used instantiated.
- be used non-instantiated.
"""
# ||Imports||
########################################################################################################################
from .logger import Logger
| 29.941176
| 120
| 0.371316
| 36
| 509
| 5.25
| 0.805556
| 0.10582
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00216
| 0.090373
| 509
| 16
| 121
| 31.8125
| 0.406048
| 0.440079
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
dac54f1baf2e63a8c08eab3e2b1e4affb598b880
| 77
|
py
|
Python
|
stanford_parser/__init__.py
|
asuiu/pyNLP
|
6438e47dbf8af1501d1fed1026897e7057e88850
|
[
"MIT"
] | 2
|
2019-01-11T09:53:25.000Z
|
2021-12-04T23:45:20.000Z
|
stanford_parser/__init__.py
|
asuiu/pyNLP
|
6438e47dbf8af1501d1fed1026897e7057e88850
|
[
"MIT"
] | null | null | null |
stanford_parser/__init__.py
|
asuiu/pyNLP
|
6438e47dbf8af1501d1fed1026897e7057e88850
|
[
"MIT"
] | 1
|
2017-05-04T14:15:49.000Z
|
2017-05-04T14:15:49.000Z
|
#!/usr/bin/env python
# coding:utf-8
# Author: ASU --<andrei.suiu@gmail.com>
| 19.25
| 39
| 0.675325
| 13
| 77
| 4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014493
| 0.103896
| 77
| 3
| 40
| 25.666667
| 0.73913
| 0.922078
| 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
|
dad2ff1259f21533e48fb3997143c509d3217835
| 133
|
py
|
Python
|
home-assistant/custom_components/ai_thermostat/__init__.py
|
denysdovhan/smart-home
|
2f9e6f11d889acc461dcdb9ab723445d63e53da3
|
[
"MIT"
] | 128
|
2021-03-04T21:54:04.000Z
|
2022-03-17T22:53:20.000Z
|
home-assistant/custom_components/ai_thermostat/__init__.py
|
denysdovhan/home-assistant-config
|
2f9e6f11d889acc461dcdb9ab723445d63e53da3
|
[
"MIT"
] | 4
|
2021-03-07T21:18:12.000Z
|
2021-09-24T13:09:39.000Z
|
home-assistant/custom_components/ai_thermostat/__init__.py
|
denysdovhan/smart-home
|
2f9e6f11d889acc461dcdb9ab723445d63e53da3
|
[
"MIT"
] | 15
|
2021-03-05T07:29:31.000Z
|
2022-03-31T10:07:06.000Z
|
"""The ai_thermostat component."""
from homeassistant.const import Platform
DOMAIN = "ai_thermostat"
PLATFORMS = [Platform.CLIMATE]
| 22.166667
| 40
| 0.781955
| 15
| 133
| 6.8
| 0.8
| 0.235294
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 133
| 5
| 41
| 26.6
| 0.857143
| 0.210526
| 0
| 0
| 0
| 0
| 0.131313
| 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
|
daddfc6d24d4d6dc75a051ec30651be88e5a49b8
| 77
|
py
|
Python
|
src/tools/libraryInfo/libraryImageOnLoad.py
|
t3kt/raytk
|
e0e2b3643b2f536d597c5db64f02d17f7e8f23ac
|
[
"CC-BY-4.0"
] | 108
|
2020-11-23T01:22:37.000Z
|
2022-03-29T09:27:32.000Z
|
src/tools/libraryInfo/libraryImageOnLoad.py
|
t3kt/raytk
|
e0e2b3643b2f536d597c5db64f02d17f7e8f23ac
|
[
"CC-BY-4.0"
] | 794
|
2020-11-21T22:27:37.000Z
|
2022-03-24T06:41:19.000Z
|
src/tools/libraryInfo/libraryImageOnLoad.py
|
t3kt/raytk
|
e0e2b3643b2f536d597c5db64f02d17f7e8f23ac
|
[
"CC-BY-4.0"
] | 3
|
2021-06-19T00:57:54.000Z
|
2021-11-01T11:55:07.000Z
|
def onStart():
parent().par.Showshortcut = True
def onCreate():
onStart()
| 12.833333
| 33
| 0.688312
| 9
| 77
| 5.888889
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 77
| 5
| 34
| 15.4
| 0.80303
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| true
| 0
| 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
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
daee89837477b55a6b8257d6304e2aa61bd1d269
| 289
|
py
|
Python
|
lib/celcius/unix/operations/pipe.py
|
claymcleod/celcius
|
e46a3c1ba112af9de23360d1455ab1e037a38ea1
|
[
"MIT"
] | 4
|
2016-01-15T22:34:24.000Z
|
2016-06-02T06:38:47.000Z
|
lib/celcius/unix/operations/pipe.py
|
claymcleod/celcius
|
e46a3c1ba112af9de23360d1455ab1e037a38ea1
|
[
"MIT"
] | null | null | null |
lib/celcius/unix/operations/pipe.py
|
claymcleod/celcius
|
e46a3c1ba112af9de23360d1455ab1e037a38ea1
|
[
"MIT"
] | null | null | null |
def pipe_commands(commands):
"""Pipe commands together"""
return ' | '.join(commands)
def build_and_pipe_commands(commands):
"""Command to build then pipe commands together"""
built_commands = [x.build_command() for x in commands]
return pipe_commands(built_commands)
| 32.111111
| 58
| 0.723183
| 37
| 289
| 5.432432
| 0.405405
| 0.298507
| 0.199005
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16609
| 289
| 8
| 59
| 36.125
| 0.834025
| 0.231834
| 0
| 0
| 0
| 0
| 0.014218
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0
| 0
| 0.8
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
973931590d4036d28684f42848b9f7ad622aecaf
| 340
|
py
|
Python
|
gym_wmgds/envs/box2d/__init__.py
|
ozcell/gym_wmgds_ma
|
c2cb22943913361947216b908d50decc46616e99
|
[
"Python-2.0",
"OLDAP-2.7"
] | 1
|
2020-12-23T16:38:15.000Z
|
2020-12-23T16:38:15.000Z
|
gym_wmgds/envs/box2d/__init__.py
|
ozcell/gym_wmgds_ma
|
c2cb22943913361947216b908d50decc46616e99
|
[
"Python-2.0",
"OLDAP-2.7"
] | null | null | null |
gym_wmgds/envs/box2d/__init__.py
|
ozcell/gym_wmgds_ma
|
c2cb22943913361947216b908d50decc46616e99
|
[
"Python-2.0",
"OLDAP-2.7"
] | null | null | null |
try:
import Box2D
from gym_wmgds.envs.box2d.lunar_lander import LunarLander
from gym_wmgds.envs.box2d.lunar_lander import LunarLanderContinuous
from gym_wmgds.envs.box2d.bipedal_walker import BipedalWalker, BipedalWalkerHardcore
from gym_wmgds.envs.box2d.car_racing import CarRacing
except ImportError:
Box2D = None
| 37.777778
| 88
| 0.808824
| 44
| 340
| 6.068182
| 0.477273
| 0.104869
| 0.179775
| 0.2397
| 0.441948
| 0.284644
| 0.284644
| 0.284644
| 0
| 0
| 0
| 0.020619
| 0.144118
| 340
| 8
| 89
| 42.5
| 0.896907
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 0
| 0.75
| 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
|
973a12594f87c7c2fb08900fa23f255beb8ada37
| 20,352
|
py
|
Python
|
python/vae_models.py
|
cdaube/sharedFunctionalFeatures
|
3b7e8b17973a7fef195626a34bed54517cfd3915
|
[
"MIT"
] | 1
|
2021-11-18T18:13:39.000Z
|
2021-11-18T18:13:39.000Z
|
python/vae_models.py
|
cdaube/sharedFunctionalFeatures
|
3b7e8b17973a7fef195626a34bed54517cfd3915
|
[
"MIT"
] | null | null | null |
python/vae_models.py
|
cdaube/sharedFunctionalFeatures
|
3b7e8b17973a7fef195626a34bed54517cfd3915
|
[
"MIT"
] | null | null | null |
'''
models.py
contains models for use with the BVAE experiments.
created by shadySource, ResNet10 encoder based on architecture by Tian Xu added by cdaube, decoder doesn't yet work
THE UNLICENSE
'''
import tensorflow as tf
from keras.layers import (Input, InputLayer, Conv2D, Conv2DTranspose,
BatchNormalization, LeakyReLU, MaxPool2D, UpSampling2D, Flatten,
Reshape, GlobalAveragePooling2D, AveragePooling2D, ZeroPadding2D, ReLU, Dense)
from keras.models import Model
from model_utils import ConvBnLRelu, ConvBnRelu, convBasicBlock, basicblock, convBottleneck, bottleneck
from sample_layer import SampleLayer
import keras
import numpy as np
class Architecture(object):
'''
generic architecture template
'''
def __init__(self, inputShape=None, batchSize=None, latentSize=None):
'''
params:
---------
inputShape : tuple
the shape of the input, expecting 3-dim images (h, w, 3)
batchSize : int
the number of samples in a batch
latentSize : int
the number of dimensions in the two output distribution vectors -
mean and std-deviation
latentSize : Bool or None
True forces resampling, False forces no resampling, None chooses based on K.learning_phase()
'''
self.inputShape = inputShape
self.batchSize = batchSize
self.latentSize = latentSize
self.model = self.Build()
def Build(self):
raise NotImplementedError('architecture must implement Build function')
class ResNet10DetEncoder(Architecture):
'''
deterministic encoder
Encoder adapted from Tian Xu by Christoph Daube
'''
def __init__(self, inputShape=(224, 224, 3), batchSize=None,
latentSize=512, training=None):
self.training = training
super().__init__(inputShape, batchSize, latentSize)
def Build(self):
imgInput = Input(self.inputShape, self.batchSize)
x = ZeroPadding2D(3)(imgInput)
x = Conv2D(64, 7, strides=(2, 2), name='conv1')(x)
x = BatchNormalization(name='bn_conv1')(x)
x = ReLU()(x)
x = MaxPool2D(3, strides=(2, 2))(x)
x = convBasicBlock(64, 3, stage=2, block='a', strides=(1, 1))(x)
x = convBasicBlock(128, 3, stage=3, block='a')(x)
x = convBasicBlock(256, 3, stage=4, block='a')(x)
x = convBasicBlock(512, 3, stage=5, block='a')(x)
x = AveragePooling2D((7, 7), name='avg_pool')(x)
x = Flatten()(x)
return Model(inputs=imgInput, outputs=x)
class ResNet10Encoder(Architecture):
'''
This encoder predicts distributions then randomly samples them.
Encoder adapted from Tian Xu by Christoph Daube
'''
def __init__(self, inputShape=(224, 224, 3), batchSize=None,
latentSize=512, latentConstraints='bvae', beta=100, training=None):
'''
params
-------
latentConstraints : str
Either 'bvae', 'vae', or 'no'
Determines whether regularization is applied
to the latent space representation.
beta : float
beta > 1, used for 'bvae' latent_regularizer
(Unused if 'bvae' not selected, default 100)
'''
self.latentConstraints = latentConstraints
self.beta = beta
self.training = training
super().__init__(inputShape, batchSize, latentSize)
def Build(self):
imgInput = Input(self.inputShape, self.batchSize)
x = ZeroPadding2D(3)(imgInput)
x = Conv2D(64, 7, strides=(2, 2), name='conv1')(x)
x = BatchNormalization(name='bn_conv1')(x)
x = ReLU()(x)
x = MaxPool2D(3, strides=(2, 2))(x)
x = convBasicBlock(64, 3, stage=2, block='a', strides=(1, 1))(x)
x = convBasicBlock(128, 3, stage=3, block='a')(x)
x = convBasicBlock(256, 3, stage=4, block='a')(x)
x = convBasicBlock(512, 3, stage=5, block='a')(x)
# variational encoder output (distributions)
mean = Conv2D(filters=self.latentSize, kernel_size=(1, 1),padding='same')(x)
mean = GlobalAveragePooling2D()(mean)
logvar = Conv2D(filters=self.latentSize, kernel_size=(1, 1),padding='same')(x)
logvar = GlobalAveragePooling2D()(logvar)
sample = SampleLayer(self.latentConstraints, self.beta)([mean, logvar], training=self.training)
return Model(inputs=imgInput, outputs=sample)
class ResNet34DetEncoder(Architecture):
'''
This encoder predicts distributions then randomly samples them.
Encoder adapted from Tian Xu by Christoph Daube
'''
def __init__(self, inputShape=(224, 224, 3), batchSize=None,
latentSize=512, training=None):
'''
params
-------
latentConstraints : str
Either 'bvae', 'vae', or 'no'
Determines whether regularization is applied
to the latent space representation.
beta : float
beta > 1, used for 'bvae' latent_regularizer
(Unused if 'bvae' not selected, default 100)
'''
self.training = training
super().__init__(inputShape, batchSize, latentSize)
def Build(self):
imgInput = Input(self.inputShape, self.batchSize)
x = ZeroPadding2D(3)(imgInput)
x = Conv2D(64, 7, strides=(2, 2), name='conv1')(x)
x = BatchNormalization(name='bn_conv1')(x)
x = ReLU()(x)
x = MaxPool2D(3, strides=(2, 2))(x)
x = convBasicBlock(64, 3, stage=2, block='a', strides=(1, 1))(x)
x = basicblock(64, 3, stage=2, block='b')(x)
x = basicblock(64, 3, stage=2, block='c')(x)
x = convBasicBlock(128, 3, stage=3, block='a')(x)
x = basicblock(128, 3, stage=3, block='b')(x)
x = basicblock(128, 3, stage=3, block='c')(x)
x = basicblock(128, 3, stage=3, block='d')(x)
x = convBasicBlock(256, 3, stage=4, block='a')(x)
x = basicblock(256, 3, stage=4, block='b')(x)
x = basicblock(256, 3, stage=4, block='c')(x)
x = basicblock(256, 3, stage=4, block='d')(x)
x = basicblock(256, 3, stage=4, block='e')(x)
x = basicblock(256, 3, stage=4, block='f')(x)
x = convBasicBlock(512, 3, stage=5, block='a')(x)
x = basicblock(512, 3, stage=5, block='b')(x)
x = basicblock(512, 3, stage=5, block='c')(x)
x = AveragePooling2D((7, 7), name='avg_pool')(x)
x = Flatten()(x)
return Model(inputs=imgInput, outputs=x)
class ResNet34Encoder(Architecture):
'''
This encoder predicts distributions then randomly samples them.
Encoder adapted from Tian Xu by Christoph Daube
'''
def __init__(self, inputShape=(224, 224, 3), batchSize=None,
latentSize=512, latentConstraints='bvae', beta=100, training=None):
'''
params
-------
latentConstraints : str
Either 'bvae', 'vae', or 'no'
Determines whether regularization is applied
to the latent space representation.
beta : float
beta > 1, used for 'bvae' latent_regularizer
(Unused if 'bvae' not selected, default 100)
'''
self.latentConstraints = latentConstraints
self.beta = beta
self.training = training
super().__init__(inputShape, batchSize, latentSize)
def Build(self):
imgInput = Input(self.inputShape, self.batchSize)
x = ZeroPadding2D(3)(imgInput)
x = Conv2D(64, 7, strides=(2, 2), name='conv1')(x)
x = BatchNormalization(name='bn_conv1')(x)
x = ReLU()(x)
x = MaxPool2D(3, strides=(2, 2))(x)
x = convBasicBlock(64, 3, stage=2, block='a', strides=(1, 1))(x)
x = basicblock(64, 3, stage=2, block='b')(x)
x = basicblock(64, 3, stage=2, block='c')(x)
x = convBasicBlock(128, 3, stage=3, block='a')(x)
x = basicblock(128, 3, stage=3, block='b')(x)
x = basicblock(128, 3, stage=3, block='c')(x)
x = basicblock(128, 3, stage=3, block='d')(x)
x = convBasicBlock(256, 3, stage=4, block='a')(x)
x = basicblock(256, 3, stage=4, block='b')(x)
x = basicblock(256, 3, stage=4, block='c')(x)
x = basicblock(256, 3, stage=4, block='d')(x)
x = basicblock(256, 3, stage=4, block='e')(x)
x = basicblock(256, 3, stage=4, block='f')(x)
x = convBasicBlock(512, 3, stage=5, block='a')(x)
x = basicblock(512, 3, stage=5, block='b')(x)
x = basicblock(512, 3, stage=5, block='c')(x)
# variational encoder output (distributions)
mean = Conv2D(filters=self.latentSize, kernel_size=(1, 1),padding='same')(x)
mean = GlobalAveragePooling2D()(mean)
logvar = Conv2D(filters=self.latentSize, kernel_size=(1, 1),padding='same')(x)
logvar = GlobalAveragePooling2D()(logvar)
sample = SampleLayer(self.latentConstraints, self.beta)([mean, logvar], training=self.training)
return Model(inputs=imgInput, outputs=sample)
class ResNet50Encoder(Architecture):
'''
This encoder predicts distributions then randomly samples them.
Encoder adapted from Tian Xu by Christoph Daube
'''
def __init__(self, inputShape=(224, 224, 3), batchSize=None,
latentSize=512, latentConstraints='bvae', beta=100, training=None):
'''
params
-------
latentConstraints : str
Either 'bvae', 'vae', or 'no'
Determines whether regularization is applied
to the latent space representation.
beta : float
beta > 1, used for 'bvae' latent_regularizer
(Unused if 'bvae' not selected, default 100)
'''
self.latentConstraints = latentConstraints
self.beta = beta
self.training = training
super().__init__(inputShape, batchSize, latentSize)
def Build(self):
imgInput = Input(self.inputShape, self.batchSize)
x = ZeroPadding2D(3)(imgInput)
x = Conv2D(64, 7, strides=(2, 2), name='conv1')(x)
x = BatchNormalization(name='bn_conv1')(x)
x = ReLU()(x)
x = MaxPool2D(3, strides=(2, 2))(x)
x = convBottleneck(64, 3, stage=2, block='a', strides=(1, 1))(x)
x = bottleneck(64, 3, stage=2, block='b')(x)
x = bottleneck(64, 3, stage=2, block='c')(x)
x = convBottleneck(128, 3, stage=3, block='a')(x)
x = bottleneck(128, 3, stage=3, block='b')(x)
x = bottleneck(128, 3, stage=3, block='c')(x)
x = bottleneck(128, 3, stage=3, block='d')(x)
x = convBottleneck(256, 3, stage=4, block='a')(x)
x = bottleneck(256, 3, stage=4, block='b')(x)
x = bottleneck(256, 3, stage=4, block='c')(x)
x = bottleneck(256, 3, stage=4, block='d')(x)
x = bottleneck(256, 3, stage=4, block='e')(x)
x = bottleneck(256, 3, stage=4, block='f')(x)
x = convBottleneck(512, 3, stage=5, block='a')(x)
x = bottleneck(512, 3, stage=5, block='b')(x)
x = bottleneck(512, 3, stage=5, block='c')(x)
# variational encoder output (distributions)
mean = Conv2D(filters=self.latentSize, kernel_size=(1, 1),padding='same')(x)
mean = GlobalAveragePooling2D()(mean)
logvar = Conv2D(filters=self.latentSize, kernel_size=(1, 1),padding='same')(x)
logvar = GlobalAveragePooling2D()(logvar)
sample = SampleLayer(self.latentConstraints, self.beta)([mean, logvar], training=self.training)
return Model(inputs=imgInput, outputs=sample)
class Darknet19Encoder(Architecture):
'''
This encoder predicts distributions then randomly samples them.
Regularization may be applied to the latent space output
a simple, fully convolutional architecture inspried by
pjreddie's darknet architecture
https://github.com/pjreddie/darknet/blob/master/cfg/darknet19.cfg
'''
def __init__(self, inputShape=(224, 224, 3), batchSize=None,
latentSize=1000, latentConstraints='bvae', beta=100., training=None):
'''
params
-------
latentConstraints : str
Either 'bvae', 'vae', or 'no'
Determines whether regularization is applied
to the latent space representation.
beta : float
beta > 1, used for 'bvae' latent_regularizer
(Unused if 'bvae' not selected, default 100)
'''
self.latentConstraints = latentConstraints
self.beta = beta
self.training = training
super().__init__(inputShape, batchSize, latentSize)
def Build(self):
# create the input layer for feeding the netowrk
inLayer = Input(self.inputShape, self.batchSize)
net = ConvBnLRelu(32, kernelSize=3)(inLayer, training=self.training) # 1
net = MaxPool2D((2, 2), strides=(2, 2))(net)
net = ConvBnLRelu(64, kernelSize=3)(net, training=self.training) # 2
net = MaxPool2D((2, 2), strides=(2, 2))(net)
net = ConvBnLRelu(128, kernelSize=3)(net, training=self.training) # 3
net = ConvBnLRelu(64, kernelSize=1)(net, training=self.training) # 4
net = ConvBnLRelu(128, kernelSize=3)(net, training=self.training) # 5
net = MaxPool2D((2, 2), strides=(2, 2))(net)
net = ConvBnLRelu(256, kernelSize=3)(net, training=self.training) # 6
net = ConvBnLRelu(128, kernelSize=1)(net, training=self.training) # 7
net = ConvBnLRelu(256, kernelSize=3)(net, training=self.training) # 8
net = MaxPool2D((2, 2), strides=(2, 2))(net)
net = ConvBnLRelu(512, kernelSize=3)(net, training=self.training) # 9
net = ConvBnLRelu(256, kernelSize=1)(net, training=self.training) # 10
net = ConvBnLRelu(512, kernelSize=3)(net, training=self.training) # 11
net = ConvBnLRelu(256, kernelSize=1)(net, training=self.training) # 12
net = ConvBnLRelu(512, kernelSize=3)(net, training=self.training) # 13
net = MaxPool2D((2, 2), strides=(2, 2))(net)
net = ConvBnLRelu(1024, kernelSize=3)(net, training=self.training) # 14
net = ConvBnLRelu(512, kernelSize=1)(net, training=self.training) # 15
net = ConvBnLRelu(1024, kernelSize=3)(net, training=self.training) # 16
net = ConvBnLRelu(512, kernelSize=1)(net, training=self.training) # 17
net = ConvBnLRelu(1024, kernelSize=3)(net, training=self.training) # 18
# variational encoder output (distributions)
mean = Conv2D(filters=self.latentSize, kernel_size=(1, 1),
padding='same')(net)
mean = GlobalAveragePooling2D()(mean)
logvar = Conv2D(filters=self.latentSize, kernel_size=(1, 1),
padding='same')(net)
logvar = GlobalAveragePooling2D()(logvar)
sample = SampleLayer(self.latentConstraints, self.beta)([mean, logvar], training=self.training)
return Model(inputs=inLayer, outputs=sample)
class Darknet19Decoder(Architecture):
def __init__(self, inputShape=(224, 224, 3), batchSize=None, latentSize=1000, training=None):
self.training=training
super().__init__(inputShape, batchSize, latentSize)
def Build(self):
# input layer is from GlobalAveragePooling:
inLayer = Input([self.latentSize], self.batchSize)
# reexpand the input from flat:
net = Reshape((1, 1, self.latentSize))(inLayer)
# darknet downscales input by a factor of 32, so we upsample to the second to last output shape:
net = UpSampling2D((self.inputShape[0]//32, self.inputShape[1]//32))(net)
# TODO try inverting num filter arangement (e.g. 512, 1204, 512, 1024, 512)
# and also try (1, 3, 1, 3, 1) for the filter shape
net = ConvBnLRelu(1024, kernelSize=3)(net, training=self.training)
net = ConvBnLRelu(512, kernelSize=1)(net, training=self.training)
net = ConvBnLRelu(1024, kernelSize=3)(net, training=self.training)
net = ConvBnLRelu(512, kernelSize=1)(net, training=self.training)
net = ConvBnLRelu(1024, kernelSize=3)(net, training=self.training)
net = UpSampling2D((2, 2))(net)
net = ConvBnLRelu(512, kernelSize=3)(net, training=self.training)
net = ConvBnLRelu(256, kernelSize=1)(net, training=self.training)
net = ConvBnLRelu(512, kernelSize=3)(net, training=self.training)
net = ConvBnLRelu(256, kernelSize=1)(net, training=self.training)
net = ConvBnLRelu(512, kernelSize=3)(net, training=self.training)
net = UpSampling2D((2, 2))(net)
net = ConvBnLRelu(256, kernelSize=3)(net, training=self.training)
net = ConvBnLRelu(128, kernelSize=1)(net, training=self.training)
net = ConvBnLRelu(256, kernelSize=3)(net, training=self.training)
net = UpSampling2D((2, 2))(net)
net = ConvBnLRelu(128, kernelSize=3)(net, training=self.training)
net = ConvBnLRelu(64, kernelSize=1)(net, training=self.training)
net = ConvBnLRelu(128, kernelSize=3)(net, training=self.training)
net = UpSampling2D((2, 2))(net)
net = ConvBnLRelu(64, kernelSize=3)(net, training=self.training)
net = UpSampling2D((2, 2))(net)
net = ConvBnLRelu(32, kernelSize=3)(net, training=self.training)
net = ConvBnLRelu(64, kernelSize=1)(net, training=self.training)
# net = ConvBnLRelu(3, kernelSize=1)(net, training=self.training)
net = Conv2D(filters=self.inputShape[-1], kernel_size=(1, 1),
padding='same', activation="tanh")(net)
return Model(inLayer, net)
class AutoEncoder(object):
def __init__(self, encoderArchitecture,
decoderArchitecture):
self.encoder = encoderArchitecture.model
self.decoder = decoderArchitecture.model
self.ae = Model(self.encoder.inputs, self.decoder(self.encoder.outputs))
def joinGens(gen1, gen2):
while True:
x = gen1.next()
y = gen2.next()
yield x, y
# build and compile the autoencoder
def classifierOnVAE(depth,classes,fcActFunc='softmax',latentSize=512, inputShape=(224, 224, 3),beta=1,projDir='/analyse/Project0257/'):
encoder = ResNet10Encoder(inputShape, latentSize=latentSize, latentConstraints='bvae', beta=beta)
decoder = Darknet19Decoder(inputShape, latentSize=latentSize)
bvae = AutoEncoder(encoder, decoder)
bvae.ae.compile(optimizer='adam', loss='mean_absolute_error')
# load vae weights
bvae.ae.load_weights(projDir+'aeModels/1stGen/001530SimStructk1ColleaguesRN10DN19beta1.h5') # these weights definitely work
# -- tested in evaluate_bvae_sandbox (if random weights loaded, reconstruction returns black image,
# if these weights loaded, reconstruction works nicely)
# also these weights are definitively loaded in the model, since they always return -0.2973289 tmp[0][0][0][0][0]
# when tmp is model.layers[6].get_weights(); instead of model, there can be bvae.ae or bvae.encoder -- all the same
# create Dense layer to classify ID from stochastic layer
if depth==0:
fcID = Dense(classes[0], activation=fcActFunc, name='fcID')(bvae.encoder.layers[-1].output)
# combine vae input and classifier to model
model = Model(bvae.ae.input,fcID)
# freeze layers
for layer in model.layers[:-1]:
layer.trainable = False
elif depth==2:
x = Dense(512, activation='relu', name='finDense1')(bvae.encoder.layers[-1].output)
x = BatchNormalization(axis=1, name='bn_dense_1')(x)
x = Dense(512, activation='relu', name='finDense2')(x)
x = BatchNormalization(axis=1, name='bn_dense_2')(x)
fcID = Dense(classes[0], activation=fcActFunc, name='fcID')(x)
# combine vae input and classifier to model
model = Model(bvae.ae.input,fcID)
# freeze layers
for layer in model.layers[:-5]:
layer.trainable = False
# check if freezing worked
for layer in model.layers:
print(layer, layer.trainable)
return model
def test():
r10e = ResNet10Encoder()
r10e.model.summary()
r10d = Darknet19Decoder()
r10d.model.summary()
if __name__ == '__main__':
test()
| 41.032258
| 135
| 0.621118
| 2,483
| 20,352
| 5.048329
| 0.132501
| 0.012286
| 0.067012
| 0.06789
| 0.73937
| 0.727164
| 0.721021
| 0.712485
| 0.675947
| 0.614838
| 0
| 0.055632
| 0.245725
| 20,352
| 496
| 136
| 41.032258
| 0.760928
| 0.199636
| 0
| 0.677419
| 0
| 0
| 0.02641
| 0.005141
| 0
| 0
| 0
| 0.002016
| 0
| 1
| 0.071685
| false
| 0
| 0.02509
| 0
| 0.157706
| 0.003584
| 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
|
974e38de8ef2f6c101ed76e5adf49e17fded9426
| 436
|
py
|
Python
|
angular_flask/views.py
|
saqib-nadeem/sample_python_scripts
|
35054816b262a3860ab9db383ab5d9e11ac0ce87
|
[
"MIT"
] | null | null | null |
angular_flask/views.py
|
saqib-nadeem/sample_python_scripts
|
35054816b262a3860ab9db383ab5d9e11ac0ce87
|
[
"MIT"
] | null | null | null |
angular_flask/views.py
|
saqib-nadeem/sample_python_scripts
|
35054816b262a3860ab9db383ab5d9e11ac0ce87
|
[
"MIT"
] | null | null | null |
import os
from passlib.apps import custom_app_context as pwd_context
from itsdangerous import (TimedJSONWebSignatureSerializer
as Serializer, BadSignature, SignatureExpired)
from flask import Flask, abort, request, jsonify, g, url_for
from flask.ext.httpauth import HTTPBasicAuth
from flask.ext.httpauth import HTTPBasicAuth
from angular_flask import app
from angular_flask.common.util import error_response
| 36.333333
| 72
| 0.805046
| 55
| 436
| 6.254545
| 0.545455
| 0.078488
| 0.069767
| 0.116279
| 0.238372
| 0.238372
| 0.238372
| 0
| 0
| 0
| 0
| 0
| 0.158257
| 436
| 11
| 73
| 39.636364
| 0.93733
| 0
| 0
| 0.222222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.111111
| 0.888889
| 0
| 0.888889
| 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
|
976f79796f858973336cf7bf7fdec35113ee2f20
| 42
|
py
|
Python
|
src/__init__.py
|
martinheterjag/kanzchip-8
|
705dad8c5bdb4a6b855d26d7cfb783de62226f47
|
[
"MIT"
] | null | null | null |
src/__init__.py
|
martinheterjag/kanzchip-8
|
705dad8c5bdb4a6b855d26d7cfb783de62226f47
|
[
"MIT"
] | 1
|
2021-03-02T23:13:11.000Z
|
2021-03-02T23:13:11.000Z
|
src/__init__.py
|
martinheterjag/kanzchip-8
|
705dad8c5bdb4a6b855d26d7cfb783de62226f47
|
[
"MIT"
] | null | null | null |
__version__ = '1.0.0'
__license__ = 'MIT'
| 14
| 21
| 0.666667
| 6
| 42
| 3.333333
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 0.142857
| 42
| 2
| 22
| 21
| 0.472222
| 0
| 0
| 0
| 0
| 0
| 0.190476
| 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
|
977d6c93c8e2a07e8d0a5100797ce76496e3de0c
| 212
|
py
|
Python
|
DQM/Integration/python/config/FrontierCondition_GT_cfi.py
|
ckamtsikis/cmssw
|
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
|
[
"Apache-2.0"
] | 852
|
2015-01-11T21:03:51.000Z
|
2022-03-25T21:14:00.000Z
|
DQM/Integration/python/config/FrontierCondition_GT_cfi.py
|
ckamtsikis/cmssw
|
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
|
[
"Apache-2.0"
] | 30,371
|
2015-01-02T00:14:40.000Z
|
2022-03-31T23:26:05.000Z
|
DQM/Integration/python/config/FrontierCondition_GT_cfi.py
|
ckamtsikis/cmssw
|
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
|
[
"Apache-2.0"
] | 3,240
|
2015-01-02T05:53:18.000Z
|
2022-03-31T17:24:21.000Z
|
import FWCore.ParameterSet.Config as cms
from Configuration.StandardSequences.FrontierConditions_GlobalTag_cff import *
from Configuration.AlCa.autoCond import autoCond
GlobalTag.globaltag = autoCond['run3_hlt']
| 42.4
| 78
| 0.867925
| 24
| 212
| 7.541667
| 0.666667
| 0.187845
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005076
| 0.070755
| 212
| 4
| 79
| 53
| 0.913706
| 0
| 0
| 0
| 0
| 0
| 0.037736
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
9785677537060010fede3210aa9a0bcf24d42195
| 119
|
py
|
Python
|
tests/tensorflow/sparsity/rb/utils.py
|
MaximProshin/nncf
|
2290d2f4cebcf6749e419dc76850e7bd8b7d8da1
|
[
"Apache-2.0"
] | 310
|
2020-10-29T09:22:42.000Z
|
2022-03-31T04:53:34.000Z
|
tests/tensorflow/sparsity/rb/utils.py
|
MaximProshin/nncf
|
2290d2f4cebcf6749e419dc76850e7bd8b7d8da1
|
[
"Apache-2.0"
] | 615
|
2020-10-28T10:22:25.000Z
|
2022-03-29T18:09:23.000Z
|
tests/tensorflow/sparsity/rb/utils.py
|
MaximProshin/nncf
|
2290d2f4cebcf6749e419dc76850e7bd8b7d8da1
|
[
"Apache-2.0"
] | 86
|
2020-10-28T11:34:34.000Z
|
2022-03-31T08:00:35.000Z
|
import tensorflow as tf
from nncf.tensorflow.functions import logit
default_rb_mask_value = logit(tf.ones(1) * 0.99)
| 19.833333
| 48
| 0.789916
| 20
| 119
| 4.55
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.038462
| 0.12605
| 119
| 5
| 49
| 23.8
| 0.836538
| 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 | 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
|
9799e1fb2e784e2b9000fbd40cf0c01dea101f13
| 171
|
py
|
Python
|
src/hello/hello.py
|
drbartling/python_lib_template
|
ef7db9d237a68cc67e06b1ef137a26998be38dad
|
[
"MIT"
] | null | null | null |
src/hello/hello.py
|
drbartling/python_lib_template
|
ef7db9d237a68cc67e06b1ef137a26998be38dad
|
[
"MIT"
] | null | null | null |
src/hello/hello.py
|
drbartling/python_lib_template
|
ef7db9d237a68cc67e06b1ef137a26998be38dad
|
[
"MIT"
] | null | null | null |
def make_greeting(name, formality):
return (
"Greetings and felicitations, {}!".format(name)
if formality
else "Hello, {}!".format(name)
)
| 24.428571
| 55
| 0.584795
| 17
| 171
| 5.823529
| 0.764706
| 0.20202
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.274854
| 171
| 6
| 56
| 28.5
| 0.798387
| 0
| 0
| 0
| 0
| 0
| 0.245614
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0
| 0.166667
| 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
| 0
| 1
| 0
| 0
|
0
| 4
|
c1385ebaefeaeaf478e2b910ddb638382c9b1ce5
| 96
|
py
|
Python
|
script.py
|
ErvalhouS/CplusplusProjects
|
707964990c8c7d4327df1bdb2ab322f4c5b19e83
|
[
"MIT"
] | null | null | null |
script.py
|
ErvalhouS/CplusplusProjects
|
707964990c8c7d4327df1bdb2ab322f4c5b19e83
|
[
"MIT"
] | null | null | null |
script.py
|
ErvalhouS/CplusplusProjects
|
707964990c8c7d4327df1bdb2ab322f4c5b19e83
|
[
"MIT"
] | null | null | null |
from RockStar import RockStar
rock_it_bro = RockStar(days=300)
rock_it_bro.make_me_a_rockstar()
| 24
| 32
| 0.84375
| 17
| 96
| 4.352941
| 0.647059
| 0.162162
| 0.243243
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.034091
| 0.083333
| 96
| 4
| 33
| 24
| 0.806818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 1
| 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
|
c142d74479bcef6efc86e980d77f0b5169412fce
| 11,922
|
py
|
Python
|
oscInstructionSet.py
|
dmitrol205/oscDebugger
|
fe15c33feade6c5fd2f32eae724140bd1808c29a
|
[
"MIT"
] | null | null | null |
oscInstructionSet.py
|
dmitrol205/oscDebugger
|
fe15c33feade6c5fd2f32eae724140bd1808c29a
|
[
"MIT"
] | null | null | null |
oscInstructionSet.py
|
dmitrol205/oscDebugger
|
fe15c33feade6c5fd2f32eae724140bd1808c29a
|
[
"MIT"
] | null | null | null |
import math
from oscSystemMacros import SystemMacros
from oscInstruction import Instruction
from random import randint
import oscExecutor
class __InstructionSet(type):
def __getitem__(cls,inst:Instruction):
#print('get f'+str(inst.id),inst.reverse)
if inst.id<100:
return getattr(InstructionSet,'f'+str(inst.id))
else:
if inst.id<108:#load from register
return getattr(InstructionSet,'f100')
elif inst.id<116:#store to register
return getattr(InstructionSet,'f101')
class InstructionSet(object,metaclass=__InstructionSet):
def f2(self:"oscExecutor.Executor"):
self.string_stack.push(self.ip.value)
self.next()
def f7(self:"oscExecutor.Executor"):
if self.float_stack.peek()==float(0):
self.ip=self.ip.ifelse
else:
self.next()
''''def f8(self:"oscExecutor.Executor"):
self.next()
def f9(self:"oscExecutor.Executor"):
self.next()'''
def f10(self:"oscExecutor.Executor"):
if self.float_stack.pop()==float(0) or self.float_stack.pop()==float(0):
self.float_stack.push(float(0))
else:
self.float_stack.push(float(1))
self.next()
def f11(self:"oscExecutor.Executor"):
if self.float_stack.pop()==float(0) and self.float_stack.pop()==float(0):
self.float_stack.push(float(0))
else:
self.float_stack.push(float(1))
self.next()
def f12(self:"oscExecutor.Executor"):
if self.float_stack.pop()==float(0):
self.float_stack.push(float(1))
else:
self.float_stack.push(float(0))
self.next()
def f13(self:"oscExecutor.Executor"):
self.float_stack.push(self.float_stack.pop()+self.float_stack.pop())
self.next()
def f14(self:"oscExecutor.Executor"):
_=self.float_stack.pop()
self.float_stack.push(self.float_stack.pop()-_)
self.next()
def f15(self:"oscExecutor.Executor"):
self.float_stack.push(self.float_stack.pop()*self.float_stack.pop())
self.next()
def f16(self:"oscExecutor.Executor"):
_=self.float_stack.pop()
if _==float(0):
self.float_stack.pop()
self.float_stack.push(float(0))
else:
self.float_stack.push(self.float_stack.pop()/_)
self.next()
def f17(self:"oscExecutor.Executor"):
_=self.float_stack.pop()
if _==0.0:
self.float_stack.pop()
self.float_stack.push(float(0))
else:
self.float_stack.push(self.float_stack.pop()%_)
self.next()
def f18(self:"oscExecutor.Executor"):
self.float_stack.push(-self.float_stack.pop())
self.next()
def f19(self:"oscExecutor.Executor"):
self.float_stack.push(float(1) if self.float_stack.pop()==self.float_stack.pop() else float(0))
self.next()
def f20(self:"oscExecutor.Executor"):
self.float_stack.push(float(1) if self.float_stack.pop()<self.float_stack.pop() else float(0))
self.next()
def f21(self:"oscExecutor.Executor"):
self.float_stack.push(float(1) if self.float_stack.pop()>self.float_stack.pop() else float(0))
self.next()
def f22(self:"oscExecutor.Executor"):
self.float_stack.push(float(1) if self.float_stack.pop()<=self.float_stack.pop() else float(0))
self.next()
def f23(self:"oscExecutor.Executor"):
self.float_stack.push(float(1) if self.float_stack.pop()>=self.float_stack.pop() else float(0))
self.next()
def f24(self:"oscExecutor.Executor"):
self.float_stack.push(float(1) if self.string_stack.pop()==self.string_stack.pop() else float(0))
self.next()
def f25(self:"oscExecutor.Executor"):
self.float_stack.push(float(1) if self.string_stack.pop()<self.string_stack.pop() else float(0))
self.next()
def f26(self:"oscExecutor.Executor"):
self.float_stack.push(float(1) if self.string_stack.pop()>self.string_stack.pop() else float(0))
self.next()
def f27(self:"oscExecutor.Executor"):
self.float_stack.push(float(1) if self.string_stack.pop()<=self.string_stack.pop() else float(0))
self.next()
def f28(self:"oscExecutor.Executor"):
self.float_stack.push(float(1) if self.string_stack.pop()>=self.string_stack.pop() else float(0))
self.next()
def f29(self:"oscExecutor.Executor"):
self.float_stack.push(math.sin(self.float_stack.pop()))
self.next()
def f30(self:"oscExecutor.Executor"):
self.float_stack.push(math.asin(self.float_stack.pop()))
self.next()
def f31(self:"oscExecutor.Executor"):
self.float_stack.push(math.atan(self.float_stack.pop()))
self.next()
def f32(self:"oscExecutor.Executor"):
self.float_stack.push(min(self.float_stack.pop(),self.float_stack.pop()))
self.next()
def f33(self:"oscExecutor.Executor"):
self.float_stack.push(max(self.float_stack.pop(),self.float_stack.pop()))
self.next()
def f34(self:"oscExecutor.Executor"):
self.float_stack.push(math.exp(self.float_stack.pop()))
self.next()
def f35(self:"oscExecutor.Executor"):
self.float_stack.push(math.sqrt(self.float_stack.pop()))
self.next()
def f36(self:"oscExecutor.Executor"):
self.float_stack.push(self.float_stack.pop()**2)
self.next()
def f37(self:"oscExecutor.Executor"):
_=self.float_stack.pop()
_=1. if _>0 else float(-1) if _<0 else float(0)
self.float_stack.push(_)
self.next()
def f38(self:"oscExecutor.Executor"):
self.float_stack.push(math.pi)
self.next()
def f39(self:"oscExecutor.Executor"):
_=int(self.float_stack.pop())-1
_=float(0) if _<0 else float(randint(0,_))
self.float_stack.push(_)
self.next()
def f40(self:"oscExecutor.Executor"):
self.float_stack.push(math.fabs(self.float_stack.pop()))
self.next()
def f41(self:"oscExecutor.Executor"):
self.float_stack.push(math.trunc(self.float_stack.pop()))
self.next()
def f42(self:"oscExecutor.Executor"):
_=self.string_stack.pop()
self.string_stack.push(self.string_stack.pop()+_)
self.next()
def f43(self:"oscExecutor.Executor"):
_=self.string_stack.pop()
_1=self.float_stack.pop()
_2=_
while len(_2)<_1:
_2+=_
self.string_stack.push(_2[:_1])
self.next()
def f44(self:"oscExecutor.Executor"):
self.float_stack.push(len(self.string_stack.peek()))
self.next()
def f45(self:"oscExecutor.Executor"):
self.string_stack.push(self.string_stack.pop()[int(self.float_stack.pop()):])
self.next()
def f46(self:"oscExecutor.Executor"):
self.string_stack.push(self.string_stack.pop()[:-int(self.float_stack.pop())])
self.next()
def f47(self:"oscExecutor.Executor"):
_=int(self.float_stack.peek())
_1=self.string_stack.pop()
if len(_1)>_:
_1=_1[-_:]
else:
_2="{:>"+str(_)+"s}"
_1=f"{_1:>{_}s}"
self.string_stack.push(_1)
self.next()
def f48(self:"oscExecutor.Executor"):
_=int(self.float_stack.peek())
_1=self.string_stack.pop()
if len(_1)>_:
_2=(len(_1)-_)/2
_1=_1[math.floor(_2):-math.ceil(_2)]
else:
_1=f"{_1:^{_}s}"
self.string_stack.push(_1)
self.next()
def f49(self:"oscExecutor.Executor"):
_=int(self.float_stack.peek())
_1=self.string_stack.pop()
if len(_1)>_:
_1=_1[:_]
else:
_1=f"{_1:<{_}s}"
self.string_stack.push(_1)
self.next()
def f50(self:"oscExecutor.Executor"):
self.string_stack.push(str(int(self.float_stack.pop())))
self.next()
def f51(self:"oscExecutor.Executor"):
_=self.string_stack.pop()
_1=str(int(self.float_stack.pop()))
try:
_2=int(_[1:])
except ValueError:
self.string_stack.push(_)
self.next()
return
if len(_1)>_2:
_1=f"{_1[:_2-1]}#"
else:
_1=f"{_1:{_[0]}>{_2}}"
self.string_stack.push(_1)
self.next()
def f52(self:"oscExecutor.Executor"):
try:
_=float(self.string_stack.pop())
except ValueError:
_=float(-1)
self.float_stack.push(_)
self.next()
def f53(self:"oscExecutor.Executor"):
self.string_stack.push(self.string_stack.pop().strip())
self.next()
def f54(self:"oscExecutor.Executor"):
self.float_stack.push(self.float_stack.peek())
self.next()
def f55(self:"oscExecutor.Executor"):
self.string_stack.push(self.string_stack.peek())
self.next()
def f56(self:"oscExecutor.Executor"):
self.debugOutput(self.string_stack.peek(),'$msg')
self.next()
def f57(self:"oscExecutor.Executor"):
self.debugOutput("Information: Stack Dump")
self.debugOutput("")
for i in range(8):
self.debugOutput(f"Stack Nr.{i}: {self.float_stack[i]:f}")
self.next()
def f88(self:"oscExecutor.Executor"):
try:
self.program.macros[self.ip.value]
except KeyError:
print('no such macro',self.ip.value)
self.error={'ip':self.ip,'calls':self.ipstack}
self.isalive=False
self.ipstack=[]
self.ip=False
return
self.ipstack.append([self.ip.next,self.codeType,self.codeName])
for _ in self.execute('macro',self.ip.value):
_:'Instruction'
yield _
try:
self.ip,self.codeType,self.codeName=self.ipstack.pop()
except IndexError:
self.ip=False
return
#self.updateViews()
def f89(self:"oscExecutor.Executor"):#todo
#call sys macro
SystemMacros[self.ip](self)
self.next()
#################################
def f90(self:"oscExecutor.Executor"):
self.float_stack.push(self.system_variables[self.ip.value])
self.next()
def f91(self:"oscExecutor.Executor"):
self.float_stack.push(self.float_local[self.ip.value])
self.next()
def f92(self:"oscExecutor.Executor"):
self.string_stack.push(self.string_local[self.ip.value])
self.next()
def f93(self:"oscExecutor.Executor"):
self.float_local[self.ip.value]=self.float_stack.peek()
self.next()
def f94(self:"oscExecutor.Executor"):
self.string_local[self.ip.value]=self.string_stack.peek()
self.next()
def f95(self:"oscExecutor.Executor"):
self.float_stack.push(self.float_constants[self.ip.value])
self.next()
def f96(self:"oscExecutor.Executor"):
self.float_stack.push(self.program.function(self.ip.value,self.float_stack.pop()))
self.next()
def f97(self:"oscExecutor.Executor"):#todo#load and play sound
#self.float_stack.push(self.program.function(self.ip.value,self.float_stack.pop()))
_=self.string_stack.pop()
self.next()
def f98(self:"oscExecutor.Executor"):#todo#play sound
#self.float_stack.push(self.program.function(self.ip.value,self.float_stack.pop()))
self.next()
def f99(self:"oscExecutor.Executor"):
self.float_stack.push(self.ip.value)
self.next()
def f100(self:"oscExecutor.Executor"):
self.float_stack.push(self.register[self.ip.id-100])
self.next()
def f101(self:"oscExecutor.Executor"):
self.register[self.ip.id-108]=self.float_stack.peek()
self.next()
| 38.833876
| 105
| 0.6051
| 1,548
| 11,922
| 4.498062
| 0.114987
| 0.140888
| 0.213127
| 0.205515
| 0.770932
| 0.726124
| 0.697688
| 0.578055
| 0.442482
| 0.420652
| 0
| 0.027232
| 0.236118
| 11,922
| 306
| 106
| 38.960784
| 0.737345
| 0.02617
| 0
| 0.409556
| 0
| 0
| 0.126912
| 0.00201
| 0
| 0
| 0
| 0.003268
| 0
| 1
| 0.221843
| false
| 0
| 0.017065
| 0
| 0.266212
| 0.003413
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
c142e171dba1b2f5375b2df35de9d46393f77eca
| 44
|
py
|
Python
|
Chapter10/ch10_forLoop1.py
|
PacktPublishing/Applied-Computational-Thinking-with-Python
|
fd9982383c5b473ffa1640998540d602876816e5
|
[
"MIT"
] | 18
|
2020-11-27T22:41:12.000Z
|
2021-12-27T08:20:46.000Z
|
Chapter10/ch10_forLoop1.py
|
PacktPublishing/Applied-Computational-Thinking-with-Python
|
fd9982383c5b473ffa1640998540d602876816e5
|
[
"MIT"
] | null | null | null |
Chapter10/ch10_forLoop1.py
|
PacktPublishing/Applied-Computational-Thinking-with-Python
|
fd9982383c5b473ffa1640998540d602876816e5
|
[
"MIT"
] | 8
|
2020-11-30T17:51:11.000Z
|
2021-12-25T05:23:02.000Z
|
for letter in 'mountain':
print(letter)
| 14.666667
| 25
| 0.681818
| 6
| 44
| 5
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.204545
| 44
| 2
| 26
| 22
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0.181818
| 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
|
c1464e4ec48212aa32248125f742e7b78427c47a
| 186
|
py
|
Python
|
question1.py
|
donabjohn/test
|
791c1962823967172ab7959791818b025b416e51
|
[
"Apache-2.0"
] | null | null | null |
question1.py
|
donabjohn/test
|
791c1962823967172ab7959791818b025b416e51
|
[
"Apache-2.0"
] | null | null | null |
question1.py
|
donabjohn/test
|
791c1962823967172ab7959791818b025b416e51
|
[
"Apache-2.0"
] | null | null | null |
def NumFunc(myList1=[],myList2=[],*args):
list3 = list(set(myList1).intersection(myList2))
return list3
myList1 = [1,2,3,4,5,6]
myList2 = [3, 5, 7, 9]
NumFunc(myList1,myList2)
| 23.25
| 53
| 0.655914
| 28
| 186
| 4.357143
| 0.642857
| 0.229508
| 0.344262
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125786
| 0.145161
| 186
| 8
| 54
| 23.25
| 0.641509
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
c14d96d7268281a875b2494b734365a6f9081c37
| 209
|
py
|
Python
|
ginrex/ui/copy_btn.py
|
San-WierPa/ginRex
|
25af3356e22af033f30b0a8a73139635466e4f44
|
[
"MIT"
] | 2
|
2021-11-22T22:00:05.000Z
|
2021-12-09T18:57:48.000Z
|
ginrex/ui/copy_btn.py
|
San-WierPa/ginrex
|
25af3356e22af033f30b0a8a73139635466e4f44
|
[
"MIT"
] | null | null | null |
ginrex/ui/copy_btn.py
|
San-WierPa/ginrex
|
25af3356e22af033f30b0a8a73139635466e4f44
|
[
"MIT"
] | null | null | null |
import pyperclip
def copied_text(filename) -> str:
"""
Copies the last loaded datafile into the cache.
Parameters
----------
filename: String
"""
return pyperclip.copy(filename)
| 16.076923
| 51
| 0.62201
| 22
| 209
| 5.863636
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.253589
| 209
| 12
| 52
| 17.416667
| 0.826923
| 0.416268
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 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
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
c165e5e5fbc00ed3fffcc981c7425f190624a86e
| 1,757
|
py
|
Python
|
tests/test_gtf2IntronBed.py
|
Oliver-Lab/oliverlib
|
bc198805080a1ec177cdd6e88611d6dd8e63db47
|
[
"MIT"
] | null | null | null |
tests/test_gtf2IntronBed.py
|
Oliver-Lab/oliverlib
|
bc198805080a1ec177cdd6e88611d6dd8e63db47
|
[
"MIT"
] | null | null | null |
tests/test_gtf2IntronBed.py
|
Oliver-Lab/oliverlib
|
bc198805080a1ec177cdd6e88611d6dd8e63db47
|
[
"MIT"
] | null | null | null |
import os
import subprocess as sp
from unittest import TestCase
# class TestreadGFF(TestCase):
# def setUp(self):
# from urllib import request
# import gzip
#
# gff = 'ftp://ftp.flybase.net/releases/FB2016_04/dmel_r6.12/gff/dmel-all-r6.12.gff.gz'
# self.gffname = '/tmp/dmel-all-r6.12.gff.gz'
#
# gtf = 'ftp://ftp.flybase.net/releases/FB2016_04/dmel_r6.12/gtf/dmel-all-r6.12.gtf.gz'
# self.gtfname = '/tmp/dmel-all-r6.12.gtf.gz'
#
# # Download URLs unless I already have a copy
# if not os.path.exists(self.gffname):
# request.urlretrieve(gff, filename=self.gffname)
#
# if not os.path.exists(self.gtfname):
# request.urlretrieve(gtf, filename=self.gtfname)
#
# # Extract gz's
# if not os.path.exists(self.gffname.strip('.gz')):
# proc1 = sp.check_call('gunzip -c {0} > {1}'.format(self.gffname, self.gffname.strip('.gz')), shell=True, stdout=sp.PIPE, stderr=sp.PIPE)
#
# if not os.path.exists(self.gtfname.strip('.gz')):
# proc2 = sp.check_call('gunzip -c {0} > {1}'.format(self.gtfname, self.gtfname.strip('.gz')), shell=True, stdout=sp.PIPE, stderr=sp.PIPE)
#
# def tearDown(self):
# pass
# # Delete the extracted files
# #os.unlink(self.gffname.strip('.gz'))
# #os.unlink(self.gtfname.strip('.gz'))
#
# # Delete created databases
# #os.unlink(self.gffname.strip('.gz') + '.db')
# #os.unlink(self.gtfname.strip('.gz') + '.db')
#
# def test_readGFF_zipped_gff(self):
# from gtf2IntronBed import readGFF
# readGFF(self.gffname)
#
#
if __name__ == '__main__':
import unittest
unittest.main()
| 33.150943
| 150
| 0.594195
| 234
| 1,757
| 4.388889
| 0.337607
| 0.096397
| 0.035054
| 0.042843
| 0.492697
| 0.486855
| 0.323272
| 0.214216
| 0.214216
| 0.155794
| 0
| 0.027695
| 0.239613
| 1,757
| 52
| 151
| 33.788462
| 0.741018
| 0.86568
| 0
| 0
| 0
| 0
| 0.045198
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
c18571eef41c6bbd7ac17b08ee25b5eec279d296
| 210
|
py
|
Python
|
dynamic_storages/apps.py
|
mcclory/django-dynamic-storages
|
3e7be3cf1b53faa20c8f52ed29384aed23fa5fd0
|
[
"BSD-3-Clause"
] | 2
|
2021-03-06T03:13:21.000Z
|
2021-03-06T15:02:31.000Z
|
dynamic_storages/apps.py
|
mcclory/django-dynamic-storages
|
3e7be3cf1b53faa20c8f52ed29384aed23fa5fd0
|
[
"BSD-3-Clause"
] | null | null | null |
dynamic_storages/apps.py
|
mcclory/django-dynamic-storages
|
3e7be3cf1b53faa20c8f52ed29384aed23fa5fd0
|
[
"BSD-3-Clause"
] | null | null | null |
from django.apps import AppConfig
class DynamicStoragesConfig(AppConfig):
name = "dynamic_storages"
label = "dynamic_storages"
verbose_name = "Dynamic Storages"
def ready(self):
pass
| 19.090909
| 39
| 0.704762
| 22
| 210
| 6.590909
| 0.727273
| 0.310345
| 0.262069
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.219048
| 210
| 10
| 40
| 21
| 0.884146
| 0
| 0
| 0
| 0
| 0
| 0.228571
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0.142857
| 0.142857
| 0
| 0.857143
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
c1b49f1a1646bb23f16927d91edf679163ddbff1
| 16,747
|
py
|
Python
|
tests/python/fake_bpy_module_test/fake_bpy_module_test/refiner_test.py
|
kant/fake-bge-module
|
4844110bc032739a250f6cbc9234b48aaa0b4aff
|
[
"MIT"
] | null | null | null |
tests/python/fake_bpy_module_test/fake_bpy_module_test/refiner_test.py
|
kant/fake-bge-module
|
4844110bc032739a250f6cbc9234b48aaa0b4aff
|
[
"MIT"
] | null | null | null |
tests/python/fake_bpy_module_test/fake_bpy_module_test/refiner_test.py
|
kant/fake-bge-module
|
4844110bc032739a250f6cbc9234b48aaa0b4aff
|
[
"MIT"
] | null | null | null |
from . import common
from fake_bpy_module.common import (
ModuleStructure,
EntryPoint,
DataTypeRefiner,
UnknownDataType,
IntermidiateDataType,
)
class ModuleStructureTest(common.FakeBpyModuleTestBase):
name = "ModuleStructureTest"
module_name = __module__
def setUp(self):
super().setUp()
def tearDown(self):
super().tearDown()
def test_root_only(self):
root = ModuleStructure()
with self.assertRaises(RuntimeError):
name = root.name
expect_dict = {
"name": None,
"children": [],
}
root.to_dict()
def test_one_child(self):
root = ModuleStructure()
child = ModuleStructure()
child.name = "child_module"
root.add_child(child)
expect_dict = {
"name": None,
"children": [
{
"name": "child_module",
"children": [],
}
]
}
self.assertEqual(child.name, "child_module")
self.assertEquals(root.children(), [child])
self.assertDictEqual(root.to_dict(), expect_dict)
def test_multiple_children(self):
root = ModuleStructure()
child1 = ModuleStructure()
child1.name = "child_module_1"
root.add_child(child1)
child2 = ModuleStructure()
child2.name = "child_module_2"
root.add_child(child2)
grandchild = ModuleStructure()
grandchild.name = "grandchild_module"
child2.add_child(grandchild)
expect_dict = {
"name": None,
"children": [
{
"name": "child_module_1",
"children": [],
},
{
"name": "child_module_2",
"children": [
{
"name": "grandchild_module",
"children": [],
}
],
}
]
}
self.assertEqual(child1.name, "child_module_1")
self.assertEqual(child2.name, "child_module_2")
self.assertEqual(grandchild.name, "grandchild_module")
self.assertEquals(root.children(), [child1, child2])
self.assertEquals(child1.children(), [])
self.assertEquals(child2.children(), [grandchild])
self.assertDictEqual(root.to_dict(), expect_dict)
class EntryPointTest(common.FakeBpyModuleTestBase):
name = "EntryPointTest"
module_name = __module__
def setUp(self):
super().setUp()
def tearDown(self):
super().tearDown()
def test_all(self):
entry_point = EntryPoint()
entry_point.type = "constant"
entry_point.module = "module.a"
entry_point.name = "DATA"
self.assertEqual(entry_point.type, "constant")
self.assertEqual(entry_point.module, "module.a")
self.assertEqual(entry_point.name, "DATA")
class DataTypeRefinerTest(common.FakeBpyModuleTestBase):
name = "DataTypeRefinerTest"
module_name = __module__
def setUp(self):
super().setUp()
def tearDown(self):
super().tearDown()
def test_basic(self):
package = ModuleStructure()
module = ModuleStructure()
module.name = "module"
submodule = ModuleStructure()
submodule.name = "submodule"
module.add_child(submodule)
package.add_child(module)
entry_point_1 = EntryPoint()
entry_point_1.type = "class"
entry_point_1.module = "module.submodule"
entry_point_1.name = "ClassA"
entry_point_2 = EntryPoint()
entry_point_2.type = "class"
entry_point_2.module = "module"
entry_point_2.name = "ClassB"
refiner = DataTypeRefiner(package, [entry_point_1, entry_point_2])
self.assertEqual(refiner.get_base_name("module.submodule.ClassA"), "ClassA")
self.assertIsNone(refiner.get_module_name(None))
self.assertEqual(refiner.get_module_name("module.submodule.ClassA"), "module.submodule")
self.assertIsNone(refiner.get_module_name("module.submodule2.ClassA"))
self.assertEqual(refiner.get_module_name("module.ClassB"), "module")
def test_get_generation_data_type(self):
package = ModuleStructure()
module_1 = ModuleStructure()
module_1.name = "module_1"
submodule_1 = ModuleStructure()
submodule_1.name = "submodule_1"
module_1.add_child(submodule_1)
submodule_2 = ModuleStructure()
submodule_2.name = "submodule_2"
module_1.add_child(submodule_2)
package.add_child(module_1)
module_2 = ModuleStructure()
module_2.name = "module_2"
package.add_child(module_2)
entry_point_1 = EntryPoint()
entry_point_1.type = "class"
entry_point_1.module = "module_1.submodule_1"
entry_point_1.name = "ClassA"
entry_point_2 = EntryPoint()
entry_point_2.type = "class"
entry_point_2.module = "module_1.submodule_2"
entry_point_2.name = "ClassB"
entry_point_3 = EntryPoint()
entry_point_3.type = "class"
entry_point_3.module = "module_1"
entry_point_3.name = "ClassC"
entry_point_4 = EntryPoint()
entry_point_4.type = "class"
entry_point_4.module = "module_1"
entry_point_4.name = "ClassD"
entry_point_5 = EntryPoint()
entry_point_5.type = "class"
entry_point_5.module = "module_2"
entry_point_5.name = "ClassE"
refiner = DataTypeRefiner(package, [entry_point_1, entry_point_2, entry_point_3, entry_point_4, entry_point_5])
self.assertIsNone(refiner.get_generation_data_type(None, "module_2"))
self.assertEqual(refiner.get_generation_data_type("module_1.ClassC", None), "module_1.ClassC")
self.assertEqual(refiner.get_generation_data_type("module_1.submodule_1.ClassA", "module_2"),
"module_1.submodule_1.ClassA")
self.assertEqual(refiner.get_generation_data_type("module_1.ClassC", "module_1"),
"ClassC")
self.assertEqual(refiner.get_generation_data_type("module_1.submodule_1.ClassA", "module_1.submodule_2"),
"module_1.submodule_1.ClassA")
self.assertEqual(refiner.get_generation_data_type("module_1.ClassC", "module_1.submodule_1"),
"module_1.ClassC")
self.assertEqual(refiner.get_generation_data_type("module_1.submodule_1.ClassA", "module_1"),
"module_1.submodule_1.ClassA")
def test_get_refined_data_type(self):
package = ModuleStructure()
module_1 = ModuleStructure()
module_1.name = "module_1"
submodule_1 = ModuleStructure()
submodule_1.name = "submodule_1"
module_1.add_child(submodule_1)
submodule_2 = ModuleStructure()
submodule_2.name = "submodule_2"
module_1.add_child(submodule_2)
package.add_child(module_1)
module_2 = ModuleStructure()
module_2.name = "module_2"
package.add_child(module_2)
entry_point_1 = EntryPoint()
entry_point_1.type = "class"
entry_point_1.module = "module_1.submodule_1"
entry_point_1.name = "ClassA"
entry_point_2 = EntryPoint()
entry_point_2.type = "class"
entry_point_2.module = "module_1.submodule_2"
entry_point_2.name = "ClassB"
entry_point_3 = EntryPoint()
entry_point_3.type = "class"
entry_point_3.module = "module_1"
entry_point_3.name = "ClassC"
entry_point_4 = EntryPoint()
entry_point_4.type = "class"
entry_point_4.module = "module_1"
entry_point_4.name = "ClassD"
entry_point_5 = EntryPoint()
entry_point_5.type = "class"
entry_point_5.module = "module_2"
entry_point_5.name = "ClassE"
refiner = DataTypeRefiner(package, [entry_point_1, entry_point_2, entry_point_3, entry_point_4, entry_point_5])
unknown_data_type = UnknownDataType()
refined_data_type = refiner.get_refined_data_type(unknown_data_type, "module_1")
self.assertEqual(refined_data_type.type(), 'UNKNOWN')
intermidiate_data_type = IntermidiateDataType("list of int")
refined_data_type = refiner.get_refined_data_type(intermidiate_data_type, "module_1")
self.assertEqual(refined_data_type.type(), 'BUILTIN')
self.assertEqual(refined_data_type.modifier(), "list")
self.assertEqual(refined_data_type.data_type(), "int")
intermidiate_data_type = IntermidiateDataType("dict")
refined_data_type = refiner.get_refined_data_type(intermidiate_data_type, "module_1")
self.assertEqual(refined_data_type.type(), 'MODIFIER')
self.assertEqual(refined_data_type.modifier(), "dict")
intermidiate_data_type = IntermidiateDataType("sequence ")
refined_data_type = refiner.get_refined_data_type(intermidiate_data_type, "module_1")
self.assertEqual(refined_data_type.type(), 'MODIFIER')
self.assertEqual(refined_data_type.modifier(), "list")
intermidiate_data_type = IntermidiateDataType("float")
refined_data_type = refiner.get_refined_data_type(intermidiate_data_type, "module_1")
self.assertEqual(refined_data_type.type(), 'BUILTIN')
self.assertFalse(refined_data_type.has_modifier())
self.assertEqual(refined_data_type.data_type(), "float")
intermidiate_data_type = IntermidiateDataType("string ")
refined_data_type = refiner.get_refined_data_type(intermidiate_data_type, "module_1")
self.assertEqual(refined_data_type.type(), 'BUILTIN')
self.assertFalse(refined_data_type.has_modifier())
self.assertEqual(refined_data_type.data_type(), "str")
intermidiate_data_type = IntermidiateDataType("module_1.ClassC")
refined_data_type = refiner.get_refined_data_type(intermidiate_data_type, "module_1")
self.assertEqual(refined_data_type.type(), 'CUSTOM')
self.assertFalse(refined_data_type.has_modifier())
self.assertEqual(refined_data_type.data_type(), "module_1.ClassC")
intermidiate_data_type = IntermidiateDataType("list of module_1.ClassC")
refined_data_type = refiner.get_refined_data_type(intermidiate_data_type, "module_1")
self.assertEqual(refined_data_type.type(), 'CUSTOM')
self.assertEqual(refined_data_type.modifier(), "list")
self.assertEqual(refined_data_type.data_type(), "module_1.ClassC")
intermidiate_data_type = IntermidiateDataType("module_1.ClassC")
refined_data_type = refiner.get_refined_data_type(intermidiate_data_type, "module_1")
self.assertEqual(refined_data_type.type(), 'CUSTOM')
self.assertEqual(refined_data_type.data_type(), "module_1.ClassC")
intermidiate_data_type = IntermidiateDataType("ClassC")
refined_data_type = refiner.get_refined_data_type(intermidiate_data_type, "module_1")
self.assertEqual(refined_data_type.type(), 'CUSTOM')
self.assertEqual(refined_data_type.data_type(), "module_1.ClassC")
intermidiate_data_type = IntermidiateDataType("ClassC")
refined_data_type = refiner.get_refined_data_type(intermidiate_data_type, "")
self.assertEqual(refined_data_type.type(), 'CUSTOM')
self.assertEqual(refined_data_type.data_type(), "module_1.ClassC")
def assert_equal_commutative(expect, actual):
def compare_func(expect, actual):
if expect["type"] != actual.type():
return False
if expect["modifier"] is None:
if actual.has_modifier():
return False
else:
if expect["modifier"] != actual.modifier():
return False
if expect["data_type"] is None:
if actual.has_modifier():
return False
else:
if expect["data_type"] != actual.data_type():
return False
return True
self.assertEqual(len(expect), len(actual))
actual_copied = actual.copy()
for e in expect:
for a in actual_copied[:]:
if compare_func(e, a):
actual_copied.remove(a)
if len(actual_copied) > 0:
self.log("--- Expect ---")
for e in expect:
self.log("{}".format(e))
self.log("--- Actual ---")
for a in actual:
self.log("{}".format(a.to_string()))
self.assertEqual(len(actual_copied), 0)
intermidiate_data_type = IntermidiateDataType("(bpy_prop_collection of float)")
refined_data_type = refiner.get_refined_data_type(intermidiate_data_type, "module_1")
self.assertEqual(refined_data_type.type(), 'MIXIN')
expect = [{
"type": 'BUILTIN',
"modifier": "list",
"data_type": "float",
},
{
"type": 'CUSTOM',
"modifier": None,
"data_type": "bpy_prop_collection"
}]
assert_equal_commutative(expect, refined_data_type.data_types())
intermidiate_data_type = IntermidiateDataType(" bpy_prop_collection of float")
refined_data_type = refiner.get_refined_data_type(intermidiate_data_type, "module_1")
self.assertEqual(refined_data_type.type(), 'MIXIN')
expect = [{
"type": 'BUILTIN',
"modifier": "list",
"data_type": "float",
},
{
"type": 'CUSTOM',
"modifier": None,
"data_type": "bpy_prop_collection"
}]
assert_equal_commutative(expect, refined_data_type.data_types())
intermidiate_data_type = IntermidiateDataType("enum")
refined_data_type = refiner.get_refined_data_type(intermidiate_data_type, "module_1")
self.assertEqual(refined_data_type.type(), 'MIXIN')
expect = [{
"type": 'BUILTIN',
"modifier": None,
"data_type": "str",
},
{
"type": 'BUILTIN',
"modifier": None,
"data_type": "int"
}]
assert_equal_commutative(expect, refined_data_type.data_types())
intermidiate_data_type = IntermidiateDataType("int, float")
refined_data_type = refiner.get_refined_data_type(intermidiate_data_type, "module_1")
self.assertEqual(refined_data_type.type(), 'MIXIN')
expect = [{
"type": 'BUILTIN',
"modifier": None,
"data_type": "float",
},
{
"type": 'BUILTIN',
"modifier": None,
"data_type": "int"
}]
assert_equal_commutative(expect, refined_data_type.data_types())
intermidiate_data_type = IntermidiateDataType("int, module_1.ClassC")
refined_data_type = refiner.get_refined_data_type(intermidiate_data_type, "module_1")
self.assertEqual(refined_data_type.type(), 'MIXIN')
expect = [{
"type": 'BUILTIN',
"modifier": None,
"data_type": "int",
},
{
"type": 'CUSTOM',
"modifier": None,
"data_type": "module_1.ClassC"
}]
assert_equal_commutative(expect, refined_data_type.data_types())
intermidiate_data_type = IntermidiateDataType("module_2.ClassE, module_1.submodule_1.ClassA")
refined_data_type = refiner.get_refined_data_type(intermidiate_data_type, "module_1")
self.assertEqual(refined_data_type.type(), 'MIXIN')
expect = [{
"type": 'CUSTOM',
"modifier": None,
"data_type": "module_2.ClassE",
},
{
"type": 'CUSTOM',
"modifier": None,
"data_type": "module_1.submodule_1.ClassA"
}]
assert_equal_commutative(expect, refined_data_type.data_types())
intermidiate_data_type = IntermidiateDataType("ClassZ")
refined_data_type = refiner.get_refined_data_type(unknown_data_type, "module_1")
self.assertEqual(refined_data_type.type(), 'UNKNOWN')
intermidiate_data_type = IntermidiateDataType("module_1.ClassZ")
refined_data_type = refiner.get_refined_data_type(unknown_data_type, "module_1")
self.assertEqual(refined_data_type.type(), 'UNKNOWN')
| 38.148064
| 119
| 0.62023
| 1,783
| 16,747
| 5.457656
| 0.062815
| 0.121673
| 0.121776
| 0.047785
| 0.776488
| 0.738156
| 0.728805
| 0.706711
| 0.690679
| 0.685438
| 0
| 0.015735
| 0.271392
| 16,747
| 438
| 120
| 38.23516
| 0.781757
| 0
| 0
| 0.599462
| 0
| 0
| 0.137338
| 0.017078
| 0
| 0
| 0
| 0
| 0.185484
| 1
| 0.040323
| false
| 0
| 0.005376
| 0
| 0.086022
| 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
|
c1bbe5c9560a1a3ac192c663118ae25a071aab39
| 281
|
py
|
Python
|
src/model/classify_head/__init__.py
|
JacksonWuxs/taac2021-Video-Classification-Rank5
|
abecf49b95fe82d9dd47ed37e020d510b04da018
|
[
"MIT"
] | 7
|
2022-02-22T03:01:59.000Z
|
2022-03-24T12:50:34.000Z
|
src/model/classify_head/__init__.py
|
JacksonWuxs/taac2021-Video-Classification-Rank5
|
abecf49b95fe82d9dd47ed37e020d510b04da018
|
[
"MIT"
] | null | null | null |
src/model/classify_head/__init__.py
|
JacksonWuxs/taac2021-Video-Classification-Rank5
|
abecf49b95fe82d9dd47ed37e020d510b04da018
|
[
"MIT"
] | null | null | null |
from src.model.classify_head.logistic_model import LogisticModel
from src.model.classify_head.moe_model import MoeModel
def get_instance(name, paramters_dict):
model = {'LogisticModel': LogisticModel,
'MoeModel': MoeModel}[name]
return model(**paramters_dict)
| 40.142857
| 64
| 0.765125
| 34
| 281
| 6.117647
| 0.5
| 0.067308
| 0.115385
| 0.192308
| 0.230769
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142349
| 281
| 7
| 65
| 40.142857
| 0.863071
| 0
| 0
| 0
| 0
| 0
| 0.074468
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0
| 0.666667
| 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
|
c1c606b270a8b5313eedbebba29e9748c268f6b0
| 503
|
py
|
Python
|
mlfinlab/portfolio_optimization/__init__.py
|
jihobak/mlfinlab
|
c504532729b44f6623255b2fcf105c2627cedec8
|
[
"BSD-3-Clause"
] | 8
|
2020-04-19T08:09:34.000Z
|
2022-03-30T20:49:40.000Z
|
mlfinlab/portfolio_optimization/__init__.py
|
jihobak/mlfinlab
|
c504532729b44f6623255b2fcf105c2627cedec8
|
[
"BSD-3-Clause"
] | 1
|
2019-07-24T17:52:30.000Z
|
2019-07-24T17:52:30.000Z
|
mlfinlab/portfolio_optimization/__init__.py
|
nisarahamedk/mlfinlab
|
c504532729b44f6623255b2fcf105c2627cedec8
|
[
"BSD-3-Clause"
] | 8
|
2020-08-09T02:25:04.000Z
|
2022-03-20T15:08:11.000Z
|
"""
Classes derived from Portfolio Optimisation module
"""
from mlfinlab.portfolio_optimization.cla import CLA
from mlfinlab.portfolio_optimization.hrp import HierarchicalRiskParity
from mlfinlab.portfolio_optimization.mean_variance import MeanVarianceOptimisation
from mlfinlab.portfolio_optimization.hcaa import HierarchicalClusteringAssetAllocation
from mlfinlab.portfolio_optimization.risk_metrics import RiskMetrics
from mlfinlab.portfolio_optimization.returns_estimators import ReturnsEstimation
| 45.727273
| 86
| 0.898608
| 51
| 503
| 8.686275
| 0.45098
| 0.162528
| 0.284424
| 0.446953
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.065606
| 503
| 10
| 87
| 50.3
| 0.942553
| 0.099404
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
c1cc431bd5651f0f9bfac13d7e1a491cc31a4fea
| 366
|
py
|
Python
|
scheduler/models.py
|
psycane/django-calendar
|
88d9005953c3a88dea2fcb7141029a73e8d0436b
|
[
"MIT"
] | null | null | null |
scheduler/models.py
|
psycane/django-calendar
|
88d9005953c3a88dea2fcb7141029a73e8d0436b
|
[
"MIT"
] | null | null | null |
scheduler/models.py
|
psycane/django-calendar
|
88d9005953c3a88dea2fcb7141029a73e8d0436b
|
[
"MIT"
] | null | null | null |
from django.db import models
# Create your models here.
class Event(models.Model):
event_name = models.CharField(max_length=30)
location = models.CharField(max_length=30)
start_date = models.DateTimeField()
end_date = models.DateTimeField()
description = models.CharField(max_length=100)
def __str__(self):
return self.event_name
| 24.4
| 50
| 0.726776
| 47
| 366
| 5.425532
| 0.574468
| 0.176471
| 0.211765
| 0.282353
| 0.203922
| 0
| 0
| 0
| 0
| 0
| 0
| 0.023333
| 0.180328
| 366
| 14
| 51
| 26.142857
| 0.826667
| 0.065574
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.111111
| false
| 0
| 0.111111
| 0.111111
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
c1d3b779937b77ed6fee5b5fb7cc38b3596abb6e
| 37
|
py
|
Python
|
lib/calistra_lib/exceptions/__init__.py
|
igorxxl8/Calistra
|
ced32a53f42a8d7a2309a1eb15acef42418a3ecb
|
[
"MIT"
] | null | null | null |
lib/calistra_lib/exceptions/__init__.py
|
igorxxl8/Calistra
|
ced32a53f42a8d7a2309a1eb15acef42418a3ecb
|
[
"MIT"
] | null | null | null |
lib/calistra_lib/exceptions/__init__.py
|
igorxxl8/Calistra
|
ced32a53f42a8d7a2309a1eb15acef42418a3ecb
|
[
"MIT"
] | null | null | null |
""" Program exceptions and errors"""
| 18.5
| 36
| 0.702703
| 4
| 37
| 6.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.135135
| 37
| 1
| 37
| 37
| 0.8125
| 0.783784
| 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
|
c1eb04953c804f9670043b804fc6db8524d445f2
| 278
|
py
|
Python
|
lpb/custom_storages.py
|
corwin-cole/lunas-picture-box
|
af0870bea27b01abdd64260bc4e0d40423580fb2
|
[
"MIT"
] | null | null | null |
lpb/custom_storages.py
|
corwin-cole/lunas-picture-box
|
af0870bea27b01abdd64260bc4e0d40423580fb2
|
[
"MIT"
] | null | null | null |
lpb/custom_storages.py
|
corwin-cole/lunas-picture-box
|
af0870bea27b01abdd64260bc4e0d40423580fb2
|
[
"MIT"
] | null | null | null |
from django.conf import settings
from storages.backends.s3boto3 import S3Boto3Storage
class StaticStorage(S3Boto3Storage):
bucket_name = settings.STATIC_AWS_STORAGE_BUCKET_NAME
class MediaStorage(S3Boto3Storage):
bucket_name = settings.MEDIA_AWS_STORAGE_BUCKET_NAME
| 25.272727
| 57
| 0.845324
| 33
| 278
| 6.818182
| 0.545455
| 0.177778
| 0.213333
| 0.284444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.032258
| 0.107914
| 278
| 10
| 58
| 27.8
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
a9d588e53252a1f7e30294d65b89520a45d42ffb
| 405
|
py
|
Python
|
system/functions/array.py
|
superstap/jimi
|
d921b815c726e169c5a35f01a81eea8a75b8321d
|
[
"Apache-2.0"
] | 111
|
2020-06-30T10:51:29.000Z
|
2022-03-29T00:33:48.000Z
|
system/functions/array.py
|
superstap/jimi
|
d921b815c726e169c5a35f01a81eea8a75b8321d
|
[
"Apache-2.0"
] | 206
|
2020-07-02T22:48:49.000Z
|
2022-02-16T13:21:10.000Z
|
system/functions/array.py
|
superstap/jimi
|
d921b815c726e169c5a35f01a81eea8a75b8321d
|
[
"Apache-2.0"
] | 24
|
2020-11-16T15:30:00.000Z
|
2022-02-10T03:20:14.000Z
|
def index(array,index):
try:
return array[index]
except:
return array
def append(array,value):
try:
array.append(value)
except:
pass
return array
def remove(array,index):
try:
del array[index]
except:
pass
return array
def dedupe(array):
try:
return list(dict.fromkeys(array))
except:
return array
| 15.576923
| 41
| 0.567901
| 47
| 405
| 4.893617
| 0.319149
| 0.23913
| 0.182609
| 0.182609
| 0.208696
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.345679
| 405
| 25
| 42
| 16.2
| 0.867925
| 0
| 0
| 0.636364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.181818
| false
| 0.090909
| 0
| 0
| 0.454545
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
a9ed03bf3d482e0bd660fc0de5b8b3f9f1246fa3
| 164
|
py
|
Python
|
describer_ml/__init__.py
|
EricSchles/describer_ml
|
927795f2a11ebad898619f700cf341c957f99fc5
|
[
"MIT"
] | 6
|
2019-04-02T19:28:42.000Z
|
2020-08-16T14:19:41.000Z
|
describer_ml/__init__.py
|
EricSchles/describer_ml
|
927795f2a11ebad898619f700cf341c957f99fc5
|
[
"MIT"
] | 2
|
2019-05-11T21:35:55.000Z
|
2022-01-23T05:07:17.000Z
|
describer_ml/__init__.py
|
EricSchles/describer_ml
|
927795f2a11ebad898619f700cf341c957f99fc5
|
[
"MIT"
] | null | null | null |
__version__ = '0.20'
from .timeseries import timeseries
from .numeric import num_stats
from .matching import match
__all__ = ["timeseries", "num_stats", "match"]
| 20.5
| 46
| 0.756098
| 21
| 164
| 5.428571
| 0.571429
| 0.140351
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021127
| 0.134146
| 164
| 7
| 47
| 23.428571
| 0.78169
| 0
| 0
| 0
| 0
| 0
| 0.170732
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.6
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
e70fb18bb0156964a077a782cb659b1ada28f49c
| 375
|
py
|
Python
|
bloock/__init__.py
|
enchainte/enchainte-sdk-py
|
d7e6803cb941ae929bca9bb00584aa5b4853689a
|
[
"MIT"
] | 1
|
2021-11-21T22:02:49.000Z
|
2021-11-21T22:02:49.000Z
|
bloock/__init__.py
|
enchainte/enchainte-sdk-py
|
d7e6803cb941ae929bca9bb00584aa5b4853689a
|
[
"MIT"
] | 1
|
2021-09-16T20:19:04.000Z
|
2021-09-16T20:19:04.000Z
|
bloock/__init__.py
|
enchainte/enchainte-sdk-py
|
d7e6803cb941ae929bca9bb00584aa5b4853689a
|
[
"MIT"
] | 1
|
2021-12-10T10:22:30.000Z
|
2021-12-10T10:22:30.000Z
|
from .shared.bloock_client_exception import BloockException
from .record.entity.record_entity import Record
from .record.entity.record_receipt_entity import RecordReceipt
from .config.entity.configuration_entity import NetworkConfiguration
from .config.entity.networks_entity import Network
from .proof.entity.proof_entity import Proof
from .bloock_client import BloockClient
| 53.571429
| 68
| 0.88
| 48
| 375
| 6.6875
| 0.375
| 0.186916
| 0.099688
| 0.137072
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.072
| 375
| 7
| 69
| 53.571429
| 0.922414
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 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
|
e75fd5868d909e23d58a643d892b541787a81f85
| 171
|
py
|
Python
|
001146StepikPyBegin/Stepik001146PyBeginсh09p02st10TASK09_20210127.py
|
SafonovMikhail/python_000577
|
739f764e80f1ca354386f00b8e9db1df8c96531d
|
[
"Apache-2.0"
] | null | null | null |
001146StepikPyBegin/Stepik001146PyBeginсh09p02st10TASK09_20210127.py
|
SafonovMikhail/python_000577
|
739f764e80f1ca354386f00b8e9db1df8c96531d
|
[
"Apache-2.0"
] | null | null | null |
001146StepikPyBegin/Stepik001146PyBeginсh09p02st10TASK09_20210127.py
|
SafonovMikhail/python_000577
|
739f764e80f1ca354386f00b8e9db1df8c96531d
|
[
"Apache-2.0"
] | null | null | null |
'''
Дополните приведенный код, используя срезы, так чтобы он вывел строку s в обратном порядке.
'''
s = "In 2010, someone paid 10k Bitcoin for two pizzas."
print(s[::-1])
| 28.5
| 91
| 0.71345
| 27
| 171
| 4.518519
| 0.925926
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.048951
| 0.163743
| 171
| 5
| 92
| 34.2
| 0.804196
| 0.532164
| 0
| 0
| 0
| 0
| 0.680556
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
e77f9c0bff3cfd4b4288f9bd05e20bb575853ddc
| 212
|
py
|
Python
|
p0rk/porkweb/forms.py
|
akampjes/p0rk-crackling
|
92bc89822173305afb38c575f69e0b17f2fbb869
|
[
"BSD-3-Clause"
] | 11
|
2016-06-13T10:12:27.000Z
|
2021-07-03T18:38:33.000Z
|
p0rk/porkweb/forms.py
|
akampjes/p0rk-crackling
|
92bc89822173305afb38c575f69e0b17f2fbb869
|
[
"BSD-3-Clause"
] | null | null | null |
p0rk/porkweb/forms.py
|
akampjes/p0rk-crackling
|
92bc89822173305afb38c575f69e0b17f2fbb869
|
[
"BSD-3-Clause"
] | 9
|
2015-04-14T11:16:10.000Z
|
2021-09-26T18:03:23.000Z
|
from django.forms import ModelForm
from django.forms.models import inlineformset_factory
from models import *
class JobForm(ModelForm):
class Meta:
model = Job
fields = ("hashType", "attackType", "hashes")
| 23.555556
| 53
| 0.764151
| 26
| 212
| 6.192308
| 0.653846
| 0.124224
| 0.186335
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.141509
| 212
| 8
| 54
| 26.5
| 0.884615
| 0
| 0
| 0
| 0
| 0
| 0.113208
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.428571
| 0
| 0.714286
| 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
|
e7923ef264261bde2a586130e260feedb4cdfa78
| 221
|
py
|
Python
|
hubconf.py
|
chenyaofo/pytorch-cifar-models
|
e9482ebc665084761ad9c84d36c83cbb82a164a9
|
[
"BSD-3-Clause"
] | 76
|
2021-04-09T01:23:19.000Z
|
2022-03-30T02:12:16.000Z
|
hubconf.py
|
chenyaofo/pytorch-cifar-models
|
e9482ebc665084761ad9c84d36c83cbb82a164a9
|
[
"BSD-3-Clause"
] | 10
|
2021-03-12T08:43:11.000Z
|
2022-02-23T12:32:46.000Z
|
hubconf.py
|
chenyaofo/pytorch-cifar-models
|
e9482ebc665084761ad9c84d36c83cbb82a164a9
|
[
"BSD-3-Clause"
] | 21
|
2021-03-21T00:21:18.000Z
|
2022-03-26T09:06:47.000Z
|
import pytorch_cifar_models
dependencies = ['torch']
models = filter(lambda name: name.startswith("cifar"), dir(pytorch_cifar_models))
globals().update({model: getattr(pytorch_cifar_models, model) for model in models})
| 31.571429
| 83
| 0.782805
| 29
| 221
| 5.758621
| 0.586207
| 0.215569
| 0.323353
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.090498
| 221
| 6
| 84
| 36.833333
| 0.830846
| 0
| 0
| 0
| 0
| 0
| 0.045249
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.25
| 0
| 0.25
| 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
|
e7a5ad5197d64fabbdbea59a3c45e6bad34131f6
| 277
|
py
|
Python
|
python-advanced/mspack/msmath.py
|
Rokon-Uz-Zaman/thinkdiff_python_django
|
5010c5f1dd8a028fb9e5235319bb6bb434831e6c
|
[
"MIT"
] | 92
|
2018-04-03T20:53:07.000Z
|
2022-03-04T05:53:10.000Z
|
python-language/python-beginner/mspack/msmath.py
|
mostafijur-rahman299/thinkdiff
|
b0e0c01fe38c406f4dfa8cc80b2f0c5654017079
|
[
"MIT"
] | 11
|
2018-10-01T15:35:33.000Z
|
2021-09-01T04:59:56.000Z
|
python-language/python-beginner/mspack/msmath.py
|
mostafijur-rahman299/thinkdiff
|
b0e0c01fe38c406f4dfa8cc80b2f0c5654017079
|
[
"MIT"
] | 98
|
2018-03-13T08:03:54.000Z
|
2022-03-22T08:11:44.000Z
|
# author Mahmud Ahsan
# --------------------
# msmath module under mspack package
# --------------------
def sum(x, y):
return x + y
def subtract(x, y):
return x - y
def multiplication(x, y):
return x * y
def division(x, y):
return x / y
| 16.294118
| 41
| 0.476534
| 36
| 277
| 3.666667
| 0.444444
| 0.121212
| 0.242424
| 0.272727
| 0.371212
| 0.295455
| 0
| 0
| 0
| 0
| 0
| 0
| 0.292419
| 277
| 17
| 42
| 16.294118
| 0.673469
| 0.364621
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
e7c1eaf7147ab9c686a2c13050463e114f23dc8b
| 152
|
py
|
Python
|
src/api_insee/criteria/field_exact.py
|
mxdev88/api_insee
|
383143b9c8e63063a889b7797e989dac9fd0de5b
|
[
"MIT"
] | 9
|
2019-01-10T17:35:24.000Z
|
2020-04-18T20:44:45.000Z
|
src/api_insee/criteria/field_exact.py
|
mxdev88/api_insee
|
383143b9c8e63063a889b7797e989dac9fd0de5b
|
[
"MIT"
] | 5
|
2020-06-04T21:34:49.000Z
|
2022-03-14T17:58:03.000Z
|
src/api_insee/criteria/field_exact.py
|
ln-nicolas/api_insee
|
383143b9c8e63063a889b7797e989dac9fd0de5b
|
[
"MIT"
] | 3
|
2020-07-04T18:53:30.000Z
|
2021-02-04T13:20:03.000Z
|
from .field import Field
class FieldExact(Field):
@property
def representation(self):
return '%s:"%s"' % (self.name, str(self.value))
| 19
| 55
| 0.638158
| 19
| 152
| 5.105263
| 0.736842
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.210526
| 152
| 7
| 56
| 21.714286
| 0.808333
| 0
| 0
| 0
| 0
| 0
| 0.046053
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0.2
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
99c769c55f6840c78b079868e39daf8d2b4082da
| 34
|
py
|
Python
|
locker_test.py
|
Kaundu/password-locker
|
78b43042b660724b77f9005cfe975db3e3218853
|
[
"Unlicense"
] | null | null | null |
locker_test.py
|
Kaundu/password-locker
|
78b43042b660724b77f9005cfe975db3e3218853
|
[
"Unlicense"
] | null | null | null |
locker_test.py
|
Kaundu/password-locker
|
78b43042b660724b77f9005cfe975db3e3218853
|
[
"Unlicense"
] | null | null | null |
Account.account_list = []
| 17
| 33
| 0.558824
| 3
| 34
| 6
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.323529
| 34
| 1
| 34
| 34
| 0.782609
| 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
|
99cac52051655e3af99cccab8ab23f7c96f5f407
| 133
|
py
|
Python
|
addition/add.py
|
aravindsavd1/EXYREME
|
6965cf2db404b4022b6b7bfa409c6d4f2b20deef
|
[
"MIT"
] | null | null | null |
addition/add.py
|
aravindsavd1/EXYREME
|
6965cf2db404b4022b6b7bfa409c6d4f2b20deef
|
[
"MIT"
] | null | null | null |
addition/add.py
|
aravindsavd1/EXYREME
|
6965cf2db404b4022b6b7bfa409c6d4f2b20deef
|
[
"MIT"
] | null | null | null |
#addition.py
def add(a,b):
return a+b
a=int(input("Enter the a value"))
b= int(input("Enter the b value"))
c=add(a,b)
print(c)
| 19
| 34
| 0.631579
| 29
| 133
| 2.896552
| 0.482759
| 0.071429
| 0.119048
| 0.380952
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.165414
| 133
| 7
| 35
| 19
| 0.756757
| 0.082707
| 0
| 0
| 0
| 0
| 0.278689
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0
| 0.166667
| 0.333333
| 0.166667
| 1
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
99cc8e4fc5c038802f2a55f3bee025c15da2dd03
| 70
|
py
|
Python
|
ansys/mapdl/core/inline_functions/__init__.py
|
RGPATCHI/pymapdl
|
4b0f98feb9cccde0ac1e712a04345f981d5c0b23
|
[
"MIT"
] | 194
|
2016-10-21T08:46:41.000Z
|
2021-01-06T20:39:23.000Z
|
ansys/mapdl/core/inline_functions/__init__.py
|
NewsamNiu/pymapdl
|
482c960142a612997eb33216731aaa88f1371168
|
[
"MIT"
] | 463
|
2021-01-12T14:07:38.000Z
|
2022-03-31T22:42:25.000Z
|
ansys/mapdl/core/inline_functions/__init__.py
|
NewsamNiu/pymapdl
|
482c960142a612997eb33216731aaa88f1371168
|
[
"MIT"
] | 66
|
2016-11-21T04:26:08.000Z
|
2020-12-28T09:27:27.000Z
|
from .inline_functions import Query
from .core import SelectionStatus
| 23.333333
| 35
| 0.857143
| 9
| 70
| 6.555556
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.114286
| 70
| 2
| 36
| 35
| 0.951613
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
99de3e6351b744c31f81b071b79deb4f7da6cde5
| 1,181
|
py
|
Python
|
geoid_toolkit/__init__.py
|
tsutterley/geoid-toolk
|
7ea7fdfa2e80b5795b2bfe87f3ed316280d2e1e5
|
[
"MIT"
] | 2
|
2021-02-09T06:42:59.000Z
|
2021-05-09T14:18:08.000Z
|
geoid_toolkit/__init__.py
|
tsutterley/geoid-toolk
|
7ea7fdfa2e80b5795b2bfe87f3ed316280d2e1e5
|
[
"MIT"
] | 1
|
2021-09-02T23:00:24.000Z
|
2021-09-02T23:00:24.000Z
|
geoid_toolkit/__init__.py
|
tsutterley/geoid-toolk
|
7ea7fdfa2e80b5795b2bfe87f3ed316280d2e1e5
|
[
"MIT"
] | 3
|
2020-12-29T14:14:37.000Z
|
2021-09-20T05:29:48.000Z
|
import geoid_toolkit.spatial
import geoid_toolkit.utilities
import geoid_toolkit.version
from geoid_toolkit.calculate_geoid_undulation import calculate_geoid_undulation
from geoid_toolkit.calculate_tidal_offset import calculate_tidal_offset
from geoid_toolkit.corrected_geoid_undulation import corrected_geoid_undulation
from geoid_toolkit.gauss_weights import gauss_weights
from geoid_toolkit.geoid_undulation import geoid_undulation
from geoid_toolkit.gravity_anomaly import gravity_anomaly
from geoid_toolkit.gravity_disturbance import gravity_disturbance
from geoid_toolkit.height_anomaly import height_anomaly
from geoid_toolkit.legendre_polynomials import legendre_polynomials
from geoid_toolkit.norm_gravity import norm_gravity
from geoid_toolkit.norm_potential import norm_potential
from geoid_toolkit.read_ICGEM_harmonics import read_ICGEM_harmonics
from geoid_toolkit.read_topography_harmonics import read_topography_harmonics
from geoid_toolkit.real_potential import real_potential
from geoid_toolkit.ref_ellipsoid import ref_ellipsoid
from geoid_toolkit.topographic_potential import topographic_potential
# get version number
__version__ = geoid_toolkit.version.version
| 56.238095
| 79
| 0.916173
| 158
| 1,181
| 6.43038
| 0.202532
| 0.23622
| 0.251969
| 0.070866
| 0.091535
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.064352
| 1,181
| 21
| 80
| 56.238095
| 0.919457
| 0.015241
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.95
| 0
| 0.95
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
99f610f1d823334f389cd07015188935af16e562
| 336
|
py
|
Python
|
exceptions.py
|
mischw/botnet_dissectors
|
a67dbdac740a4f9f97d0507b4fa7ed83f68e99c2
|
[
"MIT"
] | 1
|
2021-09-16T11:20:45.000Z
|
2021-09-16T11:20:45.000Z
|
exceptions.py
|
mischw/botnet_dissectors
|
a67dbdac740a4f9f97d0507b4fa7ed83f68e99c2
|
[
"MIT"
] | null | null | null |
exceptions.py
|
mischw/botnet_dissectors
|
a67dbdac740a4f9f97d0507b4fa7ed83f68e99c2
|
[
"MIT"
] | null | null | null |
class DissectError(Exception):
"""
Error when
- initially parsing / constructing a message (Checksum error, message to small, ...) or
- trying to access data / certain attributes (No payload, payload too small, payload does make no sense)
May also occur when encountering edge cases not yet handled by the dissector
"""
pass
| 37.333333
| 107
| 0.741071
| 46
| 336
| 5.413043
| 0.826087
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1875
| 336
| 8
| 108
| 42
| 0.912088
| 0.928571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
820681ac14d2db39dbe058469c287d780e7f4deb
| 421
|
py
|
Python
|
satsim/generic/services/coordinate_system_service.py
|
0saurabh0/p1
|
af172de29f08e6fe21c810e0e87c06644af16c1f
|
[
"MIT"
] | null | null | null |
satsim/generic/services/coordinate_system_service.py
|
0saurabh0/p1
|
af172de29f08e6fe21c810e0e87c06644af16c1f
|
[
"MIT"
] | null | null | null |
satsim/generic/services/coordinate_system_service.py
|
0saurabh0/p1
|
af172de29f08e6fe21c810e0e87c06644af16c1f
|
[
"MIT"
] | null | null | null |
from simulator.models.basic.service import Service
class CoordinateSystemService(Service):
def __init__(self):
self.coordinate_systems = []
def get_by_name(self, name):
pass
def get_by_index(self, index):
pass
def register(self, name, description, parent, position, rotation):
pass
def transfer(self, coordinate_system, parent, position, rotation):
pass
| 21.05
| 70
| 0.674584
| 48
| 421
| 5.708333
| 0.520833
| 0.076642
| 0.058394
| 0.189781
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.239905
| 421
| 19
| 71
| 22.157895
| 0.85625
| 0
| 0
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.416667
| false
| 0.333333
| 0.083333
| 0
| 0.583333
| 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
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
820a5e6ba69adad7fa13a4a266679389c78dc5b1
| 271
|
py
|
Python
|
euler9.py
|
amsterdatech/project-euler
|
56e4d52f6c8d643e9bbd0718ec818acdb02b8aa1
|
[
"MIT"
] | null | null | null |
euler9.py
|
amsterdatech/project-euler
|
56e4d52f6c8d643e9bbd0718ec818acdb02b8aa1
|
[
"MIT"
] | null | null | null |
euler9.py
|
amsterdatech/project-euler
|
56e4d52f6c8d643e9bbd0718ec818acdb02b8aa1
|
[
"MIT"
] | null | null | null |
a = m^2 - n^2 , b = 2mn , c = m^2 + n^2
def spt(sum):
for m in range(sum):
for n in range(m, sum):
a = m ** 2 - n ** 2
b = 2 * (m * n)
c = m ** 2 + n ** 2
if a + b + c == 1000:
return (a,b,c,)
| 24.636364
| 40
| 0.309963
| 49
| 271
| 1.714286
| 0.326531
| 0.095238
| 0.142857
| 0.190476
| 0.261905
| 0.142857
| 0
| 0
| 0
| 0
| 0
| 0.106061
| 0.512915
| 271
| 11
| 41
| 24.636364
| 0.530303
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 0
| 0
| 1
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 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
|
41a22528e7d19a48f526f6eefb21a47c4e9706cc
| 65
|
py
|
Python
|
bitcoin-notifier/bitcoin_notifier/__main__.py
|
anik-ghosh-au7/bitcoin_notifier
|
74d68ea53a3819a0a0ab778bb74d5efc40c92f9c
|
[
"MIT"
] | 1
|
2021-07-14T18:41:24.000Z
|
2021-07-14T18:41:24.000Z
|
bitcoin-notifier/build/lib/bitcoin_notifier/__main__.py
|
anik-ghosh-au7/bitcoin_notifier
|
74d68ea53a3819a0a0ab778bb74d5efc40c92f9c
|
[
"MIT"
] | null | null | null |
bitcoin-notifier/build/lib/bitcoin_notifier/__main__.py
|
anik-ghosh-au7/bitcoin_notifier
|
74d68ea53a3819a0a0ab778bb74d5efc40c92f9c
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python3
from bitcoin_notifier.cli import main
main()
| 13
| 37
| 0.769231
| 10
| 65
| 4.9
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017241
| 0.107692
| 65
| 4
| 38
| 16.25
| 0.827586
| 0.261538
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 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
|
41c1384aa308ffec8374bd6517a351485d2ff23a
| 140
|
py
|
Python
|
scripts/reset_database.py
|
Watchful1/RedditSubsBot
|
a65733f6a4a5a50b46463887ed38f6a0fb1d89b5
|
[
"MIT"
] | 20
|
2017-02-06T21:06:55.000Z
|
2019-09-15T19:24:38.000Z
|
scripts/reset_database.py
|
Watchful1/RedditSubsBot
|
a65733f6a4a5a50b46463887ed38f6a0fb1d89b5
|
[
"MIT"
] | 108
|
2016-07-18T03:17:25.000Z
|
2019-03-05T18:44:27.000Z
|
scripts/reset_database.py
|
Watchful1/RedditSubsBot
|
a65733f6a4a5a50b46463887ed38f6a0fb1d89b5
|
[
"MIT"
] | 4
|
2017-02-06T21:07:00.000Z
|
2019-07-24T01:21:16.000Z
|
import discord_logging
log = discord_logging.init_logging()
from database import Database
new_db = Database(publish=True)
new_db.close()
| 15.555556
| 36
| 0.807143
| 20
| 140
| 5.4
| 0.6
| 0.259259
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.114286
| 140
| 8
| 37
| 17.5
| 0.870968
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.4
| 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
|
68d1e32e19bd434d236fe9b173b564a637f427c0
| 192
|
py
|
Python
|
multicam/__init__.py
|
nrsyed/multithread-multicam
|
47373da64d8be543c55075b7700cd1996333d005
|
[
"MIT"
] | 2
|
2021-07-21T12:36:47.000Z
|
2021-12-16T23:54:29.000Z
|
multicam/__init__.py
|
nrsyed/multithread-multicam
|
47373da64d8be543c55075b7700cd1996333d005
|
[
"MIT"
] | null | null | null |
multicam/__init__.py
|
nrsyed/multithread-multicam
|
47373da64d8be543c55075b7700cd1996333d005
|
[
"MIT"
] | 1
|
2021-08-04T09:27:56.000Z
|
2021-08-04T09:27:56.000Z
|
from .multicam import show_videos
from .util import get_cam_ids, get_parser, process_args, write_mp4
__all__ = [
"get_cam_ids", "show_videos", "get_parser", "process_args", "write_mp4"
]
| 27.428571
| 75
| 0.755208
| 29
| 192
| 4.448276
| 0.517241
| 0.155039
| 0.139535
| 0.310078
| 0.434109
| 0.434109
| 0
| 0
| 0
| 0
| 0
| 0.011976
| 0.130208
| 192
| 6
| 76
| 32
| 0.760479
| 0
| 0
| 0
| 0
| 0
| 0.276042
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
68e70b6654031c943debee489aaa4d08f774e50e
| 68
|
py
|
Python
|
ioflo/app/__init__.py
|
BradyHammond/ioflo
|
177ac656d7c4ff801aebb0d8b401db365a5248ce
|
[
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 128
|
2015-01-14T12:26:56.000Z
|
2021-11-06T07:09:29.000Z
|
ioflo/app/__init__.py
|
BradyHammond/ioflo
|
177ac656d7c4ff801aebb0d8b401db365a5248ce
|
[
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 17
|
2015-01-28T18:26:50.000Z
|
2020-11-19T22:08:06.000Z
|
ioflo/app/__init__.py
|
BradyHammond/ioflo
|
177ac656d7c4ff801aebb0d8b401db365a5248ce
|
[
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 29
|
2015-01-27T23:28:31.000Z
|
2021-05-04T16:37:30.000Z
|
""" app package """
#print("\nPackage at {0}".format( __path__[0]))
| 22.666667
| 47
| 0.602941
| 9
| 68
| 4.111111
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.033333
| 0.117647
| 68
| 2
| 48
| 34
| 0.583333
| 0.867647
| 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
|
68f3afcb1fb049fb6a6d1f3dae2ff3b0895217bc
| 1,141
|
py
|
Python
|
Programming/python/python in depth/Python-JSON/api.py
|
shreejitverma/Competitive-Programming
|
579c3c65de9afdc2aad562485f9369a6ad51e036
|
[
"MIT"
] | 2
|
2022-02-18T05:14:28.000Z
|
2022-03-08T07:00:08.000Z
|
Programming/python/python in depth/Python-JSON/api.py
|
shreejitverma/Competitive-Programming
|
579c3c65de9afdc2aad562485f9369a6ad51e036
|
[
"MIT"
] | 6
|
2022-01-13T04:31:04.000Z
|
2022-03-12T01:06:16.000Z
|
Programming/python/python in depth/Python-JSON/api.py
|
shreejitverma/Competitive-Programming
|
579c3c65de9afdc2aad562485f9369a6ad51e036
|
[
"MIT"
] | 2
|
2022-02-14T19:53:53.000Z
|
2022-02-18T05:14:30.000Z
|
import json
# from urllib.request import urlopen
# with urlopen("https://finance.yahoo.com/webservice/v1/symbols/allcurrencies/quote?format=json") as response:
# source = response.read()
# data = json.loads(source)
# # print(json.dumps(data, indent=2))
# usd_rates = dict()
# for item in data['list']['resources']:
# name = item['resource']['fields']['name']
# price = item['resource']['fields']['price']
# usd_rates[name] = price
# print(50 * float(usd_rates['USD/INR']))
# b = json.dumps()
# student = {}
# student["a"] = {"rollno": 2001, "age": 18, "mark": [85, 65, 65]}
# student["b"] = {"rollno": 2002, "age": 18, "mark": [85, 55, 65]}
# student["c"] = {"rollno": 2003, "age": 18, "mark": [85, 95, 65]}
# rank = {}
# for key, value in student.items():
# smark = sum(student[key]["mark"])
# student[key].update({"total_marks": smark})
# s = sorted(student, key=lambda x: student[x]["total_marks"], reverse=True)
# rank = 1
# for key in s:
# student[key].update({"rank": rank})
# rank += 1
# print("*** Rank of each student based on total marks *** \n")
# for i in student.items():
# print(i)
| 29.25641
| 110
| 0.60298
| 159
| 1,141
| 4.295597
| 0.496855
| 0.058565
| 0.039531
| 0.048316
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.044397
| 0.170903
| 1,141
| 38
| 111
| 30.026316
| 0.67759
| 0.930762
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ec21f03420019d766132bfd01d3adacc45d30934
| 2,144
|
py
|
Python
|
docs/jnpr_healthbot_swagger/test/test_services_api.py
|
dmontagner/healthbot-py-client
|
0952e0a9e7ed63c9fe84879f40407c3327735252
|
[
"Apache-2.0"
] | 10
|
2019-10-23T12:54:37.000Z
|
2022-02-07T19:24:30.000Z
|
docs/jnpr_healthbot_swagger/test/test_services_api.py
|
dmontagner/healthbot-py-client
|
0952e0a9e7ed63c9fe84879f40407c3327735252
|
[
"Apache-2.0"
] | 5
|
2019-09-30T04:29:25.000Z
|
2022-02-16T12:21:06.000Z
|
docs/jnpr_healthbot_swagger/test/test_services_api.py
|
dmontagner/healthbot-py-client
|
0952e0a9e7ed63c9fe84879f40407c3327735252
|
[
"Apache-2.0"
] | 4
|
2019-09-30T01:17:48.000Z
|
2020-08-25T07:27:54.000Z
|
# coding: utf-8
"""
Healthbot APIs
API interface for Healthbot application # noqa: E501
OpenAPI spec version: 1.0.0
Contact: healthbot-hackers@juniper.net
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import swagger_client
from swagger_client.api.services_api import ServicesApi # noqa: E501
from swagger_client.rest import ApiException
class TestServicesApi(unittest.TestCase):
"""ServicesApi unit test stubs"""
def setUp(self):
self.api = swagger_client.api.services_api.ServicesApi() # noqa: E501
def tearDown(self):
pass
def test_create_services_device_groups_device_group_by_device_group_name(self):
"""Test case for create_services_device_groups_device_group_by_device_group_name
Start a device-group's services. # noqa: E501
"""
pass
def test_create_services_network_group_by_network_group_name(self):
"""Test case for create_services_network_group_by_network_group_name
Start a network-group's services. # noqa: E501
"""
pass
def test_delete_services_device_groups_device_group_by_device_group_name(self):
"""Test case for delete_services_device_groups_device_group_by_device_group_name
Stop and remove a device-group's services. # noqa: E501
"""
pass
def test_delete_services_network_group_by_network_group_name(self):
"""Test case for delete_services_network_group_by_network_group_name
Stop and remove a network-group's services. # noqa: E501
"""
pass
def test_retrieve_services_device_groups_device_group_device_group(self):
"""Test case for retrieve_services_device_groups_device_group_device_group
Get running `device-group-name`s. # noqa: E501
"""
pass
def test_retrieve_services_network_group(self):
"""Test case for retrieve_services_network_group
Get running `network-group-name`s # noqa: E501
"""
pass
if __name__ == '__main__':
unittest.main()
| 27.844156
| 88
| 0.714552
| 279
| 2,144
| 5.100358
| 0.243728
| 0.115952
| 0.046381
| 0.109628
| 0.64863
| 0.602952
| 0.562193
| 0.501757
| 0.365425
| 0.365425
| 0
| 0.018398
| 0.214086
| 2,144
| 76
| 89
| 28.210526
| 0.826113
| 0.459422
| 0
| 0.291667
| 1
| 0
| 0.008065
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0.291667
| 0.208333
| 0
| 0.583333
| 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
|
ec2e06c2f5682edc26a849f67e1f11e827b60afe
| 159
|
py
|
Python
|
recipes/stages/_base_/data/coco_resize_person.py
|
openvinotoolkit/model_preparation_algorithm
|
8d36bf5944837b7a3d22fc2c3a4cb93423619fc2
|
[
"Apache-2.0"
] | null | null | null |
recipes/stages/_base_/data/coco_resize_person.py
|
openvinotoolkit/model_preparation_algorithm
|
8d36bf5944837b7a3d22fc2c3a4cb93423619fc2
|
[
"Apache-2.0"
] | null | null | null |
recipes/stages/_base_/data/coco_resize_person.py
|
openvinotoolkit/model_preparation_algorithm
|
8d36bf5944837b7a3d22fc2c3a4cb93423619fc2
|
[
"Apache-2.0"
] | null | null | null |
_base_ = [
'./coco_resize.py'
]
data = dict(
train=dict(classes=('person',)),
val=dict(classes=('person',)),
test=dict(classes=('person',))
)
| 15.9
| 36
| 0.566038
| 18
| 159
| 4.833333
| 0.611111
| 0.37931
| 0.586207
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.18239
| 159
| 9
| 37
| 17.666667
| 0.669231
| 0
| 0
| 0
| 0
| 0
| 0.213836
| 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
|
ec3c6342a08437cbb6a27d8b3a3d4dca937dec70
| 69
|
py
|
Python
|
daterangefilter/__init__.py
|
an42rus/django-daterangefilter
|
a44137c34c1f80b4647039a6dcde8e4a586eea85
|
[
"MIT"
] | 21
|
2019-01-14T18:38:21.000Z
|
2022-01-05T16:32:22.000Z
|
daterangefilter/__init__.py
|
an42rus/django-daterangefilter
|
a44137c34c1f80b4647039a6dcde8e4a586eea85
|
[
"MIT"
] | 9
|
2018-12-27T08:42:18.000Z
|
2022-02-23T21:27:47.000Z
|
daterangefilter/__init__.py
|
an42rus/django-daterangefilter
|
a44137c34c1f80b4647039a6dcde8e4a586eea85
|
[
"MIT"
] | 16
|
2019-11-22T06:28:38.000Z
|
2022-03-23T20:58:12.000Z
|
default_app_config = 'daterangefilter.apps.DateRangeFilterAppConfig'
| 34.5
| 68
| 0.884058
| 6
| 69
| 9.833333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.043478
| 69
| 1
| 69
| 69
| 0.893939
| 0
| 0
| 0
| 0
| 0
| 0.652174
| 0.652174
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ec4a142610cf446ec1cf83598b3b2d1b20aa4ba7
| 740
|
py
|
Python
|
Plugins/UnrealEnginePython/Binaries/Win64/Lib/site-packages/tensorflow/_api/v1/saved_model/signature_def_utils/__init__.py
|
JustinACoder/H22-GR3-UnrealAI
|
361eb9ef1147f8a2991e5f98c4118cd823184adf
|
[
"MIT"
] | 6
|
2022-02-04T18:12:24.000Z
|
2022-03-21T23:57:12.000Z
|
Lib/site-packages/tensorflow/_api/v1/saved_model/signature_def_utils/__init__.py
|
shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings
|
1fa4cd6a566c8745f455fc3d2273208f21f88ced
|
[
"bzip2-1.0.6"
] | null | null | null |
Lib/site-packages/tensorflow/_api/v1/saved_model/signature_def_utils/__init__.py
|
shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings
|
1fa4cd6a566c8745f455fc3d2273208f21f88ced
|
[
"bzip2-1.0.6"
] | 1
|
2022-02-08T03:53:23.000Z
|
2022-02-08T03:53:23.000Z
|
# This file is MACHINE GENERATED! Do not edit.
# Generated by: tensorflow/python/tools/api/generator/create_python_api.py script.
"""SignatureDef utility functions.
Utility functions for building and inspecting SignatureDef protos.
"""
from __future__ import print_function
from tensorflow.python.saved_model.signature_def_utils import build_signature_def
from tensorflow.python.saved_model.signature_def_utils import classification_signature_def
from tensorflow.python.saved_model.signature_def_utils import is_valid_signature
from tensorflow.python.saved_model.signature_def_utils import predict_signature_def
from tensorflow.python.saved_model.signature_def_utils import regression_signature_def
del print_function
| 41.111111
| 91
| 0.852703
| 99
| 740
| 6.040404
| 0.414141
| 0.180602
| 0.167224
| 0.20903
| 0.503344
| 0.503344
| 0.503344
| 0.503344
| 0.503344
| 0.326087
| 0
| 0
| 0.1
| 740
| 17
| 92
| 43.529412
| 0.897898
| 0.305405
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.857143
| 0
| 0.857143
| 0.285714
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
6b4f35790c7d496a76a4ef578c5cd611be252aa1
| 65
|
py
|
Python
|
cherche/similarity/__init__.py
|
raphaelsty/cherche
|
c9db846fc80451d71056803250ff649a063af057
|
[
"MIT"
] | 193
|
2022-01-08T13:21:08.000Z
|
2022-03-26T17:24:18.000Z
|
cherche/similarity/__init__.py
|
NicolasBizzozzero/cherche
|
3869206438a15ff9c14d3d36468b578f193b9a57
|
[
"MIT"
] | 3
|
2022-02-08T01:17:22.000Z
|
2022-03-17T10:32:57.000Z
|
cherche/similarity/__init__.py
|
NicolasBizzozzero/cherche
|
3869206438a15ff9c14d3d36468b578f193b9a57
|
[
"MIT"
] | 7
|
2022-01-09T11:27:29.000Z
|
2022-01-23T08:58:01.000Z
|
from .similarity import cosine, dot
__all__ = ["cosine", "dot"]
| 16.25
| 35
| 0.692308
| 8
| 65
| 5.125
| 0.75
| 0.439024
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153846
| 65
| 3
| 36
| 21.666667
| 0.745455
| 0
| 0
| 0
| 0
| 0
| 0.138462
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
6b749c28f33481339f37f4f5887f4161f9b0b486
| 994
|
py
|
Python
|
app/models.py
|
martinusdawan/micro-auth-gemin
|
642edce24fd8ca053ef03b8ddf8fb74e73f03959
|
[
"Apache-2.0"
] | null | null | null |
app/models.py
|
martinusdawan/micro-auth-gemin
|
642edce24fd8ca053ef03b8ddf8fb74e73f03959
|
[
"Apache-2.0"
] | null | null | null |
app/models.py
|
martinusdawan/micro-auth-gemin
|
642edce24fd8ca053ef03b8ddf8fb74e73f03959
|
[
"Apache-2.0"
] | null | null | null |
from datetime import datetime
# from sqlalchemy import Column
from sqlalchemy import String, Date, Text, DateTime, Boolean
# from app import db
# individuals = db.Table(
# 'individuals', db,
# db.Column('individuals_id', db.String(25), primary_key=True),
# db.Column('firstname', db.String(40), nullable=True),
# db.Column('lastname', db.String(40), nullable=True),
# db.Column('lastname', db.String(40), nullable=True),
# )
# class Individuals(db.Model):
# __tablename__ = 'individuals'
# individuals_id = db.Column(String(25), primary_key=True)
# firstname = db.Column(String(40), nullable=True)
# lastname = db.Column(String(40), nullable=True)
# phone = db.Column(String(14), nullable=False, unique=True)
# dateofbirth = db.Column(Date, nullable=False, default='1900-01-01')
# address = db.Column(Text(), nullable=False)
# created_at = db.Column(DateTime, default=datetime.now)
# confirmed = db.Column(Boolean, default=False)
| 38.230769
| 73
| 0.685111
| 127
| 994
| 5.291339
| 0.299213
| 0.142857
| 0.119048
| 0.14881
| 0.294643
| 0.229167
| 0.145833
| 0.145833
| 0.145833
| 0.145833
| 0
| 0.028777
| 0.160966
| 994
| 25
| 74
| 39.76
| 0.776978
| 0.861167
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
6b923a6a91078c12dcd57f11794e51fde76b1c31
| 407
|
py
|
Python
|
tests/stdlib/test_threading_local.py
|
li-caspar/eventlet_0.30.2
|
a431842e29c26e46cfcfff60c93ca92e07663044
|
[
"MIT"
] | 5,079
|
2015-01-01T03:39:46.000Z
|
2022-03-31T07:38:22.000Z
|
desktop/core/ext-py/eventlet-0.24.1/tests/stdlib/test_threading_local.py
|
zks888/hue
|
93a8c370713e70b216c428caa2f75185ef809deb
|
[
"Apache-2.0"
] | 1,623
|
2015-01-01T08:06:24.000Z
|
2022-03-30T19:48:52.000Z
|
desktop/core/ext-py/eventlet-0.24.1/tests/stdlib/test_threading_local.py
|
zks888/hue
|
93a8c370713e70b216c428caa2f75185ef809deb
|
[
"Apache-2.0"
] | 2,033
|
2015-01-04T07:18:02.000Z
|
2022-03-28T19:55:47.000Z
|
from eventlet import patcher
from eventlet.green import thread
from eventlet.green import threading
from eventlet.green import time
# hub requires initialization before test can run
from eventlet import hubs
hubs.get_hub()
patcher.inject(
'test.test_threading_local',
globals(),
('time', time),
('thread', thread),
('threading', threading))
if __name__ == '__main__':
test_main()
| 21.421053
| 49
| 0.727273
| 51
| 407
| 5.568627
| 0.45098
| 0.211268
| 0.179577
| 0.242958
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.17199
| 407
| 18
| 50
| 22.611111
| 0.84273
| 0.115479
| 0
| 0
| 0
| 0
| 0.145251
| 0.069832
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.357143
| 0
| 0.357143
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
6ba2862e0111f398527c3f6ca79c13c04e1af4e3
| 93
|
py
|
Python
|
authstuff/apps.py
|
cmd-ev/voctoconf
|
5d2c1ca4f1da01b66983f5a562eb8eb6babe0452
|
[
"MIT"
] | 21
|
2020-08-24T13:27:03.000Z
|
2021-10-15T09:17:46.000Z
|
authstuff/apps.py
|
cmd-ev/voctoconf
|
5d2c1ca4f1da01b66983f5a562eb8eb6babe0452
|
[
"MIT"
] | null | null | null |
authstuff/apps.py
|
cmd-ev/voctoconf
|
5d2c1ca4f1da01b66983f5a562eb8eb6babe0452
|
[
"MIT"
] | 5
|
2020-08-25T16:34:51.000Z
|
2021-02-19T04:48:10.000Z
|
from django.apps import AppConfig
class AuthstuffConfig(AppConfig):
name = 'authstuff'
| 15.5
| 33
| 0.763441
| 10
| 93
| 7.1
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16129
| 93
| 5
| 34
| 18.6
| 0.910256
| 0
| 0
| 0
| 0
| 0
| 0.096774
| 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
|
6bc34e29cf6538f1598410dae30ede925d84dcee
| 986
|
py
|
Python
|
servicecatalog_puppet/workflow/apps/app_section_task.py
|
richardmilnerwatts/aws-service-catalog-puppet
|
cd866860073b0e43722cc941bacd38df4e84f7a1
|
[
"Apache-2.0"
] | 66
|
2019-04-23T12:10:27.000Z
|
2022-03-31T19:47:09.000Z
|
servicecatalog_puppet/workflow/apps/app_section_task.py
|
richardmilnerwatts/aws-service-catalog-puppet
|
cd866860073b0e43722cc941bacd38df4e84f7a1
|
[
"Apache-2.0"
] | 283
|
2019-04-18T22:21:20.000Z
|
2022-03-31T10:04:42.000Z
|
servicecatalog_puppet/workflow/apps/app_section_task.py
|
richardmilnerwatts/aws-service-catalog-puppet
|
cd866860073b0e43722cc941bacd38df4e84f7a1
|
[
"Apache-2.0"
] | 47
|
2019-05-14T12:45:57.000Z
|
2022-03-25T17:54:22.000Z
|
# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
from servicecatalog_puppet import constants
from servicecatalog_puppet.workflow.apps import app_for_account_and_region_task
from servicecatalog_puppet.workflow.apps import app_for_account_task
from servicecatalog_puppet.workflow.apps import app_for_region_task
from servicecatalog_puppet.workflow.apps import app_task
from servicecatalog_puppet.workflow.generic import generic_section_task
class AppSectionTask(generic_section_task.GenericSectionTask):
section_name_singular = constants.APP
section_name = constants.APPS
for_region_task_klass = app_for_region_task.AppForRegionTask
for_account_task_klass = app_for_account_task.AppForAccountTask
for_account_and_region_task_klass = (
app_for_account_and_region_task.AppForAccountAndRegionTask
)
task_klass = app_task.AppTask
item_name = "app_name"
supports_spoke_mode = True
| 42.869565
| 79
| 0.838742
| 130
| 986
| 5.953846
| 0.361538
| 0.139535
| 0.186047
| 0.206718
| 0.468992
| 0.330749
| 0.293282
| 0.293282
| 0.293282
| 0
| 0
| 0.006889
| 0.116633
| 986
| 22
| 80
| 44.818182
| 0.881745
| 0.109533
| 0
| 0
| 0
| 0
| 0.009153
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.352941
| 0
| 0.882353
| 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
|
6be2067ee61ce5f5ab88b8a775b0e283e73f42db
| 318
|
py
|
Python
|
scripts/v120_lines.py
|
selinabitting/compas_view2
|
cac8abaf8fbde13ceabe35324be92779ea2e535f
|
[
"MIT"
] | 5
|
2021-03-03T13:07:31.000Z
|
2022-02-05T01:07:31.000Z
|
scripts/v120_lines.py
|
selinabitting/compas_view2
|
cac8abaf8fbde13ceabe35324be92779ea2e535f
|
[
"MIT"
] | 91
|
2021-01-29T14:26:28.000Z
|
2022-03-22T17:15:58.000Z
|
scripts/v120_lines.py
|
selinabitting/compas_view2
|
cac8abaf8fbde13ceabe35324be92779ea2e535f
|
[
"MIT"
] | 6
|
2021-01-29T11:13:45.000Z
|
2022-02-05T00:56:24.000Z
|
from compas_view2 import app
from compas.geometry import Line
from random import random
viewer = app.App()
for i in range(10):
line = Line([random()*20, random()*20, random()*20], [random()*20, random()*20, random()*20])
viewer.add(line, linecolor=(random(), random(), random()), linewidth=2)
viewer.show()
| 26.5
| 97
| 0.679245
| 47
| 318
| 4.574468
| 0.425532
| 0.223256
| 0.325581
| 0.372093
| 0.223256
| 0.223256
| 0.223256
| 0.223256
| 0.223256
| 0.223256
| 0
| 0.058394
| 0.138365
| 318
| 11
| 98
| 28.909091
| 0.726277
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.375
| 0
| 0.375
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
6be8a4fedc3d685e82d779dec41704b2e26ff497
| 124
|
py
|
Python
|
decompyle/test/test_iterators.py
|
dkudriavtsev/unholy
|
ea44e7aaf62d17574d85407d85af286c9879c366
|
[
"MIT"
] | 88
|
2015-02-06T15:27:13.000Z
|
2021-11-25T03:44:20.000Z
|
decompyle/test/test_iterators.py
|
dkudriavtsev/unholy
|
ea44e7aaf62d17574d85407d85af286c9879c366
|
[
"MIT"
] | 1
|
2015-12-03T07:19:40.000Z
|
2015-12-06T00:49:18.000Z
|
decompyle/test/test_iterators.py
|
dkudriavtsev/unholy
|
ea44e7aaf62d17574d85407d85af286c9879c366
|
[
"MIT"
] | 19
|
2015-06-19T14:49:49.000Z
|
2022-01-10T02:45:12.000Z
|
for i in range(20):
print i,
print
for i in range(10):
print i,
#if i == 10: break
else:
print 'The End'
| 10.333333
| 22
| 0.548387
| 23
| 124
| 2.956522
| 0.521739
| 0.117647
| 0.176471
| 0.323529
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.072289
| 0.330645
| 124
| 11
| 23
| 11.272727
| 0.746988
| 0.137097
| 0
| 0.285714
| 0
| 0
| 0.066667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.571429
| 1
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
6bf736010ab4eba177d144a0ebc7f0bb7cd250a5
| 2,126
|
py
|
Python
|
tests/client_simulation.py
|
irschad/ContainerizeApp
|
8194faf39607f73be48b59dca373a579e1f8005a
|
[
"MIT"
] | null | null | null |
tests/client_simulation.py
|
irschad/ContainerizeApp
|
8194faf39607f73be48b59dca373a579e1f8005a
|
[
"MIT"
] | null | null | null |
tests/client_simulation.py
|
irschad/ContainerizeApp
|
8194faf39607f73be48b59dca373a579e1f8005a
|
[
"MIT"
] | null | null | null |
"""Simulates client requests
Requires running server!!!
make start-api
"""
import requests
import json
import base64
#Failed Query Parameters Simulation
url = "http://0.0.0.0:5001/api/aggregate"
with open("../ext/input.csv", "rb") as f:
data = base64.b64encode(f.read())
payload = {'column':'count'} #Not enough parameters
headers = {'Content-Type': 'application/json'}
r = requests.put(url, data=data, params=payload, headers=headers)
print("status code: ", r.status_code)
print("response body: ", json.loads(r.content))
# Should get this:
# 2017-06-19 20:40:17,915 - __main__ - INFO - Content-Type is set to: application/json
# 2017-06-19 20:40:17,915 - __main__ - INFO - Request Query String: b'column=count'
# 2017-06-19 20:40:17,916 - __main__ - INFO - column: [count] and group_by: [None] Query Parameter values
# 2017-06-19 20:40:17,916 - __main__ - INFO - Query Parameter column or group_by not set
# 127.0.0.1 - - [19/Jun/2017 20:40:17] "PUT /api/aggregate?column=count HTTP/1.1" 400 -
#Successful Query Parameters Simulation
url = "http://0.0.0.0:5001/api/aggregate"
with open("../ext/input.csv", "rb") as f:
data = base64.b64encode(f.read())
payload = {'column':'count', 'group_by': 'last_name'}
headers = {'Content-Type': 'application/json'}
r = requests.put(url, data=data, params=payload, headers=headers)
print("status code: ", r.status_code)
print("response body: ", json.loads(r.content))
# Should get this:
# 2017-06-19 20:40:17,919 - __main__ - INFO - Content-Type is set to: application/json
# 2017-06-19 20:40:17,919 - __main__ - INFO - Request Query String: b'column=count&group_by=last_name'
# 2017-06-19 20:40:17,919 - __main__ - INFO - column: [count] and group_by: [last_name] Query Parameter values
# 2017-06-19 20:40:17,919 - __main__ - INFO - Decoding data of size: 161
# 2017-06-19 20:40:17,927 - __main__ - INFO - {"first_name":{"3":"john","10":"piers","15":"sam","17":"kristen","19":"john"},"last_name":{"3":"lee","10":"smith","15":"eagle","17":"smith","19":"eagle"}}
# 127.0.0.1 - - [19/Jun/2017 20:40:17] "PUT /api/aggregate?column=count&group_by=last_name HTTP/1.1" 200 -
| 45.234043
| 200
| 0.688617
| 351
| 2,126
| 4.02849
| 0.287749
| 0.031117
| 0.046676
| 0.063649
| 0.7843
| 0.7843
| 0.742574
| 0.712871
| 0.670438
| 0.551627
| 0
| 0.131833
| 0.122295
| 2,126
| 46
| 201
| 46.217391
| 0.625938
| 0.617592
| 0
| 0.736842
| 0
| 0
| 0.320253
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.157895
| 0
| 0.157895
| 0.210526
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
d41621f3bf021f8a627f13df9c1ad2a35444e92b
| 197
|
py
|
Python
|
tests/__init__.py
|
Subzidion/uplink-python
|
2fc4fc65e15b157a7d6c76dc72ba1b2bd5fb4428
|
[
"Apache-2.0"
] | null | null | null |
tests/__init__.py
|
Subzidion/uplink-python
|
2fc4fc65e15b157a7d6c76dc72ba1b2bd5fb4428
|
[
"Apache-2.0"
] | null | null | null |
tests/__init__.py
|
Subzidion/uplink-python
|
2fc4fc65e15b157a7d6c76dc72ba1b2bd5fb4428
|
[
"Apache-2.0"
] | null | null | null |
import os
import sys
import unittest
def run():
tests = unittest.TestLoader().discover('.')
passed = unittest.TextTestRunner().run(tests).wasSuccessful()
sys.exit(0 if passed else 1)
| 19.7
| 65
| 0.700508
| 25
| 197
| 5.52
| 0.68
| 0.115942
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012195
| 0.167513
| 197
| 9
| 66
| 21.888889
| 0.829268
| 0
| 0
| 0
| 0
| 0
| 0.005076
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0.285714
| 0.428571
| 0
| 0.571429
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
d419b70ec1b2685e3912a4e81376f0177ca6d128
| 140
|
py
|
Python
|
vkwave/types/extension_objects.py
|
krasnovmv/vkwave
|
e0db86cc16f97797765aadfb811ec87ff7945b1f
|
[
"MIT"
] | null | null | null |
vkwave/types/extension_objects.py
|
krasnovmv/vkwave
|
e0db86cc16f97797765aadfb811ec87ff7945b1f
|
[
"MIT"
] | null | null | null |
vkwave/types/extension_objects.py
|
krasnovmv/vkwave
|
e0db86cc16f97797765aadfb811ec87ff7945b1f
|
[
"MIT"
] | null | null | null |
import pydantic
class MessagesSendPeerIdsData(pydantic.BaseModel):
peer_id: int = pydantic.Field(
..., description="",
)
| 15.555556
| 50
| 0.664286
| 12
| 140
| 7.666667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.214286
| 140
| 8
| 51
| 17.5
| 0.836364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.2
| 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
| 0
| 0
| 1
| 0
|
0
| 4
|
d424aa50e1d509296822238a5c7855e786a14d5f
| 165
|
py
|
Python
|
clock-web/handlers/clock.py
|
somenkovnikita/clock-web
|
6959a138fcab5b8085e9176196e4393d34504db8
|
[
"MIT"
] | null | null | null |
clock-web/handlers/clock.py
|
somenkovnikita/clock-web
|
6959a138fcab5b8085e9176196e4393d34504db8
|
[
"MIT"
] | null | null | null |
clock-web/handlers/clock.py
|
somenkovnikita/clock-web
|
6959a138fcab5b8085e9176196e4393d34504db8
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
import tornado.web
class ClockHandler(tornado.web.RequestHandler):
def get(self):
self.render("index.html", title="clock-web")
| 20.625
| 52
| 0.660606
| 21
| 165
| 5.190476
| 0.809524
| 0.183486
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007246
| 0.163636
| 165
| 7
| 53
| 23.571429
| 0.782609
| 0.127273
| 0
| 0
| 0
| 0
| 0.133803
| 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
|
d45de6999ed91e04043f193cb5d06a0026a11276
| 85
|
py
|
Python
|
mysite/slhpa/apps.py
|
jeffb4real/SLHPA-Web-App
|
cdb837ee24d790d48e8280b3d085be12cfdc52bb
|
[
"MIT"
] | 1
|
2019-02-28T09:16:43.000Z
|
2019-02-28T09:16:43.000Z
|
mysite/slhpa/apps.py
|
jeffb4real/SLHPA-Web-App
|
cdb837ee24d790d48e8280b3d085be12cfdc52bb
|
[
"MIT"
] | 9
|
2019-02-08T05:01:53.000Z
|
2021-04-08T19:12:44.000Z
|
mysite/slhpa/apps.py
|
jeffb4real/SLHPA-Web-App
|
cdb837ee24d790d48e8280b3d085be12cfdc52bb
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class SlhpaConfig(AppConfig):
name = 'slhpa'
| 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
|
00fcd72af8e945b19f494e7845ed96d5722bb4fa
| 152
|
py
|
Python
|
tests/resources/system_tests/test_exceptions/unhandled_exceptions_attach.py
|
rozuur/ptvsd
|
046fd0f054b2eed91ec5df02e5f36151b71e36b1
|
[
"MIT"
] | null | null | null |
tests/resources/system_tests/test_exceptions/unhandled_exceptions_attach.py
|
rozuur/ptvsd
|
046fd0f054b2eed91ec5df02e5f36151b71e36b1
|
[
"MIT"
] | null | null | null |
tests/resources/system_tests/test_exceptions/unhandled_exceptions_attach.py
|
rozuur/ptvsd
|
046fd0f054b2eed91ec5df02e5f36151b71e36b1
|
[
"MIT"
] | null | null | null |
import sys
import ptvsd
ptvsd.enable_attach((sys.argv[1], sys.argv[2]))
ptvsd.wait_for_attach()
raise ArithmeticError('Hello')
sys.stdout.write('end')
| 19
| 47
| 0.763158
| 24
| 152
| 4.708333
| 0.666667
| 0.123894
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014184
| 0.072368
| 152
| 7
| 48
| 21.714286
| 0.787234
| 0
| 0
| 0
| 0
| 0
| 0.052632
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 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
|
2e03c01ce80543994e59c4041133dba0bd4e4c9a
| 215
|
py
|
Python
|
src/jt/jpype/_jexception.py
|
karpierz/jtypes.jpype
|
225b214757ef7f7e03c4569028906d8194e3345d
|
[
"Apache-2.0"
] | 5
|
2019-01-08T02:33:55.000Z
|
2019-11-08T21:00:45.000Z
|
src/jt/jpype/_jexception.py
|
karpierz/jtypes.jpype
|
225b214757ef7f7e03c4569028906d8194e3345d
|
[
"Apache-2.0"
] | 2
|
2018-06-29T15:46:34.000Z
|
2020-11-15T01:01:10.000Z
|
src/jt/jpype/_jexception.py
|
karpierz/jtypes.jpype
|
225b214757ef7f7e03c4569028906d8194e3345d
|
[
"Apache-2.0"
] | null | null | null |
# Copyright 2013-2018 Adam Karpierz
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
from ..jtypes._jclass import JavaException
def JException(t):
return t.PYEXC
| 19.545455
| 48
| 0.753488
| 32
| 215
| 5.03125
| 0.84375
| 0.024845
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.065217
| 0.144186
| 215
| 10
| 49
| 21.5
| 0.809783
| 0.572093
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
2e04f5aa57dd7107f298cd496746f349ecae5039
| 78
|
py
|
Python
|
Chapter03/06_wav.py
|
PacktPublishing/MicroPython-Cookbook
|
ffd6aa15c303459570a89ba31b5bc734f05cb387
|
[
"MIT"
] | 16
|
2019-07-01T16:24:22.000Z
|
2022-03-03T06:54:57.000Z
|
Chapter03/06_wav.py
|
ccwu0918/MicroPython-Cookbook
|
ffd6aa15c303459570a89ba31b5bc734f05cb387
|
[
"MIT"
] | null | null | null |
Chapter03/06_wav.py
|
ccwu0918/MicroPython-Cookbook
|
ffd6aa15c303459570a89ba31b5bc734f05cb387
|
[
"MIT"
] | 19
|
2019-04-17T08:30:12.000Z
|
2022-01-14T03:05:37.000Z
|
from adafruit_circuitplayground.express import cpx
cpx.play_file('hello.wav')
| 26
| 50
| 0.846154
| 11
| 78
| 5.818182
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.064103
| 78
| 2
| 51
| 39
| 0.876712
| 0
| 0
| 0
| 0
| 0
| 0.115385
| 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
|
2e5982c95825be5c72c966871d4fe0f6664d06d7
| 131
|
py
|
Python
|
dlsitebackup/__init__.py
|
heshuiiii/dlsitebackup
|
e97560660407e971801db3d84b1d31fb3fca496f
|
[
"MIT"
] | 1
|
2021-11-21T05:53:33.000Z
|
2021-11-21T05:53:33.000Z
|
dlsitebackup/__init__.py
|
heshuiiii/dlsitebackup
|
e97560660407e971801db3d84b1d31fb3fca496f
|
[
"MIT"
] | null | null | null |
dlsitebackup/__init__.py
|
heshuiiii/dlsitebackup
|
e97560660407e971801db3d84b1d31fb3fca496f
|
[
"MIT"
] | 1
|
2021-07-23T07:47:24.000Z
|
2021-07-23T07:47:24.000Z
|
# Copyright (c) 2020 bachelorwhc
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
| 21.833333
| 51
| 0.717557
| 17
| 131
| 5.529412
| 0.941176
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.037383
| 0.183206
| 131
| 5
| 52
| 26.2
| 0.841122
| 0.885496
| 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
|
2e5dcdeb8e9185dfc4981cc63def6405931ea889
| 246
|
py
|
Python
|
plugins/auth/crypto/algo_base.py
|
UltrosBot/Ultros
|
639efc11f73ebf7e8f47f0554aced00a559d9e2d
|
[
"Artistic-2.0"
] | 16
|
2015-01-02T00:16:11.000Z
|
2019-06-03T06:23:11.000Z
|
plugins/auth/crypto/algo_base.py
|
UltrosBot/Ultros
|
639efc11f73ebf7e8f47f0554aced00a559d9e2d
|
[
"Artistic-2.0"
] | 31
|
2015-01-18T12:14:53.000Z
|
2018-01-07T13:32:29.000Z
|
plugins/auth/crypto/algo_base.py
|
UltrosBot/Ultros
|
639efc11f73ebf7e8f47f0554aced00a559d9e2d
|
[
"Artistic-2.0"
] | 9
|
2015-02-13T09:38:53.000Z
|
2020-11-29T19:59:32.000Z
|
# coding=utf-8
__author__ = 'Gareth Coles'
class BaseAlgorithm(object):
def hash(self, value, salt):
pass
def check(self, hash, value, salt):
return hash == self.hash(value, salt)
def gen_salt(self):
pass
| 16.4
| 45
| 0.609756
| 32
| 246
| 4.53125
| 0.5625
| 0.186207
| 0.17931
| 0.234483
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005587
| 0.272358
| 246
| 14
| 46
| 17.571429
| 0.804469
| 0.04878
| 0
| 0.25
| 0
| 0
| 0.051724
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.375
| false
| 0.25
| 0
| 0.125
| 0.625
| 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
| 1
| 0
| 1
| 0
| 0
|
0
| 4
|
cf109f2045a9e78f459c18a01d8e7b10f2fa5fac
| 142
|
py
|
Python
|
vendor/timezones/timezones_tests/__init__.py
|
Paul3MK/NewsBlur
|
f912d100c2867e5366fca92abadc50d4253a41d8
|
[
"MIT"
] | 3,073
|
2015-01-01T07:20:18.000Z
|
2022-03-31T20:33:41.000Z
|
vendor/timezones/timezones_tests/__init__.py
|
Paul3MK/NewsBlur
|
f912d100c2867e5366fca92abadc50d4253a41d8
|
[
"MIT"
] | 1,054
|
2015-01-02T13:32:35.000Z
|
2022-03-30T04:21:21.000Z
|
vendor/timezones/timezones_tests/__init__.py
|
Paul3MK/NewsBlur
|
f912d100c2867e5366fca92abadc50d4253a41d8
|
[
"MIT"
] | 676
|
2015-01-03T16:40:29.000Z
|
2022-03-30T14:00:40.000Z
|
# the sad reality of Django app testing. not naming this module "tests"
# because of possible collision of other apps that do a similar thing.
| 71
| 71
| 0.78169
| 24
| 142
| 4.625
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176056
| 142
| 2
| 72
| 71
| 0.948718
| 0.971831
| 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
|
cf44d6ff569607c404684cfb6865d276b62de98d
| 300
|
py
|
Python
|
Supervised_Learning/Modules/activation_function.py
|
YulinLi98/Sample_INDE_Repo
|
290a295e1dd5c46aaec2a380a2c98b2e96820fcd
|
[
"MIT"
] | null | null | null |
Supervised_Learning/Modules/activation_function.py
|
YulinLi98/Sample_INDE_Repo
|
290a295e1dd5c46aaec2a380a2c98b2e96820fcd
|
[
"MIT"
] | null | null | null |
Supervised_Learning/Modules/activation_function.py
|
YulinLi98/Sample_INDE_Repo
|
290a295e1dd5c46aaec2a380a2c98b2e96820fcd
|
[
"MIT"
] | null | null | null |
import numpy as np
__all__ = ["sign_activation",
"linear_regression_activation",
"sigmoid_activation"]
def sign_activation(z):
return np.sign(z)
def linear_regression_activation(z):
return z
def sigmoid_activation(z):
return 1.0/(1.0 + np.exp(-z))
| 20
| 43
| 0.64
| 39
| 300
| 4.615385
| 0.410256
| 0.183333
| 0.283333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017778
| 0.25
| 300
| 14
| 44
| 21.428571
| 0.782222
| 0
| 0
| 0
| 0
| 0
| 0.203333
| 0.093333
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3
| false
| 0
| 0.1
| 0.3
| 0.7
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
d84475a50bb36c00c50e92e7ee964cbce508b5e4
| 43
|
py
|
Python
|
imutils/ml/aug/image/__init__.py
|
JacobARose/image-utils
|
aa0e005c0b4df5198d188b074f4e21f8d8f97962
|
[
"MIT"
] | null | null | null |
imutils/ml/aug/image/__init__.py
|
JacobARose/image-utils
|
aa0e005c0b4df5198d188b074f4e21f8d8f97962
|
[
"MIT"
] | null | null | null |
imutils/ml/aug/image/__init__.py
|
JacobARose/image-utils
|
aa0e005c0b4df5198d188b074f4e21f8d8f97962
|
[
"MIT"
] | null | null | null |
"""
imutils/ml/aug/image/__init__.py
"""
| 7.166667
| 32
| 0.627907
| 6
| 43
| 3.833333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116279
| 43
| 5
| 33
| 8.6
| 0.605263
| 0.744186
| 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
|
d84a178baf74e6a167bced257bde67f8983eb839
| 79
|
py
|
Python
|
caer/setup.py
|
fossabot/caer
|
9151a8f3f6a04d2551454969767331a6c1a7bbde
|
[
"MIT"
] | 3
|
2021-01-23T19:53:28.000Z
|
2021-01-23T19:53:53.000Z
|
caer/setup.py
|
fossabot/caer
|
9151a8f3f6a04d2551454969767331a6c1a7bbde
|
[
"MIT"
] | null | null | null |
caer/setup.py
|
fossabot/caer
|
9151a8f3f6a04d2551454969767331a6c1a7bbde
|
[
"MIT"
] | null | null | null |
if __name__ == '__main__':
print('This is the wrong setup.py file to run')
| 26.333333
| 51
| 0.670886
| 13
| 79
| 3.461538
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.202532
| 79
| 2
| 52
| 39.5
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0.582278
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
d89a43032a608c6a4dda4f8de980c0f74128e59e
| 168,698
|
py
|
Python
|
esociallib/v2_04/evtTabRubrica.py
|
akretion/esociallib
|
2472d68b45610638cf10d87aeed48b917ebae6d8
|
[
"MIT"
] | 6
|
2018-02-16T09:59:35.000Z
|
2021-09-01T20:40:02.000Z
|
esociallib/v2_04/evtTabRubrica.py
|
akretion/esociallib
|
2472d68b45610638cf10d87aeed48b917ebae6d8
|
[
"MIT"
] | 2
|
2018-02-02T19:32:21.000Z
|
2019-01-25T14:43:05.000Z
|
esociallib/v2_04/evtTabRubrica.py
|
akretion/esociallib
|
2472d68b45610638cf10d87aeed48b917ebae6d8
|
[
"MIT"
] | 2
|
2018-05-03T17:16:38.000Z
|
2021-04-02T19:17:31.000Z
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated Tue Oct 10 00:42:27 2017 by generateDS.py version 2.28b.
# Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
#
# Command line options:
# ('--no-process-includes', '')
# ('-o', 'esociallib/v2_04/evtTabRubrica.py')
#
# Command line arguments:
# schemas/v2_04/evtTabRubrica.xsd
#
# Command line:
# /usr/local/bin/generateDS --no-process-includes -o "esociallib/v2_04/evtTabRubrica.py" schemas/v2_04/evtTabRubrica.xsd
#
# Current working directory (os.getcwd()):
# esociallib
#
import sys
import re as re_
import base64
import datetime as datetime_
import warnings as warnings_
try:
from lxml import etree as etree_
except ImportError:
from xml.etree import ElementTree as etree_
Validate_simpletypes_ = True
if sys.version_info.major == 2:
BaseStrType_ = basestring
else:
BaseStrType_ = str
def parsexml_(infile, parser=None, **kwargs):
if parser is None:
# Use the lxml ElementTree compatible parser so that, e.g.,
# we ignore comments.
try:
parser = etree_.ETCompatXMLParser()
except AttributeError:
# fallback to xml.etree
parser = etree_.XMLParser()
doc = etree_.parse(infile, parser=parser, **kwargs)
return doc
#
# Namespace prefix definition table (and other attributes, too)
#
# The module generatedsnamespaces, if it is importable, must contain
# a dictionary named GeneratedsNamespaceDefs. This Python dictionary
# should map element type names (strings) to XML schema namespace prefix
# definitions. The export method for any class for which there is
# a namespace prefix definition, will export that definition in the
# XML representation of that element. See the export method of
# any generated element type class for a example of the use of this
# table.
# A sample table is:
#
# # File: generatedsnamespaces.py
#
# GenerateDSNamespaceDefs = {
# "ElementtypeA": "http://www.xxx.com/namespaceA",
# "ElementtypeB": "http://www.xxx.com/namespaceB",
# }
#
try:
from generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_
except ImportError:
GenerateDSNamespaceDefs_ = {}
#
# The root super-class for element type classes
#
# Calls to the methods in these classes are generated by generateDS.py.
# You can replace these methods by re-implementing the following class
# in a module named generatedssuper.py.
try:
from generatedssuper import GeneratedsSuper
except ImportError as exp:
class GeneratedsSuper(object):
tzoff_pattern = re_.compile(r'(\+|-)((0\d|1[0-3]):[0-5]\d|14:00)$')
class _FixedOffsetTZ(datetime_.tzinfo):
def __init__(self, offset, name):
self.__offset = datetime_.timedelta(minutes=offset)
self.__name = name
def utcoffset(self, dt):
return self.__offset
def tzname(self, dt):
return self.__name
def dst(self, dt):
return None
def gds_format_string(self, input_data, input_name=''):
return input_data
def gds_validate_string(self, input_data, node=None, input_name=''):
if not input_data:
return ''
else:
return input_data
def gds_format_base64(self, input_data, input_name=''):
return base64.b64encode(input_data)
def gds_validate_base64(self, input_data, node=None, input_name=''):
return input_data
def gds_format_integer(self, input_data, input_name=''):
return '%d' % input_data
def gds_validate_integer(self, input_data, node=None, input_name=''):
return input_data
def gds_format_integer_list(self, input_data, input_name=''):
return '%s' % ' '.join(input_data)
def gds_validate_integer_list(
self, input_data, node=None, input_name=''):
values = input_data.split()
for value in values:
try:
int(value)
except (TypeError, ValueError):
raise_parse_error(node, 'Requires sequence of integers')
return values
def gds_format_float(self, input_data, input_name=''):
return ('%.15f' % input_data).rstrip('0')
def gds_validate_float(self, input_data, node=None, input_name=''):
return input_data
def gds_format_float_list(self, input_data, input_name=''):
return '%s' % ' '.join(input_data)
def gds_validate_float_list(
self, input_data, node=None, input_name=''):
values = input_data.split()
for value in values:
try:
float(value)
except (TypeError, ValueError):
raise_parse_error(node, 'Requires sequence of floats')
return values
def gds_format_double(self, input_data, input_name=''):
return '%e' % input_data
def gds_validate_double(self, input_data, node=None, input_name=''):
return input_data
def gds_format_double_list(self, input_data, input_name=''):
return '%s' % ' '.join(input_data)
def gds_validate_double_list(
self, input_data, node=None, input_name=''):
values = input_data.split()
for value in values:
try:
float(value)
except (TypeError, ValueError):
raise_parse_error(node, 'Requires sequence of doubles')
return values
def gds_format_boolean(self, input_data, input_name=''):
return ('%s' % input_data).lower()
def gds_validate_boolean(self, input_data, node=None, input_name=''):
return input_data
def gds_format_boolean_list(self, input_data, input_name=''):
return '%s' % ' '.join(input_data)
def gds_validate_boolean_list(
self, input_data, node=None, input_name=''):
values = input_data.split()
for value in values:
if value not in ('true', '1', 'false', '0', ):
raise_parse_error(
node,
'Requires sequence of booleans '
'("true", "1", "false", "0")')
return values
def gds_validate_datetime(self, input_data, node=None, input_name=''):
return input_data
def gds_format_datetime(self, input_data, input_name=''):
if input_data.microsecond == 0:
_svalue = '%04d-%02d-%02dT%02d:%02d:%02d' % (
input_data.year,
input_data.month,
input_data.day,
input_data.hour,
input_data.minute,
input_data.second,
)
else:
_svalue = '%04d-%02d-%02dT%02d:%02d:%02d.%s' % (
input_data.year,
input_data.month,
input_data.day,
input_data.hour,
input_data.minute,
input_data.second,
('%f' % (float(input_data.microsecond) / 1000000))[2:],
)
if input_data.tzinfo is not None:
tzoff = input_data.tzinfo.utcoffset(input_data)
if tzoff is not None:
total_seconds = tzoff.seconds + (86400 * tzoff.days)
if total_seconds == 0:
_svalue += 'Z'
else:
if total_seconds < 0:
_svalue += '-'
total_seconds *= -1
else:
_svalue += '+'
hours = total_seconds // 3600
minutes = (total_seconds - (hours * 3600)) // 60
_svalue += '{0:02d}:{1:02d}'.format(hours, minutes)
return _svalue
@classmethod
def gds_parse_datetime(cls, input_data):
tz = None
if input_data[-1] == 'Z':
tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
input_data = input_data[:-1]
else:
results = GeneratedsSuper.tzoff_pattern.search(input_data)
if results is not None:
tzoff_parts = results.group(2).split(':')
tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
if results.group(1) == '-':
tzoff *= -1
tz = GeneratedsSuper._FixedOffsetTZ(
tzoff, results.group(0))
input_data = input_data[:-6]
time_parts = input_data.split('.')
if len(time_parts) > 1:
micro_seconds = int(float('0.' + time_parts[1]) * 1000000)
input_data = '%s.%s' % (time_parts[0], micro_seconds, )
dt = datetime_.datetime.strptime(
input_data, '%Y-%m-%dT%H:%M:%S.%f')
else:
dt = datetime_.datetime.strptime(
input_data, '%Y-%m-%dT%H:%M:%S')
dt = dt.replace(tzinfo=tz)
return dt
def gds_validate_date(self, input_data, node=None, input_name=''):
return input_data
def gds_format_date(self, input_data, input_name=''):
_svalue = '%04d-%02d-%02d' % (
input_data.year,
input_data.month,
input_data.day,
)
try:
if input_data.tzinfo is not None:
tzoff = input_data.tzinfo.utcoffset(input_data)
if tzoff is not None:
total_seconds = tzoff.seconds + (86400 * tzoff.days)
if total_seconds == 0:
_svalue += 'Z'
else:
if total_seconds < 0:
_svalue += '-'
total_seconds *= -1
else:
_svalue += '+'
hours = total_seconds // 3600
minutes = (total_seconds - (hours * 3600)) // 60
_svalue += '{0:02d}:{1:02d}'.format(
hours, minutes)
except AttributeError:
pass
return _svalue
@classmethod
def gds_parse_date(cls, input_data):
tz = None
if input_data[-1] == 'Z':
tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
input_data = input_data[:-1]
else:
results = GeneratedsSuper.tzoff_pattern.search(input_data)
if results is not None:
tzoff_parts = results.group(2).split(':')
tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
if results.group(1) == '-':
tzoff *= -1
tz = GeneratedsSuper._FixedOffsetTZ(
tzoff, results.group(0))
input_data = input_data[:-6]
dt = datetime_.datetime.strptime(input_data, '%Y-%m-%d')
dt = dt.replace(tzinfo=tz)
return dt.date()
def gds_validate_time(self, input_data, node=None, input_name=''):
return input_data
def gds_format_time(self, input_data, input_name=''):
if input_data.microsecond == 0:
_svalue = '%02d:%02d:%02d' % (
input_data.hour,
input_data.minute,
input_data.second,
)
else:
_svalue = '%02d:%02d:%02d.%s' % (
input_data.hour,
input_data.minute,
input_data.second,
('%f' % (float(input_data.microsecond) / 1000000))[2:],
)
if input_data.tzinfo is not None:
tzoff = input_data.tzinfo.utcoffset(input_data)
if tzoff is not None:
total_seconds = tzoff.seconds + (86400 * tzoff.days)
if total_seconds == 0:
_svalue += 'Z'
else:
if total_seconds < 0:
_svalue += '-'
total_seconds *= -1
else:
_svalue += '+'
hours = total_seconds // 3600
minutes = (total_seconds - (hours * 3600)) // 60
_svalue += '{0:02d}:{1:02d}'.format(hours, minutes)
return _svalue
def gds_validate_simple_patterns(self, patterns, target):
# pat is a list of lists of strings/patterns. We should:
# - AND the outer elements
# - OR the inner elements
found1 = True
for patterns1 in patterns:
found2 = False
for patterns2 in patterns1:
if re_.search(patterns2, target) is not None:
found2 = True
break
if not found2:
found1 = False
break
return found1
@classmethod
def gds_parse_time(cls, input_data):
tz = None
if input_data[-1] == 'Z':
tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
input_data = input_data[:-1]
else:
results = GeneratedsSuper.tzoff_pattern.search(input_data)
if results is not None:
tzoff_parts = results.group(2).split(':')
tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
if results.group(1) == '-':
tzoff *= -1
tz = GeneratedsSuper._FixedOffsetTZ(
tzoff, results.group(0))
input_data = input_data[:-6]
if len(input_data.split('.')) > 1:
dt = datetime_.datetime.strptime(input_data, '%H:%M:%S.%f')
else:
dt = datetime_.datetime.strptime(input_data, '%H:%M:%S')
dt = dt.replace(tzinfo=tz)
return dt.time()
def gds_str_lower(self, instring):
return instring.lower()
def get_path_(self, node):
path_list = []
self.get_path_list_(node, path_list)
path_list.reverse()
path = '/'.join(path_list)
return path
Tag_strip_pattern_ = re_.compile(r'\{.*\}')
def get_path_list_(self, node, path_list):
if node is None:
return
tag = GeneratedsSuper.Tag_strip_pattern_.sub('', node.tag)
if tag:
path_list.append(tag)
self.get_path_list_(node.getparent(), path_list)
def get_class_obj_(self, node, default_class=None):
class_obj1 = default_class
if 'xsi' in node.nsmap:
classname = node.get('{%s}type' % node.nsmap['xsi'])
if classname is not None:
names = classname.split(':')
if len(names) == 2:
classname = names[1]
class_obj2 = globals().get(classname)
if class_obj2 is not None:
class_obj1 = class_obj2
return class_obj1
def gds_build_any(self, node, type_name=None):
return None
@classmethod
def gds_reverse_node_mapping(cls, mapping):
return dict(((v, k) for k, v in mapping.iteritems()))
@staticmethod
def gds_encode(instring):
if sys.version_info.major == 2:
return instring.encode(ExternalEncoding)
else:
return instring
@staticmethod
def convert_unicode(instring):
if isinstance(instring, str):
result = quote_xml(instring)
elif sys.version_info.major == 2 and isinstance(instring, unicode):
result = quote_xml(instring).encode('utf8')
else:
result = GeneratedsSuper.gds_encode(str(instring))
return result
def __eq__(self, other):
if type(self) != type(other):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
return not self.__eq__(other)
def getSubclassFromModule_(module, class_):
'''Get the subclass of a class from a specific module.'''
name = class_.__name__ + 'Sub'
if hasattr(module, name):
return getattr(module, name)
else:
return None
#
# If you have installed IPython you can uncomment and use the following.
# IPython is available from http://ipython.scipy.org/.
#
## from IPython.Shell import IPShellEmbed
## args = ''
## ipshell = IPShellEmbed(args,
## banner = 'Dropping into IPython',
## exit_msg = 'Leaving Interpreter, back to program.')
# Then use the following line where and when you want to drop into the
# IPython shell:
# ipshell('<some message> -- Entering ipshell.\nHit Ctrl-D to exit')
#
# Globals
#
ExternalEncoding = 'ascii'
Tag_pattern_ = re_.compile(r'({.*})?(.*)')
String_cleanup_pat_ = re_.compile(r"[\n\r\s]+")
Namespace_extract_pat_ = re_.compile(r'{(.*)}(.*)')
CDATA_pattern_ = re_.compile(r"<!\[CDATA\[.*?\]\]>", re_.DOTALL)
# Change this to redirect the generated superclass module to use a
# specific subclass module.
CurrentSubclassModule_ = None
#
# Support/utility functions.
#
def showIndent(outfile, level, pretty_print=True):
if pretty_print:
for idx in range(level):
outfile.write(' ')
def quote_xml(inStr):
"Escape markup chars, but do not modify CDATA sections."
if not inStr:
return ''
s1 = (isinstance(inStr, BaseStrType_) and inStr or '%s' % inStr)
s2 = ''
pos = 0
matchobjects = CDATA_pattern_.finditer(s1)
for mo in matchobjects:
s3 = s1[pos:mo.start()]
s2 += quote_xml_aux(s3)
s2 += s1[mo.start():mo.end()]
pos = mo.end()
s3 = s1[pos:]
s2 += quote_xml_aux(s3)
return s2
def quote_xml_aux(inStr):
s1 = inStr.replace('&', '&')
s1 = s1.replace('<', '<')
s1 = s1.replace('>', '>')
return s1
def quote_attrib(inStr):
s1 = (isinstance(inStr, BaseStrType_) and inStr or '%s' % inStr)
s1 = s1.replace('&', '&')
s1 = s1.replace('<', '<')
s1 = s1.replace('>', '>')
if '"' in s1:
if "'" in s1:
s1 = '"%s"' % s1.replace('"', """)
else:
s1 = "'%s'" % s1
else:
s1 = '"%s"' % s1
return s1
def quote_python(inStr):
s1 = inStr
if s1.find("'") == -1:
if s1.find('\n') == -1:
return "'%s'" % s1
else:
return "'''%s'''" % s1
else:
if s1.find('"') != -1:
s1 = s1.replace('"', '\\"')
if s1.find('\n') == -1:
return '"%s"' % s1
else:
return '"""%s"""' % s1
def get_all_text_(node):
if node.text is not None:
text = node.text
else:
text = ''
for child in node:
if child.tail is not None:
text += child.tail
return text
def find_attr_value_(attr_name, node):
attrs = node.attrib
attr_parts = attr_name.split(':')
value = None
if len(attr_parts) == 1:
value = attrs.get(attr_name)
elif len(attr_parts) == 2:
prefix, name = attr_parts
namespace = node.nsmap.get(prefix)
if namespace is not None:
value = attrs.get('{%s}%s' % (namespace, name, ))
return value
class GDSParseError(Exception):
pass
def raise_parse_error(node, msg):
msg = '%s (element %s/line %d)' % (msg, node.tag, node.sourceline, )
raise GDSParseError(msg)
class MixedContainer:
# Constants for category:
CategoryNone = 0
CategoryText = 1
CategorySimple = 2
CategoryComplex = 3
# Constants for content_type:
TypeNone = 0
TypeText = 1
TypeString = 2
TypeInteger = 3
TypeFloat = 4
TypeDecimal = 5
TypeDouble = 6
TypeBoolean = 7
TypeBase64 = 8
def __init__(self, category, content_type, name, value):
self.category = category
self.content_type = content_type
self.name = name
self.value = value
def getCategory(self):
return self.category
def getContenttype(self, content_type):
return self.content_type
def getValue(self):
return self.value
def getName(self):
return self.name
def export(self, outfile, level, name, namespace,
pretty_print=True):
if self.category == MixedContainer.CategoryText:
# Prevent exporting empty content as empty lines.
if self.value.strip():
outfile.write(self.value)
elif self.category == MixedContainer.CategorySimple:
self.exportSimple(outfile, level, name)
else: # category == MixedContainer.CategoryComplex
self.value.export(
outfile, level, namespace, name,
pretty_print=pretty_print)
def exportSimple(self, outfile, level, name):
if self.content_type == MixedContainer.TypeString:
outfile.write('<%s>%s</%s>' % (
self.name, self.value, self.name))
elif self.content_type == MixedContainer.TypeInteger or \
self.content_type == MixedContainer.TypeBoolean:
outfile.write('<%s>%d</%s>' % (
self.name, self.value, self.name))
elif self.content_type == MixedContainer.TypeFloat or \
self.content_type == MixedContainer.TypeDecimal:
outfile.write('<%s>%f</%s>' % (
self.name, self.value, self.name))
elif self.content_type == MixedContainer.TypeDouble:
outfile.write('<%s>%g</%s>' % (
self.name, self.value, self.name))
elif self.content_type == MixedContainer.TypeBase64:
outfile.write('<%s>%s</%s>' % (
self.name,
base64.b64encode(self.value),
self.name))
def to_etree(self, element):
if self.category == MixedContainer.CategoryText:
# Prevent exporting empty content as empty lines.
if self.value.strip():
if len(element) > 0:
if element[-1].tail is None:
element[-1].tail = self.value
else:
element[-1].tail += self.value
else:
if element.text is None:
element.text = self.value
else:
element.text += self.value
elif self.category == MixedContainer.CategorySimple:
subelement = etree_.SubElement(
element, '%s' % self.name)
subelement.text = self.to_etree_simple()
else: # category == MixedContainer.CategoryComplex
self.value.to_etree(element)
def to_etree_simple(self):
if self.content_type == MixedContainer.TypeString:
text = self.value
elif (self.content_type == MixedContainer.TypeInteger or
self.content_type == MixedContainer.TypeBoolean):
text = '%d' % self.value
elif (self.content_type == MixedContainer.TypeFloat or
self.content_type == MixedContainer.TypeDecimal):
text = '%f' % self.value
elif self.content_type == MixedContainer.TypeDouble:
text = '%g' % self.value
elif self.content_type == MixedContainer.TypeBase64:
text = '%s' % base64.b64encode(self.value)
return text
def exportLiteral(self, outfile, level, name):
if self.category == MixedContainer.CategoryText:
showIndent(outfile, level)
outfile.write(
'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (
self.category, self.content_type,
self.name, self.value))
elif self.category == MixedContainer.CategorySimple:
showIndent(outfile, level)
outfile.write(
'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (
self.category, self.content_type,
self.name, self.value))
else: # category == MixedContainer.CategoryComplex
showIndent(outfile, level)
outfile.write(
'model_.MixedContainer(%d, %d, "%s",\n' % (
self.category, self.content_type, self.name,))
self.value.exportLiteral(outfile, level + 1)
showIndent(outfile, level)
outfile.write(')\n')
class MemberSpec_(object):
def __init__(self, name='', data_type='', container=0,
optional=0, child_attrs=None, choice=None):
self.name = name
self.data_type = data_type
self.container = container
self.child_attrs = child_attrs
self.choice = choice
self.optional = optional
def set_name(self, name): self.name = name
def get_name(self): return self.name
def set_data_type(self, data_type): self.data_type = data_type
def get_data_type_chain(self): return self.data_type
def get_data_type(self):
if isinstance(self.data_type, list):
if len(self.data_type) > 0:
return self.data_type[-1]
else:
return 'xs:string'
else:
return self.data_type
def set_container(self, container): self.container = container
def get_container(self): return self.container
def set_child_attrs(self, child_attrs): self.child_attrs = child_attrs
def get_child_attrs(self): return self.child_attrs
def set_choice(self, choice): self.choice = choice
def get_choice(self): return self.choice
def set_optional(self, optional): self.optional = optional
def get_optional(self): return self.optional
def _cast(typ, value):
if typ is None or value is None:
return value
return typ(value)
#
# Data representation classes.
#
class eSocial(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self, evtTabRubrica=None, Signature=None):
self.original_tagname_ = None
self.evtTabRubrica = evtTabRubrica
self.Signature = Signature
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, eSocial)
if subclass is not None:
return subclass(*args_, **kwargs_)
if eSocial.subclass:
return eSocial.subclass(*args_, **kwargs_)
else:
return eSocial(*args_, **kwargs_)
factory = staticmethod(factory)
def get_evtTabRubrica(self): return self.evtTabRubrica
def set_evtTabRubrica(self, evtTabRubrica): self.evtTabRubrica = evtTabRubrica
def get_Signature(self): return self.Signature
def set_Signature(self, Signature): self.Signature = Signature
def hasContent_(self):
if (
self.evtTabRubrica is not None or
self.Signature is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='eSocial', namespacedef_=' xmlns:ds="http://www.w3.org/2000/09/xmldsig#" ', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('eSocial')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='eSocial')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='eSocial', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='eSocial'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='eSocial', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.evtTabRubrica is not None:
self.evtTabRubrica.export(outfile, level, namespace_, name_='evtTabRubrica', pretty_print=pretty_print)
if self.Signature is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%sSignature>%s</%sSignature>%s' % ('ds:', self.gds_encode(self.gds_format_string(quote_xml(self.Signature), input_name='Signature')), 'ds:', eol_))
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'evtTabRubrica':
obj_ = evtTabRubrica.factory()
obj_.build(child_)
self.evtTabRubrica = obj_
obj_.original_tagname_ = 'evtTabRubrica'
elif nodeName_ == 'Signature':
Signature_ = child_.text
Signature_ = self.gds_validate_string(Signature_, node, 'Signature')
self.Signature = Signature_
# end class eSocial
class evtTabRubrica(GeneratedsSuper):
"""Evento destinado a incluir, alterar ou excluir informações da tabela
de rubricas"""
subclass = None
superclass = None
def __init__(self, Id=None, ideEvento=None, ideEmpregador=None, infoRubrica=None):
self.original_tagname_ = None
self.Id = _cast(None, Id)
self.ideEvento = ideEvento
self.ideEmpregador = ideEmpregador
self.infoRubrica = infoRubrica
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, evtTabRubrica)
if subclass is not None:
return subclass(*args_, **kwargs_)
if evtTabRubrica.subclass:
return evtTabRubrica.subclass(*args_, **kwargs_)
else:
return evtTabRubrica(*args_, **kwargs_)
factory = staticmethod(factory)
def get_ideEvento(self): return self.ideEvento
def set_ideEvento(self, ideEvento): self.ideEvento = ideEvento
def get_ideEmpregador(self): return self.ideEmpregador
def set_ideEmpregador(self, ideEmpregador): self.ideEmpregador = ideEmpregador
def get_infoRubrica(self): return self.infoRubrica
def set_infoRubrica(self, infoRubrica): self.infoRubrica = infoRubrica
def get_Id(self): return self.Id
def set_Id(self, Id): self.Id = Id
def hasContent_(self):
if (
self.ideEvento is not None or
self.ideEmpregador is not None or
self.infoRubrica is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='evtTabRubrica', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('evtTabRubrica')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='evtTabRubrica')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='evtTabRubrica', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='evtTabRubrica'):
if self.Id is not None and 'Id' not in already_processed:
already_processed.add('Id')
outfile.write(' Id=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Id), input_name='Id')), ))
def exportChildren(self, outfile, level, namespace_='', name_='evtTabRubrica', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.ideEvento is not None:
self.ideEvento.export(outfile, level, namespace_, name_='ideEvento', pretty_print=pretty_print)
if self.ideEmpregador is not None:
self.ideEmpregador.export(outfile, level, namespace_, name_='ideEmpregador', pretty_print=pretty_print)
if self.infoRubrica is not None:
self.infoRubrica.export(outfile, level, namespace_, name_='infoRubrica', pretty_print=pretty_print)
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
value = find_attr_value_('Id', node)
if value is not None and 'Id' not in already_processed:
already_processed.add('Id')
self.Id = value
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'ideEvento':
obj_ = TIdeCadastro.factory()
obj_.build(child_)
self.ideEvento = obj_
obj_.original_tagname_ = 'ideEvento'
elif nodeName_ == 'ideEmpregador':
obj_ = TEmpregador.factory()
obj_.build(child_)
self.ideEmpregador = obj_
obj_.original_tagname_ = 'ideEmpregador'
elif nodeName_ == 'infoRubrica':
obj_ = infoRubrica.factory()
obj_.build(child_)
self.infoRubrica = obj_
obj_.original_tagname_ = 'infoRubrica'
# end class evtTabRubrica
class infoRubrica(GeneratedsSuper):
"""Identificação da operação (inclusão, alteração ou exclusão) e das
informações da rubrica."""
subclass = None
superclass = None
def __init__(self, inclusao=None, alteracao=None, exclusao=None):
self.original_tagname_ = None
self.inclusao = inclusao
self.alteracao = alteracao
self.exclusao = exclusao
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, infoRubrica)
if subclass is not None:
return subclass(*args_, **kwargs_)
if infoRubrica.subclass:
return infoRubrica.subclass(*args_, **kwargs_)
else:
return infoRubrica(*args_, **kwargs_)
factory = staticmethod(factory)
def get_inclusao(self): return self.inclusao
def set_inclusao(self, inclusao): self.inclusao = inclusao
def get_alteracao(self): return self.alteracao
def set_alteracao(self, alteracao): self.alteracao = alteracao
def get_exclusao(self): return self.exclusao
def set_exclusao(self, exclusao): self.exclusao = exclusao
def hasContent_(self):
if (
self.inclusao is not None or
self.alteracao is not None or
self.exclusao is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='infoRubrica', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('infoRubrica')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='infoRubrica')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='infoRubrica', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='infoRubrica'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='infoRubrica', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.inclusao is not None:
self.inclusao.export(outfile, level, namespace_, name_='inclusao', pretty_print=pretty_print)
if self.alteracao is not None:
self.alteracao.export(outfile, level, namespace_, name_='alteracao', pretty_print=pretty_print)
if self.exclusao is not None:
self.exclusao.export(outfile, level, namespace_, name_='exclusao', pretty_print=pretty_print)
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'inclusao':
obj_ = inclusao.factory()
obj_.build(child_)
self.inclusao = obj_
obj_.original_tagname_ = 'inclusao'
elif nodeName_ == 'alteracao':
obj_ = alteracao.factory()
obj_.build(child_)
self.alteracao = obj_
obj_.original_tagname_ = 'alteracao'
elif nodeName_ == 'exclusao':
obj_ = exclusao.factory()
obj_.build(child_)
self.exclusao = obj_
obj_.original_tagname_ = 'exclusao'
# end class infoRubrica
class inclusao(GeneratedsSuper):
"""Inclusão de novas informações"""
subclass = None
superclass = None
def __init__(self, ideRubrica=None, dadosRubrica=None):
self.original_tagname_ = None
self.ideRubrica = ideRubrica
self.dadosRubrica = dadosRubrica
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, inclusao)
if subclass is not None:
return subclass(*args_, **kwargs_)
if inclusao.subclass:
return inclusao.subclass(*args_, **kwargs_)
else:
return inclusao(*args_, **kwargs_)
factory = staticmethod(factory)
def get_ideRubrica(self): return self.ideRubrica
def set_ideRubrica(self, ideRubrica): self.ideRubrica = ideRubrica
def get_dadosRubrica(self): return self.dadosRubrica
def set_dadosRubrica(self, dadosRubrica): self.dadosRubrica = dadosRubrica
def hasContent_(self):
if (
self.ideRubrica is not None or
self.dadosRubrica is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='inclusao', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('inclusao')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='inclusao')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='inclusao', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='inclusao'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='inclusao', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.ideRubrica is not None:
self.ideRubrica.export(outfile, level, namespace_, name_='ideRubrica', pretty_print=pretty_print)
if self.dadosRubrica is not None:
self.dadosRubrica.export(outfile, level, namespace_, name_='dadosRubrica', pretty_print=pretty_print)
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'ideRubrica':
obj_ = TIdeRubrica.factory()
obj_.build(child_)
self.ideRubrica = obj_
obj_.original_tagname_ = 'ideRubrica'
elif nodeName_ == 'dadosRubrica':
obj_ = TDadosRubrica.factory()
obj_.build(child_)
self.dadosRubrica = obj_
obj_.original_tagname_ = 'dadosRubrica'
# end class inclusao
class alteracao(GeneratedsSuper):
"""Alteração de informações já existentes"""
subclass = None
superclass = None
def __init__(self, ideRubrica=None, dadosRubrica=None, novaValidade=None):
self.original_tagname_ = None
self.ideRubrica = ideRubrica
self.dadosRubrica = dadosRubrica
self.novaValidade = novaValidade
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, alteracao)
if subclass is not None:
return subclass(*args_, **kwargs_)
if alteracao.subclass:
return alteracao.subclass(*args_, **kwargs_)
else:
return alteracao(*args_, **kwargs_)
factory = staticmethod(factory)
def get_ideRubrica(self): return self.ideRubrica
def set_ideRubrica(self, ideRubrica): self.ideRubrica = ideRubrica
def get_dadosRubrica(self): return self.dadosRubrica
def set_dadosRubrica(self, dadosRubrica): self.dadosRubrica = dadosRubrica
def get_novaValidade(self): return self.novaValidade
def set_novaValidade(self, novaValidade): self.novaValidade = novaValidade
def hasContent_(self):
if (
self.ideRubrica is not None or
self.dadosRubrica is not None or
self.novaValidade is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='alteracao', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('alteracao')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='alteracao')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='alteracao', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='alteracao'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='alteracao', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.ideRubrica is not None:
self.ideRubrica.export(outfile, level, namespace_, name_='ideRubrica', pretty_print=pretty_print)
if self.dadosRubrica is not None:
self.dadosRubrica.export(outfile, level, namespace_, name_='dadosRubrica', pretty_print=pretty_print)
if self.novaValidade is not None:
self.novaValidade.export(outfile, level, namespace_, name_='novaValidade', pretty_print=pretty_print)
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'ideRubrica':
obj_ = TIdeRubrica.factory()
obj_.build(child_)
self.ideRubrica = obj_
obj_.original_tagname_ = 'ideRubrica'
elif nodeName_ == 'dadosRubrica':
obj_ = TDadosRubrica.factory()
obj_.build(child_)
self.dadosRubrica = obj_
obj_.original_tagname_ = 'dadosRubrica'
elif nodeName_ == 'novaValidade':
obj_ = TPeriodoValidade.factory()
obj_.build(child_)
self.novaValidade = obj_
obj_.original_tagname_ = 'novaValidade'
# end class alteracao
class exclusao(GeneratedsSuper):
"""Exclusão de informações"""
subclass = None
superclass = None
def __init__(self, ideRubrica=None):
self.original_tagname_ = None
self.ideRubrica = ideRubrica
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, exclusao)
if subclass is not None:
return subclass(*args_, **kwargs_)
if exclusao.subclass:
return exclusao.subclass(*args_, **kwargs_)
else:
return exclusao(*args_, **kwargs_)
factory = staticmethod(factory)
def get_ideRubrica(self): return self.ideRubrica
def set_ideRubrica(self, ideRubrica): self.ideRubrica = ideRubrica
def hasContent_(self):
if (
self.ideRubrica is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='exclusao', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('exclusao')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='exclusao')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='exclusao', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='exclusao'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='exclusao', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.ideRubrica is not None:
self.ideRubrica.export(outfile, level, namespace_, name_='ideRubrica', pretty_print=pretty_print)
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'ideRubrica':
obj_ = TIdeRubrica.factory()
obj_.build(child_)
self.ideRubrica = obj_
obj_.original_tagname_ = 'ideRubrica'
# end class exclusao
class TIdeCadastro(GeneratedsSuper):
"""Identificação de evento de cadastro/tabelas"""
subclass = None
superclass = None
def __init__(self, tpAmb=None, procEmi=None, verProc=None):
self.original_tagname_ = None
self.tpAmb = tpAmb
self.procEmi = procEmi
self.verProc = verProc
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, TIdeCadastro)
if subclass is not None:
return subclass(*args_, **kwargs_)
if TIdeCadastro.subclass:
return TIdeCadastro.subclass(*args_, **kwargs_)
else:
return TIdeCadastro(*args_, **kwargs_)
factory = staticmethod(factory)
def get_tpAmb(self): return self.tpAmb
def set_tpAmb(self, tpAmb): self.tpAmb = tpAmb
def get_procEmi(self): return self.procEmi
def set_procEmi(self, procEmi): self.procEmi = procEmi
def get_verProc(self): return self.verProc
def set_verProc(self, verProc): self.verProc = verProc
def hasContent_(self):
if (
self.tpAmb is not None or
self.procEmi is not None or
self.verProc is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='TIdeCadastro', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('TIdeCadastro')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='TIdeCadastro')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='TIdeCadastro', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='TIdeCadastro'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='TIdeCadastro', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.tpAmb is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%stpAmb>%s</%stpAmb>%s' % (namespace_, self.gds_format_integer(self.tpAmb, input_name='tpAmb'), namespace_, eol_))
if self.procEmi is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%sprocEmi>%s</%sprocEmi>%s' % (namespace_, self.gds_format_integer(self.procEmi, input_name='procEmi'), namespace_, eol_))
if self.verProc is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%sverProc>%s</%sverProc>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.verProc), input_name='verProc')), namespace_, eol_))
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'tpAmb':
sval_ = child_.text
try:
ival_ = int(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires integer: %s' % exp)
ival_ = self.gds_validate_integer(ival_, node, 'tpAmb')
self.tpAmb = ival_
elif nodeName_ == 'procEmi':
sval_ = child_.text
try:
ival_ = int(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires integer: %s' % exp)
ival_ = self.gds_validate_integer(ival_, node, 'procEmi')
self.procEmi = ival_
elif nodeName_ == 'verProc':
verProc_ = child_.text
verProc_ = self.gds_validate_string(verProc_, node, 'verProc')
self.verProc = verProc_
# end class TIdeCadastro
class tpAmb(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, tpAmb)
if subclass is not None:
return subclass(*args_, **kwargs_)
if tpAmb.subclass:
return tpAmb.subclass(*args_, **kwargs_)
else:
return tpAmb(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='tpAmb', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('tpAmb')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='tpAmb')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='tpAmb', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='tpAmb'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='tpAmb', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class tpAmb
class procEmi(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, procEmi)
if subclass is not None:
return subclass(*args_, **kwargs_)
if procEmi.subclass:
return procEmi.subclass(*args_, **kwargs_)
else:
return procEmi(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='procEmi', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('procEmi')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='procEmi')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='procEmi', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='procEmi'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='procEmi', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class procEmi
class verProc(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, verProc)
if subclass is not None:
return subclass(*args_, **kwargs_)
if verProc.subclass:
return verProc.subclass(*args_, **kwargs_)
else:
return verProc(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='verProc', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('verProc')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='verProc')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='verProc', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='verProc'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='verProc', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class verProc
class TEmpregador(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self, tpInsc=None, nrInsc=None):
self.original_tagname_ = None
self.tpInsc = tpInsc
self.nrInsc = nrInsc
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, TEmpregador)
if subclass is not None:
return subclass(*args_, **kwargs_)
if TEmpregador.subclass:
return TEmpregador.subclass(*args_, **kwargs_)
else:
return TEmpregador(*args_, **kwargs_)
factory = staticmethod(factory)
def get_tpInsc(self): return self.tpInsc
def set_tpInsc(self, tpInsc): self.tpInsc = tpInsc
def get_nrInsc(self): return self.nrInsc
def set_nrInsc(self, nrInsc): self.nrInsc = nrInsc
def hasContent_(self):
if (
self.tpInsc is not None or
self.nrInsc is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='TEmpregador', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('TEmpregador')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='TEmpregador')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='TEmpregador', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='TEmpregador'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='TEmpregador', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.tpInsc is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%stpInsc>%s</%stpInsc>%s' % (namespace_, self.gds_format_integer(self.tpInsc, input_name='tpInsc'), namespace_, eol_))
if self.nrInsc is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%snrInsc>%s</%snrInsc>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.nrInsc), input_name='nrInsc')), namespace_, eol_))
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'tpInsc':
sval_ = child_.text
try:
ival_ = int(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires integer: %s' % exp)
ival_ = self.gds_validate_integer(ival_, node, 'tpInsc')
self.tpInsc = ival_
elif nodeName_ == 'nrInsc':
nrInsc_ = child_.text
nrInsc_ = self.gds_validate_string(nrInsc_, node, 'nrInsc')
self.nrInsc = nrInsc_
# end class TEmpregador
class tpInsc(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, tpInsc)
if subclass is not None:
return subclass(*args_, **kwargs_)
if tpInsc.subclass:
return tpInsc.subclass(*args_, **kwargs_)
else:
return tpInsc(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='tpInsc', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('tpInsc')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='tpInsc')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='tpInsc', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='tpInsc'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='tpInsc', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class tpInsc
class nrInsc(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, nrInsc)
if subclass is not None:
return subclass(*args_, **kwargs_)
if nrInsc.subclass:
return nrInsc.subclass(*args_, **kwargs_)
else:
return nrInsc(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='nrInsc', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('nrInsc')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='nrInsc')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='nrInsc', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='nrInsc'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='nrInsc', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class nrInsc
class TIdeRubrica(GeneratedsSuper):
"""Informações de identificação da rubrica (código) e período de
validade"""
subclass = None
superclass = None
def __init__(self, codRubr=None, ideTabRubr=None, iniValid=None, fimValid=None):
self.original_tagname_ = None
self.codRubr = codRubr
self.ideTabRubr = ideTabRubr
self.iniValid = iniValid
self.fimValid = fimValid
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, TIdeRubrica)
if subclass is not None:
return subclass(*args_, **kwargs_)
if TIdeRubrica.subclass:
return TIdeRubrica.subclass(*args_, **kwargs_)
else:
return TIdeRubrica(*args_, **kwargs_)
factory = staticmethod(factory)
def get_codRubr(self): return self.codRubr
def set_codRubr(self, codRubr): self.codRubr = codRubr
def get_ideTabRubr(self): return self.ideTabRubr
def set_ideTabRubr(self, ideTabRubr): self.ideTabRubr = ideTabRubr
def get_iniValid(self): return self.iniValid
def set_iniValid(self, iniValid): self.iniValid = iniValid
def get_fimValid(self): return self.fimValid
def set_fimValid(self, fimValid): self.fimValid = fimValid
def hasContent_(self):
if (
self.codRubr is not None or
self.ideTabRubr is not None or
self.iniValid is not None or
self.fimValid is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='TIdeRubrica', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('TIdeRubrica')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='TIdeRubrica')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='TIdeRubrica', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='TIdeRubrica'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='TIdeRubrica', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.codRubr is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%scodRubr>%s</%scodRubr>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.codRubr), input_name='codRubr')), namespace_, eol_))
if self.ideTabRubr is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%sideTabRubr>%s</%sideTabRubr>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.ideTabRubr), input_name='ideTabRubr')), namespace_, eol_))
if self.iniValid is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%siniValid>%s</%siniValid>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.iniValid), input_name='iniValid')), namespace_, eol_))
if self.fimValid is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%sfimValid>%s</%sfimValid>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.fimValid), input_name='fimValid')), namespace_, eol_))
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'codRubr':
codRubr_ = child_.text
codRubr_ = self.gds_validate_string(codRubr_, node, 'codRubr')
self.codRubr = codRubr_
elif nodeName_ == 'ideTabRubr':
ideTabRubr_ = child_.text
ideTabRubr_ = self.gds_validate_string(ideTabRubr_, node, 'ideTabRubr')
self.ideTabRubr = ideTabRubr_
elif nodeName_ == 'iniValid':
iniValid_ = child_.text
iniValid_ = self.gds_validate_string(iniValid_, node, 'iniValid')
self.iniValid = iniValid_
elif nodeName_ == 'fimValid':
fimValid_ = child_.text
fimValid_ = self.gds_validate_string(fimValid_, node, 'fimValid')
self.fimValid = fimValid_
# end class TIdeRubrica
class codRubr(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, codRubr)
if subclass is not None:
return subclass(*args_, **kwargs_)
if codRubr.subclass:
return codRubr.subclass(*args_, **kwargs_)
else:
return codRubr(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='codRubr', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('codRubr')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='codRubr')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='codRubr', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='codRubr'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='codRubr', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class codRubr
class ideTabRubr(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, ideTabRubr)
if subclass is not None:
return subclass(*args_, **kwargs_)
if ideTabRubr.subclass:
return ideTabRubr.subclass(*args_, **kwargs_)
else:
return ideTabRubr(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='ideTabRubr', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('ideTabRubr')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='ideTabRubr')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='ideTabRubr', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='ideTabRubr'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='ideTabRubr', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class ideTabRubr
class iniValid(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, iniValid)
if subclass is not None:
return subclass(*args_, **kwargs_)
if iniValid.subclass:
return iniValid.subclass(*args_, **kwargs_)
else:
return iniValid(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='iniValid', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('iniValid')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='iniValid')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='iniValid', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='iniValid'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='iniValid', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class iniValid
class fimValid(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, fimValid)
if subclass is not None:
return subclass(*args_, **kwargs_)
if fimValid.subclass:
return fimValid.subclass(*args_, **kwargs_)
else:
return fimValid(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='fimValid', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('fimValid')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='fimValid')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='fimValid', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='fimValid'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='fimValid', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class fimValid
class TDadosRubrica(GeneratedsSuper):
"""Detalhamento da rubrica"""
subclass = None
superclass = None
def __init__(self, dscRubr=None, natRubr=None, tpRubr=None, codIncCP=None, codIncIRRF=None, codIncFGTS=None, codIncSIND=None, repDSR=None, rep13=None, repFerias=None, repAviso=None, observacao=None, ideProcessoCP=None, ideProcessoIRRF=None, ideProcessoFGTS=None, ideProcessoSIND=None):
self.original_tagname_ = None
self.dscRubr = dscRubr
self.natRubr = natRubr
self.tpRubr = tpRubr
self.codIncCP = codIncCP
self.codIncIRRF = codIncIRRF
self.codIncFGTS = codIncFGTS
self.codIncSIND = codIncSIND
self.repDSR = repDSR
self.rep13 = rep13
self.repFerias = repFerias
self.repAviso = repAviso
self.observacao = observacao
if ideProcessoCP is None:
self.ideProcessoCP = []
else:
self.ideProcessoCP = ideProcessoCP
if ideProcessoIRRF is None:
self.ideProcessoIRRF = []
else:
self.ideProcessoIRRF = ideProcessoIRRF
if ideProcessoFGTS is None:
self.ideProcessoFGTS = []
else:
self.ideProcessoFGTS = ideProcessoFGTS
if ideProcessoSIND is None:
self.ideProcessoSIND = []
else:
self.ideProcessoSIND = ideProcessoSIND
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, TDadosRubrica)
if subclass is not None:
return subclass(*args_, **kwargs_)
if TDadosRubrica.subclass:
return TDadosRubrica.subclass(*args_, **kwargs_)
else:
return TDadosRubrica(*args_, **kwargs_)
factory = staticmethod(factory)
def get_dscRubr(self): return self.dscRubr
def set_dscRubr(self, dscRubr): self.dscRubr = dscRubr
def get_natRubr(self): return self.natRubr
def set_natRubr(self, natRubr): self.natRubr = natRubr
def get_tpRubr(self): return self.tpRubr
def set_tpRubr(self, tpRubr): self.tpRubr = tpRubr
def get_codIncCP(self): return self.codIncCP
def set_codIncCP(self, codIncCP): self.codIncCP = codIncCP
def get_codIncIRRF(self): return self.codIncIRRF
def set_codIncIRRF(self, codIncIRRF): self.codIncIRRF = codIncIRRF
def get_codIncFGTS(self): return self.codIncFGTS
def set_codIncFGTS(self, codIncFGTS): self.codIncFGTS = codIncFGTS
def get_codIncSIND(self): return self.codIncSIND
def set_codIncSIND(self, codIncSIND): self.codIncSIND = codIncSIND
def get_repDSR(self): return self.repDSR
def set_repDSR(self, repDSR): self.repDSR = repDSR
def get_rep13(self): return self.rep13
def set_rep13(self, rep13): self.rep13 = rep13
def get_repFerias(self): return self.repFerias
def set_repFerias(self, repFerias): self.repFerias = repFerias
def get_repAviso(self): return self.repAviso
def set_repAviso(self, repAviso): self.repAviso = repAviso
def get_observacao(self): return self.observacao
def set_observacao(self, observacao): self.observacao = observacao
def get_ideProcessoCP(self): return self.ideProcessoCP
def set_ideProcessoCP(self, ideProcessoCP): self.ideProcessoCP = ideProcessoCP
def add_ideProcessoCP(self, value): self.ideProcessoCP.append(value)
def insert_ideProcessoCP_at(self, index, value): self.ideProcessoCP.insert(index, value)
def replace_ideProcessoCP_at(self, index, value): self.ideProcessoCP[index] = value
def get_ideProcessoIRRF(self): return self.ideProcessoIRRF
def set_ideProcessoIRRF(self, ideProcessoIRRF): self.ideProcessoIRRF = ideProcessoIRRF
def add_ideProcessoIRRF(self, value): self.ideProcessoIRRF.append(value)
def insert_ideProcessoIRRF_at(self, index, value): self.ideProcessoIRRF.insert(index, value)
def replace_ideProcessoIRRF_at(self, index, value): self.ideProcessoIRRF[index] = value
def get_ideProcessoFGTS(self): return self.ideProcessoFGTS
def set_ideProcessoFGTS(self, ideProcessoFGTS): self.ideProcessoFGTS = ideProcessoFGTS
def add_ideProcessoFGTS(self, value): self.ideProcessoFGTS.append(value)
def insert_ideProcessoFGTS_at(self, index, value): self.ideProcessoFGTS.insert(index, value)
def replace_ideProcessoFGTS_at(self, index, value): self.ideProcessoFGTS[index] = value
def get_ideProcessoSIND(self): return self.ideProcessoSIND
def set_ideProcessoSIND(self, ideProcessoSIND): self.ideProcessoSIND = ideProcessoSIND
def add_ideProcessoSIND(self, value): self.ideProcessoSIND.append(value)
def insert_ideProcessoSIND_at(self, index, value): self.ideProcessoSIND.insert(index, value)
def replace_ideProcessoSIND_at(self, index, value): self.ideProcessoSIND[index] = value
def hasContent_(self):
if (
self.dscRubr is not None or
self.natRubr is not None or
self.tpRubr is not None or
self.codIncCP is not None or
self.codIncIRRF is not None or
self.codIncFGTS is not None or
self.codIncSIND is not None or
self.repDSR is not None or
self.rep13 is not None or
self.repFerias is not None or
self.repAviso is not None or
self.observacao is not None or
self.ideProcessoCP or
self.ideProcessoIRRF or
self.ideProcessoFGTS or
self.ideProcessoSIND
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='TDadosRubrica', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('TDadosRubrica')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='TDadosRubrica')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='TDadosRubrica', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='TDadosRubrica'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='TDadosRubrica', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.dscRubr is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%sdscRubr>%s</%sdscRubr>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.dscRubr), input_name='dscRubr')), namespace_, eol_))
if self.natRubr is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%snatRubr>%s</%snatRubr>%s' % (namespace_, self.gds_format_integer(self.natRubr, input_name='natRubr'), namespace_, eol_))
if self.tpRubr is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%stpRubr>%s</%stpRubr>%s' % (namespace_, self.gds_format_integer(self.tpRubr, input_name='tpRubr'), namespace_, eol_))
if self.codIncCP is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%scodIncCP>%s</%scodIncCP>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.codIncCP), input_name='codIncCP')), namespace_, eol_))
if self.codIncIRRF is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%scodIncIRRF>%s</%scodIncIRRF>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.codIncIRRF), input_name='codIncIRRF')), namespace_, eol_))
if self.codIncFGTS is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%scodIncFGTS>%s</%scodIncFGTS>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.codIncFGTS), input_name='codIncFGTS')), namespace_, eol_))
if self.codIncSIND is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%scodIncSIND>%s</%scodIncSIND>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.codIncSIND), input_name='codIncSIND')), namespace_, eol_))
if self.repDSR is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%srepDSR>%s</%srepDSR>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.repDSR), input_name='repDSR')), namespace_, eol_))
if self.rep13 is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%srep13>%s</%srep13>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.rep13), input_name='rep13')), namespace_, eol_))
if self.repFerias is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%srepFerias>%s</%srepFerias>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.repFerias), input_name='repFerias')), namespace_, eol_))
if self.repAviso is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%srepAviso>%s</%srepAviso>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.repAviso), input_name='repAviso')), namespace_, eol_))
if self.observacao is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%sobservacao>%s</%sobservacao>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.observacao), input_name='observacao')), namespace_, eol_))
for ideProcessoCP_ in self.ideProcessoCP:
ideProcessoCP_.export(outfile, level, namespace_, name_='ideProcessoCP', pretty_print=pretty_print)
for ideProcessoIRRF_ in self.ideProcessoIRRF:
ideProcessoIRRF_.export(outfile, level, namespace_, name_='ideProcessoIRRF', pretty_print=pretty_print)
for ideProcessoFGTS_ in self.ideProcessoFGTS:
ideProcessoFGTS_.export(outfile, level, namespace_, name_='ideProcessoFGTS', pretty_print=pretty_print)
for ideProcessoSIND_ in self.ideProcessoSIND:
ideProcessoSIND_.export(outfile, level, namespace_, name_='ideProcessoSIND', pretty_print=pretty_print)
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'dscRubr':
dscRubr_ = child_.text
dscRubr_ = self.gds_validate_string(dscRubr_, node, 'dscRubr')
self.dscRubr = dscRubr_
elif nodeName_ == 'natRubr':
sval_ = child_.text
try:
ival_ = int(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires integer: %s' % exp)
ival_ = self.gds_validate_integer(ival_, node, 'natRubr')
self.natRubr = ival_
elif nodeName_ == 'tpRubr':
sval_ = child_.text
try:
ival_ = int(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires integer: %s' % exp)
ival_ = self.gds_validate_integer(ival_, node, 'tpRubr')
self.tpRubr = ival_
elif nodeName_ == 'codIncCP':
codIncCP_ = child_.text
codIncCP_ = self.gds_validate_string(codIncCP_, node, 'codIncCP')
self.codIncCP = codIncCP_
elif nodeName_ == 'codIncIRRF':
codIncIRRF_ = child_.text
codIncIRRF_ = self.gds_validate_string(codIncIRRF_, node, 'codIncIRRF')
self.codIncIRRF = codIncIRRF_
elif nodeName_ == 'codIncFGTS':
codIncFGTS_ = child_.text
codIncFGTS_ = self.gds_validate_string(codIncFGTS_, node, 'codIncFGTS')
self.codIncFGTS = codIncFGTS_
elif nodeName_ == 'codIncSIND':
codIncSIND_ = child_.text
codIncSIND_ = self.gds_validate_string(codIncSIND_, node, 'codIncSIND')
self.codIncSIND = codIncSIND_
elif nodeName_ == 'repDSR':
repDSR_ = child_.text
repDSR_ = self.gds_validate_string(repDSR_, node, 'repDSR')
self.repDSR = repDSR_
elif nodeName_ == 'rep13':
rep13_ = child_.text
rep13_ = self.gds_validate_string(rep13_, node, 'rep13')
self.rep13 = rep13_
elif nodeName_ == 'repFerias':
repFerias_ = child_.text
repFerias_ = self.gds_validate_string(repFerias_, node, 'repFerias')
self.repFerias = repFerias_
elif nodeName_ == 'repAviso':
repAviso_ = child_.text
repAviso_ = self.gds_validate_string(repAviso_, node, 'repAviso')
self.repAviso = repAviso_
elif nodeName_ == 'observacao':
observacao_ = child_.text
observacao_ = self.gds_validate_string(observacao_, node, 'observacao')
self.observacao = observacao_
elif nodeName_ == 'ideProcessoCP':
obj_ = ideProcessoCP.factory()
obj_.build(child_)
self.ideProcessoCP.append(obj_)
obj_.original_tagname_ = 'ideProcessoCP'
elif nodeName_ == 'ideProcessoIRRF':
obj_ = ideProcessoIRRF.factory()
obj_.build(child_)
self.ideProcessoIRRF.append(obj_)
obj_.original_tagname_ = 'ideProcessoIRRF'
elif nodeName_ == 'ideProcessoFGTS':
obj_ = ideProcessoFGTS.factory()
obj_.build(child_)
self.ideProcessoFGTS.append(obj_)
obj_.original_tagname_ = 'ideProcessoFGTS'
elif nodeName_ == 'ideProcessoSIND':
obj_ = ideProcessoSIND.factory()
obj_.build(child_)
self.ideProcessoSIND.append(obj_)
obj_.original_tagname_ = 'ideProcessoSIND'
# end class TDadosRubrica
class dscRubr(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, dscRubr)
if subclass is not None:
return subclass(*args_, **kwargs_)
if dscRubr.subclass:
return dscRubr.subclass(*args_, **kwargs_)
else:
return dscRubr(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='dscRubr', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('dscRubr')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='dscRubr')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='dscRubr', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='dscRubr'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='dscRubr', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class dscRubr
class natRubr(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, natRubr)
if subclass is not None:
return subclass(*args_, **kwargs_)
if natRubr.subclass:
return natRubr.subclass(*args_, **kwargs_)
else:
return natRubr(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='natRubr', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('natRubr')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='natRubr')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='natRubr', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='natRubr'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='natRubr', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class natRubr
class tpRubr(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, tpRubr)
if subclass is not None:
return subclass(*args_, **kwargs_)
if tpRubr.subclass:
return tpRubr.subclass(*args_, **kwargs_)
else:
return tpRubr(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='tpRubr', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('tpRubr')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='tpRubr')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='tpRubr', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='tpRubr'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='tpRubr', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class tpRubr
class codIncCP(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, codIncCP)
if subclass is not None:
return subclass(*args_, **kwargs_)
if codIncCP.subclass:
return codIncCP.subclass(*args_, **kwargs_)
else:
return codIncCP(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='codIncCP', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('codIncCP')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='codIncCP')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='codIncCP', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='codIncCP'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='codIncCP', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class codIncCP
class codIncIRRF(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, codIncIRRF)
if subclass is not None:
return subclass(*args_, **kwargs_)
if codIncIRRF.subclass:
return codIncIRRF.subclass(*args_, **kwargs_)
else:
return codIncIRRF(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='codIncIRRF', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('codIncIRRF')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='codIncIRRF')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='codIncIRRF', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='codIncIRRF'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='codIncIRRF', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class codIncIRRF
class codIncFGTS(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, codIncFGTS)
if subclass is not None:
return subclass(*args_, **kwargs_)
if codIncFGTS.subclass:
return codIncFGTS.subclass(*args_, **kwargs_)
else:
return codIncFGTS(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='codIncFGTS', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('codIncFGTS')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='codIncFGTS')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='codIncFGTS', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='codIncFGTS'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='codIncFGTS', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class codIncFGTS
class codIncSIND(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, codIncSIND)
if subclass is not None:
return subclass(*args_, **kwargs_)
if codIncSIND.subclass:
return codIncSIND.subclass(*args_, **kwargs_)
else:
return codIncSIND(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='codIncSIND', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('codIncSIND')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='codIncSIND')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='codIncSIND', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='codIncSIND'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='codIncSIND', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class codIncSIND
class repDSR(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, repDSR)
if subclass is not None:
return subclass(*args_, **kwargs_)
if repDSR.subclass:
return repDSR.subclass(*args_, **kwargs_)
else:
return repDSR(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='repDSR', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('repDSR')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='repDSR')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='repDSR', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='repDSR'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='repDSR', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class repDSR
class rep13(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, rep13)
if subclass is not None:
return subclass(*args_, **kwargs_)
if rep13.subclass:
return rep13.subclass(*args_, **kwargs_)
else:
return rep13(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='rep13', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('rep13')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='rep13')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='rep13', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='rep13'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='rep13', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class rep13
class repFerias(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, repFerias)
if subclass is not None:
return subclass(*args_, **kwargs_)
if repFerias.subclass:
return repFerias.subclass(*args_, **kwargs_)
else:
return repFerias(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='repFerias', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('repFerias')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='repFerias')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='repFerias', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='repFerias'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='repFerias', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class repFerias
class repAviso(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, repAviso)
if subclass is not None:
return subclass(*args_, **kwargs_)
if repAviso.subclass:
return repAviso.subclass(*args_, **kwargs_)
else:
return repAviso(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='repAviso', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('repAviso')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='repAviso')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='repAviso', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='repAviso'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='repAviso', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class repAviso
class observacao(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, observacao)
if subclass is not None:
return subclass(*args_, **kwargs_)
if observacao.subclass:
return observacao.subclass(*args_, **kwargs_)
else:
return observacao(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='observacao', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('observacao')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='observacao')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='observacao', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='observacao'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='observacao', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class observacao
class ideProcessoCP(GeneratedsSuper):
"""Caso a empresa possua processo administrativo ou judicial com
decisão/sentença favorável, determinando a não incidência de
contribuição previdenciária relativa a rubrica identificada no
evento, as informações deverão ser incluídas neste registro, e o
detalhamento do processo deverá ser efetuado através de evento
específico na tabela de processos."""
subclass = None
superclass = None
def __init__(self, tpProc=None, nrProc=None, extDecisao=None, codSusp=None):
self.original_tagname_ = None
self.tpProc = tpProc
self.nrProc = nrProc
self.extDecisao = extDecisao
self.codSusp = codSusp
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, ideProcessoCP)
if subclass is not None:
return subclass(*args_, **kwargs_)
if ideProcessoCP.subclass:
return ideProcessoCP.subclass(*args_, **kwargs_)
else:
return ideProcessoCP(*args_, **kwargs_)
factory = staticmethod(factory)
def get_tpProc(self): return self.tpProc
def set_tpProc(self, tpProc): self.tpProc = tpProc
def get_nrProc(self): return self.nrProc
def set_nrProc(self, nrProc): self.nrProc = nrProc
def get_extDecisao(self): return self.extDecisao
def set_extDecisao(self, extDecisao): self.extDecisao = extDecisao
def get_codSusp(self): return self.codSusp
def set_codSusp(self, codSusp): self.codSusp = codSusp
def hasContent_(self):
if (
self.tpProc is not None or
self.nrProc is not None or
self.extDecisao is not None or
self.codSusp is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='ideProcessoCP', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('ideProcessoCP')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='ideProcessoCP')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='ideProcessoCP', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='ideProcessoCP'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='ideProcessoCP', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.tpProc is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%stpProc>%s</%stpProc>%s' % (namespace_, self.gds_format_integer(self.tpProc, input_name='tpProc'), namespace_, eol_))
if self.nrProc is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%snrProc>%s</%snrProc>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.nrProc), input_name='nrProc')), namespace_, eol_))
if self.extDecisao is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%sextDecisao>%s</%sextDecisao>%s' % (namespace_, self.gds_format_integer(self.extDecisao, input_name='extDecisao'), namespace_, eol_))
if self.codSusp is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%scodSusp>%s</%scodSusp>%s' % (namespace_, self.gds_format_integer(self.codSusp, input_name='codSusp'), namespace_, eol_))
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'tpProc':
sval_ = child_.text
try:
ival_ = int(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires integer: %s' % exp)
ival_ = self.gds_validate_integer(ival_, node, 'tpProc')
self.tpProc = ival_
elif nodeName_ == 'nrProc':
nrProc_ = child_.text
nrProc_ = self.gds_validate_string(nrProc_, node, 'nrProc')
self.nrProc = nrProc_
elif nodeName_ == 'extDecisao':
sval_ = child_.text
try:
ival_ = int(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires integer: %s' % exp)
ival_ = self.gds_validate_integer(ival_, node, 'extDecisao')
self.extDecisao = ival_
elif nodeName_ == 'codSusp':
sval_ = child_.text
try:
ival_ = int(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires integer: %s' % exp)
ival_ = self.gds_validate_integer(ival_, node, 'codSusp')
self.codSusp = ival_
# end class ideProcessoCP
class tpProc(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, tpProc)
if subclass is not None:
return subclass(*args_, **kwargs_)
if tpProc.subclass:
return tpProc.subclass(*args_, **kwargs_)
else:
return tpProc(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='tpProc', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('tpProc')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='tpProc')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='tpProc', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='tpProc'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='tpProc', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class tpProc
class nrProc(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, nrProc)
if subclass is not None:
return subclass(*args_, **kwargs_)
if nrProc.subclass:
return nrProc.subclass(*args_, **kwargs_)
else:
return nrProc(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='nrProc', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('nrProc')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='nrProc')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='nrProc', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='nrProc'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='nrProc', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class nrProc
class extDecisao(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, extDecisao)
if subclass is not None:
return subclass(*args_, **kwargs_)
if extDecisao.subclass:
return extDecisao.subclass(*args_, **kwargs_)
else:
return extDecisao(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='extDecisao', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('extDecisao')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='extDecisao')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='extDecisao', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='extDecisao'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='extDecisao', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class extDecisao
class codSusp(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, codSusp)
if subclass is not None:
return subclass(*args_, **kwargs_)
if codSusp.subclass:
return codSusp.subclass(*args_, **kwargs_)
else:
return codSusp(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='codSusp', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('codSusp')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='codSusp')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='codSusp', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='codSusp'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='codSusp', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class codSusp
class ideProcessoIRRF(GeneratedsSuper):
"""Caso a empresa possua processo judicial com decisão/sentença
favorável, determinando a não incidência de imposto de renda
relativo a rubrica identificada no evento, as informações
deverão ser incluídas neste registro, e o detalhamento do
processo deverá ser efetuado através de evento específico na
tabela de processos."""
subclass = None
superclass = None
def __init__(self, nrProc=None, codSusp=None):
self.original_tagname_ = None
self.nrProc = nrProc
self.codSusp = codSusp
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, ideProcessoIRRF)
if subclass is not None:
return subclass(*args_, **kwargs_)
if ideProcessoIRRF.subclass:
return ideProcessoIRRF.subclass(*args_, **kwargs_)
else:
return ideProcessoIRRF(*args_, **kwargs_)
factory = staticmethod(factory)
def get_nrProc(self): return self.nrProc
def set_nrProc(self, nrProc): self.nrProc = nrProc
def get_codSusp(self): return self.codSusp
def set_codSusp(self, codSusp): self.codSusp = codSusp
def hasContent_(self):
if (
self.nrProc is not None or
self.codSusp is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='ideProcessoIRRF', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('ideProcessoIRRF')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='ideProcessoIRRF')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='ideProcessoIRRF', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='ideProcessoIRRF'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='ideProcessoIRRF', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.nrProc is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%snrProc>%s</%snrProc>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.nrProc), input_name='nrProc')), namespace_, eol_))
if self.codSusp is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%scodSusp>%s</%scodSusp>%s' % (namespace_, self.gds_format_integer(self.codSusp, input_name='codSusp'), namespace_, eol_))
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'nrProc':
nrProc_ = child_.text
nrProc_ = self.gds_validate_string(nrProc_, node, 'nrProc')
self.nrProc = nrProc_
elif nodeName_ == 'codSusp':
sval_ = child_.text
try:
ival_ = int(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires integer: %s' % exp)
ival_ = self.gds_validate_integer(ival_, node, 'codSusp')
self.codSusp = ival_
# end class ideProcessoIRRF
class ideProcessoFGTS(GeneratedsSuper):
"""Caso a empresa possua processo judicial com decisão/sentença
favorável, determinando a não incidência de FGTS relativo a
rubrica identificada no evento, as informações deverão ser
incluídas neste registro, e o detalhamento do processo deverá
ser efetuado através de evento específico na tabela de
processos."""
subclass = None
superclass = None
def __init__(self, nrProc=None, codSusp=None):
self.original_tagname_ = None
self.nrProc = nrProc
self.codSusp = codSusp
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, ideProcessoFGTS)
if subclass is not None:
return subclass(*args_, **kwargs_)
if ideProcessoFGTS.subclass:
return ideProcessoFGTS.subclass(*args_, **kwargs_)
else:
return ideProcessoFGTS(*args_, **kwargs_)
factory = staticmethod(factory)
def get_nrProc(self): return self.nrProc
def set_nrProc(self, nrProc): self.nrProc = nrProc
def get_codSusp(self): return self.codSusp
def set_codSusp(self, codSusp): self.codSusp = codSusp
def hasContent_(self):
if (
self.nrProc is not None or
self.codSusp is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='ideProcessoFGTS', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('ideProcessoFGTS')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='ideProcessoFGTS')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='ideProcessoFGTS', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='ideProcessoFGTS'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='ideProcessoFGTS', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.nrProc is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%snrProc>%s</%snrProc>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.nrProc), input_name='nrProc')), namespace_, eol_))
if self.codSusp is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%scodSusp>%s</%scodSusp>%s' % (namespace_, self.gds_format_integer(self.codSusp, input_name='codSusp'), namespace_, eol_))
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'nrProc':
nrProc_ = child_.text
nrProc_ = self.gds_validate_string(nrProc_, node, 'nrProc')
self.nrProc = nrProc_
elif nodeName_ == 'codSusp':
sval_ = child_.text
try:
ival_ = int(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires integer: %s' % exp)
ival_ = self.gds_validate_integer(ival_, node, 'codSusp')
self.codSusp = ival_
# end class ideProcessoFGTS
class ideProcessoSIND(GeneratedsSuper):
"""Caso a empresa possua processo judicial com decisão/sentença
favorável, determinando a não incidência de contribuição
sindical relativa a rubrica identificada no evento, as
informações deverão ser incluídas neste registro, e o
detalhamento do processo deverá ser efetuado através de evento
específico na tabela de processos."""
subclass = None
superclass = None
def __init__(self, nrProc=None, codSusp=None):
self.original_tagname_ = None
self.nrProc = nrProc
self.codSusp = codSusp
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, ideProcessoSIND)
if subclass is not None:
return subclass(*args_, **kwargs_)
if ideProcessoSIND.subclass:
return ideProcessoSIND.subclass(*args_, **kwargs_)
else:
return ideProcessoSIND(*args_, **kwargs_)
factory = staticmethod(factory)
def get_nrProc(self): return self.nrProc
def set_nrProc(self, nrProc): self.nrProc = nrProc
def get_codSusp(self): return self.codSusp
def set_codSusp(self, codSusp): self.codSusp = codSusp
def hasContent_(self):
if (
self.nrProc is not None or
self.codSusp is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='ideProcessoSIND', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('ideProcessoSIND')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='ideProcessoSIND')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='ideProcessoSIND', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='ideProcessoSIND'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='ideProcessoSIND', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.nrProc is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%snrProc>%s</%snrProc>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.nrProc), input_name='nrProc')), namespace_, eol_))
if self.codSusp is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%scodSusp>%s</%scodSusp>%s' % (namespace_, self.gds_format_integer(self.codSusp, input_name='codSusp'), namespace_, eol_))
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'nrProc':
nrProc_ = child_.text
nrProc_ = self.gds_validate_string(nrProc_, node, 'nrProc')
self.nrProc = nrProc_
elif nodeName_ == 'codSusp':
sval_ = child_.text
try:
ival_ = int(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires integer: %s' % exp)
ival_ = self.gds_validate_integer(ival_, node, 'codSusp')
self.codSusp = ival_
# end class ideProcessoSIND
class TPeriodoValidade(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self, iniValid=None, fimValid=None):
self.original_tagname_ = None
self.iniValid = iniValid
self.fimValid = fimValid
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, TPeriodoValidade)
if subclass is not None:
return subclass(*args_, **kwargs_)
if TPeriodoValidade.subclass:
return TPeriodoValidade.subclass(*args_, **kwargs_)
else:
return TPeriodoValidade(*args_, **kwargs_)
factory = staticmethod(factory)
def get_iniValid(self): return self.iniValid
def set_iniValid(self, iniValid): self.iniValid = iniValid
def get_fimValid(self): return self.fimValid
def set_fimValid(self, fimValid): self.fimValid = fimValid
def hasContent_(self):
if (
self.iniValid is not None or
self.fimValid is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='TPeriodoValidade', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('TPeriodoValidade')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='TPeriodoValidade')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='TPeriodoValidade', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='TPeriodoValidade'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='TPeriodoValidade', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.iniValid is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%siniValid>%s</%siniValid>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.iniValid), input_name='iniValid')), namespace_, eol_))
if self.fimValid is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%sfimValid>%s</%sfimValid>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.fimValid), input_name='fimValid')), namespace_, eol_))
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'iniValid':
iniValid_ = child_.text
iniValid_ = self.gds_validate_string(iniValid_, node, 'iniValid')
self.iniValid = iniValid_
elif nodeName_ == 'fimValid':
fimValid_ = child_.text
fimValid_ = self.gds_validate_string(fimValid_, node, 'fimValid')
self.fimValid = fimValid_
# end class TPeriodoValidade
GDSClassesMapping = {
'dadosRubrica': TDadosRubrica,
'ideEmpregador': TEmpregador,
'ideEvento': TIdeCadastro,
'ideRubrica': TIdeRubrica,
'novaValidade': TPeriodoValidade,
}
USAGE_TEXT = """
Usage: python <Parser>.py [ -s ] <in_xml_file>
"""
def usage():
print(USAGE_TEXT)
sys.exit(1)
def get_root_tag(node):
tag = Tag_pattern_.match(node.tag).groups()[-1]
rootClass = GDSClassesMapping.get(tag)
if rootClass is None:
rootClass = globals().get(tag)
return tag, rootClass
def parse(inFileName, silence=False):
parser = None
doc = parsexml_(inFileName, parser)
rootNode = doc.getroot()
rootTag, rootClass = get_root_tag(rootNode)
if rootClass is None:
rootTag = 'eSocial'
rootClass = eSocial
rootObj = rootClass.factory()
rootObj.build(rootNode)
# Enable Python to collect the space used by the DOM.
doc = None
if not silence:
sys.stdout.write('<?xml version="1.0" ?>\n')
rootObj.export(
sys.stdout, 0, name_=rootTag,
namespacedef_='',
pretty_print=True)
return rootObj
def parseEtree(inFileName, silence=False):
parser = None
doc = parsexml_(inFileName, parser)
rootNode = doc.getroot()
rootTag, rootClass = get_root_tag(rootNode)
if rootClass is None:
rootTag = 'eSocial'
rootClass = eSocial
rootObj = rootClass.factory()
rootObj.build(rootNode)
# Enable Python to collect the space used by the DOM.
doc = None
mapping = {}
rootElement = rootObj.to_etree(None, name_=rootTag, mapping_=mapping)
reverse_mapping = rootObj.gds_reverse_node_mapping(mapping)
if not silence:
content = etree_.tostring(
rootElement, pretty_print=True,
xml_declaration=True, encoding="utf-8")
sys.stdout.write(content)
sys.stdout.write('\n')
return rootObj, rootElement, mapping, reverse_mapping
def parseString(inString, silence=False):
if sys.version_info.major == 2:
from StringIO import StringIO as IOBuffer
else:
from io import BytesIO as IOBuffer
parser = None
doc = parsexml_(IOBuffer(inString), parser)
rootNode = doc.getroot()
rootTag, rootClass = get_root_tag(rootNode)
if rootClass is None:
rootTag = 'eSocial'
rootClass = eSocial
rootObj = rootClass.factory()
rootObj.build(rootNode)
# Enable Python to collect the space used by the DOM.
doc = None
if not silence:
sys.stdout.write('<?xml version="1.0" ?>\n')
rootObj.export(
sys.stdout, 0, name_=rootTag,
namespacedef_='')
return rootObj
def parseLiteral(inFileName, silence=False):
parser = None
doc = parsexml_(inFileName, parser)
rootNode = doc.getroot()
rootTag, rootClass = get_root_tag(rootNode)
if rootClass is None:
rootTag = 'eSocial'
rootClass = eSocial
rootObj = rootClass.factory()
rootObj.build(rootNode)
# Enable Python to collect the space used by the DOM.
doc = None
if not silence:
sys.stdout.write('#from evtTabRubrica import *\n\n')
sys.stdout.write('import evtTabRubrica as model_\n\n')
sys.stdout.write('rootObj = model_.rootClass(\n')
rootObj.exportLiteral(sys.stdout, 0, name_=rootTag)
sys.stdout.write(')\n')
return rootObj
def main():
args = sys.argv[1:]
if len(args) == 1:
parse(args[0])
else:
usage()
if __name__ == '__main__':
#import pdb; pdb.set_trace()
main()
__all__ = [
"TDadosRubrica",
"TEmpregador",
"TIdeCadastro",
"TIdeRubrica",
"TPeriodoValidade",
"eSocial"
]
| 42.312014
| 289
| 0.613783
| 17,542
| 168,698
| 5.635845
| 0.035743
| 0.038386
| 0.02467
| 0.026521
| 0.784603
| 0.749444
| 0.728212
| 0.699618
| 0.676121
| 0.645341
| 0
| 0.004475
| 0.280649
| 168,698
| 3,986
| 290
| 42.322629
| 0.810207
| 0.0322
| 0
| 0.672777
| 1
| 0.000274
| 0.043807
| 0.006864
| 0
| 0
| 0
| 0
| 0
| 1
| 0.153762
| false
| 0.035568
| 0.037209
| 0.023803
| 0.326129
| 0.078796
| 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
|
d8a641006901d3efca5807c152656c964610635c
| 181
|
py
|
Python
|
george/solvers/__init__.py
|
rychallener/george
|
98eae39ae453c31afac530c49f178f66c0013c5f
|
[
"MIT"
] | 379
|
2015-01-08T15:35:31.000Z
|
2022-03-21T13:01:03.000Z
|
george/solvers/__init__.py
|
rychallener/george
|
98eae39ae453c31afac530c49f178f66c0013c5f
|
[
"MIT"
] | 136
|
2015-01-06T17:36:12.000Z
|
2022-02-08T20:12:17.000Z
|
george/solvers/__init__.py
|
rychallener/george
|
98eae39ae453c31afac530c49f178f66c0013c5f
|
[
"MIT"
] | 119
|
2015-01-06T09:27:16.000Z
|
2022-01-14T17:54:48.000Z
|
# -*- coding: utf-8 -*-
__all__ = ["TrivialSolver", "BasicSolver", "HODLRSolver"]
from .trivial import TrivialSolver
from .basic import BasicSolver
from .hodlr import HODLRSolver
| 22.625
| 57
| 0.740331
| 19
| 181
| 6.842105
| 0.631579
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006369
| 0.132597
| 181
| 7
| 58
| 25.857143
| 0.821656
| 0.116022
| 0
| 0
| 0
| 0
| 0.221519
| 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
|
d8d28a7e7f2ba9016b06426c4ca635e6f7b3eb7f
| 946
|
py
|
Python
|
mission_control/navigator_alarm/navigator_alarm/alarm_handlers/network_loss.py
|
saltyan007/kill_test
|
a641dd74bae38122c3a044ef11cd445042d85e2b
|
[
"MIT"
] | null | null | null |
mission_control/navigator_alarm/navigator_alarm/alarm_handlers/network_loss.py
|
saltyan007/kill_test
|
a641dd74bae38122c3a044ef11cd445042d85e2b
|
[
"MIT"
] | null | null | null |
mission_control/navigator_alarm/navigator_alarm/alarm_handlers/network_loss.py
|
saltyan007/kill_test
|
a641dd74bae38122c3a044ef11cd445042d85e2b
|
[
"MIT"
] | 1
|
2019-07-29T12:24:15.000Z
|
2019-07-29T12:24:15.000Z
|
#!/usr/bin/env python
import rospy
from _template import HandlerBase
from navigator_msgs.srv import WrenchSelect
#from lqrrt_ros.msg import MoveAction, MoveGoal
class NetworkLossHandler(HandlerBase):
alarm_name = 'network_loss'
def __init__(self):
# To kill or to station hold. That is the question
# TODO: Check if we can station hold? Listen to /move_to/feedback and check 'tracking'.
#self.kill = self.alarm_broadcaster.add_alarm('network_loss', node_name="NetworkLossHandler")
#self.station_hold_alarm = self.alarm_broadcaster.add_alarm('station_hold', node_name="NetworkLossHandler")
self.wrench_changer = rospy.ServiceProxy("/change_wrench", WrenchSelect)
def handle(self, alarm, time_sent, parameters):
#self.station_hold_alarm.raise_alarm()
#self.kill.raise_alarm()
self.wrench_changer("rc")
def cancel(self, alarm, time_sent, parameters):
pass
| 37.84
| 115
| 0.727273
| 121
| 946
| 5.446281
| 0.504132
| 0.08346
| 0.060698
| 0.069803
| 0.16692
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.17759
| 946
| 24
| 116
| 39.416667
| 0.847044
| 0.485201
| 0
| 0
| 0
| 0
| 0.058455
| 0
| 0
| 0
| 0
| 0.041667
| 0
| 1
| 0.272727
| false
| 0.090909
| 0.272727
| 0
| 0.727273
| 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
|
d8d58f9f460b5c9922a344b38fc0fe080d151348
| 357
|
py
|
Python
|
test/components/test_convolve.py
|
gmrukwa/msi-preprocessing-pipeline
|
bc6d26daba42575babcdf5287999f1f844cf2e8e
|
[
"Apache-2.0"
] | null | null | null |
test/components/test_convolve.py
|
gmrukwa/msi-preprocessing-pipeline
|
bc6d26daba42575babcdf5287999f1f844cf2e8e
|
[
"Apache-2.0"
] | 5
|
2019-11-26T19:13:32.000Z
|
2019-11-29T08:14:28.000Z
|
test/components/test_convolve.py
|
gmrukwa/msi-preprocessing-pipeline
|
bc6d26daba42575babcdf5287999f1f844cf2e8e
|
[
"Apache-2.0"
] | null | null | null |
import unittest
import numpy as np
# TODO: Re-enable tests
# import bin.convolve as conv
# mzs = np.arange(100)
# class TestRelevantRange(unittest.TestCase):
# def test_returns_two_numbers(self):
# left, right = conv.relevant_range(mzs, mu=20, sig=2)
# self.assertIsInstance(left, int)
# self.assertIsInstance(right, int)
| 19.833333
| 62
| 0.686275
| 47
| 357
| 5.12766
| 0.723404
| 0.165975
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021127
| 0.204482
| 357
| 17
| 63
| 21
| 0.827465
| 0.834734
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.058824
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
d8e2c9004b510374c7d41cb0f1170375179a8651
| 1,736
|
py
|
Python
|
src/basic/migrations/0019_part.py
|
parezj/PartsView
|
a59a3804b574b11efd8f0472deae4dae1c16eb67
|
[
"WTFPL"
] | 3
|
2020-05-10T08:40:36.000Z
|
2020-10-28T18:09:31.000Z
|
src/basic/migrations/0019_part.py
|
parezj/PartsView
|
a59a3804b574b11efd8f0472deae4dae1c16eb67
|
[
"WTFPL"
] | 1
|
2019-12-17T23:41:17.000Z
|
2019-12-17T23:42:43.000Z
|
src/basic/migrations/0019_part.py
|
parezj/PartsView
|
a59a3804b574b11efd8f0472deae4dae1c16eb67
|
[
"WTFPL"
] | 1
|
2021-06-11T10:49:10.000Z
|
2021-06-11T10:49:10.000Z
|
# Generated by Django 2.2.8 on 2019-12-10 23:37
from django.db import migrations, models
import jsonfield.fields
class Migration(migrations.Migration):
initial = True
dependencies = [
('basic', '0018_delete_part'),
]
operations = [
migrations.CreateModel(
name='Part',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=50)),
('manuf', models.CharField(max_length=50)),
('desc', models.CharField(max_length=200)),
('pdf', models.CharField(max_length=200)),
('octo', models.CharField(max_length=200)),
('search', models.CharField(max_length=50)),
('time', models.DateTimeField()),
('img_big', models.CharField(max_length=200)),
('img_big2', models.CharField(max_length=200)),
('img_big3', models.CharField(max_length=200)),
('img_big4', models.CharField(max_length=200)),
('img_small', models.CharField(max_length=200)),
('img_footprint', models.CharField(max_length=200)),
('img_symbol', models.CharField(max_length=200)),
('farnell_mnu', models.IntegerField()),
('farnell_czk', models.FloatField()),
('mouser_mnu', models.IntegerField()),
('mouser_czk', models.FloatField()),
('digikey_mnu', models.IntegerField()),
('digikey_czk', models.FloatField()),
('specs', jsonfield.fields.JSONField()),
],
),
]
| 39.454545
| 114
| 0.550115
| 168
| 1,736
| 5.5
| 0.39881
| 0.211039
| 0.253247
| 0.337662
| 0.396104
| 0.194805
| 0
| 0
| 0
| 0
| 0
| 0.047697
| 0.299539
| 1,736
| 43
| 115
| 40.372093
| 0.712171
| 0.025922
| 0
| 0
| 1
| 0
| 0.113085
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.055556
| 0
| 0.166667
| 0.027778
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
d8ef18e3dadb33280a18e801c7a86bf86e14b4f9
| 221
|
py
|
Python
|
spray/helpers.py
|
rmerkushin/SpriteTools
|
1c63f00c4c529e0be7e2f733126d7194ec835c65
|
[
"MIT"
] | null | null | null |
spray/helpers.py
|
rmerkushin/SpriteTools
|
1c63f00c4c529e0be7e2f733126d7194ec835c65
|
[
"MIT"
] | null | null | null |
spray/helpers.py
|
rmerkushin/SpriteTools
|
1c63f00c4c529e0be7e2f733126d7194ec835c65
|
[
"MIT"
] | null | null | null |
import bpy
def get_frames_info():
frame_start = bpy.context.scene.frame_start
frame_end = bpy.context.scene.frame_end
frame_count = frame_end - frame_start + 1
return frame_start, frame_end, frame_count
| 24.555556
| 47
| 0.751131
| 34
| 221
| 4.529412
| 0.411765
| 0.25974
| 0.253247
| 0.25974
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005495
| 0.176471
| 221
| 8
| 48
| 27.625
| 0.840659
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.166667
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
2b06db04ab209ce009e97dc12041abdb247f3c53
| 299
|
py
|
Python
|
lib/distributions/__init__.py
|
joelouismarino/variational_rl
|
11dc14bfb56f3ebbfccd5de206b78712a8039a9a
|
[
"MIT"
] | 15
|
2020-10-20T22:09:36.000Z
|
2021-12-24T13:40:36.000Z
|
lib/distributions/__init__.py
|
joelouismarino/variational_rl
|
11dc14bfb56f3ebbfccd5de206b78712a8039a9a
|
[
"MIT"
] | null | null | null |
lib/distributions/__init__.py
|
joelouismarino/variational_rl
|
11dc14bfb56f3ebbfccd5de206b78712a8039a9a
|
[
"MIT"
] | 1
|
2020-10-23T19:48:06.000Z
|
2020-10-23T19:48:06.000Z
|
from .distribution import Distribution
from .kl_divergence import kl_divergence
from .boltzmann import Boltzmann
from .mixture_of_normals import MixtureOfNormals
from .mixture_of_tanh_normals import MixtureOfTanhNormals
from .normal_uniform import NormalUniform
from .tanh_normal import TanhNormal
| 33.222222
| 57
| 0.879599
| 37
| 299
| 6.864865
| 0.432432
| 0.094488
| 0.102362
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09699
| 299
| 8
| 58
| 37.375
| 0.940741
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 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
|
2b109b36a4486a66034ed4b3c5ad99d295a37b25
| 132
|
py
|
Python
|
moya/testprojects/scratch/blog/py/test.py
|
moyaproject/moya
|
78b91d87b4519f91dfdd2b40dab44e72f201a843
|
[
"MIT"
] | 129
|
2015-02-16T12:02:50.000Z
|
2021-11-06T00:20:01.000Z
|
moya/testprojects/scratch/blog/py/test.py
|
liaohandel/moya
|
78b91d87b4519f91dfdd2b40dab44e72f201a843
|
[
"MIT"
] | 5
|
2015-02-19T15:56:41.000Z
|
2015-09-08T18:58:35.000Z
|
moya/testprojects/scratch/blog/py/test.py
|
liaohandel/moya
|
78b91d87b4519f91dfdd2b40dab44e72f201a843
|
[
"MIT"
] | 14
|
2015-02-19T17:20:34.000Z
|
2022-03-28T01:38:09.000Z
|
from __future__ import print_function
import moya
@moya.expose.macro("test")
def test():
print("Success! :-)")
return 10
| 13.2
| 37
| 0.681818
| 17
| 132
| 5
| 0.764706
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018519
| 0.181818
| 132
| 9
| 38
| 14.666667
| 0.768519
| 0
| 0
| 0
| 0
| 0
| 0.121212
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| true
| 0
| 0.333333
| 0
| 0.666667
| 0.333333
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
2b11d047488b2aec2504fd9bc6de2650eb3e618e
| 170
|
py
|
Python
|
Python/Any or All.py
|
MonwarAdeeb/HackerRank-Solutions
|
571327e9688061745000ae81c5fd74ff7a2976d4
|
[
"MIT"
] | null | null | null |
Python/Any or All.py
|
MonwarAdeeb/HackerRank-Solutions
|
571327e9688061745000ae81c5fd74ff7a2976d4
|
[
"MIT"
] | null | null | null |
Python/Any or All.py
|
MonwarAdeeb/HackerRank-Solutions
|
571327e9688061745000ae81c5fd74ff7a2976d4
|
[
"MIT"
] | null | null | null |
# Enter your code here. Read input from STDIN. Print output to STDOUT
_, n = input(), input().split()
print( all([int(i)>0 for i in n]) and any([j==j[::-1] for j in n]) )
| 56.666667
| 69
| 0.629412
| 34
| 170
| 3.117647
| 0.705882
| 0.056604
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014286
| 0.176471
| 170
| 3
| 70
| 56.666667
| 0.742857
| 0.394118
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 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
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.